galliard-ui 1.0.3 → 1.0.5
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 +35 -2
- package/dist/components/Button/ButtonGal.d.ts +2 -0
- package/dist/components/inputs/CheckBox/CheckBoxGal.d.ts +2 -0
- package/dist/components/inputs/Dropdown/DropDownGal.d.ts +2 -0
- package/dist/components/inputs/InputFile/InputFileGal.d.ts +2 -0
- package/dist/components/inputs/InputRadio/InputRadioGal.d.ts +2 -0
- package/dist/components/inputs/InputText/InputTextGal.d.ts +2 -0
- package/dist/components/inputs/Textarea/TextAreaGal.d.ts +2 -0
- package/dist/components/inputs/utils/Functions.d.ts +1 -0
- package/dist/funtions/UnixActions.d.ts +8 -0
- package/dist/galliard-ui.cjs +1 -1
- package/dist/galliard-ui.d.ts +2 -411
- package/dist/galliard-ui.js +368 -368
- package/dist/hooks/useFileCatalogTranslate.d.ts +2 -0
- package/dist/hooks/useOnClickOutside.d.ts +4 -0
- package/dist/hooks/useValidateForms.d.ts +2 -0
- package/dist/index.css +1 -1
- package/dist/index.d.ts +19 -0
- package/dist/models/Button/ButtonModel.d.ts +25 -0
- package/dist/models/Catalogs/FileCatalog.d.ts +79 -0
- package/dist/models/Hooks/ValidateModel.d.ts +60 -0
- package/dist/models/Inputs/CheckModel.d.ts +20 -0
- package/dist/models/Inputs/DropDownModel.d.ts +39 -0
- package/dist/models/Inputs/InputFileModel.d.ts +29 -0
- package/dist/models/Inputs/InputModel.d.ts +37 -0
- package/dist/models/Inputs/InputRadioModel.d.ts +34 -0
- package/dist/models/Inputs/TextAreaModel.d.ts +31 -0
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -5,11 +5,44 @@
|
|
|
5
5
|
|
|
6
6
|
**Galliard UI** es una librería de componentes React moderna, construida con TypeScript y Sass, diseñada para ser ligera, accesible y fácil de integrar, y tambien altamente personalizable para adecuarse a cada proyecto.
|
|
7
7
|
|
|
8
|
+
<div align="center">
|
|
9
|
+
<a href="TU_LINK_DE_VERCEL_AQUI" target="_blank">
|
|
10
|
+
<img src="https://www.google.com/search?q=https://img.shields.io/badge/-%25F0%259F%2593%2596%2520Get%2520Started%2520%2526%2520Documentation-0070f3%3Fstyle%3Dfor-the-badge%26logo%3Dstorybook%26logoColor%3Dwhite" alt="Get Started" />
|
|
11
|
+
</a>
|
|
12
|
+
</div>
|
|
13
|
+
|
|
8
14
|
## 🚀 Instalación
|
|
9
15
|
|
|
10
|
-
Instala Galliard UI en tu proyecto:
|
|
16
|
+
Instala Galliard UI en tu proyecto usando tu gestor de paquetes favorito:
|
|
11
17
|
|
|
12
18
|
```bash
|
|
13
19
|
npm install galliard-ui
|
|
14
20
|
# o
|
|
15
|
-
yarn add galliard-ui
|
|
21
|
+
yarn add galliard-ui
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
## 🛠️ Uso Básico
|
|
25
|
+
|
|
26
|
+
Importa los componentes directamente en tu aplicación de React o Next.js:
|
|
27
|
+
|
|
28
|
+
```bash
|
|
29
|
+
import { ButtonGal } from 'galliard-ui';
|
|
30
|
+
|
|
31
|
+
const App = () => (
|
|
32
|
+
<ButtonGal label="Cerrrar sesión" action={() => handleLogout()} styleType="ThemeRed"/>
|
|
33
|
+
);
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
## ✨ Características
|
|
37
|
+
|
|
38
|
+
⚡ Ligera: Optimizada para no pesar en tu bundle final.
|
|
39
|
+
|
|
40
|
+
🎨 Personalizable: Usa Mixins de Sass para adaptar los estilos a tu marca.
|
|
41
|
+
|
|
42
|
+
📱 Responsiva: Diseñada para funcionar en cualquier tamaño de pantalla.
|
|
43
|
+
|
|
44
|
+
⌨️ TypeScript: Tipado completo para una mejor experiencia de desarrollo.
|
|
45
|
+
|
|
46
|
+
## 📄 Licencia
|
|
47
|
+
|
|
48
|
+
Este proyecto está bajo la licencia MIT.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const getRoundedValue: (rounded: string) => number;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
declare const TIMEZONES: readonly ["America/Mexico_City", "America/New_York", "America/Los_Angeles", "America/Bogota", "America/Argentina/Buenos_Aires", "America/Sao_Paulo", "Europe/Madrid", "Europe/London", "Europe/Paris", "Asia/Tokyo", "Asia/Shanghai", "Australia/Sydney", "UTC"];
|
|
2
|
+
type SupportedTimeZone = typeof TIMEZONES[number];
|
|
3
|
+
declare function convertToUnix(dateString: string | Date): number;
|
|
4
|
+
declare function unixToDate(unixTime: number | null | undefined, timeZone?: SupportedTimeZone): string;
|
|
5
|
+
declare function unixToDateTimeString(unixTime: number | null | undefined, timeZone?: SupportedTimeZone): string;
|
|
6
|
+
declare function unixToDateTime(unixTime: number | null | undefined, timeZone?: SupportedTimeZone): string;
|
|
7
|
+
declare function unixToStringYMD(unixTimestamp: number | null | undefined, timeZone?: SupportedTimeZone): string;
|
|
8
|
+
export { TIMEZONES, convertToUnix, unixToDate, unixToStringYMD, unixToDateTime, unixToDateTimeString };
|
package/dist/galliard-ui.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('./index.css');const l=require("react/jsx-runtime"),y=require("react");function et(e,n){const o=e.icons,r=e.aliases||Object.create(null),t=Object.create(null);function i(s){if(o[s])return t[s]=[];if(!(s in t)){t[s]=null;const c=r[s]&&r[s].parent,a=c&&i(c);a&&(t[s]=[c].concat(a))}return t[s]}return Object.keys(o).concat(Object.keys(r)).forEach(i),t}const Me=Object.freeze({left:0,top:0,width:16,height:16}),se=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),ye=Object.freeze({...Me,...se}),he=Object.freeze({...ye,body:"",hidden:!1});function tt(e,n){const o={};!e.hFlip!=!n.hFlip&&(o.hFlip=!0),!e.vFlip!=!n.vFlip&&(o.vFlip=!0);const r=((e.rotate||0)+(n.rotate||0))%4;return r&&(o.rotate=r),o}function je(e,n){const o=tt(e,n);for(const r in he)r in se?r in e&&!(r in o)&&(o[r]=se[r]):r in n?o[r]=n[r]:r in e&&(o[r]=e[r]);return o}function nt(e,n,o){const r=e.icons,t=e.aliases||Object.create(null);let i={};function s(c){i=je(r[c]||t[c],i)}return s(n),o.forEach(s),je(e,i)}function Pe(e,n){const o=[];if(typeof e!="object"||typeof e.icons!="object")return o;e.not_found instanceof Array&&e.not_found.forEach(t=>{n(t,null),o.push(t)});const r=et(e);for(const t in r){const i=r[t];i&&(n(t,nt(e,t,i)),o.push(t))}return o}const ot={provider:"",aliases:{},not_found:{},...Me};function de(e,n){for(const o in n)if(o in e&&typeof e[o]!=typeof n[o])return!1;return!0}function Ae(e){if(typeof e!="object"||e===null)return null;const n=e;if(typeof n.prefix!="string"||!e.icons||typeof e.icons!="object"||!de(e,ot))return null;const o=n.icons;for(const t in o){const i=o[t];if(!t||typeof i.body!="string"||!de(i,he))return null}const r=n.aliases||Object.create(null);for(const t in r){const i=r[t],s=i.parent;if(!t||typeof s!="string"||!o[s]&&!r[s]||!de(i,he))return null}return n}const we=Object.create(null);function rt(e,n){return{provider:e,prefix:n,icons:Object.create(null),missing:new Set}}function J(e,n){const o=we[e]||(we[e]=Object.create(null));return o[n]||(o[n]=rt(e,n))}function Fe(e,n){return Ae(n)?Pe(n,(o,r)=>{r?e.icons[o]=r:e.missing.add(o)}):[]}function it(e,n,o){try{if(typeof o.body=="string")return e.icons[n]={...o},!0}catch{}return!1}const Re=/^[a-z0-9]+(-[a-z0-9]+)*$/,ce=(e,n,o,r="")=>{const t=e.split(":");if(e.slice(0,1)==="@"){if(t.length<2||t.length>3)return null;r=t.shift().slice(1)}if(t.length>3||!t.length)return null;if(t.length>1){const c=t.pop(),a=t.pop(),u={provider:t.length>0?t[0]:r,prefix:a,name:c};return n&&!re(u)?null:u}const i=t[0],s=i.split("-");if(s.length>1){const c={provider:r,prefix:s.shift(),name:s.join("-")};return n&&!re(c)?null:c}if(o&&r===""){const c={provider:r,prefix:"",name:i};return n&&!re(c,o)?null:c}return null},re=(e,n)=>e?!!((n&&e.prefix===""||e.prefix)&&e.name):!1;let te=!1;function Le(e){return typeof e=="boolean"&&(te=e),te}function $e(e){const n=typeof e=="string"?ce(e,!0,te):e;if(n){const o=J(n.provider,n.prefix),r=n.name;return o.icons[r]||(o.missing.has(r)?null:void 0)}}function st(e,n){const o=ce(e,!0,te);if(!o)return!1;const r=J(o.provider,o.prefix);return n?it(r,o.name,n):(r.missing.add(o.name),!0)}function ct(e,n){if(typeof e!="object")return!1;if(typeof n!="string"&&(n=e.provider||""),te&&!n&&!e.prefix){let t=!1;return Ae(e)&&(e.prefix="",Pe(e,(i,s)=>{st(i,s)&&(t=!0)})),t}const o=e.prefix;if(!re({prefix:o,name:"a"}))return!1;const r=J(n,o);return!!Fe(r,e)}const Be=Object.freeze({width:null,height:null}),ze=Object.freeze({...Be,...se}),at=/(-?[0-9.]*[0-9]+[0-9.]*)/g,lt=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function Te(e,n,o){if(n===1)return e;if(o=o||100,typeof e=="number")return Math.ceil(e*n*o)/o;if(typeof e!="string")return e;const r=e.split(at);if(r===null||!r.length)return e;const t=[];let i=r.shift(),s=lt.test(i);for(;;){if(s){const c=parseFloat(i);isNaN(c)?t.push(i):t.push(Math.ceil(c*n*o)/o)}else t.push(i);if(i=r.shift(),i===void 0)return t.join("");s=!s}}function ut(e,n="defs"){let o="";const r=e.indexOf("<"+n);for(;r>=0;){const t=e.indexOf(">",r),i=e.indexOf("</"+n);if(t===-1||i===-1)break;const s=e.indexOf(">",i);if(s===-1)break;o+=e.slice(t+1,i).trim(),e=e.slice(0,r).trim()+e.slice(s+1)}return{defs:o,content:e}}function ft(e,n){return e?"<defs>"+e+"</defs>"+n:n}function dt(e,n,o){const r=ut(e);return ft(r.defs,n+r.content+o)}const pt=e=>e==="unset"||e==="undefined"||e==="none";function mt(e,n){const o={...ye,...e},r={...ze,...n},t={left:o.left,top:o.top,width:o.width,height:o.height};let i=o.body;[o,r].forEach(b=>{const p=[],m=b.hFlip,T=b.vFlip;let v=b.rotate;m?T?v+=2:(p.push("translate("+(t.width+t.left).toString()+" "+(0-t.top).toString()+")"),p.push("scale(-1 1)"),t.top=t.left=0):T&&(p.push("translate("+(0-t.left).toString()+" "+(t.height+t.top).toString()+")"),p.push("scale(1 -1)"),t.top=t.left=0);let I;switch(v<0&&(v-=Math.floor(v/4)*4),v=v%4,v){case 1:I=t.height/2+t.top,p.unshift("rotate(90 "+I.toString()+" "+I.toString()+")");break;case 2:p.unshift("rotate(180 "+(t.width/2+t.left).toString()+" "+(t.height/2+t.top).toString()+")");break;case 3:I=t.width/2+t.left,p.unshift("rotate(-90 "+I.toString()+" "+I.toString()+")");break}v%2===1&&(t.left!==t.top&&(I=t.left,t.left=t.top,t.top=I),t.width!==t.height&&(I=t.width,t.width=t.height,t.height=I)),p.length&&(i=dt(i,'<g transform="'+p.join(" ")+'">',"</g>"))});const s=r.width,c=r.height,a=t.width,u=t.height;let f,d;s===null?(d=c===null?"1em":c==="auto"?u:c,f=Te(d,a/u)):(f=s==="auto"?a:s,d=c===null?Te(f,u/a):c==="auto"?u:c);const g={},h=(b,p)=>{pt(p)||(g[b]=p.toString())};h("width",f),h("height",d);const x=[t.left,t.top,a,u];return g.viewBox=x.join(" "),{attributes:g,viewBox:x,body:i}}const ht=/\sid="(\S+)"/g,gt="IconifyId"+Date.now().toString(16)+(Math.random()*16777216|0).toString(16);let xt=0;function _t(e,n=gt){const o=[];let r;for(;r=ht.exec(e);)o.push(r[1]);if(!o.length)return e;const t="suffix"+(Math.random()*16777216|Date.now()).toString(16);return o.forEach(i=>{const s=typeof n=="function"?n(i):n+(xt++).toString(),c=i.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");e=e.replace(new RegExp('([#;"])('+c+')([")]|\\.[a-z])',"g"),"$1"+s+t+"$3")}),e=e.replace(new RegExp(t,"g"),""),e}const ge=Object.create(null);function yt(e,n){ge[e]=n}function xe(e){return ge[e]||ge[""]}function be(e){let n;if(typeof e.resources=="string")n=[e.resources];else if(n=e.resources,!(n instanceof Array)||!n.length)return null;return{resources:n,path:e.path||"/",maxURL:e.maxURL||500,rotate:e.rotate||750,timeout:e.timeout||5e3,random:e.random===!0,index:e.index||0,dataAfterTimeout:e.dataAfterTimeout!==!1}}const ve=Object.create(null),V=["https://api.simplesvg.com","https://api.unisvg.com"],ie=[];for(;V.length>0;)V.length===1||Math.random()>.5?ie.push(V.shift()):ie.push(V.pop());ve[""]=be({resources:["https://api.iconify.design"].concat(ie)});function bt(e,n){const o=be(n);return o===null?!1:(ve[e]=o,!0)}function Ie(e){return ve[e]}const vt=()=>{let e;try{if(e=fetch,typeof e=="function")return e}catch{}};let ke=vt();function It(e,n){const o=Ie(e);if(!o)return 0;let r;if(!o.maxURL)r=0;else{let t=0;o.resources.forEach(s=>{t=Math.max(t,s.length)});const i=n+".json?icons=";r=o.maxURL-t-o.path.length-i.length}return r}function jt(e){return e===404}const wt=(e,n,o)=>{const r=[],t=It(e,n),i="icons";let s={type:i,provider:e,prefix:n,icons:[]},c=0;return o.forEach((a,u)=>{c+=a.length+1,c>=t&&u>0&&(r.push(s),s={type:i,provider:e,prefix:n,icons:[]},c=a.length),s.icons.push(a)}),r.push(s),r};function $t(e){if(typeof e=="string"){const n=Ie(e);if(n)return n.path}return"/"}const Tt=(e,n,o)=>{if(!ke){o("abort",424);return}let r=$t(n.provider);switch(n.type){case"icons":{const i=n.prefix,c=n.icons.join(","),a=new URLSearchParams({icons:c});r+=i+".json?"+a.toString();break}case"custom":{const i=n.uri;r+=i.slice(0,1)==="/"?i.slice(1):i;break}default:o("abort",400);return}let t=503;ke(e+r).then(i=>{const s=i.status;if(s!==200){setTimeout(()=>{o(jt(s)?"abort":"next",s)});return}return t=501,i.json()}).then(i=>{if(typeof i!="object"||i===null){setTimeout(()=>{i===404?o("abort",i):o("next",t)});return}setTimeout(()=>{o("success",i)})}).catch(()=>{o("next",t)})},kt={prepare:wt,send:Tt};function Ge(e,n){e.forEach(o=>{const r=o.loaderCallbacks;r&&(o.loaderCallbacks=r.filter(t=>t.id!==n))})}function Et(e){e.pendingCallbacksFlag||(e.pendingCallbacksFlag=!0,setTimeout(()=>{e.pendingCallbacksFlag=!1;const n=e.loaderCallbacks?e.loaderCallbacks.slice(0):[];if(!n.length)return;let o=!1;const r=e.provider,t=e.prefix;n.forEach(i=>{const s=i.icons,c=s.pending.length;s.pending=s.pending.filter(a=>{if(a.prefix!==t)return!0;const u=a.name;if(e.icons[u])s.loaded.push({provider:r,prefix:t,name:u});else if(e.missing.has(u))s.missing.push({provider:r,prefix:t,name:u});else return o=!0,!0;return!1}),s.pending.length!==c&&(o||Ge([e],i.id),i.callback(s.loaded.slice(0),s.missing.slice(0),s.pending.slice(0),i.abort))})}))}let Nt=0;function St(e,n,o){const r=Nt++,t=Ge.bind(null,o,r);if(!n.pending.length)return t;const i={id:r,icons:n,callback:e,abort:t};return o.forEach(s=>{(s.loaderCallbacks||(s.loaderCallbacks=[])).push(i)}),t}function Ct(e){const n={loaded:[],missing:[],pending:[]},o=Object.create(null);e.sort((t,i)=>t.provider!==i.provider?t.provider.localeCompare(i.provider):t.prefix!==i.prefix?t.prefix.localeCompare(i.prefix):t.name.localeCompare(i.name));let r={provider:"",prefix:"",name:""};return e.forEach(t=>{if(r.name===t.name&&r.prefix===t.prefix&&r.provider===t.provider)return;r=t;const i=t.provider,s=t.prefix,c=t.name,a=o[i]||(o[i]=Object.create(null)),u=a[s]||(a[s]=J(i,s));let f;c in u.icons?f=n.loaded:s===""||u.missing.has(c)?f=n.missing:f=n.pending;const d={provider:i,prefix:s,name:c};f.push(d)}),n}function Dt(e,n=!0,o=!1){const r=[];return e.forEach(t=>{const i=typeof t=="string"?ce(t,n,o):t;i&&r.push(i)}),r}const Ot={resources:[],index:0,timeout:2e3,rotate:750,random:!1,dataAfterTimeout:!1};function Mt(e,n,o,r){const t=e.resources.length,i=e.random?Math.floor(Math.random()*t):e.index;let s;if(e.random){let _=e.resources.slice(0);for(s=[];_.length>1;){const j=Math.floor(Math.random()*_.length);s.push(_[j]),_=_.slice(0,j).concat(_.slice(j+1))}s=s.concat(_)}else s=e.resources.slice(i).concat(e.resources.slice(0,i));const c=Date.now();let a="pending",u=0,f,d=null,g=[],h=[];typeof r=="function"&&h.push(r);function x(){d&&(clearTimeout(d),d=null)}function b(){a==="pending"&&(a="aborted"),x(),g.forEach(_=>{_.status==="pending"&&(_.status="aborted")}),g=[]}function p(_,j){j&&(h=[]),typeof _=="function"&&h.push(_)}function m(){return{startTime:c,payload:n,status:a,queriesSent:u,queriesPending:g.length,subscribe:p,abort:b}}function T(){a="failed",h.forEach(_=>{_(void 0,f)})}function v(){g.forEach(_=>{_.status==="pending"&&(_.status="aborted")}),g=[]}function I(_,j,w){const N=j!=="success";switch(g=g.filter(S=>S!==_),a){case"pending":break;case"failed":if(N||!e.dataAfterTimeout)return;break;default:return}if(j==="abort"){f=w,T();return}if(N){f=w,g.length||(s.length?E():T());return}if(x(),v(),!e.random){const S=e.resources.indexOf(_.resource);S!==-1&&S!==e.index&&(e.index=S)}a="completed",h.forEach(S=>{S(w)})}function E(){if(a!=="pending")return;x();const _=s.shift();if(_===void 0){if(g.length){d=setTimeout(()=>{x(),a==="pending"&&(v(),T())},e.timeout);return}T();return}const j={status:"pending",resource:_,callback:(w,N)=>{I(j,w,N)}};g.push(j),u++,d=setTimeout(E,e.rotate),o(_,n,j.callback)}return setTimeout(E),m}function qe(e){const n={...Ot,...e};let o=[];function r(){o=o.filter(c=>c().status==="pending")}function t(c,a,u){const f=Mt(n,c,a,(d,g)=>{r(),u&&u(d,g)});return o.push(f),f}function i(c){return o.find(a=>c(a))||null}return{query:t,find:i,setIndex:c=>{n.index=c},getIndex:()=>n.index,cleanup:r}}function Ee(){}const pe=Object.create(null);function Pt(e){if(!pe[e]){const n=Ie(e);if(!n)return;const o=qe(n),r={config:n,redundancy:o};pe[e]=r}return pe[e]}function At(e,n,o){let r,t;if(typeof e=="string"){const i=xe(e);if(!i)return o(void 0,424),Ee;t=i.send;const s=Pt(e);s&&(r=s.redundancy)}else{const i=be(e);if(i){r=qe(i);const s=e.resources?e.resources[0]:"",c=xe(s);c&&(t=c.send)}}return!r||!t?(o(void 0,424),Ee):r.query(n,t,o)().abort}function Ne(){}function Ft(e){e.iconsLoaderFlag||(e.iconsLoaderFlag=!0,setTimeout(()=>{e.iconsLoaderFlag=!1,Et(e)}))}function Rt(e){const n=[],o=[];return e.forEach(r=>{(r.match(Re)?n:o).push(r)}),{valid:n,invalid:o}}function K(e,n,o){function r(){const t=e.pendingIcons;n.forEach(i=>{t&&t.delete(i),e.icons[i]||e.missing.add(i)})}if(o&&typeof o=="object")try{if(!Fe(e,o).length){r();return}}catch(t){console.error(t)}r(),Ft(e)}function Se(e,n){e instanceof Promise?e.then(o=>{n(o)}).catch(()=>{n(null)}):n(e)}function Lt(e,n){e.iconsToLoad?e.iconsToLoad=e.iconsToLoad.concat(n).sort():e.iconsToLoad=n,e.iconsQueueFlag||(e.iconsQueueFlag=!0,setTimeout(()=>{e.iconsQueueFlag=!1;const{provider:o,prefix:r}=e,t=e.iconsToLoad;if(delete e.iconsToLoad,!t||!t.length)return;const i=e.loadIcon;if(e.loadIcons&&(t.length>1||!i)){Se(e.loadIcons(t,r,o),f=>{K(e,t,f)});return}if(i){t.forEach(f=>{const d=i(f,r,o);Se(d,g=>{const h=g?{prefix:r,icons:{[f]:g}}:null;K(e,[f],h)})});return}const{valid:s,invalid:c}=Rt(t);if(c.length&&K(e,c,null),!s.length)return;const a=r.match(Re)?xe(o):null;if(!a){K(e,s,null);return}a.prepare(o,r,s).forEach(f=>{At(o,f,d=>{K(e,f.icons,d)})})}))}const Bt=(e,n)=>{const o=Dt(e,!0,Le()),r=Ct(o);if(!r.pending.length){let a=!0;return n&&setTimeout(()=>{a&&n(r.loaded,r.missing,r.pending,Ne)}),()=>{a=!1}}const t=Object.create(null),i=[];let s,c;return r.pending.forEach(a=>{const{provider:u,prefix:f}=a;if(f===c&&u===s)return;s=u,c=f,i.push(J(u,f));const d=t[u]||(t[u]=Object.create(null));d[f]||(d[f]=[])}),r.pending.forEach(a=>{const{provider:u,prefix:f,name:d}=a,g=J(u,f),h=g.pendingIcons||(g.pendingIcons=new Set);h.has(d)||(h.add(d),t[u][f].push(d))}),i.forEach(a=>{const u=t[a.provider][a.prefix];u.length&&Lt(a,u)}),n?St(n,r,i):Ne};function zt(e,n){const o={...e};for(const r in n){const t=n[r],i=typeof t;r in Be?(t===null||t&&(i==="string"||i==="number"))&&(o[r]=t):i===typeof o[r]&&(o[r]=r==="rotate"?t%4:t)}return o}const Gt=/[\s,]+/;function qt(e,n){n.split(Gt).forEach(o=>{switch(o.trim()){case"horizontal":e.hFlip=!0;break;case"vertical":e.vFlip=!0;break}})}function Ut(e,n=0){const o=e.replace(/^-?[0-9.]*/,"");function r(t){for(;t<0;)t+=4;return t%4}if(o===""){const t=parseInt(e);return isNaN(t)?0:r(t)}else if(o!==e){let t=0;switch(o){case"%":t=25;break;case"deg":t=90}if(t){let i=parseFloat(e.slice(0,e.length-o.length));return isNaN(i)?0:(i=i/t,i%1===0?r(i):0)}}return n}function Yt(e,n){let o=e.indexOf("xlink:")===-1?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(const r in n)o+=" "+r+'="'+n[r]+'"';return'<svg xmlns="http://www.w3.org/2000/svg"'+o+">"+e+"</svg>"}function Qt(e){return e.replace(/"/g,"'").replace(/%/g,"%25").replace(/#/g,"%23").replace(/</g,"%3C").replace(/>/g,"%3E").replace(/\s+/g," ")}function Ht(e){return"data:image/svg+xml,"+Qt(e)}function Wt(e){return'url("'+Ht(e)+'")'}let ee;function Jt(){try{ee=window.trustedTypes.createPolicy("iconify",{createHTML:e=>e})}catch{ee=null}}function Zt(e){return ee===void 0&&Jt(),ee?ee.createHTML(e):e}const Ue={...ze,inline:!1},Xt={xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink","aria-hidden":!0,role:"img"},Vt={display:"inline-block"},_e={backgroundColor:"currentColor"},Ye={backgroundColor:"transparent"},Ce={Image:"var(--svg)",Repeat:"no-repeat",Size:"100% 100%"},De={WebkitMask:_e,mask:_e,background:Ye};for(const e in De){const n=De[e];for(const o in Ce)n[e+o]=Ce[o]}const Kt={...Ue,inline:!0};function Oe(e){return e+(e.match(/^[-0-9.]+$/)?"px":"")}const en=(e,n,o)=>{const r=n.inline?Kt:Ue,t=zt(r,n),i=n.mode||"svg",s={},c=n.style||{},a={...i==="svg"?Xt:{}};if(o){const p=ce(o,!1,!0);if(p){const m=["iconify"],T=["provider","prefix"];for(const v of T)p[v]&&m.push("iconify--"+p[v]);a.className=m.join(" ")}}for(let p in n){const m=n[p];if(m!==void 0)switch(p){case"icon":case"style":case"children":case"onLoad":case"mode":case"ssr":case"fallback":break;case"_ref":a.ref=m;break;case"className":a[p]=(a[p]?a[p]+" ":"")+m;break;case"inline":case"hFlip":case"vFlip":t[p]=m===!0||m==="true"||m===1;break;case"flip":typeof m=="string"&&qt(t,m);break;case"color":s.color=m;break;case"rotate":typeof m=="string"?t[p]=Ut(m):typeof m=="number"&&(t[p]=m);break;case"ariaHidden":case"aria-hidden":m!==!0&&m!=="true"&&delete a["aria-hidden"];break;default:r[p]===void 0&&(a[p]=m)}}const u=mt(e,t),f=u.attributes;if(t.inline&&(s.verticalAlign="-0.125em"),i==="svg"){a.style={...s,...c},Object.assign(a,f);let p=0,m=n.id;return typeof m=="string"&&(m=m.replace(/-/g,"_")),a.dangerouslySetInnerHTML={__html:Zt(_t(u.body,m?()=>m+"ID"+p++:"iconifyReact"))},y.createElement("svg",a)}const{body:d,width:g,height:h}=e,x=i==="mask"||(i==="bg"?!1:d.indexOf("currentColor")!==-1),b=Yt(d,{...f,width:g+"",height:h+""});return a.style={...s,"--svg":Wt(b),width:Oe(f.width),height:Oe(f.height),...Vt,...x?_e:Ye,...c},y.createElement("span",a)};Le(!0);yt("",kt);if(typeof document<"u"&&typeof window<"u"){const e=window;if(e.IconifyPreload!==void 0){const n=e.IconifyPreload,o="Invalid IconifyPreload syntax.";typeof n=="object"&&n!==null&&(n instanceof Array?n:[n]).forEach(r=>{try{(typeof r!="object"||r===null||r instanceof Array||typeof r.icons!="object"||typeof r.prefix!="string"||!ct(r))&&console.error(o)}catch{console.error(o)}})}if(e.IconifyProviders!==void 0){const n=e.IconifyProviders;if(typeof n=="object"&&n!==null)for(let o in n){const r="IconifyProviders["+o+"] is invalid.";try{const t=n[o];if(typeof t!="object"||!t||t.resources===void 0)continue;bt(o,t)||console.error(r)}catch{console.error(r)}}}}function Qe(e){const[n,o]=y.useState(!!e.ssr),[r,t]=y.useState({});function i(h){if(h){const x=e.icon;if(typeof x=="object")return{name:"",data:x};const b=$e(x);if(b)return{name:x,data:b}}return{name:""}}const[s,c]=y.useState(i(!!e.ssr));function a(){const h=r.callback;h&&(h(),t({}))}function u(h){if(JSON.stringify(s)!==JSON.stringify(h))return a(),c(h),!0}function f(){var h;const x=e.icon;if(typeof x=="object"){u({name:"",data:x});return}const b=$e(x);if(u({name:x,data:b}))if(b===void 0){const p=Bt([x],f);t({callback:p})}else b&&((h=e.onLoad)===null||h===void 0||h.call(e,x))}y.useEffect(()=>(o(!0),a),[]),y.useEffect(()=>{n&&f()},[e.icon,n]);const{name:d,data:g}=s;return g?en({...ye,...g},e,d):e.children?e.children:e.fallback?e.fallback:y.createElement("span",{})}const D=y.forwardRef((e,n)=>Qe({...e,_ref:n}));y.forwardRef((e,n)=>Qe({inline:!0,...e,_ref:n}));const tn="_container_1rnmr_36",nn="_title_1rnmr_46",on="_containerInputError_1rnmr_50",rn="_containerInput_1rnmr_50",sn="_inputElement_1rnmr_69",cn="_errorMessage_1rnmr_80",an="_icon_1rnmr_92",ln="_containerCustomIcon_1rnmr_99",A={container:tn,title:nn,containerInputError:on,containerInput:rn,inputElement:sn,errorMessage:cn,icon:an,containerCustomIcon:ln},ne=e=>{switch(e){case"none":return 0;case"sm":return 5;case"md":return 10;case"lg":return 15;case"full":return 9999;default:return 0}},un=y.forwardRef(function({placeholder:n,value:o,setValue:r,label:t,typeInput:i,HorV:s,errorMessage:c,rounded:a,width:u,height:f,border:d,shadow:g,textSize:h,textColor:x,bgColor:b,customContainerClass:p,customInputClass:m,customIconRClass:T,customIconLClass:v,seeIconLeft:I=!0,seeIconRight:E,iconColorL:_,iconColorR:j,iconColorPass:w,iconSizeL:N,iconSizeR:S,iconSizePass:P,iconLeft:R,iconRight:L,customIconLeft:B,customIconRight:U,args:H},W){const[z,O]=y.useState(!1),G=y.useMemo(()=>ne(a??"full"),[a]);return l.jsxs("div",{className:A.container,style:{flexDirection:s==="horizontal"?"row":"column"},children:[l.jsx("label",{className:A.title,style:{fontSize:h,color:x,height:s==="horizontal"?35:"auto",display:s==="horizontal"?"flex":"block",alignItems:s==="horizontal"?"center":"initial",marginRight:s==="horizontal"?10:0,marginBottom:s==="vertical"?5:0},children:t}),l.jsxs("div",{className:A.containerInputError,children:[l.jsxs("div",{className:`${A.containerInput} ${p}`,style:{borderRadius:G,width:!u&&i==="datetime-local"?"auto":u,height:f,border:d||d===void 0?"":"none",boxShadow:g?"0 0 5px #00000075":"",backgroundColor:b},children:[B?l.jsx("div",{className:`${A.containerCustomIcon} ${v}`,children:B}):I&&l.jsx(D,{icon:R??"mi:user",className:`${A.icon} ${v}`,style:{color:_,fontSize:N}}),l.jsx("input",{ref:W,className:`${A.inputElement} ${m}`,style:{fontSize:h,color:x},type:i==="password"&&z?"text":i,placeholder:n,value:o,onChange:Y=>r?.(Y.target.value),...H}),i==="password"&&l.jsx(D,{onClick:()=>O(!z),icon:z?"fluent:eye-20-filled":"fluent:eye-hide-20-filled",className:`${A.icon}`,style:{color:w,fontSize:P,marginRight:10}}),U?l.jsx("div",{className:`${A.containerCustomIcon} ${T}`,children:U}):E&&l.jsx(D,{icon:L??"mi:user",className:`${A.icon} ${T}`,style:{color:j,fontSize:S}})]}),c!==""&&l.jsx("p",{className:A.errorMessage,children:c})]})]})}),fn="_container_rchrd_36",dn="_containerInputError_rchrd_50",pn="_containerInput_rchrd_50",mn="_inputElement_rchrd_69",hn="_errorMessage_rchrd_80",gn="_icon_rchrd_92",xn="_containerCustomIcon_rchrd_99",Q={container:fn,containerInputError:dn,containerInput:pn,inputElement:mn,errorMessage:hn,icon:gn,containerCustomIcon:xn},_n=y.forwardRef(function({label:n,value:o,errorMessage:r,textSize:t,textColor:i,setValue:s,useLinkable:c,link:a,iconSize:u,seeIcon:f,icon:d,iconColor:g,customInputClass:h,customLabelClass:x,customIconClass:b,customIcon:p,args:m},T){const v=y.useId();return l.jsx("div",{ref:T,className:Q.container,children:l.jsxs("div",{className:Q.containerInputError,children:[l.jsxs("div",{className:Q.containerInput,children:[l.jsx("input",{className:`${Q.inputElement} ${h}`,style:{fontSize:t,color:i},type:"checkbox",checked:o,onChange:I=>s(I.target.checked),...m}),p?l.jsx("div",{className:`${Q.containerCustomIcon} ${b}`,children:p}):f&&l.jsx(D,{icon:d??"mi:user",className:`${Q.icon} ${b}`,style:{color:g,fontSize:u}}),c?l.jsx("a",{className:x,href:a||"#",style:{fontSize:t,color:i,textDecoration:"underline"},children:n}):l.jsx("label",{htmlFor:v,className:x,style:{fontSize:t,color:i},children:n})]}),r!==""&&l.jsx("p",{className:Q.errorMessage,children:r})]})})}),yn="_container_fo8vq_36",bn="_containerInputError_fo8vq_50",vn="_containerInput_fo8vq_50",In="_errorMessage_fo8vq_80",jn="_icon_fo8vq_92",wn="_containerCustomIcon_fo8vq_99",$n="_containerInputAndOptions_fo8vq_99",Tn="_containerOptions_fo8vq_99",kn="_optionElement_fo8vq_99",En="_containerIconOption_fo8vq_99",Nn="_containerLabel_fo8vq_111",Sn="_textOption_fo8vq_141",Cn="_iconArrow_fo8vq_149",k={container:yn,containerInputError:bn,containerInput:vn,errorMessage:In,icon:jn,containerCustomIcon:wn,containerInputAndOptions:$n,containerOptions:Tn,optionElement:kn,containerIconOption:En,containerLabel:Nn,textOption:Sn,iconArrow:Cn},He=(e,n)=>{y.useEffect(()=>{const o=r=>{const t=e.current;!t||t.contains(r.target)||n(r)};return document.addEventListener("mousedown",o),document.addEventListener("touchstart",o),()=>{document.removeEventListener("mousedown",o),document.removeEventListener("touchstart",o)}},[e,n])},Dn=y.forwardRef(function({label:n,value:o,setValue:r,options:t,placeholder:i,errorMessage:s,orientation:c="bottom",iconInRight:a=!1,rounded:u,border:f=!0,textSize:d="1.4rem",textColor:g="#000",labelSize:h="1.4rem",labelColor:x="#000",width:b=250,height:p=40,bgColor:m,shadow:T=!1,icon:v,iconSize:I=20,iconsOptionsSize:E=20,seeIcon:_=!1,seeOptionsIcons:j=!1,iconsColor:w="#000",customIcon:N,customContainerClass:S,customInputClass:P,customLabelClass:R,customIconClass:L,customOptionClass:B},U){const[H,W]=y.useState(null),[z,O]=y.useState(!1),G=y.useRef(null),Y={valueOption:null,text:i??"Selecciona una opción",icon:"hugeicons:cursor-magic-selection-04"};He(G,()=>{O(!1)}),y.useEffect(()=>{let C=[Y,...t];W(C)},[]);const Z=y.useMemo(()=>ne(u??"lg"),[u]);return l.jsxs("div",{ref:U,className:`${k.container} ${S}`,children:[l.jsxs("div",{className:k.containerLabel,style:{flexDirection:a?"row-reverse":"row",justifyContent:a?"flex-end":"flex-start"},children:[N?l.jsx("div",{className:`${k.containerCustomIcon} ${L}`,style:{height:I},children:N}):_&&l.jsx(D,{icon:v??"icon-park-outline:dot",className:`${k.icon} ${L}`,style:{color:w,fontSize:I}}),l.jsx("label",{className:R,style:{fontSize:h,color:x},children:n})]}),l.jsxs("div",{className:k.containerInputError,children:[l.jsxs("div",{ref:G,className:k.containerInputAndOptions,children:[l.jsxs("div",{onClick:C=>{C.stopPropagation(),O(!z)},className:`${k.containerInput} ${P}`,style:{width:b,height:p,border:f?"":"none",boxShadow:T?"0 0 10px #00000050":"",borderRadius:Z,backgroundColor:m},children:[j&&o?.valueOption&&l.jsx(l.Fragment,{children:o?.customIcon?l.jsx("div",{className:k.containerCustomIcon,children:o?.customIcon}):o?.icon&&l.jsx(D,{icon:o.icon,className:k.icon,style:{color:o.iconColor?o.iconColor:w,fontSize:E}})}),l.jsx("p",{className:k.textOption,style:{fontSize:h,color:x,fontWeight:o?.valueOption?"bold":""},children:o?.text?o.text:Y.text}),l.jsx(D,{icon:"ri:arrow-down-s-line",className:`${k.icon} ${k.iconArrow}`})]}),z&&l.jsx("div",{className:k.containerOptions,style:{top:c==="bottom"?"calc(100% + 10px)":c==="left"||c==="right"?0:"",left:c==="right"?"calc(100% + 10px)":c==="top"||c==="bottom"?0:"",bottom:c==="top"?"calc(100% + 10px)":"",right:c==="left"?"calc(100% + 10px)":""},children:H?.map((C,le)=>l.jsxs("div",{onClick:X=>{X.stopPropagation(),O(!1),r(C)},className:`${k.optionElement} ${B}`,children:[j&&l.jsx("div",{className:`${k.containerIconOption}`,children:C.customIcon?C.customIcon:j&&l.jsx(D,{icon:C.icon??"icon-park-outline:dot",className:`${k.icon} ${k.containerIconOption}`,style:{color:C.iconColor?C.iconColor:w,fontSize:E}})}),l.jsx("p",{className:k.textOption,style:{fontSize:d,color:g},children:C.text?C.text:Y.text})]},le))})]}),s!==""&&l.jsx("p",{className:k.errorMessage,children:s})]})]})}),On="_container_ljlw3_36",Mn="_containerInputError_ljlw3_50",Pn="_errorMessage_ljlw3_80",An="_icon_ljlw3_92",Fn="_containerCustomIcon_ljlw3_99",Rn="_containerInputFile_ljlw3_114",Ln="_containerSelectedFile_ljlw3_114",Bn="_textInput_ljlw3_132",zn="_inputFile_ljlw3_142",Gn="_fileName_ljlw3_158",qn="_backdrop_ljlw3_175",M={container:On,containerInputError:Mn,errorMessage:Pn,icon:An,containerCustomIcon:Fn,containerInputFile:Rn,containerSelectedFile:Ln,textInput:Bn,inputFile:zn,fileName:Gn,backdrop:qn},me={images:{common:"image/png, image/jpeg, image/gif, image/webp",png:"image/png",jpg:"image/jpeg, image/jpg",gif:"image/gif",svg:"image/svg+xml",webp:"image/webp",avif:"image/avif",ico:"image/x-icon, image/vnd.microsoft.icon",tiff:"image/tiff",bmp:"image/bmp",heic:"image/heic, image/heif"},docs:{pdf:"application/pdf",word:".doc, .docx, application/msword, application/vnd.openxmlformats-officedocument.wordprocessingml.document",excel:".xls, .xlsx, application/vnd.ms-excel, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",powerpoint:".ppt, .pptx, application/vnd.ms-powerpoint, application/vnd.openxmlformats-officedocument.presentationml.presentation",odt:"application/vnd.oasis.opendocument.text",ods:"application/vnd.oasis.opendocument.spreadsheet",odp:"application/vnd.oasis.opendocument.presentation",txt:"text/plain",rtf:"application/rtf",csv:"text/csv",markdown:"text/markdown, .md",epub:"application/epub+zip"},archives:{zip:"application/zip, application/x-zip-compressed",rar:"application/x-rar-compressed, .rar",sevenZ:"application/x-7z-compressed",tar:"application/x-tar",gz:"application/gzip",iso:"application/x-iso9660-image, .iso"},media:{audio:"audio/*",video:"video/*",mp3:"audio/mpeg",wav:"audio/wav",ogg:"audio/ogg, video/ogg",mp4:"video/mp4",webm:"video/webm",mov:"video/quicktime",avi:"video/x-msvideo"},fonts:{woff:"font/woff",woff2:"font/woff2",ttf:"font/ttf, application/x-font-ttf",otf:"font/otf, application/x-font-opentype",eot:"application/vnd.ms-fontobject"},code:{html:"text/html",css:"text/css",js:"text/javascript, application/javascript, .mjs",ts:"application/typescript, .ts, .tsx",json:"application/json",xml:"application/xml, text/xml",python:"text/x-python, .py",java:"text/x-java-source, .java, application/java-archive, .jar",csharp:"text/plain, .cs",cpp:"text/x-c++, .cpp, .h, .hpp",c:"text/x-c, .c",php:"application/x-httpd-php, .php",sql:"application/sql, .sql",sh:"application/x-sh, .sh",yaml:"text/yaml, .yaml, .yml"}},We=e=>{if(Array.isArray(e))return e.map(o=>We(o)).filter(o=>o!==void 0).join(", ");if(e!=="*"){if(typeof e=="string"){if(e in me){const n=me[e];return Object.values(n).join(", ")}return}if(typeof e=="object"){const n=[];return Object.keys(e).forEach(o=>{const r=e[o],t=me[o];r&&t&&r.forEach(i=>{const s=t[i];s&&n.push(s)})}),n.join(", ")}}},Un="_btnThemeDark_km3as_36",Yn="_iconButton_km3as_58",Qn="_containerCustomIcon_km3as_65",Hn="_btnBorderedThemeDark_km3as_78",Wn="_btnThemeGreen_km3as_98",Jn="_btnBorderedThemeGreen_km3as_140",Zn="_btnThemeBlue_km3as_160",Xn="_btnBorderedThemeBlue_km3as_202",Vn="_btnThemeRed_km3as_222",Kn="_btnBorderedThemeRed_km3as_264",eo="_btnThemePurple_km3as_284",to="_btnBorderedThemePurple_km3as_326",no="_btnThemeGray_km3as_346",oo="_btnBorderedThemeGray_km3as_388",ro="_btnThemeLight_km3as_408",io="_btnBorderedThemeLight_km3as_450",so="_btnThemeYellow_km3as_470",co="_btnBorderedThemeYellow_km3as_512",oe={btnThemeDark:Un,iconButton:Yn,containerCustomIcon:Qn,btnBorderedThemeDark:Hn,btnThemeGreen:Wn,btnBorderedThemeGreen:Jn,btnThemeBlue:Zn,btnBorderedThemeBlue:Xn,btnThemeRed:Vn,btnBorderedThemeRed:Kn,btnThemePurple:eo,btnBorderedThemePurple:to,btnThemeGray:no,btnBorderedThemeGray:oo,btnThemeLight:ro,btnBorderedThemeLight:io,btnThemeYellow:so,btnBorderedThemeYellow:co},Je=y.forwardRef(function({label:n="Texto del Botón",action:o=()=>{alert("Botón presionado")},font:r,width:t,height:i,icon:s="tabler:send",seeIcon:c=!0,textSize:a,iconColor:u,iconSize:f,styleType:d="ThemeDark",rounded:g="md",borderedStyle:h=!1,iconOn:x,padding:b,shadow:p=!1,colorShadow:m,customClassButton:T,customClassLabel:v,customClassIcon:I,customIcon:E,args:_},j){const w=y.useMemo(()=>ne(g??"full"),[g]);return l.jsxs("button",{ref:j,className:`${oe[`btn${d}`]} ${h&&oe[`btnBordered${d}`]} ${T}`,style:{borderRadius:w,width:t??"auto",height:i??"auto",flexDirection:x==="left"?"row-reverse":"row",boxShadow:`${p?"0 0 7px "+(m||"#000"):""}`,padding:b},onClick:N=>{N.preventDefault(),o()},..._,children:[n&&l.jsx("p",{className:`${v}`,style:{fontSize:a,fontFamily:r},children:n}),E?l.jsx("div",{className:`${oe.containerCustomIcon} ${I}`,children:E}):c&&l.jsx(D,{icon:s,className:`${oe.iconButton} ${I}`,style:{fontSize:f,color:u}})]})}),ao=y.forwardRef(function({label:n,errorMessage:o,acceptFiles:r="*",selectedFileE:t,setSelectedFileE:i,maxMBSize:s,shadow:c=!0,textButtonCancel:a="Cancelar",width:u,height:f,bgColor:d,bgColorHover:g,labelSize:h,labelColor:x,rounded:b="md",iconSize:p=30,seeIcon:m=!0,icon:T,iconColor:v="#fff",customFIleClass:I,customSelectedClass:E,customLabelClass:_,customIconClass:j,customIcon:w,args:N},S){const P=y.useId(),R=y.useRef(0),[L,B]=y.useState(t),[U,H]=y.useState(!1),[W,z]=y.useState(null),[O,G]=y.useState(!1),Y=We(r),Z=()=>{B(null),i(null)},C=$=>{if(z(null),s){const Ke=s*1024*1024;if($.size>Ke){z(`El archivo excede el límite de ${s} MB.`),Z();return}}B($),i($)},le=$=>{$.preventDefault(),$.target.files&&$.target.files[0]?C($.target.files[0]):Z()},X=$=>{$.preventDefault(),$.stopPropagation(),R.current+=1,$.type==="dragenter"||$.type==="dragover"?G(!0):$.type==="dragleave"&&G(!1)},ue=$=>{$.preventDefault(),$.stopPropagation(),R.current-=1,R.current===0&&G(!1)},Ve=$=>{$.preventDefault(),$.stopPropagation(),G(!1),R.current=0,$.dataTransfer.files&&$.dataTransfer.files[0]&&C($.dataTransfer.files[0])},fe=y.useMemo(()=>ne(b??"lg"),[b]);return l.jsx("div",{className:M.container,children:l.jsxs("div",{className:M.containerInputError,children:[L?l.jsxs("div",{className:`${M.containerSelectedFile} ${E}`,style:{boxShadow:c?"0 0 5px #00000050":"",borderRadius:fe,width:u,height:f},children:[m&&l.jsx(D,{icon:"uim:paperclip",className:M.icon}),l.jsx("p",{className:M.fileName,children:L?.name}),l.jsx("div",{className:M.backdrop,style:{borderRadius:fe},children:l.jsx(Je,{styleType:"ThemeRed",action:Z,label:a,rounded:"full",icon:"fa:trash",iconSize:"1.4rem",iconColor:"#fff",textSize:12,padding:"7px"})})]}):l.jsxs("label",{htmlFor:P,className:`${M.containerInputFile} ${I}`,onMouseEnter:()=>H(!0),onMouseLeave:()=>H(!1),onDragEnter:X,onDragLeave:ue,onDragOver:$=>$.preventDefault(),onDrop:Ve,style:{boxShadow:c?"0 0 5px #00000050":"",borderRadius:fe,backgroundColor:O?"#fff":U?g:d,borderColor:O?d||"#6936ee":"",width:u,height:f},children:[!w||O?m&&l.jsx(D,{icon:O?"tabler:drag-drop":T??"mingcute:upload-3-fill",className:`${M.icon} ${j}`,onDragEnter:X,onDragLeave:ue,style:{color:O?d||"#6936ee":v,fontSize:p}}):l.jsx("div",{className:`${M.containerCustomIcon} ${j}`,style:{height:p??"2rem"},children:w}),l.jsx("span",{className:`${M.textInput} ${_}`,style:{fontSize:h,color:O?d||"#6936ee":x},onDragEnter:X,onDragLeave:ue,children:O?"Suelta para agregar":n??"Click o arrastra un archivo"}),l.jsx("input",{ref:S,id:P,type:"file",accept:Y,className:M.inputFile,onChange:le,...N})]}),l.jsx("p",{className:M.errorMessage,children:W||o||""})]})})}),lo="_container_6mbm0_36",uo="_containerInputError_6mbm0_50",fo="_inputElement_6mbm0_69",po="_errorMessage_6mbm0_80",mo="_icon_6mbm0_92",ho="_containerCustomIcon_6mbm0_99",go="_containerLabel_6mbm0_111",xo="_containerGroupRadio_6mbm0_127",_o="_containerRadio_6mbm0_134",F={container:lo,containerInputError:uo,inputElement:fo,errorMessage:po,icon:mo,containerCustomIcon:ho,containerLabel:go,containerGroupRadio:xo,containerRadio:_o},yo=y.forwardRef(function({label:n,labelSize:o,labelColor:r,options:t,errorMessage:i,textSize:s,textColor:c,setValue:a,name:u,HorV:f="horizontal",icon:d,iconInRight:g,iconSize:h,iconColor:x,customIcon:b,seeIcon:p=!0,customInputClass:m,customLabelClass:T,customTextClass:v,customIconLabelClass:I,customContainerRadiosClass:E},_){const j=y.useId();return l.jsxs("div",{ref:_,className:F.container,children:[l.jsxs("div",{className:F.containerLabel,style:{flexDirection:g?"row-reverse":"row",justifyContent:g?"flex-end":"flex-start"},children:[b?l.jsx("div",{className:`${F.containerCustomIcon} ${I}`,style:{height:h},children:b}):p&&l.jsx(D,{icon:d??"mi:user",className:`${F.icon} ${I}`,style:{color:x,fontSize:h}}),l.jsx("label",{style:{fontSize:o,color:r},className:v,children:n})]}),l.jsxs("div",{className:F.containerInputError,children:[l.jsx("div",{className:`${F.containerGroupRadio} ${E}`,style:{flexDirection:f==="vertical"?"column":"row",alignItems:f==="vertical"?"stretch":"center",justifyContent:f==="vertical"?"center":"flex-start"},children:t.map((w,N)=>{const S=`${j}-${N}`;return l.jsxs("div",{className:F.containerRadio,children:[l.jsx("input",{id:S,className:`${F.inputElement} ${m}`,style:{fontSize:s,color:c},type:"radio",name:u,value:w.value,onChange:P=>a(P.target.value)}),w.customIcon?l.jsx("div",{className:`${F.containerCustomIcon} ${w.customIconClass}`,children:w.customIcon}):w.seeIcon&&l.jsx(D,{icon:w.icon??"mi:user",className:`${F.icon} ${w.customIconClass}`,style:{color:w.iconColor,fontSize:h}}),l.jsx("label",{htmlFor:S,className:T,style:{fontSize:s,color:c},children:w.label})]},j+w.value)})}),i!==""&&l.jsx("p",{className:F.errorMessage,children:i})]})]})}),bo="_container_cj2yx_36",vo="_containerInputError_cj2yx_50",Io="_containerInput_cj2yx_50",jo="_inputElement_cj2yx_69",wo="_errorMessage_cj2yx_80",$o="_icon_cj2yx_92",To="_containerCustomIcon_cj2yx_99",ko="_containerLabel_cj2yx_111",Eo="_counterCharacter_cj2yx_142",q={container:bo,containerInputError:vo,containerInput:Io,inputElement:jo,errorMessage:wo,icon:$o,containerCustomIcon:To,containerLabel:ko,counterCharacter:Eo},No=y.forwardRef(function({placeholder:n,value:o,setValue:r,label:t,errorMessage:i,seeMaxCharCounter:s=!0,maxCharacters:c=300,resize:a=!0,rounded:u,width:f=250,height:d=100,maxWidth:g=500,maxHeight:h=500,border:x,shadow:b,textSize:p,textColor:m,bgColor:T,customContainerClass:v,customTextAreaClass:I,customIconClass:E,seeIcon:_,iconInRight:j=!1,iconColor:w,iconSize:N,icon:S,customIcon:P,args:R},L){const B=y.useMemo(()=>ne(u??"lg"),[u]);return l.jsxs("div",{className:q.container,children:[l.jsxs("div",{className:q.containerLabel,style:{flexDirection:j?"row-reverse":"row",justifyContent:j?"flex-end":"flex-start"},children:[P?l.jsx("div",{className:`${q.containerCustomIcon} ${E}`,style:{height:N},children:P}):_&&l.jsx(D,{icon:S??"mi:user",className:`${q.icon} ${E}`,style:{color:w,fontSize:N}}),l.jsx("label",{style:{fontSize:p,color:m},children:t})]}),l.jsxs("div",{className:q.containerInputError,children:[l.jsxs("div",{className:`${q.containerInput} ${v}`,style:{borderRadius:B,border:x||x===void 0?"":"none",boxShadow:b?"0 0 5px #00000075":"",backgroundColor:T,resize:a?"both":"none",width:f,height:d,minWidth:f,minHeight:d,maxWidth:g,maxHeight:h},children:[l.jsx("textarea",{ref:L,className:`${q.inputElement} ${I}`,style:{fontSize:p,color:m},placeholder:n,value:o,maxLength:c,onChange:U=>r?.(U.target.value),...R}),s&&l.jsxs("p",{className:q.counterCharacter,children:[o?o?.length:0,"/",c]})]}),i!==""&&l.jsx("p",{className:q.errorMessage,children:i})]})]})}),So=["America/Mexico_City","America/New_York","America/Los_Angeles","America/Bogota","America/Argentina/Buenos_Aires","America/Sao_Paulo","Europe/Madrid","Europe/London","Europe/Paris","Asia/Tokyo","Asia/Shanghai","Australia/Sydney","UTC"],ae="America/Mexico_City";function Ze(e,n){return new Intl.DateTimeFormat("es-MX",{timeZone:n,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",hour12:!0}).formatToParts(e).reduce((r,t)=>(r[t.type]=t.value,r),{})}function Co(e){if(!e)return 0;let n;return typeof e=="string"?n=new Date(e):n=e,Math.floor(n.getTime()/1e3)}function Do(e,n=ae){if(!e)return"";const o=new Date(e*1e3),r=Ze(o,n);return`${r.year}-${r.month}-${r.day}`}function Xe(e,n=ae){if(!e)return"";const o=["ENE","FEB","MAR","ABR","MAY","JUN","JUL","AGO","SEP","OCT","NOV","DIC"],r=new Date(e*1e3),t=Ze(r,n),i=parseInt(t.month,10)-1,s=o[i]||t.month,c=t.dayPeriod?t.dayPeriod.toUpperCase().replace(/\./g,""):"";return`${t.day}/${s}/${t.year} - ${t.hour}:${t.minute} ${c}`}function Oo(e,n=ae){if(!e)return"";const o=new Date(e*1e3),t=new Intl.DateTimeFormat("es-MX",{timeZone:n,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",hour12:!1}).formatToParts(o).reduce((i,s)=>(i[s.type]=s.value,i),{});return`${t.year}-${t.month}-${t.day} ${t.hour}:${t.minute}`}function Mo(e,n=ae){return Xe(e,n).split(" - ")[0]}exports.ButtonGal=Je;exports.CheckBoxGal=_n;exports.DropDownGal=Dn;exports.InputFileGal=ao;exports.InputRadioGal=yo;exports.InputTextGal=un;exports.TIMEZONES=So;exports.TextAreaGal=No;exports.convertToUnix=Co;exports.unixToDate=Do;exports.unixToDateTime=Oo;exports.unixToDateTimeString=Xe;exports.unixToStringYMD=Mo;exports.useOnClickOutside=He;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('./index.css');const l=require("react/jsx-runtime"),b=require("react");function en(e,t){const o=e.icons,r=e.aliases||Object.create(null),n=Object.create(null);function i(s){if(o[s])return n[s]=[];if(!(s in n)){n[s]=null;const c=r[s]&&r[s].parent,a=c&&i(c);a&&(n[s]=[c].concat(a))}return n[s]}return Object.keys(o).concat(Object.keys(r)).forEach(i),n}const Me=Object.freeze({left:0,top:0,width:16,height:16}),se=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),be=Object.freeze({...Me,...se}),me=Object.freeze({...be,body:"",hidden:!1});function nn(e,t){const o={};!e.hFlip!=!t.hFlip&&(o.hFlip=!0),!e.vFlip!=!t.vFlip&&(o.vFlip=!0);const r=((e.rotate||0)+(t.rotate||0))%4;return r&&(o.rotate=r),o}function Ie(e,t){const o=nn(e,t);for(const r in me)r in se?r in e&&!(r in o)&&(o[r]=se[r]):r in t?o[r]=t[r]:r in e&&(o[r]=e[r]);return o}function tn(e,t,o){const r=e.icons,n=e.aliases||Object.create(null);let i={};function s(c){i=Ie(r[c]||n[c],i)}return s(t),o.forEach(s),Ie(e,i)}function Pe(e,t){const o=[];if(typeof e!="object"||typeof e.icons!="object")return o;e.not_found instanceof Array&&e.not_found.forEach(n=>{t(n,null),o.push(n)});const r=en(e);for(const n in r){const i=r[n];i&&(t(n,tn(e,n,i)),o.push(n))}return o}const on={provider:"",aliases:{},not_found:{},...Me};function de(e,t){for(const o in t)if(o in e&&typeof e[o]!=typeof t[o])return!1;return!0}function Ae(e){if(typeof e!="object"||e===null)return null;const t=e;if(typeof t.prefix!="string"||!e.icons||typeof e.icons!="object"||!de(e,on))return null;const o=t.icons;for(const n in o){const i=o[n];if(!n||typeof i.body!="string"||!de(i,me))return null}const r=t.aliases||Object.create(null);for(const n in r){const i=r[n],s=i.parent;if(!n||typeof s!="string"||!o[s]&&!r[s]||!de(i,me))return null}return t}const $e=Object.create(null);function rn(e,t){return{provider:e,prefix:t,icons:Object.create(null),missing:new Set}}function J(e,t){const o=$e[e]||($e[e]=Object.create(null));return o[t]||(o[t]=rn(e,t))}function Fe(e,t){return Ae(t)?Pe(t,(o,r)=>{r?e.icons[o]=r:e.missing.add(o)}):[]}function sn(e,t,o){try{if(typeof o.body=="string")return e.icons[t]={...o},!0}catch{}return!1}const Re=/^[a-z0-9]+(-[a-z0-9]+)*$/,ce=(e,t,o,r="")=>{const n=e.split(":");if(e.slice(0,1)==="@"){if(n.length<2||n.length>3)return null;r=n.shift().slice(1)}if(n.length>3||!n.length)return null;if(n.length>1){const c=n.pop(),a=n.pop(),u={provider:n.length>0?n[0]:r,prefix:a,name:c};return t&&!re(u)?null:u}const i=n[0],s=i.split("-");if(s.length>1){const c={provider:r,prefix:s.shift(),name:s.join("-")};return t&&!re(c)?null:c}if(o&&r===""){const c={provider:r,prefix:"",name:i};return t&&!re(c,o)?null:c}return null},re=(e,t)=>e?!!((t&&e.prefix===""||e.prefix)&&e.name):!1;let ne=!1;function Le(e){return typeof e=="boolean"&&(ne=e),ne}function we(e){const t=typeof e=="string"?ce(e,!0,ne):e;if(t){const o=J(t.provider,t.prefix),r=t.name;return o.icons[r]||(o.missing.has(r)?null:void 0)}}function cn(e,t){const o=ce(e,!0,ne);if(!o)return!1;const r=J(o.provider,o.prefix);return t?sn(r,o.name,t):(r.missing.add(o.name),!0)}function an(e,t){if(typeof e!="object")return!1;if(typeof t!="string"&&(t=e.provider||""),ne&&!t&&!e.prefix){let n=!1;return Ae(e)&&(e.prefix="",Pe(e,(i,s)=>{cn(i,s)&&(n=!0)})),n}const o=e.prefix;if(!re({prefix:o,name:"a"}))return!1;const r=J(t,o);return!!Fe(r,e)}const Be=Object.freeze({width:null,height:null}),ze=Object.freeze({...Be,...se}),ln=/(-?[0-9.]*[0-9]+[0-9.]*)/g,un=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function Te(e,t,o){if(t===1)return e;if(o=o||100,typeof e=="number")return Math.ceil(e*t*o)/o;if(typeof e!="string")return e;const r=e.split(ln);if(r===null||!r.length)return e;const n=[];let i=r.shift(),s=un.test(i);for(;;){if(s){const c=parseFloat(i);isNaN(c)?n.push(i):n.push(Math.ceil(c*t*o)/o)}else n.push(i);if(i=r.shift(),i===void 0)return n.join("");s=!s}}function fn(e,t="defs"){let o="";const r=e.indexOf("<"+t);for(;r>=0;){const n=e.indexOf(">",r),i=e.indexOf("</"+t);if(n===-1||i===-1)break;const s=e.indexOf(">",i);if(s===-1)break;o+=e.slice(n+1,i).trim(),e=e.slice(0,r).trim()+e.slice(s+1)}return{defs:o,content:e}}function dn(e,t){return e?"<defs>"+e+"</defs>"+t:t}function pn(e,t,o){const r=fn(e);return dn(r.defs,t+r.content+o)}const hn=e=>e==="unset"||e==="undefined"||e==="none";function mn(e,t){const o={...be,...e},r={...ze,...t},n={left:o.left,top:o.top,width:o.width,height:o.height};let i=o.body;[o,r].forEach(y=>{const p=[],h=y.hFlip,T=y.vFlip;let v=y.rotate;h?T?v+=2:(p.push("translate("+(n.width+n.left).toString()+" "+(0-n.top).toString()+")"),p.push("scale(-1 1)"),n.top=n.left=0):T&&(p.push("translate("+(0-n.left).toString()+" "+(n.height+n.top).toString()+")"),p.push("scale(1 -1)"),n.top=n.left=0);let j;switch(v<0&&(v-=Math.floor(v/4)*4),v=v%4,v){case 1:j=n.height/2+n.top,p.unshift("rotate(90 "+j.toString()+" "+j.toString()+")");break;case 2:p.unshift("rotate(180 "+(n.width/2+n.left).toString()+" "+(n.height/2+n.top).toString()+")");break;case 3:j=n.width/2+n.left,p.unshift("rotate(-90 "+j.toString()+" "+j.toString()+")");break}v%2===1&&(n.left!==n.top&&(j=n.left,n.left=n.top,n.top=j),n.width!==n.height&&(j=n.width,n.width=n.height,n.height=j)),p.length&&(i=pn(i,'<g transform="'+p.join(" ")+'">',"</g>"))});const s=r.width,c=r.height,a=n.width,u=n.height;let f,d;s===null?(d=c===null?"1em":c==="auto"?u:c,f=Te(d,a/u)):(f=s==="auto"?a:s,d=c===null?Te(f,u/a):c==="auto"?u:c);const g={},m=(y,p)=>{hn(p)||(g[y]=p.toString())};m("width",f),m("height",d);const x=[n.left,n.top,a,u];return g.viewBox=x.join(" "),{attributes:g,viewBox:x,body:i}}const gn=/\sid="(\S+)"/g,xn="IconifyId"+Date.now().toString(16)+(Math.random()*16777216|0).toString(16);let _n=0;function bn(e,t=xn){const o=[];let r;for(;r=gn.exec(e);)o.push(r[1]);if(!o.length)return e;const n="suffix"+(Math.random()*16777216|Date.now()).toString(16);return o.forEach(i=>{const s=typeof t=="function"?t(i):t+(_n++).toString(),c=i.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");e=e.replace(new RegExp('([#;"])('+c+')([")]|\\.[a-z])',"g"),"$1"+s+n+"$3")}),e=e.replace(new RegExp(n,"g"),""),e}const ge=Object.create(null);function yn(e,t){ge[e]=t}function xe(e){return ge[e]||ge[""]}function ye(e){let t;if(typeof e.resources=="string")t=[e.resources];else if(t=e.resources,!(t instanceof Array)||!t.length)return null;return{resources:t,path:e.path||"/",maxURL:e.maxURL||500,rotate:e.rotate||750,timeout:e.timeout||5e3,random:e.random===!0,index:e.index||0,dataAfterTimeout:e.dataAfterTimeout!==!1}}const ve=Object.create(null),V=["https://api.simplesvg.com","https://api.unisvg.com"],ie=[];for(;V.length>0;)V.length===1||Math.random()>.5?ie.push(V.shift()):ie.push(V.pop());ve[""]=ye({resources:["https://api.iconify.design"].concat(ie)});function vn(e,t){const o=ye(t);return o===null?!1:(ve[e]=o,!0)}function je(e){return ve[e]}const jn=()=>{let e;try{if(e=fetch,typeof e=="function")return e}catch{}};let Ee=jn();function In(e,t){const o=je(e);if(!o)return 0;let r;if(!o.maxURL)r=0;else{let n=0;o.resources.forEach(s=>{n=Math.max(n,s.length)});const i=t+".json?icons=";r=o.maxURL-n-o.path.length-i.length}return r}function $n(e){return e===404}const wn=(e,t,o)=>{const r=[],n=In(e,t),i="icons";let s={type:i,provider:e,prefix:t,icons:[]},c=0;return o.forEach((a,u)=>{c+=a.length+1,c>=n&&u>0&&(r.push(s),s={type:i,provider:e,prefix:t,icons:[]},c=a.length),s.icons.push(a)}),r.push(s),r};function Tn(e){if(typeof e=="string"){const t=je(e);if(t)return t.path}return"/"}const En=(e,t,o)=>{if(!Ee){o("abort",424);return}let r=Tn(t.provider);switch(t.type){case"icons":{const i=t.prefix,c=t.icons.join(","),a=new URLSearchParams({icons:c});r+=i+".json?"+a.toString();break}case"custom":{const i=t.uri;r+=i.slice(0,1)==="/"?i.slice(1):i;break}default:o("abort",400);return}let n=503;Ee(e+r).then(i=>{const s=i.status;if(s!==200){setTimeout(()=>{o($n(s)?"abort":"next",s)});return}return n=501,i.json()}).then(i=>{if(typeof i!="object"||i===null){setTimeout(()=>{i===404?o("abort",i):o("next",n)});return}setTimeout(()=>{o("success",i)})}).catch(()=>{o("next",n)})},Nn={prepare:wn,send:En};function Ge(e,t){e.forEach(o=>{const r=o.loaderCallbacks;r&&(o.loaderCallbacks=r.filter(n=>n.id!==t))})}function Sn(e){e.pendingCallbacksFlag||(e.pendingCallbacksFlag=!0,setTimeout(()=>{e.pendingCallbacksFlag=!1;const t=e.loaderCallbacks?e.loaderCallbacks.slice(0):[];if(!t.length)return;let o=!1;const r=e.provider,n=e.prefix;t.forEach(i=>{const s=i.icons,c=s.pending.length;s.pending=s.pending.filter(a=>{if(a.prefix!==n)return!0;const u=a.name;if(e.icons[u])s.loaded.push({provider:r,prefix:n,name:u});else if(e.missing.has(u))s.missing.push({provider:r,prefix:n,name:u});else return o=!0,!0;return!1}),s.pending.length!==c&&(o||Ge([e],i.id),i.callback(s.loaded.slice(0),s.missing.slice(0),s.pending.slice(0),i.abort))})}))}let kn=0;function Cn(e,t,o){const r=kn++,n=Ge.bind(null,o,r);if(!t.pending.length)return n;const i={id:r,icons:t,callback:e,abort:n};return o.forEach(s=>{(s.loaderCallbacks||(s.loaderCallbacks=[])).push(i)}),n}function Dn(e){const t={loaded:[],missing:[],pending:[]},o=Object.create(null);e.sort((n,i)=>n.provider!==i.provider?n.provider.localeCompare(i.provider):n.prefix!==i.prefix?n.prefix.localeCompare(i.prefix):n.name.localeCompare(i.name));let r={provider:"",prefix:"",name:""};return e.forEach(n=>{if(r.name===n.name&&r.prefix===n.prefix&&r.provider===n.provider)return;r=n;const i=n.provider,s=n.prefix,c=n.name,a=o[i]||(o[i]=Object.create(null)),u=a[s]||(a[s]=J(i,s));let f;c in u.icons?f=t.loaded:s===""||u.missing.has(c)?f=t.missing:f=t.pending;const d={provider:i,prefix:s,name:c};f.push(d)}),t}function On(e,t=!0,o=!1){const r=[];return e.forEach(n=>{const i=typeof n=="string"?ce(n,t,o):n;i&&r.push(i)}),r}const Mn={resources:[],index:0,timeout:2e3,rotate:750,random:!1,dataAfterTimeout:!1};function Pn(e,t,o,r){const n=e.resources.length,i=e.random?Math.floor(Math.random()*n):e.index;let s;if(e.random){let _=e.resources.slice(0);for(s=[];_.length>1;){const I=Math.floor(Math.random()*_.length);s.push(_[I]),_=_.slice(0,I).concat(_.slice(I+1))}s=s.concat(_)}else s=e.resources.slice(i).concat(e.resources.slice(0,i));const c=Date.now();let a="pending",u=0,f,d=null,g=[],m=[];typeof r=="function"&&m.push(r);function x(){d&&(clearTimeout(d),d=null)}function y(){a==="pending"&&(a="aborted"),x(),g.forEach(_=>{_.status==="pending"&&(_.status="aborted")}),g=[]}function p(_,I){I&&(m=[]),typeof _=="function"&&m.push(_)}function h(){return{startTime:c,payload:t,status:a,queriesSent:u,queriesPending:g.length,subscribe:p,abort:y}}function T(){a="failed",m.forEach(_=>{_(void 0,f)})}function v(){g.forEach(_=>{_.status==="pending"&&(_.status="aborted")}),g=[]}function j(_,I,$){const S=I!=="success";switch(g=g.filter(k=>k!==_),a){case"pending":break;case"failed":if(S||!e.dataAfterTimeout)return;break;default:return}if(I==="abort"){f=$,T();return}if(S){f=$,g.length||(s.length?N():T());return}if(x(),v(),!e.random){const k=e.resources.indexOf(_.resource);k!==-1&&k!==e.index&&(e.index=k)}a="completed",m.forEach(k=>{k($)})}function N(){if(a!=="pending")return;x();const _=s.shift();if(_===void 0){if(g.length){d=setTimeout(()=>{x(),a==="pending"&&(v(),T())},e.timeout);return}T();return}const I={status:"pending",resource:_,callback:($,S)=>{j(I,$,S)}};g.push(I),u++,d=setTimeout(N,e.rotate),o(_,t,I.callback)}return setTimeout(N),h}function qe(e){const t={...Mn,...e};let o=[];function r(){o=o.filter(c=>c().status==="pending")}function n(c,a,u){const f=Pn(t,c,a,(d,g)=>{r(),u&&u(d,g)});return o.push(f),f}function i(c){return o.find(a=>c(a))||null}return{query:n,find:i,setIndex:c=>{t.index=c},getIndex:()=>t.index,cleanup:r}}function Ne(){}const pe=Object.create(null);function An(e){if(!pe[e]){const t=je(e);if(!t)return;const o=qe(t),r={config:t,redundancy:o};pe[e]=r}return pe[e]}function Fn(e,t,o){let r,n;if(typeof e=="string"){const i=xe(e);if(!i)return o(void 0,424),Ne;n=i.send;const s=An(e);s&&(r=s.redundancy)}else{const i=ye(e);if(i){r=qe(i);const s=e.resources?e.resources[0]:"",c=xe(s);c&&(n=c.send)}}return!r||!n?(o(void 0,424),Ne):r.query(t,n,o)().abort}function Se(){}function Rn(e){e.iconsLoaderFlag||(e.iconsLoaderFlag=!0,setTimeout(()=>{e.iconsLoaderFlag=!1,Sn(e)}))}function Ln(e){const t=[],o=[];return e.forEach(r=>{(r.match(Re)?t:o).push(r)}),{valid:t,invalid:o}}function K(e,t,o){function r(){const n=e.pendingIcons;t.forEach(i=>{n&&n.delete(i),e.icons[i]||e.missing.add(i)})}if(o&&typeof o=="object")try{if(!Fe(e,o).length){r();return}}catch(n){console.error(n)}r(),Rn(e)}function ke(e,t){e instanceof Promise?e.then(o=>{t(o)}).catch(()=>{t(null)}):t(e)}function Bn(e,t){e.iconsToLoad?e.iconsToLoad=e.iconsToLoad.concat(t).sort():e.iconsToLoad=t,e.iconsQueueFlag||(e.iconsQueueFlag=!0,setTimeout(()=>{e.iconsQueueFlag=!1;const{provider:o,prefix:r}=e,n=e.iconsToLoad;if(delete e.iconsToLoad,!n||!n.length)return;const i=e.loadIcon;if(e.loadIcons&&(n.length>1||!i)){ke(e.loadIcons(n,r,o),f=>{K(e,n,f)});return}if(i){n.forEach(f=>{const d=i(f,r,o);ke(d,g=>{const m=g?{prefix:r,icons:{[f]:g}}:null;K(e,[f],m)})});return}const{valid:s,invalid:c}=Ln(n);if(c.length&&K(e,c,null),!s.length)return;const a=r.match(Re)?xe(o):null;if(!a){K(e,s,null);return}a.prepare(o,r,s).forEach(f=>{Fn(o,f,d=>{K(e,f.icons,d)})})}))}const zn=(e,t)=>{const o=On(e,!0,Le()),r=Dn(o);if(!r.pending.length){let a=!0;return t&&setTimeout(()=>{a&&t(r.loaded,r.missing,r.pending,Se)}),()=>{a=!1}}const n=Object.create(null),i=[];let s,c;return r.pending.forEach(a=>{const{provider:u,prefix:f}=a;if(f===c&&u===s)return;s=u,c=f,i.push(J(u,f));const d=n[u]||(n[u]=Object.create(null));d[f]||(d[f]=[])}),r.pending.forEach(a=>{const{provider:u,prefix:f,name:d}=a,g=J(u,f),m=g.pendingIcons||(g.pendingIcons=new Set);m.has(d)||(m.add(d),n[u][f].push(d))}),i.forEach(a=>{const u=n[a.provider][a.prefix];u.length&&Bn(a,u)}),t?Cn(t,r,i):Se};function Gn(e,t){const o={...e};for(const r in t){const n=t[r],i=typeof n;r in Be?(n===null||n&&(i==="string"||i==="number"))&&(o[r]=n):i===typeof o[r]&&(o[r]=r==="rotate"?n%4:n)}return o}const qn=/[\s,]+/;function Un(e,t){t.split(qn).forEach(o=>{switch(o.trim()){case"horizontal":e.hFlip=!0;break;case"vertical":e.vFlip=!0;break}})}function Yn(e,t=0){const o=e.replace(/^-?[0-9.]*/,"");function r(n){for(;n<0;)n+=4;return n%4}if(o===""){const n=parseInt(e);return isNaN(n)?0:r(n)}else if(o!==e){let n=0;switch(o){case"%":n=25;break;case"deg":n=90}if(n){let i=parseFloat(e.slice(0,e.length-o.length));return isNaN(i)?0:(i=i/n,i%1===0?r(i):0)}}return t}function Qn(e,t){let o=e.indexOf("xlink:")===-1?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(const r in t)o+=" "+r+'="'+t[r]+'"';return'<svg xmlns="http://www.w3.org/2000/svg"'+o+">"+e+"</svg>"}function Hn(e){return e.replace(/"/g,"'").replace(/%/g,"%25").replace(/#/g,"%23").replace(/</g,"%3C").replace(/>/g,"%3E").replace(/\s+/g," ")}function Wn(e){return"data:image/svg+xml,"+Hn(e)}function Jn(e){return'url("'+Wn(e)+'")'}let ee;function Zn(){try{ee=window.trustedTypes.createPolicy("iconify",{createHTML:e=>e})}catch{ee=null}}function Xn(e){return ee===void 0&&Zn(),ee?ee.createHTML(e):e}const Ue={...ze,inline:!1},Vn={xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink","aria-hidden":!0,role:"img"},Kn={display:"inline-block"},_e={backgroundColor:"currentColor"},Ye={backgroundColor:"transparent"},Ce={Image:"var(--svg)",Repeat:"no-repeat",Size:"100% 100%"},De={WebkitMask:_e,mask:_e,background:Ye};for(const e in De){const t=De[e];for(const o in Ce)t[e+o]=Ce[o]}const et={...Ue,inline:!0};function Oe(e){return e+(e.match(/^[-0-9.]+$/)?"px":"")}const nt=(e,t,o)=>{const r=t.inline?et:Ue,n=Gn(r,t),i=t.mode||"svg",s={},c=t.style||{},a={...i==="svg"?Vn:{}};if(o){const p=ce(o,!1,!0);if(p){const h=["iconify"],T=["provider","prefix"];for(const v of T)p[v]&&h.push("iconify--"+p[v]);a.className=h.join(" ")}}for(let p in t){const h=t[p];if(h!==void 0)switch(p){case"icon":case"style":case"children":case"onLoad":case"mode":case"ssr":case"fallback":break;case"_ref":a.ref=h;break;case"className":a[p]=(a[p]?a[p]+" ":"")+h;break;case"inline":case"hFlip":case"vFlip":n[p]=h===!0||h==="true"||h===1;break;case"flip":typeof h=="string"&&Un(n,h);break;case"color":s.color=h;break;case"rotate":typeof h=="string"?n[p]=Yn(h):typeof h=="number"&&(n[p]=h);break;case"ariaHidden":case"aria-hidden":h!==!0&&h!=="true"&&delete a["aria-hidden"];break;default:r[p]===void 0&&(a[p]=h)}}const u=mn(e,n),f=u.attributes;if(n.inline&&(s.verticalAlign="-0.125em"),i==="svg"){a.style={...s,...c},Object.assign(a,f);let p=0,h=t.id;return typeof h=="string"&&(h=h.replace(/-/g,"_")),a.dangerouslySetInnerHTML={__html:Xn(bn(u.body,h?()=>h+"ID"+p++:"iconifyReact"))},b.createElement("svg",a)}const{body:d,width:g,height:m}=e,x=i==="mask"||(i==="bg"?!1:d.indexOf("currentColor")!==-1),y=Qn(d,{...f,width:g+"",height:m+""});return a.style={...s,"--svg":Jn(y),width:Oe(f.width),height:Oe(f.height),...Kn,...x?_e:Ye,...c},b.createElement("span",a)};Le(!0);yn("",Nn);if(typeof document<"u"&&typeof window<"u"){const e=window;if(e.IconifyPreload!==void 0){const t=e.IconifyPreload,o="Invalid IconifyPreload syntax.";typeof t=="object"&&t!==null&&(t instanceof Array?t:[t]).forEach(r=>{try{(typeof r!="object"||r===null||r instanceof Array||typeof r.icons!="object"||typeof r.prefix!="string"||!an(r))&&console.error(o)}catch{console.error(o)}})}if(e.IconifyProviders!==void 0){const t=e.IconifyProviders;if(typeof t=="object"&&t!==null)for(let o in t){const r="IconifyProviders["+o+"] is invalid.";try{const n=t[o];if(typeof n!="object"||!n||n.resources===void 0)continue;vn(o,n)||console.error(r)}catch{console.error(r)}}}}function Qe(e){const[t,o]=b.useState(!!e.ssr),[r,n]=b.useState({});function i(m){if(m){const x=e.icon;if(typeof x=="object")return{name:"",data:x};const y=we(x);if(y)return{name:x,data:y}}return{name:""}}const[s,c]=b.useState(i(!!e.ssr));function a(){const m=r.callback;m&&(m(),n({}))}function u(m){if(JSON.stringify(s)!==JSON.stringify(m))return a(),c(m),!0}function f(){var m;const x=e.icon;if(typeof x=="object"){u({name:"",data:x});return}const y=we(x);if(u({name:x,data:y}))if(y===void 0){const p=zn([x],f);n({callback:p})}else y&&((m=e.onLoad)===null||m===void 0||m.call(e,x))}b.useEffect(()=>(o(!0),a),[]),b.useEffect(()=>{t&&f()},[e.icon,t]);const{name:d,data:g}=s;return g?nt({...be,...g},e,d):e.children?e.children:e.fallback?e.fallback:b.createElement("span",{})}const D=b.forwardRef((e,t)=>Qe({...e,_ref:t}));b.forwardRef((e,t)=>Qe({inline:!0,...e,_ref:t}));const tt="_container_j1lh3_26",ot="_title_j1lh3_46",rt="_containerInputError_j1lh3_50",it="_containerInput_j1lh3_50",st="_inputElement_j1lh3_69",ct="_errorMessage_j1lh3_80",at="_icon_j1lh3_92",lt="_containerCustomIcon_j1lh3_99",A={container:tt,title:ot,containerInputError:rt,containerInput:it,inputElement:st,errorMessage:ct,icon:at,containerCustomIcon:lt},te=e=>{switch(e){case"none":return 0;case"sm":return 5;case"md":return 10;case"lg":return 15;case"full":return 9999;default:return 0}},ut=b.forwardRef(function({placeholder:t,value:o,setValue:r,label:n,typeInput:i,HorV:s,errorMessage:c,rounded:a,width:u,height:f,border:d,shadow:g,textSize:m,textColor:x,bgColor:y,customContainerClass:p,customInputClass:h,customIconRClass:T,customIconLClass:v,seeIconLeft:j=!0,seeIconRight:N,iconColorL:_,iconColorR:I,iconColorPass:$,iconSizeL:S,iconSizeR:k,iconSizePass:P,iconLeft:R,iconRight:L,customIconLeft:B,customIconRight:U,args:H},W){const[z,O]=b.useState(!1),G=b.useMemo(()=>te(a??"full"),[a]);return l.jsxs("div",{className:A.container,style:{flexDirection:s==="horizontal"?"row":"column"},children:[l.jsx("label",{className:A.title,style:{fontSize:m,color:x,height:s==="horizontal"?35:"auto",display:s==="horizontal"?"flex":"block",alignItems:s==="horizontal"?"center":"initial",marginRight:s==="horizontal"?10:0,marginBottom:s==="vertical"?5:0},children:n}),l.jsxs("div",{className:A.containerInputError,children:[l.jsxs("div",{className:`${A.containerInput} ${p}`,style:{borderRadius:G,width:!u&&i==="datetime-local"?"auto":u,height:f,border:d||d===void 0?"":"none",boxShadow:g?"0 0 5px #00000075":"",backgroundColor:y},children:[B?l.jsx("div",{className:`${A.containerCustomIcon} ${v}`,children:B}):j&&l.jsx(D,{icon:R??"mi:user",className:`${A.icon} ${v}`,style:{color:_,fontSize:S}}),l.jsx("input",{ref:W,className:`${A.inputElement} ${h}`,style:{fontSize:m,color:x},type:i==="password"&&z?"text":i,placeholder:t,value:o,onChange:Y=>r?.(Y.target.value),...H}),i==="password"&&l.jsx(D,{onClick:()=>O(!z),icon:z?"fluent:eye-20-filled":"fluent:eye-hide-20-filled",className:`${A.icon}`,style:{color:$,fontSize:P,marginRight:10,cursor:i=="password"?"pointer":"default"}}),U?l.jsx("div",{className:`${A.containerCustomIcon} ${T}`,children:U}):N&&l.jsx(D,{icon:L??"mi:user",className:`${A.icon} ${T}`,style:{color:I,fontSize:k}})]}),c!==""&&l.jsx("p",{className:A.errorMessage,children:c})]})]})}),ft="_container_5daeb_26",dt="_containerInputError_5daeb_50",pt="_containerInput_5daeb_50",ht="_inputElement_5daeb_69",mt="_errorMessage_5daeb_80",gt="_icon_5daeb_92",xt="_containerCustomIcon_5daeb_99",Q={container:ft,containerInputError:dt,containerInput:pt,inputElement:ht,errorMessage:mt,icon:gt,containerCustomIcon:xt},_t=b.forwardRef(function({label:t,value:o,errorMessage:r,textSize:n,textColor:i,setValue:s,useLinkable:c,link:a,iconSize:u,seeIcon:f,icon:d,iconColor:g,customInputClass:m,customLabelClass:x,customIconClass:y,customIcon:p,args:h},T){const v=b.useId();return l.jsx("div",{ref:T,className:Q.container,children:l.jsxs("div",{className:Q.containerInputError,children:[l.jsxs("div",{className:Q.containerInput,children:[l.jsx("input",{className:`${Q.inputElement} ${m}`,style:{fontSize:n,color:i},type:"checkbox",checked:o,onChange:j=>s(j.target.checked),...h}),p?l.jsx("div",{className:`${Q.containerCustomIcon} ${y}`,children:p}):f&&l.jsx(D,{icon:d??"mi:user",className:`${Q.icon} ${y}`,style:{color:g,fontSize:u}}),c?l.jsx("a",{className:x,href:a||"#",style:{fontSize:n,color:i,textDecoration:"underline"},children:t}):l.jsx("label",{htmlFor:v,className:x,style:{fontSize:n,color:i},children:t})]}),r!==""&&l.jsx("p",{className:Q.errorMessage,children:r})]})})}),bt="_container_v1dbe_26",yt="_containerInputError_v1dbe_51",vt="_containerInput_v1dbe_51",jt="_errorMessage_v1dbe_81",It="_icon_v1dbe_93",$t="_containerCustomIcon_v1dbe_100",wt="_containerInputAndOptions_v1dbe_100",Tt="_containerOptions_v1dbe_100",Et="_optionElement_v1dbe_100",Nt="_containerIconOption_v1dbe_100",St="_containerLabel_v1dbe_112",kt="_textOption_v1dbe_142",Ct="_iconArrow_v1dbe_150",E={container:bt,containerInputError:yt,containerInput:vt,errorMessage:jt,icon:It,containerCustomIcon:$t,containerInputAndOptions:wt,containerOptions:Tt,optionElement:Et,containerIconOption:Nt,containerLabel:St,textOption:kt,iconArrow:Ct},He=(e,t)=>{b.useEffect(()=>{const o=r=>{const n=e.current;!n||n.contains(r.target)||t(r)};return document.addEventListener("mousedown",o),document.addEventListener("touchstart",o),()=>{document.removeEventListener("mousedown",o),document.removeEventListener("touchstart",o)}},[e,t])},Dt=b.forwardRef(function({label:t,value:o,setValue:r,options:n,placeholder:i,errorMessage:s,orientation:c="bottom",iconInRight:a=!1,rounded:u,border:f=!0,textSize:d="1.4em",textColor:g="#000",labelSize:m="1.4em",labelColor:x="#000",width:y=250,height:p=40,bgColor:h,shadow:T=!1,icon:v,iconSize:j=20,iconsOptionsSize:N=20,seeIcon:_=!1,seeOptionsIcons:I=!1,iconsColor:$="#000",customIcon:S,customContainerClass:k,customInputClass:P,customLabelClass:R,customIconClass:L,customOptionClass:B},U){const[H,W]=b.useState(null),[z,O]=b.useState(!1),G=b.useRef(null),Y={valueOption:null,text:i??"Selecciona una opción",icon:"hugeicons:cursor-magic-selection-04"};He(G,()=>{O(!1)}),b.useEffect(()=>{let C=[Y,...n];W(C)},[]);const Z=b.useMemo(()=>te(u??"lg"),[u]);return l.jsxs("div",{ref:U,className:`${E.container} ${k}`,children:[l.jsxs("div",{className:E.containerLabel,style:{flexDirection:a?"row-reverse":"row",justifyContent:a?"flex-end":"flex-start"},children:[S?l.jsx("div",{className:`${E.containerCustomIcon} ${L}`,style:{height:j},children:S}):_&&l.jsx(D,{icon:v??"icon-park-outline:dot",className:`${E.icon} ${L}`,style:{color:$,fontSize:j}}),l.jsx("label",{className:R,style:{fontSize:m,color:x},children:t})]}),l.jsxs("div",{className:E.containerInputError,children:[l.jsxs("div",{ref:G,className:E.containerInputAndOptions,children:[l.jsxs("div",{onClick:C=>{C.stopPropagation(),O(!z)},className:`${E.containerInput} ${P}`,style:{width:y,height:p,border:f?"":"none",boxShadow:T?"0 0 10px #00000050":"",borderRadius:Z,backgroundColor:h},children:[I&&o?.valueOption&&l.jsx(l.Fragment,{children:o?.customIcon?l.jsx("div",{className:E.containerCustomIcon,children:o?.customIcon}):o?.icon&&l.jsx(D,{icon:o.icon,className:E.icon,style:{color:o.iconColor?o.iconColor:$,fontSize:N}})}),l.jsx("p",{className:E.textOption,style:{fontSize:m,color:x,fontWeight:o?.valueOption?"bold":""},children:o?.text?o.text:Y.text}),l.jsx(D,{icon:"ri:arrow-down-s-line",className:`${E.icon} ${E.iconArrow}`})]}),z&&l.jsx("div",{className:E.containerOptions,style:{top:c==="bottom"?"calc(100% + 10px)":c==="left"||c==="right"?0:"",left:c==="right"?"calc(100% + 10px)":c==="top"||c==="bottom"?0:"",bottom:c==="top"?"calc(100% + 10px)":"",right:c==="left"?"calc(100% + 10px)":""},children:H?.map((C,le)=>l.jsxs("div",{onClick:X=>{X.stopPropagation(),O(!1),r(C)},className:`${E.optionElement} ${B}`,children:[I&&l.jsx("div",{className:`${E.containerIconOption}`,children:C.customIcon?C.customIcon:I&&l.jsx(D,{icon:C.icon??"icon-park-outline:dot",className:`${E.icon} ${E.containerIconOption}`,style:{color:C.iconColor?C.iconColor:$,fontSize:N}})}),l.jsx("p",{className:E.textOption,style:{fontSize:d,color:g},children:C.text?C.text:Y.text})]},le))})]}),s!==""&&l.jsx("p",{className:E.errorMessage,children:s})]})]})}),Ot="_container_1nag4_26",Mt="_containerInputError_1nag4_50",Pt="_errorMessage_1nag4_80",At="_icon_1nag4_92",Ft="_containerCustomIcon_1nag4_99",Rt="_containerInputFile_1nag4_114",Lt="_containerSelectedFile_1nag4_114",Bt="_textInput_1nag4_132",zt="_inputFile_1nag4_142",Gt="_fileName_1nag4_158",qt="_backdrop_1nag4_175",M={container:Ot,containerInputError:Mt,errorMessage:Pt,icon:At,containerCustomIcon:Ft,containerInputFile:Rt,containerSelectedFile:Lt,textInput:Bt,inputFile:zt,fileName:Gt,backdrop:qt},he={images:{common:"image/png, image/jpeg, image/gif, image/webp",png:"image/png",jpg:"image/jpeg, image/jpg",gif:"image/gif",svg:"image/svg+xml",webp:"image/webp",avif:"image/avif",ico:"image/x-icon, image/vnd.microsoft.icon",tiff:"image/tiff",bmp:"image/bmp",heic:"image/heic, image/heif"},docs:{pdf:"application/pdf",word:".doc, .docx, application/msword, application/vnd.openxmlformats-officedocument.wordprocessingml.document",excel:".xls, .xlsx, application/vnd.ms-excel, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",powerpoint:".ppt, .pptx, application/vnd.ms-powerpoint, application/vnd.openxmlformats-officedocument.presentationml.presentation",odt:"application/vnd.oasis.opendocument.text",ods:"application/vnd.oasis.opendocument.spreadsheet",odp:"application/vnd.oasis.opendocument.presentation",txt:"text/plain",rtf:"application/rtf",csv:"text/csv",markdown:"text/markdown, .md",epub:"application/epub+zip"},archives:{zip:"application/zip, application/x-zip-compressed",rar:"application/x-rar-compressed, .rar",sevenZ:"application/x-7z-compressed",tar:"application/x-tar",gz:"application/gzip",iso:"application/x-iso9660-image, .iso"},media:{audio:"audio/*",video:"video/*",mp3:"audio/mpeg",wav:"audio/wav",ogg:"audio/ogg, video/ogg",mp4:"video/mp4",webm:"video/webm",mov:"video/quicktime",avi:"video/x-msvideo"},fonts:{woff:"font/woff",woff2:"font/woff2",ttf:"font/ttf, application/x-font-ttf",otf:"font/otf, application/x-font-opentype",eot:"application/vnd.ms-fontobject"},code:{html:"text/html",css:"text/css",js:"text/javascript, application/javascript, .mjs",ts:"application/typescript, .ts, .tsx",json:"application/json",xml:"application/xml, text/xml",python:"text/x-python, .py",java:"text/x-java-source, .java, application/java-archive, .jar",csharp:"text/plain, .cs",cpp:"text/x-c++, .cpp, .h, .hpp",c:"text/x-c, .c",php:"application/x-httpd-php, .php",sql:"application/sql, .sql",sh:"application/x-sh, .sh",yaml:"text/yaml, .yaml, .yml"}},We=e=>{if(Array.isArray(e))return e.map(o=>We(o)).filter(o=>o!==void 0).join(", ");if(e!=="*"){if(typeof e=="string"){if(e in he){const t=he[e];return Object.values(t).join(", ")}return}if(typeof e=="object"){const t=[];return Object.keys(e).forEach(o=>{const r=e[o],n=he[o];r&&n&&r.forEach(i=>{const s=n[i];s&&t.push(s)})}),t.join(", ")}}},Ut="_btnThemeDark_1hn8j_26",Yt="_iconButton_1hn8j_58",Qt="_containerCustomIcon_1hn8j_65",Ht="_btnBorderedThemeDark_1hn8j_78",Wt="_btnThemeGreen_1hn8j_98",Jt="_btnBorderedThemeGreen_1hn8j_150",Zt="_btnThemeBlue_1hn8j_170",Xt="_btnBorderedThemeBlue_1hn8j_222",Vt="_btnThemeRed_1hn8j_242",Kt="_btnBorderedThemeRed_1hn8j_294",eo="_btnThemePurple_1hn8j_314",no="_btnBorderedThemePurple_1hn8j_366",to="_btnThemeGray_1hn8j_386",oo="_btnBorderedThemeGray_1hn8j_438",ro="_btnThemeLight_1hn8j_458",io="_btnBorderedThemeLight_1hn8j_510",so="_btnThemeYellow_1hn8j_530",co="_btnBorderedThemeYellow_1hn8j_582",oe={btnThemeDark:Ut,iconButton:Yt,containerCustomIcon:Qt,btnBorderedThemeDark:Ht,btnThemeGreen:Wt,btnBorderedThemeGreen:Jt,btnThemeBlue:Zt,btnBorderedThemeBlue:Xt,btnThemeRed:Vt,btnBorderedThemeRed:Kt,btnThemePurple:eo,btnBorderedThemePurple:no,btnThemeGray:to,btnBorderedThemeGray:oo,btnThemeLight:ro,btnBorderedThemeLight:io,btnThemeYellow:so,btnBorderedThemeYellow:co},Je=b.forwardRef(function({label:t="Texto del Botón",action:o=()=>{alert("Botón presionado")},font:r,width:n,height:i,icon:s="tabler:send",seeIcon:c=!0,textSize:a,iconColor:u,iconSize:f,styleType:d="ThemeDark",rounded:g="md",borderedStyle:m=!1,iconOn:x,padding:y,shadow:p=!1,colorShadow:h,customClassButton:T,customClassLabel:v,customClassIcon:j,customIcon:N,args:_},I){const $=b.useMemo(()=>te(g??"full"),[g]);return l.jsxs("button",{ref:I,className:`${oe[`btn${d}`]} ${m&&oe[`btnBordered${d}`]} ${T}`,style:{borderRadius:$,width:n??"auto",height:i??"auto",flexDirection:x==="left"?"row-reverse":"row",boxShadow:`${p?"0 0 7px "+(h||"#000"):""}`,padding:y},onClick:S=>{S.preventDefault(),o()},..._,children:[t&&l.jsx("p",{className:`${v}`,style:{fontSize:a,fontFamily:r},children:t}),N?l.jsx("div",{className:`${oe.containerCustomIcon} ${j}`,children:N}):c&&l.jsx(D,{icon:s,className:`${oe.iconButton} ${j}`,style:{fontSize:f,color:u}})]})}),ao=b.forwardRef(function({label:t,errorMessage:o,acceptFiles:r="*",selectedFileE:n,setSelectedFileE:i,maxMBSize:s,shadow:c=!0,textButtonCancel:a="Cancelar",width:u,height:f,bgColor:d,bgColorHover:g,labelSize:m,labelColor:x,rounded:y="md",iconSize:p=30,seeIcon:h=!0,icon:T,iconColor:v="#fff",customFIleClass:j,customSelectedClass:N,customLabelClass:_,customIconClass:I,customIcon:$,args:S},k){const P=b.useId(),R=b.useRef(0),[L,B]=b.useState(n),[U,H]=b.useState(!1),[W,z]=b.useState(null),[O,G]=b.useState(!1),Y=We(r),Z=()=>{B(null),i(null)},C=w=>{if(z(null),s){const Ke=s*1024*1024;if(w.size>Ke){z(`El archivo excede el límite de ${s} MB.`),Z();return}}B(w),i(w)},le=w=>{w.preventDefault(),w.target.files&&w.target.files[0]?C(w.target.files[0]):Z()},X=w=>{w.preventDefault(),w.stopPropagation(),R.current+=1,w.type==="dragenter"||w.type==="dragover"?G(!0):w.type==="dragleave"&&G(!1)},ue=w=>{w.preventDefault(),w.stopPropagation(),R.current-=1,R.current===0&&G(!1)},Ve=w=>{w.preventDefault(),w.stopPropagation(),G(!1),R.current=0,w.dataTransfer.files&&w.dataTransfer.files[0]&&C(w.dataTransfer.files[0])},fe=b.useMemo(()=>te(y??"lg"),[y]);return l.jsx("div",{className:M.container,children:l.jsxs("div",{className:M.containerInputError,children:[L?l.jsxs("div",{className:`${M.containerSelectedFile} ${N}`,style:{boxShadow:c?"0 0 5px #00000050":"",borderRadius:fe,width:u,height:f},children:[h&&l.jsx(D,{icon:"uim:paperclip",className:M.icon}),l.jsx("p",{className:M.fileName,children:L?.name}),l.jsx("div",{className:M.backdrop,style:{borderRadius:fe},children:l.jsx(Je,{styleType:"ThemeRed",action:Z,label:a,rounded:"full",icon:"fa:trash",iconSize:"1.4rem",iconColor:"#fff",textSize:12,padding:"7px"})})]}):l.jsxs("label",{htmlFor:P,className:`${M.containerInputFile} ${j}`,onMouseEnter:()=>H(!0),onMouseLeave:()=>H(!1),onDragEnter:X,onDragLeave:ue,onDragOver:w=>w.preventDefault(),onDrop:Ve,style:{boxShadow:c?"0 0 5px #00000050":"",borderRadius:fe,backgroundColor:O?"#fff":U?g:d,borderColor:O?d||"#6936ee":"",width:u,height:f},children:[!$||O?h&&l.jsx(D,{icon:O?"tabler:drag-drop":T??"mingcute:upload-3-fill",className:`${M.icon} ${I}`,onDragEnter:X,onDragLeave:ue,style:{color:O?d||"#6936ee":v,fontSize:p}}):l.jsx("div",{className:`${M.containerCustomIcon} ${I}`,style:{height:p??"2rem"},children:$}),l.jsx("span",{className:`${M.textInput} ${_}`,style:{fontSize:m,color:O?d||"#6936ee":x},onDragEnter:X,onDragLeave:ue,children:O?"Suelta para agregar":t??"Click o arrastra un archivo"}),l.jsx("input",{ref:k,id:P,type:"file",accept:Y,className:M.inputFile,onChange:le,...S})]}),l.jsx("p",{className:M.errorMessage,children:W||o||""})]})})}),lo="_container_sbkx2_26",uo="_containerInputError_sbkx2_50",fo="_inputElement_sbkx2_69",po="_errorMessage_sbkx2_80",ho="_icon_sbkx2_92",mo="_containerCustomIcon_sbkx2_99",go="_containerLabel_sbkx2_111",xo="_containerGroupRadio_sbkx2_127",_o="_containerRadio_sbkx2_134",F={container:lo,containerInputError:uo,inputElement:fo,errorMessage:po,icon:ho,containerCustomIcon:mo,containerLabel:go,containerGroupRadio:xo,containerRadio:_o},bo=b.forwardRef(function({label:t,labelSize:o,labelColor:r,options:n,errorMessage:i,textSize:s,textColor:c,setValue:a,name:u,HorV:f="horizontal",icon:d,iconInRight:g,iconSize:m,iconColor:x,customIcon:y,seeIcon:p=!0,customInputClass:h,customLabelClass:T,customTextClass:v,customIconLabelClass:j,customContainerRadiosClass:N},_){const I=b.useId();return l.jsxs("div",{ref:_,className:F.container,children:[l.jsxs("div",{className:F.containerLabel,style:{flexDirection:g?"row-reverse":"row",justifyContent:g?"flex-end":"flex-start"},children:[y?l.jsx("div",{className:`${F.containerCustomIcon} ${j}`,style:{height:m},children:y}):p&&l.jsx(D,{icon:d??"mi:user",className:`${F.icon} ${j}`,style:{color:x,fontSize:m}}),l.jsx("label",{style:{fontSize:o,color:r},className:v,children:t})]}),l.jsxs("div",{className:F.containerInputError,children:[l.jsx("div",{className:`${F.containerGroupRadio} ${N}`,style:{flexDirection:f==="vertical"?"column":"row",alignItems:f==="vertical"?"stretch":"center",justifyContent:f==="vertical"?"center":"flex-start"},children:n.map(($,S)=>{const k=`${I}-${S}`;return l.jsxs("div",{className:F.containerRadio,children:[l.jsx("input",{id:k,className:`${F.inputElement} ${h}`,style:{fontSize:s,color:c},type:"radio",name:u,value:$.value,onChange:P=>a(P.target.value)}),$.customIcon?l.jsx("div",{className:`${F.containerCustomIcon} ${$.customIconClass}`,children:$.customIcon}):$.seeIcon&&l.jsx(D,{icon:$.icon??"mi:user",className:`${F.icon} ${$.customIconClass}`,style:{color:$.iconColor,fontSize:m}}),l.jsx("label",{htmlFor:k,className:T,style:{fontSize:s,color:c},children:$.label})]},I+$.value)})}),i!==""&&l.jsx("p",{className:F.errorMessage,children:i})]})]})}),yo="_container_msjnc_26",vo="_containerInputError_msjnc_50",jo="_containerInput_msjnc_50",Io="_inputElement_msjnc_69",$o="_errorMessage_msjnc_80",wo="_icon_msjnc_92",To="_containerCustomIcon_msjnc_99",Eo="_containerLabel_msjnc_111",No="_counterCharacter_msjnc_142",q={container:yo,containerInputError:vo,containerInput:jo,inputElement:Io,errorMessage:$o,icon:wo,containerCustomIcon:To,containerLabel:Eo,counterCharacter:No},So=b.forwardRef(function({placeholder:t,value:o,setValue:r,label:n,errorMessage:i,seeMaxCharCounter:s=!0,maxCharacters:c=300,resize:a=!0,rounded:u,width:f=250,height:d=100,maxWidth:g=500,maxHeight:m=500,border:x,shadow:y,textSize:p,textColor:h,bgColor:T,customContainerClass:v,customTextAreaClass:j,customIconClass:N,seeIcon:_,iconInRight:I=!1,iconColor:$,iconSize:S,icon:k,customIcon:P,args:R},L){const B=b.useMemo(()=>te(u??"lg"),[u]);return l.jsxs("div",{className:q.container,children:[l.jsxs("div",{className:q.containerLabel,style:{flexDirection:I?"row-reverse":"row",justifyContent:I?"flex-end":"flex-start"},children:[P?l.jsx("div",{className:`${q.containerCustomIcon} ${N}`,style:{height:S},children:P}):_&&l.jsx(D,{icon:k??"mi:user",className:`${q.icon} ${N}`,style:{color:$,fontSize:S}}),l.jsx("label",{style:{fontSize:p,color:h},children:n})]}),l.jsxs("div",{className:q.containerInputError,children:[l.jsxs("div",{className:`${q.containerInput} ${v}`,style:{borderRadius:B,border:x||x===void 0?"":"none",boxShadow:y?"0 0 5px #00000075":"",backgroundColor:T,resize:a?"both":"none",width:f,height:d,minWidth:f,minHeight:d,maxWidth:g,maxHeight:m},children:[l.jsx("textarea",{ref:L,className:`${q.inputElement} ${j}`,style:{fontSize:p,color:h},placeholder:t,value:o,maxLength:c,onChange:U=>r?.(U.target.value),...R}),s&&l.jsxs("p",{className:q.counterCharacter,children:[o?o?.length:0,"/",c]})]}),i!==""&&l.jsx("p",{className:q.errorMessage,children:i})]})]})}),ko=["America/Mexico_City","America/New_York","America/Los_Angeles","America/Bogota","America/Argentina/Buenos_Aires","America/Sao_Paulo","Europe/Madrid","Europe/London","Europe/Paris","Asia/Tokyo","Asia/Shanghai","Australia/Sydney","UTC"],ae="America/Mexico_City";function Ze(e,t){return new Intl.DateTimeFormat("es-MX",{timeZone:t,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",hour12:!0}).formatToParts(e).reduce((r,n)=>(r[n.type]=n.value,r),{})}function Co(e){if(!e)return 0;let t;return typeof e=="string"?t=new Date(e):t=e,Math.floor(t.getTime()/1e3)}function Do(e,t=ae){if(!e)return"";const o=new Date(e*1e3),r=Ze(o,t);return`${r.year}-${r.month}-${r.day}`}function Xe(e,t=ae){if(!e)return"";const o=["ENE","FEB","MAR","ABR","MAY","JUN","JUL","AGO","SEP","OCT","NOV","DIC"],r=new Date(e*1e3),n=Ze(r,t),i=parseInt(n.month,10)-1,s=o[i]||n.month,c=n.dayPeriod?n.dayPeriod.toUpperCase().replace(/\./g,""):"";return`${n.day}/${s}/${n.year} - ${n.hour}:${n.minute} ${c}`}function Oo(e,t=ae){if(!e)return"";const o=new Date(e*1e3),n=new Intl.DateTimeFormat("es-MX",{timeZone:t,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",hour12:!1}).formatToParts(o).reduce((i,s)=>(i[s.type]=s.value,i),{});return`${n.year}-${n.month}-${n.day} ${n.hour}:${n.minute}`}function Mo(e,t=ae){return Xe(e,t).split(" - ")[0]}exports.ButtonGal=Je;exports.CheckBoxGal=_t;exports.DropDownGal=Dt;exports.InputFileGal=ao;exports.InputRadioGal=bo;exports.InputTextGal=ut;exports.TIMEZONES=ko;exports.TextAreaGal=So;exports.convertToUnix=Co;exports.unixToDate=Do;exports.unixToDateTime=Oo;exports.unixToDateTimeString=Xe;exports.unixToStringYMD=Mo;exports.useOnClickOutside=He;
|