@luis-angel-martin-dzul/input-styles 0.0.26 → 0.0.27
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -0
- package/dist/input-styles.css +1 -1
- package/dist/input-yuc.es.js +74 -47
- package/dist/input-yuc.umd.js +2 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -921,6 +921,8 @@ UtilStyle.getUUID()
|
|
|
921
921
|
| `formatNumber(valor, digit?)` | `Number, Number` | Formatea un número con separadores de miles y decimales fijos. |
|
|
922
922
|
| `formatDateShort(dateString)` | `String` | Fecha en formato corto en español (ej: `9 jul 2026`). |
|
|
923
923
|
| `formatDateLong(dateString)` | `String` | Fecha en formato largo en español (ej: `9 de julio de 2026`). |
|
|
924
|
+
| `formatDateTimeShort(dateString, hour12?)` | `String, Boolean` | Fecha y hora en formato corto en español (ej: `9 jul 2026, 12:00 p. m.`). `hour12` (default `true`) alterna entre 12h y 24h. |
|
|
925
|
+
| `formatDateTimeLong(dateString, hour12?)` | `String, Boolean` | Fecha y hora en formato largo en español (ej: `9 de julio de 2026, 12:00 p. m.`). `hour12` (default `true`) alterna entre 12h y 24h. |
|
|
924
926
|
| `getDateTimeNow()` | — | Fecha y hora actual (zona `America/Mexico_City`) en formato `YYYY-MM-DDTHH:mm:ss`. |
|
|
925
927
|
| `blockKeyNumber(event)` | `Event` | Bloquea las teclas `e`, `E`, `+`, `-` en un `@keydown`. |
|
|
926
928
|
| `blockKeys(event, keys)` | `Event, Array` | Bloquea las teclas indicadas en un `@keydown`. |
|
package/dist/input-styles.css
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
.alert-container{z-index:99999;flex-direction:column;gap:10px;width:340px;display:flex;position:fixed;top:20px;right:20px}.alert{opacity:0;background-color:#f9fafb;border:1px solid #0000;border-radius:.375rem;align-items:center;gap:12px;padding:12px 16px;transition:opacity .25s,transform .25s;display:flex;transform:translate(40px);box-shadow:0 2px 6px #0000001f}.alert.show{opacity:1;transform:translate(0)}.alert.hide{opacity:0;transform:translate(40px)}.alert-icon{justify-content:center;align-items:center;width:26px;display:flex}.alert-icon svg{width:22px;height:22px;display:block}.alert-icon svg path{fill:currentColor!important}.alert-texts{flex:1}.alert-title{text-overflow:ellipsis;font-size:14px;font-weight:700;overflow:hidden}.alert-message{-webkit-box-orient:vertical;margin-top:2px;font-size:13px;display:-webkit-box;overflow:hidden}.alert-close{cursor:pointer;border-radius:.5rem;justify-content:center;align-items:center;width:28px;height:28px;font-size:18px;font-weight:700;transition:all .2s;display:flex}.alert-close:hover{background:#d1d5db}.alert-success{color:#065f46;background-color:#ecfdf5;border-color:#b4dfc6}.alert-error{color:#991b1b;background-color:#fef2f2;border-color:#f0c5c5}.alert-warning{color:#92400e;background-color:#fffbeb;border-color:#f0dfa5}.alert-info{color:#1e40af;background-color:#eff6ff;border-color:#c7daf5}.alert-neutral{color:#374151;background-color:#f3f4f6;border-color:#cbd5e1}.dialog-overlay{z-index:99998;opacity:0;background:#00000073;justify-content:center;align-items:center;width:100%;height:100%;transition:opacity .25s;display:flex;position:fixed;top:0;left:0}.dialog-overlay.show{opacity:1}.dialog-box{background:#fff;border-radius:.5rem;flex-direction:column;width:400px;max-width:90%;max-height:90vh;padding:1rem;transition:transform .25s;display:flex;transform:translateY(-20px);box-shadow:0 25px 50px -12px #00000040}.dialog-overlay.show .dialog-box{transform:translateY(0)}.dialog-box.fixed-width{width:380px;max-width:90%}.dialog-title{color:#1f2937;font-size:18px;font-weight:700}.dialog-description{color:#374151;white-space:pre-line;margin-bottom:10px;font-size:14px}.dialog-buttons{gap:10px;margin-top:10px;display:flex}.dialog-buttons.two-buttons{grid-template-columns:1fr 1fr;gap:10px;display:grid}.dialog-buttons.one-button{display:flex}.dialog-buttons.one-button .dialog-btn{flex:1}.dialog-btn{cursor:pointer;text-align:center;justify-content:center;align-items:center;gap:6px;font-size:14px;font-weight:600;transition:all .2s;display:inline-flex}.dialog-buttons .dialog-btn{flex:1}.btn-blue{color:#fff;cursor:pointer;background-color:#0284c7;border:none;border-radius:.125rem;padding:.25rem .5rem;font-size:.75rem;transition:background-color .2s}.btn-blue:hover{background-color:#0ea5e9}.btn-blue:disabled{color:#6b7280;cursor:not-allowed;background-color:#7dd3fc}.btn-white{color:#374151;cursor:pointer;background-color:#fff;border:1px solid #d1d5db;border-radius:.125rem;padding:.25rem .5rem;font-size:.75rem;transition:background-color .2s}.btn-white:hover{background-color:#f3f4f6}.btn-white:disabled{color:#6b7280;cursor:not-allowed;background-color:#d1d5db}.dialog-btn-cancel{color:#374151;cursor:pointer;background-color:#fff;border:1px solid #d1d5db;border-radius:.125rem;padding:.25rem .5rem;font-size:.75rem;transition:background-color .2s}.dialog-btn-cancel:hover{background-color:#f3f4f6}.dialog-btn-cancel:disabled{color:#6b7280;cursor:not-allowed;background-color:#d1d5db}.dialog-btn-accept{color:#fff;cursor:pointer;background-color:#0284c7;border:none;border-radius:.125rem;padding:.25rem .5rem;font-size:.75rem;transition:background-color .2s}.dialog-btn-accept:hover{background-color:#0ea5e9}.dialog-btn-accept:disabled{color:#6b7280;cursor:not-allowed;background-color:#7dd3fc}.dialog-loading-layout{gap:16px;min-height:60px;margin-top:16px;display:flex}.dialog-loading-icon{flex-shrink:0;align-items:center;min-height:60px;display:flex}.dialog-loading-spinner{border:3px solid #e5e7eb;border-top-color:#0d9488;border-radius:50%;width:40px;height:40px;animation:.8s linear infinite dialog-spin}.dialog-loading-texts{flex-direction:column;flex:1;justify-content:center;gap:4px;display:flex}.dialog-loading-title{color:#1f2937;font-size:15px;font-weight:600;line-height:1.4}.dialog-loading-message{color:#6b7280;font-size:13px;line-height:1.4}@keyframes dialog-spin{to{transform:rotate(360deg)}}@keyframes dialogShake{0%{transform:translateY(0)}30%{transform:translateY(-6px)}60%{transform:translateY(3px)}to{transform:translateY(0)}}.dialog-shake{animation:.25s dialogShake}.dialog-box:has(.dialog-loading-layout) .dialog-title{display:none}.dialog-box:has(.dialog-loading-layout) .dialog-description{display:none}.dialog-box:has(.dialog-loading-layout:only-child){padding:1rem}.dialog-box:has(.dialog-loading-layout):not(:has(.dialog-buttons)){padding-bottom:1rem}.dialog-box:has(.dialog-loading-layout:first-child:last-child) .dialog-loading-layout{margin-top:0}input[type=date][data-v-756569d8]::-webkit-calendar-picker-indicator{-webkit-appearance:none;display:none}input[type=datetime-local][data-v-756569d8]::-webkit-calendar-picker-indicator{-webkit-appearance:none;display:none}input[type=time][data-v-756569d8]::-webkit-calendar-picker-indicator{-webkit-appearance:none;display:none}input[type=date][data-v-756569d8],input[type=datetime-local][data-v-756569d8],input[type=time][data-v-756569d8]{appearance:none;-moz-appearance:textfield}input[type=date][data-v-
|
|
1
|
+
.alert-container{z-index:99999;flex-direction:column;gap:10px;width:340px;display:flex;position:fixed;top:20px;right:20px}.alert{opacity:0;background-color:#f9fafb;border:1px solid #0000;border-radius:.375rem;align-items:center;gap:12px;padding:12px 16px;transition:opacity .25s,transform .25s;display:flex;transform:translate(40px);box-shadow:0 2px 6px #0000001f}.alert.show{opacity:1;transform:translate(0)}.alert.hide{opacity:0;transform:translate(40px)}.alert-icon{justify-content:center;align-items:center;width:26px;display:flex}.alert-icon svg{width:22px;height:22px;display:block}.alert-icon svg path{fill:currentColor!important}.alert-texts{flex:1}.alert-title{text-overflow:ellipsis;font-size:14px;font-weight:700;overflow:hidden}.alert-message{-webkit-box-orient:vertical;margin-top:2px;font-size:13px;display:-webkit-box;overflow:hidden}.alert-close{cursor:pointer;border-radius:.5rem;justify-content:center;align-items:center;width:28px;height:28px;font-size:18px;font-weight:700;transition:all .2s;display:flex}.alert-close:hover{background:#d1d5db}.alert-success{color:#065f46;background-color:#ecfdf5;border-color:#b4dfc6}.alert-error{color:#991b1b;background-color:#fef2f2;border-color:#f0c5c5}.alert-warning{color:#92400e;background-color:#fffbeb;border-color:#f0dfa5}.alert-info{color:#1e40af;background-color:#eff6ff;border-color:#c7daf5}.alert-neutral{color:#374151;background-color:#f3f4f6;border-color:#cbd5e1}.dialog-overlay{z-index:99998;opacity:0;background:#00000073;justify-content:center;align-items:center;width:100%;height:100%;transition:opacity .25s;display:flex;position:fixed;top:0;left:0}.dialog-overlay.show{opacity:1}.dialog-box{background:#fff;border-radius:.5rem;flex-direction:column;width:400px;max-width:90%;max-height:90vh;padding:1rem;transition:transform .25s;display:flex;transform:translateY(-20px);box-shadow:0 25px 50px -12px #00000040}.dialog-overlay.show .dialog-box{transform:translateY(0)}.dialog-box.fixed-width{width:380px;max-width:90%}.dialog-title{color:#1f2937;font-size:18px;font-weight:700}.dialog-description{color:#374151;white-space:pre-line;margin-bottom:10px;font-size:14px}.dialog-buttons{gap:10px;margin-top:10px;display:flex}.dialog-buttons.two-buttons{grid-template-columns:1fr 1fr;gap:10px;display:grid}.dialog-buttons.one-button{display:flex}.dialog-buttons.one-button .dialog-btn{flex:1}.dialog-btn{cursor:pointer;text-align:center;justify-content:center;align-items:center;gap:6px;font-size:14px;font-weight:600;transition:all .2s;display:inline-flex}.dialog-buttons .dialog-btn{flex:1}.btn-blue{color:#fff;cursor:pointer;background-color:#0284c7;border:none;border-radius:.125rem;padding:.25rem .5rem;font-size:.75rem;transition:background-color .2s}.btn-blue:hover{background-color:#0ea5e9}.btn-blue:disabled{color:#6b7280;cursor:not-allowed;background-color:#7dd3fc}.btn-white{color:#374151;cursor:pointer;background-color:#fff;border:1px solid #d1d5db;border-radius:.125rem;padding:.25rem .5rem;font-size:.75rem;transition:background-color .2s}.btn-white:hover{background-color:#f3f4f6}.btn-white:disabled{color:#6b7280;cursor:not-allowed;background-color:#d1d5db}.dialog-btn-cancel{color:#374151;cursor:pointer;background-color:#fff;border:1px solid #d1d5db;border-radius:.125rem;padding:.25rem .5rem;font-size:.75rem;transition:background-color .2s}.dialog-btn-cancel:hover{background-color:#f3f4f6}.dialog-btn-cancel:disabled{color:#6b7280;cursor:not-allowed;background-color:#d1d5db}.dialog-btn-accept{color:#fff;cursor:pointer;background-color:#0284c7;border:none;border-radius:.125rem;padding:.25rem .5rem;font-size:.75rem;transition:background-color .2s}.dialog-btn-accept:hover{background-color:#0ea5e9}.dialog-btn-accept:disabled{color:#6b7280;cursor:not-allowed;background-color:#7dd3fc}.dialog-loading-layout{gap:16px;min-height:60px;margin-top:16px;display:flex}.dialog-loading-icon{flex-shrink:0;align-items:center;min-height:60px;display:flex}.dialog-loading-spinner{border:3px solid #e5e7eb;border-top-color:#0d9488;border-radius:50%;width:40px;height:40px;animation:.8s linear infinite dialog-spin}.dialog-loading-texts{flex-direction:column;flex:1;justify-content:center;gap:4px;display:flex}.dialog-loading-title{color:#1f2937;font-size:15px;font-weight:600;line-height:1.4}.dialog-loading-message{color:#6b7280;font-size:13px;line-height:1.4}@keyframes dialog-spin{to{transform:rotate(360deg)}}@keyframes dialogShake{0%{transform:translateY(0)}30%{transform:translateY(-6px)}60%{transform:translateY(3px)}to{transform:translateY(0)}}.dialog-shake{animation:.25s dialogShake}.dialog-box:has(.dialog-loading-layout) .dialog-title{display:none}.dialog-box:has(.dialog-loading-layout) .dialog-description{display:none}.dialog-box:has(.dialog-loading-layout:only-child){padding:1rem}.dialog-box:has(.dialog-loading-layout):not(:has(.dialog-buttons)){padding-bottom:1rem}.dialog-box:has(.dialog-loading-layout:first-child:last-child) .dialog-loading-layout{margin-top:0}input[type=date][data-v-756569d8]::-webkit-calendar-picker-indicator{-webkit-appearance:none;display:none}input[type=datetime-local][data-v-756569d8]::-webkit-calendar-picker-indicator{-webkit-appearance:none;display:none}input[type=time][data-v-756569d8]::-webkit-calendar-picker-indicator{-webkit-appearance:none;display:none}input[type=date][data-v-756569d8],input[type=datetime-local][data-v-756569d8],input[type=time][data-v-756569d8]{appearance:none;-moz-appearance:textfield}input[type=date][data-v-f9c04d0f]::-webkit-calendar-picker-indicator{-webkit-appearance:none;display:none}input[type=datetime-local][data-v-f9c04d0f]::-webkit-calendar-picker-indicator{-webkit-appearance:none;display:none}input[type=time][data-v-f9c04d0f]::-webkit-calendar-picker-indicator{-webkit-appearance:none;display:none}input[type=date][data-v-f9c04d0f],input[type=datetime-local][data-v-f9c04d0f],input[type=time][data-v-f9c04d0f]{appearance:none;-moz-appearance:textfield}input[type=date][data-v-3968f4d1]::-webkit-calendar-picker-indicator{-webkit-appearance:none;display:none}input[type=datetime-local][data-v-3968f4d1]::-webkit-calendar-picker-indicator{-webkit-appearance:none;display:none}input[type=time][data-v-3968f4d1]::-webkit-calendar-picker-indicator{-webkit-appearance:none;display:none}input[type=date][data-v-3968f4d1],input[type=datetime-local][data-v-3968f4d1],input[type=time][data-v-3968f4d1]{appearance:none;-moz-appearance:textfield}
|
|
2
2
|
/*$vite$:1*/
|
package/dist/input-yuc.es.js
CHANGED
|
@@ -3213,6 +3213,30 @@ var Z = class {
|
|
|
3213
3213
|
day: "numeric"
|
|
3214
3214
|
}) : "No se proporciono fecha valida.";
|
|
3215
3215
|
}
|
|
3216
|
+
static formatDateTimeShort(e, t = !0) {
|
|
3217
|
+
if (!e) return "No se proporciono fecha valida.";
|
|
3218
|
+
let n = {
|
|
3219
|
+
year: "numeric",
|
|
3220
|
+
month: "short",
|
|
3221
|
+
day: "numeric",
|
|
3222
|
+
hour: "2-digit",
|
|
3223
|
+
minute: "2-digit",
|
|
3224
|
+
hour12: t
|
|
3225
|
+
};
|
|
3226
|
+
return new Date(e).toLocaleDateString("es-ES", n);
|
|
3227
|
+
}
|
|
3228
|
+
static formatDateTimeLong(e, t = !0) {
|
|
3229
|
+
if (!e) return "No se proporciono fecha valida.";
|
|
3230
|
+
let n = {
|
|
3231
|
+
year: "numeric",
|
|
3232
|
+
month: "long",
|
|
3233
|
+
day: "numeric",
|
|
3234
|
+
hour: "2-digit",
|
|
3235
|
+
minute: "2-digit",
|
|
3236
|
+
hour12: t
|
|
3237
|
+
};
|
|
3238
|
+
return new Date(e).toLocaleDateString("es-ES", n);
|
|
3239
|
+
}
|
|
3216
3240
|
static getDateTimeNow() {
|
|
3217
3241
|
return (/* @__PURE__ */ new Date()).toLocaleString("sv-SE", { timeZone: "America/Mexico_City" }).replace(" ", "T");
|
|
3218
3242
|
}
|
|
@@ -3309,7 +3333,7 @@ function Qa(e, t) {
|
|
|
3309
3333
|
function $a(e, t) {
|
|
3310
3334
|
return t ? e ? "bg-white translate-x-5" : "bg-gray-300 translate-x-1" : e ? "bg-white translate-x-5" : "bg-gray-400 translate-x-1";
|
|
3311
3335
|
}
|
|
3312
|
-
var eo = "bg-white hover:bg-indigo-50 border border-gray-200 px-2.5 py-2 cursor-pointer disabled:bg-gray-100 disabled:text-gray-400 disabled:cursor-not-allowed disabled:border-gray-200", to = "text-sm text-gray-700", no = `${eo} rounded-l-lg border-r-0`, ro = `${eo} rounded-r-lg border-l-0`, io = "border px-2.5 py-2 cursor-pointer w-8 relative", ao = "#6366F1", oo = "text-gray-600 text-lg font-medium", so = "flex items-center justify-center gap-3 px-4 py-2 border-2 rounded-xl transition w-full cursor-pointer disabled:cursor-not-allowed disabled:opacity-80", co = "border-gray-200 bg-white text-gray-700 hover:border-indigo-200 hover:bg-indigo-50", lo = "border-gray-200 bg-gray-100 text-gray-400", uo = "bg-indigo-300", fo = "bg-emerald-500", po = "bg-gray-300", mo = "absolute z-20 left-0 top-full rounded-md bg-white", ho = "
|
|
3336
|
+
var eo = "bg-white hover:bg-indigo-50 border border-gray-200 px-2.5 py-2 cursor-pointer disabled:bg-gray-100 disabled:text-gray-400 disabled:cursor-not-allowed disabled:border-gray-200", to = "text-sm text-gray-700", no = `${eo} rounded-l-lg border-r-0`, ro = `${eo} rounded-r-lg border-l-0`, io = "border px-2.5 py-2 cursor-pointer w-8 relative", ao = "#6366F1", oo = "text-gray-600 text-lg font-medium", so = "flex items-center justify-center gap-3 px-4 py-2 border-2 rounded-xl transition w-full cursor-pointer disabled:cursor-not-allowed disabled:opacity-80", co = "border-gray-200 bg-white text-gray-700 hover:border-indigo-200 hover:bg-indigo-50", lo = "border-gray-200 bg-gray-100 text-gray-400", uo = "bg-indigo-300", fo = "bg-emerald-500", po = "bg-gray-300", mo = "absolute z-20 left-0 top-full rounded-md bg-white border border-gray-200 shadow-lg", ho = "rounded-md p-1.5", go = "h-30 overflow-y-auto border border-gray-200 rounded-md [&::-webkit-scrollbar]:w-0 [scrollbar-width:none]", _o = "h-30 overflow-y-auto border border-gray-200 rounded-md flex flex-col justify-center", vo = "block text-xs font-semibold text-gray-500 mb-1 text-center", yo = "px-3 py-1 text-center text-xs font-medium text-gray-700 rounded cursor-pointer hover:bg-indigo-100 hover:text-gray-600 transition-colors duration-150";
|
|
3313
3337
|
function bo(e) {
|
|
3314
3338
|
return e ? "bg-indigo-500 text-white font-medium" : "";
|
|
3315
3339
|
}
|
|
@@ -4376,15 +4400,15 @@ var Yo = /*#__PURE__*/ $(Ho, [["render", Jo], ["__scopeId", "data-v-756569d8"]])
|
|
|
4376
4400
|
if (this.nested) return;
|
|
4377
4401
|
let e = this.$refs.inputWrap;
|
|
4378
4402
|
if (!e) return;
|
|
4379
|
-
let t = e.getBoundingClientRect(), n =
|
|
4380
|
-
|
|
4381
|
-
let
|
|
4403
|
+
let t = e.getBoundingClientRect(), n = window.innerHeight - t.bottom, r = t.top, i = n < 220 && r > n, a = t.left;
|
|
4404
|
+
a + 224 > window.innerWidth - 8 && (a = Math.max(8, t.right - 224));
|
|
4405
|
+
let o = {
|
|
4382
4406
|
position: "fixed",
|
|
4383
|
-
left: `${
|
|
4384
|
-
width:
|
|
4407
|
+
left: `${a}px`,
|
|
4408
|
+
width: "224px",
|
|
4385
4409
|
zIndex: 9999
|
|
4386
4410
|
};
|
|
4387
|
-
|
|
4411
|
+
i ? o.bottom = `${window.innerHeight - t.top}px` : o.top = `${t.bottom}px`, this.dropdownStyle = o;
|
|
4388
4412
|
},
|
|
4389
4413
|
togglePicker() {
|
|
4390
4414
|
this.disabled || (this.nested ? this.calculateDropdownPosition() : this.positionDropdown(), this.showPicker = !this.showPicker, this.showPicker && this.scrollToSelected());
|
|
@@ -4491,7 +4515,7 @@ function cs(n, r, u, d, f, _) {
|
|
|
4491
4515
|
}, y(u.description), 3)) : a("", !0)
|
|
4492
4516
|
], 512);
|
|
4493
4517
|
}
|
|
4494
|
-
var ls = /*#__PURE__*/ $(Xo, [["render", cs], ["__scopeId", "data-v-
|
|
4518
|
+
var ls = /*#__PURE__*/ $(Xo, [["render", cs], ["__scopeId", "data-v-f9c04d0f"]]), us = {
|
|
4495
4519
|
day: [0, 2],
|
|
4496
4520
|
month: [3, 5],
|
|
4497
4521
|
year: [6, 10],
|
|
@@ -6071,12 +6095,15 @@ var Lc = /*#__PURE__*/ $(jc, [["render", Ic]]), Rc = {
|
|
|
6071
6095
|
}
|
|
6072
6096
|
}, zc = {
|
|
6073
6097
|
key: 0,
|
|
6074
|
-
class: "fixed inset-0 bg-black/30 backdrop-blur-xs flex items-center justify-center z-100 p-4
|
|
6075
|
-
}, Bc = { class: "p-4 border-b border-gray-200 flex items-center justify-between gap-2" }, Vc =
|
|
6098
|
+
class: "fixed inset-0 bg-black/30 backdrop-blur-xs flex items-center justify-center z-100 p-4"
|
|
6099
|
+
}, Bc = { class: "p-4 border-b border-gray-200 flex items-center justify-between gap-2" }, Vc = {
|
|
6100
|
+
key: 0,
|
|
6101
|
+
class: "flex-1 min-w-0"
|
|
6102
|
+
}, Hc = ["title"], Uc = { class: "p-4 overflow-y-auto flex-1" }, Wc = {
|
|
6076
6103
|
key: 0,
|
|
6077
|
-
class: "p-4 border-t border-gray-200"
|
|
6104
|
+
class: "p-4 border-t border-gray-200 select-none"
|
|
6078
6105
|
};
|
|
6079
|
-
function
|
|
6106
|
+
function Gc(e, r, c, u, d, f) {
|
|
6080
6107
|
let m = v("font-awesome-icon");
|
|
6081
6108
|
return h(), i(t, { to: "body" }, [l(n, {
|
|
6082
6109
|
"enter-active-class": "transition-opacity duration-300",
|
|
@@ -6095,24 +6122,24 @@ function Wc(e, r, c, u, d, f) {
|
|
|
6095
6122
|
class: p(["bg-white rounded-lg shadow-2xl max-h-[90vh] flex flex-col w-full", f.sizeClass]),
|
|
6096
6123
|
onClick: r[1] ||= S(() => {}, ["stop"])
|
|
6097
6124
|
}, [
|
|
6098
|
-
s("div", Bc, [_(e.$slots, "title", {}, () => [s("h3", {
|
|
6125
|
+
s("div", Bc, [e.$slots.header ? (h(), o("div", Vc, [_(e.$slots, "header", { close: f.handleClose })])) : _(e.$slots, "title", { key: 1 }, () => [s("h3", {
|
|
6099
6126
|
class: "text-lg font-semibold text-gray-700 flex-1 min-w-0 truncate",
|
|
6100
6127
|
title: c.title
|
|
6101
|
-
}, y(c.title), 9,
|
|
6102
|
-
key:
|
|
6128
|
+
}, y(c.title), 9, Hc)]), c.showCloseButton ? (h(), o("button", {
|
|
6129
|
+
key: 2,
|
|
6103
6130
|
onClick: r[0] ||= (...e) => f.handleClose && f.handleClose(...e),
|
|
6104
6131
|
type: "button",
|
|
6105
6132
|
class: "text-gray-400 hover:text-gray-600 transition-colors px-1.5 py-1 rounded-lg hover:bg-gray-100 shrink-0 cursor-pointer"
|
|
6106
6133
|
}, [l(m, { icon: "fa-solid fa-xmark" })])) : a("", !0)]),
|
|
6107
|
-
s("div",
|
|
6108
|
-
e.$slots.footer ? (h(), o("div",
|
|
6134
|
+
s("div", Uc, [_(e.$slots, "default", { close: f.handleClose })]),
|
|
6135
|
+
e.$slots.footer ? (h(), o("div", Wc, [_(e.$slots, "footer", { close: f.handleClose })])) : a("", !0)
|
|
6109
6136
|
], 2)) : a("", !0)]),
|
|
6110
6137
|
_: 3
|
|
6111
6138
|
})])) : a("", !0)]),
|
|
6112
6139
|
_: 3
|
|
6113
6140
|
})]);
|
|
6114
6141
|
}
|
|
6115
|
-
var
|
|
6142
|
+
var Kc = /*#__PURE__*/ $(Rc, [["render", Gc]]), qc = {
|
|
6116
6143
|
name: "SelectStyle",
|
|
6117
6144
|
props: {
|
|
6118
6145
|
modelValue: [
|
|
@@ -6385,21 +6412,21 @@ var Gc = /*#__PURE__*/ $(Rc, [["render", Wc]]), Kc = {
|
|
|
6385
6412
|
beforeUnmount() {
|
|
6386
6413
|
document.removeEventListener("mousedown", this.handleClickOutside), window.removeEventListener("scroll", this.onScrollReposition, !0), window.removeEventListener("resize", this.schedulePosition), this.positionRaf && cancelAnimationFrame(this.positionRaf);
|
|
6387
6414
|
}
|
|
6388
|
-
},
|
|
6415
|
+
}, Jc = {
|
|
6389
6416
|
class: "w-full",
|
|
6390
6417
|
ref: "selectContainer"
|
|
6391
|
-
},
|
|
6392
|
-
function
|
|
6418
|
+
}, Yc = ["for"], Xc = { class: "relative" }, Zc = ["id", "value"], Qc = ["data-index", "onClick"];
|
|
6419
|
+
function $c(n, r, u, d, f, _) {
|
|
6393
6420
|
let b = v("font-awesome-icon");
|
|
6394
|
-
return h(), o("div",
|
|
6421
|
+
return h(), o("div", Jc, [
|
|
6395
6422
|
s("label", {
|
|
6396
6423
|
class: p(_.labelClass),
|
|
6397
6424
|
for: f.uuid
|
|
6398
6425
|
}, [c(y(u.label) + " ", 1), u.required ? (h(), o("span", {
|
|
6399
6426
|
key: 0,
|
|
6400
6427
|
class: p(_.requiredClass)
|
|
6401
|
-
}, "*", 2)) : a("", !0)], 10,
|
|
6402
|
-
s("div",
|
|
6428
|
+
}, "*", 2)) : a("", !0)], 10, Yc),
|
|
6429
|
+
s("div", Xc, [
|
|
6403
6430
|
s("div", {
|
|
6404
6431
|
class: "relative group",
|
|
6405
6432
|
ref: "inputWrap",
|
|
@@ -6411,7 +6438,7 @@ function Qc(n, r, u, d, f, _) {
|
|
|
6411
6438
|
value: _.selectedText,
|
|
6412
6439
|
class: p(_.inputClass),
|
|
6413
6440
|
onKeydown: r[0] ||= (...e) => _.handleKeydown && _.handleKeydown(...e)
|
|
6414
|
-
}, null, 42,
|
|
6441
|
+
}, null, 42, Zc), l(b, {
|
|
6415
6442
|
icon: "fa-solid fa-chevron-down",
|
|
6416
6443
|
class: p([_.iconStaticClass, "absolute right-3 top-1/2 -translate-y-1/2 pointer-events-none"])
|
|
6417
6444
|
}, null, 8, ["class"])], 512),
|
|
@@ -6428,7 +6455,7 @@ function Qc(n, r, u, d, f, _) {
|
|
|
6428
6455
|
"data-index": e.index,
|
|
6429
6456
|
onClick: (t) => _.selectOption(e.item),
|
|
6430
6457
|
class: p(_.getOptionClass(e.item, e.index))
|
|
6431
|
-
}, y(e.item.text), 11,
|
|
6458
|
+
}, y(e.item.text), 11, Qc))), 128))], 64))), 128)), _.items.length === 0 ? (h(), o("li", {
|
|
6432
6459
|
key: 0,
|
|
6433
6460
|
class: p(_.emptyClass)
|
|
6434
6461
|
}, "Sin registros", 2)) : a("", !0)], 6)) : a("", !0)])),
|
|
@@ -6443,7 +6470,7 @@ function Qc(n, r, u, d, f, _) {
|
|
|
6443
6470
|
}, y(u.description), 3)) : a("", !0)
|
|
6444
6471
|
], 512);
|
|
6445
6472
|
}
|
|
6446
|
-
var
|
|
6473
|
+
var el = /*#__PURE__*/ $(qc, [["render", $c]]), tl = {
|
|
6447
6474
|
name: "TextAreaStyle",
|
|
6448
6475
|
props: {
|
|
6449
6476
|
modelValue: {
|
|
@@ -6519,21 +6546,21 @@ var $c = /*#__PURE__*/ $(Kc, [["render", Qc]]), el = {
|
|
|
6519
6546
|
methods: { emitBlur(e) {
|
|
6520
6547
|
this.$emit("blur", e);
|
|
6521
6548
|
} }
|
|
6522
|
-
},
|
|
6549
|
+
}, nl = { class: "w-full" }, rl = ["for"], il = [
|
|
6523
6550
|
"id",
|
|
6524
6551
|
"placeholder",
|
|
6525
6552
|
"maxlength",
|
|
6526
6553
|
"rows"
|
|
6527
6554
|
];
|
|
6528
|
-
function
|
|
6529
|
-
return h(), o("div",
|
|
6555
|
+
function al(e, t, n, r, i, l) {
|
|
6556
|
+
return h(), o("div", nl, [
|
|
6530
6557
|
s("label", {
|
|
6531
6558
|
class: p(l.labelClass),
|
|
6532
6559
|
for: i.uuid
|
|
6533
6560
|
}, [c(y(n.label) + " ", 1), n.required ? (h(), o("span", {
|
|
6534
6561
|
key: 0,
|
|
6535
6562
|
class: p(l.requiredClass)
|
|
6536
|
-
}, "*", 2)) : a("", !0)], 10,
|
|
6563
|
+
}, "*", 2)) : a("", !0)], 10, rl),
|
|
6537
6564
|
x(s("textarea", f({
|
|
6538
6565
|
"onUpdate:modelValue": t[0] ||= (e) => l.model = e,
|
|
6539
6566
|
id: i.uuid,
|
|
@@ -6546,14 +6573,14 @@ function il(e, t, n, r, i, l) {
|
|
|
6546
6573
|
maxlength: n.maxlength ? Number(n.maxlength) : null,
|
|
6547
6574
|
rows: Number(n.row),
|
|
6548
6575
|
class: [l.inputClass, "resize-none"]
|
|
6549
|
-
}), null, 16,
|
|
6576
|
+
}), null, 16, il), [[te, l.model]]),
|
|
6550
6577
|
n.description ? (h(), o("span", {
|
|
6551
6578
|
key: 0,
|
|
6552
6579
|
class: p(l.descriptionClass)
|
|
6553
6580
|
}, y(n.description), 3)) : a("", !0)
|
|
6554
6581
|
]);
|
|
6555
6582
|
}
|
|
6556
|
-
var
|
|
6583
|
+
var ol = /*#__PURE__*/ $(tl, [["render", al]]), sl = {
|
|
6557
6584
|
name: "PaginationStyle",
|
|
6558
6585
|
props: {
|
|
6559
6586
|
totalPages: {
|
|
@@ -6637,33 +6664,33 @@ var al = /*#__PURE__*/ $(el, [["render", il]]), ol = {
|
|
|
6637
6664
|
this.$emit("page", e);
|
|
6638
6665
|
}
|
|
6639
6666
|
}
|
|
6640
|
-
},
|
|
6641
|
-
function
|
|
6642
|
-
return h(), o("div",
|
|
6667
|
+
}, cl = { class: "flex flex-col items-center justify-center text-gray-700" }, ll = { class: "flex justify-center text-xs" }, ul = ["disabled"], dl = ["onClick", "disabled"], fl = ["disabled"];
|
|
6668
|
+
function pl(t, n, r, i, c, l) {
|
|
6669
|
+
return h(), o("div", cl, [s("div", ll, [
|
|
6643
6670
|
s("button", {
|
|
6644
6671
|
type: "button",
|
|
6645
6672
|
disabled: r.actualPage === 1,
|
|
6646
6673
|
onClick: n[0] ||= (e) => l.beforePage(),
|
|
6647
6674
|
class: p(l.navPrevClass)
|
|
6648
|
-
}, " Anterior ", 10,
|
|
6675
|
+
}, " Anterior ", 10, ul),
|
|
6649
6676
|
(h(!0), o(e, null, g(l.visiblePages, (e, t) => (h(), o("button", {
|
|
6650
6677
|
key: t,
|
|
6651
6678
|
onClick: (t) => e !== "..." && l.currentPage(e),
|
|
6652
6679
|
disabled: e === "...",
|
|
6653
6680
|
class: p(l.getPageClass(e, t))
|
|
6654
|
-
}, y(e), 11,
|
|
6681
|
+
}, y(e), 11, dl))), 128)),
|
|
6655
6682
|
s("button", {
|
|
6656
6683
|
type: "button",
|
|
6657
6684
|
disabled: r.actualPage === r.totalPages,
|
|
6658
6685
|
onClick: n[1] ||= (e) => l.nextPage(),
|
|
6659
6686
|
class: p(l.navNextClass)
|
|
6660
|
-
}, " Siguiente ", 10,
|
|
6687
|
+
}, " Siguiente ", 10, fl)
|
|
6661
6688
|
]), r.summary ? (h(), o("span", {
|
|
6662
6689
|
key: 0,
|
|
6663
6690
|
class: p(l.summaryClass)
|
|
6664
6691
|
}, y(`Mostrando ${l.start} - ${l.end} de ${r.records}`), 3)) : a("", !0)]);
|
|
6665
6692
|
}
|
|
6666
|
-
var
|
|
6693
|
+
var ml = /*#__PURE__*/ $(sl, [["render", pl]]), hl = [
|
|
6667
6694
|
So,
|
|
6668
6695
|
Co,
|
|
6669
6696
|
Yo,
|
|
@@ -6679,14 +6706,14 @@ var pl = /*#__PURE__*/ $(ol, [["render", fl]]), ml = [
|
|
|
6679
6706
|
bc,
|
|
6680
6707
|
Ac,
|
|
6681
6708
|
Lc,
|
|
6682
|
-
|
|
6683
|
-
|
|
6684
|
-
|
|
6685
|
-
|
|
6686
|
-
],
|
|
6687
|
-
t.styles && xo(t.styles), e.component("font-awesome-icon", Ca),
|
|
6709
|
+
Kc,
|
|
6710
|
+
el,
|
|
6711
|
+
ol,
|
|
6712
|
+
ml
|
|
6713
|
+
], gl = { install(e, t = {}) {
|
|
6714
|
+
t.styles && xo(t.styles), e.component("font-awesome-icon", Ca), hl.forEach((t) => {
|
|
6688
6715
|
e.component(t.name, t);
|
|
6689
6716
|
}), e.config.globalProperties.$utilstyle = Z, e.config.globalProperties.$alertstyle = So, e.config.globalProperties.$dialogstyle = Co;
|
|
6690
6717
|
} };
|
|
6691
6718
|
//#endregion
|
|
6692
|
-
export { So as AlertStyle, dc as ButtonStyle, Co as DialogStyle, Ys as InputCheckStyle, Yo as InputDateStyle, bs as InputDateTimeStyle, bc as InputFileDownloadStyle, Ac as InputFileUploadStyle, As as InputNumberStyle, Ls as InputPasswordStyle, tc as InputRadioStyle, sc as InputSwitchStyle, Us as InputTextStyle, ls as InputTimeStyle, Lc as LoaderStyle,
|
|
6719
|
+
export { So as AlertStyle, dc as ButtonStyle, Co as DialogStyle, Ys as InputCheckStyle, Yo as InputDateStyle, bs as InputDateTimeStyle, bc as InputFileDownloadStyle, Ac as InputFileUploadStyle, As as InputNumberStyle, Ls as InputPasswordStyle, tc as InputRadioStyle, sc as InputSwitchStyle, Us as InputTextStyle, ls as InputTimeStyle, Lc as LoaderStyle, Kc as ModalStyle, ml as PaginationStyle, el as SelectStyle, ol as TextAreaStyle, xo as configureStyles, gl as default };
|
package/dist/input-yuc.umd.js
CHANGED
|
@@ -556,7 +556,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
556
556
|
`);t.setAttribute(D,``),t.innerHTML=a}};function Mr(e){e()}function Nr(e,t){var n=typeof t==`function`?t:Sr;if(e.length===0)n();else{var r=Mr;j.mutateApproach===jt&&(r=S.requestAnimationFrame||Mr),r(function(){var t=Er(),r=xr.begin(`mutate`);e.map(t),r(),n()})}}var Pr=!1;function Fr(){Pr=!0}function Ir(){Pr=!1}var Lr=null;function Rr(e){if(se&&j.observeMutations){var t=e.treeCallback,n=t===void 0?Sr:t,r=e.nodeCallback,i=r===void 0?Sr:r,a=e.pseudoElementsCallback,o=a===void 0?Sr:a,s=e.observeMutationsRoot,c=s===void 0?C:s;Lr=new se(function(e){if(!Pr){var t=V();F(e).forEach(function(e){if(e.type===`childList`&&e.addedNodes.length>0&&!Cr(e.addedNodes[0])&&(j.searchPseudoElements&&o(e.target),n(e.target)),e.type===`attributes`&&e.target.parentNode&&j.searchPseudoElements&&o([e.target],!0),e.type===`attributes`&&Cr(e.target)&&~Gt.indexOf(e.attributeName))if(e.attributeName===`class`&&wr(e.target)){var r=Kn(tn(e.target)),a=r.prefix,s=r.iconName;e.target.setAttribute(Ot,a||t),s&&e.target.setAttribute(kt,s)}else Tr(e.target)&&i(e.target)})}}),w&&Lr.observe(c,{childList:!0,attributes:!0,characterData:!0,subtree:!0})}}function zr(){Lr&&Lr.disconnect()}function Br(e){var t=e.getAttribute(`style`),n=[];return t&&(n=t.split(`;`).reduce(function(e,t){var n=t.split(`:`),r=n[0],i=n.slice(1);return r&&i.length>0&&(e[r]=i.join(`:`).trim()),e},{})),n}function Vr(e){var t=e.getAttribute(`data-prefix`),n=e.getAttribute(`data-icon`),r=e.innerText===void 0?``:e.innerText.trim(),i=Kn(tn(e));return i.prefix||=V(),t&&n&&(i.prefix=t,i.iconName=n),i.iconName&&i.prefix?i:(i.prefix&&r.length>0&&(i.iconName=Ln(i.prefix,e.innerText)||In(i.prefix,xn(e.innerText))),!i.iconName&&j.autoFetchSvg&&e.firstChild&&e.firstChild.nodeType===Node.TEXT_NODE&&(i.iconName=e.firstChild.data),i)}function Hr(e){return F(e.attributes).reduce(function(e,t){return e.name!==`class`&&e.name!==`style`&&(e[t.name]=t.value),e},{})}function Ur(){return{iconName:null,prefix:null,transform:P,symbol:!1,mask:{iconName:null,prefix:null,rest:[]},maskId:null,extra:{classes:[],styles:{},attributes:{}}}}function Wr(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{styleParser:!0},n=Vr(e),r=n.iconName,i=n.prefix,a=n.rest,o=Hr(e),s=tr(`parseNodeAttributes`,{},e);return h({iconName:r,prefix:i,transform:P,mask:{iconName:null,prefix:null,rest:[]},maskId:null,symbol:!1,extra:{classes:a,styles:t.styleParser?Br(e):[],attributes:o}},s)}var Gr=L.styles;function Kr(e){var t=j.autoReplaceSvg===`nest`?Wr(e,{styleParser:!1}):Wr(e);return~t.extra.classes.indexOf(Ut)?G(`generateLayersText`,e,t):G(`generateSvgReplacementMutation`,e,t)}function qr(){return[].concat(_(it),_(_t))}function Jr(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;if(!w)return Promise.resolve();var n=C.documentElement.classList,r=function(e){return n.add(`${At}-${e}`)},i=function(e){return n.remove(`${At}-${e}`)},a=j.autoFetchSvg?qr():he.concat(Object.keys(Gr));a.includes(`fa`)||a.push(`fa`);var o=[`.${Ut}:not([${D}])`].concat(a.map(function(e){return`.${e}:not([${D}])`})).join(`, `);if(o.length===0)return Promise.resolve();var s=[];try{s=F(e.querySelectorAll(o))}catch{}if(s.length>0)r(`pending`),i(`complete`);else return Promise.resolve();var c=xr.begin(`onTree`),l=s.reduce(function(e,t){try{var n=Kr(t);n&&e.push(n)}catch(e){Pt||e.name===`MissingIcon`&&console.error(e)}return e},[]);return new Promise(function(e,n){Promise.all(l).then(function(n){Nr(n,function(){r(`active`),r(`complete`),i(`pending`),typeof t==`function`&&t(),c(),e()})}).catch(function(e){c(),n(e)})})}function Yr(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;Kr(e).then(function(e){e&&Nr([e],t)})}function Xr(e){return function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=(t||{}).icon?t:nr(t||{}),i=n.mask;return i&&=(i||{}).icon?i:nr(i||{}),e(r,h(h({},n),{},{mask:i}))}}var Zr=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=t.transform,r=n===void 0?P:n,i=t.symbol,a=i===void 0?!1:i,o=t.mask,s=o===void 0?null:o,c=t.maskId,l=c===void 0?null:c,u=t.classes,d=u===void 0?[]:u,f=t.attributes,p=f===void 0?{}:f,m=t.styles,g=m===void 0?{}:m;if(e){var _=e.prefix,v=e.iconName,y=e.icon;return ar(h({type:`icon`},e),function(){return W(`beforeDOMElementCreation`,{iconDefinition:e,params:t}),lr({icons:{main:pr(y),mask:s?pr(s.icon):{found:!1,width:null,height:null,icon:{}}},prefix:_,iconName:v,transform:h(h({},P),r),symbol:a,maskId:l,extra:{attributes:p,styles:g,classes:d}})})}},Qr={mixout:function(){return{icon:Xr(Zr)}},hooks:function(){return{mutationObserverCallbacks:function(e){return e.treeCallback=Jr,e.nodeCallback=Yr,e}}},provides:function(e){e.i2svg=function(e){var t=e.node,n=t===void 0?C:t,r=e.callback;return Jr(n,r===void 0?function(){}:r)},e.generateSvgReplacementMutation=function(e,t){var n=t.iconName,r=t.prefix,i=t.transform,a=t.symbol,o=t.mask,s=t.maskId,c=t.extra;return new Promise(function(t,l){Promise.all([gr(n,r),o.iconName?gr(o.iconName,o.prefix):Promise.resolve({found:!1,width:512,height:512,icon:{}})]).then(function(o){var l=g(o,2),u=l[0],d=l[1];t([e,lr({icons:{main:u,mask:d},prefix:r,iconName:n,transform:i,symbol:a,maskId:s,extra:c,watchable:!0})])}).catch(l)})},e.generateAbstractIcon=function(e){var t=e.children,n=e.attributes,r=e.main,i=e.transform,a=e.styles,o=an(a);o.length>0&&(n.style=o);var s;return on(i)&&(s=G(`generateAbstractTransformGrouping`,{main:r,transform:i,containerWidth:r.width,iconWidth:r.width})),t.push(s||r.icon),{children:t,attributes:n}}}},$r={mixout:function(){return{layer:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=t.classes,r=n===void 0?[]:n;return ar({type:`layer`},function(){W(`beforeDOMElementCreation`,{assembler:e,params:t});var n=[];return e(function(e){Array.isArray(e)?e.map(function(e){n=n.concat(e.abstract)}):n=n.concat(e.abstract)}),[{tag:`span`,attributes:{class:[`${j.cssPrefix}-layers`].concat(_(r)).join(` `)},children:n}]})}}}},ei={mixout:function(){return{counter:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=t.title,r=n===void 0?null:n,i=t.classes,a=i===void 0?[]:i,o=t.attributes,s=o===void 0?{}:o,c=t.styles,l=c===void 0?{}:c;return ar({type:`counter`,content:e},function(){return W(`beforeDOMElementCreation`,{content:e,params:t}),dr({content:e.toString(),title:r,extra:{attributes:s,styles:l,classes:[`${j.cssPrefix}-layers-counter`].concat(_(a))}})})}}}},ti={mixout:function(){return{text:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=t.transform,r=n===void 0?P:n,i=t.classes,a=i===void 0?[]:i,o=t.attributes,s=o===void 0?{}:o,c=t.styles,l=c===void 0?{}:c;return ar({type:`text`,content:e},function(){return W(`beforeDOMElementCreation`,{content:e,params:t}),ur({content:e,transform:h(h({},P),r),extra:{attributes:s,styles:l,classes:[`${j.cssPrefix}-layers-text`].concat(_(a))}})})}}},provides:function(e){e.generateLayersText=function(e,t){var n=t.transform,r=t.extra,i=null,a=null;if(le){var o=parseInt(getComputedStyle(e).fontSize,10),s=e.getBoundingClientRect();i=s.width/o,a=s.height/o}return Promise.resolve([e,ur({content:e.innerHTML,width:i,height:a,transform:n,extra:r,watchable:!0})])}}},ni=RegExp(`"`,`ug`),ri=[1105920,1112319],ii=h(h(h(h({},{FontAwesome:{normal:`fas`,400:`fas`}}),tt),St),ct),ai=Object.keys(ii).reduce(function(e,t){return e[t.toLowerCase()]=ii[t],e},{}),oi=Object.keys(ai).reduce(function(e,t){var n=ai[t];return e[t]=n[900]||_(Object.entries(n))[0][1],e},{});function si(e){return xn(_(e.replace(ni,``))[0]||``)}function ci(e){var t=e.getPropertyValue(`font-feature-settings`).includes(`ss01`),n=e.getPropertyValue(`content`).replace(ni,``),r=n.codePointAt(0),i=r>=ri[0]&&r<=ri[1],a=n.length===2?n[0]===n[1]:!1;return i||a||t}function li(e,t){var n=e.replace(/^['"]|['"]$/g,``).toLowerCase(),r=parseInt(t),i=isNaN(r)?`normal`:r;return(ai[n]||{})[i]||oi[n]}function ui(e,t){var n=`${Dt}${t.replace(`:`,`-`)}`;return new Promise(function(r,i){if(e.getAttribute(n)!==null)return r();var a=F(e.children).filter(function(e){return e.getAttribute(Et)===t})[0],o=S.getComputedStyle(e,t),s=o.getPropertyValue(`font-family`),c=s.match(Wt),l=o.getPropertyValue(`font-weight`),u=o.getPropertyValue(`content`);if(a&&!c)return e.removeChild(a),r();if(c&&u!==`none`&&u!==``){var d=o.getPropertyValue(`content`),f=li(s,l),p=si(d),m=c[0].startsWith(`FontAwesome`),g=ci(o),_=In(f,p),v=_;if(m){var y=zn(p);y.iconName&&y.prefix&&(_=y.iconName,f=y.prefix)}if(_&&!g&&(!a||a.getAttribute(Ot)!==f||a.getAttribute(kt)!==v)){e.setAttribute(n,v),a&&e.removeChild(a);var b=Ur(),x=b.extra;x.attributes[Et]=t,gr(_,f).then(function(i){var a=lr(h(h({},b),{},{icons:{main:i,mask:Bn()},prefix:f,iconName:v,extra:x,watchable:!0})),o=C.createElementNS(`http://www.w3.org/2000/svg`,`svg`);t===`::before`?e.insertBefore(o,e.firstChild):e.appendChild(o),o.outerHTML=a.map(function(e){return R(e)}).join(`
|
|
557
557
|
`),e.removeAttribute(n),r()}).catch(i)}else r()}else r()})}function di(e){return Promise.all([ui(e,`::before`),ui(e,`::after`)])}function fi(e){return e.parentNode!==document.head&&!~Mt.indexOf(e.tagName.toUpperCase())&&!e.getAttribute(Et)&&(!e.parentNode||e.parentNode.tagName!==`svg`)}var pi=function(e){return!!e&&Nt.some(function(t){return e.includes(t)})},mi=function(e){if(!e)return[];var t=new Set,n=e.split(/,(?![^()]*\))/).map(function(e){return e.trim()});n=n.flatMap(function(e){return e.includes(`(`)?e:e.split(`,`).map(function(e){return e.trim()})});var r=c(n),i;try{for(r.s();!(i=r.n()).done;){var a=i.value;if(pi(a)){var o=Nt.reduce(function(e,t){return e.replace(t,``)},a);o!==``&&o!==`*`&&t.add(o)}}}catch(e){r.e(e)}finally{r.f()}return t};function hi(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(w){var n;if(t)n=e;else if(j.searchPseudoElementsFullScan)n=e.querySelectorAll(`*`);else{var r=new Set,i=c(document.styleSheets),a;try{for(i.s();!(a=i.n()).done;){var o=a.value;try{var s=c(o.cssRules),l;try{for(s.s();!(l=s.n()).done;){var u=l.value,d=c(mi(u.selectorText)),f;try{for(d.s();!(f=d.n()).done;){var p=f.value;r.add(p)}}catch(e){d.e(e)}finally{d.f()}}}catch(e){s.e(e)}finally{s.f()}}catch(e){j.searchPseudoElementsWarnings&&console.warn(`Font Awesome: cannot parse stylesheet: ${o.href} (${e.message})
|
|
558
558
|
If it declares any Font Awesome CSS pseudo-elements, they will not be rendered as SVG icons. Add crossorigin="anonymous" to the <link>, enable searchPseudoElementsFullScan for slower but more thorough DOM parsing, or suppress this warning by setting searchPseudoElementsWarnings to false.`)}}}catch(e){i.e(e)}finally{i.f()}if(!r.size)return;var m=Array.from(r).join(`, `);try{n=e.querySelectorAll(m)}catch{}}return new Promise(function(e,t){var r=F(n).filter(fi).map(di),i=xr.begin(`searchPseudoElements`);Fr(),Promise.all(r).then(function(){i(),Ir(),e()}).catch(function(){i(),Ir(),t()})})}}var gi={hooks:function(){return{mutationObserverCallbacks:function(e){return e.pseudoElementsCallback=hi,e}}},provides:function(e){e.pseudoElements2svg=function(e){var t=e.node,n=t===void 0?C:t;j.searchPseudoElements&&hi(n)}}},_i=!1,vi={mixout:function(){return{dom:{unwatch:function(){Fr(),_i=!0}}}},hooks:function(){return{bootstrap:function(){Rr(tr(`mutationObserverCallbacks`,{}))},noAuto:function(){zr()},watch:function(e){var t=e.observeMutationsRoot;_i?Ir():Rr(tr(`mutationObserverCallbacks`,{observeMutationsRoot:t}))}}}},yi=function(e){return e.toLowerCase().split(` `).reduce(function(e,t){var n=t.toLowerCase().split(`-`),r=n[0],i=n.slice(1).join(`-`);if(r&&i===`h`)return e.flipX=!0,e;if(r&&i===`v`)return e.flipY=!0,e;if(i=parseFloat(i),isNaN(i))return e;switch(r){case`grow`:e.size+=i;break;case`shrink`:e.size-=i;break;case`left`:e.x-=i;break;case`right`:e.x+=i;break;case`up`:e.y-=i;break;case`down`:e.y+=i;break;case`rotate`:e.rotate+=i;break}return e},{size:16,x:0,y:0,flipX:!1,flipY:!1,rotate:0})},bi={mixout:function(){return{parse:{transform:function(e){return yi(e)}}}},hooks:function(){return{parseNodeAttributes:function(e,t){var n=t.getAttribute(`data-fa-transform`);return n&&(e.transform=yi(n)),e}}},provides:function(e){e.generateAbstractTransformGrouping=function(e){var t=e.main,n=e.transform,r=e.containerWidth,i=e.iconWidth,a={outer:{transform:`translate(${r/2} 256)`},inner:{transform:`${`translate(${n.x*32}, ${n.y*32}) `} ${`scale(${n.size/16*(n.flipX?-1:1)}, ${n.size/16*(n.flipY?-1:1)}) `} ${`rotate(${n.rotate} 0 0)`}`},path:{transform:`translate(${i/2*-1} -256)`}};return{tag:`g`,attributes:h({},a.outer),children:[{tag:`g`,attributes:h({},a.inner),children:[{tag:t.icon.tag,children:t.icon.children,attributes:h(h({},t.icon.attributes),a.path)}]}]}}}},xi={x:0,y:0,width:`100%`,height:`100%`};function Si(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;return e.attributes&&(e.attributes.fill||t)&&(e.attributes.fill=`black`),e}function Ci(e){return e.tag===`g`?e.children:[e]}er([pn,Qr,$r,ei,ti,gi,vi,bi,{hooks:function(){return{parseNodeAttributes:function(e,t){var n=t.getAttribute(`data-fa-mask`),r=n?Kn(n.split(` `).map(function(e){return e.trim()})):Bn();return r.prefix||=V(),e.mask=r,e.maskId=t.getAttribute(`data-fa-mask-id`),e}}},provides:function(e){e.generateAbstractMask=function(e){var t=e.children,n=e.attributes,r=e.main,i=e.mask,a=e.maskId,o=e.transform,s=r.width,c=r.icon,l=i.width,u=i.icon,d=sn({transform:o,containerWidth:l,iconWidth:s}),f={tag:`rect`,attributes:h(h({},xi),{},{fill:`white`})},p=c.children?{children:c.children.map(Si)}:{},m={tag:`g`,attributes:h({},d.inner),children:[Si(h({tag:c.tag,attributes:h(h({},c.attributes),d.path)},p))]},g={tag:`g`,attributes:h({},d.outer),children:[m]},_=`mask-${a||en()}`,v=`clip-${a||en()}`,y={tag:`mask`,attributes:h(h({},xi),{},{id:_,maskUnits:`userSpaceOnUse`,maskContentUnits:`userSpaceOnUse`}),children:[f,g]},b={tag:`defs`,children:[{tag:`clipPath`,attributes:{id:v},children:Ci(u)},y]};return t.push(b,{tag:`rect`,attributes:h({fill:`currentColor`,"clip-path":`url(#${v})`,mask:`url(#${_})`},xi)}),{children:t,attributes:n}}}},{provides:function(e){var t=!1;S.matchMedia&&(t=S.matchMedia(`(prefers-reduced-motion: reduce)`).matches),e.missingIconAbstract=function(){var e=[],n={fill:`currentColor`},r={attributeType:`XML`,repeatCount:`indefinite`,dur:`2s`};e.push({tag:`path`,attributes:h(h({},n),{},{d:`M156.5,447.7l-12.6,29.5c-18.7-9.5-35.9-21.2-51.5-34.9l22.7-22.7C127.6,430.5,141.5,440,156.5,447.7z M40.6,272H8.5 c1.4,21.2,5.4,41.7,11.7,61.1L50,321.2C45.1,305.5,41.8,289,40.6,272z M40.6,240c1.4-18.8,5.2-37,11.1-54.1l-29.5-12.6 C14.7,194.3,10,216.7,8.5,240H40.6z M64.3,156.5c7.8-14.9,17.2-28.8,28.1-41.5L69.7,92.3c-13.7,15.6-25.5,32.8-34.9,51.5 L64.3,156.5z M397,419.6c-13.9,12-29.4,22.3-46.1,30.4l11.9,29.8c20.7-9.9,39.8-22.6,56.9-37.6L397,419.6z M115,92.4 c13.9-12,29.4-22.3,46.1-30.4l-11.9-29.8c-20.7,9.9-39.8,22.6-56.8,37.6L115,92.4z M447.7,355.5c-7.8,14.9-17.2,28.8-28.1,41.5 l22.7,22.7c13.7-15.6,25.5-32.9,34.9-51.5L447.7,355.5z M471.4,272c-1.4,18.8-5.2,37-11.1,54.1l29.5,12.6 c7.5-21.1,12.2-43.5,13.6-66.8H471.4z M321.2,462c-15.7,5-32.2,8.2-49.2,9.4v32.1c21.2-1.4,41.7-5.4,61.1-11.7L321.2,462z M240,471.4c-18.8-1.4-37-5.2-54.1-11.1l-12.6,29.5c21.1,7.5,43.5,12.2,66.8,13.6V471.4z M462,190.8c5,15.7,8.2,32.2,9.4,49.2h32.1 c-1.4-21.2-5.4-41.7-11.7-61.1L462,190.8z M92.4,397c-12-13.9-22.3-29.4-30.4-46.1l-29.8,11.9c9.9,20.7,22.6,39.8,37.6,56.9 L92.4,397z M272,40.6c18.8,1.4,36.9,5.2,54.1,11.1l12.6-29.5C317.7,14.7,295.3,10,272,8.5V40.6z M190.8,50 c15.7-5,32.2-8.2,49.2-9.4V8.5c-21.2,1.4-41.7,5.4-61.1,11.7L190.8,50z M442.3,92.3L419.6,115c12,13.9,22.3,29.4,30.5,46.1 l29.8-11.9C470,128.5,457.3,109.4,442.3,92.3z M397,92.4l22.7-22.7c-15.6-13.7-32.8-25.5-51.5-34.9l-12.6,29.5 C370.4,72.1,384.4,81.5,397,92.4z`})});var i=h(h({},r),{},{attributeName:`opacity`}),a={tag:`circle`,attributes:h(h({},n),{},{cx:`256`,cy:`364`,r:`28`}),children:[]};return t||a.children.push({tag:`animate`,attributes:h(h({},r),{},{attributeName:`r`,values:`28;14;28;28;14;28;`})},{tag:`animate`,attributes:h(h({},i),{},{values:`1;0;1;1;0;1;`})}),e.push(a),e.push({tag:`path`,attributes:h(h({},n),{},{opacity:`1`,d:`M263.7,312h-16c-6.6,0-12-5.4-12-12c0-71,77.4-63.9,77.4-107.8c0-20-17.8-40.2-57.4-40.2c-29.1,0-44.3,9.6-59.2,28.7 c-3.9,5-11.1,6-16.2,2.4l-13.1-9.2c-5.6-3.9-6.9-11.8-2.6-17.2c21.2-27.2,46.4-44.7,91.2-44.7c52.3,0,97.4,29.8,97.4,80.2 c0,67.6-77.4,63.5-77.4,107.8C275.7,306.6,270.3,312,263.7,312z`}),children:t?[]:[{tag:`animate`,attributes:h(h({},i),{},{values:`1;0;0;0;0;1;`})}]}),t||e.push({tag:`path`,attributes:h(h({},n),{},{opacity:`0`,d:`M232.5,134.5l7,168c0.3,6.4,5.6,11.5,12,11.5h9c6.4,0,11.7-5.1,12-11.5l7-168c0.3-6.8-5.2-12.5-12-12.5h-23 C237.7,122,232.2,127.7,232.5,134.5z`}),children:[{tag:`animate`,attributes:h(h({},i),{},{values:`0;0;1;1;0;0;`})}]}),{tag:`g`,attributes:{class:`missing`},children:e}}}},{hooks:function(){return{parseNodeAttributes:function(e,t){var n=t.getAttribute(`data-fa-symbol`);return e.symbol=n===null?!1:n===``?!0:n,e}}}}],{mixoutsTo:K}),K.noAuto;var wi=K.config,Ti=K.library;K.dom;var Ei=K.parse;K.findIconDefinition,K.toHtml;var Di=K.icon;K.layer;var Oi=K.text;K.counter;function ki(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function Ai(e){if(Array.isArray(e))return ki(e)}function J(e,t,n){return(t=Ri(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ji(e){if(typeof Symbol<`u`&&e[Symbol.iterator]!=null||e[`@@iterator`]!=null)return Array.from(e)}function Mi(){throw TypeError(`Invalid attempt to spread non-iterable instance.
|
|
559
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Ni(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Y(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?Ni(Object(n),!0).forEach(function(t){J(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ni(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Pi(e,t){if(e==null)return{};var n,r,i=Fi(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function Fi(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function Ii(e){return Ai(e)||ji(e)||Bi(e)||Mi()}function Li(e,t){if(typeof e!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function Ri(e){var t=Li(e,`string`);return typeof t==`symbol`?t:t+``}function zi(e){"@babel/helpers - typeof";return zi=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},zi(e)}function Bi(e,t){if(e){if(typeof e==`string`)return ki(e,t);var n={}.toString.call(e).slice(8,-1);return n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`?Array.from(e):n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?ki(e,t):void 0}}function X(e,t){return Array.isArray(t)&&t.length>0||!Array.isArray(t)&&t?J({},e,t):{}}function Vi(e){var t,n=(t={"fa-spin":e.spin,"fa-pulse":e.pulse,"fa-fw":e.fixedWidth,"fa-border":e.border,"fa-li":e.listItem,"fa-inverse":e.inverse,"fa-flip":e.flip===!0,"fa-flip-horizontal":e.flip===`horizontal`||e.flip===`both`,"fa-flip-vertical":e.flip===`vertical`||e.flip===`both`},J(J(J(J(J(J(J(J(J(J(t,`fa-${e.size}`,e.size!==null),`fa-rotate-${e.rotation}`,e.rotation!==null),`fa-rotate-by`,e.rotateBy),`fa-pull-${e.pull}`,e.pull!==null),`fa-swap-opacity`,e.swapOpacity),`fa-bounce`,e.bounce),`fa-shake`,e.shake),`fa-beat`,e.beat),`fa-fade`,e.fade),`fa-beat-fade`,e.beatFade),J(J(J(J(t,`fa-flash`,e.flash),`fa-spin-pulse`,e.spinPulse),`fa-spin-reverse`,e.spinReverse),`fa-width-auto`,e.widthAuto));return Object.keys(n).map(function(e){return n[e]?e:null}).filter(function(e){return e})}var Hi=typeof globalThis<`u`?globalThis:typeof window<`u`?window:typeof global<`u`?global:typeof self<`u`?self:{},Ui={exports:{}};(function(e){(function(t){var n=function(e,t,r){if(!l(t)||d(t)||f(t)||p(t)||c(t))return t;var i,a=0,o=0;if(u(t))for(i=[],o=t.length;a<o;a++)i.push(n(e,t[a],r));else for(var s in i={},t)Object.prototype.hasOwnProperty.call(t,s)&&(i[e(s,r)]=n(e,t[s],r));return i},r=function(e,t){t||={};var n=t.separator||`_`,r=t.split||/(?=[A-Z])/;return e.split(r).join(n)},i=function(e){return m(e)?e:(e=e.replace(/[\-_\s]+(.)?/g,function(e,t){return t?t.toUpperCase():``}),e.substr(0,1).toLowerCase()+e.substr(1))},a=function(e){var t=i(e);return t.substr(0,1).toUpperCase()+t.substr(1)},o=function(e,t){return r(e,t).toLowerCase()},s=Object.prototype.toString,c=function(e){return typeof e==`function`},l=function(e){return e===Object(e)},u=function(e){return s.call(e)==`[object Array]`},d=function(e){return s.call(e)==`[object Date]`},f=function(e){return s.call(e)==`[object RegExp]`},p=function(e){return s.call(e)==`[object Boolean]`},m=function(e){return e-=0,e===e},h=function(e,t){var n=t&&`process`in t?t.process:t;return typeof n==`function`?function(t,r){return n(t,e,r)}:e},g={camelize:i,decamelize:o,pascalize:a,depascalize:o,camelizeKeys:function(e,t){return n(h(i,t),e)},decamelizeKeys:function(e,t){return n(h(o,t),e,t)},pascalizeKeys:function(e,t){return n(h(a,t),e)},depascalizeKeys:function(){return this.decamelizeKeys.apply(this,arguments)}};e.exports?e.exports=g:t.humps=g})(Hi)})(Ui);var Wi=Ui.exports,Gi=[`class`,`style`];function Ki(e){return e.split(`;`).map(function(e){return e.trim()}).filter(function(e){return e}).reduce(function(e,t){var n=t.indexOf(`:`),r=Wi.camelize(t.slice(0,n));return e[r]=t.slice(n+1).trim(),e},{})}function qi(e){return e.split(/\s+/).reduce(function(e,t){return e[t]=!0,e},{})}function Ji(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};if(typeof e==`string`)return e;var i=(e.children||[]).map(function(e){return Ji(e)}),a=Object.keys(e.attributes||{}).reduce(function(t,n){var r=e.attributes[n];switch(n){case`class`:t.class=qi(r);break;case`style`:t.style=Ki(r);break;default:t.attrs[n]=r}return t},{attrs:{},class:{},style:{}});r.class;var o=r.style,s=o===void 0?{}:o,c=Pi(r,Gi);return(0,t.h)(e.tag,Y(Y(Y({},n),{},{class:a.class,style:Y(Y({},a.style),s)},a.attrs),c),i)}var Yi=!1;try{Yi=process.env.NODE_ENV===`production`}catch{}function Xi(){if(!Yi&&console&&typeof console.error==`function`){var e;(e=console).error.apply(e,arguments)}}function Zi(e){if(e&&zi(e)===`object`&&e.prefix&&e.iconName&&e.icon)return e;if(Ei.icon)return Ei.icon(e);if(e===null)return null;if(zi(e)===`object`&&e.prefix&&e.iconName)return e;if(Array.isArray(e)&&e.length===2)return{prefix:e[0],iconName:e[1]};if(typeof e==`string`)return{prefix:`fas`,iconName:e}}var Qi=(0,t.defineComponent)({name:`FontAwesomeIcon`,props:{border:{type:Boolean,default:!1},fixedWidth:{type:Boolean,default:!1},flip:{type:[Boolean,String],default:!1,validator:function(e){return[!0,!1,`horizontal`,`vertical`,`both`].indexOf(e)>-1}},icon:{type:[Object,Array,String],required:!0},mask:{type:[Object,Array,String],default:null},maskId:{type:String,default:null},listItem:{type:Boolean,default:!1},pull:{type:String,default:null,validator:function(e){return[`right`,`left`].indexOf(e)>-1}},pulse:{type:Boolean,default:!1},rotation:{type:[String,Number],default:null,validator:function(e){return[90,180,270].indexOf(Number.parseInt(e,10))>-1}},rotateBy:{type:Boolean,default:!1},swapOpacity:{type:Boolean,default:!1},size:{type:String,default:null,validator:function(e){return[`2xs`,`xs`,`sm`,`lg`,`xl`,`2xl`,`1x`,`2x`,`3x`,`4x`,`5x`,`6x`,`7x`,`8x`,`9x`,`10x`].indexOf(e)>-1}},spin:{type:Boolean,default:!1},transform:{type:[String,Object],default:null},symbol:{type:[Boolean,String],default:!1},title:{type:String,default:null},titleId:{type:String,default:null},inverse:{type:Boolean,default:!1},bounce:{type:Boolean,default:!1},shake:{type:Boolean,default:!1},beat:{type:Boolean,default:!1},fade:{type:Boolean,default:!1},beatFade:{type:Boolean,default:!1},flash:{type:Boolean,default:!1},spinPulse:{type:Boolean,default:!1},spinReverse:{type:Boolean,default:!1},widthAuto:{type:Boolean,default:!1}},setup:function(e,n){var r=n.attrs,i=(0,t.computed)(function(){return Zi(e.icon)}),a=(0,t.computed)(function(){return X(`classes`,Vi(e))}),o=(0,t.computed)(function(){return X(`transform`,typeof e.transform==`string`?Ei.transform(e.transform):e.transform)}),s=(0,t.computed)(function(){return X(`mask`,Zi(e.mask))}),c=(0,t.computed)(function(){var t=Y(Y(Y(Y({},a.value),o.value),s.value),{},{symbol:e.symbol,maskId:e.maskId});return t.title=e.title,t.titleId=e.titleId,Di(i.value,t)});(0,t.watch)(c,function(e){if(!e)return Xi(`Could not find one or more icon(s)`,i.value,s.value)},{immediate:!0});var l=(0,t.computed)(function(){return c.value?Ji(c.value.abstract[0],{},r):null});return function(){return l.value}}});(0,t.defineComponent)({name:`FontAwesomeLayers`,props:{fixedWidth:{type:Boolean,default:!1}},setup:function(e,n){var r=n.slots,i=wi.familyPrefix,a=(0,t.computed)(function(){return[`${i}-layers`].concat(Ii(e.fixedWidth?[`${i}-fw`]:[]))});return function(){return(0,t.h)(`div`,{class:a.value},r.default?r.default():[])}}}),(0,t.defineComponent)({name:`FontAwesomeLayersText`,props:{value:{type:[String,Number],default:``},transform:{type:[String,Object],default:null},counter:{type:Boolean,default:!1},position:{type:String,default:null,validator:function(e){return[`bottom-left`,`bottom-right`,`top-left`,`top-right`].indexOf(e)>-1}}},setup:function(e,n){var r=n.attrs,i=wi.familyPrefix,a=(0,t.computed)(function(){return X(`classes`,[].concat(Ii(e.counter?[`${i}-layers-counter`]:[]),Ii(e.position?[`${i}-layers-${e.position}`]:[])))}),o=(0,t.computed)(function(){return X(`transform`,typeof e.transform==`string`?Ei.transform(e.transform):e.transform)}),s=(0,t.computed)(function(){var t=Oi(e.value.toString(),Y(Y({},o.value),a.value)).abstract;return e.counter&&(t[0].attributes.class=t[0].attributes.class.replace(`fa-layers-text`,``)),t[0]}),c=(0,t.computed)(function(){return Ji(s.value,{},r)});return function(){return c.value}}}),Ti.add({prefix:`fas`,iconName:`circle-check`,icon:[512,512,[61533,`check-circle`],`f058`,`M256 512a256 256 0 1 1 0-512 256 256 0 1 1 0 512zM374 145.7c-10.7-7.8-25.7-5.4-33.5 5.3L221.1 315.2 169 263.1c-9.4-9.4-24.6-9.4-33.9 0s-9.4 24.6 0 33.9l72 72c5 5 11.8 7.5 18.8 7s13.4-4.1 17.5-9.8L379.3 179.2c7.8-10.7 5.4-25.7-5.3-33.5z`]},{prefix:`fas`,iconName:`circle-xmark`,icon:[512,512,[61532,`times-circle`,`xmark-circle`],`f057`,`M256 512a256 256 0 1 0 0-512 256 256 0 1 0 0 512zM167 167c9.4-9.4 24.6-9.4 33.9 0l55 55 55-55c9.4-9.4 24.6-9.4 33.9 0s9.4 24.6 0 33.9l-55 55 55 55c9.4 9.4 9.4 24.6 0 33.9s-24.6 9.4-33.9 0l-55-55-55 55c-9.4 9.4-24.6 9.4-33.9 0s-9.4-24.6 0-33.9l55-55-55-55c-9.4-9.4-9.4-24.6 0-33.9z`]},{prefix:`fas`,iconName:`circle-info`,icon:[512,512,[`info-circle`],`f05a`,`M256 512a256 256 0 1 0 0-512 256 256 0 1 0 0 512zM224 160a32 32 0 1 1 64 0 32 32 0 1 1 -64 0zm-8 64l48 0c13.3 0 24 10.7 24 24l0 88 8 0c13.3 0 24 10.7 24 24s-10.7 24-24 24l-80 0c-13.3 0-24-10.7-24-24s10.7-24 24-24l24 0 0-64-24 0c-13.3 0-24-10.7-24-24s10.7-24 24-24z`]},{prefix:`fas`,iconName:`circle-exclamation`,icon:[512,512,[`exclamation-circle`],`f06a`,`M256 512a256 256 0 1 1 0-512 256 256 0 1 1 0 512zm0-192a32 32 0 1 0 0 64 32 32 0 1 0 0-64zm0-192c-18.2 0-32.7 15.5-31.4 33.7l7.4 104c.9 12.6 11.4 22.3 23.9 22.3 12.6 0 23-9.7 23.9-22.3l7.4-104c1.3-18.2-13.1-33.7-31.4-33.7z`]},{prefix:`fas`,iconName:`triangle-exclamation`,icon:[512,512,[9888,`exclamation-triangle`,`warning`],`f071`,`M256 0c14.7 0 28.2 8.1 35.2 21l216 400c6.7 12.4 6.4 27.4-.8 39.5S486.1 480 472 480L40 480c-14.1 0-27.2-7.4-34.4-19.5s-7.5-27.1-.8-39.5l216-400c7-12.9 20.5-21 35.2-21zm0 352a32 32 0 1 0 0 64 32 32 0 1 0 0-64zm0-192c-18.2 0-32.7 15.5-31.4 33.7l7.4 104c.9 12.5 11.4 22.3 23.9 22.3 12.6 0 23-9.7 23.9-22.3l7.4-104c1.3-18.2-13.1-33.7-31.4-33.7z`]},{prefix:`fas`,iconName:`eye`,icon:[576,512,[128065],`f06e`,`M288 32c-80.8 0-145.5 36.8-192.6 80.6-46.8 43.5-78.1 95.4-93 131.1-3.3 7.9-3.3 16.7 0 24.6 14.9 35.7 46.2 87.7 93 131.1 47.1 43.7 111.8 80.6 192.6 80.6s145.5-36.8 192.6-80.6c46.8-43.5 78.1-95.4 93-131.1 3.3-7.9 3.3-16.7 0-24.6-14.9-35.7-46.2-87.7-93-131.1-47.1-43.7-111.8-80.6-192.6-80.6zM144 256a144 144 0 1 1 288 0 144 144 0 1 1 -288 0zm144-64c0 35.3-28.7 64-64 64-11.5 0-22.3-3-31.7-8.4-1 10.9-.1 22.1 2.9 33.2 13.7 51.2 66.4 81.6 117.6 67.9s81.6-66.4 67.9-117.6c-12.2-45.7-55.5-74.8-101.1-70.8 5.3 9.3 8.4 20.1 8.4 31.7z`]},{prefix:`fas`,iconName:`eye-slash`,icon:[576,512,[],`f070`,`M41-24.9c-9.4-9.4-24.6-9.4-33.9 0S-2.3-.3 7 9.1l528 528c9.4 9.4 24.6 9.4 33.9 0s9.4-24.6 0-33.9l-96.4-96.4c2.7-2.4 5.4-4.8 8-7.2 46.8-43.5 78.1-95.4 93-131.1 3.3-7.9 3.3-16.7 0-24.6-14.9-35.7-46.2-87.7-93-131.1-47.1-43.7-111.8-80.6-192.6-80.6-56.8 0-105.6 18.2-146 44.2L41-24.9zM204.5 138.7c23.5-16.8 52.4-26.7 83.5-26.7 79.5 0 144 64.5 144 144 0 31.1-9.9 59.9-26.7 83.5l-34.7-34.7c12.7-21.4 17-47.7 10.1-73.7-13.7-51.2-66.4-81.6-117.6-67.9-8.6 2.3-16.7 5.7-24 10l-34.7-34.7zM325.3 395.1c-11.9 3.2-24.4 4.9-37.3 4.9-79.5 0-144-64.5-144-144 0-12.9 1.7-25.4 4.9-37.3L69.4 139.2c-32.6 36.8-55 75.8-66.9 104.5-3.3 7.9-3.3 16.7 0 24.6 14.9 35.7 46.2 87.7 93 131.1 47.1 43.7 111.8 80.6 192.6 80.6 37.3 0 71.2-7.9 101.5-20.6l-64.2-64.2z`]},{prefix:`fas`,iconName:`calendar`,icon:[448,512,[128197,128198],`f133`,`M128 0C110.3 0 96 14.3 96 32l0 32-32 0C28.7 64 0 92.7 0 128l0 48 448 0 0-48c0-35.3-28.7-64-64-64l-32 0 0-32c0-17.7-14.3-32-32-32s-32 14.3-32 32l0 32-128 0 0-32c0-17.7-14.3-32-32-32zM0 224L0 416c0 35.3 28.7 64 64 64l320 0c35.3 0 64-28.7 64-64l0-192-448 0z`]},{prefix:`fas`,iconName:`clock`,icon:[512,512,[128339,`clock-four`],`f017`,`M256 0a256 256 0 1 1 0 512 256 256 0 1 1 0-512zM232 120l0 136c0 8 4 15.5 10.7 20l96 64c11 7.4 25.9 4.4 33.3-6.7s4.4-25.9-6.7-33.3L280 243.2 280 120c0-13.3-10.7-24-24-24s-24 10.7-24 24z`]},{prefix:`fas`,iconName:`chevron-down`,icon:[448,512,[],`f078`,`M201.4 406.6c12.5 12.5 32.8 12.5 45.3 0l192-192c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L224 338.7 54.6 169.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3l192 192z`]},{prefix:`fas`,iconName:`chevron-left`,icon:[320,512,[9001],`f053`,`M9.4 233.4c-12.5 12.5-12.5 32.8 0 45.3l192 192c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L77.3 256 246.6 86.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0l-192 192z`]},{prefix:`fas`,iconName:`chevron-right`,icon:[320,512,[9002],`f054`,`M311.1 233.4c12.5 12.5 12.5 32.8 0 45.3l-192 192c-12.5 12.5-32.8 12.5-45.3 0s-12.5-32.8 0-45.3L243.2 256 73.9 86.6c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0l192 192z`]},{prefix:`fas`,iconName:`caret-up`,icon:[320,512,[],`f0d8`,`M140.3 135.2c12.6-10.3 31.1-9.5 42.8 2.2l128 128c9.2 9.2 11.9 22.9 6.9 34.9S301.4 320 288.5 320l-256 0c-12.9 0-24.6-7.8-29.6-19.8S.7 274.5 9.9 265.4l128-128 2.4-2.2z`]},{prefix:`fas`,iconName:`caret-down`,icon:[320,512,[],`f0d7`,`M140.3 376.8c12.6 10.2 31.1 9.5 42.8-2.2l128-128c9.2-9.2 11.9-22.9 6.9-34.9S301.4 192 288.5 192l-256 0c-12.9 0-24.6 7.8-29.6 19.8S.7 237.5 9.9 246.6l128 128 2.4 2.2z`]},{prefix:`fas`,iconName:`cloud-arrow-up`,icon:[576,512,[62338,`cloud-upload`,`cloud-upload-alt`],`f0ee`,`M144 480c-79.5 0-144-64.5-144-144 0-63.4 41-117.2 97.9-136.5-1.3-7.7-1.9-15.5-1.9-23.5 0-79.5 64.5-144 144-144 55.4 0 103.5 31.3 127.6 77.1 14.2-8.3 30.8-13.1 48.4-13.1 53 0 96 43 96 96 0 15.7-3.8 30.6-10.5 43.7 44 20.3 74.5 64.7 74.5 116.3 0 70.7-57.3 128-128 128l-304 0zM305 191c-9.4-9.4-24.6-9.4-33.9 0l-72 72c-9.4 9.4-9.4 24.6 0 33.9s24.6 9.4 33.9 0l31-31 0 102.1c0 13.3 10.7 24 24 24s24-10.7 24-24l0-102.1 31 31c9.4 9.4 24.6 9.4 33.9 0s9.4-24.6 0-33.9l-72-72z`]},{prefix:`fas`,iconName:`cloud-arrow-down`,icon:[576,512,[62337,`cloud-download`,`cloud-download-alt`],`f0ed`,`M144 480c-79.5 0-144-64.5-144-144 0-63.4 41-117.2 97.9-136.5-1.3-7.7-1.9-15.5-1.9-23.5 0-79.5 64.5-144 144-144 55.4 0 103.5 31.3 127.6 77.1 14.2-8.3 30.8-13.1 48.4-13.1 53 0 96 43 96 96 0 15.7-3.8 30.6-10.5 43.7 44 20.3 74.5 64.7 74.5 116.3 0 70.7-57.3 128-128 128l-304 0zM377 313c9.4-9.4 9.4-24.6 0-33.9s-24.6-9.4-33.9 0l-31 31 0-102.1c0-13.3-10.7-24-24-24s-24 10.7-24 24l0 102.1-31-31c-9.4-9.4-24.6-9.4-33.9 0s-9.4 24.6 0 33.9l72 72c9.4 9.4 24.6 9.4 33.9 0l72-72z`]},{prefix:`fas`,iconName:`spinner`,icon:[512,512,[],`f110`,`M208 48a48 48 0 1 1 96 0 48 48 0 1 1 -96 0zm0 416a48 48 0 1 1 96 0 48 48 0 1 1 -96 0zM48 208a48 48 0 1 1 0 96 48 48 0 1 1 0-96zm368 48a48 48 0 1 1 96 0 48 48 0 1 1 -96 0zM75 369.1A48 48 0 1 1 142.9 437 48 48 0 1 1 75 369.1zM75 75A48 48 0 1 1 142.9 142.9 48 48 0 1 1 75 75zM437 369.1A48 48 0 1 1 369.1 437 48 48 0 1 1 437 369.1z`]},{prefix:`fas`,iconName:`check`,icon:[448,512,[10003,10004],`f00c`,`M434.8 70.1c14.3 10.4 17.5 30.4 7.1 44.7l-256 352c-5.5 7.6-14 12.3-23.4 13.1s-18.5-2.7-25.1-9.3l-128-128c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0l101.5 101.5 234-321.7c10.4-14.3 30.4-17.5 44.7-7.1z`]},{prefix:`fas`,iconName:`xmark`,icon:[384,512,[128473,10005,10006,10060,215,`close`,`multiply`,`remove`,`times`],`f00d`,`M55.1 73.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L147.2 256 9.9 393.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L192.5 301.3 329.9 438.6c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L237.8 256 375.1 118.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L192.5 210.7 55.1 73.4z`]});var Z=class{static getUUID(){return typeof crypto<`u`&&crypto.randomUUID?crypto.randomUUID():`xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx`.replace(/[xy]/g,function(e){let t=Math.random()*16|0;return(e===`x`?t:t&3|8).toString(16)})}static formatMoney(e,t=`$`,n=2){return typeof e!=`number`&&(e=Number(e)||0),t+e.toLocaleString(`en-US`,{minimumFractionDigits:n,maximumFractionDigits:n})}static formatNumber(e,t=2){return typeof e!=`number`&&(e=Number(e)||0),e.toLocaleString(`en-US`,{minimumFractionDigits:t,maximumFractionDigits:t})}static formatDateShort(e){return e?new Date(e).toLocaleDateString(`es-ES`,{year:`numeric`,month:`short`,day:`numeric`}):`No se proporciono fecha valida.`}static formatDateLong(e){return e?new Date(e).toLocaleDateString(`es-ES`,{year:`numeric`,month:`long`,day:`numeric`}):`No se proporciono fecha valida.`}static getDateTimeNow(){return new Date().toLocaleString(`sv-SE`,{timeZone:`America/Mexico_City`}).replace(` `,`T`)}static blockKeyNumber(e){[`e`,`E`,`+`,`-`].includes(e.key)&&e.preventDefault()}static blockKeys(e,t){t.includes(e.key)&&e.preventDefault()}static validateTel(e,t=!1){let n=(e??``).toString().trim();return n===``?t?`El teléfono es obligatorio.`:!0:/^(\+\d{1,3}\s)?\d{3}\s\d\s\d{2}\s\d{2}\s\d{2}$/.test(n)?!0:`Formato de teléfono inválido. Ejemplo: 999 9 99 99 99 o +52 999 9 99 99 99`}static validateEmail(e,t=!1){let n=(e??``).toString().trim();return n===``?t?`El correo es obligatorio.`:!0:/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(n)?!0:`Formato de correo inválido. Ejemplo: nombre@dominio.com`}static validateFileExtension(e,t=[]){if(!e)return`No se seleccionó ningún archivo.`;let n=e.name.split(`.`).pop()?.toLowerCase();return t.includes(n)?!0:`El formato .${n} no está permitido. Formatos permitidos: ${t.join(`, `)}`}static validateFileType(e,t=[]){return e?t.includes(e.type)?!0:`El tipo ${e.type||`desconocido`} no está permitido. Tipos permitidos: ${t.join(`, `)}`:`No se seleccionó ningún archivo.`}static validateFileSize(e,t=5){let n=t*1024*1024;return e?e.size>n?`El archivo es demasiado grande. Máximo ${n}MB.`:!0:`No se seleccionó ningún archivo.`}static downloadBlob(e,t=`archivo`,n=`application/octet-stream`){if(!e)return`No se recibió ningún archivo.`;let r=new Blob([e],{type:n}),i=URL.createObjectURL(r),a=document.createElement(`a`);return a.href=i,a.target=`_blank`,a.download=t,document.body.appendChild(a),a.click(),document.body.removeChild(a),setTimeout(()=>URL.revokeObjectURL(i),5e3),!0}static async fileToBase64(e){return e?new Promise((t,n)=>{let r=new FileReader;r.onload=()=>t(r.result),r.onerror=e=>n(e),r.readAsDataURL(e)}):`No se seleccionó ningún archivo.`}static base64ToBlob(e,t=`application/octet-stream`){let n=atob(e),r=[];for(let e=0;e<n.length;e+=512){let t=n.slice(e,e+512),i=Array(t.length);for(let e=0;e<t.length;e++)i[e]=t.charCodeAt(e);let a=new Uint8Array(i);r.push(a)}return new Blob(r,{type:t})}static base64ToFile(e,t=`archivo`,n=`application/octet-stream`){let r=this.base64ToBlob(e,n);return new File([r],t,{type:n})}},$i=`text-red-500`,ea=`text-emerald-500`,ta=`text-red-500`,na=`text-indigo-400`,ra=`w-5 h-5`,ia=`hover:text-indigo-600`,aa=`active:text-indigo-700`,oa=`group-hover:text-indigo-600`,sa=`transition-colors duration-150`;function ca(e){return e?[na,`opacity-60`]:[na,ia,aa,sa]}function la(e){return e?[na,`opacity-60`]:[na,oa,sa]}var ua=`text-gray-500`,da=`text-gray-700`,fa=`block text-sm font-medium truncate`,pa=`w-full text-gray-800 bg-white px-3 py-1.5 rounded border focus:outline-none focus:ring-2 disabled:bg-gray-100 disabled:text-gray-600 disabled:cursor-not-allowed`;function ma(e){return e===!1?`border-red-400 focus:ring-red-200`:e===!0?`border-emerald-400 focus:ring-emerald-200`:`border-gray-200 focus:ring-indigo-200`}var ha=`w-full px-3 py-1.5 rounded bg-gray-100 text-gray-600 border border-gray-200 focus:outline-none cursor-not-allowed`,ga=`absolute z-20 w-full bg-white border border-gray-200 rounded-md shadow-md max-h-56 overflow-y-auto [&::-webkit-scrollbar]:w-1.5 [&::-webkit-scrollbar-thumb]:bg-indigo-300 [&::-webkit-scrollbar-track]:bg-gray-100`,_a=`px-3 py-1 cursor-pointer text-md`,va=`px-3 py-1 text-gray-400 cursor-not-allowed`,ya=`px-2 pt-1 pb-0.5 text-xs font-semibold uppercase tracking-wide text-gray-400 cursor-default select-none`;function ba(e,t){return e?`bg-indigo-100 text-indigo-900 font-medium`:t?`bg-indigo-50 text-gray-900`:`hover:bg-indigo-50 text-gray-800`}var xa=`block text-sm font-medium`,Sa=`w-5 h-5 shrink-0 flex items-center justify-center rounded border-2 transition`,Ca=`w-5 h-5 shrink-0 flex items-center justify-center rounded-full transition`,wa=`w-10 h-5 shrink-0 relative flex items-center rounded-full transition border-2`;function Ta(e,t){return t?e?`bg-indigo-200 border-indigo-200 cursor-not-allowed`:`bg-gray-100 border-gray-200 cursor-not-allowed`:e?`bg-indigo-500 border-indigo-500 peer-focus:ring-2 peer-focus:ring-indigo-200`:`bg-white border-gray-300 peer-focus:ring-2 peer-focus:ring-indigo-200`}function Ea(e,t){return t?e?`border-2 bg-indigo-200 border-indigo-200 cursor-not-allowed`:`border-2 bg-gray-100 border-gray-200 cursor-not-allowed`:e?`border-4 bg-indigo-100 border-indigo-500 peer-focus:ring-2 peer-focus:ring-indigo-200`:`border-2 bg-white border-gray-300 peer-focus:ring-2 peer-focus:ring-indigo-200`}function Da(e,t){return t?e?`bg-indigo-200 border-indigo-200 cursor-not-allowed`:`bg-gray-100 border-gray-200 cursor-not-allowed`:e?`bg-indigo-500 border-indigo-500 peer-focus:ring-2 peer-focus:ring-indigo-200`:`bg-white border-gray-300 peer-focus:ring-2 peer-focus:ring-indigo-200`}function Oa(e,t){return t?e?`bg-white translate-x-5`:`bg-gray-300 translate-x-1`:e?`bg-white translate-x-5`:`bg-gray-400 translate-x-1`}var ka=`bg-white hover:bg-indigo-50 border border-gray-200 px-2.5 py-2 cursor-pointer disabled:bg-gray-100 disabled:text-gray-400 disabled:cursor-not-allowed disabled:border-gray-200`,Aa=`text-sm text-gray-700`,ja=`${ka} rounded-l-lg border-r-0`,Ma=`${ka} rounded-r-lg border-l-0`,Na=`border px-2.5 py-2 cursor-pointer w-8 relative`,Pa=`#6366F1`,Fa=`text-gray-600 text-lg font-medium`,Ia=`flex items-center justify-center gap-3 px-4 py-2 border-2 rounded-xl transition w-full cursor-pointer disabled:cursor-not-allowed disabled:opacity-80`,La=`border-gray-200 bg-white text-gray-700 hover:border-indigo-200 hover:bg-indigo-50`,Ra=`border-gray-200 bg-gray-100 text-gray-400`,za=`bg-indigo-300`,Ba=`bg-emerald-500`,Va=`bg-gray-300`,Ha=`absolute z-20 left-0 top-full rounded-md bg-white`,Ua=`border border-gray-300 rounded-md p-3`,Wa=`h-30 overflow-y-auto border border-gray-200 rounded-md [&::-webkit-scrollbar]:w-0 [scrollbar-width:none]`,Ga=`h-30 overflow-y-auto border border-gray-200 rounded-md flex flex-col justify-center`,Ka=`block text-xs font-semibold text-gray-500 mb-1 text-center`,qa=`px-3 py-1 text-center text-xs font-medium text-gray-700 rounded cursor-pointer hover:bg-indigo-100 hover:text-gray-600 transition-colors duration-150`;function Ja(e){return e?`bg-indigo-500 text-white font-medium`:``}var Q={INPUT_BASE_TITLE:fa,INPUT_CHECK_BASE_TITLE:xa,LABEL_DISABLED_STATIC:ua,LABEL_ENABLED_STATIC:da,INPUT_BASE:pa,inputValidateClass:ma,inputLabelClass:e=>[Q.INPUT_BASE_TITLE,e?Q.LABEL_DISABLED_STATIC:Q.LABEL_ENABLED_STATIC],inputDescriptionClass:(e,t=!0)=>[`block w-full text-sm`,t&&`text-right`,e===!1?Q.ICON_INVALID:e===!0?Q.ICON_VALID:Q.LABEL_DISABLED_STATIC],SELECT_DISABLED:ha,SELECT_DROPDOWN:ga,SELECT_OPTION_BASE:_a,selectOptionClass:ba,SELECT_EMPTY:va,SELECT_OPTGROUP:ya,inputCheckLabelClass:e=>[Q.INPUT_CHECK_BASE_TITLE,e?Q.LABEL_DISABLED_STATIC:Q.LABEL_ENABLED_STATIC],CHECK_BOX_BASE:Sa,RADIO_BASE:Ca,SWITCH_BASE:wa,checkBoxClass:Ta,radioClass:Ea,switchClass:Da,switchDotClass:Oa,PAGINATION_NAV_PREV:ja,PAGINATION_NAV_NEXT:Ma,PAGINATION_PAGE_BASE:Na,PAGINATION_SUMMARY:Aa,paginationPageClass:(e,t,n)=>[Q.PAGINATION_PAGE_BASE,n===0?``:`border-l-0`,e===t?`bg-indigo-100 border-indigo-300 text-indigo-700`:e===`...`?`cursor-default bg-white border-gray-200 text-gray-400`:`bg-white hover:bg-indigo-50 border-gray-200 hover:border-indigo-200`],LOADER_ARC_STROKE:Pa,LOADER_MESSAGE:Fa,FILE_BUTTON_BASE:Ia,FILE_BUTTON_ACTIVE:La,FILE_BUTTON_DISABLED:Ra,FILE_ICON_BG:za,FILE_ICON_BG_COMPLETE:Ba,FILE_ICON_BG_DISABLED:Va,TIME_PICKER_WRAPPER:Ha,TIME_PICKER_CONTAINER:Ua,TIME_PICKER_COLUMN:Wa,TIME_PICKER_AMPM_COLUMN:Ga,TIME_PICKER_COLUMN_LABEL:Ka,TIME_PICKER_ITEM:qa,timePickerItemClass:Ja,REQUIRED_ASTERISK:$i,ICON_VALID:ea,ICON_INVALID:ta,ICON_STATIC:na,ICON_SIZE_STATIC:ra,ICON_STATIC_HOVER:ia,ICON_STATIC_ACTIVE:aa,ICON_STATIC_GROUP_HOVER:oa,ICON_TRANSITION:sa,iconInteractiveClass:ca,iconGroupInteractiveClass:la};function Ya(e={}){Object.assign(Q,e)}var Xa=class e{static type={success:`success`,error:`error`,warning:`warning`,info:`info`,neutral:`neutral`};static container=null;static iconMap={success:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 640"><path d="M320 576C178.6 576 64 461.4 64 320C64 178.6 178.6 64 320 64C461.4 64 576 178.6 576 320C576 461.4 461.4 576 320 576zM438 209.7C427.3 201.9 412.3 204.3 404.5 215L285.1 379.2L233 327.1C223.6 317.7 208.4 317.7 199.1 327.1C189.8 336.5 189.7 351.7 199.1 361L271.1 433C276.1 438 282.9 440.5 289.9 440C296.9 439.5 303.3 435.9 307.4 430.2L443.3 243.2C451.1 232.5 448.7 217.5 438 209.7z"/></svg>`,error:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 640"><path d="M320 576C461.4 576 576 461.4 576 320C576 178.6 461.4 64 320 64C178.6 64 64 178.6 64 320C64 461.4 178.6 576 320 576zM231 231C240.4 221.6 255.6 221.6 264.9 231L319.9 286L374.9 231C384.3 221.6 399.5 221.6 408.8 231C418.1 240.4 418.2 255.6 408.8 264.9L353.8 319.9L408.8 374.9C418.2 384.3 418.2 399.5 408.8 408.8C399.4 418.1 384.2 418.2 374.9 408.8L319.9 353.8L264.9 408.8C255.5 418.2 240.3 418.2 231 408.8C221.7 399.4 221.6 384.2 231 374.9L286 319.9L231 264.9C221.6 255.5 221.6 240.3 231 231z"/></svg>`,warning:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 640"><path d="M320 576C178.6 576 64 461.4 64 320C64 178.6 178.6 64 320 64C461.4 64 576 178.6 576 320C576 461.4 461.4 576 320 576zM320 384C302.3 384 288 398.3 288 416C288 433.7 302.3 448 320 448C337.7 448 352 433.7 352 416C352 398.3 337.7 384 320 384zM320 192C301.8 192 287.3 207.5 288.6 225.7L296 329.7C296.9 342.3 307.4 352 319.9 352C332.5 352 342.9 342.3 343.8 329.7L351.2 225.7C352.5 207.5 338.1 192 319.8 192z"/></svg>`,info:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 640"><path d="M320 576C461.4 576 576 461.4 576 320C576 178.6 461.4 64 320 64C178.6 64 64 178.6 64 320C64 461.4 178.6 576 320 576zM288 224C288 206.3 302.3 192 320 192C337.7 192 352 206.3 352 224C352 241.7 337.7 256 320 256C302.3 256 288 241.7 288 224zM280 288L328 288C341.3 288 352 298.7 352 312L352 400L360 400C373.3 400 384 410.7 384 424C384 437.3 373.3 448 360 448L280 448C266.7 448 256 437.3 256 424C256 410.7 266.7 400 280 400L304 400L304 336L280 336C266.7 336 256 325.3 256 312C256 298.7 266.7 288 280 288z"/></svg>`,neutral:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 640"><path d="M64 320C64 178.6 178.6 64 320 64C461.4 64 576 178.6 576 320C576 461.4 461.4 576 320 576C178.6 576 64 461.4 64 320zM272 272C272 254.3 257.7 240 240 240C222.3 240 208 254.3 208 272C208 289.7 222.3 304 240 304C257.7 304 272 289.7 272 272zM400 304C417.7 304 432 289.7 432 272C432 254.3 417.7 240 400 240C382.3 240 368 254.3 368 272C368 289.7 382.3 304 400 304z"/></svg>`};static#e(t,n,r=e.type.info,i=4e3){e.ensureContainer();let a=document.createElement(`div`);a.className=`alert alert-${r}`,a.innerHTML=`
|
|
559
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Ni(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Y(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?Ni(Object(n),!0).forEach(function(t){J(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ni(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Pi(e,t){if(e==null)return{};var n,r,i=Fi(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function Fi(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function Ii(e){return Ai(e)||ji(e)||Bi(e)||Mi()}function Li(e,t){if(typeof e!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function Ri(e){var t=Li(e,`string`);return typeof t==`symbol`?t:t+``}function zi(e){"@babel/helpers - typeof";return zi=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},zi(e)}function Bi(e,t){if(e){if(typeof e==`string`)return ki(e,t);var n={}.toString.call(e).slice(8,-1);return n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`?Array.from(e):n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?ki(e,t):void 0}}function X(e,t){return Array.isArray(t)&&t.length>0||!Array.isArray(t)&&t?J({},e,t):{}}function Vi(e){var t,n=(t={"fa-spin":e.spin,"fa-pulse":e.pulse,"fa-fw":e.fixedWidth,"fa-border":e.border,"fa-li":e.listItem,"fa-inverse":e.inverse,"fa-flip":e.flip===!0,"fa-flip-horizontal":e.flip===`horizontal`||e.flip===`both`,"fa-flip-vertical":e.flip===`vertical`||e.flip===`both`},J(J(J(J(J(J(J(J(J(J(t,`fa-${e.size}`,e.size!==null),`fa-rotate-${e.rotation}`,e.rotation!==null),`fa-rotate-by`,e.rotateBy),`fa-pull-${e.pull}`,e.pull!==null),`fa-swap-opacity`,e.swapOpacity),`fa-bounce`,e.bounce),`fa-shake`,e.shake),`fa-beat`,e.beat),`fa-fade`,e.fade),`fa-beat-fade`,e.beatFade),J(J(J(J(t,`fa-flash`,e.flash),`fa-spin-pulse`,e.spinPulse),`fa-spin-reverse`,e.spinReverse),`fa-width-auto`,e.widthAuto));return Object.keys(n).map(function(e){return n[e]?e:null}).filter(function(e){return e})}var Hi=typeof globalThis<`u`?globalThis:typeof window<`u`?window:typeof global<`u`?global:typeof self<`u`?self:{},Ui={exports:{}};(function(e){(function(t){var n=function(e,t,r){if(!l(t)||d(t)||f(t)||p(t)||c(t))return t;var i,a=0,o=0;if(u(t))for(i=[],o=t.length;a<o;a++)i.push(n(e,t[a],r));else for(var s in i={},t)Object.prototype.hasOwnProperty.call(t,s)&&(i[e(s,r)]=n(e,t[s],r));return i},r=function(e,t){t||={};var n=t.separator||`_`,r=t.split||/(?=[A-Z])/;return e.split(r).join(n)},i=function(e){return m(e)?e:(e=e.replace(/[\-_\s]+(.)?/g,function(e,t){return t?t.toUpperCase():``}),e.substr(0,1).toLowerCase()+e.substr(1))},a=function(e){var t=i(e);return t.substr(0,1).toUpperCase()+t.substr(1)},o=function(e,t){return r(e,t).toLowerCase()},s=Object.prototype.toString,c=function(e){return typeof e==`function`},l=function(e){return e===Object(e)},u=function(e){return s.call(e)==`[object Array]`},d=function(e){return s.call(e)==`[object Date]`},f=function(e){return s.call(e)==`[object RegExp]`},p=function(e){return s.call(e)==`[object Boolean]`},m=function(e){return e-=0,e===e},h=function(e,t){var n=t&&`process`in t?t.process:t;return typeof n==`function`?function(t,r){return n(t,e,r)}:e},g={camelize:i,decamelize:o,pascalize:a,depascalize:o,camelizeKeys:function(e,t){return n(h(i,t),e)},decamelizeKeys:function(e,t){return n(h(o,t),e,t)},pascalizeKeys:function(e,t){return n(h(a,t),e)},depascalizeKeys:function(){return this.decamelizeKeys.apply(this,arguments)}};e.exports?e.exports=g:t.humps=g})(Hi)})(Ui);var Wi=Ui.exports,Gi=[`class`,`style`];function Ki(e){return e.split(`;`).map(function(e){return e.trim()}).filter(function(e){return e}).reduce(function(e,t){var n=t.indexOf(`:`),r=Wi.camelize(t.slice(0,n));return e[r]=t.slice(n+1).trim(),e},{})}function qi(e){return e.split(/\s+/).reduce(function(e,t){return e[t]=!0,e},{})}function Ji(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};if(typeof e==`string`)return e;var i=(e.children||[]).map(function(e){return Ji(e)}),a=Object.keys(e.attributes||{}).reduce(function(t,n){var r=e.attributes[n];switch(n){case`class`:t.class=qi(r);break;case`style`:t.style=Ki(r);break;default:t.attrs[n]=r}return t},{attrs:{},class:{},style:{}});r.class;var o=r.style,s=o===void 0?{}:o,c=Pi(r,Gi);return(0,t.h)(e.tag,Y(Y(Y({},n),{},{class:a.class,style:Y(Y({},a.style),s)},a.attrs),c),i)}var Yi=!1;try{Yi=process.env.NODE_ENV===`production`}catch{}function Xi(){if(!Yi&&console&&typeof console.error==`function`){var e;(e=console).error.apply(e,arguments)}}function Zi(e){if(e&&zi(e)===`object`&&e.prefix&&e.iconName&&e.icon)return e;if(Ei.icon)return Ei.icon(e);if(e===null)return null;if(zi(e)===`object`&&e.prefix&&e.iconName)return e;if(Array.isArray(e)&&e.length===2)return{prefix:e[0],iconName:e[1]};if(typeof e==`string`)return{prefix:`fas`,iconName:e}}var Qi=(0,t.defineComponent)({name:`FontAwesomeIcon`,props:{border:{type:Boolean,default:!1},fixedWidth:{type:Boolean,default:!1},flip:{type:[Boolean,String],default:!1,validator:function(e){return[!0,!1,`horizontal`,`vertical`,`both`].indexOf(e)>-1}},icon:{type:[Object,Array,String],required:!0},mask:{type:[Object,Array,String],default:null},maskId:{type:String,default:null},listItem:{type:Boolean,default:!1},pull:{type:String,default:null,validator:function(e){return[`right`,`left`].indexOf(e)>-1}},pulse:{type:Boolean,default:!1},rotation:{type:[String,Number],default:null,validator:function(e){return[90,180,270].indexOf(Number.parseInt(e,10))>-1}},rotateBy:{type:Boolean,default:!1},swapOpacity:{type:Boolean,default:!1},size:{type:String,default:null,validator:function(e){return[`2xs`,`xs`,`sm`,`lg`,`xl`,`2xl`,`1x`,`2x`,`3x`,`4x`,`5x`,`6x`,`7x`,`8x`,`9x`,`10x`].indexOf(e)>-1}},spin:{type:Boolean,default:!1},transform:{type:[String,Object],default:null},symbol:{type:[Boolean,String],default:!1},title:{type:String,default:null},titleId:{type:String,default:null},inverse:{type:Boolean,default:!1},bounce:{type:Boolean,default:!1},shake:{type:Boolean,default:!1},beat:{type:Boolean,default:!1},fade:{type:Boolean,default:!1},beatFade:{type:Boolean,default:!1},flash:{type:Boolean,default:!1},spinPulse:{type:Boolean,default:!1},spinReverse:{type:Boolean,default:!1},widthAuto:{type:Boolean,default:!1}},setup:function(e,n){var r=n.attrs,i=(0,t.computed)(function(){return Zi(e.icon)}),a=(0,t.computed)(function(){return X(`classes`,Vi(e))}),o=(0,t.computed)(function(){return X(`transform`,typeof e.transform==`string`?Ei.transform(e.transform):e.transform)}),s=(0,t.computed)(function(){return X(`mask`,Zi(e.mask))}),c=(0,t.computed)(function(){var t=Y(Y(Y(Y({},a.value),o.value),s.value),{},{symbol:e.symbol,maskId:e.maskId});return t.title=e.title,t.titleId=e.titleId,Di(i.value,t)});(0,t.watch)(c,function(e){if(!e)return Xi(`Could not find one or more icon(s)`,i.value,s.value)},{immediate:!0});var l=(0,t.computed)(function(){return c.value?Ji(c.value.abstract[0],{},r):null});return function(){return l.value}}});(0,t.defineComponent)({name:`FontAwesomeLayers`,props:{fixedWidth:{type:Boolean,default:!1}},setup:function(e,n){var r=n.slots,i=wi.familyPrefix,a=(0,t.computed)(function(){return[`${i}-layers`].concat(Ii(e.fixedWidth?[`${i}-fw`]:[]))});return function(){return(0,t.h)(`div`,{class:a.value},r.default?r.default():[])}}}),(0,t.defineComponent)({name:`FontAwesomeLayersText`,props:{value:{type:[String,Number],default:``},transform:{type:[String,Object],default:null},counter:{type:Boolean,default:!1},position:{type:String,default:null,validator:function(e){return[`bottom-left`,`bottom-right`,`top-left`,`top-right`].indexOf(e)>-1}}},setup:function(e,n){var r=n.attrs,i=wi.familyPrefix,a=(0,t.computed)(function(){return X(`classes`,[].concat(Ii(e.counter?[`${i}-layers-counter`]:[]),Ii(e.position?[`${i}-layers-${e.position}`]:[])))}),o=(0,t.computed)(function(){return X(`transform`,typeof e.transform==`string`?Ei.transform(e.transform):e.transform)}),s=(0,t.computed)(function(){var t=Oi(e.value.toString(),Y(Y({},o.value),a.value)).abstract;return e.counter&&(t[0].attributes.class=t[0].attributes.class.replace(`fa-layers-text`,``)),t[0]}),c=(0,t.computed)(function(){return Ji(s.value,{},r)});return function(){return c.value}}}),Ti.add({prefix:`fas`,iconName:`circle-check`,icon:[512,512,[61533,`check-circle`],`f058`,`M256 512a256 256 0 1 1 0-512 256 256 0 1 1 0 512zM374 145.7c-10.7-7.8-25.7-5.4-33.5 5.3L221.1 315.2 169 263.1c-9.4-9.4-24.6-9.4-33.9 0s-9.4 24.6 0 33.9l72 72c5 5 11.8 7.5 18.8 7s13.4-4.1 17.5-9.8L379.3 179.2c7.8-10.7 5.4-25.7-5.3-33.5z`]},{prefix:`fas`,iconName:`circle-xmark`,icon:[512,512,[61532,`times-circle`,`xmark-circle`],`f057`,`M256 512a256 256 0 1 0 0-512 256 256 0 1 0 0 512zM167 167c9.4-9.4 24.6-9.4 33.9 0l55 55 55-55c9.4-9.4 24.6-9.4 33.9 0s9.4 24.6 0 33.9l-55 55 55 55c9.4 9.4 9.4 24.6 0 33.9s-24.6 9.4-33.9 0l-55-55-55 55c-9.4 9.4-24.6 9.4-33.9 0s-9.4-24.6 0-33.9l55-55-55-55c-9.4-9.4-9.4-24.6 0-33.9z`]},{prefix:`fas`,iconName:`circle-info`,icon:[512,512,[`info-circle`],`f05a`,`M256 512a256 256 0 1 0 0-512 256 256 0 1 0 0 512zM224 160a32 32 0 1 1 64 0 32 32 0 1 1 -64 0zm-8 64l48 0c13.3 0 24 10.7 24 24l0 88 8 0c13.3 0 24 10.7 24 24s-10.7 24-24 24l-80 0c-13.3 0-24-10.7-24-24s10.7-24 24-24l24 0 0-64-24 0c-13.3 0-24-10.7-24-24s10.7-24 24-24z`]},{prefix:`fas`,iconName:`circle-exclamation`,icon:[512,512,[`exclamation-circle`],`f06a`,`M256 512a256 256 0 1 1 0-512 256 256 0 1 1 0 512zm0-192a32 32 0 1 0 0 64 32 32 0 1 0 0-64zm0-192c-18.2 0-32.7 15.5-31.4 33.7l7.4 104c.9 12.6 11.4 22.3 23.9 22.3 12.6 0 23-9.7 23.9-22.3l7.4-104c1.3-18.2-13.1-33.7-31.4-33.7z`]},{prefix:`fas`,iconName:`triangle-exclamation`,icon:[512,512,[9888,`exclamation-triangle`,`warning`],`f071`,`M256 0c14.7 0 28.2 8.1 35.2 21l216 400c6.7 12.4 6.4 27.4-.8 39.5S486.1 480 472 480L40 480c-14.1 0-27.2-7.4-34.4-19.5s-7.5-27.1-.8-39.5l216-400c7-12.9 20.5-21 35.2-21zm0 352a32 32 0 1 0 0 64 32 32 0 1 0 0-64zm0-192c-18.2 0-32.7 15.5-31.4 33.7l7.4 104c.9 12.5 11.4 22.3 23.9 22.3 12.6 0 23-9.7 23.9-22.3l7.4-104c1.3-18.2-13.1-33.7-31.4-33.7z`]},{prefix:`fas`,iconName:`eye`,icon:[576,512,[128065],`f06e`,`M288 32c-80.8 0-145.5 36.8-192.6 80.6-46.8 43.5-78.1 95.4-93 131.1-3.3 7.9-3.3 16.7 0 24.6 14.9 35.7 46.2 87.7 93 131.1 47.1 43.7 111.8 80.6 192.6 80.6s145.5-36.8 192.6-80.6c46.8-43.5 78.1-95.4 93-131.1 3.3-7.9 3.3-16.7 0-24.6-14.9-35.7-46.2-87.7-93-131.1-47.1-43.7-111.8-80.6-192.6-80.6zM144 256a144 144 0 1 1 288 0 144 144 0 1 1 -288 0zm144-64c0 35.3-28.7 64-64 64-11.5 0-22.3-3-31.7-8.4-1 10.9-.1 22.1 2.9 33.2 13.7 51.2 66.4 81.6 117.6 67.9s81.6-66.4 67.9-117.6c-12.2-45.7-55.5-74.8-101.1-70.8 5.3 9.3 8.4 20.1 8.4 31.7z`]},{prefix:`fas`,iconName:`eye-slash`,icon:[576,512,[],`f070`,`M41-24.9c-9.4-9.4-24.6-9.4-33.9 0S-2.3-.3 7 9.1l528 528c9.4 9.4 24.6 9.4 33.9 0s9.4-24.6 0-33.9l-96.4-96.4c2.7-2.4 5.4-4.8 8-7.2 46.8-43.5 78.1-95.4 93-131.1 3.3-7.9 3.3-16.7 0-24.6-14.9-35.7-46.2-87.7-93-131.1-47.1-43.7-111.8-80.6-192.6-80.6-56.8 0-105.6 18.2-146 44.2L41-24.9zM204.5 138.7c23.5-16.8 52.4-26.7 83.5-26.7 79.5 0 144 64.5 144 144 0 31.1-9.9 59.9-26.7 83.5l-34.7-34.7c12.7-21.4 17-47.7 10.1-73.7-13.7-51.2-66.4-81.6-117.6-67.9-8.6 2.3-16.7 5.7-24 10l-34.7-34.7zM325.3 395.1c-11.9 3.2-24.4 4.9-37.3 4.9-79.5 0-144-64.5-144-144 0-12.9 1.7-25.4 4.9-37.3L69.4 139.2c-32.6 36.8-55 75.8-66.9 104.5-3.3 7.9-3.3 16.7 0 24.6 14.9 35.7 46.2 87.7 93 131.1 47.1 43.7 111.8 80.6 192.6 80.6 37.3 0 71.2-7.9 101.5-20.6l-64.2-64.2z`]},{prefix:`fas`,iconName:`calendar`,icon:[448,512,[128197,128198],`f133`,`M128 0C110.3 0 96 14.3 96 32l0 32-32 0C28.7 64 0 92.7 0 128l0 48 448 0 0-48c0-35.3-28.7-64-64-64l-32 0 0-32c0-17.7-14.3-32-32-32s-32 14.3-32 32l0 32-128 0 0-32c0-17.7-14.3-32-32-32zM0 224L0 416c0 35.3 28.7 64 64 64l320 0c35.3 0 64-28.7 64-64l0-192-448 0z`]},{prefix:`fas`,iconName:`clock`,icon:[512,512,[128339,`clock-four`],`f017`,`M256 0a256 256 0 1 1 0 512 256 256 0 1 1 0-512zM232 120l0 136c0 8 4 15.5 10.7 20l96 64c11 7.4 25.9 4.4 33.3-6.7s4.4-25.9-6.7-33.3L280 243.2 280 120c0-13.3-10.7-24-24-24s-24 10.7-24 24z`]},{prefix:`fas`,iconName:`chevron-down`,icon:[448,512,[],`f078`,`M201.4 406.6c12.5 12.5 32.8 12.5 45.3 0l192-192c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L224 338.7 54.6 169.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3l192 192z`]},{prefix:`fas`,iconName:`chevron-left`,icon:[320,512,[9001],`f053`,`M9.4 233.4c-12.5 12.5-12.5 32.8 0 45.3l192 192c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L77.3 256 246.6 86.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0l-192 192z`]},{prefix:`fas`,iconName:`chevron-right`,icon:[320,512,[9002],`f054`,`M311.1 233.4c12.5 12.5 12.5 32.8 0 45.3l-192 192c-12.5 12.5-32.8 12.5-45.3 0s-12.5-32.8 0-45.3L243.2 256 73.9 86.6c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0l192 192z`]},{prefix:`fas`,iconName:`caret-up`,icon:[320,512,[],`f0d8`,`M140.3 135.2c12.6-10.3 31.1-9.5 42.8 2.2l128 128c9.2 9.2 11.9 22.9 6.9 34.9S301.4 320 288.5 320l-256 0c-12.9 0-24.6-7.8-29.6-19.8S.7 274.5 9.9 265.4l128-128 2.4-2.2z`]},{prefix:`fas`,iconName:`caret-down`,icon:[320,512,[],`f0d7`,`M140.3 376.8c12.6 10.2 31.1 9.5 42.8-2.2l128-128c9.2-9.2 11.9-22.9 6.9-34.9S301.4 192 288.5 192l-256 0c-12.9 0-24.6 7.8-29.6 19.8S.7 237.5 9.9 246.6l128 128 2.4 2.2z`]},{prefix:`fas`,iconName:`cloud-arrow-up`,icon:[576,512,[62338,`cloud-upload`,`cloud-upload-alt`],`f0ee`,`M144 480c-79.5 0-144-64.5-144-144 0-63.4 41-117.2 97.9-136.5-1.3-7.7-1.9-15.5-1.9-23.5 0-79.5 64.5-144 144-144 55.4 0 103.5 31.3 127.6 77.1 14.2-8.3 30.8-13.1 48.4-13.1 53 0 96 43 96 96 0 15.7-3.8 30.6-10.5 43.7 44 20.3 74.5 64.7 74.5 116.3 0 70.7-57.3 128-128 128l-304 0zM305 191c-9.4-9.4-24.6-9.4-33.9 0l-72 72c-9.4 9.4-9.4 24.6 0 33.9s24.6 9.4 33.9 0l31-31 0 102.1c0 13.3 10.7 24 24 24s24-10.7 24-24l0-102.1 31 31c9.4 9.4 24.6 9.4 33.9 0s9.4-24.6 0-33.9l-72-72z`]},{prefix:`fas`,iconName:`cloud-arrow-down`,icon:[576,512,[62337,`cloud-download`,`cloud-download-alt`],`f0ed`,`M144 480c-79.5 0-144-64.5-144-144 0-63.4 41-117.2 97.9-136.5-1.3-7.7-1.9-15.5-1.9-23.5 0-79.5 64.5-144 144-144 55.4 0 103.5 31.3 127.6 77.1 14.2-8.3 30.8-13.1 48.4-13.1 53 0 96 43 96 96 0 15.7-3.8 30.6-10.5 43.7 44 20.3 74.5 64.7 74.5 116.3 0 70.7-57.3 128-128 128l-304 0zM377 313c9.4-9.4 9.4-24.6 0-33.9s-24.6-9.4-33.9 0l-31 31 0-102.1c0-13.3-10.7-24-24-24s-24 10.7-24 24l0 102.1-31-31c-9.4-9.4-24.6-9.4-33.9 0s-9.4 24.6 0 33.9l72 72c9.4 9.4 24.6 9.4 33.9 0l72-72z`]},{prefix:`fas`,iconName:`spinner`,icon:[512,512,[],`f110`,`M208 48a48 48 0 1 1 96 0 48 48 0 1 1 -96 0zm0 416a48 48 0 1 1 96 0 48 48 0 1 1 -96 0zM48 208a48 48 0 1 1 0 96 48 48 0 1 1 0-96zm368 48a48 48 0 1 1 96 0 48 48 0 1 1 -96 0zM75 369.1A48 48 0 1 1 142.9 437 48 48 0 1 1 75 369.1zM75 75A48 48 0 1 1 142.9 142.9 48 48 0 1 1 75 75zM437 369.1A48 48 0 1 1 369.1 437 48 48 0 1 1 437 369.1z`]},{prefix:`fas`,iconName:`check`,icon:[448,512,[10003,10004],`f00c`,`M434.8 70.1c14.3 10.4 17.5 30.4 7.1 44.7l-256 352c-5.5 7.6-14 12.3-23.4 13.1s-18.5-2.7-25.1-9.3l-128-128c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0l101.5 101.5 234-321.7c10.4-14.3 30.4-17.5 44.7-7.1z`]},{prefix:`fas`,iconName:`xmark`,icon:[384,512,[128473,10005,10006,10060,215,`close`,`multiply`,`remove`,`times`],`f00d`,`M55.1 73.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L147.2 256 9.9 393.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L192.5 301.3 329.9 438.6c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L237.8 256 375.1 118.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L192.5 210.7 55.1 73.4z`]});var Z=class{static getUUID(){return typeof crypto<`u`&&crypto.randomUUID?crypto.randomUUID():`xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx`.replace(/[xy]/g,function(e){let t=Math.random()*16|0;return(e===`x`?t:t&3|8).toString(16)})}static formatMoney(e,t=`$`,n=2){return typeof e!=`number`&&(e=Number(e)||0),t+e.toLocaleString(`en-US`,{minimumFractionDigits:n,maximumFractionDigits:n})}static formatNumber(e,t=2){return typeof e!=`number`&&(e=Number(e)||0),e.toLocaleString(`en-US`,{minimumFractionDigits:t,maximumFractionDigits:t})}static formatDateShort(e){return e?new Date(e).toLocaleDateString(`es-ES`,{year:`numeric`,month:`short`,day:`numeric`}):`No se proporciono fecha valida.`}static formatDateLong(e){return e?new Date(e).toLocaleDateString(`es-ES`,{year:`numeric`,month:`long`,day:`numeric`}):`No se proporciono fecha valida.`}static formatDateTimeShort(e,t=!0){if(!e)return`No se proporciono fecha valida.`;let n={year:`numeric`,month:`short`,day:`numeric`,hour:`2-digit`,minute:`2-digit`,hour12:t};return new Date(e).toLocaleDateString(`es-ES`,n)}static formatDateTimeLong(e,t=!0){if(!e)return`No se proporciono fecha valida.`;let n={year:`numeric`,month:`long`,day:`numeric`,hour:`2-digit`,minute:`2-digit`,hour12:t};return new Date(e).toLocaleDateString(`es-ES`,n)}static getDateTimeNow(){return new Date().toLocaleString(`sv-SE`,{timeZone:`America/Mexico_City`}).replace(` `,`T`)}static blockKeyNumber(e){[`e`,`E`,`+`,`-`].includes(e.key)&&e.preventDefault()}static blockKeys(e,t){t.includes(e.key)&&e.preventDefault()}static validateTel(e,t=!1){let n=(e??``).toString().trim();return n===``?t?`El teléfono es obligatorio.`:!0:/^(\+\d{1,3}\s)?\d{3}\s\d\s\d{2}\s\d{2}\s\d{2}$/.test(n)?!0:`Formato de teléfono inválido. Ejemplo: 999 9 99 99 99 o +52 999 9 99 99 99`}static validateEmail(e,t=!1){let n=(e??``).toString().trim();return n===``?t?`El correo es obligatorio.`:!0:/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(n)?!0:`Formato de correo inválido. Ejemplo: nombre@dominio.com`}static validateFileExtension(e,t=[]){if(!e)return`No se seleccionó ningún archivo.`;let n=e.name.split(`.`).pop()?.toLowerCase();return t.includes(n)?!0:`El formato .${n} no está permitido. Formatos permitidos: ${t.join(`, `)}`}static validateFileType(e,t=[]){return e?t.includes(e.type)?!0:`El tipo ${e.type||`desconocido`} no está permitido. Tipos permitidos: ${t.join(`, `)}`:`No se seleccionó ningún archivo.`}static validateFileSize(e,t=5){let n=t*1024*1024;return e?e.size>n?`El archivo es demasiado grande. Máximo ${n}MB.`:!0:`No se seleccionó ningún archivo.`}static downloadBlob(e,t=`archivo`,n=`application/octet-stream`){if(!e)return`No se recibió ningún archivo.`;let r=new Blob([e],{type:n}),i=URL.createObjectURL(r),a=document.createElement(`a`);return a.href=i,a.target=`_blank`,a.download=t,document.body.appendChild(a),a.click(),document.body.removeChild(a),setTimeout(()=>URL.revokeObjectURL(i),5e3),!0}static async fileToBase64(e){return e?new Promise((t,n)=>{let r=new FileReader;r.onload=()=>t(r.result),r.onerror=e=>n(e),r.readAsDataURL(e)}):`No se seleccionó ningún archivo.`}static base64ToBlob(e,t=`application/octet-stream`){let n=atob(e),r=[];for(let e=0;e<n.length;e+=512){let t=n.slice(e,e+512),i=Array(t.length);for(let e=0;e<t.length;e++)i[e]=t.charCodeAt(e);let a=new Uint8Array(i);r.push(a)}return new Blob(r,{type:t})}static base64ToFile(e,t=`archivo`,n=`application/octet-stream`){let r=this.base64ToBlob(e,n);return new File([r],t,{type:n})}},$i=`text-red-500`,ea=`text-emerald-500`,ta=`text-red-500`,na=`text-indigo-400`,ra=`w-5 h-5`,ia=`hover:text-indigo-600`,aa=`active:text-indigo-700`,oa=`group-hover:text-indigo-600`,sa=`transition-colors duration-150`;function ca(e){return e?[na,`opacity-60`]:[na,ia,aa,sa]}function la(e){return e?[na,`opacity-60`]:[na,oa,sa]}var ua=`text-gray-500`,da=`text-gray-700`,fa=`block text-sm font-medium truncate`,pa=`w-full text-gray-800 bg-white px-3 py-1.5 rounded border focus:outline-none focus:ring-2 disabled:bg-gray-100 disabled:text-gray-600 disabled:cursor-not-allowed`;function ma(e){return e===!1?`border-red-400 focus:ring-red-200`:e===!0?`border-emerald-400 focus:ring-emerald-200`:`border-gray-200 focus:ring-indigo-200`}var ha=`w-full px-3 py-1.5 rounded bg-gray-100 text-gray-600 border border-gray-200 focus:outline-none cursor-not-allowed`,ga=`absolute z-20 w-full bg-white border border-gray-200 rounded-md shadow-md max-h-56 overflow-y-auto [&::-webkit-scrollbar]:w-1.5 [&::-webkit-scrollbar-thumb]:bg-indigo-300 [&::-webkit-scrollbar-track]:bg-gray-100`,_a=`px-3 py-1 cursor-pointer text-md`,va=`px-3 py-1 text-gray-400 cursor-not-allowed`,ya=`px-2 pt-1 pb-0.5 text-xs font-semibold uppercase tracking-wide text-gray-400 cursor-default select-none`;function ba(e,t){return e?`bg-indigo-100 text-indigo-900 font-medium`:t?`bg-indigo-50 text-gray-900`:`hover:bg-indigo-50 text-gray-800`}var xa=`block text-sm font-medium`,Sa=`w-5 h-5 shrink-0 flex items-center justify-center rounded border-2 transition`,Ca=`w-5 h-5 shrink-0 flex items-center justify-center rounded-full transition`,wa=`w-10 h-5 shrink-0 relative flex items-center rounded-full transition border-2`;function Ta(e,t){return t?e?`bg-indigo-200 border-indigo-200 cursor-not-allowed`:`bg-gray-100 border-gray-200 cursor-not-allowed`:e?`bg-indigo-500 border-indigo-500 peer-focus:ring-2 peer-focus:ring-indigo-200`:`bg-white border-gray-300 peer-focus:ring-2 peer-focus:ring-indigo-200`}function Ea(e,t){return t?e?`border-2 bg-indigo-200 border-indigo-200 cursor-not-allowed`:`border-2 bg-gray-100 border-gray-200 cursor-not-allowed`:e?`border-4 bg-indigo-100 border-indigo-500 peer-focus:ring-2 peer-focus:ring-indigo-200`:`border-2 bg-white border-gray-300 peer-focus:ring-2 peer-focus:ring-indigo-200`}function Da(e,t){return t?e?`bg-indigo-200 border-indigo-200 cursor-not-allowed`:`bg-gray-100 border-gray-200 cursor-not-allowed`:e?`bg-indigo-500 border-indigo-500 peer-focus:ring-2 peer-focus:ring-indigo-200`:`bg-white border-gray-300 peer-focus:ring-2 peer-focus:ring-indigo-200`}function Oa(e,t){return t?e?`bg-white translate-x-5`:`bg-gray-300 translate-x-1`:e?`bg-white translate-x-5`:`bg-gray-400 translate-x-1`}var ka=`bg-white hover:bg-indigo-50 border border-gray-200 px-2.5 py-2 cursor-pointer disabled:bg-gray-100 disabled:text-gray-400 disabled:cursor-not-allowed disabled:border-gray-200`,Aa=`text-sm text-gray-700`,ja=`${ka} rounded-l-lg border-r-0`,Ma=`${ka} rounded-r-lg border-l-0`,Na=`border px-2.5 py-2 cursor-pointer w-8 relative`,Pa=`#6366F1`,Fa=`text-gray-600 text-lg font-medium`,Ia=`flex items-center justify-center gap-3 px-4 py-2 border-2 rounded-xl transition w-full cursor-pointer disabled:cursor-not-allowed disabled:opacity-80`,La=`border-gray-200 bg-white text-gray-700 hover:border-indigo-200 hover:bg-indigo-50`,Ra=`border-gray-200 bg-gray-100 text-gray-400`,za=`bg-indigo-300`,Ba=`bg-emerald-500`,Va=`bg-gray-300`,Ha=`absolute z-20 left-0 top-full rounded-md bg-white border border-gray-200 shadow-lg`,Ua=`rounded-md p-1.5`,Wa=`h-30 overflow-y-auto border border-gray-200 rounded-md [&::-webkit-scrollbar]:w-0 [scrollbar-width:none]`,Ga=`h-30 overflow-y-auto border border-gray-200 rounded-md flex flex-col justify-center`,Ka=`block text-xs font-semibold text-gray-500 mb-1 text-center`,qa=`px-3 py-1 text-center text-xs font-medium text-gray-700 rounded cursor-pointer hover:bg-indigo-100 hover:text-gray-600 transition-colors duration-150`;function Ja(e){return e?`bg-indigo-500 text-white font-medium`:``}var Q={INPUT_BASE_TITLE:fa,INPUT_CHECK_BASE_TITLE:xa,LABEL_DISABLED_STATIC:ua,LABEL_ENABLED_STATIC:da,INPUT_BASE:pa,inputValidateClass:ma,inputLabelClass:e=>[Q.INPUT_BASE_TITLE,e?Q.LABEL_DISABLED_STATIC:Q.LABEL_ENABLED_STATIC],inputDescriptionClass:(e,t=!0)=>[`block w-full text-sm`,t&&`text-right`,e===!1?Q.ICON_INVALID:e===!0?Q.ICON_VALID:Q.LABEL_DISABLED_STATIC],SELECT_DISABLED:ha,SELECT_DROPDOWN:ga,SELECT_OPTION_BASE:_a,selectOptionClass:ba,SELECT_EMPTY:va,SELECT_OPTGROUP:ya,inputCheckLabelClass:e=>[Q.INPUT_CHECK_BASE_TITLE,e?Q.LABEL_DISABLED_STATIC:Q.LABEL_ENABLED_STATIC],CHECK_BOX_BASE:Sa,RADIO_BASE:Ca,SWITCH_BASE:wa,checkBoxClass:Ta,radioClass:Ea,switchClass:Da,switchDotClass:Oa,PAGINATION_NAV_PREV:ja,PAGINATION_NAV_NEXT:Ma,PAGINATION_PAGE_BASE:Na,PAGINATION_SUMMARY:Aa,paginationPageClass:(e,t,n)=>[Q.PAGINATION_PAGE_BASE,n===0?``:`border-l-0`,e===t?`bg-indigo-100 border-indigo-300 text-indigo-700`:e===`...`?`cursor-default bg-white border-gray-200 text-gray-400`:`bg-white hover:bg-indigo-50 border-gray-200 hover:border-indigo-200`],LOADER_ARC_STROKE:Pa,LOADER_MESSAGE:Fa,FILE_BUTTON_BASE:Ia,FILE_BUTTON_ACTIVE:La,FILE_BUTTON_DISABLED:Ra,FILE_ICON_BG:za,FILE_ICON_BG_COMPLETE:Ba,FILE_ICON_BG_DISABLED:Va,TIME_PICKER_WRAPPER:Ha,TIME_PICKER_CONTAINER:Ua,TIME_PICKER_COLUMN:Wa,TIME_PICKER_AMPM_COLUMN:Ga,TIME_PICKER_COLUMN_LABEL:Ka,TIME_PICKER_ITEM:qa,timePickerItemClass:Ja,REQUIRED_ASTERISK:$i,ICON_VALID:ea,ICON_INVALID:ta,ICON_STATIC:na,ICON_SIZE_STATIC:ra,ICON_STATIC_HOVER:ia,ICON_STATIC_ACTIVE:aa,ICON_STATIC_GROUP_HOVER:oa,ICON_TRANSITION:sa,iconInteractiveClass:ca,iconGroupInteractiveClass:la};function Ya(e={}){Object.assign(Q,e)}var Xa=class e{static type={success:`success`,error:`error`,warning:`warning`,info:`info`,neutral:`neutral`};static container=null;static iconMap={success:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 640"><path d="M320 576C178.6 576 64 461.4 64 320C64 178.6 178.6 64 320 64C461.4 64 576 178.6 576 320C576 461.4 461.4 576 320 576zM438 209.7C427.3 201.9 412.3 204.3 404.5 215L285.1 379.2L233 327.1C223.6 317.7 208.4 317.7 199.1 327.1C189.8 336.5 189.7 351.7 199.1 361L271.1 433C276.1 438 282.9 440.5 289.9 440C296.9 439.5 303.3 435.9 307.4 430.2L443.3 243.2C451.1 232.5 448.7 217.5 438 209.7z"/></svg>`,error:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 640"><path d="M320 576C461.4 576 576 461.4 576 320C576 178.6 461.4 64 320 64C178.6 64 64 178.6 64 320C64 461.4 178.6 576 320 576zM231 231C240.4 221.6 255.6 221.6 264.9 231L319.9 286L374.9 231C384.3 221.6 399.5 221.6 408.8 231C418.1 240.4 418.2 255.6 408.8 264.9L353.8 319.9L408.8 374.9C418.2 384.3 418.2 399.5 408.8 408.8C399.4 418.1 384.2 418.2 374.9 408.8L319.9 353.8L264.9 408.8C255.5 418.2 240.3 418.2 231 408.8C221.7 399.4 221.6 384.2 231 374.9L286 319.9L231 264.9C221.6 255.5 221.6 240.3 231 231z"/></svg>`,warning:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 640"><path d="M320 576C178.6 576 64 461.4 64 320C64 178.6 178.6 64 320 64C461.4 64 576 178.6 576 320C576 461.4 461.4 576 320 576zM320 384C302.3 384 288 398.3 288 416C288 433.7 302.3 448 320 448C337.7 448 352 433.7 352 416C352 398.3 337.7 384 320 384zM320 192C301.8 192 287.3 207.5 288.6 225.7L296 329.7C296.9 342.3 307.4 352 319.9 352C332.5 352 342.9 342.3 343.8 329.7L351.2 225.7C352.5 207.5 338.1 192 319.8 192z"/></svg>`,info:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 640"><path d="M320 576C461.4 576 576 461.4 576 320C576 178.6 461.4 64 320 64C178.6 64 64 178.6 64 320C64 461.4 178.6 576 320 576zM288 224C288 206.3 302.3 192 320 192C337.7 192 352 206.3 352 224C352 241.7 337.7 256 320 256C302.3 256 288 241.7 288 224zM280 288L328 288C341.3 288 352 298.7 352 312L352 400L360 400C373.3 400 384 410.7 384 424C384 437.3 373.3 448 360 448L280 448C266.7 448 256 437.3 256 424C256 410.7 266.7 400 280 400L304 400L304 336L280 336C266.7 336 256 325.3 256 312C256 298.7 266.7 288 280 288z"/></svg>`,neutral:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 640"><path d="M64 320C64 178.6 178.6 64 320 64C461.4 64 576 178.6 576 320C576 461.4 461.4 576 320 576C178.6 576 64 461.4 64 320zM272 272C272 254.3 257.7 240 240 240C222.3 240 208 254.3 208 272C208 289.7 222.3 304 240 304C257.7 304 272 289.7 272 272zM400 304C417.7 304 432 289.7 432 272C432 254.3 417.7 240 400 240C382.3 240 368 254.3 368 272C368 289.7 382.3 304 400 304z"/></svg>`};static#e(t,n,r=e.type.info,i=4e3){e.ensureContainer();let a=document.createElement(`div`);a.className=`alert alert-${r}`,a.innerHTML=`
|
|
560
560
|
<div class="alert-icon">${e.iconMap[r]||``}</div>
|
|
561
561
|
<div class="alert-texts">
|
|
562
562
|
<div class="alert-title">${t}</div>
|
|
@@ -565,4 +565,4 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
565
565
|
<div class="alert-close">×</div>
|
|
566
566
|
`,a.querySelector(`.alert-close`).addEventListener(`click`,()=>{e.remove(a)}),e.container.appendChild(a),setTimeout(()=>a.classList.add(`show`),10),i>0&&setTimeout(()=>e.remove(a),i)}static success(e,t=``){this.#e(e,t,this.type.success)}static error(e,t=``){this.#e(e,t,this.type.error)}static warning(e,t=``){this.#e(e,t,this.type.warning)}static info(e,t=``){this.#e(e,t,this.type.info)}static neutral(e,t=``){this.#e(e,t,this.type.neutral)}static ensureContainer(){this.container||(this.container=document.createElement(`div`),this.container.className=`alert-container`,document.body.appendChild(this.container))}static remove(e){e.classList.add(`hide`),setTimeout(()=>e.remove(),250)}},Za=class e{static overlay=null;static dialogBox=null;static isOpen=!1;static#e(t,n=``){e.isOpen&&e.finish(!0),e.isOpen=!0,e.overlay=document.createElement(`div`),e.overlay.className=`dialog-overlay`,e.dialogBox=document.createElement(`div`),e.dialogBox.className=`dialog-box`;let r=`
|
|
567
567
|
<div class="dialog-title">${t}</div>
|
|
568
|
-
<div class="dialog-description">${n}</div>`;e.dialogBox.innerHTML=r,e.overlay.appendChild(e.dialogBox),document.body.appendChild(e.overlay),setTimeout(()=>e.overlay.classList.add(`show`),10),document.addEventListener(`keydown`,e.#t)}static#t(t){e.isOpen&&t.key===`Escape`&&(e.dialogBox.classList.add(`dialog-shake`),setTimeout(()=>{e.dialogBox?.classList.remove(`dialog-shake`)},250))}static confirm(t,n=``){e.#e(t,n);let r={_onAccept:null,_onCancel:null,onAccept(e){return this._onAccept=e,this},onCancel(e){return this._onCancel=e,this},show(){return this._renderButtons(),this},_renderButtons(){let t=document.createElement(`div`);t.className=`dialog-buttons`;let n=document.createElement(`button`);n.className=`dialog-btn dialog-btn-cancel`,n.textContent=`Cancelar`;let r=document.createElement(`button`);r.className=`dialog-btn dialog-btn-accept`,r.textContent=`Aceptar`,n.addEventListener(`click`,()=>{e.finish(),this._onCancel&&this._onCancel()}),r.addEventListener(`click`,()=>{e.finish(),this._onAccept&&this._onAccept()}),t.appendChild(n),t.appendChild(r),e.dialogBox.appendChild(t)}};return r._renderButtons(),r}static info(t,n=``){e.#e(t,n);let r={_onConfirm:null,onConfirm(e){return this._onConfirm=e,this},show(){return this._renderButton(),this},_renderButton(){let t=document.createElement(`div`);t.className=`dialog-buttons`;let n=document.createElement(`button`);n.className=`dialog-btn dialog-btn-accept`,n.textContent=`Aceptar`,n.addEventListener(`click`,()=>{e.finish(),this._onConfirm&&this._onConfirm()}),t.appendChild(n),e.dialogBox.appendChild(t)}};return r._renderButton(),r}static loading(t,n=``){e.#e(t,``);let r=e.dialogBox.querySelector(`.dialog-title`);r&&r.remove();let i=e.dialogBox.querySelector(`.dialog-description`);i&&i.remove(),e.dialogBox.style.paddingTop=`1rem`,e.dialogBox.style.paddingBottom=`1rem`;let a=document.createElement(`div`);a.className=`dialog-loading-layout`;let o=document.createElement(`div`);o.className=`dialog-loading-icon`;let s=document.createElement(`div`);s.className=`dialog-loading-spinner`,o.appendChild(s);let c=document.createElement(`div`);c.className=`dialog-loading-texts`;let l=t&&t.trim()!==``,u=n&&n.trim()!==``;if(l){let e=document.createElement(`div`);e.className=`dialog-loading-title`,e.textContent=t,c.appendChild(e)}if(u){let e=document.createElement(`div`);e.className=`dialog-loading-message`,e.textContent=n,c.appendChild(e)}return(l&&!u||!l&&u)&&(c.style.justifyContent=`center`),a.appendChild(o),a.appendChild(c),e.dialogBox.appendChild(a),{close:()=>e.finish(),updateTitle:e=>{let t=c.querySelector(`.dialog-loading-title`);if(t)t.textContent=e;else if(e){let t=document.createElement(`div`);t.className=`dialog-loading-title`,t.textContent=e,c.insertBefore(t,c.firstChild),c.style.justifyContent=`flex-start`}},updateMessage:e=>{let t=c.querySelector(`.dialog-loading-message`);if(t)t.textContent=e;else if(e){let t=document.createElement(`div`);t.className=`dialog-loading-message`,t.textContent=e,c.appendChild(t),c.style.justifyContent=`flex-start`}}}}static finish(t=!1){return new Promise(n=>{if(!e.isOpen||!e.overlay)return n();if(e.isOpen=!1,t){try{e.overlay.remove()}catch{}return e.overlay=null,e.dialogBox=null,document.removeEventListener(`keydown`,e.#t),n()}e.overlay.classList.remove(`show`),setTimeout(()=>{try{e.overlay.remove()}catch{}e.overlay=null,e.dialogBox=null,document.removeEventListener(`keydown`,e.#t),n()},200)})}},Qa=[`enero`,`febrero`,`marzo`,`abril`,`mayo`,`junio`,`julio`,`agosto`,`septiembre`,`octubre`,`noviembre`,`diciembre`],$a={props:{modelValue:[String,Date],label:{type:String,default:``},description:{type:String,default:``},min:{type:String,default:`1900-01-01`},max:{type:String,default:`2100-12-31`},disabledDates:{type:[Array,Object],default:()=>[]},disabled:{type:Boolean,default:!1},readonly:{type:Boolean,default:!1},required:{type:Boolean,default:!1},validate:{type:Boolean,default:null},mclass:{type:String,default:null}},data(){return{uuid:Z.getUUID(),localDate:`dd/mm/aaaa`,activeSection:`day`,dayDigits:``,monthDigits:``,yearDigits:``,sectionSelected:!1,showPicker:!1,dropdownStyle:{},calendarView:`days`,yearRangeStart:new Date().getFullYear()-6,calendarYear:new Date().getFullYear(),calendarMonth:new Date().getMonth(),selectedDate:null}},computed:{model:{get(){return this.modelValue},set(e){this.$emit(`update:modelValue`,e),this.$emit(`change`,e)}},minDateObj(){if(!this.min)return null;let[e,t,n]=this.min.split(`-`).map(Number);return new Date(e,t-1,n)},maxDateObj(){if(!this.max)return null;let[e,t,n]=this.max.split(`-`).map(Number);return new Date(e,t-1,n)},isPrevDisabled(){if(!this.minDateObj)return!1;let e=this.minDateObj;return this.calendarView===`days`?this.calendarYear<e.getFullYear()||this.calendarYear===e.getFullYear()&&this.calendarMonth<=e.getMonth():this.calendarView===`months`?this.calendarYear<=e.getFullYear():this.yearRangeStart<=e.getFullYear()},isNextDisabled(){if(!this.maxDateObj)return!1;let e=this.maxDateObj;return this.calendarView===`days`?this.calendarYear>e.getFullYear()||this.calendarYear===e.getFullYear()&&this.calendarMonth>=e.getMonth():this.calendarView===`months`?this.calendarYear>=e.getFullYear():this.yearRangeStart+11>=e.getFullYear()},labelClass(){return Q.inputLabelClass(this.disabled)},descriptionClass(){return Q.inputDescriptionClass(this.validate)},requiredClass(){return Q.REQUIRED_ASTERISK},iconStaticClass(){return[Q.ICON_SIZE_STATIC,Q.iconInteractiveClass(this.disabled)]}},watch:{showPicker(e){e?(this.$nextTick(()=>this.calculateDropdownPosition()),window.addEventListener(`scroll`,this.calculateDropdownPosition,!0),window.addEventListener(`resize`,this.calculateDropdownPosition)):(window.removeEventListener(`scroll`,this.calculateDropdownPosition,!0),window.removeEventListener(`resize`,this.calculateDropdownPosition))}},methods:{syncDateFromValue(e){if(!e)return this.localDate=`dd/mm/aaaa`,this.dayDigits=``,this.monthDigits=``,this.yearDigits=``,this.selectedDate=null,null;let t=this.parseLocalDate(e);if(!t||isNaN(t))return null;this.selectedDate=t,this.calendarYear=t.getFullYear(),this.calendarMonth=t.getMonth();let n=e=>String(e).padStart(2,`0`);return this.dayDigits=n(t.getDate()),this.monthDigits=n(t.getMonth()+1),this.yearDigits=String(t.getFullYear()),t},prevPeriod(){this.isPrevDisabled||(this.calendarView===`days`?this.calendarMonth===0?(this.calendarMonth=11,this.calendarYear--):this.calendarMonth--:this.calendarView===`months`?this.calendarYear--:this.yearRangeStart-=12)},nextPeriod(){this.isNextDisabled||(this.calendarView===`days`?this.calendarMonth===11?(this.calendarMonth=0,this.calendarYear++):this.calendarMonth++:this.calendarView===`months`?this.calendarYear++:this.yearRangeStart+=12)},selectMonth(e){this.calendarMonth=e,this.calendarView=`days`},selectYear(e){this.calendarYear=e,this.calendarView=`days`},isDayDisabled(e){let t=new Date(e.year,e.month,e.day);return this.minDateObj&&t<this.minDateObj||this.maxDateObj&&t>this.maxDateObj?!0:Array.isArray(this.disabledDates)?this.disabledDates.some(e=>{let n=new Date(e);return n.getFullYear()===t.getFullYear()&&n.getMonth()===t.getMonth()&&n.getDate()===t.getDate()}):!1},selectDay(e){if(this.isDayDisabled(e))return;let t=e=>String(e).padStart(2,`0`),n=t(e.day),r=t(e.month+1),i=e.year;this.selectedDate=new Date(i,e.month,e.day),this.dayDigits=n,this.monthDigits=r,this.yearDigits=String(i),this.localDate=`${n}/${r}/${i}`,this.model=`${i}-${r}-${n}`,this.showPicker=!1},goToToday(){let e=new Date;this.calendarYear=e.getFullYear(),this.calendarMonth=e.getMonth(),this.yearRangeStart=e.getFullYear()-6,this.calendarView=`days`},calculateDropdownPosition(){let e=this.$refs.inputWrap;if(!e)return;let t=e.getBoundingClientRect(),n=window.innerHeight-t.bottom,r=t.top,i=n<340&&r>n,a=t.left;a+288>window.innerWidth-8&&(a=Math.max(8,t.right-288));let o={position:`fixed`,left:`${a}px`,zIndex:9999};i?o.bottom=`${window.innerHeight-t.top}px`:o.top=`${t.bottom}px`,this.dropdownStyle=o},togglePicker(){this.disabled||(this.showPicker=!this.showPicker,this.showPicker&&(this.calendarView=`days`,this.calculateDropdownPosition(),this.selectedDate&&(this.calendarYear=this.selectedDate.getFullYear(),this.calendarMonth=this.selectedDate.getMonth(),this.yearRangeStart=this.calendarYear-6)))},handleClickOutside(e){let t=this.$refs.dateTimeContainer&&this.$refs.dateTimeContainer.contains(e.target),n=this.$refs.pickerRef&&this.$refs.pickerRef.contains(e.target);!t&&!n&&(this.showPicker=!1)},emitValue(){let[e,t,n]=this.localDate.split(`/`);if(/^\d{2}$/.test(e)&&/^\d{2}$/.test(t)&&/^\d{4}$/.test(n)){let r=this.getMaxDay(t,n),i=Number(e),a=Number(t);if(a>=1&&a<=12&&i>=1&&i<=r){this.model=`${n}-${t}-${e}`;return}}this.model=``},initMask(){if(!this.localDate||this.localDate===`dd/mm/aaaa`){this.localDate=`dd/mm/aaaa`,this.dayDigits=``,this.monthDigits=``,this.yearDigits=``,this.activeSection=`day`,this.$nextTick(()=>this.$el.querySelector(`input`).setSelectionRange(0,2));return}let e=this.localDate.split(`/`);e.length>=1&&(this.dayDigits=(e[0]||``).replace(/\D/g,``)),e.length>=2&&(this.monthDigits=(e[1]||``).replace(/\D/g,``)),e.length>=3&&(this.yearDigits=(e[2]||``).replace(/\D/g,``).slice(0,4))},handleSectionSelect(e){let t=e.target.selectionStart;t<=2?(this.activeSection=`day`,e.target.setSelectionRange(0,2)):t<=5?(this.activeSection=`month`,e.target.setSelectionRange(3,5)):(this.activeSection=`year`,e.target.setSelectionRange(6,10)),this.sectionSelected=!0},handleCursorMove(e){if(this.sectionSelected)return;let t=e.target.selectionStart;t<=2?this.activeSection=`day`:t<=5?this.activeSection=`month`:this.activeSection=`year`},handleDateKeydown(e){if(this.readonly){e.preventDefault();return}if(e.key===`Backspace`||e.key===`Delete`){e.preventDefault(),this.activeSection===`day`?this.dayDigits=``:this.activeSection===`month`?this.monthDigits=``:this.activeSection===`year`&&(this.yearDigits=``),this.sectionSelected=!1,this._updateDateDisplay(),this.$nextTick(()=>{let e=this.$el.querySelector(`input`);this.activeSection===`day`?e.setSelectionRange(0,2):this.activeSection===`month`?e.setSelectionRange(3,5):e.setSelectionRange(6,10)});return}if(e.key===`ArrowRight`||e.key===`ArrowLeft`){e.preventDefault();let t=[`day`,`month`,`year`],n=t.indexOf(this.activeSection);this.activeSection=e.key===`ArrowRight`?t[Math.min(n+1,t.length-1)]:t[Math.max(n-1,0)],this.sectionSelected=!0,this.$nextTick(()=>{let e=this.$el.querySelector(`input`);this.activeSection===`day`?e.setSelectionRange(0,2):this.activeSection===`month`?e.setSelectionRange(3,5):e.setSelectionRange(6,10)});return}if(e.key===`ArrowUp`||e.key===`ArrowDown`){e.preventDefault(),this._nudgeDateSection(e.key===`ArrowUp`?1:-1),this._updateDateDisplay(),this.$nextTick(()=>{let e=this.$el.querySelector(`input`);this.activeSection===`day`?e.setSelectionRange(0,2):this.activeSection===`month`?e.setSelectionRange(3,5):e.setSelectionRange(6,10)});return}if(e.key===`Tab`){let t=[`day`,`month`,`year`],n=t.indexOf(this.activeSection),r=e.shiftKey?n-1:n+1;if(r<0||r>=t.length)return;e.preventDefault(),this.activeSection=t[r],this.sectionSelected=!0,this.$nextTick(()=>{let e=this.$el.querySelector(`input`);this.activeSection===`day`?e.setSelectionRange(0,2):this.activeSection===`month`?e.setSelectionRange(3,5):e.setSelectionRange(6,10)});return}if(![`Home`,`End`].includes(e.key)){if(!/^[0-9]$/.test(e.key)){e.preventDefault();return}e.preventDefault(),this.sectionSelected&&=(this.activeSection===`day`?this.dayDigits=``:this.activeSection===`month`?this.monthDigits=``:this.activeSection===`year`&&(this.yearDigits=``),!1),this._typeDateSection(e.key),this._updateDateDisplay(),this.$nextTick(()=>{let e=this.$el.querySelector(`input`);this.activeSection===`month`?e.setSelectionRange(3,5):this.activeSection===`year`&&e.setSelectionRange(6,10)})}},_nudgeDateSection(e){let t=e=>String(e).padStart(2,`0`);if(this.activeSection===`day`){let n=this.getMaxDay(this.monthDigits,this.yearDigits),r=(parseInt(this.dayDigits)||1)+e;r<1&&(r=n),r>n&&(r=1),this.dayDigits=t(r)}else if(this.activeSection===`month`){let n=(parseInt(this.monthDigits)||1)+e;n<1&&(n=12),n>12&&(n=1),this.monthDigits=t(n);let r=this.getMaxDay(this.monthDigits,this.yearDigits);parseInt(this.dayDigits)>r&&(this.dayDigits=t(r))}else if(this.activeSection===`year`){let n=(parseInt(this.yearDigits)||new Date().getFullYear())+e;n<1&&(n=1),this.yearDigits=String(n);let r=this.getMaxDay(this.monthDigits,this.yearDigits);parseInt(this.dayDigits)>r&&(this.dayDigits=t(r))}this._clampToBounds()},_clampToBounds(){if(this.dayDigits.length!==2||this.monthDigits.length!==2||this.yearDigits.length!==4)return;let e=e=>String(e).padStart(2,`0`),t=new Date(Number(this.yearDigits),Number(this.monthDigits)-1,Number(this.dayDigits)),n=null;this.minDateObj&&t<this.minDateObj?n=this.minDateObj:this.maxDateObj&&t>this.maxDateObj&&(n=this.maxDateObj),n&&(this.dayDigits=e(n.getDate()),this.monthDigits=e(n.getMonth()+1),this.yearDigits=String(n.getFullYear()))},_typeDateSection(e){let t=e=>String(e).padStart(2,`0`);if(this.activeSection===`day`){if(this.dayDigits+=e,this.dayDigits=this.dayDigits.slice(-2),this.dayDigits.length===1&&Number(this.dayDigits)>=4&&(this.dayDigits=t(this.dayDigits)),this.dayDigits.length===2){let e=this.getMaxDay(this.monthDigits,this.yearDigits);this.dayDigits=t(Math.max(1,Math.min(Number(this.dayDigits),e))),this.activeSection=`month`,this.sectionSelected=!0}}else if(this.activeSection===`month`)this.monthDigits+=e,this.monthDigits=this.monthDigits.slice(-2),this.monthDigits.length===1&&Number(this.monthDigits)>=2&&(this.monthDigits=t(this.monthDigits)),this.monthDigits.length===2&&(this.monthDigits=t(Math.max(1,Math.min(Number(this.monthDigits),12))),this.activeSection=`year`,this.sectionSelected=!0);else if(this.activeSection===`year`&&(this.yearDigits+=e,this.yearDigits=this.yearDigits.slice(-4),this.yearDigits.length===4)){let e=this.getMaxDay(this.monthDigits,this.yearDigits);Number(this.dayDigits)>e&&(this.dayDigits=t(e))}},_updateDateDisplay(){let e=this.dayDigits.length===0?`dd`:this.dayDigits.padStart(2,`0`),t=this.monthDigits.length===0?`mm`:this.monthDigits.padStart(2,`0`),n=this.yearDigits.padEnd(4,`a`);this.localDate=`${e}/${t}/${n}`},getMaxDay(e,t){return e=Number(e),t=Number(t)||new Date().getFullYear(),e?new Date(t,e,0).getDate():31},parseLocalDate(e){if(!e)return null;let[t,n]=e.split(`T`);if(!t)return null;let[r,i,a]=t.split(`-`).map(Number);if(!n)return new Date(r,i-1,a,12,0,0);let[o=0,s=0]=n.split(`.`)[0].split(`:`).map(Number);return new Date(r,i-1,a,o,s,0)}},mounted(){document.addEventListener(`mousedown`,this.handleClickOutside)},beforeUnmount(){document.removeEventListener(`mousedown`,this.handleClickOutside),window.removeEventListener(`scroll`,this.calculateDropdownPosition,!0),window.removeEventListener(`resize`,this.calculateDropdownPosition)}},$=(e,t)=>{let n=e.__vccOpts||e;for(let[e,r]of t)n[e]=r;return n},eo={name:`CalendarPicker`,props:{view:{type:String,required:!0},year:{type:Number,required:!0},month:{type:Number,required:!0},yearRangeStart:{type:Number,required:!0},selectedDate:{type:Date,default:null},minDate:{type:Date,default:null},maxDate:{type:Date,default:null},disabledDates:{type:[Array,Object],default:()=>[]},isPrevDisabled:{type:Boolean,default:!1},isNextDisabled:{type:Boolean,default:!1},widthClass:{type:String,default:`w-56`}},emits:[`update:view`,`prev`,`next`,`select-day`,`select-month`,`select-year`],computed:{MONTH_NAMES(){return Qa},weekDays(){return[`L`,`M`,`X`,`J`,`V`,`S`,`D`]},yearRange(){return Array.from({length:12},(e,t)=>this.yearRangeStart+t)},yearRangeLabel(){return`${this.yearRangeStart} – ${this.yearRangeStart+11}`},calendarCells(){let e=(new Date(this.year,this.month,1).getDay()+6)%7,t=new Date(this.year,this.month+1,0).getDate(),n=[];for(let t=0;t<e;t++)n.push(null);for(let e=1;e<=t;e++)n.push({day:e,month:this.month,year:this.year});return n}},methods:{isDaySelected(e){return this.selectedDate?e.day===this.selectedDate.getDate()&&e.month===this.selectedDate.getMonth()&&e.year===this.selectedDate.getFullYear():!1},isDayToday(e){let t=new Date;return e.day===t.getDate()&&e.month===t.getMonth()&&e.year===t.getFullYear()},isDayDisabled(e){let t=new Date(e.year,e.month,e.day);return this.minDate&&t<this.minDate||this.maxDate&&t>this.maxDate?!0:Array.isArray(this.disabledDates)?this.disabledDates.some(e=>{let n=new Date(e);return n.getFullYear()===t.getFullYear()&&n.getMonth()===t.getMonth()&&n.getDate()===t.getDate()}):!1}}},to={class:`flex items-center justify-between mb-1 px-1`},no=[`disabled`],ro={class:`flex items-center gap-1 select-none`},io={key:2,class:`text-sm font-bold text-gray-800 leading-none`},ao=[`disabled`],oo={class:`grid grid-cols-7 mb-0.5`},so={class:`grid grid-cols-7`},co=[`onClick`,`disabled`],lo={key:1,class:`w-7 h-7`},uo={key:1,class:`grid grid-cols-3 gap-2`},fo=[`onClick`],po={key:2,class:`grid grid-cols-3 gap-2`},mo=[`onClick`];function ho(e,n,r,i,a,o){let s=(0,t.resolveComponent)(`font-awesome-icon`);return(0,t.openBlock)(),(0,t.createElementBlock)(`div`,{class:(0,t.normalizeClass)([`bg-white border border-gray-200 rounded-md shadow-lg p-1.5`,r.widthClass])},[(0,t.createElementVNode)(`div`,to,[(0,t.createElementVNode)(`button`,{type:`button`,onClick:n[0]||=t=>e.$emit(`prev`),disabled:r.isPrevDisabled,class:(0,t.normalizeClass)([`flex items-center justify-center w-6 h-6 rounded-full transition-colors`,r.isPrevDisabled?`opacity-30 cursor-not-allowed`:`hover:bg-gray-100 cursor-pointer`])},[(0,t.createVNode)(s,{icon:`fa-solid fa-chevron-left`,class:`w-2.5 h-2.5 text-gray-500`})],10,no),(0,t.createElementVNode)(`div`,ro,[r.view===`days`?((0,t.openBlock)(),(0,t.createElementBlock)(t.Fragment,{key:0},[(0,t.createElementVNode)(`button`,{type:`button`,onClick:n[1]||=t=>e.$emit(`update:view`,`months`),class:`text-sm font-bold text-gray-800 capitalize hover:text-indigo-500 transition-colors cursor-pointer leading-none`},(0,t.toDisplayString)(o.MONTH_NAMES[r.month]),1),(0,t.createElementVNode)(`button`,{type:`button`,onClick:n[2]||=t=>e.$emit(`update:view`,`years`),class:`text-sm font-bold text-gray-800 hover:text-indigo-500 transition-colors cursor-pointer leading-none`},(0,t.toDisplayString)(r.year),1)],64)):r.view===`months`?((0,t.openBlock)(),(0,t.createElementBlock)(`button`,{key:1,type:`button`,onClick:n[3]||=t=>e.$emit(`update:view`,`years`),class:`text-sm font-bold text-gray-800 hover:text-indigo-500 transition-colors cursor-pointer leading-none`},(0,t.toDisplayString)(r.year),1)):((0,t.openBlock)(),(0,t.createElementBlock)(`span`,io,(0,t.toDisplayString)(o.yearRangeLabel),1))]),(0,t.createElementVNode)(`button`,{type:`button`,onClick:n[4]||=t=>e.$emit(`next`),disabled:r.isNextDisabled,class:(0,t.normalizeClass)([`flex items-center justify-center w-6 h-6 rounded-full transition-colors`,r.isNextDisabled?`opacity-30 cursor-not-allowed`:`hover:bg-gray-100 cursor-pointer`])},[(0,t.createVNode)(s,{icon:`fa-solid fa-chevron-right`,class:`w-2.5 h-2.5 text-gray-500`})],10,ao)]),r.view===`days`?((0,t.openBlock)(),(0,t.createElementBlock)(t.Fragment,{key:0},[(0,t.createElementVNode)(`div`,oo,[((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(o.weekDays,e=>((0,t.openBlock)(),(0,t.createElementBlock)(`div`,{key:e,class:`flex items-center justify-center text-xs font-semibold text-gray-500 h-6`},(0,t.toDisplayString)(e),1))),128))]),(0,t.createElementVNode)(`div`,so,[((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(o.calendarCells,(n,r)=>((0,t.openBlock)(),(0,t.createElementBlock)(`div`,{key:r,class:`flex items-center justify-center`},[n?((0,t.openBlock)(),(0,t.createElementBlock)(`button`,{key:0,type:`button`,onClick:t=>e.$emit(`select-day`,n),disabled:o.isDayDisabled(n),class:(0,t.normalizeClass)([`w-7 h-7 flex items-center justify-center text-xs font-medium rounded-full transition-colors duration-150 select-none p-0 leading-none`,o.isDaySelected(n)?`bg-indigo-500 text-white`:o.isDayToday(n)?`border border-indigo-500 text-indigo-500 hover:bg-indigo-50`:o.isDayDisabled(n)?`text-gray-300 cursor-not-allowed`:`text-gray-600 hover:bg-indigo-100 cursor-pointer`])},(0,t.toDisplayString)(n.day),11,co)):((0,t.openBlock)(),(0,t.createElementBlock)(`span`,lo))]))),128))])],64)):r.view===`months`?((0,t.openBlock)(),(0,t.createElementBlock)(`div`,uo,[((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(o.MONTH_NAMES,(n,i)=>((0,t.openBlock)(),(0,t.createElementBlock)(`button`,{key:i,type:`button`,onClick:t=>e.$emit(`select-month`,i),class:(0,t.normalizeClass)([`flex items-center justify-center h-8 text-xs font-medium rounded-lg capitalize transition-colors cursor-pointer border border-gray-300`,i===r.month?`bg-indigo-500 text-white`:`text-gray-600 hover:bg-indigo-100`])},(0,t.toDisplayString)(n),11,fo))),128))])):r.view===`years`?((0,t.openBlock)(),(0,t.createElementBlock)(`div`,po,[((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(o.yearRange,n=>((0,t.openBlock)(),(0,t.createElementBlock)(`button`,{key:n,type:`button`,onClick:t=>e.$emit(`select-year`,n),class:(0,t.normalizeClass)([`flex items-center justify-center h-8 text-xs font-medium rounded-lg transition-colors cursor-pointer border border-gray-300`,n===r.year?`bg-indigo-500 text-white`:`text-gray-600 hover:bg-indigo-100`])},(0,t.toDisplayString)(n),11,mo))),128))])):(0,t.createCommentVNode)(``,!0),(0,t.renderSlot)(e.$slots,`footer`)],2)}var go=$(eo,[[`render`,ho]]),_o={name:`InputDateStyle`,mixins:[$a],components:{CalendarPicker:go},computed:{inputClass(){return[this.mclass,Q.INPUT_BASE,Q.inputValidateClass(this.validate),`pr-10`]}},watch:{modelValue:{immediate:!0,handler(e){this.syncDateFromValue(e)&&(this.localDate=`${this.dayDigits}/${this.monthDigits}/${this.yearDigits}`)}}}},vo={class:`w-full`,ref:`dateTimeContainer`},yo=[`for`],bo={class:`relative`,ref:`inputWrap`},xo=[`id`],So={class:`flex justify-center p-1`};function Co(e,n,r,i,a,o){let s=(0,t.resolveComponent)(`font-awesome-icon`),c=(0,t.resolveComponent)(`CalendarPicker`);return(0,t.openBlock)(),(0,t.createElementBlock)(`div`,vo,[(0,t.createElementVNode)(`label`,{class:(0,t.normalizeClass)(e.labelClass),for:e.uuid},[(0,t.createTextVNode)((0,t.toDisplayString)(e.label)+` `,1),e.required?((0,t.openBlock)(),(0,t.createElementBlock)(`span`,{key:0,class:(0,t.normalizeClass)(e.requiredClass)},`*`,2)):(0,t.createCommentVNode)(``,!0)],10,yo),(0,t.createElementVNode)(`div`,bo,[(0,t.withDirectives)((0,t.createElementVNode)(`input`,(0,t.mergeProps)({id:e.uuid,type:`text`,inputmode:`numeric`,maxlength:`10`,"onUpdate:modelValue":n[0]||=t=>e.localDate=t},{disabled:e.disabled,required:e.required,readonly:e.readonly},{onFocus:n[1]||=(...t)=>e.initMask&&e.initMask(...t),onMouseup:n[2]||=(...t)=>e.handleSectionSelect&&e.handleSectionSelect(...t),onPaste:n[3]||=(0,t.withModifiers)(()=>{},[`prevent`]),onKeydown:n[4]||=(...t)=>e.handleDateKeydown&&e.handleDateKeydown(...t),onKeyup:n[5]||=(...t)=>e.handleCursorMove&&e.handleCursorMove(...t),onBlur:n[6]||=(...t)=>e.emitValue&&e.emitValue(...t),class:o.inputClass}),null,16,xo),[[t.vModelText,e.localDate]]),(0,t.createElementVNode)(`span`,{onClick:n[7]||=(...t)=>e.togglePicker&&e.togglePicker(...t),class:(0,t.normalizeClass)([`absolute right-3 top-1/2 -translate-y-1/2`,e.disabled?`cursor-not-allowed`:`cursor-pointer`])},[(0,t.createVNode)(s,{icon:`fa-solid fa-calendar`,class:(0,t.normalizeClass)(e.iconStaticClass)},null,8,[`class`])],2),((0,t.openBlock)(),(0,t.createBlock)(t.Teleport,{to:`body`},[e.showPicker?((0,t.openBlock)(),(0,t.createElementBlock)(`div`,{key:0,ref:`pickerRef`,style:(0,t.normalizeStyle)(e.dropdownStyle),onClick:n[10]||=(0,t.withModifiers)(()=>{},[`stop`])},[(0,t.createVNode)(c,{view:e.calendarView,"onUpdate:view":n[9]||=t=>e.calendarView=t,year:e.calendarYear,month:e.calendarMonth,"year-range-start":e.yearRangeStart,"selected-date":e.selectedDate,"min-date":e.minDateObj,"max-date":e.maxDateObj,"disabled-dates":e.disabledDates,"is-prev-disabled":e.isPrevDisabled,"is-next-disabled":e.isNextDisabled,"width-class":`w-56`,onPrev:e.prevPeriod,onNext:e.nextPeriod,onSelectDay:e.selectDay,onSelectMonth:e.selectMonth,onSelectYear:e.selectYear},{footer:(0,t.withCtx)(()=>[(0,t.createElementVNode)(`div`,So,[(0,t.createElementVNode)(`button`,{type:`button`,onClick:n[8]||=(...t)=>e.goToToday&&e.goToToday(...t),class:`w-full text-xs text-gray-600 font-semibold py-0.5 rounded-md bg-white hover:bg-indigo-50 border border-gray-300 cursor-pointer focus:outline-none focus:ring-2 focus:ring-indigo-200 disabled:bg-gray-100 disabled:text-gray-600 disabled:cursor-not-allowed`},` Hoy `)])]),_:1},8,[`view`,`year`,`month`,`year-range-start`,`selected-date`,`min-date`,`max-date`,`disabled-dates`,`is-prev-disabled`,`is-next-disabled`,`onPrev`,`onNext`,`onSelectDay`,`onSelectMonth`,`onSelectYear`])],4)):(0,t.createCommentVNode)(``,!0)]))],512),e.description?((0,t.openBlock)(),(0,t.createElementBlock)(`span`,{key:0,class:(0,t.normalizeClass)(e.descriptionClass)},(0,t.toDisplayString)(e.description),3)):(0,t.createCommentVNode)(``,!0)],512)}var wo=$(_o,[[`render`,Co],[`__scopeId`,`data-v-756569d8`]]),To={name:`InputTimeStyle`,props:{modelValue:String,label:{type:String,default:``},description:{type:String,default:``},min:{type:String,default:null},max:{type:String,default:null},disabled:{type:Boolean,default:!1},required:{type:Boolean,default:!1},validate:{type:Boolean,default:null},is24h:{type:Boolean,default:!1},mclass:{type:String,default:null},nested:{type:Boolean,default:!1}},data(){return{uuid:Z.getUUID(),localTime:``,showPicker:!1,dropdownPosition:`bottom`,dropdownHorizontal:`left`,dropdownStyle:{},_hourJumping:!1,_minuteJumping:!1,selectedHour:null,selectedMinute:null,selectedPeriod:`AM`}},computed:{labelClass(){return Q.inputLabelClass(this.disabled)},inputClass(){return[this.mclass,Q.INPUT_BASE,`pr-10`,Q.inputValidateClass(this.validate)]},descriptionClass(){return Q.inputDescriptionClass(this.validate)},requiredClass(){return Q.REQUIRED_ASTERISK},iconStaticClass(){return[Q.ICON_SIZE_STATIC,Q.iconInteractiveClass(this.disabled)]},hoursList(){let e=this.is24h?24:12;return Array.from({length:e},(e,t)=>this.is24h?String(t).padStart(2,`0`):String(t+1).padStart(2,`0`))},hours3x(){return[...this.hoursList,...this.hoursList,...this.hoursList]},minutesList(){return Array.from({length:60},(e,t)=>String(t).padStart(2,`0`))},minutes3x(){return[...this.minutesList,...this.minutesList,...this.minutesList]},pickerWrapperClass(){let e=Q.TIME_PICKER_WRAPPER.replace(`top-full`,``).replace(`left-0`,``);return this.nested?[e,this.dropdownPosition===`top`?`bottom-full`:`top-full`,this.dropdownHorizontal===`right`?`right-0`:`left-0`]:[e.replace(`absolute`,``).replace(`z-20`,``)]},pickerContainerClass(){return Q.TIME_PICKER_CONTAINER},pickerColumnClass(){return Q.TIME_PICKER_COLUMN},pickerAmpmColumnClass(){return Q.TIME_PICKER_AMPM_COLUMN},pickerColumnLabelClass(){return Q.TIME_PICKER_COLUMN_LABEL},pickerItemClass(){return Q.TIME_PICKER_ITEM}},watch:{modelValue:{immediate:!0,handler(e){if(this.localTime=e||``,!e)return;let[t,n]=e.split(`:`),r=parseInt(t);this.is24h?this.selectedHour=t:(this.selectedPeriod=r>=12?`PM`:`AM`,r%=12,r===0&&(r=12),this.selectedHour=String(r).padStart(2,`0`)),this.selectedMinute=n}},showPicker(e){this.nested||(e?(this.$nextTick(()=>this.positionDropdown()),window.addEventListener(`scroll`,this.positionDropdown,!0),window.addEventListener(`resize`,this.positionDropdown)):(window.removeEventListener(`scroll`,this.positionDropdown,!0),window.removeEventListener(`resize`,this.positionDropdown)))}},methods:{itemActiveClass(e){return Q.timePickerItemClass(e)},selectHour(e){this.selectedHour=e,this.updateFromPicker()},selectMinute(e){this.selectedMinute=e,this.updateFromPicker()},selectPeriod(e){this.selectedPeriod=e,this.updateFromPicker()},scrollToSelected(){this.$nextTick(()=>{requestAnimationFrame(()=>{let e=this.is24h?`00`:`12`;this._scrollColToValue(this.$refs.hourCol,this.hoursList,this.selectedHour||e),this._scrollColToValue(this.$refs.minuteCol,this.minutesList,this.selectedMinute||`00`)})})},_scrollColToValue(e,t,n){if(!e||!n)return;let r=t.indexOf(n);if(r<0)return;let i=e.scrollHeight/3,a=i/t.length;e.scrollTop=i+r*a-e.clientHeight/2+a/2},onHourScroll(e){if(this._hourJumping)return;let t=e.target,n=t.scrollHeight/3;t.scrollTop<n*.3?(this._hourJumping=!0,t.scrollTop+=n,this.$nextTick(()=>{this._hourJumping=!1})):t.scrollTop>n*1.7&&(this._hourJumping=!0,t.scrollTop-=n,this.$nextTick(()=>{this._hourJumping=!1}))},onMinuteScroll(e){if(this._minuteJumping)return;let t=e.target,n=t.scrollHeight/3;t.scrollTop<n*.3?(this._minuteJumping=!0,t.scrollTop+=n,this.$nextTick(()=>{this._minuteJumping=!1})):t.scrollTop>n*1.7&&(this._minuteJumping=!0,t.scrollTop-=n,this.$nextTick(()=>{this._minuteJumping=!1}))},calculateDropdownPosition(){let e=this.$refs.timeContainer;if(!e)return;let t=e.getBoundingClientRect(),n=window.innerHeight-t.bottom,r=t.top;this.dropdownPosition=n<220&&r>n?`top`:`bottom`;let i=window.innerWidth-t.left;this.dropdownHorizontal=i<240&&t.right>=240?`right`:`left`},positionDropdown(){if(this.nested)return;let e=this.$refs.inputWrap;if(!e)return;let t=e.getBoundingClientRect(),n=this.is24h?180:240,r=window.innerHeight-t.bottom,i=t.top,a=r<220&&i>r,o=t.left;o+n>window.innerWidth-8&&(o=Math.max(8,t.right-n));let s={position:`fixed`,left:`${o}px`,width:`${n}px`,zIndex:9999};a?s.bottom=`${window.innerHeight-t.top}px`:s.top=`${t.bottom}px`,this.dropdownStyle=s},togglePicker(){this.disabled||(this.nested?this.calculateDropdownPosition():this.positionDropdown(),this.showPicker=!this.showPicker,this.showPicker&&this.scrollToSelected())},handleClickOutside(e){let t=this.$refs.timeContainer&&this.$refs.timeContainer.contains(e.target),n=this.$refs.pickerRef&&this.$refs.pickerRef.contains(e.target);!t&&!n&&(this.showPicker=!1)},updateFromPicker(){if(!this.selectedHour||this.selectedMinute===null)return;let e=parseInt(this.selectedHour);this.is24h||(this.selectedPeriod===`PM`&&e<12&&(e+=12),this.selectedPeriod===`AM`&&e===12&&(e=0));let t=String(e).padStart(2,`0`)+`:`+this.selectedMinute;this.localTime=t,this.updateValue(t)},updateValue(e,t=!1){this.$emit(`update:modelValue`,e),this.$emit(`change`,e),t&&this.$emit(`blur`,e)}},mounted(){document.addEventListener(`mousedown`,this.handleClickOutside)},beforeUnmount(){document.removeEventListener(`mousedown`,this.handleClickOutside),window.removeEventListener(`scroll`,this.positionDropdown,!0),window.removeEventListener(`resize`,this.positionDropdown)}},Eo={class:`w-full`,ref:`timeContainer`},Do=[`for`],Oo={class:`relative`,ref:`inputWrap`},ko=[`id`,`disabled`,`required`],Ao={class:`flex gap-2`},jo={class:`flex-1`},Mo=[`onClick`],No={class:`flex-1`},Po=[`onClick`],Fo={key:0,class:`flex-1`},Io=[`onClick`];function Lo(e,n,r,i,a,o){let s=(0,t.resolveComponent)(`font-awesome-icon`);return(0,t.openBlock)(),(0,t.createElementBlock)(`div`,Eo,[(0,t.createElementVNode)(`label`,{class:(0,t.normalizeClass)(o.labelClass),for:a.uuid},[(0,t.createTextVNode)((0,t.toDisplayString)(r.label)+` `,1),r.required?((0,t.openBlock)(),(0,t.createElementBlock)(`span`,{key:0,class:(0,t.normalizeClass)(o.requiredClass)},`*`,2)):(0,t.createCommentVNode)(``,!0)],10,Do),(0,t.createElementVNode)(`div`,Oo,[(0,t.withDirectives)((0,t.createElementVNode)(`input`,{id:a.uuid,type:`time`,"onUpdate:modelValue":n[0]||=e=>a.localTime=e,disabled:r.disabled,required:r.required,onBlur:n[1]||=e=>o.updateValue(a.localTime,!0),class:(0,t.normalizeClass)(o.inputClass)},null,42,ko),[[t.vModelText,a.localTime]]),(0,t.createElementVNode)(`span`,{onClick:n[2]||=(...e)=>o.togglePicker&&o.togglePicker(...e),class:(0,t.normalizeClass)([`absolute right-3 top-1/2 -translate-y-1/2`,r.disabled?`cursor-not-allowed`:`cursor-pointer`])},[(0,t.createVNode)(s,{icon:`fa-solid fa-clock`,class:(0,t.normalizeClass)(o.iconStaticClass)},null,8,[`class`])],2),((0,t.openBlock)(),(0,t.createBlock)(t.Teleport,{to:`body`,disabled:r.nested},[a.showPicker?((0,t.openBlock)(),(0,t.createElementBlock)(`div`,{key:0,ref:`pickerRef`,class:(0,t.normalizeClass)(o.pickerWrapperClass),style:(0,t.normalizeStyle)(r.nested?null:a.dropdownStyle)},[(0,t.createElementVNode)(`div`,{class:(0,t.normalizeClass)(o.pickerContainerClass)},[(0,t.createElementVNode)(`div`,Ao,[(0,t.createElementVNode)(`div`,jo,[(0,t.createElementVNode)(`label`,{class:(0,t.normalizeClass)(o.pickerColumnLabelClass)},` Hora `,2),(0,t.createElementVNode)(`div`,{class:(0,t.normalizeClass)(o.pickerColumnClass),ref:`hourCol`,onScrollPassive:n[3]||=(...e)=>o.onHourScroll&&o.onHourScroll(...e)},[((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(o.hours3x,(e,n)=>((0,t.openBlock)(),(0,t.createElementBlock)(`div`,{key:`h`+n,onClick:t=>o.selectHour(e),class:(0,t.normalizeClass)([o.pickerItemClass,o.itemActiveClass(a.selectedHour===e)])},(0,t.toDisplayString)(e),11,Mo))),128))],34)]),(0,t.createElementVNode)(`div`,No,[(0,t.createElementVNode)(`label`,{class:(0,t.normalizeClass)(o.pickerColumnLabelClass)},`Minuto`,2),(0,t.createElementVNode)(`div`,{class:(0,t.normalizeClass)(o.pickerColumnClass),ref:`minuteCol`,onScrollPassive:n[4]||=(...e)=>o.onMinuteScroll&&o.onMinuteScroll(...e)},[((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(o.minutes3x,(e,n)=>((0,t.openBlock)(),(0,t.createElementBlock)(`div`,{key:`m`+n,onClick:t=>o.selectMinute(e),class:(0,t.normalizeClass)([o.pickerItemClass,o.itemActiveClass(a.selectedMinute===e)])},(0,t.toDisplayString)(e),11,Po))),128))],34)]),r.is24h?(0,t.createCommentVNode)(``,!0):((0,t.openBlock)(),(0,t.createElementBlock)(`div`,Fo,[(0,t.createElementVNode)(`label`,{class:(0,t.normalizeClass)(o.pickerColumnLabelClass)},` AM/PM `,2),(0,t.createElementVNode)(`div`,{class:(0,t.normalizeClass)(o.pickerAmpmColumnClass)},[((0,t.openBlock)(),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)([`AM`,`PM`],e=>(0,t.createElementVNode)(`div`,{key:e,onClick:t=>o.selectPeriod(e),class:(0,t.normalizeClass)([o.pickerItemClass,o.itemActiveClass(a.selectedPeriod===e)])},(0,t.toDisplayString)(e),11,Io)),64))],2)]))])],2)],6)):(0,t.createCommentVNode)(``,!0)],8,[`disabled`]))],512),r.description?((0,t.openBlock)(),(0,t.createElementBlock)(`span`,{key:0,class:(0,t.normalizeClass)(o.descriptionClass)},(0,t.toDisplayString)(r.description),3)):(0,t.createCommentVNode)(``,!0)],512)}var Ro=$(To,[[`render`,Lo],[`__scopeId`,`data-v-8dd2dbd7`]]),zo={day:[0,2],month:[3,5],year:[6,10],hour:[11,13],minute:[14,16]},Bo={day:[0,2],month:[3,5],year:[6,10],hour:[11,13],minute:[14,16],ampm:[17,21]},Vo={name:`InputDateTimeStyle`,mixins:[$a],components:{InputTimeStyle:Ro,CalendarPicker:go},props:{is24h:{type:Boolean,default:!1}},data(){return{hourDigits:``,minuteDigits:``,ampm:`a.m.`,selectedHour:`00`,selectedMinute:`00`,localTime:`00:00`}},computed:{inputClass(){return[this.mclass,Q.INPUT_BASE,Q.inputValidateClass(this.validate),`pr-10`]},inputMaxlength(){return this.is24h?16:21},sectionRanges(){return this.is24h?zo:Bo},sectionOrder(){return this.is24h?[`day`,`month`,`year`,`hour`,`minute`]:[`day`,`month`,`year`,`hour`,`minute`,`ampm`]}},watch:{modelValue:{immediate:!0,handler(e){let t=this.syncDateFromValue(e);if(!t){this.hourDigits=``,this.minuteDigits=``,this.selectedHour=`00`,this.selectedMinute=`00`,this.ampm=`a.m.`,this.localDate=this._emptyPlaceholder();return}this.selectedHour=String(t.getHours()).padStart(2,`0`),this.selectedMinute=String(t.getMinutes()).padStart(2,`0`),this.syncTimeDisplay(t.getHours(),t.getMinutes())}}},methods:{syncTimeDisplay(e,t){let n=e=>String(e).padStart(2,`0`);this.is24h?(this.hourDigits=n(e),this.minuteDigits=n(t)):(this.ampm=e>=12?`p.m.`:`a.m.`,this.hourDigits=n(e%12||12),this.minuteDigits=n(t)),this.localTime=`${n(e)}:${n(t)}`,this._updateDateDisplay()},onTimeChange(e){if(!e)return;let[t,n]=e.split(`:`).map(Number),r=e=>String(e).padStart(2,`0`);this.selectedHour=r(t),this.selectedMinute=r(n),this.syncTimeDisplay(t,n),this._emitDateTime()},hourDigitsTo24h(){if(this.is24h)return parseInt(this.hourDigits)||0;let e=parseInt(this.hourDigits)||12;return this.ampm===`p.m.`&&e!==12&&(e+=12),this.ampm===`a.m.`&&e===12&&(e=0),e},_emptyPlaceholder(){return this.is24h?`dd/mm/aaaa hh:mm`:`dd/mm/aaaa hh:mm a.m.`},goToNow(){let e=new Date;this.goToToday(),this.calendarYear=e.getFullYear(),this.calendarMonth=e.getMonth(),this.selectedDate=e;let t=e=>String(e).padStart(2,`0`);this.dayDigits=t(e.getDate()),this.monthDigits=t(e.getMonth()+1),this.yearDigits=String(e.getFullYear()),this.selectedHour=t(e.getHours()),this.selectedMinute=t(e.getMinutes()),this.syncTimeDisplay(e.getHours(),e.getMinutes()),this._emitDateTime()},_emitDateTime(){if(!this.selectedDate&&!this.dayDigits)return;let e=e=>String(e).padStart(2,`0`),t=this.yearDigits||String(new Date().getFullYear()),n=this.monthDigits||`01`,r=this.dayDigits||`01`,i=e(this.hourDigitsTo24h()),a=this.selectedMinute||`00`;this.model=`${t}-${n}-${r}T${i}:${a}:00.000`},selectDay(e){if(this.isDayDisabled(e))return;let t=e=>String(e).padStart(2,`0`),n=t(e.day),r=t(e.month+1),i=e.year;this.selectedDate=new Date(i,e.month,e.day,parseInt(this.selectedHour),parseInt(this.selectedMinute)),this.dayDigits=n,this.monthDigits=r,this.yearDigits=String(i),this._updateDateDisplay(),this._emitDateTime()},togglePicker(){this.disabled||(this.showPicker=!this.showPicker,this.showPicker&&(this.calendarView=`days`,this.calculateDropdownPosition(),this.selectedDate&&(this.calendarYear=this.selectedDate.getFullYear(),this.calendarMonth=this.selectedDate.getMonth(),this.yearRangeStart=this.calendarYear-6)))},emitValue(){let[e]=this.localDate.split(` `),[t,n,r]=(e||``).split(`/`);if(/^\d{2}$/.test(t)&&/^\d{2}$/.test(n)&&/^\d{4}$/.test(r)){let e=this.getMaxDay(n,r);if(Number(n)>=1&&Number(n)<=12&&Number(t)>=1&&Number(t)<=e){let e=String(this.hourDigitsTo24h()).padStart(2,`0`),i=this.minuteDigits.length===2?this.minuteDigits:this.selectedMinute;this.model=`${r}-${n}-${t}T${e}:${i}:00.000`;return}}this.model=``},initMask(){let e=this._emptyPlaceholder();if(!this.localDate||this.localDate===e){this.localDate=e,this.dayDigits=``,this.monthDigits=``,this.yearDigits=``,this.hourDigits=``,this.minuteDigits=``,this.activeSection=`day`,this.$nextTick(()=>this.$el.querySelector(`input`).setSelectionRange(0,2));return}let t=this.localDate.split(` `),n=(t[0]||``).split(`/`);if(this.dayDigits=(n[0]||``).replace(/\D/g,``),this.monthDigits=(n[1]||``).replace(/\D/g,``),this.yearDigits=(n[2]||``).replace(/\D/g,``).slice(0,4),t[1]){let[e,n]=t[1].split(`:`);this.hourDigits=(e||``).replace(/\D/g,``),this.minuteDigits=(n||``).replace(/\D/g,``)}!this.is24h&&t[2]&&(this.ampm=t[2]===`p.m.`?`p.m.`:`a.m.`)},handleSectionSelect(e){let t=e.target.selectionStart,n=this.sectionRanges,r=`day`;r=t<=2?`day`:t<=5?`month`:t<=10?`year`:t<=13?`hour`:t<=16?`minute`:`ampm`,this.activeSection=r;let i=n[r];e.target.setSelectionRange(i[0],i[1]),this.sectionSelected=!0},handleCursorMove(e){if(this.sectionSelected)return;let t=e.target.selectionStart;t<=2?this.activeSection=`day`:t<=5?this.activeSection=`month`:t<=10?this.activeSection=`year`:t<=13?this.activeSection=`hour`:t<=16?this.activeSection=`minute`:this.activeSection=`ampm`},_updateDateDisplay(){let e=this.dayDigits.length===0?`dd`:this.dayDigits.padStart(2,`0`),t=this.monthDigits.length===0?`mm`:this.monthDigits.padStart(2,`0`),n=this.yearDigits.padEnd(4,`a`),r=this.hourDigits.length===0?`hh`:this.hourDigits.padStart(2,`0`),i=this.minuteDigits.length===0?`mm`:this.minuteDigits.padStart(2,`0`);this.localDate=this.is24h?`${e}/${t}/${n} ${r}:${i}`:`${e}/${t}/${n} ${r}:${i} ${this.ampm}`},handleDateKeydown(e){if(this.readonly){e.preventDefault();return}let t=!this.is24h;if(e.key===`Backspace`||e.key===`Delete`){e.preventDefault(),this.activeSection===`day`?this.dayDigits=``:this.activeSection===`month`?this.monthDigits=``:this.activeSection===`year`?this.yearDigits=``:this.activeSection===`hour`?(this.hourDigits=``,this.selectedHour=`00`):this.activeSection===`minute`&&(this.minuteDigits=``,this.selectedMinute=`00`),this.sectionSelected=!1,this._updateDateDisplay(),this.$nextTick(()=>{let e=this.sectionRanges[this.activeSection];this.$el.querySelector(`input`).setSelectionRange(e[0],e[1])});return}if(e.key===`ArrowRight`||e.key===`ArrowLeft`){e.preventDefault();let t=this.sectionOrder,n=t.indexOf(this.activeSection);this.activeSection=e.key===`ArrowRight`?t[Math.min(n+1,t.length-1)]:t[Math.max(n-1,0)],this.sectionSelected=!0,this.$nextTick(()=>{let e=this.sectionRanges[this.activeSection];this.$el.querySelector(`input`).setSelectionRange(e[0],e[1])});return}if(e.key===`ArrowUp`||e.key===`ArrowDown`){e.preventDefault();let n=e.key===`ArrowUp`?1:-1,r=e=>String(e).padStart(2,`0`);if([`day`,`month`,`year`].includes(this.activeSection))this._nudgeDateSection(n);else if(this.activeSection===`hour`){let e=t?12:23,i=+!!t,a=(parseInt(this.hourDigits)||i)+n;a<i&&(a=e),a>e&&(a=i),this.hourDigits=r(a),this.selectedHour=r(this.hourDigitsTo24h())}else if(this.activeSection===`minute`){let e=(parseInt(this.minuteDigits)||0)+n;e<0&&(e=59),e>59&&(e=0),this.minuteDigits=r(e),this.selectedMinute=this.minuteDigits}else this.activeSection===`ampm`&&(this.ampm=this.ampm===`a.m.`?`p.m.`:`a.m.`,this.selectedHour=r(this.hourDigitsTo24h()));this._updateDateDisplay(),this.$nextTick(()=>{let e=this.sectionRanges[this.activeSection];this.$el.querySelector(`input`).setSelectionRange(e[0],e[1])});return}if(this.activeSection===`ampm`&&t){if(e.preventDefault(),e.key===`a`||e.key===`A`)this.ampm=`a.m.`;else if(e.key===`p`||e.key===`P`)this.ampm=`p.m.`;else return;this.selectedHour=String(this.hourDigitsTo24h()).padStart(2,`0`),this._updateDateDisplay(),this.$nextTick(()=>this.$el.querySelector(`input`).setSelectionRange(17,21));return}if(e.key===`Tab`){let t=this.sectionOrder,n=t.indexOf(this.activeSection),r=e.shiftKey?n-1:n+1;if(r<0||r>=t.length)return;e.preventDefault(),this.activeSection=t[r],this.sectionSelected=!0,this.$nextTick(()=>{let e=this.sectionRanges[this.activeSection];this.$el.querySelector(`input`).setSelectionRange(e[0],e[1])});return}if(![`Home`,`End`].includes(e.key)){if(!/^[0-9]$/.test(e.key)){e.preventDefault();return}if(e.preventDefault(),this.sectionSelected&&=(this.activeSection===`day`?this.dayDigits=``:this.activeSection===`month`?this.monthDigits=``:this.activeSection===`year`?this.yearDigits=``:this.activeSection===`hour`?this.hourDigits=``:this.activeSection===`minute`&&(this.minuteDigits=``),!1),[`day`,`month`,`year`].includes(this.activeSection))this._typeDateSection(e.key),this.activeSection===`year`&&this.yearDigits.length===4&&(this.activeSection=`hour`);else if(this.activeSection===`hour`){let n=e=>String(e).padStart(2,`0`),r=t?2:3;if(this.hourDigits+=e.key,this.hourDigits=this.hourDigits.slice(-2),this.hourDigits.length===1&&Number(this.hourDigits)>=r&&(this.hourDigits=n(this.hourDigits)),this.hourDigits.length===2){let e=Number(this.hourDigits);this.hourDigits=n(t?Math.max(1,Math.min(e,12)):Math.min(e,23)),this.selectedHour=n(this.hourDigitsTo24h()),this.activeSection=`minute`,this.sectionSelected=!0}}else if(this.activeSection===`minute`){let n=e=>String(e).padStart(2,`0`);this.minuteDigits+=e.key,this.minuteDigits=this.minuteDigits.slice(-2),this.minuteDigits.length===1&&Number(this.minuteDigits)>=6&&(this.minuteDigits=n(this.minuteDigits)),this.minuteDigits.length===2&&(this.minuteDigits=n(Math.min(Number(this.minuteDigits),59)),this.selectedMinute=this.minuteDigits,t&&(this.activeSection=`ampm`),this.sectionSelected=!0)}this._updateDateDisplay(),this.$nextTick(()=>{let e=this.sectionRanges[this.activeSection];this.$el.querySelector(`input`).setSelectionRange(e[0],e[1])})}}}},Ho={class:`w-full`,ref:`dateTimeContainer`},Uo=[`for`],Wo={class:`relative`,ref:`inputWrap`},Go=[`id`,`maxlength`],Ko={class:`mt-1 pt-1 px-1`},qo={class:`flex justify-center p-1 pt-2`};function Jo(e,n,r,i,a,o){let s=(0,t.resolveComponent)(`font-awesome-icon`),c=(0,t.resolveComponent)(`InputTimeStyle`),l=(0,t.resolveComponent)(`CalendarPicker`);return(0,t.openBlock)(),(0,t.createElementBlock)(`div`,Ho,[(0,t.createElementVNode)(`label`,{class:(0,t.normalizeClass)(e.labelClass),for:e.uuid},[(0,t.createTextVNode)((0,t.toDisplayString)(e.label)+` `,1),e.required?((0,t.openBlock)(),(0,t.createElementBlock)(`span`,{key:0,class:(0,t.normalizeClass)(e.requiredClass)},`*`,2)):(0,t.createCommentVNode)(``,!0)],10,Uo),(0,t.createElementVNode)(`div`,Wo,[(0,t.withDirectives)((0,t.createElementVNode)(`input`,(0,t.mergeProps)({id:e.uuid,type:`text`,inputmode:`numeric`,maxlength:o.inputMaxlength,"onUpdate:modelValue":n[0]||=t=>e.localDate=t},{disabled:e.disabled,required:e.required,readonly:e.readonly},{onFocus:n[1]||=(...e)=>o.initMask&&o.initMask(...e),onMouseup:n[2]||=(...e)=>o.handleSectionSelect&&o.handleSectionSelect(...e),onPaste:n[3]||=(0,t.withModifiers)(()=>{},[`prevent`]),onKeydown:n[4]||=(...e)=>o.handleDateKeydown&&o.handleDateKeydown(...e),onKeyup:n[5]||=(...e)=>o.handleCursorMove&&o.handleCursorMove(...e),onBlur:n[6]||=(...e)=>o.emitValue&&o.emitValue(...e),class:o.inputClass}),null,16,Go),[[t.vModelText,e.localDate]]),(0,t.createElementVNode)(`span`,{onClick:n[7]||=(...e)=>o.togglePicker&&o.togglePicker(...e),class:(0,t.normalizeClass)([`absolute right-3 top-1/2 -translate-y-1/2`,e.disabled?`cursor-not-allowed`:`cursor-pointer`])},[(0,t.createVNode)(s,{icon:`fa-solid fa-calendar`,class:(0,t.normalizeClass)(e.iconStaticClass)},null,8,[`class`])],2),((0,t.openBlock)(),(0,t.createBlock)(t.Teleport,{to:`body`},[e.showPicker?((0,t.openBlock)(),(0,t.createElementBlock)(`div`,{key:0,ref:`pickerRef`,style:(0,t.normalizeStyle)(e.dropdownStyle),onClick:n[11]||=(0,t.withModifiers)(()=>{},[`stop`])},[(0,t.createVNode)(l,{view:e.calendarView,"onUpdate:view":n[10]||=t=>e.calendarView=t,year:e.calendarYear,month:e.calendarMonth,"year-range-start":e.yearRangeStart,"selected-date":e.selectedDate,"min-date":e.minDateObj,"max-date":e.maxDateObj,"disabled-dates":e.disabledDates,"is-prev-disabled":e.isPrevDisabled,"is-next-disabled":e.isNextDisabled,"width-class":`w-60`,onPrev:e.prevPeriod,onNext:e.nextPeriod,onSelectDay:o.selectDay,onSelectMonth:e.selectMonth,onSelectYear:e.selectYear},{footer:(0,t.withCtx)(()=>[(0,t.createElementVNode)(`div`,Ko,[(0,t.createVNode)(c,{modelValue:a.localTime,"onUpdate:modelValue":n[8]||=e=>a.localTime=e,is24h:r.is24h,disabled:e.disabled,nested:!0,onChange:o.onTimeChange},null,8,[`modelValue`,`is24h`,`disabled`,`onChange`])]),(0,t.createElementVNode)(`div`,qo,[(0,t.createElementVNode)(`button`,{type:`button`,onClick:n[9]||=(...e)=>o.goToNow&&o.goToNow(...e),class:`w-full text-xs text-gray-600 font-semibold py-0.5 rounded-md bg-white hover:bg-indigo-50 border border-gray-300 cursor-pointer focus:outline-none focus:ring-2 focus:ring-indigo-200 disabled:bg-gray-100 disabled:text-gray-600 disabled:cursor-not-allowed`},` Ahora `)])]),_:1},8,[`view`,`year`,`month`,`year-range-start`,`selected-date`,`min-date`,`max-date`,`disabled-dates`,`is-prev-disabled`,`is-next-disabled`,`onPrev`,`onNext`,`onSelectDay`,`onSelectMonth`,`onSelectYear`])],4)):(0,t.createCommentVNode)(``,!0)]))],512),e.description?((0,t.openBlock)(),(0,t.createElementBlock)(`span`,{key:0,class:(0,t.normalizeClass)(e.descriptionClass)},(0,t.toDisplayString)(e.description),3)):(0,t.createCommentVNode)(``,!0)],512)}var Yo=$(Vo,[[`render`,Jo],[`__scopeId`,`data-v-3968f4d1`]]),Xo={name:`InputNumberStyle`,props:{modelValue:{type:[String,Number],default:``},label:{type:String,default:``},description:{type:String,default:``},placeholder:{type:String,default:``},numeric:{type:String,default:null},min:{type:String,default:null},max:{type:String,default:null},required:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},validate:{type:Boolean,default:null},mclass:{type:String,default:null}},data(){return{uuid:Z.getUUID(),isFocused:!1,stepTimeout:null,stepInterval:null}},beforeUnmount(){this.stopStep()},computed:{effectiveDigits(){if(this.numeric){let[e]=this.numeric.split(`,`);return e?.trim()||`10`}return`10`},effectiveDecimals(){if(this.numeric){let[,e]=this.numeric.split(`,`);return e?.trim()??`2`}return`2`},allowNegative(){return this.min===null||Number(this.min)<0},digitMax(){let e=Number(this.effectiveDigits),t=Number(this.effectiveDecimals);return 10**e-10**-t},model:{get(){return this.modelValue},set(e){this.$emit(`update:modelValue`,e),this.$emit(`change`,e)}},displayValue(){if(this.isFocused)return this.modelValue?.toString()??``;if(this.modelValue===``||this.modelValue===null)return``;let e=Number(this.modelValue);return isNaN(e)?``:e.toLocaleString(`en-US`,{minimumFractionDigits:Number(this.effectiveDecimals),maximumFractionDigits:Number(this.effectiveDecimals)})},labelClass(){return Q.inputLabelClass(this.disabled)},inputClass(){return[this.mclass,Q.INPUT_BASE,Q.inputValidateClass(this.validate)]},descriptionClass(){return Q.inputDescriptionClass(this.validate)},requiredClass(){return Q.REQUIRED_ASTERISK},stepButtonClass(){return[Q.ICON_SIZE_STATIC,Q.iconInteractiveClass(this.disabled),this.disabled?`cursor-not-allowed`:`cursor-pointer`]}},methods:{onKeyDown(e){let t=[`Backspace`,`Delete`,`Tab`,`Escape`,`Enter`,`ArrowLeft`,`ArrowRight`,`ArrowUp`,`ArrowDown`,`Home`,`End`];if((e.ctrlKey||e.metaKey)&&[`a`,`c`,`v`,`x`,`z`].includes(e.key.toLowerCase()))return;if(e.key===`ArrowUp`||e.key===`ArrowDown`){e.preventDefault(),this.stepValue(e.key===`ArrowUp`?1:-1);return}if(t.includes(e.key))return;let n=e.target.value,r=e.target.selectionStart,i=e.target.selectionStart!==e.target.selectionEnd;if(e.key===`-`){if(!this.allowNegative){e.preventDefault();return}(r!==0||n.startsWith(`-`))&&e.preventDefault();return}let a=n.startsWith(`-`)?n.slice(1):n,[o=``,s=``]=a.split(`.`),c=a.includes(`.`);if(e.key>=`0`&&e.key<=`9`){let t=n.startsWith(`-`)?r-1:r;if(!c||t<=o.length){!i&&o.length>=Number(this.effectiveDigits)&&e.preventDefault();return}if(c&&t>o.length){!i&&s.length>=Number(this.effectiveDecimals)&&e.preventDefault();return}}if(e.key===`.`){(Number(this.effectiveDecimals)===0||c)&&e.preventDefault();return}e.preventDefault()},onInput(e){let t=e.target.value,n=this.allowNegative&&t.startsWith(`-`);if(n&&t===`-`){this.$emit(`update:modelValue`,`-`);return}let r=t.replace(/[^0-9.]/g,``),i=r.indexOf(`.`),a;a=i===-1?r:`${r.slice(0,i)}.${r.slice(i+1).replace(/\./g,``)}`,this.$emit(`update:modelValue`,n?`-${a}`:a)},onPaste(e){let t=e.clipboardData.getData(`text`),n=this.allowNegative&&t.trimStart().startsWith(`-`),[r,i=``]=t.replace(/[^0-9.]/g,``).split(`.`);if(r.length>Number(this.effectiveDigits)||i.length>Number(this.effectiveDecimals))return;let a=i?`${r}.${i}`:r;this.$emit(`update:modelValue`,n&&a!==``?`-${a}`:a)},onBlur(e){this.isFocused=!1;let t=Number(this.modelValue);(this.modelValue===``||this.modelValue===`.`||this.modelValue===`-`||isNaN(t))&&(t=0);let n=this.min===null?null:Number(this.min),r=this.max===null?null:Number(this.max);n!==null&&t<n&&(t=n),r!==null&&t>r&&(t=r),this.$emit(`update:modelValue`,t.toFixed(Number(this.effectiveDecimals))),this.$emit(`blur`,e)},stepValue(e){let t=Number(this.modelValue),n=(isNaN(t)?0:t)+e,r=this.min===null?null:Number(this.min),i=this.max===null?null:Number(this.max);n>this.digitMax&&(n=this.digitMax),this.allowNegative&&n<-this.digitMax&&(n=-this.digitMax),r!==null&&n<r&&(n=r),i!==null&&n>i&&(n=i);let a=10**Number(this.effectiveDecimals);n=Math.round(n*a)/a,this.$emit(`update:modelValue`,String(n)),this.$emit(`change`,String(n))},startStep(e){this.disabled||(this.stopStep(),this.stepValue(e),this.stepTimeout=setTimeout(()=>{this.stepInterval=setInterval(()=>this.stepValue(e),80)},400))},stopStep(){this.stepTimeout&&=(clearTimeout(this.stepTimeout),null),this.stepInterval&&=(clearInterval(this.stepInterval),null)},onFocus(){if(this.isFocused=!0,this.modelValue!==null&&this.modelValue!==``){let e=Number(this.modelValue);!isNaN(e)&&e===0&&this.$emit(`update:modelValue`,``)}}}},Zo={class:`w-full`},Qo=[`for`],$o={class:`relative`},es=[`id`,`value`,`placeholder`,`min`,`max`],ts={class:`absolute left-0 top-0 bottom-0 flex flex-col justify-center pl-2`},ns=[`disabled`],rs=[`disabled`];function is(e,n,r,i,a,o){let s=(0,t.resolveComponent)(`font-awesome-icon`);return(0,t.openBlock)(),(0,t.createElementBlock)(`div`,Zo,[(0,t.createElementVNode)(`label`,{class:(0,t.normalizeClass)(o.labelClass),for:a.uuid},[(0,t.createTextVNode)((0,t.toDisplayString)(r.label)+` `,1),r.required?((0,t.openBlock)(),(0,t.createElementBlock)(`span`,{key:0,class:(0,t.normalizeClass)(o.requiredClass)},`*`,2)):(0,t.createCommentVNode)(``,!0)],10,Qo),(0,t.createElementVNode)(`div`,$o,[(0,t.withDirectives)((0,t.createElementVNode)(`input`,(0,t.mergeProps)({id:a.uuid,type:`text`,value:o.displayValue,placeholder:r.placeholder,onFocus:n[0]||=(...e)=>o.onFocus&&o.onFocus(...e),onBlur:n[1]||=(...e)=>o.onBlur&&o.onBlur(...e),onKeydown:n[2]||=(...e)=>o.onKeyDown&&o.onKeyDown(...e),onInput:n[3]||=(...e)=>o.onInput&&o.onInput(...e),onPaste:n[4]||=(0,t.withModifiers)((...e)=>o.onPaste&&o.onPaste(...e),[`prevent`]),min:r.min?Number(r.min):null,max:r.max?Number(r.max):null},{disabled:r.disabled,required:r.required},{"onUpdate:modelValue":n[5]||=e=>o.model=e,class:[o.inputClass,`text-right`,`pl-9`],inputmode:`decimal`}),null,16,es),[[t.vModelText,o.model]]),(0,t.createElementVNode)(`div`,ts,[(0,t.createElementVNode)(`button`,{type:`button`,tabindex:`-1`,disabled:r.disabled,class:(0,t.normalizeClass)([o.stepButtonClass,`flex items-center justify-center leading-none -mb-1`]),title:`Aumentar`,onMousedown:n[6]||=(0,t.withModifiers)(e=>o.startStep(1),[`prevent`]),onMouseup:n[7]||=(...e)=>o.stopStep&&o.stopStep(...e),onMouseleave:n[8]||=(...e)=>o.stopStep&&o.stopStep(...e),onTouchstart:n[9]||=(0,t.withModifiers)(e=>o.startStep(1),[`prevent`]),onTouchend:n[10]||=(0,t.withModifiers)((...e)=>o.stopStep&&o.stopStep(...e),[`prevent`])},[(0,t.createVNode)(s,{icon:`fa-solid fa-caret-up`})],42,ns),(0,t.createElementVNode)(`button`,{type:`button`,tabindex:`-1`,disabled:r.disabled,class:(0,t.normalizeClass)([o.stepButtonClass,`flex items-center justify-center leading-none -mt-1`]),title:`Disminuir`,onMousedown:n[11]||=(0,t.withModifiers)(e=>o.startStep(-1),[`prevent`]),onMouseup:n[12]||=(...e)=>o.stopStep&&o.stopStep(...e),onMouseleave:n[13]||=(...e)=>o.stopStep&&o.stopStep(...e),onTouchstart:n[14]||=(0,t.withModifiers)(e=>o.startStep(-1),[`prevent`]),onTouchend:n[15]||=(0,t.withModifiers)((...e)=>o.stopStep&&o.stopStep(...e),[`prevent`])},[(0,t.createVNode)(s,{icon:`fa-solid fa-caret-down`})],42,rs)])]),r.description?((0,t.openBlock)(),(0,t.createElementBlock)(`span`,{key:0,class:(0,t.normalizeClass)(o.descriptionClass)},(0,t.toDisplayString)(r.description),3)):(0,t.createCommentVNode)(``,!0)])}var as=$(Xo,[[`render`,is]]),os={name:`InputPasswordStyle`,props:{modelValue:{type:[String,Number],default:``},label:{type:String,default:``},description:{type:String,default:``},placeholder:{type:String,default:``},maxlength:{type:String,default:null},disabled:{type:Boolean,default:!1},required:{type:Boolean,default:!1},validate:{type:Boolean,default:null},mclass:{type:String,default:null}},data(){return{uuid:Z.getUUID(),showPassword:!1}},computed:{model:{get(){return this.modelValue},set(e){this.$emit(`update:modelValue`,e),this.$emit(`change`,e)}},labelClass(){return Q.inputLabelClass(this.disabled)},inputClass(){return[this.mclass,Q.INPUT_BASE,Q.inputValidateClass(this.validate),`pr-10`]},descriptionClass(){return Q.inputDescriptionClass(this.validate)},requiredClass(){return Q.REQUIRED_ASTERISK},iconStaticClass(){return[Q.ICON_SIZE_STATIC,Q.iconInteractiveClass(this.disabled)]}},methods:{emitBlur(e){this.$emit(`blur`,e)},togglePassword(){this.disabled||(this.showPassword=!this.showPassword)}}},ss={class:`w-full`},cs=[`for`],ls={class:`relative`},us=[`id`,`type`,`maxlength`,`placeholder`];function ds(e,n,r,i,a,o){let s=(0,t.resolveComponent)(`font-awesome-icon`);return(0,t.openBlock)(),(0,t.createElementBlock)(`div`,ss,[(0,t.createElementVNode)(`label`,{class:(0,t.normalizeClass)(o.labelClass),for:a.uuid},[(0,t.createTextVNode)((0,t.toDisplayString)(r.label)+` `,1),r.required?((0,t.openBlock)(),(0,t.createElementBlock)(`span`,{key:0,class:(0,t.normalizeClass)(o.requiredClass)},`*`,2)):(0,t.createCommentVNode)(``,!0)],10,cs),(0,t.createElementVNode)(`div`,ls,[(0,t.withDirectives)((0,t.createElementVNode)(`input`,(0,t.mergeProps)({id:a.uuid,type:a.showPassword?`text`:`password`,maxlength:r.maxlength?Number(r.maxlength):null,placeholder:r.placeholder},{disabled:r.disabled,required:r.required},{onBlur:n[0]||=(...e)=>o.emitBlur&&o.emitBlur(...e),"onUpdate:modelValue":n[1]||=e=>o.model=e,class:o.inputClass}),null,16,us),[[t.vModelDynamic,o.model]]),(0,t.createElementVNode)(`span`,{onClick:n[2]||=(...e)=>o.togglePassword&&o.togglePassword(...e),class:(0,t.normalizeClass)([`absolute right-3 top-1/2 -translate-y-1/2`,r.disabled?`cursor-not-allowed`:`cursor-pointer`])},[a.showPassword?(0,t.createCommentVNode)(``,!0):((0,t.openBlock)(),(0,t.createBlock)(s,{key:0,icon:`fa-solid fa-eye`,class:(0,t.normalizeClass)(o.iconStaticClass),title:`Mostrar contraseña`},null,8,[`class`])),a.showPassword?((0,t.openBlock)(),(0,t.createBlock)(s,{key:1,icon:`fa-solid fa-eye-slash`,class:(0,t.normalizeClass)(o.iconStaticClass),title:`Ocultar contraseña`},null,8,[`class`])):(0,t.createCommentVNode)(``,!0)],2)]),r.description?((0,t.openBlock)(),(0,t.createElementBlock)(`span`,{key:0,class:(0,t.normalizeClass)(o.descriptionClass)},(0,t.toDisplayString)(r.description),3)):(0,t.createCommentVNode)(``,!0)])}var fs=$(os,[[`render`,ds]]),ps={name:`InputTextStyle`,props:{modelValue:{type:[String,Number],default:``},label:{type:String,default:``},description:{type:String,default:``},placeholder:{type:String,default:``},type:{type:String,default:`text`,validator(e){return[`text`,`email`,`search`,`tel`,`url`,`number`].includes(e)}},maxlength:{type:String,default:null},minlength:{type:String,default:null},min:{type:String,default:null},max:{type:String,default:null},disabled:{type:Boolean,default:!1},required:{type:Boolean,default:!1},validate:{type:Boolean,default:null},mclass:{type:String,default:null}},computed:{model:{get(){return this.modelValue},set(e){this.$emit(`update:modelValue`,e),this.$emit(`change`,e)}},labelClass(){return Q.inputLabelClass(this.disabled)},inputClass(){return[this.mclass,Q.INPUT_BASE,Q.inputValidateClass(this.validate)]},descriptionClass(){return Q.inputDescriptionClass(this.validate)},requiredClass(){return Q.REQUIRED_ASTERISK}},data(){return{uuid:Z.getUUID()}},methods:{emitBlur(e){if(this.type===`number`&&(this.min!==null||this.max!==null)){let e=Number(this.modelValue);if(!isNaN(e)&&this.modelValue!==``){let t=this.min===null?null:Number(this.min),n=this.max===null?null:Number(this.max);t!==null&&e<t&&(e=t),n!==null&&e>n&&(e=n),this.$emit(`update:modelValue`,e)}}this.$emit(`blur`,e)}}},ms={class:`w-full`},hs=[`for`],gs=[`id`,`type`,`placeholder`,`maxlength`,`minlength`];function _s(e,n,r,i,a,o){return(0,t.openBlock)(),(0,t.createElementBlock)(`div`,ms,[(0,t.createElementVNode)(`label`,{class:(0,t.normalizeClass)(o.labelClass),for:a.uuid},[(0,t.createTextVNode)((0,t.toDisplayString)(r.label)+` `,1),r.required?((0,t.openBlock)(),(0,t.createElementBlock)(`span`,{key:0,class:(0,t.normalizeClass)(o.requiredClass)},`*`,2)):(0,t.createCommentVNode)(``,!0)],10,hs),(0,t.withDirectives)((0,t.createElementVNode)(`input`,(0,t.mergeProps)({id:a.uuid,type:r.type,placeholder:r.placeholder,maxlength:r.maxlength?Number(r.maxlength):null,minlength:r.minlength?Number(r.minlength):null},{disabled:r.disabled,required:r.required},{onBlur:n[0]||=(...e)=>o.emitBlur&&o.emitBlur(...e),"onUpdate:modelValue":n[1]||=e=>o.model=e,class:o.inputClass}),null,16,gs),[[t.vModelDynamic,o.model]]),r.description?((0,t.openBlock)(),(0,t.createElementBlock)(`span`,{key:0,class:(0,t.normalizeClass)(o.descriptionClass)},(0,t.toDisplayString)(r.description),3)):(0,t.createCommentVNode)(``,!0)])}var vs=$(ps,[[`render`,_s]]),ys={name:`InputCheckStyle`,props:{modelValue:{type:Boolean,default:!1},label:{type:String,default:``},description:{type:String,default:``},disabled:{type:Boolean,default:!1},required:{type:Boolean,default:!1},validate:{type:Boolean,default:null},mclass:{type:String,default:null}},data(){return{uuid:Z.getUUID(),registry:Q}},computed:{model:{get(){return this.modelValue},set(e){this.$emit(`update:modelValue`,e),this.$emit(`change`,e)}},labelClass(){return Q.inputCheckLabelClass(this.disabled)},inputBoxClass(){return[this.mclass,Q.CHECK_BOX_BASE,Q.checkBoxClass(this.model,this.disabled)]},descriptionClass(){return Q.inputDescriptionClass(this.validate,!1)},requiredClass(){return Q.REQUIRED_ASTERISK}},methods:{emitBlur(e){this.$emit(`blur`,e)}}},bs={class:`inline-block`},xs={class:`flex items-center gap-2 cursor-pointer select-none`},Ss=[`id`];function Cs(e,n,r,i,a,o){let s=(0,t.resolveComponent)(`font-awesome-icon`);return(0,t.openBlock)(),(0,t.createElementBlock)(`div`,bs,[(0,t.createElementVNode)(`label`,xs,[(0,t.withDirectives)((0,t.createElementVNode)(`input`,(0,t.mergeProps)({id:a.uuid,type:`checkbox`},{disabled:r.disabled,required:r.required},{onBlur:n[0]||=(...e)=>o.emitBlur&&o.emitBlur(...e),"onUpdate:modelValue":n[1]||=e=>o.model=e,class:`peer hidden`}),null,16,Ss),[[t.vModelCheckbox,o.model]]),(0,t.createElementVNode)(`span`,{class:(0,t.normalizeClass)(o.inputBoxClass)},[o.model?((0,t.openBlock)(),(0,t.createBlock)(s,{key:0,icon:`fa-solid fa-check`,class:(0,t.normalizeClass)([a.registry.ICON_SIZE_STATIC,`text-white`])},null,8,[`class`])):(0,t.createCommentVNode)(``,!0)],2),r.label?((0,t.openBlock)(),(0,t.createElementBlock)(`span`,{key:0,class:(0,t.normalizeClass)(o.labelClass)},[(0,t.createTextVNode)((0,t.toDisplayString)(r.label)+` `,1),r.required?((0,t.openBlock)(),(0,t.createElementBlock)(`span`,{key:0,class:(0,t.normalizeClass)(o.requiredClass)},`*`,2)):(0,t.createCommentVNode)(``,!0)],2)):(0,t.createCommentVNode)(``,!0)]),r.description?((0,t.openBlock)(),(0,t.createElementBlock)(`span`,{key:0,class:(0,t.normalizeClass)(o.descriptionClass)},(0,t.toDisplayString)(r.description),3)):(0,t.createCommentVNode)(``,!0)])}var ws=$(ys,[[`render`,Cs]]),Ts={name:`InputRadioStyle`,props:{modelValue:{type:Boolean,default:!1},label:{type:String,default:``},description:{type:String,default:``},disabled:{type:Boolean,default:!1},required:{type:Boolean,default:!1},validate:{type:Boolean,default:null},mclass:{type:String,default:null}},computed:{model:{get(){return this.modelValue},set(e){this.$emit(`update:modelValue`,e),this.$emit(`change`,e)}},labelClass(){return Q.inputCheckLabelClass(this.disabled)},inputRadioClass(){return[this.mclass,Q.RADIO_BASE,Q.radioClass(this.model,this.disabled)]},descriptionClass(){return Q.inputDescriptionClass(this.validate,!1)},requiredClass(){return Q.REQUIRED_ASTERISK}},data(){return{uuid:Z.getUUID()}},methods:{emitBlur(e){this.$emit(`blur`,e)}}},Es={class:`inline-block`},Ds={class:`flex items-center gap-2 cursor-pointer select-none`},Os=[`id`];function ks(e,n,r,i,a,o){return(0,t.openBlock)(),(0,t.createElementBlock)(`div`,Es,[(0,t.createElementVNode)(`label`,Ds,[(0,t.withDirectives)((0,t.createElementVNode)(`input`,(0,t.mergeProps)({id:a.uuid,type:`checkbox`},{disabled:r.disabled,required:r.required},{onBlur:n[0]||=(...e)=>o.emitBlur&&o.emitBlur(...e),"onUpdate:modelValue":n[1]||=e=>o.model=e,class:`peer hidden`}),null,16,Os),[[t.vModelCheckbox,o.model]]),(0,t.createElementVNode)(`span`,{class:(0,t.normalizeClass)(o.inputRadioClass)},null,2),r.label?((0,t.openBlock)(),(0,t.createElementBlock)(`span`,{key:0,class:(0,t.normalizeClass)(o.labelClass)},[(0,t.createTextVNode)((0,t.toDisplayString)(r.label)+` `,1),r.required?((0,t.openBlock)(),(0,t.createElementBlock)(`span`,{key:0,class:(0,t.normalizeClass)(o.requiredClass)},`*`,2)):(0,t.createCommentVNode)(``,!0)],2)):(0,t.createCommentVNode)(``,!0)]),r.description?((0,t.openBlock)(),(0,t.createElementBlock)(`span`,{key:0,class:(0,t.normalizeClass)(o.descriptionClass)},(0,t.toDisplayString)(r.description),3)):(0,t.createCommentVNode)(``,!0)])}var As=$(Ts,[[`render`,ks]]),js={name:`InputSwitchStyle`,props:{modelValue:{type:Boolean,default:!1},label:{type:String,default:``},description:{type:String,default:``},disabled:{type:Boolean,default:!1},required:{type:Boolean,default:!1},validate:{type:Boolean,default:null},mclass:{type:String,default:null}},computed:{model:{get(){return this.modelValue},set(e){this.$emit(`update:modelValue`,e),this.$emit(`change`,e)}},labelClass(){return Q.inputCheckLabelClass(this.disabled)},inputRadioClass(){return[this.mclass,Q.SWITCH_BASE,Q.switchClass(this.model,this.disabled)]},inputRadioMinClass(){return[`absolute w-3 h-3 rounded-full transition-all duration-200 ease-in-out`,Q.switchDotClass(this.model,this.disabled)]},descriptionClass(){return Q.inputDescriptionClass(this.validate,!1)},requiredClass(){return Q.REQUIRED_ASTERISK}},data(){return{uuid:Z.getUUID()}},methods:{emitBlur(e){this.$emit(`blur`,e)}}},Ms={class:`inline-block`},Ns={class:`flex items-center gap-2 cursor-pointer select-none`},Ps=[`id`];function Fs(e,n,r,i,a,o){return(0,t.openBlock)(),(0,t.createElementBlock)(`div`,Ms,[(0,t.createElementVNode)(`label`,Ns,[(0,t.withDirectives)((0,t.createElementVNode)(`input`,(0,t.mergeProps)({id:a.uuid,type:`checkbox`},{disabled:r.disabled,required:r.required},{onBlur:n[0]||=(...e)=>o.emitBlur&&o.emitBlur(...e),"onUpdate:modelValue":n[1]||=e=>o.model=e,class:`peer hidden`}),null,16,Ps),[[t.vModelCheckbox,o.model]]),(0,t.createElementVNode)(`span`,{class:(0,t.normalizeClass)(o.inputRadioClass)},[(0,t.createElementVNode)(`span`,{class:(0,t.normalizeClass)(o.inputRadioMinClass)},null,2)],2),r.label?((0,t.openBlock)(),(0,t.createElementBlock)(`span`,{key:0,class:(0,t.normalizeClass)(o.labelClass)},[(0,t.createTextVNode)((0,t.toDisplayString)(r.label)+` `,1),r.required?((0,t.openBlock)(),(0,t.createElementBlock)(`span`,{key:0,class:(0,t.normalizeClass)(o.requiredClass)},`*`,2)):(0,t.createCommentVNode)(``,!0)],2)):(0,t.createCommentVNode)(``,!0)]),r.description?((0,t.openBlock)(),(0,t.createElementBlock)(`span`,{key:0,class:(0,t.normalizeClass)(o.descriptionClass)},(0,t.toDisplayString)(r.description),3)):(0,t.createCommentVNode)(``,!0)])}var Is=$(js,[[`render`,Fs]]),Ls={name:`ButtonStyle`,emits:[`click`],props:{type:{type:String,default:`button`,validator:e=>[`button`,`submit`].includes(e)},class:{type:String,default:``},disabled:{type:Boolean,default:!1},delay:{type:String,default:`1.5`}},data(){return{internalDisabled:!1}},computed:{isDisabled(){return this.disabled||this.internalDisabled},buttonClasses(){return[this.class]}},methods:{handleClick(e){this.isDisabled||(this.$emit(`click`,e),this.internalDisabled=!0,setTimeout(()=>{this.internalDisabled=!1},1e3*Number(this.delay)))}}},Rs=[`type`,`disabled`];function zs(e,n,r,i,a,o){return(0,t.openBlock)(),(0,t.createElementBlock)(`button`,{type:r.type,onClick:n[0]||=(...e)=>o.handleClick&&o.handleClick(...e),disabled:o.isDisabled,class:(0,t.normalizeClass)(o.buttonClasses)},[(0,t.renderSlot)(e.$slots,`default`)],10,Rs)}var Bs=$(Ls,[[`render`,zs]]),Vs={name:`InputFileDownloadStyle`,props:{modelValue:{type:File,default:null},disabled:{type:Boolean,default:!1},delay:{type:String,default:`1.5`},state:{type:String,default:`download`,validator(e){return[`download`,`loader`,`complete`].includes(e)}}},data(){return{internalDisabled:!1}},computed:{model:{get(){return this.modelValue},set(e){this.$emit(`update:modelValue`,e),this.$emit(`change`,e)}},isDisabled(){return this.disabled||this.internalDisabled},buttonClass(){return[Q.FILE_BUTTON_BASE,this.isDisabled?Q.FILE_BUTTON_DISABLED:Q.FILE_BUTTON_ACTIVE]},iconClass(){return[`w-10 h-10 flex items-center justify-center rounded-full`,this.isDisabled?Q.FILE_ICON_BG_DISABLED:this.state===`complete`?Q.FILE_ICON_BG_COMPLETE:Q.FILE_ICON_BG]}},methods:{handleClick(){this.isDisabled||(this.internalDisabled=!0,setTimeout(()=>{this.internalDisabled=!1},1e3*Number(this.delay)))}}},Hs={class:`inline-block`},Us=[`disabled`],Ws={class:`hidden sm:flex flex-col text-left leading-tight`},Gs={key:0,class:`text-sm font-bold`},Ks={key:1,class:`text-sm font-bold`},qs={key:2,class:`text-sm font-bold`};function Js(e,n,r,i,a,o){let s=(0,t.resolveComponent)(`font-awesome-icon`);return(0,t.openBlock)(),(0,t.createElementBlock)(`div`,Hs,[(0,t.createElementVNode)(`button`,{type:`button`,onClick:n[0]||=(...e)=>o.handleClick&&o.handleClick(...e),disabled:o.isDisabled,class:(0,t.normalizeClass)(o.buttonClass)},[(0,t.createElementVNode)(`span`,{class:(0,t.normalizeClass)(o.iconClass)},[r.state===`download`?((0,t.openBlock)(),(0,t.createBlock)(s,{key:0,icon:`fa-solid fa-cloud-arrow-down`,class:`w-5 h-5 text-white`})):(0,t.createCommentVNode)(``,!0),r.state===`loader`?((0,t.openBlock)(),(0,t.createBlock)(s,{key:1,icon:`fa-solid fa-spinner`,class:`w-5 h-5 text-white animate-spin`})):(0,t.createCommentVNode)(``,!0),r.state===`complete`?((0,t.openBlock)(),(0,t.createBlock)(s,{key:2,icon:`fa-solid fa-check`,class:`w-5 h-5 text-white`})):(0,t.createCommentVNode)(``,!0)],2),(0,t.createElementVNode)(`div`,Ws,[r.state===`download`?((0,t.openBlock)(),(0,t.createElementBlock)(`span`,Gs,`Descargar`)):(0,t.createCommentVNode)(``,!0),r.state===`loader`?((0,t.openBlock)(),(0,t.createElementBlock)(`span`,Ks,`Descargando`)):(0,t.createCommentVNode)(``,!0),r.state===`complete`?((0,t.openBlock)(),(0,t.createElementBlock)(`span`,qs,`Descargado`)):(0,t.createCommentVNode)(``,!0)])],10,Us)])}var Ys=$(Vs,[[`render`,Js]]),Xs={name:`InputFileUploadStyle`,props:{modelValue:{type:File,default:null},disabled:{type:Boolean,default:!1},delay:{type:String,default:`1.5`},formats:{type:Array,default:()=>[]},maxSizeMB:{type:[String,Number],default:5},state:{type:String,default:`uphold`,validator(e){return[`uphold`,`loader`].includes(e)}}},data(){return{internalDisabled:!1,description:``}},computed:{model:{get(){return this.modelValue},set(e){this.$emit(`update:modelValue`,e),this.$emit(`change`,e)}},isDisabled(){return this.disabled||this.internalDisabled},formatsText(){return this.formats.length?this.formats.join(`, `):`Todos`},acceptFormats(){return this.formats.map(e=>`.${e}`).join(`,`)},descriptionClass(){return[`block w-full text-sm text-right`,this.validate===!1?`text-red-500`:this.validate===!0?`text-emerald-500`:`text-gray-500`]},buttonClass(){return[Q.FILE_BUTTON_BASE,this.isDisabled?Q.FILE_BUTTON_DISABLED:Q.FILE_BUTTON_ACTIVE]},iconClass(){return[`w-10 h-10 flex items-center justify-center rounded-full`,this.isDisabled?Q.FILE_ICON_BG_DISABLED:Q.FILE_ICON_BG]}},methods:{handleClick(){this.isDisabled||(this.$refs.fileInput.click(),this.internalDisabled=!0,setTimeout(()=>{this.internalDisabled=!1},1e3*Number(this.delay)))},onFileSelected(e){this.description=``,this.validate=null;let t=e.target.files[0];if(!t)return;let n=t.size/1024/1024,r=t.name.split(`.`).pop().toLowerCase();if(n>Number(this.maxSizeMB)){this.description=`El archivo supera los ${this.maxSizeMB}MB`,this.validate=!1,this.model=null,e.target.value=``;return}if(this.formats.length&&!this.formats.includes(r)){this.description=`Formato no permitido: .${r}`,this.validate=!1,this.model=null,e.target.value=``;return}this.model=t,this.description=t.name,this.validate=!0}}},Zs={class:`inline-block`},Qs=[`accept`,`disabled`],$s={class:`block text-xs text-gray-500 mb-1`},ec={class:`font-bold text-gray-600 uppercase`},tc=[`disabled`],nc={class:`hidden sm:flex flex-col text-left leading-tight`},rc={class:`text-xs font-bold text-gray-500`};function ic(e,n,r,i,a,o){let s=(0,t.resolveComponent)(`font-awesome-icon`);return(0,t.openBlock)(),(0,t.createElementBlock)(`div`,Zs,[(0,t.createElementVNode)(`input`,{ref:`fileInput`,type:`file`,class:`hidden`,accept:o.acceptFormats,disabled:o.isDisabled,onChange:n[0]||=(...e)=>o.onFileSelected&&o.onFileSelected(...e)},null,40,Qs),(0,t.createElementVNode)(`span`,$s,[n[2]||=(0,t.createTextVNode)(` Formatos permitidos: `,-1),(0,t.createElementVNode)(`span`,ec,(0,t.toDisplayString)(`${o.formatsText}.`),1)]),(0,t.createElementVNode)(`button`,{type:`button`,onClick:n[1]||=(...e)=>o.handleClick&&o.handleClick(...e),disabled:o.isDisabled,class:(0,t.normalizeClass)(o.buttonClass)},[(0,t.createElementVNode)(`span`,{class:(0,t.normalizeClass)(o.iconClass)},[r.state===`uphold`?((0,t.openBlock)(),(0,t.createBlock)(s,{key:0,icon:`fa-solid fa-cloud-arrow-up`,class:`w-5 h-5 text-white`})):(0,t.createCommentVNode)(``,!0),r.state===`loader`?((0,t.openBlock)(),(0,t.createBlock)(s,{key:1,icon:`fa-solid fa-spinner`,class:`w-5 h-5 text-white animate-spin`})):(0,t.createCommentVNode)(``,!0)],2),(0,t.createElementVNode)(`div`,nc,[n[3]||=(0,t.createElementVNode)(`span`,{class:`text-sm font-bold`},`Adjuntar`,-1),(0,t.createElementVNode)(`span`,rc,(0,t.toDisplayString)(`Max ${r.maxSizeMB} MB`),1)])],10,tc),a.description?((0,t.openBlock)(),(0,t.createElementBlock)(`p`,{key:0,class:(0,t.normalizeClass)(o.descriptionClass)},(0,t.toDisplayString)(a.description),3)):(0,t.createCommentVNode)(``,!0)])}var ac=$(Xs,[[`render`,ic]]),oc={name:`LoaderStyle`,props:{message:{type:String,default:`Cargando...`}},computed:{arcStroke(){return Q.LOADER_ARC_STROKE},messageClass(){return Q.LOADER_MESSAGE}}},sc={class:`flex flex-col items-center justify-center gap-3`},cc={class:`relative w-16 h-16`},lc={class:`absolute inset-0 w-full h-full animate-spin`,viewBox:`0 0 100 100`},uc=[`stroke`];function dc(e,n,r,i,a,o){return(0,t.openBlock)(),(0,t.createElementBlock)(`div`,sc,[(0,t.createElementVNode)(`div`,cc,[n[0]||=(0,t.createElementVNode)(`svg`,{class:`w-full h-full`,viewBox:`0 0 100 100`},[(0,t.createElementVNode)(`circle`,{cx:`50`,cy:`50`,r:`45`,stroke:`#E5E7EB`,"stroke-width":`8`,fill:`none`})],-1),((0,t.openBlock)(),(0,t.createElementBlock)(`svg`,lc,[(0,t.createElementVNode)(`circle`,{cx:`50`,cy:`50`,r:`45`,stroke:o.arcStroke,"stroke-width":`8`,fill:`none`,"stroke-linecap":`round`,"stroke-dasharray":`70 213`},null,8,uc)]))]),(0,t.createElementVNode)(`div`,{class:(0,t.normalizeClass)(o.messageClass)},(0,t.toDisplayString)(r.message),3)])}var fc=$(oc,[[`render`,dc]]),pc={name:`ModalStyle`,props:{modelValue:{type:Boolean,default:!1},title:{type:String,default:`Sin titulo asignado`},size:{type:String,default:`lg`,validator:e=>[`sm`,`md`,`lg`,`xl`,`2xl`,`3xl`,`4xl`,`5xl`,`full`].includes(e)},showCloseButton:{type:Boolean,default:!0},closeOnEscape:{type:Boolean,default:!0},closeOnOverlayClick:{type:Boolean,default:!0}},emits:[`update:modelValue`],computed:{sizeClass(){let e={sm:`max-w-sm`,md:`max-w-md`,lg:`max-w-lg`,xl:`max-w-xl`,"2xl":`max-w-2xl`,"3xl":`max-w-3xl`,"4xl":`max-w-4xl`,"5xl":`max-w-5xl`,full:`max-w-[95%] h-[90vh]`};return e[this.size]||e.md}},watch:{modelValue:{handler(e){this.toggleBodyScroll(e)},immediate:!0}},mounted(){this.closeOnEscape&&window.addEventListener(`keydown`,this.handleKeydown)},beforeUnmount(){this.closeOnEscape&&window.removeEventListener(`keydown`,this.handleKeydown),this.toggleBodyScroll(!1)},methods:{toggleBodyScroll(e){if(e){let e=window.innerWidth-document.documentElement.clientWidth;document.body.style.overflow=`hidden`,document.body.style.paddingRight=`${e}px`}else document.body.style.overflow=``,document.body.style.paddingRight=``},handleKeydown(e){e.key===`Escape`&&this.modelValue&&this.closeOnEscape&&this.handleClose()},handleClose(){this.$emit(`update:modelValue`,!1)},close(){this.handleClose()}}},mc={key:0,class:`fixed inset-0 bg-black/30 backdrop-blur-xs flex items-center justify-center z-100 p-4 select-none`},hc={class:`p-4 border-b border-gray-200 flex items-center justify-between gap-2`},gc=[`title`],_c={class:`p-4 overflow-y-auto flex-1`},vc={key:0,class:`p-4 border-t border-gray-200`};function yc(e,n,r,i,a,o){let s=(0,t.resolveComponent)(`font-awesome-icon`);return(0,t.openBlock)(),(0,t.createBlock)(t.Teleport,{to:`body`},[(0,t.createVNode)(t.Transition,{"enter-active-class":`transition-opacity duration-300`,"leave-active-class":`transition-opacity duration-300`,"enter-from-class":`opacity-0`,"leave-to-class":`opacity-0`},{default:(0,t.withCtx)(()=>[r.modelValue?((0,t.openBlock)(),(0,t.createElementBlock)(`div`,mc,[(0,t.createVNode)(t.Transition,{"enter-active-class":`transition duration-300`,"leave-active-class":`transition duration-300`,"enter-from-class":`opacity-0 scale-95`,"leave-to-class":`opacity-0 scale-95`},{default:(0,t.withCtx)(()=>[r.modelValue?((0,t.openBlock)(),(0,t.createElementBlock)(`div`,{key:0,class:(0,t.normalizeClass)([`bg-white rounded-lg shadow-2xl max-h-[90vh] flex flex-col w-full`,o.sizeClass]),onClick:n[1]||=(0,t.withModifiers)(()=>{},[`stop`])},[(0,t.createElementVNode)(`div`,hc,[(0,t.renderSlot)(e.$slots,`title`,{},()=>[(0,t.createElementVNode)(`h3`,{class:`text-lg font-semibold text-gray-700 flex-1 min-w-0 truncate`,title:r.title},(0,t.toDisplayString)(r.title),9,gc)]),r.showCloseButton?((0,t.openBlock)(),(0,t.createElementBlock)(`button`,{key:0,onClick:n[0]||=(...e)=>o.handleClose&&o.handleClose(...e),type:`button`,class:`text-gray-400 hover:text-gray-600 transition-colors px-1.5 py-1 rounded-lg hover:bg-gray-100 shrink-0 cursor-pointer`},[(0,t.createVNode)(s,{icon:`fa-solid fa-xmark`})])):(0,t.createCommentVNode)(``,!0)]),(0,t.createElementVNode)(`div`,_c,[(0,t.renderSlot)(e.$slots,`default`,{close:o.handleClose})]),e.$slots.footer?((0,t.openBlock)(),(0,t.createElementBlock)(`div`,vc,[(0,t.renderSlot)(e.$slots,`footer`,{close:o.handleClose})])):(0,t.createCommentVNode)(``,!0)],2)):(0,t.createCommentVNode)(``,!0)]),_:3})])):(0,t.createCommentVNode)(``,!0)]),_:3})])}var bc=$(pc,[[`render`,yc]]),xc={name:`SelectStyle`,props:{modelValue:[String,Number,Object],returnValue:{type:String,default:`value`,validator(e){return[`value`,`text`,`object`].includes(e)}},label:{type:String,default:``},description:{type:String,default:``},list:{type:Array,default:()=>[]},disabled:{type:Boolean,default:!1},required:{type:Boolean,default:!1},validate:{type:Boolean,default:null},mclass:{type:String,default:null},wrapOptions:{type:Boolean,default:!1}},data(){return{uuid:Z.getUUID(),open:!1,selected:null,dropdownStyle:{},dropdownMeasured:!1,naturalWidth:0,positionRaf:null,highlightedIndex:-1,searchBuffer:``,searchTimeout:null}},computed:{model:{get(){return this.modelValue},set(e){this.$emit(`update:modelValue`,e),this.$emit(`change`,e)}},items(){let e=[];for(let t of this.list)if(t&&Array.isArray(t.options))for(let n of t.options)e.push(this.normalizeItem(n));else e.push(this.normalizeItem(t));return e},displayGroups(){let e=[],t=0;for(let n of this.list)if(n&&Array.isArray(n.options)){let r=n.options.map(e=>({item:this.normalizeItem(e),index:t++}));e.push({label:n.label??``,options:r})}else e.push({label:``,options:[{item:this.normalizeItem(n),index:t++}]});return e},selectedText(){let e=this.items.find(e=>e.value===this.selected);return e?e.text:`- Seleccione una opción`},labelClass(){return Q.inputLabelClass(this.disabled)},inputClass(){return this.disabled?[this.mclass,Q.SELECT_DISABLED]:[this.mclass,Q.INPUT_BASE,`cursor-pointer`,Q.inputValidateClass(this.validate),this.validate===null?null:`pr-10`]},descriptionClass(){return Q.inputDescriptionClass(this.validate)},dropdownClass(){return[Q.SELECT_DROPDOWN.replace(`absolute`,`fixed`).replace(`z-20`,``).replace(`w-full`,``),`w-max`]},emptyClass(){return Q.SELECT_EMPTY},optgroupClass(){return Q.SELECT_OPTGROUP},requiredClass(){return Q.REQUIRED_ASTERISK},iconStaticClass(){return[Q.ICON_SIZE_STATIC,Q.iconGroupInteractiveClass(this.disabled)]}},watch:{modelValue:{immediate:!0,handler(e){this.syncSelected(e)}},list:{immediate:!0,handler(){this.syncSelected(this.modelValue)}},open(e,t){e===!0&&(this.dropdownMeasured=!1,this.naturalWidth=0,this.positionDropdown(),this.scrollToHighlighted(),this.$nextTick(()=>{let e=this.$refs.optionsList;this.naturalWidth=e?e.scrollWidth:0,this.dropdownMeasured=!0,this.positionDropdown()}),window.addEventListener(`scroll`,this.onScrollReposition,!0),window.addEventListener(`resize`,this.schedulePosition)),t===!0&&e===!1&&(this.$emit(`blur`),this.positionRaf&&=(cancelAnimationFrame(this.positionRaf),null),window.removeEventListener(`scroll`,this.onScrollReposition,!0),window.removeEventListener(`resize`,this.schedulePosition))},highlightedIndex(){this.scrollToHighlighted(!1)}},methods:{normalizeItem(e){return{...e,value:e&&e.value!==void 0?e.value:e.text}},getOptionClass(e,t){return[Q.SELECT_OPTION_BASE,this.wrapOptions?`whitespace-normal overflow-hidden text-ellipsis`:`whitespace-nowrap overflow-hidden text-ellipsis`,Q.selectOptionClass(e.value===this.selected,this.highlightedIndex===t)]},onScrollReposition(e){let t=this.$refs.optionsList;t&&e&&t.contains(e.target)||this.schedulePosition()},schedulePosition(){this.positionRaf||=requestAnimationFrame(()=>{this.positionRaf=null,this.positionDropdown()})},positionDropdown(){let e=this.$refs.inputWrap;if(!e)return;let t=e.getBoundingClientRect();if(this.dropdownMeasured&&(t.bottom<0||t.top>window.innerHeight)){this.open=!1;return}let n=window.innerHeight-t.bottom,r=t.top,i=n<220&&r>n,a={position:`fixed`,zIndex:9999,minWidth:`${t.width}px`};i?a.bottom=`${window.innerHeight-t.top}px`:a.top=`${t.bottom}px`;let o=document.documentElement.clientWidth,s=this.naturalWidth||t.width,c=o-t.left-8,l=t.right-8;s<=c?a.left=`${t.left}px`:s<=l?a.left=`${t.right-s}px`:l>c?(a.left=`8px`,a.maxWidth=`${l}px`):(a.left=`${t.left}px`,a.maxWidth=`${c}px`),this.dropdownMeasured||(a.opacity=`0`),this.dropdownStyle=a},scrollToHighlighted(e=!1){this.$nextTick(()=>{let t=this.$refs.optionsList;if(!t||this.highlightedIndex<0)return;let n=t.querySelector(`[data-index="${this.highlightedIndex}"]`);n&&(e?t.scrollTop=n.offsetTop-t.clientHeight/2+n.offsetHeight/2:n.scrollIntoView({block:`nearest`,behavior:`smooth`}))})},toggleOptions(){if(!this.disabled&&(this.open=!this.open,this.open)){let e=this.items.findIndex(e=>e.value===this.selected);this.highlightedIndex=e>=0?e:0}},selectOption(e){this.selected=e.value,this.open=!1,this.returnValue===`value`?(this.$emit(`update:modelValue`,e.value),this.$emit(`change`,e.value)):this.returnValue===`text`?(this.$emit(`update:modelValue`,e.text),this.$emit(`change`,e.text)):this.returnValue===`object`&&(this.$emit(`update:modelValue`,e),this.$emit(`change`,e))},handleClickOutside(e){if(!this.open)return;let t=this.$refs.selectContainer&&this.$refs.selectContainer.contains(e.target),n=this.$refs.optionsList&&this.$refs.optionsList.contains(e.target);!t&&!n&&(this.open=!1)},handleKeydown(e){if(this.disabled)return;let t=this.items.length-1;switch(e.key){case`ArrowDown`:e.preventDefault(),this.open?this.highlightedIndex=this.highlightedIndex<t?this.highlightedIndex+1:0:(this.open=!0,this.highlightedIndex=0);break;case`ArrowUp`:e.preventDefault(),this.open&&(this.highlightedIndex=this.highlightedIndex>0?this.highlightedIndex-1:t);break;case`Enter`:e.preventDefault(),this.open&&this.highlightedIndex>=0?this.selectOption(this.items[this.highlightedIndex]):this.open=!0;break;case`Escape`:this.open=!1;break;default:this.handleTypeSearch(e.key)}},handleTypeSearch(e){if(e.length!==1)return;clearTimeout(this.searchTimeout),this.searchBuffer+=e.toLowerCase();let t=this.searchBuffer,n=this.items.findIndex(e=>e.text.toLowerCase().startsWith(t));n===-1&&(n=this.items.findIndex(e=>e.text.toLowerCase().includes(t))),n!==-1&&(this.highlightedIndex=n,this.open=!0,this.scrollToHighlighted(!0)),this.searchTimeout=setTimeout(()=>{this.searchBuffer=``},1e3)},syncSelected(e){if(e==null){this.selected=null;return}if(this.returnValue===`value`){let t=this.items.find(t=>t.value==e);this.selected=t?t.value:null}if(this.returnValue===`text`){let t=this.items.find(t=>t.text==e);this.selected=t?t.value:null}this.returnValue===`object`&&(this.selected=e?.value??null)}},mounted(){document.addEventListener(`mousedown`,this.handleClickOutside)},beforeUnmount(){document.removeEventListener(`mousedown`,this.handleClickOutside),window.removeEventListener(`scroll`,this.onScrollReposition,!0),window.removeEventListener(`resize`,this.schedulePosition),this.positionRaf&&cancelAnimationFrame(this.positionRaf)}},Sc={class:`w-full`,ref:`selectContainer`},Cc=[`for`],wc={class:`relative`},Tc=[`id`,`value`],Ec=[`data-index`,`onClick`];function Dc(e,n,r,i,a,o){let s=(0,t.resolveComponent)(`font-awesome-icon`);return(0,t.openBlock)(),(0,t.createElementBlock)(`div`,Sc,[(0,t.createElementVNode)(`label`,{class:(0,t.normalizeClass)(o.labelClass),for:a.uuid},[(0,t.createTextVNode)((0,t.toDisplayString)(r.label)+` `,1),r.required?((0,t.openBlock)(),(0,t.createElementBlock)(`span`,{key:0,class:(0,t.normalizeClass)(o.requiredClass)},`*`,2)):(0,t.createCommentVNode)(``,!0)],10,Cc),(0,t.createElementVNode)(`div`,wc,[(0,t.createElementVNode)(`div`,{class:`relative group`,ref:`inputWrap`,onClick:n[1]||=(...e)=>o.toggleOptions&&o.toggleOptions(...e)},[(0,t.createElementVNode)(`input`,{type:`text`,id:a.uuid,readonly:``,value:o.selectedText,class:(0,t.normalizeClass)(o.inputClass),onKeydown:n[0]||=(...e)=>o.handleKeydown&&o.handleKeydown(...e)},null,42,Tc),(0,t.createVNode)(s,{icon:`fa-solid fa-chevron-down`,class:(0,t.normalizeClass)([o.iconStaticClass,`absolute right-3 top-1/2 -translate-y-1/2 pointer-events-none`])},null,8,[`class`])],512),((0,t.openBlock)(),(0,t.createBlock)(t.Teleport,{to:`body`},[a.open&&!r.disabled?((0,t.openBlock)(),(0,t.createElementBlock)(`ul`,{key:0,ref:`optionsList`,class:(0,t.normalizeClass)(o.dropdownClass),style:(0,t.normalizeStyle)(a.dropdownStyle)},[((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(o.displayGroups,(e,n)=>((0,t.openBlock)(),(0,t.createElementBlock)(t.Fragment,{key:`g`+n},[e.label?((0,t.openBlock)(),(0,t.createElementBlock)(`li`,{key:0,class:(0,t.normalizeClass)(o.optgroupClass)},(0,t.toDisplayString)(e.label),3)):(0,t.createCommentVNode)(``,!0),((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(e.options,e=>((0,t.openBlock)(),(0,t.createElementBlock)(`li`,{key:e.index,"data-index":e.index,onClick:t=>o.selectOption(e.item),class:(0,t.normalizeClass)(o.getOptionClass(e.item,e.index))},(0,t.toDisplayString)(e.item.text),11,Ec))),128))],64))),128)),o.items.length===0?((0,t.openBlock)(),(0,t.createElementBlock)(`li`,{key:0,class:(0,t.normalizeClass)(o.emptyClass)},`Sin registros`,2)):(0,t.createCommentVNode)(``,!0)],6)):(0,t.createCommentVNode)(``,!0)])),(0,t.createElementVNode)(`span`,{onClick:n[2]||=(...e)=>o.toggleOptions&&o.toggleOptions(...e),class:(0,t.normalizeClass)([`absolute right-3 top-1/2 -translate-y-1/2`,r.disabled?`cursor-not-allowed`:`cursor-pointer`])},null,2)]),r.description?((0,t.openBlock)(),(0,t.createElementBlock)(`span`,{key:0,class:(0,t.normalizeClass)(o.descriptionClass)},(0,t.toDisplayString)(r.description),3)):(0,t.createCommentVNode)(``,!0)],512)}var Oc=$(xc,[[`render`,Dc]]),kc={name:`TextAreaStyle`,props:{modelValue:{type:String,default:``},label:{type:String,default:``},description:{type:String,default:``},placeholder:{type:String,default:``},row:{type:String,default:`3`},maxlength:{type:String,default:null},disabled:{type:Boolean,default:!1},required:{type:Boolean,default:!1},validate:{type:Boolean,default:null},mclass:{type:String,default:null}},computed:{model:{get(){return this.modelValue},set(e){this.$emit(`update:modelValue`,e)}},labelClass(){return Q.inputLabelClass(this.disabled)},inputClass(){return[this.mclass,Q.INPUT_BASE,Q.inputValidateClass(this.validate)]},descriptionClass(){return Q.inputDescriptionClass(this.validate)},requiredClass(){return Q.REQUIRED_ASTERISK}},data(){return{uuid:Z.getUUID()}},methods:{emitBlur(e){this.$emit(`blur`,e)}}},Ac={class:`w-full`},jc=[`for`],Mc=[`id`,`placeholder`,`maxlength`,`rows`];function Nc(e,n,r,i,a,o){return(0,t.openBlock)(),(0,t.createElementBlock)(`div`,Ac,[(0,t.createElementVNode)(`label`,{class:(0,t.normalizeClass)(o.labelClass),for:a.uuid},[(0,t.createTextVNode)((0,t.toDisplayString)(r.label)+` `,1),r.required?((0,t.openBlock)(),(0,t.createElementBlock)(`span`,{key:0,class:(0,t.normalizeClass)(o.requiredClass)},`*`,2)):(0,t.createCommentVNode)(``,!0)],10,jc),(0,t.withDirectives)((0,t.createElementVNode)(`textarea`,(0,t.mergeProps)({"onUpdate:modelValue":n[0]||=e=>o.model=e,id:a.uuid,placeholder:r.placeholder},{disabled:r.disabled,required:r.required},{onBlur:n[1]||=(...e)=>o.emitBlur&&o.emitBlur(...e),maxlength:r.maxlength?Number(r.maxlength):null,rows:Number(r.row),class:[o.inputClass,`resize-none`]}),null,16,Mc),[[t.vModelText,o.model]]),r.description?((0,t.openBlock)(),(0,t.createElementBlock)(`span`,{key:0,class:(0,t.normalizeClass)(o.descriptionClass)},(0,t.toDisplayString)(r.description),3)):(0,t.createCommentVNode)(``,!0)])}var Pc=$(kc,[[`render`,Nc]]),Fc={name:`PaginationStyle`,props:{totalPages:{type:Number,default:0},actualPage:{type:Number,default:1},records:{type:Number,default:0},limit:{type:Number,default:0},summary:{type:Boolean,default:!1}},computed:{start(){return(this.actualPage-1)*this.limit+1},end(){return Math.min(this.actualPage*this.limit,this.records)},navPrevClass(){return Q.PAGINATION_NAV_PREV},navNextClass(){return Q.PAGINATION_NAV_NEXT},summaryClass(){return Q.PAGINATION_SUMMARY},visiblePages(){return this.totalPages<=7?Array.from({length:this.totalPages},(e,t)=>t+1):this.actualPage<=4?[1,2,3,4,`...`,this.totalPages-2,this.totalPages-1,this.totalPages]:this.actualPage>=this.totalPages-3?[1,2,3,`...`,this.totalPages-3,this.totalPages-2,this.totalPages-1,this.totalPages]:[1,`...`,this.actualPage-1,this.actualPage,this.actualPage+1,`...`,this.totalPages]}},methods:{getPageClass(e,t){return Q.paginationPageClass(e,this.actualPage,t)},beforePage(){this.actualPage!==1&&this.$emit(`page`,this.actualPage-1)},nextPage(){this.actualPage!==this.totalPages&&this.$emit(`page`,this.actualPage+1)},currentPage(e){this.$emit(`page`,e)}}},Ic={class:`flex flex-col items-center justify-center text-gray-700`},Lc={class:`flex justify-center text-xs`},Rc=[`disabled`],zc=[`onClick`,`disabled`],Bc=[`disabled`];function Vc(e,n,r,i,a,o){return(0,t.openBlock)(),(0,t.createElementBlock)(`div`,Ic,[(0,t.createElementVNode)(`div`,Lc,[(0,t.createElementVNode)(`button`,{type:`button`,disabled:r.actualPage===1,onClick:n[0]||=e=>o.beforePage(),class:(0,t.normalizeClass)(o.navPrevClass)},` Anterior `,10,Rc),((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(o.visiblePages,(e,n)=>((0,t.openBlock)(),(0,t.createElementBlock)(`button`,{key:n,onClick:t=>e!==`...`&&o.currentPage(e),disabled:e===`...`,class:(0,t.normalizeClass)(o.getPageClass(e,n))},(0,t.toDisplayString)(e),11,zc))),128)),(0,t.createElementVNode)(`button`,{type:`button`,disabled:r.actualPage===r.totalPages,onClick:n[1]||=e=>o.nextPage(),class:(0,t.normalizeClass)(o.navNextClass)},` Siguiente `,10,Bc)]),r.summary?((0,t.openBlock)(),(0,t.createElementBlock)(`span`,{key:0,class:(0,t.normalizeClass)(o.summaryClass)},(0,t.toDisplayString)(`Mostrando ${o.start} - ${o.end} de ${r.records}`),3)):(0,t.createCommentVNode)(``,!0)])}var Hc=$(Fc,[[`render`,Vc]]),Uc=[Xa,Za,wo,Yo,Ro,as,fs,vs,ws,As,Is,Bs,Ys,ac,fc,bc,Oc,Pc,Hc];e.AlertStyle=Xa,e.ButtonStyle=Bs,e.DialogStyle=Za,e.InputCheckStyle=ws,e.InputDateStyle=wo,e.InputDateTimeStyle=Yo,e.InputFileDownloadStyle=Ys,e.InputFileUploadStyle=ac,e.InputNumberStyle=as,e.InputPasswordStyle=fs,e.InputRadioStyle=As,e.InputSwitchStyle=Is,e.InputTextStyle=vs,e.InputTimeStyle=Ro,e.LoaderStyle=fc,e.ModalStyle=bc,e.PaginationStyle=Hc,e.SelectStyle=Oc,e.TextAreaStyle=Pc,e.configureStyles=Ya,e.default={install(e,t={}){t.styles&&Ya(t.styles),e.component(`font-awesome-icon`,Qi),Uc.forEach(t=>{e.component(t.name,t)}),e.config.globalProperties.$utilstyle=Z,e.config.globalProperties.$alertstyle=Xa,e.config.globalProperties.$dialogstyle=Za}}});
|
|
568
|
+
<div class="dialog-description">${n}</div>`;e.dialogBox.innerHTML=r,e.overlay.appendChild(e.dialogBox),document.body.appendChild(e.overlay),setTimeout(()=>e.overlay.classList.add(`show`),10),document.addEventListener(`keydown`,e.#t)}static#t(t){e.isOpen&&t.key===`Escape`&&(e.dialogBox.classList.add(`dialog-shake`),setTimeout(()=>{e.dialogBox?.classList.remove(`dialog-shake`)},250))}static confirm(t,n=``){e.#e(t,n);let r={_onAccept:null,_onCancel:null,onAccept(e){return this._onAccept=e,this},onCancel(e){return this._onCancel=e,this},show(){return this._renderButtons(),this},_renderButtons(){let t=document.createElement(`div`);t.className=`dialog-buttons`;let n=document.createElement(`button`);n.className=`dialog-btn dialog-btn-cancel`,n.textContent=`Cancelar`;let r=document.createElement(`button`);r.className=`dialog-btn dialog-btn-accept`,r.textContent=`Aceptar`,n.addEventListener(`click`,()=>{e.finish(),this._onCancel&&this._onCancel()}),r.addEventListener(`click`,()=>{e.finish(),this._onAccept&&this._onAccept()}),t.appendChild(n),t.appendChild(r),e.dialogBox.appendChild(t)}};return r._renderButtons(),r}static info(t,n=``){e.#e(t,n);let r={_onConfirm:null,onConfirm(e){return this._onConfirm=e,this},show(){return this._renderButton(),this},_renderButton(){let t=document.createElement(`div`);t.className=`dialog-buttons`;let n=document.createElement(`button`);n.className=`dialog-btn dialog-btn-accept`,n.textContent=`Aceptar`,n.addEventListener(`click`,()=>{e.finish(),this._onConfirm&&this._onConfirm()}),t.appendChild(n),e.dialogBox.appendChild(t)}};return r._renderButton(),r}static loading(t,n=``){e.#e(t,``);let r=e.dialogBox.querySelector(`.dialog-title`);r&&r.remove();let i=e.dialogBox.querySelector(`.dialog-description`);i&&i.remove(),e.dialogBox.style.paddingTop=`1rem`,e.dialogBox.style.paddingBottom=`1rem`;let a=document.createElement(`div`);a.className=`dialog-loading-layout`;let o=document.createElement(`div`);o.className=`dialog-loading-icon`;let s=document.createElement(`div`);s.className=`dialog-loading-spinner`,o.appendChild(s);let c=document.createElement(`div`);c.className=`dialog-loading-texts`;let l=t&&t.trim()!==``,u=n&&n.trim()!==``;if(l){let e=document.createElement(`div`);e.className=`dialog-loading-title`,e.textContent=t,c.appendChild(e)}if(u){let e=document.createElement(`div`);e.className=`dialog-loading-message`,e.textContent=n,c.appendChild(e)}return(l&&!u||!l&&u)&&(c.style.justifyContent=`center`),a.appendChild(o),a.appendChild(c),e.dialogBox.appendChild(a),{close:()=>e.finish(),updateTitle:e=>{let t=c.querySelector(`.dialog-loading-title`);if(t)t.textContent=e;else if(e){let t=document.createElement(`div`);t.className=`dialog-loading-title`,t.textContent=e,c.insertBefore(t,c.firstChild),c.style.justifyContent=`flex-start`}},updateMessage:e=>{let t=c.querySelector(`.dialog-loading-message`);if(t)t.textContent=e;else if(e){let t=document.createElement(`div`);t.className=`dialog-loading-message`,t.textContent=e,c.appendChild(t),c.style.justifyContent=`flex-start`}}}}static finish(t=!1){return new Promise(n=>{if(!e.isOpen||!e.overlay)return n();if(e.isOpen=!1,t){try{e.overlay.remove()}catch{}return e.overlay=null,e.dialogBox=null,document.removeEventListener(`keydown`,e.#t),n()}e.overlay.classList.remove(`show`),setTimeout(()=>{try{e.overlay.remove()}catch{}e.overlay=null,e.dialogBox=null,document.removeEventListener(`keydown`,e.#t),n()},200)})}},Qa=[`enero`,`febrero`,`marzo`,`abril`,`mayo`,`junio`,`julio`,`agosto`,`septiembre`,`octubre`,`noviembre`,`diciembre`],$a={props:{modelValue:[String,Date],label:{type:String,default:``},description:{type:String,default:``},min:{type:String,default:`1900-01-01`},max:{type:String,default:`2100-12-31`},disabledDates:{type:[Array,Object],default:()=>[]},disabled:{type:Boolean,default:!1},readonly:{type:Boolean,default:!1},required:{type:Boolean,default:!1},validate:{type:Boolean,default:null},mclass:{type:String,default:null}},data(){return{uuid:Z.getUUID(),localDate:`dd/mm/aaaa`,activeSection:`day`,dayDigits:``,monthDigits:``,yearDigits:``,sectionSelected:!1,showPicker:!1,dropdownStyle:{},calendarView:`days`,yearRangeStart:new Date().getFullYear()-6,calendarYear:new Date().getFullYear(),calendarMonth:new Date().getMonth(),selectedDate:null}},computed:{model:{get(){return this.modelValue},set(e){this.$emit(`update:modelValue`,e),this.$emit(`change`,e)}},minDateObj(){if(!this.min)return null;let[e,t,n]=this.min.split(`-`).map(Number);return new Date(e,t-1,n)},maxDateObj(){if(!this.max)return null;let[e,t,n]=this.max.split(`-`).map(Number);return new Date(e,t-1,n)},isPrevDisabled(){if(!this.minDateObj)return!1;let e=this.minDateObj;return this.calendarView===`days`?this.calendarYear<e.getFullYear()||this.calendarYear===e.getFullYear()&&this.calendarMonth<=e.getMonth():this.calendarView===`months`?this.calendarYear<=e.getFullYear():this.yearRangeStart<=e.getFullYear()},isNextDisabled(){if(!this.maxDateObj)return!1;let e=this.maxDateObj;return this.calendarView===`days`?this.calendarYear>e.getFullYear()||this.calendarYear===e.getFullYear()&&this.calendarMonth>=e.getMonth():this.calendarView===`months`?this.calendarYear>=e.getFullYear():this.yearRangeStart+11>=e.getFullYear()},labelClass(){return Q.inputLabelClass(this.disabled)},descriptionClass(){return Q.inputDescriptionClass(this.validate)},requiredClass(){return Q.REQUIRED_ASTERISK},iconStaticClass(){return[Q.ICON_SIZE_STATIC,Q.iconInteractiveClass(this.disabled)]}},watch:{showPicker(e){e?(this.$nextTick(()=>this.calculateDropdownPosition()),window.addEventListener(`scroll`,this.calculateDropdownPosition,!0),window.addEventListener(`resize`,this.calculateDropdownPosition)):(window.removeEventListener(`scroll`,this.calculateDropdownPosition,!0),window.removeEventListener(`resize`,this.calculateDropdownPosition))}},methods:{syncDateFromValue(e){if(!e)return this.localDate=`dd/mm/aaaa`,this.dayDigits=``,this.monthDigits=``,this.yearDigits=``,this.selectedDate=null,null;let t=this.parseLocalDate(e);if(!t||isNaN(t))return null;this.selectedDate=t,this.calendarYear=t.getFullYear(),this.calendarMonth=t.getMonth();let n=e=>String(e).padStart(2,`0`);return this.dayDigits=n(t.getDate()),this.monthDigits=n(t.getMonth()+1),this.yearDigits=String(t.getFullYear()),t},prevPeriod(){this.isPrevDisabled||(this.calendarView===`days`?this.calendarMonth===0?(this.calendarMonth=11,this.calendarYear--):this.calendarMonth--:this.calendarView===`months`?this.calendarYear--:this.yearRangeStart-=12)},nextPeriod(){this.isNextDisabled||(this.calendarView===`days`?this.calendarMonth===11?(this.calendarMonth=0,this.calendarYear++):this.calendarMonth++:this.calendarView===`months`?this.calendarYear++:this.yearRangeStart+=12)},selectMonth(e){this.calendarMonth=e,this.calendarView=`days`},selectYear(e){this.calendarYear=e,this.calendarView=`days`},isDayDisabled(e){let t=new Date(e.year,e.month,e.day);return this.minDateObj&&t<this.minDateObj||this.maxDateObj&&t>this.maxDateObj?!0:Array.isArray(this.disabledDates)?this.disabledDates.some(e=>{let n=new Date(e);return n.getFullYear()===t.getFullYear()&&n.getMonth()===t.getMonth()&&n.getDate()===t.getDate()}):!1},selectDay(e){if(this.isDayDisabled(e))return;let t=e=>String(e).padStart(2,`0`),n=t(e.day),r=t(e.month+1),i=e.year;this.selectedDate=new Date(i,e.month,e.day),this.dayDigits=n,this.monthDigits=r,this.yearDigits=String(i),this.localDate=`${n}/${r}/${i}`,this.model=`${i}-${r}-${n}`,this.showPicker=!1},goToToday(){let e=new Date;this.calendarYear=e.getFullYear(),this.calendarMonth=e.getMonth(),this.yearRangeStart=e.getFullYear()-6,this.calendarView=`days`},calculateDropdownPosition(){let e=this.$refs.inputWrap;if(!e)return;let t=e.getBoundingClientRect(),n=window.innerHeight-t.bottom,r=t.top,i=n<340&&r>n,a=t.left;a+288>window.innerWidth-8&&(a=Math.max(8,t.right-288));let o={position:`fixed`,left:`${a}px`,zIndex:9999};i?o.bottom=`${window.innerHeight-t.top}px`:o.top=`${t.bottom}px`,this.dropdownStyle=o},togglePicker(){this.disabled||(this.showPicker=!this.showPicker,this.showPicker&&(this.calendarView=`days`,this.calculateDropdownPosition(),this.selectedDate&&(this.calendarYear=this.selectedDate.getFullYear(),this.calendarMonth=this.selectedDate.getMonth(),this.yearRangeStart=this.calendarYear-6)))},handleClickOutside(e){let t=this.$refs.dateTimeContainer&&this.$refs.dateTimeContainer.contains(e.target),n=this.$refs.pickerRef&&this.$refs.pickerRef.contains(e.target);!t&&!n&&(this.showPicker=!1)},emitValue(){let[e,t,n]=this.localDate.split(`/`);if(/^\d{2}$/.test(e)&&/^\d{2}$/.test(t)&&/^\d{4}$/.test(n)){let r=this.getMaxDay(t,n),i=Number(e),a=Number(t);if(a>=1&&a<=12&&i>=1&&i<=r){this.model=`${n}-${t}-${e}`;return}}this.model=``},initMask(){if(!this.localDate||this.localDate===`dd/mm/aaaa`){this.localDate=`dd/mm/aaaa`,this.dayDigits=``,this.monthDigits=``,this.yearDigits=``,this.activeSection=`day`,this.$nextTick(()=>this.$el.querySelector(`input`).setSelectionRange(0,2));return}let e=this.localDate.split(`/`);e.length>=1&&(this.dayDigits=(e[0]||``).replace(/\D/g,``)),e.length>=2&&(this.monthDigits=(e[1]||``).replace(/\D/g,``)),e.length>=3&&(this.yearDigits=(e[2]||``).replace(/\D/g,``).slice(0,4))},handleSectionSelect(e){let t=e.target.selectionStart;t<=2?(this.activeSection=`day`,e.target.setSelectionRange(0,2)):t<=5?(this.activeSection=`month`,e.target.setSelectionRange(3,5)):(this.activeSection=`year`,e.target.setSelectionRange(6,10)),this.sectionSelected=!0},handleCursorMove(e){if(this.sectionSelected)return;let t=e.target.selectionStart;t<=2?this.activeSection=`day`:t<=5?this.activeSection=`month`:this.activeSection=`year`},handleDateKeydown(e){if(this.readonly){e.preventDefault();return}if(e.key===`Backspace`||e.key===`Delete`){e.preventDefault(),this.activeSection===`day`?this.dayDigits=``:this.activeSection===`month`?this.monthDigits=``:this.activeSection===`year`&&(this.yearDigits=``),this.sectionSelected=!1,this._updateDateDisplay(),this.$nextTick(()=>{let e=this.$el.querySelector(`input`);this.activeSection===`day`?e.setSelectionRange(0,2):this.activeSection===`month`?e.setSelectionRange(3,5):e.setSelectionRange(6,10)});return}if(e.key===`ArrowRight`||e.key===`ArrowLeft`){e.preventDefault();let t=[`day`,`month`,`year`],n=t.indexOf(this.activeSection);this.activeSection=e.key===`ArrowRight`?t[Math.min(n+1,t.length-1)]:t[Math.max(n-1,0)],this.sectionSelected=!0,this.$nextTick(()=>{let e=this.$el.querySelector(`input`);this.activeSection===`day`?e.setSelectionRange(0,2):this.activeSection===`month`?e.setSelectionRange(3,5):e.setSelectionRange(6,10)});return}if(e.key===`ArrowUp`||e.key===`ArrowDown`){e.preventDefault(),this._nudgeDateSection(e.key===`ArrowUp`?1:-1),this._updateDateDisplay(),this.$nextTick(()=>{let e=this.$el.querySelector(`input`);this.activeSection===`day`?e.setSelectionRange(0,2):this.activeSection===`month`?e.setSelectionRange(3,5):e.setSelectionRange(6,10)});return}if(e.key===`Tab`){let t=[`day`,`month`,`year`],n=t.indexOf(this.activeSection),r=e.shiftKey?n-1:n+1;if(r<0||r>=t.length)return;e.preventDefault(),this.activeSection=t[r],this.sectionSelected=!0,this.$nextTick(()=>{let e=this.$el.querySelector(`input`);this.activeSection===`day`?e.setSelectionRange(0,2):this.activeSection===`month`?e.setSelectionRange(3,5):e.setSelectionRange(6,10)});return}if(![`Home`,`End`].includes(e.key)){if(!/^[0-9]$/.test(e.key)){e.preventDefault();return}e.preventDefault(),this.sectionSelected&&=(this.activeSection===`day`?this.dayDigits=``:this.activeSection===`month`?this.monthDigits=``:this.activeSection===`year`&&(this.yearDigits=``),!1),this._typeDateSection(e.key),this._updateDateDisplay(),this.$nextTick(()=>{let e=this.$el.querySelector(`input`);this.activeSection===`month`?e.setSelectionRange(3,5):this.activeSection===`year`&&e.setSelectionRange(6,10)})}},_nudgeDateSection(e){let t=e=>String(e).padStart(2,`0`);if(this.activeSection===`day`){let n=this.getMaxDay(this.monthDigits,this.yearDigits),r=(parseInt(this.dayDigits)||1)+e;r<1&&(r=n),r>n&&(r=1),this.dayDigits=t(r)}else if(this.activeSection===`month`){let n=(parseInt(this.monthDigits)||1)+e;n<1&&(n=12),n>12&&(n=1),this.monthDigits=t(n);let r=this.getMaxDay(this.monthDigits,this.yearDigits);parseInt(this.dayDigits)>r&&(this.dayDigits=t(r))}else if(this.activeSection===`year`){let n=(parseInt(this.yearDigits)||new Date().getFullYear())+e;n<1&&(n=1),this.yearDigits=String(n);let r=this.getMaxDay(this.monthDigits,this.yearDigits);parseInt(this.dayDigits)>r&&(this.dayDigits=t(r))}this._clampToBounds()},_clampToBounds(){if(this.dayDigits.length!==2||this.monthDigits.length!==2||this.yearDigits.length!==4)return;let e=e=>String(e).padStart(2,`0`),t=new Date(Number(this.yearDigits),Number(this.monthDigits)-1,Number(this.dayDigits)),n=null;this.minDateObj&&t<this.minDateObj?n=this.minDateObj:this.maxDateObj&&t>this.maxDateObj&&(n=this.maxDateObj),n&&(this.dayDigits=e(n.getDate()),this.monthDigits=e(n.getMonth()+1),this.yearDigits=String(n.getFullYear()))},_typeDateSection(e){let t=e=>String(e).padStart(2,`0`);if(this.activeSection===`day`){if(this.dayDigits+=e,this.dayDigits=this.dayDigits.slice(-2),this.dayDigits.length===1&&Number(this.dayDigits)>=4&&(this.dayDigits=t(this.dayDigits)),this.dayDigits.length===2){let e=this.getMaxDay(this.monthDigits,this.yearDigits);this.dayDigits=t(Math.max(1,Math.min(Number(this.dayDigits),e))),this.activeSection=`month`,this.sectionSelected=!0}}else if(this.activeSection===`month`)this.monthDigits+=e,this.monthDigits=this.monthDigits.slice(-2),this.monthDigits.length===1&&Number(this.monthDigits)>=2&&(this.monthDigits=t(this.monthDigits)),this.monthDigits.length===2&&(this.monthDigits=t(Math.max(1,Math.min(Number(this.monthDigits),12))),this.activeSection=`year`,this.sectionSelected=!0);else if(this.activeSection===`year`&&(this.yearDigits+=e,this.yearDigits=this.yearDigits.slice(-4),this.yearDigits.length===4)){let e=this.getMaxDay(this.monthDigits,this.yearDigits);Number(this.dayDigits)>e&&(this.dayDigits=t(e))}},_updateDateDisplay(){let e=this.dayDigits.length===0?`dd`:this.dayDigits.padStart(2,`0`),t=this.monthDigits.length===0?`mm`:this.monthDigits.padStart(2,`0`),n=this.yearDigits.padEnd(4,`a`);this.localDate=`${e}/${t}/${n}`},getMaxDay(e,t){return e=Number(e),t=Number(t)||new Date().getFullYear(),e?new Date(t,e,0).getDate():31},parseLocalDate(e){if(!e)return null;let[t,n]=e.split(`T`);if(!t)return null;let[r,i,a]=t.split(`-`).map(Number);if(!n)return new Date(r,i-1,a,12,0,0);let[o=0,s=0]=n.split(`.`)[0].split(`:`).map(Number);return new Date(r,i-1,a,o,s,0)}},mounted(){document.addEventListener(`mousedown`,this.handleClickOutside)},beforeUnmount(){document.removeEventListener(`mousedown`,this.handleClickOutside),window.removeEventListener(`scroll`,this.calculateDropdownPosition,!0),window.removeEventListener(`resize`,this.calculateDropdownPosition)}},$=(e,t)=>{let n=e.__vccOpts||e;for(let[e,r]of t)n[e]=r;return n},eo={name:`CalendarPicker`,props:{view:{type:String,required:!0},year:{type:Number,required:!0},month:{type:Number,required:!0},yearRangeStart:{type:Number,required:!0},selectedDate:{type:Date,default:null},minDate:{type:Date,default:null},maxDate:{type:Date,default:null},disabledDates:{type:[Array,Object],default:()=>[]},isPrevDisabled:{type:Boolean,default:!1},isNextDisabled:{type:Boolean,default:!1},widthClass:{type:String,default:`w-56`}},emits:[`update:view`,`prev`,`next`,`select-day`,`select-month`,`select-year`],computed:{MONTH_NAMES(){return Qa},weekDays(){return[`L`,`M`,`X`,`J`,`V`,`S`,`D`]},yearRange(){return Array.from({length:12},(e,t)=>this.yearRangeStart+t)},yearRangeLabel(){return`${this.yearRangeStart} – ${this.yearRangeStart+11}`},calendarCells(){let e=(new Date(this.year,this.month,1).getDay()+6)%7,t=new Date(this.year,this.month+1,0).getDate(),n=[];for(let t=0;t<e;t++)n.push(null);for(let e=1;e<=t;e++)n.push({day:e,month:this.month,year:this.year});return n}},methods:{isDaySelected(e){return this.selectedDate?e.day===this.selectedDate.getDate()&&e.month===this.selectedDate.getMonth()&&e.year===this.selectedDate.getFullYear():!1},isDayToday(e){let t=new Date;return e.day===t.getDate()&&e.month===t.getMonth()&&e.year===t.getFullYear()},isDayDisabled(e){let t=new Date(e.year,e.month,e.day);return this.minDate&&t<this.minDate||this.maxDate&&t>this.maxDate?!0:Array.isArray(this.disabledDates)?this.disabledDates.some(e=>{let n=new Date(e);return n.getFullYear()===t.getFullYear()&&n.getMonth()===t.getMonth()&&n.getDate()===t.getDate()}):!1}}},to={class:`flex items-center justify-between mb-1 px-1`},no=[`disabled`],ro={class:`flex items-center gap-1 select-none`},io={key:2,class:`text-sm font-bold text-gray-800 leading-none`},ao=[`disabled`],oo={class:`grid grid-cols-7 mb-0.5`},so={class:`grid grid-cols-7`},co=[`onClick`,`disabled`],lo={key:1,class:`w-7 h-7`},uo={key:1,class:`grid grid-cols-3 gap-2`},fo=[`onClick`],po={key:2,class:`grid grid-cols-3 gap-2`},mo=[`onClick`];function ho(e,n,r,i,a,o){let s=(0,t.resolveComponent)(`font-awesome-icon`);return(0,t.openBlock)(),(0,t.createElementBlock)(`div`,{class:(0,t.normalizeClass)([`bg-white border border-gray-200 rounded-md shadow-lg p-1.5`,r.widthClass])},[(0,t.createElementVNode)(`div`,to,[(0,t.createElementVNode)(`button`,{type:`button`,onClick:n[0]||=t=>e.$emit(`prev`),disabled:r.isPrevDisabled,class:(0,t.normalizeClass)([`flex items-center justify-center w-6 h-6 rounded-full transition-colors`,r.isPrevDisabled?`opacity-30 cursor-not-allowed`:`hover:bg-gray-100 cursor-pointer`])},[(0,t.createVNode)(s,{icon:`fa-solid fa-chevron-left`,class:`w-2.5 h-2.5 text-gray-500`})],10,no),(0,t.createElementVNode)(`div`,ro,[r.view===`days`?((0,t.openBlock)(),(0,t.createElementBlock)(t.Fragment,{key:0},[(0,t.createElementVNode)(`button`,{type:`button`,onClick:n[1]||=t=>e.$emit(`update:view`,`months`),class:`text-sm font-bold text-gray-800 capitalize hover:text-indigo-500 transition-colors cursor-pointer leading-none`},(0,t.toDisplayString)(o.MONTH_NAMES[r.month]),1),(0,t.createElementVNode)(`button`,{type:`button`,onClick:n[2]||=t=>e.$emit(`update:view`,`years`),class:`text-sm font-bold text-gray-800 hover:text-indigo-500 transition-colors cursor-pointer leading-none`},(0,t.toDisplayString)(r.year),1)],64)):r.view===`months`?((0,t.openBlock)(),(0,t.createElementBlock)(`button`,{key:1,type:`button`,onClick:n[3]||=t=>e.$emit(`update:view`,`years`),class:`text-sm font-bold text-gray-800 hover:text-indigo-500 transition-colors cursor-pointer leading-none`},(0,t.toDisplayString)(r.year),1)):((0,t.openBlock)(),(0,t.createElementBlock)(`span`,io,(0,t.toDisplayString)(o.yearRangeLabel),1))]),(0,t.createElementVNode)(`button`,{type:`button`,onClick:n[4]||=t=>e.$emit(`next`),disabled:r.isNextDisabled,class:(0,t.normalizeClass)([`flex items-center justify-center w-6 h-6 rounded-full transition-colors`,r.isNextDisabled?`opacity-30 cursor-not-allowed`:`hover:bg-gray-100 cursor-pointer`])},[(0,t.createVNode)(s,{icon:`fa-solid fa-chevron-right`,class:`w-2.5 h-2.5 text-gray-500`})],10,ao)]),r.view===`days`?((0,t.openBlock)(),(0,t.createElementBlock)(t.Fragment,{key:0},[(0,t.createElementVNode)(`div`,oo,[((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(o.weekDays,e=>((0,t.openBlock)(),(0,t.createElementBlock)(`div`,{key:e,class:`flex items-center justify-center text-xs font-semibold text-gray-500 h-6`},(0,t.toDisplayString)(e),1))),128))]),(0,t.createElementVNode)(`div`,so,[((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(o.calendarCells,(n,r)=>((0,t.openBlock)(),(0,t.createElementBlock)(`div`,{key:r,class:`flex items-center justify-center`},[n?((0,t.openBlock)(),(0,t.createElementBlock)(`button`,{key:0,type:`button`,onClick:t=>e.$emit(`select-day`,n),disabled:o.isDayDisabled(n),class:(0,t.normalizeClass)([`w-7 h-7 flex items-center justify-center text-xs font-medium rounded-full transition-colors duration-150 select-none p-0 leading-none`,o.isDaySelected(n)?`bg-indigo-500 text-white`:o.isDayToday(n)?`border border-indigo-500 text-indigo-500 hover:bg-indigo-50`:o.isDayDisabled(n)?`text-gray-300 cursor-not-allowed`:`text-gray-600 hover:bg-indigo-100 cursor-pointer`])},(0,t.toDisplayString)(n.day),11,co)):((0,t.openBlock)(),(0,t.createElementBlock)(`span`,lo))]))),128))])],64)):r.view===`months`?((0,t.openBlock)(),(0,t.createElementBlock)(`div`,uo,[((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(o.MONTH_NAMES,(n,i)=>((0,t.openBlock)(),(0,t.createElementBlock)(`button`,{key:i,type:`button`,onClick:t=>e.$emit(`select-month`,i),class:(0,t.normalizeClass)([`flex items-center justify-center h-8 text-xs font-medium rounded-lg capitalize transition-colors cursor-pointer border border-gray-300`,i===r.month?`bg-indigo-500 text-white`:`text-gray-600 hover:bg-indigo-100`])},(0,t.toDisplayString)(n),11,fo))),128))])):r.view===`years`?((0,t.openBlock)(),(0,t.createElementBlock)(`div`,po,[((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(o.yearRange,n=>((0,t.openBlock)(),(0,t.createElementBlock)(`button`,{key:n,type:`button`,onClick:t=>e.$emit(`select-year`,n),class:(0,t.normalizeClass)([`flex items-center justify-center h-8 text-xs font-medium rounded-lg transition-colors cursor-pointer border border-gray-300`,n===r.year?`bg-indigo-500 text-white`:`text-gray-600 hover:bg-indigo-100`])},(0,t.toDisplayString)(n),11,mo))),128))])):(0,t.createCommentVNode)(``,!0),(0,t.renderSlot)(e.$slots,`footer`)],2)}var go=$(eo,[[`render`,ho]]),_o={name:`InputDateStyle`,mixins:[$a],components:{CalendarPicker:go},computed:{inputClass(){return[this.mclass,Q.INPUT_BASE,Q.inputValidateClass(this.validate),`pr-10`]}},watch:{modelValue:{immediate:!0,handler(e){this.syncDateFromValue(e)&&(this.localDate=`${this.dayDigits}/${this.monthDigits}/${this.yearDigits}`)}}}},vo={class:`w-full`,ref:`dateTimeContainer`},yo=[`for`],bo={class:`relative`,ref:`inputWrap`},xo=[`id`],So={class:`flex justify-center p-1`};function Co(e,n,r,i,a,o){let s=(0,t.resolveComponent)(`font-awesome-icon`),c=(0,t.resolveComponent)(`CalendarPicker`);return(0,t.openBlock)(),(0,t.createElementBlock)(`div`,vo,[(0,t.createElementVNode)(`label`,{class:(0,t.normalizeClass)(e.labelClass),for:e.uuid},[(0,t.createTextVNode)((0,t.toDisplayString)(e.label)+` `,1),e.required?((0,t.openBlock)(),(0,t.createElementBlock)(`span`,{key:0,class:(0,t.normalizeClass)(e.requiredClass)},`*`,2)):(0,t.createCommentVNode)(``,!0)],10,yo),(0,t.createElementVNode)(`div`,bo,[(0,t.withDirectives)((0,t.createElementVNode)(`input`,(0,t.mergeProps)({id:e.uuid,type:`text`,inputmode:`numeric`,maxlength:`10`,"onUpdate:modelValue":n[0]||=t=>e.localDate=t},{disabled:e.disabled,required:e.required,readonly:e.readonly},{onFocus:n[1]||=(...t)=>e.initMask&&e.initMask(...t),onMouseup:n[2]||=(...t)=>e.handleSectionSelect&&e.handleSectionSelect(...t),onPaste:n[3]||=(0,t.withModifiers)(()=>{},[`prevent`]),onKeydown:n[4]||=(...t)=>e.handleDateKeydown&&e.handleDateKeydown(...t),onKeyup:n[5]||=(...t)=>e.handleCursorMove&&e.handleCursorMove(...t),onBlur:n[6]||=(...t)=>e.emitValue&&e.emitValue(...t),class:o.inputClass}),null,16,xo),[[t.vModelText,e.localDate]]),(0,t.createElementVNode)(`span`,{onClick:n[7]||=(...t)=>e.togglePicker&&e.togglePicker(...t),class:(0,t.normalizeClass)([`absolute right-3 top-1/2 -translate-y-1/2`,e.disabled?`cursor-not-allowed`:`cursor-pointer`])},[(0,t.createVNode)(s,{icon:`fa-solid fa-calendar`,class:(0,t.normalizeClass)(e.iconStaticClass)},null,8,[`class`])],2),((0,t.openBlock)(),(0,t.createBlock)(t.Teleport,{to:`body`},[e.showPicker?((0,t.openBlock)(),(0,t.createElementBlock)(`div`,{key:0,ref:`pickerRef`,style:(0,t.normalizeStyle)(e.dropdownStyle),onClick:n[10]||=(0,t.withModifiers)(()=>{},[`stop`])},[(0,t.createVNode)(c,{view:e.calendarView,"onUpdate:view":n[9]||=t=>e.calendarView=t,year:e.calendarYear,month:e.calendarMonth,"year-range-start":e.yearRangeStart,"selected-date":e.selectedDate,"min-date":e.minDateObj,"max-date":e.maxDateObj,"disabled-dates":e.disabledDates,"is-prev-disabled":e.isPrevDisabled,"is-next-disabled":e.isNextDisabled,"width-class":`w-56`,onPrev:e.prevPeriod,onNext:e.nextPeriod,onSelectDay:e.selectDay,onSelectMonth:e.selectMonth,onSelectYear:e.selectYear},{footer:(0,t.withCtx)(()=>[(0,t.createElementVNode)(`div`,So,[(0,t.createElementVNode)(`button`,{type:`button`,onClick:n[8]||=(...t)=>e.goToToday&&e.goToToday(...t),class:`w-full text-xs text-gray-600 font-semibold py-0.5 rounded-md bg-white hover:bg-indigo-50 border border-gray-300 cursor-pointer focus:outline-none focus:ring-2 focus:ring-indigo-200 disabled:bg-gray-100 disabled:text-gray-600 disabled:cursor-not-allowed`},` Hoy `)])]),_:1},8,[`view`,`year`,`month`,`year-range-start`,`selected-date`,`min-date`,`max-date`,`disabled-dates`,`is-prev-disabled`,`is-next-disabled`,`onPrev`,`onNext`,`onSelectDay`,`onSelectMonth`,`onSelectYear`])],4)):(0,t.createCommentVNode)(``,!0)]))],512),e.description?((0,t.openBlock)(),(0,t.createElementBlock)(`span`,{key:0,class:(0,t.normalizeClass)(e.descriptionClass)},(0,t.toDisplayString)(e.description),3)):(0,t.createCommentVNode)(``,!0)],512)}var wo=$(_o,[[`render`,Co],[`__scopeId`,`data-v-756569d8`]]),To={name:`InputTimeStyle`,props:{modelValue:String,label:{type:String,default:``},description:{type:String,default:``},min:{type:String,default:null},max:{type:String,default:null},disabled:{type:Boolean,default:!1},required:{type:Boolean,default:!1},validate:{type:Boolean,default:null},is24h:{type:Boolean,default:!1},mclass:{type:String,default:null},nested:{type:Boolean,default:!1}},data(){return{uuid:Z.getUUID(),localTime:``,showPicker:!1,dropdownPosition:`bottom`,dropdownHorizontal:`left`,dropdownStyle:{},_hourJumping:!1,_minuteJumping:!1,selectedHour:null,selectedMinute:null,selectedPeriod:`AM`}},computed:{labelClass(){return Q.inputLabelClass(this.disabled)},inputClass(){return[this.mclass,Q.INPUT_BASE,`pr-10`,Q.inputValidateClass(this.validate)]},descriptionClass(){return Q.inputDescriptionClass(this.validate)},requiredClass(){return Q.REQUIRED_ASTERISK},iconStaticClass(){return[Q.ICON_SIZE_STATIC,Q.iconInteractiveClass(this.disabled)]},hoursList(){let e=this.is24h?24:12;return Array.from({length:e},(e,t)=>this.is24h?String(t).padStart(2,`0`):String(t+1).padStart(2,`0`))},hours3x(){return[...this.hoursList,...this.hoursList,...this.hoursList]},minutesList(){return Array.from({length:60},(e,t)=>String(t).padStart(2,`0`))},minutes3x(){return[...this.minutesList,...this.minutesList,...this.minutesList]},pickerWrapperClass(){let e=Q.TIME_PICKER_WRAPPER.replace(`top-full`,``).replace(`left-0`,``);return this.nested?[e,this.dropdownPosition===`top`?`bottom-full`:`top-full`,this.dropdownHorizontal===`right`?`right-0`:`left-0`]:[e.replace(`absolute`,``).replace(`z-20`,``)]},pickerContainerClass(){return Q.TIME_PICKER_CONTAINER},pickerColumnClass(){return Q.TIME_PICKER_COLUMN},pickerAmpmColumnClass(){return Q.TIME_PICKER_AMPM_COLUMN},pickerColumnLabelClass(){return Q.TIME_PICKER_COLUMN_LABEL},pickerItemClass(){return Q.TIME_PICKER_ITEM}},watch:{modelValue:{immediate:!0,handler(e){if(this.localTime=e||``,!e)return;let[t,n]=e.split(`:`),r=parseInt(t);this.is24h?this.selectedHour=t:(this.selectedPeriod=r>=12?`PM`:`AM`,r%=12,r===0&&(r=12),this.selectedHour=String(r).padStart(2,`0`)),this.selectedMinute=n}},showPicker(e){this.nested||(e?(this.$nextTick(()=>this.positionDropdown()),window.addEventListener(`scroll`,this.positionDropdown,!0),window.addEventListener(`resize`,this.positionDropdown)):(window.removeEventListener(`scroll`,this.positionDropdown,!0),window.removeEventListener(`resize`,this.positionDropdown)))}},methods:{itemActiveClass(e){return Q.timePickerItemClass(e)},selectHour(e){this.selectedHour=e,this.updateFromPicker()},selectMinute(e){this.selectedMinute=e,this.updateFromPicker()},selectPeriod(e){this.selectedPeriod=e,this.updateFromPicker()},scrollToSelected(){this.$nextTick(()=>{requestAnimationFrame(()=>{let e=this.is24h?`00`:`12`;this._scrollColToValue(this.$refs.hourCol,this.hoursList,this.selectedHour||e),this._scrollColToValue(this.$refs.minuteCol,this.minutesList,this.selectedMinute||`00`)})})},_scrollColToValue(e,t,n){if(!e||!n)return;let r=t.indexOf(n);if(r<0)return;let i=e.scrollHeight/3,a=i/t.length;e.scrollTop=i+r*a-e.clientHeight/2+a/2},onHourScroll(e){if(this._hourJumping)return;let t=e.target,n=t.scrollHeight/3;t.scrollTop<n*.3?(this._hourJumping=!0,t.scrollTop+=n,this.$nextTick(()=>{this._hourJumping=!1})):t.scrollTop>n*1.7&&(this._hourJumping=!0,t.scrollTop-=n,this.$nextTick(()=>{this._hourJumping=!1}))},onMinuteScroll(e){if(this._minuteJumping)return;let t=e.target,n=t.scrollHeight/3;t.scrollTop<n*.3?(this._minuteJumping=!0,t.scrollTop+=n,this.$nextTick(()=>{this._minuteJumping=!1})):t.scrollTop>n*1.7&&(this._minuteJumping=!0,t.scrollTop-=n,this.$nextTick(()=>{this._minuteJumping=!1}))},calculateDropdownPosition(){let e=this.$refs.timeContainer;if(!e)return;let t=e.getBoundingClientRect(),n=window.innerHeight-t.bottom,r=t.top;this.dropdownPosition=n<220&&r>n?`top`:`bottom`;let i=window.innerWidth-t.left;this.dropdownHorizontal=i<240&&t.right>=240?`right`:`left`},positionDropdown(){if(this.nested)return;let e=this.$refs.inputWrap;if(!e)return;let t=e.getBoundingClientRect(),n=window.innerHeight-t.bottom,r=t.top,i=n<220&&r>n,a=t.left;a+224>window.innerWidth-8&&(a=Math.max(8,t.right-224));let o={position:`fixed`,left:`${a}px`,width:`224px`,zIndex:9999};i?o.bottom=`${window.innerHeight-t.top}px`:o.top=`${t.bottom}px`,this.dropdownStyle=o},togglePicker(){this.disabled||(this.nested?this.calculateDropdownPosition():this.positionDropdown(),this.showPicker=!this.showPicker,this.showPicker&&this.scrollToSelected())},handleClickOutside(e){let t=this.$refs.timeContainer&&this.$refs.timeContainer.contains(e.target),n=this.$refs.pickerRef&&this.$refs.pickerRef.contains(e.target);!t&&!n&&(this.showPicker=!1)},updateFromPicker(){if(!this.selectedHour||this.selectedMinute===null)return;let e=parseInt(this.selectedHour);this.is24h||(this.selectedPeriod===`PM`&&e<12&&(e+=12),this.selectedPeriod===`AM`&&e===12&&(e=0));let t=String(e).padStart(2,`0`)+`:`+this.selectedMinute;this.localTime=t,this.updateValue(t)},updateValue(e,t=!1){this.$emit(`update:modelValue`,e),this.$emit(`change`,e),t&&this.$emit(`blur`,e)}},mounted(){document.addEventListener(`mousedown`,this.handleClickOutside)},beforeUnmount(){document.removeEventListener(`mousedown`,this.handleClickOutside),window.removeEventListener(`scroll`,this.positionDropdown,!0),window.removeEventListener(`resize`,this.positionDropdown)}},Eo={class:`w-full`,ref:`timeContainer`},Do=[`for`],Oo={class:`relative`,ref:`inputWrap`},ko=[`id`,`disabled`,`required`],Ao={class:`flex gap-2`},jo={class:`flex-1`},Mo=[`onClick`],No={class:`flex-1`},Po=[`onClick`],Fo={key:0,class:`flex-1`},Io=[`onClick`];function Lo(e,n,r,i,a,o){let s=(0,t.resolveComponent)(`font-awesome-icon`);return(0,t.openBlock)(),(0,t.createElementBlock)(`div`,Eo,[(0,t.createElementVNode)(`label`,{class:(0,t.normalizeClass)(o.labelClass),for:a.uuid},[(0,t.createTextVNode)((0,t.toDisplayString)(r.label)+` `,1),r.required?((0,t.openBlock)(),(0,t.createElementBlock)(`span`,{key:0,class:(0,t.normalizeClass)(o.requiredClass)},`*`,2)):(0,t.createCommentVNode)(``,!0)],10,Do),(0,t.createElementVNode)(`div`,Oo,[(0,t.withDirectives)((0,t.createElementVNode)(`input`,{id:a.uuid,type:`time`,"onUpdate:modelValue":n[0]||=e=>a.localTime=e,disabled:r.disabled,required:r.required,onBlur:n[1]||=e=>o.updateValue(a.localTime,!0),class:(0,t.normalizeClass)(o.inputClass)},null,42,ko),[[t.vModelText,a.localTime]]),(0,t.createElementVNode)(`span`,{onClick:n[2]||=(...e)=>o.togglePicker&&o.togglePicker(...e),class:(0,t.normalizeClass)([`absolute right-3 top-1/2 -translate-y-1/2`,r.disabled?`cursor-not-allowed`:`cursor-pointer`])},[(0,t.createVNode)(s,{icon:`fa-solid fa-clock`,class:(0,t.normalizeClass)(o.iconStaticClass)},null,8,[`class`])],2),((0,t.openBlock)(),(0,t.createBlock)(t.Teleport,{to:`body`,disabled:r.nested},[a.showPicker?((0,t.openBlock)(),(0,t.createElementBlock)(`div`,{key:0,ref:`pickerRef`,class:(0,t.normalizeClass)(o.pickerWrapperClass),style:(0,t.normalizeStyle)(r.nested?null:a.dropdownStyle)},[(0,t.createElementVNode)(`div`,{class:(0,t.normalizeClass)(o.pickerContainerClass)},[(0,t.createElementVNode)(`div`,Ao,[(0,t.createElementVNode)(`div`,jo,[(0,t.createElementVNode)(`label`,{class:(0,t.normalizeClass)(o.pickerColumnLabelClass)},` Hora `,2),(0,t.createElementVNode)(`div`,{class:(0,t.normalizeClass)(o.pickerColumnClass),ref:`hourCol`,onScrollPassive:n[3]||=(...e)=>o.onHourScroll&&o.onHourScroll(...e)},[((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(o.hours3x,(e,n)=>((0,t.openBlock)(),(0,t.createElementBlock)(`div`,{key:`h`+n,onClick:t=>o.selectHour(e),class:(0,t.normalizeClass)([o.pickerItemClass,o.itemActiveClass(a.selectedHour===e)])},(0,t.toDisplayString)(e),11,Mo))),128))],34)]),(0,t.createElementVNode)(`div`,No,[(0,t.createElementVNode)(`label`,{class:(0,t.normalizeClass)(o.pickerColumnLabelClass)},`Minuto`,2),(0,t.createElementVNode)(`div`,{class:(0,t.normalizeClass)(o.pickerColumnClass),ref:`minuteCol`,onScrollPassive:n[4]||=(...e)=>o.onMinuteScroll&&o.onMinuteScroll(...e)},[((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(o.minutes3x,(e,n)=>((0,t.openBlock)(),(0,t.createElementBlock)(`div`,{key:`m`+n,onClick:t=>o.selectMinute(e),class:(0,t.normalizeClass)([o.pickerItemClass,o.itemActiveClass(a.selectedMinute===e)])},(0,t.toDisplayString)(e),11,Po))),128))],34)]),r.is24h?(0,t.createCommentVNode)(``,!0):((0,t.openBlock)(),(0,t.createElementBlock)(`div`,Fo,[(0,t.createElementVNode)(`label`,{class:(0,t.normalizeClass)(o.pickerColumnLabelClass)},` AM/PM `,2),(0,t.createElementVNode)(`div`,{class:(0,t.normalizeClass)(o.pickerAmpmColumnClass)},[((0,t.openBlock)(),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)([`AM`,`PM`],e=>(0,t.createElementVNode)(`div`,{key:e,onClick:t=>o.selectPeriod(e),class:(0,t.normalizeClass)([o.pickerItemClass,o.itemActiveClass(a.selectedPeriod===e)])},(0,t.toDisplayString)(e),11,Io)),64))],2)]))])],2)],6)):(0,t.createCommentVNode)(``,!0)],8,[`disabled`]))],512),r.description?((0,t.openBlock)(),(0,t.createElementBlock)(`span`,{key:0,class:(0,t.normalizeClass)(o.descriptionClass)},(0,t.toDisplayString)(r.description),3)):(0,t.createCommentVNode)(``,!0)],512)}var Ro=$(To,[[`render`,Lo],[`__scopeId`,`data-v-f9c04d0f`]]),zo={day:[0,2],month:[3,5],year:[6,10],hour:[11,13],minute:[14,16]},Bo={day:[0,2],month:[3,5],year:[6,10],hour:[11,13],minute:[14,16],ampm:[17,21]},Vo={name:`InputDateTimeStyle`,mixins:[$a],components:{InputTimeStyle:Ro,CalendarPicker:go},props:{is24h:{type:Boolean,default:!1}},data(){return{hourDigits:``,minuteDigits:``,ampm:`a.m.`,selectedHour:`00`,selectedMinute:`00`,localTime:`00:00`}},computed:{inputClass(){return[this.mclass,Q.INPUT_BASE,Q.inputValidateClass(this.validate),`pr-10`]},inputMaxlength(){return this.is24h?16:21},sectionRanges(){return this.is24h?zo:Bo},sectionOrder(){return this.is24h?[`day`,`month`,`year`,`hour`,`minute`]:[`day`,`month`,`year`,`hour`,`minute`,`ampm`]}},watch:{modelValue:{immediate:!0,handler(e){let t=this.syncDateFromValue(e);if(!t){this.hourDigits=``,this.minuteDigits=``,this.selectedHour=`00`,this.selectedMinute=`00`,this.ampm=`a.m.`,this.localDate=this._emptyPlaceholder();return}this.selectedHour=String(t.getHours()).padStart(2,`0`),this.selectedMinute=String(t.getMinutes()).padStart(2,`0`),this.syncTimeDisplay(t.getHours(),t.getMinutes())}}},methods:{syncTimeDisplay(e,t){let n=e=>String(e).padStart(2,`0`);this.is24h?(this.hourDigits=n(e),this.minuteDigits=n(t)):(this.ampm=e>=12?`p.m.`:`a.m.`,this.hourDigits=n(e%12||12),this.minuteDigits=n(t)),this.localTime=`${n(e)}:${n(t)}`,this._updateDateDisplay()},onTimeChange(e){if(!e)return;let[t,n]=e.split(`:`).map(Number),r=e=>String(e).padStart(2,`0`);this.selectedHour=r(t),this.selectedMinute=r(n),this.syncTimeDisplay(t,n),this._emitDateTime()},hourDigitsTo24h(){if(this.is24h)return parseInt(this.hourDigits)||0;let e=parseInt(this.hourDigits)||12;return this.ampm===`p.m.`&&e!==12&&(e+=12),this.ampm===`a.m.`&&e===12&&(e=0),e},_emptyPlaceholder(){return this.is24h?`dd/mm/aaaa hh:mm`:`dd/mm/aaaa hh:mm a.m.`},goToNow(){let e=new Date;this.goToToday(),this.calendarYear=e.getFullYear(),this.calendarMonth=e.getMonth(),this.selectedDate=e;let t=e=>String(e).padStart(2,`0`);this.dayDigits=t(e.getDate()),this.monthDigits=t(e.getMonth()+1),this.yearDigits=String(e.getFullYear()),this.selectedHour=t(e.getHours()),this.selectedMinute=t(e.getMinutes()),this.syncTimeDisplay(e.getHours(),e.getMinutes()),this._emitDateTime()},_emitDateTime(){if(!this.selectedDate&&!this.dayDigits)return;let e=e=>String(e).padStart(2,`0`),t=this.yearDigits||String(new Date().getFullYear()),n=this.monthDigits||`01`,r=this.dayDigits||`01`,i=e(this.hourDigitsTo24h()),a=this.selectedMinute||`00`;this.model=`${t}-${n}-${r}T${i}:${a}:00.000`},selectDay(e){if(this.isDayDisabled(e))return;let t=e=>String(e).padStart(2,`0`),n=t(e.day),r=t(e.month+1),i=e.year;this.selectedDate=new Date(i,e.month,e.day,parseInt(this.selectedHour),parseInt(this.selectedMinute)),this.dayDigits=n,this.monthDigits=r,this.yearDigits=String(i),this._updateDateDisplay(),this._emitDateTime()},togglePicker(){this.disabled||(this.showPicker=!this.showPicker,this.showPicker&&(this.calendarView=`days`,this.calculateDropdownPosition(),this.selectedDate&&(this.calendarYear=this.selectedDate.getFullYear(),this.calendarMonth=this.selectedDate.getMonth(),this.yearRangeStart=this.calendarYear-6)))},emitValue(){let[e]=this.localDate.split(` `),[t,n,r]=(e||``).split(`/`);if(/^\d{2}$/.test(t)&&/^\d{2}$/.test(n)&&/^\d{4}$/.test(r)){let e=this.getMaxDay(n,r);if(Number(n)>=1&&Number(n)<=12&&Number(t)>=1&&Number(t)<=e){let e=String(this.hourDigitsTo24h()).padStart(2,`0`),i=this.minuteDigits.length===2?this.minuteDigits:this.selectedMinute;this.model=`${r}-${n}-${t}T${e}:${i}:00.000`;return}}this.model=``},initMask(){let e=this._emptyPlaceholder();if(!this.localDate||this.localDate===e){this.localDate=e,this.dayDigits=``,this.monthDigits=``,this.yearDigits=``,this.hourDigits=``,this.minuteDigits=``,this.activeSection=`day`,this.$nextTick(()=>this.$el.querySelector(`input`).setSelectionRange(0,2));return}let t=this.localDate.split(` `),n=(t[0]||``).split(`/`);if(this.dayDigits=(n[0]||``).replace(/\D/g,``),this.monthDigits=(n[1]||``).replace(/\D/g,``),this.yearDigits=(n[2]||``).replace(/\D/g,``).slice(0,4),t[1]){let[e,n]=t[1].split(`:`);this.hourDigits=(e||``).replace(/\D/g,``),this.minuteDigits=(n||``).replace(/\D/g,``)}!this.is24h&&t[2]&&(this.ampm=t[2]===`p.m.`?`p.m.`:`a.m.`)},handleSectionSelect(e){let t=e.target.selectionStart,n=this.sectionRanges,r=`day`;r=t<=2?`day`:t<=5?`month`:t<=10?`year`:t<=13?`hour`:t<=16?`minute`:`ampm`,this.activeSection=r;let i=n[r];e.target.setSelectionRange(i[0],i[1]),this.sectionSelected=!0},handleCursorMove(e){if(this.sectionSelected)return;let t=e.target.selectionStart;t<=2?this.activeSection=`day`:t<=5?this.activeSection=`month`:t<=10?this.activeSection=`year`:t<=13?this.activeSection=`hour`:t<=16?this.activeSection=`minute`:this.activeSection=`ampm`},_updateDateDisplay(){let e=this.dayDigits.length===0?`dd`:this.dayDigits.padStart(2,`0`),t=this.monthDigits.length===0?`mm`:this.monthDigits.padStart(2,`0`),n=this.yearDigits.padEnd(4,`a`),r=this.hourDigits.length===0?`hh`:this.hourDigits.padStart(2,`0`),i=this.minuteDigits.length===0?`mm`:this.minuteDigits.padStart(2,`0`);this.localDate=this.is24h?`${e}/${t}/${n} ${r}:${i}`:`${e}/${t}/${n} ${r}:${i} ${this.ampm}`},handleDateKeydown(e){if(this.readonly){e.preventDefault();return}let t=!this.is24h;if(e.key===`Backspace`||e.key===`Delete`){e.preventDefault(),this.activeSection===`day`?this.dayDigits=``:this.activeSection===`month`?this.monthDigits=``:this.activeSection===`year`?this.yearDigits=``:this.activeSection===`hour`?(this.hourDigits=``,this.selectedHour=`00`):this.activeSection===`minute`&&(this.minuteDigits=``,this.selectedMinute=`00`),this.sectionSelected=!1,this._updateDateDisplay(),this.$nextTick(()=>{let e=this.sectionRanges[this.activeSection];this.$el.querySelector(`input`).setSelectionRange(e[0],e[1])});return}if(e.key===`ArrowRight`||e.key===`ArrowLeft`){e.preventDefault();let t=this.sectionOrder,n=t.indexOf(this.activeSection);this.activeSection=e.key===`ArrowRight`?t[Math.min(n+1,t.length-1)]:t[Math.max(n-1,0)],this.sectionSelected=!0,this.$nextTick(()=>{let e=this.sectionRanges[this.activeSection];this.$el.querySelector(`input`).setSelectionRange(e[0],e[1])});return}if(e.key===`ArrowUp`||e.key===`ArrowDown`){e.preventDefault();let n=e.key===`ArrowUp`?1:-1,r=e=>String(e).padStart(2,`0`);if([`day`,`month`,`year`].includes(this.activeSection))this._nudgeDateSection(n);else if(this.activeSection===`hour`){let e=t?12:23,i=+!!t,a=(parseInt(this.hourDigits)||i)+n;a<i&&(a=e),a>e&&(a=i),this.hourDigits=r(a),this.selectedHour=r(this.hourDigitsTo24h())}else if(this.activeSection===`minute`){let e=(parseInt(this.minuteDigits)||0)+n;e<0&&(e=59),e>59&&(e=0),this.minuteDigits=r(e),this.selectedMinute=this.minuteDigits}else this.activeSection===`ampm`&&(this.ampm=this.ampm===`a.m.`?`p.m.`:`a.m.`,this.selectedHour=r(this.hourDigitsTo24h()));this._updateDateDisplay(),this.$nextTick(()=>{let e=this.sectionRanges[this.activeSection];this.$el.querySelector(`input`).setSelectionRange(e[0],e[1])});return}if(this.activeSection===`ampm`&&t){if(e.preventDefault(),e.key===`a`||e.key===`A`)this.ampm=`a.m.`;else if(e.key===`p`||e.key===`P`)this.ampm=`p.m.`;else return;this.selectedHour=String(this.hourDigitsTo24h()).padStart(2,`0`),this._updateDateDisplay(),this.$nextTick(()=>this.$el.querySelector(`input`).setSelectionRange(17,21));return}if(e.key===`Tab`){let t=this.sectionOrder,n=t.indexOf(this.activeSection),r=e.shiftKey?n-1:n+1;if(r<0||r>=t.length)return;e.preventDefault(),this.activeSection=t[r],this.sectionSelected=!0,this.$nextTick(()=>{let e=this.sectionRanges[this.activeSection];this.$el.querySelector(`input`).setSelectionRange(e[0],e[1])});return}if(![`Home`,`End`].includes(e.key)){if(!/^[0-9]$/.test(e.key)){e.preventDefault();return}if(e.preventDefault(),this.sectionSelected&&=(this.activeSection===`day`?this.dayDigits=``:this.activeSection===`month`?this.monthDigits=``:this.activeSection===`year`?this.yearDigits=``:this.activeSection===`hour`?this.hourDigits=``:this.activeSection===`minute`&&(this.minuteDigits=``),!1),[`day`,`month`,`year`].includes(this.activeSection))this._typeDateSection(e.key),this.activeSection===`year`&&this.yearDigits.length===4&&(this.activeSection=`hour`);else if(this.activeSection===`hour`){let n=e=>String(e).padStart(2,`0`),r=t?2:3;if(this.hourDigits+=e.key,this.hourDigits=this.hourDigits.slice(-2),this.hourDigits.length===1&&Number(this.hourDigits)>=r&&(this.hourDigits=n(this.hourDigits)),this.hourDigits.length===2){let e=Number(this.hourDigits);this.hourDigits=n(t?Math.max(1,Math.min(e,12)):Math.min(e,23)),this.selectedHour=n(this.hourDigitsTo24h()),this.activeSection=`minute`,this.sectionSelected=!0}}else if(this.activeSection===`minute`){let n=e=>String(e).padStart(2,`0`);this.minuteDigits+=e.key,this.minuteDigits=this.minuteDigits.slice(-2),this.minuteDigits.length===1&&Number(this.minuteDigits)>=6&&(this.minuteDigits=n(this.minuteDigits)),this.minuteDigits.length===2&&(this.minuteDigits=n(Math.min(Number(this.minuteDigits),59)),this.selectedMinute=this.minuteDigits,t&&(this.activeSection=`ampm`),this.sectionSelected=!0)}this._updateDateDisplay(),this.$nextTick(()=>{let e=this.sectionRanges[this.activeSection];this.$el.querySelector(`input`).setSelectionRange(e[0],e[1])})}}}},Ho={class:`w-full`,ref:`dateTimeContainer`},Uo=[`for`],Wo={class:`relative`,ref:`inputWrap`},Go=[`id`,`maxlength`],Ko={class:`mt-1 pt-1 px-1`},qo={class:`flex justify-center p-1 pt-2`};function Jo(e,n,r,i,a,o){let s=(0,t.resolveComponent)(`font-awesome-icon`),c=(0,t.resolveComponent)(`InputTimeStyle`),l=(0,t.resolveComponent)(`CalendarPicker`);return(0,t.openBlock)(),(0,t.createElementBlock)(`div`,Ho,[(0,t.createElementVNode)(`label`,{class:(0,t.normalizeClass)(e.labelClass),for:e.uuid},[(0,t.createTextVNode)((0,t.toDisplayString)(e.label)+` `,1),e.required?((0,t.openBlock)(),(0,t.createElementBlock)(`span`,{key:0,class:(0,t.normalizeClass)(e.requiredClass)},`*`,2)):(0,t.createCommentVNode)(``,!0)],10,Uo),(0,t.createElementVNode)(`div`,Wo,[(0,t.withDirectives)((0,t.createElementVNode)(`input`,(0,t.mergeProps)({id:e.uuid,type:`text`,inputmode:`numeric`,maxlength:o.inputMaxlength,"onUpdate:modelValue":n[0]||=t=>e.localDate=t},{disabled:e.disabled,required:e.required,readonly:e.readonly},{onFocus:n[1]||=(...e)=>o.initMask&&o.initMask(...e),onMouseup:n[2]||=(...e)=>o.handleSectionSelect&&o.handleSectionSelect(...e),onPaste:n[3]||=(0,t.withModifiers)(()=>{},[`prevent`]),onKeydown:n[4]||=(...e)=>o.handleDateKeydown&&o.handleDateKeydown(...e),onKeyup:n[5]||=(...e)=>o.handleCursorMove&&o.handleCursorMove(...e),onBlur:n[6]||=(...e)=>o.emitValue&&o.emitValue(...e),class:o.inputClass}),null,16,Go),[[t.vModelText,e.localDate]]),(0,t.createElementVNode)(`span`,{onClick:n[7]||=(...e)=>o.togglePicker&&o.togglePicker(...e),class:(0,t.normalizeClass)([`absolute right-3 top-1/2 -translate-y-1/2`,e.disabled?`cursor-not-allowed`:`cursor-pointer`])},[(0,t.createVNode)(s,{icon:`fa-solid fa-calendar`,class:(0,t.normalizeClass)(e.iconStaticClass)},null,8,[`class`])],2),((0,t.openBlock)(),(0,t.createBlock)(t.Teleport,{to:`body`},[e.showPicker?((0,t.openBlock)(),(0,t.createElementBlock)(`div`,{key:0,ref:`pickerRef`,style:(0,t.normalizeStyle)(e.dropdownStyle),onClick:n[11]||=(0,t.withModifiers)(()=>{},[`stop`])},[(0,t.createVNode)(l,{view:e.calendarView,"onUpdate:view":n[10]||=t=>e.calendarView=t,year:e.calendarYear,month:e.calendarMonth,"year-range-start":e.yearRangeStart,"selected-date":e.selectedDate,"min-date":e.minDateObj,"max-date":e.maxDateObj,"disabled-dates":e.disabledDates,"is-prev-disabled":e.isPrevDisabled,"is-next-disabled":e.isNextDisabled,"width-class":`w-60`,onPrev:e.prevPeriod,onNext:e.nextPeriod,onSelectDay:o.selectDay,onSelectMonth:e.selectMonth,onSelectYear:e.selectYear},{footer:(0,t.withCtx)(()=>[(0,t.createElementVNode)(`div`,Ko,[(0,t.createVNode)(c,{modelValue:a.localTime,"onUpdate:modelValue":n[8]||=e=>a.localTime=e,is24h:r.is24h,disabled:e.disabled,nested:!0,onChange:o.onTimeChange},null,8,[`modelValue`,`is24h`,`disabled`,`onChange`])]),(0,t.createElementVNode)(`div`,qo,[(0,t.createElementVNode)(`button`,{type:`button`,onClick:n[9]||=(...e)=>o.goToNow&&o.goToNow(...e),class:`w-full text-xs text-gray-600 font-semibold py-0.5 rounded-md bg-white hover:bg-indigo-50 border border-gray-300 cursor-pointer focus:outline-none focus:ring-2 focus:ring-indigo-200 disabled:bg-gray-100 disabled:text-gray-600 disabled:cursor-not-allowed`},` Ahora `)])]),_:1},8,[`view`,`year`,`month`,`year-range-start`,`selected-date`,`min-date`,`max-date`,`disabled-dates`,`is-prev-disabled`,`is-next-disabled`,`onPrev`,`onNext`,`onSelectDay`,`onSelectMonth`,`onSelectYear`])],4)):(0,t.createCommentVNode)(``,!0)]))],512),e.description?((0,t.openBlock)(),(0,t.createElementBlock)(`span`,{key:0,class:(0,t.normalizeClass)(e.descriptionClass)},(0,t.toDisplayString)(e.description),3)):(0,t.createCommentVNode)(``,!0)],512)}var Yo=$(Vo,[[`render`,Jo],[`__scopeId`,`data-v-3968f4d1`]]),Xo={name:`InputNumberStyle`,props:{modelValue:{type:[String,Number],default:``},label:{type:String,default:``},description:{type:String,default:``},placeholder:{type:String,default:``},numeric:{type:String,default:null},min:{type:String,default:null},max:{type:String,default:null},required:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},validate:{type:Boolean,default:null},mclass:{type:String,default:null}},data(){return{uuid:Z.getUUID(),isFocused:!1,stepTimeout:null,stepInterval:null}},beforeUnmount(){this.stopStep()},computed:{effectiveDigits(){if(this.numeric){let[e]=this.numeric.split(`,`);return e?.trim()||`10`}return`10`},effectiveDecimals(){if(this.numeric){let[,e]=this.numeric.split(`,`);return e?.trim()??`2`}return`2`},allowNegative(){return this.min===null||Number(this.min)<0},digitMax(){let e=Number(this.effectiveDigits),t=Number(this.effectiveDecimals);return 10**e-10**-t},model:{get(){return this.modelValue},set(e){this.$emit(`update:modelValue`,e),this.$emit(`change`,e)}},displayValue(){if(this.isFocused)return this.modelValue?.toString()??``;if(this.modelValue===``||this.modelValue===null)return``;let e=Number(this.modelValue);return isNaN(e)?``:e.toLocaleString(`en-US`,{minimumFractionDigits:Number(this.effectiveDecimals),maximumFractionDigits:Number(this.effectiveDecimals)})},labelClass(){return Q.inputLabelClass(this.disabled)},inputClass(){return[this.mclass,Q.INPUT_BASE,Q.inputValidateClass(this.validate)]},descriptionClass(){return Q.inputDescriptionClass(this.validate)},requiredClass(){return Q.REQUIRED_ASTERISK},stepButtonClass(){return[Q.ICON_SIZE_STATIC,Q.iconInteractiveClass(this.disabled),this.disabled?`cursor-not-allowed`:`cursor-pointer`]}},methods:{onKeyDown(e){let t=[`Backspace`,`Delete`,`Tab`,`Escape`,`Enter`,`ArrowLeft`,`ArrowRight`,`ArrowUp`,`ArrowDown`,`Home`,`End`];if((e.ctrlKey||e.metaKey)&&[`a`,`c`,`v`,`x`,`z`].includes(e.key.toLowerCase()))return;if(e.key===`ArrowUp`||e.key===`ArrowDown`){e.preventDefault(),this.stepValue(e.key===`ArrowUp`?1:-1);return}if(t.includes(e.key))return;let n=e.target.value,r=e.target.selectionStart,i=e.target.selectionStart!==e.target.selectionEnd;if(e.key===`-`){if(!this.allowNegative){e.preventDefault();return}(r!==0||n.startsWith(`-`))&&e.preventDefault();return}let a=n.startsWith(`-`)?n.slice(1):n,[o=``,s=``]=a.split(`.`),c=a.includes(`.`);if(e.key>=`0`&&e.key<=`9`){let t=n.startsWith(`-`)?r-1:r;if(!c||t<=o.length){!i&&o.length>=Number(this.effectiveDigits)&&e.preventDefault();return}if(c&&t>o.length){!i&&s.length>=Number(this.effectiveDecimals)&&e.preventDefault();return}}if(e.key===`.`){(Number(this.effectiveDecimals)===0||c)&&e.preventDefault();return}e.preventDefault()},onInput(e){let t=e.target.value,n=this.allowNegative&&t.startsWith(`-`);if(n&&t===`-`){this.$emit(`update:modelValue`,`-`);return}let r=t.replace(/[^0-9.]/g,``),i=r.indexOf(`.`),a;a=i===-1?r:`${r.slice(0,i)}.${r.slice(i+1).replace(/\./g,``)}`,this.$emit(`update:modelValue`,n?`-${a}`:a)},onPaste(e){let t=e.clipboardData.getData(`text`),n=this.allowNegative&&t.trimStart().startsWith(`-`),[r,i=``]=t.replace(/[^0-9.]/g,``).split(`.`);if(r.length>Number(this.effectiveDigits)||i.length>Number(this.effectiveDecimals))return;let a=i?`${r}.${i}`:r;this.$emit(`update:modelValue`,n&&a!==``?`-${a}`:a)},onBlur(e){this.isFocused=!1;let t=Number(this.modelValue);(this.modelValue===``||this.modelValue===`.`||this.modelValue===`-`||isNaN(t))&&(t=0);let n=this.min===null?null:Number(this.min),r=this.max===null?null:Number(this.max);n!==null&&t<n&&(t=n),r!==null&&t>r&&(t=r),this.$emit(`update:modelValue`,t.toFixed(Number(this.effectiveDecimals))),this.$emit(`blur`,e)},stepValue(e){let t=Number(this.modelValue),n=(isNaN(t)?0:t)+e,r=this.min===null?null:Number(this.min),i=this.max===null?null:Number(this.max);n>this.digitMax&&(n=this.digitMax),this.allowNegative&&n<-this.digitMax&&(n=-this.digitMax),r!==null&&n<r&&(n=r),i!==null&&n>i&&(n=i);let a=10**Number(this.effectiveDecimals);n=Math.round(n*a)/a,this.$emit(`update:modelValue`,String(n)),this.$emit(`change`,String(n))},startStep(e){this.disabled||(this.stopStep(),this.stepValue(e),this.stepTimeout=setTimeout(()=>{this.stepInterval=setInterval(()=>this.stepValue(e),80)},400))},stopStep(){this.stepTimeout&&=(clearTimeout(this.stepTimeout),null),this.stepInterval&&=(clearInterval(this.stepInterval),null)},onFocus(){if(this.isFocused=!0,this.modelValue!==null&&this.modelValue!==``){let e=Number(this.modelValue);!isNaN(e)&&e===0&&this.$emit(`update:modelValue`,``)}}}},Zo={class:`w-full`},Qo=[`for`],$o={class:`relative`},es=[`id`,`value`,`placeholder`,`min`,`max`],ts={class:`absolute left-0 top-0 bottom-0 flex flex-col justify-center pl-2`},ns=[`disabled`],rs=[`disabled`];function is(e,n,r,i,a,o){let s=(0,t.resolveComponent)(`font-awesome-icon`);return(0,t.openBlock)(),(0,t.createElementBlock)(`div`,Zo,[(0,t.createElementVNode)(`label`,{class:(0,t.normalizeClass)(o.labelClass),for:a.uuid},[(0,t.createTextVNode)((0,t.toDisplayString)(r.label)+` `,1),r.required?((0,t.openBlock)(),(0,t.createElementBlock)(`span`,{key:0,class:(0,t.normalizeClass)(o.requiredClass)},`*`,2)):(0,t.createCommentVNode)(``,!0)],10,Qo),(0,t.createElementVNode)(`div`,$o,[(0,t.withDirectives)((0,t.createElementVNode)(`input`,(0,t.mergeProps)({id:a.uuid,type:`text`,value:o.displayValue,placeholder:r.placeholder,onFocus:n[0]||=(...e)=>o.onFocus&&o.onFocus(...e),onBlur:n[1]||=(...e)=>o.onBlur&&o.onBlur(...e),onKeydown:n[2]||=(...e)=>o.onKeyDown&&o.onKeyDown(...e),onInput:n[3]||=(...e)=>o.onInput&&o.onInput(...e),onPaste:n[4]||=(0,t.withModifiers)((...e)=>o.onPaste&&o.onPaste(...e),[`prevent`]),min:r.min?Number(r.min):null,max:r.max?Number(r.max):null},{disabled:r.disabled,required:r.required},{"onUpdate:modelValue":n[5]||=e=>o.model=e,class:[o.inputClass,`text-right`,`pl-9`],inputmode:`decimal`}),null,16,es),[[t.vModelText,o.model]]),(0,t.createElementVNode)(`div`,ts,[(0,t.createElementVNode)(`button`,{type:`button`,tabindex:`-1`,disabled:r.disabled,class:(0,t.normalizeClass)([o.stepButtonClass,`flex items-center justify-center leading-none -mb-1`]),title:`Aumentar`,onMousedown:n[6]||=(0,t.withModifiers)(e=>o.startStep(1),[`prevent`]),onMouseup:n[7]||=(...e)=>o.stopStep&&o.stopStep(...e),onMouseleave:n[8]||=(...e)=>o.stopStep&&o.stopStep(...e),onTouchstart:n[9]||=(0,t.withModifiers)(e=>o.startStep(1),[`prevent`]),onTouchend:n[10]||=(0,t.withModifiers)((...e)=>o.stopStep&&o.stopStep(...e),[`prevent`])},[(0,t.createVNode)(s,{icon:`fa-solid fa-caret-up`})],42,ns),(0,t.createElementVNode)(`button`,{type:`button`,tabindex:`-1`,disabled:r.disabled,class:(0,t.normalizeClass)([o.stepButtonClass,`flex items-center justify-center leading-none -mt-1`]),title:`Disminuir`,onMousedown:n[11]||=(0,t.withModifiers)(e=>o.startStep(-1),[`prevent`]),onMouseup:n[12]||=(...e)=>o.stopStep&&o.stopStep(...e),onMouseleave:n[13]||=(...e)=>o.stopStep&&o.stopStep(...e),onTouchstart:n[14]||=(0,t.withModifiers)(e=>o.startStep(-1),[`prevent`]),onTouchend:n[15]||=(0,t.withModifiers)((...e)=>o.stopStep&&o.stopStep(...e),[`prevent`])},[(0,t.createVNode)(s,{icon:`fa-solid fa-caret-down`})],42,rs)])]),r.description?((0,t.openBlock)(),(0,t.createElementBlock)(`span`,{key:0,class:(0,t.normalizeClass)(o.descriptionClass)},(0,t.toDisplayString)(r.description),3)):(0,t.createCommentVNode)(``,!0)])}var as=$(Xo,[[`render`,is]]),os={name:`InputPasswordStyle`,props:{modelValue:{type:[String,Number],default:``},label:{type:String,default:``},description:{type:String,default:``},placeholder:{type:String,default:``},maxlength:{type:String,default:null},disabled:{type:Boolean,default:!1},required:{type:Boolean,default:!1},validate:{type:Boolean,default:null},mclass:{type:String,default:null}},data(){return{uuid:Z.getUUID(),showPassword:!1}},computed:{model:{get(){return this.modelValue},set(e){this.$emit(`update:modelValue`,e),this.$emit(`change`,e)}},labelClass(){return Q.inputLabelClass(this.disabled)},inputClass(){return[this.mclass,Q.INPUT_BASE,Q.inputValidateClass(this.validate),`pr-10`]},descriptionClass(){return Q.inputDescriptionClass(this.validate)},requiredClass(){return Q.REQUIRED_ASTERISK},iconStaticClass(){return[Q.ICON_SIZE_STATIC,Q.iconInteractiveClass(this.disabled)]}},methods:{emitBlur(e){this.$emit(`blur`,e)},togglePassword(){this.disabled||(this.showPassword=!this.showPassword)}}},ss={class:`w-full`},cs=[`for`],ls={class:`relative`},us=[`id`,`type`,`maxlength`,`placeholder`];function ds(e,n,r,i,a,o){let s=(0,t.resolveComponent)(`font-awesome-icon`);return(0,t.openBlock)(),(0,t.createElementBlock)(`div`,ss,[(0,t.createElementVNode)(`label`,{class:(0,t.normalizeClass)(o.labelClass),for:a.uuid},[(0,t.createTextVNode)((0,t.toDisplayString)(r.label)+` `,1),r.required?((0,t.openBlock)(),(0,t.createElementBlock)(`span`,{key:0,class:(0,t.normalizeClass)(o.requiredClass)},`*`,2)):(0,t.createCommentVNode)(``,!0)],10,cs),(0,t.createElementVNode)(`div`,ls,[(0,t.withDirectives)((0,t.createElementVNode)(`input`,(0,t.mergeProps)({id:a.uuid,type:a.showPassword?`text`:`password`,maxlength:r.maxlength?Number(r.maxlength):null,placeholder:r.placeholder},{disabled:r.disabled,required:r.required},{onBlur:n[0]||=(...e)=>o.emitBlur&&o.emitBlur(...e),"onUpdate:modelValue":n[1]||=e=>o.model=e,class:o.inputClass}),null,16,us),[[t.vModelDynamic,o.model]]),(0,t.createElementVNode)(`span`,{onClick:n[2]||=(...e)=>o.togglePassword&&o.togglePassword(...e),class:(0,t.normalizeClass)([`absolute right-3 top-1/2 -translate-y-1/2`,r.disabled?`cursor-not-allowed`:`cursor-pointer`])},[a.showPassword?(0,t.createCommentVNode)(``,!0):((0,t.openBlock)(),(0,t.createBlock)(s,{key:0,icon:`fa-solid fa-eye`,class:(0,t.normalizeClass)(o.iconStaticClass),title:`Mostrar contraseña`},null,8,[`class`])),a.showPassword?((0,t.openBlock)(),(0,t.createBlock)(s,{key:1,icon:`fa-solid fa-eye-slash`,class:(0,t.normalizeClass)(o.iconStaticClass),title:`Ocultar contraseña`},null,8,[`class`])):(0,t.createCommentVNode)(``,!0)],2)]),r.description?((0,t.openBlock)(),(0,t.createElementBlock)(`span`,{key:0,class:(0,t.normalizeClass)(o.descriptionClass)},(0,t.toDisplayString)(r.description),3)):(0,t.createCommentVNode)(``,!0)])}var fs=$(os,[[`render`,ds]]),ps={name:`InputTextStyle`,props:{modelValue:{type:[String,Number],default:``},label:{type:String,default:``},description:{type:String,default:``},placeholder:{type:String,default:``},type:{type:String,default:`text`,validator(e){return[`text`,`email`,`search`,`tel`,`url`,`number`].includes(e)}},maxlength:{type:String,default:null},minlength:{type:String,default:null},min:{type:String,default:null},max:{type:String,default:null},disabled:{type:Boolean,default:!1},required:{type:Boolean,default:!1},validate:{type:Boolean,default:null},mclass:{type:String,default:null}},computed:{model:{get(){return this.modelValue},set(e){this.$emit(`update:modelValue`,e),this.$emit(`change`,e)}},labelClass(){return Q.inputLabelClass(this.disabled)},inputClass(){return[this.mclass,Q.INPUT_BASE,Q.inputValidateClass(this.validate)]},descriptionClass(){return Q.inputDescriptionClass(this.validate)},requiredClass(){return Q.REQUIRED_ASTERISK}},data(){return{uuid:Z.getUUID()}},methods:{emitBlur(e){if(this.type===`number`&&(this.min!==null||this.max!==null)){let e=Number(this.modelValue);if(!isNaN(e)&&this.modelValue!==``){let t=this.min===null?null:Number(this.min),n=this.max===null?null:Number(this.max);t!==null&&e<t&&(e=t),n!==null&&e>n&&(e=n),this.$emit(`update:modelValue`,e)}}this.$emit(`blur`,e)}}},ms={class:`w-full`},hs=[`for`],gs=[`id`,`type`,`placeholder`,`maxlength`,`minlength`];function _s(e,n,r,i,a,o){return(0,t.openBlock)(),(0,t.createElementBlock)(`div`,ms,[(0,t.createElementVNode)(`label`,{class:(0,t.normalizeClass)(o.labelClass),for:a.uuid},[(0,t.createTextVNode)((0,t.toDisplayString)(r.label)+` `,1),r.required?((0,t.openBlock)(),(0,t.createElementBlock)(`span`,{key:0,class:(0,t.normalizeClass)(o.requiredClass)},`*`,2)):(0,t.createCommentVNode)(``,!0)],10,hs),(0,t.withDirectives)((0,t.createElementVNode)(`input`,(0,t.mergeProps)({id:a.uuid,type:r.type,placeholder:r.placeholder,maxlength:r.maxlength?Number(r.maxlength):null,minlength:r.minlength?Number(r.minlength):null},{disabled:r.disabled,required:r.required},{onBlur:n[0]||=(...e)=>o.emitBlur&&o.emitBlur(...e),"onUpdate:modelValue":n[1]||=e=>o.model=e,class:o.inputClass}),null,16,gs),[[t.vModelDynamic,o.model]]),r.description?((0,t.openBlock)(),(0,t.createElementBlock)(`span`,{key:0,class:(0,t.normalizeClass)(o.descriptionClass)},(0,t.toDisplayString)(r.description),3)):(0,t.createCommentVNode)(``,!0)])}var vs=$(ps,[[`render`,_s]]),ys={name:`InputCheckStyle`,props:{modelValue:{type:Boolean,default:!1},label:{type:String,default:``},description:{type:String,default:``},disabled:{type:Boolean,default:!1},required:{type:Boolean,default:!1},validate:{type:Boolean,default:null},mclass:{type:String,default:null}},data(){return{uuid:Z.getUUID(),registry:Q}},computed:{model:{get(){return this.modelValue},set(e){this.$emit(`update:modelValue`,e),this.$emit(`change`,e)}},labelClass(){return Q.inputCheckLabelClass(this.disabled)},inputBoxClass(){return[this.mclass,Q.CHECK_BOX_BASE,Q.checkBoxClass(this.model,this.disabled)]},descriptionClass(){return Q.inputDescriptionClass(this.validate,!1)},requiredClass(){return Q.REQUIRED_ASTERISK}},methods:{emitBlur(e){this.$emit(`blur`,e)}}},bs={class:`inline-block`},xs={class:`flex items-center gap-2 cursor-pointer select-none`},Ss=[`id`];function Cs(e,n,r,i,a,o){let s=(0,t.resolveComponent)(`font-awesome-icon`);return(0,t.openBlock)(),(0,t.createElementBlock)(`div`,bs,[(0,t.createElementVNode)(`label`,xs,[(0,t.withDirectives)((0,t.createElementVNode)(`input`,(0,t.mergeProps)({id:a.uuid,type:`checkbox`},{disabled:r.disabled,required:r.required},{onBlur:n[0]||=(...e)=>o.emitBlur&&o.emitBlur(...e),"onUpdate:modelValue":n[1]||=e=>o.model=e,class:`peer hidden`}),null,16,Ss),[[t.vModelCheckbox,o.model]]),(0,t.createElementVNode)(`span`,{class:(0,t.normalizeClass)(o.inputBoxClass)},[o.model?((0,t.openBlock)(),(0,t.createBlock)(s,{key:0,icon:`fa-solid fa-check`,class:(0,t.normalizeClass)([a.registry.ICON_SIZE_STATIC,`text-white`])},null,8,[`class`])):(0,t.createCommentVNode)(``,!0)],2),r.label?((0,t.openBlock)(),(0,t.createElementBlock)(`span`,{key:0,class:(0,t.normalizeClass)(o.labelClass)},[(0,t.createTextVNode)((0,t.toDisplayString)(r.label)+` `,1),r.required?((0,t.openBlock)(),(0,t.createElementBlock)(`span`,{key:0,class:(0,t.normalizeClass)(o.requiredClass)},`*`,2)):(0,t.createCommentVNode)(``,!0)],2)):(0,t.createCommentVNode)(``,!0)]),r.description?((0,t.openBlock)(),(0,t.createElementBlock)(`span`,{key:0,class:(0,t.normalizeClass)(o.descriptionClass)},(0,t.toDisplayString)(r.description),3)):(0,t.createCommentVNode)(``,!0)])}var ws=$(ys,[[`render`,Cs]]),Ts={name:`InputRadioStyle`,props:{modelValue:{type:Boolean,default:!1},label:{type:String,default:``},description:{type:String,default:``},disabled:{type:Boolean,default:!1},required:{type:Boolean,default:!1},validate:{type:Boolean,default:null},mclass:{type:String,default:null}},computed:{model:{get(){return this.modelValue},set(e){this.$emit(`update:modelValue`,e),this.$emit(`change`,e)}},labelClass(){return Q.inputCheckLabelClass(this.disabled)},inputRadioClass(){return[this.mclass,Q.RADIO_BASE,Q.radioClass(this.model,this.disabled)]},descriptionClass(){return Q.inputDescriptionClass(this.validate,!1)},requiredClass(){return Q.REQUIRED_ASTERISK}},data(){return{uuid:Z.getUUID()}},methods:{emitBlur(e){this.$emit(`blur`,e)}}},Es={class:`inline-block`},Ds={class:`flex items-center gap-2 cursor-pointer select-none`},Os=[`id`];function ks(e,n,r,i,a,o){return(0,t.openBlock)(),(0,t.createElementBlock)(`div`,Es,[(0,t.createElementVNode)(`label`,Ds,[(0,t.withDirectives)((0,t.createElementVNode)(`input`,(0,t.mergeProps)({id:a.uuid,type:`checkbox`},{disabled:r.disabled,required:r.required},{onBlur:n[0]||=(...e)=>o.emitBlur&&o.emitBlur(...e),"onUpdate:modelValue":n[1]||=e=>o.model=e,class:`peer hidden`}),null,16,Os),[[t.vModelCheckbox,o.model]]),(0,t.createElementVNode)(`span`,{class:(0,t.normalizeClass)(o.inputRadioClass)},null,2),r.label?((0,t.openBlock)(),(0,t.createElementBlock)(`span`,{key:0,class:(0,t.normalizeClass)(o.labelClass)},[(0,t.createTextVNode)((0,t.toDisplayString)(r.label)+` `,1),r.required?((0,t.openBlock)(),(0,t.createElementBlock)(`span`,{key:0,class:(0,t.normalizeClass)(o.requiredClass)},`*`,2)):(0,t.createCommentVNode)(``,!0)],2)):(0,t.createCommentVNode)(``,!0)]),r.description?((0,t.openBlock)(),(0,t.createElementBlock)(`span`,{key:0,class:(0,t.normalizeClass)(o.descriptionClass)},(0,t.toDisplayString)(r.description),3)):(0,t.createCommentVNode)(``,!0)])}var As=$(Ts,[[`render`,ks]]),js={name:`InputSwitchStyle`,props:{modelValue:{type:Boolean,default:!1},label:{type:String,default:``},description:{type:String,default:``},disabled:{type:Boolean,default:!1},required:{type:Boolean,default:!1},validate:{type:Boolean,default:null},mclass:{type:String,default:null}},computed:{model:{get(){return this.modelValue},set(e){this.$emit(`update:modelValue`,e),this.$emit(`change`,e)}},labelClass(){return Q.inputCheckLabelClass(this.disabled)},inputRadioClass(){return[this.mclass,Q.SWITCH_BASE,Q.switchClass(this.model,this.disabled)]},inputRadioMinClass(){return[`absolute w-3 h-3 rounded-full transition-all duration-200 ease-in-out`,Q.switchDotClass(this.model,this.disabled)]},descriptionClass(){return Q.inputDescriptionClass(this.validate,!1)},requiredClass(){return Q.REQUIRED_ASTERISK}},data(){return{uuid:Z.getUUID()}},methods:{emitBlur(e){this.$emit(`blur`,e)}}},Ms={class:`inline-block`},Ns={class:`flex items-center gap-2 cursor-pointer select-none`},Ps=[`id`];function Fs(e,n,r,i,a,o){return(0,t.openBlock)(),(0,t.createElementBlock)(`div`,Ms,[(0,t.createElementVNode)(`label`,Ns,[(0,t.withDirectives)((0,t.createElementVNode)(`input`,(0,t.mergeProps)({id:a.uuid,type:`checkbox`},{disabled:r.disabled,required:r.required},{onBlur:n[0]||=(...e)=>o.emitBlur&&o.emitBlur(...e),"onUpdate:modelValue":n[1]||=e=>o.model=e,class:`peer hidden`}),null,16,Ps),[[t.vModelCheckbox,o.model]]),(0,t.createElementVNode)(`span`,{class:(0,t.normalizeClass)(o.inputRadioClass)},[(0,t.createElementVNode)(`span`,{class:(0,t.normalizeClass)(o.inputRadioMinClass)},null,2)],2),r.label?((0,t.openBlock)(),(0,t.createElementBlock)(`span`,{key:0,class:(0,t.normalizeClass)(o.labelClass)},[(0,t.createTextVNode)((0,t.toDisplayString)(r.label)+` `,1),r.required?((0,t.openBlock)(),(0,t.createElementBlock)(`span`,{key:0,class:(0,t.normalizeClass)(o.requiredClass)},`*`,2)):(0,t.createCommentVNode)(``,!0)],2)):(0,t.createCommentVNode)(``,!0)]),r.description?((0,t.openBlock)(),(0,t.createElementBlock)(`span`,{key:0,class:(0,t.normalizeClass)(o.descriptionClass)},(0,t.toDisplayString)(r.description),3)):(0,t.createCommentVNode)(``,!0)])}var Is=$(js,[[`render`,Fs]]),Ls={name:`ButtonStyle`,emits:[`click`],props:{type:{type:String,default:`button`,validator:e=>[`button`,`submit`].includes(e)},class:{type:String,default:``},disabled:{type:Boolean,default:!1},delay:{type:String,default:`1.5`}},data(){return{internalDisabled:!1}},computed:{isDisabled(){return this.disabled||this.internalDisabled},buttonClasses(){return[this.class]}},methods:{handleClick(e){this.isDisabled||(this.$emit(`click`,e),this.internalDisabled=!0,setTimeout(()=>{this.internalDisabled=!1},1e3*Number(this.delay)))}}},Rs=[`type`,`disabled`];function zs(e,n,r,i,a,o){return(0,t.openBlock)(),(0,t.createElementBlock)(`button`,{type:r.type,onClick:n[0]||=(...e)=>o.handleClick&&o.handleClick(...e),disabled:o.isDisabled,class:(0,t.normalizeClass)(o.buttonClasses)},[(0,t.renderSlot)(e.$slots,`default`)],10,Rs)}var Bs=$(Ls,[[`render`,zs]]),Vs={name:`InputFileDownloadStyle`,props:{modelValue:{type:File,default:null},disabled:{type:Boolean,default:!1},delay:{type:String,default:`1.5`},state:{type:String,default:`download`,validator(e){return[`download`,`loader`,`complete`].includes(e)}}},data(){return{internalDisabled:!1}},computed:{model:{get(){return this.modelValue},set(e){this.$emit(`update:modelValue`,e),this.$emit(`change`,e)}},isDisabled(){return this.disabled||this.internalDisabled},buttonClass(){return[Q.FILE_BUTTON_BASE,this.isDisabled?Q.FILE_BUTTON_DISABLED:Q.FILE_BUTTON_ACTIVE]},iconClass(){return[`w-10 h-10 flex items-center justify-center rounded-full`,this.isDisabled?Q.FILE_ICON_BG_DISABLED:this.state===`complete`?Q.FILE_ICON_BG_COMPLETE:Q.FILE_ICON_BG]}},methods:{handleClick(){this.isDisabled||(this.internalDisabled=!0,setTimeout(()=>{this.internalDisabled=!1},1e3*Number(this.delay)))}}},Hs={class:`inline-block`},Us=[`disabled`],Ws={class:`hidden sm:flex flex-col text-left leading-tight`},Gs={key:0,class:`text-sm font-bold`},Ks={key:1,class:`text-sm font-bold`},qs={key:2,class:`text-sm font-bold`};function Js(e,n,r,i,a,o){let s=(0,t.resolveComponent)(`font-awesome-icon`);return(0,t.openBlock)(),(0,t.createElementBlock)(`div`,Hs,[(0,t.createElementVNode)(`button`,{type:`button`,onClick:n[0]||=(...e)=>o.handleClick&&o.handleClick(...e),disabled:o.isDisabled,class:(0,t.normalizeClass)(o.buttonClass)},[(0,t.createElementVNode)(`span`,{class:(0,t.normalizeClass)(o.iconClass)},[r.state===`download`?((0,t.openBlock)(),(0,t.createBlock)(s,{key:0,icon:`fa-solid fa-cloud-arrow-down`,class:`w-5 h-5 text-white`})):(0,t.createCommentVNode)(``,!0),r.state===`loader`?((0,t.openBlock)(),(0,t.createBlock)(s,{key:1,icon:`fa-solid fa-spinner`,class:`w-5 h-5 text-white animate-spin`})):(0,t.createCommentVNode)(``,!0),r.state===`complete`?((0,t.openBlock)(),(0,t.createBlock)(s,{key:2,icon:`fa-solid fa-check`,class:`w-5 h-5 text-white`})):(0,t.createCommentVNode)(``,!0)],2),(0,t.createElementVNode)(`div`,Ws,[r.state===`download`?((0,t.openBlock)(),(0,t.createElementBlock)(`span`,Gs,`Descargar`)):(0,t.createCommentVNode)(``,!0),r.state===`loader`?((0,t.openBlock)(),(0,t.createElementBlock)(`span`,Ks,`Descargando`)):(0,t.createCommentVNode)(``,!0),r.state===`complete`?((0,t.openBlock)(),(0,t.createElementBlock)(`span`,qs,`Descargado`)):(0,t.createCommentVNode)(``,!0)])],10,Us)])}var Ys=$(Vs,[[`render`,Js]]),Xs={name:`InputFileUploadStyle`,props:{modelValue:{type:File,default:null},disabled:{type:Boolean,default:!1},delay:{type:String,default:`1.5`},formats:{type:Array,default:()=>[]},maxSizeMB:{type:[String,Number],default:5},state:{type:String,default:`uphold`,validator(e){return[`uphold`,`loader`].includes(e)}}},data(){return{internalDisabled:!1,description:``}},computed:{model:{get(){return this.modelValue},set(e){this.$emit(`update:modelValue`,e),this.$emit(`change`,e)}},isDisabled(){return this.disabled||this.internalDisabled},formatsText(){return this.formats.length?this.formats.join(`, `):`Todos`},acceptFormats(){return this.formats.map(e=>`.${e}`).join(`,`)},descriptionClass(){return[`block w-full text-sm text-right`,this.validate===!1?`text-red-500`:this.validate===!0?`text-emerald-500`:`text-gray-500`]},buttonClass(){return[Q.FILE_BUTTON_BASE,this.isDisabled?Q.FILE_BUTTON_DISABLED:Q.FILE_BUTTON_ACTIVE]},iconClass(){return[`w-10 h-10 flex items-center justify-center rounded-full`,this.isDisabled?Q.FILE_ICON_BG_DISABLED:Q.FILE_ICON_BG]}},methods:{handleClick(){this.isDisabled||(this.$refs.fileInput.click(),this.internalDisabled=!0,setTimeout(()=>{this.internalDisabled=!1},1e3*Number(this.delay)))},onFileSelected(e){this.description=``,this.validate=null;let t=e.target.files[0];if(!t)return;let n=t.size/1024/1024,r=t.name.split(`.`).pop().toLowerCase();if(n>Number(this.maxSizeMB)){this.description=`El archivo supera los ${this.maxSizeMB}MB`,this.validate=!1,this.model=null,e.target.value=``;return}if(this.formats.length&&!this.formats.includes(r)){this.description=`Formato no permitido: .${r}`,this.validate=!1,this.model=null,e.target.value=``;return}this.model=t,this.description=t.name,this.validate=!0}}},Zs={class:`inline-block`},Qs=[`accept`,`disabled`],$s={class:`block text-xs text-gray-500 mb-1`},ec={class:`font-bold text-gray-600 uppercase`},tc=[`disabled`],nc={class:`hidden sm:flex flex-col text-left leading-tight`},rc={class:`text-xs font-bold text-gray-500`};function ic(e,n,r,i,a,o){let s=(0,t.resolveComponent)(`font-awesome-icon`);return(0,t.openBlock)(),(0,t.createElementBlock)(`div`,Zs,[(0,t.createElementVNode)(`input`,{ref:`fileInput`,type:`file`,class:`hidden`,accept:o.acceptFormats,disabled:o.isDisabled,onChange:n[0]||=(...e)=>o.onFileSelected&&o.onFileSelected(...e)},null,40,Qs),(0,t.createElementVNode)(`span`,$s,[n[2]||=(0,t.createTextVNode)(` Formatos permitidos: `,-1),(0,t.createElementVNode)(`span`,ec,(0,t.toDisplayString)(`${o.formatsText}.`),1)]),(0,t.createElementVNode)(`button`,{type:`button`,onClick:n[1]||=(...e)=>o.handleClick&&o.handleClick(...e),disabled:o.isDisabled,class:(0,t.normalizeClass)(o.buttonClass)},[(0,t.createElementVNode)(`span`,{class:(0,t.normalizeClass)(o.iconClass)},[r.state===`uphold`?((0,t.openBlock)(),(0,t.createBlock)(s,{key:0,icon:`fa-solid fa-cloud-arrow-up`,class:`w-5 h-5 text-white`})):(0,t.createCommentVNode)(``,!0),r.state===`loader`?((0,t.openBlock)(),(0,t.createBlock)(s,{key:1,icon:`fa-solid fa-spinner`,class:`w-5 h-5 text-white animate-spin`})):(0,t.createCommentVNode)(``,!0)],2),(0,t.createElementVNode)(`div`,nc,[n[3]||=(0,t.createElementVNode)(`span`,{class:`text-sm font-bold`},`Adjuntar`,-1),(0,t.createElementVNode)(`span`,rc,(0,t.toDisplayString)(`Max ${r.maxSizeMB} MB`),1)])],10,tc),a.description?((0,t.openBlock)(),(0,t.createElementBlock)(`p`,{key:0,class:(0,t.normalizeClass)(o.descriptionClass)},(0,t.toDisplayString)(a.description),3)):(0,t.createCommentVNode)(``,!0)])}var ac=$(Xs,[[`render`,ic]]),oc={name:`LoaderStyle`,props:{message:{type:String,default:`Cargando...`}},computed:{arcStroke(){return Q.LOADER_ARC_STROKE},messageClass(){return Q.LOADER_MESSAGE}}},sc={class:`flex flex-col items-center justify-center gap-3`},cc={class:`relative w-16 h-16`},lc={class:`absolute inset-0 w-full h-full animate-spin`,viewBox:`0 0 100 100`},uc=[`stroke`];function dc(e,n,r,i,a,o){return(0,t.openBlock)(),(0,t.createElementBlock)(`div`,sc,[(0,t.createElementVNode)(`div`,cc,[n[0]||=(0,t.createElementVNode)(`svg`,{class:`w-full h-full`,viewBox:`0 0 100 100`},[(0,t.createElementVNode)(`circle`,{cx:`50`,cy:`50`,r:`45`,stroke:`#E5E7EB`,"stroke-width":`8`,fill:`none`})],-1),((0,t.openBlock)(),(0,t.createElementBlock)(`svg`,lc,[(0,t.createElementVNode)(`circle`,{cx:`50`,cy:`50`,r:`45`,stroke:o.arcStroke,"stroke-width":`8`,fill:`none`,"stroke-linecap":`round`,"stroke-dasharray":`70 213`},null,8,uc)]))]),(0,t.createElementVNode)(`div`,{class:(0,t.normalizeClass)(o.messageClass)},(0,t.toDisplayString)(r.message),3)])}var fc=$(oc,[[`render`,dc]]),pc={name:`ModalStyle`,props:{modelValue:{type:Boolean,default:!1},title:{type:String,default:`Sin titulo asignado`},size:{type:String,default:`lg`,validator:e=>[`sm`,`md`,`lg`,`xl`,`2xl`,`3xl`,`4xl`,`5xl`,`full`].includes(e)},showCloseButton:{type:Boolean,default:!0},closeOnEscape:{type:Boolean,default:!0},closeOnOverlayClick:{type:Boolean,default:!0}},emits:[`update:modelValue`],computed:{sizeClass(){let e={sm:`max-w-sm`,md:`max-w-md`,lg:`max-w-lg`,xl:`max-w-xl`,"2xl":`max-w-2xl`,"3xl":`max-w-3xl`,"4xl":`max-w-4xl`,"5xl":`max-w-5xl`,full:`max-w-[95%] h-[90vh]`};return e[this.size]||e.md}},watch:{modelValue:{handler(e){this.toggleBodyScroll(e)},immediate:!0}},mounted(){this.closeOnEscape&&window.addEventListener(`keydown`,this.handleKeydown)},beforeUnmount(){this.closeOnEscape&&window.removeEventListener(`keydown`,this.handleKeydown),this.toggleBodyScroll(!1)},methods:{toggleBodyScroll(e){if(e){let e=window.innerWidth-document.documentElement.clientWidth;document.body.style.overflow=`hidden`,document.body.style.paddingRight=`${e}px`}else document.body.style.overflow=``,document.body.style.paddingRight=``},handleKeydown(e){e.key===`Escape`&&this.modelValue&&this.closeOnEscape&&this.handleClose()},handleClose(){this.$emit(`update:modelValue`,!1)},close(){this.handleClose()}}},mc={key:0,class:`fixed inset-0 bg-black/30 backdrop-blur-xs flex items-center justify-center z-100 p-4`},hc={class:`p-4 border-b border-gray-200 flex items-center justify-between gap-2`},gc={key:0,class:`flex-1 min-w-0`},_c=[`title`],vc={class:`p-4 overflow-y-auto flex-1`},yc={key:0,class:`p-4 border-t border-gray-200 select-none`};function bc(e,n,r,i,a,o){let s=(0,t.resolveComponent)(`font-awesome-icon`);return(0,t.openBlock)(),(0,t.createBlock)(t.Teleport,{to:`body`},[(0,t.createVNode)(t.Transition,{"enter-active-class":`transition-opacity duration-300`,"leave-active-class":`transition-opacity duration-300`,"enter-from-class":`opacity-0`,"leave-to-class":`opacity-0`},{default:(0,t.withCtx)(()=>[r.modelValue?((0,t.openBlock)(),(0,t.createElementBlock)(`div`,mc,[(0,t.createVNode)(t.Transition,{"enter-active-class":`transition duration-300`,"leave-active-class":`transition duration-300`,"enter-from-class":`opacity-0 scale-95`,"leave-to-class":`opacity-0 scale-95`},{default:(0,t.withCtx)(()=>[r.modelValue?((0,t.openBlock)(),(0,t.createElementBlock)(`div`,{key:0,class:(0,t.normalizeClass)([`bg-white rounded-lg shadow-2xl max-h-[90vh] flex flex-col w-full`,o.sizeClass]),onClick:n[1]||=(0,t.withModifiers)(()=>{},[`stop`])},[(0,t.createElementVNode)(`div`,hc,[e.$slots.header?((0,t.openBlock)(),(0,t.createElementBlock)(`div`,gc,[(0,t.renderSlot)(e.$slots,`header`,{close:o.handleClose})])):(0,t.renderSlot)(e.$slots,`title`,{key:1},()=>[(0,t.createElementVNode)(`h3`,{class:`text-lg font-semibold text-gray-700 flex-1 min-w-0 truncate`,title:r.title},(0,t.toDisplayString)(r.title),9,_c)]),r.showCloseButton?((0,t.openBlock)(),(0,t.createElementBlock)(`button`,{key:2,onClick:n[0]||=(...e)=>o.handleClose&&o.handleClose(...e),type:`button`,class:`text-gray-400 hover:text-gray-600 transition-colors px-1.5 py-1 rounded-lg hover:bg-gray-100 shrink-0 cursor-pointer`},[(0,t.createVNode)(s,{icon:`fa-solid fa-xmark`})])):(0,t.createCommentVNode)(``,!0)]),(0,t.createElementVNode)(`div`,vc,[(0,t.renderSlot)(e.$slots,`default`,{close:o.handleClose})]),e.$slots.footer?((0,t.openBlock)(),(0,t.createElementBlock)(`div`,yc,[(0,t.renderSlot)(e.$slots,`footer`,{close:o.handleClose})])):(0,t.createCommentVNode)(``,!0)],2)):(0,t.createCommentVNode)(``,!0)]),_:3})])):(0,t.createCommentVNode)(``,!0)]),_:3})])}var xc=$(pc,[[`render`,bc]]),Sc={name:`SelectStyle`,props:{modelValue:[String,Number,Object],returnValue:{type:String,default:`value`,validator(e){return[`value`,`text`,`object`].includes(e)}},label:{type:String,default:``},description:{type:String,default:``},list:{type:Array,default:()=>[]},disabled:{type:Boolean,default:!1},required:{type:Boolean,default:!1},validate:{type:Boolean,default:null},mclass:{type:String,default:null},wrapOptions:{type:Boolean,default:!1}},data(){return{uuid:Z.getUUID(),open:!1,selected:null,dropdownStyle:{},dropdownMeasured:!1,naturalWidth:0,positionRaf:null,highlightedIndex:-1,searchBuffer:``,searchTimeout:null}},computed:{model:{get(){return this.modelValue},set(e){this.$emit(`update:modelValue`,e),this.$emit(`change`,e)}},items(){let e=[];for(let t of this.list)if(t&&Array.isArray(t.options))for(let n of t.options)e.push(this.normalizeItem(n));else e.push(this.normalizeItem(t));return e},displayGroups(){let e=[],t=0;for(let n of this.list)if(n&&Array.isArray(n.options)){let r=n.options.map(e=>({item:this.normalizeItem(e),index:t++}));e.push({label:n.label??``,options:r})}else e.push({label:``,options:[{item:this.normalizeItem(n),index:t++}]});return e},selectedText(){let e=this.items.find(e=>e.value===this.selected);return e?e.text:`- Seleccione una opción`},labelClass(){return Q.inputLabelClass(this.disabled)},inputClass(){return this.disabled?[this.mclass,Q.SELECT_DISABLED]:[this.mclass,Q.INPUT_BASE,`cursor-pointer`,Q.inputValidateClass(this.validate),this.validate===null?null:`pr-10`]},descriptionClass(){return Q.inputDescriptionClass(this.validate)},dropdownClass(){return[Q.SELECT_DROPDOWN.replace(`absolute`,`fixed`).replace(`z-20`,``).replace(`w-full`,``),`w-max`]},emptyClass(){return Q.SELECT_EMPTY},optgroupClass(){return Q.SELECT_OPTGROUP},requiredClass(){return Q.REQUIRED_ASTERISK},iconStaticClass(){return[Q.ICON_SIZE_STATIC,Q.iconGroupInteractiveClass(this.disabled)]}},watch:{modelValue:{immediate:!0,handler(e){this.syncSelected(e)}},list:{immediate:!0,handler(){this.syncSelected(this.modelValue)}},open(e,t){e===!0&&(this.dropdownMeasured=!1,this.naturalWidth=0,this.positionDropdown(),this.scrollToHighlighted(),this.$nextTick(()=>{let e=this.$refs.optionsList;this.naturalWidth=e?e.scrollWidth:0,this.dropdownMeasured=!0,this.positionDropdown()}),window.addEventListener(`scroll`,this.onScrollReposition,!0),window.addEventListener(`resize`,this.schedulePosition)),t===!0&&e===!1&&(this.$emit(`blur`),this.positionRaf&&=(cancelAnimationFrame(this.positionRaf),null),window.removeEventListener(`scroll`,this.onScrollReposition,!0),window.removeEventListener(`resize`,this.schedulePosition))},highlightedIndex(){this.scrollToHighlighted(!1)}},methods:{normalizeItem(e){return{...e,value:e&&e.value!==void 0?e.value:e.text}},getOptionClass(e,t){return[Q.SELECT_OPTION_BASE,this.wrapOptions?`whitespace-normal overflow-hidden text-ellipsis`:`whitespace-nowrap overflow-hidden text-ellipsis`,Q.selectOptionClass(e.value===this.selected,this.highlightedIndex===t)]},onScrollReposition(e){let t=this.$refs.optionsList;t&&e&&t.contains(e.target)||this.schedulePosition()},schedulePosition(){this.positionRaf||=requestAnimationFrame(()=>{this.positionRaf=null,this.positionDropdown()})},positionDropdown(){let e=this.$refs.inputWrap;if(!e)return;let t=e.getBoundingClientRect();if(this.dropdownMeasured&&(t.bottom<0||t.top>window.innerHeight)){this.open=!1;return}let n=window.innerHeight-t.bottom,r=t.top,i=n<220&&r>n,a={position:`fixed`,zIndex:9999,minWidth:`${t.width}px`};i?a.bottom=`${window.innerHeight-t.top}px`:a.top=`${t.bottom}px`;let o=document.documentElement.clientWidth,s=this.naturalWidth||t.width,c=o-t.left-8,l=t.right-8;s<=c?a.left=`${t.left}px`:s<=l?a.left=`${t.right-s}px`:l>c?(a.left=`8px`,a.maxWidth=`${l}px`):(a.left=`${t.left}px`,a.maxWidth=`${c}px`),this.dropdownMeasured||(a.opacity=`0`),this.dropdownStyle=a},scrollToHighlighted(e=!1){this.$nextTick(()=>{let t=this.$refs.optionsList;if(!t||this.highlightedIndex<0)return;let n=t.querySelector(`[data-index="${this.highlightedIndex}"]`);n&&(e?t.scrollTop=n.offsetTop-t.clientHeight/2+n.offsetHeight/2:n.scrollIntoView({block:`nearest`,behavior:`smooth`}))})},toggleOptions(){if(!this.disabled&&(this.open=!this.open,this.open)){let e=this.items.findIndex(e=>e.value===this.selected);this.highlightedIndex=e>=0?e:0}},selectOption(e){this.selected=e.value,this.open=!1,this.returnValue===`value`?(this.$emit(`update:modelValue`,e.value),this.$emit(`change`,e.value)):this.returnValue===`text`?(this.$emit(`update:modelValue`,e.text),this.$emit(`change`,e.text)):this.returnValue===`object`&&(this.$emit(`update:modelValue`,e),this.$emit(`change`,e))},handleClickOutside(e){if(!this.open)return;let t=this.$refs.selectContainer&&this.$refs.selectContainer.contains(e.target),n=this.$refs.optionsList&&this.$refs.optionsList.contains(e.target);!t&&!n&&(this.open=!1)},handleKeydown(e){if(this.disabled)return;let t=this.items.length-1;switch(e.key){case`ArrowDown`:e.preventDefault(),this.open?this.highlightedIndex=this.highlightedIndex<t?this.highlightedIndex+1:0:(this.open=!0,this.highlightedIndex=0);break;case`ArrowUp`:e.preventDefault(),this.open&&(this.highlightedIndex=this.highlightedIndex>0?this.highlightedIndex-1:t);break;case`Enter`:e.preventDefault(),this.open&&this.highlightedIndex>=0?this.selectOption(this.items[this.highlightedIndex]):this.open=!0;break;case`Escape`:this.open=!1;break;default:this.handleTypeSearch(e.key)}},handleTypeSearch(e){if(e.length!==1)return;clearTimeout(this.searchTimeout),this.searchBuffer+=e.toLowerCase();let t=this.searchBuffer,n=this.items.findIndex(e=>e.text.toLowerCase().startsWith(t));n===-1&&(n=this.items.findIndex(e=>e.text.toLowerCase().includes(t))),n!==-1&&(this.highlightedIndex=n,this.open=!0,this.scrollToHighlighted(!0)),this.searchTimeout=setTimeout(()=>{this.searchBuffer=``},1e3)},syncSelected(e){if(e==null){this.selected=null;return}if(this.returnValue===`value`){let t=this.items.find(t=>t.value==e);this.selected=t?t.value:null}if(this.returnValue===`text`){let t=this.items.find(t=>t.text==e);this.selected=t?t.value:null}this.returnValue===`object`&&(this.selected=e?.value??null)}},mounted(){document.addEventListener(`mousedown`,this.handleClickOutside)},beforeUnmount(){document.removeEventListener(`mousedown`,this.handleClickOutside),window.removeEventListener(`scroll`,this.onScrollReposition,!0),window.removeEventListener(`resize`,this.schedulePosition),this.positionRaf&&cancelAnimationFrame(this.positionRaf)}},Cc={class:`w-full`,ref:`selectContainer`},wc=[`for`],Tc={class:`relative`},Ec=[`id`,`value`],Dc=[`data-index`,`onClick`];function Oc(e,n,r,i,a,o){let s=(0,t.resolveComponent)(`font-awesome-icon`);return(0,t.openBlock)(),(0,t.createElementBlock)(`div`,Cc,[(0,t.createElementVNode)(`label`,{class:(0,t.normalizeClass)(o.labelClass),for:a.uuid},[(0,t.createTextVNode)((0,t.toDisplayString)(r.label)+` `,1),r.required?((0,t.openBlock)(),(0,t.createElementBlock)(`span`,{key:0,class:(0,t.normalizeClass)(o.requiredClass)},`*`,2)):(0,t.createCommentVNode)(``,!0)],10,wc),(0,t.createElementVNode)(`div`,Tc,[(0,t.createElementVNode)(`div`,{class:`relative group`,ref:`inputWrap`,onClick:n[1]||=(...e)=>o.toggleOptions&&o.toggleOptions(...e)},[(0,t.createElementVNode)(`input`,{type:`text`,id:a.uuid,readonly:``,value:o.selectedText,class:(0,t.normalizeClass)(o.inputClass),onKeydown:n[0]||=(...e)=>o.handleKeydown&&o.handleKeydown(...e)},null,42,Ec),(0,t.createVNode)(s,{icon:`fa-solid fa-chevron-down`,class:(0,t.normalizeClass)([o.iconStaticClass,`absolute right-3 top-1/2 -translate-y-1/2 pointer-events-none`])},null,8,[`class`])],512),((0,t.openBlock)(),(0,t.createBlock)(t.Teleport,{to:`body`},[a.open&&!r.disabled?((0,t.openBlock)(),(0,t.createElementBlock)(`ul`,{key:0,ref:`optionsList`,class:(0,t.normalizeClass)(o.dropdownClass),style:(0,t.normalizeStyle)(a.dropdownStyle)},[((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(o.displayGroups,(e,n)=>((0,t.openBlock)(),(0,t.createElementBlock)(t.Fragment,{key:`g`+n},[e.label?((0,t.openBlock)(),(0,t.createElementBlock)(`li`,{key:0,class:(0,t.normalizeClass)(o.optgroupClass)},(0,t.toDisplayString)(e.label),3)):(0,t.createCommentVNode)(``,!0),((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(e.options,e=>((0,t.openBlock)(),(0,t.createElementBlock)(`li`,{key:e.index,"data-index":e.index,onClick:t=>o.selectOption(e.item),class:(0,t.normalizeClass)(o.getOptionClass(e.item,e.index))},(0,t.toDisplayString)(e.item.text),11,Dc))),128))],64))),128)),o.items.length===0?((0,t.openBlock)(),(0,t.createElementBlock)(`li`,{key:0,class:(0,t.normalizeClass)(o.emptyClass)},`Sin registros`,2)):(0,t.createCommentVNode)(``,!0)],6)):(0,t.createCommentVNode)(``,!0)])),(0,t.createElementVNode)(`span`,{onClick:n[2]||=(...e)=>o.toggleOptions&&o.toggleOptions(...e),class:(0,t.normalizeClass)([`absolute right-3 top-1/2 -translate-y-1/2`,r.disabled?`cursor-not-allowed`:`cursor-pointer`])},null,2)]),r.description?((0,t.openBlock)(),(0,t.createElementBlock)(`span`,{key:0,class:(0,t.normalizeClass)(o.descriptionClass)},(0,t.toDisplayString)(r.description),3)):(0,t.createCommentVNode)(``,!0)],512)}var kc=$(Sc,[[`render`,Oc]]),Ac={name:`TextAreaStyle`,props:{modelValue:{type:String,default:``},label:{type:String,default:``},description:{type:String,default:``},placeholder:{type:String,default:``},row:{type:String,default:`3`},maxlength:{type:String,default:null},disabled:{type:Boolean,default:!1},required:{type:Boolean,default:!1},validate:{type:Boolean,default:null},mclass:{type:String,default:null}},computed:{model:{get(){return this.modelValue},set(e){this.$emit(`update:modelValue`,e)}},labelClass(){return Q.inputLabelClass(this.disabled)},inputClass(){return[this.mclass,Q.INPUT_BASE,Q.inputValidateClass(this.validate)]},descriptionClass(){return Q.inputDescriptionClass(this.validate)},requiredClass(){return Q.REQUIRED_ASTERISK}},data(){return{uuid:Z.getUUID()}},methods:{emitBlur(e){this.$emit(`blur`,e)}}},jc={class:`w-full`},Mc=[`for`],Nc=[`id`,`placeholder`,`maxlength`,`rows`];function Pc(e,n,r,i,a,o){return(0,t.openBlock)(),(0,t.createElementBlock)(`div`,jc,[(0,t.createElementVNode)(`label`,{class:(0,t.normalizeClass)(o.labelClass),for:a.uuid},[(0,t.createTextVNode)((0,t.toDisplayString)(r.label)+` `,1),r.required?((0,t.openBlock)(),(0,t.createElementBlock)(`span`,{key:0,class:(0,t.normalizeClass)(o.requiredClass)},`*`,2)):(0,t.createCommentVNode)(``,!0)],10,Mc),(0,t.withDirectives)((0,t.createElementVNode)(`textarea`,(0,t.mergeProps)({"onUpdate:modelValue":n[0]||=e=>o.model=e,id:a.uuid,placeholder:r.placeholder},{disabled:r.disabled,required:r.required},{onBlur:n[1]||=(...e)=>o.emitBlur&&o.emitBlur(...e),maxlength:r.maxlength?Number(r.maxlength):null,rows:Number(r.row),class:[o.inputClass,`resize-none`]}),null,16,Nc),[[t.vModelText,o.model]]),r.description?((0,t.openBlock)(),(0,t.createElementBlock)(`span`,{key:0,class:(0,t.normalizeClass)(o.descriptionClass)},(0,t.toDisplayString)(r.description),3)):(0,t.createCommentVNode)(``,!0)])}var Fc=$(Ac,[[`render`,Pc]]),Ic={name:`PaginationStyle`,props:{totalPages:{type:Number,default:0},actualPage:{type:Number,default:1},records:{type:Number,default:0},limit:{type:Number,default:0},summary:{type:Boolean,default:!1}},computed:{start(){return(this.actualPage-1)*this.limit+1},end(){return Math.min(this.actualPage*this.limit,this.records)},navPrevClass(){return Q.PAGINATION_NAV_PREV},navNextClass(){return Q.PAGINATION_NAV_NEXT},summaryClass(){return Q.PAGINATION_SUMMARY},visiblePages(){return this.totalPages<=7?Array.from({length:this.totalPages},(e,t)=>t+1):this.actualPage<=4?[1,2,3,4,`...`,this.totalPages-2,this.totalPages-1,this.totalPages]:this.actualPage>=this.totalPages-3?[1,2,3,`...`,this.totalPages-3,this.totalPages-2,this.totalPages-1,this.totalPages]:[1,`...`,this.actualPage-1,this.actualPage,this.actualPage+1,`...`,this.totalPages]}},methods:{getPageClass(e,t){return Q.paginationPageClass(e,this.actualPage,t)},beforePage(){this.actualPage!==1&&this.$emit(`page`,this.actualPage-1)},nextPage(){this.actualPage!==this.totalPages&&this.$emit(`page`,this.actualPage+1)},currentPage(e){this.$emit(`page`,e)}}},Lc={class:`flex flex-col items-center justify-center text-gray-700`},Rc={class:`flex justify-center text-xs`},zc=[`disabled`],Bc=[`onClick`,`disabled`],Vc=[`disabled`];function Hc(e,n,r,i,a,o){return(0,t.openBlock)(),(0,t.createElementBlock)(`div`,Lc,[(0,t.createElementVNode)(`div`,Rc,[(0,t.createElementVNode)(`button`,{type:`button`,disabled:r.actualPage===1,onClick:n[0]||=e=>o.beforePage(),class:(0,t.normalizeClass)(o.navPrevClass)},` Anterior `,10,zc),((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(o.visiblePages,(e,n)=>((0,t.openBlock)(),(0,t.createElementBlock)(`button`,{key:n,onClick:t=>e!==`...`&&o.currentPage(e),disabled:e===`...`,class:(0,t.normalizeClass)(o.getPageClass(e,n))},(0,t.toDisplayString)(e),11,Bc))),128)),(0,t.createElementVNode)(`button`,{type:`button`,disabled:r.actualPage===r.totalPages,onClick:n[1]||=e=>o.nextPage(),class:(0,t.normalizeClass)(o.navNextClass)},` Siguiente `,10,Vc)]),r.summary?((0,t.openBlock)(),(0,t.createElementBlock)(`span`,{key:0,class:(0,t.normalizeClass)(o.summaryClass)},(0,t.toDisplayString)(`Mostrando ${o.start} - ${o.end} de ${r.records}`),3)):(0,t.createCommentVNode)(``,!0)])}var Uc=$(Ic,[[`render`,Hc]]),Wc=[Xa,Za,wo,Yo,Ro,as,fs,vs,ws,As,Is,Bs,Ys,ac,fc,xc,kc,Fc,Uc];e.AlertStyle=Xa,e.ButtonStyle=Bs,e.DialogStyle=Za,e.InputCheckStyle=ws,e.InputDateStyle=wo,e.InputDateTimeStyle=Yo,e.InputFileDownloadStyle=Ys,e.InputFileUploadStyle=ac,e.InputNumberStyle=as,e.InputPasswordStyle=fs,e.InputRadioStyle=As,e.InputSwitchStyle=Is,e.InputTextStyle=vs,e.InputTimeStyle=Ro,e.LoaderStyle=fc,e.ModalStyle=xc,e.PaginationStyle=Uc,e.SelectStyle=kc,e.TextAreaStyle=Fc,e.configureStyles=Ya,e.default={install(e,t={}){t.styles&&Ya(t.styles),e.component(`font-awesome-icon`,Qi),Wc.forEach(t=>{e.component(t.name,t)}),e.config.globalProperties.$utilstyle=Z,e.config.globalProperties.$alertstyle=Xa,e.config.globalProperties.$dialogstyle=Za}}});
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@luis-angel-martin-dzul/input-styles",
|
|
3
3
|
"description": "Librería de inputs y componentes Vue para desarrollos",
|
|
4
4
|
"private": false,
|
|
5
|
-
"version": "0.0.
|
|
5
|
+
"version": "0.0.27",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"main": "dist/input-yuc.umd.js",
|
|
8
8
|
"module": "dist/input-yuc.es.js",
|