lawgic-dev-kit 0.9.1 → 0.9.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,5 @@
1
- var e = { exports: {} };
1
+ import { __require as r } from "../node_modules/property-expr/index.js";
2
+ var e = r();
2
3
  export {
3
- e as __module
4
+ e as p
4
5
  };
@@ -1,5 +1,5 @@
1
- import { __require as r } from "../node_modules/property-expr/index.js";
2
- var e = r();
1
+ import { __require as r } from "../node_modules/tiny-case/index.js";
2
+ var a = r();
3
3
  export {
4
- e as p
4
+ a as t
5
5
  };
@@ -1,5 +1,7 @@
1
- import { __require as r } from "../node_modules/tiny-case/index.js";
2
- var a = r();
1
+ import { getDefaultExportFromCjs as o } from "./_commonjsHelpers.js";
2
+ import { __require as r } from "../node_modules/toposort/index.js";
3
+ var t = r();
4
+ const s = /* @__PURE__ */ o(t);
3
5
  export {
4
- a as t
6
+ s as default
5
7
  };
@@ -1,7 +1,4 @@
1
- import { getDefaultExportFromCjs as o } from "./_commonjsHelpers.js";
2
- import { __require as r } from "../node_modules/toposort/index.js";
3
- var t = r();
4
- const s = /* @__PURE__ */ o(t);
1
+ var e = { exports: {} };
5
2
  export {
6
- s as default
3
+ e as __module
7
4
  };
@@ -1,27 +1,26 @@
1
1
  import { j as s } from "../../../_virtual/jsx-runtime.js";
2
- import { resolveButtonClasses as x } from "./Button.styles.js";
3
- import { useTheme as j } from "../../../hooks/useTheme.js";
2
+ import { resolveButtonClasses as d } from "./Button.styles.js";
3
+ import { useTheme as i } from "../../../hooks/useTheme.js";
4
4
  import { FontAwesomeIcon as r } from "../../../node_modules/@fortawesome/react-fontawesome/index.es.js";
5
5
  import { resolveIconClasses as m } from "../IconButton/IconButton.styles.js";
6
- const B = ({
6
+ const h = ({
7
7
  icon: e,
8
8
  rightIcon: t,
9
- color: a,
10
- variant: l = "filled",
9
+ color: l,
10
+ variant: a = "filled",
11
11
  size: o = "base",
12
12
  children: n,
13
13
  className: c,
14
14
  ...u
15
15
  }) => {
16
- const { defaultColorScheme: f, t: p } = j(), d = p("cancel"), i = a || f;
16
+ const { defaultColorScheme: f } = i(), p = l || f;
17
17
  return /* @__PURE__ */ s.jsxs(
18
18
  "button",
19
19
  {
20
20
  type: "button",
21
- className: x(l, i, o) + " " + c,
21
+ className: d(a, p, o) + " " + c,
22
22
  ...u,
23
23
  children: [
24
- d,
25
24
  e && /* @__PURE__ */ s.jsx(r, { icon: e, className: m(o) }),
26
25
  n,
27
26
  t && /* @__PURE__ */ s.jsx(
@@ -36,5 +35,5 @@ const B = ({
36
35
  );
37
36
  };
38
37
  export {
39
- B as default
38
+ h as default
40
39
  };
@@ -693,7 +693,7 @@ function print() { __p += __j.call(arguments, '') }
693
693
  ${S}
694
694
  `,onError:G,...E}),B.jsx("div",{className:`
695
695
  flex items-center justify-center leading-none text-center absolute
696
- `,style:{maxWidth:O,maxHeight:O,minWidth:O,minHeight:O},children:I()})]})};function g8(t){var n,i,o="";if(typeof t=="string"||typeof t=="number")o+=t;else if(typeof t=="object")if(Array.isArray(t)){var u=t.length;for(n=0;n<u;n++)t[n]&&(i=g8(t[n]))&&(o&&(o+=" "),o+=i)}else for(i in t)t[i]&&(o&&(o+=" "),o+=i);return o}function dd(){for(var t,n,i=0,o="",u=arguments.length;i<u;i++)(t=arguments[i])&&(n=g8(t))&&(o&&(o+=" "),o+=n);return o}const y8={filled:"bg-blue-500 text-white hover:bg-blue-600 hover:text-white active:bg-blue-700 active:text-white",transparent:"bg-blue-100 text-blue-500 hover:bg-blue-200 hover:text-blue-600 active:bg-blue-300/80 active:text-blue-700",outline:"bg-transparent border-1 border-blue-500 text-blue-500 hover:text-blue-600 hover:border-blue-600 active:text-blue-700 active:border-blue-700",invisible:"text-blue-500 hover:text-blue-600 active:text-blue-700"},v8={filled:"bg-aqua-500 text-white hover:bg-aqua-600 hover:text-white active:bg-aqua-700 active:text-white",transparent:"bg-aqua-100 text-aqua-500 hover:bg-aqua-200/50 hover:text-aqua-600 active:bg-aqua-200/70 active:text-aqua-700",outline:"bg-transparent border-1 border-aqua-500 text-aqua-500 hover:text-aqua-600 hover:border-aqua-600 active:text-aqua-700 active:border-aqua-700",invisible:"text-aqua-500 hover:text-aqua-600 active:text-aqua-700"},b8={filled:"bg-red-500 text-white hover:bg-red-600 hover:text-white active:bg-red-700 active:text-white",transparent:"bg-red-500/20 text-error hover:bg-red-500/30 hover:text-red-600 active:text-red-700 active:bg-red-700/40",outline:"bg-transparent border-1 border-red-500 text-error hover:text-red-600 hover:border-red-600 active:text-red-700 active:border-red-700",invisible:"text-red-500 hover:text-red-600 active:text-red-700"},S8={filled:"bg-gray-500 text-white hover:bg-gray-600 hover:text-white active:bg-gray-700 active:text-white",transparent:"bg-gray-100 text-gray-500 hover:bg-gray-200 hover:text-gray-600 active:text-gray-700 active:bg-gray-300",outline:"bg-transparent border-1 border-gray-500 text-gray-500 hover:text-gray-600 hover:border-gray-600 active:text-gray-700 active:border-gray-700",invisible:"text-gray-500 hover:text-gray-600 active:text-gray-700"},Kq="transition-colors ease-in-out duration-200 flex items-center justify-center rounded-full w-fit font-[600] text-body-s disabled:bg-gray-100 disabled:cursor-not-allowed disabled:text-gray-300",Qq={lg:"gap-12 px-24 py-8 text-lg",base:"gap-8 px-20 py-7",md:"gap-8 px-16 py-6",sm:"gap-4 px-12 py-5",xs:"gap-4 px-6 py-3"},Wq=(t="filled",n="blue",i="base")=>{const o=dd(Kq,Qq[i]),u={blue:y8[t],aqua:v8[t],red:b8[t],gray:S8[t]}[n];return dd(o,u)},Jq="transition-colors ease-in-out duration-200 flex items-center justify-center rounded-full w-fit font-[600] leading-normal disabled:bg-gray-100 disabled:cursor-not-allowed disabled:text-gray-300",eI={lg:"min-h-[46px] max-h-[46px] min-w-[46px] max-w-[46px]",base:"min-h-[40px] max-h-[40px] min-w-[40px] max-w-[40px]",md:"min-h-[28px] max-h-[28px] min-w-[28px] max-w-[28px]",sm:"min-h-[20px] max-h-[20px] min-w-[16px] max-w-[16px]",xs:"min-h-[12px] max-h-[12px] min-w-[12px] max-w-[12px]"},tI={none:"",blue:"shadow-blue-sh hover:shadow-blue-sh active:shadow-blue-sh"},nI=(t="filled",n="blue",i="base",o="none")=>{const u=dd(Jq,eI[i],tI[o]),h={blue:y8[t],aqua:v8[t],red:b8[t],gray:S8[t]}[n];return dd(u,h)},aI={lg:"min-h-[20px] max-h-[20px]",base:"min-h-[15px] max-h-[15px]",md:"min-h-[15px] max-h-[15px]",sm:"min-h-[15px] max-h-[15px]",xs:"min-h-[15px] max-h-[15px]"},pb=(t="base")=>aI[t],gb=({icon:t,rightIcon:n,color:i,variant:o="filled",size:u="base",children:h,className:g,...v})=>{const{defaultColorScheme:S,t:E}=ri(),A=E("cancel"),O=i||S;return B.jsxs("button",{type:"button",className:Wq(o,O,u)+" "+g,...v,children:[A,t&&B.jsx(gn,{icon:t,className:pb(u)}),h,n&&B.jsx(gn,{icon:n,className:pb(u)})]})},x8=({className:t="",direction:n="horizontal"})=>n==="horizontal"?B.jsx("hr",{className:`w-full min-h-1 max-h-1 bg-blue-100 border-blue-100 ${t}`}):B.jsx("hr",{className:`h-full min-w-1 max-w-1 bg-blue-100 border-blue-100 ${t}`}),T8=({open:t,onClose:n,title:i,children:o})=>{const u={hidden:{opacity:0},visible:{opacity:1}},h={hidden:{opacity:0,scale:.9},visible:{opacity:1,scale:1,transition:{duration:.15}},exit:{opacity:0,scale:.9,transition:{duration:.15}}};return B.jsx(nm,{children:t&&B.jsx(B.Fragment,{children:B.jsx(ha.div,{className:"fixed inset-0 bg-black bg-opacity-50 z-9999 flex items-center justify-center",initial:"hidden",animate:"visible",exit:"hidden",variants:u,onClick:n,children:B.jsx(ha.div,{className:"w-full max-w-screen-md mx-16 z-50",variants:h,initial:"hidden",animate:"visible",exit:"exit",onClick:g=>g.stopPropagation(),children:B.jsxs(Jy,{className:"flex flex-col gap-16 md:gap-24 !p-0",children:[B.jsxs("div",{className:"flex flex-col gap-16 md:gap-24 md:p-32 md:pb-0",children:[B.jsxs("div",{className:"flex justify-between items-center px-16 pt-16 md:px-0 md:pt-0",children:[i&&B.jsx("h2",{className:"text-black font-700 text-2xl",children:i}),B.jsx(gn,{icon:mT,className:"cursor-pointer text-2xl text-gray-500 transition-all duration-300 hover:text-gray-700 ml-auto",onClick:n})]}),i&&B.jsx(x8,{className:"!bg-gray-100"})]}),B.jsx("div",{className:"flex flex-col gap-16 md:gap-24 p-16 pt-0 md:p-32 md:pt-4",children:typeof o=="function"?o(n):o})]})})})})})},iI=({countries:t,name:n,control:i,label:o="select_a_country",placeholder:u="type_to_search",language:h="en",className:g=""})=>{const{t:v}=ri();return B.jsx(s8,{name:n,control:i,render:({field:{onChange:S,value:E},fieldState:{error:A}})=>B.jsx(rI,{countries:t,value:E,onChange:S,label:v(o),placeholder:v(u),language:h,error:A==null?void 0:A.message,className:g})})},rI=({countries:t,value:n,onChange:i,label:o="select_a_country",placeholder:u="type_to_search",language:h="en",error:g,className:v=""})=>{var $e,Ye;const{t:S}=ri(),[E,A]=J.useState(!1),[O,M]=J.useState(""),[R,U]=J.useState(n||null),L=J.useRef(null),H=J.useRef(null),{x:V,y:I,strategy:G,refs:te,context:Y,placement:oe,middlewareData:me}=C2({open:E,onOpenChange:A,middleware:[x2(8),E2(),T2({padding:8}),ew({apply({availableHeight:Le,elements:Ue}){Object.assign(Ue.floating.style,{maxHeight:`${Math.min(Le-10,300)}px`})},padding:8}),tw({element:H})],placement:"bottom-start",whileElementsMounted:v2}),ge=w2(Y),be=O2(Y),{getReferenceProps:He,getFloatingProps:je}=M2([ge,be]),{isMounted:Pe,styles:Qe}=D2(Y,{duration:{open:200,close:150},initial:{opacity:0,transform:"translateY(-4px)"}}),Ge=(Array.isArray(t)?t:[]).filter(Le=>{if(!O.trim())return!0;const Ue=h==="es"&&Le.labelES?Le.labelES.toLowerCase():Le.label.toLowerCase(),tt=Le.code?Le.code.toLowerCase():"";return Ue.includes(O.toLowerCase())||tt.includes(O.toLowerCase())}),F=Le=>{U(Le),A(!1),M(""),i(Le)},ne=()=>{A(!E),!E&&L.current&&setTimeout(()=>{var Le;(Le=L.current)==null||Le.focus()},100)};J.useEffect(()=>{U(n)},[n]);const le=Le=>{var Ue;return Le?Le.codeISO2?Le.codeISO2.toLowerCase():((Ue=Le.code)==null?void 0:Ue.toLowerCase())||"":""},Re=($e=me.arrow)==null?void 0:$e.x,X=(Ye=me.arrow)==null?void 0:Ye.y,he={top:"bottom",right:"left",bottom:"top",left:"right"}[oe.split("-")[0]],Ce=He({onClick:ne});return B.jsxs("div",{className:`w-full relative flex flex-col gap-8 ${v}`,children:[B.jsx("label",{className:`text-gray-600 font-600 group ${g&&"!text-red-500"} text-label`,children:o}),B.jsxs("div",{ref:te.setReference,className:`flex items-center justify-between bg-light rounded-full p-16 cursor-pointer border transition-all duration-200 hover:border-blue-400 ${g&&"border-red-500 hover:border-red-600"} ${Pe?"border-blue-400":"border-blue-100"}`,...Ce,children:[R!=null&&R.code?B.jsxs("div",{className:"flex items-center w-full",children:[le(R)&&B.jsx("img",{loading:"lazy",width:"24",height:"16",className:"mr-2",src:`https://flagcdn.com/w20/${le(R)}.png`,srcSet:`https://flagcdn.com/w40/${le(R)}.png 2x`,alt:R.label,onError:Le=>{Le.currentTarget.style.display="none"}}),B.jsxs("span",{className:"flex-grow",children:[h==="es"&&R.labelES?R.labelES:R.label,R.code?` (${R.code})`:S("select_country")]})]}):B.jsx("span",{className:"text-gray-500",children:u}),B.jsx("svg",{className:`w-16 h-16 transition-transform ${E?"transform rotate-180":""}`,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:B.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M19 9l-7 7-7-7"})})]}),g&&B.jsx("p",{className:"mt-1 text-sm text-red-600",children:g}),Pe&&B.jsxs("div",{ref:te.setFloating,style:{position:G,top:I??0,left:V??0,...Qe},className:"z-10 w-full bg-white border border-blue-400 rounded-3xl shadow-lg overflow-auto",...je(),children:[B.jsx("div",{ref:H,className:"absolute w-4 h-4 bg-white rotate-45 border-blue-400",style:{left:Re!=null?`${Re}px`:"",top:X!=null?`${X}px`:"",right:"",bottom:"",[he]:"-2px",borderRight:he==="left"?"1px solid":"none",borderBottom:he==="top"?"1px solid":"none",borderLeft:he==="right"?"1px solid":"none",borderTop:he==="bottom"?"1px solid":"none"}}),B.jsx("div",{className:"sticky top-0 bg-white p-2 z-20",children:B.jsx("input",{ref:L,type:"text",className:"w-full p-16",placeholder:S("search")+"...",value:O,onChange:Le=>M(Le.target.value),onClick:Le=>Le.stopPropagation(),autoFocus:!0})}),B.jsx("div",{children:Ge.length>0?B.jsx("ul",{className:"flex flex-col",children:Ge.map((Le,Ue)=>{var We;const tt=Le.codeISO2?Le.codeISO2.toLowerCase():((We=Le.code)==null?void 0:We.toLowerCase())||"";return B.jsxs("li",{className:"flex items-center gap-10 px-16 py-8 transition-all duration-200 hover:bg-blue-100/50 cursor-pointer",onClick:st=>{st.stopPropagation(),F(Le)},children:[tt&&B.jsx("img",{loading:"lazy",width:"24",height:"16",className:"mr-2",src:`https://flagcdn.com/w20/${tt}.png`,srcSet:`https://flagcdn.com/w40/${tt}.png 2x`,alt:Le.label,onError:st=>{st.currentTarget.style.display="none"}}),B.jsxs("span",{children:[h==="es"&&Le.labelES?Le.labelES:Le.label,Le.code?` (${Le.code})`:"Country not found"]})]},`${Le.code}-${Ue}`)})}):B.jsx("div",{className:"px-3 py-2 text-gray-500",children:"No countries found"})})]})]})},lI=t=>B.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:179,height:35,fill:"none",...t,children:B.jsx("path",{fill:"#4570EB",d:"M86.789 28.867c-1.447 0-2.772-.265-3.975-.795a9.122 9.122 0 0 1-3.057-2.232 8.568 8.568 0 0 1-1.803-3.148l2.598-1.07c.55 1.467 1.366 2.598 2.446 3.393 1.1.774 2.384 1.162 3.852 1.162.896 0 1.681-.143 2.354-.428.672-.286 1.192-.683 1.559-1.193.387-.53.58-1.14.58-1.834 0-.958-.275-1.712-.825-2.262-.53-.57-1.314-.999-2.354-1.284l-4.188-1.284c-1.65-.51-2.914-1.314-3.79-2.415-.877-1.1-1.315-2.364-1.315-3.79 0-1.244.295-2.334.886-3.272.612-.957 1.447-1.701 2.507-2.231 1.08-.55 2.303-.826 3.669-.826 1.365 0 2.598.245 3.699.734 1.12.49 2.068 1.152 2.843 1.987a7.691 7.691 0 0 1 1.712 2.813l-2.568 1.07c-.49-1.284-1.223-2.252-2.201-2.905-.979-.672-2.13-1.008-3.455-1.008-.815 0-1.538.142-2.17.428a3.184 3.184 0 0 0-1.437 1.192c-.326.51-.49 1.12-.49 1.834 0 .836.266 1.58.796 2.232.53.652 1.334 1.151 2.415 1.498l3.82 1.13c1.794.55 3.15 1.335 4.067 2.355.917 1.019 1.375 2.282 1.375 3.79 0 1.243-.326 2.344-.978 3.302-.632.958-1.518 1.712-2.66 2.262-1.12.53-2.425.795-3.912.795Zm11.6-.367V12.023h2.844V28.5h-2.844Zm0-19.106V5.725h2.844v3.669h-2.844Zm7.255 19.106V12.023h2.782v3.362l-.398-.52c.408-1.039 1.06-1.834 1.957-2.384.897-.55 1.905-.825 3.026-.825 1.284 0 2.436.356 3.455 1.07 1.039.713 1.752 1.65 2.14 2.812l-.795.03c.428-1.283 1.151-2.251 2.17-2.903a6.028 6.028 0 0 1 3.394-1.01c1.141 0 2.17.266 3.087.796a5.926 5.926 0 0 1 2.232 2.2c.55.938.825 1.998.825 3.18V28.5h-2.873v-9.752c0-.917-.163-1.691-.49-2.323a3.606 3.606 0 0 0-1.345-1.468c-.55-.366-1.202-.55-1.956-.55a3.69 3.69 0 0 0-1.987.55c-.571.347-1.029.846-1.376 1.498-.326.632-.489 1.396-.489 2.293V28.5h-2.874v-9.752c0-.917-.163-1.691-.489-2.323a3.606 3.606 0 0 0-1.345-1.468c-.55-.366-1.202-.55-1.956-.55a3.69 3.69 0 0 0-1.987.55c-.571.347-1.029.846-1.376 1.498-.326.632-.489 1.396-.489 2.293V28.5h-2.843Zm27.913 6.114V12.023h2.782v3.546l-.367-.703c.612-.979 1.447-1.753 2.507-2.324 1.06-.59 2.272-.886 3.638-.886 1.549 0 2.934.377 4.157 1.13a8.069 8.069 0 0 1 2.935 3.088c.713 1.284 1.07 2.752 1.07 4.403 0 1.61-.357 3.067-1.07 4.371a8.068 8.068 0 0 1-2.935 3.088c-1.223.754-2.619 1.13-4.188 1.13-1.325 0-2.537-.295-3.638-.886a6.185 6.185 0 0 1-2.506-2.506l.458-.49v9.63h-2.843Zm8.315-8.498c1.04 0 1.967-.255 2.782-.765a5.185 5.185 0 0 0 1.895-2.078c.469-.897.704-1.896.704-2.996 0-1.142-.235-2.14-.704-2.996a5.185 5.185 0 0 0-1.895-2.079c-.815-.53-1.742-.795-2.782-.795-1.039 0-1.977.255-2.812.764-.815.51-1.468 1.213-1.957 2.11-.468.876-.703 1.875-.703 2.996 0 1.1.235 2.099.703 2.995a5.65 5.65 0 0 0 1.957 2.08c.835.509 1.773.764 2.812.764Zm12.135 2.384V5.358h2.843V28.5h-2.843Zm14.836.367c-1.59 0-3.006-.377-4.25-1.131a8.065 8.065 0 0 1-2.934-3.088c-.714-1.325-1.07-2.802-1.07-4.433 0-1.65.346-3.118 1.039-4.402.713-1.284 1.671-2.292 2.874-3.026 1.223-.754 2.588-1.131 4.096-1.131 1.223 0 2.303.224 3.241.672a6.84 6.84 0 0 1 2.415 1.774 7.477 7.477 0 0 1 1.528 2.537 7.98 7.98 0 0 1 .55 2.934c0 .225-.02.48-.061.765-.02.265-.051.52-.091.764h-13.512v-2.446h11.861l-1.345 1.1c.183-1.059.081-2.006-.306-2.842a4.643 4.643 0 0 0-1.712-1.987c-.754-.49-1.61-.734-2.568-.734s-1.834.245-2.629.734c-.795.489-1.416 1.192-1.865 2.11-.428.896-.601 1.966-.519 3.21-.082 1.201.102 2.261.55 3.178a5.288 5.288 0 0 0 1.956 2.11c.856.489 1.784.733 2.782.733 1.101 0 2.028-.254 2.782-.764a6.011 6.011 0 0 0 1.834-1.956l2.385 1.222c-.326.755-.836 1.447-1.529 2.08-.672.61-1.477 1.1-2.415 1.467-.917.366-1.946.55-3.087.55ZM24.105 5.715h7.319v16.956h11.69V28.5h-19.01V5.715Zm31.958 0c7.97 0 11.955 3.798 11.955 11.393 0 7.595-3.985 11.392-11.955 11.392h-9.87V5.715h9.87Zm-2.55 17.32h2.417c3.07 0 4.604-1.644 4.604-4.934v-1.987c0-3.29-1.535-4.934-4.604-4.934h-2.417v11.856ZM5.94 23.162v5.36H.062v-4.521c0-.391.455-1.216.71-1.53.961-1.179 2.867-3.007 4.022-4.048.572-.515 1.108-.978 1.92-1.06 1.927-.196 4.165.139 6.127 0 3.93-.268 3.945-5.65-.061-5.928-1.784-.124-3.71.097-5.508 0-.629.061-1.078.396-1.303.993-.138 1.237.092 2.622-.026 3.837-.061.598-.409 1.025-1.022 1.092-.873.098-2.881.083-3.776 0C.56 17.306.12 16.93.063 16.327c-.087-.942-.082-2.858 0-3.806.041-.494.404-.953.905-1.02 1.067-.144 3.346.248 4.195-.138 1.583-.716.633-3.497.93-4.924.112-.536.648-.71 1.124-.798 4.2.082 8.057-.747 11.47 2.266 5.871 5.186 2.432 14.564-5.104 15.244H5.944l-.005.01Z"})}),_2=({variant:t="filled",color:n,size:i="base",shadow:o="none",icon:u,iconProps:h={},children:g,className:v,...S})=>{const{defaultColorScheme:E}=ri(),A=n||E;return B.jsx("button",{...S,className:`${nI(t,A,i,o)} ${v}`,children:u?B.jsx(gn,{...h,className:pb(i),icon:u}):g})};function oI(t){return t!==null&&typeof t=="object"&&"name"in t&&"size"in t&&"type"in t&&typeof t.name=="string"&&typeof t.size=="number"&&typeof t.type=="string"}const sI=({src:t,alt:n,isEditable:i=!1,onChange:o,className:u="",name:h,control:g,user:v})=>{const[S,E]=J.useState(t||null),[A,O]=J.useState(!!t),M=J.useRef(null),R=Wy({name:h,control:g}),U=!!g;J.useEffect(()=>{if(U){const I=R==null?void 0:R.field.value;if(oI(I)){const G=URL.createObjectURL(I);return E(G),O(!0),()=>URL.revokeObjectURL(G)}else typeof I=="string"&&I&&I!==t?(E(I),O(!0)):t?(E(t),O(!0)):(E(null),O(!1))}},[R==null?void 0:R.field.value,t]);const L=()=>{var I;i&&((I=M.current)==null||I.click())},H=I=>{var te;const G=(te=I.target.files)==null?void 0:te[0];if(G){const Y=URL.createObjectURL(G);E(Y),O(!0),U&&(R==null||R.field.onChange(G)),o&&o(G)}},V=I=>{I.stopPropagation(),E(null),O(!1),M.current&&(M.current.value=""),U&&(R==null||R.field.onChange(null)),o&&o(null)};return B.jsxs("div",{className:"relative flex items-center gap-10",children:[i&&A&&B.jsx("button",{type:"button",onClick:V,className:"bg-red-500 text-white rounded-full w-20 h-20 flex items-center justify-center hover:bg-red-600 focus:outline-none","aria-label":"Eliminar imagen",children:B.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[B.jsx("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),B.jsx("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]})}),B.jsxs("div",{className:`relative flex items-center justify-center h-40 w-40 ${i?"cursor-pointer hover:opacity-80":""} ${u}`,onClick:L,children:[S?B.jsx("img",{src:S,alt:n,className:"w-full h-full object-cover rounded-full"}):B.jsx(p8,{size:60,user:v}),i&&B.jsxs(B.Fragment,{children:[B.jsx("input",{type:"file",ref:I=>{M.current=I,R&&R.field.ref(I)},onChange:H,onBlur:R==null?void 0:R.field.onBlur,accept:"image/*",className:"hidden"}),!A&&B.jsx("div",{className:"absolute bottom-0 right-0 bg-blue-100 rounded-full h-20 w-20 flex items-center justify-center",children:B.jsx(gn,{icon:cG,className:"text-blue-500"})})]})]})]})};var fw,E8;function uI(){if(E8)return fw;E8=1;function t(V){this._maxSize=V,this.clear()}t.prototype.clear=function(){this._size=0,this._values=Object.create(null)},t.prototype.get=function(V){return this._values[V]},t.prototype.set=function(V,I){return this._size>=this._maxSize&&this.clear(),V in this._values||this._size++,this._values[V]=I};var n=/[^.^\]^[]+|(?=\[\]|\.\.)/g,i=/^\d+$/,o=/^\d/,u=/[~`!#$%\^&*+=\-\[\]\\';,/{}|\\":<>\?]/g,h=/^\s*(['"]?)(.*?)(\1)\s*$/,g=512,v=new t(g),S=new t(g),E=new t(g);fw={Cache:t,split:O,normalizePath:A,setter:function(V){var I=A(V);return S.get(V)||S.set(V,function(te,Y){for(var oe=0,me=I.length,ge=te;oe<me-1;){var be=I[oe];if(be==="__proto__"||be==="constructor"||be==="prototype")return te;ge=ge[I[oe++]]}ge[I[oe]]=Y})},getter:function(V,I){var G=A(V);return E.get(V)||E.set(V,function(Y){for(var oe=0,me=G.length;oe<me;)if(Y!=null||!I)Y=Y[G[oe++]];else return;return Y})},join:function(V){return V.reduce(function(I,G){return I+(R(G)||i.test(G)?"["+G+"]":(I?".":"")+G)},"")},forEach:function(V,I,G){M(Array.isArray(V)?V:O(V),I,G)}};function A(V){return v.get(V)||v.set(V,O(V).map(function(I){return I.replace(h,"$2")}))}function O(V){return V.match(n)||[""]}function M(V,I,G){var te=V.length,Y,oe,me,ge;for(oe=0;oe<te;oe++)Y=V[oe],Y&&(H(Y)&&(Y='"'+Y+'"'),ge=R(Y),me=!ge&&/^\d+$/.test(Y),I.call(G,Y,ge,me,oe,V))}function R(V){return typeof V=="string"&&V&&["'",'"'].indexOf(V.charAt(0))!==-1}function U(V){return V.match(o)&&!V.match(i)}function L(V){return u.test(V)}function H(V){return!R(V)&&(U(V)||L(V))}return fw}var O0=uI(),dw,A8;function cI(){if(A8)return dw;A8=1;const t=/[A-Z\xc0-\xd6\xd8-\xde]?[a-z\xdf-\xf6\xf8-\xff]+(?:['’](?:d|ll|m|re|s|t|ve))?(?=[\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000]|[A-Z\xc0-\xd6\xd8-\xde]|$)|(?:[A-Z\xc0-\xd6\xd8-\xde]|[^\ud800-\udfff\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\d+\u2700-\u27bfa-z\xdf-\xf6\xf8-\xffA-Z\xc0-\xd6\xd8-\xde])+(?:['’](?:D|LL|M|RE|S|T|VE))?(?=[\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000]|[A-Z\xc0-\xd6\xd8-\xde](?:[a-z\xdf-\xf6\xf8-\xff]|[^\ud800-\udfff\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\d+\u2700-\u27bfa-z\xdf-\xf6\xf8-\xffA-Z\xc0-\xd6\xd8-\xde])|$)|[A-Z\xc0-\xd6\xd8-\xde]?(?:[a-z\xdf-\xf6\xf8-\xff]|[^\ud800-\udfff\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\d+\u2700-\u27bfa-z\xdf-\xf6\xf8-\xffA-Z\xc0-\xd6\xd8-\xde])+(?:['’](?:d|ll|m|re|s|t|ve))?|[A-Z\xc0-\xd6\xd8-\xde]+(?:['’](?:D|LL|M|RE|S|T|VE))?|\d*(?:1ST|2ND|3RD|(?![123])\dTH)(?=\b|[a-z_])|\d*(?:1st|2nd|3rd|(?![123])\dth)(?=\b|[A-Z_])|\d+|(?:[\u2700-\u27bf]|(?:\ud83c[\udde6-\uddff]){2}|[\ud800-\udbff][\udc00-\udfff])[\ufe0e\ufe0f]?(?:[\u0300-\u036f\ufe20-\ufe2f\u20d0-\u20ff]|\ud83c[\udffb-\udfff])?(?:\u200d(?:[^\ud800-\udfff]|(?:\ud83c[\udde6-\uddff]){2}|[\ud800-\udbff][\udc00-\udfff])[\ufe0e\ufe0f]?(?:[\u0300-\u036f\ufe20-\ufe2f\u20d0-\u20ff]|\ud83c[\udffb-\udfff])?)*/g,n=A=>A.match(t)||[],i=A=>A[0].toUpperCase()+A.slice(1),o=(A,O)=>n(A).join(O).toLowerCase(),u=A=>n(A).reduce((O,M)=>`${O}${O?M[0].toUpperCase()+M.slice(1).toLowerCase():M.toLowerCase()}`,"");return dw={words:n,upperFirst:i,camelCase:u,pascalCase:A=>i(u(A)),snakeCase:A=>o(A,"_"),kebabCase:A=>o(A,"-"),sentenceCase:A=>i(o(A," ")),titleCase:A=>n(A).map(i).join(" ")},dw}var hw=cI(),N2={exports:{}},w8;function fI(){if(w8)return N2.exports;w8=1,N2.exports=function(u){return t(n(u),u)},N2.exports.array=t;function t(u,h){var g=u.length,v=new Array(g),S={},E=g,A=i(h),O=o(u);for(h.forEach(function(R){if(!O.has(R[0])||!O.has(R[1]))throw new Error("Unknown node. There is an unknown node in the supplied edges.")});E--;)S[E]||M(u[E],E,new Set);return v;function M(R,U,L){if(L.has(R)){var H;try{H=", node was:"+JSON.stringify(R)}catch{H=""}throw new Error("Cyclic dependency"+H)}if(!O.has(R))throw new Error("Found unknown node. Make sure to provided all involved nodes. Unknown node: "+JSON.stringify(R));if(!S[U]){S[U]=!0;var V=A.get(R)||new Set;if(V=Array.from(V),U=V.length){L.add(R);do{var I=V[--U];M(I,O.get(I),L)}while(U);L.delete(R)}v[--g]=R}}}function n(u){for(var h=new Set,g=0,v=u.length;g<v;g++){var S=u[g];h.add(S[0]),h.add(S[1])}return Array.from(h)}function i(u){for(var h=new Map,g=0,v=u.length;g<v;g++){var S=u[g];h.has(S[0])||h.set(S[0],new Set),h.has(S[1])||h.set(S[1],new Set),h.get(S[0]).add(S[1])}return h}function o(u){for(var h=new Map,g=0,v=u.length;g<v;g++)h.set(u[g],g);return h}return N2.exports}var dI=fI();const hI=zO(dI),mI=Object.prototype.toString,pI=Error.prototype.toString,gI=RegExp.prototype.toString,yI=typeof Symbol<"u"?Symbol.prototype.toString:()=>"",vI=/^Symbol\((.*)\)(.*)$/;function bI(t){return t!=+t?"NaN":t===0&&1/t<0?"-0":""+t}function O8(t,n=!1){if(t==null||t===!0||t===!1)return""+t;const i=typeof t;if(i==="number")return bI(t);if(i==="string")return n?`"${t}"`:t;if(i==="function")return"[Function "+(t.name||"anonymous")+"]";if(i==="symbol")return yI.call(t).replace(vI,"Symbol($1)");const o=mI.call(t).slice(8,-1);return o==="Date"?isNaN(t.getTime())?""+t:t.toISOString(t):o==="Error"||t instanceof Error?"["+pI.call(t)+"]":o==="RegExp"?gI.call(t):null}function fm(t,n){let i=O8(t,n);return i!==null?i:JSON.stringify(t,function(o,u){let h=O8(this[o],n);return h!==null?h:u},2)}function C8(t){return t==null?[]:[].concat(t)}let M8,D8,R8,SI=/\$\{\s*(\w+)\s*\}/g;M8=Symbol.toStringTag;class _8{constructor(n,i,o,u){this.name=void 0,this.message=void 0,this.value=void 0,this.path=void 0,this.type=void 0,this.params=void 0,this.errors=void 0,this.inner=void 0,this[M8]="Error",this.name="ValidationError",this.value=i,this.path=o,this.type=u,this.errors=[],this.inner=[],C8(n).forEach(h=>{if(Pl.isError(h)){this.errors.push(...h.errors);const g=h.inner.length?h.inner:[h];this.inner.push(...g)}else this.errors.push(h)}),this.message=this.errors.length>1?`${this.errors.length} errors occurred`:this.errors[0]}}D8=Symbol.hasInstance,R8=Symbol.toStringTag;class Pl extends Error{static formatError(n,i){const o=i.label||i.path||"this";return i=Object.assign({},i,{path:o,originalPath:i.path}),typeof n=="string"?n.replace(SI,(u,h)=>fm(i[h])):typeof n=="function"?n(i):n}static isError(n){return n&&n.name==="ValidationError"}constructor(n,i,o,u,h){const g=new _8(n,i,o,u);if(h)return g;super(),this.value=void 0,this.path=void 0,this.type=void 0,this.params=void 0,this.errors=[],this.inner=[],this[R8]="Error",this.name=g.name,this.message=g.message,this.type=g.type,this.value=g.value,this.path=g.path,this.errors=g.errors,this.inner=g.inner,Error.captureStackTrace&&Error.captureStackTrace(this,Pl)}static[D8](n){return _8[Symbol.hasInstance](n)||super[Symbol.hasInstance](n)}}let $c={default:"${path} is invalid",required:"${path} is a required field",defined:"${path} must be defined",notNull:"${path} cannot be null",oneOf:"${path} must be one of the following values: ${values}",notOneOf:"${path} must not be one of the following values: ${values}",notType:({path:t,type:n,value:i,originalValue:o})=>{const u=o!=null&&o!==i?` (cast from the value \`${fm(o,!0)}\`).`:".";return n!=="mixed"?`${t} must be a \`${n}\` type, but the final value was: \`${fm(i,!0)}\``+u:`${t} must match the configured type. The validated value was: \`${fm(i,!0)}\``+u}},kl={length:"${path} must be exactly ${length} characters",min:"${path} must be at least ${min} characters",max:"${path} must be at most ${max} characters",matches:'${path} must match the following: "${regex}"',email:"${path} must be a valid email",url:"${path} must be a valid URL",uuid:"${path} must be a valid UUID",datetime:"${path} must be a valid ISO date-time",datetime_precision:"${path} must be a valid ISO date-time with a sub-second precision of exactly ${precision} digits",datetime_offset:'${path} must be a valid ISO date-time with UTC "Z" timezone',trim:"${path} must be a trimmed string",lowercase:"${path} must be a lowercase string",uppercase:"${path} must be a upper case string"},xI={min:"${path} must be greater than or equal to ${min}",max:"${path} must be less than or equal to ${max}",lessThan:"${path} must be less than ${less}",moreThan:"${path} must be greater than ${more}",positive:"${path} must be a positive number",negative:"${path} must be a negative number",integer:"${path} must be an integer"},mw={min:"${path} field must be later than ${min}",max:"${path} field must be at earlier than ${max}"},TI={isValue:"${path} field must be ${value}"},z2={noUnknown:"${path} field has unspecified keys: ${unknown}",exact:"${path} object contains unknown properties: ${properties}"};Object.assign(Object.create(null),{mixed:$c,string:kl,number:xI,date:mw,object:z2,array:{min:"${path} field must have at least ${min} items",max:"${path} field must have less than or equal to ${max} items",length:"${path} must have ${length} items"},boolean:TI,tuple:{notType:t=>{const{path:n,value:i,spec:o}=t,u=o.types.length;if(Array.isArray(i)){if(i.length<u)return`${n} tuple value has too few items, expected a length of ${u} but got ${i.length} for value: \`${fm(i,!0)}\``;if(i.length>u)return`${n} tuple value has too many items, expected a length of ${u} but got ${i.length} for value: \`${fm(i,!0)}\``}return Pl.formatError($c.notType,t)}}});const pw=t=>t&&t.__isYupSchema__;class L2{static fromOptions(n,i){if(!i.then&&!i.otherwise)throw new TypeError("either `then:` or `otherwise:` is required for `when()` conditions");let{is:o,then:u,otherwise:h}=i,g=typeof o=="function"?o:(...v)=>v.every(S=>S===o);return new L2(n,(v,S)=>{var E;let A=g(...v)?u:h;return(E=A==null?void 0:A(S))!=null?E:S})}constructor(n,i){this.fn=void 0,this.refs=n,this.refs=n,this.fn=i}resolve(n,i){let o=this.refs.map(h=>h.getValue(i==null?void 0:i.value,i==null?void 0:i.parent,i==null?void 0:i.context)),u=this.fn(o,n,i);if(u===void 0||u===n)return n;if(!pw(u))throw new TypeError("conditions must return a schema object");return u.resolve(i)}}const V2={context:"$",value:"."};class C0{constructor(n,i={}){if(this.key=void 0,this.isContext=void 0,this.isValue=void 0,this.isSibling=void 0,this.path=void 0,this.getter=void 0,this.map=void 0,typeof n!="string")throw new TypeError("ref must be a string, got: "+n);if(this.key=n.trim(),n==="")throw new TypeError("ref must be a non-empty string");this.isContext=this.key[0]===V2.context,this.isValue=this.key[0]===V2.value,this.isSibling=!this.isContext&&!this.isValue;let o=this.isContext?V2.context:this.isValue?V2.value:"";this.path=this.key.slice(o.length),this.getter=this.path&&O0.getter(this.path,!0),this.map=i.map}getValue(n,i,o){let u=this.isContext?o:this.isValue?n:i;return this.getter&&(u=this.getter(u||{})),this.map&&(u=this.map(u)),u}cast(n,i){return this.getValue(n,i==null?void 0:i.parent,i==null?void 0:i.context)}resolve(){return this}describe(){return{type:"ref",key:this.key}}toString(){return`Ref(${this.key})`}static isRef(n){return n&&n.__isYupRef}}C0.prototype.__isYupRef=!0;const M0=t=>t==null;function ev(t){function n({value:i,path:o="",options:u,originalValue:h,schema:g},v,S){const{name:E,test:A,params:O,message:M,skipAbsent:R}=t;let{parent:U,context:L,abortEarly:H=g.spec.abortEarly,disableStackTrace:V=g.spec.disableStackTrace}=u;function I(je){return C0.isRef(je)?je.getValue(i,U,L):je}function G(je={}){const Pe=Object.assign({value:i,originalValue:h,label:g.spec.label,path:je.path||o,spec:g.spec,disableStackTrace:je.disableStackTrace||V},O,je.params);for(const Ze of Object.keys(Pe))Pe[Ze]=I(Pe[Ze]);const Qe=new Pl(Pl.formatError(je.message||M,Pe),i,Pe.path,je.type||E,Pe.disableStackTrace);return Qe.params=Pe,Qe}const te=H?v:S;let Y={path:o,parent:U,type:E,from:u.from,createError:G,resolve:I,options:u,originalValue:h,schema:g};const oe=je=>{Pl.isError(je)?te(je):je?S(null):te(G())},me=je=>{Pl.isError(je)?te(je):v(je)};if(R&&M0(i))return oe(!0);let be;try{var He;if(be=A.call(Y,i,Y),typeof((He=be)==null?void 0:He.then)=="function"){if(u.sync)throw new Error(`Validation test of type: "${Y.type}" returned a Promise during a synchronous validate. This test will finish after the validate call has returned`);return Promise.resolve(be).then(oe,me)}}catch(je){me(je);return}oe(be)}return n.OPTIONS=t,n}function EI(t,n,i,o=i){let u,h,g;return n?(O0.forEach(n,(v,S,E)=>{let A=S?v.slice(1,v.length-1):v;t=t.resolve({context:o,parent:u,value:i});let O=t.type==="tuple",M=E?parseInt(A,10):0;if(t.innerType||O){if(O&&!E)throw new Error(`Yup.reach cannot implicitly index into a tuple type. the path part "${g}" must contain an index to the tuple element, e.g. "${g}[0]"`);if(i&&M>=i.length)throw new Error(`Yup.reach cannot resolve an array item at index: ${v}, in the path: ${n}. because there is no value at that index. `);u=i,i=i&&i[M],t=O?t.spec.types[M]:t.innerType}if(!E){if(!t.fields||!t.fields[A])throw new Error(`The schema does not contain the path: ${n}. (failed at: ${g} which is a type: "${t.type}")`);u=i,i=i&&i[A],t=t.fields[A]}h=A,g=S?"["+v+"]":"."+v}),{schema:t,parent:u,parentPath:h}):{parent:u,parentPath:n,schema:t}}class U2 extends Set{describe(){const n=[];for(const i of this.values())n.push(C0.isRef(i)?i.describe():i);return n}resolveAll(n){let i=[];for(const o of this.values())i.push(n(o));return i}clone(){return new U2(this.values())}merge(n,i){const o=this.clone();return n.forEach(u=>o.add(u)),i.forEach(u=>o.delete(u)),o}}function tv(t,n=new Map){if(pw(t)||!t||typeof t!="object")return t;if(n.has(t))return n.get(t);let i;if(t instanceof Date)i=new Date(t.getTime()),n.set(t,i);else if(t instanceof RegExp)i=new RegExp(t),n.set(t,i);else if(Array.isArray(t)){i=new Array(t.length),n.set(t,i);for(let o=0;o<t.length;o++)i[o]=tv(t[o],n)}else if(t instanceof Map){i=new Map,n.set(t,i);for(const[o,u]of t.entries())i.set(o,tv(u,n))}else if(t instanceof Set){i=new Set,n.set(t,i);for(const o of t)i.add(tv(o,n))}else if(t instanceof Object){i={},n.set(t,i);for(const[o,u]of Object.entries(t))i[o]=tv(u,n)}else throw Error(`Unable to clone ${t}`);return i}class Hc{constructor(n){this.type=void 0,this.deps=[],this.tests=void 0,this.transforms=void 0,this.conditions=[],this._mutate=void 0,this.internalTests={},this._whitelist=new U2,this._blacklist=new U2,this.exclusiveTests=Object.create(null),this._typeCheck=void 0,this.spec=void 0,this.tests=[],this.transforms=[],this.withMutation(()=>{this.typeError($c.notType)}),this.type=n.type,this._typeCheck=n.check,this.spec=Object.assign({strip:!1,strict:!1,abortEarly:!0,recursive:!0,disableStackTrace:!1,nullable:!1,optional:!0,coerce:!0},n==null?void 0:n.spec),this.withMutation(i=>{i.nonNullable()})}get _type(){return this.type}clone(n){if(this._mutate)return n&&Object.assign(this.spec,n),this;const i=Object.create(Object.getPrototypeOf(this));return i.type=this.type,i._typeCheck=this._typeCheck,i._whitelist=this._whitelist.clone(),i._blacklist=this._blacklist.clone(),i.internalTests=Object.assign({},this.internalTests),i.exclusiveTests=Object.assign({},this.exclusiveTests),i.deps=[...this.deps],i.conditions=[...this.conditions],i.tests=[...this.tests],i.transforms=[...this.transforms],i.spec=tv(Object.assign({},this.spec,n)),i}label(n){let i=this.clone();return i.spec.label=n,i}meta(...n){if(n.length===0)return this.spec.meta;let i=this.clone();return i.spec.meta=Object.assign(i.spec.meta||{},n[0]),i}withMutation(n){let i=this._mutate;this._mutate=!0;let o=n(this);return this._mutate=i,o}concat(n){if(!n||n===this)return this;if(n.type!==this.type&&this.type!=="mixed")throw new TypeError(`You cannot \`concat()\` schema's of different types: ${this.type} and ${n.type}`);let i=this,o=n.clone();const u=Object.assign({},i.spec,o.spec);return o.spec=u,o.internalTests=Object.assign({},i.internalTests,o.internalTests),o._whitelist=i._whitelist.merge(n._whitelist,n._blacklist),o._blacklist=i._blacklist.merge(n._blacklist,n._whitelist),o.tests=i.tests,o.exclusiveTests=i.exclusiveTests,o.withMutation(h=>{n.tests.forEach(g=>{h.test(g.OPTIONS)})}),o.transforms=[...i.transforms,...o.transforms],o}isType(n){return n==null?!!(this.spec.nullable&&n===null||this.spec.optional&&n===void 0):this._typeCheck(n)}resolve(n){let i=this;if(i.conditions.length){let o=i.conditions;i=i.clone(),i.conditions=[],i=o.reduce((u,h)=>h.resolve(u,n),i),i=i.resolve(n)}return i}resolveOptions(n){var i,o,u,h;return Object.assign({},n,{from:n.from||[],strict:(i=n.strict)!=null?i:this.spec.strict,abortEarly:(o=n.abortEarly)!=null?o:this.spec.abortEarly,recursive:(u=n.recursive)!=null?u:this.spec.recursive,disableStackTrace:(h=n.disableStackTrace)!=null?h:this.spec.disableStackTrace})}cast(n,i={}){let o=this.resolve(Object.assign({value:n},i)),u=i.assert==="ignore-optionality",h=o._cast(n,i);if(i.assert!==!1&&!o.isType(h)){if(u&&M0(h))return h;let g=fm(n),v=fm(h);throw new TypeError(`The value of ${i.path||"field"} could not be cast to a value that satisfies the schema type: "${o.type}".
696
+ `,style:{maxWidth:O,maxHeight:O,minWidth:O,minHeight:O},children:I()})]})};function g8(t){var n,i,o="";if(typeof t=="string"||typeof t=="number")o+=t;else if(typeof t=="object")if(Array.isArray(t)){var u=t.length;for(n=0;n<u;n++)t[n]&&(i=g8(t[n]))&&(o&&(o+=" "),o+=i)}else for(i in t)t[i]&&(o&&(o+=" "),o+=i);return o}function dd(){for(var t,n,i=0,o="",u=arguments.length;i<u;i++)(t=arguments[i])&&(n=g8(t))&&(o&&(o+=" "),o+=n);return o}const y8={filled:"bg-blue-500 text-white hover:bg-blue-600 hover:text-white active:bg-blue-700 active:text-white",transparent:"bg-blue-100 text-blue-500 hover:bg-blue-200 hover:text-blue-600 active:bg-blue-300/80 active:text-blue-700",outline:"bg-transparent border-1 border-blue-500 text-blue-500 hover:text-blue-600 hover:border-blue-600 active:text-blue-700 active:border-blue-700",invisible:"text-blue-500 hover:text-blue-600 active:text-blue-700"},v8={filled:"bg-aqua-500 text-white hover:bg-aqua-600 hover:text-white active:bg-aqua-700 active:text-white",transparent:"bg-aqua-100 text-aqua-500 hover:bg-aqua-200/50 hover:text-aqua-600 active:bg-aqua-200/70 active:text-aqua-700",outline:"bg-transparent border-1 border-aqua-500 text-aqua-500 hover:text-aqua-600 hover:border-aqua-600 active:text-aqua-700 active:border-aqua-700",invisible:"text-aqua-500 hover:text-aqua-600 active:text-aqua-700"},b8={filled:"bg-red-500 text-white hover:bg-red-600 hover:text-white active:bg-red-700 active:text-white",transparent:"bg-red-500/20 text-error hover:bg-red-500/30 hover:text-red-600 active:text-red-700 active:bg-red-700/40",outline:"bg-transparent border-1 border-red-500 text-error hover:text-red-600 hover:border-red-600 active:text-red-700 active:border-red-700",invisible:"text-red-500 hover:text-red-600 active:text-red-700"},S8={filled:"bg-gray-500 text-white hover:bg-gray-600 hover:text-white active:bg-gray-700 active:text-white",transparent:"bg-gray-100 text-gray-500 hover:bg-gray-200 hover:text-gray-600 active:text-gray-700 active:bg-gray-300",outline:"bg-transparent border-1 border-gray-500 text-gray-500 hover:text-gray-600 hover:border-gray-600 active:text-gray-700 active:border-gray-700",invisible:"text-gray-500 hover:text-gray-600 active:text-gray-700"},Kq="transition-colors ease-in-out duration-200 flex items-center justify-center rounded-full w-fit font-[600] text-body-s disabled:bg-gray-100 disabled:cursor-not-allowed disabled:text-gray-300",Qq={lg:"gap-12 px-24 py-8 text-lg",base:"gap-8 px-20 py-7",md:"gap-8 px-16 py-6",sm:"gap-4 px-12 py-5",xs:"gap-4 px-6 py-3"},Wq=(t="filled",n="blue",i="base")=>{const o=dd(Kq,Qq[i]),u={blue:y8[t],aqua:v8[t],red:b8[t],gray:S8[t]}[n];return dd(o,u)},Jq="transition-colors ease-in-out duration-200 flex items-center justify-center rounded-full w-fit font-[600] leading-normal disabled:bg-gray-100 disabled:cursor-not-allowed disabled:text-gray-300",eI={lg:"min-h-[46px] max-h-[46px] min-w-[46px] max-w-[46px]",base:"min-h-[40px] max-h-[40px] min-w-[40px] max-w-[40px]",md:"min-h-[28px] max-h-[28px] min-w-[28px] max-w-[28px]",sm:"min-h-[20px] max-h-[20px] min-w-[16px] max-w-[16px]",xs:"min-h-[12px] max-h-[12px] min-w-[12px] max-w-[12px]"},tI={none:"",blue:"shadow-blue-sh hover:shadow-blue-sh active:shadow-blue-sh"},nI=(t="filled",n="blue",i="base",o="none")=>{const u=dd(Jq,eI[i],tI[o]),h={blue:y8[t],aqua:v8[t],red:b8[t],gray:S8[t]}[n];return dd(u,h)},aI={lg:"min-h-[20px] max-h-[20px]",base:"min-h-[15px] max-h-[15px]",md:"min-h-[15px] max-h-[15px]",sm:"min-h-[15px] max-h-[15px]",xs:"min-h-[15px] max-h-[15px]"},pb=(t="base")=>aI[t],gb=({icon:t,rightIcon:n,color:i,variant:o="filled",size:u="base",children:h,className:g,...v})=>{const{defaultColorScheme:S}=ri(),E=i||S;return B.jsxs("button",{type:"button",className:Wq(o,E,u)+" "+g,...v,children:[t&&B.jsx(gn,{icon:t,className:pb(u)}),h,n&&B.jsx(gn,{icon:n,className:pb(u)})]})},x8=({className:t="",direction:n="horizontal"})=>n==="horizontal"?B.jsx("hr",{className:`w-full min-h-1 max-h-1 bg-blue-100 border-blue-100 ${t}`}):B.jsx("hr",{className:`h-full min-w-1 max-w-1 bg-blue-100 border-blue-100 ${t}`}),T8=({open:t,onClose:n,title:i,children:o})=>{const u={hidden:{opacity:0},visible:{opacity:1}},h={hidden:{opacity:0,scale:.9},visible:{opacity:1,scale:1,transition:{duration:.15}},exit:{opacity:0,scale:.9,transition:{duration:.15}}};return B.jsx(nm,{children:t&&B.jsx(B.Fragment,{children:B.jsx(ha.div,{className:"fixed inset-0 bg-black bg-opacity-50 z-9999 flex items-center justify-center",initial:"hidden",animate:"visible",exit:"hidden",variants:u,onClick:n,children:B.jsx(ha.div,{className:"w-full max-w-screen-md mx-16 z-50",variants:h,initial:"hidden",animate:"visible",exit:"exit",onClick:g=>g.stopPropagation(),children:B.jsxs(Jy,{className:"flex flex-col gap-16 md:gap-24 !p-0",children:[B.jsxs("div",{className:"flex flex-col gap-16 md:gap-24 md:p-32 md:pb-0",children:[B.jsxs("div",{className:"flex justify-between items-center px-16 pt-16 md:px-0 md:pt-0",children:[i&&B.jsx("h2",{className:"text-black font-700 text-2xl",children:i}),B.jsx(gn,{icon:mT,className:"cursor-pointer text-2xl text-gray-500 transition-all duration-300 hover:text-gray-700 ml-auto",onClick:n})]}),i&&B.jsx(x8,{className:"!bg-gray-100"})]}),B.jsx("div",{className:"flex flex-col gap-16 md:gap-24 p-16 pt-0 md:p-32 md:pt-4",children:typeof o=="function"?o(n):o})]})})})})})},iI=({countries:t,name:n,control:i,label:o="select_a_country",placeholder:u="type_to_search",language:h="en",className:g=""})=>{const{t:v}=ri();return B.jsx(s8,{name:n,control:i,render:({field:{onChange:S,value:E},fieldState:{error:A}})=>B.jsx(rI,{countries:t,value:E,onChange:S,label:v(o),placeholder:v(u),language:h,error:A==null?void 0:A.message,className:g})})},rI=({countries:t,value:n,onChange:i,label:o="select_a_country",placeholder:u="type_to_search",language:h="en",error:g,className:v=""})=>{var $e,Ye;const{t:S}=ri(),[E,A]=J.useState(!1),[O,M]=J.useState(""),[R,U]=J.useState(n||null),L=J.useRef(null),H=J.useRef(null),{x:V,y:I,strategy:G,refs:te,context:Y,placement:oe,middlewareData:me}=C2({open:E,onOpenChange:A,middleware:[x2(8),E2(),T2({padding:8}),ew({apply({availableHeight:Le,elements:Ue}){Object.assign(Ue.floating.style,{maxHeight:`${Math.min(Le-10,300)}px`})},padding:8}),tw({element:H})],placement:"bottom-start",whileElementsMounted:v2}),ge=w2(Y),be=O2(Y),{getReferenceProps:He,getFloatingProps:je}=M2([ge,be]),{isMounted:Pe,styles:Qe}=D2(Y,{duration:{open:200,close:150},initial:{opacity:0,transform:"translateY(-4px)"}}),Ge=(Array.isArray(t)?t:[]).filter(Le=>{if(!O.trim())return!0;const Ue=h==="es"&&Le.labelES?Le.labelES.toLowerCase():Le.label.toLowerCase(),tt=Le.code?Le.code.toLowerCase():"";return Ue.includes(O.toLowerCase())||tt.includes(O.toLowerCase())}),F=Le=>{U(Le),A(!1),M(""),i(Le)},ne=()=>{A(!E),!E&&L.current&&setTimeout(()=>{var Le;(Le=L.current)==null||Le.focus()},100)};J.useEffect(()=>{U(n)},[n]);const le=Le=>{var Ue;return Le?Le.codeISO2?Le.codeISO2.toLowerCase():((Ue=Le.code)==null?void 0:Ue.toLowerCase())||"":""},Re=($e=me.arrow)==null?void 0:$e.x,X=(Ye=me.arrow)==null?void 0:Ye.y,he={top:"bottom",right:"left",bottom:"top",left:"right"}[oe.split("-")[0]],Ce=He({onClick:ne});return B.jsxs("div",{className:`w-full relative flex flex-col gap-8 ${v}`,children:[B.jsx("label",{className:`text-gray-600 font-600 group ${g&&"!text-red-500"} text-label`,children:o}),B.jsxs("div",{ref:te.setReference,className:`flex items-center justify-between bg-light rounded-full p-16 cursor-pointer border transition-all duration-200 hover:border-blue-400 ${g&&"border-red-500 hover:border-red-600"} ${Pe?"border-blue-400":"border-blue-100"}`,...Ce,children:[R!=null&&R.code?B.jsxs("div",{className:"flex items-center w-full",children:[le(R)&&B.jsx("img",{loading:"lazy",width:"24",height:"16",className:"mr-2",src:`https://flagcdn.com/w20/${le(R)}.png`,srcSet:`https://flagcdn.com/w40/${le(R)}.png 2x`,alt:R.label,onError:Le=>{Le.currentTarget.style.display="none"}}),B.jsxs("span",{className:"flex-grow",children:[h==="es"&&R.labelES?R.labelES:R.label,R.code?` (${R.code})`:S("select_country")]})]}):B.jsx("span",{className:"text-gray-500",children:u}),B.jsx("svg",{className:`w-16 h-16 transition-transform ${E?"transform rotate-180":""}`,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:B.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M19 9l-7 7-7-7"})})]}),g&&B.jsx("p",{className:"mt-1 text-sm text-red-600",children:g}),Pe&&B.jsxs("div",{ref:te.setFloating,style:{position:G,top:I??0,left:V??0,...Qe},className:"z-10 w-full bg-white border border-blue-400 rounded-3xl shadow-lg overflow-auto",...je(),children:[B.jsx("div",{ref:H,className:"absolute w-4 h-4 bg-white rotate-45 border-blue-400",style:{left:Re!=null?`${Re}px`:"",top:X!=null?`${X}px`:"",right:"",bottom:"",[he]:"-2px",borderRight:he==="left"?"1px solid":"none",borderBottom:he==="top"?"1px solid":"none",borderLeft:he==="right"?"1px solid":"none",borderTop:he==="bottom"?"1px solid":"none"}}),B.jsx("div",{className:"sticky top-0 bg-white p-2 z-20",children:B.jsx("input",{ref:L,type:"text",className:"w-full p-16",placeholder:S("search")+"...",value:O,onChange:Le=>M(Le.target.value),onClick:Le=>Le.stopPropagation(),autoFocus:!0})}),B.jsx("div",{children:Ge.length>0?B.jsx("ul",{className:"flex flex-col",children:Ge.map((Le,Ue)=>{var We;const tt=Le.codeISO2?Le.codeISO2.toLowerCase():((We=Le.code)==null?void 0:We.toLowerCase())||"";return B.jsxs("li",{className:"flex items-center gap-10 px-16 py-8 transition-all duration-200 hover:bg-blue-100/50 cursor-pointer",onClick:st=>{st.stopPropagation(),F(Le)},children:[tt&&B.jsx("img",{loading:"lazy",width:"24",height:"16",className:"mr-2",src:`https://flagcdn.com/w20/${tt}.png`,srcSet:`https://flagcdn.com/w40/${tt}.png 2x`,alt:Le.label,onError:st=>{st.currentTarget.style.display="none"}}),B.jsxs("span",{children:[h==="es"&&Le.labelES?Le.labelES:Le.label,Le.code?` (${Le.code})`:"Country not found"]})]},`${Le.code}-${Ue}`)})}):B.jsx("div",{className:"px-3 py-2 text-gray-500",children:"No countries found"})})]})]})},lI=t=>B.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:179,height:35,fill:"none",...t,children:B.jsx("path",{fill:"#4570EB",d:"M86.789 28.867c-1.447 0-2.772-.265-3.975-.795a9.122 9.122 0 0 1-3.057-2.232 8.568 8.568 0 0 1-1.803-3.148l2.598-1.07c.55 1.467 1.366 2.598 2.446 3.393 1.1.774 2.384 1.162 3.852 1.162.896 0 1.681-.143 2.354-.428.672-.286 1.192-.683 1.559-1.193.387-.53.58-1.14.58-1.834 0-.958-.275-1.712-.825-2.262-.53-.57-1.314-.999-2.354-1.284l-4.188-1.284c-1.65-.51-2.914-1.314-3.79-2.415-.877-1.1-1.315-2.364-1.315-3.79 0-1.244.295-2.334.886-3.272.612-.957 1.447-1.701 2.507-2.231 1.08-.55 2.303-.826 3.669-.826 1.365 0 2.598.245 3.699.734 1.12.49 2.068 1.152 2.843 1.987a7.691 7.691 0 0 1 1.712 2.813l-2.568 1.07c-.49-1.284-1.223-2.252-2.201-2.905-.979-.672-2.13-1.008-3.455-1.008-.815 0-1.538.142-2.17.428a3.184 3.184 0 0 0-1.437 1.192c-.326.51-.49 1.12-.49 1.834 0 .836.266 1.58.796 2.232.53.652 1.334 1.151 2.415 1.498l3.82 1.13c1.794.55 3.15 1.335 4.067 2.355.917 1.019 1.375 2.282 1.375 3.79 0 1.243-.326 2.344-.978 3.302-.632.958-1.518 1.712-2.66 2.262-1.12.53-2.425.795-3.912.795Zm11.6-.367V12.023h2.844V28.5h-2.844Zm0-19.106V5.725h2.844v3.669h-2.844Zm7.255 19.106V12.023h2.782v3.362l-.398-.52c.408-1.039 1.06-1.834 1.957-2.384.897-.55 1.905-.825 3.026-.825 1.284 0 2.436.356 3.455 1.07 1.039.713 1.752 1.65 2.14 2.812l-.795.03c.428-1.283 1.151-2.251 2.17-2.903a6.028 6.028 0 0 1 3.394-1.01c1.141 0 2.17.266 3.087.796a5.926 5.926 0 0 1 2.232 2.2c.55.938.825 1.998.825 3.18V28.5h-2.873v-9.752c0-.917-.163-1.691-.49-2.323a3.606 3.606 0 0 0-1.345-1.468c-.55-.366-1.202-.55-1.956-.55a3.69 3.69 0 0 0-1.987.55c-.571.347-1.029.846-1.376 1.498-.326.632-.489 1.396-.489 2.293V28.5h-2.874v-9.752c0-.917-.163-1.691-.489-2.323a3.606 3.606 0 0 0-1.345-1.468c-.55-.366-1.202-.55-1.956-.55a3.69 3.69 0 0 0-1.987.55c-.571.347-1.029.846-1.376 1.498-.326.632-.489 1.396-.489 2.293V28.5h-2.843Zm27.913 6.114V12.023h2.782v3.546l-.367-.703c.612-.979 1.447-1.753 2.507-2.324 1.06-.59 2.272-.886 3.638-.886 1.549 0 2.934.377 4.157 1.13a8.069 8.069 0 0 1 2.935 3.088c.713 1.284 1.07 2.752 1.07 4.403 0 1.61-.357 3.067-1.07 4.371a8.068 8.068 0 0 1-2.935 3.088c-1.223.754-2.619 1.13-4.188 1.13-1.325 0-2.537-.295-3.638-.886a6.185 6.185 0 0 1-2.506-2.506l.458-.49v9.63h-2.843Zm8.315-8.498c1.04 0 1.967-.255 2.782-.765a5.185 5.185 0 0 0 1.895-2.078c.469-.897.704-1.896.704-2.996 0-1.142-.235-2.14-.704-2.996a5.185 5.185 0 0 0-1.895-2.079c-.815-.53-1.742-.795-2.782-.795-1.039 0-1.977.255-2.812.764-.815.51-1.468 1.213-1.957 2.11-.468.876-.703 1.875-.703 2.996 0 1.1.235 2.099.703 2.995a5.65 5.65 0 0 0 1.957 2.08c.835.509 1.773.764 2.812.764Zm12.135 2.384V5.358h2.843V28.5h-2.843Zm14.836.367c-1.59 0-3.006-.377-4.25-1.131a8.065 8.065 0 0 1-2.934-3.088c-.714-1.325-1.07-2.802-1.07-4.433 0-1.65.346-3.118 1.039-4.402.713-1.284 1.671-2.292 2.874-3.026 1.223-.754 2.588-1.131 4.096-1.131 1.223 0 2.303.224 3.241.672a6.84 6.84 0 0 1 2.415 1.774 7.477 7.477 0 0 1 1.528 2.537 7.98 7.98 0 0 1 .55 2.934c0 .225-.02.48-.061.765-.02.265-.051.52-.091.764h-13.512v-2.446h11.861l-1.345 1.1c.183-1.059.081-2.006-.306-2.842a4.643 4.643 0 0 0-1.712-1.987c-.754-.49-1.61-.734-2.568-.734s-1.834.245-2.629.734c-.795.489-1.416 1.192-1.865 2.11-.428.896-.601 1.966-.519 3.21-.082 1.201.102 2.261.55 3.178a5.288 5.288 0 0 0 1.956 2.11c.856.489 1.784.733 2.782.733 1.101 0 2.028-.254 2.782-.764a6.011 6.011 0 0 0 1.834-1.956l2.385 1.222c-.326.755-.836 1.447-1.529 2.08-.672.61-1.477 1.1-2.415 1.467-.917.366-1.946.55-3.087.55ZM24.105 5.715h7.319v16.956h11.69V28.5h-19.01V5.715Zm31.958 0c7.97 0 11.955 3.798 11.955 11.393 0 7.595-3.985 11.392-11.955 11.392h-9.87V5.715h9.87Zm-2.55 17.32h2.417c3.07 0 4.604-1.644 4.604-4.934v-1.987c0-3.29-1.535-4.934-4.604-4.934h-2.417v11.856ZM5.94 23.162v5.36H.062v-4.521c0-.391.455-1.216.71-1.53.961-1.179 2.867-3.007 4.022-4.048.572-.515 1.108-.978 1.92-1.06 1.927-.196 4.165.139 6.127 0 3.93-.268 3.945-5.65-.061-5.928-1.784-.124-3.71.097-5.508 0-.629.061-1.078.396-1.303.993-.138 1.237.092 2.622-.026 3.837-.061.598-.409 1.025-1.022 1.092-.873.098-2.881.083-3.776 0C.56 17.306.12 16.93.063 16.327c-.087-.942-.082-2.858 0-3.806.041-.494.404-.953.905-1.02 1.067-.144 3.346.248 4.195-.138 1.583-.716.633-3.497.93-4.924.112-.536.648-.71 1.124-.798 4.2.082 8.057-.747 11.47 2.266 5.871 5.186 2.432 14.564-5.104 15.244H5.944l-.005.01Z"})}),_2=({variant:t="filled",color:n,size:i="base",shadow:o="none",icon:u,iconProps:h={},children:g,className:v,...S})=>{const{defaultColorScheme:E}=ri(),A=n||E;return B.jsx("button",{...S,className:`${nI(t,A,i,o)} ${v}`,children:u?B.jsx(gn,{...h,className:pb(i),icon:u}):g})};function oI(t){return t!==null&&typeof t=="object"&&"name"in t&&"size"in t&&"type"in t&&typeof t.name=="string"&&typeof t.size=="number"&&typeof t.type=="string"}const sI=({src:t,alt:n,isEditable:i=!1,onChange:o,className:u="",name:h,control:g,user:v})=>{const[S,E]=J.useState(t||null),[A,O]=J.useState(!!t),M=J.useRef(null),R=Wy({name:h,control:g}),U=!!g;J.useEffect(()=>{if(U){const I=R==null?void 0:R.field.value;if(oI(I)){const G=URL.createObjectURL(I);return E(G),O(!0),()=>URL.revokeObjectURL(G)}else typeof I=="string"&&I&&I!==t?(E(I),O(!0)):t?(E(t),O(!0)):(E(null),O(!1))}},[R==null?void 0:R.field.value,t]);const L=()=>{var I;i&&((I=M.current)==null||I.click())},H=I=>{var te;const G=(te=I.target.files)==null?void 0:te[0];if(G){const Y=URL.createObjectURL(G);E(Y),O(!0),U&&(R==null||R.field.onChange(G)),o&&o(G)}},V=I=>{I.stopPropagation(),E(null),O(!1),M.current&&(M.current.value=""),U&&(R==null||R.field.onChange(null)),o&&o(null)};return B.jsxs("div",{className:"relative flex items-center gap-10",children:[i&&A&&B.jsx("button",{type:"button",onClick:V,className:"bg-red-500 text-white rounded-full w-20 h-20 flex items-center justify-center hover:bg-red-600 focus:outline-none","aria-label":"Eliminar imagen",children:B.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[B.jsx("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),B.jsx("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]})}),B.jsxs("div",{className:`relative flex items-center justify-center h-40 w-40 ${i?"cursor-pointer hover:opacity-80":""} ${u}`,onClick:L,children:[S?B.jsx("img",{src:S,alt:n,className:"w-full h-full object-cover rounded-full"}):B.jsx(p8,{size:60,user:v}),i&&B.jsxs(B.Fragment,{children:[B.jsx("input",{type:"file",ref:I=>{M.current=I,R&&R.field.ref(I)},onChange:H,onBlur:R==null?void 0:R.field.onBlur,accept:"image/*",className:"hidden"}),!A&&B.jsx("div",{className:"absolute bottom-0 right-0 bg-blue-100 rounded-full h-20 w-20 flex items-center justify-center",children:B.jsx(gn,{icon:cG,className:"text-blue-500"})})]})]})]})};var fw,E8;function uI(){if(E8)return fw;E8=1;function t(V){this._maxSize=V,this.clear()}t.prototype.clear=function(){this._size=0,this._values=Object.create(null)},t.prototype.get=function(V){return this._values[V]},t.prototype.set=function(V,I){return this._size>=this._maxSize&&this.clear(),V in this._values||this._size++,this._values[V]=I};var n=/[^.^\]^[]+|(?=\[\]|\.\.)/g,i=/^\d+$/,o=/^\d/,u=/[~`!#$%\^&*+=\-\[\]\\';,/{}|\\":<>\?]/g,h=/^\s*(['"]?)(.*?)(\1)\s*$/,g=512,v=new t(g),S=new t(g),E=new t(g);fw={Cache:t,split:O,normalizePath:A,setter:function(V){var I=A(V);return S.get(V)||S.set(V,function(te,Y){for(var oe=0,me=I.length,ge=te;oe<me-1;){var be=I[oe];if(be==="__proto__"||be==="constructor"||be==="prototype")return te;ge=ge[I[oe++]]}ge[I[oe]]=Y})},getter:function(V,I){var G=A(V);return E.get(V)||E.set(V,function(Y){for(var oe=0,me=G.length;oe<me;)if(Y!=null||!I)Y=Y[G[oe++]];else return;return Y})},join:function(V){return V.reduce(function(I,G){return I+(R(G)||i.test(G)?"["+G+"]":(I?".":"")+G)},"")},forEach:function(V,I,G){M(Array.isArray(V)?V:O(V),I,G)}};function A(V){return v.get(V)||v.set(V,O(V).map(function(I){return I.replace(h,"$2")}))}function O(V){return V.match(n)||[""]}function M(V,I,G){var te=V.length,Y,oe,me,ge;for(oe=0;oe<te;oe++)Y=V[oe],Y&&(H(Y)&&(Y='"'+Y+'"'),ge=R(Y),me=!ge&&/^\d+$/.test(Y),I.call(G,Y,ge,me,oe,V))}function R(V){return typeof V=="string"&&V&&["'",'"'].indexOf(V.charAt(0))!==-1}function U(V){return V.match(o)&&!V.match(i)}function L(V){return u.test(V)}function H(V){return!R(V)&&(U(V)||L(V))}return fw}var O0=uI(),dw,A8;function cI(){if(A8)return dw;A8=1;const t=/[A-Z\xc0-\xd6\xd8-\xde]?[a-z\xdf-\xf6\xf8-\xff]+(?:['’](?:d|ll|m|re|s|t|ve))?(?=[\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000]|[A-Z\xc0-\xd6\xd8-\xde]|$)|(?:[A-Z\xc0-\xd6\xd8-\xde]|[^\ud800-\udfff\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\d+\u2700-\u27bfa-z\xdf-\xf6\xf8-\xffA-Z\xc0-\xd6\xd8-\xde])+(?:['’](?:D|LL|M|RE|S|T|VE))?(?=[\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000]|[A-Z\xc0-\xd6\xd8-\xde](?:[a-z\xdf-\xf6\xf8-\xff]|[^\ud800-\udfff\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\d+\u2700-\u27bfa-z\xdf-\xf6\xf8-\xffA-Z\xc0-\xd6\xd8-\xde])|$)|[A-Z\xc0-\xd6\xd8-\xde]?(?:[a-z\xdf-\xf6\xf8-\xff]|[^\ud800-\udfff\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\d+\u2700-\u27bfa-z\xdf-\xf6\xf8-\xffA-Z\xc0-\xd6\xd8-\xde])+(?:['’](?:d|ll|m|re|s|t|ve))?|[A-Z\xc0-\xd6\xd8-\xde]+(?:['’](?:D|LL|M|RE|S|T|VE))?|\d*(?:1ST|2ND|3RD|(?![123])\dTH)(?=\b|[a-z_])|\d*(?:1st|2nd|3rd|(?![123])\dth)(?=\b|[A-Z_])|\d+|(?:[\u2700-\u27bf]|(?:\ud83c[\udde6-\uddff]){2}|[\ud800-\udbff][\udc00-\udfff])[\ufe0e\ufe0f]?(?:[\u0300-\u036f\ufe20-\ufe2f\u20d0-\u20ff]|\ud83c[\udffb-\udfff])?(?:\u200d(?:[^\ud800-\udfff]|(?:\ud83c[\udde6-\uddff]){2}|[\ud800-\udbff][\udc00-\udfff])[\ufe0e\ufe0f]?(?:[\u0300-\u036f\ufe20-\ufe2f\u20d0-\u20ff]|\ud83c[\udffb-\udfff])?)*/g,n=A=>A.match(t)||[],i=A=>A[0].toUpperCase()+A.slice(1),o=(A,O)=>n(A).join(O).toLowerCase(),u=A=>n(A).reduce((O,M)=>`${O}${O?M[0].toUpperCase()+M.slice(1).toLowerCase():M.toLowerCase()}`,"");return dw={words:n,upperFirst:i,camelCase:u,pascalCase:A=>i(u(A)),snakeCase:A=>o(A,"_"),kebabCase:A=>o(A,"-"),sentenceCase:A=>i(o(A," ")),titleCase:A=>n(A).map(i).join(" ")},dw}var hw=cI(),N2={exports:{}},w8;function fI(){if(w8)return N2.exports;w8=1,N2.exports=function(u){return t(n(u),u)},N2.exports.array=t;function t(u,h){var g=u.length,v=new Array(g),S={},E=g,A=i(h),O=o(u);for(h.forEach(function(R){if(!O.has(R[0])||!O.has(R[1]))throw new Error("Unknown node. There is an unknown node in the supplied edges.")});E--;)S[E]||M(u[E],E,new Set);return v;function M(R,U,L){if(L.has(R)){var H;try{H=", node was:"+JSON.stringify(R)}catch{H=""}throw new Error("Cyclic dependency"+H)}if(!O.has(R))throw new Error("Found unknown node. Make sure to provided all involved nodes. Unknown node: "+JSON.stringify(R));if(!S[U]){S[U]=!0;var V=A.get(R)||new Set;if(V=Array.from(V),U=V.length){L.add(R);do{var I=V[--U];M(I,O.get(I),L)}while(U);L.delete(R)}v[--g]=R}}}function n(u){for(var h=new Set,g=0,v=u.length;g<v;g++){var S=u[g];h.add(S[0]),h.add(S[1])}return Array.from(h)}function i(u){for(var h=new Map,g=0,v=u.length;g<v;g++){var S=u[g];h.has(S[0])||h.set(S[0],new Set),h.has(S[1])||h.set(S[1],new Set),h.get(S[0]).add(S[1])}return h}function o(u){for(var h=new Map,g=0,v=u.length;g<v;g++)h.set(u[g],g);return h}return N2.exports}var dI=fI();const hI=zO(dI),mI=Object.prototype.toString,pI=Error.prototype.toString,gI=RegExp.prototype.toString,yI=typeof Symbol<"u"?Symbol.prototype.toString:()=>"",vI=/^Symbol\((.*)\)(.*)$/;function bI(t){return t!=+t?"NaN":t===0&&1/t<0?"-0":""+t}function O8(t,n=!1){if(t==null||t===!0||t===!1)return""+t;const i=typeof t;if(i==="number")return bI(t);if(i==="string")return n?`"${t}"`:t;if(i==="function")return"[Function "+(t.name||"anonymous")+"]";if(i==="symbol")return yI.call(t).replace(vI,"Symbol($1)");const o=mI.call(t).slice(8,-1);return o==="Date"?isNaN(t.getTime())?""+t:t.toISOString(t):o==="Error"||t instanceof Error?"["+pI.call(t)+"]":o==="RegExp"?gI.call(t):null}function fm(t,n){let i=O8(t,n);return i!==null?i:JSON.stringify(t,function(o,u){let h=O8(this[o],n);return h!==null?h:u},2)}function C8(t){return t==null?[]:[].concat(t)}let M8,D8,R8,SI=/\$\{\s*(\w+)\s*\}/g;M8=Symbol.toStringTag;class _8{constructor(n,i,o,u){this.name=void 0,this.message=void 0,this.value=void 0,this.path=void 0,this.type=void 0,this.params=void 0,this.errors=void 0,this.inner=void 0,this[M8]="Error",this.name="ValidationError",this.value=i,this.path=o,this.type=u,this.errors=[],this.inner=[],C8(n).forEach(h=>{if(Pl.isError(h)){this.errors.push(...h.errors);const g=h.inner.length?h.inner:[h];this.inner.push(...g)}else this.errors.push(h)}),this.message=this.errors.length>1?`${this.errors.length} errors occurred`:this.errors[0]}}D8=Symbol.hasInstance,R8=Symbol.toStringTag;class Pl extends Error{static formatError(n,i){const o=i.label||i.path||"this";return i=Object.assign({},i,{path:o,originalPath:i.path}),typeof n=="string"?n.replace(SI,(u,h)=>fm(i[h])):typeof n=="function"?n(i):n}static isError(n){return n&&n.name==="ValidationError"}constructor(n,i,o,u,h){const g=new _8(n,i,o,u);if(h)return g;super(),this.value=void 0,this.path=void 0,this.type=void 0,this.params=void 0,this.errors=[],this.inner=[],this[R8]="Error",this.name=g.name,this.message=g.message,this.type=g.type,this.value=g.value,this.path=g.path,this.errors=g.errors,this.inner=g.inner,Error.captureStackTrace&&Error.captureStackTrace(this,Pl)}static[D8](n){return _8[Symbol.hasInstance](n)||super[Symbol.hasInstance](n)}}let $c={default:"${path} is invalid",required:"${path} is a required field",defined:"${path} must be defined",notNull:"${path} cannot be null",oneOf:"${path} must be one of the following values: ${values}",notOneOf:"${path} must not be one of the following values: ${values}",notType:({path:t,type:n,value:i,originalValue:o})=>{const u=o!=null&&o!==i?` (cast from the value \`${fm(o,!0)}\`).`:".";return n!=="mixed"?`${t} must be a \`${n}\` type, but the final value was: \`${fm(i,!0)}\``+u:`${t} must match the configured type. The validated value was: \`${fm(i,!0)}\``+u}},kl={length:"${path} must be exactly ${length} characters",min:"${path} must be at least ${min} characters",max:"${path} must be at most ${max} characters",matches:'${path} must match the following: "${regex}"',email:"${path} must be a valid email",url:"${path} must be a valid URL",uuid:"${path} must be a valid UUID",datetime:"${path} must be a valid ISO date-time",datetime_precision:"${path} must be a valid ISO date-time with a sub-second precision of exactly ${precision} digits",datetime_offset:'${path} must be a valid ISO date-time with UTC "Z" timezone',trim:"${path} must be a trimmed string",lowercase:"${path} must be a lowercase string",uppercase:"${path} must be a upper case string"},xI={min:"${path} must be greater than or equal to ${min}",max:"${path} must be less than or equal to ${max}",lessThan:"${path} must be less than ${less}",moreThan:"${path} must be greater than ${more}",positive:"${path} must be a positive number",negative:"${path} must be a negative number",integer:"${path} must be an integer"},mw={min:"${path} field must be later than ${min}",max:"${path} field must be at earlier than ${max}"},TI={isValue:"${path} field must be ${value}"},z2={noUnknown:"${path} field has unspecified keys: ${unknown}",exact:"${path} object contains unknown properties: ${properties}"};Object.assign(Object.create(null),{mixed:$c,string:kl,number:xI,date:mw,object:z2,array:{min:"${path} field must have at least ${min} items",max:"${path} field must have less than or equal to ${max} items",length:"${path} must have ${length} items"},boolean:TI,tuple:{notType:t=>{const{path:n,value:i,spec:o}=t,u=o.types.length;if(Array.isArray(i)){if(i.length<u)return`${n} tuple value has too few items, expected a length of ${u} but got ${i.length} for value: \`${fm(i,!0)}\``;if(i.length>u)return`${n} tuple value has too many items, expected a length of ${u} but got ${i.length} for value: \`${fm(i,!0)}\``}return Pl.formatError($c.notType,t)}}});const pw=t=>t&&t.__isYupSchema__;class L2{static fromOptions(n,i){if(!i.then&&!i.otherwise)throw new TypeError("either `then:` or `otherwise:` is required for `when()` conditions");let{is:o,then:u,otherwise:h}=i,g=typeof o=="function"?o:(...v)=>v.every(S=>S===o);return new L2(n,(v,S)=>{var E;let A=g(...v)?u:h;return(E=A==null?void 0:A(S))!=null?E:S})}constructor(n,i){this.fn=void 0,this.refs=n,this.refs=n,this.fn=i}resolve(n,i){let o=this.refs.map(h=>h.getValue(i==null?void 0:i.value,i==null?void 0:i.parent,i==null?void 0:i.context)),u=this.fn(o,n,i);if(u===void 0||u===n)return n;if(!pw(u))throw new TypeError("conditions must return a schema object");return u.resolve(i)}}const V2={context:"$",value:"."};class C0{constructor(n,i={}){if(this.key=void 0,this.isContext=void 0,this.isValue=void 0,this.isSibling=void 0,this.path=void 0,this.getter=void 0,this.map=void 0,typeof n!="string")throw new TypeError("ref must be a string, got: "+n);if(this.key=n.trim(),n==="")throw new TypeError("ref must be a non-empty string");this.isContext=this.key[0]===V2.context,this.isValue=this.key[0]===V2.value,this.isSibling=!this.isContext&&!this.isValue;let o=this.isContext?V2.context:this.isValue?V2.value:"";this.path=this.key.slice(o.length),this.getter=this.path&&O0.getter(this.path,!0),this.map=i.map}getValue(n,i,o){let u=this.isContext?o:this.isValue?n:i;return this.getter&&(u=this.getter(u||{})),this.map&&(u=this.map(u)),u}cast(n,i){return this.getValue(n,i==null?void 0:i.parent,i==null?void 0:i.context)}resolve(){return this}describe(){return{type:"ref",key:this.key}}toString(){return`Ref(${this.key})`}static isRef(n){return n&&n.__isYupRef}}C0.prototype.__isYupRef=!0;const M0=t=>t==null;function ev(t){function n({value:i,path:o="",options:u,originalValue:h,schema:g},v,S){const{name:E,test:A,params:O,message:M,skipAbsent:R}=t;let{parent:U,context:L,abortEarly:H=g.spec.abortEarly,disableStackTrace:V=g.spec.disableStackTrace}=u;function I(je){return C0.isRef(je)?je.getValue(i,U,L):je}function G(je={}){const Pe=Object.assign({value:i,originalValue:h,label:g.spec.label,path:je.path||o,spec:g.spec,disableStackTrace:je.disableStackTrace||V},O,je.params);for(const Ze of Object.keys(Pe))Pe[Ze]=I(Pe[Ze]);const Qe=new Pl(Pl.formatError(je.message||M,Pe),i,Pe.path,je.type||E,Pe.disableStackTrace);return Qe.params=Pe,Qe}const te=H?v:S;let Y={path:o,parent:U,type:E,from:u.from,createError:G,resolve:I,options:u,originalValue:h,schema:g};const oe=je=>{Pl.isError(je)?te(je):je?S(null):te(G())},me=je=>{Pl.isError(je)?te(je):v(je)};if(R&&M0(i))return oe(!0);let be;try{var He;if(be=A.call(Y,i,Y),typeof((He=be)==null?void 0:He.then)=="function"){if(u.sync)throw new Error(`Validation test of type: "${Y.type}" returned a Promise during a synchronous validate. This test will finish after the validate call has returned`);return Promise.resolve(be).then(oe,me)}}catch(je){me(je);return}oe(be)}return n.OPTIONS=t,n}function EI(t,n,i,o=i){let u,h,g;return n?(O0.forEach(n,(v,S,E)=>{let A=S?v.slice(1,v.length-1):v;t=t.resolve({context:o,parent:u,value:i});let O=t.type==="tuple",M=E?parseInt(A,10):0;if(t.innerType||O){if(O&&!E)throw new Error(`Yup.reach cannot implicitly index into a tuple type. the path part "${g}" must contain an index to the tuple element, e.g. "${g}[0]"`);if(i&&M>=i.length)throw new Error(`Yup.reach cannot resolve an array item at index: ${v}, in the path: ${n}. because there is no value at that index. `);u=i,i=i&&i[M],t=O?t.spec.types[M]:t.innerType}if(!E){if(!t.fields||!t.fields[A])throw new Error(`The schema does not contain the path: ${n}. (failed at: ${g} which is a type: "${t.type}")`);u=i,i=i&&i[A],t=t.fields[A]}h=A,g=S?"["+v+"]":"."+v}),{schema:t,parent:u,parentPath:h}):{parent:u,parentPath:n,schema:t}}class U2 extends Set{describe(){const n=[];for(const i of this.values())n.push(C0.isRef(i)?i.describe():i);return n}resolveAll(n){let i=[];for(const o of this.values())i.push(n(o));return i}clone(){return new U2(this.values())}merge(n,i){const o=this.clone();return n.forEach(u=>o.add(u)),i.forEach(u=>o.delete(u)),o}}function tv(t,n=new Map){if(pw(t)||!t||typeof t!="object")return t;if(n.has(t))return n.get(t);let i;if(t instanceof Date)i=new Date(t.getTime()),n.set(t,i);else if(t instanceof RegExp)i=new RegExp(t),n.set(t,i);else if(Array.isArray(t)){i=new Array(t.length),n.set(t,i);for(let o=0;o<t.length;o++)i[o]=tv(t[o],n)}else if(t instanceof Map){i=new Map,n.set(t,i);for(const[o,u]of t.entries())i.set(o,tv(u,n))}else if(t instanceof Set){i=new Set,n.set(t,i);for(const o of t)i.add(tv(o,n))}else if(t instanceof Object){i={},n.set(t,i);for(const[o,u]of Object.entries(t))i[o]=tv(u,n)}else throw Error(`Unable to clone ${t}`);return i}class Hc{constructor(n){this.type=void 0,this.deps=[],this.tests=void 0,this.transforms=void 0,this.conditions=[],this._mutate=void 0,this.internalTests={},this._whitelist=new U2,this._blacklist=new U2,this.exclusiveTests=Object.create(null),this._typeCheck=void 0,this.spec=void 0,this.tests=[],this.transforms=[],this.withMutation(()=>{this.typeError($c.notType)}),this.type=n.type,this._typeCheck=n.check,this.spec=Object.assign({strip:!1,strict:!1,abortEarly:!0,recursive:!0,disableStackTrace:!1,nullable:!1,optional:!0,coerce:!0},n==null?void 0:n.spec),this.withMutation(i=>{i.nonNullable()})}get _type(){return this.type}clone(n){if(this._mutate)return n&&Object.assign(this.spec,n),this;const i=Object.create(Object.getPrototypeOf(this));return i.type=this.type,i._typeCheck=this._typeCheck,i._whitelist=this._whitelist.clone(),i._blacklist=this._blacklist.clone(),i.internalTests=Object.assign({},this.internalTests),i.exclusiveTests=Object.assign({},this.exclusiveTests),i.deps=[...this.deps],i.conditions=[...this.conditions],i.tests=[...this.tests],i.transforms=[...this.transforms],i.spec=tv(Object.assign({},this.spec,n)),i}label(n){let i=this.clone();return i.spec.label=n,i}meta(...n){if(n.length===0)return this.spec.meta;let i=this.clone();return i.spec.meta=Object.assign(i.spec.meta||{},n[0]),i}withMutation(n){let i=this._mutate;this._mutate=!0;let o=n(this);return this._mutate=i,o}concat(n){if(!n||n===this)return this;if(n.type!==this.type&&this.type!=="mixed")throw new TypeError(`You cannot \`concat()\` schema's of different types: ${this.type} and ${n.type}`);let i=this,o=n.clone();const u=Object.assign({},i.spec,o.spec);return o.spec=u,o.internalTests=Object.assign({},i.internalTests,o.internalTests),o._whitelist=i._whitelist.merge(n._whitelist,n._blacklist),o._blacklist=i._blacklist.merge(n._blacklist,n._whitelist),o.tests=i.tests,o.exclusiveTests=i.exclusiveTests,o.withMutation(h=>{n.tests.forEach(g=>{h.test(g.OPTIONS)})}),o.transforms=[...i.transforms,...o.transforms],o}isType(n){return n==null?!!(this.spec.nullable&&n===null||this.spec.optional&&n===void 0):this._typeCheck(n)}resolve(n){let i=this;if(i.conditions.length){let o=i.conditions;i=i.clone(),i.conditions=[],i=o.reduce((u,h)=>h.resolve(u,n),i),i=i.resolve(n)}return i}resolveOptions(n){var i,o,u,h;return Object.assign({},n,{from:n.from||[],strict:(i=n.strict)!=null?i:this.spec.strict,abortEarly:(o=n.abortEarly)!=null?o:this.spec.abortEarly,recursive:(u=n.recursive)!=null?u:this.spec.recursive,disableStackTrace:(h=n.disableStackTrace)!=null?h:this.spec.disableStackTrace})}cast(n,i={}){let o=this.resolve(Object.assign({value:n},i)),u=i.assert==="ignore-optionality",h=o._cast(n,i);if(i.assert!==!1&&!o.isType(h)){if(u&&M0(h))return h;let g=fm(n),v=fm(h);throw new TypeError(`The value of ${i.path||"field"} could not be cast to a value that satisfies the schema type: "${o.type}".
697
697
 
698
698
  attempted value: ${g}
699
699
  `+(v!==g?`result of cast: ${v}`:""))}return h}_cast(n,i){let o=n===void 0?n:this.transforms.reduce((u,h)=>h.call(this,u,n,this),n);return o===void 0&&(o=this.getDefault(i)),o}_validate(n,i={},o,u){let{path:h,originalValue:g=n,strict:v=this.spec.strict}=i,S=n;v||(S=this._cast(S,Object.assign({assert:!1},i)));let E=[];for(let A of Object.values(this.internalTests))A&&E.push(A);this.runTests({path:h,value:S,originalValue:g,options:i,tests:E},o,A=>{if(A.length)return u(A,S);this.runTests({path:h,value:S,originalValue:g,options:i,tests:this.tests},o,u)})}runTests(n,i,o){let u=!1,{tests:h,value:g,originalValue:v,path:S,options:E}=n,A=L=>{u||(u=!0,i(L,g))},O=L=>{u||(u=!0,o(L,g))},M=h.length,R=[];if(!M)return O([]);let U={value:g,originalValue:v,path:S,options:E,schema:this};for(let L=0;L<h.length;L++){const H=h[L];H(U,A,function(I){I&&(Array.isArray(I)?R.push(...I):R.push(I)),--M<=0&&O(R)})}}asNestedTest({key:n,index:i,parent:o,parentPath:u,originalParent:h,options:g}){const v=n??i;if(v==null)throw TypeError("Must include `key` or `index` for nested validations");const S=typeof v=="number";let E=o[v];const A=Object.assign({},g,{strict:!0,parent:o,value:E,originalValue:h[v],key:void 0,[S?"index":"key"]:v,path:S||v.includes(".")?`${u||""}[${S?v:`"${v}"`}]`:(u?`${u}.`:"")+n});return(O,M,R)=>this.resolve(A)._validate(E,A,M,R)}validate(n,i){var o;let u=this.resolve(Object.assign({},i,{value:n})),h=(o=i==null?void 0:i.disableStackTrace)!=null?o:u.spec.disableStackTrace;return new Promise((g,v)=>u._validate(n,i,(S,E)=>{Pl.isError(S)&&(S.value=E),v(S)},(S,E)=>{S.length?v(new Pl(S,E,void 0,void 0,h)):g(E)}))}validateSync(n,i){var o;let u=this.resolve(Object.assign({},i,{value:n})),h,g=(o=i==null?void 0:i.disableStackTrace)!=null?o:u.spec.disableStackTrace;return u._validate(n,Object.assign({},i,{sync:!0}),(v,S)=>{throw Pl.isError(v)&&(v.value=S),v},(v,S)=>{if(v.length)throw new Pl(v,n,void 0,void 0,g);h=S}),h}isValid(n,i){return this.validate(n,i).then(()=>!0,o=>{if(Pl.isError(o))return!1;throw o})}isValidSync(n,i){try{return this.validateSync(n,i),!0}catch(o){if(Pl.isError(o))return!1;throw o}}_getDefault(n){let i=this.spec.default;return i==null?i:typeof i=="function"?i.call(this,n):tv(i)}getDefault(n){return this.resolve(n||{})._getDefault(n)}default(n){return arguments.length===0?this._getDefault():this.clone({default:n})}strict(n=!0){return this.clone({strict:n})}nullability(n,i){const o=this.clone({nullable:n});return o.internalTests.nullable=ev({message:i,name:"nullable",test(u){return u===null?this.schema.spec.nullable:!0}}),o}optionality(n,i){const o=this.clone({optional:n});return o.internalTests.optionality=ev({message:i,name:"optionality",test(u){return u===void 0?this.schema.spec.optional:!0}}),o}optional(){return this.optionality(!0)}defined(n=$c.defined){return this.optionality(!1,n)}nullable(){return this.nullability(!0)}nonNullable(n=$c.notNull){return this.nullability(!1,n)}required(n=$c.required){return this.clone().withMutation(i=>i.nonNullable(n).defined(n))}notRequired(){return this.clone().withMutation(n=>n.nullable().optional())}transform(n){let i=this.clone();return i.transforms.push(n),i}test(...n){let i;if(n.length===1?typeof n[0]=="function"?i={test:n[0]}:i=n[0]:n.length===2?i={name:n[0],test:n[1]}:i={name:n[0],message:n[1],test:n[2]},i.message===void 0&&(i.message=$c.default),typeof i.test!="function")throw new TypeError("`test` is a required parameters");let o=this.clone(),u=ev(i),h=i.exclusive||i.name&&o.exclusiveTests[i.name]===!0;if(i.exclusive&&!i.name)throw new TypeError("Exclusive tests must provide a unique `name` identifying the test");return i.name&&(o.exclusiveTests[i.name]=!!i.exclusive),o.tests=o.tests.filter(g=>!(g.OPTIONS.name===i.name&&(h||g.OPTIONS.test===u.OPTIONS.test))),o.tests.push(u),o}when(n,i){!Array.isArray(n)&&typeof n!="string"&&(i=n,n=".");let o=this.clone(),u=C8(n).map(h=>new C0(h));return u.forEach(h=>{h.isSibling&&o.deps.push(h.key)}),o.conditions.push(typeof i=="function"?new L2(u,i):L2.fromOptions(u,i)),o}typeError(n){let i=this.clone();return i.internalTests.typeError=ev({message:n,name:"typeError",skipAbsent:!0,test(o){return this.schema._typeCheck(o)?!0:this.createError({params:{type:this.schema.type}})}}),i}oneOf(n,i=$c.oneOf){let o=this.clone();return n.forEach(u=>{o._whitelist.add(u),o._blacklist.delete(u)}),o.internalTests.whiteList=ev({message:i,name:"oneOf",skipAbsent:!0,test(u){let h=this.schema._whitelist,g=h.resolveAll(this.resolve);return g.includes(u)?!0:this.createError({params:{values:Array.from(h).join(", "),resolved:g}})}}),o}notOneOf(n,i=$c.notOneOf){let o=this.clone();return n.forEach(u=>{o._blacklist.add(u),o._whitelist.delete(u)}),o.internalTests.blacklist=ev({message:i,name:"notOneOf",test(u){let h=this.schema._blacklist,g=h.resolveAll(this.resolve);return g.includes(u)?this.createError({params:{values:Array.from(h).join(", "),resolved:g}}):!0}}),o}strip(n=!0){let i=this.clone();return i.spec.strip=n,i}describe(n){const i=(n?this.resolve(n):this).clone(),{label:o,meta:u,optional:h,nullable:g}=i.spec;return{meta:u,label:o,optional:h,nullable:g,default:i.getDefault(n),type:i.type,oneOf:i._whitelist.describe(),notOneOf:i._blacklist.describe(),tests:i.tests.map(S=>({name:S.OPTIONS.name,params:S.OPTIONS.params})).filter((S,E,A)=>A.findIndex(O=>O.name===S.name)===E)}}}Hc.prototype.__isYupSchema__=!0;for(const t of["validate","validateSync"])Hc.prototype[`${t}At`]=function(n,i,o={}){const{parent:u,parentPath:h,schema:g}=EI(this,n,i,o.context);return g[t](u&&u[h],Object.assign({},o,{parent:u,path:n}))};for(const t of["equals","is"])Hc.prototype[t]=Hc.prototype.oneOf;for(const t of["not","nope"])Hc.prototype[t]=Hc.prototype.notOneOf;const AI=/^(\d{4}|[+-]\d{6})(?:-?(\d{2})(?:-?(\d{2}))?)?(?:[ T]?(\d{2}):?(\d{2})(?::?(\d{2})(?:[,.](\d{1,}))?)?(?:(Z)|([+-])(\d{2})(?::?(\d{2}))?)?)?$/;function wI(t){const n=gw(t);if(!n)return Date.parse?Date.parse(t):Number.NaN;if(n.z===void 0&&n.plusMinus===void 0)return new Date(n.year,n.month,n.day,n.hour,n.minute,n.second,n.millisecond).valueOf();let i=0;return n.z!=="Z"&&n.plusMinus!==void 0&&(i=n.hourOffset*60+n.minuteOffset,n.plusMinus==="+"&&(i=0-i)),Date.UTC(n.year,n.month,n.day,n.hour,n.minute+i,n.second,n.millisecond)}function gw(t){var n,i;const o=AI.exec(t);return o?{year:hd(o[1]),month:hd(o[2],1)-1,day:hd(o[3],1),hour:hd(o[4]),minute:hd(o[5]),second:hd(o[6]),millisecond:o[7]?hd(o[7].substring(0,3)):0,precision:(n=(i=o[7])==null?void 0:i.length)!=null?n:void 0,z:o[8]||void 0,plusMinus:o[9]||void 0,hourOffset:hd(o[10]),minuteOffset:hd(o[11])}:null}function hd(t,n=0){return Number(t)||n}let OI=/^[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,CI=/^((https?|ftp):)?\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(\#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i,MI=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i,DI="^\\d{4}-\\d{2}-\\d{2}",RI="\\d{2}:\\d{2}:\\d{2}",_I="(([+-]\\d{2}(:?\\d{2})?)|Z)",NI=new RegExp(`${DI}T${RI}(\\.\\d+)?${_I}$`),zI=t=>M0(t)||t===t.trim(),LI={}.toString();function dm(){return new N8}class N8 extends Hc{constructor(){super({type:"string",check(n){return n instanceof String&&(n=n.valueOf()),typeof n=="string"}}),this.withMutation(()=>{this.transform((n,i,o)=>{if(!o.spec.coerce||o.isType(n)||Array.isArray(n))return n;const u=n!=null&&n.toString?n.toString():n;return u===LI?n:u})})}required(n){return super.required(n).withMutation(i=>i.test({message:n||$c.required,name:"required",skipAbsent:!0,test:o=>!!o.length}))}notRequired(){return super.notRequired().withMutation(n=>(n.tests=n.tests.filter(i=>i.OPTIONS.name!=="required"),n))}length(n,i=kl.length){return this.test({message:i,name:"length",exclusive:!0,params:{length:n},skipAbsent:!0,test(o){return o.length===this.resolve(n)}})}min(n,i=kl.min){return this.test({message:i,name:"min",exclusive:!0,params:{min:n},skipAbsent:!0,test(o){return o.length>=this.resolve(n)}})}max(n,i=kl.max){return this.test({name:"max",exclusive:!0,message:i,params:{max:n},skipAbsent:!0,test(o){return o.length<=this.resolve(n)}})}matches(n,i){let o=!1,u,h;return i&&(typeof i=="object"?{excludeEmptyString:o=!1,message:u,name:h}=i:u=i),this.test({name:h||"matches",message:u||kl.matches,params:{regex:n},skipAbsent:!0,test:g=>g===""&&o||g.search(n)!==-1})}email(n=kl.email){return this.matches(OI,{name:"email",message:n,excludeEmptyString:!0})}url(n=kl.url){return this.matches(CI,{name:"url",message:n,excludeEmptyString:!0})}uuid(n=kl.uuid){return this.matches(MI,{name:"uuid",message:n,excludeEmptyString:!1})}datetime(n){let i="",o,u;return n&&(typeof n=="object"?{message:i="",allowOffset:o=!1,precision:u=void 0}=n:i=n),this.matches(NI,{name:"datetime",message:i||kl.datetime,excludeEmptyString:!0}).test({name:"datetime_offset",message:i||kl.datetime_offset,params:{allowOffset:o},skipAbsent:!0,test:h=>{if(!h||o)return!0;const g=gw(h);return g?!!g.z:!1}}).test({name:"datetime_precision",message:i||kl.datetime_precision,params:{precision:u},skipAbsent:!0,test:h=>{if(!h||u==null)return!0;const g=gw(h);return g?g.precision===u:!1}})}ensure(){return this.default("").transform(n=>n===null?"":n)}trim(n=kl.trim){return this.transform(i=>i!=null?i.trim():i).test({message:n,name:"trim",test:zI})}lowercase(n=kl.lowercase){return this.transform(i=>M0(i)?i:i.toLowerCase()).test({message:n,name:"string_case",exclusive:!0,skipAbsent:!0,test:i=>M0(i)||i===i.toLowerCase()})}uppercase(n=kl.uppercase){return this.transform(i=>M0(i)?i:i.toUpperCase()).test({message:n,name:"string_case",exclusive:!0,skipAbsent:!0,test:i=>M0(i)||i===i.toUpperCase()})}}dm.prototype=N8.prototype;let VI=new Date(""),UI=t=>Object.prototype.toString.call(t)==="[object Date]";class yw extends Hc{constructor(){super({type:"date",check(n){return UI(n)&&!isNaN(n.getTime())}}),this.withMutation(()=>{this.transform((n,i,o)=>!o.spec.coerce||o.isType(n)||n===null?n:(n=wI(n),isNaN(n)?yw.INVALID_DATE:new Date(n)))})}prepareParam(n,i){let o;if(C0.isRef(n))o=n;else{let u=this.cast(n);if(!this._typeCheck(u))throw new TypeError(`\`${i}\` must be a Date or a value that can be \`cast()\` to a Date`);o=u}return o}min(n,i=mw.min){let o=this.prepareParam(n,"min");return this.test({message:i,name:"min",exclusive:!0,params:{min:n},skipAbsent:!0,test(u){return u>=this.resolve(o)}})}max(n,i=mw.max){let o=this.prepareParam(n,"max");return this.test({message:i,name:"max",exclusive:!0,params:{max:n},skipAbsent:!0,test(u){return u<=this.resolve(o)}})}}yw.INVALID_DATE=VI;function BI(t,n=[]){let i=[],o=new Set,u=new Set(n.map(([g,v])=>`${g}-${v}`));function h(g,v){let S=O0.split(g)[0];o.add(S),u.has(`${v}-${S}`)||i.push([v,S])}for(const g of Object.keys(t)){let v=t[g];o.add(g),C0.isRef(v)&&v.isSibling?h(v.path,g):pw(v)&&"deps"in v&&v.deps.forEach(S=>h(S,g))}return hI.array(Array.from(o),i).reverse()}function z8(t,n){let i=1/0;return t.some((o,u)=>{var h;if((h=n.path)!=null&&h.includes(o))return i=u,!0}),i}function L8(t){return(n,i)=>z8(t,n)-z8(t,i)}const jI=(t,n,i)=>{if(typeof t!="string")return t;let o=t;try{o=JSON.parse(t)}catch{}return i.isType(o)?o:t};function B2(t){if("fields"in t){const n={};for(const[i,o]of Object.entries(t.fields))n[i]=B2(o);return t.setFields(n)}if(t.type==="array"){const n=t.optional();return n.innerType&&(n.innerType=B2(n.innerType)),n}return t.type==="tuple"?t.optional().clone({types:t.spec.types.map(B2)}):"optional"in t?t.optional():t}const $I=(t,n)=>{const i=[...O0.normalizePath(n)];if(i.length===1)return i[0]in t;let o=i.pop(),u=O0.getter(O0.join(i),!0)(t);return!!(u&&o in u)};let V8=t=>Object.prototype.toString.call(t)==="[object Object]";function U8(t,n){let i=Object.keys(t.fields);return Object.keys(n).filter(o=>i.indexOf(o)===-1)}const HI=L8([]);function vw(t){return new B8(t)}class B8 extends Hc{constructor(n){super({type:"object",check(i){return V8(i)||typeof i=="function"}}),this.fields=Object.create(null),this._sortErrors=HI,this._nodes=[],this._excludedEdges=[],this.withMutation(()=>{n&&this.shape(n)})}_cast(n,i={}){var o;let u=super._cast(n,i);if(u===void 0)return this.getDefault(i);if(!this._typeCheck(u))return u;let h=this.fields,g=(o=i.stripUnknown)!=null?o:this.spec.noUnknown,v=[].concat(this._nodes,Object.keys(u).filter(O=>!this._nodes.includes(O))),S={},E=Object.assign({},i,{parent:S,__validating:i.__validating||!1}),A=!1;for(const O of v){let M=h[O],R=O in u;if(M){let U,L=u[O];E.path=(i.path?`${i.path}.`:"")+O,M=M.resolve({value:L,context:i.context,parent:S});let H=M instanceof Hc?M.spec:void 0,V=H==null?void 0:H.strict;if(H!=null&&H.strip){A=A||O in u;continue}U=!i.__validating||!V?M.cast(u[O],E):u[O],U!==void 0&&(S[O]=U)}else R&&!g&&(S[O]=u[O]);(R!==O in S||S[O]!==u[O])&&(A=!0)}return A?S:u}_validate(n,i={},o,u){let{from:h=[],originalValue:g=n,recursive:v=this.spec.recursive}=i;i.from=[{schema:this,value:g},...h],i.__validating=!0,i.originalValue=g,super._validate(n,i,o,(S,E)=>{if(!v||!V8(E)){u(S,E);return}g=g||E;let A=[];for(let O of this._nodes){let M=this.fields[O];!M||C0.isRef(M)||A.push(M.asNestedTest({options:i,key:O,parent:E,parentPath:i.path,originalParent:g}))}this.runTests({tests:A,value:E,originalValue:g,options:i},o,O=>{u(O.sort(this._sortErrors).concat(S),E)})})}clone(n){const i=super.clone(n);return i.fields=Object.assign({},this.fields),i._nodes=this._nodes,i._excludedEdges=this._excludedEdges,i._sortErrors=this._sortErrors,i}concat(n){let i=super.concat(n),o=i.fields;for(let[u,h]of Object.entries(this.fields)){const g=o[u];o[u]=g===void 0?h:g}return i.withMutation(u=>u.setFields(o,[...this._excludedEdges,...n._excludedEdges]))}_getDefault(n){if("default"in this.spec)return super._getDefault(n);if(!this._nodes.length)return;let i={};return this._nodes.forEach(o=>{var u;const h=this.fields[o];let g=n;(u=g)!=null&&u.value&&(g=Object.assign({},g,{parent:g.value,value:g.value[o]})),i[o]=h&&"getDefault"in h?h.getDefault(g):void 0}),i}setFields(n,i){let o=this.clone();return o.fields=n,o._nodes=BI(n,i),o._sortErrors=L8(Object.keys(n)),i&&(o._excludedEdges=i),o}shape(n,i=[]){return this.clone().withMutation(o=>{let u=o._excludedEdges;return i.length&&(Array.isArray(i[0])||(i=[i]),u=[...o._excludedEdges,...i]),o.setFields(Object.assign(o.fields,n),u)})}partial(){const n={};for(const[i,o]of Object.entries(this.fields))n[i]="optional"in o&&o.optional instanceof Function?o.optional():o;return this.setFields(n)}deepPartial(){return B2(this)}pick(n){const i={};for(const o of n)this.fields[o]&&(i[o]=this.fields[o]);return this.setFields(i,this._excludedEdges.filter(([o,u])=>n.includes(o)&&n.includes(u)))}omit(n){const i=[];for(const o of Object.keys(this.fields))n.includes(o)||i.push(o);return this.pick(i)}from(n,i,o){let u=O0.getter(n,!0);return this.transform(h=>{if(!h)return h;let g=h;return $I(h,n)&&(g=Object.assign({},h),o||delete g[n],g[i]=u(h)),g})}json(){return this.transform(jI)}exact(n){return this.test({name:"exact",exclusive:!0,message:n||z2.exact,test(i){if(i==null)return!0;const o=U8(this.schema,i);return o.length===0||this.createError({params:{properties:o.join(", ")}})}})}stripUnknown(){return this.clone({noUnknown:!0})}noUnknown(n=!0,i=z2.noUnknown){typeof n!="boolean"&&(i=n,n=!0);let o=this.test({name:"noUnknown",exclusive:!0,message:i,test(u){if(u==null)return!0;const h=U8(this.schema,u);return!n||h.length===0||this.createError({params:{unknown:h.join(", ")}})}});return o.spec.noUnknown=n,o}unknown(n=!0,i=z2.noUnknown){return this.noUnknown(!n,i)}transformKeys(n){return this.transform(i=>{if(!i)return i;const o={};for(const u of Object.keys(i))o[n(u)]=i[u];return o})}camelCase(){return this.transformKeys(hw.camelCase)}snakeCase(){return this.transformKeys(hw.snakeCase)}constantCase(){return this.transformKeys(n=>hw.snakeCase(n).toUpperCase())}describe(n){const i=(n?this.resolve(n):this).clone(),o=super.describe(n);o.fields={};for(const[h,g]of Object.entries(i.fields)){var u;let v=n;(u=v)!=null&&u.value&&(v=Object.assign({},v,{parent:v.value,value:v.value[h]})),o.fields[h]=g.describe(v)}return o}}vw.prototype=B8.prototype;const PI=vw({name:dm(),base64:dm()}),kI=({imageUrl:t,title:n,subtitle:i})=>B.jsxs("section",{className:"gap-10 flex flex-col items-center justify-center",children:[B.jsx("img",{src:t,alt:n,width:100,height:100}),B.jsx("h1",{className:"font-bold text-2xl align-middle",children:n}),B.jsx("p",{className:"text-lg align-middle font-semibold text-gray-500",children:i})]}),YI=({size:t=16,strokeWidth:n=2,color:i="#1DA696",...o})=>{const u=(t-n)/2,h=2*Math.PI*u,{className:g="",...v}=o;return B.jsx("div",{...v,className:`relative flex items-center justify-center ${g}`,children:B.jsx("svg",{height:t,width:t,className:"animate-spin",children:B.jsx("circle",{stroke:i,fill:"transparent",strokeWidth:n,strokeDasharray:h+" "+h,strokeDashoffset:h/4,r:u,cx:t/2,cy:t/2})})})},GI=({label:t,control:n,name:i,placeholder:o,className:u="",disabled:h=!1,leftSide:g})=>{const{field:{value:v="",onChange:S,ref:E,onBlur:A},fieldState:{error:O}}=Wy({name:i,control:n}),[M,R]=J.useState(!1),{t:U}=ri();return B.jsxs("label",{className:`flex flex-col group gap-8 select-none ${h&&"cursor-not-allowed"} ${u}`,htmlFor:i,children:[B.jsx("h6",{className:`text-gray-600 font-600 group ${O&&"!text-red-500"} text-label ${h&&"text-gray-300"}`,children:t}),B.jsxs("label",{htmlFor:i,className:`
@@ -1,4 +1,4 @@
1
- import { __module as e } from "../../_virtual/index3.js";
1
+ import { __module as e } from "../../_virtual/index6.js";
2
2
  import { __require as o } from "./cjs/scheduler.production.js";
3
3
  import { __require as u } from "./cjs/scheduler.development.js";
4
4
  var r;
@@ -1,6 +1,6 @@
1
- import { p as v } from "../../_virtual/index4.js";
2
- import { t as U } from "../../_virtual/index5.js";
3
- import oe from "../../_virtual/index6.js";
1
+ import { p as v } from "../../_virtual/index3.js";
2
+ import { t as U } from "../../_virtual/index4.js";
3
+ import oe from "../../_virtual/index5.js";
4
4
  const ce = Object.prototype.toString, he = Error.prototype.toString, fe = RegExp.prototype.toString, de = typeof Symbol < "u" ? Symbol.prototype.toString : () => "", pe = /^Symbol\((.*)\)(.*)$/;
5
5
  function me(n) {
6
6
  return n != +n ? "NaN" : n === 0 && 1 / n < 0 ? "-0" : "" + n;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lawgic-dev-kit",
3
- "version": "0.9.1",
3
+ "version": "0.9.2",
4
4
  "description": "Componentes de UI para Lawgic",
5
5
  "type": "module",
6
6
  "private": false,