@datacrest/dcuikit 1.0.12 → 1.0.13
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/build/index.css +1 -1
- package/build/index.esm.css +1 -1
- package/build/index.esm.js +2 -2
- package/build/index.esm.js.map +1 -1
- package/build/index.js +2 -2
- package/build/index.js.map +1 -1
- package/build/tsconfig.prod.tsbuildinfo +1 -1
- package/build/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
package/build/index.js
CHANGED
|
@@ -17,7 +17,7 @@ var be={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24
|
|
|
17
17
|
*
|
|
18
18
|
* This source code is licensed under the ISC license.
|
|
19
19
|
* See the LICENSE file in the root directory of this source tree.
|
|
20
|
-
*/const we=e.forwardRef(({color:t="currentColor",size:r=24,strokeWidth:n=2,absoluteStrokeWidth:o,className:i="",children:a,iconNode:l,...s},c)=>e.createElement("svg",{ref:c,...be,width:r,height:r,stroke:t,strokeWidth:o?24*Number(n)/Number(r):n,className:he("lucide",i),...!a&&!ge(s)&&{"aria-hidden":"true"},...s},[...l.map(([t,r])=>e.createElement(t,r)),...Array.isArray(a)?a:[a]])),xe=(t,r)=>{const n=e.forwardRef(({className:n,...o},i)=>{return e.createElement(we,{ref:i,iconNode:r,className:he(`lucide-${a=ye(t),a.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()}`,`lucide-${t}`,n),...o});var a});return n.displayName=ye(t),n},Oe=xe("arrow-up-down",[["path",{d:"m21 16-4 4-4-4",key:"f6ql7i"}],["path",{d:"M17 20V4",key:"1ejh1v"}],["path",{d:"m3 8 4-4 4 4",key:"11wl7u"}],["path",{d:"M7 4v16",key:"1glfcx"}]]),Ee=xe("calendar",[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}]]),ke=xe("check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]),je=xe("chevron-down",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]),Pe=xe("chevron-left",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]),Se=xe("chevron-right",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]),Ce=xe("chevron-up",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]),Ne=xe("circle",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]),ze=xe("ellipsis",[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}]]),Te=xe("file",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}]]),Le=xe("house",[["path",{d:"M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8",key:"5wwlr5"}],["path",{d:"M3 10a2 2 0 0 1 .709-1.528l7-5.999a2 2 0 0 1 2.582 0l7 5.999A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z",key:"1d0kgt"}]]),Me=xe("loader-circle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]),Re=xe("loader",[["path",{d:"M12 2v4",key:"3427ic"}],["path",{d:"m16.2 7.8 2.9-2.9",key:"r700ao"}],["path",{d:"M18 12h4",key:"wj9ykh"}],["path",{d:"m16.2 16.2 2.9 2.9",key:"1bxg5t"}],["path",{d:"M12 18v4",key:"jadmvz"}],["path",{d:"m4.9 19.1 2.9-2.9",key:"bwix9q"}],["path",{d:"M2 12h4",key:"j09sii"}],["path",{d:"m4.9 4.9 2.9 2.9",key:"giyufr"}]]),De=xe("search",[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]]),Ae=xe("x",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),Ie=({loading:t,children:r,iconLeft:n,iconRight:o})=>e.createElement("div",{className:ve("flex items-center justify-center gap-2 transition-all duration-300",t?"opacity-0":"opacity-100")},n&&e.createElement("span",{className:"shrink-0"},n),e.createElement("span",{className:"relative z-10"},r),o&&e.createElement("span",{className:"shrink-0"},o)),_e=e.forwardRef(({iconLeft:t,iconRight:r,variant:n="primary",displayType:o="default",status:i="accepted",size:a="medium",loading:l=!1,disabled:s=!1,dataTestId:c,fluid:u=!1,className:p,...d},f)=>{const m=ve("group relative inline-flex items-center justify-center font-medium","rounded-md ring-offset-background transition-all duration-300","focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2","disabled:pointer-events-none disabled:opacity-50 disabled:border-input","before:absolute before:inset-0 before:rounded-md before:transition-all before:duration-300","after:absolute after:inset-0 after:rounded-md after:transition-all after:duration-300"),v={primary:ve("bg-primary text-primary-foreground","border border-primary","shadow-[0_2px_10px] shadow-primary/30 dark:shadow-primary/20","hover:shadow-[0_8px_25px] hover:shadow-primary/40 dark:hover:shadow-primary/30","hover:bg-primary/90 hover:border-primary","active:shadow-[0_2px_6px] active:shadow-primary/30 dark:active:shadow-primary/20","before:bg-[radial-gradient(800px_circle_at_var(--mouse-x)_var(--mouse-y),transparent_40%)]","after:bg-linear-to-t after:from-black/10 after:to-transparent"),secondary:ve("bg-
|
|
20
|
+
*/const we=e.forwardRef(({color:t="currentColor",size:r=24,strokeWidth:n=2,absoluteStrokeWidth:o,className:i="",children:a,iconNode:l,...s},c)=>e.createElement("svg",{ref:c,...be,width:r,height:r,stroke:t,strokeWidth:o?24*Number(n)/Number(r):n,className:he("lucide",i),...!a&&!ge(s)&&{"aria-hidden":"true"},...s},[...l.map(([t,r])=>e.createElement(t,r)),...Array.isArray(a)?a:[a]])),xe=(t,r)=>{const n=e.forwardRef(({className:n,...o},i)=>{return e.createElement(we,{ref:i,iconNode:r,className:he(`lucide-${a=ye(t),a.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()}`,`lucide-${t}`,n),...o});var a});return n.displayName=ye(t),n},Oe=xe("arrow-up-down",[["path",{d:"m21 16-4 4-4-4",key:"f6ql7i"}],["path",{d:"M17 20V4",key:"1ejh1v"}],["path",{d:"m3 8 4-4 4 4",key:"11wl7u"}],["path",{d:"M7 4v16",key:"1glfcx"}]]),Ee=xe("calendar",[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}]]),ke=xe("check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]),je=xe("chevron-down",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]),Pe=xe("chevron-left",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]),Se=xe("chevron-right",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]),Ce=xe("chevron-up",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]),Ne=xe("circle",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]),ze=xe("ellipsis",[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}]]),Te=xe("file",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}]]),Le=xe("house",[["path",{d:"M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8",key:"5wwlr5"}],["path",{d:"M3 10a2 2 0 0 1 .709-1.528l7-5.999a2 2 0 0 1 2.582 0l7 5.999A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z",key:"1d0kgt"}]]),Me=xe("loader-circle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]),Re=xe("loader",[["path",{d:"M12 2v4",key:"3427ic"}],["path",{d:"m16.2 7.8 2.9-2.9",key:"r700ao"}],["path",{d:"M18 12h4",key:"wj9ykh"}],["path",{d:"m16.2 16.2 2.9 2.9",key:"1bxg5t"}],["path",{d:"M12 18v4",key:"jadmvz"}],["path",{d:"m4.9 19.1 2.9-2.9",key:"bwix9q"}],["path",{d:"M2 12h4",key:"j09sii"}],["path",{d:"m4.9 4.9 2.9 2.9",key:"giyufr"}]]),De=xe("search",[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]]),Ae=xe("x",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),Ie=({loading:t,children:r,iconLeft:n,iconRight:o})=>e.createElement("div",{className:ve("flex items-center justify-center gap-2 transition-all duration-300",t?"opacity-0":"opacity-100")},n&&e.createElement("span",{className:"shrink-0"},n),e.createElement("span",{className:"relative z-10"},r),o&&e.createElement("span",{className:"shrink-0"},o)),_e=e.forwardRef(({iconLeft:t,iconRight:r,variant:n="primary",displayType:o="default",status:i="accepted",size:a="medium",loading:l=!1,disabled:s=!1,dataTestId:c,fluid:u=!1,className:p,...d},f)=>{const m=ve("group relative inline-flex items-center justify-center font-medium","rounded-md ring-offset-background transition-all duration-300","focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2","disabled:pointer-events-none disabled:opacity-50 disabled:border-input","before:absolute before:inset-0 before:rounded-md before:transition-all before:duration-300","after:absolute after:inset-0 after:rounded-md after:transition-all after:duration-300"),v={primary:ve("bg-primary text-primary-foreground","border border-primary","shadow-[0_2px_10px] shadow-primary/30 dark:shadow-primary/20","hover:shadow-[0_8px_25px] hover:shadow-primary/40 dark:hover:shadow-primary/30","hover:bg-primary/90 hover:border-primary","active:shadow-[0_2px_6px] active:shadow-primary/30 dark:active:shadow-primary/20","before:bg-[radial-gradient(800px_circle_at_var(--mouse-x)_var(--mouse-y),transparent_40%)]","after:bg-linear-to-t after:from-black/10 after:to-transparent"),secondary:ve("bg-secondary text-secondary-foreground","border border-border dark:border-border","shadow-[0_2px_8px] shadow-black/5 dark:shadow-black/20","hover:shadow-[0_4px_16px] hover:shadow-black/10 dark:hover:shadow-black/30","hover:bg-secondary/80 hover:border-border dark:hover:bg-secondary/90 dark:hover:border-border","active:shadow-[0_1px_4px] active:shadow-black/10 active:translate-y-[1px]","before:bg-[radial-gradient(800px_circle_at_var(--mouse-x)_var(--mouse-y),rgba(255,255,255,0.1),transparent_50%)]","after:bg-linear-to-b after:from-white/20 after:to-transparent dark:after:from-white/5"),tertiary:ve("bg-background text-foreground","border border-input dark:border-input","shadow-[0_1px_3px] shadow-black/5 dark:shadow-black/20","hover:border-muted-foreground/50 hover:bg-accent dark:hover:bg-accent dark:hover:border-muted-foreground/30","hover:shadow-[0_2px_8px] hover:shadow-black/10 dark:hover:shadow-black/25","active:bg-accent/80 dark:active:bg-accent/80","before:bg-[radial-gradient(800px_circle_at_var(--mouse-x)_var(--mouse-y),rgba(0,0,0,0.05),transparent_50%)] dark:before:bg-[radial-gradient(800px_circle_at_var(--mouse-x)_var(--mouse-y),rgba(255,255,255,0.05),transparent_50%)]","after:bg-linear-to-b after:from-white/40 after:to-transparent dark:after:from-white/5"),danger:ve("bg-destructive text-destructive-foreground","border border-destructive","shadow-[0_2px_10px] shadow-destructive/30 dark:shadow-destructive/20","hover:shadow-[0_8px_25px] hover:shadow-destructive/40 dark:hover:shadow-destructive/30","hover:bg-destructive/90 hover:border-destructive/90","active:shadow-[0_2px_6px] active:shadow-destructive/30 dark:active:shadow-destructive/20","before:bg-[radial-gradient(800px_circle_at_var(--mouse-x)_var(--mouse-y),transparent_40%)]","after:bg-linear-to-t after:from-black/10 after:to-transparent"),warning:ve("bg-warning text-warning-foreground","border border-warning dark:border-warning/80","shadow-[0_2px_10px] shadow-warning/30 dark:shadow-warning/20","hover:shadow-[0_8px_25px] hover:shadow-warning/40 dark:hover:shadow-warning/30","hover:bg-warning/90 hover:border-warning/90","active:shadow-[0_2px_6px] active:shadow-warning/30 dark:active:shadow-warning/20","before:bg-[radial-gradient(800px_circle_at_var(--mouse-x)_var(--mouse-y),transparent_40%)]","after:bg-linear-to-t after:from-black/10 after:to-transparent"),harford:ve("bg-[#043d5a] text-primary-foreground","border border-[#043d5a]","shadow-[0_2px_10px] shadow-[#043d5a]/30 dark:shadow-[#043d5a]/20","hover:shadow-[0_8px_25px] hover:shadow-[#043d5a]/40 dark:hover:shadow-[#043d5a]/30","hover:bg-[#043d5a]/90 hover:border-[#043d5a]","active:shadow-[0_2px_6px] active:shadow-[#043d5a]/30 dark:active:shadow-[#043d5a]/20","before:bg-[radial-gradient(800px_circle_at_var(--mouse-x)_var(--mouse-y),transparent_40%)]","after:bg-linear-to-t after:from-black/10 after:to-transparent"),link:ve("text-primary dark:text-primary/90 underline-offset-4","hover:text-primary/90 dark:hover:text-primary/80 hover:underline","bg-transparent border-none shadow-none","active:text-primary/80 dark:active:text-primary/70","before:hidden after:hidden")};return e.createElement("button",{...d,ref:f,disabled:l||s,"data-test-id":c,onMouseMove:e=>{const t=e.currentTarget,r=t.getBoundingClientRect(),n=e.clientX-r.left,o=e.clientY-r.top;t.style.setProperty("--mouse-x",`${n}px`),t.style.setProperty("--mouse-y",`${o}px`)},className:ve(m,"default"===o?ve(v[n],{small:"h-8 px-3 text-sm",medium:"h-10 px-4 py-2",large:"h-12 px-6 text-lg"}[a]):ve({primary:"bg-primary text-primary-foreground border border-primary shadow-sm py-0.5 px-2.5 text-xs font-medium",secondary:"bg-secondary text-secondary-foreground border border-border shadow-sm py-0.5 px-2.5 text-xs font-medium",tertiary:"bg-muted text-muted-foreground border border-input shadow-sm py-0.5 px-2.5 text-xs font-medium",danger:"bg-destructive text-destructive-foreground border border-destructive shadow-sm py-0.5 px-2.5 text-xs font-medium",warning:"bg-warning text-warning-foreground border border-warning shadow-sm py-0.5 px-2.5 text-xs font-medium",harford:"bg-[#043d5a] text-primary-foreground border border-[#043d5a] shadow-sm py-0.5 px-2.5 text-xs font-medium",link:"bg-primary text-primary-foreground border border-primary shadow-sm py-0.5 px-2.5 text-xs font-medium underline underline-offset-2"}[n],"accepted"!==i&&{accepted:"",pending:"bg-amber-500 text-amber-50 border-amber-600"}[i]),u&&"w-full","default"===o&&"active:scale-[0.98] transition-transform duration-300",p)},l&&"badge"!==o&&e.createElement("div",{className:"absolute inset-0 flex items-center justify-center"},e.createElement(Me,{className:"h-5 w-5 animate-spin"})),e.createElement(Ie,{loading:l,iconLeft:t,iconRight:r},d.children))});
|
|
21
21
|
/**
|
|
22
22
|
* @license lucide-react v0.525.0 - ISC
|
|
23
23
|
*
|
|
@@ -41,7 +41,7 @@ object-assign
|
|
|
41
41
|
Copyright (c) 2018 Jed Watson.
|
|
42
42
|
Licensed under the MIT License (MIT), see
|
|
43
43
|
http://jedwatson.github.io/classnames
|
|
44
|
-
*/var Ah,Ih=(Rh||(Rh=1,Ah=Dh,function(){var e={}.hasOwnProperty;function t(){for(var e="",t=0;t<arguments.length;t++){var o=arguments[t];o&&(e=n(e,r(o)))}return e}function r(r){if("string"==typeof r||"number"==typeof r)return r;if("object"!=typeof r)return"";if(Array.isArray(r))return t.apply(null,r);if(r.toString!==Object.prototype.toString&&!r.toString.toString().includes("[native code]"))return r.toString();var o="";for(var i in r)e.call(r,i)&&r[i]&&(o=n(o,i));return o}function n(e,t){return t?e?e+" "+t:e+t:e}Ah.exports?(t.default=t,Ah.exports=t):window.classNames=t}()),Dh.exports),_h=Be(Ih);const Bh={extraSmall:"mt-1 mb-1",small:"mt-2 mb-2",medium:"mt-4 mb-4",large:"mt-6 mb-6",extraLarge:"mt-8 mb-8"},Wh={tight:"tracking-tight",normal:"tracking-normal",wide:"tracking-wide",wider:"tracking-wider",widest:"tracking-widest"},Fh={h1:"text-4xl",h2:"text-3xl",h3:"text-2xl",h4:"text-xl",h5:"text-lg",h6:"text-base"},$h={primary:"text-primary",secondary:"text-secondary",tertiary:"text-destructive",quaternary:"text-warning",quinary:"text-muted-foreground",white:"text-white",harford:"text-[#043d5a]"},Hh={normal:"font-normal",bold:"font-bold",semibold:"font-semibold",light:"font-light"},Vh={body:"text-base",paragraph:"text-lg",caption:"text-sm",small:"text-xs",regular:"text-base",paragraphSm:"text-md",captionSm:"text-xs"},qh=({variant:t,color:r="quaternary",marginTop:n,marginBottom:o,letterSpacing:i,textAlign:a="text-left",fontWeight:l="normal",children:s,...c})=>{const u=_h(Vh[t],$h[r],Hh[l],n?Bh[n]:"",o?Bh[o]:"",i?Wh[i]:"",a);return e.createElement("p",{className:u,...c},s)},Uh=({variant:t="h1",color:r="harford",marginTop:n,marginBottom:o,letterSpacing:i,textAlign:a="text-left",fontWeight:l="normal",children:s,...c})=>{const u=_h(Fh[t],$h[r],Hh[l],n?Bh[n]:"",o?Bh[o]:"",i?Wh[i]:"",a);return e.createElement(t,{className:u,...c},s)},Yh=({value:t,fluid:r,label:n,leftIcon:o,rightIcon:i,togglePassword:a,error:l,success:s,hint:c,disabled:u,type:p="text",hintTextProps:d={variant:"small"},className:f="",dataTestId:m,inputSize:v,...y})=>{const[h,g]=e.useState(!1),[b,w]=e.useState(!1),x=e.useMemo(()=>h?e.createElement(Nh,{name:"EyeOff",size:16}):e.createElement(Nh,{name:"Eye",size:16}),[h]),O=n&&(t||b),E=(()=>{if(!n||!O)return 0;const e=n.length;return Math.max(8*e+24,50)})(),k=e.useMemo(()=>{let e="relative flex items-center px-3 py-2 rounded-lg overflow-visible min-h-[2.5rem]";return n&&O||(e+=" border"),u?e+=" bg-muted text-muted-foreground":l?e+=" text-destructive":s&&(e+=" text-success"),r&&(e+=" w-full"),`${e} ${f}`},[u,l,s,O,n,r,f]),j=e.useMemo(()=>{let e="peer w-full outline-none bg-transparent placeholder-transparent text-sm leading-5 transition-colors duration-200";return e+=u?" text-muted-foreground cursor-not-allowed":" text-foreground","password"===p&&(e+=" pr-8"),"number"===p&&(e+=" appearance-none"),e},[u,p]),P=e.useMemo(()=>"password"===p&&h?"text":p,[p,h]),S=e.useMemo(()=>{let e="absolute left-2 px-2 transform transition-all duration-200 ease-in-out z-20 pointer-events-none bg-background";return e+=O?" -top-4 text-sm text-muted-foreground":" top-1/2 -translate-y-1/2 text-base text-muted-foreground",b&&!u?e+=" text-primary":l?e+=" text-destructive":s&&(e+=" text-success"),e},[O,b,u,l,s]),C=u?"border-input":l?"border-destructive":s?"border-success":b||t?"border-primary":"border-input",N=b?"border-t-2 border-l-2 border-r-2 border-b-2":"border-t border-l border-r border-b";return e.createElement("div",{className:k},n&&O&&e.createElement(e.Fragment,null,e.createElement("div",{className:`absolute top-0 left-0 h-0 transition-all duration-200 ${N.split(" ")[0]} ${C}`,style:{width:"12px",borderTopLeftRadius:"8px"}}),e.createElement("div",{className:`absolute top-0 transition-all duration-200 ${N.split(" ")[0]} ${C}`,style:{left:`${12+E}px`,right:"0",height:"0",borderTopRightRadius:"8px"}}),e.createElement("div",{className:`absolute left-0 top-0 bottom-0 w-0 transition-all duration-200 ${N.split(" ")[1]} ${C}`,style:{borderBottomLeftRadius:"8px"}}),e.createElement("div",{className:`absolute right-0 top-0 bottom-0 w-0 transition-all duration-200 ${N.split(" ")[2]} ${C}`,style:{borderBottomRightRadius:"8px"}}),e.createElement("div",{className:`absolute bottom-0 left-0 right-0 h-0 transition-all duration-200 ${N.split(" ")[3]} ${C}`,style:{borderBottomLeftRadius:"8px",borderBottomRightRadius:"8px"}})),o&&e.createElement("div",{className:"flex items-center mr-2 text-muted-foreground"},o),e.createElement("div",{className:"relative w-full"},e.createElement("input",{...y,"data-test-id":m,id:y.id,value:t,disabled:u,type:P,className:j,placeholder:" ",onFocus:e=>{w(!0),y.onFocus?.(e)},onBlur:e=>{w(!1),y.onBlur?.(e)}}),n&&e.createElement("label",{htmlFor:y.id,className:S},n)),"password"===p&&a&&e.createElement("button",{type:"button",className:"absolute right-3 text-muted-foreground hover:text-foreground transition-colors duration-200 disabled:opacity-50 disabled:cursor-not-allowed",onClick:()=>{!u&&t&&g(!h)},disabled:u,tabIndex:-1},x),i&&e.createElement("div",{className:"flex items-center ml-2 text-muted-foreground"},i),(l||s||c)&&e.createElement("div",{className:"absolute top-full left-0 mt-1 text-sm w-full"},e.createElement(qh,{...d},l?.message||s?.message&&!l?.message||!l?.message&&!s?.message&&c?.message)))};function Gh(e,t,{checkForDefaultPrevented:r=!0}={}){return function(n){if(e?.(n),!1===r||!n.defaultPrevented)return t?.(n)}}function Xh(e,t){if("function"==typeof e)return e(t);null!=e&&(e.current=t)}function Zh(...e){return t=>{let r=!1;const n=e.map(e=>{const n=Xh(e,t);return r||"function"!=typeof n||(r=!0),n});if(r)return()=>{for(let t=0;t<n.length;t++){const r=n[t];"function"==typeof r?r():Xh(e[t],null)}}}}function Kh(...e){return i.useCallback(Zh(...e),e)}function Qh(e,r=[]){let n=[];const o=()=>{const t=n.map(e=>i.createContext(e));return function(r){const n=r?.[e]||t;return i.useMemo(()=>({[`__scope${e}`]:{...r,[e]:n}}),[r,n])}};return o.scopeName=e,[function(r,o){const a=i.createContext(o),l=n.length;n=[...n,o];const s=r=>{const{scope:n,children:o,...s}=r,c=n?.[e]?.[l]||a,u=i.useMemo(()=>s,Object.values(s));return t.jsx(c.Provider,{value:u,children:o})};return s.displayName=r+"Provider",[s,function(t,n){const s=n?.[e]?.[l]||a,c=i.useContext(s);if(c)return c;if(void 0!==o)return o;throw new Error(`\`${t}\` must be used within \`${r}\``)}]},Jh(o,...r)]}function Jh(...e){const t=e[0];if(1===e.length)return t;const r=()=>{const r=e.map(e=>({useScope:e(),scopeName:e.scopeName}));return function(e){const n=r.reduce((t,{useScope:r,scopeName:n})=>({...t,...r(e)[`__scope${n}`]}),{});return i.useMemo(()=>({[`__scope${t.scopeName}`]:n}),[n])}};return r.scopeName=t.scopeName,r}function eg(e){const r=rg(e),n=i.forwardRef((e,n)=>{const{children:o,...a}=e,l=i.Children.toArray(o),s=l.find(og);if(s){const e=s.props.children,o=l.map(t=>t===s?i.Children.count(e)>1?i.Children.only(null):i.isValidElement(e)?e.props.children:null:t);return t.jsx(r,{...a,ref:n,children:i.isValidElement(e)?i.cloneElement(e,void 0,o):null})}return t.jsx(r,{...a,ref:n,children:o})});return n.displayName=`${e}.Slot`,n}var tg=eg("Slot");function rg(e){const t=i.forwardRef((e,t)=>{const{children:r,...n}=e;if(i.isValidElement(r)){const e=function(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning;if(r)return e.ref;if(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r)return e.props.ref;return e.props.ref||e.ref}(r),o=function(e,t){const r={...t};for(const n in t){const o=e[n],i=t[n];/^on[A-Z]/.test(n)?o&&i?r[n]=(...e)=>{const t=i(...e);return o(...e),t}:o&&(r[n]=o):"style"===n?r[n]={...o,...i}:"className"===n&&(r[n]=[o,i].filter(Boolean).join(" "))}return{...e,...r}}(n,r.props);return r.type!==i.Fragment&&(o.ref=t?Zh(t,e):e),i.cloneElement(r,o)}return i.Children.count(r)>1?i.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var ng=Symbol("radix.slottable");function og(e){return i.isValidElement(e)&&"function"==typeof e.type&&"__radixId"in e.type&&e.type.__radixId===ng}var ig=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"].reduce((e,r)=>{const n=eg(`Primitive.${r}`),o=i.forwardRef((e,o)=>{const{asChild:i,...a}=e,l=i?n:r;return"undefined"!=typeof window&&(window[Symbol.for("radix-ui")]=!0),t.jsx(l,{...a,ref:o})});return o.displayName=`Primitive.${r}`,{...e,[r]:o}},{});var ag=globalThis?.document?i.useLayoutEffect:()=>{},lg=i[" useId ".trim().toString()]||(()=>{}),sg=0;function cg(e){const[t,r]=i.useState(lg());return ag(()=>{r(e=>e??String(sg++))},[e]),t?`radix-${t}`:""}function ug(e){const t=i.useRef(e);return i.useEffect(()=>{t.current=e}),i.useMemo(()=>(...e)=>t.current?.(...e),[])}var pg=i[" useInsertionEffect ".trim().toString()]||ag;function dg({prop:e,defaultProp:t,onChange:r=()=>{},caller:n}){const[o,a,l]=function({defaultProp:e,onChange:t}){const[r,n]=i.useState(e),o=i.useRef(r),a=i.useRef(t);return pg(()=>{a.current=t},[t]),i.useEffect(()=>{o.current!==r&&(a.current?.(r),o.current=r)},[r,o]),[r,n,a]}({defaultProp:t,onChange:r}),s=void 0!==e,c=s?e:o;{const t=i.useRef(void 0!==e);i.useEffect(()=>{const e=t.current;if(e!==s){const t=e?"controlled":"uncontrolled",r=s?"controlled":"uncontrolled";console.warn(`${n} is changing from ${t} to ${r}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`)}t.current=s},[s,n])}const u=i.useCallback(t=>{if(s){const r=function(e){return"function"==typeof e}(t)?t(e):t;r!==e&&l.current?.(r)}else a(t)},[s,e,a,l]);return[c,u]}var fg=i.createContext(void 0);function mg(e){const t=i.useContext(fg);return e||t||"ltr"}var vg="rovingFocusGroup.onEntryFocus",yg={bubbles:!1,cancelable:!0},hg="RovingFocusGroup",[gg,bg,wg]=function(r){const n=r+"CollectionProvider",[o,i]=Qh(n),[a,l]=o(n,{collectionRef:{current:null},itemMap:new Map}),s=r=>{const{scope:n,children:o}=r,i=e.useRef(null),l=e.useRef(new Map).current;return t.jsx(a,{scope:n,itemMap:l,collectionRef:i,children:o})};s.displayName=n;const c=r+"CollectionSlot",u=eg(c),p=e.forwardRef((e,r)=>{const{scope:n,children:o}=e,i=Kh(r,l(c,n).collectionRef);return t.jsx(u,{ref:i,children:o})});p.displayName=c;const d=r+"CollectionItemSlot",f="data-radix-collection-item",m=eg(d),v=e.forwardRef((r,n)=>{const{scope:o,children:i,...a}=r,s=e.useRef(null),c=Kh(n,s),u=l(d,o);return e.useEffect(()=>(u.itemMap.set(s,{ref:s,...a}),()=>{u.itemMap.delete(s)})),t.jsx(m,{[f]:"",ref:c,children:i})});return v.displayName=d,[{Provider:s,Slot:p,ItemSlot:v},function(t){const n=l(r+"CollectionConsumer",t);return e.useCallback(()=>{const e=n.collectionRef.current;if(!e)return[];const t=Array.from(e.querySelectorAll(`[${f}]`));return Array.from(n.itemMap.values()).sort((e,r)=>t.indexOf(e.ref.current)-t.indexOf(r.ref.current))},[n.collectionRef,n.itemMap])},i]}(hg),[xg,Og]=Qh(hg,[wg]),[Eg,kg]=xg(hg),jg=i.forwardRef((e,r)=>t.jsx(gg.Provider,{scope:e.__scopeRovingFocusGroup,children:t.jsx(gg.Slot,{scope:e.__scopeRovingFocusGroup,children:t.jsx(Pg,{...e,ref:r})})}));jg.displayName=hg;var Pg=i.forwardRef((e,r)=>{const{__scopeRovingFocusGroup:n,orientation:o,loop:a=!1,dir:l,currentTabStopId:s,defaultCurrentTabStopId:c,onCurrentTabStopIdChange:u,onEntryFocus:p,preventScrollOnEntryFocus:d=!1,...f}=e,m=i.useRef(null),v=Kh(r,m),y=mg(l),[h,g]=dg({prop:s,defaultProp:c??null,onChange:u,caller:hg}),[b,w]=i.useState(!1),x=ug(p),O=bg(n),E=i.useRef(!1),[k,j]=i.useState(0);return i.useEffect(()=>{const e=m.current;if(e)return e.addEventListener(vg,x),()=>e.removeEventListener(vg,x)},[x]),t.jsx(Eg,{scope:n,orientation:o,dir:y,loop:a,currentTabStopId:h,onItemFocus:i.useCallback(e=>g(e),[g]),onItemShiftTab:i.useCallback(()=>w(!0),[]),onFocusableItemAdd:i.useCallback(()=>j(e=>e+1),[]),onFocusableItemRemove:i.useCallback(()=>j(e=>e-1),[]),children:t.jsx(ig.div,{tabIndex:b||0===k?-1:0,"data-orientation":o,...f,ref:v,style:{outline:"none",...e.style},onMouseDown:Gh(e.onMouseDown,()=>{E.current=!0}),onFocus:Gh(e.onFocus,e=>{const t=!E.current;if(e.target===e.currentTarget&&t&&!b){const t=new CustomEvent(vg,yg);if(e.currentTarget.dispatchEvent(t),!t.defaultPrevented){const e=O().filter(e=>e.focusable);zg([e.find(e=>e.active),e.find(e=>e.id===h),...e].filter(Boolean).map(e=>e.ref.current),d)}}E.current=!1}),onBlur:Gh(e.onBlur,()=>w(!1))})})}),Sg="RovingFocusGroupItem",Cg=i.forwardRef((e,r)=>{const{__scopeRovingFocusGroup:n,focusable:o=!0,active:a=!1,tabStopId:l,children:s,...c}=e,u=cg(),p=l||u,d=kg(Sg,n),f=d.currentTabStopId===p,m=bg(n),{onFocusableItemAdd:v,onFocusableItemRemove:y,currentTabStopId:h}=d;return i.useEffect(()=>{if(o)return v(),()=>y()},[o,v,y]),t.jsx(gg.ItemSlot,{scope:n,id:p,focusable:o,active:a,children:t.jsx(ig.span,{tabIndex:f?0:-1,"data-orientation":d.orientation,...c,ref:r,onMouseDown:Gh(e.onMouseDown,e=>{o?d.onItemFocus(p):e.preventDefault()}),onFocus:Gh(e.onFocus,()=>d.onItemFocus(p)),onKeyDown:Gh(e.onKeyDown,e=>{if("Tab"===e.key&&e.shiftKey)return void d.onItemShiftTab();if(e.target!==e.currentTarget)return;const t=function(e,t,r){const n=function(e,t){return"rtl"!==t?e:"ArrowLeft"===e?"ArrowRight":"ArrowRight"===e?"ArrowLeft":e}(e.key,r);return"vertical"===t&&["ArrowLeft","ArrowRight"].includes(n)||"horizontal"===t&&["ArrowUp","ArrowDown"].includes(n)?void 0:Ng[n]}(e,d.orientation,d.dir);if(void 0!==t){if(e.metaKey||e.ctrlKey||e.altKey||e.shiftKey)return;e.preventDefault();let o=m().filter(e=>e.focusable).map(e=>e.ref.current);if("last"===t)o.reverse();else if("prev"===t||"next"===t){"prev"===t&&o.reverse();const i=o.indexOf(e.currentTarget);o=d.loop?(n=i+1,(r=o).map((e,t)=>r[(n+t)%r.length])):o.slice(i+1)}setTimeout(()=>zg(o))}var r,n}),children:"function"==typeof s?s({isCurrentTabStop:f,hasTabStop:null!=h}):s})})});Cg.displayName=Sg;var Ng={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function zg(e,t=!1){const r=document.activeElement;for(const n of e){if(n===r)return;if(n.focus({preventScroll:t}),document.activeElement!==r)return}}var Tg=jg,Lg=Cg;function Mg(e){const[t,r]=i.useState(void 0);return ag(()=>{if(e){r({width:e.offsetWidth,height:e.offsetHeight});const t=new ResizeObserver(t=>{if(!Array.isArray(t))return;if(!t.length)return;const n=t[0];let o,i;if("borderBoxSize"in n){const e=n.borderBoxSize,t=Array.isArray(e)?e[0]:e;o=t.inlineSize,i=t.blockSize}else o=e.offsetWidth,i=e.offsetHeight;r({width:o,height:i})});return t.observe(e,{box:"border-box"}),()=>t.unobserve(e)}r(void 0)},[e]),t}function Rg(e){const t=i.useRef({value:e,previous:e});return i.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var Dg=e=>{const{present:t,children:r}=e,n=function(e){const[t,r]=i.useState(),n=i.useRef(null),o=i.useRef(e),a=i.useRef("none"),l=e?"mounted":"unmounted",[s,c]=function(e,t){return i.useReducer((e,r)=>t[e][r]??e,e)}(l,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return i.useEffect(()=>{const e=Ag(n.current);a.current="mounted"===s?e:"none"},[s]),ag(()=>{const t=n.current,r=o.current;if(r!==e){const n=a.current,i=Ag(t);if(e)c("MOUNT");else if("none"===i||"none"===t?.display)c("UNMOUNT");else{c(r&&n!==i?"ANIMATION_OUT":"UNMOUNT")}o.current=e}},[e,c]),ag(()=>{if(t){let e;const r=t.ownerDocument.defaultView??window,i=i=>{const a=Ag(n.current).includes(i.animationName);if(i.target===t&&a&&(c("ANIMATION_END"),!o.current)){const n=t.style.animationFillMode;t.style.animationFillMode="forwards",e=r.setTimeout(()=>{"forwards"===t.style.animationFillMode&&(t.style.animationFillMode=n)})}},l=e=>{e.target===t&&(a.current=Ag(n.current))};return t.addEventListener("animationstart",l),t.addEventListener("animationcancel",i),t.addEventListener("animationend",i),()=>{r.clearTimeout(e),t.removeEventListener("animationstart",l),t.removeEventListener("animationcancel",i),t.removeEventListener("animationend",i)}}c("ANIMATION_END")},[t,c]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:i.useCallback(e=>{n.current=e?getComputedStyle(e):null,r(e)},[])}}(t),o="function"==typeof r?r({present:n.isPresent}):i.Children.only(r),a=Kh(n.ref,function(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning;if(r)return e.ref;if(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r)return e.props.ref;return e.props.ref||e.ref}(o));return"function"==typeof r||n.isPresent?i.cloneElement(o,{ref:a}):null};function Ag(e){return e?.animationName||"none"}Dg.displayName="Presence";var Ig="Radio",[_g,Bg]=Qh(Ig),[Wg,Fg]=_g(Ig),$g=i.forwardRef((e,r)=>{const{__scopeRadio:n,name:o,checked:a=!1,required:l,disabled:s,value:c="on",onCheck:u,form:p,...d}=e,[f,m]=i.useState(null),v=Kh(r,e=>m(e)),y=i.useRef(!1),h=!f||(p||!!f.closest("form"));return t.jsxs(Wg,{scope:n,checked:a,disabled:s,children:[t.jsx(ig.button,{type:"button",role:"radio","aria-checked":a,"data-state":Ug(a),"data-disabled":s?"":void 0,disabled:s,value:c,...d,ref:v,onClick:Gh(e.onClick,e=>{a||u?.(),h&&(y.current=e.isPropagationStopped(),y.current||e.stopPropagation())})}),h&&t.jsx(qg,{control:f,bubbles:!y.current,name:o,value:c,checked:a,required:l,disabled:s,form:p,style:{transform:"translateX(-100%)"}})]})});$g.displayName=Ig;var Hg="RadioIndicator",Vg=i.forwardRef((e,r)=>{const{__scopeRadio:n,forceMount:o,...i}=e,a=Fg(Hg,n);return t.jsx(Dg,{present:o||a.checked,children:t.jsx(ig.span,{"data-state":Ug(a.checked),"data-disabled":a.disabled?"":void 0,...i,ref:r})})});Vg.displayName=Hg;var qg=i.forwardRef(({__scopeRadio:e,control:r,checked:n,bubbles:o=!0,...a},l)=>{const s=i.useRef(null),c=Kh(s,l),u=Rg(n),p=Mg(r);return i.useEffect(()=>{const e=s.current;if(!e)return;const t=window.HTMLInputElement.prototype,r=Object.getOwnPropertyDescriptor(t,"checked").set;if(u!==n&&r){const t=new Event("click",{bubbles:o});r.call(e,n),e.dispatchEvent(t)}},[u,n,o]),t.jsx(ig.input,{type:"radio","aria-hidden":!0,defaultChecked:n,...a,tabIndex:-1,ref:c,style:{...a.style,...p,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});function Ug(e){return e?"checked":"unchecked"}qg.displayName="RadioBubbleInput";var Yg=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],Gg="RadioGroup",[Xg,Zg]=Qh(Gg,[Og,Bg]),Kg=Og(),Qg=Bg(),[Jg,eb]=Xg(Gg),tb=i.forwardRef((e,r)=>{const{__scopeRadioGroup:n,name:o,defaultValue:i,value:a,required:l=!1,disabled:s=!1,orientation:c,dir:u,loop:p=!0,onValueChange:d,...f}=e,m=Kg(n),v=mg(u),[y,h]=dg({prop:a,defaultProp:i??null,onChange:d,caller:Gg});return t.jsx(Jg,{scope:n,name:o,required:l,disabled:s,value:y,onValueChange:h,children:t.jsx(Tg,{asChild:!0,...m,orientation:c,dir:v,loop:p,children:t.jsx(ig.div,{role:"radiogroup","aria-required":l,"aria-orientation":c,"data-disabled":s?"":void 0,dir:v,...f,ref:r})})})});tb.displayName=Gg;var rb="RadioGroupItem",nb=i.forwardRef((e,r)=>{const{__scopeRadioGroup:n,disabled:o,...a}=e,l=eb(rb,n),s=l.disabled||o,c=Kg(n),u=Qg(n),p=i.useRef(null),d=Kh(r,p),f=l.value===a.value,m=i.useRef(!1);return i.useEffect(()=>{const e=e=>{Yg.includes(e.key)&&(m.current=!0)},t=()=>m.current=!1;return document.addEventListener("keydown",e),document.addEventListener("keyup",t),()=>{document.removeEventListener("keydown",e),document.removeEventListener("keyup",t)}},[]),t.jsx(Lg,{asChild:!0,...c,focusable:!s,active:f,children:t.jsx($g,{disabled:s,required:l.required,checked:f,...u,...a,name:l.name,ref:d,onCheck:()=>l.onValueChange(a.value),onKeyDown:Gh(e=>{"Enter"===e.key&&e.preventDefault()}),onFocus:Gh(a.onFocus,()=>{m.current&&p.current?.click()})})})});nb.displayName=rb;var ob=i.forwardRef((e,r)=>{const{__scopeRadioGroup:n,...o}=e,i=Qg(n);return t.jsx(Vg,{...i,...o,ref:r})});ob.displayName="RadioGroupIndicator";var ib=tb,ab=nb,lb=ob;const sb=e.forwardRef(({className:t,classNames:r,showIcons:n=!0,withCard:o=!0,options:i,...a},l)=>e.createElement(ib,{ref:l,className:ve("grid gap-2",t,r?.root),...a},i.map(t=>e.createElement("div",{key:t.id,className:ve("relative")},e.createElement("label",{htmlFor:t.id,className:ve("relative flex w-full items-center gap-x-3",o&&["cursor-pointer rounded-lg border-2 p-4","border-input bg-background hover:bg-accent hover:text-accent-foreground","data-[state=checked]:border-primary data-[state=checked]:bg-primary/5"],!o&&"cursor-pointer py-2",r?.label)},e.createElement(ab,{value:t.id,id:t.id,className:ve("aspect-square h-4 w-4 rounded-full border border-primary text-primary ring-offset-background","focus:outline-hidden focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2","disabled:cursor-not-allowed disabled:opacity-50",r?.item)},e.createElement(lb,{className:ve("flex items-center justify-center",r?.indicator)},e.createElement(Ne,{className:"h-2.5 w-2.5 fill-current text-current"}))),e.createElement("div",{className:"flex flex-1 items-center justify-between"},e.createElement("div",{className:ve("space-y-1",!t.description&&"space-y-0")},e.createElement("p",{className:ve("text-sm font-medium leading-none","peer-disabled:cursor-not-allowed peer-disabled:opacity-70",r?.text)},t.label),t.description&&e.createElement("p",{className:ve("text-sm text-muted-foreground",r?.description)},t.description)),n&&t.icon&&e.createElement("div",{className:ve("ml-4 shrink-0 text-muted-foreground",r?.icon)},t.icon)))))));sb.displayName="RadioGroup";var cb="Switch",[ub,pb]=Qh(cb),[db,fb]=ub(cb),mb=i.forwardRef((e,r)=>{const{__scopeSwitch:n,name:o,checked:a,defaultChecked:l,required:s,disabled:c,value:u="on",onCheckedChange:p,form:d,...f}=e,[m,v]=i.useState(null),y=Kh(r,e=>v(e)),h=i.useRef(!1),g=!m||(d||!!m.closest("form")),[b,w]=dg({prop:a,defaultProp:l??!1,onChange:p,caller:cb});return t.jsxs(db,{scope:n,checked:b,disabled:c,children:[t.jsx(ig.button,{type:"button",role:"switch","aria-checked":b,"aria-required":s,"data-state":gb(b),"data-disabled":c?"":void 0,disabled:c,value:u,...f,ref:y,onClick:Gh(e.onClick,e=>{w(e=>!e),g&&(h.current=e.isPropagationStopped(),h.current||e.stopPropagation())})}),g&&t.jsx(hb,{control:m,bubbles:!h.current,name:o,value:u,checked:b,required:s,disabled:c,form:d,style:{transform:"translateX(-100%)"}})]})});mb.displayName=cb;var vb="SwitchThumb",yb=i.forwardRef((e,r)=>{const{__scopeSwitch:n,...o}=e,i=fb(vb,n);return t.jsx(ig.span,{"data-state":gb(i.checked),"data-disabled":i.disabled?"":void 0,...o,ref:r})});yb.displayName=vb;var hb=i.forwardRef(({__scopeSwitch:e,control:r,checked:n,bubbles:o=!0,...a},l)=>{const s=i.useRef(null),c=Kh(s,l),u=Rg(n),p=Mg(r);return i.useEffect(()=>{const e=s.current;if(!e)return;const t=window.HTMLInputElement.prototype,r=Object.getOwnPropertyDescriptor(t,"checked").set;if(u!==n&&r){const t=new Event("click",{bubbles:o});r.call(e,n),e.dispatchEvent(t)}},[u,n,o]),t.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:n,...a,tabIndex:-1,ref:c,style:{...a.style,...p,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});function gb(e){return e?"checked":"unchecked"}hb.displayName="SwitchBubbleInput";var bb=mb,wb=yb;const xb="medium",Ob="primary",Eb={small:{switch:"w-8 h-4",thumb:"w-3 h-3",translate:"translate-x-4"},medium:{switch:"w-11 h-6",thumb:"w-5 h-5",translate:"translate-x-5"},large:{switch:"w-14 h-7",thumb:"w-6 h-6",translate:"translate-x-7"}},kb={primary:{background:"bg-primary",foreground:"text-primary-foreground",hover:"hover:bg-primary/90"},success:{background:"bg-[rgb(var(--success))]",foreground:"text-[rgb(var(--success-foreground))]",hover:"hover:bg-[rgb(var(--success))]/90"},danger:{background:"bg-destructive",foreground:"text-destructive-foreground",hover:"hover:bg-destructive/90"},warning:{background:"bg-[rgb(var(--warning))]",foreground:"text-foreground",hover:"hover:bg-[rgb(var(--warning))]/90"}},jb=({label:e,description:t,dataTestId:r})=>e||t?i.createElement("div",{className:"flex flex-col gap-1.5","data-test-id":r},e&&i.createElement(qh,{variant:"regular",color:"secondary"},e),t&&i.createElement(qh,{variant:"small",color:"secondary"},t)):null,Pb=i.forwardRef(({label:e,description:t,size:r=xb,variant:n=Ob,disabled:o=!1,loading:a=!1,className:l,onChange:s,dataTestId:c,checked:u,id:p,...d},f)=>{const m=r||xb,v=n||Ob;return i.createElement("div",{className:"flex items-center"},i.createElement("label",{htmlFor:p,className:ve("relative inline-flex items-start gap-3 select-none",o&&"cursor-not-allowed opacity-60",l)},i.createElement("div",{className:"relative"},i.createElement(bb,{id:p,checked:u,onCheckedChange:e=>{o||a||s?.(e)},disabled:o||a,"data-test-id":`${c}-root`,ref:f,...d,className:ve("peer relative inline-flex shrink-0 cursor-pointer rounded-full transition-colors","border-2 border-transparent","focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",Eb[m].switch,u?ve(kb[v].background,kb[v].foreground):"bg-input",o&&"cursor-not-allowed")},i.createElement(wb,{className:ve("pointer-events-none block rounded-full bg-background shadow-lg ring-0 transition-transform","flex items-center justify-center",Eb[m].thumb,u?Eb[m].translate:"translate-x-0.5"),"data-test-id":`${c}-thumb`},a&&i.createElement(Re,{className:"animate-spin text-black",size:{small:12,medium:16,large:20}[m]})))),i.createElement(jb,{label:e,description:t,dataTestId:c,disabled:o})))});Pb.displayName="Switch";const Sb=e.forwardRef(({className:t="",error:r=!1,disabled:n=!1,placeholder:o,value:i,defaultValue:a,onChange:l,onFocus:s,onBlur:c,rows:u=3,maxLength:p,required:d=!1,readOnly:f=!1,autoFocus:m=!1,resize:v=!1,label:y,helperText:h,showCharCount:g=!1,floatingLabel:b=!1,fluid:w=!0,width:x,...O},E)=>{const[k,j]=e.useState(!1),[P,S]=e.useState(i||a||""),C=e.useCallback(e=>{j(!0),s?.(e)},[s]),N=e.useCallback(e=>{j(!1),c?.(e)},[c]),z=e.useCallback(e=>{S(e.target.value),l?.(e)},[l]),T=Boolean(P||i),L=k||T,M=(e=>`\n w-full transition-all duration-300 ease-out\n font-medium text-foreground placeholder:text-muted-foreground\n outline-none border-0 bg-transparent\n ${e?"resize":"resize-none"}\n p-4 text-base leading-6\n `.trim().replace(/\s+/g," "))(v),R=(({disabled:e,floatingLabel:t,isLabelFloated:r,focused:n,error:o})=>`\n relative overflow-visible rounded-lg\n bg-background shadow-sm transition-all duration-300\n hover:shadow-md\n ${e?"opacity-50 cursor-not-allowed bg-muted":""}\n ${t&&r?"":"border border-border hover:border-border/80"}\n ${!n||t&&r?"":"ring-2 ring-ring border-ring shadow-lg"}\n ${!o||t&&r?"":"ring-2 ring-destructive border-destructive"}\n `.trim().replace(/\s+/g," "))({disabled:n,floatingLabel:b,isLabelFloated:L,focused:k,error:r}),D=(({fluid:e,width:t,className:r})=>`\n ${e?"w-full":t?"":"w-auto"}\n ${r||""}\n `.trim())({fluid:w,width:x,className:t}),A=(e=>e?{width:e}:{})(x),I=((e,t)=>{const r=e||t||"";return"string"==typeof r?r.length:0})(i,P),_=(({isLabelFloated:e,focused:t,error:r})=>`\n absolute left-3 transition-all duration-200 pointer-events-none\n font-medium z-20\n ${e?"-top-2.5 text-xs px-2":"top-4 text-base px-0"}\n ${t?"text-ring":r?"text-destructive":e?"text-primary":"text-muted-foreground"}\n `.trim().replace(/\s+/g," "))({isLabelFloated:L,focused:k,error:r}),B=((e,t)=>`\n transition-all duration-200\n ${e?"border-ring":t?"border-destructive":"border-border"}\n `)(k,r),W=((e,t)=>{if(!e)return 0;const r=e.length+(t?1:0);return Math.max(7*r+16,40)})(y,d);return e.createElement("div",{className:D,style:A},y&&!b&&e.createElement(qh,{variant:"caption",color:"primary",fontWeight:"semibold",marginBottom:"small"},y,d&&e.createElement("span",{className:"text-destructive ml-1"},"*")),e.createElement("div",{className:R},b&&y&&L&&e.createElement(e.Fragment,null,e.createElement("div",{className:`absolute top-0 left-0 h-0 ${B} border-t-2`,style:{width:"12px",borderTopLeftRadius:"8px"}}),e.createElement("div",{className:`absolute top-0 ${B} border-t-2`,style:{left:`${12+W}px`,right:"0",height:"0",borderTopRightRadius:"8px"}}),e.createElement("div",{className:`absolute left-0 top-0 bottom-0 w-0 ${B} border-l-2`,style:{borderBottomLeftRadius:"8px"}}),e.createElement("div",{className:`absolute right-0 top-0 bottom-0 w-0 ${B} border-r-2`,style:{borderBottomRightRadius:"8px"}}),e.createElement("div",{className:`absolute bottom-0 left-0 right-0 h-0 ${B} border-b-2`,style:{borderBottomLeftRadius:"8px",borderBottomRightRadius:"8px"}}),k&&e.createElement("div",{className:"absolute inset-0 rounded-lg shadow-lg pointer-events-none"})),b&&y&&e.createElement("label",{className:_},y,d&&e.createElement("span",{className:"text-destructive ml-1"},"*")),e.createElement("textarea",{ref:E,className:`\n ${M}\n ${b&&y?"pt-6":""}\n `.trim().replace(/\s+/g," "),placeholder:b?"":o,value:i,defaultValue:a,onChange:z,onFocus:C,onBlur:N,disabled:n,readOnly:f,required:d,autoFocus:m,rows:u,maxLength:p,...O})),(h||g)&&e.createElement("div",{className:"flex justify-between items-center mt-2"},h&&e.createElement(qh,{variant:"captionSm",color:r?"tertiary":"quinary"},h),g&&p&&e.createElement(qh,{variant:"captionSm",color:I>.9*p?"tertiary":"quinary",className:"font-mono"},I,"/",p)))});var Cb,Nb;Sb.displayName="TextArea",exports.MessageVariants=void 0,(Cb=exports.MessageVariants||(exports.MessageVariants={})).Success="success",Cb.Error="error",Cb.Warning="warning",Cb.Info="info",exports.MessagePosition=void 0,(Nb=exports.MessagePosition||(exports.MessagePosition={})).TopCenter="top-center",Nb.TopLeft="top-left",Nb.TopRight="top-right",Nb.BottomCenter="bottom-center",Nb.BottomLeft="bottom-left",Nb.BottomRight="bottom-right";const zb=({id:t,destroy:r,title:n,description:o,variant:i=exports.MessageVariants.Info,position:a=exports.MessagePosition.TopCenter,duration:l=5e3,animationDuration:s=400,icon:c,dataTestId:u})=>{const[p,d]=e.useState(!1),[,f]=e.useState(!1),m=e.useRef(null),v=e.useRef(null),y=e.useRef(0),h=e.useRef(l),g=e.useCallback(()=>f(!0),[]),b=e.useCallback(()=>f(!1),[]),w=e.useCallback(()=>{v.current&&clearTimeout(v.current),d(!0),setTimeout(()=>{r()},s)},[r,s]);e.useEffect(()=>(y.current=Date.now(),h.current=l,m.current&&(m.current.style.width="100%",m.current.style.transition="none",m.current.offsetWidth,m.current.style.transition=`width ${l}ms linear`,m.current.style.width="0%"),v.current=window.setTimeout(()=>{w()},l),()=>{v.current&&clearTimeout(v.current)}),[l,w]);const x={[exports.MessageVariants.Success]:{icon:"text-emerald-500 dark:text-emerald-400",progress:"bg-emerald-500 dark:bg-emerald-400"},[exports.MessageVariants.Error]:{icon:"text-destructive",progress:"bg-destructive"},[exports.MessageVariants.Warning]:{icon:"text-amber-500 dark:text-amber-400",progress:"bg-amber-500 dark:bg-amber-400"},[exports.MessageVariants.Info]:{icon:"text-primary",progress:"bg-primary"}}[i],O={[exports.MessagePosition.TopCenter]:p?"animate-slide-out-up":"animate-slide-in-down",[exports.MessagePosition.TopLeft]:p?"animate-slide-out-left":"animate-slide-in-left",[exports.MessagePosition.TopRight]:p?"animate-slide-out-right":"animate-slide-in-right",[exports.MessagePosition.BottomCenter]:p?"animate-slide-out-down":"animate-slide-in-up",[exports.MessagePosition.BottomLeft]:p?"animate-slide-out-left":"animate-slide-in-left",[exports.MessagePosition.BottomRight]:p?"animate-slide-out-right":"animate-slide-in-right"};return e.createElement("div",{id:t??`${i}-${"string"==typeof n?n:""}`,className:`\n relative group flex items-center justify-between pointer-events-auto\n rounded-lg max-w-md w-full overflow-hidden\n bg-background\n border border-border\n ${O[a]||O[exports.MessagePosition.TopCenter]}\n ${p?"opacity-0":"opacity-100"}\n transition-all duration-300 ease-out\n shadow-sm hover:shadow-md\n `,"data-test-id":u,onMouseEnter:g,onMouseLeave:b,style:{transition:`all ${s}ms cubic-bezier(0.4, 0, 0.2, 1)`}},e.createElement("div",{className:"flex items-center gap-3 px-4 py-3 w-full"},c&&e.createElement("div",{className:`flex-shrink-0 ${x.icon}`},c),e.createElement("div",{className:"flex flex-col min-w-0 flex-grow"},e.createElement("div",{className:"font-medium text-sm m-0 text-foreground"},n),o&&e.createElement("div",{className:"text-xs m-0 mt-0.5 text-muted-foreground truncate"},o)),e.createElement("button",{onClick:w,className:"\n flex-shrink-0 ml-2 p-1 rounded-md\n transition-all duration-200\n hover:bg-accent\n text-muted-foreground hover:text-accent-foreground\n ","aria-label":"Close notification"},e.createElement(Ae,{size:14}))),!p&&e.createElement("div",{className:`absolute bottom-0 left-0 h-[2px] ${x.progress} opacity-80`,ref:m,style:{width:"100%",transformOrigin:"left"}}))};const Tb=new class{isSetup=!1;isBrowser="undefined"!=typeof window;containers={[exports.MessagePosition.TopCenter]:void 0,[exports.MessagePosition.TopLeft]:void 0,[exports.MessagePosition.TopRight]:void 0,[exports.MessagePosition.BottomCenter]:void 0,[exports.MessagePosition.BottomLeft]:void 0,[exports.MessagePosition.BottomRight]:void 0};roots={[exports.MessagePosition.TopCenter]:null,[exports.MessagePosition.TopLeft]:null,[exports.MessagePosition.TopRight]:null,[exports.MessagePosition.BottomCenter]:null,[exports.MessagePosition.BottomLeft]:null,[exports.MessagePosition.BottomRight]:null};messages={[exports.MessagePosition.TopCenter]:[],[exports.MessagePosition.TopLeft]:[],[exports.MessagePosition.TopRight]:[],[exports.MessagePosition.BottomCenter]:[],[exports.MessagePosition.BottomLeft]:[],[exports.MessagePosition.BottomRight]:[]};constructor(){this.isBrowser&&this.setup()}setup(){if(!this.isBrowser)return;const e=document.getElementsByTagName("body")[0];Object.values(exports.MessagePosition).forEach(t=>{const r=`message-container-${t}`;let o=document.getElementById(r);o||(o=document.createElement("div"),o.id=r,e.appendChild(o)),this.containers[t]=o,this.roots[t]=n.createRoot(o)}),this.isSetup=!0}show(e){if(!this.isBrowser)return;this.isSetup||this.setup();const t=e.position||exports.MessagePosition.TopCenter,r=e.id||`message-${Math.random().toString().slice(2,11)}`,n=50*this.messages[t].length,o={id:r,...e,animationDuration:e.animationDuration||300,destroy:()=>this.destroy(r,t)};setTimeout(()=>{this.messages[t]=[o,...this.messages[t]],this.render(t)},n)}destroy(e,t=exports.MessagePosition.TopCenter){this.isBrowser&&(this.messages[t]=this.messages[t].filter(t=>t.id!==e),this.render(t))}success(t){this.show({icon:e.createElement(jh,{size:18}),...t,variant:exports.MessageVariants.Success})}error(t){this.show({icon:e.createElement(wh,{size:18}),...t,variant:exports.MessageVariants.Error})}warning(t){this.show({icon:e.createElement(bh,{size:18}),...t,variant:exports.MessageVariants.Warning})}info(t){this.show({icon:e.createElement(gh,{size:18}),...t,variant:exports.MessageVariants.Info})}getPositionStyles(e){switch(e){case exports.MessagePosition.TopLeft:return"fixed flex flex-col items-start justify-start gap-2 p-4 top-0 left-0 z-9999 pointer-events-none";case exports.MessagePosition.TopRight:return"fixed flex flex-col items-end justify-start gap-2 p-4 top-0 right-0 z-9999 pointer-events-none";case exports.MessagePosition.BottomCenter:return"fixed flex flex-col items-center justify-end gap-2 p-4 bottom-0 left-0 right-0 z-9999 pointer-events-none";case exports.MessagePosition.BottomLeft:return"fixed flex flex-col items-start justify-end gap-2 p-4 bottom-0 left-0 z-9999 pointer-events-none";case exports.MessagePosition.BottomRight:return"fixed flex flex-col items-end justify-end gap-2 p-4 bottom-0 right-0 z-9999 pointer-events-none";case exports.MessagePosition.TopCenter:default:return"fixed flex flex-col items-center justify-start gap-2 p-4 top-0 left-0 right-0 z-9999 pointer-events-none"}}render(t=exports.MessagePosition.TopCenter){if(!this.isBrowser||!this.roots[t])return;const r=this.messages[t].map(t=>e.createElement(zb,{key:t.id,...t}));this.roots[t].render(e.createElement("div",{className:this.getPositionStyles(t)},r))}},Lb="...",Mb=({className:e,...t})=>i.createElement("nav",{role:"navigation","aria-label":"pagination",className:ve("mx-auto flex w-full justify-center",e),...t}),Rb=i.forwardRef(({className:e,...t},r)=>i.createElement("ul",{ref:r,className:ve("flex flex-row items-center gap-1",e),...t}));Rb.displayName="PaginationContent";const Db=i.forwardRef(({className:e,...t},r)=>i.createElement("li",{ref:r,className:ve("",e),...t}));Db.displayName="PaginationItem";const Ab=i.forwardRef(({className:e,isActive:t,size:r="medium",...n},o)=>i.createElement(_e,{ref:o,"aria-current":t?"page":void 0,variant:t?"primary":"link",size:r,className:ve("h-9 w-9",e),...n}));Ab.displayName="PaginationLink";const Ib=i.forwardRef(({className:e,...t},r)=>i.createElement(_e,{ref:r,variant:"link",size:"medium",className:ve("h-9 w-9",e),...t},i.createElement(Pe,{className:"h-4 w-4"}),i.createElement("span",{className:"sr-only"},"Previous page")));Ib.displayName="PaginationPrevious";const _b=i.forwardRef(({className:e,...t},r)=>i.createElement(_e,{ref:r,variant:"link",size:"medium",className:ve("h-9 w-9",e),...t},i.createElement("span",{className:"sr-only"},"Next page"),i.createElement(Se,{className:"h-4 w-4"})));_b.displayName="PaginationNext";const Bb=({className:e,...t})=>i.createElement("span",{"aria-hidden":!0,className:ve("flex h-9 w-9 items-center justify-center",e),...t},i.createElement(ze,{className:"h-4 w-4"}),i.createElement("span",{className:"sr-only"},"More pages"));Bb.displayName="PaginationEllipsis";const Wb=(e,t)=>{const r=t-e+1;return Array.from({length:r},(t,r)=>r+e)},Fb=({currentPage:t,totalPages:r,onPageChange:n,siblingCount:o=1,className:i,disabled:a=!1,isLoading:l=!1,enableKeyboardNav:s=!1,showEllipsis:c=!0})=>{const u=e.useMemo(()=>((e,t,r,n)=>{if(r+5>=t)return Wb(1,t);const o=Math.max(e-r,1),i=Math.min(e+r,t),a=o>2,l=i<t-2;if(!a&&l){const e=Wb(1,3+2*r);return n?[...e,Lb,t]:[...e,t]}if(a&&!l){const e=Wb(t-(3+2*r)+1,t);return n?[1,Lb,...e]:[1,...e]}if(a&&l){const e=Wb(o,i);return n?[1,Lb,...e,Lb,t]:[1,...e,t]}return Wb(1,t)})(t,r,o,c),[t,r,o,c]),p=e.useCallback(()=>{!a&&!l&&t>1&&n(t-1)},[t,n,a,l]),d=e.useCallback(()=>{!a&&!l&&t<r&&n(t+1)},[t,r,n,a,l]),f=e.useCallback(e=>{a||l||!s||("ArrowLeft"===e.key?(e.preventDefault(),p()):"ArrowRight"===e.key&&(e.preventDefault(),d()))},[p,d,a,l,s]);return e.useEffect(()=>{if(s)return window.addEventListener("keydown",f),()=>window.removeEventListener("keydown",f)},[f,s]),0===t||u.length<2?null:e.createElement(Mb,{className:ve("select-none",i)},e.createElement(Rb,null,e.createElement(Db,null,e.createElement(Ib,{onClick:p,disabled:1===t||a||l,className:ve("transition-all duration-200","hover:scale-105 hover:bg-accent",(a||l)&&"pointer-events-none opacity-50"),"aria-label":"Previous page"})),u.map((r,o)=>{if(r===Lb)return e.createElement(Db,{key:`dots-${o}`},e.createElement(Bb,null));const i=r,s=i===t;return e.createElement(Db,{key:i},e.createElement(Ab,{isActive:s,onClick:()=>!a&&!l&&n(i),className:ve("transition-all duration-200",s&&"hover:bg-primary/90",!s&&"hover:bg-accent hover:scale-105",(a||l)&&"pointer-events-none opacity-50"),"aria-label":`Page ${i}`,"aria-current":s?"page":void 0},i))}),e.createElement(Db,null,e.createElement(_b,{onClick:d,disabled:t===r||a||l,className:ve("transition-all duration-200","hover:scale-105 hover:bg-accent",(a||l)&&"pointer-events-none opacity-50"),"aria-label":"Next page"}))))};var $b,Hb,Vb;exports.TableColumnAlign=void 0,($b=exports.TableColumnAlign||(exports.TableColumnAlign={})).Left="left",$b.Center="center",$b.Right="right",exports.PaginationPosition=void 0,(Hb=exports.PaginationPosition||(exports.PaginationPosition={})).Left="left",Hb.Right="right",Hb.Center="center",exports.CellType=void 0,(Vb=exports.CellType||(exports.CellType={})).Text="text",Vb.Date="date",Vb.Status="status",Vb.Custom="custom";const qb=(e=exports.TableColumnAlign.Left)=>({left:"justify-start",center:"justify-center",right:"justify-end"}[e]),Ub=(e,t,r,n,o,i)=>({toggleSorting:n=>{if(!t.find(t=>t.key===e))return;const o=n?"desc":"asc";i({key:e,direction:o}),r&&r(e,o)},getIsSorted:()=>!(!o||o.key!==e)&&o.direction,key:e,data:n}),Yb=(e,t,r,n,o,i)=>Ub(e,t,r,n,o,i),Gb=e=>{switch(e){case exports.PaginationPosition.Right:return"ml-auto order-2";case exports.PaginationPosition.Center:return"mx-auto";default:return"order-1"}},Xb=e=>{switch(e){case exports.PaginationPosition.Left:return"order-1";case exports.PaginationPosition.Center:return"mx-auto";default:return"ml-auto order-2"}},Zb=(e=!1)=>e?{effectivePaginationPosition:exports.PaginationPosition.Left,effectiveEntriesPosition:exports.PaginationPosition.Right}:{effectivePaginationPosition:exports.PaginationPosition.Right,effectiveEntriesPosition:exports.PaginationPosition.Left},Kb=(e,t)=>{if(!t)return e;const r=e.split(" ");return r.length<=t?e:`${r.slice(0,t).join(" ")}...`};var Qb,Jb={exports:{}};var ew=(Qb||(Qb=1,Jb.exports=function(){var e=1e3,t=6e4,r=36e5,n="millisecond",o="second",i="minute",a="hour",l="day",s="week",c="month",u="quarter",p="year",d="date",f="Invalid Date",m=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,v=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,y={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(e){var t=["th","st","nd","rd"],r=e%100;return"["+e+(t[(r-20)%10]||t[r]||t[0])+"]"}},h=function(e,t,r){var n=String(e);return!n||n.length>=t?e:""+Array(t+1-n.length).join(r)+e},g={s:h,z:function(e){var t=-e.utcOffset(),r=Math.abs(t),n=Math.floor(r/60),o=r%60;return(t<=0?"+":"-")+h(n,2,"0")+":"+h(o,2,"0")},m:function e(t,r){if(t.date()<r.date())return-e(r,t);var n=12*(r.year()-t.year())+(r.month()-t.month()),o=t.clone().add(n,c),i=r-o<0,a=t.clone().add(n+(i?-1:1),c);return+(-(n+(r-o)/(i?o-a:a-o))||0)},a:function(e){return e<0?Math.ceil(e)||0:Math.floor(e)},p:function(e){return{M:c,y:p,w:s,d:l,D:d,h:a,m:i,s:o,ms:n,Q:u}[e]||String(e||"").toLowerCase().replace(/s$/,"")},u:function(e){return void 0===e}},b="en",w={};w[b]=y;var x="$isDayjsObject",O=function(e){return e instanceof P||!(!e||!e[x])},E=function e(t,r,n){var o;if(!t)return b;if("string"==typeof t){var i=t.toLowerCase();w[i]&&(o=i),r&&(w[i]=r,o=i);var a=t.split("-");if(!o&&a.length>1)return e(a[0])}else{var l=t.name;w[l]=t,o=l}return!n&&o&&(b=o),o||!n&&b},k=function(e,t){if(O(e))return e.clone();var r="object"==typeof t?t:{};return r.date=e,r.args=arguments,new P(r)},j=g;j.l=E,j.i=O,j.w=function(e,t){return k(e,{locale:t.$L,utc:t.$u,x:t.$x,$offset:t.$offset})};var P=function(){function y(e){this.$L=E(e.locale,null,!0),this.parse(e),this.$x=this.$x||e.x||{},this[x]=!0}var h=y.prototype;return h.parse=function(e){this.$d=function(e){var t=e.date,r=e.utc;if(null===t)return new Date(NaN);if(j.u(t))return new Date;if(t instanceof Date)return new Date(t);if("string"==typeof t&&!/Z$/i.test(t)){var n=t.match(m);if(n){var o=n[2]-1||0,i=(n[7]||"0").substring(0,3);return r?new Date(Date.UTC(n[1],o,n[3]||1,n[4]||0,n[5]||0,n[6]||0,i)):new Date(n[1],o,n[3]||1,n[4]||0,n[5]||0,n[6]||0,i)}}return new Date(t)}(e),this.init()},h.init=function(){var e=this.$d;this.$y=e.getFullYear(),this.$M=e.getMonth(),this.$D=e.getDate(),this.$W=e.getDay(),this.$H=e.getHours(),this.$m=e.getMinutes(),this.$s=e.getSeconds(),this.$ms=e.getMilliseconds()},h.$utils=function(){return j},h.isValid=function(){return!(this.$d.toString()===f)},h.isSame=function(e,t){var r=k(e);return this.startOf(t)<=r&&r<=this.endOf(t)},h.isAfter=function(e,t){return k(e)<this.startOf(t)},h.isBefore=function(e,t){return this.endOf(t)<k(e)},h.$g=function(e,t,r){return j.u(e)?this[t]:this.set(r,e)},h.unix=function(){return Math.floor(this.valueOf()/1e3)},h.valueOf=function(){return this.$d.getTime()},h.startOf=function(e,t){var r=this,n=!!j.u(t)||t,u=j.p(e),f=function(e,t){var o=j.w(r.$u?Date.UTC(r.$y,t,e):new Date(r.$y,t,e),r);return n?o:o.endOf(l)},m=function(e,t){return j.w(r.toDate()[e].apply(r.toDate("s"),(n?[0,0,0,0]:[23,59,59,999]).slice(t)),r)},v=this.$W,y=this.$M,h=this.$D,g="set"+(this.$u?"UTC":"");switch(u){case p:return n?f(1,0):f(31,11);case c:return n?f(1,y):f(0,y+1);case s:var b=this.$locale().weekStart||0,w=(v<b?v+7:v)-b;return f(n?h-w:h+(6-w),y);case l:case d:return m(g+"Hours",0);case a:return m(g+"Minutes",1);case i:return m(g+"Seconds",2);case o:return m(g+"Milliseconds",3);default:return this.clone()}},h.endOf=function(e){return this.startOf(e,!1)},h.$set=function(e,t){var r,s=j.p(e),u="set"+(this.$u?"UTC":""),f=(r={},r[l]=u+"Date",r[d]=u+"Date",r[c]=u+"Month",r[p]=u+"FullYear",r[a]=u+"Hours",r[i]=u+"Minutes",r[o]=u+"Seconds",r[n]=u+"Milliseconds",r)[s],m=s===l?this.$D+(t-this.$W):t;if(s===c||s===p){var v=this.clone().set(d,1);v.$d[f](m),v.init(),this.$d=v.set(d,Math.min(this.$D,v.daysInMonth())).$d}else f&&this.$d[f](m);return this.init(),this},h.set=function(e,t){return this.clone().$set(e,t)},h.get=function(e){return this[j.p(e)]()},h.add=function(n,u){var d,f=this;n=Number(n);var m=j.p(u),v=function(e){var t=k(f);return j.w(t.date(t.date()+Math.round(e*n)),f)};if(m===c)return this.set(c,this.$M+n);if(m===p)return this.set(p,this.$y+n);if(m===l)return v(1);if(m===s)return v(7);var y=(d={},d[i]=t,d[a]=r,d[o]=e,d)[m]||1,h=this.$d.getTime()+n*y;return j.w(h,this)},h.subtract=function(e,t){return this.add(-1*e,t)},h.format=function(e){var t=this,r=this.$locale();if(!this.isValid())return r.invalidDate||f;var n=e||"YYYY-MM-DDTHH:mm:ssZ",o=j.z(this),i=this.$H,a=this.$m,l=this.$M,s=r.weekdays,c=r.months,u=r.meridiem,p=function(e,r,o,i){return e&&(e[r]||e(t,n))||o[r].slice(0,i)},d=function(e){return j.s(i%12||12,e,"0")},m=u||function(e,t,r){var n=e<12?"AM":"PM";return r?n.toLowerCase():n};return n.replace(v,function(e,n){return n||function(e){switch(e){case"YY":return String(t.$y).slice(-2);case"YYYY":return j.s(t.$y,4,"0");case"M":return l+1;case"MM":return j.s(l+1,2,"0");case"MMM":return p(r.monthsShort,l,c,3);case"MMMM":return p(c,l);case"D":return t.$D;case"DD":return j.s(t.$D,2,"0");case"d":return String(t.$W);case"dd":return p(r.weekdaysMin,t.$W,s,2);case"ddd":return p(r.weekdaysShort,t.$W,s,3);case"dddd":return s[t.$W];case"H":return String(i);case"HH":return j.s(i,2,"0");case"h":return d(1);case"hh":return d(2);case"a":return m(i,a,!0);case"A":return m(i,a,!1);case"m":return String(a);case"mm":return j.s(a,2,"0");case"s":return String(t.$s);case"ss":return j.s(t.$s,2,"0");case"SSS":return j.s(t.$ms,3,"0");case"Z":return o}return null}(e)||o.replace(":","")})},h.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},h.diff=function(n,d,f){var m,v=this,y=j.p(d),h=k(n),g=(h.utcOffset()-this.utcOffset())*t,b=this-h,w=function(){return j.m(v,h)};switch(y){case p:m=w()/12;break;case c:m=w();break;case u:m=w()/3;break;case s:m=(b-g)/6048e5;break;case l:m=(b-g)/864e5;break;case a:m=b/r;break;case i:m=b/t;break;case o:m=b/e;break;default:m=b}return f?m:j.a(m)},h.daysInMonth=function(){return this.endOf(c).$D},h.$locale=function(){return w[this.$L]},h.locale=function(e,t){if(!e)return this.$L;var r=this.clone(),n=E(e,t,!0);return n&&(r.$L=n),r},h.clone=function(){return j.w(this.$d,this)},h.toDate=function(){return new Date(this.valueOf())},h.toJSON=function(){return this.isValid()?this.toISOString():null},h.toISOString=function(){return this.$d.toISOString()},h.toString=function(){return this.$d.toUTCString()},y}(),S=P.prototype;return k.prototype=S,[["$ms",n],["$s",o],["$m",i],["$H",a],["$W",l],["$M",c],["$y",p],["$D",d]].forEach(function(e){S[e[1]]=function(t){return this.$g(t,e[0],e[1])}}),k.extend=function(e,t){return e.$i||(e(t,P,k),e.$i=!0),k},k.locale=E,k.isDayjs=O,k.unix=function(e){return k(1e3*e)},k.en=w[b],k.Ls=w,k.p={},k}()),Jb.exports),tw=Be(ew);const rw={active:"bg-green-100 text-green-800",inactive:"bg-red-100 text-red-800",pending:"bg-yellow-100 text-yellow-800",completed:"bg-blue-100 text-blue-800",processing:"bg-purple-100 text-purple-800",default:"bg-gray-100 text-gray-800"},nw="name",ow="200px",iw="email",aw="joinDate",lw="status",sw=(t,r,n,o)=>{const i=r[t.key],a=qb(t.align),l=t=>e.createElement("div",{className:`flex w-full ${a}`},t);if(n&&t.customCell)return l(t.customCell(i,r));if(null==i)return l(null);switch(t.type){case exports.CellType.Date:{if(!t.dateFormat)return l(e.createElement(qh,{variant:"small",color:"primary"},String(i)));const r=tw(i,t.dateFormat.input).format(t.dateFormat.output);return l(e.createElement(qh,{variant:"small",color:"primary"},r))}case exports.CellType.Status:if(o){const t=String(i).toLowerCase(),r=rw[t]||rw.default;return l(e.createElement("span",{className:`px-2 py-1 text-xs font-medium rounded-full ${r}`},String(i)))}return l(e.createElement(qh,{variant:"small",color:"primary"},String(i)));case exports.CellType.Text:default:{const r=String(i),n=Kb(r,t.maxWords);return l(e.createElement(qh,{variant:"small",color:"primary",className:n!==r?"truncate":"",title:r},n))}}},cw=(t,r)=>r?.key!==t.key?e.createElement(Oe,{className:"h-4 w-4 opacity-40"}):"asc"===r.direction?e.createElement(Ce,{className:"h-4 w-4 text-primary"}):e.createElement(je,{className:"h-4 w-4 text-primary"}),uw=(t,r,n,o,i)=>{if(t.customHeader)return t.customHeader(r(t.key));const a=qb(t.align);return o&&t.sortable?e.createElement("div",{className:`flex w-full ${a}`},e.createElement(_e,{variant:"link",onClick:()=>n(t),className:"p-0 h-auto font-medium text-muted-foreground"},e.createElement("div",{className:"flex items-center"},e.createElement("span",{className:"truncate"},t.title),e.createElement("span",{className:"ml-2 inline-flex shrink-0"},cw(t,i))))):e.createElement("div",{className:`flex w-full items-center h-9 ${a}`},e.createElement("span",{className:"truncate font-medium text-muted-foreground"},t.title))},pw=(e,t,r,n,o)=>uw(e,t,r,n,o),dw={renderSortIcon:cw,renderHeader:uw,renderTableHeader:pw},fw=(e,t,r)=>({key:e,title:t,type:exports.CellType.Text,width:r?.width,sortable:r?.sortable,align:r?.align||exports.TableColumnAlign.Left,customCell:r?.customCell,maxWords:r?.maxWords}),mw=(e,t,r)=>({key:e,title:t,type:exports.CellType.Date,width:r?.width,sortable:r?.sortable,align:r?.align||exports.TableColumnAlign.Left,dateFormat:{input:r?.inputFormat,output:r?.outputFormat||"MMM DD, YYYY"},customCell:r?.customCell}),vw=(e,t,r)=>({key:e,title:t,type:exports.CellType.Status,width:r?.width,sortable:r?.sortable,align:r?.align||exports.TableColumnAlign.Center,customCell:r?.customCell});function yw(e){var t=e.children,r=e.prefixCls,n=e.id,o=e.overlayInnerStyle,a=e.bodyClassName,l=e.className,s=e.style;return i.createElement("div",{className:_h("".concat(r,"-content"),l),style:s},i.createElement("div",{className:_h("".concat(r,"-inner"),a),id:n,role:"tooltip",style:o},"function"==typeof t?t():t))}function hw(){return hw=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},hw.apply(null,arguments)}function gw(e){return gw="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},gw(e)}function bw(e){var t=function(e,t){if("object"!=gw(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t);if("object"!=gw(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==gw(t)?t:t+""}function ww(e,t,r){return(t=bw(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function xw(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function Ow(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?xw(Object(r),!0).forEach(function(t){ww(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):xw(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function Ew(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(-1!==t.indexOf(n))continue;r[n]=e[n]}return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n<i.length;n++)r=i[n],-1===t.indexOf(r)&&{}.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function kw(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function jw(e,t){if(e){if("string"==typeof e)return kw(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?kw(e,t):void 0}}function Pw(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,l=[],s=!0,c=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;s=!1}else for(;!(s=(n=i.call(r)).done)&&(l.push(n.value),l.length!==t);s=!0);}catch(e){c=!0,o=e}finally{try{if(!s&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw o}}return l}}(e,t)||jw(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Sw(){return!("undefined"==typeof window||!window.document||!window.document.createElement)}var Cw={},Nw=[];function zw(e,t){if("production"!==process.env.NODE_ENV&&!e&&void 0!==console){var r=Nw.reduce(function(e,t){return t(null!=e?e:"","warning")},t);r&&console.error("Warning: ".concat(r))}}function Tw(e,t){if("production"!==process.env.NODE_ENV&&!e&&void 0!==console){var r=Nw.reduce(function(e,t){return t(null!=e?e:"","note")},t);r&&console.warn("Note: ".concat(r))}}function Lw(e,t,r){t||Cw[r]||(e(!1,r),Cw[r]=!0)}function Mw(e,t){Lw(zw,e,t)}Mw.preMessage=function(e){Nw.push(e)},Mw.resetWarned=function(){Cw={}},Mw.noteOnce=function(e,t){Lw(Tw,e,t)};var Rw,Dw={exports:{}},Aw={};var Iw,_w,Bw={};
|
|
44
|
+
*/var Ah,Ih=(Rh||(Rh=1,Ah=Dh,function(){var e={}.hasOwnProperty;function t(){for(var e="",t=0;t<arguments.length;t++){var o=arguments[t];o&&(e=n(e,r(o)))}return e}function r(r){if("string"==typeof r||"number"==typeof r)return r;if("object"!=typeof r)return"";if(Array.isArray(r))return t.apply(null,r);if(r.toString!==Object.prototype.toString&&!r.toString.toString().includes("[native code]"))return r.toString();var o="";for(var i in r)e.call(r,i)&&r[i]&&(o=n(o,i));return o}function n(e,t){return t?e?e+" "+t:e+t:e}Ah.exports?(t.default=t,Ah.exports=t):window.classNames=t}()),Dh.exports),_h=Be(Ih);const Bh={extraSmall:"mt-1 mb-1",small:"mt-2 mb-2",medium:"mt-4 mb-4",large:"mt-6 mb-6",extraLarge:"mt-8 mb-8"},Wh={tight:"tracking-tight",normal:"tracking-normal",wide:"tracking-wide",wider:"tracking-wider",widest:"tracking-widest"},Fh={h1:"text-4xl",h2:"text-3xl",h3:"text-2xl",h4:"text-xl",h5:"text-lg",h6:"text-base"},$h={primary:"text-primary",secondary:"text-secondary",tertiary:"text-destructive",quaternary:"text-warning",quinary:"text-muted-foreground",white:"text-white",harford:"text-[#043d5a]"},Hh={normal:"font-normal",bold:"font-bold",semibold:"font-semibold",light:"font-light"},Vh={body:"text-base",paragraph:"text-lg",caption:"text-sm",small:"text-xs",regular:"text-base",paragraphSm:"text-md",captionSm:"text-xs"},qh=({variant:t,color:r="quaternary",marginTop:n,marginBottom:o,letterSpacing:i,textAlign:a="text-left",fontWeight:l="normal",children:s,...c})=>{const u=_h(Vh[t],$h[r],Hh[l],n?Bh[n]:"",o?Bh[o]:"",i?Wh[i]:"",a);return e.createElement("p",{className:u,...c},s)},Uh=({variant:t="h1",color:r="harford",marginTop:n,marginBottom:o,letterSpacing:i,textAlign:a="text-left",fontWeight:l="normal",children:s,...c})=>{const u=_h(Fh[t],$h[r],Hh[l],n?Bh[n]:"",o?Bh[o]:"",i?Wh[i]:"",a);return e.createElement(t,{className:u,...c},s)},Yh=({value:t,fluid:r,label:n,leftIcon:o,rightIcon:i,togglePassword:a,error:l,success:s,hint:c,disabled:u,type:p="text",hintTextProps:d={variant:"small"},className:f="",dataTestId:m,inputSize:v,...y})=>{const[h,g]=e.useState(!1),[b,w]=e.useState(!1),x=e.useMemo(()=>h?e.createElement(Nh,{name:"EyeOff",size:16}):e.createElement(Nh,{name:"Eye",size:16}),[h]),O=n&&(t||b),E=(()=>{if(!n||!O)return 0;const e=n.length;return Math.max(8*e+24,50)})(),k=e.useMemo(()=>{let e="relative flex items-center px-3 py-2 rounded-lg overflow-visible min-h-[2.5rem]";return n&&O||(e+=" border"),u?e+=" bg-muted text-muted-foreground":l?e+=" text-destructive":s&&(e+=" text-success"),r&&(e+=" w-full"),`${e} ${f}`},[u,l,s,O,n,r,f]),j=e.useMemo(()=>{let e="peer w-full outline-none bg-transparent placeholder-transparent text-sm leading-5 transition-colors duration-200";return e+=u?" text-muted-foreground cursor-not-allowed":" text-foreground","password"===p&&(e+=" pr-8"),"number"===p&&(e+=" appearance-none"),e},[u,p]),P=e.useMemo(()=>"password"===p&&h?"text":p,[p,h]),S=e.useMemo(()=>{let e="absolute left-2 px-2 transform transition-all duration-200 ease-in-out z-20 pointer-events-none";return e+=O?" -top-4 text-sm text-muted-foreground":" top-1/2 -translate-y-1/2 text-base text-muted-foreground",b&&!u?e+=" text-primary":l?e+=" text-destructive":s&&(e+=" text-success"),e},[O,b,u,l,s]),C=u?"border-input":l?"border-destructive":s?"border-success":b||t?"border-primary":"border-input",N=b?"border-t-2 border-l-2 border-r-2 border-b-2":"border-t border-l border-r border-b";return e.createElement("div",{className:k},n&&O&&e.createElement(e.Fragment,null,e.createElement("div",{className:`absolute top-0 left-0 h-0 transition-all duration-200 ${N.split(" ")[0]} ${C}`,style:{width:"12px",borderTopLeftRadius:"8px"}}),e.createElement("div",{className:`absolute top-0 transition-all duration-200 ${N.split(" ")[0]} ${C}`,style:{left:`${12+E}px`,right:"0",height:"0",borderTopRightRadius:"8px"}}),e.createElement("div",{className:`absolute left-0 top-0 bottom-0 w-0 transition-all duration-200 ${N.split(" ")[1]} ${C}`,style:{borderBottomLeftRadius:"8px"}}),e.createElement("div",{className:`absolute right-0 top-0 bottom-0 w-0 transition-all duration-200 ${N.split(" ")[2]} ${C}`,style:{borderBottomRightRadius:"8px"}}),e.createElement("div",{className:`absolute bottom-0 left-0 right-0 h-0 transition-all duration-200 ${N.split(" ")[3]} ${C}`,style:{borderBottomLeftRadius:"8px",borderBottomRightRadius:"8px"}})),o&&e.createElement("div",{className:"flex items-center mr-2 text-muted-foreground"},o),e.createElement("div",{className:"relative w-full"},e.createElement("input",{...y,"data-test-id":m,id:y.id,value:t,disabled:u,type:P,className:j,placeholder:" ",onFocus:e=>{w(!0),y.onFocus?.(e)},onBlur:e=>{w(!1),y.onBlur?.(e)}}),n&&e.createElement("label",{htmlFor:y.id,className:S},n)),"password"===p&&a&&e.createElement("button",{type:"button",className:"absolute right-3 text-muted-foreground hover:text-foreground transition-colors duration-200 disabled:opacity-50 disabled:cursor-not-allowed",onClick:()=>{!u&&t&&g(!h)},disabled:u,tabIndex:-1},x),i&&e.createElement("div",{className:"flex items-center ml-2 text-muted-foreground"},i),(l||s||c)&&e.createElement("div",{className:"absolute top-full left-0 mt-1 text-sm w-full"},e.createElement(qh,{...d},l?.message||s?.message&&!l?.message||!l?.message&&!s?.message&&c?.message)))};function Gh(e,t,{checkForDefaultPrevented:r=!0}={}){return function(n){if(e?.(n),!1===r||!n.defaultPrevented)return t?.(n)}}function Xh(e,t){if("function"==typeof e)return e(t);null!=e&&(e.current=t)}function Zh(...e){return t=>{let r=!1;const n=e.map(e=>{const n=Xh(e,t);return r||"function"!=typeof n||(r=!0),n});if(r)return()=>{for(let t=0;t<n.length;t++){const r=n[t];"function"==typeof r?r():Xh(e[t],null)}}}}function Kh(...e){return i.useCallback(Zh(...e),e)}function Qh(e,r=[]){let n=[];const o=()=>{const t=n.map(e=>i.createContext(e));return function(r){const n=r?.[e]||t;return i.useMemo(()=>({[`__scope${e}`]:{...r,[e]:n}}),[r,n])}};return o.scopeName=e,[function(r,o){const a=i.createContext(o),l=n.length;n=[...n,o];const s=r=>{const{scope:n,children:o,...s}=r,c=n?.[e]?.[l]||a,u=i.useMemo(()=>s,Object.values(s));return t.jsx(c.Provider,{value:u,children:o})};return s.displayName=r+"Provider",[s,function(t,n){const s=n?.[e]?.[l]||a,c=i.useContext(s);if(c)return c;if(void 0!==o)return o;throw new Error(`\`${t}\` must be used within \`${r}\``)}]},Jh(o,...r)]}function Jh(...e){const t=e[0];if(1===e.length)return t;const r=()=>{const r=e.map(e=>({useScope:e(),scopeName:e.scopeName}));return function(e){const n=r.reduce((t,{useScope:r,scopeName:n})=>({...t,...r(e)[`__scope${n}`]}),{});return i.useMemo(()=>({[`__scope${t.scopeName}`]:n}),[n])}};return r.scopeName=t.scopeName,r}function eg(e){const r=rg(e),n=i.forwardRef((e,n)=>{const{children:o,...a}=e,l=i.Children.toArray(o),s=l.find(og);if(s){const e=s.props.children,o=l.map(t=>t===s?i.Children.count(e)>1?i.Children.only(null):i.isValidElement(e)?e.props.children:null:t);return t.jsx(r,{...a,ref:n,children:i.isValidElement(e)?i.cloneElement(e,void 0,o):null})}return t.jsx(r,{...a,ref:n,children:o})});return n.displayName=`${e}.Slot`,n}var tg=eg("Slot");function rg(e){const t=i.forwardRef((e,t)=>{const{children:r,...n}=e;if(i.isValidElement(r)){const e=function(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning;if(r)return e.ref;if(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r)return e.props.ref;return e.props.ref||e.ref}(r),o=function(e,t){const r={...t};for(const n in t){const o=e[n],i=t[n];/^on[A-Z]/.test(n)?o&&i?r[n]=(...e)=>{const t=i(...e);return o(...e),t}:o&&(r[n]=o):"style"===n?r[n]={...o,...i}:"className"===n&&(r[n]=[o,i].filter(Boolean).join(" "))}return{...e,...r}}(n,r.props);return r.type!==i.Fragment&&(o.ref=t?Zh(t,e):e),i.cloneElement(r,o)}return i.Children.count(r)>1?i.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var ng=Symbol("radix.slottable");function og(e){return i.isValidElement(e)&&"function"==typeof e.type&&"__radixId"in e.type&&e.type.__radixId===ng}var ig=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"].reduce((e,r)=>{const n=eg(`Primitive.${r}`),o=i.forwardRef((e,o)=>{const{asChild:i,...a}=e,l=i?n:r;return"undefined"!=typeof window&&(window[Symbol.for("radix-ui")]=!0),t.jsx(l,{...a,ref:o})});return o.displayName=`Primitive.${r}`,{...e,[r]:o}},{});var ag=globalThis?.document?i.useLayoutEffect:()=>{},lg=i[" useId ".trim().toString()]||(()=>{}),sg=0;function cg(e){const[t,r]=i.useState(lg());return ag(()=>{r(e=>e??String(sg++))},[e]),t?`radix-${t}`:""}function ug(e){const t=i.useRef(e);return i.useEffect(()=>{t.current=e}),i.useMemo(()=>(...e)=>t.current?.(...e),[])}var pg=i[" useInsertionEffect ".trim().toString()]||ag;function dg({prop:e,defaultProp:t,onChange:r=()=>{},caller:n}){const[o,a,l]=function({defaultProp:e,onChange:t}){const[r,n]=i.useState(e),o=i.useRef(r),a=i.useRef(t);return pg(()=>{a.current=t},[t]),i.useEffect(()=>{o.current!==r&&(a.current?.(r),o.current=r)},[r,o]),[r,n,a]}({defaultProp:t,onChange:r}),s=void 0!==e,c=s?e:o;{const t=i.useRef(void 0!==e);i.useEffect(()=>{const e=t.current;if(e!==s){const t=e?"controlled":"uncontrolled",r=s?"controlled":"uncontrolled";console.warn(`${n} is changing from ${t} to ${r}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`)}t.current=s},[s,n])}const u=i.useCallback(t=>{if(s){const r=function(e){return"function"==typeof e}(t)?t(e):t;r!==e&&l.current?.(r)}else a(t)},[s,e,a,l]);return[c,u]}var fg=i.createContext(void 0);function mg(e){const t=i.useContext(fg);return e||t||"ltr"}var vg="rovingFocusGroup.onEntryFocus",yg={bubbles:!1,cancelable:!0},hg="RovingFocusGroup",[gg,bg,wg]=function(r){const n=r+"CollectionProvider",[o,i]=Qh(n),[a,l]=o(n,{collectionRef:{current:null},itemMap:new Map}),s=r=>{const{scope:n,children:o}=r,i=e.useRef(null),l=e.useRef(new Map).current;return t.jsx(a,{scope:n,itemMap:l,collectionRef:i,children:o})};s.displayName=n;const c=r+"CollectionSlot",u=eg(c),p=e.forwardRef((e,r)=>{const{scope:n,children:o}=e,i=Kh(r,l(c,n).collectionRef);return t.jsx(u,{ref:i,children:o})});p.displayName=c;const d=r+"CollectionItemSlot",f="data-radix-collection-item",m=eg(d),v=e.forwardRef((r,n)=>{const{scope:o,children:i,...a}=r,s=e.useRef(null),c=Kh(n,s),u=l(d,o);return e.useEffect(()=>(u.itemMap.set(s,{ref:s,...a}),()=>{u.itemMap.delete(s)})),t.jsx(m,{[f]:"",ref:c,children:i})});return v.displayName=d,[{Provider:s,Slot:p,ItemSlot:v},function(t){const n=l(r+"CollectionConsumer",t);return e.useCallback(()=>{const e=n.collectionRef.current;if(!e)return[];const t=Array.from(e.querySelectorAll(`[${f}]`));return Array.from(n.itemMap.values()).sort((e,r)=>t.indexOf(e.ref.current)-t.indexOf(r.ref.current))},[n.collectionRef,n.itemMap])},i]}(hg),[xg,Og]=Qh(hg,[wg]),[Eg,kg]=xg(hg),jg=i.forwardRef((e,r)=>t.jsx(gg.Provider,{scope:e.__scopeRovingFocusGroup,children:t.jsx(gg.Slot,{scope:e.__scopeRovingFocusGroup,children:t.jsx(Pg,{...e,ref:r})})}));jg.displayName=hg;var Pg=i.forwardRef((e,r)=>{const{__scopeRovingFocusGroup:n,orientation:o,loop:a=!1,dir:l,currentTabStopId:s,defaultCurrentTabStopId:c,onCurrentTabStopIdChange:u,onEntryFocus:p,preventScrollOnEntryFocus:d=!1,...f}=e,m=i.useRef(null),v=Kh(r,m),y=mg(l),[h,g]=dg({prop:s,defaultProp:c??null,onChange:u,caller:hg}),[b,w]=i.useState(!1),x=ug(p),O=bg(n),E=i.useRef(!1),[k,j]=i.useState(0);return i.useEffect(()=>{const e=m.current;if(e)return e.addEventListener(vg,x),()=>e.removeEventListener(vg,x)},[x]),t.jsx(Eg,{scope:n,orientation:o,dir:y,loop:a,currentTabStopId:h,onItemFocus:i.useCallback(e=>g(e),[g]),onItemShiftTab:i.useCallback(()=>w(!0),[]),onFocusableItemAdd:i.useCallback(()=>j(e=>e+1),[]),onFocusableItemRemove:i.useCallback(()=>j(e=>e-1),[]),children:t.jsx(ig.div,{tabIndex:b||0===k?-1:0,"data-orientation":o,...f,ref:v,style:{outline:"none",...e.style},onMouseDown:Gh(e.onMouseDown,()=>{E.current=!0}),onFocus:Gh(e.onFocus,e=>{const t=!E.current;if(e.target===e.currentTarget&&t&&!b){const t=new CustomEvent(vg,yg);if(e.currentTarget.dispatchEvent(t),!t.defaultPrevented){const e=O().filter(e=>e.focusable);zg([e.find(e=>e.active),e.find(e=>e.id===h),...e].filter(Boolean).map(e=>e.ref.current),d)}}E.current=!1}),onBlur:Gh(e.onBlur,()=>w(!1))})})}),Sg="RovingFocusGroupItem",Cg=i.forwardRef((e,r)=>{const{__scopeRovingFocusGroup:n,focusable:o=!0,active:a=!1,tabStopId:l,children:s,...c}=e,u=cg(),p=l||u,d=kg(Sg,n),f=d.currentTabStopId===p,m=bg(n),{onFocusableItemAdd:v,onFocusableItemRemove:y,currentTabStopId:h}=d;return i.useEffect(()=>{if(o)return v(),()=>y()},[o,v,y]),t.jsx(gg.ItemSlot,{scope:n,id:p,focusable:o,active:a,children:t.jsx(ig.span,{tabIndex:f?0:-1,"data-orientation":d.orientation,...c,ref:r,onMouseDown:Gh(e.onMouseDown,e=>{o?d.onItemFocus(p):e.preventDefault()}),onFocus:Gh(e.onFocus,()=>d.onItemFocus(p)),onKeyDown:Gh(e.onKeyDown,e=>{if("Tab"===e.key&&e.shiftKey)return void d.onItemShiftTab();if(e.target!==e.currentTarget)return;const t=function(e,t,r){const n=function(e,t){return"rtl"!==t?e:"ArrowLeft"===e?"ArrowRight":"ArrowRight"===e?"ArrowLeft":e}(e.key,r);return"vertical"===t&&["ArrowLeft","ArrowRight"].includes(n)||"horizontal"===t&&["ArrowUp","ArrowDown"].includes(n)?void 0:Ng[n]}(e,d.orientation,d.dir);if(void 0!==t){if(e.metaKey||e.ctrlKey||e.altKey||e.shiftKey)return;e.preventDefault();let o=m().filter(e=>e.focusable).map(e=>e.ref.current);if("last"===t)o.reverse();else if("prev"===t||"next"===t){"prev"===t&&o.reverse();const i=o.indexOf(e.currentTarget);o=d.loop?(n=i+1,(r=o).map((e,t)=>r[(n+t)%r.length])):o.slice(i+1)}setTimeout(()=>zg(o))}var r,n}),children:"function"==typeof s?s({isCurrentTabStop:f,hasTabStop:null!=h}):s})})});Cg.displayName=Sg;var Ng={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function zg(e,t=!1){const r=document.activeElement;for(const n of e){if(n===r)return;if(n.focus({preventScroll:t}),document.activeElement!==r)return}}var Tg=jg,Lg=Cg;function Mg(e){const[t,r]=i.useState(void 0);return ag(()=>{if(e){r({width:e.offsetWidth,height:e.offsetHeight});const t=new ResizeObserver(t=>{if(!Array.isArray(t))return;if(!t.length)return;const n=t[0];let o,i;if("borderBoxSize"in n){const e=n.borderBoxSize,t=Array.isArray(e)?e[0]:e;o=t.inlineSize,i=t.blockSize}else o=e.offsetWidth,i=e.offsetHeight;r({width:o,height:i})});return t.observe(e,{box:"border-box"}),()=>t.unobserve(e)}r(void 0)},[e]),t}function Rg(e){const t=i.useRef({value:e,previous:e});return i.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var Dg=e=>{const{present:t,children:r}=e,n=function(e){const[t,r]=i.useState(),n=i.useRef(null),o=i.useRef(e),a=i.useRef("none"),l=e?"mounted":"unmounted",[s,c]=function(e,t){return i.useReducer((e,r)=>t[e][r]??e,e)}(l,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return i.useEffect(()=>{const e=Ag(n.current);a.current="mounted"===s?e:"none"},[s]),ag(()=>{const t=n.current,r=o.current;if(r!==e){const n=a.current,i=Ag(t);if(e)c("MOUNT");else if("none"===i||"none"===t?.display)c("UNMOUNT");else{c(r&&n!==i?"ANIMATION_OUT":"UNMOUNT")}o.current=e}},[e,c]),ag(()=>{if(t){let e;const r=t.ownerDocument.defaultView??window,i=i=>{const a=Ag(n.current).includes(i.animationName);if(i.target===t&&a&&(c("ANIMATION_END"),!o.current)){const n=t.style.animationFillMode;t.style.animationFillMode="forwards",e=r.setTimeout(()=>{"forwards"===t.style.animationFillMode&&(t.style.animationFillMode=n)})}},l=e=>{e.target===t&&(a.current=Ag(n.current))};return t.addEventListener("animationstart",l),t.addEventListener("animationcancel",i),t.addEventListener("animationend",i),()=>{r.clearTimeout(e),t.removeEventListener("animationstart",l),t.removeEventListener("animationcancel",i),t.removeEventListener("animationend",i)}}c("ANIMATION_END")},[t,c]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:i.useCallback(e=>{n.current=e?getComputedStyle(e):null,r(e)},[])}}(t),o="function"==typeof r?r({present:n.isPresent}):i.Children.only(r),a=Kh(n.ref,function(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning;if(r)return e.ref;if(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r)return e.props.ref;return e.props.ref||e.ref}(o));return"function"==typeof r||n.isPresent?i.cloneElement(o,{ref:a}):null};function Ag(e){return e?.animationName||"none"}Dg.displayName="Presence";var Ig="Radio",[_g,Bg]=Qh(Ig),[Wg,Fg]=_g(Ig),$g=i.forwardRef((e,r)=>{const{__scopeRadio:n,name:o,checked:a=!1,required:l,disabled:s,value:c="on",onCheck:u,form:p,...d}=e,[f,m]=i.useState(null),v=Kh(r,e=>m(e)),y=i.useRef(!1),h=!f||(p||!!f.closest("form"));return t.jsxs(Wg,{scope:n,checked:a,disabled:s,children:[t.jsx(ig.button,{type:"button",role:"radio","aria-checked":a,"data-state":Ug(a),"data-disabled":s?"":void 0,disabled:s,value:c,...d,ref:v,onClick:Gh(e.onClick,e=>{a||u?.(),h&&(y.current=e.isPropagationStopped(),y.current||e.stopPropagation())})}),h&&t.jsx(qg,{control:f,bubbles:!y.current,name:o,value:c,checked:a,required:l,disabled:s,form:p,style:{transform:"translateX(-100%)"}})]})});$g.displayName=Ig;var Hg="RadioIndicator",Vg=i.forwardRef((e,r)=>{const{__scopeRadio:n,forceMount:o,...i}=e,a=Fg(Hg,n);return t.jsx(Dg,{present:o||a.checked,children:t.jsx(ig.span,{"data-state":Ug(a.checked),"data-disabled":a.disabled?"":void 0,...i,ref:r})})});Vg.displayName=Hg;var qg=i.forwardRef(({__scopeRadio:e,control:r,checked:n,bubbles:o=!0,...a},l)=>{const s=i.useRef(null),c=Kh(s,l),u=Rg(n),p=Mg(r);return i.useEffect(()=>{const e=s.current;if(!e)return;const t=window.HTMLInputElement.prototype,r=Object.getOwnPropertyDescriptor(t,"checked").set;if(u!==n&&r){const t=new Event("click",{bubbles:o});r.call(e,n),e.dispatchEvent(t)}},[u,n,o]),t.jsx(ig.input,{type:"radio","aria-hidden":!0,defaultChecked:n,...a,tabIndex:-1,ref:c,style:{...a.style,...p,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});function Ug(e){return e?"checked":"unchecked"}qg.displayName="RadioBubbleInput";var Yg=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],Gg="RadioGroup",[Xg,Zg]=Qh(Gg,[Og,Bg]),Kg=Og(),Qg=Bg(),[Jg,eb]=Xg(Gg),tb=i.forwardRef((e,r)=>{const{__scopeRadioGroup:n,name:o,defaultValue:i,value:a,required:l=!1,disabled:s=!1,orientation:c,dir:u,loop:p=!0,onValueChange:d,...f}=e,m=Kg(n),v=mg(u),[y,h]=dg({prop:a,defaultProp:i??null,onChange:d,caller:Gg});return t.jsx(Jg,{scope:n,name:o,required:l,disabled:s,value:y,onValueChange:h,children:t.jsx(Tg,{asChild:!0,...m,orientation:c,dir:v,loop:p,children:t.jsx(ig.div,{role:"radiogroup","aria-required":l,"aria-orientation":c,"data-disabled":s?"":void 0,dir:v,...f,ref:r})})})});tb.displayName=Gg;var rb="RadioGroupItem",nb=i.forwardRef((e,r)=>{const{__scopeRadioGroup:n,disabled:o,...a}=e,l=eb(rb,n),s=l.disabled||o,c=Kg(n),u=Qg(n),p=i.useRef(null),d=Kh(r,p),f=l.value===a.value,m=i.useRef(!1);return i.useEffect(()=>{const e=e=>{Yg.includes(e.key)&&(m.current=!0)},t=()=>m.current=!1;return document.addEventListener("keydown",e),document.addEventListener("keyup",t),()=>{document.removeEventListener("keydown",e),document.removeEventListener("keyup",t)}},[]),t.jsx(Lg,{asChild:!0,...c,focusable:!s,active:f,children:t.jsx($g,{disabled:s,required:l.required,checked:f,...u,...a,name:l.name,ref:d,onCheck:()=>l.onValueChange(a.value),onKeyDown:Gh(e=>{"Enter"===e.key&&e.preventDefault()}),onFocus:Gh(a.onFocus,()=>{m.current&&p.current?.click()})})})});nb.displayName=rb;var ob=i.forwardRef((e,r)=>{const{__scopeRadioGroup:n,...o}=e,i=Qg(n);return t.jsx(Vg,{...i,...o,ref:r})});ob.displayName="RadioGroupIndicator";var ib=tb,ab=nb,lb=ob;const sb=e.forwardRef(({className:t,classNames:r,showIcons:n=!0,withCard:o=!0,options:i,...a},l)=>e.createElement(ib,{ref:l,className:ve("grid gap-2",t,r?.root),...a},i.map(t=>e.createElement("div",{key:t.id,className:ve("relative")},e.createElement("label",{htmlFor:t.id,className:ve("relative flex w-full items-center gap-x-3",o&&["cursor-pointer rounded-lg border-2 p-4","border-input bg-background hover:bg-accent hover:text-accent-foreground","data-[state=checked]:border-primary data-[state=checked]:bg-primary/5"],!o&&"cursor-pointer py-2",r?.label)},e.createElement(ab,{value:t.id,id:t.id,className:ve("aspect-square h-4 w-4 rounded-full border border-primary text-primary ring-offset-background","focus:outline-hidden focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2","disabled:cursor-not-allowed disabled:opacity-50",r?.item)},e.createElement(lb,{className:ve("flex items-center justify-center",r?.indicator)},e.createElement(Ne,{className:"h-2.5 w-2.5 fill-current text-current"}))),e.createElement("div",{className:"flex flex-1 items-center justify-between"},e.createElement("div",{className:ve("space-y-1",!t.description&&"space-y-0")},e.createElement("p",{className:ve("text-sm font-medium leading-none","peer-disabled:cursor-not-allowed peer-disabled:opacity-70",r?.text)},t.label),t.description&&e.createElement("p",{className:ve("text-sm text-muted-foreground",r?.description)},t.description)),n&&t.icon&&e.createElement("div",{className:ve("ml-4 shrink-0 text-muted-foreground",r?.icon)},t.icon)))))));sb.displayName="RadioGroup";var cb="Switch",[ub,pb]=Qh(cb),[db,fb]=ub(cb),mb=i.forwardRef((e,r)=>{const{__scopeSwitch:n,name:o,checked:a,defaultChecked:l,required:s,disabled:c,value:u="on",onCheckedChange:p,form:d,...f}=e,[m,v]=i.useState(null),y=Kh(r,e=>v(e)),h=i.useRef(!1),g=!m||(d||!!m.closest("form")),[b,w]=dg({prop:a,defaultProp:l??!1,onChange:p,caller:cb});return t.jsxs(db,{scope:n,checked:b,disabled:c,children:[t.jsx(ig.button,{type:"button",role:"switch","aria-checked":b,"aria-required":s,"data-state":gb(b),"data-disabled":c?"":void 0,disabled:c,value:u,...f,ref:y,onClick:Gh(e.onClick,e=>{w(e=>!e),g&&(h.current=e.isPropagationStopped(),h.current||e.stopPropagation())})}),g&&t.jsx(hb,{control:m,bubbles:!h.current,name:o,value:u,checked:b,required:s,disabled:c,form:d,style:{transform:"translateX(-100%)"}})]})});mb.displayName=cb;var vb="SwitchThumb",yb=i.forwardRef((e,r)=>{const{__scopeSwitch:n,...o}=e,i=fb(vb,n);return t.jsx(ig.span,{"data-state":gb(i.checked),"data-disabled":i.disabled?"":void 0,...o,ref:r})});yb.displayName=vb;var hb=i.forwardRef(({__scopeSwitch:e,control:r,checked:n,bubbles:o=!0,...a},l)=>{const s=i.useRef(null),c=Kh(s,l),u=Rg(n),p=Mg(r);return i.useEffect(()=>{const e=s.current;if(!e)return;const t=window.HTMLInputElement.prototype,r=Object.getOwnPropertyDescriptor(t,"checked").set;if(u!==n&&r){const t=new Event("click",{bubbles:o});r.call(e,n),e.dispatchEvent(t)}},[u,n,o]),t.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:n,...a,tabIndex:-1,ref:c,style:{...a.style,...p,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});function gb(e){return e?"checked":"unchecked"}hb.displayName="SwitchBubbleInput";var bb=mb,wb=yb;const xb="medium",Ob="primary",Eb={small:{switch:"w-8 h-4",thumb:"w-3 h-3",translate:"translate-x-4"},medium:{switch:"w-11 h-6",thumb:"w-5 h-5",translate:"translate-x-5"},large:{switch:"w-14 h-7",thumb:"w-6 h-6",translate:"translate-x-7"}},kb={primary:{background:"bg-primary",foreground:"text-primary-foreground",hover:"hover:bg-primary/90"},success:{background:"bg-[rgb(var(--success))]",foreground:"text-[rgb(var(--success-foreground))]",hover:"hover:bg-[rgb(var(--success))]/90"},danger:{background:"bg-destructive",foreground:"text-destructive-foreground",hover:"hover:bg-destructive/90"},warning:{background:"bg-[rgb(var(--warning))]",foreground:"text-foreground",hover:"hover:bg-[rgb(var(--warning))]/90"}},jb=({label:e,description:t,dataTestId:r})=>e||t?i.createElement("div",{className:"flex flex-col gap-1.5","data-test-id":r},e&&i.createElement(qh,{variant:"regular",color:"secondary"},e),t&&i.createElement(qh,{variant:"small",color:"secondary"},t)):null,Pb=i.forwardRef(({label:e,description:t,size:r=xb,variant:n=Ob,disabled:o=!1,loading:a=!1,className:l,onChange:s,dataTestId:c,checked:u,id:p,...d},f)=>{const m=r||xb,v=n||Ob;return i.createElement("div",{className:"flex items-center"},i.createElement("label",{htmlFor:p,className:ve("relative inline-flex items-start gap-3 select-none",o&&"cursor-not-allowed opacity-60",l)},i.createElement("div",{className:"relative"},i.createElement(bb,{id:p,checked:u,onCheckedChange:e=>{o||a||s?.(e)},disabled:o||a,"data-test-id":`${c}-root`,ref:f,...d,className:ve("peer relative inline-flex shrink-0 cursor-pointer rounded-full transition-colors","border-2 border-transparent","focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",Eb[m].switch,u?ve(kb[v].background,kb[v].foreground):"bg-input",o&&"cursor-not-allowed")},i.createElement(wb,{className:ve("pointer-events-none block rounded-full bg-background shadow-lg ring-0 transition-transform","flex items-center justify-center",Eb[m].thumb,u?Eb[m].translate:"translate-x-0.5"),"data-test-id":`${c}-thumb`},a&&i.createElement(Re,{className:"animate-spin text-black",size:{small:12,medium:16,large:20}[m]})))),i.createElement(jb,{label:e,description:t,dataTestId:c,disabled:o})))});Pb.displayName="Switch";const Sb=e.forwardRef(({className:t="",error:r=!1,disabled:n=!1,placeholder:o,value:i,defaultValue:a,onChange:l,onFocus:s,onBlur:c,rows:u=3,maxLength:p,required:d=!1,readOnly:f=!1,autoFocus:m=!1,resize:v=!1,label:y,helperText:h,showCharCount:g=!1,floatingLabel:b=!1,fluid:w=!0,width:x,...O},E)=>{const[k,j]=e.useState(!1),[P,S]=e.useState(i||a||""),C=e.useCallback(e=>{j(!0),s?.(e)},[s]),N=e.useCallback(e=>{j(!1),c?.(e)},[c]),z=e.useCallback(e=>{S(e.target.value),l?.(e)},[l]),T=Boolean(P||i),L=k||T,M=(e=>`\n w-full transition-all duration-300 ease-out\n font-medium text-foreground placeholder:text-muted-foreground\n outline-none border-0 bg-transparent\n ${e?"resize":"resize-none"}\n p-4 text-base leading-6\n `.trim().replace(/\s+/g," "))(v),R=(({disabled:e,floatingLabel:t,isLabelFloated:r,focused:n,error:o})=>`\n relative overflow-visible rounded-lg\n bg-background shadow-sm transition-all duration-300\n hover:shadow-md\n ${e?"opacity-50 cursor-not-allowed bg-muted":""}\n ${t&&r?"":"border border-border hover:border-border/80"}\n ${!n||t&&r?"":"ring-2 ring-ring border-ring shadow-lg"}\n ${!o||t&&r?"":"ring-2 ring-destructive border-destructive"}\n `.trim().replace(/\s+/g," "))({disabled:n,floatingLabel:b,isLabelFloated:L,focused:k,error:r}),D=(({fluid:e,width:t,className:r})=>`\n ${e?"w-full":t?"":"w-auto"}\n ${r||""}\n `.trim())({fluid:w,width:x,className:t}),A=(e=>e?{width:e}:{})(x),I=((e,t)=>{const r=e||t||"";return"string"==typeof r?r.length:0})(i,P),_=(({isLabelFloated:e,focused:t,error:r})=>`\n absolute left-3 transition-all duration-200 pointer-events-none\n font-medium z-20\n ${e?"-top-2.5 text-xs px-2":"top-4 text-base px-0"}\n ${t?"text-ring":r?"text-destructive":e?"text-primary":"text-muted-foreground"}\n `.trim().replace(/\s+/g," "))({isLabelFloated:L,focused:k,error:r}),B=((e,t)=>`\n transition-all duration-200\n ${e?"border-ring":t?"border-destructive":"border-border"}\n `)(k,r),W=((e,t)=>{if(!e)return 0;const r=e.length+(t?1:0);return Math.max(7*r+16,40)})(y,d);return e.createElement("div",{className:D,style:A},y&&!b&&e.createElement(qh,{variant:"caption",color:"primary",fontWeight:"semibold",marginBottom:"small"},y,d&&e.createElement("span",{className:"text-destructive ml-1"},"*")),e.createElement("div",{className:R},b&&y&&L&&e.createElement(e.Fragment,null,e.createElement("div",{className:`absolute top-0 left-0 h-0 ${B} border-t-2`,style:{width:"12px",borderTopLeftRadius:"8px"}}),e.createElement("div",{className:`absolute top-0 ${B} border-t-2`,style:{left:`${12+W}px`,right:"0",height:"0",borderTopRightRadius:"8px"}}),e.createElement("div",{className:`absolute left-0 top-0 bottom-0 w-0 ${B} border-l-2`,style:{borderBottomLeftRadius:"8px"}}),e.createElement("div",{className:`absolute right-0 top-0 bottom-0 w-0 ${B} border-r-2`,style:{borderBottomRightRadius:"8px"}}),e.createElement("div",{className:`absolute bottom-0 left-0 right-0 h-0 ${B} border-b-2`,style:{borderBottomLeftRadius:"8px",borderBottomRightRadius:"8px"}}),k&&e.createElement("div",{className:"absolute inset-0 rounded-lg shadow-lg pointer-events-none"})),b&&y&&e.createElement("label",{className:_},y,d&&e.createElement("span",{className:"text-destructive ml-1"},"*")),e.createElement("textarea",{ref:E,className:`\n ${M}\n ${b&&y?"pt-6":""}\n `.trim().replace(/\s+/g," "),placeholder:b?"":o,value:i,defaultValue:a,onChange:z,onFocus:C,onBlur:N,disabled:n,readOnly:f,required:d,autoFocus:m,rows:u,maxLength:p,...O})),(h||g)&&e.createElement("div",{className:"flex justify-between items-center mt-2"},h&&e.createElement(qh,{variant:"captionSm",color:r?"tertiary":"quinary"},h),g&&p&&e.createElement(qh,{variant:"captionSm",color:I>.9*p?"tertiary":"quinary",className:"font-mono"},I,"/",p)))});var Cb,Nb;Sb.displayName="TextArea",exports.MessageVariants=void 0,(Cb=exports.MessageVariants||(exports.MessageVariants={})).Success="success",Cb.Error="error",Cb.Warning="warning",Cb.Info="info",exports.MessagePosition=void 0,(Nb=exports.MessagePosition||(exports.MessagePosition={})).TopCenter="top-center",Nb.TopLeft="top-left",Nb.TopRight="top-right",Nb.BottomCenter="bottom-center",Nb.BottomLeft="bottom-left",Nb.BottomRight="bottom-right";const zb=({id:t,destroy:r,title:n,description:o,variant:i=exports.MessageVariants.Info,position:a=exports.MessagePosition.TopCenter,duration:l=5e3,animationDuration:s=400,icon:c,dataTestId:u})=>{const[p,d]=e.useState(!1),[,f]=e.useState(!1),m=e.useRef(null),v=e.useRef(null),y=e.useRef(0),h=e.useRef(l),g=e.useCallback(()=>f(!0),[]),b=e.useCallback(()=>f(!1),[]),w=e.useCallback(()=>{v.current&&clearTimeout(v.current),d(!0),setTimeout(()=>{r()},s)},[r,s]);e.useEffect(()=>(y.current=Date.now(),h.current=l,m.current&&(m.current.style.width="100%",m.current.style.transition="none",m.current.offsetWidth,m.current.style.transition=`width ${l}ms linear`,m.current.style.width="0%"),v.current=window.setTimeout(()=>{w()},l),()=>{v.current&&clearTimeout(v.current)}),[l,w]);const x={[exports.MessageVariants.Success]:{icon:"text-emerald-500 dark:text-emerald-400",progress:"bg-emerald-500 dark:bg-emerald-400"},[exports.MessageVariants.Error]:{icon:"text-destructive",progress:"bg-destructive"},[exports.MessageVariants.Warning]:{icon:"text-amber-500 dark:text-amber-400",progress:"bg-amber-500 dark:bg-amber-400"},[exports.MessageVariants.Info]:{icon:"text-primary",progress:"bg-primary"}}[i],O={[exports.MessagePosition.TopCenter]:p?"animate-slide-out-up":"animate-slide-in-down",[exports.MessagePosition.TopLeft]:p?"animate-slide-out-left":"animate-slide-in-left",[exports.MessagePosition.TopRight]:p?"animate-slide-out-right":"animate-slide-in-right",[exports.MessagePosition.BottomCenter]:p?"animate-slide-out-down":"animate-slide-in-up",[exports.MessagePosition.BottomLeft]:p?"animate-slide-out-left":"animate-slide-in-left",[exports.MessagePosition.BottomRight]:p?"animate-slide-out-right":"animate-slide-in-right"};return e.createElement("div",{id:t??`${i}-${"string"==typeof n?n:""}`,className:`\n relative group flex items-center justify-between pointer-events-auto\n rounded-lg max-w-md w-full overflow-hidden\n bg-background\n border border-border\n ${O[a]||O[exports.MessagePosition.TopCenter]}\n ${p?"opacity-0":"opacity-100"}\n transition-all duration-300 ease-out\n shadow-sm hover:shadow-md\n `,"data-test-id":u,onMouseEnter:g,onMouseLeave:b,style:{transition:`all ${s}ms cubic-bezier(0.4, 0, 0.2, 1)`}},e.createElement("div",{className:"flex items-center gap-3 px-4 py-3 w-full"},c&&e.createElement("div",{className:`flex-shrink-0 ${x.icon}`},c),e.createElement("div",{className:"flex flex-col min-w-0 flex-grow"},e.createElement("div",{className:"font-medium text-sm m-0 text-foreground"},n),o&&e.createElement("div",{className:"text-xs m-0 mt-0.5 text-muted-foreground truncate"},o)),e.createElement("button",{onClick:w,className:"\n flex-shrink-0 ml-2 p-1 rounded-md\n transition-all duration-200\n hover:bg-accent\n text-muted-foreground hover:text-accent-foreground\n ","aria-label":"Close notification"},e.createElement(Ae,{size:14}))),!p&&e.createElement("div",{className:`absolute bottom-0 left-0 h-[2px] ${x.progress} opacity-80`,ref:m,style:{width:"100%",transformOrigin:"left"}}))};const Tb=new class{isSetup=!1;isBrowser="undefined"!=typeof window;containers={[exports.MessagePosition.TopCenter]:void 0,[exports.MessagePosition.TopLeft]:void 0,[exports.MessagePosition.TopRight]:void 0,[exports.MessagePosition.BottomCenter]:void 0,[exports.MessagePosition.BottomLeft]:void 0,[exports.MessagePosition.BottomRight]:void 0};roots={[exports.MessagePosition.TopCenter]:null,[exports.MessagePosition.TopLeft]:null,[exports.MessagePosition.TopRight]:null,[exports.MessagePosition.BottomCenter]:null,[exports.MessagePosition.BottomLeft]:null,[exports.MessagePosition.BottomRight]:null};messages={[exports.MessagePosition.TopCenter]:[],[exports.MessagePosition.TopLeft]:[],[exports.MessagePosition.TopRight]:[],[exports.MessagePosition.BottomCenter]:[],[exports.MessagePosition.BottomLeft]:[],[exports.MessagePosition.BottomRight]:[]};constructor(){this.isBrowser&&this.setup()}setup(){if(!this.isBrowser)return;const e=document.getElementsByTagName("body")[0];Object.values(exports.MessagePosition).forEach(t=>{const r=`message-container-${t}`;let o=document.getElementById(r);o||(o=document.createElement("div"),o.id=r,e.appendChild(o)),this.containers[t]=o,this.roots[t]=n.createRoot(o)}),this.isSetup=!0}show(e){if(!this.isBrowser)return;this.isSetup||this.setup();const t=e.position||exports.MessagePosition.TopCenter,r=e.id||`message-${Math.random().toString().slice(2,11)}`,n=50*this.messages[t].length,o={id:r,...e,animationDuration:e.animationDuration||300,destroy:()=>this.destroy(r,t)};setTimeout(()=>{this.messages[t]=[o,...this.messages[t]],this.render(t)},n)}destroy(e,t=exports.MessagePosition.TopCenter){this.isBrowser&&(this.messages[t]=this.messages[t].filter(t=>t.id!==e),this.render(t))}success(t){this.show({icon:e.createElement(jh,{size:18}),...t,variant:exports.MessageVariants.Success})}error(t){this.show({icon:e.createElement(wh,{size:18}),...t,variant:exports.MessageVariants.Error})}warning(t){this.show({icon:e.createElement(bh,{size:18}),...t,variant:exports.MessageVariants.Warning})}info(t){this.show({icon:e.createElement(gh,{size:18}),...t,variant:exports.MessageVariants.Info})}getPositionStyles(e){switch(e){case exports.MessagePosition.TopLeft:return"fixed flex flex-col items-start justify-start gap-2 p-4 top-0 left-0 z-9999 pointer-events-none";case exports.MessagePosition.TopRight:return"fixed flex flex-col items-end justify-start gap-2 p-4 top-0 right-0 z-9999 pointer-events-none";case exports.MessagePosition.BottomCenter:return"fixed flex flex-col items-center justify-end gap-2 p-4 bottom-0 left-0 right-0 z-9999 pointer-events-none";case exports.MessagePosition.BottomLeft:return"fixed flex flex-col items-start justify-end gap-2 p-4 bottom-0 left-0 z-9999 pointer-events-none";case exports.MessagePosition.BottomRight:return"fixed flex flex-col items-end justify-end gap-2 p-4 bottom-0 right-0 z-9999 pointer-events-none";case exports.MessagePosition.TopCenter:default:return"fixed flex flex-col items-center justify-start gap-2 p-4 top-0 left-0 right-0 z-9999 pointer-events-none"}}render(t=exports.MessagePosition.TopCenter){if(!this.isBrowser||!this.roots[t])return;const r=this.messages[t].map(t=>e.createElement(zb,{key:t.id,...t}));this.roots[t].render(e.createElement("div",{className:this.getPositionStyles(t)},r))}},Lb="...",Mb=({className:e,...t})=>i.createElement("nav",{role:"navigation","aria-label":"pagination",className:ve("mx-auto flex w-full justify-center",e),...t}),Rb=i.forwardRef(({className:e,...t},r)=>i.createElement("ul",{ref:r,className:ve("flex flex-row items-center gap-1",e),...t}));Rb.displayName="PaginationContent";const Db=i.forwardRef(({className:e,...t},r)=>i.createElement("li",{ref:r,className:ve("",e),...t}));Db.displayName="PaginationItem";const Ab=i.forwardRef(({className:e,isActive:t,size:r="medium",...n},o)=>i.createElement(_e,{ref:o,"aria-current":t?"page":void 0,variant:t?"primary":"link",size:r,className:ve("h-9 w-9",e),...n}));Ab.displayName="PaginationLink";const Ib=i.forwardRef(({className:e,...t},r)=>i.createElement(_e,{ref:r,variant:"link",size:"medium",className:ve("h-9 w-9",e),...t},i.createElement(Pe,{className:"h-4 w-4"}),i.createElement("span",{className:"sr-only"},"Previous page")));Ib.displayName="PaginationPrevious";const _b=i.forwardRef(({className:e,...t},r)=>i.createElement(_e,{ref:r,variant:"link",size:"medium",className:ve("h-9 w-9",e),...t},i.createElement("span",{className:"sr-only"},"Next page"),i.createElement(Se,{className:"h-4 w-4"})));_b.displayName="PaginationNext";const Bb=({className:e,...t})=>i.createElement("span",{"aria-hidden":!0,className:ve("flex h-9 w-9 items-center justify-center",e),...t},i.createElement(ze,{className:"h-4 w-4"}),i.createElement("span",{className:"sr-only"},"More pages"));Bb.displayName="PaginationEllipsis";const Wb=(e,t)=>{const r=t-e+1;return Array.from({length:r},(t,r)=>r+e)},Fb=({currentPage:t,totalPages:r,onPageChange:n,siblingCount:o=1,className:i,disabled:a=!1,isLoading:l=!1,enableKeyboardNav:s=!1,showEllipsis:c=!0})=>{const u=e.useMemo(()=>((e,t,r,n)=>{if(r+5>=t)return Wb(1,t);const o=Math.max(e-r,1),i=Math.min(e+r,t),a=o>2,l=i<t-2;if(!a&&l){const e=Wb(1,3+2*r);return n?[...e,Lb,t]:[...e,t]}if(a&&!l){const e=Wb(t-(3+2*r)+1,t);return n?[1,Lb,...e]:[1,...e]}if(a&&l){const e=Wb(o,i);return n?[1,Lb,...e,Lb,t]:[1,...e,t]}return Wb(1,t)})(t,r,o,c),[t,r,o,c]),p=e.useCallback(()=>{!a&&!l&&t>1&&n(t-1)},[t,n,a,l]),d=e.useCallback(()=>{!a&&!l&&t<r&&n(t+1)},[t,r,n,a,l]),f=e.useCallback(e=>{a||l||!s||("ArrowLeft"===e.key?(e.preventDefault(),p()):"ArrowRight"===e.key&&(e.preventDefault(),d()))},[p,d,a,l,s]);return e.useEffect(()=>{if(s)return window.addEventListener("keydown",f),()=>window.removeEventListener("keydown",f)},[f,s]),0===t||u.length<2?null:e.createElement(Mb,{className:ve("select-none",i)},e.createElement(Rb,null,e.createElement(Db,null,e.createElement(Ib,{onClick:p,disabled:1===t||a||l,className:ve("transition-all duration-200","hover:scale-105 hover:bg-accent",(a||l)&&"pointer-events-none opacity-50"),"aria-label":"Previous page"})),u.map((r,o)=>{if(r===Lb)return e.createElement(Db,{key:`dots-${o}`},e.createElement(Bb,null));const i=r,s=i===t;return e.createElement(Db,{key:i},e.createElement(Ab,{isActive:s,onClick:()=>!a&&!l&&n(i),className:ve("transition-all duration-200",s&&"hover:bg-primary/90",!s&&"hover:bg-accent hover:scale-105",(a||l)&&"pointer-events-none opacity-50"),"aria-label":`Page ${i}`,"aria-current":s?"page":void 0},i))}),e.createElement(Db,null,e.createElement(_b,{onClick:d,disabled:t===r||a||l,className:ve("transition-all duration-200","hover:scale-105 hover:bg-accent",(a||l)&&"pointer-events-none opacity-50"),"aria-label":"Next page"}))))};var $b,Hb,Vb;exports.TableColumnAlign=void 0,($b=exports.TableColumnAlign||(exports.TableColumnAlign={})).Left="left",$b.Center="center",$b.Right="right",exports.PaginationPosition=void 0,(Hb=exports.PaginationPosition||(exports.PaginationPosition={})).Left="left",Hb.Right="right",Hb.Center="center",exports.CellType=void 0,(Vb=exports.CellType||(exports.CellType={})).Text="text",Vb.Date="date",Vb.Status="status",Vb.Custom="custom";const qb=(e=exports.TableColumnAlign.Left)=>({left:"justify-start",center:"justify-center",right:"justify-end"}[e]),Ub=(e,t,r,n,o,i)=>({toggleSorting:n=>{if(!t.find(t=>t.key===e))return;const o=n?"desc":"asc";i({key:e,direction:o}),r&&r(e,o)},getIsSorted:()=>!(!o||o.key!==e)&&o.direction,key:e,data:n}),Yb=(e,t,r,n,o,i)=>Ub(e,t,r,n,o,i),Gb=e=>{switch(e){case exports.PaginationPosition.Right:return"ml-auto order-2";case exports.PaginationPosition.Center:return"mx-auto";default:return"order-1"}},Xb=e=>{switch(e){case exports.PaginationPosition.Left:return"order-1";case exports.PaginationPosition.Center:return"mx-auto";default:return"ml-auto order-2"}},Zb=(e=!1)=>e?{effectivePaginationPosition:exports.PaginationPosition.Left,effectiveEntriesPosition:exports.PaginationPosition.Right}:{effectivePaginationPosition:exports.PaginationPosition.Right,effectiveEntriesPosition:exports.PaginationPosition.Left},Kb=(e,t)=>{if(!t)return e;const r=e.split(" ");return r.length<=t?e:`${r.slice(0,t).join(" ")}...`};var Qb,Jb={exports:{}};var ew=(Qb||(Qb=1,Jb.exports=function(){var e=1e3,t=6e4,r=36e5,n="millisecond",o="second",i="minute",a="hour",l="day",s="week",c="month",u="quarter",p="year",d="date",f="Invalid Date",m=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,v=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,y={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(e){var t=["th","st","nd","rd"],r=e%100;return"["+e+(t[(r-20)%10]||t[r]||t[0])+"]"}},h=function(e,t,r){var n=String(e);return!n||n.length>=t?e:""+Array(t+1-n.length).join(r)+e},g={s:h,z:function(e){var t=-e.utcOffset(),r=Math.abs(t),n=Math.floor(r/60),o=r%60;return(t<=0?"+":"-")+h(n,2,"0")+":"+h(o,2,"0")},m:function e(t,r){if(t.date()<r.date())return-e(r,t);var n=12*(r.year()-t.year())+(r.month()-t.month()),o=t.clone().add(n,c),i=r-o<0,a=t.clone().add(n+(i?-1:1),c);return+(-(n+(r-o)/(i?o-a:a-o))||0)},a:function(e){return e<0?Math.ceil(e)||0:Math.floor(e)},p:function(e){return{M:c,y:p,w:s,d:l,D:d,h:a,m:i,s:o,ms:n,Q:u}[e]||String(e||"").toLowerCase().replace(/s$/,"")},u:function(e){return void 0===e}},b="en",w={};w[b]=y;var x="$isDayjsObject",O=function(e){return e instanceof P||!(!e||!e[x])},E=function e(t,r,n){var o;if(!t)return b;if("string"==typeof t){var i=t.toLowerCase();w[i]&&(o=i),r&&(w[i]=r,o=i);var a=t.split("-");if(!o&&a.length>1)return e(a[0])}else{var l=t.name;w[l]=t,o=l}return!n&&o&&(b=o),o||!n&&b},k=function(e,t){if(O(e))return e.clone();var r="object"==typeof t?t:{};return r.date=e,r.args=arguments,new P(r)},j=g;j.l=E,j.i=O,j.w=function(e,t){return k(e,{locale:t.$L,utc:t.$u,x:t.$x,$offset:t.$offset})};var P=function(){function y(e){this.$L=E(e.locale,null,!0),this.parse(e),this.$x=this.$x||e.x||{},this[x]=!0}var h=y.prototype;return h.parse=function(e){this.$d=function(e){var t=e.date,r=e.utc;if(null===t)return new Date(NaN);if(j.u(t))return new Date;if(t instanceof Date)return new Date(t);if("string"==typeof t&&!/Z$/i.test(t)){var n=t.match(m);if(n){var o=n[2]-1||0,i=(n[7]||"0").substring(0,3);return r?new Date(Date.UTC(n[1],o,n[3]||1,n[4]||0,n[5]||0,n[6]||0,i)):new Date(n[1],o,n[3]||1,n[4]||0,n[5]||0,n[6]||0,i)}}return new Date(t)}(e),this.init()},h.init=function(){var e=this.$d;this.$y=e.getFullYear(),this.$M=e.getMonth(),this.$D=e.getDate(),this.$W=e.getDay(),this.$H=e.getHours(),this.$m=e.getMinutes(),this.$s=e.getSeconds(),this.$ms=e.getMilliseconds()},h.$utils=function(){return j},h.isValid=function(){return!(this.$d.toString()===f)},h.isSame=function(e,t){var r=k(e);return this.startOf(t)<=r&&r<=this.endOf(t)},h.isAfter=function(e,t){return k(e)<this.startOf(t)},h.isBefore=function(e,t){return this.endOf(t)<k(e)},h.$g=function(e,t,r){return j.u(e)?this[t]:this.set(r,e)},h.unix=function(){return Math.floor(this.valueOf()/1e3)},h.valueOf=function(){return this.$d.getTime()},h.startOf=function(e,t){var r=this,n=!!j.u(t)||t,u=j.p(e),f=function(e,t){var o=j.w(r.$u?Date.UTC(r.$y,t,e):new Date(r.$y,t,e),r);return n?o:o.endOf(l)},m=function(e,t){return j.w(r.toDate()[e].apply(r.toDate("s"),(n?[0,0,0,0]:[23,59,59,999]).slice(t)),r)},v=this.$W,y=this.$M,h=this.$D,g="set"+(this.$u?"UTC":"");switch(u){case p:return n?f(1,0):f(31,11);case c:return n?f(1,y):f(0,y+1);case s:var b=this.$locale().weekStart||0,w=(v<b?v+7:v)-b;return f(n?h-w:h+(6-w),y);case l:case d:return m(g+"Hours",0);case a:return m(g+"Minutes",1);case i:return m(g+"Seconds",2);case o:return m(g+"Milliseconds",3);default:return this.clone()}},h.endOf=function(e){return this.startOf(e,!1)},h.$set=function(e,t){var r,s=j.p(e),u="set"+(this.$u?"UTC":""),f=(r={},r[l]=u+"Date",r[d]=u+"Date",r[c]=u+"Month",r[p]=u+"FullYear",r[a]=u+"Hours",r[i]=u+"Minutes",r[o]=u+"Seconds",r[n]=u+"Milliseconds",r)[s],m=s===l?this.$D+(t-this.$W):t;if(s===c||s===p){var v=this.clone().set(d,1);v.$d[f](m),v.init(),this.$d=v.set(d,Math.min(this.$D,v.daysInMonth())).$d}else f&&this.$d[f](m);return this.init(),this},h.set=function(e,t){return this.clone().$set(e,t)},h.get=function(e){return this[j.p(e)]()},h.add=function(n,u){var d,f=this;n=Number(n);var m=j.p(u),v=function(e){var t=k(f);return j.w(t.date(t.date()+Math.round(e*n)),f)};if(m===c)return this.set(c,this.$M+n);if(m===p)return this.set(p,this.$y+n);if(m===l)return v(1);if(m===s)return v(7);var y=(d={},d[i]=t,d[a]=r,d[o]=e,d)[m]||1,h=this.$d.getTime()+n*y;return j.w(h,this)},h.subtract=function(e,t){return this.add(-1*e,t)},h.format=function(e){var t=this,r=this.$locale();if(!this.isValid())return r.invalidDate||f;var n=e||"YYYY-MM-DDTHH:mm:ssZ",o=j.z(this),i=this.$H,a=this.$m,l=this.$M,s=r.weekdays,c=r.months,u=r.meridiem,p=function(e,r,o,i){return e&&(e[r]||e(t,n))||o[r].slice(0,i)},d=function(e){return j.s(i%12||12,e,"0")},m=u||function(e,t,r){var n=e<12?"AM":"PM";return r?n.toLowerCase():n};return n.replace(v,function(e,n){return n||function(e){switch(e){case"YY":return String(t.$y).slice(-2);case"YYYY":return j.s(t.$y,4,"0");case"M":return l+1;case"MM":return j.s(l+1,2,"0");case"MMM":return p(r.monthsShort,l,c,3);case"MMMM":return p(c,l);case"D":return t.$D;case"DD":return j.s(t.$D,2,"0");case"d":return String(t.$W);case"dd":return p(r.weekdaysMin,t.$W,s,2);case"ddd":return p(r.weekdaysShort,t.$W,s,3);case"dddd":return s[t.$W];case"H":return String(i);case"HH":return j.s(i,2,"0");case"h":return d(1);case"hh":return d(2);case"a":return m(i,a,!0);case"A":return m(i,a,!1);case"m":return String(a);case"mm":return j.s(a,2,"0");case"s":return String(t.$s);case"ss":return j.s(t.$s,2,"0");case"SSS":return j.s(t.$ms,3,"0");case"Z":return o}return null}(e)||o.replace(":","")})},h.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},h.diff=function(n,d,f){var m,v=this,y=j.p(d),h=k(n),g=(h.utcOffset()-this.utcOffset())*t,b=this-h,w=function(){return j.m(v,h)};switch(y){case p:m=w()/12;break;case c:m=w();break;case u:m=w()/3;break;case s:m=(b-g)/6048e5;break;case l:m=(b-g)/864e5;break;case a:m=b/r;break;case i:m=b/t;break;case o:m=b/e;break;default:m=b}return f?m:j.a(m)},h.daysInMonth=function(){return this.endOf(c).$D},h.$locale=function(){return w[this.$L]},h.locale=function(e,t){if(!e)return this.$L;var r=this.clone(),n=E(e,t,!0);return n&&(r.$L=n),r},h.clone=function(){return j.w(this.$d,this)},h.toDate=function(){return new Date(this.valueOf())},h.toJSON=function(){return this.isValid()?this.toISOString():null},h.toISOString=function(){return this.$d.toISOString()},h.toString=function(){return this.$d.toUTCString()},y}(),S=P.prototype;return k.prototype=S,[["$ms",n],["$s",o],["$m",i],["$H",a],["$W",l],["$M",c],["$y",p],["$D",d]].forEach(function(e){S[e[1]]=function(t){return this.$g(t,e[0],e[1])}}),k.extend=function(e,t){return e.$i||(e(t,P,k),e.$i=!0),k},k.locale=E,k.isDayjs=O,k.unix=function(e){return k(1e3*e)},k.en=w[b],k.Ls=w,k.p={},k}()),Jb.exports),tw=Be(ew);const rw={active:"bg-green-100 text-green-800",inactive:"bg-red-100 text-red-800",pending:"bg-yellow-100 text-yellow-800",completed:"bg-blue-100 text-blue-800",processing:"bg-purple-100 text-purple-800",default:"bg-gray-100 text-gray-800"},nw="name",ow="200px",iw="email",aw="joinDate",lw="status",sw=(t,r,n,o)=>{const i=r[t.key],a=qb(t.align),l=t=>e.createElement("div",{className:`flex w-full ${a}`},t);if(n&&t.customCell)return l(t.customCell(i,r));if(null==i)return l(null);switch(t.type){case exports.CellType.Date:{if(!t.dateFormat)return l(e.createElement(qh,{variant:"small",color:"primary"},String(i)));const r=tw(i,t.dateFormat.input).format(t.dateFormat.output);return l(e.createElement(qh,{variant:"small",color:"primary"},r))}case exports.CellType.Status:if(o){const t=String(i).toLowerCase(),r=rw[t]||rw.default;return l(e.createElement("span",{className:`px-2 py-1 text-xs font-medium rounded-full ${r}`},String(i)))}return l(e.createElement(qh,{variant:"small",color:"primary"},String(i)));case exports.CellType.Text:default:{const r=String(i),n=Kb(r,t.maxWords);return l(e.createElement(qh,{variant:"small",color:"primary",className:n!==r?"truncate":"",title:r},n))}}},cw=(t,r)=>r?.key!==t.key?e.createElement(Oe,{className:"h-4 w-4 opacity-40"}):"asc"===r.direction?e.createElement(Ce,{className:"h-4 w-4 text-primary"}):e.createElement(je,{className:"h-4 w-4 text-primary"}),uw=(t,r,n,o,i)=>{if(t.customHeader)return t.customHeader(r(t.key));const a=qb(t.align);return o&&t.sortable?e.createElement("div",{className:`flex w-full ${a}`},e.createElement(_e,{variant:"link",onClick:()=>n(t),className:"p-0 h-auto font-medium text-muted-foreground"},e.createElement("div",{className:"flex items-center"},e.createElement("span",{className:"truncate"},t.title),e.createElement("span",{className:"ml-2 inline-flex shrink-0"},cw(t,i))))):e.createElement("div",{className:`flex w-full items-center h-9 ${a}`},e.createElement("span",{className:"truncate font-medium text-muted-foreground"},t.title))},pw=(e,t,r,n,o)=>uw(e,t,r,n,o),dw={renderSortIcon:cw,renderHeader:uw,renderTableHeader:pw},fw=(e,t,r)=>({key:e,title:t,type:exports.CellType.Text,width:r?.width,sortable:r?.sortable,align:r?.align||exports.TableColumnAlign.Left,customCell:r?.customCell,maxWords:r?.maxWords}),mw=(e,t,r)=>({key:e,title:t,type:exports.CellType.Date,width:r?.width,sortable:r?.sortable,align:r?.align||exports.TableColumnAlign.Left,dateFormat:{input:r?.inputFormat,output:r?.outputFormat||"MMM DD, YYYY"},customCell:r?.customCell}),vw=(e,t,r)=>({key:e,title:t,type:exports.CellType.Status,width:r?.width,sortable:r?.sortable,align:r?.align||exports.TableColumnAlign.Center,customCell:r?.customCell});function yw(e){var t=e.children,r=e.prefixCls,n=e.id,o=e.overlayInnerStyle,a=e.bodyClassName,l=e.className,s=e.style;return i.createElement("div",{className:_h("".concat(r,"-content"),l),style:s},i.createElement("div",{className:_h("".concat(r,"-inner"),a),id:n,role:"tooltip",style:o},"function"==typeof t?t():t))}function hw(){return hw=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},hw.apply(null,arguments)}function gw(e){return gw="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},gw(e)}function bw(e){var t=function(e,t){if("object"!=gw(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t);if("object"!=gw(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==gw(t)?t:t+""}function ww(e,t,r){return(t=bw(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function xw(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function Ow(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?xw(Object(r),!0).forEach(function(t){ww(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):xw(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function Ew(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(-1!==t.indexOf(n))continue;r[n]=e[n]}return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n<i.length;n++)r=i[n],-1===t.indexOf(r)&&{}.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function kw(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function jw(e,t){if(e){if("string"==typeof e)return kw(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?kw(e,t):void 0}}function Pw(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,l=[],s=!0,c=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;s=!1}else for(;!(s=(n=i.call(r)).done)&&(l.push(n.value),l.length!==t);s=!0);}catch(e){c=!0,o=e}finally{try{if(!s&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw o}}return l}}(e,t)||jw(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Sw(){return!("undefined"==typeof window||!window.document||!window.document.createElement)}var Cw={},Nw=[];function zw(e,t){if("production"!==process.env.NODE_ENV&&!e&&void 0!==console){var r=Nw.reduce(function(e,t){return t(null!=e?e:"","warning")},t);r&&console.error("Warning: ".concat(r))}}function Tw(e,t){if("production"!==process.env.NODE_ENV&&!e&&void 0!==console){var r=Nw.reduce(function(e,t){return t(null!=e?e:"","note")},t);r&&console.warn("Note: ".concat(r))}}function Lw(e,t,r){t||Cw[r]||(e(!1,r),Cw[r]=!0)}function Mw(e,t){Lw(zw,e,t)}Mw.preMessage=function(e){Nw.push(e)},Mw.resetWarned=function(){Cw={}},Mw.noteOnce=function(e,t){Lw(Tw,e,t)};var Rw,Dw={exports:{}},Aw={};var Iw,_w,Bw={};
|
|
45
45
|
/**
|
|
46
46
|
* @license React
|
|
47
47
|
* react-is.development.js
|