@baseline-ui/core 0.31.1 → 0.32.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.mts +10 -11
- package/dist/index.d.ts +10 -11
- package/dist/index.js +97 -97
- package/dist/index.mjs +11 -11
- package/package.json +5 -5
package/dist/index.mjs
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
import { classNames, invariant, filterTruthyValues, getSvgPathFromStroke, getHTMLElement, getTextDimensions, getPlainText, cleanKeyFromGlobImport, getOsSpecificKeyboardShortcutLabel, isUrl } from '@baseline-ui/utils';
|
|
2
|
-
import
|
|
2
|
+
import rt, { useMemo, useCallback, useContext, useEffect, createContext, useLayoutEffect, useState, useRef, useImperativeHandle, forwardRef, useReducer, Fragment as Fragment$1, createElement } from 'react';
|
|
3
3
|
import { useControlledState, clamp } from '@react-stately/utils';
|
|
4
4
|
import { useReducedMotion, useSpring, animated, useTransition, easings, config } from '@react-spring/web';
|
|
5
|
-
import {
|
|
6
|
-
import { useSeparator, useHover, mergeProps, useOption, useLocale, useListBox, ListKeyboardDelegate, useFocusRing, DragPreview, usePress, useTooltip, Overlay, useTooltipTrigger, useOverlayPosition, useNumberField, useNumberFormatter, useSlider, useSliderThumb, VisuallyHidden, useDialog, usePopover, DismissButton, useKeyboard, FocusScope, useSwitch, useSearchField, useMenu, useMenuTrigger, useLink, useDrop, useId, useProgressBar, useTextField, useCheckbox, useTagGroup, useFocusManager, useButton, useSelect, HiddenSelect, useTabList, useTab, useOverlayTrigger, useLabel, useField, useClipboard, useRadioGroup, useFilter, useInteractOutside, useComboBox, useGridListItem, useGridListSelectionCheckbox, useGridList, useDraggableCollection, useDroppableCollection, ListDropTargetDelegate, useDraggableItem, useListBoxSection, useToggleButton, I18nProvider, useMessageFormatter, useModalOverlay, useMenuSection, useMenuItem, useDateFormatter, useTag, useTabPanel, useRadio, useDropIndicator } from 'react-aria';
|
|
5
|
+
import { useSeparator, useHover, mergeProps, useOption, useLocale, useListBox, ListKeyboardDelegate, useFocusRing, DragPreview, usePress, useTooltip, Overlay, useTooltipTrigger, useOverlayPosition, useNumberField, useNumberFormatter, useSlider, useSliderThumb, VisuallyHidden, useDialog, usePopover, DismissButton, useKeyboard, FocusScope, useSwitch, useSearchField, useMenu, useMenuTrigger, useLink, useDrop, useId, useProgressBar, useTextField, useCheckbox, useTagGroup, useFocusManager, useButton, useSelect, HiddenSelect, useTabList, useTab, useOverlayTrigger, useLabel, useField, useClipboard, useRadioGroup, useFilter, useInteractOutside, useComboBox, useFocus, useGridListItem, useGridListSelectionCheckbox, useGridList, useDraggableCollection, useDroppableCollection, ListDropTargetDelegate, useDraggableItem, useListBoxSection, useToggleButton, I18nProvider, useMessageFormatter, useModalOverlay, useMenuSection, useMenuItem, useDateFormatter, useTag, useTabPanel, useRadio, useDropIndicator } from 'react-aria';
|
|
7
6
|
export { useCollator, useDateFormatter, useNumberFormatter } from 'react-aria';
|
|
8
7
|
import { useListState, useTooltipTriggerState, useNumberFieldState, useSliderState, useToggleState, useSearchFieldState, useTreeState, useMenuTriggerState, useSelectState, useTabListState, Item, useOverlayTriggerState, useRadioGroupState, useComboBoxState, useDraggableCollectionState, useDroppableCollectionState, Section } from 'react-stately';
|
|
9
8
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
10
9
|
import { CheckmarkIcon, MoreIcon, QuestionmarkCircleIcon, PauseIcon, PlayIcon, AvatarIcon as AvatarIcon$1, TextIcon as TextIcon$1, HighlightTextIcon, SearchIcon as SearchIcon$1, CaretLeftIcon as CaretLeftIcon$3, CaretRightIcon as CaretRightIcon$3 } from '@baseline-ui/icons/24';
|
|
11
10
|
import { sprinkles, lightTheme, themeVars, queries, darkTheme, layoutSprinkleValues } from '@baseline-ui/tokens';
|
|
11
|
+
import { useGranularLayoutEffect, useGranularEffect } from 'granular-hooks';
|
|
12
12
|
import { CaretDownIcon, MinusIcon, PlusIcon, ChevronRightIcon, XIcon as XIcon$1 } from '@baseline-ui/icons/8';
|
|
13
13
|
import { ReadOnlyIcon, ErrorFilledIcon, CloseIcon, NoneIcon, UndoIcon, RedoIcon, TrashIcon, ArrowDownCircleFilledIcon, XIcon as XIcon$3, WarningFilledIcon, CheckmarkIcon as CheckmarkIcon$3, CheckFilledIcon, ErrorAltFilledIcon, AvatarIcon, InfoFilledIcon, CaretLeftIcon as CaretLeftIcon$1, CaretRightIcon as CaretRightIcon$1 } from '@baseline-ui/icons/16';
|
|
14
14
|
import { FocusableProvider, createFocusManager, useFocusRing as useFocusRing$1 } from '@react-aria/focus';
|
|
15
15
|
import { assignInlineVars } from '@vanilla-extract/dynamic';
|
|
16
|
-
import
|
|
16
|
+
import Wb from 'lodash/isEmpty';
|
|
17
17
|
import { XIcon, TextIcon, BoldIcon, ItalicIcon, UnderlineIcon, AtIcon, CrossCircleFilledIcon, ArrowUpCircleFilledIcon, CheckmarkIcon as CheckmarkIcon$2, CheckFilledIcon as CheckFilledIcon$1, ErrorAltFilledIcon as ErrorAltFilledIcon$1, InfoFilledIcon as InfoFilledIcon$1, WarningFilledIcon as WarningFilledIcon$1, PlusIcon as PlusIcon$1, MinusIcon as MinusIcon$2, LinkIcon, SearchIcon, CaretLeftIcon as CaretLeftIcon$2, CaretRightIcon as CaretRightIcon$2 } from '@baseline-ui/icons/20';
|
|
18
|
-
import
|
|
18
|
+
import Gv, { createPortal } from 'react-dom';
|
|
19
19
|
import { CheckmarkIcon as CheckmarkIcon$1, MinusIcon as MinusIcon$1, XIcon as XIcon$2, CaretLeftIcon, CaretRightIcon } from '@baseline-ui/icons/12';
|
|
20
20
|
import { useInteractionModality, PressResponder } from '@react-aria/interactions';
|
|
21
21
|
import { parseColor, useColorAreaState, useColorFieldState, useColorSliderState } from '@react-stately/color';
|
|
@@ -30,11 +30,11 @@ import { createFontColorPlugin, createFontBackgroundColorPlugin, MARK_COLOR, MAR
|
|
|
30
30
|
import { createParagraphPlugin, ELEMENT_PARAGRAPH } from '@udecode/plate-paragraph';
|
|
31
31
|
import { createLinkPlugin, ELEMENT_LINK, upsertLink, unwrapLink } from '@udecode/plate-link';
|
|
32
32
|
import { withRef, withProps } from '@udecode/cn';
|
|
33
|
-
import * as
|
|
33
|
+
import * as qm from 'dompurify';
|
|
34
34
|
import { jsx as jsx$1 } from 'slate-hyperscript';
|
|
35
35
|
import { useHTMLInputCursorState } from '@udecode/plate-combobox';
|
|
36
36
|
import { useSelected } from 'slate-react';
|
|
37
|
-
import
|
|
37
|
+
import E0 from 'markdown-it';
|
|
38
38
|
import { announce } from '@react-aria/live-announcer';
|
|
39
39
|
import { useActionGroup, useActionGroupItem } from '@react-aria/actiongroup';
|
|
40
40
|
import { ControlledTreeEnvironment, Tree } from 'react-complex-tree';
|
|
@@ -49,8 +49,8 @@ import { Panel, PanelGroup, PanelResizeHandle } from 'react-resizable-panels';
|
|
|
49
49
|
* This notice may not be removed from this file.
|
|
50
50
|
*
|
|
51
51
|
*/
|
|
52
|
-
var xe=typeof document<"u"?ro.useLayoutEffect:()=>{};function ka(e){let o=useRef(null);return xe(()=>{o.current=e;},[e]),useCallback((...t)=>{let r=o.current;return r?.(...t)},[])}function Ia(e){let[o,t]=useState(e),r=useRef(null),a=ka(()=>{if(!r.current)return;let i=r.current.next();if(i.done){r.current=null;return}o===i.value?a():t(i.value);});xe(()=>{r.current&&a();});let n=ka(i=>{r.current=i(o),a();});return [o,n]}var Jt={prefix:String(Math.round(Math.random()*1e10)),current:0},Ai=ro.createContext(Jt),ky=ro.createContext(!1);var Iy=!!(typeof window<"u"&&window.document&&window.document.createElement),wa=new WeakMap;function wy(e=!1){let o=useContext(Ai),t=useRef(null);if(t.current===null&&!e){var r,a;let n=(a=ro.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED)===null||a===void 0||(r=a.ReactCurrentOwner)===null||r===void 0?void 0:r.current;if(n){let i=wa.get(n);i==null?wa.set(n,{id:o.current,state:n.memoizedState}):n.memoizedState!==i.state&&(o.current=i.id,wa.delete(n));}t.current=++o.current;}return t.current}function Ry(e){let o=useContext(Ai);o===Jt&&!Iy&&console.warn("When server rendering, you must wrap your application in an <SSRProvider> to ensure consistent ids are generated between the client and server.");let t=wy(!!e),r=o===Jt&&process.env.NODE_ENV==="test"?"react-aria":`react-aria${o.prefix}`;return e||`${r}-${t}`}function Sy(e){let o=ro.useId(),[t]=useState($i()),r=t||process.env.NODE_ENV==="test"?"react-aria":`react-aria${Jt.prefix}`;return e||`${r}-${o}`}var Sa=typeof ro.useId=="function"?Sy:Ry;function Ty(){return !1}function Ny(){return !0}function Ly(e){return ()=>{}}function $i(){return typeof ro.useSyncExternalStore=="function"?ro.useSyncExternalStore(Ly,Ty,Ny):useContext(ky)}var Fy=!!(typeof window<"u"&&window.document&&window.document.createElement),er=new Map;function or(e){let[o,t]=useState(e),r=useRef(null),a=Sa(o),n=useCallback(i=>{r.current=i;},[]);return Fy&&er.set(a,n),xe(()=>{let i=a;return ()=>{er.delete(i);}},[a]),useEffect(()=>{let i=r.current;i&&(r.current=null,t(i));}),a}function Ta(e,o){if(e===o)return e;let t=er.get(e);if(t)return t(o),o;let r=er.get(o);return r?(r(e),e):o}function Ui(...e){return (...o)=>{for(let t of e)typeof t=="function"&&t(...o);}}var fe=e=>{var o;return (o=e?.ownerDocument)!==null&&o!==void 0?o:document},re=e=>{if(e&&"window"in e&&e.window===e)return e;let o=Te(e);return o instanceof ShadowRoot?o.ownerDocument.defaultView||window:o?.defaultView||window},Te=e=>{if(!e)return document;let o=e.getRootNode?e.getRootNode():document;return e.isConnected?(o):null};function qi(e){var o,t,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var a=e.length;for(o=0;o<a;o++)e[o]&&(t=qi(e[o]))&&(r&&(r+=" "),r+=t);}else for(t in e)e[t]&&(r&&(r+=" "),r+=t);return r}function Hy(){for(var e,o,t=0,r="",a=arguments.length;t<a;t++)(e=arguments[t])&&(o=qi(e))&&(r&&(r+=" "),r+=o);return r}var Ki=Hy;function vo(...e){let o={...e[0]};for(let t=1;t<e.length;t++){let r=e[t];for(let a in r){let n=o[a],i=r[a];typeof n=="function"&&typeof i=="function"&&a[0]==="o"&&a[1]==="n"&&a.charCodeAt(2)>=65&&a.charCodeAt(2)<=90?o[a]=Ui(n,i):(a==="className"||a==="UNSAFE_className")&&typeof n=="string"&&typeof i=="string"?o[a]=Ki(n,i):a==="id"&&n&&i?o.id=Ta(n,i):o[a]=i!==void 0?i:n;}}return o}function M(...e){return e.length===1?e[0]:o=>{for(let t of e)typeof t=="function"?t(o):t!=null&&(t.current=o);}}var Vy=new Set(["id"]),Oy=new Set(["aria-label","aria-labelledby","aria-describedby","aria-details"]),jy=new Set(["href","hrefLang","target","rel","download","ping","referrerPolicy"]),Ay=/^(data-.*)$/;function Na(e,o={}){let{labelable:t,isLink:r,propNames:a}=o,n={};for(let i in e)Object.prototype.hasOwnProperty.call(e,i)&&(Vy.has(i)||t&&Oy.has(i)||r&&jy.has(i)||a?.has(i)||Ay.test(i))&&(n[i]=e[i]);return n}function Gi(e){var o;return typeof window>"u"||window.navigator==null?!1:((o=window.navigator.userAgentData)===null||o===void 0?void 0:o.brands.some(t=>e.test(t.brand)))||e.test(window.navigator.userAgent)}function La(e){var o;return typeof window<"u"&&window.navigator!=null?e.test(((o=window.navigator.userAgentData)===null||o===void 0?void 0:o.platform)||window.navigator.platform):!1}function Wi(){return La(/^Mac/i)}function Xi(){return La(/^iPhone/i)}function Yi(){return La(/^iPad/i)||Wi()&&navigator.maxTouchPoints>1}function Ma(){return Xi()||Yi()}function Ea(){return Gi(/Android/i)}function lt(){return Gi(/Firefox/i)}function ae(e){let o=useRef(null);return useMemo(()=>({get current(){return o.current},set current(t){o.current=t,typeof e=="function"?e(t):e&&(e.current=t);}}),[e])}function Ky(){return typeof window.ResizeObserver<"u"}function Ba(e){let{ref:o,onResize:t}=e;useEffect(()=>{let r=o?.current;if(r)if(Ky()){let a=new window.ResizeObserver(n=>{n.length&&t();});return a.observe(r),()=>{r&&a.unobserve(r);}}else return window.addEventListener("resize",t,!1),()=>{window.removeEventListener("resize",t,!1);}},[t,o]);}function _o(e){return !!e&&"label"in e&&!!e.label}function tr(e){return !!e&&"children"in e&&!!e.children&&"title"in e}function Xy(e){return tr(e)?jsx(Section,{items:e.children,title:e.title,"aria-label":e.title,children:o=>jsx(Item,{textValue:o.label,children:o.label},o.id)},e.id):jsx(Item,{textValue:e.label,children:e.label},e.id)}function te(){return useCallback(e=>Xy(e),[])}function Qi(e,o,t){let{direction:r}=useLocale(),a=useDraggableCollectionState({...e,collection:o.collection,selectionManager:o.selectionManager,isDisabled:!e.enableReorder,getItems:e.getItems||(s=>[...s].map(p=>{let l=o.collection.getItem(p);return invariant(l,"Expected item to be defined."),{"text/plain":l.textValue}}))});useDraggableCollection(e,a,t);let n=useDroppableCollectionState({...e,collection:o.collection,selectionManager:o.selectionManager}),{collectionProps:i}=useDroppableCollection({...e,keyboardDelegate:new ListKeyboardDelegate({collection:o.collection,disabledKeys:o.disabledKeys,ref:t,orientation:e.orientation,layout:e.layout,direction:r}),dropTargetDelegate:new ListDropTargetDelegate(o.collection,t)},n,t);return {collectionProps:i,dragState:a,dropState:n}}function a1(e,o){if(typeof e!="object"||!e)return e;var t=e[Symbol.toPrimitive];if(t!==void 0){var r=t.call(e,o||"default");if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return (o==="string"?String:Number)(e)}function n1(e){var o=a1(e,"string");return typeof o=="symbol"?o:String(o)}function i1(e,o,t){return o=n1(o),o in e?Object.defineProperty(e,o,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[o]=t,e}function Ji(e,o){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);o&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),t.push.apply(t,r);}return t}function es(e){for(var o=1;o<arguments.length;o++){var t=arguments[o]!=null?arguments[o]:{};o%2?Ji(Object(t),!0).forEach(function(r){i1(e,r,t[r]);}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Ji(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r));});}return e}function os(e,o){var t={};for(var r in e)t[r]=o(e[r],r);return t}var s1=(e,o,t)=>{for(var r of Object.keys(e)){var a;if(e[r]!==((a=o[r])!==null&&a!==void 0?a:t[r]))return !1}return !0},z=e=>{var o=t=>{var r=e.defaultClassName,a=es(es({},e.defaultVariants),t);for(var n in a){var i,s=(i=a[n])!==null&&i!==void 0?i:e.defaultVariants[n];if(s!=null){var p=s;typeof p=="boolean"&&(p=p===!0?"true":"false");var l=e.variantClassNames[n][p];l&&(r+=" "+l);}}for(var[c,u]of e.compoundVariants)s1(c,a,e.defaultVariants)&&(r+=" "+u);return r};return o.variants=()=>Object.keys(e.variantClassNames),o.classNames={get base(){return e.defaultClassName.split(" ")[0]},get variants(){return os(e.variantClassNames,t=>os(t,r=>r.split(" ")[0]))}},o};var ts=z({defaultClassName:"_6n12k9b _1yep5z6lh _1yep5z6lg _1yep5z6i1 _1yep5z6kz",variantClassNames:{isDropTarget:{true:"_1yep5z613h"},orientation:{vertical:"_1yep5z6174",horizontal:"_1yep5z6175"}},defaultVariants:{},compoundVariants:[]}),rs="_6n12k98 _1yep5z6lf _1yep5z6ih _1yep5z6ii _1yep5z6ij",as=z({defaultClassName:"_6n12k99 _1yep5z6ev _1yep5z6da _1yep5z6dv",variantClassNames:{isDisabled:{true:"_1yep5z6ey"}},defaultVariants:{},compoundVariants:[]}),ns=z({defaultClassName:"_6n12k91 _1yep5z63r _1yep5z63s _1yep5z63t _1yep5z61f _1yep5z61g _1yep5z61h _1yep5z6ih _1yep5z6ii _1yep5z6ij _1yep5z6iq _1yep5z6ir _1yep5z6is _1yep5z6j8 _1yep5z6j9 _1yep5z6ja _1yep5z6k8 _1yep5z6k9 _1yep5z6ka _1yep5z69l _1yep5z69m _1yep5z69n _1yep5z6dy _1yep5z6eu _1yep5z6kz _1yep5z6l2 _1yep5z6lf _1yep5z6le _1yep5z6lc _1yep5z6l9",variantClassNames:{isSelected:{},isFocused:{true:"_1yep5z613h _1yep5z617a _1yep5z6178 _1yep5z617b _1yep5z613u _1yep5z613v _1yep5z613w"},isHovered:{true:"_1yep5z611u",false:"_1yep5z611t"},isFirstChild:{true:"_6n12k95"},isLastChild:{true:"_6n12k96"},isDisabled:{true:"z9nup83 _1yep5z610q"}},defaultVariants:{},compoundVariants:[]}),is="_6n12k9f _1yep5z63 _1yep5z64 _1yep5z65 _1yep5z62f _1yep5z62g _1yep5z62h _1yep5z69l _1yep5z69m _1yep5z69n _1yep5z6ih _1yep5z6ii _1yep5z6ij _1yep5z6j8 _1yep5z6j9 _1yep5z6ja",ss="_6n12k90";var ls=z({defaultClassName:"gukncs0",variantClassNames:{isVertical:{true:"gukncs1"},isSecondary:{true:"gukncs2"}},defaultVariants:{},compoundVariants:[]});var O=ro.forwardRef(({className:e,style:o,variant:t="primary",orientation:r="horizontal",UNSAFE_omitRole:a,elementType:n="div","data-block-id":i,"data-block-class":s,...p},l)=>{let{separatorProps:c}=useSeparator({...p,orientation:r,elementType:n});return jsx(n,{...c,className:classNames(ls({isVertical:r==="vertical",isSecondary:t==="secondary"}),"BaselineUI-Separator",e),"data-orientation":r,"data-block-id":i,"data-block-class":s,style:o,role:a?void 0:c.role,ref:l})});O.displayName="Separator";function y1(e){return sprinkles.properties.has(e)}var L=ro.forwardRef(({elementType:e="div",children:o,...t},r)=>{let a=e,{sprinkleProps:n,domProps:i}=useMemo(()=>{let s={},p={};for(let l in t)y1(l)?s[l]=t[l]:p[l]=t[l];return {sprinkleProps:s,domProps:p}},[t]);return jsx(a,{...i,className:classNames(sprinkles(n),"BaselineUI-Box",i.className),ref:r,children:o})});L.displayName="Box";var ct=ro.forwardRef(({item:e,isDisabled:o,isFocusVisible:t,isSelected:r,liProps:a,showSelectedIcon:n,description:i,descriptionProps:s,labelProps:p,isFocused:l,isPressed:c,_state:u},m)=>{invariant(e.value&&_o(e.value),"Item cannot be a section");let{icon:d,label:f}=e.value,{hoverProps:y,isHovered:b}=useHover({isDisabled:o}),v=filterTruthyValues({"data-selected":r,"data-disabled":o,"data-focused":l,"data-hovered":b,"data-pressed":c,"data-focus-visible":t,"data-selection-mode":u.selectionManager.selectionMode});return jsxs("li",{...mergeProps(a,y,v),className:classNames(ns({isHovered:b,isFocused:t,isFirstChild:u.collection.getFirstKey()===e.key,isLastChild:u.collection.getLastKey()===e.key,isDisabled:o}),a.className,"BaselineUI-ListBox-Option"),style:a.style,ref:m,children:[jsxs(L,{display:"flex",alignItems:"center",gap:"lg",children:[n?jsx("span",{"aria-hidden":!0,style:{height:24,width:24},children:r?jsx(CheckmarkIcon,{size:24}):null}):null,d?jsx(d,{size:24}):null,jsx("span",{...p,children:f})]}),i?jsx("span",{className:as({isDisabled:o}),...s,children:i}):null]})});ct.displayName="DefaultRenderOption";var Ha=({dropState:e,orientation:o="vertical",dropIndicatorStyle:t,dropIndicatorClassName:r,renderDropIndicator:a=({isDropTarget:i,isHidden:s,dropIndicatorProps:p,orientation:l},c)=>s?null:jsx("li",{...p,ref:c,"data-drop-target":i,className:classNames(ts({isDropTarget:i,orientation:l}),"BaselineUI-DropIndicator",r),style:t}),...n})=>{let i=ro.useRef(null),{dropIndicatorProps:s,isHidden:p,isDropTarget:l}=useDropIndicator(n,e,i);return a({dropIndicatorProps:{...s,role:"option"},isHidden:p,isDropTarget:l,orientation:o},i)};var us=({item:e,children:o,state:t,dragState:r,...a})=>{let{dragProps:n}=useDraggableItem({key:e.key},r);return jsxs(Fragment,{children:[jsx(Ha,{target:{type:"item",key:e.key,dropPosition:"before"},...a}),o(n),t.collection.getKeyAfter(e.key)==null&&jsx(Ha,{target:{type:"item",key:e.key,dropPosition:"after"},...a})]})};us.displayName="DraggableListOption";var dt=ro.forwardRef(({item:e,renderOption:o=(m,d,f)=>jsx(ct,{item:m,liProps:d.optionProps,...d,ref:f}),showSelectedIcon:t,state:r,dragState:a,dropState:n,orientation:i,dropIndicatorStyle:s,dropIndicatorClassName:p,optionStyle:l,optionClassName:c},u)=>{let m=ro.useRef(null),d=useOption({key:e.key},r,m),{value:f}=e;invariant(f&&_o(f),"ListSection should not be passed to ListOption");let y={style:typeof l=="function"?l(f):l,className:typeof c=="function"?c(f):c};return a&&n?jsx(us,{orientation:i,state:r,item:e,dropState:n,dragState:a,dropIndicatorStyle:s,dropIndicatorClassName:p,children:b=>o(e,{...d,showSelectedIcon:t,_state:r,optionProps:{...mergeProps(d.optionProps,b),...y}},M(m,u))}):o(e,{...d,showSelectedIcon:t,_state:r,optionProps:{...d.optionProps,...y}},M(m,u))});dt.displayName="Option";var bs=({section:e,state:o,sectionClassName:t,sectionStyle:r,showSectionHeader:a,renderSectionHeader:n,withSectionHeaderPadding:i=!1,...s})=>{let p=ro.useRef(null),{itemProps:l,groupProps:c,headingProps:u}=useListBoxSection({heading:a?n?.(e,p)||e.rendered:void 0,"aria-label":e["aria-label"]}),m=o.collection.getChildren?.(e.key);invariant(m,"children must be defined");let{value:d}=e;invariant(d&&tr(d),"section must be a ListSection");let f=typeof r=="function"?r(d):r,y=typeof t=="function"?t(d):t;return jsxs(Fragment,{children:[e.key===o.collection.getFirstKey()?null:jsx(O,{UNSAFE_omitRole:!0}),jsxs("li",{...l,style:{...l.style,...f},className:classNames(ss,y,"BaselineUI-ListBox-Section"),children:[e.rendered&&a?n?.(e,p)||jsx(L,{...u,className:classNames("BaselineUI-ListBox-SectionHeader",is),ref:p,paddingX:"lg",typography:"label.md.medium",color:"text.primary",paddingInlineStart:i?"5xl":"lg",paddingInlineEnd:"lg",children:e.rendered}):null,jsx("ul",{...c,children:[...m].map(b=>jsx(dt,{item:b,state:o,...s},b.key))})]})]})};var ao=ro.createContext(null),Va=ro.forwardRef(({className:e,layout:o="stack",orientation:t="vertical",showSelectedIcon:r=!0,style:a,renderOption:n,enableReorder:i=!1,"data-block-id":s,"data-block-class":p,renderDragPreview:l,onReorder:c,state:u,listBoxHandle:m,...d},f)=>{let y=ro.useRef(null),{direction:b}=useLocale(),v=ro.useRef(null),{listBoxProps:_}=useListBox({...d,shouldSelectOnPressUp:i,keyboardDelegate:new ListKeyboardDelegate({collection:u.collection,ref:v,layout:o,orientation:t,direction:b,disabledKeys:u.disabledKeys})},u,v),g=useCallback((P,C)=>{let E=v.current?.querySelector(`[data-key="${P}"][role="option"]`);E&&E?.scrollIntoView({block:"nearest",inline:"nearest",...C});},[]);useImperativeHandle(m,()=>({scrollIntoView:g}),[g]),useGranularEffect(()=>{let P=Te(v.current)instanceof ShadowRoot,C=u.selectionManager.focusedKey;P&&C&&g(C);},[u.selectionManager.focusedKey],[g]);let h=useReducedMotion(),R=useCallback(P=>{let C=fe(v.current);c&&(!h&&"startViewTransition"in C?C.startViewTransition(()=>{c(P);}):c(P));},[c,h]),{collectionProps:x,dragState:I,dropState:k}=Qi({...d,onReorder:R,layout:o,orientation:t,enableReorder:i,preview:y},u,v),{isFocusVisible:S,isFocused:N,focusProps:w}=useFocusRing(),T=filterTruthyValues({"data-block-id":s,"data-block-class":p,"data-layout":o,"data-empty":u.collection.size===0,"data-focused":N,"data-focus-visible":S,"data-orientation":t});return jsxs("ul",{...mergeProps(_,w,T,x),className:classNames(rs,"BaselineUI-ListBox",e),style:a,ref:M(f,v),children:[[...u.collection].map(P=>{let C={key:P.key,state:u,dragState:I,dropState:k,renderOption:n,renderDropIndicator:d.renderDropIndicator,renderSectionHeader:d.renderSectionHeader,showSelectedIcon:r,orientation:t,dropIndicatorStyle:d.dropIndicatorStyle,dropIndicatorClassName:d.dropIndicatorClassName,optionStyle:d.optionStyle,optionClassName:d.optionClassName,sectionClassName:d.sectionClassName,sectionStyle:d.sectionStyle,showSectionHeader:d.showSectionHeader,withSectionHeaderPadding:d.withSectionHeaderPadding};return P.type==="section"?jsx(bs,{...C,section:P}):jsx(dt,{...C,item:P})}),l?jsx(DragPreview,{ref:y,children:l}):null]})});Va.displayName="ListBoxCore";var vs=ro.forwardRef((e,o)=>{let t=te(),r=useListState({...e,children:t});return jsx(Va,{...e,ref:o,state:r})});vs.displayName="ListBoxStandalone";var le=ro.forwardRef((e,o)=>{let t=useContext(ao);return useEffect(()=>{if(!e.items&&!t)throw new Error("ListBox: You must provide a `state` or `items` prop to render the listbox.")},[e.items,t]),t?jsx(Va,{...e,ref:o,state:t}):jsx(vs,{...e,ref:o})});le.displayName="ListBox";var nr="uf19bsf _1yep5z6kz",_s=z({defaultClassName:"uf19bs0 _1yep5z6ai _1yep5z6aj _1yep5z6ak _1yep5z6b6 _1yep5z6b7 _1yep5z6b8 _1yep5z6bu _1yep5z6bv _1yep5z6bw _1yep5z6ci _1yep5z6cj _1yep5z6ck _1yep5z6f5 _1yep5z6le _1yep5z6ik _1yep5z6il _1yep5z6im _1yep5z6j8 _1yep5z6j9 _1yep5z6ja _1yep5z6k2 _1yep5z6k3 _1yep5z6k4 _1yep5z6l9",variantClassNames:{size:{xxs:"uf19bs1",xs:"uf19bs2",sm:"uf19bs3",md:"uf19bs4",lg:"uf19bs5 _1yep5z6wd _1yep5z6we _1yep5z6wf _1yep5z6x1 _1yep5z6x2 _1yep5z6x3 _1yep5z6xp _1yep5z6xq _1yep5z6xr _1yep5z6yd _1yep5z6ye _1yep5z6yf"},isHovered:{true:"uf19bs6"},isDisabled:{true:"uf19bs7 _1yep5z610z"},isFocusVisible:{true:"uf19bs8"},variant:{primary:"uf19bs9",secondary:"uf19bsa",tertiary:"uf19bsb",ghost:"uf19bsc",toolbar:"uf19bsd _1yep5z6wv _1yep5z6ww _1yep5z6wx _1yep5z6xj _1yep5z6xk _1yep5z6xl _1yep5z6y7 _1yep5z6y8 _1yep5z6y9 _1yep5z6yv _1yep5z6yw _1yep5z6yx",popover:"uf19bse _1yep5z6pg _1yep5z6ph _1yep5z6pi _1yep5z6n4 _1yep5z6n5 _1yep5z6n6 _1yep5z6lv _1yep5z6lw _1yep5z6lx _1yep5z6o7 _1yep5z6o8 _1yep5z6o9 _1yep5z6vg _1yep5z6vh _1yep5z6vi"}},defaultVariants:{},compoundVariants:[[{variant:"toolbar",isHovered:!0,isFocusVisible:!1},"_1yep5z61nn"],[{variant:"primary",isHovered:!0,isFocusVisible:!1},"_1yep5z61nn"],[{variant:"secondary",isHovered:!0,isFocusVisible:!1},"_1yep5z61mq"],[{variant:"tertiary",isHovered:!0,isFocusVisible:!1},"_1yep5z61mp _1yep5z61nn"],[{variant:"ghost",isHovered:!0,isFocusVisible:!1},"_1yep5z61mv"],[{variant:"popover",isHovered:!0,isFocusVisible:!1},"_1yep5z61pc _1yep5z61t0 _1yep5z61t4 _1yep5z61t1"],[{variant:"ghost",isDisabled:!1},"_1yep5z61mu"],[{variant:"popover",size:"lg"},"_1yep5z61i2 _1yep5z61i3 _1yep5z61i4 _1yep5z61iq _1yep5z61ir _1yep5z61is _1yep5z61je _1yep5z61jf _1yep5z61jg _1yep5z61k2 _1yep5z61k3 _1yep5z61k4"]]});var ut=ro.createContext({state:null,overlayTriggerAria:{triggerProps:{},overlayProps:{}},triggerRef:void 0}),Ne=({children:e,...o})=>{let t=ro.useRef(null),r=useOverlayTriggerState(o),a=useOverlayTrigger(o,r),n=useMemo(()=>({state:r,overlayTriggerAria:a,triggerRef:t}),[r,a]);return jsx(ut.Provider,{value:n,children:e})};var hs={bottom:"_1gzftth2",top:"_1gzftth3",right:"_1gzftth4",left:"_1gzftth5"},xs="_1gzftth1 _1yep5z6ih _1yep5z6ii _1yep5z6ij",Cs="_1gzftth6",Ps="_1gzftth8",ks="_1gzftth7",Is="var(--_1gzftth0)";function vT(e){return e.closest(".BaselineUI-Portal")||e.closest(".BaselineUI-Popover-Content")}function ws(e){return typeof e=="object"&&typeof e.left=="number"&&typeof e.top=="number"&&(typeof e.width=="number"||e.width===void 0)&&(typeof e.height=="number"||e.height===void 0)}var ir=ro.createContext({isSelected:!1,ref:void 0}),Le=({children:e,anchorRect:o})=>{let{state:t,overlayTriggerAria:r,triggerRef:a}=useContext(ut);invariant(t,"PopoverTrigger must be used within a Popover");let{triggerProps:n}=r,i=useMemo(()=>({...n,isSelected:t.isOpen,ref:a}),[n,t.isOpen,a]);return invariant(!o&&e||o&&!e,"Either one of anchorRect or children has to be provided."),invariant(!o||ws(o),"If provided, the anchorRect prop must be an object with left and top number values, and optionally width and height."),jsx(ir.Provider,{value:i,children:o?jsx("button",{className:classNames(Ps,"BaselineUI-PopoverTrigger-Hidden"),style:o,ref:a,tabIndex:-1},JSON.stringify(o)):e})};function sr({tooltip:e,...o},t){let[r,a]=useState(o["aria-label"]||""),n=o["aria-labelledby"];return useEffect(()=>{if(n){let p=fe(t.current).querySelector(`#${n}`);p&&a(p.textContent||"");}},[n,t]),{tooltipProps:useMemo(()=>{let s={size:"sm",variant:"inverse",text:r,includeArrow:!1,placement:"bottom start",offset:4};if(typeof e=="object")return {...s,...e};if(e)return s},[r,e])}}var lr=e=>{let o=ro.useRef(null),{ref:t,...r}=useContext(ir)||{},{buttonProps:a,isPressed:n}=useButton({...e,...r},o),{isFocusVisible:i,isFocused:s,focusProps:p}=useFocusRing(),{hoverProps:l,isHovered:c}=useHover({isDisabled:e.isDisabled});return {buttonProps:vo(a,p,l),isPressed:n,ref:M(o,t||null),isFocusVisible:i,isFocused:s,isHovered:c,uiStateOptions:{isHovered:c,isFocused:s,isPressed:n,isDisabled:e.isDisabled,isFocusVisible:i}}},pr=(e,o)=>{let t=ro.useRef(null),{ref:r,...a}=useContext(ir)||{},{buttonProps:n,isPressed:i}=useToggleButton({...e,...a},o,t);(n.role==="radio"||n.role==="checkbox")&&(n["aria-pressed"]=void 0);let{isFocusVisible:s,isFocused:p,focusProps:l}=useFocusRing(),{hoverProps:c,isHovered:u}=useHover({isDisabled:e.isDisabled});return {buttonProps:vo(n,l,c),isPressed:i,ref:M(t,r||null),isFocusVisible:s,isFocused:p,isHovered:u,uiStateOptions:{isHovered:u,isFocused:p,isPressed:i,isDisabled:e.isDisabled,isFocusVisible:s,isSelected:o.isSelected}}};var cr=z({defaultClassName:"oom8bs0 _1yep5z6ai _1yep5z6aj _1yep5z6ak _1yep5z6b6 _1yep5z6b7 _1yep5z6b8 _1yep5z6bu _1yep5z6bv _1yep5z6bw _1yep5z6ci _1yep5z6cj _1yep5z6ck _1yep5z6ik _1yep5z6il _1yep5z6im _1yep5z69i _1yep5z69j _1yep5z69k _1yep5z6j8 _1yep5z6j9 _1yep5z6ja _1yep5z6le _1yep5z6lf _1yep5z6l9 _1yep5z6dy _1yep5z6kz",variantClassNames:{variant:{primary:"oom8bs1",secondary:"oom8bs2",tertiary:"oom8bs3",ghost:"oom8bs4",popover:"oom8bs5",toolbar:"oom8bs6",success:"oom8bs7",warning:"oom8bs8",error:"oom8bs9"},isDisabled:{true:"oom8bsa"},isFocusVisible:{true:"oom8bsb"},isHovered:{true:"oom8bsc"},size:{sm:"oom8bsd",md:"oom8bse",lg:"oom8bsf"}},defaultVariants:{},compoundVariants:[[{variant:"primary",isHovered:!0},"oom8bsg"],[{variant:"secondary",isHovered:!0},"oom8bsh"],[{variant:"tertiary",isHovered:!0},"oom8bsi"],[{variant:"popover",isHovered:!0},"oom8bsj"],[{variant:"ghost",isHovered:!0},"oom8bsk"],[{variant:"success",isHovered:!0},"oom8bsl"],[{variant:"warning",isHovered:!0},"oom8bsm"],[{variant:"error",isHovered:!0},"oom8bsn"],[{variant:"primary",isFocusVisible:!0},"oom8bso"],[{variant:"tertiary",isFocusVisible:!0},"oom8bsp"],[{variant:"success",isFocusVisible:!0},"oom8bsq"],[{variant:"warning",isFocusVisible:!0},"oom8bsr"],[{variant:"error",isFocusVisible:!0},"oom8bss"]]}),ja=z({defaultClassName:"oom8bst _1yep5z6kz",variantClassNames:{isDisabled:{true:"oom8bsu"},isFocusVisible:{true:"oom8bsv"},isHovered:{true:"_1yep5z610u"},variant:{primary:"_1yep5z6111",secondary:"_1yep5z610x",tertiary:"_1yep5z6112",ghost:"_1yep5z6112",popover:"_1yep5z610x",toolbar:"_1yep5z610x",success:"_1yep5z6110",warning:"_1yep5z6110",error:"_1yep5z6110"}},defaultVariants:{},compoundVariants:[[{variant:"tertiary",isHovered:!0},"_1yep5z61mt"],[{variant:"ghost",isHovered:!0},"_1yep5z61mv"],[{variant:"tertiary",isFocusVisible:!0},"_1yep5z61mt"],[{variant:"secondary",isDisabled:!0},"_1yep5z61mr"],[{variant:"tertiary",isDisabled:!0},"_1yep5z61mr"],[{variant:"ghost",isDisabled:!0},"_1yep5z61mr"],[{variant:"popover",isDisabled:!0},"_1yep5z61mr"],[{variant:"toolbar",isDisabled:!0},"_1yep5z61mr"]]});var bb={sm:16,md:20,lg:24},U=ro.forwardRef(({label:e,style:o,className:t,iconStart:r,iconEnd:a,variant:n="primary",elementType:i="button",isDisabled:s,size:p="sm","data-block-id":l,"data-block-class":c,...u},m)=>{let{buttonProps:d,isPressed:f,ref:y,isFocusVisible:b,isFocused:v,isHovered:_,uiStateOptions:g}=lr({...u,elementType:i,isDisabled:s}),h=bb[p],R=filterTruthyValues({"data-block-id":l,"data-block-class":c,"data-disabled":s,"data-focused":v,"data-focus-visible":b,"data-hovered":_,"data-pressed":f});return jsxs(i,{...mergeProps(d,R),className:classNames(cr({isDisabled:!!s,isFocusVisible:b,isHovered:_,variant:n,size:p}),"BaselineUI-ActionButton",typeof t=="function"?t(g):t),style:typeof o=="function"?o(g):o,ref:M(m,y),children:[!!r&&jsx(r,{size:h,className:ja({variant:n,isDisabled:s,isFocusVisible:b,isHovered:_})}),e,!!a&&jsx(a,{size:h,className:ja({variant:n,isDisabled:s,isFocusVisible:b,isHovered:_})}),n==="popover"&&jsx(CaretDownIcon,{size:8,className:nr})]})});U.displayName="ActionButton";var Ms=ro.forwardRef(({className:e,style:o,node:t,"data-block-id":r,"data-block-class":a,...n},i)=>{let s=ro.useRef(null);ro.useEffect(()=>{let c=s.current;return c?.append(t),()=>{c?.contains(t)&&t.remove();}},[t]);let{pressProps:p,isPressed:l}=usePress(n);return jsx("div",{...p,className:e,style:o,"data-block-id":r,"data-block-class":a,"data-pressed":l,"data-testid":"dom-node-renderer",ref:M(i,s)})});Ms.displayName="DomNodeRenderer";var Es="_14uvjig0 z9nup81",Bs="_14uvjig7",Ds="_14uvjig3",Fs=z({defaultClassName:"_14uvjig4",variantClassNames:{isDisabled:{true:"_14uvjig5"},hasNumberInput:{false:"_14uvjig6"}},defaultVariants:{},compoundVariants:[]}),Hs=z({defaultClassName:"_14uvjige _14uvjig1",variantClassNames:{active:{true:"_14uvjigf _14uvjig2"},isDisabled:{true:"_14uvjigg"},isReadOnly:{true:"_14uvjigh"},isFocusVisible:{true:"_14uvjigi _14uvjig2"},isHovered:{true:"_14uvjigj _14uvjig2"}},defaultVariants:{},compoundVariants:[]}),Vs="_14uvjig8",Os=z({defaultClassName:"_14uvjig9 _14uvjig1",variantClassNames:{active:{true:"_14uvjig2"},isFocusVisible:{true:"_14uvjigb _14uvjig2"},isDisabled:{true:"_14uvjigc"},isHovered:{true:"_14uvjig2"}},defaultVariants:{},compoundVariants:[]});var xo=z({defaultClassName:"nrh1ehx",variantClassNames:{isDisabled:{true:"nrh1ehy"},hasError:{true:"nrh1ehz"},labelPosition:{start:"nrh1eh10",top:"nrh1eh11"}},defaultVariants:{},compoundVariants:[]}),dr=z({defaultClassName:"nrh1eho",variantClassNames:{isDisabled:{true:"nrh1ehp"},labelPosition:{top:"nrh1ehq",start:"nrh1ehr"}},defaultVariants:{},compoundVariants:[]}),Co=z({defaultClassName:"nrh1ehs",variantClassNames:{validationState:{valid:"nrh1eht",error:"nrh1ehu",warning:"nrh1ehv"},isReadOnly:{true:"nrh1ehw"}},defaultVariants:{},compoundVariants:[]}),Ve="nrh1eh3",Oe=z({defaultClassName:"nrh1eh4",variantClassNames:{labelPosition:{top:"nrh1eh5",start:"nrh1eh6"},hasMessage:{true:"nrh1eh7"}},defaultVariants:{},compoundVariants:[[{labelPosition:"start",hasMessage:!1},"nrh1eh8"]]}),je=z({defaultClassName:"nrh1eh0",variantClassNames:{labelPosition:{top:"z9nup81",start:"nrh1eh2 z9nup82"}},defaultVariants:{},compoundVariants:[]}),Po=z({defaultClassName:"nrh1eh9 z9nup82",variantClassNames:{validationState:{valid:"nrh1eha",error:"nrh1ehb",warning:"nrh1ehc"},isHovered:{true:"nrh1ehd"},isFocused:{true:"nrh1ehe"},isDisabled:{true:"nrh1ehf"},variant:{primary:"nrh1ehg",ghost:"nrh1ehh"},isReadOnly:{true:"nrh1ehi"}},defaultVariants:{},compoundVariants:[[{variant:"ghost",isHovered:!0,isFocused:!1,validationState:"valid"},"nrh1ehj"],[{variant:"ghost",isFocused:!1,isHovered:!1,validationState:"valid"},"nrh1ehk"],[{isHovered:!0,validationState:"valid",isDisabled:!1,isReadOnly:!1,isFocused:!1,variant:"primary"},"nrh1ehl"],[{isHovered:!0,validationState:"warning",isDisabled:!1,isReadOnly:!1,isFocused:!1},"nrh1ehm"],[{isReadOnly:!0,variant:"primary",isFocused:!1},"nrh1ehn"]]});function Ie({description:e,errorMessageProps:o,descriptionProps:t,warningMessage:r,errorMessage:a,labelPosition:n,isDisabled:i}){return e?jsx("div",{...t,className:xo({isDisabled:i,labelPosition:n}),children:e}):a?jsx("div",{...o,className:xo({hasError:!0,labelPosition:n}),children:a}):r?jsx("div",{className:xo({isDisabled:i,labelPosition:n}),children:r}):null}var js=z({defaultClassName:"_1lnwne1 z9nup82",variantClassNames:{isHoveredOrFocused:{true:"_1lnwne2"},isInteractive:{false:"z9nup83"}},defaultVariants:{},compoundVariants:[[{isHoveredOrFocused:!0,isInteractive:!0},"_1lnwne4"]]}),As="_1lnwne0";var $s=z({defaultClassName:"_1jwycy80",variantClassNames:{placement:{bottom:"_1jwycy81",left:"_1jwycy82",right:"_1jwycy83",top:"_1jwycy84"},variant:{default:"_1jwycy85",inverse:"_1jwycy86"}},defaultVariants:{},compoundVariants:[]}),Us=z({defaultClassName:"_1jwycy87 _1yep5z6al _1yep5z6am _1yep5z6an _1yep5z6b9 _1yep5z6ba _1yep5z6bb _1yep5z6bx _1yep5z6by _1yep5z6bz _1yep5z6cl _1yep5z6cm _1yep5z6cn",variantClassNames:{size:{md:"_1yep5z63u _1yep5z63v _1yep5z63w _1yep5z61i _1yep5z61j _1yep5z61k _1yep5z66 _1yep5z67 _1yep5z68 _1yep5z62i _1yep5z62j _1yep5z62k _1yep5z6e7",sm:"_1yep5z63o _1yep5z63p _1yep5z63q _1yep5z61c _1yep5z61d _1yep5z61e _1yep5z63 _1yep5z64 _1yep5z65 _1yep5z62f _1yep5z62g _1yep5z62h _1yep5z6dv"},variant:{default:"_1yep5z6g9 _1yep5z6ez",inverse:"_1yep5z6d7 _1yep5z6g1 _1yep5z6eu"}},defaultVariants:{},compoundVariants:[]});var qa=ro.forwardRef(({children:e,state:o,overlayProps:t,arrowProps:r,placement:a,variant:n,size:i,tooltipProps:s,includeArrow:p},l)=>{let{tooltipProps:c}=useTooltip({isOpen:o.isOpen},o),u=useMemo(()=>{switch(a){case"top":return {x:0,y:4};case"bottom":return {x:0,y:-4};case"left":return {x:4,y:0};case"right":return {x:-4,y:0};default:return {x:0,y:0}}},[a]),m=useReducedMotion(),[d]=useSpring(()=>({from:{opacity:0,transform:`translate(${u.x}px, ${u.y}px)`},to:{opacity:1,transform:"translate(0, 0)"},immediate:!!m})),f=a==="center"?"bottom":a;return jsxs(animated.span,{...t,style:{...d,...t.style},ref:l,"data-placement":f,children:[p?jsx("div",{className:$s({placement:f,variant:n}),...r}):null,jsx("div",{...mergeProps(c,s),className:Us({variant:n,size:i}),children:e})]})});qa.displayName="TooltipContent";function Gs({ref:e,onIntersect:o,isDisabled:t,threshold:r,rootMargin:a,root:n}){let i=ro.useRef(null);useEffect(()=>{if(t){i.current?.disconnect(),i.current=null;return}i.current=new IntersectionObserver(([s])=>{o(s);},{root:n?.current,rootMargin:a,threshold:r});},[o,t,n,a,r]),useEffect(()=>{let{current:s}=i;return e.current&&s?.observe(e.current),()=>s?.disconnect()},[e]);}function Ws({ref:e,onResize:o,isDisabled:t}){let r=ro.useRef(null),[a,n]=ro.useState();return ro.useEffect(()=>{if(t){r.current?.disconnect(),r.current=null;return}r.current=new ResizeObserver(([i])=>{n(i.contentRect),o?.(i);});},[o,t,n]),ro.useEffect(()=>{let{current:i}=r;return e.current&&i?.observe(e.current),()=>i?.disconnect()},[e]),{size:a}}function ko({src:e,alt:o}){let[t,r]=useState(!1),[a,n]=useState(!1),[i,s]=useState(!1),p=()=>{r(!0),s(!1);},l=()=>{n(!0),s(!1);};return useEffect(()=>{if(!e)return;s(!0);let c=new Image;return c.src=e,c.addEventListener("load",p),c.addEventListener("error",l),()=>{c.removeEventListener("load",p),c.removeEventListener("error",l);}},[e]),{isLoaded:t,hasError:a,isLoading:i,imgProps:{src:t?e:void 0,alt:o}}}function Io(){let e=useRef(!0);return useEffect(()=>{e.current=!1;},[]),e.current}var Xs="SET_STATE",mr="UNDO",fr="REDO",Bb=(e,o)=>{let{past:t,present:r,future:a}=e;switch(o.type){case Xs:return {past:[...t,r],present:o.data,future:[]};case mr:return {past:t.slice(0,t?.length-1),present:t[t?.length-1],future:[r,...a]};case fr:return {past:[...t,r],present:a[0],future:a.slice(1)};default:throw new Error("Invalid action type")}},Ys=(e={},{isDisabled:o,onAction:t})=>{let r=Io(),[a,n]=useReducer(Bb,{past:[],present:e,future:[]}),{past:i,present:s,future:p}=a,l=y=>{n({type:Xs,data:y});},c=useRef(),u=()=>{c.current=mr,n({type:mr});},m=()=>{c.current=fr,n({type:fr});},d=!!i?.length,f=!!p?.length;return useGranularEffect(()=>{(c.current===mr||c.current===fr)&&(t?.(s,c.current),c.current=void 0);},[s],[t,r]),{state:s,push:o?()=>{}:l,undo:o?()=>{}:u,redo:o?()=>{}:m,pastStates:i,futureStates:p,canUndo:d,canRedo:f}};var Ga=ro.createContext({messages:{},shouldLogMissingMessages:!0}),Js=({children:e,messages:o={},shouldLogMissingMessages:t=!0,...r})=>{let a=ro.useMemo(()=>({messages:o,shouldLogMissingMessages:t}),[o,t]);return jsx(I18nProvider,{...r,children:jsx(Ga.Provider,{value:a,children:e})})};Js.displayName="I18nProvider";function F(e){let{messages:o,shouldLogMissingMessages:t}=useContext(Ga);useEffect(()=>{!e&&Hb(o)&&console.warn("BUI \u{1F30D}: No messages object provided and no messages found in the `I18nProvider`. Please provide a messages object to the `useI18n` hook.");},[e,o]);let r=useMessageFormatter(e?cleanKeyFromGlobImport(e):o),a=useLocale();return {formatMessage:(n,i)=>{if(typeof n=="object")try{return r(n.id,i)}catch{return t&&console.log(`BUI \u{1F30D}: Translation not found for key: \`${n.id.toString()}\`. The default message, i.e. \`${n.defaultMessage}\`, will be used instead.`),n.defaultMessage||n.id}else try{return r(n,i)}catch{return t&&console.log(`BUI \u{1F30D}: Translation not found for key: \`${n.toString()}\`. The default message, i.e. \`${n.toString()}\`, will be used instead.`),n}},locale:a}}var $=e=>e;function pL(e,o,t){let r=ro.useRef(null);return ro.useEffect(()=>{if(e)return r.current=new MutationObserver(t),r.current.observe(e,o),()=>{r.current&&r.current.disconnect();}},[e,o,t]),r.current}function ol(e,o){let[t,r]=useState(()=>{try{let n=window.localStorage.getItem(e);return n?JSON.parse(n):o}catch(n){return console.log(n),o}});return [t,n=>{try{let i=n instanceof Function?n(t):n;r(i),window.localStorage.setItem(e,JSON.stringify(i));}catch(i){console.log(i);}}]}function bL({ref:e,onSelectionChange:o,onSelectionEnd:t,isDisabled:r}){let a=ro.useRef(null);usePress({ref:e,isDisabled:r,onPressEnd(){let i=re(e.current).getSelection();i&&e.current?.contains(i.anchorNode)&&t?.(i);},onPressStart(){let n=re(e.current);a.current=n.getSelection(),a.current&&a.current.removeAllRanges();}}),useEffect(()=>{let n=e.current;if(!n||r)return;function i(){let l=re(n).getSelection();l&&e.current?.contains(l.anchorNode)&&o(l);}let s=fe(n);return s.addEventListener("selectionchange",i),()=>{s.removeEventListener("selectionchange",i);}},[e,o,r]);}function wo(e){let o=useCallback(()=>{let a=re(e??document.body),n=a.matchMedia(queries.tablet);return a.matchMedia(queries.desktop).matches?"desktop":n.matches?"tablet":"mobile"},[e]),[t,r]=ro.useState(o);return xe(()=>{let a=re(e),n=()=>{r(o());};return a.addEventListener("resize",n),n(),()=>{a.removeEventListener("resize",n);}},[e,o]),t}var Wa=ro.createContext(void 0),rl=({portalContainer:e,children:o})=>jsx(Wa.Provider,{value:e,children:o});rl.displayName="PortalContainerProvider";function ge(e){let o=useContext(Wa);return e||o}var al=z({defaultClassName:"z9nup84",variantClassNames:{size:{xs:"z9nup85",sm:"z9nup86"}},defaultVariants:{},compoundVariants:[]});var nl="z9nup80",Ro="z9nup83",il="z9nup87";function Xa(e=window){let[o,t]=useState("light"),[r,a]=useState(!1),[n,i]=useState(!1),[s,p]=useState(!1);return useEffect(()=>{let l=e.matchMedia("(prefers-color-scheme: dark)"),c=u=>{t(u.matches?"dark":"light");};return l.matches&&t("dark"),l.addEventListener("change",c),()=>{l.addEventListener("change",c);}},[e]),useEffect(()=>{let l=e.matchMedia("(prefers-contrast: more)"),c=u=>{a(u.matches);};return a(l.matches),l.addEventListener("change",c),()=>{l.addEventListener("change",c);}},[e]),useEffect(()=>{let l=e.matchMedia("(prefers-reduced-motion: reduce)"),c=u=>{i(u.matches);};return l.matches&&i(!0),l.addEventListener("change",c),()=>{l.addEventListener("change",c);}},[e]),useEffect(()=>{let l=e.matchMedia("(prefers-reduced-transparency: reduce)"),c=u=>{p(u.matches);};return l.matches&&p(!0),l.addEventListener("change",c),()=>{l.addEventListener("change",c);}},[e]),{colorScheme:o,highContrast:r,reducedMotion:n,transparency:s}}var So=createContext({theme:lightTheme,setTheme:()=>{}});var sl="var(--hj25q10)";var gr={LIGHT:{name:"light",theme:lightTheme},DARK:{name:"dark",theme:darkTheme}},To=ro.forwardRef(({theme:e="system",children:o,setTheme:t,className:r,style:a,UNSAFE_domProps:n,"data-block-id":i,"data-block-class":s},p)=>{let{direction:l}=useLocale(),{colorScheme:c,reducedMotion:u,highContrast:m,transparency:d}=Xa(),{name:f,theme:y}=useMemo(()=>{switch(e){case"system":return c==="light"?gr.LIGHT:gr.DARK;case"light":return gr.LIGHT;case"dark":return gr.DARK;default:return {name:"custom",theme:e}}},[c,e]),b=wo(),v={"data-theme":f,"data-block-id":i,"data-block-class":s,"data-reduced-motion":u,"data-high-contrast":m,"data-transparency":d,"data-device":b},_=useMemo(()=>({theme:y,setTheme:t}),[y,t]);return jsx(So.Provider,{value:_,children:jsx("div",{...mergeProps(n,v),className:classNames(nl,"BaselineUI-ThemeProvider",r),style:{...assignInlineVars(themeVars,y),...assignInlineVars({[sl]:l==="rtl"?"-1":"1"}),...a},ref:p,children:o})})});To.displayName="ThemeProvider";var Ae=ro.forwardRef(({className:e,style:o,children:t,"data-block-id":r,"data-block-class":a,...n},i)=>{let{theme:s}=useContext(So);return jsx(Overlay,{...n,children:jsx(To,{ref:i,theme:s,style:o,className:classNames("BaselineUI-Portal",e),"data-block-id":r,"data-block-class":a,children:t})})});Ae.displayName="Portal";var ne=ro.forwardRef(({children:e,placement:o="bottom",delay:t=1e3,closeDelay:r=500,variant:a="default",size:n="md",includeArrow:i=!0,portalContainer:s,className:p,style:l,"data-block-id":c,"data-block-class":u,...m},d)=>{let f=ro.useRef(null),y=ro.useRef(null),b=!m.text||m.isDisabled,v=useTooltipTriggerState({...m,delay:t,closeDelay:r,isDisabled:b}),{triggerProps:_,tooltipProps:g}=useTooltipTrigger({...m,isDisabled:b,delay:t,closeDelay:r},v,f),h=ge(s),{overlayProps:R,arrowProps:x,placement:I,updatePosition:k}=useOverlayPosition({arrowSize:i?13:0,targetRef:f,arrowBoundaryOffset:i?8:0,offset:i?12:2,overlayRef:y,placement:o,isOpen:v.isOpen,...m});return Gs({ref:y,threshold:1,onIntersect:k,isDisabled:!v.isOpen}),Ws({ref:f,onResize:k,isDisabled:!v.isOpen}),jsxs(FocusableProvider,{..._,ref:f,children:[e,v.isOpen?jsx(Ae,{disableFocusManagement:!0,portalContainer:h,className:p,style:l,"data-block-id":c,"data-block-class":u,children:jsx(qa,{ref:M(d,y),state:v,arrowProps:x,overlayProps:R,placement:I,tooltipProps:g,variant:a,size:n,includeArrow:i,children:m.text})}):null]})});ne.displayName="Tooltip";var hg={xxs:8,xs:12,sm:16,md:20,lg:24},B=ro.forwardRef((e,o)=>{let t=ae(o),{tooltipProps:r}=sr(e,t);return r?jsx(ne,{...r,children:jsx(Za,{...e,ref:t})}):jsx(Za,{...e,ref:t})});B.displayName="ActionIconButton";var Za=ro.forwardRef(({className:e,style:o,icon:t,size:r="md",variant:a="primary",UNSAFE_NON_INTERACTIVE:n,elementType:i=n?"div":"button",...s},p)=>{let l=s["aria-label"],c=s["aria-labelledby"];useEffect(()=>{!l&&!c&&console.warn("An `ActionIconButton` requires an aria-label or aria-labelledby prop.");},[l,c]);let{buttonProps:u,isPressed:m,ref:d,isFocusVisible:f,isFocused:y,isHovered:b,uiStateOptions:v}=lr({...s,elementType:i}),_=filterTruthyValues({"data-block-id":s["data-block-id"],"data-block-class":s["data-block-class"],"data-focused":y,"data-focus-visible":f,"data-disabled":s.isDisabled,"data-hovered":b,"data-pressed":m});return jsxs(i,{...mergeProps(u,_),className:classNames(_s({variant:a,size:r,isDisabled:!!s.isDisabled,isFocusVisible:f,isHovered:b}),"BaselineUI-ActionIconButton",typeof e=="function"?e(v):e),ref:M(p,d),style:typeof o=="function"?o(v):o,...n&&{tabIndex:void 0,role:void 0,"aria-label":void 0,"aria-labelledby":void 0,"aria-disabled":void 0},children:[jsx(t,{role:"presentation",size:hg[r]}),a==="popover"&&jsx(CaretDownIcon,{size:8,className:nr})]})});Za.displayName="ActionIconButtonCore";var Me=ro.forwardRef(({className:e,style:o,labelPosition:t="top",variant:r="primary",showStepper:a=!0,...n},i)=>{let s=ro.useRef(null),{locale:p}=useLocale(),l=useNumberFieldState({...n,locale:p}),{hoverProps:c,isHovered:u}=useHover({isDisabled:n.isDisabled}),{focusProps:m,isFocusVisible:d,isFocused:f}=useFocusRing(),{labelProps:y,decrementButtonProps:b,inputProps:v,incrementButtonProps:_,groupProps:g,descriptionProps:h,errorMessageProps:R}=useNumberField(n,l,s),x=useMemo(()=>n.isReadOnly?ReadOnlyIcon:n.isInvalid?ErrorFilledIcon:null,[n.isInvalid,n.isReadOnly]),I=Ie({description:n.description,errorMessageProps:R,descriptionProps:h,errorMessage:n.errorMessage,labelPosition:t,isDisabled:n.isDisabled}),k=filterTruthyValues({"data-disabled":n.isDisabled,"data-readonly":n.isReadOnly,"data-hovered":u,"data-focused":f,"data-focus-visible":d,"data-invalid":n.isInvalid,"data-block-id":n["data-block-id"],"data-block-class":n["data-block-class"]});return jsxs("div",{style:o,className:classNames(je({labelPosition:t}),"BaselineUI-NumberInput",e),...k,ref:i,children:[n.label?jsxs("div",{className:Oe({labelPosition:t,hasMessage:!!I}),children:[jsx("label",{...y,className:Ve,children:n.label}),t==="start"&&I]}):null,jsxs("div",{className:classNames({[Ro]:n.isDisabled}),children:[jsxs("div",{...mergeProps(g,c),className:classNames(Po({isHovered:u,isDisabled:!!n.isDisabled,isReadOnly:!!n.isReadOnly,validationState:n.isInvalid?"error":"valid",isFocused:f,variant:r}),{[As]:t==="start"},"BaselineUI-NumberInput-Container"),children:[jsx("input",{...mergeProps(v,m),ref:s,className:classNames("BaselineUI-NumberInput-Input",dr({isDisabled:n.isDisabled,labelPosition:t}))}),x?jsx(x,{className:Co({validationState:"error",isReadOnly:n.isReadOnly}),size:16}):null,a?jsxs("div",{className:js({isHoveredOrFocused:u||f,isInteractive:!n.isReadOnly&&!n.isDisabled}),children:[jsx(B,{variant:"secondary",size:"xxs",icon:MinusIcon,...b,className:"BaselineUI-NumberInput-DecrementButton"}),jsx(O,{style:{height:16},orientation:"vertical"}),jsx(B,{variant:"secondary",size:"xxs",icon:PlusIcon,..._,className:"BaselineUI-NumberInput-DecrementButton"})]}):null]}),t==="top"&&I]})]})});Me.displayName="NumberInput";var Lo=ro.forwardRef(({className:e,style:o,onChange:t,onChangeEnd:r,numberFormatOptions:a,isDisabled:n,step:i,minValue:s,maxValue:p,value:l,"aria-label":c,"aria-labelledby":u,"aria-details":m,"aria-describedby":d,"data-block-id":f,"data-block-class":y,defaultValue:b,isReadOnly:v,label:_,id:g,includeNumberInput:h},R)=>{let x=ro.useRef(null),I={onChange:t===void 0?void 0:C=>{t(C[0]);},isDisabled:n||v,step:i,minValue:s,maxValue:p,onChangeEnd:r===void 0?void 0:C=>{r(C[0]);},value:l===void 0?void 0:[l],defaultValue:b===void 0?void 0:[b],"aria-label":c,"aria-labelledby":u,"aria-details":m,"aria-describedby":d,id:g,label:_},k=useNumberFormatter(a),S=useSliderState({...I,numberFormatter:k}),{trackProps:N,groupProps:w,labelProps:T}=useSlider(I,S,x),P=jsx(Me,{variant:"ghost",showStepper:!1,"aria-label":c,"aria-labelledby":T.id,value:S.getThumbValue(0),formatOptions:a,onChange:C=>{S.setThumbValue(0,C);},style:{width:55,textAlign:"right",flexShrink:0}});return jsxs("div",{...w,style:o,"data-block-id":f,"data-block-class":y,className:classNames(Es,"BaselineUI-Slider",e),children:[_?jsxs("div",{className:Ds,children:[jsx("label",{...T,className:classNames(Fs({isDisabled:n,hasNumberInput:!!h}),"BaselineUI-Slider-Label"),children:_}),h?P:null]}):null,jsxs("div",{className:Bs,children:[jsx("div",{...N,className:classNames(Vs,"BaselineUI-Slider-Track"),ref:M(x,R),"data-testid":"track",children:jsx(Ag,{state:S,trackRef:x,isDisabled:n,isReadOnly:v})}),h&&!_?P:null]})]})});Lo.displayName="Slider";function Ag({state:e,trackRef:o,isDisabled:t,isReadOnly:r}){let a=ro.useRef(null),{thumbProps:n,inputProps:i,isDragging:s}=useSliderThumb({trackRef:o,inputRef:a},e),{focusProps:p,isFocused:l,isFocusVisible:c}=useFocusRing(),{hoverProps:u,isHovered:m}=useHover({isDisabled:t}),d=filterTruthyValues({"data-disabled":t,"data-readonly":r,"data-hovered":m,"data-focus-visible":c,"data-dragging":s,"data-focused":l});return jsxs(Fragment,{children:[jsx("div",{className:classNames(Os({isDisabled:t,isFocusVisible:c,active:s,isHovered:m}),"BaselineUI-Slider-TrackHighlight"),style:{width:n.style?.left},"data-testid":"track-highlight"}),jsx("div",{...mergeProps(n,u,d),className:classNames(Hs({isDisabled:t,isFocusVisible:c,active:s,isReadOnly:r,isHovered:m}),"BaselineUI-Slider-Thumb"),"data-testid":"thumb",children:jsx(VisuallyHidden,{children:jsx("input",{ref:a,...mergeProps(i,p)})})})]})}var gl=z({defaultClassName:"_1tkzayn0 _1yep5z6dy",variantClassNames:{size:{sm:"_1tkzayn1",md:"_1tkzayn2",lg:"_1tkzayn3"},type:{subtitle:"_1yep5z610m",title:"_1yep5z610m",label:"_1yep5z610n",value:"_1yep5z610n",helper:"_1yep5z610o",body:"_1yep5z610m"}},defaultVariants:{},compoundVariants:[[{type:"title",size:"sm"},"_1yep5z61kx"],[{type:"title",size:"md"},"_1yep5z61l0"],[{type:"title",size:"lg"},"_1yep5z61l3"],[{type:"body",size:"sm"},"_1yep5z61ln"],[{type:"body",size:"md"},"_1yep5z61lq"],[{type:"body",size:"lg"},"_1yep5z61lq"],[{type:"subtitle",size:"sm"},"_1yep5z61lj"],[{type:"subtitle",size:"md"},"_1yep5z61lm"],[{type:"subtitle",size:"lg"},"_1yep5z61lm"],[{type:"label",size:"md"},"_1yep5z61ll"],[{type:"label",size:"lg"},"_1yep5z61ll"],[{type:"value",size:"md"},"_1yep5z61ll"],[{type:"value",size:"lg"},"_1yep5z61ll"],[{type:"helper",size:"sm"},"_1yep5z61lf"]]});var Q=ro.forwardRef(({elementType:e="span",type:o="title",children:t,size:r="md",...a},n)=>jsx(e,{...a,className:classNames(gl({size:r,type:o}),"BaselineUI-Text",a.className),ref:n,children:t}));Q.displayName="Text";var vl=z({defaultClassName:"siobe21 _1yep5z6ao _1yep5z6ap _1yep5z6aq _1yep5z6bc _1yep5z6bd _1yep5z6be _1yep5z6d7 _1yep5z6lq _1yep5z6lo _1yep5z6gz _1yep5z6lf _1yep5z6ih _1yep5z6ii _1yep5z6ij _1yep5z6it _1yep5z6iu _1yep5z6iv",variantClassNames:{background:{subtle:"_1yep5z611t",medium:"_1yep5z611u"},isFocusVisible:{true:"_1yep5z6178 _1yep5z617a _1yep5z617b _1yep5z613h"}},defaultVariants:{},compoundVariants:[]}),_l="siobe25",zl="var(--siobe20)";var hr=ro.forwardRef(({className:e,style:o,children:t,background:r="medium",title:a,action:n,"data-block-id":i,"data-block-class":s,onCloseRequest:p,...l},c)=>{let{formatMessage:u}=F(),m=ro.useRef(null),{dialogProps:d,titleProps:f}=useDialog(l,m),{focusProps:y,isFocusVisible:b}=useFocusRing();return jsxs("div",{...mergeProps(d,y),className:classNames(vl({background:r,isFocusVisible:b}),"BaselineUI-Drawer",e),"data-block-id":i,"data-block-class":s,style:o,ref:M(c,m),children:[jsxs(L,{paddingLeft:"lg",paddingRight:"sm",backgroundColor:"background.primary.subtle",display:"flex",justifyContent:"space-between",alignItems:"center",gap:"lg",className:_l,children:[jsx(Q,{type:"title",size:"sm",...f,className:il,children:a}),jsxs(L,{children:[n?jsx(B,{...n,variant:"secondary"}):null,jsx(B,{variant:"secondary",size:"md",icon:XIcon,onPress:p,"aria-label":u(Qg.close)})]})]}),jsx(O,{variant:r==="subtle"?"primary":"secondary"}),t]})});hr.displayName="Drawer";var Qg=$({close:{id:"close",defaultMessage:"Close"}});function Cl(e,o,t){let{isDisabled:r}=e,a=useReducedMotion(),[n,i]=ro.useState("100vh");useEffect(()=>{if(!Ma()&&!Ea())return;let d=re(t.current);function f(){i(`${d?.visualViewport.height}px`);}return f(),d?.visualViewport.addEventListener("resize",f),()=>{d?.visualViewport.removeEventListener("resize",f);}},[t]);let[{y:s},p]=useSpring(()=>({y:0,immediate:a,config:{easing:easings.easeOutCubic}})),l=useRef(0),c=useCallback(()=>{p.start({y:l.current,onRest:()=>{o.close();}});},[p,o]),u=useCallback(d=>{d.target.closest("[data-drawer]")||c();},[c]);useGranularLayoutEffect(()=>{l.current=t.current?.offsetHeight||0,p.set({y:l.current}),p.start({y:0,immediate:!!a});},[],[p,a]);let m=s.to({range:[0,l.current/2,l.current],output:[.5,.2,0],extrapolate:"clamp"}).to(d=>`rgba(0,0,0,${d})`);return {overlayProps:{style:r?void 0:{transform:s.to(d=>`translateY(${d}px)`)}},underlayProps:{style:r?void 0:{backgroundColor:m},onPointerDown:r?void 0:u},close:c,containerHeight:r?void 0:n}}var Pl=z({defaultClassName:"aml2vl0 _1yep5z6l5 _1yep5z6l6 _1yep5z6l8 _1yep5z6l7 _1yep5z6ih _1yep5z6ii _1yep5z6ij _1yep5z6i8 _1yep5z6i9 _1yep5z6ia",variantClassNames:{enableDrawer:{false:"_1yep5z6j8 _1yep5z6j9 _1yep5z6ja _1yep5z6k2 _1yep5z6k3 _1yep5z6k4",true:"aml2vl2"}},defaultVariants:{},compoundVariants:[]}),kl="_1yep5z6l5 _1yep5z6l6 _1yep5z6l8 _1yep5z6l7 _1yep5z6gb _1yep5z6i8 _1yep5z6i9 _1yep5z6ia";var Ue=ro.createContext({state:null,triggerProps:{},overlayProps:{}}),we=({children:e,...o})=>{let t=useOverlayTriggerState(o),{triggerProps:r,overlayProps:a}=useOverlayTrigger({type:"dialog"},t),n=useMemo(()=>({state:t,triggerProps:r,overlayProps:a}),[t,r,a]);return jsx(Ue.Provider,{value:n,children:e})};we.displayName="Modal";var on=ro.createContext({isDrawer:!1,closeDrawer:()=>{}}),tn=ro.createContext({setIsPopoverSafelyClosed:()=>{}}),vv=animated(To),_v=({children:e,className:o,style:t,isDismissable:r=!0,isKeyboardDismissDisabled:a=!1,portalContainer:n,disableAnimation:i,enableDrawer:s=!1,"data-block-id":p,"data-block-class":l})=>{let{state:c}=ro.useContext(Ue),[u,m]=ro.useState(!0),d=wo(n),f=ge(n),y=typeof s=="boolean"&&s||s==="auto"&&d==="mobile";invariant(c,"ModalContent must be a child of Modal");let b=ro.useRef(null),v=typeof r=="function"?r(y):r,_=typeof a=="function"?a(y):a,{underlayProps:g,overlayProps:h,close:R,containerHeight:x}=Cl({isDisabled:!y,isDismissable:v&&u},c,b),{modalProps:I,underlayProps:k}=useModalOverlay({isDismissable:!y&&u,isKeyboardDismissDisabled:_},c,b),{theme:S}=useContext(So),N=useReducedMotion(),w=useSpring({from:{opacity:0,transform:"scale(0.95)"},to:{opacity:1,transform:"scale(1)"},immediate:!!N||i,config:{easing:easings.easeInBounce}}),T=useMemo(()=>({...I.style,...y?{...h.style,width:"100%"}:w}),[h.style,I.style,y,w]),P=useMemo(()=>({isDrawer:y,closeDrawer:R}),[y,R]),C=useMemo(()=>({setIsPopoverSafelyClosed:m}),[m]);return jsx(Overlay,{portalContainer:f,children:jsx(on.Provider,{value:P,children:jsx(tn.Provider,{value:C,children:jsxs(vv,{className:classNames(Pl({enableDrawer:y}),o),theme:S,"data-block-id":p,"data-block-class":l,style:{...t,height:y?x:"auto",...assignInlineVars({[zl]:x})},children:[jsx(animated.div,{...mergeProps(k,g,{onPointerDown:y?g.onPointerDown:k.onPointerDown}),"data-testid":"underlay",style:g.style,className:classNames(kl,"BaselineUI-Modal-Underlay")}),jsx(animated.div,{...mergeProps(I,h),style:T,ref:b,"data-drawer":y,className:"BaselineUI-Modal-Content",children:typeof e=="function"?e(c):e})]})})})})},zv=animated(_v),Ee=({children:e,style:o,...t})=>{let{state:r}=ro.useContext(Ue);invariant(r,"ModalContent must be a child of Modal");let a=useReducedMotion();return useTransition(r.isOpen,{from:{opacity:0},enter:{opacity:1},immediate:!!a||t.disableAnimation})((i,s)=>s&&jsx(zv,{...t,style:{...o,...i},children:typeof e=="function"?e(r):e}))};var Tl=z({defaultClassName:"cjv3et0 _1yep5z6al _1yep5z6am _1yep5z6an _1yep5z6b9 _1yep5z6ba _1yep5z6bb _1yep5z6bx _1yep5z6by _1yep5z6bz _1yep5z6cl _1yep5z6cm _1yep5z6cn _1yep5z6g1 _1yep5z6d7",variantClassNames:{size:{sm:"cjv3et1",md:"cjv3et2",lg:"cjv3et3",content:"cjv3et4"},variant:{primary:"_1yep5z612r _1yep5z617g _1yep5z617i",ghost:"cjv3et6"},isDrawer:{true:"cjv3et7 _1yep5z6y7 _1yep5z6y8 _1yep5z6y9 _1yep5z6yv _1yep5z6yw _1yep5z6yx _1yep5z6174"},isFocusVisible:{true:"_1yep5z613h _1yep5z617b _1yep5z617a _1yep5z6178"}},defaultVariants:{},compoundVariants:[]});var an=ro.createContext({titleProps:{}}),ue=ro.forwardRef(({children:e,className:o,style:t,inheritDrawer:r,size:a="md",variant:n="primary","data-block-id":i,"data-block-class":s,drawerBackground:p,...l},c)=>{let u=ro.useRef(null),m=ro.useRef(null),{isDrawer:d,closeDrawer:f}=useContext(on),[y,b]=ro.useState(""),{focusProps:v,isFocusVisible:_}=useFocusRing();useLayoutEffect(()=>{let x=m.current?.getRootNode(),I=l["aria-label"]||"";l["aria-labelledby"]&&(I=x?.querySelector(`#${l["aria-labelledby"].replaceAll(":","\\:")}`)?.textContent||""),b(I);},[l]);let{dialogProps:g,titleProps:h}=useDialog(l,u),R=useMemo(()=>({titleProps:h}),[h]);return d&&r?jsx(hr,{title:y,onCloseRequest:f,className:o,...l,"data-drawer":!0,"data-block-id":i,"data-block-class":s,ref:M(m,c),background:p,children:e}):jsx(an.Provider,{value:R,children:jsx("section",{...mergeProps(g,v),"data-block-id":i,"data-block-class":s,ref:M(u,c),style:t,className:classNames(Tl({size:d?"content":a,variant:n,isDrawer:d,isFocusVisible:_}),"BaselineUI-Dialog",o),children:e})})});ue.displayName="Dialog";var Nl=ro.forwardRef(({children:e,className:o,style:t},r)=>{let{titleProps:a}=useContext(an);return ro.isValidElement(e)?ro.cloneElement(e,{...a,ref:r,className:classNames(e.props.className,o),style:{...e.props.style,...t}}):jsx("h3",{...a,ref:r,className:o,style:t,children:e})});Nl.displayName="DialogTitle";function Ll({placement:e,isOpen:o}){let t=useReducedMotion();return useTransition(o,{from:{opacity:0,transform:`translate3d(${e==="bottom"?"0, 4px, 0":"0, -4px, 0"})`},enter:{opacity:1,transform:"translate3d(0, 0, 0)"},immediate:!!t,config:config.stiff})}var El=({children:e,isOpen:o,popoverContentRef:t,portalContainer:r=document.body,style:a})=>{let[n,i]=useState(!1),[s,p]=useState(null),l=useRef(null),{setIsPopoverSafelyClosed:c}=useContext(tn);useEffect(()=>{o?(i(!0),l.current&&clearTimeout(l.current)):l.current=setTimeout(()=>{i(!1);},300);},[o]),useEffect(()=>()=>{l.current&&clearTimeout(l.current);},[]);let u=t.current;return useEffect(()=>{u&&p(u.getBoundingClientRect());},[u]),useEffect(()=>{c(!n);},[n,c]),jsxs(Fragment,{children:[n?Fv.createPortal(jsx("div",{style:{position:"absolute",left:a?.left,top:a?.top,width:s?.width,height:s?.height,zIndex:a?.zIndex?+a.zIndex-1:void 0},className:"BaselineUI-Popover-ClickPreventionLayer"}),r):null,e]})};var{color:sn}=themeVars,ye=ro.forwardRef(({className:e,style:o,state:t,overlayProps:r,underlayClassName:a,children:n,includeArrow:i=!1,offset:s=2,portalContainer:p,contentContainerClassName:l,contentContainerStyle:c,"data-block-id":u,"data-block-class":m,...d},f)=>{let y=ro.useRef(null),b=ge(p),v=i?8:0,{underlayProps:_,popoverProps:g,placement:h,arrowProps:R}=usePopover({...d,offset:s+v,popoverRef:y,containerPadding:d.containerPadding||0},t);delete g.style?.position;let x=Ll({placement:h,isOpen:t.isOpen}),I=h==="center"?"bottom":h;return jsx(El,{isOpen:t.isOpen,popoverContentRef:y,portalContainer:b,style:g.style,children:x((k,S)=>S&&jsxs(Ae,{portalContainer:b,style:o,ref:f,"data-block-id":u,"data-block-class":m,children:[!d.isNonModal&&jsx("div",{..._,className:classNames(ks,a,"BaselineUI-Popover-Underlay")}),jsxs(animated.div,{...g,style:{...g.style,...k,...assignInlineVars({[Is]:`${d.triggerRef?.current?.offsetWidth}px`})},ref:M(y,f),className:classNames(xs,"BaselineUI-Popover-Content",e),"data-placement":["top","bottom","left","right"].filter(N=>h?.includes(N)),children:[i?jsxs("svg",{className:classNames(hs[I],"BaselineUI-PopoverContent-Arrow"),...R,style:{...R.style,position:"absolute"},width:"15",height:"9",viewBox:"0 0 15 9",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M.019 0h1.228l6.272 7.237L13.791 0h1.228v1h-.772L7.519 8.763.791 1H.019V0Z",fill:sn.border.medium}),jsx("path",{d:"M7.504 6.492 2.248.488h10.511L10.132 3.49 7.504 6.492Z",fill:sn.background.primary.subtle,stroke:sn.background.primary.subtle})]}):null,jsx(DismissButton,{onDismiss:t.close}),jsx("div",{...r,style:c,className:classNames(Cs,l),children:typeof n=="function"?n(t):n}),jsx(DismissButton,{onDismiss:t.close})]})]}))})});ye.displayName="PopoverContentCore";var Re=ro.forwardRef((e,o)=>{let{state:t,overlayTriggerAria:{overlayProps:r},triggerRef:a}=useContext(ut);return invariant(a),t?jsx(ye,{ref:o,...e,triggerRef:e.triggerRef||a,overlayProps:r,state:t}):null});Re.displayName="PopoverContent";var Fl=z({defaultClassName:"_1mdhlqv3",variantClassNames:{isOpen:{true:"_1mdhlqv4"}},defaultVariants:{},compoundVariants:[]}),qe="_1mdhlqv6 _1yep5z6al _1yep5z6am _1yep5z6an _1yep5z6b9 _1yep5z6ba _1yep5z6bb _1yep5z6bx _1yep5z6by _1yep5z6bz _1yep5z6cl _1yep5z6cm _1yep5z6cn _1yep5z6d7",Hl=z({defaultClassName:"_1mdhlqv0 _1yep5z66 _1yep5z67 _1yep5z68 _1yep5z62i _1yep5z62j _1yep5z62k _1yep5z63o _1yep5z63p _1yep5z63q _1yep5z61c _1yep5z61d _1yep5z61e _1yep5z6ih _1yep5z6ii _1yep5z6ij _1yep5z6j8 _1yep5z6j9 _1yep5z6ja _1yep5z69o _1yep5z69p _1yep5z69q _1yep5z6eu _1yep5z6k8 _1yep5z6k9 _1yep5z6ka _1yep5z6dy",variantClassNames:{isFocused:{false:"_1mdhlqv1"},isDisabled:{true:"z9nup83 _1yep5z6ey"}},defaultVariants:{},compoundVariants:[]}),kr="_1mdhlqv7 _1yep5z6al _1yep5z6am _1yep5z6an _1yep5z6b9 _1yep5z6ba _1yep5z6bb _1yep5z6bx _1yep5z6by _1yep5z6bz _1yep5z6cl _1yep5z6cm _1yep5z6cn _1yep5z6g1",Vl="_1yep5z66x _1yep5z66y _1yep5z66z",Ol="_1mdhlqv5 _1yep5z6ih _1yep5z6ii _1yep5z6ij _1yep5z6iq _1yep5z6ir _1yep5z6is _1yep5z6j8 _1yep5z6j9 _1yep5z6ja _1yep5z69i _1yep5z69j _1yep5z69k";var Ul=ro.forwardRef(({className:e,style:o,onChange:t,"data-block-id":r,icon:a,formatValue:n=u=>u,tooltipProps:i,popoverContentProps:s,isDisabled:p,...l},c)=>{let u=ae(c),[m,d]=useControlledState(l.value,l.defaultValue||0,t),[f,y]=ro.useState(!1),{keyboardProps:b}=useKeyboard({onKeyDown:g=>{(g.key==="Enter"||g.key==="Escape")&&y(!1);}}),v=n(m||0),_=i?.isDisabled||l["aria-label"]?`${l["aria-label"]}, ${v}`:v.toString();return jsxs(L,{display:"flex",flexDirection:"row",gap:"md",paddingX:"md",alignItems:"center",className:classNames("BaselineUI-IconSlider",e),"data-block-id":r,style:o,ref:u,children:[a?jsx(a,{size:24,className:sprinkles({color:"icon.primary"})}):null,jsxs(Ne,{type:"dialog",isOpen:f,onOpenChange:y,children:[jsx(Le,{children:jsx(ne,{text:l["aria-label"],size:"sm",variant:"inverse",includeArrow:!1,isDisabled:p,...i,children:jsx(U,{label:v,variant:"popover","aria-label":_,isDisabled:p,style:{fontVariantNumeric:"tabular-nums",minWidth:68,justifyContent:"space-between"}})})}),jsx(Re,{placement:"bottom start",...s,className:classNames(qe,s?.className),children:jsx(ue,{size:"content","aria-label":_,children:jsx(FocusScope,{autoFocus:!0,children:jsx(L,{paddingY:"sm",paddingX:"lg",marginY:"md",style:{width:215},...b,children:jsx(Lo,{...l,onChange:g=>{d(g),t?.(g);},value:m})})})})})]})]})});Ul.displayName="IconSlider";var ql=z({defaultClassName:"bpklwa7",variantClassNames:{isReadOnly:{true:"bpklwa8"},isDisabled:{true:"bpklwa9"},isSelected:{true:"bpklwaa"},isFocused:{true:"bpklwab"}},defaultVariants:{},compoundVariants:[[{isSelected:!0,isDisabled:!1,isReadOnly:!1},"bpklwac"]]}),Kl=z({defaultClassName:"bpklwae",variantClassNames:{isDisabled:{true:"bpklwaf"},isSelected:{true:"bpklwag"},isReadOnly:{true:"bpklwah"}},defaultVariants:{},compoundVariants:[]}),Gl="bpklwad",Wl=z({defaultClassName:"bpklwa0",variantClassNames:{labelPosition:{top:"bpklwa1",left:"bpklwa2"}},defaultVariants:{},compoundVariants:[]}),Xl="bpklwa6",Yl=z({defaultClassName:"bpklwa3",variantClassNames:{labelPosition:{top:"bpklwa4",left:"bpklwa5"}},defaultVariants:{},compoundVariants:[]});var ep=ro.forwardRef(({className:e,label:o,labelPosition:t="top",statusLabel:r,style:a,"data-block-id":n,"data-block-class":i,...s},p)=>{let l=ro.useRef(null),c=useToggleState(s),{inputProps:u,isPressed:m}=useSwitch(s,c,l),{isFocusVisible:d,focusProps:f}=useFocusRing(),{hoverProps:y,isHovered:b}=useHover({isDisabled:s.isDisabled}),v=filterTruthyValues({"data-block-id":n,"data-block-class":i,"data-focused":d,"data-disabled":s.isDisabled,"data-focus-visible":d,"data-selected":c.isSelected,"data-readonly":s.isReadOnly,"data-hovered":b,"data-pressed":m}),_=jsx("div",{className:classNames(ql({isSelected:c.isSelected,isDisabled:!!s.isDisabled,isFocused:d,isReadOnly:!!s.isReadOnly}),"BaselineUI-Switch-Track"),children:jsx("div",{className:classNames(Kl({isSelected:c.isSelected,isDisabled:s.isDisabled,isReadOnly:s.isReadOnly}),"BaselineUI-Switch-Knob"),"data-testid":"switch-knob"})});return jsxs("label",{...mergeProps(v,y),className:classNames(Wl({labelPosition:t}),"BaselineUI-Switch",e),style:a,ref:p,children:[o?jsx("span",{className:classNames(Gl,"BaselineUI-Switch-Label"),children:o}):null,jsx(VisuallyHidden,{children:jsx("input",{...mergeProps(u,f),ref:l})}),r?jsxs("div",{className:Yl({labelPosition:t}),children:[jsx("span",{className:classNames("BaselineUI-Switch-Status-Label",Xl),children:c.isSelected?r.on:r.off}),_]}):_]})});ep.displayName="Switch";var op="_19n40yy9",tp=z({defaultClassName:"_19n40yy0",variantClassNames:{size:{lg:"_19n40yy1",md:"_19n40yy2",sm:"_19n40yy3"},variant:{primary:"_19n40yy4",ghost:"_19n40yy5"},isFocused:{true:"_19n40yy6"},hasText:{true:"_19n40yy7"},isDisabled:{true:"_19n40yy8"}},defaultVariants:{},compoundVariants:[]});var f_={sm:SearchIcon,md:SearchIcon$1,lg:SearchIcon$1},np=ro.forwardRef(({className:e,size:o="md",variant:t="primary","data-block-id":r,"data-block-class":a,style:n,...i},s)=>{let p=ro.useRef(null),l=useSearchFieldState(i),{inputProps:c,clearButtonProps:u}=useSearchField({...i,"aria-haspopup":!1,"aria-autocomplete":"none",type:"search"},l,p),{focusProps:m,isFocusVisible:d,isFocused:f}=useFocusRing({within:!0,isTextInput:!0}),y=f_[o],b=o==="sm"?XIcon$2:XIcon$3,v=filterTruthyValues({"data-block-id":r,"data-block-class":a,"data-focused":f,"data-disabled":i.isDisabled,"data-focus-visible":d});return jsxs("div",{...v,className:classNames(tp({size:o,isFocused:f,variant:t,hasText:!!l.value,isDisabled:i.isDisabled}),"BaselineUI-SearchInput",e),style:n,ref:s,children:[jsx(y,{size:o==="sm"?20:24}),jsx("input",{...mergeProps(c,m),className:op,ref:p}),l.value!==""&&jsx(B,{icon:b,...u,size:o==="sm"?"xs":"sm",variant:"secondary"})]})});np.displayName="SearchInput";var ip="xyd2ss1 _1yep5z613 _1yep5z614 _1yep5z615 _1yep5z63f _1yep5z63g _1yep5z63h _1yep5z64l _1yep5z64m _1yep5z64n _1yep5z629 _1yep5z62a _1yep5z62b _1yep5z65r _1yep5z65s _1yep5z65t _1yep5z683 _1yep5z684 _1yep5z685 _1yep5z699 _1yep5z69a _1yep5z69b _1yep5z66x _1yep5z66y _1yep5z66z _1yep5z6al _1yep5z6am _1yep5z6an _1yep5z6b9 _1yep5z6ba _1yep5z6bb _1yep5z6bx _1yep5z6by _1yep5z6bz _1yep5z6cl _1yep5z6cm _1yep5z6cn _1yep5z6lh _1yep5z6lg _1yep5z6hs _1yep5z6lk _1yep5z6g1",sp="xyd2ss0 _1yep5z66 _1yep5z67 _1yep5z68 _1yep5z62i _1yep5z62j _1yep5z62k _1yep5z64l _1yep5z64m _1yep5z64n _1yep5z629 _1yep5z62a _1yep5z62b";var cn=({section:e,showSelectedIcon:o,state:t})=>{let{itemProps:r,groupProps:a,headingProps:n}=useMenuSection({heading:e.value?.title,"aria-label":e["aria-label"]});return jsxs(Fragment,{children:[e.key!==t.collection.getFirstKey()&&jsx(O,{elementType:"li"}),jsxs("li",{...r,children:[e.value?.title?jsx(VisuallyHidden,{children:jsx("span",{...n,children:e.value.title})}):null,jsx("ul",{...a,className:sp,children:[...e.childNodes].map(i=>(invariant(i.type==="item"),jsx(Ir,{item:i,state:t,showSelectedIcon:o},i.key)))})]})]})};cn.displayName="MenuSection";var Ir=({item:e,state:o,className:t,showSelectedIcon:r})=>{let a=ro.useRef(null),n=useMenuItem({key:e.key},o,a),{isFocusVisible:i,focusProps:s}=useFocusRing();return jsx(ct,{item:e,liProps:mergeProps(n.menuItemProps,s,{className:t}),...n,isFocusVisible:i,ref:a,description:e.value?.keyboardShortcut,descriptionProps:n.keyboardShortcutProps,_state:o,showSelectedIcon:r})};Ir.displayName="MenuItem";var un=ro.forwardRef(({className:e,itemClassName:o,onContentKeyDown:t,...r},a)=>{let n=useTreeState(r),i=ro.useRef(null),{menuProps:s}=useMenu(r,n,i),{keyboardProps:p}=useKeyboard({onKeyDown:t});return jsx("ul",{...mergeProps(s,p),className:classNames(ip,e),ref:M(i,a),children:[...n.collection].map(l=>l.type==="section"?jsx(cn,{section:l,state:n,showSelectedIcon:r.selectionMode==="multiple"||r.selectionMode==="single"},l.key):jsx(Ir,{item:l,state:n,className:o,showSelectedIcon:r.selectionMode==="multiple"||r.selectionMode==="single"},l.key))})});un.displayName="MenuContent";var wr=ro.forwardRef(({defaultOpen:e,onOpenChange:o,isOpen:t,isDisabled:r,contentClassName:a,placement:n="bottom start",isNonModal:i,shouldFlip:s,shouldUpdatePosition:p,boundaryElement:l,crossOffset:c,offset:u,triggerLabel:m,renderTrigger:d=({buttonProps:v,ref:_})=>jsx(U,{...v,variant:"popover",ref:_}),portalContainer:f,...y},b)=>{let v=ro.useRef(null),_=ge(f),g=useMenuTriggerState({defaultOpen:e,isOpen:t,onOpenChange:o}),{menuTriggerProps:h,menuProps:R}=useMenuTrigger({isDisabled:r,type:"menu"},g,v),x=te(),I=useMemo(()=>mergeProps(h,{isDisabled:r,isSelected:g.isOpen,className:"BaselineUI-Menu-Trigger",label:typeof m=="function"?m(g.isOpen):m}),[h,r,g.isOpen,m]);return useEffect(()=>{!m&&!d&&console.warn("The `triggerLabel` prop is required when no `renderTrigger` or `children` is provided.");},[d,m]),jsxs(Fragment,{children:[d({buttonProps:I,ref:v}),jsx(ye,{triggerRef:v,state:g,placement:n,isNonModal:i,shouldFlip:s,shouldUpdatePosition:p,boundaryElement:l,crossOffset:c,offset:u||2,className:classNames(qe,"BaselineUI-Menu-Popover"),portalContainer:_,children:jsx(un,{className:a,...R,...y,ref:b,autoFocus:g.focusStrategy||"first",children:x})})]})});wr.displayName="Menu";var Rr=z({defaultClassName:"_13f0naj0",variantClassNames:{variant:{default:"_13f0naj1",inline:"_13f0naj2"},isHovered:{true:"_13f0naj3"},isFocusVisible:{true:"_13f0naj4"},isDisabled:{true:"_13f0naj5"},size:{sm:"_13f0naj6",md:"_13f0naj7",lg:"_13f0naj8"},type:{body:"_13f0naj9",label:"_13f0naja"},isActive:{true:"_13f0najb"}},defaultVariants:{},compoundVariants:[[{isActive:!0,isDisabled:!1},"_13f0najc"],[{type:"body",size:"sm"},"_13f0najd"],[{type:"body",size:"md"},"_13f0naje"],[{type:"body",size:"lg"},"_13f0najf"],[{type:"label",size:"sm"},"_13f0najg"],[{type:"label",size:"md"},"_13f0najh"],[{type:"label",size:"lg"},"_13f0naji"]]});var up=ro.forwardRef(({className:e,style:o,children:t,variant:r="default",size:a="md",elementType:n="a",type:i="body","data-block-id":s,"data-block-class":p,title:l,role:c,...u},m)=>{let d=ro.useRef(null),{linkProps:f,isPressed:y}=useLink({...u,elementType:u.onPress?"span":n},d),{isFocusVisible:b,isFocused:v,focusProps:_}=useFocusRing(),{hoverProps:g,isHovered:h}=useHover({isDisabled:u.isDisabled}),R=n,x=filterTruthyValues({"data-block-id":s,"data-block-class":p,"data-disabled":u.isDisabled,"data-focused":v,"data-pressed":y,"data-focus-visible":b,"data-hovered":h,role:c,title:l});return jsx(R,{...mergeProps(f,_,g,x),className:classNames(Rr({variant:r,isFocusVisible:b,isHovered:h,isDisabled:u.isDisabled,size:a,isActive:y,type:i}),"BaselineUI-Link",e),ref:M(d,m),style:o,children:t})});up.displayName="Link";function mp({isDisabled:e,onValueChange:o,onChange:t,name:r,"aria-describedby":a,"aria-label":n,accept:i,multiple:s}){let p=useId(),l=useId(),c=useId();return {inputProps:{type:"file",id:l,disabled:!!e,"aria-labelledby":n?void 0:p,"aria-describedby":a||c,"aria-label":n,onChange:m=>{let d=[...m.target.files||[]];o?.(d),t?.(m);},name:r,accept:i,multiple:s},labelProps:{htmlFor:l,id:p},descriptionProps:{id:c}}}async function yn({items:e}){let o=e.filter(t=>t.kind==="file").map(async t=>(invariant(t.kind==="file"),t.getFile()));return await Promise.all(o)}var fp=z({defaultClassName:"_180w5ed0",variantClassNames:{variant:{default:"_180w5ed1",inline:"_180w5ed2"},hoveredOrFocusedOrActive:{true:"_180w5ed3"},disabled:{true:"_180w5ed4"}},defaultVariants:{},compoundVariants:[[{variant:"inline",hoveredOrFocusedOrActive:!0},"_180w5ed5"],[{variant:"default",hoveredOrFocusedOrActive:!0},"_180w5ed6"],[{variant:"default",disabled:!0},"_180w5ed7"],[{variant:"inline",disabled:!0},"_180w5ed8"]]}),yp=z({defaultClassName:"_180w5ede",variantClassNames:{disabled:{true:"_180w5edf"}},defaultVariants:{},compoundVariants:[]}),bp=z({defaultClassName:"_180w5ed9",variantClassNames:{disabled:{true:"_180w5eda"}},defaultVariants:{},compoundVariants:[]}),gp=z({defaultClassName:"_180w5edb",variantClassNames:{disabled:{true:"_180w5edc"},hovered:{true:"_180w5edd"}},defaultVariants:{},compoundVariants:[]});var hp=ro.forwardRef(({className:e,label:o,description:t,icon:r,variant:a="default",...n},i)=>{let s=ro.useRef(null),{inputProps:p,descriptionProps:l,labelProps:c}=mp(n),{dropProps:u}=useDrop({ref:s,onDrop:async({items:b})=>{let v=b.filter(g=>g.kind==="file").map(async g=>(invariant(g.kind==="file"),g.getFile())),_=await Promise.all(v);n.onValueChange?.(_);}}),{focusProps:m,isFocusVisible:d}=useFocusRing(),{hoverProps:f,isHovered:y}=useHover({isDisabled:n.isDisabled});return jsxs("label",{...mergeProps(u,f,c),className:classNames(fp({variant:a,disabled:n.isDisabled,hoveredOrFocusedOrActive:y||d}),e),ref:M(i,s),children:[jsx(VisuallyHidden,{children:jsx("input",{...mergeProps(m,p)})}),r?jsx(r,{size:20,className:bp({disabled:n.isDisabled})}):null,jsxs("div",{children:[jsx("div",{className:gp({disabled:n.isDisabled,hovered:y}),children:o}),t?jsx("div",{...l,className:yp({disabled:n.isDisabled}),children:t}):null]})]})});hp.displayName="FileUpload";var xp="_12vfhl40 z9nup81",Cp="_12vfhl41 z9nup82",Pp=z({defaultClassName:"_12vfhl48",variantClassNames:{variant:{success:"_12vfhl49",error:"_12vfhl4a",active:"_12vfhl4b"}},defaultVariants:{},compoundVariants:[]}),kp="_12vfhl42",Ip="_12vfhl47",wp="_12vfhl46 z9nup82",Rp="_12vfhl45",Sp=z({defaultClassName:"_12vfhl43 _12vfhl42",variantClassNames:{hasLabel:{false:"_12vfhl44"}},defaultVariants:{},compoundVariants:[]});var Tp=ro.forwardRef(({className:e,style:o,variant:t="active",showValue:r,description:a,errorMessage:n,"data-block-id":i,"data-block-class":s,...p},l)=>{let c=useId(),{labelProps:u,progressBarProps:m}=useProgressBar({...p,"aria-describedby":a?c:p["aria-describedby"]}),{minValue:d=0,maxValue:f=100,value:y=0,label:b}=p,v=(y-d)/(f-d),_=`${Math.round(v*100)}%`,g=jsx("output",{className:Sp({hasLabel:!!b}),children:m["aria-valuetext"]}),h=t==="error"?n:a;return jsxs("div",{...m,style:o,className:classNames(xp,"BaselineUI-ProgressBar",e),"data-block-id":i,"data-block-class":s,ref:l,children:[b?jsxs("div",{className:Cp,children:[jsx("label",{...u,className:kp,children:b}),r?g:null]}):null,jsxs("div",{className:Rp,children:[jsxs("div",{className:wp,children:[jsx("div",{className:Ip,children:jsx("div",{style:{width:_},className:Pp({variant:t})})}),!b&&r?g:null]}),h?jsx("div",{className:xo({hasError:t==="error"}),id:c,children:h}):null]})]})});Tp.displayName="ProgressBar";function Fo({isReadOnly:e,validationState:o}){return e?ReadOnlyIcon:o==="error"?ErrorFilledIcon:o==="warning"?WarningFilledIcon:null}var Ke=ro.forwardRef(({className:e,validationState:o,variant:t="primary",style:r,labelPosition:a="top",inputStyle:n,inputClassName:i,"data-block-id":s,"data-block-class":p,...l},c)=>{let u=ro.useRef(null),{inputProps:m,labelProps:d,descriptionProps:f,errorMessageProps:y,validationErrors:b}=useTextField({...l,validationState:o?o==="error"?"invalid":"valid":void 0},u),v=l.errorMessage||b.join(" "),_=Ie({...l,errorMessage:v,descriptionProps:f,errorMessageProps:y,labelPosition:a});v&&(o="error");let{hoverProps:g,isHovered:h}=useHover({isDisabled:l.isDisabled}),{isFocused:R,focusProps:x,isFocusVisible:I}=useFocusRing(),k=Fo({isReadOnly:l.isReadOnly,validationState:o}),S=filterTruthyValues({"data-readonly":l.isReadOnly,"data-disabled":l.isDisabled,"data-validation-state":o,"data-focused":R,"data-focus-visible":I});return jsxs("div",{className:classNames(je({labelPosition:a}),"BaselineUI-TextInput",e),"data-block-id":s,"data-block-class":p,style:r,ref:c,children:[l.label||a==="start"&&_?jsxs("div",{className:Oe({labelPosition:a,hasMessage:!!_}),children:[jsx("label",{...d,className:Ve,children:l.label}),a==="start"&&_]}):null,jsxs("div",{className:classNames({[Ro]:l.isDisabled}),children:[jsxs("div",{...g,className:Po({validationState:o,isHovered:h,isFocused:R,variant:t,isReadOnly:!!l.isReadOnly,isDisabled:!!l.isDisabled}),children:[jsx("input",{...mergeProps(m,x,S),className:classNames(dr({isDisabled:l.isDisabled,labelPosition:a}),"BaselineUI-TextInput-Input",i),style:n,ref:u}),k?jsx(k,{className:Co({validationState:o,isReadOnly:l.isReadOnly}),size:16}):null]}),a==="top"&&_]})]})});Ke.displayName="TextInput";var Ho=({value:e,...o})=>{let t=useNumberFormatter(o);return jsx(Fragment,{children:t.format(e)})};Ho.displayName="NumberFormat";var Lp="_1yep5z6ik _1yep5z6il _1yep5z6im",Mp=z({defaultClassName:"_9b1tml0",variantClassNames:{isSelected:{true:"_9b1tml1",false:"_9b1tml2"},isDisabled:{true:"z9nup83"},isHovered:{true:"_9b1tml4"},isFocusVisible:{true:"_9b1tml5"},isReadOnly:{true:"_9b1tml6"}},defaultVariants:{},compoundVariants:[[{isSelected:!0,isFocusVisible:!0,isReadOnly:!1},"_9b1tml7"],[{isSelected:!0,isHovered:!0,isDisabled:!1,isReadOnly:!1},"_9b1tml8"],[{isSelected:!1,isHovered:!0,isDisabled:!1,isReadOnly:!1},"_9b1tml9"],[{isSelected:!0,isDisabled:!0},"_9b1tmla"],[{isSelected:!0,isReadOnly:!0},"_9b1tmlb"]]}),Ep=z({defaultClassName:"_9b1tmlf",variantClassNames:{isSelected:{true:"_9b1tmlg"},size:{sm:"_9b1tmlh",md:"_9b1tmli"},isDisabled:{true:"_9b1tmlj"},isReadOnly:{true:"_9b1tmlk"}},defaultVariants:{},compoundVariants:[[{isSelected:!0,isDisabled:!1,isReadOnly:!1},"_9b1tmll"],[{isSelected:!0,isDisabled:!0},"_9b1tmlm"],[{isSelected:!1,isDisabled:!0},"_9b1tmln"]]}),Bp=z({defaultClassName:"_9b1tmlc",variantClassNames:{isDisabled:{true:"_9b1tmld"},isReadOnly:{true:"_9b1tmle"}},defaultVariants:{},compoundVariants:[]});var Hp=ro.forwardRef(({className:e,count:o,style:t,size:r="md",icon:a,"data-block-id":n,"data-block-class":i,...s},p)=>{let l={isRequired:!1},c=a||(r==="md"?CheckmarkIcon$2:CheckmarkIcon$3);!s["aria-label"]&&!s["aria-labelledby"]&&console.warn("You must provide either an `aria-label` or `aria-labelledby` prop to the `Reaction` component.");let u=ro.useRef(null),m=useToggleState({...s,...l}),{inputProps:d,isPressed:f,isDisabled:y,isReadOnly:b,isSelected:v}=useSwitch({...s,...l},m,u),{focusProps:_,isFocused:g,isFocusVisible:h}=useFocusRing(),{hoverProps:R,isHovered:x}=useHover({}),I=filterTruthyValues({"data-block-id":n,"data-block-class":i,"data-focused":g,"data-focus-visible":h,"data-disabled":y,"data-hovered":x,"data-pressed":f,"data-selected":v});return jsxs("label",{ref:p,style:t,className:classNames(Lp,"BaselineUI-Reaction",e),...I,children:[jsx(VisuallyHidden,{children:jsx("input",{...d,..._,ref:u})}),jsxs("div",{...R,className:Mp({isSelected:v,isFocusVisible:h,isHovered:x,isReadOnly:b,isDisabled:y}),children:[jsx("div",{className:Bp({isDisabled:y,isReadOnly:b}),children:jsx(c,{size:r==="md"?20:16})}),jsx("div",{className:Ep({isSelected:m.isSelected,isDisabled:y,isReadOnly:b,size:r}),children:jsx(Ho,{value:o})})]})]})});Hp.displayName="Reaction";var Vp="_1azy5686",Op="_1azy5685",jp="var(--_1azy5680)",Ap="_1azy5688",$p="_1azy5689",Up="_1azy5681 z9nup82",qp="_1azy5682";var Kp="_1azy5687";var S6={sm:16,md:20},T6={sm:[CheckFilledIcon,ErrorAltFilledIcon],md:[CheckFilledIcon$1,ErrorAltFilledIcon$1]},Oo=ro.forwardRef(({className:e,style:o,size:t="md",variant:r="active","data-block-id":a,"data-block-class":n,...i},s)=>{let{labelProps:p,progressBarProps:l}=useProgressBar({...i,isIndeterminate:!0}),c=S6[t],u=c/2-2,m=2*u*Math.PI,d=T6[t][r==="success"?0:1];return jsxs("div",{className:classNames(Up,"BaselineUI-ProgressSpinner",e),ref:s,style:{...assignInlineVars({[jp]:`${m}px`}),...o},"data-block-id":a,"data-block-class":n,children:[jsxs("div",{...l,className:qp,children:[(r==="active"||r==="inactive")&&jsxs("svg",{height:c,width:c,viewBox:`0 0 ${c} ${c}`,children:[jsx("circle",{role:"presentation",className:Vp,cx:c/2,cy:c/2,r:u}),r==="active"&&jsx("circle",{role:"presentation",className:Op,cx:c/2,cy:c/2,r:u})]}),r==="success"&&jsx(d,{className:Kp,size:c}),r==="error"&&jsx(d,{className:Ap,size:c})]}),i.label?jsx("span",{...p,className:$p,children:i.label}):null]})});Oo.displayName="ProgressSpinner";var Nr=z({defaultClassName:"_5uw3kp0 oom8bs0 z9nup82",variantClassNames:{isHovered:{true:"_5uw3kp1"},isFocusVisible:{true:"_5uw3kp2"},isDisabled:{true:"_5uw3kp3"},isSelected:{true:"_5uw3kp4"},size:{sm:"_5uw3kp5",md:"_5uw3kp6",lg:"_5uw3kp7"},variant:{primary:"_5uw3kp8",toolbar:"_5uw3kp9"}},defaultVariants:{},compoundVariants:[[{isSelected:!0,isFocusVisible:!0},"_5uw3kpa"],[{isSelected:!0,isDisabled:!0},"_5uw3kpb"],[{variant:"primary",size:"lg"},"_5uw3kpc"]]}),Gp=z({defaultClassName:"_5uw3kpd _1yep5z6f5",variantClassNames:{isDisabled:{true:"_1yep5z610z"},isSelected:{true:"_1yep5z6111"}},defaultVariants:{},compoundVariants:[]});var D6={sm:16,md:20,lg:24},Lr=ro.forwardRef(({className:e,style:o,iconStart:t,size:r="md",elementType:a="button",variant:n="toolbar",...i},s)=>{let p=useToggleState(i),{buttonProps:l,isPressed:c,ref:u,isFocusVisible:m,isFocused:d,isHovered:f,uiStateOptions:y}=pr(i,p),b=filterTruthyValues({"data-block-id":i["data-block-id"],"data-block-class":i["data-block-class"],"data-focused":d,"data-focus-visible":m,"data-disabled":i.isDisabled,"data-hovered":f,"data-pressed":c,"data-selected":p.isSelected});return jsxs(a,{...mergeProps(l,b),className:classNames(Nr({isHovered:f,isFocusVisible:m,isSelected:p.isSelected,size:r,isDisabled:i.isDisabled,variant:n}),"BaselineUI-ToggleButton",typeof e=="function"?e(y):e),style:typeof o=="function"?o(y):o,ref:M(u,s),children:[t?jsx(t,{size:D6[r],className:Gp({isDisabled:i.isDisabled,isSelected:p.isSelected})}):null,i.label]})});Lr.displayName="ToggleButton";var Mr=z({defaultClassName:"_16vugd0f",variantClassNames:{isDisabled:{true:"_16vugd0g"}},defaultVariants:{},compoundVariants:[]}),Wp=z({defaultClassName:"_16vugd02 _1yep5z6ih _1yep5z6ii _1yep5z6ij _1yep5z6j8 _1yep5z6j9 _1yep5z6ja",variantClassNames:{labelPosition:{end:"_1yep5z614i _1yep5z614j _1yep5z614k _1yep5z6va _1yep5z6vb _1yep5z6vc",start:"_1yep5z614o _1yep5z614p _1yep5z614q _1yep5z6160 _1yep5z6161 _1yep5z6162"}},defaultVariants:{},compoundVariants:[]}),Xp=z({defaultClassName:"_16vugd06",variantClassNames:{isIndeterminate:{true:"_16vugd05"},isSelected:{true:"_16vugd05"},isFocusVisible:{true:"_16vugd09"},isHovered:{true:"_16vugd0a"},isDisabled:{true:"_16vugd0b"},isReadOnly:{true:"_16vugd0c"},hasError:{true:"_16vugd0d"}},defaultVariants:{},compoundVariants:[[{isSelected:!0,isDisabled:!0},"_16vugd0e"]]});var Qp=ro.forwardRef(({className:e,style:o,label:t,labelPosition:r="end","data-block-id":a,"data-block-class":n,...i},s)=>{let p=ro.useRef(null),l=useToggleState(i),{isFocusVisible:c,isFocused:u,focusProps:m}=useFocusRing(),{inputProps:d,isPressed:f,isDisabled:y,isSelected:b,isReadOnly:v}=useCheckbox({...i,children:t},l,p),{hoverProps:_,isHovered:g}=useHover({isDisabled:y}),h=filterTruthyValues({"data-disabled":y,"data-readonly":v,"data-hovered":g,"data-selected":b,"data-pressed":f,"data-indeterminate":i.isIndeterminate,"data-invalid":i.isInvalid,"data-focus-visible":c,"data-focused":u,"data-block-id":a,"data-block-class":n});return jsxs("label",{...h,className:classNames(Wp({labelPosition:r}),"BaselineUI-Checkbox",e),style:o,ref:s,children:[jsx(VisuallyHidden,{children:jsx("input",{...mergeProps(d,m),ref:p})}),jsxs("div",{..._,className:Xp({isSelected:b&&!i.isIndeterminate,isIndeterminate:i.isIndeterminate,isFocusVisible:c,isDisabled:y,isReadOnly:v,hasError:i.isInvalid,isHovered:g}),children:[b&&!i.isIndeterminate?jsx(CheckmarkIcon$1,{size:12}):null,i.isIndeterminate?jsx(MinusIcon$1,{size:12}):null]}),t?jsx("span",{className:Mr({isDisabled:y}),children:t}):null]})});Qp.displayName="Checkbox";var Jp={ar:{goToPage:"\u0627\u0646\u062A\u0642\u0627\u0644 \u0625\u0644\u0649 \u0635\u0641\u062D\u0629",nextPage:"\u0627\u0644\u0635\u0641\u062D\u0629 \u0627\u0644\u062A\u0627\u0644\u064A\u0629",pageXofY:"\u0635\u0641\u062D\u0629 {arg0} \u0645\u0646 {arg1}",prevPage:"\u0627\u0644\u0635\u0641\u062D\u0629 \u0627\u0644\u0633\u0627\u0628\u0642\u0629"},cs:{goToPage:"P\u0159ej\xEDt na stranu",nextPage:"Dal\u0161\xED str\xE1nka",pageXofY:"Strana {arg0} z {arg1}",prevPage:"P\u0159edchoz\xED strana"},cy:{goToPage:"Mynd i Dudalen",nextPage:"Tudalen Nesaf",pageXofY:"Tudalen {arg0} o {arg1}",prevPage:"Tudalen Blaenorol"},da:{goToPage:"G\xE5 til side",nextPage:"N\xE6ste side",pageXofY:"Side {arg0} af {arg1}",prevPage:"Forrige side"},de:{goToPage:"Zu Seite wechseln",nextPage:"N\xE4chste Seite",pageXofY:"Seite {arg0} von {arg1}",prevPage:"Vorherige Seite"},el:{goToPage:"\u039C\u03B5\u03C4\u03AC\u03B2\u03B1\u03C3\u03B7 \u03C3\u03C4\u03B7 \u03C3\u03B5\u03BB\u03AF\u03B4\u03B1",nextPage:"\u0395\u03C0\u03CC\u03BC\u03B5\u03BD\u03B7 \u03C3\u03B5\u03BB\u03AF\u03B4\u03B1",pageXofY:"\u03A3\u03B5\u03BB\u03AF\u03B4\u03B1 {arg0} \u03B1\u03C0\u03CC {arg1}",prevPage:"\u03A0\u03C1\u03BF\u03B7\u03B3\u03BF\u03CD\u03BC\u03B5\u03BD\u03B7 \u03C3\u03B5\u03BB\u03AF\u03B4\u03B1"},"en-GB":{goToPage:"Go to Page",nextPage:"Next Page",pageXofY:"Page {arg0} of {arg1}",prevPage:"Previous Page"},en:{goToPage:"Go to Page",nextPage:"Next Page",pageXofY:"Page {arg0} of {arg1}",prevPage:"Previous Page"},es:{goToPage:"Ir a la p\xE1gina",nextPage:"P\xE1gina siguiente",pageXofY:"P\xE1gina {arg0} de {arg1}",prevPage:"P\xE1gina anterior"},fi:{goToPage:"Mene sivulle",nextPage:"Seuraava sivu",pageXofY:"Sivu {arg0} / {arg1}",prevPage:"Edellinen sivu"},"fr-CA":{goToPage:"Aller \xE0 la page",nextPage:"Page suivante",pageXofY:"Page {arg0} sur {arg1}",prevPage:"Page pr\xE9c\xE9dente"},fr:{goToPage:"Aller \xE0 la page",nextPage:"Page suivante",pageXofY:"Page {arg0} sur {arg1}",prevPage:"Page pr\xE9c\xE9dente"},he:{goToPage:"\u05DE\u05E2\u05D1\u05E8 \u05DC\u05E2\u05DE\u05D5\u05D3",nextPage:"\u05D4\u05E2\u05DE\u05D5\u05D3 \u05D4\u05D1\u05D0",pageXofY:"\u05E2\u05DE\u05D5\u05D3 {arg0} \u05DE\u05EA\u05D5\u05DA {arg1}",prevPage:"\u05D4\u05E2\u05DE\u05D5\u05D3 \u05D4\u05E7\u05D5\u05D3\u05DD"},hr:{goToPage:"Idi na stranicu",nextPage:"Slijede\u0107a stranica",pageXofY:"Stranica {arg0} od {arg1}",prevPage:"Prethodna stranica"},id:{goToPage:"Buka halaman",nextPage:"Halaman Berikutnya",pageXofY:"Halaman {arg0} dari {arg1}",prevPage:"Halaman Sebelumnya"},it:{goToPage:"Vai a pagina",nextPage:"Pagina successiva",pageXofY:"Pagina {arg0} di {arg1}",prevPage:"Pagina precedente"},ja:{goToPage:"\u30DA\u30FC\u30B8\u306B\u79FB\u52D5",nextPage:"\u6B21\u306E\u30DA\u30FC\u30B8",pageXofY:"\u30DA\u30FC\u30B8 {arg0}/{arg1}",prevPage:"\u524D\u306E\u30DA\u30FC\u30B8"},ko:{goToPage:"\uD398\uC774\uC9C0\uB85C \uC774\uB3D9",nextPage:"\uB2E4\uC74C \uD398\uC774\uC9C0",pageXofY:"{arg0}/{arg1} \uD398\uC774\uC9C0",prevPage:"\uC774\uC804 \uD398\uC774\uC9C0"},ms:{goToPage:"Pergi ke Halaman",nextPage:"Halaman Seterusnya",pageXofY:"Halaman {arg0} daripada {arg1}",prevPage:"Halaman Sebelumnya"},"nb-NO":{goToPage:"G\xE5 til side",nextPage:"Neste side",pageXofY:"Side {arg0} av {arg1}",prevPage:"Forrige side"},nl:{goToPage:"Ga naar pagina",nextPage:"Volgende pagina",pageXofY:"Pagina {arg0} van {arg1}",prevPage:"Vorige pagina"},pl:{goToPage:"Przejd\u017A do strony",nextPage:"Nast\u0119pna strona",pageXofY:"Strona {arg0} z {arg1}",prevPage:"Poprzednia strona"},"pt-PT":{goToPage:"Ir para p\xE1gina",nextPage:"P\xE1gina seguinte",pageXofY:"P\xE1gina {arg0} de {arg1}",prevPage:"P\xE1gina anterior"},pt:{goToPage:"Ir \xE0 P\xE1gina",nextPage:"P\xE1gina Seguinte",pageXofY:"P\xE1gina {arg0} de {arg1}",prevPage:"P\xE1gina Anterior"},ru:{goToPage:"\u041F\u0435\u0440\u0435\u0439\u0442\u0438 \u043A \u0441\u0442\u0440\u0430\u043D\u0438\u0446\u0435",nextPage:"\u0421\u043B\u0435\u0434\u0443\u044E\u0449\u0430\u044F \u0441\u0442\u0440\u0430\u043D\u0438\u0446\u0430",pageXofY:"\u0421\u0442\u0440\u0430\u043D\u0438\u0446\u0430 {arg0} \u0438\u0437 {arg1}",prevPage:"\u041F\u0440\u0435\u0434\u044B\u0434\u0443\u0449\u0430\u044F \u0441\u0442\u0440\u0430\u043D\u0438\u0446\u0430"},sk:{goToPage:"\xCDs\u0165 na stranu",nextPage:"Dal\u0161ia strana",pageXofY:"Strana {arg0} z {arg1}",prevPage:"Predch\xE1dzaj\xFAca strana"},sl:{goToPage:"Pojdi na stran",nextPage:"Naslednja stran",pageXofY:"Stran {arg0} od {arg1}",prevPage:"Prej\u0161nja stran"},sv:{goToPage:"G\xE5 till sida",nextPage:"N\xE4sta sida",pageXofY:"Sida {arg0} av {arg1}",prevPage:"F\xF6reg\xE5ende sida"},th:{goToPage:"\u0E44\u0E1B\u0E17\u0E35\u0E48\u0E2B\u0E19\u0E49\u0E32",nextPage:"\u0E2B\u0E19\u0E49\u0E32\u0E16\u0E31\u0E14\u0E44\u0E1B",pageXofY:"\u0E2B\u0E19\u0E49\u0E32 {arg0} \u0E08\u0E32\u0E01 {arg1}",prevPage:"\u0E2B\u0E19\u0E49\u0E32\u0E01\u0E48\u0E2D\u0E19\u0E2B\u0E19\u0E49\u0E32"},tr:{goToPage:"Sayfaya Git",nextPage:"Sonraki Sayfa",pageXofY:"Sayfa {arg0}/{arg1}",prevPage:"\xD6nceki Sayfa"},uk:{goToPage:"\u041F\u0435\u0440\u0435\u0439\u0442\u0438 \u043D\u0430 \u0441\u0442\u043E\u0440\u0456\u043D\u043A\u0443",nextPage:"\u041D\u0430\u0441\u0442\u0443\u043F\u043D\u0430 \u0441\u0442\u043E\u0440\u0456\u043D\u043A\u0430",pageXofY:"\u0421\u0442\u043E\u0440\u0456\u043D\u043A\u0430 {arg0} \u0437 {arg1}",prevPage:"\u041F\u043E\u043F\u0435\u0440\u0435\u0434\u043D\u044F \u0441\u0442\u043E\u0440\u0456\u043D\u043A\u0430"},"zh-Hans":{goToPage:"\u524D\u5F80\u9875\u9762",nextPage:"\u4E0B\u4E00\u9875",pageXofY:"\u7B2C {arg0}/{arg1} \u9875",prevPage:"\u4E0A\u4E00\u9875"},"zh-Hant":{goToPage:"\u5230\u6B64\u9801",nextPage:"\u4E0B\u4E00\u9801",pageXofY:"\u7B2C{arg0}\u9801\uFF0C\u5171{arg1}\u9801",prevPage:"\u4E0A\u4E00\u9801"}};var ec=z({defaultClassName:"_1nsi9h17",variantClassNames:{isFocused:{true:"_1nsi9h18"},variant:{pinned:"_1nsi9h19",floating:"_1nsi9h1a"},size:{xs:"_1nsi9h1b",sm:"_1nsi9h1c",md:"_1nsi9h1d",lg:"_1nsi9h1e"}},defaultVariants:{},compoundVariants:[]}),oc="_1nsi9h1f _1yep5z6ln _1yep5z6lf _1yep5z6eu",tc=z({defaultClassName:"_1yep5z6al _1yep5z6am _1yep5z6an _1yep5z6b9 _1yep5z6ba _1yep5z6bb _1yep5z6bx _1yep5z6by _1yep5z6bz _1yep5z6cl _1yep5z6cm _1yep5z6cn _1yep5z6ik _1yep5z6il _1yep5z6im _1yep5z6iq _1yep5z6ir _1yep5z6is _1yep5z6j8 _1yep5z6j9 _1yep5z6ja _1yep5z6g1 _1yep5z6e1",variantClassNames:{size:{xs:"_1nsi9h11 _1yep5z6wa _1yep5z6wb _1yep5z6wc _1yep5z6wy _1yep5z6wz _1yep5z6x0 _1yep5z6xm _1yep5z6xn _1yep5z6xo _1yep5z6ya _1yep5z6yb _1yep5z6yc _1yep5z6zn",sm:"_1nsi9h12 _1yep5z6zq",md:"_1nsi9h13",lg:"_1nsi9h14"},variant:{floating:"_1yep5z6yz _1yep5z617i _1yep5z617g _1yep5z612q",pinned:"_1yep5z6174"}},defaultVariants:{},compoundVariants:[]}),rc=z({defaultClassName:"_1nsi9h1g _1yep5z6ev",variantClassNames:{isDisabled:{true:"_1yep5z610q"}},defaultVariants:{},compoundVariants:[]});var d5={style:"decimal"},u5={xs:[CaretLeftIcon,CaretRightIcon],sm:[CaretLeftIcon$1,CaretRightIcon$1],md:[CaretLeftIcon$2,CaretRightIcon$2],lg:[CaretLeftIcon$3,CaretRightIcon$3]},lc=ro.forwardRef(({className:e,style:o,minValue:t=1,defaultValue:r=1,incrementAriaLabel:a,decrementAriaLabel:n,"aria-label":i,size:s="md",variant:p="floating",hideActions:l,isDisabled:c,...u},m)=>{let{locale:d}=useLocale(),f=F(Jp),y={...u,formatOptions:d5,minValue:t,incrementAriaLabel:a||f.formatMessage("nextPage"),decrementAriaLabel:n||f.formatMessage("prevPage"),defaultValue:r,"aria-label":i||f.formatMessage("goToPage")},b=ro.useRef(null),v=useNumberFieldState({...y,locale:d}),{inputProps:_,decrementButtonProps:g,incrementButtonProps:h,groupProps:R}=useNumberField({...y,onKeyDown:D=>{D.key==="Enter"&&b.current?.blur(),u.onKeyDown?.(D);},isDisabled:c},v,b),{hoverProps:x,isHovered:I}=useHover({}),{focusProps:k,isFocused:S,isFocusVisible:N}=useFocusRing(),w=p==="floating",[T,P]=u5[s],C=filterTruthyValues({"data-focus-visible":N,"data-focused":S,"data-hovered":I,"data-block-id":u["data-block-id"],"data-block-class":u["data-block-class"]}),H=useInteractionModality()==="keyboard";return jsxs("div",{...mergeProps(R,x,C),className:classNames(tc({size:s,variant:p}),"BaselineUI-Pagination",e),style:o,ref:m,children:[l?null:jsxs(Fragment,{children:[jsx(B,{icon:T,...g,elementType:"div",size:s,style:{height:"100%",...w&&{borderRadius:0}},className:"BaselineUI-Pagination-DecrementButton",UNSAFE_NON_INTERACTIVE:H,isDisabled:c||g.isDisabled}),p==="floating"&&jsx(O,{orientation:"vertical"})]}),jsxs("div",{className:ec({isFocused:S,variant:p,size:s}),"aria-label":f.formatMessage("pageXofY",{arg0:_.value,arg1:v.maxValue}),children:[jsx("input",{...mergeProps(_,k),ref:b,className:classNames("BaselineUI-Pagination-Input",oc),style:{width:`${_.value?.toString().length||1}ch`}}),jsxs("span",{className:rc({isDisabled:c}),children:["/ ",jsx(Ho,{value:v.maxValue})]})]}),l?null:jsxs(Fragment,{children:[p==="floating"&&jsx(O,{orientation:"vertical"}),jsx(B,{icon:P,...h,elementType:"div",size:s,style:{height:"100%",...w&&{borderRadius:0}},className:"BaselineUI-Pagination-IncrementButton",UNSAFE_NON_INTERACTIVE:H,isDisabled:c||h.isDisabled})]})]})});lc.displayName="Pagination";var pc=({date:e,...o})=>{let t=useDateFormatter(o);return jsx(Fragment,{children:t.format(e)})};pc.displayName="DateFormat";var Ct=z({defaultClassName:"_1f789qjr",variantClassNames:{variant:{neutral:"_1yep5z610x",red:"_1yep5z6107",green:"_1yep5z610b",blue:"_1yep5z610j","high-contrast":"_1yep5z6110"},isDisabled:{true:"_1yep5z61mr"},isSelected:{true:"_1yep5z6111"}},defaultVariants:{},compoundVariants:[]}),Er=z({defaultClassName:"_1f789qj1",variantClassNames:{isFocusVisible:{true:"_1f789qj2"},variant:{neutral:"_1f789qj3",red:"_1f789qj4",green:"_1f789qj5",blue:"_1f789qj6","high-contrast":"_1f789qj7"},isDisabled:{true:"_1f789qj8"},allowsRemoving:{true:"_1f789qj9"},isSelected:{true:"_1f789qja"},allowsSelection:{true:"_1f789qjb"},isHovered:{true:"_1f789qjc"}},defaultVariants:{},compoundVariants:[[{allowsSelection:!0,isHovered:!0,variant:"neutral"},"_1f789qjd"],[{allowsSelection:!0,isHovered:!0,variant:"red"},"_1f789qje"],[{allowsSelection:!0,isHovered:!0,variant:"blue"},"_1f789qjf"],[{allowsSelection:!0,isHovered:!0,variant:"green"},"_1f789qjg"],[{allowsSelection:!0,isHovered:!0,variant:"high-contrast"},"_1f789qjh"],[{allowsSelection:!0,isSelected:!0,isHovered:!0},"_1f789qji"]]}),cc="_1f789qjz",dc="_1f789qj0",uc=z({defaultClassName:"_1f789qj10",variantClassNames:{variant:{neutral:"_1f789qj11",red:"_1f789qj12",green:"_1f789qj13",blue:"_1f789qj14","high-contrast":"_1f789qj15"},isHovered:{true:"_1f789qj16"}},defaultVariants:{},compoundVariants:[[{isHovered:!0,variant:"neutral"},"_1f789qj17"],[{isHovered:!0,variant:"red"},"_1f789qj18"],[{isHovered:!0,variant:"blue"},"_1f789qj19"],[{isHovered:!0,variant:"green"},"_1f789qj1a"],[{isHovered:!0,variant:"high-contrast"},"_1f789qj1b"]]}),Br=z({defaultClassName:"_1f789qjj",variantClassNames:{variant:{neutral:"_1yep5z610m",red:"_1yep5z6107",green:"_1yep5z610b",blue:"_1yep5z610j","high-contrast":"_1yep5z610r"},isDisabled:{true:"_1yep5z61mi"},isSelected:{true:"_1yep5z610s"}},defaultVariants:{},compoundVariants:[]});var bc=({item:e,state:o,variant:t="neutral"})=>{let r=ro.useRef(null),{focusProps:a,isFocusVisible:n}=useFocusRing({within:!0}),{rowProps:i,gridCellProps:s,removeButtonProps:p,allowsRemoving:l,isDisabled:c,isSelected:u,allowsSelection:m}=useTag({item:e},o,r),d=ro.useRef(null),{buttonProps:f}=useButton(p,d),{hoverProps:y,isHovered:b}=useHover({isDisabled:c}),{hoverProps:v,isHovered:_}=useHover({isDisabled:c}),g=e.value?.icon,h=e.value?.data?.variant??t;return jsx("div",{...mergeProps(i,a,v),ref:r,className:classNames(Er({isFocusVisible:n,variant:h,isDisabled:c,allowsRemoving:l,isSelected:u,allowsSelection:m,isHovered:_}),Br({variant:h,isDisabled:c,isSelected:u}),"BaselineUI-Tag"),children:jsxs("div",{...s,className:cc,children:[u?jsx(CheckmarkIcon$3,{size:16,className:Ct({variant:h,isDisabled:c,isSelected:u})}):null,!u&&g?jsx(g,{size:16,className:Ct({variant:h,isDisabled:c,isSelected:u})}):null,e.rendered,l?jsx("button",{...mergeProps(f,y),className:uc({variant:h,isHovered:b}),children:jsx(XIcon$2,{})}):null]})})};var _c=ro.forwardRef(({className:e,style:o,"data-block-id":t,"data-block-class":r,items:a,...n},i)=>{let s=useMemo(()=>a.map(m=>({...m,data:{variant:m.variant}})),[a]),p=te(),l=ro.useRef(null),c=useListState({...n,items:s,children:p}),{gridProps:u}=useTagGroup(n,c,l);return jsx("div",{...u,className:classNames(dc,"BaselineUI-TagGroup",e),style:o,"data-block-id":t,"data-block-class":r,ref:M(i,l),children:[...c.collection].map(m=>jsx(bc,{state:c,item:m,variant:n.variant},m.key))})});_c.displayName="TagGroup";var zc="_1yep5z6lc",hc=z({defaultClassName:"_1kvz17db _1yep5z6kz _1yep5z6l1",variantClassNames:{showActionsOnTriggerOnly:{true:"_1kvz17dc"},isTriggered:{true:"_1kvz17dd"}},defaultVariants:{},compoundVariants:[]}),xc=z({defaultClassName:"_1kvz17d0 _1yep5z64u _1yep5z64v _1yep5z64w _1yep5z676 _1yep5z677 _1yep5z678 _1yep5z68c _1yep5z68d _1yep5z68e _1yep5z660 _1yep5z661 _1yep5z662 _1yep5z6kz _1yep5z6l0",variantClassNames:{isExpanded:{true:"_1kvz17d1"}},defaultVariants:{},compoundVariants:[]}),Cc="_1yep5z6ev _1yep5z6dy",Pc=z({defaultClassName:"_1kvz17d2 _1yep5z63o _1yep5z63p _1yep5z63q _1yep5z61f _1yep5z61g _1yep5z61h _1yep5z63 _1yep5z64 _1yep5z65 _1yep5z62f _1yep5z62g _1yep5z62h _1yep5z6ih _1yep5z6ii _1yep5z6ij _1yep5z6j8 _1yep5z6j9 _1yep5z6ja _1yep5z6k8 _1yep5z6k9 _1yep5z6ka _1yep5z6kz _1yep5z6l2",variantClassNames:{isFocusVisible:{true:"_1kvz17d3"},isHovered:{true:"_1yep5z6g2",false:"_1yep5z6g3"},isDisabled:{true:"z9nup83"}},defaultVariants:{},compoundVariants:[]}),kc="_1kvz17da _1yep5z66 _1yep5z67 _1yep5z68 _1yep5z62i _1yep5z62j _1yep5z62k _1yep5z6dz",Ic=z({defaultClassName:"_1kvz17d7 _1yep5z6ih _1yep5z6ii _1yep5z6ij _1yep5z6j8 _1yep5z6j9 _1yep5z6ja",variantClassNames:{isDisabled:{true:"_1yep5z6ey",false:"_1yep5z6eu"}},defaultVariants:{},compoundVariants:[]});var zn=ro.forwardRef(({children:e,className:o,style:t},r)=>{let{headers:a}=useContext(Ge),{disabledKeys:n}=useContext(Ge),{keyboardProps:i}=useKeyboard({onKeyDown:s=>{let p=Te(s.target),l=[...a?.keys()||[]].findIndex(f=>a?.get(f)?.current===p?.activeElement),c=a?.get(l||0),u=a?.size||0,m=f=>{let y=a.get(f-1<0?u-1:f-1);n?.has(y?.current?.getAttribute("data-key")||"")?m(f-1):y?.current?.focus();},d=f=>{let y=a.get((f+1)%u);n?.has(y?.current?.getAttribute("data-key")||"")?d(f+1):y?.current?.focus();};if(c)switch(s.key){case"Home":{s.preventDefault(),d(-1);break}case"End":{s.preventDefault(),m(u);break}case"ArrowDown":{s.preventDefault(),d(l);break}case"ArrowUp":{s.preventDefault(),m(l);break}default:s.continuePropagation();}}});return jsx("div",{...i,style:t,className:classNames(zc,o),ref:r,children:ro.Children.map(e,(s,p)=>ro.cloneElement(s,{index:p}))})});zn.displayName="AccordionBase";var Ge=ro.createContext({expandedKeys:new Set,setExpandedKeys:()=>{},disabledKeys:new Set,headers:new Map,expansionMode:"multiple"}),Sc=ro.forwardRef(({children:e,disabledKeys:o,defaultExpandedKeys:t=new Set,expandedKeys:r,expansionMode:a="multiple",onChange:n,className:i,style:s},p)=>{let[l,c]=ro.useState(t),u=ro.useRef(new Map).current,[m,d]=ro.useState(a);useEffect(()=>{d(m);},[m]),useEffect(()=>{n?.(l);},[l,n]);let f=useMemo(()=>({expandedKeys:r||l,setExpandedKeys:r?()=>{}:c,disabledKeys:o,headers:u,expansionMode:m}),[r,l,o,u,m]);return jsx(Ge.Provider,{value:f,children:jsx(FocusScope,{children:jsx(zn,{className:i,style:s,ref:p,children:e})})})});Sc.displayName="Accordion";var xn=ro.forwardRef(({title:e,actions:o,controlId:t,value:r,id:a,index:n,subLabel:i,showActionsOnTriggerOnly:s},p)=>{let l=ro.useRef(null),{expandedKeys:c,setExpandedKeys:u,expansionMode:m,disabledKeys:d,headers:f}=useContext(Ge),y=d?.has(r),b=useFocusManager();invariant(b);let{focusNext:v,focusPrevious:_}=b,{keyboardProps:g}=useKeyboard({onKeyDown:C=>{C.key==="ArrowRight"?v({wrap:!0}):C.key==="ArrowLeft"?_({wrap:!0}):C.continuePropagation();},isDisabled:y});useEffect(()=>{invariant(typeof n=="number","AccordionItem must have an index"),f?.set(n,l);},[n,f]);let h=()=>{u(C=>{let E=new Set(C);return E.has(r)?E.delete(r):(m==="single"&&E.clear(),E.add(r)),E});},{buttonProps:R}=useButton({"aria-expanded":c.has(r),"aria-controls":t,onPress:h,isDisabled:y},l),{pressProps:x}=usePress({onPress:h,isDisabled:y}),{focusProps:I,isFocusVisible:k}=useFocusRing(),{hoverProps:S,isHovered:N}=useHover({isDisabled:y}),{focusProps:w,isFocusVisible:T}=useFocusRing({within:!0}),P=c.has(r);return jsxs("h3",{...mergeProps(g,x,S,w),className:Pc({isFocusVisible:k,isHovered:N,isDisabled:y}),ref:p,children:[jsxs("div",{className:Ic({isDisabled:!!y}),children:[jsx(ChevronRightIcon,{className:xc({isExpanded:P}),size:8}),jsx("button",{...mergeProps(R,I),id:a,"data-key":r,className:kc,ref:l,children:e})]}),o?.length?jsx("div",{"data-testid":"action-buttons",className:hc({showActionsOnTriggerOnly:s,isTriggered:T||N}),children:o.map((C,E)=>jsx(B,{variant:"secondary",size:"sm",excludeFromTabOrder:!0,isDisabled:y,...C},E))}):null,i?jsx("div",{className:Cc,children:i}):null]})});xn.displayName="AccordionHeader";var Fc=ro.forwardRef(({title:e,actions:o,children:t,value:r,index:a,subLabel:n,style:i,className:s,showActionsOnTriggerOnly:p},l)=>{let c=useId(),u=useId(),{expandedKeys:m}=useContext(Ge),d=ro.useRef(null),f=m.has(r),y=Io(),b=useReducedMotion(),v=useTransition(f?[r]:[],{from:!y&&!b&&{height:0,opacity:0},enter:()=>async _=>{await _({height:d.current?.scrollHeight,opacity:1});},leave:{height:0,opacity:0},keys:_=>_.toString()});return jsxs(Fragment,{children:[jsx(FocusScope,{children:jsx(xn,{value:r,actions:o,id:u,title:e,controlId:c,ref:l,index:a,subLabel:n,showActionsOnTriggerOnly:p})}),v(_=>jsx(animated.div,{role:"region","aria-labelledby":u,id:c,style:{..._,overflow:"hidden"},children:jsx("div",{ref:d,className:s,style:i,children:t})}))]})});Fc.displayName="AccordionItem";var wt=ro.forwardRef(({variant:e,isOpen:o,selectedIcon:t,validationState:r="valid",valueProps:a,label:n,className:i,style:s,"data-block-id":p,"data-block-class":l,...c},u)=>{let m=ro.useRef(null),{buttonProps:d,isPressed:f}=useButton({...c,isDisabled:c.isDisabled||c.isReadOnly},m),{hoverProps:y,isHovered:b}=useHover({isDisabled:c.isDisabled}),{focusProps:v,isFocused:_,isFocusVisible:g}=useFocusRing(),h=Fo({isReadOnly:c.isReadOnly,validationState:r});c.isReadOnly&&(d.disabled=!1);let R=filterTruthyValues({"data-disabled":c.isDisabled,"data-readonly":c.isReadOnly,"data-focused":_,"data-focus-visible":g,"data-hovered":b,"data-pressed":f,"data-open":o,"data-block-id":p,"data-block-class":l});return jsxs("button",{...mergeProps(d,y,v,R),ref:M(u,m),className:classNames(Hl({isFocused:g,isDisabled:c.isDisabled}),Po({variant:e,isHovered:b,isFocused:g,validationState:r,isDisabled:!!c.isDisabled,isReadOnly:c.isReadOnly}),i,"BaselineUI-Select-Button"),style:s,children:[jsxs("span",{className:Ol,children:[t?jsx(t,{size:24}):null,jsx("span",{...a,children:n})]}),h?jsx("span",{"aria-hidden":!0,className:classNames(Co({validationState:r,isReadOnly:!!c.isReadOnly}),Vl),children:jsx(h,{size:16})}):null,jsx("span",{"aria-hidden":!0,children:jsx(CaretDownIcon,{size:8,className:Fl({isOpen:o})})})]})});wt.displayName="SelectButton";var Fr=ro.createContext({state:null,popoverAnchorRef:null}),kn=ro.forwardRef(({className:e,style:o,labelPosition:t="top",variant:r="primary","data-block-id":a,"data-block-class":n,optionStyle:i,optionClassName:s,placement:p="bottom start",triggerClassName:l,triggerStyle:c,state:u,renderTrigger:m=({buttonProps:y,selectedValue:b,valueProps:v,isOpen:_,ref:g})=>{let h=b&&"icon"in b&&b.icon;return jsx(wt,{...y,className:l,style:c,isOpen:_,isReadOnly:d.isReadOnly,ref:g,variant:r,validationState:d.validationState,selectedIcon:h||void 0,label:b?"label"in b&&b?.label:d.placeholder,valueProps:v})},...d},f)=>{let{popoverAnchorRef:y}=useContext(Fr),b=ro.useRef(null),v=ge(d.portalContainer),{labelProps:_,triggerProps:g,valueProps:h,menuProps:R,descriptionProps:x,errorMessageProps:I}=useSelect({...d,validationState:d.validationState==="error"?"invalid":"valid"},u,b),k=Ie({...d,descriptionProps:x,errorMessageProps:I,labelPosition:t}),S=u.selectedItem?.value??null;return jsxs(ao.Provider,{value:u,children:[jsxs("div",{style:o,className:classNames(je({labelPosition:t}),"BaselineUI-Select",e),"data-block-id":a,"data-block-class":n,ref:f,children:[d.label||k?jsxs("div",{className:Oe({labelPosition:t,hasMessage:!!k}),children:[d.label?jsx("div",{..._,className:classNames(Ve,"BaselineUI-Select-Label"),children:d.label}):null,t==="start"&&k]}):null,jsx(HiddenSelect,{state:u,triggerRef:b,isDisabled:d.isDisabled,label:d.label,name:d.name}),m({buttonProps:g,selectedValue:S,valueProps:h,isOpen:u.isOpen,ref:b}),t==="top"&&k]}),u?jsx(ye,{placement:p,portalContainer:v,offset:d.offset||2,state:u,triggerRef:y||b,style:o,className:classNames(qe,"BaselineUI-Select-Popover"),...d,children:jsx(le,{...R,label:d.label,items:d.items,showSelectedIcon:d.showSelectedIcon,className:kr,optionStyle:i,optionClassName:s})}):null]})});kn.displayName="SelectCore";var Ac=ro.forwardRef((e,o)=>{let t=te(),r=useSelectState({...e,validationState:e.validationState==="error"?"invalid":"valid",children:t});return jsx(kn,{...e,ref:o,state:r})});Ac.displayName="SelectStandalone";var Xe=ro.forwardRef((e,o)=>{let{state:t}=useContext(Fr);return useEffect(()=>{invariant(t||e.items,"Select: A `state` that can be passed via context or `items` are required.");},[e.items,t]),t?jsx(kn,{state:t,...e,ref:o}):jsx(Ac,{...e,ref:o})});Xe.displayName="Select";var Uc=ro.forwardRef(({className:e,style:o,variant:t,"data-block-id":r,icon:a,tooltipProps:n,...i},s)=>{let p=ro.useRef(null),l=useCallback(({buttonProps:c,selectedValue:u,valueProps:m,isOpen:d,ref:f})=>{let y=u&&"icon"in u&&u.icon;return jsx(ne,{variant:"inverse",size:"sm",includeArrow:!1,text:i["aria-label"],offset:4,...n,children:jsx(wt,{...c,isOpen:d,isReadOnly:i.isReadOnly,ref:f,variant:t,validationState:i.validationState,selectedIcon:y||void 0,label:u?"label"in u&&u?.label:i.placeholder,valueProps:m})})},[i,n,t]);return jsxs(L,{display:"flex",flexDirection:"row",gap:"md",paddingX:"md",alignItems:"center",className:classNames("BaselineUI-IconSelect",e),"data-block-id":r,style:o,ref:M(s,p),children:[a?jsx(a,{size:24,className:sprinkles({color:"icon.primary",display:"flex",flexShrink:0})}):null,jsx(Xe,{...i,renderTrigger:l})]})});Uc.displayName="IconSelect";var qc="_1017q4c5",Kc=z({defaultClassName:"_1017q4c0",variantClassNames:{size:{md:"_1017q4c1",sm:"_1017q4c2"},isDisabled:{true:"_1017q4c3"}},defaultVariants:{},compoundVariants:[]}),Gc="_1017q4c4";var uz={sm:AvatarIcon,md:AvatarIcon$1},$o=ro.forwardRef(({className:e,style:o,size:t="md",icon:r=uz[t],name:a,imgSrc:n,showInitials:i,isDisabled:s,hasNotifications:p,imgLoading:l,"data-block-id":c,"data-block-class":u},m)=>{let{imgProps:d}=ko({src:n,alt:a}),f=a?.split(" ").map(y=>y[0]).join("");return jsxs("span",{className:classNames(Kc({size:t,isDisabled:s}),"BaselineUI-Avatar",e),"data-disabled":s,ref:m,style:o,"aria-disabled":s,"data-block-id":c,"data-block-class":u,children:[n?jsx("img",{...d,loading:l,className:Gc}):null,!i&&!n&&jsx(r,{size:t==="sm"?16:24}),i&&!n?t==="sm"?f[0]:f:null,p?jsx("div",{"data-testid":"notification",className:qc}):null]})});$o.displayName="Avatar";var Wc="_1yep5z63 _1yep5z64 _1yep5z65 _1yep5z62f _1yep5z62g _1yep5z62h _1yep5z63l _1yep5z63m _1yep5z63n _1yep5z619 _1yep5z61a _1yep5z61b _1yep5z6ih _1yep5z6ii _1yep5z6ij _1yep5z6j8 _1yep5z6j9 _1yep5z6ja",Xc=z({defaultClassName:"_1x62fhb6 _1yep5z63r _1yep5z63s _1yep5z63t _1yep5z61f _1yep5z61g _1yep5z61h _1yep5z6ih _1yep5z6ii _1yep5z6ij _1yep5z6j8 _1yep5z6j9 _1yep5z6ja _1yep5z6le _1yep5z6lf _1yep5z6kz _1yep5z6l2 _1yep5z6ev _1yep5z69i _1yep5z69j _1yep5z69k",variantClassNames:{isHovered:{true:"_1yep5z610m"},isSelected:{true:"_1x62fhb8"},isFocusVisible:{true:"_1x62fhb9"},isDisabled:{true:"_1x62fhba _1yep5z610q"},variant:{primary:"_1x62fhbb _1yep5z6zn",ghost:"_1yep5z6zq"}},defaultVariants:{},compoundVariants:[[{variant:"primary",isSelected:!0,isDisabled:!1},"_1yep5z61me"],[{variant:"primary",isSelected:!0},"_1yep5z61nl"],[{variant:"ghost",isSelected:!0,isFocusVisible:!1},"_1x62fhbd"],[{variant:"ghost",isSelected:!0,isDisabled:!1},"_1yep5z61ml"],[{variant:"ghost",isDisabled:!0,isSelected:!0},"_1x62fhbe _1yep5z6ey"],[{variant:"primary",isHovered:!0},"_1yep5z61nm"]]}),Yc=z({defaultClassName:"_1x62fhb3 _1yep5z6ik _1yep5z6il _1yep5z6im _1yep5z6iq _1yep5z6ir _1yep5z6is",variantClassNames:{variant:{primary:"_1x62fhb4",ghost:"_1yep5z6va _1yep5z6vb _1yep5z6vc"}},defaultVariants:{},compoundVariants:[]}),Zc="_1x62fhbl",wn=z({defaultClassName:"_1x62fhbf _1yep5z6f6",variantClassNames:{isHovered:{true:"_1yep5z610x"},isSelected:{true:"_1x62fhbh"},isDisabled:{true:"_1yep5z610z"},variant:{primary:"_1x62fhbj",ghost:"_1x62fhbk"}},defaultVariants:{},compoundVariants:[[{variant:"primary",isSelected:!0,isDisabled:!1},"_1yep5z61mp"],[{variant:"ghost",isSelected:!0,isDisabled:!1},"_1yep5z61mu"],[{variant:"ghost",isDisabled:!0,isSelected:!0},"_1yep5z61mr"]]}),Qc="_1yep5z6lj _1yep5z6lg _1yep5z6hp _1yep5z6li",Jc=z({defaultClassName:"_1x62fhb0 _1yep5z6lc _1yep5z6ih _1yep5z6ii _1yep5z6ij _1yep5z6iq _1yep5z6ir _1yep5z6is",variantClassNames:{variant:{primary:"_1yep5z611v",ghost:"_1x62fhb2"}},defaultVariants:{},compoundVariants:[]});var ed=({state:e,...o})=>{let t=ro.useRef(null),{tabPanelProps:r}=useTabPanel(o,e,t),{selectedItem:a}=e,{focusProps:n,isFocusVisible:i}=useFocusRing();if(!a?.value)return null;let{className:s,style:p,"data-block-id":l}=a.value;return jsx("div",{...mergeProps(r,n),ref:t,className:classNames({[Qc]:i},"Baseline-Tabs-TabPanel",s),"data-block-id":l,style:p,children:a?.props.children})};var Tn=ro.forwardRef(({className:e,style:o,tabHeaderStyle:t,tabHeaderClassName:r,variant:a="primary",actions:n,onRemove:i,"data-block-id":s,...p},l)=>{let c=useTabListState({...p,selectedKey:p.selectedValue,defaultSelectedKey:p.defaultSelectedValue,disabledKeys:p.disabledValues}),u=ro.useRef(null),{tabListProps:m}=useTabList({...p,selectedKey:p.selectedValue,defaultSelectedKey:p.defaultSelectedValue,disabledKeys:p.disabledValues},c,u);return jsxs("div",{className:classNames("BaselineUI-Tabs",e),style:o,ref:l,"data-block-id":s,children:[jsxs("div",{className:classNames(Jc({variant:a}),r),style:t,children:[jsx("div",{...m,className:Yc({variant:a}),ref:u,children:[...c.collection].map(d=>(invariant(d.value,"TabItem requires a value prop"),jsx(td,{item:d,state:c,onRemove:i,variant:a},d.key)))}),n?.map((d,f)=>jsx("div",{className:Wc,children:jsx(B,{...d,variant:"secondary",size:"sm",className:classNames(Zc,d.className)})},f))]}),jsx(ed,{state:c},c.selectedItem?.key)]})});Tn.displayName="TabsBase";var td=({item:e,onRemove:o,state:t,variant:r})=>{let{key:a,value:n}=e,i=ro.useRef(null),{tabProps:s,isSelected:p,isDisabled:l}=useTab({key:a},t,i),{hoverProps:c,isHovered:u}=useHover({});invariant(n,"TabButton requires a value prop");let{title:m,icon:d,titleStyle:f,titleClassName:y}=n,{focusProps:b,isFocusVisible:v,isFocused:_}=useFocusRing(),{keyboardProps:g}=useKeyboard({onKeyDown:R=>{R.key==="Backspace"&&o?o(a):R.continuePropagation();}}),h=filterTruthyValues({"data-selected":p,"data-disabled":l,"data-focused":_,"data-hovered":u,"data-focus-visible":v});return jsxs("div",{...mergeProps(g,s,c,b,h),className:classNames(Xc({isHovered:u,isSelected:p,isFocusVisible:v,isDisabled:l,variant:r}),"BaselineUI-Tabs-TabButton",y),style:f,ref:i,children:[d?jsx(d,{size:20,className:wn({isHovered:u,isSelected:p,isDisabled:l,variant:r})}):null,m,o?jsx(B,{variant:"secondary",elementType:"div",icon:XIcon$1,size:"xxs",onPress:()=>{o(a);},excludeFromTabOrder:!0,UNSAFE_NON_INTERACTIVE:!0,style:{display:"inline-flex",opacity:p||_||u?1:0},className:wn({isHovered:u,isSelected:p,isDisabled:l,variant:r})}):null]})};td.displayName="TabButton";var ad=ro.forwardRef(({children:e,...o},t)=>{let r=useMemo(()=>ro.Children.map(e,a=>!a||!ro.isValidElement(a)||typeof a.type=="string"?null:{...a.props,id:a.props.value}).filter(Boolean),[e]);return jsx(Tn,{...o,ref:t,items:r,children:a=>jsx(Item,{title:a.title,children:a.children},a.key)})});ad.displayName="Tabs";var nd=({children:e,title:o,value:t})=>(invariant(t,"TabItem requires a value prop"),invariant(o,"TabItem requires a title prop"),invariant(e,"TabItem requires children"),e);nd.displayName="TabItem";var id={ar:{close:"\u0625\u063A\u0644\u0627\u0642"},cs:{close:"Zav\u0159\xEDt"},cy:{close:"Cau"},da:{close:"Luk"},de:{close:"Schlie\xDFen"},el:{close:"\u039A\u03BB\u03B5\u03AF\u03C3\u03B9\u03BC\u03BF"},"en-GB":{close:"Close"},en:{close:"Close"},es:{close:"Cerrar"},fi:{close:"Sulje"},"fr-CA":{close:"Fermer"},fr:{close:"Fermer"},he:{close:"\u05E1\u05D2\u05D9\u05E8\u05D4"},hr:{close:"Zatvori"},id:{close:"Tutup"},it:{close:"Chiudi"},ja:{close:"\u9589\u3058\u308B"},ko:{close:"\uB2EB\uAE30"},ms:{close:"Tutup"},"nb-NO":{close:"Lukk"},nl:{close:"Sluit"},pl:{close:"Zamknij"},"pt-PT":{close:"Fechar"},pt:{close:"Fechar"},ru:{close:"\u0417\u0430\u043A\u0440\u044B\u0442\u044C"},sk:{close:"Zavrie\u0165"},sl:{close:"Zapri"},sv:{close:"St\xE4ng"},th:{close:"\u0E1B\u0E34\u0E14"},tr:{close:"Kapat"},uk:{close:"\u0417\u0430\u043A\u0440\u0438\u0442\u0438"},"zh-Hans":{close:"\u5173\u95ED"},"zh-Hant":{close:"\u95DC\u9589"}};var sd=z({defaultClassName:"kfun6yw",variantClassNames:{arrangement:{single:"kfun6yx",multi:"kfun6yy",compact:"kfun6yz"}},defaultVariants:{},compoundVariants:[]}),ld=z({defaultClassName:"kfun6y0 z9nup82",variantClassNames:{variant:{info:"kfun6y1",warning:"kfun6y2",error:"kfun6y3",success:"kfun6y4"},arrangement:{single:"kfun6y5",multi:"kfun6y6",compact:"kfun6y7"},hasButton:{true:"kfun6y8"},hasCloseButton:{true:"kfun6y9"}},defaultVariants:{},compoundVariants:[[{hasButton:!1,arrangement:"single"},"kfun6ya"],[{hasButton:!0,arrangement:"compact"},"kfun6yb"],[{hasCloseButton:!0,arrangement:"compact"},"kfun6yc"]]}),pd=z({defaultClassName:"kfun6yt",variantClassNames:{size:{sm:"kfun6yu",md:"kfun6yv"}},defaultVariants:{},compoundVariants:[]}),cd=z({defaultClassName:"kfun6yp",variantClassNames:{arrangement:{single:"kfun6yq",multi:"kfun6yr",compact:"kfun6ys"}},defaultVariants:{},compoundVariants:[]}),dd=z({defaultClassName:"kfun6yk",variantClassNames:{variant:{info:"kfun6yl",warning:"kfun6ym",error:"kfun6yn",success:"kfun6yo"}},defaultVariants:{},compoundVariants:[]}),ud=z({defaultClassName:"kfun6yh",variantClassNames:{size:{sm:"kfun6yi",md:"kfun6yj"}},defaultVariants:{},compoundVariants:[]}),md=z({defaultClassName:"kfun6yd z9nup82",variantClassNames:{arrangement:{single:"kfun6ye",multi:"kfun6yf",compact:"kfun6yg"}},defaultVariants:{},compoundVariants:[]});var $z={error:{sm:ErrorAltFilledIcon,md:ErrorAltFilledIcon$1},info:{sm:InfoFilledIcon,md:InfoFilledIcon$1},success:{sm:CheckFilledIcon,md:CheckFilledIcon$1},warning:{sm:WarningFilledIcon,md:WarningFilledIcon$1}},fd=ro.forwardRef(({className:e,description:o,actionLabel:t,onAction:r,style:a,variant:n="info",title:i,arrangement:s="single",onClose:p,size:l="sm","data-block-id":c,"data-block-class":u},m)=>{let d=F(id),f=t&&jsx(U,{variant:s==="compact"?"tertiary":"ghost",label:t,onPress:r}),y=$z[n][l];return jsxs("div",{className:classNames(ld({variant:n,arrangement:s,hasButton:!!t||!!p,hasCloseButton:!!p}),"BaselineUI-InlineAlert",e),"data-block-id":c,"data-block-class":u,style:a,role:"alert",ref:m,children:[jsxs("div",{className:md({arrangement:s}),children:[jsx(y,{className:dd({variant:n}),size:16}),jsxs("div",{className:sd({arrangement:s}),children:[jsx("h3",{className:ud({size:l}),children:i}),jsx("section",{className:pd({size:l}),children:o})]}),s==="compact"&&f]}),jsxs("div",{className:cd({arrangement:s}),children:[s!=="compact"&&f,p?jsx(B,{variant:"secondary",icon:CloseIcon,size:"sm",onPress:p,"aria-label":d.formatMessage("close")}):null]})]})});fd.displayName="InlineAlert";var Ye={ar:{add:"\u0625\u0636\u0627\u0641\u0629",addColor:"\u0625\u0636\u0627\u0641\u0629 \u0644\u0648\u0646",cancel:"\u0625\u0644\u063A\u0627\u0621",colorFormat:"\u062A\u0646\u0633\u064A\u0642 \u0627\u0644\u0644\u0648\u0646",colorPresets:"\u0627\u0644\u0623\u0644\u0648\u0627\u0646 \u0627\u0644\u0645\u0633\u0628\u0642\u0629",customColors:"\u0623\u0644\u0648\u0627\u0646 \u0645\u062E\u0635\u0635\u0629",newColor:"\u0644\u0648\u0646 \u0645\u062E\u0635\u0635 \u062C\u062F\u064A\u062F",noColor:"\u0644\u0627 \u064A\u0648\u062C\u062F",removeColor:"\u0625\u0632\u0627\u0644\u0629 \u0627\u0644\u0644\u0648\u0646",transparent:"\u0634\u0641\u0627\u0641"},cs:{add:"P\u0159idat",addColor:"P\u0159idat barvu",cancel:"Zru\u0161it",colorFormat:"Form\xE1t barvy",colorPresets:"P\u0159edvolby barev",customColors:"Vlastn\xED barvy",newColor:"Vlastn\xED barva",noColor:"Nen\xED",removeColor:"Odebrat barvu",transparent:"Pr\u016Fhledn\xE1"},cy:{add:"Ychwanegu",addColor:"Ychwanegu Lliw",cancel:"Canslo",colorFormat:"Fformat Lliw",colorPresets:"Rhagosodiadau Lliw",customColors:"Lliwiau Custom",newColor:"Lliw Personol Newydd",noColor:"Dim",removeColor:"Tynnu Lliw",transparent:"Tryloyw"},da:{add:"Tilf\xF8j",addColor:"Tilf\xF8j Farve",cancel:"Annuller",colorFormat:"Farveformat",colorPresets:"Farvevalg",customColors:"Brugerdefinerede farver",newColor:"Ny tilpasset farve",noColor:"Ingen",removeColor:"Fjern Farve",transparent:"Transparent"},de:{add:"Hinzuf\xFCgen",addColor:"Farbe hinzuf\xFCgen",cancel:"Abbrechen",colorFormat:"Farbformat",colorPresets:"Farbvorlagen",customColors:"Benutzerdefinierte Farben",newColor:"Neue benutzerdefinierte Farbe",noColor:"Kein",removeColor:"Farbe entfernen",transparent:"Transparent"},el:{add:"\u03A0\u03C1\u03BF\u03C3\u03B8\u03AE\u03BA\u03B7",addColor:"\u03A0\u03C1\u03BF\u03C3\u03B8\u03AE\u03BA\u03B7 \u03A7\u03C1\u03CE\u03BC\u03B1\u03C4\u03BF\u03C2",cancel:"\u0391\u03BA\u03CD\u03C1\u03C9\u03C3\u03B7",colorFormat:"\u039C\u03BF\u03C1\u03C6\u03AE \u03C7\u03C1\u03CE\u03BC\u03B1\u03C4\u03BF\u03C2",colorPresets:"\u03A0\u03C1\u03BF\u03B5\u03C0\u03B9\u03BB\u03BF\u03B3\u03AD\u03C2 \u03C7\u03C1\u03C9\u03BC\u03AC\u03C4\u03C9\u03BD",customColors:"\u03A0\u03C1\u03BF\u03C3\u03B1\u03C1\u03BC\u03BF\u03C3\u03BC\u03AD\u03BD\u03B1 \u03A7\u03C1\u03CE\u03BC\u03B1\u03C4\u03B1",newColor:"\u039D\u03AD\u03BF \u03C0\u03C1\u03BF\u03C3\u03B1\u03C1\u03BC\u03BF\u03C3\u03BC\u03AD\u03BD\u03BF \u03C7\u03C1\u03CE\u03BC\u03B1",noColor:"\u039A\u03B1\u03BD\u03AD\u03BD\u03B1\u03C2",removeColor:"\u0391\u03C6\u03B1\u03AF\u03C1\u03B5\u03C3\u03B7 \u03A7\u03C1\u03CE\u03BC\u03B1\u03C4\u03BF\u03C2",transparent:"\u0397\u03BC\u03B9\u03B4\u03B9\u03B1\u03C6\u03B1\u03BD\u03AE\u03C2"},"en-GB":{add:"Add",addColor:"Add Colour",cancel:"Cancel",colorFormat:"Colour Format",colorPresets:"Colour Presets",customColors:"Custom Colours",newColor:"New Custom Colour",noColor:"None",removeColor:"Remove Colour",transparent:"Transparent"},en:{add:"Add",addColor:"Add Color",cancel:"Cancel",colorFormat:"Color Format",colorPresets:"Color Presets",customColors:"Custom Colors",newColor:"New Custom Color",noColor:"None",removeColor:"Remove Color",transparent:"Transparent"},es:{add:"A\xF1adir",addColor:"A\xF1adir color",cancel:"Cancelar",colorFormat:"Formato de color",colorPresets:"Preajustes de color",customColors:"Colores personalizados",newColor:"Nuevo color personalizado",noColor:"Ninguna",removeColor:"Eliminar color",transparent:"Transparente"},fi:{add:"Lis\xE4\xE4",addColor:"Lis\xE4\xE4 v\xE4ri",cancel:"Kumoa",colorFormat:"V\xE4rimuoto",colorPresets:"V\xE4rin esiasetukset",customColors:"Mukautetut v\xE4rit",newColor:"Uusi muokattu v\xE4ri",noColor:"Ei mit\xE4\xE4n",removeColor:"Poista v\xE4ri",transparent:"L\xE4pin\xE4kyv\xE4"},"fr-CA":{add:"Ajouter",addColor:"Ajouter une couleur",cancel:"Annuler",colorFormat:"Format de couleur",colorPresets:"Pr\xE9r\xE9glages de couleur",customColors:"Couleurs personnalis\xE9es",newColor:"Nouvelle couleur personnalis\xE9e",noColor:"Aucune",removeColor:"Supprimer la couleur",transparent:"Transparent"},fr:{add:"Ajouter",addColor:"Ajouter une couleur",cancel:"Annuler",colorFormat:"Format de couleur",colorPresets:"Pr\xE9r\xE9glages de couleur",customColors:"Couleurs personnalis\xE9es",newColor:"Nouvelle couleur personnalis\xE9e",noColor:"Aucune",removeColor:"Supprimer la couleur",transparent:"Transparent"},he:{add:"\u05D4\u05D5\u05E1\u05E4\u05D4",addColor:"\u05D4\u05D5\u05E1\u05E3 \u05E6\u05D1\u05E2",cancel:"\u05D1\u05D9\u05D8\u05D5\u05DC",colorFormat:"\u05E4\u05D5\u05E8\u05DE\u05D8 \u05E6\u05D1\u05E2",colorPresets:"\u05DE\u05E6\u05D1\u05D9 \u05E6\u05D1\u05E2 \u05DE\u05EA\u05D5\u05DB\u05E0\u05EA\u05D9\u05DD",customColors:"\u05E6\u05D1\u05E2\u05D9\u05DD \u05DE\u05D5\u05EA\u05D0\u05DE\u05D9\u05DD \u05D0\u05D9\u05E9\u05D9\u05EA",newColor:"\u05E6\u05D1\u05E2 \u05DE\u05D5\u05EA\u05D0\u05DD \u05D0\u05D9\u05E9\u05D9\u05EA \u05D7\u05D3\u05E9",noColor:"\u05DC\u05DC\u05D0",removeColor:"\u05D4\u05E1\u05E8 \u05E6\u05D1\u05E2",transparent:"\u05E9\u05E7\u05D5\u05E3"},hr:{add:"Dodati",addColor:"Dodaj boju",cancel:"Otka\u017Ei",colorFormat:"Format boje",colorPresets:"Prijedlozi boja",customColors:"Prilago\u0111ene boje",newColor:"Nova prilago\u0111ena boja",noColor:"Prazno",removeColor:"Ukloni boju",transparent:"Prozirna"},id:{add:"Tambah",addColor:"Tambah Warna",cancel:"Batalkan",colorFormat:"Format Warna",colorPresets:"Preset Warna",customColors:"Warna Kustom",newColor:"Warna Khusus Baru",noColor:"Tidak ada",removeColor:"Hapus Warna",transparent:"Transparan"},it:{add:"Aggiungi",addColor:"Aggiungi colore",cancel:"Annulla",colorFormat:"Formato del colore",colorPresets:"Colori predefiniti",customColors:"Colori personalizzati",newColor:"Nuovo colore personalizzato",noColor:"Nessuno",removeColor:"Rimuovi colore",transparent:"Trasparente"},ja:{add:"\u8FFD\u52A0",addColor:"\u8272\u3092\u8FFD\u52A0",cancel:"\u30AD\u30E3\u30F3\u30BB\u30EB",colorFormat:"\u30AB\u30E9\u30FC\u30D5\u30A9\u30FC\u30DE\u30C3\u30C8",colorPresets:"\u30AB\u30E9\u30FC\u30D7\u30EA\u30BB\u30C3\u30C8",customColors:"\u30AB\u30B9\u30BF\u30E0\u30AB\u30E9\u30FC",newColor:"\u65B0\u898F\u30AB\u30B9\u30BF\u30E0\u30AB\u30E9\u30FC",noColor:"\u306A\u3057",removeColor:"\u8272\u3092\u524A\u9664",transparent:"\u900F\u660E"},ko:{add:"\uCD94\uAC00",addColor:"\uC0C9\uC0C1 \uCD94\uAC00",cancel:"\uCDE8\uC18C",colorFormat:"\uC0C9\uC0C1 \uD615\uC2DD",colorPresets:"\uC0C9\uC0C1 \uBBF8\uB9AC\uC124\uC815",customColors:"\uC0AC\uC6A9\uC790 \uC815\uC758 \uC0C9\uC0C1",newColor:"\uC0C8\uB85C\uC6B4 \uC0AC\uC6A9\uC790\uC9C0\uC815 \uC0C9\uC0C1",noColor:"\uC5C6\uC74C",removeColor:"\uC0C9\uC0C1 \uC81C\uAC70",transparent:"\uD22C\uBA85"},ms:{add:"Tambah",addColor:"Tambah Warna",cancel:"Batal",colorFormat:"Format Warna",colorPresets:"Praset Warna",customColors:"Warna Kustom",newColor:"Warna Tersuai Baharu",noColor:"Tiada",removeColor:"Buang Warna",transparent:"Lut Sinar"},"nb-NO":{add:"Legg til",addColor:"Legg til farge",cancel:"Avbryt",colorFormat:"Fargeformat",colorPresets:"Fargeinnstillinger",customColors:"Egendefinerte farger",newColor:"Ny tilpasset farge",noColor:"Ingen",removeColor:"Fjern farge",transparent:"Gjennomsiktig"},nl:{add:"Voeg toe",addColor:"Kleur toevoegen",cancel:"Annuleer",colorFormat:"Kleurformaat",colorPresets:"Kleurvoorinstellingen",customColors:"Aangepaste kleuren",newColor:"Nieuwe aangepaste kleur",noColor:"Geen",removeColor:"Kleur verwijderen",transparent:"Doorzichtig"},pl:{add:"Dodaj",addColor:"Dodaj kolor",cancel:"Anuluj",colorFormat:"Format koloru",colorPresets:"Wst\u0119pnie ustawione kolory",customColors:"Niestandardowe kolory",newColor:"Nowy kolor niestandardowy",noColor:"Brak",removeColor:"Usu\u0144 kolor",transparent:"Prze\u015Bwiecaj\u0105ce"},"pt-PT":{add:"Adicionar",addColor:"Adicionar cor",cancel:"Cancelar",colorFormat:"Formato de cor",colorPresets:"Predefini\xE7\xF5es de cor",customColors:"Cores personalizadas",newColor:"Nova cor personalizada",noColor:"Nenhum",removeColor:"Remover cor",transparent:"Transparente"},pt:{add:"Adicionar",addColor:"Adicionar cor",cancel:"Cancelar",colorFormat:"Formato de cor",colorPresets:"Pr\xE9-ajustes de Cores",customColors:"Cores personalizadas",newColor:"Nova Cor Personalizada",noColor:"Nenhum",removeColor:"Remover cor",transparent:"Transparente"},ru:{add:"\u0414\u043E\u0431\u0430\u0432\u0438\u0442\u044C",addColor:"\u0414\u043E\u0431\u0430\u0432\u0438\u0442\u044C \u0446\u0432\u0435\u0442",cancel:"\u041E\u0442\u043C\u0435\u043D\u0438\u0442\u044C",colorFormat:"\u0424\u043E\u0440\u043C\u0430\u0442 \u0446\u0432\u0435\u0442\u0430",colorPresets:"\u0411\u0438\u0431\u043B\u0438\u043E\u0442\u0435\u043A\u0430 \u0446\u0432\u0435\u0442\u043E\u0432",customColors:"\u041F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u0442\u0435\u043B\u044C\u0441\u043A\u0438\u0435 \u0446\u0432\u0435\u0442\u0430",newColor:"\u041D\u043E\u0432\u044B\u0439 \u0441\u043E\u0431\u0441\u0442\u0432\u0435\u043D\u043D\u044B\u0439 \u0446\u0432\u0435\u0442",noColor:"\u041D\u0435\u0442",removeColor:"\u0423\u0434\u0430\u043B\u0438\u0442\u044C \u0446\u0432\u0435\u0442",transparent:"\u041F\u0440\u043E\u0437\u0440\u0430\u0447\u043D\u044B\u0439"},sk:{add:"Prida\u0165",addColor:"Prida\u0165 farbu",cancel:"Zru\u0161i\u0165",colorFormat:"Form\xE1t farby",colorPresets:"Predvo\u013Eby farieb",customColors:"Vlastn\xE9 farby",newColor:"Vlastn\xE1 farba",noColor:"\u017Diadny",removeColor:"Odstr\xE1ni\u0165 farbu",transparent:"Prieh\u013Eadn\xE1"},sl:{add:"Dodaj",addColor:"Dodaj barvo",cancel:"Prekli\u010Di",colorFormat:"Barvni format",colorPresets:"Barvne predloge",customColors:"Prilagojene barve",newColor:"Nova barva po meri",noColor:"Prazna stran",removeColor:"Odstrani barvo",transparent:"Prosojna"},sv:{add:"L\xE4gg till",addColor:"L\xE4gg till f\xE4rg",cancel:"Avbryt",colorFormat:"F\xE4rgformat",colorPresets:"F\xF6rval f\xF6r f\xE4rger",customColors:"Anpassade f\xE4rger",newColor:"Ny anpassad f\xE4rg",noColor:"Ingen",removeColor:"Ta bort f\xE4rg",transparent:"Genomskinligt"},th:{add:"\u0E40\u0E1E\u0E34\u0E48\u0E21",addColor:"\u0E40\u0E1E\u0E34\u0E48\u0E21\u0E2A\u0E35",cancel:"\u0E22\u0E01\u0E40\u0E25\u0E34\u0E01",colorFormat:"\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E2A\u0E35",colorPresets:"\u0E04\u0E48\u0E32\u0E2A\u0E35\u0E17\u0E35\u0E48\u0E15\u0E31\u0E49\u0E07\u0E44\u0E27\u0E49\u0E25\u0E48\u0E27\u0E07\u0E2B\u0E19\u0E49\u0E32",customColors:"\u0E2A\u0E35\u0E17\u0E35\u0E48\u0E01\u0E33\u0E2B\u0E19\u0E14\u0E40\u0E2D\u0E07",newColor:"\u0E2A\u0E35\u0E17\u0E35\u0E48\u0E01\u0E33\u0E2B\u0E19\u0E14\u0E40\u0E2D\u0E07\u0E43\u0E2B\u0E21\u0E48",noColor:"\u0E44\u0E21\u0E48\u0E21\u0E35\u0E40\u0E25\u0E22",removeColor:"\u0E25\u0E1A\u0E2A\u0E35",transparent:"\u0E42\u0E1B\u0E23\u0E48\u0E07\u0E43\u0E2A"},tr:{add:"Ekle",addColor:"Renk Ekle",cancel:"Vazge\xE7",colorFormat:"Renk Format\u0131",colorPresets:"Renk \xD6nayarlar\u0131",customColors:"\xD6zel Renkler",newColor:"Yeni \xF6zel renk",noColor:"Hi\xE7biri",removeColor:"Rengi Kald\u0131r",transparent:"\u015Eeffaf"},uk:{add:"\u0414\u043E\u0434\u0430\u0442\u0438",addColor:"\u0414\u043E\u0434\u0430\u0442\u0438 \u043A\u043E\u043B\u0456\u0440",cancel:"\u0421\u043A\u0430\u0441\u0443\u0432\u0430\u0442\u0438",colorFormat:"\u0424\u043E\u0440\u043C\u0430\u0442 \u043A\u043E\u043B\u044C\u043E\u0440\u0443",colorPresets:"\u0411\u0456\u0431\u043B\u0456\u043E\u0442\u0435\u043A\u0430 \u043A\u043E\u043B\u044C\u043E\u0440\u0456\u0432",customColors:"\u041A\u043E\u0440\u0438\u0441\u0442\u0443\u0432\u0430\u0446\u044C\u043A\u0456 \u043A\u043E\u043B\u044C\u043E\u0440\u0438",newColor:"\u041D\u043E\u0432\u0438\u0439 \u0432\u043B\u0430\u0441\u043D\u0438\u0439 \u043A\u043E\u043B\u0456\u0440",noColor:"\u041D\u0435\u043C\u0430\u0454",removeColor:"\u0412\u0438\u0434\u0430\u043B\u0438\u0442\u0438 \u043A\u043E\u043B\u0456\u0440",transparent:"\u041F\u0440\u043E\u0437\u043E\u0440\u0438\u0439"},"zh-Hans":{add:"\u6DFB\u52A0",addColor:"\u6DFB\u52A0\u989C\u8272",cancel:"\u53D6\u6D88",colorFormat:"\u989C\u8272\u683C\u5F0F",colorPresets:"\u989C\u8272\u9884\u8BBE",customColors:"\u81EA\u5B9A\u4E49\u989C\u8272",newColor:"\u65B0\u81EA\u5B9A\u4E49\u989C\u8272",noColor:"\u65E0",removeColor:"\u79FB\u9664\u989C\u8272",transparent:"\u900F\u660E"},"zh-Hant":{add:"\u52A0\u5165",addColor:"\u6DFB\u52A0\u984F\u8272",cancel:"\u53D6\u6D88",colorFormat:"\u984F\u8272\u683C\u5F0F",colorPresets:"\u984F\u8272\u9810\u8A2D\u9805",customColors:"\u81EA\u8A02\u984F\u8272",newColor:"\u65B0\u81EA\u8A02\u984F\u8272",noColor:"\u7121",removeColor:"\u79FB\u9664\u984F\u8272",transparent:"\u900F\u660E"}};var jr=({children:e})=>{let{triggerProps:o}=ro.useContext(Ue);return jsx(PressResponder,{...o,children:e})};jr.displayName="ModalTrigger";var Yz=({children:e})=>{let{state:o}=ro.useContext(Ue);return jsx(PressResponder,{onPress:()=>{o?.close();},children:e})};var yd="_1dbkl53 _1yep5z6al _1yep5z6am _1yep5z6an _1yep5z6b9 _1yep5z6ba _1yep5z6bb _1yep5z6lc",bd="_1dbkl5e",gd=z({defaultClassName:"_1dbkl54 _1yep5z66 _1yep5z67 _1yep5z68 _1yep5z62i _1yep5z62j _1yep5z62k _1yep5z63o _1yep5z63p _1yep5z63q _1yep5z61c _1yep5z61d _1yep5z61e _1yep5z6ai _1yep5z6aj _1yep5z6ak _1yep5z6b6 _1yep5z6b7 _1yep5z6b8 _1yep5z6bu _1yep5z6bv _1yep5z6bw _1yep5z6ci _1yep5z6cj _1yep5z6ck _1yep5z6ih _1yep5z6ii _1yep5z6ij _1yep5z6iq _1yep5z6ir _1yep5z6is _1yep5z6ln _1yep5z6lf _1yep5z69i _1yep5z69j _1yep5z69k _1yep5z6eu _1yep5z6le _1yep5z6dy",variantClassNames:{isHovered:{true:"_1dbkl55"},isFocusVisible:{true:"_1dbkl56"},isDisabled:{true:"z9nup83 _1yep5z610q"},labelPosition:{top:"_1dbkl58",start:"_1dbkl59"}},defaultVariants:{},compoundVariants:[]}),vd="_1yep5z6ih _1yep5z6ii _1yep5z6ij _1yep5z6iq _1yep5z6ir _1yep5z6is _1yep5z69l _1yep5z69m _1yep5z69n _1yep5z6j8 _1yep5z6j9 _1yep5z6ja _1yep5z6k8 _1yep5z6k9 _1yep5z6ka",_d=z({defaultClassName:"_1dbkl50 _1yep5z6ih _1yep5z6ii _1yep5z6ij _1yep5z6dy _1yep5z6ev",variantClassNames:{labelPosition:{top:"_1yep5z6o7 _1yep5z6o8 _1yep5z6o9",start:"_1dbkl52"}},defaultVariants:{},compoundVariants:[]}),Ar="_1dbkl5l _1yep5z6in _1yep5z6io _1yep5z6ip _1yep5z69f _1yep5z69g _1yep5z69h",zd="_1dbkl5f z9nup87",$r="_1dbkl5m _1yep5z6b0 _1yep5z6b1 _1yep5z6b2 _1yep5z6bo _1yep5z6bp _1yep5z6bq _1yep5z6cc _1yep5z6cd _1yep5z6ce _1yep5z6d0 _1yep5z6d1 _1yep5z6d2 _1yep5z6i2 _1yep5z6i3 _1yep5z6i4",hd="_1dbkl5k _1yep5z66 _1yep5z67 _1yep5z68 _1yep5z62i _1yep5z62j _1yep5z62k _1yep5z63o _1yep5z63p _1yep5z63q _1yep5z61c _1yep5z61d _1yep5z61e _1yep5z6lf",xd="_1yep5z63r _1yep5z63s _1yep5z63t _1yep5z619 _1yep5z61a _1yep5z61b _1yep5z6ih _1yep5z6ii _1yep5z6ij _1yep5z6iq _1yep5z6ir _1yep5z6is _1yep5z6k8 _1yep5z6k9 _1yep5z6ka _1yep5z6dy _1yep5z6ev _1yep5z69l _1yep5z69m _1yep5z69n _1yep5z6j8 _1yep5z6j9 _1yep5z6ja",Ur=z({defaultClassName:"_1dbkl5h _1yep5z63 _1yep5z64 _1yep5z65 _1yep5z62f _1yep5z62g _1yep5z62h _1yep5z6g1",variantClassNames:{includesCustomColorPicker:{true:"_1yep5z6mv _1yep5z6mw _1yep5z6mx"}},defaultVariants:{},compoundVariants:[]}),Mn="_1dbkl5v _1yep5z6ih _1yep5z6ii _1yep5z6ij _1yep5z6iq _1yep5z6ir _1yep5z6is",Cd=z({defaultClassName:"_1dbkl5q _1yep5z66 _1yep5z67 _1yep5z68 _1yep5z62i _1yep5z62j _1yep5z62k _1yep5z63o _1yep5z63p _1yep5z63q _1yep5z61c _1yep5z61d _1yep5z61e _1yep5z6ai _1yep5z6aj _1yep5z6ak _1yep5z6bu _1yep5z6bv _1yep5z6bw _1yep5z6br _1yep5z6bs _1yep5z6bt _1yep5z6d3 _1yep5z6d4 _1yep5z6d5 _1yep5z6ih _1yep5z6ii _1yep5z6ij _1yep5z6iq _1yep5z6ir _1yep5z6is _1yep5z6j8 _1yep5z6j9 _1yep5z6ja _1yep5z6lo _1yep5z6gz _1yep5z6lf _1yep5z6eu _1yep5z6dy",variantClassNames:{isFocused:{true:"_1dbkl5r _1yep5z612o"},isHovered:{true:"_1dbkl5s"},allowAlpha:{false:"_1yep5z6wy _1yep5z6wz _1yep5z6x0 _1yep5z6ya _1yep5z6yb _1yep5z6yc _1yep5z6174"}},defaultVariants:{},compoundVariants:[[{isHovered:!0,isFocused:!1},"_1yep5z61ok"]]}),Pd=z({defaultClassName:"_1dbkl5a _1yep5z66 _1yep5z67 _1yep5z68 _1yep5z62c _1yep5z62d _1yep5z62e _1yep5z63i _1yep5z63j _1yep5z63k _1yep5z616 _1yep5z617 _1yep5z618 _1yep5z6ai _1yep5z6aj _1yep5z6ak _1yep5z6b6 _1yep5z6b7 _1yep5z6b8 _1yep5z6bu _1yep5z6bv _1yep5z6bw _1yep5z6ci _1yep5z6cj _1yep5z6ck _1yep5z6ih _1yep5z6ii _1yep5z6ij _1yep5z6it _1yep5z6iu _1yep5z6iv _1yep5z69c _1yep5z69d _1yep5z69e _1yep5z6f5 _1yep5z6le _1yep5z6j8 _1yep5z6j9 _1yep5z6ja _1yep5z6kz _1yep5z6l2",variantClassNames:{isHovered:{true:"_1yep5z611v"},isFocusVisible:{true:"_1yep5z617a _1yep5z6178 _1yep5z617b _1yep5z613h"},isDisabled:{true:"_1yep5z610z"}},defaultVariants:{},compoundVariants:[]}),Tt="_1dbkl5u",qr="_1dbkl5g _1yep5z6al _1yep5z6am _1yep5z6an _1yep5z6b9 _1yep5z6ba _1yep5z6bb _1yep5z6bx _1yep5z6by _1yep5z6bz _1yep5z6cl _1yep5z6cm _1yep5z6cn _1yep5z6d7",Kr="_1dbkl5j _1yep5z69 _1yep5z6a _1yep5z6b _1yep5z62l _1yep5z62m _1yep5z62n _1yep5z63r _1yep5z63s _1yep5z63t _1yep5z61f _1yep5z61g _1yep5z61h _1yep5z6ih _1yep5z6ii _1yep5z6ij _1yep5z6it _1yep5z6iu _1yep5z6iv _1yep5z69f _1yep5z69g _1yep5z69h",En="_1dbkl5x",kd="_1dbkl5w",Bn="_1yep5z69 _1yep5z6a _1yep5z6b _1yep5z62l _1yep5z62m _1yep5z62n _1yep5z63r _1yep5z63s _1yep5z63t _1yep5z61f _1yep5z61g _1yep5z61h _1yep5z6ih _1yep5z6ii _1yep5z6ij _1yep5z6it _1yep5z6iu _1yep5z6iv _1yep5z69l _1yep5z69m _1yep5z69n",Gr=z({defaultClassName:"_1dbkl5n _1yep5z6b0 _1yep5z6b1 _1yep5z6b2 _1yep5z6bo _1yep5z6bp _1yep5z6bq _1yep5z6cc _1yep5z6cd _1yep5z6ce _1yep5z6d0 _1yep5z6d1 _1yep5z6d2 _1yep5z6lj _1yep5z6i5 _1yep5z6i6 _1yep5z6i7 _1yep5z6lo _1yep5z6lr",variantClassNames:{isFocusVisible:{true:"_1dbkl5o _1yep5z6178 _1yep5z613h _1yep5z617a"}},defaultVariants:{},compoundVariants:[]}),Dn="z9nup84 z9nup86 _1yep5z6b0 _1yep5z6b1 _1yep5z6b2 _1yep5z6bo _1yep5z6bp _1yep5z6bq _1yep5z6cc _1yep5z6cd _1yep5z6ce _1yep5z6d0 _1yep5z6d1 _1yep5z6d2 _1yep5z6l5 _1yep5z6l6 _1yep5z6l8 _1yep5z6l7 _1yep5z6i5 _1yep5z6i6 _1yep5z6i7";var Id=z({defaultClassName:"_1344e9q0 _1yep5z6b0 _1yep5z6b1 _1yep5z6b2 _1yep5z6bo _1yep5z6bp _1yep5z6bq _1yep5z6cc _1yep5z6cd _1yep5z6ce _1yep5z6d0 _1yep5z6d1 _1yep5z6d2 _1yep5z6i2 _1yep5z6i3 _1yep5z6i4 _1yep5z6l9 _1yep5z6i1 _1yep5z6ih _1yep5z6ii _1yep5z6ij _1yep5z6j8 _1yep5z6j9 _1yep5z6ja _1yep5z6k2 _1yep5z6k3 _1yep5z6k4",variantClassNames:{isFocusVisible:{true:"_1344e9q1"},isDisabled:{true:"_1344e9q2"},removeBlendMode:{true:"_1344e9q3"},isSelected:{true:"_1yep5z617a _1yep5z6178 _1yep5z613h _1yep5z617d"},isHovered:{true:"_1344e9q5"}},defaultVariants:{},compoundVariants:[[{isSelected:!1,isFocusVisible:!0},"_1344e9q6"],[{isSelected:!0,isFocusVisible:!0},"_1344e9q7 _1yep5z61t2 _1yep5z61t0 _1yep5z61p9 _1yep5z61t5"],[{isSelected:!0,isDisabled:!0},"_1yep5z61t2 _1yep5z61t0 _1yep5z61p9 _1yep5z61t5 _1yep5z61pj"],[{isHovered:!0,isSelected:!1},"_1yep5z61t5 _1yep5z61t2 _1yep5z61t0 _1yep5z61pd"]]});var Ze=ro.forwardRef(({color:e,isFocusVisible:o,isSelected:t,isInteractive:r,isDisabled:a,style:n,className:i,id:s,"data-block-id":p,"data-block-class":l,...c},u)=>{let m=e&&e!==Se&&(typeof e=="string"?parseColor(e):e),{formatMessage:d}=F(),f=!m,{colorSwatchProps:y}=useColorSwatch({color:f?"#000000":e}),{hoverProps:b,isHovered:v}=useHover({isDisabled:a||!r}),_=filterTruthyValues({"data-focus-visible":o,"data-selected":t,"data-hovered":v,"data-block-id":p,"data-block-class":l,"data-disabled":a,"data-interactive":r});return jsx("div",{...mergeProps(b,_,f?{}:y),style:n,"aria-label":f?d(ih.none):y["aria-label"],role:"img",className:classNames(Id({removeBlendMode:f,isFocusVisible:o,isDisabled:!!a,isSelected:!!t,isHovered:v}),"BaselineUI-ColorSwatch",i),ref:u,id:s,...c,children:jsx(L,{display:"inline-flex",justifyContent:"center",alignItems:"center",borderRadius:"full",height:"full",width:"full",opacity:a?"medium":void 0,style:m?wd(m,4):void 0,children:f?jsx(NoneIcon,{size:14}):null})})});Ze.displayName="ColorSwatch";var ih=$({none:{id:"none",defaultMessage:"None"}});var Sd=[{id:"hex",label:"HEX"},{id:"rgb",label:"RGB"}],Lt=parseColor("#000000").toFormat("hsla"),ie="hsla",Nt="hexa";function so(e){return typeof e=="string"?parseColor(e).toFormat(ie):e?e.toFormat(ie):null}function Td(e,o){return e?.getChannelValue("alpha")?o?.toString(Nt)===e.toString(Nt):!o?.getChannelValue("alpha")}function Nd(e,o,t){return o?.label?o.label:e?.getChannelValue("alpha")===0?t:e?.toString("rgba")}var Se="NONE";function Ld(e,o){let t=o?.map(a=>({id:parseColor(a.color).toString(Nt),label:a.label}))||[],r={id:Se,label:e};return [...t,r]}var Wr=(e,{optionProps:o,isFocusVisible:t,isSelected:r},a)=>(invariant(e.value&&"label"in e.value,"Item must have label"),jsx("li",{...o,ref:a,className:hd,children:jsx(Ze,{color:e.value.id,isFocusVisible:t,isSelected:r,"aria-label":e.value.label,isInteractive:!0})})),wd=(e,o=4)=>{let t=e.getChannelValue("alpha")===0,r=`repeating-conic-gradient(transparent 0% 25%, ${themeVars.color.background.secondary.medium} 25% 50%)`;return {backgroundImage:t?r:`linear-gradient(${e.toString("hexa")}, ${e.toString("hexa")}), ${r}`,backgroundSize:`${o}px ${o}px`}};var Ed=({value:e,...o})=>{let t=ro.useRef(null),r=ro.useRef(null),a=ro.useRef(null),n=useColorAreaState({...o,value:e}),{colorAreaProps:i,xInputProps:s,yInputProps:p,thumbProps:l}=useColorArea({...o,value:e,inputXRef:t,inputYRef:r,containerRef:a},n);useEffect(()=>{t.current?.focus();},[]);let{focusProps:c,isFocusVisible:u}=useFocusRing();return jsx("div",{ref:a,...i,className:classNames(yd,"BaselineUI-ColorInput-ColorArea"),children:jsxs("div",{...l,className:classNames(Gr({isFocusVisible:u}),"BaselineUI-ColorInput-ColorAreaThumb"),style:{...l.style,transform:"translate(-50%, -50%)",backgroundColor:so(e)?.withChannelValue("alpha",1).toString("css")},children:[jsx("input",{ref:t,...s,...c}),jsx("input",{ref:r,...p,...c})]})})};var Fd=({color:e,setColor:o,allowAlpha:t,...r})=>{let a=useColorFieldState({value:e,onChange:u=>{o(so(u)?.toFormat(ie).withChannelValue("alpha",e.getChannelValue("alpha")??1)||Lt);}}),n=ro.useRef(null),{inputProps:i}=useColorField({...r,"aria-label":"Hex"},a,n),{focusProps:s,isFocused:p}=useFocusRing({isTextInput:!0}),{hoverProps:l,isHovered:c}=useHover({});return jsxs("div",{className:classNames(Mn,"BaselineUI-ColorInput-FieldInput"),"data-color-mode":t?"hexa":"hex",children:[jsx("input",{...mergeProps(i,s,l),ref:n,className:Cd({isFocused:p,isHovered:c,allowAlpha:t})}),t?jsx(Vd,{color:e,setColor:o}):null]})},Hd=({color:e,setColor:o,allowAlpha:t})=>{let r=e.toFormat("rgba"),{locale:a}=useLocale();return jsxs("div",{className:classNames(Mn,"BaselineUI-ColorInput-FieldInput"),"data-color-mode":t?"rgba":"rgb",children:[jsx(Me,{"aria-label":e.getChannelName("red",a),value:r.getChannelValue("red"),showStepper:!1,className:Tt,onChange:n=>{o(r.withChannelValue("red",n).toFormat(ie));},step:1,minValue:0,maxValue:255}),jsx(Me,{"aria-label":e.getChannelName("green",a),value:r.getChannelValue("green"),showStepper:!1,className:Tt,onChange:n=>{o(r.withChannelValue("green",n).toFormat(ie));},step:1,minValue:0,maxValue:255}),jsx(Me,{"aria-label":e.getChannelName("blue",a),value:r.getChannelValue("blue"),showStepper:!1,className:Tt,onChange:n=>{o(r.withChannelValue("blue",n).toFormat(ie));},step:1,minValue:0,maxValue:255}),t?jsx(Vd,{color:e,setColor:o}):null]})},hh={style:"percent",maximumFractionDigits:0},Vd=({color:e,setColor:o})=>{let{locale:t}=useLocale(),r=useCallback(a=>{o(e.withChannelValue("alpha",a));},[e,o]);return jsx(Me,{"aria-label":e.getChannelName("alpha",t),value:e.getChannelValue("alpha"),formatOptions:hh,className:Tt,showStepper:!1,onChange:r,minValue:0,maxValue:1})};var jn=({channel:e,...o})=>{let{locale:t}=useLocale(),r=useColorSliderState({...o,channel:e,locale:t}),a=ro.useRef(null),n=ro.useRef(null),{trackProps:i,thumbProps:s,inputProps:p}=useColorSlider({...o,channel:e,trackRef:a,inputRef:n,"aria-label":r.value.getChannelName(e,t)},r),{focusProps:l,isFocusVisible:c}=useFocusRing();return jsxs("div",{className:classNames($r,{[al({size:"xs"})]:e==="alpha"},"BaselineUI-ColorInput-ColorSlider"),"data-channel":e,...i,ref:a,children:[e==="alpha"&&jsx("div",{className:Dn}),jsx("div",{className:$r,style:i.style}),jsxs("div",{className:classNames(Gr({isFocusVisible:c}),"BaselineUI-ColorInput-ColorSliderThumb"),...s,children:[jsx("div",{className:Dn,style:{backgroundColor:"#ffffff"}}),jsx("div",{style:{backgroundColor:r.getDisplayColor().toString("css"),height:8},className:$r}),jsx(VisuallyHidden,{children:jsx("input",{ref:n,...p,...l})})]})]})};var Xr=({color:e,setColor:o,allowAlpha:t,onChangeEnd:r})=>{let[a,n]=ro.useState("hex"),{formatMessage:i}=F(Ye);return jsxs(Fragment,{children:[jsx(Ed,{value:e,xChannel:"saturation",yChannel:"lightness",onChange:o,onChangeEnd:r}),jsxs("div",{className:Bn,children:[jsx(jn,{channel:"hue",value:e,onChange:o,onChangeEnd:r}),t?jsx(jn,{channel:"alpha",value:e,onChange:o,onChangeEnd:r}):null]}),jsxs("div",{className:classNames(Bn,sprinkles.variants({paddingTop:"none",gap:"sm"})),children:[jsx(Xe,{label:i("colorFormat"),labelPosition:"start",variant:"ghost",items:Sd,selectedKey:a,onSelectionChange:s=>{n(s);}}),a==="hex"&&jsx(Fd,{color:e,setColor:s=>{o(s),r?.(s);},allowAlpha:t}),a==="rgb"&&jsx(Hd,{color:e,setColor:s=>{o(s),r?.(s);},allowAlpha:t})]})]})};var Kd=({color:e,setColor:o,storePickedColorKey:t,addColorButtonLabel:r,removeColorButtonLabel:a,customColorsLabel:n,pickerMode:i,allowAlpha:s})=>{let{locale:p}=useLocale(),{formatMessage:l}=F(Ye),c=ro.useRef(null),u=wo(c.current),[m,d]=ol(t,[]),f=ro.useRef(null),[y,b]=ro.useState(e),v=ro.useMemo(()=>m.map(I=>({id:I,label:parseColor(I).getColorName(p),description:I})),[m,p]),_=useCallback(()=>{let I=i==="active"?e:y;if(m.includes(I.toString(ie))){f.current?.querySelector(`[data-key='${I.toString(ie)}']`)?.classList.add(En);return}d([...m,I.toString(ie)]);},[m,e,d,y,i]);useEffect(()=>{let I=f.current;function k(S){S.animationName===kd&&S.target?.classList.remove(En);}return I?.addEventListener("animationend",k),()=>{I?.removeEventListener("animationend",k);}},[]);let g=useId(),h=jsx(B,{ref:c,variant:"secondary",size:"md","aria-label":r,icon:PlusIcon$1,onPress:i==="active"?_:void 0}),R=useCallback(I=>jsxs(ue,{size:"content",className:Ur({includesCustomColorPicker:!0}),style:{paddingBlockEnd:0},"aria-label":l("newColor"),children:[jsx(Xr,{color:y,setColor:b,allowAlpha:s}),jsx(O,{}),jsx(L,{padding:"lg",display:"flex",flexDirection:"row-reverse",children:jsxs(L,{display:"inline-flex",gap:"lg",children:[jsx(U,{label:l("cancel"),size:"sm",variant:"secondary",onPress:I}),jsx(U,{label:l("add"),variant:"primary",onPress:()=>{_(),I();},size:"sm"})]})})]}),[y,_,l,s]),x=useCallback(I=>{invariant(I instanceof Set,"Key must be a set");let k=[...I][0];k&&o(parseColor(k).toFormat(ie));},[o]);return jsxs(Fragment,{children:[jsx(O,{}),jsxs("div",{className:classNames(xd,"BaselineUI-ColorInput-CustomColors"),children:[jsx("span",{id:g,children:n}),jsxs(L,{display:"flex",children:[!!m.length&&m.includes(e.toString(ie))&&jsx(B,{variant:"secondary",size:"md",elementType:"div",icon:MinusIcon$2,"aria-label":a,onPress:()=>{d(m.filter(I=>I!==e.toString(ie)));}}),i==="active"&&h,i==="lazy"&&(u==="mobile"?jsxs(we,{children:[jsx(jr,{children:h}),jsx(Ee,{style:{zIndex:1e5},children:({close:I})=>R(I)})]}):jsxs(Ne,{type:"dialog",children:[jsx(Le,{children:h}),jsx(Re,{placement:"right top",className:qr,offset:6,children:({close:I})=>R(I)})]}))]})]}),!!m.length&&jsx(le,{items:v,layout:"grid","aria-labelledby":g,className:classNames(Ar,Kr,sprinkles.variants({paddingTop:"xs"}),"BaselineUI-ColorInput-CustomColorsListBox"),renderOption:Wr,ref:f,autoFocus:!1,selectionMode:"single",selectedKeys:[e.toString(ie)],onSelectionChange:x})]})};var Un=ro.forwardRef(({setColor:e,color:o,triggerRef:t,autoFocus:r,presets:a,state:n},i)=>{let{formatMessage:s}=F(Ye),p=useCallback(l=>{if(l instanceof Set&&l.size){let c=[...l][0],u=a.find(m=>m.id===c);invariant(u,"Preset not found"),e(u.id===Se?null:parseColor(u.id).toFormat(ie)),n.close();}},[n,a,e]);return jsx("div",{className:classNames(Kr,"BaselineUI-ColorInput-Presets"),style:{minWidth:t.current?.offsetWidth},ref:i,children:jsx(le,{autoFocus:r,items:a,layout:"grid","aria-label":s("colorPresets"),className:Ar,renderOption:Wr,selectionMode:"single",selectedKeys:[o?.toString(Nt)||Se],onSelectionChange:p})})});Un.displayName="ColorPresetList";var Et=ro.forwardRef(({color:e,colorLabel:o,colorName:t,...r},a)=>{let n=ro.useRef(null),{hoverProps:i,isHovered:s}=useHover({isDisabled:r.isDisabled}),{buttonProps:p,isPressed:l}=useButton(r,n),{isFocusVisible:c,focusProps:u}=useFocusRing(),m=filterTruthyValues({"data-block-id":r["data-block-id"],"data-focused":c,"data-focus-visible":c,"data-disabled":r.isDisabled,"data-hovered":s,"data-pressed":l}),d=or(),f=or();return jsxs("button",{...mergeProps(p,i,u,m),style:r.style,className:classNames(gd({isHovered:s,isFocusVisible:c||r.isOpen,isDisabled:r.isDisabled,labelPosition:r.labelPosition}),"BaselineUI-ColorInputButton",r.className),ref:M(a,n),id:d,"aria-labelledby":r["aria-labelledby"]||`${d} ${f}`,children:[jsx(Ze,{color:e?.toString("hexa")}),o?jsx("div",{className:zd,id:f,"aria-hidden":"true",children:t}):typeof t=="string"&&jsx(VisuallyHidden,{children:t})]})});Et.displayName="ColorInputButton";var Qr=ro.forwardRef(({className:e,style:o,icon:t,...r},a)=>{let n=ro.useRef(null),{hoverProps:i,isHovered:s}=useHover({isDisabled:r.isDisabled}),{buttonProps:p,isPressed:l}=useButton(r,n),{isFocusVisible:c,focusProps:u}=useFocusRing(),m=filterTruthyValues({"data-block-id":r["data-block-id"],"data-focused":c,"data-focus-visible":c,"data-disabled":r.isDisabled,"data-hovered":s,"data-pressed":l});return jsxs("button",{...mergeProps(p,i,u,m),ref:M(a,n),style:o,className:classNames(Pd({isHovered:s||l||r.isOpen,isFocusVisible:c,isDisabled:r.isDisabled}),"BaselineUI-IconColorInputButton",e),children:[jsx(t,{size:16}),jsx("div",{className:bd,style:{backgroundColor:r.color||void 0}})]})});Qr.displayName="IconColorInputButton";function ou({colorLabel:e,color:o,presets:t}){let{formatMessage:r}=F(),{locale:a}=useLocale(),n=useMemo(()=>t.find(p=>p.id===Se?!o:o?Td(o,parseColor(p.id)):!1),[t,o]),i=useMemo(()=>typeof e=="function"?e?.(o):e?Nd(o,n,r(Gh.transparent)):!1,[o,e,r,n]),s=useMemo(()=>{if(n?.label)return n.label;o?.getColorName(a);},[o,a,n?.label]);return {colorName:i,humanReadableName:s}}var Gh=$({transparent:{defaultMessage:"Transparent",id:"transparent"}});var Ko=ro.forwardRef(({className:e,style:o,allowRemoval:t,allowAlpha:r=!0,presets:a,labelPosition:n="top",colorLabel:i=!0,includePicker:s=!0,onChange:p,onChangeEnd:l,defaultValue:c,storePickedColorKey:u="baselinePickedColor",value:m,addColorButtonLabel:d,removeColorButtonLabel:f,customColorsLabel:y,renderTriggerButton:b=({isOpen:k,color:S,ref:N,colorName:w,triggerProps:T,labelId:P})=>jsx(Et,{...mergeProps(T,{...x.label?{"aria-labelledby":P}:{"aria-label":x["aria-label"]}}),ref:N,isOpen:k,isDisabled:x.isDisabled,labelPosition:n,color:S,colorLabel:i,colorName:w}),pickerMode:v="active",offset:_=2,placement:g=n==="start"?"bottom end":"bottom start","data-block-id":h,"data-block-class":R,...x},I)=>{let k=ro.useRef(null),S=ro.useRef(null),N=useOverlayTriggerState(x),{triggerProps:w,overlayProps:T}=useOverlayTrigger({type:"listbox"},N,k),P=ge(x.portalContainer),[C,E]=useControlledState(m===void 0?void 0:so(m),so(c),X=>p?.(X?.toFormat("rgba")||null)),{formatMessage:H}=F(Ye),D=useMemo(()=>Ld(H(Jr.noColor),a),[a,H]),K=useId(),{colorName:j}=ou({colorLabel:i,color:C,presets:D}),G=useMemo(()=>D.filter(X=>t||X.id!==Se),[D,t]),A=d||H(Jr.addColor),ee=f||H(Jr.removeColor),V=y||H(Jr.customColors),W=jsx(Kd,{color:C||Lt,setColor:X=>{E(X),l?.(X?.toFormat("rgba")||null);},storePickedColorKey:u,addColorButtonLabel:A,removeColorButtonLabel:ee,customColorsLabel:V,pickerMode:v,allowAlpha:r});return jsxs(Fragment,{children:[jsxs("div",{className:classNames({[vd]:n==="start"},"BaselineUI-ColorInput-Trigger",e),"data-block-id":h,"data-block-class":R,style:o,ref:I,children:[x.label?jsx("label",{id:K,className:_d({labelPosition:n}),children:x.label}):null,b({isOpen:N.isOpen,color:C,ref:k,colorName:j,triggerProps:w,labelId:K})]}),jsx(ye,{...x,portalContainer:P,placement:g,state:N,offset:_,className:classNames(qr,"BaselineUI-ColorInput-Popover"),triggerRef:k,overlayProps:T,children:jsxs(ue,{size:"content",className:Ur({includesCustomColorPicker:s}),ref:S,"aria-labelledby":K,"aria-label":x["aria-label"],children:[s&&v==="active"?jsxs(Fragment,{children:[jsx(Xr,{color:C||Lt,setColor:E,allowAlpha:r,onChangeEnd:X=>{l?.(X?.toFormat("rgba")||null);}}),W]}):null,!!G.length&&jsxs(Fragment,{children:[s&&v==="active"?jsx(O,{}):null,jsx(Un,{autoFocus:s&&v==="active"?!1:"first",state:N,triggerRef:k,presets:G,color:C,setColor:X=>{E(X),l?.(X?.toFormat("rgba")||null);}})]}),s&&v==="lazy"?W:null]})})]})});Ko.displayName="ColorInput";var Jr=$({addColor:{defaultMessage:"Add color",id:"addColor"},removeColor:{defaultMessage:"Remove color",id:"removeColor"},customColors:{defaultMessage:"Custom colors",id:"customColors"},noColor:{defaultMessage:"No color",id:"noColor"},transparent:{defaultMessage:"Transparent",id:"transparent"}});var nu=ro.forwardRef(({className:e,style:o,icon:t,variant:r="standard","data-block-id":a,tooltipProps:n,...i},s)=>{let p=ro.useRef(null),l=useCallback(({isOpen:c,color:u,ref:m,colorName:d,triggerProps:f})=>jsx(ne,{variant:"inverse",size:"sm",includeArrow:!1,text:i["aria-label"],placement:"bottom start",offset:4,...n,children:r==="standard"?jsx(Et,{...f,"aria-label":i["aria-label"],ref:m,isOpen:c,isDisabled:i.isDisabled,color:u,colorLabel:!1,colorName:d}):jsx(Qr,{...f,isOpen:c,icon:TextIcon,color:u?.toString("hexa"),ref:m,isDisabled:i.isDisabled,"aria-label":i["aria-label"]})}),[i,n,r]);return jsxs(L,{display:"flex",flexDirection:"row",gap:"md",paddingX:r==="standard"?"md":"none",alignItems:"center",className:classNames("BaselineUI-IconColorInput",e),"data-block-id":a,style:o,ref:M(s,p),children:[r==="standard"&&t?jsx(t,{size:24,className:sprinkles({color:"icon.primary"})}):null,jsx(Ko,{...i,colorLabel:!1,renderTriggerButton:l})]})});nu.displayName="IconColorInput";var iu={ar:{redo:"\u0625\u0639\u0627\u062F\u0629",undo:"\u062A\u0631\u0627\u062C\u0639"},cs:{redo:"Opakovat",undo:"Zru\u0161it"},cy:{redo:"Ail-wneud",undo:"Dad-wneud"},da:{redo:"Gentag",undo:"Fortryd"},de:{redo:"Wiederholen",undo:"R\xFCckg\xE4ngig machen"},el:{redo:"\u0395\u03C0\u03B1\u03BD\u03AC\u03BB\u03B7\u03C8\u03B7",undo:"\u0391\u03BD\u03B1\u03AF\u03C1\u03B5\u03C3\u03B7"},"en-GB":{redo:"Redo",undo:"Undo"},en:{redo:"Redo",undo:"Undo"},es:{redo:"Rehacer",undo:"Deshacer"},fi:{redo:"Tee sittenkin",undo:"Peru"},"fr-CA":{redo:"R\xE9tablir",undo:"Annuler"},fr:{redo:"R\xE9tablir",undo:"Annuler"},he:{redo:"\u05D1\u05D9\u05E6\u05D5\u05E2 \u05DE\u05D7\u05D3\u05E9",undo:"\u05D1\u05D9\u05D8\u05D5\u05DC \u05E4\u05E2\u05D5\u05DC\u05D4"},hr:{redo:"Ponovi",undo:"Vrati"},id:{redo:"Ulangi",undo:"Kembalikan"},it:{redo:"Ripristina",undo:"Annulla"},ja:{redo:"\u3084\u308A\u76F4\u3059",undo:"\u53D6\u308A\u6D88\u3059"},ko:{redo:"\uC2E4\uD589\uBCF5\uADC0",undo:"\uC2E4\uD589\uCDE8\uC18C"},ms:{redo:"Buat Semula",undo:"Buat Asal"},"nb-NO":{redo:"Gj\xF8r om igjen",undo:"Angre"},nl:{redo:"Opnieuw",undo:"Herstel"},pl:{redo:"Pon\xF3w",undo:"Cofnij"},"pt-PT":{redo:"Refazer",undo:"Desfazer"},pt:{redo:"Refazer",undo:"Desfazer"},ru:{redo:"\u041F\u043E\u0432\u0442\u043E\u0440\u0438\u0442\u044C",undo:"\u041E\u0442\u043C\u0435\u043D\u0438\u0442\u044C"},sk:{redo:"Opakova\u0165",undo:"Zru\u0161i\u0165"},sl:{redo:"Uveljavi",undo:"Razveljavi"},sv:{redo:"G\xF6r om",undo:"\xC5ngra"},th:{redo:"\u0E17\u0E33\u0E0B\u0E49\u0E33",undo:"\u0E16\u0E2D\u0E19\u0E04\u0E33\u0E2A\u0E31\u0E48\u0E07\u0E01\u0E25\u0E31\u0E1A"},tr:{redo:"Yinele",undo:"Geri Al"},uk:{redo:"\u041F\u043E\u0432\u0442\u043E\u0440\u0438\u0442\u0438",undo:"\u0421\u043A\u0430\u0441\u0443\u0432\u0430\u0442\u0438"},"zh-Hans":{redo:"\u91CD\u505A",undo:"\u64A4\u9500"},"zh-Hant":{redo:"\u91CD\u4F5C",undo:"\u5FA9\u539F"}};var ea=z({defaultClassName:"mnnh5s1 _1yep5z6i2 _1yep5z6i3 _1yep5z6i4 _1yep5z6kz _1yep5z6l2 _1yep5z6le _1yep5z6ld _1yep5z6ih _1yep5z6ii _1yep5z6ij _1yep5z6j8 _1yep5z6j9 _1yep5z6ja _1yep5z6k2 _1yep5z6k3 _1yep5z6k4 _1yep5z6lc",variantClassNames:{isInline:{true:"mnnh5s2 _1yep5z6wd _1yep5z6we _1yep5z6wf _1yep5z6x1 _1yep5z6x2 _1yep5z6x3 _1yep5z6xp _1yep5z6xq _1yep5z6xr _1yep5z6yd _1yep5z6ye _1yep5z6yf _1yep5z612s _1yep5z617h _1yep5z617i",false:"_1yep5z6174 _1yep5z611w"},isHovered:{true:"mnnh5s4"},hasLoadedImage:{true:"_1yep5z611v"},includeCheckeredBackground:{true:"mnnh5s6"},showFocusRing:{true:"_1yep5z6130 _1yep5z617a _1yep5z6178 _1yep5z613h _1yep5z617b"},isDisabled:{true:"mnnh5s8 _1yep5z6z2"}},defaultVariants:{},compoundVariants:[[{isHovered:!0,hasLoadedImage:!1},"_1yep5z61nv"],[{isHovered:!0,hasLoadedImage:!0},"mnnh5s9"],[{isInline:!0,isDisabled:!0},"_1yep5z61ok"],[{hasLoadedImage:!0,includeCheckeredBackground:!0},"_1yep5z61nn"]]}),su="_1yep5z6d8",oa=z({defaultClassName:"mnnh5sa",variantClassNames:{isInline:{true:"mnnh5sb",false:"mnnh5sc"},isDisabled:{true:"mnnh5sd"},hasLoadedImage:{true:"mnnh5s0"}},defaultVariants:{},compoundVariants:[]});var lu=z({defaultClassName:"_1i0ytqa3 _1yep5z6i2 _1yep5z6i3 _1yep5z6i4 _1yep5z6lc _1yep5z6ld _1yep5z6lf",variantClassNames:{isFocusVisible:{true:"_1i0ytqa4"},isInline:{true:"_1yep5z6124",false:"_1yep5z6126"},isDisabled:{true:"_1i0ytqa7 _1yep5z6z2",false:"_1i0ytqa8"}},defaultVariants:{},compoundVariants:[[{isInline:!0,isFocusVisible:!0},"_1i0ytqa9 _1yep5z61og _1yep5z61t8 _1yep5z61ta"],[{isInline:!1,isFocusVisible:!0},"_1i0ytqaa"],[{isInline:!0,isDisabled:!0},"_1yep5z61nw"],[{isInline:!1,isDisabled:!0},"_1yep5z61ny"]]}),pu="_1i0ytqa0",ta=z({defaultClassName:"_1i0ytqab _1yep5z63r _1yep5z63s _1yep5z63t _1yep5z61f _1yep5z61g _1yep5z61h _1yep5z63 _1yep5z64 _1yep5z65 _1yep5z62f _1yep5z62g _1yep5z62h _1yep5z6ih _1yep5z6ii _1yep5z6ij _1yep5z6k2 _1yep5z6k3 _1yep5z6k4 _1yep5z6lc",variantClassNames:{isInline:{false:"_1yep5z611v"},isDisabled:{true:"_1i0ytqad _1yep5z6z2"}},defaultVariants:{},compoundVariants:[]}),cu=z({defaultClassName:"_1i0ytqa1 _1yep5z63 _1yep5z64 _1yep5z65 _1yep5z62f _1yep5z62g _1yep5z62h _1yep5z6ih _1yep5z6ii _1yep5z6ij _1yep5z6iq _1yep5z6ir _1yep5z6is _1yep5z6k8 _1yep5z6k9 _1yep5z6ka _1yep5z6j8 _1yep5z6j9 _1yep5z6ja _1yep5z6lc",variantClassNames:{isInline:{false:"_1yep5z63r _1yep5z63s _1yep5z63t _1yep5z619 _1yep5z61a _1yep5z61b"}},defaultVariants:{},compoundVariants:[]});function du({line:e,options:o}){let t=useRef([]),r=useMemo(()=>{let a=Math.ceil(e.length/Go),n;for(let i=0;i<a;i++)if(!(!(i===a-1)&&!!t.current[i])){let l=e.slice(i*Go-(i>0?1:0),i*Go+Go);n=getSvgPathFromStroke(getStroke(l.map(([c,u,m])=>({x:c,y:u,pressure:m})),o)),l.length>=(i>0?Go+1:Go)&&(t.current[i]=n);}return n},[e,o]);return [...t.current,r]}var Go=60*3;var Cx={size:1,thinning:0,smoothing:0,streamline:0,easing:e=>e,start:{taper:0,easing:e=>e,cap:!0},end:{taper:0,easing:e=>e,cap:!0},simulatePressure:!1},mu=ro.forwardRef(({className:e,style:o,canvasClassName:t,canvasStyle:r,isBound:a=!0,strokeWidth:n=2,strokeColor:i="#3A87FD",onChange:s,defaultValue:p,onChangeEnd:l,enableHistory:c=!1,isInline:u=!0,isDisabled:m,placeholder:d,clearLabel:f,undoLabel:y,redoLabel:b,footerClassName:v,canvasRef:_,value:g,footerStyle:h,"data-block-id":R,"data-block-class":x,"aria-label":I="Drawing canvas",description:k="This is a canvas for drawing using a mouse or touch input.",...S},N)=>{let w=F(iu),T=ro.useRef(null),[P,C]=ro.useState(g||p||[]),E=ro.useMemo(()=>({...Cx,...S}),[S]),[H,D]=ro.useState(),K=useId(),{labelProps:j,fieldProps:G}=useLabel({...S,"aria-label":I,labelElementType:"span"}),{isFocusVisible:A,focusProps:ee}=useFocusRing({within:!0}),{hoverProps:V,isHovered:W}=useHover({isDisabled:m}),{undo:X,redo:ze,canRedo:Ce,canUndo:Pe,push:ke}=Ys(P,{onAction:Y=>{Y&&(C(Y),l?.(Y));},isDisabled:!c}),{keyboardProps:He}=useKeyboard({onKeyDown:Y=>{Y.key==="Backspace"?Qt():Y.key==="z"&&(Y.metaKey||Y.ctrlKey)&&(Y.shiftKey?Ce&&ze():Pe&&X());}}),[oe,de]=useState(!1),it=useCallback(Y=>{let q=Y.currentTarget.getBoundingClientRect();D(q),Y.target.setPointerCapture(Y.pointerId);let pe=[Y.clientX-q.x,Y.clientY-q.y,Y.pressure];C(Z=>[...Z,[pe]]),de(!0);},[]),to=useCallback(Y=>{if(Y.buttons!==1||!H)return;let pe=bu(Y.nativeEvent).map(Z=>[a?clamp(Z.clientX-H.left,0,H.width):Z.clientX-H.left,a?clamp(Z.clientY-H.top,0,H.height):Z.clientY-H.top,Z.pressure]);C(Z=>{let he=[...Z];return he[Z.length-1]=[...he[Z.length-1],...pe],he});},[H,a]),Pa=()=>{H&&(l?.(P),ke(P),de(!1));};useEffect(()=>{s?.(P);},[P,s]);let Qt=()=>{C([]),s?.([]),ke([]);};return jsxs("div",{ref:M(T,N),className:classNames(pu,"BaselineUI-FreehandCanvas",e),style:o,"aria-disabled":m,"data-block-id":R,"data-block-class":x,children:[S.label||c?jsxs("div",{className:cu({isInline:u}),children:[S.label?jsx(Q,{type:"label",size:"sm",...j,children:S.label}):jsx("span",{}),c?jsxs("div",{children:[jsx(B,{variant:"secondary",size:"sm",isDisabled:!Pe||m,icon:UndoIcon,onPress:X,"aria-label":y||w.formatMessage("undo")}),jsx(B,{variant:"secondary",size:"sm",isDisabled:!Ce||m,icon:RedoIcon,onPress:ze,"aria-label":b||w.formatMessage("redo")})]}):null]}):null,jsxs("div",{role:"application",...mergeProps(ee,He,V,G),tabIndex:m?void 0:0,className:classNames(ea({isInline:u,isHovered:W}),lu({isFocusVisible:A,isInline:u,isDisabled:!!m}),t),"aria-describedby":S["aria-describedby"]||K,style:r,ref:_,children:[jsx(VisuallyHidden,{children:jsx("div",{id:K,children:k})}),jsx("svg",{width:r?.width||"100%",height:r?.height||"100%",onPointerDown:it,onPointerMove:to,onPointerUp:Pa,children:(g||P).map((Y,q,pe)=>q<pe.length-1||!oe?jsx(fu,{line:Y,options:E,strokeColor:i,strokeWidth:n},q):jsx(yu,{line:Y,options:E,strokeColor:i,strokeWidth:n},q))})]}),d||f?jsx("div",{style:h,className:classNames(ta({isInline:u,isDisabled:m}),v),children:(P.length||!d)&&f?jsx(U,{size:"sm",variant:"ghost",label:f,isDisabled:m,onPress:Qt}):jsx(U,{size:"sm",variant:"ghost",label:d,isDisabled:!0})}):null]})});mu.displayName="FreehandCanvas";var fu=ro.memo(({line:e,options:o,strokeColor:t,strokeWidth:r})=>{let a=useMemo(()=>getSvgPathFromStroke(getStroke(e.map(([n,i,s])=>({x:n,y:i,pressure:s})),o)),[e,o]);return jsx("path",{d:a,stroke:t,strokeWidth:r})});fu.displayName="Stroke";var yu=ro.memo(({line:e,options:o,strokeColor:t,strokeWidth:r})=>{let a=du({line:e,options:o});return jsx(Fragment,{children:a.map((n,i)=>jsx("path",{d:n,stroke:t,strokeWidth:r},i))})});yu.displayName="SplitStroke";function bu(e){if(typeof e.getCoalescedEvents=="function"){let o=e.getCoalescedEvents();return o.length>0?o.flatMap(t=>bu(t)):[e]}return [e]}var gu="_1vac7ws0",vu=z({defaultClassName:"_1vac7ws1",variantClassNames:{isDragging:{true:"_1vac7ws2"}},defaultVariants:{},compoundVariants:[]});function zu(e,o){let[t,r]=useState([]),a=()=>e?.flatMap(n=>[...o.querySelectorAll(n)]).map(n=>({current:n}));return useGranularEffect(()=>{r(a());},[],[a]),useGranularEffect(()=>{let n=a();r(n);},[e],[a]),t}function hu(e){let{scrollable:o,ownerDocument:t,onScroll:r}=e;useEffect(()=>{let a=getHTMLElement(o,t);if(a)return (a.style.position==="static"||!a.style.position)&&console.warn("Scrollable ancestor passed to `Transform` component should not be statically positioned."),a.addEventListener("scroll",r),()=>{a.removeEventListener("scroll",r);}},[o,r,t]);}var Ox=makeMoveable([Draggable,Resizable,Rotatable,Snappable]),Cu=ro.forwardRef(({className:e,children:o,isRotatable:t,isResizable:r,isDraggable:a,style:n,onTransform:i,onTransformStart:s,onTransformEnd:p,onDoubleClick:l,onDragStart:c,onDragEnd:u,onDrag:m,onResizeStart:d,onResizeEnd:f,onResize:y,onRotateStart:b,onRotateEnd:v,onRotate:_,onSnap:g,isSnappable:h,elementGuidelines:R,hideAnchorOnDrag:x=!0,title:I,rotationPosition:k,autoUpdate:S,bound:N,snapRotationDegrees:w,snapRotationThreshold:T,scrollableAncestor:P,renderDirections:C,stopPropagation:E,transformOrigin:H,preventDefault:D},K)=>{let j=useRef(null),G=useRef(null),[A,ee]=useState(document),V=useRef(A.createElement("div")),[W,X]=useState({}),[ze,Ce]=useState(!1),[Pe,ke]=useState(!1),[He,oe]=useState(),de=zu(R,A);useLayoutEffect(()=>{let q=V.current;return V.current=A.createElement("div"),()=>{q.remove();}},[A]);let{keyboardProps:it}=useKeyboard({onKeyDown:q=>{let pe=q.shiftKey?10:1,Z=q.metaKey||q.ctrlKey;Z&&q.shiftKey&&(pe=45);function he(st,gy="x"){Z?G.current?.request("rotatable",{deltaRotate:st*pe},!0):G.current?.request("draggable",gy==="x"?{deltaX:st*pe}:{deltaY:st*pe},!0);}switch(q.key){case"ArrowRight":{he(1);break}case"ArrowLeft":{he(-1);break}case"ArrowUp":{he(-1,"y");break}case"ArrowDown":he(1,"y");}requestAnimationFrame(()=>{G.current?.updateRect();});}});useEffect(()=>{let q=fe(j.current);ee(q);let pe=V.current;q.body.append(V.current);function Z(st){ke(st.shiftKey);}function he(){ke(!1);}return q.addEventListener("keydown",Z),q.addEventListener("keyup",he),()=>{q.removeEventListener("keydown",Z),q.removeEventListener("keyup",he),pe.remove();}},[]),hu({scrollable:P,onScroll:()=>{G.current?.updateRect();},ownerDocument:A});let to=useCallback(q=>{X(pe=>({...pe,...q.style})),i?.(q);},[i]),Pa=useCallback(q=>{if(Ce(!0),j.current?.focus(),N){let Z=getHTMLElement(N,A)?.getBoundingClientRect();oe({position:"client",left:Z?.left??0,top:Z?.top??0,right:Z?.right??0,bottom:Z?.bottom??0});}c?.(q);},[N,A,c]),Qt=useCallback(q=>{Ce(!1),u?.(q);},[u]),Y=o({style:{...W.width&&{width:W.width},...W.height&&{height:W.height}}});return jsxs(Fragment,{children:[jsx("div",{role:"button",...it,ref:M(j,K),style:{display:"inline-block",...n,...W},className:classNames(gu,e),onDoubleClick:l,tabIndex:0,title:I,children:Y}),createPortal(jsx(Ox,{ref:G,target:j,draggable:a,resizable:r,rotatable:t,keepRatio:Pe,throttleDrag:1,snappable:h||!!N,elementGuidelines:de,snapRenderThreshold:.9,className:vu({isDragging:ze&&x}),onRender:to,onDragStart:Pa,onDragEnd:Qt,useResizeObserver:S,useMutationObserver:S,onRenderEnd:p,onDrag:m,onResizeStart:d,onResizeEnd:f,onResize:y,onRotateStart:b,onRotateEnd:v,onRotate:_,onRenderStart:s,onSnap:g,rotationPosition:k,bounds:He,snapRotationDegrees:w,snapRotationThreshold:T,renderDirections:C,stopPropagation:E,preventDefault:D,transformOrigin:H}),V.current)]})});Cu.displayName="Transform";var Pu={ar:{delete:"\u062D\u0630\u0641",selectImage:"\u062A\u062D\u062F\u064A\u062F \u0635\u0648\u0631\u0629"},cs:{delete:"Smazat",selectImage:"Vybrat obr\xE1zek"},cy:{delete:"Dileu",selectImage:"Dewiswch Ddelwedd"},da:{delete:"Slet",selectImage:"V\xE6lg billede"},de:{delete:"L\xF6schen",selectImage:"Bild ausw\xE4hlen"},el:{delete:"\u0394\u03B9\u03B1\u03B3\u03C1\u03B1\u03C6\u03AE",selectImage:"\u0395\u03C0\u03B9\u03BB\u03BF\u03B3\u03AE \u03B5\u03B9\u03BA\u03CC\u03BD\u03B1\u03C2"},"en-GB":{delete:"Delete",selectImage:"Select Image"},en:{delete:"Delete",selectImage:"Select Image"},es:{delete:"Eliminar",selectImage:"Seleccionar imagen"},fi:{delete:"Poista",selectImage:"Valitse kuva"},"fr-CA":{delete:"Supprimer",selectImage:"S\xE9lectionner une image"},fr:{delete:"Supprimer",selectImage:"S\xE9lectionner une image"},he:{delete:"\u05DE\u05D7\u05D9\u05E7\u05D4",selectImage:"\u05D1\u05D7\u05D9\u05E8\u05EA \u05EA\u05DE\u05D5\u05E0\u05D4"},hr:{delete:"Obri\u0161i",selectImage:"Odaberi sliku"},id:{delete:"Hapus",selectImage:"Pilih Gambar"},it:{delete:"Elimina",selectImage:"Seleziona immagine"},ja:{delete:"\u524A\u9664",selectImage:"\u30A4\u30E1\u30FC\u30B8\u3092\u9078\u629E"},ko:{delete:"\uC0AD\uC81C",selectImage:"\uC774\uBBF8\uC9C0 \uC120\uD0DD"},ms:{delete:"Padam",selectImage:"Pilih Imej"},"nb-NO":{delete:"Slett",selectImage:"Velg bilde"},nl:{delete:"Verwijder",selectImage:"Selecteer afbeelding"},pl:{delete:"Usu\u0144",selectImage:"Wybierz obraz"},"pt-PT":{delete:"Apagar",selectImage:"Selecionar imagem"},pt:{delete:"Apagar",selectImage:"Selecionar Imagem"},ru:{delete:"\u0423\u0434\u0430\u043B\u0438\u0442\u044C",selectImage:"\u0412\u044B\u0431\u0440\u0430\u0442\u044C \u0438\u0437\u043E\u0431\u0440."},sk:{delete:"Zmaza\u0165",selectImage:"Vybra\u0165 obr\xE1zok"},sl:{delete:"Izbri\u0161i",selectImage:"Izberi sliko"},sv:{delete:"Radera",selectImage:"V\xE4lj bild"},th:{delete:"\u0E25\u0E1A",selectImage:"\u0E40\u0E25\u0E37\u0E2D\u0E01\u0E23\u0E39\u0E1B\u0E20\u0E32\u0E1E"},tr:{delete:"Sil",selectImage:"Resim Se\xE7"},uk:{delete:"\u0412\u0438\u0434\u0430\u043B\u0438\u0442\u0438",selectImage:"\u041E\u0431\u0440\u0430\u0442\u0438 \u0437\u043E\u0431\u0440\u0430\u0436\u0435\u043D\u043D\u044F"},"zh-Hans":{delete:"\u5220\u9664",selectImage:"\u9009\u62E9\u56FE\u50CF"},"zh-Hant":{delete:"\u522A\u9664",selectImage:"\u9078\u53D6\u5716\u50CF"}};var wu=ro.forwardRef(({className:e,style:o,isInline:t=!0,accept:r="image/*",defaultImageSrc:a,imageSrc:n,imageAlt:i,pickerButtonLabel:s,isDisabled:p,onDrop:l,onPaste:c,includeCheckeredBackground:u=!0,"data-block-id":m,"data-block-class":d,pickerButtonStyle:f,pickerButtonClassName:y,footerClassName:b,footerStyle:v,clearLabel:_,placeholder:g,labelStyle:h,labelClassName:R,...x},I)=>{let k=ro.useRef(null),S=ro.useRef(null),{formatMessage:N}=F(Pu),[w,T]=useControlledState(n,a||null,oe=>{invariant(typeof oe!="string"),x.onValueChange?.(oe?[oe]:[]);}),P=useMemo(()=>eC(w||void 0),[w]),{fieldProps:C,labelProps:E}=useField(x),{dropProps:H,isDropTarget:D}=useDrop({ref:k,onDrop:async oe=>{if(p)return;let de=await yn({items:oe.items});de.length&&T(de[0]),l?.(oe);},...x}),{clipboardProps:K}=useClipboard({onPaste:async oe=>{if(p)return;let de=await yn({items:oe});de.length&&T(de[0]),c?.(oe);},...x}),j=()=>{T(null),S.current&&(S.current.value="");},G={type:"file",onChange:oe=>{let de=[...oe.target.files];T(de[0]),x.onChange?.(oe);},accept:r,disabled:p},{focusProps:A,isFocused:ee,isFocusVisible:V}=useFocusRing({within:!0}),{hoverProps:W,isHovered:X}=useHover({isDisabled:p}),{imgProps:ze,isLoading:Ce,isLoaded:Pe}=ko({src:P,alt:i||""}),ke={label:s||N("selectImage"),onPress:()=>k.current?.click(),variant:"secondary",isDisabled:p,excludeFromTabOrder:!0,className:classNames(cr({isFocusVisible:V}),{[su]:D&&!p},y),style:f},He=filterTruthyValues({"data-loaded":Pe,"data-block-id":m,"data-block-class":d,"data-hovered":X,"data-focused":ee,"data-drop-target":D,"data-disabled":p,"data-focus-visible":V});return jsxs(L,{...He,className:classNames("BaselineUI-ImageDropZone",e),display:"flex",flexDirection:"column",alignItems:"center",style:o,ref:I,children:[jsxs("label",{...mergeProps(H,W,A,E),className:classNames(ea({isInline:t,isHovered:X,isDisabled:p,hasLoadedImage:!!P&&Pe,showFocusRing:D||!!P&&V}),R),style:h,ref:k,children:[jsx(VisuallyHidden,{children:jsx("input",{...mergeProps(C,K,G),ref:S})}),!P&&jsx(U,{...ke}),!!P&&(Ce?jsx(Oo,{}):jsx("img",{className:oa({isInline:t,isDisabled:p,hasLoadedImage:!!P&&Pe&&u}),...ze}))]}),g||_?jsx("div",{style:v,className:classNames(ta({isInline:t,isDisabled:p}),b),children:(P||!g)&&_?jsx(U,{size:"sm",variant:"ghost",label:_,isDisabled:p,onPress:j}):jsx(U,{size:"sm",variant:"ghost",label:g,isDisabled:!0})}):null]})});wu.displayName="ImageDropZone";function eC(e){return e instanceof File?URL.createObjectURL(e):e}var Ru="_1vm2oh49 _1yep5z6i5 _1yep5z6i6 _1yep5z6i7 _1yep5z6g4",Qn="_1vm2oh48 _1yep5z6ld _1yep5z6ih _1yep5z6ii _1yep5z6ij _1yep5z6j8 _1yep5z6j9 _1yep5z6ja _1yep5z6k2 _1yep5z6k3 _1yep5z6k4 _1yep5z6jt _1yep5z6ju _1yep5z6jv",Su=z({defaultClassName:"_1vm2oh40 mnnh5s1 _1yep5z6ih _1yep5z6ii _1yep5z6ij _1yep5z6li _1yep5z6lg _1yep5z6i1 _1yep5z6lj _1yep5z6j8 _1yep5z6j9 _1yep5z6ja _1yep5z6kz _1yep5z6le _1yep5z6i2 _1yep5z6i3 _1yep5z6i4",variantClassNames:{accent:{theme:"_1vm2oh41",positive:"_1vm2oh42"},isInline:{true:"mnnh5s2 _1yep5z6wa _1yep5z6wb _1yep5z6wc _1yep5z6wy _1yep5z6wz _1yep5z6x0 _1yep5z6xm _1yep5z6xn _1yep5z6xo _1yep5z6ya _1yep5z6yb _1yep5z6yc _1yep5z612r _1yep5z617g _1yep5z617i",false:"_1yep5z6126"},isFocusVisible:{true:"_1yep5z6130 _1yep5z617a _1yep5z6178 _1yep5z613h _1yep5z617b"},isDisabled:{true:"mnnh5s8 z9nup83 _1yep5z6z2"},isHovered:{true:"_1vm2oh47"}},defaultVariants:{},compoundVariants:[[{accent:"positive",isInline:!0},"_1yep5z61nw"],[{accent:"theme",isInline:!0},"_1yep5z61nl"],[{accent:"positive",isInline:!1},"_1yep5z61ny"],[{accent:"theme",isInline:!1},"_1yep5z61nn"],[{isFocusVisible:!0,isInline:!0},"_1yep5z61p9 _1yep5z61t0 _1yep5z61t2 _1yep5z61t3"],[{isHovered:!0,isInline:!0},"_1yep5z61t3 _1yep5z61p9 _1yep5z61t0 _1yep5z61t2"],[{isHovered:!0,isInline:!1,accent:"positive"},"_1yep5z61nx"],[{isHovered:!0,isInline:!1,accent:"theme"},"_1yep5z61np"],[{isHovered:!0,isInline:!0,accent:"theme"},"_1yep5z61nm"]]});var Lu=ro.forwardRef(({className:e,style:o,isDisabled:t,isInline:r=!0,imageAlt:a,imageSrc:n,svgSrc:i,textValue:s,textStyle:p,onPress:l,onDelete:c,deleteAriaLabel:u,addAriaLabel:m,accent:d="positive","data-block-id":f,"data-block-class":y,...b},v)=>{let{focusProps:_,isFocused:g,isFocusVisible:h}=useFocusRing({within:!0}),{isHovered:R,hoverProps:x}=useHover({isDisabled:t}),{pressProps:I}=usePress({isDisabled:t,onPress:l});invariant(n||i||s,"Preview must have content. You must provide either an `imageSrc`, `svgSrc`, or `textValue` prop.");let k=filterTruthyValues({"data-hovered":R,"data-focus-visible":h,"data-focused":g,"data-disabled":t});return jsxs("div",{...b,className:classNames(Su({isInline:r,isFocusVisible:h,isDisabled:t,isHovered:R,accent:d}),"BaselineUI-Preview",e),"data-block-id":f,"data-block-class":y,"aria-label":b["aria-label"]||a||s,style:o,ref:v,children:[typeof i=="string"?jsx("button",{disabled:t,...mergeProps(x,_,I,k),className:Qn,"aria-label":m,dangerouslySetInnerHTML:{__html:i}}):jsxs("button",{...mergeProps(x,_,I,k),disabled:t,style:p,"aria-label":m,className:Qn,children:[n?jsx("img",{src:n,alt:a,className:oa({isInline:r,isDisabled:t})}):null,!!i&&typeof i=="object"&&i,s]}),c?jsx(B,{isDisabled:t,className:Ru,"aria-label":u,size:"xs",icon:TrashIcon,onPress:c}):null]})});Lu.displayName="Preview";var Mu="_1yep5z6ih _1yep5z6ii _1yep5z6ij _1yep5z6it _1yep5z6iu _1yep5z6iv _1yep5z69c _1yep5z69d _1yep5z69e",Eu=z({defaultClassName:"cw3m0n8 _1yep5z6ew _1yep5z6dv",variantClassNames:{isDisabled:{true:"_1yep5z610q"}},defaultVariants:{},compoundVariants:[]}),Bu="cw3m0n7",Du=z({defaultClassName:"cw3m0n0 _1yep5z6ih _1yep5z6ii _1yep5z6ij _1yep5z6j8 _1yep5z6j9 _1yep5z6ja _1yep5z6iq _1yep5z6ir _1yep5z6is",variantClassNames:{labelPosition:{end:"_1yep5z614i _1yep5z614j _1yep5z614k _1yep5z6va _1yep5z6vb _1yep5z6vc",start:"_1yep5z614o _1yep5z614p _1yep5z614q _1yep5z6160 _1yep5z6161 _1yep5z6162"}},defaultVariants:{},compoundVariants:[]}),Fu="_1yep5z6ai _1yep5z6aj _1yep5z6ak _1yep5z6b6 _1yep5z6b7 _1yep5z6b8 _1yep5z6bu _1yep5z6bv _1yep5z6bw _1yep5z6ci _1yep5z6cj _1yep5z6ck _1yep5z6ih _1yep5z6ii _1yep5z6ij _1yep5z6it _1yep5z6iu _1yep5z6iv _1yep5z69i _1yep5z69j _1yep5z69k _1yep5z6l9",Hu=z({defaultClassName:"cw3m0n3 _16vugd06",variantClassNames:{isFocusVisible:{true:"_16vugd09"},isSelected:{true:"_16vugd08"},isDisabled:{true:"_16vugd0b"}},defaultVariants:{},compoundVariants:[]});var gC=({label:e,description:o},{isSelected:t,isFocusVisible:r,isDisabled:a,optionLabelPosition:n})=>jsxs("div",{className:Du({labelPosition:n}),children:[jsx("div",{className:Hu({isSelected:t,isFocusVisible:r,isDisabled:a}),children:t?jsx("div",{className:Bu}):null}),e?jsxs("div",{className:Mu,children:[jsx("span",{className:Mr({isDisabled:a}),children:e}),o?jsx("span",{className:Eu({isDisabled:a}),children:o}):null]}):null]}),Vu=({state:e,renderOption:o=gC,item:t,optionLabelPosition:r="end",optionStyle:a,optionClassName:n,isReadOnly:i,...s})=>{let p=!!s.isDisabled||!!s.disabledValues?.includes(t.id),l=ro.useRef(null),{inputProps:c,isPressed:u,isSelected:m}=useRadio({...s,isDisabled:p,children:t.label,value:t.id},e,l),{focusProps:d,isFocusVisible:f,isFocused:y}=useFocusRing(),{isHovered:b}=useHover({isDisabled:p}),v=filterTruthyValues({"data-selected":m,"data-focused":y,"data-focus-visible":f,"data-hovered":b,"data-disabled":p,"data-pressed":u,"data-read-only":i});return jsxs("label",{...v,style:a,className:classNames("BaselineUI-Radio-Item",n),children:[jsx(VisuallyHidden,{children:jsx("input",{...mergeProps(c,d),ref:l})}),o(t,{isFocusVisible:f,isSelected:m,isFocused:y,isHovered:b,isDisabled:p,optionLabelPosition:r,isReadOnly:i})]})};var Ou=ro.forwardRef(({className:e,style:o,optionsContainerClassName:t,optionsContainerStyle:r,items:a,labelPosition:n="top",renderOption:i,"aria-label":s,"aria-labelledby":p,"aria-describedby":l,"aria-details":c,"data-block-id":u,"data-block-class":m,...d},f)=>{let y=useRadioGroupState(d),{radioGroupProps:b,labelProps:v,descriptionProps:_,errorMessageProps:g}=useRadioGroup({...d,"aria-label":s,"aria-labelledby":p,"aria-describedby":l,"aria-details":c},y),h=Ie({...d,descriptionProps:_,errorMessageProps:g,labelPosition:n}),R=filterTruthyValues({"data-orientation":d.orientation,"data-block-id":u,"data-block-class":m,"data-disabled":d.isDisabled,"data-readonly":d.isReadOnly});return jsxs("div",{...mergeProps(b,R),className:classNames(je({labelPosition:n}),"BaselineUI-RadioGroup",e),style:o,ref:f,children:[d.label||h?jsxs("div",{className:Oe({labelPosition:n,hasMessage:!!h}),children:[jsx("span",{...v,className:classNames(Ve,"BaselineUI-RadioGroup-Label"),children:d.label}),n==="start"&&h]}):null,jsxs("div",{className:classNames({[Ro]:d.isDisabled}),children:[jsx("div",{className:classNames(Fu,t),style:r,children:a.map(x=>jsx(Vu,{state:y,renderOption:i,item:x,...d,value:x.id},x.id))}),n==="top"&&h]})]})});Ou.displayName="RadioGroup";var ju=({id:e,defaultMessage:o,elementType:t=Fragment$1})=>{invariant(e||o,"`id` or `defaultMessage` is required.");let r=F();return jsx(t,{children:r.formatMessage(e)||o})};ju.displayName="MessageFormat";var Au=ro.forwardRef(({className:e,style:o,children:t,"data-block-id":r,"data-block-class":a,role:n="group",isDisabled:i,...s},p)=>{let{hoverProps:l,isHovered:c}=useHover({isDisabled:i});return jsx("div",{...l,role:n,"data-hovered":c,"data-disabled":i,"data-block-id":r,"data-block-class":a,className:e,style:o,...s,ref:p,children:t})});Au.displayName="Group";var ri="UNSUPPORTED_IN_MENU";function qu(e){return useMemo(()=>ro.Children.toArray(e).map(o=>{let t=o,r=uniqueId("item"),a=Vt(t,Ne),n=Uu(t),i,s;if(a){let v=Vt(a,Le);invariant(v),i=Uu(v),s=Vt(a,Re).props.children;}else n?i=n:i=t;let{onPress:p,label:l,"aria-label":c,iconStart:u,isDisabled:m,icon:d}=i.props,f=l||c||ri;invariant(typeof f=="string","ActionGroup children must have a string label");let y=`${r}-${f}`;return createElement(Item,{...{key:y,onPress:p,textValue:f,"aria-label":c,icon:u||d,dialogContent:s,isDisabled:m},key:y},t)}),[e])}function Vt(e,o){return o?flatMapDeep(ro.Children.toArray(e),r=>ro.isValidElement(r)&&r.props.children?[r,...ro.Children.toArray(r.props.children)]:[r]).find(r=>ro.isValidElement(r)&&r.type===o):void 0}function Uu(e){return Vt(e,U)||Vt(e,B)}var Ku="_1yep5z6ih _1yep5z6ii _1yep5z6ij _1yep5z6i2 _1yep5z6i3 _1yep5z6i4 _1yep5z6lc _1yep5z6iq _1yep5z6ir _1yep5z6is _1yep5z6l4",Gu={horizontal:"xvr3wn0",vertical:"xvr3wn1"};var ni=ro.forwardRef(({className:e,style:o,children:t,collapsibleMenuProps:r,"data-block-id":a,"data-block-class":n,renderSpacer:i,onKeyDown:s,...p},l)=>{let{formatMessage:c}=F(),[u,m]=useState(),d=qu(t),f=useListState({...p,children:d}),y=ae(l),b=useRef(null),[{visibleItems:v,isMeasuring:_},g]=Ia({visibleItems:f.collection.size,isMeasuring:!1}),h=useCallback(()=>{let T=P=>{if(b.current&&y.current){let C=[...b.current.children],E=y.current.getBoundingClientRect().width,H=P<f.collection.size,D=0,K=0;if(H){let j=C.pop();j&&(D+=Zu(j,!1,!0));}for(let[j,G]of C.entries())if(D+=Zu(G,j===0,j===C.length-1),Math.round(D)<=Math.round(E))K++;else break;return K}return P};g(function*(){yield {visibleItems:f.collection.size,isMeasuring:!0};let P=T(f.collection.size),C=P<f.collection.size&&P>0;yield {visibleItems:P,isMeasuring:C},C&&(yield {visibleItems:T(P),isMeasuring:!1});});},[g,y,f.collection.size]),R=useMemo(()=>({get current(){return y.current?.parentElement}}),[y]);Ba({ref:R,onResize:h}),xe(h,[f.collection,h]);let{toolbarProps:x}=useToolbar(p,y),I=[...f.collection],k=I.slice(0,v),S=I.slice(v).filter(T=>T.textValue!==ri),N=S.length>0;useEffect(()=>{m(void 0);},[S.length]),useEffect(()=>{p.orientation==="vertical"&&console.warn("Toolbar: Vertical orientation is not supported when `isCollapsible` is true.");},[p.orientation]);let{keyboardProps:w}=useKeyboard({onKeyDown:s});return jsxs(FocusScope,{children:[jsx("div",{...mergeProps(x,w),className:e,"data-block-id":a,"data-block-class":n,"data-collapse":!0,style:{...o,flexBasis:_?"100%":void 0},ref:y,children:jsxs("div",{ref:b,className:Ku,children:[k.map(T=>T.rendered),N?jsxs(Fragment,{children:[!_&&i?jsx(L,{flexGrow:1}):null,jsx(wr,{placement:"bottom end",renderTrigger:({buttonProps:T,ref:P})=>jsx(B,{...T,size:"md",icon:MoreIcon,"aria-label":c(UC.more),variant:"toolbar",ref:P}),...r,disabledKeys:S.filter(T=>T.props?.isDisabled).map(T=>T.key),items:S.map(T=>{let P=T.textValue||T["aria-label"];return invariant(P,"ActionItem must have a label"),{id:T.key,label:P,icon:T.props.icon}}),onAction:T=>{let P=f.collection.getItem(T);invariant(P,"Item not found");let{onPress:C,dialogContent:E}=P.props;C?.(),m(E);}})]}):null]})}),jsx(we,{isOpen:!!u,onOpenChange:T=>{T||m(void 0);},children:jsx(Ee,{enableDrawer:"auto",style:{zIndex:1e5},children:u?ro.cloneElement(u,{inheritDrawer:!0}):null})})]})});ni.displayName="CollapsibleToolbar";function Zu(e,o,t){let a=re(e).getComputedStyle(e);return e.getBoundingClientRect().width+(o?0:Qu(a.marginLeft))+(t?0:Qu(a.marginRight))}function Qu(e){let o=Number.parseInt(e,10);return Number.isNaN(o)?0:o}var UC=$({more:{id:"more",defaultMessage:"More"}});var ii=ro.forwardRef(({className:e,style:o,"data-block-id":t,"data-block-class":r,"aria-controls":a,onKeyDown:n,...i},s)=>{let p=ro.useRef(null),{toolbarProps:l}=useToolbar(i,p),{keyboardProps:c}=useKeyboard({onKeyDown:n});return jsx("div",{...mergeProps(l,c),"aria-controls":a,className:classNames(Gu[i.orientation||"horizontal"],"BaselineUI-Toolbar",e),style:o,"data-block-id":t,"data-block-class":r,ref:M(s,p),children:i.children})});ii.displayName="WrappedToolbar";var ia=ro.forwardRef((e,o)=>{let t=e.isCollapsible?ni:ii;return jsx(t,{...e,ref:o})});ia.displayName="Toolbar";var em=z({defaultClassName:"_1j5skr71",variantClassNames:{size:{xxs:"_1j5skr72",xs:"_1j5skr73",sm:"_1j5skr74",md:"_1j5skr75",lg:"_1j5skr76"}},defaultVariants:{},compoundVariants:[]}),om=z({defaultClassName:"_1j5skr70 _1yep5z6j8 _1yep5z6j9 _1yep5z6ja _1yep5z6le _1yep5z6lf _1yep5z6l9 _1yep5z6ik _1yep5z6il _1yep5z6im _1yep5z6iq _1yep5z6ir _1yep5z6is _1yep5z6k2 _1yep5z6k3 _1yep5z6k4 _1yep5z6ai _1yep5z6aj _1yep5z6ak _1yep5z6b6 _1yep5z6b7 _1yep5z6b8 _1yep5z6bu _1yep5z6bv _1yep5z6bw _1yep5z6ci _1yep5z6cj _1yep5z6ck _1yep5z6g1 _1yep5z6f5",variantClassNames:{isHovered:{true:"_1j5skr7g"},isFocusVisible:{true:"_1j5skr7h"},isDisabled:{true:"z9nup83 _1yep5z610z"},isSelected:{true:"_1j5skr7j"}},defaultVariants:{},compoundVariants:[[{isSelected:!0,isDisabled:!0},"_1yep5z61t3 _1yep5z61t2 _1yep5z61t0 _1yep5z61pj _1yep5z61mr"],[{isSelected:!1,isHovered:!0,isDisabled:!1},"_1yep5z6g3"],[{isSelected:!1,isFocusVisible:!0,isDisabled:!1},"_1yep5z61t3 _1yep5z61t2 _1yep5z61p9 _1yep5z61t0"],[{isSelected:!0,isFocusVisible:!0,isDisabled:!1},"_1j5skr7k _1yep5z61t1 _1yep5z61t0 _1yep5z61pa _1yep5z61ms"],[{isSelected:!0,isFocusVisible:!1,isDisabled:!1},"_1yep5z61t0 _1yep5z61t2 _1yep5z61p9 _1yep5z61t3"]]}),tm=z({defaultClassName:"_1j5skr70 _1yep5z6j8 _1yep5z6j9 _1yep5z6ja _1yep5z6le _1yep5z6lf _1yep5z6l9 _1yep5z6ik _1yep5z6il _1yep5z6im _1yep5z6iq _1yep5z6ir _1yep5z6is _1yep5z6k2 _1yep5z6k3 _1yep5z6k4 _1yep5z6ai _1yep5z6aj _1yep5z6ak _1yep5z6b6 _1yep5z6b7 _1yep5z6b8 _1yep5z6bu _1yep5z6bv _1yep5z6bw _1yep5z6ci _1yep5z6cj _1yep5z6ck _1yep5z6f5",variantClassNames:{isHovered:{true:"_1j5skr7m"},isFocusVisible:{true:"_1yep5z617b _1yep5z617a _1yep5z613h _1yep5z6178"},isSelected:{true:"_1yep5z610y"},isDisabled:{true:"z9nup83 _1yep5z610z"}},defaultVariants:{},compoundVariants:[[{isSelected:!1,isHovered:!0},"_1yep5z61mq"]]}),rm=z({defaultClassName:"_1j5skr70 _1yep5z6j8 _1yep5z6j9 _1yep5z6ja _1yep5z6le _1yep5z6lf _1yep5z6l9 _1yep5z6ik _1yep5z6il _1yep5z6im _1yep5z6iq _1yep5z6ir _1yep5z6is _1yep5z6k2 _1yep5z6k3 _1yep5z6k4 _1yep5z6ai _1yep5z6aj _1yep5z6ak _1yep5z6b6 _1yep5z6b7 _1yep5z6b8 _1yep5z6bu _1yep5z6bv _1yep5z6bw _1yep5z6ci _1yep5z6cj _1yep5z6ck _1yep5z6f5",variantClassNames:{isHovered:{true:"_1j5skr7r"},isFocusVisible:{true:"_1yep5z617b _1yep5z617a _1yep5z613h _1yep5z6178"},isSelected:{true:"_1j5skr7t"},isDisabled:{true:"z9nup83 _1yep5z610z"}},defaultVariants:{},compoundVariants:[[{isSelected:!1,isHovered:!0},"_1yep5z61nn"],[{isSelected:!0,isDisabled:!1},"_1yep5z61nn _1yep5z61mu"],[{isSelected:!0,isDisabled:!0},"_1yep5z61nn _1yep5z61mr"]]}),am=z({defaultClassName:"_1j5skr77 _1j5skr70 _1yep5z6j8 _1yep5z6j9 _1yep5z6ja _1yep5z6le _1yep5z6lf _1yep5z6l9 _1yep5z6ik _1yep5z6il _1yep5z6im _1yep5z6iq _1yep5z6ir _1yep5z6is _1yep5z6k2 _1yep5z6k3 _1yep5z6k4 _1yep5z6f5",variantClassNames:{isHovered:{true:"_1j5skr78"},isFocusVisible:{true:"_1j5skr79"},isSelected:{true:"_1j5skr7a"},isDisabled:{true:"_1j5skr7b z9nup83 _1yep5z6111"}},defaultVariants:{},compoundVariants:[[{isSelected:!0,isDisabled:!1},"_1j5skr7c _1yep5z61mt"],[{isSelected:!1,isDisabled:!0},"_1j5skr7d _1yep5z61mr"],[{isSelected:!1,isHovered:!0},"_1yep5z61nn"],[{isSelected:!1,isFocusVisible:!0},"_1yep5z61t3 _1yep5z61t2 _1yep5z61p9 _1yep5z61t0"],[{isSelected:!0,isFocusVisible:!0},"_1j5skr7e _1yep5z61t1 _1yep5z61t0 _1yep5z61pa"]]});var aP={xxs:8,xs:12,sm:16,md:20,lg:24},be=ro.forwardRef((e,o)=>{let t=ae(o),{tooltipProps:r}=sr(e,t);return r?jsx(ne,{...r,children:jsx(si,{...e,ref:o})}):jsx(si,{...e,ref:o})});be.displayName="ToggleIconButton";var si=ro.forwardRef(({className:e,style:o,icon:t,size:r="md",variant:a="primary","data-block-id":n,"data-block-class":i,...s},p)=>{let l=useToggleState(s),{buttonProps:c,isPressed:u,ref:m,isFocusVisible:d,isFocused:f,isHovered:y,uiStateOptions:b}=pr(s,l),v=useMemo(()=>typeof t=="function"?t:l.isSelected?t.selected:t.unselected,[t,l.isSelected]),_={isSelected:l.isSelected,isHovered:y,isFocusVisible:d,isDisabled:!!s.isDisabled},g=filterTruthyValues({"data-hovered":y,"data-selected":l.isSelected,"data-focus-visible":d,"data-disabled":s.isDisabled,"data-block-id":n,"data-block-class":i,"data-focused":f,"data-pressed":u});return jsx("button",{...mergeProps(c,g),className:classNames(a==="toolbar"&&am(_),a==="primary"&&om(_),a==="secondary"&&tm(_),a==="tertiary"&&rm(_),em({size:r}),"BaselineUI-ToggleIconButton",typeof e=="function"?e(b):e),style:typeof o=="function"?o(b):o,ref:M(m,p),children:jsx(v,{size:aP[r]})})});si.displayName="ToggleIconButtonCore";var im="f6jv6bm",sm="_1yep5z64u _1yep5z64v _1yep5z64w _1yep5z676 _1yep5z677 _1yep5z678 _1yep5z6jh _1yep5z6ji _1yep5z6jj",Yo="_1yep5z689 _1yep5z68a _1yep5z68b _1yep5z65x _1yep5z65y _1yep5z65z",lm=z({defaultClassName:"f6jv6b0 _1yep5z6ih _1yep5z6ii _1yep5z6ij _1yep5z6g1",variantClassNames:{isInline:{true:"f6jv6b1"},isMinimal:{true:"_1yep5z614i _1yep5z614j _1yep5z614k _1yep5z6vd _1yep5z6ve _1yep5z6vf _1yep5z6150 _1yep5z6151 _1yep5z6152",false:"_1yep5z614l _1yep5z614m _1yep5z614n"}},defaultVariants:{},compoundVariants:[[{isInline:!0,isMinimal:!1},"_1yep5z61i5 _1yep5z61i6 _1yep5z61i7 _1yep5z61it _1yep5z61iu _1yep5z61iv _1yep5z61jh _1yep5z61ji _1yep5z61jj _1yep5z61k5 _1yep5z61k6 _1yep5z61k7 _1yep5z61ta _1yep5z61t8 _1yep5z61oj"]]}),sa=z({defaultClassName:"f6jv6b4 _1yep5z69 _1yep5z6a _1yep5z6b _1yep5z62l _1yep5z62m _1yep5z62n _1yep5z63r _1yep5z63s _1yep5z63t _1yep5z61f _1yep5z61g _1yep5z61h _1yep5z6e3 _1yep5z6eu _1yep5z6lf",variantClassNames:{isDisabled:{true:"f6jv6b5 _1yep5z610q"}},defaultVariants:{},compoundVariants:[]}),pm="f6jv6bj _1yep5z6wg _1yep5z6wh _1yep5z6wi _1yep5z6x4 _1yep5z6x5 _1yep5z6x6 _1yep5z6xs _1yep5z6xt _1yep5z6xu _1yep5z6yg _1yep5z6yh _1yep5z6yi",cm="f6jv6bk";var dm="f6jv6bn _1yep5z63l _1yep5z63m _1yep5z63n _1yep5z619 _1yep5z61a _1yep5z61b _1yep5z6ai _1yep5z6aj _1yep5z6ak _1yep5z6b6 _1yep5z6b7 _1yep5z6b8 _1yep5z6bu _1yep5z6bv _1yep5z6bw _1yep5z6ci _1yep5z6cj _1yep5z6ck _1yep5z6ik _1yep5z6il _1yep5z6im _1yep5z6ln _1yep5z6li _1yep5z6lg _1yep5z6hp _1yep5z6eu",um=z({defaultClassName:"f6jv6bf _1yep5z63r _1yep5z63s _1yep5z63t _1yep5z61f _1yep5z61g _1yep5z61h _1yep5z63 _1yep5z64 _1yep5z65 _1yep5z62f _1yep5z62g _1yep5z62h _1yep5z6ih _1yep5z6ii _1yep5z6ij _1yep5z6iq _1yep5z6ir _1yep5z6is _1yep5z6j8 _1yep5z6j9 _1yep5z6ja _1yep5z69l _1yep5z69m _1yep5z69n _1yep5z6lf _1yep5z6kz _1yep5z6l2 _1yep5z6le",variantClassNames:{isHovered:{true:"_1yep5z611v"},isDisabled:{true:"_1yep5z6z2"}},defaultVariants:{},compoundVariants:[]}),mm="f6jv6bi _1mdhlqv6 _1yep5z6al _1yep5z6am _1yep5z6an _1yep5z6b9 _1yep5z6ba _1yep5z6bb _1yep5z6bx _1yep5z6by _1yep5z6bz _1yep5z6cl _1yep5z6cm _1yep5z6cn _1yep5z6d7 _1yep5z63 _1yep5z64 _1yep5z65 _1yep5z62f _1yep5z62g _1yep5z62h _1yep5z6g1 _1yep5z6lh _1yep5z6lg _1yep5z6hs _1yep5z6lk",fm="_1yep5z6jn _1yep5z6jo _1yep5z6jp",ym="f6jv6be f6jv6ba _1yep5z6ai _1yep5z6aj _1yep5z6ak _1yep5z6b6 _1yep5z6b7 _1yep5z6b8 _1yep5z6ie _1yep5z6if _1yep5z6ig _1yep5z6eu _1yep5z6e3 _1yep5z6lc",bm=z({defaultClassName:"f6jv6bb _1yep5z6ai _1yep5z6aj _1yep5z6ak _1yep5z6b6 _1yep5z6b7 _1yep5z6b8 _1yep5z6bu _1yep5z6bv _1yep5z6bw _1yep5z6ci _1yep5z6cj _1yep5z6ck _1yep5z6ih _1yep5z6ii _1yep5z6ij _1yep5z6iq _1yep5z6ir _1yep5z6is _1yep5z69l _1yep5z69m _1yep5z69n _1yep5z6jt _1yep5z6ju _1yep5z6jv",variantClassNames:{isInline:{true:"_1yep5z6pg _1yep5z6ph _1yep5z6pi _1yep5z617i _1yep5z617g _1yep5z612r",false:"_1yep5z6pj _1yep5z6pk _1yep5z6pl _1yep5z6wv _1yep5z6ww _1yep5z6wx _1yep5z6xj _1yep5z6xk _1yep5z6xl _1yep5z6y7 _1yep5z6y8 _1yep5z6y9 _1yep5z6yv _1yep5z6yw _1yep5z6yx"}},defaultVariants:{},compoundVariants:[]}),gm="f6jv6bl",vm="f6jv6ba _1yep5z6ai _1yep5z6aj _1yep5z6ak _1yep5z6b6 _1yep5z6b7 _1yep5z6b8 _1yep5z6ie _1yep5z6if _1yep5z6ig _1yep5z6eu",la=z({defaultClassName:"f6jv6b6",variantClassNames:{isInline:{true:"f6jv6b7",false:"f6jv6b8"}},defaultVariants:{},compoundVariants:[]}),pa="f6jv6b9 _1yep5z6ih _1yep5z6ii _1yep5z6ij _1yep5z6iq _1yep5z6ir _1yep5z6is _1yep5z6j8 _1yep5z6j9 _1yep5z6ja",jt="f6jv6bo";var zm=[["Toolbar Focus","Alt+F10"],["Bold","Ctrl+B"],["Italic","Ctrl+I"],["Underline","Ctrl+U"],["Select All","Ctrl+A"],["Cut","Ctrl+X"],["Copy","Ctrl+C"],["Paste","Ctrl+V"],["Undo","Ctrl+Z"],["Redo","Ctrl+Shift+Z"],["Submit","Ctrl+Enter"],["Open Help Dialog","Ctrl+Shift+H"]],{dialog:{row:At}}=layoutSprinkleValues,hm=({isOpen:e,onClose:o})=>{let{formatMessage:t}=F(),r=useId();return jsx(we,{isOpen:e,onOpenChange:a=>{a||o();},children:jsx(Ee,{enableDrawer:"auto",style:{zIndex:999999},children:jsxs(ue,{"aria-labelledby":r,className:pm,drawerBackground:"subtle",children:[jsxs(L,{paddingLeft:At.padding.horizontal.lg,paddingRight:At.padding.horizontal.sm,display:"flex",flexDirection:"row",justifyContent:"space-between",alignItems:"center",backgroundColor:"background.primary.subtle",className:cm,children:[jsx(Q,{id:r,elementType:"h3",type:"title",size:"md",children:t($t.help)}),jsx(B,{icon:XIcon,size:"md",variant:"secondary","aria-label":t($t.close),onPress:o})]}),jsx(O,{className:gm}),jsxs(L,{paddingX:At.padding.horizontal.lg,role:"table","aria-labelledby":r,backgroundColor:"background.primary.subtle",children:[jsx("div",{role:"rowgroup",children:jsxs(L,{role:"row",display:"flex",flexDirection:"row",justifyContent:"space-between",alignItems:"center",paddingY:At.padding.vertical.md,color:"text.primary",children:[jsx("h6",{className:sprinkles({typography:"heading.h6.semibold"}),role:"columnheader",children:t($t.action)}),jsx("h6",{className:sprinkles({typography:"heading.h6.semibold"}),role:"columnheader",style:{textTransform:"capitalize"},children:t($t.shortcut)})]})}),jsx("div",{role:"rowgroup",children:zm.map(([a,n],i)=>jsxs(Fragment$1,{children:[jsxs(L,{role:"row",display:"flex",flexDirection:"row",justifyContent:"space-between",alignItems:"center",paddingY:At.padding.vertical.xs,style:{minHeight:40},children:[jsx(Q,{type:"subtitle",size:"sm",role:"cell",children:t($t[camelCase(a)])}),jsx(Q,{elementType:"kbd",type:"subtitle",size:"sm",role:"cell",children:getOsSpecificKeyboardShortcutLabel(n,!0)})]}),i!==zm.length-1&&jsx(O,{})]},a))})]})]})})})},$t=$({toolbarFocus:{id:"toolbarFocus",defaultMessage:"Toolbar Focus"},help:{id:"help",defaultMessage:"Help"},close:{id:"close",defaultMessage:"Close"},action:{id:"action",defaultMessage:"Action"},shortcut:{id:"shortcut",defaultMessage:"Shortcut"},bold:{id:"bold",defaultMessage:"Bold"},italic:{id:"italic",defaultMessage:"Italic"},underline:{id:"underline",defaultMessage:"Underline"},selectAll:{id:"selectAll",defaultMessage:"Select All"},cut:{id:"cut",defaultMessage:"Cut"},copy:{id:"copy",defaultMessage:"Copy"},paste:{id:"paste",defaultMessage:"Paste"},undo:{id:"undo",defaultMessage:"Undo"},redo:{id:"redo",defaultMessage:"Redo"},openHelpDialog:{id:"openHelpDialog",defaultMessage:"Open Help Dialog"},submit:{id:"submit",defaultMessage:"Submit"}});var ca=ro.forwardRef(({value:e,defaultValue:o,onChange:t,placeholder:r,spellCheck:a,textBoxRef:n,isInline:i,isMinimal:s,isDisabled:p,editableContentAriaLabel:l,editorHandle:c,autoFocus:u,saveOnEnter:m,onSave:d},f)=>{let y=ro.useRef(null),[b,v]=useControlledState(e,o||"",t),_=useCallback(w=>{v(w.currentTarget.value||"");},[v]),g=useCallback(w=>{(m&&w.key==="Enter"&&!w.shiftKey||(w.ctrlKey||w.metaKey)&&w.key==="Enter")&&(w.preventDefault(),d());},[m,d]);useImperativeHandle(f,()=>({clear:()=>{v("");}}));let h=useCallback(w=>{w.currentTarget.style.height="16px",w.currentTarget.style.height=w.currentTarget.scrollHeight+"px";},[]);useGranularLayoutEffect(()=>{let w=y.current;w&&(w.style.height="16px",w.style.height=w.scrollHeight+"px");},[s],[b]),useImperativeHandle(c,()=>({setCaretPosition:w=>{y.current&&(y.current.focus(),y.current.setSelectionRange(w,w));},focus:()=>{y.current&&y.current.focus();}}));let{focusProps:R,isFocused:x,isFocusVisible:I}=useFocusRing(),{hoverProps:k,isHovered:S}=useHover({}),N=filterTruthyValues({"data-focus-visible":I,"data-hovered":S,"data-focused":x});return jsx("textarea",{...mergeProps(R,k,N),ref:M(y,n),className:classNames(s?ym:[sa(),la({isInline:i}),vm]),autoFocus:u,onChange:_,disabled:p,onInput:h,value:b,placeholder:r,spellCheck:a,"aria-label":l,onKeyDown:g})});ca.displayName="PlainEditor";var Kt="mention",da="mention_input",Mm=ro.forwardRef(({onCancel:e,editor:o,element:t,onSelectionChange:r},a)=>{let{containerRef:n,items:i,maxMentionableUsersSuggestions:s}=useContext(ma),p=useSelected(),[l,c]=useState(""),{contains:u}=useFilter({sensitivity:"base"}),{formatMessage:m}=F(),d=useMemo(()=>{let C=i.filter(E=>l===""||u(E.displayName,l)).map(E=>({id:E.id,label:E.displayName,data:E}));return s?take(C,s):C},[i,s,l,u]),f=useCallback(C=>jsx(Item,{children:C.label},C.id),[]),y=useCallback((C=!1)=>{let E=findNodePath(o,t);E&&(removeNodes(o,{at:E}),C&&focusEditor(o));},[o,t]),b=useComboBoxState({items:d,children:f,menuTrigger:"focus",onSelectionChange:C=>{y(!0),r?.(C);}}),v=ro.useRef(null),_=ro.useRef(null),g=ro.useRef(null),h=ro.useRef(null),R=useHTMLInputCursorState(_);useInteractOutside({ref:h,onInteractOutside:()=>{b.close();}});let{inputProps:x,listBoxProps:I}=useComboBox({defaultItems:d,inputRef:_,buttonRef:v,listBoxRef:g,popoverRef:h,menuTrigger:"focus","aria-label":m(VP.mention)},b);useEffect(()=>{_.current?.focus();},[]);let k=useCallback((C="manual",E=!1)=>{y(E),e?.(C,b.inputValue);},[e,y,b.inputValue]),S=useRef(p);useEffect(()=>{S.current&&!p&&k("deselect"),S.current=p;},[p,k]);let N=R?.atStart??!1,w=R?.atEnd??!1,T=useCallback(C=>{C.key==="Backspace"&&N?k("backspace",!0):C.key==="Escape"?k("escape",!0):C.key==="ArrowLeft"&&N?k("arrowLeft",!0):C.key==="ArrowRight"&&w&&k("arrowRight",!0);let E=Hotkeys.isUndo(C)&&o.history.undos.length>0,H=Hotkeys.isRedo(C)&&o.history.redos.length>0;(E||H)&&(C.preventDefault(),o[E?"undo":"redo"](),focusEditor(o));},[N,w,k,o]),P=useMemo(()=>{if(!CSS.supports("field-sizing","content")){let C=re(_.current),E=_.current?C?.getComputedStyle(_.current).font:void 0;return {width:E?getTextDimensions({text:b.inputValue,font:E}).width+10:"4ch"}}},[b.inputValue]);return jsxs(ao.Provider,{value:b,children:[jsx("input",{...mergeProps(x,{onKeyDown:T,onBlur:()=>{k("blur",!0);},onChange:C=>{c(C.target.value);}}),style:P,className:dm,ref:M(a,_)}),jsx(ye,{triggerRef:n,className:mm,isNonModal:!0,ref:h,state:b,children:jsx(le,{...I,items:void 0,autoFocus:"first",ref:g,className:sprinkles({width:"full"}),renderOption:Bm})})]})});Mm.displayName="MentionInputContentElement";var ui=withRef(({className:e,...o},t)=>{let{children:r,editor:a,element:n}=o,{items:i}=useContext(ma),s=useRef(null),[p,l]=useState(null);useEffect(()=>{let m=findNodePath(a,n);if(!m)return;let d=getPointBefore(a,m);if(!d)return;let f=createPointRef(a,d);return l(f),()=>{f.unref();}},[a,n]);let c=useCallback(()=>{let m=s.current?.getRootNode()instanceof ShadowRoot;moveSelection(a,{unit:"offset"}),moveSelection(a,{unit:"character",distance:1}),lt()&&m&&focusEditor(a);},[a]),u=useCallback(m=>{if(!m)return;let d=s.current?.getRootNode()instanceof ShadowRoot,f=i.find(b=>b.id===m);invariant(f,"User not found");let y={type:Kt,value:f.id,displayName:f.displayName,children:[{text:""}]};insertNodes(a,[y,{text:" "}]),d?setTimeout(()=>{c();},0):c();},[a,i,c]);return jsxs(PlateElement,{as:"span","data-slate-value":n.value,contentEditable:!1,className:e,ref:t,...o,children:[jsx(Mm,{onCancel:(m,d)=>{m!=="backspace"&&insertText(a,"@"+d,{at:p?.current??void 0}),(m==="arrowLeft"||m==="arrowRight")&&moveSelection(a,{distance:1,reverse:m==="arrowLeft"});},onSelectionChange:u,ref:s,element:n,editor:a}),r]})});ui.displayName="MentionInputElement";var mi=withRef(({className:e,onClick:o,children:t,...r},a)=>{let n=useElement();return jsxs(PlateElement,{as:"span",className:e,contentEditable:!1,"data-user-id":n.value,onClick:getHandler(o,n),ref:a,...r,children:["@",n.displayName,t]})});mi.displayName="MentionElement";var Em=(e,{options:{trigger:o,triggerPreviousCharPattern:t,triggerQuery:r}})=>{let{insertText:a}=e,n=i=>i===o;return e.insertText=i=>{if(!e.selection||!n(i)||r&&!r(e)){a(i);return}let s=getEditorString(e,getRange(e,e.selection,getPointBefore(e,e.selection)));if(t?.test(s)){ua(e);return}a(i);},e},VP=$({mention:{defaultMessage:"Mention",id:"mention"}});function Fm({className:e,children:o,...t}){return jsx(PlateElement,{asChild:!0,className:e,...t,children:jsx("p",{children:o})})}function ok(e){return Object.entries(e).map(([o,t])=>`${kebabCase(o)}:${t}`).filter(([,o])=>!!o).join(";")}function tk(e){return "text"in e}function rk(e){return e.replaceAll("&","&").replaceAll("<","<").replaceAll(">",">").replaceAll('"',""").replaceAll("'","'")}function Gt(e){if(!e)return "";function o(t){if(tk(t)){let a=rk(t.text);return t.bold&&(a=`<b>${a}</b>`),t.italic&&(a=`<i>${a}</i>`),t.underline&&(a=`<u>${a}</u>`),(t.color||t.backgroundColor)&&(a=`<span style="${ok(filterTruthyValues({color:t.color||void 0,backgroundColor:t.backgroundColor||void 0}))}">${a}</span>`),a}let r=t.children?.map(Gt).join("");switch(t.type){case ELEMENT_PARAGRAPH:return `<p>${r}</p>`;case ELEMENT_LINK:return `<a href="${t.url}">${r}</a>`;case Kt:return `<span data-user-id="${t.value}">${t.displayName}</span>`;default:return r}}return Array.isArray(e)?e.map(t=>o(t)).join(""):o(e)}function ak(e){return e?(e=e.trim(),e.endsWith(";")&&(e=e.slice(0,-1)),Object.fromEntries(e.split(";").map(o=>o.split(":").map(t=>t.trim())).map(([o,t])=>[camelCase(o),t]))):{}}function vi(e){e.startsWith("<p>")||(e=`<p>${e}</p>`);let o=new DOMParser().parseFromString(Hm.default.sanitize(e),"text/html"),t=o.querySelectorAll("[style]");for(let a of t)a.style.textDecoration==="underline"&&(a.style.textDecoration="",a.style.cssText||a.removeAttribute("style"),a.hasAttributes()?a.innerHTML=`<u>${a.innerHTML}</u>`:a.outerHTML=`<u>${a.innerHTML}</u>`);let r=o.querySelectorAll("br");for(let a of r)a.outerHTML=a.closest("p")?`
|
|
53
|
-
`:"<p>";return
|
|
54
|
-
`);case"SPAN":{let a=e.dataset.userId;return a?jsx$1("element",{type:Kt,value:a,displayName:e.textContent},{text:""}):r}case"P":return jsx$1("element",{type:ELEMENT_PARAGRAPH},r);case"A":return jsx$1("element",{type:ELEMENT_LINK,url:e.getAttribute("href")},r);default:return r}}function jm(e){let o=findNode(e,{match:{type:getPluginType(e,ELEMENT_LINK)}}),[t]=o||[{url:""}];return t?.url}function ua(e){let o={children:[{text:" "}],type:da};e.insertNode(o);}var nk=createPluginFactory({isElement:!0,isInline:!0,isMarkableVoid:!0,isVoid:!0,key:Kt,options:{trigger:"@",triggerPreviousCharPattern:/^$|^[\s"']$/},plugins:[{isElement:!0,isInline:!0,isVoid:!0,key:da}],withOverrides:Em}),Am=createPlugins([createParagraphPlugin({component:Fm}),createBoldPlugin({component:withProps(PlateLeaf,{as:"b"})}),createItalicPlugin({component:withProps(PlateLeaf,{as:"i"})}),createUnderlinePlugin({component:withProps(PlateLeaf,{as:"u"})}),createFontColorPlugin(),createFontBackgroundColorPlugin(),createLinkPlugin({component:$m}),nk({component:mi})],{components:{[da]:ui}});var Gm=({isDisabled:e})=>{let{formatMessage:o}=F(),t=useEditorRef();return jsxs(Ne,{type:"dialog",children:[jsx(Le,{children:jsx(B,{icon:LinkIcon,size:"sm",isDisabled:e,"aria-label":o(mo.addLink),className:Yo,preventFocusOnPress:!0})}),jsx(Re,{className:sprinkles({boxShadow:"medium"}),placement:"top end",children:({close:r})=>jsx(ue,{size:"content",style:{minWidth:240},children:jsx(mk,{close:()=>{r(),setTimeout(()=>{focusEditor(t,t.selection);},0);}})})})]})},mk=({close:e})=>{let o=useEditorRef(),{formatMessage:t}=F(),r=useEditorSelector(l=>jm(l),[]),[a,n]=ro.useState(r?"show":"add"),[i,s]=ro.useState(r||""),p=jsx(L,{padding:"lg",children:jsx(Ke,{label:t(mo.link),value:i,autoFocus:!0,onChange:s,placeholder:"https://yourdomain.com"})});return jsxs(Fragment,{children:[a==="add"&&jsxs(Fragment,{children:[p,jsx(L,{display:"flex",justifyContent:"flex-end",padding:"lg",className:im,children:jsx(U,{isDisabled:!isUrl(i,!0),label:t(mo.addLink),size:"sm",onPress:()=>{upsertLink(o,{url:i,skipValidation:!0}),e?.();},preventFocusOnPress:!0})})]}),a==="show"&&jsxs(Fragment,{children:[jsx(L,{padding:"lg",children:jsx(Q,{type:"subtitle",size:"sm",children:r})}),jsxs(L,{display:"flex",justifyContent:"flex-end",padding:"lg",gap:"lg",borderColor:"border.subtle",borderWidth:1,borderStyle:"solid",children:[jsx(U,{label:t(mo.editLink),size:"sm",variant:"secondary",onPress:()=>{n("edit");},style:{flex:1,justifyContent:"center"}}),jsx(U,{label:t(mo.removeLink),size:"sm",onPress:()=>{unwrapLink(o),e?.();},preventFocusOnPress:!0,style:{flex:1,justifyContent:"center"}})]})]}),a==="edit"&&jsxs(Fragment,{children:[p,jsxs(L,{display:"flex",justifyContent:"flex-end",padding:"lg",gap:"lg",borderColor:"border.subtle",borderWidth:1,borderStyle:"solid",children:[jsx(U,{label:t(mo.cancel),size:"sm",variant:"secondary",onPress:()=>{n("show"),e?.();}}),jsx(U,{label:t(mo.save),size:"sm",onPress:()=>{upsertLink(o,{url:i,skipValidation:!0}),e?.();}})]})]})]})};function $m({className:e,children:o,...t}){return jsx(PlateElement,{asChild:!0,className:e,...t,children:jsx("a",{className:Rr({size:"sm"}),children:o})})}var mo=$({addLink:{id:"addLink",defaultMessage:"Add Link",description:"Add Link"},editLink:{id:"editLink",defaultMessage:"Edit Link",description:"Edit Link"},removeLink:{id:"removeLink",defaultMessage:"Remove Link",description:"Remove Link"},cancel:{id:"cancel",defaultMessage:"Cancel",description:"Cancel"},save:{id:"save",defaultMessage:"Save",description:"Save"},link:{id:"linkAnnotation",defaultMessage:"Link",description:"Link"}});var yk=parseColor("#ffffff00").toString("hexa"),_i=[{label:"Red",color:"#ff0000"},{label:"Green",color:"#00ff00"},{label:"Blue",color:"#0000ff"},{label:"Yellow",color:"#ffff00"},{label:"Cyan",color:"#00ffff"},{label:"Magenta",color:"#ff00ff"},{label:"Black",color:"#000000"},{label:"White",color:"#ffffff"},{label:"Gray",color:"#808080"},{label:"Orange",color:"#ffa500"},{label:"Brown",color:"#a52a2a"},{label:"Purple",color:"#800080"}];[..._i,{label:"Transparent",color:yk}];var ya=({nodeType:e,icon:o,ariaLabel:t,isDisabled:r})=>{let a=useEditorSelector(i=>isMarkActive(i,e),[]),n=useEditorRef();return jsx(be,{variant:"tertiary",isSelected:a,size:"sm",icon:o,"aria-label":t,isDisabled:r,onPress:()=>{toggleMark(n,{key:e});},preventFocusOnPress:!0})},hi=({nodeType:e,"aria-label":o,isDisabled:t})=>{let{updateColor:r,clearColor:a,color:n}=useColorDropdownMenuState({customColors:[],colors:[],nodeType:e}),i=useCallback(({ref:p,triggerProps:l})=>jsx(B,{icon:e==="color"?TextIcon$1:HighlightTextIcon,"aria-label":o,size:"md",variant:"popover",isDisabled:t,className:Yo,preventFocusOnPress:!0,...l,ref:p}),[e,o,t]),s=useCallback(p=>{p?r(p.toString("rgba")):a();},[a,r]);return jsx(Ko,{presets:_i,allowRemoval:!0,pickerMode:"lazy",placement:"top end",colorLabel:!1,renderTriggerButton:i,value:n||"#000000",onChange:s,isDisabled:t})};var qk=[{type:ELEMENT_PARAGRAPH,children:[{text:""}]}],ma=ro.createContext({items:[],containerRef:{current:null},maxMentionableUsersSuggestions:10}),Pi=ro.forwardRef(({value:e,defaultValue:o,onChange:t,style:r,spellCheck:a,placeholder:n,isInline:i,isDisabled:s,editableContentAriaLabel:p,containerRef:l,onHelpDialogOpenRequest:c,mentionableUsers:u,editorHandle:m,maxMentionableUsersSuggestions:d,autoFocus:f,editorRef:y,saveOnEnter:b,onSave:v},_)=>{let g=useRef(null),h=useId(),{formatMessage:R}=F(),x=useRef(null),I=x.current,k=useRef(null),S=useMemo(()=>I?.getRootNode()instanceof ShadowRoot,[I]),[N,w]=useControlledState(e?vi(e):void 0,vi(o||"<p></p>"),C=>{t&&t(Gt(C));}),{keyboardProps:T}=useKeyboard({onKeyDown:C=>{(b&&C.key==="Enter"&&!C.shiftKey||(C.ctrlKey||C.metaKey)&&C.key==="Enter")&&(C.preventDefault(),v()),C.altKey&&C.key==="F10"?(C.preventDefault(),g.current&&g.current.querySelector("button")?.focus()):C.continuePropagation(),lt()&&S&&k.current&&focusEditor(k.current);}});useEffect(()=>{s&&k.current&&deselect(k.current);},[s]),useImperativeHandle(_,()=>({startMention:()=>{k.current&&!x.current?.querySelector("input[role='combobox']")&&ua(k.current);}})),useImperativeHandle(m,()=>({setCaretPosition:C=>{k.current&&(focusEditor(k.current),moveSelection(k.current,{distance:C,unit:"character"}));},focus:()=>{k.current&&focusEditor(k.current);}}));let P=useMemo(()=>({items:u||[],containerRef:l,maxMentionableUsersSuggestions:d}),[u,l,d]);return jsx(ma.Provider,{value:P,children:jsxs(Plate,{initialValue:N||qk,plugins:Am,editorRef:M(k,y||null),onChange:C=>{w(C);},children:[jsxs(ia,{className:pa,"aria-controls":h,ref:g,children:[jsxs(L,{display:"flex",flexDirection:"row",role:"group",gap:"xs",paddingX:"sm",children:[jsx(ya,{nodeType:MARK_BOLD,icon:BoldIcon,ariaLabel:R(et.bold),isDisabled:s}),jsx(ya,{nodeType:MARK_ITALIC,icon:ItalicIcon,ariaLabel:R(et.italic),isDisabled:s}),jsx(ya,{nodeType:MARK_UNDERLINE,icon:UnderlineIcon,ariaLabel:R(et.underline),isDisabled:s})]}),jsx(O,{orientation:"vertical",className:jt}),jsx(hi,{nodeType:MARK_COLOR,"aria-label":R(et.fontColor),isDisabled:s}),jsx(O,{orientation:"vertical",className:jt}),jsx(hi,{nodeType:MARK_BG_COLOR,"aria-label":R(et.backgroundColor),isDisabled:s}),jsx(O,{orientation:"vertical",className:jt}),jsx(Gm,{isDisabled:s}),jsx(O,{orientation:"vertical",className:jt}),jsx(B,{className:Yo,icon:QuestionmarkCircleIcon,size:"sm","aria-label":R(et.help),onPress:c})]}),jsx(O,{variant:"secondary"}),jsx("div",{...T,ref:x,children:jsx(PlateContent,{id:h,disabled:s,readOnly:s,style:r,placeholder:n,autoFocus:f,spellCheck:a,"aria-label":p,className:classNames(sa({isDisabled:s}),la({isInline:i})),renderPlaceholder:({attributes:C,children:E})=>jsx("span",{...C,className:sprinkles({paddingY:"lg"}),children:E})})})]})})});Pi.displayName="RichEditor";var Bm=({key:e,value:o},{isDisabled:t,optionProps:r,isFocused:a,_state:n},i)=>{let{hoverProps:s}=useHover({isDisabled:t}),{label:p,data:l}=o;return jsxs(Fragment,{children:[jsxs("li",{...mergeProps(r,s),className:um({isDisabled:t,isHovered:a}),"data-active":a,ref:i,children:[jsx($o,{name:p,...l?.avatar}),jsxs(L,{display:"flex",flexDirection:"column",children:[jsx(Q,{type:"subtitle",size:"sm",children:p}),jsx(Q,{type:"helper",size:"sm",children:l?.description})]})]}),e===n.collection.getLastKey()?null:jsx(O,{})]})},et=$({bold:{defaultMessage:"Bold",id:"bold"},italic:{defaultMessage:"Italic",id:"italic"},underline:{defaultMessage:"Underline",id:"underline"},backgroundColor:{defaultMessage:"Background color",id:"backgroundColor"},fontColor:{defaultMessage:"Font color",id:"fontColor"},help:{defaultMessage:"Help",id:"help"}});var Jm=ro.memo(ro.forwardRef(({className:e,style:o,"data-block-id":t,"data-block-class":r,enableRichText:a=!1,onCancel:n,onSave:i,isInline:s=!0,submitButtonIcon:p=ArrowUpCircleFilledIcon,submitButtonAriaLabel:l,cancelButtonAriaLabel:c,"aria-label":u,"aria-describedby":m,"aria-labelledby":d,"aria-details":f,editableContentAriaLabel:y="Editing Area",footerButtons:b,clearOnCancel:v,clearOnSave:_,...g},h)=>{let R=useRef(null),{formatMessage:x}=F(),I=useRef(null),k=useRef(null),S=useRef(null),N=!a&&g.variant==="minimal",w=useRef(null),[T,P]=ro.useState(g.value||g.defaultValue),C=g.isDisabled||g.isSaveDisabled||!getPlainText(T||""),{fieldProps:E}=useLabel({"aria-label":u,"aria-labelledby":d,"aria-describedby":m,"aria-details":f,labelElementType:"div"});N&&!g.avatarName&&console.warn("Editor: When using the minimal `variant` and `enableRichText` is `false`, you should provide an `avatarName`.");let H=useCallback(()=>{P(""),a?R.current?.reset():k.current?.clear();},[a]),D=useCallback(()=>{C||(i?.(a?Gt(R.current?.children):I.current.value),_&&H());},[H,_,a,i,C]),K=jsx(B,{variant:"ghost","aria-label":l||x(Ii.save),icon:p,isDisabled:C,size:"md",excludeFromTabOrder:N,className:N?fm:void 0,onPress:D,preventFocusOnPress:!0}),[j,G]=ro.useState(!1),{keyboardProps:A}=useKeyboard({onKeyDown:V=>{(V.metaKey||V.ctrlKey)&&V.shiftKey&&V.key==="h"&&(V.preventDefault(),G(!0));}}),ee=useCallback(V=>{P(V),g.onChange?.(V);},[g]);return jsxs("div",{...mergeProps(E,a?A:{}),role:"application",ref:M(S,h),style:o,"data-block-id":t,"data-block-class":r,className:classNames(lm({isInline:s,isMinimal:N}),"BaselineUI-Editor",e),"aria-disabled":g.isDisabled,children:[N?jsxs(Fragment,{children:[s?jsx($o,{className:sm,name:g.avatarName||""}):null,jsxs("div",{className:bm({isInline:s}),children:[jsx(ca,{isMinimal:N,textBoxRef:I,isInline:s,editableContentAriaLabel:y,...g,onChange:ee,onSave:D}),K]})]}):jsxs(Fragment,{children:[a?jsx(Pi,{containerRef:S,ref:w,editorRef:R,isInline:s,editableContentAriaLabel:y,onHelpDialogOpenRequest:()=>{G(!0);},...g,onChange:ee,onSave:D}):jsxs(Fragment,{children:[!s&&jsx(O,{variant:"secondary"}),jsx(ca,{onCancel:n,textBoxRef:I,ref:k,isInline:s,editableContentAriaLabel:y,...g,onChange:V=>{P(V),g.onChange?.(V);},onSave:D})]}),jsx(O,{variant:"secondary"}),jsxs("div",{className:classNames(pa,sprinkles({justifyContent:"space-between"})),children:[jsxs(L,{paddingX:"sm",gap:"sm",display:"flex",children:[a&&g.mentionableUsers?jsx(B,{icon:AtIcon,size:"sm","aria-label":x(Ii.mention),onPress:()=>w.current?.startMention(),preventFocusOnPress:!0}):null,b?.map(({type:V,props:W},X)=>V==="action"?jsx(B,{...W,size:"sm",isDisabled:g.isDisabled||W.isDisabled},X):jsx(be,{...W,size:"sm",variant:"tertiary",isDisabled:g.isDisabled||W.isDisabled},X))]}),jsxs(L,{children:[!!n&&jsx(B,{variant:"secondary",icon:CrossCircleFilledIcon,isDisabled:g.isDisabled,size:"md",onPress:()=>{n(),v&&H();},"aria-label":c||x(Ii.cancel)}),K]})]})]}),jsx(hm,{isOpen:j,onClose:()=>{G(!1);}})]})}));Jm.displayName="Editor";var Ii=$({cancel:{defaultMessage:"Cancel",id:"cancel"},save:{defaultMessage:"Save",id:"save"},mention:{defaultMessage:"Mention",id:"mention"}});var ga=ro.forwardRef(({className:e,style:o,"data-block-id":t,"data-block-class":r,isMounted:a,children:n,transitions:i,elementType:s="div",...p},l)=>{let c=useTransition(a,i),u=animated[s];return c((m,d)=>d&&jsx(u,{className:e,"data-block-id":t,"data-block-class":r,style:{...o,...m},...p,ref:l,children:n}))});ga.displayName="Transition";var ef="_8kqf970 _1yep5z6pd _1yep5z6pe _1yep5z6pf _1yep5z6149 _1yep5z614a _1yep5z614b _1yep5z614i _1yep5z614j _1yep5z614k _1yep5z6150 _1yep5z6151 _1yep5z6152 _1yep5z6yy _1yep5z6v7 _1yep5z6v8 _1yep5z6v9 _1yep5z6176";var tf=2,rf=ro.forwardRef(({className:e,style:o,hideForKeyboard:t,scrollRef:r,label:a,delay:n=1500,smoothScroll:i=!0,"data-block-id":s,"data-block-class":p},l)=>{let c=ro.useRef(null),u=useInteractionModality(),[m,d]=ro.useState(!1),f=useCallback(()=>{let N=r?.current||fe(c.current).body;return re(N).getComputedStyle(N).flexDirection==="column-reverse"?N.scrollTop+tf>=0:N.scrollTop+N.clientHeight+tf>=N.scrollHeight},[r]),[y,b]=ro.useState(f),v=Io(),{buttonProps:_,isPressed:g}=useButton({onPress:()=>{let N=r?.current||fe(c.current).body;N.scrollTo({top:N.scrollHeight,behavior:i?"smooth":"auto"});}},c),{focusProps:h,isFocused:R,isFocusVisible:x}=useFocusRing(),{hoverProps:I,isHovered:k}=useHover({}),S=filterTruthyValues({"data-block-id":s,"data-block-class":p,"data-pressed":g,"data-focus-visible":x,"data-hovered":k,"data-focused":R});return useEffect(()=>{b(f());},[f]),useEffect(()=>{let N=r?.current||fe(c.current).body,w="onscrollend"in re(N),T=()=>{setTimeout(()=>{d(!1),b(f());},n);},P=()=>{d(!0),w||T();};return N.addEventListener("scroll",P),N.addEventListener("scrollend",T),()=>{N.removeEventListener("scroll",P),N.removeEventListener("scrollend",T);}},[r,n,f]),jsxs(ga,{isMounted:(t?u!=="keyboard":!0)&&!m&&!y,elementType:"button",transitions:{from:{opacity:0,transform:"translateX(-50%) translateY(10px)"},enter:{opacity:1,transform:"translateX(-50%) translateY(0)"},leave:{opacity:0,transform:"translateX(-50%) translateY(10px)"},immediate:v},...mergeProps(_,h,I,S),className:classNames(ef,Er({isFocusVisible:x,variant:"high-contrast",isHovered:k}),Br({variant:"high-contrast"}),"BaselineUI-ScrollControlButton",e),style:o,ref:M(l,c),children:[jsx(ArrowDownCircleFilledIcon,{size:16,className:Ct({variant:"high-contrast"})}),a]})});rf.displayName="ScrollControlButton";var Ri="_1yep5z6jt _1yep5z6ju _1yep5z6jv _1yep5z6k2 _1yep5z6k3 _1yep5z6k4",af=z({defaultClassName:"_1v0p2z10 _1yep5z63r _1yep5z63s _1yep5z63t _1yep5z619 _1yep5z61a _1yep5z61b _1yep5z6ih _1yep5z6ii _1yep5z6ij _1yep5z6it _1yep5z6iu _1yep5z6iv _1yep5z69f _1yep5z69g _1yep5z69h",variantClassNames:{hasTitleAndIcon:{true:"_1yep5z6lv _1yep5z6lw _1yep5z6lx _1yep5z6od _1yep5z6oe _1yep5z6of"},hasNoCloseBtn:{true:"_1yep5z6m1 _1yep5z6m2 _1yep5z6m3 _1yep5z6od _1yep5z6oe _1yep5z6of _1yep5z6pj _1yep5z6pk _1yep5z6pl _1yep5z6n7 _1yep5z6n8 _1yep5z6n9"}},defaultVariants:{},compoundVariants:[[{hasTitleAndIcon:!0,hasNoCloseBtn:!0},"_1yep5z61h5 _1yep5z61h6 _1yep5z61h7"]]}),nf="_1v0p2z10";var _a=ro.forwardRef(({className:e,style:o,"data-block-id":t,"data-block-class":r,message:a,title:n,primaryActionLabel:i,cancelLabel:s,textInputProps:p,icon:l,iconColor:c,showCloseButton:u=!0,onPrimaryAction:m,onCancel:d,autoFocusButton:f,isPrimaryActionDisabled:y},b)=>{let v=useId(),{formatMessage:_}=F(),g=n&&jsx(Q,{id:v,type:"title",size:"sm",elementType:"h3",children:n});return jsxs(ue,{className:e,style:o,"data-block-id":t,"data-block-class":r,size:"sm",variant:"primary",role:"alertdialog",ref:b,"aria-labelledby":v,children:[jsxs("div",{className:af({hasTitleAndIcon:!!(l&&n),hasNoCloseBtn:!u}),children:[jsxs(L,{display:"flex",justifyContent:"space-between",alignItems:"center",flexDirection:"row",children:[l?jsx(l,{style:{color:c},size:24}):null,!l&&g,u?jsx(B,{icon:XIcon,variant:"secondary",size:"md","aria-label":_(_0.close),onPress:d}):null]}),l?g:null]}),a?jsx(L,{elementType:"section",className:nf,paddingX:"lg",paddingBottom:"lg",typography:"body.sm.regular",color:"text.primary",children:a}):null,p?jsx(L,{paddingX:"lg",paddingBottom:"lg",children:jsx(Ke,{...p})}):null,s||i?jsxs(Fragment,{children:[jsx(O,{}),jsxs(L,{padding:"lg",display:"flex",gap:"xl",children:[s?jsx(U,{variant:"secondary",className:Ri,label:s,onPress:d,autoFocus:f==="cancel"}):null,i?jsx(U,{className:Ri,label:i,onPress:m,autoFocus:f==="primary",isDisabled:y}):null]})]}):null]})});_a.displayName="AlertDialog";var _0=$({close:{id:"close",defaultMessage:"Close",description:"Close button label"}});var sf="_1t55bp71",lf="_1yep5z6e3 _1yep5z6eu _1yep5z6in _1yep5z6io _1yep5z6ip _1yep5z69i _1yep5z69j _1yep5z69k",pf="_1t55bp70";var k0=P0(),cf=ro.forwardRef(({className:e,style:o,children:t,"data-block-id":r,"data-block-class":a,showCaret:n},i)=>{let s=useMemo(()=>{let p=t;return (!t||Array.isArray(t)&&t.length===0)&&(p=""),k0.render(p)},[t]);return jsx("div",{className:classNames(lf,pf,{[sf]:n},"BaselineUI-Markdown",e),"data-block-id":r,"data-block-class":a,style:o,ref:i,dangerouslySetInnerHTML:{__html:s}})});cf.displayName="Markdown";function ff(e){let{formatMessage:o,locale:t}=F(),[r,a]=ro.useState(!1),[n,i]=ro.useState(0),[s,p]=ro.useState(0),[l,c]=ro.useState(!1);useEffect(()=>{if(!e.current)return;let d=e.current,f=()=>{a(!1),i(0);},y=()=>{l||i(d.currentTime*100/d.duration);},b=()=>{p(d.duration);};return d.addEventListener("ended",f),d.addEventListener("timeupdate",y),d.addEventListener("loadedmetadata",b),()=>{d.removeEventListener("ended",f),d.removeEventListener("timeupdate",y),d.removeEventListener("loadedmetadata",b);}},[l,e]);let u=useCallback(()=>{(async()=>e.current&&(e.current.paused?(await e.current.play(),a(!0),announce(o(uf.playing),"polite")):(e.current.pause(),a(!1),announce(o(uf.paused),"polite"))))();},[o,e]),m=useCallback(d=>{e.current&&(e.current.currentTime=d*e.current.duration/100,announce(R0(e.current.currentTime,t.locale),"assertive"));},[t.locale,e]);return {isPlaying:r,progress:n,duration:s,togglePlay:u,seek:m,setProgress:i,formattedCurrentTime:e.current?.currentTime?mf(e.current?.currentTime):"00:00",formattedDuration:s?mf(s):"00:00",setIsSliderDragging:c}}var uf=$({playing:{id:"playing",defaultMessage:"Playing"},paused:{id:"paused",defaultMessage:"Paused"}});function R0(e,o){let t=Math.floor(e/3600),r=Math.floor(e%3600/60),a=e%60,n={...t&&{hours:t},...r&&{minutes:r},seconds:Math.floor(a)};return new Intl.DurationFormat(o,{style:"long"}).format(n)}function mf(e){let o=Math.floor(e%3600/60),t=Math.floor(e%60);return [o,t].map(r=>r.toString().padStart(2,"0")).join(":")}var yf="_1yep5z6ih _1yep5z6ii _1yep5z6ij _1yep5z6iq _1yep5z6ir _1yep5z6is _1yep5z6j8 _1yep5z6j9 _1yep5z6ja _1yep5z69o _1yep5z69p _1yep5z69q",bf="rta2n91 _1yep5z6ih _1yep5z6ii _1yep5z6ij _1yep5z6iq _1yep5z6ir _1yep5z6is _1yep5z6j8 _1yep5z6j9 _1yep5z6ja _1yep5z69o _1yep5z69p _1yep5z69q _1yep5z6zq _1yep5z6va _1yep5z6vb _1yep5z6vc _1yep5z6174 _1yep5z610n",gf="rta2n90";var zf=ro.forwardRef(({className:e,style:o,size:t="lg",sources:r,"data-block-id":a,"data-block-class":n,...i},s)=>{let p=ro.useRef(null),{isPlaying:l,progress:c,duration:u,togglePlay:m,seek:d,formattedDuration:f,formattedCurrentTime:y,setProgress:b,setIsSliderDragging:v}=ff(p),{formatMessage:_}=F(),g=filterTruthyValues({"data-block-id":a,"data-block-class":n,"data-state":l?"playing":"paused","data-loaded":u>0});return jsxs("div",{...g,...i,className:classNames(yf,"BaselineUI-AudioPlayer",e),role:"group",style:o,ref:s,children:[jsx(VisuallyHidden,{children:jsx("audio",{ref:p,children:r.map(({url:h,type:R})=>jsx("source",{src:h,type:R},h))})}),jsx(be,{icon:l?PauseIcon:PlayIcon,variant:"toolbar",isSelected:l,size:t,"aria-label":_(l?Ti.pause:Ti.play),style:{borderRadius:"50%"},onPress:m}),jsxs("div",{className:bf,children:[jsx("span",{"aria-hidden":!0,children:y}),jsx(Lo,{"aria-label":_(Ti.audioTimeline),value:c,minValue:0,maxValue:100,className:gf,onChange:h=>{b(h),v(!0);},onChangeEnd:h=>{d(h),v(!1);}}),jsx("span",{"aria-hidden":!0,children:f})]})]})});zf.displayName="AudioPlayer";var Ti=$({play:{id:"play",defaultMessage:"Play"},pause:{id:"pause",defaultMessage:"Pause"},audioTimeline:{id:"audioTimeline",defaultMessage:"Audio timeline"}});var hf="_1w920rnd _1yep5z6ai _1yep5z6aj _1yep5z6ak _1yep5z6b6 _1yep5z6b7 _1yep5z6b8 _1yep5z6bu _1yep5z6bv _1yep5z6bw _1yep5z6ci _1yep5z6cj _1yep5z6ck _1yep5z6g1 _1yep5z6i5 _1yep5z6i6 _1yep5z6i7",xf="_1w920rn1 _1yep5z6ik _1yep5z6il _1yep5z6im _1yep5z6it _1yep5z6iu _1yep5z6iv _1yep5z6j8 _1yep5z6j9 _1yep5z6ja _1yep5z69i _1yep5z69j _1yep5z69k",Cf="_1w920rn0 _1yep5z6ih _1yep5z6ii _1yep5z6ij _1yep5z6iq _1yep5z6ir _1yep5z6is _1yep5z6l3",ha=z({defaultClassName:"_1w920rn2 _1yep5z6d6 _1yep5z6ih _1yep5z6ii _1yep5z6ij _1yep5z6j8 _1yep5z6j9 _1yep5z6ja _1yep5z6i2 _1yep5z6i3 _1yep5z6i4",variantClassNames:{isFocusVisible:{true:"_1yep5z6li _1yep5z6lg _1yep5z6hp"},isSelected:{true:"_1yep5z6li _1yep5z6lg _1yep5z6hp"},isLoading:{true:"_1yep5z615u _1yep5z615v _1yep5z615w"}},defaultVariants:{},compoundVariants:[[{isFocusVisible:!0,isSelected:!0},"_1w920rn6 _1yep5z6li _1yep5z6lg _1yep5z6hp"]]}),Pf="_1w920rnb _1yep5z6ld",kf=z({defaultClassName:"_1w920rn7 _1yep5z63o _1yep5z63p _1yep5z63q _1yep5z61c _1yep5z61d _1yep5z61e _1yep5z63 _1yep5z64 _1yep5z65 _1yep5z62f _1yep5z62g _1yep5z62h _1yep5z6b0 _1yep5z6b1 _1yep5z6b2 _1yep5z6bo _1yep5z6bp _1yep5z6bq _1yep5z6cc _1yep5z6cd _1yep5z6ce _1yep5z6d0 _1yep5z6d1 _1yep5z6d2 _1yep5z6g5 _1yep5z6eu _1yep5z6dy",variantClassNames:{isFocusVisible:{true:"_1w920rn8 _1yep5z6li _1yep5z6lg _1yep5z6hp"},isSelected:{true:"_1w920rn9"}},defaultVariants:{},compoundVariants:[[{isFocusVisible:!0,isSelected:!0},"_1w920rna _1yep5z61t1 _1yep5z61t0 _1yep5z61pa"]]}),If="_1w920rnc";var Rf=({items:e,ulRef:o})=>{let{length:t}=e,r=ro.useRef(null);return useLayoutEffect(()=>{if(!r.current)return;let a=r.current.closest(".BaselineUI-ImageGallery")?.querySelector(`[data-image-key='${e?.at(-1)?.key}']`)?.cloneNode(!0);invariant(a,"Node is not defined."),r.current?.prepend(a);},[e,o]),jsx("div",{className:ha(),ref:r,children:jsx(L,{backgroundColor:"background.secondary.medium",borderRadius:"full",typography:"label.md.medium",color:"text.primary",position:"absolute",paddingX:"md",className:If,children:t})})};function Sf(e,o){return e.find(t=>t.id===o)}function Tf(e,o,t){let r=e.findIndex(i=>i.id===o),a=[...t].map(i=>e.findIndex(s=>s.id===i)),n=[...e];for(let i of a){let[s]=n.splice(i,1);n.splice(r,0,s);}return n}function Nf(e,o,t){let r=e.findIndex(s=>s.id===o),a=[...t].map(s=>e.findIndex(p=>p.id===s)),n=[...e],i=0;for(let s of a){let[p]=n.splice(s-i,1);n.splice(r,0,p),i++;}return n}function Ni(e){return e.map(o=>({id:o.id,label:o.label,data:{src:o.src,alt:o.alt}}))}function xa(e){return e.map(o=>({id:o.id,label:o.label,src:o.data?.src,alt:o.data?.alt}))}var $0=({fit:e,item:o,deleteElement:t})=>{let{formatMessage:r}=F(),{imgProps:a,isLoading:n,isLoaded:i}=ko({src:o.data?.src,alt:o.data?.alt??""}),s=useTransition(i,{from:{opacity:0},enter:{opacity:1},leave:{opacity:0}});return n?jsx(Oo,{"aria-label":r(Yt.loading)}):s((p,l)=>l&&jsx(animated.div,{role:"img","aria-label":a.alt,style:{...p,backgroundImage:`url(${a.src})`,backgroundSize:e},className:Pf,children:t}))},Lf=({item:{value:e},options:{optionProps:o,isFocusVisible:t,isSelected:r},liRef:a,fit:n="contain",onDelete:i,className:s,imageClassName:p,imageLabelClassName:l,imageDimensions:c,style:u,renderImage:m=(d,{deleteElement:f})=>jsx($0,{item:d,deleteElement:f,fit:n})})=>{let d=useId(),{formatMessage:f}=F();invariant(e&&_o(e),"Expected value to be a list option");let y=i?jsx("div",{className:hf,children:jsx(B,{"aria-label":f(Yt.delete),size:"xs",icon:XIcon$2,onPress:()=>{i(e.id);},UNSAFE_NON_INTERACTIVE:!0})}):null,b=useCallback(v=>{let _={},g=typeof v=="function"?v(xa([e])[0],{isSelected:r}):v;return g&&(_.width=typeof g.width=="string"?Mi[g.width]:g.width,_.aspectRatio="height"in g?`${_.width} / ${g.height}`:g?.aspectRatio?.toString()),_},[r,e]);return jsxs("li",{...o,ref:a,className:classNames(xf,s),"aria-labelledby":d,style:u,children:[jsx(L,{display:"flex",flexDirection:"column",flex:1,justifyContent:"center",alignItems:"center",children:jsx("div",{className:classNames(ha({isFocusVisible:t,isSelected:r,isLoading:!0}),p),style:b(c),"data-image-key":e.id,children:m(e,{deleteElement:y??void 0,onDelete:i})})}),jsx("span",{id:d,className:classNames(kf({isFocusVisible:t,isSelected:r}),l),children:e.label})]})};var X0={width:0,display:"block"};var Mi=(t=>(t[t.sm=102]="sm",t[t.md=170]="md",t))(Mi||{}),Bf=ro.forwardRef(({className:e,style:o,fit:t="cover",onReorder:r,"data-block-id":a,"data-block-class":n,onDelete:i,imageWidth:s="sm",aspectRatio:p=3/4,items:l,defaultItems:c=[],onKeyDown:u,imageContainerClassName:m,imageClassName:d,labelClassName:f,onListChange:y,renderImage:b,imageDimensions:v={width:s,aspectRatio:p},imageContainerStyle:_,...g},h)=>{let R=ro.useRef(null),[x,I]=useState([]),{formatMessage:k}=F();useEffect(()=>{(p||s)&&console.warn("ImageGallery: aspectRatio and imageWidth are deprecated. Use imageDimensions instead.");},[s,p]);let[S,N]=useControlledState(g.selectedKeys,g.defaultSelectedKeys??[],g.onSelectionChange),[w,T]=useControlledState(l?Ni(l):void 0,Ni(c),y?D=>{y?.(xa(D));}:void 0),P=useCallback(D=>{let K=D.target.key,j=D.keys;if(D.target.dropPosition==="before"){let G=Tf(w,K,j);T(G);}else if(D.target.dropPosition==="after"){let G=Nf(w,K,j);T(G);}r?.(D);},[w,r,T]),C=useCallback(()=>{i&&x.length&&(T(w.filter(D=>!x.includes(D.id))),i(new Set(x)),I([]));},[x,w,i,T]),E=useCallback((D,K,j)=>jsx(Lf,{item:D,options:K,liRef:j,fit:t,onDelete:i?G=>{I([G]);}:void 0,renderImage:b,className:m,imageClassName:d,imageLabelClassName:f,imageDimensions:v,style:_}),[t,i,b,m,d,f,v,_]),{keyboardProps:H}=useKeyboard({onKeyDown(D){if(u?.(D),D.key==="Backspace"||D.key==="Delete"){if(!i)return;if([...S].length)I([...S]);else {let j=D.target.dataset.key;I([j]);}}}});return jsxs("div",{...H,ref:h,style:o,className:classNames("BaselineUI-ImageGallery",e),"data-block-id":a,"data-block-class":n,children:[jsx(le,{...g,selectedKeys:S,items:w,onReorder:P,layout:"grid",orientation:"vertical",className:Cf,ref:R,dropIndicatorStyle:X0,renderOption:E,renderDragPreview:D=>jsx(Rf,{items:D,ulRef:R}),onSelectionChange:N,getItems:D=>[...D].map(K=>{let j=Sf(w,K);return {src:j?.src||"",alt:j?.alt||"",key:K}})}),jsx(we,{isOpen:!![...x].length,onOpenChange:D=>{D||I([]);},children:jsx(Ee,{isDismissable:!0,children:jsx(_a,{showCloseButton:!1,title:"Are you sure you want to delete this item?",primaryActionLabel:k(Yt.delete),cancelLabel:k(Yt.cancel),onCancel:()=>{I([]);},onPrimaryAction:C,autoFocusButton:"cancel"})})})]})});Bf.displayName="ImageGallery";var Yt=$({delete:{id:"delete",defaultMessage:"Delete"},cancel:{id:"cancel",defaultMessage:"Cancel"},loading:{id:"loading",defaultMessage:"Loading"}});var Df="_1sexph00",Ff="_1sexph01 _1yep5z617n _1yep5z617o _1yep5z617p _1yep5z619z _1yep5z61a0 _1yep5z61a1 _1yep5z61b5 _1yep5z61b6 _1yep5z61b7 _1yep5z618t _1yep5z618u _1yep5z618v _1yep5z61rj _1yep5z61rk _1yep5z61rl";var Of=ro.forwardRef(({className:e,style:o,items:t,"data-block-id":r,"data-block-class":a,hideLabel:n,size:i="md",isDisabled:s,showSelectedIcon:p=!0,excludeFromTabOrder:l,onPress:c,isSelected:u,defaultSelected:m,onButtonSelectionChange:d,moreAriaLabel:f,optionStyle:y,optionClassName:b,triggerClassName:v,triggerStyle:_,tooltipProps:g,...h},R)=>{let{formatMessage:x}=F(),I=te(),k=useSelectState({items:t,...h,defaultSelectedKey:h.defaultSelectedKey||t?.[0]?.id,children:I,validationState:h.validationState==="error"?"invalid":"valid"}),[S,N]=useControlledState(u,!!m,A=>{d?.({isSelected:A,selectedKey:k.selectedKey});}),{hoverProps:w,isHovered:T}=useHover({isDisabled:s}),P=useMemo(()=>{let A=k.collection.getItem(k.selectedKey),ee=A?.textValue||A?.["aria-label"],V=A?.value,W=V?.icon,X={size:i,isSelected:S,onPress:ze=>{N(!S),c?.(ze);},isDisabled:s,excludeFromTabOrder:l,className:typeof b=="function"?b(V,{isButton:!0,isSelected:S}):b,style:typeof y=="function"?y(V,{isButton:!0,isSelected:S}):y};return n&&W?jsx(ne,{variant:"inverse",size:"sm",includeArrow:!1,text:ee,placement:"bottom start",offset:4,...typeof g=="function"?g("button"):g,children:jsx(be,{icon:W,"aria-label":ee,variant:"toolbar",...X})}):jsx(Lr,{iconStart:W,label:ee,variant:"toolbar",...X})},[l,n,S,s,c,b,y,N,i,k.collection,k.selectedKey,g]),C=h["aria-label"],E=useCallback(({buttonProps:A,ref:ee})=>{delete A["aria-labelledby"];let V=f||`${x(aI.more)} ${C}`;return jsx(ne,{variant:"inverse",size:"sm",includeArrow:!1,text:V,placement:"bottom start",offset:4,...g,children:jsx(PressResponder,{...A,children:jsx(B,{"aria-label":V,ref:ee,icon:CaretDownIcon,variant:"toolbar",size:i,className:({isFocusVisible:W})=>classNames(Nr({isSelected:S,isFocusVisible:W}),Ff,v),style:_,isDisabled:s,excludeFromTabOrder:l})})})},[C,l,x,S,s,f,i,g,v,_]),H=filterTruthyValues({"data-block-id":r,"data-block-class":a,"data-hovered":T,"data-selected":S,"data-disabled":s,"data-expanded":k.isOpen}),D=ae(R),K=useMemo(()=>({state:k,popoverAnchorRef:D}),[k,D]),j=useCallback(A=>typeof b=="function"?b(A,{isButton:!1,isSelected:k.selectionManager.isSelected(A.id)}):b,[b,k.selectionManager]),G=useCallback(A=>typeof y=="function"?y(A,{isButton:!1,isSelected:k.selectionManager.isSelected(A.id)}):y,[y,k.selectionManager]);return jsx(Fr.Provider,{value:K,children:jsxs(L,{...w,role:"group",display:"inline-flex",flexDirection:"row",alignItems:"center",className:classNames(Df,"BaselineUI-ButtonSelect",e),"aria-label":h["aria-label"],"aria-labelledby":h["aria-labelledby"],"aria-describedby":h["aria-describedby"],"aria-details":h["aria-details"],style:o,ref:D,...H,children:[P,jsx(Xe,{isDisabled:s,showSelectedIcon:p,placement:"bottom start",items:t,...h,style:{width:20},optionClassName:j,optionStyle:G,variant:"ghost",renderTrigger:E})]})})});Of.displayName="ButtonSelect";var aI=$({more:{id:"more",defaultMessage:"More"}});var jf=z({defaultClassName:"_18v88n10 _1yep5z6ih _1yep5z6ii _1yep5z6ij _1yep5z6lc",variantClassNames:{labelPosition:{top:"_1yep5z614l _1yep5z614m _1yep5z614n",start:"_1yep5z614i _1yep5z614j _1yep5z614k _1yep5z6160 _1yep5z6161 _1yep5z6162 _1yep5z6va _1yep5z6vb _1yep5z6vc"}},defaultVariants:{},compoundVariants:[]}),Af=z({defaultClassName:"_18v88n1p _1yep5z66 _1yep5z67 _1yep5z68 _1yep5z62i _1yep5z62j _1yep5z62k _1yep5z63o _1yep5z63p _1yep5z63q _1yep5z61c _1yep5z61d _1yep5z61e _1yep5z6eu _1yep5z6lc _1yep5z6ln _1yep5z6lf _1yep5z6dy",variantClassNames:{isDisabled:{true:"_18v88n1q _1yep5z610q"},labelPosition:{top:"_18v88n1r",start:"_18v88n1s"}},defaultVariants:{},compoundVariants:[]}),$f=z({defaultClassName:"_18v88n1t _1yep5z660 _1yep5z661 _1yep5z662 _1yep5z6ik _1yep5z6il _1yep5z6im _1yep5z6l9",variantClassNames:{validationState:{valid:"_18v88n1u",error:"_1yep5z6106",warning:"_1yep5z610e"},isReadOnly:{true:"_1yep5z610x"}},defaultVariants:{},compoundVariants:[]}),Uf=z({defaultClassName:"_18v88n1d _1yep5z6ai _1yep5z6aj _1yep5z6ak _1yep5z6b6 _1yep5z6b7 _1yep5z6b8 _1yep5z6bu _1yep5z6bv _1yep5z6bw _1yep5z6ci _1yep5z6cj _1yep5z6ck _1yep5z6ih _1yep5z6ii _1yep5z6ij _1yep5z6iq _1yep5z6ir _1yep5z6is _1yep5z6lq _1yep5z6lo _1yep5z6gz _1yep5z6j8 _1yep5z6j9 _1yep5z6ja",variantClassNames:{validationState:{valid:"_18v88n1e",error:"_1yep5z612a",warning:"_18v88n1g"},isHovered:{true:"_18v88n1h"},isFocused:{true:"_1yep5z6wa _1yep5z6wb _1yep5z6wc _1yep5z6wy _1yep5z6wz _1yep5z6x0 _1yep5z6xm _1yep5z6xn _1yep5z6xo _1yep5z6ya _1yep5z6yb _1yep5z6yc _1yep5z617i _1yep5z617g _1yep5z612o _1yep5z6179 _1yep5z6178 _1yep5z613h _1yep5z617b"},isDisabled:{true:"_18v88n1j"},variant:{primary:"_18v88n1k",ghost:"_18v88n1l"},isReadOnly:{true:"_1yep5z613h"}},defaultVariants:{},compoundVariants:[[{variant:"ghost",isHovered:!0,isFocused:!1,validationState:"valid"},"_1yep5z61ta _1yep5z61t8 _1yep5z61oj"],[{variant:"ghost",isFocused:!1,isHovered:!1,validationState:"valid"},"_18v88n1n"],[{isHovered:!0,validationState:"valid",isDisabled:!1,isReadOnly:!1,isFocused:!1,variant:"primary"},"_1yep5z61ok"],[{isHovered:!0,validationState:"warning",isDisabled:!1,isReadOnly:!1,isFocused:!1},"_1yep5z61ok"],[{isReadOnly:!0,variant:"primary",isFocused:!1},"_18v88n1o"]]}),qf=z({defaultClassName:"_18v88n13 _1yep5z6dy _1yep5z6ev",variantClassNames:{isDisabled:{true:"_1yep5z610q"}},defaultVariants:{},compoundVariants:[]}),Kf=z({defaultClassName:"_18v88n19 _1yep5z6ik _1yep5z6il _1yep5z6im",variantClassNames:{labelPosition:{top:"_1yep5z6sy _1yep5z6sz _1yep5z6t0",start:"_1yep5z6mv _1yep5z6mw _1yep5z6mx _1yep5z614l _1yep5z614m _1yep5z614n"},hasMessage:{true:"_18v88n1c"}},defaultVariants:{},compoundVariants:[[{labelPosition:"start",hasMessage:!1},"_1yep5z61rm _1yep5z61rn _1yep5z61ro"]]}),Gf=z({defaultClassName:"_18v88n15 _1yep5z699 _1yep5z69a _1yep5z69b _1yep5z6lf",variantClassNames:{isFocusVisible:{true:"_1yep5z611w _1yep5z613t _1yep5z6177"},isHovered:{true:"_1yep5z611w _1yep5z613t _1yep5z6177"},isOpen:{true:"_1yep5z613t _1yep5z6177"}},defaultVariants:{},compoundVariants:[[{isFocusVisible:!0},"_1yep5z61no _1yep5z61pl _1yep5z61sz"],[{isHovered:!0},"_1yep5z61no _1yep5z61pl _1yep5z61sz"],[{isOpen:!0},"_1yep5z61pl _1yep5z61sz"]]});var Yf=ro.forwardRef(({className:e,style:o,inputStyle:t,inputClassName:r,"data-block-id":a,"data-block-class":n,label:i,items:s,showSelectedIcon:p=!1,onSelectionChange:l,onInputChange:c,isInvalid:u=!1,labelPosition:m="top",validationState:d="valid",variant:f="primary",toggleLabel:y,renderOption:b,showIcon:v=!0,filter:_,minValue:g,maxValue:h,inputType:R="text",...x},I)=>{let{contains:k}=useFilter({sensitivity:"base"}),S=te(),N=useComboBoxState({...x,defaultFilter:_||k,defaultItems:s,onSelectionChange:l,onInputChange:c,children:S,validationState:u?"invalid":"valid"}),w=ro.useRef(null),T=ro.useRef(null),P=ro.useRef(null),C=ro.useRef(null),E=ro.useRef(null),{buttonProps:H,inputProps:D,listBoxProps:K,labelProps:j,errorMessageProps:G,descriptionProps:A,validationErrors:ee}=useComboBox({...x,inputRef:T,defaultItems:s,buttonRef:w,listBoxRef:P,popoverRef:C,validationState:d==="error"?"invalid":"valid"},N),V=x.errorMessage||ee.join(" "),W=Ie({...x,errorMessage:V,descriptionProps:A,errorMessageProps:G,labelPosition:m});V&&(d="error");let{hoverProps:X,isHovered:ze}=useHover({isDisabled:x.isDisabled}),{isFocused:Ce,focusProps:Pe,isFocusVisible:ke}=useFocusRing(),He=Fo({isReadOnly:x.isReadOnly,validationState:d}),oe=filterTruthyValues({"data-read-only":x.isReadOnly,"data-disabled":x.isDisabled,"data-validation-state":d,"data-focused":Ce,"data-focus-visible":ke}),{labelProps:de,fieldProps:it}=useLabel({label:i,"aria-label":x["aria-label"],"aria-labelledby":x["aria-labelledby"],"aria-describedby":x["aria-describedby"],"aria-details":x["aria-details"]});return jsx(ao.Provider,{value:N,children:jsxs("div",{className:classNames(jf({labelPosition:m}),e,"BaselineUI-ComboBox"),"data-block-id":a,"data-block-class":n,style:o,ref:I,children:[i||m==="start"&&W?jsxs("div",{className:Kf({labelPosition:m,hasMessage:!!W}),children:[jsx("label",{...mergeProps(j,de),className:qf({isDisabled:x.isDisabled}),children:i}),m==="start"&&W]}):null,jsxs("div",{...X,className:Uf({validationState:d,isHovered:ze,isFocused:Ce,variant:f,isReadOnly:!!x.isReadOnly,isDisabled:!!x.isDisabled}),ref:E,children:[jsx("input",{...mergeProps(D,Pe,oe,it,R==="number"?{type:"number",min:g,max:h,onKeyDown:to=>{(to.key==="ArrowUp"||to.key==="ArrowDown")&&to.preventDefault();}}:null),ref:T,className:classNames(Af({isDisabled:x.isDisabled,labelPosition:m}),"BaselineUI-ComboBox-Input",r),style:t}),He&&v?jsx(He,{className:$f({validationState:d,isReadOnly:x.isReadOnly}),size:16}):null,jsx(U,{...H,ref:w,variant:"popover",label:y,className:Gf({isFocusVisible:!x.isDisabled&&!x.isReadOnly&&ke,isHovered:!x.isDisabled&&!x.isReadOnly&&ze,isOpen:N.isOpen})})]}),jsx(ye,{className:qe,ref:C,triggerRef:E,state:N,children:jsx(le,{...K,items:s,ref:P,renderOption:b,selectionMode:"single",showSelectedIcon:p,className:kr})}),m==="top"&&W]})})});Yf.displayName="ComboBox";var Fi=ro.forwardRef(({item:e,renderGridItem:o,state:t},r)=>{let a=ae(r),n=useGridListItem({node:e},t,a),i=t.selectionManager.selectionMode!=="none"&&t.selectionManager.selectionBehavior==="toggle",{checkboxProps:s}=useGridListSelectionCheckbox({key:e.key},t);return o(e,{...n,checkBoxProps:i?s:void 0},a)});Fi.displayName="GridListItem";var hI=e=>{e.key==="Enter"||e.key==="Escape"||e.stopPropagation();},Qf=ro.forwardRef(({className:e,style:o,isEditing:t=!1,"data-block-id":r,"data-block-class":a,gridListHandle:n,...i},s)=>{let p=te(),l=useListState({...i,children:p}),c=ae(s),{gridProps:u}=useGridList(i,l,c);useImperativeHandle(n,()=>({setFocused:d=>{l.selectionManager.setFocused(d);},setFocusedKey:d=>{l.selectionManager.setFocusedKey(d);}}),[l]);let m=t?hI:u.onKeyDownCapture;return jsx("ul",{...u,className:classNames("BaselineUI-GridList",e),"data-block-id":r,"data-block-class":a,style:o,ref:c,onKeyDownCapture:m,children:[...l.collection].map(d=>jsx(Fi,{item:d,state:l,renderGridItem:i.renderGridItem},d.key))})});Qf.displayName="GridList";var Jf="_1yep5z6f5",ey="_1dc3b8m0";var oy=ro.forwardRef(({className:e,selectionMode:o,style:t,"data-block-id":r,"data-block-class":a,tooltipProps:n,icon:i,renderActionItem:s,...p},l)=>{let c=ae(l),u=te(),m=useListState({...p,selectionMode:o,suppressTextValueWarning:!0,children:u}),{actionGroupProps:d}=useActionGroup({...p,selectionMode:o,children:u},m,c),f=[...m.collection].map(y=>(invariant(y.value),jsx(SI,{item:y,state:m,isDisabled:p.isDisabled,onAction:p.onAction,tooltipProps:n,renderActionItem:s},y.key)));return i?jsxs(L,{...d,display:"flex",flexDirection:"row",gap:"md",alignItems:"center",className:classNames("BaselineUI-ActionGroup",e),"data-block-id":r,"data-block-class":a,style:t,ref:c,children:[jsx(i,{size:24,className:Jf}),jsx(L,{display:"flex",flexDirection:"row",gap:"xs",flex:1,children:f})]}):jsx(L,{...d,display:"flex",flexDirection:"row",gap:"xs",className:classNames("BaselineUI-ActionGroup",e),"data-block-id":r,"data-block-class":a,style:t,ref:c,children:f})});oy.displayName="ActionGroup";var SI=({item:e,state:o,tooltipProps:t,renderActionItem:r,onAction:a,isDisabled:n})=>{let{buttonProps:i}=useActionGroupItem({key:e.key},o),s=n||o.selectionManager.isDisabled(e.key),p=o.selectionManager.isSelected(e.key);invariant(e.value);let{icon:l}=e.value;invariant(l);let c=useMemo(()=>(invariant(e.value),typeof t=="function"?t(e.value):t),[t,e.value]);return jsx(PressResponder,{...mergeProps(i,{onPress:()=>{a?.(e.key);}}),children:jsx(ne,{text:e.textValue,size:"sm",variant:"inverse",includeArrow:!1,offset:4,...c,children:r?.(e,{isSelected:p,isDisabled:s})||jsx(B,{variant:"tertiary",icon:l,"aria-label":e.textValue,size:"sm",isDisabled:s,className:classNames({[ey]:p},"BaselineUI-ActionGroup-Item")})})})};var ty="ujkypy0 _1yep5z66 _1yep5z67 _1yep5z68 _1yep5z62i _1yep5z62j _1yep5z62k _1yep5z63o _1yep5z63p _1yep5z63q _1yep5z61c _1yep5z61d _1yep5z61e",ry="_1yep5z61qa _1yep5z61qb _1yep5z61qc _1yep5z61gz _1yep5z61h0 _1yep5z61h1";var ny=ro.forwardRef(({className:e,style:o,items:t,optionsContainerClassName:r,label:a,icon:n,value:i,defaultValue:s,onChange:p,isDisabled:l,optionClassName:c,optionStyle:u,labelPosition:m="top","data-block-id":d,"data-block-class":f,...y},b)=>{let v=useMemo(()=>t.map(g=>({id:g.color,label:g.label})),[t]),_=useId();return useEffect(()=>{!a&&!y["aria-label"]&&!y["aria-labelledby"]&&console.warn("ColorSwatchPicker: Please provide a label or aria-label for accessibility.");},[a,y]),jsxs(L,{...Na(y),className:classNames("BaselineUI-ColorSwatchPicker",e),"data-block-id":d,"data-block-class":f,display:"flex",flexDirection:m==="top"?"column":"row",alignItems:m==="top"?"flex-start":"center",justifyContent:"space-between",gap:"md",style:o,ref:b,children:[n||a?jsxs(L,{display:"flex",alignItems:"center",gap:"md",children:[n?jsx(n,{size:24,className:sprinkles({color:"icon.primary"})}):null,a?jsx(Q,{id:_,type:"label",size:"sm",children:a}):null]}):null,jsx(le,{className:classNames(ry,r),selectionMode:"single",items:v,orientation:"horizontal",defaultSelectedKeys:s?[s]:void 0,disabledKeys:l?v.map(g=>g.id):void 0,isDisabled:l,selectedKeys:i?[i]:void 0,onSelectionChange:g=>{p?.([...g][0]);},optionClassName:c,optionStyle:u,renderOption:({key:g,textValue:h},{isSelected:R,isFocusVisible:x,isDisabled:I,optionProps:k},S)=>jsx("li",{...k,"data-disabled":I,className:classNames(ty,k.className),ref:S,children:jsx(Ze,{isFocusVisible:x,color:g,isSelected:R,"aria-label":h,isInteractive:!0,isDisabled:I})}),...y,"aria-labelledby":a?_:y["aria-labelledby"]})]})});ny.displayName="ColorSwatchPicker";var iy="_10dw1p96",sy="_10dw1p95",ly=z({defaultClassName:"_10dw1p90 _1yep5z63o _1yep5z63p _1yep5z63q _1yep5z61c _1yep5z61d _1yep5z61e _1yep5z6ih _1yep5z6ii _1yep5z6ij _1yep5z6iq _1yep5z6ir _1yep5z6is _1yep5z69f _1yep5z69g _1yep5z69h _1yep5z6j8 _1yep5z6j9 _1yep5z6ja _1yep5z6lf _1yep5z6l2 _1yep5z6kz",variantClassNames:{isSelected:{true:"_1yep5z611v"},isHovered:{true:"_10dw1p92"},isRenaming:{true:"_10dw1p93"},isFocusVisible:{true:"_1yep5z613h _1yep5z617a _1yep5z6178"}},defaultVariants:{},compoundVariants:[[{isHovered:!0,isSelected:!1,isRenaming:!1},"_1yep5z61nm _1yep5z61pf _1yep5z61t1 _1yep5z61t0"]]});var dy=({context:e,depth:o,children:t,item:r,onPrimaryAction:a,onSecondaryAction:n,actionsPosition:i,primaryActionIcon:s,secondaryActionIcon:p,primaryActionAriaLabel:l,secondaryActionAriaLabel:c,onRename:u,onAction:m,renderItemTitle:d=f=>f.data.label})=>{let{formatMessage:f}=F(),{hoverProps:y,isHovered:b}=useHover({}),v=useRef(null),{onKeyDown:_,...g}=e.interactiveElementProps;delete g.onFocus,delete g.onClick;let h=createFocusManager(v),R=useCallback(P=>{if(P.key==="ArrowRight"&&(e.isExpanded||!r.children?.length))v.current?.setAttribute("tabindex","-1"),P.preventDefault(),P.stopPropagation(),h.focusNext();else switch(P.key){case"ArrowLeft":{h.focusPrevious()?(P.preventDefault(),P.stopPropagation()):(_?.(P),e.focusItem(!0));break}case"Enter":{e.toggleExpandedState();break}default:_?.(P);}},[e,h,_,r,v]),x=useMemo(()=>{let P=s,C=p,E=typeof l=="function"?l(r.index):l,H=typeof c=="function"?c(r.index):c;return P||C?jsxs(L,{display:"flex",flexDirection:"row",children:[P?jsx(be,{icon:P,"aria-label":E,size:"sm",excludeFromTabOrder:!0,variant:"secondary",onPress:()=>{a?.(r.index);},tooltip:!0}):null,C?jsx(be,{icon:C,"aria-label":H,size:"sm",excludeFromTabOrder:!0,variant:"secondary",onPress:()=>{n?.(r.index);},tooltip:!0}):null]}):null},[s,r.index,p,l,c,a,n]),I=useCallback(P=>{P.key==="Enter"?(u?.({key:r.index,value:P.target.value}),e.stopRenamingItem()):P.key==="Escape"?(e.stopRenamingItem(),v.current?.setAttribute("tabindex","0"),v.current?.focus()):P.key!=="ArrowRight"&&P.key!=="ArrowLeft"&&P.key!=="ArrowUp"&&P.key!=="ArrowDown"&&!P.metaKey&&P.continuePropagation();},[r.index,e,u,v]),k=r.data.icon,S=!!u,{pressProps:N}=usePress({onPress:()=>{m?.(r.index);}}),{isFocusVisible:w,focusProps:T}=useFocusRing$1();return jsxs(Fragment,{children:[jsx("div",{...mergeProps({onKeyDown:R,onFocus:()=>{e.focusItem(!1);}},N,T,y,e.itemContainerWithoutChildrenProps,g),className:classNames(sy,ly({isHovered:b,isSelected:e.isSelected,isFocusVisible:w,isRenaming:e.isRenaming}),"BaselineUI-TreeView-Row"),role:"row","data-key":r.index,"data-expanded":r.isFolder?e.isExpanded:void 0,"aria-expanded":r.isFolder?e.isExpanded:void 0,"aria-selected":e.isSelected,"data-depth":o,"aria-level":o+1,"aria-posinset":r.data.posInset,"aria-setsize":r.data.setSize,"aria-label":r.data.label,style:{justifyContent:i==="end"?"space-between":void 0},ref:v,children:jsxs(L,{role:"gridcell",style:{display:"contents"},"aria-colindex":1,children:[i==="start"?x:null,jsxs(L,{display:"flex",flexDirection:"row",alignItems:"center",children:[jsxs(L,{display:"flex",padding:"sm",flexDirection:"row",alignItems:"center",gap:"md",style:{marginInlineStart:`calc(${o*2} * ${themeVars.spacing.lg})`},children:[jsx(B,{icon:ChevronRightIcon,size:"xxs",variant:"secondary",onPress:()=>{e.toggleExpandedState();},"aria-label":f(e.isExpanded?ji.collapse:ji.expand),style:{visibility:r.children?.length?"visible":"hidden"},className:classNames(iy,"BaselineUI-TreeView-ExpansionToggle"),UNSAFE_NON_INTERACTIVE:!0}),k?jsx(k,{size:16,style:{color:themeVars.color.icon.interactive.disabled}}):null]}),jsxs(L,{paddingLeft:"sm",paddingY:e.isRenaming?"none":"md",display:"flex",flexDirection:"column",gap:"xs",onDoubleClick:P=>{S&&(P.stopPropagation(),P.preventDefault(),e.startRenamingItem());},children:[e.isRenaming?jsx("div",{onClick:P=>{P.stopPropagation();},children:jsx(Ke,{defaultValue:r.data.label,autoFocus:!0,onBlur:P=>{u?.({key:r.index,value:P.target.value}),e.stopRenamingItem();},"aria-label":f(ji.rename),onKeyDown:I,className:"BaselineUI-TreeView-RenameInput"})}):jsx(Q,{type:"label",size:"sm",className:classNames(sprinkles.compoundVariants({color:"text.primary"}),"BaselineUI-TreeView-Title"),children:d(r)}),r.data.description?jsx(Q,{type:"helper",size:"sm",className:"BaselineUI-TreeView-Description",children:r.data.description}):null]})]}),i==="end"?x:null]})}),t]})},ji=$({expand:{id:"expand",defaultMessage:"Expand"},collapse:{id:"collapse",defaultMessage:"Collapse"},rename:{id:"rename",defaultMessage:"Rename"}});function JI(e,{posInset:o,setSize:t}){return {index:e.id,children:e.children?e.children.map(r=>r.id):[],data:{label:e.label,description:e.description,icon:e.icon,...e.data,posInset:o,setSize:t},isFolder:!!e.children?.length}}function ew(e,o){let t={};function r(a,n,i){if(t[a.id]=o(a,{posInset:n,setSize:i}),a.children)for(let s=0;s<a.children.length;s++)r(a.children[s],s+1,a.children.length);}return r(e,0,0),t}var yy=ro.forwardRef(({className:e,style:o,"data-block-id":t,"data-block-class":r,items:a,rootId:n=a.id,onPrimaryAction:i,onSecondaryAction:s,primaryActionIcon:p,secondaryActionIcon:l,primaryActionAriaLabel:c,secondaryActionAriaLabel:u,actionsPosition:m="start",onRename:d,onAction:f,renderItemTitle:y,...b},v)=>{let _=te(),g=useRef(null),h=useTreeState({...b,items:a.children,children:_}),R=useMemo(()=>Object.fromEntries(Object.entries(ew(a,JI)).map(([w,T])=>[w,{...T,canRename:!!d}])),[a,d]),x=useId(),[I,k]=ro.useState(a.children?.[0]?.id??""),S=useRef(I),N=useMemo(()=>({[`tree-${x}`]:{focusedItem:I,expandedItems:[...h.expandedKeys],selectedItems:[...h.selectionManager.selectedKeys]}}),[I,h.expandedKeys,h.selectionManager.selectedKeys,x]);return useEffect(()=>{if(!g.current)return;let w=Te(g.current),T=w instanceof ShadowRoot,P=g.current?.contains(w?.activeElement??null);T&&P&&Te(g.current)?.querySelector(`[data-rct-item-id="${I}"]`)?.focus();},[I]),jsx(ControlledTreeEnvironment,{items:R,getItemTitle:w=>w.data?.label,viewState:N,onExpandItem:w=>{h.setExpandedKeys(new Set([...h.expandedKeys,w.index])),b.onExpand?.(w.index.toString());},onFocusItem:w=>{k(w.index),w.index&&(S.current=w.index);},onCollapseItem:w=>{h.setExpandedKeys(new Set([...h.expandedKeys].filter(T=>T!==w.index))),b.onCollapse?.(w.index.toString());},onSelectItems:w=>{h.selectionManager.setSelectedKeys(new Set(w));},renderItem:w=>jsx(dy,{...w,onPrimaryAction:i,onSecondaryAction:s,actionsPosition:m,primaryActionIcon:p,secondaryActionIcon:l,primaryActionAriaLabel:c,secondaryActionAriaLabel:u,onRename:d,onAction:f,renderItemTitle:y}),renderLiveDescriptorContainer:({children:w})=>jsx(Ae,{children:jsx(VisuallyHidden,{children:w})}),renderTreeContainer:({containerProps:w,children:T})=>jsx("div",{...vo(w,{onBlur:P=>{P.currentTarget.contains(P.relatedTarget)||P.currentTarget.querySelector(`[data-key="${S.current}"]`)?.setAttribute("tabindex","0");}}),"data-block-id":t,"data-block-class":r,style:{...o,...w.style},className:classNames(e,"BaselineUI-TreeView"),ref:M(v,w.ref,g),role:"treegrid",children:T}),renderItemsContainer:({children:w})=>w,children:jsx(Tree,{treeId:`tree-${x}`,rootItem:n,treeLabel:b["aria-label"],treeLabelledBy:b["aria-labelledby"]})})});yy.displayName="TreeView";var sw=forwardRef(({className:e,isCollapsible:o=!1,...t},r)=>{let a=useRef(null),n=useId();return useImperativeHandle(r,()=>({resize:a.current?.resize})),jsx(Panel,{className:classNames("BaselineUI-Panel",e),collapsible:o,ref:a,id:n,...t})});sw.displayName="Panel";var fw=forwardRef(({className:e,...o},t)=>{let r=useRef(null);return useImperativeHandle(t,()=>({setLayout:r.current?.setLayout})),jsx(PanelGroup,{className:classNames("BaselineUI-PanelGroup",e),ref:r,...o})});fw.displayName="PanelGroup";var by="_6abhjk0";var vw=({className:e,isDisabled:o=!1,...t})=>jsx(PanelResizeHandle,{disabled:o,className:classNames(by,"BaselineUI-PanelResizeHandle",e),...t});vw.displayName="PanelResizeHandle";
|
|
52
|
+
var xe=typeof document<"u"?rt.useLayoutEffect:()=>{};function Sa(e){let t=useRef(null);return xe(()=>{t.current=e;},[e]),useCallback((...o)=>{let r=t.current;return r?.(...o)},[])}function Ta(e){let[t,o]=useState(e),r=useRef(null),a=Sa(()=>{if(!r.current)return;let i=r.current.next();if(i.done){r.current=null;return}t===i.value?a():o(i.value);});xe(()=>{r.current&&a();});let n=Sa(i=>{r.current=i(t),a();});return [t,n]}var or={prefix:String(Math.round(Math.random()*1e10)),current:0},Ki=rt.createContext(or),Ly=rt.createContext(!1);var My=!!(typeof window<"u"&&window.document&&window.document.createElement),Na=new WeakMap;function Ey(e=!1){let t=useContext(Ki),o=useRef(null);if(o.current===null&&!e){var r,a;let n=(a=rt.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED)===null||a===void 0||(r=a.ReactCurrentOwner)===null||r===void 0?void 0:r.current;if(n){let i=Na.get(n);i==null?Na.set(n,{id:t.current,state:n.memoizedState}):n.memoizedState!==i.state&&(t.current=i.id,Na.delete(n));}o.current=++t.current;}return o.current}function Dy(e){let t=useContext(Ki);t===or&&!My&&console.warn("When server rendering, you must wrap your application in an <SSRProvider> to ensure consistent ids are generated between the client and server.");let o=Ey(!!e),r=t===or&&process.env.NODE_ENV==="test"?"react-aria":`react-aria${t.prefix}`;return e||`${r}-${o}`}function By(e){let t=rt.useId(),[o]=useState(Gi()),r=o||process.env.NODE_ENV==="test"?"react-aria":`react-aria${or.prefix}`;return e||`${r}-${t}`}var Ma=typeof rt.useId=="function"?By:Dy;function Hy(){return !1}function Fy(){return !0}function Vy(e){return ()=>{}}function Gi(){return typeof rt.useSyncExternalStore=="function"?rt.useSyncExternalStore(Vy,Hy,Fy):useContext(Ly)}var Uy=!!(typeof window<"u"&&window.document&&window.document.createElement),rr=new Map;function ar(e){let[t,o]=useState(e),r=useRef(null),a=Ma(t),n=useCallback(i=>{r.current=i;},[]);return Uy&&rr.set(a,n),xe(()=>{let i=a;return ()=>{rr.delete(i);}},[a]),useEffect(()=>{let i=r.current;i&&(r.current=null,o(i));}),a}function Ea(e,t){if(e===t)return e;let o=rr.get(e);if(o)return o(t),t;let r=rr.get(t);return r?(r(e),e):t}function Wi(...e){return (...t)=>{for(let o of e)typeof o=="function"&&o(...t);}}var ue=e=>{var t;return (t=e?.ownerDocument)!==null&&t!==void 0?t:document},re=e=>e&&"window"in e&&e.window===e?e:ue(e).defaultView||window,Ve=e=>{if(!e)return document;if(!e.isConnected)return null;let t=e.getRootNode?e.getRootNode():document;return Yi(t)||Zi(t)?t:null};function Xi(e){return e!==null&&typeof e=="object"&&"nodeType"in e&&typeof e.nodeType=="number"}function Yi(e){return Xi(e)&&e.nodeType===Node.DOCUMENT_NODE}function Zi(e){return Xi(e)&&e.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&"host"in e}function Qi(e){var t,o,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var a=e.length;for(t=0;t<a;t++)e[t]&&(o=Qi(e[t]))&&(r&&(r+=" "),r+=o);}else for(o in e)e[o]&&(r&&(r+=" "),r+=o);return r}function qy(){for(var e,t,o=0,r="",a=arguments.length;o<a;o++)(e=arguments[o])&&(t=Qi(e))&&(r&&(r+=" "),r+=t);return r}var Ji=qy;function vt(...e){let t={...e[0]};for(let o=1;o<e.length;o++){let r=e[o];for(let a in r){let n=t[a],i=r[a];typeof n=="function"&&typeof i=="function"&&a[0]==="o"&&a[1]==="n"&&a.charCodeAt(2)>=65&&a.charCodeAt(2)<=90?t[a]=Wi(n,i):(a==="className"||a==="UNSAFE_className")&&typeof n=="string"&&typeof i=="string"?t[a]=Ji(n,i):a==="id"&&n&&i?t.id=Ea(n,i):t[a]=i!==void 0?i:n;}}return t}function M(...e){return e.length===1&&e[0]?e[0]:t=>{for(let o of e)typeof o=="function"?o(t):o!=null&&(o.current=t);}}var Ky=new Set(["id"]),Gy=new Set(["aria-label","aria-labelledby","aria-describedby","aria-details"]),Wy=new Set(["href","hrefLang","target","rel","download","ping","referrerPolicy"]),Xy=/^(data-.*)$/;function Da(e,t={}){let{labelable:o,isLink:r,propNames:a}=t,n={};for(let i in e)Object.prototype.hasOwnProperty.call(e,i)&&(Ky.has(i)||o&&Gy.has(i)||r&&Wy.has(i)||a?.has(i)||Xy.test(i))&&(n[i]=e[i]);return n}function nr(e){var t;return typeof window>"u"||window.navigator==null?!1:((t=window.navigator.userAgentData)===null||t===void 0?void 0:t.brands.some(o=>e.test(o.brand)))||e.test(window.navigator.userAgent)}function Ba(e){var t;return typeof window<"u"&&window.navigator!=null?e.test(((t=window.navigator.userAgentData)===null||t===void 0?void 0:t.platform)||window.navigator.platform):!1}function Te(e){let t=null;return ()=>(t==null&&(t=e()),t)}var Ha=Te(function(){return Ba(/^Mac/i)}),es=Te(function(){return Ba(/^iPhone/i)}),ts=Te(function(){return Ba(/^iPad/i)||Ha()&&navigator.maxTouchPoints>1}),ir=Te(function(){return es()||ts()}),Fa=Te(function(){return nr(/Android/i)}),uo=Te(function(){return nr(/Firefox/i)});function ae(e){let t=useRef(null);return useMemo(()=>({get current(){return t.current},set current(o){t.current=o,typeof e=="function"?e(o):e&&(e.current=o);}}),[e])}function t1(){return typeof window.ResizeObserver<"u"}function Va(e){let{ref:t,box:o,onResize:r}=e;useEffect(()=>{let a=t?.current;if(a)if(t1()){let n=new window.ResizeObserver(i=>{i.length&&r();});return n.observe(a,{box:o}),()=>{a&&n.unobserve(a);}}else return window.addEventListener("resize",r,!1),()=>{window.removeEventListener("resize",r,!1);}},[r,t,o]);}function _t(e){return !!e&&"label"in e&&!!e.label}function sr(e){return !!e&&"children"in e&&!!e.children&&"title"in e}function a1(e){return sr(e)?jsx(Section,{items:e.children,title:e.title,"aria-label":e.title,children:t=>jsx(Item,{textValue:t.label,children:t.label},t.id)},e.id):jsx(Item,{textValue:e.label,children:e.label},e.id)}function oe(){return useCallback(e=>a1(e),[])}function as(e,t,o){let{direction:r}=useLocale(),a=useDraggableCollectionState({...e,collection:t.collection,selectionManager:t.selectionManager,isDisabled:!e.enableReorder,getItems:e.getItems||(s=>[...s].map(p=>{let l=t.collection.getItem(p);return invariant(l,"Expected item to be defined."),{"text/plain":l.textValue}}))});useDraggableCollection(e,a,o);let n=useDroppableCollectionState({...e,collection:t.collection,selectionManager:t.selectionManager}),{collectionProps:i}=useDroppableCollection({...e,keyboardDelegate:new ListKeyboardDelegate({collection:t.collection,disabledKeys:t.disabledKeys,ref:o,orientation:e.orientation,layout:e.layout,direction:r}),dropTargetDelegate:new ListDropTargetDelegate(t.collection,o)},n,o);return {collectionProps:i,dragState:a,dropState:n}}function m1(e,t){if(typeof e!="object"||!e)return e;var o=e[Symbol.toPrimitive];if(o!==void 0){var r=o.call(e,t||"default");if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return (t==="string"?String:Number)(e)}function f1(e){var t=m1(e,"string");return typeof t=="symbol"?t:String(t)}function y1(e,t,o){return t=f1(t),t in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e}function ns(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),o.push.apply(o,r);}return o}function is(e){for(var t=1;t<arguments.length;t++){var o=arguments[t]!=null?arguments[t]:{};t%2?ns(Object(o),!0).forEach(function(r){y1(e,r,o[r]);}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):ns(Object(o)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(o,r));});}return e}function ss(e,t){var o={};for(var r in e)o[r]=t(e[r],r);return o}var b1=(e,t,o)=>{for(var r of Object.keys(e)){var a;if(e[r]!==((a=t[r])!==null&&a!==void 0?a:o[r]))return !1}return !0},z=e=>{var t=o=>{var r=e.defaultClassName,a=is(is({},e.defaultVariants),o);for(var n in a){var i,s=(i=a[n])!==null&&i!==void 0?i:e.defaultVariants[n];if(s!=null){var p=s;typeof p=="boolean"&&(p=p===!0?"true":"false");var l=e.variantClassNames[n][p];l&&(r+=" "+l);}}for(var[c,u]of e.compoundVariants)b1(c,a,e.defaultVariants)&&(r+=" "+u);return r};return t.variants=()=>Object.keys(e.variantClassNames),t.classNames={get base(){return e.defaultClassName.split(" ")[0]},get variants(){return ss(e.variantClassNames,o=>ss(o,r=>r.split(" ")[0]))}},t};var ls=z({defaultClassName:"_6n12k9b _1yep5z6lh _1yep5z6lg _1yep5z6i1 _1yep5z6kz",variantClassNames:{isDropTarget:{true:"_1yep5z613h"},orientation:{vertical:"_1yep5z6174",horizontal:"_1yep5z6175"}},defaultVariants:{},compoundVariants:[]}),ps="_6n12k98 _1yep5z6lf _1yep5z6ih _1yep5z6ii _1yep5z6ij",cs=z({defaultClassName:"_6n12k99 _1yep5z6ev _1yep5z6da _1yep5z6dv",variantClassNames:{isDisabled:{true:"_1yep5z6ey"}},defaultVariants:{},compoundVariants:[]}),ds=z({defaultClassName:"_6n12k91 _1yep5z63r _1yep5z63s _1yep5z63t _1yep5z61f _1yep5z61g _1yep5z61h _1yep5z6ih _1yep5z6ii _1yep5z6ij _1yep5z6iq _1yep5z6ir _1yep5z6is _1yep5z6j8 _1yep5z6j9 _1yep5z6ja _1yep5z6k8 _1yep5z6k9 _1yep5z6ka _1yep5z69l _1yep5z69m _1yep5z69n _1yep5z6dy _1yep5z6eu _1yep5z6kz _1yep5z6l2 _1yep5z6lf _1yep5z6le _1yep5z6lc _1yep5z6l9",variantClassNames:{isSelected:{},isFocused:{true:"_1yep5z613h _1yep5z617a _1yep5z6178 _1yep5z617b _1yep5z613u _1yep5z613v _1yep5z613w"},isHovered:{true:"_1yep5z611u",false:"_1yep5z611t"},isFirstChild:{true:"_6n12k95"},isLastChild:{true:"_6n12k96"},isDisabled:{true:"z9nup83 _1yep5z610q"}},defaultVariants:{},compoundVariants:[]}),us="_6n12k9f _1yep5z63 _1yep5z64 _1yep5z65 _1yep5z62f _1yep5z62g _1yep5z62h _1yep5z69l _1yep5z69m _1yep5z69n _1yep5z6ih _1yep5z6ii _1yep5z6ij _1yep5z6j8 _1yep5z6j9 _1yep5z6ja",ms="_6n12k90";var fs=z({defaultClassName:"gukncs0",variantClassNames:{isVertical:{true:"gukncs1"},isSecondary:{true:"gukncs2"}},defaultVariants:{},compoundVariants:[]});var O=rt.forwardRef(({className:e,style:t,variant:o="primary",orientation:r="horizontal",UNSAFE_omitRole:a,elementType:n="div","data-block-id":i,"data-block-class":s,...p},l)=>{let{separatorProps:c}=useSeparator({...p,orientation:r,elementType:n});return jsx(n,{...c,className:classNames(fs({isVertical:r==="vertical",isSecondary:o==="secondary"}),"BaselineUI-Separator",e),"data-orientation":r,"data-block-id":i,"data-block-class":s,style:t,role:a?void 0:c.role,ref:l})});O.displayName="Separator";function P1(e){return sprinkles.properties.has(e)}var L=rt.forwardRef(({elementType:e="div",children:t,...o},r)=>{let a=e,{sprinkleProps:n,domProps:i}=useMemo(()=>{let s={},p={};for(let l in o)P1(l)?s[l]=o[l]:p[l]=o[l];return {sprinkleProps:s,domProps:p}},[o]);return jsx(a,{...i,className:classNames(sprinkles(n),"BaselineUI-Box",i.className),ref:r,children:t})});L.displayName="Box";var fo=rt.forwardRef(({item:e,isDisabled:t,isFocusVisible:o,isSelected:r,liProps:a,showSelectedIcon:n,description:i,descriptionProps:s,labelProps:p,isFocused:l,isPressed:c,_state:u},m)=>{invariant(e.value&&_t(e.value),"Item cannot be a section");let{icon:d,label:f}=e.value,{hoverProps:y,isHovered:b}=useHover({isDisabled:t}),v=filterTruthyValues({"data-selected":r,"data-disabled":t,"data-focused":l,"data-hovered":b,"data-pressed":c,"data-focus-visible":o,"data-selection-mode":u.selectionManager.selectionMode});return jsxs("li",{...mergeProps(a,y,v),className:classNames(ds({isHovered:b,isFocused:o,isFirstChild:u.collection.getFirstKey()===e.key,isLastChild:u.collection.getLastKey()===e.key,isDisabled:t}),a.className,"BaselineUI-ListBox-Option"),style:a.style,ref:m,children:[jsxs(L,{display:"flex",alignItems:"center",gap:"lg",children:[n?jsx("span",{"aria-hidden":!0,style:{height:24,width:24},children:r?jsx(CheckmarkIcon,{size:24}):null}):null,d?jsx(d,{size:24}):null,jsx("span",{...p,children:f})]}),i?jsx("span",{className:cs({isDisabled:t}),...s,children:i}):null]})});fo.displayName="DefaultRenderOption";var Aa=({dropState:e,orientation:t="vertical",dropIndicatorStyle:o,dropIndicatorClassName:r,renderDropIndicator:a=({isDropTarget:i,isHidden:s,dropIndicatorProps:p,orientation:l},c)=>s?null:jsx("li",{...p,ref:c,"data-drop-target":i,className:classNames(ls({isDropTarget:i,orientation:l}),"BaselineUI-DropIndicator",r),style:o}),...n})=>{let i=rt.useRef(null),{dropIndicatorProps:s,isHidden:p,isDropTarget:l}=useDropIndicator(n,e,i);return a({dropIndicatorProps:{...s,role:"option"},isHidden:p,isDropTarget:l,orientation:t},i)};var vs=({item:e,children:t,state:o,dragState:r,...a})=>{let{dragProps:n}=useDraggableItem({key:e.key},r);return jsxs(Fragment,{children:[jsx(Aa,{target:{type:"item",key:e.key,dropPosition:"before"},...a}),t(n),o.collection.getKeyAfter(e.key)==null&&jsx(Aa,{target:{type:"item",key:e.key,dropPosition:"after"},...a})]})};vs.displayName="DraggableListOption";var yo=rt.forwardRef(({item:e,renderOption:t=(m,d,f)=>jsx(fo,{item:m,liProps:d.optionProps,...d,ref:f}),showSelectedIcon:o,state:r,dragState:a,dropState:n,orientation:i,dropIndicatorStyle:s,dropIndicatorClassName:p,optionStyle:l,optionClassName:c},u)=>{let m=rt.useRef(null),d=useOption({key:e.key},r,m),{value:f}=e;invariant(f&&_t(f),"ListSection should not be passed to ListOption");let y={style:typeof l=="function"?l(f):l,className:typeof c=="function"?c(f):c};return a&&n?jsx(vs,{orientation:i,state:r,item:e,dropState:n,dragState:a,dropIndicatorStyle:s,dropIndicatorClassName:p,children:b=>t(e,{...d,showSelectedIcon:o,_state:r,optionProps:{...mergeProps(d.optionProps,b),...y}},M(m,u))}):t(e,{...d,showSelectedIcon:o,_state:r,optionProps:{...d.optionProps,...y}},M(m,u))});yo.displayName="Option";var xs=({section:e,state:t,sectionClassName:o,sectionStyle:r,showSectionHeader:a,renderSectionHeader:n,withSectionHeaderPadding:i=!1,...s})=>{let p=rt.useRef(null),{itemProps:l,groupProps:c,headingProps:u}=useListBoxSection({heading:a?n?.(e,p)||e.rendered:void 0,"aria-label":e["aria-label"]}),m=t.collection.getChildren?.(e.key);invariant(m,"children must be defined");let{value:d}=e;invariant(d&&sr(d),"section must be a ListSection");let f=typeof r=="function"?r(d):r,y=typeof o=="function"?o(d):o;return jsxs(Fragment,{children:[e.key===t.collection.getFirstKey()?null:jsx(O,{UNSAFE_omitRole:!0}),jsxs("li",{...l,style:{...l.style,...f},className:classNames(ms,y,"BaselineUI-ListBox-Section"),children:[e.rendered&&a?n?.(e,p)||jsx(L,{...u,className:classNames("BaselineUI-ListBox-SectionHeader",us),ref:p,paddingX:"lg",typography:"label.md.medium",color:"text.primary",paddingInlineStart:i?"5xl":"lg",paddingInlineEnd:"lg",children:e.rendered}):null,jsx("ul",{...c,children:[...m].map(b=>jsx(yo,{item:b,state:t,...s},b.key))})]})]})};function cr({type:e="listbox",handle:t},o,r){let a=useCallback(i=>e==="listbox"?r.current?.querySelector(`[data-key="${i}"][role="option"]`):r.current?.querySelector(`[data-key="${i}"][role="row"]`),[e,r]),n=useCallback((i,s)=>{let p=a(i);p&&p?.scrollIntoView({block:"nearest",inline:"nearest",...s});},[a]);useImperativeHandle(t,()=>({scrollIntoView:n,setFocusedKey:i=>{o.selectionManager.setFocused(!0),o.selectionManager.setFocusedKey(i),n(i),a(i)?.focus();}}),[n,o.selectionManager,a]),useGranularEffect(()=>{let i=Ve(r.current)instanceof ShadowRoot,s=o.selectionManager.focusedKey;i&&s&&n(s);},[o.selectionManager.focusedKey],[n,r]);}var at=rt.createContext(null),$a=rt.forwardRef(({className:e,layout:t="stack",orientation:o="vertical",showSelectedIcon:r=!0,style:a,renderOption:n,enableReorder:i=!1,"data-block-id":s,"data-block-class":p,renderDragPreview:l,onReorder:c,state:u,listBoxHandle:m,...d},f)=>{let y=rt.useRef(null),{direction:b}=useLocale(),v=rt.useRef(null),{listBoxProps:_}=useListBox({...d,shouldSelectOnPressUp:i,keyboardDelegate:new ListKeyboardDelegate({collection:u.collection,ref:v,layout:t,orientation:o,direction:b,disabledKeys:u.disabledKeys})},u,v);cr({handle:m},u,v);let g=useReducedMotion(),h=useCallback(S=>{let P=ue(v.current);c&&(!g&&"startViewTransition"in P?P.startViewTransition(()=>{c(S);}):c(S));},[c,g]),{collectionProps:R,dragState:w,dropState:x}=as({...d,onReorder:h,layout:t,orientation:o,enableReorder:i,preview:y},u,v),{isFocusVisible:C,isFocused:T,focusProps:N}=useFocusRing(),k=filterTruthyValues({"data-block-id":s,"data-block-class":p,"data-layout":t,"data-empty":u.collection.size===0,"data-focused":T,"data-focus-visible":C,"data-orientation":o});return jsxs("ul",{...mergeProps(_,N,k,R),className:classNames(ps,"BaselineUI-ListBox",e),style:a,ref:M(f,v),children:[[...u.collection].map(S=>{let P={key:S.key,state:u,dragState:w,dropState:x,renderOption:n,renderDropIndicator:d.renderDropIndicator,renderSectionHeader:d.renderSectionHeader,showSelectedIcon:r,orientation:o,dropIndicatorStyle:d.dropIndicatorStyle,dropIndicatorClassName:d.dropIndicatorClassName,optionStyle:d.optionStyle,optionClassName:d.optionClassName,sectionClassName:d.sectionClassName,sectionStyle:d.sectionStyle,showSectionHeader:d.showSectionHeader,withSectionHeaderPadding:d.withSectionHeaderPadding};return S.type==="section"?jsx(xs,{...P,section:S}):jsx(yo,{...P,item:S})}),l?jsx(DragPreview,{ref:y,children:l}):null]})});$a.displayName="ListBoxCore";var Ps=rt.forwardRef((e,t)=>{let o=oe(),r=useListState({...e,children:o});return jsx($a,{...e,ref:t,state:r})});Ps.displayName="ListBoxStandalone";var le=rt.forwardRef((e,t)=>{let o=useContext(at);return useEffect(()=>{if(!e.items&&!o)throw new Error("ListBox: You must provide a `state` or `items` prop to render the listbox.")},[e.items,o]),o?jsx($a,{...e,ref:t,state:o}):jsx(Ps,{...e,ref:t})});le.displayName="ListBox";var dr="uf19bsf _1yep5z6kz",ks=z({defaultClassName:"uf19bs0 _1yep5z6ai _1yep5z6aj _1yep5z6ak _1yep5z6b6 _1yep5z6b7 _1yep5z6b8 _1yep5z6bu _1yep5z6bv _1yep5z6bw _1yep5z6ci _1yep5z6cj _1yep5z6ck _1yep5z6f5 _1yep5z6le _1yep5z6ik _1yep5z6il _1yep5z6im _1yep5z6j8 _1yep5z6j9 _1yep5z6ja _1yep5z6k2 _1yep5z6k3 _1yep5z6k4 _1yep5z6l9",variantClassNames:{size:{xxs:"uf19bs1",xs:"uf19bs2",sm:"uf19bs3",md:"uf19bs4",lg:"uf19bs5 _1yep5z6wd _1yep5z6we _1yep5z6wf _1yep5z6x1 _1yep5z6x2 _1yep5z6x3 _1yep5z6xp _1yep5z6xq _1yep5z6xr _1yep5z6yd _1yep5z6ye _1yep5z6yf"},isHovered:{true:"uf19bs6"},isDisabled:{true:"uf19bs7 _1yep5z610z"},isFocusVisible:{true:"uf19bs8"},variant:{primary:"uf19bs9",secondary:"uf19bsa",tertiary:"uf19bsb",ghost:"uf19bsc",toolbar:"uf19bsd _1yep5z6wv _1yep5z6ww _1yep5z6wx _1yep5z6xj _1yep5z6xk _1yep5z6xl _1yep5z6y7 _1yep5z6y8 _1yep5z6y9 _1yep5z6yv _1yep5z6yw _1yep5z6yx",popover:"uf19bse _1yep5z6pg _1yep5z6ph _1yep5z6pi _1yep5z6n4 _1yep5z6n5 _1yep5z6n6 _1yep5z6lv _1yep5z6lw _1yep5z6lx _1yep5z6o7 _1yep5z6o8 _1yep5z6o9 _1yep5z6vg _1yep5z6vh _1yep5z6vi"}},defaultVariants:{},compoundVariants:[[{variant:"toolbar",isHovered:!0,isFocusVisible:!1},"_1yep5z61nn"],[{variant:"primary",isHovered:!0,isFocusVisible:!1},"_1yep5z61nn"],[{variant:"secondary",isHovered:!0,isFocusVisible:!1},"_1yep5z61mq"],[{variant:"tertiary",isHovered:!0,isFocusVisible:!1},"_1yep5z61mp _1yep5z61nn"],[{variant:"ghost",isHovered:!0,isFocusVisible:!1},"_1yep5z61mv"],[{variant:"popover",isHovered:!0,isFocusVisible:!1},"_1yep5z61pc _1yep5z61t0 _1yep5z61t4 _1yep5z61t1"],[{variant:"ghost",isDisabled:!1},"_1yep5z61mu"],[{variant:"popover",size:"lg"},"_1yep5z61i2 _1yep5z61i3 _1yep5z61i4 _1yep5z61iq _1yep5z61ir _1yep5z61is _1yep5z61je _1yep5z61jf _1yep5z61jg _1yep5z61k2 _1yep5z61k3 _1yep5z61k4"]]});var bo=rt.createContext({state:null,overlayTriggerAria:{triggerProps:{},overlayProps:{}},triggerRef:void 0}),Ne=({children:e,...t})=>{let o=rt.useRef(null),r=useOverlayTriggerState(t),a=useOverlayTrigger(t,r),n=useMemo(()=>({state:r,overlayTriggerAria:a,triggerRef:o}),[r,a]);return jsx(bo.Provider,{value:n,children:e})};var ws={bottom:"_1gzftth2",top:"_1gzftth3",right:"_1gzftth4",left:"_1gzftth5"},Rs="_1gzftth1 _1yep5z6ih _1yep5z6ii _1yep5z6ij",Ss="_1gzftth6",Ts="_1gzftth8",Ns="_1gzftth7",Ls="var(--_1gzftth0)";function TT(e){return e.closest(".BaselineUI-Portal")||e.closest(".BaselineUI-Popover-Content")}function Ms(e){return typeof e=="object"&&typeof e.left=="number"&&typeof e.top=="number"&&(typeof e.width=="number"||e.width===void 0)&&(typeof e.height=="number"||e.height===void 0)}var ur=rt.createContext({isSelected:!1,ref:void 0}),Le=({children:e,anchorRect:t})=>{let{state:o,overlayTriggerAria:r,triggerRef:a}=useContext(bo);invariant(o,"PopoverTrigger must be used within a Popover");let{triggerProps:n}=r,i=useMemo(()=>({...n,isSelected:o.isOpen,ref:a}),[n,o.isOpen,a]);return invariant(!t&&e||t&&!e,"Either one of anchorRect or children has to be provided."),invariant(!t||Ms(t),"If provided, the anchorRect prop must be an object with left and top number values, and optionally width and height."),jsx(ur.Provider,{value:i,children:t?jsx("button",{className:classNames(Ts,"BaselineUI-PopoverTrigger-Hidden"),style:t,ref:a,tabIndex:-1},JSON.stringify(t)):e})};function mr({tooltip:e,...t},o){let[r,a]=useState(t["aria-label"]||""),n=t["aria-labelledby"];return useEffect(()=>{if(n){let p=ue(o.current).querySelector(`#${n}`);p&&a(p.textContent||"");}},[n,o]),{tooltipProps:useMemo(()=>{let s={size:"sm",variant:"inverse",text:r,includeArrow:!1,placement:"bottom start",offset:4};if(typeof e=="object")return {...s,...e};if(e)return s},[r,e])}}var fr=e=>{let t=rt.useRef(null),{ref:o,...r}=useContext(ur)||{},{buttonProps:a,isPressed:n}=useButton({...e,...r},t),{isFocusVisible:i,isFocused:s,focusProps:p}=useFocusRing(),{hoverProps:l,isHovered:c}=useHover({isDisabled:e.isDisabled});return {buttonProps:vt(a,p,l),isPressed:n,ref:M(t,o||null),isFocusVisible:i,isFocused:s,isHovered:c,uiStateOptions:{isHovered:c,isFocused:s,isPressed:n,isDisabled:e.isDisabled,isFocusVisible:i}}},yr=(e,t)=>{let o=rt.useRef(null),{ref:r,...a}=useContext(ur)||{},{buttonProps:n,isPressed:i}=useToggleButton({...e,...a},t,o);(n.role==="radio"||n.role==="checkbox")&&(n["aria-pressed"]=void 0);let{isFocusVisible:s,isFocused:p,focusProps:l}=useFocusRing(),{hoverProps:c,isHovered:u}=useHover({isDisabled:e.isDisabled});return {buttonProps:vt(n,l,c),isPressed:i,ref:M(o,r||null),isFocusVisible:s,isFocused:p,isHovered:u,uiStateOptions:{isHovered:u,isFocused:p,isPressed:i,isDisabled:e.isDisabled,isFocusVisible:s,isSelected:t.isSelected}}};var br=z({defaultClassName:"oom8bs0 _1yep5z6ai _1yep5z6aj _1yep5z6ak _1yep5z6b6 _1yep5z6b7 _1yep5z6b8 _1yep5z6bu _1yep5z6bv _1yep5z6bw _1yep5z6ci _1yep5z6cj _1yep5z6ck _1yep5z6ik _1yep5z6il _1yep5z6im _1yep5z69i _1yep5z69j _1yep5z69k _1yep5z6j8 _1yep5z6j9 _1yep5z6ja _1yep5z6le _1yep5z6lf _1yep5z6l9 _1yep5z6dy _1yep5z6kz",variantClassNames:{variant:{primary:"oom8bs1",secondary:"oom8bs2",tertiary:"oom8bs3",ghost:"oom8bs4",popover:"oom8bs5",toolbar:"oom8bs6",success:"oom8bs7",warning:"oom8bs8",error:"oom8bs9"},isDisabled:{true:"oom8bsa"},isFocusVisible:{true:"oom8bsb"},isHovered:{true:"oom8bsc"},size:{sm:"oom8bsd",md:"oom8bse",lg:"oom8bsf"}},defaultVariants:{},compoundVariants:[[{variant:"primary",isHovered:!0},"oom8bsg"],[{variant:"secondary",isHovered:!0},"oom8bsh"],[{variant:"tertiary",isHovered:!0},"oom8bsi"],[{variant:"popover",isHovered:!0},"oom8bsj"],[{variant:"ghost",isHovered:!0},"oom8bsk"],[{variant:"success",isHovered:!0},"oom8bsl"],[{variant:"warning",isHovered:!0},"oom8bsm"],[{variant:"error",isHovered:!0},"oom8bsn"],[{variant:"primary",isFocusVisible:!0},"oom8bso"],[{variant:"tertiary",isFocusVisible:!0},"oom8bsp"],[{variant:"success",isFocusVisible:!0},"oom8bsq"],[{variant:"warning",isFocusVisible:!0},"oom8bsr"],[{variant:"error",isFocusVisible:!0},"oom8bss"]]}),qa=z({defaultClassName:"oom8bst _1yep5z6kz",variantClassNames:{isDisabled:{true:"oom8bsu"},isFocusVisible:{true:"oom8bsv"},isHovered:{true:"_1yep5z610u"},variant:{primary:"_1yep5z6111",secondary:"_1yep5z610x",tertiary:"_1yep5z6112",ghost:"_1yep5z6112",popover:"_1yep5z610x",toolbar:"_1yep5z610x",success:"_1yep5z6110",warning:"_1yep5z6110",error:"_1yep5z6110"}},defaultVariants:{},compoundVariants:[[{variant:"tertiary",isHovered:!0},"_1yep5z61mt"],[{variant:"ghost",isHovered:!0},"_1yep5z61mv"],[{variant:"tertiary",isFocusVisible:!0},"_1yep5z61mt"],[{variant:"secondary",isDisabled:!0},"_1yep5z61mr"],[{variant:"tertiary",isDisabled:!0},"_1yep5z61mr"],[{variant:"ghost",isDisabled:!0},"_1yep5z61mr"],[{variant:"popover",isDisabled:!0},"_1yep5z61mr"],[{variant:"toolbar",isDisabled:!0},"_1yep5z61mr"]]});var Ib={sm:16,md:20,lg:24},q=rt.forwardRef(({label:e,style:t,className:o,iconStart:r,iconEnd:a,variant:n="primary",elementType:i="button",isDisabled:s,size:p="sm","data-block-id":l,"data-block-class":c,...u},m)=>{let{buttonProps:d,isPressed:f,ref:y,isFocusVisible:b,isFocused:v,isHovered:_,uiStateOptions:g}=fr({...u,elementType:i,isDisabled:s}),h=Ib[p],R=filterTruthyValues({"data-block-id":l,"data-block-class":c,"data-disabled":s,"data-focused":v,"data-focus-visible":b,"data-hovered":_,"data-pressed":f});return jsxs(i,{...mergeProps(d,R),className:classNames(br({isDisabled:!!s,isFocusVisible:b,isHovered:_,variant:n,size:p}),"BaselineUI-ActionButton",typeof o=="function"?o(g):o),style:typeof t=="function"?t(g):t,ref:M(m,y),children:[!!r&&jsx(r,{size:h,className:qa({variant:n,isDisabled:s,isFocusVisible:b,isHovered:_})}),e,!!a&&jsx(a,{size:h,className:qa({variant:n,isDisabled:s,isFocusVisible:b,isHovered:_})}),n==="popover"&&jsx(CaretDownIcon,{size:8,className:dr})]})});q.displayName="ActionButton";var Vs=rt.forwardRef(({className:e,style:t,node:o,"data-block-id":r,"data-block-class":a,...n},i)=>{let s=rt.useRef(null);rt.useEffect(()=>{let c=s.current;return c?.append(o),()=>{c?.contains(o)&&o.remove();}},[o]);let{pressProps:p,isPressed:l}=usePress(n);return jsx("div",{...p,className:e,style:t,"data-block-id":r,"data-block-class":a,"data-pressed":l,"data-testid":"dom-node-renderer",ref:M(i,s)})});Vs.displayName="DomNodeRenderer";var Os="_14uvjig0 z9nup81",js="_14uvjig7",As="_14uvjig3",$s=z({defaultClassName:"_14uvjig4",variantClassNames:{isDisabled:{true:"_14uvjig5"},hasNumberInput:{false:"_14uvjig6"}},defaultVariants:{},compoundVariants:[]}),Us=z({defaultClassName:"_14uvjigf _14uvjig1",variantClassNames:{active:{true:"_14uvjigg _14uvjig2"},isDisabled:{true:"_14uvjigh"},isReadOnly:{true:"_14uvjigi"},isFocusVisible:{true:"_14uvjigj _14uvjig2"},isHovered:{true:"_14uvjigk _14uvjig2"}},defaultVariants:{},compoundVariants:[]}),qs="_14uvjige _1yep5z6ih _1yep5z6ii _1yep5z6ij _1yep5z6j8 _1yep5z6j9 _1yep5z6ja _1yep5z6k2 _1yep5z6k3 _1yep5z6k4 _1yep5z6kz",Ks="_14uvjig8",Gs=z({defaultClassName:"_14uvjig9 _14uvjig1",variantClassNames:{active:{true:"_14uvjig2"},isFocusVisible:{true:"_14uvjigb _14uvjig2"},isDisabled:{true:"_14uvjigc"},isHovered:{true:"_14uvjig2"}},defaultVariants:{},compoundVariants:[]});var xt=z({defaultClassName:"nrh1ehx",variantClassNames:{isDisabled:{true:"nrh1ehy"},hasError:{true:"nrh1ehz"},labelPosition:{start:"nrh1eh10",top:"nrh1eh11"}},defaultVariants:{},compoundVariants:[]}),gr=z({defaultClassName:"nrh1eho",variantClassNames:{isDisabled:{true:"nrh1ehp"},labelPosition:{top:"nrh1ehq",start:"nrh1ehr"}},defaultVariants:{},compoundVariants:[]}),Ct=z({defaultClassName:"nrh1ehs",variantClassNames:{validationState:{valid:"nrh1eht",error:"nrh1ehu",warning:"nrh1ehv"},isReadOnly:{true:"nrh1ehw"}},defaultVariants:{},compoundVariants:[]}),Oe="nrh1eh3",je=z({defaultClassName:"nrh1eh4",variantClassNames:{labelPosition:{top:"nrh1eh5",start:"nrh1eh6"},hasMessage:{true:"nrh1eh7"}},defaultVariants:{},compoundVariants:[[{labelPosition:"start",hasMessage:!1},"nrh1eh8"]]}),Ae=z({defaultClassName:"nrh1eh0",variantClassNames:{labelPosition:{top:"z9nup81",start:"nrh1eh2 z9nup82"}},defaultVariants:{},compoundVariants:[]}),Pt=z({defaultClassName:"nrh1eh9 z9nup82",variantClassNames:{validationState:{valid:"nrh1eha",error:"nrh1ehb",warning:"nrh1ehc"},isHovered:{true:"nrh1ehd"},isFocused:{true:"nrh1ehe"},isDisabled:{true:"nrh1ehf"},variant:{primary:"nrh1ehg",ghost:"nrh1ehh"},isReadOnly:{true:"nrh1ehi"}},defaultVariants:{},compoundVariants:[[{variant:"ghost",isHovered:!0,isFocused:!1,validationState:"valid"},"nrh1ehj"],[{variant:"ghost",isFocused:!1,isHovered:!1,validationState:"valid"},"nrh1ehk"],[{isHovered:!0,validationState:"valid",isDisabled:!1,isReadOnly:!1,isFocused:!1,variant:"primary"},"nrh1ehl"],[{isHovered:!0,validationState:"warning",isDisabled:!1,isReadOnly:!1,isFocused:!1},"nrh1ehm"],[{isReadOnly:!0,variant:"primary",isFocused:!1},"nrh1ehn"]]});function ke({description:e,errorMessageProps:t,descriptionProps:o,warningMessage:r,errorMessage:a,labelPosition:n,isDisabled:i}){return e?jsx("div",{...o,className:xt({isDisabled:i,labelPosition:n}),children:e}):a?jsx("div",{...t,className:xt({hasError:!0,labelPosition:n}),children:a}):r?jsx("div",{className:xt({isDisabled:i,labelPosition:n}),children:r}):null}var Ws=z({defaultClassName:"_1lnwne1 z9nup82",variantClassNames:{isHoveredOrFocused:{true:"_1lnwne2"},isInteractive:{false:"z9nup83"}},defaultVariants:{},compoundVariants:[[{isHoveredOrFocused:!0,isInteractive:!0},"_1lnwne4"]]}),Xs="_1lnwne0";var Ys=z({defaultClassName:"_1jwycy80",variantClassNames:{placement:{bottom:"_1jwycy81",left:"_1jwycy82",right:"_1jwycy83",top:"_1jwycy84"},variant:{default:"_1jwycy85",inverse:"_1jwycy86"}},defaultVariants:{},compoundVariants:[]}),Zs=z({defaultClassName:"_1jwycy87 _1yep5z6al _1yep5z6am _1yep5z6an _1yep5z6b9 _1yep5z6ba _1yep5z6bb _1yep5z6bx _1yep5z6by _1yep5z6bz _1yep5z6cl _1yep5z6cm _1yep5z6cn",variantClassNames:{size:{md:"_1yep5z63u _1yep5z63v _1yep5z63w _1yep5z61i _1yep5z61j _1yep5z61k _1yep5z66 _1yep5z67 _1yep5z68 _1yep5z62i _1yep5z62j _1yep5z62k _1yep5z6e7",sm:"_1yep5z63o _1yep5z63p _1yep5z63q _1yep5z61c _1yep5z61d _1yep5z61e _1yep5z63 _1yep5z64 _1yep5z65 _1yep5z62f _1yep5z62g _1yep5z62h _1yep5z6dv"},variant:{default:"_1yep5z6g9 _1yep5z6ez",inverse:"_1yep5z6d7 _1yep5z6g1 _1yep5z6eu"}},defaultVariants:{},compoundVariants:[]});var Xa=rt.forwardRef(({children:e,state:t,overlayProps:o,arrowProps:r,placement:a,variant:n,size:i,tooltipProps:s,includeArrow:p},l)=>{let{tooltipProps:c}=useTooltip({isOpen:t.isOpen},t),u=useMemo(()=>{switch(a){case"top":return {x:0,y:4};case"bottom":return {x:0,y:-4};case"left":return {x:4,y:0};case"right":return {x:-4,y:0};default:return {x:0,y:0}}},[a]),m=useReducedMotion(),[d]=useSpring(()=>({from:{opacity:0,transform:`translate(${u.x}px, ${u.y}px)`},to:{opacity:1,transform:"translate(0, 0)"},immediate:!!m})),f=a==="center"?"bottom":a;return jsxs(animated.span,{...o,style:{...d,...o.style},ref:l,"data-placement":f,children:[p?jsx("div",{className:Ys({placement:f,variant:n}),...r}):null,jsx("div",{...mergeProps(c,s),className:Zs({variant:n,size:i}),children:e})]})});Xa.displayName="TooltipContent";function el({ref:e,onIntersect:t,isDisabled:o,threshold:r,rootMargin:a,root:n}){let i=rt.useRef(null);useEffect(()=>{if(o){i.current?.disconnect(),i.current=null;return}i.current=new IntersectionObserver(([s])=>{t(s);},{root:n?.current,rootMargin:a,threshold:r});},[t,o,n,a,r]),useEffect(()=>{let{current:s}=i;return e.current&&s?.observe(e.current),()=>s?.disconnect()},[e]);}function tl({ref:e,onResize:t,isDisabled:o}){let r=rt.useRef(null),[a,n]=rt.useState();return rt.useEffect(()=>{if(o){r.current?.disconnect(),r.current=null;return}r.current=new ResizeObserver(([i])=>{n(i.contentRect),t?.(i);});},[t,o,n]),rt.useEffect(()=>{let{current:i}=r;return e.current&&i?.observe(e.current),()=>i?.disconnect()},[e]),{size:a}}function kt({src:e,alt:t}){let[o,r]=useState(!1),[a,n]=useState(!1),[i,s]=useState(!1),p=()=>{r(!0),s(!1);},l=()=>{n(!0),s(!1);};return useEffect(()=>{if(!e)return;s(!0);let c=new Image;return c.src=e,c.addEventListener("load",p),c.addEventListener("error",l),()=>{c.removeEventListener("load",p),c.removeEventListener("error",l);}},[e]),{isLoaded:o,hasError:a,isLoading:i,imgProps:{src:o?e:void 0,alt:t}}}function It(){let e=useRef(!0);return useEffect(()=>{e.current=!1;},[]),e.current}var ol="SET_STATE",_r="UNDO",zr="REDO",qb=(e,t)=>{let{past:o,present:r,future:a}=e;switch(t.type){case ol:return {past:[...o,r],present:t.data,future:[]};case _r:return {past:o.slice(0,o?.length-1),present:o[o?.length-1],future:[r,...a]};case zr:return {past:[...o,r],present:a[0],future:a.slice(1)};default:throw new Error("Invalid action type")}},rl=(e={},{isDisabled:t,onAction:o})=>{let r=It(),[a,n]=useReducer(qb,{past:[],present:e,future:[]}),{past:i,present:s,future:p}=a,l=y=>{n({type:ol,data:y});},c=useRef(),u=()=>{c.current=_r,n({type:_r});},m=()=>{c.current=zr,n({type:zr});},d=!!i?.length,f=!!p?.length;return useGranularEffect(()=>{(c.current===_r||c.current===zr)&&(o?.(s,c.current),c.current=void 0);},[s],[o,r]),{state:s,push:t?()=>{}:l,undo:t?()=>{}:u,redo:t?()=>{}:m,pastStates:i,futureStates:p,canUndo:d,canRedo:f}};var Za=rt.createContext({messages:{},shouldLogMissingMessages:!0}),il=({children:e,messages:t={},shouldLogMissingMessages:o=!0,...r})=>{let a=rt.useMemo(()=>({messages:t,shouldLogMissingMessages:o}),[t,o]);return jsx(I18nProvider,{...r,children:jsx(Za.Provider,{value:a,children:e})})};il.displayName="I18nProvider";function H(e){let{messages:t,shouldLogMissingMessages:o}=useContext(Za);useEffect(()=>{!e&&Wb(t)&&console.warn("BUI \u{1F30D}: No messages object provided and no messages found in the `I18nProvider`. Please provide a messages object to the `useI18n` hook.");},[e,t]);let r=useMessageFormatter(e?cleanKeyFromGlobImport(e):t),a=useLocale();return {formatMessage:(n,i)=>{if(typeof n=="object")try{return r(n.id,i)}catch{return o&&console.log(`BUI \u{1F30D}: Translation not found for key: \`${n.id.toString()}\`. The default message, i.e. \`${n.defaultMessage}\`, will be used instead.`),n.defaultMessage||n.id}else try{return r(n,i)}catch{return o&&console.log(`BUI \u{1F30D}: Translation not found for key: \`${n.toString()}\`. The default message, i.e. \`${n.toString()}\`, will be used instead.`),n}},locale:a}}var U=e=>e;function hL(e,t,o){let r=rt.useRef(null);return rt.useEffect(()=>{if(e)return r.current=new MutationObserver(o),r.current.observe(e,t),()=>{r.current&&r.current.disconnect();}},[e,t,o]),r.current}function ll(e,t){let[o,r]=useState(()=>{try{let n=window.localStorage.getItem(e);return n?JSON.parse(n):t}catch(n){return console.log(n),t}});return [o,n=>{try{let i=n instanceof Function?n(o):n;r(i),window.localStorage.setItem(e,JSON.stringify(i));}catch(i){console.log(i);}}]}function RL({ref:e,onSelectionChange:t,onSelectionEnd:o,isDisabled:r}){let a=rt.useRef(null);usePress({ref:e,isDisabled:r,onPressEnd(){let i=re(e.current).getSelection();i&&e.current?.contains(i.anchorNode)&&o?.(i);},onPressStart(){let n=re(e.current);a.current=n.getSelection(),a.current&&a.current.removeAllRanges();}}),useEffect(()=>{let n=e.current;if(!n||r)return;function i(){let l=re(n).getSelection();l&&e.current?.contains(l.anchorNode)&&t(l);}let s=ue(n);return s.addEventListener("selectionchange",i),()=>{s.removeEventListener("selectionchange",i);}},[e,t,r]);}function wt(e){let t=useCallback(()=>{let a=re(e??document.body),n=a.matchMedia(queries.tablet);return a.matchMedia(queries.desktop).matches?"desktop":n.matches?"tablet":"mobile"},[e]),[o,r]=rt.useState(t);return xe(()=>{let a=re(e),n=()=>{r(t());};return a.addEventListener("resize",n),n(),()=>{a.removeEventListener("resize",n);}},[e,t]),o}var Qa=rt.createContext(void 0),cl=({portalContainer:e,children:t})=>jsx(Qa.Provider,{value:e,children:t});cl.displayName="PortalContainerProvider";function ge(e){let t=useContext(Qa);return e||t}var dl=z({defaultClassName:"z9nup84",variantClassNames:{size:{xs:"z9nup85",sm:"z9nup86"}},defaultVariants:{},compoundVariants:[]});var ul="z9nup80",Rt="z9nup83",ml="z9nup87";function Ja(e=window){let[t,o]=useState("light"),[r,a]=useState(!1),[n,i]=useState(!1),[s,p]=useState(!1);return useEffect(()=>{let l=e.matchMedia("(prefers-color-scheme: dark)"),c=u=>{o(u.matches?"dark":"light");};return l.matches&&o("dark"),l.addEventListener("change",c),()=>{l.addEventListener("change",c);}},[e]),useEffect(()=>{let l=e.matchMedia("(prefers-contrast: more)"),c=u=>{a(u.matches);};return a(l.matches),l.addEventListener("change",c),()=>{l.addEventListener("change",c);}},[e]),useEffect(()=>{let l=e.matchMedia("(prefers-reduced-motion: reduce)"),c=u=>{i(u.matches);};return l.matches&&i(!0),l.addEventListener("change",c),()=>{l.addEventListener("change",c);}},[e]),useEffect(()=>{let l=e.matchMedia("(prefers-reduced-transparency: reduce)"),c=u=>{p(u.matches);};return l.matches&&p(!0),l.addEventListener("change",c),()=>{l.addEventListener("change",c);}},[e]),{colorScheme:t,highContrast:r,reducedMotion:n,transparency:s}}var St=createContext({theme:lightTheme,setTheme:()=>{}});var fl="var(--hj25q10)";var Cr={LIGHT:{name:"light",theme:lightTheme},DARK:{name:"dark",theme:darkTheme}},Tt=rt.forwardRef(({theme:e="system",children:t,setTheme:o,className:r,style:a,UNSAFE_domProps:n,"data-block-id":i,"data-block-class":s},p)=>{let{direction:l}=useLocale(),{colorScheme:c,reducedMotion:u,highContrast:m,transparency:d}=Ja(),{name:f,theme:y}=useMemo(()=>{switch(e){case"system":return c==="light"?Cr.LIGHT:Cr.DARK;case"light":return Cr.LIGHT;case"dark":return Cr.DARK;default:return {name:"custom",theme:e}}},[c,e]),b=wt(),v={"data-theme":f,"data-block-id":i,"data-block-class":s,"data-reduced-motion":u,"data-high-contrast":m,"data-transparency":d,"data-device":b},_=useMemo(()=>({theme:y,setTheme:o}),[y,o]);return jsx(St.Provider,{value:_,children:jsx("div",{...mergeProps(n,v),className:classNames(ul,"BaselineUI-ThemeProvider",r),style:{...assignInlineVars(themeVars,y),...assignInlineVars({[fl]:l==="rtl"?"-1":"1"}),...a},ref:p,children:t})})});Tt.displayName="ThemeProvider";var $e=rt.forwardRef(({className:e,style:t,children:o,"data-block-id":r,"data-block-class":a,...n},i)=>{let{theme:s}=useContext(St);return jsx(Overlay,{...n,children:jsx(Tt,{ref:i,theme:s,style:t,className:classNames("BaselineUI-Portal",e),"data-block-id":r,"data-block-class":a,children:o})})});$e.displayName="Portal";var ne=rt.forwardRef(({children:e,placement:t="bottom",delay:o=1e3,closeDelay:r=500,variant:a="default",size:n="md",includeArrow:i=!0,portalContainer:s,className:p,style:l,"data-block-id":c,"data-block-class":u,...m},d)=>{let f=rt.useRef(null),y=rt.useRef(null),b=!m.text||m.isDisabled,v=useTooltipTriggerState({...m,delay:o,closeDelay:r,isDisabled:b}),{triggerProps:_,tooltipProps:g}=useTooltipTrigger({...m,isDisabled:b,delay:o,closeDelay:r},v,f),h=ge(s),{overlayProps:R,arrowProps:w,placement:x,updatePosition:C}=useOverlayPosition({arrowSize:i?13:0,targetRef:f,arrowBoundaryOffset:i?8:0,offset:i?12:2,overlayRef:y,placement:t,isOpen:v.isOpen,...m});return el({ref:y,threshold:1,onIntersect:C,isDisabled:!v.isOpen}),tl({ref:f,onResize:C,isDisabled:!v.isOpen}),jsxs(FocusableProvider,{..._,ref:f,children:[e,v.isOpen?jsx($e,{disableFocusManagement:!0,portalContainer:h,className:p,style:l,"data-block-id":c,"data-block-class":u,children:jsx(Xa,{ref:M(d,y),state:v,arrowProps:w,overlayProps:R,placement:x,tooltipProps:g,variant:a,size:n,includeArrow:i,children:m.text})}):null]})});ne.displayName="Tooltip";var Ng={xxs:8,xs:12,sm:16,md:20,lg:24},E=rt.forwardRef((e,t)=>{let o=ae(t),{tooltipProps:r}=mr(e,o);return r?jsx(ne,{...r,children:jsx(tn,{...e,ref:o})}):jsx(tn,{...e,ref:o})});E.displayName="ActionIconButton";var tn=rt.forwardRef(({className:e,style:t,icon:o,size:r="md",variant:a="primary",UNSAFE_NON_INTERACTIVE:n,elementType:i=n?"div":"button",...s},p)=>{let l=s["aria-label"],c=s["aria-labelledby"];useEffect(()=>{!l&&!c&&console.warn("An `ActionIconButton` requires an aria-label or aria-labelledby prop.");},[l,c]);let{buttonProps:u,isPressed:m,ref:d,isFocusVisible:f,isFocused:y,isHovered:b,uiStateOptions:v}=fr({...s,elementType:i}),_=filterTruthyValues({"data-block-id":s["data-block-id"],"data-block-class":s["data-block-class"],"data-focused":y,"data-focus-visible":f,"data-disabled":s.isDisabled,"data-hovered":b,"data-pressed":m});return jsxs(i,{...mergeProps(u,_),className:classNames(ks({variant:a,size:r,isDisabled:!!s.isDisabled,isFocusVisible:f,isHovered:b}),"BaselineUI-ActionIconButton",typeof e=="function"?e(v):e),ref:M(p,d),style:typeof t=="function"?t(v):t,...n&&{tabIndex:void 0,role:void 0,"aria-label":void 0,"aria-labelledby":void 0,"aria-disabled":void 0},children:[jsx(o,{role:"presentation",size:Ng[r]}),a==="popover"&&jsx(CaretDownIcon,{size:8,className:dr})]})});tn.displayName="ActionIconButtonCore";var Me=rt.forwardRef(({className:e,style:t,labelPosition:o="top",variant:r="primary",showStepper:a=!0,...n},i)=>{let s=rt.useRef(null),{locale:p}=useLocale(),l=useNumberFieldState({...n,locale:p}),{hoverProps:c,isHovered:u}=useHover({isDisabled:n.isDisabled}),{focusProps:m,isFocusVisible:d,isFocused:f}=useFocusRing(),{labelProps:y,decrementButtonProps:b,inputProps:v,incrementButtonProps:_,groupProps:g,descriptionProps:h,errorMessageProps:R}=useNumberField(n,l,s),w=useMemo(()=>n.isReadOnly?ReadOnlyIcon:n.isInvalid?ErrorFilledIcon:null,[n.isInvalid,n.isReadOnly]),x=ke({description:n.description,errorMessageProps:R,descriptionProps:h,errorMessage:n.errorMessage,labelPosition:o,isDisabled:n.isDisabled}),C=filterTruthyValues({"data-disabled":n.isDisabled,"data-readonly":n.isReadOnly,"data-hovered":u,"data-focused":f,"data-focus-visible":d,"data-invalid":n.isInvalid,"data-block-id":n["data-block-id"],"data-block-class":n["data-block-class"]});return jsxs("div",{style:t,className:classNames(Ae({labelPosition:o}),"BaselineUI-NumberInput",e),...C,ref:i,children:[n.label?jsxs("div",{className:je({labelPosition:o,hasMessage:!!x}),children:[jsx("label",{...y,className:Oe,children:n.label}),o==="start"&&x]}):null,jsxs("div",{className:classNames({[Rt]:n.isDisabled}),children:[jsxs("div",{...mergeProps(g,c),className:classNames(Pt({isHovered:u,isDisabled:!!n.isDisabled,isReadOnly:!!n.isReadOnly,validationState:n.isInvalid?"error":"valid",isFocused:f,variant:r}),{[Xs]:o==="start"},"BaselineUI-NumberInput-Container"),children:[jsx("input",{...mergeProps(v,m),ref:s,className:classNames("BaselineUI-NumberInput-Input",gr({isDisabled:n.isDisabled,labelPosition:o}))}),w?jsx(w,{className:Ct({validationState:"error",isReadOnly:n.isReadOnly}),size:16}):null,a?jsxs("div",{className:Ws({isHoveredOrFocused:u||f,isInteractive:!n.isReadOnly&&!n.isDisabled}),children:[jsx(E,{variant:"secondary",size:"xxs",icon:MinusIcon,...b,className:"BaselineUI-NumberInput-DecrementButton"}),jsx(O,{style:{height:16},orientation:"vertical"}),jsx(E,{variant:"secondary",size:"xxs",icon:PlusIcon,..._,className:"BaselineUI-NumberInput-DecrementButton"})]}):null]}),o==="top"&&x]})]})});Me.displayName="NumberInput";var Mt=rt.forwardRef(({className:e,style:t,onChange:o,onChangeEnd:r,numberFormatOptions:a,isDisabled:n,step:i,minValue:s,maxValue:p,value:l,"aria-label":c,"aria-labelledby":u,"aria-details":m,"aria-describedby":d,"data-block-id":f,"data-block-class":y,defaultValue:b,isReadOnly:v,label:_,id:g,includeNumberInput:h},R)=>{let w=rt.useRef(null),x={onChange:o===void 0?void 0:I=>{o(I[0]);},isDisabled:n||v,step:i,minValue:s,maxValue:p,onChangeEnd:r===void 0?void 0:I=>{r(I[0]);},value:l===void 0?void 0:[l],defaultValue:b===void 0?void 0:[b],"aria-label":c,"aria-labelledby":u,"aria-details":m,"aria-describedby":d,id:g,label:_},C=useNumberFormatter(a),T=useSliderState({...x,numberFormatter:C}),{trackProps:N,groupProps:k,labelProps:S}=useSlider(x,T,w),P=jsx(Me,{variant:"ghost",showStepper:!1,"aria-label":c,"aria-labelledby":S.id,value:T.getThumbValue(0),formatOptions:a,onChange:I=>{T.setThumbValue(0,I);},style:{width:55,textAlign:"right",flexShrink:0}});return jsxs("div",{...k,style:t,"data-block-id":f,"data-block-class":y,className:classNames(Os,"BaselineUI-Slider",e),children:[_?jsxs("div",{className:As,children:[jsx("label",{...S,className:classNames($s({isDisabled:n,hasNumberInput:!!h}),"BaselineUI-Slider-Label"),children:_}),h?P:null]}):null,jsxs("div",{className:js,children:[jsx("div",{...N,className:classNames(Ks,"BaselineUI-Slider-Track"),ref:M(w,R),"data-testid":"track",children:jsx(Qg,{state:T,trackRef:w,isDisabled:n,isReadOnly:v})}),h&&!_?P:null]})]})});Mt.displayName="Slider";function Qg({state:e,trackRef:t,isDisabled:o,isReadOnly:r}){let a=rt.useRef(null),{thumbProps:n,inputProps:i,isDragging:s}=useSliderThumb({trackRef:t,inputRef:a},e),{focusProps:p,isFocused:l,isFocusVisible:c}=useFocusRing(),{hoverProps:u,isHovered:m}=useHover({isDisabled:o}),d=filterTruthyValues({"data-disabled":o,"data-readonly":r,"data-hovered":m,"data-focus-visible":c,"data-dragging":s,"data-focused":l});return jsxs(Fragment,{children:[jsx("div",{className:classNames(Gs({isDisabled:o,isFocusVisible:c,active:s,isHovered:m}),"BaselineUI-Slider-TrackHighlight"),style:{width:n.style?.left},"data-testid":"track-highlight"}),jsxs("div",{...mergeProps(n,u,d),className:classNames(qs,"BaselineUI-Slider-ThumbHandle"),"data-testid":"thumb",children:[jsx("div",{className:classNames(Us({isDisabled:o,isFocusVisible:c,active:s,isReadOnly:r,isHovered:m}),"BaselineUI-Slider-Thumb")}),jsx(VisuallyHidden,{children:jsx("input",{ref:a,...mergeProps(i,p)})})]})]})}var Pl=z({defaultClassName:"_1tkzayn0 _1yep5z6dy",variantClassNames:{size:{sm:"_1tkzayn1",md:"_1tkzayn2",lg:"_1tkzayn3"},type:{subtitle:"_1yep5z610m",title:"_1yep5z610m",label:"_1yep5z610n",value:"_1yep5z610n",helper:"_1yep5z610o",body:"_1yep5z610m"}},defaultVariants:{},compoundVariants:[[{type:"title",size:"sm"},"_1yep5z61kx"],[{type:"title",size:"md"},"_1yep5z61l0"],[{type:"title",size:"lg"},"_1yep5z61l3"],[{type:"body",size:"sm"},"_1yep5z61ln"],[{type:"body",size:"md"},"_1yep5z61lq"],[{type:"body",size:"lg"},"_1yep5z61lq"],[{type:"subtitle",size:"sm"},"_1yep5z61lj"],[{type:"subtitle",size:"md"},"_1yep5z61lm"],[{type:"subtitle",size:"lg"},"_1yep5z61lm"],[{type:"label",size:"md"},"_1yep5z61ll"],[{type:"label",size:"lg"},"_1yep5z61ll"],[{type:"value",size:"md"},"_1yep5z61ll"],[{type:"value",size:"lg"},"_1yep5z61ll"],[{type:"helper",size:"sm"},"_1yep5z61lf"]]});var Q=rt.forwardRef(({elementType:e="span",type:t="title",children:o,size:r="md",...a},n)=>jsx(e,{...a,className:classNames(Pl({size:r,type:t}),"BaselineUI-Text",a.className),ref:n,children:o}));Q.displayName="Text";var kl=z({defaultClassName:"siobe21 _1yep5z6ao _1yep5z6ap _1yep5z6aq _1yep5z6bc _1yep5z6bd _1yep5z6be _1yep5z6d7 _1yep5z6lq _1yep5z6lo _1yep5z6gz _1yep5z6lf _1yep5z6ih _1yep5z6ii _1yep5z6ij _1yep5z6it _1yep5z6iu _1yep5z6iv",variantClassNames:{background:{subtle:"_1yep5z611t",medium:"_1yep5z611u"},isFocusVisible:{true:"_1yep5z6178 _1yep5z617a _1yep5z617b _1yep5z613h"}},defaultVariants:{},compoundVariants:[]}),Il="siobe25",wl="var(--siobe20)";var Ir=rt.forwardRef(({className:e,style:t,children:o,background:r="medium",title:a,action:n,"data-block-id":i,"data-block-class":s,onCloseRequest:p,...l},c)=>{let{formatMessage:u}=H(),m=rt.useRef(null),{dialogProps:d,titleProps:f}=useDialog(l,m),{focusProps:y,isFocusVisible:b}=useFocusRing();return jsxs("div",{...mergeProps(d,y),className:classNames(kl({background:r,isFocusVisible:b}),"BaselineUI-Drawer",e),"data-block-id":i,"data-block-class":s,style:t,ref:M(c,m),children:[jsxs(L,{paddingLeft:"lg",paddingRight:"sm",backgroundColor:"background.primary.subtle",display:"flex",justifyContent:"space-between",alignItems:"center",gap:"lg",className:Il,children:[jsx(Q,{type:"title",size:"sm",...f,className:ml,children:a}),jsxs(L,{children:[n?jsx(E,{...n,variant:"secondary"}):null,jsx(E,{variant:"secondary",size:"md",icon:XIcon,onPress:p,"aria-label":u(lv.close)})]})]}),jsx(O,{variant:r==="subtle"?"primary":"secondary"}),o]})});Ir.displayName="Drawer";var lv=U({close:{id:"close",defaultMessage:"Close"}});function Tl(e,t,o){let{isDisabled:r}=e,a=useReducedMotion(),[n,i]=rt.useState("100vh");useEffect(()=>{if(!ir()&&!Fa())return;let d=re(o.current);function f(){i(`${d?.visualViewport.height}px`);}return f(),d?.visualViewport.addEventListener("resize",f),()=>{d?.visualViewport.removeEventListener("resize",f);}},[o]);let[{y:s},p]=useSpring(()=>({y:0,immediate:a,config:{easing:easings.easeOutCubic}})),l=useRef(0),c=useCallback(()=>{p.start({y:l.current,onRest:()=>{t.close();}});},[p,t]),u=useCallback(d=>{d.target.closest("[data-drawer]")||c();},[c]);useGranularLayoutEffect(()=>{l.current=o.current?.offsetHeight||0,p.set({y:l.current}),p.start({y:0,immediate:!!a});},[],[p,a]);let m=s.to({range:[0,l.current/2,l.current],output:[.5,.2,0],extrapolate:"clamp"}).to(d=>`rgba(0,0,0,${d})`);return {overlayProps:{style:r?void 0:{transform:s.to(d=>`translateY(${d}px)`)}},underlayProps:{style:r?void 0:{backgroundColor:m},onPointerDown:r?void 0:u},close:c,containerHeight:r?void 0:n}}var Nl=z({defaultClassName:"aml2vl0 _1yep5z6l5 _1yep5z6l6 _1yep5z6l8 _1yep5z6l7 _1yep5z6ih _1yep5z6ii _1yep5z6ij _1yep5z6i8 _1yep5z6i9 _1yep5z6ia",variantClassNames:{enableDrawer:{false:"_1yep5z6j8 _1yep5z6j9 _1yep5z6ja _1yep5z6k2 _1yep5z6k3 _1yep5z6k4",true:"aml2vl2"}},defaultVariants:{},compoundVariants:[]}),Ll="_1yep5z6l5 _1yep5z6l6 _1yep5z6l8 _1yep5z6l7 _1yep5z6gb _1yep5z6i8 _1yep5z6i9 _1yep5z6ia";var qe=rt.createContext({state:null,triggerProps:{},overlayProps:{}}),Ie=({children:e,...t})=>{let o=useOverlayTriggerState(t),{triggerProps:r,overlayProps:a}=useOverlayTrigger({type:"dialog"},o),n=useMemo(()=>({state:o,triggerProps:r,overlayProps:a}),[o,r,a]);return jsx(qe.Provider,{value:n,children:e})};Ie.displayName="Modal";var nn=rt.createContext({isDrawer:!1,closeDrawer:()=>{}}),sn=rt.createContext({setIsPopoverSafelyClosed:()=>{}}),Rv=animated(Tt),Sv=({children:e,className:t,style:o,isDismissable:r=!0,isKeyboardDismissDisabled:a=!1,portalContainer:n,disableAnimation:i,enableDrawer:s=!1,"data-block-id":p,"data-block-class":l})=>{let{state:c}=rt.useContext(qe),[u,m]=rt.useState(!0),d=wt(n),f=ge(n),y=typeof s=="boolean"&&s||s==="auto"&&d==="mobile";invariant(c,"ModalContent must be a child of Modal");let b=rt.useRef(null),v=typeof r=="function"?r(y):r,_=typeof a=="function"?a(y):a,{underlayProps:g,overlayProps:h,close:R,containerHeight:w}=Tl({isDisabled:!y,isDismissable:v&&u},c,b),{modalProps:x,underlayProps:C}=useModalOverlay({isDismissable:!y&&u,isKeyboardDismissDisabled:_},c,b),{theme:T}=useContext(St),N=useReducedMotion(),k=useSpring({from:{opacity:0,transform:"scale(0.95)"},to:{opacity:1,transform:"scale(1)"},immediate:!!N||i,config:{easing:easings.easeInBounce}}),S=useMemo(()=>({...x.style,...y?{...h.style,width:"100%"}:k}),[h.style,x.style,y,k]),P=useMemo(()=>({isDrawer:y,closeDrawer:R}),[y,R]),I=useMemo(()=>({setIsPopoverSafelyClosed:m}),[m]);return jsx(Overlay,{portalContainer:f,children:jsx(nn.Provider,{value:P,children:jsx(sn.Provider,{value:I,children:jsxs(Rv,{className:classNames(Nl({enableDrawer:y}),t),theme:T,"data-block-id":p,"data-block-class":l,style:{...o,height:y?w:"auto",...assignInlineVars({[wl]:w})},children:[jsx(animated.div,{...mergeProps(C,g,{onPointerDown:y?g.onPointerDown:C.onPointerDown}),"data-testid":"underlay",style:g.style,className:classNames(Ll,"BaselineUI-Modal-Underlay")}),jsx(animated.div,{...mergeProps(x,h),style:S,ref:b,"data-drawer":y,className:"BaselineUI-Modal-Content",children:typeof e=="function"?e(c):e})]})})})})},Tv=animated(Sv),Ee=({children:e,style:t,...o})=>{let{state:r}=rt.useContext(qe);invariant(r,"ModalContent must be a child of Modal");let a=useReducedMotion();return useTransition(r.isOpen,{from:{opacity:0},enter:{opacity:1},immediate:!!a||o.disableAnimation})((i,s)=>s&&jsx(Tv,{...o,style:{...t,...i},children:typeof e=="function"?e(r):e}))};var Hl=z({defaultClassName:"cjv3et0 _1yep5z6al _1yep5z6am _1yep5z6an _1yep5z6b9 _1yep5z6ba _1yep5z6bb _1yep5z6bx _1yep5z6by _1yep5z6bz _1yep5z6cl _1yep5z6cm _1yep5z6cn _1yep5z6g1 _1yep5z6d7",variantClassNames:{size:{sm:"cjv3et1",md:"cjv3et2",lg:"cjv3et3",content:"cjv3et4"},variant:{primary:"_1yep5z612r _1yep5z617g _1yep5z617i",ghost:"cjv3et6"},isDrawer:{true:"cjv3et7 _1yep5z6y7 _1yep5z6y8 _1yep5z6y9 _1yep5z6yv _1yep5z6yw _1yep5z6yx _1yep5z6174"},isFocusVisible:{true:"_1yep5z613h _1yep5z617b _1yep5z617a _1yep5z6178"}},defaultVariants:{},compoundVariants:[]});var pn=rt.createContext({titleProps:{}}),me=rt.forwardRef(({children:e,className:t,style:o,inheritDrawer:r,size:a="md",variant:n="primary","data-block-id":i,"data-block-class":s,drawerBackground:p,...l},c)=>{let u=rt.useRef(null),m=rt.useRef(null),{isDrawer:d,closeDrawer:f}=useContext(nn),[y,b]=rt.useState(""),{focusProps:v,isFocusVisible:_}=useFocusRing();useLayoutEffect(()=>{let w=m.current?.getRootNode(),x=l["aria-label"]||"";l["aria-labelledby"]&&(x=w?.querySelector(`#${l["aria-labelledby"].replaceAll(":","\\:")}`)?.textContent||""),b(x);},[l]);let{dialogProps:g,titleProps:h}=useDialog(l,u),R=useMemo(()=>({titleProps:h}),[h]);return d&&r?jsx(Ir,{title:y,onCloseRequest:f,className:t,...l,"data-drawer":!0,"data-block-id":i,"data-block-class":s,ref:M(m,c),background:p,children:e}):jsx(pn.Provider,{value:R,children:jsx("section",{...mergeProps(g,v),"data-block-id":i,"data-block-class":s,ref:M(u,c),style:o,className:classNames(Hl({size:d?"content":a,variant:n,isDrawer:d,isFocusVisible:_}),"BaselineUI-Dialog",t),children:e})})});me.displayName="Dialog";var Fl=rt.forwardRef(({children:e,className:t,style:o},r)=>{let{titleProps:a}=useContext(pn);return rt.isValidElement(e)?rt.cloneElement(e,{...a,ref:r,className:classNames(e.props.className,t),style:{...e.props.style,...o}}):jsx("h3",{...a,ref:r,className:t,style:o,children:e})});Fl.displayName="DialogTitle";function Vl({placement:e,isOpen:t}){let o=useReducedMotion();return useTransition(t,{from:{opacity:0,transform:`translate3d(${e==="bottom"?"0, 4px, 0":"0, -4px, 0"})`},enter:{opacity:1,transform:"translate3d(0, 0, 0)"},immediate:!!o,config:config.stiff})}var jl=({children:e,isOpen:t,popoverContentRef:o,portalContainer:r=document.body,style:a})=>{let[n,i]=useState(!1),[s,p]=useState(null),l=useRef(null),{setIsPopoverSafelyClosed:c}=useContext(sn);useEffect(()=>{t?(i(!0),l.current&&clearTimeout(l.current)):l.current=setTimeout(()=>{i(!1);},300);},[t]),useEffect(()=>()=>{l.current&&clearTimeout(l.current);},[]);let u=o.current;return useEffect(()=>{u&&p(u.getBoundingClientRect());},[u]),useEffect(()=>{c(!n);},[n,c]),jsxs(Fragment,{children:[n?Gv.createPortal(jsx("div",{style:{position:"absolute",left:a?.left,top:a?.top,width:s?.width,height:s?.height,zIndex:a?.zIndex?+a.zIndex-1:void 0},className:"BaselineUI-Popover-ClickPreventionLayer"}),r):null,e]})};var{color:dn}=themeVars,ye=rt.forwardRef(({className:e,style:t,state:o,overlayProps:r,underlayClassName:a,children:n,includeArrow:i=!1,offset:s=2,portalContainer:p,contentContainerClassName:l,contentContainerStyle:c,"data-block-id":u,"data-block-class":m,...d},f)=>{let y=rt.useRef(null),b=ge(p),v=i?8:0,{underlayProps:_,popoverProps:g,placement:h,arrowProps:R}=usePopover({...d,offset:s+v,popoverRef:y,containerPadding:d.containerPadding||0},o);delete g.style?.position;let w=Vl({placement:h,isOpen:o.isOpen}),x=h==="center"?"bottom":h;return jsx(jl,{isOpen:o.isOpen,popoverContentRef:y,portalContainer:b,style:g.style,children:w((C,T)=>T&&jsxs($e,{portalContainer:b,style:t,ref:f,"data-block-id":u,"data-block-class":m,children:[!d.isNonModal&&jsx("div",{..._,className:classNames(Ns,a,"BaselineUI-Popover-Underlay")}),jsxs(animated.div,{...g,style:{...g.style,...C,...assignInlineVars({[Ls]:`${d.triggerRef?.current?.offsetWidth}px`})},ref:M(y,f),className:classNames(Rs,"BaselineUI-Popover-Content",e),"data-placement":["top","bottom","left","right"].filter(N=>h?.includes(N)),children:[i?jsxs("svg",{className:classNames(ws[x],"BaselineUI-PopoverContent-Arrow"),...R,style:{...R.style,position:"absolute"},width:"15",height:"9",viewBox:"0 0 15 9",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M.019 0h1.228l6.272 7.237L13.791 0h1.228v1h-.772L7.519 8.763.791 1H.019V0Z",fill:dn.border.medium}),jsx("path",{d:"M7.504 6.492 2.248.488h10.511L10.132 3.49 7.504 6.492Z",fill:dn.background.primary.subtle,stroke:dn.background.primary.subtle})]}):null,jsx(DismissButton,{onDismiss:o.close}),jsx("div",{...r,style:c,className:classNames(Ss,l),children:typeof n=="function"?n(o):n}),jsx(DismissButton,{onDismiss:o.close})]})]}))})});ye.displayName="PopoverContentCore";var we=rt.forwardRef((e,t)=>{let{state:o,overlayTriggerAria:{overlayProps:r},triggerRef:a}=useContext(bo);return invariant(a),o?jsx(ye,{ref:t,...e,triggerRef:e.triggerRef||a,overlayProps:r,state:o}):null});we.displayName="PopoverContent";var Ul=z({defaultClassName:"_1mdhlqv3",variantClassNames:{isOpen:{true:"_1mdhlqv4"}},defaultVariants:{},compoundVariants:[]}),Ke="_1mdhlqv6 _1yep5z6al _1yep5z6am _1yep5z6an _1yep5z6b9 _1yep5z6ba _1yep5z6bb _1yep5z6bx _1yep5z6by _1yep5z6bz _1yep5z6cl _1yep5z6cm _1yep5z6cn _1yep5z6d7",ql=z({defaultClassName:"_1mdhlqv0 _1yep5z66 _1yep5z67 _1yep5z68 _1yep5z62i _1yep5z62j _1yep5z62k _1yep5z63o _1yep5z63p _1yep5z63q _1yep5z61c _1yep5z61d _1yep5z61e _1yep5z6ih _1yep5z6ii _1yep5z6ij _1yep5z6j8 _1yep5z6j9 _1yep5z6ja _1yep5z69o _1yep5z69p _1yep5z69q _1yep5z6eu _1yep5z6k8 _1yep5z6k9 _1yep5z6ka _1yep5z6dy",variantClassNames:{isFocused:{false:"_1mdhlqv1"},isDisabled:{true:"z9nup83 _1yep5z6ey"}},defaultVariants:{},compoundVariants:[]}),Tr="_1mdhlqv7 _1yep5z6al _1yep5z6am _1yep5z6an _1yep5z6b9 _1yep5z6ba _1yep5z6bb _1yep5z6bx _1yep5z6by _1yep5z6bz _1yep5z6cl _1yep5z6cm _1yep5z6cn _1yep5z6g1",Kl="_1yep5z66x _1yep5z66y _1yep5z66z",Gl="_1mdhlqv5 _1yep5z6ih _1yep5z6ii _1yep5z6ij _1yep5z6iq _1yep5z6ir _1yep5z6is _1yep5z6j8 _1yep5z6j9 _1yep5z6ja _1yep5z69i _1yep5z69j _1yep5z69k";var Zl=rt.forwardRef(({className:e,style:t,onChange:o,"data-block-id":r,icon:a,formatValue:n=u=>u,tooltipProps:i,popoverContentProps:s,isDisabled:p,...l},c)=>{let u=ae(c),[m,d]=useControlledState(l.value,l.defaultValue||0,o),[f,y]=rt.useState(!1),{keyboardProps:b}=useKeyboard({onKeyDown:g=>{(g.key==="Enter"||g.key==="Escape")&&y(!1);}}),v=n(m||0),_=i?.isDisabled||l["aria-label"]?`${l["aria-label"]}, ${v}`:v.toString();return jsxs(L,{display:"flex",flexDirection:"row",gap:"md",paddingX:"md",alignItems:"center",className:classNames("BaselineUI-IconSlider",e),"data-block-id":r,style:t,ref:u,children:[a?jsx(a,{size:24,className:sprinkles({color:"icon.primary"})}):null,jsxs(Ne,{type:"dialog",isOpen:f,onOpenChange:y,children:[jsx(Le,{children:jsx(ne,{text:l["aria-label"],size:"sm",variant:"inverse",includeArrow:!1,isDisabled:p,...i,children:jsx(q,{label:v,variant:"popover","aria-label":_,isDisabled:p,style:{fontVariantNumeric:"tabular-nums",minWidth:68,justifyContent:"space-between"}})})}),jsx(we,{placement:"bottom start",...s,className:classNames(Ke,s?.className),children:jsx(me,{size:"content","aria-label":_,children:jsx(FocusScope,{autoFocus:!0,children:jsx(L,{paddingY:"sm",paddingX:"lg",marginY:"md",style:{width:215},...b,children:jsx(Mt,{...l,onChange:g=>{d(g),o?.(g);},value:m})})})})})]})]})});Zl.displayName="IconSlider";var Ql=z({defaultClassName:"bpklwa7",variantClassNames:{isReadOnly:{true:"bpklwa8"},isDisabled:{true:"bpklwa9"},isSelected:{true:"bpklwaa"},isFocused:{true:"bpklwab"}},defaultVariants:{},compoundVariants:[[{isSelected:!0,isDisabled:!1,isReadOnly:!1},"bpklwac"]]}),Jl=z({defaultClassName:"bpklwae",variantClassNames:{isDisabled:{true:"bpklwaf"},isSelected:{true:"bpklwag"},isReadOnly:{true:"bpklwah"}},defaultVariants:{},compoundVariants:[]}),ep="bpklwad",tp=z({defaultClassName:"bpklwa0",variantClassNames:{labelPosition:{top:"bpklwa1",left:"bpklwa2"}},defaultVariants:{},compoundVariants:[]}),op="bpklwa6",rp=z({defaultClassName:"bpklwa3",variantClassNames:{labelPosition:{top:"bpklwa4",left:"bpklwa5"}},defaultVariants:{},compoundVariants:[]});var sp=rt.forwardRef(({className:e,label:t,labelPosition:o="top",statusLabel:r,style:a,"data-block-id":n,"data-block-class":i,...s},p)=>{let l=rt.useRef(null),c=useToggleState(s),{inputProps:u,isPressed:m}=useSwitch(s,c,l),{isFocusVisible:d,focusProps:f}=useFocusRing(),{hoverProps:y,isHovered:b}=useHover({isDisabled:s.isDisabled}),v=filterTruthyValues({"data-block-id":n,"data-block-class":i,"data-focused":d,"data-disabled":s.isDisabled,"data-focus-visible":d,"data-selected":c.isSelected,"data-readonly":s.isReadOnly,"data-hovered":b,"data-pressed":m}),_=jsx("div",{className:classNames(Ql({isSelected:c.isSelected,isDisabled:!!s.isDisabled,isFocused:d,isReadOnly:!!s.isReadOnly}),"BaselineUI-Switch-Track"),children:jsx("div",{className:classNames(Jl({isSelected:c.isSelected,isDisabled:s.isDisabled,isReadOnly:s.isReadOnly}),"BaselineUI-Switch-Knob"),"data-testid":"switch-knob"})});return jsxs("label",{...mergeProps(v,y),className:classNames(tp({labelPosition:o}),"BaselineUI-Switch",e),style:a,ref:p,children:[t?jsx("span",{className:classNames(ep,"BaselineUI-Switch-Label"),children:t}):null,jsx(VisuallyHidden,{children:jsx("input",{...mergeProps(u,f),ref:l})}),r?jsxs("div",{className:rp({labelPosition:o}),children:[jsx("span",{className:classNames("BaselineUI-Switch-Status-Label",op),children:c.isSelected?r.on:r.off}),_]}):_]})});sp.displayName="Switch";var lp="_19n40yy9",pp=z({defaultClassName:"_19n40yy0",variantClassNames:{size:{lg:"_19n40yy1",md:"_19n40yy2",sm:"_19n40yy3"},variant:{primary:"_19n40yy4",ghost:"_19n40yy5"},isFocused:{true:"_19n40yy6"},hasText:{true:"_19n40yy7"},isDisabled:{true:"_19n40yy8"}},defaultVariants:{},compoundVariants:[]});var P_={sm:SearchIcon,md:SearchIcon$1,lg:SearchIcon$1},up=rt.forwardRef(({className:e,size:t="md",variant:o="primary","data-block-id":r,"data-block-class":a,style:n,...i},s)=>{let p=rt.useRef(null),l=useSearchFieldState(i),{inputProps:c,clearButtonProps:u}=useSearchField({...i,"aria-haspopup":!1,"aria-autocomplete":"none",type:"search"},l,p),{focusProps:m,isFocusVisible:d,isFocused:f}=useFocusRing({within:!0,isTextInput:!0}),y=P_[t],b=t==="sm"?XIcon$2:XIcon$3,v=filterTruthyValues({"data-block-id":r,"data-block-class":a,"data-focused":f,"data-disabled":i.isDisabled,"data-focus-visible":d});return jsxs("div",{...v,className:classNames(pp({size:t,isFocused:f,variant:o,hasText:!!l.value,isDisabled:i.isDisabled}),"BaselineUI-SearchInput",e),style:n,ref:s,children:[jsx(y,{size:t==="sm"?20:24}),jsx("input",{...mergeProps(c,m),className:lp,ref:p}),l.value!==""&&jsx(E,{icon:b,...u,size:t==="sm"?"xs":"sm",variant:"secondary"})]})});up.displayName="SearchInput";var mp="xyd2ss1 _1yep5z613 _1yep5z614 _1yep5z615 _1yep5z63f _1yep5z63g _1yep5z63h _1yep5z64l _1yep5z64m _1yep5z64n _1yep5z629 _1yep5z62a _1yep5z62b _1yep5z65r _1yep5z65s _1yep5z65t _1yep5z683 _1yep5z684 _1yep5z685 _1yep5z699 _1yep5z69a _1yep5z69b _1yep5z66x _1yep5z66y _1yep5z66z _1yep5z6al _1yep5z6am _1yep5z6an _1yep5z6b9 _1yep5z6ba _1yep5z6bb _1yep5z6bx _1yep5z6by _1yep5z6bz _1yep5z6cl _1yep5z6cm _1yep5z6cn _1yep5z6lh _1yep5z6lg _1yep5z6hs _1yep5z6lk _1yep5z6g1",fp="xyd2ss0 _1yep5z66 _1yep5z67 _1yep5z68 _1yep5z62i _1yep5z62j _1yep5z62k _1yep5z64l _1yep5z64m _1yep5z64n _1yep5z629 _1yep5z62a _1yep5z62b";var fn=({section:e,showSelectedIcon:t,state:o})=>{let{itemProps:r,groupProps:a,headingProps:n}=useMenuSection({heading:e.value?.title,"aria-label":e["aria-label"]});return jsxs(Fragment,{children:[e.key!==o.collection.getFirstKey()&&jsx(O,{elementType:"li"}),jsxs("li",{...r,children:[e.value?.title?jsx(VisuallyHidden,{children:jsx("span",{...n,children:e.value.title})}):null,jsx("ul",{...a,className:fp,children:[...e.childNodes].map(i=>(invariant(i.type==="item"),jsx(Nr,{item:i,state:o,showSelectedIcon:t},i.key)))})]})]})};fn.displayName="MenuSection";var Nr=({item:e,state:t,className:o,showSelectedIcon:r})=>{let a=rt.useRef(null),n=useMenuItem({key:e.key},t,a),{isFocusVisible:i,focusProps:s}=useFocusRing();return jsx(fo,{item:e,liProps:mergeProps(n.menuItemProps,s,{className:o}),...n,isFocusVisible:i,ref:a,description:e.value?.keyboardShortcut,descriptionProps:n.keyboardShortcutProps,_state:t,showSelectedIcon:r})};Nr.displayName="MenuItem";var bn=rt.forwardRef(({className:e,itemClassName:t,onContentKeyDown:o,...r},a)=>{let n=useTreeState(r),i=rt.useRef(null),{menuProps:s}=useMenu(r,n,i),{keyboardProps:p}=useKeyboard({onKeyDown:o});return jsx("ul",{...mergeProps(s,p),className:classNames(mp,e),ref:M(i,a),children:[...n.collection].map(l=>l.type==="section"?jsx(fn,{section:l,state:n,showSelectedIcon:r.selectionMode==="multiple"||r.selectionMode==="single"},l.key):jsx(Nr,{item:l,state:n,className:t,showSelectedIcon:r.selectionMode==="multiple"||r.selectionMode==="single"},l.key))})});bn.displayName="MenuContent";var Lr=rt.forwardRef(({defaultOpen:e,onOpenChange:t,isOpen:o,isDisabled:r,contentClassName:a,placement:n="bottom start",isNonModal:i,shouldFlip:s,shouldUpdatePosition:p,boundaryElement:l,crossOffset:c,offset:u,triggerLabel:m,renderTrigger:d=({buttonProps:v,ref:_})=>jsx(q,{...v,variant:"popover",ref:_}),portalContainer:f,...y},b)=>{let v=rt.useRef(null),_=ge(f),g=useMenuTriggerState({defaultOpen:e,isOpen:o,onOpenChange:t}),{menuTriggerProps:h,menuProps:R}=useMenuTrigger({isDisabled:r,type:"menu"},g,v),w=oe(),x=useMemo(()=>mergeProps(h,{isDisabled:r,isSelected:g.isOpen,className:"BaselineUI-Menu-Trigger",label:typeof m=="function"?m(g.isOpen):m}),[h,r,g.isOpen,m]);return useEffect(()=>{!m&&!d&&console.warn("The `triggerLabel` prop is required when no `renderTrigger` or `children` is provided.");},[d,m]),jsxs(Fragment,{children:[d({buttonProps:x,ref:v}),jsx(ye,{triggerRef:v,state:g,placement:n,isNonModal:i,shouldFlip:s,shouldUpdatePosition:p,boundaryElement:l,crossOffset:c,offset:u||2,className:classNames(Ke,"BaselineUI-Menu-Popover"),portalContainer:_,children:jsx(bn,{className:a,...R,...y,ref:b,autoFocus:g.focusStrategy||"first",children:w})})]})});Lr.displayName="Menu";var Mr=z({defaultClassName:"_13f0naj0",variantClassNames:{variant:{default:"_13f0naj1",inline:"_13f0naj2"},isHovered:{true:"_13f0naj3"},isFocusVisible:{true:"_13f0naj4"},isDisabled:{true:"_13f0naj5"},size:{sm:"_13f0naj6",md:"_13f0naj7",lg:"_13f0naj8"},type:{body:"_13f0naj9",label:"_13f0naja"},isActive:{true:"_13f0najb"}},defaultVariants:{},compoundVariants:[[{isActive:!0,isDisabled:!1},"_13f0najc"],[{type:"body",size:"sm"},"_13f0najd"],[{type:"body",size:"md"},"_13f0naje"],[{type:"body",size:"lg"},"_13f0najf"],[{type:"label",size:"sm"},"_13f0najg"],[{type:"label",size:"md"},"_13f0najh"],[{type:"label",size:"lg"},"_13f0naji"]]});var _p=rt.forwardRef(({className:e,style:t,children:o,variant:r="default",size:a="md",elementType:n="a",type:i="body","data-block-id":s,"data-block-class":p,title:l,role:c,...u},m)=>{let d=rt.useRef(null),{linkProps:f,isPressed:y}=useLink({...u,elementType:u.onPress?"span":n},d),{isFocusVisible:b,isFocused:v,focusProps:_}=useFocusRing(),{hoverProps:g,isHovered:h}=useHover({isDisabled:u.isDisabled}),R=n,w=filterTruthyValues({"data-block-id":s,"data-block-class":p,"data-disabled":u.isDisabled,"data-focused":v,"data-pressed":y,"data-focus-visible":b,"data-hovered":h,role:c,title:l});return jsx(R,{...mergeProps(f,_,g,w),className:classNames(Mr({variant:r,isFocusVisible:b,isHovered:h,isDisabled:u.isDisabled,size:a,isActive:y,type:i}),"BaselineUI-Link",e),ref:M(d,m),style:t,children:o})});_p.displayName="Link";function zp({isDisabled:e,onValueChange:t,onChange:o,name:r,"aria-describedby":a,"aria-label":n,accept:i,multiple:s}){let p=useId(),l=useId(),c=useId();return {inputProps:{type:"file",id:l,disabled:!!e,"aria-labelledby":n?void 0:p,"aria-describedby":a||c,"aria-label":n,onChange:m=>{let d=[...m.target.files||[]];t?.(d),o?.(m);},name:r,accept:i,multiple:s},labelProps:{htmlFor:l,id:p},descriptionProps:{id:c}}}async function _n({items:e}){let t=e.filter(o=>o.kind==="file").map(async o=>(invariant(o.kind==="file"),o.getFile()));return await Promise.all(t)}var hp=z({defaultClassName:"_180w5ed0",variantClassNames:{variant:{default:"_180w5ed1",inline:"_180w5ed2"},hoveredOrFocusedOrActive:{true:"_180w5ed3"},disabled:{true:"_180w5ed4"}},defaultVariants:{},compoundVariants:[[{variant:"inline",hoveredOrFocusedOrActive:!0},"_180w5ed5"],[{variant:"default",hoveredOrFocusedOrActive:!0},"_180w5ed6"],[{variant:"default",disabled:!0},"_180w5ed7"],[{variant:"inline",disabled:!0},"_180w5ed8"]]}),xp=z({defaultClassName:"_180w5ede",variantClassNames:{disabled:{true:"_180w5edf"}},defaultVariants:{},compoundVariants:[]}),Cp=z({defaultClassName:"_180w5ed9",variantClassNames:{disabled:{true:"_180w5eda"}},defaultVariants:{},compoundVariants:[]}),Pp=z({defaultClassName:"_180w5edb",variantClassNames:{disabled:{true:"_180w5edc"},hovered:{true:"_180w5edd"}},defaultVariants:{},compoundVariants:[]});var Rp=rt.forwardRef(({className:e,label:t,description:o,icon:r,variant:a="default",...n},i)=>{let s=rt.useRef(null),{inputProps:p,descriptionProps:l,labelProps:c}=zp(n),{dropProps:u}=useDrop({ref:s,onDrop:async({items:b})=>{let v=b.filter(g=>g.kind==="file").map(async g=>(invariant(g.kind==="file"),g.getFile())),_=await Promise.all(v);n.onValueChange?.(_);}}),{focusProps:m,isFocusVisible:d}=useFocusRing(),{hoverProps:f,isHovered:y}=useHover({isDisabled:n.isDisabled});return jsxs("label",{...mergeProps(u,f,c),className:classNames(hp({variant:a,disabled:n.isDisabled,hoveredOrFocusedOrActive:y||d}),e),ref:M(i,s),children:[jsx(VisuallyHidden,{children:jsx("input",{...mergeProps(m,p)})}),r?jsx(r,{size:20,className:Cp({disabled:n.isDisabled})}):null,jsxs("div",{children:[jsx("div",{className:Pp({disabled:n.isDisabled,hovered:y}),children:t}),o?jsx("div",{...l,className:xp({disabled:n.isDisabled}),children:o}):null]})]})});Rp.displayName="FileUpload";var Sp="_12vfhl40 z9nup81",Tp="_12vfhl41 z9nup82",Np=z({defaultClassName:"_12vfhl48",variantClassNames:{variant:{success:"_12vfhl49",error:"_12vfhl4a",active:"_12vfhl4b"}},defaultVariants:{},compoundVariants:[]}),Lp="_12vfhl42",Mp="_12vfhl47",Ep="_12vfhl46 z9nup82",Dp="_12vfhl45",Bp=z({defaultClassName:"_12vfhl43 _12vfhl42",variantClassNames:{hasLabel:{false:"_12vfhl44"}},defaultVariants:{},compoundVariants:[]});var Hp=rt.forwardRef(({className:e,style:t,variant:o="active",showValue:r,description:a,errorMessage:n,"data-block-id":i,"data-block-class":s,...p},l)=>{let c=useId(),{labelProps:u,progressBarProps:m}=useProgressBar({...p,"aria-describedby":a?c:p["aria-describedby"]}),{minValue:d=0,maxValue:f=100,value:y=0,label:b}=p,v=(y-d)/(f-d),_=`${Math.round(v*100)}%`,g=jsx("output",{className:Bp({hasLabel:!!b}),children:m["aria-valuetext"]}),h=o==="error"?n:a;return jsxs("div",{...m,style:t,className:classNames(Sp,"BaselineUI-ProgressBar",e),"data-block-id":i,"data-block-class":s,ref:l,children:[b?jsxs("div",{className:Tp,children:[jsx("label",{...u,className:Lp,children:b}),r?g:null]}):null,jsxs("div",{className:Dp,children:[jsxs("div",{className:Ep,children:[jsx("div",{className:Mp,children:jsx("div",{style:{width:_},className:Np({variant:o})})}),!b&&r?g:null]}),h?jsx("div",{className:xt({hasError:o==="error"}),id:c,children:h}):null]})]})});Hp.displayName="ProgressBar";function Ft({isReadOnly:e,validationState:t}){return e?ReadOnlyIcon:t==="error"?ErrorFilledIcon:t==="warning"?WarningFilledIcon:null}var Ge=rt.forwardRef(({className:e,validationState:t,variant:o="primary",style:r,labelPosition:a="top",inputStyle:n,inputClassName:i,"data-block-id":s,"data-block-class":p,...l},c)=>{let u=rt.useRef(null),{inputProps:m,labelProps:d,descriptionProps:f,errorMessageProps:y,validationErrors:b}=useTextField({...l,validationState:t?t==="error"?"invalid":"valid":void 0},u),v=l.errorMessage||b.join(" "),_=ke({...l,errorMessage:v,descriptionProps:f,errorMessageProps:y,labelPosition:a});v&&(t="error");let{hoverProps:g,isHovered:h}=useHover({isDisabled:l.isDisabled}),{isFocused:R,focusProps:w,isFocusVisible:x}=useFocusRing(),C=Ft({isReadOnly:l.isReadOnly,validationState:t??"valid"}),T=filterTruthyValues({"data-readonly":l.isReadOnly,"data-disabled":l.isDisabled,"data-validation-state":t,"data-focused":R,"data-focus-visible":x});return jsxs("div",{className:classNames(Ae({labelPosition:a}),"BaselineUI-TextInput",e),"data-block-id":s,"data-block-class":p,style:r,ref:c,children:[l.label||a==="start"&&_?jsxs("div",{className:je({labelPosition:a,hasMessage:!!_}),children:[jsx("label",{...d,className:Oe,children:l.label}),a==="start"&&_]}):null,jsxs("div",{className:classNames({[Rt]:l.isDisabled}),children:[jsxs("div",{...g,className:Pt({validationState:t??"valid",isHovered:h,isFocused:R,variant:o,isReadOnly:!!l.isReadOnly,isDisabled:!!l.isDisabled}),children:[jsx("input",{...mergeProps(m,w,T),className:classNames(gr({isDisabled:l.isDisabled,labelPosition:a}),"BaselineUI-TextInput-Input",i),style:n,ref:u}),C?jsx(C,{className:Ct({validationState:t??"valid",isReadOnly:l.isReadOnly}),size:16}):null]}),a==="top"&&_]})]})});Ge.displayName="TextInput";var Vt=({value:e,...t})=>{let o=useNumberFormatter(t);return jsx(Fragment,{children:o.format(e)})};Vt.displayName="NumberFormat";var Vp="_1yep5z6ik _1yep5z6il _1yep5z6im",Op=z({defaultClassName:"_9b1tml0",variantClassNames:{isSelected:{true:"_9b1tml1",false:"_9b1tml2"},isDisabled:{true:"z9nup83"},isHovered:{true:"_9b1tml4"},isFocusVisible:{true:"_9b1tml5"},isReadOnly:{true:"_9b1tml6"}},defaultVariants:{},compoundVariants:[[{isSelected:!0,isFocusVisible:!0,isReadOnly:!1},"_9b1tml7"],[{isSelected:!0,isHovered:!0,isDisabled:!1,isReadOnly:!1},"_9b1tml8"],[{isSelected:!1,isHovered:!0,isDisabled:!1,isReadOnly:!1},"_9b1tml9"],[{isSelected:!0,isDisabled:!0},"_9b1tmla"],[{isSelected:!0,isReadOnly:!0},"_9b1tmlb"]]}),jp=z({defaultClassName:"_9b1tmlf",variantClassNames:{isSelected:{true:"_9b1tmlg"},size:{sm:"_9b1tmlh",md:"_9b1tmli"},isDisabled:{true:"_9b1tmlj"},isReadOnly:{true:"_9b1tmlk"}},defaultVariants:{},compoundVariants:[[{isSelected:!0,isDisabled:!1,isReadOnly:!1},"_9b1tmll"],[{isSelected:!0,isDisabled:!0},"_9b1tmlm"],[{isSelected:!1,isDisabled:!0},"_9b1tmln"]]}),Ap=z({defaultClassName:"_9b1tmlc",variantClassNames:{isDisabled:{true:"_9b1tmld"},isReadOnly:{true:"_9b1tmle"}},defaultVariants:{},compoundVariants:[]});var qp=rt.forwardRef(({className:e,count:t,style:o,size:r="md",icon:a,"data-block-id":n,"data-block-class":i,...s},p)=>{let l={isRequired:!1},c=a||(r==="md"?CheckmarkIcon$2:CheckmarkIcon$3);!s["aria-label"]&&!s["aria-labelledby"]&&console.warn("You must provide either an `aria-label` or `aria-labelledby` prop to the `Reaction` component.");let u=rt.useRef(null),m=useToggleState({...s,...l}),{inputProps:d,isPressed:f,isDisabled:y,isReadOnly:b,isSelected:v}=useSwitch({...s,...l},m,u),{focusProps:_,isFocused:g,isFocusVisible:h}=useFocusRing(),{hoverProps:R,isHovered:w}=useHover({}),x=filterTruthyValues({"data-block-id":n,"data-block-class":i,"data-focused":g,"data-focus-visible":h,"data-disabled":y,"data-hovered":w,"data-pressed":f,"data-selected":v});return jsxs("label",{ref:p,style:o,className:classNames(Vp,"BaselineUI-Reaction",e),...x,children:[jsx(VisuallyHidden,{children:jsx("input",{...d,..._,ref:u})}),jsxs("div",{...R,className:Op({isSelected:v,isFocusVisible:h,isHovered:w,isReadOnly:b,isDisabled:y}),children:[jsx("div",{className:Ap({isDisabled:y,isReadOnly:b}),children:jsx(c,{size:r==="md"?20:16})}),jsx("div",{className:jp({isSelected:m.isSelected,isDisabled:y,isReadOnly:b,size:r}),children:jsx(Vt,{value:t})})]})]})});qp.displayName="Reaction";var Kp="_1azy5686",Gp="_1azy5685",Wp="var(--_1azy5680)",Xp="_1azy5688",Yp="_1azy5689",Zp="_1azy5681 z9nup82",Qp="_1azy5682";var Jp="_1azy5687";var V6={sm:16,md:20},O6={sm:[CheckFilledIcon,ErrorAltFilledIcon],md:[CheckFilledIcon$1,ErrorAltFilledIcon$1]},jt=rt.forwardRef(({className:e,style:t,size:o="md",variant:r="active","data-block-id":a,"data-block-class":n,...i},s)=>{let{labelProps:p,progressBarProps:l}=useProgressBar({...i,isIndeterminate:!0}),c=V6[o],u=c/2-2,m=2*u*Math.PI,d=O6[o][r==="success"?0:1];return jsxs("div",{className:classNames(Zp,"BaselineUI-ProgressSpinner",e),ref:s,style:{...assignInlineVars({[Wp]:`${m}px`}),...t},"data-block-id":a,"data-block-class":n,children:[jsxs("div",{...l,className:Qp,children:[(r==="active"||r==="inactive")&&jsxs("svg",{height:c,width:c,viewBox:`0 0 ${c} ${c}`,children:[jsx("circle",{role:"presentation",className:Kp,cx:c/2,cy:c/2,r:u}),r==="active"&&jsx("circle",{role:"presentation",className:Gp,cx:c/2,cy:c/2,r:u})]}),r==="success"&&jsx(d,{className:Jp,size:c}),r==="error"&&jsx(d,{className:Xp,size:c})]}),i.label?jsx("span",{...p,className:Yp,children:i.label}):null]})});jt.displayName="ProgressSpinner";var Br=z({defaultClassName:"_5uw3kp0 oom8bs0 z9nup82",variantClassNames:{isHovered:{true:"_5uw3kp1"},isFocusVisible:{true:"_5uw3kp2"},isDisabled:{true:"_5uw3kp3"},isSelected:{true:"_5uw3kp4"},size:{sm:"_5uw3kp5",md:"_5uw3kp6",lg:"_5uw3kp7"},variant:{primary:"_5uw3kp8",toolbar:"_5uw3kp9"}},defaultVariants:{},compoundVariants:[[{isSelected:!0,isFocusVisible:!0},"_5uw3kpa"],[{isSelected:!0,isDisabled:!0},"_5uw3kpb"],[{variant:"primary",size:"lg"},"_5uw3kpc"]]}),ec=z({defaultClassName:"_5uw3kpd _1yep5z6f5",variantClassNames:{isDisabled:{true:"_1yep5z610z"},isSelected:{true:"_1yep5z6111"}},defaultVariants:{},compoundVariants:[]});var K6={sm:16,md:20,lg:24},Hr=rt.forwardRef(({className:e,style:t,iconStart:o,size:r="md",elementType:a="button",variant:n="toolbar",...i},s)=>{let p=useToggleState(i),{buttonProps:l,isPressed:c,ref:u,isFocusVisible:m,isFocused:d,isHovered:f,uiStateOptions:y}=yr(i,p),b=filterTruthyValues({"data-block-id":i["data-block-id"],"data-block-class":i["data-block-class"],"data-focused":d,"data-focus-visible":m,"data-disabled":i.isDisabled,"data-hovered":f,"data-pressed":c,"data-selected":p.isSelected});return jsxs(a,{...mergeProps(l,b),className:classNames(Br({isHovered:f,isFocusVisible:m,isSelected:p.isSelected,size:r,isDisabled:i.isDisabled,variant:n}),"BaselineUI-ToggleButton",typeof e=="function"?e(y):e),style:typeof t=="function"?t(y):t,ref:M(u,s),children:[o?jsx(o,{size:K6[r],className:ec({isDisabled:i.isDisabled,isSelected:p.isSelected})}):null,i.label]})});Hr.displayName="ToggleButton";var Fr=z({defaultClassName:"_16vugd0f",variantClassNames:{isDisabled:{true:"_16vugd0g"}},defaultVariants:{},compoundVariants:[]}),tc=z({defaultClassName:"_16vugd02 _1yep5z6ih _1yep5z6ii _1yep5z6ij _1yep5z6j8 _1yep5z6j9 _1yep5z6ja",variantClassNames:{labelPosition:{end:"_1yep5z614i _1yep5z614j _1yep5z614k _1yep5z6va _1yep5z6vb _1yep5z6vc",start:"_1yep5z614o _1yep5z614p _1yep5z614q _1yep5z6160 _1yep5z6161 _1yep5z6162"}},defaultVariants:{},compoundVariants:[]}),oc=z({defaultClassName:"_16vugd06",variantClassNames:{isIndeterminate:{true:"_16vugd05"},isSelected:{true:"_16vugd05"},isFocusVisible:{true:"_16vugd09"},isHovered:{true:"_16vugd0a"},isDisabled:{true:"_16vugd0b"},isReadOnly:{true:"_16vugd0c"},hasError:{true:"_16vugd0d"}},defaultVariants:{},compoundVariants:[[{isSelected:!0,isDisabled:!0},"_16vugd0e"]]});var nc=rt.forwardRef(({className:e,style:t,label:o,labelPosition:r="end","data-block-id":a,"data-block-class":n,...i},s)=>{let p=rt.useRef(null),l=useToggleState(i),{isFocusVisible:c,isFocused:u,focusProps:m}=useFocusRing(),{inputProps:d,isPressed:f,isDisabled:y,isSelected:b,isReadOnly:v}=useCheckbox({...i,children:o},l,p),{hoverProps:_,isHovered:g}=useHover({isDisabled:y}),h=filterTruthyValues({"data-disabled":y,"data-readonly":v,"data-hovered":g,"data-selected":b,"data-pressed":f,"data-indeterminate":i.isIndeterminate,"data-invalid":i.isInvalid,"data-focus-visible":c,"data-focused":u,"data-block-id":a,"data-block-class":n});return jsxs("label",{...h,className:classNames(tc({labelPosition:r}),"BaselineUI-Checkbox",e),style:t,ref:s,children:[jsx(VisuallyHidden,{children:jsx("input",{...mergeProps(d,m),ref:p})}),jsxs("div",{..._,className:oc({isSelected:b&&!i.isIndeterminate,isIndeterminate:i.isIndeterminate,isFocusVisible:c,isDisabled:y,isReadOnly:v,hasError:i.isInvalid,isHovered:g}),children:[b&&!i.isIndeterminate?jsx(CheckmarkIcon$1,{size:12}):null,i.isIndeterminate?jsx(MinusIcon$1,{size:12}):null]}),o?jsx("span",{className:Fr({isDisabled:y}),children:o}):null]})});nc.displayName="Checkbox";var ic={ar:{goToPage:"\u0627\u0646\u062A\u0642\u0627\u0644 \u0625\u0644\u0649 \u0635\u0641\u062D\u0629",nextPage:"\u0627\u0644\u0635\u0641\u062D\u0629 \u0627\u0644\u062A\u0627\u0644\u064A\u0629",pageXofY:"\u0635\u0641\u062D\u0629 {arg0} \u0645\u0646 {arg1}",prevPage:"\u0627\u0644\u0635\u0641\u062D\u0629 \u0627\u0644\u0633\u0627\u0628\u0642\u0629"},cs:{goToPage:"P\u0159ej\xEDt na stranu",nextPage:"Dal\u0161\xED str\xE1nka",pageXofY:"Strana {arg0} z {arg1}",prevPage:"P\u0159edchoz\xED strana"},cy:{goToPage:"Mynd i Dudalen",nextPage:"Tudalen Nesaf",pageXofY:"Tudalen {arg0} o {arg1}",prevPage:"Tudalen Blaenorol"},da:{goToPage:"G\xE5 til side",nextPage:"N\xE6ste side",pageXofY:"Side {arg0} af {arg1}",prevPage:"Forrige side"},de:{goToPage:"Zu Seite wechseln",nextPage:"N\xE4chste Seite",pageXofY:"Seite {arg0} von {arg1}",prevPage:"Vorherige Seite"},el:{goToPage:"\u039C\u03B5\u03C4\u03AC\u03B2\u03B1\u03C3\u03B7 \u03C3\u03C4\u03B7 \u03C3\u03B5\u03BB\u03AF\u03B4\u03B1",nextPage:"\u0395\u03C0\u03CC\u03BC\u03B5\u03BD\u03B7 \u03C3\u03B5\u03BB\u03AF\u03B4\u03B1",pageXofY:"\u03A3\u03B5\u03BB\u03AF\u03B4\u03B1 {arg0} \u03B1\u03C0\u03CC {arg1}",prevPage:"\u03A0\u03C1\u03BF\u03B7\u03B3\u03BF\u03CD\u03BC\u03B5\u03BD\u03B7 \u03C3\u03B5\u03BB\u03AF\u03B4\u03B1"},"en-GB":{goToPage:"Go to Page",nextPage:"Next Page",pageXofY:"Page {arg0} of {arg1}",prevPage:"Previous Page"},en:{goToPage:"Go to Page",nextPage:"Next Page",pageXofY:"Page {arg0} of {arg1}",prevPage:"Previous Page"},es:{goToPage:"Ir a la p\xE1gina",nextPage:"P\xE1gina siguiente",pageXofY:"P\xE1gina {arg0} de {arg1}",prevPage:"P\xE1gina anterior"},fi:{goToPage:"Mene sivulle",nextPage:"Seuraava sivu",pageXofY:"Sivu {arg0} / {arg1}",prevPage:"Edellinen sivu"},"fr-CA":{goToPage:"Aller \xE0 la page",nextPage:"Page suivante",pageXofY:"Page {arg0} sur {arg1}",prevPage:"Page pr\xE9c\xE9dente"},fr:{goToPage:"Aller \xE0 la page",nextPage:"Page suivante",pageXofY:"Page {arg0} sur {arg1}",prevPage:"Page pr\xE9c\xE9dente"},he:{goToPage:"\u05DE\u05E2\u05D1\u05E8 \u05DC\u05E2\u05DE\u05D5\u05D3",nextPage:"\u05D4\u05E2\u05DE\u05D5\u05D3 \u05D4\u05D1\u05D0",pageXofY:"\u05E2\u05DE\u05D5\u05D3 {arg0} \u05DE\u05EA\u05D5\u05DA {arg1}",prevPage:"\u05D4\u05E2\u05DE\u05D5\u05D3 \u05D4\u05E7\u05D5\u05D3\u05DD"},hr:{goToPage:"Idi na stranicu",nextPage:"Slijede\u0107a stranica",pageXofY:"Stranica {arg0} od {arg1}",prevPage:"Prethodna stranica"},id:{goToPage:"Buka halaman",nextPage:"Halaman Berikutnya",pageXofY:"Halaman {arg0} dari {arg1}",prevPage:"Halaman Sebelumnya"},it:{goToPage:"Vai a pagina",nextPage:"Pagina successiva",pageXofY:"Pagina {arg0} di {arg1}",prevPage:"Pagina precedente"},ja:{goToPage:"\u30DA\u30FC\u30B8\u306B\u79FB\u52D5",nextPage:"\u6B21\u306E\u30DA\u30FC\u30B8",pageXofY:"\u30DA\u30FC\u30B8 {arg0}/{arg1}",prevPage:"\u524D\u306E\u30DA\u30FC\u30B8"},ko:{goToPage:"\uD398\uC774\uC9C0\uB85C \uC774\uB3D9",nextPage:"\uB2E4\uC74C \uD398\uC774\uC9C0",pageXofY:"{arg0}/{arg1} \uD398\uC774\uC9C0",prevPage:"\uC774\uC804 \uD398\uC774\uC9C0"},ms:{goToPage:"Pergi ke Halaman",nextPage:"Halaman Seterusnya",pageXofY:"Halaman {arg0} daripada {arg1}",prevPage:"Halaman Sebelumnya"},"nb-NO":{goToPage:"G\xE5 til side",nextPage:"Neste side",pageXofY:"Side {arg0} av {arg1}",prevPage:"Forrige side"},nl:{goToPage:"Ga naar pagina",nextPage:"Volgende pagina",pageXofY:"Pagina {arg0} van {arg1}",prevPage:"Vorige pagina"},pl:{goToPage:"Przejd\u017A do strony",nextPage:"Nast\u0119pna strona",pageXofY:"Strona {arg0} z {arg1}",prevPage:"Poprzednia strona"},"pt-PT":{goToPage:"Ir para p\xE1gina",nextPage:"P\xE1gina seguinte",pageXofY:"P\xE1gina {arg0} de {arg1}",prevPage:"P\xE1gina anterior"},pt:{goToPage:"Ir \xE0 P\xE1gina",nextPage:"P\xE1gina Seguinte",pageXofY:"P\xE1gina {arg0} de {arg1}",prevPage:"P\xE1gina Anterior"},ru:{goToPage:"\u041F\u0435\u0440\u0435\u0439\u0442\u0438 \u043A \u0441\u0442\u0440\u0430\u043D\u0438\u0446\u0435",nextPage:"\u0421\u043B\u0435\u0434\u0443\u044E\u0449\u0430\u044F \u0441\u0442\u0440\u0430\u043D\u0438\u0446\u0430",pageXofY:"\u0421\u0442\u0440\u0430\u043D\u0438\u0446\u0430 {arg0} \u0438\u0437 {arg1}",prevPage:"\u041F\u0440\u0435\u0434\u044B\u0434\u0443\u0449\u0430\u044F \u0441\u0442\u0440\u0430\u043D\u0438\u0446\u0430"},sk:{goToPage:"\xCDs\u0165 na stranu",nextPage:"Dal\u0161ia strana",pageXofY:"Strana {arg0} z {arg1}",prevPage:"Predch\xE1dzaj\xFAca strana"},sl:{goToPage:"Pojdi na stran",nextPage:"Naslednja stran",pageXofY:"Stran {arg0} od {arg1}",prevPage:"Prej\u0161nja stran"},sv:{goToPage:"G\xE5 till sida",nextPage:"N\xE4sta sida",pageXofY:"Sida {arg0} av {arg1}",prevPage:"F\xF6reg\xE5ende sida"},th:{goToPage:"\u0E44\u0E1B\u0E17\u0E35\u0E48\u0E2B\u0E19\u0E49\u0E32",nextPage:"\u0E2B\u0E19\u0E49\u0E32\u0E16\u0E31\u0E14\u0E44\u0E1B",pageXofY:"\u0E2B\u0E19\u0E49\u0E32 {arg0} \u0E08\u0E32\u0E01 {arg1}",prevPage:"\u0E2B\u0E19\u0E49\u0E32\u0E01\u0E48\u0E2D\u0E19\u0E2B\u0E19\u0E49\u0E32"},tr:{goToPage:"Sayfaya Git",nextPage:"Sonraki Sayfa",pageXofY:"Sayfa {arg0}/{arg1}",prevPage:"\xD6nceki Sayfa"},uk:{goToPage:"\u041F\u0435\u0440\u0435\u0439\u0442\u0438 \u043D\u0430 \u0441\u0442\u043E\u0440\u0456\u043D\u043A\u0443",nextPage:"\u041D\u0430\u0441\u0442\u0443\u043F\u043D\u0430 \u0441\u0442\u043E\u0440\u0456\u043D\u043A\u0430",pageXofY:"\u0421\u0442\u043E\u0440\u0456\u043D\u043A\u0430 {arg0} \u0437 {arg1}",prevPage:"\u041F\u043E\u043F\u0435\u0440\u0435\u0434\u043D\u044F \u0441\u0442\u043E\u0440\u0456\u043D\u043A\u0430"},"zh-Hans":{goToPage:"\u524D\u5F80\u9875\u9762",nextPage:"\u4E0B\u4E00\u9875",pageXofY:"\u7B2C {arg0}/{arg1} \u9875",prevPage:"\u4E0A\u4E00\u9875"},"zh-Hant":{goToPage:"\u5230\u6B64\u9801",nextPage:"\u4E0B\u4E00\u9801",pageXofY:"\u7B2C{arg0}\u9801\uFF0C\u5171{arg1}\u9801",prevPage:"\u4E0A\u4E00\u9801"}};var sc=z({defaultClassName:"_1nsi9h17",variantClassNames:{isFocused:{true:"_1nsi9h18"},variant:{pinned:"_1nsi9h19",floating:"_1nsi9h1a"},size:{xs:"_1nsi9h1b",sm:"_1nsi9h1c",md:"_1nsi9h1d",lg:"_1nsi9h1e"}},defaultVariants:{},compoundVariants:[]}),lc="_1nsi9h1f _1yep5z6ln _1yep5z6lf _1yep5z6eu",pc=z({defaultClassName:"_1yep5z6al _1yep5z6am _1yep5z6an _1yep5z6b9 _1yep5z6ba _1yep5z6bb _1yep5z6bx _1yep5z6by _1yep5z6bz _1yep5z6cl _1yep5z6cm _1yep5z6cn _1yep5z6ik _1yep5z6il _1yep5z6im _1yep5z6iq _1yep5z6ir _1yep5z6is _1yep5z6j8 _1yep5z6j9 _1yep5z6ja _1yep5z6g1 _1yep5z6e1",variantClassNames:{size:{xs:"_1nsi9h11 _1yep5z6wa _1yep5z6wb _1yep5z6wc _1yep5z6wy _1yep5z6wz _1yep5z6x0 _1yep5z6xm _1yep5z6xn _1yep5z6xo _1yep5z6ya _1yep5z6yb _1yep5z6yc _1yep5z6zn",sm:"_1nsi9h12 _1yep5z6zq",md:"_1nsi9h13",lg:"_1nsi9h14"},variant:{floating:"_1yep5z6yz _1yep5z617i _1yep5z617g _1yep5z612q",pinned:"_1yep5z6174"}},defaultVariants:{},compoundVariants:[]}),cc=z({defaultClassName:"_1nsi9h1g _1yep5z6ev",variantClassNames:{isDisabled:{true:"_1yep5z610q"}},defaultVariants:{},compoundVariants:[]});var h5={style:"decimal"},x5={xs:[CaretLeftIcon,CaretRightIcon],sm:[CaretLeftIcon$1,CaretRightIcon$1],md:[CaretLeftIcon$2,CaretRightIcon$2],lg:[CaretLeftIcon$3,CaretRightIcon$3]},yc=rt.forwardRef(({className:e,style:t,minValue:o=1,defaultValue:r=1,incrementAriaLabel:a,decrementAriaLabel:n,"aria-label":i,size:s="md",variant:p="floating",hideActions:l,isDisabled:c,...u},m)=>{let{locale:d}=useLocale(),f=H(ic),y={...u,formatOptions:h5,minValue:o,incrementAriaLabel:a||f.formatMessage("nextPage"),decrementAriaLabel:n||f.formatMessage("prevPage"),defaultValue:r,"aria-label":i||f.formatMessage("goToPage")},b=rt.useRef(null),v=useNumberFieldState({...y,locale:d}),{inputProps:_,decrementButtonProps:g,incrementButtonProps:h,groupProps:R}=useNumberField({...y,onKeyDown:B=>{B.key==="Enter"&&b.current?.blur(),u.onKeyDown?.(B);},isDisabled:c},v,b),{hoverProps:w,isHovered:x}=useHover({}),{focusProps:C,isFocused:T,isFocusVisible:N}=useFocusRing(),k=p==="floating",[S,P]=x5[s],I=filterTruthyValues({"data-focus-visible":N,"data-focused":T,"data-hovered":x,"data-block-id":u["data-block-id"],"data-block-class":u["data-block-class"]}),F=useInteractionModality()==="keyboard";return jsxs("div",{...mergeProps(R,w,I),className:classNames(pc({size:s,variant:p}),"BaselineUI-Pagination",e),style:t,ref:m,children:[l?null:jsxs(Fragment,{children:[jsx(E,{icon:S,...g,elementType:"div",size:s,style:{height:"100%",...k&&{borderRadius:0}},className:"BaselineUI-Pagination-DecrementButton",UNSAFE_NON_INTERACTIVE:F,isDisabled:c||g.isDisabled}),p==="floating"&&jsx(O,{orientation:"vertical"})]}),jsxs("div",{className:sc({isFocused:T,variant:p,size:s}),"aria-label":f.formatMessage("pageXofY",{arg0:_.value,arg1:v.maxValue}),children:[jsx("input",{...mergeProps(_,C),ref:b,className:classNames("BaselineUI-Pagination-Input",lc),style:{width:`${_.value?.toString().length||1}ch`}}),jsxs("span",{className:cc({isDisabled:c}),children:["/ ",jsx(Vt,{value:v.maxValue})]})]}),l?null:jsxs(Fragment,{children:[p==="floating"&&jsx(O,{orientation:"vertical"}),jsx(E,{icon:P,...h,elementType:"div",size:s,style:{height:"100%",...k&&{borderRadius:0}},className:"BaselineUI-Pagination-IncrementButton",UNSAFE_NON_INTERACTIVE:F,isDisabled:c||h.isDisabled})]})]})});yc.displayName="Pagination";var bc=({date:e,...t})=>{let o=useDateFormatter(t);return jsx(Fragment,{children:o.format(e)})};bc.displayName="DateFormat";var wo=z({defaultClassName:"_1f789qjr",variantClassNames:{variant:{neutral:"_1yep5z610x",red:"_1yep5z6107",green:"_1yep5z610b",blue:"_1yep5z610j","high-contrast":"_1yep5z6110"},isDisabled:{true:"_1yep5z61mr"},isSelected:{true:"_1yep5z6111"}},defaultVariants:{},compoundVariants:[]}),Vr=z({defaultClassName:"_1f789qj1",variantClassNames:{isFocusVisible:{true:"_1f789qj2"},variant:{neutral:"_1f789qj3",red:"_1f789qj4",green:"_1f789qj5",blue:"_1f789qj6","high-contrast":"_1f789qj7"},isDisabled:{true:"_1f789qj8"},allowsRemoving:{true:"_1f789qj9"},isSelected:{true:"_1f789qja"},allowsSelection:{true:"_1f789qjb"},isHovered:{true:"_1f789qjc"}},defaultVariants:{},compoundVariants:[[{allowsSelection:!0,isHovered:!0,variant:"neutral"},"_1f789qjd"],[{allowsSelection:!0,isHovered:!0,variant:"red"},"_1f789qje"],[{allowsSelection:!0,isHovered:!0,variant:"blue"},"_1f789qjf"],[{allowsSelection:!0,isHovered:!0,variant:"green"},"_1f789qjg"],[{allowsSelection:!0,isHovered:!0,variant:"high-contrast"},"_1f789qjh"],[{allowsSelection:!0,isSelected:!0,isHovered:!0},"_1f789qji"]]}),gc="_1f789qjz",vc="_1f789qj0",_c=z({defaultClassName:"_1f789qj10",variantClassNames:{variant:{neutral:"_1f789qj11",red:"_1f789qj12",green:"_1f789qj13",blue:"_1f789qj14","high-contrast":"_1f789qj15"},isHovered:{true:"_1f789qj16"}},defaultVariants:{},compoundVariants:[[{isHovered:!0,variant:"neutral"},"_1f789qj17"],[{isHovered:!0,variant:"red"},"_1f789qj18"],[{isHovered:!0,variant:"blue"},"_1f789qj19"],[{isHovered:!0,variant:"green"},"_1f789qj1a"],[{isHovered:!0,variant:"high-contrast"},"_1f789qj1b"]]}),Or=z({defaultClassName:"_1f789qjj",variantClassNames:{variant:{neutral:"_1yep5z610m",red:"_1yep5z6107",green:"_1yep5z610b",blue:"_1yep5z610j","high-contrast":"_1yep5z610r"},isDisabled:{true:"_1yep5z61mi"},isSelected:{true:"_1yep5z610s"}},defaultVariants:{},compoundVariants:[]});var Cc=({item:e,state:t,variant:o="neutral"})=>{let r=rt.useRef(null),{focusProps:a,isFocusVisible:n}=useFocusRing({within:!0}),{rowProps:i,gridCellProps:s,removeButtonProps:p,allowsRemoving:l,isDisabled:c,isSelected:u,allowsSelection:m}=useTag({item:e},t,r),d=rt.useRef(null),{buttonProps:f}=useButton(p,d),{hoverProps:y,isHovered:b}=useHover({isDisabled:c}),{hoverProps:v,isHovered:_}=useHover({isDisabled:c}),g=e.value?.icon,h=e.value?.data?.variant??o;return jsx("div",{...mergeProps(i,a,v),ref:r,className:classNames(Vr({isFocusVisible:n,variant:h,isDisabled:c,allowsRemoving:l,isSelected:u,allowsSelection:m,isHovered:_}),Or({variant:h,isDisabled:c,isSelected:u}),"BaselineUI-Tag"),children:jsxs("div",{...s,className:gc,children:[u?jsx(CheckmarkIcon$3,{size:16,className:wo({variant:h,isDisabled:c,isSelected:u})}):null,!u&&g?jsx(g,{size:16,className:wo({variant:h,isDisabled:c,isSelected:u})}):null,e.rendered,l?jsx("button",{...mergeProps(f,y),className:_c({variant:h,isHovered:b}),children:jsx(XIcon$2,{})}):null]})})};var Ic=rt.forwardRef(({className:e,style:t,"data-block-id":o,"data-block-class":r,items:a,...n},i)=>{let s=useMemo(()=>a.map(m=>({...m,data:{variant:m.variant}})),[a]),p=oe(),l=rt.useRef(null),c=useListState({...n,items:s,children:p}),{gridProps:u}=useTagGroup(n,c,l);return jsx("div",{...u,className:classNames(vc,"BaselineUI-TagGroup",e),style:t,"data-block-id":o,"data-block-class":r,ref:M(i,l),children:[...c.collection].map(m=>jsx(Cc,{state:c,item:m,variant:n.variant},m.key))})});Ic.displayName="TagGroup";var wc="_1yep5z6lc",Rc=z({defaultClassName:"_1kvz17db _1yep5z6kz _1yep5z6l1",variantClassNames:{showActionsOnTriggerOnly:{true:"_1kvz17dc"},isTriggered:{true:"_1kvz17dd"}},defaultVariants:{},compoundVariants:[]}),Sc=z({defaultClassName:"_1kvz17d0 _1yep5z64u _1yep5z64v _1yep5z64w _1yep5z676 _1yep5z677 _1yep5z678 _1yep5z68c _1yep5z68d _1yep5z68e _1yep5z660 _1yep5z661 _1yep5z662 _1yep5z6kz _1yep5z6l0",variantClassNames:{isExpanded:{true:"_1kvz17d1"}},defaultVariants:{},compoundVariants:[]}),Tc="_1yep5z6ev _1yep5z6dy",Nc=z({defaultClassName:"_1kvz17d2 _1yep5z63o _1yep5z63p _1yep5z63q _1yep5z61f _1yep5z61g _1yep5z61h _1yep5z63 _1yep5z64 _1yep5z65 _1yep5z62f _1yep5z62g _1yep5z62h _1yep5z6ih _1yep5z6ii _1yep5z6ij _1yep5z6j8 _1yep5z6j9 _1yep5z6ja _1yep5z6k8 _1yep5z6k9 _1yep5z6ka _1yep5z6kz _1yep5z6l2",variantClassNames:{isFocusVisible:{true:"_1kvz17d3"},isHovered:{true:"_1yep5z6g2",false:"_1yep5z6g3"},isDisabled:{true:"z9nup83"}},defaultVariants:{},compoundVariants:[]}),Lc="_1kvz17da _1yep5z66 _1yep5z67 _1yep5z68 _1yep5z62i _1yep5z62j _1yep5z62k _1yep5z6dz",Mc=z({defaultClassName:"_1kvz17d7 _1yep5z6ih _1yep5z6ii _1yep5z6ij _1yep5z6j8 _1yep5z6j9 _1yep5z6ja",variantClassNames:{isDisabled:{true:"_1yep5z6ey",false:"_1yep5z6eu"}},defaultVariants:{},compoundVariants:[]});var Pn=rt.forwardRef(({children:e,className:t,style:o},r)=>{let{headers:a}=useContext(We),{disabledKeys:n}=useContext(We),{keyboardProps:i}=useKeyboard({onKeyDown:s=>{let p=Ve(s.target),l=[...a?.keys()||[]].findIndex(f=>a?.get(f)?.current===p?.activeElement),c=a?.get(l||0),u=a?.size||0,m=f=>{let y=a.get(f-1<0?u-1:f-1);n?.has(y?.current?.getAttribute("data-key")||"")?m(f-1):y?.current?.focus();},d=f=>{let y=a.get((f+1)%u);n?.has(y?.current?.getAttribute("data-key")||"")?d(f+1):y?.current?.focus();};if(c)switch(s.key){case"Home":{s.preventDefault(),d(-1);break}case"End":{s.preventDefault(),m(u);break}case"ArrowDown":{s.preventDefault(),d(l);break}case"ArrowUp":{s.preventDefault(),m(l);break}default:s.continuePropagation();}}});return jsx("div",{...i,style:o,className:classNames(wc,t),ref:r,children:rt.Children.map(e,(s,p)=>rt.cloneElement(s,{index:p}))})});Pn.displayName="AccordionBase";var We=rt.createContext({expandedKeys:new Set,setExpandedKeys:()=>{},disabledKeys:new Set,headers:new Map,expansionMode:"multiple"}),Bc=rt.forwardRef(({children:e,disabledKeys:t,defaultExpandedKeys:o=new Set,expandedKeys:r,expansionMode:a="multiple",onChange:n,className:i,style:s},p)=>{let[l,c]=rt.useState(o),u=rt.useRef(new Map).current,[m,d]=rt.useState(a);useEffect(()=>{d(m);},[m]),useEffect(()=>{n?.(l);},[l,n]);let f=useMemo(()=>({expandedKeys:r||l,setExpandedKeys:r?()=>{}:c,disabledKeys:t,headers:u,expansionMode:m}),[r,l,t,u,m]);return jsx(We.Provider,{value:f,children:jsx(FocusScope,{children:jsx(Pn,{className:i,style:s,ref:p,children:e})})})});Bc.displayName="Accordion";var In=rt.forwardRef(({title:e,actions:t,controlId:o,value:r,id:a,index:n,subLabel:i,showActionsOnTriggerOnly:s},p)=>{let l=rt.useRef(null),{expandedKeys:c,setExpandedKeys:u,expansionMode:m,disabledKeys:d,headers:f}=useContext(We),y=d?.has(r),b=useFocusManager();invariant(b);let{focusNext:v,focusPrevious:_}=b,{keyboardProps:g}=useKeyboard({onKeyDown:I=>{I.key==="ArrowRight"?v({wrap:!0}):I.key==="ArrowLeft"?_({wrap:!0}):I.continuePropagation();},isDisabled:y});useEffect(()=>{invariant(typeof n=="number","AccordionItem must have an index"),f?.set(n,l);},[n,f]);let h=()=>{u(I=>{let D=new Set(I);return D.has(r)?D.delete(r):(m==="single"&&D.clear(),D.add(r)),D});},{buttonProps:R}=useButton({"aria-expanded":c.has(r),"aria-controls":o,onPress:h,isDisabled:y},l),{pressProps:w}=usePress({onPress:h,isDisabled:y}),{focusProps:x,isFocusVisible:C}=useFocusRing(),{hoverProps:T,isHovered:N}=useHover({isDisabled:y}),{focusProps:k,isFocusVisible:S}=useFocusRing({within:!0}),P=c.has(r);return jsxs("h3",{...mergeProps(g,w,T,k),className:Nc({isFocusVisible:C,isHovered:N,isDisabled:y}),ref:p,children:[jsxs("div",{className:Mc({isDisabled:!!y}),children:[jsx(ChevronRightIcon,{className:Sc({isExpanded:P}),size:8}),jsx("button",{...mergeProps(R,x),id:a,"data-key":r,className:Lc,ref:l,children:e})]}),t?.length?jsx("div",{"data-testid":"action-buttons",className:Rc({showActionsOnTriggerOnly:s,isTriggered:S||N}),children:t.map((I,D)=>jsx(E,{variant:"secondary",size:"sm",excludeFromTabOrder:!0,isDisabled:y,...I},D))}):null,i?jsx("div",{className:Tc,children:i}):null]})});In.displayName="AccordionHeader";var Uc=rt.forwardRef(({title:e,actions:t,children:o,value:r,index:a,subLabel:n,style:i,className:s,showActionsOnTriggerOnly:p},l)=>{let c=useId(),u=useId(),{expandedKeys:m}=useContext(We),d=rt.useRef(null),f=m.has(r),y=It(),b=useReducedMotion(),v=useTransition(f?[r]:[],{from:!y&&!b&&{height:0,opacity:0},enter:()=>async _=>{await _({height:d.current?.scrollHeight,opacity:1});},leave:{height:0,opacity:0},keys:_=>_.toString()});return jsxs(Fragment,{children:[jsx(FocusScope,{children:jsx(In,{value:r,actions:t,id:u,title:e,controlId:c,ref:l,index:a,subLabel:n,showActionsOnTriggerOnly:p})}),v(_=>jsx(animated.div,{role:"region","aria-labelledby":u,id:c,style:{..._,overflow:"hidden"},children:jsx("div",{ref:d,className:s,style:i,children:o})}))]})});Uc.displayName="AccordionItem";var No=rt.forwardRef(({variant:e,isOpen:t,selectedIcon:o,validationState:r="valid",valueProps:a,label:n,className:i,style:s,"data-block-id":p,"data-block-class":l,...c},u)=>{let m=rt.useRef(null),{buttonProps:d,isPressed:f}=useButton({...c,isDisabled:c.isDisabled||c.isReadOnly},m),{hoverProps:y,isHovered:b}=useHover({isDisabled:c.isDisabled}),{focusProps:v,isFocused:_,isFocusVisible:g}=useFocusRing(),h=Ft({isReadOnly:c.isReadOnly,validationState:r});c.isReadOnly&&(d.disabled=!1);let R=filterTruthyValues({"data-disabled":c.isDisabled,"data-readonly":c.isReadOnly,"data-focused":_,"data-focus-visible":g,"data-hovered":b,"data-pressed":f,"data-open":t,"data-block-id":p,"data-block-class":l});return jsxs("button",{...mergeProps(d,y,v,R),ref:M(u,m),className:classNames(ql({isFocused:g,isDisabled:c.isDisabled}),Pt({variant:e,isHovered:b,isFocused:g,validationState:r,isDisabled:!!c.isDisabled,isReadOnly:c.isReadOnly}),i,"BaselineUI-Select-Button"),style:s,children:[jsxs("span",{className:Gl,children:[o?jsx(o,{size:24}):null,jsx("span",{...a,children:n})]}),h?jsx("span",{"aria-hidden":!0,className:classNames(Ct({validationState:r,isReadOnly:!!c.isReadOnly}),Kl),children:jsx(h,{size:16})}):null,jsx("span",{"aria-hidden":!0,children:jsx(CaretDownIcon,{size:8,className:Ul({isOpen:t})})})]})});No.displayName="SelectButton";var Ar=rt.createContext({state:null,popoverAnchorRef:null}),Sn=rt.forwardRef(({className:e,style:t,labelPosition:o="top",variant:r="primary","data-block-id":a,"data-block-class":n,optionStyle:i,optionClassName:s,placement:p="bottom start",triggerClassName:l,triggerStyle:c,state:u,renderTrigger:m=({buttonProps:y,selectedValue:b,valueProps:v,isOpen:_,ref:g})=>{let h=b&&"icon"in b&&b.icon;return jsx(No,{...y,className:l,style:c,isOpen:_,isReadOnly:d.isReadOnly,ref:g,variant:r,validationState:d.validationState,selectedIcon:h||void 0,label:b?"label"in b&&b?.label:d.placeholder,valueProps:v})},...d},f)=>{let{popoverAnchorRef:y}=useContext(Ar),b=rt.useRef(null),v=ge(d.portalContainer),{labelProps:_,triggerProps:g,valueProps:h,menuProps:R,descriptionProps:w,errorMessageProps:x}=useSelect({...d,validationState:d.validationState==="error"?"invalid":"valid"},u,b),C=ke({...d,descriptionProps:w,errorMessageProps:x,labelPosition:o}),T=u.selectedItem?.value??null;return jsxs(at.Provider,{value:u,children:[jsxs("div",{style:t,className:classNames(Ae({labelPosition:o}),"BaselineUI-Select",e),"data-block-id":a,"data-block-class":n,ref:f,children:[d.label||C?jsxs("div",{className:je({labelPosition:o,hasMessage:!!C}),children:[d.label?jsx("div",{..._,className:classNames(Oe,"BaselineUI-Select-Label"),children:d.label}):null,o==="start"&&C]}):null,jsx(HiddenSelect,{state:u,triggerRef:b,isDisabled:d.isDisabled,label:d.label,name:d.name}),m({buttonProps:g,selectedValue:T,valueProps:h,isOpen:u.isOpen,ref:b}),o==="top"&&C]}),u?jsx(ye,{placement:p,portalContainer:v,offset:d.offset||2,state:u,triggerRef:y||b,style:t,className:classNames(Ke,"BaselineUI-Select-Popover"),...d,children:jsx(le,{...R,label:d.label,items:d.items,showSelectedIcon:d.showSelectedIcon,className:Tr,optionStyle:i,optionClassName:s})}):null]})});Sn.displayName="SelectCore";var Xc=rt.forwardRef((e,t)=>{let o=oe(),r=useSelectState({...e,validationState:e.validationState==="error"?"invalid":"valid",children:o});return jsx(Sn,{...e,ref:t,state:r})});Xc.displayName="SelectStandalone";var Ye=rt.forwardRef((e,t)=>{let{state:o}=useContext(Ar);return useEffect(()=>{invariant(o||e.items,"Select: A `state` that can be passed via context or `items` are required.");},[e.items,o]),o?jsx(Sn,{state:o,...e,ref:t}):jsx(Xc,{...e,ref:t})});Ye.displayName="Select";var Zc=rt.forwardRef(({className:e,style:t,variant:o,"data-block-id":r,icon:a,tooltipProps:n,...i},s)=>{let p=rt.useRef(null),l=useCallback(({buttonProps:c,selectedValue:u,valueProps:m,isOpen:d,ref:f})=>{let y=u&&"icon"in u&&u.icon;return jsx(ne,{variant:"inverse",size:"sm",includeArrow:!1,text:i["aria-label"],offset:4,...n,children:jsx(No,{...c,isOpen:d,isReadOnly:i.isReadOnly,ref:f,variant:o,validationState:i.validationState,selectedIcon:y||void 0,label:u?"label"in u&&u?.label:i.placeholder,valueProps:m})})},[i,n,o]);return jsxs(L,{display:"flex",flexDirection:"row",gap:"md",paddingX:"md",alignItems:"center",className:classNames("BaselineUI-IconSelect",e),"data-block-id":r,style:t,ref:M(s,p),children:[a?jsx(a,{size:24,className:sprinkles({color:"icon.primary",display:"flex",flexShrink:0})}):null,jsx(Ye,{...i,renderTrigger:l})]})});Zc.displayName="IconSelect";var Qc="_1017q4c5",Jc=z({defaultClassName:"_1017q4c0",variantClassNames:{size:{md:"_1017q4c1",sm:"_1017q4c2"},isDisabled:{true:"_1017q4c3"}},defaultVariants:{},compoundVariants:[]}),ed="_1017q4c4";var xz={sm:AvatarIcon,md:AvatarIcon$1},Ut=rt.forwardRef(({className:e,style:t,size:o="md",icon:r=xz[o],name:a,imgSrc:n,showInitials:i,isDisabled:s,hasNotifications:p,imgLoading:l,"data-block-id":c,"data-block-class":u},m)=>{let{imgProps:d}=kt({src:n,alt:a}),f=a?.split(" ").map(y=>y[0]).join("");return jsxs("span",{className:classNames(Jc({size:o,isDisabled:s}),"BaselineUI-Avatar",e),"data-disabled":s,ref:m,style:t,"aria-disabled":s,"data-block-id":c,"data-block-class":u,children:[n?jsx("img",{...d,loading:l,className:ed}):null,!i&&!n&&jsx(r,{size:o==="sm"?16:24}),i&&!n?o==="sm"?f[0]:f:null,p?jsx("div",{"data-testid":"notification",className:Qc}):null]})});Ut.displayName="Avatar";var td="_1yep5z63 _1yep5z64 _1yep5z65 _1yep5z62f _1yep5z62g _1yep5z62h _1yep5z63l _1yep5z63m _1yep5z63n _1yep5z619 _1yep5z61a _1yep5z61b _1yep5z6ih _1yep5z6ii _1yep5z6ij _1yep5z6j8 _1yep5z6j9 _1yep5z6ja",od=z({defaultClassName:"_1x62fhb6 _1yep5z63r _1yep5z63s _1yep5z63t _1yep5z61f _1yep5z61g _1yep5z61h _1yep5z6ih _1yep5z6ii _1yep5z6ij _1yep5z6j8 _1yep5z6j9 _1yep5z6ja _1yep5z6le _1yep5z6lf _1yep5z6kz _1yep5z6l2 _1yep5z6ev _1yep5z69i _1yep5z69j _1yep5z69k",variantClassNames:{isHovered:{true:"_1yep5z610m"},isSelected:{true:"_1x62fhb8"},isFocusVisible:{true:"_1x62fhb9"},isDisabled:{true:"_1x62fhba _1yep5z610q"},variant:{primary:"_1x62fhbb _1yep5z6zn",ghost:"_1yep5z6zq"}},defaultVariants:{},compoundVariants:[[{variant:"primary",isSelected:!0,isDisabled:!1},"_1yep5z61me"],[{variant:"primary",isSelected:!0},"_1yep5z61nl"],[{variant:"ghost",isSelected:!0,isFocusVisible:!1},"_1x62fhbd"],[{variant:"ghost",isSelected:!0,isDisabled:!1},"_1yep5z61ml"],[{variant:"ghost",isDisabled:!0,isSelected:!0},"_1x62fhbe _1yep5z6ey"],[{variant:"primary",isHovered:!0},"_1yep5z61nm"]]}),rd=z({defaultClassName:"_1x62fhb3 _1yep5z6ik _1yep5z6il _1yep5z6im _1yep5z6iq _1yep5z6ir _1yep5z6is",variantClassNames:{variant:{primary:"_1x62fhb4",ghost:"_1yep5z6va _1yep5z6vb _1yep5z6vc"}},defaultVariants:{},compoundVariants:[]}),ad="_1x62fhbl",Nn=z({defaultClassName:"_1x62fhbf _1yep5z6f6",variantClassNames:{isHovered:{true:"_1yep5z610x"},isSelected:{true:"_1x62fhbh"},isDisabled:{true:"_1yep5z610z"},variant:{primary:"_1x62fhbj",ghost:"_1x62fhbk"}},defaultVariants:{},compoundVariants:[[{variant:"primary",isSelected:!0,isDisabled:!1},"_1yep5z61mp"],[{variant:"ghost",isSelected:!0,isDisabled:!1},"_1yep5z61mu"],[{variant:"ghost",isDisabled:!0,isSelected:!0},"_1yep5z61mr"]]}),nd="_1yep5z6lj _1yep5z6lg _1yep5z6hp _1yep5z6li",id=z({defaultClassName:"_1x62fhb0 _1yep5z6lc _1yep5z6ih _1yep5z6ii _1yep5z6ij _1yep5z6iq _1yep5z6ir _1yep5z6is",variantClassNames:{variant:{primary:"_1yep5z611v",ghost:"_1x62fhb2"}},defaultVariants:{},compoundVariants:[]});var sd=({state:e,...t})=>{let o=rt.useRef(null),{tabPanelProps:r}=useTabPanel(t,e,o),{selectedItem:a}=e,{focusProps:n,isFocusVisible:i}=useFocusRing();if(!a?.value)return null;let{className:s,style:p,"data-block-id":l}=a.value;return jsx("div",{...mergeProps(r,n),ref:o,className:classNames({[nd]:i},"Baseline-Tabs-TabPanel",s),"data-block-id":l,style:p,children:a?.props.children})};var En=rt.forwardRef(({className:e,style:t,tabHeaderStyle:o,tabHeaderClassName:r,variant:a="primary",actions:n,onRemove:i,"data-block-id":s,...p},l)=>{let c=useTabListState({...p,selectedKey:p.selectedValue,defaultSelectedKey:p.defaultSelectedValue,disabledKeys:p.disabledValues}),u=rt.useRef(null),{tabListProps:m}=useTabList({...p,selectedKey:p.selectedValue,defaultSelectedKey:p.defaultSelectedValue,disabledKeys:p.disabledValues},c,u);return jsxs("div",{className:classNames("BaselineUI-Tabs",e),style:t,ref:l,"data-block-id":s,children:[jsxs("div",{className:classNames(id({variant:a}),r),style:o,children:[jsx("div",{...m,className:rd({variant:a}),ref:u,children:[...c.collection].map(d=>(invariant(d.value,"TabItem requires a value prop"),jsx(pd,{item:d,state:c,onRemove:i,variant:a},d.key)))}),n?.map((d,f)=>jsx("div",{className:td,children:jsx(E,{...d,variant:"secondary",size:"sm",className:classNames(ad,d.className)})},f))]}),jsx(sd,{state:c},c.selectedItem?.key)]})});En.displayName="TabsBase";var pd=({item:e,onRemove:t,state:o,variant:r})=>{let{key:a,value:n}=e,i=rt.useRef(null),{tabProps:s,isSelected:p,isDisabled:l}=useTab({key:a},o,i),{hoverProps:c,isHovered:u}=useHover({});invariant(n,"TabButton requires a value prop");let{title:m,icon:d,titleStyle:f,titleClassName:y}=n,{focusProps:b,isFocusVisible:v,isFocused:_}=useFocusRing(),{keyboardProps:g}=useKeyboard({onKeyDown:R=>{R.key==="Backspace"&&t?t(a):R.continuePropagation();}}),h=filterTruthyValues({"data-selected":p,"data-disabled":l,"data-focused":_,"data-hovered":u,"data-focus-visible":v});return jsxs("div",{...mergeProps(g,s,c,b,h),className:classNames(od({isHovered:u,isSelected:p,isFocusVisible:v,isDisabled:l,variant:r}),"BaselineUI-Tabs-TabButton",y),style:f,ref:i,children:[d?jsx(d,{size:20,className:Nn({isHovered:u,isSelected:p,isDisabled:l,variant:r})}):null,m,t?jsx(E,{variant:"secondary",elementType:"div",icon:XIcon$1,size:"xxs",onPress:()=>{t(a);},excludeFromTabOrder:!0,UNSAFE_NON_INTERACTIVE:!0,style:{display:"inline-flex",opacity:p||_||u?1:0},className:Nn({isHovered:u,isSelected:p,isDisabled:l,variant:r})}):null]})};pd.displayName="TabButton";var dd=rt.forwardRef(({children:e,...t},o)=>{let r=useMemo(()=>rt.Children.map(e,a=>!a||!rt.isValidElement(a)||typeof a.type=="string"?null:{...a.props,id:a.props.value}).filter(Boolean),[e]);return jsx(En,{...t,ref:o,items:r,children:a=>jsx(Item,{title:a.title,children:a.children},a.key)})});dd.displayName="Tabs";var ud=({children:e,title:t,value:o})=>(invariant(o,"TabItem requires a value prop"),invariant(t,"TabItem requires a title prop"),invariant(e,"TabItem requires children"),e);ud.displayName="TabItem";var md={ar:{close:"\u0625\u063A\u0644\u0627\u0642"},cs:{close:"Zav\u0159\xEDt"},cy:{close:"Cau"},da:{close:"Luk"},de:{close:"Schlie\xDFen"},el:{close:"\u039A\u03BB\u03B5\u03AF\u03C3\u03B9\u03BC\u03BF"},"en-GB":{close:"Close"},en:{close:"Close"},es:{close:"Cerrar"},fi:{close:"Sulje"},"fr-CA":{close:"Fermer"},fr:{close:"Fermer"},he:{close:"\u05E1\u05D2\u05D9\u05E8\u05D4"},hr:{close:"Zatvori"},id:{close:"Tutup"},it:{close:"Chiudi"},ja:{close:"\u9589\u3058\u308B"},ko:{close:"\uB2EB\uAE30"},ms:{close:"Tutup"},"nb-NO":{close:"Lukk"},nl:{close:"Sluit"},pl:{close:"Zamknij"},"pt-PT":{close:"Fechar"},pt:{close:"Fechar"},ru:{close:"\u0417\u0430\u043A\u0440\u044B\u0442\u044C"},sk:{close:"Zavrie\u0165"},sl:{close:"Zapri"},sv:{close:"St\xE4ng"},th:{close:"\u0E1B\u0E34\u0E14"},tr:{close:"Kapat"},uk:{close:"\u0417\u0430\u043A\u0440\u0438\u0442\u0438"},"zh-Hans":{close:"\u5173\u95ED"},"zh-Hant":{close:"\u95DC\u9589"}};var fd=z({defaultClassName:"kfun6yw",variantClassNames:{arrangement:{single:"kfun6yx",multi:"kfun6yy",compact:"kfun6yz"}},defaultVariants:{},compoundVariants:[]}),yd=z({defaultClassName:"kfun6y0 z9nup82",variantClassNames:{variant:{info:"kfun6y1",warning:"kfun6y2",error:"kfun6y3",success:"kfun6y4"},arrangement:{single:"kfun6y5",multi:"kfun6y6",compact:"kfun6y7"},hasButton:{true:"kfun6y8"},hasCloseButton:{true:"kfun6y9"}},defaultVariants:{},compoundVariants:[[{hasButton:!1,arrangement:"single"},"kfun6ya"],[{hasButton:!0,arrangement:"compact"},"kfun6yb"],[{hasCloseButton:!0,arrangement:"compact"},"kfun6yc"]]}),bd=z({defaultClassName:"kfun6yt",variantClassNames:{size:{sm:"kfun6yu",md:"kfun6yv"}},defaultVariants:{},compoundVariants:[]}),gd=z({defaultClassName:"kfun6yp",variantClassNames:{arrangement:{single:"kfun6yq",multi:"kfun6yr",compact:"kfun6ys"}},defaultVariants:{},compoundVariants:[]}),vd=z({defaultClassName:"kfun6yk",variantClassNames:{variant:{info:"kfun6yl",warning:"kfun6ym",error:"kfun6yn",success:"kfun6yo"}},defaultVariants:{},compoundVariants:[]}),_d=z({defaultClassName:"kfun6yh",variantClassNames:{size:{sm:"kfun6yi",md:"kfun6yj"}},defaultVariants:{},compoundVariants:[]}),zd=z({defaultClassName:"kfun6yd z9nup82",variantClassNames:{arrangement:{single:"kfun6ye",multi:"kfun6yf",compact:"kfun6yg"}},defaultVariants:{},compoundVariants:[]});var Jz={error:{sm:ErrorAltFilledIcon,md:ErrorAltFilledIcon$1},info:{sm:InfoFilledIcon,md:InfoFilledIcon$1},success:{sm:CheckFilledIcon,md:CheckFilledIcon$1},warning:{sm:WarningFilledIcon,md:WarningFilledIcon$1}},hd=rt.forwardRef(({className:e,description:t,actionLabel:o,onAction:r,style:a,variant:n="info",title:i,arrangement:s="single",onClose:p,size:l="sm","data-block-id":c,"data-block-class":u},m)=>{let d=H(md),f=o&&jsx(q,{variant:s==="compact"?"tertiary":"ghost",label:o,onPress:r}),y=Jz[n][l];return jsxs("div",{className:classNames(yd({variant:n,arrangement:s,hasButton:!!o||!!p,hasCloseButton:!!p}),"BaselineUI-InlineAlert",e),"data-block-id":c,"data-block-class":u,style:a,role:"alert",ref:m,children:[jsxs("div",{className:zd({arrangement:s}),children:[jsx(y,{className:vd({variant:n}),size:16}),jsxs("div",{className:fd({arrangement:s}),children:[jsx("h3",{className:_d({size:l}),children:i}),jsx("section",{className:bd({size:l}),children:t})]}),s==="compact"&&f]}),jsxs("div",{className:gd({arrangement:s}),children:[s!=="compact"&&f,p?jsx(E,{variant:"secondary",icon:CloseIcon,size:"sm",onPress:p,"aria-label":d.formatMessage("close")}):null]})]})});hd.displayName="InlineAlert";var Ze={ar:{add:"\u0625\u0636\u0627\u0641\u0629",addColor:"\u0625\u0636\u0627\u0641\u0629 \u0644\u0648\u0646",cancel:"\u0625\u0644\u063A\u0627\u0621",colorFormat:"\u062A\u0646\u0633\u064A\u0642 \u0627\u0644\u0644\u0648\u0646",colorPresets:"\u0627\u0644\u0623\u0644\u0648\u0627\u0646 \u0627\u0644\u0645\u0633\u0628\u0642\u0629",customColors:"\u0623\u0644\u0648\u0627\u0646 \u0645\u062E\u0635\u0635\u0629",newColor:"\u0644\u0648\u0646 \u0645\u062E\u0635\u0635 \u062C\u062F\u064A\u062F",noColor:"\u0644\u0627 \u064A\u0648\u062C\u062F",removeColor:"\u0625\u0632\u0627\u0644\u0629 \u0627\u0644\u0644\u0648\u0646",transparent:"\u0634\u0641\u0627\u0641"},cs:{add:"P\u0159idat",addColor:"P\u0159idat barvu",cancel:"Zru\u0161it",colorFormat:"Form\xE1t barvy",colorPresets:"P\u0159edvolby barev",customColors:"Vlastn\xED barvy",newColor:"Vlastn\xED barva",noColor:"Nen\xED",removeColor:"Odebrat barvu",transparent:"Pr\u016Fhledn\xE1"},cy:{add:"Ychwanegu",addColor:"Ychwanegu Lliw",cancel:"Canslo",colorFormat:"Fformat Lliw",colorPresets:"Rhagosodiadau Lliw",customColors:"Lliwiau Custom",newColor:"Lliw Personol Newydd",noColor:"Dim",removeColor:"Tynnu Lliw",transparent:"Tryloyw"},da:{add:"Tilf\xF8j",addColor:"Tilf\xF8j Farve",cancel:"Annuller",colorFormat:"Farveformat",colorPresets:"Farvevalg",customColors:"Brugerdefinerede farver",newColor:"Ny tilpasset farve",noColor:"Ingen",removeColor:"Fjern Farve",transparent:"Transparent"},de:{add:"Hinzuf\xFCgen",addColor:"Farbe hinzuf\xFCgen",cancel:"Abbrechen",colorFormat:"Farbformat",colorPresets:"Farbvorlagen",customColors:"Benutzerdefinierte Farben",newColor:"Neue benutzerdefinierte Farbe",noColor:"Kein",removeColor:"Farbe entfernen",transparent:"Transparent"},el:{add:"\u03A0\u03C1\u03BF\u03C3\u03B8\u03AE\u03BA\u03B7",addColor:"\u03A0\u03C1\u03BF\u03C3\u03B8\u03AE\u03BA\u03B7 \u03A7\u03C1\u03CE\u03BC\u03B1\u03C4\u03BF\u03C2",cancel:"\u0391\u03BA\u03CD\u03C1\u03C9\u03C3\u03B7",colorFormat:"\u039C\u03BF\u03C1\u03C6\u03AE \u03C7\u03C1\u03CE\u03BC\u03B1\u03C4\u03BF\u03C2",colorPresets:"\u03A0\u03C1\u03BF\u03B5\u03C0\u03B9\u03BB\u03BF\u03B3\u03AD\u03C2 \u03C7\u03C1\u03C9\u03BC\u03AC\u03C4\u03C9\u03BD",customColors:"\u03A0\u03C1\u03BF\u03C3\u03B1\u03C1\u03BC\u03BF\u03C3\u03BC\u03AD\u03BD\u03B1 \u03A7\u03C1\u03CE\u03BC\u03B1\u03C4\u03B1",newColor:"\u039D\u03AD\u03BF \u03C0\u03C1\u03BF\u03C3\u03B1\u03C1\u03BC\u03BF\u03C3\u03BC\u03AD\u03BD\u03BF \u03C7\u03C1\u03CE\u03BC\u03B1",noColor:"\u039A\u03B1\u03BD\u03AD\u03BD\u03B1\u03C2",removeColor:"\u0391\u03C6\u03B1\u03AF\u03C1\u03B5\u03C3\u03B7 \u03A7\u03C1\u03CE\u03BC\u03B1\u03C4\u03BF\u03C2",transparent:"\u0397\u03BC\u03B9\u03B4\u03B9\u03B1\u03C6\u03B1\u03BD\u03AE\u03C2"},"en-GB":{add:"Add",addColor:"Add Colour",cancel:"Cancel",colorFormat:"Colour Format",colorPresets:"Colour Presets",customColors:"Custom Colours",newColor:"New Custom Colour",noColor:"None",removeColor:"Remove Colour",transparent:"Transparent"},en:{add:"Add",addColor:"Add Color",cancel:"Cancel",colorFormat:"Color Format",colorPresets:"Color Presets",customColors:"Custom Colors",newColor:"New Custom Color",noColor:"None",removeColor:"Remove Color",transparent:"Transparent"},es:{add:"A\xF1adir",addColor:"A\xF1adir color",cancel:"Cancelar",colorFormat:"Formato de color",colorPresets:"Preajustes de color",customColors:"Colores personalizados",newColor:"Nuevo color personalizado",noColor:"Ninguna",removeColor:"Eliminar color",transparent:"Transparente"},fi:{add:"Lis\xE4\xE4",addColor:"Lis\xE4\xE4 v\xE4ri",cancel:"Kumoa",colorFormat:"V\xE4rimuoto",colorPresets:"V\xE4rin esiasetukset",customColors:"Mukautetut v\xE4rit",newColor:"Uusi muokattu v\xE4ri",noColor:"Ei mit\xE4\xE4n",removeColor:"Poista v\xE4ri",transparent:"L\xE4pin\xE4kyv\xE4"},"fr-CA":{add:"Ajouter",addColor:"Ajouter une couleur",cancel:"Annuler",colorFormat:"Format de couleur",colorPresets:"Pr\xE9r\xE9glages de couleur",customColors:"Couleurs personnalis\xE9es",newColor:"Nouvelle couleur personnalis\xE9e",noColor:"Aucune",removeColor:"Supprimer la couleur",transparent:"Transparent"},fr:{add:"Ajouter",addColor:"Ajouter une couleur",cancel:"Annuler",colorFormat:"Format de couleur",colorPresets:"Pr\xE9r\xE9glages de couleur",customColors:"Couleurs personnalis\xE9es",newColor:"Nouvelle couleur personnalis\xE9e",noColor:"Aucune",removeColor:"Supprimer la couleur",transparent:"Transparent"},he:{add:"\u05D4\u05D5\u05E1\u05E4\u05D4",addColor:"\u05D4\u05D5\u05E1\u05E3 \u05E6\u05D1\u05E2",cancel:"\u05D1\u05D9\u05D8\u05D5\u05DC",colorFormat:"\u05E4\u05D5\u05E8\u05DE\u05D8 \u05E6\u05D1\u05E2",colorPresets:"\u05DE\u05E6\u05D1\u05D9 \u05E6\u05D1\u05E2 \u05DE\u05EA\u05D5\u05DB\u05E0\u05EA\u05D9\u05DD",customColors:"\u05E6\u05D1\u05E2\u05D9\u05DD \u05DE\u05D5\u05EA\u05D0\u05DE\u05D9\u05DD \u05D0\u05D9\u05E9\u05D9\u05EA",newColor:"\u05E6\u05D1\u05E2 \u05DE\u05D5\u05EA\u05D0\u05DD \u05D0\u05D9\u05E9\u05D9\u05EA \u05D7\u05D3\u05E9",noColor:"\u05DC\u05DC\u05D0",removeColor:"\u05D4\u05E1\u05E8 \u05E6\u05D1\u05E2",transparent:"\u05E9\u05E7\u05D5\u05E3"},hr:{add:"Dodati",addColor:"Dodaj boju",cancel:"Otka\u017Ei",colorFormat:"Format boje",colorPresets:"Prijedlozi boja",customColors:"Prilago\u0111ene boje",newColor:"Nova prilago\u0111ena boja",noColor:"Prazno",removeColor:"Ukloni boju",transparent:"Prozirna"},id:{add:"Tambah",addColor:"Tambah Warna",cancel:"Batalkan",colorFormat:"Format Warna",colorPresets:"Preset Warna",customColors:"Warna Kustom",newColor:"Warna Khusus Baru",noColor:"Tidak ada",removeColor:"Hapus Warna",transparent:"Transparan"},it:{add:"Aggiungi",addColor:"Aggiungi colore",cancel:"Annulla",colorFormat:"Formato del colore",colorPresets:"Colori predefiniti",customColors:"Colori personalizzati",newColor:"Nuovo colore personalizzato",noColor:"Nessuno",removeColor:"Rimuovi colore",transparent:"Trasparente"},ja:{add:"\u8FFD\u52A0",addColor:"\u8272\u3092\u8FFD\u52A0",cancel:"\u30AD\u30E3\u30F3\u30BB\u30EB",colorFormat:"\u30AB\u30E9\u30FC\u30D5\u30A9\u30FC\u30DE\u30C3\u30C8",colorPresets:"\u30AB\u30E9\u30FC\u30D7\u30EA\u30BB\u30C3\u30C8",customColors:"\u30AB\u30B9\u30BF\u30E0\u30AB\u30E9\u30FC",newColor:"\u65B0\u898F\u30AB\u30B9\u30BF\u30E0\u30AB\u30E9\u30FC",noColor:"\u306A\u3057",removeColor:"\u8272\u3092\u524A\u9664",transparent:"\u900F\u660E"},ko:{add:"\uCD94\uAC00",addColor:"\uC0C9\uC0C1 \uCD94\uAC00",cancel:"\uCDE8\uC18C",colorFormat:"\uC0C9\uC0C1 \uD615\uC2DD",colorPresets:"\uC0C9\uC0C1 \uBBF8\uB9AC\uC124\uC815",customColors:"\uC0AC\uC6A9\uC790 \uC815\uC758 \uC0C9\uC0C1",newColor:"\uC0C8\uB85C\uC6B4 \uC0AC\uC6A9\uC790\uC9C0\uC815 \uC0C9\uC0C1",noColor:"\uC5C6\uC74C",removeColor:"\uC0C9\uC0C1 \uC81C\uAC70",transparent:"\uD22C\uBA85"},ms:{add:"Tambah",addColor:"Tambah Warna",cancel:"Batal",colorFormat:"Format Warna",colorPresets:"Praset Warna",customColors:"Warna Kustom",newColor:"Warna Tersuai Baharu",noColor:"Tiada",removeColor:"Buang Warna",transparent:"Lut Sinar"},"nb-NO":{add:"Legg til",addColor:"Legg til farge",cancel:"Avbryt",colorFormat:"Fargeformat",colorPresets:"Fargeinnstillinger",customColors:"Egendefinerte farger",newColor:"Ny tilpasset farge",noColor:"Ingen",removeColor:"Fjern farge",transparent:"Gjennomsiktig"},nl:{add:"Voeg toe",addColor:"Kleur toevoegen",cancel:"Annuleer",colorFormat:"Kleurformaat",colorPresets:"Kleurvoorinstellingen",customColors:"Aangepaste kleuren",newColor:"Nieuwe aangepaste kleur",noColor:"Geen",removeColor:"Kleur verwijderen",transparent:"Doorzichtig"},pl:{add:"Dodaj",addColor:"Dodaj kolor",cancel:"Anuluj",colorFormat:"Format koloru",colorPresets:"Wst\u0119pnie ustawione kolory",customColors:"Niestandardowe kolory",newColor:"Nowy kolor niestandardowy",noColor:"Brak",removeColor:"Usu\u0144 kolor",transparent:"Prze\u015Bwiecaj\u0105ce"},"pt-PT":{add:"Adicionar",addColor:"Adicionar cor",cancel:"Cancelar",colorFormat:"Formato de cor",colorPresets:"Predefini\xE7\xF5es de cor",customColors:"Cores personalizadas",newColor:"Nova cor personalizada",noColor:"Nenhum",removeColor:"Remover cor",transparent:"Transparente"},pt:{add:"Adicionar",addColor:"Adicionar cor",cancel:"Cancelar",colorFormat:"Formato de cor",colorPresets:"Pr\xE9-ajustes de Cores",customColors:"Cores personalizadas",newColor:"Nova Cor Personalizada",noColor:"Nenhum",removeColor:"Remover cor",transparent:"Transparente"},ru:{add:"\u0414\u043E\u0431\u0430\u0432\u0438\u0442\u044C",addColor:"\u0414\u043E\u0431\u0430\u0432\u0438\u0442\u044C \u0446\u0432\u0435\u0442",cancel:"\u041E\u0442\u043C\u0435\u043D\u0438\u0442\u044C",colorFormat:"\u0424\u043E\u0440\u043C\u0430\u0442 \u0446\u0432\u0435\u0442\u0430",colorPresets:"\u0411\u0438\u0431\u043B\u0438\u043E\u0442\u0435\u043A\u0430 \u0446\u0432\u0435\u0442\u043E\u0432",customColors:"\u041F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u0442\u0435\u043B\u044C\u0441\u043A\u0438\u0435 \u0446\u0432\u0435\u0442\u0430",newColor:"\u041D\u043E\u0432\u044B\u0439 \u0441\u043E\u0431\u0441\u0442\u0432\u0435\u043D\u043D\u044B\u0439 \u0446\u0432\u0435\u0442",noColor:"\u041D\u0435\u0442",removeColor:"\u0423\u0434\u0430\u043B\u0438\u0442\u044C \u0446\u0432\u0435\u0442",transparent:"\u041F\u0440\u043E\u0437\u0440\u0430\u0447\u043D\u044B\u0439"},sk:{add:"Prida\u0165",addColor:"Prida\u0165 farbu",cancel:"Zru\u0161i\u0165",colorFormat:"Form\xE1t farby",colorPresets:"Predvo\u013Eby farieb",customColors:"Vlastn\xE9 farby",newColor:"Vlastn\xE1 farba",noColor:"\u017Diadny",removeColor:"Odstr\xE1ni\u0165 farbu",transparent:"Prieh\u013Eadn\xE1"},sl:{add:"Dodaj",addColor:"Dodaj barvo",cancel:"Prekli\u010Di",colorFormat:"Barvni format",colorPresets:"Barvne predloge",customColors:"Prilagojene barve",newColor:"Nova barva po meri",noColor:"Prazna stran",removeColor:"Odstrani barvo",transparent:"Prosojna"},sv:{add:"L\xE4gg till",addColor:"L\xE4gg till f\xE4rg",cancel:"Avbryt",colorFormat:"F\xE4rgformat",colorPresets:"F\xF6rval f\xF6r f\xE4rger",customColors:"Anpassade f\xE4rger",newColor:"Ny anpassad f\xE4rg",noColor:"Ingen",removeColor:"Ta bort f\xE4rg",transparent:"Genomskinligt"},th:{add:"\u0E40\u0E1E\u0E34\u0E48\u0E21",addColor:"\u0E40\u0E1E\u0E34\u0E48\u0E21\u0E2A\u0E35",cancel:"\u0E22\u0E01\u0E40\u0E25\u0E34\u0E01",colorFormat:"\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E2A\u0E35",colorPresets:"\u0E04\u0E48\u0E32\u0E2A\u0E35\u0E17\u0E35\u0E48\u0E15\u0E31\u0E49\u0E07\u0E44\u0E27\u0E49\u0E25\u0E48\u0E27\u0E07\u0E2B\u0E19\u0E49\u0E32",customColors:"\u0E2A\u0E35\u0E17\u0E35\u0E48\u0E01\u0E33\u0E2B\u0E19\u0E14\u0E40\u0E2D\u0E07",newColor:"\u0E2A\u0E35\u0E17\u0E35\u0E48\u0E01\u0E33\u0E2B\u0E19\u0E14\u0E40\u0E2D\u0E07\u0E43\u0E2B\u0E21\u0E48",noColor:"\u0E44\u0E21\u0E48\u0E21\u0E35\u0E40\u0E25\u0E22",removeColor:"\u0E25\u0E1A\u0E2A\u0E35",transparent:"\u0E42\u0E1B\u0E23\u0E48\u0E07\u0E43\u0E2A"},tr:{add:"Ekle",addColor:"Renk Ekle",cancel:"Vazge\xE7",colorFormat:"Renk Format\u0131",colorPresets:"Renk \xD6nayarlar\u0131",customColors:"\xD6zel Renkler",newColor:"Yeni \xF6zel renk",noColor:"Hi\xE7biri",removeColor:"Rengi Kald\u0131r",transparent:"\u015Eeffaf"},uk:{add:"\u0414\u043E\u0434\u0430\u0442\u0438",addColor:"\u0414\u043E\u0434\u0430\u0442\u0438 \u043A\u043E\u043B\u0456\u0440",cancel:"\u0421\u043A\u0430\u0441\u0443\u0432\u0430\u0442\u0438",colorFormat:"\u0424\u043E\u0440\u043C\u0430\u0442 \u043A\u043E\u043B\u044C\u043E\u0440\u0443",colorPresets:"\u0411\u0456\u0431\u043B\u0456\u043E\u0442\u0435\u043A\u0430 \u043A\u043E\u043B\u044C\u043E\u0440\u0456\u0432",customColors:"\u041A\u043E\u0440\u0438\u0441\u0442\u0443\u0432\u0430\u0446\u044C\u043A\u0456 \u043A\u043E\u043B\u044C\u043E\u0440\u0438",newColor:"\u041D\u043E\u0432\u0438\u0439 \u0432\u043B\u0430\u0441\u043D\u0438\u0439 \u043A\u043E\u043B\u0456\u0440",noColor:"\u041D\u0435\u043C\u0430\u0454",removeColor:"\u0412\u0438\u0434\u0430\u043B\u0438\u0442\u0438 \u043A\u043E\u043B\u0456\u0440",transparent:"\u041F\u0440\u043E\u0437\u043E\u0440\u0438\u0439"},"zh-Hans":{add:"\u6DFB\u52A0",addColor:"\u6DFB\u52A0\u989C\u8272",cancel:"\u53D6\u6D88",colorFormat:"\u989C\u8272\u683C\u5F0F",colorPresets:"\u989C\u8272\u9884\u8BBE",customColors:"\u81EA\u5B9A\u4E49\u989C\u8272",newColor:"\u65B0\u81EA\u5B9A\u4E49\u989C\u8272",noColor:"\u65E0",removeColor:"\u79FB\u9664\u989C\u8272",transparent:"\u900F\u660E"},"zh-Hant":{add:"\u52A0\u5165",addColor:"\u6DFB\u52A0\u984F\u8272",cancel:"\u53D6\u6D88",colorFormat:"\u984F\u8272\u683C\u5F0F",colorPresets:"\u984F\u8272\u9810\u8A2D\u9805",customColors:"\u81EA\u8A02\u984F\u8272",newColor:"\u65B0\u81EA\u8A02\u984F\u8272",noColor:"\u7121",removeColor:"\u79FB\u9664\u984F\u8272",transparent:"\u900F\u660E"}};var Kr=({children:e})=>{let{triggerProps:t}=rt.useContext(qe);return jsx(PressResponder,{...t,children:e})};Kr.displayName="ModalTrigger";var ih=({children:e})=>{let{state:t}=rt.useContext(qe);return jsx(PressResponder,{onPress:()=>{t?.close();},children:e})};var xd="_1dbkl53 _1yep5z6al _1yep5z6am _1yep5z6an _1yep5z6b9 _1yep5z6ba _1yep5z6bb _1yep5z6lc",Cd="_1dbkl5e",Pd=z({defaultClassName:"_1dbkl54 _1yep5z66 _1yep5z67 _1yep5z68 _1yep5z62i _1yep5z62j _1yep5z62k _1yep5z63o _1yep5z63p _1yep5z63q _1yep5z61c _1yep5z61d _1yep5z61e _1yep5z6ai _1yep5z6aj _1yep5z6ak _1yep5z6b6 _1yep5z6b7 _1yep5z6b8 _1yep5z6bu _1yep5z6bv _1yep5z6bw _1yep5z6ci _1yep5z6cj _1yep5z6ck _1yep5z6ih _1yep5z6ii _1yep5z6ij _1yep5z6iq _1yep5z6ir _1yep5z6is _1yep5z6ln _1yep5z6lf _1yep5z69i _1yep5z69j _1yep5z69k _1yep5z6eu _1yep5z6le _1yep5z6dy",variantClassNames:{isHovered:{true:"_1dbkl55"},isFocusVisible:{true:"_1dbkl56"},isDisabled:{true:"z9nup83 _1yep5z610q"},labelPosition:{top:"_1dbkl58",start:"_1dbkl59"}},defaultVariants:{},compoundVariants:[]}),kd="_1yep5z6ih _1yep5z6ii _1yep5z6ij _1yep5z6iq _1yep5z6ir _1yep5z6is _1yep5z69l _1yep5z69m _1yep5z69n _1yep5z6j8 _1yep5z6j9 _1yep5z6ja _1yep5z6k8 _1yep5z6k9 _1yep5z6ka",Id=z({defaultClassName:"_1dbkl50 _1yep5z6ih _1yep5z6ii _1yep5z6ij _1yep5z6dy _1yep5z6ev",variantClassNames:{labelPosition:{top:"_1yep5z6o7 _1yep5z6o8 _1yep5z6o9",start:"_1dbkl52"}},defaultVariants:{},compoundVariants:[]}),Gr="_1dbkl5l _1yep5z6in _1yep5z6io _1yep5z6ip _1yep5z69f _1yep5z69g _1yep5z69h",wd="_1dbkl5f z9nup87",Wr="_1dbkl5m _1yep5z6b0 _1yep5z6b1 _1yep5z6b2 _1yep5z6bo _1yep5z6bp _1yep5z6bq _1yep5z6cc _1yep5z6cd _1yep5z6ce _1yep5z6d0 _1yep5z6d1 _1yep5z6d2 _1yep5z6i2 _1yep5z6i3 _1yep5z6i4",Rd="_1dbkl5k _1yep5z66 _1yep5z67 _1yep5z68 _1yep5z62i _1yep5z62j _1yep5z62k _1yep5z63o _1yep5z63p _1yep5z63q _1yep5z61c _1yep5z61d _1yep5z61e _1yep5z6lf",Sd="_1yep5z63r _1yep5z63s _1yep5z63t _1yep5z619 _1yep5z61a _1yep5z61b _1yep5z6ih _1yep5z6ii _1yep5z6ij _1yep5z6iq _1yep5z6ir _1yep5z6is _1yep5z6k8 _1yep5z6k9 _1yep5z6ka _1yep5z6dy _1yep5z6ev _1yep5z69l _1yep5z69m _1yep5z69n _1yep5z6j8 _1yep5z6j9 _1yep5z6ja",Xr=z({defaultClassName:"_1dbkl5h _1yep5z63 _1yep5z64 _1yep5z65 _1yep5z62f _1yep5z62g _1yep5z62h _1yep5z6g1",variantClassNames:{includesCustomColorPicker:{true:"_1yep5z6mv _1yep5z6mw _1yep5z6mx"}},defaultVariants:{},compoundVariants:[]}),Hn="_1dbkl5v _1yep5z6ih _1yep5z6ii _1yep5z6ij _1yep5z6iq _1yep5z6ir _1yep5z6is",Td=z({defaultClassName:"_1dbkl5q _1yep5z66 _1yep5z67 _1yep5z68 _1yep5z62i _1yep5z62j _1yep5z62k _1yep5z63o _1yep5z63p _1yep5z63q _1yep5z61c _1yep5z61d _1yep5z61e _1yep5z6ai _1yep5z6aj _1yep5z6ak _1yep5z6bu _1yep5z6bv _1yep5z6bw _1yep5z6br _1yep5z6bs _1yep5z6bt _1yep5z6d3 _1yep5z6d4 _1yep5z6d5 _1yep5z6ih _1yep5z6ii _1yep5z6ij _1yep5z6iq _1yep5z6ir _1yep5z6is _1yep5z6j8 _1yep5z6j9 _1yep5z6ja _1yep5z6lo _1yep5z6gz _1yep5z6lf _1yep5z6eu _1yep5z6dy",variantClassNames:{isFocused:{true:"_1dbkl5r _1yep5z612o"},isHovered:{true:"_1dbkl5s"},allowAlpha:{false:"_1yep5z6wy _1yep5z6wz _1yep5z6x0 _1yep5z6ya _1yep5z6yb _1yep5z6yc _1yep5z6174"}},defaultVariants:{},compoundVariants:[[{isHovered:!0,isFocused:!1},"_1yep5z61ok"]]}),Nd=z({defaultClassName:"_1dbkl5a _1yep5z66 _1yep5z67 _1yep5z68 _1yep5z62c _1yep5z62d _1yep5z62e _1yep5z63i _1yep5z63j _1yep5z63k _1yep5z616 _1yep5z617 _1yep5z618 _1yep5z6ai _1yep5z6aj _1yep5z6ak _1yep5z6b6 _1yep5z6b7 _1yep5z6b8 _1yep5z6bu _1yep5z6bv _1yep5z6bw _1yep5z6ci _1yep5z6cj _1yep5z6ck _1yep5z6ih _1yep5z6ii _1yep5z6ij _1yep5z6it _1yep5z6iu _1yep5z6iv _1yep5z69c _1yep5z69d _1yep5z69e _1yep5z6f5 _1yep5z6le _1yep5z6j8 _1yep5z6j9 _1yep5z6ja _1yep5z6kz _1yep5z6l2",variantClassNames:{isHovered:{true:"_1yep5z611v"},isFocusVisible:{true:"_1yep5z617a _1yep5z6178 _1yep5z617b _1yep5z613h"},isDisabled:{true:"_1yep5z610z"}},defaultVariants:{},compoundVariants:[]}),Eo="_1dbkl5u",Yr="_1dbkl5g _1yep5z6al _1yep5z6am _1yep5z6an _1yep5z6b9 _1yep5z6ba _1yep5z6bb _1yep5z6bx _1yep5z6by _1yep5z6bz _1yep5z6cl _1yep5z6cm _1yep5z6cn _1yep5z6d7",Zr="_1dbkl5j _1yep5z69 _1yep5z6a _1yep5z6b _1yep5z62l _1yep5z62m _1yep5z62n _1yep5z63r _1yep5z63s _1yep5z63t _1yep5z61f _1yep5z61g _1yep5z61h _1yep5z6ih _1yep5z6ii _1yep5z6ij _1yep5z6it _1yep5z6iu _1yep5z6iv _1yep5z69f _1yep5z69g _1yep5z69h",Fn="_1dbkl5x",Ld="_1dbkl5w",Vn="_1yep5z69 _1yep5z6a _1yep5z6b _1yep5z62l _1yep5z62m _1yep5z62n _1yep5z63r _1yep5z63s _1yep5z63t _1yep5z61f _1yep5z61g _1yep5z61h _1yep5z6ih _1yep5z6ii _1yep5z6ij _1yep5z6it _1yep5z6iu _1yep5z6iv _1yep5z69l _1yep5z69m _1yep5z69n",Qr=z({defaultClassName:"_1dbkl5n _1yep5z6b0 _1yep5z6b1 _1yep5z6b2 _1yep5z6bo _1yep5z6bp _1yep5z6bq _1yep5z6cc _1yep5z6cd _1yep5z6ce _1yep5z6d0 _1yep5z6d1 _1yep5z6d2 _1yep5z6lj _1yep5z6i5 _1yep5z6i6 _1yep5z6i7 _1yep5z6lo _1yep5z6lr",variantClassNames:{isFocusVisible:{true:"_1dbkl5o _1yep5z6178 _1yep5z613h _1yep5z617a"}},defaultVariants:{},compoundVariants:[]}),On="z9nup84 z9nup86 _1yep5z6b0 _1yep5z6b1 _1yep5z6b2 _1yep5z6bo _1yep5z6bp _1yep5z6bq _1yep5z6cc _1yep5z6cd _1yep5z6ce _1yep5z6d0 _1yep5z6d1 _1yep5z6d2 _1yep5z6l5 _1yep5z6l6 _1yep5z6l8 _1yep5z6l7 _1yep5z6i5 _1yep5z6i6 _1yep5z6i7";var Md=z({defaultClassName:"_1344e9q0 _1yep5z6b0 _1yep5z6b1 _1yep5z6b2 _1yep5z6bo _1yep5z6bp _1yep5z6bq _1yep5z6cc _1yep5z6cd _1yep5z6ce _1yep5z6d0 _1yep5z6d1 _1yep5z6d2 _1yep5z6i2 _1yep5z6i3 _1yep5z6i4 _1yep5z6l9 _1yep5z6i1 _1yep5z6ih _1yep5z6ii _1yep5z6ij _1yep5z6j8 _1yep5z6j9 _1yep5z6ja _1yep5z6k2 _1yep5z6k3 _1yep5z6k4",variantClassNames:{isFocusVisible:{true:"_1344e9q1"},isDisabled:{true:"_1344e9q2"},removeBlendMode:{true:"_1344e9q3"},isSelected:{true:"_1yep5z617a _1yep5z6178 _1yep5z613h _1yep5z617d"},isHovered:{true:"_1344e9q5"}},defaultVariants:{},compoundVariants:[[{isSelected:!1,isFocusVisible:!0},"_1344e9q6"],[{isSelected:!0,isFocusVisible:!0},"_1344e9q7 _1yep5z61t2 _1yep5z61t0 _1yep5z61p9 _1yep5z61t5"],[{isSelected:!0,isDisabled:!0},"_1yep5z61t2 _1yep5z61t0 _1yep5z61p9 _1yep5z61t5 _1yep5z61pj"],[{isHovered:!0,isSelected:!1},"_1yep5z61t5 _1yep5z61t2 _1yep5z61t0 _1yep5z61pd"]]});var Qe=rt.forwardRef(({color:e,isFocusVisible:t,isSelected:o,isInteractive:r,isDisabled:a,style:n,className:i,id:s,"data-block-id":p,"data-block-class":l,...c},u)=>{let m=e&&e!==Re&&(typeof e=="string"?parseColor(e):e),{formatMessage:d}=H(),f=!m,{colorSwatchProps:y}=useColorSwatch({color:f?"#000000":e}),{hoverProps:b,isHovered:v}=useHover({isDisabled:a||!r}),_=filterTruthyValues({"data-focus-visible":t,"data-selected":o,"data-hovered":v,"data-block-id":p,"data-block-class":l,"data-disabled":a,"data-interactive":r});return jsx("div",{...mergeProps(b,_,f?{}:y),style:n,"aria-label":f?d(bh.none):y["aria-label"],role:"img",className:classNames(Md({removeBlendMode:f,isFocusVisible:t,isDisabled:!!a,isSelected:!!o,isHovered:v}),"BaselineUI-ColorSwatch",i),ref:u,id:s,...c,children:jsx(L,{display:"inline-flex",justifyContent:"center",alignItems:"center",borderRadius:"full",height:"full",width:"full",opacity:a?"medium":void 0,style:m?Ed(m,4):void 0,children:f?jsx(NoneIcon,{size:14}):null})})});Qe.displayName="ColorSwatch";var bh=U({none:{id:"none",defaultMessage:"None"}});var Bd=[{id:"hex",label:"HEX"},{id:"rgb",label:"RGB"}],Bo=parseColor("#000000").toFormat("hsla"),ie="hsla",Do="hexa";function st(e){return typeof e=="string"?parseColor(e).toFormat(ie):e?e.toFormat(ie):null}function Hd(e,t){return e?.getChannelValue("alpha")?t?.toString(Do)===e.toString(Do):!t?.getChannelValue("alpha")}function Fd(e,t,o){return t?.label?t.label:e?.getChannelValue("alpha")===0?o:e?.toString("rgba")}var Re="NONE";function Vd(e,t){let o=t?.map(a=>({id:parseColor(a.color).toString(Do),label:a.label}))||[],r={id:Re,label:e};return [...o,r]}var Jr=(e,{optionProps:t,isFocusVisible:o,isSelected:r},a)=>(invariant(e.value&&"label"in e.value,"Item must have label"),jsx("li",{...t,ref:a,className:Rd,children:jsx(Qe,{color:e.value.id,isFocusVisible:o,isSelected:r,"aria-label":e.value.label,isInteractive:!0})})),Ed=(e,t=4)=>{let o=e.getChannelValue("alpha")===0,r=`repeating-conic-gradient(transparent 0% 25%, ${themeVars.color.background.secondary.medium} 25% 50%)`;return {backgroundImage:o?r:`linear-gradient(${e.toString("hexa")}, ${e.toString("hexa")}), ${r}`,backgroundSize:`${t}px ${t}px`}};var jd=({value:e,...t})=>{let o=rt.useRef(null),r=rt.useRef(null),a=rt.useRef(null),n=useColorAreaState({...t,value:e}),{colorAreaProps:i,xInputProps:s,yInputProps:p,thumbProps:l}=useColorArea({...t,value:e,inputXRef:o,inputYRef:r,containerRef:a},n);useEffect(()=>{o.current?.focus();},[]);let{focusProps:c,isFocusVisible:u}=useFocusRing();return jsx("div",{ref:a,...i,className:classNames(xd,"BaselineUI-ColorInput-ColorArea"),children:jsxs("div",{...l,className:classNames(Qr({isFocusVisible:u}),"BaselineUI-ColorInput-ColorAreaThumb"),style:{...l.style,transform:"translate(-50%, -50%)",backgroundColor:st(e)?.withChannelValue("alpha",1).toString("css")},children:[jsx("input",{ref:o,...s,...c}),jsx("input",{ref:r,...p,...c})]})})};var Ud=({color:e,setColor:t,allowAlpha:o,...r})=>{let a=useColorFieldState({value:e,onChange:u=>{t(st(u)?.toFormat(ie).withChannelValue("alpha",e.getChannelValue("alpha")??1)||Bo);}}),n=rt.useRef(null),{inputProps:i}=useColorField({...r,"aria-label":"Hex"},a,n),{focusProps:s,isFocused:p}=useFocusRing({isTextInput:!0}),{hoverProps:l,isHovered:c}=useHover({});return jsxs("div",{className:classNames(Hn,"BaselineUI-ColorInput-FieldInput"),"data-color-mode":o?"hexa":"hex",children:[jsx("input",{...mergeProps(i,s,l),ref:n,className:Td({isFocused:p,isHovered:c,allowAlpha:o})}),o?jsx(Kd,{color:e,setColor:t}):null]})},qd=({color:e,setColor:t,allowAlpha:o})=>{let r=e.toFormat("rgba"),{locale:a}=useLocale();return jsxs("div",{className:classNames(Hn,"BaselineUI-ColorInput-FieldInput"),"data-color-mode":o?"rgba":"rgb",children:[jsx(Me,{"aria-label":e.getChannelName("red",a),value:r.getChannelValue("red"),showStepper:!1,className:Eo,onChange:n=>{t(r.withChannelValue("red",n).toFormat(ie));},step:1,minValue:0,maxValue:255}),jsx(Me,{"aria-label":e.getChannelName("green",a),value:r.getChannelValue("green"),showStepper:!1,className:Eo,onChange:n=>{t(r.withChannelValue("green",n).toFormat(ie));},step:1,minValue:0,maxValue:255}),jsx(Me,{"aria-label":e.getChannelName("blue",a),value:r.getChannelValue("blue"),showStepper:!1,className:Eo,onChange:n=>{t(r.withChannelValue("blue",n).toFormat(ie));},step:1,minValue:0,maxValue:255}),o?jsx(Kd,{color:e,setColor:t}):null]})},Nh={style:"percent",maximumFractionDigits:0},Kd=({color:e,setColor:t})=>{let{locale:o}=useLocale(),r=useCallback(a=>{t(e.withChannelValue("alpha",a));},[e,t]);return jsx(Me,{"aria-label":e.getChannelName("alpha",o),value:e.getChannelValue("alpha"),formatOptions:Nh,className:Eo,showStepper:!1,onChange:r,minValue:0,maxValue:1})};var qn=({channel:e,...t})=>{let{locale:o}=useLocale(),r=useColorSliderState({...t,channel:e,locale:o}),a=rt.useRef(null),n=rt.useRef(null),{trackProps:i,thumbProps:s,inputProps:p}=useColorSlider({...t,channel:e,trackRef:a,inputRef:n,"aria-label":r.value.getChannelName(e,o)},r),{focusProps:l,isFocusVisible:c}=useFocusRing();return jsxs("div",{className:classNames(Wr,{[dl({size:"xs"})]:e==="alpha"},"BaselineUI-ColorInput-ColorSlider"),"data-channel":e,...i,ref:a,children:[e==="alpha"&&jsx("div",{className:On}),jsx("div",{className:Wr,style:i.style}),jsxs("div",{className:classNames(Qr({isFocusVisible:c}),"BaselineUI-ColorInput-ColorSliderThumb"),...s,children:[jsx("div",{className:On,style:{backgroundColor:"#ffffff"}}),jsx("div",{style:{backgroundColor:r.getDisplayColor().toString("css"),height:8},className:Wr}),jsx(VisuallyHidden,{children:jsx("input",{ref:n,...p,...l})})]})]})};var ea=({color:e,setColor:t,allowAlpha:o,onChangeEnd:r})=>{let[a,n]=rt.useState("hex"),{formatMessage:i}=H(Ze);return jsxs(Fragment,{children:[jsx(jd,{value:e,xChannel:"saturation",yChannel:"lightness",onChange:t,onChangeEnd:r}),jsxs("div",{className:Vn,children:[jsx(qn,{channel:"hue",value:e,onChange:t,onChangeEnd:r}),o?jsx(qn,{channel:"alpha",value:e,onChange:t,onChangeEnd:r}):null]}),jsxs("div",{className:classNames(Vn,sprinkles.variants({paddingTop:"none",gap:"sm"})),children:[jsx(Ye,{label:i("colorFormat"),labelPosition:"start",variant:"ghost",items:Bd,selectedKey:a,onSelectionChange:s=>{n(s);}}),a==="hex"&&jsx(Ud,{color:e,setColor:s=>{t(s),r?.(s);},allowAlpha:o}),a==="rgb"&&jsx(qd,{color:e,setColor:s=>{t(s),r?.(s);},allowAlpha:o})]})]})};var Jd=({color:e,setColor:t,storePickedColorKey:o,addColorButtonLabel:r,removeColorButtonLabel:a,customColorsLabel:n,pickerMode:i,allowAlpha:s})=>{let{locale:p}=useLocale(),{formatMessage:l}=H(Ze),c=rt.useRef(null),u=wt(c.current),[m,d]=ll(o,[]),f=rt.useRef(null),[y,b]=rt.useState(e),v=rt.useMemo(()=>m.map(x=>({id:x,label:parseColor(x).getColorName(p),description:x})),[m,p]),_=useCallback(()=>{let x=i==="active"?e:y;if(m.includes(x.toString(ie))){f.current?.querySelector(`[data-key='${x.toString(ie)}']`)?.classList.add(Fn);return}d([...m,x.toString(ie)]);},[m,e,d,y,i]);useEffect(()=>{let x=f.current;function C(T){T.animationName===Ld&&T.target?.classList.remove(Fn);}return x?.addEventListener("animationend",C),()=>{x?.removeEventListener("animationend",C);}},[]);let g=useId(),h=jsx(E,{ref:c,variant:"secondary",size:"md","aria-label":r,icon:PlusIcon$1,onPress:i==="active"?_:void 0}),R=useCallback(x=>jsxs(me,{size:"content",className:Xr({includesCustomColorPicker:!0}),style:{paddingBlockEnd:0},"aria-label":l("newColor"),children:[jsx(ea,{color:y,setColor:b,allowAlpha:s}),jsx(O,{}),jsx(L,{padding:"lg",display:"flex",flexDirection:"row-reverse",children:jsxs(L,{display:"inline-flex",gap:"lg",children:[jsx(q,{label:l("cancel"),size:"sm",variant:"secondary",onPress:x}),jsx(q,{label:l("add"),variant:"primary",onPress:()=>{_(),x();},size:"sm"})]})})]}),[y,_,l,s]),w=useCallback(x=>{invariant(x instanceof Set,"Key must be a set");let C=[...x][0];C&&t(parseColor(C).toFormat(ie));},[t]);return jsxs(Fragment,{children:[jsx(O,{}),jsxs("div",{className:classNames(Sd,"BaselineUI-ColorInput-CustomColors"),children:[jsx("span",{id:g,children:n}),jsxs(L,{display:"flex",children:[!!m.length&&m.includes(e.toString(ie))&&jsx(E,{variant:"secondary",size:"md",elementType:"div",icon:MinusIcon$2,"aria-label":a,onPress:()=>{d(m.filter(x=>x!==e.toString(ie)));}}),i==="active"&&h,i==="lazy"&&(u==="mobile"?jsxs(Ie,{children:[jsx(Kr,{children:h}),jsx(Ee,{style:{zIndex:1e5},children:({close:x})=>R(x)})]}):jsxs(Ne,{type:"dialog",children:[jsx(Le,{children:h}),jsx(we,{placement:"right top",className:Yr,offset:6,children:({close:x})=>R(x)})]}))]})]}),!!m.length&&jsx(le,{items:v,layout:"grid","aria-labelledby":g,className:classNames(Gr,Zr,sprinkles.variants({paddingTop:"xs"}),"BaselineUI-ColorInput-CustomColorsListBox"),renderOption:Jr,ref:f,autoFocus:!1,selectionMode:"single",selectedKeys:[e.toString(ie)],onSelectionChange:w})]})};var Wn=rt.forwardRef(({setColor:e,color:t,triggerRef:o,autoFocus:r,presets:a,state:n},i)=>{let{formatMessage:s}=H(Ze),p=useCallback(l=>{if(l instanceof Set&&l.size){let c=[...l][0],u=a.find(m=>m.id===c);invariant(u,"Preset not found"),e(u.id===Re?null:parseColor(u.id).toFormat(ie)),n.close();}},[n,a,e]);return jsx("div",{className:classNames(Zr,"BaselineUI-ColorInput-Presets"),style:{minWidth:o.current?.offsetWidth},ref:i,children:jsx(le,{autoFocus:r,items:a,layout:"grid","aria-label":s("colorPresets"),className:Gr,renderOption:Jr,selectionMode:"single",selectedKeys:[t?.toString(Do)||Re],onSelectionChange:p})})});Wn.displayName="ColorPresetList";var Fo=rt.forwardRef(({color:e,colorLabel:t,colorName:o,...r},a)=>{let n=rt.useRef(null),{hoverProps:i,isHovered:s}=useHover({isDisabled:r.isDisabled}),{buttonProps:p,isPressed:l}=useButton(r,n),{isFocusVisible:c,focusProps:u}=useFocusRing(),m=filterTruthyValues({"data-block-id":r["data-block-id"],"data-focused":c,"data-focus-visible":c,"data-disabled":r.isDisabled,"data-hovered":s,"data-pressed":l}),d=ar(),f=ar();return jsxs("button",{...mergeProps(p,i,u,m),style:r.style,className:classNames(Pd({isHovered:s,isFocusVisible:c||r.isOpen,isDisabled:r.isDisabled,labelPosition:r.labelPosition}),"BaselineUI-ColorInputButton",r.className),ref:M(a,n),id:d,"aria-labelledby":r["aria-labelledby"]||`${d} ${f}`,children:[jsx(Qe,{color:e?.toString("hexa")}),t?jsx("div",{className:wd,id:f,"aria-hidden":"true",children:o}):typeof o=="string"&&jsx(VisuallyHidden,{children:o})]})});Fo.displayName="ColorInputButton";var ra=rt.forwardRef(({className:e,style:t,icon:o,...r},a)=>{let n=rt.useRef(null),{hoverProps:i,isHovered:s}=useHover({isDisabled:r.isDisabled}),{buttonProps:p,isPressed:l}=useButton(r,n),{isFocusVisible:c,focusProps:u}=useFocusRing(),m=filterTruthyValues({"data-block-id":r["data-block-id"],"data-focused":c,"data-focus-visible":c,"data-disabled":r.isDisabled,"data-hovered":s,"data-pressed":l});return jsxs("button",{...mergeProps(p,i,u,m),ref:M(a,n),style:t,className:classNames(Nd({isHovered:s||l||r.isOpen,isFocusVisible:c,isDisabled:r.isDisabled}),"BaselineUI-IconColorInputButton",e),children:[jsx(o,{size:16}),jsx("div",{className:Cd,style:{backgroundColor:r.color||void 0}})]})});ra.displayName="IconColorInputButton";function lu({colorLabel:e,color:t,presets:o}){let{formatMessage:r}=H(),{locale:a}=useLocale(),n=useMemo(()=>o.find(p=>p.id===Re?!t:t?Hd(t,parseColor(p.id)):!1),[o,t]),i=useMemo(()=>typeof e=="function"?e?.(t):e?Fd(t,n,r(rx.transparent)):!1,[t,e,r,n]),s=useMemo(()=>{if(n?.label)return n.label;t?.getColorName(a);},[t,a,n?.label]);return {colorName:i,humanReadableName:s}}var rx=U({transparent:{defaultMessage:"Transparent",id:"transparent"}});var Gt=rt.forwardRef(({className:e,style:t,allowRemoval:o,allowAlpha:r=!0,presets:a,labelPosition:n="top",colorLabel:i=!0,includePicker:s=!0,onChange:p,onChangeEnd:l,defaultValue:c,storePickedColorKey:u="baselinePickedColor",value:m,addColorButtonLabel:d,removeColorButtonLabel:f,customColorsLabel:y,renderTriggerButton:b=({isOpen:C,color:T,ref:N,colorName:k,triggerProps:S,labelId:P})=>jsx(Fo,{...mergeProps(S,{...w.label?{"aria-labelledby":P}:{"aria-label":w["aria-label"]}}),ref:N,isOpen:C,isDisabled:w.isDisabled,labelPosition:n,color:T,colorLabel:i,colorName:k}),pickerMode:v="active",offset:_=2,placement:g=n==="start"?"bottom end":"bottom start","data-block-id":h,"data-block-class":R,...w},x)=>{let C=rt.useRef(null),T=rt.useRef(null),N=useOverlayTriggerState(w),{triggerProps:k,overlayProps:S}=useOverlayTrigger({type:"listbox"},N,C),P=ge(w.portalContainer),[I,D]=useControlledState(m===void 0?void 0:st(m),st(c),K=>p?.(K?.toFormat("rgba")||null)),{formatMessage:F}=H(Ze),B=useMemo(()=>Vd(F(aa.noColor),a),[a,F]),j=useId(),{colorName:A}=lu({colorLabel:i,color:I,presets:B}),X=useMemo(()=>B.filter(K=>o||K.id!==Re),[B,o]),$=d||F(aa.addColor),te=f||F(aa.removeColor),V=y||F(aa.customColors),Y=jsx(Jd,{color:I||Bo,setColor:K=>{D(K),l?.(K?.toFormat("rgba")||null);},storePickedColorKey:u,addColorButtonLabel:$,removeColorButtonLabel:te,customColorsLabel:V,pickerMode:v,allowAlpha:r});return jsxs(Fragment,{children:[jsxs("div",{className:classNames({[kd]:n==="start"},"BaselineUI-ColorInput-Trigger",e),"data-block-id":h,"data-block-class":R,style:t,ref:x,children:[w.label?jsx("label",{id:j,className:Id({labelPosition:n}),children:w.label}):null,b({isOpen:N.isOpen,color:I,ref:C,colorName:A,triggerProps:k,labelId:j})]}),jsx(ye,{...w,portalContainer:P,placement:g,state:N,offset:_,className:classNames(Yr,"BaselineUI-ColorInput-Popover"),triggerRef:C,overlayProps:S,children:jsxs(me,{size:"content",className:Xr({includesCustomColorPicker:s}),ref:T,"aria-labelledby":j,"aria-label":w["aria-label"],children:[s&&v==="active"?jsxs(Fragment,{children:[jsx(ea,{color:I||Bo,setColor:D,allowAlpha:r,onChangeEnd:K=>{l?.(K?.toFormat("rgba")||null);}}),Y]}):null,!!X.length&&jsxs(Fragment,{children:[s&&v==="active"?jsx(O,{}):null,jsx(Wn,{autoFocus:s&&v==="active"?!1:"first",state:N,triggerRef:C,presets:X,color:I,setColor:K=>{D(K),l?.(K?.toFormat("rgba")||null);}})]}),s&&v==="lazy"?Y:null]})})]})});Gt.displayName="ColorInput";var aa=U({addColor:{defaultMessage:"Add color",id:"addColor"},removeColor:{defaultMessage:"Remove color",id:"removeColor"},customColors:{defaultMessage:"Custom colors",id:"customColors"},noColor:{defaultMessage:"No color",id:"noColor"},transparent:{defaultMessage:"Transparent",id:"transparent"}});var uu=rt.forwardRef(({className:e,style:t,icon:o,variant:r="standard","data-block-id":a,tooltipProps:n,...i},s)=>{let p=rt.useRef(null),l=useCallback(({isOpen:c,color:u,ref:m,colorName:d,triggerProps:f})=>jsx(ne,{variant:"inverse",size:"sm",includeArrow:!1,text:i["aria-label"],placement:"bottom start",offset:4,...n,children:r==="standard"?jsx(Fo,{...f,"aria-label":i["aria-label"],ref:m,isOpen:c,isDisabled:i.isDisabled,color:u,colorLabel:!1,colorName:d}):jsx(ra,{...f,isOpen:c,icon:TextIcon,color:u?.toString("hexa"),ref:m,isDisabled:i.isDisabled,"aria-label":i["aria-label"]})}),[i,n,r]);return jsxs(L,{display:"flex",flexDirection:"row",gap:"md",paddingX:r==="standard"?"md":"none",alignItems:"center",className:classNames("BaselineUI-IconColorInput",e),"data-block-id":a,style:t,ref:M(s,p),children:[r==="standard"&&o?jsx(o,{size:24,className:sprinkles({color:"icon.primary"})}):null,jsx(Gt,{...i,colorLabel:!1,renderTriggerButton:l})]})});uu.displayName="IconColorInput";var mu={ar:{redo:"\u0625\u0639\u0627\u062F\u0629",undo:"\u062A\u0631\u0627\u062C\u0639"},cs:{redo:"Opakovat",undo:"Zru\u0161it"},cy:{redo:"Ail-wneud",undo:"Dad-wneud"},da:{redo:"Gentag",undo:"Fortryd"},de:{redo:"Wiederholen",undo:"R\xFCckg\xE4ngig machen"},el:{redo:"\u0395\u03C0\u03B1\u03BD\u03AC\u03BB\u03B7\u03C8\u03B7",undo:"\u0391\u03BD\u03B1\u03AF\u03C1\u03B5\u03C3\u03B7"},"en-GB":{redo:"Redo",undo:"Undo"},en:{redo:"Redo",undo:"Undo"},es:{redo:"Rehacer",undo:"Deshacer"},fi:{redo:"Tee sittenkin",undo:"Peru"},"fr-CA":{redo:"R\xE9tablir",undo:"Annuler"},fr:{redo:"R\xE9tablir",undo:"Annuler"},he:{redo:"\u05D1\u05D9\u05E6\u05D5\u05E2 \u05DE\u05D7\u05D3\u05E9",undo:"\u05D1\u05D9\u05D8\u05D5\u05DC \u05E4\u05E2\u05D5\u05DC\u05D4"},hr:{redo:"Ponovi",undo:"Vrati"},id:{redo:"Ulangi",undo:"Kembalikan"},it:{redo:"Ripristina",undo:"Annulla"},ja:{redo:"\u3084\u308A\u76F4\u3059",undo:"\u53D6\u308A\u6D88\u3059"},ko:{redo:"\uC2E4\uD589\uBCF5\uADC0",undo:"\uC2E4\uD589\uCDE8\uC18C"},ms:{redo:"Buat Semula",undo:"Buat Asal"},"nb-NO":{redo:"Gj\xF8r om igjen",undo:"Angre"},nl:{redo:"Opnieuw",undo:"Herstel"},pl:{redo:"Pon\xF3w",undo:"Cofnij"},"pt-PT":{redo:"Refazer",undo:"Desfazer"},pt:{redo:"Refazer",undo:"Desfazer"},ru:{redo:"\u041F\u043E\u0432\u0442\u043E\u0440\u0438\u0442\u044C",undo:"\u041E\u0442\u043C\u0435\u043D\u0438\u0442\u044C"},sk:{redo:"Opakova\u0165",undo:"Zru\u0161i\u0165"},sl:{redo:"Uveljavi",undo:"Razveljavi"},sv:{redo:"G\xF6r om",undo:"\xC5ngra"},th:{redo:"\u0E17\u0E33\u0E0B\u0E49\u0E33",undo:"\u0E16\u0E2D\u0E19\u0E04\u0E33\u0E2A\u0E31\u0E48\u0E07\u0E01\u0E25\u0E31\u0E1A"},tr:{redo:"Yinele",undo:"Geri Al"},uk:{redo:"\u041F\u043E\u0432\u0442\u043E\u0440\u0438\u0442\u0438",undo:"\u0421\u043A\u0430\u0441\u0443\u0432\u0430\u0442\u0438"},"zh-Hans":{redo:"\u91CD\u505A",undo:"\u64A4\u9500"},"zh-Hant":{redo:"\u91CD\u4F5C",undo:"\u5FA9\u539F"}};var na=z({defaultClassName:"mnnh5s1 _1yep5z6i2 _1yep5z6i3 _1yep5z6i4 _1yep5z6kz _1yep5z6l2 _1yep5z6le _1yep5z6ld _1yep5z6ih _1yep5z6ii _1yep5z6ij _1yep5z6j8 _1yep5z6j9 _1yep5z6ja _1yep5z6k2 _1yep5z6k3 _1yep5z6k4 _1yep5z6lc",variantClassNames:{isInline:{true:"mnnh5s2 _1yep5z6wd _1yep5z6we _1yep5z6wf _1yep5z6x1 _1yep5z6x2 _1yep5z6x3 _1yep5z6xp _1yep5z6xq _1yep5z6xr _1yep5z6yd _1yep5z6ye _1yep5z6yf _1yep5z612s _1yep5z617h _1yep5z617i",false:"_1yep5z6174 _1yep5z611w"},isHovered:{true:"mnnh5s4"},hasLoadedImage:{true:"_1yep5z611v"},includeCheckeredBackground:{true:"mnnh5s6"},showFocusRing:{true:"_1yep5z6130 _1yep5z617a _1yep5z6178 _1yep5z613h _1yep5z617b"},isDisabled:{true:"mnnh5s8 _1yep5z6z2"}},defaultVariants:{},compoundVariants:[[{isHovered:!0,hasLoadedImage:!1},"_1yep5z61nv"],[{isHovered:!0,hasLoadedImage:!0},"mnnh5s9"],[{isInline:!0,isDisabled:!0},"_1yep5z61ok"],[{hasLoadedImage:!0,includeCheckeredBackground:!0},"_1yep5z61nn"]]}),fu="_1yep5z6d8",ia=z({defaultClassName:"mnnh5sa",variantClassNames:{isInline:{true:"mnnh5sb",false:"mnnh5sc"},isDisabled:{true:"mnnh5sd"},hasLoadedImage:{true:"mnnh5s0"}},defaultVariants:{},compoundVariants:[]});var yu=z({defaultClassName:"_1i0ytqa3 _1yep5z6i2 _1yep5z6i3 _1yep5z6i4 _1yep5z6lc _1yep5z6ld _1yep5z6lf",variantClassNames:{isFocusVisible:{true:"_1i0ytqa4"},isInline:{true:"_1yep5z6124",false:"_1yep5z6126"},isDisabled:{true:"_1i0ytqa7 _1yep5z6z2",false:"_1i0ytqa8"}},defaultVariants:{},compoundVariants:[[{isInline:!0,isFocusVisible:!0},"_1i0ytqa9 _1yep5z61og _1yep5z61t8 _1yep5z61ta"],[{isInline:!1,isFocusVisible:!0},"_1i0ytqaa"],[{isInline:!0,isDisabled:!0},"_1yep5z61nw"],[{isInline:!1,isDisabled:!0},"_1yep5z61ny"]]}),bu="_1i0ytqa0",sa=z({defaultClassName:"_1i0ytqab _1yep5z63r _1yep5z63s _1yep5z63t _1yep5z61f _1yep5z61g _1yep5z61h _1yep5z63 _1yep5z64 _1yep5z65 _1yep5z62f _1yep5z62g _1yep5z62h _1yep5z6ih _1yep5z6ii _1yep5z6ij _1yep5z6k2 _1yep5z6k3 _1yep5z6k4 _1yep5z6lc",variantClassNames:{isInline:{false:"_1yep5z611v"},isDisabled:{true:"_1i0ytqad _1yep5z6z2"}},defaultVariants:{},compoundVariants:[]}),gu=z({defaultClassName:"_1i0ytqa1 _1yep5z63 _1yep5z64 _1yep5z65 _1yep5z62f _1yep5z62g _1yep5z62h _1yep5z6ih _1yep5z6ii _1yep5z6ij _1yep5z6iq _1yep5z6ir _1yep5z6is _1yep5z6k8 _1yep5z6k9 _1yep5z6ka _1yep5z6j8 _1yep5z6j9 _1yep5z6ja _1yep5z6lc",variantClassNames:{isInline:{false:"_1yep5z63r _1yep5z63s _1yep5z63t _1yep5z619 _1yep5z61a _1yep5z61b"}},defaultVariants:{},compoundVariants:[]});function vu({line:e,options:t}){let o=useRef([]),r=useMemo(()=>{let a=Math.ceil(e.length/Wt),n;for(let i=0;i<a;i++)if(!(!(i===a-1)&&!!o.current[i])){let l=e.slice(i*Wt-(i>0?1:0),i*Wt+Wt);n=getSvgPathFromStroke(getStroke(l.map(([c,u,m])=>({x:c,y:u,pressure:m})),t)),l.length>=(i>0?Wt+1:Wt)&&(o.current[i]=n);}return n},[e,t]);return [...o.current,r]}var Wt=60*3;var Mx={size:1,thinning:0,smoothing:0,streamline:0,easing:e=>e,start:{taper:0,easing:e=>e,cap:!0},end:{taper:0,easing:e=>e,cap:!0},simulatePressure:!1},zu=rt.forwardRef(({className:e,style:t,canvasClassName:o,canvasStyle:r,isBound:a=!0,strokeWidth:n=2,strokeColor:i="#3A87FD",onChange:s,defaultValue:p,onChangeEnd:l,enableHistory:c=!1,isInline:u=!0,isDisabled:m,placeholder:d,clearLabel:f,undoLabel:y,redoLabel:b,footerClassName:v,canvasRef:_,value:g,footerStyle:h,"data-block-id":R,"data-block-class":w,"aria-label":x="Drawing canvas",description:C="This is a canvas for drawing using a mouse or touch input.",...T},N)=>{let k=H(mu),S=rt.useRef(null),[P,I]=rt.useState(g||p||[]),D=rt.useMemo(()=>({...Mx,...T}),[T]),[F,B]=rt.useState(),j=useId(),{labelProps:A,fieldProps:X}=useLabel({...T,"aria-label":x,labelElementType:"span"}),{isFocusVisible:$,focusProps:te}=useFocusRing({within:!0}),{hoverProps:V,isHovered:Y}=useHover({isDisabled:m}),{undo:K,redo:Ce,canRedo:Pe,canUndo:ze,push:Se}=rl(P,{onAction:G=>{G&&(I(G),l?.(G));},isDisabled:!c}),{keyboardProps:Fe}=useKeyboard({onKeyDown:G=>{G.key==="Backspace"?gt():G.key==="z"&&(G.metaKey||G.ctrlKey)&&(G.shiftKey?Pe&&Ce():ze&&K());}}),[ee,de]=useState(!1),so=useCallback(G=>{let W=G.currentTarget.getBoundingClientRect();B(W),G.target.setPointerCapture(G.pointerId);let pe=[G.clientX-W.x,G.clientY-W.y,G.pressure];I(Z=>[...Z,[pe]]),de(!0);},[]),lo=useCallback(G=>{if(G.buttons!==1||!F)return;let pe=Cu(G.nativeEvent).map(Z=>[a?clamp(Z.clientX-F.left,0,F.width):Z.clientX-F.left,a?clamp(Z.clientY-F.top,0,F.height):Z.clientY-F.top,Z.pressure]);I(Z=>{let he=[...Z];return he[Z.length-1]=[...he[Z.length-1],...pe],he});},[F,a]),po=()=>{F&&(l?.(P),Se(P),de(!1));};useEffect(()=>{s?.(P);},[P,s]);let gt=()=>{I([]),s?.([]),Se([]);};return jsxs("div",{ref:M(S,N),className:classNames(bu,"BaselineUI-FreehandCanvas",e),style:t,"aria-disabled":m,"data-block-id":R,"data-block-class":w,children:[T.label||c?jsxs("div",{className:gu({isInline:u}),children:[T.label?jsx(Q,{type:"label",size:"sm",...A,children:T.label}):jsx("span",{}),c?jsxs("div",{children:[jsx(E,{variant:"secondary",size:"sm",isDisabled:!ze||m,icon:UndoIcon,onPress:K,"aria-label":y||k.formatMessage("undo")}),jsx(E,{variant:"secondary",size:"sm",isDisabled:!Pe||m,icon:RedoIcon,onPress:Ce,"aria-label":b||k.formatMessage("redo")})]}):null]}):null,jsxs("div",{role:"application",...mergeProps(te,Fe,V,X),tabIndex:m?void 0:0,className:classNames(na({isInline:u,isHovered:Y}),yu({isFocusVisible:$,isInline:u,isDisabled:!!m}),o),"aria-describedby":T["aria-describedby"]||j,style:r,ref:_,children:[jsx(VisuallyHidden,{children:jsx("div",{id:j,children:C})}),jsx("svg",{width:r?.width||"100%",height:r?.height||"100%",onPointerDown:so,onPointerMove:lo,onPointerUp:po,children:(g||P).map((G,W,pe)=>W<pe.length-1||!ee?jsx(hu,{line:G,options:D,strokeColor:i,strokeWidth:n},W):jsx(xu,{line:G,options:D,strokeColor:i,strokeWidth:n},W))})]}),d||f?jsx("div",{style:h,className:classNames(sa({isInline:u,isDisabled:m}),v),children:(P.length||!d)&&f?jsx(q,{size:"sm",variant:"ghost",label:f,isDisabled:m,onPress:gt}):jsx(q,{size:"sm",variant:"ghost",label:d,isDisabled:!0})}):null]})});zu.displayName="FreehandCanvas";var hu=rt.memo(({line:e,options:t,strokeColor:o,strokeWidth:r})=>{let a=useMemo(()=>getSvgPathFromStroke(getStroke(e.map(([n,i,s])=>({x:n,y:i,pressure:s})),t)),[e,t]);return jsx("path",{d:a,stroke:o,strokeWidth:r})});hu.displayName="Stroke";var xu=rt.memo(({line:e,options:t,strokeColor:o,strokeWidth:r})=>{let a=vu({line:e,options:t});return jsx(Fragment,{children:a.map((n,i)=>jsx("path",{d:n,stroke:o,strokeWidth:r},i))})});xu.displayName="SplitStroke";function Cu(e){if(typeof e.getCoalescedEvents=="function"){let t=e.getCoalescedEvents();return t.length>0?t.flatMap(o=>Cu(o)):[e]}return [e]}var Pu="_1vac7ws0",ku=z({defaultClassName:"_1vac7ws1",variantClassNames:{isDragging:{true:"_1vac7ws2"}},defaultVariants:{},compoundVariants:[]});function wu(e,t){let[o,r]=useState([]),a=()=>e?.flatMap(n=>[...t.querySelectorAll(n)]).map(n=>({current:n}));return useGranularEffect(()=>{r(a());},[],[a]),useGranularEffect(()=>{let n=a();r(n);},[e],[a]),o}function Ru(e){let{scrollable:t,ownerDocument:o,onScroll:r}=e;useEffect(()=>{let a=getHTMLElement(t,o);if(a)return (a.style.position==="static"||!a.style.position)&&console.warn("Scrollable ancestor passed to `Transform` component should not be statically positioned."),a.addEventListener("scroll",r),()=>{a.removeEventListener("scroll",r);}},[t,r,o]);}var Yx=makeMoveable([Draggable,Resizable,Rotatable,Snappable]),Tu=rt.forwardRef(({className:e,children:t,isRotatable:o,isResizable:r,isDraggable:a,style:n,onTransform:i,onTransformStart:s,onTransformEnd:p,onDoubleClick:l,onDragStart:c,onDragEnd:u,onDrag:m,onResizeStart:d,onResizeEnd:f,onResize:y,onRotateStart:b,onRotateEnd:v,onRotate:_,onSnap:g,isSnappable:h,elementGuidelines:R,hideAnchorOnDrag:w=!0,title:x,rotationPosition:C,autoUpdate:T,bound:N,snapRotationDegrees:k,snapRotationThreshold:S,scrollableAncestor:P,renderDirections:I,stopPropagation:D,transformOrigin:F,preventDefault:B},j)=>{let A=useRef(null),X=useRef(null),[$,te]=useState(document),V=useRef($.createElement("div")),[Y,K]=useState({}),[Ce,Pe]=useState(!1),[ze,Se]=useState(!1),[Fe,ee]=useState(),de=wu(R,$);useLayoutEffect(()=>{let W=V.current;return V.current=$.createElement("div"),()=>{W.remove();}},[$]);let{keyboardProps:so}=useKeyboard({onKeyDown:W=>{let pe=W.shiftKey?10:1,Z=W.metaKey||W.ctrlKey;Z&&W.shiftKey&&(pe=45);function he(co,Py="x"){Z?X.current?.request("rotatable",{deltaRotate:co*pe},!0):X.current?.request("draggable",Py==="x"?{deltaX:co*pe}:{deltaY:co*pe},!0);}switch(W.key){case"ArrowRight":{he(1);break}case"ArrowLeft":{he(-1);break}case"ArrowUp":{he(-1,"y");break}case"ArrowDown":he(1,"y");}requestAnimationFrame(()=>{X.current?.updateRect();});}});useEffect(()=>{let W=ue(A.current);te(W);let pe=V.current;W.body.append(V.current);function Z(co){Se(co.shiftKey);}function he(){Se(!1);}return W.addEventListener("keydown",Z),W.addEventListener("keyup",he),()=>{W.removeEventListener("keydown",Z),W.removeEventListener("keyup",he),pe.remove();}},[]),Ru({scrollable:P,onScroll:()=>{X.current?.updateRect();},ownerDocument:$});let lo=useCallback(W=>{K(pe=>({...pe,...W.style})),i?.(W);},[i]),po=useCallback(W=>{if(Pe(!0),A.current?.focus(),N){let Z=getHTMLElement(N,$)?.getBoundingClientRect();ee({position:"client",left:Z?.left??0,top:Z?.top??0,right:Z?.right??0,bottom:Z?.bottom??0});}c?.(W);},[N,$,c]),gt=useCallback(W=>{Pe(!1),u?.(W);},[u]),G=t({style:{...Y.width&&{width:Y.width},...Y.height&&{height:Y.height}}});return jsxs(Fragment,{children:[jsx("div",{role:"button",...so,ref:M(A,j),style:{display:"inline-block",...n,...Y},className:classNames(Pu,e),onDoubleClick:l,tabIndex:0,title:x,children:G}),createPortal(jsx(Yx,{ref:X,target:A,draggable:a,resizable:r,rotatable:o,keepRatio:ze,throttleDrag:1,snappable:h||!!N,elementGuidelines:de,snapRenderThreshold:.9,className:ku({isDragging:Ce&&w}),onRender:lo,onDragStart:po,onDragEnd:gt,useResizeObserver:T,useMutationObserver:T,onRenderEnd:p,onDrag:m,onResizeStart:d,onResizeEnd:f,onResize:y,onRotateStart:b,onRotateEnd:v,onRotate:_,onRenderStart:s,onSnap:g,rotationPosition:C,bounds:Fe,snapRotationDegrees:k,snapRotationThreshold:S,renderDirections:I,stopPropagation:D,preventDefault:B,transformOrigin:F}),V.current)]})});Tu.displayName="Transform";var Nu={ar:{delete:"\u062D\u0630\u0641",selectImage:"\u062A\u062D\u062F\u064A\u062F \u0635\u0648\u0631\u0629"},cs:{delete:"Smazat",selectImage:"Vybrat obr\xE1zek"},cy:{delete:"Dileu",selectImage:"Dewiswch Ddelwedd"},da:{delete:"Slet",selectImage:"V\xE6lg billede"},de:{delete:"L\xF6schen",selectImage:"Bild ausw\xE4hlen"},el:{delete:"\u0394\u03B9\u03B1\u03B3\u03C1\u03B1\u03C6\u03AE",selectImage:"\u0395\u03C0\u03B9\u03BB\u03BF\u03B3\u03AE \u03B5\u03B9\u03BA\u03CC\u03BD\u03B1\u03C2"},"en-GB":{delete:"Delete",selectImage:"Select Image"},en:{delete:"Delete",selectImage:"Select Image"},es:{delete:"Eliminar",selectImage:"Seleccionar imagen"},fi:{delete:"Poista",selectImage:"Valitse kuva"},"fr-CA":{delete:"Supprimer",selectImage:"S\xE9lectionner une image"},fr:{delete:"Supprimer",selectImage:"S\xE9lectionner une image"},he:{delete:"\u05DE\u05D7\u05D9\u05E7\u05D4",selectImage:"\u05D1\u05D7\u05D9\u05E8\u05EA \u05EA\u05DE\u05D5\u05E0\u05D4"},hr:{delete:"Obri\u0161i",selectImage:"Odaberi sliku"},id:{delete:"Hapus",selectImage:"Pilih Gambar"},it:{delete:"Elimina",selectImage:"Seleziona immagine"},ja:{delete:"\u524A\u9664",selectImage:"\u30A4\u30E1\u30FC\u30B8\u3092\u9078\u629E"},ko:{delete:"\uC0AD\uC81C",selectImage:"\uC774\uBBF8\uC9C0 \uC120\uD0DD"},ms:{delete:"Padam",selectImage:"Pilih Imej"},"nb-NO":{delete:"Slett",selectImage:"Velg bilde"},nl:{delete:"Verwijder",selectImage:"Selecteer afbeelding"},pl:{delete:"Usu\u0144",selectImage:"Wybierz obraz"},"pt-PT":{delete:"Apagar",selectImage:"Selecionar imagem"},pt:{delete:"Apagar",selectImage:"Selecionar Imagem"},ru:{delete:"\u0423\u0434\u0430\u043B\u0438\u0442\u044C",selectImage:"\u0412\u044B\u0431\u0440\u0430\u0442\u044C \u0438\u0437\u043E\u0431\u0440."},sk:{delete:"Zmaza\u0165",selectImage:"Vybra\u0165 obr\xE1zok"},sl:{delete:"Izbri\u0161i",selectImage:"Izberi sliko"},sv:{delete:"Radera",selectImage:"V\xE4lj bild"},th:{delete:"\u0E25\u0E1A",selectImage:"\u0E40\u0E25\u0E37\u0E2D\u0E01\u0E23\u0E39\u0E1B\u0E20\u0E32\u0E1E"},tr:{delete:"Sil",selectImage:"Resim Se\xE7"},uk:{delete:"\u0412\u0438\u0434\u0430\u043B\u0438\u0442\u0438",selectImage:"\u041E\u0431\u0440\u0430\u0442\u0438 \u0437\u043E\u0431\u0440\u0430\u0436\u0435\u043D\u043D\u044F"},"zh-Hans":{delete:"\u5220\u9664",selectImage:"\u9009\u62E9\u56FE\u50CF"},"zh-Hant":{delete:"\u522A\u9664",selectImage:"\u9078\u53D6\u5716\u50CF"}};var Eu=rt.forwardRef(({className:e,style:t,isInline:o=!0,accept:r="image/*",defaultImageSrc:a,imageSrc:n,imageAlt:i,pickerButtonLabel:s,isDisabled:p,onDrop:l,onPaste:c,includeCheckeredBackground:u=!0,"data-block-id":m,"data-block-class":d,pickerButtonStyle:f,pickerButtonClassName:y,footerClassName:b,footerStyle:v,clearLabel:_,placeholder:g,labelStyle:h,labelClassName:R,...w},x)=>{let C=rt.useRef(null),T=rt.useRef(null),{formatMessage:N}=H(Nu),[k,S]=useControlledState(n,a||null,ee=>{invariant(typeof ee!="string"),w.onValueChange?.(ee?[ee]:[]);}),P=useMemo(()=>cC(k||void 0),[k]),{fieldProps:I,labelProps:D}=useField(w),{dropProps:F,isDropTarget:B}=useDrop({ref:C,onDrop:async ee=>{if(p)return;let de=await _n({items:ee.items});de.length&&S(de[0]),l?.(ee);},...w}),{clipboardProps:j}=useClipboard({onPaste:async ee=>{if(p)return;let de=await _n({items:ee});de.length&&S(de[0]),c?.(ee);},...w}),A=()=>{S(null),T.current&&(T.current.value="");},X={type:"file",onChange:ee=>{let de=[...ee.target.files];S(de[0]),w.onChange?.(ee);},accept:r,disabled:p},{focusProps:$,isFocused:te,isFocusVisible:V}=useFocusRing({within:!0}),{hoverProps:Y,isHovered:K}=useHover({isDisabled:p}),{imgProps:Ce,isLoading:Pe,isLoaded:ze}=kt({src:P,alt:i||""}),Se={label:s||N("selectImage"),onPress:()=>C.current?.click(),variant:"secondary",isDisabled:p,excludeFromTabOrder:!0,className:classNames(br({isFocusVisible:V}),{[fu]:B&&!p},y),style:f},Fe=filterTruthyValues({"data-loaded":ze,"data-block-id":m,"data-block-class":d,"data-hovered":K,"data-focused":te,"data-drop-target":B,"data-disabled":p,"data-focus-visible":V});return jsxs(L,{...Fe,className:classNames("BaselineUI-ImageDropZone",e),display:"flex",flexDirection:"column",alignItems:"center",style:t,ref:x,children:[jsxs("label",{...mergeProps(F,Y,$,D),className:classNames(na({isInline:o,isHovered:K,isDisabled:p,hasLoadedImage:!!P&&ze,showFocusRing:B||!!P&&V}),R),style:h,ref:C,children:[jsx(VisuallyHidden,{children:jsx("input",{...mergeProps(I,j,X),ref:T})}),!P&&jsx(q,{...Se}),!!P&&(Pe?jsx(jt,{}):jsx("img",{className:ia({isInline:o,isDisabled:p,hasLoadedImage:!!P&&ze&&u}),...Ce}))]}),g||_?jsx("div",{style:v,className:classNames(sa({isInline:o,isDisabled:p}),b),children:(P||!g)&&_?jsx(q,{size:"sm",variant:"ghost",label:_,isDisabled:p,onPress:A}):jsx(q,{size:"sm",variant:"ghost",label:g,isDisabled:!0})}):null]})});Eu.displayName="ImageDropZone";function cC(e){return e instanceof File?URL.createObjectURL(e):e}var Du="_1vm2oh49 _1yep5z6i5 _1yep5z6i6 _1yep5z6i7 _1yep5z6g4",oi="_1vm2oh48 _1yep5z6ld _1yep5z6ih _1yep5z6ii _1yep5z6ij _1yep5z6j8 _1yep5z6j9 _1yep5z6ja _1yep5z6k2 _1yep5z6k3 _1yep5z6k4 _1yep5z6jt _1yep5z6ju _1yep5z6jv",Bu=z({defaultClassName:"_1vm2oh40 mnnh5s1 _1yep5z6ih _1yep5z6ii _1yep5z6ij _1yep5z6li _1yep5z6lg _1yep5z6i1 _1yep5z6lj _1yep5z6j8 _1yep5z6j9 _1yep5z6ja _1yep5z6kz _1yep5z6le _1yep5z6i2 _1yep5z6i3 _1yep5z6i4",variantClassNames:{accent:{theme:"_1vm2oh41",positive:"_1vm2oh42"},isInline:{true:"mnnh5s2 _1yep5z6wa _1yep5z6wb _1yep5z6wc _1yep5z6wy _1yep5z6wz _1yep5z6x0 _1yep5z6xm _1yep5z6xn _1yep5z6xo _1yep5z6ya _1yep5z6yb _1yep5z6yc _1yep5z612r _1yep5z617g _1yep5z617i",false:"_1yep5z6126"},isFocusVisible:{true:"_1yep5z6130 _1yep5z617a _1yep5z6178 _1yep5z613h _1yep5z617b"},isDisabled:{true:"mnnh5s8 z9nup83 _1yep5z6z2"},isHovered:{true:"_1vm2oh47"}},defaultVariants:{},compoundVariants:[[{accent:"positive",isInline:!0},"_1yep5z61nw"],[{accent:"theme",isInline:!0},"_1yep5z61nl"],[{accent:"positive",isInline:!1},"_1yep5z61ny"],[{accent:"theme",isInline:!1},"_1yep5z61nn"],[{isFocusVisible:!0,isInline:!0},"_1yep5z61p9 _1yep5z61t0 _1yep5z61t2 _1yep5z61t3"],[{isHovered:!0,isInline:!0},"_1yep5z61t3 _1yep5z61p9 _1yep5z61t0 _1yep5z61t2"],[{isHovered:!0,isInline:!1,accent:"positive"},"_1yep5z61nx"],[{isHovered:!0,isInline:!1,accent:"theme"},"_1yep5z61np"],[{isHovered:!0,isInline:!0,accent:"theme"},"_1yep5z61nm"]]});var Vu=rt.forwardRef(({className:e,style:t,isDisabled:o,isInline:r=!0,imageAlt:a,imageSrc:n,svgSrc:i,textValue:s,textStyle:p,onPress:l,onDelete:c,deleteAriaLabel:u,addAriaLabel:m,accent:d="positive","data-block-id":f,"data-block-class":y,...b},v)=>{let{focusProps:_,isFocused:g,isFocusVisible:h}=useFocusRing({within:!0}),{isHovered:R,hoverProps:w}=useHover({isDisabled:o}),{pressProps:x}=usePress({isDisabled:o,onPress:l});invariant(n||i||s,"Preview must have content. You must provide either an `imageSrc`, `svgSrc`, or `textValue` prop.");let C=filterTruthyValues({"data-hovered":R,"data-focus-visible":h,"data-focused":g,"data-disabled":o});return jsxs("div",{...b,className:classNames(Bu({isInline:r,isFocusVisible:h,isDisabled:o,isHovered:R,accent:d}),"BaselineUI-Preview",e),"data-block-id":f,"data-block-class":y,"aria-label":b["aria-label"]||a||s,style:t,ref:v,children:[typeof i=="string"?jsx("button",{disabled:o,...mergeProps(w,_,x,C),className:oi,"aria-label":m,dangerouslySetInnerHTML:{__html:i}}):jsxs("button",{...mergeProps(w,_,x,C),disabled:o,style:p,"aria-label":m,className:oi,children:[n?jsx("img",{src:n,alt:a,className:ia({isInline:r,isDisabled:o})}):null,!!i&&typeof i=="object"&&i,s]}),c?jsx(E,{isDisabled:o,className:Du,"aria-label":u,size:"xs",icon:TrashIcon,onPress:c}):null]})});Vu.displayName="Preview";var Ou="_1yep5z6ih _1yep5z6ii _1yep5z6ij _1yep5z6it _1yep5z6iu _1yep5z6iv _1yep5z69c _1yep5z69d _1yep5z69e",ju=z({defaultClassName:"cw3m0n8 _1yep5z6ew _1yep5z6dv",variantClassNames:{isDisabled:{true:"_1yep5z610q"}},defaultVariants:{},compoundVariants:[]}),Au="cw3m0n7",$u=z({defaultClassName:"cw3m0n0 _1yep5z6ih _1yep5z6ii _1yep5z6ij _1yep5z6j8 _1yep5z6j9 _1yep5z6ja _1yep5z6iq _1yep5z6ir _1yep5z6is",variantClassNames:{labelPosition:{end:"_1yep5z614i _1yep5z614j _1yep5z614k _1yep5z6va _1yep5z6vb _1yep5z6vc",start:"_1yep5z614o _1yep5z614p _1yep5z614q _1yep5z6160 _1yep5z6161 _1yep5z6162"}},defaultVariants:{},compoundVariants:[]}),Uu="_1yep5z6ai _1yep5z6aj _1yep5z6ak _1yep5z6b6 _1yep5z6b7 _1yep5z6b8 _1yep5z6bu _1yep5z6bv _1yep5z6bw _1yep5z6ci _1yep5z6cj _1yep5z6ck _1yep5z6ih _1yep5z6ii _1yep5z6ij _1yep5z6it _1yep5z6iu _1yep5z6iv _1yep5z69i _1yep5z69j _1yep5z69k _1yep5z6l9",qu=z({defaultClassName:"cw3m0n3 _16vugd06",variantClassNames:{isFocusVisible:{true:"_16vugd09"},isSelected:{true:"_16vugd08"},isDisabled:{true:"_16vugd0b"}},defaultVariants:{},compoundVariants:[]});var wC=({label:e,description:t},{isSelected:o,isFocusVisible:r,isDisabled:a,optionLabelPosition:n})=>jsxs("div",{className:$u({labelPosition:n}),children:[jsx("div",{className:qu({isSelected:o,isFocusVisible:r,isDisabled:a}),children:o?jsx("div",{className:Au}):null}),e?jsxs("div",{className:Ou,children:[jsx("span",{className:Fr({isDisabled:a}),children:e}),t?jsx("span",{className:ju({isDisabled:a}),children:t}):null]}):null]}),Ku=({state:e,renderOption:t=wC,item:o,optionLabelPosition:r="end",optionStyle:a,optionClassName:n,isReadOnly:i,...s})=>{let p=!!s.isDisabled||!!s.disabledValues?.includes(o.id),l=rt.useRef(null),{inputProps:c,isPressed:u,isSelected:m}=useRadio({...s,isDisabled:p,children:o.label,value:o.id},e,l),{focusProps:d,isFocusVisible:f,isFocused:y}=useFocusRing(),{isHovered:b}=useHover({isDisabled:p}),v=filterTruthyValues({"data-selected":m,"data-focused":y,"data-focus-visible":f,"data-hovered":b,"data-disabled":p,"data-pressed":u,"data-read-only":i});return jsxs("label",{...v,style:a,className:classNames("BaselineUI-Radio-Item",n),children:[jsx(VisuallyHidden,{children:jsx("input",{...mergeProps(c,d),ref:l})}),t(o,{isFocusVisible:f,isSelected:m,isFocused:y,isHovered:b,isDisabled:p,optionLabelPosition:r,isReadOnly:i})]})};var Gu=rt.forwardRef(({className:e,style:t,optionsContainerClassName:o,optionsContainerStyle:r,items:a,labelPosition:n="top",renderOption:i,"aria-label":s,"aria-labelledby":p,"aria-describedby":l,"aria-details":c,"data-block-id":u,"data-block-class":m,...d},f)=>{let y=useRadioGroupState(d),{radioGroupProps:b,labelProps:v,descriptionProps:_,errorMessageProps:g}=useRadioGroup({...d,"aria-label":s,"aria-labelledby":p,"aria-describedby":l,"aria-details":c},y),h=ke({...d,descriptionProps:_,errorMessageProps:g,labelPosition:n}),R=filterTruthyValues({"data-orientation":d.orientation,"data-block-id":u,"data-block-class":m,"data-disabled":d.isDisabled,"data-readonly":d.isReadOnly});return jsxs("div",{...mergeProps(b,R),className:classNames(Ae({labelPosition:n}),"BaselineUI-RadioGroup",e),style:t,ref:f,children:[d.label||h?jsxs("div",{className:je({labelPosition:n,hasMessage:!!h}),children:[jsx("span",{...v,className:classNames(Oe,"BaselineUI-RadioGroup-Label"),children:d.label}),n==="start"&&h]}):null,jsxs("div",{className:classNames({[Rt]:d.isDisabled}),children:[jsx("div",{className:classNames(Uu,o),style:r,children:a.map(w=>jsx(Ku,{state:y,renderOption:i,item:w,...d,value:w.id},w.id))}),n==="top"&&h]})]})});Gu.displayName="RadioGroup";var Wu=({id:e,defaultMessage:t,elementType:o=Fragment$1})=>{invariant(e||t,"`id` or `defaultMessage` is required.");let r=H();return jsx(o,{children:r.formatMessage(e)||t})};Wu.displayName="MessageFormat";var Xu=rt.forwardRef(({className:e,style:t,children:o,"data-block-id":r,"data-block-class":a,role:n="group",isDisabled:i,...s},p)=>{let{hoverProps:l,isHovered:c}=useHover({isDisabled:i});return jsx("div",{...l,role:n,"data-hovered":c,"data-disabled":i,"data-block-id":r,"data-block-class":a,className:e,style:t,...s,ref:p,children:o})});Xu.displayName="Group";var si="UNSUPPORTED_IN_MENU";function Qu(e){return useMemo(()=>rt.Children.toArray(e).map(t=>{let o=t,r=uniqueId("item"),a=$o(o,Ne),n=Zu(o),i,s;if(a){let v=$o(a,Le);invariant(v),i=Zu(v),s=$o(a,we).props.children;}else n?i=n:i=o;let{onPress:p,label:l,"aria-label":c,iconStart:u,isDisabled:m,icon:d}=i.props,f=l||c||si;invariant(typeof f=="string","ActionGroup children must have a string label");let y=`${r}-${f}`;return createElement(Item,{...{key:y,onPress:p,textValue:f,"aria-label":c,icon:u||d,dialogContent:s,isDisabled:m},key:y},o)}),[e])}function $o(e,t){return t?flatMapDeep(rt.Children.toArray(e),r=>rt.isValidElement(r)&&r.props.children?[r,...rt.Children.toArray(r.props.children)]:[r]).find(r=>rt.isValidElement(r)&&r.type===t):void 0}function Zu(e){return $o(e,q)||$o(e,E)}var Ju="_1yep5z6ih _1yep5z6ii _1yep5z6ij _1yep5z6i2 _1yep5z6i3 _1yep5z6i4 _1yep5z6lc _1yep5z6iq _1yep5z6ir _1yep5z6is _1yep5z6l4",em={horizontal:"xvr3wn0",vertical:"xvr3wn1"};var pi=rt.forwardRef(({className:e,style:t,children:o,collapsibleMenuProps:r,"data-block-id":a,"data-block-class":n,renderSpacer:i,onKeyDown:s,...p},l)=>{let{formatMessage:c}=H(),[u,m]=useState(),d=Qu(o),f=useListState({...p,children:d}),y=ae(l),b=useRef(null),[{visibleItems:v,isMeasuring:_},g]=Ta({visibleItems:f.collection.size,isMeasuring:!1}),h=useCallback(()=>{let S=P=>{if(b.current&&y.current){let I=[...b.current.children],D=y.current.getBoundingClientRect().width,F=P<f.collection.size,B=0,j=0;if(F){let A=I.pop();A&&(B+=am(A,!1,!0));}for(let[A,X]of I.entries())if(B+=am(X,A===0,A===I.length-1),Math.round(B)<=Math.round(D))j++;else break;return j}return P};g(function*(){yield {visibleItems:f.collection.size,isMeasuring:!0};let P=S(f.collection.size),I=P<f.collection.size&&P>0;yield {visibleItems:P,isMeasuring:I},I&&(yield {visibleItems:S(P),isMeasuring:!1});});},[g,y,f.collection.size]),R=useMemo(()=>({get current(){return y.current?.parentElement}}),[y]);Va({ref:R,onResize:h}),xe(h,[f.collection,h]);let{toolbarProps:w}=useToolbar(p,y),x=[...f.collection],C=x.slice(0,v),T=x.slice(v).filter(S=>S.textValue!==si),N=T.length>0;useEffect(()=>{m(void 0);},[T.length]),useEffect(()=>{p.orientation==="vertical"&&console.warn("Toolbar: Vertical orientation is not supported when `isCollapsible` is true.");},[p.orientation]);let{keyboardProps:k}=useKeyboard({onKeyDown:s});return jsxs(FocusScope,{children:[jsx("div",{...mergeProps(w,k),className:e,"data-block-id":a,"data-block-class":n,"data-collapse":!0,style:{...t,flexBasis:_?"100%":void 0},ref:y,children:jsxs("div",{ref:b,className:Ju,children:[C.map(S=>S.rendered),N?jsxs(Fragment,{children:[!_&&i?jsx(L,{flexGrow:1}):null,jsx(Lr,{placement:"bottom end",renderTrigger:({buttonProps:S,ref:P})=>jsx(E,{...S,size:"md",icon:MoreIcon,"aria-label":c(eP.more),variant:"toolbar",ref:P}),...r,disabledKeys:T.filter(S=>S.props?.isDisabled).map(S=>S.key),items:T.map(S=>{let P=S.textValue||S["aria-label"];return invariant(P,"ActionItem must have a label"),{id:S.key,label:P,icon:S.props.icon}}),onAction:S=>{let P=f.collection.getItem(S);invariant(P,"Item not found");let{onPress:I,dialogContent:D}=P.props;I?.(),m(D);}})]}):null]})}),jsx(Ie,{isOpen:!!u,onOpenChange:S=>{S||m(void 0);},children:jsx(Ee,{enableDrawer:"auto",style:{zIndex:1e5},children:u?rt.cloneElement(u,{inheritDrawer:!0}):null})})]})});pi.displayName="CollapsibleToolbar";function am(e,t,o){let a=re(e).getComputedStyle(e);return e.getBoundingClientRect().width+(t?0:nm(a.marginLeft))+(o?0:nm(a.marginRight))}function nm(e){let t=Number.parseInt(e,10);return Number.isNaN(t)?0:t}var eP=U({more:{id:"more",defaultMessage:"More"}});var ci=rt.forwardRef(({className:e,style:t,"data-block-id":o,"data-block-class":r,"aria-controls":a,onKeyDown:n,...i},s)=>{let p=rt.useRef(null),{toolbarProps:l}=useToolbar(i,p),{keyboardProps:c}=useKeyboard({onKeyDown:n});return jsx("div",{...mergeProps(l,c),"aria-controls":a,className:classNames(em[i.orientation||"horizontal"],"BaselineUI-Toolbar",e),style:t,"data-block-id":o,"data-block-class":r,ref:M(s,p),children:i.children})});ci.displayName="WrappedToolbar";var da=rt.forwardRef((e,t)=>{let o=e.isCollapsible?pi:ci;return jsx(o,{...e,ref:t})});da.displayName="Toolbar";var sm=z({defaultClassName:"_1j5skr71",variantClassNames:{size:{xxs:"_1j5skr72",xs:"_1j5skr73",sm:"_1j5skr74",md:"_1j5skr75",lg:"_1j5skr76"}},defaultVariants:{},compoundVariants:[]}),lm=z({defaultClassName:"_1j5skr70 _1yep5z6j8 _1yep5z6j9 _1yep5z6ja _1yep5z6le _1yep5z6lf _1yep5z6l9 _1yep5z6ik _1yep5z6il _1yep5z6im _1yep5z6iq _1yep5z6ir _1yep5z6is _1yep5z6k2 _1yep5z6k3 _1yep5z6k4 _1yep5z6ai _1yep5z6aj _1yep5z6ak _1yep5z6b6 _1yep5z6b7 _1yep5z6b8 _1yep5z6bu _1yep5z6bv _1yep5z6bw _1yep5z6ci _1yep5z6cj _1yep5z6ck _1yep5z6g1 _1yep5z6f5",variantClassNames:{isHovered:{true:"_1j5skr7g"},isFocusVisible:{true:"_1j5skr7h"},isDisabled:{true:"z9nup83 _1yep5z610z"},isSelected:{true:"_1j5skr7j"}},defaultVariants:{},compoundVariants:[[{isSelected:!0,isDisabled:!0},"_1yep5z61t3 _1yep5z61t2 _1yep5z61t0 _1yep5z61pj _1yep5z61mr"],[{isSelected:!1,isHovered:!0,isDisabled:!1},"_1yep5z6g3"],[{isSelected:!1,isFocusVisible:!0,isDisabled:!1},"_1yep5z61t3 _1yep5z61t2 _1yep5z61p9 _1yep5z61t0"],[{isSelected:!0,isFocusVisible:!0,isDisabled:!1},"_1j5skr7k _1yep5z61t1 _1yep5z61t0 _1yep5z61pa _1yep5z61ms"],[{isSelected:!0,isFocusVisible:!1,isDisabled:!1},"_1yep5z61t0 _1yep5z61t2 _1yep5z61p9 _1yep5z61t3"]]}),pm=z({defaultClassName:"_1j5skr70 _1yep5z6j8 _1yep5z6j9 _1yep5z6ja _1yep5z6le _1yep5z6lf _1yep5z6l9 _1yep5z6ik _1yep5z6il _1yep5z6im _1yep5z6iq _1yep5z6ir _1yep5z6is _1yep5z6k2 _1yep5z6k3 _1yep5z6k4 _1yep5z6ai _1yep5z6aj _1yep5z6ak _1yep5z6b6 _1yep5z6b7 _1yep5z6b8 _1yep5z6bu _1yep5z6bv _1yep5z6bw _1yep5z6ci _1yep5z6cj _1yep5z6ck _1yep5z6f5",variantClassNames:{isHovered:{true:"_1j5skr7m"},isFocusVisible:{true:"_1yep5z617b _1yep5z617a _1yep5z613h _1yep5z6178"},isSelected:{true:"_1yep5z610y"},isDisabled:{true:"z9nup83 _1yep5z610z"}},defaultVariants:{},compoundVariants:[[{isSelected:!1,isHovered:!0},"_1yep5z61mq"]]}),cm=z({defaultClassName:"_1j5skr70 _1yep5z6j8 _1yep5z6j9 _1yep5z6ja _1yep5z6le _1yep5z6lf _1yep5z6l9 _1yep5z6ik _1yep5z6il _1yep5z6im _1yep5z6iq _1yep5z6ir _1yep5z6is _1yep5z6k2 _1yep5z6k3 _1yep5z6k4 _1yep5z6ai _1yep5z6aj _1yep5z6ak _1yep5z6b6 _1yep5z6b7 _1yep5z6b8 _1yep5z6bu _1yep5z6bv _1yep5z6bw _1yep5z6ci _1yep5z6cj _1yep5z6ck _1yep5z6f5",variantClassNames:{isHovered:{true:"_1j5skr7r"},isFocusVisible:{true:"_1yep5z617b _1yep5z617a _1yep5z613h _1yep5z6178"},isSelected:{true:"_1j5skr7t"},isDisabled:{true:"z9nup83 _1yep5z610z"}},defaultVariants:{},compoundVariants:[[{isSelected:!1,isHovered:!0},"_1yep5z61nn"],[{isSelected:!0,isDisabled:!1},"_1yep5z61nn _1yep5z61mu"],[{isSelected:!0,isDisabled:!0},"_1yep5z61nn _1yep5z61mr"]]}),dm=z({defaultClassName:"_1j5skr77 _1j5skr70 _1yep5z6j8 _1yep5z6j9 _1yep5z6ja _1yep5z6le _1yep5z6lf _1yep5z6l9 _1yep5z6ik _1yep5z6il _1yep5z6im _1yep5z6iq _1yep5z6ir _1yep5z6is _1yep5z6k2 _1yep5z6k3 _1yep5z6k4 _1yep5z6f5",variantClassNames:{isHovered:{true:"_1j5skr78"},isFocusVisible:{true:"_1j5skr79"},isSelected:{true:"_1j5skr7a"},isDisabled:{true:"_1j5skr7b z9nup83 _1yep5z6111"}},defaultVariants:{},compoundVariants:[[{isSelected:!0,isDisabled:!1},"_1j5skr7c _1yep5z61mt"],[{isSelected:!1,isDisabled:!0},"_1j5skr7d _1yep5z61mr"],[{isSelected:!1,isHovered:!0},"_1yep5z61nn"],[{isSelected:!1,isFocusVisible:!0},"_1yep5z61t3 _1yep5z61t2 _1yep5z61p9 _1yep5z61t0"],[{isSelected:!0,isFocusVisible:!0},"_1j5skr7e _1yep5z61t1 _1yep5z61t0 _1yep5z61pa"]]});var fP={xxs:8,xs:12,sm:16,md:20,lg:24},be=rt.forwardRef((e,t)=>{let o=ae(t),{tooltipProps:r}=mr(e,o);return r?jsx(ne,{...r,children:jsx(di,{...e,ref:t})}):jsx(di,{...e,ref:t})});be.displayName="ToggleIconButton";var di=rt.forwardRef(({className:e,style:t,icon:o,size:r="md",variant:a="primary","data-block-id":n,"data-block-class":i,...s},p)=>{let l=useToggleState(s),{buttonProps:c,isPressed:u,ref:m,isFocusVisible:d,isFocused:f,isHovered:y,uiStateOptions:b}=yr(s,l),v=useMemo(()=>typeof o=="function"?o:l.isSelected?o.selected:o.unselected,[o,l.isSelected]),_={isSelected:l.isSelected,isHovered:y,isFocusVisible:d,isDisabled:!!s.isDisabled},g=filterTruthyValues({"data-hovered":y,"data-selected":l.isSelected,"data-focus-visible":d,"data-disabled":s.isDisabled,"data-block-id":n,"data-block-class":i,"data-focused":f,"data-pressed":u});return jsx("button",{...mergeProps(c,g),className:classNames(a==="toolbar"&&dm(_),a==="primary"&&lm(_),a==="secondary"&&pm(_),a==="tertiary"&&cm(_),sm({size:r}),"BaselineUI-ToggleIconButton",typeof e=="function"?e(b):e),style:typeof t=="function"?t(b):t,ref:M(m,p),children:jsx(v,{size:fP[r]})})});di.displayName="ToggleIconButtonCore";var mm="f6jv6bm",fm="_1yep5z64u _1yep5z64v _1yep5z64w _1yep5z676 _1yep5z677 _1yep5z678 _1yep5z6jh _1yep5z6ji _1yep5z6jj",Zt="_1yep5z689 _1yep5z68a _1yep5z68b _1yep5z65x _1yep5z65y _1yep5z65z",ym=z({defaultClassName:"f6jv6b0 _1yep5z6ih _1yep5z6ii _1yep5z6ij _1yep5z6g1",variantClassNames:{isInline:{true:"f6jv6b1"},isMinimal:{true:"_1yep5z614i _1yep5z614j _1yep5z614k _1yep5z6vd _1yep5z6ve _1yep5z6vf _1yep5z6150 _1yep5z6151 _1yep5z6152",false:"_1yep5z614l _1yep5z614m _1yep5z614n"}},defaultVariants:{},compoundVariants:[[{isInline:!0,isMinimal:!1},"_1yep5z61i5 _1yep5z61i6 _1yep5z61i7 _1yep5z61it _1yep5z61iu _1yep5z61iv _1yep5z61jh _1yep5z61ji _1yep5z61jj _1yep5z61k5 _1yep5z61k6 _1yep5z61k7 _1yep5z61ta _1yep5z61t8 _1yep5z61oj"]]}),ua=z({defaultClassName:"f6jv6b4 _1yep5z69 _1yep5z6a _1yep5z6b _1yep5z62l _1yep5z62m _1yep5z62n _1yep5z63r _1yep5z63s _1yep5z63t _1yep5z61f _1yep5z61g _1yep5z61h _1yep5z6e3 _1yep5z6eu _1yep5z6lf",variantClassNames:{isDisabled:{true:"f6jv6b5 _1yep5z610q"}},defaultVariants:{},compoundVariants:[]}),bm="f6jv6bj _1yep5z6wg _1yep5z6wh _1yep5z6wi _1yep5z6x4 _1yep5z6x5 _1yep5z6x6 _1yep5z6xs _1yep5z6xt _1yep5z6xu _1yep5z6yg _1yep5z6yh _1yep5z6yi",gm="f6jv6bk";var vm="f6jv6bn _1yep5z63l _1yep5z63m _1yep5z63n _1yep5z619 _1yep5z61a _1yep5z61b _1yep5z6ai _1yep5z6aj _1yep5z6ak _1yep5z6b6 _1yep5z6b7 _1yep5z6b8 _1yep5z6bu _1yep5z6bv _1yep5z6bw _1yep5z6ci _1yep5z6cj _1yep5z6ck _1yep5z6ik _1yep5z6il _1yep5z6im _1yep5z6ln _1yep5z6li _1yep5z6lg _1yep5z6hp _1yep5z6eu",_m=z({defaultClassName:"f6jv6bf _1yep5z63r _1yep5z63s _1yep5z63t _1yep5z61f _1yep5z61g _1yep5z61h _1yep5z63 _1yep5z64 _1yep5z65 _1yep5z62f _1yep5z62g _1yep5z62h _1yep5z6ih _1yep5z6ii _1yep5z6ij _1yep5z6iq _1yep5z6ir _1yep5z6is _1yep5z6j8 _1yep5z6j9 _1yep5z6ja _1yep5z69l _1yep5z69m _1yep5z69n _1yep5z6lf _1yep5z6kz _1yep5z6l2 _1yep5z6le",variantClassNames:{isHovered:{true:"_1yep5z611v"},isDisabled:{true:"_1yep5z6z2"}},defaultVariants:{},compoundVariants:[]}),zm="f6jv6bi _1mdhlqv6 _1yep5z6al _1yep5z6am _1yep5z6an _1yep5z6b9 _1yep5z6ba _1yep5z6bb _1yep5z6bx _1yep5z6by _1yep5z6bz _1yep5z6cl _1yep5z6cm _1yep5z6cn _1yep5z6d7 _1yep5z63 _1yep5z64 _1yep5z65 _1yep5z62f _1yep5z62g _1yep5z62h _1yep5z6g1 _1yep5z6lh _1yep5z6lg _1yep5z6hs _1yep5z6lk",hm="_1yep5z6jn _1yep5z6jo _1yep5z6jp",xm="f6jv6be f6jv6ba _1yep5z6ai _1yep5z6aj _1yep5z6ak _1yep5z6b6 _1yep5z6b7 _1yep5z6b8 _1yep5z6ie _1yep5z6if _1yep5z6ig _1yep5z6eu _1yep5z6e3 _1yep5z6lc",Cm=z({defaultClassName:"f6jv6bb _1yep5z6ai _1yep5z6aj _1yep5z6ak _1yep5z6b6 _1yep5z6b7 _1yep5z6b8 _1yep5z6bu _1yep5z6bv _1yep5z6bw _1yep5z6ci _1yep5z6cj _1yep5z6ck _1yep5z6ih _1yep5z6ii _1yep5z6ij _1yep5z6iq _1yep5z6ir _1yep5z6is _1yep5z69l _1yep5z69m _1yep5z69n _1yep5z6jt _1yep5z6ju _1yep5z6jv",variantClassNames:{isInline:{true:"_1yep5z6pg _1yep5z6ph _1yep5z6pi _1yep5z617i _1yep5z617g _1yep5z612r",false:"_1yep5z6pj _1yep5z6pk _1yep5z6pl _1yep5z6wv _1yep5z6ww _1yep5z6wx _1yep5z6xj _1yep5z6xk _1yep5z6xl _1yep5z6y7 _1yep5z6y8 _1yep5z6y9 _1yep5z6yv _1yep5z6yw _1yep5z6yx"}},defaultVariants:{},compoundVariants:[]}),Pm="f6jv6bl",km="f6jv6ba _1yep5z6ai _1yep5z6aj _1yep5z6ak _1yep5z6b6 _1yep5z6b7 _1yep5z6b8 _1yep5z6ie _1yep5z6if _1yep5z6ig _1yep5z6eu",ma=z({defaultClassName:"f6jv6b6",variantClassNames:{isInline:{true:"f6jv6b7",false:"f6jv6b8"}},defaultVariants:{},compoundVariants:[]}),fa="f6jv6b9 _1yep5z6ih _1yep5z6ii _1yep5z6ij _1yep5z6iq _1yep5z6ir _1yep5z6is _1yep5z6j8 _1yep5z6j9 _1yep5z6ja",qo="f6jv6bo";var wm=[["Toolbar Focus","Alt+F10"],["Bold","Ctrl+B"],["Italic","Ctrl+I"],["Underline","Ctrl+U"],["Select All","Ctrl+A"],["Cut","Ctrl+X"],["Copy","Ctrl+C"],["Paste","Ctrl+V"],["Undo","Ctrl+Z"],["Redo","Ctrl+Shift+Z"],["Submit","Ctrl+Enter"],["Open Help Dialog","Ctrl+Shift+H"]],{dialog:{row:Ko}}=layoutSprinkleValues,Rm=({isOpen:e,onClose:t})=>{let{formatMessage:o}=H(),r=useId();return jsx(Ie,{isOpen:e,onOpenChange:a=>{a||t();},children:jsx(Ee,{enableDrawer:"auto",style:{zIndex:999999},children:jsxs(me,{"aria-labelledby":r,className:bm,drawerBackground:"subtle",children:[jsxs(L,{paddingLeft:Ko.padding.horizontal.lg,paddingRight:Ko.padding.horizontal.sm,display:"flex",flexDirection:"row",justifyContent:"space-between",alignItems:"center",backgroundColor:"background.primary.subtle",className:gm,children:[jsx(Q,{id:r,elementType:"h3",type:"title",size:"md",children:o(Go.help)}),jsx(E,{icon:XIcon,size:"md",variant:"secondary","aria-label":o(Go.close),onPress:t})]}),jsx(O,{className:Pm}),jsxs(L,{paddingX:Ko.padding.horizontal.lg,role:"table","aria-labelledby":r,backgroundColor:"background.primary.subtle",children:[jsx("div",{role:"rowgroup",children:jsxs(L,{role:"row",display:"flex",flexDirection:"row",justifyContent:"space-between",alignItems:"center",paddingY:Ko.padding.vertical.md,color:"text.primary",children:[jsx("h6",{className:sprinkles({typography:"heading.h6.semibold"}),role:"columnheader",children:o(Go.action)}),jsx("h6",{className:sprinkles({typography:"heading.h6.semibold"}),role:"columnheader",style:{textTransform:"capitalize"},children:o(Go.shortcut)})]})}),jsx("div",{role:"rowgroup",children:wm.map(([a,n],i)=>jsxs(Fragment$1,{children:[jsxs(L,{role:"row",display:"flex",flexDirection:"row",justifyContent:"space-between",alignItems:"center",paddingY:Ko.padding.vertical.xs,style:{minHeight:40},children:[jsx(Q,{type:"subtitle",size:"sm",role:"cell",children:o(Go[camelCase(a)])}),jsx(Q,{elementType:"kbd",type:"subtitle",size:"sm",role:"cell",children:getOsSpecificKeyboardShortcutLabel(n,!0)})]}),i!==wm.length-1&&jsx(O,{})]},a))})]})]})})})},Go=U({toolbarFocus:{id:"toolbarFocus",defaultMessage:"Toolbar Focus"},help:{id:"help",defaultMessage:"Help"},close:{id:"close",defaultMessage:"Close"},action:{id:"action",defaultMessage:"Action"},shortcut:{id:"shortcut",defaultMessage:"Shortcut"},bold:{id:"bold",defaultMessage:"Bold"},italic:{id:"italic",defaultMessage:"Italic"},underline:{id:"underline",defaultMessage:"Underline"},selectAll:{id:"selectAll",defaultMessage:"Select All"},cut:{id:"cut",defaultMessage:"Cut"},copy:{id:"copy",defaultMessage:"Copy"},paste:{id:"paste",defaultMessage:"Paste"},undo:{id:"undo",defaultMessage:"Undo"},redo:{id:"redo",defaultMessage:"Redo"},openHelpDialog:{id:"openHelpDialog",defaultMessage:"Open Help Dialog"},submit:{id:"submit",defaultMessage:"Submit"}});var ya=rt.forwardRef(({value:e,defaultValue:t,onChange:o,placeholder:r,spellCheck:a,textBoxRef:n,isInline:i,isMinimal:s,isDisabled:p,editableContentAriaLabel:l,editorHandle:c,autoFocus:u,saveOnEnter:m,onSave:d},f)=>{let y=rt.useRef(null),[b,v]=useControlledState(e,t||"",o),_=useCallback(k=>{v(k.currentTarget.value||"");},[v]),g=useCallback(k=>{(m&&k.key==="Enter"&&!k.shiftKey||(k.ctrlKey||k.metaKey)&&k.key==="Enter")&&(k.preventDefault(),d());},[m,d]);useImperativeHandle(f,()=>({clear:()=>{v("");}}));let h=useCallback(k=>{k.currentTarget.style.height="16px",k.currentTarget.style.height=k.currentTarget.scrollHeight+"px";},[]);useGranularLayoutEffect(()=>{let k=y.current;k&&(k.style.height="16px",k.style.height=k.scrollHeight+"px");},[s],[b]),useImperativeHandle(c,()=>({setCaretPosition:k=>{y.current&&(y.current.focus(),y.current.setSelectionRange(k,k));},focus:()=>{y.current&&y.current.focus();}}));let{focusProps:R,isFocused:w,isFocusVisible:x}=useFocusRing(),{hoverProps:C,isHovered:T}=useHover({}),N=filterTruthyValues({"data-focus-visible":x,"data-hovered":T,"data-focused":w});return jsx("textarea",{...mergeProps(R,C,N),ref:M(y,n),className:classNames(s?xm:[ua(),ma({isInline:i}),km]),autoFocus:u,onChange:_,disabled:p,onInput:h,value:b,placeholder:r,spellCheck:a,"aria-label":l,onKeyDown:g})});ya.displayName="PlainEditor";var Yo="mention",ba="mention_input",Om=rt.forwardRef(({onCancel:e,editor:t,element:o,onSelectionChange:r},a)=>{let{containerRef:n,items:i,maxMentionableUsersSuggestions:s}=useContext(va),p=useSelected(),[l,c]=useState(""),{contains:u}=useFilter({sensitivity:"base"}),{formatMessage:m}=H(),d=useMemo(()=>{let I=i.filter(D=>l===""||u(D.displayName,l)).map(D=>({id:D.id,label:D.displayName,data:D}));return s?take(I,s):I},[i,s,l,u]),f=useCallback(I=>jsx(Item,{children:I.label},I.id),[]),y=useCallback((I=!1)=>{let D=findNodePath(t,o);D&&(removeNodes(t,{at:D}),I&&focusEditor(t));},[t,o]),b=useComboBoxState({items:d,children:f,menuTrigger:"focus",onSelectionChange:I=>{y(!0),r?.(I);}}),v=rt.useRef(null),_=rt.useRef(null),g=rt.useRef(null),h=rt.useRef(null),R=useHTMLInputCursorState(_);useInteractOutside({ref:h,onInteractOutside:()=>{b.close();}});let{inputProps:w,listBoxProps:x}=useComboBox({defaultItems:d,inputRef:_,buttonRef:v,listBoxRef:g,popoverRef:h,menuTrigger:"focus","aria-label":m(XP.mention)},b);useEffect(()=>{_.current?.focus();},[]);let C=useCallback((I="manual",D=!1)=>{y(D),e?.(I,b.inputValue);},[e,y,b.inputValue]),T=useRef(p);useEffect(()=>{T.current&&!p&&C("deselect"),T.current=p;},[p,C]);let N=R?.atStart??!1,k=R?.atEnd??!1,S=useCallback(I=>{I.key==="Backspace"&&N?C("backspace",!0):I.key==="Escape"?C("escape",!0):I.key==="ArrowLeft"&&N?C("arrowLeft",!0):I.key==="ArrowRight"&&k&&C("arrowRight",!0);let D=Hotkeys.isUndo(I)&&t.history.undos.length>0,F=Hotkeys.isRedo(I)&&t.history.redos.length>0;(D||F)&&(I.preventDefault(),t[D?"undo":"redo"](),focusEditor(t));},[N,k,C,t]),P=useMemo(()=>{if(!CSS.supports("field-sizing","content")){let I=re(_.current),D=_.current?I?.getComputedStyle(_.current).font:void 0;return {width:D?getTextDimensions({text:b.inputValue,font:D}).width+10:"4ch"}}},[b.inputValue]);return jsxs(at.Provider,{value:b,children:[jsx("input",{...mergeProps(w,{onKeyDown:S,onBlur:()=>{C("blur",!0);},onChange:I=>{c(I.target.value);}}),style:P,className:vm,ref:M(a,_)}),jsx(ye,{triggerRef:n,className:zm,isNonModal:!0,ref:h,state:b,children:jsx(le,{...x,items:void 0,autoFocus:"first",ref:g,className:sprinkles({width:"full"}),renderOption:Am})})]})});Om.displayName="MentionInputContentElement";var bi=withRef(({className:e,...t},o)=>{let{children:r,editor:a,element:n}=t,{items:i}=useContext(va),s=useRef(null),[p,l]=useState(null);useEffect(()=>{let m=findNodePath(a,n);if(!m)return;let d=getPointBefore(a,m);if(!d)return;let f=createPointRef(a,d);return l(f),()=>{f.unref();}},[a,n]);let c=useCallback(()=>{let m=s.current?.getRootNode()instanceof ShadowRoot;moveSelection(a,{unit:"offset"}),moveSelection(a,{unit:"character",distance:1}),uo()&&m&&focusEditor(a);},[a]),u=useCallback(m=>{if(!m)return;let d=s.current?.getRootNode()instanceof ShadowRoot,f=i.find(b=>b.id===m);invariant(f,"User not found");let y={type:Yo,value:f.id,displayName:f.displayName,children:[{text:""}]};insertNodes(a,[y,{text:" "}]),d?setTimeout(()=>{c();},0):c();},[a,i,c]);return jsxs(PlateElement,{as:"span","data-slate-value":n.value,contentEditable:!1,className:e,ref:o,...t,children:[jsx(Om,{onCancel:(m,d)=>{m!=="backspace"&&insertText(a,"@"+d,{at:p?.current??void 0}),(m==="arrowLeft"||m==="arrowRight")&&moveSelection(a,{distance:1,reverse:m==="arrowLeft"});},onSelectionChange:u,ref:s,element:n,editor:a}),r]})});bi.displayName="MentionInputElement";var gi=withRef(({className:e,onClick:t,children:o,...r},a)=>{let n=useElement();return jsxs(PlateElement,{as:"span",className:e,contentEditable:!1,"data-user-id":n.value,onClick:getHandler(t,n),ref:a,...r,children:["@",n.displayName,o]})});gi.displayName="MentionElement";var jm=(e,{options:{trigger:t,triggerPreviousCharPattern:o,triggerQuery:r}})=>{let{insertText:a}=e,n=i=>i===t;return e.insertText=i=>{if(!e.selection||!n(i)||r&&!r(e)){a(i);return}let s=getEditorString(e,getRange(e,e.selection,getPointBefore(e,e.selection)));if(o?.test(s)){ga(e);return}a(i);},e},XP=U({mention:{defaultMessage:"Mention",id:"mention"}});function Um({className:e,children:t,...o}){return jsx(PlateElement,{asChild:!0,className:e,...o,children:jsx("p",{children:t})})}function dk(e){return Object.entries(e).map(([t,o])=>`${kebabCase(t)}:${o}`).filter(([,t])=>!!t).join(";")}function uk(e){return "text"in e}function mk(e){return e.replaceAll("&","&").replaceAll("<","<").replaceAll(">",">").replaceAll('"',""").replaceAll("'","'")}function Zo(e){if(!e)return "";function t(o){if(uk(o)){let a=mk(o.text);return o.bold&&(a=`<b>${a}</b>`),o.italic&&(a=`<i>${a}</i>`),o.underline&&(a=`<u>${a}</u>`),(o.color||o.backgroundColor)&&(a=`<span style="${dk(filterTruthyValues({color:o.color||void 0,backgroundColor:o.backgroundColor||void 0}))}">${a}</span>`),a}let r=o.children?.map(Zo).join("");switch(o.type){case ELEMENT_PARAGRAPH:return `<p>${r}</p>`;case ELEMENT_LINK:return `<a href="${o.url}">${r}</a>`;case Yo:return `<span data-user-id="${o.value}">${o.displayName}</span>`;default:return r}}return Array.isArray(e)?e.map(o=>t(o)).join(""):t(e)}function fk(e){return e?(e=e.trim(),e.endsWith(";")&&(e=e.slice(0,-1)),Object.fromEntries(e.split(";").map(t=>t.split(":").map(o=>o.trim())).map(([t,o])=>[camelCase(t),o]))):{}}function xi(e){e.startsWith("<p>")||(e=`<p>${e}</p>`);let t=new DOMParser().parseFromString(qm.default.sanitize(e),"text/html"),o=t.querySelectorAll("[style]");for(let a of o)a.style.textDecoration==="underline"&&(a.style.textDecoration="",a.style.cssText||a.removeAttribute("style"),a.hasAttributes()?a.innerHTML=`<u>${a.innerHTML}</u>`:a.outerHTML=`<u>${a.innerHTML}</u>`);let r=t.querySelectorAll("br");for(let a of r)a.outerHTML=a.closest("p")?`
|
|
53
|
+
`:"<p>";return Gm(t.body)}function Gm(e,t){if(e.nodeType===Node.TEXT_NODE)return jsx$1("text",t,e.textContent);if(e.nodeType!==Node.ELEMENT_NODE)return null;let o={...t};switch(e.nodeName.toUpperCase()){case"B":{o.bold=!0;break}case"I":{o.italic=!0;break}case"EM":{o.italic=!0;break}case"U":{o.underline=!0;break}case"SPAN":{let a=fk(e.getAttribute("style")||"");a["text-decoration"]==="underline"&&(o.underline=!0),a.color&&(o.color=a.color),a.backgroundColor&&(o.backgroundColor=a.backgroundColor);break}}let r=[...e.childNodes].flatMap(a=>Gm(a,o));switch(r.length===0&&r.push(jsx$1("text",o,"")),e.nodeName.toUpperCase()){case"BR":return jsx$1("text",t,`
|
|
54
|
+
`);case"SPAN":{let a=e.dataset.userId;return a?jsx$1("element",{type:Yo,value:a,displayName:e.textContent},{text:""}):r}case"P":return jsx$1("element",{type:ELEMENT_PARAGRAPH},r);case"A":return jsx$1("element",{type:ELEMENT_LINK,url:e.getAttribute("href")},r);default:return r}}function Wm(e){let t=findNode(e,{match:{type:getPluginType(e,ELEMENT_LINK)}}),[o]=t||[{url:""}];return o?.url}function ga(e){let t={children:[{text:" "}],type:ba};e.insertNode(t);}var yk=createPluginFactory({isElement:!0,isInline:!0,isMarkableVoid:!0,isVoid:!0,key:Yo,options:{trigger:"@",triggerPreviousCharPattern:/^$|^[\s"']$/},plugins:[{isElement:!0,isInline:!0,isVoid:!0,key:ba}],withOverrides:jm}),Xm=createPlugins([createParagraphPlugin({component:Um}),createBoldPlugin({component:withProps(PlateLeaf,{as:"b"})}),createItalicPlugin({component:withProps(PlateLeaf,{as:"i"})}),createUnderlinePlugin({component:withProps(PlateLeaf,{as:"u"})}),createFontColorPlugin(),createFontBackgroundColorPlugin(),createLinkPlugin({component:Ym}),yk({component:gi})],{components:{[ba]:bi}});var ef=({isDisabled:e})=>{let{formatMessage:t}=H(),o=useEditorRef();return jsxs(Ne,{type:"dialog",children:[jsx(Le,{children:jsx(E,{icon:LinkIcon,size:"sm",isDisabled:e,"aria-label":t(ut.addLink),className:Zt,preventFocusOnPress:!0})}),jsx(we,{className:sprinkles({boxShadow:"medium"}),placement:"top end",children:({close:r})=>jsx(me,{size:"content",style:{minWidth:240},children:jsx(Ck,{close:()=>{r(),setTimeout(()=>{focusEditor(o,o.selection);},0);}})})})]})},Ck=({close:e})=>{let t=useEditorRef(),{formatMessage:o}=H(),r=useEditorSelector(l=>Wm(l),[]),[a,n]=rt.useState(r?"show":"add"),[i,s]=rt.useState(r||""),p=jsx(L,{padding:"lg",children:jsx(Ge,{label:o(ut.link),value:i,autoFocus:!0,onChange:s,placeholder:"https://yourdomain.com"})});return jsxs(Fragment,{children:[a==="add"&&jsxs(Fragment,{children:[p,jsx(L,{display:"flex",justifyContent:"flex-end",padding:"lg",className:mm,children:jsx(q,{isDisabled:!isUrl(i,!0),label:o(ut.addLink),size:"sm",onPress:()=>{upsertLink(t,{url:i,skipValidation:!0}),e?.();},preventFocusOnPress:!0})})]}),a==="show"&&jsxs(Fragment,{children:[jsx(L,{padding:"lg",children:jsx(Q,{type:"subtitle",size:"sm",children:r})}),jsxs(L,{display:"flex",justifyContent:"flex-end",padding:"lg",gap:"lg",borderColor:"border.subtle",borderWidth:1,borderStyle:"solid",children:[jsx(q,{label:o(ut.editLink),size:"sm",variant:"secondary",onPress:()=>{n("edit");},style:{flex:1,justifyContent:"center"}}),jsx(q,{label:o(ut.removeLink),size:"sm",onPress:()=>{unwrapLink(t),e?.();},preventFocusOnPress:!0,style:{flex:1,justifyContent:"center"}})]})]}),a==="edit"&&jsxs(Fragment,{children:[p,jsxs(L,{display:"flex",justifyContent:"flex-end",padding:"lg",gap:"lg",borderColor:"border.subtle",borderWidth:1,borderStyle:"solid",children:[jsx(q,{label:o(ut.cancel),size:"sm",variant:"secondary",onPress:()=>{n("show"),e?.();}}),jsx(q,{label:o(ut.save),size:"sm",onPress:()=>{upsertLink(t,{url:i,skipValidation:!0}),e?.();}})]})]})]})};function Ym({className:e,children:t,...o}){return jsx(PlateElement,{asChild:!0,className:e,...o,children:jsx("a",{className:Mr({size:"sm"}),children:t})})}var ut=U({addLink:{id:"addLink",defaultMessage:"Add Link",description:"Add Link"},editLink:{id:"editLink",defaultMessage:"Edit Link",description:"Edit Link"},removeLink:{id:"removeLink",defaultMessage:"Remove Link",description:"Remove Link"},cancel:{id:"cancel",defaultMessage:"Cancel",description:"Cancel"},save:{id:"save",defaultMessage:"Save",description:"Save"},link:{id:"linkAnnotation",defaultMessage:"Link",description:"Link"}});var kk=parseColor("#ffffff00").toString("hexa"),Ci=[{label:"Red",color:"#ff0000"},{label:"Green",color:"#00ff00"},{label:"Blue",color:"#0000ff"},{label:"Yellow",color:"#ffff00"},{label:"Cyan",color:"#00ffff"},{label:"Magenta",color:"#ff00ff"},{label:"Black",color:"#000000"},{label:"White",color:"#ffffff"},{label:"Gray",color:"#808080"},{label:"Orange",color:"#ffa500"},{label:"Brown",color:"#a52a2a"},{label:"Purple",color:"#800080"}];[...Ci,{label:"Transparent",color:kk}];var za=({nodeType:e,icon:t,ariaLabel:o,isDisabled:r})=>{let a=useEditorSelector(i=>isMarkActive(i,e),[]),n=useEditorRef();return jsx(be,{variant:"tertiary",isSelected:a,size:"sm",icon:t,"aria-label":o,isDisabled:r,onPress:()=>{toggleMark(n,{key:e});},preventFocusOnPress:!0})},ki=({nodeType:e,"aria-label":t,isDisabled:o})=>{let{updateColor:r,clearColor:a,color:n}=useColorDropdownMenuState({customColors:[],colors:[],nodeType:e}),i=useCallback(({ref:p,triggerProps:l})=>jsx(E,{icon:e==="color"?TextIcon$1:HighlightTextIcon,"aria-label":t,size:"md",variant:"popover",isDisabled:o,className:Zt,preventFocusOnPress:!0,...l,ref:p}),[e,t,o]),s=useCallback(p=>{p?r(p.toString("rgba")):a();},[a,r]);return jsx(Gt,{presets:Ci,allowRemoval:!0,pickerMode:"lazy",placement:"top end",colorLabel:!1,renderTriggerButton:i,value:n||"#000000",onChange:s,isDisabled:o})};var t0=[{type:ELEMENT_PARAGRAPH,children:[{text:""}]}],va=rt.createContext({items:[],containerRef:{current:null},maxMentionableUsersSuggestions:10}),Ri=rt.forwardRef(({value:e,defaultValue:t,onChange:o,style:r,spellCheck:a,placeholder:n,isInline:i,isDisabled:s,editableContentAriaLabel:p,containerRef:l,onHelpDialogOpenRequest:c,mentionableUsers:u,editorHandle:m,maxMentionableUsersSuggestions:d,autoFocus:f,editorRef:y,saveOnEnter:b,onSave:v},_)=>{let g=useRef(null),h=useId(),{formatMessage:R}=H(),w=useRef(null),x=w.current,C=useRef(null),T=useMemo(()=>x?.getRootNode()instanceof ShadowRoot,[x]),[N,k]=useControlledState(e?xi(e):void 0,xi(t||"<p></p>"),I=>{o&&o(Zo(I));}),{keyboardProps:S}=useKeyboard({onKeyDown:I=>{(b&&I.key==="Enter"&&!I.shiftKey||(I.ctrlKey||I.metaKey)&&I.key==="Enter")&&(I.preventDefault(),v()),I.altKey&&I.key==="F10"?(I.preventDefault(),g.current&&g.current.querySelector("button")?.focus()):I.continuePropagation(),uo()&&T&&C.current&&focusEditor(C.current);}});useEffect(()=>{s&&C.current&&deselect(C.current);},[s]),useImperativeHandle(_,()=>({startMention:()=>{C.current&&!w.current?.querySelector("input[role='combobox']")&&ga(C.current);}})),useImperativeHandle(m,()=>({setCaretPosition:I=>{C.current&&(focusEditor(C.current),moveSelection(C.current,{distance:I,unit:"character"}));},focus:()=>{C.current&&focusEditor(C.current);}}));let P=useMemo(()=>({items:u||[],containerRef:l,maxMentionableUsersSuggestions:d}),[u,l,d]);return jsx(va.Provider,{value:P,children:jsxs(Plate,{initialValue:N||t0,plugins:Xm,editorRef:M(C,y||null),onChange:I=>{k(I);},children:[jsxs(da,{className:fa,"aria-controls":h,ref:g,children:[jsxs(L,{display:"flex",flexDirection:"row",role:"group",gap:"xs",paddingX:"sm",children:[jsx(za,{nodeType:MARK_BOLD,icon:BoldIcon,ariaLabel:R(to.bold),isDisabled:s}),jsx(za,{nodeType:MARK_ITALIC,icon:ItalicIcon,ariaLabel:R(to.italic),isDisabled:s}),jsx(za,{nodeType:MARK_UNDERLINE,icon:UnderlineIcon,ariaLabel:R(to.underline),isDisabled:s})]}),jsx(O,{orientation:"vertical",className:qo}),jsx(ki,{nodeType:MARK_COLOR,"aria-label":R(to.fontColor),isDisabled:s}),jsx(O,{orientation:"vertical",className:qo}),jsx(ki,{nodeType:MARK_BG_COLOR,"aria-label":R(to.backgroundColor),isDisabled:s}),jsx(O,{orientation:"vertical",className:qo}),jsx(ef,{isDisabled:s}),jsx(O,{orientation:"vertical",className:qo}),jsx(E,{className:Zt,icon:QuestionmarkCircleIcon,size:"sm","aria-label":R(to.help),onPress:c})]}),jsx(O,{variant:"secondary"}),jsx("div",{...S,ref:w,children:jsx(PlateContent,{id:h,disabled:s,readOnly:s,style:r,placeholder:n,autoFocus:f,spellCheck:a,"aria-label":p,className:classNames(ua({isDisabled:s}),ma({isInline:i})),renderPlaceholder:({attributes:I,children:D})=>jsx("span",{...I,className:sprinkles({paddingY:"lg"}),children:D})})})]})})});Ri.displayName="RichEditor";var Am=({key:e,value:t},{isDisabled:o,optionProps:r,isFocused:a,_state:n},i)=>{let{hoverProps:s}=useHover({isDisabled:o}),{label:p,data:l}=t;return jsxs(Fragment,{children:[jsxs("li",{...mergeProps(r,s),className:_m({isDisabled:o,isHovered:a}),"data-active":a,ref:i,children:[jsx(Ut,{name:p,...l?.avatar}),jsxs(L,{display:"flex",flexDirection:"column",children:[jsx(Q,{type:"subtitle",size:"sm",children:p}),jsx(Q,{type:"helper",size:"sm",children:l?.description})]})]}),e===n.collection.getLastKey()?null:jsx(O,{})]})},to=U({bold:{defaultMessage:"Bold",id:"bold"},italic:{defaultMessage:"Italic",id:"italic"},underline:{defaultMessage:"Underline",id:"underline"},backgroundColor:{defaultMessage:"Background color",id:"backgroundColor"},fontColor:{defaultMessage:"Font color",id:"fontColor"},help:{defaultMessage:"Help",id:"help"}});var sf=rt.memo(rt.forwardRef(({className:e,style:t,"data-block-id":o,"data-block-class":r,enableRichText:a=!1,onCancel:n,onSave:i,isInline:s=!0,submitButtonIcon:p=ArrowUpCircleFilledIcon,submitButtonAriaLabel:l,cancelButtonAriaLabel:c,"aria-label":u,"aria-describedby":m,"aria-labelledby":d,"aria-details":f,editableContentAriaLabel:y="Editing Area",footerButtons:b,clearOnCancel:v,clearOnSave:_,...g},h)=>{let R=useRef(null),{formatMessage:w}=H(),x=useRef(null),C=useRef(null),T=useRef(null),N=!a&&g.variant==="minimal",k=useRef(null),[S,P]=rt.useState(g.value||g.defaultValue),I=g.isDisabled||g.isSaveDisabled||!getPlainText(S||""),{fieldProps:D}=useLabel({"aria-label":u,"aria-labelledby":d,"aria-describedby":m,"aria-details":f,labelElementType:"div"});N&&!g.avatarName&&console.warn("Editor: When using the minimal `variant` and `enableRichText` is `false`, you should provide an `avatarName`.");let F=useCallback(()=>{P(""),a?R.current?.reset():C.current?.clear();},[a]),B=useCallback(()=>{I||(i?.(a?Zo(R.current?.children):x.current.value),_&&F());},[F,_,a,i,I]),j=jsx(E,{variant:"ghost","aria-label":l||w(Ti.save),icon:p,isDisabled:I,size:"md",excludeFromTabOrder:N,className:N?hm:void 0,onPress:B,preventFocusOnPress:!0}),[A,X]=rt.useState(!1),{keyboardProps:$}=useKeyboard({onKeyDown:V=>{(V.metaKey||V.ctrlKey)&&V.shiftKey&&V.key==="h"&&(V.preventDefault(),X(!0));}}),te=useCallback(V=>{P(V),g.onChange?.(V);},[g]);return jsxs("div",{...mergeProps(D,a?$:{}),role:"application",ref:M(T,h),style:t,"data-block-id":o,"data-block-class":r,className:classNames(ym({isInline:s,isMinimal:N}),"BaselineUI-Editor",e),"aria-disabled":g.isDisabled,children:[N?jsxs(Fragment,{children:[s?jsx(Ut,{className:fm,name:g.avatarName||""}):null,jsxs("div",{className:Cm({isInline:s}),children:[jsx(ya,{isMinimal:N,textBoxRef:x,isInline:s,editableContentAriaLabel:y,...g,onChange:te,onSave:B}),j]})]}):jsxs(Fragment,{children:[a?jsx(Ri,{containerRef:T,ref:k,editorRef:R,isInline:s,editableContentAriaLabel:y,onHelpDialogOpenRequest:()=>{X(!0);},...g,onChange:te,onSave:B}):jsxs(Fragment,{children:[!s&&jsx(O,{variant:"secondary"}),jsx(ya,{onCancel:n,textBoxRef:x,ref:C,isInline:s,editableContentAriaLabel:y,...g,onChange:V=>{P(V),g.onChange?.(V);},onSave:B})]}),jsx(O,{variant:"secondary"}),jsxs("div",{className:classNames(fa,sprinkles({justifyContent:"space-between"})),children:[jsxs(L,{paddingX:"sm",gap:"sm",display:"flex",children:[a&&g.mentionableUsers?jsx(E,{icon:AtIcon,size:"sm","aria-label":w(Ti.mention),onPress:()=>k.current?.startMention(),preventFocusOnPress:!0}):null,b?.map(({type:V,props:Y},K)=>V==="action"?jsx(E,{...Y,size:"sm",isDisabled:g.isDisabled||Y.isDisabled},K):jsx(be,{...Y,size:"sm",variant:"tertiary",isDisabled:g.isDisabled||Y.isDisabled},K))]}),jsxs(L,{children:[!!n&&jsx(E,{variant:"secondary",icon:CrossCircleFilledIcon,isDisabled:g.isDisabled,size:"md",onPress:()=>{n(),v&&F();},"aria-label":c||w(Ti.cancel)}),j]})]})]}),jsx(Rm,{isOpen:A,onClose:()=>{X(!1);}})]})}));sf.displayName="Editor";var Ti=U({cancel:{defaultMessage:"Cancel",id:"cancel"},save:{defaultMessage:"Save",id:"save"},mention:{defaultMessage:"Mention",id:"mention"}});var xa=rt.forwardRef(({className:e,style:t,"data-block-id":o,"data-block-class":r,isMounted:a,children:n,transitions:i,elementType:s="div",...p},l)=>{let c=useTransition(a,i),u=animated[s];return c((m,d)=>d&&jsx(u,{className:e,"data-block-id":o,"data-block-class":r,style:{...t,...m},...p,ref:l,children:n}))});xa.displayName="Transition";var lf="_8kqf970 _1yep5z6pd _1yep5z6pe _1yep5z6pf _1yep5z6149 _1yep5z614a _1yep5z614b _1yep5z614i _1yep5z614j _1yep5z614k _1yep5z6150 _1yep5z6151 _1yep5z6152 _1yep5z6yy _1yep5z6v7 _1yep5z6v8 _1yep5z6v9 _1yep5z6176";var cf=2,df=rt.forwardRef(({className:e,style:t,hideForKeyboard:o,scrollRef:r,label:a,delay:n=1500,smoothScroll:i=!0,"data-block-id":s,"data-block-class":p},l)=>{let c=rt.useRef(null),u=useInteractionModality(),[m,d]=rt.useState(!1),f=useCallback(()=>{let N=r?.current||ue(c.current).body;return re(N).getComputedStyle(N).flexDirection==="column-reverse"?N.scrollTop+cf>=0:N.scrollTop+N.clientHeight+cf>=N.scrollHeight},[r]),[y,b]=rt.useState(f),v=It(),{buttonProps:_,isPressed:g}=useButton({onPress:()=>{let N=r?.current||ue(c.current).body;N.scrollTo({top:N.scrollHeight,behavior:i?"smooth":"auto"});}},c),{focusProps:h,isFocused:R,isFocusVisible:w}=useFocusRing(),{hoverProps:x,isHovered:C}=useHover({}),T=filterTruthyValues({"data-block-id":s,"data-block-class":p,"data-pressed":g,"data-focus-visible":w,"data-hovered":C,"data-focused":R});return useEffect(()=>{b(f());},[f]),useEffect(()=>{let N=r?.current||ue(c.current).body,k="onscrollend"in re(N),S=()=>{setTimeout(()=>{d(!1),b(f());},n);},P=()=>{d(!0),k||S();};return N.addEventListener("scroll",P),N.addEventListener("scrollend",S),()=>{N.removeEventListener("scroll",P),N.removeEventListener("scrollend",S);}},[r,n,f]),jsxs(xa,{isMounted:(o?u!=="keyboard":!0)&&!m&&!y,elementType:"button",transitions:{from:{opacity:0,transform:"translateX(-50%) translateY(10px)"},enter:{opacity:1,transform:"translateX(-50%) translateY(0)"},leave:{opacity:0,transform:"translateX(-50%) translateY(10px)"},immediate:v},...mergeProps(_,h,x,T),className:classNames(lf,Vr({isFocusVisible:w,variant:"high-contrast",isHovered:C}),Or({variant:"high-contrast"}),"BaselineUI-ScrollControlButton",e),style:t,ref:M(l,c),children:[jsx(ArrowDownCircleFilledIcon,{size:16,className:wo({variant:"high-contrast"})}),a]})});df.displayName="ScrollControlButton";var Li="_1yep5z6jt _1yep5z6ju _1yep5z6jv _1yep5z6k2 _1yep5z6k3 _1yep5z6k4",uf=z({defaultClassName:"_1v0p2z10 _1yep5z63r _1yep5z63s _1yep5z63t _1yep5z619 _1yep5z61a _1yep5z61b _1yep5z6ih _1yep5z6ii _1yep5z6ij _1yep5z6it _1yep5z6iu _1yep5z6iv _1yep5z69f _1yep5z69g _1yep5z69h",variantClassNames:{hasTitleAndIcon:{true:"_1yep5z6lv _1yep5z6lw _1yep5z6lx _1yep5z6od _1yep5z6oe _1yep5z6of"},hasNoCloseBtn:{true:"_1yep5z6m1 _1yep5z6m2 _1yep5z6m3 _1yep5z6od _1yep5z6oe _1yep5z6of _1yep5z6pj _1yep5z6pk _1yep5z6pl _1yep5z6n7 _1yep5z6n8 _1yep5z6n9"}},defaultVariants:{},compoundVariants:[[{hasTitleAndIcon:!0,hasNoCloseBtn:!0},"_1yep5z61h5 _1yep5z61h6 _1yep5z61h7"]]}),mf="_1v0p2z10";var Pa=rt.forwardRef(({className:e,style:t,"data-block-id":o,"data-block-class":r,message:a,title:n,primaryActionLabel:i,cancelLabel:s,textInputProps:p,icon:l,iconColor:c,showCloseButton:u=!0,onPrimaryAction:m,onCancel:d,autoFocusButton:f,isPrimaryActionDisabled:y},b)=>{let v=useId(),{formatMessage:_}=H(),g=n&&jsx(Q,{id:v,type:"title",size:"sm",elementType:"h3",children:n});return jsxs(me,{className:e,style:t,"data-block-id":o,"data-block-class":r,size:"sm",variant:"primary",role:"alertdialog",ref:b,"aria-labelledby":v,children:[jsxs("div",{className:uf({hasTitleAndIcon:!!(l&&n),hasNoCloseBtn:!u}),children:[jsxs(L,{display:"flex",justifyContent:"space-between",alignItems:"center",flexDirection:"row",children:[l?jsx(l,{style:{color:c},size:24}):null,!l&&g,u?jsx(E,{icon:XIcon,variant:"secondary",size:"md","aria-label":_(S0.close),onPress:d}):null]}),l?g:null]}),a?jsx(L,{elementType:"section",className:mf,paddingX:"lg",paddingBottom:"lg",typography:"body.sm.regular",color:"text.primary",children:a}):null,p?jsx(L,{paddingX:"lg",paddingBottom:"lg",children:jsx(Ge,{...p})}):null,s||i?jsxs(Fragment,{children:[jsx(O,{}),jsxs(L,{padding:"lg",display:"flex",gap:"xl",children:[s?jsx(q,{variant:"secondary",className:Li,label:s,onPress:d,autoFocus:f==="cancel"}):null,i?jsx(q,{className:Li,label:i,onPress:m,autoFocus:f==="primary",isDisabled:y}):null]})]}):null]})});Pa.displayName="AlertDialog";var S0=U({close:{id:"close",defaultMessage:"Close",description:"Close button label"}});var ff="_1t55bp71",yf="_1yep5z6e3 _1yep5z6eu _1yep5z6in _1yep5z6io _1yep5z6ip _1yep5z69i _1yep5z69j _1yep5z69k",bf="_1t55bp70";var D0=E0(),gf=rt.forwardRef(({className:e,style:t,children:o,"data-block-id":r,"data-block-class":a,showCaret:n},i)=>{let s=useMemo(()=>{let p=o;return (!o||Array.isArray(o)&&o.length===0)&&(p=""),D0.render(p)},[o]);return jsx("div",{className:classNames(yf,bf,{[ff]:n},"BaselineUI-Markdown",e),"data-block-id":r,"data-block-class":a,style:t,ref:i,dangerouslySetInnerHTML:{__html:s}})});gf.displayName="Markdown";function hf(e){let{formatMessage:t,locale:o}=H(),[r,a]=rt.useState(!1),[n,i]=rt.useState(0),[s,p]=rt.useState(0),[l,c]=rt.useState(!1);useEffect(()=>{if(!e.current)return;let d=e.current,f=()=>{a(!1),i(0);},y=()=>{l||i(d.currentTime*100/d.duration);},b=()=>{p(d.duration);};return d.addEventListener("ended",f),d.addEventListener("timeupdate",y),d.addEventListener("loadedmetadata",b),()=>{d.removeEventListener("ended",f),d.removeEventListener("timeupdate",y),d.removeEventListener("loadedmetadata",b);}},[l,e]);let u=useCallback(()=>{(async()=>e.current&&(e.current.paused?(await e.current.play(),a(!0),announce(t(_f.playing),"polite")):(e.current.pause(),a(!1),announce(t(_f.paused),"polite"))))();},[t,e]),m=useCallback(d=>{e.current&&(e.current.currentTime=d*e.current.duration/100,announce(F0(e.current.currentTime,o.locale),"assertive"));},[o.locale,e]);return {isPlaying:r,progress:n,duration:s,togglePlay:u,seek:m,setProgress:i,formattedCurrentTime:e.current?.currentTime?zf(e.current?.currentTime):"00:00",formattedDuration:s?zf(s):"00:00",setIsSliderDragging:c}}var _f=U({playing:{id:"playing",defaultMessage:"Playing"},paused:{id:"paused",defaultMessage:"Paused"}});function F0(e,t){let o=Math.floor(e/3600),r=Math.floor(e%3600/60),a=e%60,n={...o&&{hours:o},...r&&{minutes:r},seconds:Math.floor(a)};return new Intl.DurationFormat(t,{style:"long"}).format(n)}function zf(e){let t=Math.floor(e%3600/60),o=Math.floor(e%60);return [t,o].map(r=>r.toString().padStart(2,"0")).join(":")}var xf="_1yep5z6ih _1yep5z6ii _1yep5z6ij _1yep5z6iq _1yep5z6ir _1yep5z6is _1yep5z6j8 _1yep5z6j9 _1yep5z6ja _1yep5z69o _1yep5z69p _1yep5z69q",Cf="rta2n91 _1yep5z6ih _1yep5z6ii _1yep5z6ij _1yep5z6iq _1yep5z6ir _1yep5z6is _1yep5z6j8 _1yep5z6j9 _1yep5z6ja _1yep5z69o _1yep5z69p _1yep5z69q _1yep5z6zq _1yep5z6va _1yep5z6vb _1yep5z6vc _1yep5z6174 _1yep5z610n",Pf="rta2n90";var wf=rt.forwardRef(({className:e,style:t,size:o="lg",sources:r,"data-block-id":a,"data-block-class":n,...i},s)=>{let p=rt.useRef(null),{isPlaying:l,progress:c,duration:u,togglePlay:m,seek:d,formattedDuration:f,formattedCurrentTime:y,setProgress:b,setIsSliderDragging:v}=hf(p),{formatMessage:_}=H(),g=filterTruthyValues({"data-block-id":a,"data-block-class":n,"data-state":l?"playing":"paused","data-loaded":u>0});return jsxs("div",{...g,...i,className:classNames(xf,"BaselineUI-AudioPlayer",e),role:"group",style:t,ref:s,children:[jsx(VisuallyHidden,{children:jsx("audio",{ref:p,children:r.map(({url:h,type:R})=>jsx("source",{src:h,type:R},h))})}),jsx(be,{icon:l?PauseIcon:PlayIcon,variant:"toolbar",isSelected:l,size:o,"aria-label":_(l?Ei.pause:Ei.play),style:{borderRadius:"50%"},onPress:m}),jsxs("div",{className:Cf,children:[jsx("span",{"aria-hidden":!0,children:y}),jsx(Mt,{"aria-label":_(Ei.audioTimeline),value:c,minValue:0,maxValue:100,className:Pf,onChange:h=>{b(h),v(!0);},onChangeEnd:h=>{d(h),v(!1);}}),jsx("span",{"aria-hidden":!0,children:f})]})]})});wf.displayName="AudioPlayer";var Ei=U({play:{id:"play",defaultMessage:"Play"},pause:{id:"pause",defaultMessage:"Pause"},audioTimeline:{id:"audioTimeline",defaultMessage:"Audio timeline"}});var Rf="_1w920rnd _1yep5z6ai _1yep5z6aj _1yep5z6ak _1yep5z6b6 _1yep5z6b7 _1yep5z6b8 _1yep5z6bu _1yep5z6bv _1yep5z6bw _1yep5z6ci _1yep5z6cj _1yep5z6ck _1yep5z6g1 _1yep5z6i5 _1yep5z6i6 _1yep5z6i7",Sf="_1w920rn1 _1yep5z6ik _1yep5z6il _1yep5z6im _1yep5z6it _1yep5z6iu _1yep5z6iv _1yep5z6j8 _1yep5z6j9 _1yep5z6ja _1yep5z69i _1yep5z69j _1yep5z69k",Tf="_1w920rn0 _1yep5z6ih _1yep5z6ii _1yep5z6ij _1yep5z6iq _1yep5z6ir _1yep5z6is _1yep5z6l3",Ia=z({defaultClassName:"_1w920rn2 _1yep5z6d6 _1yep5z6ih _1yep5z6ii _1yep5z6ij _1yep5z6j8 _1yep5z6j9 _1yep5z6ja _1yep5z6i2 _1yep5z6i3 _1yep5z6i4",variantClassNames:{isFocusVisible:{true:"_1yep5z6li _1yep5z6lg _1yep5z6hp"},isSelected:{true:"_1yep5z6li _1yep5z6lg _1yep5z6hp"},isLoading:{true:"_1yep5z615u _1yep5z615v _1yep5z615w"}},defaultVariants:{},compoundVariants:[[{isFocusVisible:!0,isSelected:!0},"_1w920rn6 _1yep5z6li _1yep5z6lg _1yep5z6hp"]]}),Nf="_1w920rnb _1yep5z6ld",Lf=z({defaultClassName:"_1w920rn7 _1yep5z63o _1yep5z63p _1yep5z63q _1yep5z61c _1yep5z61d _1yep5z61e _1yep5z63 _1yep5z64 _1yep5z65 _1yep5z62f _1yep5z62g _1yep5z62h _1yep5z6b0 _1yep5z6b1 _1yep5z6b2 _1yep5z6bo _1yep5z6bp _1yep5z6bq _1yep5z6cc _1yep5z6cd _1yep5z6ce _1yep5z6d0 _1yep5z6d1 _1yep5z6d2 _1yep5z6g5 _1yep5z6eu _1yep5z6dy",variantClassNames:{isFocusVisible:{true:"_1w920rn8 _1yep5z6li _1yep5z6lg _1yep5z6hp"},isSelected:{true:"_1w920rn9"}},defaultVariants:{},compoundVariants:[[{isFocusVisible:!0,isSelected:!0},"_1w920rna _1yep5z61t1 _1yep5z61t0 _1yep5z61pa"]]}),Mf="_1w920rnc";var Df=({items:e,ulRef:t})=>{let{length:o}=e,r=rt.useRef(null);return useLayoutEffect(()=>{if(!r.current)return;let a=r.current.closest(".BaselineUI-ImageGallery")?.querySelector(`[data-image-key='${e?.at(-1)?.key}']`)?.cloneNode(!0);invariant(a,"Node is not defined."),r.current?.prepend(a);},[e,t]),jsx("div",{className:Ia(),ref:r,children:jsx(L,{backgroundColor:"background.secondary.medium",borderRadius:"full",typography:"label.md.medium",color:"text.primary",position:"absolute",paddingX:"md",className:Mf,children:o})})};function Bf(e,t){return e.find(o=>o.id===t)}function Hf(e,t,o){let r=e.findIndex(i=>i.id===t),a=[...o].map(i=>e.findIndex(s=>s.id===i)),n=[...e];for(let i of a){let[s]=n.splice(i,1);n.splice(r,0,s);}return n}function Ff(e,t,o){let r=e.findIndex(s=>s.id===t),a=[...o].map(s=>e.findIndex(p=>p.id===s)),n=[...e],i=0;for(let s of a){let[p]=n.splice(s-i,1);n.splice(r,0,p),i++;}return n}function Di(e){return e.map(t=>({id:t.id,label:t.label,data:{src:t.src,alt:t.alt}}))}function wa(e){return e.map(t=>({id:t.id,label:t.label,src:t.data?.src,alt:t.data?.alt}))}var J0=({fit:e,item:t,deleteElement:o})=>{let{formatMessage:r}=H(),{imgProps:a,isLoading:n,isLoaded:i}=kt({src:t.data?.src,alt:t.data?.alt??""}),s=useTransition(i,{from:{opacity:0},enter:{opacity:1},leave:{opacity:0}});return n?jsx(jt,{"aria-label":r(er.loading)}):s((p,l)=>l&&jsx(animated.div,{role:"img","aria-label":a.alt,style:{...p,backgroundImage:`url(${a.src})`,backgroundSize:e},className:Nf,children:o}))},Vf=({item:{value:e},options:{optionProps:t,isFocusVisible:o,isSelected:r},liRef:a,fit:n="contain",onDelete:i,className:s,imageClassName:p,imageLabelClassName:l,imageDimensions:c,style:u,renderImage:m=(d,{deleteElement:f})=>jsx(J0,{item:d,deleteElement:f,fit:n})})=>{let d=useId(),{formatMessage:f}=H();invariant(e&&_t(e),"Expected value to be a list option");let y=i?jsx("div",{className:Rf,children:jsx(E,{"aria-label":f(er.delete),size:"xs",icon:XIcon$2,onPress:()=>{i(e.id);},UNSAFE_NON_INTERACTIVE:!0})}):null,b=useCallback(v=>{let _={},g=typeof v=="function"?v(wa([e])[0],{isSelected:r}):v;return g&&(_.width=typeof g.width=="string"?Hi[g.width]:g.width,_.aspectRatio="height"in g?`${_.width} / ${g.height}`:g?.aspectRatio?.toString()),_},[r,e]);return jsxs("li",{...t,ref:a,className:classNames(Sf,s),"aria-labelledby":d,style:u,children:[jsx(L,{display:"flex",flexDirection:"column",flex:1,justifyContent:"center",alignItems:"center",children:jsx("div",{className:classNames(Ia({isFocusVisible:o,isSelected:r,isLoading:!0}),p),style:b(c),"data-image-key":e.id,children:m(e,{deleteElement:y??void 0,onDelete:i})})}),jsx("span",{id:d,className:classNames(Lf({isFocusVisible:o,isSelected:r}),l),children:e.label})]})};var nI={width:0,display:"block"};var Hi=(o=>(o[o.sm=102]="sm",o[o.md=170]="md",o))(Hi||{}),Af=rt.forwardRef(({className:e,style:t,fit:o="cover",onReorder:r,"data-block-id":a,"data-block-class":n,onDelete:i,imageWidth:s="sm",aspectRatio:p=3/4,items:l,defaultItems:c=[],onKeyDown:u,imageContainerClassName:m,imageClassName:d,labelClassName:f,onListChange:y,renderImage:b,imageDimensions:v={width:s,aspectRatio:p},imageContainerStyle:_,...g},h)=>{let R=rt.useRef(null),[w,x]=useState([]),{formatMessage:C}=H();useEffect(()=>{(p||s)&&console.warn("ImageGallery: aspectRatio and imageWidth are deprecated. Use imageDimensions instead.");},[s,p]);let[T,N]=useControlledState(g.selectedKeys,g.defaultSelectedKeys??[],g.onSelectionChange),[k,S]=useControlledState(l?Di(l):void 0,Di(c),y?B=>{y?.(wa(B));}:void 0),P=useCallback(B=>{let j=B.target.key,A=B.keys;if(B.target.dropPosition==="before"){let X=Hf(k,j,A);S(X);}else if(B.target.dropPosition==="after"){let X=Ff(k,j,A);S(X);}r?.(B);},[k,r,S]),I=useCallback(()=>{i&&w.length&&(S(k.filter(B=>!w.includes(B.id))),i(new Set(w)),x([]));},[w,k,i,S]),D=useCallback((B,j,A)=>jsx(Vf,{item:B,options:j,liRef:A,fit:o,onDelete:i?X=>{x([X]);}:void 0,renderImage:b,className:m,imageClassName:d,imageLabelClassName:f,imageDimensions:v,style:_}),[o,i,b,m,d,f,v,_]),{keyboardProps:F}=useKeyboard({onKeyDown(B){if(u?.(B),B.key==="Backspace"||B.key==="Delete"){if(!i)return;if([...T].length)x([...T]);else {let A=B.target.dataset.key;x([A]);}}}});return jsxs("div",{...F,ref:h,style:t,className:classNames("BaselineUI-ImageGallery",e),"data-block-id":a,"data-block-class":n,children:[jsx(le,{...g,selectedKeys:T,items:k,onReorder:P,layout:"grid",orientation:"vertical",className:Tf,ref:R,dropIndicatorStyle:nI,renderOption:D,renderDragPreview:B=>jsx(Df,{items:B,ulRef:R}),onSelectionChange:N,getItems:B=>[...B].map(j=>{let A=Bf(k,j);return {src:A?.src||"",alt:A?.alt||"",key:j}})}),jsx(Ie,{isOpen:!![...w].length,onOpenChange:B=>{B||x([]);},children:jsx(Ee,{isDismissable:!0,children:jsx(Pa,{showCloseButton:!1,title:"Are you sure you want to delete this item?",primaryActionLabel:C(er.delete),cancelLabel:C(er.cancel),onCancel:()=>{x([]);},onPrimaryAction:I,autoFocusButton:"cancel"})})})]})});Af.displayName="ImageGallery";var er=U({delete:{id:"delete",defaultMessage:"Delete"},cancel:{id:"cancel",defaultMessage:"Cancel"},loading:{id:"loading",defaultMessage:"Loading"}});var $f="_1sexph00",Uf="_1sexph01 _1yep5z617n _1yep5z617o _1yep5z617p _1yep5z619z _1yep5z61a0 _1yep5z61a1 _1yep5z61b5 _1yep5z61b6 _1yep5z61b7 _1yep5z618t _1yep5z618u _1yep5z618v _1yep5z61rj _1yep5z61rk _1yep5z61rl";var Gf=rt.forwardRef(({className:e,style:t,items:o,"data-block-id":r,"data-block-class":a,hideLabel:n,size:i="md",isDisabled:s,showSelectedIcon:p=!0,excludeFromTabOrder:l,onPress:c,isSelected:u,defaultSelected:m,onButtonSelectionChange:d,moreAriaLabel:f,optionStyle:y,optionClassName:b,triggerClassName:v,triggerStyle:_,tooltipProps:g,...h},R)=>{let{formatMessage:w}=H(),x=oe(),C=useSelectState({items:o,...h,defaultSelectedKey:h.defaultSelectedKey||o?.[0]?.id,children:x,validationState:h.validationState==="error"?"invalid":"valid"}),[T,N]=useControlledState(u,!!m,$=>{d?.({isSelected:$,selectedKey:C.selectedKey});}),{hoverProps:k,isHovered:S}=useHover({isDisabled:s}),P=useMemo(()=>{let $=C.collection.getItem(C.selectedKey),te=$?.textValue||$?.["aria-label"],V=$?.value,Y=V?.icon,K={size:i,isSelected:T,onPress:Ce=>{N(!T),c?.(Ce);},isDisabled:s,excludeFromTabOrder:l,className:typeof b=="function"?b(V,{isButton:!0,isSelected:T}):b,style:typeof y=="function"?y(V,{isButton:!0,isSelected:T}):y};return n&&Y?jsx(ne,{variant:"inverse",size:"sm",includeArrow:!1,text:te,placement:"bottom start",offset:4,...typeof g=="function"?g("button"):g,children:jsx(be,{icon:Y,"aria-label":te,variant:"toolbar",...K})}):jsx(Hr,{iconStart:Y,label:te,variant:"toolbar",...K})},[l,n,T,s,c,b,y,N,i,C.collection,C.selectedKey,g]),I=h["aria-label"],D=useCallback(({buttonProps:$,ref:te})=>{delete $["aria-labelledby"];let V=f||`${w(fI.more)} ${I}`;return jsx(ne,{variant:"inverse",size:"sm",includeArrow:!1,text:V,placement:"bottom start",offset:4,...g,children:jsx(PressResponder,{...$,children:jsx(E,{"aria-label":V,ref:te,icon:CaretDownIcon,variant:"toolbar",size:i,className:({isFocusVisible:Y})=>classNames(Br({isSelected:T,isFocusVisible:Y}),Uf,v),style:_,isDisabled:s,excludeFromTabOrder:l})})})},[I,l,w,T,s,f,i,g,v,_]),F=filterTruthyValues({"data-block-id":r,"data-block-class":a,"data-hovered":S,"data-selected":T,"data-disabled":s,"data-expanded":C.isOpen}),B=ae(R),j=useMemo(()=>({state:C,popoverAnchorRef:B}),[C,B]),A=useCallback($=>typeof b=="function"?b($,{isButton:!1,isSelected:C.selectionManager.isSelected($.id)}):b,[b,C.selectionManager]),X=useCallback($=>typeof y=="function"?y($,{isButton:!1,isSelected:C.selectionManager.isSelected($.id)}):y,[y,C.selectionManager]);return jsx(Ar.Provider,{value:j,children:jsxs(L,{...k,role:"group",display:"inline-flex",flexDirection:"row",alignItems:"center",className:classNames($f,"BaselineUI-ButtonSelect",e),"aria-label":h["aria-label"],"aria-labelledby":h["aria-labelledby"],"aria-describedby":h["aria-describedby"],"aria-details":h["aria-details"],style:t,ref:B,...F,children:[P,jsx(Ye,{isDisabled:s,showSelectedIcon:p,placement:"bottom start",items:o,...h,style:{width:20},optionClassName:A,optionStyle:X,variant:"ghost",renderTrigger:D})]})})});Gf.displayName="ButtonSelect";var fI=U({more:{id:"more",defaultMessage:"More"}});var Wf=z({defaultClassName:"_18v88n10 _1yep5z6ih _1yep5z6ii _1yep5z6ij _1yep5z6lc",variantClassNames:{labelPosition:{top:"_1yep5z614l _1yep5z614m _1yep5z614n",start:"_1yep5z614i _1yep5z614j _1yep5z614k _1yep5z6160 _1yep5z6161 _1yep5z6162 _1yep5z6va _1yep5z6vb _1yep5z6vc"}},defaultVariants:{},compoundVariants:[]}),Xf=z({defaultClassName:"_18v88n1p _1yep5z66 _1yep5z67 _1yep5z68 _1yep5z62i _1yep5z62j _1yep5z62k _1yep5z63o _1yep5z63p _1yep5z63q _1yep5z61c _1yep5z61d _1yep5z61e _1yep5z6eu _1yep5z6lc _1yep5z6ln _1yep5z6lf _1yep5z6dy",variantClassNames:{isDisabled:{true:"_18v88n1q _1yep5z610q"},labelPosition:{top:"_18v88n1r",start:"_18v88n1s"}},defaultVariants:{},compoundVariants:[]}),Yf=z({defaultClassName:"_18v88n1t _1yep5z660 _1yep5z661 _1yep5z662 _1yep5z6ik _1yep5z6il _1yep5z6im _1yep5z6l9",variantClassNames:{validationState:{valid:"_18v88n1u",error:"_1yep5z6106",warning:"_1yep5z610e"},isReadOnly:{true:"_1yep5z610x"}},defaultVariants:{},compoundVariants:[]}),Zf=z({defaultClassName:"_18v88n1d _1yep5z6ai _1yep5z6aj _1yep5z6ak _1yep5z6b6 _1yep5z6b7 _1yep5z6b8 _1yep5z6bu _1yep5z6bv _1yep5z6bw _1yep5z6ci _1yep5z6cj _1yep5z6ck _1yep5z6ih _1yep5z6ii _1yep5z6ij _1yep5z6iq _1yep5z6ir _1yep5z6is _1yep5z6lq _1yep5z6lo _1yep5z6gz _1yep5z6j8 _1yep5z6j9 _1yep5z6ja",variantClassNames:{validationState:{valid:"_18v88n1e",error:"_1yep5z612a",warning:"_18v88n1g"},isHovered:{true:"_18v88n1h"},isFocused:{true:"_1yep5z6wa _1yep5z6wb _1yep5z6wc _1yep5z6wy _1yep5z6wz _1yep5z6x0 _1yep5z6xm _1yep5z6xn _1yep5z6xo _1yep5z6ya _1yep5z6yb _1yep5z6yc _1yep5z617i _1yep5z617g _1yep5z612o _1yep5z6179 _1yep5z6178 _1yep5z613h _1yep5z617b"},isDisabled:{true:"_18v88n1j"},variant:{primary:"_18v88n1k",ghost:"_18v88n1l"},isReadOnly:{true:"_1yep5z613h"}},defaultVariants:{},compoundVariants:[[{variant:"ghost",isHovered:!0,isFocused:!1,validationState:"valid"},"_1yep5z61ta _1yep5z61t8 _1yep5z61oj"],[{variant:"ghost",isFocused:!1,isHovered:!1,validationState:"valid"},"_18v88n1n"],[{isHovered:!0,validationState:"valid",isDisabled:!1,isReadOnly:!1,isFocused:!1,variant:"primary"},"_1yep5z61ok"],[{isHovered:!0,validationState:"warning",isDisabled:!1,isReadOnly:!1,isFocused:!1},"_1yep5z61ok"],[{isReadOnly:!0,variant:"primary",isFocused:!1},"_18v88n1o"]]}),Qf=z({defaultClassName:"_18v88n13 _1yep5z6dy _1yep5z6ev",variantClassNames:{isDisabled:{true:"_1yep5z610q"}},defaultVariants:{},compoundVariants:[]}),Jf=z({defaultClassName:"_18v88n19 _1yep5z6ik _1yep5z6il _1yep5z6im",variantClassNames:{labelPosition:{top:"_1yep5z6sy _1yep5z6sz _1yep5z6t0",start:"_1yep5z6mv _1yep5z6mw _1yep5z6mx _1yep5z614l _1yep5z614m _1yep5z614n"},hasMessage:{true:"_18v88n1c"}},defaultVariants:{},compoundVariants:[[{labelPosition:"start",hasMessage:!1},"_1yep5z61rm _1yep5z61rn _1yep5z61ro"]]}),ey=z({defaultClassName:"_18v88n15 _1yep5z699 _1yep5z69a _1yep5z69b _1yep5z6lf",variantClassNames:{isFocusVisible:{true:"_1yep5z611w _1yep5z613t _1yep5z6177"},isHovered:{true:"_1yep5z611w _1yep5z613t _1yep5z6177"},isOpen:{true:"_1yep5z613t _1yep5z6177"}},defaultVariants:{},compoundVariants:[[{isFocusVisible:!0},"_1yep5z61no _1yep5z61pl _1yep5z61sz"],[{isHovered:!0},"_1yep5z61no _1yep5z61pl _1yep5z61sz"],[{isOpen:!0},"_1yep5z61pl _1yep5z61sz"]]});var ry=rt.forwardRef(({className:e,style:t,inputStyle:o,inputClassName:r,"data-block-id":a,"data-block-class":n,label:i,items:s,showSelectedIcon:p=!1,onSelectionChange:l,onInputChange:c,isInvalid:u=!1,labelPosition:m="top",validationState:d="valid",variant:f="primary",toggleLabel:y,renderOption:b,showIcon:v=!0,filter:_,minValue:g,maxValue:h,inputType:R="text",onInputSubmit:w,...x},C)=>{let{contains:T}=useFilter({sensitivity:"base"}),N=oe(),k=useComboBoxState({...x,defaultFilter:_||T,defaultItems:s,onSelectionChange:l,onInputChange:c,children:N,validationState:u?"invalid":"valid"}),S=rt.useRef(null),P=rt.useRef(null),I=rt.useRef(null),D=rt.useRef(null),F=rt.useRef(null),{buttonProps:B,inputProps:j,listBoxProps:A,labelProps:X,errorMessageProps:$,descriptionProps:te,validationErrors:V}=useComboBox({...x,inputRef:P,defaultItems:s,buttonRef:S,listBoxRef:I,popoverRef:D,validationState:d==="error"?"invalid":"valid"},k),Y=x.errorMessage||V.join(" "),K=ke({...x,errorMessage:Y,descriptionProps:te,errorMessageProps:$,labelPosition:m});Y&&(d="error");let{hoverProps:Ce,isHovered:Pe}=useHover({isDisabled:x.isDisabled}),{isFocused:ze,focusProps:Se,isFocusVisible:Fe}=useFocusRing(),ee=Ft({isReadOnly:x.isReadOnly,validationState:d}),de=filterTruthyValues({"data-read-only":x.isReadOnly,"data-disabled":x.isDisabled,"data-validation-state":d,"data-focused":ze,"data-focus-visible":Fe}),{labelProps:so,fieldProps:lo}=useLabel({label:i,"aria-label":x["aria-label"],"aria-labelledby":x["aria-labelledby"],"aria-describedby":x["aria-describedby"],"aria-details":x["aria-details"]}),{keyboardProps:po}=useKeyboard({onKeyDown:G=>{G.key==="Enter"&&w?.(j.value?.toString()??"");}}),{focusProps:gt}=useFocus({onBlur:()=>{j.value&&w?.(j.value?.toString()??"");}});return jsx(at.Provider,{value:k,children:jsxs("div",{className:classNames(Wf({labelPosition:m}),e,"BaselineUI-ComboBox"),"data-block-id":a,"data-block-class":n,style:t,ref:C,children:[i||m==="start"&&K?jsxs("div",{className:Jf({labelPosition:m,hasMessage:!!K}),children:[jsx("label",{...mergeProps(X,so),className:Qf({isDisabled:x.isDisabled}),children:i}),m==="start"&&K]}):null,jsxs("div",{...Ce,className:Zf({validationState:d,isHovered:Pe,isFocused:ze,variant:f,isReadOnly:!!x.isReadOnly,isDisabled:!!x.isDisabled}),ref:F,children:[jsx("input",{...mergeProps(j,Se,de,lo,gt,po,R==="number"?{type:"number",min:g,max:h,onKeyDown:G=>{(G.key==="ArrowUp"||G.key==="ArrowDown")&&G.preventDefault();}}:null),ref:P,className:classNames(Xf({isDisabled:x.isDisabled,labelPosition:m}),"BaselineUI-ComboBox-Input",r),style:o}),ee&&v?jsx(ee,{className:Yf({validationState:d,isReadOnly:x.isReadOnly}),size:16}):null,jsx(q,{...B,ref:S,variant:"popover",label:y,className:ey({isFocusVisible:!x.isDisabled&&!x.isReadOnly&&Fe,isHovered:!x.isDisabled&&!x.isReadOnly&&Pe,isOpen:k.isOpen})})]}),jsx(ye,{className:Ke,ref:D,triggerRef:F,state:k,children:jsx(le,{...A,items:s,ref:I,renderOption:b,selectionMode:"single",showSelectedIcon:p,className:Tr})}),m==="top"&&K]})})});ry.displayName="ComboBox";var ji=rt.forwardRef(({item:e,renderGridItem:t,state:o},r)=>{let a=ae(r),n=useGridListItem({node:e},o,a),i=o.selectionManager.selectionMode!=="none"&&o.selectionManager.selectionBehavior==="toggle",{checkboxProps:s}=useGridListSelectionCheckbox({key:e.key},o);return t(e,{...n,checkBoxProps:i?s:void 0},a)});ji.displayName="GridListItem";var LI=e=>{e.key==="Enter"||e.key==="Escape"||e.stopPropagation();},ny=rt.forwardRef(({className:e,style:t,isEditing:o=!1,"data-block-id":r,"data-block-class":a,gridListHandle:n,...i},s)=>{let p=oe(),l=useListState({...i,children:p}),c=ae(s),{gridProps:u}=useGridList(i,l,c);cr({handle:n,type:"gridlist"},l,c);let m=o?LI:u.onKeyDownCapture;return jsx("ul",{...u,className:classNames("BaselineUI-GridList",e),"data-block-id":r,"data-block-class":a,style:t,ref:c,onKeyDownCapture:m,children:[...l.collection].map(d=>jsx(ji,{item:d,state:l,renderGridItem:i.renderGridItem},d.key))})});ny.displayName="GridList";var iy="_1yep5z6f5",sy="_1dc3b8m0";var ly=rt.forwardRef(({className:e,selectionMode:t,style:o,"data-block-id":r,"data-block-class":a,tooltipProps:n,icon:i,renderActionItem:s,...p},l)=>{let c=ae(l),u=oe(),m=useListState({...p,selectionMode:t,suppressTextValueWarning:!0,children:u}),{actionGroupProps:d}=useActionGroup({...p,selectionMode:t,children:u},m,c),f=[...m.collection].map(y=>(invariant(y.value),jsx(OI,{item:y,state:m,isDisabled:p.isDisabled,onAction:p.onAction,tooltipProps:n,renderActionItem:s},y.key)));return i?jsxs(L,{...d,display:"flex",flexDirection:"row",gap:"md",alignItems:"center",className:classNames("BaselineUI-ActionGroup",e),"data-block-id":r,"data-block-class":a,style:o,ref:c,children:[jsx(i,{size:24,className:iy}),jsx(L,{display:"flex",flexDirection:"row",gap:"xs",flex:1,children:f})]}):jsx(L,{...d,display:"flex",flexDirection:"row",gap:"xs",className:classNames("BaselineUI-ActionGroup",e),"data-block-id":r,"data-block-class":a,style:o,ref:c,children:f})});ly.displayName="ActionGroup";var OI=({item:e,state:t,tooltipProps:o,renderActionItem:r,onAction:a,isDisabled:n})=>{let{buttonProps:i}=useActionGroupItem({key:e.key},t),s=n||t.selectionManager.isDisabled(e.key),p=t.selectionManager.isSelected(e.key);invariant(e.value);let{icon:l}=e.value;invariant(l);let c=useMemo(()=>(invariant(e.value),typeof o=="function"?o(e.value):o),[o,e.value]);return jsx(PressResponder,{...mergeProps(i,{onPress:()=>{a?.(e.key);}}),children:jsx(ne,{text:e.textValue,size:"sm",variant:"inverse",includeArrow:!1,offset:4,...c,children:r?.(e,{isSelected:p,isDisabled:s})||jsx(E,{variant:"tertiary",icon:l,"aria-label":e.textValue,size:"sm",isDisabled:s,className:classNames({[sy]:p},"BaselineUI-ActionGroup-Item")})})})};var py="ujkypy0 _1yep5z66 _1yep5z67 _1yep5z68 _1yep5z62i _1yep5z62j _1yep5z62k _1yep5z63o _1yep5z63p _1yep5z63q _1yep5z61c _1yep5z61d _1yep5z61e",cy="_1yep5z61qa _1yep5z61qb _1yep5z61qc _1yep5z61gz _1yep5z61h0 _1yep5z61h1";var uy=rt.forwardRef(({className:e,style:t,items:o,optionsContainerClassName:r,label:a,icon:n,value:i,defaultValue:s,onChange:p,isDisabled:l,optionClassName:c,optionStyle:u,labelPosition:m="top","data-block-id":d,"data-block-class":f,...y},b)=>{let v=useMemo(()=>o.map(g=>({id:g.color,label:g.label})),[o]),_=useId();return useEffect(()=>{!a&&!y["aria-label"]&&!y["aria-labelledby"]&&console.warn("ColorSwatchPicker: Please provide a label or aria-label for accessibility.");},[a,y]),jsxs(L,{...Da(y),className:classNames("BaselineUI-ColorSwatchPicker",e),"data-block-id":d,"data-block-class":f,display:"flex",flexDirection:m==="top"?"column":"row",alignItems:m==="top"?"flex-start":"center",justifyContent:"space-between",gap:"md",style:t,ref:b,children:[n||a?jsxs(L,{display:"flex",alignItems:"center",gap:"md",children:[n?jsx(n,{size:24,className:sprinkles({color:"icon.primary"})}):null,a?jsx(Q,{id:_,type:"label",size:"sm",children:a}):null]}):null,jsx(le,{className:classNames(cy,r),selectionMode:"single",items:v,orientation:"horizontal",defaultSelectedKeys:s?[s]:void 0,disabledKeys:l?v.map(g=>g.id):void 0,isDisabled:l,selectedKeys:i?[i]:void 0,onSelectionChange:g=>{p?.([...g][0]);},optionClassName:c,optionStyle:u,renderOption:({key:g,textValue:h},{isSelected:R,isFocusVisible:w,isDisabled:x,optionProps:C},T)=>jsx("li",{...C,"data-disabled":x,className:classNames(py,C.className),ref:T,children:jsx(Qe,{isFocusVisible:w,color:g,isSelected:R,"aria-label":h,isInteractive:!0,isDisabled:x})}),...y,"aria-labelledby":a?_:y["aria-labelledby"]})]})});uy.displayName="ColorSwatchPicker";var my="_10dw1p96",fy="_10dw1p95",yy=z({defaultClassName:"_10dw1p90 _1yep5z63o _1yep5z63p _1yep5z63q _1yep5z61c _1yep5z61d _1yep5z61e _1yep5z6ih _1yep5z6ii _1yep5z6ij _1yep5z6iq _1yep5z6ir _1yep5z6is _1yep5z69f _1yep5z69g _1yep5z69h _1yep5z6j8 _1yep5z6j9 _1yep5z6ja _1yep5z6lf _1yep5z6l2 _1yep5z6kz",variantClassNames:{isSelected:{true:"_1yep5z611v"},isHovered:{true:"_10dw1p92"},isRenaming:{true:"_10dw1p93"},isFocusVisible:{true:"_1yep5z613h _1yep5z617a _1yep5z6178"}},defaultVariants:{},compoundVariants:[[{isHovered:!0,isSelected:!1,isRenaming:!1},"_1yep5z61nm _1yep5z61pf _1yep5z61t1 _1yep5z61t0"]]});var vy=({context:e,depth:t,children:o,item:r,onPrimaryAction:a,onSecondaryAction:n,actionsPosition:i,primaryActionIcon:s,secondaryActionIcon:p,primaryActionAriaLabel:l,secondaryActionAriaLabel:c,onRename:u,onAction:m,renderItemTitle:d=f=>f.data.label})=>{let{formatMessage:f}=H(),{hoverProps:y,isHovered:b}=useHover({}),v=useRef(null),{onKeyDown:_,...g}=e.interactiveElementProps;delete g.onFocus,delete g.onClick;let h=createFocusManager(v),R=useCallback(P=>{if(P.key==="ArrowRight"&&(e.isExpanded||!r.children?.length))v.current?.setAttribute("tabindex","-1"),P.preventDefault(),P.stopPropagation(),h.focusNext();else switch(P.key){case"ArrowLeft":{h.focusPrevious()?(P.preventDefault(),P.stopPropagation()):(_?.(P),e.focusItem(!0));break}case"Enter":{e.toggleExpandedState();break}default:_?.(P);}},[e,h,_,r,v]),w=useMemo(()=>{let P=s,I=p,D=typeof l=="function"?l(r.index):l,F=typeof c=="function"?c(r.index):c;return P||I?jsxs(L,{display:"flex",flexDirection:"row",children:[P?jsx(be,{icon:P,"aria-label":D,size:"sm",excludeFromTabOrder:!0,variant:"secondary",onPress:()=>{a?.(r.index);},tooltip:!0}):null,I?jsx(be,{icon:I,"aria-label":F,size:"sm",excludeFromTabOrder:!0,variant:"secondary",onPress:()=>{n?.(r.index);},tooltip:!0}):null]}):null},[s,r.index,p,l,c,a,n]),x=useCallback(P=>{P.key==="Enter"?(u?.({key:r.index,value:P.target.value}),e.stopRenamingItem()):P.key==="Escape"?(e.stopRenamingItem(),v.current?.setAttribute("tabindex","0"),v.current?.focus()):P.key!=="ArrowRight"&&P.key!=="ArrowLeft"&&P.key!=="ArrowUp"&&P.key!=="ArrowDown"&&!P.metaKey&&P.continuePropagation();},[r.index,e,u,v]),C=r.data.icon,T=!!u,{pressProps:N}=usePress({onPress:()=>{m?.(r.index);}}),{isFocusVisible:k,focusProps:S}=useFocusRing$1();return jsxs(Fragment,{children:[jsx("div",{...mergeProps({onKeyDown:R,onFocus:()=>{e.focusItem(!1);}},N,S,y,e.itemContainerWithoutChildrenProps,g),className:classNames(fy,yy({isHovered:b,isSelected:e.isSelected,isFocusVisible:k,isRenaming:e.isRenaming}),"BaselineUI-TreeView-Row"),role:"row","data-key":r.index,"data-expanded":r.isFolder?e.isExpanded:void 0,"aria-expanded":r.isFolder?e.isExpanded:void 0,"aria-selected":e.isSelected,"data-depth":t,"aria-level":t+1,"aria-posinset":r.data.posInset,"aria-setsize":r.data.setSize,"aria-label":r.data.label,style:{justifyContent:i==="end"?"space-between":void 0},ref:v,children:jsxs(L,{role:"gridcell",style:{display:"contents"},"aria-colindex":1,children:[i==="start"?w:null,jsxs(L,{display:"flex",flexDirection:"row",alignItems:"center",children:[jsxs(L,{display:"flex",padding:"sm",flexDirection:"row",alignItems:"center",gap:"md",style:{marginInlineStart:`calc(${t*2} * ${themeVars.spacing.lg})`},children:[jsx(E,{icon:ChevronRightIcon,size:"xxs",variant:"secondary",onPress:()=>{e.toggleExpandedState();},"aria-label":f(e.isExpanded?qi.collapse:qi.expand),style:{visibility:r.children?.length?"visible":"hidden"},className:classNames(my,"BaselineUI-TreeView-ExpansionToggle"),UNSAFE_NON_INTERACTIVE:!0}),C?jsx(C,{size:16,style:{color:themeVars.color.icon.interactive.disabled}}):null]}),jsxs(L,{paddingLeft:"sm",paddingY:e.isRenaming?"none":"md",display:"flex",flexDirection:"column",gap:"xs",onDoubleClick:P=>{T&&(P.stopPropagation(),P.preventDefault(),e.startRenamingItem());},children:[e.isRenaming?jsx("div",{onClick:P=>{P.stopPropagation();},children:jsx(Ge,{defaultValue:r.data.label,autoFocus:!0,onBlur:P=>{u?.({key:r.index,value:P.target.value}),e.stopRenamingItem();},"aria-label":f(qi.rename),onKeyDown:x,className:"BaselineUI-TreeView-RenameInput"})}):jsx(Q,{type:"label",size:"sm",className:classNames(sprinkles.compoundVariants({color:"text.primary"}),"BaselineUI-TreeView-Title"),children:d(r)}),r.data.description?jsx(Q,{type:"helper",size:"sm",className:"BaselineUI-TreeView-Description",children:r.data.description}):null]})]}),i==="end"?w:null]})}),o]})},qi=U({expand:{id:"expand",defaultMessage:"Expand"},collapse:{id:"collapse",defaultMessage:"Collapse"},rename:{id:"rename",defaultMessage:"Rename"}});function cw(e,{posInset:t,setSize:o}){return {index:e.id,children:e.children?e.children.map(r=>r.id):[],data:{label:e.label,description:e.description,icon:e.icon,...e.data,posInset:t,setSize:o},isFolder:!!e.children?.length}}function dw(e,t){let o={};function r(a,n,i){if(o[a.id]=t(a,{posInset:n,setSize:i}),a.children)for(let s=0;s<a.children.length;s++)r(a.children[s],s+1,a.children.length);}return r(e,0,0),o}var xy=rt.forwardRef(({className:e,style:t,"data-block-id":o,"data-block-class":r,items:a,rootId:n=a.id,onPrimaryAction:i,onSecondaryAction:s,primaryActionIcon:p,secondaryActionIcon:l,primaryActionAriaLabel:c,secondaryActionAriaLabel:u,actionsPosition:m="start",onRename:d,onAction:f,renderItemTitle:y,...b},v)=>{let _=oe(),g=useRef(null),h=useTreeState({...b,items:a.children,children:_}),R=useMemo(()=>Object.fromEntries(Object.entries(dw(a,cw)).map(([k,S])=>[k,{...S,canRename:!!d}])),[a,d]),w=useId(),[x,C]=rt.useState(a.children?.[0]?.id??""),T=useRef(x),N=useMemo(()=>({[`tree-${w}`]:{focusedItem:x,expandedItems:[...h.expandedKeys],selectedItems:[...h.selectionManager.selectedKeys]}}),[x,h.expandedKeys,h.selectionManager.selectedKeys,w]);return useEffect(()=>{if(!g.current)return;let k=Ve(g.current),S=k instanceof ShadowRoot,P=g.current?.contains(k?.activeElement??null);S&&P&&Ve(g.current)?.querySelector(`[data-rct-item-id="${x}"]`)?.focus();},[x]),jsx(ControlledTreeEnvironment,{items:R,getItemTitle:k=>k.data?.label,viewState:N,onExpandItem:k=>{h.setExpandedKeys(new Set([...h.expandedKeys,k.index])),b.onExpand?.(k.index.toString());},onFocusItem:k=>{C(k.index),k.index&&(T.current=k.index);},onCollapseItem:k=>{h.setExpandedKeys(new Set([...h.expandedKeys].filter(S=>S!==k.index))),b.onCollapse?.(k.index.toString());},onSelectItems:k=>{h.selectionManager.setSelectedKeys(new Set(k));},renderItem:k=>jsx(vy,{...k,onPrimaryAction:i,onSecondaryAction:s,actionsPosition:m,primaryActionIcon:p,secondaryActionIcon:l,primaryActionAriaLabel:c,secondaryActionAriaLabel:u,onRename:d,onAction:f,renderItemTitle:y}),renderLiveDescriptorContainer:({children:k})=>jsx($e,{children:jsx(VisuallyHidden,{children:k})}),renderTreeContainer:({containerProps:k,children:S})=>jsx("div",{...vt(k,{onBlur:P=>{P.currentTarget.contains(P.relatedTarget)||P.currentTarget.querySelector(`[data-key="${T.current}"]`)?.setAttribute("tabindex","0");}}),"data-block-id":o,"data-block-class":r,style:{...t,...k.style},className:classNames(e,"BaselineUI-TreeView"),ref:M(v,k.ref,g),role:"treegrid",children:S}),renderItemsContainer:({children:k})=>k,children:jsx(Tree,{treeId:`tree-${w}`,rootItem:n,treeLabel:b["aria-label"],treeLabelledBy:b["aria-labelledby"]})})});xy.displayName="TreeView";var vw=forwardRef(({className:e,isCollapsible:t=!1,...o},r)=>{let a=useRef(null),n=useId();return useImperativeHandle(r,()=>({resize:a.current?.resize})),jsx(Panel,{className:classNames("BaselineUI-Panel",e),collapsible:t,ref:a,id:n,...o})});vw.displayName="Panel";var kw=forwardRef(({className:e,...t},o)=>{let r=useRef(null);return useImperativeHandle(o,()=>({setLayout:r.current?.setLayout})),jsx(PanelGroup,{className:classNames("BaselineUI-PanelGroup",e),ref:r,...t})});kw.displayName="PanelGroup";var Cy="_6abhjk0";var Sw=({className:e,isDisabled:t=!1,...o})=>jsx(PanelResizeHandle,{disabled:t,className:classNames(Cy,"BaselineUI-PanelResizeHandle",e),...o});Sw.displayName="PanelResizeHandle";
|
|
55
55
|
|
|
56
|
-
export {
|
|
56
|
+
export { Bc as Accordion, Uc as AccordionItem, q as ActionButton, ly as ActionGroup, OI as ActionGroupItem, E as ActionIconButton, Pa as AlertDialog, wf as AudioPlayer, Ut as Avatar, L as Box, Gf as ButtonSelect, nc as Checkbox, Gt as ColorInput, Qe as ColorSwatch, uy as ColorSwatchPicker, ry as ComboBox, bc as DateFormat, me as Dialog, Fl as DialogTitle, Vs as DomNodeRenderer, Ir as Drawer, sf as Editor, Rp as FileUpload, zu as FreehandCanvas, ny as GridList, Xu as Group, il as I18nProvider, uu as IconColorInput, ra as IconColorInputButton, Zc as IconSelect, Zl as IconSlider, Eu as ImageDropZone, Af as ImageGallery, hd as InlineAlert, _p as Link, le as ListBox, gf as Markdown, Lr as Menu, Wu as MessageFormat, Ie as Modal, ih as ModalClose, Ee as ModalContent, Kr as ModalTrigger, Vt as NumberFormat, Me as NumberInput, yc as Pagination, vw as Panel, kw as PanelGroup, Sw as PanelResizeHandle, Ne as Popover, we as PopoverContent, Le as PopoverTrigger, $e as Portal, cl as PortalContainerProvider, Vu as Preview, Hp as ProgressBar, jt as ProgressSpinner, Gu as RadioGroup, qp as Reaction, df as ScrollControlButton, up as SearchInput, Ye as Select, O as Separator, Mt as Slider, sp as Switch, ud as TabItem, dd as Tabs, Ic as TagGroup, Q as Text, Ge as TextInput, Tt as ThemeProvider, Hr as ToggleButton, be as ToggleIconButton, da as Toolbar, ne as Tooltip, Tu as Transform, xa as Transition, xy as TreeView, U as defineMessages, TT as isInsideOverlayContent, Ms as isRect, wt as useDevice, H as useI18n, kt as useImage, el as useIntersectionObserver, It as useIsFirstRender, ll as useLocalStorage, hL as useMutationObserver, ge as usePortalContainer, tl as useResizeObserver, RL as useTextSelection, rl as useUndoRedo, Ja as useUserPreferences };
|