@texturehq/edges 0.0.11 → 0.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/dist/index.cjs +2 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +4 -1
- package/dist/index.d.ts +4 -1
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -69,6 +69,7 @@ declare const iconMapping: {
|
|
|
69
69
|
readonly GearSix: _phosphor_icons_react.Icon;
|
|
70
70
|
readonly HandPointing: _phosphor_icons_react.Icon;
|
|
71
71
|
readonly Info: _phosphor_icons_react.Icon;
|
|
72
|
+
readonly IntersectSquare: _phosphor_icons_react.Icon;
|
|
72
73
|
readonly Lightning: _phosphor_icons_react.Icon;
|
|
73
74
|
readonly LightningSlash: _phosphor_icons_react.Icon;
|
|
74
75
|
readonly List: _phosphor_icons_react.Icon;
|
|
@@ -96,6 +97,7 @@ declare const iconMapping: {
|
|
|
96
97
|
readonly SignOut: _phosphor_icons_react.Icon;
|
|
97
98
|
readonly SlackLogo: _phosphor_icons_react.Icon;
|
|
98
99
|
readonly Sliders: _phosphor_icons_react.Icon;
|
|
100
|
+
readonly SlidersHorizontal: _phosphor_icons_react.Icon;
|
|
99
101
|
readonly Snowflake: _phosphor_icons_react.Icon;
|
|
100
102
|
readonly SolarPanel: _phosphor_icons_react.Icon;
|
|
101
103
|
readonly Square: _phosphor_icons_react.Icon;
|
|
@@ -530,8 +532,9 @@ interface TextLinkProps {
|
|
|
530
532
|
onClick?: (e: React.MouseEvent<HTMLAnchorElement>) => void;
|
|
531
533
|
asButton?: boolean;
|
|
532
534
|
onPress?: () => void;
|
|
535
|
+
showArrow?: boolean;
|
|
533
536
|
}
|
|
534
|
-
declare const TextLink: ({ href, children, className, external, title, variant, onClick, asButton, onPress, }: TextLinkProps) => react_jsx_runtime.JSX.Element;
|
|
537
|
+
declare const TextLink: ({ href, children, className, external, title, variant, onClick, asButton, onPress, showArrow, }: TextLinkProps) => react_jsx_runtime.JSX.Element;
|
|
535
538
|
|
|
536
539
|
interface SkeletonProps {
|
|
537
540
|
width?: number | string;
|
package/dist/index.d.ts
CHANGED
|
@@ -69,6 +69,7 @@ declare const iconMapping: {
|
|
|
69
69
|
readonly GearSix: _phosphor_icons_react.Icon;
|
|
70
70
|
readonly HandPointing: _phosphor_icons_react.Icon;
|
|
71
71
|
readonly Info: _phosphor_icons_react.Icon;
|
|
72
|
+
readonly IntersectSquare: _phosphor_icons_react.Icon;
|
|
72
73
|
readonly Lightning: _phosphor_icons_react.Icon;
|
|
73
74
|
readonly LightningSlash: _phosphor_icons_react.Icon;
|
|
74
75
|
readonly List: _phosphor_icons_react.Icon;
|
|
@@ -96,6 +97,7 @@ declare const iconMapping: {
|
|
|
96
97
|
readonly SignOut: _phosphor_icons_react.Icon;
|
|
97
98
|
readonly SlackLogo: _phosphor_icons_react.Icon;
|
|
98
99
|
readonly Sliders: _phosphor_icons_react.Icon;
|
|
100
|
+
readonly SlidersHorizontal: _phosphor_icons_react.Icon;
|
|
99
101
|
readonly Snowflake: _phosphor_icons_react.Icon;
|
|
100
102
|
readonly SolarPanel: _phosphor_icons_react.Icon;
|
|
101
103
|
readonly Square: _phosphor_icons_react.Icon;
|
|
@@ -530,8 +532,9 @@ interface TextLinkProps {
|
|
|
530
532
|
onClick?: (e: React.MouseEvent<HTMLAnchorElement>) => void;
|
|
531
533
|
asButton?: boolean;
|
|
532
534
|
onPress?: () => void;
|
|
535
|
+
showArrow?: boolean;
|
|
533
536
|
}
|
|
534
|
-
declare const TextLink: ({ href, children, className, external, title, variant, onClick, asButton, onPress, }: TextLinkProps) => react_jsx_runtime.JSX.Element;
|
|
537
|
+
declare const TextLink: ({ href, children, className, external, title, variant, onClick, asButton, onPress, showArrow, }: TextLinkProps) => react_jsx_runtime.JSX.Element;
|
|
535
538
|
|
|
536
539
|
interface SkeletonProps {
|
|
537
540
|
width?: number | string;
|
package/dist/index.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import {Link,Button,TextField,ListBox,useSlottedContext,PopoverContext,Popover,composeRenderProps,OverlayArrow,Select,SelectValue,NumberField,Group,Input,TimeField,DateInput,DateSegment,DateField,ToggleButton,TooltipTrigger,Tooltip,Switch,ProgressBar,Calendar,CalendarGrid,CalendarGridBody,CalendarCell,Text,useLocale,Heading,CalendarGridHeader,CalendarHeaderCell,RangeCalendar,ComboBox,ListBoxItem,Form,Dialog,DateRangePicker,Checkbox}from'react-aria-components';import U,{memo,useState,useContext,useRef,useId,useEffect,useCallback,useMemo,useReducer}from'react';import {WaveSine,X,Wind,WebhooksLogo,WarningCircle,Warning,UsersFour,Users,UserPlus,UserCircle,User,TreeEvergreen,Trash,ThermometerSimple,ThermometerHot,ThermometerCold,Terminal,Sun,Stack,SquaresFour,Square,SolarPanel,Snowflake,Sliders,SlackLogo,SignOut,ShieldCheck,ShareNetwork,Rocket,Repeat,Question,Power,Plus,PlugsConnected,Plugs,PencilSimple,PaperclipHorizontal,PaperPlaneTilt,PaperPlaneRight,Moon,MaskHappy,MapPinArea,MapPin,MagnifyingGlass,Lock,ListNumbers,ListBullets,List,LightningSlash,Lightning,Info,HandPointing,GearSix,Gauge,Flag,FireSimple,Export,EyeSlash,EyeClosed,Eye,EnvelopeSimple,DownloadSimple,DotsThree,DotsSix,Database,Cursor,Copy,Columns,Code,CloudSun,CloudSnow,CloudRain,CloudLightning,CloudFog,CloudArrowDown,Cloud,ClockCountdown,ClipboardText,CircleNotch,CircleDashed,Circle,CheckSquare,CheckCircle,Check,ChartLineUp,ChartLine,ChartBar,ChargingStation,CarSimple,CaretUp,CaretRight,CaretLeft,CaretDown,CalendarBlank,Buildings,BracketsCurly,BookmarkSimple,BookOpen,BatteryWarning,BatteryMedium,BatteryLow,BatteryHigh,BatteryFull,BatteryEmpty,BatteryCharging,ArrowsClockwise,ArrowUp,ArrowSquareOut,ArrowRight,ArrowLineLeft,ArrowLeft,ArrowDown,ArrowCircleUp,AppWindow}from'@phosphor-icons/react';import {twMerge}from'tailwind-merge';import {jsx,jsxs,Fragment}from'react/jsx-runtime';import'luxon';import {CalendarIcon,Minus,Check as Check$1}from'lucide-react';var Yo=()=>jsx("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"}),_o=()=>jsx("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"}),We={AppWindow:AppWindow,ArrowCircleUp:ArrowCircleUp,ArrowDown:ArrowDown,ArrowLeft:ArrowLeft,ArrowLineLeft:ArrowLineLeft,ArrowRight:ArrowRight,ArrowSquareOut:ArrowSquareOut,ArrowUp:ArrowUp,ArrowsClockwise:ArrowsClockwise,BatteryCharging:BatteryCharging,BatteryEmpty:BatteryEmpty,BatteryFull:BatteryFull,BatteryHigh:BatteryHigh,BatteryLow:BatteryLow,BatteryMedium:BatteryMedium,BatteryWarning:BatteryWarning,BookOpen:BookOpen,BookmarkSimple:BookmarkSimple,BracketsCurly:BracketsCurly,Buildings:Buildings,CalendarBlank:CalendarBlank,CaretDown:CaretDown,CaretLeft:CaretLeft,CaretRight:CaretRight,CaretUp:CaretUp,CarSimple:CarSimple,ChargingStation:ChargingStation,ChartBar:ChartBar,ChartLine:ChartLine,ChartLineUp:ChartLineUp,Check:Check,CheckCircle:CheckCircle,CheckSquare:CheckSquare,Circle:Circle,CircleDashed:CircleDashed,CircleNotch:CircleNotch,ClipboardText:ClipboardText,ClockCountdown:ClockCountdown,Cloud:Cloud,CloudArrowDown:CloudArrowDown,CloudFog:CloudFog,CloudLightning:CloudLightning,CloudRain:CloudRain,CloudSnow:CloudSnow,CloudSun:CloudSun,Code:Code,Columns:Columns,Copy:Copy,Cursor:Cursor,Database:Database,DotsSix:DotsSix,DotsThree:DotsThree,DownloadSimple:DownloadSimple,EnvelopeSimple:EnvelopeSimple,Eye:Eye,EyeClosed:EyeClosed,EyeSlash:EyeSlash,Export:Export,FireSimple:FireSimple,Flag:Flag,Gauge:Gauge,GearSix:GearSix,HandPointing:HandPointing,Info:Info,Lightning:Lightning,LightningSlash:LightningSlash,List:List,ListBullets:ListBullets,ListNumbers:ListNumbers,Lock:Lock,MagnifyingGlass:MagnifyingGlass,MapPin:MapPin,MapPinArea:MapPinArea,MaskHappy:MaskHappy,Moon:Moon,PaperPlaneRight:PaperPlaneRight,PaperPlaneTilt:PaperPlaneTilt,PaperclipHorizontal:PaperclipHorizontal,PencilSimple:PencilSimple,Plugs:Plugs,PlugsConnected:PlugsConnected,Plus:Plus,Power:Power,Question:Question,Repeat:Repeat,Rocket:Rocket,ShareNetwork:ShareNetwork,ShieldCheck:ShieldCheck,SignOut:SignOut,SlackLogo:SlackLogo,Sliders:Sliders,Snowflake:Snowflake,SolarPanel:SolarPanel,Square:Square,SquaresFour:SquaresFour,Stack:Stack,Sun:Sun,Terminal:Terminal,ThermometerCold:ThermometerCold,ThermometerHot:ThermometerHot,ThermometerSimple:ThermometerSimple,Trash:Trash,TreeEvergreen:TreeEvergreen,User:User,UserCircle:UserCircle,UserPlus:UserPlus,Users:Users,UsersFour:UsersFour,Warning:Warning,WarningCircle:WarningCircle,WebhooksLogo:WebhooksLogo,Wind:Wind,X:X,TextureMenuLight:Yo,TextureMenuDark:_o,WaveSine:WaveSine},x=memo(({name:e,size:t=24,color:r,weight:o="regular",className:a,title:n,ariaLabel:s,grow:i,variant:l="default",rounded:c=false,bgColor:d,...u})=>{if(!e)return null;let p=We[e];if(!p)return process.env.NODE_ENV==="development"&&console.error(`Icon with name "${e}" does not exist.`),null;let g=e==="TextureMenuLight"||e==="TextureMenuDark",m=s||n||`${e} icon`,f=l==="container"?"bg-[#F3F4F6":l==="brand"?"bg-gray-light":"",h=twMerge("inline-flex items-center justify-center w-12 h-12 p-3 rounded-xl bg-brand-light",d,c?"rounded-md":"",i?"w-full h-full":"",a),b=["inline-flex items-center justify-center",d||f,c?"rounded-md":"",i?"w-full h-full":`w-[${t}px] h-[${t}px]`].filter(Boolean).join(" "),y=jsx(p,{size:i?void 0:t,color:l==="brand"&&!g?void 0:r,className:l==="brand"&&!g?"text-brand-dark w-6 h-6":a||"",weight:o,"aria-label":m,"data-testid":`${e}-icon`,...u});return l==="brand"?jsx("div",{className:h,children:y}):l==="default"?y:jsx("div",{className:b,children:y})});x.displayName="Icon";function V(e=false){return `${e?"outline outline-1 outline-border-input focus:outline-2 focus:outline-border-focus focus:outline-offset-0 invalid:outline-2 invalid:outline-feedback-error-border group-invalid:outline-2 group-invalid:outline-feedback-error-border forced-colors:focus:outline-[Highlight] forced-colors:focus:outline-2 forced-colors:focus:outline-offset-2":"outline-none focus-visible:outline focus-visible:outline-2 focus-visible:outline-border-focus focus-visible:outline-offset-0 invalid:outline-2 invalid:outline-feedback-error-border group-invalid:outline-2 group-invalid:outline-feedback-error-border forced-colors:focus:outline-[Highlight] forced-colors:focus:outline-2 forced-colors:focus:outline-offset-2"}`}function T(e,t){return composeRenderProps(e,r=>twMerge(t,r))}var P={sm:{text:"text-[length:var(--control-text-sm)]",height:"h-[var(--control-sm-height)]",padding:"px-[var(--control-padding-sm)]",gap:"gap-[var(--control-gap-sm)]"},md:{text:"text-[length:var(--control-text-md)]",height:"h-[var(--control-md-height)]",padding:"px-[var(--control-padding-md)]",gap:"gap-[var(--control-gap-md)]"},lg:{text:"text-[length:var(--control-text-lg)]",height:"h-[var(--control-lg-height)]",padding:"px-[var(--control-padding-lg)]",gap:"gap-[var(--control-gap-lg)]"},xl:{text:"text-[length:var(--control-text-xl)]",height:"h-[var(--control-xl-height)]",padding:"px-[var(--control-padding-xl)]",gap:"gap-[var(--control-gap-xl)]"}};var nn="flex font-medium justify-center items-center gap-2 text-center transition rounded-sm whitespace-nowrap box-border",an={default:"bg-text-body text-neutral-white hover:brightness-90 forced-colors:bg-[ButtonText] forced-colors:text-[ButtonFace] border-2 border-transparent",primary:"bg-action-primary text-neutral-white hover:brightness-90 forced-colors:bg-[ButtonText] forced-colors:text-[ButtonFace] border-2 border-transparent",secondary:"bg-transparent text-text-body border-2 border-border-muted hover:bg-text-body/5 forced-colors:border-[ButtonBorder] forced-colors:bg-[ButtonFace] forced-colors:text-[ButtonText]",ghost:"border-none text-text-body hover:bg-text-body/5 forced-colors:text-[ButtonText] forced-colors:hover:bg-[ButtonFace]",destructive:"bg-transparent text-action-destructive border-2 border-border-muted hover:bg-action-destructive/5 forced-colors:border-[ButtonBorder] forced-colors:bg-[ButtonFace] forced-colors:text-[Mark]",link:"!text-action-primary hover:text-action-primary/90 hover:underline hover:decoration-2 hover:underline-offset-4",icon:"border-none text-text-body hover:bg-text-body/5 forced-colors:text-[ButtonText] forced-colors:hover:bg-[ButtonFace] p-2 flex-shrink-0",unstyled:"bg-transparent"},Ue={full:"w-full",default:"w-fit"},sn="opacity-control-hover cursor-not-allowed pointer-events-none grayscale",ln="opacity-100 cursor-pointer",dn={"top-right":"-right-2 -top-2","top-left":"-left-2 -top-2","bottom-right":"-right-2 -bottom-2","bottom-left":"-left-2 -bottom-2"},cn={primary:"bg-action-primary text-white",destructive:"bg-action-destructive text-white"};function un(e){let{variant:t="default",size:r="md",isDisabled:o,fullWidth:a=false,isLoading:n=false}=e,s=t==="unstyled"?"":`${nn} ${an[t]}`;return t!=="unstyled"&&(s+=` ${P[r].text} ${P[r].height} ${P[r].padding} ${P[r].gap}`),o||n?s+=` ${sn}`:s+=` ${ln}`,a?s+=` ${Ue.full}`:s+=` ${Ue.default}`,`${s} ${V()}`}function A(e){let{icon:t,children:r,isLoading:o=false,loadingText:a,loadingIndicator:n,size:s="md",iconPosition:i="left",iconWeight:l,href:c,className:d,badgeNumber:u,badgeVariant:p="primary",badgePosition:g="top-right",style:m,...f}=e,h=t?jsx(x,{name:t,className:`icon-[--control-icon-size-${s}]`,weight:l}):null,b=jsxs(Fragment,{children:[i==="left"&&h,typeof r=="function"?null:r,i==="right"&&h]}),v=jsxs("div",{className:"relative inline-flex items-center justify-center",children:[jsx("div",{className:"absolute inset-0 flex items-center justify-center",children:n||jsx(x,{name:"CircleNotch",className:`animate-spin icon-[--control-icon-size-${s}]`,"aria-hidden":"true"})}),jsx("div",{className:"invisible","aria-hidden":"true",children:b}),a&&jsx("span",{className:"sr-only",role:"status","aria-live":"polite",children:a})]}),S=[un(e),d,o?"aria-busy":""].filter(Boolean).join(" "),$=c?jsx(Link,{href:c,...f,style:m,className:S,children:o?v:typeof r=="function"?function(y){return jsxs(Fragment,{children:[i==="left"&&h,r(y),i==="right"&&h]})}:b}):jsx(Button,{...f,style:m,className:S,children:o?v:typeof r=="function"?function(y){return jsxs(Fragment,{children:[i==="left"&&h,r(y),i==="right"&&h]})}:b});return u&&u>0?jsxs("div",{className:"relative",children:[$,jsx("span",{className:`absolute ${dn[g]} flex h-5 w-5 items-center justify-center rounded-full ${cn[p]} text-xs`,"aria-label":`${u} items`,children:u})]}):$}function J(){let[e,t]=U.useState(false),r=U.useCallback((a,n)=>{t(true),n?.(a);},[]),o=U.useCallback((a,n)=>{t(false),n?.(a);},[]);return {isFocused:e,handleFocus:r,handleBlur:o}}function Y({children:e,className:t}){return jsx("div",{className:twMerge("relative w-full",t),children:e})}function Qe({onClick:e,size:t="md",className:r}){return jsx("button",{type:"button",onClick:o=>{o.preventDefault(),o.stopPropagation(),e();},className:twMerge("absolute right-2 top-1/2 -translate-y-1/2 transform text-text-muted hover:text-text-body",r),"aria-label":"Clear input",onMouseDown:o=>{o.preventDefault(),o.stopPropagation();},children:jsx(x,{name:"X",size:t==="sm"?16:20})})}function _(e){let{isInvalid:t,isDisabled:r,isFocused:o}=e,a="border rounded-[var(--control-border-radius)] ";return r?`${a} border-border-muted focus:outline-none`:t&&o?`${a} border-feedback-error-border outline-[1.5px] outline-[var(--control-focus-ring-color-error)]`:t?`${a} border-feedback-error-border`:o?`${a} !outline-[1.5px] !outline-[var(--control-focus-ring-color)] ![--tw-outline-style:solid]`:`${a}`}function Te(e){return e.isDisabled?"bg-background-muted":e.transparent?"bg-transparent":"bg-background-input"}function q(e){let{isInvalid:t,isDisabled:r,isFocused:o,transparent:a,size:n="md",className:s}=e;return twMerge("w-full",_({isInvalid:t,isDisabled:r,isFocused:o}),Te({transparent:a,isDisabled:r}),P[n].text,P[n].height,P[n].padding,s)}function $e(e){let{size:t="md",isFocusWithin:r,isInvalid:o,isDisabled:a,transparent:n,className:s}=e;return twMerge("group flex items-center rounded-sm overflow-hidden",!n&&"bg-background-input",n&&"bg-transparent",P[t].height,_({isFocused:r,isInvalid:o,isDisabled:a}),s)}function L({children:e,size:t="md",tooltip:r,isRequired:o,className:a,htmlFor:n}){return jsxs("label",{htmlFor:n,className:twMerge(P[t].text,"!text-text-caption flex items-center gap-1",a),children:[e,o&&jsx("span",{className:"text-feedback-error-text",children:"*"}),r&&jsx("span",{className:"text-text-muted",children:jsx(x,{name:"Info",size:t==="sm"?16:20})})]})}function I({size:e="md",className:t,children:r,...o}){return jsx("div",{...o,className:twMerge("leading-[2.25] text-text-muted",P[e].text,t),children:r})}function k({children:e,size:t="md",className:r}){return jsx("div",{role:"alert",className:twMerge(P[t].text,"text-feedback-error-text",r),children:e})}function Xe({size:e="md",isInvalid:t,isDisabled:r,isFocused:o,transparent:a,className:n,...s}){return jsx("input",{className:q({isInvalid:t,isDisabled:r,isFocused:o,transparent:a,size:e,className:n}),...s})}function Je(e){let{children:t,...r}=e;return jsx("div",{...r,className:$e(e),children:typeof t=="function"?t(e):t})}var bn=e=>{let t=q({isInvalid:e.isInvalid,isDisabled:e.isDisabled,isFocused:e.isFocused,transparent:e.transparent,size:e.size}),r=[e.showSearchIcon?"pl-8":"pl-3",e.isClearable&&e.hasValue||e.isPassword?"pr-8":"pr-3"].join(" ");return twMerge(t,r,e.className)};function _e({label:e,description:t,errorMessage:r,size:o="md",tooltip:a,isRequired:n,transparent:s,showSearchIcon:i,isClearable:l,onClear:c,type:d,validationResult:u,...p}){let[g,m]=U.useState(false),{isFocused:f,handleFocus:h,handleBlur:b}=J(),v=d==="password";return jsx(TextField,{...p,isRequired:n,type:v?g?"text":"password":d,className:T(p.className,"group flex flex-col"),children:({isDisabled:S,isInvalid:$})=>jsxs("div",{className:"flex flex-col",children:[e&&jsx(L,{size:o,tooltip:a,isRequired:n,children:e}),jsxs(Y,{children:[i&&jsx("div",{className:"pointer-events-none absolute left-2 top-1/2 -translate-y-1/2 transform",children:jsx(x,{name:"MagnifyingGlass",className:"h-4 w-4 text-text-muted"})}),jsx(Xe,{size:o,disabled:S,onFocus:y=>h(y,p.onFocus),onBlur:y=>b(y,p.onBlur),onChange:y=>p.onChange?.(y.target.value),className:bn({isInvalid:$,isDisabled:S,isFocused:f,size:o,transparent:s,showSearchIcon:i,isClearable:l,hasValue:!!p.value,isPassword:v,className:typeof p.className=="string"?p.className:void 0})}),l&&p.value&&!S&&jsx(Qe,{onClick:()=>{c?c():p.onChange&&p.onChange("");},size:o}),v&&!S&&jsx("button",{type:"button",onClick:()=>m(!g),className:"absolute right-3 top-1/2 -translate-y-1/2 transform text-text-muted hover:text-text-body","aria-label":g?"Hide password":"Show password",onMouseDown:y=>{y.preventDefault(),y.stopPropagation();},children:jsx(x,{name:g?"EyeSlash":"Eye",size:o==="sm"?16:20,className:"text-text-body"})})]}),t&&jsx(I,{size:o,className:"mt-3",children:t}),typeof r=="string"&&jsx(k,{size:o,className:"mt-1",children:r}),typeof r=="function"&&u&&jsx(k,{size:o,className:"mt-1",children:r(u)})]})})}var hn=e=>{let t=q({isInvalid:e.isInvalid,isDisabled:e.isDisabled,isFocused:e.isFocused,transparent:e.transparent,size:e.size});return twMerge(t,"min-h-[100px] resize-y py-2",e.className)};function et({label:e,description:t,errorMessage:r,size:o="md",tooltip:a,required:n,transparent:s,isInvalid:i,className:l,validationResult:c,...d}){let{isFocused:u,handleFocus:p,handleBlur:g}=J();return jsx("div",{className:"group flex flex-col",children:jsxs("div",{className:"flex flex-col",children:[e&&jsx(L,{size:o,tooltip:a,isRequired:n,children:e}),jsx(Y,{children:jsx("textarea",{...d,required:n,onFocus:m=>{d.onFocus&&d.onFocus(m),p(m);},onBlur:m=>{d.onBlur&&d.onBlur(m),g(m);},className:hn({isInvalid:i,isDisabled:d.disabled,isFocused:u,size:o,transparent:s,className:l})})}),t&&jsx(I,{size:o,className:"mt-3",children:t}),typeof r=="string"&&jsx(k,{size:o,className:"mt-1",children:r}),typeof r=="function"&&c&&jsx(k,{size:o,className:"mt-1",children:r(c)})]})})}function Cn({children:e,...t}){return jsx(ListBox,{...t,className:T(t.className,"border border-gray-300 outline-0 dark:border-zinc-600"),children:e})}function Nn({isEntering:e,isExiting:t,className:r=""}){let o=["bg-white","dark:bg-zinc-900/70","dark:backdrop-blur-2xl","dark:backdrop-saturate-200","forced-colors:bg-[Canvas]","shadow-2xl","rounded-sm","bg-clip-padding","border","border-gray-300","dark:border-white/[15%]","dark:text-zinc-300"].join(" "),a=e?["animate-in","fade-in","placement-bottom:slide-in-from-top-1","placement-top:slide-in-from-bottom-1","placement-left:slide-in-from-right-1","placement-right:slide-in-from-left-1","ease-out","duration-200"].join(" "):"",n=t?["animate-out","fade-out","placement-bottom:slide-out-to-top-1","placement-top:slide-out-to-bottom-1","placement-left:slide-out-to-right-1","placement-right:slide-out-to-left-1","ease-in","duration-150"].join(" "):"";return [o,a,n,r].filter(Boolean).join(" ")}function ie({children:e,showArrow:t,className:r,...o}){let n=useSlottedContext(PopoverContext)?.trigger==="SubmenuTrigger",s=t?12:8;return s=n?s-6:s,jsxs(Popover,{offset:s,...o,className:composeRenderProps(r,(i,l)=>Nn({...l,className:i})),children:[t&&jsx(OverlayArrow,{className:"group",children:jsx("svg",{width:12,height:12,viewBox:"0 0 12 12",className:"block fill-white stroke-black/10 stroke-1 group-placement-left:-rotate-90 group-placement-right:rotate-90 group-placement-bottom:rotate-180 dark:fill-[#1f1f21] dark:stroke-zinc-600 forced-colors:fill-[Canvas] forced-colors:stroke-[ButtonBorder]",children:jsx("path",{d:"M0 0 L6 6 L12 0"})})}),e]})}function Mn(e="md"){return `flex-1 text-start data-[placeholder]:text-text-placeholder ${P[e].text}`}function Vn(){let e=U.useCallback((r,o)=>{o?.(r);},[]),t=U.useCallback((r,o)=>{o?.(r);},[]);return {handleFocus:e,handleBlur:t}}function nt({label:e,description:t,errorMessage:r,children:o,items:a,size:n="md",selectedKey:s,defaultSelectedKey:i,onSelectionChange:l,placeholder:c,showErrors:d=false,tooltip:u,isRequired:p,transparent:g,...m}){let[f,h]=useState(null),b=s??f??i,{handleFocus:v,handleBlur:S}=Vn(),$=D=>{l?l(D):h(D);},y=useRef(null);return jsx(Select,{...m,selectedKey:b,defaultSelectedKey:i,onSelectionChange:$,placeholder:c,className:T(m.className,"group flex w-full flex-col"),ref:y,onOpenChange:D=>{D||y.current?.blur();},children:({isDisabled:D,isInvalid:ne,isOpen:R})=>jsxs("div",{className:"flex flex-col",children:[e&&jsx(L,{size:n,tooltip:u,isRequired:p,className:"mb-2",children:e}),jsx(Y,{children:jsxs(A,{variant:"unstyled",className:twMerge(q({isInvalid:ne||d&&!!r,isDisabled:D,isFocused:R,transparent:g,size:n}),"flex items-center text-start gap-4 cursor-pointer min-w-[200px] max-w-[400px]"),onFocus:N=>v(N,m.onFocus),onBlur:N=>S(N,m.onBlur),"data-open":R,children:[jsx(SelectValue,{className:Mn(n)}),jsx(x,{name:"CaretDown","aria-hidden":true,className:twMerge("h-4 w-4 text-text-body group-disabled:text-gray-200 forced-colors:text-[ButtonText] transition-transform",R&&"rotate-180")})]})}),t&&jsx(I,{size:n,className:"mt-3",children:t}),d&&jsx(k,{size:n,className:"mt-3 text-feedback-error-text",children:typeof r=="function"&&m.validationResult?r(m.validationResult):typeof r=="string"?r:null}),jsx(ie,{className:"min-w-[var(--trigger-width)] max-w-[400px] bg-background-input",children:jsx(ListBox,{items:a,className:"w-full max-h-inherit overflow-auto bg-background-input p-1 outline-0 [clip-path:inset(0_0_0_0_round_.75rem)]",children:o})})]})})}var Kn=e=>twMerge(_({isInvalid:e.isInvalid,isDisabled:e.isDisabled,isFocused:e.isFocused}),e.transparent?"bg-transparent":"bg-background-input","pr-9","[appearance:textfield] [&::-webkit-outer-spin-button]:appearance-none [&::-webkit-inner-spin-button]:appearance-none",e.className);function st({label:e,description:t,errorMessage:r,size:o,tooltip:a,isRequired:n,transparent:s,validationResult:i,...l}){let c=useId();return jsx(NumberField,{...l,id:c,isRequired:n,className:T(l.className,"group flex flex-col gap-1"),step:l.step??1,onChange:d=>{typeof d=="number"&&(l.maxValue!=null&&d>l.maxValue?l.onChange?.(l.maxValue):l.minValue!=null&&d<l.minValue?l.onChange?.(l.minValue):l.onChange?.(d));},isInvalid:!!r||typeof l.value=="number"&&(l.maxValue!=null&&l.value>l.maxValue||l.minValue!=null&&l.value<l.minValue),children:({isDisabled:d,isInvalid:u})=>jsxs("div",{className:"flex flex-col",children:[e&&jsx(L,{size:o,tooltip:a,isRequired:n,htmlFor:c,children:e}),jsx("div",{className:"relative",children:jsxs(Group,{className:"relative",children:[jsx(Input,{className:Kn({isInvalid:u||!!r,isDisabled:d,transparent:s,className:typeof l.className=="string"?l.className:void 0})}),jsxs("div",{className:"absolute inset-y-[1px] right-[1px] flex flex-col divide-y border-l overflow-hidden rounded-r-[calc(var(--control-border-radius)-1px)]",children:[jsx(Button,{slot:"increment",isDisabled:d,className:"flex h-1/2 w-7 items-center justify-center bg-background-input hover:bg-background-input-hover active:bg-background-input-active disabled:cursor-not-allowed disabled:opacity-50",children:jsx(x,{name:"CaretUp",size:14})}),jsx(Button,{slot:"decrement",isDisabled:d,className:"flex h-1/2 w-7 items-center justify-center bg-background-input hover:bg-background-input-hover active:bg-background-input-active disabled:cursor-not-allowed disabled:opacity-50",children:jsx(x,{name:"CaretDown",size:14})})]})]})}),t&&jsx(I,{size:o,className:"mt-3",children:t}),r&&jsx(k,{size:o,className:"mt-3",children:typeof r=="function"?r(i):r})]})})}var Qn=e=>twMerge("w-full",_({isInvalid:e.isInvalid,isDisabled:e.isDisabled,isFocused:e.isFocused}),Te({transparent:e.transparent,isDisabled:e.isDisabled}),P[e.size||"md"].text,P[e.size||"md"].height,P[e.size||"md"].padding,"flex items-center gap-0.5",e.className),Xn=({isPlaceholder:e,isDisabled:t,isFocused:r,size:o="md"})=>twMerge("outline-none rounded transition-colors box-content tabular-nums text-center",e?"text-text-muted italic":"text-text-body",t?"text-text-disabled cursor-not-allowed":"cursor-default",P[o].text,"px-0.5 -my-0.5",r&&"!outline-[1.5px] !outline-[var(--control-focus-ring-color)] ![--tw-outline-style:solid]",!t&&!r&&"hover:bg-text-body/[0.05]");function lt({label:e,description:t,errorMessage:r,size:o="md",tooltip:a,isRequired:n,transparent:s,validationResult:i,...l}){let{isFocused:c}=J(),[d,u]=useState(null),p=useRef(null);return useEffect(()=>{let g=h=>{let b=h.target;b.hasAttribute("data-type")&&u(b.getAttribute("data-type"));},m=()=>{u(null);},f=p.current;return f&&(f.addEventListener("focusin",g),f.addEventListener("focusout",m)),()=>{f&&(f.removeEventListener("focusin",g),f.removeEventListener("focusout",m));}},[]),jsx(TimeField,{...l,children:({isDisabled:g,isInvalid:m})=>jsxs(Fragment,{children:[e&&jsx(L,{isRequired:n,tooltip:a,children:e}),jsx(DateInput,{ref:p,className:Qn({size:o,transparent:s,isDisabled:g,isInvalid:m,isFocused:c}),children:f=>jsx(DateSegment,{segment:f,className:Xn({isPlaceholder:f.isPlaceholder,isDisabled:f.isEditable,isFocused:d===f.type,size:o})})}),t&&jsx(I,{children:t}),typeof r=="string"?jsx(k,{children:r}):null]})})}function dt({label:e,description:t,errorMessage:r,...o}){return jsxs(DateField,{...o,className:T(o.className,"flex flex-col gap-1"),children:[e&&jsx(L,{children:e}),jsx(le,{}),t&&jsx(I,{children:t}),typeof r=="string"?jsx(k,{children:r}):null]})}function ra({isPlaceholder:e,isDisabled:t,isFocused:r}){return ["inline p-0.5 type-literal:px-0 rounded outline outline-0 forced-color-adjust-none caret-transparent text-gray-800 dark:text-zinc-200 forced-colors:text-[ButtonText]",e&&"text-gray-600 dark:text-zinc-400 italic",t&&"text-gray-200 dark:text-zinc-600 forced-colors:text-[GrayText]",r&&"bg-blue-600 text-white dark:text-white forced-colors:bg-[Highlight] forced-colors:text-[HighlightText]"].filter(Boolean).join(" ")}function le(e){return jsx(DateInput,{className:t=>$e({...t,className:"block min-w-[150px] px-2 py-1.5 text-sm"}),...e,children:t=>jsx(DateSegment,{segment:t,className:ra({isPlaceholder:t.isPlaceholder,isDisabled:t.isEditable})})})}var aa="flex font-medium justify-center items-center gap-2 text-center transition whitespace-nowrap box-border",ct={default:{selected:"bg-text-body text-white hover:brightness-[var(--control-hover-opacity)] forced-colors:bg-[ButtonText] forced-colors:text-[ButtonFace] border-2 border-transparent",unselected:"bg-transparent text-text-body border-2 border-border-muted hover:bg-text-body/[0.05] forced-colors:border-[ButtonBorder] forced-colors:bg-[ButtonFace] forced-colors:text-[ButtonText]"},primary:{selected:"bg-action-primary text-white hover:brightness-[var(--control-hover-opacity)] forced-colors:bg-[ButtonText] forced-colors:text-[ButtonFace] border-2 border-transparent",unselected:"bg-transparent text-text-body border-2 border-border-muted hover:bg-text-body/[0.05] forced-colors:border-[ButtonBorder] forced-colors:bg-[ButtonFace] forced-colors:text-[ButtonText]"}},sa="opacity-[--control-hover-opacity] cursor-not-allowed pointer-events-none grayscale",ia="opacity-100 cursor-pointer",la={"top-right":"-right-2 -top-2","top-left":"-left-2 -top-2","bottom-right":"-right-2 -bottom-2","bottom-left":"-left-2 -bottom-2"},da={primary:"bg-action-primary text-white",destructive:"bg-action-destructive text-white"};function ca(e){let{variant:t="default",size:r="md",isDisabled:o,isSelected:a,borderRadius:n,borderRight:s,borderLeft:i}=e,l=`${aa} ${a?ct[t].selected:ct[t].unselected}`;return l+=` ${P[r].text} ${P[r].height} ${P[r].padding} ${P[r].gap}`,l+=` ${o?sa:ia}`,n==="left"&&(l+=" rounded-l-sm"),n==="right"&&(l+=" rounded-r-sm"),s&&(l+=" border-r"),i&&(l+=" border-l"),l+=` ${V()}`,twMerge(l)}function pt(e){let{className:t,children:r,onPress:o,icon:a,iconPosition:n="left",iconWeight:s,isLoading:i=false,loadingText:l,loadingIndicator:c,size:d="md",badgeNumber:u,badgeVariant:p="primary",badgePosition:g="top-right",...m}=e,f=a?jsx(x,{name:a,className:`icon-[--control-icon-size-${d}]`,weight:s}):null,h=()=>{let v=jsxs(Fragment,{children:[n==="left"&&f,r,n==="right"&&f]});return i?jsxs("div",{className:"relative inline-flex items-center justify-center",children:[jsx("div",{className:"absolute inset-0 flex items-center justify-center",children:c||jsx(x,{name:"CircleNotch",className:`animate-spin icon-[--control-icon-size-${d}]`,"aria-hidden":"true"})}),jsx("div",{className:"invisible","aria-hidden":"true",children:v}),l&&jsx("span",{className:"sr-only",role:"status","aria-live":"polite",children:l})]}):v},b=jsx(ToggleButton,{onPress:o,...m,className:twMerge(ca(e),t),"aria-busy":i,children:h()});return u&&u>0?jsxs("div",{className:"relative",children:[b,jsx("span",{className:`absolute ${la[g]} flex h-5 w-5 items-center justify-center rounded-full ${da[p]} text-xs`,"aria-label":`${u} items`,children:u})]}):b}var ba=({isEntering:e,isExiting:t,className:r})=>["max-w-[200px] group bg-slate-700 dark:bg-slate-600 border border-slate-800 dark:border-white/10 shadow-[inset_0_1px_0_0_theme(colors.gray.600)] dark:shadow-none text-white text-sm rounded-lg drop-shadow-lg will-change-transform px-3 py-1",e?"animate-in fade-in placement-bottom:slide-in-from-top-0.5 placement-top:slide-in-from-bottom-0.5 placement-left:slide-in-from-right-0.5 placement-right:slide-in-from-left-0.5 ease-out duration-200":"",t?"animate-out fade-out placement-bottom:slide-out-to-top-0.5 placement-top:slide-out-to-bottom-0.5 placement-left:slide-out-to-right-0.5 placement-right:slide-out-to-left-0.5 ease-in duration-150":"",r].filter(Boolean).join(" ");function Ie({children:e,content:t,...r}){return jsxs(TooltipTrigger,{delay:200,children:[e,jsxs(Tooltip,{...r,offset:10,className:composeRenderProps(r.className,(o,a)=>ba({...a,className:o})),children:[jsx(OverlayArrow,{children:jsx("svg",{width:8,height:8,viewBox:"0 0 8 8",className:"fill-slate-700 stroke-gray-800 group-placement-left:-rotate-90 group-placement-right:rotate-90 group-placement-bottom:rotate-180 dark:fill-slate-600 dark:stroke-white/10 forced-colors:fill-[Canvas] forced-colors:stroke-[ButtonBorder]",children:jsx("path",{d:"M0 0 L4 4 L8 0"})})}),t]})]})}var xa=({href:e,children:t,className:r="",external:o=false,title:a,variant:n="default",onClick:s,asButton:i=false,onPress:l})=>{let c=o?{target:"_blank",rel:"noopener noreferrer"}:{},p=`hover:underline hover:decoration-1 hover:underline-offset-4 cursor-pointer ${{default:"text-text-link-default hover:text-text-link-hover visited:text-text-link-default",primary:"text-action-primary hover:text-action-primary-hover visited:text-action-primary",muted:"text-text-muted hover:text-text-muted visited:text-text-muted"}[n]} ${r}`;return i?jsx("button",{type:"button",className:p,onClick:l,title:a,children:t}):jsx("a",{href:e||"#",className:p,...c,title:a,onClick:s,children:t})};var ya=({width:e,height:t,variant:r="rect",animation:o="pulse",gradient:a=false,flex:n=false,stack:s,responsive:i,delay:l=0,adjustAnimationSpeedBasedOnWidth:c=false,ariaLabel:d,className:u,"data-testid":p})=>{let[g,m]=useState(l===0);if(useEffect(()=>{if(l>0){let y=setTimeout(()=>m(true),l);return ()=>clearTimeout(y)}},[l]),!g)return null;let f=a?"bg-gradient-to-r from-[var(--skeleton-base)] via-[var(--skeleton-highlight)] to-[var(--skeleton-base)]":"bg-[var(--skeleton-base)]",h=c&&e?(()=>{let y=typeof e=="number"?e:parseFloat(String(e));return isNaN(y)?"":`animation-duration-[${Math.max(.8,y/100)}s]`})():"",b=o==="pulse"?`animate-pulse ${h}`:o==="wave"?`relative overflow-hidden before:absolute before:inset-0 before:bg-gradient-to-r before:from-transparent before:via-[var(--skeleton-wave)] before:to-transparent before:animate-wave ${h}`:"",v="rounded-sm";r==="circle"&&(v="rounded-full"),r==="text"&&(v="h-4 w-full rounded-sm");let S=n?"flex-1 min-w-0":"",$=i?Object.entries(i).map(([y,D])=>`${y}:w-[${D}]`).join(" "):"";return s?jsx("div",{className:"space-y-2","data-testid":p,children:s.map((y,D)=>jsx("div",{className:twMerge(f,b,v,S,$,u),style:{width:y,height:t}},D))}):jsx("div",{className:twMerge(f,b,v,S,$,u),style:{width:e,height:t},role:"presentation","aria-hidden":!d,"aria-label":d??void 0,"data-testid":p})};var bt=({className:e,showWordmark:t=true})=>{let r=e||"fill-[#333333]";return t?jsxs("svg",{width:"270",height:"80",viewBox:"0 0 270 80",xmlns:"http://www.w3.org/2000/svg",className:r,children:[jsxs("g",{clipPath:"url(#clip0_796_283)",children:[jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M0.223654 20.2934C0.417233 19.8234 0.873598 19.517 1.37984 19.517H20.5909C21.282 19.517 21.8422 20.0798 21.8422 20.774V40.049C21.8422 40.5572 21.5375 41.0155 21.0702 41.2102C20.6028 41.405 20.0647 41.2977 19.7067 40.9385L0.495628 21.6635C0.137428 21.3041 0.030075 20.7633 0.223654 20.2934ZM4.40349 22.0311L19.3396 37.017V22.0311H4.40349Z"}),jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M38.6458 20.2934C38.8394 19.8234 39.2958 19.517 39.802 19.517H59.013C59.7041 19.517 60.2642 20.0798 60.2642 20.774V40.049C60.2642 40.5572 59.9597 41.0155 59.4923 41.2102C59.025 41.405 58.4867 41.2977 58.1289 40.9385L38.9178 21.6635C38.5595 21.3041 38.4522 20.7633 38.6458 20.2934ZM42.8255 22.0311L57.7618 37.017V22.0311H42.8255Z"}),jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M19.4347 58.8447C19.6283 58.3747 20.0847 58.0685 20.5909 58.0685H39.802C40.493 58.0685 41.0532 58.6312 41.0532 59.3255V78.6005C41.0532 79.1087 40.7486 79.567 40.2813 79.7617C39.8139 79.9562 39.2757 79.849 38.9178 79.49L19.7067 60.215C19.3485 59.8555 19.2411 59.3147 19.4347 58.8447ZM23.6146 60.5825L38.5508 75.5682V60.5825H23.6146Z"}),jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M39.3227 58.1643C39.79 57.9695 40.3283 58.0768 40.6861 58.436L59.8972 77.711C60.2555 78.0703 60.3628 78.6113 60.1692 79.081C59.9756 79.551 59.5192 79.8575 59.013 79.8575H39.802C39.1109 79.8575 38.5508 79.2948 38.5508 78.6005V59.3255C38.5508 58.8173 38.8554 58.359 39.3227 58.1643ZM41.0532 62.3575V77.3433H55.9893L41.0532 62.3575Z"}),jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M39.3227 19.6129C39.79 19.4182 40.3283 19.5254 40.6861 19.8846L59.8972 39.1595C60.2555 39.519 60.3628 40.0598 60.1692 40.5298C59.9756 40.9995 59.5192 41.306 59.013 41.306H39.802C39.1109 41.306 38.5508 40.7433 38.5508 40.049V20.7741C38.5508 20.2658 38.8554 19.8075 39.3227 19.6129ZM41.0532 23.8061V38.792H55.9893L41.0532 23.8061Z"}),jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M39.3227 38.8885C39.79 38.694 40.3283 38.8012 40.6861 39.1602L59.8972 58.4352C60.2555 58.7945 60.3628 59.3355 60.1692 59.8055C59.9756 60.2752 59.5192 60.5817 59.013 60.5817H39.802C39.1109 60.5817 38.5508 60.019 38.5508 59.3247V40.0497C38.5508 39.5415 38.8554 39.0832 39.3227 38.8885ZM41.0532 43.0817V58.0675H55.9893L41.0532 43.0817Z"}),jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M38.6458 39.569C38.8394 39.0992 39.2958 38.7927 39.802 38.7927H59.013C59.7041 38.7927 60.2642 39.3555 60.2642 40.0497V59.3247C60.2642 59.833 59.9597 60.2912 59.4923 60.486C59.025 60.6805 58.4867 60.5732 58.1289 60.2142L38.9178 40.9392C38.5595 40.5797 38.4522 40.039 38.6458 39.569ZM42.8255 41.3067L57.7618 56.2927V41.3067H42.8255Z"}),jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M38.6458 58.8447C38.8394 58.3747 39.2958 58.0685 39.802 58.0685H59.013C59.7041 58.0685 60.2642 58.6312 60.2642 59.3255V78.6005C60.2642 79.1087 59.9597 79.567 59.4923 79.7617C59.025 79.9562 58.4867 79.849 58.1289 79.49L38.9178 60.215C38.5595 59.8555 38.4522 59.3147 38.6458 58.8447ZM42.8255 60.5825L57.7618 75.5682V60.5825H42.8255Z"}),jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M58.5338 19.6129C59.0011 19.4182 59.5394 19.5254 59.8972 19.8846L79.1083 39.1595C79.4666 39.519 79.5739 40.0598 79.3803 40.5298C79.1867 40.9995 78.7303 41.306 78.2241 41.306H59.013C58.322 41.306 57.7618 40.7433 57.7618 40.049V20.7741C57.7618 20.2658 58.0664 19.8075 58.5338 19.6129ZM60.2643 23.8061V38.792H75.2006L60.2643 23.8061Z"}),jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M58.5338 0.338803C59.0011 0.144135 59.5394 0.251385 59.8972 0.610565L79.1083 19.8855C79.4666 20.2449 79.5739 20.7857 79.3803 21.2556C79.1867 21.7256 78.7303 22.032 78.2241 22.032H59.013C58.322 22.032 57.7618 21.4692 57.7618 20.775V1.50003C57.7618 0.99174 58.0664 0.533468 58.5338 0.338803ZM60.2643 4.53208V19.5179H75.2006L60.2643 4.53208Z"}),jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M57.8569 20.2934C58.0505 19.8234 58.5069 19.517 59.013 19.517H78.2241C78.9151 19.517 79.4753 20.0798 79.4753 20.774V40.049C79.4753 40.5572 79.1707 41.0155 78.7034 41.2102C78.236 41.405 77.6978 41.2977 77.3399 40.9385L58.1289 21.6635C57.7705 21.3041 57.6633 20.7633 57.8569 20.2934ZM62.0365 22.0311L76.9729 37.017V22.0311H62.0365Z"}),jsx("path",{d:"M269.838 49.4457H249.005C249.266 51.801 250.162 53.6985 251.695 55.1377C253.225 56.577 255.134 57.2967 257.416 57.2967C259.307 57.2967 260.887 56.8715 262.159 56.021C263.463 55.1377 264.408 53.9927 264.996 52.5862H269.251C268.502 54.9415 267.084 56.937 264.996 58.5725C262.943 60.208 260.414 61.026 257.416 61.026C255.069 61.026 252.917 60.4697 250.961 59.3575C249.037 58.2127 247.504 56.6587 246.363 54.696C245.255 52.7332 244.7 50.558 244.7 48.17C244.7 45.782 245.255 43.6067 246.363 41.644C247.504 39.6812 249.037 38.1437 250.961 37.0315C252.917 35.8867 255.069 35.3142 257.416 35.3142C259.73 35.3142 261.833 35.8702 263.724 36.9825C265.615 38.0947 267.098 39.6485 268.176 41.644C269.283 43.6395 269.838 45.913 269.838 48.4645V49.4457ZM257.416 39.0432C255.263 39.0432 253.439 39.6812 251.939 40.957C250.47 42.2327 249.542 43.9337 249.152 46.06H265.583C265.192 43.9992 264.262 42.3145 262.796 41.006C261.36 39.6975 259.568 39.0432 257.416 39.0432Z"}),jsx("path",{d:"M228.356 60.5352V35.8049H232.219V39.7794H232.464C233.05 38.5689 233.963 37.5712 235.202 36.7862C236.474 35.9684 237.974 35.5594 239.701 35.5594H243.125V39.4359H239.701C237.517 39.4359 235.757 40.1554 234.42 41.5949C233.083 43.0342 232.414 44.9152 232.414 47.2377V60.5352H228.356Z"}),jsx("path",{d:"M208.607 61.0259C205.64 61.0259 203.326 60.1262 201.663 58.3272C200 56.4952 199.169 53.8947 199.169 50.5252V35.8047H203.228V49.8874C203.228 52.2427 203.766 54.0744 204.842 55.3829C205.95 56.6587 207.532 57.2967 209.586 57.2967C211.02 57.2967 212.308 56.9694 213.449 56.3152C214.623 55.6284 215.536 54.6959 216.188 53.5184C216.84 52.3407 217.166 50.9997 217.166 49.4949V35.8047H221.225V60.5352H217.313V56.5607H217.068C216.286 57.9019 215.161 58.9814 213.694 59.7992C212.226 60.6169 210.531 61.0259 208.607 61.0259Z"}),jsx("path",{d:"M186.736 39.534V56.806H194.756V60.5352H182.677V39.534H177.199V35.8047H182.677V29.5732H186.736V35.8047H193.24V39.534H186.736Z"}),jsx("path",{d:"M156.585 60.5352H151.988L158.394 48.0227L152.33 35.8047H156.976L162.062 46.0599H165.388L170.474 35.8047H175.022L168.958 48.0227L175.365 60.5352H170.67L165.29 49.7892H162.013L156.585 60.5352Z"}),jsx("path",{d:"M150.138 49.1315H129.304C129.565 51.4867 130.461 53.3842 131.994 54.8235C133.526 56.2627 135.433 56.9825 137.715 56.9825C139.606 56.9825 141.188 56.5572 142.459 55.7067C143.763 54.8235 144.709 53.6785 145.296 52.272H149.551C148.801 54.6272 147.382 56.6227 145.296 58.2582C143.242 59.8937 140.715 60.7118 137.715 60.7118C135.368 60.7118 133.216 60.1555 131.26 59.0432C129.336 57.8985 127.804 56.3445 126.663 54.3817C125.554 52.419 125 50.2437 125 47.8557C125 45.4677 125.554 43.2925 126.663 41.3298C127.804 39.367 129.336 37.8295 131.26 36.7173C133.216 35.5725 135.368 35 137.715 35C140.03 35 142.133 35.556 144.024 36.6682C145.915 37.7805 147.399 39.3342 148.475 41.3298C149.583 43.3252 150.138 45.5987 150.138 48.1502V49.1315ZM137.715 38.729C135.564 38.729 133.738 39.367 132.238 40.6427C130.771 41.9185 129.842 43.6195 129.45 45.7458H145.883C145.491 43.685 144.562 42.0002 143.095 40.6917C141.661 39.3832 139.867 38.729 137.715 38.729Z"}),jsx("path",{d:"M116.961 60.5353H112.559V30.4072H101.164V26.1875H128.307V30.4072H116.961V60.5353Z"})]}),jsx("defs",{children:jsx("clipPath",{id:"clip0_796_283",children:jsx("rect",{width:"270",height:"80",fill:"white"})})})]}):jsxs("svg",{width:"80",height:"80",viewBox:"0 0 80 80",xmlns:"http://www.w3.org/2000/svg",className:r,children:[jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M0.223654 20.2934C0.417233 19.8234 0.873598 19.517 1.37984 19.517H20.5909C21.282 19.517 21.8422 20.0798 21.8422 20.774V40.049C21.8422 40.5572 21.5375 41.0155 21.0702 41.2102C20.6028 41.405 20.0647 41.2977 19.7067 40.9385L0.495628 21.6635C0.137428 21.3041 0.030075 20.7633 0.223654 20.2934ZM4.40349 22.0311L19.3396 37.017V22.0311H4.40349Z"}),jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M38.6458 20.2934C38.8394 19.8234 39.2958 19.517 39.802 19.517H59.013C59.7041 19.517 60.2642 20.0798 60.2642 20.774V40.049C60.2642 40.5572 59.9597 41.0155 59.4923 41.2102C59.025 41.405 58.4867 41.2977 58.1289 40.9385L38.9178 21.6635C38.5595 21.3041 38.4522 20.7633 38.6458 20.2934ZM42.8255 22.0311L57.7618 37.017V22.0311H42.8255Z"}),jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M19.4347 58.8447C19.6283 58.3747 20.0847 58.0685 20.5909 58.0685H39.802C40.493 58.0685 41.0532 58.6312 41.0532 59.3255V78.6005C41.0532 79.1087 40.7486 79.567 40.2813 79.7617C39.8139 79.9562 39.2757 79.849 38.9178 79.49L19.7067 60.215C19.3485 59.8555 19.2411 59.3147 19.4347 58.8447ZM23.6146 60.5825L38.5508 75.5682V60.5825H23.6146Z"}),jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M39.3227 58.1643C39.79 57.9695 40.3283 58.0768 40.6861 58.436L59.8972 77.711C60.2555 78.0703 60.3628 78.6113 60.1692 79.081C59.9756 79.551 59.5192 79.8575 59.013 79.8575H39.802C39.1109 79.8575 38.5508 79.2948 38.5508 78.6005V59.3255C38.5508 58.8173 38.8554 58.359 39.3227 58.1643ZM41.0532 62.3575V77.3433H55.9893L41.0532 62.3575Z"}),jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M39.3227 19.6129C39.79 19.4182 40.3283 19.5254 40.6861 19.8846L59.8972 39.1595C60.2555 39.519 60.3628 40.0598 60.1692 40.5298C59.9756 40.9995 59.5192 41.306 59.013 41.306H39.802C39.1109 41.306 38.5508 40.7433 38.5508 40.049V20.7741C38.5508 20.2658 38.8554 19.8075 39.3227 19.6129ZM41.0532 23.8061V38.792H55.9893L41.0532 23.8061Z"}),jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M39.3227 38.8885C39.79 38.694 40.3283 38.8012 40.6861 39.1602L59.8972 58.4352C60.2555 58.7945 60.3628 59.3355 60.1692 59.8055C59.9756 60.2752 59.5192 60.5817 59.013 60.5817H39.802C39.1109 60.5817 38.5508 60.019 38.5508 59.3247V40.0497C38.5508 39.5415 38.8554 39.0832 39.3227 38.8885ZM41.0532 43.0817V58.0675H55.9893L41.0532 43.0817Z"}),jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M38.6458 39.569C38.8394 39.0992 39.2958 38.7927 39.802 38.7927H59.013C59.7041 38.7927 60.2642 39.3555 60.2642 40.0497V59.3247C60.2642 59.833 59.9597 60.2912 59.4923 60.486C59.025 60.6805 58.4867 60.5732 58.1289 60.2142L38.9178 40.9392C38.5595 40.5797 38.4522 40.039 38.6458 39.569ZM42.8255 41.3067L57.7618 56.2927V41.3067H42.8255Z"}),jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M38.6458 58.8447C38.8394 58.3747 39.2958 58.0685 39.802 58.0685H59.013C59.7041 58.0685 60.2642 58.6312 60.2642 59.3255V78.6005C60.2642 79.1087 59.9597 79.567 59.4923 79.7617C59.025 79.9562 58.4867 79.849 58.1289 79.49L38.9178 60.215C38.5595 59.8555 38.4522 59.3147 38.6458 58.8447ZM42.8255 60.5825L57.7618 75.5682V60.5825H42.8255Z"}),jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M58.5338 19.6129C59.0011 19.4182 59.5394 19.5254 59.8972 19.8846L79.1083 39.1595C79.4666 39.519 79.5739 40.0598 79.3803 40.5298C79.1867 40.9995 78.7303 41.306 78.2241 41.306H59.013C58.322 41.306 57.7618 40.7433 57.7618 40.049V20.7741C57.7618 20.2658 58.0664 19.8075 58.5338 19.6129ZM60.2643 23.8061V38.792H75.2006L60.2643 23.8061Z"}),jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M58.5338 0.338803C59.0011 0.144135 59.5394 0.251385 59.8972 0.610565L79.1083 19.8855C79.4666 20.2449 79.5739 20.7857 79.3803 21.2556C79.1867 21.7256 78.7303 22.032 78.2241 22.032H59.013C58.322 22.032 57.7618 21.4692 57.7618 20.775V1.50003C57.7618 0.99174 58.0664 0.533468 58.5338 0.338803ZM60.2643 4.53208V19.5179H75.2006L60.2643 4.53208Z"}),jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M57.8569 20.2934C58.0505 19.8234 58.5069 19.517 59.013 19.517H78.2241C78.9151 19.517 79.4753 20.0798 79.4753 20.774V40.049C79.4753 40.5572 79.1707 41.0155 78.7034 41.2102C78.236 41.405 77.6978 41.2977 77.3399 40.9385L58.1289 21.6635C57.7705 21.3041 57.6633 20.7633 57.8569 20.2934ZM62.0365 22.0311L76.9729 37.017V22.0311H62.0365Z"})]})};var ht=({className:e,size:t=24,color:r="text-action-primary"})=>jsx("div",{className:twMerge("inline-block animate-spin rounded-full border-2 border-solid border-current border-r-transparent",r,e),style:{width:t,height:t},role:"status","aria-label":"loading",children:jsx("span",{className:"sr-only",children:"Loading..."})});var Pa={xs:"text-lg font-semibold",sm:"text-xl font-semibold",md:"text-2xl font-semibold",lg:"text-3xl font-semibold",xl:"text-4xl font-semibold"},Ra={page:"h-16 leading-[62px]"};function vt({tag:e="h1",size:t="lg",height:r,className:o="",children:a}){let n=Pa[t],s=r?Ra[r]:"";return jsx(e,{className:twMerge(n,s,o),children:a})}function Na({value:e,children:t,className:r,size:o="sm"}){let[a,n]=useState(false),l=jsx(A,{variant:"icon",size:o,onPress:()=>{let c=e||(typeof t=="string"?t:"");navigator.clipboard.writeText(c),n(true),setTimeout(()=>{n(false);},2e3);},className:"!px-2",children:jsx(x,{name:"Copy",size:o==="sm"?14:16})});return jsxs("div",{className:twMerge("flex items-center gap-1",r),children:[t,a?jsx(Ie,{content:"Copied!",children:l}):l]})}function Fa({isSelected:e,isDisabled:t}){return ["flex h-4 w-7 px-px items-center shrink-0 cursor-default rounded-full transition duration-200 ease-in-out shadow-inner border border-transparent",V,e?"bg-gray-700 dark:bg-zinc-300 forced-colors:!bg-[Highlight] group-pressed:bg-gray-800 dark:group-pressed:bg-zinc-200":"bg-gray-400 dark:bg-zinc-400 group-pressed:bg-gray-500 dark:group-pressed:bg-zinc-300",t?"bg-gray-200 dark:bg-zinc-700 forced-colors:group-selected:!bg-[GrayText] forced-colors:border-[GrayText]":""].filter(Boolean).join(" ")}function Ia({isSelected:e,isDisabled:t}){return ["h-3 w-3 transform rounded-full bg-white dark:bg-zinc-900 outline outline-1 -outline-offset-1 outline-transparent shadow transition duration-200 ease-in-out",e?"translate-x-[100%]":"translate-x-0",t?"forced-colors:outline-[GrayText]":""].filter(Boolean).join(" ")}function yt({children:e,...t}){return jsx(Switch,{...t,className:T(t.className,"group flex items-center gap-2 text-sm text-gray-800 transition disabled:text-gray-300 dark:text-zinc-200 dark:disabled:text-zinc-600 forced-colors:disabled:text-[GrayText]"),children:r=>jsxs(Fragment,{children:[jsx("div",{className:Fa(r),children:jsx("span",{className:Ia(r)})}),e]})})}function St({label:e,rightLabel:t,progressWidth:r=64,hideLabels:o=false,...a}){return jsx(ProgressBar,{...a,className:T(a.className,"flex flex-col gap-1"),children:({percentage:n,valueText:s,isIndeterminate:i})=>jsxs(Fragment,{children:[!o&&jsxs("div",{className:"flex items-center justify-between gap-2",children:[jsx("span",{className:"text-sm text-text-heading",children:e}),jsx("span",{className:"text-sm text-text-heading",children:t||s})]}),jsx("div",{className:`relative h-2 w-${r} overflow-hidden rounded-full bg-background-muted outline outline-1 -outline-offset-1 outline-transparent`,children:jsx("div",{className:`absolute top-0 h-full rounded-full bg-blue-600 dark:bg-blue-500 forced-colors:bg-[Highlight] ${i?"left-full duration-1000 ease-out animate-in slide-out-to-right-full repeat-infinite [--tw-enter-translate-x:calc(-16rem-100%)]":"left-0"}`,style:{width:(i?40:n)+"%"}})})]})})}function ja({isSelected:e,isDisabled:t}){let r=[V,"w-9 h-9 text-base cursor-default rounded-full flex items-center justify-center forced-color-adjust-none"];return t?r.push("text-gray-300 dark:text-zinc-600 forced-colors:text-[GrayText]"):e?r.push("bg-blue-600 invalid:bg-red-600 text-white forced-colors:bg-[Highlight] forced-colors:invalid:bg-[Mark] forced-colors:text-[HighlightText]"):r.push("text-zinc-900 dark:text-zinc-200 hover:bg-gray-100 dark:hover:bg-zinc-700 pressed:bg-gray-200 dark:pressed:bg-zinc-600"),r.join(" ")}function Pt({errorMessage:e,...t}){return jsxs(Calendar,{...t,children:[jsx(fe,{}),jsxs(CalendarGrid,{children:[jsx(ge,{}),jsx(CalendarGridBody,{children:r=>jsx(CalendarCell,{date:r,className:({isSelected:o,isDisabled:a})=>ja({isSelected:o,isDisabled:a})})})]}),e&&jsx(Text,{slot:"errorMessage",className:"text-sm text-red-600",children:e})]})}function fe(){let{direction:e}=useLocale(),t=18;return jsxs("header",{className:"flex w-full items-center gap-1 px-1 pb-4",children:[jsx(A,{variant:"icon",slot:"previous",className:"pl-0",children:e==="rtl"?jsx(x,{name:"CaretRight","aria-hidden":true,size:t}):jsx(x,{name:"CaretLeft","aria-hidden":true,size:t})}),jsx(Heading,{className:"text-md mx-2 flex-1 text-center font-semibold text-zinc-900 dark:text-zinc-200"}),jsx(A,{variant:"icon",slot:"next",className:"pr-0",children:e==="rtl"?jsx(x,{name:"CaretLeft","aria-hidden":true,size:t}):jsx(x,{name:"CaretRight","aria-hidden":true,size:t})})]})}function ge(){return jsx(CalendarGridHeader,{children:e=>jsx(CalendarHeaderCell,{className:"text-xs font-semibold text-text-caption",children:e})})}function Ya({selectionState:e,isDisabled:t}){let r=`${V} w-full h-full flex items-center justify-center rounded-sm forced-color-adjust-none font-semibold`,o={none:"text-text-body group-hover:bg-gray-200 group-pressed:bg-gray-200",middle:["group-hover:bg-gray-300 forced-colors:group-hover:bg-[Highlight]","group-invalid:group-hover:bg-red-200 forced-colors:group-invalid:group-hover:bg-[Mark]","group-pressed:bg-blue-300 forced-colors:group-pressed:bg-[Highlight] forced-colors:text-[HighlightText]","group-invalid:group-pressed:bg-red-300 forced-colors:group-invalid:group-pressed:bg-[Mark]"].join(" "),cap:" group-invalid:bg-red-600 forced-colors:bg-[Highlight] forced-colors:group-invalid:bg-[Mark] text-white forced-colors:text-white !bg-neutral-black"},a=t?"text-textFaint dark:text-zinc-600 forced-colors:text-textFaint font-light":"";return [r,o[e],a].filter(Boolean).join(" ")}function be({errorMessage:e,...t}){return jsxs(RangeCalendar,{...t,children:[jsx(fe,{}),jsxs(CalendarGrid,{className:"w-full [&_td]:px-0",children:[jsx(ge,{}),jsx(CalendarGridBody,{children:r=>jsx(CalendarCell,{date:r,className:"selection-start:rounded-s-end selection-end:rounded-e-end [td:last-child_&]:rounded-e-end group h-9 w-9 cursor-default text-sm outline outline-0 outside-month:text-gray-300 selected:bg-background-selected invalid:selected:bg-red-100 forced-colors:selected:bg-[Highlight] forced-colors:selected:text-white forced-colors:invalid:selected:bg-[Mark] [td:first-child_&]:rounded-s-full",children:({formattedDate:o,isSelected:a,isSelectionStart:n,isSelectionEnd:s,isFocusVisible:i,isDisabled:l})=>jsx("span",{className:Ya({selectionState:a&&(n||s)?"cap":a?"middle":"none",isDisabled:l}),children:o})})})]}),e&&jsx(Text,{slot:"errorMessage",className:"text-sm text-red-600",children:e})]})}var xe={prefix:String(Math.round(Math.random()*1e10)),current:0},wt=U.createContext(xe),ts=U.createContext(false);var rs=!!(typeof window<"u"&&window.document&&window.document.createElement),He=new WeakMap;function os(e=false){let t=useContext(wt),r=useRef(null);if(r.current===null&&!e){var o,a;let n=(a=U.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED)===null||a===void 0||(o=a.ReactCurrentOwner)===null||o===void 0?void 0:o.current;if(n){let s=He.get(n);s==null?He.set(n,{id:t.current,state:n.memoizedState}):n.memoizedState!==s.state&&(t.current=s.id,He.delete(n));}r.current=++t.current;}return r.current}function ns(e){let t=useContext(wt);t===xe&&!rs&&console.warn("When server rendering, you must wrap your application in an <SSRProvider> to ensure consistent ids are generated between the client and server.");let r=os(!!e),o=t===xe&&process.env.NODE_ENV==="test"?"react-aria":`react-aria${t.prefix}`;return e||`${o}-${r}`}function as(e){let t=U.useId(),[r]=useState(he()),o=r||process.env.NODE_ENV==="test"?"react-aria":`react-aria${xe.prefix}`;return e||`${o}-${t}`}typeof U.useId=="function"?as:ns;function is(){return false}function ls(){return true}function ds(e){return ()=>{}}function he(){return typeof U.useSyncExternalStore=="function"?U.useSyncExternalStore(ds,is,ls):useContext(ts)}var cs=new Set(["Arab","Syrc","Samr","Mand","Thaa","Mend","Nkoo","Adlm","Rohg","Hebr"]),us=new Set(["ae","ar","arc","bcc","bqi","ckb","dv","fa","glk","he","ku","mzn","nqo","pnb","ps","sd","ug","ur","yi"]);function Tt(e){if(Intl.Locale){let r=new Intl.Locale(e).maximize(),o=typeof r.getTextInfo=="function"?r.getTextInfo():r.textInfo;if(o)return o.direction==="rtl";if(r.script)return cs.has(r.script)}let t=e.split("-")[0];return us.has(t)}var fs=Symbol.for("react-aria.i18n.locale");function Nt(){let e=typeof window<"u"&&window[fs]||typeof navigator<"u"&&(navigator.language||navigator.userLanguage)||"en-US";try{Intl.DateTimeFormat.supportedLocalesOf([e]);}catch{e="en-US";}return {locale:e,direction:Tt(e)?"rtl":"ltr"}}var Ee=Nt(),ce=new Set;function $t(){Ee=Nt();for(let e of ce)e(Ee);}function Lt(){let e=he(),[t,r]=useState(Ee);return useEffect(()=>(ce.size===0&&window.addEventListener("languagechange",$t),ce.add(r),()=>{ce.delete(r),ce.size===0&&window.removeEventListener("languagechange",$t);}),[]),e?{locale:"en-US",direction:"ltr"}:t}var xs=U.createContext(null);function Ge(){let e=Lt();return useContext(xs)||e}var Ke=new Map;function Oe(e){let{locale:t}=Ge(),r=t+(e?Object.entries(e).sort((a,n)=>a[0]<n[0]?-1:1).join():"");if(Ke.has(r))return Ke.get(r);let o=new Intl.Collator(t,e);return Ke.set(r,o),o}function ve(e){let t=Oe({usage:"search",...e}),r=useCallback((n,s)=>s.length===0?true:(n=n.normalize("NFC"),s=s.normalize("NFC"),t.compare(n.slice(0,s.length),s)===0),[t]),o=useCallback((n,s)=>s.length===0?true:(n=n.normalize("NFC"),s=s.normalize("NFC"),t.compare(n.slice(-s.length),s)===0),[t]),a=useCallback((n,s)=>{if(s.length===0)return true;n=n.normalize("NFC"),s=s.normalize("NFC");let i=0,l=s.length;for(;i+l<=n.length;i++){let c=n.slice(i,i+l);if(t.compare(s,c)===0)return true}return false},[t]);return useMemo(()=>({startsWith:r,endsWith:o,contains:a}),[r,o,a])}function Ft(e,t){let{cursor:r,getKey:o}=e;return {setSelectedKeys(a){t(n=>({...n,selectedKeys:a}));},setFilterText(a){t(n=>({...n,filterText:a}));},insert(a,...n){t(s=>ue(s,a,...n));},insertBefore(a,...n){t(s=>{let i=s.items.findIndex(l=>o?.(l)===a);if(i===-1)if(s.items.length===0)i=0;else return s;return ue(s,i,...n)});},insertAfter(a,...n){t(s=>{let i=s.items.findIndex(l=>o?.(l)===a);if(i===-1)if(s.items.length===0)i=0;else return s;return ue(s,i+1,...n)});},prepend(...a){t(n=>ue(n,0,...a));},append(...a){t(n=>ue(n,n.items.length,...a));},remove(...a){t(n=>{let s=new Set(a),i=n.items.filter(c=>!s.has(o(c))),l="all";if(n.selectedKeys!=="all"){l=new Set(n.selectedKeys);for(let c of a)l.delete(c);}return r==null&&i.length===0&&(l=new Set),{...n,items:i,selectedKeys:l}});},removeSelectedItems(){t(a=>{if(a.selectedKeys==="all")return {...a,items:[],selectedKeys:new Set};let n=a.selectedKeys,s=a.items.filter(i=>!n.has(o(i)));return {...a,items:s,selectedKeys:new Set}});},move(a,n){t(s=>{let i=s.items.findIndex(d=>o(d)===a);if(i===-1)return s;let l=s.items.slice(),[c]=l.splice(i,1);return l.splice(n,0,c),{...s,items:l}});},moveBefore(a,n){t(s=>{let i=s.items.findIndex(d=>o(d)===a);if(i===-1)return s;let c=(Array.isArray(n)?n:[...n]).map(d=>s.items.findIndex(u=>o(u)===d)).sort((d,u)=>d-u);return kt(s,c,i)});},moveAfter(a,n){t(s=>{let i=s.items.findIndex(d=>o(d)===a);if(i===-1)return s;let c=(Array.isArray(n)?n:[...n]).map(d=>s.items.findIndex(u=>o(u)===d)).sort((d,u)=>d-u);return kt(s,c,i+1)});},update(a,n){t(s=>{let i=s.items.findIndex(l=>o(l)===a);return i===-1?s:{...s,items:[...s.items.slice(0,i),n,...s.items.slice(i+1)]}});}}}function ue(e,t,...r){return {...e,items:[...e.items.slice(0,t),...r,...e.items.slice(t)]}}function kt(e,t,r){r-=t.filter(n=>n<r).length;let o=t.map(n=>({from:n,to:r++}));for(let n=0;n<o.length;n++){let s=o[n].from;for(let i=n;i<o.length;i++)o[i].from>s&&o[i].from--;}for(let n=0;n<o.length;n++){let s=o[n];for(let i=o.length-1;i>n;i--){let l=o[i];l.from<s.to?s.to++:l.from++;}}let a=e.items.slice();for(let n of o){let[s]=a.splice(n.from,1);a.splice(n.to,0,s);}return {...e,items:a}}function Ss(e,t){let r;switch(e.state){case "idle":case "error":switch(t.type){case "loading":case "loadingMore":case "sorting":case "filtering":var o,a;return {...e,filterText:(o=t.filterText)!==null&&o!==void 0?o:e.filterText,state:t.type,items:t.type==="loading"?[]:e.items,sortDescriptor:(a=t.sortDescriptor)!==null&&a!==void 0?a:e.sortDescriptor,abortController:t.abortController};case "update":var n;return {...e,...(n=t.updater)===null||n===void 0?void 0:n.call(t,e)};case "success":case "error":return e;default:throw new Error(`Invalid action "${t.type}" in state "${e.state}"`)}case "loading":case "sorting":case "filtering":switch(t.type){case "success":if(t.abortController!==e.abortController)return e;var s;r=(s=t.selectedKeys)!==null&&s!==void 0?s:e.selectedKeys;var i,l,c;return {...e,filterText:(i=t.filterText)!==null&&i!==void 0?i:e.filterText,state:"idle",items:[...(l=t.items)!==null&&l!==void 0?l:[]],selectedKeys:r==="all"?"all":new Set(r),sortDescriptor:(c=t.sortDescriptor)!==null&&c!==void 0?c:e.sortDescriptor,abortController:void 0,cursor:t.cursor};case "error":return t.abortController!==e.abortController?e:{...e,state:"error",error:t.error,abortController:void 0};case "loading":case "loadingMore":case "sorting":case "filtering":var d;(d=e.abortController)===null||d===void 0||d.abort();var u;return {...e,filterText:(u=t.filterText)!==null&&u!==void 0?u:e.filterText,state:t.type,items:t.type==="loading"?[]:e.items,abortController:t.abortController};case "update":var p;return {...e,...(p=t.updater)===null||p===void 0?void 0:p.call(t,e)};default:throw new Error(`Invalid action "${t.type}" in state "${e.state}"`)}case "loadingMore":switch(t.type){case "success":var g;r=e.selectedKeys==="all"||t.selectedKeys==="all"?"all":new Set([...e.selectedKeys,...(g=t.selectedKeys)!==null&&g!==void 0?g:[]]);var m,f;return {...e,state:"idle",items:[...e.items,...(m=t.items)!==null&&m!==void 0?m:[]],selectedKeys:r,sortDescriptor:(f=t.sortDescriptor)!==null&&f!==void 0?f:e.sortDescriptor,abortController:void 0,cursor:t.cursor};case "error":return t.abortController!==e.abortController?e:{...e,state:"error",error:t.error};case "loading":case "sorting":case "filtering":var h;(h=e.abortController)===null||h===void 0||h.abort();var b;return {...e,filterText:(b=t.filterText)!==null&&b!==void 0?b:e.filterText,state:t.type,items:t.type==="loading"?[]:e.items,abortController:t.abortController};case "loadingMore":var v;return (v=t.abortController)===null||v===void 0||v.abort(),e;case "update":var S;return {...e,...(S=t.updater)===null||S===void 0?void 0:S.call(t,e)};default:throw new Error(`Invalid action "${t.type}" in state "${e.state}"`)}default:throw new Error(`Invalid state "${e.state}"`)}}function ye(e){let{load:t,sort:r,initialSelectedKeys:o,initialSortDescriptor:a,getKey:n=u=>u.id||u.key,initialFilterText:s=""}=e,[i,l]=useReducer(Ss,{state:"idle",error:void 0,items:[],selectedKeys:o==="all"?"all":new Set(o),sortDescriptor:a,filterText:s}),c=async(u,p)=>{let g=new AbortController;try{l({...u,abortController:g});var m;let b=(m=u.filterText)!==null&&m!==void 0?m:i.filterText;var f;let v=await p({items:i.items.slice(),selectedKeys:i.selectedKeys,sortDescriptor:(f=u.sortDescriptor)!==null&&f!==void 0?f:i.sortDescriptor,signal:g.signal,cursor:u.type==="loadingMore"?i.cursor:void 0,filterText:b});var h;let S=(h=v.filterText)!==null&&h!==void 0?h:b;l({type:"success",...v,abortController:g}),S&&S!==b&&!g.signal.aborted&&c({type:"filtering",filterText:S},t);}catch(b){l({type:"error",error:b,abortController:g});}},d=useRef(false);return useEffect(()=>{d.current||(c({type:"loading"},t),d.current=true);},[]),{items:i.items,selectedKeys:i.selectedKeys,sortDescriptor:i.sortDescriptor,isLoading:i.state==="loading"||i.state==="loadingMore"||i.state==="sorting"||i.state==="filtering",loadingState:i.state,error:i.error,filterText:i.filterText,getItem(u){return i.items.find(p=>n(p)===u)},reload(){c({type:"loading"},t);},loadMore(){i.state==="loadingMore"||i.state==="filtering"||i.cursor==null||c({type:"loadingMore"},t);},sort(u){c({type:"sorting",sortDescriptor:u},r||t);},...Ft({...e,getKey:n,cursor:i.cursor},u=>{l({type:"update",updater:u});}),setFilterText(u){c({type:"filtering",filterText:u},t);}}}var It={sm:"min-h-[theme(controlElementSize.sm)] max-h-[theme(controlElementSize.sm)] text-controlElementSm",md:"min-h-[theme(controlElementSize.md)] max-h-[theme(controlElementSize.md)] text-controlElementMd",lg:"min-h-[theme(controlElementSize.lg)] max-h-[theme(controlElementSize.lg)] text-controlElementLg",xl:"min-h-[theme(controlElementSize.xl)] max-h-[theme(controlElementSize.xl)] text-controlElementXl"},$s={sm:"text-controlElementSm",md:"text-controlElementMd",lg:"text-controlElementLg",xl:"text-controlElementXl"},Bt={sm:"h-4 w-4",md:"h-5 w-5",lg:"h-6 w-6",xl:"h-7 w-7"};function Ns(e){let t=["flex w-full cursor-pointer items-center rounded-sm transition outline outline-2"],r=e.size?It[e.size]:It.md,o=e.isDisabled?"opacity-50 cursor-not-allowed outline-border-input forced-colors:outline-[GrayText]":e.isInvalid?"outline-feedback-error-border group-invalid:outline-feedback-error-border forced-colors:group-invalid:outline-[Mark]":e.isOpen||e.isFocused?"outline-border-focus dark:outline-zinc-300 forced-colors:outline-[Highlight]":"outline-border-input";return [...t,r,o].filter(Boolean).join(" ")}function Ls(e,t=300){let[r,o]=useState(e);return useEffect(()=>{let a=setTimeout(()=>{o(e);},t);return ()=>{clearTimeout(a);}},[e,t]),r}async function ks(e,t,r){try{let o=e.url.replace("{q}",t),a=new URLSearchParams;e.extraParams&&Object.entries(e.extraParams).forEach(([l,c])=>{a.append(l,c.toString());});let n=`${o}${a.toString()?"?"+a.toString():""}`,s=await fetch(n,{method:"GET",headers:e.headers,signal:r});if(!s.ok)throw new Error(`HTTP error! status: ${s.status}`);let i=await s.json();return {items:e.transformResponse(i)}}catch(o){return {items:[],error:o instanceof Error?o.message:"Unknown error occurred"}}}async function Fs(e,t,r){try{let o=e.graphqlQuery.replace(`$${e.variableKey||"filter"}`,`"${t}"`),a=await fetch(e.url,{method:"POST",headers:{"Content-Type":"application/json",...e.headers},body:JSON.stringify({query:o}),signal:r});if(!a.ok)throw new Error(`HTTP error! status: ${a.status}`);let n=await a.json();if(n.errors)throw new Error(n.errors[0]?.message||"GraphQL error occurred");return e.responsePath&&(n=e.responsePath.split(".").reduce((s,i)=>s?.[i],n)),{items:e.transformResponse(n)}}catch(o){return {items:[],error:o instanceof Error?o.message:"Unknown error occurred"}}}function je({label:e,staticItems:t=[],sections:r,selectedKey:o,defaultSelectedKey:a,onSelectionChange:n,requestConfig:s,defaultFilter:i,errorMessage:l,size:c="md",tooltip:d,isRequired:u,isDisabled:p,renderLeftIcon:g,autoFocus:m=false,onLoadError:f}){let[h,b]=useState(""),[v,S]=useState(false),$=Ls(h),{contains:y}=ve({sensitivity:"base"}),[D,ne]=useState(),[R,N]=useState(false),F=$s[c],w=null;useEffect(()=>{m&&S(true);},[m]),useEffect(()=>{w&&w.setFilterText($);},[$,w]),s&&(w=ye({async load({signal:M,filterText:Pe=""}){if(!s.url||s.shouldLoad&&!s.shouldLoad(Pe))return {items:[]};N(true);try{let X;return s.requestType==="GraphQL"?X=await Fs(s,Pe,M):X=await ks(s,Pe,M),ne(X.error),N(!1),{items:X.items}}catch(X){return me(X),{items:[]}}},initialFilterText:""})),$===""&&(w=null);let me=async M=>{f?.(M),N(false);};return jsx(ComboBox,{onSelectionChange:n,selectedKey:o||void 0,defaultSelectedKey:a||void 0,defaultItems:r?r.flatMap(M=>M.items):t,items:w?w.items:void 0,className:T("group flex flex-col","w-full"),menuTrigger:"focus",isDisabled:p,isInvalid:!!l,inputValue:h,onInputChange:M=>{b(M);},autoFocus:m,defaultFilter:i||y,children:M=>jsxs(Fragment,{children:[e&&jsx(L,{size:c,tooltip:d,isRequired:u,children:e}),jsxs(Group,{className:Ns({isInvalid:!!l,isDisabled:p,size:c,isOpen:M.isOpen,isFocused:v}),style:{position:"relative"},children:[g?jsx("div",{className:"absolute left-3",children:g(R)}):jsx(x,{name:R?"CircleNotch":"MagnifyingGlass",className:`${Bt[c]} absolute left-3 text-inherit ${R?"animate-spin":""}`}),jsx(Input,{className:`h-full w-full rounded-sm bg-transparent pl-10 pr-3 outline-none ${F}`,onFocus:()=>S(true),onBlur:()=>S(false)}),jsx(Button,{className:"absolute right-3",children:jsx(x,{name:M.isOpen?"CaretUp":"CaretDown",className:`${Bt[c]} text-inherit`})})]})]})})}function Bs(e){return typeof e=="object"&&e!==null&&"features"in e&&Array.isArray(e.features)&&"type"in e&&typeof e.type=="string"}var Ds=process.env.NEXT_PUBLIC_MAPBOX_ACCESS_TOKEN||"";function At({label:e="Search for a place",selectedKey:t,defaultSelectedKey:r,onSelectionChange:o,placeholder:a="Enter a location...",errorMessage:n,description:s,size:i="md",tooltip:l,isRequired:c,isDisabled:d,showErrors:u=true,autoFocus:p=false,onSelect:g,searchTypes:m=["place","address"],defaultFilter:f,validationResult:h,countryRestrictions:b,proximity:v="ip"}){let S=useRef(new WeakMap),$=useRef([]),y={requestType:"REST",method:"GET",url:"https://api.mapbox.com/geocoding/v5/mapbox.places/{q}.json",extraParams:{access_token:Ds,types:m.join(","),limit:"5",...b?.length?{country:b.join(",").toLowerCase()}:{},...v?{proximity:v==="ip"?"ip":v.join(",")}:{}},shouldLoad:R=>R.length>0,transformResponse:R=>{if(!Bs(R))return [];let N=R.features.map(F=>{let w={id:F.id,name:F.place_name};return S.current.set(w,{type:F.place_type[0],center:F.center}),w});return N.length>0&&($.current=N),N}},D=R=>{let N=S.current.get(R),F=R.name.split(", "),w=F[0],me=F.slice(1).join(", ");return jsxs("div",{className:"flex items-center gap-3 py-0.5",children:[jsx(x,{name:N?.type==="address"?"MapPin":N?.type==="place"?"Buildings":N?.type==="region"?"MapPinArea":N?.type==="country"?"Flag":"Circle",className:"h-5 w-5 flex-shrink-0 text-text-muted"}),jsxs("div",{className:"flex min-w-0 flex-col",children:[jsx("span",{className:"truncate font-medium text-text-body",children:w}),me&&jsx("span",{className:"truncate text-sm text-text-muted",children:me})]})]})},ne=R=>R?jsx(x,{name:"CircleNotch",className:"h-4 w-4 animate-spin text-text-muted"}):jsx(x,{name:"MagnifyingGlass",className:"h-4 w-4 text-text-muted"});return jsx(je,{"data-testid":"autocomplete","data-config":JSON.stringify({types:m.join(","),country:b?.join(",").toLowerCase(),proximity:v==="ip"?"ip":v?.join(",")}),label:e,selectedKey:t,defaultSelectedKey:r,onSelectionChange:R=>{if(o?.(R),R){let F=$.current.find(w=>w.id===R);if(F){let w=S.current.get(F);w&&g({id:F.id,place_name:F.name,place_type:[w.type],center:w.center});}}},requestConfig:y,placeholder:a,errorMessage:n,description:s,size:i,tooltip:l,isRequired:c,isDisabled:d,showErrors:u,autoFocus:p,renderItem:D,renderLeftIcon:ne,defaultFilter:f,validationResult:h})}var As={sm:"py-1",md:"py-2",lg:"py-3",xl:"py-4"},Hs={sm:"text-controlElementSm",md:"text-controlElementMd",lg:"text-controlElementLg",xl:"text-controlElementXl"};function Ht({size:e="md",className:t,...r}){return jsx(ListBoxItem,{...r,className:twMerge("flex cursor-default items-center gap-2 rounded-sm px-3 text-text-body outline-none data-[focused]:bg-background-hover data-[selected]:bg-background-hover",As[e],Hs[e],t)})}function zt(e){return jsx(Form,{...e,className:twMerge("flex flex-col gap-4",e.className)})}function Ce(e){return jsx(Dialog,{...e,className:twMerge("relative h-auto max-h-[inherit] overflow-auto outline outline-0 [[data-placement]>&]:p-4",e.className),role:"dialog"})}function Gt({label:e,description:t,errorMessage:r,...o}){return jsxs(DateRangePicker,{...o,className:T(o.className,"group flex flex-col gap-1"),children:[e&&jsx(L,{children:e}),jsxs(Je,{className:"w-auto min-w-[208px]",children:[jsx(le,{slot:"start",className:"px-2 py-1.5 text-sm"}),jsx("span",{"aria-hidden":"true",className:"text-gray-800 group-disabled:text-gray-200 dark:text-zinc-200 group-disabled:dark:text-zinc-600 forced-colors:text-[ButtonText] group-disabled:forced-colors:text-[GrayText]",children:"\u2013"}),jsx(le,{slot:"end",className:"flex-1 px-2 py-1.5 text-sm"}),jsx(A,{variant:"icon",className:"mr-1 w-6 rounded outline-offset-0",children:jsx(CalendarIcon,{"aria-hidden":true,className:"h-4 w-4"})})]}),t&&jsx(I,{children:t}),typeof r=="string"?jsx(k,{children:r}):null,jsx(ie,{children:jsx(Ce,{children:jsx(be,{})})})]})}function Ys({isDisabled:e}){return `flex gap-2 items-center group text-sm transition ${e?"text-text-disabled":"text-text-caption"}`}function _s({isSelected:e,isInvalid:t,isDisabled:r,isIndeterminate:o}){let a="w-5 h-5 flex-shrink-0 rounded flex items-center justify-center border-2 transition ring-offset-2 focus:ring-2 focus:ring-border-focus",n="";return r?n="border-border-muted bg-background-muted":t?n="border-feedback-error-border bg-feedback-error-background":e||o?n="bg-action-primary border-action-primary hover:bg-action-primary-hover hover:border-action-primary-hover":n="bg-background-input border-border-input hover:border-border-focus",`${a} ${n}`}var Kt="w-4 h-4 text-text-onPrimary group-disabled:text-text-disabled";function ei(e){let{children:t,...r}=e;return jsx(Checkbox,{...r,className:composeRenderProps(e.className,(o,a)=>`${Ys(a)} ${o||""}`),children:o=>{let{isSelected:a,isIndeterminate:n,...s}=o,i=jsx("div",{className:_s({isSelected:a,isIndeterminate:n,...s}),children:n?jsx(Minus,{"aria-hidden":true,className:Kt}):a?jsx(Check$1,{"aria-hidden":true,className:Kt}):null});return jsxs(Fragment,{children:[i,typeof t=="function"?t(o):t]})}})}
|
|
2
|
-
export{je as Autocomplete,A as Button,
|
|
1
|
+
import {Link,Button,TextField,ListBox,useSlottedContext,PopoverContext,Popover,composeRenderProps,OverlayArrow,Select,SelectValue,NumberField,Group,Input,TimeField,DateInput,DateSegment,DateField,ToggleButton,TooltipTrigger,Tooltip,Switch,ProgressBar,Calendar,CalendarGrid,CalendarGridBody,CalendarCell,Text,useLocale,Heading,CalendarGridHeader,CalendarHeaderCell,RangeCalendar,ComboBox,ListBoxItem,Form,Dialog,DateRangePicker,Checkbox}from'react-aria-components';import U,{memo,useState,useContext,useRef,useId,useEffect,useCallback,useMemo,useReducer}from'react';import {WaveSine,X,Wind,WebhooksLogo,WarningCircle,Warning,UsersFour,Users,UserPlus,UserCircle,User,TreeEvergreen,Trash,ThermometerSimple,ThermometerHot,ThermometerCold,Terminal,Sun,Stack,SquaresFour,Square,SolarPanel,Snowflake,SlidersHorizontal,Sliders,SlackLogo,SignOut,ShieldCheck,ShareNetwork,Rocket,Repeat,Question,Power,Plus,PlugsConnected,Plugs,PencilSimple,PaperclipHorizontal,PaperPlaneTilt,PaperPlaneRight,Moon,MaskHappy,MapPinArea,MapPin,MagnifyingGlass,Lock,ListNumbers,ListBullets,List,LightningSlash,Lightning,IntersectSquare,Info,HandPointing,GearSix,Gauge,Flag,FireSimple,Export,EyeSlash,EyeClosed,Eye,EnvelopeSimple,DownloadSimple,DotsThree,DotsSix,Database,Cursor,Copy,Columns,Code,CloudSun,CloudSnow,CloudRain,CloudLightning,CloudFog,CloudArrowDown,Cloud,ClockCountdown,ClipboardText,CircleNotch,CircleDashed,Circle,CheckSquare,CheckCircle,Check,ChartLineUp,ChartLine,ChartBar,ChargingStation,CarSimple,CaretUp,CaretRight,CaretLeft,CaretDown,CalendarBlank,Buildings,BracketsCurly,BookmarkSimple,BookOpen,BatteryWarning,BatteryMedium,BatteryLow,BatteryHigh,BatteryFull,BatteryEmpty,BatteryCharging,ArrowsClockwise,ArrowUp,ArrowSquareOut,ArrowRight,ArrowLineLeft,ArrowLeft,ArrowDown,ArrowCircleUp,AppWindow}from'@phosphor-icons/react';import {twMerge}from'tailwind-merge';import {jsx,jsxs,Fragment}from'react/jsx-runtime';import'luxon';import {CalendarIcon,Minus,Check as Check$1}from'lucide-react';var tn=()=>jsx("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"}),rn=()=>jsx("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"}),We={AppWindow:AppWindow,ArrowCircleUp:ArrowCircleUp,ArrowDown:ArrowDown,ArrowLeft:ArrowLeft,ArrowLineLeft:ArrowLineLeft,ArrowRight:ArrowRight,ArrowSquareOut:ArrowSquareOut,ArrowUp:ArrowUp,ArrowsClockwise:ArrowsClockwise,BatteryCharging:BatteryCharging,BatteryEmpty:BatteryEmpty,BatteryFull:BatteryFull,BatteryHigh:BatteryHigh,BatteryLow:BatteryLow,BatteryMedium:BatteryMedium,BatteryWarning:BatteryWarning,BookOpen:BookOpen,BookmarkSimple:BookmarkSimple,BracketsCurly:BracketsCurly,Buildings:Buildings,CalendarBlank:CalendarBlank,CaretDown:CaretDown,CaretLeft:CaretLeft,CaretRight:CaretRight,CaretUp:CaretUp,CarSimple:CarSimple,ChargingStation:ChargingStation,ChartBar:ChartBar,ChartLine:ChartLine,ChartLineUp:ChartLineUp,Check:Check,CheckCircle:CheckCircle,CheckSquare:CheckSquare,Circle:Circle,CircleDashed:CircleDashed,CircleNotch:CircleNotch,ClipboardText:ClipboardText,ClockCountdown:ClockCountdown,Cloud:Cloud,CloudArrowDown:CloudArrowDown,CloudFog:CloudFog,CloudLightning:CloudLightning,CloudRain:CloudRain,CloudSnow:CloudSnow,CloudSun:CloudSun,Code:Code,Columns:Columns,Copy:Copy,Cursor:Cursor,Database:Database,DotsSix:DotsSix,DotsThree:DotsThree,DownloadSimple:DownloadSimple,EnvelopeSimple:EnvelopeSimple,Eye:Eye,EyeClosed:EyeClosed,EyeSlash:EyeSlash,Export:Export,FireSimple:FireSimple,Flag:Flag,Gauge:Gauge,GearSix:GearSix,HandPointing:HandPointing,Info:Info,IntersectSquare:IntersectSquare,Lightning:Lightning,LightningSlash:LightningSlash,List:List,ListBullets:ListBullets,ListNumbers:ListNumbers,Lock:Lock,MagnifyingGlass:MagnifyingGlass,MapPin:MapPin,MapPinArea:MapPinArea,MaskHappy:MaskHappy,Moon:Moon,PaperPlaneRight:PaperPlaneRight,PaperPlaneTilt:PaperPlaneTilt,PaperclipHorizontal:PaperclipHorizontal,PencilSimple:PencilSimple,Plugs:Plugs,PlugsConnected:PlugsConnected,Plus:Plus,Power:Power,Question:Question,Repeat:Repeat,Rocket:Rocket,ShareNetwork:ShareNetwork,ShieldCheck:ShieldCheck,SignOut:SignOut,SlackLogo:SlackLogo,Sliders:Sliders,SlidersHorizontal:SlidersHorizontal,Snowflake:Snowflake,SolarPanel:SolarPanel,Square:Square,SquaresFour:SquaresFour,Stack:Stack,Sun:Sun,Terminal:Terminal,ThermometerCold:ThermometerCold,ThermometerHot:ThermometerHot,ThermometerSimple:ThermometerSimple,Trash:Trash,TreeEvergreen:TreeEvergreen,User:User,UserCircle:UserCircle,UserPlus:UserPlus,Users:Users,UsersFour:UsersFour,Warning:Warning,WarningCircle:WarningCircle,WebhooksLogo:WebhooksLogo,Wind:Wind,X:X,TextureMenuLight:tn,TextureMenuDark:rn,WaveSine:WaveSine},x=memo(({name:e,size:t=24,color:r,weight:o="regular",className:a,title:n,ariaLabel:s,grow:i,variant:l="default",rounded:c=false,bgColor:d,...u})=>{if(!e)return null;let m=We[e];if(!m)return process.env.NODE_ENV==="development"&&console.error(`Icon with name "${e}" does not exist.`),null;let f=e==="TextureMenuLight"||e==="TextureMenuDark",p=s||n||`${e} icon`,g=l==="container"?"bg-[#F3F4F6":l==="brand"?"bg-gray-light":"",h=twMerge("inline-flex items-center justify-center w-12 h-12 p-3 rounded-xl bg-brand-light",d,c?"rounded-md":"",i?"w-full h-full":"",a),b=["inline-flex items-center justify-center",d||g,c?"rounded-md":"",i?"w-full h-full":`w-[${t}px] h-[${t}px]`].filter(Boolean).join(" "),y=jsx(m,{size:i?void 0:t,color:l==="brand"&&!f?void 0:r,className:l==="brand"&&!f?"text-brand-dark w-6 h-6":a||"",weight:o,"aria-label":p,"data-testid":`${e}-icon`,...u});return l==="brand"?jsx("div",{className:h,children:y}):l==="default"?y:jsx("div",{className:b,children:y})});x.displayName="Icon";function V(e=false){return `${e?"outline outline-1 outline-border-input focus:outline-2 focus:outline-border-focus focus:outline-offset-0 invalid:outline-2 invalid:outline-feedback-error-border group-invalid:outline-2 group-invalid:outline-feedback-error-border forced-colors:focus:outline-[Highlight] forced-colors:focus:outline-2 forced-colors:focus:outline-offset-2":"outline-none focus-visible:outline focus-visible:outline-2 focus-visible:outline-border-focus focus-visible:outline-offset-0 invalid:outline-2 invalid:outline-feedback-error-border group-invalid:outline-2 group-invalid:outline-feedback-error-border forced-colors:focus:outline-[Highlight] forced-colors:focus:outline-2 forced-colors:focus:outline-offset-2"}`}function T(e,t){return composeRenderProps(e,r=>twMerge(t,r))}var P={sm:{text:"text-[length:var(--control-text-sm)]",height:"h-[var(--control-sm-height)]",padding:"px-[var(--control-padding-sm)]",gap:"gap-[var(--control-gap-sm)]"},md:{text:"text-[length:var(--control-text-md)]",height:"h-[var(--control-md-height)]",padding:"px-[var(--control-padding-md)]",gap:"gap-[var(--control-gap-md)]"},lg:{text:"text-[length:var(--control-text-lg)]",height:"h-[var(--control-lg-height)]",padding:"px-[var(--control-padding-lg)]",gap:"gap-[var(--control-gap-lg)]"},xl:{text:"text-[length:var(--control-text-xl)]",height:"h-[var(--control-xl-height)]",padding:"px-[var(--control-padding-xl)]",gap:"gap-[var(--control-gap-xl)]"}};var ln="flex font-medium justify-center items-center gap-2 text-center transition rounded-sm whitespace-nowrap box-border",dn={default:"bg-text-body text-neutral-white hover:brightness-90 forced-colors:bg-[ButtonText] forced-colors:text-[ButtonFace] border-2 border-transparent",primary:"bg-action-primary text-neutral-white hover:brightness-90 forced-colors:bg-[ButtonText] forced-colors:text-[ButtonFace] border-2 border-transparent",secondary:"bg-transparent text-text-body border-2 border-border-muted hover:bg-text-body/5 forced-colors:border-[ButtonBorder] forced-colors:bg-[ButtonFace] forced-colors:text-[ButtonText]",ghost:"border-none text-text-body hover:bg-text-body/5 forced-colors:text-[ButtonText] forced-colors:hover:bg-[ButtonFace]",destructive:"bg-transparent text-action-destructive border-2 border-border-muted hover:bg-action-destructive/5 forced-colors:border-[ButtonBorder] forced-colors:bg-[ButtonFace] forced-colors:text-[Mark]",link:"!text-action-primary hover:text-action-primary/90 hover:underline hover:decoration-2 hover:underline-offset-4",icon:"border-none text-text-body hover:bg-text-body/5 forced-colors:text-[ButtonText] forced-colors:hover:bg-[ButtonFace] p-2 flex-shrink-0",unstyled:"bg-transparent"},Ue={full:"w-full",default:"w-fit"},cn="opacity-control-hover cursor-not-allowed pointer-events-none grayscale",un="opacity-100 cursor-pointer",pn={"top-right":"-right-2 -top-2","top-left":"-left-2 -top-2","bottom-right":"-right-2 -bottom-2","bottom-left":"-left-2 -bottom-2"},mn={primary:"bg-action-primary text-white",destructive:"bg-action-destructive text-white"};function fn(e){let{variant:t="default",size:r="md",isDisabled:o,fullWidth:a=false,isLoading:n=false}=e,s=t==="unstyled"?"":`${ln} ${dn[t]}`;return t!=="unstyled"&&(s+=` ${P[r].text} ${P[r].height} ${P[r].padding} ${P[r].gap}`),o||n?s+=` ${cn}`:s+=` ${un}`,a?s+=` ${Ue.full}`:s+=` ${Ue.default}`,`${s} ${V()}`}function A(e){let{icon:t,children:r,isLoading:o=false,loadingText:a,loadingIndicator:n,size:s="md",iconPosition:i="left",iconWeight:l,href:c,className:d,badgeNumber:u,badgeVariant:m="primary",badgePosition:f="top-right",style:p,...g}=e,h=t?jsx(x,{name:t,className:`icon-[--control-icon-size-${s}]`,weight:l}):null,b=jsxs(Fragment,{children:[i==="left"&&h,typeof r=="function"?null:r,i==="right"&&h]}),v=jsxs("div",{className:"relative inline-flex items-center justify-center",children:[jsx("div",{className:"absolute inset-0 flex items-center justify-center",children:n||jsx(x,{name:"CircleNotch",className:`animate-spin icon-[--control-icon-size-${s}]`,"aria-hidden":"true"})}),jsx("div",{className:"invisible","aria-hidden":"true",children:b}),a&&jsx("span",{className:"sr-only",role:"status","aria-live":"polite",children:a})]}),S=[fn(e),d,o?"aria-busy":""].filter(Boolean).join(" "),$=c?jsx(Link,{href:c,...g,style:p,className:S,children:o?v:typeof r=="function"?function(y){return jsxs(Fragment,{children:[i==="left"&&h,r(y),i==="right"&&h]})}:b}):jsx(Button,{...g,style:p,className:S,children:o?v:typeof r=="function"?function(y){return jsxs(Fragment,{children:[i==="left"&&h,r(y),i==="right"&&h]})}:b});return u&&u>0?jsxs("div",{className:"relative",children:[$,jsx("span",{className:`absolute ${pn[f]} flex h-5 w-5 items-center justify-center rounded-full ${mn[m]} text-xs`,"aria-label":`${u} items`,children:u})]}):$}function J(){let[e,t]=U.useState(false),r=U.useCallback((a,n)=>{t(true),n?.(a);},[]),o=U.useCallback((a,n)=>{t(false),n?.(a);},[]);return {isFocused:e,handleFocus:r,handleBlur:o}}function Y({children:e,className:t}){return jsx("div",{className:twMerge("relative w-full",t),children:e})}function Qe({onClick:e,size:t="md",className:r}){return jsx("button",{type:"button",onClick:o=>{o.preventDefault(),o.stopPropagation(),e();},className:twMerge("absolute right-2 top-1/2 -translate-y-1/2 transform text-text-muted hover:text-text-body",r),"aria-label":"Clear input",onMouseDown:o=>{o.preventDefault(),o.stopPropagation();},children:jsx(x,{name:"X",size:t==="sm"?16:20})})}function _(e){let{isInvalid:t,isDisabled:r,isFocused:o}=e,a="border rounded-[var(--control-border-radius)] ";return r?`${a} border-border-muted focus:outline-none`:t&&o?`${a} border-feedback-error-border outline-[1.5px] outline-[var(--control-focus-ring-color-error)]`:t?`${a} border-feedback-error-border`:o?`${a} !outline-[1.5px] !outline-[var(--control-focus-ring-color)] ![--tw-outline-style:solid]`:`${a}`}function Te(e){return e.isDisabled?"bg-background-muted":e.transparent?"bg-transparent":"bg-background-input"}function q(e){let{isInvalid:t,isDisabled:r,isFocused:o,transparent:a,size:n="md",className:s}=e;return twMerge("w-full",_({isInvalid:t,isDisabled:r,isFocused:o}),Te({transparent:a,isDisabled:r}),P[n].text,P[n].height,P[n].padding,s)}function $e(e){let{size:t="md",isFocusWithin:r,isInvalid:o,isDisabled:a,transparent:n,className:s}=e;return twMerge("group flex items-center rounded-sm overflow-hidden",!n&&"bg-background-input",n&&"bg-transparent",P[t].height,_({isFocused:r,isInvalid:o,isDisabled:a}),s)}function L({children:e,size:t="md",tooltip:r,isRequired:o,className:a,htmlFor:n}){return jsxs("label",{htmlFor:n,className:twMerge(P[t].text,"!text-text-caption flex items-center gap-1",a),children:[e,o&&jsx("span",{className:"text-feedback-error-text",children:"*"}),r&&jsx("span",{className:"text-text-muted",children:jsx(x,{name:"Info",size:t==="sm"?16:20})})]})}function I({size:e="md",className:t,children:r,...o}){return jsx("div",{...o,className:twMerge("leading-[2.25] text-text-muted",P[e].text,t),children:r})}function k({children:e,size:t="md",className:r}){return jsx("div",{role:"alert",className:twMerge(P[t].text,"text-feedback-error-text",r),children:e})}function Xe({size:e="md",isInvalid:t,isDisabled:r,isFocused:o,transparent:a,className:n,...s}){return jsx("input",{className:q({isInvalid:t,isDisabled:r,isFocused:o,transparent:a,size:e,className:n}),...s})}function Je(e){let{children:t,...r}=e;return jsx("div",{...r,className:$e(e),children:typeof t=="function"?t(e):t})}var vn=e=>{let t=q({isInvalid:e.isInvalid,isDisabled:e.isDisabled,isFocused:e.isFocused,transparent:e.transparent,size:e.size}),r=[e.showSearchIcon?"pl-8":"pl-3",e.isClearable&&e.hasValue||e.isPassword?"pr-8":"pr-3"].join(" ");return twMerge(t,r,e.className)};function _e({label:e,description:t,errorMessage:r,size:o="md",tooltip:a,isRequired:n,transparent:s,showSearchIcon:i,isClearable:l,onClear:c,type:d,validationResult:u,...m}){let[f,p]=U.useState(false),{isFocused:g,handleFocus:h,handleBlur:b}=J(),v=d==="password";return jsx(TextField,{...m,isRequired:n,type:v?f?"text":"password":d,className:T(m.className,"group flex flex-col"),children:({isDisabled:S,isInvalid:$})=>jsxs("div",{className:"flex flex-col",children:[e&&jsx(L,{size:o,tooltip:a,isRequired:n,children:e}),jsxs(Y,{children:[i&&jsx("div",{className:"pointer-events-none absolute left-2 top-1/2 -translate-y-1/2 transform",children:jsx(x,{name:"MagnifyingGlass",className:"h-4 w-4 text-text-muted"})}),jsx(Xe,{size:o,disabled:S,onFocus:y=>h(y,m.onFocus),onBlur:y=>b(y,m.onBlur),onChange:y=>m.onChange?.(y.target.value),className:vn({isInvalid:$,isDisabled:S,isFocused:g,size:o,transparent:s,showSearchIcon:i,isClearable:l,hasValue:!!m.value,isPassword:v,className:typeof m.className=="string"?m.className:void 0})}),l&&m.value&&!S&&jsx(Qe,{onClick:()=>{c?c():m.onChange&&m.onChange("");},size:o}),v&&!S&&jsx("button",{type:"button",onClick:()=>p(!f),className:"absolute right-3 top-1/2 -translate-y-1/2 transform text-text-muted hover:text-text-body","aria-label":f?"Hide password":"Show password",onMouseDown:y=>{y.preventDefault(),y.stopPropagation();},children:jsx(x,{name:f?"EyeSlash":"Eye",size:o==="sm"?16:20,className:"text-text-body"})})]}),t&&jsx(I,{size:o,className:"mt-3",children:t}),typeof r=="string"&&jsx(k,{size:o,className:"mt-1",children:r}),typeof r=="function"&&u&&jsx(k,{size:o,className:"mt-1",children:r(u)})]})})}var Cn=e=>{let t=q({isInvalid:e.isInvalid,isDisabled:e.isDisabled,isFocused:e.isFocused,transparent:e.transparent,size:e.size});return twMerge(t,"min-h-[100px] resize-y py-2",e.className)};function et({label:e,description:t,errorMessage:r,size:o="md",tooltip:a,required:n,transparent:s,isInvalid:i,className:l,validationResult:c,...d}){let{isFocused:u,handleFocus:m,handleBlur:f}=J();return jsx("div",{className:"group flex flex-col",children:jsxs("div",{className:"flex flex-col",children:[e&&jsx(L,{size:o,tooltip:a,isRequired:n,children:e}),jsx(Y,{children:jsx("textarea",{...d,required:n,onFocus:p=>{d.onFocus&&d.onFocus(p),m(p);},onBlur:p=>{d.onBlur&&d.onBlur(p),f(p);},className:Cn({isInvalid:i,isDisabled:d.disabled,isFocused:u,size:o,transparent:s,className:l})})}),t&&jsx(I,{size:o,className:"mt-3",children:t}),typeof r=="string"&&jsx(k,{size:o,className:"mt-1",children:r}),typeof r=="function"&&c&&jsx(k,{size:o,className:"mt-1",children:r(c)})]})})}function Rn({children:e,...t}){return jsx(ListBox,{...t,className:T(t.className,"border border-gray-300 outline-0 dark:border-zinc-600"),children:e})}function Fn({isEntering:e,isExiting:t,className:r=""}){let o=["bg-white","dark:bg-zinc-900/70","dark:backdrop-blur-2xl","dark:backdrop-saturate-200","forced-colors:bg-[Canvas]","shadow-2xl","rounded-sm","bg-clip-padding","border","border-gray-300","dark:border-white/[15%]","dark:text-zinc-300"].join(" "),a=e?["animate-in","fade-in","placement-bottom:slide-in-from-top-1","placement-top:slide-in-from-bottom-1","placement-left:slide-in-from-right-1","placement-right:slide-in-from-left-1","ease-out","duration-200"].join(" "):"",n=t?["animate-out","fade-out","placement-bottom:slide-out-to-top-1","placement-top:slide-out-to-bottom-1","placement-left:slide-out-to-right-1","placement-right:slide-out-to-left-1","ease-in","duration-150"].join(" "):"";return [o,a,n,r].filter(Boolean).join(" ")}function ie({children:e,showArrow:t,className:r,...o}){let n=useSlottedContext(PopoverContext)?.trigger==="SubmenuTrigger",s=t?12:8;return s=n?s-6:s,jsxs(Popover,{offset:s,...o,className:composeRenderProps(r,(i,l)=>Fn({...l,className:i})),children:[t&&jsx(OverlayArrow,{className:"group",children:jsx("svg",{width:12,height:12,viewBox:"0 0 12 12",className:"block fill-white stroke-black/10 stroke-1 group-placement-left:-rotate-90 group-placement-right:rotate-90 group-placement-bottom:rotate-180 dark:fill-[#1f1f21] dark:stroke-zinc-600 forced-colors:fill-[Canvas] forced-colors:stroke-[ButtonBorder]",children:jsx("path",{d:"M0 0 L6 6 L12 0"})})}),e]})}function Hn(e="md"){return `flex-1 text-start data-[placeholder]:text-text-placeholder ${P[e].text}`}function zn(){let e=U.useCallback((r,o)=>{o?.(r);},[]),t=U.useCallback((r,o)=>{o?.(r);},[]);return {handleFocus:e,handleBlur:t}}function nt({label:e,description:t,errorMessage:r,children:o,items:a,size:n="md",selectedKey:s,defaultSelectedKey:i,onSelectionChange:l,placeholder:c,showErrors:d=false,tooltip:u,isRequired:m,transparent:f,...p}){let[g,h]=useState(null),b=s??g??i,{handleFocus:v,handleBlur:S}=zn(),$=D=>{l?l(D):h(D);},y=useRef(null);return jsx(Select,{...p,selectedKey:b,defaultSelectedKey:i,onSelectionChange:$,placeholder:c,className:T(p.className,"group flex w-full flex-col"),ref:y,onOpenChange:D=>{D||y.current?.blur();},children:({isDisabled:D,isInvalid:ne,isOpen:R})=>jsxs("div",{className:"flex flex-col",children:[e&&jsx(L,{size:n,tooltip:u,isRequired:m,className:"mb-2",children:e}),jsx(Y,{children:jsxs(A,{variant:"unstyled",className:twMerge(q({isInvalid:ne||d&&!!r,isDisabled:D,isFocused:R,transparent:f,size:n}),"flex items-center text-start gap-4 cursor-pointer min-w-[200px] max-w-[400px]"),onFocus:N=>v(N,p.onFocus),onBlur:N=>S(N,p.onBlur),"data-open":R,children:[jsx(SelectValue,{className:Hn(n)}),jsx(x,{name:"CaretDown","aria-hidden":true,className:twMerge("h-4 w-4 text-text-body group-disabled:text-gray-200 forced-colors:text-[ButtonText] transition-transform",R&&"rotate-180")})]})}),t&&jsx(I,{size:n,className:"mt-3",children:t}),d&&jsx(k,{size:n,className:"mt-3 text-feedback-error-text",children:typeof r=="function"&&p.validationResult?r(p.validationResult):typeof r=="string"?r:null}),jsx(ie,{className:"min-w-[var(--trigger-width)] max-w-[400px] bg-background-input",children:jsx(ListBox,{items:a,className:"w-full max-h-inherit overflow-auto bg-background-input p-1 outline-0 [clip-path:inset(0_0_0_0_round_.75rem)]",children:o})})]})})}var qn=e=>twMerge(_({isInvalid:e.isInvalid,isDisabled:e.isDisabled,isFocused:e.isFocused}),e.transparent?"bg-transparent":"bg-background-input","pr-9","[appearance:textfield] [&::-webkit-outer-spin-button]:appearance-none [&::-webkit-inner-spin-button]:appearance-none",e.className);function st({label:e,description:t,errorMessage:r,size:o,tooltip:a,isRequired:n,transparent:s,validationResult:i,...l}){let c=useId();return jsx(NumberField,{...l,id:c,isRequired:n,className:T(l.className,"group flex flex-col gap-1"),step:l.step??1,onChange:d=>{typeof d=="number"&&(l.maxValue!=null&&d>l.maxValue?l.onChange?.(l.maxValue):l.minValue!=null&&d<l.minValue?l.onChange?.(l.minValue):l.onChange?.(d));},isInvalid:!!r||typeof l.value=="number"&&(l.maxValue!=null&&l.value>l.maxValue||l.minValue!=null&&l.value<l.minValue),children:({isDisabled:d,isInvalid:u})=>jsxs("div",{className:"flex flex-col",children:[e&&jsx(L,{size:o,tooltip:a,isRequired:n,htmlFor:c,children:e}),jsx("div",{className:"relative",children:jsxs(Group,{className:"relative",children:[jsx(Input,{className:qn({isInvalid:u||!!r,isDisabled:d,transparent:s,className:typeof l.className=="string"?l.className:void 0})}),jsxs("div",{className:"absolute inset-y-[1px] right-[1px] flex flex-col divide-y border-l overflow-hidden rounded-r-[calc(var(--control-border-radius)-1px)]",children:[jsx(Button,{slot:"increment",isDisabled:d,className:"flex h-1/2 w-7 items-center justify-center bg-background-input hover:bg-background-input-hover active:bg-background-input-active disabled:cursor-not-allowed disabled:opacity-50",children:jsx(x,{name:"CaretUp",size:14})}),jsx(Button,{slot:"decrement",isDisabled:d,className:"flex h-1/2 w-7 items-center justify-center bg-background-input hover:bg-background-input-hover active:bg-background-input-active disabled:cursor-not-allowed disabled:opacity-50",children:jsx(x,{name:"CaretDown",size:14})})]})]})}),t&&jsx(I,{size:o,className:"mt-3",children:t}),r&&jsx(k,{size:o,className:"mt-3",children:typeof r=="function"?r(i):r})]})})}var Yn=e=>twMerge("w-full",_({isInvalid:e.isInvalid,isDisabled:e.isDisabled,isFocused:e.isFocused}),Te({transparent:e.transparent,isDisabled:e.isDisabled}),P[e.size||"md"].text,P[e.size||"md"].height,P[e.size||"md"].padding,"flex items-center gap-0.5",e.className),_n=({isPlaceholder:e,isDisabled:t,isFocused:r,size:o="md"})=>twMerge("outline-none rounded transition-colors box-content tabular-nums text-center",e?"text-text-muted italic":"text-text-body",t?"text-text-disabled cursor-not-allowed":"cursor-default",P[o].text,"px-0.5 -my-0.5",r&&"!outline-[1.5px] !outline-[var(--control-focus-ring-color)] ![--tw-outline-style:solid]",!t&&!r&&"hover:bg-text-body/[0.05]");function lt({label:e,description:t,errorMessage:r,size:o="md",tooltip:a,isRequired:n,transparent:s,validationResult:i,...l}){let{isFocused:c}=J(),[d,u]=useState(null),m=useRef(null);return useEffect(()=>{let f=h=>{let b=h.target;b.hasAttribute("data-type")&&u(b.getAttribute("data-type"));},p=()=>{u(null);},g=m.current;return g&&(g.addEventListener("focusin",f),g.addEventListener("focusout",p)),()=>{g&&(g.removeEventListener("focusin",f),g.removeEventListener("focusout",p));}},[]),jsx(TimeField,{...l,children:({isDisabled:f,isInvalid:p})=>jsxs(Fragment,{children:[e&&jsx(L,{isRequired:n,tooltip:a,children:e}),jsx(DateInput,{ref:m,className:Yn({size:o,transparent:s,isDisabled:f,isInvalid:p,isFocused:c}),children:g=>jsx(DateSegment,{segment:g,className:_n({isPlaceholder:g.isPlaceholder,isDisabled:g.isEditable,isFocused:d===g.type,size:o})})}),t&&jsx(I,{children:t}),typeof r=="string"?jsx(k,{children:r}):null]})})}function dt({label:e,description:t,errorMessage:r,...o}){return jsxs(DateField,{...o,className:T(o.className,"flex flex-col gap-1"),children:[e&&jsx(L,{children:e}),jsx(le,{}),t&&jsx(I,{children:t}),typeof r=="string"?jsx(k,{children:r}):null]})}function aa({isPlaceholder:e,isDisabled:t,isFocused:r}){return ["inline p-0.5 type-literal:px-0 rounded outline outline-0 forced-color-adjust-none caret-transparent text-gray-800 dark:text-zinc-200 forced-colors:text-[ButtonText]",e&&"text-gray-600 dark:text-zinc-400 italic",t&&"text-gray-200 dark:text-zinc-600 forced-colors:text-[GrayText]",r&&"bg-blue-600 text-white dark:text-white forced-colors:bg-[Highlight] forced-colors:text-[HighlightText]"].filter(Boolean).join(" ")}function le(e){return jsx(DateInput,{className:t=>$e({...t,className:"block min-w-[150px] px-2 py-1.5 text-sm"}),...e,children:t=>jsx(DateSegment,{segment:t,className:aa({isPlaceholder:t.isPlaceholder,isDisabled:t.isEditable})})})}var la="flex font-medium justify-center items-center gap-2 text-center transition whitespace-nowrap box-border",ct={default:{selected:"bg-text-body text-white hover:brightness-[var(--control-hover-opacity)] forced-colors:bg-[ButtonText] forced-colors:text-[ButtonFace] border-2 border-transparent",unselected:"bg-transparent text-text-body border-2 border-border-muted hover:bg-text-body/[0.05] forced-colors:border-[ButtonBorder] forced-colors:bg-[ButtonFace] forced-colors:text-[ButtonText]"},primary:{selected:"bg-action-primary text-white hover:brightness-[var(--control-hover-opacity)] forced-colors:bg-[ButtonText] forced-colors:text-[ButtonFace] border-2 border-transparent",unselected:"bg-transparent text-text-body border-2 border-border-muted hover:bg-text-body/[0.05] forced-colors:border-[ButtonBorder] forced-colors:bg-[ButtonFace] forced-colors:text-[ButtonText]"}},da="opacity-[--control-hover-opacity] cursor-not-allowed pointer-events-none grayscale",ca="opacity-100 cursor-pointer",ua={"top-right":"-right-2 -top-2","top-left":"-left-2 -top-2","bottom-right":"-right-2 -bottom-2","bottom-left":"-left-2 -bottom-2"},pa={primary:"bg-action-primary text-white",destructive:"bg-action-destructive text-white"};function ma(e){let{variant:t="default",size:r="md",isDisabled:o,isSelected:a,borderRadius:n,borderRight:s,borderLeft:i}=e,l=`${la} ${a?ct[t].selected:ct[t].unselected}`;return l+=` ${P[r].text} ${P[r].height} ${P[r].padding} ${P[r].gap}`,l+=` ${o?da:ca}`,n==="left"&&(l+=" rounded-l-sm"),n==="right"&&(l+=" rounded-r-sm"),s&&(l+=" border-r"),i&&(l+=" border-l"),l+=` ${V()}`,twMerge(l)}function pt(e){let{className:t,children:r,onPress:o,icon:a,iconPosition:n="left",iconWeight:s,isLoading:i=false,loadingText:l,loadingIndicator:c,size:d="md",badgeNumber:u,badgeVariant:m="primary",badgePosition:f="top-right",...p}=e,g=a?jsx(x,{name:a,className:`icon-[--control-icon-size-${d}]`,weight:s}):null,h=()=>{let v=jsxs(Fragment,{children:[n==="left"&&g,r,n==="right"&&g]});return i?jsxs("div",{className:"relative inline-flex items-center justify-center",children:[jsx("div",{className:"absolute inset-0 flex items-center justify-center",children:c||jsx(x,{name:"CircleNotch",className:`animate-spin icon-[--control-icon-size-${d}]`,"aria-hidden":"true"})}),jsx("div",{className:"invisible","aria-hidden":"true",children:v}),l&&jsx("span",{className:"sr-only",role:"status","aria-live":"polite",children:l})]}):v},b=jsx(ToggleButton,{onPress:o,...p,className:twMerge(ma(e),t),"aria-busy":i,children:h()});return u&&u>0?jsxs("div",{className:"relative",children:[b,jsx("span",{className:`absolute ${ua[f]} flex h-5 w-5 items-center justify-center rounded-full ${pa[m]} text-xs`,"aria-label":`${u} items`,children:u})]}):b}var va=({isEntering:e,isExiting:t,className:r})=>["max-w-[200px] group bg-slate-700 dark:bg-slate-600 border border-slate-800 dark:border-white/10 shadow-[inset_0_1px_0_0_theme(colors.gray.600)] dark:shadow-none text-white text-sm rounded-lg drop-shadow-lg will-change-transform px-3 py-1",e?"animate-in fade-in placement-bottom:slide-in-from-top-0.5 placement-top:slide-in-from-bottom-0.5 placement-left:slide-in-from-right-0.5 placement-right:slide-in-from-left-0.5 ease-out duration-200":"",t?"animate-out fade-out placement-bottom:slide-out-to-top-0.5 placement-top:slide-out-to-bottom-0.5 placement-left:slide-out-to-right-0.5 placement-right:slide-out-to-left-0.5 ease-in duration-150":"",r].filter(Boolean).join(" ");function Ie({children:e,content:t,...r}){return jsxs(TooltipTrigger,{delay:200,children:[e,jsxs(Tooltip,{...r,offset:10,className:composeRenderProps(r.className,(o,a)=>va({...a,className:o})),children:[jsx(OverlayArrow,{children:jsx("svg",{width:8,height:8,viewBox:"0 0 8 8",className:"fill-slate-700 stroke-gray-800 group-placement-left:-rotate-90 group-placement-right:rotate-90 group-placement-bottom:rotate-180 dark:fill-slate-600 dark:stroke-white/10 forced-colors:fill-[Canvas] forced-colors:stroke-[ButtonBorder]",children:jsx("path",{d:"M0 0 L4 4 L8 0"})})}),t]})]})}var ya=({href:e,children:t,className:r="",external:o=false,title:a,variant:n="default",onClick:s,asButton:i=false,onPress:l,showArrow:c=false})=>{let d=o?{target:"_blank",rel:"noopener noreferrer"}:{},f=`hover:underline hover:decoration-1 hover:underline-offset-4 cursor-pointer ${{default:"text-text-link-default hover:text-text-link-hover visited:text-text-link-default",primary:"text-action-primary hover:text-action-primary-hover visited:text-action-primary",muted:"text-text-muted hover:text-text-muted visited:text-text-muted"}[n]} ${r}`,p=jsxs(Fragment,{children:[t,c&&jsxs("span",{children:["\xA0","\u2192"]})]});return i?jsx("button",{type:"button",className:f,onClick:l,title:a,children:p}):jsx("a",{href:e||"#",className:f,...d,title:a,onClick:s,children:p})};var Ra=({width:e,height:t,variant:r="rect",animation:o="pulse",gradient:a=false,flex:n=false,stack:s,responsive:i,delay:l=0,adjustAnimationSpeedBasedOnWidth:c=false,ariaLabel:d,className:u,"data-testid":m})=>{let[f,p]=useState(l===0);if(useEffect(()=>{if(l>0){let y=setTimeout(()=>p(true),l);return ()=>clearTimeout(y)}},[l]),!f)return null;let g=a?"bg-gradient-to-r from-[var(--skeleton-base)] via-[var(--skeleton-highlight)] to-[var(--skeleton-base)]":"bg-[var(--skeleton-base)]",h=c&&e?(()=>{let y=typeof e=="number"?e:parseFloat(String(e));return isNaN(y)?"":`animation-duration-[${Math.max(.8,y/100)}s]`})():"",b=o==="pulse"?`animate-pulse ${h}`:o==="wave"?`relative overflow-hidden before:absolute before:inset-0 before:bg-gradient-to-r before:from-transparent before:via-[var(--skeleton-wave)] before:to-transparent before:animate-wave ${h}`:"",v="rounded-sm";r==="circle"&&(v="rounded-full"),r==="text"&&(v="h-4 w-full rounded-sm");let S=n?"flex-1 min-w-0":"",$=i?Object.entries(i).map(([y,D])=>`${y}:w-[${D}]`).join(" "):"";return s?jsx("div",{className:"space-y-2","data-testid":m,children:s.map((y,D)=>jsx("div",{className:twMerge(g,b,v,S,$,u),style:{width:y,height:t}},D))}):jsx("div",{className:twMerge(g,b,v,S,$,u),style:{width:e,height:t},role:"presentation","aria-hidden":!d,"aria-label":d??void 0,"data-testid":m})};var xt=({className:e,showWordmark:t=true})=>{let r=e||"fill-[#333333]";return t?jsxs("svg",{width:"270",height:"80",viewBox:"0 0 270 80",xmlns:"http://www.w3.org/2000/svg",className:r,children:[jsxs("g",{clipPath:"url(#clip0_796_283)",children:[jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M0.223654 20.2934C0.417233 19.8234 0.873598 19.517 1.37984 19.517H20.5909C21.282 19.517 21.8422 20.0798 21.8422 20.774V40.049C21.8422 40.5572 21.5375 41.0155 21.0702 41.2102C20.6028 41.405 20.0647 41.2977 19.7067 40.9385L0.495628 21.6635C0.137428 21.3041 0.030075 20.7633 0.223654 20.2934ZM4.40349 22.0311L19.3396 37.017V22.0311H4.40349Z"}),jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M38.6458 20.2934C38.8394 19.8234 39.2958 19.517 39.802 19.517H59.013C59.7041 19.517 60.2642 20.0798 60.2642 20.774V40.049C60.2642 40.5572 59.9597 41.0155 59.4923 41.2102C59.025 41.405 58.4867 41.2977 58.1289 40.9385L38.9178 21.6635C38.5595 21.3041 38.4522 20.7633 38.6458 20.2934ZM42.8255 22.0311L57.7618 37.017V22.0311H42.8255Z"}),jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M19.4347 58.8447C19.6283 58.3747 20.0847 58.0685 20.5909 58.0685H39.802C40.493 58.0685 41.0532 58.6312 41.0532 59.3255V78.6005C41.0532 79.1087 40.7486 79.567 40.2813 79.7617C39.8139 79.9562 39.2757 79.849 38.9178 79.49L19.7067 60.215C19.3485 59.8555 19.2411 59.3147 19.4347 58.8447ZM23.6146 60.5825L38.5508 75.5682V60.5825H23.6146Z"}),jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M39.3227 58.1643C39.79 57.9695 40.3283 58.0768 40.6861 58.436L59.8972 77.711C60.2555 78.0703 60.3628 78.6113 60.1692 79.081C59.9756 79.551 59.5192 79.8575 59.013 79.8575H39.802C39.1109 79.8575 38.5508 79.2948 38.5508 78.6005V59.3255C38.5508 58.8173 38.8554 58.359 39.3227 58.1643ZM41.0532 62.3575V77.3433H55.9893L41.0532 62.3575Z"}),jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M39.3227 19.6129C39.79 19.4182 40.3283 19.5254 40.6861 19.8846L59.8972 39.1595C60.2555 39.519 60.3628 40.0598 60.1692 40.5298C59.9756 40.9995 59.5192 41.306 59.013 41.306H39.802C39.1109 41.306 38.5508 40.7433 38.5508 40.049V20.7741C38.5508 20.2658 38.8554 19.8075 39.3227 19.6129ZM41.0532 23.8061V38.792H55.9893L41.0532 23.8061Z"}),jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M39.3227 38.8885C39.79 38.694 40.3283 38.8012 40.6861 39.1602L59.8972 58.4352C60.2555 58.7945 60.3628 59.3355 60.1692 59.8055C59.9756 60.2752 59.5192 60.5817 59.013 60.5817H39.802C39.1109 60.5817 38.5508 60.019 38.5508 59.3247V40.0497C38.5508 39.5415 38.8554 39.0832 39.3227 38.8885ZM41.0532 43.0817V58.0675H55.9893L41.0532 43.0817Z"}),jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M38.6458 39.569C38.8394 39.0992 39.2958 38.7927 39.802 38.7927H59.013C59.7041 38.7927 60.2642 39.3555 60.2642 40.0497V59.3247C60.2642 59.833 59.9597 60.2912 59.4923 60.486C59.025 60.6805 58.4867 60.5732 58.1289 60.2142L38.9178 40.9392C38.5595 40.5797 38.4522 40.039 38.6458 39.569ZM42.8255 41.3067L57.7618 56.2927V41.3067H42.8255Z"}),jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M38.6458 58.8447C38.8394 58.3747 39.2958 58.0685 39.802 58.0685H59.013C59.7041 58.0685 60.2642 58.6312 60.2642 59.3255V78.6005C60.2642 79.1087 59.9597 79.567 59.4923 79.7617C59.025 79.9562 58.4867 79.849 58.1289 79.49L38.9178 60.215C38.5595 59.8555 38.4522 59.3147 38.6458 58.8447ZM42.8255 60.5825L57.7618 75.5682V60.5825H42.8255Z"}),jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M58.5338 19.6129C59.0011 19.4182 59.5394 19.5254 59.8972 19.8846L79.1083 39.1595C79.4666 39.519 79.5739 40.0598 79.3803 40.5298C79.1867 40.9995 78.7303 41.306 78.2241 41.306H59.013C58.322 41.306 57.7618 40.7433 57.7618 40.049V20.7741C57.7618 20.2658 58.0664 19.8075 58.5338 19.6129ZM60.2643 23.8061V38.792H75.2006L60.2643 23.8061Z"}),jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M58.5338 0.338803C59.0011 0.144135 59.5394 0.251385 59.8972 0.610565L79.1083 19.8855C79.4666 20.2449 79.5739 20.7857 79.3803 21.2556C79.1867 21.7256 78.7303 22.032 78.2241 22.032H59.013C58.322 22.032 57.7618 21.4692 57.7618 20.775V1.50003C57.7618 0.99174 58.0664 0.533468 58.5338 0.338803ZM60.2643 4.53208V19.5179H75.2006L60.2643 4.53208Z"}),jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M57.8569 20.2934C58.0505 19.8234 58.5069 19.517 59.013 19.517H78.2241C78.9151 19.517 79.4753 20.0798 79.4753 20.774V40.049C79.4753 40.5572 79.1707 41.0155 78.7034 41.2102C78.236 41.405 77.6978 41.2977 77.3399 40.9385L58.1289 21.6635C57.7705 21.3041 57.6633 20.7633 57.8569 20.2934ZM62.0365 22.0311L76.9729 37.017V22.0311H62.0365Z"}),jsx("path",{d:"M269.838 49.4457H249.005C249.266 51.801 250.162 53.6985 251.695 55.1377C253.225 56.577 255.134 57.2967 257.416 57.2967C259.307 57.2967 260.887 56.8715 262.159 56.021C263.463 55.1377 264.408 53.9927 264.996 52.5862H269.251C268.502 54.9415 267.084 56.937 264.996 58.5725C262.943 60.208 260.414 61.026 257.416 61.026C255.069 61.026 252.917 60.4697 250.961 59.3575C249.037 58.2127 247.504 56.6587 246.363 54.696C245.255 52.7332 244.7 50.558 244.7 48.17C244.7 45.782 245.255 43.6067 246.363 41.644C247.504 39.6812 249.037 38.1437 250.961 37.0315C252.917 35.8867 255.069 35.3142 257.416 35.3142C259.73 35.3142 261.833 35.8702 263.724 36.9825C265.615 38.0947 267.098 39.6485 268.176 41.644C269.283 43.6395 269.838 45.913 269.838 48.4645V49.4457ZM257.416 39.0432C255.263 39.0432 253.439 39.6812 251.939 40.957C250.47 42.2327 249.542 43.9337 249.152 46.06H265.583C265.192 43.9992 264.262 42.3145 262.796 41.006C261.36 39.6975 259.568 39.0432 257.416 39.0432Z"}),jsx("path",{d:"M228.356 60.5352V35.8049H232.219V39.7794H232.464C233.05 38.5689 233.963 37.5712 235.202 36.7862C236.474 35.9684 237.974 35.5594 239.701 35.5594H243.125V39.4359H239.701C237.517 39.4359 235.757 40.1554 234.42 41.5949C233.083 43.0342 232.414 44.9152 232.414 47.2377V60.5352H228.356Z"}),jsx("path",{d:"M208.607 61.0259C205.64 61.0259 203.326 60.1262 201.663 58.3272C200 56.4952 199.169 53.8947 199.169 50.5252V35.8047H203.228V49.8874C203.228 52.2427 203.766 54.0744 204.842 55.3829C205.95 56.6587 207.532 57.2967 209.586 57.2967C211.02 57.2967 212.308 56.9694 213.449 56.3152C214.623 55.6284 215.536 54.6959 216.188 53.5184C216.84 52.3407 217.166 50.9997 217.166 49.4949V35.8047H221.225V60.5352H217.313V56.5607H217.068C216.286 57.9019 215.161 58.9814 213.694 59.7992C212.226 60.6169 210.531 61.0259 208.607 61.0259Z"}),jsx("path",{d:"M186.736 39.534V56.806H194.756V60.5352H182.677V39.534H177.199V35.8047H182.677V29.5732H186.736V35.8047H193.24V39.534H186.736Z"}),jsx("path",{d:"M156.585 60.5352H151.988L158.394 48.0227L152.33 35.8047H156.976L162.062 46.0599H165.388L170.474 35.8047H175.022L168.958 48.0227L175.365 60.5352H170.67L165.29 49.7892H162.013L156.585 60.5352Z"}),jsx("path",{d:"M150.138 49.1315H129.304C129.565 51.4867 130.461 53.3842 131.994 54.8235C133.526 56.2627 135.433 56.9825 137.715 56.9825C139.606 56.9825 141.188 56.5572 142.459 55.7067C143.763 54.8235 144.709 53.6785 145.296 52.272H149.551C148.801 54.6272 147.382 56.6227 145.296 58.2582C143.242 59.8937 140.715 60.7118 137.715 60.7118C135.368 60.7118 133.216 60.1555 131.26 59.0432C129.336 57.8985 127.804 56.3445 126.663 54.3817C125.554 52.419 125 50.2437 125 47.8557C125 45.4677 125.554 43.2925 126.663 41.3298C127.804 39.367 129.336 37.8295 131.26 36.7173C133.216 35.5725 135.368 35 137.715 35C140.03 35 142.133 35.556 144.024 36.6682C145.915 37.7805 147.399 39.3342 148.475 41.3298C149.583 43.3252 150.138 45.5987 150.138 48.1502V49.1315ZM137.715 38.729C135.564 38.729 133.738 39.367 132.238 40.6427C130.771 41.9185 129.842 43.6195 129.45 45.7458H145.883C145.491 43.685 144.562 42.0002 143.095 40.6917C141.661 39.3832 139.867 38.729 137.715 38.729Z"}),jsx("path",{d:"M116.961 60.5353H112.559V30.4072H101.164V26.1875H128.307V30.4072H116.961V60.5353Z"})]}),jsx("defs",{children:jsx("clipPath",{id:"clip0_796_283",children:jsx("rect",{width:"270",height:"80",fill:"white"})})})]}):jsxs("svg",{width:"80",height:"80",viewBox:"0 0 80 80",xmlns:"http://www.w3.org/2000/svg",className:r,children:[jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M0.223654 20.2934C0.417233 19.8234 0.873598 19.517 1.37984 19.517H20.5909C21.282 19.517 21.8422 20.0798 21.8422 20.774V40.049C21.8422 40.5572 21.5375 41.0155 21.0702 41.2102C20.6028 41.405 20.0647 41.2977 19.7067 40.9385L0.495628 21.6635C0.137428 21.3041 0.030075 20.7633 0.223654 20.2934ZM4.40349 22.0311L19.3396 37.017V22.0311H4.40349Z"}),jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M38.6458 20.2934C38.8394 19.8234 39.2958 19.517 39.802 19.517H59.013C59.7041 19.517 60.2642 20.0798 60.2642 20.774V40.049C60.2642 40.5572 59.9597 41.0155 59.4923 41.2102C59.025 41.405 58.4867 41.2977 58.1289 40.9385L38.9178 21.6635C38.5595 21.3041 38.4522 20.7633 38.6458 20.2934ZM42.8255 22.0311L57.7618 37.017V22.0311H42.8255Z"}),jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M19.4347 58.8447C19.6283 58.3747 20.0847 58.0685 20.5909 58.0685H39.802C40.493 58.0685 41.0532 58.6312 41.0532 59.3255V78.6005C41.0532 79.1087 40.7486 79.567 40.2813 79.7617C39.8139 79.9562 39.2757 79.849 38.9178 79.49L19.7067 60.215C19.3485 59.8555 19.2411 59.3147 19.4347 58.8447ZM23.6146 60.5825L38.5508 75.5682V60.5825H23.6146Z"}),jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M39.3227 58.1643C39.79 57.9695 40.3283 58.0768 40.6861 58.436L59.8972 77.711C60.2555 78.0703 60.3628 78.6113 60.1692 79.081C59.9756 79.551 59.5192 79.8575 59.013 79.8575H39.802C39.1109 79.8575 38.5508 79.2948 38.5508 78.6005V59.3255C38.5508 58.8173 38.8554 58.359 39.3227 58.1643ZM41.0532 62.3575V77.3433H55.9893L41.0532 62.3575Z"}),jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M39.3227 19.6129C39.79 19.4182 40.3283 19.5254 40.6861 19.8846L59.8972 39.1595C60.2555 39.519 60.3628 40.0598 60.1692 40.5298C59.9756 40.9995 59.5192 41.306 59.013 41.306H39.802C39.1109 41.306 38.5508 40.7433 38.5508 40.049V20.7741C38.5508 20.2658 38.8554 19.8075 39.3227 19.6129ZM41.0532 23.8061V38.792H55.9893L41.0532 23.8061Z"}),jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M39.3227 38.8885C39.79 38.694 40.3283 38.8012 40.6861 39.1602L59.8972 58.4352C60.2555 58.7945 60.3628 59.3355 60.1692 59.8055C59.9756 60.2752 59.5192 60.5817 59.013 60.5817H39.802C39.1109 60.5817 38.5508 60.019 38.5508 59.3247V40.0497C38.5508 39.5415 38.8554 39.0832 39.3227 38.8885ZM41.0532 43.0817V58.0675H55.9893L41.0532 43.0817Z"}),jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M38.6458 39.569C38.8394 39.0992 39.2958 38.7927 39.802 38.7927H59.013C59.7041 38.7927 60.2642 39.3555 60.2642 40.0497V59.3247C60.2642 59.833 59.9597 60.2912 59.4923 60.486C59.025 60.6805 58.4867 60.5732 58.1289 60.2142L38.9178 40.9392C38.5595 40.5797 38.4522 40.039 38.6458 39.569ZM42.8255 41.3067L57.7618 56.2927V41.3067H42.8255Z"}),jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M38.6458 58.8447C38.8394 58.3747 39.2958 58.0685 39.802 58.0685H59.013C59.7041 58.0685 60.2642 58.6312 60.2642 59.3255V78.6005C60.2642 79.1087 59.9597 79.567 59.4923 79.7617C59.025 79.9562 58.4867 79.849 58.1289 79.49L38.9178 60.215C38.5595 59.8555 38.4522 59.3147 38.6458 58.8447ZM42.8255 60.5825L57.7618 75.5682V60.5825H42.8255Z"}),jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M58.5338 19.6129C59.0011 19.4182 59.5394 19.5254 59.8972 19.8846L79.1083 39.1595C79.4666 39.519 79.5739 40.0598 79.3803 40.5298C79.1867 40.9995 78.7303 41.306 78.2241 41.306H59.013C58.322 41.306 57.7618 40.7433 57.7618 40.049V20.7741C57.7618 20.2658 58.0664 19.8075 58.5338 19.6129ZM60.2643 23.8061V38.792H75.2006L60.2643 23.8061Z"}),jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M58.5338 0.338803C59.0011 0.144135 59.5394 0.251385 59.8972 0.610565L79.1083 19.8855C79.4666 20.2449 79.5739 20.7857 79.3803 21.2556C79.1867 21.7256 78.7303 22.032 78.2241 22.032H59.013C58.322 22.032 57.7618 21.4692 57.7618 20.775V1.50003C57.7618 0.99174 58.0664 0.533468 58.5338 0.338803ZM60.2643 4.53208V19.5179H75.2006L60.2643 4.53208Z"}),jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M57.8569 20.2934C58.0505 19.8234 58.5069 19.517 59.013 19.517H78.2241C78.9151 19.517 79.4753 20.0798 79.4753 20.774V40.049C79.4753 40.5572 79.1707 41.0155 78.7034 41.2102C78.236 41.405 77.6978 41.2977 77.3399 40.9385L58.1289 21.6635C57.7705 21.3041 57.6633 20.7633 57.8569 20.2934ZM62.0365 22.0311L76.9729 37.017V22.0311H62.0365Z"})]})};var vt=({className:e,size:t=24,color:r="text-action-primary"})=>jsx("div",{className:twMerge("inline-block animate-spin rounded-full border-2 border-solid border-current border-r-transparent",r,e),style:{width:t,height:t},role:"status","aria-label":"loading",children:jsx("span",{className:"sr-only",children:"Loading..."})});var $a={xs:"text-lg font-semibold",sm:"text-xl font-semibold",md:"text-2xl font-semibold",lg:"text-3xl font-semibold",xl:"text-4xl font-semibold"},Na={page:"h-16 leading-[62px]"};function yt({tag:e="h1",size:t="lg",height:r,className:o="",children:a}){let n=$a[t],s=r?Na[r]:"";return jsx(e,{className:twMerge(n,s,o),children:a})}function Ia({value:e,children:t,className:r,size:o="sm"}){let[a,n]=useState(false),l=jsx(A,{variant:"icon",size:o,onPress:()=>{let c=e||(typeof t=="string"?t:"");navigator.clipboard.writeText(c),n(true),setTimeout(()=>{n(false);},2e3);},className:"!px-2",children:jsx(x,{name:"Copy",size:o==="sm"?14:16})});return jsxs("div",{className:twMerge("flex items-center gap-1",r),children:[t,a?jsx(Ie,{content:"Copied!",children:l}):l]})}function Ma({isSelected:e,isDisabled:t}){return ["flex h-4 w-7 px-px items-center shrink-0 cursor-default rounded-full transition duration-200 ease-in-out shadow-inner border border-transparent",V,e?"bg-gray-700 dark:bg-zinc-300 forced-colors:!bg-[Highlight] group-pressed:bg-gray-800 dark:group-pressed:bg-zinc-200":"bg-gray-400 dark:bg-zinc-400 group-pressed:bg-gray-500 dark:group-pressed:bg-zinc-300",t?"bg-gray-200 dark:bg-zinc-700 forced-colors:group-selected:!bg-[GrayText] forced-colors:border-[GrayText]":""].filter(Boolean).join(" ")}function Va({isSelected:e,isDisabled:t}){return ["h-3 w-3 transform rounded-full bg-white dark:bg-zinc-900 outline outline-1 -outline-offset-1 outline-transparent shadow transition duration-200 ease-in-out",e?"translate-x-[100%]":"translate-x-0",t?"forced-colors:outline-[GrayText]":""].filter(Boolean).join(" ")}function Ct({children:e,...t}){return jsx(Switch,{...t,className:T(t.className,"group flex items-center gap-2 text-sm text-gray-800 transition disabled:text-gray-300 dark:text-zinc-200 dark:disabled:text-zinc-600 forced-colors:disabled:text-[GrayText]"),children:r=>jsxs(Fragment,{children:[jsx("div",{className:Ma(r),children:jsx("span",{className:Va(r)})}),e]})})}function Pt({label:e,rightLabel:t,progressWidth:r=64,hideLabels:o=false,...a}){return jsx(ProgressBar,{...a,className:T(a.className,"flex flex-col gap-1"),children:({percentage:n,valueText:s,isIndeterminate:i})=>jsxs(Fragment,{children:[!o&&jsxs("div",{className:"flex items-center justify-between gap-2",children:[jsx("span",{className:"text-sm text-text-heading",children:e}),jsx("span",{className:"text-sm text-text-heading",children:t||s})]}),jsx("div",{className:`relative h-2 w-${r} overflow-hidden rounded-full bg-background-muted outline outline-1 -outline-offset-1 outline-transparent`,children:jsx("div",{className:`absolute top-0 h-full rounded-full bg-blue-600 dark:bg-blue-500 forced-colors:bg-[Highlight] ${i?"left-full duration-1000 ease-out animate-in slide-out-to-right-full repeat-infinite [--tw-enter-translate-x:calc(-16rem-100%)]":"left-0"}`,style:{width:(i?40:n)+"%"}})})]})})}function Xa({isSelected:e,isDisabled:t}){let r=[V,"w-9 h-9 text-base cursor-default rounded-full flex items-center justify-center forced-color-adjust-none"];return t?r.push("text-gray-300 dark:text-zinc-600 forced-colors:text-[GrayText]"):e?r.push("bg-blue-600 invalid:bg-red-600 text-white forced-colors:bg-[Highlight] forced-colors:invalid:bg-[Mark] forced-colors:text-[HighlightText]"):r.push("text-zinc-900 dark:text-zinc-200 hover:bg-gray-100 dark:hover:bg-zinc-700 pressed:bg-gray-200 dark:pressed:bg-zinc-600"),r.join(" ")}function Rt({errorMessage:e,...t}){return jsxs(Calendar,{...t,children:[jsx(fe,{}),jsxs(CalendarGrid,{children:[jsx(ge,{}),jsx(CalendarGridBody,{children:r=>jsx(CalendarCell,{date:r,className:({isSelected:o,isDisabled:a})=>Xa({isSelected:o,isDisabled:a})})})]}),e&&jsx(Text,{slot:"errorMessage",className:"text-sm text-red-600",children:e})]})}function fe(){let{direction:e}=useLocale(),t=18;return jsxs("header",{className:"flex w-full items-center gap-1 px-1 pb-4",children:[jsx(A,{variant:"icon",slot:"previous",className:"pl-0",children:e==="rtl"?jsx(x,{name:"CaretRight","aria-hidden":true,size:t}):jsx(x,{name:"CaretLeft","aria-hidden":true,size:t})}),jsx(Heading,{className:"text-md mx-2 flex-1 text-center font-semibold text-zinc-900 dark:text-zinc-200"}),jsx(A,{variant:"icon",slot:"next",className:"pr-0",children:e==="rtl"?jsx(x,{name:"CaretLeft","aria-hidden":true,size:t}):jsx(x,{name:"CaretRight","aria-hidden":true,size:t})})]})}function ge(){return jsx(CalendarGridHeader,{children:e=>jsx(CalendarHeaderCell,{className:"text-xs font-semibold text-text-caption",children:e})})}function rs({selectionState:e,isDisabled:t}){let r=`${V} w-full h-full flex items-center justify-center rounded-sm forced-color-adjust-none font-semibold`,o={none:"text-text-body group-hover:bg-gray-200 group-pressed:bg-gray-200",middle:["group-hover:bg-gray-300 forced-colors:group-hover:bg-[Highlight]","group-invalid:group-hover:bg-red-200 forced-colors:group-invalid:group-hover:bg-[Mark]","group-pressed:bg-blue-300 forced-colors:group-pressed:bg-[Highlight] forced-colors:text-[HighlightText]","group-invalid:group-pressed:bg-red-300 forced-colors:group-invalid:group-pressed:bg-[Mark]"].join(" "),cap:" group-invalid:bg-red-600 forced-colors:bg-[Highlight] forced-colors:group-invalid:bg-[Mark] text-white forced-colors:text-white !bg-neutral-black"},a=t?"text-textFaint dark:text-zinc-600 forced-colors:text-textFaint font-light":"";return [r,o[e],a].filter(Boolean).join(" ")}function be({errorMessage:e,...t}){return jsxs(RangeCalendar,{...t,children:[jsx(fe,{}),jsxs(CalendarGrid,{className:"w-full [&_td]:px-0",children:[jsx(ge,{}),jsx(CalendarGridBody,{children:r=>jsx(CalendarCell,{date:r,className:"selection-start:rounded-s-end selection-end:rounded-e-end [td:last-child_&]:rounded-e-end group h-9 w-9 cursor-default text-sm outline outline-0 outside-month:text-gray-300 selected:bg-background-selected invalid:selected:bg-red-100 forced-colors:selected:bg-[Highlight] forced-colors:selected:text-white forced-colors:invalid:selected:bg-[Mark] [td:first-child_&]:rounded-s-full",children:({formattedDate:o,isSelected:a,isSelectionStart:n,isSelectionEnd:s,isFocusVisible:i,isDisabled:l})=>jsx("span",{className:rs({selectionState:a&&(n||s)?"cap":a?"middle":"none",isDisabled:l}),children:o})})})]}),e&&jsx(Text,{slot:"errorMessage",className:"text-sm text-red-600",children:e})]})}var xe={prefix:String(Math.round(Math.random()*1e10)),current:0},Tt=U.createContext(xe),as=U.createContext(false);var ss=!!(typeof window<"u"&&window.document&&window.document.createElement),He=new WeakMap;function is(e=false){let t=useContext(Tt),r=useRef(null);if(r.current===null&&!e){var o,a;let n=(a=U.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED)===null||a===void 0||(o=a.ReactCurrentOwner)===null||o===void 0?void 0:o.current;if(n){let s=He.get(n);s==null?He.set(n,{id:t.current,state:n.memoizedState}):n.memoizedState!==s.state&&(t.current=s.id,He.delete(n));}r.current=++t.current;}return r.current}function ls(e){let t=useContext(Tt);t===xe&&!ss&&console.warn("When server rendering, you must wrap your application in an <SSRProvider> to ensure consistent ids are generated between the client and server.");let r=is(!!e),o=t===xe&&process.env.NODE_ENV==="test"?"react-aria":`react-aria${t.prefix}`;return e||`${o}-${r}`}function ds(e){let t=U.useId(),[r]=useState(he()),o=r||process.env.NODE_ENV==="test"?"react-aria":`react-aria${xe.prefix}`;return e||`${o}-${t}`}typeof U.useId=="function"?ds:ls;function us(){return false}function ps(){return true}function ms(e){return ()=>{}}function he(){return typeof U.useSyncExternalStore=="function"?U.useSyncExternalStore(ms,us,ps):useContext(as)}var fs=new Set(["Arab","Syrc","Samr","Mand","Thaa","Mend","Nkoo","Adlm","Rohg","Hebr"]),gs=new Set(["ae","ar","arc","bcc","bqi","ckb","dv","fa","glk","he","ku","mzn","nqo","pnb","ps","sd","ug","ur","yi"]);function $t(e){if(Intl.Locale){let r=new Intl.Locale(e).maximize(),o=typeof r.getTextInfo=="function"?r.getTextInfo():r.textInfo;if(o)return o.direction==="rtl";if(r.script)return fs.has(r.script)}let t=e.split("-")[0];return gs.has(t)}var hs=Symbol.for("react-aria.i18n.locale");function Lt(){let e=typeof window<"u"&&window[hs]||typeof navigator<"u"&&(navigator.language||navigator.userLanguage)||"en-US";try{Intl.DateTimeFormat.supportedLocalesOf([e]);}catch{e="en-US";}return {locale:e,direction:$t(e)?"rtl":"ltr"}}var Ee=Lt(),ce=new Set;function Nt(){Ee=Lt();for(let e of ce)e(Ee);}function kt(){let e=he(),[t,r]=useState(Ee);return useEffect(()=>(ce.size===0&&window.addEventListener("languagechange",Nt),ce.add(r),()=>{ce.delete(r),ce.size===0&&window.removeEventListener("languagechange",Nt);}),[]),e?{locale:"en-US",direction:"ltr"}:t}var Cs=U.createContext(null);function Ge(){let e=kt();return useContext(Cs)||e}var Ke=new Map;function Oe(e){let{locale:t}=Ge(),r=t+(e?Object.entries(e).sort((a,n)=>a[0]<n[0]?-1:1).join():"");if(Ke.has(r))return Ke.get(r);let o=new Intl.Collator(t,e);return Ke.set(r,o),o}function ve(e){let t=Oe({usage:"search",...e}),r=useCallback((n,s)=>s.length===0?true:(n=n.normalize("NFC"),s=s.normalize("NFC"),t.compare(n.slice(0,s.length),s)===0),[t]),o=useCallback((n,s)=>s.length===0?true:(n=n.normalize("NFC"),s=s.normalize("NFC"),t.compare(n.slice(-s.length),s)===0),[t]),a=useCallback((n,s)=>{if(s.length===0)return true;n=n.normalize("NFC"),s=s.normalize("NFC");let i=0,l=s.length;for(;i+l<=n.length;i++){let c=n.slice(i,i+l);if(t.compare(s,c)===0)return true}return false},[t]);return useMemo(()=>({startsWith:r,endsWith:o,contains:a}),[r,o,a])}function It(e,t){let{cursor:r,getKey:o}=e;return {setSelectedKeys(a){t(n=>({...n,selectedKeys:a}));},setFilterText(a){t(n=>({...n,filterText:a}));},insert(a,...n){t(s=>ue(s,a,...n));},insertBefore(a,...n){t(s=>{let i=s.items.findIndex(l=>o?.(l)===a);if(i===-1)if(s.items.length===0)i=0;else return s;return ue(s,i,...n)});},insertAfter(a,...n){t(s=>{let i=s.items.findIndex(l=>o?.(l)===a);if(i===-1)if(s.items.length===0)i=0;else return s;return ue(s,i+1,...n)});},prepend(...a){t(n=>ue(n,0,...a));},append(...a){t(n=>ue(n,n.items.length,...a));},remove(...a){t(n=>{let s=new Set(a),i=n.items.filter(c=>!s.has(o(c))),l="all";if(n.selectedKeys!=="all"){l=new Set(n.selectedKeys);for(let c of a)l.delete(c);}return r==null&&i.length===0&&(l=new Set),{...n,items:i,selectedKeys:l}});},removeSelectedItems(){t(a=>{if(a.selectedKeys==="all")return {...a,items:[],selectedKeys:new Set};let n=a.selectedKeys,s=a.items.filter(i=>!n.has(o(i)));return {...a,items:s,selectedKeys:new Set}});},move(a,n){t(s=>{let i=s.items.findIndex(d=>o(d)===a);if(i===-1)return s;let l=s.items.slice(),[c]=l.splice(i,1);return l.splice(n,0,c),{...s,items:l}});},moveBefore(a,n){t(s=>{let i=s.items.findIndex(d=>o(d)===a);if(i===-1)return s;let c=(Array.isArray(n)?n:[...n]).map(d=>s.items.findIndex(u=>o(u)===d)).sort((d,u)=>d-u);return Ft(s,c,i)});},moveAfter(a,n){t(s=>{let i=s.items.findIndex(d=>o(d)===a);if(i===-1)return s;let c=(Array.isArray(n)?n:[...n]).map(d=>s.items.findIndex(u=>o(u)===d)).sort((d,u)=>d-u);return Ft(s,c,i+1)});},update(a,n){t(s=>{let i=s.items.findIndex(l=>o(l)===a);return i===-1?s:{...s,items:[...s.items.slice(0,i),n,...s.items.slice(i+1)]}});}}}function ue(e,t,...r){return {...e,items:[...e.items.slice(0,t),...r,...e.items.slice(t)]}}function Ft(e,t,r){r-=t.filter(n=>n<r).length;let o=t.map(n=>({from:n,to:r++}));for(let n=0;n<o.length;n++){let s=o[n].from;for(let i=n;i<o.length;i++)o[i].from>s&&o[i].from--;}for(let n=0;n<o.length;n++){let s=o[n];for(let i=o.length-1;i>n;i--){let l=o[i];l.from<s.to?s.to++:l.from++;}}let a=e.items.slice();for(let n of o){let[s]=a.splice(n.from,1);a.splice(n.to,0,s);}return {...e,items:a}}function Ts(e,t){let r;switch(e.state){case "idle":case "error":switch(t.type){case "loading":case "loadingMore":case "sorting":case "filtering":var o,a;return {...e,filterText:(o=t.filterText)!==null&&o!==void 0?o:e.filterText,state:t.type,items:t.type==="loading"?[]:e.items,sortDescriptor:(a=t.sortDescriptor)!==null&&a!==void 0?a:e.sortDescriptor,abortController:t.abortController};case "update":var n;return {...e,...(n=t.updater)===null||n===void 0?void 0:n.call(t,e)};case "success":case "error":return e;default:throw new Error(`Invalid action "${t.type}" in state "${e.state}"`)}case "loading":case "sorting":case "filtering":switch(t.type){case "success":if(t.abortController!==e.abortController)return e;var s;r=(s=t.selectedKeys)!==null&&s!==void 0?s:e.selectedKeys;var i,l,c;return {...e,filterText:(i=t.filterText)!==null&&i!==void 0?i:e.filterText,state:"idle",items:[...(l=t.items)!==null&&l!==void 0?l:[]],selectedKeys:r==="all"?"all":new Set(r),sortDescriptor:(c=t.sortDescriptor)!==null&&c!==void 0?c:e.sortDescriptor,abortController:void 0,cursor:t.cursor};case "error":return t.abortController!==e.abortController?e:{...e,state:"error",error:t.error,abortController:void 0};case "loading":case "loadingMore":case "sorting":case "filtering":var d;(d=e.abortController)===null||d===void 0||d.abort();var u;return {...e,filterText:(u=t.filterText)!==null&&u!==void 0?u:e.filterText,state:t.type,items:t.type==="loading"?[]:e.items,abortController:t.abortController};case "update":var m;return {...e,...(m=t.updater)===null||m===void 0?void 0:m.call(t,e)};default:throw new Error(`Invalid action "${t.type}" in state "${e.state}"`)}case "loadingMore":switch(t.type){case "success":var f;r=e.selectedKeys==="all"||t.selectedKeys==="all"?"all":new Set([...e.selectedKeys,...(f=t.selectedKeys)!==null&&f!==void 0?f:[]]);var p,g;return {...e,state:"idle",items:[...e.items,...(p=t.items)!==null&&p!==void 0?p:[]],selectedKeys:r,sortDescriptor:(g=t.sortDescriptor)!==null&&g!==void 0?g:e.sortDescriptor,abortController:void 0,cursor:t.cursor};case "error":return t.abortController!==e.abortController?e:{...e,state:"error",error:t.error};case "loading":case "sorting":case "filtering":var h;(h=e.abortController)===null||h===void 0||h.abort();var b;return {...e,filterText:(b=t.filterText)!==null&&b!==void 0?b:e.filterText,state:t.type,items:t.type==="loading"?[]:e.items,abortController:t.abortController};case "loadingMore":var v;return (v=t.abortController)===null||v===void 0||v.abort(),e;case "update":var S;return {...e,...(S=t.updater)===null||S===void 0?void 0:S.call(t,e)};default:throw new Error(`Invalid action "${t.type}" in state "${e.state}"`)}default:throw new Error(`Invalid state "${e.state}"`)}}function ye(e){let{load:t,sort:r,initialSelectedKeys:o,initialSortDescriptor:a,getKey:n=u=>u.id||u.key,initialFilterText:s=""}=e,[i,l]=useReducer(Ts,{state:"idle",error:void 0,items:[],selectedKeys:o==="all"?"all":new Set(o),sortDescriptor:a,filterText:s}),c=async(u,m)=>{let f=new AbortController;try{l({...u,abortController:f});var p;let b=(p=u.filterText)!==null&&p!==void 0?p:i.filterText;var g;let v=await m({items:i.items.slice(),selectedKeys:i.selectedKeys,sortDescriptor:(g=u.sortDescriptor)!==null&&g!==void 0?g:i.sortDescriptor,signal:f.signal,cursor:u.type==="loadingMore"?i.cursor:void 0,filterText:b});var h;let S=(h=v.filterText)!==null&&h!==void 0?h:b;l({type:"success",...v,abortController:f}),S&&S!==b&&!f.signal.aborted&&c({type:"filtering",filterText:S},t);}catch(b){l({type:"error",error:b,abortController:f});}},d=useRef(false);return useEffect(()=>{d.current||(c({type:"loading"},t),d.current=true);},[]),{items:i.items,selectedKeys:i.selectedKeys,sortDescriptor:i.sortDescriptor,isLoading:i.state==="loading"||i.state==="loadingMore"||i.state==="sorting"||i.state==="filtering",loadingState:i.state,error:i.error,filterText:i.filterText,getItem(u){return i.items.find(m=>n(m)===u)},reload(){c({type:"loading"},t);},loadMore(){i.state==="loadingMore"||i.state==="filtering"||i.cursor==null||c({type:"loadingMore"},t);},sort(u){c({type:"sorting",sortDescriptor:u},r||t);},...It({...e,getKey:n,cursor:i.cursor},u=>{l({type:"update",updater:u});}),setFilterText(u){c({type:"filtering",filterText:u},t);}}}var Bt={sm:"min-h-[theme(controlElementSize.sm)] max-h-[theme(controlElementSize.sm)] text-controlElementSm",md:"min-h-[theme(controlElementSize.md)] max-h-[theme(controlElementSize.md)] text-controlElementMd",lg:"min-h-[theme(controlElementSize.lg)] max-h-[theme(controlElementSize.lg)] text-controlElementLg",xl:"min-h-[theme(controlElementSize.xl)] max-h-[theme(controlElementSize.xl)] text-controlElementXl"},Fs={sm:"text-controlElementSm",md:"text-controlElementMd",lg:"text-controlElementLg",xl:"text-controlElementXl"},Dt={sm:"h-4 w-4",md:"h-5 w-5",lg:"h-6 w-6",xl:"h-7 w-7"};function Is(e){let t=["flex w-full cursor-pointer items-center rounded-sm transition outline outline-2"],r=e.size?Bt[e.size]:Bt.md,o=e.isDisabled?"opacity-50 cursor-not-allowed outline-border-input forced-colors:outline-[GrayText]":e.isInvalid?"outline-feedback-error-border group-invalid:outline-feedback-error-border forced-colors:group-invalid:outline-[Mark]":e.isOpen||e.isFocused?"outline-border-focus dark:outline-zinc-300 forced-colors:outline-[Highlight]":"outline-border-input";return [...t,r,o].filter(Boolean).join(" ")}function Bs(e,t=300){let[r,o]=useState(e);return useEffect(()=>{let a=setTimeout(()=>{o(e);},t);return ()=>{clearTimeout(a);}},[e,t]),r}async function Ds(e,t,r){try{let o=e.url.replace("{q}",t),a=new URLSearchParams;e.extraParams&&Object.entries(e.extraParams).forEach(([l,c])=>{a.append(l,c.toString());});let n=`${o}${a.toString()?"?"+a.toString():""}`,s=await fetch(n,{method:"GET",headers:e.headers,signal:r});if(!s.ok)throw new Error(`HTTP error! status: ${s.status}`);let i=await s.json();return {items:e.transformResponse(i)}}catch(o){return {items:[],error:o instanceof Error?o.message:"Unknown error occurred"}}}async function Ms(e,t,r){try{let o=e.graphqlQuery.replace(`$${e.variableKey||"filter"}`,`"${t}"`),a=await fetch(e.url,{method:"POST",headers:{"Content-Type":"application/json",...e.headers},body:JSON.stringify({query:o}),signal:r});if(!a.ok)throw new Error(`HTTP error! status: ${a.status}`);let n=await a.json();if(n.errors)throw new Error(n.errors[0]?.message||"GraphQL error occurred");return e.responsePath&&(n=e.responsePath.split(".").reduce((s,i)=>s?.[i],n)),{items:e.transformResponse(n)}}catch(o){return {items:[],error:o instanceof Error?o.message:"Unknown error occurred"}}}function je({label:e,staticItems:t=[],sections:r,selectedKey:o,defaultSelectedKey:a,onSelectionChange:n,requestConfig:s,defaultFilter:i,errorMessage:l,size:c="md",tooltip:d,isRequired:u,isDisabled:m,renderLeftIcon:f,autoFocus:p=false,onLoadError:g}){let[h,b]=useState(""),[v,S]=useState(false),$=Bs(h),{contains:y}=ve({sensitivity:"base"}),[D,ne]=useState(),[R,N]=useState(false),F=Fs[c],w=null;useEffect(()=>{p&&S(true);},[p]),useEffect(()=>{w&&w.setFilterText($);},[$,w]),s&&(w=ye({async load({signal:M,filterText:Pe=""}){if(!s.url||s.shouldLoad&&!s.shouldLoad(Pe))return {items:[]};N(true);try{let X;return s.requestType==="GraphQL"?X=await Ms(s,Pe,M):X=await Ds(s,Pe,M),ne(X.error),N(!1),{items:X.items}}catch(X){return me(X),{items:[]}}},initialFilterText:""})),$===""&&(w=null);let me=async M=>{g?.(M),N(false);};return jsx(ComboBox,{onSelectionChange:n,selectedKey:o||void 0,defaultSelectedKey:a||void 0,defaultItems:r?r.flatMap(M=>M.items):t,items:w?w.items:void 0,className:T("group flex flex-col","w-full"),menuTrigger:"focus",isDisabled:m,isInvalid:!!l,inputValue:h,onInputChange:M=>{b(M);},autoFocus:p,defaultFilter:i||y,children:M=>jsxs(Fragment,{children:[e&&jsx(L,{size:c,tooltip:d,isRequired:u,children:e}),jsxs(Group,{className:Is({isInvalid:!!l,isDisabled:m,size:c,isOpen:M.isOpen,isFocused:v}),style:{position:"relative"},children:[f?jsx("div",{className:"absolute left-3",children:f(R)}):jsx(x,{name:R?"CircleNotch":"MagnifyingGlass",className:`${Dt[c]} absolute left-3 text-inherit ${R?"animate-spin":""}`}),jsx(Input,{className:`h-full w-full rounded-sm bg-transparent pl-10 pr-3 outline-none ${F}`,onFocus:()=>S(true),onBlur:()=>S(false)}),jsx(Button,{className:"absolute right-3",children:jsx(x,{name:M.isOpen?"CaretUp":"CaretDown",className:`${Dt[c]} text-inherit`})})]})]})})}function As(e){return typeof e=="object"&&e!==null&&"features"in e&&Array.isArray(e.features)&&"type"in e&&typeof e.type=="string"}var Hs=process.env.NEXT_PUBLIC_MAPBOX_ACCESS_TOKEN||"";function Ht({label:e="Search for a place",selectedKey:t,defaultSelectedKey:r,onSelectionChange:o,placeholder:a="Enter a location...",errorMessage:n,description:s,size:i="md",tooltip:l,isRequired:c,isDisabled:d,showErrors:u=true,autoFocus:m=false,onSelect:f,searchTypes:p=["place","address"],defaultFilter:g,validationResult:h,countryRestrictions:b,proximity:v="ip"}){let S=useRef(new WeakMap),$=useRef([]),y={requestType:"REST",method:"GET",url:"https://api.mapbox.com/geocoding/v5/mapbox.places/{q}.json",extraParams:{access_token:Hs,types:p.join(","),limit:"5",...b?.length?{country:b.join(",").toLowerCase()}:{},...v?{proximity:v==="ip"?"ip":v.join(",")}:{}},shouldLoad:R=>R.length>0,transformResponse:R=>{if(!As(R))return [];let N=R.features.map(F=>{let w={id:F.id,name:F.place_name};return S.current.set(w,{type:F.place_type[0],center:F.center}),w});return N.length>0&&($.current=N),N}},D=R=>{let N=S.current.get(R),F=R.name.split(", "),w=F[0],me=F.slice(1).join(", ");return jsxs("div",{className:"flex items-center gap-3 py-0.5",children:[jsx(x,{name:N?.type==="address"?"MapPin":N?.type==="place"?"Buildings":N?.type==="region"?"MapPinArea":N?.type==="country"?"Flag":"Circle",className:"h-5 w-5 flex-shrink-0 text-text-muted"}),jsxs("div",{className:"flex min-w-0 flex-col",children:[jsx("span",{className:"truncate font-medium text-text-body",children:w}),me&&jsx("span",{className:"truncate text-sm text-text-muted",children:me})]})]})},ne=R=>R?jsx(x,{name:"CircleNotch",className:"h-4 w-4 animate-spin text-text-muted"}):jsx(x,{name:"MagnifyingGlass",className:"h-4 w-4 text-text-muted"});return jsx(je,{"data-testid":"autocomplete","data-config":JSON.stringify({types:p.join(","),country:b?.join(",").toLowerCase(),proximity:v==="ip"?"ip":v?.join(",")}),label:e,selectedKey:t,defaultSelectedKey:r,onSelectionChange:R=>{if(o?.(R),R){let F=$.current.find(w=>w.id===R);if(F){let w=S.current.get(F);w&&f({id:F.id,place_name:F.name,place_type:[w.type],center:w.center});}}},requestConfig:y,placeholder:a,errorMessage:n,description:s,size:i,tooltip:l,isRequired:c,isDisabled:d,showErrors:u,autoFocus:m,renderItem:D,renderLeftIcon:ne,defaultFilter:g,validationResult:h})}var Gs={sm:"py-1",md:"py-2",lg:"py-3",xl:"py-4"},Ks={sm:"text-controlElementSm",md:"text-controlElementMd",lg:"text-controlElementLg",xl:"text-controlElementXl"};function zt({size:e="md",className:t,...r}){return jsx(ListBoxItem,{...r,className:twMerge("flex cursor-default items-center gap-2 rounded-sm px-3 text-text-body outline-none data-[focused]:bg-background-hover data-[selected]:bg-background-hover",Gs[e],Ks[e],t)})}function Et(e){return jsx(Form,{...e,className:twMerge("flex flex-col gap-4",e.className)})}function Ce(e){return jsx(Dialog,{...e,className:twMerge("relative h-auto max-h-[inherit] overflow-auto outline outline-0 [[data-placement]>&]:p-4",e.className),role:"dialog"})}function Kt({label:e,description:t,errorMessage:r,...o}){return jsxs(DateRangePicker,{...o,className:T(o.className,"group flex flex-col gap-1"),children:[e&&jsx(L,{children:e}),jsxs(Je,{className:"w-auto min-w-[208px]",children:[jsx(le,{slot:"start",className:"px-2 py-1.5 text-sm"}),jsx("span",{"aria-hidden":"true",className:"text-gray-800 group-disabled:text-gray-200 dark:text-zinc-200 group-disabled:dark:text-zinc-600 forced-colors:text-[ButtonText] group-disabled:forced-colors:text-[GrayText]",children:"\u2013"}),jsx(le,{slot:"end",className:"flex-1 px-2 py-1.5 text-sm"}),jsx(A,{variant:"icon",className:"mr-1 w-6 rounded outline-offset-0",children:jsx(CalendarIcon,{"aria-hidden":true,className:"h-4 w-4"})})]}),t&&jsx(I,{children:t}),typeof r=="string"?jsx(k,{children:r}):null,jsx(ie,{children:jsx(Ce,{children:jsx(be,{})})})]})}function ri({isDisabled:e}){return `flex gap-2 items-center group text-sm transition ${e?"text-text-disabled":"text-text-caption"}`}function oi({isSelected:e,isInvalid:t,isDisabled:r,isIndeterminate:o}){let a="w-5 h-5 flex-shrink-0 rounded flex items-center justify-center border-2 transition ring-offset-2 focus:ring-2 focus:ring-border-focus",n="";return r?n="border-border-muted bg-background-muted":t?n="border-feedback-error-border bg-feedback-error-background":e||o?n="bg-action-primary border-action-primary hover:bg-action-primary-hover hover:border-action-primary-hover":n="bg-background-input border-border-input hover:border-border-focus",`${a} ${n}`}var Ot="w-4 h-4 text-text-onPrimary group-disabled:text-text-disabled";function ni(e){let{children:t,...r}=e;return jsx(Checkbox,{...r,className:composeRenderProps(e.className,(o,a)=>`${ri(a)} ${o||""}`),children:o=>{let{isSelected:a,isIndeterminate:n,...s}=o,i=jsx("div",{className:oi({isSelected:a,isIndeterminate:n,...s}),children:n?jsx(Minus,{"aria-hidden":true,className:Ot}):a?jsx(Check$1,{"aria-hidden":true,className:Ot}):null});return jsxs(Fragment,{children:[i,typeof t=="function"?t(o):t]})}})}
|
|
2
|
+
export{je as Autocomplete,A as Button,Rt as Calendar,ni as Checkbox,Qe as ClearButton,Ia as CopyToClipboard,dt as DateField,Kt as DateRangePicker,I as Description,Ce as Dialog,k as FieldError,Je as FieldGroup,Et as Form,yt as Heading,x as Icon,Xe as Input,Y as InputWrapper,L as Label,Rn as ListBox,zt as ListBoxItem,vt as Loader,xt as Logo,st as NumberField,Ht as PlaceSearch,ie as Popover,Pt as ProgressBar,be as RangeCalendar,nt as Select,Ra as Skeleton,Ct as Switch,et as TextArea,_e as TextField,ya as TextLink,lt as TimeField,pt as ToggleButton,Ie as Tooltip,$e as getFieldGroupStyles,Te as getInputBackgroundStyles,q as getInputBaseStyles,_ as getInputStateStyles,J as useInputFocus};//# sourceMappingURL=index.js.map
|
|
3
3
|
//# sourceMappingURL=index.js.map
|