@6thbridge/hexa 0.0.0-pr76-133 → 0.0.0-pr76-134

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/index.mjs CHANGED
@@ -1,15 +1,15 @@
1
- "use client";var La=Object.defineProperty;var ka=(e,t,o)=>t in e?La(e,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[t]=o;var xo=(e,t,o)=>ka(e,typeof t!="symbol"?t+"":t,o);import*as wo from"react";import*as q from"@radix-ui/react-tooltip";import{clsx as Da}from"clsx";import{twMerge as Sa}from"tailwind-merge";function i(...e){return Sa(Da(e))}import{jsx as Ge,jsxs as Co}from"react/jsx-runtime";var No=q.Provider,Ro=q.Root,Po=q.Trigger,Ot=wo.forwardRef(({className:e,sideOffset:t=2,...o},r)=>Ge(q.Portal,{children:Ge(q.Content,{ref:r,sideOffset:t,className:i("z-50 rounded-md border border-transparent bg-gray-50 px-3 py-1.5 text-base font-semibold text-bold text-black/40 shadow-xl- animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 [box-shadow:3px_4px_11px_0px_#0000001A,13px_16px_21px_0px_#00000017,29px_36px_28px_0px_#0000000D,52px_65px_33px_0px_#00000003,82px_101px_36px_0px_#00000000]",e),...o,children:o.children})}));Ot.displayName=q.Content.displayName;var yt=({trigger:e,children:t,contentClassName:o,triggerClassName:r,asChild:a=!0,side:n,sideOffset:s,align:c,alignOffset:m,delayDuration:l=100,hasArrow:p=!0,arrowClassName:u,...d})=>Ge(No,{children:Ge(Ro,{delayDuration:l,...d,children:Co("div",{className:"flex justify-center items-center",children:[Ge(Po,{asChild:a,className:r,children:e}),Co(Ot,{side:n,sideOffset:s,align:c,alignOffset:m,className:o,children:[t,p&&Ge(q.Arrow,{className:i("fill-white",u)})]})]})})});yt.displayName="Tooltip";import Ma from"react";import*as Lo from"react";import*as Ht from"@radix-ui/react-label";import{cva as Ta}from"class-variance-authority";import{jsx as Ea}from"react/jsx-runtime";var Fa=Ta("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),_t=Lo.forwardRef(({className:e,...t},o)=>Ea(Ht.Root,{ref:o,className:i(Fa(),e),...t}));_t.displayName=Ht.Root.displayName;import{jsx as ko,jsxs as Aa}from"react/jsx-runtime";var A=Ma.forwardRef(({className:e,children:t,showAsterisk:o,error:r,...a},n)=>ko(_t,{ref:n,className:i(r&&"text-red-500",e),...a,children:o?Aa("p",{children:[t,ko("span",{className:"text-red-500",children:"*"})]}):t}));A.displayName="FormLabel";import{jsx as Do,jsxs as Ia}from"react/jsx-runtime";var pe=({size:e=16,colour:t="primary"})=>Ia("svg",{className:"animate-spin",width:e,height:e,viewBox:"0 0 20 20",fill:"none",children:[Do("circle",{cx:"10",cy:"10",r:"9.25",stroke:"transparent",strokeWidth:"1.5"}),Do("path",{d:"M10 0.595792C10 0.266746 10.267 -0.00185055 10.5954 0.0177417C11.9786 0.100242 13.3318 0.469461 14.5682 1.1044C15.9816 1.83021 17.2016 2.88235 18.1273 4.17366C19.0531 5.46496 19.6578 6.95826 19.8913 8.52984C20.1249 10.1014 19.9807 11.706 19.4705 13.2108C18.9604 14.7155 18.0991 16.077 16.9579 17.1825C15.8167 18.288 14.4285 19.1056 12.9084 19.5677C11.3882 20.0298 9.77982 20.123 8.21646 19.8397C6.84883 19.5918 5.55009 19.0619 4.40196 18.2863C4.12931 18.1021 4.08072 17.7265 4.28083 17.4653C4.48094 17.2041 4.85388 17.1564 5.12801 17.3384C6.12474 18.0001 7.24768 18.4531 8.42898 18.6672C9.80606 18.9168 11.2228 18.8347 12.5618 18.4276C13.9008 18.0206 15.1236 17.3004 16.1288 16.3266C17.134 15.3528 17.8927 14.1536 18.342 12.8282C18.7914 11.5027 18.9185 10.0893 18.7127 8.70502C18.507 7.32071 17.9743 6.00535 17.1589 4.86792C16.3435 3.73048 15.2688 2.80371 14.0238 2.16439C12.9559 1.61596 11.789 1.29259 10.5954 1.21173C10.2671 1.18949 10 0.92484 10 0.595792Z",fill:t==="primary"?"#ffffff":"currentColor",className:"rounded"})]});import*as So from"react";import{Slot as Ba}from"@radix-ui/react-slot";import{cva as Va}from"class-variance-authority";import{Fragment as Oa,jsx as Ie,jsxs as Ha}from"react/jsx-runtime";var J=Va("overflow-hidden isolate inline-flex h-fit items-center justify-center whitespace-nowrap text-sm font-medium ring-offset-background dark:ring-offset-transparent transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:!pointer-events-none",{variants:{variant:{primary:"border-primary-main bg-primary-main hover:bg-primary-main/70 disabled:bg-primary-main/70 text-white font-bold",danger:"border-red-600 bg-red-600 hover:bg-red-600/70 disabled:bg-red-600/70 text-white font-bold",neutral:"!border-0 bg-transparent text-primary-main hover:opacity-80 disabled:opacity-60",outlined:"border border-primary-main text-primary-main hover:opacity-80 disabled:opacity-60","danger-outlined":"border border-red-600 text-red-600 hover:opacity-80 disabled:opacity-60","light-outlined":"border-white text-white hover:opacity-80 disabled:opacity-60","dark-text":"border-transparent bg-transparent hover:bg-opacity-70 disabled:bg-opacity-70 text-black font-medium",light:"border-white bg-white hover:bg-opacity-70 disabled:bg-opacity-70 text-primary-main font-semibold"},size:{default:"py-[0.625rem] px-[1.5rem] text-[0.875rem] leading-[1.25rem] font-medium rounded-lg",sm:"py-[0.375rem] px-[1rem] leading-[1rem] font-normal text-sm rounded-lg",lg:"py-[0.75rem] px-[1.5rem] text-[1rem] leading-[1.5rem] font-medium rounded-lg",md:"py-[0.625rem] px-[1.5rem] text-[0.875rem] leading-[1.25rem] font-medium rounded-lg","icon-sm":"h-[1.75rem] w-[1.75rem] flex justify-center items-center font-medium rounded-lg",icon:"h-[2.5rem] w-[2.75rem] flex justify-center items-center font-medium rounded-lg","icon-lg":"h-[3rem] w-[3rem] flex justify-center items-center font-medium rounded-lg"}},defaultVariants:{variant:"primary",size:"default"}}),Q=So.forwardRef(({className:e,variant:t="primary",size:o,asChild:r=!1,isLoading:a=!1,leftNode:n,rightNode:s,LoaderSize:c,children:m,disabled:l,...p},u)=>Ie(r?Ba:"button",{className:i(J({variant:t,size:o,className:e})),ref:u,disabled:l||a,...p,children:Ie("div",{className:"flex font-medium justify-center items-center gap-2 pointer-events-none",children:a?Ie("span",{className:"mx-auto",children:Ie(pe,{size:c,colour:"secondary"})}):Ha(Oa,{children:[n&&Ie("span",{children:n}),m&&Ie("span",{children:m}),s&&Ie("span",{children:s})]})})}));Q.displayName="Button";import*as Gt from"react";import{cva as Wt}from"class-variance-authority";import _a from"react";import{jsx as Ga}from"react/jsx-runtime";var ee=_a.forwardRef(({className:e,children:t,error:o,...r},a)=>{let n=o??t;return n?Ga("p",{ref:a,className:i("text-xs font-normal text-[#F04248]",e),...r,children:n}):null});ee.displayName="ErrorMessage";import Wa from"react";import{jsx as $a}from"react/jsx-runtime";var me=Wa.forwardRef(({className:e,...t},o)=>$a("div",{ref:o,className:i("text-sm text-[#8E98A8",e),...t}));me.displayName="FormDescription";import{jsx as Be,jsxs as Fo}from"react/jsx-runtime";var za=Wt("!p-0 flex h-full w-full !border-transparent !bg-transparent text-base focus-visible:bg-transparent focus-visible:outline-none focus-visible:ring-0 focus-visible:ring-offset-0 disabled:cursor-not-allowed disabled:opacity-50",{variants:{status:{default:"placeholder:text-[#C4C4C4] dark:placeholder:text-[#9299A2]",error:"placeholder:text-red-500 text-red-500",loading:"placeholder:text-[#C4C4C4] dark:placeholder:text-[#9299A2]",prefilled:"",neutral:""}},defaultVariants:{status:"default"}}),Eo=Gt.forwardRef(({className:e,status:t,type:o,...r},a)=>Be("input",{type:o,className:i(za({status:t}),e),ref:a,...r}));Eo.displayName="BaseInnerInput";var $=Wt("flex relative h-10 w-full rounded-[4px] dark:!bg-transparent border transition px-3 py-2 text-base placeholder:text-[#79818C] focus-within:outline-0 focus-within:ring-0 focus-visible:ring-offset-0 disabled:cursor-not-allowed disabled:opacity-50 dark:disabled:!border-[#9299A2]",{variants:{status:{default:"border-[#DEDEDE] bg-white text-[#191919] dark:!bg-transparent caret-text-primary focus-within:bg-white dark:focus-within:!bg-transparent dark:text-white focus-within:border-primary-main dark:focus-within:border-[#9299A2] dark:disabled:!border-[#9299A2]",error:"placeholder:text-red-500 bg-red-50 border-red-500 dark:!bg-status-error-bg-dark text-red-500 focus-within:bg-red-50 focus-within:border-red-500",loading:"",prefilled:"bg-[#F6F6F6] border-[#DEDEDE] dark:!bg-transparent caret-[#DEDEDE] focus-within:bg-[#F6F6F6] focus-within:border-[#DEDEDE] dark:!border-[#9299A2] dark:focus-within:border-[#9299A2]",neutral:"bg-[#F6F6F6] border-[#DEDEDE] dark:!bg-transparent caret-[#DEDEDE] focus-within:bg-[#F6F6F6] focus-within:border-[#DEDEDE] dark:!border-[#9299A2] dark:focus-within:border-[#9299A2]"}},defaultVariants:{status:"default"}}),To=Wt("top-0 flex justify-center items-center h-full min-w-[50px] max-w-[100px] dark:!bg-transparent transition px-3 py-2 text-base placeholder:text-[#79818C] focus-within:outline-0 focus-within:ring-0 focus-visible:ring-offset-0 disabled:cursor-not-allowed disabled:opacity-50 dark:disabled:!border-[#9299A2]",{variants:{side:{left:"left-0 rounded-l-[8px] border-r",right:"right-0 rounded-r-[8px] border-l"},status:{default:"border-[#DEDEDE] bg-white text-[#191919] dark:!bg-transparent caret-primary-main focus-within:bg-white dark:focus-within:!bg-transparent dark:text-white focus-within:border-primary-main dark:focus-within:border-[#9299A2] dark:disabled:!border-[#9299A2]",error:"placeholder:text-red-500 bg-red-50 border-red-500 dark:!bg-red-50 text-red-500 focus-within:bg-red-50 focus-within:border-red-500",loading:"",prefilled:"bg-[#F6F6F6] border-[#DEDEDE] dark:!bg-transparent caret-[#DEDEDE] focus-within:bg-[#F6F6F6] focus-within:border-[#DEDEDE] dark:!border-[#9299A2] dark:focus-within:border-[#9299A2]",neutral:"bg-transparent border-0 caret-[#DEDEDE] !px-0"}},defaultVariants:{status:"default",side:"left"}}),G=Gt.forwardRef(({className:e,status:t="default",disabled:o,error:r,isLoading:a,sideNodeClassName:n,showAsterisk:s,label:c,description:m,...l},p)=>{let u=t;return r&&(u="error"),a&&(u="loading"),o&&(u="prefilled"),Fo("div",{className:"relative space-y-1 w-full",children:[c&&Be(A,{showAsterisk:s,error:r,children:c}),Fo("div",{className:i($({status:u}),l.leftNode?"pl-0":"",l.rightNode?"pr-0":"",e),children:[l.leftNode?Be("div",{className:i(To({status:u,side:"left"}),n),children:l.leftNode}):null,Be(Eo,{ref:p,disabled:a||o,className:i({"!pl-3":l.leftNode&&t!=="neutral","!pr-3":l.rightNode&&t!=="neutral","sentry-mask":!!l?.isContentSensitive}),...l}),l.rightNode?Be("div",{className:i(To({status:u,side:"right"}),n),children:l.rightNode}):null]}),m&&Be(me,{className:"text-gray-400 text-sm !font-normal",children:m}),Be(ee,{error:r})]})});G.displayName="Input";import{useMemo as Ka,useState as Go}from"react";import{jsx as Mo}from"react/jsx-runtime";var Ao=()=>Mo("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:Mo("path",{d:"M8.89802 2.93408L9.70202 3.49808L6.21602 8.52608H5.41202L3.46802 5.80208L4.27202 5.05208L5.81402 6.49208L8.89802 2.93408Z",fill:"currentColor"})});import{jsx as Io,jsxs as Za}from"react/jsx-runtime";var Bo=()=>Za("svg",{width:"18",height:"14",viewBox:"0 0 18 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[Io("path",{d:"M1.54639 7.26103C1.48389 7.09264 1.48389 6.90741 1.54639 6.73903C2.15517 5.26292 3.18853 4.00081 4.51547 3.1127C5.84241 2.22459 7.40317 1.75049 8.99989 1.75049C10.5966 1.75049 12.1574 2.22459 13.4843 3.1127C14.8113 4.00081 15.8446 5.26292 16.4534 6.73903C16.5159 6.90741 16.5159 7.09264 16.4534 7.26103C15.8446 8.73713 14.8113 9.99925 13.4843 10.8874C12.1574 11.7755 10.5966 12.2496 8.99989 12.2496C7.40317 12.2496 5.84241 11.7755 4.51547 10.8874C3.18853 9.99925 2.15517 8.73713 1.54639 7.26103Z",stroke:"#8E98A8",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),Io("path",{d:"M9 9.25C10.2426 9.25 11.25 8.24264 11.25 7C11.25 5.75736 10.2426 4.75 9 4.75C7.75736 4.75 6.75 5.75736 6.75 7C6.75 8.24264 7.75736 9.25 9 9.25Z",stroke:"#8E98A8",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})]});import{jsx as Vo,jsxs as Ua}from"react/jsx-runtime";var Oo=()=>Ua("svg",{width:"18",height:"18",viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[Vo("path",{d:"M4.08759 12.69C3.26171 11.9072 2.61006 10.9591 2.17509 9.90752C2.10081 9.73454 2.0625 9.54826 2.0625 9.36001C2.0625 9.17177 2.10081 8.98549 2.17509 8.81252C2.75274 7.4073 3.72095 6.19704 4.96509 5.32502C6.14597 4.4998 7.55989 4.07405 9.00009 4.11002C10.0363 4.084 11.064 4.30239 12.0001 4.74752M13.9201 6.03752C14.7415 6.81964 15.3904 7.76486 15.8251 8.81252C15.8994 8.98549 15.9377 9.17177 15.9377 9.36001C15.9377 9.54826 15.8994 9.73454 15.8251 9.90752C15.2474 11.3127 14.2792 12.523 13.0351 13.395C11.8542 14.2202 10.4403 14.646 9.00009 14.61C7.9639 14.636 6.93616 14.4176 6.00009 13.9725",stroke:"#8E98A8",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),Vo("path",{d:"M6.5325 10.2375C6.42732 9.95694 6.37395 9.65962 6.375 9.36C6.375 8.66381 6.65156 7.99613 7.14384 7.50384C7.63613 7.01156 8.30381 6.735 9 6.735C9.3 6.7335 9.597 6.7875 9.8775 6.8925M11.4675 8.4825C11.5725 8.763 11.6265 9.06 11.625 9.36C11.625 10.0562 11.3484 10.7239 10.8562 11.2162C10.3639 11.7084 9.69619 11.985 9 11.985C8.70038 11.986 8.40306 11.9327 8.1225 11.8275M2.25 15L14.25 3",stroke:"#8E98A8",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})]});import{jsx as Ho}from"react/jsx-runtime";var _o=()=>Ho("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:Ho("path",{d:"M3.37891 8.62142L6.00041 5.99992L8.62191 8.62142M8.62191 3.37842L5.99991 5.99992L3.37891 3.37842",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})});import{jsx as fe,jsxs as ja}from"react/jsx-runtime";var Wo=[{label:"Uppercase",key:"uppercase",RegExp:/[A-Z]/,validated:!1},{label:"Lowercase",key:"lowercase",RegExp:/[a-z]/,validated:!1},{label:"Number",key:"number",RegExp:/\d/,validated:!1},{label:"12 Characters",key:"twelve-chars",RegExp:/.{12}/,validated:!1}],$o=({onValidate:e,onChange:t,disableValidation:o,...r})=>{let[a,n]=Go(!1),[s,c]=Go(Wo),m=d=>Wo.map(g=>({...g,validated:g.RegExp.test(d)})),l=d=>{let g=m(d),N=g.every(y=>y.validated);return c(g),N},p=d=>{if(t&&t(d),o)return;let g=d?.target?.value,N=l(g);e&&e(N,g)},u=Ka(()=>fe("div",{className:"flex items-center gap-2",children:s?.map(d=>ja("div",{className:i("text-xs flex items-center gap-0.5",{"text-[#62C554]":d?.validated,"text-[#8E98A8]":!d?.validated}),children:[fe("span",{className:"",children:d?.validated?fe(Ao,{}):fe(_o,{})}),fe("span",{className:"",children:d?.label})]},d?.key))}),[s]);return fe(G,{sideNodeClassName:"!border-l-0",rightNode:a?fe("button",{type:"button",onClick:()=>n(d=>!d),children:fe(Bo,{})}):fe("button",{type:"button",onClick:()=>n(d=>!d),children:fe(Oo,{})}),type:a?"text":"password",onChange:p,description:!o&&u,isContentSensitive:!0,...r})};$o.displayName="PasswordInput";import{cva as Xa}from"class-variance-authority";import{jsx as xt,jsxs as Ya}from"react/jsx-runtime";var n1=Xa("flex relative min-h-[80px] w-full rounded-[8px] border transition px-3 py-2 text-base placeholder:text-[#79818C] focus-within:outline-0 focus-within:ring-0 focus-visible:ring-offset-0 disabled:cursor-not-allowed disabled:opacity-50",{variants:{status:{default:"border-[#D7D7D7] dark:border-[#676767] bg-white text-[#191919] dark:!bg-transparent caret-primary-main focus-within:bg-white dark:focus-within:!bg-transparent dark:text-white focus-within:border-primary-main dark:focus-within:border-[#9299A2] dark:border-[#9299A2] dark:disabled:!border-[#9299A2]",error:"placeholder:text-status-error-fill bg-status-error-bg border-status-error-fill dark:!bg-status-error-bg-dark text-status-error-fill focus-within:bg-status-error-bg focus-within:border-status-error-fill",loading:"placeholder:text-[#C4C4C4]",prefilled:"resize-none bg-[#F6F6F6] border-[#D7D7D7] dark:!bg-transparent caret-[#D7D7D7] focus-within:bg-[#F6F6F6] focus-within:border-[#D7D7D7] dark:!border-[#9299A2] dark:focus-within:border-[#9299A2]",neutral:""}},defaultVariants:{status:"default"}}),zo=({className:e,status:t="default",disabled:o,error:r,isLoading:a,showAsterisk:n,label:s,description:c,...m})=>{let l=t;return r&&(l="error"),a&&(l="loading"),o&&(l="prefilled"),Ya("div",{className:"relative space-y-1",children:[xt(A,{showAsterisk:n,error:r,children:s}),xt("textarea",{className:i("min-h-[80px]",$({status:l}),e),disabled:a||o,...m}),xt(me,{className:"text-gray-400 text-sm !font-normal",children:c}),xt(ee,{error:r})]})};zo.displayName="Textarea";import*as Ve from"react";import*as Le from"react";import{Command as U}from"cmdk";import{Search as on}from"lucide-react";import*as Pe from"react";import*as E from"@radix-ui/react-dialog";import{jsx as Zo,jsxs as qa}from"react/jsx-runtime";var Uo=()=>qa("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"lucide lucide-x",children:[Zo("path",{d:"M18 6 6 18"}),Zo("path",{d:"m6 6 12 12"})]});import{Fragment as tn,jsx as te,jsxs as We}from"react/jsx-runtime";var Ja=E.Root,Qa=E.Trigger,en=E.Portal,Ko=Pe.forwardRef(({className:e,...t},o)=>te(E.Overlay,{ref:o,className:i("fixed inset-0 z-50 bg-black/60 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t}));Ko.displayName=E.Overlay.displayName;var $t=Pe.forwardRef(({className:e,hideCloseButton:t,children:o,...r},a)=>We(en,{children:[te(Ko,{}),We(E.Content,{ref:a,className:i("fixed left-[50%] top-[50%] z-50 grid sm:w-full w-[95%] max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border border-transparent bg-white p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] rounded-lg max-h-[95%] overflow-y-auto",e),...r,children:[o,!t&&We(E.Close,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground",children:[te(Uo,{}),te("span",{className:"sr-only",children:"Close"})]})]})]}));$t.displayName=E.Content.displayName;var jo=({className:e,...t})=>te("div",{className:i("flex flex-col space-y-1.5 text-left",e),...t});jo.displayName="DialogHeader";var Xo=({className:e,...t})=>te("div",{className:i("flex flex-row justify-end sm:space-x-2",e),...t});Xo.displayName="DialogFooter";var Yo=Pe.forwardRef(({className:e,...t},o)=>te(E.Title,{ref:o,className:i("text-xl font-semibold leading-none tracking-tight",e),...t}));Yo.displayName=E.Title.displayName;var qo=Pe.forwardRef(({className:e,...t},o)=>te(E.Description,{ref:o,className:i("text-sm text-gray-500",e),...t}));qo.displayName=E.Description.displayName;var zt=({trigger:e=void 0,children:t,open:o,onOpenChange:r,hideCloseButton:a,footer:n,title:s,description:c,contentClassName:m,headerClassName:l,titleClassName:p,descriptionClassName:u,footerClassName:d,asChild:g=!0,onOpenAutoFocus:N,onCloseAutoFocus:y,onEscapeKeyDown:v,onInteractOutside:f,onPointerDownOutside:R,closeOnOutsideClick:x=!0,...b})=>{let h=Pe.useCallback(w=>{x||w.preventDefault(),R?.(w)},[x,R]),C=Pe.useCallback(w=>{x||w.preventDefault(),f?.(w)},[x,f]);return We(Ja,{...b,...o!==void 0?{open:o,onOpenChange:r}:{},children:[te(Qa,{asChild:g,children:e}),We($t,{className:m,hideCloseButton:a,onOpenAutoFocus:N,onCloseAutoFocus:y,onEscapeKeyDown:v,onPointerDownOutside:h,onInteractOutside:C,children:[s||c?We(jo,{className:l,children:[s&&te(Yo,{className:p,children:s}),c&&te(qo,{className:u,children:c})]}):te(tn,{}),t,n&&te(Xo,{className:d,children:n})]})]})};zt.displayName=E.Dialog.displayName;import{Fragment as x1,jsx as ge,jsxs as nn}from"react/jsx-runtime";var Qe=Le.forwardRef(({className:e,...t},o)=>ge(U,{ref:o,className:i("flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground",e),...t}));Qe.displayName=U.displayName;var et=Le.forwardRef(({className:e,CommandInputContainerClassName:t,loading:o,...r},a)=>nn("div",{className:i("flex items-center border-0 px-3 gap-2",t),"cmdk-input-wrapper":"",children:[o?ge(pe,{size:16,colour:"secondary"}):ge(on,{className:"mr-2 h-4 w-4 shrink-0 opacity-50"}),ge(U.Input,{ref:a,className:i("flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50",e),disabled:o,...r})]}));et.displayName=U.Input.displayName;var tt=Le.forwardRef(({className:e,...t},o)=>ge(U.List,{ref:o,className:i("overflow-y-auto overflow-x-hidden",e),...t}));tt.displayName=U.List.displayName;var ot=Le.forwardRef((e,t)=>ge(U.Empty,{ref:t,className:"py-6 text-center text-sm",...e}));ot.displayName=U.Empty.displayName;var rt=Le.forwardRef(({className:e,...t},o)=>ge(U.Group,{ref:o,className:i("overflow-hidden p-1 text-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground",e),...t}));rt.displayName=U.Group.displayName;var rn=Le.forwardRef(({className:e,...t},o)=>ge(U.Separator,{ref:o,className:i("-mx-1 h-px bg-border",e),...t}));rn.displayName=U.Separator.displayName;var at=Le.forwardRef(({className:e,...t},o)=>ge(U.Item,{ref:o,className:i("relative text=[#222222] flex cursor-default gap-2 select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none data-[disabled=true]:pointer-events-none data-[selected=true]:bg-primary-accent data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",e),...t}));at.displayName=U.Item.displayName;var an=({className:e,...t})=>ge("span",{className:i("ml-auto text-xs tracking-widest text-muted-foreground",e),...t});an.displayName="CommandShortcut";import*as Zt from"react";import*as ne from"@radix-ui/react-popover";import{jsx as $e,jsxs as sn}from"react/jsx-runtime";var K=ne.Root,H=Zt.forwardRef((e,t)=>$e(ne.Trigger,{ref:t,...e,onPointerDown:o=>{e.onPointerDown?.(o)}}));H.displayName=ne.Trigger.displayName;var z=Zt.forwardRef(({className:e,align:t="center",sideOffset:o=4,portal:r=!0,...a},n)=>r?$e(ne.Portal,{children:$e(ne.Content,{ref:n,align:t,sideOffset:o,className:i("pointer-events-auto z-50 w-72 rounded-md border border-transparent bg-white p-4 text-[#191919] shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),onOpenAutoFocus:a.onOpenAutoFocus,onCloseAutoFocus:a.onCloseAutoFocus,...a})}):$e(ne.Content,{ref:n,align:t,sideOffset:o,className:i("pointer-events-auto z-50 w-72 rounded-md border border-transparent bg-white p-4 text-[#191919] shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),onOpenAutoFocus:a.onOpenAutoFocus,onCloseAutoFocus:a.onCloseAutoFocus,...a}));z.displayName=ne.Content.displayName;var ie=({trigger:e,children:t,open:o,onOpenChange:r,contentClassName:a,asChild:n=!0,align:s,side:c,alignOffset:m,triggerClassName:l,sideOffset:p,onOpenAutoFocus:u,onCloseAutoFocus:d,portal:g=!0,id:N="popover",...y})=>sn(K,{...y,...o!==void 0?{open:o,onOpenChange:r}:{},children:[$e(H,{asChild:n,className:l,id:`${N}-trigger`,children:e}),$e(z,{alignOffset:m,sideOffset:p,side:c,align:s,className:a,onOpenAutoFocus:u,onCloseAutoFocus:d,portal:g,id:`${N}-content`,children:t})]});ie.displayName=ne.Root.displayName;import*as Ut from"react";import*as se from"@radix-ui/react-scroll-area";import{jsx as nt,jsxs as ln}from"react/jsx-runtime";var le=Ut.forwardRef(({className:e,viewPortClassName:t,children:o,...r},a)=>ln(se.Root,{ref:a,className:i("relative overflow-hidden",e),...r,children:[nt(se.Viewport,{className:i("h-full w-full rounded-[inherit]",t),children:o}),nt(Ct,{}),nt(se.Corner,{})]}));le.displayName=se.Root.displayName;var Ct=Ut.forwardRef(({className:e,orientation:t="vertical",...o},r)=>nt(se.ScrollAreaScrollbar,{ref:r,orientation:t,className:i("flex touch-none select-none transition-colors",t==="vertical"&&"h-full w-2.5 border-l border-l-transparent p-[1px]",t==="horizontal"&&"h-2.5 flex-col border-t border-t-transparent p-[1px]",e),...o,children:nt(se.ScrollAreaThumb,{className:"relative flex-1 rounded-full bg-[#959595] transition hover:bg-[#808080]"})}));Ct.displayName=se.ScrollAreaScrollbar.displayName;import{jsx as ce,jsxs as wt}from"react/jsx-runtime";var Jo=({className:e,value:t,placeholder:o="",status:r,disabled:a,id:n})=>ce(H,{asChild:!0,disabled:a,id:n??"searchable-trigger",children:wt("button",{disabled:a,className:i($({status:r}),"[&>span]:justify-start [&>span]:items-center gap-2 flex h-12 w-full items-center justify-between goup",t?"":"text-[#79818C]",e),children:[ce("span",{children:t??o??"Select options..."}),ce("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",className:" data-[state=open]:goup-rotate-180",children:ce("path",{d:"M16.5999 7.45825L11.1666 12.8916C10.5249 13.5333 9.4749 13.5333 8.83324 12.8916L3.3999 7.45825",stroke:"currentColor",strokeWidth:"1.5",strokeMiterlimit:"10",strokeLinecap:"round",strokeLinejoin:"round"})})]})}),Nt=({options:e=[],value:t,onChange:o,containerClassName:r,placeholder:a,disabled:n,loading:s,optionComponent:c,children:m,modal:l=!1,hideSearch:p,className:u,inputValue:d,onValueChange:g,onInputValueChange:N})=>{let[y,v]=Ve.useState(!1),[f,R]=Ve.useState(void 0),x=Ve.useRef(null),b=Ve.useCallback(h=>{if(x.current&&(x.current.disconnect(),x.current=null),h){let C=()=>{R(h.getBoundingClientRect().width)};C();let w=new ResizeObserver(()=>{C()});w.observe(h),x.current=w}},[]);return wt(K,{modal:l,open:y,onOpenChange:v,children:[ce("div",{className:i("w-full",u),ref:b,children:m}),ce(z,{portal:!l,className:"p-0 min-w-[200px]",style:{width:f?`${f}px`:void 0},children:wt(Qe,{className:i("relative max-h-[270px]",{"mt-2":!p}),children:[!p&&ce(et,{loading:s,placeholder:a??"Search options...",onValueChange:N,value:d,CommandInputContainerClassName:"mx-2 border rounded-md border-[#DEDEDE]"}),ce(le,{viewPortClassName:"max-h-[225px]",className:i("w-full px-0 h-full overflow-y-auto",r),children:wt(tt,{children:[!p&&ce(ot,{children:"No result found."}),ce(rt,{className:"w-full",children:e?.map((h,C)=>ce(at,{defaultValue:t?.label,value:h.label,disabled:n,onSelect:()=>{o(h),v(!1),g?.(h?.value)},id:h.value,children:c?c(h):ce("span",{children:h.label})},`${h.value}-${C}`))})]})})]})})]})};var Kt=[{countryCode:"GLOBAL",countryName:"Global",currency:"Dollars",currencyCode:"USD",internetCountryCode:"GLOBAL"},{countryName:"Benin",countryCode:"+229",currency:"West African CFA franc",currencyCode:"XOF",currencyIcon:"Fr",internetCountryCode:"BJ"},{countryName:"Burkina Faso",countryCode:"+226",currency:"West African CFA franc",currencyCode:"XOF",currencyIcon:"Fr",internetCountryCode:"BF"},{countryName:"Cameroon",countryCode:"+237",currency:"Central African CFA franc",currencyCode:"XAF",currencyIcon:"Fr",internetCountryCode:"CM"},{countryName:"Chad",countryCode:"+235",currency:"Central African CFA franc",currencyCode:"XAF",currencyIcon:"Fr",internetCountryCode:"TD"},{countryName:"DR Congo",countryCode:"+243",currency:"Congolese franc",currencyCode:"CDF",currencyIcon:"FC",internetCountryCode:"CD"},{countryName:"Eswatini",countryCode:"+268",currency:"Swazi lilangeni",currencyCode:"SZL",currencyIcon:"L",internetCountryCode:"SZ"},{countryName:"Gabon",countryCode:"+241",currency:"Central African CFA franc",currencyCode:"XAF",currencyIcon:"Fr",internetCountryCode:"GA"},{countryName:"Ghana",countryCode:"+233",currency:"Ghanaian cedi",currencyCode:"GHS",currencyIcon:"\u20B5",internetCountryCode:"GH"},{countryName:"Guinea",countryCode:"+224",currency:"Guinean franc",currencyCode:"GNF",currencyIcon:"Fr",internetCountryCode:"GN"},{countryName:"Ivory Coast",countryCode:"+225",currency:"West African CFA franc",currencyCode:"XOF",currencyIcon:"Fr",internetCountryCode:"CI"},{countryName:"Kenya",countryCode:"+254",currency:"Kenyan shilling",currencyCode:"KES",currencyIcon:"Sh",internetCountryCode:"KE"},{countryName:"Lesotho",countryCode:"+266",currency:"Lesotho loti",currencyCode:"LSL",currencyIcon:"L",internetCountryCode:"LS"},{countryName:"Liberia",countryCode:"+231",currency:"Liberian dollar",currencyCode:"LRD",currencyIcon:"$",internetCountryCode:"LR"},{countryName:"Madagascar",countryCode:"+261",currency:"Malagasy ariary",currencyCode:"MGA",currencyIcon:"Ar",internetCountryCode:"MG"},{countryName:"Malawi",countryCode:"+265",currency:"Malawian kwacha",currencyCode:"MWK",currencyIcon:"MK",internetCountryCode:"MW"},{countryName:"Mali",countryCode:"+223",currency:"West African CFA franc",currencyCode:"XOF",currencyIcon:"Fr",internetCountryCode:"ML"},{countryName:"Mozambique",countryCode:"+258",currency:"Mozambican metical",currencyCode:"MZN",currencyIcon:"MT",internetCountryCode:"MZ"},{countryName:"Namibia",countryCode:"+264",currency:"Namibian dollar",currencyCode:"NAD",currencyIcon:"$",internetCountryCode:"NA"},{countryName:"Niger",countryCode:"+227",currency:"West African CFA franc",currencyCode:"XOF",currencyIcon:"Fr",internetCountryCode:"NE"},{countryName:"Nigeria",countryCode:"+234",currency:"Nigerian naira",currencyCode:"NGN",currencyIcon:"\u20A6",internetCountryCode:"NG"},{countryName:"Republic of the Congo",countryCode:"+242",currency:"Central African CFA franc",currencyCode:"XAF",currencyIcon:"Fr",internetCountryCode:"CG"},{countryName:"Rwanda",countryCode:"+250",currency:"Rwandan franc",currencyCode:"RWF",currencyIcon:"Fr",internetCountryCode:"RW"},{countryName:"Senegal",countryCode:"+221",currency:"West African CFA franc",currencyCode:"XOF",currencyIcon:"Fr",internetCountryCode:"SN"},{countryName:"Seychelles",countryCode:"+248",currency:"Seychellois rupee",currencyCode:"SCR",currencyIcon:"\u20A8",internetCountryCode:"SC"},{countryName:"South Africa",countryCode:"+27",currency:"South African rand",currencyCode:"ZAR",currencyIcon:"R",internetCountryCode:"ZA"},{countryName:"South Sudan",countryCode:"+211",currency:"South Sudanese pound",currencyCode:"SSP",currencyIcon:"\xA3",internetCountryCode:"SS"},{countryName:"Tanzania",countryCode:"+255",currency:"Tanzanian shilling",currencyCode:"TZS",currencyIcon:"Sh",internetCountryCode:"TZ"},{countryName:"Togo",countryCode:"+228",currency:"West African CFA franc",currencyCode:"XOF",currencyIcon:"Fr",internetCountryCode:"TG"},{countryName:"Uganda",countryCode:"+256",currency:"Ugandan shilling",currencyCode:"UGX",currencyIcon:"Sh",internetCountryCode:"UG"},{countryName:"Zambia",countryCode:"+260",currency:"Zambian kwacha",currencyCode:"ZMW",currencyIcon:"ZK",internetCountryCode:"ZM"}],Qo=()=>{let e={};return Kt?.forEach(t=>{e[t?.internetCountryCode]=t?.countryName}),e};import*as lt from"react";import*as Rt from"react-phone-number-input";import pn from"react-phone-number-input/flags";import{jsx as it,jsxs as dn}from"react/jsx-runtime";var cn=e=>dn("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"none",...e,children:[it("rect",{width:"32",height:"32",fill:"#60A5FA"})," ",it("path",{d:"M3 10L7 8L10 9L13 8L16 10L19 9L22 11L25 10L28 12V15L26 17L28 19L27 22L29 24L27 26L24 25L21 26L18 24L15 25L12 23L9 24L6 22L4 23L2 21V18L4 16L3 13L5 11L3 10Z",fill:"#34D399"}),it("rect",{x:"2",y:"28",width:"28",height:"3",fill:"#D1D5DB"}),it("path",{d:"M0 16H32M8 0V32M16 0V32M24 0V32",stroke:"#2563EB",strokeWidth:"0.5",vectorEffect:"non-scaling-stroke"}),it("path",{d:"M0 16H32",stroke:"#2563EB",strokeWidth:"1",vectorEffect:"non-scaling-stroke"})]}),er=cn;import{jsx as S,jsxs as st}from"react/jsx-runtime";var tr=lt.forwardRef(({className:e,onChange:t,defaultCountry:o="NG",disableCountrySelect:r=!1,modal:a,showAsterisk:n,label:s,description:c,error:m,countryOptions:l,...p},u)=>{let d=g=>S(mn,{...g,status:p.status,modal:a,options:l||g?.options});return st("div",{className:"relative space-y-1",children:[S(A,{showAsterisk:n,error:m,children:s}),S(Rt.default,{ref:u,className:i("flex sentry-mask",e),flagComponent:ke,countrySelectComponent:g=>S(d,{...g,disabled:g?.disabled||r}),inputComponent:or,defaultCountry:o,onChange:g=>{t&&t?.(g)},...p}),S(me,{className:"text-gray-400 text-sm !font-normal",children:c}),S(ee,{error:m})]})});tr.displayName="PhoneInput";var or=lt.forwardRef(({className:e,...t},o)=>S(G,{className:i("!rounded-s-none h-10",e),...t,ref:o}));or.displayName="InputComponent";var mn=({disabled:e,value:t,onChange:o,options:r,status:a,modal:n})=>{let s=lt.useCallback(c=>{o(c)},[o]);return st(K,{modal:n,children:[S(H,{disabled:e,children:st("div",{className:i($({status:a}),"transition justify-center items-center disabled:text-base-500 flex gap-3 h-10 rounded-e-none border-e-0 pl-2 pr-2"),children:[S(ke,{country:t,countryName:t}),S("svg",{className:i("mr-0.5 h-4 w-4 opacity-50",e?"hidden":"opacity-100"),width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",children:S("path",{d:"M16.5999 7.45825L11.1666 12.8916C10.5249 13.5333 9.4749 13.5333 8.83324 12.8916L3.3999 7.45825",stroke:"#959595",strokeWidth:"1.5",strokeMiterlimit:"10",strokeLinecap:"round",strokeLinejoin:"round"})})]})}),S(z,{portal:!n,className:"w-[200px] md:w-[300px] p-0",children:S(Qe,{children:S(tt,{children:st(le,{className:"h-72",children:[S(et,{placeholder:"Search country..."}),S(ot,{children:"No country found."}),S(rt,{children:r.filter(c=>c.value).map(c=>st(at,{className:"gap-2",onSelect:()=>s(c.value),children:[S(ke,{country:c.value,countryName:c.label}),S("span",{className:"flex-1 text-sm",children:c.label}),c.value&&S("span",{className:"text-[#191919]/50 text-sm dark:text-white",children:`+${Rt.getCountryCallingCode(c.value)}`}),S("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",className:i("ml-auto",c.value===t?"opacity-100":"opacity-0"),children:S("path",{d:"M4 8.00008L6.66353 10.6636L12 5.33655",stroke:"#959595",strokeWidth:"1.06667",strokeLinecap:"round",strokeLinejoin:"round"})})]},`${c.value}-${c.label}`))})]})})})})]})},ke=({country:e,countryName:t,className:o})=>{let r=pn[e];return e==="GLOBAL"?S("span",{className:i("bg-white/20 flex h-4 w-6 overflow-hidden rounded-sm",o),children:S(er,{className:"w-full h-[90%]"})}):S("span",{className:i("bg-white/20 flex h-4 w-6 overflow-hidden rounded-sm",o),children:r&&S(r,{title:t})})};ke.displayName="FlagComponent";import{jsx as oe,jsxs as Pt}from"react/jsx-runtime";var un=Qo(),fn=({className:e,value:t,placeholder:o="",status:r,disabled:a})=>oe(H,{asChild:!0,disabled:a,id:"country-dropdown",children:Pt("button",{disabled:a,className:i($({status:r}),"[&>span]:justify-start [&>span]:items-center gap-2 flex w-full items-center justify-between goup",t?"":"text-[#79818C]",e),children:[t?Pt("div",{className:"flex gap-2 items-center",children:[oe(ke,{country:t,countryName:t,className:"ml-1 !w-6 h-5"}),oe("span",{className:"",children:un[t]})]}):oe("span",{children:o??"Select options..."}),oe("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",className:" data-[state=open]:goup-rotate-180",children:oe("path",{d:"M16.5999 7.45825L11.1666 12.8916C10.5249 13.5333 9.4749 13.5333 8.83324 12.8916L3.3999 7.45825",stroke:"currentColor",strokeWidth:"1.5",strokeMiterlimit:"10",strokeLinecap:"round",strokeLinejoin:"round"})})]})}),gn=({hideSearch:e=!0,showAsterisk:t,label:o,description:r,error:a,...n})=>{let s=Kt?.map(c=>({value:c?.internetCountryCode,label:c?.countryName,...c}));return Pt("div",{className:"relative space-y-1",children:[oe(A,{showAsterisk:t,error:a,children:o}),oe(Nt,{options:s,hideSearch:e,optionComponent:c=>Pt("div",{className:"w-full flex items-center gap-2",children:[oe(ke,{country:c?.internetCountryCode,countryName:c?.label,className:"ml-2 !w-6 !h-5"}),oe("span",{className:"flex-1 text-sm",children:c?.label})]}),...n,children:oe(fn,{value:n?.value?.value,status:n?.status,placeholder:n?.placeholder??" Select Country"})}),oe(me,{className:"text-gray-400 text-sm !font-normal",children:r}),oe(ee,{error:a})]})};import{jsx as ct,jsxs as bn}from"react/jsx-runtime";var De=({showAsterisk:e,label:t,description:o,error:r,hideSearch:a=!0,status:n,...s})=>bn("div",{className:"relative space-y-1",children:[ct(A,{showAsterisk:e,error:r,children:t}),ct(Nt,{hideSearch:a,...s,containerClassName:"h-full",children:ct(Jo,{disabled:s?.disabled,placeholder:s?.placeholder??"Select",status:n,value:s?.value?.label??s?.value?.value,className:s?.className,id:s?.id})}),ct(me,{className:"text-gray-400 text-sm !font-normal",children:o}),ct(ee,{error:r})]});import{cva as vn}from"class-variance-authority";import{useMemo as hn}from"react";import yn from"react-otp-input";import{jsx as rr}from"react/jsx-runtime";var xn=vn("transition cursor-default placeholder:text-black dark:placeholder:text-white rounded-lg !h-14 !w-14 border aspect-square text-base font-semibold tracking-normal outline-none placeholder:text-sm placeholder:font-normal text-black focus:bg-white flex-shrink-0",{variants:{status:{default:"border-gray-300 dark:border-[#d4d4d4] focus:border-gray-400 focus-visible:!ring-offset-gray-200 focus:ring-offset-gray-200 !ring-gray-200 !focus-visible:ring-1 bg-white dark:!bg-transparent dark:focus-visible:!ring-0 dark:focus-within:!bg-transparent dark:text-white dark:focus-within:border-[#9299A2] dark:border-[#676767] dark:disabled:!border-[#9299A2]",error:"placeholder:text-red-600 bg-red-50 border-red-600 text-red-600 focus-within:bg-red-50 focus-within:border-red-600",loading:"placeholder:text-[#C4C4C4]"}},defaultVariants:{status:"default"}}),Cn=({numInputs:e=4,inputStyle:t,containerStyle:o,placeholder:r="-",status:a,inputMode:n="numeric",inputType:s="number",...c})=>{let m=hn(()=>r||new Array(e).fill("").reduce((u,d)=>u+=d,""),[e,r]);return rr(yn,{numInputs:e,placeholder:m,containerStyle:i("w-fit sentry-mask flex justify-between",o),inputStyle:i(xn({status:a}),t,"sentry-mask"),renderInput:l=>rr("input",{...l,inputMode:n,type:s}),inputType:s,...c})};import{useState as wn,useEffect as Nn}from"react";import{jsx as I,jsxs as Oe}from"react/jsx-runtime";var Rn=({type:e})=>e==="gray"?I("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:I("path",{d:"M10 0C4.49 0 0 4.49 0 10C0 15.51 4.49 20 10 20C15.51 20 20 15.51 20 10C20 4.49 15.51 0 10 0ZM14.78 7.7L9.11 13.37C8.97 13.51 8.78 13.59 8.58 13.59C8.38 13.59 8.19 13.51 8.05 13.37L5.22 10.54C4.93 10.25 4.93 9.77 5.22 9.48C5.51 9.19 5.99 9.19 6.28 9.48L8.58 11.78L13.72 6.64C14.01 6.35 14.49 6.35 14.78 6.64C15.07 6.93 15.07 7.4 14.78 7.7Z",fill:"#79818C"})}):e==="info"?I("svg",{stroke:"#70B6F6",fill:"#70B6F6",strokeWidth:"0",viewBox:"0 0 16 16",height:"24",width:"24",xmlns:"http://www.w3.org/2000/svg",children:I("path",{d:"M8 16A8 8 0 1 0 8 0a8 8 0 0 0 0 16m.93-9.412-1 4.705c-.07.34.029.533.304.533.194 0 .487-.07.686-.246l-.088.416c-.287.346-.92.598-1.465.598-.703 0-1.002-.422-.808-1.319l.738-3.468c.064-.293.006-.399-.287-.47l-.451-.081.082-.381 2.29-.287zM8 5.5a1 1 0 1 1 0-2 1 1 0 0 1 0 2"})}):e==="warning"?I("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:I("path",{d:"M9.99984 1.66663C5.40817 1.66663 1.6665 5.40829 1.6665 9.99996C1.6665 14.5916 5.40817 18.3333 9.99984 18.3333C14.5915 18.3333 18.3332 14.5916 18.3332 9.99996C18.3332 5.40829 14.5915 1.66663 9.99984 1.66663ZM9.37484 6.66663C9.37484 6.32496 9.65817 6.04163 9.99984 6.04163C10.3415 6.04163 10.6248 6.32496 10.6248 6.66663V10.8333C10.6248 11.175 10.3415 11.4583 9.99984 11.4583C9.65817 11.4583 9.37484 11.175 9.37484 10.8333V6.66663ZM10.7665 13.65C10.7248 13.7583 10.6665 13.8416 10.5915 13.925C10.5082 14 10.4165 14.0583 10.3165 14.1C10.2165 14.1416 10.1082 14.1666 9.99984 14.1666C9.8915 14.1666 9.78317 14.1416 9.68317 14.1C9.58317 14.0583 9.4915 14 9.40817 13.925C9.33317 13.8416 9.27484 13.7583 9.23317 13.65C9.1915 13.55 9.1665 13.4416 9.1665 13.3333C9.1665 13.225 9.1915 13.1166 9.23317 13.0166C9.27484 12.9166 9.33317 12.825 9.40817 12.7416C9.4915 12.6666 9.58317 12.6083 9.68317 12.5666C9.88317 12.4833 10.1165 12.4833 10.3165 12.5666C10.4165 12.6083 10.5082 12.6666 10.5915 12.7416C10.6665 12.825 10.7248 12.9166 10.7665 13.0166C10.8082 13.1166 10.8332 13.225 10.8332 13.3333C10.8332 13.4416 10.8082 13.55 10.7665 13.65Z",fill:"#FFC700"})}):e==="success"?I("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:I("path",{d:"M12 2C6.49 2 2 6.49 2 12C2 17.51 6.49 22 12 22C17.51 22 22 17.51 22 12C22 6.49 17.51 2 12 2ZM16.78 9.7L11.11 15.37C10.97 15.51 10.78 15.59 10.58 15.59C10.38 15.59 10.19 15.51 10.05 15.37L7.22 12.54C6.93 12.25 6.93 11.77 7.22 11.48C7.51 11.19 7.99 11.19 8.28 11.48L10.58 13.78L15.72 8.64C16.01 8.35 16.49 8.35 16.78 8.64C17.07 8.93 17.07 9.4 16.78 9.7Z",fill:"#00D488"})}):I("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:I("path",{d:"M9.99984 1.66663C5.40817 1.66663 1.6665 5.40829 1.6665 9.99996C1.6665 14.5916 5.40817 18.3333 9.99984 18.3333C14.5915 18.3333 18.3332 14.5916 18.3332 9.99996C18.3332 5.40829 14.5915 1.66663 9.99984 1.66663ZM9.37484 6.66663C9.37484 6.32496 9.65817 6.04163 9.99984 6.04163C10.3415 6.04163 10.6248 6.32496 10.6248 6.66663V10.8333C10.6248 11.175 10.3415 11.4583 9.99984 11.4583C9.65817 11.4583 9.37484 11.175 9.37484 10.8333V6.66663ZM10.7665 13.65C10.7248 13.7583 10.6665 13.8416 10.5915 13.925C10.5082 14 10.4165 14.0583 10.3165 14.1C10.2165 14.1416 10.1082 14.1666 9.99984 14.1666C9.8915 14.1666 9.78317 14.1416 9.68317 14.1C9.58317 14.0583 9.4915 14 9.40817 13.925C9.33317 13.8416 9.27484 13.7583 9.23317 13.65C9.1915 13.55 9.1665 13.4416 9.1665 13.3333C9.1665 13.225 9.1915 13.1166 9.23317 13.0166C9.27484 12.9166 9.33317 12.825 9.40817 12.7416C9.4915 12.6666 9.58317 12.6083 9.68317 12.5666C9.88317 12.4833 10.1165 12.4833 10.3165 12.5666C10.4165 12.6083 10.5082 12.6666 10.5915 12.7416C10.6665 12.825 10.7248 12.9166 10.7665 13.0166C10.8082 13.1166 10.8332 13.225 10.8332 13.3333C10.8332 13.4416 10.8082 13.55 10.7665 13.65Z",fill:"#F04248"})}),Pn=({type:e="info",title:t,description:o,open:r,showCloseButton:a,bottomNode:n,sideNode:s,onClose:c,showIcon:m=!0})=>{let[l,p]=wn(r);Nn(()=>{p(r)},[r]);let u="",d="";switch(e){case"gray":u="#eeeef0",d="#79818c";break;case"info":u="#ebf5fd",d="#70B6F6";break;case"warning":u="#fff8df",d="#ffc700";break;case"success":u="#e0f9f0",d="#49e0aa";break;case"danger":u="#fde8e9",d="#f3777c";break;default:u="#eeeef0",d="#79818c";break}function g(){p(!1),c&&c()}return l?Oe("div",{className:"w-full shadow-lg transform flex items-center rounded-md",style:{background:u||"#ebf5fd"},children:[I("div",{className:"flex-none absolute rounded-l-[2px] rounded-l-4px h-[4px] w-full top-0",style:{background:d||"#70B6F6"}}),Oe("div",{className:"w-full gap-3 h-full flex flex-row justify-between px-4 md:px-4 py-3 md:py-4",children:[Oe("div",{className:"flex flex-row gap-2.5 items-start w-full h-full",children:[m&&I("div",{className:"h-full flex justify-end",children:I(Rn,{type:e})}),Oe("div",{className:"w-full gap-3 h-full flex flex-col md:flex-row items-start justify-between",children:[Oe("div",{className:"flex-1 gap-3 h-full flex flex-col items-start justify-between",children:[(t||o)&&Oe("div",{children:[t&&I("div",{className:"text-sm font-bold text-[#191919]",children:t}),o&&I("div",{className:"text-sm font-normal text-[#5D5D5D] mt-1",children:o})]}),n]}),s]})]}),a&&I("div",{className:"w-1/10 h-full flex flex-col justify-start items-center",children:I("button",{onClick:g,children:Oe("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[I("path",{d:"M3.3335 3.33337L12.6662 12.6661",stroke:"#191919",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),I("path",{d:"M3.33429 12.6661L12.667 3.33337",stroke:"#191919",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})]})})})]})]}):null};import{useState as kn}from"react";import{Copy as Dn,CheckIcon as Sn}from"lucide-react";import{motion as Tn,AnimatePresence as Fn}from"framer-motion";import{jsx as Ln}from"react/jsx-runtime";var ze=({children:e,mode:t="truncate",className:o,as:r="div",...a})=>Ln(r,{className:i({"text-ellipsis overflow-hidden whitespace-nowrap":t==="truncate","whitespace-normal break-words":t==="wrap","":t==="overflow"},o),target:a?.href?"_blank":void 0,...a,children:e});import{jsx as Ze,jsxs as Mn}from"react/jsx-runtime";var En=({text:e,textToCopy:t,onCopy:o,iconsPosition:r="right",clampText:a=!0,clampMode:n="truncate",isLink:s=!1,textClassName:c})=>{let[m,l]=kn(!1),p=()=>{navigator.clipboard.writeText(t??e).then(()=>{l(!0),o?.(),setTimeout(()=>l(!1),2e3)})},u=m?Sn:Dn;return Mn("div",{className:"flex items-center space-x-2 cursor-pointer text-[#717171] bg-gray-100 w-fit max-w-full rounded-md p-1 px-2",children:[r==="left"&&Ze(ar,{Icon:u,onClick:p,copied:m}),Ze(ze,{as:s?"a":"span",mode:a?n:"overflow",className:i({underline:s},c),href:s?e:void 0,children:e}),r==="right"&&Ze(ar,{Icon:u,onClick:p,copied:m})]})},ar=({Icon:e,onClick:t,copied:o})=>Ze(Fn,{mode:"wait",children:Ze(Tn.div,{initial:{opacity:0,scale:.8},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.8},transition:{duration:.2},onClick:t,children:Ze(e,{className:`w-5 h-5 ${o?"text-green-500":"text-gray-500 hover:text-gray-700 transition"}`})},o?"check":"copy")});import{useEffect as nr,useState as An}from"react";import{Search as In}from"lucide-react";import{jsx as ir}from"react/jsx-runtime";var jt=({value:e,onChange:t,debounce:o=500,addon:r,...a})=>{let[n,s]=An(e??""),c=m=>s(m.target.value);return nr(()=>{e&&s(e)},[e]),nr(()=>{let m=setTimeout(()=>{t(n)},o);return()=>clearTimeout(m)},[n,o,t]),ir(G,{leftNode:r??ir(In,{className:" w-4 h-4 text-gray-400"}),sideNodeClassName:"bg-transparent !pr-0 !w-4 border-0 !min-w-[40px]",...a,className:i("!pl-0 py-1 border-[.5px] border-[#E9EBF8] rounded-xl text-sm w-full h-8 focus:outline-none focus:placeholder:hidden focus:!ring-2 !focus:ring-primary-main bg-[#F5F8FF] focus-within:!bg-transparent placeholder:text-xs",a?.className),onChange:c,value:n})};import{useEffect as sr}from"react";import{X as Bn}from"lucide-react";import{jsx as be,jsxs as Ue}from"react/jsx-runtime";var Vn=e=>{let{environment:t,branch:o,version:r,deployTime:a,showBanner:n,onClose:s,initDefault:c,removeFromStorage:m,syncLocalStorageToState:l}=e,p=t||process.env.NEXT_PUBLIC_NODE_ENV;return p!=="staging"&&p!=="sandbox"||(sr(()=>{l()},[l]),sr(()=>{let u;return(p==="staging"||p==="sandbox")&&(u=setInterval(()=>{m(),c()},300*1e3)),()=>{u&&clearInterval(u)}},[n,t,s,m,c,p]),!n)?null:Ue("div",{className:"w-fit p-4 border shadow-md bg-white rounded-md z-[99999] absolute top-2 right-2 min-w-96",children:[be("button",{onClick:s,className:"absolute top-2 right-2",children:be(Bn,{})}),Ue("div",{className:"space-y-2 text-sm",children:[Ue("div",{className:"flex gap-2",children:[be("span",{className:"font-medium",children:"Environment:"}),be("span",{className:"text-blue-600 capitalize",children:p})]}),Ue("div",{className:"flex gap-2",children:[be("span",{className:"font-medium",children:"Branch:"}),be("span",{className:"text-green-600 capitalize",children:o||process.env.NEXT_PUBLIC_DEPLOY_BRANCH})]}),Ue("div",{className:"flex gap-2",children:[be("span",{className:"font-medium",children:"Version:"}),be("span",{className:"text-purple-600",children:r||process.env.NEXT_PUBLIC_DEPLOY_VERSION})]}),Ue("div",{className:"flex gap-2",children:[be("span",{className:"font-medium",children:"Deploy Time:"}),be("span",{className:"text-orange-600",children:a||process.env.NEXT_PUBLIC_DEPLOY_TIME})]})]})]})};import*as dt from"react";import{Drawer as re}from"vaul";import{cva as Gn}from"class-variance-authority";import{jsx as lr,jsxs as On}from"react/jsx-runtime";var cr=()=>On("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"lucide lucide-x",children:[lr("path",{d:"M18 6 6 18"}),lr("path",{d:"m6 6 12 12"})]});import{useState as Hn,useEffect as _n}from"react";function dr(){let[e,t]=Hn({width:100,height:100});return _n(()=>{function o(){t({width:window.innerWidth,height:window.innerHeight})}return window.addEventListener("resize",o),o(),()=>window.removeEventListener("resize",o)},[]),e}import{Fragment as Kn,jsx as W,jsxs as Ke}from"react/jsx-runtime";var Xt=({shouldScaleBackground:e=!1,...t})=>W(re.Root,{direction:"right",shouldScaleBackground:e,...t});Xt.displayName="Drawer";var Wn=re.Trigger,$n=re.Close,zn=re.Portal,pr=dt.forwardRef(({className:e,...t},o)=>W(re.Overlay,{className:i("fixed inset-0 z-40 bg-black/75 !m-0 !p-0 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t,ref:o}));pr.displayName=re.Overlay.displayName;var Zn=Gn("fixed focus-visible:outline-0 z-50 gap-4 bg-white shadow-lg dark:bg-[#2B2B2B] dark:text-white transition ease-in-out data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:duration-300 data-[state=open]:duration-500 dark:border-none !select-text",{variants:{side:{top:"inset-x-0 top-0 border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top rounded-b-lg",bottom:"inset-x-0 bottom-0 border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom rounded-t-lg",left:"inset-y-0 left-0 h-full w-3/4 border-r data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-[512px] ",right:"inset-y-0 right-0 h-full w-3/4 border-l data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-[512px]"}},defaultVariants:{side:"right"}}),mr=dt.forwardRef(({side:e="right",hideCloseButton:t,className:o,children:r,id:a,...n},s)=>Ke(zn,{children:[W(pr,{}),Ke(re.Content,{ref:s,className:i(Zn({side:e}),o),...n,children:[W("button",{className:"bg-gray-300 block md:!hidden mx-auto mt-4 md:!mt-0 h-1.5 w-[80px] rounded-full opacity-70 transition-opacity hover:opacity-100 relative"}),r,!t&&Ke(re.Close,{id:`${a}-close-button`,className:"absolute right-2 top-3 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-secondary",children:[W(cr,{}),W("span",{className:"sr-only",children:"Close"})]})]})]}));mr.displayName=re.Content.displayName;var ur=({className:e,...t})=>W("div",{className:i("text-lg flex flex-col border-b border-b-gray-200 space-y-1 text-left w-full p-3",e),...t});ur.displayName="DrawerHeader";var fr=({className:e,...t})=>W("div",{className:i("flex flex-col-reverse sm:flex-row m-auto right-0 left-0 p-3 sm:space-x-2 border-t border-t-[#EDEDED] dark:border-t-[#242424] w-full",e),...t});fr.displayName="DrawerFooter";var gr=dt.forwardRef(({className:e,...t},o)=>W(re.Title,{ref:o,className:i("text-xl font-semibold text-[#191919] dark:text-white",e),...t}));gr.displayName=re.Title.displayName;var br=dt.forwardRef(({className:e,...t},o)=>W(re.Description,{ref:o,className:i("text-xs text-[#5d5c5c] dark:text-white",e),...t}));br.displayName=re.Description.displayName;var Un=({trigger:e=void 0,children:t,open:o=void 0,onOpenChange:r=void 0,hideCloseButton:a,footer:n,title:s,description:c,contentClassName:m,headerClassName:l,titleClassName:p,descriptionClassName:u,footerClassName:d,asChild:g=!0,onOpenAutoFocus:N,drawerContentClassName:y,onCloseAutoFocus:v,id:f="drawer",modal:R=!0})=>{let{width:x}=dr(),h=x<768?"bottom":"right";return Ke(Xt,{modal:R,...o!==void 0?{open:o,onOpenChange:r}:{},direction:h,children:[W(Wn,{className:"cursor-pointer",asChild:g,id:`${f}-open-trigger`,children:e}),Ke(mr,{className:i("flex flex-col gap-0 justify-start items-start md:max-h-full w-full !max-w-md max-md:!max-w-full max-md:!rounded-none",m),side:"right",hideCloseButton:a,onOpenAutoFocus:N,onCloseAutoFocus:v,id:`${f}-content`,children:[s||c?Ke(ur,{className:l,id:`${f}-header`,children:[s&&W(gr,{className:p,id:`${f}-title`,children:s}),c&&W(br,{id:`${f}-description`,className:u,children:c})]}):W(Kn,{}),W("div",{"data-vaul-no-drag":!0,className:i("flex w-full overflow-y-auto overscroll-auto flex-col justify-start items-start p-4 flex-1 min-h-0",y),children:t}),n&&W(fr,{className:d,children:n})]})]})};import{jsx as vr}from"react/jsx-runtime";var hr=()=>vr("svg",{stroke:"currentColor",fill:"currentColor",strokeWidth:"0",viewBox:"0 0 20 20","aria-hidden":"true",className:"h-5 w-5",height:"1em",width:"1em",xmlns:"http://www.w3.org/2000/svg",children:vr("path",{fillRule:"evenodd",d:"M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z",clipRule:"evenodd"})});import{jsx as pt,jsxs as jn}from"react/jsx-runtime";var yr=e=>jn("svg",{viewBox:"0 0 60 30",className:"w-full max-w-md h-auto","aria-label":"Union Jack - Flag of the United Kingdom",...e,children:[pt("rect",{width:"60",height:"30",fill:"#00247D"}),pt("path",{d:"M0,0 L60,30 M60,0 L0,30",stroke:"#FFFFFF",strokeWidth:"6"}),pt("path",{d:"M0,0 L60,30 M60,0 L0,30",stroke:"#CF142B",strokeWidth:"4"}),pt("path",{d:"M30,0 L30,30 M0,15 L60,15",stroke:"#FFFFFF",strokeWidth:"10"}),pt("path",{d:"M30,0 L30,30 M0,15 L60,15",stroke:"#CF142B",strokeWidth:"6"})]});import{jsx as Yt,jsxs as Xn}from"react/jsx-runtime";var xr=e=>Xn("svg",{viewBox:"0 0 60 40",className:"w-full max-w-md h-auto","aria-label":"Tricolore - Flag of France",...e,children:[Yt("rect",{x:"0",y:"0",width:"20",height:"40",fill:"#002395"}),Yt("rect",{x:"20",y:"0",width:"20",height:"40",fill:"#FFFFFF"}),Yt("rect",{x:"40",y:"0",width:"20",height:"40",fill:"#ED2939"})]});import{jsx as Cr,jsxs as Yn}from"react/jsx-runtime";var wr=()=>Yn("svg",{width:"20",height:"18",viewBox:"0 0 8 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[Cr("path",{d:"M5.50257 12.9395L3.68439 14.7576L1.86621 12.9395",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),Cr("path",{d:"M5.50257 5.06055L3.68439 3.24237L1.86621 5.06055",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"})]});import{PopoverClose as qn}from"@radix-ui/react-popover";import{jsx as ae,jsxs as qt}from"react/jsx-runtime";var Jn=[{key:"en",label:"English"},{key:"fr",label:"French"}],Qn=({locale:e})=>e==="fr"?ae(xr,{width:10}):ae(yr,{width:10}),ei=({locale:e})=>ae("div",{className:"px-2 py-1 ",children:qt("div",{className:"flex items-center gap-2.5",children:[ae(Qn,{locale:e})," ",ae("span",{className:"uppercase",children:e}),ae(wr,{})]})}),ti=({locale:e="en",onChange:t,locales:o=Jn})=>qt(K,{children:[ae("div",{className:"flex items-center gap-2 px-2 py-1 rounded-lg shadow border-[0.5px] border-gray-50/50 text-current bg-white/10 ",children:ae(H,{className:"!p-0 !bg-transparent ",id:"locale_select_dropdown",children:ae(ei,{locale:e})})}),ae(z,{side:"bottom",className:"p-0 max-w-max rounded-md overflow-hidden mx-auto mt-2",children:ae("div",{children:o?.map(r=>qt(qn,{type:"button",id:`locale_option_${r?.key}`,className:i("flex items-center gap-3 px-3 py-1 text-sm hover:bg-blue-50 w-full transition-all",{"bg-blue-100":e&&e===r?.key}),onClick:()=>t?.(r?.key),children:[ae("span",{children:r?.label})," ",e&&e===r?.key&&ae(hr,{})]},r?.key))})})]});import{X as Di}from"lucide-react";import{useMemo as Hr,useRef as Si,useState as Ti}from"react";import{AnimatePresence as oi,motion as ri}from"framer-motion";import{useMemo as ai,useState as ni}from"react";import{HiCheck as ii}from"react-icons/hi";import{FiLogOut as si}from"react-icons/fi";import{BsPlus as li}from"react-icons/bs";import{jsx as Jt,jsxs as Qt}from"react/jsx-runtime";var mt=({activeBusiness:e,onTriggerClick:t,iconOnly:o=!1,className:r,rightNode:a})=>Qt("div",{id:"sidemenu_business_bar",role:"button",onClick:t||void 0,className:i("relative flex w-full items-center rounded-lg text-black bg-white",{"border-[.5px] border-[#E9EBF8] py-1 px-2":!o,"hover:bg-primary-accent transition-all duration-150 cursor-pointer ":!!t},r),children:[Jt("section",{className:i("flex items-center justify-center bg-[#E9EBF8] text-primary-main rounded-md mr-3 text-xl font-medium",{"w-10 h-10":!o,"w-full h-10 mr-0":o}),children:e?.name?.charAt(0)||"M"}),!o&&Qt("section",{className:"flex-1 flex justify-between items-center relative text-black w-full -space-y-1 tracking-wide",children:[Qt("div",{className:"flex-1 min-w-0 max-w-[150px] w-full",children:[Jt(ze,{as:"h2",className:"text-base capitalize font-medium",children:e?.name}),Jt(ze,{as:"p",className:"text-sm text-[#A5A5A5]",onClick:void 0,children:e?.email})]}),a]})]});import{ChevronUp as ci}from"lucide-react";import{jsx as Nr}from"react/jsx-runtime";var Rr=e=>Nr("svg",{width:"9",height:"8",viewBox:"0 0 9 8",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:Nr("circle",{cx:"4.5",cy:"4",r:"4",fill:"#62C554"})});import{jsx as j,jsxs as eo}from"react/jsx-runtime";var di={hidden:{y:"-12px",opacity:0},visible:{y:"0",opacity:1,transition:{type:"spring",damping:25,stiffness:500}},exit:{y:"-12px",opacity:0,transition:{type:"spring",damping:25,stiffness:500}}},Pr=({activeBusiness:e,toggleAddBusinessDrawer:t,businesses:o=[],handleSwitchBusiness:r,onLogoutClick:a,onToggleSideBar:n,toggleShowBusiness:s,isMobile:c,collapseType:m})=>{let[l,p]=ni(""),u=ai(()=>{let f=l.toLowerCase();return(o||[]).filter(R=>R.name?.toLowerCase().startsWith(f))},[o,l]),d=m==="hidden"||c,g=f=>p(f.target.value),N=f=>{r(f||""),d&&n(!1),p("")},y=()=>{t(),s(!1),d&&n(!1),p("")},v=()=>{a?.(),s(!1),d&&n(!1),p("")};return j(oi,{initial:!1,children:j(ri.div,{initial:"hidden",animate:"visible",exit:"exit",variants:di,children:eo("div",{className:"w-72 bg-white border-x border-t rounded-xl overflow-hidden p-3",style:{boxShadow:`
1
+ "use client";var Sa=Object.defineProperty;var Ta=(e,t,o)=>t in e?Sa(e,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[t]=o;var Co=(e,t,o)=>Ta(e,typeof t!="symbol"?t+"":t,o);import*as No from"react";import*as q from"@radix-ui/react-tooltip";import{clsx as Fa}from"clsx";import{twMerge as Ea}from"tailwind-merge";function i(...e){return Ea(Fa(e))}import{jsx as Ge,jsxs as wo}from"react/jsx-runtime";var Ro=q.Provider,Po=q.Root,Lo=q.Trigger,Ot=No.forwardRef(({className:e,sideOffset:t=2,...o},r)=>Ge(q.Portal,{children:Ge(q.Content,{ref:r,sideOffset:t,className:i("z-50 rounded-md border border-transparent bg-gray-50 px-3 py-1.5 text-base font-semibold text-bold text-black/40 shadow-xl- animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 [box-shadow:3px_4px_11px_0px_#0000001A,13px_16px_21px_0px_#00000017,29px_36px_28px_0px_#0000000D,52px_65px_33px_0px_#00000003,82px_101px_36px_0px_#00000000]",e),...o,children:o.children})}));Ot.displayName=q.Content.displayName;var yt=({trigger:e,children:t,contentClassName:o,triggerClassName:r,asChild:a=!0,side:n,sideOffset:s,align:c,alignOffset:m,delayDuration:l=100,hasArrow:p=!0,arrowClassName:u,...d})=>Ge(Ro,{children:Ge(Po,{delayDuration:l,...d,children:wo("div",{className:"flex justify-center items-center",children:[Ge(Lo,{asChild:a,className:r,children:e}),wo(Ot,{side:n,sideOffset:s,align:c,alignOffset:m,className:o,children:[t,p&&Ge(q.Arrow,{className:i("fill-white",u)})]})]})})});yt.displayName="Tooltip";import Ba from"react";import*as ko from"react";import*as Ht from"@radix-ui/react-label";import{cva as Ma}from"class-variance-authority";import{jsx as Ia}from"react/jsx-runtime";var Aa=Ma("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),_t=ko.forwardRef(({className:e,...t},o)=>Ia(Ht.Root,{ref:o,className:i(Aa(),e),...t}));_t.displayName=Ht.Root.displayName;import{jsx as Do,jsxs as Va}from"react/jsx-runtime";var A=Ba.forwardRef(({className:e,children:t,showAsterisk:o,error:r,...a},n)=>Do(_t,{ref:n,className:i(r&&"text-red-500",e),...a,children:o?Va("p",{children:[t,Do("span",{className:"text-red-500",children:"*"})]}):t}));A.displayName="FormLabel";import{jsx as So,jsxs as Oa}from"react/jsx-runtime";var pe=({size:e=16,colour:t="primary"})=>Oa("svg",{className:"animate-spin",width:e,height:e,viewBox:"0 0 20 20",fill:"none",children:[So("circle",{cx:"10",cy:"10",r:"9.25",stroke:"transparent",strokeWidth:"1.5"}),So("path",{d:"M10 0.595792C10 0.266746 10.267 -0.00185055 10.5954 0.0177417C11.9786 0.100242 13.3318 0.469461 14.5682 1.1044C15.9816 1.83021 17.2016 2.88235 18.1273 4.17366C19.0531 5.46496 19.6578 6.95826 19.8913 8.52984C20.1249 10.1014 19.9807 11.706 19.4705 13.2108C18.9604 14.7155 18.0991 16.077 16.9579 17.1825C15.8167 18.288 14.4285 19.1056 12.9084 19.5677C11.3882 20.0298 9.77982 20.123 8.21646 19.8397C6.84883 19.5918 5.55009 19.0619 4.40196 18.2863C4.12931 18.1021 4.08072 17.7265 4.28083 17.4653C4.48094 17.2041 4.85388 17.1564 5.12801 17.3384C6.12474 18.0001 7.24768 18.4531 8.42898 18.6672C9.80606 18.9168 11.2228 18.8347 12.5618 18.4276C13.9008 18.0206 15.1236 17.3004 16.1288 16.3266C17.134 15.3528 17.8927 14.1536 18.342 12.8282C18.7914 11.5027 18.9185 10.0893 18.7127 8.70502C18.507 7.32071 17.9743 6.00535 17.1589 4.86792C16.3435 3.73048 15.2688 2.80371 14.0238 2.16439C12.9559 1.61596 11.789 1.29259 10.5954 1.21173C10.2671 1.18949 10 0.92484 10 0.595792Z",fill:t==="primary"?"#ffffff":"currentColor",className:"rounded"})]});import*as To from"react";import{Slot as Ha}from"@radix-ui/react-slot";import{cva as _a}from"class-variance-authority";import{Fragment as Ga,jsx as Ie,jsxs as Wa}from"react/jsx-runtime";var J=_a("overflow-hidden isolate inline-flex h-fit items-center justify-center whitespace-nowrap text-sm font-medium ring-offset-background dark:ring-offset-transparent transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:!pointer-events-none",{variants:{variant:{primary:"border-primary-main bg-primary-main hover:bg-primary-main/70 disabled:bg-primary-main/70 text-white font-bold",danger:"border-red-600 bg-red-600 hover:bg-red-600/70 disabled:bg-red-600/70 text-white font-bold",neutral:"!border-0 bg-transparent text-primary-main hover:opacity-80 disabled:opacity-60",outlined:"border border-primary-main text-primary-main hover:opacity-80 disabled:opacity-60","danger-outlined":"border border-red-600 text-red-600 hover:opacity-80 disabled:opacity-60","light-outlined":"border-white text-white hover:opacity-80 disabled:opacity-60","dark-text":"border-transparent bg-transparent hover:bg-opacity-70 disabled:bg-opacity-70 text-black font-medium",light:"border-white bg-white hover:bg-opacity-70 disabled:bg-opacity-70 text-primary-main font-semibold"},size:{default:"py-[0.625rem] px-[1.5rem] text-[0.875rem] leading-[1.25rem] font-medium rounded-lg",sm:"py-[0.375rem] px-[1rem] leading-[1rem] font-normal text-sm rounded-lg",lg:"py-[0.75rem] px-[1.5rem] text-[1rem] leading-[1.5rem] font-medium rounded-lg",md:"py-[0.625rem] px-[1.5rem] text-[0.875rem] leading-[1.25rem] font-medium rounded-lg","icon-sm":"h-[1.75rem] w-[1.75rem] flex justify-center items-center font-medium rounded-lg",icon:"h-[2.5rem] w-[2.75rem] flex justify-center items-center font-medium rounded-lg","icon-lg":"h-[3rem] w-[3rem] flex justify-center items-center font-medium rounded-lg"}},defaultVariants:{variant:"primary",size:"default"}}),Q=To.forwardRef(({className:e,variant:t="primary",size:o,asChild:r=!1,isLoading:a=!1,leftNode:n,rightNode:s,LoaderSize:c,children:m,disabled:l,...p},u)=>Ie(r?Ha:"button",{className:i(J({variant:t,size:o,className:e})),ref:u,disabled:l||a,...p,children:Ie("div",{className:"flex font-medium justify-center items-center gap-2 pointer-events-none",children:a?Ie("span",{className:"mx-auto",children:Ie(pe,{size:c,colour:"secondary"})}):Wa(Ga,{children:[n&&Ie("span",{children:n}),m&&Ie("span",{children:m}),s&&Ie("span",{children:s})]})})}));Q.displayName="Button";import*as Gt from"react";import{cva as Wt}from"class-variance-authority";import $a from"react";import{jsx as za}from"react/jsx-runtime";var ee=$a.forwardRef(({className:e,children:t,error:o,...r},a)=>{let n=o??t;return n?za("p",{ref:a,className:i("text-xs font-normal text-[#F04248]",e),...r,children:n}):null});ee.displayName="ErrorMessage";import Za from"react";import{jsx as Ua}from"react/jsx-runtime";var me=Za.forwardRef(({className:e,...t},o)=>Ua("div",{ref:o,className:i("text-sm text-[#8E98A8",e),...t}));me.displayName="FormDescription";import{jsx as Be,jsxs as Eo}from"react/jsx-runtime";var Ka=Wt("!p-0 flex h-full w-full !border-transparent !bg-transparent text-base focus-visible:bg-transparent focus-visible:outline-none focus-visible:ring-0 focus-visible:ring-offset-0 disabled:cursor-not-allowed disabled:opacity-50",{variants:{status:{default:"placeholder:text-[#C4C4C4] dark:placeholder:text-[#9299A2]",error:"placeholder:text-red-500 text-red-500",loading:"placeholder:text-[#C4C4C4] dark:placeholder:text-[#9299A2]",prefilled:"",neutral:""}},defaultVariants:{status:"default"}}),Mo=Gt.forwardRef(({className:e,status:t,type:o,...r},a)=>Be("input",{type:o,className:i(Ka({status:t}),e),ref:a,...r}));Mo.displayName="BaseInnerInput";var $=Wt("flex relative h-10 w-full rounded-[4px] dark:!bg-transparent border transition px-3 py-2 text-base placeholder:text-[#79818C] focus-within:outline-0 focus-within:ring-0 focus-visible:ring-offset-0 disabled:cursor-not-allowed disabled:opacity-50 dark:disabled:!border-[#9299A2]",{variants:{status:{default:"border-[#DEDEDE] bg-white text-[#191919] dark:!bg-transparent caret-text-primary focus-within:bg-white dark:focus-within:!bg-transparent dark:text-white focus-within:border-primary-main dark:focus-within:border-[#9299A2] dark:disabled:!border-[#9299A2]",error:"placeholder:text-red-500 bg-red-50 border-red-500 dark:!bg-status-error-bg-dark text-red-500 focus-within:bg-red-50 focus-within:border-red-500",loading:"",prefilled:"bg-[#F6F6F6] border-[#DEDEDE] dark:!bg-transparent caret-[#DEDEDE] focus-within:bg-[#F6F6F6] focus-within:border-[#DEDEDE] dark:!border-[#9299A2] dark:focus-within:border-[#9299A2]",neutral:"bg-[#F6F6F6] border-[#DEDEDE] dark:!bg-transparent caret-[#DEDEDE] focus-within:bg-[#F6F6F6] focus-within:border-[#DEDEDE] dark:!border-[#9299A2] dark:focus-within:border-[#9299A2]"}},defaultVariants:{status:"default"}}),Fo=Wt("top-0 flex justify-center items-center h-full min-w-[50px] max-w-[100px] dark:!bg-transparent transition px-3 py-2 text-base placeholder:text-[#79818C] focus-within:outline-0 focus-within:ring-0 focus-visible:ring-offset-0 disabled:cursor-not-allowed disabled:opacity-50 dark:disabled:!border-[#9299A2]",{variants:{side:{left:"left-0 rounded-l-[8px] border-r",right:"right-0 rounded-r-[8px] border-l"},status:{default:"border-[#DEDEDE] bg-white text-[#191919] dark:!bg-transparent caret-primary-main focus-within:bg-white dark:focus-within:!bg-transparent dark:text-white focus-within:border-primary-main dark:focus-within:border-[#9299A2] dark:disabled:!border-[#9299A2]",error:"placeholder:text-red-500 bg-red-50 border-red-500 dark:!bg-red-50 text-red-500 focus-within:bg-red-50 focus-within:border-red-500",loading:"",prefilled:"bg-[#F6F6F6] border-[#DEDEDE] dark:!bg-transparent caret-[#DEDEDE] focus-within:bg-[#F6F6F6] focus-within:border-[#DEDEDE] dark:!border-[#9299A2] dark:focus-within:border-[#9299A2]",neutral:"bg-transparent border-0 caret-[#DEDEDE] !px-0"}},defaultVariants:{status:"default",side:"left"}}),G=Gt.forwardRef(({className:e,status:t="default",disabled:o,error:r,isLoading:a,sideNodeClassName:n,showAsterisk:s,label:c,description:m,...l},p)=>{let u=t;return r&&(u="error"),a&&(u="loading"),o&&(u="prefilled"),Eo("div",{className:"relative space-y-1 w-full",children:[c&&Be(A,{showAsterisk:s,error:r,children:c}),Eo("div",{className:i($({status:u}),l.leftNode?"pl-0":"",l.rightNode?"pr-0":"",e),children:[l.leftNode?Be("div",{className:i(Fo({status:u,side:"left"}),n),children:l.leftNode}):null,Be(Mo,{ref:p,disabled:a||o,className:i({"!pl-3":l.leftNode&&t!=="neutral","!pr-3":l.rightNode&&t!=="neutral","sentry-mask":!!l?.isContentSensitive}),...l}),l.rightNode?Be("div",{className:i(Fo({status:u,side:"right"}),n),children:l.rightNode}):null]}),m&&Be(me,{className:"text-gray-400 text-sm !font-normal",children:m}),Be(ee,{error:r})]})});G.displayName="Input";import{useMemo as Ya,useState as Wo}from"react";import{jsx as Ao}from"react/jsx-runtime";var Io=()=>Ao("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:Ao("path",{d:"M8.89802 2.93408L9.70202 3.49808L6.21602 8.52608H5.41202L3.46802 5.80208L4.27202 5.05208L5.81402 6.49208L8.89802 2.93408Z",fill:"currentColor"})});import{jsx as Bo,jsxs as ja}from"react/jsx-runtime";var Vo=()=>ja("svg",{width:"18",height:"14",viewBox:"0 0 18 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[Bo("path",{d:"M1.54639 7.26103C1.48389 7.09264 1.48389 6.90741 1.54639 6.73903C2.15517 5.26292 3.18853 4.00081 4.51547 3.1127C5.84241 2.22459 7.40317 1.75049 8.99989 1.75049C10.5966 1.75049 12.1574 2.22459 13.4843 3.1127C14.8113 4.00081 15.8446 5.26292 16.4534 6.73903C16.5159 6.90741 16.5159 7.09264 16.4534 7.26103C15.8446 8.73713 14.8113 9.99925 13.4843 10.8874C12.1574 11.7755 10.5966 12.2496 8.99989 12.2496C7.40317 12.2496 5.84241 11.7755 4.51547 10.8874C3.18853 9.99925 2.15517 8.73713 1.54639 7.26103Z",stroke:"#8E98A8",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),Bo("path",{d:"M9 9.25C10.2426 9.25 11.25 8.24264 11.25 7C11.25 5.75736 10.2426 4.75 9 4.75C7.75736 4.75 6.75 5.75736 6.75 7C6.75 8.24264 7.75736 9.25 9 9.25Z",stroke:"#8E98A8",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})]});import{jsx as Oo,jsxs as Xa}from"react/jsx-runtime";var Ho=()=>Xa("svg",{width:"18",height:"18",viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[Oo("path",{d:"M4.08759 12.69C3.26171 11.9072 2.61006 10.9591 2.17509 9.90752C2.10081 9.73454 2.0625 9.54826 2.0625 9.36001C2.0625 9.17177 2.10081 8.98549 2.17509 8.81252C2.75274 7.4073 3.72095 6.19704 4.96509 5.32502C6.14597 4.4998 7.55989 4.07405 9.00009 4.11002C10.0363 4.084 11.064 4.30239 12.0001 4.74752M13.9201 6.03752C14.7415 6.81964 15.3904 7.76486 15.8251 8.81252C15.8994 8.98549 15.9377 9.17177 15.9377 9.36001C15.9377 9.54826 15.8994 9.73454 15.8251 9.90752C15.2474 11.3127 14.2792 12.523 13.0351 13.395C11.8542 14.2202 10.4403 14.646 9.00009 14.61C7.9639 14.636 6.93616 14.4176 6.00009 13.9725",stroke:"#8E98A8",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),Oo("path",{d:"M6.5325 10.2375C6.42732 9.95694 6.37395 9.65962 6.375 9.36C6.375 8.66381 6.65156 7.99613 7.14384 7.50384C7.63613 7.01156 8.30381 6.735 9 6.735C9.3 6.7335 9.597 6.7875 9.8775 6.8925M11.4675 8.4825C11.5725 8.763 11.6265 9.06 11.625 9.36C11.625 10.0562 11.3484 10.7239 10.8562 11.2162C10.3639 11.7084 9.69619 11.985 9 11.985C8.70038 11.986 8.40306 11.9327 8.1225 11.8275M2.25 15L14.25 3",stroke:"#8E98A8",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})]});import{jsx as _o}from"react/jsx-runtime";var Go=()=>_o("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:_o("path",{d:"M3.37891 8.62142L6.00041 5.99992L8.62191 8.62142M8.62191 3.37842L5.99991 5.99992L3.37891 3.37842",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})});import{jsx as fe,jsxs as qa}from"react/jsx-runtime";var $o=[{label:"Uppercase",key:"uppercase",RegExp:/[A-Z]/,validated:!1},{label:"Lowercase",key:"lowercase",RegExp:/[a-z]/,validated:!1},{label:"Number",key:"number",RegExp:/\d/,validated:!1},{label:"12 Characters",key:"twelve-chars",RegExp:/.{12}/,validated:!1}],zo=({onValidate:e,onChange:t,disableValidation:o,...r})=>{let[a,n]=Wo(!1),[s,c]=Wo($o),m=d=>$o.map(f=>({...f,validated:f.RegExp.test(d)})),l=d=>{let f=m(d),N=f.every(y=>y.validated);return c(f),N},p=d=>{if(t&&t(d),o)return;let f=d?.target?.value,N=l(f);e&&e(N,f)},u=Ya(()=>fe("div",{className:"flex items-center gap-2",children:s?.map(d=>qa("div",{className:i("text-xs flex items-center gap-0.5",{"text-[#62C554]":d?.validated,"text-[#8E98A8]":!d?.validated}),children:[fe("span",{className:"",children:d?.validated?fe(Io,{}):fe(Go,{})}),fe("span",{className:"",children:d?.label})]},d?.key))}),[s]);return fe(G,{sideNodeClassName:"!border-l-0",rightNode:a?fe("button",{type:"button",onClick:()=>n(d=>!d),children:fe(Vo,{})}):fe("button",{type:"button",onClick:()=>n(d=>!d),children:fe(Ho,{})}),type:a?"text":"password",onChange:p,description:!o&&u,isContentSensitive:!0,...r})};zo.displayName="PasswordInput";import{cva as Ja}from"class-variance-authority";import{jsx as xt,jsxs as Qa}from"react/jsx-runtime";var i1=Ja("flex relative min-h-[80px] w-full rounded-[8px] border transition px-3 py-2 text-base placeholder:text-[#79818C] focus-within:outline-0 focus-within:ring-0 focus-visible:ring-offset-0 disabled:cursor-not-allowed disabled:opacity-50",{variants:{status:{default:"border-[#D7D7D7] dark:border-[#676767] bg-white text-[#191919] dark:!bg-transparent caret-primary-main focus-within:bg-white dark:focus-within:!bg-transparent dark:text-white focus-within:border-primary-main dark:focus-within:border-[#9299A2] dark:border-[#9299A2] dark:disabled:!border-[#9299A2]",error:"placeholder:text-status-error-fill bg-status-error-bg border-status-error-fill dark:!bg-status-error-bg-dark text-status-error-fill focus-within:bg-status-error-bg focus-within:border-status-error-fill",loading:"placeholder:text-[#C4C4C4]",prefilled:"resize-none bg-[#F6F6F6] border-[#D7D7D7] dark:!bg-transparent caret-[#D7D7D7] focus-within:bg-[#F6F6F6] focus-within:border-[#D7D7D7] dark:!border-[#9299A2] dark:focus-within:border-[#9299A2]",neutral:""}},defaultVariants:{status:"default"}}),Zo=({className:e,status:t="default",disabled:o,error:r,isLoading:a,showAsterisk:n,label:s,description:c,...m})=>{let l=t;return r&&(l="error"),a&&(l="loading"),o&&(l="prefilled"),Qa("div",{className:"relative space-y-1",children:[xt(A,{showAsterisk:n,error:r,children:s}),xt("textarea",{className:i("min-h-[80px]",$({status:l}),e),disabled:a||o,...m}),xt(me,{className:"text-gray-400 text-sm !font-normal",children:c}),xt(ee,{error:r})]})};Zo.displayName="Textarea";import*as Ve from"react";import*as ke from"react";import{Command as U}from"cmdk";import{Search as nn}from"lucide-react";import*as Le from"react";import*as E from"@radix-ui/react-dialog";import{jsx as Uo,jsxs as en}from"react/jsx-runtime";var Ko=()=>en("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"lucide lucide-x",children:[Uo("path",{d:"M18 6 6 18"}),Uo("path",{d:"m6 6 12 12"})]});import{Fragment as an,jsx as te,jsxs as We}from"react/jsx-runtime";var tn=E.Root,on=E.Trigger,rn=E.Portal,jo=Le.forwardRef(({className:e,...t},o)=>te(E.Overlay,{ref:o,className:i("fixed inset-0 z-50 bg-black/60 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t}));jo.displayName=E.Overlay.displayName;var $t=Le.forwardRef(({className:e,hideCloseButton:t,children:o,...r},a)=>We(rn,{children:[te(jo,{}),We(E.Content,{ref:a,className:i("fixed left-[50%] top-[50%] z-50 grid sm:w-full w-[95%] max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border border-transparent bg-white p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] rounded-lg max-h-[95%] overflow-y-auto",e),...r,children:[o,!t&&We(E.Close,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground",children:[te(Ko,{}),te("span",{className:"sr-only",children:"Close"})]})]})]}));$t.displayName=E.Content.displayName;var Xo=({className:e,...t})=>te("div",{className:i("flex flex-col space-y-1.5 text-left",e),...t});Xo.displayName="DialogHeader";var Yo=({className:e,...t})=>te("div",{className:i("flex flex-row justify-end sm:space-x-2",e),...t});Yo.displayName="DialogFooter";var qo=Le.forwardRef(({className:e,...t},o)=>te(E.Title,{ref:o,className:i("text-xl font-semibold leading-none tracking-tight",e),...t}));qo.displayName=E.Title.displayName;var Jo=Le.forwardRef(({className:e,...t},o)=>te(E.Description,{ref:o,className:i("text-sm text-gray-500",e),...t}));Jo.displayName=E.Description.displayName;var zt=({trigger:e=void 0,children:t,open:o,onOpenChange:r,hideCloseButton:a,footer:n,title:s,description:c,contentClassName:m,headerClassName:l,titleClassName:p,descriptionClassName:u,footerClassName:d,asChild:f=!0,onOpenAutoFocus:N,onCloseAutoFocus:y,onEscapeKeyDown:v,onInteractOutside:g,onPointerDownOutside:R,closeOnOutsideClick:x=!0,...b})=>{let h=Le.useCallback(w=>{x||w.preventDefault(),R?.(w)},[x,R]),C=Le.useCallback(w=>{x||w.preventDefault(),g?.(w)},[x,g]);return We(tn,{...b,...o!==void 0?{open:o,onOpenChange:r}:{},children:[te(on,{asChild:f,children:e}),We($t,{className:m,hideCloseButton:a,onOpenAutoFocus:N,onCloseAutoFocus:y,onEscapeKeyDown:v,onPointerDownOutside:h,onInteractOutside:C,children:[s||c?We(Xo,{className:l,children:[s&&te(qo,{className:p,children:s}),c&&te(Jo,{className:u,children:c})]}):te(an,{}),t,n&&te(Yo,{className:d,children:n})]})]})};zt.displayName=E.Dialog.displayName;import{Fragment as C1,jsx as ge,jsxs as cn}from"react/jsx-runtime";var Qe=ke.forwardRef(({className:e,...t},o)=>ge(U,{ref:o,className:i("flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground",e),...t}));Qe.displayName=U.displayName;var et=ke.forwardRef(({className:e,CommandInputContainerClassName:t,loading:o,...r},a)=>cn("div",{className:i("flex items-center border-0 px-3 gap-2",t),"cmdk-input-wrapper":"",children:[o?ge(pe,{size:16,colour:"secondary"}):ge(nn,{className:"mr-2 h-4 w-4 shrink-0 opacity-50"}),ge(U.Input,{ref:a,className:i("flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50",e),disabled:o,...r})]}));et.displayName=U.Input.displayName;var tt=ke.forwardRef(({className:e,...t},o)=>ge(U.List,{ref:o,className:i("overflow-y-auto overflow-x-hidden",e),...t}));tt.displayName=U.List.displayName;var ot=ke.forwardRef((e,t)=>ge(U.Empty,{ref:t,className:"py-6 text-center text-sm",...e}));ot.displayName=U.Empty.displayName;var rt=ke.forwardRef(({className:e,...t},o)=>ge(U.Group,{ref:o,className:i("overflow-hidden p-1 text-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground",e),...t}));rt.displayName=U.Group.displayName;var sn=ke.forwardRef(({className:e,...t},o)=>ge(U.Separator,{ref:o,className:i("-mx-1 h-px bg-border",e),...t}));sn.displayName=U.Separator.displayName;var at=ke.forwardRef(({className:e,...t},o)=>ge(U.Item,{ref:o,className:i("relative text=[#222222] flex cursor-default gap-2 select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none data-[disabled=true]:pointer-events-none data-[selected=true]:bg-primary-accent data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",e),...t}));at.displayName=U.Item.displayName;var ln=({className:e,...t})=>ge("span",{className:i("ml-auto text-xs tracking-widest text-muted-foreground",e),...t});ln.displayName="CommandShortcut";import*as Zt from"react";import*as ne from"@radix-ui/react-popover";import{jsx as $e,jsxs as dn}from"react/jsx-runtime";var K=ne.Root,H=Zt.forwardRef((e,t)=>$e(ne.Trigger,{ref:t,...e,onPointerDown:o=>{e.onPointerDown?.(o)}}));H.displayName=ne.Trigger.displayName;var z=Zt.forwardRef(({className:e,align:t="center",sideOffset:o=4,portal:r=!0,...a},n)=>r?$e(ne.Portal,{children:$e(ne.Content,{ref:n,align:t,sideOffset:o,className:i("pointer-events-auto z-50 w-72 rounded-md border border-transparent bg-white p-4 text-[#191919] shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),onOpenAutoFocus:a.onOpenAutoFocus,onCloseAutoFocus:a.onCloseAutoFocus,...a})}):$e(ne.Content,{ref:n,align:t,sideOffset:o,className:i("pointer-events-auto z-50 w-72 rounded-md border border-transparent bg-white p-4 text-[#191919] shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),onOpenAutoFocus:a.onOpenAutoFocus,onCloseAutoFocus:a.onCloseAutoFocus,...a}));z.displayName=ne.Content.displayName;var ie=({trigger:e,children:t,open:o,onOpenChange:r,contentClassName:a,asChild:n=!0,align:s,side:c,alignOffset:m,triggerClassName:l,sideOffset:p,onOpenAutoFocus:u,onCloseAutoFocus:d,portal:f=!0,id:N="popover",...y})=>dn(K,{...y,...o!==void 0?{open:o,onOpenChange:r}:{},children:[$e(H,{asChild:n,className:l,id:`${N}-trigger`,children:e}),$e(z,{alignOffset:m,sideOffset:p,side:c,align:s,className:a,onOpenAutoFocus:u,onCloseAutoFocus:d,portal:f,id:`${N}-content`,children:t})]});ie.displayName=ne.Root.displayName;import*as Ut from"react";import*as se from"@radix-ui/react-scroll-area";import{jsx as nt,jsxs as pn}from"react/jsx-runtime";var le=Ut.forwardRef(({className:e,viewPortClassName:t,children:o,...r},a)=>pn(se.Root,{ref:a,className:i("relative overflow-hidden",e),...r,children:[nt(se.Viewport,{className:i("h-full w-full rounded-[inherit]",t),children:o}),nt(Ct,{}),nt(se.Corner,{})]}));le.displayName=se.Root.displayName;var Ct=Ut.forwardRef(({className:e,orientation:t="vertical",...o},r)=>nt(se.ScrollAreaScrollbar,{ref:r,orientation:t,className:i("flex touch-none select-none transition-colors",t==="vertical"&&"h-full w-2.5 border-l border-l-transparent p-[1px]",t==="horizontal"&&"h-2.5 flex-col border-t border-t-transparent p-[1px]",e),...o,children:nt(se.ScrollAreaThumb,{className:"relative flex-1 rounded-full bg-[#959595] transition hover:bg-[#808080]"})}));Ct.displayName=se.ScrollAreaScrollbar.displayName;import{jsx as ce,jsxs as wt}from"react/jsx-runtime";var Qo=({className:e,value:t,placeholder:o="",status:r,disabled:a,id:n})=>ce(H,{asChild:!0,disabled:a,id:n??"searchable-trigger",children:wt("button",{disabled:a,className:i($({status:r}),"[&>span]:justify-start [&>span]:items-center gap-2 flex h-12 w-full items-center justify-between goup",t?"":"text-[#79818C]",e),children:[ce("span",{children:t??o??"Select options..."}),ce("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",className:" data-[state=open]:goup-rotate-180",children:ce("path",{d:"M16.5999 7.45825L11.1666 12.8916C10.5249 13.5333 9.4749 13.5333 8.83324 12.8916L3.3999 7.45825",stroke:"currentColor",strokeWidth:"1.5",strokeMiterlimit:"10",strokeLinecap:"round",strokeLinejoin:"round"})})]})}),Nt=({options:e=[],value:t,onChange:o,containerClassName:r,placeholder:a,disabled:n,loading:s,optionComponent:c,children:m,modal:l=!1,hideSearch:p,className:u,inputValue:d,onValueChange:f,onInputValueChange:N})=>{let[y,v]=Ve.useState(!1),[g,R]=Ve.useState(void 0),x=Ve.useRef(null),b=Ve.useCallback(h=>{if(x.current&&(x.current.disconnect(),x.current=null),h){let C=()=>{R(h.getBoundingClientRect().width)};C();let w=new ResizeObserver(()=>{C()});w.observe(h),x.current=w}},[]);return wt(K,{modal:l,open:y,onOpenChange:v,children:[ce("div",{className:i("w-full",u),ref:b,children:m}),ce(z,{portal:!l,className:"p-0 min-w-[200px]",style:{width:g?`${g}px`:void 0},children:wt(Qe,{className:i("relative max-h-[270px]",{"mt-2":!p}),children:[!p&&ce(et,{loading:s,placeholder:a??"Search options...",onValueChange:N,value:d,CommandInputContainerClassName:"mx-2 border rounded-md border-[#DEDEDE]"}),ce(le,{viewPortClassName:"max-h-[225px]",className:i("w-full px-0 h-full overflow-y-auto",r),children:wt(tt,{children:[!p&&ce(ot,{children:"No result found."}),ce(rt,{className:"w-full",children:e?.map((h,C)=>ce(at,{defaultValue:t?.label,value:h.label,disabled:n,onSelect:()=>{o(h),v(!1),f?.(h?.value)},id:h.value,children:c?c(h):ce("span",{children:h.label})},`${h.value}-${C}`))})]})})]})})]})};var Kt=[{countryCode:"GLOBAL",countryName:"Global",currency:"Dollars",currencyCode:"USD",internetCountryCode:"GLOBAL"},{countryName:"Benin",countryCode:"+229",currency:"West African CFA franc",currencyCode:"XOF",currencyIcon:"Fr",internetCountryCode:"BJ"},{countryName:"Burkina Faso",countryCode:"+226",currency:"West African CFA franc",currencyCode:"XOF",currencyIcon:"Fr",internetCountryCode:"BF"},{countryName:"Cameroon",countryCode:"+237",currency:"Central African CFA franc",currencyCode:"XAF",currencyIcon:"Fr",internetCountryCode:"CM"},{countryName:"Chad",countryCode:"+235",currency:"Central African CFA franc",currencyCode:"XAF",currencyIcon:"Fr",internetCountryCode:"TD"},{countryName:"DR Congo",countryCode:"+243",currency:"Congolese franc",currencyCode:"CDF",currencyIcon:"FC",internetCountryCode:"CD"},{countryName:"Eswatini",countryCode:"+268",currency:"Swazi lilangeni",currencyCode:"SZL",currencyIcon:"L",internetCountryCode:"SZ"},{countryName:"Gabon",countryCode:"+241",currency:"Central African CFA franc",currencyCode:"XAF",currencyIcon:"Fr",internetCountryCode:"GA"},{countryName:"Ghana",countryCode:"+233",currency:"Ghanaian cedi",currencyCode:"GHS",currencyIcon:"\u20B5",internetCountryCode:"GH"},{countryName:"Guinea",countryCode:"+224",currency:"Guinean franc",currencyCode:"GNF",currencyIcon:"Fr",internetCountryCode:"GN"},{countryName:"Ivory Coast",countryCode:"+225",currency:"West African CFA franc",currencyCode:"XOF",currencyIcon:"Fr",internetCountryCode:"CI"},{countryName:"Kenya",countryCode:"+254",currency:"Kenyan shilling",currencyCode:"KES",currencyIcon:"Sh",internetCountryCode:"KE"},{countryName:"Lesotho",countryCode:"+266",currency:"Lesotho loti",currencyCode:"LSL",currencyIcon:"L",internetCountryCode:"LS"},{countryName:"Liberia",countryCode:"+231",currency:"Liberian dollar",currencyCode:"LRD",currencyIcon:"$",internetCountryCode:"LR"},{countryName:"Madagascar",countryCode:"+261",currency:"Malagasy ariary",currencyCode:"MGA",currencyIcon:"Ar",internetCountryCode:"MG"},{countryName:"Malawi",countryCode:"+265",currency:"Malawian kwacha",currencyCode:"MWK",currencyIcon:"MK",internetCountryCode:"MW"},{countryName:"Mali",countryCode:"+223",currency:"West African CFA franc",currencyCode:"XOF",currencyIcon:"Fr",internetCountryCode:"ML"},{countryName:"Mozambique",countryCode:"+258",currency:"Mozambican metical",currencyCode:"MZN",currencyIcon:"MT",internetCountryCode:"MZ"},{countryName:"Namibia",countryCode:"+264",currency:"Namibian dollar",currencyCode:"NAD",currencyIcon:"$",internetCountryCode:"NA"},{countryName:"Niger",countryCode:"+227",currency:"West African CFA franc",currencyCode:"XOF",currencyIcon:"Fr",internetCountryCode:"NE"},{countryName:"Nigeria",countryCode:"+234",currency:"Nigerian naira",currencyCode:"NGN",currencyIcon:"\u20A6",internetCountryCode:"NG"},{countryName:"Republic of the Congo",countryCode:"+242",currency:"Central African CFA franc",currencyCode:"XAF",currencyIcon:"Fr",internetCountryCode:"CG"},{countryName:"Rwanda",countryCode:"+250",currency:"Rwandan franc",currencyCode:"RWF",currencyIcon:"Fr",internetCountryCode:"RW"},{countryName:"Senegal",countryCode:"+221",currency:"West African CFA franc",currencyCode:"XOF",currencyIcon:"Fr",internetCountryCode:"SN"},{countryName:"Seychelles",countryCode:"+248",currency:"Seychellois rupee",currencyCode:"SCR",currencyIcon:"\u20A8",internetCountryCode:"SC"},{countryName:"South Africa",countryCode:"+27",currency:"South African rand",currencyCode:"ZAR",currencyIcon:"R",internetCountryCode:"ZA"},{countryName:"South Sudan",countryCode:"+211",currency:"South Sudanese pound",currencyCode:"SSP",currencyIcon:"\xA3",internetCountryCode:"SS"},{countryName:"Tanzania",countryCode:"+255",currency:"Tanzanian shilling",currencyCode:"TZS",currencyIcon:"Sh",internetCountryCode:"TZ"},{countryName:"Togo",countryCode:"+228",currency:"West African CFA franc",currencyCode:"XOF",currencyIcon:"Fr",internetCountryCode:"TG"},{countryName:"Uganda",countryCode:"+256",currency:"Ugandan shilling",currencyCode:"UGX",currencyIcon:"Sh",internetCountryCode:"UG"},{countryName:"Zambia",countryCode:"+260",currency:"Zambian kwacha",currencyCode:"ZMW",currencyIcon:"ZK",internetCountryCode:"ZM"}],er=()=>{let e={};return Kt?.forEach(t=>{e[t?.internetCountryCode]=t?.countryName}),e};import*as lt from"react";import*as Rt from"react-phone-number-input";import fn from"react-phone-number-input/flags";import{jsx as it,jsxs as un}from"react/jsx-runtime";var mn=e=>un("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"none",...e,children:[it("rect",{width:"32",height:"32",fill:"#60A5FA"})," ",it("path",{d:"M3 10L7 8L10 9L13 8L16 10L19 9L22 11L25 10L28 12V15L26 17L28 19L27 22L29 24L27 26L24 25L21 26L18 24L15 25L12 23L9 24L6 22L4 23L2 21V18L4 16L3 13L5 11L3 10Z",fill:"#34D399"}),it("rect",{x:"2",y:"28",width:"28",height:"3",fill:"#D1D5DB"}),it("path",{d:"M0 16H32M8 0V32M16 0V32M24 0V32",stroke:"#2563EB",strokeWidth:"0.5",vectorEffect:"non-scaling-stroke"}),it("path",{d:"M0 16H32",stroke:"#2563EB",strokeWidth:"1",vectorEffect:"non-scaling-stroke"})]}),tr=mn;import{jsx as T,jsxs as st}from"react/jsx-runtime";var or=lt.forwardRef(({className:e,onChange:t,defaultCountry:o="NG",disableCountrySelect:r=!1,modal:a,showAsterisk:n,label:s,description:c,error:m,countryOptions:l,...p},u)=>{let d=f=>T(gn,{...f,status:p.status,modal:a,options:l||f?.options});return st("div",{className:"relative space-y-1",children:[T(A,{showAsterisk:n,error:m,children:s}),T(Rt.default,{ref:u,className:i("flex sentry-mask",e),flagComponent:De,countrySelectComponent:f=>T(d,{...f,disabled:f?.disabled||r}),inputComponent:rr,defaultCountry:o,onChange:f=>{t&&t?.(f)},...p}),T(me,{className:"text-gray-400 text-sm !font-normal",children:c}),T(ee,{error:m})]})});or.displayName="PhoneInput";var rr=lt.forwardRef(({className:e,...t},o)=>T(G,{className:i("!rounded-s-none h-10",e),...t,ref:o}));rr.displayName="InputComponent";var gn=({disabled:e,value:t,onChange:o,options:r,status:a,modal:n})=>{let s=lt.useCallback(c=>{o(c)},[o]);return st(K,{modal:n,children:[T(H,{disabled:e,children:st("div",{className:i($({status:a}),"transition justify-center items-center disabled:text-base-500 flex gap-3 h-10 rounded-e-none border-e-0 pl-2 pr-2"),children:[T(De,{country:t,countryName:t}),T("svg",{className:i("mr-0.5 h-4 w-4 opacity-50",e?"hidden":"opacity-100"),width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",children:T("path",{d:"M16.5999 7.45825L11.1666 12.8916C10.5249 13.5333 9.4749 13.5333 8.83324 12.8916L3.3999 7.45825",stroke:"#959595",strokeWidth:"1.5",strokeMiterlimit:"10",strokeLinecap:"round",strokeLinejoin:"round"})})]})}),T(z,{portal:!n,className:"w-[200px] md:w-[300px] p-0",children:T(Qe,{children:T(tt,{children:st(le,{className:"h-72",children:[T(et,{placeholder:"Search country..."}),T(ot,{children:"No country found."}),T(rt,{children:r.filter(c=>c.value).map(c=>st(at,{className:"gap-2",onSelect:()=>s(c.value),children:[T(De,{country:c.value,countryName:c.label}),T("span",{className:"flex-1 text-sm",children:c.label}),c.value&&T("span",{className:"text-[#191919]/50 text-sm dark:text-white",children:`+${Rt.getCountryCallingCode(c.value)}`}),T("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",className:i("ml-auto",c.value===t?"opacity-100":"opacity-0"),children:T("path",{d:"M4 8.00008L6.66353 10.6636L12 5.33655",stroke:"#959595",strokeWidth:"1.06667",strokeLinecap:"round",strokeLinejoin:"round"})})]},`${c.value}-${c.label}`))})]})})})})]})},De=({country:e,countryName:t,className:o})=>{let r=fn[e];return e==="GLOBAL"?T("span",{className:i("bg-white/20 flex h-4 w-6 overflow-hidden rounded-sm",o),children:T(tr,{className:"w-full h-[90%]"})}):T("span",{className:i("bg-white/20 flex h-4 w-6 overflow-hidden rounded-sm",o),children:r&&T(r,{title:t})})};De.displayName="FlagComponent";import{jsx as oe,jsxs as Pt}from"react/jsx-runtime";var bn=er(),vn=({className:e,value:t,placeholder:o="",status:r,disabled:a})=>oe(H,{asChild:!0,disabled:a,id:"country-dropdown",children:Pt("button",{disabled:a,className:i($({status:r}),"[&>span]:justify-start [&>span]:items-center gap-2 flex w-full items-center justify-between goup",t?"":"text-[#79818C]",e),children:[t?Pt("div",{className:"flex gap-2 items-center",children:[oe(De,{country:t,countryName:t,className:"ml-1 !w-6 h-5"}),oe("span",{className:"",children:bn[t]})]}):oe("span",{children:o??"Select options..."}),oe("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",className:" data-[state=open]:goup-rotate-180",children:oe("path",{d:"M16.5999 7.45825L11.1666 12.8916C10.5249 13.5333 9.4749 13.5333 8.83324 12.8916L3.3999 7.45825",stroke:"currentColor",strokeWidth:"1.5",strokeMiterlimit:"10",strokeLinecap:"round",strokeLinejoin:"round"})})]})}),hn=({hideSearch:e=!0,showAsterisk:t,label:o,description:r,error:a,...n})=>{let s=Kt?.map(c=>({value:c?.internetCountryCode,label:c?.countryName,...c}));return Pt("div",{className:"relative space-y-1",children:[oe(A,{showAsterisk:t,error:a,children:o}),oe(Nt,{options:s,hideSearch:e,optionComponent:c=>Pt("div",{className:"w-full flex items-center gap-2",children:[oe(De,{country:c?.internetCountryCode,countryName:c?.label,className:"ml-2 !w-6 !h-5"}),oe("span",{className:"flex-1 text-sm",children:c?.label})]}),...n,children:oe(vn,{value:n?.value?.value,status:n?.status,placeholder:n?.placeholder??" Select Country"})}),oe(me,{className:"text-gray-400 text-sm !font-normal",children:r}),oe(ee,{error:a})]})};import{jsx as ct,jsxs as yn}from"react/jsx-runtime";var Se=({showAsterisk:e,label:t,description:o,error:r,hideSearch:a=!0,status:n,...s})=>yn("div",{className:"relative space-y-1",children:[ct(A,{showAsterisk:e,error:r,children:t}),ct(Nt,{hideSearch:a,...s,containerClassName:"h-full",children:ct(Qo,{disabled:s?.disabled,placeholder:s?.placeholder??"Select",status:n,value:s?.value?.label??s?.value?.value,className:s?.className,id:s?.id})}),ct(me,{className:"text-gray-400 text-sm !font-normal",children:o}),ct(ee,{error:r})]});import{cva as xn}from"class-variance-authority";import{useMemo as Cn}from"react";import wn from"react-otp-input";import{jsx as ar}from"react/jsx-runtime";var Nn=xn("transition cursor-default placeholder:text-black dark:placeholder:text-white rounded-lg !h-14 !w-14 border aspect-square text-base font-semibold tracking-normal outline-none placeholder:text-sm placeholder:font-normal text-black focus:bg-white flex-shrink-0",{variants:{status:{default:"border-gray-300 dark:border-[#d4d4d4] focus:border-gray-400 focus-visible:!ring-offset-gray-200 focus:ring-offset-gray-200 !ring-gray-200 !focus-visible:ring-1 bg-white dark:!bg-transparent dark:focus-visible:!ring-0 dark:focus-within:!bg-transparent dark:text-white dark:focus-within:border-[#9299A2] dark:border-[#676767] dark:disabled:!border-[#9299A2]",error:"placeholder:text-red-600 bg-red-50 border-red-600 text-red-600 focus-within:bg-red-50 focus-within:border-red-600",loading:"placeholder:text-[#C4C4C4]"}},defaultVariants:{status:"default"}}),Rn=({numInputs:e=4,inputStyle:t,containerStyle:o,placeholder:r="-",status:a,inputMode:n="numeric",inputType:s="number",...c})=>{let m=Cn(()=>r||new Array(e).fill("").reduce((u,d)=>u+=d,""),[e,r]);return ar(wn,{numInputs:e,placeholder:m,containerStyle:i("w-fit sentry-mask flex justify-between",o),inputStyle:i(Nn({status:a}),t,"sentry-mask"),renderInput:l=>ar("input",{...l,inputMode:n,type:s}),inputType:s,...c})};import{useState as Pn,useEffect as Ln}from"react";import{jsx as I,jsxs as Oe}from"react/jsx-runtime";var kn=({type:e})=>e==="gray"?I("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:I("path",{d:"M10 0C4.49 0 0 4.49 0 10C0 15.51 4.49 20 10 20C15.51 20 20 15.51 20 10C20 4.49 15.51 0 10 0ZM14.78 7.7L9.11 13.37C8.97 13.51 8.78 13.59 8.58 13.59C8.38 13.59 8.19 13.51 8.05 13.37L5.22 10.54C4.93 10.25 4.93 9.77 5.22 9.48C5.51 9.19 5.99 9.19 6.28 9.48L8.58 11.78L13.72 6.64C14.01 6.35 14.49 6.35 14.78 6.64C15.07 6.93 15.07 7.4 14.78 7.7Z",fill:"#79818C"})}):e==="info"?I("svg",{stroke:"#70B6F6",fill:"#70B6F6",strokeWidth:"0",viewBox:"0 0 16 16",height:"24",width:"24",xmlns:"http://www.w3.org/2000/svg",children:I("path",{d:"M8 16A8 8 0 1 0 8 0a8 8 0 0 0 0 16m.93-9.412-1 4.705c-.07.34.029.533.304.533.194 0 .487-.07.686-.246l-.088.416c-.287.346-.92.598-1.465.598-.703 0-1.002-.422-.808-1.319l.738-3.468c.064-.293.006-.399-.287-.47l-.451-.081.082-.381 2.29-.287zM8 5.5a1 1 0 1 1 0-2 1 1 0 0 1 0 2"})}):e==="warning"?I("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:I("path",{d:"M9.99984 1.66663C5.40817 1.66663 1.6665 5.40829 1.6665 9.99996C1.6665 14.5916 5.40817 18.3333 9.99984 18.3333C14.5915 18.3333 18.3332 14.5916 18.3332 9.99996C18.3332 5.40829 14.5915 1.66663 9.99984 1.66663ZM9.37484 6.66663C9.37484 6.32496 9.65817 6.04163 9.99984 6.04163C10.3415 6.04163 10.6248 6.32496 10.6248 6.66663V10.8333C10.6248 11.175 10.3415 11.4583 9.99984 11.4583C9.65817 11.4583 9.37484 11.175 9.37484 10.8333V6.66663ZM10.7665 13.65C10.7248 13.7583 10.6665 13.8416 10.5915 13.925C10.5082 14 10.4165 14.0583 10.3165 14.1C10.2165 14.1416 10.1082 14.1666 9.99984 14.1666C9.8915 14.1666 9.78317 14.1416 9.68317 14.1C9.58317 14.0583 9.4915 14 9.40817 13.925C9.33317 13.8416 9.27484 13.7583 9.23317 13.65C9.1915 13.55 9.1665 13.4416 9.1665 13.3333C9.1665 13.225 9.1915 13.1166 9.23317 13.0166C9.27484 12.9166 9.33317 12.825 9.40817 12.7416C9.4915 12.6666 9.58317 12.6083 9.68317 12.5666C9.88317 12.4833 10.1165 12.4833 10.3165 12.5666C10.4165 12.6083 10.5082 12.6666 10.5915 12.7416C10.6665 12.825 10.7248 12.9166 10.7665 13.0166C10.8082 13.1166 10.8332 13.225 10.8332 13.3333C10.8332 13.4416 10.8082 13.55 10.7665 13.65Z",fill:"#FFC700"})}):e==="success"?I("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:I("path",{d:"M12 2C6.49 2 2 6.49 2 12C2 17.51 6.49 22 12 22C17.51 22 22 17.51 22 12C22 6.49 17.51 2 12 2ZM16.78 9.7L11.11 15.37C10.97 15.51 10.78 15.59 10.58 15.59C10.38 15.59 10.19 15.51 10.05 15.37L7.22 12.54C6.93 12.25 6.93 11.77 7.22 11.48C7.51 11.19 7.99 11.19 8.28 11.48L10.58 13.78L15.72 8.64C16.01 8.35 16.49 8.35 16.78 8.64C17.07 8.93 17.07 9.4 16.78 9.7Z",fill:"#00D488"})}):I("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:I("path",{d:"M9.99984 1.66663C5.40817 1.66663 1.6665 5.40829 1.6665 9.99996C1.6665 14.5916 5.40817 18.3333 9.99984 18.3333C14.5915 18.3333 18.3332 14.5916 18.3332 9.99996C18.3332 5.40829 14.5915 1.66663 9.99984 1.66663ZM9.37484 6.66663C9.37484 6.32496 9.65817 6.04163 9.99984 6.04163C10.3415 6.04163 10.6248 6.32496 10.6248 6.66663V10.8333C10.6248 11.175 10.3415 11.4583 9.99984 11.4583C9.65817 11.4583 9.37484 11.175 9.37484 10.8333V6.66663ZM10.7665 13.65C10.7248 13.7583 10.6665 13.8416 10.5915 13.925C10.5082 14 10.4165 14.0583 10.3165 14.1C10.2165 14.1416 10.1082 14.1666 9.99984 14.1666C9.8915 14.1666 9.78317 14.1416 9.68317 14.1C9.58317 14.0583 9.4915 14 9.40817 13.925C9.33317 13.8416 9.27484 13.7583 9.23317 13.65C9.1915 13.55 9.1665 13.4416 9.1665 13.3333C9.1665 13.225 9.1915 13.1166 9.23317 13.0166C9.27484 12.9166 9.33317 12.825 9.40817 12.7416C9.4915 12.6666 9.58317 12.6083 9.68317 12.5666C9.88317 12.4833 10.1165 12.4833 10.3165 12.5666C10.4165 12.6083 10.5082 12.6666 10.5915 12.7416C10.6665 12.825 10.7248 12.9166 10.7665 13.0166C10.8082 13.1166 10.8332 13.225 10.8332 13.3333C10.8332 13.4416 10.8082 13.55 10.7665 13.65Z",fill:"#F04248"})}),Dn=({type:e="info",title:t,description:o,open:r,showCloseButton:a,bottomNode:n,sideNode:s,onClose:c,showIcon:m=!0})=>{let[l,p]=Pn(r);Ln(()=>{p(r)},[r]);let u="",d="";switch(e){case"gray":u="#eeeef0",d="#79818c";break;case"info":u="#ebf5fd",d="#70B6F6";break;case"warning":u="#fff8df",d="#ffc700";break;case"success":u="#e0f9f0",d="#49e0aa";break;case"danger":u="#fde8e9",d="#f3777c";break;default:u="#eeeef0",d="#79818c";break}function f(){p(!1),c&&c()}return l?Oe("div",{className:"w-full shadow-lg transform flex items-center rounded-md",style:{background:u||"#ebf5fd"},children:[I("div",{className:"flex-none absolute rounded-l-[2px] rounded-l-4px h-[4px] w-full top-0",style:{background:d||"#70B6F6"}}),Oe("div",{className:"w-full gap-3 h-full flex flex-row justify-between px-4 md:px-4 py-3 md:py-4",children:[Oe("div",{className:"flex flex-row gap-2.5 items-start w-full h-full",children:[m&&I("div",{className:"h-full flex justify-end",children:I(kn,{type:e})}),Oe("div",{className:"w-full gap-3 h-full flex flex-col md:flex-row items-start justify-between",children:[Oe("div",{className:"flex-1 gap-3 h-full flex flex-col items-start justify-between",children:[(t||o)&&Oe("div",{children:[t&&I("div",{className:"text-sm font-bold text-[#191919]",children:t}),o&&I("div",{className:"text-sm font-normal text-[#5D5D5D] mt-1",children:o})]}),n]}),s]})]}),a&&I("div",{className:"w-1/10 h-full flex flex-col justify-start items-center",children:I("button",{onClick:f,children:Oe("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[I("path",{d:"M3.3335 3.33337L12.6662 12.6661",stroke:"#191919",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),I("path",{d:"M3.33429 12.6661L12.667 3.33337",stroke:"#191919",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})]})})})]})]}):null};import{useState as Tn}from"react";import{Copy as Fn,CheckIcon as En}from"lucide-react";import{motion as Mn,AnimatePresence as An}from"framer-motion";import{jsx as Sn}from"react/jsx-runtime";var ze=({children:e,mode:t="truncate",className:o,as:r="div",...a})=>Sn(r,{className:i({"text-ellipsis overflow-hidden whitespace-nowrap":t==="truncate","whitespace-normal break-words":t==="wrap","":t==="overflow"},o),target:a?.href?"_blank":void 0,...a,children:e});import{jsx as Ze,jsxs as Bn}from"react/jsx-runtime";var In=({text:e,textToCopy:t,onCopy:o,iconsPosition:r="right",clampText:a=!0,clampMode:n="truncate",isLink:s=!1,textClassName:c})=>{let[m,l]=Tn(!1),p=()=>{navigator.clipboard.writeText(t??e).then(()=>{l(!0),o?.(),setTimeout(()=>l(!1),2e3)})},u=m?En:Fn;return Bn("div",{className:"flex items-center space-x-2 cursor-pointer text-[#717171] bg-gray-100 w-fit max-w-full rounded-md p-1 px-2",children:[r==="left"&&Ze(nr,{Icon:u,onClick:p,copied:m}),Ze(ze,{as:s?"a":"span",mode:a?n:"overflow",className:i({underline:s},c),href:s?e:void 0,children:e}),r==="right"&&Ze(nr,{Icon:u,onClick:p,copied:m})]})},nr=({Icon:e,onClick:t,copied:o})=>Ze(An,{mode:"wait",children:Ze(Mn.div,{initial:{opacity:0,scale:.8},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.8},transition:{duration:.2},onClick:t,children:Ze(e,{className:`w-5 h-5 ${o?"text-green-500":"text-gray-500 hover:text-gray-700 transition"}`})},o?"check":"copy")});import{useEffect as ir,useState as Vn}from"react";import{Search as On}from"lucide-react";import{jsx as sr}from"react/jsx-runtime";var jt=({value:e,onChange:t,debounce:o=500,addon:r,...a})=>{let[n,s]=Vn(e??""),c=m=>s(m.target.value);return ir(()=>{e&&s(e)},[e]),ir(()=>{let m=setTimeout(()=>{t(n)},o);return()=>clearTimeout(m)},[n,o,t]),sr(G,{leftNode:r??sr(On,{className:" w-4 h-4 text-gray-400"}),sideNodeClassName:"bg-transparent !pr-0 !w-4 border-0 !min-w-[40px]",...a,className:i("!pl-0 py-1 border-[.5px] border-[#E9EBF8] rounded-xl text-sm w-full h-8 focus:outline-none focus:placeholder:hidden focus:!ring-2 !focus:ring-primary-main bg-[#F5F8FF] focus-within:!bg-transparent placeholder:text-xs",a?.className),onChange:c,value:n})};import{useEffect as lr}from"react";import{X as Hn}from"lucide-react";import{jsx as be,jsxs as Ue}from"react/jsx-runtime";var _n=e=>{let{environment:t,branch:o,version:r,deployTime:a,showBanner:n,onClose:s,initDefault:c,removeFromStorage:m,syncLocalStorageToState:l}=e,p=t||process.env.NEXT_PUBLIC_NODE_ENV;return p!=="staging"&&p!=="sandbox"||(lr(()=>{l()},[l]),lr(()=>{let u;return(p==="staging"||p==="sandbox")&&(u=setInterval(()=>{m(),c()},300*1e3)),()=>{u&&clearInterval(u)}},[n,t,s,m,c,p]),!n)?null:Ue("div",{className:"w-fit p-4 border shadow-md bg-white rounded-md z-[99999] absolute top-2 right-2 min-w-96",children:[be("button",{onClick:s,className:"absolute top-2 right-2",children:be(Hn,{})}),Ue("div",{className:"space-y-2 text-sm",children:[Ue("div",{className:"flex gap-2",children:[be("span",{className:"font-medium",children:"Environment:"}),be("span",{className:"text-blue-600 capitalize",children:p})]}),Ue("div",{className:"flex gap-2",children:[be("span",{className:"font-medium",children:"Branch:"}),be("span",{className:"text-green-600 capitalize",children:o||process.env.NEXT_PUBLIC_DEPLOY_BRANCH})]}),Ue("div",{className:"flex gap-2",children:[be("span",{className:"font-medium",children:"Version:"}),be("span",{className:"text-purple-600",children:r||process.env.NEXT_PUBLIC_DEPLOY_VERSION})]}),Ue("div",{className:"flex gap-2",children:[be("span",{className:"font-medium",children:"Deploy Time:"}),be("span",{className:"text-orange-600",children:a||process.env.NEXT_PUBLIC_DEPLOY_TIME})]})]})]})};import*as dt from"react";import{Drawer as re}from"vaul";import{cva as zn}from"class-variance-authority";import{jsx as cr,jsxs as Gn}from"react/jsx-runtime";var dr=()=>Gn("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"lucide lucide-x",children:[cr("path",{d:"M18 6 6 18"}),cr("path",{d:"m6 6 12 12"})]});import{useState as Wn,useEffect as $n}from"react";function pr(){let[e,t]=Wn({width:100,height:100});return $n(()=>{function o(){t({width:window.innerWidth,height:window.innerHeight})}return window.addEventListener("resize",o),o(),()=>window.removeEventListener("resize",o)},[]),e}import{Fragment as Yn,jsx as W,jsxs as Ke}from"react/jsx-runtime";var Xt=({shouldScaleBackground:e=!1,...t})=>W(re.Root,{direction:"right",shouldScaleBackground:e,...t});Xt.displayName="Drawer";var Zn=re.Trigger,Un=re.Close,Kn=re.Portal,mr=dt.forwardRef(({className:e,...t},o)=>W(re.Overlay,{className:i("fixed inset-0 z-40 bg-black/75 !m-0 !p-0 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t,ref:o}));mr.displayName=re.Overlay.displayName;var jn=zn("fixed focus-visible:outline-0 z-50 gap-4 bg-white shadow-lg dark:bg-[#2B2B2B] dark:text-white transition ease-in-out data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:duration-300 data-[state=open]:duration-500 dark:border-none !select-text",{variants:{side:{top:"inset-x-0 top-0 border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top rounded-b-lg",bottom:"inset-x-0 bottom-0 border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom rounded-t-lg",left:"inset-y-0 left-0 h-full w-3/4 border-r data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-[512px] ",right:"inset-y-0 right-0 h-full w-3/4 border-l data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-[512px]"}},defaultVariants:{side:"right"}}),ur=dt.forwardRef(({side:e="right",hideCloseButton:t,className:o,children:r,id:a,...n},s)=>Ke(Kn,{children:[W(mr,{}),Ke(re.Content,{ref:s,className:i(jn({side:e}),o),...n,children:[W("button",{className:"bg-gray-300 block md:!hidden mx-auto mt-4 md:!mt-0 h-1.5 w-[80px] rounded-full opacity-70 transition-opacity hover:opacity-100 relative"}),r,!t&&Ke(re.Close,{id:`${a}-close-button`,className:"absolute right-2 top-3 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-secondary",children:[W(dr,{}),W("span",{className:"sr-only",children:"Close"})]})]})]}));ur.displayName=re.Content.displayName;var fr=({className:e,...t})=>W("div",{className:i("text-lg flex flex-col border-b border-b-gray-200 space-y-1 text-left w-full p-3",e),...t});fr.displayName="DrawerHeader";var gr=({className:e,...t})=>W("div",{className:i("flex flex-col-reverse sm:flex-row m-auto right-0 left-0 p-3 sm:space-x-2 border-t border-t-[#EDEDED] dark:border-t-[#242424] w-full",e),...t});gr.displayName="DrawerFooter";var br=dt.forwardRef(({className:e,...t},o)=>W(re.Title,{ref:o,className:i("text-xl font-semibold text-[#191919] dark:text-white",e),...t}));br.displayName=re.Title.displayName;var vr=dt.forwardRef(({className:e,...t},o)=>W(re.Description,{ref:o,className:i("text-xs text-[#5d5c5c] dark:text-white",e),...t}));vr.displayName=re.Description.displayName;var Xn=({trigger:e=void 0,children:t,open:o=void 0,onOpenChange:r=void 0,hideCloseButton:a,footer:n,title:s,description:c,contentClassName:m,headerClassName:l,titleClassName:p,descriptionClassName:u,footerClassName:d,asChild:f=!0,onOpenAutoFocus:N,drawerContentClassName:y,onCloseAutoFocus:v,id:g="drawer",modal:R=!0})=>{let{width:x}=pr(),h=x<768?"bottom":"right";return Ke(Xt,{modal:R,...o!==void 0?{open:o,onOpenChange:r}:{},direction:h,children:[W(Zn,{className:"cursor-pointer",asChild:f,id:`${g}-open-trigger`,children:e}),Ke(ur,{className:i("flex flex-col gap-0 justify-start items-start md:max-h-full w-full !max-w-md max-md:!max-w-full max-md:!rounded-none",m),side:"right",hideCloseButton:a,onOpenAutoFocus:N,onCloseAutoFocus:v,id:`${g}-content`,children:[s||c?Ke(fr,{className:l,id:`${g}-header`,children:[s&&W(br,{className:p,id:`${g}-title`,children:s}),c&&W(vr,{id:`${g}-description`,className:u,children:c})]}):W(Yn,{}),W("div",{"data-vaul-no-drag":!0,className:i("flex w-full overflow-y-auto overscroll-auto flex-col justify-start items-start p-4 flex-1 min-h-0",y),children:t}),n&&W(gr,{className:d,children:n})]})]})};import{jsx as hr}from"react/jsx-runtime";var yr=()=>hr("svg",{stroke:"currentColor",fill:"currentColor",strokeWidth:"0",viewBox:"0 0 20 20","aria-hidden":"true",className:"h-5 w-5",height:"1em",width:"1em",xmlns:"http://www.w3.org/2000/svg",children:hr("path",{fillRule:"evenodd",d:"M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z",clipRule:"evenodd"})});import{jsx as pt,jsxs as qn}from"react/jsx-runtime";var xr=e=>qn("svg",{viewBox:"0 0 60 30",className:"w-full max-w-md h-auto","aria-label":"Union Jack - Flag of the United Kingdom",...e,children:[pt("rect",{width:"60",height:"30",fill:"#00247D"}),pt("path",{d:"M0,0 L60,30 M60,0 L0,30",stroke:"#FFFFFF",strokeWidth:"6"}),pt("path",{d:"M0,0 L60,30 M60,0 L0,30",stroke:"#CF142B",strokeWidth:"4"}),pt("path",{d:"M30,0 L30,30 M0,15 L60,15",stroke:"#FFFFFF",strokeWidth:"10"}),pt("path",{d:"M30,0 L30,30 M0,15 L60,15",stroke:"#CF142B",strokeWidth:"6"})]});import{jsx as Yt,jsxs as Jn}from"react/jsx-runtime";var Cr=e=>Jn("svg",{viewBox:"0 0 60 40",className:"w-full max-w-md h-auto","aria-label":"Tricolore - Flag of France",...e,children:[Yt("rect",{x:"0",y:"0",width:"20",height:"40",fill:"#002395"}),Yt("rect",{x:"20",y:"0",width:"20",height:"40",fill:"#FFFFFF"}),Yt("rect",{x:"40",y:"0",width:"20",height:"40",fill:"#ED2939"})]});import{jsx as wr,jsxs as Qn}from"react/jsx-runtime";var Nr=()=>Qn("svg",{width:"20",height:"18",viewBox:"0 0 8 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[wr("path",{d:"M5.50257 12.9395L3.68439 14.7576L1.86621 12.9395",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),wr("path",{d:"M5.50257 5.06055L3.68439 3.24237L1.86621 5.06055",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"})]});import{PopoverClose as ei}from"@radix-ui/react-popover";import{jsx as ae,jsxs as qt}from"react/jsx-runtime";var ti=[{key:"en",label:"English"},{key:"fr",label:"French"}],oi=({locale:e})=>e==="fr"?ae(Cr,{width:10}):ae(xr,{width:10}),ri=({locale:e})=>ae("div",{className:"px-2 py-1 ",children:qt("div",{className:"flex items-center gap-2.5",children:[ae(oi,{locale:e})," ",ae("span",{className:"uppercase",children:e}),ae(Nr,{})]})}),ai=({locale:e="en",onChange:t,locales:o=ti})=>qt(K,{children:[ae("div",{className:"flex items-center gap-2 px-2 py-1 rounded-lg shadow border-[0.5px] border-gray-50/50 text-current bg-white/10 ",children:ae(H,{className:"!p-0 !bg-transparent ",id:"locale_select_dropdown",children:ae(ri,{locale:e})})}),ae(z,{side:"bottom",className:"p-0 max-w-max rounded-md overflow-hidden mx-auto mt-2",children:ae("div",{children:o?.map(r=>qt(ei,{type:"button",id:`locale_option_${r?.key}`,className:i("flex items-center gap-3 px-3 py-1 text-sm hover:bg-blue-50 w-full transition-all",{"bg-blue-100":e&&e===r?.key}),onClick:()=>t?.(r?.key),children:[ae("span",{children:r?.label})," ",e&&e===r?.key&&ae(yr,{})]},r?.key))})})]});import{X as Fi}from"lucide-react";import{useMemo as _r,useRef as Ei,useState as Mi}from"react";import{AnimatePresence as ni,motion as ii}from"framer-motion";import{useMemo as si,useState as li}from"react";import{HiCheck as ci}from"react-icons/hi";import{FiLogOut as di}from"react-icons/fi";import{BsPlus as pi}from"react-icons/bs";import{jsx as Jt,jsxs as Qt}from"react/jsx-runtime";var mt=({activeBusiness:e,onTriggerClick:t,iconOnly:o=!1,className:r,rightNode:a})=>Qt("div",{id:"sidemenu_business_bar",role:"button",onClick:t||void 0,className:i("relative flex w-full items-center rounded-lg text-black bg-white",{"border-[.5px] border-[#E9EBF8] py-1 px-2":!o,"hover:bg-primary-accent transition-all duration-150 cursor-pointer ":!!t},r),children:[Jt("section",{className:i("flex items-center justify-center bg-[#E9EBF8] text-primary-main rounded-md mr-3 text-xl font-medium",{"w-10 h-10":!o,"w-full h-10 mr-0":o}),children:e?.name?.charAt(0)||"M"}),!o&&Qt("section",{className:"flex-1 flex justify-between items-center relative text-black w-full -space-y-1 tracking-wide",children:[Qt("div",{className:"flex-1 min-w-0 max-w-[150px] w-full",children:[Jt(ze,{as:"h2",className:"text-base capitalize font-medium",children:e?.name}),Jt(ze,{as:"p",className:"text-sm text-[#A5A5A5]",onClick:void 0,children:e?.email})]}),a]})]});import{ChevronUp as mi}from"lucide-react";import{jsx as Rr}from"react/jsx-runtime";var Pr=e=>Rr("svg",{width:"9",height:"8",viewBox:"0 0 9 8",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:Rr("circle",{cx:"4.5",cy:"4",r:"4",fill:"#62C554"})});import{jsx as j,jsxs as eo}from"react/jsx-runtime";var ui={hidden:{y:"-12px",opacity:0},visible:{y:"0",opacity:1,transition:{type:"spring",damping:25,stiffness:500}},exit:{y:"-12px",opacity:0,transition:{type:"spring",damping:25,stiffness:500}}},Lr=({activeBusiness:e,toggleAddBusinessDrawer:t,businesses:o=[],handleSwitchBusiness:r,onLogoutClick:a,onToggleSideBar:n,toggleShowBusiness:s,isMobile:c,collapseType:m})=>{let[l,p]=li(""),u=si(()=>{let g=l.toLowerCase();return(o||[]).filter(R=>R.name?.toLowerCase().startsWith(g))},[o,l]),d=m==="hidden"||c,f=g=>p(g.target.value),N=g=>{r(g||""),d&&n(!1),p("")},y=()=>{t(),s(!1),d&&n(!1),p("")},v=()=>{a?.(),s(!1),d&&n(!1),p("")};return j(ni,{initial:!1,children:j(ii.div,{initial:"hidden",animate:"visible",exit:"exit",variants:ui,children:eo("div",{className:"w-72 bg-white border-x border-t rounded-xl overflow-hidden p-3",style:{boxShadow:`
2
2
  3px 4px 11px 0px #0000001A,
3
3
  13px 16px 21px 0px #00000017,
4
4
  29px 36px 28px 0px #0000000D,
5
5
  52px 65px 33px 0px #00000003,
6
6
  82px 101px 36px 0px #00000000
7
- `},children:[j(mt,{activeBusiness:e,rightNode:j(Rr,{}),className:"bg-[#FAFAFA] border-none p-3"}),j("div",{className:"mt-3",children:j(G,{label:"Search Account",leftNode:j(ci,{className:"h-4 w-4 text-gray-500"}),value:l,onChange:g,placeholder:"Search Account",className:"text-sm"})}),j("ul",{className:"max-h-48 overflow-y-auto mt-2 px-1 space-y-2",children:u.map(f=>j(mt,{onTriggerClick:()=>N(f?.clientId),activeBusiness:f,rightNode:e.clientId===f.clientId?j(ii,{className:"text-primary-600",size:18}):void 0,className:i("bg-white border-none ",{"bg-[#FAFAFA]":e.clientId===f.clientId})},f.clientId))}),j("div",{className:"py-2 ",children:eo("button",{onClick:y,className:"w-full flex items-center justify-start gap-2 text-sm text-[#0033C7] border-[#BECFFF] border-[0.5px] rounded-lg py-2 px-3 hover:bg-primary-accent transition ",children:[j(li,{size:18,className:"text-primary-main"})," Add Account"]})}),j("div",{className:"bg-[#FAFAFA] px-3 py-2 -m-3 mt-4",children:eo("button",{className:"w-full flex items-center gap-2 text-sm text-black hover:text-gray-700 transition p-2 hover:bg-primary-accent",onClick:v,children:[j(si,{size:16})," Log Out"]})})]})})})};import{jsx as Se,jsxs as mi}from"react/jsx-runtime";var Lr=({activeBusiness:e,toggleAddBusinessDrawer:t,toggleShowBusiness:o,businesses:r=[],handleSwitchBusiness:a,iconOnly:n=!1,onLogoutClick:s,isMobile:c,onToggleSideBar:m,isBusinessShown:l,collapseType:p})=>Se("div",{className:"px-4 relative mb-0 ",children:Se(ie,{side:c?"top":"right",open:l,onOpenChange:o,align:"end",contentClassName:"!bg-transparent !shadow-none !p-0",trigger:Se("div",{className:"flex items-center w-full",children:Se(mt,{activeBusiness:e,onTriggerClick:()=>o(!0),iconOnly:n,rightNode:Se(pi,{className:"stroke-gray-500"})})}),children:Se(Pr,{activeBusiness:e,handleSwitchBusiness:a,toggleAddBusinessDrawer:t,businesses:r,onLogoutClick:s,onToggleSideBar:m,toggleShowBusiness:o,collapseType:p,isMobile:c})})}),pi=({className:e})=>mi("svg",{xmlns:"http://www.w3.org/2000/svg",width:"18",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",className:i("lucide lucide-chevrons-up-down-icon lucide-chevrons-up-down",e),children:[Se("path",{d:"M7 22l5 5 5-5"}),Se("path",{d:"M7 4l5-5 5 5"})]});import{jsx as kr,jsxs as ui}from"react/jsx-runtime";var Dr=()=>ui("svg",{width:"100%",height:"32",viewBox:"0 0 20 32",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:"pl-5",children:[kr("path",{d:"M19.686 5.71949V15.1448L19.6467 15.8434V15.8548V15.8663C19.5779 16.5076 19.4207 17.1146 19.1848 17.6758C19.0472 18.0079 18.8801 18.3286 18.6836 18.6149C18.5361 18.8439 18.3592 19.0615 18.1823 19.2677C18.025 19.4394 17.858 19.6112 17.6811 19.7601C17.5238 19.8975 17.3567 20.0235 17.1798 20.138C17.0127 20.2411 16.8456 20.3327 16.6786 20.4243C16.5606 20.4816 16.4427 20.5274 16.3149 20.5732L16.1773 20.6305L15.6761 20.8252L15.1748 21.0199L14.6736 21.2146L14.1723 21.4093L13.1698 21.7986L13.1207 21.8215V23.9402L13.0814 23.9517L12.7374 24.0777L12.6587 24.1006L12.3934 24.2036L12.1575 24.2953L12.0494 24.3296L11.7054 24.4556L11.6464 24.4785L11.3614 24.5816L11.1452 24.6617L11.0174 24.7075L10.6734 24.8335L10.6341 24.845L10.5849 24.8679H10.5653V20.745C10.5653 20.5732 10.5948 20.4129 10.6341 20.2526C10.6439 20.2182 10.6537 20.1838 10.6734 20.1495C10.752 19.9433 10.87 19.7601 11.0174 19.6112C11.0567 19.5769 11.096 19.5311 11.1452 19.4967C11.214 19.4394 11.2828 19.4051 11.3614 19.3593C11.381 19.3478 11.4105 19.3364 11.4302 19.3249L11.4498 19.3135L11.6562 19.2333L11.7152 19.2104L12.0592 19.0844L12.1673 19.0386L12.6686 18.8439L12.7472 18.8096L13.0912 18.6836L13.1796 18.6492L13.6809 18.4545L14.1821 18.2598L14.6834 18.0652L15.1846 17.8705L15.5483 17.733C15.5974 17.7216 15.6367 17.6987 15.6859 17.6758C15.8726 17.5956 16.0397 17.4811 16.1871 17.3551C16.3837 17.1948 16.5508 17.0001 16.6884 16.7825C16.9931 16.3244 17.17 15.7403 17.17 15.1333V5.71949C17.17 5.10106 17.0029 4.52844 16.6884 4.05889C16.5508 3.85275 16.3935 3.66951 16.2068 3.50917C16.197 3.49772 16.197 3.49772 16.1871 3.49772C16.0299 3.36029 15.8628 3.25722 15.6859 3.17705C15.5188 3.09689 15.3517 3.05108 15.1846 3.01672C15.0176 2.98236 14.8505 2.98236 14.6834 2.99382C14.5163 3.00527 14.3492 3.03963 14.1821 3.09689C14.1625 3.10834 14.133 3.10834 14.1133 3.11979L13.6809 3.28013L13.1796 3.46336L12.6784 3.65806L12.1378 3.82984L11.6366 4.02453L11.1353 4.20777L10.6341 4.40246L10.1328 4.5857L9.63159 4.76894L9.13034 4.96363L8.62909 5.14687L8.12784 5.3301L7.62659 5.52479L7.12534 5.70803L6.6241 5.90272L6.12285 6.08596L5.6216 6.28065L5.08103 6.46389L4.57979 6.65858L4.21614 6.79601C4.16699 6.81891 4.11785 6.83037 4.06871 6.85327C3.8918 6.93344 3.71489 7.04796 3.56746 7.17394C3.37089 7.33427 3.20381 7.52896 3.06621 7.74656C2.76153 8.2161 2.58462 8.78872 2.58462 9.40715V13.0948C2.58462 13.53 2.66325 13.8965 2.78119 14.2057C2.79102 14.2401 2.80085 14.263 2.8205 14.2973C2.81067 14.3088 2.79102 14.3088 2.78119 14.3202C2.70256 14.366 2.63376 14.4004 2.56496 14.4577C2.52565 14.4806 2.48634 14.5149 2.43719 14.5378C2.31925 14.618 2.20131 14.7096 2.0932 14.8012C2.08337 14.8127 2.06371 14.8241 2.05389 14.8356C1.94577 14.9272 1.84749 15.0188 1.74921 15.1104C1.68041 15.1792 1.61161 15.2479 1.55264 15.328C1.5035 15.3853 1.45435 15.4311 1.40521 15.4884C1.28727 15.6373 1.16933 15.7861 1.06122 15.9465C1.05139 15.9579 1.05139 15.9694 1.04156 15.9808C0.972761 16.0839 0.913791 16.1755 0.85482 16.2786C0.805678 16.1984 0.756536 16.1068 0.717223 16.0266C0.648424 15.9007 0.589453 15.7747 0.540311 15.6373C0.481341 15.4998 0.432199 15.3509 0.383057 15.2135C0.157004 14.5493 0.0390625 13.8392 0.0390625 13.1177V9.3957C0.0390625 8.50241 0.215974 7.63203 0.540311 6.87618C0.677909 6.54406 0.844992 6.22339 1.04156 5.93708C1.18899 5.70803 1.3659 5.49044 1.54281 5.28429C1.70006 5.11251 1.86715 4.94072 2.04406 4.79184C2.20131 4.65441 2.3684 4.52844 2.54531 4.41391C2.70256 4.31084 2.86964 4.21922 3.04656 4.1276C3.17432 4.07034 3.29227 4.01308 3.42003 3.96727L3.5478 3.92146L4.04905 3.73822L4.5503 3.54353L5.05155 3.36029L5.5528 3.1656L6.05405 2.98236L6.5553 2.78767L7.05654 2.60444L7.55779 2.40974L8.10818 2.22651L8.60943 2.03182L9.11068 1.84858L9.61193 1.66534L10.1132 1.47065L10.6144 1.28741L11.1157 1.09272L11.6169 0.909482L12.1182 0.714792L12.6194 0.531554L13.1207 0.336863L13.2878 0.279601C13.3959 0.233791 13.5138 0.199434 13.6317 0.165077C13.7988 0.119268 13.9659 0.073458 14.133 0.0505533C14.3001 0.0276485 14.4672 0.00474375 14.6342 0.00474375C14.8013 -0.00670864 14.9684 0.00474368 15.1355 0.0161961C15.3026 0.0276485 15.4697 0.0505533 15.6367 0.0849104C15.8038 0.119268 15.9709 0.165077 16.138 0.222339C16.3051 0.279601 16.482 0.348315 16.6392 0.428482C16.8063 0.508649 16.9832 0.61172 17.1405 0.714792C17.3174 0.829315 17.4845 0.955292 17.6417 1.09272C17.6417 1.09272 17.6417 1.09272 17.6516 1.09272C17.8285 1.2416 17.9956 1.40193 18.1528 1.58517C18.3396 1.77986 18.5066 1.99746 18.6541 2.22651C18.8506 2.52427 19.0177 2.83348 19.1553 3.1656C19.5091 3.95582 19.686 4.81475 19.686 5.71949Z",fill:"#0231C5"}),kr("path",{d:"M10.8112 9.92822V13.0846L10.7425 13.1079L10.5557 13.1778L10.2412 13.2943L10.2215 13.3059L9.87755 13.434L9.73995 13.4923L9.53356 13.5738L9.48441 13.5855L9.27802 13.667L9.10111 13.7369L8.93402 13.7951L8.59986 13.9232H8.59003L8.24604 14.0514L8.08878 14.1096L7.90204 14.1795L7.58753 14.2959L7.56787 14.3076L7.22388 14.4357L7.08628 14.4939L6.87989 14.5755L6.83074 14.5871L6.57521 14.6803L6.53589 14.692L6.1919 14.8201L6.07396 14.8667L5.8479 14.9482L5.57271 15.053L5.51374 15.0763L5.16974 15.2044L5.07146 15.2394L4.88472 15.3093L4.82575 15.3326L4.56038 15.4374L4.48175 15.4723L4.19673 15.5771C4.17707 15.5888 4.15742 15.5888 4.13776 15.6004C4.10827 15.6121 4.07879 15.6237 4.05913 15.6354C3.97068 15.682 3.88222 15.7286 3.79377 15.7868C3.71514 15.8334 3.62668 15.8916 3.54806 15.9615C3.51857 15.9848 3.47926 16.0197 3.44977 16.0547C3.322 16.1712 3.21389 16.2993 3.10578 16.4507C3.08612 16.474 3.06646 16.5089 3.04681 16.5439C2.93869 16.7186 2.84041 16.9049 2.76178 17.1146C2.63401 17.464 2.56521 17.8367 2.56521 18.2327V27.5039C2.56521 27.7951 2.63401 28.0747 2.76178 28.3076C2.84041 28.459 2.95835 28.5988 3.08612 28.7153C3.09595 28.7269 3.09595 28.7269 3.10578 28.7269C3.21389 28.8201 3.322 28.89 3.44977 28.9249C3.55788 28.9715 3.67582 28.9948 3.79377 28.9948C3.90188 28.9948 4.01982 28.9831 4.13776 28.9482C4.16725 28.9366 4.19673 28.9249 4.22622 28.9133L4.47193 28.8201L4.81592 28.692L5.15991 28.5638L5.50391 28.4357L5.8479 28.3076L6.00516 28.2494C6.06413 28.2261 6.1231 28.1911 6.18207 28.1562C6.30984 28.098 6.41795 28.0164 6.52606 27.9116C6.65383 27.7951 6.77177 27.6554 6.87006 27.4923C7.06663 27.1662 7.17474 26.7585 7.17474 26.3392V19.7585L7.20422 19.7469L7.54822 19.6187L7.56787 19.6071L7.88238 19.4906L8.06912 19.4207L8.22638 19.3625L8.57037 19.2344H8.5802L8.91437 19.1063L9.08145 19.048L9.25836 18.9781L9.5827 18.85L9.60236 18.8384L9.71047 18.7918V26.3392C9.71047 26.6188 9.69081 26.9099 9.6515 27.1778C9.63184 27.2826 9.62201 27.3758 9.60236 27.4806C9.52373 27.8767 9.41562 28.2494 9.25836 28.5988C9.16008 28.8317 9.04214 29.053 8.91437 29.2743C8.80625 29.449 8.69814 29.6121 8.57037 29.7752C8.46226 29.9149 8.34432 30.043 8.22638 30.1595C8.11827 30.276 8.00032 30.3692 7.88238 30.474C7.77427 30.5672 7.65633 30.6487 7.53839 30.7302C7.43028 30.8001 7.31234 30.87 7.19439 30.9282C7.18457 30.9282 7.17474 30.9399 7.16491 30.9515C7.06663 30.9981 6.95851 31.0447 6.86023 31.0913C6.83074 31.1029 6.80126 31.1146 6.77177 31.1262L6.51624 31.2194L5.82825 31.4757L5.48425 31.6038L5.14026 31.7319L4.983 31.7901C4.92403 31.8134 4.86506 31.8367 4.80609 31.8484C4.68815 31.8833 4.58004 31.9183 4.4621 31.9415C4.34416 31.9648 4.23604 31.9881 4.1181 31.9881C4.00999 31.9998 3.91171 31.9998 3.81342 31.9998H3.78394C3.666 31.9998 3.55788 31.9881 3.43994 31.9765C3.322 31.9648 3.21389 31.9415 3.09595 31.9183C2.97801 31.895 2.8699 31.86 2.75195 31.8134C2.68316 31.7901 2.62419 31.7668 2.55539 31.7435C2.50624 31.7203 2.4571 31.697 2.40796 31.6737C2.29002 31.6154 2.18191 31.5572 2.06397 31.4873C1.94602 31.4174 1.82808 31.3359 1.71997 31.2427C1.67083 31.2078 1.62169 31.1612 1.57255 31.1262C1.50375 31.068 1.44478 31.0098 1.37598 30.9399C1.25804 30.8234 1.1401 30.6953 1.03198 30.5555C0.904214 30.4041 0.786273 30.2294 0.687989 30.0547C0.550391 29.8334 0.442278 29.6004 0.343994 29.3559C0.117941 28.7735 0 28.1329 0 27.469V18.1978C0 17.4524 0.117941 16.7302 0.343994 16.0663C0.393136 15.9149 0.442278 15.7751 0.501249 15.6354C0.560219 15.4956 0.61919 15.3675 0.67816 15.2394C0.717474 15.1462 0.766616 15.0647 0.815758 14.9831C0.874728 14.8783 0.933699 14.7735 1.0025 14.6803C1.0025 14.6687 1.01233 14.657 1.02215 14.657C1.13027 14.494 1.23838 14.3425 1.36615 14.1911C1.41529 14.1329 1.4546 14.0746 1.51358 14.0281C1.58237 13.9465 1.64134 13.8883 1.71014 13.8184C1.80843 13.7252 1.90671 13.6204 2.01482 13.5389C2.02465 13.5272 2.04431 13.5156 2.05414 13.5039C2.16225 13.4108 2.28019 13.3176 2.39813 13.2477C2.43745 13.2244 2.47676 13.1895 2.5259 13.1662C2.5947 13.1196 2.67333 13.073 2.74213 13.0264C2.75195 13.0147 2.76178 13.0147 2.78144 13.0031C2.86007 12.9565 2.94852 12.9099 3.02715 12.875C3.04681 12.8633 3.06646 12.8517 3.08612 12.8517C3.1844 12.8051 3.29252 12.7585 3.3908 12.7236L3.42029 12.7119L3.51857 12.677L3.76428 12.5838L4.02965 12.479L4.10828 12.444L4.45227 12.3159L4.5309 12.281L4.79626 12.1878L4.85523 12.1645L5.04197 12.0946L5.14026 12.0597L5.48425 11.9316L5.54322 11.9083L5.81842 11.8034L6.04447 11.7219L6.16241 11.6753L6.50641 11.5472L6.54572 11.5355L6.80126 11.4424L6.8504 11.4307L7.0568 11.3492L7.19439 11.3026L7.53839 11.1745L7.55805 11.1628L7.87256 11.0464L8.0593 10.9765L8.21655 10.9182L8.56054 10.7901H8.57037L8.90454 10.662L9.07162 10.6038L9.24853 10.5339L9.45493 10.4523L9.50407 10.4407L9.71047 10.3592L9.84807 10.3009L10.1921 10.1728L10.2117 10.1612L10.5262 10.0447L10.713 9.97481L10.8112 9.92822Z",fill:"#0231C5"})]});import{jsx as ve,jsxs as Sr}from"react/jsx-runtime";var Tr=()=>Sr("svg",{width:"100%",height:40,xmlns:"http://www.w3.org/2000/svg",id:"Layer_1","data-name":"Layer 1",viewBox:"0 0 1565.51 377.21",children:[Sr("g",{children:[ve("path",{fill:"#0231C5",d:"m277.49,86.74v85.18l-.41,6.31v.21c-.72,5.8-2.38,11.28-4.86,16.35-1.45,3-3.21,5.9-5.28,8.49-1.55,2.07-3.42,4.04-5.28,5.9-1.66,1.55-3.42,3.11-5.28,4.45-1.66,1.24-3.42,2.38-5.28,3.42-1.76.93-3.52,1.76-5.28,2.59-1.24.52-2.48.93-3.83,1.35l-1.45.52-5.28,1.76-5.28,1.76-5.28,1.76-5.28,1.76-10.56,3.52-.52.21v19.15l-.41.1-3.62,1.14-.83.21-2.79.93-2.48.83-1.14.31-3.62,1.14-.62.21-3,.93-2.28.72-1.35.41-3.62,1.14-.41.1-.52.21h-.21v-37.26c0-1.55.31-3,.72-4.45.1-.31.21-.62.41-.93.83-1.86,2.07-3.52,3.62-4.86.41-.31.83-.72,1.35-1.04.72-.52,1.45-.83,2.28-1.24.21-.1.52-.21.72-.31l.21-.1,2.17-.72.62-.21,3.62-1.14,1.14-.41,5.28-1.76.83-.31,3.62-1.14.93-.31,5.28-1.76,5.28-1.76,5.28-1.76,5.28-1.76,3.83-1.24c.52-.1.93-.31,1.45-.52,1.97-.72,3.73-1.76,5.28-2.9,2.07-1.45,3.83-3.21,5.28-5.18,3.21-4.14,5.07-9.42,5.07-14.9v-85.08c0-5.59-1.76-10.76-5.07-15.01-1.45-1.86-3.11-3.52-5.07-4.97q-.1-.1-.21-.1c-1.66-1.24-3.42-2.17-5.28-2.9-1.76-.72-3.52-1.14-5.28-1.45-1.76-.31-3.52-.31-5.28-.21-1.76.1-3.52.41-5.28.93-.21.1-.52.1-.72.21l-4.55,1.45-5.28,1.66-5.28,1.76-5.69,1.55-5.28,1.76-5.28,1.66-5.28,1.76-5.28,1.66-5.28,1.66-5.28,1.76-5.28,1.66-5.28,1.66-5.28,1.76-5.28,1.66-5.28,1.76-5.28,1.66-5.28,1.76-5.69,1.66-5.28,1.76-3.83,1.24c-.52.21-1.04.31-1.55.52-1.86.72-3.73,1.76-5.28,2.9-2.07,1.45-3.83,3.21-5.28,5.18-3.21,4.24-5.07,9.42-5.07,15.01v33.33c0,3.93.83,7.25,2.07,10.04.1.31.21.52.41.83-.1.1-.31.1-.41.21-.83.41-1.55.72-2.28,1.24-.41.21-.83.52-1.35.72-1.24.72-2.48,1.55-3.62,2.38-.1.1-.31.21-.41.31-1.14.83-2.17,1.66-3.21,2.48-.72.62-1.45,1.24-2.07,1.97-.52.52-1.04.93-1.55,1.45-1.24,1.35-2.48,2.69-3.62,4.14-.1.1-.1.21-.21.31-.72.93-1.35,1.76-1.97,2.69-.52-.72-1.04-1.55-1.45-2.28-.72-1.14-1.35-2.28-1.86-3.52-.62-1.24-1.14-2.59-1.66-3.83-2.38-6-3.62-12.42-3.62-18.94v-33.64c0-8.07,1.86-15.94,5.28-22.77,1.45-3,3.21-5.9,5.28-8.49,1.55-2.07,3.42-4.04,5.28-5.9,1.66-1.55,3.42-3.11,5.28-4.45,1.66-1.24,3.42-2.38,5.28-3.42,1.66-.93,3.42-1.76,5.28-2.59,1.35-.52,2.59-1.04,3.93-1.45l1.35-.41,5.28-1.66,5.28-1.76,5.28-1.66,5.28-1.76,5.28-1.66,5.28-1.76,5.28-1.66,5.28-1.76,5.8-1.66,5.28-1.76,5.28-1.66,5.28-1.66,5.28-1.76,5.28-1.66,5.28-1.76,5.28-1.66,5.28-1.76,5.28-1.66,5.28-1.76,1.76-.52c1.14-.41,2.38-.72,3.62-1.04,1.76-.41,3.52-.83,5.28-1.04,1.76-.21,3.52-.41,5.28-.41,1.76-.1,3.52,0,5.28.1,1.76.1,3.52.31,5.28.62,1.76.31,3.52.72,5.28,1.24,1.76.52,3.62,1.14,5.28,1.86,1.76.72,3.62,1.66,5.28,2.59,1.86,1.04,3.62,2.17,5.28,3.42h.1c1.86,1.35,3.62,2.79,5.28,4.45,1.97,1.76,3.73,3.73,5.28,5.8,2.07,2.69,3.83,5.49,5.28,8.49,3.73,7.14,5.59,14.9,5.59,23.08Z"}),ve("path",{fill:"#0231C5",d:"m184.03,136.63v28.05l-.72.21-1.97.62-3.31,1.04-.21.1-3.62,1.14-1.45.52-2.17.72-.52.1h0l-2.17.72-1.86.62-1.76.52-3.52,1.14h-.1l-3.62,1.14-1.66.52-1.97.62-3.31,1.04-.21.1-3.62,1.14-1.45.52-2.17.72-.52.1-2.69.83-.41.1-3.62,1.14-1.24.41-2.38.72-2.9.93-.62.21-3.62,1.14-1.04.31-1.97.62-.62.21-2.79.93-.83.31-3,.93c-.21.1-.41.1-.62.21-.31.1-.62.21-.83.31-.93.41-1.86.83-2.79,1.35-.83.41-1.76.93-2.59,1.55-.31.21-.72.52-1.04.83-1.35,1.04-2.48,2.17-3.62,3.52-.21.21-.41.52-.62.83-1.14,1.55-2.17,3.21-3,5.07-1.35,3.11-2.07,6.42-2.07,9.94v82.39c0,2.59.72,5.07,2.07,7.14.83,1.35,2.07,2.59,3.42,3.62q.1.1.21.1c1.14.83,2.28,1.45,3.62,1.76,1.14.41,2.38.62,3.62.62,1.14,0,2.38-.1,3.62-.41.31-.1.62-.21.93-.31l2.59-.83,3.62-1.14,3.62-1.14,3.62-1.14,3.62-1.14,1.66-.52c.62-.21,1.24-.52,1.86-.83,1.35-.52,2.48-1.24,3.62-2.17,1.35-1.04,2.59-2.28,3.62-3.73,2.07-2.9,3.21-6.52,3.21-10.25v-58.48l.31-.1,3.62-1.14.21-.1,3.31-1.04,1.97-.62,1.66-.52,3.62-1.14h.1l3.52-1.14,1.76-.52,1.86-.62,3.42-1.14.21-.1,1.14-.41v67.07c0,2.48-.21,5.07-.62,7.45-.21.93-.31,1.76-.52,2.69-.83,3.52-1.97,6.83-3.62,9.94-1.04,2.07-2.28,4.04-3.62,6-1.14,1.55-2.28,3-3.62,4.45-1.14,1.24-2.38,2.38-3.62,3.42-1.14,1.04-2.38,1.86-3.62,2.79-1.14.83-2.38,1.55-3.62,2.28-1.14.62-2.38,1.24-3.62,1.76-.1,0-.21.1-.31.21-1.04.41-2.17.83-3.21,1.24-.31.1-.62.21-.93.31l-2.69.83-7.25,2.28-3.62,1.14-3.62,1.14-1.66.52c-.62.21-1.24.41-1.86.52-1.24.31-2.38.62-3.62.83-1.24.21-2.38.41-3.62.41-1.14.1-2.17.1-3.21.1h-.31c-1.24,0-2.38-.1-3.62-.21-1.24-.1-2.38-.31-3.62-.52s-2.38-.52-3.62-.93c-.72-.21-1.35-.41-2.07-.62-.52-.21-1.04-.41-1.55-.62-1.24-.52-2.38-1.04-3.62-1.66s-2.48-1.35-3.62-2.17c-.52-.31-1.04-.72-1.55-1.04-.72-.52-1.35-1.04-2.07-1.66-1.24-1.04-2.48-2.17-3.62-3.42-1.35-1.35-2.59-2.9-3.62-4.45-1.45-1.97-2.59-4.04-3.62-6.21-2.38-5.18-3.62-10.87-3.62-16.77v-82.39c0-6.62,1.24-13.04,3.62-18.94.52-1.35,1.04-2.59,1.66-3.83s1.24-2.38,1.86-3.52c.41-.83.93-1.55,1.45-2.28.62-.93,1.24-1.86,1.97-2.69,0-.1.1-.21.21-.21,1.14-1.45,2.28-2.79,3.62-4.14.52-.52.93-1.04,1.55-1.45.72-.72,1.35-1.24,2.07-1.86,1.04-.83,2.07-1.76,3.21-2.48.1-.1.31-.21.41-.31,1.14-.83,2.38-1.66,3.62-2.28.41-.21.83-.52,1.35-.72.72-.41,1.55-.83,2.28-1.24.1-.1.21-.1.41-.21.83-.41,1.76-.83,2.59-1.14.21-.1.41-.21.62-.21,1.04-.41,2.17-.83,3.21-1.14l.31-.1,1.04-.31,2.59-.83,2.79-.93.83-.31,3.62-1.14.83-.31,2.79-.83.62-.21,1.97-.62,1.04-.31,3.62-1.14.62-.21,2.9-.93,2.38-.72,1.24-.41,3.62-1.14.41-.1,2.69-.83.52-.1,2.17-.72,1.45-.41,3.62-1.14.21-.1,3.31-1.04,1.97-.62,1.66-.52,3.62-1.14h.1l3.52-1.14,1.76-.52,1.86-.62,2.17-.72h0l.52-.1,2.17-.72,1.45-.52,3.62-1.14.21-.1,3.31-1.04,1.97-.62,1.04-.41Z"})]}),ve("path",{fill:"#000000",d:"m433.57,86.41c18.92,0,34.54,6.21,46.87,18.62,12.32,12.41,18.49,28.16,18.49,47.26s-6.16,34.85-18.49,47.26c-12.33,12.41-27.95,18.62-46.87,18.62h-35.41v50.51h-42.18V86.41h77.59Zm-6.51,97.38c8.5,0,15.49-2.95,20.96-8.85,5.47-5.9,8.2-13.45,8.2-22.65s-2.73-16.75-8.2-22.65c-5.47-5.9-12.46-8.85-20.96-8.85h-28.9v63.01h28.9Z"}),ve("path",{fill:"#000000",d:"m568.18,272.05c-18.23,0-32.63-6.16-43.22-18.49-10.59-12.32-15.88-28.21-15.88-47.65s5.47-34.89,16.4-47.39c10.94-12.5,25.34-18.75,43.22-18.75,8.85,0,16.75,1.91,23.69,5.73,6.94,3.82,12.15,9.03,15.62,15.62v-17.96h39.58v125.5h-39.58v-17.7c-3.47,6.25-8.81,11.33-16.01,15.23-7.2,3.91-15.15,5.86-23.82,5.86Zm11.46-33.07c9.54,0,16.92-3.12,22.13-9.37,5.21-6.25,7.81-14.15,7.81-23.69s-2.6-17.18-7.81-23.43c-5.21-6.25-12.59-9.37-22.13-9.37-9.03,0-16.27,3.04-21.74,9.11-5.47,6.08-8.2,13.97-8.2,23.69s2.73,17.66,8.2,23.82c5.47,6.16,12.71,9.24,21.74,9.24Z"}),ve("path",{fill:"#000000",d:"m765.53,143.17h39.84v121.59c0,19.44-5.99,34.54-17.97,45.3-11.29,9.72-26.65,14.58-46.08,14.58s-35.76-4.34-46.34-13.02c-10.24-8.68-15.45-19.7-15.62-33.07h40.1c.87,11.28,8.16,16.92,21.87,16.92,16.14,0,24.21-9.37,24.21-28.12v-19.53c-7.29,13.89-20.57,20.83-39.84,20.83-15.45,0-27.04-4.69-34.76-14.06-7.73-9.37-11.59-22.22-11.59-38.53v-72.9h39.83v66.91c0,18.05,7.38,27.08,22.13,27.08,7.81,0,13.8-2.82,17.97-8.46,4.17-5.64,6.25-13.41,6.25-23.3v-62.23Z"}),ve("path",{fill:"#000000",d:"m839.47,268.66V86.41h111.44v35.41h-69.26v49.21h69.26v34.63h-69.26v63.01h-42.18Z"}),ve("path",{fill:"#000000",d:"m1090.07,253.82c-12.59,12.5-29.47,18.75-50.64,18.75s-38.1-6.25-50.77-18.75c-12.67-12.5-19.01-28.47-19.01-47.91s6.33-35.36,19.01-47.78c12.67-12.41,29.59-18.62,50.77-18.62s38.05,6.21,50.64,18.62c12.58,12.41,18.88,28.34,18.88,47.78s-6.29,35.41-18.88,47.91Zm-50.64-15.1c9.2,0,16.49-3.03,21.87-9.11,5.38-6.07,8.07-13.97,8.07-23.69s-2.69-17.61-8.07-23.69c-5.38-6.07-12.67-9.11-21.87-9.11s-16.71,3.04-22,9.11c-5.3,6.08-7.94,13.97-7.94,23.69s2.64,17.62,7.94,23.69c5.29,6.08,12.63,9.11,22,9.11Z"}),ve("path",{fill:"#000000",d:"m1131.86,268.66v-125.5h39.84v18.23c7.46-14.41,21-21.61,40.62-21.61,30.55,0,45.82,17.1,45.82,51.29v77.59h-40.1v-64.57c0-10.76-1.69-18.57-5.08-23.43-3.39-4.86-9.07-7.29-17.05-7.29-16.14,0-24.21,9.89-24.21,29.68v65.61h-39.84Z"}),ve("path",{fill:"#000000",d:"m1353.43,237.68c5.55,0,10.15-.26,13.8-.78v31.76c-7.64,1.39-16.49,2.08-26.56,2.08-4.52,0-8.51-.26-11.98-.78-3.47-.52-7.38-1.69-11.72-3.52-4.34-1.82-7.9-4.3-10.68-7.42-2.78-3.13-5.17-7.64-7.16-13.54-2-5.9-2.99-12.84-2.99-20.83v-49.99h-19.79v-31.5h19.79v-37.23h39.84v37.23h28.38v31.5h-28.38v41.66c0,8.51,1.47,14.19,4.43,17.05,2.95,2.86,7.29,4.3,13.02,4.3Z"}),ve("path",{fill:"#000000",d:"m1513.55,199.4c0,5.21-.35,11.02-1.04,17.44h-92.69c.35,8.16,3.12,14.49,8.33,19.01,5.21,4.52,12.24,6.77,21.09,6.77,12.15,0,19.96-3.91,23.43-11.72h39.05c-1.91,12.33-8.64,22.35-20.18,30.07-11.55,7.72-25.65,11.59-42.31,11.59-21.35,0-38.19-5.9-50.51-17.7-12.33-11.8-18.49-28.12-18.49-48.95s6.16-36.67,18.49-48.56c12.32-11.89,28.73-17.83,49.21-17.83s35.23,5.56,47.39,16.66c12.15,11.11,18.23,25.52,18.23,43.22Zm-93.73-7.29h54.42c-.18-8.33-2.52-14.75-7.03-19.27-4.52-4.51-11.02-6.77-19.53-6.77s-15.23,2.39-20.18,7.16c-4.95,4.78-7.51,11.07-7.68,18.88Z"})]});import{jsx as ye,jsxs as Er}from"react/jsx-runtime";var Fr=({onToggleSideBar:e,isSidebarCollapsed:t})=>ye("button",{onClick:()=>e(!t),className:"w-6 h-12 bg-[#EEF2FF] rounded-tr-md [clip-path:polygon(0%_0%,100%_0%,100%_60%,0%_100%,0%_100%)] mt-5 flex justify-center items-center pb-2 text-gray-700",children:t?ye(fi,{}):ye(gi,{})}),fi=e=>Er("svg",{xmlns:"http://www.w3.org/2000/svg",width:"15",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"lucide lucide-panel-left-open-icon lucide-panel-left-open",...e,children:[ye("rect",{width:"18",height:"18",x:"3",y:"3",rx:"2"}),ye("path",{d:"M9 3v18"}),ye("path",{d:"m14 9 3 3-3 3"})]}),gi=e=>Er("svg",{xmlns:"http://www.w3.org/2000/svg",width:"15",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"lucide lucide-panel-right-open-icon lucide-panel-right-open",...e,children:[ye("rect",{width:"18",height:"18",x:"3",y:"3",rx:"2"}),ye("path",{d:"M15 3v18"}),ye("path",{d:"m10 15-3-3 3-3"})]});import{AnimatePresence as Ni,motion as Ri}from"framer-motion";import{useEffect as Pi}from"react";import{FiChevronRight as Li}from"react-icons/fi";import{useState as Mr,useEffect as Ar}from"react";var Ir=(e,t)=>{let[o,r]=Mr(t),[a,n]=Mr(!1);return Ar(()=>{n(!0);try{let s=localStorage.getItem(e);s&&r(JSON.parse(s))}catch(s){console.error("Error reading from localStorage:",s)}},[e]),Ar(()=>{if(a)try{localStorage.setItem(e,JSON.stringify(o))}catch(s){console.error("Error writing to localStorage:",s)}},[e,o,a]),[o,r]};import{useCallback as xi,useContext as Ci,useMemo as wi}from"react";import{createContext as bi,useMemo as vi}from"react";import{jsx as yi}from"react/jsx-runtime";var Lt=bi(void 0),hi=({permissions:e,children:t})=>{let o=vi(()=>e,[e]);return yi(Lt.Provider,{value:o,children:t})};var Br=()=>Ci(Lt),ut=e=>{let t=Br(),o=xi(a=>{if(!t||!a||t.some(p=>p.resource==="all"&&p.action==="administrator"))return!0;let{resource:s,action:c}=a,m=t.filter(p=>p.resource===s);return m.some(p=>p.action===c)?!0:c==="read"?m.some(p=>p.action==="write"):!1},[e]);return{hasPermission:wi(()=>o(e),[t,e]),validatePermission:o}};import{Fragment as Vr,jsx as X,jsxs as je}from"react/jsx-runtime";var ki={hidden:{opacity:0,height:0},visible:{opacity:1,height:"auto",transition:{duration:.3}}},Or=({isIconsOnly:e,isSidebarCollapsed:t,onToggleSideBar:o,currentPath:r,onNavigate:a,collapseType:n,links:s,appConfig:c,isMobile:m})=>{let l="@sidebar-expanded-menus",[p,u]=Ir(l,{}),{validatePermission:d}=ut({}),g=f=>{u(R=>({...R,[f]:!R[f]}))},N=f=>{if(!!f?.children?.length){e?(o(!t),u(x=>({...x,[f.id]:!0}))):g(f.id);return}a(`/${f.to}`)},y=f=>f.split("?")[0],v=f=>f?.children?.length?(f.children||[]).some(x=>y(r)===y(x.to)):y(r)===y(f.to);return Pi(()=>{let f={};s.forEach(R=>{R.children&&R.children.length>0&&R.children.some(x=>y(r)===y(x.to))&&(f[R.id]=!0)}),u(f)},[s,r,t]),X("ul",{className:"w-[90%] space-y-2.5",children:s.map((f,R)=>{if(f.isHidden||f.permission&&!d(f.permission)||c?.hiddenRoutes?.includes(f.key??""))return null;let x=v(f),b=!!f?.children?.length,h=p[f.id];return je("div",{className:"mb-1 relative flex flex-col justify-center items-center",onClick:()=>N(f),children:[x&&!m&&(e||!b||!h)&&X("div",{className:"absolute bg-primary-main w-2 h-4 rounded-r-full -translate-y-1/2 top-1/2 left-0"}),X("li",{id:f.id,className:i("cursor-pointer transition text-base duration-300 w-full text-[#00000066] font-medium rounded-md mx-auto max-w-full ml-4 p-2",{"bg-[#F6F8FF] text-primary-main ":x&&(!h||!t)},{"hover:bg-gray-100":!x&&(n!=="icons"||!t)},{"bg-white text-primary-main":x},{"flex justify-center text-primary-main !px-0 max-w-[70%]":e&&x,"flex justify-center !px-0 max-w-[70%]":e&&!x}),children:je("div",{className:i("flex items-center w-full",{"justify-center":e}),children:[X(yt,{trigger:X("span",{className:"w-6",onClick:()=>N(f),children:f.icon}),side:"right",hasArrow:!0,open:e?void 0:!1,children:f.name},R),(n!=="icons"||!t)&&je(Vr,{children:[X("span",{className:"px-3 text-nowrap",children:f.name}),b&&X("span",{className:"ml-auto transition-transform duration-300",style:{transform:h?"rotate(90deg)":"rotate(0deg)"},children:X(Li,{size:18})})]})]})},f.to),b&&(n!=="icons"||!t)&&X(Ni,{children:h&&X(Ri.div,{initial:"hidden",animate:"visible",exit:"hidden",variants:ki,className:"overflow-hidden w-full",children:je("ul",{className:" mt-1 relative ",children:[f.children?.map((w,D)=>{if(c?.hiddenRoutes?.includes(w.key??"")||w.isHidden||w.permission&&!d(w.permission))return null;let P=y(r)===y(w.to);return X("div",{id:w.id,className:i("relative pl-12 bg-blue-100- mt-4"),children:je("li",{className:i("cursor-pointer transition text-base duration-300 px-3 w-full text-black font-medium opacity-40 rounded-md text-nowrap",{"bg-transparent opacity-100 text-primary-main":P},{"hover:text-primary-main":!P}),onClick:()=>a(`/${w.to}`),children:[w.name,P&&je(Vr,{children:[!m&&X("div",{className:"absolute bg-primary-main w-2 h-4 rounded-r-full -translate-y-1/2 top-1/2 left-0"}),X("div",{id:"vertical-bar-child",className:"h-4 w-0.5 bg-primary-main absolute left-[30px] z-10 -translate-y-1/2 top-1/2 rounded-t-full rounded-b-full "})]})]})},w.key||D)}),X("div",{id:"vertical-bar",className:"bg-white rounded-t-full rounded-b-full h-full w-[4px] absolute left-[29px] top-0"})]})})})]},R)})})};import{Fragment as Ei,jsx as de,jsxs as kt}from"react/jsx-runtime";var Fi=({isSidebarCollapsed:e,onToggleSideBar:t,isMobile:o,links:r,businessProps:a,currentPath:n,onNavigate:s,appConfig:c,collapseType:m,onLogoutClick:l,openSidebarIcon:p=de(Tr,{}),closedSidebarIcon:u=de(Dr,{}),nodeAfterSideBarLogo:d})=>{let g=Hr(()=>o?"hidden":m||(o?"hidden":"icons"),[o,m]),[N,y]=Ti(!1),v=g==="icons"&&e,f=Si(null),{businessList:R,activeBusiness:x,toggleAddBusinessDrawer:b,handleSetActiveBusiness:h}=a,C=F=>y(F),w=F=>{h?.(F),C(!1)},D=Hr(()=>g==="hidden"?p:e?u:p,[e,p,u,g]),P=o&&g==="hidden"&&e;return kt(Ei,{children:[P&&de("div",{className:"fixed inset-0 z-40 bg-black bg-opacity-40 transition-all animate-in fade-in-15",onClick:()=>t(!1)}),kt("div",{className:i("relative flex flex-row h-full",{"fixed inset-0 z-50 pointer-events-none":P}),children:[de("div",{className:"absolute -right-[22px] top-0 z-20",children:g==="icons"&&de(Fr,{isSidebarCollapsed:e,onToggleSideBar:t})}),kt("aside",{id:"sidebar_menu",ref:f,className:i("sticky top-0 pt-4 h-[100dvh] max-h-[100dvh] bg-[#FBFBFB] overflow-hidden flex-col flex transition-all duration-300 w-64 gap-y-5",{"!fixed":g==="hidden","w-[311px]":e&&g!=="icons","w-[75px]":e&&g==="icons","w-[270px]":!e&&g==="icons","w-0 lg:w-0 pointer-events-none":!e&&g==="hidden","pointer-events-auto":e&&g==="hidden","left-0 top-0":o&&g==="hidden","-translate-x-full":!e&&o&&g!=="hidden","translate-x-0":e&&o&&g==="hidden"}),children:[kt("div",{className:i("flex items-center py-2 justify-center w-full",{"justify-between px-2":o}),children:[de("section",{className:i({"ml-2":o,"-ml-16":!e}),children:D}),g==="hidden"&&de("div",{onClick:()=>t(!1),className:"flex items-center gap-2 text-3xl cursor-pointer mr-5",children:de(Di,{size:24,className:"text-black hover:opacity-60"})})]}),d,de("div",{className:"flex-1 overflow-y-auto px-0 min-h-0",children:de(Or,{isIconsOnly:v,collapseType:g,currentPath:n,isSidebarCollapsed:e,links:r,onNavigate:s,onToggleSideBar:t,appConfig:c,isMobile:o})}),de("div",{className:"w-full mt-auto pb-5 shrink-0",children:de(Lr,{activeBusiness:x,handleSwitchBusiness:w,isBusinessShown:N,toggleAddBusinessDrawer:b,toggleShowBusiness:C,businesses:R||[],iconOnly:g==="icons"?e:!1,onLogoutClick:l,isMobile:o,onToggleSideBar:t,collapseType:g})})]})]})]})};import{jsx as to}from"react/jsx-runtime";var Mi=({status:e,variant:t,className:o})=>to("div",{children:to("div",{className:i("order-first max-w-max flex-none rounded-full px-2 py-1 text-xs font-medium ring-1 ring-inset ring-current sm:order-none text-[14px] capitalize",{"bg-green-500/20 text-green-500":t==="success"},{"bg-gray-500/20 text-white":t==="abandoned"},{"bg-red-500/20 text-red-500":t==="failed"},{"bg-yellow-500/20 text-yellow-500":t==="pending"},o),children:to("p",{children:e.replace("-"," ")})})});import{Loader as ms}from"lucide-react";import{jsx as _r,jsxs as Ai}from"react/jsx-runtime";var Gr=({tableBulkActions:e,selectedRows:t,isMobile:o=!1,id:r="bulk_row_actions"})=>{let a=t.length;return _r("div",{className:i(" border-t border-gray-200 px-4 py-3","flex items-center justify-between",o&&"flex-col gap-2"),id:r,children:_r("div",{className:i("flex gap-2",o&&"w-full justify-start flex-wrap"),children:e.map((n,s)=>Ai(Q,{variant:n.variant||"outlined",size:"sm",className:i("flex ietems-center justify-center",n.className),onClick:()=>n.onClick(t),leftNode:n.icon,disabled:n.disabled||a===0,id:`${r}_action_${s}`,children:[n.label," ",n.showCount!==!1&&a]},s))})})};import{ChevronLeftIcon as Bi,ChevronRightIcon as Vi}from"lucide-react";import{jsx as oo}from"react/jsx-runtime";var Ii=({page:e,currentPage:t,onClick:o,id:r="page-button"})=>typeof e=="string"?oo("span",{className:"px-3 py-1 sm:px-4 sm:py-2 text-xs sm:text-sm font-semibold text-gray-500",children:e}):oo("button",{onClick:o,id:`${r}-${e}`,className:`p-1 w-8 h-8 text-xs sm:text-sm rounded-full ${e===t?"bg-primary-main text-white":"text-[#717171] hover:bg-primary-main/10"}`,children:e}),Wr=({totalPages:e,currentPage:t,handlePageClick:o,id:r})=>{let n=()=>{let l=Math.floor(1.5),p=Math.max(1,t-l),u=Math.min(e,p+3-1);return u>e&&(p=Math.max(1,e-3+1),u=e),{start:p,end:u}},{start:s,end:c}=n(),m=[];return s>1&&m.push(1),s>2&&m.push("..."),m.push(...Array.from({length:c-s+1},(l,p)=>s+p)),c<e-1&&m.push("..."),c<e&&m.push(e),m.map((l,p)=>oo(Ii,{page:l,currentPage:t,id:r,onClick:typeof l=="number"?()=>o(l):void 0},p))};import{jsx as Xe,jsxs as ro}from"react/jsx-runtime";var ao=({currentPage:e=1,totalPages:t=1,onPageChange:o,itemsPerPage:r=0,totalItems:a=0,id:n="pagination"})=>{let s=l=>{l>=1&&l<=t&&o?.(l)},c=r===0?1:r*(e-1)+1,m=e===t?a:Math.min(c+r-1,a);return ro("div",{className:"flex items-center justify-between border-t border-gray-200 px-4 py-3 sm:px-6 w-full flex-wrap gap-y-10 sm:gap-y-0",children:[a&&Xe("section",{className:"text-[#717171] text-[12px]",children:ro("p",{className:"",children:["Showing ",c," - ",m," of ",a]})}),Xe("div",{className:"flex items-center justify-center sm:justify-end ",children:ro("nav",{className:" inline-flex gap-x-1 sm:gap-x-[10px] items-center",children:[Xe("button",{onClick:()=>s(e-1),id:`${n}-prev-button`,disabled:e===1,className:"text-xs text-[#222222] hover:bg-primary-main/10 disabled:text-[#D9D9D9] disabled:cursor-not-allowed sm:flex hidden",children:Xe(Bi,{className:"size-5"})}),Wr({currentPage:e,totalPages:t,handlePageClick:s,id:`${n}-page-button`}),Xe("button",{onClick:()=>s(e+1),id:`${n}-next-button`,disabled:e===t,className:"text-xs text-[#222222] hover:bg-primary-main/10 disabled:text-[#D9D9D9] disabled:cursor-not-allowed sm:flex hidden",children:Xe(Vi,{className:"size-5"})})]})})]})};import{flexRender as $r}from"@tanstack/react-table";import{jsx as xe,jsxs as Oi}from"react/jsx-runtime";var zr=({table:e,isMobile:t,onRowClick:o,id:r})=>xe("div",{className:i("relative w-full rounded-b border-0",{}),children:Oi("table",{id:r??"table",className:"w-full overflow-x-scroll",children:[xe("thead",{children:e.getHeaderGroups().map(a=>xe("tr",{className:i(" rounded text-[#717171] border-b- bg-[#FCFCFC]",{}),children:a.headers.map(n=>xe("th",{className:"relative py-3 text-base whitespace-nowrap pl-2.5 text-left font-normal capitalize",colSpan:n.colSpan,style:{width:n.getSize()},children:n.isPlaceholder?null:xe("div",{className:i("flex items-center",{"cursor-pointer select-none":n.column.getCanSort()}),onClick:n.column.getToggleSortingHandler(),children:n.isPlaceholder?null:$r(n.column.columnDef.header,n.getContext())})},n.id))},a.id))}),xe("tbody",{className:" pl-2.5",children:e?.getFilteredRowModel().rows.map(a=>xe("tr",{className:i("first-letter border-b border-zinc-100",{"hover:bg-gray-50":!t},{"hover:bg-gray-50 hover:cursor-pointer":o}),onClick:()=>o?o(a):{},children:a.getVisibleCells().map(n=>xe("td",{className:i("",{}),children:xe("div",{className:i("",{"w-max p-4 pl-2.5 text-black text-sm":!0}),children:$r(n.column.columnDef.cell,n.getContext())})},n.id))},a.id))})]})});import{Download as ls,ListFilter as cs,RotateCw as ds}from"lucide-react";import{PopoverClose as jr}from"@radix-ui/react-popover";import{useCallback as Ji,useEffect as Xr,useState as Qi}from"react";import{Controller as Mt,useForm as es}from"react-hook-form";import{v4 as Yr}from"uuid";import{format as zi}from"date-fns";import*as Y from"react";import{ChevronDown as Hi,ChevronLeft as _i,ChevronRight as Gi,ChevronUp as Wi}from"lucide-react";import{DayPicker as $i}from"react-day-picker";import{jsx as Dt}from"react/jsx-runtime";function no({className:e,classNames:t,showOutsideDays:o=!0,...r}){return Dt($i,{showOutsideDays:o,className:i("p-3",e),classNames:{months:"flex flex-col sm:flex-row space-y-4 sm:space-x-4 sm:space-y-0",month:"space-y-2 relative",month_caption:"flex justify-center pt-1 relative items-center",caption_label:"text-sm font-medium hidden",dropdowns:"flex justify-center gap-1 !px-4",nav:"space-x-1 flex items-center justify-between -top-7 relative",button_previous:i(J({variant:"outlined"}),"!h-7 !w-7 bg-transparent !text-black !border-0 p-0 opacity-50 hover:opacity-100 absolute left-1"),button_next:i(J({variant:"outlined"}),"!h-7 !w-7 bg-transparent !text-black !border-0 p-0 opacity-50 hover:opacity-100 absolute right-1"),month_grid:"w-full border-collapse space-y-1",weekdays:"flex",weekday:"text-muted-foreground rounded-md w-9 font-normal text-[0.8rem]",week:"flex w-full mt-2",day:"!h-9 !w-9 text-center text-sm p-0 relative [&:has([aria-selected].day-range-end)]:rounded-r-md [&:has([aria-selected].day-outside)]:bg-accent/50 [&:has([aria-selected])>button]:bg-primary-main first:[&:has([aria-selected])]:rounded-l-md last:[&:has([aria-selected])]:rounded-r-md focus-within:relative focus-within:z-20 [&[aria-selected=true]>button]:bg-primary-main [&[aria-selected=true]>button]:text-white",day_button:i(J({variant:"primary"}),"!h-9 !w-9 p-0 font-normal aria-selected:opacity-100 bg-white [&:has([aria-selected])]:!bg-primary-main [&:has([aria-selected])]:text-white text-black/60"),range_end:"day-range-end",selected:"!bg-primary-main !text-white hover:bg-primary-main hover:text-primary-foreground focus:bg-primary-main focus:text-primary-foreground",today:"bg-accent text-accent-foreground",outside:"day-outside text-muted-foreground aria-selected:bg-accent/50 aria-selected:text-muted-foreground",disabled:"text-muted-foreground opacity-50",range_middle:"aria-selected:bg-accent aria-selected:text-accent-foreground",hidden:"invisible",...t},components:{Chevron:({orientation:a,...n})=>Dt(a==="left"?_i:a==="right"?Gi:a==="up"?Wi:Hi,{className:"h-4 w-4",...n}),Dropdown:({value:a,onChange:n,options:s,...c})=>{let m=s?.map(d=>({label:d.label,value:d.value.toString()}))??[];(c.name==="year"||c["aria-label"]?.toLowerCase().includes("year"))&&(m=[...m].sort((d,g)=>Number(g.value)-Number(d.value)));let p=m.find(d=>d.value===a?.toString()),u=d=>{n?.({target:{value:d}})};return Dt("div",{onPointerDown:d=>d.stopPropagation(),children:Dt(De,{className:"!border-0 !max-w-max !min-w-max text-sm font-medium h-8",options:m,value:p,onChange:d=>u(d.value),modal:!0,id:`${c.id}-select`})})}},disabled:a=>a>new Date||a<new Date("1900-01-01"),...r})}no.displayName="Calendar";import{jsx as B,jsxs as Ce}from"react/jsx-runtime";var Ur=Y.forwardRef(({value:e,onClick:t,error:o,status:r,id:a},n)=>B("div",{className:"relative mt-2 rounded-md shadow-sm !w-full",children:Ce("button",{className:i($({status:r}),"flex items-center gap-2 text",{"text-gray-900 ring-gray-300 placeholder:text-gray-400 focus:ring-purple-600":!o,"text-red-900 ring-red-300 placeholder:text-red-300 focus:ring-red-500":o}),onClick:t,ref:n,id:a,type:"button",children:[Ce("svg",{xmlns:"http://www.w3.org/2000/svg",width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"lucide lucide-calendar-icon lucide-calendar",children:[B("path",{d:"M8 2v4"}),B("path",{d:"M16 2v4"}),B("rect",{width:"18",height:"18",x:"3",y:"4",rx:"2"}),B("path",{d:"M3 10h18"})]}),e||"Select a date"]})}));Ur.displayName="DateInputButton";var Zi=(e,t,o)=>{if(!e)return t;let r=new Date(e).toLocaleDateString("en-US",{year:"numeric",month:"long",day:"numeric"});if(o){let a=e.getHours().toString().padStart(2,"0"),n=e.getMinutes().toString().padStart(2,"0");return`${r} at ${a}:${n}`}return r};function Ui({value:e,className:t,placeholder:o="Pick a date",showTime:r,...a}){return B(H,{asChild:!0,className:i("cursor-pointer",t),children:B(Ur,{value:Zi(e,o,r),id:a.id,error:a?.error})})}function Ki({children:e,captionLayout:t="dropdown",fromYear:o,toYear:r,disableDate:a,modal:n,closeOnSelect:s=!1,showTime:c,onSelectTime:m,minDate:l,...p}){let[u,d]=Y.useState(!1),g=p.startMonth??(o?new Date(o,0):void 0),N=p.endMonth??(r?new Date(r,11):void 0),y=p.selected,[v,f]=Y.useState(y);Y.useEffect(()=>{f(y)},[y]),Y.useEffect(()=>{u&&!v&&l&&f(l)},[u,v,l]);let R=Y.useMemo(()=>{let C=Array.from({length:24},(D,P)=>({label:P.toString().padStart(2,"0"),value:P.toString()}));return!l||!v||!(v.toDateString()===l.toDateString())?C:C.filter(D=>parseInt(D.value,10)>=l.getHours())},[l,v]),x=Y.useMemo(()=>{let C=Array.from({length:60},(D,P)=>({label:P.toString().padStart(2,"0"),value:P.toString()}));return!l||!v||!(v.toDateString()===l.toDateString())?C:v.getHours()===l.getHours()?C.filter(D=>parseInt(D.value,10)>=l.getMinutes()):C},[l,v]),b=(C,w,D,P)=>{if(!C)return;let F=new Date(C);v&&(F.setHours(parseInt(v.getHours().toString(),10)),F.setMinutes(parseInt(v.getMinutes().toString(),10)),F.setSeconds(10),l&&F.toDateString()===l.toDateString()&&F<l&&(F.setHours(l.getHours()),F.setMinutes(l.getMinutes()))),p.onSelect?.(F,w,D,P),s&&d(!1)},h=(C,w)=>{let D=v?new Date(v):new Date,P=new Date(D);C==="hours"?P.setHours(parseInt(w,10)):P.setMinutes(parseInt(w,10)),m?.(P)};return Ce(K,{modal:n,open:a?!1:u,onOpenChange:d,children:[e,Ce(z,{portal:!1,align:"start",className:"w-auto p-0 overflow-hidden",children:[B(no,{id:`${p.id}-calendar-content`,mode:"single",...p,startMonth:g,endMonth:N,captionLayout:t,showOutsideDays:!1,onSelect:b,navLayout:"after"}),c&&Ce("div",{className:"flex items-center gap-2 px-4 pb-4 pt-2 border-t bg-gray-50/30",children:[Ce("div",{className:"flex flex-col gap-1.5 flex-1",children:[B("span",{className:"text-[10px] uppercase font-bold text-gray-500 tracking-wider",children:"Hours"}),B(De,{options:R,value:{value:v?.getHours().toString()??"0",label:v?.getHours().toString().padStart(2,"0")??"00"},onChange:C=>h("hours",C.value),className:"!min-w-[70px]",modal:!0})]}),Ce("div",{className:"flex flex-col gap-1.5 flex-1",children:[B("span",{className:"text-[10px] uppercase font-bold text-gray-500 tracking-wider",children:"Minutes"}),B(De,{options:x,value:{value:v?.getMinutes().toString()??"0",label:v?.getMinutes().toString().padStart(2,"0")??"00"},onChange:C=>h("minutes",C.value),className:"!min-w-[70px]",modal:!0})]})]})]})]})}var Zr=(e,t="yyyy-MM-dd")=>e?t==="iso"?new Date(e).toISOString():zi(new Date(e),t):"N/A",io=({label:e,optional:t,onChange:o,error:r,helpText:a,value:n,maxDate:s,closeOnSelect:c=!1,modal:m=!1,minDate:l,showTime:p=!1,id:u})=>{let d=Y.useMemo(()=>s?new Date(s):new Date("2099-12-31"),[s]),g=l?new Date(l):new Date("1900-01-01"),[N,y]=Y.useState(n?new Date(n):void 0),v=f=>{let R=new Date(f.getFullYear(),f.getMonth(),f.getDate()),x=new Date(g.getFullYear(),g.getMonth(),g.getDate()),b=new Date(d.getFullYear(),d.getMonth(),d.getDate());return R<x||R>b};return Y.useEffect(()=>{n&&y(new Date(n))},[n]),Ce("div",{className:"block w-full",children:[e&&Ce("div",{className:"flex justify-between w-full",children:[B(A,{className:"block text-sm font-medium mb-0 text-pallet-text-white-black",children:e}),t&&B("span",{className:"text-sm leading-6 text-gray-500",id:"email-optional",children:"Optional"})]}),B(Ki,{selected:N,onSelect:f=>{let R=f?Zr(f,p?"iso":"yyyy-MM-dd"):"";o(R)},onSelectTime:f=>{let R=Zr(f,"iso");o(R)},disabled:v,startMonth:g,endMonth:d,closeOnSelect:c,showTime:p,minDate:g,modal:m,id:u,children:B("div",{children:B(Ui,{id:u,status:r?"error":"default",value:n?new Date(n):void 0,showTime:p})})}),r&&B("p",{className:"mt-2 text-sm text-red-600",id:`${u}-error`,children:r}),a&&B("p",{className:"mt-2 text-sm text-gray-500",id:`${u}-description`,children:a})]})};import*as so from"react";import*as Te from"@radix-ui/react-radio-group";import{jsx as St}from"react/jsx-runtime";var Tt=so.forwardRef(({className:e,...t},o)=>St(Te.Root,{className:i("grid gap-2",e),...t,ref:o}));Tt.displayName=Te.Root.displayName;var Ft=so.forwardRef(({className:e,...t},o)=>St(Te.Item,{ref:o,className:i(`aspect-square h-4 w-4 rounded-full border border-[#808080] text-primary-main ring-offset-background focus-visible:outline-none
7
+ `},children:[j(mt,{activeBusiness:e,rightNode:j(Pr,{}),className:"bg-[#FAFAFA] border-none p-3"}),j("div",{className:"mt-3",children:j(G,{label:"Search Account",leftNode:j(mi,{className:"h-4 w-4 text-gray-500"}),value:l,onChange:f,placeholder:"Search Account",className:"text-sm"})}),j("ul",{className:"max-h-48 overflow-y-auto mt-2 px-1 space-y-2",children:u.map(g=>j(mt,{onTriggerClick:()=>N(g?.clientId),activeBusiness:g,rightNode:e.clientId===g.clientId?j(ci,{className:"text-primary-600",size:18}):void 0,className:i("bg-white border-none ",{"bg-[#FAFAFA]":e.clientId===g.clientId})},g.clientId))}),j("div",{className:"py-2 ",children:eo("button",{onClick:y,className:"w-full flex items-center justify-start gap-2 text-sm text-[#0033C7] border-[#BECFFF] border-[0.5px] rounded-lg py-2 px-3 hover:bg-primary-accent transition ",children:[j(pi,{size:18,className:"text-primary-main"})," Add Account"]})}),j("div",{className:"bg-[#FAFAFA] px-3 py-2 -m-3 mt-4",children:eo("button",{className:"w-full flex items-center gap-2 text-sm text-black hover:text-gray-700 transition p-2 hover:bg-primary-accent",onClick:v,children:[j(di,{size:16})," Log Out"]})})]})})})};import{jsx as Te,jsxs as gi}from"react/jsx-runtime";var kr=({activeBusiness:e,toggleAddBusinessDrawer:t,toggleShowBusiness:o,businesses:r=[],handleSwitchBusiness:a,iconOnly:n=!1,onLogoutClick:s,isMobile:c,onToggleSideBar:m,isBusinessShown:l,collapseType:p})=>Te("div",{className:"px-4 relative mb-0 ",children:Te(ie,{side:c?"top":"right",open:l,onOpenChange:o,align:"end",contentClassName:"!bg-transparent !shadow-none !p-0",trigger:Te("div",{className:"flex items-center w-full",children:Te(mt,{activeBusiness:e,onTriggerClick:()=>o(!0),iconOnly:n,rightNode:Te(fi,{className:"stroke-gray-500"})})}),children:Te(Lr,{activeBusiness:e,handleSwitchBusiness:a,toggleAddBusinessDrawer:t,businesses:r,onLogoutClick:s,onToggleSideBar:m,toggleShowBusiness:o,collapseType:p,isMobile:c})})}),fi=({className:e})=>gi("svg",{xmlns:"http://www.w3.org/2000/svg",width:"18",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",className:i("lucide lucide-chevrons-up-down-icon lucide-chevrons-up-down",e),children:[Te("path",{d:"M7 22l5 5 5-5"}),Te("path",{d:"M7 4l5-5 5 5"})]});import{jsx as Dr,jsxs as bi}from"react/jsx-runtime";var Sr=()=>bi("svg",{width:"100%",height:"32",viewBox:"0 0 20 32",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:"pl-5",children:[Dr("path",{d:"M19.686 5.71949V15.1448L19.6467 15.8434V15.8548V15.8663C19.5779 16.5076 19.4207 17.1146 19.1848 17.6758C19.0472 18.0079 18.8801 18.3286 18.6836 18.6149C18.5361 18.8439 18.3592 19.0615 18.1823 19.2677C18.025 19.4394 17.858 19.6112 17.6811 19.7601C17.5238 19.8975 17.3567 20.0235 17.1798 20.138C17.0127 20.2411 16.8456 20.3327 16.6786 20.4243C16.5606 20.4816 16.4427 20.5274 16.3149 20.5732L16.1773 20.6305L15.6761 20.8252L15.1748 21.0199L14.6736 21.2146L14.1723 21.4093L13.1698 21.7986L13.1207 21.8215V23.9402L13.0814 23.9517L12.7374 24.0777L12.6587 24.1006L12.3934 24.2036L12.1575 24.2953L12.0494 24.3296L11.7054 24.4556L11.6464 24.4785L11.3614 24.5816L11.1452 24.6617L11.0174 24.7075L10.6734 24.8335L10.6341 24.845L10.5849 24.8679H10.5653V20.745C10.5653 20.5732 10.5948 20.4129 10.6341 20.2526C10.6439 20.2182 10.6537 20.1838 10.6734 20.1495C10.752 19.9433 10.87 19.7601 11.0174 19.6112C11.0567 19.5769 11.096 19.5311 11.1452 19.4967C11.214 19.4394 11.2828 19.4051 11.3614 19.3593C11.381 19.3478 11.4105 19.3364 11.4302 19.3249L11.4498 19.3135L11.6562 19.2333L11.7152 19.2104L12.0592 19.0844L12.1673 19.0386L12.6686 18.8439L12.7472 18.8096L13.0912 18.6836L13.1796 18.6492L13.6809 18.4545L14.1821 18.2598L14.6834 18.0652L15.1846 17.8705L15.5483 17.733C15.5974 17.7216 15.6367 17.6987 15.6859 17.6758C15.8726 17.5956 16.0397 17.4811 16.1871 17.3551C16.3837 17.1948 16.5508 17.0001 16.6884 16.7825C16.9931 16.3244 17.17 15.7403 17.17 15.1333V5.71949C17.17 5.10106 17.0029 4.52844 16.6884 4.05889C16.5508 3.85275 16.3935 3.66951 16.2068 3.50917C16.197 3.49772 16.197 3.49772 16.1871 3.49772C16.0299 3.36029 15.8628 3.25722 15.6859 3.17705C15.5188 3.09689 15.3517 3.05108 15.1846 3.01672C15.0176 2.98236 14.8505 2.98236 14.6834 2.99382C14.5163 3.00527 14.3492 3.03963 14.1821 3.09689C14.1625 3.10834 14.133 3.10834 14.1133 3.11979L13.6809 3.28013L13.1796 3.46336L12.6784 3.65806L12.1378 3.82984L11.6366 4.02453L11.1353 4.20777L10.6341 4.40246L10.1328 4.5857L9.63159 4.76894L9.13034 4.96363L8.62909 5.14687L8.12784 5.3301L7.62659 5.52479L7.12534 5.70803L6.6241 5.90272L6.12285 6.08596L5.6216 6.28065L5.08103 6.46389L4.57979 6.65858L4.21614 6.79601C4.16699 6.81891 4.11785 6.83037 4.06871 6.85327C3.8918 6.93344 3.71489 7.04796 3.56746 7.17394C3.37089 7.33427 3.20381 7.52896 3.06621 7.74656C2.76153 8.2161 2.58462 8.78872 2.58462 9.40715V13.0948C2.58462 13.53 2.66325 13.8965 2.78119 14.2057C2.79102 14.2401 2.80085 14.263 2.8205 14.2973C2.81067 14.3088 2.79102 14.3088 2.78119 14.3202C2.70256 14.366 2.63376 14.4004 2.56496 14.4577C2.52565 14.4806 2.48634 14.5149 2.43719 14.5378C2.31925 14.618 2.20131 14.7096 2.0932 14.8012C2.08337 14.8127 2.06371 14.8241 2.05389 14.8356C1.94577 14.9272 1.84749 15.0188 1.74921 15.1104C1.68041 15.1792 1.61161 15.2479 1.55264 15.328C1.5035 15.3853 1.45435 15.4311 1.40521 15.4884C1.28727 15.6373 1.16933 15.7861 1.06122 15.9465C1.05139 15.9579 1.05139 15.9694 1.04156 15.9808C0.972761 16.0839 0.913791 16.1755 0.85482 16.2786C0.805678 16.1984 0.756536 16.1068 0.717223 16.0266C0.648424 15.9007 0.589453 15.7747 0.540311 15.6373C0.481341 15.4998 0.432199 15.3509 0.383057 15.2135C0.157004 14.5493 0.0390625 13.8392 0.0390625 13.1177V9.3957C0.0390625 8.50241 0.215974 7.63203 0.540311 6.87618C0.677909 6.54406 0.844992 6.22339 1.04156 5.93708C1.18899 5.70803 1.3659 5.49044 1.54281 5.28429C1.70006 5.11251 1.86715 4.94072 2.04406 4.79184C2.20131 4.65441 2.3684 4.52844 2.54531 4.41391C2.70256 4.31084 2.86964 4.21922 3.04656 4.1276C3.17432 4.07034 3.29227 4.01308 3.42003 3.96727L3.5478 3.92146L4.04905 3.73822L4.5503 3.54353L5.05155 3.36029L5.5528 3.1656L6.05405 2.98236L6.5553 2.78767L7.05654 2.60444L7.55779 2.40974L8.10818 2.22651L8.60943 2.03182L9.11068 1.84858L9.61193 1.66534L10.1132 1.47065L10.6144 1.28741L11.1157 1.09272L11.6169 0.909482L12.1182 0.714792L12.6194 0.531554L13.1207 0.336863L13.2878 0.279601C13.3959 0.233791 13.5138 0.199434 13.6317 0.165077C13.7988 0.119268 13.9659 0.073458 14.133 0.0505533C14.3001 0.0276485 14.4672 0.00474375 14.6342 0.00474375C14.8013 -0.00670864 14.9684 0.00474368 15.1355 0.0161961C15.3026 0.0276485 15.4697 0.0505533 15.6367 0.0849104C15.8038 0.119268 15.9709 0.165077 16.138 0.222339C16.3051 0.279601 16.482 0.348315 16.6392 0.428482C16.8063 0.508649 16.9832 0.61172 17.1405 0.714792C17.3174 0.829315 17.4845 0.955292 17.6417 1.09272C17.6417 1.09272 17.6417 1.09272 17.6516 1.09272C17.8285 1.2416 17.9956 1.40193 18.1528 1.58517C18.3396 1.77986 18.5066 1.99746 18.6541 2.22651C18.8506 2.52427 19.0177 2.83348 19.1553 3.1656C19.5091 3.95582 19.686 4.81475 19.686 5.71949Z",fill:"#0231C5"}),Dr("path",{d:"M10.8112 9.92822V13.0846L10.7425 13.1079L10.5557 13.1778L10.2412 13.2943L10.2215 13.3059L9.87755 13.434L9.73995 13.4923L9.53356 13.5738L9.48441 13.5855L9.27802 13.667L9.10111 13.7369L8.93402 13.7951L8.59986 13.9232H8.59003L8.24604 14.0514L8.08878 14.1096L7.90204 14.1795L7.58753 14.2959L7.56787 14.3076L7.22388 14.4357L7.08628 14.4939L6.87989 14.5755L6.83074 14.5871L6.57521 14.6803L6.53589 14.692L6.1919 14.8201L6.07396 14.8667L5.8479 14.9482L5.57271 15.053L5.51374 15.0763L5.16974 15.2044L5.07146 15.2394L4.88472 15.3093L4.82575 15.3326L4.56038 15.4374L4.48175 15.4723L4.19673 15.5771C4.17707 15.5888 4.15742 15.5888 4.13776 15.6004C4.10827 15.6121 4.07879 15.6237 4.05913 15.6354C3.97068 15.682 3.88222 15.7286 3.79377 15.7868C3.71514 15.8334 3.62668 15.8916 3.54806 15.9615C3.51857 15.9848 3.47926 16.0197 3.44977 16.0547C3.322 16.1712 3.21389 16.2993 3.10578 16.4507C3.08612 16.474 3.06646 16.5089 3.04681 16.5439C2.93869 16.7186 2.84041 16.9049 2.76178 17.1146C2.63401 17.464 2.56521 17.8367 2.56521 18.2327V27.5039C2.56521 27.7951 2.63401 28.0747 2.76178 28.3076C2.84041 28.459 2.95835 28.5988 3.08612 28.7153C3.09595 28.7269 3.09595 28.7269 3.10578 28.7269C3.21389 28.8201 3.322 28.89 3.44977 28.9249C3.55788 28.9715 3.67582 28.9948 3.79377 28.9948C3.90188 28.9948 4.01982 28.9831 4.13776 28.9482C4.16725 28.9366 4.19673 28.9249 4.22622 28.9133L4.47193 28.8201L4.81592 28.692L5.15991 28.5638L5.50391 28.4357L5.8479 28.3076L6.00516 28.2494C6.06413 28.2261 6.1231 28.1911 6.18207 28.1562C6.30984 28.098 6.41795 28.0164 6.52606 27.9116C6.65383 27.7951 6.77177 27.6554 6.87006 27.4923C7.06663 27.1662 7.17474 26.7585 7.17474 26.3392V19.7585L7.20422 19.7469L7.54822 19.6187L7.56787 19.6071L7.88238 19.4906L8.06912 19.4207L8.22638 19.3625L8.57037 19.2344H8.5802L8.91437 19.1063L9.08145 19.048L9.25836 18.9781L9.5827 18.85L9.60236 18.8384L9.71047 18.7918V26.3392C9.71047 26.6188 9.69081 26.9099 9.6515 27.1778C9.63184 27.2826 9.62201 27.3758 9.60236 27.4806C9.52373 27.8767 9.41562 28.2494 9.25836 28.5988C9.16008 28.8317 9.04214 29.053 8.91437 29.2743C8.80625 29.449 8.69814 29.6121 8.57037 29.7752C8.46226 29.9149 8.34432 30.043 8.22638 30.1595C8.11827 30.276 8.00032 30.3692 7.88238 30.474C7.77427 30.5672 7.65633 30.6487 7.53839 30.7302C7.43028 30.8001 7.31234 30.87 7.19439 30.9282C7.18457 30.9282 7.17474 30.9399 7.16491 30.9515C7.06663 30.9981 6.95851 31.0447 6.86023 31.0913C6.83074 31.1029 6.80126 31.1146 6.77177 31.1262L6.51624 31.2194L5.82825 31.4757L5.48425 31.6038L5.14026 31.7319L4.983 31.7901C4.92403 31.8134 4.86506 31.8367 4.80609 31.8484C4.68815 31.8833 4.58004 31.9183 4.4621 31.9415C4.34416 31.9648 4.23604 31.9881 4.1181 31.9881C4.00999 31.9998 3.91171 31.9998 3.81342 31.9998H3.78394C3.666 31.9998 3.55788 31.9881 3.43994 31.9765C3.322 31.9648 3.21389 31.9415 3.09595 31.9183C2.97801 31.895 2.8699 31.86 2.75195 31.8134C2.68316 31.7901 2.62419 31.7668 2.55539 31.7435C2.50624 31.7203 2.4571 31.697 2.40796 31.6737C2.29002 31.6154 2.18191 31.5572 2.06397 31.4873C1.94602 31.4174 1.82808 31.3359 1.71997 31.2427C1.67083 31.2078 1.62169 31.1612 1.57255 31.1262C1.50375 31.068 1.44478 31.0098 1.37598 30.9399C1.25804 30.8234 1.1401 30.6953 1.03198 30.5555C0.904214 30.4041 0.786273 30.2294 0.687989 30.0547C0.550391 29.8334 0.442278 29.6004 0.343994 29.3559C0.117941 28.7735 0 28.1329 0 27.469V18.1978C0 17.4524 0.117941 16.7302 0.343994 16.0663C0.393136 15.9149 0.442278 15.7751 0.501249 15.6354C0.560219 15.4956 0.61919 15.3675 0.67816 15.2394C0.717474 15.1462 0.766616 15.0647 0.815758 14.9831C0.874728 14.8783 0.933699 14.7735 1.0025 14.6803C1.0025 14.6687 1.01233 14.657 1.02215 14.657C1.13027 14.494 1.23838 14.3425 1.36615 14.1911C1.41529 14.1329 1.4546 14.0746 1.51358 14.0281C1.58237 13.9465 1.64134 13.8883 1.71014 13.8184C1.80843 13.7252 1.90671 13.6204 2.01482 13.5389C2.02465 13.5272 2.04431 13.5156 2.05414 13.5039C2.16225 13.4108 2.28019 13.3176 2.39813 13.2477C2.43745 13.2244 2.47676 13.1895 2.5259 13.1662C2.5947 13.1196 2.67333 13.073 2.74213 13.0264C2.75195 13.0147 2.76178 13.0147 2.78144 13.0031C2.86007 12.9565 2.94852 12.9099 3.02715 12.875C3.04681 12.8633 3.06646 12.8517 3.08612 12.8517C3.1844 12.8051 3.29252 12.7585 3.3908 12.7236L3.42029 12.7119L3.51857 12.677L3.76428 12.5838L4.02965 12.479L4.10828 12.444L4.45227 12.3159L4.5309 12.281L4.79626 12.1878L4.85523 12.1645L5.04197 12.0946L5.14026 12.0597L5.48425 11.9316L5.54322 11.9083L5.81842 11.8034L6.04447 11.7219L6.16241 11.6753L6.50641 11.5472L6.54572 11.5355L6.80126 11.4424L6.8504 11.4307L7.0568 11.3492L7.19439 11.3026L7.53839 11.1745L7.55805 11.1628L7.87256 11.0464L8.0593 10.9765L8.21655 10.9182L8.56054 10.7901H8.57037L8.90454 10.662L9.07162 10.6038L9.24853 10.5339L9.45493 10.4523L9.50407 10.4407L9.71047 10.3592L9.84807 10.3009L10.1921 10.1728L10.2117 10.1612L10.5262 10.0447L10.713 9.97481L10.8112 9.92822Z",fill:"#0231C5"})]});import{jsx as ve,jsxs as Tr}from"react/jsx-runtime";var Fr=()=>Tr("svg",{width:"100%",height:40,xmlns:"http://www.w3.org/2000/svg",id:"Layer_1","data-name":"Layer 1",viewBox:"0 0 1565.51 377.21",children:[Tr("g",{children:[ve("path",{fill:"#0231C5",d:"m277.49,86.74v85.18l-.41,6.31v.21c-.72,5.8-2.38,11.28-4.86,16.35-1.45,3-3.21,5.9-5.28,8.49-1.55,2.07-3.42,4.04-5.28,5.9-1.66,1.55-3.42,3.11-5.28,4.45-1.66,1.24-3.42,2.38-5.28,3.42-1.76.93-3.52,1.76-5.28,2.59-1.24.52-2.48.93-3.83,1.35l-1.45.52-5.28,1.76-5.28,1.76-5.28,1.76-5.28,1.76-10.56,3.52-.52.21v19.15l-.41.1-3.62,1.14-.83.21-2.79.93-2.48.83-1.14.31-3.62,1.14-.62.21-3,.93-2.28.72-1.35.41-3.62,1.14-.41.1-.52.21h-.21v-37.26c0-1.55.31-3,.72-4.45.1-.31.21-.62.41-.93.83-1.86,2.07-3.52,3.62-4.86.41-.31.83-.72,1.35-1.04.72-.52,1.45-.83,2.28-1.24.21-.1.52-.21.72-.31l.21-.1,2.17-.72.62-.21,3.62-1.14,1.14-.41,5.28-1.76.83-.31,3.62-1.14.93-.31,5.28-1.76,5.28-1.76,5.28-1.76,5.28-1.76,3.83-1.24c.52-.1.93-.31,1.45-.52,1.97-.72,3.73-1.76,5.28-2.9,2.07-1.45,3.83-3.21,5.28-5.18,3.21-4.14,5.07-9.42,5.07-14.9v-85.08c0-5.59-1.76-10.76-5.07-15.01-1.45-1.86-3.11-3.52-5.07-4.97q-.1-.1-.21-.1c-1.66-1.24-3.42-2.17-5.28-2.9-1.76-.72-3.52-1.14-5.28-1.45-1.76-.31-3.52-.31-5.28-.21-1.76.1-3.52.41-5.28.93-.21.1-.52.1-.72.21l-4.55,1.45-5.28,1.66-5.28,1.76-5.69,1.55-5.28,1.76-5.28,1.66-5.28,1.76-5.28,1.66-5.28,1.66-5.28,1.76-5.28,1.66-5.28,1.66-5.28,1.76-5.28,1.66-5.28,1.76-5.28,1.66-5.28,1.76-5.69,1.66-5.28,1.76-3.83,1.24c-.52.21-1.04.31-1.55.52-1.86.72-3.73,1.76-5.28,2.9-2.07,1.45-3.83,3.21-5.28,5.18-3.21,4.24-5.07,9.42-5.07,15.01v33.33c0,3.93.83,7.25,2.07,10.04.1.31.21.52.41.83-.1.1-.31.1-.41.21-.83.41-1.55.72-2.28,1.24-.41.21-.83.52-1.35.72-1.24.72-2.48,1.55-3.62,2.38-.1.1-.31.21-.41.31-1.14.83-2.17,1.66-3.21,2.48-.72.62-1.45,1.24-2.07,1.97-.52.52-1.04.93-1.55,1.45-1.24,1.35-2.48,2.69-3.62,4.14-.1.1-.1.21-.21.31-.72.93-1.35,1.76-1.97,2.69-.52-.72-1.04-1.55-1.45-2.28-.72-1.14-1.35-2.28-1.86-3.52-.62-1.24-1.14-2.59-1.66-3.83-2.38-6-3.62-12.42-3.62-18.94v-33.64c0-8.07,1.86-15.94,5.28-22.77,1.45-3,3.21-5.9,5.28-8.49,1.55-2.07,3.42-4.04,5.28-5.9,1.66-1.55,3.42-3.11,5.28-4.45,1.66-1.24,3.42-2.38,5.28-3.42,1.66-.93,3.42-1.76,5.28-2.59,1.35-.52,2.59-1.04,3.93-1.45l1.35-.41,5.28-1.66,5.28-1.76,5.28-1.66,5.28-1.76,5.28-1.66,5.28-1.76,5.28-1.66,5.28-1.76,5.8-1.66,5.28-1.76,5.28-1.66,5.28-1.66,5.28-1.76,5.28-1.66,5.28-1.76,5.28-1.66,5.28-1.76,5.28-1.66,5.28-1.76,1.76-.52c1.14-.41,2.38-.72,3.62-1.04,1.76-.41,3.52-.83,5.28-1.04,1.76-.21,3.52-.41,5.28-.41,1.76-.1,3.52,0,5.28.1,1.76.1,3.52.31,5.28.62,1.76.31,3.52.72,5.28,1.24,1.76.52,3.62,1.14,5.28,1.86,1.76.72,3.62,1.66,5.28,2.59,1.86,1.04,3.62,2.17,5.28,3.42h.1c1.86,1.35,3.62,2.79,5.28,4.45,1.97,1.76,3.73,3.73,5.28,5.8,2.07,2.69,3.83,5.49,5.28,8.49,3.73,7.14,5.59,14.9,5.59,23.08Z"}),ve("path",{fill:"#0231C5",d:"m184.03,136.63v28.05l-.72.21-1.97.62-3.31,1.04-.21.1-3.62,1.14-1.45.52-2.17.72-.52.1h0l-2.17.72-1.86.62-1.76.52-3.52,1.14h-.1l-3.62,1.14-1.66.52-1.97.62-3.31,1.04-.21.1-3.62,1.14-1.45.52-2.17.72-.52.1-2.69.83-.41.1-3.62,1.14-1.24.41-2.38.72-2.9.93-.62.21-3.62,1.14-1.04.31-1.97.62-.62.21-2.79.93-.83.31-3,.93c-.21.1-.41.1-.62.21-.31.1-.62.21-.83.31-.93.41-1.86.83-2.79,1.35-.83.41-1.76.93-2.59,1.55-.31.21-.72.52-1.04.83-1.35,1.04-2.48,2.17-3.62,3.52-.21.21-.41.52-.62.83-1.14,1.55-2.17,3.21-3,5.07-1.35,3.11-2.07,6.42-2.07,9.94v82.39c0,2.59.72,5.07,2.07,7.14.83,1.35,2.07,2.59,3.42,3.62q.1.1.21.1c1.14.83,2.28,1.45,3.62,1.76,1.14.41,2.38.62,3.62.62,1.14,0,2.38-.1,3.62-.41.31-.1.62-.21.93-.31l2.59-.83,3.62-1.14,3.62-1.14,3.62-1.14,3.62-1.14,1.66-.52c.62-.21,1.24-.52,1.86-.83,1.35-.52,2.48-1.24,3.62-2.17,1.35-1.04,2.59-2.28,3.62-3.73,2.07-2.9,3.21-6.52,3.21-10.25v-58.48l.31-.1,3.62-1.14.21-.1,3.31-1.04,1.97-.62,1.66-.52,3.62-1.14h.1l3.52-1.14,1.76-.52,1.86-.62,3.42-1.14.21-.1,1.14-.41v67.07c0,2.48-.21,5.07-.62,7.45-.21.93-.31,1.76-.52,2.69-.83,3.52-1.97,6.83-3.62,9.94-1.04,2.07-2.28,4.04-3.62,6-1.14,1.55-2.28,3-3.62,4.45-1.14,1.24-2.38,2.38-3.62,3.42-1.14,1.04-2.38,1.86-3.62,2.79-1.14.83-2.38,1.55-3.62,2.28-1.14.62-2.38,1.24-3.62,1.76-.1,0-.21.1-.31.21-1.04.41-2.17.83-3.21,1.24-.31.1-.62.21-.93.31l-2.69.83-7.25,2.28-3.62,1.14-3.62,1.14-1.66.52c-.62.21-1.24.41-1.86.52-1.24.31-2.38.62-3.62.83-1.24.21-2.38.41-3.62.41-1.14.1-2.17.1-3.21.1h-.31c-1.24,0-2.38-.1-3.62-.21-1.24-.1-2.38-.31-3.62-.52s-2.38-.52-3.62-.93c-.72-.21-1.35-.41-2.07-.62-.52-.21-1.04-.41-1.55-.62-1.24-.52-2.38-1.04-3.62-1.66s-2.48-1.35-3.62-2.17c-.52-.31-1.04-.72-1.55-1.04-.72-.52-1.35-1.04-2.07-1.66-1.24-1.04-2.48-2.17-3.62-3.42-1.35-1.35-2.59-2.9-3.62-4.45-1.45-1.97-2.59-4.04-3.62-6.21-2.38-5.18-3.62-10.87-3.62-16.77v-82.39c0-6.62,1.24-13.04,3.62-18.94.52-1.35,1.04-2.59,1.66-3.83s1.24-2.38,1.86-3.52c.41-.83.93-1.55,1.45-2.28.62-.93,1.24-1.86,1.97-2.69,0-.1.1-.21.21-.21,1.14-1.45,2.28-2.79,3.62-4.14.52-.52.93-1.04,1.55-1.45.72-.72,1.35-1.24,2.07-1.86,1.04-.83,2.07-1.76,3.21-2.48.1-.1.31-.21.41-.31,1.14-.83,2.38-1.66,3.62-2.28.41-.21.83-.52,1.35-.72.72-.41,1.55-.83,2.28-1.24.1-.1.21-.1.41-.21.83-.41,1.76-.83,2.59-1.14.21-.1.41-.21.62-.21,1.04-.41,2.17-.83,3.21-1.14l.31-.1,1.04-.31,2.59-.83,2.79-.93.83-.31,3.62-1.14.83-.31,2.79-.83.62-.21,1.97-.62,1.04-.31,3.62-1.14.62-.21,2.9-.93,2.38-.72,1.24-.41,3.62-1.14.41-.1,2.69-.83.52-.1,2.17-.72,1.45-.41,3.62-1.14.21-.1,3.31-1.04,1.97-.62,1.66-.52,3.62-1.14h.1l3.52-1.14,1.76-.52,1.86-.62,2.17-.72h0l.52-.1,2.17-.72,1.45-.52,3.62-1.14.21-.1,3.31-1.04,1.97-.62,1.04-.41Z"})]}),ve("path",{fill:"#000000",d:"m433.57,86.41c18.92,0,34.54,6.21,46.87,18.62,12.32,12.41,18.49,28.16,18.49,47.26s-6.16,34.85-18.49,47.26c-12.33,12.41-27.95,18.62-46.87,18.62h-35.41v50.51h-42.18V86.41h77.59Zm-6.51,97.38c8.5,0,15.49-2.95,20.96-8.85,5.47-5.9,8.2-13.45,8.2-22.65s-2.73-16.75-8.2-22.65c-5.47-5.9-12.46-8.85-20.96-8.85h-28.9v63.01h28.9Z"}),ve("path",{fill:"#000000",d:"m568.18,272.05c-18.23,0-32.63-6.16-43.22-18.49-10.59-12.32-15.88-28.21-15.88-47.65s5.47-34.89,16.4-47.39c10.94-12.5,25.34-18.75,43.22-18.75,8.85,0,16.75,1.91,23.69,5.73,6.94,3.82,12.15,9.03,15.62,15.62v-17.96h39.58v125.5h-39.58v-17.7c-3.47,6.25-8.81,11.33-16.01,15.23-7.2,3.91-15.15,5.86-23.82,5.86Zm11.46-33.07c9.54,0,16.92-3.12,22.13-9.37,5.21-6.25,7.81-14.15,7.81-23.69s-2.6-17.18-7.81-23.43c-5.21-6.25-12.59-9.37-22.13-9.37-9.03,0-16.27,3.04-21.74,9.11-5.47,6.08-8.2,13.97-8.2,23.69s2.73,17.66,8.2,23.82c5.47,6.16,12.71,9.24,21.74,9.24Z"}),ve("path",{fill:"#000000",d:"m765.53,143.17h39.84v121.59c0,19.44-5.99,34.54-17.97,45.3-11.29,9.72-26.65,14.58-46.08,14.58s-35.76-4.34-46.34-13.02c-10.24-8.68-15.45-19.7-15.62-33.07h40.1c.87,11.28,8.16,16.92,21.87,16.92,16.14,0,24.21-9.37,24.21-28.12v-19.53c-7.29,13.89-20.57,20.83-39.84,20.83-15.45,0-27.04-4.69-34.76-14.06-7.73-9.37-11.59-22.22-11.59-38.53v-72.9h39.83v66.91c0,18.05,7.38,27.08,22.13,27.08,7.81,0,13.8-2.82,17.97-8.46,4.17-5.64,6.25-13.41,6.25-23.3v-62.23Z"}),ve("path",{fill:"#000000",d:"m839.47,268.66V86.41h111.44v35.41h-69.26v49.21h69.26v34.63h-69.26v63.01h-42.18Z"}),ve("path",{fill:"#000000",d:"m1090.07,253.82c-12.59,12.5-29.47,18.75-50.64,18.75s-38.1-6.25-50.77-18.75c-12.67-12.5-19.01-28.47-19.01-47.91s6.33-35.36,19.01-47.78c12.67-12.41,29.59-18.62,50.77-18.62s38.05,6.21,50.64,18.62c12.58,12.41,18.88,28.34,18.88,47.78s-6.29,35.41-18.88,47.91Zm-50.64-15.1c9.2,0,16.49-3.03,21.87-9.11,5.38-6.07,8.07-13.97,8.07-23.69s-2.69-17.61-8.07-23.69c-5.38-6.07-12.67-9.11-21.87-9.11s-16.71,3.04-22,9.11c-5.3,6.08-7.94,13.97-7.94,23.69s2.64,17.62,7.94,23.69c5.29,6.08,12.63,9.11,22,9.11Z"}),ve("path",{fill:"#000000",d:"m1131.86,268.66v-125.5h39.84v18.23c7.46-14.41,21-21.61,40.62-21.61,30.55,0,45.82,17.1,45.82,51.29v77.59h-40.1v-64.57c0-10.76-1.69-18.57-5.08-23.43-3.39-4.86-9.07-7.29-17.05-7.29-16.14,0-24.21,9.89-24.21,29.68v65.61h-39.84Z"}),ve("path",{fill:"#000000",d:"m1353.43,237.68c5.55,0,10.15-.26,13.8-.78v31.76c-7.64,1.39-16.49,2.08-26.56,2.08-4.52,0-8.51-.26-11.98-.78-3.47-.52-7.38-1.69-11.72-3.52-4.34-1.82-7.9-4.3-10.68-7.42-2.78-3.13-5.17-7.64-7.16-13.54-2-5.9-2.99-12.84-2.99-20.83v-49.99h-19.79v-31.5h19.79v-37.23h39.84v37.23h28.38v31.5h-28.38v41.66c0,8.51,1.47,14.19,4.43,17.05,2.95,2.86,7.29,4.3,13.02,4.3Z"}),ve("path",{fill:"#000000",d:"m1513.55,199.4c0,5.21-.35,11.02-1.04,17.44h-92.69c.35,8.16,3.12,14.49,8.33,19.01,5.21,4.52,12.24,6.77,21.09,6.77,12.15,0,19.96-3.91,23.43-11.72h39.05c-1.91,12.33-8.64,22.35-20.18,30.07-11.55,7.72-25.65,11.59-42.31,11.59-21.35,0-38.19-5.9-50.51-17.7-12.33-11.8-18.49-28.12-18.49-48.95s6.16-36.67,18.49-48.56c12.32-11.89,28.73-17.83,49.21-17.83s35.23,5.56,47.39,16.66c12.15,11.11,18.23,25.52,18.23,43.22Zm-93.73-7.29h54.42c-.18-8.33-2.52-14.75-7.03-19.27-4.52-4.51-11.02-6.77-19.53-6.77s-15.23,2.39-20.18,7.16c-4.95,4.78-7.51,11.07-7.68,18.88Z"})]});import{jsx as ye,jsxs as Mr}from"react/jsx-runtime";var Er=({onToggleSideBar:e,isSidebarCollapsed:t})=>ye("button",{onClick:()=>e(!t),className:"w-6 h-12 bg-[#EEF2FF] rounded-tr-md [clip-path:polygon(0%_0%,100%_0%,100%_60%,0%_100%,0%_100%)] mt-5 flex justify-center items-center pb-2 text-gray-700",children:t?ye(vi,{}):ye(hi,{})}),vi=e=>Mr("svg",{xmlns:"http://www.w3.org/2000/svg",width:"15",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"lucide lucide-panel-left-open-icon lucide-panel-left-open",...e,children:[ye("rect",{width:"18",height:"18",x:"3",y:"3",rx:"2"}),ye("path",{d:"M9 3v18"}),ye("path",{d:"m14 9 3 3-3 3"})]}),hi=e=>Mr("svg",{xmlns:"http://www.w3.org/2000/svg",width:"15",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"lucide lucide-panel-right-open-icon lucide-panel-right-open",...e,children:[ye("rect",{width:"18",height:"18",x:"3",y:"3",rx:"2"}),ye("path",{d:"M15 3v18"}),ye("path",{d:"m10 15-3-3 3-3"})]});import{AnimatePresence as Li,motion as ki}from"framer-motion";import{useEffect as Di}from"react";import{FiChevronRight as Si}from"react-icons/fi";import{useState as Ar,useEffect as Ir}from"react";var Br=(e,t)=>{let[o,r]=Ar(t),[a,n]=Ar(!1);return Ir(()=>{n(!0);try{let s=localStorage.getItem(e);s&&r(JSON.parse(s))}catch(s){console.error("Error reading from localStorage:",s)}},[e]),Ir(()=>{if(a)try{localStorage.setItem(e,JSON.stringify(o))}catch(s){console.error("Error writing to localStorage:",s)}},[e,o,a]),[o,r]};import{useCallback as Ni,useContext as Ri,useMemo as Pi}from"react";import{createContext as yi,useMemo as xi}from"react";import{jsx as wi}from"react/jsx-runtime";var Lt=yi(void 0),Ci=({permissions:e,children:t})=>{let o=xi(()=>e,[e]);return wi(Lt.Provider,{value:o,children:t})};var Vr=()=>Ri(Lt),ut=e=>{let t=Vr(),o=Ni(a=>{if(!t||!a||t.some(p=>p.resource==="all"&&p.action==="administrator"))return!0;let{resource:s,action:c}=a,m=t.filter(p=>p.resource===s);return m.some(p=>p.action===c)?!0:c==="read"?m.some(p=>p.action==="write"):!1},[e]);return{hasPermission:Pi(()=>o(e),[t,e]),validatePermission:o}};import{Fragment as Or,jsx as X,jsxs as je}from"react/jsx-runtime";var Ti={hidden:{opacity:0,height:0},visible:{opacity:1,height:"auto",transition:{duration:.3}}},Hr=({isIconsOnly:e,isSidebarCollapsed:t,onToggleSideBar:o,currentPath:r,onNavigate:a,collapseType:n,links:s,appConfig:c,isMobile:m})=>{let l="@sidebar-expanded-menus",[p,u]=Br(l,{}),{validatePermission:d}=ut({}),f=g=>{u(R=>({...R,[g]:!R[g]}))},N=g=>{if(!!g?.children?.length){e?(o(!t),u(x=>({...x,[g.id]:!0}))):f(g.id);return}a(`/${g.to}`)},y=g=>g.split("?")[0],v=g=>g?.children?.length?(g.children||[]).some(x=>y(r)===y(x.to)):y(r)===y(g.to);return Di(()=>{let g={};s.forEach(R=>{R.children&&R.children.length>0&&R.children.some(x=>y(r)===y(x.to))&&(g[R.id]=!0)}),u(g)},[s,r,t]),X("ul",{className:"w-[90%] space-y-2.5",children:s.map((g,R)=>{if(g.isHidden||g.permission&&!d(g.permission)||c?.hiddenRoutes?.includes(g.key??""))return null;let x=v(g),b=!!g?.children?.length,h=p[g.id];return je("div",{className:"mb-1 relative flex flex-col justify-center items-center",onClick:()=>N(g),children:[x&&!m&&(e||!b||!h)&&X("div",{className:"absolute bg-primary-main w-2 h-4 rounded-r-full -translate-y-1/2 top-1/2 left-0"}),X("li",{id:g.id,className:i("cursor-pointer transition text-base duration-300 w-full text-[#00000066] font-medium rounded-md mx-auto max-w-full ml-4 p-2",{"bg-[#F6F8FF] text-primary-main ":x&&(!h||!t)},{"hover:bg-gray-100":!x&&(n!=="icons"||!t)},{"bg-white text-primary-main":x},{"flex justify-center text-primary-main !px-0 max-w-[70%]":e&&x,"flex justify-center !px-0 max-w-[70%]":e&&!x}),children:je("div",{className:i("flex items-center w-full",{"justify-center":e}),children:[X(yt,{trigger:X("span",{className:"w-6",onClick:()=>N(g),children:g.icon}),side:"right",hasArrow:!0,open:e?void 0:!1,children:g.name},R),(n!=="icons"||!t)&&je(Or,{children:[X("span",{className:"px-3 text-nowrap",children:g.name}),b&&X("span",{className:"ml-auto transition-transform duration-300",style:{transform:h?"rotate(90deg)":"rotate(0deg)"},children:X(Si,{size:18})})]})]})},g.to),b&&(n!=="icons"||!t)&&X(Li,{children:h&&X(ki.div,{initial:"hidden",animate:"visible",exit:"hidden",variants:Ti,className:"overflow-hidden w-full",children:je("ul",{className:" mt-1 relative ",children:[g.children?.map((w,D)=>{if(c?.hiddenRoutes?.includes(w.key??"")||w.isHidden||w.permission&&!d(w.permission))return null;let P=y(r)===y(w.to);return X("div",{id:w.id,className:i("relative pl-12 bg-blue-100- mt-4"),children:je("li",{className:i("cursor-pointer transition text-base duration-300 px-3 w-full text-black font-medium opacity-40 rounded-md text-nowrap",{"bg-transparent opacity-100 text-primary-main":P},{"hover:text-primary-main":!P}),onClick:()=>a(`/${w.to}`),children:[w.name,P&&je(Or,{children:[!m&&X("div",{className:"absolute bg-primary-main w-2 h-4 rounded-r-full -translate-y-1/2 top-1/2 left-0"}),X("div",{id:"vertical-bar-child",className:"h-4 w-0.5 bg-primary-main absolute left-[30px] z-10 -translate-y-1/2 top-1/2 rounded-t-full rounded-b-full "})]})]})},w.key||D)}),X("div",{id:"vertical-bar",className:"bg-white rounded-t-full rounded-b-full h-full w-[4px] absolute left-[29px] top-0"})]})})})]},R)})})};import{Fragment as Ii,jsx as de,jsxs as kt}from"react/jsx-runtime";var Ai=({isSidebarCollapsed:e,onToggleSideBar:t,isMobile:o,links:r,businessProps:a,currentPath:n,onNavigate:s,appConfig:c,collapseType:m,onLogoutClick:l,openSidebarIcon:p=de(Fr,{}),closedSidebarIcon:u=de(Sr,{}),nodeAfterSideBarLogo:d})=>{let f=_r(()=>o?"hidden":m||(o?"hidden":"icons"),[o,m]),[N,y]=Mi(!1),v=f==="icons"&&e,g=Ei(null),{businessList:R,activeBusiness:x,toggleAddBusinessDrawer:b,handleSetActiveBusiness:h}=a,C=F=>y(F),w=F=>{h?.(F),C(!1)},D=_r(()=>f==="hidden"?p:e?u:p,[e,p,u,f]),P=o&&f==="hidden"&&e;return kt(Ii,{children:[P&&de("div",{className:"fixed inset-0 z-40 bg-black bg-opacity-40 transition-all animate-in fade-in-15",onClick:()=>t(!1)}),kt("div",{className:i("relative flex flex-row h-full",{"fixed inset-0 z-50 pointer-events-none":P}),children:[de("div",{className:"absolute -right-[22px] top-0 z-20",children:f==="icons"&&de(Er,{isSidebarCollapsed:e,onToggleSideBar:t})}),kt("aside",{id:"sidebar_menu",ref:g,className:i("sticky top-0 pt-4 h-[100dvh] max-h-[100dvh] bg-[#FBFBFB] overflow-hidden flex-col flex transition-all duration-300 w-64 gap-y-5",{"!fixed":f==="hidden","w-[311px]":e&&f!=="icons","w-[75px]":e&&f==="icons","w-[270px]":!e&&f==="icons","w-0 lg:w-0 pointer-events-none":!e&&f==="hidden","pointer-events-auto":e&&f==="hidden","left-0 top-0":o&&f==="hidden","-translate-x-full":!e&&o&&f!=="hidden","translate-x-0":e&&o&&f==="hidden"}),children:[kt("div",{className:i("flex items-center py-2 justify-center w-full",{"justify-between px-2":o}),children:[de("section",{className:i({"ml-2":o,"-ml-16":!e}),children:D}),f==="hidden"&&de("div",{onClick:()=>t(!1),className:"flex items-center gap-2 text-3xl cursor-pointer mr-5",children:de(Fi,{size:24,className:"text-black hover:opacity-60"})})]}),d,de("div",{className:"flex-1 overflow-y-auto px-0 min-h-0",children:de(Hr,{isIconsOnly:v,collapseType:f,currentPath:n,isSidebarCollapsed:e,links:r,onNavigate:s,onToggleSideBar:t,appConfig:c,isMobile:o})}),de("div",{className:"w-full mt-auto pb-5 shrink-0",children:de(kr,{activeBusiness:x,handleSwitchBusiness:w,isBusinessShown:N,toggleAddBusinessDrawer:b,toggleShowBusiness:C,businesses:R||[],iconOnly:f==="icons"?e:!1,onLogoutClick:l,isMobile:o,onToggleSideBar:t,collapseType:f})})]})]})]})};import{jsx as to}from"react/jsx-runtime";var Bi=({status:e,variant:t,className:o})=>to("div",{children:to("div",{className:i("order-first max-w-max flex-none rounded-full px-2 py-1 text-xs font-medium ring-1 ring-inset ring-current sm:order-none text-[14px] capitalize",{"bg-green-500/20 text-green-500":t==="success"},{"bg-gray-500/20 text-white":t==="abandoned"},{"bg-red-500/20 text-red-500":t==="failed"},{"bg-yellow-500/20 text-yellow-500":t==="pending"},o),children:to("p",{children:e.replace("-"," ")})})});import{Loader as gs}from"lucide-react";import{jsx as Gr,jsxs as Vi}from"react/jsx-runtime";var Wr=({tableBulkActions:e,selectedRows:t,isMobile:o=!1,id:r="bulk_row_actions"})=>{let a=t.length;return Gr("div",{className:i(" border-t border-gray-200 px-4 py-3","flex items-center justify-between",o&&"flex-col gap-2"),id:r,children:Gr("div",{className:i("flex gap-2",o&&"w-full justify-start flex-wrap"),children:e.map((n,s)=>Vi(Q,{variant:n.variant||"outlined",size:"sm",className:i("flex ietems-center justify-center",n.className),onClick:()=>n.onClick(t),leftNode:n.icon,disabled:n.disabled||a===0,id:`${r}_action_${s}`,children:[n.label," ",n.showCount!==!1&&a]},s))})})};import{ChevronLeftIcon as Hi,ChevronRightIcon as _i}from"lucide-react";import{jsx as oo}from"react/jsx-runtime";var Oi=({page:e,currentPage:t,onClick:o,id:r="page-button"})=>typeof e=="string"?oo("span",{className:"px-3 py-1 sm:px-4 sm:py-2 text-xs sm:text-sm font-semibold text-gray-500",children:e}):oo("button",{onClick:o,id:`${r}-${e}`,className:`p-1 w-8 h-8 text-xs sm:text-sm rounded-full ${e===t?"bg-primary-main text-white":"text-[#717171] hover:bg-primary-main/10"}`,children:e}),$r=({totalPages:e,currentPage:t,handlePageClick:o,id:r})=>{let n=()=>{let l=Math.floor(1.5),p=Math.max(1,t-l),u=Math.min(e,p+3-1);return u>e&&(p=Math.max(1,e-3+1),u=e),{start:p,end:u}},{start:s,end:c}=n(),m=[];return s>1&&m.push(1),s>2&&m.push("..."),m.push(...Array.from({length:c-s+1},(l,p)=>s+p)),c<e-1&&m.push("..."),c<e&&m.push(e),m.map((l,p)=>oo(Oi,{page:l,currentPage:t,id:r,onClick:typeof l=="number"?()=>o(l):void 0},p))};import{jsx as Xe,jsxs as ro}from"react/jsx-runtime";var ao=({currentPage:e=1,totalPages:t=1,onPageChange:o,itemsPerPage:r=0,totalItems:a=0,id:n="pagination"})=>{let s=l=>{l>=1&&l<=t&&o?.(l)},c=r===0?1:r*(e-1)+1,m=e===t?a:Math.min(c+r-1,a);return ro("div",{className:"flex items-center justify-between border-t border-gray-200 px-4 py-3 sm:px-6 w-full flex-wrap gap-y-10 sm:gap-y-0",children:[a&&Xe("section",{className:"text-[#717171] text-[12px]",children:ro("p",{className:"",children:["Showing ",c," - ",m," of ",a]})}),Xe("div",{className:"flex items-center justify-center sm:justify-end ",children:ro("nav",{className:" inline-flex gap-x-1 sm:gap-x-[10px] items-center",children:[Xe("button",{onClick:()=>s(e-1),id:`${n}-prev-button`,disabled:e===1,className:"text-xs text-[#222222] hover:bg-primary-main/10 disabled:text-[#D9D9D9] disabled:cursor-not-allowed sm:flex hidden",children:Xe(Hi,{className:"size-5"})}),$r({currentPage:e,totalPages:t,handlePageClick:s,id:`${n}-page-button`}),Xe("button",{onClick:()=>s(e+1),id:`${n}-next-button`,disabled:e===t,className:"text-xs text-[#222222] hover:bg-primary-main/10 disabled:text-[#D9D9D9] disabled:cursor-not-allowed sm:flex hidden",children:Xe(_i,{className:"size-5"})})]})})]})};import{flexRender as zr}from"@tanstack/react-table";import{jsx as xe,jsxs as Gi}from"react/jsx-runtime";var Zr=({table:e,isMobile:t,onRowClick:o,id:r})=>xe("div",{className:i("relative w-full rounded-b border-0",{}),children:Gi("table",{id:r??"table",className:"w-full overflow-x-scroll",children:[xe("thead",{children:e.getHeaderGroups().map(a=>xe("tr",{className:i(" rounded text-[#717171] border-b- bg-[#FCFCFC]",{}),children:a.headers.map(n=>xe("th",{className:"relative py-3 text-base whitespace-nowrap pl-2.5 text-left font-normal capitalize",colSpan:n.colSpan,style:{width:n.getSize()},children:n.isPlaceholder?null:xe("div",{className:i("flex items-center",{"cursor-pointer select-none":n.column.getCanSort()}),onClick:n.column.getToggleSortingHandler(),children:n.isPlaceholder?null:zr(n.column.columnDef.header,n.getContext())})},n.id))},a.id))}),xe("tbody",{className:" pl-2.5",children:e?.getFilteredRowModel().rows.map(a=>xe("tr",{className:i("first-letter border-b border-zinc-100",{"hover:bg-gray-50":!t},{"hover:bg-gray-50 hover:cursor-pointer":o}),onClick:()=>o?o(a):{},children:a.getVisibleCells().map(n=>xe("td",{className:i("",{}),children:xe("div",{className:i("",{"w-max p-4 pl-2.5 text-black text-sm":!0}),children:zr(n.column.columnDef.cell,n.getContext())})},n.id))},a.id))})]})});import{Download as ps,ListFilter as ms,RotateCw as us}from"lucide-react";import{PopoverClose as Xr}from"@radix-ui/react-popover";import{useCallback as ts,useEffect as Yr,useState as os}from"react";import{Controller as Mt,useForm as rs}from"react-hook-form";import{v4 as qr}from"uuid";import{format as Ki}from"date-fns";import*as Y from"react";import{ChevronDown as Wi,ChevronLeft as $i,ChevronRight as zi,ChevronUp as Zi}from"lucide-react";import{DayPicker as Ui}from"react-day-picker";import{jsx as Dt}from"react/jsx-runtime";function no({className:e,classNames:t,showOutsideDays:o=!0,...r}){return Dt(Ui,{showOutsideDays:o,className:i("p-3",e),classNames:{months:"flex flex-col sm:flex-row space-y-4 sm:space-x-4 sm:space-y-0",month:"space-y-2 relative",month_caption:"flex justify-center pt-1 relative items-center",caption_label:"text-sm font-medium hidden",dropdowns:"flex justify-center gap-1 !px-4",nav:"space-x-1 flex items-center justify-between -top-7 relative",button_previous:i(J({variant:"outlined"}),"!h-7 !w-7 bg-transparent !text-black !border-0 p-0 opacity-50 hover:opacity-100 absolute left-1"),button_next:i(J({variant:"outlined"}),"!h-7 !w-7 bg-transparent !text-black !border-0 p-0 opacity-50 hover:opacity-100 absolute right-1"),month_grid:"w-full border-collapse space-y-1",weekdays:"flex",weekday:"text-muted-foreground rounded-md w-9 font-normal text-[0.8rem]",week:"flex w-full mt-2",day:"!h-9 !w-9 text-center text-sm p-0 relative [&:has([aria-selected].day-range-end)]:rounded-r-md [&:has([aria-selected].day-outside)]:bg-accent/50 [&:has([aria-selected])>button]:bg-primary-main first:[&:has([aria-selected])]:rounded-l-md last:[&:has([aria-selected])]:rounded-r-md focus-within:relative focus-within:z-20 [&[aria-selected=true]>button]:bg-primary-main [&[aria-selected=true]>button]:text-white",day_button:i(J({variant:"primary"}),"!h-9 !w-9 p-0 font-normal aria-selected:opacity-100 bg-white [&:has([aria-selected])]:!bg-primary-main [&:has([aria-selected])]:text-white text-black/60"),range_end:"day-range-end",selected:"!bg-primary-main !text-white hover:bg-primary-main hover:text-primary-foreground focus:bg-primary-main focus:text-primary-foreground",today:"bg-accent text-accent-foreground",outside:"day-outside text-muted-foreground aria-selected:bg-accent/50 aria-selected:text-muted-foreground",disabled:"text-muted-foreground opacity-50",range_middle:"aria-selected:bg-accent aria-selected:text-accent-foreground",hidden:"invisible",...t},components:{Chevron:({orientation:a,...n})=>Dt(a==="left"?$i:a==="right"?zi:a==="up"?Zi:Wi,{className:"h-4 w-4",...n}),Dropdown:({value:a,onChange:n,options:s,...c})=>{let m=s?.map(d=>({label:d.label,value:d.value.toString()}))??[];(c.name==="year"||c["aria-label"]?.toLowerCase().includes("year"))&&(m=[...m].sort((d,f)=>Number(f.value)-Number(d.value)));let p=m.find(d=>d.value===a?.toString()),u=d=>{n?.({target:{value:d}})};return Dt("div",{onPointerDown:d=>d.stopPropagation(),children:Dt(Se,{className:"!border-0 !max-w-max !min-w-max text-sm font-medium h-8",options:m,value:p,onChange:d=>u(d.value),modal:!0,id:`${c.id}-select`})})}},disabled:a=>a>new Date||a<new Date("1900-01-01"),...r})}no.displayName="Calendar";import{jsx as B,jsxs as Ce}from"react/jsx-runtime";var Kr=Y.forwardRef(({value:e,onClick:t,error:o,status:r,id:a},n)=>B("div",{className:"relative mt-2 rounded-md shadow-sm !w-full",children:Ce("button",{className:i($({status:r}),"flex items-center gap-2 text",{"text-gray-900 ring-gray-300 placeholder:text-gray-400 focus:ring-purple-600":!o,"text-red-900 ring-red-300 placeholder:text-red-300 focus:ring-red-500":o}),onClick:t,ref:n,id:a,type:"button",children:[Ce("svg",{xmlns:"http://www.w3.org/2000/svg",width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"lucide lucide-calendar-icon lucide-calendar",children:[B("path",{d:"M8 2v4"}),B("path",{d:"M16 2v4"}),B("rect",{width:"18",height:"18",x:"3",y:"4",rx:"2"}),B("path",{d:"M3 10h18"})]}),e||"Select a date"]})}));Kr.displayName="DateInputButton";var ji=(e,t,o)=>{if(!e)return t;let r=new Date(e).toLocaleDateString("en-US",{year:"numeric",month:"long",day:"numeric"});if(o){let a=e.getHours().toString().padStart(2,"0"),n=e.getMinutes().toString().padStart(2,"0");return`${r} at ${a}:${n}`}return r};function Xi({value:e,className:t,placeholder:o="Pick a date",showTime:r,...a}){return B(H,{asChild:!0,className:i("cursor-pointer",t),children:B(Kr,{value:ji(e,o,r),id:a.id,error:a?.error})})}function Yi({children:e,captionLayout:t="dropdown",fromYear:o,toYear:r,disableDate:a,modal:n,closeOnSelect:s=!1,showTime:c,onSelectTime:m,minDate:l,...p}){let[u,d]=Y.useState(!1),f=p.startMonth??(o?new Date(o,0):void 0),N=p.endMonth??(r?new Date(r,11):void 0),y=p.selected,[v,g]=Y.useState(y);Y.useEffect(()=>{g(y)},[y]),Y.useEffect(()=>{u&&!v&&l&&g(l)},[u,v,l]);let R=Y.useMemo(()=>{let C=Array.from({length:24},(D,P)=>({label:P.toString().padStart(2,"0"),value:P.toString()}));return!l||!v||!(v.toDateString()===l.toDateString())?C:C.filter(D=>parseInt(D.value,10)>=l.getHours())},[l,v]),x=Y.useMemo(()=>{let C=Array.from({length:60},(D,P)=>({label:P.toString().padStart(2,"0"),value:P.toString()}));return!l||!v||!(v.toDateString()===l.toDateString())?C:v.getHours()===l.getHours()?C.filter(D=>parseInt(D.value,10)>=l.getMinutes()):C},[l,v]),b=(C,w,D,P)=>{if(!C)return;let F=new Date(C);v&&(F.setHours(parseInt(v.getHours().toString(),10)),F.setMinutes(parseInt(v.getMinutes().toString(),10)),F.setSeconds(10),l&&F.toDateString()===l.toDateString()&&F<l&&(F.setHours(l.getHours()),F.setMinutes(l.getMinutes()))),p.onSelect?.(F,w,D,P),s&&d(!1)},h=(C,w)=>{let D=v?new Date(v):new Date,P=new Date(D);C==="hours"?P.setHours(parseInt(w,10)):P.setMinutes(parseInt(w,10)),m?.(P)};return Ce(K,{modal:n,open:a?!1:u,onOpenChange:d,children:[e,Ce(z,{portal:!1,align:"start",className:"w-auto p-0 overflow-hidden",children:[B(no,{id:`${p.id}-calendar-content`,mode:"single",...p,startMonth:f,endMonth:N,captionLayout:t,showOutsideDays:!1,onSelect:b,navLayout:"after"}),c&&Ce("div",{className:"flex items-center gap-2 px-4 pb-4 pt-2 border-t bg-gray-50/30",children:[Ce("div",{className:"flex flex-col gap-1.5 flex-1",children:[B("span",{className:"text-[10px] uppercase font-bold text-gray-500 tracking-wider",children:"Hours"}),B(Se,{options:R,value:{value:v?.getHours().toString()??"0",label:v?.getHours().toString().padStart(2,"0")??"00"},onChange:C=>h("hours",C.value),className:"!min-w-[70px]",modal:!0})]}),Ce("div",{className:"flex flex-col gap-1.5 flex-1",children:[B("span",{className:"text-[10px] uppercase font-bold text-gray-500 tracking-wider",children:"Minutes"}),B(Se,{options:x,value:{value:v?.getMinutes().toString()??"0",label:v?.getMinutes().toString().padStart(2,"0")??"00"},onChange:C=>h("minutes",C.value),className:"!min-w-[70px]",modal:!0})]})]})]})]})}var Ur=(e,t="yyyy-MM-dd")=>e?t==="iso"?new Date(e).toISOString():Ki(new Date(e),t):"N/A",io=({label:e,optional:t,onChange:o,error:r,helpText:a,value:n,maxDate:s,closeOnSelect:c=!1,modal:m=!1,minDate:l,showTime:p=!1,id:u})=>{let d=Y.useMemo(()=>s?new Date(s):new Date("2099-12-31"),[s]),f=l?new Date(l):new Date("1900-01-01"),[N,y]=Y.useState(n?new Date(n):void 0),v=g=>{let R=new Date(g.getFullYear(),g.getMonth(),g.getDate()),x=new Date(f.getFullYear(),f.getMonth(),f.getDate()),b=new Date(d.getFullYear(),d.getMonth(),d.getDate());return R<x||R>b};return Y.useEffect(()=>{n&&y(new Date(n))},[n]),Ce("div",{className:"block w-full",children:[e&&Ce("div",{className:"flex justify-between w-full",children:[B(A,{className:"block text-sm font-medium mb-0 text-pallet-text-white-black",children:e}),t&&B("span",{className:"text-sm leading-6 text-gray-500",id:"email-optional",children:"Optional"})]}),B(Yi,{selected:N,onSelect:g=>{let R=g?Ur(g,p?"iso":"yyyy-MM-dd"):"";o(R)},onSelectTime:g=>{let R=Ur(g,"iso");o(R)},disabled:v,startMonth:f,endMonth:d,closeOnSelect:c,showTime:p,minDate:f,modal:m,id:u,children:B("div",{children:B(Xi,{id:u,status:r?"error":"default",value:n?new Date(n):void 0,showTime:p})})}),r&&B("p",{className:"mt-2 text-sm text-red-600",id:`${u}-error`,children:r}),a&&B("p",{className:"mt-2 text-sm text-gray-500",id:`${u}-description`,children:a})]})};import*as so from"react";import*as Fe from"@radix-ui/react-radio-group";import{jsx as St}from"react/jsx-runtime";var Tt=so.forwardRef(({className:e,...t},o)=>St(Fe.Root,{className:i("grid gap-2",e),...t,ref:o}));Tt.displayName=Fe.Root.displayName;var Ft=so.forwardRef(({className:e,...t},o)=>St(Fe.Item,{ref:o,className:i(`aspect-square h-4 w-4 rounded-full border border-[#808080] text-primary-main ring-offset-background focus-visible:outline-none
8
8
  focus-visible:border-purplring-purple-200 focus-visible:!ring-primary-main focus-visible:!ring-status-success-bg focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-purple-200
9
- focus:border-purplring-purple-200 focus:!ring-primary-main focus:!ring-status-success-bg focus:ring-2 focus:ring-ring focus:ring-offset-2 focus:ring-purple-200 disabled:cursor-not-allowed disabled:opacity-50`,e),...t,children:St(Te.Indicator,{className:"rounded-full flex items-center justify-center",children:St("div",{className:"h-2 w-2 bg-current text-current rounded-full transition"})})}));Ft.displayName=Te.Item.displayName;import{create as ji}from"zustand";var Et="filter_",Xi=e=>{Kr();let t=new URLSearchParams(window?.location?.search);Object.keys(e).forEach(o=>{t.set(`${Et}${o}`,e[o])}),console.log("params",t.toString()),window.history.replaceState({},"",`${window.location.pathname}?${t}`)},Kr=()=>{let e=new URLSearchParams(window.location.search),t=[];e.forEach((o,r)=>{r.startsWith(Et)&&t.push(r)}),t.forEach(o=>e.delete(o)),window.history.replaceState({},"",`${window.location.pathname}?${e}`)},Yi=()=>{if(typeof window>"u")return{};let e=new URLSearchParams(window.location.search),t={};return e.forEach((o,r)=>{r.startsWith(Et)&&(t[r.replace(Et,"")]=o)}),t},qi=()=>ji()(e=>({filters:Yi(),resetFilters:()=>{e({filters:null}),Kr()},upDateFilter:t=>e(o=>{let r;return typeof t=="function"?r=t(o.filters):r={...o?.filters,...t},Xi(r),{filters:r}})})),ft=()=>qi();import{Fragment as ts,jsx as _,jsxs as Fe}from"react/jsx-runtime";var qr=({filters:e,values:t={},setAppliedFilters:o,onChange:r,id:a="filter-content"})=>{let n=ft(),{upDateFilter:s,resetFilters:c,filters:m}=n(),[l,p]=Qi(!0),u=()=>{p(!0)},{control:d,handleSubmit:g,watch:N,resetField:y}=es({defaultValues:m??t,mode:"all"});Xr(()=>{l&&o&&(o(m),p(!1))},[l]),Xr(()=>{if(!r)return;let b=N(h=>{r(h)});return()=>b.unsubscribe()},[r,N]);let v=()=>{c(),u()},f=b=>{let h=Object.fromEntries(Object.entries(b??{}).filter(([,C])=>C!==void 0&&C!==""));s(h),u()},R=Ji(b=>{y(b,{defaultValue:""});let h={...N()};delete h[b];let C=Object.fromEntries(Object.entries(h??{}).filter(([,w])=>w!==void 0&&w!==""));if(v(),f(C),r){let D={...N()};delete D[b],r(D)}},[y,m,s,r,N]),x=b=>{let h=N(b);return h!=null&&h!==""&&(Array.isArray(h)?h.length>0:!0)?_("div",{className:"flex justify-end mt-1",children:_("button",{onClick:()=>R(b),type:"button",className:"text-gray-500 text-[10px] font-medium p-0.5 px-1.5 border rounded-md hover:bg-gray-50 transition-colors",id:`${a}-${b}-clear-button`,children:"Clear"})}):null};return Fe("form",{onSubmit:g(f),children:[_("div",{className:"space-y-2 max-h-[350px] overflow-y-auto pr-2 -mr-2",children:e.map(b=>{switch(b.type){case"input":return Fe("div",{children:[_(Mt,{name:b.key,control:d,render:({field:h,formState:C})=>_(G,{error:C?.errors?.root?.message,placeholder:b?.placeholder,id:`${a}-${b.key}`,...h,...b})}),x(b?.key)]},b.key);case"drop-down":return Fe("div",{children:[_(Mt,{name:b.key,control:d,render:({field:{value:h,onChange:C},formState:{errors:w}})=>_(De,{label:b?.label,options:b?.options,value:b?.options?.find(D=>String(D?.value)===String(h)),onChange:D=>C(D?.value),error:w?.[b?.key]?.message,modal:!0,placeholder:b?.placeholder,className:"!h-10",id:`${a}-${b.key}`,hideSearch:!!(b?.hideSearch??!0)})}),x(b?.key)]},b.key);case"radio":return Fe("div",{children:[_(Mt,{name:b.key,control:d,render:({field:{value:h,onChange:C}})=>Fe(ts,{children:[_(A,{className:"block text-sm font-medium mb-2 text-pallet-text-white-black",children:b?.label}),_(Tt,{onValueChange:C,defaultValue:h,"aria-label":b?.label,id:`${a}-${b.key}`,children:_("div",{className:"flex items-center gap-2",children:b?.options?.map(w=>Fe("div",{className:"flex items-center space-x-2",children:[_(Ft,{value:w?.value,id:`${a}-${b.key}-${w?.value}`}),_("label",{htmlFor:`${a}-${b.key}-${w?.value}`,className:"text-xs",children:w?.label})]},Yr()))})},`${Yr()}-${h}`)]})}),x(b?.key)]},b.key);case"date":return Fe("div",{children:[_(Mt,{name:b.key,control:d,render:({field:h})=>_(io,{onChange:h?.onChange,value:h?.value,label:b?.label,id:`${a}-${b.key}`})}),x(b?.key)]},b.key);default:return null}})}),Fe("div",{style:{marginTop:28},className:"grid grid-cols-2 gap-2",children:[_(jr,{onClick:v,className:i(J({variant:"outlined",size:"sm"})),type:"button",id:`${a}-reset-button`,children:"Reset"}),_(jr,{className:i(J({size:"sm"})),type:"submit",id:`${a}-submit-button`,children:"Submit"})]})]})};import{ListFilter as is}from"lucide-react";import{useEffect as os,useState as rs}from"react";import{Fragment as Jr,jsx as lo}from"react/jsx-runtime";var Qr=({setAppliedFilters:e})=>{let[t,o]=rs(!0),r=ft(),{filters:a}=r(),n=Object.keys(a??{});return os(()=>{t&&e&&(e(a),o(!1))},[t]),lo(Jr,{children:n?.length?lo("div",{className:"flex rounded-s-md bg-primary-main p-1 text-white text-sm px-2.5",children:n?.length}):lo(Jr,{})})};import{useEffect as as,useState as ns}from"react";var ea=()=>{let[e,t]=ns(!1);return as(()=>(t(!0),()=>t(!1)),[]),{mounted:e,MounClient:r=>e?{children:r}:null}};import{jsx as Ye,jsxs as ss}from"react/jsx-runtime";var co=({filters:e,setAppliedFilters:t,isOpen:o=!1,onChange:r,id:a="filter-popover"})=>{let{mounted:n}=ea();return n?Ye("div",{className:"",children:Ye(ie,{id:`${a}-filter-popover`,defaultOpen:o,trigger:ss("button",{title:"Filter",className:i("!border-[#DEDEDE] !text-gray-800 !p-0 flex items-center",J({variant:"outlined",size:"sm"})),type:"button",children:[Ye("span",{className:"!px-[10px] !py-[8px]",children:Ye(is,{className:"w-4 h-4",size:5})}),Ye(Qr,{setAppliedFilters:t})]}),contentClassName:"!border border-gray-200 pt-2",children:Ye(qr,{filters:e,setAppliedFilters:t,id:a,onChange:r})})}):null};import{Fragment as ps,jsx as Z,jsxs as At}from"react/jsx-runtime";var po=({onRefetch:e,search:t,FilterMenu:o,ExtraNode:r,onExport:a,download:n,isRefetching:s,filterListOptions:c=[],setAppliedFilters:m,onFilterChange:l,id:p="table-toolbar"})=>{let u=g=>{t?.onSearch?.(g)},d=()=>{try{e?.()}catch(g){console.error("Error while refetching data",g)}};return Z(ps,{children:(e||t?.enabled||o||r||a)&&At("div",{className:"w-full flex flex-col sm:!flex-row justify-between items-start sm:items-center bg-white p-2 gap-2",children:[Z("div",{className:"flex flex-1 flex-col sm:flex-row items-center gap-2 justify-start",children:At("div",{className:" w-full flex gap-x-3",children:[t?.enabled&&Z("section",{className:"sm:w-56",children:Z(jt,{type:"text",placeholder:"Enter search here...",className:"h-9",onChange:u,debounce:t?.debounceRate,id:`${p}-search-input`})}),At("div",{className:" flex gap-2",children:[e&&Z(Q,{onClick:d,title:"Refetch Data",disabled:s,variant:"outlined",className:"!border-[#DEDEDE] !text-gray-800 !px-[10px] !py-[8px] ",size:"sm",id:`${p}-refetch-button`,children:Z(ds,{className:i("w-4 h-4",{"animate-spin":s}),size:5})}),c?.length?Z(co,{setAppliedFilters:m,filters:c,id:`${p}-filter-popover`,onChange:l}):null,o&&Z(ie,{id:`${p}-deprecated-filter-popover`,trigger:Z("button",{title:"Filter",className:i("!border-[#DEDEDE] !text-gray-800 !px-[10px] !py-[8px]",J({variant:"outlined",size:"sm"})),children:Z(cs,{className:"w-4 h-4",size:5})}),children:o})]})]})}),Z("div",{className:"flex items-start flex-col gap-2 justify-center",children:Z("section",{className:"flex flex-col-reverse sm:flex-row gap-2",children:At("div",{className:"flex gap-2",children:[r&&r,a&&Z(Q,{variant:"primary",onClick:a,size:"sm",id:`${p}-export-button`,children:"Export"}),n?.enabled&&Z(Q,{variant:"primary",leftNode:Z(ls,{className:"w-4 h-5",size:5}),onClick:n?.onDownload,id:n.buttonId,size:"sm",isLoading:n?.isDownloading,children:n?.buttonText})]})})})]})})};import{jsx as he,jsxs as ta}from"react/jsx-runtime";var us=({table:e,isMobile:t=!1,onRowClick:o,id:r="table",onRefetch:a,isRefetching:n,FilterMenu:s,ExtraNode:c,onExport:m,search:l={enabled:!1,debounceRate:700},download:p={enabled:!1,buttonId:"download_button",buttonText:"Export"},isLoading:u,pagination:d,filterListOptions:g,setAppliedFilters:N,onFilterChange:y,tableBulkActions:v,emptyDataMessage:f})=>{let R=v&&Array.isArray(v.selectedRows)&&v.selectedRows.length>0;return ta("div",{className:i("relative w-full rounded-b border-0 overflow-x-auto"),children:[he(po,{onRefetch:a,search:l,FilterMenu:s,ExtraNode:c,onExport:m,download:p,isRefetching:n,filterListOptions:g,setAppliedFilters:N,id:r,onFilterChange:y}),R&&v?.actions?.length&&he(Gr,{tableBulkActions:v.actions,selectedRows:v.selectedRows??[],isMobile:t,id:`${r}-bulk-actions`}),he("main",{className:"w-full overflow-x-auto mt-5",children:u?ta("div",{className:"py-10 flex flex-col justify-center w-full items-center space-x-2",children:[he(ms,{size:20,className:"animate-spin"}),he("p",{className:"mt-3 text-center text-gray-600 text-sm opacity-70 animate-pulse",children:"Loading..."})]}):e.getRowModel().rows.length<1?he("div",{className:"py-10 flex flex-col justify-center w-full items-center",children:f||he("p",{className:"text-center text-gray-600 text-sm opacity-70",children:"No data available"})}):he("div",{className:"flex flex-col gap-2",children:he(zr,{table:e,isMobile:t,onRowClick:o,id:r})})}),!u&&d?.enabled&&e.getRowModel().rows.length>0&&he(ao,{...d,currentPage:d?.currentPage??1,totalPages:d?.totalPages??Math.ceil((d?.totalItems??0)/Math.max(d?.itemsPerPage??1,1))??1,onPageChange:x=>d?.onPageChange?.(x),id:r})]})};import{Fragment as oa,jsx as ra}from"react/jsx-runtime";var fs=({permission:e,children:t})=>{let{hasPermission:o}=ut(e||{});return e?ra(oa,{children:o?t:null}):ra(oa,{children:t})};import*as V from"react";import*as gt from"@radix-ui/react-checkbox";import{motion as aa}from"framer-motion";import*as ia from"react";import{jsx as Ee,jsxs as na}from"react/jsx-runtime";var bt=ia.forwardRef(({size:e="md",semi:t=!1,className:o,id:r,label:a,labelClassName:n,labelWrapperClassName:s,disabled:c,subtitle:m,subtitleClassName:l,bodyClassName:p,...u},d)=>na("div",{className:i("flex justify-start items-start gap-1",p),children:[Ee(gt.Root,{ref:d,className:i(`shrink-0 rounded-[3px] transition box-border border border-solid
9
+ focus:border-purplring-purple-200 focus:!ring-primary-main focus:!ring-status-success-bg focus:ring-2 focus:ring-ring focus:ring-offset-2 focus:ring-purple-200 disabled:cursor-not-allowed disabled:opacity-50`,e),...t,children:St(Fe.Indicator,{className:"rounded-full flex items-center justify-center",children:St("div",{className:"h-2 w-2 bg-current text-current rounded-full transition"})})}));Ft.displayName=Fe.Item.displayName;import{create as qi}from"zustand";var Et="filter_",Ji=e=>{jr();let t=new URLSearchParams(window?.location?.search);Object.keys(e).forEach(o=>{t.set(`${Et}${o}`,e[o])}),console.log("params",t.toString()),window.history.replaceState({},"",`${window.location.pathname}?${t}`)},jr=()=>{let e=new URLSearchParams(window.location.search),t=[];e.forEach((o,r)=>{r.startsWith(Et)&&t.push(r)}),t.forEach(o=>e.delete(o)),window.history.replaceState({},"",`${window.location.pathname}?${e}`)},Qi=()=>{if(typeof window>"u")return{};let e=new URLSearchParams(window.location.search),t={};return e.forEach((o,r)=>{r.startsWith(Et)&&(t[r.replace(Et,"")]=o)}),t},es=()=>qi()(e=>({filters:Qi(),resetFilters:()=>{e({filters:null}),jr()},upDateFilter:t=>e(o=>{let r;return typeof t=="function"?r=t(o.filters):r={...o?.filters,...t},Ji(r),{filters:r}})})),ft=()=>es();import{Fragment as as,jsx as _,jsxs as Ee}from"react/jsx-runtime";var Jr=({filters:e,values:t={},setAppliedFilters:o,onChange:r,id:a="filter-content"})=>{let n=ft(),{upDateFilter:s,resetFilters:c,filters:m}=n(),[l,p]=os(!0),u=()=>{p(!0)},{control:d,handleSubmit:f,watch:N,resetField:y}=rs({defaultValues:m??t,mode:"all"});Yr(()=>{l&&o&&(o(m),p(!1))},[l]),Yr(()=>{if(!r)return;let b=N(h=>{r(h)});return()=>b.unsubscribe()},[r,N]);let v=()=>{c(),u()},g=b=>{let h=Object.fromEntries(Object.entries(b??{}).filter(([,C])=>C!==void 0&&C!==""));s(h),u()},R=ts(b=>{y(b,{defaultValue:""});let h={...N()};delete h[b];let C=Object.fromEntries(Object.entries(h??{}).filter(([,w])=>w!==void 0&&w!==""));if(v(),g(C),r){let D={...N()};delete D[b],r(D)}},[y,m,s,r,N]),x=b=>{let h=N(b);return h!=null&&h!==""&&(Array.isArray(h)?h.length>0:!0)?_("div",{className:"flex justify-end mt-1",children:_("button",{onClick:()=>R(b),type:"button",className:"text-gray-500 text-[10px] font-medium p-0.5 px-1.5 border rounded-md hover:bg-gray-50 transition-colors",id:`${a}-${b}-clear-button`,children:"Clear"})}):null};return Ee("form",{onSubmit:f(g),children:[_("div",{className:"space-y-2 max-h-[350px] overflow-y-auto pr-2 -mr-2",children:e.map(b=>{switch(b.type){case"input":return Ee("div",{children:[_(Mt,{name:b.key,control:d,render:({field:h,formState:C})=>_(G,{error:C?.errors?.root?.message,placeholder:b?.placeholder,id:`${a}-${b.key}`,...h,...b})}),x(b?.key)]},b.key);case"drop-down":return Ee("div",{children:[_(Mt,{name:b.key,control:d,render:({field:{value:h,onChange:C},formState:{errors:w}})=>_(Se,{label:b?.label,options:b?.options,value:b?.options?.find(D=>String(D?.value)===String(h)),onChange:D=>C(D?.value),error:w?.[b?.key]?.message,modal:!0,placeholder:b?.placeholder,className:"!h-10",id:`${a}-${b.key}`,hideSearch:!!(b?.hideSearch??!0)})}),x(b?.key)]},b.key);case"radio":return Ee("div",{children:[_(Mt,{name:b.key,control:d,render:({field:{value:h,onChange:C}})=>Ee(as,{children:[_(A,{className:"block text-sm font-medium mb-2 text-pallet-text-white-black",children:b?.label}),_(Tt,{onValueChange:C,defaultValue:h,"aria-label":b?.label,id:`${a}-${b.key}`,children:_("div",{className:"flex items-center gap-2",children:b?.options?.map(w=>Ee("div",{className:"flex items-center space-x-2",children:[_(Ft,{value:w?.value,id:`${a}-${b.key}-${w?.value}`}),_("label",{htmlFor:`${a}-${b.key}-${w?.value}`,className:"text-xs",children:w?.label})]},qr()))})},`${qr()}-${h}`)]})}),x(b?.key)]},b.key);case"date":return Ee("div",{children:[_(Mt,{name:b.key,control:d,render:({field:h})=>_(io,{onChange:h?.onChange,value:h?.value,label:b?.label,id:`${a}-${b.key}`})}),x(b?.key)]},b.key);default:return null}})}),Ee("div",{style:{marginTop:28},className:"grid grid-cols-2 gap-2",children:[_(Xr,{onClick:v,className:i(J({variant:"outlined",size:"sm"})),type:"button",id:`${a}-reset-button`,children:"Reset"}),_(Xr,{className:i(J({size:"sm"})),type:"submit",id:`${a}-submit-button`,children:"Submit"})]})]})};import{ListFilter as cs}from"lucide-react";import{useEffect as ns,useState as is}from"react";import{Fragment as Qr,jsx as lo}from"react/jsx-runtime";var ea=({setAppliedFilters:e})=>{let[t,o]=is(!0),r=ft(),{filters:a}=r(),n=Object.keys(a??{});return ns(()=>{t&&e&&(e(a),o(!1))},[t]),lo(Qr,{children:n?.length?lo("div",{className:"flex rounded-s-md bg-primary-main p-1 text-white text-sm px-2.5",children:n?.length}):lo(Qr,{})})};import{useEffect as ss,useState as ls}from"react";var ta=()=>{let[e,t]=ls(!1);return ss(()=>(t(!0),()=>t(!1)),[]),{mounted:e,MounClient:r=>e?{children:r}:null}};import{jsx as Ye,jsxs as ds}from"react/jsx-runtime";var co=({filters:e,setAppliedFilters:t,isOpen:o=!1,onChange:r,id:a="filter-popover"})=>{let{mounted:n}=ta();return n?Ye("div",{className:"",children:Ye(ie,{id:`${a}-filter-popover`,defaultOpen:o,trigger:ds("button",{title:"Filter",className:i("!border-[#DEDEDE] !text-gray-800 !p-0 flex items-center",J({variant:"outlined",size:"sm"})),type:"button",children:[Ye("span",{className:"!px-[10px] !py-[8px]",children:Ye(cs,{className:"w-4 h-4",size:5})}),Ye(ea,{setAppliedFilters:t})]}),contentClassName:"!border border-gray-200 pt-2",children:Ye(Jr,{filters:e,setAppliedFilters:t,id:a,onChange:r})})}):null};import{Fragment as fs,jsx as Z,jsxs as At}from"react/jsx-runtime";var po=({onRefetch:e,search:t,FilterMenu:o,ExtraNode:r,onExport:a,download:n,isRefetching:s,filterListOptions:c=[],setAppliedFilters:m,onFilterChange:l,id:p="table-toolbar"})=>{let u=f=>{t?.onSearch?.(f)},d=()=>{try{e?.()}catch(f){console.error("Error while refetching data",f)}};return Z(fs,{children:(e||t?.enabled||o||r||a)&&At("div",{className:"w-full flex flex-col sm:!flex-row justify-between items-start sm:items-center bg-white p-2 gap-2",children:[Z("div",{className:"flex flex-1 flex-col sm:flex-row items-center gap-2 justify-start",children:At("div",{className:" w-full flex gap-x-3",children:[t?.enabled&&Z("section",{className:"sm:w-56",children:Z(jt,{type:"text",placeholder:"Enter search here...",className:"h-9",onChange:u,debounce:t?.debounceRate,id:`${p}-search-input`})}),At("div",{className:" flex gap-2",children:[e&&Z(Q,{onClick:d,title:"Refetch Data",disabled:s,variant:"outlined",className:"!border-[#DEDEDE] !text-gray-800 !px-[10px] !py-[8px] ",size:"sm",id:`${p}-refetch-button`,children:Z(us,{className:i("w-4 h-4",{"animate-spin":s}),size:5})}),c?.length?Z(co,{setAppliedFilters:m,filters:c,id:`${p}-filter-popover`,onChange:l}):null,o&&Z(ie,{id:`${p}-deprecated-filter-popover`,trigger:Z("button",{title:"Filter",className:i("!border-[#DEDEDE] !text-gray-800 !px-[10px] !py-[8px]",J({variant:"outlined",size:"sm"})),children:Z(ms,{className:"w-4 h-4",size:5})}),children:o})]})]})}),Z("div",{className:"flex items-start flex-col gap-2 justify-center",children:Z("section",{className:"flex flex-col-reverse sm:flex-row gap-2",children:At("div",{className:"flex gap-2",children:[r&&r,a&&Z(Q,{variant:"primary",onClick:a,size:"sm",id:`${p}-export-button`,children:"Export"}),n?.enabled&&Z(Q,{variant:"primary",leftNode:Z(ps,{className:"w-4 h-5",size:5}),onClick:n?.onDownload,id:n.buttonId,size:"sm",isLoading:n?.isDownloading,children:n?.buttonText})]})})})]})})};import{jsx as he,jsxs as oa}from"react/jsx-runtime";var bs=({table:e,isMobile:t=!1,onRowClick:o,id:r="table",onRefetch:a,isRefetching:n,FilterMenu:s,ExtraNode:c,onExport:m,search:l={enabled:!1,debounceRate:700},download:p={enabled:!1,buttonId:"download_button",buttonText:"Export"},isLoading:u,pagination:d,filterListOptions:f,setAppliedFilters:N,onFilterChange:y,tableBulkActions:v,emptyDataMessage:g})=>{let R=v&&Array.isArray(v.selectedRows)&&v.selectedRows.length>0;return oa("div",{className:i("relative w-full rounded-b border-0 overflow-x-auto"),children:[he(po,{onRefetch:a,search:l,FilterMenu:s,ExtraNode:c,onExport:m,download:p,isRefetching:n,filterListOptions:f,setAppliedFilters:N,id:r,onFilterChange:y}),R&&v?.actions?.length&&he(Wr,{tableBulkActions:v.actions,selectedRows:v.selectedRows??[],isMobile:t,id:`${r}-bulk-actions`}),he("main",{className:"w-full overflow-x-auto mt-5",children:u?oa("div",{className:"py-10 flex flex-col justify-center w-full items-center space-x-2",children:[he(gs,{size:20,className:"animate-spin"}),he("p",{className:"mt-3 text-center text-gray-600 text-sm opacity-70 animate-pulse",children:"Loading..."})]}):e.getRowModel().rows.length<1?he("div",{className:"py-10 flex flex-col justify-center w-full items-center",children:g||he("p",{className:"text-center text-gray-600 text-sm opacity-70",children:"No data available"})}):he("div",{className:"flex flex-col gap-2",children:he(Zr,{table:e,isMobile:t,onRowClick:o,id:r})})}),!u&&d?.enabled&&e.getRowModel().rows.length>0&&he(ao,{...d,currentPage:d?.currentPage??1,totalPages:d?.totalPages??Math.ceil((d?.totalItems??0)/Math.max(d?.itemsPerPage??1,1))??1,onPageChange:x=>d?.onPageChange?.(x),id:r})]})};import{Fragment as ra,jsx as aa}from"react/jsx-runtime";var vs=({permission:e,children:t})=>{let{hasPermission:o}=ut(e||{});return e?aa(ra,{children:o?t:null}):aa(ra,{children:t})};import*as V from"react";import*as gt from"@radix-ui/react-checkbox";import{motion as na}from"framer-motion";import*as sa from"react";import{jsx as Me,jsxs as ia}from"react/jsx-runtime";var bt=sa.forwardRef(({size:e="md",semi:t=!1,className:o,id:r,label:a,labelClassName:n,labelWrapperClassName:s,disabled:c,subtitle:m,subtitleClassName:l,bodyClassName:p,...u},d)=>ia("div",{className:i("flex justify-start items-start gap-1",p),children:[Me(gt.Root,{ref:d,className:i(`shrink-0 rounded-[3px] transition box-border border border-solid
10
10
  border-base-500 bg-base-100 dark:bg-transparent hover:bg-status-success-bg hover:border-status-success-fill ring-offset-background focus-visible:outline-none
11
11
  focus-visible:border-status-success-fill focus-visible:!ring-offset-status-success-bg focus-visible:!ring-status-success-bg focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-status-success-fill
12
12
  focus:border-status-success-fill focus:!ring-offset-status-success-bg focus:!ring-status-success-bg focus:ring-2 focus:ring-ring focus:ring-offset-2 focus:ring-status-success-fill
13
- disabled:cursor-not-allowed disabled:opacity-50 peer`,e==="md"?"h-5 w-5":e==="lg"?"h-6 w-6":"","data-[state=checked]:border-status-success-fill data-[state=checked]:bg-status-success-bg",o),id:r,disabled:c,...u,children:Ee(gt.Indicator,{className:i(`text-white dark:text-black data-[state=checked]:text-status-success-fill
14
- flex items-center justify-center text-current`),children:t?Ee(aa.svg,{initial:{opacity:0,scale:.8},exit:{opacity:0},animate:{opacity:1,scale:1},transition:{duration:.1},width:"12",height:"2",viewBox:"0 0 12 2",fill:"none",children:Ee("path",{d:"M1.9165 1H10.0832",stroke:c?"#B0B0B0":"#00D488",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})}):Ee(aa.svg,{initial:{opacity:0,scale:.8},animate:{opacity:1,scale:1},transition:{duration:.1},exit:{opacity:0},width:"10",height:"8",viewBox:"0 0 10 8",fill:"none",children:Ee("path",{d:"M1 3.99996L3.66353 6.66349L9 1.33643",stroke:c?"#B0B0B0":"#00D488",strokeWidth:"1.06667",strokeLinecap:"round",strokeLinejoin:"round"})})})}),(a||m)&&na("div",{className:i("flex flex-col justify-start items-start text-base-700 dark:text-white peer-aria-checked:text-base-900 dark:peer-aria-checked:text-white peer-focus-visible:text-base-900 dark:peer-focus-visible:text-white peer-focus:text-base-900 dark:peer-focus:text-white peer-hover:text-base-900 dark:peer-hover:text-white",s),children:[Ee("label",{htmlFor:r,className:i(n,"text-sm font-normal cursor-pointer disabled:cursor-not-allowed transition-colors",{"cursor-not-allowed opacity-50":c}),children:a}),m&&Ee("p",{className:i("text-sm text-base-500",{"cursor-not-allowed opacity-50":c},l),children:m})]})]}));bt.displayName=gt.Root.displayName;import{X as gs}from"lucide-react";import{v4 as sa}from"uuid";import{jsx as k,jsxs as ue}from"react/jsx-runtime";var la=V.memo(({item:e,onDelete:t})=>ue("p",{className:"text-xs p-1.5 py-1 bg-gray-100 rounded-md flex items-center",children:[k("span",{children:e.label}),k("button",{type:"button",className:"pl-2",onClick:o=>{o.stopPropagation(),t(e)},children:k(gs,{size:12})})]}));la.displayName="SelectedChip";var mo=V.memo(({disabled:e,className:t,values:o,placeholder:r="",status:a,onDelete:n})=>k(H,{asChild:!0,disabled:e,children:ue("div",{className:i($({status:a}),"cursor-pointer [&>svg]:shrink-0 h-auto min-h-12 flex items-center justify-between w-full gap-2",t),children:[k("div",{className:"w-full flex flex-row items-center gap-2 flex-wrap",children:o.length?o.map(s=>k(la,{item:s,onDelete:n},s.value)):k("span",{className:"text-[#79818C] dark:text-[#959BA4]",children:r})}),k("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",children:k("path",{d:"M16.5999 7.45825L11.1666 12.8916C10.5249 13.5333 9.4749 13.5333 8.83324 12.8916L3.3999 7.45825",stroke:"currentColor",strokeWidth:"1.5",strokeMiterlimit:"10",strokeLinecap:"round",strokeLinejoin:"round"})})]})}));mo.displayName="MultiSelectTrigger";var ca=V.memo(({option:e,isChecked:t,onSelect:o,optionComponent:r})=>k("article",{className:"cursor-pointer relative hover:bg-status-success-bg transition flex w-[calc(100%-0.375rem)] mx-auto rounded-md items-center focus:dark:!text-[#DDDFE0] py-1.5 px-2 text-sm outline-none focus:bg-status-success-bg dark:!text-[#DDDFE0] focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 focus-visible:ring-1 focus-visible:ring-status-success-fill focus-visible:ring-offset-1 focus-visible:ring-offset-status-success-fill",onClick:()=>o(e),children:k("div",{className:"w-full h-[30px] flex flex-row items-center dark:!text-white",children:k(bt,{value:e.value,label:r?r(e):k("span",{children:e.label}),bodyClassName:"w-full",labelWrapperClassName:"w-full",labelClassName:i(r&&"w-full"),checked:t})})}));ca.displayName="OptionItem";var bs=({options:e,children:t,onChange:o,optionComponent:r,values:a,hideSearch:n,modal:s,placeholder:c,isLoading:m,showSelectedValues:l=!1,error:p,label:u,showAsterisk:d})=>{let[g,N]=V.useState(""),y=a,v=V.useMemo(()=>new Set(y.map(P=>P.value)),[y]),f=V.useMemo(()=>{if(!g)return e;let P=g.trim().toLowerCase();return e.filter(F=>F.label?.trim()?.toLowerCase()?.includes(P))},[e,g]),R=V.useCallback(P=>{let F=v.has(P.value);o(F?y.filter(Re=>Re.value!==P.value):[...y,P])},[y,v,o]),x=V.useRef(null),[b,h]=V.useState(void 0);V.useLayoutEffect(()=>{if(!x.current)return;let P=x.current,F=()=>{h(P.getBoundingClientRect().width)};F();let Re=new ResizeObserver(()=>{F()});return Re.observe(P),()=>Re.disconnect()},[]);let C=V.useCallback(P=>{let F=y.filter(Re=>Re.value!==P.value);o(F)},[y,o]),w=V.useCallback(()=>{y.length===e.length?o([]):o(e)},[y.length,e,o]),D=V.useCallback(P=>{N(P.target.value)},[]);return ue("div",{className:"relative space-y-1",children:[k(A,{showAsterisk:d,error:p,children:u}),ue(K,{modal:s,children:[k("div",{ref:x,children:t??k(mo,{values:y,placeholder:c??"Select",onDelete:C,className:"h-auto"})}),l&&k("div",{className:"flex py-2 gap-2 flex-wrap",children:y.map(P=>k("div",{className:"bg-gray-100 border text-black rounded-xl text-[10px] font-medium px-2 py-1",children:k("span",{children:P.label})},sa()))}),ue(z,{portal:!s,align:"start",className:"min-w-[200px] p-0",style:{width:b?`${b}px`:void 0},children:[!n&&k("div",{className:"w-full px-4",children:ue("div",{className:"w-full h-[36px] px-1 flex items-center justify-start border-[0.5px] rounded-md border-[#D7D7D7] mb-[5px]",children:[m?k(pe,{}):ue("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[k("path",{d:"M11.5 21C16.7467 21 21 16.7467 21 11.5C21 6.25329 16.7467 2 11.5 2C6.25329 2 2 6.25329 2 11.5C2 16.7467 6.25329 21 11.5 21Z",stroke:"#959595",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),k("path",{d:"M22 22L20 20",stroke:"#959595",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})]}),k("input",{value:g,placeholder:"Search",type:"text",disabled:m,className:"oultine-0 focus-visible:outline-0 focus-visible:ring-0 ml-1 w-full !border-transparent placeholder:text-sm placeholder:font-normal dark:bg-transparent placeholder:text-[#959595] dark:placeholder:text-[#DDDFE0] focus:ring-0 focus:ring-offset-0 focus:bg-white dark:focus:bg-transparent dark:text-[#DDDFE0]",onChange:D})]})}),ue("div",{className:i("w-full h-[44px] px-2.5 flex items-center justify-between mb-[5px] border-[#D7D7D7] dark:border-[#5C636B]",n?"border-b-[0.5px]":"border-y-[0.5px]"),children:[k("button",{className:"text-sm text-primary-main font-normal",onClick:w,disabled:f.length<1||m,children:ue("span",{children:[y.length===e.length?"Unselect":"Select"," all"]})}),ue("p",{className:"text-sm text-[#959595] font-normal dark:text-[#DDDFE0]",children:[y.length," selected"]})]}),ue(le,{viewPortClassName:"max-h-[225px]",className:"pb-1",children:[m&&k("div",{className:"py-7 flex justify-center",children:k(pe,{})}),!m&&f.map(P=>k(ca,{option:P,isChecked:v.has(P.value),onSelect:R,optionComponent:r},sa()))]})]})]})]})};import*as Me from"@radix-ui/react-tabs";import{jsx as He,jsxs as uo}from"react/jsx-runtime";function vs({tabs:e,defaultValue:t,onChange:o}){return uo(Me.Root,{defaultValue:t,onValueChange:o,className:"flex flex-col items-start justify-start gap-2.5",children:[uo(le,{className:"w-full",children:[He(Ct,{className:"z-[1000]",orientation:"horizontal"}),He(Me.List,{className:"my-2 border-b border-gray-300 items-center flex",children:e.map(r=>uo(Me.Trigger,{className:"flex items-center gap-2 whitespace-nowrap rounded-t-md px-5 py-2 relative transition-all group hover:!bg-gray-200/50 dark:hover:!bg-gray-200/10 data-[state=active]:dark:hover:!bg-gray-200 data-[state=active]:hover:!bg-gray-200 data-[state=active]:bg-gray-200 before:absolute before:bottom-[0px] before:left-0 before:h-[2px] dark:before:h-[0px] before:w-full before:rounded-sm data-[state=active]:before:!bg-texts-50 before:content-['']",value:r?.key,children:[He("p",{className:"text-center text-sm leading-5 font-normal text-gray-500 group-data-[state=active]:font-medium group-data-[state=active]:text-gray-800",children:He("span",{children:r.title})}),r.count&&He("div",{className:"bg-gray-300 group-data-[state=active]:bg-texts-50 group-data-[state=active]:text-white text-texts-50 text-xs font-medium me-2 px-2.5 py-0.5 rounded-full",children:He("span",{children:r.count})})]},r?.key))})]}),e.map(r=>He(Me.Content,{value:r?.key,className:"w-full",children:r.content},r?.key))]})}import{BiInfoCircle as ys,BiX as ua}from"react-icons/bi";import{cva as hs}from"class-variance-authority";var pa=hs("relative rounded-lg border px-4 py-4 text-sm",{variants:{variant:{default:"border-blue-200 bg-blue-50 text-blue-800",danger:"border-red-200 bg-red-50 text-red-800",success:"border-green-200 bg-green-50 text-green-800",pending:"border-yellow-200 bg-yellow-50 text-yellow-800"}},defaultVariants:{variant:"default"}}),da={default:{primary:"",outlined:""},danger:{primary:"bg-red-600 hover:bg-red-600/80 text-white border-red-600",outlined:"border-red-600 text-red-600 hover:bg-red-50"},success:{primary:"bg-green-600 hover:bg-green-600/80 text-white border-green-600",outlined:"border-green-600 text-green-600 hover:bg-green-50"},pending:{primary:"bg-yellow-600 hover:bg-yellow-600/80 text-white border-yellow-600",outlined:"border-yellow-600 text-yellow-600 hover:bg-yellow-50"}},ma=(e,t)=>(da[e]??da.default)[t];import{jsx as we,jsxs as vt}from"react/jsx-runtime";var xs=({title:e,message:t,variant:o="default",icon:r,action:a,dismissible:n=!1,onDismiss:s,isOpen:c=!0,align:m="start",classNames:l})=>{if(!c)return null;let p=a?.variant??"primary",u=ma(o??"default",p),d=m==="center";return vt("div",{className:i(pa({variant:o}),l?.root),children:[n&&we("button",{type:"button",onClick:s,className:"absolute top-3 right-3 opacity-60 transition-opacity hover:opacity-100 sm:hidden","aria-label":"Dismiss",id:"feature_banner_dismiss_button_mobile",children:we(ua,{size:20})}),vt("div",{className:i("flex flex-col gap-4 sm:flex-row sm:items-start sm:justify-between",d&&"sm:items-center"),id:"feature_banner_container",children:[vt("div",{className:i("flex items-start gap-3 pr-6 sm:pr-0",d&&"sm:items-center"),id:"feature_banner_content_wrapper",children:[we("span",{className:i("shrink-0 mt-0.5",d&&"sm:mt-0",l?.icon),id:"feature_banner_icon",children:r??we(ys,{size:18})}),vt("div",{className:"min-w-0",id:"feature_banner_content",children:[we("p",{className:i("font-semibold",l?.title),id:"feature_banner_title",children:e}),t&&we("p",{id:"feature_banner_message",className:i("mt-1 text-sm opacity-90 break-words",l?.message),children:t})]})]}),(a||n)&&vt("div",{className:i("flex flex-col items-end gap-3 sm:flex-row sm:items-center",d&&"sm:items-center"),id:"feature_banner_actions_wrapper",children:[a&&we(Q,{variant:p,type:"button",onClick:a.onClick,className:i(u,l?.action),id:"feature_banner_action_button",children:a.label}),n&&we("button",{type:"button",onClick:s,className:"hidden sm:flex opacity-60 transition-opacity hover:opacity-100","aria-label":"Dismiss",id:"feature_banner_dismiss_button",children:we(ua,{size:20})})]})]})]})};import Hs from"@tiptap/extension-font-family";import _s from"@tiptap/extension-link";import Gs from"@tiptap/extension-underline";import{EditorContent as Ws,useEditor as $s}from"@tiptap/react";import zs from"@tiptap/starter-kit";import bo from"clsx";import Vs from"clsx";import{Bold as Cs,Italic as ws,List as Ns,ListOrdered as Rs,Quote as Ps,Strikethrough as Ls,Underline as ks}from"lucide-react";import{jsx as Ss}from"react/jsx-runtime";var Ds=()=>Ss("span",{className:"text-sm font-semibold",children:"H1"}),_e={bold:{icon:Cs,action:e=>e.chain().focus().toggleBold().run(),isActive:e=>e.isActive("bold"),title:"Bold"},italic:{icon:ws,action:e=>e.chain().focus().toggleItalic().run(),isActive:e=>e.isActive("italic"),title:"Italic"},underline:{icon:ks,action:e=>e.chain().focus().toggleUnderline().run(),isActive:e=>e.isActive("underline"),title:"Underline"},strike:{icon:Ls,action:e=>e.chain().focus().toggleStrike().run(),isActive:e=>e.isActive("strike"),title:"Strikethrough"},heading1:{icon:Ds,action:e=>e.chain().focus().toggleHeading({level:1}).run(),isActive:e=>e.isActive("heading",{level:1}),title:"Heading 1"},bulletList:{icon:Ns,action:e=>e.chain().focus().toggleBulletList().run(),isActive:e=>e.isActive("bulletList"),title:"Bullet List"},orderedList:{icon:Rs,action:e=>e.chain().focus().toggleOrderedList().run(),isActive:e=>e.isActive("orderedList"),title:"Numbered List"},blockquote:{icon:Ps,action:e=>e.chain().focus().toggleBlockquote().run(),isActive:e=>e.isActive("blockquote"),title:"Quote"},textStyle:{icon:()=>null,action:()=>!0,isActive:()=>!1,title:"Text Style"},link:{icon:()=>null,action:()=>!0,isActive:()=>!1,title:"Link"}};import Ts from"clsx";import{jsx as fa}from"react/jsx-runtime";var ga=({editor:e,icon:t,action:o,isActive:r,disabled:a,title:n,className:s})=>fa("button",{type:"button",onClick:()=>o(e),disabled:a??!e.can().chain().focus().run(),title:n,className:Ts("p-2 rounded hover:bg-gray-100 transition",{"opacity-100 text-black":r(e),"opacity-40 text-gray-500":!r(e),"cursor-not-allowed":a},s),children:fa(t,{width:18,height:18})});import Fs from"clsx";import{Link as Es}from"lucide-react";import{useCallback as It,useMemo as fo,useState as ba}from"react";import{Fragment as Ms,jsx as Ne,jsxs as go}from"react/jsx-runtime";var va=({editor:e})=>{let[t,o]=ba(!1),[r,a]=ba(""),n=fo(()=>!e.state.selection.empty,[e.state.selection]),s=fo(()=>e.isActive("link"),[e]),c=fo(()=>n||s,[n,s]),m=It(()=>{r.trim()&&(e.chain().focus().extendMarkRange("link").setLink({href:r.trim()}).run(),o(!1),a(""))},[e,r]),l=It(()=>{e.chain().focus().extendMarkRange("link").unsetLink().run(),o(!1),a("")},[e]),p=It(d=>{let g=e.getAttributes("link").href;a(g||""),o(d)},[c,e]),u=It(d=>{d.key==="Enter"&&(d.preventDefault(),m()),d.key==="Escape"&&o(!1)},[m]);return Ne(ie,{open:t,onOpenChange:p,trigger:Ne("div",{className:Fs("",{"opacity-100 text-black":t,"opacity-40 text-gray-500":!t}),title:c?e.isActive("link")?"Edit link":"Add link":"Select text to add a link",children:Ne(Es,{width:18,height:18})}),contentClassName:"w-80 p-4",align:"start",children:Ne("div",{className:"space-y-4",children:!n&&!s?Ne("div",{className:"text-sm text-gray-500 bg-gray-50 rounded p-3 border border-gray-200",children:"Please select some text in the editor to apply a link."}):go(Ms,{children:[go("div",{children:[Ne("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"Link URL"}),Ne(G,{type:"url",value:r,onChange:d=>a(d.target.value),placeholder:"https://example.com",autoFocus:!0,onKeyDown:u})]}),go("div",{className:"flex justify-between space-x-2",children:[Ne(Q,{type:"button",onClick:m,disabled:!r.trim(),variant:"primary",size:"sm",className:"flex-1",children:e.isActive("link")?"Update Link":"Add Link"}),e.isActive("link")&&Ne(Q,{type:"button",onClick:l,variant:"neutral",size:"sm",className:"px-3 py-2 bg-gray-100 text-gray-700 rounded-md hover:bg-gray-200 transition text-sm font-medium",children:"Remove"})]})]})})})};import As from"clsx";import{ChevronDown as Is}from"lucide-react";import{useState as Bs}from"react";import{jsx as qe,jsxs as ha}from"react/jsx-runtime";var ya=({editor:e})=>{let[t,o]=Bs(!1),r=()=>e.isActive("heading",{level:1})?"Heading 1":e.isActive("heading",{level:2})?"Heading 2":e.isActive("heading",{level:3})?"Heading 3":"Normal",a=[{label:"Normal",action:()=>e.chain().focus().setParagraph().run(),isActive:!e.isActive("heading")},{label:"Heading 1",action:()=>e.chain().focus().toggleHeading({level:1}).run(),isActive:e.isActive("heading",{level:1})},{label:"Heading 2",action:()=>e.chain().focus().toggleHeading({level:2}).run(),isActive:e.isActive("heading",{level:2})},{label:"Heading 3",action:()=>e.chain().focus().toggleHeading({level:3}).run(),isActive:e.isActive("heading",{level:3})}];return qe(ie,{open:t,onOpenChange:o,trigger:ha("button",{type:"button",className:"flex items-center space-x-1 p-2 rounded hover:bg-gray-100 transition min-w-[110px] justify-between text-gray-600",children:[qe("span",{className:"text-base ",children:r()}),qe(Is,{width:16,height:16})]}),contentClassName:"w-48 w-auto- p-1",align:"start",children:qe("div",{className:"space-y-1",children:a.map((n,s)=>ha("div",{children:[s===1&&qe("div",{className:"border-b border-gray-200 my-1"}),qe("button",{type:"button",onClick:()=>{n.action(),o(!1)},className:As("w-full text-left px-3 py-2 rounded text-sm hover:bg-gray-100 transition",{"bg-gray-100 font-medium":n.isActive}),children:n.label})]},n.label))})})};import{jsx as Bt,jsxs as Os}from"react/jsx-runtime";var xa=({editor:e,controls:t=["textStyle","bold","italic","underline","strike","link","bulletList","orderedList","blockquote"],className:o,extraNodes:r})=>{let a=Array.isArray(t)?t:[];return Os("div",{className:Vs("sticky top-0 z-10 flex w-full flex-wrap items-center space-x-1 border-b bg-white/80 backdrop-blur-md p-2",o),children:[a.map(n=>n==="textStyle"||n==="link"||_e&&_e[n]?Bt("div",{className:"flex items-center",children:n==="textStyle"?Bt(ya,{editor:e}):n==="link"?Bt(va,{editor:e}):Bt(ga,{editor:e,icon:_e[n].icon,action:_e[n].action,isActive:_e[n].isActive,title:_e[n].title})},n):null),r]})};import{jsx as Je,jsxs as Vt}from"react/jsx-runtime";var Zs=({label:e,helpText:t,error:o,value:r="",onChange:a,optional:n,isRequired:s,extensions:c=[],editorClassName:m,wrapperClassName:l,controls:p,extraMenuNodes:u,placeholder:d})=>{let g=$s({immediatelyRender:!1,content:r,editorProps:{attributes:{class:"px-3 h-40"}},extensions:[zs,Gs,Hs,_s.configure({openOnClick:!1,HTMLAttributes:{class:"text-blue-600 underline hover:text-blue-800"}}),...c],onFocus:({event:N})=>{N.preventDefault(),N.stopPropagation()},onUpdate:({editor:N})=>{let y=N.getHTML();a?.(N.isEmpty?"":y)}});return g?Vt("div",{className:bo("flex flex-col w-full",l),children:[e&&Vt("div",{className:"flex justify-between mb-1",children:[Vt("label",{className:"text-sm font-medium text-gray-900 flex items-center",htmlFor:"editor-id",children:[e,s&&Je("span",{className:"ml-1 text-red-500",children:"*"})]}),n&&Je("span",{className:"text-sm text-gray-400",children:"Optional"})]}),Vt("div",{className:bo("relative border-none rounded-md overflow-hidden",o?"ring-1 ring-red-300 focus-within:ring-red-500":"ring-1 ring-gray-300 focus-within:ring-primary-main"),children:[Je(xa,{editor:g,controls:p,extraNodes:u}),Je(Ws,{editor:g,className:bo("overflow-y-auto p-3 h-full bg-white",m),placeholder:d})]}),o&&Je("p",{className:"mt-2 text-sm text-red-600",id:"editor-error",children:o}),t&&Je("p",{className:"mt-2 text-sm text-gray-500",id:"editor-helptext",children:t})]}):null};import{Search as Us,X as Ks}from"lucide-react";import*as O from"react";import{jsx as T,jsxs as Ae}from"react/jsx-runtime";var Ca=O.memo(({tag:e,onRemove:t})=>Ae("p",{className:"text-xs p-1.5 py-1 bg-gray-100 rounded-md flex items-center",children:[T("span",{children:e.label}),T("button",{type:"button",className:"pl-2",onClick:o=>{o.stopPropagation(),t()},children:T(Ks,{size:12})})]}));Ca.displayName="SelectedChip";var wa=O.memo(({option:e,isChecked:t,onSelect:o,renderOption:r,disabled:a})=>T("article",{className:"cursor-pointer relative hover:bg-status-success-bg transition flex w-[calc(100%-0.375rem)] mx-auto rounded-md items-center py-1.5 px-2 text-sm outline-none focus:bg-status-success-bg dark:!text-[#DDDFE0] focus-visible:ring-1 focus-visible:ring-status-success-fill focus-visible:ring-offset-1",onClick:()=>!a&&o(e),children:T("div",{className:"w-full h-[20px] flex flex-row items-center dark:!text-white",children:T(bt,{disabled:a,value:e.value,label:r?r(e,t):T("span",{children:e.label}),bodyClassName:"w-full",labelWrapperClassName:"w-full",checked:t})})}));wa.displayName="OptionItem";var js=({value:e,onChange:t,options:o=[],label:r,error:a,placeholder:n="Add tag...",description:s,showAsterisk:c,disabled:m,isLoading:l,allowCreate:p=!0,renderTag:u,renderOption:d,validateTag:g,onCreate:N,maxTags:y})=>{let[v,f]=O.useState(""),R=O.useRef(null),[x,b]=O.useState();O.useLayoutEffect(()=>{if(!R.current)return;let L=()=>b(R.current?.getBoundingClientRect().width);L();let M=new ResizeObserver(L);return M.observe(R.current),()=>M.disconnect()},[]);let h=O.useMemo(()=>new Set(e.map(L=>L.value)),[e]),C=O.useMemo(()=>{let L=v.trim().toLowerCase();return L?o.filter(M=>M.label.toLowerCase().includes(L)):o},[o,v]),w=O.useCallback(L=>t(e.filter(M=>M.value!==L)),[e,t]),D=O.useCallback(L=>{h.has(L.value)||y&&e.length>=y||t([...e,L])},[e,t,h,y]),P=O.useCallback(L=>{let M=L.trim();if(!M||!g?.(M))return;let ho=o.find(yo=>yo.value.toLowerCase()===M.toLowerCase()||yo.label.toLowerCase()===M.toLowerCase());if(ho){D(ho),f("");return}p&&(D(N?.(M)??{value:M,label:M}),f(""))},[o,p,N,g,D]),F=L=>{L.key==="Enter"&&(L.preventDefault(),P(v)),L.key==="Backspace"&&!v&&e.length&&w(e[e.length-1].value)},Re=!l&&p&&v.trim()&&!o.some(L=>L.value.toLowerCase()===v.trim().toLowerCase());return Ae("div",{className:"relative space-y-1",children:[T(A,{showAsterisk:c,error:a,children:r}),Ae(K,{children:[T("div",{ref:R,children:T(H,{asChild:!0,disabled:m,children:Ae("div",{id:"tags_trigger_container",className:i($({status:a?"error":"default"}),"cursor-pointer [&>svg]:shrink-0 h-auto min-h-10 flex items-center justify-between w-full gap-2 p-2"),children:[Ae("div",{className:"w-full flex flex-row items-center gap-2 flex-wrap",children:[e.length?e.map(L=>{let M=()=>w(L.value);return u?T(O.Fragment,{children:u(L,M)},L.value):T(Ca,{tag:L,onRemove:M},L.value)}):T("span",{className:"text-[#79818C] dark:text-[#959BA4]",children:n}),T("input",{value:v,disabled:m,readOnly:!p||void 0,placeholder:"",className:"flex-1 min-w-[80px] border-none outline-none bg-transparent text-sm p-0 h-auto focus-visible:ring-0",onChange:L=>f(L.target.value),onKeyDown:F})]}),T("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",children:T("path",{d:"M16.5999 7.45825L11.1666 12.8916C10.5249 13.5333 9.4749 13.5333 8.83324 12.8916L3.3999 7.45825",stroke:"currentColor",strokeWidth:"1.5",strokeMiterlimit:"10",strokeLinecap:"round",strokeLinejoin:"round"})})]})})}),Ae(z,{align:"start",className:"min-w-[200px] p-0 mt-1",style:{width:x?`${x}px`:void 0},children:[T("div",{className:"w-full",children:T("div",{className:i("w-full mt-1 h-10 px-1 flex items-center justify-start mb-[5px]",{"mt-3":a}),children:T(G,{error:a,leftNode:T(Us,{className:"text-gray-400"}),value:v,placeholder:"Type to search or create",type:"text",disabled:l,rightNode:l?T(pe,{colour:"secondary"}):void 0,onChange:L=>f(L.target.value)})})}),Ae(le,{viewPortClassName:"max-h-[225px] px-2",className:"pb-1",children:[l&&T("div",{className:"py-7 flex justify-center",children:T(pe,{})}),!l&&C.map(L=>T(wa,{option:L,isChecked:h.has(L.value),disabled:L.disabled,onSelect:M=>h.has(M.value)?w(M.value):D(M),renderOption:d},L.value)),Re&&Ae("button",{type:"button",className:i("w-full text-left px-3 py-2 text-sm border-t hover:bg-gray-50",{"mt-3":a}),onClick:()=>P(v),children:['Create "',v.trim(),'"']})]})]})]}),s&&!a&&T("div",{className:"text-sm text-gray-500",children:s}),T(ee,{error:a})]})};var Na={USD:"$",CAD:"CA$",EUR:"\u20AC",AED:"AED",AFN:"Af",ALL:"ALL",AMD:"AMD",ARS:"AR$",AUD:"AU$",AZN:"man.",BAM:"KM",BDT:"Tk",BGN:"BGN",BHD:"BD",BIF:"FBu",BND:"BN$",BOB:"Bs",BRL:"R$",BWP:"BWP",BYN:"Br",BZD:"BZ$",CDF:"CDF",CHF:"CHF",CLP:"CL$",CNY:"CN\xA5",COP:"CO$",CRC:"\u20A1",CVE:"CV$",CZK:"K\u010D",DJF:"Fdj",DKK:"Dkr",DOP:"RD$",DZD:"DA",EEK:"Ekr",EGP:"EGP",ERN:"Nfk",ETB:"Br",GBP:"\xA3",GEL:"GEL",GHS:"GH\u20B5",GNF:"FG",GTQ:"GTQ",HKD:"HK$",HNL:"HNL",HRK:"kn",HUF:"Ft",IDR:"Rp",ILS:"\u20AA",INR:"\u20B9",IQD:"IQD",IRR:"IRR",ISK:"Ikr",JMD:"J$",JOD:"JD",JPY:"\xA5",KES:"Ksh",KHR:"KHR",KMF:"CF",KRW:"\u20A9",KWD:"KD",KZT:"KZT",LBP:"L.L.",LKR:"SLRs",LTL:"Lt",LVL:"Ls",LYD:"LD",MAD:"MAD",MDL:"MDL",MGA:"MGA",MKD:"MKD",MMK:"MMK",MOP:"MOP$",MUR:"MURs",MXN:"MX$",MYR:"RM",MZN:"MTn",NAD:"N$",NGN:"\u20A6",NIO:"C$",NOK:"Nkr",NPR:"NPRs",NZD:"NZ$",OMR:"OMR",PAB:"B/.",PEN:"S/.",PHP:"\u20B1",PKR:"PKRs",PLN:"z\u0142",PYG:"\u20B2",QAR:"QR",RON:"RON",RSD:"din.",RUB:"RUB",RWF:"RWF",SAR:"SR",SDG:"SDG",SEK:"Skr",SGD:"S$",SOS:"Ssh",SYP:"SY\xA3",THB:"\u0E3F",TND:"DT",TOP:"T$",TRY:"TL",TTD:"TT$",TWD:"NT$",TZS:"TSh",UAH:"\u20B4",UGX:"USh",UYU:"$U",UZS:"UZS",VEF:"Bs.F.",VND:"\u20AB",XAF:"F CFA",XOF:"CFA",YER:"YR",ZAR:"R",ZMK:"ZK",ZWL:"ZWL$"},ht=class ht{static getCurrencyLocaleMap(t){return{XOF:"fr",XAF:"fr"}[t]||"en"}static koboToNaira(t){return+t/100}static nairaToKobo(t){return+t*100}static getCurrencySymbol(t){return Na[t]||t}};xo(ht,"formatAmountAndCurrency",(t,o,r)=>{let a=new Intl.NumberFormat(r?.locale||ht.getCurrencyLocaleMap(t),{maximumFractionDigits:3,style:"currency",currency:t,currencyDisplay:"symbol"}).format(r?.convertToMajorCurrency?ht.koboToNaira(Number(o)):Number(o)).replace(/^(\D+)/,"$1 ").replace("\u202F"," ").replace(/\s+/,""),n=Na[t]||t;return a.replace(t,n)});var Ra=ht;import vo from"dayjs";var Pa=class{static getDateLibrary(){return vo()}static formatTimestampToDate(t,o){return vo.unix(t).format(o||"ddd, MMM, YYYY | HH:mm:ss")}static formatDateToTimestamp(t){return vo(t).unix()}};export{Ra as AmountAction,Pn as Banner,Q as Button,io as CalendarInput,En as CopyableLabel,gn as Country,Na as CurrencySymbolMap,Pa as DateAction,jt as DebouncedInput,Vn as DevBanner,zt as Dialog,Un as Drawer,$n as DrawerClose,Xt as DrawerRoot,xs as FeatureBanner,co as FilterPopover,ke as FlagComponent,A as FormLabel,fs as HasResourcePermission,G as Input,pe as Loader,ti as LocaleSelector,bs as MultiSelect,mo as MultiSelectTrigger,Cn as OTPInput,po as PageDataToolbar,ao as Pagination,$o as PasswordInput,Lt as PermissionsContext,hi as PermissionsProvider,tr as PhoneInput,ie as Popover,z as PopoverContent,K as PopoverRoot,H as PopoverTrigger,Tt as RadioGroup,Ft as RadioGroupItem,Zs as RichTextEditor,le as ScrollArea,De as Select,Fi as Sidebar,Mi as Status,us as Table,vs as Tabs,js as TagsInput,ze as TextOverflow,zo as Textarea,yt as Tooltip,Ot as TooltipContent,No as TooltipProvider,Ro as TooltipRoot,Po as TooltipTrigger,J as buttonVariants,i as cn,ft as useFilterStore,ut as useHasPermission,Br as usePermissions};
13
+ disabled:cursor-not-allowed disabled:opacity-50 peer`,e==="md"?"h-5 w-5":e==="lg"?"h-6 w-6":"","data-[state=checked]:border-status-success-fill data-[state=checked]:bg-status-success-bg",o),id:r,disabled:c,...u,children:Me(gt.Indicator,{className:i(`text-white dark:text-black data-[state=checked]:text-status-success-fill
14
+ flex items-center justify-center text-current`),children:t?Me(na.svg,{initial:{opacity:0,scale:.8},exit:{opacity:0},animate:{opacity:1,scale:1},transition:{duration:.1},width:"12",height:"2",viewBox:"0 0 12 2",fill:"none",children:Me("path",{d:"M1.9165 1H10.0832",stroke:c?"#B0B0B0":"#00D488",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})}):Me(na.svg,{initial:{opacity:0,scale:.8},animate:{opacity:1,scale:1},transition:{duration:.1},exit:{opacity:0},width:"10",height:"8",viewBox:"0 0 10 8",fill:"none",children:Me("path",{d:"M1 3.99996L3.66353 6.66349L9 1.33643",stroke:c?"#B0B0B0":"#00D488",strokeWidth:"1.06667",strokeLinecap:"round",strokeLinejoin:"round"})})})}),(a||m)&&ia("div",{className:i("flex flex-col justify-start items-start text-base-700 dark:text-white peer-aria-checked:text-base-900 dark:peer-aria-checked:text-white peer-focus-visible:text-base-900 dark:peer-focus-visible:text-white peer-focus:text-base-900 dark:peer-focus:text-white peer-hover:text-base-900 dark:peer-hover:text-white",s),children:[Me("label",{htmlFor:r,className:i(n,"text-sm font-normal cursor-pointer disabled:cursor-not-allowed transition-colors",{"cursor-not-allowed opacity-50":c}),children:a}),m&&Me("p",{className:i("text-sm text-base-500",{"cursor-not-allowed opacity-50":c},l),children:m})]})]}));bt.displayName=gt.Root.displayName;import{X as hs}from"lucide-react";import{v4 as la}from"uuid";import{jsx as k,jsxs as ue}from"react/jsx-runtime";var ca=V.memo(({item:e,onDelete:t})=>ue("p",{className:"text-xs p-1.5 py-1 bg-gray-100 rounded-md flex items-center",children:[k("span",{children:e.label}),k("button",{type:"button",className:"pl-2",onClick:o=>{o.stopPropagation(),t(e)},children:k(hs,{size:12})})]}));ca.displayName="SelectedChip";var mo=V.memo(({disabled:e,className:t,values:o,placeholder:r="",status:a,onDelete:n})=>k(H,{asChild:!0,disabled:e,children:ue("div",{className:i($({status:a}),"cursor-pointer [&>svg]:shrink-0 h-auto min-h-12 flex items-center justify-between w-full gap-2",t),children:[k("div",{className:"w-full flex flex-row items-center gap-2 flex-wrap",children:o.length?o.map(s=>k(ca,{item:s,onDelete:n},s.value)):k("span",{className:"text-[#79818C] dark:text-[#959BA4]",children:r})}),k("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",children:k("path",{d:"M16.5999 7.45825L11.1666 12.8916C10.5249 13.5333 9.4749 13.5333 8.83324 12.8916L3.3999 7.45825",stroke:"currentColor",strokeWidth:"1.5",strokeMiterlimit:"10",strokeLinecap:"round",strokeLinejoin:"round"})})]})}));mo.displayName="MultiSelectTrigger";var da=V.memo(({option:e,isChecked:t,onSelect:o,optionComponent:r})=>k("article",{className:"cursor-pointer relative hover:bg-status-success-bg transition flex w-[calc(100%-0.375rem)] mx-auto rounded-md items-center focus:dark:!text-[#DDDFE0] py-1.5 px-2 text-sm outline-none focus:bg-status-success-bg dark:!text-[#DDDFE0] focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 focus-visible:ring-1 focus-visible:ring-status-success-fill focus-visible:ring-offset-1 focus-visible:ring-offset-status-success-fill",onClick:()=>o(e),children:k("div",{className:"w-full h-[30px] flex flex-row items-center dark:!text-white",children:k(bt,{value:e.value,label:r?r(e):k("span",{children:e.label}),bodyClassName:"w-full",labelWrapperClassName:"w-full",labelClassName:i(r&&"w-full"),checked:t})})}));da.displayName="OptionItem";var ys=({options:e,children:t,onChange:o,optionComponent:r,values:a,hideSearch:n,modal:s,placeholder:c,isLoading:m,showSelectedValues:l=!1,error:p,label:u,showAsterisk:d})=>{let[f,N]=V.useState(""),y=a,v=V.useMemo(()=>new Set(y.map(P=>P.value)),[y]),g=V.useMemo(()=>{if(!f)return e;let P=f.trim().toLowerCase();return e.filter(F=>F.label?.trim()?.toLowerCase()?.includes(P))},[e,f]),R=V.useCallback(P=>{let F=v.has(P.value);o(F?y.filter(Pe=>Pe.value!==P.value):[...y,P])},[y,v,o]),x=V.useRef(null),[b,h]=V.useState(void 0);V.useLayoutEffect(()=>{if(!x.current)return;let P=x.current,F=()=>{h(P.getBoundingClientRect().width)};F();let Pe=new ResizeObserver(()=>{F()});return Pe.observe(P),()=>Pe.disconnect()},[]);let C=V.useCallback(P=>{let F=y.filter(Pe=>Pe.value!==P.value);o(F)},[y,o]),w=V.useCallback(()=>{y.length===e.length?o([]):o(e)},[y.length,e,o]),D=V.useCallback(P=>{N(P.target.value)},[]);return ue("div",{className:"relative space-y-1",children:[k(A,{showAsterisk:d,error:p,children:u}),ue(K,{modal:s,children:[k("div",{ref:x,children:t??k(mo,{values:y,placeholder:c??"Select",onDelete:C,className:"h-auto"})}),l&&k("div",{className:"flex py-2 gap-2 flex-wrap",children:y.map(P=>k("div",{className:"bg-gray-100 border text-black rounded-xl text-[10px] font-medium px-2 py-1",children:k("span",{children:P.label})},la()))}),ue(z,{portal:!s,align:"start",className:"min-w-[200px] p-0",style:{width:b?`${b}px`:void 0},children:[!n&&k("div",{className:"w-full px-4",children:ue("div",{className:"w-full h-[36px] px-1 flex items-center justify-start border-[0.5px] rounded-md border-[#D7D7D7] mb-[5px]",children:[m?k(pe,{}):ue("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[k("path",{d:"M11.5 21C16.7467 21 21 16.7467 21 11.5C21 6.25329 16.7467 2 11.5 2C6.25329 2 2 6.25329 2 11.5C2 16.7467 6.25329 21 11.5 21Z",stroke:"#959595",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),k("path",{d:"M22 22L20 20",stroke:"#959595",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})]}),k("input",{value:f,placeholder:"Search",type:"text",disabled:m,className:"oultine-0 focus-visible:outline-0 focus-visible:ring-0 ml-1 w-full !border-transparent placeholder:text-sm placeholder:font-normal dark:bg-transparent placeholder:text-[#959595] dark:placeholder:text-[#DDDFE0] focus:ring-0 focus:ring-offset-0 focus:bg-white dark:focus:bg-transparent dark:text-[#DDDFE0]",onChange:D})]})}),ue("div",{className:i("w-full h-[44px] px-2.5 flex items-center justify-between mb-[5px] border-[#D7D7D7] dark:border-[#5C636B]",n?"border-b-[0.5px]":"border-y-[0.5px]"),children:[k("button",{className:"text-sm text-primary-main font-normal",onClick:w,disabled:g.length<1||m,children:ue("span",{children:[y.length===e.length?"Unselect":"Select"," all"]})}),ue("p",{className:"text-sm text-[#959595] font-normal dark:text-[#DDDFE0]",children:[y.length," selected"]})]}),ue(le,{viewPortClassName:"max-h-[225px]",className:"pb-1",children:[m&&k("div",{className:"py-7 flex justify-center",children:k(pe,{})}),!m&&g.map(P=>k(da,{option:P,isChecked:v.has(P.value),onSelect:R,optionComponent:r},la()))]})]})]})]})};import*as Ae from"@radix-ui/react-tabs";import{jsx as He,jsxs as uo}from"react/jsx-runtime";function xs({tabs:e,defaultValue:t,onChange:o}){return uo(Ae.Root,{defaultValue:t,onValueChange:o,className:"flex flex-col items-start justify-start gap-2.5",children:[uo(le,{className:"w-full",children:[He(Ct,{className:"z-[1000]",orientation:"horizontal"}),He(Ae.List,{className:"my-2 border-b border-gray-300 items-center flex",children:e.map(r=>uo(Ae.Trigger,{className:"flex items-center gap-2 whitespace-nowrap rounded-t-md px-5 py-2 relative transition-all group hover:!bg-gray-200/50 dark:hover:!bg-gray-200/10 data-[state=active]:dark:hover:!bg-gray-200 data-[state=active]:hover:!bg-gray-200 data-[state=active]:bg-gray-200 before:absolute before:bottom-[0px] before:left-0 before:h-[2px] dark:before:h-[0px] before:w-full before:rounded-sm data-[state=active]:before:!bg-texts-50 before:content-['']",value:r?.key,children:[He("p",{className:"text-center text-sm leading-5 font-normal text-gray-500 group-data-[state=active]:font-medium group-data-[state=active]:text-gray-800",children:He("span",{children:r.title})}),r.count&&He("div",{className:"bg-gray-300 group-data-[state=active]:bg-texts-50 group-data-[state=active]:text-white text-texts-50 text-xs font-medium me-2 px-2.5 py-0.5 rounded-full",children:He("span",{children:r.count})})]},r?.key))})]}),e.map(r=>He(Ae.Content,{value:r?.key,className:"w-full",children:r.content},r?.key))]})}import{BiInfoCircle as ws,BiX as fa}from"react-icons/bi";import{cva as Cs}from"class-variance-authority";var ma=Cs("relative rounded-lg border px-4 py-4 text-sm",{variants:{variant:{default:"border-blue-200 bg-blue-50 text-blue-800",danger:"border-red-200 bg-red-50 text-red-800",success:"border-green-200 bg-green-50 text-green-800",pending:"border-yellow-200 bg-yellow-50 text-yellow-800"}},defaultVariants:{variant:"default"}}),pa={default:{primary:"",outlined:""},danger:{primary:"bg-red-600 hover:bg-red-600/80 text-white border-red-600",outlined:"border-red-600 text-red-600 hover:bg-red-50"},success:{primary:"bg-green-600 hover:bg-green-600/80 text-white border-green-600",outlined:"border-green-600 text-green-600 hover:bg-green-50"},pending:{primary:"bg-yellow-600 hover:bg-yellow-600/80 text-white border-yellow-600",outlined:"border-yellow-600 text-yellow-600 hover:bg-yellow-50"}},ua=(e,t)=>(pa[e]??pa.default)[t];import{jsx as we,jsxs as vt}from"react/jsx-runtime";var Ns=({title:e,message:t,variant:o="default",icon:r,action:a,dismissible:n=!1,onDismiss:s,isOpen:c=!0,align:m="start",classNames:l})=>{if(!c)return null;let p=a?.variant??"primary",u=ua(o??"default",p),d=m==="center";return vt("div",{className:i(ma({variant:o}),l?.root),children:[n&&we("button",{type:"button",onClick:s,className:"absolute top-3 right-3 opacity-60 transition-opacity hover:opacity-100 sm:hidden","aria-label":"Dismiss",id:"feature_banner_dismiss_button_mobile",children:we(fa,{size:20})}),vt("div",{className:i("flex flex-col gap-4 sm:flex-row sm:items-start sm:justify-between",d&&"sm:items-center"),id:"feature_banner_container",children:[vt("div",{className:i("flex items-start gap-3 pr-6 sm:pr-0",d&&"sm:items-center"),id:"feature_banner_content_wrapper",children:[we("span",{className:i("shrink-0 mt-0.5",d&&"sm:mt-0",l?.icon),id:"feature_banner_icon",children:r??we(ws,{size:18})}),vt("div",{className:"min-w-0",id:"feature_banner_content",children:[we("p",{className:i("font-semibold",l?.title),id:"feature_banner_title",children:e}),t&&we("p",{id:"feature_banner_message",className:i("mt-1 text-sm opacity-90 break-words",l?.message),children:t})]})]}),(a||n)&&vt("div",{className:i("flex flex-col items-end gap-3 sm:flex-row sm:items-center",d&&"sm:items-center"),id:"feature_banner_actions_wrapper",children:[a&&we(Q,{variant:p,type:"button",onClick:a.onClick,className:i(u,l?.action),id:"feature_banner_action_button",children:a.label}),n&&we("button",{type:"button",onClick:s,className:"hidden sm:flex opacity-60 transition-opacity hover:opacity-100","aria-label":"Dismiss",id:"feature_banner_dismiss_button",children:we(fa,{size:20})})]})]})]})};import Ws from"@tiptap/extension-font-family";import $s from"@tiptap/extension-link";import zs from"@tiptap/extension-underline";import{EditorContent as Zs,useEditor as Us}from"@tiptap/react";import Ks from"@tiptap/starter-kit";import bo from"clsx";import _s from"clsx";import{Bold as Rs,Italic as Ps,List as Ls,ListOrdered as ks,Quote as Ds,Strikethrough as Ss,Underline as Ts}from"lucide-react";import{jsx as Es}from"react/jsx-runtime";var Fs=()=>Es("span",{className:"text-sm font-semibold",children:"H1"}),_e={bold:{icon:Rs,action:e=>e.chain().focus().toggleBold().run(),isActive:e=>e.isActive("bold"),title:"Bold"},italic:{icon:Ps,action:e=>e.chain().focus().toggleItalic().run(),isActive:e=>e.isActive("italic"),title:"Italic"},underline:{icon:Ts,action:e=>e.chain().focus().toggleUnderline().run(),isActive:e=>e.isActive("underline"),title:"Underline"},strike:{icon:Ss,action:e=>e.chain().focus().toggleStrike().run(),isActive:e=>e.isActive("strike"),title:"Strikethrough"},heading1:{icon:Fs,action:e=>e.chain().focus().toggleHeading({level:1}).run(),isActive:e=>e.isActive("heading",{level:1}),title:"Heading 1"},bulletList:{icon:Ls,action:e=>e.chain().focus().toggleBulletList().run(),isActive:e=>e.isActive("bulletList"),title:"Bullet List"},orderedList:{icon:ks,action:e=>e.chain().focus().toggleOrderedList().run(),isActive:e=>e.isActive("orderedList"),title:"Numbered List"},blockquote:{icon:Ds,action:e=>e.chain().focus().toggleBlockquote().run(),isActive:e=>e.isActive("blockquote"),title:"Quote"},textStyle:{icon:()=>null,action:()=>!0,isActive:()=>!1,title:"Text Style"},link:{icon:()=>null,action:()=>!0,isActive:()=>!1,title:"Link"}};import Ms from"clsx";import{jsx as ga}from"react/jsx-runtime";var ba=({editor:e,icon:t,action:o,isActive:r,disabled:a,title:n,className:s})=>ga("button",{type:"button",onClick:()=>o(e),disabled:a??!e.can().chain().focus().run(),title:n,className:Ms("p-2 rounded hover:bg-gray-100 transition",{"opacity-100 text-black":r(e),"opacity-40 text-gray-500":!r(e),"cursor-not-allowed":a},s),children:ga(t,{width:18,height:18})});import As from"clsx";import{Link as Is}from"lucide-react";import{useCallback as It,useMemo as fo,useState as va}from"react";import{Fragment as Bs,jsx as Ne,jsxs as go}from"react/jsx-runtime";var ha=({editor:e})=>{let[t,o]=va(!1),[r,a]=va(""),n=fo(()=>!e.state.selection.empty,[e.state.selection]),s=fo(()=>e.isActive("link"),[e]),c=fo(()=>n||s,[n,s]),m=It(()=>{r.trim()&&(e.chain().focus().extendMarkRange("link").setLink({href:r.trim()}).run(),o(!1),a(""))},[e,r]),l=It(()=>{e.chain().focus().extendMarkRange("link").unsetLink().run(),o(!1),a("")},[e]),p=It(d=>{let f=e.getAttributes("link").href;a(f||""),o(d)},[c,e]),u=It(d=>{d.key==="Enter"&&(d.preventDefault(),m()),d.key==="Escape"&&o(!1)},[m]);return Ne(ie,{open:t,onOpenChange:p,trigger:Ne("div",{className:As("",{"opacity-100 text-black":t,"opacity-40 text-gray-500":!t}),title:c?e.isActive("link")?"Edit link":"Add link":"Select text to add a link",children:Ne(Is,{width:18,height:18})}),contentClassName:"w-80 p-4",align:"start",children:Ne("div",{className:"space-y-4",children:!n&&!s?Ne("div",{className:"text-sm text-gray-500 bg-gray-50 rounded p-3 border border-gray-200",children:"Please select some text in the editor to apply a link."}):go(Bs,{children:[go("div",{children:[Ne("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"Link URL"}),Ne(G,{type:"url",value:r,onChange:d=>a(d.target.value),placeholder:"https://example.com",autoFocus:!0,onKeyDown:u})]}),go("div",{className:"flex justify-between space-x-2",children:[Ne(Q,{type:"button",onClick:m,disabled:!r.trim(),variant:"primary",size:"sm",className:"flex-1",children:e.isActive("link")?"Update Link":"Add Link"}),e.isActive("link")&&Ne(Q,{type:"button",onClick:l,variant:"neutral",size:"sm",className:"px-3 py-2 bg-gray-100 text-gray-700 rounded-md hover:bg-gray-200 transition text-sm font-medium",children:"Remove"})]})]})})})};import Vs from"clsx";import{ChevronDown as Os}from"lucide-react";import{useState as Hs}from"react";import{jsx as qe,jsxs as ya}from"react/jsx-runtime";var xa=({editor:e})=>{let[t,o]=Hs(!1),r=()=>e.isActive("heading",{level:1})?"Heading 1":e.isActive("heading",{level:2})?"Heading 2":e.isActive("heading",{level:3})?"Heading 3":"Normal",a=[{label:"Normal",action:()=>e.chain().focus().setParagraph().run(),isActive:!e.isActive("heading")},{label:"Heading 1",action:()=>e.chain().focus().toggleHeading({level:1}).run(),isActive:e.isActive("heading",{level:1})},{label:"Heading 2",action:()=>e.chain().focus().toggleHeading({level:2}).run(),isActive:e.isActive("heading",{level:2})},{label:"Heading 3",action:()=>e.chain().focus().toggleHeading({level:3}).run(),isActive:e.isActive("heading",{level:3})}];return qe(ie,{open:t,onOpenChange:o,trigger:ya("button",{type:"button",className:"flex items-center space-x-1 p-2 rounded hover:bg-gray-100 transition min-w-[110px] justify-between text-gray-600",children:[qe("span",{className:"text-base ",children:r()}),qe(Os,{width:16,height:16})]}),contentClassName:"w-48 w-auto- p-1",align:"start",children:qe("div",{className:"space-y-1",children:a.map((n,s)=>ya("div",{children:[s===1&&qe("div",{className:"border-b border-gray-200 my-1"}),qe("button",{type:"button",onClick:()=>{n.action(),o(!1)},className:Vs("w-full text-left px-3 py-2 rounded text-sm hover:bg-gray-100 transition",{"bg-gray-100 font-medium":n.isActive}),children:n.label})]},n.label))})})};import{jsx as Bt,jsxs as Gs}from"react/jsx-runtime";var Ca=({editor:e,controls:t=["textStyle","bold","italic","underline","strike","link","bulletList","orderedList","blockquote"],className:o,extraNodes:r})=>{let a=Array.isArray(t)?t:[];return Gs("div",{className:_s("sticky top-0 z-10 flex w-full flex-wrap items-center space-x-1 border-b bg-white/80 backdrop-blur-md p-2",o),children:[a.map(n=>n==="textStyle"||n==="link"||_e&&_e[n]?Bt("div",{className:"flex items-center",children:n==="textStyle"?Bt(xa,{editor:e}):n==="link"?Bt(ha,{editor:e}):Bt(ba,{editor:e,icon:_e[n].icon,action:_e[n].action,isActive:_e[n].isActive,title:_e[n].title})},n):null),r]})};import{jsx as Je,jsxs as Vt}from"react/jsx-runtime";var js=({label:e,helpText:t,error:o,value:r="",onChange:a,optional:n,isRequired:s,extensions:c=[],editorClassName:m,wrapperClassName:l,controls:p,extraMenuNodes:u,placeholder:d})=>{let f=Us({immediatelyRender:!1,content:r,editorProps:{attributes:{class:"px-3 h-40"}},extensions:[Ks,zs,Ws,$s.configure({openOnClick:!1,HTMLAttributes:{class:"text-blue-600 underline hover:text-blue-800"}}),...c],onFocus:({event:N})=>{N.preventDefault(),N.stopPropagation()},onUpdate:({editor:N})=>{let y=N.getHTML();a?.(N.isEmpty?"":y)}});return f?Vt("div",{className:bo("flex flex-col w-full",l),children:[e&&Vt("div",{className:"flex justify-between mb-1",children:[Vt("label",{className:"text-sm font-medium text-gray-900 flex items-center",htmlFor:"editor-id",children:[e,s&&Je("span",{className:"ml-1 text-red-500",children:"*"})]}),n&&Je("span",{className:"text-sm text-gray-400",children:"Optional"})]}),Vt("div",{className:bo("relative border-none rounded-md overflow-hidden",o?"ring-1 ring-red-300 focus-within:ring-red-500":"ring-1 ring-gray-300 focus-within:ring-primary-main"),children:[Je(Ca,{editor:f,controls:p,extraNodes:u}),Je(Zs,{editor:f,className:bo("overflow-y-auto p-3 h-full bg-white",m),placeholder:d})]}),o&&Je("p",{className:"mt-2 text-sm text-red-600",id:"editor-error",children:o}),t&&Je("p",{className:"mt-2 text-sm text-gray-500",id:"editor-helptext",children:t})]}):null};import{Search as Xs,X as Na}from"lucide-react";import*as O from"react";import{jsx as S,jsxs as Re}from"react/jsx-runtime";var wa={success:"bg-green-500/20 text-green-500 ring-1 ring-inset ring-current",failed:"bg-red-500/20 text-red-500 ring-1 ring-inset ring-current",pending:"bg-yellow-500/20 text-yellow-500 ring-1 ring-inset ring-current",default:"bg-gray-100 text-gray-700"},Ra=O.memo(({tag:e,onRemove:t})=>Re("p",{className:i("text-xs p-1.5 py-1 rounded-md flex items-center gap-1",wa[e.variant??"default"]??wa.default),children:[S("span",{children:e.label}),S("button",{type:"button",className:"pl-1",onClick:o=>{o.stopPropagation(),t()},children:S(Na,{size:12})})]}));Ra.displayName="SelectedChip";var Pa=O.memo(({option:e,isChecked:t,onSelect:o,renderOption:r,disabled:a})=>S("article",{className:"cursor-pointer relative hover:bg-status-success-bg transition flex w-[calc(100%-0.375rem)] mx-auto rounded-md items-center py-1.5 px-2 text-sm outline-none focus:bg-status-success-bg dark:!text-[#DDDFE0] focus-visible:ring-1 focus-visible:ring-status-success-fill focus-visible:ring-offset-1",onClick:()=>!a&&o(e),children:S("div",{className:"w-full h-[20px] flex flex-row items-center dark:!text-white",children:S(bt,{disabled:a,value:e.value,label:r?r(e,t):S("span",{children:e.label}),bodyClassName:"w-full",labelWrapperClassName:"w-full",checked:t})})}));Pa.displayName="OptionItem";var Ys=({value:e,onChange:t,options:o=[],label:r,error:a,placeholder:n="Add tag...",description:s,showAsterisk:c,disabled:m,isLoading:l,allowCreate:p=!0,renderTag:u,renderOption:d,validateTag:f,onCreate:N,maxTags:y})=>{let[v,g]=O.useState(""),R=O.useRef(null),[x,b]=O.useState();O.useLayoutEffect(()=>{if(!R.current)return;let L=()=>b(R.current?.getBoundingClientRect().width);L();let M=new ResizeObserver(L);return M.observe(R.current),()=>M.disconnect()},[]);let h=O.useMemo(()=>new Set(e.map(L=>L.value)),[e]),C=O.useMemo(()=>{let L=v.trim().toLowerCase();return L?o.filter(M=>M.label.toLowerCase().includes(L)):o},[o,v]),w=O.useCallback(L=>t(e.filter(M=>M.value!==L)),[e,t]),D=O.useCallback(L=>{h.has(L.value)||y&&e.length>=y||t([...e,L])},[e,t,h,y]),P=O.useCallback(L=>{let M=L.trim();if(!M||!(f?f(M):!0))return;let yo=o.find(xo=>xo.value.toLowerCase()===M.toLowerCase()||xo.label.toLowerCase()===M.toLowerCase());if(yo){D(yo),g("");return}p&&(D(N?.(M)??{value:M,label:M}),g(""))},[o,p,N,f,D]),F=L=>{L.key==="Enter"&&(L.preventDefault(),P(v)),L.key==="Backspace"&&!v&&e.length&&w(e[e.length-1].value)},Pe=!l&&p&&v.trim()&&!o.some(L=>L.value.toLowerCase()===v.trim().toLowerCase());return Re("div",{className:"relative space-y-1",children:[S(A,{showAsterisk:c,error:a,children:r}),Re(K,{children:[S("div",{ref:R,children:S(H,{asChild:!0,disabled:m,children:Re("div",{id:"tags_trigger_container",className:i($({status:a?"error":"default"}),"cursor-pointer [&>svg]:shrink-0 h-auto min-h-10 flex items-center justify-between w-full gap-2 p-2"),children:[Re("div",{className:"w-full flex flex-row items-center gap-2 flex-wrap",children:[e.length>0&&e?.map(L=>{let M=()=>w(L.value);return u?S(O.Fragment,{children:Re("div",{className:"flex items-center",children:[u(L),S("button",{type:"button",className:"pl-1",onClick:ho=>{ho.stopPropagation(),M()},children:S(Na,{size:12})})]})},L.value):S(Ra,{tag:L,onRemove:M},L.value)}),S("input",{value:v,disabled:m,readOnly:!p||void 0,placeholder:n,className:"flex-1 min-w-[80px] !border-none !outline-none bg-transparent text-sm p-0 h-auto !focus-visible:ring-0 placeholder:text-[#79818C] placeholder:text-sm",onChange:L=>g(L.target.value),onKeyDown:F})]}),S("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",children:S("path",{d:"M16.5999 7.45825L11.1666 12.8916C10.5249 13.5333 9.4749 13.5333 8.83324 12.8916L3.3999 7.45825",stroke:"currentColor",strokeWidth:"1.5",strokeMiterlimit:"10",strokeLinecap:"round",strokeLinejoin:"round"})})]})})}),Re(z,{align:"start",className:"min-w-[200px] p-0 mt-1",style:{width:x?`${x}px`:void 0},children:[S("div",{className:"w-full",children:S("div",{className:i("w-full mt-1 h-10 flex items-center justify-start mb-[5px] px-2 pt-2",{"mt-3":a}),children:S(G,{error:a,leftNode:S(Xs,{className:"text-gray-400"}),value:v,placeholder:"Type to search or create",type:"text",disabled:l,rightNode:l?S(pe,{colour:"secondary"}):void 0,onChange:L=>g(L.target.value),onKeyDown:L=>{L.key==="Enter"&&(L.preventDefault(),P(v))}})})}),Re(le,{viewPortClassName:"max-h-[225px] px",className:"pb-1 mt-3",children:[l&&S("div",{className:"py-7 flex justify-center",children:S(pe,{})}),!l&&C.map(L=>S(Pa,{option:L,isChecked:h.has(L.value),disabled:L.disabled,onSelect:M=>h.has(M.value)?w(M.value):D(M),renderOption:d},L.value)),Pe&&Re("button",{type:"button",className:i("w-full text-left px-3 py-2 text-sm border-t border-t-gray-300 hover:bg-gray-50 mt-1",{"mt-3":a}),onClick:()=>P(v),children:['Create "',v.trim(),'"']})]})]})]}),s&&!a&&S("div",{className:"text-sm text-gray-500",children:s}),S(ee,{error:a})]})};var La={USD:"$",CAD:"CA$",EUR:"\u20AC",AED:"AED",AFN:"Af",ALL:"ALL",AMD:"AMD",ARS:"AR$",AUD:"AU$",AZN:"man.",BAM:"KM",BDT:"Tk",BGN:"BGN",BHD:"BD",BIF:"FBu",BND:"BN$",BOB:"Bs",BRL:"R$",BWP:"BWP",BYN:"Br",BZD:"BZ$",CDF:"CDF",CHF:"CHF",CLP:"CL$",CNY:"CN\xA5",COP:"CO$",CRC:"\u20A1",CVE:"CV$",CZK:"K\u010D",DJF:"Fdj",DKK:"Dkr",DOP:"RD$",DZD:"DA",EEK:"Ekr",EGP:"EGP",ERN:"Nfk",ETB:"Br",GBP:"\xA3",GEL:"GEL",GHS:"GH\u20B5",GNF:"FG",GTQ:"GTQ",HKD:"HK$",HNL:"HNL",HRK:"kn",HUF:"Ft",IDR:"Rp",ILS:"\u20AA",INR:"\u20B9",IQD:"IQD",IRR:"IRR",ISK:"Ikr",JMD:"J$",JOD:"JD",JPY:"\xA5",KES:"Ksh",KHR:"KHR",KMF:"CF",KRW:"\u20A9",KWD:"KD",KZT:"KZT",LBP:"L.L.",LKR:"SLRs",LTL:"Lt",LVL:"Ls",LYD:"LD",MAD:"MAD",MDL:"MDL",MGA:"MGA",MKD:"MKD",MMK:"MMK",MOP:"MOP$",MUR:"MURs",MXN:"MX$",MYR:"RM",MZN:"MTn",NAD:"N$",NGN:"\u20A6",NIO:"C$",NOK:"Nkr",NPR:"NPRs",NZD:"NZ$",OMR:"OMR",PAB:"B/.",PEN:"S/.",PHP:"\u20B1",PKR:"PKRs",PLN:"z\u0142",PYG:"\u20B2",QAR:"QR",RON:"RON",RSD:"din.",RUB:"RUB",RWF:"RWF",SAR:"SR",SDG:"SDG",SEK:"Skr",SGD:"S$",SOS:"Ssh",SYP:"SY\xA3",THB:"\u0E3F",TND:"DT",TOP:"T$",TRY:"TL",TTD:"TT$",TWD:"NT$",TZS:"TSh",UAH:"\u20B4",UGX:"USh",UYU:"$U",UZS:"UZS",VEF:"Bs.F.",VND:"\u20AB",XAF:"F CFA",XOF:"CFA",YER:"YR",ZAR:"R",ZMK:"ZK",ZWL:"ZWL$"},ht=class ht{static getCurrencyLocaleMap(t){return{XOF:"fr",XAF:"fr"}[t]||"en"}static koboToNaira(t){return+t/100}static nairaToKobo(t){return+t*100}static getCurrencySymbol(t){return La[t]||t}};Co(ht,"formatAmountAndCurrency",(t,o,r)=>{let a=new Intl.NumberFormat(r?.locale||ht.getCurrencyLocaleMap(t),{maximumFractionDigits:3,style:"currency",currency:t,currencyDisplay:"symbol"}).format(r?.convertToMajorCurrency?ht.koboToNaira(Number(o)):Number(o)).replace(/^(\D+)/,"$1 ").replace("\u202F"," ").replace(/\s+/,""),n=La[t]||t;return a.replace(t,n)});var ka=ht;import vo from"dayjs";var Da=class{static getDateLibrary(){return vo()}static formatTimestampToDate(t,o){return vo.unix(t).format(o||"ddd, MMM, YYYY | HH:mm:ss")}static formatDateToTimestamp(t){return vo(t).unix()}};export{ka as AmountAction,Dn as Banner,Q as Button,io as CalendarInput,In as CopyableLabel,hn as Country,La as CurrencySymbolMap,Da as DateAction,jt as DebouncedInput,_n as DevBanner,zt as Dialog,Xn as Drawer,Un as DrawerClose,Xt as DrawerRoot,Ns as FeatureBanner,co as FilterPopover,De as FlagComponent,A as FormLabel,vs as HasResourcePermission,G as Input,pe as Loader,ai as LocaleSelector,ys as MultiSelect,mo as MultiSelectTrigger,Rn as OTPInput,po as PageDataToolbar,ao as Pagination,zo as PasswordInput,Lt as PermissionsContext,Ci as PermissionsProvider,or as PhoneInput,ie as Popover,z as PopoverContent,K as PopoverRoot,H as PopoverTrigger,Tt as RadioGroup,Ft as RadioGroupItem,js as RichTextEditor,le as ScrollArea,Se as Select,Ai as Sidebar,Bi as Status,bs as Table,xs as Tabs,Ys as TagsInput,ze as TextOverflow,Zo as Textarea,yt as Tooltip,Ot as TooltipContent,Ro as TooltipProvider,Po as TooltipRoot,Lo as TooltipTrigger,J as buttonVariants,i as cn,ft as useFilterStore,ut as useHasPermission,Vr as usePermissions};
15
15
  //# sourceMappingURL=index.mjs.map