@baseline-ui/core 0.29.1 → 0.29.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  import { classNames, invariant, filterTruthyValues, getSvgPathFromStroke, getHTMLElement, getTextDimensions, getPlainText, cleanKeyFromGlobImport, getOsSpecificKeyboardShortcutLabel, isUrl } from '@baseline-ui/utils';
2
- import no, { useMemo, useCallback, useImperativeHandle, useContext, useEffect, createContext, useLayoutEffect, useState, useRef, useReducer, Fragment as Fragment$1, createElement } from 'react';
2
+ import io, { useMemo, useCallback, useImperativeHandle, useContext, useEffect, createContext, useLayoutEffect, useState, useRef, 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
5
  import { useGranularEffect, useGranularLayoutEffect } from 'granular-hooks';
@@ -13,14 +13,14 @@ import { CaretDownIcon, MinusIcon, PlusIcon, ChevronRightIcon, XIcon as XIcon$1
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 } from '@react-aria/focus';
15
15
  import { assignInlineVars } from '@vanilla-extract/dynamic';
16
- import F1 from 'lodash/isEmpty';
16
+ import G1 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 qg, { createPortal } from 'react-dom';
18
19
  import { CheckmarkIcon as CheckmarkIcon$1, MinusIcon as MinusIcon$1, XIcon as XIcon$2, CaretLeftIcon, CaretRightIcon } from '@baseline-ui/icons/12';
19
20
  import { useInteractionModality, PressResponder } from '@react-aria/interactions';
20
21
  import { parseColor, useColorAreaState, useColorFieldState, useColorSliderState } from '@react-stately/color';
21
22
  import { useColorSwatch, useColorArea, useColorField, useColorSlider } from '@react-aria/color';
22
23
  import { getStroke } from 'perfect-freehand';
23
- import { createPortal } from 'react-dom';
24
24
  import { makeMoveable, Draggable, Resizable, Rotatable, Snappable } from 'react-moveable';
25
25
  import { useToolbar } from '@react-aria/toolbar';
26
26
  import { take, uniqueId, flatMapDeep, camelCase, kebabCase } from 'lodash';
@@ -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 iu from 'dompurify';
33
+ import * as vu 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 Ck from 'markdown-it';
37
+ import Lk from 'markdown-it';
38
38
  import { announce } from '@react-aria/live-announcer';
39
39
  import { useActionGroup, useActionGroupItem } from '@react-aria/actiongroup';
40
40
 
@@ -47,8 +47,8 @@ import { useActionGroup, useActionGroupItem } from '@react-aria/actiongroup';
47
47
  * This notice may not be removed from this file.
48
48
  *
49
49
  */
50
- var Te=typeof document<"u"?no.useLayoutEffect:()=>{};function fa(e){let t=useRef(null);return Te(()=>{t.current=e;},[e]),useCallback((...o)=>{let r=t.current;return r?.(...o)},[])}function ya(e){let[t,o]=useState(e),r=useRef(null),a=fa(()=>{if(!r.current)return;let s=r.current.next();if(s.done){r.current=null;return}t===s.value?a():o(s.value);});Te(()=>{r.current&&a();});let n=fa(s=>{r.current=s(t),a();});return [t,n]}var fe=e=>{var t;return (t=e?.ownerDocument)!==null&&t!==void 0?t:document},oe=e=>{if(e&&"window"in e&&e.window===e)return e;let t=co(e);return t instanceof ShadowRoot?t.ownerDocument.defaultView||window:t?.defaultView||window},co=e=>{if(!e)return document;let t=e.getRootNode?e.getRootNode():document;return e.isConnected?(t):null};function L(...e){return e.length===1?e[0]:t=>{for(let o of e)typeof o=="function"?o(t):o!=null&&(o.current=t);}}var Df=new Set(["id"]),Ef=new Set(["aria-label","aria-labelledby","aria-describedby","aria-details"]),Ff=new Set(["href","hrefLang","target","rel","download","ping","referrerPolicy"]),Hf=/^(data-.*)$/;function ba(e,t={}){let{labelable:o,isLink:r,propNames:a}=t,n={};for(let s in e)Object.prototype.hasOwnProperty.call(e,s)&&(Df.has(s)||o&&Ef.has(s)||r&&Ff.has(s)||a?.has(s)||Hf.test(s))&&(n[s]=e[s]);return n}function xs(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 ga(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 Cs(){return ga(/^Mac/i)}function Ps(){return ga(/^iPhone/i)}function ks(){return ga(/^iPad/i)||Cs()&&navigator.maxTouchPoints>1}function va(){return Ps()||ks()}function _a(){return xs(/Android/i)}function ot(){return xs(/Firefox/i)}function te(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 jf(){return typeof window.ResizeObserver<"u"}function za(e){let{ref:t,onResize:o}=e;useEffect(()=>{let r=t?.current;if(r)if(jf()){let a=new window.ResizeObserver(n=>{n.length&&o();});return a.observe(r),()=>{r&&a.unobserve(r);}}else return window.addEventListener("resize",o,!1),()=>{window.removeEventListener("resize",o,!1);}},[o,t]);}function mo(e){return !!e&&"label"in e&&!!e.label&&!("children"in e)}function Kt(e){return !!e&&"children"in e&&!!e.children&&"title"in e}function qf(e){return Kt(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 se(){return useCallback(e=>qf(e),[])}function Rs(e,t,o){let{direction:r}=useLocale(),a=useDraggableCollectionState({...e,collection:t.collection,selectionManager:t.selectionManager,isDisabled:!e.enableReorder,getItems:e.getItems||(i=>[...i].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:s}=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:s,dragState:a,dropState:n}}function ey(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 oy(e){var t=ey(e,"string");return typeof t=="symbol"?t:String(t)}function ty(e,t,o){return t=oy(t),t in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e}function Is(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 Ts(e){for(var t=1;t<arguments.length;t++){var o=arguments[t]!=null?arguments[t]:{};t%2?Is(Object(o),!0).forEach(function(r){ty(e,r,o[r]);}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):Is(Object(o)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(o,r));});}return e}function Ns(e,t){var o={};for(var r in e)o[r]=t(e[r],r);return o}var ry=(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=Ts(Ts({},e.defaultVariants),o);for(var n in a){var s,i=(s=a[n])!==null&&s!==void 0?s:e.defaultVariants[n];if(i!=null){var p=i;typeof p=="boolean"&&(p=p===!0?"true":"false");var l=e.variantClassNames[n][p];l&&(r+=" "+l);}}for(var[c,u]of e.compoundVariants)ry(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 Ns(e.variantClassNames,o=>Ns(o,r=>r.split(" ")[0]))}},t};var Ss=z({defaultClassName:"_6n12k9b _1yep5z6l0 _1yep5z6kz _1yep5z6hk _1yep5z6ki",variantClassNames:{isDropTarget:{true:"_1yep5z612n"},orientation:{vertical:"_1yep5z6166",horizontal:"_1yep5z6167"}},defaultVariants:{},compoundVariants:[]}),Ls="_6n12k98 _1yep5z6ky _1yep5z6i0 _1yep5z6i1 _1yep5z6i2",Ms=z({defaultClassName:"_6n12k99 _1yep5z6ev _1yep5z6da _1yep5z6dv",variantClassNames:{isDisabled:{true:"_1yep5z6ey"}},defaultVariants:{},compoundVariants:[]}),Bs=z({defaultClassName:"_6n12k91 _1yep5z63r _1yep5z63s _1yep5z63t _1yep5z61f _1yep5z61g _1yep5z61h _1yep5z6i0 _1yep5z6i1 _1yep5z6i2 _1yep5z6i9 _1yep5z6ia _1yep5z6ib _1yep5z6ir _1yep5z6is _1yep5z6it _1yep5z6jr _1yep5z6js _1yep5z6jt _1yep5z69l _1yep5z69m _1yep5z69n _1yep5z6dy _1yep5z6eu _1yep5z6ki _1yep5z6kl _1yep5z6ky _1yep5z6kx _1yep5z6kv _1yep5z6ks",variantClassNames:{isSelected:{},isFocused:{true:"_1yep5z612n _1yep5z616c _1yep5z616a _1yep5z616d _1yep5z612w _1yep5z612x _1yep5z612y"},isHovered:{true:"_1yep5z6114",false:"_1yep5z6113"},isFirstChild:{true:"_6n12k95"},isLastChild:{true:"_6n12k96"},isDisabled:{true:"z9nup83 _1yep5z6109"}},defaultVariants:{},compoundVariants:[]}),Ds="_6n12k9f _1yep5z63 _1yep5z64 _1yep5z65 _1yep5z62f _1yep5z62g _1yep5z62h _1yep5z69l _1yep5z69m _1yep5z69n _1yep5z6i0 _1yep5z6i1 _1yep5z6i2 _1yep5z6ir _1yep5z6is _1yep5z6it",Es="_6n12k90";var Fs=z({defaultClassName:"gukncs0",variantClassNames:{isVertical:{true:"gukncs1"},isSecondary:{true:"gukncs2"}},defaultVariants:{},compoundVariants:[]});var j=no.forwardRef(({className:e,style:t,variant:o="primary",orientation:r="horizontal",UNSAFE_omitRole:a,elementType:n="div","data-block-id":s,"data-block-class":i,...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":s,"data-block-class":i,style:t,role:a?void 0:c.role,ref:l})});j.displayName="Separator";function dy(e){return sprinkles.properties.has(e)}var M=no.forwardRef(({elementType:e="div",children:t,...o},r)=>{let a=e,{sprinkleProps:n,domProps:s}=useMemo(()=>{let i={},p={};for(let l in o)dy(l)?i[l]=o[l]:p[l]=o[l];return {sprinkleProps:i,domProps:p}},[o]);return jsx(a,{...s,className:classNames(sprinkles(n),"BaselineUI-Box",s.className),ref:r,children:t})});M.displayName="Box";var rt=no.forwardRef(({item:e,isDisabled:t,isFocusVisible:o,isSelected:r,liProps:a,showSelectedIcon:n,description:s,descriptionProps:i,labelProps:p,isFocused:l,isPressed:c,_state:u},m)=>{invariant(e.value&&mo(e.value),"Item cannot be a section");let{icon:d,label:f}=e.value,{hoverProps:y,isHovered:b}=useHover({isDisabled:t}),_=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,_),className:classNames(Bs({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(M,{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})]}),s?jsx("span",{className:Ms({isDisabled:t}),...i,children:s}):null]})});rt.displayName="DefaultRenderOption";var Ca=({dropState:e,orientation:t="vertical",dropIndicatorStyle:o,dropIndicatorClassName:r,renderDropIndicator:a=({isDropTarget:s,isHidden:i,dropIndicatorProps:p,orientation:l},c)=>i?null:jsx("li",{...p,ref:c,"data-drop-target":s,className:classNames(Ss({isDropTarget:s,orientation:l}),"BaselineUI-DropIndicator",r),style:o}),...n})=>{let s=no.useRef(null),{dropIndicatorProps:i,isHidden:p,isDropTarget:l}=useDropIndicator(n,e,s);return a({dropIndicatorProps:{...i,role:"option"},isHidden:p,isDropTarget:l,orientation:t},s)};var As=({item:e,children:t,state:o,dragState:r,...a})=>{let{dragProps:n}=useDraggableItem({key:e.key},r);return jsxs(Fragment,{children:[jsx(Ca,{target:{type:"item",key:e.key,dropPosition:"before"},...a}),t(n),o.collection.getKeyAfter(e.key)==null&&jsx(Ca,{target:{type:"item",key:e.key,dropPosition:"after"},...a})]})};As.displayName="DraggableListOption";var at=no.forwardRef(({item:e,renderOption:t=(m,d,f)=>jsx(rt,{item:m,liProps:d.optionProps,...d,ref:f}),showSelectedIcon:o,state:r,dragState:a,dropState:n,orientation:s,dropIndicatorStyle:i,dropIndicatorClassName:p,optionStyle:l,optionClassName:c},u)=>{let m=no.useRef(null),d=useOption({key:e.key},r,m),{value:f}=e;invariant(f&&mo(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(As,{orientation:s,state:r,item:e,dropState:n,dragState:a,dropIndicatorStyle:i,dropIndicatorClassName:p,children:b=>t(e,{...d,showSelectedIcon:o,_state:r,optionProps:{...mergeProps(d.optionProps,b),...y}},L(m,u))}):t(e,{...d,showSelectedIcon:o,_state:r,optionProps:{...d.optionProps,...y}},L(m,u))});at.displayName="Option";var qs=({section:e,state:t,sectionClassName:o,sectionStyle:r,showSectionHeader:a,renderSectionHeader:n,withSectionHeaderPadding:s=!1,...i})=>{let p=no.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&&Kt(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(j,{UNSAFE_omitRole:!0}),jsxs("li",{...l,style:{...l.style,...f},className:classNames(Es,y,"BaselineUI-ListBox-Section"),children:[e.rendered&&a?n?.(e,p)||jsx(M,{...u,className:classNames("BaselineUI-ListBox-SectionHeader",Ds),ref:p,paddingX:"lg",typography:"label.md.medium",color:"text.primary",paddingInlineStart:s?"5xl":"lg",paddingInlineEnd:"lg",children:e.rendered}):null,jsx("ul",{...c,children:[...m].map(b=>jsx(at,{item:b,state:t,...i},b.key))})]})]})};var eo=no.createContext(null),Pa=no.forwardRef(({className:e,layout:t="stack",orientation:o="vertical",showSelectedIcon:r=!0,style:a,renderOption:n,enableReorder:s=!1,"data-block-id":i,"data-block-class":p,renderDragPreview:l,onReorder:c,state:u,listBoxHandle:m,...d},f)=>{let y=no.useRef(null),{direction:b}=useLocale(),_=no.useRef(null),{listBoxProps:v}=useListBox({...d,shouldSelectOnPressUp:s,keyboardDelegate:new ListKeyboardDelegate({collection:u.collection,ref:_,layout:t,orientation:o,direction:b,disabledKeys:u.disabledKeys})},u,_),g=useCallback((I,C)=>{let B=_.current?.querySelector(`[data-key="${I}"][role="option"]`);B&&B?.scrollIntoView({block:"nearest",inline:"nearest",...C});},[]);useImperativeHandle(m,()=>({scrollIntoView:g}),[g]),useGranularEffect(()=>{let I=co(_.current)instanceof ShadowRoot,C=u.selectionManager.focusedKey;I&&C&&g(C);},[u.selectionManager.focusedKey],[g]);let h=useReducedMotion(),w=useCallback(I=>{let C=fe(_.current);c&&(!h&&"startViewTransition"in C?C.startViewTransition(()=>{c(I);}):c(I));},[c,h]),{collectionProps:x,dragState:k,dropState:P}=Rs({...d,onReorder:w,layout:t,orientation:o,enableReorder:s,preview:y},u,_),{isFocusVisible:R,isFocused:T,focusProps:N}=useFocusRing(),S=filterTruthyValues({"data-block-id":i,"data-block-class":p,"data-layout":t,"data-empty":u.collection.size===0,"data-focused":T,"data-focus-visible":R,"data-orientation":o});return jsxs("ul",{...mergeProps(v,N,S,x),className:classNames(Ls,"BaselineUI-ListBox",e),style:a,ref:L(f,_),children:[[...u.collection].map(I=>{let C={key:I.key,state:u,dragState:k,dropState:P,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 I.type==="section"?jsx(qs,{...C,section:I}):jsx(at,{...C,item:I})}),l?jsx(DragPreview,{ref:y,children:l}):null]})});Pa.displayName="ListBoxCore";var Gs=no.forwardRef((e,t)=>{let o=se(),r=useListState({...e,children:o});return jsx(Pa,{...e,ref:t,state:r})});Gs.displayName="ListBoxStandalone";var ie=no.forwardRef((e,t)=>{let o=useContext(eo);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(Pa,{...e,ref:t,state:o}):jsx(Gs,{...e,ref:t})});ie.displayName="ListBox";var Xt="uf19bsf _1yep5z6ki",Ws=z({defaultClassName:"uf19bs0 _1yep5z6ai _1yep5z6aj _1yep5z6ak _1yep5z6b6 _1yep5z6b7 _1yep5z6b8 _1yep5z6bu _1yep5z6bv _1yep5z6bw _1yep5z6ci _1yep5z6cj _1yep5z6ck _1yep5z6f0 _1yep5z6kx _1yep5z6i3 _1yep5z6i4 _1yep5z6i5 _1yep5z6ir _1yep5z6is _1yep5z6it _1yep5z6jl _1yep5z6jm _1yep5z6jn _1yep5z6ks",variantClassNames:{size:{xxs:"uf19bs1",xs:"uf19bs2",sm:"uf19bs3",md:"uf19bs4",lg:"uf19bs5 _1yep5z6vw _1yep5z6vx _1yep5z6vy _1yep5z6wk _1yep5z6wl _1yep5z6wm _1yep5z6x8 _1yep5z6x9 _1yep5z6xa _1yep5z6xw _1yep5z6xx _1yep5z6xy"},isHovered:{true:"uf19bs6"},isDisabled:{true:"uf19bs7 _1yep5z610d"},isFocusVisible:{true:"uf19bs8"},variant:{primary:"uf19bs9",secondary:"uf19bsa",tertiary:"uf19bsb",ghost:"uf19bsc",toolbar:"uf19bsd _1yep5z6we _1yep5z6wf _1yep5z6wg _1yep5z6x2 _1yep5z6x3 _1yep5z6x4 _1yep5z6xq _1yep5z6xr _1yep5z6xs _1yep5z6ye _1yep5z6yf _1yep5z6yg",popover:"uf19bse _1yep5z6oz _1yep5z6p0 _1yep5z6p1 _1yep5z6mn _1yep5z6mo _1yep5z6mp _1yep5z6le _1yep5z6lf _1yep5z6lg _1yep5z6nq _1yep5z6nr _1yep5z6ns _1yep5z6uz _1yep5z6v0 _1yep5z6v1"}},defaultVariants:{},compoundVariants:[[{variant:"toolbar",isHovered:!0,isFocusVisible:!1},"_1yep5z61mg"],[{variant:"primary",isHovered:!0,isFocusVisible:!1},"_1yep5z61mg"],[{variant:"secondary",isHovered:!0,isFocusVisible:!1},"_1yep5z61ln"],[{variant:"tertiary",isHovered:!0,isFocusVisible:!1},"_1yep5z61lm _1yep5z61mg"],[{variant:"ghost",isHovered:!0,isFocusVisible:!1},"_1yep5z61ls"],[{variant:"popover",isHovered:!0,isFocusVisible:!1},"_1yep5z61o1 _1yep5z61rl _1yep5z61rp _1yep5z61rm"],[{variant:"ghost",isDisabled:!1},"_1yep5z61lr"],[{variant:"popover",size:"lg"},"_1yep5z61h4 _1yep5z61h5 _1yep5z61h6 _1yep5z61hs _1yep5z61ht _1yep5z61hu _1yep5z61ig _1yep5z61ih _1yep5z61ii _1yep5z61j4 _1yep5z61j5 _1yep5z61j6"]]});var nt=no.createContext({state:null,overlayTriggerAria:{triggerProps:{},overlayProps:{}},triggerRef:void 0}),Ne=({children:e,...t})=>{let o=no.useRef(null),r=useOverlayTriggerState(t),a=useOverlayTrigger(t,r),n=useMemo(()=>({state:r,overlayTriggerAria:a,triggerRef:o}),[r,a]);return jsx(nt.Provider,{value:n,children:e})};var Ys={bottom:"_1gzftth2",top:"_1gzftth3",right:"_1gzftth4",left:"_1gzftth5"},Zs="_1gzftth1 _1yep5z6i0 _1yep5z6i1 _1yep5z6i2",Qs="_1gzftth6",Js="_1gzftth8",ei="_1gzftth7",oi="var(--_1gzftth0)";function dI(e){return e.closest(".BaselineUI-Portal")||e.closest(".BaselineUI-Popover-Content")}function ti(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 Yt=no.createContext({isSelected:!1,ref:void 0}),Se=({children:e,anchorRect:t})=>{let{state:o,overlayTriggerAria:r,triggerRef:a}=useContext(nt);invariant(o,"PopoverTrigger must be used within a Popover");let{triggerProps:n}=r,s=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||ti(t),"If provided, the anchorRect prop must be an object with left and top number values, and optionally width and height."),jsx(Yt.Provider,{value:s,children:t?jsx("button",{className:classNames(Js,"BaselineUI-PopoverTrigger-Hidden"),style:t,ref:a,tabIndex:-1},JSON.stringify(t)):e})};function Zt({tooltip:e,...t},o){let[r,a]=useState(t["aria-label"]||""),n=t["aria-labelledby"];return useEffect(()=>{if(n){let p=fe(o.current).querySelector(`#${n}`);p&&a(p.textContent||"");}},[n,o]),{tooltipProps:useMemo(()=>{let i={size:"sm",variant:"inverse",text:r,includeArrow:!1,placement:"bottom start",offset:4};if(typeof e=="object")return {...i,...e};if(e)return i},[r,e])}}var Qt=e=>{let t=no.useRef(null),{ref:o,...r}=useContext(Yt)||{},{buttonProps:a,isPressed:n}=useButton({...e,...r},t);return {buttonProps:a,isPressed:n,ref:L(t,o||null)}},Jt=(e,t)=>{let o=no.useRef(null),{ref:r,...a}=useContext(Yt)||{},{buttonProps:n,isPressed:s}=useToggleButton({...e,...a},t,o);return (n.role==="radio"||n.role==="checkbox")&&(n["aria-pressed"]=void 0),{buttonProps:n,isPressed:s,ref:L(o,r||null)}};var er=z({defaultClassName:"oom8bs0 _1yep5z6ai _1yep5z6aj _1yep5z6ak _1yep5z6b6 _1yep5z6b7 _1yep5z6b8 _1yep5z6bu _1yep5z6bv _1yep5z6bw _1yep5z6ci _1yep5z6cj _1yep5z6ck _1yep5z6i3 _1yep5z6i4 _1yep5z6i5 _1yep5z69i _1yep5z69j _1yep5z69k _1yep5z6ir _1yep5z6is _1yep5z6it _1yep5z6kx _1yep5z6ky _1yep5z6ks _1yep5z6dy _1yep5z6ki",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"]]});var f1={sm:16,md:20,lg:24},$=no.forwardRef(({label:e,style:t,className:o,iconStart:r,iconEnd:a,variant:n="primary",elementType:s="button",isDisabled:i,size:p="sm","data-block-id":l,"data-block-class":c,...u},m)=>{let{buttonProps:d,isPressed:f,ref:y}=Qt({...u,elementType:s,isDisabled:i}),b=f1[p],{hoverProps:_,isHovered:v}=useHover({isDisabled:i}),{isFocusVisible:g,isFocused:h,focusProps:w}=useFocusRing(),x=filterTruthyValues({"data-block-id":l,"data-block-class":c,"data-disabled":i,"data-focused":h,"data-focus-visible":g,"data-hovered":v,"data-pressed":f});return jsxs(s,{...mergeProps(d,_,w,x),className:classNames(er({isDisabled:!!i,isFocusVisible:g,isHovered:v,variant:n,size:p}),"BaselineUI-ActionButton",o),style:t,ref:L(m,y),children:[!!r&&jsx(r,{size:b}),e,!!a&&jsx(a,{size:b}),n==="popover"&&jsx(CaretDownIcon,{size:8,className:Xt})]})});$.displayName="ActionButton";var si=no.forwardRef(({className:e,style:t,node:o,"data-block-id":r,"data-block-class":a,...n},s)=>{let i=no.useRef(null);no.useEffect(()=>{let c=i.current;return c?.append(o),()=>{c?.contains(o)&&o.remove();}},[o]);let{pressProps:p,isPressed:l}=usePress(n);return jsx("div",{...mergeProps(n,p),className:e,style:t,"data-block-id":r,"data-block-class":a,"data-pressed":l,"data-testid":"dom-node-renderer",ref:L(s,i)})});si.displayName="DomNodeRenderer";var ii="_14uvjig0 z9nup81",li="_14uvjig7",pi="_14uvjig3",ci=z({defaultClassName:"_14uvjig4",variantClassNames:{isDisabled:{true:"_14uvjig5"},hasNumberInput:{false:"_14uvjig6"}},defaultVariants:{},compoundVariants:[]}),di=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:[]}),mi="_14uvjig8",ui=z({defaultClassName:"_14uvjig9 _14uvjig1",variantClassNames:{active:{true:"_14uvjig2"},isFocusVisible:{true:"_14uvjigb _14uvjig2"},isDisabled:{true:"_14uvjigc"},isHovered:{true:"_14uvjig2"}},defaultVariants:{},compoundVariants:[]});var yo=z({defaultClassName:"nrh1ehx",variantClassNames:{isDisabled:{true:"nrh1ehy"},hasError:{true:"nrh1ehz"},labelPosition:{start:"nrh1eh10",top:"nrh1eh11"}},defaultVariants:{},compoundVariants:[]}),or=z({defaultClassName:"nrh1eho",variantClassNames:{isDisabled:{true:"nrh1ehp"},labelPosition:{top:"nrh1ehq",start:"nrh1ehr"}},defaultVariants:{},compoundVariants:[]}),bo=z({defaultClassName:"nrh1ehs",variantClassNames:{validationState:{valid:"nrh1eht",error:"nrh1ehu",warning:"nrh1ehv"},isReadOnly:{true:"nrh1ehw"}},defaultVariants:{},compoundVariants:[]}),Fe="nrh1eh3",He=z({defaultClassName:"nrh1eh4",variantClassNames:{labelPosition:{top:"nrh1eh5",start:"nrh1eh6"},hasMessage:{true:"nrh1eh7"}},defaultVariants:{},compoundVariants:[[{labelPosition:"start",hasMessage:!1},"nrh1eh8"]]}),Oe=z({defaultClassName:"nrh1eh0",variantClassNames:{labelPosition:{top:"z9nup81",start:"nrh1eh2 z9nup82"}},defaultVariants:{},compoundVariants:[]}),go=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 Pe({description:e,errorMessageProps:t,descriptionProps:o,warningMessage:r,errorMessage:a,labelPosition:n,isDisabled:s}){return e?jsx("div",{...o,className:yo({isDisabled:s,labelPosition:n}),children:e}):a?jsx("div",{...t,className:yo({hasError:!0,labelPosition:n}),children:a}):r?jsx("div",{className:yo({isDisabled:s,labelPosition:n}),children:r}):null}var fi=z({defaultClassName:"_1lnwne1 z9nup82",variantClassNames:{isHoveredOrFocused:{true:"_1lnwne2"},isInteractive:{false:"z9nup83"}},defaultVariants:{},compoundVariants:[[{isHoveredOrFocused:!0,isInteractive:!0},"_1lnwne4"]]}),yi="_1lnwne0";var bi=z({defaultClassName:"_1jwycy80",variantClassNames:{placement:{bottom:"_1jwycy81",left:"_1jwycy82",right:"_1jwycy83",top:"_1jwycy84"},variant:{default:"_1jwycy85",inverse:"_1jwycy86"}},defaultVariants:{},compoundVariants:[]}),gi=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:"_1yep5z6g0 _1yep5z6ez",inverse:"_1yep5z6d7 _1yep5z6fs _1yep5z6eu"}},defaultVariants:{},compoundVariants:[]});var Ta=no.forwardRef(({children:e,state:t,overlayProps:o,arrowProps:r,placement:a,variant:n,size:s,tooltipProps:i,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:bi({placement:f,variant:n}),...r}):null,jsx("div",{...mergeProps(c,i),className:gi({variant:n,size:s}),children:e})]})});Ta.displayName="TooltipContent";function zi({ref:e,onIntersect:t,isDisabled:o,threshold:r,rootMargin:a,root:n}){let s=no.useRef(null);useEffect(()=>{if(o){s.current?.disconnect(),s.current=null;return}s.current=new IntersectionObserver(([i])=>{t(i);},{root:n?.current,rootMargin:a,threshold:r});},[t,o,n,a,r]),useEffect(()=>{let{current:i}=s;return e.current&&i?.observe(e.current),()=>i?.disconnect()},[e]);}function hi({ref:e,onResize:t,isDisabled:o}){let r=no.useRef(null),[a,n]=no.useState();return no.useEffect(()=>{if(o){r.current?.disconnect(),r.current=null;return}r.current=new ResizeObserver(([s])=>{n(s.contentRect),t?.(s);});},[t,o,n]),no.useEffect(()=>{let{current:s}=r;return e.current&&s?.observe(e.current),()=>s?.disconnect()},[e]),{size:a}}function vo({src:e,alt:t}){let[o,r]=useState(!1),[a,n]=useState(!1),[s,i]=useState(!1),p=()=>{r(!0),i(!1);},l=()=>{n(!0),i(!1);};return useEffect(()=>{if(!e)return;i(!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:s,imgProps:{src:o?e:void 0,alt:t}}}function _o(){let e=useRef(!0);return useEffect(()=>{e.current=!1;},[]),e.current}var xi="SET_STATE",rr="UNDO",ar="REDO",B1=(e,t)=>{let{past:o,present:r,future:a}=e;switch(t.type){case xi:return {past:[...o,r],present:t.data,future:[]};case rr:return {past:o.slice(0,o?.length-1),present:o[o?.length-1],future:[r,...a]};case ar:return {past:[...o,r],present:a[0],future:a.slice(1)};default:throw new Error("Invalid action type")}},Ci=(e={},{isDisabled:t,onAction:o})=>{let r=_o(),[a,n]=useReducer(B1,{past:[],present:e,future:[]}),{past:s,present:i,future:p}=a,l=y=>{n({type:xi,data:y});},c=useRef(),u=()=>{c.current=rr,n({type:rr});},m=()=>{c.current=ar,n({type:ar});},d=!!s?.length,f=!!p?.length;return useGranularEffect(()=>{(c.current===rr||c.current===ar)&&(o?.(i,c.current),c.current=void 0);},[i],[o,r]),{state:i,push:t?()=>{}:l,undo:t?()=>{}:u,redo:t?()=>{}:m,pastStates:s,futureStates:p,canUndo:d,canRedo:f}};var Sa=no.createContext({messages:{},shouldLogMissingMessages:!0}),wi=({children:e,messages:t={},shouldLogMissingMessages:o=!0,...r})=>{let a=no.useMemo(()=>({messages:t,shouldLogMissingMessages:o}),[t,o]);return jsx(I18nProvider,{...r,children:jsx(Sa.Provider,{value:a,children:e})})};wi.displayName="I18nProvider";function F(e){let{messages:t,shouldLogMissingMessages:o}=useContext(Sa);useEffect(()=>{!e&&F1(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,s)=>{if(typeof n=="object")try{return r(n.id,s)}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,s)}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 q=e=>e;function tN(e,t,o){let r=no.useRef(null);return no.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 Ii(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 s=n instanceof Function?n(o):n;r(s),window.localStorage.setItem(e,JSON.stringify(s));}catch(s){console.log(s);}}]}function pN({ref:e,onSelectionChange:t,onSelectionEnd:o,isDisabled:r}){let a=no.useRef(null);usePress({ref:e,isDisabled:r,onPressEnd(){let s=oe(e.current).getSelection();s&&e.current?.contains(s.anchorNode)&&o?.(s);},onPressStart(){let n=oe(e.current);a.current=n.getSelection(),a.current&&a.current.removeAllRanges();}}),useEffect(()=>{let n=e.current;if(!n||r)return;function s(){let l=oe(n).getSelection();l&&e.current?.contains(l.anchorNode)&&t(l);}let i=fe(n);return i.addEventListener("selectionchange",s),()=>{i.removeEventListener("selectionchange",s);}},[e,t,r]);}function zo(e){let t=useCallback(()=>{let a=oe(e??document.body),n=a.matchMedia(queries.tablet);return a.matchMedia(queries.desktop).matches?"desktop":n.matches?"tablet":"mobile"},[e]),[o,r]=no.useState(t);return Te(()=>{let a=oe(e),n=()=>{r(t());};return a.addEventListener("resize",n),n(),()=>{a.removeEventListener("resize",n);}},[e,t]),o}var La=no.createContext(void 0),Ni=({portalContainer:e,children:t})=>jsx(La.Provider,{value:e,children:t});Ni.displayName="PortalContainerProvider";function be(e){let t=useContext(La);return e||t}var Si=z({defaultClassName:"z9nup84",variantClassNames:{size:{xs:"z9nup85",sm:"z9nup86"}},defaultVariants:{},compoundVariants:[]});var Li="z9nup80",ho="z9nup83",Mi="z9nup87";function Ma(e=window){let[t,o]=useState("light"),[r,a]=useState(!1),[n,s]=useState(!1),[i,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=>{s(u.matches);};return l.matches&&s(!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:i}}var xo=createContext({theme:lightTheme,setTheme:()=>{}});var Bi="var(--hj25q10)";var ir={LIGHT:{name:"light",theme:lightTheme},DARK:{name:"dark",theme:darkTheme}},Co=no.forwardRef(({theme:e="system",children:t,setTheme:o,className:r,style:a,UNSAFE_domProps:n,"data-block-id":s,"data-block-class":i},p)=>{let{direction:l}=useLocale(),{colorScheme:c,reducedMotion:u,highContrast:m,transparency:d}=Ma(),{name:f,theme:y}=useMemo(()=>{switch(e){case"system":return c==="light"?ir.LIGHT:ir.DARK;case"light":return ir.LIGHT;case"dark":return ir.DARK;default:return {name:"custom",theme:e}}},[c,e]),b=zo(),_={"data-theme":f,"data-block-id":s,"data-block-class":i,"data-reduced-motion":u,"data-high-contrast":m,"data-transparency":d,"data-device":b},v=useMemo(()=>({theme:y,setTheme:o}),[y,o]);return jsx(xo.Provider,{value:v,children:jsx("div",{...mergeProps(n,_),className:classNames(Li,"BaselineUI-ThemeProvider",r),style:{...assignInlineVars(themeVars,y),...assignInlineVars({[Bi]:l==="rtl"?"-1":"1"}),...a},ref:p,children:t})})});Co.displayName="ThemeProvider";var Po=no.forwardRef(({className:e,style:t,children:o,"data-block-id":r,"data-block-class":a,...n},s)=>{let{theme:i}=useContext(xo);return jsx(Overlay,{...n,children:jsx(Co,{ref:s,theme:i,style:t,className:classNames("BaselineUI-Portal",e),"data-block-id":r,"data-block-class":a,children:o})})});Po.displayName="Portal";var re=no.forwardRef(({children:e,placement:t="bottom",delay:o=1e3,closeDelay:r=500,variant:a="default",size:n="md",includeArrow:s=!0,portalContainer:i,className:p,style:l,"data-block-id":c,"data-block-class":u,...m},d)=>{let f=no.useRef(null),y=no.useRef(null),b=!m.text||m.isDisabled,_=useTooltipTriggerState({...m,delay:o,closeDelay:r,isDisabled:b}),{triggerProps:v,tooltipProps:g}=useTooltipTrigger({...m,isDisabled:b,delay:o,closeDelay:r},_,f),h=be(i),{overlayProps:w,arrowProps:x,placement:k,updatePosition:P}=useOverlayPosition({arrowSize:s?13:0,targetRef:f,arrowBoundaryOffset:s?8:0,offset:s?12:2,overlayRef:y,placement:t,isOpen:_.isOpen,...m});return zi({ref:y,threshold:1,onIntersect:P,isDisabled:!_.isOpen}),hi({ref:f,onResize:P,isDisabled:!_.isOpen}),jsxs(FocusableProvider,{...v,ref:f,children:[e,_.isOpen?jsx(Po,{disableFocusManagement:!0,portalContainer:h,className:p,style:l,"data-block-id":c,"data-block-class":u,children:jsx(Ta,{ref:L(d,y),state:_,arrowProps:x,overlayProps:w,placement:k,tooltipProps:g,variant:a,size:n,includeArrow:s,children:m.text})}):null]})});re.displayName="Tooltip";var xb={xxs:8,xs:12,sm:16,md:20,lg:24},D=no.forwardRef((e,t)=>{let o=te(t),{tooltipProps:r}=Zt(e,o);return r?jsx(re,{...r,children:jsx(Da,{...e,ref:o})}):jsx(Da,{...e,ref:o})});D.displayName="ActionIconButton";var Da=no.forwardRef(({className:e,style:t,icon:o,size:r="md",variant:a="primary",UNSAFE_NON_INTERACTIVE:n,elementType:s=n?"div":"button",...i},p)=>{let l=i["aria-label"],c=i["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}=Qt({...i,elementType:s}),{isFocusVisible:f,isFocused:y,focusProps:b}=useFocusRing(),{hoverProps:_,isHovered:v}=useHover({isDisabled:i.isDisabled}),g=filterTruthyValues({"data-block-id":i["data-block-id"],"data-block-class":i["data-block-class"],"data-focused":y,"data-focus-visible":f,"data-disabled":i.isDisabled,"data-hovered":v,"data-pressed":m});return jsxs(s,{...mergeProps(u,_,b,g),className:classNames(Ws({variant:a,size:r,isDisabled:!!i.isDisabled,isFocusVisible:f,isHovered:v}),"BaselineUI-ActionIconButton",e),ref:L(p,d),style: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:xb[r]}),a==="popover"&&jsx(CaretDownIcon,{size:8,className:Xt})]})});Da.displayName="ActionIconButtonCore";var Le=no.forwardRef(({className:e,style:t,labelPosition:o="top",variant:r="primary",showStepper:a=!0,...n},s)=>{let i=no.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:_,incrementButtonProps:v,groupProps:g,descriptionProps:h,errorMessageProps:w}=useNumberField(n,l,i),x=useMemo(()=>n.isReadOnly?ReadOnlyIcon:n.isInvalid?ErrorFilledIcon:null,[n.isInvalid,n.isReadOnly]),k=Pe({description:n.description,errorMessageProps:w,descriptionProps:h,errorMessage:n.errorMessage,labelPosition:o,isDisabled:n.isDisabled}),P=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(Oe({labelPosition:o}),"BaselineUI-NumberInput",e),...P,ref:s,children:[n.label?jsxs("div",{className:He({labelPosition:o,hasMessage:!!k}),children:[jsx("label",{...y,className:Fe,children:n.label}),o==="start"&&k]}):null,jsxs("div",{className:classNames({[ho]:n.isDisabled}),children:[jsxs("div",{...mergeProps(g,c),className:classNames(go({isHovered:u,isDisabled:!!n.isDisabled,isReadOnly:!!n.isReadOnly,validationState:n.isInvalid?"error":"valid",isFocused:f,variant:r}),{[yi]:o==="start"},"BaselineUI-NumberInput-Container"),children:[jsx("input",{...mergeProps(_,m),ref:i,className:classNames("BaselineUI-NumberInput-Input",or({isDisabled:n.isDisabled,labelPosition:o}))}),x?jsx(x,{className:bo({validationState:"error",isReadOnly:n.isReadOnly}),size:16}):null,a?jsxs("div",{className:fi({isHoveredOrFocused:u||f,isInteractive:!n.isReadOnly&&!n.isDisabled}),children:[jsx(D,{variant:"secondary",size:"xxs",icon:MinusIcon,...b,className:"BaselineUI-NumberInput-DecrementButton"}),jsx(j,{style:{height:16},orientation:"vertical"}),jsx(D,{variant:"secondary",size:"xxs",icon:PlusIcon,...v,className:"BaselineUI-NumberInput-DecrementButton"})]}):null]}),o==="top"&&k]})]})});Le.displayName="NumberInput";var wo=no.forwardRef(({className:e,style:t,onChange:o,onChangeEnd:r,numberFormatOptions:a,isDisabled:n,step:s,minValue:i,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:_,label:v,id:g,includeNumberInput:h},w)=>{let x=no.useRef(null),k={onChange:o===void 0?void 0:C=>{o(C[0]);},isDisabled:n||_,step:s,minValue:i,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:v},P=useNumberFormatter(a),R=useSliderState({...k,numberFormatter:P}),{trackProps:T,groupProps:N,labelProps:S}=useSlider(k,R,x),I=jsx(Le,{variant:"ghost",showStepper:!1,"aria-label":c,"aria-labelledby":S.id,value:R.getThumbValue(0),formatOptions:a,onChange:C=>{R.setThumbValue(0,C);},style:{width:55,textAlign:"right",flexShrink:0}});return jsxs("div",{...N,style:t,"data-block-id":f,"data-block-class":y,className:classNames(ii,"BaselineUI-Slider",e),children:[v?jsxs("div",{className:pi,children:[jsx("label",{...S,className:classNames(ci({isDisabled:n,hasNumberInput:!!h}),"BaselineUI-Slider-Label"),children:v}),h?I:null]}):null,jsxs("div",{className:li,children:[jsx("div",{...T,className:classNames(mi,"BaselineUI-Slider-Track"),ref:L(x,w),"data-testid":"track",children:jsx($b,{state:R,trackRef:x,isDisabled:n,isReadOnly:_})}),h&&!v?I:null]})]})});wo.displayName="Slider";function $b({state:e,trackRef:t,isDisabled:o,isReadOnly:r}){let a=no.useRef(null),{thumbProps:n,inputProps:s,isDragging:i}=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":i,"data-focused":l});return jsxs(Fragment,{children:[jsx("div",{className:classNames(ui({isDisabled:o,isFocusVisible:c,active:i,isHovered:m}),"BaselineUI-Slider-TrackHighlight"),style:{width:n.style?.left},"data-testid":"track-highlight"}),jsx("div",{...mergeProps(n,u,d),className:classNames(di({isDisabled:o,isFocusVisible:c,active:i,isReadOnly:r,isHovered:m}),"BaselineUI-Slider-Thumb"),"data-testid":"thumb",children:jsx(VisuallyHidden,{children:jsx("input",{ref:a,...mergeProps(s,p)})})})]})}var Ui=z({defaultClassName:"_1tkzayn0 _1yep5z6dy",variantClassNames:{size:{sm:"_1tkzayn1",md:"_1tkzayn2",lg:"_1tkzayn3"},type:{subtitle:"_1yep5z6105",title:"_1yep5z6105",label:"_1yep5z6106",value:"_1yep5z6106",helper:"_1yep5z6107",body:"_1yep5z6105"}},defaultVariants:{},compoundVariants:[[{type:"title",size:"sm"},"_1yep5z61jz"],[{type:"title",size:"md"},"_1yep5z61k2"],[{type:"title",size:"lg"},"_1yep5z61k5"],[{type:"body",size:"sm"},"_1yep5z61kp"],[{type:"body",size:"md"},"_1yep5z61ks"],[{type:"body",size:"lg"},"_1yep5z61ks"],[{type:"subtitle",size:"sm"},"_1yep5z61kl"],[{type:"subtitle",size:"md"},"_1yep5z61ko"],[{type:"subtitle",size:"lg"},"_1yep5z61ko"],[{type:"label",size:"md"},"_1yep5z61kn"],[{type:"label",size:"lg"},"_1yep5z61kn"],[{type:"value",size:"md"},"_1yep5z61kn"],[{type:"value",size:"lg"},"_1yep5z61kn"],[{type:"helper",size:"sm"},"_1yep5z61kh"]]});var J=no.forwardRef(({elementType:e="span",type:t="title",children:o,size:r="md",...a},n)=>jsx(e,{...a,className:classNames(Ui({size:r,type:t}),"BaselineUI-Text",a.className),ref:n,children:o}));J.displayName="Text";var qi=z({defaultClassName:"siobe21 _1yep5z6ao _1yep5z6ap _1yep5z6aq _1yep5z6bc _1yep5z6bd _1yep5z6be _1yep5z6d7 _1yep5z6l9 _1yep5z6l7 _1yep5z6gq _1yep5z6ky _1yep5z6i0 _1yep5z6i1 _1yep5z6i2 _1yep5z6ic _1yep5z6id _1yep5z6ie",variantClassNames:{background:{subtle:"_1yep5z6113",medium:"_1yep5z6114"},isFocusVisible:{true:"_1yep5z616a _1yep5z616c _1yep5z616d _1yep5z612n"}},defaultVariants:{},compoundVariants:[]}),Ki="siobe25",Gi="var(--siobe20)";var dr=no.forwardRef(({className:e,style:t,children:o,background:r="medium",title:a,action:n,"data-block-id":s,"data-block-class":i,onCloseRequest:p,...l},c)=>{let{formatMessage:u}=F(),m=no.useRef(null),{dialogProps:d,titleProps:f}=useDialog(l,m),{focusProps:y,isFocusVisible:b}=useFocusRing();return jsxs("div",{...mergeProps(d,y),className:classNames(qi({background:r,isFocusVisible:b}),"BaselineUI-Drawer",e),"data-block-id":s,"data-block-class":i,style:t,ref:L(c,m),children:[jsxs(M,{paddingLeft:"lg",paddingRight:"sm",backgroundColor:"background.primary.subtle",display:"flex",justifyContent:"space-between",alignItems:"center",gap:"lg",className:Ki,children:[jsx(J,{type:"title",size:"sm",...f,className:Mi,children:a}),jsxs(M,{children:[n?jsx(D,{...n,variant:"secondary"}):null,jsx(D,{variant:"secondary",size:"md",icon:XIcon,onPress:p,"aria-label":u(Jb.close)})]})]}),jsx(j,{variant:r==="subtle"?"primary":"secondary"}),o]})});dr.displayName="Drawer";var Jb=q({close:{id:"close",defaultMessage:"Close"}});function Yi(e,t,o){let{isDisabled:r}=e,a=useReducedMotion(),[n,s]=no.useState("100vh");useEffect(()=>{if(!va()&&!_a())return;let d=oe(o.current);function f(){s(`${d?.visualViewport.height}px`);}return f(),d?.visualViewport.addEventListener("resize",f),()=>{d?.visualViewport.removeEventListener("resize",f);}},[o]);let[{y:i},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=i.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:i.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 Zi=z({defaultClassName:"aml2vl0 _1yep5z6ko _1yep5z6kp _1yep5z6kr _1yep5z6kq _1yep5z6i0 _1yep5z6i1 _1yep5z6i2 _1yep5z6hr _1yep5z6hs _1yep5z6ht",variantClassNames:{enableDrawer:{false:"_1yep5z6ir _1yep5z6is _1yep5z6it _1yep5z6jl _1yep5z6jm _1yep5z6jn",true:"aml2vl2"}},defaultVariants:{},compoundVariants:[]}),Qi="_1yep5z6ko _1yep5z6kp _1yep5z6kr _1yep5z6kq _1yep5z6g2 _1yep5z6hr _1yep5z6hs _1yep5z6ht";var Ae=no.createContext({state:null,triggerProps:{},overlayProps:{}}),ke=({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(Ae.Provider,{value:n,children:e})};ke.displayName="Modal";var Oa=no.createContext({isDrawer:!1,closeDrawer:()=>{}}),_g=animated(Co),zg=({children:e,className:t,style:o,isDismissable:r=!0,isKeyboardDismissDisabled:a=!1,portalContainer:n,disableAnimation:s,enableDrawer:i=!1,"data-block-id":p,"data-block-class":l})=>{let{state:c}=no.useContext(Ae),u=zo(n),m=be(n),d=typeof i=="boolean"&&i||i==="auto"&&u==="mobile";invariant(c,"ModalContent must be a child of Modal");let f=no.useRef(null),y=typeof r=="function"?r(d):r,b=typeof a=="function"?a(d):a,{underlayProps:_,overlayProps:v,close:g,containerHeight:h}=Yi({isDisabled:!d,isDismissable:y},c,f),{modalProps:w,underlayProps:x}=useModalOverlay({isDismissable:!1,isKeyboardDismissDisabled:b},c,f),{theme:k}=useContext(xo),P=useReducedMotion(),R=useSpring({from:{opacity:0,transform:"scale(0.95)"},to:{opacity:1,transform:"scale(1)"},immediate:!!P||s,config:{easing:easings.easeInBounce}}),T=useMemo(()=>({...w.style,...d?{...v.style,width:"100%"}:R}),[v.style,w.style,d,R]),N=useMemo(()=>({isDrawer:d,closeDrawer:g}),[d,g]),S=useMemo(()=>mergeProps(x,_,{onPointerDown:d?_.onPointerDown:x.onPointerDown,onClick:()=>{r&&!d&&c.close();}}),[_,r,d,c,x]);return jsx(Overlay,{portalContainer:m,children:jsx(Oa.Provider,{value:N,children:jsxs(_g,{className:classNames(Zi({enableDrawer:d}),t),theme:k,"data-block-id":p,"data-block-class":l,style:{...o,height:d?h:"auto",...assignInlineVars({[Gi]:h})},children:[jsx(animated.div,{...S,"data-testid":"underlay",style:_.style,className:classNames(Qi,"BaselineUI-Modal-Underlay")}),jsx(animated.div,{...mergeProps(w,v),style:T,ref:f,"data-drawer":d,className:"BaselineUI-Modal-Content",children:typeof e=="function"?e(c):e})]})})})},hg=animated(zg),Me=({children:e,style:t,...o})=>{let{state:r}=no.useContext(Ae);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})((s,i)=>i&&jsx(hg,{...o,style:{...t,...s},children:typeof e=="function"?e(r):e}))};var rl=z({defaultClassName:"cjv3et0 _1yep5z6al _1yep5z6am _1yep5z6an _1yep5z6b9 _1yep5z6ba _1yep5z6bb _1yep5z6bx _1yep5z6by _1yep5z6bz _1yep5z6cl _1yep5z6cm _1yep5z6cn _1yep5z6fs _1yep5z6d7",variantClassNames:{size:{sm:"cjv3et1",md:"cjv3et2",lg:"cjv3et3",content:"cjv3et4"},variant:{primary:"_1yep5z6121 _1yep5z616i _1yep5z616k",ghost:"cjv3et6"},isDrawer:{true:"cjv3et7 _1yep5z6xq _1yep5z6xr _1yep5z6xs _1yep5z6ye _1yep5z6yf _1yep5z6yg _1yep5z6166"},isFocusVisible:{true:"_1yep5z612n _1yep5z616d _1yep5z616c _1yep5z616a"}},defaultVariants:{},compoundVariants:[]});var Aa=no.createContext({titleProps:{}}),me=no.forwardRef(({children:e,className:t,style:o,inheritDrawer:r,size:a="md",variant:n="primary","data-block-id":s,"data-block-class":i,drawerBackground:p,...l},c)=>{let u=no.useRef(null),m=no.useRef(null),{isDrawer:d,closeDrawer:f}=useContext(Oa),[y,b]=no.useState(""),{focusProps:_,isFocusVisible:v}=useFocusRing();useLayoutEffect(()=>{let x=m.current?.getRootNode(),k=l["aria-label"]||"";l["aria-labelledby"]&&(k=x?.querySelector(`#${l["aria-labelledby"].replaceAll(":","\\:")}`)?.textContent||""),b(k);},[l]);let{dialogProps:g,titleProps:h}=useDialog(l,u),w=useMemo(()=>({titleProps:h}),[h]);return d&&r?jsx(dr,{title:y,onCloseRequest:f,className:t,...l,"data-drawer":!0,"data-block-id":s,"data-block-class":i,ref:L(m,c),background:p,children:e}):jsx(Aa.Provider,{value:w,children:jsx("section",{...mergeProps(g,_),"data-block-id":s,"data-block-class":i,ref:L(u,c),style:o,className:classNames(rl({size:d?"content":a,variant:n,isDrawer:d,isFocusVisible:v}),"BaselineUI-Dialog",t),children:e})})});me.displayName="Dialog";var al=no.forwardRef(({children:e,className:t,style:o},r)=>{let{titleProps:a}=useContext(Aa);return no.isValidElement(e)?no.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})});al.displayName="DialogTitle";function nl({placement:e}){let t=useReducedMotion();return useTransition(!0,{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{color:$a}=themeVars,ye=no.forwardRef(({className:e,style:t,state:o,overlayProps:r,underlayClassName:a,children:n,includeArrow:s=!1,offset:i=2,portalContainer:p,contentContainerClassName:l,contentContainerStyle:c,"data-block-id":u,"data-block-class":m,...d},f)=>{let y=no.useRef(null),b=be(p),_=s?8:0,{underlayProps:v,popoverProps:g,placement:h,arrowProps:w}=usePopover({...d,offset:i+_,popoverRef:y,containerPadding:d.containerPadding||0},o);delete g.style?.position;let x=nl({placement:h}),k=h==="center"?"bottom":h;return x((P,R)=>R&&jsxs(Po,{portalContainer:b,style:t,ref:f,"data-block-id":u,"data-block-class":m,children:[!d.isNonModal&&jsx("div",{...v,className:classNames(ei,a,"BaselineUI-Popover-Underlay")}),jsxs(animated.div,{...g,style:{...g.style,...P,...assignInlineVars({[oi]:`${d.triggerRef?.current?.offsetWidth}px`})},ref:L(y,f),className:classNames(Zs,"BaselineUI-Popover-Content",e),"data-placement":["top","bottom","left","right"].filter(T=>h?.includes(T)),children:[s?jsxs("svg",{className:classNames(Ys[k],"BaselineUI-PopoverContent-Arrow"),...w,style:{...w.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:$a.border.medium}),jsx("path",{d:"M7.504 6.492 2.248.488h10.511L10.132 3.49 7.504 6.492Z",fill:$a.background.primary.subtle,stroke:$a.background.primary.subtle})]}):null,jsx(DismissButton,{onDismiss:o.close}),jsx("div",{...r,style:c,className:classNames(Qs,l),children:typeof n=="function"?n(o):n}),jsx(DismissButton,{onDismiss:o.close})]})]}))});ye.displayName="PopoverContentCore";var we=no.forwardRef((e,t)=>{let{state:o,overlayTriggerAria:{overlayProps:r},triggerRef:a}=useContext(nt);return invariant(a),o?.isOpen?jsx(ye,{ref:t,...e,triggerRef:e.triggerRef||a,overlayProps:r,state:o}):null});we.displayName="PopoverContent";var ll=z({defaultClassName:"_1mdhlqv3",variantClassNames:{isOpen:{true:"_1mdhlqv4"}},defaultVariants:{},compoundVariants:[]}),je="_1mdhlqv6 _1yep5z6al _1yep5z6am _1yep5z6an _1yep5z6b9 _1yep5z6ba _1yep5z6bb _1yep5z6bx _1yep5z6by _1yep5z6bz _1yep5z6cl _1yep5z6cm _1yep5z6cn _1yep5z6d7",pl=z({defaultClassName:"_1mdhlqv0 _1yep5z66 _1yep5z67 _1yep5z68 _1yep5z62i _1yep5z62j _1yep5z62k _1yep5z63o _1yep5z63p _1yep5z63q _1yep5z61c _1yep5z61d _1yep5z61e _1yep5z6i0 _1yep5z6i1 _1yep5z6i2 _1yep5z6ir _1yep5z6is _1yep5z6it _1yep5z69o _1yep5z69p _1yep5z69q _1yep5z6eu _1yep5z6jr _1yep5z6js _1yep5z6jt _1yep5z6dy",variantClassNames:{isFocused:{false:"_1mdhlqv1"},isDisabled:{true:"z9nup83 _1yep5z6ey"}},defaultVariants:{},compoundVariants:[]}),yr="_1mdhlqv7 _1yep5z6al _1yep5z6am _1yep5z6an _1yep5z6b9 _1yep5z6ba _1yep5z6bb _1yep5z6bx _1yep5z6by _1yep5z6bz _1yep5z6cl _1yep5z6cm _1yep5z6cn _1yep5z6fs",cl="_1yep5z66x _1yep5z66y _1yep5z66z",dl="_1mdhlqv5 _1yep5z6i0 _1yep5z6i1 _1yep5z6i2 _1yep5z6i9 _1yep5z6ia _1yep5z6ib _1yep5z6ir _1yep5z6is _1yep5z6it _1yep5z69i _1yep5z69j _1yep5z69k";var yl=no.forwardRef(({className:e,style:t,onChange:o,"data-block-id":r,icon:a,formatValue:n=c=>c,tooltipProps:s,popoverContentProps:i,...p},l)=>{let c=te(l),[u,m]=useControlledState(p.value,p.defaultValue||0,o),[d,f]=no.useState(!1),{keyboardProps:y}=useKeyboard({onKeyDown:v=>{(v.key==="Enter"||v.key==="Escape")&&f(!1);}}),b=n(u||0),_=s?.isDisabled||p["aria-label"]?`${p["aria-label"]}, ${b}`:b.toString();return jsxs(M,{display:"flex",flexDirection:"row",gap:"md",paddingX:"md",alignItems:"center",className:classNames("BaselineUI-IconSlider",e),"data-block-id":r,style:t,ref:c,children:[a?jsx(a,{size:24,className:sprinkles({color:"icon.primary"})}):null,jsxs(Ne,{type:"dialog",isOpen:d,onOpenChange:f,children:[jsx(Se,{children:jsx(re,{text:p["aria-label"],size:"sm",variant:"inverse",includeArrow:!1,...s,children:jsx($,{label:b,variant:"popover","aria-label":_,style:{fontVariantNumeric:"tabular-nums"}})})}),jsx(we,{placement:"bottom start",...i,className:classNames(je,i?.className),children:jsx(me,{size:"content","aria-label":_,children:jsx(FocusScope,{autoFocus:!0,children:jsx(M,{paddingY:"sm",paddingX:"lg",marginY:"md",style:{width:215},...y,children:jsx(wo,{...p,onChange:v=>{m(v),o?.(v);},value:u})})})})})]})]})});yl.displayName="IconSlider";var bl=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"]]}),gl=z({defaultClassName:"bpklwae",variantClassNames:{isDisabled:{true:"bpklwaf"},isSelected:{true:"bpklwag"},isReadOnly:{true:"bpklwah"}},defaultVariants:{},compoundVariants:[]}),vl="bpklwad",_l=z({defaultClassName:"bpklwa0",variantClassNames:{labelPosition:{top:"bpklwa1",left:"bpklwa2"}},defaultVariants:{},compoundVariants:[]}),zl="bpklwa6",hl=z({defaultClassName:"bpklwa3",variantClassNames:{labelPosition:{top:"bpklwa4",left:"bpklwa5"}},defaultVariants:{},compoundVariants:[]});var kl=no.forwardRef(({className:e,label:t,labelPosition:o="top",statusLabel:r,style:a,"data-block-id":n,"data-block-class":s,...i},p)=>{let l=no.useRef(null),c=useToggleState(i),{inputProps:u,isPressed:m}=useSwitch(i,c,l),{isFocusVisible:d,focusProps:f}=useFocusRing(),{hoverProps:y,isHovered:b}=useHover({isDisabled:i.isDisabled}),_=filterTruthyValues({"data-block-id":n,"data-block-class":s,"data-focused":d,"data-disabled":i.isDisabled,"data-focus-visible":d,"data-selected":c.isSelected,"data-readonly":i.isReadOnly,"data-hovered":b,"data-pressed":m}),v=jsx("div",{className:classNames(bl({isSelected:c.isSelected,isDisabled:!!i.isDisabled,isFocused:d,isReadOnly:!!i.isReadOnly}),"BaselineUI-Switch-Track"),children:jsx("div",{className:classNames(gl({isSelected:c.isSelected,isDisabled:i.isDisabled,isReadOnly:i.isReadOnly}),"BaselineUI-Switch-Knob"),"data-testid":"switch-knob"})});return jsxs("label",{...mergeProps(_,y),className:classNames(_l({labelPosition:o}),"BaselineUI-Switch",e),style:a,ref:p,children:[t?jsx("span",{className:classNames(vl,"BaselineUI-Switch-Label"),children:t}):null,jsx(VisuallyHidden,{children:jsx("input",{...mergeProps(u,f),ref:l})}),r?jsxs("div",{className:hl({labelPosition:o}),children:[jsx("span",{className:classNames("BaselineUI-Switch-Status-Label",zl),children:c.isSelected?r.on:r.off}),v]}):v]})});kl.displayName="Switch";var wl="_19n40yy9",Rl=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 pv={sm:SearchIcon,md:SearchIcon$1,lg:SearchIcon$1},Nl=no.forwardRef(({className:e,size:t="md",variant:o="primary","data-block-id":r,"data-block-class":a,style:n,...s},i)=>{let p=no.useRef(null),l=useSearchFieldState(s),{inputProps:c,clearButtonProps:u}=useSearchField({...s,"aria-haspopup":!1,"aria-autocomplete":"none",type:"search"},l,p),{focusProps:m,isFocusVisible:d,isFocused:f}=useFocusRing({within:!0,isTextInput:!0}),y=pv[t],b=t==="sm"?XIcon$2:XIcon$3,_=filterTruthyValues({"data-block-id":r,"data-block-class":a,"data-focused":f,"data-disabled":s.isDisabled,"data-focus-visible":d});return jsxs("div",{..._,className:classNames(Rl({size:t,isFocused:f,variant:o,hasText:!!l.value,isDisabled:s.isDisabled}),"BaselineUI-SearchInput",e),style:n,ref:i,children:[jsx(y,{size:t==="sm"?20:24}),jsx("input",{...mergeProps(c,m),className:wl,ref:p}),l.value!==""&&jsx(D,{icon:b,...u,size:t==="sm"?"xs":"sm",variant:"secondary"})]})});Nl.displayName="SearchInput";var Sl="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 _1yep5z6l0 _1yep5z6kz _1yep5z6hf _1yep5z6l3 _1yep5z6fs",Ll="xyd2ss0 _1yep5z66 _1yep5z67 _1yep5z68 _1yep5z62i _1yep5z62j _1yep5z62k _1yep5z64l _1yep5z64m _1yep5z64n _1yep5z629 _1yep5z62a _1yep5z62b";var Ka=({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(j,{elementType:"li"}),jsxs("li",{...r,children:[e.value?.title?jsx(VisuallyHidden,{children:jsx("span",{...n,children:e.value.title})}):null,jsx("ul",{...a,className:Ll,children:[...e.childNodes].map(s=>(invariant(s.type==="item"),jsx(br,{item:s,state:o,showSelectedIcon:t},s.key)))})]})]})};Ka.displayName="MenuSection";var br=({item:e,state:t,className:o,showSelectedIcon:r})=>{let a=no.useRef(null),n=useMenuItem({key:e.key},t,a),{isFocusVisible:s,focusProps:i}=useFocusRing();return jsx(rt,{item:e,liProps:mergeProps(n.menuItemProps,i,{className:o}),...n,isFocusVisible:s,ref:a,description:e.value?.keyboardShortcut,descriptionProps:n.keyboardShortcutProps,_state:t,showSelectedIcon:r})};br.displayName="MenuItem";var Wa=no.forwardRef(({className:e,itemClassName:t,onContentKeyDown:o,...r},a)=>{let n=useTreeState(r),s=no.useRef(null),{menuProps:i}=useMenu(r,n,s),{keyboardProps:p}=useKeyboard({onKeyDown:o});return jsx("ul",{...mergeProps(i,p),className:classNames(Sl,e),ref:L(s,a),children:[...n.collection].map(l=>l.type==="section"?jsx(Ka,{section:l,state:n,showSelectedIcon:r.selectionMode==="multiple"||r.selectionMode==="single"},l.key):jsx(br,{item:l,state:n,className:t,showSelectedIcon:r.selectionMode==="multiple"||r.selectionMode==="single"},l.key))})});Wa.displayName="MenuContent";var gr=no.forwardRef(({defaultOpen:e,onOpenChange:t,isOpen:o,isDisabled:r,contentClassName:a,placement:n="bottom start",isNonModal:s,shouldFlip:i,shouldUpdatePosition:p,boundaryElement:l,crossOffset:c,offset:u,triggerLabel:m,renderTrigger:d=({buttonProps:_,ref:v})=>jsx($,{..._,variant:"popover",ref:v}),portalContainer:f,...y},b)=>{let _=no.useRef(null),v=be(f),g=useMenuTriggerState({defaultOpen:e,isOpen:o,onOpenChange:t}),{menuTriggerProps:h,menuProps:w}=useMenuTrigger({isDisabled:r,type:"menu"},g,_),x=se(),k=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:k,ref:_}),g.isOpen?jsx(ye,{triggerRef:_,state:g,placement:n,isNonModal:s,shouldFlip:i,shouldUpdatePosition:p,boundaryElement:l,crossOffset:c,offset:u||2,className:classNames(je,"BaselineUI-Menu-Popover"),portalContainer:v,children:jsx(Wa,{className:a,...w,...y,ref:b,autoFocus:g.focusStrategy||"first",children:x})}):null]})});gr.displayName="Menu";var vr=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 Fl=no.forwardRef(({className:e,style:t,children:o,variant:r="default",size:a="md",elementType:n="a",type:s="body","data-block-id":i,"data-block-class":p,title:l,role:c,...u},m)=>{let d=no.useRef(null),{linkProps:f,isPressed:y}=useLink({...u,elementType:u.onPress?"span":n},d),{isFocusVisible:b,isFocused:_,focusProps:v}=useFocusRing(),{hoverProps:g,isHovered:h}=useHover({isDisabled:u.isDisabled}),w=n,x=filterTruthyValues({"data-block-id":i,"data-block-class":p,"data-disabled":u.isDisabled,"data-focused":_,"data-pressed":y,"data-focus-visible":b,"data-hovered":h,role:c,title:l});return jsx(w,{...mergeProps(f,v,g,x),className:classNames(vr({variant:r,isFocusVisible:b,isHovered:h,isDisabled:u.isDisabled,size:a,isActive:y,type:s}),"BaselineUI-Link",e),ref:L(d,m),style:t,children:o})});Fl.displayName="Link";function Hl({isDisabled:e,onValueChange:t,onChange:o,name:r,"aria-describedby":a,"aria-label":n,accept:s,multiple:i}){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:s,multiple:i},labelProps:{htmlFor:l,id:p},descriptionProps:{id:c}}}async function Za({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 Ol=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"]]}),Vl=z({defaultClassName:"_180w5ede",variantClassNames:{disabled:{true:"_180w5edf"}},defaultVariants:{},compoundVariants:[]}),Al=z({defaultClassName:"_180w5ed9",variantClassNames:{disabled:{true:"_180w5eda"}},defaultVariants:{},compoundVariants:[]}),jl=z({defaultClassName:"_180w5edb",variantClassNames:{disabled:{true:"_180w5edc"},hovered:{true:"_180w5edd"}},defaultVariants:{},compoundVariants:[]});var Kl=no.forwardRef(({className:e,label:t,description:o,icon:r,variant:a="default",...n},s)=>{let i=no.useRef(null),{inputProps:p,descriptionProps:l,labelProps:c}=Hl(n),{dropProps:u}=useDrop({ref:i,onDrop:async({items:b})=>{let _=b.filter(g=>g.kind==="file").map(async g=>(invariant(g.kind==="file"),g.getFile())),v=await Promise.all(_);n.onValueChange?.(v);}}),{focusProps:m,isFocusVisible:d}=useFocusRing(),{hoverProps:f,isHovered:y}=useHover({isDisabled:n.isDisabled});return jsxs("label",{...mergeProps(u,f,c),className:classNames(Ol({variant:a,disabled:n.isDisabled,hoveredOrFocusedOrActive:y||d}),e),ref:L(s,i),children:[jsx(VisuallyHidden,{children:jsx("input",{...mergeProps(m,p)})}),r?jsx(r,{size:20,className:Al({disabled:n.isDisabled})}):null,jsxs("div",{children:[jsx("div",{className:jl({disabled:n.isDisabled,hovered:y}),children:t}),o?jsx("div",{...l,className:Vl({disabled:n.isDisabled}),children:o}):null]})]})});Kl.displayName="FileUpload";var Gl="_12vfhl40 z9nup81",Wl="_12vfhl41 z9nup82",Xl=z({defaultClassName:"_12vfhl48",variantClassNames:{variant:{success:"_12vfhl49",error:"_12vfhl4a",active:"_12vfhl4b"}},defaultVariants:{},compoundVariants:[]}),Yl="_12vfhl42",Zl="_12vfhl47",Ql="_12vfhl46 z9nup82",Jl="_12vfhl45",ep=z({defaultClassName:"_12vfhl43 _12vfhl42",variantClassNames:{hasLabel:{false:"_12vfhl44"}},defaultVariants:{},compoundVariants:[]});var op=no.forwardRef(({className:e,style:t,variant:o="active",showValue:r,description:a,errorMessage:n,"data-block-id":s,"data-block-class":i,...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,_=(y-d)/(f-d),v=`${Math.round(_*100)}%`,g=jsx("output",{className:ep({hasLabel:!!b}),children:m["aria-valuetext"]}),h=o==="error"?n:a;return jsxs("div",{...m,style:t,className:classNames(Gl,"BaselineUI-ProgressBar",e),"data-block-id":s,"data-block-class":i,ref:l,children:[b?jsxs("div",{className:Wl,children:[jsx("label",{...u,className:Yl,children:b}),r?g:null]}):null,jsxs("div",{className:Jl,children:[jsxs("div",{className:Ql,children:[jsx("div",{className:Zl,children:jsx("div",{style:{width:v},className:Xl({variant:o})})}),!b&&r?g:null]}),h?jsx("div",{className:yo({hasError:o==="error"}),id:c,children:h}):null]})]})});op.displayName="ProgressBar";function No({isReadOnly:e,validationState:t}){return e?ReadOnlyIcon:t==="error"?ErrorFilledIcon:t==="warning"?WarningFilledIcon:null}var So=no.forwardRef(({className:e,validationState:t,variant:o="primary",style:r,labelPosition:a="top",inputStyle:n,inputClassName:s,"data-block-id":i,"data-block-class":p,...l},c)=>{let u=no.useRef(null),{inputProps:m,labelProps:d,descriptionProps:f,errorMessageProps:y,validationErrors:b}=useTextField({...l,validationState:t?t==="error"?"invalid":"valid":void 0},u),_=l.errorMessage||b.join(" "),v=Pe({...l,errorMessage:_,descriptionProps:f,errorMessageProps:y,labelPosition:a});_&&(t="error");let{hoverProps:g,isHovered:h}=useHover({isDisabled:l.isDisabled}),{isFocused:w,focusProps:x,isFocusVisible:k}=useFocusRing(),P=No({isReadOnly:l.isReadOnly,validationState:t}),R=filterTruthyValues({"data-readonly":l.isReadOnly,"data-disabled":l.isDisabled,"data-validation-state":t,"data-focused":w,"data-focus-visible":k});return jsxs("div",{className:classNames(Oe({labelPosition:a}),"BaselineUI-TextInput",e),"data-block-id":i,"data-block-class":p,style:r,ref:c,children:[l.label||a==="start"&&v?jsxs("div",{className:He({labelPosition:a,hasMessage:!!v}),children:[jsx("label",{...d,className:Fe,children:l.label}),a==="start"&&v]}):null,jsxs("div",{className:classNames({[ho]:l.isDisabled}),children:[jsxs("div",{...g,className:go({validationState:t,isHovered:h,isFocused:w,variant:o,isReadOnly:!!l.isReadOnly,isDisabled:!!l.isDisabled}),children:[jsx("input",{...mergeProps(m,x,R),className:classNames(or({isDisabled:l.isDisabled,labelPosition:a}),"BaselineUI-TextInput-Input",s),style:n,ref:u}),P?jsx(P,{className:bo({validationState:t,isReadOnly:l.isReadOnly}),size:16}):null]}),a==="top"&&v]})]})});So.displayName="TextInput";var Lo=({value:e,...t})=>{let o=useNumberFormatter(t);return jsx(Fragment,{children:o.format(e)})};Lo.displayName="NumberFormat";var rp="_1yep5z6i3 _1yep5z6i4 _1yep5z6i5",ap=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"]]}),np=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"]]}),sp=z({defaultClassName:"_9b1tmlc",variantClassNames:{isDisabled:{true:"_9b1tmld"},isReadOnly:{true:"_9b1tmle"}},defaultVariants:{},compoundVariants:[]});var pp=no.forwardRef(({className:e,count:t,style:o,size:r="md",icon:a,"data-block-id":n,"data-block-class":s,...i},p)=>{let l={isRequired:!1},c=a||(r==="md"?CheckmarkIcon$2:CheckmarkIcon$3);!i["aria-label"]&&!i["aria-labelledby"]&&console.warn("You must provide either an `aria-label` or `aria-labelledby` prop to the `Reaction` component.");let u=no.useRef(null),m=useToggleState({...i,...l}),{inputProps:d,isPressed:f,isDisabled:y,isReadOnly:b,isSelected:_}=useSwitch({...i,...l},m,u),{focusProps:v,isFocused:g,isFocusVisible:h}=useFocusRing(),{hoverProps:w,isHovered:x}=useHover({}),k=filterTruthyValues({"data-block-id":n,"data-block-class":s,"data-focused":g,"data-focus-visible":h,"data-disabled":y,"data-hovered":x,"data-pressed":f,"data-selected":_});return jsxs("label",{ref:p,style:o,className:classNames(rp,"BaselineUI-Reaction",e),...k,children:[jsx(VisuallyHidden,{children:jsx("input",{...d,...v,ref:u})}),jsxs("div",{...w,className:ap({isSelected:_,isFocusVisible:h,isHovered:x,isReadOnly:b,isDisabled:y}),children:[jsx("div",{className:sp({isDisabled:y,isReadOnly:b}),children:jsx(c,{size:r==="md"?20:16})}),jsx("div",{className:np({isSelected:m.isSelected,isDisabled:y,isReadOnly:b,size:r}),children:jsx(Lo,{value:t})})]})]})});pp.displayName="Reaction";var cp="_1azy5686",dp="_1azy5685",mp="var(--_1azy5680)",up="_1azy5688",fp="_1azy5689",yp="_1azy5681 z9nup82",bp="_1azy5682";var gp="_1azy5687";var P_={sm:16,md:20},k_={sm:[CheckFilledIcon,ErrorAltFilledIcon],md:[CheckFilledIcon$1,ErrorAltFilledIcon$1]},Bo=no.forwardRef(({className:e,style:t,size:o="md",variant:r="active","data-block-id":a,"data-block-class":n,...s},i)=>{let{labelProps:p,progressBarProps:l}=useProgressBar({...s,isIndeterminate:!0}),c=P_[o],u=c/2-2,m=2*u*Math.PI,d=k_[o][r==="success"?0:1];return jsxs("div",{className:classNames(yp,"BaselineUI-ProgressSpinner",e),ref:i,style:{...assignInlineVars({[mp]:`${m}px`}),...t},"data-block-id":a,"data-block-class":n,children:[jsxs("div",{...l,className:bp,children:[(r==="active"||r==="inactive")&&jsxs("svg",{height:c,width:c,viewBox:`0 0 ${c} ${c}`,children:[jsx("circle",{role:"presentation",className:cp,cx:c/2,cy:c/2,r:u}),r==="active"&&jsx("circle",{role:"presentation",className:dp,cx:c/2,cy:c/2,r:u})]}),r==="success"&&jsx(d,{className:gp,size:c}),r==="error"&&jsx(d,{className:up,size:c})]}),s.label?jsx("span",{...p,className:fp,children:s.label}):null]})});Bo.displayName="ProgressSpinner";var hr=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"}},defaultVariants:{},compoundVariants:[[{isSelected:!0,isFocusVisible:!0},"_5uw3kp8"],[{isSelected:!0,isDisabled:!0},"_5uw3kp9"]]});var M_={sm:16,md:20,lg:24},xr=no.forwardRef(({className:e,style:t,iconStart:o,size:r="md",elementType:a="button",...n},s)=>{let i=useToggleState(n),{buttonProps:p,isPressed:l,ref:c}=Jt(n,i),{hoverProps:u,isHovered:m}=useHover({isDisabled:n.isDisabled}),{isFocusVisible:d,isFocused:f,focusProps:y}=useFocusRing(),b=filterTruthyValues({"data-block-id":n["data-block-id"],"data-block-class":n["data-block-class"],"data-focused":f,"data-focus-visible":d,"data-disabled":n.isDisabled,"data-hovered":m,"data-pressed":l,"data-selected":i.isSelected});return jsxs(a,{...mergeProps(p,u,y,b),className:classNames(hr({isHovered:m,isFocusVisible:d,isSelected:i.isSelected,size:r,isDisabled:n.isDisabled}),"BaselineUI-ToggleButton",e),style:t,ref:L(c,s),children:[o?jsx(o,{size:M_[r]}):null,n.label]})});xr.displayName="ToggleButton";var Cr=z({defaultClassName:"_16vugd0e",variantClassNames:{isDisabled:{true:"_16vugd0f"}},defaultVariants:{},compoundVariants:[]}),vp=z({defaultClassName:"_16vugd01 _1yep5z6i0 _1yep5z6i1 _1yep5z6i2 _1yep5z6ir _1yep5z6is _1yep5z6it",variantClassNames:{labelPosition:{end:"_1yep5z613k _1yep5z613l _1yep5z613m _1yep5z6ut _1yep5z6uu _1yep5z6uv",start:"_1yep5z613q _1yep5z613r _1yep5z613s _1yep5z6152 _1yep5z6153 _1yep5z6154"}},defaultVariants:{},compoundVariants:[]}),_p=z({defaultClassName:"_16vugd05",variantClassNames:{isIndeterminate:{true:"_16vugd04"},isSelected:{true:"_16vugd04"},isFocusVisible:{true:"_16vugd08"},isHovered:{true:"_16vugd09"},isDisabled:{true:"_16vugd0a"},isReadOnly:{true:"_16vugd0b"},hasError:{true:"_16vugd0c"}},defaultVariants:{},compoundVariants:[[{isSelected:!0,isDisabled:!0},"_16vugd0d"]]});var xp=no.forwardRef(({className:e,style:t,label:o,labelPosition:r="end","data-block-id":a,"data-block-class":n,...s},i)=>{let p=no.useRef(null),l=useToggleState(s),{isFocusVisible:c,isFocused:u,focusProps:m}=useFocusRing(),{inputProps:d,isPressed:f,isDisabled:y,isSelected:b,isReadOnly:_}=useCheckbox({...s,children:o},l,p),{hoverProps:v,isHovered:g}=useHover({isDisabled:y}),h=filterTruthyValues({"data-disabled":y,"data-readonly":_,"data-hovered":g,"data-selected":b,"data-pressed":f,"data-indeterminate":s.isIndeterminate,"data-invalid":s.isInvalid,"data-focus-visible":c,"data-focused":u,"data-block-id":a,"data-block-class":n});return jsxs("label",{...h,className:classNames(vp({labelPosition:r}),"BaselineUI-Checkbox",e),style:t,ref:i,children:[jsx(VisuallyHidden,{children:jsx("input",{...mergeProps(d,m),ref:p})}),jsxs("div",{...v,className:_p({isSelected:b&&!s.isIndeterminate,isIndeterminate:s.isIndeterminate,isFocusVisible:c,isDisabled:y,isReadOnly:_,hasError:s.isInvalid,isHovered:g}),children:[b&&!s.isIndeterminate?jsx(CheckmarkIcon$1,{size:12}):null,s.isIndeterminate?jsx(MinusIcon$1,{size:12}):null]}),o?jsx("span",{className:Cr({isDisabled:y}),children:o}):null]})});xp.displayName="Checkbox";var Cp={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 Pp=z({defaultClassName:"_1nsi9h17",variantClassNames:{isFocused:{true:"_1nsi9h18"},variant:{pinned:"_1nsi9h19",floating:"_1nsi9h1a"},size:{xs:"_1nsi9h1b",sm:"_1nsi9h1c",md:"_1nsi9h1d",lg:"_1nsi9h1e"}},defaultVariants:{},compoundVariants:[]}),kp="_1nsi9h1f _1yep5z6l6 _1yep5z6ky _1yep5z6eu",wp=z({defaultClassName:"_1yep5z6al _1yep5z6am _1yep5z6an _1yep5z6b9 _1yep5z6ba _1yep5z6bb _1yep5z6bx _1yep5z6by _1yep5z6bz _1yep5z6cl _1yep5z6cm _1yep5z6cn _1yep5z6i3 _1yep5z6i4 _1yep5z6i5 _1yep5z6i9 _1yep5z6ia _1yep5z6ib _1yep5z6ir _1yep5z6is _1yep5z6it _1yep5z6fs _1yep5z6e1",variantClassNames:{size:{xs:"_1nsi9h11 _1yep5z6vt _1yep5z6vu _1yep5z6vv _1yep5z6wh _1yep5z6wi _1yep5z6wj _1yep5z6x5 _1yep5z6x6 _1yep5z6x7 _1yep5z6xt _1yep5z6xu _1yep5z6xv _1yep5z6z6",sm:"_1nsi9h12 _1yep5z6z9",md:"_1nsi9h13",lg:"_1nsi9h14"},variant:{floating:"_1yep5z6yi _1yep5z616k _1yep5z616i _1yep5z6120",pinned:"_1yep5z6166"}},defaultVariants:{},compoundVariants:[]}),Rp=z({defaultClassName:"_1nsi9h1g _1yep5z6ev",variantClassNames:{isDisabled:{true:"_1yep5z6109"}},defaultVariants:{},compoundVariants:[]});var l6={style:"decimal"},p6={xs:[CaretLeftIcon,CaretRightIcon],sm:[CaretLeftIcon$1,CaretRightIcon$1],md:[CaretLeftIcon$2,CaretRightIcon$2],lg:[CaretLeftIcon$3,CaretRightIcon$3]},Lp=no.forwardRef(({className:e,style:t,minValue:o=1,defaultValue:r=1,incrementAriaLabel:a,decrementAriaLabel:n,"aria-label":s,size:i="md",variant:p="floating",hideActions:l,isDisabled:c,...u},m)=>{let{locale:d}=useLocale(),f=F(Cp),y={...u,formatOptions:l6,minValue:o,incrementAriaLabel:a||f.formatMessage("nextPage"),decrementAriaLabel:n||f.formatMessage("prevPage"),defaultValue:r,"aria-label":s||f.formatMessage("goToPage")},b=no.useRef(null),_=useNumberFieldState({...y,locale:d}),{inputProps:v,decrementButtonProps:g,incrementButtonProps:h,groupProps:w}=useNumberField({...y,onKeyDown:E=>{E.key==="Enter"&&b.current?.blur(),u.onKeyDown?.(E);},isDisabled:c},_,b),{hoverProps:x,isHovered:k}=useHover({}),{focusProps:P,isFocused:R,isFocusVisible:T}=useFocusRing(),N=p==="floating",[S,I]=p6[i],C=filterTruthyValues({"data-focus-visible":T,"data-focused":R,"data-hovered":k,"data-block-id":u["data-block-id"],"data-block-class":u["data-block-class"]}),O=useInteractionModality()==="keyboard";return jsxs("div",{...mergeProps(w,x,C),className:classNames(wp({size:i,variant:p}),"BaselineUI-Pagination",e),style:t,ref:m,children:[l?null:jsxs(Fragment,{children:[jsx(D,{icon:S,...g,elementType:"div",size:i,style:{height:"100%",...N&&{borderRadius:0}},className:"BaselineUI-Pagination-DecrementButton",UNSAFE_NON_INTERACTIVE:O,isDisabled:c||g.isDisabled}),p==="floating"&&jsx(j,{orientation:"vertical"})]}),jsxs("div",{className:Pp({isFocused:R,variant:p,size:i}),"aria-label":f.formatMessage("pageXofY",{arg0:v.value,arg1:_.maxValue}),children:[jsx("input",{...mergeProps(v,P),ref:b,className:classNames("BaselineUI-Pagination-Input",kp),style:{width:`${v.value?.toString().length||1}ch`}}),jsxs("span",{className:Rp({isDisabled:c}),children:["/ ",jsx(Lo,{value:_.maxValue})]})]}),l?null:jsxs(Fragment,{children:[p==="floating"&&jsx(j,{orientation:"vertical"}),jsx(D,{icon:I,...h,elementType:"div",size:i,style:{height:"100%",...N&&{borderRadius:0}},className:"BaselineUI-Pagination-IncrementButton",UNSAFE_NON_INTERACTIVE:O,isDisabled:c||h.isDisabled})]})]})});Lp.displayName="Pagination";var Mp=({date:e,...t})=>{let o=useDateFormatter(t);return jsx(Fragment,{children:o.format(e)})};Mp.displayName="DateFormat";var Pr=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"]]}),Bp="_1f789qjj",Dp="_1f789qj0",Ep=z({defaultClassName:"_1f789qjk",variantClassNames:{variant:{neutral:"_1f789qjl",red:"_1f789qjm",green:"_1f789qjn",blue:"_1f789qjo","high-contrast":"_1f789qjp"},isHovered:{true:"_1f789qjq"}},defaultVariants:{},compoundVariants:[[{isHovered:!0,variant:"neutral"},"_1f789qjr"],[{isHovered:!0,variant:"red"},"_1f789qjs"],[{isHovered:!0,variant:"blue"},"_1f789qjt"],[{isHovered:!0,variant:"green"},"_1f789qju"],[{isHovered:!0,variant:"high-contrast"},"_1f789qjv"]]});var Vp=({item:e,state:t,variant:o="neutral"})=>{let r=no.useRef(null),{focusProps:a,isFocusVisible:n}=useFocusRing({within:!0}),{rowProps:s,gridCellProps:i,removeButtonProps:p,allowsRemoving:l,isDisabled:c,isSelected:u,allowsSelection:m}=useTag({item:e},t,r),d=no.useRef(null),{buttonProps:f}=useButton(p,d),{hoverProps:y,isHovered:b}=useHover({isDisabled:c}),{hoverProps:_,isHovered:v}=useHover({isDisabled:c}),g=e.value?.icon,h=e.value?.data?.variant??o;return jsx("div",{...mergeProps(s,a,_),ref:r,className:classNames(Pr({isFocusVisible:n,variant:h,isDisabled:c,allowsRemoving:l,isSelected:u,allowsSelection:m,isHovered:v}),"BaselineUI-Tag"),children:jsxs("div",{...i,className:Bp,children:[u?jsx(CheckmarkIcon$3,{size:16}):null,!u&&g?jsx(g,{size:16}):null,e.rendered,l?jsx("button",{...mergeProps(f,y),className:Ep({variant:h,isHovered:b}),children:jsx(XIcon$2,{})}):null]})})};var $p=no.forwardRef(({className:e,style:t,"data-block-id":o,"data-block-class":r,items:a,...n},s)=>{let i=useMemo(()=>a.map(m=>({...m,data:{variant:m.variant}})),[a]),p=se(),l=no.useRef(null),c=useListState({...n,items:i,children:p}),{gridProps:u}=useTagGroup(n,c,l);return jsx("div",{...u,className:classNames(Dp,"BaselineUI-TagGroup",e),style:t,"data-block-id":o,"data-block-class":r,ref:L(s,l),children:[...c.collection].map(m=>jsx(Vp,{state:c,item:m,variant:n.variant},m.key))})});$p.displayName="TagGroup";var Up="_1yep5z6kv",qp=z({defaultClassName:"_1kvz17db _1yep5z6ki _1yep5z6kk",variantClassNames:{showActionsOnTriggerOnly:{true:"_1kvz17dc"},isTriggered:{true:"_1kvz17dd"}},defaultVariants:{},compoundVariants:[]}),Kp=z({defaultClassName:"_1kvz17d0 _1yep5z64u _1yep5z64v _1yep5z64w _1yep5z676 _1yep5z677 _1yep5z678 _1yep5z68c _1yep5z68d _1yep5z68e _1yep5z660 _1yep5z661 _1yep5z662 _1yep5z6ki _1yep5z6kj",variantClassNames:{isExpanded:{true:"_1kvz17d1"}},defaultVariants:{},compoundVariants:[]}),Gp="_1yep5z6ev _1yep5z6dy",Wp=z({defaultClassName:"_1kvz17d2 _1yep5z63o _1yep5z63p _1yep5z63q _1yep5z61f _1yep5z61g _1yep5z61h _1yep5z63 _1yep5z64 _1yep5z65 _1yep5z62f _1yep5z62g _1yep5z62h _1yep5z6i0 _1yep5z6i1 _1yep5z6i2 _1yep5z6ir _1yep5z6is _1yep5z6it _1yep5z6jr _1yep5z6js _1yep5z6jt _1yep5z6ki _1yep5z6kl",variantClassNames:{isFocusVisible:{true:"_1kvz17d3"},isHovered:{true:"_1yep5z6ft",false:"_1yep5z6fu"},isDisabled:{true:"z9nup83"}},defaultVariants:{},compoundVariants:[]}),Xp="_1kvz17da _1yep5z66 _1yep5z67 _1yep5z68 _1yep5z62i _1yep5z62j _1yep5z62k _1yep5z6dz",Yp=z({defaultClassName:"_1kvz17d7 _1yep5z6i0 _1yep5z6i1 _1yep5z6i2 _1yep5z6ir _1yep5z6is _1yep5z6it",variantClassNames:{isDisabled:{true:"_1yep5z6ey",false:"_1yep5z6eu"}},defaultVariants:{},compoundVariants:[]});var tn=no.forwardRef(({children:e,className:t,style:o},r)=>{let{headers:a}=useContext($e),{disabledKeys:n}=useContext($e),{keyboardProps:s}=useKeyboard({onKeyDown:i=>{let p=co(i.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(i.key){case"Home":{i.preventDefault(),d(-1);break}case"End":{i.preventDefault(),m(u);break}case"ArrowDown":{i.preventDefault(),d(l);break}case"ArrowUp":{i.preventDefault(),m(l);break}default:i.continuePropagation();}}});return jsx("div",{...s,style:o,className:classNames(Up,t),ref:r,children:no.Children.map(e,(i,p)=>no.cloneElement(i,{index:p}))})});tn.displayName="AccordionBase";var $e=no.createContext({expandedKeys:new Set,setExpandedKeys:()=>{},disabledKeys:new Set,headers:new Map,expansionMode:"multiple"}),Jp=no.forwardRef(({children:e,disabledKeys:t,defaultExpandedKeys:o=new Set,expandedKeys:r,expansionMode:a="multiple",onChange:n,className:s,style:i},p)=>{let[l,c]=no.useState(o),u=no.useRef(new Map).current,[m,d]=no.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($e.Provider,{value:f,children:jsx(FocusScope,{children:jsx(tn,{className:s,style:i,ref:p,children:e})})})});Jp.displayName="Accordion";var an=no.forwardRef(({title:e,actions:t,controlId:o,value:r,id:a,index:n,subLabel:s,showActionsOnTriggerOnly:i},p)=>{let l=no.useRef(null),{expandedKeys:c,setExpandedKeys:u,expansionMode:m,disabledKeys:d,headers:f}=useContext($e),y=d?.has(r),b=useFocusManager();invariant(b);let{focusNext:_,focusPrevious:v}=b,{keyboardProps:g}=useKeyboard({onKeyDown:C=>{C.key==="ArrowRight"?_({wrap:!0}):C.key==="ArrowLeft"?v({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 B=new Set(C);return B.has(r)?B.delete(r):(m==="single"&&B.clear(),B.add(r)),B});},{buttonProps:w}=useButton({"aria-expanded":c.has(r),"aria-controls":o,onPress:h,isDisabled:y},l),{pressProps:x}=usePress({onPress:h,isDisabled:y}),{focusProps:k,isFocusVisible:P}=useFocusRing(),{hoverProps:R,isHovered:T}=useHover({isDisabled:y}),{focusProps:N,isFocusVisible:S}=useFocusRing({within:!0}),I=c.has(r);return jsxs("h3",{...mergeProps(g,x,R,N),className:Wp({isFocusVisible:P,isHovered:T,isDisabled:y}),ref:p,children:[jsxs("div",{className:Yp({isDisabled:!!y}),children:[jsx(ChevronRightIcon,{className:Kp({isExpanded:I}),size:8}),jsx("button",{...mergeProps(w,k),id:a,"data-key":r,className:Xp,ref:l,children:e})]}),t?.length?jsx("div",{"data-testid":"action-buttons",className:qp({showActionsOnTriggerOnly:i,isTriggered:S||T}),children:t.map((C,B)=>jsx(D,{variant:"secondary",size:"sm",excludeFromTabOrder:!0,isDisabled:y,...C},B))}):null,s?jsx("div",{className:Gp,children:s}):null]})});an.displayName="AccordionHeader";var ic=no.forwardRef(({title:e,actions:t,children:o,value:r,index:a,subLabel:n,style:s,className:i,showActionsOnTriggerOnly:p},l)=>{let c=useId(),u=useId(),{expandedKeys:m}=useContext($e),d=no.useRef(null),f=m.has(r),y=_o(),b=useReducedMotion(),_=useTransition(f?[r]:[],{from:!y&&!b&&{height:0,opacity:0},enter:()=>async v=>{await v({height:d.current?.scrollHeight,opacity:1});},leave:{height:0,opacity:0},keys:v=>v.toString()});return jsxs(Fragment,{children:[jsx(FocusScope,{children:jsx(an,{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:{...v,overflow:"hidden"},children:jsx("div",{ref:d,className:i,style:s,children:o})}))]})});ic.displayName="AccordionItem";var zt=no.forwardRef(({variant:e,isOpen:t,selectedIcon:o,validationState:r="valid",valueProps:a,label:n,className:s,style:i,"data-block-id":p,"data-block-class":l,...c},u)=>{let m=no.useRef(null),{buttonProps:d,isPressed:f}=useButton({...c,isDisabled:c.isDisabled||c.isReadOnly},m),{hoverProps:y,isHovered:b}=useHover({isDisabled:c.isDisabled}),{focusProps:_,isFocused:v,isFocusVisible:g}=useFocusRing(),h=No({isReadOnly:c.isReadOnly,validationState:r});c.isReadOnly&&(d.disabled=!1);let w=filterTruthyValues({"data-disabled":c.isDisabled,"data-readonly":c.isReadOnly,"data-focused":v,"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,_,w),ref:L(u,m),className:classNames(pl({isFocused:g,isDisabled:c.isDisabled}),go({variant:e,isHovered:b,isFocused:g,validationState:r,isDisabled:!!c.isDisabled,isReadOnly:c.isReadOnly}),s,"BaselineUI-Select-Button"),style:i,children:[jsxs("span",{className:dl,children:[o?jsx(o,{size:24}):null,jsx("span",{...a,children:n})]}),h?jsx("span",{"aria-hidden":!0,className:classNames(bo({validationState:r,isReadOnly:!!c.isReadOnly}),cl),children:jsx(h,{size:16})}):null,jsx("span",{"aria-hidden":!0,children:jsx(CaretDownIcon,{size:8,className:ll({isOpen:t})})})]})});zt.displayName="SelectButton";var wr=no.createContext({state:null,popoverAnchorRef:null}),ln=no.forwardRef(({className:e,style:t,labelPosition:o="top",variant:r="primary","data-block-id":a,"data-block-class":n,optionStyle:s,optionClassName:i,placement:p="bottom start",triggerClassName:l,triggerStyle:c,state:u,renderTrigger:m=({buttonProps:y,selectedValue:b,valueProps:_,isOpen:v,ref:g})=>{let h=b&&"icon"in b&&b.icon;return jsx(zt,{...y,className:l,style:c,isOpen:v,isReadOnly:d.isReadOnly,ref:g,variant:r,validationState:d.validationState,selectedIcon:h||void 0,label:b?"label"in b&&b?.label:d.placeholder,valueProps:_})},...d},f)=>{let{popoverAnchorRef:y}=useContext(wr),b=no.useRef(null),_=be(d.portalContainer),{labelProps:v,triggerProps:g,valueProps:h,menuProps:w,descriptionProps:x,errorMessageProps:k}=useSelect({...d,validationState:d.validationState==="error"?"invalid":"valid"},u,b),P=Pe({...d,descriptionProps:x,errorMessageProps:k,labelPosition:o}),R=u.selectedItem?.value??null;return jsxs(eo.Provider,{value:u,children:[jsxs("div",{style:t,className:classNames(Oe({labelPosition:o}),"BaselineUI-Select",e),"data-block-id":a,"data-block-class":n,ref:f,children:[d.label||P?jsxs("div",{className:He({labelPosition:o,hasMessage:!!P}),children:[d.label?jsx("div",{...v,className:classNames(Fe,"BaselineUI-Select-Label"),children:d.label}):null,o==="start"&&P]}):null,jsx(HiddenSelect,{state:u,triggerRef:b,isDisabled:d.isDisabled,label:d.label,name:d.name}),m({buttonProps:g,selectedValue:R,valueProps:h,isOpen:u.isOpen,ref:b}),o==="top"&&P]}),u.isOpen?jsx(ye,{placement:p,portalContainer:_,offset:d.offset||2,state:u,triggerRef:y||b,style:t,className:classNames(je,"BaselineUI-Select-Popover"),...d,children:jsx(ie,{...w,label:d.label,items:d.items,showSelectedIcon:d.showSelectedIcon,className:yr,optionStyle:s,optionClassName:i})}):null]})});ln.displayName="SelectCore";var mc=no.forwardRef((e,t)=>{let o=se(),r=useSelectState({...e,validationState:e.validationState==="error"?"invalid":"valid",children:o});return jsx(ln,{...e,ref:t,state:r})});mc.displayName="SelectStandalone";var qe=no.forwardRef((e,t)=>{let{state:o}=useContext(wr);return useEffect(()=>{invariant(o||e.items,"Select: A `state` that can be passed via context or `items` are required.");},[e.items,o]),o?jsx(ln,{state:o,...e,ref:t}):jsx(mc,{...e,ref:t})});qe.displayName="Select";var fc=no.forwardRef(({className:e,style:t,variant:o,"data-block-id":r,icon:a,tooltipProps:n,...s},i)=>{let p=no.useRef(null),l=useCallback(({buttonProps:c,selectedValue:u,valueProps:m,isOpen:d,ref:f})=>{let y=u&&"icon"in u&&u.icon;return jsx(re,{variant:"inverse",size:"sm",includeArrow:!1,text:s["aria-label"],offset:4,...n,children:jsx(zt,{...c,isOpen:d,isReadOnly:s.isReadOnly,ref:f,variant:o,validationState:s.validationState,selectedIcon:y||void 0,label:u?"label"in u&&u?.label:s.placeholder,valueProps:m})})},[s,n,o]);return jsxs(M,{display:"flex",flexDirection:"row",gap:"md",paddingX:"md",alignItems:"center",className:classNames("BaselineUI-IconSelect",e),"data-block-id":r,style:t,ref:L(i,p),children:[a?jsx(a,{size:24,className:sprinkles({color:"icon.primary",display:"flex",flexShrink:0})}):null,jsx(qe,{...s,renderTrigger:l})]})});fc.displayName="IconSelect";var yc="_1017q4c5",bc=z({defaultClassName:"_1017q4c0",variantClassNames:{size:{md:"_1017q4c1",sm:"_1017q4c2"},isDisabled:{true:"_1017q4c3"}},defaultVariants:{},compoundVariants:[]}),gc="_1017q4c4";var p5={sm:AvatarIcon,md:AvatarIcon$1},Fo=no.forwardRef(({className:e,style:t,size:o="md",icon:r=p5[o],name:a,imgSrc:n,showInitials:s,isDisabled:i,hasNotifications:p,imgLoading:l,"data-block-id":c,"data-block-class":u},m)=>{let{imgProps:d}=vo({src:n,alt:a}),f=a?.split(" ").map(y=>y[0]).join("");return jsxs("span",{className:classNames(bc({size:o,isDisabled:i}),"BaselineUI-Avatar",e),"data-disabled":i,ref:m,style:t,"aria-disabled":i,"data-block-id":c,"data-block-class":u,children:[n?jsx("img",{...d,loading:l,className:gc}):null,!s&&!n&&jsx(r,{size:o==="sm"?16:24}),s&&!n?o==="sm"?f[0]:f:null,p?jsx("div",{"data-testid":"notification",className:yc}):null]})});Fo.displayName="Avatar";var vc="_1yep5z63 _1yep5z64 _1yep5z65 _1yep5z62f _1yep5z62g _1yep5z62h _1yep5z63l _1yep5z63m _1yep5z63n _1yep5z619 _1yep5z61a _1yep5z61b _1yep5z6i0 _1yep5z6i1 _1yep5z6i2 _1yep5z6ir _1yep5z6is _1yep5z6it",_c=z({defaultClassName:"_1x62fhb6 _1yep5z63r _1yep5z63s _1yep5z63t _1yep5z61f _1yep5z61g _1yep5z61h _1yep5z6i0 _1yep5z6i1 _1yep5z6i2 _1yep5z6ir _1yep5z6is _1yep5z6it _1yep5z6kx _1yep5z6ky _1yep5z6ki _1yep5z6kl _1yep5z6ev _1yep5z69i _1yep5z69j _1yep5z69k",variantClassNames:{isHovered:{true:"_1yep5z6105"},isSelected:{true:"_1x62fhb8"},isFocusVisible:{true:"_1x62fhb9"},isDisabled:{true:"_1x62fhba _1yep5z6109"},variant:{primary:"_1x62fhbb _1yep5z6z6",ghost:"_1yep5z6z9"}},defaultVariants:{},compoundVariants:[[{variant:"primary",isSelected:!0,isDisabled:!1},"_1yep5z61lg"],[{variant:"primary",isSelected:!0},"_1yep5z61me"],[{variant:"ghost",isSelected:!0,isFocusVisible:!1},"_1x62fhbd"],[{variant:"ghost",isSelected:!0,isDisabled:!1},"_1yep5z61lr"],[{variant:"ghost",isDisabled:!0,isSelected:!0},"_1x62fhbe _1yep5z6ey"],[{variant:"primary",isHovered:!0},"_1yep5z61mf"]]}),zc=z({defaultClassName:"_1x62fhb3 _1yep5z6i3 _1yep5z6i4 _1yep5z6i5 _1yep5z6i9 _1yep5z6ia _1yep5z6ib",variantClassNames:{variant:{primary:"_1x62fhb4",ghost:"_1yep5z6ut _1yep5z6uu _1yep5z6uv"}},defaultVariants:{},compoundVariants:[]}),hc="_1x62fhbf",xc="_1yep5z6l2 _1yep5z6kz _1yep5z6hc _1yep5z6l1",Cc=z({defaultClassName:"_1x62fhb0 _1yep5z6kv _1yep5z6i0 _1yep5z6i1 _1yep5z6i2 _1yep5z6i9 _1yep5z6ia _1yep5z6ib",variantClassNames:{variant:{primary:"_1yep5z6115",ghost:"_1x62fhb2"}},defaultVariants:{},compoundVariants:[]});var Pc=({state:e,...t})=>{let o=no.useRef(null),{tabPanelProps:r}=useTabPanel(t,e,o),{selectedItem:a}=e,{focusProps:n,isFocusVisible:s}=useFocusRing();if(!a?.value)return null;let{className:i,style:p,"data-block-id":l}=a.value;return jsx("div",{...mergeProps(r,n),ref:o,className:classNames({[xc]:s},"Baseline-Tabs-TabPanel",i),"data-block-id":l,style:p,children:a?.props.children})};var mn=no.forwardRef(({className:e,style:t,tabHeaderStyle:o,tabHeaderClassName:r,variant:a="primary",actions:n,onRemove:s,"data-block-id":i,...p},l)=>{let c=useTabListState({...p,selectedKey:p.selectedValue,defaultSelectedKey:p.defaultSelectedValue,disabledKeys:p.disabledValues}),u=no.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":i,children:[jsxs("div",{className:classNames(Cc({variant:a}),r),style:o,children:[jsx("div",{...m,className:zc({variant:a}),ref:u,children:[...c.collection].map(d=>(invariant(d.value,"TabItem requires a value prop"),jsx(wc,{item:d,state:c,onRemove:s,variant:a},d.key)))}),n?.map((d,f)=>jsx("div",{className:vc,children:jsx(D,{...d,variant:"secondary",size:"sm",className:classNames(hc,d.className)})},f))]}),jsx(Pc,{state:c},c.selectedItem?.key)]})});mn.displayName="TabsBase";var wc=({item:e,onRemove:t,state:o,variant:r})=>{let{key:a,value:n}=e,s=no.useRef(null),{tabProps:i,isSelected:p,isDisabled:l}=useTab({key:a},o,s),{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:_,isFocused:v}=useFocusRing(),{keyboardProps:g}=useKeyboard({onKeyDown:w=>{w.key==="Backspace"&&t?t(a):w.continuePropagation();}}),h=filterTruthyValues({"data-selected":p,"data-disabled":l,"data-focused":v,"data-hovered":u,"data-focus-visible":_});return jsxs("div",{...mergeProps(g,i,c,b,h),className:classNames(_c({isHovered:u,isSelected:p,isFocusVisible:_,isDisabled:l,variant:r}),"BaselineUI-Tabs-TabButton",y),style:f,ref:s,children:[d?jsx(d,{size:20}):null,m,t?jsx(D,{variant:"secondary",elementType:"div",icon:XIcon$1,size:"xxs",onPress:()=>{t(a);},excludeFromTabOrder:!0,UNSAFE_NON_INTERACTIVE:!0,style:{display:"inline-flex",color:"inherit",opacity:p||v||u?1:0}}):null]})};wc.displayName="TabButton";var Ic=no.forwardRef(({children:e,...t},o)=>{let r=useMemo(()=>no.Children.map(e,a=>!a||!no.isValidElement(a)||typeof a.type=="string"?null:{...a.props,id:a.props.value}).filter(Boolean),[e]);return jsx(mn,{...t,ref:o,items:r,children:a=>jsx(Item,{title:a.title,children:a.children},a.key)})});Ic.displayName="Tabs";var Tc=({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);Tc.displayName="TabItem";var Nc={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 Sc=z({defaultClassName:"kfun6yw",variantClassNames:{arrangement:{single:"kfun6yx",multi:"kfun6yy",compact:"kfun6yz"}},defaultVariants:{},compoundVariants:[]}),Lc=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"]]}),Mc=z({defaultClassName:"kfun6yt",variantClassNames:{size:{sm:"kfun6yu",md:"kfun6yv"}},defaultVariants:{},compoundVariants:[]}),Bc=z({defaultClassName:"kfun6yp",variantClassNames:{arrangement:{single:"kfun6yq",multi:"kfun6yr",compact:"kfun6ys"}},defaultVariants:{},compoundVariants:[]}),Dc=z({defaultClassName:"kfun6yk",variantClassNames:{variant:{info:"kfun6yl",warning:"kfun6ym",error:"kfun6yn",success:"kfun6yo"}},defaultVariants:{},compoundVariants:[]}),Ec=z({defaultClassName:"kfun6yh",variantClassNames:{size:{sm:"kfun6yi",md:"kfun6yj"}},defaultVariants:{},compoundVariants:[]}),Fc=z({defaultClassName:"kfun6yd z9nup82",variantClassNames:{arrangement:{single:"kfun6ye",multi:"kfun6yf",compact:"kfun6yg"}},defaultVariants:{},compoundVariants:[]});var V5={error:{sm:ErrorAltFilledIcon,md:ErrorAltFilledIcon$1},info:{sm:InfoFilledIcon,md:InfoFilledIcon$1},success:{sm:CheckFilledIcon,md:CheckFilledIcon$1},warning:{sm:WarningFilledIcon,md:WarningFilledIcon$1}},Hc=no.forwardRef(({className:e,description:t,actionLabel:o,onAction:r,style:a,variant:n="info",title:s,arrangement:i="single",onClose:p,size:l="sm","data-block-id":c,"data-block-class":u},m)=>{let d=F(Nc),f=o&&jsx($,{variant:i==="compact"?"tertiary":"ghost",label:o,onPress:r}),y=V5[n][l];return jsxs("div",{className:classNames(Lc({variant:n,arrangement:i,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:Fc({arrangement:i}),children:[jsx(y,{className:Dc({variant:n}),size:16}),jsxs("div",{className:Sc({arrangement:i}),children:[jsx("h3",{className:Ec({size:l}),children:s}),jsx("section",{className:Mc({size:l}),children:t})]}),i==="compact"&&f]}),jsxs("div",{className:Bc({arrangement:i}),children:[i!=="compact"&&f,p?jsx(D,{variant:"secondary",icon:CloseIcon,size:"sm",onPress:p,"aria-label":d.formatMessage("close")}):null]})]})});Hc.displayName="InlineAlert";var Ke={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 Nr=({children:e})=>{let{triggerProps:t}=no.useContext(Ae);return jsx(PressResponder,{...t,children:e})};Nr.displayName="ModalTrigger";var G5=({children:e})=>{let{state:t}=no.useContext(Ae);return jsx(PressResponder,{onPress:()=>{t?.close();},children:e})};var Oc="_1dbkl53 _1yep5z6al _1yep5z6am _1yep5z6an _1yep5z6b9 _1yep5z6ba _1yep5z6bb _1yep5z6kv",Vc="_1dbkl5e",Ac=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 _1yep5z6i0 _1yep5z6i1 _1yep5z6i2 _1yep5z6i9 _1yep5z6ia _1yep5z6ib _1yep5z6l6 _1yep5z6ky _1yep5z69i _1yep5z69j _1yep5z69k _1yep5z6eu _1yep5z6kx _1yep5z6dy",variantClassNames:{isHovered:{true:"_1dbkl55"},isFocusVisible:{true:"_1dbkl56"},isDisabled:{true:"z9nup83 _1yep5z6109"},labelPosition:{top:"_1dbkl58",start:"_1dbkl59"}},defaultVariants:{},compoundVariants:[]}),jc="_1yep5z6i0 _1yep5z6i1 _1yep5z6i2 _1yep5z6i9 _1yep5z6ia _1yep5z6ib _1yep5z69l _1yep5z69m _1yep5z69n _1yep5z6ir _1yep5z6is _1yep5z6it _1yep5z6jr _1yep5z6js _1yep5z6jt",$c=z({defaultClassName:"_1dbkl50 _1yep5z6i0 _1yep5z6i1 _1yep5z6i2 _1yep5z6dy _1yep5z6ev",variantClassNames:{labelPosition:{top:"_1yep5z6nq _1yep5z6nr _1yep5z6ns",start:"_1dbkl52"}},defaultVariants:{},compoundVariants:[]}),Sr="_1dbkl5l _1yep5z6i6 _1yep5z6i7 _1yep5z6i8 _1yep5z69f _1yep5z69g _1yep5z69h",Uc="_1dbkl5f z9nup87",Lr="_1dbkl5m _1yep5z6b0 _1yep5z6b1 _1yep5z6b2 _1yep5z6bo _1yep5z6bp _1yep5z6bq _1yep5z6cc _1yep5z6cd _1yep5z6ce _1yep5z6d0 _1yep5z6d1 _1yep5z6d2 _1yep5z6hl _1yep5z6hm _1yep5z6hn",qc="_1dbkl5k _1yep5z66 _1yep5z67 _1yep5z68 _1yep5z62i _1yep5z62j _1yep5z62k _1yep5z63o _1yep5z63p _1yep5z63q _1yep5z61c _1yep5z61d _1yep5z61e _1yep5z6ky",Kc="_1yep5z63r _1yep5z63s _1yep5z63t _1yep5z619 _1yep5z61a _1yep5z61b _1yep5z6i0 _1yep5z6i1 _1yep5z6i2 _1yep5z6i9 _1yep5z6ia _1yep5z6ib _1yep5z6jr _1yep5z6js _1yep5z6jt _1yep5z6dy _1yep5z6ev _1yep5z69l _1yep5z69m _1yep5z69n _1yep5z6ir _1yep5z6is _1yep5z6it",Mr=z({defaultClassName:"_1dbkl5h _1yep5z63 _1yep5z64 _1yep5z65 _1yep5z62f _1yep5z62g _1yep5z62h _1yep5z6fs",variantClassNames:{includesCustomColorPicker:{true:"_1yep5z6me _1yep5z6mf _1yep5z6mg"}},defaultVariants:{},compoundVariants:[]}),yn="_1dbkl5v _1yep5z6i0 _1yep5z6i1 _1yep5z6i2 _1yep5z6i9 _1yep5z6ia _1yep5z6ib",Gc=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 _1yep5z6i0 _1yep5z6i1 _1yep5z6i2 _1yep5z6i9 _1yep5z6ia _1yep5z6ib _1yep5z6ir _1yep5z6is _1yep5z6it _1yep5z6l7 _1yep5z6gq _1yep5z6ky _1yep5z6eu _1yep5z6dy",variantClassNames:{isFocused:{true:"_1dbkl5r _1yep5z611y"},isHovered:{true:"_1dbkl5s"},allowAlpha:{false:"_1yep5z6wh _1yep5z6wi _1yep5z6wj _1yep5z6xt _1yep5z6xu _1yep5z6xv _1yep5z6166"}},defaultVariants:{},compoundVariants:[[{isHovered:!0,isFocused:!1},"_1yep5z61nd"]]}),Wc=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 _1yep5z6i0 _1yep5z6i1 _1yep5z6i2 _1yep5z6ic _1yep5z6id _1yep5z6ie _1yep5z69c _1yep5z69d _1yep5z69e _1yep5z6f0 _1yep5z6kx _1yep5z6ir _1yep5z6is _1yep5z6it _1yep5z6ki _1yep5z6kl",variantClassNames:{isHovered:{true:"_1yep5z6115"},isFocusVisible:{true:"_1yep5z616c _1yep5z616a _1yep5z616d _1yep5z612n"},isDisabled:{true:"_1yep5z610d"}},defaultVariants:{},compoundVariants:[]}),Ct="_1dbkl5u",Br="_1dbkl5g _1yep5z6al _1yep5z6am _1yep5z6an _1yep5z6b9 _1yep5z6ba _1yep5z6bb _1yep5z6bx _1yep5z6by _1yep5z6bz _1yep5z6cl _1yep5z6cm _1yep5z6cn _1yep5z6d7",Dr="_1dbkl5j _1yep5z69 _1yep5z6a _1yep5z6b _1yep5z62l _1yep5z62m _1yep5z62n _1yep5z63r _1yep5z63s _1yep5z63t _1yep5z61f _1yep5z61g _1yep5z61h _1yep5z6i0 _1yep5z6i1 _1yep5z6i2 _1yep5z6ic _1yep5z6id _1yep5z6ie _1yep5z69f _1yep5z69g _1yep5z69h",bn="_1dbkl5x",Xc="_1dbkl5w",gn="_1yep5z69 _1yep5z6a _1yep5z6b _1yep5z62l _1yep5z62m _1yep5z62n _1yep5z63r _1yep5z63s _1yep5z63t _1yep5z61f _1yep5z61g _1yep5z61h _1yep5z6i0 _1yep5z6i1 _1yep5z6i2 _1yep5z6ic _1yep5z6id _1yep5z6ie _1yep5z69l _1yep5z69m _1yep5z69n",Er=z({defaultClassName:"_1dbkl5n _1yep5z6b0 _1yep5z6b1 _1yep5z6b2 _1yep5z6bo _1yep5z6bp _1yep5z6bq _1yep5z6cc _1yep5z6cd _1yep5z6ce _1yep5z6d0 _1yep5z6d1 _1yep5z6d2 _1yep5z6l2 _1yep5z6ho _1yep5z6hp _1yep5z6hq _1yep5z6l7 _1yep5z6la",variantClassNames:{isFocusVisible:{true:"_1dbkl5o _1yep5z616a _1yep5z612n _1yep5z616c"}},defaultVariants:{},compoundVariants:[]}),vn="z9nup84 z9nup86 _1yep5z6b0 _1yep5z6b1 _1yep5z6b2 _1yep5z6bo _1yep5z6bp _1yep5z6bq _1yep5z6cc _1yep5z6cd _1yep5z6ce _1yep5z6d0 _1yep5z6d1 _1yep5z6d2 _1yep5z6ko _1yep5z6kp _1yep5z6kr _1yep5z6kq _1yep5z6ho _1yep5z6hp _1yep5z6hq";var Yc=z({defaultClassName:"_1344e9q0 _1yep5z6b0 _1yep5z6b1 _1yep5z6b2 _1yep5z6bo _1yep5z6bp _1yep5z6bq _1yep5z6cc _1yep5z6cd _1yep5z6ce _1yep5z6d0 _1yep5z6d1 _1yep5z6d2 _1yep5z6hl _1yep5z6hm _1yep5z6hn _1yep5z6ks _1yep5z6hk _1yep5z6i0 _1yep5z6i1 _1yep5z6i2 _1yep5z6ir _1yep5z6is _1yep5z6it _1yep5z6jl _1yep5z6jm _1yep5z6jn",variantClassNames:{isFocusVisible:{true:"_1344e9q1"},isDisabled:{true:"_1344e9q2"},removeBlendMode:{true:"_1344e9q3"},isSelected:{true:"_1yep5z616c _1yep5z616a _1yep5z612n _1yep5z616f"},isHovered:{true:"_1344e9q5"}},defaultVariants:{},compoundVariants:[[{isSelected:!1,isFocusVisible:!0},"_1344e9q6"],[{isSelected:!0,isFocusVisible:!0},"_1344e9q7 _1yep5z61rn _1yep5z61rl _1yep5z61ny _1yep5z61rq"],[{isSelected:!0,isDisabled:!0},"_1yep5z61rn _1yep5z61rl _1yep5z61ny _1yep5z61rq _1yep5z61o5"],[{isHovered:!0,isSelected:!1},"_1yep5z61rq _1yep5z61rn _1yep5z61rl _1yep5z61o2"]]});var Ge=no.forwardRef(({color:e,isFocusVisible:t,isSelected:o,isInteractive:r,isDisabled:a,style:n,className:s,id:i,"data-block-id":p,"data-block-class":l,...c},u)=>{let m=e&&e!==Re&&(typeof e=="string"?parseColor(e):e),{formatMessage:d}=F(),f=!m,{colorSwatchProps:y}=useColorSwatch({color:f?"#000000":e}),{hoverProps:b,isHovered:_}=useHover({isDisabled:a||!r}),v=filterTruthyValues({"data-focus-visible":t,"data-selected":o,"data-hovered":_,"data-block-id":p,"data-block-class":l,"data-disabled":a,"data-interactive":r});return jsx("div",{...mergeProps(b,v,f?{}:y),style:n,"aria-label":f?d(rz.none):y["aria-label"],role:"img",className:classNames(Yc({removeBlendMode:f,isFocusVisible:t,isDisabled:!!a,isSelected:!!o,isHovered:_}),"BaselineUI-ColorSwatch",s),ref:u,id:i,...c,children:jsx(M,{display:"inline-flex",justifyContent:"center",alignItems:"center",borderRadius:"full",height:"full",width:"full",opacity:a?"medium":void 0,style:m?Zc(m,4):void 0,children:f?jsx(NoneIcon,{size:14}):null})})});Ge.displayName="ColorSwatch";var rz=q({none:{id:"none",defaultMessage:"None"}});var Jc=[{id:"hex",label:"HEX"},{id:"rgb",label:"RGB"}],Ho=parseColor("#000000").toFormat("hsla"),ae="hsla",Pt="hexa";function to(e){return typeof e=="string"?parseColor(e).toFormat(ae):e?e.toFormat(ae):null}function ed(e,t){return e?.getChannelValue("alpha")?t?.toString(Pt)===e.toString(Pt):!t?.getChannelValue("alpha")}function od(e,t,o){return t?.label?t.label:e?.getChannelValue("alpha")===0?o:e?.toString("rgba")}var Re="NONE";function td(e,t){let o=t?.map(a=>({id:parseColor(a.color).toString(Pt),label:a.label}))||[],r={id:Re,label:e};return [...o,r]}var Fr=(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:qc,children:jsx(Ge,{color:e.value.id,isFocusVisible:o,isSelected:r,"aria-label":e.value.label,isInteractive:!0})})),Zc=(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 ad=({value:e,...t})=>{let o=no.useRef(null),r=no.useRef(null),a=no.useRef(null),n=useColorAreaState({...t,value:e}),{colorAreaProps:s,xInputProps:i,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,...s,className:classNames(Oc,"BaselineUI-ColorInput-ColorArea"),children:jsxs("div",{...l,className:classNames(Er({isFocusVisible:u}),"BaselineUI-ColorInput-ColorAreaThumb"),style:{...l.style,transform:"translate(-50%, -50%)",backgroundColor:to(e)?.withChannelValue("alpha",1).toString("css")},children:[jsx("input",{ref:o,...i,...c}),jsx("input",{ref:r,...p,...c})]})})};var id=({color:e,setColor:t,allowAlpha:o,...r})=>{let a=useColorFieldState({value:e,onChange:u=>{t(to(u)?.toFormat(ae).withChannelValue("alpha",e.getChannelValue("alpha")??1)||Ho);}}),n=no.useRef(null),{inputProps:s}=useColorField({...r,"aria-label":"Hex"},a,n),{focusProps:i,isFocused:p}=useFocusRing({isTextInput:!0}),{hoverProps:l,isHovered:c}=useHover({});return jsxs("div",{className:classNames(yn,"BaselineUI-ColorInput-FieldInput"),"data-color-mode":o?"hexa":"hex",children:[jsx("input",{...mergeProps(s,i,l),ref:n,className:Gc({isFocused:p,isHovered:c,allowAlpha:o})}),o?jsx(pd,{color:e,setColor:t}):null]})},ld=({color:e,setColor:t,allowAlpha:o})=>{let r=e.toFormat("rgba"),{locale:a}=useLocale();return jsxs("div",{className:classNames(yn,"BaselineUI-ColorInput-FieldInput"),"data-color-mode":o?"rgba":"rgb",children:[jsx(Le,{"aria-label":e.getChannelName("red",a),value:r.getChannelValue("red"),showStepper:!1,className:Ct,onChange:n=>{t(r.withChannelValue("red",n).toFormat(ae));},step:1,minValue:0,maxValue:255}),jsx(Le,{"aria-label":e.getChannelName("green",a),value:r.getChannelValue("green"),showStepper:!1,className:Ct,onChange:n=>{t(r.withChannelValue("green",n).toFormat(ae));},step:1,minValue:0,maxValue:255}),jsx(Le,{"aria-label":e.getChannelName("blue",a),value:r.getChannelValue("blue"),showStepper:!1,className:Ct,onChange:n=>{t(r.withChannelValue("blue",n).toFormat(ae));},step:1,minValue:0,maxValue:255}),o?jsx(pd,{color:e,setColor:t}):null]})},vz={style:"percent",maximumFractionDigits:0},pd=({color:e,setColor:t})=>{let{locale:o}=useLocale(),r=useCallback(a=>{t(e.withChannelValue("alpha",a));},[e,t]);return jsx(Le,{"aria-label":e.getChannelName("alpha",o),value:e.getChannelValue("alpha"),formatOptions:vz,className:Ct,showStepper:!1,onChange:r,minValue:0,maxValue:1})};var Cn=({channel:e,...t})=>{let{locale:o}=useLocale(),r=useColorSliderState({...t,channel:e,locale:o}),a=no.useRef(null),n=no.useRef(null),{trackProps:s,thumbProps:i,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(Lr,{[Si({size:"xs"})]:e==="alpha"},"BaselineUI-ColorInput-ColorSlider"),"data-channel":e,...s,ref:a,children:[e==="alpha"&&jsx("div",{className:vn}),jsx("div",{className:Lr,style:s.style}),jsxs("div",{className:classNames(Er({isFocusVisible:c}),"BaselineUI-ColorInput-ColorSliderThumb"),...i,children:[jsx("div",{className:vn,style:{backgroundColor:"#ffffff"}}),jsx("div",{style:{backgroundColor:r.getDisplayColor().toString("css"),height:8},className:Lr}),jsx(VisuallyHidden,{children:jsx("input",{ref:n,...p,...l})})]})]})};var Hr=({color:e,setColor:t,allowAlpha:o})=>{let[r,a]=no.useState("hex"),{formatMessage:n}=F(Ke);return jsxs(Fragment,{children:[jsx(ad,{value:e,xChannel:"saturation",yChannel:"lightness",onChange:t}),jsxs("div",{className:gn,children:[jsx(Cn,{channel:"hue",value:e,onChange:t}),o?jsx(Cn,{channel:"alpha",value:e,onChange:t}):null]}),jsxs("div",{className:classNames(gn,sprinkles.variants({paddingTop:"none",gap:"sm"})),children:[jsx(qe,{label:n("colorFormat"),labelPosition:"start",variant:"ghost",items:Jc,selectedKey:r,onSelectionChange:s=>{a(s);}}),r==="hex"&&jsx(id,{color:e,setColor:t,allowAlpha:o}),r==="rgb"&&jsx(ld,{color:e,setColor:t,allowAlpha:o})]})]})};var wn=({color:e,setColor:t,storePickedColorKey:o,addColorButtonLabel:r,removeColorButtonLabel:a,customColorsLabel:n,pickerMode:s,allowAlpha:i})=>{let{locale:p}=useLocale(),{formatMessage:l}=F(Ke),c=no.useRef(null),u=zo(c.current),[m,d]=Ii(o,[]),f=no.useRef(null),[y,b]=no.useState(e),_=no.useMemo(()=>m.map(k=>({id:k,label:parseColor(k).getColorName(p),description:k})),[m,p]),v=useCallback(()=>{let k=s==="active"?e:y;if(m.includes(k.toString(ae))){f.current?.querySelector(`[data-key='${k.toString(ae)}']`)?.classList.add(bn);return}d([...m,k.toString(ae)]);},[m,e,d,y,s]);useEffect(()=>{let k=f.current;function P(R){R.animationName===Xc&&R.target?.classList.remove(bn);}return k?.addEventListener("animationend",P),()=>{k?.removeEventListener("animationend",P);}},[]);let g=useId(),h=jsx(D,{ref:c,variant:"secondary",size:"md","aria-label":r,icon:PlusIcon$1,onPress:s==="active"?v:void 0}),w=useCallback(k=>jsxs(me,{size:"content",className:Mr({includesCustomColorPicker:!0}),style:{paddingBlockEnd:0},"aria-label":l("newColor"),children:[jsx(Hr,{color:y,setColor:b,allowAlpha:i}),jsx(j,{}),jsx(M,{padding:"lg",display:"flex",flexDirection:"row-reverse",children:jsxs(M,{display:"inline-flex",gap:"lg",children:[jsx($,{label:l("cancel"),size:"sm",variant:"secondary",onPress:k}),jsx($,{label:l("add"),variant:"primary",onPress:()=>{v(),k();},size:"sm"})]})})]}),[y,v,l,i]),x=useCallback(k=>{invariant(k instanceof Set,"Key must be a set");let P=[...k][0];P&&t(parseColor(P).toFormat(ae));},[t]);return jsxs(Fragment,{children:[jsx(j,{}),jsxs("div",{className:classNames(Kc,"BaselineUI-ColorInput-CustomColors"),children:[jsx("span",{id:g,children:n}),jsxs(M,{display:"flex",children:[!!m.length&&m.includes(e.toString(ae))&&jsx(D,{variant:"secondary",size:"md",elementType:"div",icon:MinusIcon$2,"aria-label":a,onPress:()=>{d(m.filter(k=>k!==e.toString(ae)));}}),s==="active"&&h,s==="lazy"&&(u==="mobile"?jsxs(ke,{children:[jsx(Nr,{children:h}),jsx(Me,{style:{zIndex:1e5},children:({close:k})=>w(k)})]}):jsxs(Ne,{type:"dialog",children:[jsx(Se,{children:h}),jsx(we,{placement:"right top",className:Br,offset:6,children:({close:k})=>w(k)})]}))]})]}),!!m.length&&jsx(ie,{items:_,layout:"grid","aria-labelledby":g,className:classNames(Sr,Dr,sprinkles.variants({paddingTop:"xs"}),"BaselineUI-ColorInput-CustomColorsListBox"),renderOption:Fr,ref:f,autoFocus:!1,selectionMode:"single",selectedKeys:[e.toString(ae)],onSelectionChange:x})]})};var Rn=no.forwardRef(({setColor:e,color:t,triggerRef:o,autoFocus:r,presets:a,state:n},s)=>{let{formatMessage:i}=F(Ke),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(ae)),n.close();}},[n,a,e]);return jsx("div",{className:classNames(Dr,"BaselineUI-ColorInput-Presets"),style:{minWidth:o.current?.offsetWidth},ref:s,children:jsx(ie,{autoFocus:r,items:a,layout:"grid","aria-label":i("colorPresets"),className:Sr,renderOption:Fr,selectionMode:"single",selectedKeys:[t?.toString(Pt)||Re],onSelectionChange:p})})});Rn.displayName="ColorPresetList";var wt=no.forwardRef(({color:e,colorLabel:t,colorName:o,...r},a)=>{let n=no.useRef(null),{hoverProps:s,isHovered:i}=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":i,"data-pressed":l});return jsxs("button",{...mergeProps(p,s,u,m),style:r.style,className:classNames(Ac({isHovered:i,isFocusVisible:c||r.isOpen,isDisabled:r.isDisabled,labelPosition:r.labelPosition}),"BaselineUI-ColorInputButton",r.className),ref:L(a,n),children:[jsx(Ge,{color:e?.toString("hexa")}),t?jsx("div",{className:Uc,children:o}):jsx(VisuallyHidden,{children:o})]})});wt.displayName="ColorInputButton";var Ar=no.forwardRef(({className:e,style:t,icon:o,...r},a)=>{let n=no.useRef(null),{hoverProps:s,isHovered:i}=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":i,"data-pressed":l});return jsxs("button",{...mergeProps(p,s,u,m),ref:L(a,n),style:t,className:classNames(Wc({isHovered:i||l||r.isOpen,isFocusVisible:c,isDisabled:r.isDisabled}),"BaselineUI-IconColorInputButton",e),children:[jsx(o,{size:16}),jsx("div",{className:Vc,style:{backgroundColor:r.color||void 0}})]})});Ar.displayName="IconColorInputButton";function Pd({colorLabel:e,color:t,presets:o}){let{formatMessage:r}=F(),{locale:a}=useLocale(),n=useMemo(()=>o.find(p=>p.id===Re?!t:t?ed(t,parseColor(p.id)):!1),[o,t]),s=useMemo(()=>typeof e=="function"?e?.(t):e?od(t,n,r(Uz.transparent)):!1,[t,e,r,n]),i=useMemo(()=>{if(n?.label)return n.label;t?.getColorName(a);},[t,a,n?.label]);return {colorName:s,humanReadableName:i}}var Uz=q({transparent:{defaultMessage:"Transparent",id:"transparent"}});var Ao=no.forwardRef(({className:e,style:t,allowRemoval:o,allowAlpha:r=!0,presets:a,labelPosition:n="top",colorLabel:s=!0,includePicker:i=!0,onChange:p,defaultValue:l,storePickedColorKey:c="baselinePickedColor",value:u,addColorButtonLabel:m,removeColorButtonLabel:d,customColorsLabel:f,renderTriggerButton:y=({isOpen:k,color:P,ref:R,colorName:T,triggerProps:N,labelId:S})=>jsx(wt,{...mergeProps(N,{...w.label?{"aria-labelledby":S}:{"aria-label":w["aria-label"]}}),ref:R,isOpen:k,isDisabled:w.isDisabled,labelPosition:n,color:P,colorLabel:s,colorName:T}),pickerMode:b="active",offset:_=2,placement:v=n==="start"?"bottom end":"bottom start","data-block-id":g,"data-block-class":h,...w},x)=>{let k=no.useRef(null),P=no.useRef(null),R=useOverlayTriggerState(w),{triggerProps:T,overlayProps:N}=useOverlayTrigger({type:"listbox"},R,k),S=be(w.portalContainer),[I,C]=useControlledState(u===void 0?void 0:to(u),to(l),H=>p?.(H?.toFormat("rgba")||null)),{formatMessage:B}=F(Ke),O=useMemo(()=>td(B(jr.noColor),a),[a,B]),E=useId(),{colorName:G}=Pd({colorLabel:s,color:I,presets:O}),V=useMemo(()=>O.filter(H=>o||H.id!==Re),[O,o]),K=m||B(jr.addColor),A=d||B(jr.removeColor),Q=f||B(jr.customColors);return jsxs(Fragment,{children:[jsxs("div",{className:classNames({[jc]:n==="start"},"BaselineUI-ColorInput-Trigger",e),"data-block-id":g,"data-block-class":h,style:t,ref:x,children:[w.label?jsx("label",{id:E,className:$c({labelPosition:n}),children:w.label}):null,y({isOpen:R.isOpen,color:I,ref:k,colorName:G,triggerProps:T,labelId:E})]}),R.isOpen?jsx(ye,{...w,portalContainer:S,placement:v,state:R,offset:_,className:classNames(Br,"BaselineUI-ColorInput-Popover"),triggerRef:k,overlayProps:N,children:jsxs(me,{size:"content",className:Mr({includesCustomColorPicker:i}),ref:P,"aria-labelledby":E,"aria-label":w["aria-label"],children:[i&&b==="active"?jsxs(Fragment,{children:[jsx(Hr,{color:I||Ho,setColor:C,allowAlpha:r}),jsx(wn,{color:I||Ho,setColor:C,storePickedColorKey:c,addColorButtonLabel:K,removeColorButtonLabel:A,customColorsLabel:Q,pickerMode:b,allowAlpha:r})]}):null,!!V.length&&jsxs(Fragment,{children:[i&&b==="active"?jsx(j,{}):null,jsx(Rn,{autoFocus:i&&b==="active"?!1:"first",state:R,triggerRef:k,presets:V,color:I,setColor:C})]}),i&&b==="lazy"?jsx(wn,{color:I||Ho,setColor:C,storePickedColorKey:c,addColorButtonLabel:K,removeColorButtonLabel:A,customColorsLabel:Q,pickerMode:b,allowAlpha:r}):null]})}):null]})});Ao.displayName="ColorInput";var jr=q({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 Id=no.forwardRef(({className:e,style:t,icon:o,variant:r="standard","data-block-id":a,tooltipProps:n,...s},i)=>{let p=no.useRef(null),l=useCallback(({isOpen:c,color:u,ref:m,colorName:d,triggerProps:f})=>jsx(re,{variant:"inverse",size:"sm",includeArrow:!1,text:s["aria-label"],placement:"bottom start",offset:4,...n,children:r==="standard"?jsx(wt,{...f,"aria-label":s["aria-label"],ref:m,isOpen:c,isDisabled:s.isDisabled,color:u,colorLabel:!1,colorName:d}):jsx(Ar,{...f,isOpen:c,icon:TextIcon,color:u?.toString("hexa"),ref:m,isDisabled:s.isDisabled,"aria-label":s["aria-label"]})}),[s,n,r]);return jsxs(M,{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:L(i,p),children:[r==="standard"&&o?jsx(o,{size:24,className:sprinkles({color:"icon.primary"})}):null,jsx(Ao,{...s,colorLabel:!1,renderTriggerButton:l})]})});Id.displayName="IconColorInput";var Td={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 $r=z({defaultClassName:"mnnh5s1 _1yep5z6hl _1yep5z6hm _1yep5z6hn _1yep5z6ki _1yep5z6kl _1yep5z6kx _1yep5z6kw _1yep5z6i0 _1yep5z6i1 _1yep5z6i2 _1yep5z6ir _1yep5z6is _1yep5z6it _1yep5z6jl _1yep5z6jm _1yep5z6jn _1yep5z6kv",variantClassNames:{isInline:{true:"mnnh5s2 _1yep5z6vw _1yep5z6vx _1yep5z6vy _1yep5z6wk _1yep5z6wl _1yep5z6wm _1yep5z6x8 _1yep5z6x9 _1yep5z6xa _1yep5z6xw _1yep5z6xx _1yep5z6xy _1yep5z6122 _1yep5z616j _1yep5z616k",false:"_1yep5z6166 _1yep5z6116"},isHovered:{true:"mnnh5s4"},hasLoadedImage:{true:"_1yep5z6115"},includeCheckeredBackground:{true:"mnnh5s6"},showFocusRing:{true:"_1yep5z6126 _1yep5z616c _1yep5z616a _1yep5z612n _1yep5z616d"},isDisabled:{true:"mnnh5s8 _1yep5z6yl"}},defaultVariants:{},compoundVariants:[[{isHovered:!0,hasLoadedImage:!1},"_1yep5z61mo"],[{isHovered:!0,hasLoadedImage:!0},"mnnh5s9"],[{isInline:!0,isDisabled:!0},"_1yep5z61nd"],[{hasLoadedImage:!0,includeCheckeredBackground:!0},"_1yep5z61mg"]]}),Nd="_1yep5z6d8",Ur=z({defaultClassName:"mnnh5sa",variantClassNames:{isInline:{true:"mnnh5sb",false:"mnnh5sc"},isDisabled:{true:"mnnh5sd"},hasLoadedImage:{true:"mnnh5s0"}},defaultVariants:{},compoundVariants:[]});var Sd=z({defaultClassName:"_1i0ytqa3 _1yep5z6hl _1yep5z6hm _1yep5z6hn _1yep5z6kv _1yep5z6kw _1yep5z6ky",variantClassNames:{isFocusVisible:{true:"_1i0ytqa4"},isInline:{true:"_1yep5z611e",false:"_1yep5z611g"},isDisabled:{true:"_1i0ytqa7 _1yep5z6yl",false:"_1i0ytqa8"}},defaultVariants:{},compoundVariants:[[{isInline:!0,isFocusVisible:!0},"_1i0ytqa9 _1yep5z61n9 _1yep5z61rt _1yep5z61rv"],[{isInline:!1,isFocusVisible:!0},"_1i0ytqaa"],[{isInline:!0,isDisabled:!0},"_1yep5z61mp"],[{isInline:!1,isDisabled:!0},"_1yep5z61mr"]]}),Ld="_1i0ytqa0",qr=z({defaultClassName:"_1i0ytqab _1yep5z63r _1yep5z63s _1yep5z63t _1yep5z61f _1yep5z61g _1yep5z61h _1yep5z63 _1yep5z64 _1yep5z65 _1yep5z62f _1yep5z62g _1yep5z62h _1yep5z6i0 _1yep5z6i1 _1yep5z6i2 _1yep5z6jl _1yep5z6jm _1yep5z6jn _1yep5z6kv",variantClassNames:{isInline:{false:"_1yep5z6115"},isDisabled:{true:"_1i0ytqad _1yep5z6yl"}},defaultVariants:{},compoundVariants:[]}),Md=z({defaultClassName:"_1i0ytqa1 _1yep5z63 _1yep5z64 _1yep5z65 _1yep5z62f _1yep5z62g _1yep5z62h _1yep5z6i0 _1yep5z6i1 _1yep5z6i2 _1yep5z6i9 _1yep5z6ia _1yep5z6ib _1yep5z6jr _1yep5z6js _1yep5z6jt _1yep5z6ir _1yep5z6is _1yep5z6it _1yep5z6kv",variantClassNames:{isInline:{false:"_1yep5z63r _1yep5z63s _1yep5z63t _1yep5z619 _1yep5z61a _1yep5z61b"}},defaultVariants:{},compoundVariants:[]});function Bd({line:e,options:t}){let o=useRef([]),r=useMemo(()=>{let a=Math.ceil(e.length/jo),n;for(let s=0;s<a;s++)if(!(!(s===a-1)&&!!o.current[s])){let l=e.slice(s*jo-(s>0?1:0),s*jo+jo);n=getSvgPathFromStroke(getStroke(l.map(([c,u,m])=>({x:c,y:u,pressure:m})),t)),l.length>=(s>0?jo+1:jo)&&(o.current[s]=n);}return n},[e,t]);return [...o.current,r]}var jo=60*3;var zh={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},Ed=no.forwardRef(({className:e,style:t,canvasClassName:o,canvasStyle:r,isBound:a=!0,strokeWidth:n=2,strokeColor:s="#3A87FD",onChange:i,defaultValue:p,onChangeEnd:l,enableHistory:c=!1,isInline:u=!0,isDisabled:m,placeholder:d,clearLabel:f,undoLabel:y,redoLabel:b,footerClassName:_,canvasRef:v,value:g,footerStyle:h,"data-block-id":w,"data-block-class":x,"aria-label":k="Drawing canvas",description:P="This is a canvas for drawing using a mouse or touch input.",...R},T)=>{let N=F(Td),S=no.useRef(null),[I,C]=no.useState(g||p||[]),B=no.useMemo(()=>({...zh,...R}),[R]),[O,E]=no.useState(),G=useId(),{labelProps:V,fieldProps:K}=useLabel({...R,"aria-label":k,labelElementType:"span"}),{isFocusVisible:A,focusProps:Q}=useFocusRing({within:!0}),{hoverProps:H,isHovered:X}=useHover({isDisabled:m}),{undo:le,redo:_e,canRedo:he,canUndo:xe,push:Ce}=Ci(I,{onAction:W=>{W&&(C(W),l?.(W));},isDisabled:!c}),{keyboardProps:Ee}=useKeyboard({onKeyDown:W=>{W.key==="Backspace"?qt():W.key==="z"&&(W.metaKey||W.ctrlKey)&&(W.shiftKey?he&&_e():xe&&le());}}),[ee,de]=useState(!1),Jo=useCallback(W=>{let U=W.currentTarget.getBoundingClientRect();E(U),W.target.setPointerCapture(W.pointerId);let pe=[W.clientX-U.x,W.clientY-U.y,W.pressure];C(Y=>[...Y,[pe]]),de(!0);},[]),Je=useCallback(W=>{if(W.buttons!==1||!O)return;let pe=Od(W.nativeEvent).map(Y=>[a?clamp(Y.clientX-O.left,0,O.width):Y.clientX-O.left,a?clamp(Y.clientY-O.top,0,O.height):Y.clientY-O.top,Y.pressure]);C(Y=>{let ze=[...Y];return ze[Y.length-1]=[...ze[Y.length-1],...pe],ze});},[O,a]),ua=()=>{O&&(l?.(I),Ce(I),de(!1));};useEffect(()=>{i?.(I);},[I,i]);let qt=()=>{C([]),i?.([]),Ce([]);};return jsxs("div",{ref:L(S,T),className:classNames(Ld,"BaselineUI-FreehandCanvas",e),style:t,"aria-disabled":m,"data-block-id":w,"data-block-class":x,children:[R.label||c?jsxs("div",{className:Md({isInline:u}),children:[R.label?jsx(J,{type:"label",size:"sm",...V,children:R.label}):jsx("span",{}),c?jsxs("div",{children:[jsx(D,{variant:"secondary",size:"sm",isDisabled:!xe||m,icon:UndoIcon,onPress:le,"aria-label":y||N.formatMessage("undo")}),jsx(D,{variant:"secondary",size:"sm",isDisabled:!he||m,icon:RedoIcon,onPress:_e,"aria-label":b||N.formatMessage("redo")})]}):null]}):null,jsxs("div",{role:"application",...mergeProps(Q,Ee,H,K),tabIndex:m?void 0:0,className:classNames($r({isInline:u,isHovered:X}),Sd({isFocusVisible:A,isInline:u,isDisabled:!!m}),o),"aria-describedby":R["aria-describedby"]||G,style:r,ref:v,children:[jsx(VisuallyHidden,{children:jsx("div",{id:G,children:P})}),jsx("svg",{width:r?.width||"100%",height:r?.height||"100%",onPointerDown:Jo,onPointerMove:Je,onPointerUp:ua,children:(g||I).map((W,U,pe)=>U<pe.length-1||!ee?jsx(Fd,{line:W,options:B,strokeColor:s,strokeWidth:n},U):jsx(Hd,{line:W,options:B,strokeColor:s,strokeWidth:n},U))})]}),d||f?jsx("div",{style:h,className:classNames(qr({isInline:u,isDisabled:m}),_),children:(I.length||!d)&&f?jsx($,{size:"sm",variant:"ghost",label:f,isDisabled:m,onPress:qt}):jsx($,{size:"sm",variant:"ghost",label:d,isDisabled:!0})}):null]})});Ed.displayName="FreehandCanvas";var Fd=no.memo(({line:e,options:t,strokeColor:o,strokeWidth:r})=>{let a=useMemo(()=>getSvgPathFromStroke(getStroke(e.map(([n,s,i])=>({x:n,y:s,pressure:i})),t)),[e,t]);return jsx("path",{d:a,stroke:o,strokeWidth:r})});Fd.displayName="Stroke";var Hd=no.memo(({line:e,options:t,strokeColor:o,strokeWidth:r})=>{let a=Bd({line:e,options:t});return jsx(Fragment,{children:a.map((n,s)=>jsx("path",{d:n,stroke:o,strokeWidth:r},s))})});Hd.displayName="SplitStroke";function Od(e){if(typeof e.getCoalescedEvents=="function"){let t=e.getCoalescedEvents();return t.length>0?t.flatMap(o=>Od(o)):[e]}return [e]}var Vd="_1vac7ws0",Ad=z({defaultClassName:"_1vac7ws1",variantClassNames:{isDragging:{true:"_1vac7ws2"}},defaultVariants:{},compoundVariants:[]});function $d(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 Ud(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 Fh=makeMoveable([Draggable,Resizable,Rotatable,Snappable]),Kd=no.forwardRef(({className:e,children:t,isRotatable:o,isResizable:r,isDraggable:a,style:n,onTransform:s,onTransformStart:i,onTransformEnd:p,onDoubleClick:l,onDragStart:c,onDragEnd:u,onDrag:m,onResizeStart:d,onResizeEnd:f,onResize:y,onRotateStart:b,onRotateEnd:_,onRotate:v,onSnap:g,isSnappable:h,elementGuidelines:w,hideAnchorOnDrag:x=!0,title:k,rotationPosition:P,autoUpdate:R,bound:T,snapRotationDegrees:N,snapRotationThreshold:S,scrollableAncestor:I,renderDirections:C,stopPropagation:B,transformOrigin:O,preventDefault:E},G)=>{let V=useRef(null),K=useRef(null),[A,Q]=useState(document),H=useRef(A.createElement("div")),[X,le]=useState({}),[_e,he]=useState(!1),[xe,Ce]=useState(!1),[Ee,ee]=useState(),de=$d(w,A);useLayoutEffect(()=>{let U=H.current;return H.current=A.createElement("div"),()=>{U.remove();}},[A]);let{keyboardProps:Jo}=useKeyboard({onKeyDown:U=>{let pe=U.shiftKey?10:1,Y=U.metaKey||U.ctrlKey;Y&&U.shiftKey&&(pe=45);function ze(et,Tf="x"){Y?K.current?.request("rotatable",{deltaRotate:et*pe},!0):K.current?.request("draggable",Tf==="x"?{deltaX:et*pe}:{deltaY:et*pe},!0);}switch(U.key){case"ArrowRight":{ze(1);break}case"ArrowLeft":{ze(-1);break}case"ArrowUp":{ze(-1,"y");break}case"ArrowDown":ze(1,"y");}requestAnimationFrame(()=>{K.current?.updateRect();});}});useEffect(()=>{let U=fe(V.current);Q(U);let pe=H.current;U.body.append(H.current);function Y(et){Ce(et.shiftKey);}function ze(){Ce(!1);}return U.addEventListener("keydown",Y),U.addEventListener("keyup",ze),()=>{U.removeEventListener("keydown",Y),U.removeEventListener("keyup",ze),pe.remove();}},[]),Ud({scrollable:I,onScroll:()=>{K.current?.updateRect();},ownerDocument:A});let Je=useCallback(U=>{le(pe=>({...pe,...U.style})),s?.(U);},[s]),ua=useCallback(U=>{if(he(!0),V.current?.focus(),T){let Y=getHTMLElement(T,A)?.getBoundingClientRect();ee({position:"client",left:Y?.left??0,top:Y?.top??0,right:Y?.right??0,bottom:Y?.bottom??0});}c?.(U);},[T,A,c]),qt=useCallback(U=>{he(!1),u?.(U);},[u]),W=t({style:{...X.width&&{width:X.width},...X.height&&{height:X.height}}});return jsxs(Fragment,{children:[jsx("div",{role:"button",...Jo,ref:L(V,G),style:{display:"inline-block",...n,...X},className:classNames(Vd,e),onDoubleClick:l,tabIndex:0,title:k,children:W}),createPortal(jsx(Fh,{ref:K,target:V,draggable:a,resizable:r,rotatable:o,keepRatio:xe,throttleDrag:1,snappable:h||!!T,elementGuidelines:de,snapRenderThreshold:.9,className:Ad({isDragging:_e&&x}),onRender:Je,onDragStart:ua,onDragEnd:qt,useResizeObserver:R,useMutationObserver:R,onRenderEnd:p,onDrag:m,onResizeStart:d,onResizeEnd:f,onResize:y,onRotateStart:b,onRotateEnd:_,onRotate:v,onRenderStart:i,onSnap:g,rotationPosition:P,bounds:Ee,snapRotationDegrees:N,snapRotationThreshold:S,renderDirections:C,stopPropagation:B,preventDefault:E,transformOrigin:O}),H.current)]})});Kd.displayName="Transform";var Gd={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 Yd=no.forwardRef(({className:e,style:t,isInline:o=!0,accept:r="image/*",defaultImageSrc:a,imageSrc:n,imageAlt:s,pickerButtonLabel:i,isDisabled:p,onDrop:l,onPaste:c,includeCheckeredBackground:u=!0,"data-block-id":m,"data-block-class":d,pickerButtonStyle:f,pickerButtonClassName:y,footerClassName:b,footerStyle:_,clearLabel:v,placeholder:g,labelStyle:h,labelClassName:w,...x},k)=>{let P=no.useRef(null),R=no.useRef(null),{formatMessage:T}=F(Gd),[N,S]=useControlledState(n,a||null,ee=>{invariant(typeof ee!="string"),x.onValueChange?.(ee?[ee]:[]);}),I=useMemo(()=>Zh(N||void 0),[N]),{fieldProps:C,labelProps:B}=useField(x),{dropProps:O,isDropTarget:E}=useDrop({ref:P,onDrop:async ee=>{if(p)return;let de=await Za({items:ee.items});de.length&&S(de[0]),l?.(ee);},...x}),{clipboardProps:G}=useClipboard({onPaste:async ee=>{if(p)return;let de=await Za({items:ee});de.length&&S(de[0]),c?.(ee);},...x}),V=()=>{S(null),R.current&&(R.current.value="");},K={type:"file",onChange:ee=>{let de=[...ee.target.files];S(de[0]),x.onChange?.(ee);},accept:r,disabled:p},{focusProps:A,isFocused:Q,isFocusVisible:H}=useFocusRing({within:!0}),{hoverProps:X,isHovered:le}=useHover({isDisabled:p}),{imgProps:_e,isLoading:he,isLoaded:xe}=vo({src:I,alt:s||""}),Ce={label:i||T("selectImage"),onPress:()=>P.current?.click(),variant:"secondary",isDisabled:p,excludeFromTabOrder:!0,className:classNames(er({isFocusVisible:H}),{[Nd]:E&&!p},y),style:f},Ee=filterTruthyValues({"data-loaded":xe,"data-block-id":m,"data-block-class":d,"data-hovered":le,"data-focused":Q,"data-drop-target":E,"data-disabled":p,"data-focus-visible":H});return jsxs(M,{...Ee,className:classNames("BaselineUI-ImageDropZone",e),display:"flex",flexDirection:"column",alignItems:"center",style:t,ref:k,children:[jsxs("label",{...mergeProps(O,X,A,B),className:classNames($r({isInline:o,isHovered:le,isDisabled:p,hasLoadedImage:!!I&&xe,showFocusRing:E||!!I&&H}),w),style:h,ref:P,children:[jsx(VisuallyHidden,{children:jsx("input",{...mergeProps(C,G,K),ref:R})}),!I&&jsx($,{...Ce}),!!I&&(he?jsx(Bo,{}):jsx("img",{className:Ur({isInline:o,isDisabled:p,hasLoadedImage:!!I&&xe&&u}),..._e}))]}),g||v?jsx("div",{style:_,className:classNames(qr({isInline:o,isDisabled:p}),b),children:(I||!g)&&v?jsx($,{size:"sm",variant:"ghost",label:v,isDisabled:p,onPress:V}):jsx($,{size:"sm",variant:"ghost",label:g,isDisabled:!0})}):null]})});Yd.displayName="ImageDropZone";function Zh(e){return e instanceof File?URL.createObjectURL(e):e}var Zd="_1vm2oh49 _1yep5z6ho _1yep5z6hp _1yep5z6hq _1yep5z6fv",Dn="_1vm2oh48 _1yep5z6kw _1yep5z6i0 _1yep5z6i1 _1yep5z6i2 _1yep5z6ir _1yep5z6is _1yep5z6it _1yep5z6jl _1yep5z6jm _1yep5z6jn _1yep5z6jc _1yep5z6jd _1yep5z6je",Qd=z({defaultClassName:"_1vm2oh40 mnnh5s1 _1yep5z6i0 _1yep5z6i1 _1yep5z6i2 _1yep5z6l1 _1yep5z6kz _1yep5z6hk _1yep5z6l2 _1yep5z6ir _1yep5z6is _1yep5z6it _1yep5z6ki _1yep5z6kx _1yep5z6hl _1yep5z6hm _1yep5z6hn",variantClassNames:{accent:{theme:"_1vm2oh41",positive:"_1vm2oh42"},isInline:{true:"mnnh5s2 _1yep5z6vt _1yep5z6vu _1yep5z6vv _1yep5z6wh _1yep5z6wi _1yep5z6wj _1yep5z6x5 _1yep5z6x6 _1yep5z6x7 _1yep5z6xt _1yep5z6xu _1yep5z6xv _1yep5z6121 _1yep5z616i _1yep5z616k",false:"_1yep5z611g"},isFocusVisible:{true:"_1yep5z6126 _1yep5z616c _1yep5z616a _1yep5z612n _1yep5z616d"},isDisabled:{true:"mnnh5s8 z9nup83 _1yep5z6yl"},isHovered:{true:"_1vm2oh47"}},defaultVariants:{},compoundVariants:[[{accent:"positive",isInline:!0},"_1yep5z61mp"],[{accent:"theme",isInline:!0},"_1yep5z61me"],[{accent:"positive",isInline:!1},"_1yep5z61mr"],[{accent:"theme",isInline:!1},"_1yep5z61mg"],[{isFocusVisible:!0,isInline:!0},"_1yep5z61ny _1yep5z61rl _1yep5z61rn _1yep5z61ro"],[{isHovered:!0,isInline:!0},"_1yep5z61ro _1yep5z61ny _1yep5z61rl _1yep5z61rn"],[{isHovered:!0,isInline:!1,accent:"positive"},"_1yep5z61mq"],[{isHovered:!0,isInline:!1,accent:"theme"},"_1yep5z61mi"],[{isHovered:!0,isInline:!0,accent:"theme"},"_1yep5z61mf"]]});var om=no.forwardRef(({className:e,style:t,isDisabled:o,isInline:r=!0,imageAlt:a,imageSrc:n,svgSrc:s,textValue:i,textStyle:p,onPress:l,onDelete:c,deleteAriaLabel:u,addAriaLabel:m,accent:d="positive","data-block-id":f,"data-block-class":y,...b},_)=>{let{focusProps:v,isFocused:g,isFocusVisible:h}=useFocusRing({within:!0}),{isHovered:w,hoverProps:x}=useHover({isDisabled:o}),{pressProps:k}=usePress({isDisabled:o,onPress:l});invariant(n||s||i,"Preview must have content. You must provide either an `imageSrc`, `svgSrc`, or `textValue` prop.");let P=filterTruthyValues({"data-hovered":w,"data-focus-visible":h,"data-focused":g,"data-disabled":o});return jsxs("div",{...b,className:classNames(Qd({isInline:r,isFocusVisible:h,isDisabled:o,isHovered:w,accent:d}),"BaselineUI-Preview",e),"data-block-id":f,"data-block-class":y,"aria-label":b["aria-label"]||a||i,style:t,ref:_,children:[typeof s=="string"?jsx("button",{disabled:o,...mergeProps(x,v,k,P),className:Dn,"aria-label":m,dangerouslySetInnerHTML:{__html:s}}):jsxs("button",{...mergeProps(x,v,k,P),disabled:o,style:p,"aria-label":m,className:Dn,children:[n?jsx("img",{src:n,alt:a,className:Ur({isInline:r,isDisabled:o})}):null,!!s&&typeof s=="object"&&s,i]}),c?jsx(D,{isDisabled:o,className:Zd,"aria-label":u,size:"xs",icon:TrashIcon,onPress:c}):null]})});om.displayName="Preview";var tm="_1yep5z6i0 _1yep5z6i1 _1yep5z6i2 _1yep5z6ic _1yep5z6id _1yep5z6ie _1yep5z69c _1yep5z69d _1yep5z69e",rm=z({defaultClassName:"cw3m0n8 _1yep5z6ew _1yep5z6dv",variantClassNames:{isDisabled:{true:"_1yep5z6109"}},defaultVariants:{},compoundVariants:[]}),am="cw3m0n7",nm=z({defaultClassName:"cw3m0n0 _1yep5z6i0 _1yep5z6i1 _1yep5z6i2 _1yep5z6ir _1yep5z6is _1yep5z6it _1yep5z6i9 _1yep5z6ia _1yep5z6ib",variantClassNames:{labelPosition:{end:"_1yep5z613k _1yep5z613l _1yep5z613m _1yep5z6ut _1yep5z6uu _1yep5z6uv",start:"_1yep5z613q _1yep5z613r _1yep5z613s _1yep5z6152 _1yep5z6153 _1yep5z6154"}},defaultVariants:{},compoundVariants:[]}),sm="_1yep5z6ai _1yep5z6aj _1yep5z6ak _1yep5z6b6 _1yep5z6b7 _1yep5z6b8 _1yep5z6bu _1yep5z6bv _1yep5z6bw _1yep5z6ci _1yep5z6cj _1yep5z6ck _1yep5z6i0 _1yep5z6i1 _1yep5z6i2 _1yep5z6ic _1yep5z6id _1yep5z6ie _1yep5z69i _1yep5z69j _1yep5z69k _1yep5z6ks",im=z({defaultClassName:"cw3m0n3 _16vugd05",variantClassNames:{isFocusVisible:{true:"_16vugd08"},isSelected:{true:"_16vugd07"},isDisabled:{true:"_16vugd0a"}},defaultVariants:{},compoundVariants:[]});var fx=({label:e,description:t},{isSelected:o,isFocusVisible:r,isDisabled:a,optionLabelPosition:n})=>jsxs("div",{className:nm({labelPosition:n}),children:[jsx("div",{className:im({isSelected:o,isFocusVisible:r,isDisabled:a}),children:o?jsx("div",{className:am}):null}),e?jsxs("div",{className:tm,children:[jsx("span",{className:Cr({isDisabled:a}),children:e}),t?jsx("span",{className:rm({isDisabled:a}),children:t}):null]}):null]}),lm=({state:e,renderOption:t=fx,item:o,optionLabelPosition:r="end",optionStyle:a,optionClassName:n,isReadOnly:s,...i})=>{let p=!!i.isDisabled||!!i.disabledValues?.includes(o.id),l=no.useRef(null),{inputProps:c,isPressed:u,isSelected:m}=useRadio({...i,isDisabled:p,children:o.label,value:o.id},e,l),{focusProps:d,isFocusVisible:f,isFocused:y}=useFocusRing(),{isHovered:b}=useHover({isDisabled:p}),_=filterTruthyValues({"data-selected":m,"data-focused":y,"data-focus-visible":f,"data-hovered":b,"data-disabled":p,"data-pressed":u,"data-read-only":s});return jsxs("label",{..._,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:s})]})};var pm=no.forwardRef(({className:e,style:t,optionsContainerClassName:o,optionsContainerStyle:r,items:a,labelPosition:n="top",renderOption:s,"aria-label":i,"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:_,descriptionProps:v,errorMessageProps:g}=useRadioGroup({...d,"aria-label":i,"aria-labelledby":p,"aria-describedby":l,"aria-details":c},y),h=Pe({...d,descriptionProps:v,errorMessageProps:g,labelPosition:n}),w=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,w),className:classNames(Oe({labelPosition:n}),"BaselineUI-RadioGroup",e),style:t,ref:f,children:[d.label||h?jsxs("div",{className:He({labelPosition:n,hasMessage:!!h}),children:[jsx("span",{..._,className:classNames(Fe,"BaselineUI-RadioGroup-Label"),children:d.label}),n==="start"&&h]}):null,jsxs("div",{className:classNames({[ho]:d.isDisabled}),children:[jsx("div",{className:classNames(sm,o),style:r,children:a.map(x=>jsx(lm,{state:y,renderOption:s,item:x,...d,value:x.id},x.id))}),n==="top"&&h]})]})});pm.displayName="RadioGroup";var cm=({id:e,defaultMessage:t,elementType:o=Fragment$1})=>{invariant(e||t,"`id` or `defaultMessage` is required.");let r=F();return jsx(o,{children:r.formatMessage(e)||t})};cm.displayName="MessageFormat";var dm=no.forwardRef(({className:e,style:t,children:o,"data-block-id":r,"data-block-class":a,role:n="group",isDisabled:s,...i},p)=>{let{hoverProps:l,isHovered:c}=useHover({isDisabled:s});return jsx("div",{...l,role:n,"data-hovered":c,"data-disabled":s,"data-block-id":r,"data-block-class":a,className:e,style:t,...i,ref:p,children:o})});dm.displayName="Group";var Vn="UNSUPPORTED_IN_MENU";function fm(e){return useMemo(()=>no.Children.toArray(e).map(t=>{let o=t,r=uniqueId("item"),a=St(o,Ne),n=um(o),s,i;if(a){let _=St(a,Se);invariant(_),s=um(_),i=St(a,we).props.children;}else n?s=n:s=o;let{onPress:p,label:l,"aria-label":c,iconStart:u,isDisabled:m,icon:d}=s.props,f=l||c||Vn;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:i,isDisabled:m},key:y},o)}),[e])}function St(e,t){return t?flatMapDeep(no.Children.toArray(e),r=>no.isValidElement(r)&&r.props.children?[r,...no.Children.toArray(r.props.children)]:[r]).find(r=>no.isValidElement(r)&&r.type===t):void 0}function um(e){return St(e,$)||St(e,D)}var ym="_1yep5z6i0 _1yep5z6i1 _1yep5z6i2 _1yep5z6hl _1yep5z6hm _1yep5z6hn _1yep5z6kv _1yep5z6i9 _1yep5z6ia _1yep5z6ib _1yep5z6kn",bm={horizontal:"xvr3wn0",vertical:"xvr3wn1"};var jn=no.forwardRef(({className:e,style:t,children:o,collapsibleMenuProps:r,"data-block-id":a,"data-block-class":n,renderSpacer:s,onKeyDown:i,...p},l)=>{let{formatMessage:c}=F(),[u,m]=useState(),d=fm(o),f=useListState({...p,children:d}),y=te(l),b=useRef(null),[{visibleItems:_,isMeasuring:v},g]=ya({visibleItems:f.collection.size,isMeasuring:!1}),h=useCallback(()=>{let S=I=>{if(b.current&&y.current){let C=[...b.current.children],B=y.current.getBoundingClientRect().width,O=I<f.collection.size,E=0,G=0;if(O){let V=C.pop();V&&(E+=zm(V,!1,!0));}for(let[V,K]of C.entries())if(E+=zm(K,V===0,V===C.length-1),Math.round(E)<=Math.round(B))G++;else break;return G}return I};g(function*(){yield {visibleItems:f.collection.size,isMeasuring:!0};let I=S(f.collection.size),C=I<f.collection.size&&I>0;yield {visibleItems:I,isMeasuring:C},C&&(yield {visibleItems:S(I),isMeasuring:!1});});},[g,y,f.collection.size]),w=useMemo(()=>({get current(){return y.current?.parentElement}}),[y]);za({ref:w,onResize:h}),Te(h,[f.collection,h]);let{toolbarProps:x}=useToolbar(p,y),k=[...f.collection],P=k.slice(0,_),R=k.slice(_).filter(S=>S.textValue!==Vn),T=R.length>0;useEffect(()=>{m(void 0);},[R.length]),useEffect(()=>{p.orientation==="vertical"&&console.warn("Toolbar: Vertical orientation is not supported when `isCollapsible` is true.");},[p.orientation]);let{keyboardProps:N}=useKeyboard({onKeyDown:i});return jsxs(FocusScope,{children:[jsx("div",{...mergeProps(x,N),className:e,"data-block-id":a,"data-block-class":n,"data-collapse":!0,style:{...t,flexBasis:v?"100%":void 0},ref:y,children:jsxs("div",{ref:b,className:ym,children:[P.map(S=>S.rendered),T?jsxs(Fragment,{children:[!v&&s?jsx(M,{flexGrow:1}):null,jsx(gr,{placement:"bottom end",renderTrigger:({buttonProps:S,ref:I})=>jsx(D,{...S,size:"md",icon:MoreIcon,"aria-label":c(Ax.more),variant:"toolbar",ref:I}),...r,disabledKeys:R.filter(S=>S.props?.isDisabled).map(S=>S.key),items:R.map(S=>{let I=S.textValue||S["aria-label"];return invariant(I,"ActionItem must have a label"),{id:S.key,label:I,icon:S.props.icon}}),onAction:S=>{let I=f.collection.getItem(S);invariant(I,"Item not found");let{onPress:C,dialogContent:B}=I.props;C?.(),m(B);}})]}):null]})}),jsx(ke,{isOpen:!!u,onOpenChange:S=>{S||m(void 0);},children:jsx(Me,{enableDrawer:"auto",style:{zIndex:1e5},children:u?no.cloneElement(u,{inheritDrawer:!0}):null})})]})});jn.displayName="CollapsibleToolbar";function zm(e,t,o){let a=oe(e).getComputedStyle(e);return e.getBoundingClientRect().width+(t?0:hm(a.marginLeft))+(o?0:hm(a.marginRight))}function hm(e){let t=Number.parseInt(e,10);return Number.isNaN(t)?0:t}var Ax=q({more:{id:"more",defaultMessage:"More"}});var $n=no.forwardRef(({className:e,style:t,"data-block-id":o,"data-block-class":r,"aria-controls":a,onKeyDown:n,...s},i)=>{let p=no.useRef(null),{toolbarProps:l}=useToolbar(s,p),{keyboardProps:c}=useKeyboard({onKeyDown:n});return jsx("div",{...mergeProps(l,c),"aria-controls":a,className:classNames(bm[s.orientation||"horizontal"],"BaselineUI-Toolbar",e),style:t,"data-block-id":o,"data-block-class":r,ref:L(i,p),children:s.children})});$n.displayName="WrappedToolbar";var Xr=no.forwardRef((e,t)=>{let o=e.isCollapsible?jn:$n;return jsx(o,{...e,ref:t})});Xr.displayName="Toolbar";var Cm=z({defaultClassName:"_1j5skr71",variantClassNames:{size:{xxs:"_1j5skr72",xs:"_1j5skr73",sm:"_1j5skr74",md:"_1j5skr75",lg:"_1j5skr76"}},defaultVariants:{},compoundVariants:[]}),Pm=z({defaultClassName:"_1j5skr70 _1yep5z6ir _1yep5z6is _1yep5z6it _1yep5z6kx _1yep5z6ky _1yep5z6ks _1yep5z6i3 _1yep5z6i4 _1yep5z6i5 _1yep5z6i9 _1yep5z6ia _1yep5z6ib _1yep5z6jl _1yep5z6jm _1yep5z6jn _1yep5z6ai _1yep5z6aj _1yep5z6ak _1yep5z6b6 _1yep5z6b7 _1yep5z6b8 _1yep5z6bu _1yep5z6bv _1yep5z6bw _1yep5z6ci _1yep5z6cj _1yep5z6ck _1yep5z6fs _1yep5z6f0",variantClassNames:{isHovered:{true:"_1j5skr7g"},isFocusVisible:{true:"_1j5skr7h"},isDisabled:{true:"z9nup83 _1yep5z610d"},isSelected:{true:"_1j5skr7j"}},defaultVariants:{},compoundVariants:[[{isSelected:!0,isDisabled:!0},"_1yep5z61ro _1yep5z61rn _1yep5z61rl _1yep5z61o5 _1yep5z61lo"],[{isSelected:!1,isHovered:!0,isDisabled:!1},"_1yep5z6fu"],[{isSelected:!1,isFocusVisible:!0,isDisabled:!1},"_1yep5z61ro _1yep5z61rn _1yep5z61ny _1yep5z61rl"],[{isSelected:!0,isFocusVisible:!0,isDisabled:!1},"_1j5skr7k _1yep5z61rm _1yep5z61rl _1yep5z61nz _1yep5z61lp"],[{isSelected:!0,isFocusVisible:!1,isDisabled:!1},"_1yep5z61rl _1yep5z61rn _1yep5z61ny _1yep5z61ro"]]}),km=z({defaultClassName:"_1j5skr70 _1yep5z6ir _1yep5z6is _1yep5z6it _1yep5z6kx _1yep5z6ky _1yep5z6ks _1yep5z6i3 _1yep5z6i4 _1yep5z6i5 _1yep5z6i9 _1yep5z6ia _1yep5z6ib _1yep5z6jl _1yep5z6jm _1yep5z6jn _1yep5z6ai _1yep5z6aj _1yep5z6ak _1yep5z6b6 _1yep5z6b7 _1yep5z6b8 _1yep5z6bu _1yep5z6bv _1yep5z6bw _1yep5z6ci _1yep5z6cj _1yep5z6ck _1yep5z6f0",variantClassNames:{isHovered:{true:"_1j5skr7m"},isFocusVisible:{true:"_1yep5z616d _1yep5z616c _1yep5z612n _1yep5z616a"},isSelected:{true:"_1yep5z610c"},isDisabled:{true:"z9nup83 _1yep5z610d"}},defaultVariants:{},compoundVariants:[[{isSelected:!1,isHovered:!0},"_1yep5z61ln"]]}),wm=z({defaultClassName:"_1j5skr70 _1yep5z6ir _1yep5z6is _1yep5z6it _1yep5z6kx _1yep5z6ky _1yep5z6ks _1yep5z6i3 _1yep5z6i4 _1yep5z6i5 _1yep5z6i9 _1yep5z6ia _1yep5z6ib _1yep5z6jl _1yep5z6jm _1yep5z6jn _1yep5z6ai _1yep5z6aj _1yep5z6ak _1yep5z6b6 _1yep5z6b7 _1yep5z6b8 _1yep5z6bu _1yep5z6bv _1yep5z6bw _1yep5z6ci _1yep5z6cj _1yep5z6ck _1yep5z6f0",variantClassNames:{isHovered:{true:"_1j5skr7r"},isFocusVisible:{true:"_1yep5z616d _1yep5z616c _1yep5z612n _1yep5z616a"},isSelected:{true:"_1j5skr7t"},isDisabled:{true:"z9nup83 _1yep5z610d"}},defaultVariants:{},compoundVariants:[[{isSelected:!1,isHovered:!0},"_1yep5z61mg"],[{isSelected:!0,isDisabled:!1},"_1yep5z61mg _1yep5z61lq"],[{isSelected:!0,isDisabled:!0},"_1yep5z61mg _1yep5z61lo"]]}),Rm=z({defaultClassName:"_1j5skr77 _1j5skr70 _1yep5z6ir _1yep5z6is _1yep5z6it _1yep5z6kx _1yep5z6ky _1yep5z6ks _1yep5z6i3 _1yep5z6i4 _1yep5z6i5 _1yep5z6i9 _1yep5z6ia _1yep5z6ib _1yep5z6jl _1yep5z6jm _1yep5z6jn _1yep5z6f0",variantClassNames:{isHovered:{true:"_1j5skr78"},isFocusVisible:{true:"_1j5skr79"},isSelected:{true:"_1j5skr7a"},isDisabled:{true:"_1j5skr7b z9nup83 _1yep5z610e"}},defaultVariants:{},compoundVariants:[[{isSelected:!0,isDisabled:!1},"_1j5skr7c _1yep5z61lp"],[{isSelected:!1,isDisabled:!0},"_1j5skr7d _1yep5z61lo"],[{isSelected:!1,isHovered:!0},"_1yep5z61mg"],[{isSelected:!1,isFocusVisible:!0},"_1yep5z61ro _1yep5z61rn _1yep5z61ny _1yep5z61rl"],[{isSelected:!0,isFocusVisible:!0},"_1j5skr7e _1yep5z61rm _1yep5z61rl _1yep5z61nz"]]});var rC={xxs:8,xs:12,sm:16,md:20,lg:24},Ie=no.forwardRef((e,t)=>{let o=te(t),{tooltipProps:r}=Zt(e,o);return r?jsx(re,{...r,children:jsx(Un,{...e,ref:t})}):jsx(Un,{...e,ref:t})});Ie.displayName="ToggleIconButton";var Un=no.forwardRef(({className:e,style:t,icon:o,size:r="md",variant:a="primary","data-block-id":n,"data-block-class":s,...i},p)=>{let l=useToggleState(i),{buttonProps:c,isPressed:u,ref:m}=Jt(i,l),{hoverProps:d,isHovered:f}=useHover({isDisabled:i.isDisabled}),{isFocusVisible:y,isFocused:b,focusProps:_}=useFocusRing(),v=useMemo(()=>typeof o=="function"?o:l.isSelected?o.selected:o.unselected,[o,l.isSelected]),g={isSelected:l.isSelected,isHovered:f,isFocusVisible:y,isDisabled:!!i.isDisabled},h=filterTruthyValues({"data-hovered":f,"data-selected":l.isSelected,"data-focus-visible":y,"data-disabled":i.isDisabled,"data-block-id":n,"data-block-class":s,"data-focused":b,"data-pressed":u});return jsx("button",{...mergeProps(c,d,_,h),className:classNames(a==="toolbar"&&Rm(g),a==="primary"&&Pm(g),a==="secondary"&&km(g),a==="tertiary"&&wm(g),Cm({size:r}),"BaselineUI-ToggleIconButton",e),style:t,ref:L(m,p),children:jsx(v,{size:rC[r]})})});Un.displayName="ToggleIconButtonCore";var Tm="f6jv6bm",Nm="_1yep5z64u _1yep5z64v _1yep5z64w _1yep5z676 _1yep5z677 _1yep5z678 _1yep5z6j0 _1yep5z6j1 _1yep5z6j2",qo="_1yep5z689 _1yep5z68a _1yep5z68b _1yep5z65x _1yep5z65y _1yep5z65z",Sm=z({defaultClassName:"f6jv6b0 _1yep5z6i0 _1yep5z6i1 _1yep5z6i2 _1yep5z6fs",variantClassNames:{isInline:{true:"f6jv6b1"},isMinimal:{true:"_1yep5z613k _1yep5z613l _1yep5z613m _1yep5z6uw _1yep5z6ux _1yep5z6uy _1yep5z6142 _1yep5z6143 _1yep5z6144",false:"_1yep5z613n _1yep5z613o _1yep5z613p"}},defaultVariants:{},compoundVariants:[[{isInline:!0,isMinimal:!1},"_1yep5z61h7 _1yep5z61h8 _1yep5z61h9 _1yep5z61hv _1yep5z61hw _1yep5z61hx _1yep5z61ij _1yep5z61ik _1yep5z61il _1yep5z61j7 _1yep5z61j8 _1yep5z61j9 _1yep5z61rv _1yep5z61rt _1yep5z61nc"]]}),Yr=z({defaultClassName:"f6jv6b4 _1yep5z69 _1yep5z6a _1yep5z6b _1yep5z62l _1yep5z62m _1yep5z62n _1yep5z63r _1yep5z63s _1yep5z63t _1yep5z61f _1yep5z61g _1yep5z61h _1yep5z6e3 _1yep5z6eu _1yep5z6ky",variantClassNames:{isDisabled:{true:"f6jv6b5 _1yep5z6109"}},defaultVariants:{},compoundVariants:[]}),Lm="f6jv6bj _1yep5z6vz _1yep5z6w0 _1yep5z6w1 _1yep5z6wn _1yep5z6wo _1yep5z6wp _1yep5z6xb _1yep5z6xc _1yep5z6xd _1yep5z6xz _1yep5z6y0 _1yep5z6y1",Mm="f6jv6bk";var Bm="f6jv6bn _1yep5z63l _1yep5z63m _1yep5z63n _1yep5z619 _1yep5z61a _1yep5z61b _1yep5z6ai _1yep5z6aj _1yep5z6ak _1yep5z6b6 _1yep5z6b7 _1yep5z6b8 _1yep5z6bu _1yep5z6bv _1yep5z6bw _1yep5z6ci _1yep5z6cj _1yep5z6ck _1yep5z6i3 _1yep5z6i4 _1yep5z6i5 _1yep5z6l6 _1yep5z6l1 _1yep5z6kz _1yep5z6hc _1yep5z6eu",Dm=z({defaultClassName:"f6jv6bf _1yep5z63r _1yep5z63s _1yep5z63t _1yep5z61f _1yep5z61g _1yep5z61h _1yep5z63 _1yep5z64 _1yep5z65 _1yep5z62f _1yep5z62g _1yep5z62h _1yep5z6i0 _1yep5z6i1 _1yep5z6i2 _1yep5z6i9 _1yep5z6ia _1yep5z6ib _1yep5z6ir _1yep5z6is _1yep5z6it _1yep5z69l _1yep5z69m _1yep5z69n _1yep5z6ky _1yep5z6ki _1yep5z6kl _1yep5z6kx",variantClassNames:{isHovered:{true:"_1yep5z6115"},isDisabled:{true:"_1yep5z6yl"}},defaultVariants:{},compoundVariants:[]}),Em="f6jv6bi _1mdhlqv6 _1yep5z6al _1yep5z6am _1yep5z6an _1yep5z6b9 _1yep5z6ba _1yep5z6bb _1yep5z6bx _1yep5z6by _1yep5z6bz _1yep5z6cl _1yep5z6cm _1yep5z6cn _1yep5z6d7 _1yep5z63 _1yep5z64 _1yep5z65 _1yep5z62f _1yep5z62g _1yep5z62h _1yep5z6fs _1yep5z6l0 _1yep5z6kz _1yep5z6hf _1yep5z6l3",Fm="_1yep5z6j6 _1yep5z6j7 _1yep5z6j8",Hm="f6jv6be f6jv6ba _1yep5z6ai _1yep5z6aj _1yep5z6ak _1yep5z6b6 _1yep5z6b7 _1yep5z6b8 _1yep5z6hx _1yep5z6hy _1yep5z6hz _1yep5z6eu _1yep5z6e3 _1yep5z6kv",Om=z({defaultClassName:"f6jv6bb _1yep5z6ai _1yep5z6aj _1yep5z6ak _1yep5z6b6 _1yep5z6b7 _1yep5z6b8 _1yep5z6bu _1yep5z6bv _1yep5z6bw _1yep5z6ci _1yep5z6cj _1yep5z6ck _1yep5z6i0 _1yep5z6i1 _1yep5z6i2 _1yep5z6i9 _1yep5z6ia _1yep5z6ib _1yep5z69l _1yep5z69m _1yep5z69n _1yep5z6jc _1yep5z6jd _1yep5z6je",variantClassNames:{isInline:{true:"_1yep5z6oz _1yep5z6p0 _1yep5z6p1 _1yep5z616k _1yep5z616i _1yep5z6121",false:"_1yep5z6p2 _1yep5z6p3 _1yep5z6p4 _1yep5z6we _1yep5z6wf _1yep5z6wg _1yep5z6x2 _1yep5z6x3 _1yep5z6x4 _1yep5z6xq _1yep5z6xr _1yep5z6xs _1yep5z6ye _1yep5z6yf _1yep5z6yg"}},defaultVariants:{},compoundVariants:[]}),Vm="f6jv6bl",Am="f6jv6ba _1yep5z6ai _1yep5z6aj _1yep5z6ak _1yep5z6b6 _1yep5z6b7 _1yep5z6b8 _1yep5z6hx _1yep5z6hy _1yep5z6hz _1yep5z6eu",Zr=z({defaultClassName:"f6jv6b6",variantClassNames:{isInline:{true:"f6jv6b7",false:"f6jv6b8"}},defaultVariants:{},compoundVariants:[]}),Qr="f6jv6b9 _1yep5z6i0 _1yep5z6i1 _1yep5z6i2 _1yep5z6i9 _1yep5z6ia _1yep5z6ib _1yep5z6ir _1yep5z6is _1yep5z6it",Mt="f6jv6bo";var $m=[["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:Bt}}=layoutSprinkleValues,Um=({isOpen:e,onClose:t})=>{let{formatMessage:o}=F(),r=useId();return jsx(ke,{isOpen:e,onOpenChange:a=>{a||t();},children:jsx(Me,{enableDrawer:"auto",style:{zIndex:999999},children:jsxs(me,{"aria-labelledby":r,className:Lm,drawerBackground:"subtle",children:[jsxs(M,{paddingLeft:Bt.padding.horizontal.lg,paddingRight:Bt.padding.horizontal.sm,display:"flex",flexDirection:"row",justifyContent:"space-between",alignItems:"center",backgroundColor:"background.primary.subtle",className:Mm,children:[jsx(J,{id:r,elementType:"h3",type:"title",size:"md",children:o(Dt.help)}),jsx(D,{icon:XIcon,size:"md",variant:"secondary","aria-label":o(Dt.close),onPress:t})]}),jsx(j,{className:Vm}),jsxs(M,{paddingX:Bt.padding.horizontal.lg,role:"table","aria-labelledby":r,backgroundColor:"background.primary.subtle",children:[jsx("div",{role:"rowgroup",children:jsxs(M,{role:"row",display:"flex",flexDirection:"row",justifyContent:"space-between",alignItems:"center",paddingY:Bt.padding.vertical.md,color:"text.primary",children:[jsx("h6",{className:sprinkles({typography:"heading.h6.semibold"}),role:"columnheader",children:o(Dt.action)}),jsx("h6",{className:sprinkles({typography:"heading.h6.semibold"}),role:"columnheader",style:{textTransform:"capitalize"},children:o(Dt.shortcut)})]})}),jsx("div",{role:"rowgroup",children:$m.map(([a,n],s)=>jsxs(Fragment$1,{children:[jsxs(M,{role:"row",display:"flex",flexDirection:"row",justifyContent:"space-between",alignItems:"center",paddingY:Bt.padding.vertical.xs,style:{minHeight:40},children:[jsx(J,{type:"subtitle",size:"sm",role:"cell",children:o(Dt[camelCase(a)])}),jsx(J,{elementType:"kbd",type:"subtitle",size:"sm",role:"cell",children:getOsSpecificKeyboardShortcutLabel(n,!0)})]}),s!==$m.length-1&&jsx(j,{})]},a))})]})]})})})},Dt=q({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 Jr=no.forwardRef(({value:e,defaultValue:t,onChange:o,placeholder:r,spellCheck:a,textBoxRef:n,isInline:s,isMinimal:i,isDisabled:p,editableContentAriaLabel:l,editorHandle:c,autoFocus:u,saveOnEnter:m,onSave:d},f)=>{let y=no.useRef(null),[b,_]=useControlledState(e,t||"",o),v=useCallback(N=>{_(N.currentTarget.value||"");},[_]),g=useCallback(N=>{(m&&N.key==="Enter"&&!N.shiftKey||(N.ctrlKey||N.metaKey)&&N.key==="Enter")&&(N.preventDefault(),d());},[m,d]);useImperativeHandle(f,()=>({clear:()=>{_("");}}));let h=useCallback(N=>{N.currentTarget.style.height="16px",N.currentTarget.style.height=N.currentTarget.scrollHeight+"px";},[]);useGranularLayoutEffect(()=>{let N=y.current;N&&(N.style.height="16px",N.style.height=N.scrollHeight+"px");},[i],[b]),useImperativeHandle(c,()=>({setCaretPosition:N=>{y.current&&(y.current.focus(),y.current.setSelectionRange(N,N));},focus:()=>{y.current&&y.current.focus();}}));let{focusProps:w,isFocused:x,isFocusVisible:k}=useFocusRing(),{hoverProps:P,isHovered:R}=useHover({}),T=filterTruthyValues({"data-focus-visible":k,"data-hovered":R,"data-focused":x});return jsx("textarea",{...mergeProps(w,P,T),ref:L(y,n),className:classNames(i?Hm:[Yr(),Zr({isInline:s}),Am]),autoFocus:u,onChange:v,disabled:p,onInput:h,value:b,placeholder:r,spellCheck:a,"aria-label":l,onKeyDown:g})});Jr.displayName="PlainEditor";var Ht="mention",ea="mention_input",tu=no.forwardRef(({onCancel:e,editor:t,element:o,onSelectionChange:r},a)=>{let{containerRef:n,items:s,maxMentionableUsersSuggestions:i}=useContext(ta),p=useSelected(),[l,c]=useState(""),{contains:u}=useFilter({sensitivity:"base"}),{formatMessage:m}=F(),d=useMemo(()=>{let C=s.filter(B=>l===""||u(B.displayName,l)).map(B=>({id:B.id,label:B.displayName,data:B}));return i?take(C,i):C},[s,i,l,u]),f=useCallback(C=>jsx(Item,{children:C.label},C.id),[]),y=useCallback((C=!1)=>{let B=findNodePath(t,o);B&&(removeNodes(t,{at:B}),C&&focusEditor(t));},[t,o]),b=useComboBoxState({items:d,children:f,menuTrigger:"focus",onSelectionChange:C=>{y(!0),r?.(C);}}),_=no.useRef(null),v=no.useRef(null),g=no.useRef(null),h=no.useRef(null),w=useHTMLInputCursorState(v);useInteractOutside({ref:h,onInteractOutside:()=>{b.close();}});let{inputProps:x,listBoxProps:k}=useComboBox({defaultItems:d,inputRef:v,buttonRef:_,listBoxRef:g,popoverRef:h,menuTrigger:"focus","aria-label":m(HC.mention)},b);useEffect(()=>{v.current?.focus();},[]);let P=useCallback((C="manual",B=!1)=>{y(B),e?.(C,b.inputValue);},[e,y,b.inputValue]),R=useRef(p);useEffect(()=>{R.current&&!p&&P("deselect"),R.current=p;},[p,P]);let T=w?.atStart??!1,N=w?.atEnd??!1,S=useCallback(C=>{C.key==="Backspace"&&T?P("backspace",!0):C.key==="Escape"?P("escape",!0):C.key==="ArrowLeft"&&T?P("arrowLeft",!0):C.key==="ArrowRight"&&N&&P("arrowRight",!0);let B=Hotkeys.isUndo(C)&&t.history.undos.length>0,O=Hotkeys.isRedo(C)&&t.history.redos.length>0;(B||O)&&(C.preventDefault(),t[B?"undo":"redo"](),focusEditor(t));},[T,N,P,t]),I=useMemo(()=>{if(!CSS.supports("field-sizing","content")){let C=oe(v.current),B=v.current?C?.getComputedStyle(v.current).font:void 0;return {width:B?getTextDimensions({text:b.inputValue,font:B}).width+10:"4ch"}}},[b.inputValue]);return jsxs(eo.Provider,{value:b,children:[jsx("input",{...mergeProps(x,{onKeyDown:S,onBlur:()=>{P("blur",!0);},onChange:C=>{c(C.target.value);}}),style:I,className:Bm,ref:L(a,v)}),b.isOpen?jsx(ye,{triggerRef:n,className:Em,isNonModal:!0,ref:h,state:b,children:jsx(ie,{...k,items:void 0,autoFocus:"first",ref:g,className:sprinkles({width:"full"}),renderOption:au})}):null]})});tu.displayName="MentionInputContentElement";var Xn=withRef(({className:e,...t},o)=>{let{children:r,editor:a,element:n}=t,{items:s}=useContext(ta),i=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=i.current?.getRootNode()instanceof ShadowRoot;moveSelection(a,{unit:"offset"}),moveSelection(a,{unit:"character",distance:1}),ot()&&m&&focusEditor(a);},[a]),u=useCallback(m=>{if(!m)return;let d=i.current?.getRootNode()instanceof ShadowRoot,f=s.find(b=>b.id===m);invariant(f,"User not found");let y={type:Ht,value:f.id,displayName:f.displayName,children:[{text:""}]};insertNodes(a,[y,{text:" "}]),d?setTimeout(()=>{c();},0):c();},[a,s,c]);return jsxs(PlateElement,{as:"span","data-slate-value":n.value,contentEditable:!1,className:e,ref:o,...t,children:[jsx(tu,{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:i,element:n,editor:a}),r]})});Xn.displayName="MentionInputElement";var Yn=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]})});Yn.displayName="MentionElement";var ru=(e,{options:{trigger:t,triggerPreviousCharPattern:o,triggerQuery:r}})=>{let{insertText:a}=e,n=s=>s===t;return e.insertText=s=>{if(!e.selection||!n(s)||r&&!r(e)){a(s);return}let i=getEditorString(e,getRange(e,e.selection,getPointBefore(e,e.selection)));if(o?.test(i)){oa(e);return}a(s);},e},HC=q({mention:{defaultMessage:"Mention",id:"mention"}});function su({className:e,children:t,...o}){return jsx(PlateElement,{asChild:!0,className:e,...o,children:jsx("p",{children:t})})}function eP(e){return Object.entries(e).map(([t,o])=>`${kebabCase(t)}:${o}`).filter(([,t])=>!!t).join(";")}function oP(e){return "text"in e}function tP(e){return e.replaceAll("&","&amp;").replaceAll("<","&lt;").replaceAll(">","&gt;").replaceAll('"',"&quot;").replaceAll("'","&#039;")}function Ot(e){if(!e)return "";function t(o){if(oP(o)){let a=tP(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="${eP(filterTruthyValues({color:o.color||void 0,backgroundColor:o.backgroundColor||void 0}))}">${a}</span>`),a}let r=o.children?.map(Ot).join("");switch(o.type){case ELEMENT_PARAGRAPH:return `<p>${r}</p>`;case ELEMENT_LINK:return `<a href="${o.url}">${r}</a>`;case Ht: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 rP(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 os(e){e.startsWith("<p>")||(e=`<p>${e}</p>`);let t=new DOMParser().parseFromString(iu.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")?`
51
- `:"<p>";return pu(t.body)}function pu(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=rP(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=>pu(a,o));switch(r.length===0&&r.push(jsx$1("text",o,"")),e.nodeName.toUpperCase()){case"BR":return jsx$1("text",t,`
52
- `);case"SPAN":{let a=e.dataset.userId;return a?jsx$1("element",{type:Ht,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 cu(e){let t=findNode(e,{match:{type:getPluginType(e,ELEMENT_LINK)}}),[o]=t||[{url:""}];return o?.url}function oa(e){let t={children:[{text:" "}],type:ea};e.insertNode(t);}var aP=createPluginFactory({isElement:!0,isInline:!0,isMarkableVoid:!0,isVoid:!0,key:Ht,options:{trigger:"@",triggerPreviousCharPattern:/^$|^[\s"']$/},plugins:[{isElement:!0,isInline:!0,isVoid:!0,key:ea}],withOverrides:ru}),du=createPlugins([createParagraphPlugin({component:su}),createBoldPlugin({component:withProps(PlateLeaf,{as:"b"})}),createItalicPlugin({component:withProps(PlateLeaf,{as:"i"})}),createUnderlinePlugin({component:withProps(PlateLeaf,{as:"u"})}),createFontColorPlugin(),createFontBackgroundColorPlugin(),createLinkPlugin({component:mu}),aP({component:Yn})],{components:{[ea]:Xn}});var bu=({isDisabled:e})=>{let{formatMessage:t}=F(),o=useEditorRef();return jsxs(Ne,{type:"dialog",children:[jsx(Se,{children:jsx(D,{icon:LinkIcon,size:"sm",isDisabled:e,"aria-label":t(so.addLink),className:qo,preventFocusOnPress:!0})}),jsx(we,{className:sprinkles({boxShadow:"medium"}),placement:"top end",children:({close:r})=>jsx(me,{size:"content",style:{minWidth:240},children:jsx(mP,{close:()=>{r(),setTimeout(()=>{focusEditor(o,o.selection);},0);}})})})]})},mP=({close:e})=>{let t=useEditorRef(),{formatMessage:o}=F(),r=useEditorSelector(l=>cu(l),[]),[a,n]=no.useState(r?"show":"add"),[s,i]=no.useState(r||""),p=jsx(M,{padding:"lg",children:jsx(So,{label:o(so.link),value:s,autoFocus:!0,onChange:i,placeholder:"https://yourdomain.com"})});return jsxs(Fragment,{children:[a==="add"&&jsxs(Fragment,{children:[p,jsx(M,{display:"flex",justifyContent:"flex-end",padding:"lg",className:Tm,children:jsx($,{isDisabled:!isUrl(s,!0),label:o(so.addLink),size:"sm",onPress:()=>{upsertLink(t,{url:s,skipValidation:!0}),e?.();},preventFocusOnPress:!0})})]}),a==="show"&&jsxs(Fragment,{children:[jsx(M,{padding:"lg",children:jsx(J,{type:"subtitle",size:"sm",children:r})}),jsxs(M,{display:"flex",justifyContent:"flex-end",padding:"lg",gap:"lg",borderColor:"border.subtle",borderWidth:1,borderStyle:"solid",children:[jsx($,{label:o(so.editLink),size:"sm",variant:"secondary",onPress:()=>{n("edit");},style:{flex:1,justifyContent:"center"}}),jsx($,{label:o(so.removeLink),size:"sm",onPress:()=>{unwrapLink(t),e?.();},preventFocusOnPress:!0,style:{flex:1,justifyContent:"center"}})]})]}),a==="edit"&&jsxs(Fragment,{children:[p,jsxs(M,{display:"flex",justifyContent:"flex-end",padding:"lg",gap:"lg",borderColor:"border.subtle",borderWidth:1,borderStyle:"solid",children:[jsx($,{label:o(so.cancel),size:"sm",variant:"secondary",onPress:()=>{n("show"),e?.();}}),jsx($,{label:o(so.save),size:"sm",onPress:()=>{upsertLink(t,{url:s,skipValidation:!0}),e?.();}})]})]})]})};function mu({className:e,children:t,...o}){return jsx(PlateElement,{asChild:!0,className:e,...o,children:jsx("a",{className:vr({size:"sm"}),children:t})})}var so=q({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 fP=parseColor("#ffffff00").toString("hexa"),ts=[{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"}];[...ts,{label:"Transparent",color:fP}];var aa=({nodeType:e,icon:t,ariaLabel:o,isDisabled:r})=>{let a=useEditorSelector(s=>isMarkActive(s,e),[]),n=useEditorRef();return jsx(Ie,{variant:"tertiary",isSelected:a,size:"sm",icon:t,"aria-label":o,isDisabled:r,onPress:()=>{toggleMark(n,{key:e});},preventFocusOnPress:!0})},as=({nodeType:e,"aria-label":t,isDisabled:o})=>{let{updateColor:r,clearColor:a,color:n}=useColorDropdownMenuState({customColors:[],colors:[],nodeType:e}),s=useCallback(({ref:p,triggerProps:l})=>jsx(D,{icon:e==="color"?TextIcon$1:HighlightTextIcon,"aria-label":t,size:"md",variant:"popover",isDisabled:o,className:qo,preventFocusOnPress:!0,...l,ref:p}),[e,t,o]),i=useCallback(p=>{p?r(p.toString("rgba")):a();},[a,r]);return jsx(Ao,{presets:ts,allowRemoval:!0,pickerMode:"lazy",placement:"top end",colorLabel:!1,renderTriggerButton:s,value:n||"#000000",onChange:i,isDisabled:o})};var UP=[{type:ELEMENT_PARAGRAPH,children:[{text:""}]}],ta=no.createContext({items:[],containerRef:{current:null},maxMentionableUsersSuggestions:10}),is=no.forwardRef(({value:e,defaultValue:t,onChange:o,style:r,spellCheck:a,placeholder:n,isInline:s,isDisabled:i,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:w}=F(),x=useRef(null),k=x.current,P=useRef(null),R=useMemo(()=>k?.getRootNode()instanceof ShadowRoot,[k]),[T,N]=useControlledState(e?os(e):void 0,os(t||"<p></p>"),C=>{o&&o(Ot(C));}),{keyboardProps:S}=useKeyboard({onKeyDown:C=>{(b&&C.key==="Enter"&&!C.shiftKey||(C.ctrlKey||C.metaKey)&&C.key==="Enter")&&(C.preventDefault(),_()),C.altKey&&C.key==="F10"?(C.preventDefault(),g.current&&g.current.querySelector("button")?.focus()):C.continuePropagation(),ot()&&R&&P.current&&focusEditor(P.current);}});useEffect(()=>{i&&P.current&&deselect(P.current);},[i]),useImperativeHandle(v,()=>({startMention:()=>{P.current&&!x.current?.querySelector("input[role='combobox']")&&oa(P.current);}})),useImperativeHandle(m,()=>({setCaretPosition:C=>{P.current&&(focusEditor(P.current),moveSelection(P.current,{distance:C,unit:"character"}));},focus:()=>{P.current&&focusEditor(P.current);}}));let I=useMemo(()=>({items:u||[],containerRef:l,maxMentionableUsersSuggestions:d}),[u,l,d]);return jsx(ta.Provider,{value:I,children:jsxs(Plate,{initialValue:T||UP,plugins:du,editorRef:L(P,y||null),onChange:C=>{N(C);},children:[jsxs(Xr,{className:Qr,"aria-controls":h,ref:g,children:[jsxs(M,{display:"flex",flexDirection:"row",role:"group",gap:"xs",paddingX:"sm",children:[jsx(aa,{nodeType:MARK_BOLD,icon:BoldIcon,ariaLabel:w(Xo.bold),isDisabled:i}),jsx(aa,{nodeType:MARK_ITALIC,icon:ItalicIcon,ariaLabel:w(Xo.italic),isDisabled:i}),jsx(aa,{nodeType:MARK_UNDERLINE,icon:UnderlineIcon,ariaLabel:w(Xo.underline),isDisabled:i})]}),jsx(j,{orientation:"vertical",className:Mt}),jsx(as,{nodeType:MARK_COLOR,"aria-label":w(Xo.fontColor),isDisabled:i}),jsx(j,{orientation:"vertical",className:Mt}),jsx(as,{nodeType:MARK_BG_COLOR,"aria-label":w(Xo.backgroundColor),isDisabled:i}),jsx(j,{orientation:"vertical",className:Mt}),jsx(bu,{isDisabled:i}),jsx(j,{orientation:"vertical",className:Mt}),jsx(D,{className:qo,icon:QuestionmarkCircleIcon,size:"sm","aria-label":w(Xo.help),onPress:c})]}),jsx(j,{variant:"secondary"}),jsx("div",{...S,ref:x,children:jsx(PlateContent,{id:h,disabled:i,readOnly:i,style:r,placeholder:n,autoFocus:f,spellCheck:a,"aria-label":p,className:classNames(Yr({isDisabled:i}),Zr({isInline:s})),renderPlaceholder:({attributes:C,children:B})=>jsx("span",{...C,className:sprinkles({paddingY:"lg"}),children:B})})})]})})});is.displayName="RichEditor";var au=({key:e,value:t},{isDisabled:o,optionProps:r,isFocused:a,_state:n},s)=>{let{hoverProps:i}=useHover({isDisabled:o}),{label:p,data:l}=t;return jsxs(Fragment,{children:[jsxs("li",{...mergeProps(r,i),className:Dm({isDisabled:o,isHovered:a}),"data-active":a,ref:s,children:[jsx(Fo,{name:p,...l?.avatar}),jsxs(M,{display:"flex",flexDirection:"column",children:[jsx(J,{type:"subtitle",size:"sm",children:p}),jsx(J,{type:"helper",size:"sm",children:l?.description})]})]}),e===n.collection.getLastKey()?null:jsx(j,{})]})},Xo=q({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 xu=no.memo(no.forwardRef(({className:e,style:t,"data-block-id":o,"data-block-class":r,enableRichText:a=!1,onCancel:n,onSave:s,isInline:i=!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:_,clearOnSave:v,...g},h)=>{let w=useRef(null),{formatMessage:x}=F(),k=useRef(null),P=useRef(null),R=useRef(null),T=!a&&g.variant==="minimal",N=useRef(null),[S,I]=no.useState(g.value||g.defaultValue),C=g.isDisabled||g.isSaveDisabled||!getPlainText(S||""),{fieldProps:B}=useLabel({"aria-label":u,"aria-labelledby":d,"aria-describedby":m,"aria-details":f,labelElementType:"div"});T&&!g.avatarName&&console.warn("Editor: When using the minimal `variant` and `enableRichText` is `false`, you should provide an `avatarName`.");let O=useCallback(()=>{I(""),a?w.current?.reset():P.current?.clear();},[a]),E=useCallback(()=>{C||(s?.(a?Ot(w.current?.children):k.current.value),v&&O());},[O,v,a,s,C]),G=jsx(D,{variant:"ghost","aria-label":l||x(ps.save),icon:p,isDisabled:C,size:"md",excludeFromTabOrder:T,className:T?Fm:void 0,onPress:E,preventFocusOnPress:!0}),[V,K]=no.useState(!1),{keyboardProps:A}=useKeyboard({onKeyDown:H=>{(H.metaKey||H.ctrlKey)&&H.shiftKey&&H.key==="h"&&(H.preventDefault(),K(!0));}}),Q=useCallback(H=>{I(H),g.onChange?.(H);},[g]);return jsxs("div",{...mergeProps(B,a?A:{}),role:"application",ref:L(R,h),style:t,"data-block-id":o,"data-block-class":r,className:classNames(Sm({isInline:i,isMinimal:T}),"BaselineUI-Editor",e),"aria-disabled":g.isDisabled,children:[T?jsxs(Fragment,{children:[i?jsx(Fo,{className:Nm,name:g.avatarName||""}):null,jsxs("div",{className:Om({isInline:i}),children:[jsx(Jr,{isMinimal:T,textBoxRef:k,isInline:i,editableContentAriaLabel:y,...g,onChange:Q,onSave:E}),G]})]}):jsxs(Fragment,{children:[a?jsx(is,{containerRef:R,ref:N,editorRef:w,isInline:i,editableContentAriaLabel:y,onHelpDialogOpenRequest:()=>{K(!0);},...g,onChange:Q,onSave:E}):jsxs(Fragment,{children:[!i&&jsx(j,{variant:"secondary"}),jsx(Jr,{onCancel:n,textBoxRef:k,ref:P,isInline:i,editableContentAriaLabel:y,...g,onChange:H=>{I(H),g.onChange?.(H);},onSave:E})]}),jsx(j,{variant:"secondary"}),jsxs("div",{className:classNames(Qr,sprinkles({justifyContent:"space-between"})),children:[jsxs(M,{paddingX:"sm",gap:"sm",display:"flex",children:[a&&g.mentionableUsers?jsx(D,{icon:AtIcon,size:"sm","aria-label":x(ps.mention),onPress:()=>N.current?.startMention(),preventFocusOnPress:!0}):null,b?.map(({type:H,props:X},le)=>H==="action"?jsx(D,{...X,size:"sm",isDisabled:g.isDisabled||X.isDisabled},le):jsx(Ie,{...X,size:"sm",variant:"tertiary",isDisabled:g.isDisabled||X.isDisabled},le))]}),jsxs(M,{children:[!!n&&jsx(D,{variant:"secondary",icon:CrossCircleFilledIcon,isDisabled:g.isDisabled,size:"md",onPress:()=>{n(),_&&O();},"aria-label":c||x(ps.cancel)}),G]})]})]}),jsx(Um,{isOpen:V,onClose:()=>{K(!1);}})]})}));xu.displayName="Editor";var ps=q({cancel:{defaultMessage:"Cancel",id:"cancel"},save:{defaultMessage:"Save",id:"save"},mention:{defaultMessage:"Mention",id:"mention"}});var sa=no.forwardRef(({className:e,style:t,"data-block-id":o,"data-block-class":r,isMounted:a,children:n,transitions:s,elementType:i="div",...p},l)=>{let c=useTransition(a,s),u=animated[i];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}))});sa.displayName="Transition";var Cu="_8kqf970 _1yep5z6ow _1yep5z6ox _1yep5z6oy _1yep5z613b _1yep5z613c _1yep5z613d _1yep5z613k _1yep5z613l _1yep5z613m _1yep5z6142 _1yep5z6143 _1yep5z6144 _1yep5z6yh _1yep5z6uq _1yep5z6ur _1yep5z6us _1yep5z6168";var ku=2,wu=no.forwardRef(({className:e,style:t,hideForKeyboard:o,scrollRef:r,label:a,delay:n=1500,smoothScroll:s=!0,"data-block-id":i,"data-block-class":p},l)=>{let c=no.useRef(null),u=useInteractionModality(),[m,d]=no.useState(!1),f=useCallback(()=>{let T=r?.current||fe(c.current).body;return oe(T).getComputedStyle(T).flexDirection==="column-reverse"?T.scrollTop+ku>=0:T.scrollTop+T.clientHeight+ku>=T.scrollHeight},[r]),[y,b]=no.useState(f),_=_o(),{buttonProps:v,isPressed:g}=useButton({onPress:()=>{let T=r?.current||fe(c.current).body;T.scrollTo({top:T.scrollHeight,behavior:s?"smooth":"auto"});}},c),{focusProps:h,isFocused:w,isFocusVisible:x}=useFocusRing(),{hoverProps:k,isHovered:P}=useHover({}),R=filterTruthyValues({"data-block-id":i,"data-block-class":p,"data-pressed":g,"data-focus-visible":x,"data-hovered":P,"data-focused":w});return useEffect(()=>{b(f());},[f]),useEffect(()=>{let T=r?.current||fe(c.current).body,N="onscrollend"in oe(T),S=()=>{setTimeout(()=>{d(!1),b(f());},n);},I=()=>{d(!0),N||S();};return T.addEventListener("scroll",I),T.addEventListener("scrollend",S),()=>{T.removeEventListener("scroll",I),T.removeEventListener("scrollend",S);}},[r,n,f]),jsxs(sa,{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:_},...mergeProps(v,h,k,R),className:classNames(Cu,Pr({isFocusVisible:x,variant:"high-contrast",isHovered:P}),"BaselineUI-ScrollControlButton",e),style:t,ref:L(l,c),children:[jsx(ArrowDownCircleFilledIcon,{size:16}),a]})});wu.displayName="ScrollControlButton";var ds="_1yep5z6jc _1yep5z6jd _1yep5z6je _1yep5z6jl _1yep5z6jm _1yep5z6jn",Ru=z({defaultClassName:"_1v0p2z10 _1yep5z63r _1yep5z63s _1yep5z63t _1yep5z619 _1yep5z61a _1yep5z61b _1yep5z6i0 _1yep5z6i1 _1yep5z6i2 _1yep5z6ic _1yep5z6id _1yep5z6ie _1yep5z69f _1yep5z69g _1yep5z69h",variantClassNames:{hasTitleAndIcon:{true:"_1yep5z6le _1yep5z6lf _1yep5z6lg _1yep5z6nw _1yep5z6nx _1yep5z6ny"},hasNoCloseBtn:{true:"_1yep5z6lk _1yep5z6ll _1yep5z6lm _1yep5z6nw _1yep5z6nx _1yep5z6ny _1yep5z6p2 _1yep5z6p3 _1yep5z6p4 _1yep5z6mq _1yep5z6mr _1yep5z6ms"}},defaultVariants:{},compoundVariants:[[{hasTitleAndIcon:!0,hasNoCloseBtn:!0},"_1yep5z61g7 _1yep5z61g8 _1yep5z61g9"]]}),Iu="_1v0p2z10";var la=no.forwardRef(({className:e,style:t,"data-block-id":o,"data-block-class":r,message:a,title:n,primaryActionLabel:s,cancelLabel:i,textInputProps:p,icon:l,iconColor:c,showCloseButton:u=!0,onPrimaryAction:m,onCancel:d,autoFocusButton:f,isPrimaryActionDisabled:y},b)=>{let _=useId(),{formatMessage:v}=F(),g=n&&jsx(J,{id:_,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":_,children:[jsxs("div",{className:Ru({hasTitleAndIcon:!!(l&&n),hasNoCloseBtn:!u}),children:[jsxs(M,{display:"flex",justifyContent:"space-between",alignItems:"center",flexDirection:"row",children:[l?jsx(l,{style:{color:c},size:24}):null,!l&&g,u?jsx(D,{icon:XIcon,variant:"secondary",size:"md","aria-label":v(vk.close),onPress:d}):null]}),l?g:null]}),a?jsx(M,{elementType:"section",className:Iu,paddingX:"lg",paddingBottom:"lg",typography:"body.sm.regular",color:"text.primary",children:a}):null,p?jsx(M,{paddingX:"lg",paddingBottom:"lg",children:jsx(So,{...p})}):null,i||s?jsxs(Fragment,{children:[jsx(j,{}),jsxs(M,{padding:"lg",display:"flex",gap:"xl",children:[i?jsx($,{variant:"secondary",className:ds,label:i,onPress:d,autoFocus:f==="cancel"}):null,s?jsx($,{className:ds,label:s,onPress:m,autoFocus:f==="primary",isDisabled:y}):null]})]}):null]})});la.displayName="AlertDialog";var vk=q({close:{id:"close",defaultMessage:"Close",description:"Close button label"}});var Tu="_1t55bp71",Nu="_1yep5z6e3 _1yep5z6eu _1yep5z6i6 _1yep5z6i7 _1yep5z6i8 _1yep5z69i _1yep5z69j _1yep5z69k",Su="_1t55bp70";var Pk=Ck(),Lu=no.forwardRef(({className:e,style:t,children:o,"data-block-id":r,"data-block-class":a,showCaret:n},s)=>{let i=useMemo(()=>{let p=o;return (!o||Array.isArray(o)&&o.length===0)&&(p=""),Pk.render(p)},[o]);return jsx("div",{className:classNames(Nu,Su,{[Tu]:n},"BaselineUI-Markdown",e),"data-block-id":r,"data-block-class":a,style:t,ref:s,dangerouslySetInnerHTML:{__html:i}})});Lu.displayName="Markdown";function Eu(e){let{formatMessage:t,locale:o}=F(),[r,a]=no.useState(!1),[n,s]=no.useState(0),[i,p]=no.useState(0),[l,c]=no.useState(!1);useEffect(()=>{if(!e.current)return;let d=e.current,f=()=>{a(!1),s(0);},y=()=>{l||s(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(Bu.playing),"polite")):(e.current.pause(),a(!1),announce(t(Bu.paused),"polite"))))();},[t,e]),m=useCallback(d=>{e.current&&(e.current.currentTime=d*e.current.duration/100,announce(Rk(e.current.currentTime,o.locale),"assertive"));},[o.locale,e]);return {isPlaying:r,progress:n,duration:i,togglePlay:u,seek:m,setProgress:s,formattedCurrentTime:e.current?.currentTime?Du(e.current?.currentTime):"00:00",formattedDuration:i?Du(i):"00:00",setIsSliderDragging:c}}var Bu=q({playing:{id:"playing",defaultMessage:"Playing"},paused:{id:"paused",defaultMessage:"Paused"}});function Rk(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 Du(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 Fu="_1yep5z6i0 _1yep5z6i1 _1yep5z6i2 _1yep5z6i9 _1yep5z6ia _1yep5z6ib _1yep5z6ir _1yep5z6is _1yep5z6it _1yep5z69o _1yep5z69p _1yep5z69q",Hu="rta2n91 _1yep5z6i0 _1yep5z6i1 _1yep5z6i2 _1yep5z6i9 _1yep5z6ia _1yep5z6ib _1yep5z6ir _1yep5z6is _1yep5z6it _1yep5z69o _1yep5z69p _1yep5z69q _1yep5z6z9 _1yep5z6ut _1yep5z6uu _1yep5z6uv _1yep5z6166 _1yep5z6106",Ou="rta2n90";var ju=no.forwardRef(({className:e,style:t,size:o="lg",sources:r,"data-block-id":a,"data-block-class":n,...s},i)=>{let p=no.useRef(null),{isPlaying:l,progress:c,duration:u,togglePlay:m,seek:d,formattedDuration:f,formattedCurrentTime:y,setProgress:b,setIsSliderDragging:_}=Eu(p),{formatMessage:v}=F(),g=filterTruthyValues({"data-block-id":a,"data-block-class":n,"data-state":l?"playing":"paused","data-loaded":u>0});return jsxs("div",{...g,...s,className:classNames(Fu,"BaselineUI-AudioPlayer",e),role:"group",style:t,ref:i,children:[jsx(VisuallyHidden,{children:jsx("audio",{ref:p,children:r.map(({url:h,type:w})=>jsx("source",{src:h,type:w},h))})}),jsx(Ie,{icon:l?PauseIcon:PlayIcon,variant:"toolbar",isSelected:l,size:o,"aria-label":v(l?us.pause:us.play),style:{borderRadius:"50%"},onPress:m}),jsxs("div",{className:Hu,children:[jsx("span",{"aria-hidden":!0,children:y}),jsx(wo,{"aria-label":v(us.audioTimeline),value:c,minValue:0,maxValue:100,className:Ou,onChange:h=>{b(h),_(!0);},onChangeEnd:h=>{d(h),_(!1);}}),jsx("span",{"aria-hidden":!0,children:f})]})]})});ju.displayName="AudioPlayer";var us=q({play:{id:"play",defaultMessage:"Play"},pause:{id:"pause",defaultMessage:"Pause"},audioTimeline:{id:"audioTimeline",defaultMessage:"Audio timeline"}});var $u="_1w920rnd _1yep5z6ai _1yep5z6aj _1yep5z6ak _1yep5z6b6 _1yep5z6b7 _1yep5z6b8 _1yep5z6bu _1yep5z6bv _1yep5z6bw _1yep5z6ci _1yep5z6cj _1yep5z6ck _1yep5z6fs _1yep5z6ho _1yep5z6hp _1yep5z6hq",Uu="_1w920rn1 _1yep5z6i3 _1yep5z6i4 _1yep5z6i5 _1yep5z6ic _1yep5z6id _1yep5z6ie _1yep5z6ir _1yep5z6is _1yep5z6it _1yep5z69i _1yep5z69j _1yep5z69k",qu="_1w920rn0 _1yep5z6i0 _1yep5z6i1 _1yep5z6i2 _1yep5z6i9 _1yep5z6ia _1yep5z6ib _1yep5z6km",ca=z({defaultClassName:"_1w920rn2 _1yep5z6d6 _1yep5z6i0 _1yep5z6i1 _1yep5z6i2 _1yep5z6ir _1yep5z6is _1yep5z6it _1yep5z6hl _1yep5z6hm _1yep5z6hn",variantClassNames:{isFocusVisible:{true:"_1yep5z6l1 _1yep5z6kz _1yep5z6hc"},isSelected:{true:"_1yep5z6l1 _1yep5z6kz _1yep5z6hc"},isLoading:{true:"_1yep5z614w _1yep5z614x _1yep5z614y"}},defaultVariants:{},compoundVariants:[[{isFocusVisible:!0,isSelected:!0},"_1w920rn6 _1yep5z6l1 _1yep5z6kz _1yep5z6hc"]]}),Ku="_1w920rnb _1yep5z6kw",Gu=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 _1yep5z6fw _1yep5z6eu _1yep5z6dy",variantClassNames:{isFocusVisible:{true:"_1w920rn8 _1yep5z6l1 _1yep5z6kz _1yep5z6hc"},isSelected:{true:"_1w920rn9"}},defaultVariants:{},compoundVariants:[[{isFocusVisible:!0,isSelected:!0},"_1w920rna _1yep5z61rm _1yep5z61rl _1yep5z61nz"]]}),Wu="_1w920rnc";var Yu=({items:e,ulRef:t})=>{let{length:o}=e,r=no.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:ca(),ref:r,children:jsx(M,{backgroundColor:"background.secondary.medium",borderRadius:"full",typography:"label.md.medium",color:"text.primary",position:"absolute",paddingX:"md",className:Wu,children:o})})};function Zu(e,t){return e.find(o=>o.id===t)}function Qu(e,t,o){let r=e.findIndex(s=>s.id===t),a=[...o].map(s=>e.findIndex(i=>i.id===s)),n=[...e];for(let s of a){let[i]=n.splice(s,1);n.splice(r,0,i);}return n}function Ju(e,t,o){let r=e.findIndex(i=>i.id===t),a=[...o].map(i=>e.findIndex(p=>p.id===i)),n=[...e],s=0;for(let i of a){let[p]=n.splice(i-s,1);n.splice(r,0,p),s++;}return n}function fs(e){return e.map(t=>({id:t.id,label:t.label,data:{src:t.src,alt:t.alt}}))}function da(e){return e.map(t=>({id:t.id,label:t.label,src:t.data?.src,alt:t.data?.alt}))}var jk=({fit:e,item:t,deleteElement:o})=>{let{formatMessage:r}=F(),{imgProps:a,isLoading:n,isLoaded:s}=vo({src:t.data?.src,alt:t.data?.alt??""}),i=useTransition(s,{from:{opacity:0},enter:{opacity:1},leave:{opacity:0}});return n?jsx(Bo,{"aria-label":r(jt.loading)}):i((p,l)=>l&&jsx(animated.div,{role:"img","aria-label":a.alt,style:{...p,backgroundImage:`url(${a.src})`,backgroundSize:e},className:Ku,children:o}))},ef=({item:{value:e},options:{optionProps:t,isFocusVisible:o,isSelected:r},liRef:a,fit:n="contain",onDelete:s,className:i,imageClassName:p,imageLabelClassName:l,imageDimensions:c,style:u,renderImage:m=(d,{deleteElement:f})=>jsx(jk,{item:d,deleteElement:f,fit:n})})=>{let d=useId(),{formatMessage:f}=F();invariant(e&&mo(e),"Expected value to be a list option");let y=s?jsx("div",{className:$u,children:jsx(D,{"aria-label":f(jt.delete),size:"xs",icon:XIcon$2,onPress:()=>{s(e.id);},UNSAFE_NON_INTERACTIVE:!0})}):null,b=useCallback(_=>{let v={},g=typeof _=="function"?_(da([e])[0],{isSelected:r}):_;return g&&(v.width=typeof g.width=="string"?bs[g.width]:g.width,v.aspectRatio="height"in g?`${v.width} / ${g.height}`:g?.aspectRatio?.toString()),v},[r,e]);return jsxs("li",{...t,ref:a,className:classNames(Uu,i),"aria-labelledby":d,style:u,children:[jsx(M,{display:"flex",flexDirection:"column",flex:1,justifyContent:"center",alignItems:"center",children:jsx("div",{className:classNames(ca({isFocusVisible:o,isSelected:r,isLoading:!0}),p),style:b(c),"data-image-key":e.id,children:m(e,{deleteElement:y??void 0,onDelete:s})})}),jsx("span",{id:d,className:classNames(Gu({isFocusVisible:o,isSelected:r}),l),children:e.label})]})};var Wk={width:0,display:"block"};var bs=(o=>(o[o.sm=102]="sm",o[o.md=170]="md",o))(bs||{}),rf=no.forwardRef(({className:e,style:t,fit:o="cover",onReorder:r,"data-block-id":a,"data-block-class":n,onDelete:s,imageWidth:i="sm",aspectRatio:p=3/4,items:l,defaultItems:c=[],onKeyDown:u,imageContainerClassName:m,imageClassName:d,labelClassName:f,onListChange:y,renderImage:b,imageDimensions:_={width:i,aspectRatio:p},imageContainerStyle:v,...g},h)=>{let w=no.useRef(null),[x,k]=useState([]),{formatMessage:P}=F();useEffect(()=>{(p||i)&&console.warn("ImageGallery: aspectRatio and imageWidth are deprecated. Use imageDimensions instead.");},[i,p]);let[R,T]=useControlledState(g.selectedKeys,g.defaultSelectedKeys??[],g.onSelectionChange),[N,S]=useControlledState(l?fs(l):void 0,fs(c),y?E=>{y?.(da(E));}:void 0),I=useCallback(E=>{let G=E.target.key,V=E.keys;if(E.target.dropPosition==="before"){let K=Qu(N,G,V);S(K);}else if(E.target.dropPosition==="after"){let K=Ju(N,G,V);S(K);}r?.(E);},[N,r,S]),C=useCallback(()=>{s&&x.length&&(S(N.filter(E=>!x.includes(E.id))),s(new Set(x)),k([]));},[x,N,s,S]),B=useCallback((E,G,V)=>jsx(ef,{item:E,options:G,liRef:V,fit:o,onDelete:s?K=>{k([K]);}:void 0,renderImage:b,className:m,imageClassName:d,imageLabelClassName:f,imageDimensions:_,style:v}),[o,s,b,m,d,f,_,v]),{keyboardProps:O}=useKeyboard({onKeyDown(E){if(u?.(E),E.key==="Backspace"||E.key==="Delete"){if(!s)return;if([...R].length)k([...R]);else {let V=E.target.dataset.key;k([V]);}}}});return jsxs("div",{...O,ref:h,style:t,className:classNames("BaselineUI-ImageGallery",e),"data-block-id":a,"data-block-class":n,children:[jsx(ie,{...g,selectedKeys:R,items:N,onReorder:I,layout:"grid",orientation:"vertical",className:qu,ref:w,dropIndicatorStyle:Wk,renderOption:B,renderDragPreview:E=>jsx(Yu,{items:E,ulRef:w}),onSelectionChange:T,getItems:E=>[...E].map(G=>{let V=Zu(N,G);return {src:V?.src||"",alt:V?.alt||"",key:G}})}),jsx(ke,{isOpen:!![...x].length,onOpenChange:E=>{E||k([]);},children:jsx(Me,{isDismissable:!0,children:jsx(la,{showCloseButton:!1,title:"Are you sure you want to delete this item?",primaryActionLabel:P(jt.delete),cancelLabel:P(jt.cancel),onCancel:()=>{k([]);},onPrimaryAction:C,autoFocusButton:"cancel"})})})]})});rf.displayName="ImageGallery";var jt=q({delete:{id:"delete",defaultMessage:"Delete"},cancel:{id:"cancel",defaultMessage:"Cancel"},loading:{id:"loading",defaultMessage:"Loading"}});var af="_1sexph00",nf="_1sexph01 _1yep5z616p _1yep5z616q _1yep5z616r _1yep5z6191 _1yep5z6192 _1yep5z6193 _1yep5z61a7 _1yep5z61a8 _1yep5z61a9 _1yep5z617v _1yep5z617w _1yep5z617x _1yep5z61q4 _1yep5z61q5 _1yep5z61q6";var pf=no.forwardRef(({className:e,style:t,items:o,"data-block-id":r,"data-block-class":a,hideLabel:n,size:s="md",isDisabled:i,showSelectedIcon:p=!0,excludeFromTabOrder:l,onPress:c,isSelected:u,defaultSelected:m,onButtonSelectionChange:d,moreAriaLabel:f,optionStyle:y,optionClassName:b,triggerClassName:_,triggerStyle:v,tooltipProps:g,...h},w)=>{let{formatMessage:x}=F(),k=se(),P=useSelectState({items:o,...h,defaultSelectedKey:h.defaultSelectedKey||o?.[0]?.id,children:k,validationState:h.validationState==="error"?"invalid":"valid"}),[R,T]=useControlledState(u,!!m,A=>{d?.({isSelected:A,selectedKey:P.selectedKey});}),{hoverProps:N,isHovered:S}=useHover({isDisabled:i}),I=useMemo(()=>{let A=P.collection.getItem(P.selectedKey),Q=A?.textValue||A?.["aria-label"],H=A?.value,X=H?.icon,le={size:s,isSelected:R,onPress:_e=>{T(!R),c?.(_e);},isDisabled:i,excludeFromTabOrder:l,className:typeof b=="function"?b(H,{isButton:!0,isSelected:R}):b,style:typeof y=="function"?y(H,{isButton:!0,isSelected:R}):y};return n&&X?jsx(re,{variant:"inverse",size:"sm",includeArrow:!1,text:Q,placement:"bottom start",offset:4,...typeof g=="function"?g("button"):g,children:jsx(Ie,{icon:X,"aria-label":Q,variant:"toolbar",...le})}):jsx(xr,{iconStart:X,label:Q,...le})},[l,n,R,i,c,b,y,T,s,P.collection,P.selectedKey,g]),C=h["aria-label"],B=useCallback(({buttonProps:A,ref:Q})=>{delete A["aria-labelledby"];let H=f||`${x(r0.more)} ${C}`;return jsx(re,{variant:"inverse",size:"sm",includeArrow:!1,text:H,placement:"bottom start",offset:4,...g,children:jsx(PressResponder,{...A,children:jsx(D,{"aria-label":H,ref:Q,icon:CaretDownIcon,variant:"toolbar",size:s,className:classNames(hr({isSelected:R}),nf,_),style:v,isDisabled:i,excludeFromTabOrder:l})})})},[C,l,x,R,i,f,s,g,_,v]),O=filterTruthyValues({"data-block-id":r,"data-block-class":a,"data-hovered":S,"data-selected":R,"data-disabled":i}),E=te(w),G=useMemo(()=>({state:P,popoverAnchorRef:E}),[P,E]),V=useCallback(A=>typeof b=="function"?b(A,{isButton:!1,isSelected:P.selectionManager.isSelected(A.id)}):b,[b,P.selectionManager]),K=useCallback(A=>typeof y=="function"?y(A,{isButton:!1,isSelected:P.selectionManager.isSelected(A.id)}):y,[y,P.selectionManager]);return jsx(wr.Provider,{value:G,children:jsxs(M,{...N,role:"group",display:"inline-flex",flexDirection:"row",alignItems:"center",className:classNames(af,"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:E,...O,children:[I,jsx(qe,{isDisabled:i,showSelectedIcon:p,placement:"bottom start",items:o,...h,style:{width:20},optionClassName:V,optionStyle:K,variant:"ghost",renderTrigger:B})]})})});pf.displayName="ButtonSelect";var r0=q({more:{id:"more",defaultMessage:"More"}});var cf=z({defaultClassName:"_18v88n10 _1yep5z6i0 _1yep5z6i1 _1yep5z6i2 _1yep5z6kv",variantClassNames:{labelPosition:{top:"_1yep5z613n _1yep5z613o _1yep5z613p",start:"_1yep5z613k _1yep5z613l _1yep5z613m _1yep5z6152 _1yep5z6153 _1yep5z6154 _1yep5z6ut _1yep5z6uu _1yep5z6uv"}},defaultVariants:{},compoundVariants:[]}),df=z({defaultClassName:"_18v88n1p _1yep5z66 _1yep5z67 _1yep5z68 _1yep5z62i _1yep5z62j _1yep5z62k _1yep5z63o _1yep5z63p _1yep5z63q _1yep5z61c _1yep5z61d _1yep5z61e _1yep5z6eu _1yep5z6kv _1yep5z6l6 _1yep5z6ky _1yep5z6dy",variantClassNames:{isDisabled:{true:"_18v88n1q _1yep5z6109"},labelPosition:{top:"_18v88n1r",start:"_18v88n1s"}},defaultVariants:{},compoundVariants:[]}),mf=z({defaultClassName:"_18v88n1t _1yep5z660 _1yep5z661 _1yep5z662 _1yep5z6i3 _1yep5z6i4 _1yep5z6i5 _1yep5z6ks",variantClassNames:{validationState:{valid:"_18v88n1u",error:"_1yep5z6zp",warning:"_1yep5z6zx"},isReadOnly:{true:"_1yep5z610b"}},defaultVariants:{},compoundVariants:[]}),uf=z({defaultClassName:"_18v88n1d _1yep5z6ai _1yep5z6aj _1yep5z6ak _1yep5z6b6 _1yep5z6b7 _1yep5z6b8 _1yep5z6bu _1yep5z6bv _1yep5z6bw _1yep5z6ci _1yep5z6cj _1yep5z6ck _1yep5z6i0 _1yep5z6i1 _1yep5z6i2 _1yep5z6i9 _1yep5z6ia _1yep5z6ib _1yep5z6l9 _1yep5z6l7 _1yep5z6gq _1yep5z6ir _1yep5z6is _1yep5z6it",variantClassNames:{validationState:{valid:"_18v88n1e",error:"_1yep5z611k",warning:"_18v88n1g"},isHovered:{true:"_18v88n1h"},isFocused:{true:"_1yep5z6vt _1yep5z6vu _1yep5z6vv _1yep5z6wh _1yep5z6wi _1yep5z6wj _1yep5z6x5 _1yep5z6x6 _1yep5z6x7 _1yep5z6xt _1yep5z6xu _1yep5z6xv _1yep5z616k _1yep5z616i _1yep5z611y _1yep5z616b _1yep5z616a _1yep5z612n _1yep5z616d"},isDisabled:{true:"_18v88n1j"},variant:{primary:"_18v88n1k",ghost:"_18v88n1l"},isReadOnly:{true:"_1yep5z612n"}},defaultVariants:{},compoundVariants:[[{variant:"ghost",isHovered:!0,isFocused:!1,validationState:"valid"},"_1yep5z61rv _1yep5z61rt _1yep5z61nc"],[{variant:"ghost",isFocused:!1,isHovered:!1,validationState:"valid"},"_18v88n1n"],[{isHovered:!0,validationState:"valid",isDisabled:!1,isReadOnly:!1,isFocused:!1,variant:"primary"},"_1yep5z61nd"],[{isHovered:!0,validationState:"warning",isDisabled:!1,isReadOnly:!1,isFocused:!1},"_1yep5z61nd"],[{isReadOnly:!0,variant:"primary",isFocused:!1},"_18v88n1o"]]}),ff=z({defaultClassName:"_18v88n13 _1yep5z6dy _1yep5z6ev",variantClassNames:{isDisabled:{true:"_1yep5z6109"}},defaultVariants:{},compoundVariants:[]}),yf=z({defaultClassName:"_18v88n19 _1yep5z6i3 _1yep5z6i4 _1yep5z6i5",variantClassNames:{labelPosition:{top:"_1yep5z6sh _1yep5z6si _1yep5z6sj",start:"_1yep5z6me _1yep5z6mf _1yep5z6mg _1yep5z613n _1yep5z613o _1yep5z613p"},hasMessage:{true:"_18v88n1c"}},defaultVariants:{},compoundVariants:[[{labelPosition:"start",hasMessage:!1},"_1yep5z61q7 _1yep5z61q8 _1yep5z61q9"]]}),bf=z({defaultClassName:"_18v88n15 _1yep5z699 _1yep5z69a _1yep5z69b _1yep5z6ky",variantClassNames:{isFocusVisible:{true:"_1yep5z6116 _1yep5z612v _1yep5z6169"},isHovered:{true:"_1yep5z6116 _1yep5z612v _1yep5z6169"},isOpen:{true:"_1yep5z612v _1yep5z6169"}},defaultVariants:{},compoundVariants:[[{isFocusVisible:!0},"_1yep5z61mh _1yep5z61o6 _1yep5z61rk"],[{isHovered:!0},"_1yep5z61mh _1yep5z61o6 _1yep5z61rk"],[{isOpen:!0},"_1yep5z61o6 _1yep5z61rk"]]});var _f=no.forwardRef(({className:e,style:t,inputStyle:o,inputClassName:r,"data-block-id":a,"data-block-class":n,label:s,items:i,showSelectedIcon:p=!1,onSelectionChange:l,onInputChange:c,isInvalid:u=!1,labelPosition:m="top",validationState:d="valid",variant:f="primary",toggleLabel:y,renderOption:b,showIcon:_=!0,filter:v,minValue:g,maxValue:h,inputType:w="text",...x},k)=>{let{contains:P}=useFilter({sensitivity:"base"}),R=se(),T=useComboBoxState({...x,defaultFilter:v||P,defaultItems:i,onSelectionChange:l,onInputChange:c,children:R,validationState:u?"invalid":"valid"}),N=no.useRef(null),S=no.useRef(null),I=no.useRef(null),C=no.useRef(null),B=no.useRef(null),{buttonProps:O,inputProps:E,listBoxProps:G,labelProps:V,errorMessageProps:K,descriptionProps:A,validationErrors:Q}=useComboBox({...x,inputRef:S,defaultItems:i,buttonRef:N,listBoxRef:I,popoverRef:C,validationState:d==="error"?"invalid":"valid"},T),H=x.errorMessage||Q.join(" "),X=Pe({...x,errorMessage:H,descriptionProps:A,errorMessageProps:K,labelPosition:m});H&&(d="error");let{hoverProps:le,isHovered:_e}=useHover({isDisabled:x.isDisabled}),{isFocused:he,focusProps:xe,isFocusVisible:Ce}=useFocusRing(),Ee=No({isReadOnly:x.isReadOnly,validationState:d}),ee=filterTruthyValues({"data-read-only":x.isReadOnly,"data-disabled":x.isDisabled,"data-validation-state":d,"data-focused":he,"data-focus-visible":Ce}),{labelProps:de,fieldProps:Jo}=useLabel({label:s,"aria-label":x["aria-label"],"aria-labelledby":x["aria-labelledby"],"aria-describedby":x["aria-describedby"],"aria-details":x["aria-details"]});return jsx(eo.Provider,{value:T,children:jsxs("div",{className:classNames(cf({labelPosition:m}),e,"BaselineUI-ComboBox"),"data-block-id":a,"data-block-class":n,style:t,ref:k,children:[s||m==="start"&&X?jsxs("div",{className:yf({labelPosition:m,hasMessage:!!X}),children:[jsx("label",{...mergeProps(V,de),className:ff({isDisabled:x.isDisabled}),children:s}),m==="start"&&X]}):null,jsxs("div",{...le,className:uf({validationState:d,isHovered:_e,isFocused:he,variant:f,isReadOnly:!!x.isReadOnly,isDisabled:!!x.isDisabled}),ref:B,children:[jsx("input",{...mergeProps(E,xe,ee,Jo,w==="number"?{type:"number",min:g,max:h,onKeyDown:Je=>{(Je.key==="ArrowUp"||Je.key==="ArrowDown")&&Je.preventDefault();}}:null),ref:S,className:classNames(df({isDisabled:x.isDisabled,labelPosition:m}),"BaselineUI-ComboBox-Input",r),style:o}),Ee&&_?jsx(Ee,{className:mf({validationState:d,isReadOnly:x.isReadOnly}),size:16}):null,jsx($,{...O,ref:N,variant:"popover",label:y,className:bf({isFocusVisible:!x.isDisabled&&!x.isReadOnly&&Ce,isHovered:!x.isDisabled&&!x.isReadOnly&&_e,isOpen:T.isOpen})})]}),T.isOpen?jsx(ye,{className:je,ref:C,triggerRef:B,state:T,children:jsx(ie,{...G,items:i,ref:I,renderOption:b,selectionMode:"single",showSelectedIcon:p,className:yr})}):null,m==="top"&&X]})})});_f.displayName="ComboBox";var zs=no.forwardRef(({item:e,renderGridItem:t,state:o},r)=>{let a=te(r),n=useGridListItem({node:e},o,a),s=o.selectionManager.selectionMode!=="none"&&o.selectionManager.selectionBehavior==="toggle",{checkboxProps:i}=useGridListSelectionCheckbox({key:e.key},o);return t(e,{...n,checkBoxProps:s?i:void 0},a)});zs.displayName="GridListItem";var _0=e=>{e.key==="Enter"||e.key==="Escape"||e.stopPropagation();},hf=no.forwardRef(({className:e,style:t,isEditing:o=!1,"data-block-id":r,"data-block-class":a,...n},s)=>{let i=se(),p=useListState({...n,children:i}),l=te(s),{gridProps:c}=useGridList(n,p,l),u=o?_0:c.onKeyDownCapture;return jsx("ul",{...c,className:classNames("BaselineUI-GridList",e),"data-block-id":r,"data-block-class":a,style:t,ref:l,onKeyDownCapture:u,children:[...p.collection].map(m=>jsx(zs,{item:m,state:p,renderGridItem:n.renderGridItem},m.key))})});hf.displayName="GridList";var xf="_1dc3b8m0";var Pf=no.forwardRef(({className:e,selectionMode:t,style:o,"data-block-id":r,"data-block-class":a,tooltipProps:n,renderActionItem:s,...i},p)=>{let l=te(p),c=se(),u=useListState({...i,selectionMode:t,suppressTextValueWarning:!0,children:c}),{actionGroupProps:m}=useActionGroup({...i,selectionMode:t,children:c},u,l);return jsx(M,{...m,display:"flex",flexDirection:"row",gap:"xs",className:classNames("BaselineUI-ActionGroup",e),"data-block-id":r,"data-block-class":a,style:o,ref:l,children:[...u.collection].map(d=>(invariant(d.value),jsx(R0,{item:d,state:u,isDisabled:i.isDisabled,onAction:i.onAction,tooltipProps:n,renderActionItem:s},d.key)))})});Pf.displayName="ActionGroup";var R0=({item:e,state:t,tooltipProps:o,renderActionItem:r,onAction:a,isDisabled:n})=>{let{buttonProps:s}=useActionGroupItem({key:e.key},t),i=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(s,{onPress:()=>{a?.(e.key);}}),children:jsx(re,{text:e.textValue,size:"sm",variant:"inverse",includeArrow:!1,offset:4,...c,children:r?.(e,{isSelected:p,isDisabled:i})||jsx(D,{variant:"tertiary",icon:l,"aria-label":e.textValue,size:"sm",isDisabled:i,className:classNames({[xf]:p},"BaselineUI-ActionGroup-Item")})})})};var kf="ujkypy0 _1yep5z66 _1yep5z67 _1yep5z68 _1yep5z62i _1yep5z62j _1yep5z62k _1yep5z63o _1yep5z63p _1yep5z63q _1yep5z61c _1yep5z61d _1yep5z61e",wf="_1yep5z61ov _1yep5z61ow _1yep5z61ox _1yep5z61g1 _1yep5z61g2 _1yep5z61g3";var If=no.forwardRef(({className:e,style:t,items:o,optionsContainerClassName:r,label:a,icon:n,value:s,defaultValue:i,onChange:p,isDisabled:l,optionClassName:c,optionStyle:u,labelPosition:m="top","data-block-id":d,"data-block-class":f,...y},b)=>{let _=useMemo(()=>o.map(g=>({id:g.color,label:g.label})),[o]),v=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(M,{...ba(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(M,{display:"flex",alignItems:"center",gap:"md",children:[n?jsx(n,{size:24,className:sprinkles({color:"icon.primary"})}):null,a?jsx(J,{id:v,type:"label",size:"sm",children:a}):null]}):null,jsx(ie,{className:classNames(wf,r),selectionMode:"single",items:_,orientation:"horizontal",defaultSelectedKeys:i?[i]:void 0,disabledKeys:l?_.map(g=>g.id):void 0,isDisabled:l,selectedKeys:s?[s]:void 0,onSelectionChange:g=>{p?.([...g][0]);},optionClassName:c,optionStyle:u,renderOption:({key:g,textValue:h},{isSelected:w,isFocusVisible:x,isDisabled:k,optionProps:P},R)=>jsx("li",{...P,"data-disabled":k,className:classNames(kf,P.className),ref:R,children:jsx(Ge,{isFocusVisible:x,color:g,isSelected:w,"aria-label":h,isInteractive:!0,isDisabled:k})}),...y,"aria-labelledby":a?v:y["aria-labelledby"]})]})});If.displayName="ColorSwatchPicker";
50
+ var Te=typeof document<"u"?io.useLayoutEffect:()=>{};function ya(e){let o=useRef(null);return Te(()=>{o.current=e;},[e]),useCallback((...t)=>{let r=o.current;return r?.(...t)},[])}function ba(e){let[o,t]=useState(e),r=useRef(null),a=ya(()=>{if(!r.current)return;let i=r.current.next();if(i.done){r.current=null;return}o===i.value?a():t(i.value);});Te(()=>{r.current&&a();});let n=ya(i=>{r.current=i(o),a();});return [o,n]}var Pi=new Map;function ki(e,o){if(e===o)return e;let t=Pi.get(e);if(t)return t(o),o;let r=Pi.get(o);return r?(r(e),e):o}function Ri(...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},oe=e=>{if(e&&"window"in e&&e.window===e)return e;let o=mo(e);return o instanceof ShadowRoot?o.ownerDocument.defaultView||window:o?.defaultView||window},mo=e=>{if(!e)return document;let o=e.getRootNode?e.getRootNode():document;return e.isConnected?(o):null};function wi(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=wi(e[o]))&&(r&&(r+=" "),r+=t);}else for(t in e)e[t]&&(r&&(r+=" "),r+=t);return r}function Kf(){for(var e,o,t=0,r="",a=arguments.length;t<a;t++)(e=arguments[t])&&(o=wi(e))&&(r&&(r+=" "),r+=o);return r}var Ii=Kf;function Kt(...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]=Ri(n,i):(a==="className"||a==="UNSAFE_className")&&typeof n=="string"&&typeof i=="string"?o[a]=Ii(n,i):a==="id"&&n&&i?o.id=ki(n,i):o[a]=i!==void 0?i:n;}}return o}function L(...e){return e.length===1?e[0]:o=>{for(let t of e)typeof t=="function"?t(o):t!=null&&(t.current=o);}}var Gf=new Set(["id"]),Wf=new Set(["aria-label","aria-labelledby","aria-describedby","aria-details"]),Xf=new Set(["href","hrefLang","target","rel","download","ping","referrerPolicy"]),Yf=/^(data-.*)$/;function ga(e,o={}){let{labelable:t,isLink:r,propNames:a}=o,n={};for(let i in e)Object.prototype.hasOwnProperty.call(e,i)&&(Gf.has(i)||t&&Wf.has(i)||r&&Xf.has(i)||a?.has(i)||Yf.test(i))&&(n[i]=e[i]);return n}function Ti(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 va(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 Si(){return va(/^Mac/i)}function Ni(){return va(/^iPhone/i)}function Li(){return va(/^iPad/i)||Si()&&navigator.maxTouchPoints>1}function _a(){return Ni()||Li()}function za(){return Ti(/Android/i)}function ot(){return Ti(/Firefox/i)}function te(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 ey(){return typeof window.ResizeObserver<"u"}function ha(e){let{ref:o,onResize:t}=e;useEffect(()=>{let r=o?.current;if(r)if(ey()){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 uo(e){return !!e&&"label"in e&&!!e.label&&!("children"in e)}function Gt(e){return !!e&&"children"in e&&!!e.children&&"title"in e}function ry(e){return Gt(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 ie(){return useCallback(e=>ry(e),[])}function Bi(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(c=>{let l=o.collection.getItem(c);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 my(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 uy(e){var o=my(e,"string");return typeof o=="symbol"?o:String(o)}function fy(e,o,t){return o=uy(o),o in e?Object.defineProperty(e,o,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[o]=t,e}function Ei(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 Di(e){for(var o=1;o<arguments.length;o++){var t=arguments[o]!=null?arguments[o]:{};o%2?Ei(Object(t),!0).forEach(function(r){fy(e,r,t[r]);}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Ei(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r));});}return e}function Fi(e,o){var t={};for(var r in e)t[r]=o(e[r],r);return t}var yy=(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=Di(Di({},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 c=s;typeof c=="boolean"&&(c=c===!0?"true":"false");var l=e.variantClassNames[n][c];l&&(r+=" "+l);}}for(var[p,m]of e.compoundVariants)yy(p,a,e.defaultVariants)&&(r+=" "+m);return r};return o.variants=()=>Object.keys(e.variantClassNames),o.classNames={get base(){return e.defaultClassName.split(" ")[0]},get variants(){return Fi(e.variantClassNames,t=>Fi(t,r=>r.split(" ")[0]))}},o};var Oi=z({defaultClassName:"_6n12k9b _1yep5z6l0 _1yep5z6kz _1yep5z6hk _1yep5z6ki",variantClassNames:{isDropTarget:{true:"_1yep5z612n"},orientation:{vertical:"_1yep5z6166",horizontal:"_1yep5z6167"}},defaultVariants:{},compoundVariants:[]}),Hi="_6n12k98 _1yep5z6ky _1yep5z6i0 _1yep5z6i1 _1yep5z6i2",Vi=z({defaultClassName:"_6n12k99 _1yep5z6ev _1yep5z6da _1yep5z6dv",variantClassNames:{isDisabled:{true:"_1yep5z6ey"}},defaultVariants:{},compoundVariants:[]}),Ai=z({defaultClassName:"_6n12k91 _1yep5z63r _1yep5z63s _1yep5z63t _1yep5z61f _1yep5z61g _1yep5z61h _1yep5z6i0 _1yep5z6i1 _1yep5z6i2 _1yep5z6i9 _1yep5z6ia _1yep5z6ib _1yep5z6ir _1yep5z6is _1yep5z6it _1yep5z6jr _1yep5z6js _1yep5z6jt _1yep5z69l _1yep5z69m _1yep5z69n _1yep5z6dy _1yep5z6eu _1yep5z6ki _1yep5z6kl _1yep5z6ky _1yep5z6kx _1yep5z6kv _1yep5z6ks",variantClassNames:{isSelected:{},isFocused:{true:"_1yep5z612n _1yep5z616c _1yep5z616a _1yep5z616d _1yep5z612w _1yep5z612x _1yep5z612y"},isHovered:{true:"_1yep5z6114",false:"_1yep5z6113"},isFirstChild:{true:"_6n12k95"},isLastChild:{true:"_6n12k96"},isDisabled:{true:"z9nup83 _1yep5z6109"}},defaultVariants:{},compoundVariants:[]}),ji="_6n12k9f _1yep5z63 _1yep5z64 _1yep5z65 _1yep5z62f _1yep5z62g _1yep5z62h _1yep5z69l _1yep5z69m _1yep5z69n _1yep5z6i0 _1yep5z6i1 _1yep5z6i2 _1yep5z6ir _1yep5z6is _1yep5z6it",$i="_6n12k90";var Ui=z({defaultClassName:"gukncs0",variantClassNames:{isVertical:{true:"gukncs1"},isSecondary:{true:"gukncs2"}},defaultVariants:{},compoundVariants:[]});var j=io.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,...c},l)=>{let{separatorProps:p}=useSeparator({...c,orientation:r,elementType:n});return jsx(n,{...p,className:classNames(Ui({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:p.role,ref:l})});j.displayName="Separator";function Cy(e){return sprinkles.properties.has(e)}var M=io.forwardRef(({elementType:e="div",children:o,...t},r)=>{let a=e,{sprinkleProps:n,domProps:i}=useMemo(()=>{let s={},c={};for(let l in t)Cy(l)?s[l]=t[l]:c[l]=t[l];return {sprinkleProps:s,domProps:c}},[t]);return jsx(a,{...i,className:classNames(sprinkles(n),"BaselineUI-Box",i.className),ref:r,children:o})});M.displayName="Box";var rt=io.forwardRef(({item:e,isDisabled:o,isFocusVisible:t,isSelected:r,liProps:a,showSelectedIcon:n,description:i,descriptionProps:s,labelProps:c,isFocused:l,isPressed:p,_state:m},u)=>{invariant(e.value&&uo(e.value),"Item cannot be a section");let{icon:d,label:f}=e.value,{hoverProps:y,isHovered:b}=useHover({isDisabled:o}),_=filterTruthyValues({"data-selected":r,"data-disabled":o,"data-focused":l,"data-hovered":b,"data-pressed":p,"data-focus-visible":t,"data-selection-mode":m.selectionManager.selectionMode});return jsxs("li",{...mergeProps(a,y,_),className:classNames(Ai({isHovered:b,isFocused:t,isFirstChild:m.collection.getFirstKey()===e.key,isLastChild:m.collection.getLastKey()===e.key,isDisabled:o}),a.className,"BaselineUI-ListBox-Option"),style:a.style,ref:u,children:[jsxs(M,{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",{...c,children:f})]}),i?jsx("span",{className:Vi({isDisabled:o}),...s,children:i}):null]})});rt.displayName="DefaultRenderOption";var Pa=({dropState:e,orientation:o="vertical",dropIndicatorStyle:t,dropIndicatorClassName:r,renderDropIndicator:a=({isDropTarget:i,isHidden:s,dropIndicatorProps:c,orientation:l},p)=>s?null:jsx("li",{...c,ref:p,"data-drop-target":i,className:classNames(Oi({isDropTarget:i,orientation:l}),"BaselineUI-DropIndicator",r),style:t}),...n})=>{let i=io.useRef(null),{dropIndicatorProps:s,isHidden:c,isDropTarget:l}=useDropIndicator(n,e,i);return a({dropIndicatorProps:{...s,role:"option"},isHidden:c,isDropTarget:l,orientation:o},i)};var Wi=({item:e,children:o,state:t,dragState:r,...a})=>{let{dragProps:n}=useDraggableItem({key:e.key},r);return jsxs(Fragment,{children:[jsx(Pa,{target:{type:"item",key:e.key,dropPosition:"before"},...a}),o(n),t.collection.getKeyAfter(e.key)==null&&jsx(Pa,{target:{type:"item",key:e.key,dropPosition:"after"},...a})]})};Wi.displayName="DraggableListOption";var at=io.forwardRef(({item:e,renderOption:o=(u,d,f)=>jsx(rt,{item:u,liProps:d.optionProps,...d,ref:f}),showSelectedIcon:t,state:r,dragState:a,dropState:n,orientation:i,dropIndicatorStyle:s,dropIndicatorClassName:c,optionStyle:l,optionClassName:p},m)=>{let u=io.useRef(null),d=useOption({key:e.key},r,u),{value:f}=e;invariant(f&&uo(f),"ListSection should not be passed to ListOption");let y={style:typeof l=="function"?l(f):l,className:typeof p=="function"?p(f):p};return a&&n?jsx(Wi,{orientation:i,state:r,item:e,dropState:n,dragState:a,dropIndicatorStyle:s,dropIndicatorClassName:c,children:b=>o(e,{...d,showSelectedIcon:t,_state:r,optionProps:{...mergeProps(d.optionProps,b),...y}},L(u,m))}):o(e,{...d,showSelectedIcon:t,_state:r,optionProps:{...d.optionProps,...y}},L(u,m))});at.displayName="Option";var Qi=({section:e,state:o,sectionClassName:t,sectionStyle:r,showSectionHeader:a,renderSectionHeader:n,withSectionHeaderPadding:i=!1,...s})=>{let c=io.useRef(null),{itemProps:l,groupProps:p,headingProps:m}=useListBoxSection({heading:a?n?.(e,c)||e.rendered:void 0,"aria-label":e["aria-label"]}),u=o.collection.getChildren?.(e.key);invariant(u,"children must be defined");let{value:d}=e;invariant(d&&Gt(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(j,{UNSAFE_omitRole:!0}),jsxs("li",{...l,style:{...l.style,...f},className:classNames($i,y,"BaselineUI-ListBox-Section"),children:[e.rendered&&a?n?.(e,c)||jsx(M,{...m,className:classNames("BaselineUI-ListBox-SectionHeader",ji),ref:c,paddingX:"lg",typography:"label.md.medium",color:"text.primary",paddingInlineStart:i?"5xl":"lg",paddingInlineEnd:"lg",children:e.rendered}):null,jsx("ul",{...p,children:[...u].map(b=>jsx(at,{item:b,state:o,...s},b.key))})]})]})};var eo=io.createContext(null),ka=io.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":c,renderDragPreview:l,onReorder:p,state:m,listBoxHandle:u,...d},f)=>{let y=io.useRef(null),{direction:b}=useLocale(),_=io.useRef(null),{listBoxProps:v}=useListBox({...d,shouldSelectOnPressUp:i,keyboardDelegate:new ListKeyboardDelegate({collection:m.collection,ref:_,layout:o,orientation:t,direction:b,disabledKeys:m.disabledKeys})},m,_),g=useCallback((I,C)=>{let B=_.current?.querySelector(`[data-key="${I}"][role="option"]`);B&&B?.scrollIntoView({block:"nearest",inline:"nearest",...C});},[]);useImperativeHandle(u,()=>({scrollIntoView:g}),[g]),useGranularEffect(()=>{let I=mo(_.current)instanceof ShadowRoot,C=m.selectionManager.focusedKey;I&&C&&g(C);},[m.selectionManager.focusedKey],[g]);let h=useReducedMotion(),R=useCallback(I=>{let C=fe(_.current);p&&(!h&&"startViewTransition"in C?C.startViewTransition(()=>{p(I);}):p(I));},[p,h]),{collectionProps:x,dragState:k,dropState:P}=Bi({...d,onReorder:R,layout:o,orientation:t,enableReorder:i,preview:y},m,_),{isFocusVisible:w,isFocused:S,focusProps:T}=useFocusRing(),N=filterTruthyValues({"data-block-id":s,"data-block-class":c,"data-layout":o,"data-empty":m.collection.size===0,"data-focused":S,"data-focus-visible":w,"data-orientation":t});return jsxs("ul",{...mergeProps(v,T,N,x),className:classNames(Hi,"BaselineUI-ListBox",e),style:a,ref:L(f,_),children:[[...m.collection].map(I=>{let C={key:I.key,state:m,dragState:k,dropState:P,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 I.type==="section"?jsx(Qi,{...C,section:I}):jsx(at,{...C,item:I})}),l?jsx(DragPreview,{ref:y,children:l}):null]})});ka.displayName="ListBoxCore";var es=io.forwardRef((e,o)=>{let t=ie(),r=useListState({...e,children:t});return jsx(ka,{...e,ref:o,state:r})});es.displayName="ListBoxStandalone";var se=io.forwardRef((e,o)=>{let t=useContext(eo);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(ka,{...e,ref:o,state:t}):jsx(es,{...e,ref:o})});se.displayName="ListBox";var Yt="uf19bsf _1yep5z6ki",os=z({defaultClassName:"uf19bs0 _1yep5z6ai _1yep5z6aj _1yep5z6ak _1yep5z6b6 _1yep5z6b7 _1yep5z6b8 _1yep5z6bu _1yep5z6bv _1yep5z6bw _1yep5z6ci _1yep5z6cj _1yep5z6ck _1yep5z6f0 _1yep5z6kx _1yep5z6i3 _1yep5z6i4 _1yep5z6i5 _1yep5z6ir _1yep5z6is _1yep5z6it _1yep5z6jl _1yep5z6jm _1yep5z6jn _1yep5z6ks",variantClassNames:{size:{xxs:"uf19bs1",xs:"uf19bs2",sm:"uf19bs3",md:"uf19bs4",lg:"uf19bs5 _1yep5z6vw _1yep5z6vx _1yep5z6vy _1yep5z6wk _1yep5z6wl _1yep5z6wm _1yep5z6x8 _1yep5z6x9 _1yep5z6xa _1yep5z6xw _1yep5z6xx _1yep5z6xy"},isHovered:{true:"uf19bs6"},isDisabled:{true:"uf19bs7 _1yep5z610d"},isFocusVisible:{true:"uf19bs8"},variant:{primary:"uf19bs9",secondary:"uf19bsa",tertiary:"uf19bsb",ghost:"uf19bsc",toolbar:"uf19bsd _1yep5z6we _1yep5z6wf _1yep5z6wg _1yep5z6x2 _1yep5z6x3 _1yep5z6x4 _1yep5z6xq _1yep5z6xr _1yep5z6xs _1yep5z6ye _1yep5z6yf _1yep5z6yg",popover:"uf19bse _1yep5z6oz _1yep5z6p0 _1yep5z6p1 _1yep5z6mn _1yep5z6mo _1yep5z6mp _1yep5z6le _1yep5z6lf _1yep5z6lg _1yep5z6nq _1yep5z6nr _1yep5z6ns _1yep5z6uz _1yep5z6v0 _1yep5z6v1"}},defaultVariants:{},compoundVariants:[[{variant:"toolbar",isHovered:!0,isFocusVisible:!1},"_1yep5z61mg"],[{variant:"primary",isHovered:!0,isFocusVisible:!1},"_1yep5z61mg"],[{variant:"secondary",isHovered:!0,isFocusVisible:!1},"_1yep5z61ln"],[{variant:"tertiary",isHovered:!0,isFocusVisible:!1},"_1yep5z61lm _1yep5z61mg"],[{variant:"ghost",isHovered:!0,isFocusVisible:!1},"_1yep5z61ls"],[{variant:"popover",isHovered:!0,isFocusVisible:!1},"_1yep5z61o1 _1yep5z61rl _1yep5z61rp _1yep5z61rm"],[{variant:"ghost",isDisabled:!1},"_1yep5z61lr"],[{variant:"popover",size:"lg"},"_1yep5z61h4 _1yep5z61h5 _1yep5z61h6 _1yep5z61hs _1yep5z61ht _1yep5z61hu _1yep5z61ig _1yep5z61ih _1yep5z61ii _1yep5z61j4 _1yep5z61j5 _1yep5z61j6"]]});var nt=io.createContext({state:null,overlayTriggerAria:{triggerProps:{},overlayProps:{}},triggerRef:void 0}),Se=({children:e,...o})=>{let t=io.useRef(null),r=useOverlayTriggerState(o),a=useOverlayTrigger(o,r),n=useMemo(()=>({state:r,overlayTriggerAria:a,triggerRef:t}),[r,a]);return jsx(nt.Provider,{value:n,children:e})};var rs={bottom:"_1gzftth2",top:"_1gzftth3",right:"_1gzftth4",left:"_1gzftth5"},as="_1gzftth1 _1yep5z6i0 _1yep5z6i1 _1yep5z6i2",ns="_1gzftth6",is="_1gzftth8",ss="_1gzftth7",ls="var(--_1gzftth0)";function EI(e){return e.closest(".BaselineUI-Portal")||e.closest(".BaselineUI-Popover-Content")}function ps(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 Zt=io.createContext({isSelected:!1,ref:void 0}),Ne=({children:e,anchorRect:o})=>{let{state:t,overlayTriggerAria:r,triggerRef:a}=useContext(nt);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||ps(o),"If provided, the anchorRect prop must be an object with left and top number values, and optionally width and height."),jsx(Zt.Provider,{value:i,children:o?jsx("button",{className:classNames(is,"BaselineUI-PopoverTrigger-Hidden"),style:o,ref:a,tabIndex:-1},JSON.stringify(o)):e})};function Qt({tooltip:e,...o},t){let[r,a]=useState(o["aria-label"]||""),n=o["aria-labelledby"];return useEffect(()=>{if(n){let c=fe(t.current).querySelector(`#${n}`);c&&a(c.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 Jt=e=>{let o=io.useRef(null),{ref:t,...r}=useContext(Zt)||{},{buttonProps:a,isPressed:n}=useButton({...e,...r},o),{isFocusVisible:i,isFocused:s,focusProps:c}=useFocusRing(),{hoverProps:l,isHovered:p}=useHover({isDisabled:e.isDisabled});return {buttonProps:Kt(a,c,l),isPressed:n,ref:L(o,t||null),isFocusVisible:i,isFocused:s,isHovered:p,uiStateOptions:{isHovered:p,isFocused:s,isPressed:n,isDisabled:e.isDisabled,isFocusVisible:i}}},er=(e,o)=>{let t=io.useRef(null),{ref:r,...a}=useContext(Zt)||{},{buttonProps:n,isPressed:i}=useToggleButton({...e,...a},o,t);(n.role==="radio"||n.role==="checkbox")&&(n["aria-pressed"]=void 0);let{isFocusVisible:s,isFocused:c,focusProps:l}=useFocusRing(),{hoverProps:p,isHovered:m}=useHover({isDisabled:e.isDisabled});return {buttonProps:Kt(n,l,p),isPressed:i,ref:L(t,r||null),isFocusVisible:s,isFocused:c,isHovered:m,uiStateOptions:{isHovered:m,isFocused:c,isPressed:i,isDisabled:e.isDisabled,isFocusVisible:s,isSelected:o.isSelected}}};var or=z({defaultClassName:"oom8bs0 _1yep5z6ai _1yep5z6aj _1yep5z6ak _1yep5z6b6 _1yep5z6b7 _1yep5z6b8 _1yep5z6bu _1yep5z6bv _1yep5z6bw _1yep5z6ci _1yep5z6cj _1yep5z6ck _1yep5z6i3 _1yep5z6i4 _1yep5z6i5 _1yep5z69i _1yep5z69j _1yep5z69k _1yep5z6ir _1yep5z6is _1yep5z6it _1yep5z6kx _1yep5z6ky _1yep5z6ks _1yep5z6dy _1yep5z6ki",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"]]});var P1={sm:16,md:20,lg:24},$=io.forwardRef(({label:e,style:o,className:t,iconStart:r,iconEnd:a,variant:n="primary",elementType:i="button",isDisabled:s,size:c="sm","data-block-id":l,"data-block-class":p,...m},u)=>{let{buttonProps:d,isPressed:f,ref:y,isFocusVisible:b,isFocused:_,isHovered:v,uiStateOptions:g}=Jt({...m,elementType:i,isDisabled:s}),h=P1[c],R=filterTruthyValues({"data-block-id":l,"data-block-class":p,"data-disabled":s,"data-focused":_,"data-focus-visible":b,"data-hovered":v,"data-pressed":f});return jsxs(i,{...mergeProps(d,R),className:classNames(or({isDisabled:!!s,isFocusVisible:b,isHovered:v,variant:n,size:c}),"BaselineUI-ActionButton",typeof t=="function"?t(g):t),style:typeof o=="function"?o(g):o,ref:L(u,y),children:[!!r&&jsx(r,{size:h}),e,!!a&&jsx(a,{size:h}),n==="popover"&&jsx(CaretDownIcon,{size:8,className:Yt})]})});$.displayName="ActionButton";var ys=io.forwardRef(({className:e,style:o,node:t,"data-block-id":r,"data-block-class":a,...n},i)=>{let s=io.useRef(null);io.useEffect(()=>{let p=s.current;return p?.append(t),()=>{p?.contains(t)&&t.remove();}},[t]);let{pressProps:c,isPressed:l}=usePress(n);return jsx("div",{...mergeProps(n,c),className:e,style:o,"data-block-id":r,"data-block-class":a,"data-pressed":l,"data-testid":"dom-node-renderer",ref:L(i,s)})});ys.displayName="DomNodeRenderer";var bs="_14uvjig0 z9nup81",gs="_14uvjig7",vs="_14uvjig3",_s=z({defaultClassName:"_14uvjig4",variantClassNames:{isDisabled:{true:"_14uvjig5"},hasNumberInput:{false:"_14uvjig6"}},defaultVariants:{},compoundVariants:[]}),zs=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:[]}),hs="_14uvjig8",xs=z({defaultClassName:"_14uvjig9 _14uvjig1",variantClassNames:{active:{true:"_14uvjig2"},isFocusVisible:{true:"_14uvjigb _14uvjig2"},isDisabled:{true:"_14uvjigc"},isHovered:{true:"_14uvjig2"}},defaultVariants:{},compoundVariants:[]});var bo=z({defaultClassName:"nrh1ehx",variantClassNames:{isDisabled:{true:"nrh1ehy"},hasError:{true:"nrh1ehz"},labelPosition:{start:"nrh1eh10",top:"nrh1eh11"}},defaultVariants:{},compoundVariants:[]}),tr=z({defaultClassName:"nrh1eho",variantClassNames:{isDisabled:{true:"nrh1ehp"},labelPosition:{top:"nrh1ehq",start:"nrh1ehr"}},defaultVariants:{},compoundVariants:[]}),go=z({defaultClassName:"nrh1ehs",variantClassNames:{validationState:{valid:"nrh1eht",error:"nrh1ehu",warning:"nrh1ehv"},isReadOnly:{true:"nrh1ehw"}},defaultVariants:{},compoundVariants:[]}),Fe="nrh1eh3",Oe=z({defaultClassName:"nrh1eh4",variantClassNames:{labelPosition:{top:"nrh1eh5",start:"nrh1eh6"},hasMessage:{true:"nrh1eh7"}},defaultVariants:{},compoundVariants:[[{labelPosition:"start",hasMessage:!1},"nrh1eh8"]]}),He=z({defaultClassName:"nrh1eh0",variantClassNames:{labelPosition:{top:"z9nup81",start:"nrh1eh2 z9nup82"}},defaultVariants:{},compoundVariants:[]}),vo=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 Pe({description:e,errorMessageProps:o,descriptionProps:t,warningMessage:r,errorMessage:a,labelPosition:n,isDisabled:i}){return e?jsx("div",{...t,className:bo({isDisabled:i,labelPosition:n}),children:e}):a?jsx("div",{...o,className:bo({hasError:!0,labelPosition:n}),children:a}):r?jsx("div",{className:bo({isDisabled:i,labelPosition:n}),children:r}):null}var Cs=z({defaultClassName:"_1lnwne1 z9nup82",variantClassNames:{isHoveredOrFocused:{true:"_1lnwne2"},isInteractive:{false:"z9nup83"}},defaultVariants:{},compoundVariants:[[{isHoveredOrFocused:!0,isInteractive:!0},"_1lnwne4"]]}),Ps="_1lnwne0";var ks=z({defaultClassName:"_1jwycy80",variantClassNames:{placement:{bottom:"_1jwycy81",left:"_1jwycy82",right:"_1jwycy83",top:"_1jwycy84"},variant:{default:"_1jwycy85",inverse:"_1jwycy86"}},defaultVariants:{},compoundVariants:[]}),Rs=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:"_1yep5z6g0 _1yep5z6ez",inverse:"_1yep5z6d7 _1yep5z6fs _1yep5z6eu"}},defaultVariants:{},compoundVariants:[]});var Sa=io.forwardRef(({children:e,state:o,overlayProps:t,arrowProps:r,placement:a,variant:n,size:i,tooltipProps:s,includeArrow:c},l)=>{let{tooltipProps:p}=useTooltip({isOpen:o.isOpen},o),m=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]),u=useReducedMotion(),[d]=useSpring(()=>({from:{opacity:0,transform:`translate(${m.x}px, ${m.y}px)`},to:{opacity:1,transform:"translate(0, 0)"},immediate:!!u})),f=a==="center"?"bottom":a;return jsxs(animated.span,{...t,style:{...d,...t.style},ref:l,"data-placement":f,children:[c?jsx("div",{className:ks({placement:f,variant:n}),...r}):null,jsx("div",{...mergeProps(p,s),className:Rs({variant:n,size:i}),children:e})]})});Sa.displayName="TooltipContent";function Ts({ref:e,onIntersect:o,isDisabled:t,threshold:r,rootMargin:a,root:n}){let i=io.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 Ss({ref:e,onResize:o,isDisabled:t}){let r=io.useRef(null),[a,n]=io.useState();return io.useEffect(()=>{if(t){r.current?.disconnect(),r.current=null;return}r.current=new ResizeObserver(([i])=>{n(i.contentRect),o?.(i);});},[o,t,n]),io.useEffect(()=>{let{current:i}=r;return e.current&&i?.observe(e.current),()=>i?.disconnect()},[e]),{size:a}}function _o({src:e,alt:o}){let[t,r]=useState(!1),[a,n]=useState(!1),[i,s]=useState(!1),c=()=>{r(!0),s(!1);},l=()=>{n(!0),s(!1);};return useEffect(()=>{if(!e)return;s(!0);let p=new Image;return p.src=e,p.addEventListener("load",c),p.addEventListener("error",l),()=>{p.removeEventListener("load",c),p.removeEventListener("error",l);}},[e]),{isLoaded:t,hasError:a,isLoading:i,imgProps:{src:t?e:void 0,alt:o}}}function zo(){let e=useRef(!0);return useEffect(()=>{e.current=!1;},[]),e.current}var Ns="SET_STATE",ar="UNDO",nr="REDO",U1=(e,o)=>{let{past:t,present:r,future:a}=e;switch(o.type){case Ns:return {past:[...t,r],present:o.data,future:[]};case ar:return {past:t.slice(0,t?.length-1),present:t[t?.length-1],future:[r,...a]};case nr:return {past:[...t,r],present:a[0],future:a.slice(1)};default:throw new Error("Invalid action type")}},Ls=(e={},{isDisabled:o,onAction:t})=>{let r=zo(),[a,n]=useReducer(U1,{past:[],present:e,future:[]}),{past:i,present:s,future:c}=a,l=y=>{n({type:Ns,data:y});},p=useRef(),m=()=>{p.current=ar,n({type:ar});},u=()=>{p.current=nr,n({type:nr});},d=!!i?.length,f=!!c?.length;return useGranularEffect(()=>{(p.current===ar||p.current===nr)&&(t?.(s,p.current),p.current=void 0);},[s],[t,r]),{state:s,push:o?()=>{}:l,undo:o?()=>{}:m,redo:o?()=>{}:u,pastStates:i,futureStates:c,canUndo:d,canRedo:f}};var La=io.createContext({messages:{},shouldLogMissingMessages:!0}),Es=({children:e,messages:o={},shouldLogMissingMessages:t=!0,...r})=>{let a=io.useMemo(()=>({messages:o,shouldLogMissingMessages:t}),[o,t]);return jsx(I18nProvider,{...r,children:jsx(La.Provider,{value:a,children:e})})};Es.displayName="I18nProvider";function F(e){let{messages:o,shouldLogMissingMessages:t}=useContext(La);useEffect(()=>{!e&&G1(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 q=e=>e;function RS(e,o,t){let r=io.useRef(null);return io.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 Fs(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 MS({ref:e,onSelectionChange:o,onSelectionEnd:t,isDisabled:r}){let a=io.useRef(null);usePress({ref:e,isDisabled:r,onPressEnd(){let i=oe(e.current).getSelection();i&&e.current?.contains(i.anchorNode)&&t?.(i);},onPressStart(){let n=oe(e.current);a.current=n.getSelection(),a.current&&a.current.removeAllRanges();}}),useEffect(()=>{let n=e.current;if(!n||r)return;function i(){let l=oe(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 ho(e){let o=useCallback(()=>{let a=oe(e??document.body),n=a.matchMedia(queries.tablet);return a.matchMedia(queries.desktop).matches?"desktop":n.matches?"tablet":"mobile"},[e]),[t,r]=io.useState(o);return Te(()=>{let a=oe(e),n=()=>{r(o());};return a.addEventListener("resize",n),n(),()=>{a.removeEventListener("resize",n);}},[e,o]),t}var Ma=io.createContext(void 0),Hs=({portalContainer:e,children:o})=>jsx(Ma.Provider,{value:e,children:o});Hs.displayName="PortalContainerProvider";function be(e){let o=useContext(Ma);return e||o}var Vs=z({defaultClassName:"z9nup84",variantClassNames:{size:{xs:"z9nup85",sm:"z9nup86"}},defaultVariants:{},compoundVariants:[]});var As="z9nup80",xo="z9nup83",js="z9nup87";function Ba(e=window){let[o,t]=useState("light"),[r,a]=useState(!1),[n,i]=useState(!1),[s,c]=useState(!1);return useEffect(()=>{let l=e.matchMedia("(prefers-color-scheme: dark)"),p=m=>{t(m.matches?"dark":"light");};return l.matches&&t("dark"),l.addEventListener("change",p),()=>{l.addEventListener("change",p);}},[e]),useEffect(()=>{let l=e.matchMedia("(prefers-contrast: more)"),p=m=>{a(m.matches);};return a(l.matches),l.addEventListener("change",p),()=>{l.addEventListener("change",p);}},[e]),useEffect(()=>{let l=e.matchMedia("(prefers-reduced-motion: reduce)"),p=m=>{i(m.matches);};return l.matches&&i(!0),l.addEventListener("change",p),()=>{l.addEventListener("change",p);}},[e]),useEffect(()=>{let l=e.matchMedia("(prefers-reduced-transparency: reduce)"),p=m=>{c(m.matches);};return l.matches&&c(!0),l.addEventListener("change",p),()=>{l.addEventListener("change",p);}},[e]),{colorScheme:o,highContrast:r,reducedMotion:n,transparency:s}}var Co=createContext({theme:lightTheme,setTheme:()=>{}});var $s="var(--hj25q10)";var lr={LIGHT:{name:"light",theme:lightTheme},DARK:{name:"dark",theme:darkTheme}},Po=io.forwardRef(({theme:e="system",children:o,setTheme:t,className:r,style:a,UNSAFE_domProps:n,"data-block-id":i,"data-block-class":s},c)=>{let{direction:l}=useLocale(),{colorScheme:p,reducedMotion:m,highContrast:u,transparency:d}=Ba(),{name:f,theme:y}=useMemo(()=>{switch(e){case"system":return p==="light"?lr.LIGHT:lr.DARK;case"light":return lr.LIGHT;case"dark":return lr.DARK;default:return {name:"custom",theme:e}}},[p,e]),b=ho(),_={"data-theme":f,"data-block-id":i,"data-block-class":s,"data-reduced-motion":m,"data-high-contrast":u,"data-transparency":d,"data-device":b},v=useMemo(()=>({theme:y,setTheme:t}),[y,t]);return jsx(Co.Provider,{value:v,children:jsx("div",{...mergeProps(n,_),className:classNames(As,"BaselineUI-ThemeProvider",r),style:{...assignInlineVars(themeVars,y),...assignInlineVars({[$s]:l==="rtl"?"-1":"1"}),...a},ref:c,children:o})})});Po.displayName="ThemeProvider";var ko=io.forwardRef(({className:e,style:o,children:t,"data-block-id":r,"data-block-class":a,...n},i)=>{let{theme:s}=useContext(Co);return jsx(Overlay,{...n,children:jsx(Po,{ref:i,theme:s,style:o,className:classNames("BaselineUI-Portal",e),"data-block-id":r,"data-block-class":a,children:t})})});ko.displayName="Portal";var re=io.forwardRef(({children:e,placement:o="bottom",delay:t=1e3,closeDelay:r=500,variant:a="default",size:n="md",includeArrow:i=!0,portalContainer:s,className:c,style:l,"data-block-id":p,"data-block-class":m,...u},d)=>{let f=io.useRef(null),y=io.useRef(null),b=!u.text||u.isDisabled,_=useTooltipTriggerState({...u,delay:t,closeDelay:r,isDisabled:b}),{triggerProps:v,tooltipProps:g}=useTooltipTrigger({...u,isDisabled:b,delay:t,closeDelay:r},_,f),h=be(s),{overlayProps:R,arrowProps:x,placement:k,updatePosition:P}=useOverlayPosition({arrowSize:i?13:0,targetRef:f,arrowBoundaryOffset:i?8:0,offset:i?12:2,overlayRef:y,placement:o,isOpen:_.isOpen,...u});return Ts({ref:y,threshold:1,onIntersect:P,isDisabled:!_.isOpen}),Ss({ref:f,onResize:P,isDisabled:!_.isOpen}),jsxs(FocusableProvider,{...v,ref:f,children:[e,_.isOpen?jsx(ko,{disableFocusManagement:!0,portalContainer:h,className:c,style:l,"data-block-id":p,"data-block-class":m,children:jsx(Sa,{ref:L(d,y),state:_,arrowProps:x,overlayProps:R,placement:k,tooltipProps:g,variant:a,size:n,includeArrow:i,children:u.text})}):null]})});re.displayName="Tooltip";var Sb={xxs:8,xs:12,sm:16,md:20,lg:24},E=io.forwardRef((e,o)=>{let t=te(o),{tooltipProps:r}=Qt(e,t);return r?jsx(re,{...r,children:jsx(Da,{...e,ref:t})}):jsx(Da,{...e,ref:t})});E.displayName="ActionIconButton";var Da=io.forwardRef(({className:e,style:o,icon:t,size:r="md",variant:a="primary",UNSAFE_NON_INTERACTIVE:n,elementType:i=n?"div":"button",...s},c)=>{let l=s["aria-label"],p=s["aria-labelledby"];useEffect(()=>{!l&&!p&&console.warn("An `ActionIconButton` requires an aria-label or aria-labelledby prop.");},[l,p]);let{buttonProps:m,isPressed:u,ref:d,isFocusVisible:f,isFocused:y,isHovered:b,uiStateOptions:_}=Jt({...s,elementType:i}),v=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":u});return jsxs(i,{...mergeProps(m,v),className:classNames(os({variant:a,size:r,isDisabled:!!s.isDisabled,isFocusVisible:f,isHovered:b}),"BaselineUI-ActionIconButton",typeof e=="function"?e(_):e),ref:L(c,d),style:typeof o=="function"?o(_):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:Sb[r]}),a==="popover"&&jsx(CaretDownIcon,{size:8,className:Yt})]})});Da.displayName="ActionIconButtonCore";var Le=io.forwardRef(({className:e,style:o,labelPosition:t="top",variant:r="primary",showStepper:a=!0,...n},i)=>{let s=io.useRef(null),{locale:c}=useLocale(),l=useNumberFieldState({...n,locale:c}),{hoverProps:p,isHovered:m}=useHover({isDisabled:n.isDisabled}),{focusProps:u,isFocusVisible:d,isFocused:f}=useFocusRing(),{labelProps:y,decrementButtonProps:b,inputProps:_,incrementButtonProps:v,groupProps:g,descriptionProps:h,errorMessageProps:R}=useNumberField(n,l,s),x=useMemo(()=>n.isReadOnly?ReadOnlyIcon:n.isInvalid?ErrorFilledIcon:null,[n.isInvalid,n.isReadOnly]),k=Pe({description:n.description,errorMessageProps:R,descriptionProps:h,errorMessage:n.errorMessage,labelPosition:t,isDisabled:n.isDisabled}),P=filterTruthyValues({"data-disabled":n.isDisabled,"data-readonly":n.isReadOnly,"data-hovered":m,"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(He({labelPosition:t}),"BaselineUI-NumberInput",e),...P,ref:i,children:[n.label?jsxs("div",{className:Oe({labelPosition:t,hasMessage:!!k}),children:[jsx("label",{...y,className:Fe,children:n.label}),t==="start"&&k]}):null,jsxs("div",{className:classNames({[xo]:n.isDisabled}),children:[jsxs("div",{...mergeProps(g,p),className:classNames(vo({isHovered:m,isDisabled:!!n.isDisabled,isReadOnly:!!n.isReadOnly,validationState:n.isInvalid?"error":"valid",isFocused:f,variant:r}),{[Ps]:t==="start"},"BaselineUI-NumberInput-Container"),children:[jsx("input",{...mergeProps(_,u),ref:s,className:classNames("BaselineUI-NumberInput-Input",tr({isDisabled:n.isDisabled,labelPosition:t}))}),x?jsx(x,{className:go({validationState:"error",isReadOnly:n.isReadOnly}),size:16}):null,a?jsxs("div",{className:Cs({isHoveredOrFocused:m||f,isInteractive:!n.isReadOnly&&!n.isDisabled}),children:[jsx(E,{variant:"secondary",size:"xxs",icon:MinusIcon,...b,className:"BaselineUI-NumberInput-DecrementButton"}),jsx(j,{style:{height:16},orientation:"vertical"}),jsx(E,{variant:"secondary",size:"xxs",icon:PlusIcon,...v,className:"BaselineUI-NumberInput-DecrementButton"})]}):null]}),t==="top"&&k]})]})});Le.displayName="NumberInput";var wo=io.forwardRef(({className:e,style:o,onChange:t,onChangeEnd:r,numberFormatOptions:a,isDisabled:n,step:i,minValue:s,maxValue:c,value:l,"aria-label":p,"aria-labelledby":m,"aria-details":u,"aria-describedby":d,"data-block-id":f,"data-block-class":y,defaultValue:b,isReadOnly:_,label:v,id:g,includeNumberInput:h},R)=>{let x=io.useRef(null),k={onChange:t===void 0?void 0:C=>{t(C[0]);},isDisabled:n||_,step:i,minValue:s,maxValue:c,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":p,"aria-labelledby":m,"aria-details":u,"aria-describedby":d,id:g,label:v},P=useNumberFormatter(a),w=useSliderState({...k,numberFormatter:P}),{trackProps:S,groupProps:T,labelProps:N}=useSlider(k,w,x),I=jsx(Le,{variant:"ghost",showStepper:!1,"aria-label":p,"aria-labelledby":N.id,value:w.getThumbValue(0),formatOptions:a,onChange:C=>{w.setThumbValue(0,C);},style:{width:55,textAlign:"right",flexShrink:0}});return jsxs("div",{...T,style:o,"data-block-id":f,"data-block-class":y,className:classNames(bs,"BaselineUI-Slider",e),children:[v?jsxs("div",{className:vs,children:[jsx("label",{...N,className:classNames(_s({isDisabled:n,hasNumberInput:!!h}),"BaselineUI-Slider-Label"),children:v}),h?I:null]}):null,jsxs("div",{className:gs,children:[jsx("div",{...S,className:classNames(hs,"BaselineUI-Slider-Track"),ref:L(x,R),"data-testid":"track",children:jsx(Zb,{state:w,trackRef:x,isDisabled:n,isReadOnly:_})}),h&&!v?I:null]})]})});wo.displayName="Slider";function Zb({state:e,trackRef:o,isDisabled:t,isReadOnly:r}){let a=io.useRef(null),{thumbProps:n,inputProps:i,isDragging:s}=useSliderThumb({trackRef:o,inputRef:a},e),{focusProps:c,isFocused:l,isFocusVisible:p}=useFocusRing(),{hoverProps:m,isHovered:u}=useHover({isDisabled:t}),d=filterTruthyValues({"data-disabled":t,"data-readonly":r,"data-hovered":u,"data-focus-visible":p,"data-dragging":s,"data-focused":l});return jsxs(Fragment,{children:[jsx("div",{className:classNames(xs({isDisabled:t,isFocusVisible:p,active:s,isHovered:u}),"BaselineUI-Slider-TrackHighlight"),style:{width:n.style?.left},"data-testid":"track-highlight"}),jsx("div",{...mergeProps(n,m,d),className:classNames(zs({isDisabled:t,isFocusVisible:p,active:s,isReadOnly:r,isHovered:u}),"BaselineUI-Slider-Thumb"),"data-testid":"thumb",children:jsx(VisuallyHidden,{children:jsx("input",{ref:a,...mergeProps(i,c)})})})]})}var Js=z({defaultClassName:"_1tkzayn0 _1yep5z6dy",variantClassNames:{size:{sm:"_1tkzayn1",md:"_1tkzayn2",lg:"_1tkzayn3"},type:{subtitle:"_1yep5z6105",title:"_1yep5z6105",label:"_1yep5z6106",value:"_1yep5z6106",helper:"_1yep5z6107",body:"_1yep5z6105"}},defaultVariants:{},compoundVariants:[[{type:"title",size:"sm"},"_1yep5z61jz"],[{type:"title",size:"md"},"_1yep5z61k2"],[{type:"title",size:"lg"},"_1yep5z61k5"],[{type:"body",size:"sm"},"_1yep5z61kp"],[{type:"body",size:"md"},"_1yep5z61ks"],[{type:"body",size:"lg"},"_1yep5z61ks"],[{type:"subtitle",size:"sm"},"_1yep5z61kl"],[{type:"subtitle",size:"md"},"_1yep5z61ko"],[{type:"subtitle",size:"lg"},"_1yep5z61ko"],[{type:"label",size:"md"},"_1yep5z61kn"],[{type:"label",size:"lg"},"_1yep5z61kn"],[{type:"value",size:"md"},"_1yep5z61kn"],[{type:"value",size:"lg"},"_1yep5z61kn"],[{type:"helper",size:"sm"},"_1yep5z61kh"]]});var J=io.forwardRef(({elementType:e="span",type:o="title",children:t,size:r="md",...a},n)=>jsx(e,{...a,className:classNames(Js({size:r,type:o}),"BaselineUI-Text",a.className),ref:n,children:t}));J.displayName="Text";var el=z({defaultClassName:"siobe21 _1yep5z6ao _1yep5z6ap _1yep5z6aq _1yep5z6bc _1yep5z6bd _1yep5z6be _1yep5z6d7 _1yep5z6l9 _1yep5z6l7 _1yep5z6gq _1yep5z6ky _1yep5z6i0 _1yep5z6i1 _1yep5z6i2 _1yep5z6ic _1yep5z6id _1yep5z6ie",variantClassNames:{background:{subtle:"_1yep5z6113",medium:"_1yep5z6114"},isFocusVisible:{true:"_1yep5z616a _1yep5z616c _1yep5z616d _1yep5z612n"}},defaultVariants:{},compoundVariants:[]}),ol="siobe25",tl="var(--siobe20)";var mr=io.forwardRef(({className:e,style:o,children:t,background:r="medium",title:a,action:n,"data-block-id":i,"data-block-class":s,onCloseRequest:c,...l},p)=>{let{formatMessage:m}=F(),u=io.useRef(null),{dialogProps:d,titleProps:f}=useDialog(l,u),{focusProps:y,isFocusVisible:b}=useFocusRing();return jsxs("div",{...mergeProps(d,y),className:classNames(el({background:r,isFocusVisible:b}),"BaselineUI-Drawer",e),"data-block-id":i,"data-block-class":s,style:o,ref:L(p,u),children:[jsxs(M,{paddingLeft:"lg",paddingRight:"sm",backgroundColor:"background.primary.subtle",display:"flex",justifyContent:"space-between",alignItems:"center",gap:"lg",className:ol,children:[jsx(J,{type:"title",size:"sm",...f,className:js,children:a}),jsxs(M,{children:[n?jsx(E,{...n,variant:"secondary"}):null,jsx(E,{variant:"secondary",size:"md",icon:XIcon,onPress:c,"aria-label":m(sg.close)})]})]}),jsx(j,{variant:r==="subtle"?"primary":"secondary"}),t]})});mr.displayName="Drawer";var sg=q({close:{id:"close",defaultMessage:"Close"}});function nl(e,o,t){let{isDisabled:r}=e,a=useReducedMotion(),[n,i]=io.useState("100vh");useEffect(()=>{if(!_a()&&!za())return;let d=oe(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},c]=useSpring(()=>({y:0,immediate:a,config:{easing:easings.easeOutCubic}})),l=useRef(0),p=useCallback(()=>{c.start({y:l.current,onRest:()=>{o.close();}});},[c,o]),m=useCallback(d=>{d.target.closest("[data-drawer]")||p();},[p]);useGranularLayoutEffect(()=>{l.current=t.current?.offsetHeight||0,c.set({y:l.current}),c.start({y:0,immediate:!!a});},[],[c,a]);let u=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:u},onPointerDown:r?void 0:m},close:p,containerHeight:r?void 0:n}}var il=z({defaultClassName:"aml2vl0 _1yep5z6ko _1yep5z6kp _1yep5z6kr _1yep5z6kq _1yep5z6i0 _1yep5z6i1 _1yep5z6i2 _1yep5z6hr _1yep5z6hs _1yep5z6ht",variantClassNames:{enableDrawer:{false:"_1yep5z6ir _1yep5z6is _1yep5z6it _1yep5z6jl _1yep5z6jm _1yep5z6jn",true:"aml2vl2"}},defaultVariants:{},compoundVariants:[]}),sl="_1yep5z6ko _1yep5z6kp _1yep5z6kr _1yep5z6kq _1yep5z6g2 _1yep5z6hr _1yep5z6hs _1yep5z6ht";var Ae=io.createContext({state:null,triggerProps:{},overlayProps:{}}),ke=({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(Ae.Provider,{value:n,children:e})};ke.displayName="Modal";var Va=io.createContext({isDrawer:!1,closeDrawer:()=>{}}),wg=animated(Po),Ig=({children:e,className:o,style:t,isDismissable:r=!0,isKeyboardDismissDisabled:a=!1,portalContainer:n,disableAnimation:i,enableDrawer:s=!1,"data-block-id":c,"data-block-class":l})=>{let{state:p}=io.useContext(Ae),m=ho(n),u=be(n),d=typeof s=="boolean"&&s||s==="auto"&&m==="mobile";invariant(p,"ModalContent must be a child of Modal");let f=io.useRef(null),y=typeof r=="function"?r(d):r,b=typeof a=="function"?a(d):a,{underlayProps:_,overlayProps:v,close:g,containerHeight:h}=nl({isDisabled:!d,isDismissable:y},p,f),{modalProps:R,underlayProps:x}=useModalOverlay({isDismissable:!1,isKeyboardDismissDisabled:b},p,f),{theme:k}=useContext(Co),P=useReducedMotion(),w=useSpring({from:{opacity:0,transform:"scale(0.95)"},to:{opacity:1,transform:"scale(1)"},immediate:!!P||i,config:{easing:easings.easeInBounce}}),S=useMemo(()=>({...R.style,...d?{...v.style,width:"100%"}:w}),[v.style,R.style,d,w]),T=useMemo(()=>({isDrawer:d,closeDrawer:g}),[d,g]),N=useMemo(()=>mergeProps(x,_,{onPointerDown:d?_.onPointerDown:x.onPointerDown,onClick:()=>{r&&!d&&p.close();}}),[_,r,d,p,x]);return jsx(Overlay,{portalContainer:u,children:jsx(Va.Provider,{value:T,children:jsxs(wg,{className:classNames(il({enableDrawer:d}),o),theme:k,"data-block-id":c,"data-block-class":l,style:{...t,height:d?h:"auto",...assignInlineVars({[tl]:h})},children:[jsx(animated.div,{...N,"data-testid":"underlay",style:_.style,className:classNames(sl,"BaselineUI-Modal-Underlay")}),jsx(animated.div,{...mergeProps(R,v),style:S,ref:f,"data-drawer":d,className:"BaselineUI-Modal-Content",children:typeof e=="function"?e(p):e})]})})})},Tg=animated(Ig),Me=({children:e,style:o,...t})=>{let{state:r}=io.useContext(Ae);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(Tg,{...t,style:{...o,...i},children:typeof e=="function"?e(r):e}))};var ml=z({defaultClassName:"cjv3et0 _1yep5z6al _1yep5z6am _1yep5z6an _1yep5z6b9 _1yep5z6ba _1yep5z6bb _1yep5z6bx _1yep5z6by _1yep5z6bz _1yep5z6cl _1yep5z6cm _1yep5z6cn _1yep5z6fs _1yep5z6d7",variantClassNames:{size:{sm:"cjv3et1",md:"cjv3et2",lg:"cjv3et3",content:"cjv3et4"},variant:{primary:"_1yep5z6121 _1yep5z616i _1yep5z616k",ghost:"cjv3et6"},isDrawer:{true:"cjv3et7 _1yep5z6xq _1yep5z6xr _1yep5z6xs _1yep5z6ye _1yep5z6yf _1yep5z6yg _1yep5z6166"},isFocusVisible:{true:"_1yep5z612n _1yep5z616d _1yep5z616c _1yep5z616a"}},defaultVariants:{},compoundVariants:[]});var ja=io.createContext({titleProps:{}}),me=io.forwardRef(({children:e,className:o,style:t,inheritDrawer:r,size:a="md",variant:n="primary","data-block-id":i,"data-block-class":s,drawerBackground:c,...l},p)=>{let m=io.useRef(null),u=io.useRef(null),{isDrawer:d,closeDrawer:f}=useContext(Va),[y,b]=io.useState(""),{focusProps:_,isFocusVisible:v}=useFocusRing();useLayoutEffect(()=>{let x=u.current?.getRootNode(),k=l["aria-label"]||"";l["aria-labelledby"]&&(k=x?.querySelector(`#${l["aria-labelledby"].replaceAll(":","\\:")}`)?.textContent||""),b(k);},[l]);let{dialogProps:g,titleProps:h}=useDialog(l,m),R=useMemo(()=>({titleProps:h}),[h]);return d&&r?jsx(mr,{title:y,onCloseRequest:f,className:o,...l,"data-drawer":!0,"data-block-id":i,"data-block-class":s,ref:L(u,p),background:c,children:e}):jsx(ja.Provider,{value:R,children:jsx("section",{...mergeProps(g,_),"data-block-id":i,"data-block-class":s,ref:L(m,p),style:t,className:classNames(ml({size:d?"content":a,variant:n,isDrawer:d,isFocusVisible:v}),"BaselineUI-Dialog",o),children:e})})});me.displayName="Dialog";var ul=io.forwardRef(({children:e,className:o,style:t},r)=>{let{titleProps:a}=useContext(ja);return io.isValidElement(e)?io.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})});ul.displayName="DialogTitle";function fl({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 bl=({children:e,isOpen:o,popoverContentRef:t,portalContainer:r=document.body,style:a})=>{let[n,i]=useState(!1),[s,c]=useState(null),l=useRef(null);useEffect(()=>{o?i(!0):l.current=setTimeout(()=>{i(!1);},200);},[o]),useEffect(()=>()=>{l.current&&clearTimeout(l.current);},[]);let p=t.current;return useEffect(()=>{p&&c(p.getBoundingClientRect());},[p]),jsxs(Fragment,{children:[n?qg.createPortal(jsx("div",{style:{position:"absolute",left:a?.left,top:a?.top,width:s?.width,height:s?.height},className:"BaselineUI-Popover-ClickPreventionLayer"}),r):null,e]})};var{color:qa}=themeVars,ye=io.forwardRef(({className:e,style:o,state:t,overlayProps:r,underlayClassName:a,children:n,includeArrow:i=!1,offset:s=2,portalContainer:c,contentContainerClassName:l,contentContainerStyle:p,"data-block-id":m,"data-block-class":u,...d},f)=>{let y=io.useRef(null),b=be(c),_=i?8:0,{underlayProps:v,popoverProps:g,placement:h,arrowProps:R}=usePopover({...d,offset:s+_,popoverRef:y,containerPadding:d.containerPadding||0},t);delete g.style?.position;let x=fl({placement:h,isOpen:t.isOpen}),k=h==="center"?"bottom":h;return jsx(bl,{isOpen:t.isOpen,popoverContentRef:y,portalContainer:b,style:g.style,children:x((P,w)=>w&&jsxs(ko,{portalContainer:b,style:o,ref:f,"data-block-id":m,"data-block-class":u,children:[!d.isNonModal&&jsx("div",{...v,className:classNames(ss,a,"BaselineUI-Popover-Underlay")}),jsxs(animated.div,{...g,style:{...g.style,...P,...assignInlineVars({[ls]:`${d.triggerRef?.current?.offsetWidth}px`})},ref:L(y,f),className:classNames(as,"BaselineUI-Popover-Content",e),"data-placement":["top","bottom","left","right"].filter(S=>h?.includes(S)),children:[i?jsxs("svg",{className:classNames(rs[k],"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:qa.border.medium}),jsx("path",{d:"M7.504 6.492 2.248.488h10.511L10.132 3.49 7.504 6.492Z",fill:qa.background.primary.subtle,stroke:qa.background.primary.subtle})]}):null,jsx(DismissButton,{onDismiss:t.close}),jsx("div",{...r,style:p,className:classNames(ns,l),children:typeof n=="function"?n(t):n}),jsx(DismissButton,{onDismiss:t.close})]})]}))})});ye.displayName="PopoverContentCore";var Re=io.forwardRef((e,o)=>{let{state:t,overlayTriggerAria:{overlayProps:r},triggerRef:a}=useContext(nt);return invariant(a),t?jsx(ye,{ref:o,...e,triggerRef:e.triggerRef||a,overlayProps:r,state:t}):null});Re.displayName="PopoverContent";var _l=z({defaultClassName:"_1mdhlqv3",variantClassNames:{isOpen:{true:"_1mdhlqv4"}},defaultVariants:{},compoundVariants:[]}),je="_1mdhlqv6 _1yep5z6al _1yep5z6am _1yep5z6an _1yep5z6b9 _1yep5z6ba _1yep5z6bb _1yep5z6bx _1yep5z6by _1yep5z6bz _1yep5z6cl _1yep5z6cm _1yep5z6cn _1yep5z6d7",zl=z({defaultClassName:"_1mdhlqv0 _1yep5z66 _1yep5z67 _1yep5z68 _1yep5z62i _1yep5z62j _1yep5z62k _1yep5z63o _1yep5z63p _1yep5z63q _1yep5z61c _1yep5z61d _1yep5z61e _1yep5z6i0 _1yep5z6i1 _1yep5z6i2 _1yep5z6ir _1yep5z6is _1yep5z6it _1yep5z69o _1yep5z69p _1yep5z69q _1yep5z6eu _1yep5z6jr _1yep5z6js _1yep5z6jt _1yep5z6dy",variantClassNames:{isFocused:{false:"_1mdhlqv1"},isDisabled:{true:"z9nup83 _1yep5z6ey"}},defaultVariants:{},compoundVariants:[]}),br="_1mdhlqv7 _1yep5z6al _1yep5z6am _1yep5z6an _1yep5z6b9 _1yep5z6ba _1yep5z6bb _1yep5z6bx _1yep5z6by _1yep5z6bz _1yep5z6cl _1yep5z6cm _1yep5z6cn _1yep5z6fs",hl="_1yep5z66x _1yep5z66y _1yep5z66z",xl="_1mdhlqv5 _1yep5z6i0 _1yep5z6i1 _1yep5z6i2 _1yep5z6i9 _1yep5z6ia _1yep5z6ib _1yep5z6ir _1yep5z6is _1yep5z6it _1yep5z69i _1yep5z69j _1yep5z69k";var Rl=io.forwardRef(({className:e,style:o,onChange:t,"data-block-id":r,icon:a,formatValue:n=p=>p,tooltipProps:i,popoverContentProps:s,...c},l)=>{let p=te(l),[m,u]=useControlledState(c.value,c.defaultValue||0,t),[d,f]=io.useState(!1),{keyboardProps:y}=useKeyboard({onKeyDown:v=>{(v.key==="Enter"||v.key==="Escape")&&f(!1);}}),b=n(m||0),_=i?.isDisabled||c["aria-label"]?`${c["aria-label"]}, ${b}`:b.toString();return jsxs(M,{display:"flex",flexDirection:"row",gap:"md",paddingX:"md",alignItems:"center",className:classNames("BaselineUI-IconSlider",e),"data-block-id":r,style:o,ref:p,children:[a?jsx(a,{size:24,className:sprinkles({color:"icon.primary"})}):null,jsxs(Se,{type:"dialog",isOpen:d,onOpenChange:f,children:[jsx(Ne,{children:jsx(re,{text:c["aria-label"],size:"sm",variant:"inverse",includeArrow:!1,...i,children:jsx($,{label:b,variant:"popover","aria-label":_,style:{fontVariantNumeric:"tabular-nums"}})})}),jsx(Re,{placement:"bottom start",...s,className:classNames(je,s?.className),children:jsx(me,{size:"content","aria-label":_,children:jsx(FocusScope,{autoFocus:!0,children:jsx(M,{paddingY:"sm",paddingX:"lg",marginY:"md",style:{width:215},...y,children:jsx(wo,{...c,onChange:v=>{u(v),t?.(v);},value:m})})})})})]})]})});Rl.displayName="IconSlider";var wl=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"]]}),Il=z({defaultClassName:"bpklwae",variantClassNames:{isDisabled:{true:"bpklwaf"},isSelected:{true:"bpklwag"},isReadOnly:{true:"bpklwah"}},defaultVariants:{},compoundVariants:[]}),Tl="bpklwad",Sl=z({defaultClassName:"bpklwa0",variantClassNames:{labelPosition:{top:"bpklwa1",left:"bpklwa2"}},defaultVariants:{},compoundVariants:[]}),Nl="bpklwa6",Ll=z({defaultClassName:"bpklwa3",variantClassNames:{labelPosition:{top:"bpklwa4",left:"bpklwa5"}},defaultVariants:{},compoundVariants:[]});var Dl=io.forwardRef(({className:e,label:o,labelPosition:t="top",statusLabel:r,style:a,"data-block-id":n,"data-block-class":i,...s},c)=>{let l=io.useRef(null),p=useToggleState(s),{inputProps:m,isPressed:u}=useSwitch(s,p,l),{isFocusVisible:d,focusProps:f}=useFocusRing(),{hoverProps:y,isHovered:b}=useHover({isDisabled:s.isDisabled}),_=filterTruthyValues({"data-block-id":n,"data-block-class":i,"data-focused":d,"data-disabled":s.isDisabled,"data-focus-visible":d,"data-selected":p.isSelected,"data-readonly":s.isReadOnly,"data-hovered":b,"data-pressed":u}),v=jsx("div",{className:classNames(wl({isSelected:p.isSelected,isDisabled:!!s.isDisabled,isFocused:d,isReadOnly:!!s.isReadOnly}),"BaselineUI-Switch-Track"),children:jsx("div",{className:classNames(Il({isSelected:p.isSelected,isDisabled:s.isDisabled,isReadOnly:s.isReadOnly}),"BaselineUI-Switch-Knob"),"data-testid":"switch-knob"})});return jsxs("label",{...mergeProps(_,y),className:classNames(Sl({labelPosition:t}),"BaselineUI-Switch",e),style:a,ref:c,children:[o?jsx("span",{className:classNames(Tl,"BaselineUI-Switch-Label"),children:o}):null,jsx(VisuallyHidden,{children:jsx("input",{...mergeProps(m,f),ref:l})}),r?jsxs("div",{className:Ll({labelPosition:t}),children:[jsx("span",{className:classNames("BaselineUI-Switch-Status-Label",Nl),children:p.isSelected?r.on:r.off}),v]}):v]})});Dl.displayName="Switch";var Fl="_19n40yy9",Ol=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 xv={sm:SearchIcon,md:SearchIcon$1,lg:SearchIcon$1},Al=io.forwardRef(({className:e,size:o="md",variant:t="primary","data-block-id":r,"data-block-class":a,style:n,...i},s)=>{let c=io.useRef(null),l=useSearchFieldState(i),{inputProps:p,clearButtonProps:m}=useSearchField({...i,"aria-haspopup":!1,"aria-autocomplete":"none",type:"search"},l,c),{focusProps:u,isFocusVisible:d,isFocused:f}=useFocusRing({within:!0,isTextInput:!0}),y=xv[o],b=o==="sm"?XIcon$2:XIcon$3,_=filterTruthyValues({"data-block-id":r,"data-block-class":a,"data-focused":f,"data-disabled":i.isDisabled,"data-focus-visible":d});return jsxs("div",{..._,className:classNames(Ol({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(p,u),className:Fl,ref:c}),l.value!==""&&jsx(E,{icon:b,...m,size:o==="sm"?"xs":"sm",variant:"secondary"})]})});Al.displayName="SearchInput";var jl="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 _1yep5z6l0 _1yep5z6kz _1yep5z6hf _1yep5z6l3 _1yep5z6fs",$l="xyd2ss0 _1yep5z66 _1yep5z67 _1yep5z68 _1yep5z62i _1yep5z62j _1yep5z62k _1yep5z64l _1yep5z64m _1yep5z64n _1yep5z629 _1yep5z62a _1yep5z62b";var Wa=({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(j,{elementType:"li"}),jsxs("li",{...r,children:[e.value?.title?jsx(VisuallyHidden,{children:jsx("span",{...n,children:e.value.title})}):null,jsx("ul",{...a,className:$l,children:[...e.childNodes].map(i=>(invariant(i.type==="item"),jsx(gr,{item:i,state:t,showSelectedIcon:o},i.key)))})]})]})};Wa.displayName="MenuSection";var gr=({item:e,state:o,className:t,showSelectedIcon:r})=>{let a=io.useRef(null),n=useMenuItem({key:e.key},o,a),{isFocusVisible:i,focusProps:s}=useFocusRing();return jsx(rt,{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})};gr.displayName="MenuItem";var Ya=io.forwardRef(({className:e,itemClassName:o,onContentKeyDown:t,...r},a)=>{let n=useTreeState(r),i=io.useRef(null),{menuProps:s}=useMenu(r,n,i),{keyboardProps:c}=useKeyboard({onKeyDown:t});return jsx("ul",{...mergeProps(s,c),className:classNames(jl,e),ref:L(i,a),children:[...n.collection].map(l=>l.type==="section"?jsx(Wa,{section:l,state:n,showSelectedIcon:r.selectionMode==="multiple"||r.selectionMode==="single"},l.key):jsx(gr,{item:l,state:n,className:o,showSelectedIcon:r.selectionMode==="multiple"||r.selectionMode==="single"},l.key))})});Ya.displayName="MenuContent";var vr=io.forwardRef(({defaultOpen:e,onOpenChange:o,isOpen:t,isDisabled:r,contentClassName:a,placement:n="bottom start",isNonModal:i,shouldFlip:s,shouldUpdatePosition:c,boundaryElement:l,crossOffset:p,offset:m,triggerLabel:u,renderTrigger:d=({buttonProps:_,ref:v})=>jsx($,{..._,variant:"popover",ref:v}),portalContainer:f,...y},b)=>{let _=io.useRef(null),v=be(f),g=useMenuTriggerState({defaultOpen:e,isOpen:t,onOpenChange:o}),{menuTriggerProps:h,menuProps:R}=useMenuTrigger({isDisabled:r,type:"menu"},g,_),x=ie(),k=useMemo(()=>mergeProps(h,{isDisabled:r,isSelected:g.isOpen,className:"BaselineUI-Menu-Trigger",label:typeof u=="function"?u(g.isOpen):u}),[h,r,g.isOpen,u]);return useEffect(()=>{!u&&!d&&console.warn("The `triggerLabel` prop is required when no `renderTrigger` or `children` is provided.");},[d,u]),jsxs(Fragment,{children:[d({buttonProps:k,ref:_}),jsx(ye,{triggerRef:_,state:g,placement:n,isNonModal:i,shouldFlip:s,shouldUpdatePosition:c,boundaryElement:l,crossOffset:p,offset:m||2,className:classNames(je,"BaselineUI-Menu-Popover"),portalContainer:v,children:jsx(Ya,{className:a,...R,...y,ref:b,autoFocus:g.focusStrategy||"first",children:x})})]})});vr.displayName="Menu";var _r=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 Wl=io.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":c,title:l,role:p,...m},u)=>{let d=io.useRef(null),{linkProps:f,isPressed:y}=useLink({...m,elementType:m.onPress?"span":n},d),{isFocusVisible:b,isFocused:_,focusProps:v}=useFocusRing(),{hoverProps:g,isHovered:h}=useHover({isDisabled:m.isDisabled}),R=n,x=filterTruthyValues({"data-block-id":s,"data-block-class":c,"data-disabled":m.isDisabled,"data-focused":_,"data-pressed":y,"data-focus-visible":b,"data-hovered":h,role:p,title:l});return jsx(R,{...mergeProps(f,v,g,x),className:classNames(_r({variant:r,isFocusVisible:b,isHovered:h,isDisabled:m.isDisabled,size:a,isActive:y,type:i}),"BaselineUI-Link",e),ref:L(d,u),style:o,children:t})});Wl.displayName="Link";function Xl({isDisabled:e,onValueChange:o,onChange:t,name:r,"aria-describedby":a,"aria-label":n,accept:i,multiple:s}){let c=useId(),l=useId(),p=useId();return {inputProps:{type:"file",id:l,disabled:!!e,"aria-labelledby":n?void 0:c,"aria-describedby":a||p,"aria-label":n,onChange:u=>{let d=[...u.target.files||[]];o?.(d),t?.(u);},name:r,accept:i,multiple:s},labelProps:{htmlFor:l,id:c},descriptionProps:{id:p}}}async function Ja({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 Yl=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"]]}),Zl=z({defaultClassName:"_180w5ede",variantClassNames:{disabled:{true:"_180w5edf"}},defaultVariants:{},compoundVariants:[]}),Ql=z({defaultClassName:"_180w5ed9",variantClassNames:{disabled:{true:"_180w5eda"}},defaultVariants:{},compoundVariants:[]}),Jl=z({defaultClassName:"_180w5edb",variantClassNames:{disabled:{true:"_180w5edc"},hovered:{true:"_180w5edd"}},defaultVariants:{},compoundVariants:[]});var rp=io.forwardRef(({className:e,label:o,description:t,icon:r,variant:a="default",...n},i)=>{let s=io.useRef(null),{inputProps:c,descriptionProps:l,labelProps:p}=Xl(n),{dropProps:m}=useDrop({ref:s,onDrop:async({items:b})=>{let _=b.filter(g=>g.kind==="file").map(async g=>(invariant(g.kind==="file"),g.getFile())),v=await Promise.all(_);n.onValueChange?.(v);}}),{focusProps:u,isFocusVisible:d}=useFocusRing(),{hoverProps:f,isHovered:y}=useHover({isDisabled:n.isDisabled});return jsxs("label",{...mergeProps(m,f,p),className:classNames(Yl({variant:a,disabled:n.isDisabled,hoveredOrFocusedOrActive:y||d}),e),ref:L(i,s),children:[jsx(VisuallyHidden,{children:jsx("input",{...mergeProps(u,c)})}),r?jsx(r,{size:20,className:Ql({disabled:n.isDisabled})}):null,jsxs("div",{children:[jsx("div",{className:Jl({disabled:n.isDisabled,hovered:y}),children:o}),t?jsx("div",{...l,className:Zl({disabled:n.isDisabled}),children:t}):null]})]})});rp.displayName="FileUpload";var ap="_12vfhl40 z9nup81",np="_12vfhl41 z9nup82",ip=z({defaultClassName:"_12vfhl48",variantClassNames:{variant:{success:"_12vfhl49",error:"_12vfhl4a",active:"_12vfhl4b"}},defaultVariants:{},compoundVariants:[]}),sp="_12vfhl42",lp="_12vfhl47",pp="_12vfhl46 z9nup82",cp="_12vfhl45",dp=z({defaultClassName:"_12vfhl43 _12vfhl42",variantClassNames:{hasLabel:{false:"_12vfhl44"}},defaultVariants:{},compoundVariants:[]});var mp=io.forwardRef(({className:e,style:o,variant:t="active",showValue:r,description:a,errorMessage:n,"data-block-id":i,"data-block-class":s,...c},l)=>{let p=useId(),{labelProps:m,progressBarProps:u}=useProgressBar({...c,"aria-describedby":a?p:c["aria-describedby"]}),{minValue:d=0,maxValue:f=100,value:y=0,label:b}=c,_=(y-d)/(f-d),v=`${Math.round(_*100)}%`,g=jsx("output",{className:dp({hasLabel:!!b}),children:u["aria-valuetext"]}),h=t==="error"?n:a;return jsxs("div",{...u,style:o,className:classNames(ap,"BaselineUI-ProgressBar",e),"data-block-id":i,"data-block-class":s,ref:l,children:[b?jsxs("div",{className:np,children:[jsx("label",{...m,className:sp,children:b}),r?g:null]}):null,jsxs("div",{className:cp,children:[jsxs("div",{className:pp,children:[jsx("div",{className:lp,children:jsx("div",{style:{width:v},className:ip({variant:t})})}),!b&&r?g:null]}),h?jsx("div",{className:bo({hasError:t==="error"}),id:p,children:h}):null]})]})});mp.displayName="ProgressBar";function So({isReadOnly:e,validationState:o}){return e?ReadOnlyIcon:o==="error"?ErrorFilledIcon:o==="warning"?WarningFilledIcon:null}var No=io.forwardRef(({className:e,validationState:o,variant:t="primary",style:r,labelPosition:a="top",inputStyle:n,inputClassName:i,"data-block-id":s,"data-block-class":c,...l},p)=>{let m=io.useRef(null),{inputProps:u,labelProps:d,descriptionProps:f,errorMessageProps:y,validationErrors:b}=useTextField({...l,validationState:o?o==="error"?"invalid":"valid":void 0},m),_=l.errorMessage||b.join(" "),v=Pe({...l,errorMessage:_,descriptionProps:f,errorMessageProps:y,labelPosition:a});_&&(o="error");let{hoverProps:g,isHovered:h}=useHover({isDisabled:l.isDisabled}),{isFocused:R,focusProps:x,isFocusVisible:k}=useFocusRing(),P=So({isReadOnly:l.isReadOnly,validationState:o}),w=filterTruthyValues({"data-readonly":l.isReadOnly,"data-disabled":l.isDisabled,"data-validation-state":o,"data-focused":R,"data-focus-visible":k});return jsxs("div",{className:classNames(He({labelPosition:a}),"BaselineUI-TextInput",e),"data-block-id":s,"data-block-class":c,style:r,ref:p,children:[l.label||a==="start"&&v?jsxs("div",{className:Oe({labelPosition:a,hasMessage:!!v}),children:[jsx("label",{...d,className:Fe,children:l.label}),a==="start"&&v]}):null,jsxs("div",{className:classNames({[xo]:l.isDisabled}),children:[jsxs("div",{...g,className:vo({validationState:o,isHovered:h,isFocused:R,variant:t,isReadOnly:!!l.isReadOnly,isDisabled:!!l.isDisabled}),children:[jsx("input",{...mergeProps(u,x,w),className:classNames(tr({isDisabled:l.isDisabled,labelPosition:a}),"BaselineUI-TextInput-Input",i),style:n,ref:m}),P?jsx(P,{className:go({validationState:o,isReadOnly:l.isReadOnly}),size:16}):null]}),a==="top"&&v]})]})});No.displayName="TextInput";var Lo=({value:e,...o})=>{let t=useNumberFormatter(o);return jsx(Fragment,{children:t.format(e)})};Lo.displayName="NumberFormat";var fp="_1yep5z6i3 _1yep5z6i4 _1yep5z6i5",yp=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"]]}),bp=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"]]}),gp=z({defaultClassName:"_9b1tmlc",variantClassNames:{isDisabled:{true:"_9b1tmld"},isReadOnly:{true:"_9b1tmle"}},defaultVariants:{},compoundVariants:[]});var zp=io.forwardRef(({className:e,count:o,style:t,size:r="md",icon:a,"data-block-id":n,"data-block-class":i,...s},c)=>{let l={isRequired:!1},p=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 m=io.useRef(null),u=useToggleState({...s,...l}),{inputProps:d,isPressed:f,isDisabled:y,isReadOnly:b,isSelected:_}=useSwitch({...s,...l},u,m),{focusProps:v,isFocused:g,isFocusVisible:h}=useFocusRing(),{hoverProps:R,isHovered:x}=useHover({}),k=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":_});return jsxs("label",{ref:c,style:t,className:classNames(fp,"BaselineUI-Reaction",e),...k,children:[jsx(VisuallyHidden,{children:jsx("input",{...d,...v,ref:m})}),jsxs("div",{...R,className:yp({isSelected:_,isFocusVisible:h,isHovered:x,isReadOnly:b,isDisabled:y}),children:[jsx("div",{className:gp({isDisabled:y,isReadOnly:b}),children:jsx(p,{size:r==="md"?20:16})}),jsx("div",{className:bp({isSelected:u.isSelected,isDisabled:y,isReadOnly:b,size:r}),children:jsx(Lo,{value:o})})]})]})});zp.displayName="Reaction";var hp="_1azy5686",xp="_1azy5685",Cp="var(--_1azy5680)",Pp="_1azy5688",kp="_1azy5689",Rp="_1azy5681 z9nup82",wp="_1azy5682";var Ip="_1azy5687";var F_={sm:16,md:20},O_={sm:[CheckFilledIcon,ErrorAltFilledIcon],md:[CheckFilledIcon$1,ErrorAltFilledIcon$1]},Bo=io.forwardRef(({className:e,style:o,size:t="md",variant:r="active","data-block-id":a,"data-block-class":n,...i},s)=>{let{labelProps:c,progressBarProps:l}=useProgressBar({...i,isIndeterminate:!0}),p=F_[t],m=p/2-2,u=2*m*Math.PI,d=O_[t][r==="success"?0:1];return jsxs("div",{className:classNames(Rp,"BaselineUI-ProgressSpinner",e),ref:s,style:{...assignInlineVars({[Cp]:`${u}px`}),...o},"data-block-id":a,"data-block-class":n,children:[jsxs("div",{...l,className:wp,children:[(r==="active"||r==="inactive")&&jsxs("svg",{height:p,width:p,viewBox:`0 0 ${p} ${p}`,children:[jsx("circle",{role:"presentation",className:hp,cx:p/2,cy:p/2,r:m}),r==="active"&&jsx("circle",{role:"presentation",className:xp,cx:p/2,cy:p/2,r:m})]}),r==="success"&&jsx(d,{className:Ip,size:p}),r==="error"&&jsx(d,{className:Pp,size:p})]}),i.label?jsx("span",{...c,className:kp,children:i.label}):null]})});Bo.displayName="ProgressSpinner";var xr=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"}},defaultVariants:{},compoundVariants:[[{isSelected:!0,isFocusVisible:!0},"_5uw3kp8"],[{isSelected:!0,isDisabled:!0},"_5uw3kp9"]]});var U_={sm:16,md:20,lg:24},Cr=io.forwardRef(({className:e,style:o,iconStart:t,size:r="md",elementType:a="button",...n},i)=>{let s=useToggleState(n),{buttonProps:c,isPressed:l,ref:p,isFocusVisible:m,isFocused:u,isHovered:d,uiStateOptions:f}=er(n,s),y=filterTruthyValues({"data-block-id":n["data-block-id"],"data-block-class":n["data-block-class"],"data-focused":u,"data-focus-visible":m,"data-disabled":n.isDisabled,"data-hovered":d,"data-pressed":l,"data-selected":s.isSelected});return jsxs(a,{...mergeProps(c,y),className:classNames(xr({isHovered:d,isFocusVisible:m,isSelected:s.isSelected,size:r,isDisabled:n.isDisabled}),"BaselineUI-ToggleButton",typeof e=="function"?e(f):e),style:typeof o=="function"?o(f):o,ref:L(p,i),children:[t?jsx(t,{size:U_[r]}):null,n.label]})});Cr.displayName="ToggleButton";var Pr=z({defaultClassName:"_16vugd0e",variantClassNames:{isDisabled:{true:"_16vugd0f"}},defaultVariants:{},compoundVariants:[]}),Tp=z({defaultClassName:"_16vugd01 _1yep5z6i0 _1yep5z6i1 _1yep5z6i2 _1yep5z6ir _1yep5z6is _1yep5z6it",variantClassNames:{labelPosition:{end:"_1yep5z613k _1yep5z613l _1yep5z613m _1yep5z6ut _1yep5z6uu _1yep5z6uv",start:"_1yep5z613q _1yep5z613r _1yep5z613s _1yep5z6152 _1yep5z6153 _1yep5z6154"}},defaultVariants:{},compoundVariants:[]}),Sp=z({defaultClassName:"_16vugd05",variantClassNames:{isIndeterminate:{true:"_16vugd04"},isSelected:{true:"_16vugd04"},isFocusVisible:{true:"_16vugd08"},isHovered:{true:"_16vugd09"},isDisabled:{true:"_16vugd0a"},isReadOnly:{true:"_16vugd0b"},hasError:{true:"_16vugd0c"}},defaultVariants:{},compoundVariants:[[{isSelected:!0,isDisabled:!0},"_16vugd0d"]]});var Mp=io.forwardRef(({className:e,style:o,label:t,labelPosition:r="end","data-block-id":a,"data-block-class":n,...i},s)=>{let c=io.useRef(null),l=useToggleState(i),{isFocusVisible:p,isFocused:m,focusProps:u}=useFocusRing(),{inputProps:d,isPressed:f,isDisabled:y,isSelected:b,isReadOnly:_}=useCheckbox({...i,children:t},l,c),{hoverProps:v,isHovered:g}=useHover({isDisabled:y}),h=filterTruthyValues({"data-disabled":y,"data-readonly":_,"data-hovered":g,"data-selected":b,"data-pressed":f,"data-indeterminate":i.isIndeterminate,"data-invalid":i.isInvalid,"data-focus-visible":p,"data-focused":m,"data-block-id":a,"data-block-class":n});return jsxs("label",{...h,className:classNames(Tp({labelPosition:r}),"BaselineUI-Checkbox",e),style:o,ref:s,children:[jsx(VisuallyHidden,{children:jsx("input",{...mergeProps(d,u),ref:c})}),jsxs("div",{...v,className:Sp({isSelected:b&&!i.isIndeterminate,isIndeterminate:i.isIndeterminate,isFocusVisible:p,isDisabled:y,isReadOnly:_,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:Pr({isDisabled:y}),children:t}):null]})});Mp.displayName="Checkbox";var Bp={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 Ep=z({defaultClassName:"_1nsi9h17",variantClassNames:{isFocused:{true:"_1nsi9h18"},variant:{pinned:"_1nsi9h19",floating:"_1nsi9h1a"},size:{xs:"_1nsi9h1b",sm:"_1nsi9h1c",md:"_1nsi9h1d",lg:"_1nsi9h1e"}},defaultVariants:{},compoundVariants:[]}),Dp="_1nsi9h1f _1yep5z6l6 _1yep5z6ky _1yep5z6eu",Fp=z({defaultClassName:"_1yep5z6al _1yep5z6am _1yep5z6an _1yep5z6b9 _1yep5z6ba _1yep5z6bb _1yep5z6bx _1yep5z6by _1yep5z6bz _1yep5z6cl _1yep5z6cm _1yep5z6cn _1yep5z6i3 _1yep5z6i4 _1yep5z6i5 _1yep5z6i9 _1yep5z6ia _1yep5z6ib _1yep5z6ir _1yep5z6is _1yep5z6it _1yep5z6fs _1yep5z6e1",variantClassNames:{size:{xs:"_1nsi9h11 _1yep5z6vt _1yep5z6vu _1yep5z6vv _1yep5z6wh _1yep5z6wi _1yep5z6wj _1yep5z6x5 _1yep5z6x6 _1yep5z6x7 _1yep5z6xt _1yep5z6xu _1yep5z6xv _1yep5z6z6",sm:"_1nsi9h12 _1yep5z6z9",md:"_1nsi9h13",lg:"_1nsi9h14"},variant:{floating:"_1yep5z6yi _1yep5z616k _1yep5z616i _1yep5z6120",pinned:"_1yep5z6166"}},defaultVariants:{},compoundVariants:[]}),Op=z({defaultClassName:"_1nsi9h1g _1yep5z6ev",variantClassNames:{isDisabled:{true:"_1yep5z6109"}},defaultVariants:{},compoundVariants:[]});var _6={style:"decimal"},z6={xs:[CaretLeftIcon,CaretRightIcon],sm:[CaretLeftIcon$1,CaretRightIcon$1],md:[CaretLeftIcon$2,CaretRightIcon$2],lg:[CaretLeftIcon$3,CaretRightIcon$3]},$p=io.forwardRef(({className:e,style:o,minValue:t=1,defaultValue:r=1,incrementAriaLabel:a,decrementAriaLabel:n,"aria-label":i,size:s="md",variant:c="floating",hideActions:l,isDisabled:p,...m},u)=>{let{locale:d}=useLocale(),f=F(Bp),y={...m,formatOptions:_6,minValue:t,incrementAriaLabel:a||f.formatMessage("nextPage"),decrementAriaLabel:n||f.formatMessage("prevPage"),defaultValue:r,"aria-label":i||f.formatMessage("goToPage")},b=io.useRef(null),_=useNumberFieldState({...y,locale:d}),{inputProps:v,decrementButtonProps:g,incrementButtonProps:h,groupProps:R}=useNumberField({...y,onKeyDown:D=>{D.key==="Enter"&&b.current?.blur(),m.onKeyDown?.(D);},isDisabled:p},_,b),{hoverProps:x,isHovered:k}=useHover({}),{focusProps:P,isFocused:w,isFocusVisible:S}=useFocusRing(),T=c==="floating",[N,I]=z6[s],C=filterTruthyValues({"data-focus-visible":S,"data-focused":w,"data-hovered":k,"data-block-id":m["data-block-id"],"data-block-class":m["data-block-class"]}),H=useInteractionModality()==="keyboard";return jsxs("div",{...mergeProps(R,x,C),className:classNames(Fp({size:s,variant:c}),"BaselineUI-Pagination",e),style:o,ref:u,children:[l?null:jsxs(Fragment,{children:[jsx(E,{icon:N,...g,elementType:"div",size:s,style:{height:"100%",...T&&{borderRadius:0}},className:"BaselineUI-Pagination-DecrementButton",UNSAFE_NON_INTERACTIVE:H,isDisabled:p||g.isDisabled}),c==="floating"&&jsx(j,{orientation:"vertical"})]}),jsxs("div",{className:Ep({isFocused:w,variant:c,size:s}),"aria-label":f.formatMessage("pageXofY",{arg0:v.value,arg1:_.maxValue}),children:[jsx("input",{...mergeProps(v,P),ref:b,className:classNames("BaselineUI-Pagination-Input",Dp),style:{width:`${v.value?.toString().length||1}ch`}}),jsxs("span",{className:Op({isDisabled:p}),children:["/ ",jsx(Lo,{value:_.maxValue})]})]}),l?null:jsxs(Fragment,{children:[c==="floating"&&jsx(j,{orientation:"vertical"}),jsx(E,{icon:I,...h,elementType:"div",size:s,style:{height:"100%",...T&&{borderRadius:0}},className:"BaselineUI-Pagination-IncrementButton",UNSAFE_NON_INTERACTIVE:H,isDisabled:p||h.isDisabled})]})]})});$p.displayName="Pagination";var Up=({date:e,...o})=>{let t=useDateFormatter(o);return jsx(Fragment,{children:t.format(e)})};Up.displayName="DateFormat";var kr=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"]]}),qp="_1f789qjj",Kp="_1f789qj0",Gp=z({defaultClassName:"_1f789qjk",variantClassNames:{variant:{neutral:"_1f789qjl",red:"_1f789qjm",green:"_1f789qjn",blue:"_1f789qjo","high-contrast":"_1f789qjp"},isHovered:{true:"_1f789qjq"}},defaultVariants:{},compoundVariants:[[{isHovered:!0,variant:"neutral"},"_1f789qjr"],[{isHovered:!0,variant:"red"},"_1f789qjs"],[{isHovered:!0,variant:"blue"},"_1f789qjt"],[{isHovered:!0,variant:"green"},"_1f789qju"],[{isHovered:!0,variant:"high-contrast"},"_1f789qjv"]]});var Zp=({item:e,state:o,variant:t="neutral"})=>{let r=io.useRef(null),{focusProps:a,isFocusVisible:n}=useFocusRing({within:!0}),{rowProps:i,gridCellProps:s,removeButtonProps:c,allowsRemoving:l,isDisabled:p,isSelected:m,allowsSelection:u}=useTag({item:e},o,r),d=io.useRef(null),{buttonProps:f}=useButton(c,d),{hoverProps:y,isHovered:b}=useHover({isDisabled:p}),{hoverProps:_,isHovered:v}=useHover({isDisabled:p}),g=e.value?.icon,h=e.value?.data?.variant??t;return jsx("div",{...mergeProps(i,a,_),ref:r,className:classNames(kr({isFocusVisible:n,variant:h,isDisabled:p,allowsRemoving:l,isSelected:m,allowsSelection:u,isHovered:v}),"BaselineUI-Tag"),children:jsxs("div",{...s,className:qp,children:[m?jsx(CheckmarkIcon$3,{size:16}):null,!m&&g?jsx(g,{size:16}):null,e.rendered,l?jsx("button",{...mergeProps(f,y),className:Gp({variant:h,isHovered:b}),children:jsx(XIcon$2,{})}):null]})})};var ec=io.forwardRef(({className:e,style:o,"data-block-id":t,"data-block-class":r,items:a,...n},i)=>{let s=useMemo(()=>a.map(u=>({...u,data:{variant:u.variant}})),[a]),c=ie(),l=io.useRef(null),p=useListState({...n,items:s,children:c}),{gridProps:m}=useTagGroup(n,p,l);return jsx("div",{...m,className:classNames(Kp,"BaselineUI-TagGroup",e),style:o,"data-block-id":t,"data-block-class":r,ref:L(i,l),children:[...p.collection].map(u=>jsx(Zp,{state:p,item:u,variant:n.variant},u.key))})});ec.displayName="TagGroup";var oc="_1yep5z6kv",tc=z({defaultClassName:"_1kvz17db _1yep5z6ki _1yep5z6kk",variantClassNames:{showActionsOnTriggerOnly:{true:"_1kvz17dc"},isTriggered:{true:"_1kvz17dd"}},defaultVariants:{},compoundVariants:[]}),rc=z({defaultClassName:"_1kvz17d0 _1yep5z64u _1yep5z64v _1yep5z64w _1yep5z676 _1yep5z677 _1yep5z678 _1yep5z68c _1yep5z68d _1yep5z68e _1yep5z660 _1yep5z661 _1yep5z662 _1yep5z6ki _1yep5z6kj",variantClassNames:{isExpanded:{true:"_1kvz17d1"}},defaultVariants:{},compoundVariants:[]}),ac="_1yep5z6ev _1yep5z6dy",nc=z({defaultClassName:"_1kvz17d2 _1yep5z63o _1yep5z63p _1yep5z63q _1yep5z61f _1yep5z61g _1yep5z61h _1yep5z63 _1yep5z64 _1yep5z65 _1yep5z62f _1yep5z62g _1yep5z62h _1yep5z6i0 _1yep5z6i1 _1yep5z6i2 _1yep5z6ir _1yep5z6is _1yep5z6it _1yep5z6jr _1yep5z6js _1yep5z6jt _1yep5z6ki _1yep5z6kl",variantClassNames:{isFocusVisible:{true:"_1kvz17d3"},isHovered:{true:"_1yep5z6ft",false:"_1yep5z6fu"},isDisabled:{true:"z9nup83"}},defaultVariants:{},compoundVariants:[]}),ic="_1kvz17da _1yep5z66 _1yep5z67 _1yep5z68 _1yep5z62i _1yep5z62j _1yep5z62k _1yep5z6dz",sc=z({defaultClassName:"_1kvz17d7 _1yep5z6i0 _1yep5z6i1 _1yep5z6i2 _1yep5z6ir _1yep5z6is _1yep5z6it",variantClassNames:{isDisabled:{true:"_1yep5z6ey",false:"_1yep5z6eu"}},defaultVariants:{},compoundVariants:[]});var an=io.forwardRef(({children:e,className:o,style:t},r)=>{let{headers:a}=useContext($e),{disabledKeys:n}=useContext($e),{keyboardProps:i}=useKeyboard({onKeyDown:s=>{let c=mo(s.target),l=[...a?.keys()||[]].findIndex(f=>a?.get(f)?.current===c?.activeElement),p=a?.get(l||0),m=a?.size||0,u=f=>{let y=a.get(f-1<0?m-1:f-1);n?.has(y?.current?.getAttribute("data-key")||"")?u(f-1):y?.current?.focus();},d=f=>{let y=a.get((f+1)%m);n?.has(y?.current?.getAttribute("data-key")||"")?d(f+1):y?.current?.focus();};if(p)switch(s.key){case"Home":{s.preventDefault(),d(-1);break}case"End":{s.preventDefault(),u(m);break}case"ArrowDown":{s.preventDefault(),d(l);break}case"ArrowUp":{s.preventDefault(),u(l);break}default:s.continuePropagation();}}});return jsx("div",{...i,style:t,className:classNames(oc,o),ref:r,children:io.Children.map(e,(s,c)=>io.cloneElement(s,{index:c}))})});an.displayName="AccordionBase";var $e=io.createContext({expandedKeys:new Set,setExpandedKeys:()=>{},disabledKeys:new Set,headers:new Map,expansionMode:"multiple"}),cc=io.forwardRef(({children:e,disabledKeys:o,defaultExpandedKeys:t=new Set,expandedKeys:r,expansionMode:a="multiple",onChange:n,className:i,style:s},c)=>{let[l,p]=io.useState(t),m=io.useRef(new Map).current,[u,d]=io.useState(a);useEffect(()=>{d(u);},[u]),useEffect(()=>{n?.(l);},[l,n]);let f=useMemo(()=>({expandedKeys:r||l,setExpandedKeys:r?()=>{}:p,disabledKeys:o,headers:m,expansionMode:u}),[r,l,o,m,u]);return jsx($e.Provider,{value:f,children:jsx(FocusScope,{children:jsx(an,{className:i,style:s,ref:c,children:e})})})});cc.displayName="Accordion";var sn=io.forwardRef(({title:e,actions:o,controlId:t,value:r,id:a,index:n,subLabel:i,showActionsOnTriggerOnly:s},c)=>{let l=io.useRef(null),{expandedKeys:p,setExpandedKeys:m,expansionMode:u,disabledKeys:d,headers:f}=useContext($e),y=d?.has(r),b=useFocusManager();invariant(b);let{focusNext:_,focusPrevious:v}=b,{keyboardProps:g}=useKeyboard({onKeyDown:C=>{C.key==="ArrowRight"?_({wrap:!0}):C.key==="ArrowLeft"?v({wrap:!0}):C.continuePropagation();},isDisabled:y});useEffect(()=>{invariant(typeof n=="number","AccordionItem must have an index"),f?.set(n,l);},[n,f]);let h=()=>{m(C=>{let B=new Set(C);return B.has(r)?B.delete(r):(u==="single"&&B.clear(),B.add(r)),B});},{buttonProps:R}=useButton({"aria-expanded":p.has(r),"aria-controls":t,onPress:h,isDisabled:y},l),{pressProps:x}=usePress({onPress:h,isDisabled:y}),{focusProps:k,isFocusVisible:P}=useFocusRing(),{hoverProps:w,isHovered:S}=useHover({isDisabled:y}),{focusProps:T,isFocusVisible:N}=useFocusRing({within:!0}),I=p.has(r);return jsxs("h3",{...mergeProps(g,x,w,T),className:nc({isFocusVisible:P,isHovered:S,isDisabled:y}),ref:c,children:[jsxs("div",{className:sc({isDisabled:!!y}),children:[jsx(ChevronRightIcon,{className:rc({isExpanded:I}),size:8}),jsx("button",{...mergeProps(R,k),id:a,"data-key":r,className:ic,ref:l,children:e})]}),o?.length?jsx("div",{"data-testid":"action-buttons",className:tc({showActionsOnTriggerOnly:s,isTriggered:N||S}),children:o.map((C,B)=>jsx(E,{variant:"secondary",size:"sm",excludeFromTabOrder:!0,isDisabled:y,...C},B))}):null,i?jsx("div",{className:ac,children:i}):null]})});sn.displayName="AccordionHeader";var vc=io.forwardRef(({title:e,actions:o,children:t,value:r,index:a,subLabel:n,style:i,className:s,showActionsOnTriggerOnly:c},l)=>{let p=useId(),m=useId(),{expandedKeys:u}=useContext($e),d=io.useRef(null),f=u.has(r),y=zo(),b=useReducedMotion(),_=useTransition(f?[r]:[],{from:!y&&!b&&{height:0,opacity:0},enter:()=>async v=>{await v({height:d.current?.scrollHeight,opacity:1});},leave:{height:0,opacity:0},keys:v=>v.toString()});return jsxs(Fragment,{children:[jsx(FocusScope,{children:jsx(sn,{value:r,actions:o,id:m,title:e,controlId:p,ref:l,index:a,subLabel:n,showActionsOnTriggerOnly:c})}),_(v=>jsx(animated.div,{role:"region","aria-labelledby":m,id:p,style:{...v,overflow:"hidden"},children:jsx("div",{ref:d,className:s,style:i,children:t})}))]})});vc.displayName="AccordionItem";var zt=io.forwardRef(({variant:e,isOpen:o,selectedIcon:t,validationState:r="valid",valueProps:a,label:n,className:i,style:s,"data-block-id":c,"data-block-class":l,...p},m)=>{let u=io.useRef(null),{buttonProps:d,isPressed:f}=useButton({...p,isDisabled:p.isDisabled||p.isReadOnly},u),{hoverProps:y,isHovered:b}=useHover({isDisabled:p.isDisabled}),{focusProps:_,isFocused:v,isFocusVisible:g}=useFocusRing(),h=So({isReadOnly:p.isReadOnly,validationState:r});p.isReadOnly&&(d.disabled=!1);let R=filterTruthyValues({"data-disabled":p.isDisabled,"data-readonly":p.isReadOnly,"data-focused":v,"data-focus-visible":g,"data-hovered":b,"data-pressed":f,"data-open":o,"data-block-id":c,"data-block-class":l});return jsxs("button",{...mergeProps(d,y,_,R),ref:L(m,u),className:classNames(zl({isFocused:g,isDisabled:p.isDisabled}),vo({variant:e,isHovered:b,isFocused:g,validationState:r,isDisabled:!!p.isDisabled,isReadOnly:p.isReadOnly}),i,"BaselineUI-Select-Button"),style:s,children:[jsxs("span",{className:xl,children:[t?jsx(t,{size:24}):null,jsx("span",{...a,children:n})]}),h?jsx("span",{"aria-hidden":!0,className:classNames(go({validationState:r,isReadOnly:!!p.isReadOnly}),hl),children:jsx(h,{size:16})}):null,jsx("span",{"aria-hidden":!0,children:jsx(CaretDownIcon,{size:8,className:_l({isOpen:o})})})]})});zt.displayName="SelectButton";var wr=io.createContext({state:null,popoverAnchorRef:null}),cn=io.forwardRef(({className:e,style:o,labelPosition:t="top",variant:r="primary","data-block-id":a,"data-block-class":n,optionStyle:i,optionClassName:s,placement:c="bottom start",triggerClassName:l,triggerStyle:p,state:m,renderTrigger:u=({buttonProps:y,selectedValue:b,valueProps:_,isOpen:v,ref:g})=>{let h=b&&"icon"in b&&b.icon;return jsx(zt,{...y,className:l,style:p,isOpen:v,isReadOnly:d.isReadOnly,ref:g,variant:r,validationState:d.validationState,selectedIcon:h||void 0,label:b?"label"in b&&b?.label:d.placeholder,valueProps:_})},...d},f)=>{let{popoverAnchorRef:y}=useContext(wr),b=io.useRef(null),_=be(d.portalContainer),{labelProps:v,triggerProps:g,valueProps:h,menuProps:R,descriptionProps:x,errorMessageProps:k}=useSelect({...d,validationState:d.validationState==="error"?"invalid":"valid"},m,b),P=Pe({...d,descriptionProps:x,errorMessageProps:k,labelPosition:t}),w=m.selectedItem?.value??null;return jsxs(eo.Provider,{value:m,children:[jsxs("div",{style:o,className:classNames(He({labelPosition:t}),"BaselineUI-Select",e),"data-block-id":a,"data-block-class":n,ref:f,children:[d.label||P?jsxs("div",{className:Oe({labelPosition:t,hasMessage:!!P}),children:[d.label?jsx("div",{...v,className:classNames(Fe,"BaselineUI-Select-Label"),children:d.label}):null,t==="start"&&P]}):null,jsx(HiddenSelect,{state:m,triggerRef:b,isDisabled:d.isDisabled,label:d.label,name:d.name}),u({buttonProps:g,selectedValue:w,valueProps:h,isOpen:m.isOpen,ref:b}),t==="top"&&P]}),m?jsx(ye,{placement:c,portalContainer:_,offset:d.offset||2,state:m,triggerRef:y||b,style:o,className:classNames(je,"BaselineUI-Select-Popover"),...d,children:jsx(se,{...R,label:d.label,items:d.items,showSelectedIcon:d.showSelectedIcon,className:br,optionStyle:i,optionClassName:s})}):null]})});cn.displayName="SelectCore";var Cc=io.forwardRef((e,o)=>{let t=ie(),r=useSelectState({...e,validationState:e.validationState==="error"?"invalid":"valid",children:t});return jsx(cn,{...e,ref:o,state:r})});Cc.displayName="SelectStandalone";var qe=io.forwardRef((e,o)=>{let{state:t}=useContext(wr);return useEffect(()=>{invariant(t||e.items,"Select: A `state` that can be passed via context or `items` are required.");},[e.items,t]),t?jsx(cn,{state:t,...e,ref:o}):jsx(Cc,{...e,ref:o})});qe.displayName="Select";var kc=io.forwardRef(({className:e,style:o,variant:t,"data-block-id":r,icon:a,tooltipProps:n,...i},s)=>{let c=io.useRef(null),l=useCallback(({buttonProps:p,selectedValue:m,valueProps:u,isOpen:d,ref:f})=>{let y=m&&"icon"in m&&m.icon;return jsx(re,{variant:"inverse",size:"sm",includeArrow:!1,text:i["aria-label"],offset:4,...n,children:jsx(zt,{...p,isOpen:d,isReadOnly:i.isReadOnly,ref:f,variant:t,validationState:i.validationState,selectedIcon:y||void 0,label:m?"label"in m&&m?.label:i.placeholder,valueProps:u})})},[i,n,t]);return jsxs(M,{display:"flex",flexDirection:"row",gap:"md",paddingX:"md",alignItems:"center",className:classNames("BaselineUI-IconSelect",e),"data-block-id":r,style:o,ref:L(s,c),children:[a?jsx(a,{size:24,className:sprinkles({color:"icon.primary",display:"flex",flexShrink:0})}):null,jsx(qe,{...i,renderTrigger:l})]})});kc.displayName="IconSelect";var Rc="_1017q4c5",wc=z({defaultClassName:"_1017q4c0",variantClassNames:{size:{md:"_1017q4c1",sm:"_1017q4c2"},isDisabled:{true:"_1017q4c3"}},defaultVariants:{},compoundVariants:[]}),Ic="_1017q4c4";var z5={sm:AvatarIcon,md:AvatarIcon$1},Fo=io.forwardRef(({className:e,style:o,size:t="md",icon:r=z5[t],name:a,imgSrc:n,showInitials:i,isDisabled:s,hasNotifications:c,imgLoading:l,"data-block-id":p,"data-block-class":m},u)=>{let{imgProps:d}=_o({src:n,alt:a}),f=a?.split(" ").map(y=>y[0]).join("");return jsxs("span",{className:classNames(wc({size:t,isDisabled:s}),"BaselineUI-Avatar",e),"data-disabled":s,ref:u,style:o,"aria-disabled":s,"data-block-id":p,"data-block-class":m,children:[n?jsx("img",{...d,loading:l,className:Ic}):null,!i&&!n&&jsx(r,{size:t==="sm"?16:24}),i&&!n?t==="sm"?f[0]:f:null,c?jsx("div",{"data-testid":"notification",className:Rc}):null]})});Fo.displayName="Avatar";var Tc="_1yep5z63 _1yep5z64 _1yep5z65 _1yep5z62f _1yep5z62g _1yep5z62h _1yep5z63l _1yep5z63m _1yep5z63n _1yep5z619 _1yep5z61a _1yep5z61b _1yep5z6i0 _1yep5z6i1 _1yep5z6i2 _1yep5z6ir _1yep5z6is _1yep5z6it",Sc=z({defaultClassName:"_1x62fhb6 _1yep5z63r _1yep5z63s _1yep5z63t _1yep5z61f _1yep5z61g _1yep5z61h _1yep5z6i0 _1yep5z6i1 _1yep5z6i2 _1yep5z6ir _1yep5z6is _1yep5z6it _1yep5z6kx _1yep5z6ky _1yep5z6ki _1yep5z6kl _1yep5z6ev _1yep5z69i _1yep5z69j _1yep5z69k",variantClassNames:{isHovered:{true:"_1yep5z6105"},isSelected:{true:"_1x62fhb8"},isFocusVisible:{true:"_1x62fhb9"},isDisabled:{true:"_1x62fhba _1yep5z6109"},variant:{primary:"_1x62fhbb _1yep5z6z6",ghost:"_1yep5z6z9"}},defaultVariants:{},compoundVariants:[[{variant:"primary",isSelected:!0,isDisabled:!1},"_1yep5z61lg"],[{variant:"primary",isSelected:!0},"_1yep5z61me"],[{variant:"ghost",isSelected:!0,isFocusVisible:!1},"_1x62fhbd"],[{variant:"ghost",isSelected:!0,isDisabled:!1},"_1yep5z61lr"],[{variant:"ghost",isDisabled:!0,isSelected:!0},"_1x62fhbe _1yep5z6ey"],[{variant:"primary",isHovered:!0},"_1yep5z61mf"]]}),Nc=z({defaultClassName:"_1x62fhb3 _1yep5z6i3 _1yep5z6i4 _1yep5z6i5 _1yep5z6i9 _1yep5z6ia _1yep5z6ib",variantClassNames:{variant:{primary:"_1x62fhb4",ghost:"_1yep5z6ut _1yep5z6uu _1yep5z6uv"}},defaultVariants:{},compoundVariants:[]}),Lc="_1x62fhbf",Mc="_1yep5z6l2 _1yep5z6kz _1yep5z6hc _1yep5z6l1",Bc=z({defaultClassName:"_1x62fhb0 _1yep5z6kv _1yep5z6i0 _1yep5z6i1 _1yep5z6i2 _1yep5z6i9 _1yep5z6ia _1yep5z6ib",variantClassNames:{variant:{primary:"_1yep5z6115",ghost:"_1x62fhb2"}},defaultVariants:{},compoundVariants:[]});var Ec=({state:e,...o})=>{let t=io.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:c,"data-block-id":l}=a.value;return jsx("div",{...mergeProps(r,n),ref:t,className:classNames({[Mc]:i},"Baseline-Tabs-TabPanel",s),"data-block-id":l,style:c,children:a?.props.children})};var fn=io.forwardRef(({className:e,style:o,tabHeaderStyle:t,tabHeaderClassName:r,variant:a="primary",actions:n,onRemove:i,"data-block-id":s,...c},l)=>{let p=useTabListState({...c,selectedKey:c.selectedValue,defaultSelectedKey:c.defaultSelectedValue,disabledKeys:c.disabledValues}),m=io.useRef(null),{tabListProps:u}=useTabList({...c,selectedKey:c.selectedValue,defaultSelectedKey:c.defaultSelectedValue,disabledKeys:c.disabledValues},p,m);return jsxs("div",{className:classNames("BaselineUI-Tabs",e),style:o,ref:l,"data-block-id":s,children:[jsxs("div",{className:classNames(Bc({variant:a}),r),style:t,children:[jsx("div",{...u,className:Nc({variant:a}),ref:m,children:[...p.collection].map(d=>(invariant(d.value,"TabItem requires a value prop"),jsx(Fc,{item:d,state:p,onRemove:i,variant:a},d.key)))}),n?.map((d,f)=>jsx("div",{className:Tc,children:jsx(E,{...d,variant:"secondary",size:"sm",className:classNames(Lc,d.className)})},f))]}),jsx(Ec,{state:p},p.selectedItem?.key)]})});fn.displayName="TabsBase";var Fc=({item:e,onRemove:o,state:t,variant:r})=>{let{key:a,value:n}=e,i=io.useRef(null),{tabProps:s,isSelected:c,isDisabled:l}=useTab({key:a},t,i),{hoverProps:p,isHovered:m}=useHover({});invariant(n,"TabButton requires a value prop");let{title:u,icon:d,titleStyle:f,titleClassName:y}=n,{focusProps:b,isFocusVisible:_,isFocused:v}=useFocusRing(),{keyboardProps:g}=useKeyboard({onKeyDown:R=>{R.key==="Backspace"&&o?o(a):R.continuePropagation();}}),h=filterTruthyValues({"data-selected":c,"data-disabled":l,"data-focused":v,"data-hovered":m,"data-focus-visible":_});return jsxs("div",{...mergeProps(g,s,p,b,h),className:classNames(Sc({isHovered:m,isSelected:c,isFocusVisible:_,isDisabled:l,variant:r}),"BaselineUI-Tabs-TabButton",y),style:f,ref:i,children:[d?jsx(d,{size:20}):null,u,o?jsx(E,{variant:"secondary",elementType:"div",icon:XIcon$1,size:"xxs",onPress:()=>{o(a);},excludeFromTabOrder:!0,UNSAFE_NON_INTERACTIVE:!0,style:{display:"inline-flex",color:"inherit",opacity:c||v||m?1:0}}):null]})};Fc.displayName="TabButton";var Hc=io.forwardRef(({children:e,...o},t)=>{let r=useMemo(()=>io.Children.map(e,a=>!a||!io.isValidElement(a)||typeof a.type=="string"?null:{...a.props,id:a.props.value}).filter(Boolean),[e]);return jsx(fn,{...o,ref:t,items:r,children:a=>jsx(Item,{title:a.title,children:a.children},a.key)})});Hc.displayName="Tabs";var Vc=({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);Vc.displayName="TabItem";var Ac={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 jc=z({defaultClassName:"kfun6yw",variantClassNames:{arrangement:{single:"kfun6yx",multi:"kfun6yy",compact:"kfun6yz"}},defaultVariants:{},compoundVariants:[]}),$c=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"]]}),Uc=z({defaultClassName:"kfun6yt",variantClassNames:{size:{sm:"kfun6yu",md:"kfun6yv"}},defaultVariants:{},compoundVariants:[]}),qc=z({defaultClassName:"kfun6yp",variantClassNames:{arrangement:{single:"kfun6yq",multi:"kfun6yr",compact:"kfun6ys"}},defaultVariants:{},compoundVariants:[]}),Kc=z({defaultClassName:"kfun6yk",variantClassNames:{variant:{info:"kfun6yl",warning:"kfun6ym",error:"kfun6yn",success:"kfun6yo"}},defaultVariants:{},compoundVariants:[]}),Gc=z({defaultClassName:"kfun6yh",variantClassNames:{size:{sm:"kfun6yi",md:"kfun6yj"}},defaultVariants:{},compoundVariants:[]}),Wc=z({defaultClassName:"kfun6yd z9nup82",variantClassNames:{arrangement:{single:"kfun6ye",multi:"kfun6yf",compact:"kfun6yg"}},defaultVariants:{},compoundVariants:[]});var Z5={error:{sm:ErrorAltFilledIcon,md:ErrorAltFilledIcon$1},info:{sm:InfoFilledIcon,md:InfoFilledIcon$1},success:{sm:CheckFilledIcon,md:CheckFilledIcon$1},warning:{sm:WarningFilledIcon,md:WarningFilledIcon$1}},Xc=io.forwardRef(({className:e,description:o,actionLabel:t,onAction:r,style:a,variant:n="info",title:i,arrangement:s="single",onClose:c,size:l="sm","data-block-id":p,"data-block-class":m},u)=>{let d=F(Ac),f=t&&jsx($,{variant:s==="compact"?"tertiary":"ghost",label:t,onPress:r}),y=Z5[n][l];return jsxs("div",{className:classNames($c({variant:n,arrangement:s,hasButton:!!t||!!c,hasCloseButton:!!c}),"BaselineUI-InlineAlert",e),"data-block-id":p,"data-block-class":m,style:a,role:"alert",ref:u,children:[jsxs("div",{className:Wc({arrangement:s}),children:[jsx(y,{className:Kc({variant:n}),size:16}),jsxs("div",{className:jc({arrangement:s}),children:[jsx("h3",{className:Gc({size:l}),children:i}),jsx("section",{className:Uc({size:l}),children:o})]}),s==="compact"&&f]}),jsxs("div",{className:qc({arrangement:s}),children:[s!=="compact"&&f,c?jsx(E,{variant:"secondary",icon:CloseIcon,size:"sm",onPress:c,"aria-label":d.formatMessage("close")}):null]})]})});Xc.displayName="InlineAlert";var Ke={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 Nr=({children:e})=>{let{triggerProps:o}=io.useContext(Ae);return jsx(PressResponder,{...o,children:e})};Nr.displayName="ModalTrigger";var az=({children:e})=>{let{state:o}=io.useContext(Ae);return jsx(PressResponder,{onPress:()=>{o?.close();},children:e})};var Yc="_1dbkl53 _1yep5z6al _1yep5z6am _1yep5z6an _1yep5z6b9 _1yep5z6ba _1yep5z6bb _1yep5z6kv",Zc="_1dbkl5e",Qc=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 _1yep5z6i0 _1yep5z6i1 _1yep5z6i2 _1yep5z6i9 _1yep5z6ia _1yep5z6ib _1yep5z6l6 _1yep5z6ky _1yep5z69i _1yep5z69j _1yep5z69k _1yep5z6eu _1yep5z6kx _1yep5z6dy",variantClassNames:{isHovered:{true:"_1dbkl55"},isFocusVisible:{true:"_1dbkl56"},isDisabled:{true:"z9nup83 _1yep5z6109"},labelPosition:{top:"_1dbkl58",start:"_1dbkl59"}},defaultVariants:{},compoundVariants:[]}),Jc="_1yep5z6i0 _1yep5z6i1 _1yep5z6i2 _1yep5z6i9 _1yep5z6ia _1yep5z6ib _1yep5z69l _1yep5z69m _1yep5z69n _1yep5z6ir _1yep5z6is _1yep5z6it _1yep5z6jr _1yep5z6js _1yep5z6jt",ed=z({defaultClassName:"_1dbkl50 _1yep5z6i0 _1yep5z6i1 _1yep5z6i2 _1yep5z6dy _1yep5z6ev",variantClassNames:{labelPosition:{top:"_1yep5z6nq _1yep5z6nr _1yep5z6ns",start:"_1dbkl52"}},defaultVariants:{},compoundVariants:[]}),Lr="_1dbkl5l _1yep5z6i6 _1yep5z6i7 _1yep5z6i8 _1yep5z69f _1yep5z69g _1yep5z69h",od="_1dbkl5f z9nup87",Mr="_1dbkl5m _1yep5z6b0 _1yep5z6b1 _1yep5z6b2 _1yep5z6bo _1yep5z6bp _1yep5z6bq _1yep5z6cc _1yep5z6cd _1yep5z6ce _1yep5z6d0 _1yep5z6d1 _1yep5z6d2 _1yep5z6hl _1yep5z6hm _1yep5z6hn",td="_1dbkl5k _1yep5z66 _1yep5z67 _1yep5z68 _1yep5z62i _1yep5z62j _1yep5z62k _1yep5z63o _1yep5z63p _1yep5z63q _1yep5z61c _1yep5z61d _1yep5z61e _1yep5z6ky",rd="_1yep5z63r _1yep5z63s _1yep5z63t _1yep5z619 _1yep5z61a _1yep5z61b _1yep5z6i0 _1yep5z6i1 _1yep5z6i2 _1yep5z6i9 _1yep5z6ia _1yep5z6ib _1yep5z6jr _1yep5z6js _1yep5z6jt _1yep5z6dy _1yep5z6ev _1yep5z69l _1yep5z69m _1yep5z69n _1yep5z6ir _1yep5z6is _1yep5z6it",Br=z({defaultClassName:"_1dbkl5h _1yep5z63 _1yep5z64 _1yep5z65 _1yep5z62f _1yep5z62g _1yep5z62h _1yep5z6fs",variantClassNames:{includesCustomColorPicker:{true:"_1yep5z6me _1yep5z6mf _1yep5z6mg"}},defaultVariants:{},compoundVariants:[]}),gn="_1dbkl5v _1yep5z6i0 _1yep5z6i1 _1yep5z6i2 _1yep5z6i9 _1yep5z6ia _1yep5z6ib",ad=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 _1yep5z6i0 _1yep5z6i1 _1yep5z6i2 _1yep5z6i9 _1yep5z6ia _1yep5z6ib _1yep5z6ir _1yep5z6is _1yep5z6it _1yep5z6l7 _1yep5z6gq _1yep5z6ky _1yep5z6eu _1yep5z6dy",variantClassNames:{isFocused:{true:"_1dbkl5r _1yep5z611y"},isHovered:{true:"_1dbkl5s"},allowAlpha:{false:"_1yep5z6wh _1yep5z6wi _1yep5z6wj _1yep5z6xt _1yep5z6xu _1yep5z6xv _1yep5z6166"}},defaultVariants:{},compoundVariants:[[{isHovered:!0,isFocused:!1},"_1yep5z61nd"]]}),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 _1yep5z6i0 _1yep5z6i1 _1yep5z6i2 _1yep5z6ic _1yep5z6id _1yep5z6ie _1yep5z69c _1yep5z69d _1yep5z69e _1yep5z6f0 _1yep5z6kx _1yep5z6ir _1yep5z6is _1yep5z6it _1yep5z6ki _1yep5z6kl",variantClassNames:{isHovered:{true:"_1yep5z6115"},isFocusVisible:{true:"_1yep5z616c _1yep5z616a _1yep5z616d _1yep5z612n"},isDisabled:{true:"_1yep5z610d"}},defaultVariants:{},compoundVariants:[]}),Ct="_1dbkl5u",Er="_1dbkl5g _1yep5z6al _1yep5z6am _1yep5z6an _1yep5z6b9 _1yep5z6ba _1yep5z6bb _1yep5z6bx _1yep5z6by _1yep5z6bz _1yep5z6cl _1yep5z6cm _1yep5z6cn _1yep5z6d7",Dr="_1dbkl5j _1yep5z69 _1yep5z6a _1yep5z6b _1yep5z62l _1yep5z62m _1yep5z62n _1yep5z63r _1yep5z63s _1yep5z63t _1yep5z61f _1yep5z61g _1yep5z61h _1yep5z6i0 _1yep5z6i1 _1yep5z6i2 _1yep5z6ic _1yep5z6id _1yep5z6ie _1yep5z69f _1yep5z69g _1yep5z69h",vn="_1dbkl5x",id="_1dbkl5w",_n="_1yep5z69 _1yep5z6a _1yep5z6b _1yep5z62l _1yep5z62m _1yep5z62n _1yep5z63r _1yep5z63s _1yep5z63t _1yep5z61f _1yep5z61g _1yep5z61h _1yep5z6i0 _1yep5z6i1 _1yep5z6i2 _1yep5z6ic _1yep5z6id _1yep5z6ie _1yep5z69l _1yep5z69m _1yep5z69n",Fr=z({defaultClassName:"_1dbkl5n _1yep5z6b0 _1yep5z6b1 _1yep5z6b2 _1yep5z6bo _1yep5z6bp _1yep5z6bq _1yep5z6cc _1yep5z6cd _1yep5z6ce _1yep5z6d0 _1yep5z6d1 _1yep5z6d2 _1yep5z6l2 _1yep5z6ho _1yep5z6hp _1yep5z6hq _1yep5z6l7 _1yep5z6la",variantClassNames:{isFocusVisible:{true:"_1dbkl5o _1yep5z616a _1yep5z612n _1yep5z616c"}},defaultVariants:{},compoundVariants:[]}),zn="z9nup84 z9nup86 _1yep5z6b0 _1yep5z6b1 _1yep5z6b2 _1yep5z6bo _1yep5z6bp _1yep5z6bq _1yep5z6cc _1yep5z6cd _1yep5z6ce _1yep5z6d0 _1yep5z6d1 _1yep5z6d2 _1yep5z6ko _1yep5z6kp _1yep5z6kr _1yep5z6kq _1yep5z6ho _1yep5z6hp _1yep5z6hq";var sd=z({defaultClassName:"_1344e9q0 _1yep5z6b0 _1yep5z6b1 _1yep5z6b2 _1yep5z6bo _1yep5z6bp _1yep5z6bq _1yep5z6cc _1yep5z6cd _1yep5z6ce _1yep5z6d0 _1yep5z6d1 _1yep5z6d2 _1yep5z6hl _1yep5z6hm _1yep5z6hn _1yep5z6ks _1yep5z6hk _1yep5z6i0 _1yep5z6i1 _1yep5z6i2 _1yep5z6ir _1yep5z6is _1yep5z6it _1yep5z6jl _1yep5z6jm _1yep5z6jn",variantClassNames:{isFocusVisible:{true:"_1344e9q1"},isDisabled:{true:"_1344e9q2"},removeBlendMode:{true:"_1344e9q3"},isSelected:{true:"_1yep5z616c _1yep5z616a _1yep5z612n _1yep5z616f"},isHovered:{true:"_1344e9q5"}},defaultVariants:{},compoundVariants:[[{isSelected:!1,isFocusVisible:!0},"_1344e9q6"],[{isSelected:!0,isFocusVisible:!0},"_1344e9q7 _1yep5z61rn _1yep5z61rl _1yep5z61ny _1yep5z61rq"],[{isSelected:!0,isDisabled:!0},"_1yep5z61rn _1yep5z61rl _1yep5z61ny _1yep5z61rq _1yep5z61o5"],[{isHovered:!0,isSelected:!1},"_1yep5z61rq _1yep5z61rn _1yep5z61rl _1yep5z61o2"]]});var Ge=io.forwardRef(({color:e,isFocusVisible:o,isSelected:t,isInteractive:r,isDisabled:a,style:n,className:i,id:s,"data-block-id":c,"data-block-class":l,...p},m)=>{let u=e&&e!==we&&(typeof e=="string"?parseColor(e):e),{formatMessage:d}=F(),f=!u,{colorSwatchProps:y}=useColorSwatch({color:f?"#000000":e}),{hoverProps:b,isHovered:_}=useHover({isDisabled:a||!r}),v=filterTruthyValues({"data-focus-visible":o,"data-selected":t,"data-hovered":_,"data-block-id":c,"data-block-class":l,"data-disabled":a,"data-interactive":r});return jsx("div",{...mergeProps(b,v,f?{}:y),style:n,"aria-label":f?d(fz.none):y["aria-label"],role:"img",className:classNames(sd({removeBlendMode:f,isFocusVisible:o,isDisabled:!!a,isSelected:!!t,isHovered:_}),"BaselineUI-ColorSwatch",i),ref:m,id:s,...p,children:jsx(M,{display:"inline-flex",justifyContent:"center",alignItems:"center",borderRadius:"full",height:"full",width:"full",opacity:a?"medium":void 0,style:u?ld(u,4):void 0,children:f?jsx(NoneIcon,{size:14}):null})})});Ge.displayName="ColorSwatch";var fz=q({none:{id:"none",defaultMessage:"None"}});var cd=[{id:"hex",label:"HEX"},{id:"rgb",label:"RGB"}],Oo=parseColor("#000000").toFormat("hsla"),ae="hsla",Pt="hexa";function ro(e){return typeof e=="string"?parseColor(e).toFormat(ae):e?e.toFormat(ae):null}function dd(e,o){return e?.getChannelValue("alpha")?o?.toString(Pt)===e.toString(Pt):!o?.getChannelValue("alpha")}function md(e,o,t){return o?.label?o.label:e?.getChannelValue("alpha")===0?t:e?.toString("rgba")}var we="NONE";function ud(e,o){let t=o?.map(a=>({id:parseColor(a.color).toString(Pt),label:a.label}))||[],r={id:we,label:e};return [...t,r]}var Or=(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:td,children:jsx(Ge,{color:e.value.id,isFocusVisible:t,isSelected:r,"aria-label":e.value.label,isInteractive:!0})})),ld=(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 yd=({value:e,...o})=>{let t=io.useRef(null),r=io.useRef(null),a=io.useRef(null),n=useColorAreaState({...o,value:e}),{colorAreaProps:i,xInputProps:s,yInputProps:c,thumbProps:l}=useColorArea({...o,value:e,inputXRef:t,inputYRef:r,containerRef:a},n);useEffect(()=>{t.current?.focus();},[]);let{focusProps:p,isFocusVisible:m}=useFocusRing();return jsx("div",{ref:a,...i,className:classNames(Yc,"BaselineUI-ColorInput-ColorArea"),children:jsxs("div",{...l,className:classNames(Fr({isFocusVisible:m}),"BaselineUI-ColorInput-ColorAreaThumb"),style:{...l.style,transform:"translate(-50%, -50%)",backgroundColor:ro(e)?.withChannelValue("alpha",1).toString("css")},children:[jsx("input",{ref:t,...s,...p}),jsx("input",{ref:r,...c,...p})]})})};var vd=({color:e,setColor:o,allowAlpha:t,...r})=>{let a=useColorFieldState({value:e,onChange:m=>{o(ro(m)?.toFormat(ae).withChannelValue("alpha",e.getChannelValue("alpha")??1)||Oo);}}),n=io.useRef(null),{inputProps:i}=useColorField({...r,"aria-label":"Hex"},a,n),{focusProps:s,isFocused:c}=useFocusRing({isTextInput:!0}),{hoverProps:l,isHovered:p}=useHover({});return jsxs("div",{className:classNames(gn,"BaselineUI-ColorInput-FieldInput"),"data-color-mode":t?"hexa":"hex",children:[jsx("input",{...mergeProps(i,s,l),ref:n,className:ad({isFocused:c,isHovered:p,allowAlpha:t})}),t?jsx(zd,{color:e,setColor:o}):null]})},_d=({color:e,setColor:o,allowAlpha:t})=>{let r=e.toFormat("rgba"),{locale:a}=useLocale();return jsxs("div",{className:classNames(gn,"BaselineUI-ColorInput-FieldInput"),"data-color-mode":t?"rgba":"rgb",children:[jsx(Le,{"aria-label":e.getChannelName("red",a),value:r.getChannelValue("red"),showStepper:!1,className:Ct,onChange:n=>{o(r.withChannelValue("red",n).toFormat(ae));},step:1,minValue:0,maxValue:255}),jsx(Le,{"aria-label":e.getChannelName("green",a),value:r.getChannelValue("green"),showStepper:!1,className:Ct,onChange:n=>{o(r.withChannelValue("green",n).toFormat(ae));},step:1,minValue:0,maxValue:255}),jsx(Le,{"aria-label":e.getChannelName("blue",a),value:r.getChannelValue("blue"),showStepper:!1,className:Ct,onChange:n=>{o(r.withChannelValue("blue",n).toFormat(ae));},step:1,minValue:0,maxValue:255}),t?jsx(zd,{color:e,setColor:o}):null]})},Tz={style:"percent",maximumFractionDigits:0},zd=({color:e,setColor:o})=>{let{locale:t}=useLocale(),r=useCallback(a=>{o(e.withChannelValue("alpha",a));},[e,o]);return jsx(Le,{"aria-label":e.getChannelName("alpha",t),value:e.getChannelValue("alpha"),formatOptions:Tz,className:Ct,showStepper:!1,onChange:r,minValue:0,maxValue:1})};var kn=({channel:e,...o})=>{let{locale:t}=useLocale(),r=useColorSliderState({...o,channel:e,locale:t}),a=io.useRef(null),n=io.useRef(null),{trackProps:i,thumbProps:s,inputProps:c}=useColorSlider({...o,channel:e,trackRef:a,inputRef:n,"aria-label":r.value.getChannelName(e,t)},r),{focusProps:l,isFocusVisible:p}=useFocusRing();return jsxs("div",{className:classNames(Mr,{[Vs({size:"xs"})]:e==="alpha"},"BaselineUI-ColorInput-ColorSlider"),"data-channel":e,...i,ref:a,children:[e==="alpha"&&jsx("div",{className:zn}),jsx("div",{className:Mr,style:i.style}),jsxs("div",{className:classNames(Fr({isFocusVisible:p}),"BaselineUI-ColorInput-ColorSliderThumb"),...s,children:[jsx("div",{className:zn,style:{backgroundColor:"#ffffff"}}),jsx("div",{style:{backgroundColor:r.getDisplayColor().toString("css"),height:8},className:Mr}),jsx(VisuallyHidden,{children:jsx("input",{ref:n,...c,...l})})]})]})};var Hr=({color:e,setColor:o,allowAlpha:t})=>{let[r,a]=io.useState("hex"),{formatMessage:n}=F(Ke);return jsxs(Fragment,{children:[jsx(yd,{value:e,xChannel:"saturation",yChannel:"lightness",onChange:o}),jsxs("div",{className:_n,children:[jsx(kn,{channel:"hue",value:e,onChange:o}),t?jsx(kn,{channel:"alpha",value:e,onChange:o}):null]}),jsxs("div",{className:classNames(_n,sprinkles.variants({paddingTop:"none",gap:"sm"})),children:[jsx(qe,{label:n("colorFormat"),labelPosition:"start",variant:"ghost",items:cd,selectedKey:r,onSelectionChange:i=>{a(i);}}),r==="hex"&&jsx(vd,{color:e,setColor:o,allowAlpha:t}),r==="rgb"&&jsx(_d,{color:e,setColor:o,allowAlpha:t})]})]})};var In=({color:e,setColor:o,storePickedColorKey:t,addColorButtonLabel:r,removeColorButtonLabel:a,customColorsLabel:n,pickerMode:i,allowAlpha:s})=>{let{locale:c}=useLocale(),{formatMessage:l}=F(Ke),p=io.useRef(null),m=ho(p.current),[u,d]=Fs(t,[]),f=io.useRef(null),[y,b]=io.useState(e),_=io.useMemo(()=>u.map(k=>({id:k,label:parseColor(k).getColorName(c),description:k})),[u,c]),v=useCallback(()=>{let k=i==="active"?e:y;if(u.includes(k.toString(ae))){f.current?.querySelector(`[data-key='${k.toString(ae)}']`)?.classList.add(vn);return}d([...u,k.toString(ae)]);},[u,e,d,y,i]);useEffect(()=>{let k=f.current;function P(w){w.animationName===id&&w.target?.classList.remove(vn);}return k?.addEventListener("animationend",P),()=>{k?.removeEventListener("animationend",P);}},[]);let g=useId(),h=jsx(E,{ref:p,variant:"secondary",size:"md","aria-label":r,icon:PlusIcon$1,onPress:i==="active"?v:void 0}),R=useCallback(k=>jsxs(me,{size:"content",className:Br({includesCustomColorPicker:!0}),style:{paddingBlockEnd:0},"aria-label":l("newColor"),children:[jsx(Hr,{color:y,setColor:b,allowAlpha:s}),jsx(j,{}),jsx(M,{padding:"lg",display:"flex",flexDirection:"row-reverse",children:jsxs(M,{display:"inline-flex",gap:"lg",children:[jsx($,{label:l("cancel"),size:"sm",variant:"secondary",onPress:k}),jsx($,{label:l("add"),variant:"primary",onPress:()=>{v(),k();},size:"sm"})]})})]}),[y,v,l,s]),x=useCallback(k=>{invariant(k instanceof Set,"Key must be a set");let P=[...k][0];P&&o(parseColor(P).toFormat(ae));},[o]);return jsxs(Fragment,{children:[jsx(j,{}),jsxs("div",{className:classNames(rd,"BaselineUI-ColorInput-CustomColors"),children:[jsx("span",{id:g,children:n}),jsxs(M,{display:"flex",children:[!!u.length&&u.includes(e.toString(ae))&&jsx(E,{variant:"secondary",size:"md",elementType:"div",icon:MinusIcon$2,"aria-label":a,onPress:()=>{d(u.filter(k=>k!==e.toString(ae)));}}),i==="active"&&h,i==="lazy"&&(m==="mobile"?jsxs(ke,{children:[jsx(Nr,{children:h}),jsx(Me,{style:{zIndex:1e5},children:({close:k})=>R(k)})]}):jsxs(Se,{type:"dialog",children:[jsx(Ne,{children:h}),jsx(Re,{placement:"right top",className:Er,offset:6,children:({close:k})=>R(k)})]}))]})]}),!!u.length&&jsx(se,{items:_,layout:"grid","aria-labelledby":g,className:classNames(Lr,Dr,sprinkles.variants({paddingTop:"xs"}),"BaselineUI-ColorInput-CustomColorsListBox"),renderOption:Or,ref:f,autoFocus:!1,selectionMode:"single",selectedKeys:[e.toString(ae)],onSelectionChange:x})]})};var Tn=io.forwardRef(({setColor:e,color:o,triggerRef:t,autoFocus:r,presets:a,state:n},i)=>{let{formatMessage:s}=F(Ke),c=useCallback(l=>{if(l instanceof Set&&l.size){let p=[...l][0],m=a.find(u=>u.id===p);invariant(m,"Preset not found"),e(m.id===we?null:parseColor(m.id).toFormat(ae)),n.close();}},[n,a,e]);return jsx("div",{className:classNames(Dr,"BaselineUI-ColorInput-Presets"),style:{minWidth:t.current?.offsetWidth},ref:i,children:jsx(se,{autoFocus:r,items:a,layout:"grid","aria-label":s("colorPresets"),className:Lr,renderOption:Or,selectionMode:"single",selectedKeys:[o?.toString(Pt)||we],onSelectionChange:c})})});Tn.displayName="ColorPresetList";var Rt=io.forwardRef(({color:e,colorLabel:o,colorName:t,...r},a)=>{let n=io.useRef(null),{hoverProps:i,isHovered:s}=useHover({isDisabled:r.isDisabled}),{buttonProps:c,isPressed:l}=useButton(r,n),{isFocusVisible:p,focusProps:m}=useFocusRing(),u=filterTruthyValues({"data-block-id":r["data-block-id"],"data-focused":p,"data-focus-visible":p,"data-disabled":r.isDisabled,"data-hovered":s,"data-pressed":l});return jsxs("button",{...mergeProps(c,i,m,u),style:r.style,className:classNames(Qc({isHovered:s,isFocusVisible:p||r.isOpen,isDisabled:r.isDisabled,labelPosition:r.labelPosition}),"BaselineUI-ColorInputButton",r.className),ref:L(a,n),children:[jsx(Ge,{color:e?.toString("hexa")}),o?jsx("div",{className:od,children:t}):jsx(VisuallyHidden,{children:t})]})});Rt.displayName="ColorInputButton";var jr=io.forwardRef(({className:e,style:o,icon:t,...r},a)=>{let n=io.useRef(null),{hoverProps:i,isHovered:s}=useHover({isDisabled:r.isDisabled}),{buttonProps:c,isPressed:l}=useButton(r,n),{isFocusVisible:p,focusProps:m}=useFocusRing(),u=filterTruthyValues({"data-block-id":r["data-block-id"],"data-focused":p,"data-focus-visible":p,"data-disabled":r.isDisabled,"data-hovered":s,"data-pressed":l});return jsxs("button",{...mergeProps(c,i,m,u),ref:L(a,n),style:o,className:classNames(nd({isHovered:s||l||r.isOpen,isFocusVisible:p,isDisabled:r.isDisabled}),"BaselineUI-IconColorInputButton",e),children:[jsx(t,{size:16}),jsx("div",{className:Zc,style:{backgroundColor:r.color||void 0}})]})});jr.displayName="IconColorInputButton";function Ed({colorLabel:e,color:o,presets:t}){let{formatMessage:r}=F(),{locale:a}=useLocale(),n=useMemo(()=>t.find(c=>c.id===we?!o:o?dd(o,parseColor(c.id)):!1),[t,o]),i=useMemo(()=>typeof e=="function"?e?.(o):e?md(o,n,r(oh.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 oh=q({transparent:{defaultMessage:"Transparent",id:"transparent"}});var Ao=io.forwardRef(({className:e,style:o,allowRemoval:t,allowAlpha:r=!0,presets:a,labelPosition:n="top",colorLabel:i=!0,includePicker:s=!0,onChange:c,defaultValue:l,storePickedColorKey:p="baselinePickedColor",value:m,addColorButtonLabel:u,removeColorButtonLabel:d,customColorsLabel:f,renderTriggerButton:y=({isOpen:k,color:P,ref:w,colorName:S,triggerProps:T,labelId:N})=>jsx(Rt,{...mergeProps(T,{...R.label?{"aria-labelledby":N}:{"aria-label":R["aria-label"]}}),ref:w,isOpen:k,isDisabled:R.isDisabled,labelPosition:n,color:P,colorLabel:i,colorName:S}),pickerMode:b="active",offset:_=2,placement:v=n==="start"?"bottom end":"bottom start","data-block-id":g,"data-block-class":h,...R},x)=>{let k=io.useRef(null),P=io.useRef(null),w=useOverlayTriggerState(R),{triggerProps:S,overlayProps:T}=useOverlayTrigger({type:"listbox"},w,k),N=be(R.portalContainer),[I,C]=useControlledState(m===void 0?void 0:ro(m),ro(l),O=>c?.(O?.toFormat("rgba")||null)),{formatMessage:B}=F(Ke),H=useMemo(()=>ud(B($r.noColor),a),[a,B]),D=useId(),{colorName:G}=Ed({colorLabel:i,color:I,presets:H}),V=useMemo(()=>H.filter(O=>t||O.id!==we),[H,t]),K=u||B($r.addColor),A=d||B($r.removeColor),Q=f||B($r.customColors);return jsxs(Fragment,{children:[jsxs("div",{className:classNames({[Jc]:n==="start"},"BaselineUI-ColorInput-Trigger",e),"data-block-id":g,"data-block-class":h,style:o,ref:x,children:[R.label?jsx("label",{id:D,className:ed({labelPosition:n}),children:R.label}):null,y({isOpen:w.isOpen,color:I,ref:k,colorName:G,triggerProps:S,labelId:D})]}),jsx(ye,{...R,portalContainer:N,placement:v,state:w,offset:_,className:classNames(Er,"BaselineUI-ColorInput-Popover"),triggerRef:k,overlayProps:T,children:jsxs(me,{size:"content",className:Br({includesCustomColorPicker:s}),ref:P,"aria-labelledby":D,"aria-label":R["aria-label"],children:[s&&b==="active"?jsxs(Fragment,{children:[jsx(Hr,{color:I||Oo,setColor:C,allowAlpha:r}),jsx(In,{color:I||Oo,setColor:C,storePickedColorKey:p,addColorButtonLabel:K,removeColorButtonLabel:A,customColorsLabel:Q,pickerMode:b,allowAlpha:r})]}):null,!!V.length&&jsxs(Fragment,{children:[s&&b==="active"?jsx(j,{}):null,jsx(Tn,{autoFocus:s&&b==="active"?!1:"first",state:w,triggerRef:k,presets:V,color:I,setColor:C})]}),s&&b==="lazy"?jsx(In,{color:I||Oo,setColor:C,storePickedColorKey:p,addColorButtonLabel:K,removeColorButtonLabel:A,customColorsLabel:Q,pickerMode:b,allowAlpha:r}):null]})})]})});Ao.displayName="ColorInput";var $r=q({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 Hd=io.forwardRef(({className:e,style:o,icon:t,variant:r="standard","data-block-id":a,tooltipProps:n,...i},s)=>{let c=io.useRef(null),l=useCallback(({isOpen:p,color:m,ref:u,colorName:d,triggerProps:f})=>jsx(re,{variant:"inverse",size:"sm",includeArrow:!1,text:i["aria-label"],placement:"bottom start",offset:4,...n,children:r==="standard"?jsx(Rt,{...f,"aria-label":i["aria-label"],ref:u,isOpen:p,isDisabled:i.isDisabled,color:m,colorLabel:!1,colorName:d}):jsx(jr,{...f,isOpen:p,icon:TextIcon,color:m?.toString("hexa"),ref:u,isDisabled:i.isDisabled,"aria-label":i["aria-label"]})}),[i,n,r]);return jsxs(M,{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:L(s,c),children:[r==="standard"&&t?jsx(t,{size:24,className:sprinkles({color:"icon.primary"})}):null,jsx(Ao,{...i,colorLabel:!1,renderTriggerButton:l})]})});Hd.displayName="IconColorInput";var Vd={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 Ur=z({defaultClassName:"mnnh5s1 _1yep5z6hl _1yep5z6hm _1yep5z6hn _1yep5z6ki _1yep5z6kl _1yep5z6kx _1yep5z6kw _1yep5z6i0 _1yep5z6i1 _1yep5z6i2 _1yep5z6ir _1yep5z6is _1yep5z6it _1yep5z6jl _1yep5z6jm _1yep5z6jn _1yep5z6kv",variantClassNames:{isInline:{true:"mnnh5s2 _1yep5z6vw _1yep5z6vx _1yep5z6vy _1yep5z6wk _1yep5z6wl _1yep5z6wm _1yep5z6x8 _1yep5z6x9 _1yep5z6xa _1yep5z6xw _1yep5z6xx _1yep5z6xy _1yep5z6122 _1yep5z616j _1yep5z616k",false:"_1yep5z6166 _1yep5z6116"},isHovered:{true:"mnnh5s4"},hasLoadedImage:{true:"_1yep5z6115"},includeCheckeredBackground:{true:"mnnh5s6"},showFocusRing:{true:"_1yep5z6126 _1yep5z616c _1yep5z616a _1yep5z612n _1yep5z616d"},isDisabled:{true:"mnnh5s8 _1yep5z6yl"}},defaultVariants:{},compoundVariants:[[{isHovered:!0,hasLoadedImage:!1},"_1yep5z61mo"],[{isHovered:!0,hasLoadedImage:!0},"mnnh5s9"],[{isInline:!0,isDisabled:!0},"_1yep5z61nd"],[{hasLoadedImage:!0,includeCheckeredBackground:!0},"_1yep5z61mg"]]}),Ad="_1yep5z6d8",qr=z({defaultClassName:"mnnh5sa",variantClassNames:{isInline:{true:"mnnh5sb",false:"mnnh5sc"},isDisabled:{true:"mnnh5sd"},hasLoadedImage:{true:"mnnh5s0"}},defaultVariants:{},compoundVariants:[]});var jd=z({defaultClassName:"_1i0ytqa3 _1yep5z6hl _1yep5z6hm _1yep5z6hn _1yep5z6kv _1yep5z6kw _1yep5z6ky",variantClassNames:{isFocusVisible:{true:"_1i0ytqa4"},isInline:{true:"_1yep5z611e",false:"_1yep5z611g"},isDisabled:{true:"_1i0ytqa7 _1yep5z6yl",false:"_1i0ytqa8"}},defaultVariants:{},compoundVariants:[[{isInline:!0,isFocusVisible:!0},"_1i0ytqa9 _1yep5z61n9 _1yep5z61rt _1yep5z61rv"],[{isInline:!1,isFocusVisible:!0},"_1i0ytqaa"],[{isInline:!0,isDisabled:!0},"_1yep5z61mp"],[{isInline:!1,isDisabled:!0},"_1yep5z61mr"]]}),$d="_1i0ytqa0",Kr=z({defaultClassName:"_1i0ytqab _1yep5z63r _1yep5z63s _1yep5z63t _1yep5z61f _1yep5z61g _1yep5z61h _1yep5z63 _1yep5z64 _1yep5z65 _1yep5z62f _1yep5z62g _1yep5z62h _1yep5z6i0 _1yep5z6i1 _1yep5z6i2 _1yep5z6jl _1yep5z6jm _1yep5z6jn _1yep5z6kv",variantClassNames:{isInline:{false:"_1yep5z6115"},isDisabled:{true:"_1i0ytqad _1yep5z6yl"}},defaultVariants:{},compoundVariants:[]}),Ud=z({defaultClassName:"_1i0ytqa1 _1yep5z63 _1yep5z64 _1yep5z65 _1yep5z62f _1yep5z62g _1yep5z62h _1yep5z6i0 _1yep5z6i1 _1yep5z6i2 _1yep5z6i9 _1yep5z6ia _1yep5z6ib _1yep5z6jr _1yep5z6js _1yep5z6jt _1yep5z6ir _1yep5z6is _1yep5z6it _1yep5z6kv",variantClassNames:{isInline:{false:"_1yep5z63r _1yep5z63s _1yep5z63t _1yep5z619 _1yep5z61a _1yep5z61b"}},defaultVariants:{},compoundVariants:[]});function qd({line:e,options:o}){let t=useRef([]),r=useMemo(()=>{let a=Math.ceil(e.length/jo),n;for(let i=0;i<a;i++)if(!(!(i===a-1)&&!!t.current[i])){let l=e.slice(i*jo-(i>0?1:0),i*jo+jo);n=getSvgPathFromStroke(getStroke(l.map(([p,m,u])=>({x:p,y:m,pressure:u})),o)),l.length>=(i>0?jo+1:jo)&&(t.current[i]=n);}return n},[e,o]);return [...t.current,r]}var jo=60*3;var Nh={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},Gd=io.forwardRef(({className:e,style:o,canvasClassName:t,canvasStyle:r,isBound:a=!0,strokeWidth:n=2,strokeColor:i="#3A87FD",onChange:s,defaultValue:c,onChangeEnd:l,enableHistory:p=!1,isInline:m=!0,isDisabled:u,placeholder:d,clearLabel:f,undoLabel:y,redoLabel:b,footerClassName:_,canvasRef:v,value:g,footerStyle:h,"data-block-id":R,"data-block-class":x,"aria-label":k="Drawing canvas",description:P="This is a canvas for drawing using a mouse or touch input.",...w},S)=>{let T=F(Vd),N=io.useRef(null),[I,C]=io.useState(g||c||[]),B=io.useMemo(()=>({...Nh,...w}),[w]),[H,D]=io.useState(),G=useId(),{labelProps:V,fieldProps:K}=useLabel({...w,"aria-label":k,labelElementType:"span"}),{isFocusVisible:A,focusProps:Q}=useFocusRing({within:!0}),{hoverProps:O,isHovered:W}=useHover({isDisabled:u}),{undo:le,redo:_e,canRedo:he,canUndo:xe,push:Ce}=Ls(I,{onAction:X=>{X&&(C(X),l?.(X));},isDisabled:!p}),{keyboardProps:De}=useKeyboard({onKeyDown:X=>{X.key==="Backspace"?qt():X.key==="z"&&(X.metaKey||X.ctrlKey)&&(X.shiftKey?he&&_e():xe&&le());}}),[ee,de]=useState(!1),Jo=useCallback(X=>{let U=X.currentTarget.getBoundingClientRect();D(U),X.target.setPointerCapture(X.pointerId);let pe=[X.clientX-U.x,X.clientY-U.y,X.pressure];C(Y=>[...Y,[pe]]),de(!0);},[]),Je=useCallback(X=>{if(X.buttons!==1||!H)return;let pe=Yd(X.nativeEvent).map(Y=>[a?clamp(Y.clientX-H.left,0,H.width):Y.clientX-H.left,a?clamp(Y.clientY-H.top,0,H.height):Y.clientY-H.top,Y.pressure]);C(Y=>{let ze=[...Y];return ze[Y.length-1]=[...ze[Y.length-1],...pe],ze});},[H,a]),fa=()=>{H&&(l?.(I),Ce(I),de(!1));};useEffect(()=>{s?.(I);},[I,s]);let qt=()=>{C([]),s?.([]),Ce([]);};return jsxs("div",{ref:L(N,S),className:classNames($d,"BaselineUI-FreehandCanvas",e),style:o,"aria-disabled":u,"data-block-id":R,"data-block-class":x,children:[w.label||p?jsxs("div",{className:Ud({isInline:m}),children:[w.label?jsx(J,{type:"label",size:"sm",...V,children:w.label}):jsx("span",{}),p?jsxs("div",{children:[jsx(E,{variant:"secondary",size:"sm",isDisabled:!xe||u,icon:UndoIcon,onPress:le,"aria-label":y||T.formatMessage("undo")}),jsx(E,{variant:"secondary",size:"sm",isDisabled:!he||u,icon:RedoIcon,onPress:_e,"aria-label":b||T.formatMessage("redo")})]}):null]}):null,jsxs("div",{role:"application",...mergeProps(Q,De,O,K),tabIndex:u?void 0:0,className:classNames(Ur({isInline:m,isHovered:W}),jd({isFocusVisible:A,isInline:m,isDisabled:!!u}),t),"aria-describedby":w["aria-describedby"]||G,style:r,ref:v,children:[jsx(VisuallyHidden,{children:jsx("div",{id:G,children:P})}),jsx("svg",{width:r?.width||"100%",height:r?.height||"100%",onPointerDown:Jo,onPointerMove:Je,onPointerUp:fa,children:(g||I).map((X,U,pe)=>U<pe.length-1||!ee?jsx(Wd,{line:X,options:B,strokeColor:i,strokeWidth:n},U):jsx(Xd,{line:X,options:B,strokeColor:i,strokeWidth:n},U))})]}),d||f?jsx("div",{style:h,className:classNames(Kr({isInline:m,isDisabled:u}),_),children:(I.length||!d)&&f?jsx($,{size:"sm",variant:"ghost",label:f,isDisabled:u,onPress:qt}):jsx($,{size:"sm",variant:"ghost",label:d,isDisabled:!0})}):null]})});Gd.displayName="FreehandCanvas";var Wd=io.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})});Wd.displayName="Stroke";var Xd=io.memo(({line:e,options:o,strokeColor:t,strokeWidth:r})=>{let a=qd({line:e,options:o});return jsx(Fragment,{children:a.map((n,i)=>jsx("path",{d:n,stroke:t,strokeWidth:r},i))})});Xd.displayName="SplitStroke";function Yd(e){if(typeof e.getCoalescedEvents=="function"){let o=e.getCoalescedEvents();return o.length>0?o.flatMap(t=>Yd(t)):[e]}return [e]}var Zd="_1vac7ws0",Qd=z({defaultClassName:"_1vac7ws1",variantClassNames:{isDragging:{true:"_1vac7ws2"}},defaultVariants:{},compoundVariants:[]});function em(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 om(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 Wh=makeMoveable([Draggable,Resizable,Rotatable,Snappable]),rm=io.forwardRef(({className:e,children:o,isRotatable:t,isResizable:r,isDraggable:a,style:n,onTransform:i,onTransformStart:s,onTransformEnd:c,onDoubleClick:l,onDragStart:p,onDragEnd:m,onDrag:u,onResizeStart:d,onResizeEnd:f,onResize:y,onRotateStart:b,onRotateEnd:_,onRotate:v,onSnap:g,isSnappable:h,elementGuidelines:R,hideAnchorOnDrag:x=!0,title:k,rotationPosition:P,autoUpdate:w,bound:S,snapRotationDegrees:T,snapRotationThreshold:N,scrollableAncestor:I,renderDirections:C,stopPropagation:B,transformOrigin:H,preventDefault:D},G)=>{let V=useRef(null),K=useRef(null),[A,Q]=useState(document),O=useRef(A.createElement("div")),[W,le]=useState({}),[_e,he]=useState(!1),[xe,Ce]=useState(!1),[De,ee]=useState(),de=em(R,A);useLayoutEffect(()=>{let U=O.current;return O.current=A.createElement("div"),()=>{U.remove();}},[A]);let{keyboardProps:Jo}=useKeyboard({onKeyDown:U=>{let pe=U.shiftKey?10:1,Y=U.metaKey||U.ctrlKey;Y&&U.shiftKey&&(pe=45);function ze(et,Vf="x"){Y?K.current?.request("rotatable",{deltaRotate:et*pe},!0):K.current?.request("draggable",Vf==="x"?{deltaX:et*pe}:{deltaY:et*pe},!0);}switch(U.key){case"ArrowRight":{ze(1);break}case"ArrowLeft":{ze(-1);break}case"ArrowUp":{ze(-1,"y");break}case"ArrowDown":ze(1,"y");}requestAnimationFrame(()=>{K.current?.updateRect();});}});useEffect(()=>{let U=fe(V.current);Q(U);let pe=O.current;U.body.append(O.current);function Y(et){Ce(et.shiftKey);}function ze(){Ce(!1);}return U.addEventListener("keydown",Y),U.addEventListener("keyup",ze),()=>{U.removeEventListener("keydown",Y),U.removeEventListener("keyup",ze),pe.remove();}},[]),om({scrollable:I,onScroll:()=>{K.current?.updateRect();},ownerDocument:A});let Je=useCallback(U=>{le(pe=>({...pe,...U.style})),i?.(U);},[i]),fa=useCallback(U=>{if(he(!0),V.current?.focus(),S){let Y=getHTMLElement(S,A)?.getBoundingClientRect();ee({position:"client",left:Y?.left??0,top:Y?.top??0,right:Y?.right??0,bottom:Y?.bottom??0});}p?.(U);},[S,A,p]),qt=useCallback(U=>{he(!1),m?.(U);},[m]),X=o({style:{...W.width&&{width:W.width},...W.height&&{height:W.height}}});return jsxs(Fragment,{children:[jsx("div",{role:"button",...Jo,ref:L(V,G),style:{display:"inline-block",...n,...W},className:classNames(Zd,e),onDoubleClick:l,tabIndex:0,title:k,children:X}),createPortal(jsx(Wh,{ref:K,target:V,draggable:a,resizable:r,rotatable:t,keepRatio:xe,throttleDrag:1,snappable:h||!!S,elementGuidelines:de,snapRenderThreshold:.9,className:Qd({isDragging:_e&&x}),onRender:Je,onDragStart:fa,onDragEnd:qt,useResizeObserver:w,useMutationObserver:w,onRenderEnd:c,onDrag:u,onResizeStart:d,onResizeEnd:f,onResize:y,onRotateStart:b,onRotateEnd:_,onRotate:v,onRenderStart:s,onSnap:g,rotationPosition:P,bounds:De,snapRotationDegrees:T,snapRotationThreshold:N,renderDirections:C,stopPropagation:B,preventDefault:D,transformOrigin:H}),O.current)]})});rm.displayName="Transform";var am={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 sm=io.forwardRef(({className:e,style:o,isInline:t=!0,accept:r="image/*",defaultImageSrc:a,imageSrc:n,imageAlt:i,pickerButtonLabel:s,isDisabled:c,onDrop:l,onPaste:p,includeCheckeredBackground:m=!0,"data-block-id":u,"data-block-class":d,pickerButtonStyle:f,pickerButtonClassName:y,footerClassName:b,footerStyle:_,clearLabel:v,placeholder:g,labelStyle:h,labelClassName:R,...x},k)=>{let P=io.useRef(null),w=io.useRef(null),{formatMessage:S}=F(am),[T,N]=useControlledState(n,a||null,ee=>{invariant(typeof ee!="string"),x.onValueChange?.(ee?[ee]:[]);}),I=useMemo(()=>lx(T||void 0),[T]),{fieldProps:C,labelProps:B}=useField(x),{dropProps:H,isDropTarget:D}=useDrop({ref:P,onDrop:async ee=>{if(c)return;let de=await Ja({items:ee.items});de.length&&N(de[0]),l?.(ee);},...x}),{clipboardProps:G}=useClipboard({onPaste:async ee=>{if(c)return;let de=await Ja({items:ee});de.length&&N(de[0]),p?.(ee);},...x}),V=()=>{N(null),w.current&&(w.current.value="");},K={type:"file",onChange:ee=>{let de=[...ee.target.files];N(de[0]),x.onChange?.(ee);},accept:r,disabled:c},{focusProps:A,isFocused:Q,isFocusVisible:O}=useFocusRing({within:!0}),{hoverProps:W,isHovered:le}=useHover({isDisabled:c}),{imgProps:_e,isLoading:he,isLoaded:xe}=_o({src:I,alt:i||""}),Ce={label:s||S("selectImage"),onPress:()=>P.current?.click(),variant:"secondary",isDisabled:c,excludeFromTabOrder:!0,className:classNames(or({isFocusVisible:O}),{[Ad]:D&&!c},y),style:f},De=filterTruthyValues({"data-loaded":xe,"data-block-id":u,"data-block-class":d,"data-hovered":le,"data-focused":Q,"data-drop-target":D,"data-disabled":c,"data-focus-visible":O});return jsxs(M,{...De,className:classNames("BaselineUI-ImageDropZone",e),display:"flex",flexDirection:"column",alignItems:"center",style:o,ref:k,children:[jsxs("label",{...mergeProps(H,W,A,B),className:classNames(Ur({isInline:t,isHovered:le,isDisabled:c,hasLoadedImage:!!I&&xe,showFocusRing:D||!!I&&O}),R),style:h,ref:P,children:[jsx(VisuallyHidden,{children:jsx("input",{...mergeProps(C,G,K),ref:w})}),!I&&jsx($,{...Ce}),!!I&&(he?jsx(Bo,{}):jsx("img",{className:qr({isInline:t,isDisabled:c,hasLoadedImage:!!I&&xe&&m}),..._e}))]}),g||v?jsx("div",{style:_,className:classNames(Kr({isInline:t,isDisabled:c}),b),children:(I||!g)&&v?jsx($,{size:"sm",variant:"ghost",label:v,isDisabled:c,onPress:V}):jsx($,{size:"sm",variant:"ghost",label:g,isDisabled:!0})}):null]})});sm.displayName="ImageDropZone";function lx(e){return e instanceof File?URL.createObjectURL(e):e}var lm="_1vm2oh49 _1yep5z6ho _1yep5z6hp _1yep5z6hq _1yep5z6fv",Fn="_1vm2oh48 _1yep5z6kw _1yep5z6i0 _1yep5z6i1 _1yep5z6i2 _1yep5z6ir _1yep5z6is _1yep5z6it _1yep5z6jl _1yep5z6jm _1yep5z6jn _1yep5z6jc _1yep5z6jd _1yep5z6je",pm=z({defaultClassName:"_1vm2oh40 mnnh5s1 _1yep5z6i0 _1yep5z6i1 _1yep5z6i2 _1yep5z6l1 _1yep5z6kz _1yep5z6hk _1yep5z6l2 _1yep5z6ir _1yep5z6is _1yep5z6it _1yep5z6ki _1yep5z6kx _1yep5z6hl _1yep5z6hm _1yep5z6hn",variantClassNames:{accent:{theme:"_1vm2oh41",positive:"_1vm2oh42"},isInline:{true:"mnnh5s2 _1yep5z6vt _1yep5z6vu _1yep5z6vv _1yep5z6wh _1yep5z6wi _1yep5z6wj _1yep5z6x5 _1yep5z6x6 _1yep5z6x7 _1yep5z6xt _1yep5z6xu _1yep5z6xv _1yep5z6121 _1yep5z616i _1yep5z616k",false:"_1yep5z611g"},isFocusVisible:{true:"_1yep5z6126 _1yep5z616c _1yep5z616a _1yep5z612n _1yep5z616d"},isDisabled:{true:"mnnh5s8 z9nup83 _1yep5z6yl"},isHovered:{true:"_1vm2oh47"}},defaultVariants:{},compoundVariants:[[{accent:"positive",isInline:!0},"_1yep5z61mp"],[{accent:"theme",isInline:!0},"_1yep5z61me"],[{accent:"positive",isInline:!1},"_1yep5z61mr"],[{accent:"theme",isInline:!1},"_1yep5z61mg"],[{isFocusVisible:!0,isInline:!0},"_1yep5z61ny _1yep5z61rl _1yep5z61rn _1yep5z61ro"],[{isHovered:!0,isInline:!0},"_1yep5z61ro _1yep5z61ny _1yep5z61rl _1yep5z61rn"],[{isHovered:!0,isInline:!1,accent:"positive"},"_1yep5z61mq"],[{isHovered:!0,isInline:!1,accent:"theme"},"_1yep5z61mi"],[{isHovered:!0,isInline:!0,accent:"theme"},"_1yep5z61mf"]]});var mm=io.forwardRef(({className:e,style:o,isDisabled:t,isInline:r=!0,imageAlt:a,imageSrc:n,svgSrc:i,textValue:s,textStyle:c,onPress:l,onDelete:p,deleteAriaLabel:m,addAriaLabel:u,accent:d="positive","data-block-id":f,"data-block-class":y,...b},_)=>{let{focusProps:v,isFocused:g,isFocusVisible:h}=useFocusRing({within:!0}),{isHovered:R,hoverProps:x}=useHover({isDisabled:t}),{pressProps:k}=usePress({isDisabled:t,onPress:l});invariant(n||i||s,"Preview must have content. You must provide either an `imageSrc`, `svgSrc`, or `textValue` prop.");let P=filterTruthyValues({"data-hovered":R,"data-focus-visible":h,"data-focused":g,"data-disabled":t});return jsxs("div",{...b,className:classNames(pm({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:_,children:[typeof i=="string"?jsx("button",{disabled:t,...mergeProps(x,v,k,P),className:Fn,"aria-label":u,dangerouslySetInnerHTML:{__html:i}}):jsxs("button",{...mergeProps(x,v,k,P),disabled:t,style:c,"aria-label":u,className:Fn,children:[n?jsx("img",{src:n,alt:a,className:qr({isInline:r,isDisabled:t})}):null,!!i&&typeof i=="object"&&i,s]}),p?jsx(E,{isDisabled:t,className:lm,"aria-label":m,size:"xs",icon:TrashIcon,onPress:p}):null]})});mm.displayName="Preview";var um="_1yep5z6i0 _1yep5z6i1 _1yep5z6i2 _1yep5z6ic _1yep5z6id _1yep5z6ie _1yep5z69c _1yep5z69d _1yep5z69e",fm=z({defaultClassName:"cw3m0n8 _1yep5z6ew _1yep5z6dv",variantClassNames:{isDisabled:{true:"_1yep5z6109"}},defaultVariants:{},compoundVariants:[]}),ym="cw3m0n7",bm=z({defaultClassName:"cw3m0n0 _1yep5z6i0 _1yep5z6i1 _1yep5z6i2 _1yep5z6ir _1yep5z6is _1yep5z6it _1yep5z6i9 _1yep5z6ia _1yep5z6ib",variantClassNames:{labelPosition:{end:"_1yep5z613k _1yep5z613l _1yep5z613m _1yep5z6ut _1yep5z6uu _1yep5z6uv",start:"_1yep5z613q _1yep5z613r _1yep5z613s _1yep5z6152 _1yep5z6153 _1yep5z6154"}},defaultVariants:{},compoundVariants:[]}),gm="_1yep5z6ai _1yep5z6aj _1yep5z6ak _1yep5z6b6 _1yep5z6b7 _1yep5z6b8 _1yep5z6bu _1yep5z6bv _1yep5z6bw _1yep5z6ci _1yep5z6cj _1yep5z6ck _1yep5z6i0 _1yep5z6i1 _1yep5z6i2 _1yep5z6ic _1yep5z6id _1yep5z6ie _1yep5z69i _1yep5z69j _1yep5z69k _1yep5z6ks",vm=z({defaultClassName:"cw3m0n3 _16vugd05",variantClassNames:{isFocusVisible:{true:"_16vugd08"},isSelected:{true:"_16vugd07"},isDisabled:{true:"_16vugd0a"}},defaultVariants:{},compoundVariants:[]});var kx=({label:e,description:o},{isSelected:t,isFocusVisible:r,isDisabled:a,optionLabelPosition:n})=>jsxs("div",{className:bm({labelPosition:n}),children:[jsx("div",{className:vm({isSelected:t,isFocusVisible:r,isDisabled:a}),children:t?jsx("div",{className:ym}):null}),e?jsxs("div",{className:um,children:[jsx("span",{className:Pr({isDisabled:a}),children:e}),o?jsx("span",{className:fm({isDisabled:a}),children:o}):null]}):null]}),_m=({state:e,renderOption:o=kx,item:t,optionLabelPosition:r="end",optionStyle:a,optionClassName:n,isReadOnly:i,...s})=>{let c=!!s.isDisabled||!!s.disabledValues?.includes(t.id),l=io.useRef(null),{inputProps:p,isPressed:m,isSelected:u}=useRadio({...s,isDisabled:c,children:t.label,value:t.id},e,l),{focusProps:d,isFocusVisible:f,isFocused:y}=useFocusRing(),{isHovered:b}=useHover({isDisabled:c}),_=filterTruthyValues({"data-selected":u,"data-focused":y,"data-focus-visible":f,"data-hovered":b,"data-disabled":c,"data-pressed":m,"data-read-only":i});return jsxs("label",{..._,style:a,className:classNames("BaselineUI-Radio-Item",n),children:[jsx(VisuallyHidden,{children:jsx("input",{...mergeProps(p,d),ref:l})}),o(t,{isFocusVisible:f,isSelected:u,isFocused:y,isHovered:b,isDisabled:c,optionLabelPosition:r,isReadOnly:i})]})};var zm=io.forwardRef(({className:e,style:o,optionsContainerClassName:t,optionsContainerStyle:r,items:a,labelPosition:n="top",renderOption:i,"aria-label":s,"aria-labelledby":c,"aria-describedby":l,"aria-details":p,"data-block-id":m,"data-block-class":u,...d},f)=>{let y=useRadioGroupState(d),{radioGroupProps:b,labelProps:_,descriptionProps:v,errorMessageProps:g}=useRadioGroup({...d,"aria-label":s,"aria-labelledby":c,"aria-describedby":l,"aria-details":p},y),h=Pe({...d,descriptionProps:v,errorMessageProps:g,labelPosition:n}),R=filterTruthyValues({"data-orientation":d.orientation,"data-block-id":m,"data-block-class":u,"data-disabled":d.isDisabled,"data-readonly":d.isReadOnly});return jsxs("div",{...mergeProps(b,R),className:classNames(He({labelPosition:n}),"BaselineUI-RadioGroup",e),style:o,ref:f,children:[d.label||h?jsxs("div",{className:Oe({labelPosition:n,hasMessage:!!h}),children:[jsx("span",{..._,className:classNames(Fe,"BaselineUI-RadioGroup-Label"),children:d.label}),n==="start"&&h]}):null,jsxs("div",{className:classNames({[xo]:d.isDisabled}),children:[jsx("div",{className:classNames(gm,t),style:r,children:a.map(x=>jsx(_m,{state:y,renderOption:i,item:x,...d,value:x.id},x.id))}),n==="top"&&h]})]})});zm.displayName="RadioGroup";var hm=({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})};hm.displayName="MessageFormat";var xm=io.forwardRef(({className:e,style:o,children:t,"data-block-id":r,"data-block-class":a,role:n="group",isDisabled:i,...s},c)=>{let{hoverProps:l,isHovered:p}=useHover({isDisabled:i});return jsx("div",{...l,role:n,"data-hovered":p,"data-disabled":i,"data-block-id":r,"data-block-class":a,className:e,style:o,...s,ref:c,children:t})});xm.displayName="Group";var jn="UNSUPPORTED_IN_MENU";function km(e){return useMemo(()=>io.Children.toArray(e).map(o=>{let t=o,r=uniqueId("item"),a=Nt(t,Se),n=Pm(t),i,s;if(a){let _=Nt(a,Ne);invariant(_),i=Pm(_),s=Nt(a,Re).props.children;}else n?i=n:i=t;let{onPress:c,label:l,"aria-label":p,iconStart:m,isDisabled:u,icon:d}=i.props,f=l||p||jn;invariant(typeof f=="string","ActionGroup children must have a string label");let y=`${r}-${f}`;return createElement(Item,{...{key:y,onPress:c,textValue:f,"aria-label":p,icon:m||d,dialogContent:s,isDisabled:u},key:y},t)}),[e])}function Nt(e,o){return o?flatMapDeep(io.Children.toArray(e),r=>io.isValidElement(r)&&r.props.children?[r,...io.Children.toArray(r.props.children)]:[r]).find(r=>io.isValidElement(r)&&r.type===o):void 0}function Pm(e){return Nt(e,$)||Nt(e,E)}var Rm="_1yep5z6i0 _1yep5z6i1 _1yep5z6i2 _1yep5z6hl _1yep5z6hm _1yep5z6hn _1yep5z6kv _1yep5z6i9 _1yep5z6ia _1yep5z6ib _1yep5z6kn",wm={horizontal:"xvr3wn0",vertical:"xvr3wn1"};var Un=io.forwardRef(({className:e,style:o,children:t,collapsibleMenuProps:r,"data-block-id":a,"data-block-class":n,renderSpacer:i,onKeyDown:s,...c},l)=>{let{formatMessage:p}=F(),[m,u]=useState(),d=km(t),f=useListState({...c,children:d}),y=te(l),b=useRef(null),[{visibleItems:_,isMeasuring:v},g]=ba({visibleItems:f.collection.size,isMeasuring:!1}),h=useCallback(()=>{let N=I=>{if(b.current&&y.current){let C=[...b.current.children],B=y.current.getBoundingClientRect().width,H=I<f.collection.size,D=0,G=0;if(H){let V=C.pop();V&&(D+=Nm(V,!1,!0));}for(let[V,K]of C.entries())if(D+=Nm(K,V===0,V===C.length-1),Math.round(D)<=Math.round(B))G++;else break;return G}return I};g(function*(){yield {visibleItems:f.collection.size,isMeasuring:!0};let I=N(f.collection.size),C=I<f.collection.size&&I>0;yield {visibleItems:I,isMeasuring:C},C&&(yield {visibleItems:N(I),isMeasuring:!1});});},[g,y,f.collection.size]),R=useMemo(()=>({get current(){return y.current?.parentElement}}),[y]);ha({ref:R,onResize:h}),Te(h,[f.collection,h]);let{toolbarProps:x}=useToolbar(c,y),k=[...f.collection],P=k.slice(0,_),w=k.slice(_).filter(N=>N.textValue!==jn),S=w.length>0;useEffect(()=>{u(void 0);},[w.length]),useEffect(()=>{c.orientation==="vertical"&&console.warn("Toolbar: Vertical orientation is not supported when `isCollapsible` is true.");},[c.orientation]);let{keyboardProps:T}=useKeyboard({onKeyDown:s});return jsxs(FocusScope,{children:[jsx("div",{...mergeProps(x,T),className:e,"data-block-id":a,"data-block-class":n,"data-collapse":!0,style:{...o,flexBasis:v?"100%":void 0},ref:y,children:jsxs("div",{ref:b,className:Rm,children:[P.map(N=>N.rendered),S?jsxs(Fragment,{children:[!v&&i?jsx(M,{flexGrow:1}):null,jsx(vr,{placement:"bottom end",renderTrigger:({buttonProps:N,ref:I})=>jsx(E,{...N,size:"md",icon:MoreIcon,"aria-label":p(Qx.more),variant:"toolbar",ref:I}),...r,disabledKeys:w.filter(N=>N.props?.isDisabled).map(N=>N.key),items:w.map(N=>{let I=N.textValue||N["aria-label"];return invariant(I,"ActionItem must have a label"),{id:N.key,label:I,icon:N.props.icon}}),onAction:N=>{let I=f.collection.getItem(N);invariant(I,"Item not found");let{onPress:C,dialogContent:B}=I.props;C?.(),u(B);}})]}):null]})}),jsx(ke,{isOpen:!!m,onOpenChange:N=>{N||u(void 0);},children:jsx(Me,{enableDrawer:"auto",style:{zIndex:1e5},children:m?io.cloneElement(m,{inheritDrawer:!0}):null})})]})});Un.displayName="CollapsibleToolbar";function Nm(e,o,t){let a=oe(e).getComputedStyle(e);return e.getBoundingClientRect().width+(o?0:Lm(a.marginLeft))+(t?0:Lm(a.marginRight))}function Lm(e){let o=Number.parseInt(e,10);return Number.isNaN(o)?0:o}var Qx=q({more:{id:"more",defaultMessage:"More"}});var qn=io.forwardRef(({className:e,style:o,"data-block-id":t,"data-block-class":r,"aria-controls":a,onKeyDown:n,...i},s)=>{let c=io.useRef(null),{toolbarProps:l}=useToolbar(i,c),{keyboardProps:p}=useKeyboard({onKeyDown:n});return jsx("div",{...mergeProps(l,p),"aria-controls":a,className:classNames(wm[i.orientation||"horizontal"],"BaselineUI-Toolbar",e),style:o,"data-block-id":t,"data-block-class":r,ref:L(s,c),children:i.children})});qn.displayName="WrappedToolbar";var Yr=io.forwardRef((e,o)=>{let t=e.isCollapsible?Un:qn;return jsx(t,{...e,ref:o})});Yr.displayName="Toolbar";var Bm=z({defaultClassName:"_1j5skr71",variantClassNames:{size:{xxs:"_1j5skr72",xs:"_1j5skr73",sm:"_1j5skr74",md:"_1j5skr75",lg:"_1j5skr76"}},defaultVariants:{},compoundVariants:[]}),Em=z({defaultClassName:"_1j5skr70 _1yep5z6ir _1yep5z6is _1yep5z6it _1yep5z6kx _1yep5z6ky _1yep5z6ks _1yep5z6i3 _1yep5z6i4 _1yep5z6i5 _1yep5z6i9 _1yep5z6ia _1yep5z6ib _1yep5z6jl _1yep5z6jm _1yep5z6jn _1yep5z6ai _1yep5z6aj _1yep5z6ak _1yep5z6b6 _1yep5z6b7 _1yep5z6b8 _1yep5z6bu _1yep5z6bv _1yep5z6bw _1yep5z6ci _1yep5z6cj _1yep5z6ck _1yep5z6fs _1yep5z6f0",variantClassNames:{isHovered:{true:"_1j5skr7g"},isFocusVisible:{true:"_1j5skr7h"},isDisabled:{true:"z9nup83 _1yep5z610d"},isSelected:{true:"_1j5skr7j"}},defaultVariants:{},compoundVariants:[[{isSelected:!0,isDisabled:!0},"_1yep5z61ro _1yep5z61rn _1yep5z61rl _1yep5z61o5 _1yep5z61lo"],[{isSelected:!1,isHovered:!0,isDisabled:!1},"_1yep5z6fu"],[{isSelected:!1,isFocusVisible:!0,isDisabled:!1},"_1yep5z61ro _1yep5z61rn _1yep5z61ny _1yep5z61rl"],[{isSelected:!0,isFocusVisible:!0,isDisabled:!1},"_1j5skr7k _1yep5z61rm _1yep5z61rl _1yep5z61nz _1yep5z61lp"],[{isSelected:!0,isFocusVisible:!1,isDisabled:!1},"_1yep5z61rl _1yep5z61rn _1yep5z61ny _1yep5z61ro"]]}),Dm=z({defaultClassName:"_1j5skr70 _1yep5z6ir _1yep5z6is _1yep5z6it _1yep5z6kx _1yep5z6ky _1yep5z6ks _1yep5z6i3 _1yep5z6i4 _1yep5z6i5 _1yep5z6i9 _1yep5z6ia _1yep5z6ib _1yep5z6jl _1yep5z6jm _1yep5z6jn _1yep5z6ai _1yep5z6aj _1yep5z6ak _1yep5z6b6 _1yep5z6b7 _1yep5z6b8 _1yep5z6bu _1yep5z6bv _1yep5z6bw _1yep5z6ci _1yep5z6cj _1yep5z6ck _1yep5z6f0",variantClassNames:{isHovered:{true:"_1j5skr7m"},isFocusVisible:{true:"_1yep5z616d _1yep5z616c _1yep5z612n _1yep5z616a"},isSelected:{true:"_1yep5z610c"},isDisabled:{true:"z9nup83 _1yep5z610d"}},defaultVariants:{},compoundVariants:[[{isSelected:!1,isHovered:!0},"_1yep5z61ln"]]}),Fm=z({defaultClassName:"_1j5skr70 _1yep5z6ir _1yep5z6is _1yep5z6it _1yep5z6kx _1yep5z6ky _1yep5z6ks _1yep5z6i3 _1yep5z6i4 _1yep5z6i5 _1yep5z6i9 _1yep5z6ia _1yep5z6ib _1yep5z6jl _1yep5z6jm _1yep5z6jn _1yep5z6ai _1yep5z6aj _1yep5z6ak _1yep5z6b6 _1yep5z6b7 _1yep5z6b8 _1yep5z6bu _1yep5z6bv _1yep5z6bw _1yep5z6ci _1yep5z6cj _1yep5z6ck _1yep5z6f0",variantClassNames:{isHovered:{true:"_1j5skr7r"},isFocusVisible:{true:"_1yep5z616d _1yep5z616c _1yep5z612n _1yep5z616a"},isSelected:{true:"_1j5skr7t"},isDisabled:{true:"z9nup83 _1yep5z610d"}},defaultVariants:{},compoundVariants:[[{isSelected:!1,isHovered:!0},"_1yep5z61mg"],[{isSelected:!0,isDisabled:!1},"_1yep5z61mg _1yep5z61lq"],[{isSelected:!0,isDisabled:!0},"_1yep5z61mg _1yep5z61lo"]]}),Om=z({defaultClassName:"_1j5skr77 _1j5skr70 _1yep5z6ir _1yep5z6is _1yep5z6it _1yep5z6kx _1yep5z6ky _1yep5z6ks _1yep5z6i3 _1yep5z6i4 _1yep5z6i5 _1yep5z6i9 _1yep5z6ia _1yep5z6ib _1yep5z6jl _1yep5z6jm _1yep5z6jn _1yep5z6f0",variantClassNames:{isHovered:{true:"_1j5skr78"},isFocusVisible:{true:"_1j5skr79"},isSelected:{true:"_1j5skr7a"},isDisabled:{true:"_1j5skr7b z9nup83 _1yep5z610e"}},defaultVariants:{},compoundVariants:[[{isSelected:!0,isDisabled:!1},"_1j5skr7c _1yep5z61lp"],[{isSelected:!1,isDisabled:!0},"_1j5skr7d _1yep5z61lo"],[{isSelected:!1,isHovered:!0},"_1yep5z61mg"],[{isSelected:!1,isFocusVisible:!0},"_1yep5z61ro _1yep5z61rn _1yep5z61ny _1yep5z61rl"],[{isSelected:!0,isFocusVisible:!0},"_1j5skr7e _1yep5z61rm _1yep5z61rl _1yep5z61nz"]]});var mC={xxs:8,xs:12,sm:16,md:20,lg:24},Ie=io.forwardRef((e,o)=>{let t=te(o),{tooltipProps:r}=Qt(e,t);return r?jsx(re,{...r,children:jsx(Kn,{...e,ref:o})}):jsx(Kn,{...e,ref:o})});Ie.displayName="ToggleIconButton";var Kn=io.forwardRef(({className:e,style:o,icon:t,size:r="md",variant:a="primary","data-block-id":n,"data-block-class":i,...s},c)=>{let l=useToggleState(s),{buttonProps:p,isPressed:m,ref:u,isFocusVisible:d,isFocused:f,isHovered:y,uiStateOptions:b}=er(s,l),_=useMemo(()=>typeof t=="function"?t:l.isSelected?t.selected:t.unselected,[t,l.isSelected]),v={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":m});return jsx("button",{...mergeProps(p,g),className:classNames(a==="toolbar"&&Om(v),a==="primary"&&Em(v),a==="secondary"&&Dm(v),a==="tertiary"&&Fm(v),Bm({size:r}),"BaselineUI-ToggleIconButton",typeof e=="function"?e(b):e),style:typeof o=="function"?o(b):o,ref:L(u,c),children:jsx(_,{size:mC[r]})})});Kn.displayName="ToggleIconButtonCore";var Vm="f6jv6bm",Am="_1yep5z64u _1yep5z64v _1yep5z64w _1yep5z676 _1yep5z677 _1yep5z678 _1yep5z6j0 _1yep5z6j1 _1yep5z6j2",qo="_1yep5z689 _1yep5z68a _1yep5z68b _1yep5z65x _1yep5z65y _1yep5z65z",jm=z({defaultClassName:"f6jv6b0 _1yep5z6i0 _1yep5z6i1 _1yep5z6i2 _1yep5z6fs",variantClassNames:{isInline:{true:"f6jv6b1"},isMinimal:{true:"_1yep5z613k _1yep5z613l _1yep5z613m _1yep5z6uw _1yep5z6ux _1yep5z6uy _1yep5z6142 _1yep5z6143 _1yep5z6144",false:"_1yep5z613n _1yep5z613o _1yep5z613p"}},defaultVariants:{},compoundVariants:[[{isInline:!0,isMinimal:!1},"_1yep5z61h7 _1yep5z61h8 _1yep5z61h9 _1yep5z61hv _1yep5z61hw _1yep5z61hx _1yep5z61ij _1yep5z61ik _1yep5z61il _1yep5z61j7 _1yep5z61j8 _1yep5z61j9 _1yep5z61rv _1yep5z61rt _1yep5z61nc"]]}),Zr=z({defaultClassName:"f6jv6b4 _1yep5z69 _1yep5z6a _1yep5z6b _1yep5z62l _1yep5z62m _1yep5z62n _1yep5z63r _1yep5z63s _1yep5z63t _1yep5z61f _1yep5z61g _1yep5z61h _1yep5z6e3 _1yep5z6eu _1yep5z6ky",variantClassNames:{isDisabled:{true:"f6jv6b5 _1yep5z6109"}},defaultVariants:{},compoundVariants:[]}),$m="f6jv6bj _1yep5z6vz _1yep5z6w0 _1yep5z6w1 _1yep5z6wn _1yep5z6wo _1yep5z6wp _1yep5z6xb _1yep5z6xc _1yep5z6xd _1yep5z6xz _1yep5z6y0 _1yep5z6y1",Um="f6jv6bk";var qm="f6jv6bn _1yep5z63l _1yep5z63m _1yep5z63n _1yep5z619 _1yep5z61a _1yep5z61b _1yep5z6ai _1yep5z6aj _1yep5z6ak _1yep5z6b6 _1yep5z6b7 _1yep5z6b8 _1yep5z6bu _1yep5z6bv _1yep5z6bw _1yep5z6ci _1yep5z6cj _1yep5z6ck _1yep5z6i3 _1yep5z6i4 _1yep5z6i5 _1yep5z6l6 _1yep5z6l1 _1yep5z6kz _1yep5z6hc _1yep5z6eu",Km=z({defaultClassName:"f6jv6bf _1yep5z63r _1yep5z63s _1yep5z63t _1yep5z61f _1yep5z61g _1yep5z61h _1yep5z63 _1yep5z64 _1yep5z65 _1yep5z62f _1yep5z62g _1yep5z62h _1yep5z6i0 _1yep5z6i1 _1yep5z6i2 _1yep5z6i9 _1yep5z6ia _1yep5z6ib _1yep5z6ir _1yep5z6is _1yep5z6it _1yep5z69l _1yep5z69m _1yep5z69n _1yep5z6ky _1yep5z6ki _1yep5z6kl _1yep5z6kx",variantClassNames:{isHovered:{true:"_1yep5z6115"},isDisabled:{true:"_1yep5z6yl"}},defaultVariants:{},compoundVariants:[]}),Gm="f6jv6bi _1mdhlqv6 _1yep5z6al _1yep5z6am _1yep5z6an _1yep5z6b9 _1yep5z6ba _1yep5z6bb _1yep5z6bx _1yep5z6by _1yep5z6bz _1yep5z6cl _1yep5z6cm _1yep5z6cn _1yep5z6d7 _1yep5z63 _1yep5z64 _1yep5z65 _1yep5z62f _1yep5z62g _1yep5z62h _1yep5z6fs _1yep5z6l0 _1yep5z6kz _1yep5z6hf _1yep5z6l3",Wm="_1yep5z6j6 _1yep5z6j7 _1yep5z6j8",Xm="f6jv6be f6jv6ba _1yep5z6ai _1yep5z6aj _1yep5z6ak _1yep5z6b6 _1yep5z6b7 _1yep5z6b8 _1yep5z6hx _1yep5z6hy _1yep5z6hz _1yep5z6eu _1yep5z6e3 _1yep5z6kv",Ym=z({defaultClassName:"f6jv6bb _1yep5z6ai _1yep5z6aj _1yep5z6ak _1yep5z6b6 _1yep5z6b7 _1yep5z6b8 _1yep5z6bu _1yep5z6bv _1yep5z6bw _1yep5z6ci _1yep5z6cj _1yep5z6ck _1yep5z6i0 _1yep5z6i1 _1yep5z6i2 _1yep5z6i9 _1yep5z6ia _1yep5z6ib _1yep5z69l _1yep5z69m _1yep5z69n _1yep5z6jc _1yep5z6jd _1yep5z6je",variantClassNames:{isInline:{true:"_1yep5z6oz _1yep5z6p0 _1yep5z6p1 _1yep5z616k _1yep5z616i _1yep5z6121",false:"_1yep5z6p2 _1yep5z6p3 _1yep5z6p4 _1yep5z6we _1yep5z6wf _1yep5z6wg _1yep5z6x2 _1yep5z6x3 _1yep5z6x4 _1yep5z6xq _1yep5z6xr _1yep5z6xs _1yep5z6ye _1yep5z6yf _1yep5z6yg"}},defaultVariants:{},compoundVariants:[]}),Zm="f6jv6bl",Qm="f6jv6ba _1yep5z6ai _1yep5z6aj _1yep5z6ak _1yep5z6b6 _1yep5z6b7 _1yep5z6b8 _1yep5z6hx _1yep5z6hy _1yep5z6hz _1yep5z6eu",Qr=z({defaultClassName:"f6jv6b6",variantClassNames:{isInline:{true:"f6jv6b7",false:"f6jv6b8"}},defaultVariants:{},compoundVariants:[]}),Jr="f6jv6b9 _1yep5z6i0 _1yep5z6i1 _1yep5z6i2 _1yep5z6i9 _1yep5z6ia _1yep5z6ib _1yep5z6ir _1yep5z6is _1yep5z6it",Mt="f6jv6bo";var eu=[["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:Bt}}=layoutSprinkleValues,ou=({isOpen:e,onClose:o})=>{let{formatMessage:t}=F(),r=useId();return jsx(ke,{isOpen:e,onOpenChange:a=>{a||o();},children:jsx(Me,{enableDrawer:"auto",style:{zIndex:999999},children:jsxs(me,{"aria-labelledby":r,className:$m,drawerBackground:"subtle",children:[jsxs(M,{paddingLeft:Bt.padding.horizontal.lg,paddingRight:Bt.padding.horizontal.sm,display:"flex",flexDirection:"row",justifyContent:"space-between",alignItems:"center",backgroundColor:"background.primary.subtle",className:Um,children:[jsx(J,{id:r,elementType:"h3",type:"title",size:"md",children:t(Et.help)}),jsx(E,{icon:XIcon,size:"md",variant:"secondary","aria-label":t(Et.close),onPress:o})]}),jsx(j,{className:Zm}),jsxs(M,{paddingX:Bt.padding.horizontal.lg,role:"table","aria-labelledby":r,backgroundColor:"background.primary.subtle",children:[jsx("div",{role:"rowgroup",children:jsxs(M,{role:"row",display:"flex",flexDirection:"row",justifyContent:"space-between",alignItems:"center",paddingY:Bt.padding.vertical.md,color:"text.primary",children:[jsx("h6",{className:sprinkles({typography:"heading.h6.semibold"}),role:"columnheader",children:t(Et.action)}),jsx("h6",{className:sprinkles({typography:"heading.h6.semibold"}),role:"columnheader",style:{textTransform:"capitalize"},children:t(Et.shortcut)})]})}),jsx("div",{role:"rowgroup",children:eu.map(([a,n],i)=>jsxs(Fragment$1,{children:[jsxs(M,{role:"row",display:"flex",flexDirection:"row",justifyContent:"space-between",alignItems:"center",paddingY:Bt.padding.vertical.xs,style:{minHeight:40},children:[jsx(J,{type:"subtitle",size:"sm",role:"cell",children:t(Et[camelCase(a)])}),jsx(J,{elementType:"kbd",type:"subtitle",size:"sm",role:"cell",children:getOsSpecificKeyboardShortcutLabel(n,!0)})]}),i!==eu.length-1&&jsx(j,{})]},a))})]})]})})})},Et=q({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 ea=io.forwardRef(({value:e,defaultValue:o,onChange:t,placeholder:r,spellCheck:a,textBoxRef:n,isInline:i,isMinimal:s,isDisabled:c,editableContentAriaLabel:l,editorHandle:p,autoFocus:m,saveOnEnter:u,onSave:d},f)=>{let y=io.useRef(null),[b,_]=useControlledState(e,o||"",t),v=useCallback(T=>{_(T.currentTarget.value||"");},[_]),g=useCallback(T=>{(u&&T.key==="Enter"&&!T.shiftKey||(T.ctrlKey||T.metaKey)&&T.key==="Enter")&&(T.preventDefault(),d());},[u,d]);useImperativeHandle(f,()=>({clear:()=>{_("");}}));let h=useCallback(T=>{T.currentTarget.style.height="16px",T.currentTarget.style.height=T.currentTarget.scrollHeight+"px";},[]);useGranularLayoutEffect(()=>{let T=y.current;T&&(T.style.height="16px",T.style.height=T.scrollHeight+"px");},[s],[b]),useImperativeHandle(p,()=>({setCaretPosition:T=>{y.current&&(y.current.focus(),y.current.setSelectionRange(T,T));},focus:()=>{y.current&&y.current.focus();}}));let{focusProps:R,isFocused:x,isFocusVisible:k}=useFocusRing(),{hoverProps:P,isHovered:w}=useHover({}),S=filterTruthyValues({"data-focus-visible":k,"data-hovered":w,"data-focused":x});return jsx("textarea",{...mergeProps(R,P,S),ref:L(y,n),className:classNames(s?Xm:[Zr(),Qr({isInline:i}),Qm]),autoFocus:m,onChange:v,disabled:c,onInput:h,value:b,placeholder:r,spellCheck:a,"aria-label":l,onKeyDown:g})});ea.displayName="PlainEditor";var Ot="mention",oa="mention_input",uu=io.forwardRef(({onCancel:e,editor:o,element:t,onSelectionChange:r},a)=>{let{containerRef:n,items:i,maxMentionableUsersSuggestions:s}=useContext(ra),c=useSelected(),[l,p]=useState(""),{contains:m}=useFilter({sensitivity:"base"}),{formatMessage:u}=F(),d=useMemo(()=>{let C=i.filter(B=>l===""||m(B.displayName,l)).map(B=>({id:B.id,label:B.displayName,data:B}));return s?take(C,s):C},[i,s,l,m]),f=useCallback(C=>jsx(Item,{children:C.label},C.id),[]),y=useCallback((C=!1)=>{let B=findNodePath(o,t);B&&(removeNodes(o,{at:B}),C&&focusEditor(o));},[o,t]),b=useComboBoxState({items:d,children:f,menuTrigger:"focus",onSelectionChange:C=>{y(!0),r?.(C);}}),_=io.useRef(null),v=io.useRef(null),g=io.useRef(null),h=io.useRef(null),R=useHTMLInputCursorState(v);useInteractOutside({ref:h,onInteractOutside:()=>{b.close();}});let{inputProps:x,listBoxProps:k}=useComboBox({defaultItems:d,inputRef:v,buttonRef:_,listBoxRef:g,popoverRef:h,menuTrigger:"focus","aria-label":u(GC.mention)},b);useEffect(()=>{v.current?.focus();},[]);let P=useCallback((C="manual",B=!1)=>{y(B),e?.(C,b.inputValue);},[e,y,b.inputValue]),w=useRef(c);useEffect(()=>{w.current&&!c&&P("deselect"),w.current=c;},[c,P]);let S=R?.atStart??!1,T=R?.atEnd??!1,N=useCallback(C=>{C.key==="Backspace"&&S?P("backspace",!0):C.key==="Escape"?P("escape",!0):C.key==="ArrowLeft"&&S?P("arrowLeft",!0):C.key==="ArrowRight"&&T&&P("arrowRight",!0);let B=Hotkeys.isUndo(C)&&o.history.undos.length>0,H=Hotkeys.isRedo(C)&&o.history.redos.length>0;(B||H)&&(C.preventDefault(),o[B?"undo":"redo"](),focusEditor(o));},[S,T,P,o]),I=useMemo(()=>{if(!CSS.supports("field-sizing","content")){let C=oe(v.current),B=v.current?C?.getComputedStyle(v.current).font:void 0;return {width:B?getTextDimensions({text:b.inputValue,font:B}).width+10:"4ch"}}},[b.inputValue]);return jsxs(eo.Provider,{value:b,children:[jsx("input",{...mergeProps(x,{onKeyDown:N,onBlur:()=>{P("blur",!0);},onChange:C=>{p(C.target.value);}}),style:I,className:qm,ref:L(a,v)}),jsx(ye,{triggerRef:n,className:Gm,isNonModal:!0,ref:h,state:b,children:jsx(se,{...k,items:void 0,autoFocus:"first",ref:g,className:sprinkles({width:"full"}),renderOption:yu})})]})});uu.displayName="MentionInputContentElement";var Zn=withRef(({className:e,...o},t)=>{let{children:r,editor:a,element:n}=o,{items:i}=useContext(ra),s=useRef(null),[c,l]=useState(null);useEffect(()=>{let u=findNodePath(a,n);if(!u)return;let d=getPointBefore(a,u);if(!d)return;let f=createPointRef(a,d);return l(f),()=>{f.unref();}},[a,n]);let p=useCallback(()=>{let u=s.current?.getRootNode()instanceof ShadowRoot;moveSelection(a,{unit:"offset"}),moveSelection(a,{unit:"character",distance:1}),ot()&&u&&focusEditor(a);},[a]),m=useCallback(u=>{if(!u)return;let d=s.current?.getRootNode()instanceof ShadowRoot,f=i.find(b=>b.id===u);invariant(f,"User not found");let y={type:Ot,value:f.id,displayName:f.displayName,children:[{text:""}]};insertNodes(a,[y,{text:" "}]),d?setTimeout(()=>{p();},0):p();},[a,i,p]);return jsxs(PlateElement,{as:"span","data-slate-value":n.value,contentEditable:!1,className:e,ref:t,...o,children:[jsx(uu,{onCancel:(u,d)=>{u!=="backspace"&&insertText(a,"@"+d,{at:c?.current??void 0}),(u==="arrowLeft"||u==="arrowRight")&&moveSelection(a,{distance:1,reverse:u==="arrowLeft"});},onSelectionChange:m,ref:s,element:n,editor:a}),r]})});Zn.displayName="MentionInputElement";var Qn=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]})});Qn.displayName="MentionElement";var fu=(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)){ta(e);return}a(i);},e},GC=q({mention:{defaultMessage:"Mention",id:"mention"}});function gu({className:e,children:o,...t}){return jsx(PlateElement,{asChild:!0,className:e,...t,children:jsx("p",{children:o})})}function pP(e){return Object.entries(e).map(([o,t])=>`${kebabCase(o)}:${t}`).filter(([,o])=>!!o).join(";")}function cP(e){return "text"in e}function dP(e){return e.replaceAll("&","&amp;").replaceAll("<","&lt;").replaceAll(">","&gt;").replaceAll('"',"&quot;").replaceAll("'","&#039;")}function Ht(e){if(!e)return "";function o(t){if(cP(t)){let a=dP(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="${pP(filterTruthyValues({color:t.color||void 0,backgroundColor:t.backgroundColor||void 0}))}">${a}</span>`),a}let r=t.children?.map(Ht).join("");switch(t.type){case ELEMENT_PARAGRAPH:return `<p>${r}</p>`;case ELEMENT_LINK:return `<a href="${t.url}">${r}</a>`;case Ot: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 mP(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 ri(e){e.startsWith("<p>")||(e=`<p>${e}</p>`);let o=new DOMParser().parseFromString(vu.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")?`
51
+ `:"<p>";return zu(o.body)}function zu(e,o){if(e.nodeType===Node.TEXT_NODE)return jsx$1("text",o,e.textContent);if(e.nodeType!==Node.ELEMENT_NODE)return null;let t={...o};switch(e.nodeName.toUpperCase()){case"B":{t.bold=!0;break}case"I":{t.italic=!0;break}case"EM":{t.italic=!0;break}case"U":{t.underline=!0;break}case"SPAN":{let a=mP(e.getAttribute("style")||"");a["text-decoration"]==="underline"&&(t.underline=!0),a.color&&(t.color=a.color),a.backgroundColor&&(t.backgroundColor=a.backgroundColor);break}}let r=[...e.childNodes].flatMap(a=>zu(a,t));switch(r.length===0&&r.push(jsx$1("text",t,"")),e.nodeName.toUpperCase()){case"BR":return jsx$1("text",o,`
52
+ `);case"SPAN":{let a=e.dataset.userId;return a?jsx$1("element",{type:Ot,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 hu(e){let o=findNode(e,{match:{type:getPluginType(e,ELEMENT_LINK)}}),[t]=o||[{url:""}];return t?.url}function ta(e){let o={children:[{text:" "}],type:oa};e.insertNode(o);}var uP=createPluginFactory({isElement:!0,isInline:!0,isMarkableVoid:!0,isVoid:!0,key:Ot,options:{trigger:"@",triggerPreviousCharPattern:/^$|^[\s"']$/},plugins:[{isElement:!0,isInline:!0,isVoid:!0,key:oa}],withOverrides:fu}),xu=createPlugins([createParagraphPlugin({component:gu}),createBoldPlugin({component:withProps(PlateLeaf,{as:"b"})}),createItalicPlugin({component:withProps(PlateLeaf,{as:"i"})}),createUnderlinePlugin({component:withProps(PlateLeaf,{as:"u"})}),createFontColorPlugin(),createFontBackgroundColorPlugin(),createLinkPlugin({component:Cu}),uP({component:Qn})],{components:{[oa]:Zn}});var wu=({isDisabled:e})=>{let{formatMessage:o}=F(),t=useEditorRef();return jsxs(Se,{type:"dialog",children:[jsx(Ne,{children:jsx(E,{icon:LinkIcon,size:"sm",isDisabled:e,"aria-label":o(so.addLink),className:qo,preventFocusOnPress:!0})}),jsx(Re,{className:sprinkles({boxShadow:"medium"}),placement:"top end",children:({close:r})=>jsx(me,{size:"content",style:{minWidth:240},children:jsx(hP,{close:()=>{r(),setTimeout(()=>{focusEditor(t,t.selection);},0);}})})})]})},hP=({close:e})=>{let o=useEditorRef(),{formatMessage:t}=F(),r=useEditorSelector(l=>hu(l),[]),[a,n]=io.useState(r?"show":"add"),[i,s]=io.useState(r||""),c=jsx(M,{padding:"lg",children:jsx(No,{label:t(so.link),value:i,autoFocus:!0,onChange:s,placeholder:"https://yourdomain.com"})});return jsxs(Fragment,{children:[a==="add"&&jsxs(Fragment,{children:[c,jsx(M,{display:"flex",justifyContent:"flex-end",padding:"lg",className:Vm,children:jsx($,{isDisabled:!isUrl(i,!0),label:t(so.addLink),size:"sm",onPress:()=>{upsertLink(o,{url:i,skipValidation:!0}),e?.();},preventFocusOnPress:!0})})]}),a==="show"&&jsxs(Fragment,{children:[jsx(M,{padding:"lg",children:jsx(J,{type:"subtitle",size:"sm",children:r})}),jsxs(M,{display:"flex",justifyContent:"flex-end",padding:"lg",gap:"lg",borderColor:"border.subtle",borderWidth:1,borderStyle:"solid",children:[jsx($,{label:t(so.editLink),size:"sm",variant:"secondary",onPress:()=>{n("edit");},style:{flex:1,justifyContent:"center"}}),jsx($,{label:t(so.removeLink),size:"sm",onPress:()=>{unwrapLink(o),e?.();},preventFocusOnPress:!0,style:{flex:1,justifyContent:"center"}})]})]}),a==="edit"&&jsxs(Fragment,{children:[c,jsxs(M,{display:"flex",justifyContent:"flex-end",padding:"lg",gap:"lg",borderColor:"border.subtle",borderWidth:1,borderStyle:"solid",children:[jsx($,{label:t(so.cancel),size:"sm",variant:"secondary",onPress:()=>{n("show"),e?.();}}),jsx($,{label:t(so.save),size:"sm",onPress:()=>{upsertLink(o,{url:i,skipValidation:!0}),e?.();}})]})]})]})};function Cu({className:e,children:o,...t}){return jsx(PlateElement,{asChild:!0,className:e,...t,children:jsx("a",{className:_r({size:"sm"}),children:o})})}var so=q({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 CP=parseColor("#ffffff00").toString("hexa"),ai=[{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"}];[...ai,{label:"Transparent",color:CP}];var na=({nodeType:e,icon:o,ariaLabel:t,isDisabled:r})=>{let a=useEditorSelector(i=>isMarkActive(i,e),[]),n=useEditorRef();return jsx(Ie,{variant:"tertiary",isSelected:a,size:"sm",icon:o,"aria-label":t,isDisabled:r,onPress:()=>{toggleMark(n,{key:e});},preventFocusOnPress:!0})},ii=({nodeType:e,"aria-label":o,isDisabled:t})=>{let{updateColor:r,clearColor:a,color:n}=useColorDropdownMenuState({customColors:[],colors:[],nodeType:e}),i=useCallback(({ref:c,triggerProps:l})=>jsx(E,{icon:e==="color"?TextIcon$1:HighlightTextIcon,"aria-label":o,size:"md",variant:"popover",isDisabled:t,className:qo,preventFocusOnPress:!0,...l,ref:c}),[e,o,t]),s=useCallback(c=>{c?r(c.toString("rgba")):a();},[a,r]);return jsx(Ao,{presets:ai,allowRemoval:!0,pickerMode:"lazy",placement:"top end",colorLabel:!1,renderTriggerButton:i,value:n||"#000000",onChange:s,isDisabled:t})};var JP=[{type:ELEMENT_PARAGRAPH,children:[{text:""}]}],ra=io.createContext({items:[],containerRef:{current:null},maxMentionableUsersSuggestions:10}),pi=io.forwardRef(({value:e,defaultValue:o,onChange:t,style:r,spellCheck:a,placeholder:n,isInline:i,isDisabled:s,editableContentAriaLabel:c,containerRef:l,onHelpDialogOpenRequest:p,mentionableUsers:m,editorHandle:u,maxMentionableUsersSuggestions:d,autoFocus:f,editorRef:y,saveOnEnter:b,onSave:_},v)=>{let g=useRef(null),h=useId(),{formatMessage:R}=F(),x=useRef(null),k=x.current,P=useRef(null),w=useMemo(()=>k?.getRootNode()instanceof ShadowRoot,[k]),[S,T]=useControlledState(e?ri(e):void 0,ri(o||"<p></p>"),C=>{t&&t(Ht(C));}),{keyboardProps:N}=useKeyboard({onKeyDown:C=>{(b&&C.key==="Enter"&&!C.shiftKey||(C.ctrlKey||C.metaKey)&&C.key==="Enter")&&(C.preventDefault(),_()),C.altKey&&C.key==="F10"?(C.preventDefault(),g.current&&g.current.querySelector("button")?.focus()):C.continuePropagation(),ot()&&w&&P.current&&focusEditor(P.current);}});useEffect(()=>{s&&P.current&&deselect(P.current);},[s]),useImperativeHandle(v,()=>({startMention:()=>{P.current&&!x.current?.querySelector("input[role='combobox']")&&ta(P.current);}})),useImperativeHandle(u,()=>({setCaretPosition:C=>{P.current&&(focusEditor(P.current),moveSelection(P.current,{distance:C,unit:"character"}));},focus:()=>{P.current&&focusEditor(P.current);}}));let I=useMemo(()=>({items:m||[],containerRef:l,maxMentionableUsersSuggestions:d}),[m,l,d]);return jsx(ra.Provider,{value:I,children:jsxs(Plate,{initialValue:S||JP,plugins:xu,editorRef:L(P,y||null),onChange:C=>{T(C);},children:[jsxs(Yr,{className:Jr,"aria-controls":h,ref:g,children:[jsxs(M,{display:"flex",flexDirection:"row",role:"group",gap:"xs",paddingX:"sm",children:[jsx(na,{nodeType:MARK_BOLD,icon:BoldIcon,ariaLabel:R(Xo.bold),isDisabled:s}),jsx(na,{nodeType:MARK_ITALIC,icon:ItalicIcon,ariaLabel:R(Xo.italic),isDisabled:s}),jsx(na,{nodeType:MARK_UNDERLINE,icon:UnderlineIcon,ariaLabel:R(Xo.underline),isDisabled:s})]}),jsx(j,{orientation:"vertical",className:Mt}),jsx(ii,{nodeType:MARK_COLOR,"aria-label":R(Xo.fontColor),isDisabled:s}),jsx(j,{orientation:"vertical",className:Mt}),jsx(ii,{nodeType:MARK_BG_COLOR,"aria-label":R(Xo.backgroundColor),isDisabled:s}),jsx(j,{orientation:"vertical",className:Mt}),jsx(wu,{isDisabled:s}),jsx(j,{orientation:"vertical",className:Mt}),jsx(E,{className:qo,icon:QuestionmarkCircleIcon,size:"sm","aria-label":R(Xo.help),onPress:p})]}),jsx(j,{variant:"secondary"}),jsx("div",{...N,ref:x,children:jsx(PlateContent,{id:h,disabled:s,readOnly:s,style:r,placeholder:n,autoFocus:f,spellCheck:a,"aria-label":c,className:classNames(Zr({isDisabled:s}),Qr({isInline:i})),renderPlaceholder:({attributes:C,children:B})=>jsx("span",{...C,className:sprinkles({paddingY:"lg"}),children:B})})})]})})});pi.displayName="RichEditor";var yu=({key:e,value:o},{isDisabled:t,optionProps:r,isFocused:a,_state:n},i)=>{let{hoverProps:s}=useHover({isDisabled:t}),{label:c,data:l}=o;return jsxs(Fragment,{children:[jsxs("li",{...mergeProps(r,s),className:Km({isDisabled:t,isHovered:a}),"data-active":a,ref:i,children:[jsx(Fo,{name:c,...l?.avatar}),jsxs(M,{display:"flex",flexDirection:"column",children:[jsx(J,{type:"subtitle",size:"sm",children:c}),jsx(J,{type:"helper",size:"sm",children:l?.description})]})]}),e===n.collection.getLastKey()?null:jsx(j,{})]})},Xo=q({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 Mu=io.memo(io.forwardRef(({className:e,style:o,"data-block-id":t,"data-block-class":r,enableRichText:a=!1,onCancel:n,onSave:i,isInline:s=!0,submitButtonIcon:c=ArrowUpCircleFilledIcon,submitButtonAriaLabel:l,cancelButtonAriaLabel:p,"aria-label":m,"aria-describedby":u,"aria-labelledby":d,"aria-details":f,editableContentAriaLabel:y="Editing Area",footerButtons:b,clearOnCancel:_,clearOnSave:v,...g},h)=>{let R=useRef(null),{formatMessage:x}=F(),k=useRef(null),P=useRef(null),w=useRef(null),S=!a&&g.variant==="minimal",T=useRef(null),[N,I]=io.useState(g.value||g.defaultValue),C=g.isDisabled||g.isSaveDisabled||!getPlainText(N||""),{fieldProps:B}=useLabel({"aria-label":m,"aria-labelledby":d,"aria-describedby":u,"aria-details":f,labelElementType:"div"});S&&!g.avatarName&&console.warn("Editor: When using the minimal `variant` and `enableRichText` is `false`, you should provide an `avatarName`.");let H=useCallback(()=>{I(""),a?R.current?.reset():P.current?.clear();},[a]),D=useCallback(()=>{C||(i?.(a?Ht(R.current?.children):k.current.value),v&&H());},[H,v,a,i,C]),G=jsx(E,{variant:"ghost","aria-label":l||x(di.save),icon:c,isDisabled:C,size:"md",excludeFromTabOrder:S,className:S?Wm:void 0,onPress:D,preventFocusOnPress:!0}),[V,K]=io.useState(!1),{keyboardProps:A}=useKeyboard({onKeyDown:O=>{(O.metaKey||O.ctrlKey)&&O.shiftKey&&O.key==="h"&&(O.preventDefault(),K(!0));}}),Q=useCallback(O=>{I(O),g.onChange?.(O);},[g]);return jsxs("div",{...mergeProps(B,a?A:{}),role:"application",ref:L(w,h),style:o,"data-block-id":t,"data-block-class":r,className:classNames(jm({isInline:s,isMinimal:S}),"BaselineUI-Editor",e),"aria-disabled":g.isDisabled,children:[S?jsxs(Fragment,{children:[s?jsx(Fo,{className:Am,name:g.avatarName||""}):null,jsxs("div",{className:Ym({isInline:s}),children:[jsx(ea,{isMinimal:S,textBoxRef:k,isInline:s,editableContentAriaLabel:y,...g,onChange:Q,onSave:D}),G]})]}):jsxs(Fragment,{children:[a?jsx(pi,{containerRef:w,ref:T,editorRef:R,isInline:s,editableContentAriaLabel:y,onHelpDialogOpenRequest:()=>{K(!0);},...g,onChange:Q,onSave:D}):jsxs(Fragment,{children:[!s&&jsx(j,{variant:"secondary"}),jsx(ea,{onCancel:n,textBoxRef:k,ref:P,isInline:s,editableContentAriaLabel:y,...g,onChange:O=>{I(O),g.onChange?.(O);},onSave:D})]}),jsx(j,{variant:"secondary"}),jsxs("div",{className:classNames(Jr,sprinkles({justifyContent:"space-between"})),children:[jsxs(M,{paddingX:"sm",gap:"sm",display:"flex",children:[a&&g.mentionableUsers?jsx(E,{icon:AtIcon,size:"sm","aria-label":x(di.mention),onPress:()=>T.current?.startMention(),preventFocusOnPress:!0}):null,b?.map(({type:O,props:W},le)=>O==="action"?jsx(E,{...W,size:"sm",isDisabled:g.isDisabled||W.isDisabled},le):jsx(Ie,{...W,size:"sm",variant:"tertiary",isDisabled:g.isDisabled||W.isDisabled},le))]}),jsxs(M,{children:[!!n&&jsx(E,{variant:"secondary",icon:CrossCircleFilledIcon,isDisabled:g.isDisabled,size:"md",onPress:()=>{n(),_&&H();},"aria-label":p||x(di.cancel)}),G]})]})]}),jsx(ou,{isOpen:V,onClose:()=>{K(!1);}})]})}));Mu.displayName="Editor";var di=q({cancel:{defaultMessage:"Cancel",id:"cancel"},save:{defaultMessage:"Save",id:"save"},mention:{defaultMessage:"Mention",id:"mention"}});var sa=io.forwardRef(({className:e,style:o,"data-block-id":t,"data-block-class":r,isMounted:a,children:n,transitions:i,elementType:s="div",...c},l)=>{let p=useTransition(a,i),m=animated[s];return p((u,d)=>d&&jsx(m,{className:e,"data-block-id":t,"data-block-class":r,style:{...o,...u},...c,ref:l,children:n}))});sa.displayName="Transition";var Bu="_8kqf970 _1yep5z6ow _1yep5z6ox _1yep5z6oy _1yep5z613b _1yep5z613c _1yep5z613d _1yep5z613k _1yep5z613l _1yep5z613m _1yep5z6142 _1yep5z6143 _1yep5z6144 _1yep5z6yh _1yep5z6uq _1yep5z6ur _1yep5z6us _1yep5z6168";var Du=2,Fu=io.forwardRef(({className:e,style:o,hideForKeyboard:t,scrollRef:r,label:a,delay:n=1500,smoothScroll:i=!0,"data-block-id":s,"data-block-class":c},l)=>{let p=io.useRef(null),m=useInteractionModality(),[u,d]=io.useState(!1),f=useCallback(()=>{let S=r?.current||fe(p.current).body;return oe(S).getComputedStyle(S).flexDirection==="column-reverse"?S.scrollTop+Du>=0:S.scrollTop+S.clientHeight+Du>=S.scrollHeight},[r]),[y,b]=io.useState(f),_=zo(),{buttonProps:v,isPressed:g}=useButton({onPress:()=>{let S=r?.current||fe(p.current).body;S.scrollTo({top:S.scrollHeight,behavior:i?"smooth":"auto"});}},p),{focusProps:h,isFocused:R,isFocusVisible:x}=useFocusRing(),{hoverProps:k,isHovered:P}=useHover({}),w=filterTruthyValues({"data-block-id":s,"data-block-class":c,"data-pressed":g,"data-focus-visible":x,"data-hovered":P,"data-focused":R});return useEffect(()=>{b(f());},[f]),useEffect(()=>{let S=r?.current||fe(p.current).body,T="onscrollend"in oe(S),N=()=>{setTimeout(()=>{d(!1),b(f());},n);},I=()=>{d(!0),T||N();};return S.addEventListener("scroll",I),S.addEventListener("scrollend",N),()=>{S.removeEventListener("scroll",I),S.removeEventListener("scrollend",N);}},[r,n,f]),jsxs(sa,{isMounted:(t?m!=="keyboard":!0)&&!u&&!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:_},...mergeProps(v,h,k,w),className:classNames(Bu,kr({isFocusVisible:x,variant:"high-contrast",isHovered:P}),"BaselineUI-ScrollControlButton",e),style:o,ref:L(l,p),children:[jsx(ArrowDownCircleFilledIcon,{size:16}),a]})});Fu.displayName="ScrollControlButton";var ui="_1yep5z6jc _1yep5z6jd _1yep5z6je _1yep5z6jl _1yep5z6jm _1yep5z6jn",Ou=z({defaultClassName:"_1v0p2z10 _1yep5z63r _1yep5z63s _1yep5z63t _1yep5z619 _1yep5z61a _1yep5z61b _1yep5z6i0 _1yep5z6i1 _1yep5z6i2 _1yep5z6ic _1yep5z6id _1yep5z6ie _1yep5z69f _1yep5z69g _1yep5z69h",variantClassNames:{hasTitleAndIcon:{true:"_1yep5z6le _1yep5z6lf _1yep5z6lg _1yep5z6nw _1yep5z6nx _1yep5z6ny"},hasNoCloseBtn:{true:"_1yep5z6lk _1yep5z6ll _1yep5z6lm _1yep5z6nw _1yep5z6nx _1yep5z6ny _1yep5z6p2 _1yep5z6p3 _1yep5z6p4 _1yep5z6mq _1yep5z6mr _1yep5z6ms"}},defaultVariants:{},compoundVariants:[[{hasTitleAndIcon:!0,hasNoCloseBtn:!0},"_1yep5z61g7 _1yep5z61g8 _1yep5z61g9"]]}),Hu="_1v0p2z10";var pa=io.forwardRef(({className:e,style:o,"data-block-id":t,"data-block-class":r,message:a,title:n,primaryActionLabel:i,cancelLabel:s,textInputProps:c,icon:l,iconColor:p,showCloseButton:m=!0,onPrimaryAction:u,onCancel:d,autoFocusButton:f,isPrimaryActionDisabled:y},b)=>{let _=useId(),{formatMessage:v}=F(),g=n&&jsx(J,{id:_,type:"title",size:"sm",elementType:"h3",children:n});return jsxs(me,{className:e,style:o,"data-block-id":t,"data-block-class":r,size:"sm",variant:"primary",role:"alertdialog",ref:b,"aria-labelledby":_,children:[jsxs("div",{className:Ou({hasTitleAndIcon:!!(l&&n),hasNoCloseBtn:!m}),children:[jsxs(M,{display:"flex",justifyContent:"space-between",alignItems:"center",flexDirection:"row",children:[l?jsx(l,{style:{color:p},size:24}):null,!l&&g,m?jsx(E,{icon:XIcon,variant:"secondary",size:"md","aria-label":v(wk.close),onPress:d}):null]}),l?g:null]}),a?jsx(M,{elementType:"section",className:Hu,paddingX:"lg",paddingBottom:"lg",typography:"body.sm.regular",color:"text.primary",children:a}):null,c?jsx(M,{paddingX:"lg",paddingBottom:"lg",children:jsx(No,{...c})}):null,s||i?jsxs(Fragment,{children:[jsx(j,{}),jsxs(M,{padding:"lg",display:"flex",gap:"xl",children:[s?jsx($,{variant:"secondary",className:ui,label:s,onPress:d,autoFocus:f==="cancel"}):null,i?jsx($,{className:ui,label:i,onPress:u,autoFocus:f==="primary",isDisabled:y}):null]})]}):null]})});pa.displayName="AlertDialog";var wk=q({close:{id:"close",defaultMessage:"Close",description:"Close button label"}});var Vu="_1t55bp71",Au="_1yep5z6e3 _1yep5z6eu _1yep5z6i6 _1yep5z6i7 _1yep5z6i8 _1yep5z69i _1yep5z69j _1yep5z69k",ju="_1t55bp70";var Mk=Lk(),$u=io.forwardRef(({className:e,style:o,children:t,"data-block-id":r,"data-block-class":a,showCaret:n},i)=>{let s=useMemo(()=>{let c=t;return (!t||Array.isArray(t)&&t.length===0)&&(c=""),Mk.render(c)},[t]);return jsx("div",{className:classNames(Au,ju,{[Vu]:n},"BaselineUI-Markdown",e),"data-block-id":r,"data-block-class":a,style:o,ref:i,dangerouslySetInnerHTML:{__html:s}})});$u.displayName="Markdown";function Gu(e){let{formatMessage:o,locale:t}=F(),[r,a]=io.useState(!1),[n,i]=io.useState(0),[s,c]=io.useState(0),[l,p]=io.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=()=>{c(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 m=useCallback(()=>{(async()=>e.current&&(e.current.paused?(await e.current.play(),a(!0),announce(o(qu.playing),"polite")):(e.current.pause(),a(!1),announce(o(qu.paused),"polite"))))();},[o,e]),u=useCallback(d=>{e.current&&(e.current.currentTime=d*e.current.duration/100,announce(Dk(e.current.currentTime,t.locale),"assertive"));},[t.locale,e]);return {isPlaying:r,progress:n,duration:s,togglePlay:m,seek:u,setProgress:i,formattedCurrentTime:e.current?.currentTime?Ku(e.current?.currentTime):"00:00",formattedDuration:s?Ku(s):"00:00",setIsSliderDragging:p}}var qu=q({playing:{id:"playing",defaultMessage:"Playing"},paused:{id:"paused",defaultMessage:"Paused"}});function Dk(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 Ku(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 Wu="_1yep5z6i0 _1yep5z6i1 _1yep5z6i2 _1yep5z6i9 _1yep5z6ia _1yep5z6ib _1yep5z6ir _1yep5z6is _1yep5z6it _1yep5z69o _1yep5z69p _1yep5z69q",Xu="rta2n91 _1yep5z6i0 _1yep5z6i1 _1yep5z6i2 _1yep5z6i9 _1yep5z6ia _1yep5z6ib _1yep5z6ir _1yep5z6is _1yep5z6it _1yep5z69o _1yep5z69p _1yep5z69q _1yep5z6z9 _1yep5z6ut _1yep5z6uu _1yep5z6uv _1yep5z6166 _1yep5z6106",Yu="rta2n90";var Ju=io.forwardRef(({className:e,style:o,size:t="lg",sources:r,"data-block-id":a,"data-block-class":n,...i},s)=>{let c=io.useRef(null),{isPlaying:l,progress:p,duration:m,togglePlay:u,seek:d,formattedDuration:f,formattedCurrentTime:y,setProgress:b,setIsSliderDragging:_}=Gu(c),{formatMessage:v}=F(),g=filterTruthyValues({"data-block-id":a,"data-block-class":n,"data-state":l?"playing":"paused","data-loaded":m>0});return jsxs("div",{...g,...i,className:classNames(Wu,"BaselineUI-AudioPlayer",e),role:"group",style:o,ref:s,children:[jsx(VisuallyHidden,{children:jsx("audio",{ref:c,children:r.map(({url:h,type:R})=>jsx("source",{src:h,type:R},h))})}),jsx(Ie,{icon:l?PauseIcon:PlayIcon,variant:"toolbar",isSelected:l,size:t,"aria-label":v(l?yi.pause:yi.play),style:{borderRadius:"50%"},onPress:u}),jsxs("div",{className:Xu,children:[jsx("span",{"aria-hidden":!0,children:y}),jsx(wo,{"aria-label":v(yi.audioTimeline),value:p,minValue:0,maxValue:100,className:Yu,onChange:h=>{b(h),_(!0);},onChangeEnd:h=>{d(h),_(!1);}}),jsx("span",{"aria-hidden":!0,children:f})]})]})});Ju.displayName="AudioPlayer";var yi=q({play:{id:"play",defaultMessage:"Play"},pause:{id:"pause",defaultMessage:"Pause"},audioTimeline:{id:"audioTimeline",defaultMessage:"Audio timeline"}});var ef="_1w920rnd _1yep5z6ai _1yep5z6aj _1yep5z6ak _1yep5z6b6 _1yep5z6b7 _1yep5z6b8 _1yep5z6bu _1yep5z6bv _1yep5z6bw _1yep5z6ci _1yep5z6cj _1yep5z6ck _1yep5z6fs _1yep5z6ho _1yep5z6hp _1yep5z6hq",of="_1w920rn1 _1yep5z6i3 _1yep5z6i4 _1yep5z6i5 _1yep5z6ic _1yep5z6id _1yep5z6ie _1yep5z6ir _1yep5z6is _1yep5z6it _1yep5z69i _1yep5z69j _1yep5z69k",tf="_1w920rn0 _1yep5z6i0 _1yep5z6i1 _1yep5z6i2 _1yep5z6i9 _1yep5z6ia _1yep5z6ib _1yep5z6km",da=z({defaultClassName:"_1w920rn2 _1yep5z6d6 _1yep5z6i0 _1yep5z6i1 _1yep5z6i2 _1yep5z6ir _1yep5z6is _1yep5z6it _1yep5z6hl _1yep5z6hm _1yep5z6hn",variantClassNames:{isFocusVisible:{true:"_1yep5z6l1 _1yep5z6kz _1yep5z6hc"},isSelected:{true:"_1yep5z6l1 _1yep5z6kz _1yep5z6hc"},isLoading:{true:"_1yep5z614w _1yep5z614x _1yep5z614y"}},defaultVariants:{},compoundVariants:[[{isFocusVisible:!0,isSelected:!0},"_1w920rn6 _1yep5z6l1 _1yep5z6kz _1yep5z6hc"]]}),rf="_1w920rnb _1yep5z6kw",af=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 _1yep5z6fw _1yep5z6eu _1yep5z6dy",variantClassNames:{isFocusVisible:{true:"_1w920rn8 _1yep5z6l1 _1yep5z6kz _1yep5z6hc"},isSelected:{true:"_1w920rn9"}},defaultVariants:{},compoundVariants:[[{isFocusVisible:!0,isSelected:!0},"_1w920rna _1yep5z61rm _1yep5z61rl _1yep5z61nz"]]}),nf="_1w920rnc";var lf=({items:e,ulRef:o})=>{let{length:t}=e,r=io.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:da(),ref:r,children:jsx(M,{backgroundColor:"background.secondary.medium",borderRadius:"full",typography:"label.md.medium",color:"text.primary",position:"absolute",paddingX:"md",className:nf,children:t})})};function pf(e,o){return e.find(t=>t.id===o)}function cf(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 df(e,o,t){let r=e.findIndex(s=>s.id===o),a=[...t].map(s=>e.findIndex(c=>c.id===s)),n=[...e],i=0;for(let s of a){let[c]=n.splice(s-i,1);n.splice(r,0,c),i++;}return n}function bi(e){return e.map(o=>({id:o.id,label:o.label,data:{src:o.src,alt:o.alt}}))}function ma(e){return e.map(o=>({id:o.id,label:o.label,src:o.data?.src,alt:o.data?.alt}))}var Zk=({fit:e,item:o,deleteElement:t})=>{let{formatMessage:r}=F(),{imgProps:a,isLoading:n,isLoaded:i}=_o({src:o.data?.src,alt:o.data?.alt??""}),s=useTransition(i,{from:{opacity:0},enter:{opacity:1},leave:{opacity:0}});return n?jsx(Bo,{"aria-label":r(jt.loading)}):s((c,l)=>l&&jsx(animated.div,{role:"img","aria-label":a.alt,style:{...c,backgroundImage:`url(${a.src})`,backgroundSize:e},className:rf,children:t}))},mf=({item:{value:e},options:{optionProps:o,isFocusVisible:t,isSelected:r},liRef:a,fit:n="contain",onDelete:i,className:s,imageClassName:c,imageLabelClassName:l,imageDimensions:p,style:m,renderImage:u=(d,{deleteElement:f})=>jsx(Zk,{item:d,deleteElement:f,fit:n})})=>{let d=useId(),{formatMessage:f}=F();invariant(e&&uo(e),"Expected value to be a list option");let y=i?jsx("div",{className:ef,children:jsx(E,{"aria-label":f(jt.delete),size:"xs",icon:XIcon$2,onPress:()=>{i(e.id);},UNSAFE_NON_INTERACTIVE:!0})}):null,b=useCallback(_=>{let v={},g=typeof _=="function"?_(ma([e])[0],{isSelected:r}):_;return g&&(v.width=typeof g.width=="string"?vi[g.width]:g.width,v.aspectRatio="height"in g?`${v.width} / ${g.height}`:g?.aspectRatio?.toString()),v},[r,e]);return jsxs("li",{...o,ref:a,className:classNames(of,s),"aria-labelledby":d,style:m,children:[jsx(M,{display:"flex",flexDirection:"column",flex:1,justifyContent:"center",alignItems:"center",children:jsx("div",{className:classNames(da({isFocusVisible:t,isSelected:r,isLoading:!0}),c),style:b(p),"data-image-key":e.id,children:u(e,{deleteElement:y??void 0,onDelete:i})})}),jsx("span",{id:d,className:classNames(af({isFocusVisible:t,isSelected:r}),l),children:e.label})]})};var r0={width:0,display:"block"};var vi=(t=>(t[t.sm=102]="sm",t[t.md=170]="md",t))(vi||{}),yf=io.forwardRef(({className:e,style:o,fit:t="cover",onReorder:r,"data-block-id":a,"data-block-class":n,onDelete:i,imageWidth:s="sm",aspectRatio:c=3/4,items:l,defaultItems:p=[],onKeyDown:m,imageContainerClassName:u,imageClassName:d,labelClassName:f,onListChange:y,renderImage:b,imageDimensions:_={width:s,aspectRatio:c},imageContainerStyle:v,...g},h)=>{let R=io.useRef(null),[x,k]=useState([]),{formatMessage:P}=F();useEffect(()=>{(c||s)&&console.warn("ImageGallery: aspectRatio and imageWidth are deprecated. Use imageDimensions instead.");},[s,c]);let[w,S]=useControlledState(g.selectedKeys,g.defaultSelectedKeys??[],g.onSelectionChange),[T,N]=useControlledState(l?bi(l):void 0,bi(p),y?D=>{y?.(ma(D));}:void 0),I=useCallback(D=>{let G=D.target.key,V=D.keys;if(D.target.dropPosition==="before"){let K=cf(T,G,V);N(K);}else if(D.target.dropPosition==="after"){let K=df(T,G,V);N(K);}r?.(D);},[T,r,N]),C=useCallback(()=>{i&&x.length&&(N(T.filter(D=>!x.includes(D.id))),i(new Set(x)),k([]));},[x,T,i,N]),B=useCallback((D,G,V)=>jsx(mf,{item:D,options:G,liRef:V,fit:t,onDelete:i?K=>{k([K]);}:void 0,renderImage:b,className:u,imageClassName:d,imageLabelClassName:f,imageDimensions:_,style:v}),[t,i,b,u,d,f,_,v]),{keyboardProps:H}=useKeyboard({onKeyDown(D){if(m?.(D),D.key==="Backspace"||D.key==="Delete"){if(!i)return;if([...w].length)k([...w]);else {let V=D.target.dataset.key;k([V]);}}}});return jsxs("div",{...H,ref:h,style:o,className:classNames("BaselineUI-ImageGallery",e),"data-block-id":a,"data-block-class":n,children:[jsx(se,{...g,selectedKeys:w,items:T,onReorder:I,layout:"grid",orientation:"vertical",className:tf,ref:R,dropIndicatorStyle:r0,renderOption:B,renderDragPreview:D=>jsx(lf,{items:D,ulRef:R}),onSelectionChange:S,getItems:D=>[...D].map(G=>{let V=pf(T,G);return {src:V?.src||"",alt:V?.alt||"",key:G}})}),jsx(ke,{isOpen:!![...x].length,onOpenChange:D=>{D||k([]);},children:jsx(Me,{isDismissable:!0,children:jsx(pa,{showCloseButton:!1,title:"Are you sure you want to delete this item?",primaryActionLabel:P(jt.delete),cancelLabel:P(jt.cancel),onCancel:()=>{k([]);},onPrimaryAction:C,autoFocusButton:"cancel"})})})]})});yf.displayName="ImageGallery";var jt=q({delete:{id:"delete",defaultMessage:"Delete"},cancel:{id:"cancel",defaultMessage:"Cancel"},loading:{id:"loading",defaultMessage:"Loading"}});var bf="_1sexph00",gf="_1sexph01 _1yep5z616p _1yep5z616q _1yep5z616r _1yep5z6191 _1yep5z6192 _1yep5z6193 _1yep5z61a7 _1yep5z61a8 _1yep5z61a9 _1yep5z617v _1yep5z617w _1yep5z617x _1yep5z61q4 _1yep5z61q5 _1yep5z61q6";var zf=io.forwardRef(({className:e,style:o,items:t,"data-block-id":r,"data-block-class":a,hideLabel:n,size:i="md",isDisabled:s,showSelectedIcon:c=!0,excludeFromTabOrder:l,onPress:p,isSelected:m,defaultSelected:u,onButtonSelectionChange:d,moreAriaLabel:f,optionStyle:y,optionClassName:b,triggerClassName:_,triggerStyle:v,tooltipProps:g,...h},R)=>{let{formatMessage:x}=F(),k=ie(),P=useSelectState({items:t,...h,defaultSelectedKey:h.defaultSelectedKey||t?.[0]?.id,children:k,validationState:h.validationState==="error"?"invalid":"valid"}),[w,S]=useControlledState(m,!!u,A=>{d?.({isSelected:A,selectedKey:P.selectedKey});}),{hoverProps:T,isHovered:N}=useHover({isDisabled:s}),I=useMemo(()=>{let A=P.collection.getItem(P.selectedKey),Q=A?.textValue||A?.["aria-label"],O=A?.value,W=O?.icon,le={size:i,isSelected:w,onPress:_e=>{S(!w),p?.(_e);},isDisabled:s,excludeFromTabOrder:l,className:typeof b=="function"?b(O,{isButton:!0,isSelected:w}):b,style:typeof y=="function"?y(O,{isButton:!0,isSelected:w}):y};return n&&W?jsx(re,{variant:"inverse",size:"sm",includeArrow:!1,text:Q,placement:"bottom start",offset:4,...typeof g=="function"?g("button"):g,children:jsx(Ie,{icon:W,"aria-label":Q,variant:"toolbar",...le})}):jsx(Cr,{iconStart:W,label:Q,...le})},[l,n,w,s,p,b,y,S,i,P.collection,P.selectedKey,g]),C=h["aria-label"],B=useCallback(({buttonProps:A,ref:Q})=>{delete A["aria-labelledby"];let O=f||`${x(m0.more)} ${C}`;return jsx(re,{variant:"inverse",size:"sm",includeArrow:!1,text:O,placement:"bottom start",offset:4,...g,children:jsx(PressResponder,{...A,children:jsx(E,{"aria-label":O,ref:Q,icon:CaretDownIcon,variant:"toolbar",size:i,className:({isFocusVisible:W})=>classNames(xr({isSelected:w,isFocusVisible:W}),gf,_),style:v,isDisabled:s,excludeFromTabOrder:l})})})},[C,l,x,w,s,f,i,g,_,v]),H=filterTruthyValues({"data-block-id":r,"data-block-class":a,"data-hovered":N,"data-selected":w,"data-disabled":s,"data-expanded":P.isOpen}),D=te(R),G=useMemo(()=>({state:P,popoverAnchorRef:D}),[P,D]),V=useCallback(A=>typeof b=="function"?b(A,{isButton:!1,isSelected:P.selectionManager.isSelected(A.id)}):b,[b,P.selectionManager]),K=useCallback(A=>typeof y=="function"?y(A,{isButton:!1,isSelected:P.selectionManager.isSelected(A.id)}):y,[y,P.selectionManager]);return jsx(wr.Provider,{value:G,children:jsxs(M,{...T,role:"group",display:"inline-flex",flexDirection:"row",alignItems:"center",className:classNames(bf,"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:[I,jsx(qe,{isDisabled:s,showSelectedIcon:c,placement:"bottom start",items:t,...h,style:{width:20},optionClassName:V,optionStyle:K,variant:"ghost",renderTrigger:B})]})})});zf.displayName="ButtonSelect";var m0=q({more:{id:"more",defaultMessage:"More"}});var hf=z({defaultClassName:"_18v88n10 _1yep5z6i0 _1yep5z6i1 _1yep5z6i2 _1yep5z6kv",variantClassNames:{labelPosition:{top:"_1yep5z613n _1yep5z613o _1yep5z613p",start:"_1yep5z613k _1yep5z613l _1yep5z613m _1yep5z6152 _1yep5z6153 _1yep5z6154 _1yep5z6ut _1yep5z6uu _1yep5z6uv"}},defaultVariants:{},compoundVariants:[]}),xf=z({defaultClassName:"_18v88n1p _1yep5z66 _1yep5z67 _1yep5z68 _1yep5z62i _1yep5z62j _1yep5z62k _1yep5z63o _1yep5z63p _1yep5z63q _1yep5z61c _1yep5z61d _1yep5z61e _1yep5z6eu _1yep5z6kv _1yep5z6l6 _1yep5z6ky _1yep5z6dy",variantClassNames:{isDisabled:{true:"_18v88n1q _1yep5z6109"},labelPosition:{top:"_18v88n1r",start:"_18v88n1s"}},defaultVariants:{},compoundVariants:[]}),Cf=z({defaultClassName:"_18v88n1t _1yep5z660 _1yep5z661 _1yep5z662 _1yep5z6i3 _1yep5z6i4 _1yep5z6i5 _1yep5z6ks",variantClassNames:{validationState:{valid:"_18v88n1u",error:"_1yep5z6zp",warning:"_1yep5z6zx"},isReadOnly:{true:"_1yep5z610b"}},defaultVariants:{},compoundVariants:[]}),Pf=z({defaultClassName:"_18v88n1d _1yep5z6ai _1yep5z6aj _1yep5z6ak _1yep5z6b6 _1yep5z6b7 _1yep5z6b8 _1yep5z6bu _1yep5z6bv _1yep5z6bw _1yep5z6ci _1yep5z6cj _1yep5z6ck _1yep5z6i0 _1yep5z6i1 _1yep5z6i2 _1yep5z6i9 _1yep5z6ia _1yep5z6ib _1yep5z6l9 _1yep5z6l7 _1yep5z6gq _1yep5z6ir _1yep5z6is _1yep5z6it",variantClassNames:{validationState:{valid:"_18v88n1e",error:"_1yep5z611k",warning:"_18v88n1g"},isHovered:{true:"_18v88n1h"},isFocused:{true:"_1yep5z6vt _1yep5z6vu _1yep5z6vv _1yep5z6wh _1yep5z6wi _1yep5z6wj _1yep5z6x5 _1yep5z6x6 _1yep5z6x7 _1yep5z6xt _1yep5z6xu _1yep5z6xv _1yep5z616k _1yep5z616i _1yep5z611y _1yep5z616b _1yep5z616a _1yep5z612n _1yep5z616d"},isDisabled:{true:"_18v88n1j"},variant:{primary:"_18v88n1k",ghost:"_18v88n1l"},isReadOnly:{true:"_1yep5z612n"}},defaultVariants:{},compoundVariants:[[{variant:"ghost",isHovered:!0,isFocused:!1,validationState:"valid"},"_1yep5z61rv _1yep5z61rt _1yep5z61nc"],[{variant:"ghost",isFocused:!1,isHovered:!1,validationState:"valid"},"_18v88n1n"],[{isHovered:!0,validationState:"valid",isDisabled:!1,isReadOnly:!1,isFocused:!1,variant:"primary"},"_1yep5z61nd"],[{isHovered:!0,validationState:"warning",isDisabled:!1,isReadOnly:!1,isFocused:!1},"_1yep5z61nd"],[{isReadOnly:!0,variant:"primary",isFocused:!1},"_18v88n1o"]]}),kf=z({defaultClassName:"_18v88n13 _1yep5z6dy _1yep5z6ev",variantClassNames:{isDisabled:{true:"_1yep5z6109"}},defaultVariants:{},compoundVariants:[]}),Rf=z({defaultClassName:"_18v88n19 _1yep5z6i3 _1yep5z6i4 _1yep5z6i5",variantClassNames:{labelPosition:{top:"_1yep5z6sh _1yep5z6si _1yep5z6sj",start:"_1yep5z6me _1yep5z6mf _1yep5z6mg _1yep5z613n _1yep5z613o _1yep5z613p"},hasMessage:{true:"_18v88n1c"}},defaultVariants:{},compoundVariants:[[{labelPosition:"start",hasMessage:!1},"_1yep5z61q7 _1yep5z61q8 _1yep5z61q9"]]}),wf=z({defaultClassName:"_18v88n15 _1yep5z699 _1yep5z69a _1yep5z69b _1yep5z6ky",variantClassNames:{isFocusVisible:{true:"_1yep5z6116 _1yep5z612v _1yep5z6169"},isHovered:{true:"_1yep5z6116 _1yep5z612v _1yep5z6169"},isOpen:{true:"_1yep5z612v _1yep5z6169"}},defaultVariants:{},compoundVariants:[[{isFocusVisible:!0},"_1yep5z61mh _1yep5z61o6 _1yep5z61rk"],[{isHovered:!0},"_1yep5z61mh _1yep5z61o6 _1yep5z61rk"],[{isOpen:!0},"_1yep5z61o6 _1yep5z61rk"]]});var Sf=io.forwardRef(({className:e,style:o,inputStyle:t,inputClassName:r,"data-block-id":a,"data-block-class":n,label:i,items:s,showSelectedIcon:c=!1,onSelectionChange:l,onInputChange:p,isInvalid:m=!1,labelPosition:u="top",validationState:d="valid",variant:f="primary",toggleLabel:y,renderOption:b,showIcon:_=!0,filter:v,minValue:g,maxValue:h,inputType:R="text",...x},k)=>{let{contains:P}=useFilter({sensitivity:"base"}),w=ie(),S=useComboBoxState({...x,defaultFilter:v||P,defaultItems:s,onSelectionChange:l,onInputChange:p,children:w,validationState:m?"invalid":"valid"}),T=io.useRef(null),N=io.useRef(null),I=io.useRef(null),C=io.useRef(null),B=io.useRef(null),{buttonProps:H,inputProps:D,listBoxProps:G,labelProps:V,errorMessageProps:K,descriptionProps:A,validationErrors:Q}=useComboBox({...x,inputRef:N,defaultItems:s,buttonRef:T,listBoxRef:I,popoverRef:C,validationState:d==="error"?"invalid":"valid"},S),O=x.errorMessage||Q.join(" "),W=Pe({...x,errorMessage:O,descriptionProps:A,errorMessageProps:K,labelPosition:u});O&&(d="error");let{hoverProps:le,isHovered:_e}=useHover({isDisabled:x.isDisabled}),{isFocused:he,focusProps:xe,isFocusVisible:Ce}=useFocusRing(),De=So({isReadOnly:x.isReadOnly,validationState:d}),ee=filterTruthyValues({"data-read-only":x.isReadOnly,"data-disabled":x.isDisabled,"data-validation-state":d,"data-focused":he,"data-focus-visible":Ce}),{labelProps:de,fieldProps:Jo}=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(eo.Provider,{value:S,children:jsxs("div",{className:classNames(hf({labelPosition:u}),e,"BaselineUI-ComboBox"),"data-block-id":a,"data-block-class":n,style:o,ref:k,children:[i||u==="start"&&W?jsxs("div",{className:Rf({labelPosition:u,hasMessage:!!W}),children:[jsx("label",{...mergeProps(V,de),className:kf({isDisabled:x.isDisabled}),children:i}),u==="start"&&W]}):null,jsxs("div",{...le,className:Pf({validationState:d,isHovered:_e,isFocused:he,variant:f,isReadOnly:!!x.isReadOnly,isDisabled:!!x.isDisabled}),ref:B,children:[jsx("input",{...mergeProps(D,xe,ee,Jo,R==="number"?{type:"number",min:g,max:h,onKeyDown:Je=>{(Je.key==="ArrowUp"||Je.key==="ArrowDown")&&Je.preventDefault();}}:null),ref:N,className:classNames(xf({isDisabled:x.isDisabled,labelPosition:u}),"BaselineUI-ComboBox-Input",r),style:t}),De&&_?jsx(De,{className:Cf({validationState:d,isReadOnly:x.isReadOnly}),size:16}):null,jsx($,{...H,ref:T,variant:"popover",label:y,className:wf({isFocusVisible:!x.isDisabled&&!x.isReadOnly&&Ce,isHovered:!x.isDisabled&&!x.isReadOnly&&_e,isOpen:S.isOpen})})]}),jsx(ye,{className:je,ref:C,triggerRef:B,state:S,children:jsx(se,{...G,items:s,ref:I,renderOption:b,selectionMode:"single",showSelectedIcon:c,className:br})}),u==="top"&&W]})})});Sf.displayName="ComboBox";var xi=io.forwardRef(({item:e,renderGridItem:o,state:t},r)=>{let a=te(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)});xi.displayName="GridListItem";var T0=e=>{e.key==="Enter"||e.key==="Escape"||e.stopPropagation();},Lf=io.forwardRef(({className:e,style:o,isEditing:t=!1,"data-block-id":r,"data-block-class":a,gridListHandle:n,...i},s)=>{let c=ie(),l=useListState({...i,children:c}),p=te(s),{gridProps:m}=useGridList(i,l,p);useImperativeHandle(n,()=>({setFocused:d=>{l.selectionManager.setFocused(d);},setFocusedKey:d=>{l.selectionManager.setFocusedKey(d);}}),[l]);let u=t?T0:m.onKeyDownCapture;return jsx("ul",{...m,className:classNames("BaselineUI-GridList",e),"data-block-id":r,"data-block-class":a,style:o,ref:p,onKeyDownCapture:u,children:[...l.collection].map(d=>jsx(xi,{item:d,state:l,renderGridItem:i.renderGridItem},d.key))})});Lf.displayName="GridList";var Mf="_1dc3b8m0";var Ef=io.forwardRef(({className:e,selectionMode:o,style:t,"data-block-id":r,"data-block-class":a,tooltipProps:n,renderActionItem:i,...s},c)=>{let l=te(c),p=ie(),m=useListState({...s,selectionMode:o,suppressTextValueWarning:!0,children:p}),{actionGroupProps:u}=useActionGroup({...s,selectionMode:o,children:p},m,l);return jsx(M,{...u,display:"flex",flexDirection:"row",gap:"xs",className:classNames("BaselineUI-ActionGroup",e),"data-block-id":r,"data-block-class":a,style:t,ref:l,children:[...m.collection].map(d=>(invariant(d.value),jsx(F0,{item:d,state:m,isDisabled:s.isDisabled,onAction:s.onAction,tooltipProps:n,renderActionItem:i},d.key)))})});Ef.displayName="ActionGroup";var F0=({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),c=o.selectionManager.isSelected(e.key);invariant(e.value);let{icon:l}=e.value;invariant(l);let p=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(re,{text:e.textValue,size:"sm",variant:"inverse",includeArrow:!1,offset:4,...p,children:r?.(e,{isSelected:c,isDisabled:s})||jsx(E,{variant:"tertiary",icon:l,"aria-label":e.textValue,size:"sm",isDisabled:s,className:classNames({[Mf]:c},"BaselineUI-ActionGroup-Item")})})})};var Df="ujkypy0 _1yep5z66 _1yep5z67 _1yep5z68 _1yep5z62i _1yep5z62j _1yep5z62k _1yep5z63o _1yep5z63p _1yep5z63q _1yep5z61c _1yep5z61d _1yep5z61e",Ff="_1yep5z61ov _1yep5z61ow _1yep5z61ox _1yep5z61g1 _1yep5z61g2 _1yep5z61g3";var Hf=io.forwardRef(({className:e,style:o,items:t,optionsContainerClassName:r,label:a,icon:n,value:i,defaultValue:s,onChange:c,isDisabled:l,optionClassName:p,optionStyle:m,labelPosition:u="top","data-block-id":d,"data-block-class":f,...y},b)=>{let _=useMemo(()=>t.map(g=>({id:g.color,label:g.label})),[t]),v=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(M,{...ga(y),className:classNames("BaselineUI-ColorSwatchPicker",e),"data-block-id":d,"data-block-class":f,display:"flex",flexDirection:u==="top"?"column":"row",alignItems:u==="top"?"flex-start":"center",justifyContent:"space-between",gap:"md",style:o,ref:b,children:[n||a?jsxs(M,{display:"flex",alignItems:"center",gap:"md",children:[n?jsx(n,{size:24,className:sprinkles({color:"icon.primary"})}):null,a?jsx(J,{id:v,type:"label",size:"sm",children:a}):null]}):null,jsx(se,{className:classNames(Ff,r),selectionMode:"single",items:_,orientation:"horizontal",defaultSelectedKeys:s?[s]:void 0,disabledKeys:l?_.map(g=>g.id):void 0,isDisabled:l,selectedKeys:i?[i]:void 0,onSelectionChange:g=>{c?.([...g][0]);},optionClassName:p,optionStyle:m,renderOption:({key:g,textValue:h},{isSelected:R,isFocusVisible:x,isDisabled:k,optionProps:P},w)=>jsx("li",{...P,"data-disabled":k,className:classNames(Df,P.className),ref:w,children:jsx(Ge,{isFocusVisible:x,color:g,isSelected:R,"aria-label":h,isInteractive:!0,isDisabled:k})}),...y,"aria-labelledby":a?v:y["aria-labelledby"]})]})});Hf.displayName="ColorSwatchPicker";
53
53
 
54
- export { Jp as Accordion, ic as AccordionItem, $ as ActionButton, Pf as ActionGroup, R0 as ActionGroupItem, D as ActionIconButton, la as AlertDialog, ju as AudioPlayer, Fo as Avatar, M as Box, pf as ButtonSelect, xp as Checkbox, Ao as ColorInput, Ge as ColorSwatch, If as ColorSwatchPicker, _f as ComboBox, Mp as DateFormat, me as Dialog, al as DialogTitle, si as DomNodeRenderer, dr as Drawer, xu as Editor, Kl as FileUpload, Ed as FreehandCanvas, hf as GridList, dm as Group, wi as I18nProvider, Id as IconColorInput, Ar as IconColorInputButton, fc as IconSelect, yl as IconSlider, Yd as ImageDropZone, rf as ImageGallery, Hc as InlineAlert, Fl as Link, ie as ListBox, Lu as Markdown, gr as Menu, cm as MessageFormat, ke as Modal, G5 as ModalClose, Me as ModalContent, Nr as ModalTrigger, Lo as NumberFormat, Le as NumberInput, Lp as Pagination, Ne as Popover, we as PopoverContent, Se as PopoverTrigger, Po as Portal, Ni as PortalContainerProvider, om as Preview, op as ProgressBar, Bo as ProgressSpinner, pm as RadioGroup, pp as Reaction, wu as ScrollControlButton, Nl as SearchInput, qe as Select, j as Separator, wo as Slider, kl as Switch, Tc as TabItem, Ic as Tabs, $p as TagGroup, J as Text, So as TextInput, Co as ThemeProvider, xr as ToggleButton, Ie as ToggleIconButton, Xr as Toolbar, re as Tooltip, Kd as Transform, sa as Transition, q as defineMessages, dI as isInsideOverlayContent, ti as isRect, zo as useDevice, F as useI18n, vo as useImage, zi as useIntersectionObserver, _o as useIsFirstRender, Ii as useLocalStorage, tN as useMutationObserver, be as usePortalContainer, hi as useResizeObserver, pN as useTextSelection, Ci as useUndoRedo, Ma as useUserPreferences };
54
+ export { cc as Accordion, vc as AccordionItem, $ as ActionButton, Ef as ActionGroup, F0 as ActionGroupItem, E as ActionIconButton, pa as AlertDialog, Ju as AudioPlayer, Fo as Avatar, M as Box, zf as ButtonSelect, Mp as Checkbox, Ao as ColorInput, Ge as ColorSwatch, Hf as ColorSwatchPicker, Sf as ComboBox, Up as DateFormat, me as Dialog, ul as DialogTitle, ys as DomNodeRenderer, mr as Drawer, Mu as Editor, rp as FileUpload, Gd as FreehandCanvas, Lf as GridList, xm as Group, Es as I18nProvider, Hd as IconColorInput, jr as IconColorInputButton, kc as IconSelect, Rl as IconSlider, sm as ImageDropZone, yf as ImageGallery, Xc as InlineAlert, Wl as Link, se as ListBox, $u as Markdown, vr as Menu, hm as MessageFormat, ke as Modal, az as ModalClose, Me as ModalContent, Nr as ModalTrigger, Lo as NumberFormat, Le as NumberInput, $p as Pagination, Se as Popover, Re as PopoverContent, Ne as PopoverTrigger, ko as Portal, Hs as PortalContainerProvider, mm as Preview, mp as ProgressBar, Bo as ProgressSpinner, zm as RadioGroup, zp as Reaction, Fu as ScrollControlButton, Al as SearchInput, qe as Select, j as Separator, wo as Slider, Dl as Switch, Vc as TabItem, Hc as Tabs, ec as TagGroup, J as Text, No as TextInput, Po as ThemeProvider, Cr as ToggleButton, Ie as ToggleIconButton, Yr as Toolbar, re as Tooltip, rm as Transform, sa as Transition, q as defineMessages, EI as isInsideOverlayContent, ps as isRect, ho as useDevice, F as useI18n, _o as useImage, Ts as useIntersectionObserver, zo as useIsFirstRender, Fs as useLocalStorage, RS as useMutationObserver, be as usePortalContainer, Ss as useResizeObserver, MS as useTextSelection, Ls as useUndoRedo, Ba as useUserPreferences };