@thibezer/ui-components-kit 2.24.1 → 2.25.0

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 (154) hide show
  1. package/CHANGELOG.md +83 -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 +26 -0
  14. package/dist/components/ui-canvas-prancha/ui-canvas-prancha-base.d.ts +9 -0
  15. package/dist/components/ui-canvas-prancha/ui-canvas-prancha.d.ts +2 -2
  16. package/dist/components/ui-editor-prancha/editor-barra.d.ts +19 -0
  17. package/dist/components/ui-editor-prancha/editor-modos.d.ts +35 -0
  18. package/dist/components/ui-editor-prancha/editor-tipos.d.ts +4 -0
  19. package/dist/components/ui-editor-prancha/index.d.ts +1 -0
  20. package/dist/components/ui-editor-prancha/ui-editor-prancha.d.ts +63 -7
  21. package/dist/core/alvo-digitavel.d.ts +3 -0
  22. package/dist/core.cjs +1 -1
  23. package/dist/core.js +43 -54
  24. package/dist/{cores-utils-BrdynxRd.js → cores-utils-DMyqWvZh.js} +2 -2
  25. package/dist/cores.cjs +32 -1
  26. package/dist/cores.js +300 -13
  27. package/dist/custom-elements.json +11945 -11071
  28. package/dist/data.cjs +28 -1
  29. package/dist/data.js +286 -99
  30. package/dist/{feature_caixa-2Sxv3tGa.js → feature_caixa-BVc5LenS.js} +42 -42
  31. package/dist/{feature_desenho-BVHivWIB.js → feature_desenho-CC8Mp5Gp.js} +2 -2
  32. package/dist/feedback.cjs +52 -1
  33. package/dist/feedback.js +655 -25
  34. package/dist/forms.cjs +66 -1
  35. package/dist/forms.js +1216 -39
  36. package/dist/{geometria-px-DUs5FgLE.js → geometria-px-DHMPUsxC.js} +47 -47
  37. package/dist/index.cjs +67 -1
  38. package/dist/index.js +1476 -274
  39. package/dist/kit-base-BmkPi5Rz.cjs +2 -0
  40. package/dist/kit-base-CBXA66aM.js +1084 -0
  41. package/dist/mapa.cjs +5 -5
  42. package/dist/mapa.js +16 -17
  43. package/dist/modal.cjs +18 -1
  44. package/dist/modal.js +235 -29
  45. package/dist/motor.js +49 -49
  46. package/dist/prancha-nucleo.cjs +3 -1
  47. package/dist/prancha-nucleo.js +3120 -277
  48. package/dist/prancha.cjs +38 -1
  49. package/dist/prancha.js +3470 -228
  50. package/dist/register.cjs +1 -1
  51. package/dist/register.js +3 -20
  52. package/dist/seletor-mapa-base.cjs +13 -13
  53. package/dist/seletor-mapa-base.js +3 -5
  54. package/dist/tabela.cjs +142 -1
  55. package/dist/tabela.js +3773 -92
  56. package/dist/tipos-elementos.d.ts +7 -3
  57. package/dist/tipos-vue.d.ts +6 -3
  58. package/dist/tools.cjs +16 -1
  59. package/dist/tools.js +1564 -26
  60. package/dist/{ui-seletor-cor-Cd8jkzXG.js → ui-seletor-cor-CPjA9vhZ.js} +8 -9
  61. package/dist/ui-seletor-cor-D_ifitEN.cjs +83 -0
  62. package/dist/utils-ClVgqVyJ.cjs +1 -0
  63. package/dist/utils-DrHoxxmf.js +83 -0
  64. package/package.json +43 -2
  65. package/dist/acessibilidade-CSzX-DkG.cjs +0 -1
  66. package/dist/acessibilidade-CUlSXc2X.js +0 -38
  67. package/dist/altura-controle-ukMRPckR.cjs +0 -1
  68. package/dist/altura-controle-vxQiXG4q.js +0 -62
  69. package/dist/alvo-digitavel-CzCvNVQ3.js +0 -23
  70. package/dist/alvo-digitavel-DbH0hYFf.cjs +0 -1
  71. package/dist/degrade-CIxvOTUv.cjs +0 -1
  72. package/dist/degrade-gDa5sW__.js +0 -119
  73. package/dist/feature_caixa-CnYPKVFS.cjs +0 -1
  74. package/dist/feature_caixa-DCs9ZeSk.js +0 -1038
  75. package/dist/feature_historico-BAIYk1Me.cjs +0 -3
  76. package/dist/feature_historico-C4h9y5fu.js +0 -3039
  77. package/dist/form-atalhos-7JTYvumA.cjs +0 -1
  78. package/dist/form-atalhos-DDTlpgaB.js +0 -203
  79. package/dist/form-erros-CwPz7Jr4.cjs +0 -1
  80. package/dist/form-erros-DT5HklfD.js +0 -184
  81. package/dist/form-submissao-C-SPRKgT.js +0 -61
  82. package/dist/form-submissao-DxKO5MHI.cjs +0 -1
  83. package/dist/form-validacao-BlQFxUVj.js +0 -104
  84. package/dist/form-validacao-DIeyQVH5.cjs +0 -1
  85. package/dist/geometria-px-DKrWq_XY.js +0 -639
  86. package/dist/leaflet-CEPcxGWV.cjs +0 -1
  87. package/dist/leaflet-DOq10gfg.js +0 -84
  88. package/dist/leaflet-loader-94z5VsdY.cjs +0 -2
  89. package/dist/leaflet-loader-Cjcdgj5R.js +0 -21
  90. package/dist/listener-bag-D5omxZ9h.cjs +0 -1
  91. package/dist/listener-bag-DQgv7OON.js +0 -34
  92. package/dist/motor-By2te6PZ.js +0 -1400
  93. package/dist/motor-CkMxd378.cjs +0 -1
  94. package/dist/opcoes-CupvWVIm.js +0 -24
  95. package/dist/opcoes-vdAUY5OI.cjs +0 -1
  96. package/dist/parts-CaoQiCfI.js +0 -7
  97. package/dist/parts-vQa2873h.cjs +0 -1
  98. package/dist/prancha-paleta-BZ-9QDgh.js +0 -5276
  99. package/dist/prancha-paleta-Bb24vP71.cjs +0 -17
  100. package/dist/ssr-safe-5cWfJP-s.js +0 -10
  101. package/dist/ssr-safe-CiHD1adl.cjs +0 -1
  102. package/dist/svg-seguro-ChVJ2L2z.js +0 -74
  103. package/dist/svg-seguro-J2RM1Ssf.cjs +0 -1
  104. package/dist/ui-badge-DE58YSBY.cjs +0 -28
  105. package/dist/ui-badge-KgmI3jOD.js +0 -201
  106. package/dist/ui-botao-Dz8YvmiA.cjs +0 -12
  107. package/dist/ui-botao-zLkcMMyP.js +0 -168
  108. package/dist/ui-bus-CUd99VJi.js +0 -177
  109. package/dist/ui-bus-XqBLlTYQ.cjs +0 -1
  110. package/dist/ui-camadas-DoHPnbQm.js +0 -3133
  111. package/dist/ui-camadas-Vx7wYD4D.cjs +0 -311
  112. package/dist/ui-campo-texto-Dliyt9qr.cjs +0 -16
  113. package/dist/ui-campo-texto-btevggO3.js +0 -379
  114. package/dist/ui-card-7IEYbCN0.js +0 -150
  115. package/dist/ui-card-Bx8EyzYY.cjs +0 -20
  116. package/dist/ui-card-C-EJoKnm.js +0 -150
  117. package/dist/ui-card-DFnRp9bl.js +0 -146
  118. package/dist/ui-card-DrWVJQKw.cjs +0 -20
  119. package/dist/ui-card-DsIjHMmG.cjs +0 -20
  120. package/dist/ui-controle-cores-B1w_Yl69.cjs +0 -32
  121. package/dist/ui-controle-cores-BRjMvmMn.js +0 -291
  122. package/dist/ui-controle-cores-BcH9k2Fa.js +0 -292
  123. package/dist/ui-controle-cores-CvSTP6gJ.cjs +0 -32
  124. package/dist/ui-editor-prancha-CIngI6yI.js +0 -2886
  125. package/dist/ui-editor-prancha-DorSe6sC.cjs +0 -31
  126. package/dist/ui-linha-2kY7TNUJ.cjs +0 -38
  127. package/dist/ui-linha-B4mBRm1x.cjs +0 -61
  128. package/dist/ui-linha-DTEIIww4.js +0 -1167
  129. package/dist/ui-linha-KFF86FW5.js +0 -752
  130. package/dist/ui-modal-BrXzVZ65.js +0 -216
  131. package/dist/ui-modal-lARKzEVZ.cjs +0 -18
  132. package/dist/ui-paleta-ferramentas-Bu6JaT0s.js +0 -1245
  133. package/dist/ui-paleta-ferramentas-D3Jhwt26.cjs +0 -21
  134. package/dist/ui-paleta-ferramentas-DebHYiwd.js +0 -1615
  135. package/dist/ui-paleta-ferramentas-Dgejtluh.js +0 -1423
  136. package/dist/ui-paleta-ferramentas-hzyo8wBt.cjs +0 -22
  137. package/dist/ui-paleta-ferramentas-jWuICjW8.cjs +0 -22
  138. package/dist/ui-seletor-cor-0RLjcME6.cjs +0 -83
  139. package/dist/ui-seletor-cor-CMuuW-Ym.cjs +0 -83
  140. package/dist/ui-seletor-cor-DFIQ1sin.js +0 -405
  141. package/dist/ui-skeleton-BLEV6h3k.js +0 -653
  142. package/dist/ui-skeleton-B_XTaGrX.cjs +0 -52
  143. package/dist/ui-switch-BXIDwC-Y.cjs +0 -66
  144. package/dist/ui-switch-Ctxk-jKS.js +0 -1212
  145. package/dist/ui-tabela-CXxqbwXv.cjs +0 -7
  146. package/dist/ui-tabela-Cd0vOwnT.js +0 -1459
  147. package/dist/ui-tabela-propriedades-C5cIF5ES.js +0 -3779
  148. package/dist/ui-tabela-propriedades-CJyo568n.js +0 -3517
  149. package/dist/ui-tabela-propriedades-D96Djx-q.cjs +0 -136
  150. package/dist/ui-tabela-propriedades-Wa34hfIr.cjs +0 -142
  151. package/dist/ui-tabela-propriedades-ahQhQauu.js +0 -2329
  152. package/dist/ui-tabela-propriedades-w9JWhjHy.cjs +0 -142
  153. package/dist/zero-js-triggers-CJT988bR.js +0 -83
  154. package/dist/zero-js-triggers-CgM9IIQB.cjs +0 -1
@@ -0,0 +1,1084 @@
1
+ var B = Object.defineProperty;
2
+ var F = (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) => F(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 Ue = typeof window < "u" && typeof document < "u", Z = typeof HTMLElement < "u" ? HTMLElement : class {
33
+ };
34
+ function qe(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 Ve(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 We(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 He = ["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 Be(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 Fe(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 je(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
+ function he() {
263
+ var t;
264
+ let e = typeof document > "u" ? null : document.activeElement;
265
+ for (; (t = e == null ? void 0 : e.shadowRoot) != null && t.activeElement; ) e = e.shadowRoot.activeElement;
266
+ return e;
267
+ }
268
+ const ge = 'button, a[href], summary, [role="button"], [role="menuitem"], [role="tab"], [role="switch"], [role="checkbox"], [role="option"]';
269
+ function Ge(e) {
270
+ var r;
271
+ const t = ((r = e.composedPath) == null ? void 0 : r.call(e)[0]) ?? e.target;
272
+ return t instanceof Element ? t.closest(ge) !== null : !1;
273
+ }
274
+ function Ke(e) {
275
+ var r;
276
+ const t = (r = e == null ? void 0 : e.composedPath) == null ? void 0 : r.call(e)[0];
277
+ return t instanceof Element ? I(t) : I(he());
278
+ }
279
+ function Ye(e, t, r, a) {
280
+ if (e.textContent = t, !r) return;
281
+ const o = document.createElement("span");
282
+ o.className = a, o.setAttribute("aria-hidden", "true"), o.textContent = "*", e.append(" ", o);
283
+ }
284
+ function Je(e, t, r) {
285
+ const a = (e ?? "").trim().toLowerCase();
286
+ return t.includes(a) ? a : r;
287
+ }
288
+ function Qe(e, t) {
289
+ const r = (e ?? "").trim().toLowerCase();
290
+ return t.includes(r) ? r : null;
291
+ }
292
+ function Xe(e, t, r, a) {
293
+ if (e == null || typeof e == "string" && e.trim() === "") return a;
294
+ const o = typeof e == "number" ? e : Number(e.trim());
295
+ return Number.isFinite(o) ? Math.min(r, Math.max(t, Math.trunc(o))) : a;
296
+ }
297
+ function _e(e, t = 0) {
298
+ if (e == null || e.trim() === "") return null;
299
+ const r = Number(e.trim());
300
+ return !Number.isFinite(r) || r < t ? null : Math.trunc(r);
301
+ }
302
+ let L = 0;
303
+ function $e(e = "ui") {
304
+ return L += 1, `${e}-${L.toString(36)}-${Math.random().toString(36).slice(2, 7)}`;
305
+ }
306
+ function q(e, t) {
307
+ if (e === t) return "";
308
+ if (e.nodeType === 3) return e.textContent ?? "";
309
+ let r = "";
310
+ return e.childNodes.forEach((a) => {
311
+ r += q(a, t);
312
+ }), r;
313
+ }
314
+ function be(e, t) {
315
+ var i, n, l;
316
+ const r = (i = e.getAttribute("aria-label")) == null ? void 0 : i.trim();
317
+ if (r) return r;
318
+ const a = /* @__PURE__ */ new Set();
319
+ try {
320
+ (n = t == null ? void 0 : t.labels) == null || n.forEach((s) => a.add(s));
321
+ } catch {
322
+ }
323
+ if (e.id) {
324
+ const s = e.getRootNode();
325
+ (l = s.querySelectorAll) == null || l.call(s, "label[for]").forEach((f) => {
326
+ f.htmlFor === e.id && a.add(f);
327
+ });
328
+ }
329
+ const o = e.closest("label");
330
+ return o && a.add(o), Array.from(a).map((s) => q(s, e).replace(/\s+/g, " ").trim()).filter(Boolean).join(" ");
331
+ }
332
+ function et(e, t) {
333
+ return t.composedPath()[0] === e;
334
+ }
335
+ class xe extends Z {
336
+ constructor() {
337
+ super();
338
+ b(this, "internals");
339
+ b(this, "_formDisabled", !1);
340
+ b(this, "_customErrorMessage", "");
341
+ this.internals = typeof this.attachInternals == "function" ? this.attachInternals() : {};
342
+ }
343
+ // === Ciclo de Vida Form-Associated Custom Elements ===
344
+ formDisabledCallback(r) {
345
+ this._formDisabled = r, this.syncState();
346
+ }
347
+ get form() {
348
+ var r;
349
+ return this.closest("form") ?? ((r = this.internals) == null ? void 0 : r.form) ?? null;
350
+ }
351
+ get required() {
352
+ return this.hasAttribute("obrigatorio") || this.hasAttribute("required");
353
+ }
354
+ set required(r) {
355
+ r ? this.setAttribute("obrigatorio", "") : (this.removeAttribute("obrigatorio"), this.removeAttribute("required")), this.syncState();
356
+ }
357
+ get obrigatorio() {
358
+ return this.required;
359
+ }
360
+ set obrigatorio(r) {
361
+ this.required = r;
362
+ }
363
+ // === API de Validação Nativa ===
364
+ get validity() {
365
+ var r;
366
+ return this.atualizarValidade(), (r = this.internals) == null ? void 0 : r.validity;
367
+ }
368
+ get validationMessage() {
369
+ var r;
370
+ return this.atualizarValidade(), ((r = this.internals) == null ? void 0 : r.validationMessage) ?? "";
371
+ }
372
+ get willValidate() {
373
+ var r;
374
+ return ((r = this.internals) == null ? void 0 : r.willValidate) ?? !1;
375
+ }
376
+ checkValidity() {
377
+ var r, a;
378
+ return this.atualizarValidade(), ((a = (r = this.internals) == null ? void 0 : r.checkValidity) == null ? void 0 : a.call(r)) ?? !0;
379
+ }
380
+ reportValidity() {
381
+ var r, a;
382
+ return this.atualizarValidade(), ((a = (r = this.internals) == null ? void 0 : r.reportValidity) == null ? void 0 : a.call(r)) ?? !0;
383
+ }
384
+ setCustomValidity(r) {
385
+ this._customErrorMessage = r || "", this.atualizarValidade();
386
+ }
387
+ }
388
+ b(xe, "formAssociated", !0);
389
+ function tt(e) {
390
+ if (e.disabled)
391
+ return { valido: !0, flags: {}, mensagem: "" };
392
+ if (e.customError && e.customError.trim() !== "")
393
+ return {
394
+ valido: !1,
395
+ flags: { customError: !0 },
396
+ mensagem: e.customError
397
+ };
398
+ const { val: t, rawVal: r, badInput: a, required: o, tipo: i = "text", mensagemValidacao: n } = e;
399
+ if (a || i === "number" && r && isNaN(Number(r)))
400
+ return {
401
+ valido: !1,
402
+ flags: { badInput: !0 },
403
+ mensagem: n || "Insira um número válido."
404
+ };
405
+ if (o && t.trim() === "")
406
+ return {
407
+ valido: !1,
408
+ flags: { valueMissing: !0 },
409
+ mensagem: n || "Preencha este campo."
410
+ };
411
+ if (t === "")
412
+ return { valido: !0, flags: {}, mensagem: "" };
413
+ if (e.minlength !== null && e.minlength !== void 0 && !isNaN(e.minlength) && t.length < e.minlength)
414
+ return {
415
+ valido: !1,
416
+ flags: { tooShort: !0 },
417
+ mensagem: n || `Use pelo menos ${e.minlength} caracteres (atualmente você está usando ${t.length}).`
418
+ };
419
+ if (e.maxlength !== null && e.maxlength !== void 0 && !isNaN(e.maxlength) && t.length > e.maxlength)
420
+ return {
421
+ valido: !1,
422
+ flags: { tooLong: !0 },
423
+ mensagem: n || `Reduza o texto para no máximo ${e.maxlength} caracteres (atualmente você está usando ${t.length}).`
424
+ };
425
+ if (e.pattern)
426
+ try {
427
+ if (!new RegExp(`^(?:${e.pattern})$`).test(t))
428
+ return {
429
+ valido: !1,
430
+ flags: { patternMismatch: !0 },
431
+ mensagem: n || "O valor não corresponde ao padrão solicitado."
432
+ };
433
+ } catch {
434
+ }
435
+ 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))
436
+ return {
437
+ valido: !1,
438
+ flags: { typeMismatch: !0 },
439
+ mensagem: n || "Insira um endereço de e-mail válido."
440
+ };
441
+ if (i === "url")
442
+ try {
443
+ new URL(t);
444
+ } catch {
445
+ return {
446
+ valido: !1,
447
+ flags: { typeMismatch: !0 },
448
+ mensagem: n || "Insira uma URL válida."
449
+ };
450
+ }
451
+ if (i === "number") {
452
+ const l = Number(t);
453
+ if (isNaN(l))
454
+ return {
455
+ valido: !1,
456
+ flags: { badInput: !0 },
457
+ mensagem: n || "Insira um número válido."
458
+ };
459
+ if (e.min !== null && e.min !== void 0 && !isNaN(e.min) && l < e.min)
460
+ return {
461
+ valido: !1,
462
+ flags: { rangeUnderflow: !0 },
463
+ mensagem: n || `O valor deve ser maior ou igual a ${e.min}.`
464
+ };
465
+ if (e.max !== null && e.max !== void 0 && !isNaN(e.max) && l > e.max)
466
+ return {
467
+ valido: !1,
468
+ flags: { rangeOverflow: !0 },
469
+ mensagem: n || `O valor deve ser menor ou igual a ${e.max}.`
470
+ };
471
+ if (e.step && e.step !== "any") {
472
+ const s = parseFloat(e.step);
473
+ if (!isNaN(s) && s > 0) {
474
+ const f = e.min !== null && e.min !== void 0 && !isNaN(e.min) ? e.min : 0, d = Math.abs((l - f) % s);
475
+ if (d > 1e-6 && Math.abs(d - s) > 1e-6)
476
+ return {
477
+ valido: !1,
478
+ flags: { stepMismatch: !0 },
479
+ mensagem: n || "Insira um valor válido de acordo com o intervalo."
480
+ };
481
+ }
482
+ }
483
+ }
484
+ return { valido: !0, flags: {}, mensagem: "" };
485
+ }
486
+ function rt(e, t, r) {
487
+ !e || typeof e.setValidity != "function" || (t.valido ? e.setValidity({}) : e.setValidity(t.flags, t.mensagem || "Valor inválido.", r));
488
+ }
489
+ const at = '.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}}';
490
+ class Ae {
491
+ constructor() {
492
+ b(this, "provedorToast", null);
493
+ b(this, "listeners", /* @__PURE__ */ new Map());
494
+ b(this, "_observandoSistema", !1);
495
+ this.observarTemaDoSistema();
496
+ }
497
+ on(t, r) {
498
+ return this.listeners.has(t) || this.listeners.set(t, /* @__PURE__ */ new Set()), this.listeners.get(t).add(r), () => this.off(t, r);
499
+ }
500
+ once(t, r) {
501
+ const a = (o) => {
502
+ this.off(t, a), r(o);
503
+ };
504
+ this.on(t, a);
505
+ }
506
+ off(t, r) {
507
+ const a = this.listeners.get(t);
508
+ a && (a.delete(r), a.size === 0 && this.listeners.delete(t));
509
+ }
510
+ emit(t, r) {
511
+ const a = this.listeners.get(t);
512
+ a && a.forEach((o) => {
513
+ try {
514
+ o(r);
515
+ } catch (i) {
516
+ console.error(`[UIBus] Erro ao executar ouvinte do evento "${t}":`, i);
517
+ }
518
+ }), typeof window < "u" && window.dispatchEvent(
519
+ new CustomEvent(`uibus:${t}`, {
520
+ detail: r,
521
+ bubbles: !0,
522
+ composed: !0
523
+ })
524
+ );
525
+ }
526
+ /* ====================================================
527
+ Métodos de Atalho e Ações de Alta Produtividade
528
+ ==================================================== */
529
+ /**
530
+ * Abre um modal pelo seu ID no documento.
531
+ */
532
+ abrirModal(t) {
533
+ if (typeof document > "u") return !1;
534
+ const r = document.getElementById(t);
535
+ 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);
536
+ }
537
+ /**
538
+ * Fecha um modal pelo seu ID ou todos os modais abertos se nenhum ID for passado.
539
+ * Retorna `false` se o modal não existir ou continuar aberto (`bloquear-fechamento`).
540
+ */
541
+ fecharModal(t) {
542
+ if (typeof document > "u") return !1;
543
+ if (t) {
544
+ const r = document.getElementById(t);
545
+ 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;
546
+ } else
547
+ return document.querySelectorAll(
548
+ "ui-modal[aberto], ui-modal[open], ui-dialog[aberto], ui-dialog[open]"
549
+ ).forEach((a) => {
550
+ typeof a.fechar == "function" ? a.fechar() : (a.removeAttribute("aberto"), a.removeAttribute("open"));
551
+ }), this.emit("modal:fechado-todos"), !0;
552
+ }
553
+ /**
554
+ * Abre um painel lateral (drawer / sheet) pelo seu ID no documento.
555
+ */
556
+ abrirDrawer(t) {
557
+ if (typeof document > "u") return !1;
558
+ const r = document.getElementById(t);
559
+ 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);
560
+ }
561
+ /**
562
+ * Fecha um painel lateral (drawer / sheet) pelo seu ID ou todos se nenhum for passado.
563
+ */
564
+ fecharDrawer(t) {
565
+ if (typeof document > "u") return !1;
566
+ if (t) {
567
+ const r = document.getElementById(t);
568
+ 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;
569
+ } else
570
+ return document.querySelectorAll(
571
+ "ui-drawer[aberto], ui-drawer[open], ui-sheet[aberto], ui-sheet[open]"
572
+ ).forEach((a) => {
573
+ typeof a.fechar == "function" ? a.fechar() : (a.removeAttribute("aberto"), a.removeAttribute("open"));
574
+ }), this.emit("drawer:fechado-todos"), !0;
575
+ }
576
+ /**
577
+ * Dispara uma notificação toast flutuante inteligente.
578
+ */
579
+ notificar(t) {
580
+ const r = this.provedorToast;
581
+ if (r)
582
+ try {
583
+ r(typeof t == "string" ? { mensagem: t, tipo: "info" } : t);
584
+ } catch (a) {
585
+ console.error("Erro ao exibir toast:", a);
586
+ }
587
+ }
588
+ /**
589
+ * Registra (ou remove, com `null`) o provedor que materializa os toasts.
590
+ * O `ui-toast` se registra sozinho ao ser carregado; sem provedor, `notificar` é no-op.
591
+ */
592
+ registrarProvedorToast(t) {
593
+ this.provedorToast = t;
594
+ }
595
+ /**
596
+ * Copia um texto para a área de transferência do usuário e exibe feedback opcional.
597
+ */
598
+ async copiar(t, r) {
599
+ if (typeof navigator > "u" || !navigator.clipboard)
600
+ return !1;
601
+ try {
602
+ return await navigator.clipboard.writeText(t), r !== void 0 && this.notificar({
603
+ tipo: "sucesso",
604
+ mensagem: r || "Copiado para a área de transferência!"
605
+ }), this.emit("clipboard:copiado", { texto: t }), !0;
606
+ } catch (a) {
607
+ return console.error("[UIBus] Falha ao copiar texto:", a), this.notificar({
608
+ tipo: "erro",
609
+ mensagem: "Não foi possível copiar o texto."
610
+ }), !1;
611
+ }
612
+ }
613
+ /**
614
+ * Altera a densidade visual global do kit (compacta, normal ou relaxada).
615
+ */
616
+ definirDensidade(t) {
617
+ let r = 34;
618
+ 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 }));
619
+ }
620
+ /**
621
+ * Tema em vigor: o forçado na raiz (`data-tema`, `data-theme`, `.dark`/`.light`)
622
+ * ou, sem nenhum, o do sistema operacional (`prefers-color-scheme`).
623
+ */
624
+ obterTema() {
625
+ if (typeof document > "u") return "escuro";
626
+ const t = N(document.documentElement);
627
+ return t || (ve() ? "claro" : "escuro");
628
+ }
629
+ /**
630
+ * Define o tema global. Sem argumento, alterna o tema em vigor;
631
+ * `'auto'` remove o tema forçado e volta a seguir o sistema operacional.
632
+ */
633
+ definirTema(t) {
634
+ if (typeof document > "u") return t === "claro" ? "claro" : "escuro";
635
+ const r = document.documentElement;
636
+ if (t === "auto")
637
+ r.removeAttribute("data-tema"), r.removeAttribute("data-theme"), r.classList.remove("dark", "light");
638
+ else {
639
+ const o = t || (this.obterTema() === "escuro" ? "claro" : "escuro");
640
+ r.setAttribute("data-tema", o), r.classList.toggle("dark", o === "escuro"), r.classList.toggle("light", o === "claro");
641
+ }
642
+ const a = this.obterTema();
643
+ return this.emit("tema:alterado", { tema: a }), a;
644
+ }
645
+ /** Com o tema seguindo o SO, avisa `tema:alterado` quando o usuário troca o tema do sistema. */
646
+ observarTemaDoSistema() {
647
+ var t, r;
648
+ 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", () => {
649
+ N(document.documentElement) || this.emit("tema:alterado", { tema: this.obterTema() });
650
+ }));
651
+ }
652
+ }
653
+ function N(e) {
654
+ const t = e.getAttribute("data-tema") || e.getAttribute("data-theme");
655
+ return t === "escuro" || t === "dark" ? "escuro" : t === "claro" || t === "light" ? "claro" : e.classList.contains("dark") ? "escuro" : e.classList.contains("light") ? "claro" : null;
656
+ }
657
+ function ve() {
658
+ return typeof window < "u" && typeof window.matchMedia == "function" && window.matchMedia("(prefers-color-scheme: light)").matches;
659
+ }
660
+ const p = new Ae();
661
+ let D = !1;
662
+ function ye(e) {
663
+ if (e.hasAttribute("disabled") || e.hasAttribute("carregando") || e.getAttribute("aria-disabled") === "true" || e.localName.startsWith("ui-") && e.hasAttribute("loading")) return !0;
664
+ try {
665
+ return e.matches(":disabled");
666
+ } catch {
667
+ return !1;
668
+ }
669
+ }
670
+ function we() {
671
+ D || typeof document > "u" || (D = !0, document.addEventListener("click", (e) => {
672
+ 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]";
673
+ let a = null;
674
+ for (const m of t)
675
+ if (m instanceof HTMLElement && m.matches(r)) {
676
+ a = m;
677
+ break;
678
+ }
679
+ if (!a || ye(a)) return;
680
+ const o = a.getAttribute("target-modal") || a.getAttribute("modal-alvo");
681
+ if (o && p.abrirModal(o), a.hasAttribute("dismiss-modal") || a.hasAttribute("fechar-modal")) {
682
+ const m = a.getAttribute("dismiss-modal") || a.getAttribute("fechar-modal");
683
+ if (m && m !== "")
684
+ p.fecharModal(m);
685
+ else {
686
+ let u = null;
687
+ for (const c of t)
688
+ if (c instanceof HTMLElement && (c.matches("ui-modal, ui-dialog") || c.tagName === "UI-MODAL" || c.tagName === "UI-DIALOG")) {
689
+ u = c;
690
+ break;
691
+ }
692
+ u && (typeof u.fechar == "function" ? u.fechar() : (u.removeAttribute("aberto"), u.removeAttribute("open")));
693
+ }
694
+ }
695
+ const i = a.getAttribute("target-drawer") || a.getAttribute("drawer-alvo");
696
+ if (i && p.abrirDrawer(i), a.hasAttribute("dismiss-drawer") || a.hasAttribute("fechar-drawer")) {
697
+ const m = a.getAttribute("dismiss-drawer") || a.getAttribute("fechar-drawer");
698
+ if (m && m !== "")
699
+ p.fecharDrawer(m);
700
+ else {
701
+ let u = null;
702
+ for (const c of t)
703
+ 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"))) {
704
+ u = c;
705
+ break;
706
+ }
707
+ u && (typeof u.fechar == "function" ? u.fechar() : (u.removeAttribute("aberto"), u.removeAttribute("open")));
708
+ }
709
+ }
710
+ const n = a.getAttribute("toast-sucesso");
711
+ n && p.notificar({ tipo: "sucesso", mensagem: n });
712
+ const l = a.getAttribute("toast-erro");
713
+ l && p.notificar({ tipo: "erro", mensagem: l });
714
+ const s = a.getAttribute("toast-alerta");
715
+ s && p.notificar({ tipo: "alerta", mensagem: s });
716
+ const f = a.getAttribute("toast-info");
717
+ f && p.notificar({ tipo: "info", mensagem: f });
718
+ const d = a.getAttribute("copiar-texto");
719
+ if (d !== null) {
720
+ let m = d;
721
+ if (d.startsWith("#") || d.startsWith(".") || d.match(/^[a-zA-Z0-9_-]+$/))
722
+ try {
723
+ let c = null;
724
+ 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 || "");
725
+ } catch {
726
+ }
727
+ const u = a.getAttribute("copiar-mensagem") || "Copiado com sucesso!";
728
+ p.copiar(m, u);
729
+ }
730
+ a.hasAttribute("alternar-tema") && p.definirTema();
731
+ const h = a.getAttribute("definir-densidade");
732
+ h && p.definirDensidade(h);
733
+ const g = a.getAttribute("limpar-form");
734
+ if (g) {
735
+ const m = document.getElementById(g);
736
+ m && typeof m.reset == "function" && (m.reset(), p.notificar({ tipo: "info", mensagem: "Formulário limpo." }));
737
+ }
738
+ }));
739
+ }
740
+ let v = null, A = null;
741
+ async function ot() {
742
+ return typeof window < "u" && window.L ? (A = window.L, A) : A || v || (v = (async () => {
743
+ try {
744
+ const e = await import("leaflet");
745
+ return A = e.default || e, typeof window < "u" && !window.L && (window.L = A), A;
746
+ } catch {
747
+ return v = null, console.warn(
748
+ `[UI Components Kit] O Leaflet não foi encontrado no ambiente.
749
+ 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>.`
750
+ ), null;
751
+ }
752
+ })(), v);
753
+ }
754
+ function it() {
755
+ return typeof window < "u" && window.L ? window.L : A;
756
+ }
757
+ const Ee = /* @__PURE__ */ new Set([
758
+ "svg",
759
+ "g",
760
+ "path",
761
+ "rect",
762
+ "circle",
763
+ "ellipse",
764
+ "line",
765
+ "polyline",
766
+ "polygon",
767
+ "text",
768
+ "tspan",
769
+ "title",
770
+ "desc",
771
+ "defs",
772
+ "symbol",
773
+ "use",
774
+ "lineargradient",
775
+ "radialgradient",
776
+ "stop",
777
+ "clippath",
778
+ "mask"
779
+ ]), ze = /^(javascript|data|vbscript):/i, Se = /url\s*\(\s*['"]?\s*(?!#)/i;
780
+ let ke = 0;
781
+ function Ce(e, t) {
782
+ const r = e.toLowerCase();
783
+ if (r.startsWith("on")) return !1;
784
+ const a = t.replace(/[\s\u0000-\u001f]+/g, "");
785
+ return ze.test(a) ? !1 : r === "href" || r === "xlink:href" ? a.startsWith("#") : !Se.test(t);
786
+ }
787
+ function V(e) {
788
+ Array.from(e.children).forEach((t) => {
789
+ if (!Ee.has(t.localName.toLowerCase())) {
790
+ console.warn(`[svg-seguro] Elemento <${t.localName}> não permitido foi descartado pela allowlist.`), t.remove();
791
+ return;
792
+ }
793
+ V(t);
794
+ }), Array.from(e.attributes).forEach((t) => {
795
+ Ce(t.name, t.value) || e.removeAttribute(t.name);
796
+ });
797
+ }
798
+ function Oe(e) {
799
+ const t = `ui-svg-${++ke}-`, r = /* @__PURE__ */ new Map();
800
+ if (e.querySelectorAll("[id]").forEach((n) => {
801
+ const l = n.getAttribute("id");
802
+ if (l) {
803
+ const s = `${t}${l}`;
804
+ r.set(l, s), n.setAttribute("id", s);
805
+ }
806
+ }), r.size === 0) return;
807
+ const o = [e, ...Array.from(e.querySelectorAll("*"))], i = /url\(\s*#([a-zA-Z0-9_\-:]+)\s*\)/g;
808
+ o.forEach((n) => {
809
+ Array.from(n.attributes).forEach((l) => {
810
+ const s = l.name.toLowerCase(), f = l.value;
811
+ if ((s === "href" || s === "xlink:href") && f.startsWith("#")) {
812
+ const d = f.slice(1);
813
+ r.has(d) && n.setAttribute(l.name, `#${r.get(d)}`);
814
+ } else if (f.includes("url(#")) {
815
+ const d = f.replace(i, (h, g) => r.has(g) ? `url(#${r.get(g)})` : h);
816
+ d !== f && n.setAttribute(l.name, d);
817
+ }
818
+ });
819
+ });
820
+ }
821
+ function nt(e) {
822
+ if (!e || typeof e != "string" || typeof document > "u") return null;
823
+ const t = document.createElement("template");
824
+ t.innerHTML = e.trim();
825
+ const r = t.content.querySelector("svg");
826
+ return r ? (V(r), Oe(r), r) : (e.trim().length > 0 && console.warn("[svg-seguro] Código descartado: nenhum elemento <svg> válido encontrado."), null);
827
+ }
828
+ 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", Me = 'input[type="file"], input[type="hidden"], input[type="submit"], input[type="button"], input[type="reset"]', Te = /* @__PURE__ */ new Set(["ui-checkbox", "ui-radio", "ui-switch", "ui-toggle"]);
829
+ function W(e) {
830
+ const t = e.tagName.toLowerCase();
831
+ if (Te.has(t)) return !0;
832
+ if (t !== "input") return !1;
833
+ const r = (e.getAttribute("type") || "").toLowerCase();
834
+ return r === "checkbox" || r === "radio";
835
+ }
836
+ function z(e, t = E) {
837
+ if (!e || typeof e.querySelectorAll != "function") return [];
838
+ try {
839
+ return Array.from(e.querySelectorAll(t)).filter((r) => !r.matches(Me));
840
+ } catch {
841
+ return [];
842
+ }
843
+ }
844
+ function Re(e, t) {
845
+ return e.getAttribute("name") || e.id || `#${t}`;
846
+ }
847
+ function y(e) {
848
+ try {
849
+ const t = e;
850
+ if (W(e)) return t.checked === !0 ? "1" : "0";
851
+ const r = t.value;
852
+ return r == null ? "" : typeof r == "string" ? r : String(r);
853
+ } catch {
854
+ return "";
855
+ }
856
+ }
857
+ function P(e, t) {
858
+ try {
859
+ const r = e;
860
+ W(e) ? r.checked = t === "1" || t === "true" : r.value = t;
861
+ } catch {
862
+ }
863
+ }
864
+ function H(e, t, r) {
865
+ return z(e, r).find((o) => o.getAttribute("name") === t || o.id === t) ?? null;
866
+ }
867
+ const Ie = ["input", "change", "ui-input", "ui-change", "ui-selecionar", "ui-campos-preenchidos"];
868
+ function k(e, t, r) {
869
+ const a = z(e, t).map((i, n) => [Re(i, n), y(i)]);
870
+ let o = null;
871
+ if (r)
872
+ try {
873
+ o = r() ?? null;
874
+ } catch {
875
+ o = null;
876
+ }
877
+ try {
878
+ return JSON.stringify([a, o]);
879
+ } catch {
880
+ return JSON.stringify([a, null]);
881
+ }
882
+ }
883
+ function lt(e, t = {}) {
884
+ const r = t.seletor ?? E, a = new C();
885
+ let o = k(e, r, t.estadoExterno), i = !1;
886
+ const n = () => {
887
+ var s;
888
+ const l = k(e, r, t.estadoExterno) !== o;
889
+ if (l !== i) {
890
+ i = l;
891
+ try {
892
+ (s = t.aoMudar) == null || s.call(t, i);
893
+ } catch (f) {
894
+ console.error("[form-rascunho] aoMudar lançou exceção:", f);
895
+ }
896
+ }
897
+ return i;
898
+ };
899
+ return Ie.forEach((l) => a.add(e, l, n)), {
900
+ get sujo() {
901
+ return i;
902
+ },
903
+ avaliar: n,
904
+ marcarLimpo() {
905
+ o = k(e, r, t.estadoExterno), n();
906
+ },
907
+ destruir() {
908
+ a.cleanup();
909
+ }
910
+ };
911
+ }
912
+ const Le = /* @__PURE__ */ new Set(["__proto__", "constructor", "prototype"]), Ne = (e) => e == null ? "" : typeof e == "boolean" ? e ? "1" : "0" : String(e);
913
+ function st(e, t, r = {}) {
914
+ const a = r.somenteVazios !== !1, o = r.vazioSe ?? ((u, c) => c.trim() === ""), i = r.seletor ?? E, n = [], l = [], s = [], f = [], d = [];
915
+ let h = !1;
916
+ const g = () => {
917
+ e && typeof e.dispatchEvent == "function" && typeof CustomEvent < "u" && e.dispatchEvent(new CustomEvent("ui-campos-preenchidos", { bubbles: !0, detail: { aplicados: [...n] } }));
918
+ }, m = (u, c, x) => {
919
+ f.push({ campo: c, valor: y(c) }), P(c, x), n.includes(u) || n.push(u);
920
+ };
921
+ if (t && typeof t == "object")
922
+ for (const u of Object.keys(t)) {
923
+ if (Le.has(u)) continue;
924
+ const c = H(e, u, i);
925
+ if (!c) {
926
+ s.push(u);
927
+ continue;
928
+ }
929
+ const x = Ne(t[u]);
930
+ if (x === "") continue;
931
+ const O = y(c);
932
+ x !== O && (!a || o(u, O) ? m(u, c, x) : (l.push(u), d.push({ chave: u, campo: c, valor: x })));
933
+ }
934
+ return n.length > 0 && g(), {
935
+ aplicados: n,
936
+ conflitos: l,
937
+ semAlvo: s,
938
+ substituirConflitos() {
939
+ h || d.length === 0 || (d.splice(0).forEach(({ chave: u, campo: c, valor: x }) => m(u, c, x)), g());
940
+ },
941
+ desfazer() {
942
+ if (!h) {
943
+ h = !0;
944
+ for (let u = f.length - 1; u >= 0; u--) P(f[u].campo, f[u].valor);
945
+ f.length = 0, g();
946
+ }
947
+ }
948
+ };
949
+ }
950
+ const De = "Valor inválido.";
951
+ function w(e, t) {
952
+ t ? (e.setAttribute("erro", ""), e.setAttribute("mensagem-erro", t)) : (e.removeAttribute("erro"), e.removeAttribute("mensagem-erro"));
953
+ }
954
+ function ut(e, t, r = {}) {
955
+ var o, i, n;
956
+ const a = [];
957
+ if (!e || !t || typeof t != "object") return { valido: !0, erros: a };
958
+ for (const l of Object.keys(t)) {
959
+ const s = t[l], f = H(e, l);
960
+ if (!f || typeof s != "function") continue;
961
+ if ((o = r.ignorar) != null && o.call(r, f)) {
962
+ w(f, null);
963
+ continue;
964
+ }
965
+ let d;
966
+ try {
967
+ d = s(y(f), f);
968
+ } catch (h) {
969
+ console.error(`[form-erros] regra do campo "${l}" lançou exceção:`, h), d = De;
970
+ }
971
+ w(f, d || null), d && a.push({ chave: l, mensagem: d, campo: f });
972
+ }
973
+ if (a.length > 0) {
974
+ const l = z(e);
975
+ if (a.sort((s, f) => l.indexOf(s.campo) - l.indexOf(f.campo)), r.focarPrimeiro !== !1) {
976
+ const s = a[0].campo;
977
+ try {
978
+ (i = s.focus) == null || i.call(s), (n = s.scrollIntoView) == null || n.call(s, { block: "center", behavior: "smooth" });
979
+ } catch {
980
+ }
981
+ }
982
+ }
983
+ return { valido: a.length === 0, erros: a };
984
+ }
985
+ function ct(e) {
986
+ z(e).forEach((t) => w(t, null));
987
+ }
988
+ function ft(e, t = E) {
989
+ const r = new C(), a = (o) => {
990
+ const i = o.target;
991
+ if (!(i instanceof Element)) return;
992
+ const n = i.closest(t);
993
+ n && (n.hasAttribute("erro") || n.hasAttribute("mensagem-erro")) && w(n, null);
994
+ };
995
+ return ["input", "change", "ui-input", "ui-change", "ui-selecionar"].forEach((o) => r.add(e, o, a)), () => r.cleanup();
996
+ }
997
+ function dt(e, t) {
998
+ const r = new C(), a = (i) => {
999
+ try {
1000
+ i();
1001
+ } catch (n) {
1002
+ console.error("[form-atalhos] ação do atalho lançou exceção:", n);
1003
+ }
1004
+ }, o = (i) => {
1005
+ if (i.isComposing) return;
1006
+ const n = i.ctrlKey || i.metaKey;
1007
+ if (t.salvar && n && !i.altKey && !i.shiftKey && i.key.toLowerCase() === "s") {
1008
+ i.preventDefault(), a(t.salvar);
1009
+ return;
1010
+ }
1011
+ t.cancelar && i.key === "Escape" && !i.defaultPrevented && !n && !i.altKey && !i.shiftKey && (i.preventDefault(), a(t.cancelar));
1012
+ };
1013
+ return r.add(e, "keydown", o), () => r.cleanup();
1014
+ }
1015
+ typeof document < "u" && we();
1016
+ function mt({ host: e, internals: t, controle: r, rotulo: a, texto: o }) {
1017
+ if (o) {
1018
+ a.textContent = o, a.style.display = "inline", r.setAttribute("aria-labelledby", a.id), r.removeAttribute("aria-label");
1019
+ return;
1020
+ }
1021
+ a.style.display = "none", r.removeAttribute("aria-labelledby");
1022
+ const i = be(e, t);
1023
+ i ? r.setAttribute("aria-label", i) : r.removeAttribute("aria-label");
1024
+ }
1025
+ export {
1026
+ T as $,
1027
+ ae as A,
1028
+ H as B,
1029
+ oe as C,
1030
+ ft as D,
1031
+ be as E,
1032
+ xe as F,
1033
+ pe as G,
1034
+ st as H,
1035
+ me as I,
1036
+ ut as J,
1037
+ Ke as K,
1038
+ C as L,
1039
+ Ge as M,
1040
+ he as N,
1041
+ I as O,
1042
+ ue as P,
1043
+ Ve as Q,
1044
+ Ye as R,
1045
+ Z as S,
1046
+ _e as T,
1047
+ p as U,
1048
+ tt as V,
1049
+ rt as W,
1050
+ We as X,
1051
+ mt as Y,
1052
+ nt as Z,
1053
+ He as _,
1054
+ we as a,
1055
+ $ as a0,
1056
+ re as a1,
1057
+ ee as a2,
1058
+ te as a3,
1059
+ Qe as b,
1060
+ ot as c,
1061
+ qe as d,
1062
+ Je as e,
1063
+ Xe as f,
1064
+ Ze as g,
1065
+ je as h,
1066
+ Ue as i,
1067
+ Be as j,
1068
+ E as k,
1069
+ at as l,
1070
+ Re as m,
1071
+ _ as n,
1072
+ it as o,
1073
+ et as p,
1074
+ lt as q,
1075
+ P as r,
1076
+ Fe as s,
1077
+ W as t,
1078
+ $e as u,
1079
+ de as v,
1080
+ y as w,
1081
+ dt as x,
1082
+ ct as y,
1083
+ z
1084
+ };