sodtrack-web-ui 0.116.22 → 0.116.24
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/dist/{chunk-JFNJPH6Q.js → chunk-4CAN7PGG.js} +1 -1
- package/dist/{chunk-O7O4OQS7.js → chunk-673LITHP.js} +1 -1
- package/dist/{chunk-QE7GSKCR.js → chunk-7ZPFUDVQ.js} +1 -1
- package/dist/{chunk-TFFF3K7Q.js → chunk-AIRQLXLO.js} +1 -1
- package/dist/{chunk-ESLG37WV.js → chunk-BSBPGWCQ.js} +1 -1
- package/dist/chunk-CVYZS7KS.js +1 -0
- package/dist/{chunk-ROL7QO77.js → chunk-EOB3AQZ2.js} +1 -1
- package/dist/{chunk-PF4MVOF5.js → chunk-FYB3QRNL.js} +1 -1
- package/dist/{chunk-QW5WQGMU.js → chunk-GJSFXPZK.js} +1 -1
- package/dist/{chunk-SRERRRG5.js → chunk-GUHZX6VO.js} +1 -1
- package/dist/{chunk-D3PE4PX2.js → chunk-H4K4Y44I.js} +1 -1
- package/dist/{chunk-USC2M2KK.js → chunk-IYOPH2ON.js} +1 -1
- package/dist/{chunk-EXMCZUJ2.js → chunk-JGFWDCSB.js} +1 -1
- package/dist/{chunk-HMSYTRZC.js → chunk-K35H5VYN.js} +1 -1
- package/dist/{chunk-OZMHTXPO.js → chunk-M46RFBDO.js} +1 -1
- package/dist/{chunk-DDKZVGV7.js → chunk-M5GLIXO2.js} +1 -1
- package/dist/chunk-MW7DL42Z.js +1 -0
- package/dist/{chunk-WDQBZCSS.js → chunk-PM7QTMJU.js} +1 -1
- package/dist/{chunk-IX3IQQ4Y.js → chunk-Q4Z47CXE.js} +1 -1
- package/dist/{chunk-23G2RUJ6.js → chunk-QZUQ6AZK.js} +1 -1
- package/dist/{chunk-ZV6LLKHX.js → chunk-STYN7WHQ.js} +1 -1
- package/dist/{chunk-5JSN5UOQ.js → chunk-T3ITXF7W.js} +1 -1
- package/dist/{chunk-JP6ISUKM.js → chunk-UBTRI4EA.js} +1 -1
- package/dist/{chunk-VPSFJ44I.js → chunk-VB5Q6KYT.js} +1 -1
- package/dist/{chunk-ZT5LFL76.js → chunk-VIL6Q52L.js} +1 -1
- package/dist/{chunk-QHYVXJOY.js → chunk-WPF6FUFA.js} +1 -1
- package/dist/{chunk-QXPABENJ.js → chunk-XD7NWI2J.js} +1 -1
- package/dist/{chunk-UIFUOIQY.js → chunk-XVT4DHX3.js} +1 -1
- package/dist/{chunk-ZZTNVPXU.js → chunk-YCNBKZGC.js} +1 -1
- package/dist/chunk-ZYFA5BA3.js +1 -0
- package/dist/components/attachment-card.js +1 -1
- package/dist/components/autocomplete-multiple.js +1 -1
- package/dist/components/autocomplete-skeleton.js +1 -1
- package/dist/components/autocomplete.js +1 -1
- package/dist/components/button-active.js +1 -1
- package/dist/components/button-menu.js +1 -1
- package/dist/components/card-basic.d.ts +1 -0
- package/dist/components/card-basic.js +1 -1
- package/dist/components/card-expandable.js +1 -1
- package/dist/components/checkbox.js +1 -1
- package/dist/components/choice-chips.js +1 -1
- package/dist/components/data-table.js +1 -1
- package/dist/components/date-picker.js +1 -1
- package/dist/components/drawer-bar.js +1 -1
- package/dist/components/dropzone.js +1 -1
- package/dist/components/index.d.ts +1 -1
- package/dist/components/index.js +1 -1
- package/dist/components/list-item-arrow.js +1 -1
- package/dist/components/list-item-button.js +1 -1
- package/dist/components/list-item-checkbox-left.js +1 -1
- package/dist/components/list-item-checkbox.js +1 -1
- package/dist/components/list-item.d.ts +4 -2
- package/dist/components/list-item.js +1 -1
- package/dist/components/list-item_old.js +1 -1
- package/dist/components/menu.js +1 -1
- package/dist/components/multi-select-chips.js +1 -1
- package/dist/components/note-card.js +1 -1
- package/dist/components/number-field.js +1 -1
- package/dist/components/radio.js +1 -1
- package/dist/components/select-skeleton.js +1 -1
- package/dist/components/select.js +1 -1
- package/dist/components/signature-pad.js +1 -1
- package/dist/components/text-field.js +1 -1
- package/dist/components/textarea.js +1 -1
- package/dist/components/time-picker.js +1 -1
- package/dist/components/tooltip.js +1 -1
- package/dist/components/tracker-item.js +1 -1
- package/dist/preferences.js +1 -1
- package/dist/styles/index.css +1 -1
- package/package.json +1 -1
- package/dist/chunk-3KEDPBIR.js +0 -1
- package/dist/chunk-3RNV3YTB.js +0 -1
- package/dist/chunk-CMGP26EZ.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import {c}from'./chunk-
|
|
1
|
+
import {c}from'./chunk-QZUQ6AZK.js';import {a}from'./chunk-MW7DL42Z.js';import {e}from'./chunk-QMPBFFFC.js';import {RadioGroupRoot,RadioGroupLabel,RadioGroupItem,RadioGroupItemControl,RadioGroupItemText,RadioGroupItemHiddenInput}from'@ark-ui/react/radio-group';import {forwardRef,useCallback}from'react';import {tv}from'tailwind-variants';import {jsxs,jsx}from'react/jsx-runtime';var J=["horizontal","vertical"];var O=tv({slots:{item:["group/item my-0.5 flex w-fit items-center gap-1","data-disabled:cursor-not-allowed"],control:["relative m-0.5 size-4.5 rounded-full border ring-inset","before:absolute before:h-full before:w-full before:rounded-full before:border-3 before:border-transparent","border-neutral-600 bg-neutral-50","data-[state=unchecked]:group-hover/item:[&:not([data-disabled])]:border-primary-700","data-[state=unchecked]:group-hover/item:[&:not([data-disabled])]:bg-primary-200","data-[state=checked]:border-primary-600","data-[state=checked]:bg-primary-600","data-[state=checked]:before:border-neutral-50","data-[state=checked]:group-hover/item:[&:not([data-disabled])]:border-primary-700","data-[state=checked]:group-hover/item:[&:not([data-disabled])]:bg-primary-700","data-[state=checked]:group-hover/item:[&:not([data-disabled])]:before:ring-transparent-primary-400-40","data-[state=checked]:group-hover/item:[&:not([data-disabled])]:before:ring-3","data-[state=checked]:group-hover/item:[&:not([data-disabled])]:after:absolute","data-[state=checked]:group-hover/item:[&:not([data-disabled])]:after:h-full","data-[state=checked]:group-hover/item:[&:not([data-disabled])]:after:w-full","data-[state=checked]:group-hover/item:[&:not([data-disabled])]:after:rounded-full","data-[state=checked]:group-hover/item:[&:not([data-disabled])]:after:border-3","data-[state=checked]:group-hover/item:[&:not([data-disabled])]:after:border-transparent-primary-400-40","data-[state=checked]:group-hover/item:[&:not([data-disabled])]:after:bg-transparent","focus:border-2","focus:border-primary-800","data-[state=checked]:focus:before:bg-primary-800","data-disabled:data-[state=unchecked]:border-neutral-400","data-disabled:data-[state=unchecked]:bg-neutral-200","data-disabled:data-[state=checked]:border-neutral-400","data-disabled:data-[state=checked]:bg-neutral-200","data-disabled:data-[state=checked]:before:border-neutral-200","data-disabled:data-[state=checked]:before:bg-neutral-600","group-data-[error=true]:data-[state=unchecked]:border-0","group-data-[error=true]:data-[state=unchecked]:ring-2","group-data-[error=true]:data-[state=unchecked]:ring-danger-500","group-data-[error=true]:data-[state=unchecked]:focus:border-0"],text:["font-inter text-sm leading-[143%]","text-neutral-900","data-disabled:text-neutral-600"],tooltipContainer:"flex items-center gap-2",tooltipIcon:"size-3.5"},variants:{disabled:{true:{tooltipIcon:"text-neutral-600"}}}}),T=tv({base:"group",variants:{labelOrientation:{horizontal:"flex gap-4",vertical:"flex flex-col gap-3"}}}),z=tv({base:"flex",variants:{orientation:{horizontal:"flex-wrap gap-8",vertical:"flex-col gap-4"}}}),w=forwardRef(({className:n,innerClassName:a,orientation:t="horizontal",labelOrientation:o="vertical",onValueChange:r,error:d,label:i,labelProps:s,required:p,tooltip:u,children:c$1,...m},b)=>{let l=useCallback(k=>{r?.(k.value);},[r]);return jsxs(RadioGroupRoot,{"data-error":d,className:T({className:n,labelOrientation:o}),orientation:t,ref:b,onValueChange:l,...m,children:[i&&jsx(c,{...s,as:RadioGroupLabel,label:i,required:p,tooltip:s?.tooltip??u,className:"mb-0"}),jsx("div",{className:z({orientation:t,className:a}),children:c$1})]})});w.displayName="RadioGroup";var V=forwardRef(({value:n,label:a$1,className:t,tooltip:o,tooltipProps:r,disabled:d,...i},s)=>{let{item:p,control:u,text:c,tooltipContainer:m,tooltipIcon:b}=O({disabled:d}),l=jsxs(RadioGroupItem,{value:n,className:p({className:t}),disabled:d,ref:s,...i,children:[jsx(RadioGroupItemControl,{className:u()}),a$1&&jsx(RadioGroupItemText,{className:c(),children:a$1}),jsx(RadioGroupItemHiddenInput,{})]});return o?jsxs("div",{className:m(),children:[l,jsx(a,{...r,content:o,children:jsx(e,{className:b()})})]}):l});V.displayName="RadioGroupItem";export{J as a,O as b,w as c,V as d};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {d,c,b as b$1}from'./chunk-
|
|
1
|
+
import {d,c,b as b$1}from'./chunk-CVYZS7KS.js';import {d as d$1}from'./chunk-YFDUDY6Y.js';import {a as a$2}from'./chunk-MW7DL42Z.js';import {B,h}from'./chunk-QMPBFFFC.js';import {a as a$1}from'./chunk-HZYZAFW3.js';import {e}from'./chunk-Y3ZZYSKX.js';import {a}from'./chunk-OBZIYJO7.js';import {useLocaleContext}from'@ark-ui/react/locale';import {getDefaultOptions}from'date-fns';import {tv}from'tailwind-variants';import {jsx,jsxs}from'react/jsx-runtime';var n=tv({slots:{header:"flex w-full flex-col gap-3 px-3 py-2 font-normal",author:"min-w-0",authorLabel:"text-xs text-neutral-700 uppercase",authorRow:"mt-0.5 flex items-center justify-between gap-3",authorName:"min-w-0 text-sm font-semibold break-words",authorSecondary:"mt-0.5 text-xs break-words text-neutral-800",bodyFile:"flex min-w-0 items-center gap-3",fileIcon:"size-12 shrink-0",fileText:"flex min-w-0 flex-1 flex-col gap-0.5",fileName:"text-sm font-semibold break-words text-neutral-900",fileDescription:"line-clamp-1 text-xs text-neutral-800",meta:"flex min-w-0 flex-wrap items-center gap-2 empty:hidden",footer:"flex items-center gap-3",date:"min-w-0 text-sm text-neutral-700",footerActions:"ml-auto flex shrink-0 items-center gap-3"}}),u=()=>{let{locale:t}=useLocaleContext();return t??getDefaultOptions().locale?.code},C={en:{author:"Creator",externalReference:"Ext. ref.",addExternalReference:"Add ext. ref."},es:{author:"Creador/a",externalReference:"Ref. ext.",addExternalReference:"Agregar ref. ext."},pt:{author:"Criador",externalReference:"Ref. ext.",addExternalReference:"Adicionar ref. ext."}},A=t=>t?.startsWith("es")?C.es:t?.startsWith("pt")?C.pt:C.en,b=({children:t,className:e,...r})=>{let{header:o}=n();return jsx("div",{className:o({className:e}),...r,children:t})};b.displayName="AttachmentCardHeader";var L=()=>{let t=u(),{authorLabel:e}=n();return jsx("p",{className:e(),children:A(t).author})};L.displayName="AttachmentCardAuthorLocalizedLabel";var v=({label:t,name:e,secondary:r,actions:o,className:d})=>{let{author:i,authorLabel:l,authorRow:m,authorName:$,authorSecondary:K}=n();return jsxs("div",{className:i({className:d}),children:[t?jsx("p",{className:l(),children:t}):jsx(L,{}),jsxs("div",{className:m(),children:[jsx("p",{className:$(),children:e}),o]}),r&&jsx("p",{className:K(),children:r})]})};v.displayName="AttachmentCardAuthor";var w=({children:t,className:e,...r})=>jsx(b$1,{className:a("min-w-0",e),...r,children:t});w.displayName="AttachmentCardBody";var W=({name:t,description:e,className:r})=>{let{bodyFile:o,fileIcon:d,fileText:i,fileName:l,fileDescription:m}=n();return jsxs("div",{className:o({className:r}),children:[jsxs("div",{className:i(),children:[jsx("p",{className:l(),children:t}),e&&jsx("p",{className:m(),children:e})]}),jsx(a$1,{className:d(),"aria-hidden":true})]})};W.displayName="AttachmentCardBodyFile";var I=({children:t,className:e})=>{let{meta:r}=n();return jsx("div",{className:r({className:e}),children:t})};I.displayName="AttachmentCardMeta";var E=({children:t,className:e,...r})=>{let{footer:o}=n();return jsx(c,{className:o({className:e}),...r,children:t})};E.displayName="AttachmentCardFooter";var S=({children:t,className:e})=>{let{date:r}=n();return jsx("span",{className:r({className:e}),children:t})};S.displayName="AttachmentCardDate";var T=({children:t,className:e})=>{let{footerActions:r}=n();return jsx("div",{className:r({className:e}),children:t})};T.displayName="AttachmentCardFooterActions";var z=t=>jsx(e,{...t,variant:"ghost",tone:"neutral",size:"md",EndIcon:h});z.displayName="AttachmentCardActionButton";var f=({badgeText:t})=>jsx(a$2,{content:t,children:jsx(d$1,{variant:"light",size:"sm",color:"neutral",className:"max-w-full",text:t})});f.displayName="AttachmentCardReferenceBadgeContent";var D=({value:t})=>{let e=u(),r=`${A(e).externalReference}: ${t}`;return jsx(f,{badgeText:r})};D.displayName="AttachmentCardReferenceBadgeWithLocale";var y=({label:t,value:e})=>e==null||e===""?null:t?jsx(f,{badgeText:`${t}: ${e}`}):jsx(D,{value:e});y.displayName="AttachmentCardReferenceBadge";var k=t=>{let e$1=u();return jsx(e,{...t,variant:"secondary",size:"sm",StartIcon:B,children:A(e$1).addExternalReference})};k.displayName="AttachmentCardReferenceAddButtonWithLocale";var H=({children:t,...e$1})=>t?jsx(e,{...e$1,variant:"secondary",size:"sm",StartIcon:B,children:t}):jsx(k,{...e$1});H.displayName="AttachmentCardReferenceAddButton";var M=({label:t,value:e,addAction:r})=>e!=null&&e!==""?jsx(y,{label:t,value:e}):r??null;M.displayName="AttachmentCardReference";var O=({children:t,className:e,...r})=>jsx(d,{variant:"outline",tone:"neutral",className:a("elevation-8 w-full border-0",e),...r,children:t});O.displayName="AttachmentCard";var et=Object.assign(O,{Header:b,Author:v,Body:w,BodyFile:W,Meta:I,Footer:E,Date:S,FooterActions:T,ActionButton:z,Reference:M,ReferenceBadge:y,ReferenceAddButton:H});export{et as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {b as b$1}from'./chunk-XN6VHPJL.js';import {c}from'./chunk-
|
|
1
|
+
import {b as b$1}from'./chunk-XN6VHPJL.js';import {c}from'./chunk-WPF6FUFA.js';import {d}from'./chunk-WAUY2MS6.js';import {a}from'./chunk-AWRP67K4.js';import {e as e$1}from'./chunk-PI7DECIN.js';import {L}from'./chunk-QMPBFFFC.js';import {e}from'./chunk-Y3ZZYSKX.js';import {a as a$2}from'./chunk-WXHE4RLE.js';import {a as a$1}from'./chunk-OBZIYJO7.js';import {getDefaultOptions}from'date-fns';import {tv}from'tailwind-variants';import {jsx,jsxs}from'react/jsx-runtime';var t=tv({slots:{root:"ring-drawer-bar-border @container flex w-full flex-col rounded-md bg-neutral-100 ring ring-inset",header:"border-drawer-bar-border py-3.125 flex flex-wrap items-center gap-3 border-b px-4 last:border-b-0 @md:gap-2",main:"border-drawer-bar-border py-1.875 flex flex-col items-stretch gap-2 border-b px-2 last:border-b-0 @md:flex-row @md:items-center",actions:"flex shrink-0 items-center gap-3 @max-md:flex-wrap",selection:"ml-auto flex items-center gap-3",selectionLabel:"text-sm leading-[143%] font-medium text-neutral-900",divider:"h-4 @max-md:h-px @max-md:w-full",filters:"flex flex-col gap-2 px-2 pt-3 pb-2 @md:flex-row @md:justify-between"}}),z=r=>r?.startsWith("es")?"Seleccionados":r?.startsWith("pt")?"Selecionados":"Selected",W=r=>r?.startsWith("es")?"Limpiar todo":r?.startsWith("pt")?"Limpar tudo":"Clear all",D=r=>{let{header:e}=t();return jsx("div",{...r,className:e()})};D.displayName="DrawerBarHeader";var f=({label:r,...e})=>{let{locale:o}=getDefaultOptions(),{selectionLabel:i,selection:s}=t();return jsxs("div",{className:s(),children:[jsx("span",{className:i(),children:r??z(o?.code)}),jsx(a$2,{...e,size:"md",variant:"primary",type:"square"})]})};f.displayName="DrawerBarSelection";var C=r=>jsx(c,{...r,variant:"outline",orientation:"horizontal",size:"sm"});C.displayName="DrawerBarChoiceChips";var v=r=>{let{main:e}=t();return jsx("div",{...r,className:e()})};v.displayName="DrawerBarMain";var P=r=>jsx(b$1,{size:"lg",...r});P.displayName="DrawerBarSearchBar";var N=({children:r})=>{let{actions:e}=t();return jsx("div",{className:e(),children:r})};N.displayName="DrawerBarActions";var b=({className:r,...e$1})=>jsx(e,{...e$1,className:a$1("@max-md:w-full",r),variant:"ghost",size:"md"});b.displayName="DrawerBarActionButton";var y=r=>jsx(e$1,{...r,variant:"ghost",size:"md"});y.displayName="DrawerBarActionIconButton";var g=()=>{let{divider:r}=t();return jsx(a,{orientation:"vertical",variant:"400",className:r()})};g.displayName="DrawerBarDivider";var x=({children:r,onClear:e$1,clearLabel:o})=>{let{locale:i}=getDefaultOptions(),{filters:s}=t();return jsxs("div",{className:s(),children:[jsx("div",{className:"flex min-w-0 flex-wrap items-center gap-2",children:r}),e$1&&jsx(e,{size:"sm",variant:"ghost",StartIcon:L,onClick:e$1,children:o??W(i?.code)})]})};x.displayName="DrawerBarFilters";var F=r=>jsx(d,{size:"md",variant:"fill",color:"neutral",...r});F.displayName="DrawerBarFilterChipInput";var S=({children:r,className:e,...o})=>{let{root:i}=t();return jsx("div",{className:i({className:e}),...o,children:r})};S.displayName="DrawerBar";var Y=Object.assign(S,{Header:D,Selection:f,ChoiceChips:C,Main:v,SearchBar:P,Actions:N,ActionButton:b,ActionIconButton:y,Divider:g,Filters:x,FilterChipInput:F});export{Y as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {d,c,b as b$1}from'./chunk-
|
|
1
|
+
import {d,c,b as b$1}from'./chunk-CVYZS7KS.js';import {d as d$1}from'./chunk-YFDUDY6Y.js';import {a as a$2}from'./chunk-MW7DL42Z.js';import {d as d$2}from'./chunk-MP4CHZ2K.js';import {N as N$1,B,h}from'./chunk-QMPBFFFC.js';import {e}from'./chunk-Y3ZZYSKX.js';import {a as a$1}from'./chunk-OBZIYJO7.js';import {useLocaleContext}from'@ark-ui/react/locale';import {getDefaultOptions}from'date-fns';import {tv}from'tailwind-variants';import {jsx,jsxs}from'react/jsx-runtime';var a=tv({slots:{header:"flex w-full flex-col gap-3 px-3 py-2 font-normal",authorLabel:"text-xs text-neutral-700 uppercase",authorRow:"mt-0.5 flex items-center justify-between gap-3",authorName:"min-w-0 text-sm font-semibold break-words",authorSecondary:"mt-0.5 text-xs break-words text-neutral-800",bodyText:"min-w-0 text-sm break-words text-neutral-900",meta:"flex min-w-0 flex-wrap items-center gap-2 empty:hidden",footer:"flex items-center gap-3",date:"min-w-0 text-sm text-neutral-700",footerActions:"ml-auto flex shrink-0 items-center gap-3"}}),p=()=>{let{locale:e}=useLocaleContext();return e??getDefaultOptions().locale?.code},l={en:{author:"Creator",externalReference:"Ext. ref.",addExternalReference:"Add ext. ref."},es:{author:"Creador/a",externalReference:"Ref. ext.",addExternalReference:"Agregar ref. ext."},pt:{author:"Criador",externalReference:"Ref. ext.",addExternalReference:"Adicionar ref. ext."}},C=e=>e?.startsWith("es")?l.es:e?.startsWith("pt")?l.pt:l.en,P=({children:e,className:t,...o})=>{let{header:n}=a();return jsx("div",{className:n({className:t}),...o,children:e})};P.displayName="NoteCardHeader";var A=({label:e,variant:t})=>jsx(d$2,{className:"self-start",size:"xs",variant:t,type:"full",children:e});A.displayName="NoteCardBadge";var b=()=>{let e=p(),{authorLabel:t}=a();return jsx("p",{className:t(),children:C(e).author})};b.displayName="NoteCardAuthorLocalizedLabel";var v=({label:e,name:t,secondary:o,actions:n})=>{let{authorLabel:k,authorRow:$,authorName:_,authorSecondary:K}=a();return jsxs("div",{className:"min-w-0",children:[e!=null?jsx("p",{className:k(),children:e}):jsx(b,{}),jsxs("div",{className:$(),children:[jsx("p",{className:_(),children:t}),n]}),o&&jsx("p",{className:K(),children:o})]})};v.displayName="NoteCardAuthor";var F=({children:e,className:t,...o})=>jsx(b$1,{className:a$1("min-w-0",t),...o,children:e});F.displayName="NoteCardBody";var G={1:"line-clamp-1",2:"line-clamp-2",3:"line-clamp-3"},L=({children:e,lineClamp:t=2})=>{let{bodyText:o}=a();return jsx("p",{className:a$1(o(),t!==0&&G[t]),children:e})};L.displayName="NoteCardBodyText";var w=({children:e})=>{let{meta:t}=a();return jsx("div",{className:t(),children:e})};w.displayName="NoteCardMeta";var T=({children:e,className:t,...o})=>{let{footer:n}=a();return jsx(c,{className:n({className:t}),...o,children:e})};T.displayName="NoteCardFooter";var W=({children:e})=>{let{date:t}=a();return jsx("span",{className:t(),children:e})};W.displayName="NoteCardDate";var E=({children:e})=>{let{footerActions:t}=a();return jsx("div",{className:t(),children:e})};E.displayName="NoteCardFooterActions";var S=e$1=>jsx(e,{...e$1,variant:"ghost",tone:"neutral",size:"md",EndIcon:h});S.displayName="NoteCardActionButton";var N=({badgeText:e})=>jsx(a$2,{content:e,children:jsx(d$1,{variant:"light",size:"sm",color:"neutral",className:"max-w-full",text:e})});N.displayName="NoteCardReferenceBadgeContent";var I=({value:e})=>{let t=p(),o=`${C(t).externalReference}: ${e}`;return jsx(N,{badgeText:o})};I.displayName="NoteCardReferenceBadgeWithLocale";var m=({label:e,value:t})=>e!=null?jsx(N,{badgeText:`${e}: ${t}`}):jsx(I,{value:t});m.displayName="NoteCardReferenceBadge";var z=e$1=>{let t=p();return jsx(e,{...e$1,variant:"secondary",size:"sm",StartIcon:B,children:C(t).addExternalReference})};z.displayName="NoteCardReferenceAddButtonWithLocale";var D=({children:e$1,...t})=>e$1!=null?jsx(e,{...t,variant:"secondary",size:"sm",StartIcon:B,children:e$1}):jsx(z,{...t});D.displayName="NoteCardReferenceAddButton";var M=({label:e,value:t,addAction:o})=>t!=null&&t!==""?jsx(m,{label:e,value:t}):o??null;M.displayName="NoteCardReference";var O=({count:e})=>jsx(d$1,{variant:"light",size:"md",color:"primary",icon:N$1,text:String(e)});O.displayName="NoteCardAttachmentsBadge";var H=({children:e,className:t,...o})=>jsx(d,{variant:"outline",tone:"neutral",className:a$1("elevation-8 w-full border-0",t),...o,children:e});H.displayName="NoteCard";var ae=Object.assign(H,{Header:P,Badge:A,Author:v,Body:F,BodyText:L,Meta:w,Footer:T,Date:W,FooterActions:E,ActionButton:S,Reference:M,ReferenceBadge:m,ReferenceAddButton:D,AttachmentsBadge:O});export{ae as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {b as b$1}from'./chunk-
|
|
1
|
+
import {b as b$1}from'./chunk-ZYFA5BA3.js';import {a as a$1}from'./chunk-AWRP67K4.js';import {a}from'./chunk-OBZIYJO7.js';import {MenuPositioner,MenuContent,MenuItem,MenuTrigger,MenuRoot}from'@ark-ui/react/menu';import {Portal}from'@ark-ui/react/portal';import {forwardRef}from'react';import {jsx,jsxs,Fragment}from'react/jsx-runtime';var c="data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=open]:fade-in-0 data-[state=closed]:fade-out-0 data-[state=open]:duration-150 data-[state=closed]:duration-100 data-[state=open]:ease-out data-[state=closed]:ease-in data-[state=open]:data-[side=bottom]:slide-in-from-top-1 data-[state=closed]:data-[side=bottom]:slide-out-to-top-1 data-[state=open]:data-[side=top]:slide-in-from-bottom-1 data-[state=closed]:data-[side=top]:slide-out-to-bottom-1 data-[state=open]:data-[side=left]:slide-in-from-right-1 data-[state=closed]:data-[side=left]:slide-out-to-right-1 data-[state=open]:data-[side=right]:slide-in-from-left-1 data-[state=closed]:data-[side=right]:slide-out-to-left-1 motion-reduce:data-[state=open]:animate-none motion-reduce:data-[state=closed]:animate-none";var b={placement:"bottom-start",flip:["bottom-end"]},A=({lazyMount:n=true,unmountOnExit:s=true,positioning:a=b,onSelect:o,...i})=>jsx(MenuRoot,{lazyMount:n,unmountOnExit:s,positioning:a,...i,onSelect:o?r=>o(r.value):void 0}),k=MenuTrigger,v=MenuItem,x=a("elevation-9 z-layer max-h-67.5 max-w-[calc(100vw-1rem)] min-w-max overflow-y-auto rounded-lg bg-neutral-50 py-1 outline-none",c),g=forwardRef(({className:n,children:s,...a$1},o)=>jsx(Portal,{children:jsx(MenuPositioner,{children:jsx(MenuContent,{ref:o,className:a(x,n),...a$1,children:s})})}));g.displayName="MenuContent";var L="data-highlighted:bg-primary-100 outline-none [&_p]:break-normal",T=({value:n,label:s,description:a,startIcon:o,endIcon:i,hasDivider:r,disabled:l,onSelect:u})=>jsxs(Fragment,{children:[jsx(MenuItem,{value:n,disabled:l,onSelect:u?()=>u(n):void 0,asChild:true,children:jsxs(b$1.Root,{disabled:l,className:L,children:[o&&jsx(b$1.Leading,{children:jsx(b$1.Icon,{children:o})}),jsxs(b$1.Content,{children:[jsx(b$1.Headline,{children:s}),a&&jsx(b$1.Description,{children:a})]}),i&&jsx(b$1.Trailing,{children:jsx(b$1.Icon,{children:i})})]})}),r&&jsx(a$1,{})]}),S={Root:A,Trigger:k,Content:g,Item:v,Option:T};export{S as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import {d}from'./chunk-7JM2X4UD.js';import {c}from'./chunk-FYB3QRNL.js';import {a as a$3}from'./chunk-TN46TEUP.js';import {a as a$1}from'./chunk-MW7DL42Z.js';import {e as e$1}from'./chunk-PI7DECIN.js';import {e}from'./chunk-QMPBFFFC.js';import {e as e$2}from'./chunk-Y3ZZYSKX.js';import {a as a$2}from'./chunk-WXHE4RLE.js';import {a}from'./chunk-OBZIYJO7.js';import {createContext,useContext,useState}from'react';import {tv}from'tailwind-variants';import {ImageIcon}from'lucide-react';import {jsx,jsxs}from'react/jsx-runtime';var l={tone:"neutral",variant:"fill",disabled:false},m=tv({slots:{root:"flex flex-col rounded-lg border",headerIcon:"size-3.5 shrink-0",headerTitle:"min-w-0 truncate text-sm font-medium",infoIcon:"size-3.5 shrink-0",headerInfo:"flex min-w-0 shrink items-center gap-1 overflow-hidden",headerInfoText:"text-2xs min-w-0 truncate text-neutral-800",description:"text-xs text-neutral-700",separator:"border-t first:border-t-0"},variants:{tone:{neutral:{headerIcon:"text-neutral-900",headerTitle:"text-neutral-900",infoIcon:"text-neutral-900"},primary:{headerIcon:"text-primary-700",headerTitle:"text-primary-700",infoIcon:"text-primary-700"}},variant:{outline:{},fill:{}},disabled:{true:{headerIcon:"text-neutral-600",headerTitle:"text-neutral-600",infoIcon:"text-neutral-600",headerInfoText:"text-neutral-600",description:"text-neutral-600"},false:{}}},compoundVariants:[{tone:"neutral",variant:"outline",class:{root:"border-neutral-400 bg-neutral-50",separator:"border-neutral-400"}},{tone:"neutral",variant:"fill",class:{root:"border-neutral-300 bg-neutral-100",separator:"border-neutral-300"}},{tone:"primary",variant:"outline",class:{root:"border-primary-600 bg-neutral-50",separator:"border-primary-600"}},{tone:"primary",variant:"fill",class:{root:"bg-primary-50 border-primary-400",separator:"border-primary-400"}},{disabled:true,variant:"outline",class:{root:"border-neutral-400",separator:"border-neutral-400"}},{disabled:true,variant:"fill",class:{root:"border-neutral-300 bg-neutral-100",separator:"border-neutral-300"}}],defaultVariants:l}),I=createContext(l),h=()=>useContext(I),G=({src:e,alt:r})=>{let[s,a]=useState(false);return !e||s?jsx("div",{className:"flex size-4 shrink-0 items-center justify-center rounded-sm bg-neutral-200",children:jsx(ImageIcon,{className:"size-3 text-neutral-400","aria-hidden":true})}):jsx("img",{src:e,alt:r??"",onError:()=>a(true),className:"size-4 shrink-0 rounded-sm object-cover"})},J=(e,r,s)=>{switch(e.type){case "icon":{let a=e.Icon,o=jsx(a,{className:r,"aria-hidden":true});if(!e.tooltipProps)return o;let{positioning:i,...n}=e.tooltipProps;return jsx(a$1,{...n,positioning:{placement:"bottom-start",...i},children:o})}case "checkbox":return jsx(c,{checked:e.checked,defaultChecked:e.defaultChecked,onCheckedChange:e.onCheckedChange,disabled:s||e.disabled});case "switch":return jsx(d,{checked:e.checked,defaultChecked:e.defaultChecked,onCheckedChange:e.onCheckedChange,disabled:s||e.disabled,size:"sm",variant:"primary",type:"base"});case "image":return jsx(G,{src:e.src,alt:e.alt});default:return e}},P=({title:e$3,leading:r,description:s,info:a$4,tooltipProps:o,badgeNumber:i,actions:n,className:u,...x})=>{let{tone:S,variant:z,disabled:C}=h(),{headerIcon:H,headerTitle:F,infoIcon:f,headerInfo:A,headerInfoText:R,description:V}=m({tone:S,variant:z,disabled:C});return jsxs("div",{className:a("grid items-center gap-x-2 gap-y-1 px-3 py-2",r?"grid-cols-[auto_minmax(0,1fr)]":"grid-cols-1",u),...x,children:[r&&J(r,H(),C),jsxs("div",{className:"flex min-w-0 items-center justify-between gap-2",children:[jsxs("div",{className:"flex min-w-0 flex-1 items-center gap-2",children:[jsxs("div",{className:"flex min-w-0 flex-1 items-center gap-2",children:[jsx("div",{className:F(),children:e$3}),o&&jsx(a$1,{...o,asChild:false,className:"shrink-0",children:jsx(e,{className:f(),"aria-label":typeof o.content=="string"?o.content:typeof e$3=="string"?e$3:void 0})}),i&&jsx(a$2,{className:a("shrink-0",C&&"opacity-50 grayscale"),text:i.text,affix:i.affix,size:"md",variant:"primary",type:"square"})]}),typeof a$4=="string"||typeof a$4=="number"?String(a$4).trim()!==""&&jsxs("div",{className:A(),children:[jsx(e,{className:f(),"aria-hidden":true}),jsx("span",{className:R(),children:a$4})]}):a$4]}),n&&jsxs("div",{className:"flex shrink-0 items-center gap-2",children:[n.badgeExpandable&&jsx(a$3,{...n.badgeExpandable}),n.iconButtons?.map((O,M)=>{let{tooltipContent:v,..._}=O;return jsx(a$1,{content:v,disabled:!v,children:jsx(e$1,{variant:"ghost",tone:"neutral",size:"sm",..._})},M)}),n.button&&jsx(e$2,{...n.button,size:"sm"})]})]}),s&&jsx("div",{className:a(V(),r&&"col-start-2"),children:s})]})};P.displayName="CardBasicHeader";var E=({children:e,className:r,...s})=>{let{tone:a$1,variant:o,disabled:i}=h(),{separator:n}=m({tone:a$1,variant:o,disabled:i});return jsx("div",{className:a("flex flex-col gap-4 px-3 py-4.5",n(),r),...s,children:e})};E.displayName="CardBasicBody";var L=({children:e,className:r,...s})=>{let{tone:a$1,variant:o,disabled:i}=h(),{separator:n}=m({tone:a$1,variant:o,disabled:i});return jsx("div",{className:a("px-3 py-4.5",n(),r),...s,children:e})};L.displayName="CardBasicFooter";var w=({as:e,children:r,className:s,tone:a=l.tone,variant:o=l.variant,disabled:i=l.disabled,...n})=>{let u=e??"div",{root:x}=m({tone:a,variant:o,disabled:i});return jsx(I.Provider,{value:{tone:a,variant:o,disabled:i},children:jsx(u,{className:x({className:s}),...n,children:r})})};w.displayName="CardBasic";var fe=Object.assign(w,{Header:P,Body:E,Footer:L});export{P as a,E as b,L as c,fe as d};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {a}from'./chunk-
|
|
1
|
+
import {a}from'./chunk-BSBPGWCQ.js';import {g}from'./chunk-QMPBFFFC.js';import {d}from'./chunk-Y3ZZYSKX.js';import {useCallback}from'react';import {tv}from'tailwind-variants';import {jsxs,jsx}from'react/jsx-runtime';var O=["sm","md","lg"],S=["primary","secondary","ghost"],R=["primary","neutral"],A=tv({extend:d,slots:{root:"group data-[state=open]:ring-primary-800 gap-2 outline-none data-[state=open]:ring-3 data-[state=open]:ring-inset"},variants:{disabled:{true:{},false:{}}}}),h=({label:u,StartIcon:o,options:p,onSelect:s,variant:m="primary",size:d="md",disabled:a$1=false,className:v,tone:g$1="primary",...b})=>{let y=useCallback(t=>{s?.(t);},[s]),{root:f,icon:r}=A({variant:m,size:d,tone:g$1,disabled:a$1});return jsxs(a.Root,{onSelect:y,...b,children:[jsxs(a.Trigger,{disabled:a$1,className:f({className:v}),children:[o&&jsx(o,{className:r()}),u,jsx(g,{className:r({className:"transition-transform duration-150 group-data-[state=open]:rotate-180"})})]}),jsx(a.Content,{children:p.map(t=>jsx(a.Option,{value:t.value,label:t.label,description:t.description,startIcon:t.startIcon,endIcon:t.endIcon,hasDivider:t.hasDivider,disabled:t.disabled,onSelect:t.onClick},t.value))})]})};export{O as a,S as b,R as c,h as d};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {a}from'./chunk-
|
|
1
|
+
import {a}from'./chunk-MW7DL42Z.js';import {k,l,e}from'./chunk-QMPBFFFC.js';import {CheckboxRoot,CheckboxControl,CheckboxIndicator,CheckboxLabel,CheckboxHiddenInput}from'@ark-ui/react';import {useCallback}from'react';import {tv}from'tailwind-variants';import {jsxs,jsx}from'react/jsx-runtime';var B=[true,"indeterminate",false],D=tv({slots:{root:"group relative flex h-fit w-fit items-center gap-2 transition-all data-disabled:cursor-not-allowed",control:["m-0.5 flex size-4.5 items-center justify-center rounded-sm transition-all ring-inset [&:not([data-disabled])]:cursor-pointer","focus:ring-primary-800 focus:ring-2","data-[state=unchecked]:bg-neutral-50 data-[state=unchecked]:ring-1 data-[state=unchecked]:ring-neutral-600","group-data-[state=unchecked]:group-hover:bg-primary-100 group-data-[state=unchecked]:group-hover:ring-primary-700","data-[state=unchecked]:data-disabled:bg-neutral-100 data-[state=unchecked]:data-disabled:ring-neutral-300","data-[state=checked]:bg-primary-600 data-[state=checked]:data-disabled:bg-neutral-600","group-data-[state=checked]:group-hover:bg-primary-700","data-[state=indeterminate]:bg-primary-600 data-[state=indeterminate]:data-disabled:bg-neutral-600","group-data-[state=indeterminate]:group-hover:bg-primary-700"],icon:"size-3.5 text-neutral-50",label:"font-inter text-sm leading-[143%] text-neutral-900 transition-colors group-data-disabled:text-neutral-600",tooltipContainer:"flex items-center gap-2",tooltipContent:"max-w-96",tooltipIcon:"size-3.5"},variants:{error:{true:{control:["data-[state=unchecked]:ring-danger-500 data-[state=unchecked]:ring-2","group-data-[state=unchecked]:group-hover:ring-danger-500","data-[state=unchecked]:focus:ring-danger-500"]}},disabled:{true:{tooltipIcon:"text-neutral-600"}}}}),E=({className:C,error:b=false,label:a$1,tooltip:o,disabled:r=false,onCheckedChange:n,...p})=>{let{root:u,control:g,icon:c,label:m,tooltipContainer:x,tooltipContent:f,tooltipIcon:v}=D({disabled:r,error:b}),y=useCallback(I=>{n?.(I.checked);},[n]),i=jsxs(CheckboxRoot,{className:u({className:C}),disabled:r,onCheckedChange:y,...p,children:[jsxs(CheckboxControl,{className:g(),children:[jsx(CheckboxIndicator,{children:jsx(k,{className:c()})}),jsx(CheckboxIndicator,{indeterminate:true,children:jsx(l,{className:c()})})]}),a$1&&jsx(CheckboxLabel,{className:m(),children:a$1}),jsx(CheckboxHiddenInput,{})]});return o?jsxs("div",{className:x(),children:[i,jsx(a,{content:o,contentClassName:f(),children:jsx(e,{className:v()})})]}):i};export{B as a,D as b,E as c};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {a as a$4}from'./chunk-RBXMHWJQ.js';import {a as a$2}from'./chunk-XYBXEU3T.js';import {c,b,d,e,a as a$3}from'./chunk-MQL3NZ6S.js';import {a}from'./chunk-VIMWKUML.js';import {c as c$1}from'./chunk-
|
|
1
|
+
import {a as a$4}from'./chunk-RBXMHWJQ.js';import {a as a$2}from'./chunk-XYBXEU3T.js';import {c,b,d,e,a as a$3}from'./chunk-MQL3NZ6S.js';import {a}from'./chunk-VIMWKUML.js';import {c as c$1}from'./chunk-QZUQ6AZK.js';import {a as a$1}from'./chunk-OBZIYJO7.js';import {Portal}from'@ark-ui/react/portal';import {createListCollection,Select,useSelectContext}from'@ark-ui/react/select';import {forwardRef,useMemo,useCallback}from'react';import {jsxs,jsx}from'react/jsx-runtime';var be=a$4,Y="lg",Z=({clearable:r,placeholder:s,size:c,state:u})=>{let i=useSelectContext().value.length>0;return jsx(e,{as:Select.Control,size:c,state:u,trailingClassName:"pointer-events-none",clearAdornment:r&&i?jsx(a$3,{as:Select.ClearTrigger,className:"pointer-events-auto",onClick:n=>n.stopPropagation()}):void 0,indicator:jsx(Select.Indicator,{className:"group/chevron-host flex shrink-0 items-center justify-center",children:jsx(a$2,{})}),children:n=>jsx(Select.Trigger,{className:a$1(n,"flex cursor-pointer items-center text-left after:absolute after:inset-0 after:z-10 after:content-[''] data-disabled:cursor-not-allowed"),children:jsx(Select.ValueText,{className:"min-w-0 flex-1 truncate text-left",placeholder:s})})})};function _(r,s){let{className:c$2,label:u,labelProps:m,required:i,error:n,isItemDisabled:S,value:o,helperText:f,placeholder:D,onSelect:b$1,defaultValue:g,options:a$2,clearable:L=true,disabled:h,id:q,invalid:H,readOnly:T,size:j=Y,...M}=r,B=Object.hasOwn(r,"defaultValue"),v=Object.hasOwn(r,"value"),C=typeof o=="object"&&o!==null?o.value:o,x=useMemo(()=>typeof o!="object"||o===null||a$2.some(t=>t.value===o.value)?a$2:[o,...a$2],[a$2,o]),y=useMemo(()=>createListCollection({items:x,isItemDisabled:S,itemToValue:t=>String(t.value)}),[x,S]),U=useCallback(t=>{let W=t.items.at(0)??null;b$1?.(W);},[b$1]);if(B&&v)throw new Error("Cannot set both defaultValue and value props on Select. Use one or the other.");let I=!!(n||H),d$1=c({error:I,disabled:h,readOnly:T});return jsxs(Select.Root,{ref:s,"data-disabled":d$1==="disabled"?"":void 0,"data-error":d(d$1)||void 0,disabled:h,id:q,invalid:I,readOnly:T,required:i,collection:y,className:a$1(b,c$2),positioning:{placement:"bottom-end",getAnchorRect:t=>t instanceof HTMLElement?t.parentElement?.getBoundingClientRect()??null:null},onValueChange:U,value:v?C!=null?[String(C)]:[]:void 0,defaultValue:g!=null?[String(g)]:void 0,...M,children:[jsx(c$1,{...m,as:Select.Label,label:u,required:i}),jsx(Z,{clearable:L,placeholder:D,size:j,state:d$1}),f&&jsx(a,{children:f}),jsx(Portal,{children:jsx(Select.Positioner,{children:jsx(Select.Content,{className:"elevation-9 z-layer bg-input-bg max-h-67.5 w-(--reference-width) overflow-auto rounded-lg outline-none",children:y.items.map(t=>jsx(Select.Item,{item:t,className:"font-inter data-highlighted:bg-primary-100 cursor-pointer py-3 pr-2.5 pl-3 text-sm font-medium data-disabled:cursor-not-allowed data-disabled:text-neutral-400",children:jsx(Select.ItemText,{children:t.label})},t.value))})})}),jsx(Select.HiddenSelect,{required:false})]})}var E=forwardRef(_);E.displayName="Select";var ge=E;export{be as a,Y as b,ge as c};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {a as a$9}from'./chunk-QX4D2CU2.js';import {a as a$3}from'./chunk-ORDWXBDZ.js';import {c as c$3,h}from'./chunk-XRFPQJ5P.js';import {a as a$7}from'./chunk-B5KKVXLE.js';import {c as c$6}from'./chunk-JYNJHAGL.js';import {b}from'./chunk-3KEDPBIR.js';import {d as d$1}from'./chunk-WAUY2MS6.js';import {a as a$8}from'./chunk-FZ6JW3TZ.js';import {a as a$4,b as b$2,c as c$4,d as d$2}from'./chunk-NYURVOJI.js';import {c as c$5}from'./chunk-PF4MVOF5.js';import {c as c$1,e as e$1,a as a$5,b as b$1,d}from'./chunk-MQL3NZ6S.js';import {a as a$6}from'./chunk-VIMWKUML.js';import {c as c$2}from'./chunk-23G2RUJ6.js';import {d as d$3}from'./chunk-MP4CHZ2K.js';import {a as a$2}from'./chunk-R6NIURLZ.js';import {a}from'./chunk-AWRP67K4.js';import {e as e$2}from'./chunk-PI7DECIN.js';import {c,q,k,h as h$1}from'./chunk-QMPBFFFC.js';import {e}from'./chunk-Y3ZZYSKX.js';import {a as a$1}from'./chunk-OBZIYJO7.js';import*as H from'react';import H__default,{createContext,useMemo,useCallback,forwardRef,useRef,useContext,useEffect,useId,useState}from'react';import*as Ht from'@radix-ui/react-portal';import {jsx,jsxs,Fragment}from'react/jsx-runtime';import {Field,useFieldContext}from'@ark-ui/react/field';import {useListCollection,Combobox}from'@ark-ui/react/combobox';import {useFilter}from'@ark-ui/react/locale';import {Portal}from'@ark-ui/react/portal';import {getDefaultOptions}from'date-fns';import In from'react-phone-number-input/locale/en.json';import vn from'react-phone-number-input/locale/es.json';import Tn from'react-phone-number-input/locale/pt.json';import {LexicalComposer}from'@lexical/react/LexicalComposer';import {RichTextPlugin}from'@lexical/react/LexicalRichTextPlugin';import {ContentEditable}from'@lexical/react/LexicalContentEditable';import {HistoryPlugin}from'@lexical/react/LexicalHistoryPlugin';import {ListPlugin}from'@lexical/react/LexicalListPlugin';import {AutoFocusPlugin}from'@lexical/react/LexicalAutoFocusPlugin';import {OnChangePlugin}from'@lexical/react/LexicalOnChangePlugin';import {LexicalErrorBoundary}from'@lexical/react/LexicalErrorBoundary';import {HeadingNode,$isHeadingNode,$createHeadingNode}from'@lexical/rich-text';import {ListNode,ListItemNode,$isListNode,REMOVE_LIST_COMMAND,INSERT_UNORDERED_LIST_COMMAND,INSERT_ORDERED_LIST_COMMAND}from'@lexical/list';import {useLexicalComposerContext}from'@lexical/react/LexicalComposerContext';import {$generateHtmlFromNodes,$generateNodesFromDOM}from'@lexical/html';import {$getSelection,$isRangeSelection,$isElementNode,SELECTION_CHANGE_COMMAND,CAN_UNDO_COMMAND,CAN_REDO_COMMAND,UNDO_COMMAND,REDO_COMMAND,OUTDENT_CONTENT_COMMAND,INDENT_CONTENT_COMMAND,FORMAT_ELEMENT_COMMAND,$createParagraphNode,FORMAT_TEXT_COMMAND,$getRoot,$insertNodes}from'lexical';import {$setBlocksType}from'@lexical/selection';import {$findMatchingParent,mergeRegister}from'@lexical/utils';import {AlignJustifyIcon,AlignRightIcon,AlignCenterIcon,AlignLeftIcon,UnderlineIcon,ItalicIcon,BoldIcon,UndoIcon,RedoIcon,ListIcon,ListOrderedIcon,IndentDecreaseIcon,IndentIncreaseIcon}from'lucide-react';import yl,{parsePhoneNumber,getCountryCallingCode}from'react-phone-number-input';import {getExampleNumber}from'libphonenumber-js/mobile';import sl from'libphonenumber-js/mobile/examples';var ko=({title:e,titleLines:t=2,description:o,descriptionLines:n=1,Icon:r,iconAsColumn:l=true,className:i,...s})=>jsxs("div",{className:a$1("flex gap-2 py-4 pr-6 pl-4",l&&"flex-col items-center gap-1",!l&&!o&&"items-center",i),...s,children:[r&&jsx(r,{className:a$1("shrink-0 text-neutral-300"),size:24}),jsxs("div",{className:a$1("flex flex-col gap-1",l&&"text-center"),children:[jsx("p",{className:a$1("leading-[130%] text-neutral-500",!!o&&"font-medium"),style:t?{overflow:"hidden",display:"-webkit-box",WebkitBoxOrient:"vertical",WebkitLineClamp:t}:void 0,children:e}),o&&jsx("p",{className:"text-sm leading-[130%] text-neutral-500",style:n?{overflow:"hidden",display:"-webkit-box",WebkitBoxOrient:"vertical",WebkitLineClamp:n}:void 0,children:o})]})]}),Ke=ko;var wo=H__default.memo(({handleSelect:e$1,NoResultsIcon:t,noResultsLabel:o,noResultsDescription:n,noResultsDescriptionLines:r,noResultsAsColumn:l,noResultsButtonOnClick:i,optionDescriptionLines:s,noResultsButtonLabel:a$2,filteredOptions:d,inputRect:c,inputRef:R,popoverPosition:x,optionsListRef:g,selectedOption:u,options:I,setFilteredOptions:P})=>jsx(Ht.Root,{asChild:true,children:jsxs("div",{ref:g,className:"elevation-8 pointer-events-auto fixed z-50 mb-2 hidden max-h-[336px] w-full flex-col overflow-y-auto rounded-lg bg-neutral-50",style:c?{width:`${c.width}px`,left:c.left,top:x==="bottom"?`${c.bottom}px`:void 0,bottom:x==="top"?`${window.innerHeight-c.top}px`:void 0}:void 0,children:[d.length===0&&jsxs("div",{className:"elevation-8 flex max-h-88 flex-1 flex-col justify-center rounded-lg bg-neutral-50",children:[jsx(Ke,{title:o,description:n,Icon:t,iconAsColumn:l,descriptionLines:r}),i&&jsxs(Fragment,{children:[jsx(a,{}),jsx(e,{variant:"ghost",className:"my-3 w-fit self-center",onClick:()=>{g.current.style.display="none",R.current.value="",P(I),i();},children:a$2})]})]}),d.map(L=>jsx(b.Root,{disabled:L.disabled,selected:u?.value===L.value,onClick:()=>e$1(L),children:jsxs(b.Content,{children:[jsx(b.Headline,{children:L.label}),L.description&&jsx(b.Description,{className:a$1({"line-clamp-1":s===1,"line-clamp-2":s===2,"line-clamp-3":s===3,"line-clamp-4":s===4}),children:L.description})]})},L.key??L.value))]})})),wt=wo;var _o=336,Kl=({options:e,defaultSelectedOption:t,onSelect:o,onClick:n,onInputChange:r,error:l,helperText:i,label:s,placeholder:a,value:d,size:c="md",optionDescriptionLines:R=1,noResultsLabel:x,noResultsIcon:g,noResultsDescription:u,noResultsDescriptionLines:I,noResultsAsColumn:P,noResultsButtonOnClick:L,noResultsButtonLabel:T,className:y,disabled:N})=>{let[b,E]=useState(t??null),f=useRef(null),C=useRef(null),[_,F]=useState(),[U,h]=useState([]),[m,M]=useState("bottom"),[w,A]=useState(),$=_o,K=useCallback(D=>{f.current.style.display="none",C.current.value=D.label,E(D),o?.(D);},[o]),Q=useCallback(()=>{if(!C?.current)return;let D=C.current.getBoundingClientRect();F(D);let Z=w?w.height:$,j=window.innerHeight-D.bottom>Z,we=D.top>Z;M(j?"bottom":we?"top":"bottom");},[w?.height]),Le=useCallback(()=>{let D=e.filter(Z=>Z.label.toLowerCase().includes(C?.current?.value.toLowerCase()??""));if(h(D),f?.current){let Z=f.current.getBoundingClientRect();A(Z);}},[e]);return useEffect(()=>{h(e);},[e]),useEffect(()=>{if(!d){E(null),C.current&&(C.current.value="");return}(!C.current?.value||b?.value!==d.value)&&(E(d),C.current.value=d.label);},[d]),a$9(f,()=>{f.current.style.display="none",b&&C.current&&(C.current.value=b.label);}),useEffect(()=>{if(C?.current)return Q(),C.current.addEventListener("mousedown",Q),C.current.addEventListener("input",Le),window.addEventListener("scroll",Q,true),window.addEventListener("resize",Q),()=>{C.current?.removeEventListener("mousedown",Q),C.current?.removeEventListener("input",Le),window.removeEventListener("scroll",Q,true),window.removeEventListener("resize",Q);}},[Q,Le]),jsxs("div",{className:a$1("relative",y),children:[jsx(a$3,{ref:C,autoComplete:"off",list:"",selectMode:true,onChange:D=>{D.target.value||(E(null),o?.(null)),r?.(D);},onClean:()=>{E(null),h(e),o?.(null);},onClick:D=>{f.current.style.display="flex",n?.(D);},onBlur:()=>{b&&C.current&&(C.current.value=b.label);},label:s,helperText:i,placeholder:a,size:c,error:l,disabled:N}),jsx(wt,{handleSelect:K,noResultsLabel:x,NoResultsIcon:g,optionDescriptionLines:R,noResultsAsColumn:P,noResultsButtonLabel:T,noResultsButtonOnClick:L,noResultsDescription:u,noResultsDescriptionLines:I,filteredOptions:U,inputRect:_,inputRef:C,popoverPosition:m,optionsListRef:f,selectedOption:b,options:e,setFilteredOptions:h})]})};var Bo=({children:e,title:t,titleLines:o,description:n="",descriptionLines:r,disabled:l=false,className:i,...s})=>jsxs("div",{className:a$1("flex w-full flex-col gap-1",i),...s,children:[jsx("p",{className:a$1("text-sm leading-[130%] break-all",!!n&&"font-medium"),style:o?{overflow:"hidden",display:"-webkit-box",WebkitBoxOrient:"vertical",WebkitLineClamp:o}:void 0,children:t}),n&&jsx("p",{className:a$1("text-xs leading-[130%]",l?"text-neutral-400":"text-neutral-700"),style:r?{overflow:"hidden",display:"-webkit-box",WebkitBoxOrient:"vertical",WebkitLineClamp:r}:void 0,children:n})]}),ce=Bo;var li=({children:e,title:t,titleLines:o,description:n="",descriptionLines:r,startIcon:l,badgeContent:i,hasDivider:s=false,disabled:a=false,onSelect:d,className:c,...R})=>jsxs(te,{hasDescription:!!n,disabled:a,onClick:d,hasDivider:s,className:a$1(!a&&"cursor-pointer",c),...R,children:[l&&H__default.cloneElement(l,{className:"shrink-0 mr-2 h-4.5 w-4.5"}),jsx(ce,{title:t,titleLines:o,description:n,descriptionLines:r,disabled:a}),jsxs("div",{className:"ml-4 flex gap-2",children:[i&&jsx(a$2,{content:i,size:"lg",variant:"alert",className:a$1("self-center",a&&"bg-neutral-400")}),jsx(h$1,{className:"h-4.5 w-4.5 self-center"})]})]});var fi=({children:e,title:t,titleLines:o=1,description:n="",descriptionLines:r,startIcon:l,hasDivider:i=false,disabled:s=false,checked:a,onCheckedChange:d,className:c,...R})=>jsxs(te,{hasDescription:!!n,disabled:s,hasDivider:i,...R,className:a$1("pr-6",c),children:[l&&H__default.cloneElement(l,{className:"shrink-0 w-4.5 h-4.5 mr-2"}),jsx(ce,{title:t,titleLines:o,description:n,descriptionLines:r,disabled:s}),jsx(c$5,{checked:a,onCheckedChange:d,className:"ml-4 self-center",disabled:s})]});var ne=336,Ut=createContext({inputRef:null,optionsListRef:null,autocompleteId:"",inputRect:void 0,showChips:false,filteredOptions:[],currentFocus:-1,popoverPosition:"bottom",setFilteredOptions:()=>{},setCurrentFocus:()=>{},setShowChips:()=>{},setPopoverPosition:()=>{},setInputRect:()=>{},optionsListHeight:ne,setOptionsListHeight:()=>{},optionsListRect:void 0,setOptionsListRect:()=>{}}),oe=()=>{let e=useContext(Ut);if(e===null)throw new Error("useAutocompleteMultipleContext must be used within a AutocompleteMultipleProvider");return e},$t=({children:e})=>{let t=useRef(null),o=useRef(null),n=useId(),[r,l]=useState(),[i,s]=useState(true),[a,d]=useState([]),[c,R]=useState(-1),[x,g]=useState("bottom"),[u,I]=useState(),[P,L]=useState(ne);return jsx(Ut.Provider,{value:{optionsListRef:t,inputRef:o,autocompleteId:n,inputRect:r,showChips:i,filteredOptions:a,currentFocus:c,popoverPosition:x,setFilteredOptions:d,setCurrentFocus:R,setShowChips:s,setPopoverPosition:g,setInputRect:l,optionsListHeight:P,optionsListRect:u,setOptionsListRect:I,setOptionsListHeight:L},children:e})};var Yo=({option:e,onMountWidth:t})=>{let o=useRef(null);return useEffect(()=>{o.current&&t?.(o.current.clientWidth);},[]),jsx(d$1,{variant:"fill",color:"neutral",ref:o,className:"shrink-0",size:"md",hasCloseIcon:false,children:e.label})},Wt=Yo;var en=150,tn=H__default.memo(({selectedOptions:e,error:t,onCleanSelectedOptions:o,disabled:n,size:r})=>{let{autocompleteId:l,inputRect:i,inputRef:s,optionsListRef:a}=oe(),d=H__default.useRef(null),[c$1,R]=H__default.useState(new Map),x=useMemo(()=>{if(!i?.width)return [];let u=0,I=i.width-en,P=0;for(let L=0;L<e.length&&(P+=c$1.get(L)??0,!(P>I));L++)u++;return e.slice(0,u)},[i?.width,e,c$1]),g=useCallback(()=>{n||(s?.current?.focus(),a.current.style.display="flex");},[n]);return jsxs("div",{onClick:g,className:a$1("absolute top-0 z-30 flex w-full cursor-pointer flex-nowrap items-center gap-2 pr-12 pl-3",n&&"cursor-not-allowed"),style:{maxWidth:i?.width?i?.width:void 0,height:i?.height?i?.height:void 0},children:[jsx("div",{className:"flex flex-1 gap-1 overflow-hidden",ref:d,children:x.map((u,I)=>jsx(Wt,{option:u,onMountWidth:P=>R(L=>new Map(L).set(I,P))},`chip-input-${l}-${u.value}`))}),e.length>x.length&&jsx("span",{className:"text-base",children:"..."}),e.length>0&&!t&&jsx(a$2,{content:String(e.length),size:r}),t&&e.length>0&&jsx(c,{className:"text-error-700 h-6 w-6",onClick:u=>{u.stopPropagation(),o();}})]})}),qt=tn;var rn=H__default.memo(({option:e,index:t,onPressOption:o,isSelected:n,optionDescriptionLines:r})=>{let{currentFocus:l,inputRef:i}=oe();return jsxs(b.Root,{selected:l===t,disabled:e.disabled,onMouseDown:s=>{e.disabled||(i?.current?.value&&s.preventDefault(),o?.(e,s));},children:[jsxs(b.Content,{children:[jsx(b.Headline,{children:e.label}),e.description&&jsx(b.Description,{className:a$1({"line-clamp-1":r===1,"line-clamp-2":r===2,"line-clamp-3":r===3,"line-clamp-4":r===4}),children:e.description})]}),jsx(b.Trailing,{children:jsx(b.CheckboxControl,{checked:n})})]})}),rt=rn;var cn=H__default.memo(({selectedOptions:e$1,handleSelect:t,NoResultsIcon:o,noResultsLabel:n,noResultsDescription:r,noResultsDescriptionLines:l,noResultsAsColumn:i,noResultsButtonOnClick:s,optionDescriptionLines:a$1,noResultsButtonLabel:d})=>{let{popoverPosition:c,optionsListRef:R,filteredOptions:x,inputRect:g,autocompleteId:u,inputRef:I,optionsListHeight:P}=oe(),L=useCallback(y=>e$1.some(N=>N.value===y.value),[e$1]),T=useMemo(()=>e$1.filter(y=>y.label.toLowerCase().includes(I?.current?.value.toLowerCase()??"")),[e$1,I?.current?.value]);return jsx(Ht.Root,{asChild:true,children:jsxs("div",{ref:R,className:"elevation-8 pointer-events-auto fixed z-50 mb-2 hidden w-full flex-col overflow-y-auto rounded-lg bg-neutral-50",style:g?{width:`${g.width}px`,left:g.left,top:c==="bottom"?`${g.bottom}px`:void 0,bottom:c==="top"?`${window.innerHeight-g.top}px`:void 0,maxHeight:P+"px"}:void 0,children:[x.length===0&&jsxs("div",{className:"elevation-8 flex max-h-88 flex-1 flex-col justify-center rounded-lg bg-neutral-50",children:[jsx(Ke,{title:n,description:r,Icon:o,iconAsColumn:i,descriptionLines:l}),s&&jsxs(Fragment,{children:[jsx(a,{}),jsx(e,{variant:"ghost",className:"my-3 w-fit self-center",onClick:()=>{R.current.style.display="none",I.current.value="",s();},children:d})]})]}),T.map((y,N)=>jsx(rt,{option:y,index:N,onPressOption:b=>t(b),isSelected:L(y),optionDescriptionLines:a$1},`autocomplete-option-${u}-${y.key??y.value}`)),x.map((y,N)=>!e$1.some(b=>b.value===y.value)&&jsx(rt,{option:y,index:N,onPressOption:b=>t(b),isSelected:L(y),optionDescriptionLines:a$1},`autocomplete-option-${u}-${y.key??y.value}`))]})})}),Qt=cn;var un=H__default.memo(({selectedOptions:e,onSelect:t,error:o,helperText:n,label:r,placeholder:l,options:i,onInputChange:s,size:a,disabled:d})=>{let{setCurrentFocus:c,setFilteredOptions:R,optionsListRef:x,inputRef:g}=oe();return jsx(a$3,{ref:g,autoComplete:"off",list:"",disabled:d,selectMode:true,onChange:u=>{c(-1),s?.(u.target.value);},onClean:()=>{c(-1),R(i),t?.(null,e);},onClick:()=>{d||(x.current.style.display="flex");},error:o,helperText:n,label:r,placeholder:l,fixedTopLabel:e.length>0,size:a})}),jt=un;var Yt=({options:e,defaultSelectedOptions:t,onSelect:o,error:n,helperText:r,label:l,placeholder:i,noResultsLabel:s,noResultsIcon:a,noResultsDescription:d,noResultsDescriptionLines:c,noResultsAsColumn:R,noResultsButtonOnClick:x,noResultsButtonLabel:g,className:u,onInputChange:I,value:P,loading:L,size:T="md",optionDescriptionLines:y=1,disabled:N})=>{let{inputRef:b,optionsListRef:E,setFilteredOptions:f,setShowChips:C,setInputRect:_,setPopoverPosition:F,setCurrentFocus:U,showChips:h,setOptionsListRect:m,optionsListRect:M,setOptionsListHeight:w}=oe(),A=useRef(false),[$,K]=useState(t??[]),Q=useCallback(W=>{K(J=>{let le,ye=J.findIndex(Fo=>Fo.value===W.value);return ye===-1?(le=J.concat(W),o?.(W,le),le):(le=J.toSpliced(ye,1),o?.(W,le),le)});},[o]),Le=useCallback(()=>{K([]),f(e),o?.(null,[]);},[]),D=useCallback(()=>{C(false);},[]),Z=useCallback(()=>{C(true);},[]),j=useCallback(()=>{if(!b?.current)return;let W=b.current.getBoundingClientRect();_(W);let J=M?M.height>ne?ne:M.height:ne,le=window.innerHeight-W.bottom>J,ye=W.top>J;F(le?"bottom":ye?"top":"bottom"),w(ye?ne:window.innerHeight-W.bottom>ne?ne:window.innerHeight-W.bottom);},[M?.height]),we=useCallback(()=>{let W=e.filter(J=>J.label.toLowerCase().includes(b?.current?.value.toLowerCase()??""));if(f(W),E?.current){let J=E.current.getBoundingClientRect();m(J);}},[e,E?.current]);return useEffect(()=>{f(e);},[e]),a$9(E,()=>{E.current.style.display="none",U(-1);}),useEffect(()=>{if(b?.current)return j(),b.current.addEventListener("mousedown",j),b.current.addEventListener("input",we),b.current.addEventListener("focusin",D),b.current.addEventListener("focusout",Z),window.addEventListener("scroll",j,true),window.addEventListener("resize",j),()=>{b.current?.removeEventListener("mousedown",j),b.current?.removeEventListener("input",j),b.current?.removeEventListener("focusout",Z),b.current?.removeEventListener("focusin",D),window.removeEventListener("scroll",j,true),window.removeEventListener("resize",j);}},[j,Z,D,we]),useEffect(()=>{P&&(K(P),C(true));},[P]),useEffect(()=>{L||t&&t.length&&!A.current&&(K(t),A.current=true,C(true));},[t,L]),jsxs("div",{className:a$1("relative",u),children:[jsx(jt,{selectedOptions:$,onSelect:o,error:n,helperText:r,label:l,placeholder:i,handleSelect:Q,options:e,onInputChange:I,size:T,disabled:N}),h&&jsx(qt,{selectedOptions:$,disabled:N,error:n,onCleanSelectedOptions:Le,size:T}),jsx(Qt,{handleSelect:Q,selectedOptions:$,noResultsLabel:s,NoResultsIcon:a,optionDescriptionLines:y,noResultsAsColumn:R,noResultsButtonLabel:g,noResultsButtonOnClick:x,noResultsDescription:d,noResultsDescriptionLines:c})]})};var Rs=e=>jsx($t,{children:jsx(Yt,{...e})});var yn=({code:e,codeClassName:t})=>jsxs("div",{className:"flex justify-center gap-2",children:[jsx(a$7,{country:e,className:"size-4.5"}),jsx("span",{className:a$1("text-sm leading-[143%] font-medium text-neutral-800",t),children:e})]}),Zt=({className:e,disabled:t,error:o,onChange:n,options:r,readOnly:l,translations:i,value:s})=>{let a$2=useFieldContext(),d=H.useRef(null),c=H.useId(),[R,x]=H.useState(""),{contains:g}=useFilter({sensitivity:"base"}),u=c$1({disabled:t,error:o,readOnly:l}),I=H.useMemo(()=>r.map(f=>({...f,key:f.code})),[r]),P=H.useMemo(()=>I.find(f=>f.key===s),[I,s]),{collection:L,filter:T,set:y}=useListCollection({initialItems:I,itemToString:f=>`${f.label} ${f.code}`,itemToValue:f=>f.key,filter:(f,C,_)=>g(f,C)||g(_.code,C.toUpperCase())});H.useEffect(()=>{y(I);},[I,y]);let N=H.useCallback(({inputValue:f})=>{let C=f??"";x(C),T(C),d.current?.scrollTo({top:0});},[T]),b=H.useCallback(({open:f})=>{f&&(x(""),T(""));},[T]),E=H.useCallback(({items:f})=>{let C=f[0]?.code;C&&n(C);},[n]);return jsxs(Combobox.Root,{className:"h-full shrink-0",collection:L,disabled:t||l,ids:{input:c,label:a$2.ids.label},inputBehavior:"autohighlight",inputValue:R,lazyMount:true,openOnChange:false,openOnClick:false,positioning:{placement:"bottom-end",offset:{mainAxis:12},sameWidth:false},selectionBehavior:"preserve",unmountOnExit:true,value:P?[P.key]:[],onInputValueChange:N,onOpenChange:b,onValueChange:E,children:[jsx(Combobox.Control,{className:"h-full",children:jsx(Combobox.Trigger,{className:a$1("relative flex h-full w-19.5 shrink-0 items-center justify-center rounded-l after:pointer-events-none after:absolute after:top-0 after:right-0 after:h-full after:w-px after:content-['']",u==="error"?"bg-danger-20 after:bg-input-ring-error":u==="disabled"||u==="readOnly"?"after:bg-input-ring-disabled bg-neutral-200":u==="errorReadOnly"?"after:bg-input-ring-error bg-neutral-200":"group-focus-within/id-field:after:bg-input-ring-focus after:bg-input-ring data-[state=open]:after:bg-input-ring-focus bg-neutral-200",e),disabled:t||l,focusable:true,children:P&&jsx(yn,{code:P.code,codeClassName:a$1(u==="error"&&"text-danger-600",(u==="disabled"||u==="readOnly"||u==="errorReadOnly")&&"text-input-text-disabled")})})}),jsx(Portal,{children:jsx(Combobox.Positioner,{children:jsxs(Combobox.Content,{className:"elevation-9 z-layer data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 w-75 origin-(--transform-origin) overflow-hidden rounded-sm bg-neutral-50",children:[jsxs("div",{className:"pb-0",children:[jsx(Combobox.Context,{children:f=>jsx(e$1,{className:"m-1 mb-0",size:"md",state:"default",clearAdornment:!t&&f.inputValue.length>0?jsx(a$5,{onClick:()=>{f.setInputValue("","clear-trigger");}}):void 0,indicator:jsx(q,{className:"pointer-events-none size-4.5 text-neutral-800"}),children:C=>jsx(Combobox.Input,{autoComplete:"off","data-1p-ignore":true,"data-lpignore":"true",placeholder:i.searchCountryPlaceholder,className:C})})}),jsx(a,{className:"mt-2"})]}),jsx(Combobox.List,{ref:d,className:a$1("h-72 overflow-auto outline-none",{"flex flex-col items-center justify-center":L.items.length===0}),children:L.items.length===0?jsx(a$8,{size:"sm",variant:"not-found"}):jsx(Combobox.ItemGroup,{children:L.items.map(f=>jsxs(Combobox.Item,{item:f,className:"data-highlighted:bg-primary-100 relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm text-neutral-900 outline-none select-none data-disabled:pointer-events-none data-disabled:opacity-50",children:[jsx(a$7,{country:f.code,className:"size-4.5"}),jsx(Combobox.ItemText,{className:"min-w-0 flex-1 truncate text-sm leading-[143%] font-medium",children:f.label}),jsx("span",{className:"shrink-0 text-sm text-neutral-600",children:f.code}),jsx(k,{className:a$1("ml-auto size-4 shrink-0",f.key===s?"opacity-100":"opacity-0")})]},f.key))})})]})})})]})};var st={en:"Clear identification number",es:"Limpiar n\xFAmero de identificaci\xF3n",pt:"Limpar n\xFAmero de identifica\xE7\xE3o"},Jt={en:In,es:vn,pt:Tn},Pn=st.en,En=Jt.en,Nn={es:{clearIdLabel:st.es,searchCountryPlaceholder:"Buscar..."},pt:{clearIdLabel:st.pt,searchCountryPlaceholder:"Pesquisar..."}},An={clearIdLabel:Pn,searchCountryPlaceholder:"Search..."},eo=()=>{let e=getDefaultOptions().locale?.code?.split("-")[0];return e==="es"||e==="pt"?e:"en"},to=e=>Nn[e]??An,Mn=(e,t)=>(Jt[t]??En)[e]??e,oo=({localeCode:e})=>c$3.map(t=>({code:t,label:Mn(t,e)})).sort((t,o)=>t.label.localeCompare(o.label)),no=a$4,ro=b$2,lo=(e,t)=>{let o=t.trim();return !o||!c$4(e,o).isValid?o:d$2(e,o)};var io=()=>{},ao=H.forwardRef(({autoComplete:e,className:t,country:o,disabled:n,error:r,helperText:l,id:i,label:s,labelProps:a,name:d$1,onBlur:c,onChange:R=io,onCountryChange:x=io,placeholder:g,readOnly:u,required:I,value:P},L)=>{let[T,y]=H.useState(P??""),N=H.useRef(null),b=eo(),E=H.useRef(P??""),f=c$1({disabled:n,error:r,readOnly:u});H.useEffect(()=>{let A=P??"";A!==E.current&&(E.current=A,y(A));},[P]);let C=H.useMemo(()=>to(b),[b]),_=H.useMemo(()=>oo({localeCode:b}),[b]),F=H.useMemo(()=>ro(o??"")||g||no,[o,g]),U=H.useCallback((A,$)=>{let K=lo(A,$);E.current=K,R(K);},[R]),h=H.useCallback(A=>{y(A),U(o??"",A);},[o,U]),m=H.useCallback(A=>{x(A),U(A,T);},[T,x,U]),M=H.useCallback(A=>{N.current=A,typeof L=="function"?L(A):L&&(L.current=A);},[L]),w=H.useCallback(()=>{h(""),N.current?.focus();},[h]);return jsxs(Field.Root,{"data-error":d(f)||void 0,disabled:n,id:i,invalid:r,readOnly:u,className:a$1(b$1,t),children:[s&&jsx(c$2,{...a,as:Field.Label,label:s,required:I}),jsx(e$1,{state:f,className:"group/id-field pl-0",clearAdornment:T?jsx(a$5,{ariaLabel:C.clearIdLabel,onClick:w}):void 0,children:A=>jsxs(Fragment,{children:[jsx(Zt,{disabled:n,error:r,onChange:m,options:_,readOnly:u,translations:C,value:o}),jsx(Field.Input,{"aria-required":I||void 0,autoComplete:e,className:a$1(A,"pl-3"),name:d$1,onBlur:c,onChange:$=>h($.target.value),placeholder:F,value:T,ref:M})]})}),l&&jsx(a$6,{as:r?Field.ErrorText:Field.HelperText,children:l})]})});ao.displayName="IdField";var ma=({children:e$1,title:t,titleLines:o=1,description:n,descriptionLines:r=1,StartIcon:l,hasDivider:i=false,disabled:s=false,actionButton:a,isSelected:d=false,className:c,...R})=>jsxs(te,{hasDescription:!!n,disabled:s,hasDivider:i,isSelected:d,...R,className:c,children:[l&&jsx(l,{className:"mr-2 h-4.5 w-4.5 shrink-0 grow-0"}),jsx(ce,{title:t,titleLines:o,description:n,descriptionLines:r,disabled:s}),a&&jsx(Fragment,{children:a.isIcon?jsx(e$2,{...a,className:"ml-4 self-center",variant:"ghost",size:"sm",disabled:s??a.disabled}):jsx(e,{...a,className:"ml-4 self-center",size:"sm",variant:"ghost",disabled:s??a.disabled})})]});var Ra=({title:e,description:t="",descriptionLines:o,hasDivider:n=false,disabled:r=false,checked:l,onCheckedChange:i,className:s,chipStatus:a,chipExpandable:d,...c})=>jsxs(te,{hasDescription:!!t,disabled:r,hasDivider:n,...c,className:a$1("pr-6",s),children:[jsx(c$5,{checked:l,onCheckedChange:i,className:"mr-4 self-center",disabled:r}),jsxs("div",{className:"flex-1",children:[jsxs("div",{className:"flex items-center justify-between gap-2",children:[jsx("p",{className:a$1("line-clamp-1 text-sm leading-[130%] break-all",!!t&&"font-medium"),children:e}),d&&jsx("div",{className:"ml-auto flex min-w-0 flex-shrink-0 items-center justify-end",children:jsx(c$6,{...d})}),a&&jsx("div",{className:"ml-4 flex shrink-0 items-center gap-1",children:jsx(d$3,{...a,size:"xs",className:"shrink-0"})})]}),t&&jsx("p",{className:a$1("text-xs leading-[130%]",r?"text-neutral-400":"text-neutral-700",{"line-clamp-1":o===1,"line-clamp-2":o===2,"line-clamp-3":o===3,"line-clamp-4":o===4}),children:t})]})]});var ct={paragraph:"m-0",ltr:"text-left",rtl:"text-right",heading:{h1:"mb-2 text-2xl leading-[130%] font-semibold text-neutral-900",h2:"mb-2 text-xl leading-[130%] font-semibold text-neutral-900",h3:"mb-2 text-lg leading-[130%] font-semibold text-neutral-900",h4:"mb-2 text-base leading-[130%] font-semibold text-neutral-900",h5:"mb-2 text-sm leading-[130%] font-semibold text-neutral-900",h6:"mb-2 text-xs leading-[130%] font-semibold text-neutral-900"},list:{ul:"my-2 list-disc pl-5",ol:"my-2 list-decimal pl-5",listitem:"my-1",nested:{listitem:"my-1"}},text:{bold:"font-semibold",italic:"italic",underline:"underline",strikethrough:"line-through",code:"rounded bg-neutral-100 px-1 py-0.5 font-mono text-xs"},code:"rounded bg-neutral-100 p-2 font-mono text-xs",quote:"border-l-2 border-neutral-300 pl-3 italic text-neutral-700",link:"text-primary-700 underline hover:text-primary-800"},pt={headings:["h1","h2","h3"],textFormat:["bold","italic","underline"],lists:true,indent:true,alignment:["left","center","right","justify"],undoRedo:true};var mt=({readOnly:e})=>{let[t]=useLexicalComposerContext();return useEffect(()=>{t.setEditable(!e);},[t,e]),null};var ut=({editorRef:e})=>{let[t]=useLexicalComposerContext();return useEffect(()=>(e.current=t,()=>{e.current===t&&(e.current=null);}),[t,e]),null};var Sn={"ql-align-left":"left","ql-align-center":"center","ql-align-right":"right","ql-align-justify":"justify"},Bn={center:"ql-align-center",right:"ql-align-right",justify:"ql-align-justify"},zn=()=>typeof window<"u"&&typeof window.DOMParser<"u",co=e=>zn()?new DOMParser().parseFromString(e,"text/html"):null,Vn=e=>(e??"").replace(/\s+/g," ").trim(),ft=e=>{let t=0;for(let o of Array.from(e.classList)){let n=o.match(/^ql-indent-(\d+)$/);if(!n)continue;let r=Number.parseInt(n[1],10);Number.isFinite(r)&&(t=Math.max(t,r)),e.classList.remove(o);}return t},Un=e=>{let t=e.querySelectorAll("[class*='ql-align-']");for(let o of Array.from(t))for(let n of Array.from(o.classList)){let r=Sn[n];r&&(r!=="left"&&(o.style.textAlign=r),o.classList.remove(n));}},$n=e=>{let t=e.querySelectorAll("[class*='ql-indent-']");for(let o of Array.from(t)){if(o.tagName==="LI")continue;let n=ft(o);n>0&&(o.style.paddingInlineStart=`${n*3}em`);}},Wn=(e,t)=>{let o=e.getAttribute("data-list");return o==="bullet"?"ul":o==="ordered"?"ol":t},qn=e=>{let t=e.cloneNode(true);return t.removeAttribute("data-list"),t.removeAttribute("data-checked"),t.removeAttribute("data-indent"),ft(t),t},dt=(e,t)=>e.createElement(t),Gn=(e,t)=>{let o=Array.from(e.children).filter(a=>a.tagName==="LI");if(o.length===0||!o.some(a=>a.hasAttribute("data-list")?true:Array.from(a.classList).some(d=>/^ql-indent-\d+$/.test(d))))return;let r=[],l=[],i=e.tagName==="UL"?"ul":"ol";for(let a of o){let d=ft(a),c=Wn(a,i),R=qn(a);for(;l.length>0&&l[l.length-1].level>d;)l.pop();if(l.length===0){let g=dt(t,c);r.push(g),l.push({level:0,kind:c,listElement:g});}let x=l[l.length-1];for(;x.level<d;){let g=x.listElement.lastElementChild;if(!g||g.tagName!=="LI")break;let u=dt(t,c);g.appendChild(u),x={level:x.level+1,kind:c,listElement:u},l.push(x);}if(x=l[l.length-1],x.kind!==c){let g=dt(t,c);if(l.length===1)r.push(g),l[0]={level:0,kind:c,listElement:g};else {let I=l[l.length-2].listElement.lastElementChild;I&&I.tagName==="LI"?(I.appendChild(g),l[l.length-1]={level:x.level,kind:c,listElement:g}):(r.push(g),l.length=1,l[0]={level:0,kind:c,listElement:g});}x=l[l.length-1];}x.listElement.appendChild(R);}if(r.length===0)return;let s=t.createDocumentFragment();for(let a of r)s.appendChild(a);e.replaceWith(s);},Kn=(e,t)=>{let o=Array.from(e.querySelectorAll("ol, ul"));for(let n of o)Gn(n,t);},po=(e,t)=>{let o=e.tagName==="UL"?"bullet":"ordered",n=Array.from(e.children).filter(r=>r.tagName==="LI");for(let r of n){r.setAttribute("data-list",o);for(let i of Array.from(r.classList))/^ql-indent-\d+$/.test(i)&&r.classList.remove(i);t>0&&r.classList.add(`ql-indent-${t}`);let l=Array.from(r.children).filter(i=>i.tagName==="UL"||i.tagName==="OL");for(let i of l)po(i,t+1);}},Qn=e=>{let t=e.querySelectorAll("p, h1, h2, h3, h4, h5, h6, li");for(let o of Array.from(t)){let n=o;for(let i of Array.from(n.classList))i.startsWith("ql-align-")&&n.classList.remove(i);let r=n.style.textAlign.trim().toLowerCase(),l=Bn[r];l&&n.classList.add(l);}},ge=e=>Vn(e).replace(/>\s+</g,"><").replace(/ /g," "),ht=e=>{let t=e??"";if(!t.trim())return "";let o=co(t);if(!o)return t;let{body:n}=o;return Un(n),$n(n),Kn(n,o),n.innerHTML},bt=e=>{if(!e.trim())return "";let t=co(e);if(!t)return e;let{body:o}=t,n=Array.from(o.querySelectorAll("ul, ol"));for(let r of n)po(r,0);return Qn(o),o.innerHTML};var Xe=e=>{let t="";return e.getEditorState().read(()=>{t=$generateHtmlFromNodes(e,null);}),bt(t)},or=(e,t)=>{let o=ht(t);e.update(()=>{let n=$getRoot();if(n.clear(),!o.trim()){n.append($createParagraphNode());return}let l=new DOMParser().parseFromString(o,"text/html"),i=$generateNodesFromDOM(e,l);if(i.length===0){n.append($createParagraphNode());return}n.select(),$insertNodes(i);});},gt=({value:e,isSyncingRef:t})=>{let[o]=useLexicalComposerContext(),n=useRef(null);return useEffect(()=>{let r=e??"";if(n.current!==null&&ge(r)===ge(n.current))return;let l=Xe(o);ge(l)!==ge(r)&&(t.current=true,or(o,r),queueMicrotask(()=>{t.current=false;})),n.current=r;},[o,t,e]),null};var uo=["left","center","right","justify"];var fo=["bold","italic","underline","strikethrough","code"];var Sr={bold:"bold",italic:"italic",underline:"underline",strikethrough:"strikethrough",code:"code"},Br={left:jsx(AlignLeftIcon,{className:"size-4"}),center:jsx(AlignCenterIcon,{className:"size-4"}),right:jsx(AlignRightIcon,{className:"size-4"}),justify:jsx(AlignJustifyIcon,{className:"size-4"})},zr={left:"Align left",center:"Align center",right:"Align right",justify:"Align justify"},Ae={bold:jsx(BoldIcon,{className:"size-4"}),italic:jsx(ItalicIcon,{className:"size-4"}),underline:jsx(UnderlineIcon,{className:"size-4"}),strikethrough:jsx("span",{className:"text-xs font-semibold",children:"S"}),code:jsx("span",{className:"font-mono text-xs",children:"</>"})},Me={bold:"Bold",italic:"Italic",underline:"Underline",strikethrough:"Strikethrough",code:"Inline code"},Vr=e=>{let t=e.textFormat;return t===false?[]:Array.isArray(t)?fo.filter(o=>t.includes(o)):["bold","italic","underline"]},Ur=e=>{let t=e.alignment;return t===false?[]:Array.isArray(t)?uo.filter(o=>t.includes(o)):["left","center","right","justify"]},$r=e=>{if(e.headings===false)return [];let t=Array.isArray(e.headings)?e.headings:["h1","h2","h3"];return [{value:"paragraph",label:"Normal"},...t.map(o=>({value:o,label:o.toUpperCase()}))]},Oe=()=>jsx("div",{className:"mx-1 h-5 w-px bg-neutral-300"}),G=({label:e,onClick:t,icon:o,active:n=false,disabled:r=false})=>jsx("button",{type:"button","aria-label":e,title:e,disabled:r,onClick:t,className:a$1("inline-flex size-8 items-center justify-center rounded-md border border-transparent text-neutral-700 transition-colors","focus-visible:ring-primary-800 hover:bg-neutral-200 focus-visible:ring-2 focus-visible:ring-offset-1 focus-visible:outline-none","disabled:cursor-not-allowed disabled:opacity-40",n&&"border-neutral-300 bg-neutral-200 text-neutral-900"),children:o}),Lt=({config:e,className:t})=>{let[o]=useLexicalComposerContext(),n=useId(),[r,l]=useState(false),[i,s]=useState(false),[a,d]=useState(false),[c,R]=useState(false),[x,g]=useState(false),[u,I]=useState(false),[P,L]=useState(false),[T,y]=useState("paragraph"),[N,b]=useState("left"),E=useMemo(()=>Vr(e),[e]),f=useMemo(()=>Ur(e),[e]),C=useMemo(()=>$r(e),[e]),_=useCallback(()=>{let m=$getSelection();if(!$isRangeSelection(m))return;d(m.hasFormat("bold")),R(m.hasFormat("italic")),g(m.hasFormat("underline")),I(m.hasFormat("strikethrough")),L(m.hasFormat("code"));let M=m.anchor.getNode(),w=M.getKey()==="root"?M:M.getTopLevelElementOrThrow();if($isListNode(w))y(w.getListType()==="number"?"ol":"ul");else {let $=$findMatchingParent(w,K=>$isListNode(K));$isListNode($)?y($.getListType()==="number"?"ol":"ul"):y($isHeadingNode(w)?w.getTag():w.getType());}let A=$isElementNode(w)?w.getFormatType():"";b(A==="center"||A==="right"||A==="justify"?A:"left");},[]);useEffect(()=>mergeRegister(o.registerUpdateListener(({editorState:m})=>{m.read(()=>{_();});}),o.registerCommand(SELECTION_CHANGE_COMMAND,()=>(_(),false),1),o.registerCommand(CAN_UNDO_COMMAND,m=>(l(m),false),1),o.registerCommand(CAN_REDO_COMMAND,m=>(s(m),false),1)),[o,_]);let F=m=>{o.dispatchCommand(FORMAT_TEXT_COMMAND,Sr[m]);},U=m=>{o.update(()=>{let M=$getSelection();if($isRangeSelection(M)){if(m==="paragraph"){$setBlocksType(M,()=>$createParagraphNode());return}$setBlocksType(M,()=>$createHeadingNode(m));}});},h=m=>{if(T===(m==="bullet"?"ul":"ol")){o.dispatchCommand(REMOVE_LIST_COMMAND,void 0);return}o.dispatchCommand(m==="bullet"?INSERT_UNORDERED_LIST_COMMAND:INSERT_ORDERED_LIST_COMMAND,void 0);};return jsxs("div",{className:a$1("flex flex-wrap items-center gap-1 border-b border-neutral-300 bg-neutral-100 px-2 py-1.5",t),children:[e.undoRedo!==false&&jsxs(Fragment,{children:[jsx(G,{label:"Undo",onClick:()=>o.dispatchCommand(UNDO_COMMAND,void 0),disabled:!r,icon:jsx(UndoIcon,{className:"size-4"})}),jsx(G,{label:"Redo",onClick:()=>o.dispatchCommand(REDO_COMMAND,void 0),disabled:!i,icon:jsx(RedoIcon,{className:"size-4"})}),jsx(Oe,{})]}),C.length>0&&jsxs(Fragment,{children:[jsx("label",{className:"sr-only",htmlFor:n,children:"Text style"}),jsx("select",{id:n,value:T.startsWith("h")?T:"paragraph",onChange:m=>U(m.target.value),className:a$1("h-8 rounded-md border border-neutral-300 bg-white px-2 text-xs font-medium text-neutral-800","focus-visible:ring-primary-800 focus-visible:ring-2 focus-visible:ring-offset-1 focus-visible:outline-none"),children:C.map(m=>jsx("option",{value:m.value,children:m.label},m.value))}),jsx(Oe,{})]}),E.length>0&&jsxs(Fragment,{children:[E.includes("bold")&&jsx(G,{label:Me.bold,onClick:()=>F("bold"),icon:Ae.bold,active:a}),E.includes("italic")&&jsx(G,{label:Me.italic,onClick:()=>F("italic"),icon:Ae.italic,active:c}),E.includes("underline")&&jsx(G,{label:Me.underline,onClick:()=>F("underline"),icon:Ae.underline,active:x}),E.includes("strikethrough")&&jsx(G,{label:Me.strikethrough,onClick:()=>F("strikethrough"),icon:Ae.strikethrough,active:u}),E.includes("code")&&jsx(G,{label:Me.code,onClick:()=>F("code"),icon:Ae.code,active:P}),jsx(Oe,{})]}),e.lists!==false&&jsxs(Fragment,{children:[jsx(G,{label:"Bulleted list",onClick:()=>h("bullet"),icon:jsx(ListIcon,{className:"size-4"}),active:T==="ul"}),jsx(G,{label:"Numbered list",onClick:()=>h("number"),icon:jsx(ListOrderedIcon,{className:"size-4"}),active:T==="ol"}),jsx(Oe,{})]}),e.indent!==false&&jsxs(Fragment,{children:[jsx(G,{label:"Decrease indent",onClick:()=>o.dispatchCommand(OUTDENT_CONTENT_COMMAND,void 0),icon:jsx(IndentDecreaseIcon,{className:"size-4"})}),jsx(G,{label:"Increase indent",onClick:()=>o.dispatchCommand(INDENT_CONTENT_COMMAND,void 0),icon:jsx(IndentIncreaseIcon,{className:"size-4"})}),jsx(Oe,{})]}),f.length>0&&jsx(Fragment,{children:f.map(m=>jsx(G,{label:zr[m],onClick:()=>o.dispatchCommand(FORMAT_ELEMENT_COMMAND,m),icon:Br[m],active:N===m},m))})]})};var Co=e=>{if(e!==void 0)return typeof e=="number"?`${e}px`:e},rl=forwardRef(({value:e,onChange:t,onBlur:o,onError:n,placeholder:r="Write your content...",readOnly:l=false,showToolbar:i=true,toolbarConfig:s=pt,className:a,editorClassName:d,toolbarClassName:c,autoFocus:R=false,minHeight:x=160,maxHeight:g,error:u=false,errorMessage:I,editorRef:P},L)=>{let T=useRef(false),y=useMemo(()=>({namespace:"SodtrackRichTextEditor",theme:ct,onError:(b,E)=>{if(n){n(b,E);return}console.error("RichTextEditor error",b);},nodes:[HeadingNode,ListNode,ListItemNode]}),[n]),N={minHeight:Co(x),maxHeight:Co(g),overflowY:g?"auto":void 0};return jsx(LexicalComposer,{initialConfig:y,children:jsxs("div",{className:"w-full",children:[jsxs("div",{ref:L,className:a$1("group flex w-full flex-col overflow-hidden rounded-lg border bg-white transition-colors","focus-within:ring-primary-800 focus-within:ring-2 focus-within:ring-offset-0",u?"border-error-500 focus-within:border-error-500 focus-within:ring-error-500":"border-neutral-500",l&&"border-neutral-300 bg-neutral-50 focus-within:ring-0",a),"data-error":u,"data-readonly":l,children:[i&&!l&&jsx(Lt,{config:s,className:c}),jsx(RichTextPlugin,{contentEditable:jsx(ContentEditable,{className:a$1("relative w-full px-4 py-3 text-sm leading-[142%] text-neutral-900 outline-none","[&_h1]:mt-2 [&_h1]:mb-2 [&_h2]:mt-2 [&_h2]:mb-2 [&_h3]:mt-2 [&_h3]:mb-2","[&_li]:my-1 [&_ol]:my-2 [&_ul]:my-2","[&_a]:text-primary-700 [&_a]:underline",l&&"cursor-default",d),style:N,onBlur:o,"aria-invalid":u}),placeholder:l?null:jsx("div",{className:"pointer-events-none absolute top-3 left-4 text-sm text-neutral-500",children:r}),ErrorBoundary:LexicalErrorBoundary}),jsx(HistoryPlugin,{}),jsx(ListPlugin,{}),jsx(mt,{readOnly:l}),jsx(gt,{value:e,isSyncingRef:T}),R&&!l&&jsx(AutoFocusPlugin,{}),P&&jsx(ut,{editorRef:P}),jsx(OnChangePlugin,{ignoreSelectionChange:true,onChange:(b,E)=>{!t||T.current||t(Xe(E),b);}})]}),u&&I&&jsx("p",{className:"text-error-500 mt-1 text-xs leading-[133%]",children:I})]})})});rl.displayName="RichTextEditor";var Lo={en:In,es:vn,pt:Tn},ul={es:{clearPhoneNumberLabel:"Eliminar n\xFAmero de tel\xE9fono",searchCountryPlaceholder:"Buscar..."},pt:{clearPhoneNumberLabel:"Limpar n\xFAmero de telefone",searchCountryPlaceholder:"Pesquisar..."}},dl={clearPhoneNumberLabel:"Clear phone number",searchCountryPlaceholder:"Search..."},fl=Lo.en,yo="9 1234 5678",yt="ZZ",Ro=()=>{},Io=e=>ul[e]??dl,vo=e=>Lo[e]??fl,To=e=>{if(e)try{let t=parsePhoneNumber(e)?.country;return !t||!h(t)?void 0:t}catch{return}},Po=e=>{if(e)return getExampleNumber(e,sl)?.formatNational()},Ze=e=>e??yt,Eo=()=>{let e=getDefaultOptions().locale?.code?.split("-")[0];return e==="es"||e==="pt"?e:"en"};var Ll=({Icon:e,callingCode:t,country:o,countryName:n,callingCodeClassName:r})=>jsxs("div",{className:"flex justify-center gap-2",children:[jsx("span",{className:"flex size-4.5 shrink-0 items-center justify-center",children:jsx(e,{"aria-hidden":true,country:o,label:n})}),t&&jsx("span",{className:a$1("text-sm leading-[143%] font-medium text-neutral-800",r),children:`+${t}`})]}),No=({"aria-label":e,className:t,disabled:o,error:n,iconComponent:r,name:l,onBlur:i,onChange:s,onFocus:a$2,options:d,readOnly:c,translations:R,value:x})=>{let g=useFieldContext(),u=H.useRef(null),I=H.useId(),[P,L]=H.useState(""),{contains:T}=useFilter({sensitivity:"base"}),y=c$1({disabled:o,error:n,readOnly:c}),N=H.useMemo(()=>d.filter(h$1=>h$1.value!==void 0&&h(h$1.value)).map(h=>({callingCode:getCountryCallingCode(h.value),country:h.value,key:Ze(h.value),label:h.label})),[d]),b=H.useMemo(()=>N.find(h=>h.key===Ze(x)),[N,x]),{collection:E,filter:f,set:C}=useListCollection({initialItems:N,itemToString:h=>h.callingCode?`${h.label} +${h.callingCode}`:h.label,itemToValue:h=>h.key,filter:(h,m,M)=>{let w=m.trim().replace(/^\+/,"");return T(h,m)||(M.country?T(M.country,m.toUpperCase()):false)||(M.callingCode?T(M.callingCode,w)||T(`+${M.callingCode}`,m):false)}});H.useEffect(()=>{C(N);},[N,C]);let _=H.useCallback(({inputValue:h})=>{let m=h??"";L(m),f(m),u.current?.scrollTo({top:0});},[f]),F=H.useCallback(({open:h})=>{h&&(L(""),f(""));},[f]),U=H.useCallback(({value:h$1})=>{let m=h$1[0];if(!m||m===yt){s(void 0);return}h(m)&&s(m);},[s]);return jsxs(Combobox.Root,{className:"h-full shrink-0",collection:E,disabled:o||c,ids:{input:I,label:g.ids.label},inputBehavior:"autohighlight",inputValue:P,lazyMount:true,openOnChange:false,openOnClick:false,positioning:{placement:"bottom-end",offset:{mainAxis:12},sameWidth:false},selectionBehavior:"preserve",unmountOnExit:true,value:b?[b.key]:[],onInputValueChange:_,onOpenChange:F,onValueChange:U,children:[jsx(Combobox.Control,{className:"h-full",children:jsx(Combobox.Trigger,{"aria-label":e,className:a$1("relative flex h-full w-19.5 shrink-0 items-center justify-center rounded-l after:pointer-events-none after:absolute after:top-0 after:right-0 after:h-full after:w-px after:content-['']",y==="error"?"bg-danger-20 after:bg-input-ring-error":y==="disabled"||y==="readOnly"?"after:bg-input-ring-disabled bg-neutral-200":y==="errorReadOnly"?"after:bg-input-ring-error bg-neutral-200":"group-focus-within/phone:after:bg-input-ring-focus after:bg-input-ring data-[state=open]:after:bg-input-ring-focus bg-neutral-200",t),disabled:o||c,focusable:true,name:l,onBlur:i,onFocus:a$2,children:b&&jsx(Ll,{Icon:r,callingCode:b.callingCode,country:b.country,countryName:b.label,callingCodeClassName:a$1(y==="error"&&"text-danger-600",(y==="disabled"||y==="readOnly"||y==="errorReadOnly")&&"text-input-text-disabled")})})}),jsx(Portal,{children:jsx(Combobox.Positioner,{children:jsxs(Combobox.Content,{className:"elevation-9 z-layer data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 w-75 origin-(--transform-origin) overflow-hidden rounded-sm bg-neutral-50",children:[jsxs("div",{className:"pb-0",children:[jsx(Combobox.Context,{children:h=>jsx(e$1,{className:"m-1 mb-0",size:"md",state:"default",clearAdornment:!o&&h.inputValue.length>0?jsx(a$5,{onClick:()=>{h.setInputValue("","clear-trigger");}}):void 0,indicator:jsx(q,{className:"pointer-events-none size-4.5 text-neutral-800"}),children:m=>jsx(Combobox.Input,{autoComplete:"off","data-1p-ignore":true,"data-lpignore":"true",placeholder:R.searchCountryPlaceholder,className:m})})}),jsx(a,{className:"mt-2"})]}),jsx(Combobox.List,{ref:u,className:a$1("h-72 overflow-auto outline-none",{"flex flex-col items-center justify-center":E.items.length===0}),children:E.items.length===0?jsx(a$8,{size:"sm",variant:"not-found"}):jsx(Combobox.ItemGroup,{children:E.items.map(h=>jsxs(Combobox.Item,{item:h,className:"data-highlighted:bg-primary-100 relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm text-neutral-900 outline-none select-none data-disabled:pointer-events-none data-disabled:opacity-50",children:[jsx("span",{className:"flex size-4.5 shrink-0 items-center justify-center [&_.PhoneInputCountryIconImg]:size-4.5!",children:jsx(r,{"aria-hidden":true,country:h.country,label:h.label})}),jsx(Combobox.ItemText,{className:"min-w-0 flex-1 truncate text-sm leading-[143%] font-medium",children:h.label}),h.callingCode&&jsx("span",{className:"shrink-0 text-sm text-neutral-600",children:`+${h.callingCode}`}),jsx(k,{className:a$1("ml-auto size-4 shrink-0",h.key===Ze(x)?"opacity-100":"opacity-0")})]},h.key))})})]})})})]})};var Rl=yl,Ao=H.forwardRef(({className:e,defaultCountry:t,disabled:o,error:n,helperText:r,id:l,label:i,labelProps:s,onChange:a=Ro,placeholder:d$1,readOnly:c,required:R,value:x,...g},u)=>{let[I,P]=H.useState(()=>To(x)??t),L=H.useRef(null),T=Eo(),y=c$1({disabled:o,error:n,readOnly:c}),N=H.useMemo(()=>Io(T),[T]),b=H.useMemo(()=>vo(T),[T]),E=H.useMemo(()=>Po(I)??d$1??yo,[d$1,I]),f=H.useCallback(F=>{P(F);},[]),C=H.useCallback(F=>{L.current=F,typeof u=="function"?u(F):u&&(u.current=F);},[u]),_=H.useCallback(()=>{a(void 0),L.current?.focus();},[a]);return jsxs(Field.Root,{"data-error":d(y)||void 0,disabled:o,id:l,invalid:n,readOnly:c,className:a$1(b$1,e),children:[i&&jsx(c$2,{...s,as:Field.Label,label:i,required:R}),jsx(e$1,{state:y,className:"group/phone pl-0 [&_.PhoneInputCountryIconImg]:size-4.5!",clearAdornment:x?jsx(a$5,{ariaLabel:N.clearPhoneNumberLabel,onClick:_}):void 0,children:F=>jsx(Rl,{...g,className:"contents",ref:C,countrySelectComponent:No,countrySelectProps:{error:n,translations:N},defaultCountry:t,disabled:o,flagComponent:a$7,initialValueFormat:"national",inputComponent:Field.Input,labels:b,numberInputProps:{"aria-required":R||void 0,className:a$1(F,"pl-3"),placeholder:E},readOnly:c,value:x,onChange:a,onCountryChange:f})}),r&&jsx(a$6,{as:n?Field.ErrorText:Field.HelperText,children:r})]})});Ao.displayName="PhoneInput";var vl=({children:e,hasDescription:t=false,disabled:o=false,hasDivider:n=false,className:r,isSelected:l,onClick:i,...s})=>jsxs(Fragment,{children:[jsx("div",{className:a$1("flex flex-row px-3 py-4 text-neutral-900 transition-colors",t?"py-3":"py-3.5",o?"cursor-not-allowed text-neutral-400":a$1("hover:bg-primary-100 focus:bg-primary-200",!!i?"cursor-pointer":"cursor-default"),l&&"bg-primary-200",r),onClick:d=>{o||i?.(d);},...s,children:e}),n&&jsx(a,{})]}),te=vl;var su=({children:e,title:t,titleLines:o,description:n="",descriptionLines:r,startIcon:l,endIcon:i,hasDivider:s=false,disabled:a=false,isSelected:d=false,className:c,...R})=>jsxs(te,{hasDescription:!!n,disabled:a,hasDivider:s,className:c,isSelected:d,...R,children:[l&&H__default.cloneElement(l,{className:"shrink-0 mr-2 h-4.5 w-4.5"}),jsx(ce,{title:t,titleLines:o,description:n,descriptionLines:r,disabled:a}),i&&H__default.cloneElement(i,{className:"min-h-4.5 min-w-4.5 self-center ml-4"})]});export{Kl as a,su as b,li as c,fi as d,Rs as e,ao as f,ma as g,Ra as h,ct as i,pt as j,ge as k,ht as l,bt as m,rl as n,Ao as o};
|
|
1
|
+
import {a as a$9}from'./chunk-QX4D2CU2.js';import {a as a$3}from'./chunk-ORDWXBDZ.js';import {c as c$3,h}from'./chunk-XRFPQJ5P.js';import {a as a$7}from'./chunk-B5KKVXLE.js';import {c as c$6}from'./chunk-JYNJHAGL.js';import {b}from'./chunk-ZYFA5BA3.js';import {d as d$1}from'./chunk-WAUY2MS6.js';import {a as a$8}from'./chunk-FZ6JW3TZ.js';import {a as a$4,b as b$2,c as c$4,d as d$2}from'./chunk-NYURVOJI.js';import {c as c$5}from'./chunk-FYB3QRNL.js';import {c as c$1,e as e$1,a as a$5,b as b$1,d}from'./chunk-MQL3NZ6S.js';import {a as a$6}from'./chunk-VIMWKUML.js';import {c as c$2}from'./chunk-QZUQ6AZK.js';import {d as d$3}from'./chunk-MP4CHZ2K.js';import {a as a$2}from'./chunk-R6NIURLZ.js';import {a}from'./chunk-AWRP67K4.js';import {e as e$2}from'./chunk-PI7DECIN.js';import {c,q,k,h as h$1}from'./chunk-QMPBFFFC.js';import {e}from'./chunk-Y3ZZYSKX.js';import {a as a$1}from'./chunk-OBZIYJO7.js';import*as H from'react';import H__default,{createContext,useMemo,useCallback,forwardRef,useRef,useContext,useEffect,useId,useState}from'react';import*as Ht from'@radix-ui/react-portal';import {jsx,jsxs,Fragment}from'react/jsx-runtime';import {Field,useFieldContext}from'@ark-ui/react/field';import {useListCollection,Combobox}from'@ark-ui/react/combobox';import {useFilter}from'@ark-ui/react/locale';import {Portal}from'@ark-ui/react/portal';import {getDefaultOptions}from'date-fns';import In from'react-phone-number-input/locale/en.json';import vn from'react-phone-number-input/locale/es.json';import Tn from'react-phone-number-input/locale/pt.json';import {LexicalComposer}from'@lexical/react/LexicalComposer';import {RichTextPlugin}from'@lexical/react/LexicalRichTextPlugin';import {ContentEditable}from'@lexical/react/LexicalContentEditable';import {HistoryPlugin}from'@lexical/react/LexicalHistoryPlugin';import {ListPlugin}from'@lexical/react/LexicalListPlugin';import {AutoFocusPlugin}from'@lexical/react/LexicalAutoFocusPlugin';import {OnChangePlugin}from'@lexical/react/LexicalOnChangePlugin';import {LexicalErrorBoundary}from'@lexical/react/LexicalErrorBoundary';import {HeadingNode,$isHeadingNode,$createHeadingNode}from'@lexical/rich-text';import {ListNode,ListItemNode,$isListNode,REMOVE_LIST_COMMAND,INSERT_UNORDERED_LIST_COMMAND,INSERT_ORDERED_LIST_COMMAND}from'@lexical/list';import {useLexicalComposerContext}from'@lexical/react/LexicalComposerContext';import {$generateHtmlFromNodes,$generateNodesFromDOM}from'@lexical/html';import {$getSelection,$isRangeSelection,$isElementNode,SELECTION_CHANGE_COMMAND,CAN_UNDO_COMMAND,CAN_REDO_COMMAND,UNDO_COMMAND,REDO_COMMAND,OUTDENT_CONTENT_COMMAND,INDENT_CONTENT_COMMAND,FORMAT_ELEMENT_COMMAND,$createParagraphNode,FORMAT_TEXT_COMMAND,$getRoot,$insertNodes}from'lexical';import {$setBlocksType}from'@lexical/selection';import {$findMatchingParent,mergeRegister}from'@lexical/utils';import {AlignJustifyIcon,AlignRightIcon,AlignCenterIcon,AlignLeftIcon,UnderlineIcon,ItalicIcon,BoldIcon,UndoIcon,RedoIcon,ListIcon,ListOrderedIcon,IndentDecreaseIcon,IndentIncreaseIcon}from'lucide-react';import yl,{parsePhoneNumber,getCountryCallingCode}from'react-phone-number-input';import {getExampleNumber}from'libphonenumber-js/mobile';import sl from'libphonenumber-js/mobile/examples';var ko=({title:e,titleLines:t=2,description:o,descriptionLines:n=1,Icon:r,iconAsColumn:l=true,className:i,...s})=>jsxs("div",{className:a$1("flex gap-2 py-4 pr-6 pl-4",l&&"flex-col items-center gap-1",!l&&!o&&"items-center",i),...s,children:[r&&jsx(r,{className:a$1("shrink-0 text-neutral-300"),size:24}),jsxs("div",{className:a$1("flex flex-col gap-1",l&&"text-center"),children:[jsx("p",{className:a$1("leading-[130%] text-neutral-500",!!o&&"font-medium"),style:t?{overflow:"hidden",display:"-webkit-box",WebkitBoxOrient:"vertical",WebkitLineClamp:t}:void 0,children:e}),o&&jsx("p",{className:"text-sm leading-[130%] text-neutral-500",style:n?{overflow:"hidden",display:"-webkit-box",WebkitBoxOrient:"vertical",WebkitLineClamp:n}:void 0,children:o})]})]}),Ke=ko;var wo=H__default.memo(({handleSelect:e$1,NoResultsIcon:t,noResultsLabel:o,noResultsDescription:n,noResultsDescriptionLines:r,noResultsAsColumn:l,noResultsButtonOnClick:i,optionDescriptionLines:s,noResultsButtonLabel:a$2,filteredOptions:d,inputRect:c,inputRef:R,popoverPosition:x,optionsListRef:g,selectedOption:u,options:I,setFilteredOptions:P})=>jsx(Ht.Root,{asChild:true,children:jsxs("div",{ref:g,className:"elevation-8 pointer-events-auto fixed z-50 mb-2 hidden max-h-[336px] w-full flex-col overflow-y-auto rounded-lg bg-neutral-50",style:c?{width:`${c.width}px`,left:c.left,top:x==="bottom"?`${c.bottom}px`:void 0,bottom:x==="top"?`${window.innerHeight-c.top}px`:void 0}:void 0,children:[d.length===0&&jsxs("div",{className:"elevation-8 flex max-h-88 flex-1 flex-col justify-center rounded-lg bg-neutral-50",children:[jsx(Ke,{title:o,description:n,Icon:t,iconAsColumn:l,descriptionLines:r}),i&&jsxs(Fragment,{children:[jsx(a,{}),jsx(e,{variant:"ghost",className:"my-3 w-fit self-center",onClick:()=>{g.current.style.display="none",R.current.value="",P(I),i();},children:a$2})]})]}),d.map(L=>jsx(b.Root,{disabled:L.disabled,selected:u?.value===L.value,onClick:()=>e$1(L),children:jsxs(b.Content,{children:[jsx(b.Headline,{children:L.label}),L.description&&jsx(b.Description,{className:a$1({"line-clamp-1":s===1,"line-clamp-2":s===2,"line-clamp-3":s===3,"line-clamp-4":s===4}),children:L.description})]})},L.key??L.value))]})})),wt=wo;var _o=336,Kl=({options:e,defaultSelectedOption:t,onSelect:o,onClick:n,onInputChange:r,error:l,helperText:i,label:s,placeholder:a,value:d,size:c="md",optionDescriptionLines:R=1,noResultsLabel:x,noResultsIcon:g,noResultsDescription:u,noResultsDescriptionLines:I,noResultsAsColumn:P,noResultsButtonOnClick:L,noResultsButtonLabel:T,className:y,disabled:N})=>{let[b,E]=useState(t??null),f=useRef(null),C=useRef(null),[_,F]=useState(),[U,h]=useState([]),[m,M]=useState("bottom"),[w,A]=useState(),$=_o,K=useCallback(D=>{f.current.style.display="none",C.current.value=D.label,E(D),o?.(D);},[o]),Q=useCallback(()=>{if(!C?.current)return;let D=C.current.getBoundingClientRect();F(D);let Z=w?w.height:$,j=window.innerHeight-D.bottom>Z,we=D.top>Z;M(j?"bottom":we?"top":"bottom");},[w?.height]),Le=useCallback(()=>{let D=e.filter(Z=>Z.label.toLowerCase().includes(C?.current?.value.toLowerCase()??""));if(h(D),f?.current){let Z=f.current.getBoundingClientRect();A(Z);}},[e]);return useEffect(()=>{h(e);},[e]),useEffect(()=>{if(!d){E(null),C.current&&(C.current.value="");return}(!C.current?.value||b?.value!==d.value)&&(E(d),C.current.value=d.label);},[d]),a$9(f,()=>{f.current.style.display="none",b&&C.current&&(C.current.value=b.label);}),useEffect(()=>{if(C?.current)return Q(),C.current.addEventListener("mousedown",Q),C.current.addEventListener("input",Le),window.addEventListener("scroll",Q,true),window.addEventListener("resize",Q),()=>{C.current?.removeEventListener("mousedown",Q),C.current?.removeEventListener("input",Le),window.removeEventListener("scroll",Q,true),window.removeEventListener("resize",Q);}},[Q,Le]),jsxs("div",{className:a$1("relative",y),children:[jsx(a$3,{ref:C,autoComplete:"off",list:"",selectMode:true,onChange:D=>{D.target.value||(E(null),o?.(null)),r?.(D);},onClean:()=>{E(null),h(e),o?.(null);},onClick:D=>{f.current.style.display="flex",n?.(D);},onBlur:()=>{b&&C.current&&(C.current.value=b.label);},label:s,helperText:i,placeholder:a,size:c,error:l,disabled:N}),jsx(wt,{handleSelect:K,noResultsLabel:x,NoResultsIcon:g,optionDescriptionLines:R,noResultsAsColumn:P,noResultsButtonLabel:T,noResultsButtonOnClick:L,noResultsDescription:u,noResultsDescriptionLines:I,filteredOptions:U,inputRect:_,inputRef:C,popoverPosition:m,optionsListRef:f,selectedOption:b,options:e,setFilteredOptions:h})]})};var Bo=({children:e,title:t,titleLines:o,description:n="",descriptionLines:r,disabled:l=false,className:i,...s})=>jsxs("div",{className:a$1("flex w-full flex-col gap-1",i),...s,children:[jsx("p",{className:a$1("text-sm leading-[130%] break-all",!!n&&"font-medium"),style:o?{overflow:"hidden",display:"-webkit-box",WebkitBoxOrient:"vertical",WebkitLineClamp:o}:void 0,children:t}),n&&jsx("p",{className:a$1("text-xs leading-[130%]",l?"text-neutral-400":"text-neutral-700"),style:r?{overflow:"hidden",display:"-webkit-box",WebkitBoxOrient:"vertical",WebkitLineClamp:r}:void 0,children:n})]}),ce=Bo;var li=({children:e,title:t,titleLines:o,description:n="",descriptionLines:r,startIcon:l,badgeContent:i,hasDivider:s=false,disabled:a=false,onSelect:d,className:c,...R})=>jsxs(te,{hasDescription:!!n,disabled:a,onClick:d,hasDivider:s,className:a$1(!a&&"cursor-pointer",c),...R,children:[l&&H__default.cloneElement(l,{className:"shrink-0 mr-2 h-4.5 w-4.5"}),jsx(ce,{title:t,titleLines:o,description:n,descriptionLines:r,disabled:a}),jsxs("div",{className:"ml-4 flex gap-2",children:[i&&jsx(a$2,{content:i,size:"lg",variant:"alert",className:a$1("self-center",a&&"bg-neutral-400")}),jsx(h$1,{className:"h-4.5 w-4.5 self-center"})]})]});var fi=({children:e,title:t,titleLines:o=1,description:n="",descriptionLines:r,startIcon:l,hasDivider:i=false,disabled:s=false,checked:a,onCheckedChange:d,className:c,...R})=>jsxs(te,{hasDescription:!!n,disabled:s,hasDivider:i,...R,className:a$1("pr-6",c),children:[l&&H__default.cloneElement(l,{className:"shrink-0 w-4.5 h-4.5 mr-2"}),jsx(ce,{title:t,titleLines:o,description:n,descriptionLines:r,disabled:s}),jsx(c$5,{checked:a,onCheckedChange:d,className:"ml-4 self-center",disabled:s})]});var ne=336,Ut=createContext({inputRef:null,optionsListRef:null,autocompleteId:"",inputRect:void 0,showChips:false,filteredOptions:[],currentFocus:-1,popoverPosition:"bottom",setFilteredOptions:()=>{},setCurrentFocus:()=>{},setShowChips:()=>{},setPopoverPosition:()=>{},setInputRect:()=>{},optionsListHeight:ne,setOptionsListHeight:()=>{},optionsListRect:void 0,setOptionsListRect:()=>{}}),oe=()=>{let e=useContext(Ut);if(e===null)throw new Error("useAutocompleteMultipleContext must be used within a AutocompleteMultipleProvider");return e},$t=({children:e})=>{let t=useRef(null),o=useRef(null),n=useId(),[r,l]=useState(),[i,s]=useState(true),[a,d]=useState([]),[c,R]=useState(-1),[x,g]=useState("bottom"),[u,I]=useState(),[P,L]=useState(ne);return jsx(Ut.Provider,{value:{optionsListRef:t,inputRef:o,autocompleteId:n,inputRect:r,showChips:i,filteredOptions:a,currentFocus:c,popoverPosition:x,setFilteredOptions:d,setCurrentFocus:R,setShowChips:s,setPopoverPosition:g,setInputRect:l,optionsListHeight:P,optionsListRect:u,setOptionsListRect:I,setOptionsListHeight:L},children:e})};var Yo=({option:e,onMountWidth:t})=>{let o=useRef(null);return useEffect(()=>{o.current&&t?.(o.current.clientWidth);},[]),jsx(d$1,{variant:"fill",color:"neutral",ref:o,className:"shrink-0",size:"md",hasCloseIcon:false,children:e.label})},Wt=Yo;var en=150,tn=H__default.memo(({selectedOptions:e,error:t,onCleanSelectedOptions:o,disabled:n,size:r})=>{let{autocompleteId:l,inputRect:i,inputRef:s,optionsListRef:a}=oe(),d=H__default.useRef(null),[c$1,R]=H__default.useState(new Map),x=useMemo(()=>{if(!i?.width)return [];let u=0,I=i.width-en,P=0;for(let L=0;L<e.length&&(P+=c$1.get(L)??0,!(P>I));L++)u++;return e.slice(0,u)},[i?.width,e,c$1]),g=useCallback(()=>{n||(s?.current?.focus(),a.current.style.display="flex");},[n]);return jsxs("div",{onClick:g,className:a$1("absolute top-0 z-30 flex w-full cursor-pointer flex-nowrap items-center gap-2 pr-12 pl-3",n&&"cursor-not-allowed"),style:{maxWidth:i?.width?i?.width:void 0,height:i?.height?i?.height:void 0},children:[jsx("div",{className:"flex flex-1 gap-1 overflow-hidden",ref:d,children:x.map((u,I)=>jsx(Wt,{option:u,onMountWidth:P=>R(L=>new Map(L).set(I,P))},`chip-input-${l}-${u.value}`))}),e.length>x.length&&jsx("span",{className:"text-base",children:"..."}),e.length>0&&!t&&jsx(a$2,{content:String(e.length),size:r}),t&&e.length>0&&jsx(c,{className:"text-error-700 h-6 w-6",onClick:u=>{u.stopPropagation(),o();}})]})}),qt=tn;var rn=H__default.memo(({option:e,index:t,onPressOption:o,isSelected:n,optionDescriptionLines:r})=>{let{currentFocus:l,inputRef:i}=oe();return jsxs(b.Root,{selected:l===t,disabled:e.disabled,onMouseDown:s=>{e.disabled||(i?.current?.value&&s.preventDefault(),o?.(e,s));},children:[jsxs(b.Content,{children:[jsx(b.Headline,{children:e.label}),e.description&&jsx(b.Description,{className:a$1({"line-clamp-1":r===1,"line-clamp-2":r===2,"line-clamp-3":r===3,"line-clamp-4":r===4}),children:e.description})]}),jsx(b.Trailing,{children:jsx(b.CheckboxControl,{checked:n})})]})}),rt=rn;var cn=H__default.memo(({selectedOptions:e$1,handleSelect:t,NoResultsIcon:o,noResultsLabel:n,noResultsDescription:r,noResultsDescriptionLines:l,noResultsAsColumn:i,noResultsButtonOnClick:s,optionDescriptionLines:a$1,noResultsButtonLabel:d})=>{let{popoverPosition:c,optionsListRef:R,filteredOptions:x,inputRect:g,autocompleteId:u,inputRef:I,optionsListHeight:P}=oe(),L=useCallback(y=>e$1.some(N=>N.value===y.value),[e$1]),T=useMemo(()=>e$1.filter(y=>y.label.toLowerCase().includes(I?.current?.value.toLowerCase()??"")),[e$1,I?.current?.value]);return jsx(Ht.Root,{asChild:true,children:jsxs("div",{ref:R,className:"elevation-8 pointer-events-auto fixed z-50 mb-2 hidden w-full flex-col overflow-y-auto rounded-lg bg-neutral-50",style:g?{width:`${g.width}px`,left:g.left,top:c==="bottom"?`${g.bottom}px`:void 0,bottom:c==="top"?`${window.innerHeight-g.top}px`:void 0,maxHeight:P+"px"}:void 0,children:[x.length===0&&jsxs("div",{className:"elevation-8 flex max-h-88 flex-1 flex-col justify-center rounded-lg bg-neutral-50",children:[jsx(Ke,{title:n,description:r,Icon:o,iconAsColumn:i,descriptionLines:l}),s&&jsxs(Fragment,{children:[jsx(a,{}),jsx(e,{variant:"ghost",className:"my-3 w-fit self-center",onClick:()=>{R.current.style.display="none",I.current.value="",s();},children:d})]})]}),T.map((y,N)=>jsx(rt,{option:y,index:N,onPressOption:b=>t(b),isSelected:L(y),optionDescriptionLines:a$1},`autocomplete-option-${u}-${y.key??y.value}`)),x.map((y,N)=>!e$1.some(b=>b.value===y.value)&&jsx(rt,{option:y,index:N,onPressOption:b=>t(b),isSelected:L(y),optionDescriptionLines:a$1},`autocomplete-option-${u}-${y.key??y.value}`))]})})}),Qt=cn;var un=H__default.memo(({selectedOptions:e,onSelect:t,error:o,helperText:n,label:r,placeholder:l,options:i,onInputChange:s,size:a,disabled:d})=>{let{setCurrentFocus:c,setFilteredOptions:R,optionsListRef:x,inputRef:g}=oe();return jsx(a$3,{ref:g,autoComplete:"off",list:"",disabled:d,selectMode:true,onChange:u=>{c(-1),s?.(u.target.value);},onClean:()=>{c(-1),R(i),t?.(null,e);},onClick:()=>{d||(x.current.style.display="flex");},error:o,helperText:n,label:r,placeholder:l,fixedTopLabel:e.length>0,size:a})}),jt=un;var Yt=({options:e,defaultSelectedOptions:t,onSelect:o,error:n,helperText:r,label:l,placeholder:i,noResultsLabel:s,noResultsIcon:a,noResultsDescription:d,noResultsDescriptionLines:c,noResultsAsColumn:R,noResultsButtonOnClick:x,noResultsButtonLabel:g,className:u,onInputChange:I,value:P,loading:L,size:T="md",optionDescriptionLines:y=1,disabled:N})=>{let{inputRef:b,optionsListRef:E,setFilteredOptions:f,setShowChips:C,setInputRect:_,setPopoverPosition:F,setCurrentFocus:U,showChips:h,setOptionsListRect:m,optionsListRect:M,setOptionsListHeight:w}=oe(),A=useRef(false),[$,K]=useState(t??[]),Q=useCallback(W=>{K(J=>{let le,ye=J.findIndex(Fo=>Fo.value===W.value);return ye===-1?(le=J.concat(W),o?.(W,le),le):(le=J.toSpliced(ye,1),o?.(W,le),le)});},[o]),Le=useCallback(()=>{K([]),f(e),o?.(null,[]);},[]),D=useCallback(()=>{C(false);},[]),Z=useCallback(()=>{C(true);},[]),j=useCallback(()=>{if(!b?.current)return;let W=b.current.getBoundingClientRect();_(W);let J=M?M.height>ne?ne:M.height:ne,le=window.innerHeight-W.bottom>J,ye=W.top>J;F(le?"bottom":ye?"top":"bottom"),w(ye?ne:window.innerHeight-W.bottom>ne?ne:window.innerHeight-W.bottom);},[M?.height]),we=useCallback(()=>{let W=e.filter(J=>J.label.toLowerCase().includes(b?.current?.value.toLowerCase()??""));if(f(W),E?.current){let J=E.current.getBoundingClientRect();m(J);}},[e,E?.current]);return useEffect(()=>{f(e);},[e]),a$9(E,()=>{E.current.style.display="none",U(-1);}),useEffect(()=>{if(b?.current)return j(),b.current.addEventListener("mousedown",j),b.current.addEventListener("input",we),b.current.addEventListener("focusin",D),b.current.addEventListener("focusout",Z),window.addEventListener("scroll",j,true),window.addEventListener("resize",j),()=>{b.current?.removeEventListener("mousedown",j),b.current?.removeEventListener("input",j),b.current?.removeEventListener("focusout",Z),b.current?.removeEventListener("focusin",D),window.removeEventListener("scroll",j,true),window.removeEventListener("resize",j);}},[j,Z,D,we]),useEffect(()=>{P&&(K(P),C(true));},[P]),useEffect(()=>{L||t&&t.length&&!A.current&&(K(t),A.current=true,C(true));},[t,L]),jsxs("div",{className:a$1("relative",u),children:[jsx(jt,{selectedOptions:$,onSelect:o,error:n,helperText:r,label:l,placeholder:i,handleSelect:Q,options:e,onInputChange:I,size:T,disabled:N}),h&&jsx(qt,{selectedOptions:$,disabled:N,error:n,onCleanSelectedOptions:Le,size:T}),jsx(Qt,{handleSelect:Q,selectedOptions:$,noResultsLabel:s,NoResultsIcon:a,optionDescriptionLines:y,noResultsAsColumn:R,noResultsButtonLabel:g,noResultsButtonOnClick:x,noResultsDescription:d,noResultsDescriptionLines:c})]})};var Rs=e=>jsx($t,{children:jsx(Yt,{...e})});var yn=({code:e,codeClassName:t})=>jsxs("div",{className:"flex justify-center gap-2",children:[jsx(a$7,{country:e,className:"size-4.5"}),jsx("span",{className:a$1("text-sm leading-[143%] font-medium text-neutral-800",t),children:e})]}),Zt=({className:e,disabled:t,error:o,onChange:n,options:r,readOnly:l,translations:i,value:s})=>{let a$2=useFieldContext(),d=H.useRef(null),c=H.useId(),[R,x]=H.useState(""),{contains:g}=useFilter({sensitivity:"base"}),u=c$1({disabled:t,error:o,readOnly:l}),I=H.useMemo(()=>r.map(f=>({...f,key:f.code})),[r]),P=H.useMemo(()=>I.find(f=>f.key===s),[I,s]),{collection:L,filter:T,set:y}=useListCollection({initialItems:I,itemToString:f=>`${f.label} ${f.code}`,itemToValue:f=>f.key,filter:(f,C,_)=>g(f,C)||g(_.code,C.toUpperCase())});H.useEffect(()=>{y(I);},[I,y]);let N=H.useCallback(({inputValue:f})=>{let C=f??"";x(C),T(C),d.current?.scrollTo({top:0});},[T]),b=H.useCallback(({open:f})=>{f&&(x(""),T(""));},[T]),E=H.useCallback(({items:f})=>{let C=f[0]?.code;C&&n(C);},[n]);return jsxs(Combobox.Root,{className:"h-full shrink-0",collection:L,disabled:t||l,ids:{input:c,label:a$2.ids.label},inputBehavior:"autohighlight",inputValue:R,lazyMount:true,openOnChange:false,openOnClick:false,positioning:{placement:"bottom-end",offset:{mainAxis:12},sameWidth:false},selectionBehavior:"preserve",unmountOnExit:true,value:P?[P.key]:[],onInputValueChange:N,onOpenChange:b,onValueChange:E,children:[jsx(Combobox.Control,{className:"h-full",children:jsx(Combobox.Trigger,{className:a$1("relative flex h-full w-19.5 shrink-0 items-center justify-center rounded-l after:pointer-events-none after:absolute after:top-0 after:right-0 after:h-full after:w-px after:content-['']",u==="error"?"bg-danger-20 after:bg-input-ring-error":u==="disabled"||u==="readOnly"?"after:bg-input-ring-disabled bg-neutral-200":u==="errorReadOnly"?"after:bg-input-ring-error bg-neutral-200":"group-focus-within/id-field:after:bg-input-ring-focus after:bg-input-ring data-[state=open]:after:bg-input-ring-focus bg-neutral-200",e),disabled:t||l,focusable:true,children:P&&jsx(yn,{code:P.code,codeClassName:a$1(u==="error"&&"text-danger-600",(u==="disabled"||u==="readOnly"||u==="errorReadOnly")&&"text-input-text-disabled")})})}),jsx(Portal,{children:jsx(Combobox.Positioner,{children:jsxs(Combobox.Content,{className:"elevation-9 z-layer data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 w-75 origin-(--transform-origin) overflow-hidden rounded-sm bg-neutral-50",children:[jsxs("div",{className:"pb-0",children:[jsx(Combobox.Context,{children:f=>jsx(e$1,{className:"m-1 mb-0",size:"md",state:"default",clearAdornment:!t&&f.inputValue.length>0?jsx(a$5,{onClick:()=>{f.setInputValue("","clear-trigger");}}):void 0,indicator:jsx(q,{className:"pointer-events-none size-4.5 text-neutral-800"}),children:C=>jsx(Combobox.Input,{autoComplete:"off","data-1p-ignore":true,"data-lpignore":"true",placeholder:i.searchCountryPlaceholder,className:C})})}),jsx(a,{className:"mt-2"})]}),jsx(Combobox.List,{ref:d,className:a$1("h-72 overflow-auto outline-none",{"flex flex-col items-center justify-center":L.items.length===0}),children:L.items.length===0?jsx(a$8,{size:"sm",variant:"not-found"}):jsx(Combobox.ItemGroup,{children:L.items.map(f=>jsxs(Combobox.Item,{item:f,className:"data-highlighted:bg-primary-100 relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm text-neutral-900 outline-none select-none data-disabled:pointer-events-none data-disabled:opacity-50",children:[jsx(a$7,{country:f.code,className:"size-4.5"}),jsx(Combobox.ItemText,{className:"min-w-0 flex-1 truncate text-sm leading-[143%] font-medium",children:f.label}),jsx("span",{className:"shrink-0 text-sm text-neutral-600",children:f.code}),jsx(k,{className:a$1("ml-auto size-4 shrink-0",f.key===s?"opacity-100":"opacity-0")})]},f.key))})})]})})})]})};var st={en:"Clear identification number",es:"Limpiar n\xFAmero de identificaci\xF3n",pt:"Limpar n\xFAmero de identifica\xE7\xE3o"},Jt={en:In,es:vn,pt:Tn},Pn=st.en,En=Jt.en,Nn={es:{clearIdLabel:st.es,searchCountryPlaceholder:"Buscar..."},pt:{clearIdLabel:st.pt,searchCountryPlaceholder:"Pesquisar..."}},An={clearIdLabel:Pn,searchCountryPlaceholder:"Search..."},eo=()=>{let e=getDefaultOptions().locale?.code?.split("-")[0];return e==="es"||e==="pt"?e:"en"},to=e=>Nn[e]??An,Mn=(e,t)=>(Jt[t]??En)[e]??e,oo=({localeCode:e})=>c$3.map(t=>({code:t,label:Mn(t,e)})).sort((t,o)=>t.label.localeCompare(o.label)),no=a$4,ro=b$2,lo=(e,t)=>{let o=t.trim();return !o||!c$4(e,o).isValid?o:d$2(e,o)};var io=()=>{},ao=H.forwardRef(({autoComplete:e,className:t,country:o,disabled:n,error:r,helperText:l,id:i,label:s,labelProps:a,name:d$1,onBlur:c,onChange:R=io,onCountryChange:x=io,placeholder:g,readOnly:u,required:I,value:P},L)=>{let[T,y]=H.useState(P??""),N=H.useRef(null),b=eo(),E=H.useRef(P??""),f=c$1({disabled:n,error:r,readOnly:u});H.useEffect(()=>{let A=P??"";A!==E.current&&(E.current=A,y(A));},[P]);let C=H.useMemo(()=>to(b),[b]),_=H.useMemo(()=>oo({localeCode:b}),[b]),F=H.useMemo(()=>ro(o??"")||g||no,[o,g]),U=H.useCallback((A,$)=>{let K=lo(A,$);E.current=K,R(K);},[R]),h=H.useCallback(A=>{y(A),U(o??"",A);},[o,U]),m=H.useCallback(A=>{x(A),U(A,T);},[T,x,U]),M=H.useCallback(A=>{N.current=A,typeof L=="function"?L(A):L&&(L.current=A);},[L]),w=H.useCallback(()=>{h(""),N.current?.focus();},[h]);return jsxs(Field.Root,{"data-error":d(f)||void 0,disabled:n,id:i,invalid:r,readOnly:u,className:a$1(b$1,t),children:[s&&jsx(c$2,{...a,as:Field.Label,label:s,required:I}),jsx(e$1,{state:f,className:"group/id-field pl-0",clearAdornment:T?jsx(a$5,{ariaLabel:C.clearIdLabel,onClick:w}):void 0,children:A=>jsxs(Fragment,{children:[jsx(Zt,{disabled:n,error:r,onChange:m,options:_,readOnly:u,translations:C,value:o}),jsx(Field.Input,{"aria-required":I||void 0,autoComplete:e,className:a$1(A,"pl-3"),name:d$1,onBlur:c,onChange:$=>h($.target.value),placeholder:F,value:T,ref:M})]})}),l&&jsx(a$6,{as:r?Field.ErrorText:Field.HelperText,children:l})]})});ao.displayName="IdField";var ma=({children:e$1,title:t,titleLines:o=1,description:n,descriptionLines:r=1,StartIcon:l,hasDivider:i=false,disabled:s=false,actionButton:a,isSelected:d=false,className:c,...R})=>jsxs(te,{hasDescription:!!n,disabled:s,hasDivider:i,isSelected:d,...R,className:c,children:[l&&jsx(l,{className:"mr-2 h-4.5 w-4.5 shrink-0 grow-0"}),jsx(ce,{title:t,titleLines:o,description:n,descriptionLines:r,disabled:s}),a&&jsx(Fragment,{children:a.isIcon?jsx(e$2,{...a,className:"ml-4 self-center",variant:"ghost",size:"sm",disabled:s??a.disabled}):jsx(e,{...a,className:"ml-4 self-center",size:"sm",variant:"ghost",disabled:s??a.disabled})})]});var Ra=({title:e,description:t="",descriptionLines:o,hasDivider:n=false,disabled:r=false,checked:l,onCheckedChange:i,className:s,chipStatus:a,chipExpandable:d,...c})=>jsxs(te,{hasDescription:!!t,disabled:r,hasDivider:n,...c,className:a$1("pr-6",s),children:[jsx(c$5,{checked:l,onCheckedChange:i,className:"mr-4 self-center",disabled:r}),jsxs("div",{className:"flex-1",children:[jsxs("div",{className:"flex items-center justify-between gap-2",children:[jsx("p",{className:a$1("line-clamp-1 text-sm leading-[130%] break-all",!!t&&"font-medium"),children:e}),d&&jsx("div",{className:"ml-auto flex min-w-0 flex-shrink-0 items-center justify-end",children:jsx(c$6,{...d})}),a&&jsx("div",{className:"ml-4 flex shrink-0 items-center gap-1",children:jsx(d$3,{...a,size:"xs",className:"shrink-0"})})]}),t&&jsx("p",{className:a$1("text-xs leading-[130%]",r?"text-neutral-400":"text-neutral-700",{"line-clamp-1":o===1,"line-clamp-2":o===2,"line-clamp-3":o===3,"line-clamp-4":o===4}),children:t})]})]});var ct={paragraph:"m-0",ltr:"text-left",rtl:"text-right",heading:{h1:"mb-2 text-2xl leading-[130%] font-semibold text-neutral-900",h2:"mb-2 text-xl leading-[130%] font-semibold text-neutral-900",h3:"mb-2 text-lg leading-[130%] font-semibold text-neutral-900",h4:"mb-2 text-base leading-[130%] font-semibold text-neutral-900",h5:"mb-2 text-sm leading-[130%] font-semibold text-neutral-900",h6:"mb-2 text-xs leading-[130%] font-semibold text-neutral-900"},list:{ul:"my-2 list-disc pl-5",ol:"my-2 list-decimal pl-5",listitem:"my-1",nested:{listitem:"my-1"}},text:{bold:"font-semibold",italic:"italic",underline:"underline",strikethrough:"line-through",code:"rounded bg-neutral-100 px-1 py-0.5 font-mono text-xs"},code:"rounded bg-neutral-100 p-2 font-mono text-xs",quote:"border-l-2 border-neutral-300 pl-3 italic text-neutral-700",link:"text-primary-700 underline hover:text-primary-800"},pt={headings:["h1","h2","h3"],textFormat:["bold","italic","underline"],lists:true,indent:true,alignment:["left","center","right","justify"],undoRedo:true};var mt=({readOnly:e})=>{let[t]=useLexicalComposerContext();return useEffect(()=>{t.setEditable(!e);},[t,e]),null};var ut=({editorRef:e})=>{let[t]=useLexicalComposerContext();return useEffect(()=>(e.current=t,()=>{e.current===t&&(e.current=null);}),[t,e]),null};var Sn={"ql-align-left":"left","ql-align-center":"center","ql-align-right":"right","ql-align-justify":"justify"},Bn={center:"ql-align-center",right:"ql-align-right",justify:"ql-align-justify"},zn=()=>typeof window<"u"&&typeof window.DOMParser<"u",co=e=>zn()?new DOMParser().parseFromString(e,"text/html"):null,Vn=e=>(e??"").replace(/\s+/g," ").trim(),ft=e=>{let t=0;for(let o of Array.from(e.classList)){let n=o.match(/^ql-indent-(\d+)$/);if(!n)continue;let r=Number.parseInt(n[1],10);Number.isFinite(r)&&(t=Math.max(t,r)),e.classList.remove(o);}return t},Un=e=>{let t=e.querySelectorAll("[class*='ql-align-']");for(let o of Array.from(t))for(let n of Array.from(o.classList)){let r=Sn[n];r&&(r!=="left"&&(o.style.textAlign=r),o.classList.remove(n));}},$n=e=>{let t=e.querySelectorAll("[class*='ql-indent-']");for(let o of Array.from(t)){if(o.tagName==="LI")continue;let n=ft(o);n>0&&(o.style.paddingInlineStart=`${n*3}em`);}},Wn=(e,t)=>{let o=e.getAttribute("data-list");return o==="bullet"?"ul":o==="ordered"?"ol":t},qn=e=>{let t=e.cloneNode(true);return t.removeAttribute("data-list"),t.removeAttribute("data-checked"),t.removeAttribute("data-indent"),ft(t),t},dt=(e,t)=>e.createElement(t),Gn=(e,t)=>{let o=Array.from(e.children).filter(a=>a.tagName==="LI");if(o.length===0||!o.some(a=>a.hasAttribute("data-list")?true:Array.from(a.classList).some(d=>/^ql-indent-\d+$/.test(d))))return;let r=[],l=[],i=e.tagName==="UL"?"ul":"ol";for(let a of o){let d=ft(a),c=Wn(a,i),R=qn(a);for(;l.length>0&&l[l.length-1].level>d;)l.pop();if(l.length===0){let g=dt(t,c);r.push(g),l.push({level:0,kind:c,listElement:g});}let x=l[l.length-1];for(;x.level<d;){let g=x.listElement.lastElementChild;if(!g||g.tagName!=="LI")break;let u=dt(t,c);g.appendChild(u),x={level:x.level+1,kind:c,listElement:u},l.push(x);}if(x=l[l.length-1],x.kind!==c){let g=dt(t,c);if(l.length===1)r.push(g),l[0]={level:0,kind:c,listElement:g};else {let I=l[l.length-2].listElement.lastElementChild;I&&I.tagName==="LI"?(I.appendChild(g),l[l.length-1]={level:x.level,kind:c,listElement:g}):(r.push(g),l.length=1,l[0]={level:0,kind:c,listElement:g});}x=l[l.length-1];}x.listElement.appendChild(R);}if(r.length===0)return;let s=t.createDocumentFragment();for(let a of r)s.appendChild(a);e.replaceWith(s);},Kn=(e,t)=>{let o=Array.from(e.querySelectorAll("ol, ul"));for(let n of o)Gn(n,t);},po=(e,t)=>{let o=e.tagName==="UL"?"bullet":"ordered",n=Array.from(e.children).filter(r=>r.tagName==="LI");for(let r of n){r.setAttribute("data-list",o);for(let i of Array.from(r.classList))/^ql-indent-\d+$/.test(i)&&r.classList.remove(i);t>0&&r.classList.add(`ql-indent-${t}`);let l=Array.from(r.children).filter(i=>i.tagName==="UL"||i.tagName==="OL");for(let i of l)po(i,t+1);}},Qn=e=>{let t=e.querySelectorAll("p, h1, h2, h3, h4, h5, h6, li");for(let o of Array.from(t)){let n=o;for(let i of Array.from(n.classList))i.startsWith("ql-align-")&&n.classList.remove(i);let r=n.style.textAlign.trim().toLowerCase(),l=Bn[r];l&&n.classList.add(l);}},ge=e=>Vn(e).replace(/>\s+</g,"><").replace(/ /g," "),ht=e=>{let t=e??"";if(!t.trim())return "";let o=co(t);if(!o)return t;let{body:n}=o;return Un(n),$n(n),Kn(n,o),n.innerHTML},bt=e=>{if(!e.trim())return "";let t=co(e);if(!t)return e;let{body:o}=t,n=Array.from(o.querySelectorAll("ul, ol"));for(let r of n)po(r,0);return Qn(o),o.innerHTML};var Xe=e=>{let t="";return e.getEditorState().read(()=>{t=$generateHtmlFromNodes(e,null);}),bt(t)},or=(e,t)=>{let o=ht(t);e.update(()=>{let n=$getRoot();if(n.clear(),!o.trim()){n.append($createParagraphNode());return}let l=new DOMParser().parseFromString(o,"text/html"),i=$generateNodesFromDOM(e,l);if(i.length===0){n.append($createParagraphNode());return}n.select(),$insertNodes(i);});},gt=({value:e,isSyncingRef:t})=>{let[o]=useLexicalComposerContext(),n=useRef(null);return useEffect(()=>{let r=e??"";if(n.current!==null&&ge(r)===ge(n.current))return;let l=Xe(o);ge(l)!==ge(r)&&(t.current=true,or(o,r),queueMicrotask(()=>{t.current=false;})),n.current=r;},[o,t,e]),null};var uo=["left","center","right","justify"];var fo=["bold","italic","underline","strikethrough","code"];var Sr={bold:"bold",italic:"italic",underline:"underline",strikethrough:"strikethrough",code:"code"},Br={left:jsx(AlignLeftIcon,{className:"size-4"}),center:jsx(AlignCenterIcon,{className:"size-4"}),right:jsx(AlignRightIcon,{className:"size-4"}),justify:jsx(AlignJustifyIcon,{className:"size-4"})},zr={left:"Align left",center:"Align center",right:"Align right",justify:"Align justify"},Ae={bold:jsx(BoldIcon,{className:"size-4"}),italic:jsx(ItalicIcon,{className:"size-4"}),underline:jsx(UnderlineIcon,{className:"size-4"}),strikethrough:jsx("span",{className:"text-xs font-semibold",children:"S"}),code:jsx("span",{className:"font-mono text-xs",children:"</>"})},Me={bold:"Bold",italic:"Italic",underline:"Underline",strikethrough:"Strikethrough",code:"Inline code"},Vr=e=>{let t=e.textFormat;return t===false?[]:Array.isArray(t)?fo.filter(o=>t.includes(o)):["bold","italic","underline"]},Ur=e=>{let t=e.alignment;return t===false?[]:Array.isArray(t)?uo.filter(o=>t.includes(o)):["left","center","right","justify"]},$r=e=>{if(e.headings===false)return [];let t=Array.isArray(e.headings)?e.headings:["h1","h2","h3"];return [{value:"paragraph",label:"Normal"},...t.map(o=>({value:o,label:o.toUpperCase()}))]},Oe=()=>jsx("div",{className:"mx-1 h-5 w-px bg-neutral-300"}),G=({label:e,onClick:t,icon:o,active:n=false,disabled:r=false})=>jsx("button",{type:"button","aria-label":e,title:e,disabled:r,onClick:t,className:a$1("inline-flex size-8 items-center justify-center rounded-md border border-transparent text-neutral-700 transition-colors","focus-visible:ring-primary-800 hover:bg-neutral-200 focus-visible:ring-2 focus-visible:ring-offset-1 focus-visible:outline-none","disabled:cursor-not-allowed disabled:opacity-40",n&&"border-neutral-300 bg-neutral-200 text-neutral-900"),children:o}),Lt=({config:e,className:t})=>{let[o]=useLexicalComposerContext(),n=useId(),[r,l]=useState(false),[i,s]=useState(false),[a,d]=useState(false),[c,R]=useState(false),[x,g]=useState(false),[u,I]=useState(false),[P,L]=useState(false),[T,y]=useState("paragraph"),[N,b]=useState("left"),E=useMemo(()=>Vr(e),[e]),f=useMemo(()=>Ur(e),[e]),C=useMemo(()=>$r(e),[e]),_=useCallback(()=>{let m=$getSelection();if(!$isRangeSelection(m))return;d(m.hasFormat("bold")),R(m.hasFormat("italic")),g(m.hasFormat("underline")),I(m.hasFormat("strikethrough")),L(m.hasFormat("code"));let M=m.anchor.getNode(),w=M.getKey()==="root"?M:M.getTopLevelElementOrThrow();if($isListNode(w))y(w.getListType()==="number"?"ol":"ul");else {let $=$findMatchingParent(w,K=>$isListNode(K));$isListNode($)?y($.getListType()==="number"?"ol":"ul"):y($isHeadingNode(w)?w.getTag():w.getType());}let A=$isElementNode(w)?w.getFormatType():"";b(A==="center"||A==="right"||A==="justify"?A:"left");},[]);useEffect(()=>mergeRegister(o.registerUpdateListener(({editorState:m})=>{m.read(()=>{_();});}),o.registerCommand(SELECTION_CHANGE_COMMAND,()=>(_(),false),1),o.registerCommand(CAN_UNDO_COMMAND,m=>(l(m),false),1),o.registerCommand(CAN_REDO_COMMAND,m=>(s(m),false),1)),[o,_]);let F=m=>{o.dispatchCommand(FORMAT_TEXT_COMMAND,Sr[m]);},U=m=>{o.update(()=>{let M=$getSelection();if($isRangeSelection(M)){if(m==="paragraph"){$setBlocksType(M,()=>$createParagraphNode());return}$setBlocksType(M,()=>$createHeadingNode(m));}});},h=m=>{if(T===(m==="bullet"?"ul":"ol")){o.dispatchCommand(REMOVE_LIST_COMMAND,void 0);return}o.dispatchCommand(m==="bullet"?INSERT_UNORDERED_LIST_COMMAND:INSERT_ORDERED_LIST_COMMAND,void 0);};return jsxs("div",{className:a$1("flex flex-wrap items-center gap-1 border-b border-neutral-300 bg-neutral-100 px-2 py-1.5",t),children:[e.undoRedo!==false&&jsxs(Fragment,{children:[jsx(G,{label:"Undo",onClick:()=>o.dispatchCommand(UNDO_COMMAND,void 0),disabled:!r,icon:jsx(UndoIcon,{className:"size-4"})}),jsx(G,{label:"Redo",onClick:()=>o.dispatchCommand(REDO_COMMAND,void 0),disabled:!i,icon:jsx(RedoIcon,{className:"size-4"})}),jsx(Oe,{})]}),C.length>0&&jsxs(Fragment,{children:[jsx("label",{className:"sr-only",htmlFor:n,children:"Text style"}),jsx("select",{id:n,value:T.startsWith("h")?T:"paragraph",onChange:m=>U(m.target.value),className:a$1("h-8 rounded-md border border-neutral-300 bg-white px-2 text-xs font-medium text-neutral-800","focus-visible:ring-primary-800 focus-visible:ring-2 focus-visible:ring-offset-1 focus-visible:outline-none"),children:C.map(m=>jsx("option",{value:m.value,children:m.label},m.value))}),jsx(Oe,{})]}),E.length>0&&jsxs(Fragment,{children:[E.includes("bold")&&jsx(G,{label:Me.bold,onClick:()=>F("bold"),icon:Ae.bold,active:a}),E.includes("italic")&&jsx(G,{label:Me.italic,onClick:()=>F("italic"),icon:Ae.italic,active:c}),E.includes("underline")&&jsx(G,{label:Me.underline,onClick:()=>F("underline"),icon:Ae.underline,active:x}),E.includes("strikethrough")&&jsx(G,{label:Me.strikethrough,onClick:()=>F("strikethrough"),icon:Ae.strikethrough,active:u}),E.includes("code")&&jsx(G,{label:Me.code,onClick:()=>F("code"),icon:Ae.code,active:P}),jsx(Oe,{})]}),e.lists!==false&&jsxs(Fragment,{children:[jsx(G,{label:"Bulleted list",onClick:()=>h("bullet"),icon:jsx(ListIcon,{className:"size-4"}),active:T==="ul"}),jsx(G,{label:"Numbered list",onClick:()=>h("number"),icon:jsx(ListOrderedIcon,{className:"size-4"}),active:T==="ol"}),jsx(Oe,{})]}),e.indent!==false&&jsxs(Fragment,{children:[jsx(G,{label:"Decrease indent",onClick:()=>o.dispatchCommand(OUTDENT_CONTENT_COMMAND,void 0),icon:jsx(IndentDecreaseIcon,{className:"size-4"})}),jsx(G,{label:"Increase indent",onClick:()=>o.dispatchCommand(INDENT_CONTENT_COMMAND,void 0),icon:jsx(IndentIncreaseIcon,{className:"size-4"})}),jsx(Oe,{})]}),f.length>0&&jsx(Fragment,{children:f.map(m=>jsx(G,{label:zr[m],onClick:()=>o.dispatchCommand(FORMAT_ELEMENT_COMMAND,m),icon:Br[m],active:N===m},m))})]})};var Co=e=>{if(e!==void 0)return typeof e=="number"?`${e}px`:e},rl=forwardRef(({value:e,onChange:t,onBlur:o,onError:n,placeholder:r="Write your content...",readOnly:l=false,showToolbar:i=true,toolbarConfig:s=pt,className:a,editorClassName:d,toolbarClassName:c,autoFocus:R=false,minHeight:x=160,maxHeight:g,error:u=false,errorMessage:I,editorRef:P},L)=>{let T=useRef(false),y=useMemo(()=>({namespace:"SodtrackRichTextEditor",theme:ct,onError:(b,E)=>{if(n){n(b,E);return}console.error("RichTextEditor error",b);},nodes:[HeadingNode,ListNode,ListItemNode]}),[n]),N={minHeight:Co(x),maxHeight:Co(g),overflowY:g?"auto":void 0};return jsx(LexicalComposer,{initialConfig:y,children:jsxs("div",{className:"w-full",children:[jsxs("div",{ref:L,className:a$1("group flex w-full flex-col overflow-hidden rounded-lg border bg-white transition-colors","focus-within:ring-primary-800 focus-within:ring-2 focus-within:ring-offset-0",u?"border-error-500 focus-within:border-error-500 focus-within:ring-error-500":"border-neutral-500",l&&"border-neutral-300 bg-neutral-50 focus-within:ring-0",a),"data-error":u,"data-readonly":l,children:[i&&!l&&jsx(Lt,{config:s,className:c}),jsx(RichTextPlugin,{contentEditable:jsx(ContentEditable,{className:a$1("relative w-full px-4 py-3 text-sm leading-[142%] text-neutral-900 outline-none","[&_h1]:mt-2 [&_h1]:mb-2 [&_h2]:mt-2 [&_h2]:mb-2 [&_h3]:mt-2 [&_h3]:mb-2","[&_li]:my-1 [&_ol]:my-2 [&_ul]:my-2","[&_a]:text-primary-700 [&_a]:underline",l&&"cursor-default",d),style:N,onBlur:o,"aria-invalid":u}),placeholder:l?null:jsx("div",{className:"pointer-events-none absolute top-3 left-4 text-sm text-neutral-500",children:r}),ErrorBoundary:LexicalErrorBoundary}),jsx(HistoryPlugin,{}),jsx(ListPlugin,{}),jsx(mt,{readOnly:l}),jsx(gt,{value:e,isSyncingRef:T}),R&&!l&&jsx(AutoFocusPlugin,{}),P&&jsx(ut,{editorRef:P}),jsx(OnChangePlugin,{ignoreSelectionChange:true,onChange:(b,E)=>{!t||T.current||t(Xe(E),b);}})]}),u&&I&&jsx("p",{className:"text-error-500 mt-1 text-xs leading-[133%]",children:I})]})})});rl.displayName="RichTextEditor";var Lo={en:In,es:vn,pt:Tn},ul={es:{clearPhoneNumberLabel:"Eliminar n\xFAmero de tel\xE9fono",searchCountryPlaceholder:"Buscar..."},pt:{clearPhoneNumberLabel:"Limpar n\xFAmero de telefone",searchCountryPlaceholder:"Pesquisar..."}},dl={clearPhoneNumberLabel:"Clear phone number",searchCountryPlaceholder:"Search..."},fl=Lo.en,yo="9 1234 5678",yt="ZZ",Ro=()=>{},Io=e=>ul[e]??dl,vo=e=>Lo[e]??fl,To=e=>{if(e)try{let t=parsePhoneNumber(e)?.country;return !t||!h(t)?void 0:t}catch{return}},Po=e=>{if(e)return getExampleNumber(e,sl)?.formatNational()},Ze=e=>e??yt,Eo=()=>{let e=getDefaultOptions().locale?.code?.split("-")[0];return e==="es"||e==="pt"?e:"en"};var Ll=({Icon:e,callingCode:t,country:o,countryName:n,callingCodeClassName:r})=>jsxs("div",{className:"flex justify-center gap-2",children:[jsx("span",{className:"flex size-4.5 shrink-0 items-center justify-center",children:jsx(e,{"aria-hidden":true,country:o,label:n})}),t&&jsx("span",{className:a$1("text-sm leading-[143%] font-medium text-neutral-800",r),children:`+${t}`})]}),No=({"aria-label":e,className:t,disabled:o,error:n,iconComponent:r,name:l,onBlur:i,onChange:s,onFocus:a$2,options:d,readOnly:c,translations:R,value:x})=>{let g=useFieldContext(),u=H.useRef(null),I=H.useId(),[P,L]=H.useState(""),{contains:T}=useFilter({sensitivity:"base"}),y=c$1({disabled:o,error:n,readOnly:c}),N=H.useMemo(()=>d.filter(h$1=>h$1.value!==void 0&&h(h$1.value)).map(h=>({callingCode:getCountryCallingCode(h.value),country:h.value,key:Ze(h.value),label:h.label})),[d]),b=H.useMemo(()=>N.find(h=>h.key===Ze(x)),[N,x]),{collection:E,filter:f,set:C}=useListCollection({initialItems:N,itemToString:h=>h.callingCode?`${h.label} +${h.callingCode}`:h.label,itemToValue:h=>h.key,filter:(h,m,M)=>{let w=m.trim().replace(/^\+/,"");return T(h,m)||(M.country?T(M.country,m.toUpperCase()):false)||(M.callingCode?T(M.callingCode,w)||T(`+${M.callingCode}`,m):false)}});H.useEffect(()=>{C(N);},[N,C]);let _=H.useCallback(({inputValue:h})=>{let m=h??"";L(m),f(m),u.current?.scrollTo({top:0});},[f]),F=H.useCallback(({open:h})=>{h&&(L(""),f(""));},[f]),U=H.useCallback(({value:h$1})=>{let m=h$1[0];if(!m||m===yt){s(void 0);return}h(m)&&s(m);},[s]);return jsxs(Combobox.Root,{className:"h-full shrink-0",collection:E,disabled:o||c,ids:{input:I,label:g.ids.label},inputBehavior:"autohighlight",inputValue:P,lazyMount:true,openOnChange:false,openOnClick:false,positioning:{placement:"bottom-end",offset:{mainAxis:12},sameWidth:false},selectionBehavior:"preserve",unmountOnExit:true,value:b?[b.key]:[],onInputValueChange:_,onOpenChange:F,onValueChange:U,children:[jsx(Combobox.Control,{className:"h-full",children:jsx(Combobox.Trigger,{"aria-label":e,className:a$1("relative flex h-full w-19.5 shrink-0 items-center justify-center rounded-l after:pointer-events-none after:absolute after:top-0 after:right-0 after:h-full after:w-px after:content-['']",y==="error"?"bg-danger-20 after:bg-input-ring-error":y==="disabled"||y==="readOnly"?"after:bg-input-ring-disabled bg-neutral-200":y==="errorReadOnly"?"after:bg-input-ring-error bg-neutral-200":"group-focus-within/phone:after:bg-input-ring-focus after:bg-input-ring data-[state=open]:after:bg-input-ring-focus bg-neutral-200",t),disabled:o||c,focusable:true,name:l,onBlur:i,onFocus:a$2,children:b&&jsx(Ll,{Icon:r,callingCode:b.callingCode,country:b.country,countryName:b.label,callingCodeClassName:a$1(y==="error"&&"text-danger-600",(y==="disabled"||y==="readOnly"||y==="errorReadOnly")&&"text-input-text-disabled")})})}),jsx(Portal,{children:jsx(Combobox.Positioner,{children:jsxs(Combobox.Content,{className:"elevation-9 z-layer data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 w-75 origin-(--transform-origin) overflow-hidden rounded-sm bg-neutral-50",children:[jsxs("div",{className:"pb-0",children:[jsx(Combobox.Context,{children:h=>jsx(e$1,{className:"m-1 mb-0",size:"md",state:"default",clearAdornment:!o&&h.inputValue.length>0?jsx(a$5,{onClick:()=>{h.setInputValue("","clear-trigger");}}):void 0,indicator:jsx(q,{className:"pointer-events-none size-4.5 text-neutral-800"}),children:m=>jsx(Combobox.Input,{autoComplete:"off","data-1p-ignore":true,"data-lpignore":"true",placeholder:R.searchCountryPlaceholder,className:m})})}),jsx(a,{className:"mt-2"})]}),jsx(Combobox.List,{ref:u,className:a$1("h-72 overflow-auto outline-none",{"flex flex-col items-center justify-center":E.items.length===0}),children:E.items.length===0?jsx(a$8,{size:"sm",variant:"not-found"}):jsx(Combobox.ItemGroup,{children:E.items.map(h=>jsxs(Combobox.Item,{item:h,className:"data-highlighted:bg-primary-100 relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm text-neutral-900 outline-none select-none data-disabled:pointer-events-none data-disabled:opacity-50",children:[jsx("span",{className:"flex size-4.5 shrink-0 items-center justify-center [&_.PhoneInputCountryIconImg]:size-4.5!",children:jsx(r,{"aria-hidden":true,country:h.country,label:h.label})}),jsx(Combobox.ItemText,{className:"min-w-0 flex-1 truncate text-sm leading-[143%] font-medium",children:h.label}),h.callingCode&&jsx("span",{className:"shrink-0 text-sm text-neutral-600",children:`+${h.callingCode}`}),jsx(k,{className:a$1("ml-auto size-4 shrink-0",h.key===Ze(x)?"opacity-100":"opacity-0")})]},h.key))})})]})})})]})};var Rl=yl,Ao=H.forwardRef(({className:e,defaultCountry:t,disabled:o,error:n,helperText:r,id:l,label:i,labelProps:s,onChange:a=Ro,placeholder:d$1,readOnly:c,required:R,value:x,...g},u)=>{let[I,P]=H.useState(()=>To(x)??t),L=H.useRef(null),T=Eo(),y=c$1({disabled:o,error:n,readOnly:c}),N=H.useMemo(()=>Io(T),[T]),b=H.useMemo(()=>vo(T),[T]),E=H.useMemo(()=>Po(I)??d$1??yo,[d$1,I]),f=H.useCallback(F=>{P(F);},[]),C=H.useCallback(F=>{L.current=F,typeof u=="function"?u(F):u&&(u.current=F);},[u]),_=H.useCallback(()=>{a(void 0),L.current?.focus();},[a]);return jsxs(Field.Root,{"data-error":d(y)||void 0,disabled:o,id:l,invalid:n,readOnly:c,className:a$1(b$1,e),children:[i&&jsx(c$2,{...s,as:Field.Label,label:i,required:R}),jsx(e$1,{state:y,className:"group/phone pl-0 [&_.PhoneInputCountryIconImg]:size-4.5!",clearAdornment:x?jsx(a$5,{ariaLabel:N.clearPhoneNumberLabel,onClick:_}):void 0,children:F=>jsx(Rl,{...g,className:"contents",ref:C,countrySelectComponent:No,countrySelectProps:{error:n,translations:N},defaultCountry:t,disabled:o,flagComponent:a$7,initialValueFormat:"national",inputComponent:Field.Input,labels:b,numberInputProps:{"aria-required":R||void 0,className:a$1(F,"pl-3"),placeholder:E},readOnly:c,value:x,onChange:a,onCountryChange:f})}),r&&jsx(a$6,{as:n?Field.ErrorText:Field.HelperText,children:r})]})});Ao.displayName="PhoneInput";var vl=({children:e,hasDescription:t=false,disabled:o=false,hasDivider:n=false,className:r,isSelected:l,onClick:i,...s})=>jsxs(Fragment,{children:[jsx("div",{className:a$1("flex flex-row px-3 py-4 text-neutral-900 transition-colors",t?"py-3":"py-3.5",o?"cursor-not-allowed text-neutral-400":a$1("hover:bg-primary-100 focus:bg-primary-200",!!i?"cursor-pointer":"cursor-default"),l&&"bg-primary-200",r),onClick:d=>{o||i?.(d);},...s,children:e}),n&&jsx(a,{})]}),te=vl;var su=({children:e,title:t,titleLines:o,description:n="",descriptionLines:r,startIcon:l,endIcon:i,hasDivider:s=false,disabled:a=false,isSelected:d=false,className:c,...R})=>jsxs(te,{hasDescription:!!n,disabled:a,hasDivider:s,className:c,isSelected:d,...R,children:[l&&H__default.cloneElement(l,{className:"shrink-0 mr-2 h-4.5 w-4.5"}),jsx(ce,{title:t,titleLines:o,description:n,descriptionLines:r,disabled:a}),i&&H__default.cloneElement(i,{className:"min-h-4.5 min-w-4.5 self-center ml-4"})]});export{Kl as a,su as b,li as c,fi as d,Rs as e,ao as f,ma as g,Ra as h,ct as i,pt as j,ge as k,ht as l,bt as m,rl as n,Ao as o};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {d}from'./chunk-WAUY2MS6.js';import {a as a$4}from'./chunk-FZ6JW3TZ.js';import {a as a$1}from'./chunk-XYBXEU3T.js';import {c,e,a as a$2,b,d as d$1}from'./chunk-MQL3NZ6S.js';import {a as a$3}from'./chunk-VIMWKUML.js';import {c as c$1}from'./chunk-
|
|
1
|
+
import {d}from'./chunk-WAUY2MS6.js';import {a as a$4}from'./chunk-FZ6JW3TZ.js';import {a as a$1}from'./chunk-XYBXEU3T.js';import {c,e,a as a$2,b,d as d$1}from'./chunk-MQL3NZ6S.js';import {a as a$3}from'./chunk-VIMWKUML.js';import {c as c$1}from'./chunk-QZUQ6AZK.js';import {k}from'./chunk-QMPBFFFC.js';import {a}from'./chunk-OBZIYJO7.js';import {useListCollection,Combobox}from'@ark-ui/react/combobox';import {useFilter}from'@ark-ui/react/locale';import {Portal}from'@ark-ui/react/portal';import {useMemo,useRef,useEffect,useCallback}from'react';import {jsxs,jsx}from'react/jsx-runtime';var ne=f=>{let{label:j,labelProps:G,error:y,required:T,invalid:I,disabled:i,readOnly:h,options:s,onInputValueChange:w,onSelect:x,defaultValue:v,value:u,helperText:U,emptyState:W,optionDescriptionLines:O=1,clearable:J=true,growable:c$2=true,className:K,...Q}=f,X=useMemo(()=>({sensitivity:"base"}),[]),{contains:N}=useFilter(X),p=useMemo(()=>{let e=[...v??[],...u??[]];if(!e.length)return s;let l=new Set(s.map(a=>a.value)),o=[];for(let a of e)l.has(a.value)||(l.add(a.value),o.push(a));return o.length?[...o,...s]:s},[v,s,u]),d$2=useMemo(()=>new Map(p.map(e=>[String(e.value),e])),[p]),Y=useMemo(()=>u?.map(e=>d$2.get(String(e.value))??e),[d$2,u]),M=useRef(""),{collection:S,filter:b$1,set:V}=useListCollection({initialItems:p,itemToString:e=>e.label,itemToValue:e=>String(e.value),filter:(e,l,o)=>N(e,l)||!!o.description&&N(o.description,l)});useEffect(()=>{V(p),b$1(M.current);},[b$1,p,V]);let Z=useCallback(e=>{M.current=e.inputValue,b$1(e.inputValue),w?.(e);},[b$1,w]),_=useCallback(e=>{if(!x)return;let l=new Map(e.items.map(o=>[String(o.value),o]));x(e.value.flatMap(o=>{let a=d$2.get(o)??l.get(o);return a?[a]:[]}));},[x,d$2]),C=c({error:!!(y||I),disabled:i,readOnly:h});return jsxs(Combobox.Root,{collection:S,defaultValue:v?.map(e=>String(e.value)),value:Object.hasOwn(f,"value")?u?.map(e=>String(e.value))??[]:void 0,onInputValueChange:Z,onValueChange:_,multiple:true,inputBehavior:"none",openOnClick:true,invalid:!!(y||I),disabled:i,readOnly:h,...Q,"data-disabled":C==="disabled"?"":void 0,"data-error":d$1(C)||void 0,className:a(b,K),children:[jsx(c$1,{...G,as:Combobox.Label,label:j,required:T}),jsx(Combobox.Context,{children:e$1=>{let l=Y??e$1.selectedItems;return jsx(e,{as:Combobox.Control,className:a(c$2&&"h-auto min-h-(--height-input) items-start",!c$2&&"overflow-hidden",i&&"cursor-not-allowed"),state:C,trailingClassName:c$2?"self-start py-2":void 0,clearAdornment:J&&e$1.value.length>0?jsx(a$2,{as:Combobox.ClearTrigger,onClick:o=>o.stopPropagation()}):void 0,indicator:jsx(Combobox.Trigger,{className:"group/chevron-host cursor-pointer group-data-disabled/control:cursor-not-allowed",children:jsx(a$1,{})}),children:o=>jsxs("div",{className:a("flex min-w-0 flex-1 items-center gap-1 py-2",c$2?"flex-wrap":"h-full overflow-hidden"),children:[l.map(a$1=>jsx(d,{color:"neutral",variant:"fill",size:"md",className:a("max-w-full shrink-0 [&>button]:shrink-0",i&&"bg-neutral-50 text-neutral-600 ring-neutral-600 hover:bg-neutral-50"),disabled:i,hasCloseIcon:!h&&!i,onClose:()=>{e$1.clearValue(String(a$1.value));},children:jsx("span",{className:"truncate",children:a$1.label})},String(a$1.value))),jsx(Combobox.Input,{className:a(o,"h-auto px-0 py-0 disabled:cursor-not-allowed"),"aria-required":T||void 0,placeholder:l.length===0?f.placeholder:""})]})})}}),jsx(a$3,{children:U}),jsx(Portal,{children:jsx(Combobox.Positioner,{children:jsx(Combobox.Content,{className:"elevation-9 z-layer bg-input-bg max-h-67.5 w-(--reference-width) overflow-auto rounded-lg",children:jsxs(Combobox.ItemGroup,{children:[S.items.map(e=>jsx(Combobox.Item,{item:e,className:"data-highlighted:bg-primary-100 cursor-pointer data-disabled:cursor-not-allowed",children:jsx(Combobox.ItemContext,{children:({selected:l,disabled:o})=>jsxs("div",{className:a("font-inter flex flex-row items-center px-3 py-3.5 text-neutral-900 transition-colors","data-highlighted:bg-primary-100",e.description&&"py-3",o?"cursor-not-allowed text-neutral-400":"hover:bg-primary-100"),children:[jsxs("div",{className:"flex min-w-0 flex-1 flex-col gap-0.5",children:[jsx(Combobox.ItemText,{className:"text-sm leading-[130%] font-medium",children:e.label}),e.description&&jsx("p",{className:"text-xs leading-[130%] text-neutral-700",style:O?{overflow:"hidden",display:"-webkit-box",WebkitLineClamp:O,WebkitBoxOrient:"vertical"}:void 0,children:e.description})]}),jsx("div",{className:a("ml-4 flex size-4.5 shrink-0 items-center justify-center rounded-sm transition-colors ring-inset",l?"bg-primary-600":"bg-neutral-50 ring-1 ring-neutral-600",o&&(l?"bg-neutral-400":"bg-neutral-100 ring-neutral-300")),children:l&&jsx(k,{className:"size-3.5 text-neutral-50"})})]})})},String(e.value))),jsx(Combobox.Empty,{className:"flex flex-col items-center justify-center",children:jsx(a$4,{size:"sm",variant:"not-found",...W})})]})})})})]})};ne.displayName="AutocompleteMultiple";export{ne as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {r}from'./chunk-VBHBIUWS.js';import {c,b,d,e,a as a$2}from'./chunk-MQL3NZ6S.js';import {a}from'./chunk-VIMWKUML.js';import {c as c$1}from'./chunk-
|
|
1
|
+
import {r}from'./chunk-VBHBIUWS.js';import {c,b,d,e,a as a$2}from'./chunk-MQL3NZ6S.js';import {a}from'./chunk-VIMWKUML.js';import {c as c$1}from'./chunk-QZUQ6AZK.js';import {w}from'./chunk-QMPBFFFC.js';import {a as a$1}from'./chunk-OBZIYJO7.js';import {Portal}from'@ark-ui/react/portal';import {createListCollection,Select,useSelectContext}from'@ark-ui/react/select';import {forwardRef,useMemo,useCallback}from'react';import {jsxs,jsx}from'react/jsx-runtime';var U=["00:00","00:30","01:00","01:30","02:00","02:30","03:00","03:30","04:00","04:30","05:00","05:30","06:00","06:30","07:00","07:30","08:00","08:30","09:00","09:30","10:00","10:30","11:00","11:30","12:00","12:30","13:00","13:30","14:00","14:30","15:00","15:30","16:00","16:30","17:00","17:30","18:00","18:30","19:00","19:30","20:00","20:30","21:00","21:30","22:00","22:30","23:00","23:30","23:59"],j="00:00",G=({placeholder:a,state:n})=>{let i=useSelectContext().value.length>0;return jsx(e,{as:Select.Control,state:n,trailingClassName:"pointer-events-none",clearAdornment:i?jsx(a$2,{as:Select.ClearTrigger,className:"pointer-events-auto",onClick:r=>r.stopPropagation()}):void 0,segment:jsx(Select.Indicator,{className:"flex h-full w-full items-center justify-center",children:jsx(w,{className:"size-4.5"})}),segmentClassName:"pointer-events-none w-10",children:r=>jsx(Select.Trigger,{className:a$1(r,"flex cursor-pointer items-center text-left after:absolute after:inset-0 after:z-10 after:content-[''] data-disabled:cursor-not-allowed"),children:jsx(Select.ValueText,{className:"min-w-0 flex-1 truncate text-left",placeholder:a})})})},J=forwardRef((a$2,n)=>{let{formatTime:o}=r(),{className:i,label:r$1,labelProps:w,required:m,error:N,invalid:L,isItemDisabled:u,value:s,helperText:R,placeholder:F,onValueChange:p,defaultValue:f,disabled:g,readOnly:C,...D}=a$2,h=useMemo(()=>createListCollection({items:U,isItemDisabled:u,itemToString:o}),[o,u]),E=F??o(j),H=useCallback(l=>{p?.(l.value.at(0)??null);},[p]),P=N||L,d$1=c({error:P,disabled:g,readOnly:C});return jsxs(Select.Root,{ref:n,"data-disabled":d$1==="disabled"?"":void 0,"data-error":d(d$1)||void 0,disabled:g,invalid:P,readOnly:C,required:m,collection:h,className:a$1(b,i),positioning:{placement:"bottom-end",getAnchorRect:l=>l instanceof HTMLElement?l.parentElement?.getBoundingClientRect()??null:null},onValueChange:H,value:s===void 0?void 0:s?[s]:[],defaultValue:f?[f]:void 0,...D,children:[jsx(c$1,{...w,as:Select.Label,label:r$1,required:m}),jsx(G,{placeholder:E,state:d$1}),jsx(a,{children:R}),jsx(Portal,{children:jsx(Select.Positioner,{children:jsx(Select.Content,{className:"elevation-9 z-layer bg-input-bg max-h-67.5 min-w-27.5 overflow-auto rounded-lg outline-none",children:h.items.map(l=>jsx(Select.Item,{item:l,className:"font-inter data-highlighted:bg-primary-100 cursor-pointer py-3 pr-2.5 pl-3 text-sm font-medium data-disabled:cursor-not-allowed data-disabled:text-neutral-400",children:jsx(Select.ItemText,{children:o(l)})},l))})})}),jsx(Select.HiddenSelect,{required:false})]})});J.displayName="TimePicker";export{J as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {c,e,a,b,d}from'./chunk-MQL3NZ6S.js';import {a as a$1}from'./chunk-VIMWKUML.js';import {c as c$1}from'./chunk-
|
|
1
|
+
import {c,e,a,b,d}from'./chunk-MQL3NZ6S.js';import {a as a$1}from'./chunk-VIMWKUML.js';import {c as c$1}from'./chunk-QZUQ6AZK.js';import {j,g}from'./chunk-QMPBFFFC.js';import {a as a$2}from'./chunk-OBZIYJO7.js';import {NumberInput}from'@ark-ui/react/number-input';import {useLocaleContext}from'@ark-ui/react/locale';import {forwardRef,useId,useCallback,useState,useRef,useEffect}from'react';import {tv}from'tailwind-variants';import {jsxs,jsx,Fragment}from'react/jsx-runtime';var z={useGrouping:false,maximumFractionDigits:10},w=new Map,_=e=>{let r=w.get(e);return r||(r=new Intl.NumberFormat(e,z),w.set(e,r)),r},$=(e,r)=>Number.isNaN(e)?"":_(r).format(e),ee=e=>e?.startsWith("es")?"Ej: 123":e?.startsWith("pt")?"Ex: 123":"e.g. 123",re=tv({slots:{trigger:"flex min-h-0 flex-1 cursor-pointer items-center justify-center transition-colors outline-none disabled:cursor-not-allowed",decrement:"relative before:pointer-events-none before:absolute before:inset-x-0 before:top-0 before:h-px before:content-['']",icon:"size-3"},variants:{state:{default:{trigger:"enabled:hover:bg-primary-200 enabled:active:bg-primary-300 enabled:hover:text-neutral-600 enabled:active:text-neutral-600 disabled:text-neutral-600",decrement:"before:bg-input-ring"},error:{trigger:"enabled:hover:bg-danger-50 enabled:hover:text-danger-600 enabled:active:bg-danger-100 enabled:active:text-danger-600",decrement:"before:bg-input-ring-error"},disabled:{decrement:"before:bg-input-ring-disabled"},readOnly:{decrement:"before:bg-input-ring-disabled"},errorReadOnly:{decrement:"before:bg-input-ring-error"}}}}),te=({state:e})=>{let r=re({state:e});return jsxs(Fragment,{children:[jsx(NumberInput.IncrementTrigger,{className:r.trigger(),children:jsx(j,{className:r.icon()})}),jsx(NumberInput.DecrementTrigger,{className:r.trigger({className:r.decrement()}),children:jsx(g,{className:r.icon()})})]})},ne=e=>{if(e.key!=="Home"&&e.key!=="End"||e.ctrlKey||e.metaKey||e.altKey)return;e.preventDefault();let r=e.currentTarget,{selectionStart:p,selectionEnd:i,value:l}=r;e.key==="Home"?r.setSelectionRange(0,e.shiftKey?i??0:0):r.setSelectionRange(e.shiftKey?p??l.length:l.length,l.length);},q=e=>e==null||e===""?"":String(e),ae=forwardRef((e$1,r)=>{let{className:p,disabled:i,error:l,helperText:f,label:N,labelProps:j,onValueChange:I,placeholder:W,readOnly:h,required:y,value:b$1,...F}=e$1,C=useId(),s=c({error:l,disabled:i,readOnly:h}),{locale:B}=useLocaleContext(),a$3=F.locale??B,c$2=useCallback(t=>t==null||t===""?"":$(Number(t),a$3),[a$3]),u=Object.hasOwn(e$1,"value"),m=u?b$1??"":void 0,[x,v]=useState(()=>c$2(b$1)),g=useRef(q(b$1)),D=useRef(a$3);useEffect(()=>{if(m===void 0)return;let t=D.current!==a$3;D.current=a$3;let d=q(m);!t&&d===g.current||(g.current=d,v(c$2(m)));},[m,x,a$3,c$2]);let G=useCallback(t=>{u&&v(t.value),g.current=Number.isNaN(t.valueAsNumber)?"":String(t.valueAsNumber),I?.(t);},[u,I]);return jsxs(NumberInput.Root,{...F,value:u?x:void 0,onValueChange:G,formatOptions:z,disabled:i,readOnly:h,invalid:!!l,"data-disabled":s==="disabled"?"":void 0,"data-error":d(s)||void 0,className:a$2(b,p),children:[N&&jsx(c$1,{...j,as:NumberInput.Label,label:N,required:y}),jsx(NumberInput.Context,{children:t=>jsx(e,{as:NumberInput.Control,state:s,clearAdornment:t.empty?void 0:jsx(a,{onClick:()=>t.clearValue()}),segment:jsx(te,{state:s}),segmentClassName:"w-8 flex-col",children:d=>jsx(NumberInput.Input,{ref:r,placeholder:W??ee(a$3),className:d,"aria-required":y||void 0,"aria-describedby":f?C:void 0,onKeyDown:ne})})}),jsx(a$1,{id:C,children:f})]})});ae.displayName="NumberField";export{ae as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {b,c,e}from'./chunk-GHNJWQTI.js';import {a}from'./chunk-VIMWKUML.js';import {c as c$1}from'./chunk-
|
|
1
|
+
import {b,c,e}from'./chunk-GHNJWQTI.js';import {a}from'./chunk-VIMWKUML.js';import {c as c$1}from'./chunk-QZUQ6AZK.js';import {useMemo}from'react';import {tv}from'tailwind-variants';import {jsxs,jsx}from'react/jsx-runtime';var F=["vertical","horizontal"],G=b,J=c,S={tone:"neutral",size:"lg"},q=tv({slots:{root:"group flex flex-col",field:"flex",label:"",options:"flex flex-wrap gap-3"},variants:{orientation:{vertical:{field:"flex-col",label:"mb-3"},horizontal:{field:"flex-row items-center",label:"mr-3 mb-0"}}},defaultVariants:{orientation:"vertical"}}),K=({options:h,value:t,onChange:C,label:s,labelProps:n,orientation:M="vertical",StartIcon:v,required:T,disabled:a$1,error:x,helperText:r,tone:y=S.tone,size:g=S.size,className:z,contentClassName:O})=>{let{root:L,field:N,label:H,options:D}=q({orientation:M}),p=useMemo(()=>new Set(t),[t]),I=(e,i)=>{if(i)return;let w=p.has(e.value)?t.filter(A=>A!==e.value):[...t,e.value];C(w);};return jsxs("div",{className:L({className:z}),"data-error":x||void 0,"data-disabled":a$1||void 0,role:"group","aria-label":s,children:[jsxs("div",{className:N(),children:[s&&jsx(c$1,{...n,as:"p",label:s,required:T,size:n?.size??"md",className:H()}),jsx("div",{className:D({className:O}),children:h.map(e$1=>{let i=p.has(e$1.value),o=!!a$1||!!e$1.disabled;return jsx(e,{variant:"outline",tone:y,size:g,StartIcon:v,selected:i,disabled:o,"aria-pressed":i,onClick:()=>I(e$1,o),children:e$1.label},e$1.value)})})]}),r&&jsx(a,{children:r})]})};export{F as a,G as b,J as c,S as d,K as e};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {a}from'./chunk-W4C2Z52Z.js';import {c,e,a as a$1,b,d}from'./chunk-MQL3NZ6S.js';import {a as a$2}from'./chunk-VIMWKUML.js';import {c as c$1}from'./chunk-
|
|
1
|
+
import {a}from'./chunk-W4C2Z52Z.js';import {c,e,a as a$1,b,d}from'./chunk-MQL3NZ6S.js';import {a as a$2}from'./chunk-VIMWKUML.js';import {c as c$1}from'./chunk-QZUQ6AZK.js';import {a as a$3}from'./chunk-OBZIYJO7.js';import {Field}from'@ark-ui/react/field';import {forwardRef}from'react';import {jsxs,jsx}from'react/jsx-runtime';var O=forwardRef(({className:I,defaultValue:l,disabled:t,error:r,form:n,helperText:i,id:H,label:L,labelProps:R,readOnly:a$4,required:p,value:d$1,onChange:h,...P},g)=>{let m=c({error:r,disabled:t,readOnly:a$4}),{fieldRef:E,handleChange:N,handleClear:y,hasValue:q}=a({defaultValue:l,disabled:t,formId:n,onChange:h,ref:g,value:d$1});return jsxs(Field.Root,{"data-error":d(m)||void 0,disabled:t,id:H,invalid:r,readOnly:a$4,className:a$3(b,I),children:[jsx(c$1,{...R,as:Field.Label,label:L,required:p}),jsx(e,{state:m,clearAdornment:q?jsx(a$1,{onClick:y}):void 0,children:v=>jsx(Field.Input,{...P,ref:E,"aria-required":p||void 0,className:v,defaultValue:l,form:n,value:d$1,onChange:N})}),i&&jsx(a$2,{as:r?Field.ErrorText:Field.HelperText,children:i})]})});O.displayName="TextField";export{O as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {b}from'./chunk-S5L3GKMK.js';import {c,e,a as a$1,b as b$1,d}from'./chunk-MQL3NZ6S.js';import {a as a$2}from'./chunk-VIMWKUML.js';import {c as c$1}from'./chunk-
|
|
1
|
+
import {b}from'./chunk-S5L3GKMK.js';import {c,e,a as a$1,b as b$1,d}from'./chunk-MQL3NZ6S.js';import {a as a$2}from'./chunk-VIMWKUML.js';import {c as c$1}from'./chunk-QZUQ6AZK.js';import {v}from'./chunk-QMPBFFFC.js';import {a}from'./chunk-OBZIYJO7.js';import {DatePicker}from'@ark-ui/react/date-picker';import {Portal}from'@ark-ui/react/portal';import {forwardRef}from'react';import {jsxs,jsx}from'react/jsx-runtime';var T=forwardRef(({className:f,disabled:o,error:g,helperText:C,invalid:b$2,label:x,labelProps:A,readOnly:r,required:i,...h},F)=>{let n=g||b$2,l=c({error:n,disabled:o,readOnly:r});return jsxs(DatePicker.Root,{ref:F,...h,disabled:o,invalid:n,readOnly:r,positioning:{placement:"bottom-end"},"data-error":d(l)||void 0,className:a(b$1,f),children:[jsx(c$1,{...A,as:DatePicker.Label,label:x,required:i}),jsx(DatePicker.Context,{children:V=>jsx(e,{as:DatePicker.Control,state:l,clearAdornment:V.value.length>0?jsx(a$1,{as:DatePicker.ClearTrigger}):void 0,segment:jsx(DatePicker.Trigger,{className:"flex h-full w-full cursor-pointer items-center justify-center outline-none disabled:cursor-not-allowed",tabIndex:r?-1:void 0,children:jsx(v,{className:"size-4.5"})}),segmentClassName:"w-10",children:y=>jsx(DatePicker.Input,{className:a(y,"cursor-inherit"),tabIndex:r?-1:void 0,"aria-required":i||void 0})})}),jsx(a$2,{children:C}),jsx(Portal,{children:jsx(DatePicker.Positioner,{children:jsx(DatePicker.Content,{className:"elevation-9 z-layer rounded-xl bg-neutral-50 p-3",children:jsx(b,{})})})})]})});T.displayName="DatePicker";export{T as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import {a}from'./chunk-OBZIYJO7.js';import {TooltipPositioner,TooltipContent,TooltipArrow,TooltipArrowTip,TooltipRoot,TooltipTrigger}from'@ark-ui/react/tooltip';import {Portal}from'@ark-ui/react/portal';import {useState}from'react';import {jsx,jsxs}from'react/jsx-runtime';var X=({closeDelay:s=500,closeOnClick:d=true,closeOnEscape:c=true,closeOnPointerDown:m=true,closeOnScroll:g=true,interactive:u=true,lazyMount:T=false,openDelay:f=700,unmountOnExit:h=false,positioning:P,content:x,children:r,asChild:o=true,contentClassName:y,className:C,portalled:b=true,...N})=>{let[v,E]=useState(0),n=e=>{let l=Number.parseInt(getComputedStyle(e).getPropertyValue("--layer-index"),10);E(Number.isNaN(l)?0:l+1);},w=e=>{n(e.currentTarget);},H=e=>{n(e.currentTarget);},i=jsx(TooltipPositioner,{children:jsxs(TooltipContent,{style:{"--layer-index":v},className:a("font-inter bg-primary-900 z-layer rounded-lg px-3 py-2 text-center text-sm leading-[143%] font-normal whitespace-break-spaces text-neutral-50","data-[state=open]:animate-in data-[state=open]:fade-in data-[state=open]:zoom-in-95","data-[state=closed]:animate-out data-[state=closed]:fade-out data-[state=closed]:zoom-out-95","data-[placement=left]:text-right data-[placement=left-end]:text-right data-[placement=left-start]:text-right","data-[placement=left]:origin-right data-[placement=left-end]:origin-bottom-right data-[placement=left-start]:origin-top-right","data-[placement=right]:text-left data-[placement=right-end]:text-left data-[placement=right-start]:text-left","data-[placement=right]:origin-left data-[placement=right-end]:origin-bottom-left data-[placement=right-start]:origin-top-left","data-[placement=top]:origin-bottom data-[placement=top-end]:origin-bottom-right data-[placement=top-start]:origin-bottom-left","data-[placement=bottom]:origin-top data-[placement=bottom-end]:origin-top-right data-[placement=bottom-start]:origin-top-left",y),children:[jsx(TooltipArrow,{children:jsx(TooltipArrowTip,{})}),x]})});return jsxs(TooltipRoot,{closeDelay:s,closeOnClick:d,closeOnEscape:c,closeOnPointerDown:m,closeOnScroll:g,interactive:u,lazyMount:T,openDelay:f,unmountOnExit:h,positioning:{arrowPadding:16,...P},...N,children:[jsx(TooltipTrigger,{asChild:o,type:o?void 0:"button",className:a("cursor-inherit text-left",C),onFocusCapture:w,onPointerOverCapture:H,children:o?jsx("div",{children:r}):r}),b?jsx(Portal,{children:i}):i]})};export{X as a};
|