@thibezer/ui-components-kit 2.24.0 → 2.24.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (150) hide show
  1. package/CHANGELOG.md +69 -1
  2. package/dist/botao.cjs +12 -1
  3. package/dist/botao.js +162 -3
  4. package/dist/camadas.cjs +311 -1
  5. package/dist/camadas.js +3244 -148
  6. package/dist/campo-texto.cjs +16 -1
  7. package/dist/campo-texto.js +308 -7
  8. package/dist/canvas.cjs +22 -22
  9. package/dist/canvas.js +230 -233
  10. package/dist/card.cjs +20 -1
  11. package/dist/card.js +145 -2
  12. package/dist/components/ui-canvas-prancha/index.d.ts +1 -1
  13. package/dist/components/ui-canvas-prancha/prancha-teclado.d.ts +18 -0
  14. package/dist/components/ui-canvas-prancha/ui-canvas-prancha-base.d.ts +4 -0
  15. package/dist/components/ui-card/ui-card.d.ts +4 -0
  16. package/dist/components/ui-editor-prancha/editor-modos.d.ts +10 -0
  17. package/dist/components/ui-editor-prancha/editor-tipos.d.ts +4 -0
  18. package/dist/components/ui-editor-prancha/index.d.ts +1 -0
  19. package/dist/components/ui-editor-prancha/ui-editor-prancha.d.ts +39 -6
  20. package/dist/core.cjs +1 -1
  21. package/dist/core.js +44 -55
  22. package/dist/{cores-utils-BrdynxRd.js → cores-utils-DMyqWvZh.js} +2 -2
  23. package/dist/cores.cjs +32 -1
  24. package/dist/cores.js +300 -13
  25. package/dist/custom-elements.json +33962 -33439
  26. package/dist/data.cjs +28 -1
  27. package/dist/data.js +286 -99
  28. package/dist/{feature_caixa-2Sxv3tGa.js → feature_caixa-BVc5LenS.js} +42 -42
  29. package/dist/{feature_desenho-BVHivWIB.js → feature_desenho-CC8Mp5Gp.js} +2 -2
  30. package/dist/feedback.cjs +52 -1
  31. package/dist/feedback.js +655 -25
  32. package/dist/forms.cjs +66 -1
  33. package/dist/forms.js +1216 -39
  34. package/dist/{geometria-px-DUs5FgLE.js → geometria-px-DHMPUsxC.js} +47 -47
  35. package/dist/index.cjs +67 -1
  36. package/dist/index.js +1476 -274
  37. package/dist/kit-base-CGqj9aiD.cjs +2 -0
  38. package/dist/kit-base-_THn4w3u.js +1079 -0
  39. package/dist/mapa.cjs +5 -5
  40. package/dist/mapa.js +16 -17
  41. package/dist/modal.cjs +18 -1
  42. package/dist/modal.js +235 -29
  43. package/dist/motor.js +49 -49
  44. package/dist/prancha-nucleo.cjs +3 -1
  45. package/dist/prancha-nucleo.js +3120 -277
  46. package/dist/prancha.cjs +38 -1
  47. package/dist/prancha.js +3233 -228
  48. package/dist/register.cjs +1 -1
  49. package/dist/register.js +3 -20
  50. package/dist/seletor-mapa-base.cjs +13 -13
  51. package/dist/seletor-mapa-base.js +3 -5
  52. package/dist/tabela.cjs +142 -1
  53. package/dist/tabela.js +3773 -92
  54. package/dist/tipos-elementos.d.ts +5 -1
  55. package/dist/tipos-vue.d.ts +4 -1
  56. package/dist/tools.cjs +16 -1
  57. package/dist/tools.js +1564 -26
  58. package/dist/ui-seletor-cor-BGw8SBPm.cjs +83 -0
  59. package/dist/{ui-seletor-cor-Cd8jkzXG.js → ui-seletor-cor-B_twSm-V.js} +8 -9
  60. package/dist/utils-ClVgqVyJ.cjs +1 -0
  61. package/dist/utils-DrHoxxmf.js +83 -0
  62. package/package.json +43 -2
  63. package/dist/acessibilidade-CSzX-DkG.cjs +0 -1
  64. package/dist/acessibilidade-CUlSXc2X.js +0 -38
  65. package/dist/altura-controle-ukMRPckR.cjs +0 -1
  66. package/dist/altura-controle-vxQiXG4q.js +0 -62
  67. package/dist/alvo-digitavel-CzCvNVQ3.js +0 -23
  68. package/dist/alvo-digitavel-DbH0hYFf.cjs +0 -1
  69. package/dist/degrade-CIxvOTUv.cjs +0 -1
  70. package/dist/degrade-gDa5sW__.js +0 -119
  71. package/dist/feature_caixa-CnYPKVFS.cjs +0 -1
  72. package/dist/feature_caixa-DCs9ZeSk.js +0 -1038
  73. package/dist/feature_historico-BAIYk1Me.cjs +0 -3
  74. package/dist/feature_historico-C4h9y5fu.js +0 -3039
  75. package/dist/form-atalhos-7JTYvumA.cjs +0 -1
  76. package/dist/form-atalhos-DDTlpgaB.js +0 -203
  77. package/dist/form-erros-CwPz7Jr4.cjs +0 -1
  78. package/dist/form-erros-DT5HklfD.js +0 -184
  79. package/dist/form-submissao-C-SPRKgT.js +0 -61
  80. package/dist/form-submissao-DxKO5MHI.cjs +0 -1
  81. package/dist/form-validacao-BlQFxUVj.js +0 -104
  82. package/dist/form-validacao-DIeyQVH5.cjs +0 -1
  83. package/dist/geometria-px-DKrWq_XY.js +0 -639
  84. package/dist/leaflet-CEPcxGWV.cjs +0 -1
  85. package/dist/leaflet-DOq10gfg.js +0 -84
  86. package/dist/leaflet-loader-94z5VsdY.cjs +0 -2
  87. package/dist/leaflet-loader-Cjcdgj5R.js +0 -21
  88. package/dist/listener-bag-D5omxZ9h.cjs +0 -1
  89. package/dist/listener-bag-DQgv7OON.js +0 -34
  90. package/dist/motor-By2te6PZ.js +0 -1400
  91. package/dist/motor-CkMxd378.cjs +0 -1
  92. package/dist/opcoes-CupvWVIm.js +0 -24
  93. package/dist/opcoes-vdAUY5OI.cjs +0 -1
  94. package/dist/parts-CaoQiCfI.js +0 -7
  95. package/dist/parts-vQa2873h.cjs +0 -1
  96. package/dist/prancha-paleta-BZ-9QDgh.js +0 -5276
  97. package/dist/prancha-paleta-Bb24vP71.cjs +0 -17
  98. package/dist/ssr-safe-5cWfJP-s.js +0 -10
  99. package/dist/ssr-safe-CiHD1adl.cjs +0 -1
  100. package/dist/svg-seguro-ChVJ2L2z.js +0 -74
  101. package/dist/svg-seguro-J2RM1Ssf.cjs +0 -1
  102. package/dist/ui-badge-DE58YSBY.cjs +0 -28
  103. package/dist/ui-badge-KgmI3jOD.js +0 -201
  104. package/dist/ui-botao-Dz8YvmiA.cjs +0 -12
  105. package/dist/ui-botao-zLkcMMyP.js +0 -168
  106. package/dist/ui-bus-CUd99VJi.js +0 -177
  107. package/dist/ui-bus-XqBLlTYQ.cjs +0 -1
  108. package/dist/ui-camadas-DoHPnbQm.js +0 -3133
  109. package/dist/ui-camadas-Vx7wYD4D.cjs +0 -311
  110. package/dist/ui-campo-texto-Dliyt9qr.cjs +0 -16
  111. package/dist/ui-campo-texto-btevggO3.js +0 -379
  112. package/dist/ui-card-7IEYbCN0.js +0 -150
  113. package/dist/ui-card-Bx8EyzYY.cjs +0 -20
  114. package/dist/ui-card-DFnRp9bl.js +0 -146
  115. package/dist/ui-card-DrWVJQKw.cjs +0 -20
  116. package/dist/ui-controle-cores-B1w_Yl69.cjs +0 -32
  117. package/dist/ui-controle-cores-BRjMvmMn.js +0 -291
  118. package/dist/ui-controle-cores-BcH9k2Fa.js +0 -292
  119. package/dist/ui-controle-cores-CvSTP6gJ.cjs +0 -32
  120. package/dist/ui-editor-prancha-CIngI6yI.js +0 -2886
  121. package/dist/ui-editor-prancha-DorSe6sC.cjs +0 -31
  122. package/dist/ui-linha-2kY7TNUJ.cjs +0 -38
  123. package/dist/ui-linha-B4mBRm1x.cjs +0 -61
  124. package/dist/ui-linha-DTEIIww4.js +0 -1167
  125. package/dist/ui-linha-KFF86FW5.js +0 -752
  126. package/dist/ui-modal-BrXzVZ65.js +0 -216
  127. package/dist/ui-modal-lARKzEVZ.cjs +0 -18
  128. package/dist/ui-paleta-ferramentas-Bu6JaT0s.js +0 -1245
  129. package/dist/ui-paleta-ferramentas-D3Jhwt26.cjs +0 -21
  130. package/dist/ui-paleta-ferramentas-DebHYiwd.js +0 -1615
  131. package/dist/ui-paleta-ferramentas-Dgejtluh.js +0 -1423
  132. package/dist/ui-paleta-ferramentas-hzyo8wBt.cjs +0 -22
  133. package/dist/ui-paleta-ferramentas-jWuICjW8.cjs +0 -22
  134. package/dist/ui-seletor-cor-0RLjcME6.cjs +0 -83
  135. package/dist/ui-seletor-cor-CMuuW-Ym.cjs +0 -83
  136. package/dist/ui-seletor-cor-DFIQ1sin.js +0 -405
  137. package/dist/ui-skeleton-BLEV6h3k.js +0 -653
  138. package/dist/ui-skeleton-B_XTaGrX.cjs +0 -52
  139. package/dist/ui-switch-BXIDwC-Y.cjs +0 -66
  140. package/dist/ui-switch-Ctxk-jKS.js +0 -1212
  141. package/dist/ui-tabela-CXxqbwXv.cjs +0 -7
  142. package/dist/ui-tabela-Cd0vOwnT.js +0 -1459
  143. package/dist/ui-tabela-propriedades-C5cIF5ES.js +0 -3779
  144. package/dist/ui-tabela-propriedades-CJyo568n.js +0 -3517
  145. package/dist/ui-tabela-propriedades-D96Djx-q.cjs +0 -136
  146. package/dist/ui-tabela-propriedades-Wa34hfIr.cjs +0 -142
  147. package/dist/ui-tabela-propriedades-ahQhQauu.js +0 -2329
  148. package/dist/ui-tabela-propriedades-w9JWhjHy.cjs +0 -142
  149. package/dist/zero-js-triggers-CJT988bR.js +0 -83
  150. package/dist/zero-js-triggers-CgM9IIQB.cjs +0 -1
@@ -0,0 +1,1079 @@
1
+ var B = Object.defineProperty;
2
+ var Z = (e, t, r) => t in e ? B(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r;
3
+ var b = (e, t, r) => Z(e, typeof t != "symbol" ? t + "" : t, r);
4
+ class C {
5
+ constructor() {
6
+ b(this, "entries", []);
7
+ }
8
+ /**
9
+ * Adiciona um ouvinte de evento e rastreia sua referência para limpeza futura.
10
+ * Suporta handlers tipados (MouseEvent, KeyboardEvent, CustomEvent, etc.).
11
+ */
12
+ add(t, r, a, o) {
13
+ if (!t) return;
14
+ const i = a;
15
+ t.addEventListener(r, i, o), this.entries.push({ target: t, type: r, listener: i, options: o });
16
+ }
17
+ /**
18
+ * Remove todos os ouvintes de eventos atualmente registrados e esvazia a coleção.
19
+ */
20
+ cleanup() {
21
+ this.entries.forEach(({ target: t, type: r, listener: a, options: o }) => {
22
+ t.removeEventListener(r, a, o);
23
+ }), this.entries = [];
24
+ }
25
+ /**
26
+ * Retorna a quantidade de ouvintes ativos rastreados.
27
+ */
28
+ get size() {
29
+ return this.entries.length;
30
+ }
31
+ }
32
+ const Pe = typeof window < "u" && typeof document < "u", F = typeof HTMLElement < "u" ? HTMLElement : class {
33
+ };
34
+ function Ue(e, t) {
35
+ typeof customElements < "u" && !customElements.get(e) && customElements.define(e, t);
36
+ }
37
+ const j = [
38
+ "button:not([type])",
39
+ 'button[type="submit"]',
40
+ 'input[type="submit"]',
41
+ 'input[type="image"]',
42
+ 'ui-botao[type="submit"]',
43
+ "ui-botao[tipo-submit]",
44
+ 'ui-botao-primario[type="submit"]',
45
+ "ui-botao-primario[tipo-submit]"
46
+ ].join(", "), G = [
47
+ "input:not([type])",
48
+ ...["text", "search", "url", "tel", "email", "password", "date", "month", "week", "time", "datetime-local", "number"].map((e) => `input[type="${e}"]`),
49
+ "ui-campo-texto",
50
+ "ui-input"
51
+ ].join(", ");
52
+ function M(e, t) {
53
+ const r = Array.from(e.querySelectorAll(t)).filter((o) => {
54
+ const i = o.getAttribute("form");
55
+ return !i || i === e.id;
56
+ });
57
+ if (!e.id) return r;
58
+ const a = Array.from(
59
+ e.getRootNode().querySelectorAll(`[form="${CSS.escape(e.id)}"]`)
60
+ ).filter((o) => !e.contains(o) && o.matches(t));
61
+ return [...r, ...a].sort(
62
+ (o, i) => o.compareDocumentPosition(i) & Node.DOCUMENT_POSITION_FOLLOWING ? -1 : 1
63
+ );
64
+ }
65
+ function K(e) {
66
+ if (e.hasAttribute("disabled")) return !0;
67
+ try {
68
+ return e.matches(":disabled");
69
+ } catch {
70
+ return !1;
71
+ }
72
+ }
73
+ function qe(e, t, r) {
74
+ if (!t) {
75
+ e.requestSubmit();
76
+ return;
77
+ }
78
+ const a = document.createElement("button");
79
+ a.type = "submit", a.name = t, a.value = r ?? "", a.hidden = !0, e.append(a);
80
+ try {
81
+ e.requestSubmit(a);
82
+ } finally {
83
+ a.remove();
84
+ }
85
+ }
86
+ function Ve(e) {
87
+ const t = M(e, j)[0];
88
+ if (t) {
89
+ K(t) || t.click();
90
+ return;
91
+ }
92
+ M(e, G).length === 1 && e.requestSubmit();
93
+ }
94
+ const We = ["sm", "md", "lg"], T = "--ui-campo-altura", Y = 15, J = 200, Q = 12.5, R = {
95
+ sm: "sm",
96
+ compacta: "sm",
97
+ compacto: "sm",
98
+ md: "md",
99
+ padrao: "md",
100
+ padrão: "md",
101
+ normal: "md",
102
+ lg: "lg",
103
+ relaxada: "lg",
104
+ relaxado: "lg",
105
+ conforto: "lg"
106
+ }, X = {
107
+ sm: "var(--ui-altura-sm, 26px)",
108
+ md: "var(--ui-altura-md, 34px)",
109
+ lg: "var(--ui-altura-lg, 42px)"
110
+ };
111
+ function _(e) {
112
+ const t = (e ?? "").trim().toLowerCase();
113
+ return Object.prototype.hasOwnProperty.call(R, t) ? R[t] : null;
114
+ }
115
+ function $(e) {
116
+ const t = _(e);
117
+ return t ? X[t] : null;
118
+ }
119
+ function ee(e) {
120
+ if (e == null) return null;
121
+ const t = String(e).trim().toLowerCase(), r = /^(\d+(?:\.\d+)?|\.\d+)(px|rem|em)?$/.exec(t);
122
+ if (!r) return null;
123
+ const a = Number(r[1]);
124
+ if (!Number.isFinite(a) || a <= 0) return null;
125
+ const o = r[2] ?? "px";
126
+ return o === "px" ? `${Math.min(J, Math.max(Y, a))}px` : `${Math.min(Q, a)}${o}`;
127
+ }
128
+ function te(e) {
129
+ return ee(e.altura) ?? $(e.tamanho);
130
+ }
131
+ function re(e) {
132
+ return {
133
+ altura: e.getAttribute("altura") ?? e.getAttribute("height"),
134
+ tamanho: e.getAttribute("tamanho") ?? e.getAttribute("size") ?? e.getAttribute("densidade")
135
+ };
136
+ }
137
+ const S = /* @__PURE__ */ new WeakSet();
138
+ function He(e) {
139
+ try {
140
+ const t = te(re(e));
141
+ t ? (e.style.setProperty(T, t), S.add(e)) : S.has(e) && (e.style.removeProperty(T), S.delete(e));
142
+ } catch {
143
+ }
144
+ }
145
+ const ae = ["degrade", "gradiente", "gradient"], oe = ["degrade", "ui-degrade", "gradiente", "ui-gradiente"], ie = 512, ne = /* @__PURE__ */ new Set([
146
+ "linear-gradient",
147
+ "radial-gradient",
148
+ "conic-gradient",
149
+ "repeating-linear-gradient",
150
+ "repeating-radial-gradient",
151
+ "repeating-conic-gradient"
152
+ ]), le = /* @__PURE__ */ new Set(["", "true", "1", "sim", "yes", "padrao", "default"]), se = /* @__PURE__ */ new Set(["false", "0", "off", "none", "nao", "não", "no"]), ue = Object.freeze({
153
+ primario: "var(--ui-gradiente-primario)",
154
+ primaria: "var(--ui-gradiente-primario)",
155
+ primary: "var(--ui-gradiente-primario)",
156
+ secundario: "var(--ui-gradiente-secundario)",
157
+ secundaria: "var(--ui-gradiente-secundario)",
158
+ secondary: "var(--ui-gradiente-secundario)",
159
+ destaque: "var(--ui-gradiente-destaque)",
160
+ accent: "var(--ui-gradiente-destaque)",
161
+ destrutivo: "var(--ui-gradiente-destrutivo)",
162
+ destructive: "var(--ui-gradiente-destrutivo)",
163
+ superficie: "var(--ui-gradiente-superficie)",
164
+ surface: "var(--ui-gradiente-superficie)",
165
+ fundo: "var(--ui-gradiente-superficie)",
166
+ card: "var(--ui-gradiente-card)",
167
+ elevado: "var(--ui-gradiente-elevado)",
168
+ elevated: "var(--ui-gradiente-elevado)",
169
+ sucesso: "var(--ui-gradiente-sucesso)",
170
+ success: "var(--ui-gradiente-sucesso)",
171
+ erro: "var(--ui-gradiente-erro)",
172
+ error: "var(--ui-gradiente-erro)",
173
+ perigo: "var(--ui-gradiente-erro)",
174
+ danger: "var(--ui-gradiente-erro)",
175
+ alerta: "var(--ui-gradiente-alerta)",
176
+ warning: "var(--ui-gradiente-alerta)",
177
+ aviso: "var(--ui-gradiente-alerta)",
178
+ info: "var(--ui-gradiente-info)",
179
+ informacao: "var(--ui-gradiente-info)",
180
+ texto: "var(--ui-gradiente-texto)",
181
+ text: "var(--ui-gradiente-texto)"
182
+ }), ce = /[;{}<>\\"'\r\n`]|\/\*|\*\/|\b(?:url|image-set|expression|attr|env)\s*\(|(?:javascript|vbscript|data)\s*:|-moz-binding|behavior\s*:/i;
183
+ function Be(e) {
184
+ const t = e.toLowerCase();
185
+ return t === "degrade" || t === "gradiente" || t === "gradient";
186
+ }
187
+ function U(e) {
188
+ const t = [];
189
+ let r = 0, a = 0;
190
+ for (let i = 0; i < e.length; i++) {
191
+ const n = e[i];
192
+ if (n === "(")
193
+ r++;
194
+ else if (n === ")") {
195
+ if (r--, r < 0) return null;
196
+ } else if (n === "," && r === 0) {
197
+ const l = e.slice(a, i).trim();
198
+ if (!l) return null;
199
+ t.push(l), a = i + 1;
200
+ }
201
+ }
202
+ if (r !== 0) return null;
203
+ const o = e.slice(a).trim();
204
+ return o ? (t.push(o), t) : null;
205
+ }
206
+ function fe(e) {
207
+ const t = e.indexOf("(");
208
+ if (t <= 0 || !e.endsWith(")")) return !1;
209
+ const r = e.slice(0, t).trim().toLowerCase(), a = e.slice(t + 1, -1).trim();
210
+ if (!a) return !1;
211
+ if (r === "var") {
212
+ const o = U(a);
213
+ return !o || o.length === 0 || o.length > 2 ? !1 : /^--[a-zA-Z0-9_-]{1,64}$/.test(o[0]);
214
+ }
215
+ return ne.has(r) ? /^[a-zA-Z0-9\s,#.%()+\-_/:]+$/.test(a) : !1;
216
+ }
217
+ function de(e) {
218
+ if (typeof e != "string") return null;
219
+ const t = e.trim();
220
+ if (!t || t.length > ie || ce.test(t)) return null;
221
+ const r = U(t);
222
+ if (!r || r.length === 0 || r.length > 6) return null;
223
+ for (const a of r)
224
+ if (!fe(a)) return null;
225
+ return t;
226
+ }
227
+ function me(e, t) {
228
+ if (e == null)
229
+ return { ativo: !1, explicito: null };
230
+ if (typeof e != "string")
231
+ return { ativo: !1, explicito: null };
232
+ const r = e.trim(), a = r.toLowerCase();
233
+ if (se.has(a))
234
+ return { ativo: !1, explicito: null };
235
+ if (le.has(a))
236
+ return { ativo: !0, explicito: t ?? null };
237
+ const o = ue[a];
238
+ if (o)
239
+ return { ativo: !0, explicito: o };
240
+ const i = de(r);
241
+ return i ? { ativo: !0, explicito: i } : { ativo: !1, explicito: null };
242
+ }
243
+ function pe(e) {
244
+ for (const t of ae)
245
+ if (e.hasAttribute(t))
246
+ return e.getAttribute(t);
247
+ return null;
248
+ }
249
+ function Ze(e, t, r) {
250
+ const a = pe(e), o = me(a, r), i = oe.some((l) => e.classList.contains(l)), n = o.ativo || i;
251
+ return t && (o.explicito ? t.style.setProperty("--ui-degrade-interno", o.explicito) : t.style.removeProperty("--ui-degrade-interno"), n ? t.setAttribute("data-degrade", "ativo") : t.removeAttribute("data-degrade")), n;
252
+ }
253
+ function Fe(e, t, r) {
254
+ const a = new Set((e.getAttribute("part") || "").split(/\s+/).filter(Boolean));
255
+ r ? a.add(t) : a.delete(t), e.setAttribute("part", Array.from(a).join(" "));
256
+ }
257
+ function I(e) {
258
+ if (!e) return !1;
259
+ const t = e;
260
+ return t.tagName === "INPUT" || t.tagName === "TEXTAREA" || t.tagName === "SELECT" || t.isContentEditable === !0;
261
+ }
262
+ const he = 'button, a[href], summary, [role="button"], [role="menuitem"], [role="tab"], [role="switch"], [role="checkbox"], [role="option"]';
263
+ function je(e) {
264
+ var r;
265
+ const t = ((r = e.composedPath) == null ? void 0 : r.call(e)[0]) ?? e.target;
266
+ return t instanceof Element ? t.closest(he) !== null : !1;
267
+ }
268
+ function Ge(e) {
269
+ var a, o;
270
+ const t = (a = e == null ? void 0 : e.composedPath) == null ? void 0 : a.call(e)[0];
271
+ if (t instanceof Element) return I(t);
272
+ let r = typeof document > "u" ? null : document.activeElement;
273
+ for (; (o = r == null ? void 0 : r.shadowRoot) != null && o.activeElement; ) r = r.shadowRoot.activeElement;
274
+ return I(r);
275
+ }
276
+ function Ke(e, t, r, a) {
277
+ if (e.textContent = t, !r) return;
278
+ const o = document.createElement("span");
279
+ o.className = a, o.setAttribute("aria-hidden", "true"), o.textContent = "*", e.append(" ", o);
280
+ }
281
+ function Ye(e, t, r) {
282
+ const a = (e ?? "").trim().toLowerCase();
283
+ return t.includes(a) ? a : r;
284
+ }
285
+ function Je(e, t) {
286
+ const r = (e ?? "").trim().toLowerCase();
287
+ return t.includes(r) ? r : null;
288
+ }
289
+ function Qe(e, t, r, a) {
290
+ if (e == null || typeof e == "string" && e.trim() === "") return a;
291
+ const o = typeof e == "number" ? e : Number(e.trim());
292
+ return Number.isFinite(o) ? Math.min(r, Math.max(t, Math.trunc(o))) : a;
293
+ }
294
+ function Xe(e, t = 0) {
295
+ if (e == null || e.trim() === "") return null;
296
+ const r = Number(e.trim());
297
+ return !Number.isFinite(r) || r < t ? null : Math.trunc(r);
298
+ }
299
+ let L = 0;
300
+ function _e(e = "ui") {
301
+ return L += 1, `${e}-${L.toString(36)}-${Math.random().toString(36).slice(2, 7)}`;
302
+ }
303
+ function q(e, t) {
304
+ if (e === t) return "";
305
+ if (e.nodeType === 3) return e.textContent ?? "";
306
+ let r = "";
307
+ return e.childNodes.forEach((a) => {
308
+ r += q(a, t);
309
+ }), r;
310
+ }
311
+ function ge(e, t) {
312
+ var i, n, l;
313
+ const r = (i = e.getAttribute("aria-label")) == null ? void 0 : i.trim();
314
+ if (r) return r;
315
+ const a = /* @__PURE__ */ new Set();
316
+ try {
317
+ (n = t == null ? void 0 : t.labels) == null || n.forEach((s) => a.add(s));
318
+ } catch {
319
+ }
320
+ if (e.id) {
321
+ const s = e.getRootNode();
322
+ (l = s.querySelectorAll) == null || l.call(s, "label[for]").forEach((f) => {
323
+ f.htmlFor === e.id && a.add(f);
324
+ });
325
+ }
326
+ const o = e.closest("label");
327
+ return o && a.add(o), Array.from(a).map((s) => q(s, e).replace(/\s+/g, " ").trim()).filter(Boolean).join(" ");
328
+ }
329
+ function $e(e, t) {
330
+ return t.composedPath()[0] === e;
331
+ }
332
+ class be extends F {
333
+ constructor() {
334
+ super();
335
+ b(this, "internals");
336
+ b(this, "_formDisabled", !1);
337
+ b(this, "_customErrorMessage", "");
338
+ this.internals = typeof this.attachInternals == "function" ? this.attachInternals() : {};
339
+ }
340
+ // === Ciclo de Vida Form-Associated Custom Elements ===
341
+ formDisabledCallback(r) {
342
+ this._formDisabled = r, this.syncState();
343
+ }
344
+ get form() {
345
+ var r;
346
+ return this.closest("form") ?? ((r = this.internals) == null ? void 0 : r.form) ?? null;
347
+ }
348
+ get required() {
349
+ return this.hasAttribute("obrigatorio") || this.hasAttribute("required");
350
+ }
351
+ set required(r) {
352
+ r ? this.setAttribute("obrigatorio", "") : (this.removeAttribute("obrigatorio"), this.removeAttribute("required")), this.syncState();
353
+ }
354
+ get obrigatorio() {
355
+ return this.required;
356
+ }
357
+ set obrigatorio(r) {
358
+ this.required = r;
359
+ }
360
+ // === API de Validação Nativa ===
361
+ get validity() {
362
+ var r;
363
+ return this.atualizarValidade(), (r = this.internals) == null ? void 0 : r.validity;
364
+ }
365
+ get validationMessage() {
366
+ var r;
367
+ return this.atualizarValidade(), ((r = this.internals) == null ? void 0 : r.validationMessage) ?? "";
368
+ }
369
+ get willValidate() {
370
+ var r;
371
+ return ((r = this.internals) == null ? void 0 : r.willValidate) ?? !1;
372
+ }
373
+ checkValidity() {
374
+ var r, a;
375
+ return this.atualizarValidade(), ((a = (r = this.internals) == null ? void 0 : r.checkValidity) == null ? void 0 : a.call(r)) ?? !0;
376
+ }
377
+ reportValidity() {
378
+ var r, a;
379
+ return this.atualizarValidade(), ((a = (r = this.internals) == null ? void 0 : r.reportValidity) == null ? void 0 : a.call(r)) ?? !0;
380
+ }
381
+ setCustomValidity(r) {
382
+ this._customErrorMessage = r || "", this.atualizarValidade();
383
+ }
384
+ }
385
+ b(be, "formAssociated", !0);
386
+ function et(e) {
387
+ if (e.disabled)
388
+ return { valido: !0, flags: {}, mensagem: "" };
389
+ if (e.customError && e.customError.trim() !== "")
390
+ return {
391
+ valido: !1,
392
+ flags: { customError: !0 },
393
+ mensagem: e.customError
394
+ };
395
+ const { val: t, rawVal: r, badInput: a, required: o, tipo: i = "text", mensagemValidacao: n } = e;
396
+ if (a || i === "number" && r && isNaN(Number(r)))
397
+ return {
398
+ valido: !1,
399
+ flags: { badInput: !0 },
400
+ mensagem: n || "Insira um número válido."
401
+ };
402
+ if (o && t.trim() === "")
403
+ return {
404
+ valido: !1,
405
+ flags: { valueMissing: !0 },
406
+ mensagem: n || "Preencha este campo."
407
+ };
408
+ if (t === "")
409
+ return { valido: !0, flags: {}, mensagem: "" };
410
+ if (e.minlength !== null && e.minlength !== void 0 && !isNaN(e.minlength) && t.length < e.minlength)
411
+ return {
412
+ valido: !1,
413
+ flags: { tooShort: !0 },
414
+ mensagem: n || `Use pelo menos ${e.minlength} caracteres (atualmente você está usando ${t.length}).`
415
+ };
416
+ if (e.maxlength !== null && e.maxlength !== void 0 && !isNaN(e.maxlength) && t.length > e.maxlength)
417
+ return {
418
+ valido: !1,
419
+ flags: { tooLong: !0 },
420
+ mensagem: n || `Reduza o texto para no máximo ${e.maxlength} caracteres (atualmente você está usando ${t.length}).`
421
+ };
422
+ if (e.pattern)
423
+ try {
424
+ if (!new RegExp(`^(?:${e.pattern})$`).test(t))
425
+ return {
426
+ valido: !1,
427
+ flags: { patternMismatch: !0 },
428
+ mensagem: n || "O valor não corresponde ao padrão solicitado."
429
+ };
430
+ } catch {
431
+ }
432
+ if (i === "email" && !/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+$/.test(t))
433
+ return {
434
+ valido: !1,
435
+ flags: { typeMismatch: !0 },
436
+ mensagem: n || "Insira um endereço de e-mail válido."
437
+ };
438
+ if (i === "url")
439
+ try {
440
+ new URL(t);
441
+ } catch {
442
+ return {
443
+ valido: !1,
444
+ flags: { typeMismatch: !0 },
445
+ mensagem: n || "Insira uma URL válida."
446
+ };
447
+ }
448
+ if (i === "number") {
449
+ const l = Number(t);
450
+ if (isNaN(l))
451
+ return {
452
+ valido: !1,
453
+ flags: { badInput: !0 },
454
+ mensagem: n || "Insira um número válido."
455
+ };
456
+ if (e.min !== null && e.min !== void 0 && !isNaN(e.min) && l < e.min)
457
+ return {
458
+ valido: !1,
459
+ flags: { rangeUnderflow: !0 },
460
+ mensagem: n || `O valor deve ser maior ou igual a ${e.min}.`
461
+ };
462
+ if (e.max !== null && e.max !== void 0 && !isNaN(e.max) && l > e.max)
463
+ return {
464
+ valido: !1,
465
+ flags: { rangeOverflow: !0 },
466
+ mensagem: n || `O valor deve ser menor ou igual a ${e.max}.`
467
+ };
468
+ if (e.step && e.step !== "any") {
469
+ const s = parseFloat(e.step);
470
+ if (!isNaN(s) && s > 0) {
471
+ const f = e.min !== null && e.min !== void 0 && !isNaN(e.min) ? e.min : 0, d = Math.abs((l - f) % s);
472
+ if (d > 1e-6 && Math.abs(d - s) > 1e-6)
473
+ return {
474
+ valido: !1,
475
+ flags: { stepMismatch: !0 },
476
+ mensagem: n || "Insira um valor válido de acordo com o intervalo."
477
+ };
478
+ }
479
+ }
480
+ }
481
+ return { valido: !0, flags: {}, mensagem: "" };
482
+ }
483
+ function tt(e, t, r) {
484
+ !e || typeof e.setValidity != "function" || (t.valido ? e.setValidity({}) : e.setValidity(t.flags, t.mensagem || "Valor inválido.", r));
485
+ }
486
+ const rt = '.leaflet-pane,.leaflet-tile,.leaflet-marker-icon,.leaflet-marker-shadow,.leaflet-tile-container,.leaflet-pane>svg,.leaflet-pane>canvas,.leaflet-zoom-box,.leaflet-image-layer,.leaflet-layer{position:absolute;left:0;top:0}.leaflet-container{overflow:hidden}.leaflet-tile,.leaflet-marker-icon,.leaflet-marker-shadow{-webkit-user-select:none;-moz-user-select:none;user-select:none;-webkit-user-drag:none}.leaflet-tile::selection{background:transparent}.leaflet-safari .leaflet-tile{image-rendering:-webkit-optimize-contrast}.leaflet-safari .leaflet-tile-container{width:1600px;height:1600px;-webkit-transform-origin:0 0}.leaflet-marker-icon,.leaflet-marker-shadow{display:block}.leaflet-container .leaflet-overlay-pane svg{max-width:none!important;max-height:none!important}.leaflet-container .leaflet-marker-pane img,.leaflet-container .leaflet-shadow-pane img,.leaflet-container .leaflet-tile-pane img,.leaflet-container img.leaflet-image-layer,.leaflet-container .leaflet-tile{max-width:none!important;max-height:none!important;width:auto;padding:0}.leaflet-container img.leaflet-tile{mix-blend-mode:plus-lighter}.leaflet-container.leaflet-touch-zoom{-ms-touch-action:pan-x pan-y;touch-action:pan-x pan-y}.leaflet-container.leaflet-touch-drag{-ms-touch-action:pinch-zoom;touch-action:none;touch-action:pinch-zoom}.leaflet-container.leaflet-touch-drag.leaflet-touch-zoom{-ms-touch-action:none;touch-action:none}.leaflet-container{-webkit-tap-highlight-color:transparent}.leaflet-container a{-webkit-tap-highlight-color:rgba(51,181,229,.4)}.leaflet-tile{filter:inherit;visibility:hidden}.leaflet-tile-loaded{visibility:inherit}.leaflet-zoom-box{width:0;height:0;-moz-box-sizing:border-box;box-sizing:border-box;z-index:800}.leaflet-overlay-pane svg{-moz-user-select:none}.leaflet-pane{z-index:400}.leaflet-tile-pane{z-index:200}.leaflet-overlay-pane{z-index:400}.leaflet-shadow-pane{z-index:500}.leaflet-marker-pane{z-index:600}.leaflet-tooltip-pane{z-index:650}.leaflet-popup-pane{z-index:700}.leaflet-map-pane canvas{z-index:100}.leaflet-map-pane svg{z-index:200}.leaflet-vml-shape{width:1px;height:1px}.lvml{behavior:url(#default#VML);display:inline-block;position:absolute}.leaflet-control{position:relative;z-index:800;pointer-events:visiblePainted;pointer-events:auto}.leaflet-top,.leaflet-bottom{position:absolute;z-index:1000;pointer-events:none}.leaflet-top{top:0}.leaflet-right{right:0}.leaflet-bottom{bottom:0}.leaflet-left{left:0}.leaflet-control{float:left;clear:both}.leaflet-right .leaflet-control{float:right}.leaflet-top .leaflet-control{margin-top:10px}.leaflet-bottom .leaflet-control{margin-bottom:10px}.leaflet-left .leaflet-control{margin-left:10px}.leaflet-right .leaflet-control{margin-right:10px}.leaflet-fade-anim .leaflet-popup{opacity:0;-webkit-transition:opacity .2s linear;-moz-transition:opacity .2s linear;transition:opacity .2s linear}.leaflet-fade-anim .leaflet-map-pane .leaflet-popup{opacity:1}.leaflet-zoom-animated{-webkit-transform-origin:0 0;-ms-transform-origin:0 0;transform-origin:0 0}svg.leaflet-zoom-animated{will-change:transform}.leaflet-zoom-anim .leaflet-zoom-animated{-webkit-transition:-webkit-transform .25s cubic-bezier(0,0,.25,1);-moz-transition:-moz-transform .25s cubic-bezier(0,0,.25,1);transition:transform .25s cubic-bezier(0,0,.25,1)}.leaflet-zoom-anim .leaflet-tile,.leaflet-pan-anim .leaflet-tile{-webkit-transition:none;-moz-transition:none;transition:none}.leaflet-zoom-anim .leaflet-zoom-hide{visibility:hidden}.leaflet-interactive{cursor:pointer}.leaflet-grab{cursor:-webkit-grab;cursor:-moz-grab;cursor:grab}.leaflet-crosshair,.leaflet-crosshair .leaflet-interactive{cursor:crosshair}.leaflet-popup-pane,.leaflet-control{cursor:auto}.leaflet-dragging .leaflet-grab,.leaflet-dragging .leaflet-grab .leaflet-interactive,.leaflet-dragging .leaflet-marker-draggable{cursor:move;cursor:-webkit-grabbing;cursor:-moz-grabbing;cursor:grabbing}.leaflet-marker-icon,.leaflet-marker-shadow,.leaflet-image-layer,.leaflet-pane>svg path,.leaflet-tile-container{pointer-events:none}.leaflet-marker-icon.leaflet-interactive,.leaflet-image-layer.leaflet-interactive,.leaflet-pane>svg path.leaflet-interactive,svg.leaflet-image-layer.leaflet-interactive path{pointer-events:visiblePainted;pointer-events:auto}.leaflet-container{background:#ddd;outline-offset:1px}.leaflet-container a{color:#0078a8}.leaflet-zoom-box{border:2px dotted #38f;background:#ffffff80}.leaflet-container{font-family:Helvetica Neue,Arial,Helvetica,sans-serif;font-size:12px;font-size:.75rem;line-height:1.5}.leaflet-bar{box-shadow:0 1px 5px #000000a6;border-radius:4px}.leaflet-bar a{background-color:#fff;border-bottom:1px solid #ccc;width:26px;height:26px;line-height:26px;display:block;text-align:center;text-decoration:none;color:#000}.leaflet-bar a,.leaflet-control-layers-toggle{background-position:50% 50%;background-repeat:no-repeat;display:block}.leaflet-bar a:hover,.leaflet-bar a:focus{background-color:#f4f4f4}.leaflet-bar a:first-child{border-top-left-radius:4px;border-top-right-radius:4px}.leaflet-bar a:last-child{border-bottom-left-radius:4px;border-bottom-right-radius:4px;border-bottom:none}.leaflet-bar a.leaflet-disabled{cursor:default;background-color:#f4f4f4;color:#bbb}.leaflet-touch .leaflet-bar a{width:30px;height:30px;line-height:30px}.leaflet-touch .leaflet-bar a:first-child{border-top-left-radius:2px;border-top-right-radius:2px}.leaflet-touch .leaflet-bar a:last-child{border-bottom-left-radius:2px;border-bottom-right-radius:2px}.leaflet-control-zoom-in,.leaflet-control-zoom-out{font:700 18px Lucida Console,Monaco,monospace;text-indent:1px}.leaflet-touch .leaflet-control-zoom-in,.leaflet-touch .leaflet-control-zoom-out{font-size:22px}.leaflet-control-layers{box-shadow:0 1px 5px #0006;background:#fff;border-radius:5px}.leaflet-control-layers-toggle{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABoAAAAaCAQAAAADQ4RFAAACf0lEQVR4AY1UM3gkARTePdvdoTxXKc+qTl3aU5U6b2Kbkz3Gtq3Zw6ziLGNPzrYx7946Tr6/ee/XeCQ4D3ykPtL5tHno4n0d/h3+xfuWHGLX81cn7r0iTNzjr7LrlxCqPtkbTQEHeqOrTy4Yyt3VCi/IOB0v7rVC7q45Q3Gr5K6jt+3Gl5nCoDD4MtO+j96Wu8atmhGqcNGHObuf8OM/x3AMx38+4Z2sPqzCxRFK2aF2e5Jol56XTLyggAMTL56XOMoS1W4pOyjUcGGQdZxU6qRh7B9Zp+PfpOFlqt0zyDZckPi1ttmIp03jX8gyJ8a/PG2yutpS/Vol7peZIbZcKBAEEheEIAgFbDkz5H6Zrkm2hVWGiXKiF4Ycw0RWKdtC16Q7qe3X4iOMxruonzegJzWaXFrU9utOSsLUmrc0YjeWYjCW4PDMADElpJSSQ0vQvA1Tm6/JlKnqFs1EGyZiFCqnRZTEJJJiKRYzVYzJck2Rm6P4iH+cmSY0YzimYa8l0EtTODFWhcMIMVqdsI2uiTvKmTisIDHJ3od5GILVhBCarCfVRmo4uTjkhrhzkiBV7SsaqS+TzrzM1qpGGUFt28pIySQHR6h7F6KSwGWm97ay+Z+ZqMcEjEWebE7wxCSQwpkhJqoZA5ivCdZDjJepuJ9IQjGGUmuXJdBFUygxVqVsxFsLMbDe8ZbDYVCGKxs+W080max1hFCarCfV+C1KATwcnvE9gRRuMP2prdbWGowm1KB1y+zwMMENkM755cJ2yPDtqhTI6ED1M/82yIDtC/4j4BijjeObflpO9I9MwXTCsSX8jWAFeHr05WoLTJ5G8IQVS/7vwR6ohirYM7f6HzYpogfS3R2OAAAAAElFTkSuQmCC);width:36px;height:36px}.leaflet-retina .leaflet-control-layers-toggle{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADQAAAA0CAQAAABvcdNgAAAEsklEQVR4AWL4TydIhpZK1kpWOlg0w3ZXP6D2soBtG42jeI6ZmQTHzAxiTbSJsYLjO9HhP+WOmcuhciVnmHVQcJnp7DFvScowZorad/+V/fVzMdMT2g9Cv9guXGv/7pYOrXh2U+RRR3dSd9JRx6bIFc/ekqHI29JC6pJ5ZEh1yWkhkbcFeSjxgx3L2m1cb1C7bceyxA+CNjT/Ifff+/kDk2u/w/33/IeCMOSaWZ4glosqT3DNnNZQ7Cs58/3Ce5HL78iZH/vKVIaYlqzfdLu8Vi7dnvUbEza5Idt36tquZFldl6N5Z/POLof0XLK61mZCmJSWjVF9tEjUluu74IUXvgttuVIHE7YxSkaYhJZam7yiM9Pv82JYfl9nptxZaxMJE4YSPty+vF0+Y2up9d3wwijfjZbabqm/3bZ9ecKHsiGmRflnn1MW4pjHf9oLufyn2z3y1D6n8g8TZhxyzipLNPnAUpsOiuWimg52psrTZYnOWYNDTMuWBWa0tJb4rgq1UvmutpaYEbZlwU3CLJm/ayYjHW5/h7xWLn9Hh1vepDkyf7dE7MtT5LR4e7yYpHrkhOUpEfssBLq2pPhAqoSWKUkk7EDqkmK6RrCEzqDjhNDWNE+XSMvkJRDWlZTmCW0l0PHQGRZY5t1L83kT0Y3l2SItk5JAWHl2dCOBm+fPu3fo5/3v61RMCO9Jx2EEYYhb0rmNQMX/vm7gqOEJLcXTGw3CAuRNeyaPWwjR8PRqKQ1PDA/dpv+on9Shox52WFnx0KY8onHayrJzm87i5h9xGw/tfkev0jGsQizqezUKjk12hBMKJ4kbCqGPVNXudyyrShovGw5CgxsRICxF6aRmSjlBnHRzg7Gx8fKqEubI2rahQYdR1YgDIRQO7JvQyD52hoIQx0mxa0ODtW2Iozn1le2iIRdzwWewedyZzewidueOGqlsn1MvcnQpuVwLGG3/IR1hIKxCjelIDZ8ldqWz25jWAsnldEnK0Zxro19TGVb2ffIZEsIO89EIEDvKMPrzmBOQcKQ+rroye6NgRRxqR4U8EAkz0CL6uSGOm6KQCdWjvjRiSP1BPalCRS5iQYiEIvxuBMJEWgzSoHADcVMuN7IuqqTeyUPq22qFimFtxDyBBJEwNyt6TM88blFHao/6tWWhuuOM4SAK4EI4QmFHA+SEyWlp4EQoJ13cYGzMu7yszEIBOm2rVmHUNqwAIQabISNMRstmdhNWcFLsSm+0tjJH1MdRxO5Nx0WDMhCtgD6OKgZeljJqJKc9po8juskR9XN0Y1lZ3mWjLR9JCO1jRDMd0fpYC2VnvjBSEFg7wBENc0R9HFlb0xvF1+TBEpF68d+DHR6IOWVv2BECtxo46hOFUBd/APU57WIoEwJhIi2CdpyZX0m93BZicktMj1AS9dClteUFAUNUIEygRZCtik5zSxI9MubTBH1GOiHsiLJ3OCoSZkILa9PxiN0EbvhsAo8tdAf9Seepd36lGWHmtNANTv5Jd0z4QYyeo/UEJqxKRpg5LZx6btLPsOaEmdMyxYdlc8LMaJnikDlhclqmPiQnTEpLUIZEwkRagjYkEibQErwhkTAKCLQEbUgkzJQWc/0PstHHcfEdQ+UAAAAASUVORK5CYII=);background-size:26px 26px}.leaflet-touch .leaflet-control-layers-toggle{width:44px;height:44px}.leaflet-control-layers .leaflet-control-layers-list,.leaflet-control-layers-expanded .leaflet-control-layers-toggle{display:none}.leaflet-control-layers-expanded .leaflet-control-layers-list{display:block;position:relative}.leaflet-control-layers-expanded{padding:6px 10px 6px 6px;color:#333;background:#fff}.leaflet-control-layers-scrollbar{overflow-y:scroll;overflow-x:hidden;padding-right:5px}.leaflet-control-layers-selector{margin-top:2px;position:relative;top:1px}.leaflet-control-layers label{display:block;font-size:13px;font-size:1.08333em}.leaflet-control-layers-separator{height:0;border-top:1px solid #ddd;margin:5px -10px 5px -6px}.leaflet-default-icon-path{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABkAAAApCAYAAADAk4LOAAAFgUlEQVR4Aa1XA5BjWRTN2oW17d3YaZtr2962HUzbDNpjszW24mRt28p47v7zq/bXZtrp/lWnXr337j3nPCe85NcypgSFdugCpW5YoDAMRaIMqRi6aKq5E3YqDQO3qAwjVWrD8Ncq/RBpykd8oZUb/kaJutow8r1aP9II0WmLKLIsJyv1w/kqw9Ch2MYdB++12Onxee/QMwvf4/Dk/Lfp/i4nxTXtOoQ4pW5Aj7wpici1A9erdAN2OH64x8OSP9j3Ft3b7aWkTg/Fm91siTra0f9on5sQr9INejH6CUUUpavjFNq1B+Oadhxmnfa8RfEmN8VNAsQhPqF55xHkMzz3jSmChWU6f7/XZKNH+9+hBLOHYozuKQPxyMPUKkrX/K0uWnfFaJGS1QPRtZsOPtr3NsW0uyh6NNCOkU3Yz+bXbT3I8G3xE5EXLXtCXbbqwCO9zPQYPRTZ5vIDXD7U+w7rFDEoUUf7ibHIR4y6bLVPXrz8JVZEql13trxwue/uDivd3fkWRbS6/IA2bID4uk0UpF1N8qLlbBlXs4Ee7HLTfV1j54APvODnSfOWBqtKVvjgLKzF5YdEk5ewRkGlK0i33Eofffc7HT56jD7/6U+qH3Cx7SBLNntH5YIPvODnyfIXZYRVDPqgHtLs5ABHD3YzLuespb7t79FY34DjMwrVrcTuwlT55YMPvOBnRrJ4VXTdNnYug5ucHLBjEpt30701A3Ts+HEa73u6dT3FNWwflY86eMHPk+Yu+i6pzUpRrW7SNDg5JHR4KapmM5Wv2E8Tfcb1HoqqHMHU+uWDD7zg54mz5/2BSnizi9T1Dg4QQXLToGNCkb6tb1NU+QAlGr1++eADrzhn/u8Q2YZhQVlZ5+CAOtqfbhmaUCS1ezNFVm2imDbPmPng5wmz+gwh+oHDce0eUtQ6OGDIyR0uUhUsoO3vfDmmgOezH0mZN59x7MBi++WDL1g/eEiU3avlidO671bkLfwbw5XV2P8Pzo0ydy4t2/0eu33xYSOMOD8hTf4CrBtGMSoXfPLchX+J0ruSePw3LZeK0juPJbYzrhkH0io7B3k164hiGvawhOKMLkrQLyVpZg8rHFW7E2uHOL888IBPlNZ1FPzstSJM694fWr6RwpvcJK60+0HCILTBzZLFNdtAzJaohze60T8qBzyh5ZuOg5e7uwQppofEmf2++DYvmySqGBuKaicF1blQjhuHdvCIMvp8whTTfZzI7RldpwtSzL+F1+wkdZ2TBOW2gIF88PBTzD/gpeREAMEbxnJcaJHNHrpzji0gQCS6hdkEeYt9DF/2qPcEC8RM28Hwmr3sdNyht00byAut2k3gufWNtgtOEOFGUwcXWNDbdNbpgBGxEvKkOQsxivJx33iow0Vw5S6SVTrpVq11ysA2Rp7gTfPfktc6zhtXBBC+adRLshf6sG2RfHPZ5EAc4sVZ83yCN00Fk/4kggu40ZTvIEm5g24qtU4KjBrx/BTTH8ifVASAG7gKrnWxJDcU7x8X6Ecczhm3o6YicvsLXWfh3Ch1W0k8x0nXF+0fFxgt4phz8QvypiwCCFKMqXCnqXExjq10beH+UUA7+nG6mdG/Pu0f3LgFcGrl2s0kNNjpmoJ9o4B29CMO8dMT4Q5ox8uitF6fqsrJOr8qnwNbRzv6hSnG5wP+64C7h9lp30hKNtKdWjtdkbuPA19nJ7Tz3zR/ibgARbhb4AlhavcBebmTHcFl2fvYEnW0ox9xMxKBS8btJ+KiEbq9zA4RthQXDhPa0T9TEe69gWupwc6uBUphquXgf+/FrIjweHQS4/pduMe5ERUMHUd9xv8ZR98CxkS4F2n3EUrUZ10EYNw7BWm9x1GiPssi3GgiGRDKWRYZfXlON+dfNbM+GgIwYdwAAAAASUVORK5CYII=)}.leaflet-container .leaflet-control-attribution{background:#fff;background:#fffc;margin:0}.leaflet-control-attribution,.leaflet-control-scale-line{padding:0 5px;color:#333;line-height:1.4}.leaflet-control-attribution a{text-decoration:none}.leaflet-control-attribution a:hover,.leaflet-control-attribution a:focus{text-decoration:underline}.leaflet-attribution-flag{display:inline!important;vertical-align:baseline!important;width:1em;height:.6669em}.leaflet-left .leaflet-control-scale{margin-left:5px}.leaflet-bottom .leaflet-control-scale{margin-bottom:5px}.leaflet-control-scale-line{border:2px solid #777;border-top:none;line-height:1.1;padding:2px 5px 1px;white-space:nowrap;-moz-box-sizing:border-box;box-sizing:border-box;background:#fffc;text-shadow:1px 1px #fff}.leaflet-control-scale-line:not(:first-child){border-top:2px solid #777;border-bottom:none;margin-top:-2px}.leaflet-control-scale-line:not(:first-child):not(:last-child){border-bottom:2px solid #777}.leaflet-touch .leaflet-control-attribution,.leaflet-touch .leaflet-control-layers,.leaflet-touch .leaflet-bar{box-shadow:none}.leaflet-touch .leaflet-control-layers,.leaflet-touch .leaflet-bar{border:2px solid rgba(0,0,0,.2);background-clip:padding-box}.leaflet-popup{position:absolute;text-align:center;margin-bottom:20px}.leaflet-popup-content-wrapper{padding:1px;text-align:left;border-radius:12px}.leaflet-popup-content{margin:13px 24px 13px 20px;line-height:1.3;font-size:13px;font-size:1.08333em;min-height:1px}.leaflet-popup-content p{margin:1.3em 0}.leaflet-popup-tip-container{width:40px;height:20px;position:absolute;left:50%;margin-top:-1px;margin-left:-20px;overflow:hidden;pointer-events:none}.leaflet-popup-tip{width:17px;height:17px;padding:1px;margin:-10px auto 0;pointer-events:auto;-webkit-transform:rotate(45deg);-moz-transform:rotate(45deg);-ms-transform:rotate(45deg);transform:rotate(45deg)}.leaflet-popup-content-wrapper,.leaflet-popup-tip{background:#fff;color:#333;box-shadow:0 3px 14px #0006}.leaflet-container a.leaflet-popup-close-button{position:absolute;top:0;right:0;border:none;text-align:center;width:24px;height:24px;font:16px/24px Tahoma,Verdana,sans-serif;color:#757575;text-decoration:none;background:transparent}.leaflet-container a.leaflet-popup-close-button:hover,.leaflet-container a.leaflet-popup-close-button:focus{color:#585858}.leaflet-popup-scrolled{overflow:auto}.leaflet-oldie .leaflet-popup-content-wrapper{-ms-zoom:1}.leaflet-oldie .leaflet-popup-tip{width:24px;margin:0 auto;-ms-filter:"progid:DXImageTransform.Microsoft.Matrix(M11=0.70710678, M12=0.70710678, M21=-0.70710678, M22=0.70710678)";filter:progid:DXImageTransform.Microsoft.Matrix(M11=.70710678,M12=.70710678,M21=-.70710678,M22=.70710678)}.leaflet-oldie .leaflet-control-zoom,.leaflet-oldie .leaflet-control-layers,.leaflet-oldie .leaflet-popup-content-wrapper,.leaflet-oldie .leaflet-popup-tip{border:1px solid #999}.leaflet-div-icon{background:#fff;border:1px solid #666}.leaflet-tooltip{position:absolute;padding:6px;background-color:#fff;border:1px solid #fff;border-radius:3px;color:#222;white-space:nowrap;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;pointer-events:none;box-shadow:0 1px 3px #0006}.leaflet-tooltip.leaflet-interactive{cursor:pointer;pointer-events:auto}.leaflet-tooltip-top:before,.leaflet-tooltip-bottom:before,.leaflet-tooltip-left:before,.leaflet-tooltip-right:before{position:absolute;pointer-events:none;border:6px solid transparent;background:transparent;content:""}.leaflet-tooltip-bottom{margin-top:6px}.leaflet-tooltip-top{margin-top:-6px}.leaflet-tooltip-bottom:before,.leaflet-tooltip-top:before{left:50%;margin-left:-6px}.leaflet-tooltip-top:before{bottom:0;margin-bottom:-12px;border-top-color:#fff}.leaflet-tooltip-bottom:before{top:0;margin-top:-12px;margin-left:-6px;border-bottom-color:#fff}.leaflet-tooltip-left{margin-left:-6px}.leaflet-tooltip-right{margin-left:6px}.leaflet-tooltip-left:before,.leaflet-tooltip-right:before{top:50%;margin-top:-6px}.leaflet-tooltip-left:before{right:0;margin-right:-12px;border-left-color:#fff}.leaflet-tooltip-right:before{left:0;margin-left:-12px;border-right-color:#fff}@media print{.leaflet-control{-webkit-print-color-adjust:exact;print-color-adjust:exact}}';
487
+ class xe {
488
+ constructor() {
489
+ b(this, "provedorToast", null);
490
+ b(this, "listeners", /* @__PURE__ */ new Map());
491
+ b(this, "_observandoSistema", !1);
492
+ this.observarTemaDoSistema();
493
+ }
494
+ on(t, r) {
495
+ return this.listeners.has(t) || this.listeners.set(t, /* @__PURE__ */ new Set()), this.listeners.get(t).add(r), () => this.off(t, r);
496
+ }
497
+ once(t, r) {
498
+ const a = (o) => {
499
+ this.off(t, a), r(o);
500
+ };
501
+ this.on(t, a);
502
+ }
503
+ off(t, r) {
504
+ const a = this.listeners.get(t);
505
+ a && (a.delete(r), a.size === 0 && this.listeners.delete(t));
506
+ }
507
+ emit(t, r) {
508
+ const a = this.listeners.get(t);
509
+ a && a.forEach((o) => {
510
+ try {
511
+ o(r);
512
+ } catch (i) {
513
+ console.error(`[UIBus] Erro ao executar ouvinte do evento "${t}":`, i);
514
+ }
515
+ }), typeof window < "u" && window.dispatchEvent(
516
+ new CustomEvent(`uibus:${t}`, {
517
+ detail: r,
518
+ bubbles: !0,
519
+ composed: !0
520
+ })
521
+ );
522
+ }
523
+ /* ====================================================
524
+ Métodos de Atalho e Ações de Alta Produtividade
525
+ ==================================================== */
526
+ /**
527
+ * Abre um modal pelo seu ID no documento.
528
+ */
529
+ abrirModal(t) {
530
+ if (typeof document > "u") return !1;
531
+ const r = document.getElementById(t);
532
+ return r && typeof r.abrir == "function" ? (r.abrir(), this.emit("modal:aberto", { id: t }), !0) : r ? (r.setAttribute("aberto", ""), this.emit("modal:aberto", { id: t }), !0) : (console.warn(`[UIBus] Modal com ID "${t}" não encontrado no DOM.`), !1);
533
+ }
534
+ /**
535
+ * Fecha um modal pelo seu ID ou todos os modais abertos se nenhum ID for passado.
536
+ * Retorna `false` se o modal não existir ou continuar aberto (`bloquear-fechamento`).
537
+ */
538
+ fecharModal(t) {
539
+ if (typeof document > "u") return !1;
540
+ if (t) {
541
+ const r = document.getElementById(t);
542
+ return r && typeof r.fechar == "function" ? (r.fechar(), r.hasAttribute("aberto") || r.hasAttribute("open") ? !1 : (this.emit("modal:fechado", { id: t }), !0)) : r ? (r.removeAttribute("aberto"), r.removeAttribute("open"), this.emit("modal:fechado", { id: t }), !0) : !1;
543
+ } else
544
+ return document.querySelectorAll(
545
+ "ui-modal[aberto], ui-modal[open], ui-dialog[aberto], ui-dialog[open]"
546
+ ).forEach((a) => {
547
+ typeof a.fechar == "function" ? a.fechar() : (a.removeAttribute("aberto"), a.removeAttribute("open"));
548
+ }), this.emit("modal:fechado-todos"), !0;
549
+ }
550
+ /**
551
+ * Abre um painel lateral (drawer / sheet) pelo seu ID no documento.
552
+ */
553
+ abrirDrawer(t) {
554
+ if (typeof document > "u") return !1;
555
+ const r = document.getElementById(t);
556
+ return r && typeof r.abrir == "function" ? (r.abrir(), this.emit("drawer:aberto", { id: t }), !0) : r ? (r.setAttribute("aberto", ""), this.emit("drawer:aberto", { id: t }), !0) : (console.warn(`[UIBus] Drawer com ID "${t}" não encontrado no DOM.`), !1);
557
+ }
558
+ /**
559
+ * Fecha um painel lateral (drawer / sheet) pelo seu ID ou todos se nenhum for passado.
560
+ */
561
+ fecharDrawer(t) {
562
+ if (typeof document > "u") return !1;
563
+ if (t) {
564
+ const r = document.getElementById(t);
565
+ return r && typeof r.fechar == "function" ? (r.fechar(), this.emit("drawer:fechado", { id: t }), !0) : r ? (r.removeAttribute("aberto"), r.removeAttribute("open"), this.emit("drawer:fechado", { id: t }), !0) : !1;
566
+ } else
567
+ return document.querySelectorAll(
568
+ "ui-drawer[aberto], ui-drawer[open], ui-sheet[aberto], ui-sheet[open]"
569
+ ).forEach((a) => {
570
+ typeof a.fechar == "function" ? a.fechar() : (a.removeAttribute("aberto"), a.removeAttribute("open"));
571
+ }), this.emit("drawer:fechado-todos"), !0;
572
+ }
573
+ /**
574
+ * Dispara uma notificação toast flutuante inteligente.
575
+ */
576
+ notificar(t) {
577
+ const r = this.provedorToast;
578
+ if (r)
579
+ try {
580
+ r(typeof t == "string" ? { mensagem: t, tipo: "info" } : t);
581
+ } catch (a) {
582
+ console.error("Erro ao exibir toast:", a);
583
+ }
584
+ }
585
+ /**
586
+ * Registra (ou remove, com `null`) o provedor que materializa os toasts.
587
+ * O `ui-toast` se registra sozinho ao ser carregado; sem provedor, `notificar` é no-op.
588
+ */
589
+ registrarProvedorToast(t) {
590
+ this.provedorToast = t;
591
+ }
592
+ /**
593
+ * Copia um texto para a área de transferência do usuário e exibe feedback opcional.
594
+ */
595
+ async copiar(t, r) {
596
+ if (typeof navigator > "u" || !navigator.clipboard)
597
+ return !1;
598
+ try {
599
+ return await navigator.clipboard.writeText(t), r !== void 0 && this.notificar({
600
+ tipo: "sucesso",
601
+ mensagem: r || "Copiado para a área de transferência!"
602
+ }), this.emit("clipboard:copiado", { texto: t }), !0;
603
+ } catch (a) {
604
+ return console.error("[UIBus] Falha ao copiar texto:", a), this.notificar({
605
+ tipo: "erro",
606
+ mensagem: "Não foi possível copiar o texto."
607
+ }), !1;
608
+ }
609
+ }
610
+ /**
611
+ * Altera a densidade visual global do kit (compacta, normal ou relaxada).
612
+ */
613
+ definirDensidade(t) {
614
+ let r = 34;
615
+ typeof t == "number" ? r = Math.max(15, t) : t === "compacta" ? r = 26 : t === "relaxada" ? r = 42 : r = 34, !(typeof document > "u") && (document.documentElement.style.setProperty("--ui-altura-minima", `${r}px`), document.documentElement.style.setProperty("--ui-campo-altura", `${r}px`), document.documentElement.setAttribute("data-ui-densidade", typeof t == "string" ? t : "custom"), this.emit("densidade:alterada", { densidade: t, alturaPx: r }));
616
+ }
617
+ /**
618
+ * Tema em vigor: o forçado na raiz (`data-tema`, `data-theme`, `.dark`/`.light`)
619
+ * ou, sem nenhum, o do sistema operacional (`prefers-color-scheme`).
620
+ */
621
+ obterTema() {
622
+ if (typeof document > "u") return "escuro";
623
+ const t = N(document.documentElement);
624
+ return t || (Ae() ? "claro" : "escuro");
625
+ }
626
+ /**
627
+ * Define o tema global. Sem argumento, alterna o tema em vigor;
628
+ * `'auto'` remove o tema forçado e volta a seguir o sistema operacional.
629
+ */
630
+ definirTema(t) {
631
+ if (typeof document > "u") return t === "claro" ? "claro" : "escuro";
632
+ const r = document.documentElement;
633
+ if (t === "auto")
634
+ r.removeAttribute("data-tema"), r.removeAttribute("data-theme"), r.classList.remove("dark", "light");
635
+ else {
636
+ const o = t || (this.obterTema() === "escuro" ? "claro" : "escuro");
637
+ r.setAttribute("data-tema", o), r.classList.toggle("dark", o === "escuro"), r.classList.toggle("light", o === "claro");
638
+ }
639
+ const a = this.obterTema();
640
+ return this.emit("tema:alterado", { tema: a }), a;
641
+ }
642
+ /** Com o tema seguindo o SO, avisa `tema:alterado` quando o usuário troca o tema do sistema. */
643
+ observarTemaDoSistema() {
644
+ var t, r;
645
+ this._observandoSistema || typeof window > "u" || typeof window.matchMedia != "function" || (this._observandoSistema = !0, (r = (t = window.matchMedia("(prefers-color-scheme: light)")).addEventListener) == null || r.call(t, "change", () => {
646
+ N(document.documentElement) || this.emit("tema:alterado", { tema: this.obterTema() });
647
+ }));
648
+ }
649
+ }
650
+ function N(e) {
651
+ const t = e.getAttribute("data-tema") || e.getAttribute("data-theme");
652
+ return t === "escuro" || t === "dark" ? "escuro" : t === "claro" || t === "light" ? "claro" : e.classList.contains("dark") ? "escuro" : e.classList.contains("light") ? "claro" : null;
653
+ }
654
+ function Ae() {
655
+ return typeof window < "u" && typeof window.matchMedia == "function" && window.matchMedia("(prefers-color-scheme: light)").matches;
656
+ }
657
+ const p = new xe();
658
+ let D = !1;
659
+ function ve(e) {
660
+ if (e.hasAttribute("disabled") || e.hasAttribute("carregando") || e.getAttribute("aria-disabled") === "true" || e.localName.startsWith("ui-") && e.hasAttribute("loading")) return !0;
661
+ try {
662
+ return e.matches(":disabled");
663
+ } catch {
664
+ return !1;
665
+ }
666
+ }
667
+ function ye() {
668
+ D || typeof document > "u" || (D = !0, document.addEventListener("click", (e) => {
669
+ const t = e.composedPath ? e.composedPath() : [e.target], r = "[target-modal], [modal-alvo], [dismiss-modal], [fechar-modal], [target-drawer], [drawer-alvo], [dismiss-drawer], [fechar-drawer], [toast-sucesso], [toast-erro], [toast-alerta], [toast-info], [copiar-texto], [alternar-tema], [definir-densidade], [limpar-form]";
670
+ let a = null;
671
+ for (const m of t)
672
+ if (m instanceof HTMLElement && m.matches(r)) {
673
+ a = m;
674
+ break;
675
+ }
676
+ if (!a || ve(a)) return;
677
+ const o = a.getAttribute("target-modal") || a.getAttribute("modal-alvo");
678
+ if (o && p.abrirModal(o), a.hasAttribute("dismiss-modal") || a.hasAttribute("fechar-modal")) {
679
+ const m = a.getAttribute("dismiss-modal") || a.getAttribute("fechar-modal");
680
+ if (m && m !== "")
681
+ p.fecharModal(m);
682
+ else {
683
+ let u = null;
684
+ for (const c of t)
685
+ if (c instanceof HTMLElement && (c.matches("ui-modal, ui-dialog") || c.tagName === "UI-MODAL" || c.tagName === "UI-DIALOG")) {
686
+ u = c;
687
+ break;
688
+ }
689
+ u && (typeof u.fechar == "function" ? u.fechar() : (u.removeAttribute("aberto"), u.removeAttribute("open")));
690
+ }
691
+ }
692
+ const i = a.getAttribute("target-drawer") || a.getAttribute("drawer-alvo");
693
+ if (i && p.abrirDrawer(i), a.hasAttribute("dismiss-drawer") || a.hasAttribute("fechar-drawer")) {
694
+ const m = a.getAttribute("dismiss-drawer") || a.getAttribute("fechar-drawer");
695
+ if (m && m !== "")
696
+ p.fecharDrawer(m);
697
+ else {
698
+ let u = null;
699
+ for (const c of t)
700
+ if (c instanceof HTMLElement && (c.matches("ui-drawer, ui-sheet, ui-painel-lateral, ui-gaveta") || c.tagName.startsWith("UI-DRAWER") || c.tagName.startsWith("UI-SHEET"))) {
701
+ u = c;
702
+ break;
703
+ }
704
+ u && (typeof u.fechar == "function" ? u.fechar() : (u.removeAttribute("aberto"), u.removeAttribute("open")));
705
+ }
706
+ }
707
+ const n = a.getAttribute("toast-sucesso");
708
+ n && p.notificar({ tipo: "sucesso", mensagem: n });
709
+ const l = a.getAttribute("toast-erro");
710
+ l && p.notificar({ tipo: "erro", mensagem: l });
711
+ const s = a.getAttribute("toast-alerta");
712
+ s && p.notificar({ tipo: "alerta", mensagem: s });
713
+ const f = a.getAttribute("toast-info");
714
+ f && p.notificar({ tipo: "info", mensagem: f });
715
+ const d = a.getAttribute("copiar-texto");
716
+ if (d !== null) {
717
+ let m = d;
718
+ if (d.startsWith("#") || d.startsWith(".") || d.match(/^[a-zA-Z0-9_-]+$/))
719
+ try {
720
+ let c = null;
721
+ d.startsWith("#") || d.startsWith(".") ? c = document.querySelector(d) : c = document.getElementById(d) || document.querySelector(`#${d}`), c && (m = c.value !== void 0 && c.value !== null ? c.value : c.textContent || "");
722
+ } catch {
723
+ }
724
+ const u = a.getAttribute("copiar-mensagem") || "Copiado com sucesso!";
725
+ p.copiar(m, u);
726
+ }
727
+ a.hasAttribute("alternar-tema") && p.definirTema();
728
+ const h = a.getAttribute("definir-densidade");
729
+ h && p.definirDensidade(h);
730
+ const g = a.getAttribute("limpar-form");
731
+ if (g) {
732
+ const m = document.getElementById(g);
733
+ m && typeof m.reset == "function" && (m.reset(), p.notificar({ tipo: "info", mensagem: "Formulário limpo." }));
734
+ }
735
+ }));
736
+ }
737
+ let v = null, A = null;
738
+ async function at() {
739
+ return typeof window < "u" && window.L ? (A = window.L, A) : A || v || (v = (async () => {
740
+ try {
741
+ const e = await import("leaflet");
742
+ return A = e.default || e, typeof window < "u" && !window.L && (window.L = A), A;
743
+ } catch {
744
+ return v = null, console.warn(
745
+ `[UI Components Kit] O Leaflet não foi encontrado no ambiente.
746
+ Para utilizar componentes de mapa ou CAD (<ui-mapa>, <ui-canvas-cad>), instale o pacote "leaflet" (npm i leaflet) ou inclua o script no HTML: <script src=".../leaflet.js"><\/script>.`
747
+ ), null;
748
+ }
749
+ })(), v);
750
+ }
751
+ function ot() {
752
+ return typeof window < "u" && window.L ? window.L : A;
753
+ }
754
+ const we = /* @__PURE__ */ new Set([
755
+ "svg",
756
+ "g",
757
+ "path",
758
+ "rect",
759
+ "circle",
760
+ "ellipse",
761
+ "line",
762
+ "polyline",
763
+ "polygon",
764
+ "text",
765
+ "tspan",
766
+ "title",
767
+ "desc",
768
+ "defs",
769
+ "symbol",
770
+ "use",
771
+ "lineargradient",
772
+ "radialgradient",
773
+ "stop",
774
+ "clippath",
775
+ "mask"
776
+ ]), Ee = /^(javascript|data|vbscript):/i, ze = /url\s*\(\s*['"]?\s*(?!#)/i;
777
+ let Se = 0;
778
+ function ke(e, t) {
779
+ const r = e.toLowerCase();
780
+ if (r.startsWith("on")) return !1;
781
+ const a = t.replace(/[\s\u0000-\u001f]+/g, "");
782
+ return Ee.test(a) ? !1 : r === "href" || r === "xlink:href" ? a.startsWith("#") : !ze.test(t);
783
+ }
784
+ function V(e) {
785
+ Array.from(e.children).forEach((t) => {
786
+ if (!we.has(t.localName.toLowerCase())) {
787
+ console.warn(`[svg-seguro] Elemento <${t.localName}> não permitido foi descartado pela allowlist.`), t.remove();
788
+ return;
789
+ }
790
+ V(t);
791
+ }), Array.from(e.attributes).forEach((t) => {
792
+ ke(t.name, t.value) || e.removeAttribute(t.name);
793
+ });
794
+ }
795
+ function Ce(e) {
796
+ const t = `ui-svg-${++Se}-`, r = /* @__PURE__ */ new Map();
797
+ if (e.querySelectorAll("[id]").forEach((n) => {
798
+ const l = n.getAttribute("id");
799
+ if (l) {
800
+ const s = `${t}${l}`;
801
+ r.set(l, s), n.setAttribute("id", s);
802
+ }
803
+ }), r.size === 0) return;
804
+ const o = [e, ...Array.from(e.querySelectorAll("*"))], i = /url\(\s*#([a-zA-Z0-9_\-:]+)\s*\)/g;
805
+ o.forEach((n) => {
806
+ Array.from(n.attributes).forEach((l) => {
807
+ const s = l.name.toLowerCase(), f = l.value;
808
+ if ((s === "href" || s === "xlink:href") && f.startsWith("#")) {
809
+ const d = f.slice(1);
810
+ r.has(d) && n.setAttribute(l.name, `#${r.get(d)}`);
811
+ } else if (f.includes("url(#")) {
812
+ const d = f.replace(i, (h, g) => r.has(g) ? `url(#${r.get(g)})` : h);
813
+ d !== f && n.setAttribute(l.name, d);
814
+ }
815
+ });
816
+ });
817
+ }
818
+ function it(e) {
819
+ if (!e || typeof e != "string" || typeof document > "u") return null;
820
+ const t = document.createElement("template");
821
+ t.innerHTML = e.trim();
822
+ const r = t.content.querySelector("svg");
823
+ return r ? (V(r), Ce(r), r) : (e.trim().length > 0 && console.warn("[svg-seguro] Código descartado: nenhum elemento <svg> válido encontrado."), null);
824
+ }
825
+ const E = "input, select, textarea, ui-campo-texto, ui-input, ui-area-texto, ui-textarea, ui-lista-flutuante, ui-select, ui-checkbox, ui-radio, ui-switch, ui-toggle", Oe = 'input[type="file"], input[type="hidden"], input[type="submit"], input[type="button"], input[type="reset"]', Me = /* @__PURE__ */ new Set(["ui-checkbox", "ui-radio", "ui-switch", "ui-toggle"]);
826
+ function W(e) {
827
+ const t = e.tagName.toLowerCase();
828
+ if (Me.has(t)) return !0;
829
+ if (t !== "input") return !1;
830
+ const r = (e.getAttribute("type") || "").toLowerCase();
831
+ return r === "checkbox" || r === "radio";
832
+ }
833
+ function z(e, t = E) {
834
+ if (!e || typeof e.querySelectorAll != "function") return [];
835
+ try {
836
+ return Array.from(e.querySelectorAll(t)).filter((r) => !r.matches(Oe));
837
+ } catch {
838
+ return [];
839
+ }
840
+ }
841
+ function Te(e, t) {
842
+ return e.getAttribute("name") || e.id || `#${t}`;
843
+ }
844
+ function y(e) {
845
+ try {
846
+ const t = e;
847
+ if (W(e)) return t.checked === !0 ? "1" : "0";
848
+ const r = t.value;
849
+ return r == null ? "" : typeof r == "string" ? r : String(r);
850
+ } catch {
851
+ return "";
852
+ }
853
+ }
854
+ function P(e, t) {
855
+ try {
856
+ const r = e;
857
+ W(e) ? r.checked = t === "1" || t === "true" : r.value = t;
858
+ } catch {
859
+ }
860
+ }
861
+ function H(e, t, r) {
862
+ return z(e, r).find((o) => o.getAttribute("name") === t || o.id === t) ?? null;
863
+ }
864
+ const Re = ["input", "change", "ui-input", "ui-change", "ui-selecionar", "ui-campos-preenchidos"];
865
+ function k(e, t, r) {
866
+ const a = z(e, t).map((i, n) => [Te(i, n), y(i)]);
867
+ let o = null;
868
+ if (r)
869
+ try {
870
+ o = r() ?? null;
871
+ } catch {
872
+ o = null;
873
+ }
874
+ try {
875
+ return JSON.stringify([a, o]);
876
+ } catch {
877
+ return JSON.stringify([a, null]);
878
+ }
879
+ }
880
+ function nt(e, t = {}) {
881
+ const r = t.seletor ?? E, a = new C();
882
+ let o = k(e, r, t.estadoExterno), i = !1;
883
+ const n = () => {
884
+ var s;
885
+ const l = k(e, r, t.estadoExterno) !== o;
886
+ if (l !== i) {
887
+ i = l;
888
+ try {
889
+ (s = t.aoMudar) == null || s.call(t, i);
890
+ } catch (f) {
891
+ console.error("[form-rascunho] aoMudar lançou exceção:", f);
892
+ }
893
+ }
894
+ return i;
895
+ };
896
+ return Re.forEach((l) => a.add(e, l, n)), {
897
+ get sujo() {
898
+ return i;
899
+ },
900
+ avaliar: n,
901
+ marcarLimpo() {
902
+ o = k(e, r, t.estadoExterno), n();
903
+ },
904
+ destruir() {
905
+ a.cleanup();
906
+ }
907
+ };
908
+ }
909
+ const Ie = /* @__PURE__ */ new Set(["__proto__", "constructor", "prototype"]), Le = (e) => e == null ? "" : typeof e == "boolean" ? e ? "1" : "0" : String(e);
910
+ function lt(e, t, r = {}) {
911
+ const a = r.somenteVazios !== !1, o = r.vazioSe ?? ((u, c) => c.trim() === ""), i = r.seletor ?? E, n = [], l = [], s = [], f = [], d = [];
912
+ let h = !1;
913
+ const g = () => {
914
+ e && typeof e.dispatchEvent == "function" && typeof CustomEvent < "u" && e.dispatchEvent(new CustomEvent("ui-campos-preenchidos", { bubbles: !0, detail: { aplicados: [...n] } }));
915
+ }, m = (u, c, x) => {
916
+ f.push({ campo: c, valor: y(c) }), P(c, x), n.includes(u) || n.push(u);
917
+ };
918
+ if (t && typeof t == "object")
919
+ for (const u of Object.keys(t)) {
920
+ if (Ie.has(u)) continue;
921
+ const c = H(e, u, i);
922
+ if (!c) {
923
+ s.push(u);
924
+ continue;
925
+ }
926
+ const x = Le(t[u]);
927
+ if (x === "") continue;
928
+ const O = y(c);
929
+ x !== O && (!a || o(u, O) ? m(u, c, x) : (l.push(u), d.push({ chave: u, campo: c, valor: x })));
930
+ }
931
+ return n.length > 0 && g(), {
932
+ aplicados: n,
933
+ conflitos: l,
934
+ semAlvo: s,
935
+ substituirConflitos() {
936
+ h || d.length === 0 || (d.splice(0).forEach(({ chave: u, campo: c, valor: x }) => m(u, c, x)), g());
937
+ },
938
+ desfazer() {
939
+ if (!h) {
940
+ h = !0;
941
+ for (let u = f.length - 1; u >= 0; u--) P(f[u].campo, f[u].valor);
942
+ f.length = 0, g();
943
+ }
944
+ }
945
+ };
946
+ }
947
+ const Ne = "Valor inválido.";
948
+ function w(e, t) {
949
+ t ? (e.setAttribute("erro", ""), e.setAttribute("mensagem-erro", t)) : (e.removeAttribute("erro"), e.removeAttribute("mensagem-erro"));
950
+ }
951
+ function st(e, t, r = {}) {
952
+ var o, i, n;
953
+ const a = [];
954
+ if (!e || !t || typeof t != "object") return { valido: !0, erros: a };
955
+ for (const l of Object.keys(t)) {
956
+ const s = t[l], f = H(e, l);
957
+ if (!f || typeof s != "function") continue;
958
+ if ((o = r.ignorar) != null && o.call(r, f)) {
959
+ w(f, null);
960
+ continue;
961
+ }
962
+ let d;
963
+ try {
964
+ d = s(y(f), f);
965
+ } catch (h) {
966
+ console.error(`[form-erros] regra do campo "${l}" lançou exceção:`, h), d = Ne;
967
+ }
968
+ w(f, d || null), d && a.push({ chave: l, mensagem: d, campo: f });
969
+ }
970
+ if (a.length > 0) {
971
+ const l = z(e);
972
+ if (a.sort((s, f) => l.indexOf(s.campo) - l.indexOf(f.campo)), r.focarPrimeiro !== !1) {
973
+ const s = a[0].campo;
974
+ try {
975
+ (i = s.focus) == null || i.call(s), (n = s.scrollIntoView) == null || n.call(s, { block: "center", behavior: "smooth" });
976
+ } catch {
977
+ }
978
+ }
979
+ }
980
+ return { valido: a.length === 0, erros: a };
981
+ }
982
+ function ut(e) {
983
+ z(e).forEach((t) => w(t, null));
984
+ }
985
+ function ct(e, t = E) {
986
+ const r = new C(), a = (o) => {
987
+ const i = o.target;
988
+ if (!(i instanceof Element)) return;
989
+ const n = i.closest(t);
990
+ n && (n.hasAttribute("erro") || n.hasAttribute("mensagem-erro")) && w(n, null);
991
+ };
992
+ return ["input", "change", "ui-input", "ui-change", "ui-selecionar"].forEach((o) => r.add(e, o, a)), () => r.cleanup();
993
+ }
994
+ function ft(e, t) {
995
+ const r = new C(), a = (i) => {
996
+ try {
997
+ i();
998
+ } catch (n) {
999
+ console.error("[form-atalhos] ação do atalho lançou exceção:", n);
1000
+ }
1001
+ }, o = (i) => {
1002
+ if (i.isComposing) return;
1003
+ const n = i.ctrlKey || i.metaKey;
1004
+ if (t.salvar && n && !i.altKey && !i.shiftKey && i.key.toLowerCase() === "s") {
1005
+ i.preventDefault(), a(t.salvar);
1006
+ return;
1007
+ }
1008
+ t.cancelar && i.key === "Escape" && !i.defaultPrevented && !n && !i.altKey && !i.shiftKey && (i.preventDefault(), a(t.cancelar));
1009
+ };
1010
+ return r.add(e, "keydown", o), () => r.cleanup();
1011
+ }
1012
+ typeof document < "u" && ye();
1013
+ function dt({ host: e, internals: t, controle: r, rotulo: a, texto: o }) {
1014
+ if (o) {
1015
+ a.textContent = o, a.style.display = "inline", r.setAttribute("aria-labelledby", a.id), r.removeAttribute("aria-label");
1016
+ return;
1017
+ }
1018
+ a.style.display = "none", r.removeAttribute("aria-labelledby");
1019
+ const i = ge(e, t);
1020
+ i ? r.setAttribute("aria-label", i) : r.removeAttribute("aria-label");
1021
+ }
1022
+ export {
1023
+ re as $,
1024
+ ae as A,
1025
+ H as B,
1026
+ oe as C,
1027
+ ct as D,
1028
+ ge as E,
1029
+ be as F,
1030
+ pe as G,
1031
+ lt as H,
1032
+ me as I,
1033
+ st as J,
1034
+ Ge as K,
1035
+ C as L,
1036
+ je as M,
1037
+ qe as N,
1038
+ Ke as O,
1039
+ ue as P,
1040
+ Xe as Q,
1041
+ et as R,
1042
+ F as S,
1043
+ tt as T,
1044
+ p as U,
1045
+ Ve as V,
1046
+ dt as W,
1047
+ it as X,
1048
+ We as Y,
1049
+ T as Z,
1050
+ $ as _,
1051
+ ye as a,
1052
+ ee as a0,
1053
+ te as a1,
1054
+ Je as b,
1055
+ at as c,
1056
+ Ue as d,
1057
+ Ye as e,
1058
+ Qe as f,
1059
+ Ze as g,
1060
+ Fe as h,
1061
+ Pe as i,
1062
+ He as j,
1063
+ E as k,
1064
+ rt as l,
1065
+ Te as m,
1066
+ _ as n,
1067
+ ot as o,
1068
+ $e as p,
1069
+ nt as q,
1070
+ P as r,
1071
+ Be as s,
1072
+ W as t,
1073
+ _e as u,
1074
+ de as v,
1075
+ y as w,
1076
+ ft as x,
1077
+ ut as y,
1078
+ z
1079
+ };