starting-point-ui 0.6.1 → 0.8.0
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.css +1 -1
- package/dist/index.d.ts +39 -12
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
@property --tw-animation-delay{syntax:"*";inherits:false;initial-value:0s}@property --tw-animation-direction{syntax:"*";inherits:false;initial-value:normal}@property --tw-animation-duration{syntax:"*";inherits:false}@property --tw-animation-fill-mode{syntax:"*";inherits:false;initial-value:none}@property --tw-animation-iteration-count{syntax:"*";inherits:false;initial-value:1}@property --tw-enter-blur{syntax:"*";inherits:false;initial-value:0}@property --tw-enter-opacity{syntax:"*";inherits:false;initial-value:1}@property --tw-enter-rotate{syntax:"*";inherits:false;initial-value:0}@property --tw-enter-scale{syntax:"*";inherits:false;initial-value:1}@property --tw-enter-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-enter-translate-y{syntax:"*";inherits:false;initial-value:0}@property --tw-exit-blur{syntax:"*";inherits:false;initial-value:0}@property --tw-exit-opacity{syntax:"*";inherits:false;initial-value:1}@property --tw-exit-rotate{syntax:"*";inherits:false;initial-value:0}@property --tw-exit-scale{syntax:"*";inherits:false;initial-value:1}@property --tw-exit-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-exit-translate-y{syntax:"*";inherits:false;initial-value:0}@theme inline{--animation-delay-0: 0s; --animation-delay-75: 75ms; --animation-delay-100: .1s; --animation-delay-150: .15s; --animation-delay-200: .2s; --animation-delay-300: .3s; --animation-delay-500: .5s; --animation-delay-700: .7s; --animation-delay-1000: 1s; --animation-repeat-0: 0; --animation-repeat-1: 1; --animation-repeat-infinite: infinite; --animation-direction-normal: normal; --animation-direction-reverse: reverse; --animation-direction-alternate: alternate; --animation-direction-alternate-reverse: alternate-reverse; --animation-fill-mode-none: none; --animation-fill-mode-forwards: forwards; --animation-fill-mode-backwards: backwards; --animation-fill-mode-both: both; --percentage-0: 0; --percentage-5: .05; --percentage-10: .1; --percentage-15: .15; --percentage-20: .2; --percentage-25: .25; --percentage-30: .3; --percentage-35: .35; --percentage-40: .4; --percentage-45: .45; --percentage-50: .5; --percentage-55: .55; --percentage-60: .6; --percentage-65: .65; --percentage-70: .7; --percentage-75: .75; --percentage-80: .8; --percentage-85: .85; --percentage-90: .9; --percentage-95: .95; --percentage-100: 1; --percentage-translate-full: 1; --animate-in: enter var(--tw-animation-duration,var(--tw-duration,.15s))var(--tw-ease,ease)var(--tw-animation-delay,0s)var(--tw-animation-iteration-count,1)var(--tw-animation-direction,normal)var(--tw-animation-fill-mode,none); --animate-out: exit var(--tw-animation-duration,var(--tw-duration,.15s))var(--tw-ease,ease)var(--tw-animation-delay,0s)var(--tw-animation-iteration-count,1)var(--tw-animation-direction,normal)var(--tw-animation-fill-mode,none); @keyframes enter { from { opacity: var(--tw-enter-opacity,1); transform: translate3d(var(--tw-enter-translate-x,0),var(--tw-enter-translate-y,0),0)scale3d(var(--tw-enter-scale,1),var(--tw-enter-scale,1),var(--tw-enter-scale,1))rotate(var(--tw-enter-rotate,0)); filter: blur(var(--tw-enter-blur,0)); }}@keyframes exit { to { opacity: var(--tw-exit-opacity,1); transform: translate3d(var(--tw-exit-translate-x,0),var(--tw-exit-translate-y,0),0)scale3d(var(--tw-exit-scale,1),var(--tw-exit-scale,1),var(--tw-exit-scale,1))rotate(var(--tw-exit-rotate,0)); filter: blur(var(--tw-exit-blur,0)); }}--animate-accordion-down: accordion-down var(--tw-animation-duration,var(--tw-duration,.2s))var(--tw-ease,ease-out)var(--tw-animation-delay,0s)var(--tw-animation-iteration-count,1)var(--tw-animation-direction,normal)var(--tw-animation-fill-mode,none); --animate-accordion-up: accordion-up var(--tw-animation-duration,var(--tw-duration,.2s))var(--tw-ease,ease-out)var(--tw-animation-delay,0s)var(--tw-animation-iteration-count,1)var(--tw-animation-direction,normal)var(--tw-animation-fill-mode,none); --animate-collapsible-down: collapsible-down var(--tw-animation-duration,var(--tw-duration,.2s))var(--tw-ease,ease-out)var(--tw-animation-delay,0s)var(--tw-animation-iteration-count,1)var(--tw-animation-direction,normal)var(--tw-animation-fill-mode,none); --animate-collapsible-up: collapsible-up var(--tw-animation-duration,var(--tw-duration,.2s))var(--tw-ease,ease-out)var(--tw-animation-delay,0s)var(--tw-animation-iteration-count,1)var(--tw-animation-direction,normal)var(--tw-animation-fill-mode,none); @keyframes accordion-down { from { height: 0; }to { height: var(--radix-accordion-content-height,var(--bits-accordion-content-height,var(--reka-accordion-content-height,var(--kb-accordion-content-height,var(--ngp-accordion-content-height,auto))))); }}@keyframes accordion-up { from { height: var(--radix-accordion-content-height,var(--bits-accordion-content-height,var(--reka-accordion-content-height,var(--kb-accordion-content-height,var(--ngp-accordion-content-height,auto))))); }to { height: 0; }}@keyframes collapsible-down { from { height: 0; }to { height: var(--radix-collapsible-content-height,var(--bits-collapsible-content-height,var(--reka-collapsible-content-height,var(--kb-collapsible-content-height,auto)))); }}@keyframes collapsible-up { from { height: var(--radix-collapsible-content-height,var(--bits-collapsible-content-height,var(--reka-collapsible-content-height,var(--kb-collapsible-content-height,auto)))); }to { height: 0; }}--animate-caret-blink: caret-blink 1.25s ease-out infinite; @keyframes caret-blink { 0%,70%,100% { opacity: 1; }20%,50% { opacity: 0; }}}@utility animation-duration-*{--tw-animation-duration: calc(--value(number)*1ms) ; --tw-animation-duration: --value(--animation-duration-*,[duration],"initial",[*]); animation-duration: calc(--value(number)*1ms) ; animation-duration: --value(--animation-duration-*,[duration],"initial",[*]);}@utility delay-*{animation-delay: calc(--value(number)*1ms) ; animation-delay: --value(--animation-delay-*,[duration],"initial",[*]); --tw-animation-delay: calc(--value(number)*1ms) ; --tw-animation-delay: --value(--animation-delay-*,[duration],"initial",[*]);}@utility repeat-*{animation-iteration-count: --value(--animation-repeat-*,number,"initial",[*]); --tw-animation-iteration-count: --value(--animation-repeat-*,number,"initial",[*]);}@utility direction-*{animation-direction: --value(--animation-direction-*,"initial",[*]); --tw-animation-direction: --value(--animation-direction-*,"initial",[*]);}@utility fill-mode-*{animation-fill-mode: --value(--animation-fill-mode-*,"initial",[*]); --tw-animation-fill-mode: --value(--animation-fill-mode-*,"initial",[*]);}@utility running{animation-play-state: running;}@utility paused{animation-play-state: paused;}@utility play-state-*{animation-play-state: --value("initial",[*]);}@utility blur-in{--tw-enter-blur: 20px;}@utility blur-in-*{--tw-enter-blur: calc(--value(number)*1px) ; --tw-enter-blur: --value(--blur-*,[*]);}@utility blur-out{--tw-exit-blur: 20px;}@utility blur-out-*{--tw-exit-blur: calc(--value(number)*1px) ; --tw-exit-blur: --value(--blur-*,[*]);}@utility fade-in{--tw-enter-opacity: 0;}@utility fade-in-*{--tw-enter-opacity: calc(--value(number)*.01) ; --tw-enter-opacity: --value(--percentage-*,[*]);}@utility fade-out{--tw-exit-opacity: 0;}@utility fade-out-*{--tw-exit-opacity: calc(--value(number)*.01) ; --tw-exit-opacity: --value(--percentage-*,[*]);}@utility zoom-in{--tw-enter-scale: 0;}@utility zoom-in-*{--tw-enter-scale: calc(--value(number)*1%) ; --tw-enter-scale: --value(ratio) ; --tw-enter-scale: --value(--percentage-*,[*]);}@utility -zoom-in-*{--tw-enter-scale: calc(--value(number)*-1%) ; --tw-enter-scale: calc(--value(ratio)*-1) ; --tw-enter-scale: --value(--percentage-*,[*]);}@utility zoom-out{--tw-exit-scale: 0;}@utility zoom-out-*{--tw-exit-scale: calc(--value(number)*1%) ; --tw-exit-scale: --value(ratio) ; --tw-exit-scale: --value(--percentage-*,[*]);}@utility -zoom-out-*{--tw-exit-scale: calc(--value(number)*-1%) ; --tw-exit-scale: calc(--value(ratio)*-1) ; --tw-exit-scale: --value(--percentage-*,[*]);}@utility spin-in{--tw-enter-rotate: 30deg;}@utility spin-in-*{--tw-enter-rotate: calc(--value(number)*1deg) ; --tw-enter-rotate: calc(--value(ratio)*360deg) ; --tw-enter-rotate: --value(--rotate-*,[*]);}@utility -spin-in{--tw-enter-rotate: -30deg;}@utility -spin-in-*{--tw-enter-rotate: calc(--value(number)*-1deg) ; --tw-enter-rotate: calc(--value(ratio)*-360deg) ; --tw-enter-rotate: --value(--rotate-*,[*]);}@utility spin-out{--tw-exit-rotate: 30deg;}@utility spin-out-*{--tw-exit-rotate: calc(--value(number)*1deg) ; --tw-exit-rotate: calc(--value(ratio)*360deg) ; --tw-exit-rotate: --value(--rotate-*,[*]);}@utility -spin-out{--tw-exit-rotate: -30deg;}@utility -spin-out-*{--tw-exit-rotate: calc(--value(number)*-1deg) ; --tw-exit-rotate: calc(--value(ratio)*-360deg) ; --tw-exit-rotate: --value(--rotate-*,[*]);}@utility slide-in-from-top{--tw-enter-translate-y: -100%;}@utility slide-in-from-top-*{--tw-enter-translate-y: calc(--value(integer)*var(--spacing)*-1); --tw-enter-translate-y: calc(--value(--percentage-*,--percentage-translate-*)*-100%) ; --tw-enter-translate-y: calc(--value(ratio)*-100%) ; --tw-enter-translate-y: calc(--value(--translate-*,[percentage],[length])*-1) ;}@utility slide-in-from-bottom{--tw-enter-translate-y: 100%;}@utility slide-in-from-bottom-*{--tw-enter-translate-y: calc(--value(integer)*var(--spacing)); --tw-enter-translate-y: calc(--value(--percentage-*,--percentage-translate-*)*100%) ; --tw-enter-translate-y: calc(--value(ratio)*100%) ; --tw-enter-translate-y: --value(--translate-*,[percentage],[length]);}@utility slide-in-from-left{--tw-enter-translate-x: -100%;}@utility slide-in-from-left-*{--tw-enter-translate-x: calc(--value(integer)*var(--spacing)*-1); --tw-enter-translate-x: calc(--value(--percentage-*,--percentage-translate-*)*-100%) ; --tw-enter-translate-x: calc(--value(ratio)*-100%) ; --tw-enter-translate-x: calc(--value(--translate-*,[percentage],[length])*-1) ;}@utility slide-in-from-right{--tw-enter-translate-x: 100%;}@utility slide-in-from-right-*{--tw-enter-translate-x: calc(--value(integer)*var(--spacing)); --tw-enter-translate-x: calc(--value(--percentage-*,--percentage-translate-*)*100%) ; --tw-enter-translate-x: calc(--value(ratio)*100%) ; --tw-enter-translate-x: --value(--translate-*,[percentage],[length]);}@utility slide-in-from-start{&:dir(ltr){ --tw-enter-translate-x: -100%; }&:dir(rtl){ --tw-enter-translate-x: 100%; }}@utility slide-in-from-start-*{&:where(:dir(ltr),[dir="ltr"],[dir="ltr"]*){ --tw-enter-translate-x: calc(--value(integer)*var(--spacing)*-1); --tw-enter-translate-x: calc(--value(--percentage-*,--percentage-translate-*)*-100%) ; --tw-enter-translate-x: calc(--value(ratio)*-100%) ; --tw-enter-translate-x: calc(--value(--translate-*,[percentage],[length])*-1) ; }&:where(:dir(rtl),[dir="rtl"],[dir="rtl"]*){ --tw-enter-translate-x: calc(--value(integer)*var(--spacing)); --tw-enter-translate-x: calc(--value(--percentage-*,--percentage-translate-*)*100%) ; --tw-enter-translate-x: calc(--value(ratio)*100%) ; --tw-enter-translate-x: --value(--translate-*,[percentage],[length]); }}@utility slide-in-from-end{&:dir(ltr){ --tw-enter-translate-x: 100%; }&:dir(rtl){ --tw-enter-translate-x: -100%; }}@utility slide-in-from-end-*{&:where(:dir(ltr),[dir="ltr"],[dir="ltr"]*){ --tw-enter-translate-x: calc(--value(integer)*var(--spacing)); --tw-enter-translate-x: calc(--value(--percentage-*,--percentage-translate-*)*100%) ; --tw-enter-translate-x: calc(--value(ratio)*100%) ; --tw-enter-translate-x: --value(--translate-*,[percentage],[length]); }&:where(:dir(rtl),[dir="rtl"],[dir="rtl"]*){ --tw-enter-translate-x: calc(--value(integer)*var(--spacing)*-1); --tw-enter-translate-x: calc(--value(--percentage-*,--percentage-translate-*)*-100%) ; --tw-enter-translate-x: calc(--value(ratio)*-100%) ; --tw-enter-translate-x: calc(--value(--translate-*,[percentage],[length])*-1) ; }}@utility slide-out-to-top{--tw-exit-translate-y: -100%;}@utility slide-out-to-top-*{--tw-exit-translate-y: calc(--value(integer)*var(--spacing)*-1); --tw-exit-translate-y: calc(--value(--percentage-*,--percentage-translate-*)*-100%) ; --tw-exit-translate-y: calc(--value(ratio)*-100%) ; --tw-exit-translate-y: calc(--value(--translate-*,[percentage],[length])*-1) ;}@utility slide-out-to-bottom{--tw-exit-translate-y: 100%;}@utility slide-out-to-bottom-*{--tw-exit-translate-y: calc(--value(integer)*var(--spacing)); --tw-exit-translate-y: calc(--value(--percentage-*,--percentage-translate-*)*100%) ; --tw-exit-translate-y: calc(--value(ratio)*100%) ; --tw-exit-translate-y: --value(--translate-*,[percentage],[length]);}@utility slide-out-to-left{--tw-exit-translate-x: -100%;}@utility slide-out-to-left-*{--tw-exit-translate-x: calc(--value(integer)*var(--spacing)*-1); --tw-exit-translate-x: calc(--value(--percentage-*,--percentage-translate-*)*-100%) ; --tw-exit-translate-x: calc(--value(ratio)*-100%) ; --tw-exit-translate-x: calc(--value(--translate-*,[percentage],[length])*-1) ;}@utility slide-out-to-right{--tw-exit-translate-x: 100%;}@utility slide-out-to-right-*{--tw-exit-translate-x: calc(--value(integer)*var(--spacing)); --tw-exit-translate-x: calc(--value(--percentage-*,--percentage-translate-*)*100%) ; --tw-exit-translate-x: calc(--value(ratio)*100%) ; --tw-exit-translate-x: --value(--translate-*,[percentage],[length]);}@utility slide-out-to-start{&:dir(ltr){ --tw-exit-translate-x: -100%; }&:dir(rtl){ --tw-exit-translate-x: 100%; }}@utility slide-out-to-start-*{&:where(:dir(ltr),[dir="ltr"],[dir="ltr"]*){ --tw-exit-translate-x: calc(--value(integer)*var(--spacing)*-1); --tw-exit-translate-x: calc(--value(--percentage-*,--percentage-translate-*)*-100%) ; --tw-exit-translate-x: calc(--value(ratio)*-100%) ; --tw-exit-translate-x: calc(--value(--translate-*,[percentage],[length])*-1) ; }&:where(:dir(rtl),[dir="rtl"],[dir="rtl"]*){ --tw-exit-translate-x: calc(--value(integer)*var(--spacing)); --tw-exit-translate-x: calc(--value(--percentage-*,--percentage-translate-*)*100%) ; --tw-exit-translate-x: calc(--value(ratio)*100%) ; --tw-exit-translate-x: --value(--translate-*,[percentage],[length]); }}@utility slide-out-to-end{&:dir(ltr){ --tw-exit-translate-x: 100%; }&:dir(rtl){ --tw-exit-translate-x: -100%; }}@utility slide-out-to-end-*{&:where(:dir(ltr),[dir="ltr"],[dir="ltr"]*){ --tw-exit-translate-x: calc(--value(integer)*var(--spacing)); --tw-exit-translate-x: calc(--value(--percentage-*,--percentage-translate-*)*100%) ; --tw-exit-translate-x: calc(--value(ratio)*100%) ; --tw-exit-translate-x: --value(--translate-*,[percentage],[length]); }&:where(:dir(rtl),[dir="rtl"],[dir="rtl"]*){ --tw-exit-translate-x: calc(--value(integer)*var(--spacing)*-1); --tw-exit-translate-x: calc(--value(--percentage-*,--percentage-translate-*)*-100%) ; --tw-exit-translate-x: calc(--value(ratio)*-100%) ; --tw-exit-translate-x: calc(--value(--translate-*,[percentage],[length])*-1) ; }}@utility avatar{@apply aspect-square shrink-0 rounded-full object-cover; @apply [&:where(&:not(.avatar-sm,.avatar-base,.avatar-lg))]:avatar-base;}@utility avatar-fallback{@apply inline-flex items-center justify-center rounded-full bg-muted text-muted-foreground font-medium; @apply [&:where(&:not(.avatar-sm,.avatar-base,.avatar-lg))]:avatar-base;}@utility avatar-sm{@apply size-8 text-xs;}@utility avatar-base{@apply size-9 text-sm;}@utility avatar-lg{@apply size-10 text-base;}@utility avatar-group{@apply flex -space-x-2;}@utility avatar-group-item{@apply ring-2 ring-background;}@utility badge{@apply inline-flex items-center justify-center gap-1 rounded-full border px-2 py-0.5 text-xs font-medium w-fit whitespace-nowrap shrink-0 overflow-hidden transition-[color,box-shadow] [&_svg]:pointer-events-none [&_svg:not([class*="size-"])]:size-3 [&_svg]:shrink-0; @apply outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]; @apply [&:where(&:not(.badge-default,.badge-secondary,.badge-destructive,.badge-outline))]:badge-default;}@utility badge-default{@apply border-transparent bg-primary text-primary-foreground [&:is(a)]:hover:bg-primary/90;}@utility badge-secondary{@apply border-transparent bg-secondary text-secondary-foreground [&:is(a)]:hover:bg-secondary/90;}@utility badge-destructive{@apply border-transparent bg-destructive text-white dark:bg-destructive/60 [&:is(a)]:hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40;}@utility badge-outline{@apply text-foreground [&:is(a)]:hover:bg-accent [&:is(a)]:hover:text-accent-foreground;}@utility breadcrumb{@apply text-muted-foreground flex flex-wrap items-center gap-1.5 text-sm break-words sm:gap-2.5;}@utility breadcrumb-link{@apply inline-flex items-center gap-1.5 text-foreground; @apply hover:text-foreground transition-colors;}@utility breadcrumb-page{@apply inline-flex items-center gap-1.5 text-foreground;}@utility breadcrumb-separator{@apply [&>svg]:size-3.5;}@utility breadcrumb-collapsed{@apply flex size-9 items-center justify-center;}@utility btn{@apply inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*="size-"])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive; @apply [&:where(&:not(.btn-default,.btn-destructive,.btn-outline,.btn-secondary,.btn-ghost,.btn-link))]:btn-default; @apply [&:where(&:not(.btn-base,.btn-sm,.btn-lg,.btn-icon,.btn-icon-sm,.btn-icon-lg))]:btn-base;}@utility btn-default{@apply bg-primary text-primary-foreground hover:bg-primary/90;}@utility btn-destructive{@apply bg-destructive text-white hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60;}@utility btn-outline{@apply border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50;}@utility btn-secondary{@apply bg-secondary text-secondary-foreground hover:bg-secondary/80;}@utility btn-ghost{@apply hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50;}@utility btn-link{@apply text-primary underline-offset-4 hover:underline;}@utility btn-sm{@apply h-8 gap-1.5 px-3 has-[>svg]:px-2.5;}@utility btn-base{@apply h-9 px-4 py-2 has-[>svg]:px-3;}@utility btn-lg{@apply h-10 px-6 has-[>svg]:px-4;}@utility btn-icon-sm{@apply size-8;}@utility btn-icon{@apply size-9;}@utility btn-icon-lg{@apply size-10;}@utility btn-group{@apply flex w-fit items-stretch; @apply [&>*]:focus-visible:z-10 [&>*]:focus-visible:relative; @apply [&:where(&:not(.btn-group-horizontal,.btn-group-vertical))]:btn-group-horizontal;}@utility btn-group-horizontal{@apply [&>*:not(:first-child)]:rounded-l-none [&>*:not(:first-child)]:border-l-0; @apply [&>*:not(:last-child)]:rounded-r-none; @apply [&>.btn-group-separator]:h-auto [&>.btn-group-separator]:w-px;}@utility btn-group-vertical{@apply flex-col; @apply [&>*:not(:first-child)]:rounded-t-none [&>*:not(:first-child)]:border-t-0; @apply [&>*:not(:last-child)]:rounded-b-none; @apply [&>.btn-group-separator]:w-auto [&>.btn-group-separator]:h-px;}@utility btn-group-text{@apply bg-muted flex items-center gap-2 rounded-md border px-4 text-sm font-medium shadow-xs [&_svg]:pointer-events-none [&_svg:not([class*="size-"])]:size-4;}@utility btn-group-separator{@apply bg-input relative self-stretch;}@utility card{@apply text-card-foreground rounded-xl; @apply [&:where(&:not(.card-default,.card-outline,.card-muted))]:card-default;}@utility card-default{@apply bg-card border shadow-sm;}@utility card-outline{@apply bg-card border;}@utility card-muted{@apply bg-muted;}@utility card-content{@apply [&:where(&:not(.card-content-sm,.card-content-base,.card-content-lg))]:card-content-base;}@utility card-content-sm{@apply p-4;}@utility card-content-base{@apply p-6;}@utility card-content-lg{@apply p-12;}@utility checkbox{@apply border-input size-4 shrink-0 rounded-[4px] border shadow-xs transition-[box-shadow,background-color,border-color] outline-none appearance-none cursor-pointer; @apply dark:bg-input/30; @apply checked:bg-primary checked:border-primary; @apply disabled:cursor-not-allowed disabled:opacity-50; @apply focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]; @apply aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive; &:checked {background-image: url("data:image/svg+xml,%3csvg viewBox='0 0 16 16' fill='white' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M12.207 4.793a1 1 0 010 1.414l-5 5a1 1 0 01-1.414 0l-2-2a1 1 0 011.414-1.414L6.5 9.086l4.293-4.293a1 1 0 011.414 0z'/%3e%3c/svg%3e"); background-size: 100% 100%; background-position: center; background-repeat: no-repeat;} :is(.dark *) &:checked {background-image: url("data:image/svg+xml,%3csvg viewBox='0 0 16 16' fill='black' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M12.207 4.793a1 1 0 010 1.414l-5 5a1 1 0 01-1.414 0l-2-2a1 1 0 011.414-1.414L6.5 9.086l4.293-4.293a1 1 0 011.414 0z'/%3e%3c/svg%3e");}}@utility container{@apply px-6 w-full max-w-3xl lg:max-w-7xl mx-auto;}@utility container-wide{@apply px-6 w-full max-w-7xl mx-auto;}@utility container-fluid{@apply px-6 w-full;}@utility dialog{@apply isolate pointer-events-none fixed inset-0 z-999 w-full h-dvh p-0 bg-transparent border-none max-w-none max-h-none overflow-hidden; &::backdrop {@apply hidden;}}@utility dialog-backdrop{@apply fixed inset-0 bg-black/50 -z-1 pointer-events-auto [animation-fill-mode:forwards]!; @apply [&:not(.no-animation)]:data-[state=open]:animate-in [&:not(.no-animation)]:data-[state=closed]:animate-out [&:not(.no-animation)]:data-[state=open]:fade-in-0 [&:not(.no-animation)]:data-[state=closed]:fade-out-0;}@utility dialog-panel{@apply fixed pointer-events-auto top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 bg-background rounded-lg shadow-lg p-6 max-w-md w-[calc(100%-2rem)] max-h-[calc(100%-2rem)] overflow-y-auto [animation-fill-mode:forwards]!; @apply [&:not(.no-animation)]:data-[state=open]:animate-in [&:not(.no-animation)]:data-[state=closed]:animate-out [&:not(.no-animation)]:data-[state=open]:fade-in-0 [&:not(.no-animation)]:data-[state=open]:zoom-in-95 [&:not(.no-animation)]:data-[state=closed]:fade-out-0 [&:not(.no-animation)]:data-[state=closed]:zoom-out-95 [&:not(.no-animation)]:duration-200;}@utility dropdown{@apply relative inline-block;}@utility dropdown-menu{@apply absolute z-998 hidden min-w-40 overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md whitespace-nowrap; @apply [&:not(.no-animation)]:data-[state=open]:animate-in [&:not(.no-animation)]:data-[state=open]:fade-in-0 [&:not(.no-animation)]:data-[state=open]:zoom-in-95; &.open {@apply block;}}@utility dropdown-item{@apply relative flex cursor-default select-none items-center gap-2.5 rounded-sm px-2.5 py-1.5 text-sm outline-none transition-colors; @apply hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground; @apply [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*="size-"])]:size-4; &[aria-disabled="true"] {@apply pointer-events-none opacity-50;}}@utility dropdown-label{@apply px-2.5 py-1.5 text-sm font-medium;}@utility dropdown-separator{@apply -mx-1 my-1 h-px bg-border;}@utility input{@apply border-input w-full min-w-0 rounded-md border bg-transparent px-3 text-sm shadow-xs transition-[color,box-shadow] outline-none; @apply placeholder:text-muted-foreground; @apply dark:bg-input/30; @apply file:text-foreground file:inline-flex file:border-0 file:bg-transparent file:text-sm file:font-medium; @apply selection:bg-primary selection:text-primary-foreground; @apply disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50; @apply focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]; @apply aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive; @apply [&:where(&:not(.input-sm,.input-base,.input-lg))]:input-base;}@utility input-sm{@apply h-8 file:h-8;}@utility input-base{@apply h-9 file:h-9;}@utility input-lg{@apply h-10 file:h-10;}@utility input-group{@apply relative flex w-full items-center rounded-md border border-input bg-transparent shadow-xs transition-[color,box-shadow] outline-none dark:bg-input/30; @apply has-[:focus-visible]:border-ring has-[:focus-visible]:ring-ring/50 has-[:focus-visible]:ring-[3px]; @apply has-[[aria-invalid=true]]:ring-destructive/20 has-[[aria-invalid=true]]:border-destructive dark:has-[[aria-invalid=true]]:ring-destructive/40; @apply has-[:disabled]:opacity-50; @apply [&>.input]:flex-1 [&>.input]:min-w-0 [&>.input]:border-0 [&>.input]:shadow-none [&>.input]:rounded-none [&>.input]:focus-visible:ring-0 [&>.input]:dark:bg-transparent; @apply has-[>.input-group-addon:first-child]:[&>.input]:pl-0 has-[>.input-group-addon:last-child]:[&>.input]:pr-0; @apply [&:where(&:not(.input-group-sm,.input-group-base,.input-group-lg))]:input-group-base;}@utility input-group-sm{@apply h-8;}@utility input-group-base{@apply h-9;}@utility input-group-lg{@apply h-10;}@utility input-group-addon{@apply flex items-center justify-center gap-2 px-3 shrink-0 text-sm text-muted-foreground select-none cursor-text; @apply [&_svg:not([class*="size-"])]:size-4;}@utility label{@apply flex items-center gap-2 text-sm leading-none font-medium select-none; @apply group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50; @apply peer-disabled:cursor-not-allowed peer-disabled:opacity-50;}@utility select{@apply border-input w-full min-w-0 appearance-none rounded-md border bg-transparent text-sm shadow-xs transition-[color,box-shadow] outline-none; @apply placeholder:text-muted-foreground; @apply selection:bg-primary selection:text-primary-foreground; @apply dark:bg-input/30 dark:hover:bg-input/50; @apply disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50; @apply focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]; @apply aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive; @apply [&:where(&:not(.select-sm,.select-base,.select-lg))]:select-base; background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%2371717a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpath d='m6 9 6 6 6-6'/%3e%3c/svg%3e"); background-repeat: no-repeat; background-position: right .75rem center; background-size: 1rem;}@utility select-sm{@apply h-8 px-3 pr-9;}@utility select-base{@apply h-9 px-3 pr-9;}@utility select-lg{@apply h-10 px-3 pr-9;}@utility separator{@apply bg-border shrink-0; @apply [&:where(&:not(.separator-horizontal,.separator-vertical))]:separator-horizontal;}@utility separator-horizontal{@apply h-px w-full;}@utility separator-vertical{@apply h-full self-stretch w-px;}@utility sheet-backdrop{@apply fixed inset-0 bg-black/50 -z-1 pointer-events-auto [animation-fill-mode:forwards]!; @apply [&:not(.no-animation)]:data-[state=open]:animate-in [&:not(.no-animation)]:data-[state=closed]:animate-out [&:not(.no-animation)]:data-[state=open]:fade-in-0 [&:not(.no-animation)]:data-[state=closed]:fade-out-0;}@utility sheet-panel{@apply fixed pointer-events-auto bg-background shadow-lg p-6 [animation-fill-mode:forwards]!; @apply [&:where(&:not(.sheet-left,.sheet-right,.sheet-top,.sheet-bottom))]:sheet-left;}@utility sheet-left{@apply top-0 bottom-0 left-0 h-full w-3/4 max-w-sm border-r; @apply [&:not(.no-animation)]:data-[state=open]:animate-in [&:not(.no-animation)]:data-[state=closed]:animate-out [&:not(.no-animation)]:data-[state=open]:slide-in-from-left [&:not(.no-animation)]:data-[state=closed]:slide-out-to-left [&:not(.no-animation)]:duration-300;}@utility sheet-right{@apply top-0 bottom-0 right-0 h-full w-3/4 max-w-sm border-l; @apply [&:not(.no-animation)]:data-[state=open]:animate-in [&:not(.no-animation)]:data-[state=closed]:animate-out [&:not(.no-animation)]:data-[state=open]:slide-in-from-right [&:not(.no-animation)]:data-[state=closed]:slide-out-to-right [&:not(.no-animation)]:duration-300;}@utility sheet-top{@apply top-0 left-0 right-0 w-full border-b; @apply [&:not(.no-animation)]:data-[state=open]:animate-in [&:not(.no-animation)]:data-[state=closed]:animate-out [&:not(.no-animation)]:data-[state=open]:slide-in-from-top [&:not(.no-animation)]:data-[state=closed]:slide-out-to-top [&:not(.no-animation)]:duration-300;}@utility sheet-bottom{@apply bottom-0 left-0 right-0 w-full border-t; @apply [&:not(.no-animation)]:data-[state=open]:animate-in [&:not(.no-animation)]:data-[state=closed]:animate-out [&:not(.no-animation)]:data-[state=open]:slide-in-from-bottom [&:not(.no-animation)]:data-[state=closed]:slide-out-to-bottom [&:not(.no-animation)]:duration-300;}@utility table{@apply w-max min-w-full caption-bottom text-sm;}@utility table-header{@apply [&_tr]:border-b;}@utility table-body{@apply [&_tr:last-child]:border-0;}@utility table-footer{@apply bg-muted/50 border-t font-medium [&>tr]:last:border-b-0;}@utility table-row{@apply border-b transition-colors hover:bg-muted/50;}@utility table-head{@apply px-4 py-3 text-left align-middle font-medium text-foreground whitespace-nowrap;}@utility table-cell{@apply px-4 py-3 align-middle whitespace-nowrap;}@utility tab-list{@apply bg-muted text-muted-foreground inline-flex h-9 w-fit items-center justify-center rounded-lg p-[3px];}@utility tab{@apply text-foreground dark:text-muted-foreground inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center gap-1.5 rounded-md border border-transparent px-2 py-1 text-sm font-medium whitespace-nowrap transition-[color,box-shadow] disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*="size-"])]:size-4; @apply outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] focus-visible:outline-1 focus-visible:outline-ring; &.active {@apply bg-background shadow-sm dark:text-foreground dark:border-input dark:bg-input/30;}}@utility tab-panel{@apply hidden w-full min-w-0 outline-none; &.active {@apply block;}}@utility textarea{@apply border-input w-full rounded-md border bg-transparent shadow-xs transition-[color,box-shadow] outline-none; @apply placeholder:text-muted-foreground; @apply dark:bg-input/30; @apply field-sizing-content min-h-16 px-3 py-2 text-sm; @apply disabled:cursor-not-allowed disabled:opacity-50; @apply focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]; @apply aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive;}@custom-variant dark (&:is(.dark *));:root{--radius: .625rem;--background: oklch(1 0 0);--foreground: oklch(.145 0 0);--card: oklch(1 0 0);--card-foreground: oklch(.145 0 0);--popover: oklch(1 0 0);--popover-foreground: oklch(.145 0 0);--primary: oklch(.205 0 0);--primary-foreground: oklch(.985 0 0);--secondary: oklch(.97 0 0);--secondary-foreground: oklch(.205 0 0);--muted: oklch(.97 0 0);--muted-foreground: oklch(.556 0 0);--accent: oklch(.97 0 0);--accent-foreground: oklch(.205 0 0);--destructive: oklch(.577 .245 27.325);--border: oklch(.922 0 0);--input: oklch(.922 0 0);--ring: oklch(.708 0 0)}.dark{--background: oklch(.145 0 0);--foreground: oklch(.985 0 0);--card: oklch(.205 0 0);--card-foreground: oklch(.985 0 0);--popover: oklch(.205 0 0);--popover-foreground: oklch(.985 0 0);--primary: oklch(.922 0 0);--primary-foreground: oklch(.205 0 0);--secondary: oklch(.269 0 0);--secondary-foreground: oklch(.985 0 0);--muted: oklch(.269 0 0);--muted-foreground: oklch(.708 0 0);--accent: oklch(.269 0 0);--accent-foreground: oklch(.985 0 0);--destructive: oklch(.704 .191 22.216);--border: oklch(1 0 0 / 10%);--input: oklch(1 0 0 / 15%);--ring: oklch(.556 0 0)}@theme inline{ --color-background: var(--background); --color-foreground: var(--foreground); --color-card: var(--card); --color-card-foreground: var(--card-foreground); --color-popover: var(--popover); --color-popover-foreground: var(--popover-foreground); --color-primary: var(--primary); --color-primary-foreground: var(--primary-foreground); --color-secondary: var(--secondary); --color-secondary-foreground: var(--secondary-foreground); --color-muted: var(--muted); --color-muted-foreground: var(--muted-foreground); --color-accent: var(--accent); --color-accent-foreground: var(--accent-foreground); --color-destructive: var(--destructive); --color-destructive-foreground: var(--destructive-foreground); --color-border: var(--border); --color-input: var(--input); --color-ring: var(--ring); --radius-sm: calc(var(--radius) - 4px); --radius-md: calc(var(--radius) - 2px); --radius-lg: var(--radius); --radius-xl: calc(var(--radius) + 4px); }@layer base{*{@apply border-border outline-ring/50;}html{scrollbar-gutter:stable}html:has(dialog[open] :is(.dialog-backdrop,.sheet-backdrop)){@apply overflow-hidden;}body,.dark{@apply bg-background text-foreground;}}
|
|
1
|
+
@property --tw-animation-delay{syntax:"*";inherits:false;initial-value:0s}@property --tw-animation-direction{syntax:"*";inherits:false;initial-value:normal}@property --tw-animation-duration{syntax:"*";inherits:false}@property --tw-animation-fill-mode{syntax:"*";inherits:false;initial-value:none}@property --tw-animation-iteration-count{syntax:"*";inherits:false;initial-value:1}@property --tw-enter-blur{syntax:"*";inherits:false;initial-value:0}@property --tw-enter-opacity{syntax:"*";inherits:false;initial-value:1}@property --tw-enter-rotate{syntax:"*";inherits:false;initial-value:0}@property --tw-enter-scale{syntax:"*";inherits:false;initial-value:1}@property --tw-enter-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-enter-translate-y{syntax:"*";inherits:false;initial-value:0}@property --tw-exit-blur{syntax:"*";inherits:false;initial-value:0}@property --tw-exit-opacity{syntax:"*";inherits:false;initial-value:1}@property --tw-exit-rotate{syntax:"*";inherits:false;initial-value:0}@property --tw-exit-scale{syntax:"*";inherits:false;initial-value:1}@property --tw-exit-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-exit-translate-y{syntax:"*";inherits:false;initial-value:0}@theme inline{--animation-delay-0: 0s; --animation-delay-75: 75ms; --animation-delay-100: .1s; --animation-delay-150: .15s; --animation-delay-200: .2s; --animation-delay-300: .3s; --animation-delay-500: .5s; --animation-delay-700: .7s; --animation-delay-1000: 1s; --animation-repeat-0: 0; --animation-repeat-1: 1; --animation-repeat-infinite: infinite; --animation-direction-normal: normal; --animation-direction-reverse: reverse; --animation-direction-alternate: alternate; --animation-direction-alternate-reverse: alternate-reverse; --animation-fill-mode-none: none; --animation-fill-mode-forwards: forwards; --animation-fill-mode-backwards: backwards; --animation-fill-mode-both: both; --percentage-0: 0; --percentage-5: .05; --percentage-10: .1; --percentage-15: .15; --percentage-20: .2; --percentage-25: .25; --percentage-30: .3; --percentage-35: .35; --percentage-40: .4; --percentage-45: .45; --percentage-50: .5; --percentage-55: .55; --percentage-60: .6; --percentage-65: .65; --percentage-70: .7; --percentage-75: .75; --percentage-80: .8; --percentage-85: .85; --percentage-90: .9; --percentage-95: .95; --percentage-100: 1; --percentage-translate-full: 1; --animate-in: enter var(--tw-animation-duration,var(--tw-duration,.15s))var(--tw-ease,ease)var(--tw-animation-delay,0s)var(--tw-animation-iteration-count,1)var(--tw-animation-direction,normal)var(--tw-animation-fill-mode,none); --animate-out: exit var(--tw-animation-duration,var(--tw-duration,.15s))var(--tw-ease,ease)var(--tw-animation-delay,0s)var(--tw-animation-iteration-count,1)var(--tw-animation-direction,normal)var(--tw-animation-fill-mode,none); @keyframes enter { from { opacity: var(--tw-enter-opacity,1); transform: translate3d(var(--tw-enter-translate-x,0),var(--tw-enter-translate-y,0),0)scale3d(var(--tw-enter-scale,1),var(--tw-enter-scale,1),var(--tw-enter-scale,1))rotate(var(--tw-enter-rotate,0)); filter: blur(var(--tw-enter-blur,0)); }}@keyframes exit { to { opacity: var(--tw-exit-opacity,1); transform: translate3d(var(--tw-exit-translate-x,0),var(--tw-exit-translate-y,0),0)scale3d(var(--tw-exit-scale,1),var(--tw-exit-scale,1),var(--tw-exit-scale,1))rotate(var(--tw-exit-rotate,0)); filter: blur(var(--tw-exit-blur,0)); }}--animate-accordion-down: accordion-down var(--tw-animation-duration,var(--tw-duration,.2s))var(--tw-ease,ease-out)var(--tw-animation-delay,0s)var(--tw-animation-iteration-count,1)var(--tw-animation-direction,normal)var(--tw-animation-fill-mode,none); --animate-accordion-up: accordion-up var(--tw-animation-duration,var(--tw-duration,.2s))var(--tw-ease,ease-out)var(--tw-animation-delay,0s)var(--tw-animation-iteration-count,1)var(--tw-animation-direction,normal)var(--tw-animation-fill-mode,none); --animate-collapsible-down: collapsible-down var(--tw-animation-duration,var(--tw-duration,.2s))var(--tw-ease,ease-out)var(--tw-animation-delay,0s)var(--tw-animation-iteration-count,1)var(--tw-animation-direction,normal)var(--tw-animation-fill-mode,none); --animate-collapsible-up: collapsible-up var(--tw-animation-duration,var(--tw-duration,.2s))var(--tw-ease,ease-out)var(--tw-animation-delay,0s)var(--tw-animation-iteration-count,1)var(--tw-animation-direction,normal)var(--tw-animation-fill-mode,none); @keyframes accordion-down { from { height: 0; }to { height: var(--radix-accordion-content-height,var(--bits-accordion-content-height,var(--reka-accordion-content-height,var(--kb-accordion-content-height,var(--ngp-accordion-content-height,auto))))); }}@keyframes accordion-up { from { height: var(--radix-accordion-content-height,var(--bits-accordion-content-height,var(--reka-accordion-content-height,var(--kb-accordion-content-height,var(--ngp-accordion-content-height,auto))))); }to { height: 0; }}@keyframes collapsible-down { from { height: 0; }to { height: var(--radix-collapsible-content-height,var(--bits-collapsible-content-height,var(--reka-collapsible-content-height,var(--kb-collapsible-content-height,auto)))); }}@keyframes collapsible-up { from { height: var(--radix-collapsible-content-height,var(--bits-collapsible-content-height,var(--reka-collapsible-content-height,var(--kb-collapsible-content-height,auto)))); }to { height: 0; }}--animate-caret-blink: caret-blink 1.25s ease-out infinite; @keyframes caret-blink { 0%,70%,100% { opacity: 1; }20%,50% { opacity: 0; }}}@utility animation-duration-*{--tw-animation-duration: calc(--value(number)*1ms) ; --tw-animation-duration: --value(--animation-duration-*,[duration],"initial",[*]); animation-duration: calc(--value(number)*1ms) ; animation-duration: --value(--animation-duration-*,[duration],"initial",[*]);}@utility delay-*{animation-delay: calc(--value(number)*1ms) ; animation-delay: --value(--animation-delay-*,[duration],"initial",[*]); --tw-animation-delay: calc(--value(number)*1ms) ; --tw-animation-delay: --value(--animation-delay-*,[duration],"initial",[*]);}@utility repeat-*{animation-iteration-count: --value(--animation-repeat-*,number,"initial",[*]); --tw-animation-iteration-count: --value(--animation-repeat-*,number,"initial",[*]);}@utility direction-*{animation-direction: --value(--animation-direction-*,"initial",[*]); --tw-animation-direction: --value(--animation-direction-*,"initial",[*]);}@utility fill-mode-*{animation-fill-mode: --value(--animation-fill-mode-*,"initial",[*]); --tw-animation-fill-mode: --value(--animation-fill-mode-*,"initial",[*]);}@utility running{animation-play-state: running;}@utility paused{animation-play-state: paused;}@utility play-state-*{animation-play-state: --value("initial",[*]);}@utility blur-in{--tw-enter-blur: 20px;}@utility blur-in-*{--tw-enter-blur: calc(--value(number)*1px) ; --tw-enter-blur: --value(--blur-*,[*]);}@utility blur-out{--tw-exit-blur: 20px;}@utility blur-out-*{--tw-exit-blur: calc(--value(number)*1px) ; --tw-exit-blur: --value(--blur-*,[*]);}@utility fade-in{--tw-enter-opacity: 0;}@utility fade-in-*{--tw-enter-opacity: calc(--value(number)*.01) ; --tw-enter-opacity: --value(--percentage-*,[*]);}@utility fade-out{--tw-exit-opacity: 0;}@utility fade-out-*{--tw-exit-opacity: calc(--value(number)*.01) ; --tw-exit-opacity: --value(--percentage-*,[*]);}@utility zoom-in{--tw-enter-scale: 0;}@utility zoom-in-*{--tw-enter-scale: calc(--value(number)*1%) ; --tw-enter-scale: --value(ratio) ; --tw-enter-scale: --value(--percentage-*,[*]);}@utility -zoom-in-*{--tw-enter-scale: calc(--value(number)*-1%) ; --tw-enter-scale: calc(--value(ratio)*-1) ; --tw-enter-scale: --value(--percentage-*,[*]);}@utility zoom-out{--tw-exit-scale: 0;}@utility zoom-out-*{--tw-exit-scale: calc(--value(number)*1%) ; --tw-exit-scale: --value(ratio) ; --tw-exit-scale: --value(--percentage-*,[*]);}@utility -zoom-out-*{--tw-exit-scale: calc(--value(number)*-1%) ; --tw-exit-scale: calc(--value(ratio)*-1) ; --tw-exit-scale: --value(--percentage-*,[*]);}@utility spin-in{--tw-enter-rotate: 30deg;}@utility spin-in-*{--tw-enter-rotate: calc(--value(number)*1deg) ; --tw-enter-rotate: calc(--value(ratio)*360deg) ; --tw-enter-rotate: --value(--rotate-*,[*]);}@utility -spin-in{--tw-enter-rotate: -30deg;}@utility -spin-in-*{--tw-enter-rotate: calc(--value(number)*-1deg) ; --tw-enter-rotate: calc(--value(ratio)*-360deg) ; --tw-enter-rotate: --value(--rotate-*,[*]);}@utility spin-out{--tw-exit-rotate: 30deg;}@utility spin-out-*{--tw-exit-rotate: calc(--value(number)*1deg) ; --tw-exit-rotate: calc(--value(ratio)*360deg) ; --tw-exit-rotate: --value(--rotate-*,[*]);}@utility -spin-out{--tw-exit-rotate: -30deg;}@utility -spin-out-*{--tw-exit-rotate: calc(--value(number)*-1deg) ; --tw-exit-rotate: calc(--value(ratio)*-360deg) ; --tw-exit-rotate: --value(--rotate-*,[*]);}@utility slide-in-from-top{--tw-enter-translate-y: -100%;}@utility slide-in-from-top-*{--tw-enter-translate-y: calc(--value(integer)*var(--spacing)*-1); --tw-enter-translate-y: calc(--value(--percentage-*,--percentage-translate-*)*-100%) ; --tw-enter-translate-y: calc(--value(ratio)*-100%) ; --tw-enter-translate-y: calc(--value(--translate-*,[percentage],[length])*-1) ;}@utility slide-in-from-bottom{--tw-enter-translate-y: 100%;}@utility slide-in-from-bottom-*{--tw-enter-translate-y: calc(--value(integer)*var(--spacing)); --tw-enter-translate-y: calc(--value(--percentage-*,--percentage-translate-*)*100%) ; --tw-enter-translate-y: calc(--value(ratio)*100%) ; --tw-enter-translate-y: --value(--translate-*,[percentage],[length]);}@utility slide-in-from-left{--tw-enter-translate-x: -100%;}@utility slide-in-from-left-*{--tw-enter-translate-x: calc(--value(integer)*var(--spacing)*-1); --tw-enter-translate-x: calc(--value(--percentage-*,--percentage-translate-*)*-100%) ; --tw-enter-translate-x: calc(--value(ratio)*-100%) ; --tw-enter-translate-x: calc(--value(--translate-*,[percentage],[length])*-1) ;}@utility slide-in-from-right{--tw-enter-translate-x: 100%;}@utility slide-in-from-right-*{--tw-enter-translate-x: calc(--value(integer)*var(--spacing)); --tw-enter-translate-x: calc(--value(--percentage-*,--percentage-translate-*)*100%) ; --tw-enter-translate-x: calc(--value(ratio)*100%) ; --tw-enter-translate-x: --value(--translate-*,[percentage],[length]);}@utility slide-in-from-start{&:dir(ltr){ --tw-enter-translate-x: -100%; }&:dir(rtl){ --tw-enter-translate-x: 100%; }}@utility slide-in-from-start-*{&:where(:dir(ltr),[dir="ltr"],[dir="ltr"]*){ --tw-enter-translate-x: calc(--value(integer)*var(--spacing)*-1); --tw-enter-translate-x: calc(--value(--percentage-*,--percentage-translate-*)*-100%) ; --tw-enter-translate-x: calc(--value(ratio)*-100%) ; --tw-enter-translate-x: calc(--value(--translate-*,[percentage],[length])*-1) ; }&:where(:dir(rtl),[dir="rtl"],[dir="rtl"]*){ --tw-enter-translate-x: calc(--value(integer)*var(--spacing)); --tw-enter-translate-x: calc(--value(--percentage-*,--percentage-translate-*)*100%) ; --tw-enter-translate-x: calc(--value(ratio)*100%) ; --tw-enter-translate-x: --value(--translate-*,[percentage],[length]); }}@utility slide-in-from-end{&:dir(ltr){ --tw-enter-translate-x: 100%; }&:dir(rtl){ --tw-enter-translate-x: -100%; }}@utility slide-in-from-end-*{&:where(:dir(ltr),[dir="ltr"],[dir="ltr"]*){ --tw-enter-translate-x: calc(--value(integer)*var(--spacing)); --tw-enter-translate-x: calc(--value(--percentage-*,--percentage-translate-*)*100%) ; --tw-enter-translate-x: calc(--value(ratio)*100%) ; --tw-enter-translate-x: --value(--translate-*,[percentage],[length]); }&:where(:dir(rtl),[dir="rtl"],[dir="rtl"]*){ --tw-enter-translate-x: calc(--value(integer)*var(--spacing)*-1); --tw-enter-translate-x: calc(--value(--percentage-*,--percentage-translate-*)*-100%) ; --tw-enter-translate-x: calc(--value(ratio)*-100%) ; --tw-enter-translate-x: calc(--value(--translate-*,[percentage],[length])*-1) ; }}@utility slide-out-to-top{--tw-exit-translate-y: -100%;}@utility slide-out-to-top-*{--tw-exit-translate-y: calc(--value(integer)*var(--spacing)*-1); --tw-exit-translate-y: calc(--value(--percentage-*,--percentage-translate-*)*-100%) ; --tw-exit-translate-y: calc(--value(ratio)*-100%) ; --tw-exit-translate-y: calc(--value(--translate-*,[percentage],[length])*-1) ;}@utility slide-out-to-bottom{--tw-exit-translate-y: 100%;}@utility slide-out-to-bottom-*{--tw-exit-translate-y: calc(--value(integer)*var(--spacing)); --tw-exit-translate-y: calc(--value(--percentage-*,--percentage-translate-*)*100%) ; --tw-exit-translate-y: calc(--value(ratio)*100%) ; --tw-exit-translate-y: --value(--translate-*,[percentage],[length]);}@utility slide-out-to-left{--tw-exit-translate-x: -100%;}@utility slide-out-to-left-*{--tw-exit-translate-x: calc(--value(integer)*var(--spacing)*-1); --tw-exit-translate-x: calc(--value(--percentage-*,--percentage-translate-*)*-100%) ; --tw-exit-translate-x: calc(--value(ratio)*-100%) ; --tw-exit-translate-x: calc(--value(--translate-*,[percentage],[length])*-1) ;}@utility slide-out-to-right{--tw-exit-translate-x: 100%;}@utility slide-out-to-right-*{--tw-exit-translate-x: calc(--value(integer)*var(--spacing)); --tw-exit-translate-x: calc(--value(--percentage-*,--percentage-translate-*)*100%) ; --tw-exit-translate-x: calc(--value(ratio)*100%) ; --tw-exit-translate-x: --value(--translate-*,[percentage],[length]);}@utility slide-out-to-start{&:dir(ltr){ --tw-exit-translate-x: -100%; }&:dir(rtl){ --tw-exit-translate-x: 100%; }}@utility slide-out-to-start-*{&:where(:dir(ltr),[dir="ltr"],[dir="ltr"]*){ --tw-exit-translate-x: calc(--value(integer)*var(--spacing)*-1); --tw-exit-translate-x: calc(--value(--percentage-*,--percentage-translate-*)*-100%) ; --tw-exit-translate-x: calc(--value(ratio)*-100%) ; --tw-exit-translate-x: calc(--value(--translate-*,[percentage],[length])*-1) ; }&:where(:dir(rtl),[dir="rtl"],[dir="rtl"]*){ --tw-exit-translate-x: calc(--value(integer)*var(--spacing)); --tw-exit-translate-x: calc(--value(--percentage-*,--percentage-translate-*)*100%) ; --tw-exit-translate-x: calc(--value(ratio)*100%) ; --tw-exit-translate-x: --value(--translate-*,[percentage],[length]); }}@utility slide-out-to-end{&:dir(ltr){ --tw-exit-translate-x: 100%; }&:dir(rtl){ --tw-exit-translate-x: -100%; }}@utility slide-out-to-end-*{&:where(:dir(ltr),[dir="ltr"],[dir="ltr"]*){ --tw-exit-translate-x: calc(--value(integer)*var(--spacing)); --tw-exit-translate-x: calc(--value(--percentage-*,--percentage-translate-*)*100%) ; --tw-exit-translate-x: calc(--value(ratio)*100%) ; --tw-exit-translate-x: --value(--translate-*,[percentage],[length]); }&:where(:dir(rtl),[dir="rtl"],[dir="rtl"]*){ --tw-exit-translate-x: calc(--value(integer)*var(--spacing)*-1); --tw-exit-translate-x: calc(--value(--percentage-*,--percentage-translate-*)*-100%) ; --tw-exit-translate-x: calc(--value(ratio)*-100%) ; --tw-exit-translate-x: calc(--value(--translate-*,[percentage],[length])*-1) ; }}@utility accordion{@apply w-full divide-y;}@utility accordion-trigger{@apply flex w-full flex-1 items-center gap-4 rounded-md py-4 text-left text-sm font-medium transition-all outline-none hover:underline focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] disabled:pointer-events-none disabled:opacity-50; @apply [&:where(&:not(.accordion-trigger-icon-arrow,.accordion-trigger-icon-plus,.accordion-trigger-icon-none))]:accordion-trigger-icon-arrow; @apply [&:where(&:not(.accordion-trigger-icon-start,.accordion-trigger-icon-end))]:accordion-trigger-icon-end; &::after {@apply shrink-0 size-4 transition-transform duration-200; content: ""; background-size: 100%; background-repeat: no-repeat;}}@utility accordion-trigger-icon-arrow{&::after {background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%2371717a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpath d='m6 9 6 6 6-6'/%3e%3c/svg%3e");} &[aria-expanded="true"]::after {@apply rotate-180;}}@utility accordion-trigger-icon-plus{&::after {background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%2371717a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpath d='M5 12h14'/%3e%3cpath d='M12 5v14'/%3e%3c/svg%3e");} &[aria-expanded="true"]::after {background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%2371717a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpath d='M5 12h14'/%3e%3c/svg%3e");}}@utility accordion-trigger-icon-none{&::after {@apply hidden;}}@utility accordion-trigger-icon-end{@apply justify-between;}@utility accordion-trigger-icon-start{@apply flex-row-reverse justify-end;}@utility accordion-panel{@apply invisible h-0 overflow-hidden; @apply [&:not(.no-animation)]:data-[state=open]:animate-accordion-down; @apply [&:not(.no-animation)]:data-[state=closed]:animate-accordion-up; &.open {@apply visible h-auto;}}@utility accordion-content{@apply pb-4 text-sm/6 text-muted-foreground;}@utility avatar{@apply aspect-square shrink-0 rounded-full object-cover; @apply [&:where(&:not(.avatar-sm,.avatar-base,.avatar-lg))]:avatar-base;}@utility avatar-fallback{@apply inline-flex items-center justify-center rounded-full bg-muted text-muted-foreground font-medium; @apply [&:where(&:not(.avatar-sm,.avatar-base,.avatar-lg))]:avatar-base;}@utility avatar-sm{@apply size-8 text-xs;}@utility avatar-base{@apply size-9 text-sm;}@utility avatar-lg{@apply size-10 text-base;}@utility avatar-group{@apply flex -space-x-2;}@utility avatar-group-item{@apply ring-2 ring-background;}@utility badge{@apply inline-flex items-center justify-center gap-1 rounded-full border px-2 py-0.5 text-xs font-medium w-fit whitespace-nowrap shrink-0 overflow-hidden transition-[color,box-shadow] [&_svg]:pointer-events-none [&_svg:not([class*="size-"])]:size-3 [&_svg]:shrink-0; @apply outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]; @apply [&:where(&:not(.badge-default,.badge-secondary,.badge-destructive,.badge-outline))]:badge-default;}@utility badge-default{@apply border-transparent bg-primary text-primary-foreground [&:is(a)]:hover:bg-primary/90;}@utility badge-secondary{@apply border-transparent bg-secondary text-secondary-foreground [&:is(a)]:hover:bg-secondary/90;}@utility badge-destructive{@apply border-transparent bg-destructive text-white dark:bg-destructive/60 [&:is(a)]:hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40;}@utility badge-outline{@apply text-foreground [&:is(a)]:hover:bg-accent [&:is(a)]:hover:text-accent-foreground;}@utility breadcrumb{@apply text-muted-foreground flex flex-wrap items-center gap-1.5 text-sm break-words sm:gap-2.5;}@utility breadcrumb-link{@apply inline-flex items-center gap-1.5 text-foreground; @apply hover:text-foreground transition-colors;}@utility breadcrumb-page{@apply inline-flex items-center gap-1.5 text-foreground;}@utility breadcrumb-separator{@apply [&>svg]:size-3.5;}@utility breadcrumb-collapsed{@apply flex size-9 items-center justify-center;}@utility btn{@apply inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*="size-"])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive; @apply [&:where(&:not(.btn-default,.btn-destructive,.btn-outline,.btn-secondary,.btn-ghost,.btn-link))]:btn-default; @apply [&:where(&:not(.btn-base,.btn-sm,.btn-lg,.btn-icon,.btn-icon-sm,.btn-icon-lg))]:btn-base;}@utility btn-default{@apply bg-primary text-primary-foreground hover:bg-primary/90;}@utility btn-destructive{@apply bg-destructive text-white hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60;}@utility btn-outline{@apply border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50;}@utility btn-secondary{@apply bg-secondary text-secondary-foreground hover:bg-secondary/80;}@utility btn-ghost{@apply hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50;}@utility btn-link{@apply text-primary underline-offset-4 hover:underline;}@utility btn-sm{@apply h-8 gap-1.5 px-3 has-[>svg]:px-2.5;}@utility btn-base{@apply h-9 px-4 py-2 has-[>svg]:px-3;}@utility btn-lg{@apply h-10 px-6 has-[>svg]:px-4;}@utility btn-icon-sm{@apply size-8;}@utility btn-icon{@apply size-9;}@utility btn-icon-lg{@apply size-10;}@utility btn-group{@apply flex w-fit items-stretch; @apply [&>*]:focus-visible:z-10 [&>*]:focus-visible:relative; @apply [&:where(&:not(.btn-group-horizontal,.btn-group-vertical))]:btn-group-horizontal;}@utility btn-group-horizontal{@apply [&>*:not(:first-child)]:rounded-l-none [&>*:not(:first-child)]:border-l-0; @apply [&>*:not(:last-child)]:rounded-r-none; @apply [&>.btn-group-separator]:h-auto [&>.btn-group-separator]:w-px;}@utility btn-group-vertical{@apply flex-col; @apply [&>*:not(:first-child)]:rounded-t-none [&>*:not(:first-child)]:border-t-0; @apply [&>*:not(:last-child)]:rounded-b-none; @apply [&>.btn-group-separator]:w-auto [&>.btn-group-separator]:h-px;}@utility btn-group-text{@apply bg-muted flex items-center gap-2 rounded-md border px-4 text-sm font-medium shadow-xs [&_svg]:pointer-events-none [&_svg:not([class*="size-"])]:size-4;}@utility btn-group-separator{@apply bg-input relative self-stretch;}@utility card{@apply text-card-foreground rounded-xl; @apply [&:where(&:not(.card-default,.card-outline,.card-muted))]:card-default;}@utility card-default{@apply bg-card border shadow-sm;}@utility card-outline{@apply bg-card border;}@utility card-muted{@apply bg-muted;}@utility card-content{@apply [&:where(&:not(.card-content-sm,.card-content-base,.card-content-lg))]:card-content-base;}@utility card-content-sm{@apply p-4;}@utility card-content-base{@apply p-6;}@utility card-content-lg{@apply p-12;}@utility checkbox{@apply border-input size-4 shrink-0 rounded-[4px] border shadow-xs transition-[box-shadow,background-color,border-color] outline-none appearance-none cursor-pointer; @apply dark:bg-input/30; @apply checked:bg-primary checked:border-primary; @apply disabled:cursor-not-allowed disabled:opacity-50; @apply focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]; @apply aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive; &:checked {background-image: url("data:image/svg+xml,%3csvg viewBox='0 0 16 16' fill='white' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M12.207 4.793a1 1 0 010 1.414l-5 5a1 1 0 01-1.414 0l-2-2a1 1 0 011.414-1.414L6.5 9.086l4.293-4.293a1 1 0 011.414 0z'/%3e%3c/svg%3e"); background-size: 100% 100%; background-position: center; background-repeat: no-repeat;} :is(.dark *) &:checked {background-image: url("data:image/svg+xml,%3csvg viewBox='0 0 16 16' fill='black' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M12.207 4.793a1 1 0 010 1.414l-5 5a1 1 0 01-1.414 0l-2-2a1 1 0 011.414-1.414L6.5 9.086l4.293-4.293a1 1 0 011.414 0z'/%3e%3c/svg%3e");}}@utility collapsible-panel{@apply invisible h-0 overflow-hidden; @apply [&:not(.no-animation)]:data-[state=open]:animate-collapsible-down; @apply [&:not(.no-animation)]:data-[state=closed]:animate-collapsible-up; &.open {@apply visible h-auto;}}@utility collapsible-content{@apply flex flex-col gap-2;}@utility container{@apply px-6 w-full max-w-3xl lg:max-w-7xl mx-auto;}@utility container-wide{@apply px-6 w-full max-w-7xl mx-auto;}@utility container-fluid{@apply px-6 w-full;}@utility dialog{@apply isolate pointer-events-none fixed inset-0 z-999 w-full h-dvh p-0 bg-transparent border-none max-w-none max-h-none overflow-hidden; &::backdrop {@apply hidden;}}@utility dialog-backdrop{@apply fixed inset-0 bg-black/50 -z-1 pointer-events-auto [animation-fill-mode:forwards]!; @apply [&:not(.no-animation)]:data-[state=open]:animate-in [&:not(.no-animation)]:data-[state=closed]:animate-out [&:not(.no-animation)]:data-[state=open]:fade-in-0 [&:not(.no-animation)]:data-[state=closed]:fade-out-0;}@utility dialog-panel{@apply fixed pointer-events-auto top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 bg-background rounded-lg shadow-lg max-w-md w-[calc(100%-2rem)] max-h-[calc(100%-2rem)] overflow-y-auto [animation-fill-mode:forwards]!; @apply [&:not(.no-animation)]:data-[state=open]:animate-in [&:not(.no-animation)]:data-[state=closed]:animate-out [&:not(.no-animation)]:data-[state=open]:fade-in-0 [&:not(.no-animation)]:data-[state=open]:zoom-in-95 [&:not(.no-animation)]:data-[state=closed]:fade-out-0 [&:not(.no-animation)]:data-[state=closed]:zoom-out-95 [&:not(.no-animation)]:duration-200;}@utility dialog-content{@apply p-6;}@utility dropdown{@apply relative inline-block;}@utility dropdown-menu{@apply absolute z-998 hidden min-w-40 overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md whitespace-nowrap; @apply [&:not(.no-animation)]:data-[state=open]:animate-in [&:not(.no-animation)]:data-[state=open]:fade-in-0 [&:not(.no-animation)]:data-[state=open]:zoom-in-95; &.open {@apply block;}}@utility dropdown-item{@apply relative flex cursor-default select-none items-center gap-2.5 rounded-sm px-2.5 py-1.5 text-sm outline-none transition-colors; @apply hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground; @apply [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*="size-"])]:size-4; &[aria-disabled="true"] {@apply pointer-events-none opacity-50;}}@utility dropdown-label{@apply px-2.5 py-1.5 text-sm font-medium;}@utility dropdown-separator{@apply -mx-1 my-1 h-px bg-border;}@utility input{@apply border-input w-full min-w-0 rounded-md border bg-transparent px-3 text-sm shadow-xs transition-[color,box-shadow] outline-none; @apply placeholder:text-muted-foreground; @apply dark:bg-input/30; @apply file:text-foreground file:inline-flex file:border-0 file:bg-transparent file:text-sm file:font-medium; @apply selection:bg-primary selection:text-primary-foreground; @apply disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50; @apply focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]; @apply aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive; @apply [&:where(&:not(.input-sm,.input-base,.input-lg))]:input-base;}@utility input-sm{@apply h-8 file:h-8;}@utility input-base{@apply h-9 file:h-9;}@utility input-lg{@apply h-10 file:h-10;}@utility input-group{@apply relative flex w-full items-center rounded-md border border-input bg-transparent shadow-xs transition-[color,box-shadow] outline-none dark:bg-input/30; @apply has-[:focus-visible]:border-ring has-[:focus-visible]:ring-ring/50 has-[:focus-visible]:ring-[3px]; @apply has-[[aria-invalid=true]]:ring-destructive/20 has-[[aria-invalid=true]]:border-destructive dark:has-[[aria-invalid=true]]:ring-destructive/40; @apply has-[:disabled]:opacity-50; @apply [&>.input]:flex-1 [&>.input]:min-w-0 [&>.input]:border-0 [&>.input]:shadow-none [&>.input]:rounded-none [&>.input]:focus-visible:ring-0 [&>.input]:dark:bg-transparent; @apply has-[>.input-group-addon:first-child]:[&>.input]:pl-0 has-[>.input-group-addon:last-child]:[&>.input]:pr-0; @apply [&:where(&:not(.input-group-sm,.input-group-base,.input-group-lg))]:input-group-base;}@utility input-group-sm{@apply h-8;}@utility input-group-base{@apply h-9;}@utility input-group-lg{@apply h-10;}@utility input-group-addon{@apply flex items-center justify-center gap-2 px-3 shrink-0 text-sm text-muted-foreground select-none cursor-text; @apply [&_svg:not([class*="size-"])]:size-4;}@utility label{@apply flex items-center gap-2 text-sm leading-none font-medium select-none; @apply group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50; @apply peer-disabled:cursor-not-allowed peer-disabled:opacity-50;}@utility radio{@apply border-input text-primary size-4 shrink-0 rounded-full border shadow-xs outline-none appearance-none cursor-pointer; @apply transition-[color,box-shadow]; @apply dark:bg-input/30; @apply disabled:cursor-not-allowed disabled:opacity-50; @apply focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]; @apply aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive; &:checked {background-image: url("data:image/svg+xml,%3csvg viewBox='0 0 16 16' xmlns='http://www.w3.org/2000/svg'%3e%3ccircle cx='8' cy='8' r='3' fill='%23171717'/%3e%3c/svg%3e"); background-size: 100% 100%; background-position: center; background-repeat: no-repeat;} :is(.dark *) &:checked {background-image: url("data:image/svg+xml,%3csvg viewBox='0 0 16 16' xmlns='http://www.w3.org/2000/svg'%3e%3ccircle cx='8' cy='8' r='3' fill='%23fafafa'/%3e%3c/svg%3e");}}@utility select{@apply border-input w-full min-w-0 appearance-none rounded-md border bg-transparent text-sm shadow-xs transition-[color,box-shadow] outline-none; @apply placeholder:text-muted-foreground; @apply selection:bg-primary selection:text-primary-foreground; @apply dark:bg-input/30 dark:hover:bg-input/50; @apply disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50; @apply focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]; @apply aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive; @apply [&:where(&:not(.select-sm,.select-base,.select-lg))]:select-base; background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%2371717a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpath d='m6 9 6 6 6-6'/%3e%3c/svg%3e"); background-repeat: no-repeat; background-position: right .75rem center; background-size: 1rem;}@utility select-sm{@apply h-8 px-3 pr-9;}@utility select-base{@apply h-9 px-3 pr-9;}@utility select-lg{@apply h-10 px-3 pr-9;}@utility separator{@apply bg-border shrink-0; @apply [&:where(&:not(.separator-horizontal,.separator-vertical))]:separator-horizontal;}@utility separator-horizontal{@apply h-px w-full;}@utility separator-vertical{@apply h-full self-stretch w-px;}@utility sheet-backdrop{@apply fixed inset-0 bg-black/50 -z-1 pointer-events-auto [animation-fill-mode:forwards]!; @apply [&:not(.no-animation)]:data-[state=open]:animate-in [&:not(.no-animation)]:data-[state=closed]:animate-out [&:not(.no-animation)]:data-[state=open]:fade-in-0 [&:not(.no-animation)]:data-[state=closed]:fade-out-0;}@utility sheet-panel{@apply fixed pointer-events-auto bg-background shadow-lg [animation-fill-mode:forwards]!; @apply [&:where(&:not(.sheet-left,.sheet-right,.sheet-top,.sheet-bottom))]:sheet-left;}@utility sheet-content{@apply p-6;}@utility sheet-left{@apply top-0 bottom-0 left-0 h-full w-3/4 max-w-sm border-r; @apply [&:not(.no-animation)]:data-[state=open]:animate-in [&:not(.no-animation)]:data-[state=closed]:animate-out [&:not(.no-animation)]:data-[state=open]:slide-in-from-left [&:not(.no-animation)]:data-[state=closed]:slide-out-to-left [&:not(.no-animation)]:duration-300;}@utility sheet-right{@apply top-0 bottom-0 right-0 h-full w-3/4 max-w-sm border-l; @apply [&:not(.no-animation)]:data-[state=open]:animate-in [&:not(.no-animation)]:data-[state=closed]:animate-out [&:not(.no-animation)]:data-[state=open]:slide-in-from-right [&:not(.no-animation)]:data-[state=closed]:slide-out-to-right [&:not(.no-animation)]:duration-300;}@utility sheet-top{@apply top-0 left-0 right-0 w-full border-b; @apply [&:not(.no-animation)]:data-[state=open]:animate-in [&:not(.no-animation)]:data-[state=closed]:animate-out [&:not(.no-animation)]:data-[state=open]:slide-in-from-top [&:not(.no-animation)]:data-[state=closed]:slide-out-to-top [&:not(.no-animation)]:duration-300;}@utility sheet-bottom{@apply bottom-0 left-0 right-0 w-full border-t; @apply [&:not(.no-animation)]:data-[state=open]:animate-in [&:not(.no-animation)]:data-[state=closed]:animate-out [&:not(.no-animation)]:data-[state=open]:slide-in-from-bottom [&:not(.no-animation)]:data-[state=closed]:slide-out-to-bottom [&:not(.no-animation)]:duration-300;}@utility sidebar{@apply flex min-h-dvh w-full overflow-x-clip;}@utility sidebar-panel{@apply bg-sidebar text-sidebar-foreground fixed inset-y-0 z-50 w-(--sidebar-width) hidden; @apply sidebar:relative sidebar:z-auto sidebar:block sidebar:shrink-0; @apply [&:not(.no-animation)]:sidebar:transition-[margin] [&:not(.no-animation)]:sidebar:duration-200 [&:not(.no-animation)]:sidebar:ease-linear; @apply [&:not(.no-animation)]:data-[state=open]:animate-in [&:not(.no-animation)]:data-[state=closed]:animate-out [&:not(.no-animation)]:duration-300 [&:not(.no-animation)]:data-[state]:[animation-fill-mode:forwards]!; @apply sidebar:translate-x-0 sidebar:animate-none!; @apply [&:where(&:not(.sidebar-left,.sidebar-right))]:sidebar-left; &.open {@apply block;}}@utility sidebar-left{@apply left-0 border-r; @apply [&:not(.no-animation)]:data-[state=open]:slide-in-from-left [&:not(.no-animation)]:data-[state=closed]:slide-out-to-left; &.collapsed {@apply sidebar:-ml-(--sidebar-width);}}@utility sidebar-right{@apply right-0 border-l; @apply [&:not(.no-animation)]:data-[state=open]:slide-in-from-right [&:not(.no-animation)]:data-[state=closed]:slide-out-to-right; &.collapsed {@apply sidebar:-mr-(--sidebar-width);}}@utility sidebar-content{@apply p-4 h-full overflow-y-auto sidebar:h-auto sidebar:sticky sidebar:top-0 sidebar:max-h-dvh;}@utility sidebar-backdrop{@apply fixed inset-0 z-40 bg-black/50 hidden sidebar:hidden; @apply [&:not(.no-animation)]:data-[state=open]:animate-in [&:not(.no-animation)]:data-[state=closed]:animate-out [&:not(.no-animation)]:data-[state=open]:fade-in-0 [&:not(.no-animation)]:data-[state=closed]:fade-out-0 [&:not(.no-animation)]:duration-300 [&:not(.no-animation)]:data-[state]:[animation-fill-mode:forwards]!; &.open {@apply block pointer-events-auto;}}@utility switch{@apply h-[1.15rem] w-8 shrink-0 rounded-full border border-transparent shadow-xs outline-none appearance-none cursor-pointer; @apply transition-[color,box-shadow,background-color]; @apply bg-input dark:bg-input/80; @apply checked:bg-primary; @apply disabled:cursor-not-allowed disabled:opacity-50; @apply focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]; @apply aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive; &::before {content: ""; @apply block size-4 rounded-full shadow-xs transition-transform; @apply bg-background dark:bg-foreground;} &:checked::before {@apply translate-x-[calc(100%-2px)] bg-background dark:bg-primary-foreground;}}@utility table{@apply w-max min-w-full caption-bottom text-sm;}@utility table-header{@apply [&_tr]:border-b;}@utility table-body{@apply [&_tr:last-child]:border-0;}@utility table-footer{@apply bg-muted/50 border-t font-medium [&>tr]:last:border-b-0;}@utility table-row{@apply border-b transition-colors hover:bg-muted/50;}@utility table-head{@apply px-4 py-3 text-left align-middle font-medium text-foreground whitespace-nowrap;}@utility table-cell{@apply px-4 py-3 align-middle whitespace-nowrap;}@utility tab-list{@apply bg-muted text-muted-foreground inline-flex h-9 w-fit items-center justify-center rounded-lg p-[3px];}@utility tab{@apply text-foreground dark:text-muted-foreground inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center gap-1.5 rounded-md border border-transparent px-2 py-1 text-sm font-medium whitespace-nowrap transition-[color,box-shadow] disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*="size-"])]:size-4; @apply outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] focus-visible:outline-1 focus-visible:outline-ring; &.active {@apply bg-background shadow-sm dark:text-foreground dark:border-input dark:bg-input/30;}}@utility tab-panel{@apply hidden w-full min-w-0 outline-none; &.active {@apply block;}}@utility textarea{@apply border-input w-full rounded-md border bg-transparent shadow-xs transition-[color,box-shadow] outline-none; @apply placeholder:text-muted-foreground; @apply dark:bg-input/30; @apply field-sizing-content min-h-16 px-3 py-2 text-sm; @apply disabled:cursor-not-allowed disabled:opacity-50; @apply focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]; @apply aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive;}@custom-variant dark (&:is(.dark *));:root{--radius: .625rem;--background: oklch(1 0 0);--foreground: oklch(.145 0 0);--card: oklch(1 0 0);--card-foreground: oklch(.145 0 0);--popover: oklch(1 0 0);--popover-foreground: oklch(.145 0 0);--primary: oklch(.205 0 0);--primary-foreground: oklch(.985 0 0);--secondary: oklch(.97 0 0);--secondary-foreground: oklch(.205 0 0);--muted: oklch(.97 0 0);--muted-foreground: oklch(.556 0 0);--accent: oklch(.97 0 0);--accent-foreground: oklch(.205 0 0);--destructive: oklch(.577 .245 27.325);--border: oklch(.922 0 0);--input: oklch(.922 0 0);--ring: oklch(.708 0 0);--sidebar: oklch(.985 0 0);--sidebar-foreground: oklch(.145 0 0);--sidebar-primary: oklch(.205 0 0);--sidebar-primary-foreground: oklch(.985 0 0);--sidebar-accent: oklch(.97 0 0);--sidebar-accent-foreground: oklch(.205 0 0);--sidebar-border: oklch(.922 0 0);--sidebar-ring: oklch(.708 0 0);--sidebar-width: 16rem}.dark{--background: oklch(.145 0 0);--foreground: oklch(.985 0 0);--card: oklch(.205 0 0);--card-foreground: oklch(.985 0 0);--popover: oklch(.205 0 0);--popover-foreground: oklch(.985 0 0);--primary: oklch(.922 0 0);--primary-foreground: oklch(.205 0 0);--secondary: oklch(.269 0 0);--secondary-foreground: oklch(.985 0 0);--muted: oklch(.269 0 0);--muted-foreground: oklch(.708 0 0);--accent: oklch(.269 0 0);--accent-foreground: oklch(.985 0 0);--destructive: oklch(.704 .191 22.216);--border: oklch(1 0 0 / 10%);--input: oklch(1 0 0 / 15%);--ring: oklch(.556 0 0);--sidebar: oklch(.205 0 0);--sidebar-foreground: oklch(.985 0 0);--sidebar-primary: oklch(.922 0 0);--sidebar-primary-foreground: oklch(.205 0 0);--sidebar-accent: oklch(.269 0 0);--sidebar-accent-foreground: oklch(.985 0 0);--sidebar-border: oklch(1 0 0 / 10%);--sidebar-ring: oklch(.556 0 0)}@theme inline{ --breakpoint-sidebar: 1024px; --color-background: var(--background); --color-foreground: var(--foreground); --color-card: var(--card); --color-card-foreground: var(--card-foreground); --color-popover: var(--popover); --color-popover-foreground: var(--popover-foreground); --color-primary: var(--primary); --color-primary-foreground: var(--primary-foreground); --color-secondary: var(--secondary); --color-secondary-foreground: var(--secondary-foreground); --color-muted: var(--muted); --color-muted-foreground: var(--muted-foreground); --color-accent: var(--accent); --color-accent-foreground: var(--accent-foreground); --color-destructive: var(--destructive); --color-destructive-foreground: var(--destructive-foreground); --color-border: var(--border); --color-input: var(--input); --color-ring: var(--ring); --color-sidebar: var(--sidebar); --color-sidebar-foreground: var(--sidebar-foreground); --color-sidebar-primary: var(--sidebar-primary); --color-sidebar-primary-foreground: var(--sidebar-primary-foreground); --color-sidebar-accent: var(--sidebar-accent); --color-sidebar-accent-foreground: var(--sidebar-accent-foreground); --color-sidebar-border: var(--sidebar-border); --color-sidebar-ring: var(--sidebar-ring); --radius-sm: calc(var(--radius) - 4px); --radius-md: calc(var(--radius) - 2px); --radius-lg: var(--radius); --radius-xl: calc(var(--radius) + 4px); }@layer base{*{@apply border-border outline-ring/50;}html{scrollbar-gutter:stable}html:has(dialog[open] :is(.dialog-backdrop,.sheet-backdrop)){@apply overflow-hidden;}body,.dark{@apply bg-background text-foreground;}}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,20 +1,44 @@
|
|
|
1
|
-
declare function open$
|
|
2
|
-
declare function close$
|
|
3
|
-
declare function toggle$
|
|
1
|
+
declare function open$4(target: HTMLElement): void;
|
|
2
|
+
declare function close$4(target: HTMLElement): Promise<void>;
|
|
3
|
+
declare function toggle$4(target: HTMLElement): void;
|
|
4
|
+
|
|
5
|
+
declare namespace accordion {
|
|
6
|
+
export { close$4 as close, open$4 as open, toggle$4 as toggle };
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
declare function open$3(target: HTMLElement): void;
|
|
10
|
+
declare function close$3(target: HTMLElement): Promise<void>;
|
|
11
|
+
declare function toggle$3(target: HTMLElement): void;
|
|
12
|
+
|
|
13
|
+
declare namespace collapsible {
|
|
14
|
+
export { close$3 as close, open$3 as open, toggle$3 as toggle };
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
declare function open$2(dialog: HTMLDialogElement): void;
|
|
18
|
+
declare function close$2(dialog: HTMLDialogElement): Promise<void>;
|
|
19
|
+
declare function toggle$2(dialog: HTMLDialogElement): void;
|
|
4
20
|
|
|
5
21
|
declare namespace dialog {
|
|
6
|
-
export { close$
|
|
22
|
+
export { close$2 as close, open$2 as open, toggle$2 as toggle };
|
|
7
23
|
}
|
|
8
24
|
|
|
9
|
-
declare function open(dropdown: HTMLElement): void;
|
|
10
|
-
declare function close(dropdown: HTMLElement): Promise<void>;
|
|
11
|
-
declare function toggle(dropdown: HTMLElement): void;
|
|
25
|
+
declare function open$1(dropdown: HTMLElement): void;
|
|
26
|
+
declare function close$1(dropdown: HTMLElement): Promise<void>;
|
|
27
|
+
declare function toggle$1(dropdown: HTMLElement): void;
|
|
12
28
|
|
|
13
|
-
declare const dropdown_close: typeof close;
|
|
14
|
-
declare const dropdown_open: typeof open;
|
|
15
|
-
declare const dropdown_toggle: typeof toggle;
|
|
16
29
|
declare namespace dropdown {
|
|
17
|
-
export {
|
|
30
|
+
export { close$1 as close, open$1 as open, toggle$1 as toggle };
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
declare function open(sidebarPanel: HTMLElement): void;
|
|
34
|
+
declare function close(sidebarPanel: HTMLElement): Promise<void>;
|
|
35
|
+
declare function toggle(sidebarPanel: HTMLElement): void;
|
|
36
|
+
|
|
37
|
+
declare const sidebar_close: typeof close;
|
|
38
|
+
declare const sidebar_open: typeof open;
|
|
39
|
+
declare const sidebar_toggle: typeof toggle;
|
|
40
|
+
declare namespace sidebar {
|
|
41
|
+
export { sidebar_close as close, sidebar_open as open, sidebar_toggle as toggle };
|
|
18
42
|
}
|
|
19
43
|
|
|
20
44
|
declare function select(tab: HTMLElement): void;
|
|
@@ -27,11 +51,14 @@ declare namespace tabs {
|
|
|
27
51
|
declare global {
|
|
28
52
|
interface Window {
|
|
29
53
|
sp: {
|
|
54
|
+
accordion: typeof accordion;
|
|
55
|
+
collapsible: typeof collapsible;
|
|
30
56
|
dialog: typeof dialog;
|
|
31
57
|
dropdown: typeof dropdown;
|
|
58
|
+
sidebar: typeof sidebar;
|
|
32
59
|
tabs: typeof tabs;
|
|
33
60
|
};
|
|
34
61
|
}
|
|
35
62
|
}
|
|
36
63
|
|
|
37
|
-
export { dialog, dropdown, tabs };
|
|
64
|
+
export { accordion, collapsible, dialog, dropdown, sidebar, tabs };
|
package/dist/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
var we=Object.defineProperty;var mt=(t,e)=>{for(var n in e)we(t,n,{get:e[n],enumerable:true});};var xt={};mt(xt,{close:()=>I,open:()=>wt,toggle:()=>be});var xe=["a[href]","button:not([disabled])","input:not([disabled])","select:not([disabled])","textarea:not([disabled])","[tabindex]:not([tabindex='-1'])","[contenteditable]:not([contenteditable='false'])","audio[controls]","video[controls]","details > summary","iframe"].join(", ");function gt(t){return [...t.querySelectorAll(xe)].filter(e=>e.offsetParent!==null)}async function et(t){let e=t.flatMap(n=>n.getAnimations());e.length!==0&&await Promise.all(e.map(n=>n.finished));}var ht=".dialog-backdrop, .sheet-backdrop",ye=".dialog-panel, .sheet-panel";function kt(t){return [...t.querySelectorAll(`${ht}, ${ye}`)]}function pt(t,e){for(let n of t)e===null?n.removeAttribute("data-state"):n.setAttribute("data-state",e);}function Ft(t){return t.querySelector(ht)!==null}function wt(t){t.show();let e=kt(t);if(pt(e,"open"),Ft(t)){let n=gt(t);n.length>0&&n[0].focus();}}async function I(t){let e=kt(t);pt(e,"closed"),await et(e),t.close(),pt(e,null);}function be(t){t.open?I(t):wt(t);}function ve(t){let e=t.target.closest("dialog");if(e?.open){if(t.key==="Escape"){t.preventDefault(),e.dataset.spBackdrop==="static"||I(e);return}if(t.key==="Tab"&&Ft(e)){let n=gt(e);if(n.length===0)return;let o=n[0],s=n[n.length-1];t.shiftKey&&document.activeElement===o?(t.preventDefault(),s.focus()):!t.shiftKey&&document.activeElement===s&&(t.preventDefault(),o.focus());}}}function Ee(t){let e=t.target,n=e.closest("[data-sp-toggle='dialog']");if(n){let i=n.dataset.spTarget;if(i){let r=document.querySelector(i);r&&wt(r);}return}let o=e.closest("[data-sp-dismiss='dialog']");if(o){let i=o.closest("dialog");i&&I(i);return}let s=e.closest(ht);if(s){let i=s.closest("dialog");i&&(i.dataset.spBackdrop==="static"||I(i));}}var Pt=false;(function(){typeof document>"u"||Pt||(Pt=true,document.addEventListener("click",Ee),document.addEventListener("keydown",ve));})();var Ot={};mt(Ot,{close:()=>$,open:()=>de,toggle:()=>Tt});var j=Math.min,H=Math.max,X=Math.round;var O=t=>({x:t,y:t}),Ae={left:"right",right:"left",bottom:"top",top:"bottom"},Le={start:"end",end:"start"};function yt(t,e,n){return H(t,j(e,n))}function Y(t,e){return typeof t=="function"?t(e):t}function P(t){return t.split("-")[0]}function U(t){return t.split("-")[1]}function bt(t){return t==="x"?"y":"x"}function vt(t){return t==="y"?"height":"width"}var Te=new Set(["top","bottom"]);function R(t){return Te.has(P(t))?"y":"x"}function Et(t){return bt(R(t))}function Wt(t,e,n){n===void 0&&(n=false);let o=U(t),s=Et(t),i=vt(s),r=s==="x"?o===(n?"end":"start")?"right":"left":o==="start"?"bottom":"top";return e.reference[i]>e.floating[i]&&(r=K(r)),[r,K(r)]}function $t(t){let e=K(t);return [nt(t),e,nt(e)]}function nt(t){return t.replace(/start|end/g,e=>Le[e])}var Bt=["left","right"],Nt=["right","left"],Oe=["top","bottom"],Se=["bottom","top"];function Me(t,e,n){switch(t){case "top":case "bottom":return n?e?Nt:Bt:e?Bt:Nt;case "left":case "right":return e?Oe:Se;default:return []}}function Vt(t,e,n,o){let s=U(t),i=Me(P(t),n==="start",o);return s&&(i=i.map(r=>r+"-"+s),e&&(i=i.concat(i.map(nt)))),i}function K(t){return t.replace(/left|right|bottom|top/g,e=>Ae[e])}function Re(t){return {top:0,right:0,bottom:0,left:0,...t}}function _t(t){return typeof t!="number"?Re(t):{top:t,right:t,bottom:t,left:t}}function B(t){let{x:e,y:n,width:o,height:s}=t;return {width:o,height:s,top:n,left:e,right:e+o,bottom:n+s,x:e,y:n}}function zt(t,e,n){let{reference:o,floating:s}=t,i=R(e),r=Et(e),c=vt(r),l=P(e),a=i==="y",u=o.x+o.width/2-s.width/2,f=o.y+o.height/2-s.height/2,m=o[c]/2-s[c]/2,d;switch(l){case "top":d={x:u,y:o.y-s.height};break;case "bottom":d={x:u,y:o.y+o.height};break;case "right":d={x:o.x+o.width,y:f};break;case "left":d={x:o.x-s.width,y:f};break;default:d={x:o.x,y:o.y};}switch(U(e)){case "start":d[r]-=m*(n&&a?-1:1);break;case "end":d[r]+=m*(n&&a?-1:1);break}return d}var qt=async(t,e,n)=>{let{placement:o="bottom",strategy:s="absolute",middleware:i=[],platform:r}=n,c=i.filter(Boolean),l=await(r.isRTL==null?void 0:r.isRTL(e)),a=await r.getElementRects({reference:t,floating:e,strategy:s}),{x:u,y:f}=zt(a,o,l),m=o,d={},g=0;for(let p=0;p<c.length;p++){let{name:h,fn:x}=c[p],{x:w,y:b,data:L,reset:y}=await x({x:u,y:f,initialPlacement:o,placement:m,strategy:s,middlewareData:d,rects:a,platform:r,elements:{reference:t,floating:e}});u=w??u,f=b??f,d={...d,[h]:{...d[h],...L}},y&&g<=50&&(g++,typeof y=="object"&&(y.placement&&(m=y.placement),y.rects&&(a=y.rects===true?await r.getElementRects({reference:t,floating:e,strategy:s}):y.rects),{x:u,y:f}=zt(a,m,l)),p=-1);}return {x:u,y:f,placement:m,strategy:s,middlewareData:d}};async function At(t,e){var n;e===void 0&&(e={});let{x:o,y:s,platform:i,rects:r,elements:c,strategy:l}=t,{boundary:a="clippingAncestors",rootBoundary:u="viewport",elementContext:f="floating",altBoundary:m=false,padding:d=0}=Y(e,t),g=_t(d),h=c[m?f==="floating"?"reference":"floating":f],x=B(await i.getClippingRect({element:(n=await(i.isElement==null?void 0:i.isElement(h)))==null||n?h:h.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(c.floating)),boundary:a,rootBoundary:u,strategy:l})),w=f==="floating"?{x:o,y:s,width:r.floating.width,height:r.floating.height}:r.reference,b=await(i.getOffsetParent==null?void 0:i.getOffsetParent(c.floating)),L=await(i.isElement==null?void 0:i.isElement(b))?await(i.getScale==null?void 0:i.getScale(b))||{x:1,y:1}:{x:1,y:1},y=B(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:c,rect:w,offsetParent:b,strategy:l}):w);return {top:(x.top-y.top+g.top)/L.y,bottom:(y.bottom-x.bottom+g.bottom)/L.y,left:(x.left-y.left+g.left)/L.x,right:(y.right-x.right+g.right)/L.x}}var It=function(t){return t===void 0&&(t={}),{name:"flip",options:t,async fn(e){var n,o;let{placement:s,middlewareData:i,rects:r,initialPlacement:c,platform:l,elements:a}=e,{mainAxis:u=true,crossAxis:f=true,fallbackPlacements:m,fallbackStrategy:d="bestFit",fallbackAxisSideDirection:g="none",flipAlignment:p=true,...h}=Y(t,e);if((n=i.arrow)!=null&&n.alignmentOffset)return {};let x=P(s),w=R(c),b=P(c)===c,L=await(l.isRTL==null?void 0:l.isRTL(a.floating)),y=m||(b||!p?[K(c)]:$t(c)),Rt=g!=="none";!m&&Rt&&y.push(...Vt(c,p,g,L));let pe=[c,...y],ut=await At(e,h),tt=[],V=((o=i.flip)==null?void 0:o.overflows)||[];if(u&&tt.push(ut[x]),f){let k=Wt(s,r,L);tt.push(ut[k[0]],ut[k[1]]);}if(V=[...V,{placement:s,overflows:tt}],!tt.every(k=>k<=0)){var Ct,Dt;let k=(((Ct=i.flip)==null?void 0:Ct.index)||0)+1,dt=pe[k];if(dt&&(!(f==="alignment"?w!==R(dt):false)||V.every(T=>R(T.placement)===w?T.overflows[0]>0:true)))return {data:{index:k,overflows:V},reset:{placement:dt}};let q=(Dt=V.filter(F=>F.overflows[0]<=0).sort((F,T)=>F.overflows[1]-T.overflows[1])[0])==null?void 0:Dt.placement;if(!q)switch(d){case "bestFit":{var Ht;let F=(Ht=V.filter(T=>{if(Rt){let D=R(T.placement);return D===w||D==="y"}return true}).map(T=>[T.placement,T.overflows.filter(D=>D>0).reduce((D,he)=>D+he,0)]).sort((T,D)=>T[1]-D[1])[0])==null?void 0:Ht[0];F&&(q=F);break}case "initialPlacement":q=c;break}if(s!==q)return {reset:{placement:q}}}return {}}}};var Ce=new Set(["left","top"]);async function De(t,e){let{placement:n,platform:o,elements:s}=t,i=await(o.isRTL==null?void 0:o.isRTL(s.floating)),r=P(n),c=U(n),l=R(n)==="y",a=Ce.has(r)?-1:1,u=i&&l?-1:1,f=Y(e,t),{mainAxis:m,crossAxis:d,alignmentAxis:g}=typeof f=="number"?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:f.mainAxis||0,crossAxis:f.crossAxis||0,alignmentAxis:f.alignmentAxis};return c&&typeof g=="number"&&(d=c==="end"?g*-1:g),l?{x:d*u,y:m*a}:{x:m*a,y:d*u}}var Kt=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(e){var n,o;let{x:s,y:i,placement:r,middlewareData:c}=e,l=await De(e,t);return r===((n=c.offset)==null?void 0:n.placement)&&(o=c.arrow)!=null&&o.alignmentOffset?{}:{x:s+l.x,y:i+l.y,data:{...l,placement:r}}}}},jt=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(e){let{x:n,y:o,placement:s}=e,{mainAxis:i=true,crossAxis:r=false,limiter:c={fn:h=>{let{x,y:w}=h;return {x,y:w}}},...l}=Y(t,e),a={x:n,y:o},u=await At(e,l),f=R(P(s)),m=bt(f),d=a[m],g=a[f];if(i){let h=m==="y"?"top":"left",x=m==="y"?"bottom":"right",w=d+u[h],b=d-u[x];d=yt(w,d,b);}if(r){let h=f==="y"?"top":"left",x=f==="y"?"bottom":"right",w=g+u[h],b=g-u[x];g=yt(w,g,b);}let p=c.fn({...e,[m]:d,[f]:g});return {...p,data:{x:p.x-n,y:p.y-o,enabled:{[m]:i,[f]:r}}}}}};function it(){return typeof window<"u"}function N(t){return Yt(t)?(t.nodeName||"").toLowerCase():"#document"}function v(t){var e;return (t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function M(t){var e;return (e=(Yt(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function Yt(t){return it()?t instanceof Node||t instanceof v(t).Node:false}function E(t){return it()?t instanceof Element||t instanceof v(t).Element:false}function S(t){return it()?t instanceof HTMLElement||t instanceof v(t).HTMLElement:false}function Xt(t){return !it()||typeof ShadowRoot>"u"?false:t instanceof ShadowRoot||t instanceof v(t).ShadowRoot}var He=new Set(["inline","contents"]);function _(t){let{overflow:e,overflowX:n,overflowY:o,display:s}=A(t);return /auto|scroll|overlay|hidden|clip/.test(e+o+n)&&!He.has(s)}var Pe=new Set(["table","td","th"]);function Ut(t){return Pe.has(N(t))}var ke=[":popover-open",":modal"];function G(t){return ke.some(e=>{try{return t.matches(e)}catch{return false}})}var Fe=["transform","translate","scale","rotate","perspective"],Be=["transform","translate","scale","rotate","perspective","filter"],Ne=["paint","layout","strict","content"];function st(t){let e=rt(),n=E(t)?A(t):t;return Fe.some(o=>n[o]?n[o]!=="none":false)||(n.containerType?n.containerType!=="normal":false)||!e&&(n.backdropFilter?n.backdropFilter!=="none":false)||!e&&(n.filter?n.filter!=="none":false)||Be.some(o=>(n.willChange||"").includes(o))||Ne.some(o=>(n.contain||"").includes(o))}function Gt(t){let e=C(t);for(;S(e)&&!W(e);){if(st(e))return e;if(G(e))return null;e=C(e);}return null}function rt(){return typeof CSS>"u"||!CSS.supports?false:CSS.supports("-webkit-backdrop-filter","none")}var We=new Set(["html","body","#document"]);function W(t){return We.has(N(t))}function A(t){return v(t).getComputedStyle(t)}function J(t){return E(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function C(t){if(N(t)==="html")return t;let e=t.assignedSlot||t.parentNode||Xt(t)&&t.host||M(t);return Xt(e)?e.host:e}function Jt(t){let e=C(t);return W(e)?t.ownerDocument?t.ownerDocument.body:t.body:S(e)&&_(e)?e:Jt(e)}function ot(t,e,n){var o;e===void 0&&(e=[]);let s=Jt(t),i=s===((o=t.ownerDocument)==null?void 0:o.body),r=v(s);if(i){ct(r);return e.concat(r,r.visualViewport||[],_(s)?s:[],[])}return e.concat(s,ot(s,[]))}function ct(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function ee(t){let e=A(t),n=parseFloat(e.width)||0,o=parseFloat(e.height)||0,s=S(t),i=s?t.offsetWidth:n,r=s?t.offsetHeight:o,c=X(n)!==i||X(o)!==r;return c&&(n=i,o=r),{width:n,height:o,$:c}}function ne(t){return E(t)?t:t.contextElement}function z(t){let e=ne(t);if(!S(e))return O(1);let n=e.getBoundingClientRect(),{width:o,height:s,$:i}=ee(e),r=(i?X(n.width):n.width)/o,c=(i?X(n.height):n.height)/s;return (!r||!Number.isFinite(r))&&(r=1),(!c||!Number.isFinite(c))&&(c=1),{x:r,y:c}}var $e=O(0);function oe(t){let e=v(t);return !rt()||!e.visualViewport?$e:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function Ve(t,e,n){return e===void 0&&(e=false),!n||e&&n!==v(t)?false:e}function Q(t,e,n,o){e===void 0&&(e=false),n===void 0&&(n=false);let s=t.getBoundingClientRect(),i=ne(t),r=O(1);e&&(o?E(o)&&(r=z(o)):r=z(t));let c=Ve(i,n,o)?oe(i):O(0),l=(s.left+c.x)/r.x,a=(s.top+c.y)/r.y,u=s.width/r.x,f=s.height/r.y;if(i){let m=v(i),d=o&&E(o)?v(o):o,g=m,p=ct(g);for(;p&&o&&d!==g;){let h=z(p),x=p.getBoundingClientRect(),w=A(p),b=x.left+(p.clientLeft+parseFloat(w.paddingLeft))*h.x,L=x.top+(p.clientTop+parseFloat(w.paddingTop))*h.y;l*=h.x,a*=h.y,u*=h.x,f*=h.y,l+=b,a+=L,g=v(p),p=ct(g);}}return B({width:u,height:f,x:l,y:a})}function lt(t,e){let n=J(t).scrollLeft;return e?e.left+n:Q(M(t)).left+n}function ie(t,e){let n=t.getBoundingClientRect(),o=n.left+e.scrollLeft-lt(t,n),s=n.top+e.scrollTop;return {x:o,y:s}}function _e(t){let{elements:e,rect:n,offsetParent:o,strategy:s}=t,i=s==="fixed",r=M(o),c=e?G(e.floating):false;if(o===r||c&&i)return n;let l={scrollLeft:0,scrollTop:0},a=O(1),u=O(0),f=S(o);if((f||!f&&!i)&&((N(o)!=="body"||_(r))&&(l=J(o)),S(o))){let d=Q(o);a=z(o),u.x=d.x+o.clientLeft,u.y=d.y+o.clientTop;}let m=r&&!f&&!i?ie(r,l):O(0);return {width:n.width*a.x,height:n.height*a.y,x:n.x*a.x-l.scrollLeft*a.x+u.x+m.x,y:n.y*a.y-l.scrollTop*a.y+u.y+m.y}}function ze(t){return Array.from(t.getClientRects())}function qe(t){let e=M(t),n=J(t),o=t.ownerDocument.body,s=H(e.scrollWidth,e.clientWidth,o.scrollWidth,o.clientWidth),i=H(e.scrollHeight,e.clientHeight,o.scrollHeight,o.clientHeight),r=-n.scrollLeft+lt(t),c=-n.scrollTop;return A(o).direction==="rtl"&&(r+=H(e.clientWidth,o.clientWidth)-s),{width:s,height:i,x:r,y:c}}var Qt=25;function Ie(t,e){let n=v(t),o=M(t),s=n.visualViewport,i=o.clientWidth,r=o.clientHeight,c=0,l=0;if(s){i=s.width,r=s.height;let u=rt();(!u||u&&e==="fixed")&&(c=s.offsetLeft,l=s.offsetTop);}let a=lt(o);if(a<=0){let u=o.ownerDocument,f=u.body,m=getComputedStyle(f),d=u.compatMode==="CSS1Compat"&&parseFloat(m.marginLeft)+parseFloat(m.marginRight)||0,g=Math.abs(o.clientWidth-f.clientWidth-d);g<=Qt&&(i-=g);}else a<=Qt&&(i+=a);return {width:i,height:r,x:c,y:l}}var Ke=new Set(["absolute","fixed"]);function je(t,e){let n=Q(t,true,e==="fixed"),o=n.top+t.clientTop,s=n.left+t.clientLeft,i=S(t)?z(t):O(1),r=t.clientWidth*i.x,c=t.clientHeight*i.y,l=s*i.x,a=o*i.y;return {width:r,height:c,x:l,y:a}}function Zt(t,e,n){let o;if(e==="viewport")o=Ie(t,n);else if(e==="document")o=qe(M(t));else if(E(e))o=je(e,n);else {let s=oe(t);o={x:e.x-s.x,y:e.y-s.y,width:e.width,height:e.height};}return B(o)}function se(t,e){let n=C(t);return n===e||!E(n)||W(n)?false:A(n).position==="fixed"||se(n,e)}function Xe(t,e){let n=e.get(t);if(n)return n;let o=ot(t,[]).filter(c=>E(c)&&N(c)!=="body"),s=null,i=A(t).position==="fixed",r=i?C(t):t;for(;E(r)&&!W(r);){let c=A(r),l=st(r);!l&&c.position==="fixed"&&(s=null),(i?!l&&!s:!l&&c.position==="static"&&!!s&&Ke.has(s.position)||_(r)&&!l&&se(t,r))?o=o.filter(u=>u!==r):s=c,r=C(r);}return e.set(t,o),o}function Ye(t){let{element:e,boundary:n,rootBoundary:o,strategy:s}=t,r=[...n==="clippingAncestors"?G(e)?[]:Xe(e,this._c):[].concat(n),o],c=r[0],l=r.reduce((a,u)=>{let f=Zt(e,u,s);return a.top=H(f.top,a.top),a.right=j(f.right,a.right),a.bottom=j(f.bottom,a.bottom),a.left=H(f.left,a.left),a},Zt(e,c,s));return {width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function Ue(t){let{width:e,height:n}=ee(t);return {width:e,height:n}}function Ge(t,e,n){let o=S(e),s=M(e),i=n==="fixed",r=Q(t,true,i,e),c={scrollLeft:0,scrollTop:0},l=O(0);function a(){l.x=lt(s);}if(o||!o&&!i)if((N(e)!=="body"||_(s))&&(c=J(e)),o){let d=Q(e,true,i,e);l.x=d.x+e.clientLeft,l.y=d.y+e.clientTop;}else s&&a();i&&!o&&s&&a();let u=s&&!o&&!i?ie(s,c):O(0),f=r.left+c.scrollLeft-l.x-u.x,m=r.top+c.scrollTop-l.y-u.y;return {x:f,y:m,width:r.width,height:r.height}}function Lt(t){return A(t).position==="static"}function te(t,e){if(!S(t)||A(t).position==="fixed")return null;if(e)return e(t);let n=t.offsetParent;return M(t)===n&&(n=n.ownerDocument.body),n}function re(t,e){let n=v(t);if(G(t))return n;if(!S(t)){let s=C(t);for(;s&&!W(s);){if(E(s)&&!Lt(s))return s;s=C(s);}return n}let o=te(t,e);for(;o&&Ut(o)&&Lt(o);)o=te(o,e);return o&&W(o)&&Lt(o)&&!st(o)?n:o||Gt(t)||n}var Je=async function(t){let e=this.getOffsetParent||re,n=this.getDimensions,o=await n(t.floating);return {reference:Ge(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}};function Qe(t){return A(t).direction==="rtl"}var Ze={convertOffsetParentRelativeRectToViewportRelativeRect:_e,getDocumentElement:M,getClippingRect:Ye,getOffsetParent:re,getElementRects:Je,getClientRects:ze,getDimensions:Ue,getScale:z,isElement:E,isRTL:Qe};var ce=Kt;var le=jt,ae=It;var fe=(t,e,n)=>{let o=new Map,s={platform:Ze,...n},i={...s.platform,_c:o};return qt(t,e,{...s,platform:i})};function Z(t){return t.querySelector(".dropdown-menu")}function at(t){return t.querySelector("[data-sp-toggle='dropdown']")}function ft(){return document.querySelector(".dropdown-menu.open")?.closest(".dropdown")??null}async function tn(t){let e=at(t),n=Z(t);if(!e||!n)return;let o=t.dataset.spPlacement||"bottom-end",s=parseInt(t.dataset.spOffset||"4",10),{x:i,y:r}=await fe(e,n,{placement:o,middleware:[ce(s),ae(),le({padding:8})]});Object.assign(n.style,{left:`${i}px`,top:`${r}px`});}function de(t){let e=Z(t);if(!e||e.classList.contains("open"))return;let n=ft();n&&$(n);let o=at(t);e.classList.add("open"),o?.setAttribute("aria-expanded","true"),e.setAttribute("data-state","open"),tn(t);}async function $(t){let e=Z(t);if(!e||!e.classList.contains("open"))return;at(t)?.setAttribute("aria-expanded","false"),e.setAttribute("data-state","closed"),await et([e]),e.classList.remove("open"),e.removeAttribute("data-state");}function Tt(t){Z(t)?.classList.contains("open")?$(t):de(t);}function en(t){let e=t.target,n=e.closest("[data-sp-toggle='dropdown']");if(n){let i=n.closest(".dropdown");i&&(t.preventDefault(),Tt(i));return}let o=e.closest(".dropdown-item");if(o){if(o.getAttribute("aria-disabled")==="true"){t.preventDefault();return}let i=o.closest(".dropdown");i&&$(i);return}let s=ft();s&&!s.contains(e)&&$(s);}function nn(t){let e=t.target,n=e.closest(".dropdown"),o=ft();if(t.key==="Escape"&&o){t.preventDefault();let l=at(o);$(o),l?.focus();return}if((t.key==="Enter"||t.key===" ")&&e.matches("[data-sp-toggle='dropdown']")){t.preventDefault(),n&&Tt(n);return}let s=n?Z(n):null;if(!s?.classList.contains("open"))return;let i=[...s.querySelectorAll(".dropdown-item:not([aria-disabled='true'])")],r=i.indexOf(e),c=null;switch(t.key){case "ArrowDown":t.preventDefault(),r<0?c=i[0]:c=i[(r+1)%i.length];break;case "ArrowUp":t.preventDefault(),r<0?c=i[i.length-1]:c=i[(r-1+i.length)%i.length];break;case "Home":t.preventDefault(),c=i[0];break;case "End":t.preventDefault(),c=i[i.length-1];break}c&&c.focus();}function on(t){let e=ft();if(!e)return;let n=t.relatedTarget;(!n||!e.contains(n))&&$(e);}var ue=false;(function(){typeof document>"u"||ue||(ue=true,document.addEventListener("click",en),document.addEventListener("keydown",nn),document.addEventListener("focusout",on));})();var Mt={};mt(Mt,{select:()=>St});function St(t){if(t.hasAttribute("disabled"))return;let e=t.closest(".tab-list");if(!e)return;let n=e.querySelectorAll(".tab");for(let s of n){s.classList.remove("active"),s.setAttribute("aria-selected","false"),s.setAttribute("tabindex","-1");let i=s.dataset.spTarget;i&&document.querySelector(i)?.classList.remove("active");}t.classList.add("active"),t.setAttribute("aria-selected","true"),t.setAttribute("tabindex","0");let o=t.dataset.spTarget;o&&document.querySelector(o)?.classList.add("active");}function sn(t){let n=t.target.closest("[data-sp-toggle='tab']");n&&St(n);}function me(t,e,n){let o=t.length;for(let s=1;s<=o;s++){let i=(e+s*n+o)%o;if(!t[i].hasAttribute("disabled"))return t[i]}return null}function rn(t){let e=t.target;if(!e.classList.contains("tab"))return;let n=e.closest(".tab-list");if(!n)return;let o=[...n.querySelectorAll(".tab")],s=o.indexOf(e),i=null;switch(t.key){case "ArrowLeft":i=me(o,s,-1);break;case "ArrowRight":i=me(o,s,1);break;case "Home":i=o.find(r=>!r.hasAttribute("disabled"))??null;break;case "End":i=[...o].reverse().find(r=>!r.hasAttribute("disabled"))??null;break}i&&(t.preventDefault(),i.focus(),St(i));}var ge=false;(function(){typeof document>"u"||ge||(ge=true,document.addEventListener("click",sn),document.addEventListener("keydown",rn));})();typeof window<"u"&&(window.sp={dialog:xt,dropdown:Ot,tabs:Mt});export{xt as dialog,Ot as dropdown,Mt as tabs};//# sourceMappingURL=index.js.map
|
|
1
|
+
var Ve=Object.defineProperty;var I=(t,e)=>{for(var n in e)Ve(t,n,{get:e[n],enumerable:true});};var Lt={};I(Lt,{close:()=>rt,open:()=>Et,toggle:()=>Ie});var _e=["a[href]","button:not([disabled])","input:not([disabled])","select:not([disabled])","textarea:not([disabled])","[tabindex]:not([tabindex='-1'])","[contenteditable]:not([contenteditable='false'])","audio[controls]","video[controls]","details > summary","iframe"].join(", ");function bt(t){return [...t.querySelectorAll(_e)].filter(e=>e.offsetParent!==null)}async function O(t){let e=t.flatMap(n=>n.getAnimations());e.length!==0&&await Promise.all(e.map(n=>n.finished));}function b(t){return t.hasAttribute("disabled")||t.getAttribute("aria-disabled")==="true"}function R(t,e,n){let o=t.length;for(let i=1;i<=o;i++){let s=(e+i*n+o)%o;if(!b(t[s]))return t[s]}return null}function vt(t){return t.classList.contains("accordion-panel")?t:t.querySelector(".accordion-panel")}function Ut(t){return document.querySelector(`[data-sp-target="#${t}"]`)}function Gt(t){let e=`${t.scrollHeight}px`;t.style.setProperty("--radix-accordion-content-height",e);}function Et(t){let e=vt(t);!e||e.classList.contains("open")||(e.id&&Ut(e.id)?.setAttribute("aria-expanded","true"),Gt(e),e.classList.add("open"),e.setAttribute("data-state","open"));}async function rt(t){let e=vt(t);!e||!e.classList.contains("open")||(e.id&&Ut(e.id)?.setAttribute("aria-expanded","false"),Gt(e),e.setAttribute("data-state","closed"),await O([e]),e.classList.remove("open"),e.removeAttribute("data-state"));}function Ie(t){let e=vt(t);e&&(e.classList.contains("open")?rt(t):Et(t));}function Ke(t){let n=t.target.closest("[data-sp-toggle='accordion']");if(!n||b(n))return;let o=n.dataset.spTarget;if(!o)return;let i=document.querySelector(o);if(!i)return;let s=n.closest(".accordion"),r=i.classList.contains("open");if(s&&!s.hasAttribute("data-sp-multiple")){let l=s.querySelectorAll(".accordion-panel.open");for(let c of l)c!==i&&rt(c);}r?rt(i):Et(i);}function je(t){let n=t.target.closest("[data-sp-toggle='accordion']");if(!n)return;let o=n.closest(".accordion");if(!o)return;let i=[...o.querySelectorAll("[data-sp-toggle='accordion']")],s=i.indexOf(n),r=null;switch(t.key){case "ArrowDown":r=R(i,s,1);break;case "ArrowUp":r=R(i,s,-1);break;case "Home":r=i.find(l=>!b(l))??null;break;case "End":r=[...i].reverse().find(l=>!b(l))??null;break}r&&(t.preventDefault(),r.focus());}var Yt=false;(function(){typeof document>"u"||Yt||(Yt=true,document.addEventListener("click",Ke),document.addEventListener("keydown",je));})();var At={};I(At,{close:()=>ee,open:()=>te,toggle:()=>ne});function Tt(t){return t.classList.contains("collapsible-panel")?t:t.querySelector(".collapsible-panel")}function Qt(t){return document.querySelector(`[data-sp-target="#${t}"]`)}function Zt(t){let e=`${t.scrollHeight}px`;t.style.setProperty("--radix-collapsible-content-height",e);}function te(t){let e=Tt(t);!e||e.classList.contains("open")||(e.id&&Qt(e.id)?.setAttribute("aria-expanded","true"),Zt(e),e.classList.add("open"),e.setAttribute("data-state","open"));}async function ee(t){let e=Tt(t);!e||!e.classList.contains("open")||(e.id&&Qt(e.id)?.setAttribute("aria-expanded","false"),Zt(e),e.setAttribute("data-state","closed"),await O([e]),e.classList.remove("open"),e.removeAttribute("data-state"));}function ne(t){let e=Tt(t);e&&(e.classList.contains("open")?ee(t):te(t));}function Xe(t){let n=t.target.closest("[data-sp-toggle='collapsible']");if(!n)return;let o=n.dataset.spTarget;if(!o)return;let i=document.querySelector(o);i&&ne(i);}var Jt=false;(function(){typeof document>"u"||Jt||(Jt=true,document.addEventListener("click",Xe));})();var Ot={};I(Ot,{close:()=>Y,open:()=>St,toggle:()=>Ue});var Ht=".dialog-backdrop, .sheet-backdrop",Ye=".dialog-panel, .sheet-panel";function ie(t){return [...t.querySelectorAll(`${Ht}, ${Ye}`)]}function Mt(t,e){for(let n of t)e===null?n.removeAttribute("data-state"):n.setAttribute("data-state",e);}function se(t){return t.querySelector(Ht)!==null}function St(t){t.show();let e=ie(t);if(Mt(e,"open"),se(t)){let n=bt(t);n.length>0&&n[0].focus();}}async function Y(t){let e=ie(t);Mt(e,"closed"),await O(e),t.close(),Mt(e,null);}function Ue(t){t.open?Y(t):St(t);}function Ge(t){let e=t.target.closest("dialog");if(e?.open){if(t.key==="Escape"){t.preventDefault(),e.dataset.spBackdrop==="static"||Y(e);return}if(t.key==="Tab"&&se(e)){let n=bt(e);if(n.length===0)return;let o=n[0],i=n[n.length-1];t.shiftKey&&document.activeElement===o?(t.preventDefault(),i.focus()):!t.shiftKey&&document.activeElement===i&&(t.preventDefault(),o.focus());}}}function Je(t){let e=t.target,n=e.closest("[data-sp-toggle='dialog']");if(n){let s=n.dataset.spTarget;if(s){let r=document.querySelector(s);r&&St(r);}return}let o=e.closest("[data-sp-dismiss='dialog']");if(o){let s=o.closest("dialog");s&&Y(s);return}let i=e.closest(Ht);if(i){let s=i.closest("dialog");s&&(s.dataset.spBackdrop==="static"||Y(s));}}var oe=false;(function(){typeof document>"u"||oe||(oe=true,document.addEventListener("click",Je),document.addEventListener("keydown",Ge));})();var Nt={};I(Nt,{close:()=>V,open:()=>Be,toggle:()=>Bt});var G=Math.min,F=Math.max,J=Math.round;var H=t=>({x:t,y:t}),Qe={left:"right",right:"left",bottom:"top",top:"bottom"},Ze={start:"end",end:"start"};function Ct(t,e,n){return F(t,G(e,n))}function Q(t,e){return typeof t=="function"?t(e):t}function B(t){return t.split("-")[0]}function Z(t){return t.split("-")[1]}function Rt(t){return t==="x"?"y":"x"}function Dt(t){return t==="y"?"height":"width"}var tn=new Set(["top","bottom"]);function D(t){return tn.has(B(t))?"y":"x"}function kt(t){return Rt(D(t))}function ce(t,e,n){n===void 0&&(n=false);let o=Z(t),i=kt(t),s=Dt(i),r=i==="x"?o===(n?"end":"start")?"right":"left":o==="start"?"bottom":"top";return e.reference[s]>e.floating[s]&&(r=U(r)),[r,U(r)]}function ae(t){let e=U(t);return [lt(t),e,lt(e)]}function lt(t){return t.replace(/start|end/g,e=>Ze[e])}var re=["left","right"],le=["right","left"],en=["top","bottom"],nn=["bottom","top"];function on(t,e,n){switch(t){case "top":case "bottom":return n?e?le:re:e?re:le;case "left":case "right":return e?en:nn;default:return []}}function fe(t,e,n,o){let i=Z(t),s=on(B(t),n==="start",o);return i&&(s=s.map(r=>r+"-"+i),e&&(s=s.concat(s.map(lt)))),s}function U(t){return t.replace(/left|right|bottom|top/g,e=>Qe[e])}function sn(t){return {top:0,right:0,bottom:0,left:0,...t}}function ue(t){return typeof t!="number"?sn(t):{top:t,right:t,bottom:t,left:t}}function W(t){let{x:e,y:n,width:o,height:i}=t;return {width:o,height:i,top:n,left:e,right:e+o,bottom:n+i,x:e,y:n}}function de(t,e,n){let{reference:o,floating:i}=t,s=D(e),r=kt(e),l=Dt(r),c=B(e),a=s==="y",u=o.x+o.width/2-i.width/2,f=o.y+o.height/2-i.height/2,m=o[l]/2-i[l]/2,d;switch(c){case "top":d={x:u,y:o.y-i.height};break;case "bottom":d={x:u,y:o.y+o.height};break;case "right":d={x:o.x+o.width,y:f};break;case "left":d={x:o.x-i.width,y:f};break;default:d={x:o.x,y:o.y};}switch(Z(e)){case "start":d[r]-=m*(n&&a?-1:1);break;case "end":d[r]+=m*(n&&a?-1:1);break}return d}var me=async(t,e,n)=>{let{placement:o="bottom",strategy:i="absolute",middleware:s=[],platform:r}=n,l=s.filter(Boolean),c=await(r.isRTL==null?void 0:r.isRTL(e)),a=await r.getElementRects({reference:t,floating:e,strategy:i}),{x:u,y:f}=de(a,o,c),m=o,d={},p=0;for(let g=0;g<l.length;g++){let{name:h,fn:y}=l[g],{x:w,y:v,data:A,reset:x}=await y({x:u,y:f,initialPlacement:o,placement:m,strategy:i,middlewareData:d,rects:a,platform:r,elements:{reference:t,floating:e}});u=w??u,f=v??f,d={...d,[h]:{...d[h],...A}},x&&p<=50&&(p++,typeof x=="object"&&(x.placement&&(m=x.placement),x.rects&&(a=x.rects===true?await r.getElementRects({reference:t,floating:e,strategy:i}):x.rects),{x:u,y:f}=de(a,m,c)),g=-1);}return {x:u,y:f,placement:m,strategy:i,middlewareData:d}};async function Pt(t,e){var n;e===void 0&&(e={});let{x:o,y:i,platform:s,rects:r,elements:l,strategy:c}=t,{boundary:a="clippingAncestors",rootBoundary:u="viewport",elementContext:f="floating",altBoundary:m=false,padding:d=0}=Q(e,t),p=ue(d),h=l[m?f==="floating"?"reference":"floating":f],y=W(await s.getClippingRect({element:(n=await(s.isElement==null?void 0:s.isElement(h)))==null||n?h:h.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(l.floating)),boundary:a,rootBoundary:u,strategy:c})),w=f==="floating"?{x:o,y:i,width:r.floating.width,height:r.floating.height}:r.reference,v=await(s.getOffsetParent==null?void 0:s.getOffsetParent(l.floating)),A=await(s.isElement==null?void 0:s.isElement(v))?await(s.getScale==null?void 0:s.getScale(v))||{x:1,y:1}:{x:1,y:1},x=W(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:w,offsetParent:v,strategy:c}):w);return {top:(y.top-x.top+p.top)/A.y,bottom:(x.bottom-y.bottom+p.bottom)/A.y,left:(y.left-x.left+p.left)/A.x,right:(x.right-y.right+p.right)/A.x}}var pe=function(t){return t===void 0&&(t={}),{name:"flip",options:t,async fn(e){var n,o;let{placement:i,middlewareData:s,rects:r,initialPlacement:l,platform:c,elements:a}=e,{mainAxis:u=true,crossAxis:f=true,fallbackPlacements:m,fallbackStrategy:d="bestFit",fallbackAxisSideDirection:p="none",flipAlignment:g=true,...h}=Q(t,e);if((n=s.arrow)!=null&&n.alignmentOffset)return {};let y=B(i),w=D(l),v=B(l)===l,A=await(c.isRTL==null?void 0:c.isRTL(a.floating)),x=m||(v||!g?[U(l)]:ae(l)),It=p!=="none";!m&&It&&x.push(...fe(l,g,p,A));let qe=[l,...x],yt=await Pt(e,h),st=[],_=((o=s.flip)==null?void 0:o.overflows)||[];if(u&&st.push(yt[y]),f){let N=ce(i,r,A);st.push(yt[N[0]],yt[N[1]]);}if(_=[..._,{placement:i,overflows:st}],!st.every(N=>N<=0)){var Kt,jt;let N=(((Kt=s.flip)==null?void 0:Kt.index)||0)+1,xt=qe[N];if(xt&&(!(f==="alignment"?w!==D(xt):false)||_.every(M=>D(M.placement)===w?M.overflows[0]>0:true)))return {data:{index:N,overflows:_},reset:{placement:xt}};let X=(jt=_.filter($=>$.overflows[0]<=0).sort(($,M)=>$.overflows[1]-M.overflows[1])[0])==null?void 0:jt.placement;if(!X)switch(d){case "bestFit":{var Xt;let $=(Xt=_.filter(M=>{if(It){let P=D(M.placement);return P===w||P==="y"}return true}).map(M=>[M.placement,M.overflows.filter(P=>P>0).reduce((P,ze)=>P+ze,0)]).sort((M,P)=>M[1]-P[1])[0])==null?void 0:Xt[0];$&&(X=$);break}case "initialPlacement":X=l;break}if(i!==X)return {reset:{placement:X}}}return {}}}};var rn=new Set(["left","top"]);async function ln(t,e){let{placement:n,platform:o,elements:i}=t,s=await(o.isRTL==null?void 0:o.isRTL(i.floating)),r=B(n),l=Z(n),c=D(n)==="y",a=rn.has(r)?-1:1,u=s&&c?-1:1,f=Q(e,t),{mainAxis:m,crossAxis:d,alignmentAxis:p}=typeof f=="number"?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:f.mainAxis||0,crossAxis:f.crossAxis||0,alignmentAxis:f.alignmentAxis};return l&&typeof p=="number"&&(d=l==="end"?p*-1:p),c?{x:d*u,y:m*a}:{x:m*a,y:d*u}}var ge=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(e){var n,o;let{x:i,y:s,placement:r,middlewareData:l}=e,c=await ln(e,t);return r===((n=l.offset)==null?void 0:n.placement)&&(o=l.arrow)!=null&&o.alignmentOffset?{}:{x:i+c.x,y:s+c.y,data:{...c,placement:r}}}}},he=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(e){let{x:n,y:o,placement:i}=e,{mainAxis:s=true,crossAxis:r=false,limiter:l={fn:h=>{let{x:y,y:w}=h;return {x:y,y:w}}},...c}=Q(t,e),a={x:n,y:o},u=await Pt(e,c),f=D(B(i)),m=Rt(f),d=a[m],p=a[f];if(s){let h=m==="y"?"top":"left",y=m==="y"?"bottom":"right",w=d+u[h],v=d-u[y];d=Ct(w,d,v);}if(r){let h=f==="y"?"top":"left",y=f==="y"?"bottom":"right",w=p+u[h],v=p-u[y];p=Ct(w,p,v);}let g=l.fn({...e,[m]:d,[f]:p});return {...g,data:{x:g.x-n,y:g.y-o,enabled:{[m]:s,[f]:r}}}}}};function at(){return typeof window<"u"}function q(t){return ye(t)?(t.nodeName||"").toLowerCase():"#document"}function E(t){var e;return (t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function C(t){var e;return (e=(ye(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function ye(t){return at()?t instanceof Node||t instanceof E(t).Node:false}function L(t){return at()?t instanceof Element||t instanceof E(t).Element:false}function S(t){return at()?t instanceof HTMLElement||t instanceof E(t).HTMLElement:false}function we(t){return !at()||typeof ShadowRoot>"u"?false:t instanceof ShadowRoot||t instanceof E(t).ShadowRoot}var cn=new Set(["inline","contents"]);function K(t){let{overflow:e,overflowX:n,overflowY:o,display:i}=T(t);return /auto|scroll|overlay|hidden|clip/.test(e+o+n)&&!cn.has(i)}var an=new Set(["table","td","th"]);function xe(t){return an.has(q(t))}var fn=[":popover-open",":modal"];function tt(t){return fn.some(e=>{try{return t.matches(e)}catch{return false}})}var un=["transform","translate","scale","rotate","perspective"],dn=["transform","translate","scale","rotate","perspective","filter"],mn=["paint","layout","strict","content"];function ft(t){let e=ut(),n=L(t)?T(t):t;return un.some(o=>n[o]?n[o]!=="none":false)||(n.containerType?n.containerType!=="normal":false)||!e&&(n.backdropFilter?n.backdropFilter!=="none":false)||!e&&(n.filter?n.filter!=="none":false)||dn.some(o=>(n.willChange||"").includes(o))||mn.some(o=>(n.contain||"").includes(o))}function be(t){let e=k(t);for(;S(e)&&!z(e);){if(ft(e))return e;if(tt(e))return null;e=k(e);}return null}function ut(){return typeof CSS>"u"||!CSS.supports?false:CSS.supports("-webkit-backdrop-filter","none")}var pn=new Set(["html","body","#document"]);function z(t){return pn.has(q(t))}function T(t){return E(t).getComputedStyle(t)}function et(t){return L(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function k(t){if(q(t)==="html")return t;let e=t.assignedSlot||t.parentNode||we(t)&&t.host||C(t);return we(e)?e.host:e}function ve(t){let e=k(t);return z(e)?t.ownerDocument?t.ownerDocument.body:t.body:S(e)&&K(e)?e:ve(e)}function ct(t,e,n){var o;e===void 0&&(e=[]);let i=ve(t),s=i===((o=t.ownerDocument)==null?void 0:o.body),r=E(i);if(s){dt(r);return e.concat(r,r.visualViewport||[],K(i)?i:[],[])}return e.concat(i,ct(i,[]))}function dt(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function Ae(t){let e=T(t),n=parseFloat(e.width)||0,o=parseFloat(e.height)||0,i=S(t),s=i?t.offsetWidth:n,r=i?t.offsetHeight:o,l=J(n)!==s||J(o)!==r;return l&&(n=s,o=r),{width:n,height:o,$:l}}function Me(t){return L(t)?t:t.contextElement}function j(t){let e=Me(t);if(!S(e))return H(1);let n=e.getBoundingClientRect(),{width:o,height:i,$:s}=Ae(e),r=(s?J(n.width):n.width)/o,l=(s?J(n.height):n.height)/i;return (!r||!Number.isFinite(r))&&(r=1),(!l||!Number.isFinite(l))&&(l=1),{x:r,y:l}}var gn=H(0);function He(t){let e=E(t);return !ut()||!e.visualViewport?gn:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function hn(t,e,n){return e===void 0&&(e=false),!n||e&&n!==E(t)?false:e}function nt(t,e,n,o){e===void 0&&(e=false),n===void 0&&(n=false);let i=t.getBoundingClientRect(),s=Me(t),r=H(1);e&&(o?L(o)&&(r=j(o)):r=j(t));let l=hn(s,n,o)?He(s):H(0),c=(i.left+l.x)/r.x,a=(i.top+l.y)/r.y,u=i.width/r.x,f=i.height/r.y;if(s){let m=E(s),d=o&&L(o)?E(o):o,p=m,g=dt(p);for(;g&&o&&d!==p;){let h=j(g),y=g.getBoundingClientRect(),w=T(g),v=y.left+(g.clientLeft+parseFloat(w.paddingLeft))*h.x,A=y.top+(g.clientTop+parseFloat(w.paddingTop))*h.y;c*=h.x,a*=h.y,u*=h.x,f*=h.y,c+=v,a+=A,p=E(g),g=dt(p);}}return W({width:u,height:f,x:c,y:a})}function mt(t,e){let n=et(t).scrollLeft;return e?e.left+n:nt(C(t)).left+n}function Se(t,e){let n=t.getBoundingClientRect(),o=n.left+e.scrollLeft-mt(t,n),i=n.top+e.scrollTop;return {x:o,y:i}}function wn(t){let{elements:e,rect:n,offsetParent:o,strategy:i}=t,s=i==="fixed",r=C(o),l=e?tt(e.floating):false;if(o===r||l&&s)return n;let c={scrollLeft:0,scrollTop:0},a=H(1),u=H(0),f=S(o);if((f||!f&&!s)&&((q(o)!=="body"||K(r))&&(c=et(o)),S(o))){let d=nt(o);a=j(o),u.x=d.x+o.clientLeft,u.y=d.y+o.clientTop;}let m=r&&!f&&!s?Se(r,c):H(0);return {width:n.width*a.x,height:n.height*a.y,x:n.x*a.x-c.scrollLeft*a.x+u.x+m.x,y:n.y*a.y-c.scrollTop*a.y+u.y+m.y}}function yn(t){return Array.from(t.getClientRects())}function xn(t){let e=C(t),n=et(t),o=t.ownerDocument.body,i=F(e.scrollWidth,e.clientWidth,o.scrollWidth,o.clientWidth),s=F(e.scrollHeight,e.clientHeight,o.scrollHeight,o.clientHeight),r=-n.scrollLeft+mt(t),l=-n.scrollTop;return T(o).direction==="rtl"&&(r+=F(e.clientWidth,o.clientWidth)-i),{width:i,height:s,x:r,y:l}}var Ee=25;function bn(t,e){let n=E(t),o=C(t),i=n.visualViewport,s=o.clientWidth,r=o.clientHeight,l=0,c=0;if(i){s=i.width,r=i.height;let u=ut();(!u||u&&e==="fixed")&&(l=i.offsetLeft,c=i.offsetTop);}let a=mt(o);if(a<=0){let u=o.ownerDocument,f=u.body,m=getComputedStyle(f),d=u.compatMode==="CSS1Compat"&&parseFloat(m.marginLeft)+parseFloat(m.marginRight)||0,p=Math.abs(o.clientWidth-f.clientWidth-d);p<=Ee&&(s-=p);}else a<=Ee&&(s+=a);return {width:s,height:r,x:l,y:c}}var vn=new Set(["absolute","fixed"]);function En(t,e){let n=nt(t,true,e==="fixed"),o=n.top+t.clientTop,i=n.left+t.clientLeft,s=S(t)?j(t):H(1),r=t.clientWidth*s.x,l=t.clientHeight*s.y,c=i*s.x,a=o*s.y;return {width:r,height:l,x:c,y:a}}function Le(t,e,n){let o;if(e==="viewport")o=bn(t,n);else if(e==="document")o=xn(C(t));else if(L(e))o=En(e,n);else {let i=He(t);o={x:e.x-i.x,y:e.y-i.y,width:e.width,height:e.height};}return W(o)}function Oe(t,e){let n=k(t);return n===e||!L(n)||z(n)?false:T(n).position==="fixed"||Oe(n,e)}function Ln(t,e){let n=e.get(t);if(n)return n;let o=ct(t,[]).filter(l=>L(l)&&q(l)!=="body"),i=null,s=T(t).position==="fixed",r=s?k(t):t;for(;L(r)&&!z(r);){let l=T(r),c=ft(r);!c&&l.position==="fixed"&&(i=null),(s?!c&&!i:!c&&l.position==="static"&&!!i&&vn.has(i.position)||K(r)&&!c&&Oe(t,r))?o=o.filter(u=>u!==r):i=l,r=k(r);}return e.set(t,o),o}function Tn(t){let{element:e,boundary:n,rootBoundary:o,strategy:i}=t,r=[...n==="clippingAncestors"?tt(e)?[]:Ln(e,this._c):[].concat(n),o],l=r[0],c=r.reduce((a,u)=>{let f=Le(e,u,i);return a.top=F(f.top,a.top),a.right=G(f.right,a.right),a.bottom=G(f.bottom,a.bottom),a.left=F(f.left,a.left),a},Le(e,l,i));return {width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}}function An(t){let{width:e,height:n}=Ae(t);return {width:e,height:n}}function Mn(t,e,n){let o=S(e),i=C(e),s=n==="fixed",r=nt(t,true,s,e),l={scrollLeft:0,scrollTop:0},c=H(0);function a(){c.x=mt(i);}if(o||!o&&!s)if((q(e)!=="body"||K(i))&&(l=et(e)),o){let d=nt(e,true,s,e);c.x=d.x+e.clientLeft,c.y=d.y+e.clientTop;}else i&&a();s&&!o&&i&&a();let u=i&&!o&&!s?Se(i,l):H(0),f=r.left+l.scrollLeft-c.x-u.x,m=r.top+l.scrollTop-c.y-u.y;return {x:f,y:m,width:r.width,height:r.height}}function Ft(t){return T(t).position==="static"}function Te(t,e){if(!S(t)||T(t).position==="fixed")return null;if(e)return e(t);let n=t.offsetParent;return C(t)===n&&(n=n.ownerDocument.body),n}function Ce(t,e){let n=E(t);if(tt(t))return n;if(!S(t)){let i=k(t);for(;i&&!z(i);){if(L(i)&&!Ft(i))return i;i=k(i);}return n}let o=Te(t,e);for(;o&&xe(o)&&Ft(o);)o=Te(o,e);return o&&z(o)&&Ft(o)&&!ft(o)?n:o||be(t)||n}var Hn=async function(t){let e=this.getOffsetParent||Ce,n=this.getDimensions,o=await n(t.floating);return {reference:Mn(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}};function Sn(t){return T(t).direction==="rtl"}var On={convertOffsetParentRelativeRectToViewportRelativeRect:wn,getDocumentElement:C,getClippingRect:Tn,getOffsetParent:Ce,getElementRects:Hn,getClientRects:yn,getDimensions:An,getScale:j,isElement:L,isRTL:Sn};var Re=ge;var De=he,ke=pe;var Pe=(t,e,n)=>{let o=new Map,i={platform:On,...n},s={...i.platform,_c:o};return me(t,e,{...i,platform:s})};function ot(t){return t.querySelector(".dropdown-menu")}function pt(t){return t.querySelector("[data-sp-toggle='dropdown']")}function gt(){return document.querySelector(".dropdown-menu.open")?.closest(".dropdown")??null}async function Cn(t){let e=pt(t),n=ot(t);if(!e||!n)return;let o=t.dataset.spPlacement||"bottom-end",i=parseInt(t.dataset.spOffset||"4",10),{x:s,y:r}=await Pe(e,n,{placement:o,middleware:[Re(i),ke(),De({padding:8})]});Object.assign(n.style,{left:`${s}px`,top:`${r}px`});}function Be(t){let e=ot(t);if(!e||e.classList.contains("open"))return;let n=gt();n&&V(n);let o=pt(t);e.classList.add("open"),o?.setAttribute("aria-expanded","true"),e.setAttribute("data-state","open"),Cn(t);}async function V(t){let e=ot(t);if(!e||!e.classList.contains("open"))return;pt(t)?.setAttribute("aria-expanded","false"),e.setAttribute("data-state","closed"),await O([e]),e.classList.remove("open"),e.removeAttribute("data-state");}function Bt(t){ot(t)?.classList.contains("open")?V(t):Be(t);}function Rn(t){let e=t.target,n=e.closest("[data-sp-toggle='dropdown']");if(n){let s=n.closest(".dropdown");s&&(t.preventDefault(),Bt(s));return}let o=e.closest(".dropdown-item");if(o){if(b(o)){t.preventDefault();return}let s=o.closest(".dropdown");s&&V(s);return}let i=gt();i&&!i.contains(e)&&V(i);}function Dn(t){let e=t.target,n=e.closest(".dropdown"),o=gt();if(t.key==="Escape"&&o){t.preventDefault();let c=pt(o);V(o),c?.focus();return}if((t.key==="Enter"||t.key===" ")&&e.matches("[data-sp-toggle='dropdown']")){t.preventDefault(),n&&Bt(n);return}let i=n?ot(n):null;if(!i?.classList.contains("open"))return;let s=[...i.querySelectorAll(".dropdown-item")],r=s.indexOf(e),l=null;switch(t.key){case "ArrowDown":t.preventDefault(),r<0?l=s.find(c=>!b(c))??null:l=R(s,r,1);break;case "ArrowUp":t.preventDefault(),r<0?l=[...s].reverse().find(c=>!b(c))??null:l=R(s,r,-1);break;case "Home":t.preventDefault(),l=s.find(c=>!b(c))??null;break;case "End":t.preventDefault(),l=[...s].reverse().find(c=>!b(c))??null;break}l&&l.focus();}function kn(t){let e=gt();if(!e)return;let n=t.relatedTarget;(!n||!e.contains(n))&&V(e);}var Fe=false;(function(){typeof document>"u"||Fe||(Fe=true,document.addEventListener("click",Rn),document.addEventListener("keydown",Dn),document.addEventListener("focusout",kn));})();var zt={};I(zt,{close:()=>it,open:()=>$t,toggle:()=>$e});function Pn(){let t=getComputedStyle(document.documentElement).getPropertyValue("--breakpoint-sidebar");return parseInt(t,10)||1024}function wt(){return window.innerWidth<Pn()}function Fn(t){return t.closest(".sidebar")?.querySelector(".sidebar-backdrop")??null}function Wt(t){let e=[t],n=Fn(t);return n&&e.push(n),e}function qt(t,e){for(let n of t)e?n.classList.add("open"):n.classList.remove("open");}function ht(t,e){for(let n of t)e===null?n.removeAttribute("data-state"):n.setAttribute("data-state",e);}function $t(t){if(wt()){let e=Wt(t);qt(e,true),ht(e,"open");}else t.classList.remove("collapsed");}async function it(t){if(wt()){let e=Wt(t);ht(e,"closed"),await O(e),qt(e,false),ht(e,null);}else t.classList.add("collapsed");}function $e(t){wt()?t.classList.contains("open")?it(t):$t(t):t.classList.contains("collapsed")?$t(t):it(t);}function Bn(t){let e=t.target,n=e.closest("[data-sp-toggle='sidebar']");if(n){let o=n.dataset.spTarget;if(o){let i=document.querySelector(o);i&&$e(i);}return}if(e.classList.contains("sidebar-backdrop")){let i=e.closest(".sidebar")?.querySelector(".sidebar-panel.open");i&&it(i);}}function Nn(t){if(t.key==="Escape"){let e=document.querySelector(".sidebar-panel.open");e&&(t.preventDefault(),it(e));}}function $n(){wt()||document.querySelectorAll(".sidebar-panel.open").forEach(e=>{let n=Wt(e);qt(n,false),ht(n,null);});}var Ne=false;(function(){typeof document>"u"||Ne||(Ne=true,document.addEventListener("click",Bn),document.addEventListener("keydown",Nn),window.addEventListener("resize",$n));})();var _t={};I(_t,{select:()=>Vt});function Vt(t){if(b(t))return;let e=t.closest(".tab-list");if(!e)return;let n=e.querySelectorAll(".tab");for(let i of n){i.classList.remove("active"),i.setAttribute("aria-selected","false"),i.setAttribute("tabindex","-1");let s=i.dataset.spTarget;s&&document.querySelector(s)?.classList.remove("active");}t.classList.add("active"),t.setAttribute("aria-selected","true"),t.setAttribute("tabindex","0");let o=t.dataset.spTarget;o&&document.querySelector(o)?.classList.add("active");}function Wn(t){let n=t.target.closest("[data-sp-toggle='tab']");n&&Vt(n);}function qn(t){let e=t.target;if(!e.classList.contains("tab"))return;let n=e.closest(".tab-list");if(!n)return;let o=[...n.querySelectorAll(".tab")],i=o.indexOf(e),s=null;switch(t.key){case "ArrowLeft":s=R(o,i,-1);break;case "ArrowRight":s=R(o,i,1);break;case "Home":s=o.find(r=>!b(r))??null;break;case "End":s=[...o].reverse().find(r=>!b(r))??null;break}s&&(t.preventDefault(),s.focus(),Vt(s));}var We=false;(function(){typeof document>"u"||We||(We=true,document.addEventListener("click",Wn),document.addEventListener("keydown",qn));})();typeof window<"u"&&(window.sp={accordion:Lt,collapsible:At,dialog:Ot,dropdown:Nt,sidebar:zt,tabs:_t});export{Lt as accordion,At as collapsible,Ot as dialog,Nt as dropdown,zt as sidebar,_t as tabs};//# sourceMappingURL=index.js.map
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/js/dialog.ts","../src/js/utils.ts","../src/js/dropdown.ts","../../../node_modules/@floating-ui/utils/dist/floating-ui.utils.mjs","../../../node_modules/@floating-ui/core/dist/floating-ui.core.mjs","../../../node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.mjs","../../../node_modules/@floating-ui/dom/dist/floating-ui.dom.mjs","../src/js/tabs.ts","../src/js/index.ts"],"names":["dialog_exports","__export","close","open","toggle","FOCUSABLE_SELECTOR","getFocusableElements","container","el","waitForAnimations","elements","animations","a","BACKDROP_SELECTOR","PANEL_SELECTOR","getAnimatableElements","dialog","setDataState","state","isModal","focusable","handleKeydown","e","dialogEl","first","last","handleClick","target","toggleBtn","selector","dismissBtn","backdrop","initialized","dropdown_exports","min","max","round","createCoords","v","oppositeSideMap","oppositeAlignmentMap","clamp","start","value","end","evaluate","param","getSide","placement","getAlignment","getOppositeAxis","axis","getAxisLength","yAxisSides","getSideAxis","getAlignmentAxis","getAlignmentSides","rects","rtl","alignment","alignmentAxis","length","mainAlignmentSide","getOppositePlacement","getExpandedPlacements","oppositePlacement","getOppositeAlignmentPlacement","lrPlacement","rlPlacement","tbPlacement","btPlacement","getSideList","side","isStart","getOppositeAxisPlacements","flipAlignment","direction","list","expandPaddingObject","padding","getPaddingObject","rectToClientRect","rect","x","y","width","height","computeCoordsFromPlacement","_ref","reference","floating","sideAxis","alignLength","isVertical","commonX","commonY","commonAlign","coords","computePosition","config","strategy","middleware","platform","validMiddleware","statefulPlacement","middlewareData","resetCount","i","name","fn","nextX","nextY","data","reset","detectOverflow","options","_await$platform$isEle","boundary","rootBoundary","elementContext","altBoundary","paddingObject","element","clippingClientRect","offsetParent","offsetScale","elementClientRect","flip","_middlewareData$arrow","_middlewareData$flip","initialPlacement","checkMainAxis","checkCrossAxis","specifiedFallbackPlacements","fallbackStrategy","fallbackAxisSideDirection","detectOverflowOptions","initialSideAxis","isBasePlacement","fallbackPlacements","hasFallbackAxisSideDirection","placements","overflow","overflows","overflowsData","sides","_middlewareData$flip2","_overflowsData$filter","nextIndex","nextPlacement","d","resetPlacement","b","_overflowsData$filter2","currentSideAxis","acc","originSides","convertValueToCoords","mainAxisMulti","crossAxisMulti","rawValue","mainAxis","crossAxis","offset","_middlewareData$offse","diffCoords","shift","limiter","mainAxisCoord","crossAxisCoord","minSide","maxSide","limitedCoords","hasWindow","getNodeName","node","isNode","getWindow","_node$ownerDocument","getDocumentElement","isElement","isHTMLElement","isShadowRoot","invalidOverflowDisplayValues","isOverflowElement","overflowX","overflowY","display","getComputedStyle","tableElements","isTableElement","topLayerSelectors","isTopLayer","transformProperties","willChangeValues","containValues","isContainingBlock","elementOrCss","webkit","isWebKit","css","getContainingBlock","currentNode","getParentNode","isLastTraversableNode","lastTraversableNodeNames","getNodeScroll","result","getNearestOverflowAncestor","parentNode","getOverflowAncestors","traverseIframes","_node$ownerDocument2","scrollableAncestor","isBody","win","getFrameElement","getCssDimensions","hasOffset","offsetWidth","offsetHeight","shouldFallback","unwrapElement","getScale","domElement","$","noOffsets","getVisualOffsets","shouldAddVisualOffsets","isFixed","floatingOffsetParent","getBoundingClientRect","includeScale","isFixedStrategy","clientRect","scale","visualOffsets","offsetWin","currentWin","currentIFrame","iframeScale","iframeRect","left","top","getWindowScrollBarX","leftScroll","getHTMLOffset","documentElement","scroll","htmlRect","convertOffsetParentRelativeRectToViewportRelativeRect","topLayer","offsets","isOffsetParentAnElement","offsetRect","htmlOffset","getClientRects","getDocumentRect","html","body","SCROLLBAR_MAX","getViewportRect","visualViewport","visualViewportBased","windowScrollbarX","doc","bodyStyles","bodyMarginInline","clippingStableScrollbarWidth","absoluteOrFixed","getInnerBoundingClientRect","getClientRectFromClippingAncestor","clippingAncestor","hasFixedPositionAncestor","stopNode","getClippingElementAncestors","cache","cachedResult","currentContainingBlockComputedStyle","elementIsFixed","computedStyle","currentNodeIsContaining","ancestor","getClippingRect","clippingAncestors","firstClippingAncestor","clippingRect","accRect","getDimensions","getRectRelativeToOffsetParent","setLeftRTLScrollbarOffset","isStaticPositioned","getTrueOffsetParent","polyfill","rawOffsetParent","getOffsetParent","svgOffsetParent","getElementRects","getOffsetParentFn","getDimensionsFn","floatingDimensions","isRTL","mergedOptions","platformWithCache","getMenu","dropdown","getTrigger","getOpenDropdown","positionMenu","trigger","menu","offsetValue","openDropdown","item","items","currentIndex","nextItem","handleFocusOut","relatedTarget","tabs_exports","select","tab","tabList","tabs","t","findNextEnabledTab","startIndex","len","index","nextTab"],"mappings":"AAAA,IAAA,EAAA,CAAA,MAAA,CAAA,cAAA,CAAA,IAAA,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,GAAA,CAAA,IAAA,IAAA,CAAA,IAAA,CAAA,CAAA,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,GAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,UAAA,CAAA,IAAA,CAAA,EAAA,CAAA,CAAA,IAAAA,GAAA,GAAAC,EAAAA,CAAAD,EAAAA,CAAA,CAAA,KAAA,CAAA,IAAAE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B,GAAQ,QAAA,CAAAiC,EAAAA,CAAU,KAAA8R,EAAK,CAAA,CAAA","file":"index.js","sourcesContent":["// Starting Point UI Dialog Module\n\nimport { getFocusableElements, waitForAnimations } from \"./utils\";\n\nconst BACKDROP_SELECTOR = \".dialog-backdrop, .sheet-backdrop\";\nconst PANEL_SELECTOR = \".dialog-panel, .sheet-panel\";\n\nfunction getAnimatableElements(dialog: HTMLDialogElement): HTMLElement[] {\n return [\n ...dialog.querySelectorAll<HTMLElement>(\n `${BACKDROP_SELECTOR}, ${PANEL_SELECTOR}`\n ),\n ];\n}\n\nfunction setDataState(\n elements: HTMLElement[],\n state: \"open\" | \"closed\" | null\n) {\n for (const el of elements) {\n if (state === null) {\n el.removeAttribute(\"data-state\");\n } else {\n el.setAttribute(\"data-state\", state);\n }\n }\n}\n\nfunction isModal(dialog: HTMLDialogElement): boolean {\n return dialog.querySelector(BACKDROP_SELECTOR) !== null;\n}\n\nexport function open(dialog: HTMLDialogElement) {\n dialog.show();\n const elements = getAnimatableElements(dialog);\n setDataState(elements, \"open\");\n\n // Focus first focusable element in modal dialogs\n if (isModal(dialog)) {\n const focusable = getFocusableElements(dialog);\n if (focusable.length > 0) {\n focusable[0].focus();\n }\n }\n}\n\nexport async function close(dialog: HTMLDialogElement) {\n const elements = getAnimatableElements(dialog);\n setDataState(elements, \"closed\");\n\n await waitForAnimations(elements);\n\n dialog.close();\n setDataState(elements, null);\n}\n\nexport function toggle(dialog: HTMLDialogElement) {\n if (dialog.open) {\n close(dialog);\n } else {\n open(dialog);\n }\n}\n\n// Handle keydown for Escape and focus trapping\nfunction handleKeydown(e: KeyboardEvent) {\n const dialogEl = (e.target as HTMLElement).closest<HTMLDialogElement>(\n \"dialog\"\n );\n if (!dialogEl?.open) return;\n\n // Handle Escape key\n if (e.key === \"Escape\") {\n e.preventDefault();\n const isStatic = dialogEl.dataset.spBackdrop === \"static\";\n if (!isStatic) {\n close(dialogEl);\n }\n return;\n }\n\n // Handle Tab key for focus trapping in modals\n if (e.key === \"Tab\" && isModal(dialogEl)) {\n const focusable = getFocusableElements(dialogEl);\n if (focusable.length === 0) return;\n\n const first = focusable[0];\n const last = focusable[focusable.length - 1];\n\n if (e.shiftKey && document.activeElement === first) {\n e.preventDefault();\n last.focus();\n } else if (!e.shiftKey && document.activeElement === last) {\n e.preventDefault();\n first.focus();\n }\n }\n}\n\n// Global click handler for data attributes\nfunction handleClick(e: MouseEvent) {\n const target = e.target as HTMLElement;\n\n // Handle toggle buttons\n const toggleBtn = target.closest<HTMLElement>(\"[data-sp-toggle='dialog']\");\n if (toggleBtn) {\n const selector = toggleBtn.dataset.spTarget;\n if (selector) {\n const dialogEl = document.querySelector<HTMLDialogElement>(selector);\n if (dialogEl) {\n open(dialogEl);\n }\n }\n return;\n }\n\n // Handle dismiss buttons\n const dismissBtn = target.closest<HTMLElement>(\"[data-sp-dismiss='dialog']\");\n if (dismissBtn) {\n const dialogEl = dismissBtn.closest<HTMLDialogElement>(\"dialog\");\n if (dialogEl) {\n close(dialogEl);\n }\n return;\n }\n\n // Handle backdrop clicks\n const backdrop = target.closest<HTMLElement>(BACKDROP_SELECTOR);\n if (backdrop) {\n const dialogEl = backdrop.closest<HTMLDialogElement>(\"dialog\");\n if (dialogEl) {\n // Static backdrop prevents closing via click\n const isStatic = dialogEl.dataset.spBackdrop === \"static\";\n if (!isStatic) {\n close(dialogEl);\n }\n }\n }\n}\n\n// Initialize global listeners\nlet initialized = false;\n\n(function init() {\n if (typeof document === \"undefined\" || initialized) return;\n initialized = true;\n\n document.addEventListener(\"click\", handleClick);\n document.addEventListener(\"keydown\", handleKeydown);\n})();\n","// Starting Point UI Utilities\n\nconst FOCUSABLE_SELECTOR = [\n \"a[href]\",\n \"button:not([disabled])\",\n \"input:not([disabled])\",\n \"select:not([disabled])\",\n \"textarea:not([disabled])\",\n \"[tabindex]:not([tabindex='-1'])\",\n \"[contenteditable]:not([contenteditable='false'])\",\n \"audio[controls]\",\n \"video[controls]\",\n \"details > summary\",\n \"iframe\",\n].join(\", \");\n\nexport function getFocusableElements(container: HTMLElement): HTMLElement[] {\n return [\n ...container.querySelectorAll<HTMLElement>(FOCUSABLE_SELECTOR),\n ].filter((el) => el.offsetParent !== null);\n}\n\nexport async function waitForAnimations(\n elements: HTMLElement[]\n): Promise<void> {\n const animations = elements.flatMap((el) => el.getAnimations());\n if (animations.length === 0) return;\n await Promise.all(animations.map((a) => a.finished));\n}\n","// Starting Point UI Dropdown Module\n\nimport {\n computePosition,\n flip,\n shift,\n offset,\n type Placement,\n} from \"@floating-ui/dom\";\nimport { waitForAnimations } from \"./utils\";\n\nfunction getMenu(dropdown: HTMLElement): HTMLElement | null {\n return dropdown.querySelector(\".dropdown-menu\");\n}\n\nfunction getTrigger(dropdown: HTMLElement): HTMLElement | null {\n return dropdown.querySelector(\"[data-sp-toggle='dropdown']\");\n}\n\nfunction getOpenDropdown(): HTMLElement | null {\n const openMenu = document.querySelector(\".dropdown-menu.open\");\n return openMenu?.closest(\".dropdown\") ?? null;\n}\n\nasync function positionMenu(dropdown: HTMLElement) {\n const trigger = getTrigger(dropdown);\n const menu = getMenu(dropdown);\n if (!trigger || !menu) return;\n\n const placement = (dropdown.dataset.spPlacement as Placement) || \"bottom-end\";\n const offsetValue = parseInt(dropdown.dataset.spOffset || \"4\", 10);\n\n const { x, y } = await computePosition(trigger, menu, {\n placement,\n middleware: [offset(offsetValue), flip(), shift({ padding: 8 })],\n });\n\n Object.assign(menu.style, {\n left: `${x}px`,\n top: `${y}px`,\n });\n}\n\nexport function open(dropdown: HTMLElement) {\n const menu = getMenu(dropdown);\n if (!menu || menu.classList.contains(\"open\")) return;\n\n // Close any other open dropdown first\n const openDropdown = getOpenDropdown();\n if (openDropdown) {\n close(openDropdown);\n }\n\n const trigger = getTrigger(dropdown);\n\n menu.classList.add(\"open\");\n trigger?.setAttribute(\"aria-expanded\", \"true\");\n menu.setAttribute(\"data-state\", \"open\");\n\n positionMenu(dropdown);\n}\n\nexport async function close(dropdown: HTMLElement) {\n const menu = getMenu(dropdown);\n if (!menu || !menu.classList.contains(\"open\")) return;\n\n const trigger = getTrigger(dropdown);\n\n trigger?.setAttribute(\"aria-expanded\", \"false\");\n menu.setAttribute(\"data-state\", \"closed\");\n\n await waitForAnimations([menu]);\n\n menu.classList.remove(\"open\");\n menu.removeAttribute(\"data-state\");\n}\n\nexport function toggle(dropdown: HTMLElement) {\n const menu = getMenu(dropdown);\n if (menu?.classList.contains(\"open\")) {\n close(dropdown);\n } else {\n open(dropdown);\n }\n}\n\nfunction handleClick(e: MouseEvent) {\n const target = e.target as HTMLElement;\n\n // Handle toggle button clicks\n const toggleBtn = target.closest<HTMLElement>(\"[data-sp-toggle='dropdown']\");\n if (toggleBtn) {\n const dropdown = toggleBtn.closest<HTMLElement>(\".dropdown\");\n if (dropdown) {\n e.preventDefault();\n toggle(dropdown);\n }\n return;\n }\n\n // Handle item clicks\n const item = target.closest<HTMLElement>(\".dropdown-item\");\n if (item) {\n // Ignore disabled items\n if (item.getAttribute(\"aria-disabled\") === \"true\") {\n e.preventDefault();\n return;\n }\n const dropdown = item.closest<HTMLElement>(\".dropdown\");\n if (dropdown) {\n close(dropdown);\n }\n return;\n }\n\n // Close dropdown when clicking outside\n const openDropdown = getOpenDropdown();\n if (openDropdown && !openDropdown.contains(target)) {\n close(openDropdown);\n }\n}\n\nfunction handleKeydown(e: KeyboardEvent) {\n const target = e.target as HTMLElement;\n const dropdown = target.closest<HTMLElement>(\".dropdown\");\n\n // Handle Escape to close\n const openDropdown = getOpenDropdown();\n if (e.key === \"Escape\" && openDropdown) {\n e.preventDefault();\n const trigger = getTrigger(openDropdown);\n close(openDropdown);\n trigger?.focus();\n return;\n }\n\n // Handle Enter/Space on trigger\n if (\n (e.key === \"Enter\" || e.key === \" \") &&\n target.matches(\"[data-sp-toggle='dropdown']\")\n ) {\n e.preventDefault();\n if (dropdown) {\n toggle(dropdown);\n }\n return;\n }\n\n // Handle arrow navigation within menu\n const menu = dropdown ? getMenu(dropdown) : null;\n if (!menu?.classList.contains(\"open\")) return;\n\n const items = [\n ...menu.querySelectorAll<HTMLElement>(\n \".dropdown-item:not([aria-disabled='true'])\"\n ),\n ];\n const currentIndex = items.indexOf(target);\n\n let nextItem: HTMLElement | null = null;\n\n switch (e.key) {\n case \"ArrowDown\":\n e.preventDefault();\n if (currentIndex < 0) {\n nextItem = items[0];\n } else {\n nextItem = items[(currentIndex + 1) % items.length];\n }\n break;\n case \"ArrowUp\":\n e.preventDefault();\n if (currentIndex < 0) {\n nextItem = items[items.length - 1];\n } else {\n nextItem = items[(currentIndex - 1 + items.length) % items.length];\n }\n break;\n case \"Home\":\n e.preventDefault();\n nextItem = items[0];\n break;\n case \"End\":\n e.preventDefault();\n nextItem = items[items.length - 1];\n break;\n }\n\n if (nextItem) {\n nextItem.focus();\n }\n}\n\nfunction handleFocusOut(e: FocusEvent) {\n const openDropdown = getOpenDropdown();\n if (!openDropdown) return;\n\n const relatedTarget = e.relatedTarget as HTMLElement | null;\n\n // If focus is moving outside the dropdown, close it\n if (!relatedTarget || !openDropdown.contains(relatedTarget)) {\n close(openDropdown);\n }\n}\n\n// Initialize global listeners\nlet initialized = false;\n\n(function init() {\n if (typeof document === \"undefined\" || initialized) return;\n initialized = true;\n\n document.addEventListener(\"click\", handleClick);\n document.addEventListener(\"keydown\", handleKeydown);\n document.addEventListener(\"focusout\", handleFocusOut);\n})();\n","/**\n * Custom positioning reference element.\n * @see https://floating-ui.com/docs/virtual-elements\n */\n\nconst sides = ['top', 'right', 'bottom', 'left'];\nconst alignments = ['start', 'end'];\nconst placements = /*#__PURE__*/sides.reduce((acc, side) => acc.concat(side, side + \"-\" + alignments[0], side + \"-\" + alignments[1]), []);\nconst min = Math.min;\nconst max = Math.max;\nconst round = Math.round;\nconst floor = Math.floor;\nconst createCoords = v => ({\n x: v,\n y: v\n});\nconst oppositeSideMap = {\n left: 'right',\n right: 'left',\n bottom: 'top',\n top: 'bottom'\n};\nconst oppositeAlignmentMap = {\n start: 'end',\n end: 'start'\n};\nfunction clamp(start, value, end) {\n return max(start, min(value, end));\n}\nfunction evaluate(value, param) {\n return typeof value === 'function' ? value(param) : value;\n}\nfunction getSide(placement) {\n return placement.split('-')[0];\n}\nfunction getAlignment(placement) {\n return placement.split('-')[1];\n}\nfunction getOppositeAxis(axis) {\n return axis === 'x' ? 'y' : 'x';\n}\nfunction getAxisLength(axis) {\n return axis === 'y' ? 'height' : 'width';\n}\nconst yAxisSides = /*#__PURE__*/new Set(['top', 'bottom']);\nfunction getSideAxis(placement) {\n return yAxisSides.has(getSide(placement)) ? 'y' : 'x';\n}\nfunction getAlignmentAxis(placement) {\n return getOppositeAxis(getSideAxis(placement));\n}\nfunction getAlignmentSides(placement, rects, rtl) {\n if (rtl === void 0) {\n rtl = false;\n }\n const alignment = getAlignment(placement);\n const alignmentAxis = getAlignmentAxis(placement);\n const length = getAxisLength(alignmentAxis);\n let mainAlignmentSide = alignmentAxis === 'x' ? alignment === (rtl ? 'end' : 'start') ? 'right' : 'left' : alignment === 'start' ? 'bottom' : 'top';\n if (rects.reference[length] > rects.floating[length]) {\n mainAlignmentSide = getOppositePlacement(mainAlignmentSide);\n }\n return [mainAlignmentSide, getOppositePlacement(mainAlignmentSide)];\n}\nfunction getExpandedPlacements(placement) {\n const oppositePlacement = getOppositePlacement(placement);\n return [getOppositeAlignmentPlacement(placement), oppositePlacement, getOppositeAlignmentPlacement(oppositePlacement)];\n}\nfunction getOppositeAlignmentPlacement(placement) {\n return placement.replace(/start|end/g, alignment => oppositeAlignmentMap[alignment]);\n}\nconst lrPlacement = ['left', 'right'];\nconst rlPlacement = ['right', 'left'];\nconst tbPlacement = ['top', 'bottom'];\nconst btPlacement = ['bottom', 'top'];\nfunction getSideList(side, isStart, rtl) {\n switch (side) {\n case 'top':\n case 'bottom':\n if (rtl) return isStart ? rlPlacement : lrPlacement;\n return isStart ? lrPlacement : rlPlacement;\n case 'left':\n case 'right':\n return isStart ? tbPlacement : btPlacement;\n default:\n return [];\n }\n}\nfunction getOppositeAxisPlacements(placement, flipAlignment, direction, rtl) {\n const alignment = getAlignment(placement);\n let list = getSideList(getSide(placement), direction === 'start', rtl);\n if (alignment) {\n list = list.map(side => side + \"-\" + alignment);\n if (flipAlignment) {\n list = list.concat(list.map(getOppositeAlignmentPlacement));\n }\n }\n return list;\n}\nfunction getOppositePlacement(placement) {\n return placement.replace(/left|right|bottom|top/g, side => oppositeSideMap[side]);\n}\nfunction expandPaddingObject(padding) {\n return {\n top: 0,\n right: 0,\n bottom: 0,\n left: 0,\n ...padding\n };\n}\nfunction getPaddingObject(padding) {\n return typeof padding !== 'number' ? expandPaddingObject(padding) : {\n top: padding,\n right: padding,\n bottom: padding,\n left: padding\n };\n}\nfunction rectToClientRect(rect) {\n const {\n x,\n y,\n width,\n height\n } = rect;\n return {\n width,\n height,\n top: y,\n left: x,\n right: x + width,\n bottom: y + height,\n x,\n y\n };\n}\n\nexport { alignments, clamp, createCoords, evaluate, expandPaddingObject, floor, getAlignment, getAlignmentAxis, getAlignmentSides, getAxisLength, getExpandedPlacements, getOppositeAlignmentPlacement, getOppositeAxis, getOppositeAxisPlacements, getOppositePlacement, getPaddingObject, getSide, getSideAxis, max, min, placements, rectToClientRect, round, sides };\n","import { getSideAxis, getAlignmentAxis, getAxisLength, getSide, getAlignment, evaluate, getPaddingObject, rectToClientRect, min, clamp, placements, getAlignmentSides, getOppositeAlignmentPlacement, getOppositePlacement, getExpandedPlacements, getOppositeAxisPlacements, sides, max, getOppositeAxis } from '@floating-ui/utils';\nexport { rectToClientRect } from '@floating-ui/utils';\n\nfunction computeCoordsFromPlacement(_ref, placement, rtl) {\n let {\n reference,\n floating\n } = _ref;\n const sideAxis = getSideAxis(placement);\n const alignmentAxis = getAlignmentAxis(placement);\n const alignLength = getAxisLength(alignmentAxis);\n const side = getSide(placement);\n const isVertical = sideAxis === 'y';\n const commonX = reference.x + reference.width / 2 - floating.width / 2;\n const commonY = reference.y + reference.height / 2 - floating.height / 2;\n const commonAlign = reference[alignLength] / 2 - floating[alignLength] / 2;\n let coords;\n switch (side) {\n case 'top':\n coords = {\n x: commonX,\n y: reference.y - floating.height\n };\n break;\n case 'bottom':\n coords = {\n x: commonX,\n y: reference.y + reference.height\n };\n break;\n case 'right':\n coords = {\n x: reference.x + reference.width,\n y: commonY\n };\n break;\n case 'left':\n coords = {\n x: reference.x - floating.width,\n y: commonY\n };\n break;\n default:\n coords = {\n x: reference.x,\n y: reference.y\n };\n }\n switch (getAlignment(placement)) {\n case 'start':\n coords[alignmentAxis] -= commonAlign * (rtl && isVertical ? -1 : 1);\n break;\n case 'end':\n coords[alignmentAxis] += commonAlign * (rtl && isVertical ? -1 : 1);\n break;\n }\n return coords;\n}\n\n/**\n * Computes the `x` and `y` coordinates that will place the floating element\n * next to a given reference element.\n *\n * This export does not have any `platform` interface logic. You will need to\n * write one for the platform you are using Floating UI with.\n */\nconst computePosition = async (reference, floating, config) => {\n const {\n placement = 'bottom',\n strategy = 'absolute',\n middleware = [],\n platform\n } = config;\n const validMiddleware = middleware.filter(Boolean);\n const rtl = await (platform.isRTL == null ? void 0 : platform.isRTL(floating));\n let rects = await platform.getElementRects({\n reference,\n floating,\n strategy\n });\n let {\n x,\n y\n } = computeCoordsFromPlacement(rects, placement, rtl);\n let statefulPlacement = placement;\n let middlewareData = {};\n let resetCount = 0;\n for (let i = 0; i < validMiddleware.length; i++) {\n const {\n name,\n fn\n } = validMiddleware[i];\n const {\n x: nextX,\n y: nextY,\n data,\n reset\n } = await fn({\n x,\n y,\n initialPlacement: placement,\n placement: statefulPlacement,\n strategy,\n middlewareData,\n rects,\n platform,\n elements: {\n reference,\n floating\n }\n });\n x = nextX != null ? nextX : x;\n y = nextY != null ? nextY : y;\n middlewareData = {\n ...middlewareData,\n [name]: {\n ...middlewareData[name],\n ...data\n }\n };\n if (reset && resetCount <= 50) {\n resetCount++;\n if (typeof reset === 'object') {\n if (reset.placement) {\n statefulPlacement = reset.placement;\n }\n if (reset.rects) {\n rects = reset.rects === true ? await platform.getElementRects({\n reference,\n floating,\n strategy\n }) : reset.rects;\n }\n ({\n x,\n y\n } = computeCoordsFromPlacement(rects, statefulPlacement, rtl));\n }\n i = -1;\n }\n }\n return {\n x,\n y,\n placement: statefulPlacement,\n strategy,\n middlewareData\n };\n};\n\n/**\n * Resolves with an object of overflow side offsets that determine how much the\n * element is overflowing a given clipping boundary on each side.\n * - positive = overflowing the boundary by that number of pixels\n * - negative = how many pixels left before it will overflow\n * - 0 = lies flush with the boundary\n * @see https://floating-ui.com/docs/detectOverflow\n */\nasync function detectOverflow(state, options) {\n var _await$platform$isEle;\n if (options === void 0) {\n options = {};\n }\n const {\n x,\n y,\n platform,\n rects,\n elements,\n strategy\n } = state;\n const {\n boundary = 'clippingAncestors',\n rootBoundary = 'viewport',\n elementContext = 'floating',\n altBoundary = false,\n padding = 0\n } = evaluate(options, state);\n const paddingObject = getPaddingObject(padding);\n const altContext = elementContext === 'floating' ? 'reference' : 'floating';\n const element = elements[altBoundary ? altContext : elementContext];\n const clippingClientRect = rectToClientRect(await platform.getClippingRect({\n element: ((_await$platform$isEle = await (platform.isElement == null ? void 0 : platform.isElement(element))) != null ? _await$platform$isEle : true) ? element : element.contextElement || (await (platform.getDocumentElement == null ? void 0 : platform.getDocumentElement(elements.floating))),\n boundary,\n rootBoundary,\n strategy\n }));\n const rect = elementContext === 'floating' ? {\n x,\n y,\n width: rects.floating.width,\n height: rects.floating.height\n } : rects.reference;\n const offsetParent = await (platform.getOffsetParent == null ? void 0 : platform.getOffsetParent(elements.floating));\n const offsetScale = (await (platform.isElement == null ? void 0 : platform.isElement(offsetParent))) ? (await (platform.getScale == null ? void 0 : platform.getScale(offsetParent))) || {\n x: 1,\n y: 1\n } : {\n x: 1,\n y: 1\n };\n const elementClientRect = rectToClientRect(platform.convertOffsetParentRelativeRectToViewportRelativeRect ? await platform.convertOffsetParentRelativeRectToViewportRelativeRect({\n elements,\n rect,\n offsetParent,\n strategy\n }) : rect);\n return {\n top: (clippingClientRect.top - elementClientRect.top + paddingObject.top) / offsetScale.y,\n bottom: (elementClientRect.bottom - clippingClientRect.bottom + paddingObject.bottom) / offsetScale.y,\n left: (clippingClientRect.left - elementClientRect.left + paddingObject.left) / offsetScale.x,\n right: (elementClientRect.right - clippingClientRect.right + paddingObject.right) / offsetScale.x\n };\n}\n\n/**\n * Provides data to position an inner element of the floating element so that it\n * appears centered to the reference element.\n * @see https://floating-ui.com/docs/arrow\n */\nconst arrow = options => ({\n name: 'arrow',\n options,\n async fn(state) {\n const {\n x,\n y,\n placement,\n rects,\n platform,\n elements,\n middlewareData\n } = state;\n // Since `element` is required, we don't Partial<> the type.\n const {\n element,\n padding = 0\n } = evaluate(options, state) || {};\n if (element == null) {\n return {};\n }\n const paddingObject = getPaddingObject(padding);\n const coords = {\n x,\n y\n };\n const axis = getAlignmentAxis(placement);\n const length = getAxisLength(axis);\n const arrowDimensions = await platform.getDimensions(element);\n const isYAxis = axis === 'y';\n const minProp = isYAxis ? 'top' : 'left';\n const maxProp = isYAxis ? 'bottom' : 'right';\n const clientProp = isYAxis ? 'clientHeight' : 'clientWidth';\n const endDiff = rects.reference[length] + rects.reference[axis] - coords[axis] - rects.floating[length];\n const startDiff = coords[axis] - rects.reference[axis];\n const arrowOffsetParent = await (platform.getOffsetParent == null ? void 0 : platform.getOffsetParent(element));\n let clientSize = arrowOffsetParent ? arrowOffsetParent[clientProp] : 0;\n\n // DOM platform can return `window` as the `offsetParent`.\n if (!clientSize || !(await (platform.isElement == null ? void 0 : platform.isElement(arrowOffsetParent)))) {\n clientSize = elements.floating[clientProp] || rects.floating[length];\n }\n const centerToReference = endDiff / 2 - startDiff / 2;\n\n // If the padding is large enough that it causes the arrow to no longer be\n // centered, modify the padding so that it is centered.\n const largestPossiblePadding = clientSize / 2 - arrowDimensions[length] / 2 - 1;\n const minPadding = min(paddingObject[minProp], largestPossiblePadding);\n const maxPadding = min(paddingObject[maxProp], largestPossiblePadding);\n\n // Make sure the arrow doesn't overflow the floating element if the center\n // point is outside the floating element's bounds.\n const min$1 = minPadding;\n const max = clientSize - arrowDimensions[length] - maxPadding;\n const center = clientSize / 2 - arrowDimensions[length] / 2 + centerToReference;\n const offset = clamp(min$1, center, max);\n\n // If the reference is small enough that the arrow's padding causes it to\n // to point to nothing for an aligned placement, adjust the offset of the\n // floating element itself. To ensure `shift()` continues to take action,\n // a single reset is performed when this is true.\n const shouldAddOffset = !middlewareData.arrow && getAlignment(placement) != null && center !== offset && rects.reference[length] / 2 - (center < min$1 ? minPadding : maxPadding) - arrowDimensions[length] / 2 < 0;\n const alignmentOffset = shouldAddOffset ? center < min$1 ? center - min$1 : center - max : 0;\n return {\n [axis]: coords[axis] + alignmentOffset,\n data: {\n [axis]: offset,\n centerOffset: center - offset - alignmentOffset,\n ...(shouldAddOffset && {\n alignmentOffset\n })\n },\n reset: shouldAddOffset\n };\n }\n});\n\nfunction getPlacementList(alignment, autoAlignment, allowedPlacements) {\n const allowedPlacementsSortedByAlignment = alignment ? [...allowedPlacements.filter(placement => getAlignment(placement) === alignment), ...allowedPlacements.filter(placement => getAlignment(placement) !== alignment)] : allowedPlacements.filter(placement => getSide(placement) === placement);\n return allowedPlacementsSortedByAlignment.filter(placement => {\n if (alignment) {\n return getAlignment(placement) === alignment || (autoAlignment ? getOppositeAlignmentPlacement(placement) !== placement : false);\n }\n return true;\n });\n}\n/**\n * Optimizes the visibility of the floating element by choosing the placement\n * that has the most space available automatically, without needing to specify a\n * preferred placement. Alternative to `flip`.\n * @see https://floating-ui.com/docs/autoPlacement\n */\nconst autoPlacement = function (options) {\n if (options === void 0) {\n options = {};\n }\n return {\n name: 'autoPlacement',\n options,\n async fn(state) {\n var _middlewareData$autoP, _middlewareData$autoP2, _placementsThatFitOnE;\n const {\n rects,\n middlewareData,\n placement,\n platform,\n elements\n } = state;\n const {\n crossAxis = false,\n alignment,\n allowedPlacements = placements,\n autoAlignment = true,\n ...detectOverflowOptions\n } = evaluate(options, state);\n const placements$1 = alignment !== undefined || allowedPlacements === placements ? getPlacementList(alignment || null, autoAlignment, allowedPlacements) : allowedPlacements;\n const overflow = await detectOverflow(state, detectOverflowOptions);\n const currentIndex = ((_middlewareData$autoP = middlewareData.autoPlacement) == null ? void 0 : _middlewareData$autoP.index) || 0;\n const currentPlacement = placements$1[currentIndex];\n if (currentPlacement == null) {\n return {};\n }\n const alignmentSides = getAlignmentSides(currentPlacement, rects, await (platform.isRTL == null ? void 0 : platform.isRTL(elements.floating)));\n\n // Make `computeCoords` start from the right place.\n if (placement !== currentPlacement) {\n return {\n reset: {\n placement: placements$1[0]\n }\n };\n }\n const currentOverflows = [overflow[getSide(currentPlacement)], overflow[alignmentSides[0]], overflow[alignmentSides[1]]];\n const allOverflows = [...(((_middlewareData$autoP2 = middlewareData.autoPlacement) == null ? void 0 : _middlewareData$autoP2.overflows) || []), {\n placement: currentPlacement,\n overflows: currentOverflows\n }];\n const nextPlacement = placements$1[currentIndex + 1];\n\n // There are more placements to check.\n if (nextPlacement) {\n return {\n data: {\n index: currentIndex + 1,\n overflows: allOverflows\n },\n reset: {\n placement: nextPlacement\n }\n };\n }\n const placementsSortedByMostSpace = allOverflows.map(d => {\n const alignment = getAlignment(d.placement);\n return [d.placement, alignment && crossAxis ?\n // Check along the mainAxis and main crossAxis side.\n d.overflows.slice(0, 2).reduce((acc, v) => acc + v, 0) :\n // Check only the mainAxis.\n d.overflows[0], d.overflows];\n }).sort((a, b) => a[1] - b[1]);\n const placementsThatFitOnEachSide = placementsSortedByMostSpace.filter(d => d[2].slice(0,\n // Aligned placements should not check their opposite crossAxis\n // side.\n getAlignment(d[0]) ? 2 : 3).every(v => v <= 0));\n const resetPlacement = ((_placementsThatFitOnE = placementsThatFitOnEachSide[0]) == null ? void 0 : _placementsThatFitOnE[0]) || placementsSortedByMostSpace[0][0];\n if (resetPlacement !== placement) {\n return {\n data: {\n index: currentIndex + 1,\n overflows: allOverflows\n },\n reset: {\n placement: resetPlacement\n }\n };\n }\n return {};\n }\n };\n};\n\n/**\n * Optimizes the visibility of the floating element by flipping the `placement`\n * in order to keep it in view when the preferred placement(s) will overflow the\n * clipping boundary. Alternative to `autoPlacement`.\n * @see https://floating-ui.com/docs/flip\n */\nconst flip = function (options) {\n if (options === void 0) {\n options = {};\n }\n return {\n name: 'flip',\n options,\n async fn(state) {\n var _middlewareData$arrow, _middlewareData$flip;\n const {\n placement,\n middlewareData,\n rects,\n initialPlacement,\n platform,\n elements\n } = state;\n const {\n mainAxis: checkMainAxis = true,\n crossAxis: checkCrossAxis = true,\n fallbackPlacements: specifiedFallbackPlacements,\n fallbackStrategy = 'bestFit',\n fallbackAxisSideDirection = 'none',\n flipAlignment = true,\n ...detectOverflowOptions\n } = evaluate(options, state);\n\n // If a reset by the arrow was caused due to an alignment offset being\n // added, we should skip any logic now since `flip()` has already done its\n // work.\n // https://github.com/floating-ui/floating-ui/issues/2549#issuecomment-1719601643\n if ((_middlewareData$arrow = middlewareData.arrow) != null && _middlewareData$arrow.alignmentOffset) {\n return {};\n }\n const side = getSide(placement);\n const initialSideAxis = getSideAxis(initialPlacement);\n const isBasePlacement = getSide(initialPlacement) === initialPlacement;\n const rtl = await (platform.isRTL == null ? void 0 : platform.isRTL(elements.floating));\n const fallbackPlacements = specifiedFallbackPlacements || (isBasePlacement || !flipAlignment ? [getOppositePlacement(initialPlacement)] : getExpandedPlacements(initialPlacement));\n const hasFallbackAxisSideDirection = fallbackAxisSideDirection !== 'none';\n if (!specifiedFallbackPlacements && hasFallbackAxisSideDirection) {\n fallbackPlacements.push(...getOppositeAxisPlacements(initialPlacement, flipAlignment, fallbackAxisSideDirection, rtl));\n }\n const placements = [initialPlacement, ...fallbackPlacements];\n const overflow = await detectOverflow(state, detectOverflowOptions);\n const overflows = [];\n let overflowsData = ((_middlewareData$flip = middlewareData.flip) == null ? void 0 : _middlewareData$flip.overflows) || [];\n if (checkMainAxis) {\n overflows.push(overflow[side]);\n }\n if (checkCrossAxis) {\n const sides = getAlignmentSides(placement, rects, rtl);\n overflows.push(overflow[sides[0]], overflow[sides[1]]);\n }\n overflowsData = [...overflowsData, {\n placement,\n overflows\n }];\n\n // One or more sides is overflowing.\n if (!overflows.every(side => side <= 0)) {\n var _middlewareData$flip2, _overflowsData$filter;\n const nextIndex = (((_middlewareData$flip2 = middlewareData.flip) == null ? void 0 : _middlewareData$flip2.index) || 0) + 1;\n const nextPlacement = placements[nextIndex];\n if (nextPlacement) {\n const ignoreCrossAxisOverflow = checkCrossAxis === 'alignment' ? initialSideAxis !== getSideAxis(nextPlacement) : false;\n if (!ignoreCrossAxisOverflow ||\n // We leave the current main axis only if every placement on that axis\n // overflows the main axis.\n overflowsData.every(d => getSideAxis(d.placement) === initialSideAxis ? d.overflows[0] > 0 : true)) {\n // Try next placement and re-run the lifecycle.\n return {\n data: {\n index: nextIndex,\n overflows: overflowsData\n },\n reset: {\n placement: nextPlacement\n }\n };\n }\n }\n\n // First, find the candidates that fit on the mainAxis side of overflow,\n // then find the placement that fits the best on the main crossAxis side.\n let resetPlacement = (_overflowsData$filter = overflowsData.filter(d => d.overflows[0] <= 0).sort((a, b) => a.overflows[1] - b.overflows[1])[0]) == null ? void 0 : _overflowsData$filter.placement;\n\n // Otherwise fallback.\n if (!resetPlacement) {\n switch (fallbackStrategy) {\n case 'bestFit':\n {\n var _overflowsData$filter2;\n const placement = (_overflowsData$filter2 = overflowsData.filter(d => {\n if (hasFallbackAxisSideDirection) {\n const currentSideAxis = getSideAxis(d.placement);\n return currentSideAxis === initialSideAxis ||\n // Create a bias to the `y` side axis due to horizontal\n // reading directions favoring greater width.\n currentSideAxis === 'y';\n }\n return true;\n }).map(d => [d.placement, d.overflows.filter(overflow => overflow > 0).reduce((acc, overflow) => acc + overflow, 0)]).sort((a, b) => a[1] - b[1])[0]) == null ? void 0 : _overflowsData$filter2[0];\n if (placement) {\n resetPlacement = placement;\n }\n break;\n }\n case 'initialPlacement':\n resetPlacement = initialPlacement;\n break;\n }\n }\n if (placement !== resetPlacement) {\n return {\n reset: {\n placement: resetPlacement\n }\n };\n }\n }\n return {};\n }\n };\n};\n\nfunction getSideOffsets(overflow, rect) {\n return {\n top: overflow.top - rect.height,\n right: overflow.right - rect.width,\n bottom: overflow.bottom - rect.height,\n left: overflow.left - rect.width\n };\n}\nfunction isAnySideFullyClipped(overflow) {\n return sides.some(side => overflow[side] >= 0);\n}\n/**\n * Provides data to hide the floating element in applicable situations, such as\n * when it is not in the same clipping context as the reference element.\n * @see https://floating-ui.com/docs/hide\n */\nconst hide = function (options) {\n if (options === void 0) {\n options = {};\n }\n return {\n name: 'hide',\n options,\n async fn(state) {\n const {\n rects\n } = state;\n const {\n strategy = 'referenceHidden',\n ...detectOverflowOptions\n } = evaluate(options, state);\n switch (strategy) {\n case 'referenceHidden':\n {\n const overflow = await detectOverflow(state, {\n ...detectOverflowOptions,\n elementContext: 'reference'\n });\n const offsets = getSideOffsets(overflow, rects.reference);\n return {\n data: {\n referenceHiddenOffsets: offsets,\n referenceHidden: isAnySideFullyClipped(offsets)\n }\n };\n }\n case 'escaped':\n {\n const overflow = await detectOverflow(state, {\n ...detectOverflowOptions,\n altBoundary: true\n });\n const offsets = getSideOffsets(overflow, rects.floating);\n return {\n data: {\n escapedOffsets: offsets,\n escaped: isAnySideFullyClipped(offsets)\n }\n };\n }\n default:\n {\n return {};\n }\n }\n }\n };\n};\n\nfunction getBoundingRect(rects) {\n const minX = min(...rects.map(rect => rect.left));\n const minY = min(...rects.map(rect => rect.top));\n const maxX = max(...rects.map(rect => rect.right));\n const maxY = max(...rects.map(rect => rect.bottom));\n return {\n x: minX,\n y: minY,\n width: maxX - minX,\n height: maxY - minY\n };\n}\nfunction getRectsByLine(rects) {\n const sortedRects = rects.slice().sort((a, b) => a.y - b.y);\n const groups = [];\n let prevRect = null;\n for (let i = 0; i < sortedRects.length; i++) {\n const rect = sortedRects[i];\n if (!prevRect || rect.y - prevRect.y > prevRect.height / 2) {\n groups.push([rect]);\n } else {\n groups[groups.length - 1].push(rect);\n }\n prevRect = rect;\n }\n return groups.map(rect => rectToClientRect(getBoundingRect(rect)));\n}\n/**\n * Provides improved positioning for inline reference elements that can span\n * over multiple lines, such as hyperlinks or range selections.\n * @see https://floating-ui.com/docs/inline\n */\nconst inline = function (options) {\n if (options === void 0) {\n options = {};\n }\n return {\n name: 'inline',\n options,\n async fn(state) {\n const {\n placement,\n elements,\n rects,\n platform,\n strategy\n } = state;\n // A MouseEvent's client{X,Y} coords can be up to 2 pixels off a\n // ClientRect's bounds, despite the event listener being triggered. A\n // padding of 2 seems to handle this issue.\n const {\n padding = 2,\n x,\n y\n } = evaluate(options, state);\n const nativeClientRects = Array.from((await (platform.getClientRects == null ? void 0 : platform.getClientRects(elements.reference))) || []);\n const clientRects = getRectsByLine(nativeClientRects);\n const fallback = rectToClientRect(getBoundingRect(nativeClientRects));\n const paddingObject = getPaddingObject(padding);\n function getBoundingClientRect() {\n // There are two rects and they are disjoined.\n if (clientRects.length === 2 && clientRects[0].left > clientRects[1].right && x != null && y != null) {\n // Find the first rect in which the point is fully inside.\n return clientRects.find(rect => x > rect.left - paddingObject.left && x < rect.right + paddingObject.right && y > rect.top - paddingObject.top && y < rect.bottom + paddingObject.bottom) || fallback;\n }\n\n // There are 2 or more connected rects.\n if (clientRects.length >= 2) {\n if (getSideAxis(placement) === 'y') {\n const firstRect = clientRects[0];\n const lastRect = clientRects[clientRects.length - 1];\n const isTop = getSide(placement) === 'top';\n const top = firstRect.top;\n const bottom = lastRect.bottom;\n const left = isTop ? firstRect.left : lastRect.left;\n const right = isTop ? firstRect.right : lastRect.right;\n const width = right - left;\n const height = bottom - top;\n return {\n top,\n bottom,\n left,\n right,\n width,\n height,\n x: left,\n y: top\n };\n }\n const isLeftSide = getSide(placement) === 'left';\n const maxRight = max(...clientRects.map(rect => rect.right));\n const minLeft = min(...clientRects.map(rect => rect.left));\n const measureRects = clientRects.filter(rect => isLeftSide ? rect.left === minLeft : rect.right === maxRight);\n const top = measureRects[0].top;\n const bottom = measureRects[measureRects.length - 1].bottom;\n const left = minLeft;\n const right = maxRight;\n const width = right - left;\n const height = bottom - top;\n return {\n top,\n bottom,\n left,\n right,\n width,\n height,\n x: left,\n y: top\n };\n }\n return fallback;\n }\n const resetRects = await platform.getElementRects({\n reference: {\n getBoundingClientRect\n },\n floating: elements.floating,\n strategy\n });\n if (rects.reference.x !== resetRects.reference.x || rects.reference.y !== resetRects.reference.y || rects.reference.width !== resetRects.reference.width || rects.reference.height !== resetRects.reference.height) {\n return {\n reset: {\n rects: resetRects\n }\n };\n }\n return {};\n }\n };\n};\n\nconst originSides = /*#__PURE__*/new Set(['left', 'top']);\n\n// For type backwards-compatibility, the `OffsetOptions` type was also\n// Derivable.\n\nasync function convertValueToCoords(state, options) {\n const {\n placement,\n platform,\n elements\n } = state;\n const rtl = await (platform.isRTL == null ? void 0 : platform.isRTL(elements.floating));\n const side = getSide(placement);\n const alignment = getAlignment(placement);\n const isVertical = getSideAxis(placement) === 'y';\n const mainAxisMulti = originSides.has(side) ? -1 : 1;\n const crossAxisMulti = rtl && isVertical ? -1 : 1;\n const rawValue = evaluate(options, state);\n\n // eslint-disable-next-line prefer-const\n let {\n mainAxis,\n crossAxis,\n alignmentAxis\n } = typeof rawValue === 'number' ? {\n mainAxis: rawValue,\n crossAxis: 0,\n alignmentAxis: null\n } : {\n mainAxis: rawValue.mainAxis || 0,\n crossAxis: rawValue.crossAxis || 0,\n alignmentAxis: rawValue.alignmentAxis\n };\n if (alignment && typeof alignmentAxis === 'number') {\n crossAxis = alignment === 'end' ? alignmentAxis * -1 : alignmentAxis;\n }\n return isVertical ? {\n x: crossAxis * crossAxisMulti,\n y: mainAxis * mainAxisMulti\n } : {\n x: mainAxis * mainAxisMulti,\n y: crossAxis * crossAxisMulti\n };\n}\n\n/**\n * Modifies the placement by translating the floating element along the\n * specified axes.\n * A number (shorthand for `mainAxis` or distance), or an axes configuration\n * object may be passed.\n * @see https://floating-ui.com/docs/offset\n */\nconst offset = function (options) {\n if (options === void 0) {\n options = 0;\n }\n return {\n name: 'offset',\n options,\n async fn(state) {\n var _middlewareData$offse, _middlewareData$arrow;\n const {\n x,\n y,\n placement,\n middlewareData\n } = state;\n const diffCoords = await convertValueToCoords(state, options);\n\n // If the placement is the same and the arrow caused an alignment offset\n // then we don't need to change the positioning coordinates.\n if (placement === ((_middlewareData$offse = middlewareData.offset) == null ? void 0 : _middlewareData$offse.placement) && (_middlewareData$arrow = middlewareData.arrow) != null && _middlewareData$arrow.alignmentOffset) {\n return {};\n }\n return {\n x: x + diffCoords.x,\n y: y + diffCoords.y,\n data: {\n ...diffCoords,\n placement\n }\n };\n }\n };\n};\n\n/**\n * Optimizes the visibility of the floating element by shifting it in order to\n * keep it in view when it will overflow the clipping boundary.\n * @see https://floating-ui.com/docs/shift\n */\nconst shift = function (options) {\n if (options === void 0) {\n options = {};\n }\n return {\n name: 'shift',\n options,\n async fn(state) {\n const {\n x,\n y,\n placement\n } = state;\n const {\n mainAxis: checkMainAxis = true,\n crossAxis: checkCrossAxis = false,\n limiter = {\n fn: _ref => {\n let {\n x,\n y\n } = _ref;\n return {\n x,\n y\n };\n }\n },\n ...detectOverflowOptions\n } = evaluate(options, state);\n const coords = {\n x,\n y\n };\n const overflow = await detectOverflow(state, detectOverflowOptions);\n const crossAxis = getSideAxis(getSide(placement));\n const mainAxis = getOppositeAxis(crossAxis);\n let mainAxisCoord = coords[mainAxis];\n let crossAxisCoord = coords[crossAxis];\n if (checkMainAxis) {\n const minSide = mainAxis === 'y' ? 'top' : 'left';\n const maxSide = mainAxis === 'y' ? 'bottom' : 'right';\n const min = mainAxisCoord + overflow[minSide];\n const max = mainAxisCoord - overflow[maxSide];\n mainAxisCoord = clamp(min, mainAxisCoord, max);\n }\n if (checkCrossAxis) {\n const minSide = crossAxis === 'y' ? 'top' : 'left';\n const maxSide = crossAxis === 'y' ? 'bottom' : 'right';\n const min = crossAxisCoord + overflow[minSide];\n const max = crossAxisCoord - overflow[maxSide];\n crossAxisCoord = clamp(min, crossAxisCoord, max);\n }\n const limitedCoords = limiter.fn({\n ...state,\n [mainAxis]: mainAxisCoord,\n [crossAxis]: crossAxisCoord\n });\n return {\n ...limitedCoords,\n data: {\n x: limitedCoords.x - x,\n y: limitedCoords.y - y,\n enabled: {\n [mainAxis]: checkMainAxis,\n [crossAxis]: checkCrossAxis\n }\n }\n };\n }\n };\n};\n/**\n * Built-in `limiter` that will stop `shift()` at a certain point.\n */\nconst limitShift = function (options) {\n if (options === void 0) {\n options = {};\n }\n return {\n options,\n fn(state) {\n const {\n x,\n y,\n placement,\n rects,\n middlewareData\n } = state;\n const {\n offset = 0,\n mainAxis: checkMainAxis = true,\n crossAxis: checkCrossAxis = true\n } = evaluate(options, state);\n const coords = {\n x,\n y\n };\n const crossAxis = getSideAxis(placement);\n const mainAxis = getOppositeAxis(crossAxis);\n let mainAxisCoord = coords[mainAxis];\n let crossAxisCoord = coords[crossAxis];\n const rawOffset = evaluate(offset, state);\n const computedOffset = typeof rawOffset === 'number' ? {\n mainAxis: rawOffset,\n crossAxis: 0\n } : {\n mainAxis: 0,\n crossAxis: 0,\n ...rawOffset\n };\n if (checkMainAxis) {\n const len = mainAxis === 'y' ? 'height' : 'width';\n const limitMin = rects.reference[mainAxis] - rects.floating[len] + computedOffset.mainAxis;\n const limitMax = rects.reference[mainAxis] + rects.reference[len] - computedOffset.mainAxis;\n if (mainAxisCoord < limitMin) {\n mainAxisCoord = limitMin;\n } else if (mainAxisCoord > limitMax) {\n mainAxisCoord = limitMax;\n }\n }\n if (checkCrossAxis) {\n var _middlewareData$offse, _middlewareData$offse2;\n const len = mainAxis === 'y' ? 'width' : 'height';\n const isOriginSide = originSides.has(getSide(placement));\n const limitMin = rects.reference[crossAxis] - rects.floating[len] + (isOriginSide ? ((_middlewareData$offse = middlewareData.offset) == null ? void 0 : _middlewareData$offse[crossAxis]) || 0 : 0) + (isOriginSide ? 0 : computedOffset.crossAxis);\n const limitMax = rects.reference[crossAxis] + rects.reference[len] + (isOriginSide ? 0 : ((_middlewareData$offse2 = middlewareData.offset) == null ? void 0 : _middlewareData$offse2[crossAxis]) || 0) - (isOriginSide ? computedOffset.crossAxis : 0);\n if (crossAxisCoord < limitMin) {\n crossAxisCoord = limitMin;\n } else if (crossAxisCoord > limitMax) {\n crossAxisCoord = limitMax;\n }\n }\n return {\n [mainAxis]: mainAxisCoord,\n [crossAxis]: crossAxisCoord\n };\n }\n };\n};\n\n/**\n * Provides data that allows you to change the size of the floating element —\n * for instance, prevent it from overflowing the clipping boundary or match the\n * width of the reference element.\n * @see https://floating-ui.com/docs/size\n */\nconst size = function (options) {\n if (options === void 0) {\n options = {};\n }\n return {\n name: 'size',\n options,\n async fn(state) {\n var _state$middlewareData, _state$middlewareData2;\n const {\n placement,\n rects,\n platform,\n elements\n } = state;\n const {\n apply = () => {},\n ...detectOverflowOptions\n } = evaluate(options, state);\n const overflow = await detectOverflow(state, detectOverflowOptions);\n const side = getSide(placement);\n const alignment = getAlignment(placement);\n const isYAxis = getSideAxis(placement) === 'y';\n const {\n width,\n height\n } = rects.floating;\n let heightSide;\n let widthSide;\n if (side === 'top' || side === 'bottom') {\n heightSide = side;\n widthSide = alignment === ((await (platform.isRTL == null ? void 0 : platform.isRTL(elements.floating))) ? 'start' : 'end') ? 'left' : 'right';\n } else {\n widthSide = side;\n heightSide = alignment === 'end' ? 'top' : 'bottom';\n }\n const maximumClippingHeight = height - overflow.top - overflow.bottom;\n const maximumClippingWidth = width - overflow.left - overflow.right;\n const overflowAvailableHeight = min(height - overflow[heightSide], maximumClippingHeight);\n const overflowAvailableWidth = min(width - overflow[widthSide], maximumClippingWidth);\n const noShift = !state.middlewareData.shift;\n let availableHeight = overflowAvailableHeight;\n let availableWidth = overflowAvailableWidth;\n if ((_state$middlewareData = state.middlewareData.shift) != null && _state$middlewareData.enabled.x) {\n availableWidth = maximumClippingWidth;\n }\n if ((_state$middlewareData2 = state.middlewareData.shift) != null && _state$middlewareData2.enabled.y) {\n availableHeight = maximumClippingHeight;\n }\n if (noShift && !alignment) {\n const xMin = max(overflow.left, 0);\n const xMax = max(overflow.right, 0);\n const yMin = max(overflow.top, 0);\n const yMax = max(overflow.bottom, 0);\n if (isYAxis) {\n availableWidth = width - 2 * (xMin !== 0 || xMax !== 0 ? xMin + xMax : max(overflow.left, overflow.right));\n } else {\n availableHeight = height - 2 * (yMin !== 0 || yMax !== 0 ? yMin + yMax : max(overflow.top, overflow.bottom));\n }\n }\n await apply({\n ...state,\n availableWidth,\n availableHeight\n });\n const nextDimensions = await platform.getDimensions(elements.floating);\n if (width !== nextDimensions.width || height !== nextDimensions.height) {\n return {\n reset: {\n rects: true\n }\n };\n }\n return {};\n }\n };\n};\n\nexport { arrow, autoPlacement, computePosition, detectOverflow, flip, hide, inline, limitShift, offset, shift, size };\n","function hasWindow() {\n return typeof window !== 'undefined';\n}\nfunction getNodeName(node) {\n if (isNode(node)) {\n return (node.nodeName || '').toLowerCase();\n }\n // Mocked nodes in testing environments may not be instances of Node. By\n // returning `#document` an infinite loop won't occur.\n // https://github.com/floating-ui/floating-ui/issues/2317\n return '#document';\n}\nfunction getWindow(node) {\n var _node$ownerDocument;\n return (node == null || (_node$ownerDocument = node.ownerDocument) == null ? void 0 : _node$ownerDocument.defaultView) || window;\n}\nfunction getDocumentElement(node) {\n var _ref;\n return (_ref = (isNode(node) ? node.ownerDocument : node.document) || window.document) == null ? void 0 : _ref.documentElement;\n}\nfunction isNode(value) {\n if (!hasWindow()) {\n return false;\n }\n return value instanceof Node || value instanceof getWindow(value).Node;\n}\nfunction isElement(value) {\n if (!hasWindow()) {\n return false;\n }\n return value instanceof Element || value instanceof getWindow(value).Element;\n}\nfunction isHTMLElement(value) {\n if (!hasWindow()) {\n return false;\n }\n return value instanceof HTMLElement || value instanceof getWindow(value).HTMLElement;\n}\nfunction isShadowRoot(value) {\n if (!hasWindow() || typeof ShadowRoot === 'undefined') {\n return false;\n }\n return value instanceof ShadowRoot || value instanceof getWindow(value).ShadowRoot;\n}\nconst invalidOverflowDisplayValues = /*#__PURE__*/new Set(['inline', 'contents']);\nfunction isOverflowElement(element) {\n const {\n overflow,\n overflowX,\n overflowY,\n display\n } = getComputedStyle(element);\n return /auto|scroll|overlay|hidden|clip/.test(overflow + overflowY + overflowX) && !invalidOverflowDisplayValues.has(display);\n}\nconst tableElements = /*#__PURE__*/new Set(['table', 'td', 'th']);\nfunction isTableElement(element) {\n return tableElements.has(getNodeName(element));\n}\nconst topLayerSelectors = [':popover-open', ':modal'];\nfunction isTopLayer(element) {\n return topLayerSelectors.some(selector => {\n try {\n return element.matches(selector);\n } catch (_e) {\n return false;\n }\n });\n}\nconst transformProperties = ['transform', 'translate', 'scale', 'rotate', 'perspective'];\nconst willChangeValues = ['transform', 'translate', 'scale', 'rotate', 'perspective', 'filter'];\nconst containValues = ['paint', 'layout', 'strict', 'content'];\nfunction isContainingBlock(elementOrCss) {\n const webkit = isWebKit();\n const css = isElement(elementOrCss) ? getComputedStyle(elementOrCss) : elementOrCss;\n\n // https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block#identifying_the_containing_block\n // https://drafts.csswg.org/css-transforms-2/#individual-transforms\n return transformProperties.some(value => css[value] ? css[value] !== 'none' : false) || (css.containerType ? css.containerType !== 'normal' : false) || !webkit && (css.backdropFilter ? css.backdropFilter !== 'none' : false) || !webkit && (css.filter ? css.filter !== 'none' : false) || willChangeValues.some(value => (css.willChange || '').includes(value)) || containValues.some(value => (css.contain || '').includes(value));\n}\nfunction getContainingBlock(element) {\n let currentNode = getParentNode(element);\n while (isHTMLElement(currentNode) && !isLastTraversableNode(currentNode)) {\n if (isContainingBlock(currentNode)) {\n return currentNode;\n } else if (isTopLayer(currentNode)) {\n return null;\n }\n currentNode = getParentNode(currentNode);\n }\n return null;\n}\nfunction isWebKit() {\n if (typeof CSS === 'undefined' || !CSS.supports) return false;\n return CSS.supports('-webkit-backdrop-filter', 'none');\n}\nconst lastTraversableNodeNames = /*#__PURE__*/new Set(['html', 'body', '#document']);\nfunction isLastTraversableNode(node) {\n return lastTraversableNodeNames.has(getNodeName(node));\n}\nfunction getComputedStyle(element) {\n return getWindow(element).getComputedStyle(element);\n}\nfunction getNodeScroll(element) {\n if (isElement(element)) {\n return {\n scrollLeft: element.scrollLeft,\n scrollTop: element.scrollTop\n };\n }\n return {\n scrollLeft: element.scrollX,\n scrollTop: element.scrollY\n };\n}\nfunction getParentNode(node) {\n if (getNodeName(node) === 'html') {\n return node;\n }\n const result =\n // Step into the shadow DOM of the parent of a slotted node.\n node.assignedSlot ||\n // DOM Element detected.\n node.parentNode ||\n // ShadowRoot detected.\n isShadowRoot(node) && node.host ||\n // Fallback.\n getDocumentElement(node);\n return isShadowRoot(result) ? result.host : result;\n}\nfunction getNearestOverflowAncestor(node) {\n const parentNode = getParentNode(node);\n if (isLastTraversableNode(parentNode)) {\n return node.ownerDocument ? node.ownerDocument.body : node.body;\n }\n if (isHTMLElement(parentNode) && isOverflowElement(parentNode)) {\n return parentNode;\n }\n return getNearestOverflowAncestor(parentNode);\n}\nfunction getOverflowAncestors(node, list, traverseIframes) {\n var _node$ownerDocument2;\n if (list === void 0) {\n list = [];\n }\n if (traverseIframes === void 0) {\n traverseIframes = true;\n }\n const scrollableAncestor = getNearestOverflowAncestor(node);\n const isBody = scrollableAncestor === ((_node$ownerDocument2 = node.ownerDocument) == null ? void 0 : _node$ownerDocument2.body);\n const win = getWindow(scrollableAncestor);\n if (isBody) {\n const frameElement = getFrameElement(win);\n return list.concat(win, win.visualViewport || [], isOverflowElement(scrollableAncestor) ? scrollableAncestor : [], frameElement && traverseIframes ? getOverflowAncestors(frameElement) : []);\n }\n return list.concat(scrollableAncestor, getOverflowAncestors(scrollableAncestor, [], traverseIframes));\n}\nfunction getFrameElement(win) {\n return win.parent && Object.getPrototypeOf(win.parent) ? win.frameElement : null;\n}\n\nexport { getComputedStyle, getContainingBlock, getDocumentElement, getFrameElement, getNearestOverflowAncestor, getNodeName, getNodeScroll, getOverflowAncestors, getParentNode, getWindow, isContainingBlock, isElement, isHTMLElement, isLastTraversableNode, isNode, isOverflowElement, isShadowRoot, isTableElement, isTopLayer, isWebKit };\n","import { rectToClientRect, arrow as arrow$1, autoPlacement as autoPlacement$1, detectOverflow as detectOverflow$1, flip as flip$1, hide as hide$1, inline as inline$1, limitShift as limitShift$1, offset as offset$1, shift as shift$1, size as size$1, computePosition as computePosition$1 } from '@floating-ui/core';\nimport { round, createCoords, max, min, floor } from '@floating-ui/utils';\nimport { getComputedStyle as getComputedStyle$1, isHTMLElement, isElement, getWindow, isWebKit, getFrameElement, getNodeScroll, getDocumentElement, isTopLayer, getNodeName, isOverflowElement, getOverflowAncestors, getParentNode, isLastTraversableNode, isContainingBlock, isTableElement, getContainingBlock } from '@floating-ui/utils/dom';\nexport { getOverflowAncestors } from '@floating-ui/utils/dom';\n\nfunction getCssDimensions(element) {\n const css = getComputedStyle$1(element);\n // In testing environments, the `width` and `height` properties are empty\n // strings for SVG elements, returning NaN. Fallback to `0` in this case.\n let width = parseFloat(css.width) || 0;\n let height = parseFloat(css.height) || 0;\n const hasOffset = isHTMLElement(element);\n const offsetWidth = hasOffset ? element.offsetWidth : width;\n const offsetHeight = hasOffset ? element.offsetHeight : height;\n const shouldFallback = round(width) !== offsetWidth || round(height) !== offsetHeight;\n if (shouldFallback) {\n width = offsetWidth;\n height = offsetHeight;\n }\n return {\n width,\n height,\n $: shouldFallback\n };\n}\n\nfunction unwrapElement(element) {\n return !isElement(element) ? element.contextElement : element;\n}\n\nfunction getScale(element) {\n const domElement = unwrapElement(element);\n if (!isHTMLElement(domElement)) {\n return createCoords(1);\n }\n const rect = domElement.getBoundingClientRect();\n const {\n width,\n height,\n $\n } = getCssDimensions(domElement);\n let x = ($ ? round(rect.width) : rect.width) / width;\n let y = ($ ? round(rect.height) : rect.height) / height;\n\n // 0, NaN, or Infinity should always fallback to 1.\n\n if (!x || !Number.isFinite(x)) {\n x = 1;\n }\n if (!y || !Number.isFinite(y)) {\n y = 1;\n }\n return {\n x,\n y\n };\n}\n\nconst noOffsets = /*#__PURE__*/createCoords(0);\nfunction getVisualOffsets(element) {\n const win = getWindow(element);\n if (!isWebKit() || !win.visualViewport) {\n return noOffsets;\n }\n return {\n x: win.visualViewport.offsetLeft,\n y: win.visualViewport.offsetTop\n };\n}\nfunction shouldAddVisualOffsets(element, isFixed, floatingOffsetParent) {\n if (isFixed === void 0) {\n isFixed = false;\n }\n if (!floatingOffsetParent || isFixed && floatingOffsetParent !== getWindow(element)) {\n return false;\n }\n return isFixed;\n}\n\nfunction getBoundingClientRect(element, includeScale, isFixedStrategy, offsetParent) {\n if (includeScale === void 0) {\n includeScale = false;\n }\n if (isFixedStrategy === void 0) {\n isFixedStrategy = false;\n }\n const clientRect = element.getBoundingClientRect();\n const domElement = unwrapElement(element);\n let scale = createCoords(1);\n if (includeScale) {\n if (offsetParent) {\n if (isElement(offsetParent)) {\n scale = getScale(offsetParent);\n }\n } else {\n scale = getScale(element);\n }\n }\n const visualOffsets = shouldAddVisualOffsets(domElement, isFixedStrategy, offsetParent) ? getVisualOffsets(domElement) : createCoords(0);\n let x = (clientRect.left + visualOffsets.x) / scale.x;\n let y = (clientRect.top + visualOffsets.y) / scale.y;\n let width = clientRect.width / scale.x;\n let height = clientRect.height / scale.y;\n if (domElement) {\n const win = getWindow(domElement);\n const offsetWin = offsetParent && isElement(offsetParent) ? getWindow(offsetParent) : offsetParent;\n let currentWin = win;\n let currentIFrame = getFrameElement(currentWin);\n while (currentIFrame && offsetParent && offsetWin !== currentWin) {\n const iframeScale = getScale(currentIFrame);\n const iframeRect = currentIFrame.getBoundingClientRect();\n const css = getComputedStyle$1(currentIFrame);\n const left = iframeRect.left + (currentIFrame.clientLeft + parseFloat(css.paddingLeft)) * iframeScale.x;\n const top = iframeRect.top + (currentIFrame.clientTop + parseFloat(css.paddingTop)) * iframeScale.y;\n x *= iframeScale.x;\n y *= iframeScale.y;\n width *= iframeScale.x;\n height *= iframeScale.y;\n x += left;\n y += top;\n currentWin = getWindow(currentIFrame);\n currentIFrame = getFrameElement(currentWin);\n }\n }\n return rectToClientRect({\n width,\n height,\n x,\n y\n });\n}\n\n// If <html> has a CSS width greater than the viewport, then this will be\n// incorrect for RTL.\nfunction getWindowScrollBarX(element, rect) {\n const leftScroll = getNodeScroll(element).scrollLeft;\n if (!rect) {\n return getBoundingClientRect(getDocumentElement(element)).left + leftScroll;\n }\n return rect.left + leftScroll;\n}\n\nfunction getHTMLOffset(documentElement, scroll) {\n const htmlRect = documentElement.getBoundingClientRect();\n const x = htmlRect.left + scroll.scrollLeft - getWindowScrollBarX(documentElement, htmlRect);\n const y = htmlRect.top + scroll.scrollTop;\n return {\n x,\n y\n };\n}\n\nfunction convertOffsetParentRelativeRectToViewportRelativeRect(_ref) {\n let {\n elements,\n rect,\n offsetParent,\n strategy\n } = _ref;\n const isFixed = strategy === 'fixed';\n const documentElement = getDocumentElement(offsetParent);\n const topLayer = elements ? isTopLayer(elements.floating) : false;\n if (offsetParent === documentElement || topLayer && isFixed) {\n return rect;\n }\n let scroll = {\n scrollLeft: 0,\n scrollTop: 0\n };\n let scale = createCoords(1);\n const offsets = createCoords(0);\n const isOffsetParentAnElement = isHTMLElement(offsetParent);\n if (isOffsetParentAnElement || !isOffsetParentAnElement && !isFixed) {\n if (getNodeName(offsetParent) !== 'body' || isOverflowElement(documentElement)) {\n scroll = getNodeScroll(offsetParent);\n }\n if (isHTMLElement(offsetParent)) {\n const offsetRect = getBoundingClientRect(offsetParent);\n scale = getScale(offsetParent);\n offsets.x = offsetRect.x + offsetParent.clientLeft;\n offsets.y = offsetRect.y + offsetParent.clientTop;\n }\n }\n const htmlOffset = documentElement && !isOffsetParentAnElement && !isFixed ? getHTMLOffset(documentElement, scroll) : createCoords(0);\n return {\n width: rect.width * scale.x,\n height: rect.height * scale.y,\n x: rect.x * scale.x - scroll.scrollLeft * scale.x + offsets.x + htmlOffset.x,\n y: rect.y * scale.y - scroll.scrollTop * scale.y + offsets.y + htmlOffset.y\n };\n}\n\nfunction getClientRects(element) {\n return Array.from(element.getClientRects());\n}\n\n// Gets the entire size of the scrollable document area, even extending outside\n// of the `<html>` and `<body>` rect bounds if horizontally scrollable.\nfunction getDocumentRect(element) {\n const html = getDocumentElement(element);\n const scroll = getNodeScroll(element);\n const body = element.ownerDocument.body;\n const width = max(html.scrollWidth, html.clientWidth, body.scrollWidth, body.clientWidth);\n const height = max(html.scrollHeight, html.clientHeight, body.scrollHeight, body.clientHeight);\n let x = -scroll.scrollLeft + getWindowScrollBarX(element);\n const y = -scroll.scrollTop;\n if (getComputedStyle$1(body).direction === 'rtl') {\n x += max(html.clientWidth, body.clientWidth) - width;\n }\n return {\n width,\n height,\n x,\n y\n };\n}\n\n// Safety check: ensure the scrollbar space is reasonable in case this\n// calculation is affected by unusual styles.\n// Most scrollbars leave 15-18px of space.\nconst SCROLLBAR_MAX = 25;\nfunction getViewportRect(element, strategy) {\n const win = getWindow(element);\n const html = getDocumentElement(element);\n const visualViewport = win.visualViewport;\n let width = html.clientWidth;\n let height = html.clientHeight;\n let x = 0;\n let y = 0;\n if (visualViewport) {\n width = visualViewport.width;\n height = visualViewport.height;\n const visualViewportBased = isWebKit();\n if (!visualViewportBased || visualViewportBased && strategy === 'fixed') {\n x = visualViewport.offsetLeft;\n y = visualViewport.offsetTop;\n }\n }\n const windowScrollbarX = getWindowScrollBarX(html);\n // <html> `overflow: hidden` + `scrollbar-gutter: stable` reduces the\n // visual width of the <html> but this is not considered in the size\n // of `html.clientWidth`.\n if (windowScrollbarX <= 0) {\n const doc = html.ownerDocument;\n const body = doc.body;\n const bodyStyles = getComputedStyle(body);\n const bodyMarginInline = doc.compatMode === 'CSS1Compat' ? parseFloat(bodyStyles.marginLeft) + parseFloat(bodyStyles.marginRight) || 0 : 0;\n const clippingStableScrollbarWidth = Math.abs(html.clientWidth - body.clientWidth - bodyMarginInline);\n if (clippingStableScrollbarWidth <= SCROLLBAR_MAX) {\n width -= clippingStableScrollbarWidth;\n }\n } else if (windowScrollbarX <= SCROLLBAR_MAX) {\n // If the <body> scrollbar is on the left, the width needs to be extended\n // by the scrollbar amount so there isn't extra space on the right.\n width += windowScrollbarX;\n }\n return {\n width,\n height,\n x,\n y\n };\n}\n\nconst absoluteOrFixed = /*#__PURE__*/new Set(['absolute', 'fixed']);\n// Returns the inner client rect, subtracting scrollbars if present.\nfunction getInnerBoundingClientRect(element, strategy) {\n const clientRect = getBoundingClientRect(element, true, strategy === 'fixed');\n const top = clientRect.top + element.clientTop;\n const left = clientRect.left + element.clientLeft;\n const scale = isHTMLElement(element) ? getScale(element) : createCoords(1);\n const width = element.clientWidth * scale.x;\n const height = element.clientHeight * scale.y;\n const x = left * scale.x;\n const y = top * scale.y;\n return {\n width,\n height,\n x,\n y\n };\n}\nfunction getClientRectFromClippingAncestor(element, clippingAncestor, strategy) {\n let rect;\n if (clippingAncestor === 'viewport') {\n rect = getViewportRect(element, strategy);\n } else if (clippingAncestor === 'document') {\n rect = getDocumentRect(getDocumentElement(element));\n } else if (isElement(clippingAncestor)) {\n rect = getInnerBoundingClientRect(clippingAncestor, strategy);\n } else {\n const visualOffsets = getVisualOffsets(element);\n rect = {\n x: clippingAncestor.x - visualOffsets.x,\n y: clippingAncestor.y - visualOffsets.y,\n width: clippingAncestor.width,\n height: clippingAncestor.height\n };\n }\n return rectToClientRect(rect);\n}\nfunction hasFixedPositionAncestor(element, stopNode) {\n const parentNode = getParentNode(element);\n if (parentNode === stopNode || !isElement(parentNode) || isLastTraversableNode(parentNode)) {\n return false;\n }\n return getComputedStyle$1(parentNode).position === 'fixed' || hasFixedPositionAncestor(parentNode, stopNode);\n}\n\n// A \"clipping ancestor\" is an `overflow` element with the characteristic of\n// clipping (or hiding) child elements. This returns all clipping ancestors\n// of the given element up the tree.\nfunction getClippingElementAncestors(element, cache) {\n const cachedResult = cache.get(element);\n if (cachedResult) {\n return cachedResult;\n }\n let result = getOverflowAncestors(element, [], false).filter(el => isElement(el) && getNodeName(el) !== 'body');\n let currentContainingBlockComputedStyle = null;\n const elementIsFixed = getComputedStyle$1(element).position === 'fixed';\n let currentNode = elementIsFixed ? getParentNode(element) : element;\n\n // https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block#identifying_the_containing_block\n while (isElement(currentNode) && !isLastTraversableNode(currentNode)) {\n const computedStyle = getComputedStyle$1(currentNode);\n const currentNodeIsContaining = isContainingBlock(currentNode);\n if (!currentNodeIsContaining && computedStyle.position === 'fixed') {\n currentContainingBlockComputedStyle = null;\n }\n const shouldDropCurrentNode = elementIsFixed ? !currentNodeIsContaining && !currentContainingBlockComputedStyle : !currentNodeIsContaining && computedStyle.position === 'static' && !!currentContainingBlockComputedStyle && absoluteOrFixed.has(currentContainingBlockComputedStyle.position) || isOverflowElement(currentNode) && !currentNodeIsContaining && hasFixedPositionAncestor(element, currentNode);\n if (shouldDropCurrentNode) {\n // Drop non-containing blocks.\n result = result.filter(ancestor => ancestor !== currentNode);\n } else {\n // Record last containing block for next iteration.\n currentContainingBlockComputedStyle = computedStyle;\n }\n currentNode = getParentNode(currentNode);\n }\n cache.set(element, result);\n return result;\n}\n\n// Gets the maximum area that the element is visible in due to any number of\n// clipping ancestors.\nfunction getClippingRect(_ref) {\n let {\n element,\n boundary,\n rootBoundary,\n strategy\n } = _ref;\n const elementClippingAncestors = boundary === 'clippingAncestors' ? isTopLayer(element) ? [] : getClippingElementAncestors(element, this._c) : [].concat(boundary);\n const clippingAncestors = [...elementClippingAncestors, rootBoundary];\n const firstClippingAncestor = clippingAncestors[0];\n const clippingRect = clippingAncestors.reduce((accRect, clippingAncestor) => {\n const rect = getClientRectFromClippingAncestor(element, clippingAncestor, strategy);\n accRect.top = max(rect.top, accRect.top);\n accRect.right = min(rect.right, accRect.right);\n accRect.bottom = min(rect.bottom, accRect.bottom);\n accRect.left = max(rect.left, accRect.left);\n return accRect;\n }, getClientRectFromClippingAncestor(element, firstClippingAncestor, strategy));\n return {\n width: clippingRect.right - clippingRect.left,\n height: clippingRect.bottom - clippingRect.top,\n x: clippingRect.left,\n y: clippingRect.top\n };\n}\n\nfunction getDimensions(element) {\n const {\n width,\n height\n } = getCssDimensions(element);\n return {\n width,\n height\n };\n}\n\nfunction getRectRelativeToOffsetParent(element, offsetParent, strategy) {\n const isOffsetParentAnElement = isHTMLElement(offsetParent);\n const documentElement = getDocumentElement(offsetParent);\n const isFixed = strategy === 'fixed';\n const rect = getBoundingClientRect(element, true, isFixed, offsetParent);\n let scroll = {\n scrollLeft: 0,\n scrollTop: 0\n };\n const offsets = createCoords(0);\n\n // If the <body> scrollbar appears on the left (e.g. RTL systems). Use\n // Firefox with layout.scrollbar.side = 3 in about:config to test this.\n function setLeftRTLScrollbarOffset() {\n offsets.x = getWindowScrollBarX(documentElement);\n }\n if (isOffsetParentAnElement || !isOffsetParentAnElement && !isFixed) {\n if (getNodeName(offsetParent) !== 'body' || isOverflowElement(documentElement)) {\n scroll = getNodeScroll(offsetParent);\n }\n if (isOffsetParentAnElement) {\n const offsetRect = getBoundingClientRect(offsetParent, true, isFixed, offsetParent);\n offsets.x = offsetRect.x + offsetParent.clientLeft;\n offsets.y = offsetRect.y + offsetParent.clientTop;\n } else if (documentElement) {\n setLeftRTLScrollbarOffset();\n }\n }\n if (isFixed && !isOffsetParentAnElement && documentElement) {\n setLeftRTLScrollbarOffset();\n }\n const htmlOffset = documentElement && !isOffsetParentAnElement && !isFixed ? getHTMLOffset(documentElement, scroll) : createCoords(0);\n const x = rect.left + scroll.scrollLeft - offsets.x - htmlOffset.x;\n const y = rect.top + scroll.scrollTop - offsets.y - htmlOffset.y;\n return {\n x,\n y,\n width: rect.width,\n height: rect.height\n };\n}\n\nfunction isStaticPositioned(element) {\n return getComputedStyle$1(element).position === 'static';\n}\n\nfunction getTrueOffsetParent(element, polyfill) {\n if (!isHTMLElement(element) || getComputedStyle$1(element).position === 'fixed') {\n return null;\n }\n if (polyfill) {\n return polyfill(element);\n }\n let rawOffsetParent = element.offsetParent;\n\n // Firefox returns the <html> element as the offsetParent if it's non-static,\n // while Chrome and Safari return the <body> element. The <body> element must\n // be used to perform the correct calculations even if the <html> element is\n // non-static.\n if (getDocumentElement(element) === rawOffsetParent) {\n rawOffsetParent = rawOffsetParent.ownerDocument.body;\n }\n return rawOffsetParent;\n}\n\n// Gets the closest ancestor positioned element. Handles some edge cases,\n// such as table ancestors and cross browser bugs.\nfunction getOffsetParent(element, polyfill) {\n const win = getWindow(element);\n if (isTopLayer(element)) {\n return win;\n }\n if (!isHTMLElement(element)) {\n let svgOffsetParent = getParentNode(element);\n while (svgOffsetParent && !isLastTraversableNode(svgOffsetParent)) {\n if (isElement(svgOffsetParent) && !isStaticPositioned(svgOffsetParent)) {\n return svgOffsetParent;\n }\n svgOffsetParent = getParentNode(svgOffsetParent);\n }\n return win;\n }\n let offsetParent = getTrueOffsetParent(element, polyfill);\n while (offsetParent && isTableElement(offsetParent) && isStaticPositioned(offsetParent)) {\n offsetParent = getTrueOffsetParent(offsetParent, polyfill);\n }\n if (offsetParent && isLastTraversableNode(offsetParent) && isStaticPositioned(offsetParent) && !isContainingBlock(offsetParent)) {\n return win;\n }\n return offsetParent || getContainingBlock(element) || win;\n}\n\nconst getElementRects = async function (data) {\n const getOffsetParentFn = this.getOffsetParent || getOffsetParent;\n const getDimensionsFn = this.getDimensions;\n const floatingDimensions = await getDimensionsFn(data.floating);\n return {\n reference: getRectRelativeToOffsetParent(data.reference, await getOffsetParentFn(data.floating), data.strategy),\n floating: {\n x: 0,\n y: 0,\n width: floatingDimensions.width,\n height: floatingDimensions.height\n }\n };\n};\n\nfunction isRTL(element) {\n return getComputedStyle$1(element).direction === 'rtl';\n}\n\nconst platform = {\n convertOffsetParentRelativeRectToViewportRelativeRect,\n getDocumentElement,\n getClippingRect,\n getOffsetParent,\n getElementRects,\n getClientRects,\n getDimensions,\n getScale,\n isElement,\n isRTL\n};\n\nfunction rectsAreEqual(a, b) {\n return a.x === b.x && a.y === b.y && a.width === b.width && a.height === b.height;\n}\n\n// https://samthor.au/2021/observing-dom/\nfunction observeMove(element, onMove) {\n let io = null;\n let timeoutId;\n const root = getDocumentElement(element);\n function cleanup() {\n var _io;\n clearTimeout(timeoutId);\n (_io = io) == null || _io.disconnect();\n io = null;\n }\n function refresh(skip, threshold) {\n if (skip === void 0) {\n skip = false;\n }\n if (threshold === void 0) {\n threshold = 1;\n }\n cleanup();\n const elementRectForRootMargin = element.getBoundingClientRect();\n const {\n left,\n top,\n width,\n height\n } = elementRectForRootMargin;\n if (!skip) {\n onMove();\n }\n if (!width || !height) {\n return;\n }\n const insetTop = floor(top);\n const insetRight = floor(root.clientWidth - (left + width));\n const insetBottom = floor(root.clientHeight - (top + height));\n const insetLeft = floor(left);\n const rootMargin = -insetTop + \"px \" + -insetRight + \"px \" + -insetBottom + \"px \" + -insetLeft + \"px\";\n const options = {\n rootMargin,\n threshold: max(0, min(1, threshold)) || 1\n };\n let isFirstUpdate = true;\n function handleObserve(entries) {\n const ratio = entries[0].intersectionRatio;\n if (ratio !== threshold) {\n if (!isFirstUpdate) {\n return refresh();\n }\n if (!ratio) {\n // If the reference is clipped, the ratio is 0. Throttle the refresh\n // to prevent an infinite loop of updates.\n timeoutId = setTimeout(() => {\n refresh(false, 1e-7);\n }, 1000);\n } else {\n refresh(false, ratio);\n }\n }\n if (ratio === 1 && !rectsAreEqual(elementRectForRootMargin, element.getBoundingClientRect())) {\n // It's possible that even though the ratio is reported as 1, the\n // element is not actually fully within the IntersectionObserver's root\n // area anymore. This can happen under performance constraints. This may\n // be a bug in the browser's IntersectionObserver implementation. To\n // work around this, we compare the element's bounding rect now with\n // what it was at the time we created the IntersectionObserver. If they\n // are not equal then the element moved, so we refresh.\n refresh();\n }\n isFirstUpdate = false;\n }\n\n // Older browsers don't support a `document` as the root and will throw an\n // error.\n try {\n io = new IntersectionObserver(handleObserve, {\n ...options,\n // Handle <iframe>s\n root: root.ownerDocument\n });\n } catch (_e) {\n io = new IntersectionObserver(handleObserve, options);\n }\n io.observe(element);\n }\n refresh(true);\n return cleanup;\n}\n\n/**\n * Automatically updates the position of the floating element when necessary.\n * Should only be called when the floating element is mounted on the DOM or\n * visible on the screen.\n * @returns cleanup function that should be invoked when the floating element is\n * removed from the DOM or hidden from the screen.\n * @see https://floating-ui.com/docs/autoUpdate\n */\nfunction autoUpdate(reference, floating, update, options) {\n if (options === void 0) {\n options = {};\n }\n const {\n ancestorScroll = true,\n ancestorResize = true,\n elementResize = typeof ResizeObserver === 'function',\n layoutShift = typeof IntersectionObserver === 'function',\n animationFrame = false\n } = options;\n const referenceEl = unwrapElement(reference);\n const ancestors = ancestorScroll || ancestorResize ? [...(referenceEl ? getOverflowAncestors(referenceEl) : []), ...getOverflowAncestors(floating)] : [];\n ancestors.forEach(ancestor => {\n ancestorScroll && ancestor.addEventListener('scroll', update, {\n passive: true\n });\n ancestorResize && ancestor.addEventListener('resize', update);\n });\n const cleanupIo = referenceEl && layoutShift ? observeMove(referenceEl, update) : null;\n let reobserveFrame = -1;\n let resizeObserver = null;\n if (elementResize) {\n resizeObserver = new ResizeObserver(_ref => {\n let [firstEntry] = _ref;\n if (firstEntry && firstEntry.target === referenceEl && resizeObserver) {\n // Prevent update loops when using the `size` middleware.\n // https://github.com/floating-ui/floating-ui/issues/1740\n resizeObserver.unobserve(floating);\n cancelAnimationFrame(reobserveFrame);\n reobserveFrame = requestAnimationFrame(() => {\n var _resizeObserver;\n (_resizeObserver = resizeObserver) == null || _resizeObserver.observe(floating);\n });\n }\n update();\n });\n if (referenceEl && !animationFrame) {\n resizeObserver.observe(referenceEl);\n }\n resizeObserver.observe(floating);\n }\n let frameId;\n let prevRefRect = animationFrame ? getBoundingClientRect(reference) : null;\n if (animationFrame) {\n frameLoop();\n }\n function frameLoop() {\n const nextRefRect = getBoundingClientRect(reference);\n if (prevRefRect && !rectsAreEqual(prevRefRect, nextRefRect)) {\n update();\n }\n prevRefRect = nextRefRect;\n frameId = requestAnimationFrame(frameLoop);\n }\n update();\n return () => {\n var _resizeObserver2;\n ancestors.forEach(ancestor => {\n ancestorScroll && ancestor.removeEventListener('scroll', update);\n ancestorResize && ancestor.removeEventListener('resize', update);\n });\n cleanupIo == null || cleanupIo();\n (_resizeObserver2 = resizeObserver) == null || _resizeObserver2.disconnect();\n resizeObserver = null;\n if (animationFrame) {\n cancelAnimationFrame(frameId);\n }\n };\n}\n\n/**\n * Resolves with an object of overflow side offsets that determine how much the\n * element is overflowing a given clipping boundary on each side.\n * - positive = overflowing the boundary by that number of pixels\n * - negative = how many pixels left before it will overflow\n * - 0 = lies flush with the boundary\n * @see https://floating-ui.com/docs/detectOverflow\n */\nconst detectOverflow = detectOverflow$1;\n\n/**\n * Modifies the placement by translating the floating element along the\n * specified axes.\n * A number (shorthand for `mainAxis` or distance), or an axes configuration\n * object may be passed.\n * @see https://floating-ui.com/docs/offset\n */\nconst offset = offset$1;\n\n/**\n * Optimizes the visibility of the floating element by choosing the placement\n * that has the most space available automatically, without needing to specify a\n * preferred placement. Alternative to `flip`.\n * @see https://floating-ui.com/docs/autoPlacement\n */\nconst autoPlacement = autoPlacement$1;\n\n/**\n * Optimizes the visibility of the floating element by shifting it in order to\n * keep it in view when it will overflow the clipping boundary.\n * @see https://floating-ui.com/docs/shift\n */\nconst shift = shift$1;\n\n/**\n * Optimizes the visibility of the floating element by flipping the `placement`\n * in order to keep it in view when the preferred placement(s) will overflow the\n * clipping boundary. Alternative to `autoPlacement`.\n * @see https://floating-ui.com/docs/flip\n */\nconst flip = flip$1;\n\n/**\n * Provides data that allows you to change the size of the floating element —\n * for instance, prevent it from overflowing the clipping boundary or match the\n * width of the reference element.\n * @see https://floating-ui.com/docs/size\n */\nconst size = size$1;\n\n/**\n * Provides data to hide the floating element in applicable situations, such as\n * when it is not in the same clipping context as the reference element.\n * @see https://floating-ui.com/docs/hide\n */\nconst hide = hide$1;\n\n/**\n * Provides data to position an inner element of the floating element so that it\n * appears centered to the reference element.\n * @see https://floating-ui.com/docs/arrow\n */\nconst arrow = arrow$1;\n\n/**\n * Provides improved positioning for inline reference elements that can span\n * over multiple lines, such as hyperlinks or range selections.\n * @see https://floating-ui.com/docs/inline\n */\nconst inline = inline$1;\n\n/**\n * Built-in `limiter` that will stop `shift()` at a certain point.\n */\nconst limitShift = limitShift$1;\n\n/**\n * Computes the `x` and `y` coordinates that will place the floating element\n * next to a given reference element.\n */\nconst computePosition = (reference, floating, options) => {\n // This caches the expensive `getClippingElementAncestors` function so that\n // multiple lifecycle resets re-use the same result. It only lives for a\n // single call. If other functions become expensive, we can add them as well.\n const cache = new Map();\n const mergedOptions = {\n platform,\n ...options\n };\n const platformWithCache = {\n ...mergedOptions.platform,\n _c: cache\n };\n return computePosition$1(reference, floating, {\n ...mergedOptions,\n platform: platformWithCache\n });\n};\n\nexport { arrow, autoPlacement, autoUpdate, computePosition, detectOverflow, flip, hide, inline, limitShift, offset, platform, shift, size };\n","// Starting Point UI Tabs Module\n\nexport function select(tab: HTMLElement) {\n if (tab.hasAttribute(\"disabled\")) return;\n\n const tabList = tab.closest(\".tab-list\");\n if (!tabList) return;\n\n // Deselect all tabs in the list\n const tabs = tabList.querySelectorAll<HTMLElement>(\".tab\");\n for (const t of tabs) {\n t.classList.remove(\"active\");\n t.setAttribute(\"aria-selected\", \"false\");\n t.setAttribute(\"tabindex\", \"-1\");\n const selector = t.dataset.spTarget;\n if (selector) {\n document.querySelector(selector)?.classList.remove(\"active\");\n }\n }\n\n // Select the clicked tab\n tab.classList.add(\"active\");\n tab.setAttribute(\"aria-selected\", \"true\");\n tab.setAttribute(\"tabindex\", \"0\");\n\n const selector = tab.dataset.spTarget;\n if (selector) {\n document.querySelector(selector)?.classList.add(\"active\");\n }\n}\n\nfunction handleClick(e: MouseEvent) {\n const target = e.target as HTMLElement;\n const tab = target.closest<HTMLElement>(\"[data-sp-toggle='tab']\");\n if (tab) {\n select(tab);\n }\n}\n\nfunction findNextEnabledTab(\n tabs: HTMLElement[],\n startIndex: number,\n direction: 1 | -1\n): HTMLElement | null {\n const len = tabs.length;\n for (let i = 1; i <= len; i++) {\n const index = (startIndex + i * direction + len) % len;\n if (!tabs[index].hasAttribute(\"disabled\")) {\n return tabs[index];\n }\n }\n return null;\n}\n\nfunction handleKeydown(e: KeyboardEvent) {\n const target = e.target as HTMLElement;\n if (!target.classList.contains(\"tab\")) return;\n\n const tabList = target.closest(\".tab-list\");\n if (!tabList) return;\n\n const tabs = [...tabList.querySelectorAll<HTMLElement>(\".tab\")];\n const currentIndex = tabs.indexOf(target);\n\n let nextTab: HTMLElement | null = null;\n\n switch (e.key) {\n case \"ArrowLeft\":\n nextTab = findNextEnabledTab(tabs, currentIndex, -1);\n break;\n case \"ArrowRight\":\n nextTab = findNextEnabledTab(tabs, currentIndex, 1);\n break;\n case \"Home\":\n nextTab = tabs.find((t) => !t.hasAttribute(\"disabled\")) ?? null;\n break;\n case \"End\":\n nextTab = [...tabs].reverse().find((t) => !t.hasAttribute(\"disabled\")) ?? null;\n break;\n }\n\n if (nextTab) {\n e.preventDefault();\n nextTab.focus();\n select(nextTab);\n }\n}\n\n// Initialize global listeners\nlet initialized = false;\n\n(function init() {\n if (typeof document === \"undefined\" || initialized) return;\n initialized = true;\n\n document.addEventListener(\"click\", handleClick);\n document.addEventListener(\"keydown\", handleKeydown);\n})();\n","// Starting Point UI - JavaScript\n\nimport * as dialog from \"./dialog\";\nimport * as dropdown from \"./dropdown\";\nimport * as tabs from \"./tabs\";\n\nexport { dialog, dropdown, tabs };\n\ndeclare global {\n interface Window {\n sp: { dialog: typeof dialog; dropdown: typeof dropdown; tabs: typeof tabs };\n }\n}\n\nif (typeof window !== \"undefined\") {\n window.sp = { dialog, dropdown, tabs };\n}\n"]}
|
|
1
|
+
{"version":3,"sources":["../src/js/accordion.ts","../src/js/utils.ts","../src/js/collapsible.ts","../src/js/dialog.ts","../src/js/dropdown.ts","../../../node_modules/@floating-ui/utils/dist/floating-ui.utils.mjs","../../../node_modules/@floating-ui/core/dist/floating-ui.core.mjs","../../../node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.mjs","../../../node_modules/@floating-ui/dom/dist/floating-ui.dom.mjs","../src/js/sidebar.ts","../src/js/tabs.ts","../src/js/index.ts"],"names":["accordion_exports","__export","close","open","toggle","FOCUSABLE_SELECTOR","getFocusableElements","container","el","waitForAnimations","elements","animations","a","isDisabled","findNextEnabled","items","startIndex","direction","len","index","getPanel","target","getTrigger","panelId","setContentHeight","panel","height","handleClick","e","trigger","selector","accordion","isOpen","otherPanels","otherPanel","handleKeydown","triggers","currentIndex","nextTrigger","t","initialized","collapsible_exports","dialog_exports","BACKDROP_SELECTOR","PANEL_SELECTOR","getAnimatableElements","dialog","setDataState","state","isModal","focusable","dialogEl","first","last","toggleBtn","dismissBtn","backdrop","dropdown_exports","min","max","round","createCoords","v","oppositeSideMap","oppositeAlignmentMap","clamp","start","value","end","evaluate","param","getSide","placement","getAlignment","getOppositeAxis","axis","getAxisLength","yAxisSides","getSideAxis","getAlignmentAxis","getAlignmentSides","rects","rtl","alignment","alignmentAxis","length","mainAlignmentSide","getOppositePlacement","getExpandedPlacements","oppositePlacement","getOppositeAlignmentPlacement","lrPlacement","rlPlacement","tbPlacement","btPlacement","getSideList","side","isStart","getOppositeAxisPlacements","flipAlignment","list","expandPaddingObject","padding","getPaddingObject","rectToClientRect","rect","x","y","width","computeCoordsFromPlacement","_ref","reference","floating","sideAxis","alignLength","isVertical","commonX","commonY","commonAlign","coords","computePosition","config","strategy","middleware","platform","validMiddleware","statefulPlacement","middlewareData","resetCount","i","name","fn","nextX","nextY","data","reset","detectOverflow","options","_await$platform$isEle","boundary","rootBoundary","elementContext","altBoundary","paddingObject","element","clippingClientRect","offsetParent","offsetScale","elementClientRect","flip","_middlewareData$arrow","_middlewareData$flip","initialPlacement","checkMainAxis","checkCrossAxis","specifiedFallbackPlacements","fallbackStrategy","fallbackAxisSideDirection","detectOverflowOptions","initialSideAxis","isBasePlacement","fallbackPlacements","hasFallbackAxisSideDirection","placements","overflow","overflows","overflowsData","sides","_middlewareData$flip2","_overflowsData$filter","nextIndex","nextPlacement","d","resetPlacement","b","_overflowsData$filter2","currentSideAxis","acc","originSides","convertValueToCoords","mainAxisMulti","crossAxisMulti","rawValue","mainAxis","crossAxis","offset","_middlewareData$offse","diffCoords","shift","limiter","mainAxisCoord","crossAxisCoord","minSide","maxSide","limitedCoords","hasWindow","getNodeName","node","isNode","getWindow","_node$ownerDocument","getDocumentElement","isElement","isHTMLElement","isShadowRoot","invalidOverflowDisplayValues","isOverflowElement","overflowX","overflowY","display","getComputedStyle","tableElements","isTableElement","topLayerSelectors","isTopLayer","transformProperties","willChangeValues","containValues","isContainingBlock","elementOrCss","webkit","isWebKit","css","getContainingBlock","currentNode","getParentNode","isLastTraversableNode","lastTraversableNodeNames","getNodeScroll","result","getNearestOverflowAncestor","parentNode","getOverflowAncestors","traverseIframes","_node$ownerDocument2","scrollableAncestor","isBody","win","getFrameElement","getCssDimensions","hasOffset","offsetWidth","offsetHeight","shouldFallback","unwrapElement","getScale","domElement","$","noOffsets","getVisualOffsets","shouldAddVisualOffsets","isFixed","floatingOffsetParent","getBoundingClientRect","includeScale","isFixedStrategy","clientRect","scale","visualOffsets","offsetWin","currentWin","currentIFrame","iframeScale","iframeRect","left","top","getWindowScrollBarX","leftScroll","getHTMLOffset","documentElement","scroll","htmlRect","convertOffsetParentRelativeRectToViewportRelativeRect","topLayer","offsets","isOffsetParentAnElement","offsetRect","htmlOffset","getClientRects","getDocumentRect","html","body","SCROLLBAR_MAX","getViewportRect","visualViewport","visualViewportBased","windowScrollbarX","doc","bodyStyles","bodyMarginInline","clippingStableScrollbarWidth","absoluteOrFixed","getInnerBoundingClientRect","getClientRectFromClippingAncestor","clippingAncestor","hasFixedPositionAncestor","stopNode","getClippingElementAncestors","cache","cachedResult","currentContainingBlockComputedStyle","elementIsFixed","computedStyle","currentNodeIsContaining","ancestor","getClippingRect","clippingAncestors","firstClippingAncestor","clippingRect","accRect","getDimensions","getRectRelativeToOffsetParent","setLeftRTLScrollbarOffset","isStaticPositioned","getTrueOffsetParent","polyfill","rawOffsetParent","getOffsetParent","svgOffsetParent","getElementRects","getOffsetParentFn","getDimensionsFn","floatingDimensions","isRTL","mergedOptions","platformWithCache","getMenu","dropdown","getOpenDropdown","positionMenu","menu","offsetValue","openDropdown","item","nextItem","handleFocusOut","relatedTarget","sidebar_exports","getBreakpoint","isMobile","getBackdrop","sidebarPanel","setOpenClass","openPanel","handleResize","tabs_exports","select","tab","tabList","tabs","nextTab"],"mappings":"+FAAA,IAAAA,EAAAA,CAAA,GAAAC,CAAAA,CAAAD,EAAAA,CAAA,WAAAE,EAAAA,CAAA,IAAA,CAAA,IAAAC,GAAA,MAAA,CAAA,IAAAC,EAAAA,CAAAA,CAAAA,CCEA,IAAMC,EAAAA,CAAqB,CACzB,UACA,wBAAA,CACA,uBAAA,CACA,yBACA,0BAAA,CACA,iCAAA,CACA,mDACA,iBAAA,CACA,iBAAA,CACA,oBACA,QACF,CAAA,CAAE,KAAK,IAAI,CAAA,CAEJ,SAASC,EAAAA,CAAqBC,CAAAA,CAAuC,CAC1E,OAAO,CACL,GAAGA,CAAAA,CAAU,gBAAA,CAA8BF,EAAkB,CAC/D,CAAA,CAAE,OAAQG,CAAAA,EAAOA,CAAAA,CAAG,eAAiB,IAAI,CAC3C,CAEA,eAAsBC,CAAAA,CACpBC,EACe,CACf,IAAMC,EAAaD,CAAAA,CAAS,OAAA,CAASF,GAAOA,CAAAA,CAAG,aAAA,EAAe,CAAA,CAC1DG,CAAAA,CAAW,SAAW,CAAA,EAC1B,MAAM,QAAQ,GAAA,CAAIA,CAAAA,CAAW,IAAKC,CAAAA,EAAMA,CAAAA,CAAE,QAAQ,CAAC,EACrD,CAEO,SAASC,CAAAA,CAAWL,EAA0B,CACnD,OACEA,EAAG,YAAA,CAAa,UAAU,GAAKA,CAAAA,CAAG,YAAA,CAAa,eAAe,CAAA,GAAM,MAExE,CAEO,SAASM,CAAAA,CACdC,CAAAA,CACAC,CAAAA,CACAC,CAAAA,CACoB,CACpB,IAAMC,CAAAA,CAAMH,CAAAA,CAAM,OAClB,IAAA,IAAS,CA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,CACjBkU,EAAQ,KAAA,EAAM,CACdJ,GAAOI,CAAO,CAAA,EAElB,CAGA,IAAItT,EAAAA,CAAc,OAEjB,UAAgB,CACX,OAAO,QAAA,CAAa,GAAA,EAAeA,KACvCA,EAAAA,CAAc,IAAA,CAEd,SAAS,gBAAA,CAAiB,OAAA,CAASb,EAAW,CAAA,CAC9C,QAAA,CAAS,iBAAiB,SAAA,CAAWQ,EAAa,GACpD,CAAA,GAAG,CC5DC,OAAO,MAAA,CAAW,GAAA,GACpB,OAAO,EAAA,CAAK,CAAE,UAAAnC,EAAAA,CAAW,WAAA,CAAAyC,GAAa,MAAA,CAAAC,EAAAA,CAAQ,SAAAe,EAAAA,CAAU,OAAA,CAAAwR,EAAAA,CAAS,IAAA,CAAAQ,EAAK,CAAA,CAAA","file":"index.js","sourcesContent":["// Starting Point UI Accordion Module\n\nimport { findNextEnabled, isDisabled, waitForAnimations } from \"./utils\";\n\nfunction getPanel(target: HTMLElement): HTMLElement | null {\n if (target.classList.contains(\"accordion-panel\")) return target;\n return target.querySelector(\".accordion-panel\");\n}\n\nfunction getTrigger(panelId: string): HTMLElement | null {\n return document.querySelector<HTMLElement>(`[data-sp-target=\"#${panelId}\"]`);\n}\n\nfunction setContentHeight(panel: HTMLElement) {\n const height = `${panel.scrollHeight}px`;\n panel.style.setProperty(\"--radix-accordion-content-height\", height);\n}\n\nexport function open(target: HTMLElement) {\n const panel = getPanel(target);\n if (!panel || panel.classList.contains(\"open\")) return;\n\n if (panel.id) {\n const trigger = getTrigger(panel.id);\n trigger?.setAttribute(\"aria-expanded\", \"true\");\n }\n\n setContentHeight(panel);\n panel.classList.add(\"open\");\n panel.setAttribute(\"data-state\", \"open\");\n}\n\nexport async function close(target: HTMLElement) {\n const panel = getPanel(target);\n if (!panel || !panel.classList.contains(\"open\")) return;\n\n if (panel.id) {\n const trigger = getTrigger(panel.id);\n trigger?.setAttribute(\"aria-expanded\", \"false\");\n }\n\n setContentHeight(panel);\n panel.setAttribute(\"data-state\", \"closed\");\n await waitForAnimations([panel]);\n\n panel.classList.remove(\"open\");\n panel.removeAttribute(\"data-state\");\n}\n\nexport function toggle(target: HTMLElement) {\n const panel = getPanel(target);\n if (!panel) return;\n\n if (panel.classList.contains(\"open\")) {\n close(target);\n } else {\n open(target);\n }\n}\n\nfunction handleClick(e: MouseEvent) {\n const target = e.target as HTMLElement;\n\n const trigger = target.closest<HTMLElement>(\"[data-sp-toggle='accordion']\");\n if (!trigger || isDisabled(trigger)) return;\n\n const selector = trigger.dataset.spTarget;\n if (!selector) return;\n\n const panel = document.querySelector<HTMLElement>(selector);\n if (!panel) return;\n\n const accordion = trigger.closest<HTMLElement>(\".accordion\");\n const isOpen = panel.classList.contains(\"open\");\n\n // Close other panels in the same accordion (unless data-sp-multiple is set)\n if (accordion && !accordion.hasAttribute(\"data-sp-multiple\")) {\n const otherPanels = accordion.querySelectorAll<HTMLElement>(\n \".accordion-panel.open\"\n );\n for (const otherPanel of otherPanels) {\n if (otherPanel !== panel) {\n close(otherPanel);\n }\n }\n }\n\n if (isOpen) {\n close(panel);\n } else {\n open(panel);\n }\n}\n\nfunction handleKeydown(e: KeyboardEvent) {\n const target = e.target as HTMLElement;\n const trigger = target.closest<HTMLElement>(\"[data-sp-toggle='accordion']\");\n if (!trigger) return;\n\n const accordion = trigger.closest<HTMLElement>(\".accordion\");\n if (!accordion) return;\n\n const triggers = [\n ...accordion.querySelectorAll<HTMLElement>(\"[data-sp-toggle='accordion']\"),\n ];\n const currentIndex = triggers.indexOf(trigger);\n\n let nextTrigger: HTMLElement | null = null;\n\n switch (e.key) {\n case \"ArrowDown\":\n nextTrigger = findNextEnabled(triggers, currentIndex, 1);\n break;\n case \"ArrowUp\":\n nextTrigger = findNextEnabled(triggers, currentIndex, -1);\n break;\n case \"Home\":\n nextTrigger = triggers.find((t) => !isDisabled(t)) ?? null;\n break;\n case \"End\":\n nextTrigger = [...triggers].reverse().find((t) => !isDisabled(t)) ?? null;\n break;\n }\n\n if (nextTrigger) {\n e.preventDefault();\n nextTrigger.focus();\n }\n}\n\n// Initialize global listeners\nlet initialized = false;\n\n(function init() {\n if (typeof document === \"undefined\" || initialized) return;\n initialized = true;\n\n document.addEventListener(\"click\", handleClick);\n document.addEventListener(\"keydown\", handleKeydown);\n})();\n","// Starting Point UI Utilities\n\nconst FOCUSABLE_SELECTOR = [\n \"a[href]\",\n \"button:not([disabled])\",\n \"input:not([disabled])\",\n \"select:not([disabled])\",\n \"textarea:not([disabled])\",\n \"[tabindex]:not([tabindex='-1'])\",\n \"[contenteditable]:not([contenteditable='false'])\",\n \"audio[controls]\",\n \"video[controls]\",\n \"details > summary\",\n \"iframe\",\n].join(\", \");\n\nexport function getFocusableElements(container: HTMLElement): HTMLElement[] {\n return [\n ...container.querySelectorAll<HTMLElement>(FOCUSABLE_SELECTOR),\n ].filter((el) => el.offsetParent !== null);\n}\n\nexport async function waitForAnimations(\n elements: HTMLElement[]\n): Promise<void> {\n const animations = elements.flatMap((el) => el.getAnimations());\n if (animations.length === 0) return;\n await Promise.all(animations.map((a) => a.finished));\n}\n\nexport function isDisabled(el: HTMLElement): boolean {\n return (\n el.hasAttribute(\"disabled\") || el.getAttribute(\"aria-disabled\") === \"true\"\n );\n}\n\nexport function findNextEnabled(\n items: HTMLElement[],\n startIndex: number,\n direction: 1 | -1\n): HTMLElement | null {\n const len = items.length;\n for (let i = 1; i <= len; i++) {\n const index = (startIndex + i * direction + len) % len;\n if (!isDisabled(items[index])) {\n return items[index];\n }\n }\n return null;\n}\n","// Starting Point UI Collapsible Module\n\nimport { waitForAnimations } from \"./utils\";\n\nfunction getPanel(target: HTMLElement): HTMLElement | null {\n if (target.classList.contains(\"collapsible-panel\")) return target;\n return target.querySelector(\".collapsible-panel\");\n}\n\nfunction getTrigger(panelId: string): HTMLElement | null {\n return document.querySelector<HTMLElement>(`[data-sp-target=\"#${panelId}\"]`);\n}\n\nfunction setContentHeight(panel: HTMLElement) {\n const height = `${panel.scrollHeight}px`;\n panel.style.setProperty(\"--radix-collapsible-content-height\", height);\n}\n\nexport function open(target: HTMLElement) {\n const panel = getPanel(target);\n if (!panel || panel.classList.contains(\"open\")) return;\n\n if (panel.id) {\n const trigger = getTrigger(panel.id);\n trigger?.setAttribute(\"aria-expanded\", \"true\");\n }\n\n setContentHeight(panel);\n panel.classList.add(\"open\");\n panel.setAttribute(\"data-state\", \"open\");\n}\n\nexport async function close(target: HTMLElement) {\n const panel = getPanel(target);\n if (!panel || !panel.classList.contains(\"open\")) return;\n\n if (panel.id) {\n const trigger = getTrigger(panel.id);\n trigger?.setAttribute(\"aria-expanded\", \"false\");\n }\n\n setContentHeight(panel);\n panel.setAttribute(\"data-state\", \"closed\");\n await waitForAnimations([panel]);\n\n panel.classList.remove(\"open\");\n panel.removeAttribute(\"data-state\");\n}\n\nexport function toggle(target: HTMLElement) {\n const panel = getPanel(target);\n if (!panel) return;\n\n if (panel.classList.contains(\"open\")) {\n close(target);\n } else {\n open(target);\n }\n}\n\nfunction handleClick(e: MouseEvent) {\n const target = e.target as HTMLElement;\n\n const trigger = target.closest<HTMLElement>(\"[data-sp-toggle='collapsible']\");\n if (!trigger) return;\n\n const selector = trigger.dataset.spTarget;\n if (!selector) return;\n\n const panel = document.querySelector<HTMLElement>(selector);\n if (panel) {\n toggle(panel);\n }\n}\n\n// Initialize global listeners\nlet initialized = false;\n\n(function init() {\n if (typeof document === \"undefined\" || initialized) return;\n initialized = true;\n\n document.addEventListener(\"click\", handleClick);\n})();\n","// Starting Point UI Dialog Module\n\nimport { getFocusableElements, waitForAnimations } from \"./utils\";\n\nconst BACKDROP_SELECTOR = \".dialog-backdrop, .sheet-backdrop\";\nconst PANEL_SELECTOR = \".dialog-panel, .sheet-panel\";\n\nfunction getAnimatableElements(dialog: HTMLDialogElement): HTMLElement[] {\n return [\n ...dialog.querySelectorAll<HTMLElement>(\n `${BACKDROP_SELECTOR}, ${PANEL_SELECTOR}`\n ),\n ];\n}\n\nfunction setDataState(\n elements: HTMLElement[],\n state: \"open\" | \"closed\" | null\n) {\n for (const el of elements) {\n if (state === null) {\n el.removeAttribute(\"data-state\");\n } else {\n el.setAttribute(\"data-state\", state);\n }\n }\n}\n\nfunction isModal(dialog: HTMLDialogElement): boolean {\n return dialog.querySelector(BACKDROP_SELECTOR) !== null;\n}\n\nexport function open(dialog: HTMLDialogElement) {\n dialog.show();\n const elements = getAnimatableElements(dialog);\n setDataState(elements, \"open\");\n\n // Focus first focusable element in modal dialogs\n if (isModal(dialog)) {\n const focusable = getFocusableElements(dialog);\n if (focusable.length > 0) {\n focusable[0].focus();\n }\n }\n}\n\nexport async function close(dialog: HTMLDialogElement) {\n const elements = getAnimatableElements(dialog);\n setDataState(elements, \"closed\");\n\n await waitForAnimations(elements);\n\n dialog.close();\n setDataState(elements, null);\n}\n\nexport function toggle(dialog: HTMLDialogElement) {\n if (dialog.open) {\n close(dialog);\n } else {\n open(dialog);\n }\n}\n\n// Handle keydown for Escape and focus trapping\nfunction handleKeydown(e: KeyboardEvent) {\n const dialogEl = (e.target as HTMLElement).closest<HTMLDialogElement>(\n \"dialog\"\n );\n if (!dialogEl?.open) return;\n\n // Handle Escape key\n if (e.key === \"Escape\") {\n e.preventDefault();\n const isStatic = dialogEl.dataset.spBackdrop === \"static\";\n if (!isStatic) {\n close(dialogEl);\n }\n return;\n }\n\n // Handle Tab key for focus trapping in modals\n if (e.key === \"Tab\" && isModal(dialogEl)) {\n const focusable = getFocusableElements(dialogEl);\n if (focusable.length === 0) return;\n\n const first = focusable[0];\n const last = focusable[focusable.length - 1];\n\n if (e.shiftKey && document.activeElement === first) {\n e.preventDefault();\n last.focus();\n } else if (!e.shiftKey && document.activeElement === last) {\n e.preventDefault();\n first.focus();\n }\n }\n}\n\n// Global click handler for data attributes\nfunction handleClick(e: MouseEvent) {\n const target = e.target as HTMLElement;\n\n // Handle toggle buttons\n const toggleBtn = target.closest<HTMLElement>(\"[data-sp-toggle='dialog']\");\n if (toggleBtn) {\n const selector = toggleBtn.dataset.spTarget;\n if (selector) {\n const dialogEl = document.querySelector<HTMLDialogElement>(selector);\n if (dialogEl) {\n open(dialogEl);\n }\n }\n return;\n }\n\n // Handle dismiss buttons\n const dismissBtn = target.closest<HTMLElement>(\"[data-sp-dismiss='dialog']\");\n if (dismissBtn) {\n const dialogEl = dismissBtn.closest<HTMLDialogElement>(\"dialog\");\n if (dialogEl) {\n close(dialogEl);\n }\n return;\n }\n\n // Handle backdrop clicks\n const backdrop = target.closest<HTMLElement>(BACKDROP_SELECTOR);\n if (backdrop) {\n const dialogEl = backdrop.closest<HTMLDialogElement>(\"dialog\");\n if (dialogEl) {\n // Static backdrop prevents closing via click\n const isStatic = dialogEl.dataset.spBackdrop === \"static\";\n if (!isStatic) {\n close(dialogEl);\n }\n }\n }\n}\n\n// Initialize global listeners\nlet initialized = false;\n\n(function init() {\n if (typeof document === \"undefined\" || initialized) return;\n initialized = true;\n\n document.addEventListener(\"click\", handleClick);\n document.addEventListener(\"keydown\", handleKeydown);\n})();\n","// Starting Point UI Dropdown Module\n\nimport {\n computePosition,\n flip,\n shift,\n offset,\n type Placement,\n} from \"@floating-ui/dom\";\nimport { findNextEnabled, isDisabled, waitForAnimations } from \"./utils\";\n\nfunction getMenu(dropdown: HTMLElement): HTMLElement | null {\n return dropdown.querySelector(\".dropdown-menu\");\n}\n\nfunction getTrigger(dropdown: HTMLElement): HTMLElement | null {\n return dropdown.querySelector(\"[data-sp-toggle='dropdown']\");\n}\n\nfunction getOpenDropdown(): HTMLElement | null {\n const openMenu = document.querySelector(\".dropdown-menu.open\");\n return openMenu?.closest(\".dropdown\") ?? null;\n}\n\nasync function positionMenu(dropdown: HTMLElement) {\n const trigger = getTrigger(dropdown);\n const menu = getMenu(dropdown);\n if (!trigger || !menu) return;\n\n const placement = (dropdown.dataset.spPlacement as Placement) || \"bottom-end\";\n const offsetValue = parseInt(dropdown.dataset.spOffset || \"4\", 10);\n\n const { x, y } = await computePosition(trigger, menu, {\n placement,\n middleware: [offset(offsetValue), flip(), shift({ padding: 8 })],\n });\n\n Object.assign(menu.style, {\n left: `${x}px`,\n top: `${y}px`,\n });\n}\n\nexport function open(dropdown: HTMLElement) {\n const menu = getMenu(dropdown);\n if (!menu || menu.classList.contains(\"open\")) return;\n\n // Close any other open dropdown first\n const openDropdown = getOpenDropdown();\n if (openDropdown) {\n close(openDropdown);\n }\n\n const trigger = getTrigger(dropdown);\n\n menu.classList.add(\"open\");\n trigger?.setAttribute(\"aria-expanded\", \"true\");\n menu.setAttribute(\"data-state\", \"open\");\n\n positionMenu(dropdown);\n}\n\nexport async function close(dropdown: HTMLElement) {\n const menu = getMenu(dropdown);\n if (!menu || !menu.classList.contains(\"open\")) return;\n\n const trigger = getTrigger(dropdown);\n\n trigger?.setAttribute(\"aria-expanded\", \"false\");\n menu.setAttribute(\"data-state\", \"closed\");\n\n await waitForAnimations([menu]);\n\n menu.classList.remove(\"open\");\n menu.removeAttribute(\"data-state\");\n}\n\nexport function toggle(dropdown: HTMLElement) {\n const menu = getMenu(dropdown);\n if (menu?.classList.contains(\"open\")) {\n close(dropdown);\n } else {\n open(dropdown);\n }\n}\n\nfunction handleClick(e: MouseEvent) {\n const target = e.target as HTMLElement;\n\n // Handle toggle button clicks\n const toggleBtn = target.closest<HTMLElement>(\"[data-sp-toggle='dropdown']\");\n if (toggleBtn) {\n const dropdown = toggleBtn.closest<HTMLElement>(\".dropdown\");\n if (dropdown) {\n e.preventDefault();\n toggle(dropdown);\n }\n return;\n }\n\n // Handle item clicks\n const item = target.closest<HTMLElement>(\".dropdown-item\");\n if (item) {\n // Ignore disabled items\n if (isDisabled(item)) {\n e.preventDefault();\n return;\n }\n const dropdown = item.closest<HTMLElement>(\".dropdown\");\n if (dropdown) {\n close(dropdown);\n }\n return;\n }\n\n // Close dropdown when clicking outside\n const openDropdown = getOpenDropdown();\n if (openDropdown && !openDropdown.contains(target)) {\n close(openDropdown);\n }\n}\n\nfunction handleKeydown(e: KeyboardEvent) {\n const target = e.target as HTMLElement;\n const dropdown = target.closest<HTMLElement>(\".dropdown\");\n\n // Handle Escape to close\n const openDropdown = getOpenDropdown();\n if (e.key === \"Escape\" && openDropdown) {\n e.preventDefault();\n const trigger = getTrigger(openDropdown);\n close(openDropdown);\n trigger?.focus();\n return;\n }\n\n // Handle Enter/Space on trigger\n if (\n (e.key === \"Enter\" || e.key === \" \") &&\n target.matches(\"[data-sp-toggle='dropdown']\")\n ) {\n e.preventDefault();\n if (dropdown) {\n toggle(dropdown);\n }\n return;\n }\n\n // Handle arrow navigation within menu\n const menu = dropdown ? getMenu(dropdown) : null;\n if (!menu?.classList.contains(\"open\")) return;\n\n const items = [...menu.querySelectorAll<HTMLElement>(\".dropdown-item\")];\n const currentIndex = items.indexOf(target);\n\n let nextItem: HTMLElement | null = null;\n\n switch (e.key) {\n case \"ArrowDown\":\n e.preventDefault();\n if (currentIndex < 0) {\n nextItem = items.find((item) => !isDisabled(item)) ?? null;\n } else {\n nextItem = findNextEnabled(items, currentIndex, 1);\n }\n break;\n case \"ArrowUp\":\n e.preventDefault();\n if (currentIndex < 0) {\n nextItem =\n [...items].reverse().find((item) => !isDisabled(item)) ?? null;\n } else {\n nextItem = findNextEnabled(items, currentIndex, -1);\n }\n break;\n case \"Home\":\n e.preventDefault();\n nextItem = items.find((item) => !isDisabled(item)) ?? null;\n break;\n case \"End\":\n e.preventDefault();\n nextItem =\n [...items].reverse().find((item) => !isDisabled(item)) ?? null;\n break;\n }\n\n if (nextItem) {\n nextItem.focus();\n }\n}\n\nfunction handleFocusOut(e: FocusEvent) {\n const openDropdown = getOpenDropdown();\n if (!openDropdown) return;\n\n const relatedTarget = e.relatedTarget as HTMLElement | null;\n\n // If focus is moving outside the dropdown, close it\n if (!relatedTarget || !openDropdown.contains(relatedTarget)) {\n close(openDropdown);\n }\n}\n\n// Initialize global listeners\nlet initialized = false;\n\n(function init() {\n if (typeof document === \"undefined\" || initialized) return;\n initialized = true;\n\n document.addEventListener(\"click\", handleClick);\n document.addEventListener(\"keydown\", handleKeydown);\n document.addEventListener(\"focusout\", handleFocusOut);\n})();\n","/**\n * Custom positioning reference element.\n * @see https://floating-ui.com/docs/virtual-elements\n */\n\nconst sides = ['top', 'right', 'bottom', 'left'];\nconst alignments = ['start', 'end'];\nconst placements = /*#__PURE__*/sides.reduce((acc, side) => acc.concat(side, side + \"-\" + alignments[0], side + \"-\" + alignments[1]), []);\nconst min = Math.min;\nconst max = Math.max;\nconst round = Math.round;\nconst floor = Math.floor;\nconst createCoords = v => ({\n x: v,\n y: v\n});\nconst oppositeSideMap = {\n left: 'right',\n right: 'left',\n bottom: 'top',\n top: 'bottom'\n};\nconst oppositeAlignmentMap = {\n start: 'end',\n end: 'start'\n};\nfunction clamp(start, value, end) {\n return max(start, min(value, end));\n}\nfunction evaluate(value, param) {\n return typeof value === 'function' ? value(param) : value;\n}\nfunction getSide(placement) {\n return placement.split('-')[0];\n}\nfunction getAlignment(placement) {\n return placement.split('-')[1];\n}\nfunction getOppositeAxis(axis) {\n return axis === 'x' ? 'y' : 'x';\n}\nfunction getAxisLength(axis) {\n return axis === 'y' ? 'height' : 'width';\n}\nconst yAxisSides = /*#__PURE__*/new Set(['top', 'bottom']);\nfunction getSideAxis(placement) {\n return yAxisSides.has(getSide(placement)) ? 'y' : 'x';\n}\nfunction getAlignmentAxis(placement) {\n return getOppositeAxis(getSideAxis(placement));\n}\nfunction getAlignmentSides(placement, rects, rtl) {\n if (rtl === void 0) {\n rtl = false;\n }\n const alignment = getAlignment(placement);\n const alignmentAxis = getAlignmentAxis(placement);\n const length = getAxisLength(alignmentAxis);\n let mainAlignmentSide = alignmentAxis === 'x' ? alignment === (rtl ? 'end' : 'start') ? 'right' : 'left' : alignment === 'start' ? 'bottom' : 'top';\n if (rects.reference[length] > rects.floating[length]) {\n mainAlignmentSide = getOppositePlacement(mainAlignmentSide);\n }\n return [mainAlignmentSide, getOppositePlacement(mainAlignmentSide)];\n}\nfunction getExpandedPlacements(placement) {\n const oppositePlacement = getOppositePlacement(placement);\n return [getOppositeAlignmentPlacement(placement), oppositePlacement, getOppositeAlignmentPlacement(oppositePlacement)];\n}\nfunction getOppositeAlignmentPlacement(placement) {\n return placement.replace(/start|end/g, alignment => oppositeAlignmentMap[alignment]);\n}\nconst lrPlacement = ['left', 'right'];\nconst rlPlacement = ['right', 'left'];\nconst tbPlacement = ['top', 'bottom'];\nconst btPlacement = ['bottom', 'top'];\nfunction getSideList(side, isStart, rtl) {\n switch (side) {\n case 'top':\n case 'bottom':\n if (rtl) return isStart ? rlPlacement : lrPlacement;\n return isStart ? lrPlacement : rlPlacement;\n case 'left':\n case 'right':\n return isStart ? tbPlacement : btPlacement;\n default:\n return [];\n }\n}\nfunction getOppositeAxisPlacements(placement, flipAlignment, direction, rtl) {\n const alignment = getAlignment(placement);\n let list = getSideList(getSide(placement), direction === 'start', rtl);\n if (alignment) {\n list = list.map(side => side + \"-\" + alignment);\n if (flipAlignment) {\n list = list.concat(list.map(getOppositeAlignmentPlacement));\n }\n }\n return list;\n}\nfunction getOppositePlacement(placement) {\n return placement.replace(/left|right|bottom|top/g, side => oppositeSideMap[side]);\n}\nfunction expandPaddingObject(padding) {\n return {\n top: 0,\n right: 0,\n bottom: 0,\n left: 0,\n ...padding\n };\n}\nfunction getPaddingObject(padding) {\n return typeof padding !== 'number' ? expandPaddingObject(padding) : {\n top: padding,\n right: padding,\n bottom: padding,\n left: padding\n };\n}\nfunction rectToClientRect(rect) {\n const {\n x,\n y,\n width,\n height\n } = rect;\n return {\n width,\n height,\n top: y,\n left: x,\n right: x + width,\n bottom: y + height,\n x,\n y\n };\n}\n\nexport { alignments, clamp, createCoords, evaluate, expandPaddingObject, floor, getAlignment, getAlignmentAxis, getAlignmentSides, getAxisLength, getExpandedPlacements, getOppositeAlignmentPlacement, getOppositeAxis, getOppositeAxisPlacements, getOppositePlacement, getPaddingObject, getSide, getSideAxis, max, min, placements, rectToClientRect, round, sides };\n","import { getSideAxis, getAlignmentAxis, getAxisLength, getSide, getAlignment, evaluate, getPaddingObject, rectToClientRect, min, clamp, placements, getAlignmentSides, getOppositeAlignmentPlacement, getOppositePlacement, getExpandedPlacements, getOppositeAxisPlacements, sides, max, getOppositeAxis } from '@floating-ui/utils';\nexport { rectToClientRect } from '@floating-ui/utils';\n\nfunction computeCoordsFromPlacement(_ref, placement, rtl) {\n let {\n reference,\n floating\n } = _ref;\n const sideAxis = getSideAxis(placement);\n const alignmentAxis = getAlignmentAxis(placement);\n const alignLength = getAxisLength(alignmentAxis);\n const side = getSide(placement);\n const isVertical = sideAxis === 'y';\n const commonX = reference.x + reference.width / 2 - floating.width / 2;\n const commonY = reference.y + reference.height / 2 - floating.height / 2;\n const commonAlign = reference[alignLength] / 2 - floating[alignLength] / 2;\n let coords;\n switch (side) {\n case 'top':\n coords = {\n x: commonX,\n y: reference.y - floating.height\n };\n break;\n case 'bottom':\n coords = {\n x: commonX,\n y: reference.y + reference.height\n };\n break;\n case 'right':\n coords = {\n x: reference.x + reference.width,\n y: commonY\n };\n break;\n case 'left':\n coords = {\n x: reference.x - floating.width,\n y: commonY\n };\n break;\n default:\n coords = {\n x: reference.x,\n y: reference.y\n };\n }\n switch (getAlignment(placement)) {\n case 'start':\n coords[alignmentAxis] -= commonAlign * (rtl && isVertical ? -1 : 1);\n break;\n case 'end':\n coords[alignmentAxis] += commonAlign * (rtl && isVertical ? -1 : 1);\n break;\n }\n return coords;\n}\n\n/**\n * Computes the `x` and `y` coordinates that will place the floating element\n * next to a given reference element.\n *\n * This export does not have any `platform` interface logic. You will need to\n * write one for the platform you are using Floating UI with.\n */\nconst computePosition = async (reference, floating, config) => {\n const {\n placement = 'bottom',\n strategy = 'absolute',\n middleware = [],\n platform\n } = config;\n const validMiddleware = middleware.filter(Boolean);\n const rtl = await (platform.isRTL == null ? void 0 : platform.isRTL(floating));\n let rects = await platform.getElementRects({\n reference,\n floating,\n strategy\n });\n let {\n x,\n y\n } = computeCoordsFromPlacement(rects, placement, rtl);\n let statefulPlacement = placement;\n let middlewareData = {};\n let resetCount = 0;\n for (let i = 0; i < validMiddleware.length; i++) {\n const {\n name,\n fn\n } = validMiddleware[i];\n const {\n x: nextX,\n y: nextY,\n data,\n reset\n } = await fn({\n x,\n y,\n initialPlacement: placement,\n placement: statefulPlacement,\n strategy,\n middlewareData,\n rects,\n platform,\n elements: {\n reference,\n floating\n }\n });\n x = nextX != null ? nextX : x;\n y = nextY != null ? nextY : y;\n middlewareData = {\n ...middlewareData,\n [name]: {\n ...middlewareData[name],\n ...data\n }\n };\n if (reset && resetCount <= 50) {\n resetCount++;\n if (typeof reset === 'object') {\n if (reset.placement) {\n statefulPlacement = reset.placement;\n }\n if (reset.rects) {\n rects = reset.rects === true ? await platform.getElementRects({\n reference,\n floating,\n strategy\n }) : reset.rects;\n }\n ({\n x,\n y\n } = computeCoordsFromPlacement(rects, statefulPlacement, rtl));\n }\n i = -1;\n }\n }\n return {\n x,\n y,\n placement: statefulPlacement,\n strategy,\n middlewareData\n };\n};\n\n/**\n * Resolves with an object of overflow side offsets that determine how much the\n * element is overflowing a given clipping boundary on each side.\n * - positive = overflowing the boundary by that number of pixels\n * - negative = how many pixels left before it will overflow\n * - 0 = lies flush with the boundary\n * @see https://floating-ui.com/docs/detectOverflow\n */\nasync function detectOverflow(state, options) {\n var _await$platform$isEle;\n if (options === void 0) {\n options = {};\n }\n const {\n x,\n y,\n platform,\n rects,\n elements,\n strategy\n } = state;\n const {\n boundary = 'clippingAncestors',\n rootBoundary = 'viewport',\n elementContext = 'floating',\n altBoundary = false,\n padding = 0\n } = evaluate(options, state);\n const paddingObject = getPaddingObject(padding);\n const altContext = elementContext === 'floating' ? 'reference' : 'floating';\n const element = elements[altBoundary ? altContext : elementContext];\n const clippingClientRect = rectToClientRect(await platform.getClippingRect({\n element: ((_await$platform$isEle = await (platform.isElement == null ? void 0 : platform.isElement(element))) != null ? _await$platform$isEle : true) ? element : element.contextElement || (await (platform.getDocumentElement == null ? void 0 : platform.getDocumentElement(elements.floating))),\n boundary,\n rootBoundary,\n strategy\n }));\n const rect = elementContext === 'floating' ? {\n x,\n y,\n width: rects.floating.width,\n height: rects.floating.height\n } : rects.reference;\n const offsetParent = await (platform.getOffsetParent == null ? void 0 : platform.getOffsetParent(elements.floating));\n const offsetScale = (await (platform.isElement == null ? void 0 : platform.isElement(offsetParent))) ? (await (platform.getScale == null ? void 0 : platform.getScale(offsetParent))) || {\n x: 1,\n y: 1\n } : {\n x: 1,\n y: 1\n };\n const elementClientRect = rectToClientRect(platform.convertOffsetParentRelativeRectToViewportRelativeRect ? await platform.convertOffsetParentRelativeRectToViewportRelativeRect({\n elements,\n rect,\n offsetParent,\n strategy\n }) : rect);\n return {\n top: (clippingClientRect.top - elementClientRect.top + paddingObject.top) / offsetScale.y,\n bottom: (elementClientRect.bottom - clippingClientRect.bottom + paddingObject.bottom) / offsetScale.y,\n left: (clippingClientRect.left - elementClientRect.left + paddingObject.left) / offsetScale.x,\n right: (elementClientRect.right - clippingClientRect.right + paddingObject.right) / offsetScale.x\n };\n}\n\n/**\n * Provides data to position an inner element of the floating element so that it\n * appears centered to the reference element.\n * @see https://floating-ui.com/docs/arrow\n */\nconst arrow = options => ({\n name: 'arrow',\n options,\n async fn(state) {\n const {\n x,\n y,\n placement,\n rects,\n platform,\n elements,\n middlewareData\n } = state;\n // Since `element` is required, we don't Partial<> the type.\n const {\n element,\n padding = 0\n } = evaluate(options, state) || {};\n if (element == null) {\n return {};\n }\n const paddingObject = getPaddingObject(padding);\n const coords = {\n x,\n y\n };\n const axis = getAlignmentAxis(placement);\n const length = getAxisLength(axis);\n const arrowDimensions = await platform.getDimensions(element);\n const isYAxis = axis === 'y';\n const minProp = isYAxis ? 'top' : 'left';\n const maxProp = isYAxis ? 'bottom' : 'right';\n const clientProp = isYAxis ? 'clientHeight' : 'clientWidth';\n const endDiff = rects.reference[length] + rects.reference[axis] - coords[axis] - rects.floating[length];\n const startDiff = coords[axis] - rects.reference[axis];\n const arrowOffsetParent = await (platform.getOffsetParent == null ? void 0 : platform.getOffsetParent(element));\n let clientSize = arrowOffsetParent ? arrowOffsetParent[clientProp] : 0;\n\n // DOM platform can return `window` as the `offsetParent`.\n if (!clientSize || !(await (platform.isElement == null ? void 0 : platform.isElement(arrowOffsetParent)))) {\n clientSize = elements.floating[clientProp] || rects.floating[length];\n }\n const centerToReference = endDiff / 2 - startDiff / 2;\n\n // If the padding is large enough that it causes the arrow to no longer be\n // centered, modify the padding so that it is centered.\n const largestPossiblePadding = clientSize / 2 - arrowDimensions[length] / 2 - 1;\n const minPadding = min(paddingObject[minProp], largestPossiblePadding);\n const maxPadding = min(paddingObject[maxProp], largestPossiblePadding);\n\n // Make sure the arrow doesn't overflow the floating element if the center\n // point is outside the floating element's bounds.\n const min$1 = minPadding;\n const max = clientSize - arrowDimensions[length] - maxPadding;\n const center = clientSize / 2 - arrowDimensions[length] / 2 + centerToReference;\n const offset = clamp(min$1, center, max);\n\n // If the reference is small enough that the arrow's padding causes it to\n // to point to nothing for an aligned placement, adjust the offset of the\n // floating element itself. To ensure `shift()` continues to take action,\n // a single reset is performed when this is true.\n const shouldAddOffset = !middlewareData.arrow && getAlignment(placement) != null && center !== offset && rects.reference[length] / 2 - (center < min$1 ? minPadding : maxPadding) - arrowDimensions[length] / 2 < 0;\n const alignmentOffset = shouldAddOffset ? center < min$1 ? center - min$1 : center - max : 0;\n return {\n [axis]: coords[axis] + alignmentOffset,\n data: {\n [axis]: offset,\n centerOffset: center - offset - alignmentOffset,\n ...(shouldAddOffset && {\n alignmentOffset\n })\n },\n reset: shouldAddOffset\n };\n }\n});\n\nfunction getPlacementList(alignment, autoAlignment, allowedPlacements) {\n const allowedPlacementsSortedByAlignment = alignment ? [...allowedPlacements.filter(placement => getAlignment(placement) === alignment), ...allowedPlacements.filter(placement => getAlignment(placement) !== alignment)] : allowedPlacements.filter(placement => getSide(placement) === placement);\n return allowedPlacementsSortedByAlignment.filter(placement => {\n if (alignment) {\n return getAlignment(placement) === alignment || (autoAlignment ? getOppositeAlignmentPlacement(placement) !== placement : false);\n }\n return true;\n });\n}\n/**\n * Optimizes the visibility of the floating element by choosing the placement\n * that has the most space available automatically, without needing to specify a\n * preferred placement. Alternative to `flip`.\n * @see https://floating-ui.com/docs/autoPlacement\n */\nconst autoPlacement = function (options) {\n if (options === void 0) {\n options = {};\n }\n return {\n name: 'autoPlacement',\n options,\n async fn(state) {\n var _middlewareData$autoP, _middlewareData$autoP2, _placementsThatFitOnE;\n const {\n rects,\n middlewareData,\n placement,\n platform,\n elements\n } = state;\n const {\n crossAxis = false,\n alignment,\n allowedPlacements = placements,\n autoAlignment = true,\n ...detectOverflowOptions\n } = evaluate(options, state);\n const placements$1 = alignment !== undefined || allowedPlacements === placements ? getPlacementList(alignment || null, autoAlignment, allowedPlacements) : allowedPlacements;\n const overflow = await detectOverflow(state, detectOverflowOptions);\n const currentIndex = ((_middlewareData$autoP = middlewareData.autoPlacement) == null ? void 0 : _middlewareData$autoP.index) || 0;\n const currentPlacement = placements$1[currentIndex];\n if (currentPlacement == null) {\n return {};\n }\n const alignmentSides = getAlignmentSides(currentPlacement, rects, await (platform.isRTL == null ? void 0 : platform.isRTL(elements.floating)));\n\n // Make `computeCoords` start from the right place.\n if (placement !== currentPlacement) {\n return {\n reset: {\n placement: placements$1[0]\n }\n };\n }\n const currentOverflows = [overflow[getSide(currentPlacement)], overflow[alignmentSides[0]], overflow[alignmentSides[1]]];\n const allOverflows = [...(((_middlewareData$autoP2 = middlewareData.autoPlacement) == null ? void 0 : _middlewareData$autoP2.overflows) || []), {\n placement: currentPlacement,\n overflows: currentOverflows\n }];\n const nextPlacement = placements$1[currentIndex + 1];\n\n // There are more placements to check.\n if (nextPlacement) {\n return {\n data: {\n index: currentIndex + 1,\n overflows: allOverflows\n },\n reset: {\n placement: nextPlacement\n }\n };\n }\n const placementsSortedByMostSpace = allOverflows.map(d => {\n const alignment = getAlignment(d.placement);\n return [d.placement, alignment && crossAxis ?\n // Check along the mainAxis and main crossAxis side.\n d.overflows.slice(0, 2).reduce((acc, v) => acc + v, 0) :\n // Check only the mainAxis.\n d.overflows[0], d.overflows];\n }).sort((a, b) => a[1] - b[1]);\n const placementsThatFitOnEachSide = placementsSortedByMostSpace.filter(d => d[2].slice(0,\n // Aligned placements should not check their opposite crossAxis\n // side.\n getAlignment(d[0]) ? 2 : 3).every(v => v <= 0));\n const resetPlacement = ((_placementsThatFitOnE = placementsThatFitOnEachSide[0]) == null ? void 0 : _placementsThatFitOnE[0]) || placementsSortedByMostSpace[0][0];\n if (resetPlacement !== placement) {\n return {\n data: {\n index: currentIndex + 1,\n overflows: allOverflows\n },\n reset: {\n placement: resetPlacement\n }\n };\n }\n return {};\n }\n };\n};\n\n/**\n * Optimizes the visibility of the floating element by flipping the `placement`\n * in order to keep it in view when the preferred placement(s) will overflow the\n * clipping boundary. Alternative to `autoPlacement`.\n * @see https://floating-ui.com/docs/flip\n */\nconst flip = function (options) {\n if (options === void 0) {\n options = {};\n }\n return {\n name: 'flip',\n options,\n async fn(state) {\n var _middlewareData$arrow, _middlewareData$flip;\n const {\n placement,\n middlewareData,\n rects,\n initialPlacement,\n platform,\n elements\n } = state;\n const {\n mainAxis: checkMainAxis = true,\n crossAxis: checkCrossAxis = true,\n fallbackPlacements: specifiedFallbackPlacements,\n fallbackStrategy = 'bestFit',\n fallbackAxisSideDirection = 'none',\n flipAlignment = true,\n ...detectOverflowOptions\n } = evaluate(options, state);\n\n // If a reset by the arrow was caused due to an alignment offset being\n // added, we should skip any logic now since `flip()` has already done its\n // work.\n // https://github.com/floating-ui/floating-ui/issues/2549#issuecomment-1719601643\n if ((_middlewareData$arrow = middlewareData.arrow) != null && _middlewareData$arrow.alignmentOffset) {\n return {};\n }\n const side = getSide(placement);\n const initialSideAxis = getSideAxis(initialPlacement);\n const isBasePlacement = getSide(initialPlacement) === initialPlacement;\n const rtl = await (platform.isRTL == null ? void 0 : platform.isRTL(elements.floating));\n const fallbackPlacements = specifiedFallbackPlacements || (isBasePlacement || !flipAlignment ? [getOppositePlacement(initialPlacement)] : getExpandedPlacements(initialPlacement));\n const hasFallbackAxisSideDirection = fallbackAxisSideDirection !== 'none';\n if (!specifiedFallbackPlacements && hasFallbackAxisSideDirection) {\n fallbackPlacements.push(...getOppositeAxisPlacements(initialPlacement, flipAlignment, fallbackAxisSideDirection, rtl));\n }\n const placements = [initialPlacement, ...fallbackPlacements];\n const overflow = await detectOverflow(state, detectOverflowOptions);\n const overflows = [];\n let overflowsData = ((_middlewareData$flip = middlewareData.flip) == null ? void 0 : _middlewareData$flip.overflows) || [];\n if (checkMainAxis) {\n overflows.push(overflow[side]);\n }\n if (checkCrossAxis) {\n const sides = getAlignmentSides(placement, rects, rtl);\n overflows.push(overflow[sides[0]], overflow[sides[1]]);\n }\n overflowsData = [...overflowsData, {\n placement,\n overflows\n }];\n\n // One or more sides is overflowing.\n if (!overflows.every(side => side <= 0)) {\n var _middlewareData$flip2, _overflowsData$filter;\n const nextIndex = (((_middlewareData$flip2 = middlewareData.flip) == null ? void 0 : _middlewareData$flip2.index) || 0) + 1;\n const nextPlacement = placements[nextIndex];\n if (nextPlacement) {\n const ignoreCrossAxisOverflow = checkCrossAxis === 'alignment' ? initialSideAxis !== getSideAxis(nextPlacement) : false;\n if (!ignoreCrossAxisOverflow ||\n // We leave the current main axis only if every placement on that axis\n // overflows the main axis.\n overflowsData.every(d => getSideAxis(d.placement) === initialSideAxis ? d.overflows[0] > 0 : true)) {\n // Try next placement and re-run the lifecycle.\n return {\n data: {\n index: nextIndex,\n overflows: overflowsData\n },\n reset: {\n placement: nextPlacement\n }\n };\n }\n }\n\n // First, find the candidates that fit on the mainAxis side of overflow,\n // then find the placement that fits the best on the main crossAxis side.\n let resetPlacement = (_overflowsData$filter = overflowsData.filter(d => d.overflows[0] <= 0).sort((a, b) => a.overflows[1] - b.overflows[1])[0]) == null ? void 0 : _overflowsData$filter.placement;\n\n // Otherwise fallback.\n if (!resetPlacement) {\n switch (fallbackStrategy) {\n case 'bestFit':\n {\n var _overflowsData$filter2;\n const placement = (_overflowsData$filter2 = overflowsData.filter(d => {\n if (hasFallbackAxisSideDirection) {\n const currentSideAxis = getSideAxis(d.placement);\n return currentSideAxis === initialSideAxis ||\n // Create a bias to the `y` side axis due to horizontal\n // reading directions favoring greater width.\n currentSideAxis === 'y';\n }\n return true;\n }).map(d => [d.placement, d.overflows.filter(overflow => overflow > 0).reduce((acc, overflow) => acc + overflow, 0)]).sort((a, b) => a[1] - b[1])[0]) == null ? void 0 : _overflowsData$filter2[0];\n if (placement) {\n resetPlacement = placement;\n }\n break;\n }\n case 'initialPlacement':\n resetPlacement = initialPlacement;\n break;\n }\n }\n if (placement !== resetPlacement) {\n return {\n reset: {\n placement: resetPlacement\n }\n };\n }\n }\n return {};\n }\n };\n};\n\nfunction getSideOffsets(overflow, rect) {\n return {\n top: overflow.top - rect.height,\n right: overflow.right - rect.width,\n bottom: overflow.bottom - rect.height,\n left: overflow.left - rect.width\n };\n}\nfunction isAnySideFullyClipped(overflow) {\n return sides.some(side => overflow[side] >= 0);\n}\n/**\n * Provides data to hide the floating element in applicable situations, such as\n * when it is not in the same clipping context as the reference element.\n * @see https://floating-ui.com/docs/hide\n */\nconst hide = function (options) {\n if (options === void 0) {\n options = {};\n }\n return {\n name: 'hide',\n options,\n async fn(state) {\n const {\n rects\n } = state;\n const {\n strategy = 'referenceHidden',\n ...detectOverflowOptions\n } = evaluate(options, state);\n switch (strategy) {\n case 'referenceHidden':\n {\n const overflow = await detectOverflow(state, {\n ...detectOverflowOptions,\n elementContext: 'reference'\n });\n const offsets = getSideOffsets(overflow, rects.reference);\n return {\n data: {\n referenceHiddenOffsets: offsets,\n referenceHidden: isAnySideFullyClipped(offsets)\n }\n };\n }\n case 'escaped':\n {\n const overflow = await detectOverflow(state, {\n ...detectOverflowOptions,\n altBoundary: true\n });\n const offsets = getSideOffsets(overflow, rects.floating);\n return {\n data: {\n escapedOffsets: offsets,\n escaped: isAnySideFullyClipped(offsets)\n }\n };\n }\n default:\n {\n return {};\n }\n }\n }\n };\n};\n\nfunction getBoundingRect(rects) {\n const minX = min(...rects.map(rect => rect.left));\n const minY = min(...rects.map(rect => rect.top));\n const maxX = max(...rects.map(rect => rect.right));\n const maxY = max(...rects.map(rect => rect.bottom));\n return {\n x: minX,\n y: minY,\n width: maxX - minX,\n height: maxY - minY\n };\n}\nfunction getRectsByLine(rects) {\n const sortedRects = rects.slice().sort((a, b) => a.y - b.y);\n const groups = [];\n let prevRect = null;\n for (let i = 0; i < sortedRects.length; i++) {\n const rect = sortedRects[i];\n if (!prevRect || rect.y - prevRect.y > prevRect.height / 2) {\n groups.push([rect]);\n } else {\n groups[groups.length - 1].push(rect);\n }\n prevRect = rect;\n }\n return groups.map(rect => rectToClientRect(getBoundingRect(rect)));\n}\n/**\n * Provides improved positioning for inline reference elements that can span\n * over multiple lines, such as hyperlinks or range selections.\n * @see https://floating-ui.com/docs/inline\n */\nconst inline = function (options) {\n if (options === void 0) {\n options = {};\n }\n return {\n name: 'inline',\n options,\n async fn(state) {\n const {\n placement,\n elements,\n rects,\n platform,\n strategy\n } = state;\n // A MouseEvent's client{X,Y} coords can be up to 2 pixels off a\n // ClientRect's bounds, despite the event listener being triggered. A\n // padding of 2 seems to handle this issue.\n const {\n padding = 2,\n x,\n y\n } = evaluate(options, state);\n const nativeClientRects = Array.from((await (platform.getClientRects == null ? void 0 : platform.getClientRects(elements.reference))) || []);\n const clientRects = getRectsByLine(nativeClientRects);\n const fallback = rectToClientRect(getBoundingRect(nativeClientRects));\n const paddingObject = getPaddingObject(padding);\n function getBoundingClientRect() {\n // There are two rects and they are disjoined.\n if (clientRects.length === 2 && clientRects[0].left > clientRects[1].right && x != null && y != null) {\n // Find the first rect in which the point is fully inside.\n return clientRects.find(rect => x > rect.left - paddingObject.left && x < rect.right + paddingObject.right && y > rect.top - paddingObject.top && y < rect.bottom + paddingObject.bottom) || fallback;\n }\n\n // There are 2 or more connected rects.\n if (clientRects.length >= 2) {\n if (getSideAxis(placement) === 'y') {\n const firstRect = clientRects[0];\n const lastRect = clientRects[clientRects.length - 1];\n const isTop = getSide(placement) === 'top';\n const top = firstRect.top;\n const bottom = lastRect.bottom;\n const left = isTop ? firstRect.left : lastRect.left;\n const right = isTop ? firstRect.right : lastRect.right;\n const width = right - left;\n const height = bottom - top;\n return {\n top,\n bottom,\n left,\n right,\n width,\n height,\n x: left,\n y: top\n };\n }\n const isLeftSide = getSide(placement) === 'left';\n const maxRight = max(...clientRects.map(rect => rect.right));\n const minLeft = min(...clientRects.map(rect => rect.left));\n const measureRects = clientRects.filter(rect => isLeftSide ? rect.left === minLeft : rect.right === maxRight);\n const top = measureRects[0].top;\n const bottom = measureRects[measureRects.length - 1].bottom;\n const left = minLeft;\n const right = maxRight;\n const width = right - left;\n const height = bottom - top;\n return {\n top,\n bottom,\n left,\n right,\n width,\n height,\n x: left,\n y: top\n };\n }\n return fallback;\n }\n const resetRects = await platform.getElementRects({\n reference: {\n getBoundingClientRect\n },\n floating: elements.floating,\n strategy\n });\n if (rects.reference.x !== resetRects.reference.x || rects.reference.y !== resetRects.reference.y || rects.reference.width !== resetRects.reference.width || rects.reference.height !== resetRects.reference.height) {\n return {\n reset: {\n rects: resetRects\n }\n };\n }\n return {};\n }\n };\n};\n\nconst originSides = /*#__PURE__*/new Set(['left', 'top']);\n\n// For type backwards-compatibility, the `OffsetOptions` type was also\n// Derivable.\n\nasync function convertValueToCoords(state, options) {\n const {\n placement,\n platform,\n elements\n } = state;\n const rtl = await (platform.isRTL == null ? void 0 : platform.isRTL(elements.floating));\n const side = getSide(placement);\n const alignment = getAlignment(placement);\n const isVertical = getSideAxis(placement) === 'y';\n const mainAxisMulti = originSides.has(side) ? -1 : 1;\n const crossAxisMulti = rtl && isVertical ? -1 : 1;\n const rawValue = evaluate(options, state);\n\n // eslint-disable-next-line prefer-const\n let {\n mainAxis,\n crossAxis,\n alignmentAxis\n } = typeof rawValue === 'number' ? {\n mainAxis: rawValue,\n crossAxis: 0,\n alignmentAxis: null\n } : {\n mainAxis: rawValue.mainAxis || 0,\n crossAxis: rawValue.crossAxis || 0,\n alignmentAxis: rawValue.alignmentAxis\n };\n if (alignment && typeof alignmentAxis === 'number') {\n crossAxis = alignment === 'end' ? alignmentAxis * -1 : alignmentAxis;\n }\n return isVertical ? {\n x: crossAxis * crossAxisMulti,\n y: mainAxis * mainAxisMulti\n } : {\n x: mainAxis * mainAxisMulti,\n y: crossAxis * crossAxisMulti\n };\n}\n\n/**\n * Modifies the placement by translating the floating element along the\n * specified axes.\n * A number (shorthand for `mainAxis` or distance), or an axes configuration\n * object may be passed.\n * @see https://floating-ui.com/docs/offset\n */\nconst offset = function (options) {\n if (options === void 0) {\n options = 0;\n }\n return {\n name: 'offset',\n options,\n async fn(state) {\n var _middlewareData$offse, _middlewareData$arrow;\n const {\n x,\n y,\n placement,\n middlewareData\n } = state;\n const diffCoords = await convertValueToCoords(state, options);\n\n // If the placement is the same and the arrow caused an alignment offset\n // then we don't need to change the positioning coordinates.\n if (placement === ((_middlewareData$offse = middlewareData.offset) == null ? void 0 : _middlewareData$offse.placement) && (_middlewareData$arrow = middlewareData.arrow) != null && _middlewareData$arrow.alignmentOffset) {\n return {};\n }\n return {\n x: x + diffCoords.x,\n y: y + diffCoords.y,\n data: {\n ...diffCoords,\n placement\n }\n };\n }\n };\n};\n\n/**\n * Optimizes the visibility of the floating element by shifting it in order to\n * keep it in view when it will overflow the clipping boundary.\n * @see https://floating-ui.com/docs/shift\n */\nconst shift = function (options) {\n if (options === void 0) {\n options = {};\n }\n return {\n name: 'shift',\n options,\n async fn(state) {\n const {\n x,\n y,\n placement\n } = state;\n const {\n mainAxis: checkMainAxis = true,\n crossAxis: checkCrossAxis = false,\n limiter = {\n fn: _ref => {\n let {\n x,\n y\n } = _ref;\n return {\n x,\n y\n };\n }\n },\n ...detectOverflowOptions\n } = evaluate(options, state);\n const coords = {\n x,\n y\n };\n const overflow = await detectOverflow(state, detectOverflowOptions);\n const crossAxis = getSideAxis(getSide(placement));\n const mainAxis = getOppositeAxis(crossAxis);\n let mainAxisCoord = coords[mainAxis];\n let crossAxisCoord = coords[crossAxis];\n if (checkMainAxis) {\n const minSide = mainAxis === 'y' ? 'top' : 'left';\n const maxSide = mainAxis === 'y' ? 'bottom' : 'right';\n const min = mainAxisCoord + overflow[minSide];\n const max = mainAxisCoord - overflow[maxSide];\n mainAxisCoord = clamp(min, mainAxisCoord, max);\n }\n if (checkCrossAxis) {\n const minSide = crossAxis === 'y' ? 'top' : 'left';\n const maxSide = crossAxis === 'y' ? 'bottom' : 'right';\n const min = crossAxisCoord + overflow[minSide];\n const max = crossAxisCoord - overflow[maxSide];\n crossAxisCoord = clamp(min, crossAxisCoord, max);\n }\n const limitedCoords = limiter.fn({\n ...state,\n [mainAxis]: mainAxisCoord,\n [crossAxis]: crossAxisCoord\n });\n return {\n ...limitedCoords,\n data: {\n x: limitedCoords.x - x,\n y: limitedCoords.y - y,\n enabled: {\n [mainAxis]: checkMainAxis,\n [crossAxis]: checkCrossAxis\n }\n }\n };\n }\n };\n};\n/**\n * Built-in `limiter` that will stop `shift()` at a certain point.\n */\nconst limitShift = function (options) {\n if (options === void 0) {\n options = {};\n }\n return {\n options,\n fn(state) {\n const {\n x,\n y,\n placement,\n rects,\n middlewareData\n } = state;\n const {\n offset = 0,\n mainAxis: checkMainAxis = true,\n crossAxis: checkCrossAxis = true\n } = evaluate(options, state);\n const coords = {\n x,\n y\n };\n const crossAxis = getSideAxis(placement);\n const mainAxis = getOppositeAxis(crossAxis);\n let mainAxisCoord = coords[mainAxis];\n let crossAxisCoord = coords[crossAxis];\n const rawOffset = evaluate(offset, state);\n const computedOffset = typeof rawOffset === 'number' ? {\n mainAxis: rawOffset,\n crossAxis: 0\n } : {\n mainAxis: 0,\n crossAxis: 0,\n ...rawOffset\n };\n if (checkMainAxis) {\n const len = mainAxis === 'y' ? 'height' : 'width';\n const limitMin = rects.reference[mainAxis] - rects.floating[len] + computedOffset.mainAxis;\n const limitMax = rects.reference[mainAxis] + rects.reference[len] - computedOffset.mainAxis;\n if (mainAxisCoord < limitMin) {\n mainAxisCoord = limitMin;\n } else if (mainAxisCoord > limitMax) {\n mainAxisCoord = limitMax;\n }\n }\n if (checkCrossAxis) {\n var _middlewareData$offse, _middlewareData$offse2;\n const len = mainAxis === 'y' ? 'width' : 'height';\n const isOriginSide = originSides.has(getSide(placement));\n const limitMin = rects.reference[crossAxis] - rects.floating[len] + (isOriginSide ? ((_middlewareData$offse = middlewareData.offset) == null ? void 0 : _middlewareData$offse[crossAxis]) || 0 : 0) + (isOriginSide ? 0 : computedOffset.crossAxis);\n const limitMax = rects.reference[crossAxis] + rects.reference[len] + (isOriginSide ? 0 : ((_middlewareData$offse2 = middlewareData.offset) == null ? void 0 : _middlewareData$offse2[crossAxis]) || 0) - (isOriginSide ? computedOffset.crossAxis : 0);\n if (crossAxisCoord < limitMin) {\n crossAxisCoord = limitMin;\n } else if (crossAxisCoord > limitMax) {\n crossAxisCoord = limitMax;\n }\n }\n return {\n [mainAxis]: mainAxisCoord,\n [crossAxis]: crossAxisCoord\n };\n }\n };\n};\n\n/**\n * Provides data that allows you to change the size of the floating element —\n * for instance, prevent it from overflowing the clipping boundary or match the\n * width of the reference element.\n * @see https://floating-ui.com/docs/size\n */\nconst size = function (options) {\n if (options === void 0) {\n options = {};\n }\n return {\n name: 'size',\n options,\n async fn(state) {\n var _state$middlewareData, _state$middlewareData2;\n const {\n placement,\n rects,\n platform,\n elements\n } = state;\n const {\n apply = () => {},\n ...detectOverflowOptions\n } = evaluate(options, state);\n const overflow = await detectOverflow(state, detectOverflowOptions);\n const side = getSide(placement);\n const alignment = getAlignment(placement);\n const isYAxis = getSideAxis(placement) === 'y';\n const {\n width,\n height\n } = rects.floating;\n let heightSide;\n let widthSide;\n if (side === 'top' || side === 'bottom') {\n heightSide = side;\n widthSide = alignment === ((await (platform.isRTL == null ? void 0 : platform.isRTL(elements.floating))) ? 'start' : 'end') ? 'left' : 'right';\n } else {\n widthSide = side;\n heightSide = alignment === 'end' ? 'top' : 'bottom';\n }\n const maximumClippingHeight = height - overflow.top - overflow.bottom;\n const maximumClippingWidth = width - overflow.left - overflow.right;\n const overflowAvailableHeight = min(height - overflow[heightSide], maximumClippingHeight);\n const overflowAvailableWidth = min(width - overflow[widthSide], maximumClippingWidth);\n const noShift = !state.middlewareData.shift;\n let availableHeight = overflowAvailableHeight;\n let availableWidth = overflowAvailableWidth;\n if ((_state$middlewareData = state.middlewareData.shift) != null && _state$middlewareData.enabled.x) {\n availableWidth = maximumClippingWidth;\n }\n if ((_state$middlewareData2 = state.middlewareData.shift) != null && _state$middlewareData2.enabled.y) {\n availableHeight = maximumClippingHeight;\n }\n if (noShift && !alignment) {\n const xMin = max(overflow.left, 0);\n const xMax = max(overflow.right, 0);\n const yMin = max(overflow.top, 0);\n const yMax = max(overflow.bottom, 0);\n if (isYAxis) {\n availableWidth = width - 2 * (xMin !== 0 || xMax !== 0 ? xMin + xMax : max(overflow.left, overflow.right));\n } else {\n availableHeight = height - 2 * (yMin !== 0 || yMax !== 0 ? yMin + yMax : max(overflow.top, overflow.bottom));\n }\n }\n await apply({\n ...state,\n availableWidth,\n availableHeight\n });\n const nextDimensions = await platform.getDimensions(elements.floating);\n if (width !== nextDimensions.width || height !== nextDimensions.height) {\n return {\n reset: {\n rects: true\n }\n };\n }\n return {};\n }\n };\n};\n\nexport { arrow, autoPlacement, computePosition, detectOverflow, flip, hide, inline, limitShift, offset, shift, size };\n","function hasWindow() {\n return typeof window !== 'undefined';\n}\nfunction getNodeName(node) {\n if (isNode(node)) {\n return (node.nodeName || '').toLowerCase();\n }\n // Mocked nodes in testing environments may not be instances of Node. By\n // returning `#document` an infinite loop won't occur.\n // https://github.com/floating-ui/floating-ui/issues/2317\n return '#document';\n}\nfunction getWindow(node) {\n var _node$ownerDocument;\n return (node == null || (_node$ownerDocument = node.ownerDocument) == null ? void 0 : _node$ownerDocument.defaultView) || window;\n}\nfunction getDocumentElement(node) {\n var _ref;\n return (_ref = (isNode(node) ? node.ownerDocument : node.document) || window.document) == null ? void 0 : _ref.documentElement;\n}\nfunction isNode(value) {\n if (!hasWindow()) {\n return false;\n }\n return value instanceof Node || value instanceof getWindow(value).Node;\n}\nfunction isElement(value) {\n if (!hasWindow()) {\n return false;\n }\n return value instanceof Element || value instanceof getWindow(value).Element;\n}\nfunction isHTMLElement(value) {\n if (!hasWindow()) {\n return false;\n }\n return value instanceof HTMLElement || value instanceof getWindow(value).HTMLElement;\n}\nfunction isShadowRoot(value) {\n if (!hasWindow() || typeof ShadowRoot === 'undefined') {\n return false;\n }\n return value instanceof ShadowRoot || value instanceof getWindow(value).ShadowRoot;\n}\nconst invalidOverflowDisplayValues = /*#__PURE__*/new Set(['inline', 'contents']);\nfunction isOverflowElement(element) {\n const {\n overflow,\n overflowX,\n overflowY,\n display\n } = getComputedStyle(element);\n return /auto|scroll|overlay|hidden|clip/.test(overflow + overflowY + overflowX) && !invalidOverflowDisplayValues.has(display);\n}\nconst tableElements = /*#__PURE__*/new Set(['table', 'td', 'th']);\nfunction isTableElement(element) {\n return tableElements.has(getNodeName(element));\n}\nconst topLayerSelectors = [':popover-open', ':modal'];\nfunction isTopLayer(element) {\n return topLayerSelectors.some(selector => {\n try {\n return element.matches(selector);\n } catch (_e) {\n return false;\n }\n });\n}\nconst transformProperties = ['transform', 'translate', 'scale', 'rotate', 'perspective'];\nconst willChangeValues = ['transform', 'translate', 'scale', 'rotate', 'perspective', 'filter'];\nconst containValues = ['paint', 'layout', 'strict', 'content'];\nfunction isContainingBlock(elementOrCss) {\n const webkit = isWebKit();\n const css = isElement(elementOrCss) ? getComputedStyle(elementOrCss) : elementOrCss;\n\n // https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block#identifying_the_containing_block\n // https://drafts.csswg.org/css-transforms-2/#individual-transforms\n return transformProperties.some(value => css[value] ? css[value] !== 'none' : false) || (css.containerType ? css.containerType !== 'normal' : false) || !webkit && (css.backdropFilter ? css.backdropFilter !== 'none' : false) || !webkit && (css.filter ? css.filter !== 'none' : false) || willChangeValues.some(value => (css.willChange || '').includes(value)) || containValues.some(value => (css.contain || '').includes(value));\n}\nfunction getContainingBlock(element) {\n let currentNode = getParentNode(element);\n while (isHTMLElement(currentNode) && !isLastTraversableNode(currentNode)) {\n if (isContainingBlock(currentNode)) {\n return currentNode;\n } else if (isTopLayer(currentNode)) {\n return null;\n }\n currentNode = getParentNode(currentNode);\n }\n return null;\n}\nfunction isWebKit() {\n if (typeof CSS === 'undefined' || !CSS.supports) return false;\n return CSS.supports('-webkit-backdrop-filter', 'none');\n}\nconst lastTraversableNodeNames = /*#__PURE__*/new Set(['html', 'body', '#document']);\nfunction isLastTraversableNode(node) {\n return lastTraversableNodeNames.has(getNodeName(node));\n}\nfunction getComputedStyle(element) {\n return getWindow(element).getComputedStyle(element);\n}\nfunction getNodeScroll(element) {\n if (isElement(element)) {\n return {\n scrollLeft: element.scrollLeft,\n scrollTop: element.scrollTop\n };\n }\n return {\n scrollLeft: element.scrollX,\n scrollTop: element.scrollY\n };\n}\nfunction getParentNode(node) {\n if (getNodeName(node) === 'html') {\n return node;\n }\n const result =\n // Step into the shadow DOM of the parent of a slotted node.\n node.assignedSlot ||\n // DOM Element detected.\n node.parentNode ||\n // ShadowRoot detected.\n isShadowRoot(node) && node.host ||\n // Fallback.\n getDocumentElement(node);\n return isShadowRoot(result) ? result.host : result;\n}\nfunction getNearestOverflowAncestor(node) {\n const parentNode = getParentNode(node);\n if (isLastTraversableNode(parentNode)) {\n return node.ownerDocument ? node.ownerDocument.body : node.body;\n }\n if (isHTMLElement(parentNode) && isOverflowElement(parentNode)) {\n return parentNode;\n }\n return getNearestOverflowAncestor(parentNode);\n}\nfunction getOverflowAncestors(node, list, traverseIframes) {\n var _node$ownerDocument2;\n if (list === void 0) {\n list = [];\n }\n if (traverseIframes === void 0) {\n traverseIframes = true;\n }\n const scrollableAncestor = getNearestOverflowAncestor(node);\n const isBody = scrollableAncestor === ((_node$ownerDocument2 = node.ownerDocument) == null ? void 0 : _node$ownerDocument2.body);\n const win = getWindow(scrollableAncestor);\n if (isBody) {\n const frameElement = getFrameElement(win);\n return list.concat(win, win.visualViewport || [], isOverflowElement(scrollableAncestor) ? scrollableAncestor : [], frameElement && traverseIframes ? getOverflowAncestors(frameElement) : []);\n }\n return list.concat(scrollableAncestor, getOverflowAncestors(scrollableAncestor, [], traverseIframes));\n}\nfunction getFrameElement(win) {\n return win.parent && Object.getPrototypeOf(win.parent) ? win.frameElement : null;\n}\n\nexport { getComputedStyle, getContainingBlock, getDocumentElement, getFrameElement, getNearestOverflowAncestor, getNodeName, getNodeScroll, getOverflowAncestors, getParentNode, getWindow, isContainingBlock, isElement, isHTMLElement, isLastTraversableNode, isNode, isOverflowElement, isShadowRoot, isTableElement, isTopLayer, isWebKit };\n","import { rectToClientRect, arrow as arrow$1, autoPlacement as autoPlacement$1, detectOverflow as detectOverflow$1, flip as flip$1, hide as hide$1, inline as inline$1, limitShift as limitShift$1, offset as offset$1, shift as shift$1, size as size$1, computePosition as computePosition$1 } from '@floating-ui/core';\nimport { round, createCoords, max, min, floor } from '@floating-ui/utils';\nimport { getComputedStyle as getComputedStyle$1, isHTMLElement, isElement, getWindow, isWebKit, getFrameElement, getNodeScroll, getDocumentElement, isTopLayer, getNodeName, isOverflowElement, getOverflowAncestors, getParentNode, isLastTraversableNode, isContainingBlock, isTableElement, getContainingBlock } from '@floating-ui/utils/dom';\nexport { getOverflowAncestors } from '@floating-ui/utils/dom';\n\nfunction getCssDimensions(element) {\n const css = getComputedStyle$1(element);\n // In testing environments, the `width` and `height` properties are empty\n // strings for SVG elements, returning NaN. Fallback to `0` in this case.\n let width = parseFloat(css.width) || 0;\n let height = parseFloat(css.height) || 0;\n const hasOffset = isHTMLElement(element);\n const offsetWidth = hasOffset ? element.offsetWidth : width;\n const offsetHeight = hasOffset ? element.offsetHeight : height;\n const shouldFallback = round(width) !== offsetWidth || round(height) !== offsetHeight;\n if (shouldFallback) {\n width = offsetWidth;\n height = offsetHeight;\n }\n return {\n width,\n height,\n $: shouldFallback\n };\n}\n\nfunction unwrapElement(element) {\n return !isElement(element) ? element.contextElement : element;\n}\n\nfunction getScale(element) {\n const domElement = unwrapElement(element);\n if (!isHTMLElement(domElement)) {\n return createCoords(1);\n }\n const rect = domElement.getBoundingClientRect();\n const {\n width,\n height,\n $\n } = getCssDimensions(domElement);\n let x = ($ ? round(rect.width) : rect.width) / width;\n let y = ($ ? round(rect.height) : rect.height) / height;\n\n // 0, NaN, or Infinity should always fallback to 1.\n\n if (!x || !Number.isFinite(x)) {\n x = 1;\n }\n if (!y || !Number.isFinite(y)) {\n y = 1;\n }\n return {\n x,\n y\n };\n}\n\nconst noOffsets = /*#__PURE__*/createCoords(0);\nfunction getVisualOffsets(element) {\n const win = getWindow(element);\n if (!isWebKit() || !win.visualViewport) {\n return noOffsets;\n }\n return {\n x: win.visualViewport.offsetLeft,\n y: win.visualViewport.offsetTop\n };\n}\nfunction shouldAddVisualOffsets(element, isFixed, floatingOffsetParent) {\n if (isFixed === void 0) {\n isFixed = false;\n }\n if (!floatingOffsetParent || isFixed && floatingOffsetParent !== getWindow(element)) {\n return false;\n }\n return isFixed;\n}\n\nfunction getBoundingClientRect(element, includeScale, isFixedStrategy, offsetParent) {\n if (includeScale === void 0) {\n includeScale = false;\n }\n if (isFixedStrategy === void 0) {\n isFixedStrategy = false;\n }\n const clientRect = element.getBoundingClientRect();\n const domElement = unwrapElement(element);\n let scale = createCoords(1);\n if (includeScale) {\n if (offsetParent) {\n if (isElement(offsetParent)) {\n scale = getScale(offsetParent);\n }\n } else {\n scale = getScale(element);\n }\n }\n const visualOffsets = shouldAddVisualOffsets(domElement, isFixedStrategy, offsetParent) ? getVisualOffsets(domElement) : createCoords(0);\n let x = (clientRect.left + visualOffsets.x) / scale.x;\n let y = (clientRect.top + visualOffsets.y) / scale.y;\n let width = clientRect.width / scale.x;\n let height = clientRect.height / scale.y;\n if (domElement) {\n const win = getWindow(domElement);\n const offsetWin = offsetParent && isElement(offsetParent) ? getWindow(offsetParent) : offsetParent;\n let currentWin = win;\n let currentIFrame = getFrameElement(currentWin);\n while (currentIFrame && offsetParent && offsetWin !== currentWin) {\n const iframeScale = getScale(currentIFrame);\n const iframeRect = currentIFrame.getBoundingClientRect();\n const css = getComputedStyle$1(currentIFrame);\n const left = iframeRect.left + (currentIFrame.clientLeft + parseFloat(css.paddingLeft)) * iframeScale.x;\n const top = iframeRect.top + (currentIFrame.clientTop + parseFloat(css.paddingTop)) * iframeScale.y;\n x *= iframeScale.x;\n y *= iframeScale.y;\n width *= iframeScale.x;\n height *= iframeScale.y;\n x += left;\n y += top;\n currentWin = getWindow(currentIFrame);\n currentIFrame = getFrameElement(currentWin);\n }\n }\n return rectToClientRect({\n width,\n height,\n x,\n y\n });\n}\n\n// If <html> has a CSS width greater than the viewport, then this will be\n// incorrect for RTL.\nfunction getWindowScrollBarX(element, rect) {\n const leftScroll = getNodeScroll(element).scrollLeft;\n if (!rect) {\n return getBoundingClientRect(getDocumentElement(element)).left + leftScroll;\n }\n return rect.left + leftScroll;\n}\n\nfunction getHTMLOffset(documentElement, scroll) {\n const htmlRect = documentElement.getBoundingClientRect();\n const x = htmlRect.left + scroll.scrollLeft - getWindowScrollBarX(documentElement, htmlRect);\n const y = htmlRect.top + scroll.scrollTop;\n return {\n x,\n y\n };\n}\n\nfunction convertOffsetParentRelativeRectToViewportRelativeRect(_ref) {\n let {\n elements,\n rect,\n offsetParent,\n strategy\n } = _ref;\n const isFixed = strategy === 'fixed';\n const documentElement = getDocumentElement(offsetParent);\n const topLayer = elements ? isTopLayer(elements.floating) : false;\n if (offsetParent === documentElement || topLayer && isFixed) {\n return rect;\n }\n let scroll = {\n scrollLeft: 0,\n scrollTop: 0\n };\n let scale = createCoords(1);\n const offsets = createCoords(0);\n const isOffsetParentAnElement = isHTMLElement(offsetParent);\n if (isOffsetParentAnElement || !isOffsetParentAnElement && !isFixed) {\n if (getNodeName(offsetParent) !== 'body' || isOverflowElement(documentElement)) {\n scroll = getNodeScroll(offsetParent);\n }\n if (isHTMLElement(offsetParent)) {\n const offsetRect = getBoundingClientRect(offsetParent);\n scale = getScale(offsetParent);\n offsets.x = offsetRect.x + offsetParent.clientLeft;\n offsets.y = offsetRect.y + offsetParent.clientTop;\n }\n }\n const htmlOffset = documentElement && !isOffsetParentAnElement && !isFixed ? getHTMLOffset(documentElement, scroll) : createCoords(0);\n return {\n width: rect.width * scale.x,\n height: rect.height * scale.y,\n x: rect.x * scale.x - scroll.scrollLeft * scale.x + offsets.x + htmlOffset.x,\n y: rect.y * scale.y - scroll.scrollTop * scale.y + offsets.y + htmlOffset.y\n };\n}\n\nfunction getClientRects(element) {\n return Array.from(element.getClientRects());\n}\n\n// Gets the entire size of the scrollable document area, even extending outside\n// of the `<html>` and `<body>` rect bounds if horizontally scrollable.\nfunction getDocumentRect(element) {\n const html = getDocumentElement(element);\n const scroll = getNodeScroll(element);\n const body = element.ownerDocument.body;\n const width = max(html.scrollWidth, html.clientWidth, body.scrollWidth, body.clientWidth);\n const height = max(html.scrollHeight, html.clientHeight, body.scrollHeight, body.clientHeight);\n let x = -scroll.scrollLeft + getWindowScrollBarX(element);\n const y = -scroll.scrollTop;\n if (getComputedStyle$1(body).direction === 'rtl') {\n x += max(html.clientWidth, body.clientWidth) - width;\n }\n return {\n width,\n height,\n x,\n y\n };\n}\n\n// Safety check: ensure the scrollbar space is reasonable in case this\n// calculation is affected by unusual styles.\n// Most scrollbars leave 15-18px of space.\nconst SCROLLBAR_MAX = 25;\nfunction getViewportRect(element, strategy) {\n const win = getWindow(element);\n const html = getDocumentElement(element);\n const visualViewport = win.visualViewport;\n let width = html.clientWidth;\n let height = html.clientHeight;\n let x = 0;\n let y = 0;\n if (visualViewport) {\n width = visualViewport.width;\n height = visualViewport.height;\n const visualViewportBased = isWebKit();\n if (!visualViewportBased || visualViewportBased && strategy === 'fixed') {\n x = visualViewport.offsetLeft;\n y = visualViewport.offsetTop;\n }\n }\n const windowScrollbarX = getWindowScrollBarX(html);\n // <html> `overflow: hidden` + `scrollbar-gutter: stable` reduces the\n // visual width of the <html> but this is not considered in the size\n // of `html.clientWidth`.\n if (windowScrollbarX <= 0) {\n const doc = html.ownerDocument;\n const body = doc.body;\n const bodyStyles = getComputedStyle(body);\n const bodyMarginInline = doc.compatMode === 'CSS1Compat' ? parseFloat(bodyStyles.marginLeft) + parseFloat(bodyStyles.marginRight) || 0 : 0;\n const clippingStableScrollbarWidth = Math.abs(html.clientWidth - body.clientWidth - bodyMarginInline);\n if (clippingStableScrollbarWidth <= SCROLLBAR_MAX) {\n width -= clippingStableScrollbarWidth;\n }\n } else if (windowScrollbarX <= SCROLLBAR_MAX) {\n // If the <body> scrollbar is on the left, the width needs to be extended\n // by the scrollbar amount so there isn't extra space on the right.\n width += windowScrollbarX;\n }\n return {\n width,\n height,\n x,\n y\n };\n}\n\nconst absoluteOrFixed = /*#__PURE__*/new Set(['absolute', 'fixed']);\n// Returns the inner client rect, subtracting scrollbars if present.\nfunction getInnerBoundingClientRect(element, strategy) {\n const clientRect = getBoundingClientRect(element, true, strategy === 'fixed');\n const top = clientRect.top + element.clientTop;\n const left = clientRect.left + element.clientLeft;\n const scale = isHTMLElement(element) ? getScale(element) : createCoords(1);\n const width = element.clientWidth * scale.x;\n const height = element.clientHeight * scale.y;\n const x = left * scale.x;\n const y = top * scale.y;\n return {\n width,\n height,\n x,\n y\n };\n}\nfunction getClientRectFromClippingAncestor(element, clippingAncestor, strategy) {\n let rect;\n if (clippingAncestor === 'viewport') {\n rect = getViewportRect(element, strategy);\n } else if (clippingAncestor === 'document') {\n rect = getDocumentRect(getDocumentElement(element));\n } else if (isElement(clippingAncestor)) {\n rect = getInnerBoundingClientRect(clippingAncestor, strategy);\n } else {\n const visualOffsets = getVisualOffsets(element);\n rect = {\n x: clippingAncestor.x - visualOffsets.x,\n y: clippingAncestor.y - visualOffsets.y,\n width: clippingAncestor.width,\n height: clippingAncestor.height\n };\n }\n return rectToClientRect(rect);\n}\nfunction hasFixedPositionAncestor(element, stopNode) {\n const parentNode = getParentNode(element);\n if (parentNode === stopNode || !isElement(parentNode) || isLastTraversableNode(parentNode)) {\n return false;\n }\n return getComputedStyle$1(parentNode).position === 'fixed' || hasFixedPositionAncestor(parentNode, stopNode);\n}\n\n// A \"clipping ancestor\" is an `overflow` element with the characteristic of\n// clipping (or hiding) child elements. This returns all clipping ancestors\n// of the given element up the tree.\nfunction getClippingElementAncestors(element, cache) {\n const cachedResult = cache.get(element);\n if (cachedResult) {\n return cachedResult;\n }\n let result = getOverflowAncestors(element, [], false).filter(el => isElement(el) && getNodeName(el) !== 'body');\n let currentContainingBlockComputedStyle = null;\n const elementIsFixed = getComputedStyle$1(element).position === 'fixed';\n let currentNode = elementIsFixed ? getParentNode(element) : element;\n\n // https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block#identifying_the_containing_block\n while (isElement(currentNode) && !isLastTraversableNode(currentNode)) {\n const computedStyle = getComputedStyle$1(currentNode);\n const currentNodeIsContaining = isContainingBlock(currentNode);\n if (!currentNodeIsContaining && computedStyle.position === 'fixed') {\n currentContainingBlockComputedStyle = null;\n }\n const shouldDropCurrentNode = elementIsFixed ? !currentNodeIsContaining && !currentContainingBlockComputedStyle : !currentNodeIsContaining && computedStyle.position === 'static' && !!currentContainingBlockComputedStyle && absoluteOrFixed.has(currentContainingBlockComputedStyle.position) || isOverflowElement(currentNode) && !currentNodeIsContaining && hasFixedPositionAncestor(element, currentNode);\n if (shouldDropCurrentNode) {\n // Drop non-containing blocks.\n result = result.filter(ancestor => ancestor !== currentNode);\n } else {\n // Record last containing block for next iteration.\n currentContainingBlockComputedStyle = computedStyle;\n }\n currentNode = getParentNode(currentNode);\n }\n cache.set(element, result);\n return result;\n}\n\n// Gets the maximum area that the element is visible in due to any number of\n// clipping ancestors.\nfunction getClippingRect(_ref) {\n let {\n element,\n boundary,\n rootBoundary,\n strategy\n } = _ref;\n const elementClippingAncestors = boundary === 'clippingAncestors' ? isTopLayer(element) ? [] : getClippingElementAncestors(element, this._c) : [].concat(boundary);\n const clippingAncestors = [...elementClippingAncestors, rootBoundary];\n const firstClippingAncestor = clippingAncestors[0];\n const clippingRect = clippingAncestors.reduce((accRect, clippingAncestor) => {\n const rect = getClientRectFromClippingAncestor(element, clippingAncestor, strategy);\n accRect.top = max(rect.top, accRect.top);\n accRect.right = min(rect.right, accRect.right);\n accRect.bottom = min(rect.bottom, accRect.bottom);\n accRect.left = max(rect.left, accRect.left);\n return accRect;\n }, getClientRectFromClippingAncestor(element, firstClippingAncestor, strategy));\n return {\n width: clippingRect.right - clippingRect.left,\n height: clippingRect.bottom - clippingRect.top,\n x: clippingRect.left,\n y: clippingRect.top\n };\n}\n\nfunction getDimensions(element) {\n const {\n width,\n height\n } = getCssDimensions(element);\n return {\n width,\n height\n };\n}\n\nfunction getRectRelativeToOffsetParent(element, offsetParent, strategy) {\n const isOffsetParentAnElement = isHTMLElement(offsetParent);\n const documentElement = getDocumentElement(offsetParent);\n const isFixed = strategy === 'fixed';\n const rect = getBoundingClientRect(element, true, isFixed, offsetParent);\n let scroll = {\n scrollLeft: 0,\n scrollTop: 0\n };\n const offsets = createCoords(0);\n\n // If the <body> scrollbar appears on the left (e.g. RTL systems). Use\n // Firefox with layout.scrollbar.side = 3 in about:config to test this.\n function setLeftRTLScrollbarOffset() {\n offsets.x = getWindowScrollBarX(documentElement);\n }\n if (isOffsetParentAnElement || !isOffsetParentAnElement && !isFixed) {\n if (getNodeName(offsetParent) !== 'body' || isOverflowElement(documentElement)) {\n scroll = getNodeScroll(offsetParent);\n }\n if (isOffsetParentAnElement) {\n const offsetRect = getBoundingClientRect(offsetParent, true, isFixed, offsetParent);\n offsets.x = offsetRect.x + offsetParent.clientLeft;\n offsets.y = offsetRect.y + offsetParent.clientTop;\n } else if (documentElement) {\n setLeftRTLScrollbarOffset();\n }\n }\n if (isFixed && !isOffsetParentAnElement && documentElement) {\n setLeftRTLScrollbarOffset();\n }\n const htmlOffset = documentElement && !isOffsetParentAnElement && !isFixed ? getHTMLOffset(documentElement, scroll) : createCoords(0);\n const x = rect.left + scroll.scrollLeft - offsets.x - htmlOffset.x;\n const y = rect.top + scroll.scrollTop - offsets.y - htmlOffset.y;\n return {\n x,\n y,\n width: rect.width,\n height: rect.height\n };\n}\n\nfunction isStaticPositioned(element) {\n return getComputedStyle$1(element).position === 'static';\n}\n\nfunction getTrueOffsetParent(element, polyfill) {\n if (!isHTMLElement(element) || getComputedStyle$1(element).position === 'fixed') {\n return null;\n }\n if (polyfill) {\n return polyfill(element);\n }\n let rawOffsetParent = element.offsetParent;\n\n // Firefox returns the <html> element as the offsetParent if it's non-static,\n // while Chrome and Safari return the <body> element. The <body> element must\n // be used to perform the correct calculations even if the <html> element is\n // non-static.\n if (getDocumentElement(element) === rawOffsetParent) {\n rawOffsetParent = rawOffsetParent.ownerDocument.body;\n }\n return rawOffsetParent;\n}\n\n// Gets the closest ancestor positioned element. Handles some edge cases,\n// such as table ancestors and cross browser bugs.\nfunction getOffsetParent(element, polyfill) {\n const win = getWindow(element);\n if (isTopLayer(element)) {\n return win;\n }\n if (!isHTMLElement(element)) {\n let svgOffsetParent = getParentNode(element);\n while (svgOffsetParent && !isLastTraversableNode(svgOffsetParent)) {\n if (isElement(svgOffsetParent) && !isStaticPositioned(svgOffsetParent)) {\n return svgOffsetParent;\n }\n svgOffsetParent = getParentNode(svgOffsetParent);\n }\n return win;\n }\n let offsetParent = getTrueOffsetParent(element, polyfill);\n while (offsetParent && isTableElement(offsetParent) && isStaticPositioned(offsetParent)) {\n offsetParent = getTrueOffsetParent(offsetParent, polyfill);\n }\n if (offsetParent && isLastTraversableNode(offsetParent) && isStaticPositioned(offsetParent) && !isContainingBlock(offsetParent)) {\n return win;\n }\n return offsetParent || getContainingBlock(element) || win;\n}\n\nconst getElementRects = async function (data) {\n const getOffsetParentFn = this.getOffsetParent || getOffsetParent;\n const getDimensionsFn = this.getDimensions;\n const floatingDimensions = await getDimensionsFn(data.floating);\n return {\n reference: getRectRelativeToOffsetParent(data.reference, await getOffsetParentFn(data.floating), data.strategy),\n floating: {\n x: 0,\n y: 0,\n width: floatingDimensions.width,\n height: floatingDimensions.height\n }\n };\n};\n\nfunction isRTL(element) {\n return getComputedStyle$1(element).direction === 'rtl';\n}\n\nconst platform = {\n convertOffsetParentRelativeRectToViewportRelativeRect,\n getDocumentElement,\n getClippingRect,\n getOffsetParent,\n getElementRects,\n getClientRects,\n getDimensions,\n getScale,\n isElement,\n isRTL\n};\n\nfunction rectsAreEqual(a, b) {\n return a.x === b.x && a.y === b.y && a.width === b.width && a.height === b.height;\n}\n\n// https://samthor.au/2021/observing-dom/\nfunction observeMove(element, onMove) {\n let io = null;\n let timeoutId;\n const root = getDocumentElement(element);\n function cleanup() {\n var _io;\n clearTimeout(timeoutId);\n (_io = io) == null || _io.disconnect();\n io = null;\n }\n function refresh(skip, threshold) {\n if (skip === void 0) {\n skip = false;\n }\n if (threshold === void 0) {\n threshold = 1;\n }\n cleanup();\n const elementRectForRootMargin = element.getBoundingClientRect();\n const {\n left,\n top,\n width,\n height\n } = elementRectForRootMargin;\n if (!skip) {\n onMove();\n }\n if (!width || !height) {\n return;\n }\n const insetTop = floor(top);\n const insetRight = floor(root.clientWidth - (left + width));\n const insetBottom = floor(root.clientHeight - (top + height));\n const insetLeft = floor(left);\n const rootMargin = -insetTop + \"px \" + -insetRight + \"px \" + -insetBottom + \"px \" + -insetLeft + \"px\";\n const options = {\n rootMargin,\n threshold: max(0, min(1, threshold)) || 1\n };\n let isFirstUpdate = true;\n function handleObserve(entries) {\n const ratio = entries[0].intersectionRatio;\n if (ratio !== threshold) {\n if (!isFirstUpdate) {\n return refresh();\n }\n if (!ratio) {\n // If the reference is clipped, the ratio is 0. Throttle the refresh\n // to prevent an infinite loop of updates.\n timeoutId = setTimeout(() => {\n refresh(false, 1e-7);\n }, 1000);\n } else {\n refresh(false, ratio);\n }\n }\n if (ratio === 1 && !rectsAreEqual(elementRectForRootMargin, element.getBoundingClientRect())) {\n // It's possible that even though the ratio is reported as 1, the\n // element is not actually fully within the IntersectionObserver's root\n // area anymore. This can happen under performance constraints. This may\n // be a bug in the browser's IntersectionObserver implementation. To\n // work around this, we compare the element's bounding rect now with\n // what it was at the time we created the IntersectionObserver. If they\n // are not equal then the element moved, so we refresh.\n refresh();\n }\n isFirstUpdate = false;\n }\n\n // Older browsers don't support a `document` as the root and will throw an\n // error.\n try {\n io = new IntersectionObserver(handleObserve, {\n ...options,\n // Handle <iframe>s\n root: root.ownerDocument\n });\n } catch (_e) {\n io = new IntersectionObserver(handleObserve, options);\n }\n io.observe(element);\n }\n refresh(true);\n return cleanup;\n}\n\n/**\n * Automatically updates the position of the floating element when necessary.\n * Should only be called when the floating element is mounted on the DOM or\n * visible on the screen.\n * @returns cleanup function that should be invoked when the floating element is\n * removed from the DOM or hidden from the screen.\n * @see https://floating-ui.com/docs/autoUpdate\n */\nfunction autoUpdate(reference, floating, update, options) {\n if (options === void 0) {\n options = {};\n }\n const {\n ancestorScroll = true,\n ancestorResize = true,\n elementResize = typeof ResizeObserver === 'function',\n layoutShift = typeof IntersectionObserver === 'function',\n animationFrame = false\n } = options;\n const referenceEl = unwrapElement(reference);\n const ancestors = ancestorScroll || ancestorResize ? [...(referenceEl ? getOverflowAncestors(referenceEl) : []), ...getOverflowAncestors(floating)] : [];\n ancestors.forEach(ancestor => {\n ancestorScroll && ancestor.addEventListener('scroll', update, {\n passive: true\n });\n ancestorResize && ancestor.addEventListener('resize', update);\n });\n const cleanupIo = referenceEl && layoutShift ? observeMove(referenceEl, update) : null;\n let reobserveFrame = -1;\n let resizeObserver = null;\n if (elementResize) {\n resizeObserver = new ResizeObserver(_ref => {\n let [firstEntry] = _ref;\n if (firstEntry && firstEntry.target === referenceEl && resizeObserver) {\n // Prevent update loops when using the `size` middleware.\n // https://github.com/floating-ui/floating-ui/issues/1740\n resizeObserver.unobserve(floating);\n cancelAnimationFrame(reobserveFrame);\n reobserveFrame = requestAnimationFrame(() => {\n var _resizeObserver;\n (_resizeObserver = resizeObserver) == null || _resizeObserver.observe(floating);\n });\n }\n update();\n });\n if (referenceEl && !animationFrame) {\n resizeObserver.observe(referenceEl);\n }\n resizeObserver.observe(floating);\n }\n let frameId;\n let prevRefRect = animationFrame ? getBoundingClientRect(reference) : null;\n if (animationFrame) {\n frameLoop();\n }\n function frameLoop() {\n const nextRefRect = getBoundingClientRect(reference);\n if (prevRefRect && !rectsAreEqual(prevRefRect, nextRefRect)) {\n update();\n }\n prevRefRect = nextRefRect;\n frameId = requestAnimationFrame(frameLoop);\n }\n update();\n return () => {\n var _resizeObserver2;\n ancestors.forEach(ancestor => {\n ancestorScroll && ancestor.removeEventListener('scroll', update);\n ancestorResize && ancestor.removeEventListener('resize', update);\n });\n cleanupIo == null || cleanupIo();\n (_resizeObserver2 = resizeObserver) == null || _resizeObserver2.disconnect();\n resizeObserver = null;\n if (animationFrame) {\n cancelAnimationFrame(frameId);\n }\n };\n}\n\n/**\n * Resolves with an object of overflow side offsets that determine how much the\n * element is overflowing a given clipping boundary on each side.\n * - positive = overflowing the boundary by that number of pixels\n * - negative = how many pixels left before it will overflow\n * - 0 = lies flush with the boundary\n * @see https://floating-ui.com/docs/detectOverflow\n */\nconst detectOverflow = detectOverflow$1;\n\n/**\n * Modifies the placement by translating the floating element along the\n * specified axes.\n * A number (shorthand for `mainAxis` or distance), or an axes configuration\n * object may be passed.\n * @see https://floating-ui.com/docs/offset\n */\nconst offset = offset$1;\n\n/**\n * Optimizes the visibility of the floating element by choosing the placement\n * that has the most space available automatically, without needing to specify a\n * preferred placement. Alternative to `flip`.\n * @see https://floating-ui.com/docs/autoPlacement\n */\nconst autoPlacement = autoPlacement$1;\n\n/**\n * Optimizes the visibility of the floating element by shifting it in order to\n * keep it in view when it will overflow the clipping boundary.\n * @see https://floating-ui.com/docs/shift\n */\nconst shift = shift$1;\n\n/**\n * Optimizes the visibility of the floating element by flipping the `placement`\n * in order to keep it in view when the preferred placement(s) will overflow the\n * clipping boundary. Alternative to `autoPlacement`.\n * @see https://floating-ui.com/docs/flip\n */\nconst flip = flip$1;\n\n/**\n * Provides data that allows you to change the size of the floating element —\n * for instance, prevent it from overflowing the clipping boundary or match the\n * width of the reference element.\n * @see https://floating-ui.com/docs/size\n */\nconst size = size$1;\n\n/**\n * Provides data to hide the floating element in applicable situations, such as\n * when it is not in the same clipping context as the reference element.\n * @see https://floating-ui.com/docs/hide\n */\nconst hide = hide$1;\n\n/**\n * Provides data to position an inner element of the floating element so that it\n * appears centered to the reference element.\n * @see https://floating-ui.com/docs/arrow\n */\nconst arrow = arrow$1;\n\n/**\n * Provides improved positioning for inline reference elements that can span\n * over multiple lines, such as hyperlinks or range selections.\n * @see https://floating-ui.com/docs/inline\n */\nconst inline = inline$1;\n\n/**\n * Built-in `limiter` that will stop `shift()` at a certain point.\n */\nconst limitShift = limitShift$1;\n\n/**\n * Computes the `x` and `y` coordinates that will place the floating element\n * next to a given reference element.\n */\nconst computePosition = (reference, floating, options) => {\n // This caches the expensive `getClippingElementAncestors` function so that\n // multiple lifecycle resets re-use the same result. It only lives for a\n // single call. If other functions become expensive, we can add them as well.\n const cache = new Map();\n const mergedOptions = {\n platform,\n ...options\n };\n const platformWithCache = {\n ...mergedOptions.platform,\n _c: cache\n };\n return computePosition$1(reference, floating, {\n ...mergedOptions,\n platform: platformWithCache\n });\n};\n\nexport { arrow, autoPlacement, autoUpdate, computePosition, detectOverflow, flip, hide, inline, limitShift, offset, platform, shift, size };\n","// Starting Point UI Sidebar Module\n\nimport { waitForAnimations } from \"./utils\";\n\nfunction getBreakpoint(): number {\n const value = getComputedStyle(document.documentElement).getPropertyValue(\n \"--breakpoint-sidebar\"\n );\n return parseInt(value, 10) || 1024;\n}\n\nfunction isMobile(): boolean {\n return window.innerWidth < getBreakpoint();\n}\n\nfunction getBackdrop(sidebarPanel: HTMLElement): HTMLElement | null {\n const layout = sidebarPanel.closest(\".sidebar\");\n return layout?.querySelector(\".sidebar-backdrop\") ?? null;\n}\n\nfunction getAnimatableElements(sidebarPanel: HTMLElement): HTMLElement[] {\n const elements: HTMLElement[] = [sidebarPanel];\n const backdrop = getBackdrop(sidebarPanel);\n if (backdrop) {\n elements.push(backdrop);\n }\n return elements;\n}\n\nfunction setOpenClass(elements: HTMLElement[], isOpen: boolean) {\n for (const el of elements) {\n if (isOpen) {\n el.classList.add(\"open\");\n } else {\n el.classList.remove(\"open\");\n }\n }\n}\n\nfunction setDataState(\n elements: HTMLElement[],\n state: \"open\" | \"closed\" | null\n) {\n for (const el of elements) {\n if (state === null) {\n el.removeAttribute(\"data-state\");\n } else {\n el.setAttribute(\"data-state\", state);\n }\n }\n}\n\nexport function open(sidebarPanel: HTMLElement) {\n if (isMobile()) {\n const elements = getAnimatableElements(sidebarPanel);\n setOpenClass(elements, true);\n setDataState(elements, \"open\");\n } else {\n sidebarPanel.classList.remove(\"collapsed\");\n }\n}\n\nexport async function close(sidebarPanel: HTMLElement) {\n if (isMobile()) {\n const elements = getAnimatableElements(sidebarPanel);\n setDataState(elements, \"closed\");\n\n await waitForAnimations(elements);\n\n setOpenClass(elements, false);\n setDataState(elements, null);\n } else {\n sidebarPanel.classList.add(\"collapsed\");\n }\n}\n\nexport function toggle(sidebarPanel: HTMLElement) {\n if (isMobile()) {\n const isOpen = sidebarPanel.classList.contains(\"open\");\n if (isOpen) {\n close(sidebarPanel);\n } else {\n open(sidebarPanel);\n }\n } else {\n const isCollapsed = sidebarPanel.classList.contains(\"collapsed\");\n if (isCollapsed) {\n open(sidebarPanel);\n } else {\n close(sidebarPanel);\n }\n }\n}\n\n// Global click handler\nfunction handleClick(e: MouseEvent) {\n const target = e.target as HTMLElement;\n\n // Handle toggle button clicks\n const toggleBtn = target.closest<HTMLElement>(\"[data-sp-toggle='sidebar']\");\n if (toggleBtn) {\n const selector = toggleBtn.dataset.spTarget;\n if (selector) {\n const sidebarPanel = document.querySelector<HTMLElement>(selector);\n if (sidebarPanel) {\n toggle(sidebarPanel);\n }\n }\n return;\n }\n\n // Handle backdrop clicks (close any open sidebar panel)\n if (target.classList.contains(\"sidebar-backdrop\")) {\n const layout = target.closest(\".sidebar\");\n const openPanel = layout?.querySelector<HTMLElement>(\".sidebar-panel.open\");\n if (openPanel) {\n close(openPanel);\n }\n }\n}\n\n// Global keyboard handler\nfunction handleKeydown(e: KeyboardEvent) {\n if (e.key === \"Escape\") {\n const openPanel = document.querySelector<HTMLElement>(\n \".sidebar-panel.open\"\n );\n if (openPanel) {\n e.preventDefault();\n close(openPanel);\n }\n }\n}\n\n// Handle window resize to clean up mobile state when transitioning to desktop\nfunction handleResize() {\n if (!isMobile()) {\n // Clean up any open mobile sidebars\n const openPanels = document.querySelectorAll<HTMLElement>(\n \".sidebar-panel.open\"\n );\n openPanels.forEach((sidebarPanel) => {\n const elements = getAnimatableElements(sidebarPanel);\n setOpenClass(elements, false);\n setDataState(elements, null);\n });\n }\n}\n\n// Initialize global listeners\nlet initialized = false;\n\n(function init() {\n if (typeof document === \"undefined\" || initialized) return;\n initialized = true;\n\n document.addEventListener(\"click\", handleClick);\n document.addEventListener(\"keydown\", handleKeydown);\n window.addEventListener(\"resize\", handleResize);\n})();\n","// Starting Point UI Tabs Module\n\nimport { findNextEnabled, isDisabled } from \"./utils\";\n\nexport function select(tab: HTMLElement) {\n if (isDisabled(tab)) return;\n\n const tabList = tab.closest(\".tab-list\");\n if (!tabList) return;\n\n // Deselect all tabs in the list\n const tabs = tabList.querySelectorAll<HTMLElement>(\".tab\");\n for (const t of tabs) {\n t.classList.remove(\"active\");\n t.setAttribute(\"aria-selected\", \"false\");\n t.setAttribute(\"tabindex\", \"-1\");\n const selector = t.dataset.spTarget;\n if (selector) {\n document.querySelector(selector)?.classList.remove(\"active\");\n }\n }\n\n // Select the clicked tab\n tab.classList.add(\"active\");\n tab.setAttribute(\"aria-selected\", \"true\");\n tab.setAttribute(\"tabindex\", \"0\");\n\n const selector = tab.dataset.spTarget;\n if (selector) {\n document.querySelector(selector)?.classList.add(\"active\");\n }\n}\n\nfunction handleClick(e: MouseEvent) {\n const target = e.target as HTMLElement;\n const tab = target.closest<HTMLElement>(\"[data-sp-toggle='tab']\");\n if (tab) {\n select(tab);\n }\n}\n\nfunction handleKeydown(e: KeyboardEvent) {\n const target = e.target as HTMLElement;\n if (!target.classList.contains(\"tab\")) return;\n\n const tabList = target.closest(\".tab-list\");\n if (!tabList) return;\n\n const tabs = [...tabList.querySelectorAll<HTMLElement>(\".tab\")];\n const currentIndex = tabs.indexOf(target);\n\n let nextTab: HTMLElement | null = null;\n\n switch (e.key) {\n case \"ArrowLeft\":\n nextTab = findNextEnabled(tabs, currentIndex, -1);\n break;\n case \"ArrowRight\":\n nextTab = findNextEnabled(tabs, currentIndex, 1);\n break;\n case \"Home\":\n nextTab = tabs.find((t) => !isDisabled(t)) ?? null;\n break;\n case \"End\":\n nextTab = [...tabs].reverse().find((t) => !isDisabled(t)) ?? null;\n break;\n }\n\n if (nextTab) {\n e.preventDefault();\n nextTab.focus();\n select(nextTab);\n }\n}\n\n// Initialize global listeners\nlet initialized = false;\n\n(function init() {\n if (typeof document === \"undefined\" || initialized) return;\n initialized = true;\n\n document.addEventListener(\"click\", handleClick);\n document.addEventListener(\"keydown\", handleKeydown);\n})();\n","// Starting Point UI - JavaScript\n\nimport * as accordion from \"./accordion\";\nimport * as collapsible from \"./collapsible\";\nimport * as dialog from \"./dialog\";\nimport * as dropdown from \"./dropdown\";\nimport * as sidebar from \"./sidebar\";\nimport * as tabs from \"./tabs\";\n\nexport { accordion, collapsible, dialog, dropdown, sidebar, tabs };\n\ndeclare global {\n interface Window {\n sp: {\n accordion: typeof accordion;\n collapsible: typeof collapsible;\n dialog: typeof dialog;\n dropdown: typeof dropdown;\n sidebar: typeof sidebar;\n tabs: typeof tabs;\n };\n }\n}\n\nif (typeof window !== \"undefined\") {\n window.sp = { accordion, collapsible, dialog, dropdown, sidebar, tabs };\n}\n"]}
|