@baseline-ui/core 0.6.2 → 0.7.1

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
@@ -7,4 +7,4 @@
7
7
  * This notice may not be removed from this file.
8
8
  *
9
9
  */
10
- import Xp from"react";import{Item as Bt,Section as Zp}from"react-stately";import{mergeRefs as Op}from"@react-aria/utils";import Ft from"react";import{classNames as Ep,filterTruthyValues as Ap}from"@baseline-ui/utils";import{ListKeyboardDelegate as jp,mergeProps as qp,useFocusRing as Up,useListBox as Kp,useLocale as Gp}from"react-aria";import{useListState as Wp}from"react-stately";import{classNames as Fp,invariant as Bp}from"@baseline-ui/utils";import{useListBoxSection as Hp}from"react-aria";function bp(e,a){if(typeof e!="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var o=r.call(e,a||"default");if(typeof o!="object")return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return(a==="string"?String:Number)(e)}function vp(e){var a=bp(e,"string");return typeof a=="symbol"?a:String(a)}function gp(e,a,r){return a=vp(a),a in e?Object.defineProperty(e,a,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[a]=r,e}function zt(e,a){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);a&&(o=o.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),r.push.apply(r,o)}return r}function Pt(e){for(var a=1;a<arguments.length;a++){var r=arguments[a]!=null?arguments[a]:{};a%2?zt(Object(r),!0).forEach(function(o){gp(e,o,r[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):zt(Object(r)).forEach(function(o){Object.defineProperty(e,o,Object.getOwnPropertyDescriptor(r,o))})}return e}function kt(e,a){var r={};for(var o in e)r[o]=a(e[o],o);return r}var hp=(e,a,r)=>{for(var o of Object.keys(e)){var s;if(e[o]!==((s=a[o])!==null&&s!==void 0?s:r[o]))return!1}return!0},u=e=>{var a=r=>{var o=e.defaultClassName,s=Pt(Pt({},e.defaultVariants),r);for(var t in s){var i,n=(i=s[t])!==null&&i!==void 0?i:e.defaultVariants[t];if(n!=null){var l=n;typeof l=="boolean"&&(l=l===!0?"true":"false");var p=e.variantClassNames[t][l];p&&(o+=" "+p)}}for(var[d,m]of e.compoundVariants)hp(d,s,e.defaultVariants)&&(o+=" "+m);return o};return a.variants=()=>Object.keys(e.variantClassNames),a.classNames={get base(){return e.defaultClassName.split(" ")[0]},get variants(){return kt(e.variantClassNames,r=>kt(r,o=>o.split(" ")[0]))}},a};var Rt="_1yep5z6j5",wt=u({defaultClassName:"_6n12k98 _1yep5z6d3 _1yep5z6bi _1yep5z6c3",variantClassNames:{isDisabled:{true:"_1yep5z6d6"}},defaultVariants:{},compoundVariants:[]}),Nt=u({defaultClassName:"_6n12k91 _1yep5z63r _1yep5z63s _1yep5z63t _1yep5z61f _1yep5z61g _1yep5z61h _1yep5z6g7 _1yep5z6g8 _1yep5z6g9 _1yep5z6gg _1yep5z6gh _1yep5z6gi _1yep5z6gy _1yep5z6gz _1yep5z6h0 _1yep5z6hy _1yep5z6hz _1yep5z6i0 _1yep5z69l _1yep5z69m _1yep5z69n _1yep5z6c6 _1yep5z6d2 _1yep5z6ip _1yep5z6is",variantClassNames:{isSelected:{},isFocused:{true:"_1yep5z6z1 _1yep5z612q _1yep5z612o _1yep5z612r _1yep5z6za _1yep5z6zb _1yep5z6zc"},isHovered:{true:"_1yep5z6xj",false:"_1yep5z6xi"},isFirstChild:{true:"_6n12k95"},isLastChild:{true:"_6n12k96"},isDisabled:{true:"z9nup83 _1yep5z6wo"}},defaultVariants:{},compoundVariants:[]}),It="_1yep5z6g7 _1yep5z6g8 _1yep5z6g9 _1yep5z6gy _1yep5z6gz _1yep5z6h0 _1yep5z69l _1yep5z69m _1yep5z69n",Tt="_6n12k90";import _p from"react";import{classNames as xp}from"@baseline-ui/utils";import{useSeparator as Cp}from"react-aria";var St=u({defaultClassName:"gukncs0",variantClassNames:{isVertical:{true:"gukncs1"},isSecondary:{true:"gukncs2"}},defaultVariants:{},compoundVariants:[]});import{jsx as zp}from"react/jsx-runtime";var E=_p.forwardRef(({className:e,style:a,variant:r="primary",orientation:o="horizontal",UNSAFE_omitRole:s,elementType:t="div",...i},n)=>{let{separatorProps:l}=Cp({...i,orientation:o,elementType:t});return zp(t,{...l,className:xp(St({isVertical:o==="vertical",isSecondary:r==="secondary"}),"BaselineUI-Separator",e),"data-orientation":o,"data-blockid":i["data-blockid"],style:a,role:s?void 0:l.role,ref:n})});E.displayName="Separator";import{mergeRefs as Sp}from"@react-aria/utils";import Mt from"react";import{useOption as Lp}from"react-aria";import{CheckmarkIcon as Pp}from"@baseline-ui/icons/24/index";import{classNames as kp,filterTruthyValues as Rp,invariant as wp}from"@baseline-ui/utils";import Np from"react";import{mergeProps as Ip,useHover as Tp}from"react-aria";import{jsx as Ge,jsxs as Lt}from"react/jsx-runtime";var We=Np.forwardRef(({item:e,isDisabled:a,isFocusVisible:r,isSelected:o,liProps:s,showSelectedIcon:t,description:i,descriptionProps:n,labelProps:l,isFocused:p,isPressed:d,_state:m},c)=>{wp(e.value&&(e.value.type==="option"||e.value.type===void 0),"Item cannot be a section");let{icon:f,label:y}=e.value,{hoverProps:b,isHovered:v}=Tp({isDisabled:a}),g=Rp({"data-selected":o,"data-disabled":a,"data-focused":p,"data-hovered":v,"data-pressed":d,"data-focus-visible":r,"data-selection-mode":m.selectionManager.selectionMode});return Lt("li",{...Ip(s,b,g),className:kp(Nt({isHovered:v,isFocused:r,isFirstChild:m.collection.getFirstKey()===e.key,isLastChild:m.collection.getLastKey()===e.key,isDisabled:a}),"BaselineUI-ListBox-Option"),ref:c,children:[Lt("div",{className:It,children:[t&&Ge("span",{"aria-hidden":!0,style:{height:24,width:24},children:o&&Ge(Pp,{size:24})}),f&&Ge(f,{size:24}),Ge("span",{...l,children:y})]}),i&&Ge("span",{className:wt({isDisabled:a}),...n,children:i})]})});We.displayName="DefaultRenderOption";import{jsx as Mp}from"react/jsx-runtime";var Xe=Mt.forwardRef(({item:e,renderOption:a=(t,i,n)=>Mp(We,{item:t,liProps:i.optionProps,...i,ref:n}),showSelectedIcon:r,state:o},s)=>{let t=Mt.useRef(null),i=Lp({key:e.key},o,t);return a(e,{...i,showSelectedIcon:r,_state:o},Sp(t,s))});Xe.displayName="Option";import{Fragment as Dp,jsx as br,jsxs as Vp}from"react/jsx-runtime";var mo=({section:e,state:a,showSelectedIcon:r})=>{let{itemProps:o,groupProps:s}=Hp({heading:e.rendered,"aria-label":e["aria-label"]}),t=a.collection.getChildren?.(e.key);return Bp(t,"items with type `section` must have children"),Vp(Dp,{children:[e.key!==a.collection.getFirstKey()&&br(E,{UNSAFE_omitRole:!0}),br("li",{...o,className:Fp(Tt,"BaselineUI-ListBox-Section"),children:br("ul",{...s,children:[...t].map(i=>br(Xe,{item:i,state:a,showSelectedIcon:r},i.key))})})]})};mo.displayName="ListBoxSection";import{jsx as uo}from"react/jsx-runtime";var fo=Ft.forwardRef(({className:e,layout:a="stack",orientation:r="vertical",showSelectedIcon:o=!0,UNSAFE_state:s,style:t,renderOption:i,"data-blockid":n,...l},p)=>{let d=Wp(l),{direction:m}=Gp(),c=s||d,f=Ft.useRef(null),{listBoxProps:y}=Kp({...l,keyboardDelegate:new jp({collection:c.collection,ref:f,layout:a,orientation:r,direction:m,disabledKeys:c.disabledKeys})},c,f),{isFocusVisible:b,isFocused:v,focusProps:g}=Up(),h=Ap({"data-blockid":n,"data-layout":a,"data-empty":c.collection.size===0,"data-focused":v,"data-focus-visible":b});return uo("ul",{...qp(y,g,h),className:Ep(Rt,"BaselineUI-ListBox",e),style:t,ref:Op(p,f),children:[...c.collection].map(_=>_.type==="section"?uo(mo,{showSelectedIcon:o,section:_,state:c},_.key):uo(Xe,{showSelectedIcon:o,item:_,state:c,renderOption:i},_.key))})});fo.displayName="ListBoxBase";import{jsx as vr}from"react/jsx-runtime";var le=Xp.forwardRef((e,a)=>vr(fo,{...e,ref:a,children:r=>r.type==="section"?vr(Zp,{items:r.children,title:r.id,children:o=>vr(Bt,{children:o.label},o.id)},r.id):vr(Bt,{children:r.label},r.id)}));le.displayName="ListBox";import{classNames as Yp}from"@baseline-ui/utils";import{mergeRefs as Qp}from"@react-aria/utils";import Dt from"react";import{mergeProps as $p,useButton as Jp,useFocusRing as ec,useHover as rc}from"react-aria";var Ht=u({defaultClassName:"oom8bs0 _1yep5z6ai _1yep5z6aq _1yep5z6ay _1yep5z6b6 _1yep5z6ga _1yep5z6gb _1yep5z6gc _1yep5z69i _1yep5z69j _1yep5z69k _1yep5z6gy _1yep5z6gz _1yep5z6h0 _1yep5z6j4 _1yep5z6j5 _1yep5z6iz _1yep5z6c6 _1yep5z6ip",variantClassNames:{variant:{primary:"oom8bs1",secondary:"oom8bs2",tertiary:"oom8bs3",ghost:"oom8bs4"},isDisabled:{true:"oom8bs5"},isFocusVisible:{true:"oom8bs6"},isHovered:{true:"oom8bs7"},size:{sm:"oom8bs8",md:"oom8bs9"}},defaultVariants:{},compoundVariants:[[{variant:"primary",isHovered:!0},"oom8bsa"],[{variant:"secondary",isHovered:!0},"oom8bsb"],[{variant:"tertiary",isHovered:!0},"oom8bsc"],[{variant:"ghost",isHovered:!0},"oom8bsd"],[{variant:"primary",isFocusVisible:!0},"oom8bse"],[{variant:"tertiary",isFocusVisible:!0},"oom8bsf"]]});import{jsx as Vt,jsxs as tc}from"react/jsx-runtime";var oc={sm:16,md:20},Z=Dt.forwardRef(({label:e,style:a,className:r,iconStart:o,iconEnd:s,variant:t="primary",elementType:i="button",isDisabled:n,size:l="sm","data-blockid":p,...d},m)=>{let c=Dt.useRef(null),{buttonProps:f,isPressed:y}=Jp({...d,elementType:i,isDisabled:n},c),b=oc[l],{hoverProps:v,isHovered:g}=rc({isDisabled:n}),{isFocusVisible:h,isFocused:_,focusProps:P}=ec();return tc(i,{...$p(f,v,P),className:Yp(Ht({isDisabled:!!n,isFocusVisible:h,isHovered:g,variant:t,size:l}),"BaselineUI-ActionButton",r),"data-focus-visible":h,"data-focused":_,"data-hovered":g,"data-disabled":n,"data-blockid":p,"data-pressed":y,style:a,ref:Qp(m,c),children:[!!o&&Vt(o,{size:b}),e,!!s&&Vt(s,{size:b})]})});Z.displayName="ActionButton";import{mergeRefs as ac}from"@react-aria/utils";import yo from"react";import{classNames as sc}from"@baseline-ui/utils";var Ze=u({defaultClassName:"z9nup84",variantClassNames:{size:{xs:"z9nup85",sm:"z9nup86"}},defaultVariants:{},compoundVariants:[]});var gr="z9nup80",Ie="z9nup83";import{jsx as ic}from"react/jsx-runtime";var Ot=yo.forwardRef(({className:e,node:a},r)=>{let o=yo.useRef(null);return yo.useEffect(()=>{let s=o.current;return s?.append(a),()=>{s?.contains(a)&&a.remove()}},[a]),ic("div",{className:sc(gr,e),ref:ac(r,o)})});Ot.displayName="DomNodeRenderer";import{classNames as Qe,filterTruthyValues as kc}from"@baseline-ui/utils";import{mergeRefs as Rc}from"@react-aria/utils";import vo from"react";import{VisuallyHidden as wc,mergeProps as ea,useFocusRing as Nc,useHover as Ic,useNumberFormatter as Tc,useSlider as Sc,useSliderThumb as Lc}from"react-aria";import{useSliderState as Mc}from"react-stately";var Et="_14uvjig0 z9nup81",At="_14uvjig7",jt="_14uvjig3",qt=u({defaultClassName:"_14uvjig4",variantClassNames:{isDisabled:{true:"_14uvjig5"},hasNumberInput:{false:"_14uvjig6"}},defaultVariants:{},compoundVariants:[]}),Ut=u({defaultClassName:"_14uvjige _14uvjig1",variantClassNames:{active:{true:"_14uvjigf _14uvjig2"},isDisabled:{true:"_14uvjigg"},isReadOnly:{true:"_14uvjigh"},isFocusVisible:{true:"_14uvjigi _14uvjig2"},isHovered:{true:"_14uvjigj _14uvjig2"}},defaultVariants:{},compoundVariants:[]}),Kt="_14uvjig8",Gt=u({defaultClassName:"_14uvjig9 _14uvjig1",variantClassNames:{active:{true:"_14uvjig2"},isFocusVisible:{true:"_14uvjigb _14uvjig2"},isDisabled:{true:"_14uvjigc"},isHovered:{true:"_14uvjig2"}},defaultVariants:{},compoundVariants:[]});import{ErrorFilledIcon as fc,ReadOnlyIcon as yc}from"@baseline-ui/icons/16";import $t,{useMemo as bc}from"react";import{classNames as _r,filterTruthyValues as vc}from"@baseline-ui/utils";import{mergeProps as Jt,useFocusRing as gc,useHover as hc,useLocale as _c,useNumberField as xc}from"react-aria";import{MinusIcon as Cc,PlusIcon as zc}from"@baseline-ui/icons/8";import{useNumberFieldState as Pc}from"react-stately";var Te=u({defaultClassName:"nrh1ehx",variantClassNames:{isDisabled:{true:"nrh1ehy"},hasError:{true:"nrh1ehz"},labelPosition:{start:"nrh1eh10",top:"nrh1eh11"}},defaultVariants:{},compoundVariants:[]}),hr=u({defaultClassName:"nrh1eho",variantClassNames:{isDisabled:{true:"nrh1ehp"},labelPosition:{top:"nrh1ehq",start:"nrh1ehr"}},defaultVariants:{},compoundVariants:[]}),Se=u({defaultClassName:"nrh1ehs",variantClassNames:{validationState:{valid:"nrh1eht",error:"nrh1ehu",warning:"nrh1ehv"},isReadOnly:{true:"nrh1ehw"}},defaultVariants:{},compoundVariants:[]}),pe="nrh1eh3",ce=u({defaultClassName:"nrh1eh4",variantClassNames:{labelPosition:{top:"nrh1eh5",start:"nrh1eh6"},hasMessage:{true:"nrh1eh7"}},defaultVariants:{},compoundVariants:[[{labelPosition:"start",hasMessage:!1},"nrh1eh8"]]}),de=u({defaultClassName:"nrh1eh0",variantClassNames:{labelPosition:{top:"z9nup81",start:"nrh1eh2 z9nup82"}},defaultVariants:{},compoundVariants:[]}),Le=u({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"]]});import{jsx as bo}from"react/jsx-runtime";function me({description:e,errorMessageProps:a,descriptionProps:r,warningMessage:o,errorMessage:s,labelPosition:t,isDisabled:i}){return e?bo("div",{...r,className:Te({isDisabled:i,labelPosition:t}),children:e}):s?bo("div",{...a,className:Te({hasError:!0,labelPosition:t}),children:s}):o?bo("div",{className:Te({isDisabled:i,labelPosition:t}),children:o}):null}var Wt=u({defaultClassName:"_1lnwne1 z9nup82",variantClassNames:{isHoveredOrFocused:{true:"_1lnwne2"},isInteractive:{false:"z9nup83"}},defaultVariants:{},compoundVariants:[[{isHoveredOrFocused:!0,isInteractive:!0},"_1lnwne4"]]}),Xt="_1lnwne0";import{mergeRefs as nc}from"@react-aria/utils";import Yt from"react";import{mergeProps as lc,useButton as pc,useFocusRing as cc,useHover as dc}from"react-aria";import{classNames as mc}from"@baseline-ui/utils";var Zt=u({defaultClassName:"uf19bs0 _1yep5z6ai _1yep5z6aq _1yep5z6ay _1yep5z6b6 _1yep5z6d8 _1yep5z6j4 _1yep5z6ga _1yep5z6gb _1yep5z6gc _1yep5z6gy _1yep5z6gz _1yep5z6h0 _1yep5z6hs _1yep5z6ht _1yep5z6hu _1yep5z6ip _1yep5z6iz",variantClassNames:{size:{xxs:"uf19bs1",xs:"uf19bs2",sm:"uf19bs3",md:"uf19bs4",lg:"uf19bs5"},isHovered:{true:"uf19bs6"},isDisabled:{true:"uf19bs7 _1yep5z6ws"},isFocusVisible:{true:"uf19bs8"},variant:{primary:"uf19bs9",secondary:"uf19bsa",tertiary:"uf19bsb",ghost:"uf19bsc"}},defaultVariants:{},compoundVariants:[[{variant:"primary",isHovered:!0},"_1yep5z61h1"],[{variant:"secondary",isHovered:!0},"_1yep5z61g9"],[{variant:"tertiary",isHovered:!0},"_1yep5z61gc"],[{variant:"ghost",isHovered:!0},"_1yep5z61ge"],[{variant:"ghost",isDisabled:!1},"_1yep5z61gd"]]});import{jsx as Qt}from"react/jsx-runtime";var uc={xxs:8,xs:12,sm:16,md:20,lg:24},w=Yt.forwardRef(({className:e,style:a,icon:r,size:o="md",variant:s="primary",UNSAFE_NON_INTERACTIVE:t,elementType:i=t?"div":"button",...n},l)=>{!n["aria-label"]&&!n["aria-labelledby"]&&console.warn("An `ActionIconButton` requires an aria-label or aria-labelledby prop.");let p=Yt.useRef(null),{buttonProps:d,isPressed:m}=pc({...n,elementType:i},p),{isFocusVisible:c,isFocused:f,focusProps:y}=cc(),{hoverProps:b,isHovered:v}=dc({isDisabled:n.isDisabled});return Qt(i,{...lc(d,b,y),className:mc(Zt({variant:s,size:o,isDisabled:!!n.isDisabled,isFocusVisible:c,isHovered:v}),"BaselineUI-ActionIconButton",e),"data-blockid":n["data-blockid"],"data-focused":f,"data-focus-visible":c,"data-disabled":n.isDisabled,"data-hovered":v,"data-pressed":m,ref:nc(l,p),style:a,...t&&{tabIndex:void 0,role:void 0,"aria-label":void 0,"aria-labelledby":void 0,"aria-disabled":void 0},children:Qt(r,{role:"presentation",size:uc[o]})})});w.displayName="ActionIconButton";import{jsx as Me,jsxs as Ye}from"react/jsx-runtime";var te=$t.forwardRef(({className:e,style:a,labelPosition:r="top",variant:o="primary",showStepper:s=!0,...t},i)=>{let n=$t.useRef(null),{locale:l}=_c(),p=Pc({...t,locale:l}),{hoverProps:d,isHovered:m}=hc({isDisabled:t.isDisabled}),{focusProps:c,isFocusVisible:f,isFocused:y}=gc(),{labelProps:b,decrementButtonProps:v,inputProps:g,incrementButtonProps:h,groupProps:_,descriptionProps:P,errorMessageProps:z}=xc(t,p,n),F=bc(()=>t.isReadOnly?yc:t.isInvalid?fc:null,[t.isInvalid,t.isReadOnly]),S=me({description:t.description,errorMessageProps:z,descriptionProps:P,errorMessage:t.errorMessage,labelPosition:r,isDisabled:t.isDisabled}),x=vc({"data-disabled":t.isDisabled,"data-readonly":t.isReadOnly,"data-hovered":m,"data-focused":y,"data-focus-visible":f,"data-invalid":t.isInvalid,"data-blockid":t["data-blockid"]});return Ye("div",{style:a,className:_r(de({labelPosition:r}),"BaselineUI-NumberInput",e),...x,ref:i,children:[t.label&&Ye("div",{className:ce({labelPosition:r,hasMessage:!!S}),children:[Me("label",{...b,className:pe,children:t.label}),r==="start"&&S]}),Ye("div",{className:_r({[Ie]:t.isDisabled}),children:[Ye("div",{...Jt(_,d),className:_r(Le({isHovered:m,isDisabled:!!t.isDisabled,isReadOnly:!!t.isReadOnly,validationState:t.isInvalid?"error":"valid",isFocused:y,variant:o}),{[Xt]:r==="start"},"BaselineUI-NumberInput-Container"),children:[Me("input",{...Jt(g,c),ref:n,className:_r("BaselineUI-NumberInput-Input",hr({isDisabled:t.isDisabled,labelPosition:r}))}),F&&Me(F,{className:Se({validationState:"error",isReadOnly:t.isReadOnly}),size:16}),s&&Ye("div",{className:Wt({isHoveredOrFocused:m||y,isInteractive:!t.isReadOnly&&!t.isDisabled}),children:[Me(w,{variant:"secondary",size:"xxs",icon:Cc,...v,className:"BaselineUI-NumberInput-DecrementButton"}),Me(E,{style:{height:16},orientation:"vertical"}),Me(w,{variant:"secondary",size:"xxs",icon:zc,...h,className:"BaselineUI-NumberInput-DecrementButton"})]})]}),r==="top"&&S]})]})});te.displayName="NumberInput";import{Fragment as Bc,jsx as ue,jsxs as xr}from"react/jsx-runtime";var ra=vo.forwardRef(({className:e,style:a,onChange:r,onChangeEnd:o,numberFormatOptions:s,isDisabled:t,step:i,minValue:n,maxValue:l,value:p,"aria-label":d,"aria-labelledby":m,"aria-details":c,"aria-describedby":f,"data-blockid":y,defaultValue:b,isReadOnly:v,label:g,id:h,includeNumberInput:_},P)=>{let z=vo.useRef(null),F={onChange:r===void 0?void 0:L=>r(L[0]),isDisabled:t||v,step:i,minValue:n,maxValue:l,onChangeEnd:o===void 0?void 0:L=>o(L[0]),value:p===void 0?void 0:[p],defaultValue:b===void 0?void 0:[b],"aria-label":d,"aria-labelledby":m,"aria-details":c,"aria-describedby":f,id:h,label:g},S=Tc(s),x=Mc({...F,numberFormatter:S}),{trackProps:R,groupProps:N,labelProps:I}=Sc(F,x,z),k=ue(te,{variant:"ghost",showStepper:!1,"aria-label":d,"aria-labelledby":I.id,value:x.getThumbValue(0),formatOptions:s,onChange:L=>x.setThumbValue(0,L),style:{width:55,textAlign:"right",flexShrink:0}});return xr("div",{...N,style:a,"data-blockid":y,className:Qe(Et,"BaselineUI-Slider",e),children:[g&&xr("div",{className:jt,children:[ue("label",{...I,className:Qe(qt({isDisabled:t,hasNumberInput:!!_}),"BaselineUI-Slider-Label"),children:g}),_&&k]}),xr("div",{className:At,children:[ue("div",{...R,className:Qe(Kt,"BaselineUI-Slider-Track"),ref:Rc(z,P),"data-testid":"track",children:ue(Fc,{state:x,trackRef:z,isDisabled:t,isReadOnly:v})}),_&&!g&&k]})]})});ra.displayName="Slider";function Fc({state:e,trackRef:a,isDisabled:r,isReadOnly:o}){let s=vo.useRef(null),{thumbProps:t,inputProps:i,isDragging:n}=Lc({trackRef:a,inputRef:s},e),{focusProps:l,isFocused:p,isFocusVisible:d}=Nc(),{hoverProps:m,isHovered:c}=Ic({isDisabled:r}),f=kc({"data-disabled":r,"data-readonly":o,"data-hovered":c,"data-focus-visible":d,"data-dragging":n,"data-focused":p});return xr(Bc,{children:[ue("div",{className:Qe(Gt({isDisabled:r,isFocusVisible:d,active:n,isHovered:c}),"BaselineUI-Slider-TrackHighlight"),style:{width:t.style?.left},"data-testid":"track-highlight"}),ue("div",{...ea(t,m,f),className:Qe(Ut({isDisabled:r,isFocusVisible:d,active:n,isReadOnly:o,isHovered:c}),"BaselineUI-Slider-Thumb"),"data-testid":"thumb",children:ue(wc,{children:ue("input",{ref:s,...ea(i,l)})})})]})}import la from"react";import{useToggleState as Hc}from"react-stately";import{VisuallyHidden as Dc,mergeProps as pa,useFocusRing as Vc,useHover as Oc,useSwitch as Ec}from"react-aria";import{classNames as $e,filterTruthyValues as Ac}from"@baseline-ui/utils";var oa=u({defaultClassName:"bpklwa7",variantClassNames:{isReadOnly:{true:"bpklwa8"},isDisabled:{true:"bpklwa9"},isSelected:{true:"bpklwaa"},isFocused:{true:"bpklwab"}},defaultVariants:{},compoundVariants:[[{isSelected:!0,isDisabled:!1,isReadOnly:!1},"bpklwac"]]}),ta=u({defaultClassName:"bpklwae",variantClassNames:{isDisabled:{true:"bpklwaf"},isSelected:{true:"bpklwag"},isReadOnly:{true:"bpklwah"}},defaultVariants:{},compoundVariants:[]}),aa="bpklwad",sa=u({defaultClassName:"bpklwa0",variantClassNames:{labelPosition:{top:"bpklwa1",left:"bpklwa2"}},defaultVariants:{},compoundVariants:[]}),ia="bpklwa6",na=u({defaultClassName:"bpklwa3",variantClassNames:{labelPosition:{top:"bpklwa4",left:"bpklwa5"}},defaultVariants:{},compoundVariants:[]});import{jsx as Fe,jsxs as ca}from"react/jsx-runtime";var da=la.forwardRef(({className:e,label:a,labelPosition:r="top",statusLabel:o,style:s,"data-blockid":t,...i},n)=>{let l=la.useRef(null),p=Hc(i),{inputProps:d,isPressed:m}=Ec(i,p,l),{isFocusVisible:c,focusProps:f}=Vc(),{hoverProps:y,isHovered:b}=Oc({isDisabled:i.isDisabled}),v=Ac({"data-blockid":t,"data-focused":c,"data-disabled":i.isDisabled,"data-focus-visible":c,"data-selected":p.isSelected,"data-readonly":i.isReadOnly,"data-hovered":b,"data-pressed":m}),g=Fe("div",{className:$e(oa({isSelected:p.isSelected,isDisabled:!!i.isDisabled,isFocused:c,isReadOnly:!!i.isReadOnly}),"BaselineUI-Switch-Track"),children:Fe("div",{className:$e(ta({isSelected:p.isSelected,isDisabled:i.isDisabled,isReadOnly:i.isReadOnly}),"BaselineUI-Switch-Knob"),"data-testid":"switch-knob"})});return ca("label",{...pa(v,y),className:$e(sa({labelPosition:r}),"BaselineUI-Switch",e),style:s,ref:n,children:[a&&Fe("span",{className:$e(aa,"BaselineUI-Switch-Label"),children:a}),Fe(Dc,{children:Fe("input",{...pa(d,f),ref:l})}),o?ca("div",{className:na({labelPosition:r}),children:[Fe("span",{className:$e("BaselineUI-Switch-Status-Label",ia),children:p.isSelected?o.on:o.off}),g]}):g]})});da.displayName="Switch";import{XIcon as jc}from"@baseline-ui/icons/16";import{XIcon as qc}from"@baseline-ui/icons/12";import{SearchIcon as fa}from"@baseline-ui/icons/24";import{SearchIcon as Uc}from"@baseline-ui/icons/20";import ya from"react";import{classNames as Kc,filterTruthyValues as Gc}from"@baseline-ui/utils";import{mergeProps as Wc,useFocusRing as Xc,useSearchField as Zc}from"react-aria";import{useSearchFieldState as Yc}from"react-stately";var ma="_19n40yy9",ua=u({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:[]});import{jsx as go,jsxs as $c}from"react/jsx-runtime";var Qc={sm:Uc,md:fa,lg:fa},ba=ya.forwardRef(({className:e,size:a="md",variant:r="primary",...o},s)=>{let t=ya.useRef(null),i=Yc(o),{inputProps:n,clearButtonProps:l}=Zc({...o,"aria-haspopup":!1,"aria-autocomplete":"none",type:"search"},i,t),{focusProps:p,isFocusVisible:d,isFocused:m}=Xc({within:!0,isTextInput:!0}),c=Qc[a],f=a==="sm"?qc:jc,y=Gc({"data-blockid":o["data-blockid"],"data-focused":m,"data-disabled":o.isDisabled,"data-focus-visible":d});return $c("div",{...y,className:Kc(ua({size:a,isFocused:m,variant:r,hasText:!!i.value,isDisabled:o.isDisabled}),"BaselineUI-SearchInput",e),ref:s,children:[go(c,{size:a==="sm"?20:24}),go("input",{...Wc(n,p),className:ma,ref:t}),i.value!==""&&go(w,{icon:f,...l,size:a==="sm"?"xs":"sm",variant:"secondary"})]})});ba.displayName="SearchInput";import{classNames as rd}from"@baseline-ui/utils";import od,{useMemo as td}from"react";import{assignInlineVars as ga}from"@vanilla-extract/dynamic";import{darkTheme as ad,lightTheme as sd,themeVars as id}from"@baseline-ui/tokens";import{mergeProps as nd,useLocale as ld}from"react-aria";import{useEffect as Cr,useState as zr}from"react";function ho(){let[e,a]=zr("light"),[r,o]=zr(!1),[s,t]=zr(!1),[i,n]=zr(!1);return Cr(()=>{let l=window.matchMedia("(prefers-color-scheme: dark)"),p=d=>{a(d.matches?"dark":"light")};return l.matches&&a("dark"),l.addEventListener("change",p),()=>{l.addEventListener("change",p)}},[]),Cr(()=>{let l=window.matchMedia("(prefers-contrast: more)"),p=d=>{o(d.matches)};return o(l.matches),l.addEventListener("change",p),()=>{l.addEventListener("change",p)}},[]),Cr(()=>{let l=window.matchMedia("(prefers-reduced-motion: reduce)"),p=d=>{t(d.matches)};return l.matches&&t(!0),l.addEventListener("change",p),()=>{l.addEventListener("change",p)}},[]),Cr(()=>{let l=window.matchMedia("(prefers-reduced-transparency: reduce)"),p=d=>{n(d.matches)};return l.matches&&n(!0),l.addEventListener("change",p),()=>{l.addEventListener("change",p)}},[]),{colorScheme:e,highContrast:r,reducedMotion:s,transparency:i}}import{lightTheme as Jc}from"@baseline-ui/tokens";import{createContext as ed}from"react";var fe=ed({theme:Jc,setTheme:()=>{}});var va="var(--hj25q10)";import{jsx as ha}from"react/jsx-runtime";var Pr={LIGHT:{name:"light",theme:sd},DARK:{name:"dark",theme:ad}},ye=od.forwardRef(({theme:e="system",children:a,setTheme:r,className:o,style:s,UNSAFE_domProps:t,"data-blockid":i},n)=>{let{direction:l}=ld(),{colorScheme:p,reducedMotion:d,highContrast:m,transparency:c}=ho(),{name:f,theme:y}=td(()=>{switch(e){case"system":return p==="light"?Pr.LIGHT:Pr.DARK;case"light":return Pr.LIGHT;case"dark":return Pr.DARK;default:return{name:"custom",theme:e}}},[p,e]),b={"data-theme":f,"data-blockid":i,"data-reduced-motion":d,"data-high-contrast":m,"data-transparency":c};return ha(fe.Provider,{value:{theme:y,setTheme:r},children:ha("div",{...nd(t,b),className:rd(gr,"BaselineUI-ThemeProvider",o),style:{...ga(id,y),...ga({[va]:l==="rtl"?"-1":"1"}),...s},ref:n,children:a})})});ye.displayName="ThemeProvider";import Ad from"react";import{useMenuTriggerState as jd}from"react-stately";import{Slot as Fd}from"@radix-ui/react-slot";import Nr from"react";import{Item as Ba,Section as Bd}from"react-stately";import{invariant as Hd}from"@baseline-ui/utils";import{mergeProps as Dd,useMenuTrigger as Vd}from"react-aria";var _a=u({defaultClassName:"_1mdhlqv4",variantClassNames:{isOpen:{true:"_1mdhlqv5"}},defaultVariants:{},compoundVariants:[]}),kr="_1mdhlqv7 _1yep5z6aj _1yep5z6ar _1yep5z6az _1yep5z6b7 _1yep5z6bf",xa=u({defaultClassName:"_1mdhlqv1 _1yep5z66 _1yep5z67 _1yep5z68 _1yep5z62i _1yep5z62j _1yep5z62k _1yep5z63o _1yep5z63p _1yep5z63q _1yep5z61c _1yep5z61d _1yep5z61e _1yep5z6g7 _1yep5z6g8 _1yep5z6g9 _1yep5z6gy _1yep5z6gz _1yep5z6h0 _1yep5z69o _1yep5z69p _1yep5z69q _1yep5z6d2 _1yep5z6hy _1yep5z6hz _1yep5z6i0 _1yep5z6c6",variantClassNames:{isFocused:{false:"_1mdhlqv2"},isDisabled:{true:"z9nup83 _1yep5z6d6"}},defaultVariants:{},compoundVariants:[]}),Ca="_1mdhlqv8 _1yep5z6aj _1yep5z6ar _1yep5z6az _1yep5z6b7 _1yep5z6e0",za="_1yep5z66x _1yep5z66y _1yep5z66z",Pa="_1mdhlqv6 _1yep5z6g7 _1yep5z6g8 _1yep5z6g9 _1yep5z6gg _1yep5z6gh _1yep5z6gi _1yep5z6gy _1yep5z6gz _1yep5z6h0 _1yep5z69i _1yep5z69j _1yep5z69k";import{classNames as md}from"@baseline-ui/utils";import{mergeRefs as ud}from"@react-aria/utils";import{animated as fd}from"@react-spring/web";import{assignInlineVars as yd}from"@vanilla-extract/dynamic";import Na,{useContext as bd,useEffect as vd}from"react";import{DismissButton as Ia,Overlay as gd,usePopover as hd}from"react-aria";import{config as pd,useReducedMotion as cd,useTransition as dd}from"@react-spring/web";function ka({placement:e}){let a=cd();return dd(!0,{from:{opacity:0,transform:`translate3d(${e==="bottom"?"0, 4px, 0":"0, -4px, 0"})`},enter:{opacity:1,transform:"translate3d(0, 0, 0)"},immediate:!!a,config:pd.stiff})}var Ra="_1gzftth1",wa="var(--_1gzftth0)";import{jsx as Rr,jsxs as Ta}from"react/jsx-runtime";var ae=Na.forwardRef(({className:e,style:a,state:r,overlayProps:o,underlayClassName:s,children:t,...i},n)=>{let{theme:l}=bd(fe),p=Na.useRef(null),{underlayProps:d,popoverProps:m,placement:c}=hd({...i,popoverRef:p},r),f=ka({placement:c});return vd(()=>(i.scrollRef?.current?.addEventListener("scroll",r.close),()=>{i.scrollRef?.current?.removeEventListener("scroll",r.close)}),[i.scrollRef,r.close,i.isNonModal]),f((y,b)=>b&&Rr(gd,{children:Ta(ye,{ref:n,theme:l,style:a,className:s,UNSAFE_domProps:o,children:[Rr("div",{...d}),Ta(fd.div,{...m,style:{...m.style,...y,...yd({[wa]:`${i.triggerRef?.current?.offsetWidth}px`})},ref:ud(p,n),className:md(Ra,e),"data-placement":["top","bottom","left","right"].filter(v=>c?.includes(v)),children:[Rr(Ia,{onDismiss:r.close}),t,Rr(Ia,{onDismiss:r.close})]})]})}))});ae.displayName="PopoverContentCore";import{mergeRefs as Nd}from"@react-aria/utils";import Fa from"react";import{mergeProps as Id,useKeyboard as Td,useMenu as Sd}from"react-aria";import{useTreeState as Ld}from"react-stately";import{classNames as Md}from"@baseline-ui/utils";var Sa="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 _1yep5z6aj _1yep5z6ar _1yep5z6az _1yep5z6b7 _1yep5z6j7 _1yep5z6j6 _1yep5z6fl _1yep5z6ja _1yep5z6e0",La="xyd2ss0 _1yep5z66 _1yep5z67 _1yep5z68 _1yep5z62i _1yep5z62j _1yep5z62k _1yep5z64l _1yep5z64m _1yep5z64n _1yep5z629 _1yep5z62a _1yep5z62b";import{invariant as _d}from"@baseline-ui/utils";import xd from"react";import{VisuallyHidden as Cd,mergeProps as zd,useFocusRing as Pd,useMenuItem as kd,useMenuSection as Rd}from"react-aria";import{Fragment as wd,jsx as Be,jsxs as Ma}from"react/jsx-runtime";var _o=({section:e,showSelectedIcon:a,state:r})=>{let{itemProps:o,groupProps:s,headingProps:t}=Rd({heading:e.value?.title,"aria-label":e["aria-label"]});return Ma(wd,{children:[e.key!==r.collection.getFirstKey()&&Be(E,{elementType:"li"}),Ma("li",{...o,children:[e.value?.title&&Be(Cd,{children:Be("span",{...t,children:e.value.title})}),Be("ul",{...s,className:La,children:[...e.childNodes].map(i=>(_d(i.type==="item"),Be(wr,{item:i,state:r,showSelectedIcon:a},i.key)))})]})]})};_o.displayName="MenuSection";var wr=({item:e,state:a,className:r,showSelectedIcon:o})=>{let s=xd.useRef(null),t=kd({key:e.key},a,s),{isFocusVisible:i,focusProps:n}=Pd();return Be(We,{item:e,liProps:zd(t.menuItemProps,n,{className:r}),...t,isFocusVisible:i,ref:s,description:e.value?.keyboardShortcut,descriptionProps:t.keyboardShortcutProps,_state:a,showSelectedIcon:o})};wr.displayName="MenuItem";import{jsx as xo}from"react/jsx-runtime";var Co=Fa.forwardRef(({className:e,itemClassName:a,onContentKeyDown:r,...o},s)=>{let t=Ld(o),i=Fa.useRef(null),{menuProps:n}=Sd(o,t,i),{keyboardProps:l}=Td({onKeyDown:r});return xo("ul",{...Id(n,l),className:Md(Sa,e),ref:Nd(i,s),children:[...t.collection].map(p=>p.type==="section"?xo(_o,{section:p,state:t,showSelectedIcon:o.selectionMode==="multiple"||o.selectionMode==="single"},p.key):xo(wr,{item:p,state:t,className:a,showSelectedIcon:o.selectionMode==="multiple"||o.selectionMode==="single"},p.key))})});Co.displayName="MenuContent";import{Fragment as Od,jsx as xe,jsxs as Ed}from"react/jsx-runtime";var C6=Nr.createContext({menuTriggerProps:{}}),Ha=Nr.forwardRef(({isDisabled:e,contentClassName:a,state:r,placement:o="bottom start",isNonModal:s,shouldFlip:t,shouldUpdatePosition:i,boundaryElement:n,crossOffset:l,offset:p,triggerButton:d,...m},c)=>{let f=Nr.useRef(null),{menuTriggerProps:y,menuProps:b}=Vd({isDisabled:e,type:"menu"},r,f);return Ed(Od,{children:[xe(Fd,{...Dd(y,{isDisabled:e,popupPlacement:["top","bottom","right","left"].find(v=>o.includes(v)),isSelected:r.isOpen}),ref:f,children:d}),r.isOpen&&xe(ae,{triggerRef:f,state:r,placement:o,isNonModal:s,shouldFlip:t,shouldUpdatePosition:i,boundaryElement:n,crossOffset:l,offset:p||2,className:kr,children:xe(Co,{className:a,...b,...m,ref:c,autoFocus:r.focusStrategy||"first"})})]})});Ha.displayName="MenuRoot";var zo=Nr.forwardRef((e,a)=>{let r=e.children;return xe(Ha,{...e,ref:a,triggerButton:r,children:o=>"type"in o&&o.type==="section"?xe(Bd,{items:o.children,title:o.title,children:s=>xe(Ba,{children:s.label},s.id)},o.id):(Hd("label"in o,"Item doesn't have a label"),xe(Ba,{textValue:o.label,children:o.label},o.id))})});zo.displayName="MenuBase";import{jsx as qd}from"react/jsx-runtime";var Da=Ad.forwardRef(({defaultOpen:e,isOpen:a,onOpenChange:r,...o},s)=>{let t=jd({defaultOpen:e,isOpen:a,onOpenChange:r});return qd(zo,{...o,state:t,ref:s})});Da.displayName="Menu";import{mergeRefs as Ud}from"@react-aria/utils";import Oa from"react";import{classNames as Kd}from"@baseline-ui/utils";import{mergeProps as Gd,useFocusRing as Wd,useHover as Xd,useLink as Zd}from"react-aria";var Va=u({defaultClassName:"_13f0naj0",variantClassNames:{variant:{default:"_13f0naj1",inline:"_13f0naj2"},isHovered:{true:"_13f0naj3"},isFocusVisible:{true:"_13f0naj4"},isDisabled:{true:"_13f0naj5"},size:{sm:"_13f0naj6",md:"_13f0naj7",lg:"_13f0naj8"},isActive:{true:"_13f0naj9"}},defaultVariants:{},compoundVariants:[[{isActive:!0,isDisabled:!1},"_13f0naja"]]});import{jsx as Yd}from"react/jsx-runtime";var Ea=Oa.forwardRef(({className:e,style:a,children:r,variant:o="default",size:s="md",elementType:t="a",...i},n)=>{let l=Oa.useRef(null),{linkProps:p,isPressed:d}=Zd({...i,elementType:i.onPress?"span":t},l),{isFocusVisible:m,focusProps:c}=Wd(),{hoverProps:f,isHovered:y}=Xd({isDisabled:i.isDisabled});return Yd(t,{...Gd(p,c,f),className:Kd(Va({variant:o,isFocusVisible:m,isHovered:y,isDisabled:i.isDisabled,size:s,isActive:d}),e),ref:Ud(l,n),style:a,children:r})});Ea.displayName="Link";import{mergeRefs as $d}from"@react-aria/utils";import Ga from"react";import{classNames as Jd,invariant as em}from"@baseline-ui/utils";import{VisuallyHidden as rm,mergeProps as Wa,useDrop as om,useFocusRing as tm,useHover as am}from"react-aria";import{invariant as Qd}from"@baseline-ui/utils";import{useId as Po}from"react-aria";function Aa({isDisabled:e,onValueChange:a,onChange:r,name:o,"aria-describedby":s,"aria-label":t,accept:i,multiple:n}){let l=Po(),p=Po(),d=Po();return{inputProps:{type:"file",id:p,disabled:!!e,"aria-labelledby":t?void 0:l,"aria-describedby":s||d,"aria-label":t,onChange:c=>{let f=[...c.target.files||[]];a?.(f),r?.(c)},name:o,accept:i,multiple:n},labelProps:{htmlFor:p,id:l},descriptionProps:{id:d}}}async function ko({items:e}){let a=e.filter(r=>r.kind==="file").map(r=>(Qd(r.kind==="file"),r.getFile()));return await Promise.all(a)}var ja=u({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"]]}),qa=u({defaultClassName:"_180w5ede",variantClassNames:{disabled:{true:"_180w5edf"}},defaultVariants:{},compoundVariants:[]}),Ua=u({defaultClassName:"_180w5ed9",variantClassNames:{disabled:{true:"_180w5eda"}},defaultVariants:{},compoundVariants:[]}),Ka=u({defaultClassName:"_180w5edb",variantClassNames:{disabled:{true:"_180w5edc"},hovered:{true:"_180w5edd"}},defaultVariants:{},compoundVariants:[]});import{jsx as Je,jsxs as Xa}from"react/jsx-runtime";var Za=Ga.forwardRef(({className:e,label:a,description:r,icon:o,variant:s="default",...t},i)=>{let n=Ga.useRef(null),{inputProps:l,descriptionProps:p,labelProps:d}=Aa(t),{dropProps:m}=om({ref:n,onDrop:async({items:v})=>{let g=v.filter(_=>_.kind==="file").map(_=>(em(_.kind==="file"),_.getFile())),h=await Promise.all(g);t.onValueChange?.(h)}}),{focusProps:c,isFocusVisible:f}=tm(),{hoverProps:y,isHovered:b}=am({isDisabled:t.isDisabled});return Xa("label",{...Wa(m,y,d),className:Jd(ja({variant:s,disabled:t.isDisabled,hoveredOrFocusedOrActive:b||f}),e),ref:$d(i,n),children:[Je(rm,{children:Je("input",{...Wa(c,l)})}),o&&Je(o,{size:20,className:Ua({disabled:t.isDisabled})}),Xa("div",{children:[Je("div",{className:Ka({disabled:t.isDisabled,hovered:b}),children:a}),r&&Je("div",{...p,className:qa({disabled:t.isDisabled}),children:r})]})]})});Za.displayName="FileUpload";import sm from"react";import{classNames as im}from"@baseline-ui/utils";import{useId as nm,useProgressBar as lm}from"react-aria";var Ya="_12vfhl40 z9nup81",Qa="_12vfhl41 z9nup82",$a=u({defaultClassName:"_12vfhl48",variantClassNames:{variant:{success:"_12vfhl49",error:"_12vfhl4a",active:"_12vfhl4b"}},defaultVariants:{},compoundVariants:[]}),Ja="_12vfhl42",es="_12vfhl47",rs="_12vfhl46 z9nup82",os="_12vfhl45",ts=u({defaultClassName:"_12vfhl43 _12vfhl42",variantClassNames:{hasLabel:{false:"_12vfhl44"}},defaultVariants:{},compoundVariants:[]});import{jsx as er,jsxs as Ir}from"react/jsx-runtime";var as=sm.forwardRef(({className:e,variant:a="active",showValue:r,description:o,errorMessage:s,...t},i)=>{let n=nm(),{labelProps:l,progressBarProps:p}=lm({...t,"aria-describedby":o?n:t["aria-describedby"]}),{minValue:d=0,maxValue:m=100,value:c=0,label:f}=t,y=(c-d)/(m-d),b=`${Math.round(y*100)}%`,v=er("output",{className:ts({hasLabel:!!f}),children:p["aria-valuetext"]}),g=a==="error"?s:o;return Ir("div",{...p,className:im(Ya,e),ref:i,children:[f&&Ir("div",{className:Qa,children:[er("label",{...l,className:Ja,children:f}),r&&v]}),Ir("div",{className:os,children:[Ir("div",{className:rs,children:[er("div",{className:es,children:er("div",{style:{width:b},className:$a({variant:a})})}),!f&&r&&v]}),g&&er("div",{className:Te({hasError:a==="error"}),id:n,children:g})]})]})});as.displayName="ProgressBar";import ss from"react";import{classNames as Ro}from"@baseline-ui/utils";import{mergeProps as mm,useFocusRing as um,useHover as fm,useTextField as ym}from"react-aria";import{ErrorFilledIcon as pm,ReadOnlyIcon as cm,WarningFilledIcon as dm}from"@baseline-ui/icons/16";function Tr({isReadOnly:e,validationState:a}){return e?cm:a==="error"?pm:a==="warning"?dm:null}import{jsx as wo,jsxs as Sr}from"react/jsx-runtime";var is=ss.forwardRef(({className:e,validationState:a="valid",variant:r="primary",style:o,labelPosition:s="top",inputStyle:t,inputClassName:i,...n},l)=>{let p=ss.useRef(null),{inputProps:d,labelProps:m,descriptionProps:c,errorMessageProps:f}=ym({...n,validationState:a==="error"?"invalid":"valid"},p),{hoverProps:y,isHovered:b}=fm({isDisabled:n.isDisabled}),{isFocused:v,focusProps:g}=um(),h=Tr({isReadOnly:n.isReadOnly,validationState:a}),_=me({...n,descriptionProps:c,errorMessageProps:f,labelPosition:s});return Sr("div",{className:Ro(de({labelPosition:s}),e),style:o,ref:l,children:[Sr("div",{className:ce({labelPosition:s,hasMessage:!!_}),children:[wo("label",{...m,className:pe,children:n.label}),s==="start"&&_]}),Sr("div",{className:Ro({[Ie]:n.isDisabled}),children:[Sr("div",{...y,className:Le({validationState:a,isHovered:b,isFocused:v,variant:r,isReadOnly:!!n.isReadOnly,isDisabled:!!n.isDisabled}),children:[wo("input",{...mm(d,g),className:Ro(hr({isDisabled:n.isDisabled,labelPosition:s}),i),style:t,ref:p}),h&&wo(h,{className:Se({validationState:a,isReadOnly:n.isReadOnly}),size:16})]}),s==="top"&&_]})]})});is.displayName="TextInput";import{CheckmarkIcon as hm}from"@baseline-ui/icons/20";import{CheckmarkIcon as _m}from"@baseline-ui/icons/16";import{classNames as xm}from"@baseline-ui/utils";import ds from"react";import{VisuallyHidden as Cm,useFocusRing as zm,useHover as Pm,useSwitch as km}from"react-aria";import{useToggleState as Rm}from"react-stately";import{useNumberFormatter as bm}from"react-aria";import{Fragment as vm,jsx as gm}from"react/jsx-runtime";var He=({value:e,...a})=>{let r=bm(a);return gm(vm,{children:r.format(e)})};He.displayName="NumberFormat";var ns="_1yep5z6ga _1yep5z6gb _1yep5z6gc",ls=u({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"]]}),ps=u({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"]]}),cs=u({defaultClassName:"_9b1tmlc",variantClassNames:{isDisabled:{true:"_9b1tmld"},isReadOnly:{true:"_9b1tmle"}},defaultVariants:{},compoundVariants:[]});import{jsx as De,jsxs as ms}from"react/jsx-runtime";var us=ds.forwardRef(({className:e,count:a,style:r,size:o="md",icon:s,...t},i)=>{let n={isRequired:!1},l=s||(o==="md"?hm:_m);!t["aria-label"]&&!t["aria-labelledby"]&&console.warn("You must provide either an `aria-label` or `aria-labelledby` prop to the `Reaction` component.");let p=ds.useRef(null),d=Rm({...t,...n}),{inputProps:m,isPressed:c,isDisabled:f,isReadOnly:y,isSelected:b}=km({...t,...n},d,p),{focusProps:v,isFocused:g,isFocusVisible:h}=zm(),{hoverProps:_,isHovered:P}=Pm({});return ms("label",{ref:i,style:r,className:xm(ns,"BaselineUI-Reaction",e),"data-blockid":t["data-blockid"],"data-focused":g,"data-focus-visible":h,"data-disabled":f,"data-hovered":P,"data-pressed":c,"data-selected":b,children:[De(Cm,{children:De("input",{...m,...v,ref:p})}),ms("div",{..._,className:ls({isSelected:b,isFocusVisible:h,isHovered:P,isReadOnly:y,isDisabled:f}),children:[De("div",{className:cs({isDisabled:f,isReadOnly:y}),children:De(l,{size:o==="md"?20:16})}),De("div",{className:ps({isSelected:d.isSelected,isDisabled:f,isReadOnly:y,size:o}),children:De(He,{value:a})})]})]})});us.displayName="Reaction";import{mergeRefs as tu}from"@react-aria/utils";import So from"react";import{useOverlayPosition as au,useTooltipTrigger as su}from"react-aria";import{useTooltipTriggerState as iu}from"react-stately";import{FocusableProvider as nu}from"@react-aria/focus";import wm,{useMemo as Nm}from"react";import{mergeProps as Im,useTooltip as Tm}from"react-aria";import{animated as Sm,useReducedMotion as Lm,useSpring as Mm}from"@react-spring/web";var fs=u({defaultClassName:"_1jwycy80",variantClassNames:{placement:{bottom:"_1jwycy81",left:"_1jwycy82",right:"_1jwycy83",top:"_1jwycy84"}},defaultVariants:{},compoundVariants:[]}),ys="_1jwycy85 _1yep5z63u _1yep5z63v _1yep5z63w _1yep5z61i _1yep5z61j _1yep5z61k _1yep5z66 _1yep5z67 _1yep5z68 _1yep5z62i _1yep5z62j _1yep5z62k _1yep5z6aj _1yep5z6ar _1yep5z6az _1yep5z6b7 _1yep5z6e8 _1yep5z6d7 _1yep5z6cf";import{jsx as bs,jsxs as Fm}from"react/jsx-runtime";var No=wm.forwardRef(({children:e,state:a,overlayProps:r,arrowProps:o,placement:s,tooltipProps:t},i)=>{let{tooltipProps:n}=Tm({isOpen:a.isOpen},a),l=Nm(()=>{switch(s){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}}},[s]),p=Lm(),[d]=Mm(()=>({from:{opacity:0,transform:`translate(${l.x}px, ${l.y}px)`},to:{opacity:1,transform:"translate(0, 0)"},immediate:!!p})),m=s==="center"?"bottom":s;return Fm(Sm.span,{...r,style:{...d,...r.style},ref:i,"data-placement":m,children:[bs("div",{className:fs({placement:m}),...o}),bs("div",{...Im(n,t),className:ys,children:e})]})});No.displayName="TooltipContent";import Bm,{useContext as Hm}from"react";import{Overlay as Dm}from"react-aria";import{jsx as vs}from"react/jsx-runtime";var Lr=Bm.forwardRef(({className:e,children:a,...r},o)=>{let{theme:s}=Hm(fe);return vs(Dm,{...r,children:vs(ye,{ref:o,theme:s,className:e,children:a})})});Lr.displayName="Portal";import Vm,{useEffect as gs}from"react";function hs({ref:e,onIntersect:a,isDisabled:r,threshold:o,rootMargin:s,root:t}){let i=Vm.useRef(null);gs(()=>{if(r){i.current?.disconnect(),i.current=null;return}i.current=new IntersectionObserver(([n])=>{a(n)},{root:t?.current,rootMargin:s,threshold:o})},[a,r,t,s,o]),gs(()=>{let{current:n}=i;return e.current&&n?.observe(e.current),()=>n?.disconnect()},[e])}import Mr from"react";function _s({ref:e,onResize:a,isDisabled:r}){let o=Mr.useRef(null),[s,t]=Mr.useState();return Mr.useEffect(()=>{if(r){o.current?.disconnect(),o.current=null;return}o.current=new ResizeObserver(([i])=>{t(i.contentRect),a?.(i)})},[a,r,t]),Mr.useEffect(()=>{let{current:i}=o;return e.current&&i?.observe(e.current),()=>i?.disconnect()},[e]),{size:s}}import{useEffect as Om,useState as Io}from"react";function Fr({src:e,alt:a}){let[r,o]=Io(!1),[s,t]=Io(!1),[i,n]=Io(!1),l=()=>{o(!0),n(!1)},p=()=>{t(!0),n(!1)};return Om(()=>{if(!e)return;n(!0);let d=new Image;return d.src=e,d.addEventListener("load",l),d.addEventListener("error",p),()=>{d.removeEventListener("load",l),d.removeEventListener("error",p)}},[e]),{isLoaded:r,hasError:s,isLoading:i,imgProps:{src:r?e:void 0,alt:a}}}import{useGranularEffect as jm}from"granular-hooks";import{useReducer as qm,useRef as Um}from"react";import{useEffect as Em,useRef as Am}from"react";function Ve(){let e=Am(!0);return Em(()=>{e.current=!1},[]),e.current}var xs="SET_STATE",Br="UNDO",Hr="REDO",Km=(e,a)=>{let{past:r,present:o,future:s}=e;switch(a.type){case xs:return{past:[...r,o],present:a.data,future:[]};case Br:return{past:r.slice(0,r?.length-1),present:r[r?.length-1],future:[o,...s]};case Hr:return{past:[...r,o],present:s[0],future:s.slice(1)};default:throw new Error("Invalid action type")}},Cs=(e={},{isDisabled:a,onAction:r})=>{let o=Ve(),[s,t]=qm(Km,{past:[],present:e,future:[]}),{past:i,present:n,future:l}=s,p=b=>t({type:xs,data:b}),d=Um(),m=()=>{d.current=Br,t({type:Br})},c=()=>{d.current=Hr,t({type:Hr})},f=!!i?.length,y=!!l?.length;return jm(()=>{(d.current===Br||d.current===Hr)&&(r?.(n,d.current),d.current=void 0)},[n],[r,o]),{state:n,push:a?()=>{}:p,undo:a?()=>{}:m,redo:a?()=>{}:c,pastStates:i,futureStates:l,canUndo:f,canRedo:y}};import{cleanKeyFromGlobImport as Zm}from"@baseline-ui/utils";import{useContext as Ym}from"react";import{useLocale as Qm,useMessageFormatter as $m}from"react-aria";import{I18nProvider as Gm}from"react-aria";import Wm from"react";import{jsx as zs}from"react/jsx-runtime";var To=Wm.createContext({messages:{}}),Xm=({children:e,messages:a={},...r})=>zs(Gm,{...r,children:zs(To.Provider,{value:{messages:a},children:e})});function j(e){let{messages:a}=Ym(To),r=$m(e?Zm(e):a),o=Qm();return{formatMessage:(s,t)=>{if(typeof s=="object")try{return r(s.id,t)}catch{return s.defaultMessage||s.id}else try{return r(s,t)}catch{return s}},locale:o}}function Gz(e){return Object.fromEntries(Object.keys(e).map(a=>[a,e[a].id]))}import Ps from"react";function Zz(e,a,r){let o=Ps.useRef(null);return Ps.useEffect(()=>{if(e)return o.current=new MutationObserver(r),o.current.observe(e,a),()=>{o.current&&o.current.disconnect()}},[e,a,r]),o.current}import{useState as Jm}from"react";function ks(e,a){let[r,o]=Jm(()=>{try{let t=window.localStorage.getItem(e);return t?JSON.parse(t):a}catch(t){return console.log(t),a}});return[r,t=>{try{let i=t instanceof Function?t(r):t;o(i),window.localStorage.setItem(e,JSON.stringify(i))}catch(i){console.log(i)}}]}import eu,{useEffect as ru}from"react";import{usePress as ou}from"react-aria";function rP({ref:e,onSelectionChange:a,onSelectionEnd:r,isDisabled:o}){let s=eu.useRef(null);ou({ref:e,isDisabled:o,onPressEnd(){let t=window.getSelection();t&&e.current?.contains(t.anchorNode)&&r?.(t)},onPressStart(){s.current=window.getSelection(),s.current&&s.current.removeAllRanges()}}),ru(()=>{if(!e.current||o)return;function i(){let n=window.getSelection();n&&e.current?.contains(n.anchorNode)&&a(n)}return document.addEventListener("selectionchange",i),()=>{document.removeEventListener("selectionchange",i)}},[e,a,o])}import{jsx as Rs,jsxs as lu}from"react/jsx-runtime";var ws=So.forwardRef(({children:e,placement:a="bottom",delay:r=1e3,closeDelay:o=500,...s},t)=>{let i=So.useRef(null),n=So.useRef(null),l=!s.text||s.isDisabled,p=iu({...s,delay:r,closeDelay:o,isDisabled:l}),{triggerProps:d,tooltipProps:m}=su({...s,isDisabled:l,delay:r,closeDelay:o},p,i),{overlayProps:c,arrowProps:f,placement:y,updatePosition:b}=au({arrowSize:13,targetRef:i,arrowBoundaryOffset:8,offset:12,overlayRef:n,placement:a,isOpen:p.isOpen,...s});return hs({ref:n,threshold:1,onIntersect:b,isDisabled:!p.isOpen}),_s({ref:i,onResize:b,isDisabled:!p.isOpen}),lu(nu,{...d,ref:i,children:[e,p.isOpen&&Rs(Lr,{disableFocusManagement:!0,children:Rs(No,{ref:tu(t,n),state:p,arrowProps:f,overlayProps:c,placement:y,tooltipProps:m,children:s.text})})]})});ws.displayName="Tooltip";import pu from"react";import{classNames as cu}from"@baseline-ui/utils";import{CheckFilledIcon as du,ErrorAltFilledIcon as mu}from"@baseline-ui/icons/16";import{CheckFilledIcon as uu,ErrorAltFilledIcon as fu}from"@baseline-ui/icons/20";import{useProgressBar as yu}from"react-aria";import{assignInlineVars as bu}from"@vanilla-extract/dynamic";var Ns="_1azy5686",Is="_1azy5685",Ts="var(--_1azy5680)",Ss="_1azy5688",Ls="_1azy5689",Ms="_1azy5681 z9nup82",Fs="_1azy5682";var Bs="_1azy5687";import{jsx as rr,jsxs as Lo}from"react/jsx-runtime";var vu={sm:16,md:20},gu={sm:[du,mu],md:[uu,fu]},Dr=pu.forwardRef(({className:e,style:a,size:r="md",variant:o="active",...s},t)=>{let{labelProps:i,progressBarProps:n}=yu({...s,isIndeterminate:!0}),l=vu[r],p=l/2-2,d=2*p*Math.PI,m=gu[r][o==="success"?0:1];return Lo("div",{className:cu(Ms,e),ref:t,style:{...bu({[Ts]:`${d}px`}),...a},children:[Lo("div",{...n,className:Fs,children:[(o==="active"||o==="inactive")&&Lo("svg",{height:l,width:l,viewBox:`0 0 ${l} ${l}`,children:[rr("circle",{role:"presentation",className:Ns,cx:l/2,cy:l/2,r:p}),o==="active"&&rr("circle",{role:"presentation",className:Is,cx:l/2,cy:l/2,r:p})]}),o==="success"&&rr(m,{className:Bs,size:l}),o==="error"&&rr(m,{className:Ss,size:l})]}),s.label&&rr("span",{...i,className:Ls,children:s.label})]})});Dr.displayName="ProgressSpinner";import{CaretRightIcon as Ds}from"@baseline-ui/icons/8";import{mergeRefs as hu}from"@react-aria/utils";import Vs from"react";import{classNames as _u}from"@baseline-ui/utils";import{mergeProps as xu,useFocusRing as Cu,useHover as zu,useToggleButton as Pu}from"react-aria";import{useToggleState as ku}from"react-stately";var Mo=u({defaultClassName:"_5uw3kp8",variantClassNames:{direction:{top:"_5uw3kp9",bottom:"_5uw3kpa",left:"_5uw3kpb",right:"_5uw3kpc"},isSelected:{true:"_5uw3kpd"}},defaultVariants:{},compoundVariants:[[{direction:"top",isSelected:!0},"_5uw3kpe"],[{direction:"bottom",isSelected:!0},"_5uw3kpf"],[{direction:"right",isSelected:!0},"_5uw3kpg"],[{direction:"left",isSelected:!0},"_5uw3kph"]]}),Hs=u({defaultClassName:"_5uw3kp0 oom8bs0 z9nup82",variantClassNames:{isHovered:{true:"_5uw3kp1"},isFocusVisible:{true:"_5uw3kp2"},isDisabled:{true:"_5uw3kp3"},isSelected:{true:"_5uw3kp4"},size:{md:"_5uw3kp5",lg:"_5uw3kp6"}},defaultVariants:{},compoundVariants:[[{isSelected:!0,isFocusVisible:!0},"_5uw3kp7"]]});import{jsx as Fo,jsxs as wu}from"react/jsx-runtime";var Ru={md:20,lg:24},Os=Vs.forwardRef(({className:e,style:a,popupPlacement:r="bottom",iconStart:o,size:s="md",elementType:t="button",...i},n)=>{let l=Vs.useRef(null),p=ku(i),{buttonProps:d,isPressed:m}=Pu(i,p,l),{hoverProps:c,isHovered:f}=zu({isDisabled:i.isDisabled}),{isFocusVisible:y,isFocused:b,focusProps:v}=Cu(),g=i["aria-haspopup"]==="true"||i["aria-haspopup"]===!0;return wu(t,{...xu(d,c,v),className:_u(Hs({isHovered:f,isFocusVisible:y,isSelected:p.isSelected,size:s,isDisabled:i.isDisabled}),"BaselineUI-ToggleButton",e),"data-blockid":i["data-blockid"],"data-focused":b,"data-focus-visible":y,"data-disabled":i.isDisabled,"data-hovered":f,"data-pressed":m,"data-selected":p.isSelected,style:a,ref:hu(l,n),children:[g&&r==="left"&&Fo(Ds,{className:Mo({direction:r,isSelected:p.isSelected}),size:8}),o&&Fo(o,{size:Ru[s]}),i.label,g&&r!=="left"&&Fo(Ds,{className:Mo({direction:r,isSelected:p.isSelected}),size:8})]})});Os.displayName="ToggleButton";import js from"react";import{classNames as Nu,filterTruthyValues as Iu}from"@baseline-ui/utils";import{VisuallyHidden as Tu,mergeProps as Su,useCheckbox as Lu,useFocusRing as Mu,useHover as Fu}from"react-aria";import{useToggleState as Bu}from"react-stately";import{CheckmarkIcon as Hu,MinusIcon as Du}from"@baseline-ui/icons/12";var Vr=u({defaultClassName:"_16vugd0e",variantClassNames:{isDisabled:{true:"_16vugd0f"}},defaultVariants:{},compoundVariants:[]}),Es=u({defaultClassName:"_16vugd01 _1yep5z6g7 _1yep5z6g8 _1yep5z6g9 _1yep5z6gy _1yep5z6gz _1yep5z6h0",variantClassNames:{labelPosition:{end:"_1yep5z6zy _1yep5z6zz _1yep5z6100 _1yep5z6t0 _1yep5z6t1 _1yep5z6t2",start:"_1yep5z6104 _1yep5z6105 _1yep5z6106 _1yep5z611g _1yep5z611h _1yep5z611i"}},defaultVariants:{},compoundVariants:[]}),As=u({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"]]});import{jsx as or,jsxs as qs}from"react/jsx-runtime";var Us=js.forwardRef(({className:e,style:a,label:r,labelPosition:o="end","data-blockid":s,...t},i)=>{let n=js.useRef(null),l=Bu(t),{isFocusVisible:p,isFocused:d,focusProps:m}=Mu(),{inputProps:c,isPressed:f,isDisabled:y,isSelected:b,isReadOnly:v}=Lu({...t,children:r},l,n),{hoverProps:g,isHovered:h}=Fu({isDisabled:y}),_=Iu({"data-disabled":y,"data-readonly":v,"data-hovered":h,"data-selected":b,"data-pressed":f,"data-indeterminate":t.isIndeterminate,"data-invalid":t.isInvalid,"data-focus-visible":p,"data-focused":d,"data-blockid":s});return qs("label",{..._,className:Nu(Es({labelPosition:o}),"BaselineUI-Checkbox",e),style:a,ref:i,children:[or(Tu,{children:or("input",{...Su(c,m),ref:n})}),qs("div",{...g,className:As({isSelected:b&&!t.isIndeterminate,isIndeterminate:t.isIndeterminate,isFocusVisible:p,isDisabled:y,isReadOnly:v,hasError:t.isInvalid,isHovered:h}),children:[b&&!t.isIndeterminate&&or(Hu,{size:12}),t.isIndeterminate&&or(Du,{size:12})]}),r&&or("span",{className:Vr({isDisabled:y}),children:r})]})});Us.displayName="Checkbox";import Ni from"react";import{classNames as Ii,filterTruthyValues as gf}from"@baseline-ui/utils";import{mergeProps as Ti,useFocusRing as hf,useHover as _f,useLocale as xf,useNumberField as Cf}from"react-aria";import{useNumberFieldState as zf}from"react-stately";import{CaretLeftIcon as Pf,CaretRightIcon as kf}from"@baseline-ui/icons/12";import{CaretLeftIcon as Rf,CaretRightIcon as wf}from"@baseline-ui/icons/16";import{CaretLeftIcon as Nf,CaretRightIcon as If}from"@baseline-ui/icons/20";import{CaretLeftIcon as Tf,CaretRightIcon as Sf}from"@baseline-ui/icons/24";var Ks={close:"\u0625\u063A\u0644\u0627\u0642"};var Gs={close:"Zav\u0159\xEDt"};var Ws={close:"Cau"};var Xs={close:"Luk"};var Zs={close:"Schlie\xDFen"};var Ys={close:"\u039A\u03BB\u03B5\u03AF\u03C3\u03B9\u03BC\u03BF"};var Qs={close:"Close"};var $s={close:"Close"};var Js={close:"Cerrar"};var ei={close:"Sulje"};var ri={close:"Fermer"};var oi={close:"Fermer"};var ti={close:"\u05E1\u05D2\u05D9\u05E8\u05D4"};var ai={close:"Zatvori"};var si={close:"Tutup"};var ii={close:"Chiudi"};var ni={close:"\u9589\u3058\u308B"};var li={close:"\uB2EB\uAE30"};var pi={close:"Tutup"};var ci={close:"Lukk"};var di={close:"Sluit"};var mi={close:"Zamknij"};var ui={close:"Fechar"};var fi={close:"Fechar"};var yi={close:"\u0417\u0430\u043A\u0440\u044B\u0442\u044C"};var bi={close:"Zavrie\u0165"};var vi={close:"Zapri"};var gi={close:"St\xE4ng"};var hi={close:"\u0E1B\u0E34\u0E14"};var _i={close:"Kapat"};var xi={close:"\u0417\u0430\u043A\u0440\u0438\u0442\u0438"};var Ci={close:"\u5173\u95ED"};var zi={close:"\u95DC\u9589"};var G={ar:Ks,cs:Gs,cy:Ws,da:Xs,de:Zs,el:Ys,enGB:Qs,en:$s,es:Js,fi:ei,frCA:ri,fr:oi,he:ti,hr:ai,id:si,it:ii,ja:ni,ko:li,ms:pi,nbNO:ci,nl:di,pl:mi,ptPT:ui,pt:fi,ru:yi,sk:bi,sl:vi,sv:gi,th:hi,tr:_i,uk:xi,zhHans:Ci,zhHant:zi};var Pi=u({defaultClassName:"_1nsi9h17",variantClassNames:{isFocusVisible:{true:"_1nsi9h18"},variant:{pinned:"_1nsi9h19",floating:"_1nsi9h1a"}},defaultVariants:{},compoundVariants:[]}),ki="_1nsi9h1b",Ri=u({defaultClassName:"_1nsi9h10",variantClassNames:{size:{xs:"_1nsi9h11",sm:"_1nsi9h12",md:"_1nsi9h13",lg:"_1nsi9h14"},variant:{floating:"_1nsi9h15",pinned:"_1nsi9h16"}},defaultVariants:{},compoundVariants:[]}),wi="_1nsi9h1c";import{jsx as Oe,jsxs as Bo}from"react/jsx-runtime";var Lf={style:"decimal"},Mf={xs:[Pf,kf],sm:[Rf,wf],md:[Nf,If],lg:[Tf,Sf]},Si=Ni.forwardRef(({className:e,style:a,minValue:r=1,defaultValue:o=1,incrementAriaLabel:s,decrementAriaLabel:t,"aria-label":i,size:n="md",variant:l="floating",...p},d)=>{let{locale:m}=xf(),c=j(G),f={...p,formatOptions:Lf,minValue:r,incrementAriaLabel:s||c.formatMessage("nextPage"),decrementAriaLabel:t||c.formatMessage("prevPage"),defaultValue:o,"aria-label":i||c.formatMessage("goToPage")},y=Ni.useRef(null),b=zf({...f,locale:m}),{inputProps:v,decrementButtonProps:g,incrementButtonProps:h,groupProps:_}=Cf({...f,onKeyDown:L=>{L.key==="Enter"&&y.current?.blur(),p.onKeyDown?.(L)}},b,y),{hoverProps:P,isHovered:z}=_f({}),{focusProps:F,isFocused:S,isFocusVisible:x}=hf(),R=l==="floating",[N,I]=Mf[n],k=gf({"data-focus-visible":x,"data-focused":S,"data-hovered":z,"data-blockid":p["data-blockid"]});return Bo("div",{...Ti(_,P,k),className:Ii(Ri({size:n,variant:l}),"BaselineUI-Pagination",e),style:a,ref:d,children:[Oe(w,{icon:N,...g,elementType:"div",size:n,style:{height:"100%",...R&&{borderRadius:0}},className:"BaselineUI-Pagination-DecrementButton"}),l==="floating"&&Oe(E,{orientation:"vertical"}),Bo("div",{className:Pi({isFocusVisible:x,variant:l}),"aria-label":c.formatMessage("pageXofY",{arg0:v.value,arg1:b.maxValue}),children:[Oe("input",{...Ti(v,F),ref:y,className:Ii("BaselineUI-Pagination-Input",ki),style:{width:`${v.value?.toString().length||1}ch`}}),Bo("span",{className:wi,children:["/ ",Oe(He,{value:b.maxValue})]})]}),l==="floating"&&Oe(E,{orientation:"vertical"}),Oe(w,{icon:I,...h,elementType:"div",size:n,style:{height:"100%",...R&&{borderRadius:0}},className:"BaselineUI-Pagination-IncrementButton"})]})});Si.displayName="Pagination";import{useNumberFormatter as aR,useDateFormatter as sR,useCollator as iR}from"react-aria";import{useDateFormatter as Ff}from"react-aria";import{Fragment as Bf,jsx as Hf}from"react/jsx-runtime";var Li=({date:e,...a})=>{let r=Ff(a);return Hf(Bf,{children:r.format(e)})};Li.displayName="DateFormat";import Xf from"react";import{Item as Zf}from"react-stately";import{XIcon as Df}from"@baseline-ui/icons/12";import{CheckmarkIcon as Vf}from"@baseline-ui/icons/16";import{classNames as Of}from"@baseline-ui/utils";import{mergeRefs as Ef}from"@react-aria/utils";import Or from"react";import{mergeProps as Di,useButton as Af,useFocusRing as jf,useHover as Vi,useTag as qf,useTagGroup as Uf}from"react-aria";import{useListState as Kf}from"react-stately";var Mi=u({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"]]}),Fi="_1f789qjj",Bi="_1f789qj0",Hi=u({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"]]});import{jsx as Ce,jsxs as Wf}from"react/jsx-runtime";var Gf=({item:e,state:a,variant:r="neutral"})=>{let o=Or.useRef(null),{focusProps:s,isFocusVisible:t}=jf({within:!0}),{rowProps:i,gridCellProps:n,removeButtonProps:l,allowsRemoving:p,isDisabled:d,isSelected:m,allowsSelection:c}=qf({item:e},a,o),f=Or.useRef(null),{buttonProps:y}=Af(l,f),{hoverProps:b,isHovered:v}=Vi({isDisabled:d}),{hoverProps:g,isHovered:h}=Vi({isDisabled:d}),_=e.value?.icon,P=e.value?.variant??r;return Ce("div",{...Di(i,s,g),ref:o,className:Mi({isFocusVisible:t,variant:P,isDisabled:d,allowsRemoving:p,isSelected:m,allowsSelection:c,isHovered:h}),children:Wf("div",{...n,className:Fi,children:[m&&Ce(Vf,{size:16}),!m&&_&&Ce(_,{size:16}),e.rendered,p&&Ce("button",{...Di(y,b),className:Hi({variant:P,isHovered:v}),children:Ce(Df,{})})]})})},Ho=Or.forwardRef(({className:e,style:a,...r},o)=>{let s=Or.useRef(null),t=Kf(r),{gridProps:i}=Uf(r,t,s);return Ce("div",{...i,className:Of(Bi,e),style:a,ref:Ef(o,s),children:[...t.collection].map(n=>Ce(Gf,{state:t,item:n,variant:r.variant},n.key))})});Ho.displayName="TagGroupBase";import{jsx as Oi}from"react/jsx-runtime";var Ei=Xf.forwardRef(({items:e,...a},r)=>Oi(Ho,{...a,items:e,ref:r,children:o=>Oi(Zf,{children:o.label})}));Ei.displayName="TagGroup";import tr,{useEffect as Zi}from"react";import{FocusScope as ey}from"react-aria";import{classNames as Yf}from"@baseline-ui/utils";import{getOwnerDocument as Qf}from"@react-aria/utils";import Do,{useContext as Xi}from"react";import{useKeyboard as $f}from"react-aria";var Ai="_1yep5z6j2",ji=u({defaultClassName:"_1kvz17db _1yep5z6ip _1yep5z6ir",variantClassNames:{showActionsOnTriggerOnly:{true:"_1kvz17dc"},isTriggered:{true:"_1kvz17dd"}},defaultVariants:{},compoundVariants:[]}),qi=u({defaultClassName:"_1kvz17d0 _1yep5z64u _1yep5z64v _1yep5z64w _1yep5z676 _1yep5z677 _1yep5z678 _1yep5z68c _1yep5z68d _1yep5z68e _1yep5z660 _1yep5z661 _1yep5z662 _1yep5z6ip _1yep5z6iq",variantClassNames:{isExpanded:{true:"_1kvz17d1"}},defaultVariants:{},compoundVariants:[]}),Ui="_1yep5z6d3 _1yep5z6c6",Ki=u({defaultClassName:"_1kvz17d2 _1yep5z63o _1yep5z63p _1yep5z63q _1yep5z61f _1yep5z61g _1yep5z61h _1yep5z63 _1yep5z64 _1yep5z65 _1yep5z62f _1yep5z62g _1yep5z62h _1yep5z6g7 _1yep5z6g8 _1yep5z6g9 _1yep5z6gy _1yep5z6gz _1yep5z6h0 _1yep5z6hy _1yep5z6hz _1yep5z6i0 _1yep5z6ip _1yep5z6is",variantClassNames:{isFocusVisible:{true:"_1kvz17d3"},isHovered:{true:"_1yep5z6e1",false:"_1yep5z6e2"},isDisabled:{true:"z9nup83"}},defaultVariants:{},compoundVariants:[]}),Gi="_1kvz17da _1yep5z66 _1yep5z67 _1yep5z68 _1yep5z62i _1yep5z62j _1yep5z62k _1yep5z6c7",Wi=u({defaultClassName:"_1kvz17d7 _1yep5z6g7 _1yep5z6g8 _1yep5z6g9 _1yep5z6gy _1yep5z6gz _1yep5z6h0",variantClassNames:{isDisabled:{true:"_1yep5z6d6",false:"_1yep5z6d2"}},defaultVariants:{},compoundVariants:[]});import{jsx as Jf}from"react/jsx-runtime";var Vo=Do.forwardRef(({children:e,className:a,style:r},o)=>{let{headers:s}=Xi(be),{disabledKeys:t}=Xi(be),{keyboardProps:i}=$f({onKeyDown:n=>{let l=Qf(n.target),p=[...s?.keys()||[]].findIndex(y=>s?.get(y)?.current===l.activeElement),d=s?.get(p||0),m=s?.size||0,c=y=>{let b=s.get(y-1<0?m-1:y-1);t?.has(b?.current?.getAttribute("data-key")||"")?c(y-1):b?.current?.focus()},f=y=>{let b=s.get((y+1)%m);t?.has(b?.current?.getAttribute("data-key")||"")?f(y+1):b?.current?.focus()};if(d)switch(n.key){case"Home":{n.preventDefault(),f(-1);break}case"End":{n.preventDefault(),c(m);break}case"ArrowDown":{n.preventDefault(),f(p);break}case"ArrowUp":{n.preventDefault(),c(p);break}default:n.continuePropagation()}}});return Jf("div",{...i,style:r,className:Yf(Ai,a),ref:o,children:Do.Children.map(e,(n,l)=>Do.cloneElement(n,{index:l}))})});Vo.displayName="AccordionBase";import{jsx as Oo}from"react/jsx-runtime";var be=tr.createContext({expandedKeys:new Set,setExpandedKeys:()=>{},disabledKeys:new Set,headers:new Map,expansionMode:"multiple"}),Yi=tr.forwardRef(({children:e,disabledKeys:a,defaultExpandedKeys:r=new Set,expandedKeys:o,expansionMode:s="multiple",onChange:t,className:i,style:n},l)=>{let[p,d]=tr.useState(r),m=tr.useRef(new Map).current,[c,f]=tr.useState(s);return Zi(()=>{f(c)},[c]),Zi(()=>{t?.(p)},[p,t]),Oo(be.Provider,{value:{expandedKeys:o||p,setExpandedKeys:o?()=>{}:d,disabledKeys:a,headers:m,expansionMode:c},children:Oo(ey,{children:Oo(Vo,{className:i,style:n,ref:l,children:e})})})});Yi.displayName="Accordion";import{animated as py,useReducedMotion as cy,useTransition as dy}from"@react-spring/web";import on,{useContext as my}from"react";import{FocusScope as uy,useId as tn}from"react-aria";import{ChevronRightIcon as ry}from"@baseline-ui/icons/8";import{invariant as Qi}from"@baseline-ui/utils";import $i,{useContext as oy,useEffect as ty}from"react";import{mergeProps as Ji,useButton as ay,useFocusManager as sy,useFocusRing as en,useHover as iy,useKeyboard as ny,usePress as ly}from"react-aria";import{jsx as ar,jsxs as rn}from"react/jsx-runtime";var Eo=$i.forwardRef(({title:e,actions:a,controlId:r,value:o,id:s,index:t,subLabel:i,showActionsOnTriggerOnly:n},l)=>{let p=$i.useRef(null),{expandedKeys:d,setExpandedKeys:m,expansionMode:c,disabledKeys:f,headers:y}=oy(be),b=f?.has(o),v=sy();Qi(v);let{focusNext:g,focusPrevious:h}=v,{keyboardProps:_}=ny({onKeyDown:H=>{H.key==="ArrowRight"?g({wrap:!0}):H.key==="ArrowLeft"?h({wrap:!0}):H.continuePropagation()},isDisabled:b});ty(()=>{Qi(typeof t=="number","AccordionItem must have an index"),y?.set(t,p)},[t,y]);let P=()=>{m(H=>{let D=new Set(H);return D.has(o)?D.delete(o):(c==="single"&&D.clear(),D.add(o)),D})},{buttonProps:z}=ay({"aria-expanded":d.has(o),"aria-controls":r,onPress:P,isDisabled:b},p),{pressProps:F}=ly({onPress:P,isDisabled:b}),{focusProps:S,isFocusVisible:x}=en(),{hoverProps:R,isHovered:N}=iy({isDisabled:b}),{focusProps:I,isFocusVisible:k}=en({within:!0}),L=d.has(o);return rn("h3",{...Ji(_,F,R,I),className:Ki({isFocusVisible:x,isHovered:N,isDisabled:b}),ref:l,children:[rn("div",{className:Wi({isDisabled:!!b}),children:[ar(ry,{className:qi({isExpanded:L}),size:8}),ar("button",{...Ji(z,S),id:s,"data-key":o,className:Gi,ref:p,children:e})]}),a?.length&&ar("div",{"data-testid":"action-buttons",className:ji({showActionsOnTriggerOnly:n,isTriggered:k||N}),children:a.map((H,D)=>ar(w,{variant:"secondary",size:"sm",excludeFromTabOrder:!0,isDisabled:b,...H},D))}),i&&ar("div",{className:Ui,children:i})]})});Eo.displayName="AccordionHeader";import{Fragment as fy,jsx as Er,jsxs as yy}from"react/jsx-runtime";var an=on.forwardRef(({title:e,actions:a,children:r,value:o,index:s,subLabel:t,style:i,className:n,showActionsOnTriggerOnly:l},p)=>{let d=tn(),m=tn(),{expandedKeys:c}=my(be),f=on.useRef(null),y=c.has(o),b=Ve(),v=cy(),g=dy(y?[o]:[],{from:!b&&!v&&{height:0,opacity:0},enter:()=>async h=>{await h({height:f.current?.scrollHeight,opacity:1})},leave:{height:0,opacity:0},keys:h=>h});return yy(fy,{children:[Er(uy,{children:Er(Eo,{value:o,actions:a,id:m,title:e,controlId:d,ref:p,index:s,subLabel:t,showActionsOnTriggerOnly:l})}),g(h=>Er(py.div,{role:"region","aria-labelledby":m,id:d,style:{...h,overflow:"hidden"},children:Er("div",{ref:f,className:n,style:i,children:r})}))]})});an.displayName="AccordionItem";import Ny from"react";import{Item as pn,Section as Iy}from"react-stately";import{classNames as jo}from"@baseline-ui/utils";import ln from"react";import{HiddenSelect as Py,useSelect as ky}from"react-aria";import{useSelectState as Ry}from"react-stately";import{ChevronDownIcon as by}from"@baseline-ui/icons/8";import{classNames as sn,filterTruthyValues as vy}from"@baseline-ui/utils";import{mergeRefs as gy}from"@react-aria/utils";import nn from"react";import{mergeProps as hy,useButton as _y,useFocusRing as xy,useHover as Cy}from"react-aria";import{jsx as Ar,jsxs as zy}from"react/jsx-runtime";var Ao=nn.forwardRef(({variant:e,isOpen:a,validationState:r="valid",...o},s)=>{let t=nn.useRef(null),{buttonProps:i,isPressed:n}=_y({...o,isDisabled:o.isDisabled||o.isReadOnly},t),{hoverProps:l,isHovered:p}=Cy({isDisabled:o.isDisabled}),{focusProps:d,isFocused:m,isFocusVisible:c}=xy(),f=Tr({isReadOnly:o.isReadOnly,validationState:r});o.isReadOnly&&(i.disabled=!1);let y=vy({"data-disabled":o.isDisabled,"data-readonly":o.isReadOnly,"data-focused":m,"data-focus-visible":c,"data-hovered":p,"data-pressed":n,"data-open":a});return zy("button",{...hy(i,l,d,y),ref:gy(s,t),className:sn(xa({isFocused:c,isDisabled:o.isDisabled}),Le({variant:e,isHovered:p,isFocused:c,validationState:r,isDisabled:!!o.isDisabled,isReadOnly:o.isReadOnly}),"BaselineUI-Select-Button"),children:[o.children,f&&Ar("span",{"aria-hidden":!0,className:sn(Se({validationState:r,isReadOnly:!!o.isReadOnly}),za),children:Ar(f,{size:16})}),Ar("span",{"aria-hidden":!0,children:Ar(by,{size:8,className:_a({isOpen:a})})})]})});Ao.displayName="SelectButton";import{Fragment as wy,jsx as ze,jsxs as jr}from"react/jsx-runtime";var qo=ln.forwardRef(({className:e,style:a,labelPosition:r="top",variant:o="primary","data-blockid":s,...t},i)=>{let n=ln.useRef(null),l=Ry({...t,validationState:t.validationState==="error"?"invalid":"valid"}),{labelProps:p,triggerProps:d,valueProps:m,menuProps:c,descriptionProps:f,errorMessageProps:y}=ky({...t,validationState:t.validationState==="error"?"invalid":"valid"},l,n),b=me({...t,descriptionProps:f,errorMessageProps:y,labelPosition:r}),v=l.selectedItem?.value,g=v&&"icon"in v&&v.icon;return jr(wy,{children:[jr("div",{style:a,className:jo(de({labelPosition:r}),"BaselineUI-Select",e),"data-blockid":s,ref:i,children:[(t.label||b)&&jr("div",{className:ce({labelPosition:r,hasMessage:!!b}),children:[t.label&&ze("div",{...p,className:jo(pe,"BaselineUI-Select-Label"),children:t.label}),r==="start"&&b]}),ze(Py,{state:l,triggerRef:n,isDisabled:t.isDisabled,label:t.label,name:t.name}),ze(Ao,{...d,isOpen:l.isOpen,variant:o,validationState:t.validationState,ref:n,isReadOnly:t.isReadOnly,children:jr("span",{className:Pa,children:[g&&ze(g,{size:24}),ze("span",{...m,children:v?"label"in v&&v?.label:t.placeholder})]})}),r==="top"&&b]}),l.isOpen&&ze(ae,{offset:2,state:l,triggerRef:n,style:a,className:jo(kr,"BaselineUI-Select-Popover"),...t,children:ze(le,{...c,label:t.label,items:t.items,UNSAFE_state:l,showSelectedIcon:t.showSelectedIcon,className:Ca})})]})});qo.displayName="SelectBase";import{jsx as qr}from"react/jsx-runtime";var Ur=Ny.forwardRef((e,a)=>qr(qo,{...e,ref:a,children:r=>r.type==="section"?qr(Iy,{items:r.children,title:r.id,children:o=>qr(pn,{children:o.label},o.id)},r.id):qr(pn,{textValue:r.label,children:r.label},r.id)}));Ur.displayName="Select";import{AvatarIcon as Ty}from"@baseline-ui/icons/16";import{AvatarIcon as Sy}from"@baseline-ui/icons/24";import Ly from"react";import{classNames as My}from"@baseline-ui/utils";var cn="_1017q4c5",dn=u({defaultClassName:"_1017q4c0",variantClassNames:{size:{md:"_1017q4c1",sm:"_1017q4c2"},isDisabled:{true:"_1017q4c3"}},defaultVariants:{},compoundVariants:[]}),mn="_1017q4c4";import{jsx as Uo,jsxs as By}from"react/jsx-runtime";var Fy={sm:Ty,md:Sy},un=Ly.forwardRef(({className:e,style:a,size:r="md",icon:o=Fy[r],name:s,imgSrc:t,showInitials:i,isDisabled:n,hasNotifications:l,imgLoading:p,"data-blockid":d},m)=>{let{imgProps:c}=Fr({src:t,alt:s}),f=s?.split(" ").map(y=>y[0]).join("");return By("span",{className:My(dn({size:r,isDisabled:n}),"BaselineUI-Avatar",e),"data-disabled":n,ref:m,style:a,"aria-disabled":n,"data-blockid":d,children:[t&&Uo("img",{...c,loading:p,className:mn}),!i&&!t&&Uo(o,{size:r==="sm"?16:24}),i&&!t&&(r==="sm"?f[0]:f),l&&Uo("div",{"data-testid":"notification",className:cn})]})});un.displayName="Avatar";import Xo,{useMemo as Yy}from"react";import{Item as Qy}from"react-stately";import{XIcon as jy}from"@baseline-ui/icons/8";import{classNames as xn,invariant as Cn}from"@baseline-ui/utils";import Ko from"react";import{mergeProps as qy,useFocusRing as Uy,useHover as Ky,useKeyboard as Gy,useTab as Wy,useTabList as Xy}from"react-aria";import{useTabListState as Zy}from"react-stately";var fn="_1x62fhbj",yn=u({defaultClassName:"_1x62fhb6",variantClassNames:{isHovered:{true:"_1x62fhb7"},isSelected:{true:"_1x62fhb8"},isFocusVisible:{true:"_1x62fhb9"},isDisabled:{true:"_1x62fhba z9nup83"},variant:{primary:"_1x62fhbb",ghost:"_1x62fhbc"}},defaultVariants:{},compoundVariants:[[{variant:"primary",isSelected:!0,isDisabled:!1},"_1x62fhbd"],[{variant:"primary",isSelected:!0},"_1x62fhbe"],[{variant:"ghost",isSelected:!0,isFocusVisible:!1},"_1x62fhbf"],[{variant:"ghost",isSelected:!0,isDisabled:!1},"_1x62fhbg"],[{variant:"ghost",isDisabled:!0,isSelected:!0},"_1x62fhbh"],[{variant:"primary",isHovered:!0},"_1x62fhbi"]]}),bn=u({defaultClassName:"_1x62fhb3 z9nup82",variantClassNames:{variant:{primary:"_1x62fhb4",ghost:"_1x62fhb5"}},defaultVariants:{},compoundVariants:[]}),vn="_1x62fhbk",gn="_1x62fhbl",hn=u({defaultClassName:"_1x62fhb0 z9nup82",variantClassNames:{variant:{primary:"_1x62fhb1",ghost:"_1x62fhb2"}},defaultVariants:{},compoundVariants:[]});import{classNames as Hy}from"@baseline-ui/utils";import Dy from"react";import{mergeProps as Vy,useFocusRing as Oy,useTabPanel as Ey}from"react-aria";import{jsx as Ay}from"react/jsx-runtime";var _n=({state:e,...a})=>{let r=Dy.useRef(null),{tabPanelProps:o}=Ey(a,e,r),{selectedItem:s}=e,{focusProps:t,isFocusVisible:i}=Oy();if(!s?.value)return null;let{className:n,style:l,"data-blockid":p}=s.value;return Ay("div",{...Vy(o,t),ref:r,className:Hy({[gn]:i},n),"data-blockid":p,style:l,children:s?.props.children})};import{jsx as Pe,jsxs as Go}from"react/jsx-runtime";var Wo=Ko.forwardRef(({className:e,style:a,tabHeaderStyle:r,tabHeaderClassName:o,variant:s="primary",actions:t,onRemove:i,...n},l)=>{let p=Zy({...n,selectedKey:n.selectedValue,defaultSelectedKey:n.defaultSelectedValue,disabledKeys:n.disabledValues}),d=Ko.useRef(null),{tabListProps:m}=Xy({...n,selectedKey:n.selectedValue,defaultSelectedKey:n.defaultSelectedValue,disabledKeys:n.disabledValues},p,d);return Go("div",{className:e,style:a,ref:l,children:[Go("div",{className:xn(hn({variant:s}),o),style:r,children:[Pe("div",{...m,className:bn({variant:s}),ref:d,children:[...p.collection].map(c=>(Cn(c.value,"TabItem requires a value prop"),Pe(zn,{item:c,state:p,onRemove:i,variant:s},c.key)))}),t?.map((c,f)=>Pe("div",{className:fn,children:Pe(w,{...c,variant:"secondary",size:"sm",className:xn(vn,c.className)})},f))]}),Pe(_n,{state:p},p.selectedItem?.key)]})});Wo.displayName="TabsBase";var zn=({item:e,onRemove:a,state:r,variant:o})=>{let{key:s,value:t}=e,i=Ko.useRef(null),{tabProps:n,isSelected:l,isDisabled:p}=Wy({key:s},r,i),{hoverProps:d,isHovered:m}=Ky({});Cn(t,"TabButton requires a value prop");let{title:c,icon:f}=t,{focusProps:y,isFocusVisible:b,isFocused:v}=Uy(),{keyboardProps:g}=Gy({onKeyDown:h=>{h.key==="Backspace"&&a?a(s):h.continuePropagation()}});return Go("div",{...qy(g,n,d,y),className:yn({isHovered:m,isSelected:l,isFocusVisible:b,isDisabled:p,variant:o}),ref:i,children:[f&&Pe(f,{size:20}),c,a&&Pe(w,{variant:"secondary",elementType:"div",icon:jy,size:"xxs",onPress:()=>a(s),excludeFromTabOrder:!0,UNSAFE_NON_INTERACTIVE:!0,style:{display:"inline-flex",color:"inherit",opacity:l||v||m?1:0}})]})};zn.displayName="TabButton";import{jsx as Pn}from"react/jsx-runtime";var kn=Xo.forwardRef(({children:e,...a},r)=>{let o=Yy(()=>Xo.Children.map(e,s=>!s||!Xo.isValidElement(s)||typeof s.type=="string"?null:{...s.props,id:s.props.value}).filter(Boolean),[e]);return Pn(Wo,{...a,ref:r,items:o,children:s=>Pn(Qy,{title:s.title,children:s.children},s.key)})});kn.displayName="Tabs";import{invariant as Zo}from"@baseline-ui/utils";var Rn=({children:e,title:a,value:r})=>(Zo(r,"TabItem requires a value prop"),Zo(a,"TabItem requires a title prop"),Zo(e,"TabItem requires children"),e);Rn.displayName="TabItem";import{CheckFilledIcon as $y,CloseIcon as Jy,ErrorAltFilledIcon as eb,InfoFilledIcon as rb,WarningFilledIcon as ob}from"@baseline-ui/icons/16";import{CheckFilledIcon as tb,ErrorAltFilledIcon as ab,InfoFilledIcon as sb,WarningFilledIcon as ib}from"@baseline-ui/icons/20";import nb from"react";import{classNames as lb}from"@baseline-ui/utils";var wn=u({defaultClassName:"kfun6yw",variantClassNames:{arrangement:{single:"kfun6yx",multi:"kfun6yy",compact:"kfun6yz"}},defaultVariants:{},compoundVariants:[]}),Nn=u({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"]]}),In=u({defaultClassName:"kfun6yt",variantClassNames:{size:{sm:"kfun6yu",md:"kfun6yv"}},defaultVariants:{},compoundVariants:[]}),Tn=u({defaultClassName:"kfun6yp",variantClassNames:{arrangement:{single:"kfun6yq",multi:"kfun6yr",compact:"kfun6ys"}},defaultVariants:{},compoundVariants:[]}),Sn=u({defaultClassName:"kfun6yk",variantClassNames:{variant:{info:"kfun6yl",warning:"kfun6ym",error:"kfun6yn",success:"kfun6yo"}},defaultVariants:{},compoundVariants:[]}),Ln=u({defaultClassName:"kfun6yh",variantClassNames:{size:{sm:"kfun6yi",md:"kfun6yj"}},defaultVariants:{},compoundVariants:[]}),Mn=u({defaultClassName:"kfun6yd z9nup82",variantClassNames:{arrangement:{single:"kfun6ye",multi:"kfun6yf",compact:"kfun6yg"}},defaultVariants:{},compoundVariants:[]});import{jsx as sr,jsxs as Kr}from"react/jsx-runtime";var pb={error:{sm:eb,md:ab},info:{sm:rb,md:sb},success:{sm:$y,md:tb},warning:{sm:ob,md:ib}},Fn=nb.forwardRef(({className:e,description:a,actionLabel:r,onAction:o,style:s,variant:t="info",title:i,arrangement:n="single",onClose:l,size:p="sm"},d)=>{let m=j(G),c=r&&sr(Z,{variant:n==="compact"?"tertiary":"ghost",label:r,onPress:o}),f=pb[t][p];return Kr("div",{className:lb(Nn({variant:t,arrangement:n,hasButton:!!r||!!l,hasCloseButton:!!l}),e),style:s,role:"alert",ref:d,children:[Kr("div",{className:Mn({arrangement:n}),children:[sr(f,{className:Sn({variant:t}),size:16}),Kr("div",{className:wn({arrangement:n}),children:[sr("h3",{className:Ln({size:p}),children:i}),sr("section",{className:In({size:p}),children:a})]}),n==="compact"&&c]}),Kr("div",{className:Tn({arrangement:n}),children:[n!=="compact"&&c,l&&sr(w,{variant:"secondary",icon:Jy,size:"sm",onPress:l,"aria-label":m.formatMessage("close")})]})]})});Fn.displayName="InlineAlert";import{classNames as cb}from"@baseline-ui/utils";import{mergeRefs as db}from"@react-aria/utils";import Yo from"react";import{useDialog as mb}from"react-aria";var Bn=u({defaultClassName:"cjv3et0 _1yep5z6aj _1yep5z6ar _1yep5z6az _1yep5z6b7 _1yep5z6e0 _1yep5z6bf",variantClassNames:{size:{sm:"cjv3et1",md:"cjv3et2",lg:"cjv3et3",content:"cjv3et4"},variant:{primary:"cjv3et5 _1yep5z6ex",ghost:"cjv3et6"}},defaultVariants:{},compoundVariants:[]});import{jsx as Hn}from"react/jsx-runtime";var Qo=Yo.createContext({titleProps:{}}),Gr=Yo.forwardRef(({children:e,className:a,style:r,size:o="md",variant:s="primary",...t},i)=>{let n=Yo.useRef(null),{dialogProps:l,titleProps:p}=mb(t,n);return Hn(Qo.Provider,{value:{titleProps:p},children:Hn("div",{...l,ref:db(n,i),style:r,className:cb(Bn({size:o,variant:s}),a),children:e})})});Gr.displayName="Dialog";import{Slot as ub}from"@radix-ui/react-slot";import Dn,{useContext as fb}from"react";import{jsx as yb}from"react/jsx-runtime";var Vn=Dn.forwardRef(({children:e,className:a,style:r},o)=>{let{titleProps:s}=fb(Qo),t=Dn.isValidElement(e)?ub:"h3";return yb(t,{...s,ref:o,className:a,style:r,children:e})});Vn.displayName="DialogTitle";import{sprinkles as iv}from"@baseline-ui/tokens";import{parseColor as nv}from"@react-stately/color";import Jr,{useCallback as lv,useMemo as pt}from"react";import{classNames as ct}from"@baseline-ui/utils";import{VisuallyHidden as pv,mergeProps as cv,useId as dv,useOverlayTrigger as mv}from"react-aria";import{useOverlayTriggerState as uv}from"react-stately";import{MinusIcon as Cb,PlusIcon as zb}from"@baseline-ui/icons/20";import{sprinkles as Pb}from"@baseline-ui/tokens";import{classNames as al,invariant as kb}from"@baseline-ui/utils";import Rb,{useCallback as wb,useEffect as Nb}from"react";import{parseColor as Ib}from"@react-stately/color";import{useId as Tb}from"react-aria";var On="_1dbkl5q",En="_1yep5z6g7 _1yep5z6g8 _1yep5z6g9 _1yep5z6gg _1yep5z6gh _1yep5z6gi _1yep5z69l _1yep5z69m _1yep5z69n _1yep5z6gy _1yep5z6gz _1yep5z6h0 _1yep5z6hy _1yep5z6hz _1yep5z6i0",An=u({defaultClassName:"_1dbkl54 _1yep5z66 _1yep5z67 _1yep5z68 _1yep5z62i _1yep5z62j _1yep5z62k _1yep5z63o _1yep5z63p _1yep5z63q _1yep5z61c _1yep5z61d _1yep5z61e _1yep5z6ai _1yep5z6aq _1yep5z6ay _1yep5z6b6 _1yep5z6g7 _1yep5z6g8 _1yep5z6g9 _1yep5z6gg _1yep5z6gh _1yep5z6gi _1yep5z6jd _1yep5z6j5 _1yep5z69i _1yep5z69j _1yep5z69k _1yep5z6d2 _1yep5z6j4 _1yep5z6c6",variantClassNames:{isHovered:{true:"_1dbkl55"},isFocusVisible:{true:"_1dbkl56"},isDisabled:{true:"z9nup83 _1yep5z6wo"},labelPosition:{top:"_1dbkl58",start:"_1dbkl59"}},defaultVariants:{},compoundVariants:[]}),jn=u({defaultClassName:"_1dbkl50 _1yep5z6g7 _1yep5z6g8 _1yep5z6g9 _1yep5z6c6 _1yep5z6d3",variantClassNames:{labelPosition:{top:"_1yep5z6lx _1yep5z6ly _1yep5z6lz",start:"_1dbkl52"}},defaultVariants:{},compoundVariants:[]}),Wr="_1dbkl5o _1yep5z6gd _1yep5z6ge _1yep5z6gf _1yep5z69f _1yep5z69g _1yep5z69h",qn="_1dbkl5a z9nup87",Xr="_1dbkl5p _1yep5z6ao _1yep5z6aw _1yep5z6b4 _1yep5z6bc _1yep5z6fs _1yep5z6ft _1yep5z6fu",Un=u({defaultClassName:"_1dbkl5c _1yep5z6ao _1yep5z6aw _1yep5z6b4 _1yep5z6bc _1yep5z6fs _1yep5z6ft _1yep5z6fu _1yep5z6j4 _1yep5z6iz",variantClassNames:{isFocusVisible:{true:"_1dbkl5d _1dbkl5b"},isDisabled:{true:"_1yep5z6v0"},removeBlendMode:{true:"_1dbkl5f"},isSelected:{true:"_1dbkl5b"},isHovered:{true:"_1dbkl5b"}},defaultVariants:{},compoundVariants:[]}),Kn="_1dbkl5n _1yep5z66 _1yep5z67 _1yep5z68 _1yep5z62i _1yep5z62j _1yep5z62k _1yep5z63o _1yep5z63p _1yep5z63q _1yep5z61c _1yep5z61d _1yep5z61e _1yep5z6j5",Zr="_1dbkl5i _1yep5z6ao _1yep5z6aw _1yep5z6b4 _1yep5z6bc _1yep5z6iv _1yep5z6iw _1yep5z6iy _1yep5z6ix _1yep5z6fv _1yep5z6fw _1yep5z6fx _1yep5z6g7 _1yep5z6g8 _1yep5z6g9 _1yep5z6gy _1yep5z6gz _1yep5z6h0 _1yep5z6hs _1yep5z6ht _1yep5z6hu",Gn="_1yep5z63r _1yep5z63s _1yep5z63t _1yep5z619 _1yep5z61a _1yep5z61b _1yep5z6g7 _1yep5z6g8 _1yep5z6g9 _1yep5z6gg _1yep5z6gh _1yep5z6gi _1yep5z6hy _1yep5z6hz _1yep5z6i0 _1yep5z6c6 _1yep5z6d3 _1yep5z69l _1yep5z69m _1yep5z69n _1yep5z6gy _1yep5z6gz _1yep5z6h0",Wn=u({defaultClassName:"_1dbkl5k _1yep5z63 _1yep5z64 _1yep5z65 _1yep5z62f _1yep5z62g _1yep5z62h _1yep5z6e0",variantClassNames:{includesCustomColorPicker:{true:"_1yep5z6kl _1yep5z6km _1yep5z6kn"}},defaultVariants:{},compoundVariants:[]}),$o="_1dbkl5z _1yep5z6g7 _1yep5z6g8 _1yep5z6g9 _1yep5z6gg _1yep5z6gh _1yep5z6gi",Xn="_1dbkl53",Zn=u({defaultClassName:"_1dbkl5u _1yep5z66 _1yep5z67 _1yep5z68 _1yep5z62i _1yep5z62j _1yep5z62k _1yep5z63o _1yep5z63p _1yep5z63q _1yep5z61c _1yep5z61d _1yep5z61e _1yep5z6ai _1yep5z6ay _1yep5z6ax _1yep5z6bd _1yep5z6g7 _1yep5z6g8 _1yep5z6g9 _1yep5z6gg _1yep5z6gh _1yep5z6gi _1yep5z6gy _1yep5z6gz _1yep5z6h0 _1yep5z6je _1yep5z6ex _1yep5z6j5 _1yep5z6d2 _1yep5z6c6",variantClassNames:{isFocused:{true:"_1dbkl5v _1yep5z6yc"},isHovered:{true:"_1dbkl5w"},allowAlpha:{false:"_1yep5z6u8 _1yep5z6uo _1yep5z612k"}},defaultVariants:{},compoundVariants:[[{isHovered:!0,isFocused:!1},"_1yep5z61hy"]]}),ir="_1dbkl5y",Yn="_1dbkl5j _1yep5z6aj _1yep5z6ar _1yep5z6az _1yep5z6b7 _1yep5z6bf",Yr="_1dbkl5m _1yep5z69 _1yep5z6a _1yep5z6b _1yep5z62l _1yep5z62m _1yep5z62n _1yep5z63r _1yep5z63s _1yep5z63t _1yep5z61f _1yep5z61g _1yep5z61h _1yep5z6g7 _1yep5z6g8 _1yep5z6g9 _1yep5z6gj _1yep5z6gk _1yep5z6gl _1yep5z69f _1yep5z69g _1yep5z69h",Jo="_1dbkl511",Qn="_1dbkl510",et="_1yep5z69 _1yep5z6a _1yep5z6b _1yep5z62l _1yep5z62m _1yep5z62n _1yep5z63r _1yep5z63s _1yep5z63t _1yep5z61f _1yep5z61g _1yep5z61h _1yep5z6g7 _1yep5z6g8 _1yep5z6g9 _1yep5z6gj _1yep5z6gk _1yep5z6gl _1yep5z69l _1yep5z69m _1yep5z69n",Qr=u({defaultClassName:"_1dbkl5r _1yep5z6ao _1yep5z6aw _1yep5z6b4 _1yep5z6bc _1yep5z6j9 _1yep5z6fv _1yep5z6fw _1yep5z6fx _1yep5z6je _1yep5z6jh",variantClassNames:{isFocusVisible:{true:"_1dbkl5s _1yep5z612o _1yep5z6z1 _1yep5z612q"}},defaultVariants:{},compoundVariants:[]}),rt="z9nup84 z9nup86 _1yep5z6ao _1yep5z6aw _1yep5z6b4 _1yep5z6bc _1yep5z6iv _1yep5z6iw _1yep5z6iy _1yep5z6ix _1yep5z6fv _1yep5z6fw _1yep5z6fx";import{invariant as xb}from"@baseline-ui/utils";import{parseColor as ot}from"@react-stately/color";import{NoneIcon as bb}from"@baseline-ui/icons/16";import{classNames as $n}from"@baseline-ui/utils";import{parseColor as vb}from"@react-stately/color";import{useHover as gb}from"react-aria";import{Fragment as hb,jsx as nr,jsxs as _b}from"react/jsx-runtime";var ke=({color:e,isFocusVisible:a,isDisabled:r,isSelected:o,isPresentational:s})=>{let t=e&&e!==se&&vb(e),i=t&&t.getChannelValue("alpha")===0,{hoverProps:n,isHovered:l}=gb({isDisabled:r});return nr("div",{...n,className:$n(Un({removeBlendMode:!t,isFocusVisible:a,isDisabled:r,isSelected:o,isHovered:l&&!s&&!r}),{[Ze({size:"xs"})]:i}),children:t?_b(hb,{children:[nr("div",{className:$n(Zr,Ze({size:"xs"}))}),nr("div",{className:Zr,style:{backgroundColor:i?void 0:t.toString("hexa")}})]}):nr("div",{className:Zr,children:nr(bb,{size:14})})})};import{jsx as Jn}from"react/jsx-runtime";var el=[{id:"hex",label:"HEX"},{id:"rgb",label:"RGB"}],ie=ot("#000000").toFormat("hsla"),V="hsla",lr="hexa";function Ee(e){return typeof e=="string"?ot(e).toFormat(V):e?e.toFormat(V):null}function rl(e,a){return e?.getChannelValue("alpha")?a?.toString(lr)===e.toString(lr):!a?.getChannelValue("alpha")}function ol(e,a,r){return a?a.label:e?.getChannelValue("alpha")===0?r:e?.toString("rgba")}var se="NONE";function tl(e,a){let r=a?.map(s=>({id:ot(s.color).toString(lr),label:s.label}))||[],o={id:se,label:e};return[...r,o]}var $r=(e,{optionProps:a,isFocusVisible:r,isSelected:o},s)=>(xb(e.value&&"label"in e.value,"Item must have label"),Jn("li",{...a,ref:s,"aria-label":e.value?.label||void 0,className:Kn,children:Jn(ke,{color:e.value.id,isFocusVisible:r,isSelected:o})}));import{Fragment as Sb,jsx as pr,jsxs as tt}from"react/jsx-runtime";var sl=({color:e,setColor:a,storePickedColorKey:r,addColorButtonLabel:o,removeColorButtonLabel:s,customColorsLabel:t})=>{let[i,n]=ks(r,[]),l=Rb.useRef(null),p=wb(()=>{if(i.includes(e.toString(V))){l.current?.querySelector(`[data-key='${e.toString(V)}']`)?.classList.add(Jo);return}n([...i,e.toString(V)])},[i,e,n]);Nb(()=>{let m=l.current;function c(f){f.animationName===Qn&&f.target?.classList.remove(Jo)}return m?.addEventListener("animationend",c),()=>{m?.removeEventListener("animationend",c)}},[]);let d=Tb();return tt(Sb,{children:[pr(E,{}),tt("div",{className:al(Gn,"BaselineUI-ColorInput-CustomColors"),children:[pr("span",{id:d,children:t}),tt("div",{children:[!!i.length&&i.includes(e.toString(V))&&pr(w,{variant:"secondary",size:"md",elementType:"div",icon:Cb,"aria-label":s,onPress:()=>{n(i.filter(m=>m!==e.toString(V)))}}),pr(w,{variant:"secondary",size:"md","aria-label":o,icon:zb,onPress:p})]})]}),!!i.length&&pr(le,{items:i.map(m=>({id:m,label:m,description:m})),layout:"grid","aria-labelledby":d,className:al(Wr,Yr,Pb.variants({paddingTop:"xs"}),"BaselineUI-ColorInput-CustomColorsListBox"),renderOption:$r,ref:l,autoFocus:!1,selectionMode:"single",selectedKeys:[e.toString(V)],onSelectionChange:m=>{kb(m instanceof Set,"Key must be a set");let c=[...m][0];c&&a(Ib(c).toFormat(V))}})]})};import{classNames as il}from"@baseline-ui/utils";import{useColorField as Lb}from"@react-aria/color";import Mb,{useCallback as Fb}from"react";import{useColorFieldState as Bb}from"@react-stately/color";import{mergeProps as Hb,useFocusRing as Db,useHover as Vb,useLocale as nl}from"react-aria";import{jsx as Re,jsxs as dl}from"react/jsx-runtime";var ll=({color:e,setColor:a,allowAlpha:r,...o})=>{let s=Bb({value:e,onChange:m=>{a(Ee(m)?.toFormat(V).withChannelValue("alpha",e.getChannelValue("alpha")??1)||ie)}}),t=Mb.useRef(null),{inputProps:i}=Lb({...o,"aria-label":"Hex"},s,t),{focusProps:n,isFocused:l}=Db({isTextInput:!0}),{hoverProps:p,isHovered:d}=Vb({});return dl("div",{className:il($o,"BaselineUI-ColorInput-FieldInput"),"data-color-mode":r?"hexa":"hex",children:[Re("input",{...Hb(i,n,p),ref:t,className:Zn({isFocused:l,isHovered:d,allowAlpha:r})}),r&&Re(cl,{color:e,setColor:a})]})},pl=({color:e,setColor:a,allowAlpha:r})=>{let o=e.toFormat("rgba"),{locale:s}=nl();return dl("div",{className:il($o,"BaselineUI-ColorInput-FieldInput"),"data-color-mode":r?"rgba":"rgb",children:[Re(te,{"aria-label":e.getChannelName("red",s),value:o.getChannelValue("red"),showStepper:!1,className:ir,onChange:t=>{a(o.withChannelValue("red",t).toFormat(V))},step:1,minValue:0,maxValue:255}),Re(te,{"aria-label":e.getChannelName("green",s),value:o.getChannelValue("green"),showStepper:!1,className:ir,onChange:t=>{a(o.withChannelValue("green",t).toFormat(V))},step:1,minValue:0,maxValue:255}),Re(te,{"aria-label":e.getChannelName("blue",s),value:o.getChannelValue("blue"),showStepper:!1,className:ir,onChange:t=>{a(o.withChannelValue("blue",t).toFormat(V))},step:1,minValue:0,maxValue:255}),r&&Re(cl,{color:e,setColor:a})]})},Ob={style:"percent",maximumFractionDigits:0},cl=({color:e,setColor:a})=>{let{locale:r}=nl(),o=Fb(s=>{a(e.withChannelValue("alpha",s))},[e,a]);return Re(te,{"aria-label":e.getChannelName("alpha",r),value:e.getChannelValue("alpha"),formatOptions:Ob,className:ir,showStepper:!1,onChange:o,minValue:0,maxValue:1})};import{classNames as ml}from"@baseline-ui/utils";import{useColorArea as Eb}from"@react-aria/color";import{useColorAreaState as Ab}from"@react-stately/color";import at,{useEffect as jb}from"react";import{useFocusRing as qb}from"react-aria";import{jsx as st,jsxs as ul}from"react/jsx-runtime";var fl=({value:e,...a})=>{let r=at.useRef(null),o=at.useRef(null),s=at.useRef(null),t=Ab({...a,value:e}),{colorAreaProps:i,gradientProps:n,xInputProps:l,yInputProps:p,thumbProps:d}=Eb({...a,value:e,inputXRef:r,inputYRef:o,containerRef:s},t);jb(()=>{r.current?.focus()},[]);let{focusProps:m,isFocusVisible:c}=qb();return ul("div",{ref:s,...i,className:ml(On,"BaselineUI-ColorInput-ColorArea"),children:[st("div",{...n,className:Xn}),ul("div",{...d,className:ml(Qr({isFocusVisible:c}),"BaselineUI-ColorInput-ColorAreaThumb"),style:{...d.style,transform:"translate(-50%, -50%)",backgroundColor:Ee(e)?.withChannelValue("alpha",1).toString("css")},children:[st("input",{ref:r,...l,...m}),st("input",{ref:o,...p,...m})]})]})};import{classNames as yl}from"@baseline-ui/utils";import{useColorSlider as Ub}from"@react-aria/color";import{useColorSliderState as Kb}from"@react-stately/color";import bl from"react";import{VisuallyHidden as Gb,useFocusRing as Wb,useLocale as Xb}from"react-aria";import{jsx as Ae,jsxs as vl}from"react/jsx-runtime";var it=({channel:e,...a})=>{let{locale:r}=Xb(),o=Kb({...a,channel:e,locale:r}),s=bl.useRef(null),t=bl.useRef(null),{trackProps:i,thumbProps:n,inputProps:l}=Ub({...a,channel:e,trackRef:s,inputRef:t,"aria-label":o.value.getChannelName(e,r)},o),{focusProps:p,isFocusVisible:d}=Wb();return vl("div",{className:yl(Xr,{[Ze({size:"xs"})]:e==="alpha"},"BaselineUI-ColorInput-ColorSlider"),"data-channel":e,...i,ref:s,children:[e==="alpha"&&Ae("div",{className:rt}),Ae("div",{className:Xr,style:i.style}),vl("div",{className:yl(Qr({isFocusVisible:d}),"BaselineUI-ColorInput-ColorSliderThumb"),...n,children:[Ae("div",{className:rt,style:{backgroundColor:"#ffffff"}}),Ae("div",{style:{backgroundColor:o.getDisplayColor().toString("css"),height:8},className:Xr}),Ae(Gb,{children:Ae("input",{ref:t,...l,...p})})]})]})};import{classNames as Zb,invariant as Yb}from"@baseline-ui/utils";import Qb,{useCallback as $b}from"react";import{parseColor as Jb}from"@react-stately/color";import{jsx as gl}from"react/jsx-runtime";var nt=Qb.forwardRef(({setColor:e,color:a,triggerRef:r,autoFocus:o,presets:s,state:t},i)=>{let{formatMessage:n}=j(G),l=$b(p=>{if(p instanceof Set&&p.size){let d=[...p][0],m=s.find(c=>c.id===d);Yb(m,"Preset not found"),e(m.id===se?null:Jb(m.id).toFormat(V)),t.close()}},[t,s,e]);return gl("div",{className:Zb(Yr,"BaselineUI-ColorInput-Presets"),style:{minWidth:r.current?.offsetWidth},ref:i,children:gl(le,{autoFocus:o,items:s,layout:"grid","aria-label":n("colorPresets"),className:Wr,renderOption:$r,selectionMode:"single",selectedKeys:[a?.toString(lr)||se],onSelectionChange:l})})});nt.displayName="ColorPresetList";import{mergeRefs as ev}from"@react-aria/utils";import hl from"react";import{mergeProps as rv,useButton as ov,useFocusRing as tv,useHover as av}from"react-aria";import{jsx as sv}from"react/jsx-runtime";var lt=hl.forwardRef((e,a)=>{let r=hl.useRef(null),{hoverProps:o,isHovered:s}=av({isDisabled:e.isDisabled}),{buttonProps:t}=ov(e,r),{isFocusVisible:i,focusProps:n}=tv();return sv("button",{...rv(t,o,n),className:An({isHovered:s,isFocusVisible:i||e.isOpen,isDisabled:e.isDisabled,labelPosition:e.labelPosition}),ref:ev(a,r),children:e.children})});lt.displayName="ColorInputButton";import{Fragment as dt,jsx as q,jsxs as ve}from"react/jsx-runtime";var _l=Jr.forwardRef(({className:e,style:a,allowRemoval:r,allowAlpha:o=!0,presets:s,labelPosition:t="top",colorLabel:i=!0,includePicker:n=!0,onChange:l,defaultValue:p,storePickedColor:d=!0,storePickedColorKey:m="baselinePickedColor",value:c,addColorButtonLabel:f,removeColorButtonLabel:y,customColorsLabel:b,renderTriggerButton:v,"data-blockid":g,...h},_)=>{let P=Jr.useRef(null),z=uv(h),{triggerProps:F,overlayProps:S}=mv({type:"listbox"},z,P),[x,R]=Jr.useState(Ee(c||p)),[N,I]=Jr.useState("hex"),{formatMessage:k}=j(G),L=pt(()=>tl(k("noColor"),s),[s,k]),H=pt(()=>L.find(M=>M.id===se?!x:x?rl(x,nv(M.id)):!1),[L,x]),D=dv(),re=pt(()=>typeof i=="function"?i?.(x):i?ol(x,H,k("transparent")):!1,[x,i,k,H]),Q=L.filter(M=>r||M.id!==se),U=lv(M=>{c||R(M),l?.(M?.toFormat("rgba")||null)},[c,l,R]);return ve(dt,{children:[ve("div",{className:ct({[En]:t==="start"},"BaselineUI-ColorInput-Trigger",e),"data-blockid":g,style:a,ref:_,children:[h.label&&q("label",{id:D,className:jn({labelPosition:t}),children:h.label}),v?.({isOpen:z.isOpen,color:x,ref:P,colorName:re,triggerProps:F})||ve(lt,{...cv(F,{...h.label?{"aria-labelledby":D}:{"aria-label":h["aria-label"]}}),ref:P,isOpen:z.isOpen,isDisabled:h.isDisabled,labelPosition:t,children:[q(ke,{isPresentational:!0,color:x?.toString("hexa")}),i?q("div",{className:qn,children:re}):q(pv,{children:re})]})]}),z.isOpen&&q(ae,{placement:t==="start"?"bottom end":"bottom start",state:z,offset:2,className:ct(Yn,"BaselineUI-ColorInput-Popover"),triggerRef:P,overlayProps:S,children:ve(Gr,{size:"content",className:Wn({includesCustomColorPicker:n}),"aria-labelledby":D,children:[n&&ve(dt,{children:[q(fl,{value:x||ie,xChannel:"saturation",yChannel:"lightness",onChange:U}),ve("div",{className:et,children:[q(it,{channel:"hue",value:x||ie,onChange:U}),o&&q(it,{channel:"alpha",value:x||ie,onChange:U})]}),ve("div",{className:ct(et,iv.variants({paddingTop:"none",gap:"sm"})),children:[q(Ur,{label:k("colorFormat"),labelPosition:"start",variant:"ghost",items:el,selectedKey:N,onSelectionChange:M=>I(M)}),N==="hex"&&q(ll,{color:x||ie,setColor:U,allowAlpha:o}),N==="rgb"&&q(pl,{color:x||ie,setColor:U,allowAlpha:o})]}),d&&q(sl,{color:x||ie,setColor:U,storePickedColorKey:m,addColorButtonLabel:f||k("addColor"),removeColorButtonLabel:y||k("removeColor"),customColorsLabel:b||k("customColors")})]}),!!Q.length&&ve(dt,{children:[n&&q(E,{}),q(nt,{autoFocus:n?!1:"first",state:z,triggerRef:P,presets:Q,color:x,setColor:U})]})]})})]})});_l.displayName="ColorInput";import{RedoIcon as vv,UndoIcon as gv}from"@baseline-ui/icons/16";import{classNames as mt,getSvgPathFromStroke as hv,invariant as _v}from"@baseline-ui/utils";import{clamp as Nl,mergeRefs as xv}from"@react-aria/utils";import{useGranularEffect as Cv}from"granular-hooks";import{getStroke as to}from"perfect-freehand";import je,{useCallback as ut}from"react";import{VisuallyHidden as zv,mergeProps as Pv,useFocusRing as kv,useHover as Rv,useId as wv,useKeyboard as Nv,useLabel as Iv}from"react-aria";var eo=u({defaultClassName:"mnnh5s1",variantClassNames:{isInline:{true:"mnnh5s2",false:"mnnh5s3"},isHovered:{true:"mnnh5s4"},hasLoadedImage:{true:"mnnh5s5"},includeCheckeredBackground:{true:"mnnh5s6"},showFocusRing:{true:"mnnh5s7"},isDisabled:{true:"mnnh5s8 z9nup83"}},defaultVariants:{},compoundVariants:[[{isHovered:!0,hasLoadedImage:!1},"mnnh5s9"],[{isInline:!0,isDisabled:!0},"mnnh5sa"],[{hasLoadedImage:!0,includeCheckeredBackground:!0},"mnnh5sb"]]}),xl=u({defaultClassName:"mnnh5sh",variantClassNames:{isInline:{true:"mnnh5si",false:"mnnh5sj"}},defaultVariants:{},compoundVariants:[]}),Cl="mnnh5sk",ro=u({defaultClassName:"mnnh5sc",variantClassNames:{isInline:{true:"mnnh5sd",false:"mnnh5se"},isDisabled:{true:"mnnh5sf"},hasLoadedImage:{true:"mnnh5s0"}},defaultVariants:{},compoundVariants:[]});var zl=u({defaultClassName:"_1i0ytqa3",variantClassNames:{isFocusVisible:{true:"_1i0ytqa4"},isInline:{true:"_1i0ytqa5",false:"_1i0ytqa6"},isDisabled:{true:"_1i0ytqa7 z9nup83"}},defaultVariants:{},compoundVariants:[[{isInline:!0,isFocusVisible:!0},"_1i0ytqa8"],[{isInline:!1,isFocusVisible:!0},"_1i0ytqa9"],[{isInline:!0,isDisabled:!0},"_1i0ytqaa"],[{isInline:!1,isDisabled:!0},"_1i0ytqab"]]}),Pl="_1i0ytqa0",kl=u({defaultClassName:"_1i0ytqac",variantClassNames:{isInline:{false:"_1i0ytqad"},isDisabled:{true:"_1i0ytqae z9nup83"}},defaultVariants:{},compoundVariants:[]}),Rl=u({defaultClassName:"_1i0ytqa1 z9nup82",variantClassNames:{isInline:{false:"_1i0ytqa2"}},defaultVariants:{},compoundVariants:[]});import fv from"react";import{classNames as yv}from"@baseline-ui/utils";var wl=u({defaultClassName:"_1tkzayn0 _1yep5z6c6",variantClassNames:{size:{sm:"_1tkzayn1",md:"_1tkzayn2",lg:"_1tkzayn3"},type:{subtitle:"_1yep5z6wk",title:"_1yep5z6wk",body:"_1yep5z6wl",value:"_1yep5z6wl",helper:"_1yep5z6wm"}},defaultVariants:{},compoundVariants:[[{type:"title",size:"sm"},"_1yep5z61el"],[{type:"title",size:"md"},"_1yep5z61eo"],[{type:"title",size:"lg"},"_1yep5z61er"],[{type:"subtitle",size:"sm"},"_1yep5z61f7"],[{type:"subtitle",size:"md"},"_1yep5z61fa"],[{type:"subtitle",size:"lg"},"_1yep5z61fa"],[{type:"body",size:"md"},"_1yep5z61f9"],[{type:"body",size:"lg"},"_1yep5z61f9"],[{type:"value",size:"md"},"_1yep5z61f9"],[{type:"value",size:"lg"},"_1yep5z61f9"],[{type:"helper",size:"sm"},"_1yep5z61f3"]]});import{jsx as bv}from"react/jsx-runtime";var oo=fv.forwardRef(({elementType:e="span",type:a="title",children:r,size:o="md",...s},t)=>bv(e,{...s,className:yv(wl({size:o,type:a}),"BaselineUI-Text",s.className),ref:t,children:r}));oo.displayName="Text";import{jsx as Y,jsxs as ao}from"react/jsx-runtime";var Tv={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},Il=je.forwardRef(({className:e,style:a,canvasClassName:r,canvasStyle:o,isBound:s=!0,strokeWidth:t=2,strokeColor:i="#3A87FD",onChange:n,defaultValue:l,onChangeEnd:p,enableHistory:d=!1,isInline:m=!0,isDisabled:c,placeholder:f,clearLabel:y,undoLabel:b,redoLabel:v,footerClassName:g,footerStyle:h,"data-blockid":_,description:P="This is a canvas for drawing using a mouse or touch input.",...z},F)=>{let S=j(G),x=je.useRef(null),[R,N]=je.useState(l?Sv(l):[]),I=je.useRef((l?.length||0)-1),[k,L]=je.useState(),H=wv(),{labelProps:D,fieldProps:re}=Iv({...z,labelElementType:"span"}),{isFocusVisible:Q,focusProps:U}=kv({within:!0}),{hoverProps:M,isHovered:$}=Rv({isDisabled:c}),{undo:O,redo:we,canRedo:J,canUndo:K,push:ne}=Cs(R,{onAction:C=>{C&&(N(C),I.current=C.length-1,p?.(C.map(X=>to(X,W))))},isDisabled:!d}),{keyboardProps:Ne}=Nv({onKeyDown:C=>{C.key==="Backspace"?fr():C.key==="z"&&(C.metaKey||C.ctrlKey)&&(C.shiftKey?J&&we():K&&O())}}),W=je.useMemo(()=>({...Tv,...z}),[z]),A=ut(C=>{C.persist(),C.buttons===1&&(_v(k,"svgCoordinates must be defined"),N(X=>{let he=[...X];return he[I.current]=[...he[I.current],{x:s?Nl(C.clientX-k.left,0,k.width):C.clientX-k.left,y:s?Nl(C.clientY-k.top,0,k.height):C.clientY-k.top,pressure:C.pressure}],he}))},[k,s]),B=ut(C=>{C.persist();let X=C.currentTarget.getBoundingClientRect();L(X),C.target.setPointerCapture(C.pointerId),I.current+=1,N(he=>{let yr=[...he];return yr[I.current]=[{x:C.clientX-X.x,y:C.clientY-X.y,pressure:C.pressure}],yr})},[]),ur=Ve();Cv(()=>{ur||n?.(R.map(C=>to(C,W)))},[R],[n,W,ur]);let fr=()=>{N([]),I.current=-1,ne([])},co=ut(()=>{p?.(R.map(C=>to(C,W))),ne(R)},[R,p,W,ne]);return ao("div",{ref:xv(x,F),className:mt(Pl,"BaselineUI-FreehandCanvas",e),style:a,"aria-disabled":c,"data-blockid":_,children:[(z.label||d)&&ao("div",{className:Rl({isInline:m}),children:[z.label?Y(oo,{type:"body",size:"sm",...D,children:z.label}):Y("span",{}),d&&ao("div",{children:[Y(w,{variant:"secondary",size:"sm",isDisabled:!K||c,icon:gv,onPress:O,"aria-label":b||S.formatMessage("undo")}),Y(w,{variant:"secondary",size:"sm",isDisabled:!J||c,icon:vv,onPress:we,"aria-label":v||S.formatMessage("redo")})]})]}),ao("div",{role:"application",...Pv(U,Ne,M,re),tabIndex:c?void 0:0,className:mt(eo({isInline:m,isHovered:$}),zl({isFocusVisible:Q,isInline:m,isDisabled:c}),r),"aria-describedby":z["aria-describedby"]||H,style:o,children:[Y(zv,{children:Y("div",{id:H,children:P})}),Y("svg",{width:o?.width||"100%",height:o?.height||"100%",onPointerDown:B,onPointerMove:A,onPointerUp:co,children:R.map((C,X)=>Y("path",{d:hv(to(C,W)),stroke:i,strokeWidth:t},X))})]}),(f||y)&&Y("div",{style:h,className:mt(kl({isInline:m,isDisabled:c}),g),children:(R.length||!f)&&y?Y(Z,{size:"sm",variant:"ghost",label:y,isDisabled:c,onPress:fr}):Y(Z,{size:"sm",variant:"ghost",label:f,isDisabled:!0})})]})});Il.displayName="FreehandCanvas";var Sv=e=>e.map(a=>a.map(([r,o])=>({x:r,y:o,pressure:0})));import{getOwnerDocument as Bv,mergeRefs as Hv}from"@react-aria/utils";import Dv,{useCallback as ft,useEffect as Vv,useLayoutEffect as Ov,useRef as yt,useState as cr}from"react";import{createPortal as Ev}from"react-dom";import{classNames as Av,getHTMLElement as jv}from"@baseline-ui/utils";import{useKeyboard as qv}from"react-aria";import{Draggable as Uv,Resizable as Kv,Rotatable as Gv,Snappable as Wv,makeMoveable as Xv}from"react-moveable";var Tl="_1vac7ws0",Sl=u({defaultClassName:"_1vac7ws1",variantClassNames:{isDragging:{true:"_1vac7ws2"}},defaultVariants:{},compoundVariants:[]});import{useGranularEffect as Ll}from"granular-hooks";import{useState as Lv}from"react";function Ml(e,a){let[r,o]=Lv([]),s=()=>e?.flatMap(t=>[...a.querySelectorAll(t)]).map(t=>({current:t}));return Ll(()=>{o(s())},[],[s]),Ll(()=>{let t=s();o(t)},[e],[s]),r}import{useEffect as Mv}from"react";import{getHTMLElement as Fv}from"@baseline-ui/utils";function Fl(e){let{scrollable:a,ownerDocument:r,onScroll:o}=e;Mv(()=>{let s=Fv(a,r);if(s)return(s.style.position==="static"||!s.style.position)&&console.warn("Scrollable ancestor passed to `Transform` component should not be statically positioned."),s.addEventListener("scroll",o),()=>{s.removeEventListener("scroll",o)}},[a,o,r])}import{Fragment as Yv,jsx as Bl,jsxs as Qv}from"react/jsx-runtime";var Zv=Xv([Uv,Kv,Gv,Wv]),Hl=Dv.forwardRef(({className:e,children:a,isRotatable:r,isResizable:o,isDraggable:s,style:t,onTransform:i,onTransformStart:n,onTransformEnd:l,onDoubleClick:p,onDragStart:d,onDragEnd:m,onDrag:c,onResizeStart:f,onResizeEnd:y,onResize:b,onRotateStart:v,onRotateEnd:g,onRotate:h,onSnap:_,isSnappable:P,elementGuidelines:z,hideAnchorOnDrag:F=!0,title:S,rotationPosition:x,autoUpdate:R,bound:N,snapRotationDegrees:I,snapRotationThreshold:k,scrollableAncestor:L,renderDirections:H,stopPropagation:D,transformOrigin:re,preventDefault:Q},U)=>{let M=yt(null),$=yt(null),[O,we]=cr(document),J=yt(O.createElement("div")),[K,ne]=cr({}),[Ne,W]=cr(!1),[A,B]=cr(!1),[ur,fr]=cr(),co=Ml(z,O);Ov(()=>{let T=J.current;return J.current=O.createElement("div"),()=>{T.remove()}},[O]);let{keyboardProps:C}=qv({onKeyDown:T=>{let oe=T.shiftKey?10:1,ee=T.metaKey||T.ctrlKey;ee&&T.shiftKey&&(oe=45);function _e(Ke,yp="x"){ee?$.current?.request("rotatable",{deltaRotate:Ke*oe},!0):$.current?.request("draggable",yp==="x"?{deltaX:Ke*oe}:{deltaY:Ke*oe},!0)}switch(T.key){case"ArrowRight":{_e(1);break}case"ArrowLeft":{_e(-1);break}case"ArrowUp":{_e(-1,"y");break}case"ArrowDown":_e(1,"y")}requestAnimationFrame(()=>{$.current?.updateRect()})}});Vv(()=>{let T=Bv(M.current);we(T);let oe=J.current;T.body.append(J.current);function ee(Ke){B(Ke.shiftKey)}function _e(){B(!1)}return T.addEventListener("keydown",ee),T.addEventListener("keyup",_e),()=>{T.removeEventListener("keydown",ee),T.removeEventListener("keyup",_e),oe.remove()}},[]),Fl({scrollable:L,onScroll:()=>{$.current?.updateRect()},ownerDocument:O});let X=ft(T=>{ne(oe=>({...oe,...T.style})),i?.(T)},[i]),he=ft(T=>{if(W(!0),M.current?.focus(),N){let ee=jv(N,O)?.getBoundingClientRect();fr({position:"client",left:ee?.left??0,top:ee?.top??0,right:ee?.right??0,bottom:ee?.bottom??0})}d?.(T)},[N,O,d]),yr=ft(T=>{W(!1),m?.(T)},[m]),fp=a({style:{...K.width&&{width:K.width},...K.height&&{height:K.height}}});return Qv(Yv,{children:[Bl("div",{role:"button",...C,ref:Hv(M,U),style:{display:"inline-block",...t,...K},className:Av(Tl,e),onDoubleClick:p,tabIndex:0,title:S,children:fp}),Ev(Bl(Zv,{ref:$,target:M,draggable:s,resizable:o,rotatable:r,keepRatio:A,throttleDrag:1,snappable:P||!!N,elementGuidelines:co,snapRenderThreshold:.9,className:Sl({isDragging:Ne&&F}),onRender:X,onDragStart:he,onDragEnd:yr,useResizeObserver:R,useMutationObserver:R,onRenderEnd:l,onDrag:c,onResizeStart:f,onResizeEnd:y,onResize:b,onRotateStart:v,onRotateEnd:g,onRotate:h,onRenderStart:n,onSnap:_,rotationPosition:x,bounds:ur,snapRotationDegrees:I,snapRotationThreshold:k,renderDirections:H,stopPropagation:D,preventDefault:Q,transformOrigin:re}),J.current)]})});Hl.displayName="Transform";import{mergeRefs as ig}from"@react-aria/utils";import dr from"react";import{classNames as Dl,filterTruthyValues as ng}from"@baseline-ui/utils";import{VisuallyHidden as lg,mergeProps as Vl,useClipboard as pg,useDrop as cg,useField as dg,useFocusRing as mg,useHover as ug}from"react-aria";import{invariant as $v}from"@baseline-ui/utils";import{animated as Jv,useTransition as eg}from"@react-spring/web";import{FocusScope as rg,useFocusManager as og,useKeyboard as tg}from"react-aria";import{jsx as so}from"react/jsx-runtime";var ag=({isInline:e,style:a,actionButtons:r})=>{let o=og();$v(o);let{keyboardProps:s}=tg({onKeyDown:t=>{t.key==="ArrowLeft"?(t.preventDefault(),o.focusPrevious()):t.key==="ArrowRight"?(t.preventDefault(),o.focusNext()):t.continuePropagation()}});return so("div",{...s,className:xl({isInline:e}),style:a,onClick:t=>{t.stopPropagation(),t.preventDefault()},children:r.map((t,i)=>so(Z,{excludeFromTabOrder:!0,...t},i))})},sg=Jv(ag),io=({show:e,...a})=>eg(e,{from:{opacity:0},enter:{opacity:1}})((o,s)=>s&&so(rg,{restoreFocus:!1,autoFocus:!0,children:so(sg,{...a,style:o})}));import{jsx as qe,jsxs as fg}from"react/jsx-runtime";var Ol=dr.forwardRef(({className:e,style:a,isInline:r=!0,accept:o="image/*",defaultImageSrc:s,imageSrc:t,imageAlt:i,pickerButtonLabel:n,removeButtonLabel:l,isDisabled:p,onDrop:d,onPaste:m,includeCheckeredBackground:c=!0,"data-blockid":f,pickerButtonStyle:y,pickerButtonClassName:b,...v},g)=>{let h=dr.useRef(null),_=dr.useRef(null),{formatMessage:P}=j(G),[z,F]=dr.useState(s||null),S=dr.useCallback(A=>{let B=new FileReader;B.addEventListener("load",()=>{F(B.result)}),B.readAsDataURL(A)},[]),{fieldProps:x,labelProps:R}=dg(v),{dropProps:N,isDropTarget:I}=cg({ref:h,onDrop:async A=>{if(p)return;let B=await ko({items:A.items});B.length&&(v.onValueChange?.(B),S(B[0])),d?.(A)},...v}),{clipboardProps:k}=pg({onPaste:async A=>{if(p)return;let B=await ko({items:A});B.length&&(v.onValueChange?.(B),S(B[0])),m?.(A)},...v}),L=()=>{F(null),_.current&&(_.current.value=""),v.onValueChange?.([])},H={type:"file",onChange:A=>{let B=[...A.target.files];v.onValueChange?.(B),S(B[0]),v.onChange?.(A)},accept:o,disabled:p||!!t},{focusProps:D,isFocused:re,isFocusVisible:Q}=mg({within:!0}),{hoverProps:U,isHovered:M}=ug({isDisabled:p}),$=t||z||void 0,O=!!$,{imgProps:we,isLoading:J,isLoaded:K}=Fr({src:$,alt:i||""}),ne=O&&!t&&(Q||M),Ne={label:n||P("selectImage"),onPress:()=>h.current?.click(),variant:"secondary",isDisabled:p,excludeFromTabOrder:!0,className:Dl({[Cl]:I&&!p},b),style:y},W=ng({"data-loaded":K,"data-blockid":f,"data-hovered":M,"data-focused":re,"data-drop-target":I,"data-disabled":p,"data-focus-visible":Q});return fg("label",{...Vl(N,R,U,D,W),className:Dl(eo({isInline:r,isHovered:M&&!t&&!I,isDisabled:p,hasLoadedImage:K,includeCheckeredBackground:c,showFocusRing:(Q||I)&&!p&&!ne}),"BaselineUI-ImageDropZone",e),style:a,ref:ig(h,g),children:[qe(lg,{children:qe("input",{...Vl(x,k,H),ref:_})}),!O&&qe(Z,{...Ne}),O&&(J?qe(Dr,{}):qe("img",{className:ro({isInline:r,isDisabled:p,hasLoadedImage:O&&K&&c}),...we})),qe(io,{isInline:r,style:a,show:ne,actionButtons:[Ne,{label:l||P("delete"),onPress:L}]})]})});Ol.displayName="ImageDropZone";import yg from"react";import{classNames as bg,invariant as vg}from"@baseline-ui/utils";import{mergeProps as gg,useFocusRing as hg,useHover as _g,usePress as xg}from"react-aria";var bt="_1vm2oh4b",El=u({defaultClassName:"_1vm2oh40 mnnh5s1",variantClassNames:{isInline:{true:"_1vm2oh41 mnnh5s2",false:"_1vm2oh42"},isFocusVisible:{true:"_1vm2oh43 mnnh5s7"},isDisabled:{true:"mnnh5s8 z9nup83"},hasActionButtons:{true:"_1vm2oh45",false:"_1vm2oh46"},isHovered:{true:"_1vm2oh47"}},defaultVariants:{},compoundVariants:[[{isFocusVisible:!0,hasActionButtons:!1},"_1vm2oh48"],[{isHovered:!0,hasActionButtons:!1,isInline:!0},"_1vm2oh49"],[{isHovered:!0,hasActionButtons:!1,isInline:!1},"_1vm2oh4a"]]});import{jsx as vt,jsxs as Al}from"react/jsx-runtime";var jl=yg.forwardRef(({className:e,style:a,isDisabled:r,actionButtons:o,isInline:s=!0,imageAlt:t,imageSrc:i,svgSrc:n,textValue:l,textStyle:p,onPress:d,"data-blockid":m,...c},f)=>{let{focusProps:y,isFocused:b,isFocusVisible:v}=hg({within:!0}),{isHovered:g,hoverProps:h}=_g({isDisabled:r}),{pressProps:_}=xg({isDisabled:r||!!o,onPress:d});return vg(i||n||l,"Preview must have content. You must provide either an `imageSrc`, `svgSrc`, or `textValue` prop."),Al("div",{...gg(h,y,c,_),className:bg(El({isInline:s,isFocusVisible:v,isDisabled:r,hasActionButtons:!!o,isHovered:g}),"BaselineUI-Preview",e),"data-hovered":g,"data-focus-visible":v,"data-focused":b,"aria-label":c["aria-label"]||t||l,"data-blockid":m,"data-disabled":r,style:a,ref:f,tabIndex:v&&o||r?-1:0,"aria-disabled":r,children:[Al("div",{style:p,className:bt,children:[i&&vt("img",{src:i,alt:t,className:ro({isInline:s,isDisabled:r})}),!!n&&typeof n=="object"&&n,l]}),typeof n=="string"&&vt("div",{className:bt,dangerouslySetInnerHTML:{__html:n}}),o&&vt(io,{isInline:s,actionButtons:o,show:v||g})]})});jl.displayName="Preview";import Sg from"react";import{classNames as no,filterTruthyValues as Lg}from"@baseline-ui/utils";import{mergeProps as Mg,useRadioGroup as Fg}from"react-aria";import{useRadioGroupState as Bg}from"react-stately";var ql="_1yep5z6g7 _1yep5z6g8 _1yep5z6g9 _1yep5z6gj _1yep5z6gk _1yep5z6gl _1yep5z69c _1yep5z69d _1yep5z69e",Ul=u({defaultClassName:"cw3m0n8 _1yep5z6d4 _1yep5z6c3",variantClassNames:{isDisabled:{true:"_1yep5z6wo"}},defaultVariants:{},compoundVariants:[]}),Kl="cw3m0n7",Gl=u({defaultClassName:"cw3m0n0 _1yep5z6g7 _1yep5z6g8 _1yep5z6g9 _1yep5z6gy _1yep5z6gz _1yep5z6h0 _1yep5z6gg _1yep5z6gh _1yep5z6gi",variantClassNames:{labelPosition:{end:"_1yep5z6zy _1yep5z6zz _1yep5z6100 _1yep5z6t0 _1yep5z6t1 _1yep5z6t2",start:"_1yep5z6104 _1yep5z6105 _1yep5z6106 _1yep5z611g _1yep5z611h _1yep5z611i"}},defaultVariants:{},compoundVariants:[]}),Wl="_1yep5z6ai _1yep5z6aq _1yep5z6ay _1yep5z6b6 _1yep5z6g7 _1yep5z6g8 _1yep5z6g9 _1yep5z6gj _1yep5z6gk _1yep5z6gl _1yep5z69i _1yep5z69j _1yep5z69k _1yep5z6iz",Xl=u({defaultClassName:"cw3m0n3 _16vugd05",variantClassNames:{isFocusVisible:{true:"_16vugd08"},isSelected:{true:"_16vugd07"},isDisabled:{true:"_16vugd0a"}},defaultVariants:{},compoundVariants:[]});import{classNames as Cg,filterTruthyValues as zg}from"@baseline-ui/utils";import Pg from"react";import{VisuallyHidden as kg,mergeProps as Rg,useFocusRing as wg,useHover as Ng,useRadio as Ig}from"react-aria";import{jsx as Ue,jsxs as gt}from"react/jsx-runtime";var Tg=({label:e,description:a},{isSelected:r,isFocusVisible:o,isDisabled:s,optionLabelPosition:t})=>gt("div",{className:Gl({labelPosition:t}),children:[Ue("div",{className:Xl({isSelected:r,isFocusVisible:o,isDisabled:s}),children:r&&Ue("div",{className:Kl})}),e&&gt("div",{className:ql,children:[Ue("span",{className:Vr({isDisabled:s}),children:e}),a&&Ue("span",{className:Ul({isDisabled:s}),children:a})]})]}),Zl=({state:e,renderOption:a=Tg,item:r,optionLabelPosition:o="end",optionStyle:s,optionClassName:t,isReadOnly:i,...n})=>{let l=!!n.isDisabled||!!n.disabledValues?.includes(r.id),p=Pg.useRef(null),{inputProps:d,isPressed:m,isSelected:c}=Ig({...n,isDisabled:l,children:r.label,value:r.id},e,p),{focusProps:f,isFocusVisible:y,isFocused:b}=wg(),{isHovered:v}=Ng({isDisabled:l}),g=zg({"data-selected":c,"data-focused":b,"data-focus-visible":y,"data-hovered":v,"data-disabled":l,"data-pressed":m,"data-read-only":i});return gt("label",{...g,style:s,className:Cg("BaselineUI-Radio-Item",t),children:[Ue(kg,{children:Ue("input",{...Rg(d,f),ref:p})}),a(r,{isFocusVisible:y,isSelected:c,isFocused:b,isHovered:v,isDisabled:l,optionLabelPosition:o,isReadOnly:i})]})};import{jsx as ht,jsxs as _t}from"react/jsx-runtime";var lo=Sg.forwardRef(({className:e,style:a,optionsContainerClassName:r,optionsContainerStyle:o,items:s,labelPosition:t="top",renderOption:i,"aria-label":n,"aria-labelledby":l,"aria-describedby":p,"aria-details":d,"data-blockid":m,...c},f)=>{let y=Bg(c),{radioGroupProps:b,labelProps:v,descriptionProps:g,errorMessageProps:h}=Fg({...c,"aria-label":n,"aria-labelledby":l,"aria-describedby":p,"aria-details":d},y),_=me({...c,descriptionProps:g,errorMessageProps:h,labelPosition:t}),P=Lg({"data-orientation":c.orientation,"data-blockid":m,"data-disabled":c.isDisabled,"data-readonly":c.isReadOnly});return _t("div",{...Mg(b,P),className:no(de({labelPosition:t}),"BaselineUI-RadioGroup",e),style:a,ref:f,children:[(c.label||_)&&_t("div",{className:ce({labelPosition:t,hasMessage:!!_}),children:[ht("span",{...v,className:no(pe,"BaselineUI-RadioGroup-Label"),children:c.label}),t==="start"&&_]}),_t("div",{className:no({[Ie]:c.isDisabled}),children:[ht("div",{className:no(Wl,r),style:o,children:s.map(z=>ht(Zl,{state:y,renderOption:i,item:z,value:z.id,...c},z.id))}),t==="top"&&_]})]})});lo.displayName="RadioGroup";import Hg from"react";import{useOverlayTrigger as Dg}from"react-aria";import{useOverlayTriggerState as Vg}from"react-stately";import{jsx as Og}from"react/jsx-runtime";var ge=Hg.createContext({state:null,triggerProps:{},overlayProps:{}}),Yl=({children:e,...a})=>{let r=Vg(a),{triggerProps:o,overlayProps:s}=Dg({type:"dialog"},r);return Og(ge.Provider,{value:{state:r,triggerProps:o,overlayProps:s},children:e})};Yl.displayName="Modal";import{classNames as Eg,invariant as $l}from"@baseline-ui/utils";import{animated as Jl,easings as Ag,useReducedMotion as ep,useSpring as jg,useTransition as qg}from"@react-spring/web";import xt,{useContext as Ug}from"react";import{Overlay as Kg,useModalOverlay as Gg}from"react-aria";var Ql="aml2vl0 _1yep5z6ea _1yep5z6g7 _1yep5z6g8 _1yep5z6g9 _1yep5z6gy _1yep5z6gz _1yep5z6h0 _1yep5z6hs _1yep5z6ht _1yep5z6hu";import{jsx as po}from"react/jsx-runtime";var Wg=({children:e,className:a,style:r,isDismissable:o=!0,isKeyboardDismissDisabled:s=!1,portalContainer:t})=>{let{state:i}=xt.useContext(ge);$l(i,"ModalContent must be a child of Modal");let n=xt.useRef(null),{modalProps:l,underlayProps:p}=Gg({isDismissable:o,isKeyboardDismissDisabled:s},i,n),{theme:d}=Ug(fe),m=ep(),c=jg({from:{opacity:0,transform:"scale(0.95)"},to:{opacity:1,transform:"scale(1)"},immediate:!!m,config:{easing:Ag.easeInBounce}});return po(Kg,{portalContainer:t,children:po(ye,{className:Eg(Ql,a),theme:d,UNSAFE_domProps:{...p,"data-testid":"underlay"},style:r,children:po(Jl.div,{...l,style:{...l.style,...c},ref:n,children:e})})})},Xg=Jl(Wg),Zg=({children:e,style:a,...r})=>{let{state:o}=xt.useContext(ge);$l(o,"ModalContent must be a child of Modal");let s=ep();return qg(o.isOpen,{from:{opacity:0},enter:{opacity:1},immediate:!!s})((i,n)=>n&&po(Xg,{...r,style:{...a,...i},children:typeof e=="function"?e({close:o.close}):e}))};import{Slot as Yg}from"@radix-ui/react-slot";import Qg from"react";import{jsx as $g}from"react/jsx-runtime";var rp=({children:e})=>{let{triggerProps:a}=Qg.useContext(ge);return $g(Yg,{...a,children:e})};rp.displayName="ModalTrigger";import{Slot as Jg}from"@radix-ui/react-slot";import e1 from"react";import{jsx as o1}from"react/jsx-runtime";var r1=({children:e})=>{let{state:a}=e1.useContext(ge);return o1(Jg,{onPress:()=>a?.close(),children:e})};import{invariant as t1}from"@baseline-ui/utils";import{Fragment as a1}from"react";import{jsx as s1}from"react/jsx-runtime";var op=({id:e,defaultMessage:a,elementType:r=a1})=>{t1(e||a,"`id` or `defaultMessage` is required.");let o=j();return s1(r,{children:o.formatMessage(e)||a})};op.displayName="MessageFormat";import i1 from"react";import{useHover as n1}from"react-aria";import{jsx as l1}from"react/jsx-runtime";var tp=i1.forwardRef(({className:e,style:a,children:r,role:o="group",isDisabled:s,...t},i)=>{let{hoverProps:n,isHovered:l}=n1({isDisabled:s});return l1("div",{...n,role:o,"data-hovered":l,"data-disabled":s,className:e,style:a,...t,ref:i,children:r})});tp.displayName="Group";import{sprinkles as ap}from"@baseline-ui/tokens";import{classNames as p1}from"@baseline-ui/utils";import c1,{useMemo as d1}from"react";import{jsx as u1}from"react/jsx-runtime";function m1(e){return ap.properties.has(e)}var sp=c1.forwardRef(({elementType:e="div",children:a,...r},o)=>{let s=e,{sprinkleProps:t,domProps:i}=d1(()=>{let n={},l={};for(let p in r)m1(p)?n[p]=r[p]:l[p]=r[p];return{sprinkleProps:n,domProps:l}},[r]);return u1(s,{...i,className:p1(ap(t),"BaselineUI-Box",i.className),ref:o,children:a})});sp.displayName="Box";import{classNames as lp}from"@baseline-ui/utils";import f1,{useMemo as y1}from"react";import{VisuallyHidden as b1}from"react-aria";var ip="_1yep5z66 _1yep5z67 _1yep5z68 _1yep5z62i _1yep5z62j _1yep5z62k _1yep5z63o _1yep5z63p _1yep5z63q _1yep5z61c _1yep5z61d _1yep5z61e",np="_1yep5z61jg _1yep5z61jh _1yep5z61ji _1yep5z61cf _1yep5z61cg _1yep5z61ch";import{jsx as Ct,jsxs as v1}from"react/jsx-runtime";var pp=f1.forwardRef(({items:e,optionsContainerClassName:a,...r},o)=>{let s=y1(()=>e.map(t=>({id:t.color,label:t.label})),[e]);return Ct(lo,{items:s,optionsContainerClassName:lp(np,a),orientation:"horizontal",renderOption:({label:t,id:i},{isSelected:n,isFocusVisible:l})=>v1("div",{className:ip,children:[Ct(ke,{isFocusVisible:l,color:i,isSelected:n}),Ct(b1,{children:t})]}),...r,className:lp(r.className,"BaselineUI-ColorPresetInput"),ref:o})});pp.displayName="ColorPresetInput";import{invariant as C1}from"@baseline-ui/utils";import z1,{useContext as P1}from"react";import cp from"react";import{useOverlayTrigger as g1}from"react-aria";import{useOverlayTriggerState as h1}from"react-stately";import{jsx as x1}from"react/jsx-runtime";var mr=cp.createContext({state:null,overlayTriggerAria:{triggerProps:{},overlayProps:{}},triggerRef:void 0}),_1=({children:e,...a})=>{let r=cp.useRef(null),o=h1(a),s=g1(a,o);return x1(mr.Provider,{value:{state:o,overlayTriggerAria:s,triggerRef:r},children:typeof e=="function"?e(o):e})};import{jsx as k1}from"react/jsx-runtime";var dp=z1.forwardRef((e,a)=>{let{state:r,overlayTriggerAria:{overlayProps:o},triggerRef:s}=P1(mr);return C1(s),r?.isOpen?k1(ae,{ref:a,...e,triggerRef:e.triggerRef||s,overlayProps:o,state:r}):null});dp.displayName="PopoverContent";import{invariant as R1}from"@baseline-ui/utils";import{Slot as w1}from"@radix-ui/react-slot";import{useContext as N1}from"react";import{jsx as T1}from"react/jsx-runtime";var I1=({children:e})=>{let{state:a,overlayTriggerAria:r,triggerRef:o}=N1(mr);R1(a,"PopoverTrigger must be used within a Popover");let{triggerProps:s}=r;return T1(w1,{...s,ref:o,children:e})};import{useToolbar as S1}from"@react-aria/toolbar";import{mergeRefs as L1}from"@react-aria/utils";import mp from"react";import{classNames as M1,filterTruthyValues as F1}from"@baseline-ui/utils";import{mergeProps as B1,useFocusRing as H1}from"react-aria";import{jsx as D1}from"react/jsx-runtime";var up=mp.forwardRef(({className:e,style:a,"data-blockid":r,...o},s)=>{let t=mp.useRef(null),{toolbarProps:i}=S1(o,t),{isFocusVisible:n,focusProps:l}=H1(),p=F1({"data-blockid":r,"data-focus-visible":n});return D1("div",{...B1(i,l,p),className:M1("BaselineUI-Toolbar",e),style:a,ref:L1(s,t),children:o.children})});up.displayName="Toolbar";export{Yi as Accordion,an as AccordionItem,Z as ActionButton,w as ActionIconButton,un as Avatar,sp as Box,Us as Checkbox,_l as ColorInput,pp as ColorPresetInlineInput,ke as ColorSwatch,Li as DateFormat,Gr as Dialog,Vn as DialogTitle,Ot as DomNodeRenderer,Za as FileUpload,Il as FreehandCanvas,tp as Group,Xm as I18nProvider,Ol as ImageDropZone,Fn as InlineAlert,Ea as Link,le as ListBox,Da as Menu,op as MessageFormat,Yl as Modal,r1 as ModalClose,Zg as ModalContent,rp as ModalTrigger,He as NumberFormat,te as NumberInput,Si as Pagination,_1 as Popover,dp as PopoverContent,I1 as PopoverTrigger,Lr as Portal,jl as Preview,as as ProgressBar,Dr as ProgressSpinner,lo as RadioGroup,us as Reaction,ba as SearchInput,Ur as Select,E as Separator,ra as Slider,da as Switch,Rn as TabItem,kn as Tabs,Ei as TagGroup,oo as Text,is as TextInput,ye as ThemeProvider,Os as ToggleButton,up as Toolbar,ws as Tooltip,Hl as Transform,Gz as defineMessages,iR as useCollator,sR as useDateFormatter,j as useI18n,Fr as useImage,hs as useIntersectionObserver,Ve as useIsFirstRender,ks as useLocalStorage,Zz as useMutationObserver,aR as useNumberFormatter,_s as useResizeObserver,rP as useTextSelection,Cs as useUndoRedo,ho as useUserPreferences};
10
+ var ay=Object.defineProperty;var m=(e,a)=>{for(var o in a)ay(e,o,{get:a[o],enumerable:!0})};import Dy from"react";import{Item as zp,Section as Hy}from"react-stately";import{mergeRefs as Iy}from"@react-aria/utils";import Pp from"react";import{classNames as Ny,filterTruthyValues as Ty}from"@baseline-ui/utils";import{ListKeyboardDelegate as Sy,mergeProps as Ly,useFocusRing as Fy,useListBox as My,useLocale as By}from"react-aria";import{useListState as jy}from"react-stately";import{classNames as Py,invariant as zy}from"@baseline-ui/utils";import{useListBoxSection as ky}from"react-aria";function sy(e,a){if(typeof e!="object"||e===null)return e;var o=e[Symbol.toPrimitive];if(o!==void 0){var r=o.call(e,a||"default");if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(a==="string"?String:Number)(e)}function ny(e){var a=sy(e,"string");return typeof a=="symbol"?a:String(a)}function iy(e,a,o){return a=ny(a),a in e?Object.defineProperty(e,a,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[a]=o,e}function cp(e,a){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);a&&(r=r.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),o.push.apply(o,r)}return o}function up(e){for(var a=1;a<arguments.length;a++){var o=arguments[a]!=null?arguments[a]:{};a%2?cp(Object(o),!0).forEach(function(r){iy(e,r,o[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):cp(Object(o)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(o,r))})}return e}function fp(e,a){var o={};for(var r in e)o[r]=a(e[r],r);return o}var ly=(e,a,o)=>{for(var r of Object.keys(e)){var s;if(e[r]!==((s=a[r])!==null&&s!==void 0?s:o[r]))return!1}return!0},y=e=>{var a=o=>{var r=e.defaultClassName,s=up(up({},e.defaultVariants),o);for(var t in s){var n,i=(n=s[t])!==null&&n!==void 0?n:e.defaultVariants[t];if(i!=null){var l=i;typeof l=="boolean"&&(l=l===!0?"true":"false");var p=e.variantClassNames[t][l];p&&(r+=" "+p)}}for(var[d,u]of e.compoundVariants)ly(d,s,e.defaultVariants)&&(r+=" "+u);return r};return a.variants=()=>Object.keys(e.variantClassNames),a.classNames={get base(){return e.defaultClassName.split(" ")[0]},get variants(){return fp(e.variantClassNames,o=>fp(o,r=>r.split(" ")[0]))}},a};var yp="_1yep5z6j5",gp=y({defaultClassName:"_6n12k98 _1yep5z6d3 _1yep5z6bi _1yep5z6c3",variantClassNames:{isDisabled:{true:"_1yep5z6d6"}},defaultVariants:{},compoundVariants:[]}),bp=y({defaultClassName:"_6n12k91 _1yep5z63r _1yep5z63s _1yep5z63t _1yep5z61f _1yep5z61g _1yep5z61h _1yep5z6g7 _1yep5z6g8 _1yep5z6g9 _1yep5z6gg _1yep5z6gh _1yep5z6gi _1yep5z6gy _1yep5z6gz _1yep5z6h0 _1yep5z6hy _1yep5z6hz _1yep5z6i0 _1yep5z69l _1yep5z69m _1yep5z69n _1yep5z6c6 _1yep5z6d2 _1yep5z6ip _1yep5z6is",variantClassNames:{isSelected:{},isFocused:{true:"_1yep5z6z1 _1yep5z612q _1yep5z612o _1yep5z612r _1yep5z6za _1yep5z6zb _1yep5z6zc"},isHovered:{true:"_1yep5z6xj",false:"_1yep5z6xi"},isFirstChild:{true:"_6n12k95"},isLastChild:{true:"_6n12k96"},isDisabled:{true:"z9nup83 _1yep5z6wo"}},defaultVariants:{},compoundVariants:[]}),vp="_1yep5z6g7 _1yep5z6g8 _1yep5z6g9 _1yep5z6gy _1yep5z6gz _1yep5z6h0 _1yep5z69l _1yep5z69m _1yep5z69n",hp="_6n12k90";import py from"react";import{classNames as my}from"@baseline-ui/utils";import{useSeparator as dy}from"react-aria";var _p=y({defaultClassName:"gukncs0",variantClassNames:{isVertical:{true:"gukncs1"},isSecondary:{true:"gukncs2"}},defaultVariants:{},compoundVariants:[]});import{jsx as cy}from"react/jsx-runtime";var E=py.forwardRef(({className:e,style:a,variant:o="primary",orientation:r="horizontal",UNSAFE_omitRole:s,elementType:t="div",...n},i)=>{let{separatorProps:l}=dy({...n,orientation:r,elementType:t});return cy(t,{...l,className:my(_p({isVertical:r==="vertical",isSecondary:o==="secondary"}),"BaselineUI-Separator",e),"data-orientation":r,"data-blockid":n["data-blockid"],style:a,role:s?void 0:l.role,ref:i})});E.displayName="Separator";import{mergeRefs as _y}from"@react-aria/utils";import xp from"react";import{useOption as Cy}from"react-aria";import{CheckmarkIcon as uy}from"@baseline-ui/icons/24/index";import{classNames as fy,filterTruthyValues as yy,invariant as gy}from"@baseline-ui/utils";import by from"react";import{mergeProps as vy,useHover as hy}from"react-aria";import{jsx as So,jsxs as Cp}from"react/jsx-runtime";var Lo=by.forwardRef(({item:e,isDisabled:a,isFocusVisible:o,isSelected:r,liProps:s,showSelectedIcon:t,description:n,descriptionProps:i,labelProps:l,isFocused:p,isPressed:d,_state:u},c)=>{gy(e.value&&(e.value.type==="option"||e.value.type===void 0),"Item cannot be a section");let{icon:f,label:g}=e.value,{hoverProps:b,isHovered:v}=hy({isDisabled:a}),h=yy({"data-selected":r,"data-disabled":a,"data-focused":p,"data-hovered":v,"data-pressed":d,"data-focus-visible":o,"data-selection-mode":u.selectionManager.selectionMode});return Cp("li",{...vy(s,b,h),className:fy(bp({isHovered:v,isFocused:o,isFirstChild:u.collection.getFirstKey()===e.key,isLastChild:u.collection.getLastKey()===e.key,isDisabled:a}),"BaselineUI-ListBox-Option"),ref:c,children:[Cp("div",{className:vp,children:[t&&So("span",{"aria-hidden":!0,style:{height:24,width:24},children:r&&So(uy,{size:24})}),f&&So(f,{size:24}),So("span",{...l,children:g})]}),n&&So("span",{className:gp({isDisabled:a}),...i,children:n})]})});Lo.displayName="DefaultRenderOption";import{jsx as xy}from"react/jsx-runtime";var Fo=xp.forwardRef(({item:e,renderOption:a=(t,n,i)=>xy(Lo,{item:t,liProps:n.optionProps,...n,ref:i}),showSelectedIcon:o,state:r},s)=>{let t=xp.useRef(null),n=Cy({key:e.key},r,t);return a(e,{...n,showSelectedIcon:o,_state:r},_y(t,s))});Fo.displayName="Option";import{Fragment as Ry,jsx as Mr,jsxs as wy}from"react/jsx-runtime";var Ht=({section:e,state:a,showSelectedIcon:o})=>{let{itemProps:r,groupProps:s}=ky({heading:e.rendered,"aria-label":e["aria-label"]}),t=a.collection.getChildren?.(e.key);return zy(t,"items with type `section` must have children"),wy(Ry,{children:[e.key!==a.collection.getFirstKey()&&Mr(E,{UNSAFE_omitRole:!0}),Mr("li",{...r,className:Py(hp,"BaselineUI-ListBox-Section"),children:Mr("ul",{...s,children:[...t].map(n=>Mr(Fo,{item:n,state:a,showSelectedIcon:o},n.key))})})]})};Ht.displayName="ListBoxSection";import{jsx as Vt}from"react/jsx-runtime";var Ot=Pp.forwardRef(({className:e,layout:a="stack",orientation:o="vertical",showSelectedIcon:r=!0,UNSAFE_state:s,style:t,renderOption:n,"data-blockid":i,...l},p)=>{let d=jy(l),{direction:u}=By(),c=s||d,f=Pp.useRef(null),{listBoxProps:g}=My({...l,keyboardDelegate:new Sy({collection:c.collection,ref:f,layout:a,orientation:o,direction:u,disabledKeys:c.disabledKeys})},c,f),{isFocusVisible:b,isFocused:v,focusProps:h}=Fy(),_=Ty({"data-blockid":i,"data-layout":a,"data-empty":c.collection.size===0,"data-focused":v,"data-focus-visible":b});return Vt("ul",{...Ly(g,h,_),className:Ny(yp,"BaselineUI-ListBox",e),style:t,ref:Iy(p,f),children:[...c.collection].map(C=>C.type==="section"?Vt(Ht,{showSelectedIcon:r,section:C,state:c},C.key):Vt(Fo,{showSelectedIcon:r,item:C,state:c,renderOption:n},C.key))})});Ot.displayName="ListBoxBase";import{jsx as Br}from"react/jsx-runtime";var Oe=Dy.forwardRef((e,a)=>Br(Ot,{...e,ref:a,children:o=>o.type==="section"?Br(Hy,{items:o.children,title:o.id,children:r=>Br(zp,{children:r.label},r.id)},o.id):Br(zp,{children:o.label},o.id)}));Oe.displayName="ListBox";import{classNames as Vy}from"@baseline-ui/utils";import{mergeRefs as Oy}from"@react-aria/utils";import Rp from"react";import{mergeProps as Ay,useButton as Ey,useFocusRing as qy,useHover as Uy}from"react-aria";var kp=y({defaultClassName:"oom8bs0 _1yep5z6ai _1yep5z6aq _1yep5z6ay _1yep5z6b6 _1yep5z6ga _1yep5z6gb _1yep5z6gc _1yep5z69i _1yep5z69j _1yep5z69k _1yep5z6gy _1yep5z6gz _1yep5z6h0 _1yep5z6j4 _1yep5z6j5 _1yep5z6iz _1yep5z6c6 _1yep5z6ip",variantClassNames:{variant:{primary:"oom8bs1",secondary:"oom8bs2",tertiary:"oom8bs3",ghost:"oom8bs4"},isDisabled:{true:"oom8bs5"},isFocusVisible:{true:"oom8bs6"},isHovered:{true:"oom8bs7"},size:{sm:"oom8bs8",md:"oom8bs9"}},defaultVariants:{},compoundVariants:[[{variant:"primary",isHovered:!0},"oom8bsa"],[{variant:"secondary",isHovered:!0},"oom8bsb"],[{variant:"tertiary",isHovered:!0},"oom8bsc"],[{variant:"ghost",isHovered:!0},"oom8bsd"],[{variant:"primary",isFocusVisible:!0},"oom8bse"],[{variant:"tertiary",isFocusVisible:!0},"oom8bsf"]]});import{jsx as wp,jsxs as Gy}from"react/jsx-runtime";var Ky={sm:16,md:20},U=Rp.forwardRef(({label:e,style:a,className:o,iconStart:r,iconEnd:s,variant:t="primary",elementType:n="button",isDisabled:i,size:l="sm","data-blockid":p,...d},u)=>{let c=Rp.useRef(null),{buttonProps:f,isPressed:g}=Ey({...d,elementType:n,isDisabled:i},c),b=Ky[l],{hoverProps:v,isHovered:h}=Uy({isDisabled:i}),{isFocusVisible:_,isFocused:C,focusProps:P}=qy();return Gy(n,{...Ay(f,v,P),className:Vy(kp({isDisabled:!!i,isFocusVisible:_,isHovered:h,variant:t,size:l}),"BaselineUI-ActionButton",o),"data-focus-visible":_,"data-focused":C,"data-hovered":h,"data-disabled":i,"data-blockid":p,"data-pressed":g,style:a,ref:Oy(u,c),children:[!!r&&wp(r,{size:b}),e,!!s&&wp(s,{size:b})]})});U.displayName="ActionButton";import{mergeRefs as Xy}from"@react-aria/utils";import At from"react";import{classNames as Wy}from"@baseline-ui/utils";var Mo=y({defaultClassName:"z9nup84",variantClassNames:{size:{xs:"z9nup85",sm:"z9nup86"}},defaultVariants:{},compoundVariants:[]});var jr="z9nup80",po="z9nup83";import{jsx as Yy}from"react/jsx-runtime";var Ip=At.forwardRef(({className:e,node:a},o)=>{let r=At.useRef(null);return At.useEffect(()=>{let s=r.current;return s?.append(a),()=>{s?.contains(a)&&a.remove()}},[a]),Yy("div",{className:Wy(jr,e),ref:Xy(o,r)})});Ip.displayName="DomNodeRenderer";import{classNames as jo,filterTruthyValues as fg}from"@baseline-ui/utils";import{mergeRefs as yg}from"@react-aria/utils";import qt from"react";import{VisuallyHidden as gg,mergeProps as qp,useFocusRing as bg,useHover as vg,useNumberFormatter as hg,useSlider as _g,useSliderThumb as Cg}from"react-aria";import{useSliderState as xg}from"react-stately";var Np="_14uvjig0 z9nup81",Tp="_14uvjig7",Sp="_14uvjig3",Lp=y({defaultClassName:"_14uvjig4",variantClassNames:{isDisabled:{true:"_14uvjig5"},hasNumberInput:{false:"_14uvjig6"}},defaultVariants:{},compoundVariants:[]}),Fp=y({defaultClassName:"_14uvjige _14uvjig1",variantClassNames:{active:{true:"_14uvjigf _14uvjig2"},isDisabled:{true:"_14uvjigg"},isReadOnly:{true:"_14uvjigh"},isFocusVisible:{true:"_14uvjigi _14uvjig2"},isHovered:{true:"_14uvjigj _14uvjig2"}},defaultVariants:{},compoundVariants:[]}),Mp="_14uvjig8",Bp=y({defaultClassName:"_14uvjig9 _14uvjig1",variantClassNames:{active:{true:"_14uvjig2"},isFocusVisible:{true:"_14uvjigb _14uvjig2"},isDisabled:{true:"_14uvjigc"},isHovered:{true:"_14uvjig2"}},defaultVariants:{},compoundVariants:[]});import{ErrorFilledIcon as tg,ReadOnlyIcon as ag}from"@baseline-ui/icons/16";import Ap,{useMemo as sg}from"react";import{classNames as Hr,filterTruthyValues as ng}from"@baseline-ui/utils";import{mergeProps as Ep,useFocusRing as ig,useHover as lg,useLocale as pg,useNumberField as mg}from"react-aria";import{MinusIcon as dg,PlusIcon as cg}from"@baseline-ui/icons/8";import{useNumberFieldState as ug}from"react-stately";var mo=y({defaultClassName:"nrh1ehx",variantClassNames:{isDisabled:{true:"nrh1ehy"},hasError:{true:"nrh1ehz"},labelPosition:{start:"nrh1eh10",top:"nrh1eh11"}},defaultVariants:{},compoundVariants:[]}),Dr=y({defaultClassName:"nrh1eho",variantClassNames:{isDisabled:{true:"nrh1ehp"},labelPosition:{top:"nrh1ehq",start:"nrh1ehr"}},defaultVariants:{},compoundVariants:[]}),co=y({defaultClassName:"nrh1ehs",variantClassNames:{validationState:{valid:"nrh1eht",error:"nrh1ehu",warning:"nrh1ehv"},isReadOnly:{true:"nrh1ehw"}},defaultVariants:{},compoundVariants:[]}),Ae="nrh1eh3",Ee=y({defaultClassName:"nrh1eh4",variantClassNames:{labelPosition:{top:"nrh1eh5",start:"nrh1eh6"},hasMessage:{true:"nrh1eh7"}},defaultVariants:{},compoundVariants:[[{labelPosition:"start",hasMessage:!1},"nrh1eh8"]]}),qe=y({defaultClassName:"nrh1eh0",variantClassNames:{labelPosition:{top:"z9nup81",start:"nrh1eh2 z9nup82"}},defaultVariants:{},compoundVariants:[]}),uo=y({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"]]});import{jsx as Et}from"react/jsx-runtime";function Ue({description:e,errorMessageProps:a,descriptionProps:o,warningMessage:r,errorMessage:s,labelPosition:t,isDisabled:n}){return e?Et("div",{...o,className:mo({isDisabled:n,labelPosition:t}),children:e}):s?Et("div",{...a,className:mo({hasError:!0,labelPosition:t}),children:s}):r?Et("div",{className:mo({isDisabled:n,labelPosition:t}),children:r}):null}var jp=y({defaultClassName:"_1lnwne1 z9nup82",variantClassNames:{isHoveredOrFocused:{true:"_1lnwne2"},isInteractive:{false:"z9nup83"}},defaultVariants:{},compoundVariants:[[{isHoveredOrFocused:!0,isInteractive:!0},"_1lnwne4"]]}),Dp="_1lnwne0";import{mergeRefs as Zy}from"@react-aria/utils";import Vp from"react";import{mergeProps as Qy,useButton as $y,useFocusRing as Jy,useHover as eg}from"react-aria";import{classNames as og}from"@baseline-ui/utils";var Hp=y({defaultClassName:"uf19bs0 _1yep5z6ai _1yep5z6aq _1yep5z6ay _1yep5z6b6 _1yep5z6d8 _1yep5z6j4 _1yep5z6ga _1yep5z6gb _1yep5z6gc _1yep5z6gy _1yep5z6gz _1yep5z6h0 _1yep5z6hs _1yep5z6ht _1yep5z6hu _1yep5z6ip _1yep5z6iz",variantClassNames:{size:{xxs:"uf19bs1",xs:"uf19bs2",sm:"uf19bs3",md:"uf19bs4",lg:"uf19bs5 _1yep5z6u1 _1yep5z6u9 _1yep5z6uh _1yep5z6up"},isHovered:{true:"uf19bs6"},isDisabled:{true:"uf19bs7 _1yep5z6ws"},isFocusVisible:{true:"uf19bs8"},variant:{primary:"uf19bs9",secondary:"uf19bsa",tertiary:"uf19bsb",ghost:"uf19bsc",toolbar:"_1yep5z6u7 _1yep5z6uf _1yep5z6un _1yep5z6uv"},isPressed:{true:"uf19bse"}},defaultVariants:{},compoundVariants:[[{variant:"toolbar",isHovered:!0},"_1yep5z61h1"],[{variant:"primary",isHovered:!0},"_1yep5z61h1"],[{variant:"secondary",isHovered:!0},"_1yep5z61g9"],[{variant:"tertiary",isHovered:!0},"_1yep5z61g8 _1yep5z61h2"],[{variant:"ghost",isHovered:!0},"_1yep5z61ge"],[{variant:"toolbar",isPressed:!0},"_1yep5z61h1"],[{variant:"primary",isPressed:!0},"_1yep5z61h1"],[{variant:"secondary",isPressed:!0},"_1yep5z61g9"],[{variant:"tertiary",isPressed:!0},"_1yep5z61gc _1yep5z61h2"],[{variant:"ghost",isPressed:!0},"_1yep5z61gf"],[{variant:"ghost",isDisabled:!1},"_1yep5z61gd"]]});import{jsx as Op}from"react/jsx-runtime";var rg={xxs:8,xs:12,sm:16,md:20,lg:24},L=Vp.forwardRef(({className:e,style:a,icon:o,size:r="md",variant:s="primary",UNSAFE_NON_INTERACTIVE:t,elementType:n=t?"div":"button",...i},l)=>{!i["aria-label"]&&!i["aria-labelledby"]&&console.warn("An `ActionIconButton` requires an aria-label or aria-labelledby prop.");let p=Vp.useRef(null),{buttonProps:d,isPressed:u}=$y({...i,elementType:n},p),{isFocusVisible:c,isFocused:f,focusProps:g}=Jy(),{hoverProps:b,isHovered:v}=eg({isDisabled:i.isDisabled});return Op(n,{...Qy(d,b,g),className:og(Hp({variant:s,size:r,isDisabled:!!i.isDisabled,isFocusVisible:c,isHovered:v,isPressed:u}),"BaselineUI-ActionIconButton",e),"data-blockid":i["data-blockid"],"data-focused":f,"data-focus-visible":c,"data-disabled":i.isDisabled,"data-hovered":v,"data-pressed":u,ref:Zy(l,p),style:a,...t&&{tabIndex:void 0,role:void 0,"aria-label":void 0,"aria-labelledby":void 0,"aria-disabled":void 0},children:Op(o,{role:"presentation",size:rg[r]})})});L.displayName="ActionIconButton";import{jsx as fo,jsxs as Bo}from"react/jsx-runtime";var Me=Ap.forwardRef(({className:e,style:a,labelPosition:o="top",variant:r="primary",showStepper:s=!0,...t},n)=>{let i=Ap.useRef(null),{locale:l}=pg(),p=ug({...t,locale:l}),{hoverProps:d,isHovered:u}=lg({isDisabled:t.isDisabled}),{focusProps:c,isFocusVisible:f,isFocused:g}=ig(),{labelProps:b,decrementButtonProps:v,inputProps:h,incrementButtonProps:_,groupProps:C,descriptionProps:P,errorMessageProps:w}=mg(t,p,i),x=sg(()=>t.isReadOnly?ag:t.isInvalid?tg:null,[t.isInvalid,t.isReadOnly]),k=Ue({description:t.description,errorMessageProps:w,descriptionProps:P,errorMessage:t.errorMessage,labelPosition:o,isDisabled:t.isDisabled}),S=ng({"data-disabled":t.isDisabled,"data-readonly":t.isReadOnly,"data-hovered":u,"data-focused":g,"data-focus-visible":f,"data-invalid":t.isInvalid,"data-blockid":t["data-blockid"]});return Bo("div",{style:a,className:Hr(qe({labelPosition:o}),"BaselineUI-NumberInput",e),...S,ref:n,children:[t.label&&Bo("div",{className:Ee({labelPosition:o,hasMessage:!!k}),children:[fo("label",{...b,className:Ae,children:t.label}),o==="start"&&k]}),Bo("div",{className:Hr({[po]:t.isDisabled}),children:[Bo("div",{...Ep(C,d),className:Hr(uo({isHovered:u,isDisabled:!!t.isDisabled,isReadOnly:!!t.isReadOnly,validationState:t.isInvalid?"error":"valid",isFocused:g,variant:r}),{[Dp]:o==="start"},"BaselineUI-NumberInput-Container"),children:[fo("input",{...Ep(h,c),ref:i,className:Hr("BaselineUI-NumberInput-Input",Dr({isDisabled:t.isDisabled,labelPosition:o}))}),x&&fo(x,{className:co({validationState:"error",isReadOnly:t.isReadOnly}),size:16}),s&&Bo("div",{className:jp({isHoveredOrFocused:u||g,isInteractive:!t.isReadOnly&&!t.isDisabled}),children:[fo(L,{variant:"secondary",size:"xxs",icon:dg,...v,className:"BaselineUI-NumberInput-DecrementButton"}),fo(E,{style:{height:16},orientation:"vertical"}),fo(L,{variant:"secondary",size:"xxs",icon:cg,..._,className:"BaselineUI-NumberInput-DecrementButton"})]})]}),o==="top"&&k]})]})});Me.displayName="NumberInput";import{Fragment as zg,jsx as Ke,jsxs as Vr}from"react/jsx-runtime";var Up=qt.forwardRef(({className:e,style:a,onChange:o,onChangeEnd:r,numberFormatOptions:s,isDisabled:t,step:n,minValue:i,maxValue:l,value:p,"aria-label":d,"aria-labelledby":u,"aria-details":c,"aria-describedby":f,"data-blockid":g,defaultValue:b,isReadOnly:v,label:h,id:_,includeNumberInput:C},P)=>{let w=qt.useRef(null),x={onChange:o===void 0?void 0:N=>o(N[0]),isDisabled:t||v,step:n,minValue:i,maxValue:l,onChangeEnd:r===void 0?void 0:N=>r(N[0]),value:p===void 0?void 0:[p],defaultValue:b===void 0?void 0:[b],"aria-label":d,"aria-labelledby":u,"aria-details":c,"aria-describedby":f,id:_,label:h},k=hg(s),S=xg({...x,numberFormatter:k}),{trackProps:R,groupProps:T,labelProps:I}=_g(x,S,w),F=Ke(Me,{variant:"ghost",showStepper:!1,"aria-label":d,"aria-labelledby":I.id,value:S.getThumbValue(0),formatOptions:s,onChange:N=>S.setThumbValue(0,N),style:{width:55,textAlign:"right",flexShrink:0}});return Vr("div",{...T,style:a,"data-blockid":g,className:jo(Np,"BaselineUI-Slider",e),children:[h&&Vr("div",{className:Sp,children:[Ke("label",{...I,className:jo(Lp({isDisabled:t,hasNumberInput:!!C}),"BaselineUI-Slider-Label"),children:h}),C&&F]}),Vr("div",{className:Tp,children:[Ke("div",{...R,className:jo(Mp,"BaselineUI-Slider-Track"),ref:yg(w,P),"data-testid":"track",children:Ke(Pg,{state:S,trackRef:w,isDisabled:t,isReadOnly:v})}),C&&!h&&F]})]})});Up.displayName="Slider";function Pg({state:e,trackRef:a,isDisabled:o,isReadOnly:r}){let s=qt.useRef(null),{thumbProps:t,inputProps:n,isDragging:i}=Cg({trackRef:a,inputRef:s},e),{focusProps:l,isFocused:p,isFocusVisible:d}=bg(),{hoverProps:u,isHovered:c}=vg({isDisabled:o}),f=fg({"data-disabled":o,"data-readonly":r,"data-hovered":c,"data-focus-visible":d,"data-dragging":i,"data-focused":p});return Vr(zg,{children:[Ke("div",{className:jo(Bp({isDisabled:o,isFocusVisible:d,active:i,isHovered:c}),"BaselineUI-Slider-TrackHighlight"),style:{width:t.style?.left},"data-testid":"track-highlight"}),Ke("div",{...qp(t,u,f),className:jo(Fp({isDisabled:o,isFocusVisible:d,active:i,isReadOnly:r,isHovered:c}),"BaselineUI-Slider-Thumb"),"data-testid":"thumb",children:Ke(gg,{children:Ke("input",{ref:s,...qp(n,l)})})})]})}import Qp from"react";import{useToggleState as kg}from"react-stately";import{VisuallyHidden as Rg,mergeProps as $p,useFocusRing as wg,useHover as Ig,useSwitch as Ng}from"react-aria";import{classNames as Do,filterTruthyValues as Tg}from"@baseline-ui/utils";var Kp=y({defaultClassName:"bpklwa7",variantClassNames:{isReadOnly:{true:"bpklwa8"},isDisabled:{true:"bpklwa9"},isSelected:{true:"bpklwaa"},isFocused:{true:"bpklwab"}},defaultVariants:{},compoundVariants:[[{isSelected:!0,isDisabled:!1,isReadOnly:!1},"bpklwac"]]}),Gp=y({defaultClassName:"bpklwae",variantClassNames:{isDisabled:{true:"bpklwaf"},isSelected:{true:"bpklwag"},isReadOnly:{true:"bpklwah"}},defaultVariants:{},compoundVariants:[]}),Xp="bpklwad",Wp=y({defaultClassName:"bpklwa0",variantClassNames:{labelPosition:{top:"bpklwa1",left:"bpklwa2"}},defaultVariants:{},compoundVariants:[]}),Yp="bpklwa6",Zp=y({defaultClassName:"bpklwa3",variantClassNames:{labelPosition:{top:"bpklwa4",left:"bpklwa5"}},defaultVariants:{},compoundVariants:[]});import{jsx as yo,jsxs as Jp}from"react/jsx-runtime";var em=Qp.forwardRef(({className:e,label:a,labelPosition:o="top",statusLabel:r,style:s,"data-blockid":t,...n},i)=>{let l=Qp.useRef(null),p=kg(n),{inputProps:d,isPressed:u}=Ng(n,p,l),{isFocusVisible:c,focusProps:f}=wg(),{hoverProps:g,isHovered:b}=Ig({isDisabled:n.isDisabled}),v=Tg({"data-blockid":t,"data-focused":c,"data-disabled":n.isDisabled,"data-focus-visible":c,"data-selected":p.isSelected,"data-readonly":n.isReadOnly,"data-hovered":b,"data-pressed":u}),h=yo("div",{className:Do(Kp({isSelected:p.isSelected,isDisabled:!!n.isDisabled,isFocused:c,isReadOnly:!!n.isReadOnly}),"BaselineUI-Switch-Track"),children:yo("div",{className:Do(Gp({isSelected:p.isSelected,isDisabled:n.isDisabled,isReadOnly:n.isReadOnly}),"BaselineUI-Switch-Knob"),"data-testid":"switch-knob"})});return Jp("label",{...$p(v,g),className:Do(Wp({labelPosition:o}),"BaselineUI-Switch",e),style:s,ref:i,children:[a&&yo("span",{className:Do(Xp,"BaselineUI-Switch-Label"),children:a}),yo(Rg,{children:yo("input",{...$p(d,f),ref:l})}),r?Jp("div",{className:Zp({labelPosition:o}),children:[yo("span",{className:Do("BaselineUI-Switch-Status-Label",Yp),children:p.isSelected?r.on:r.off}),h]}):h]})});em.displayName="Switch";import{XIcon as Sg}from"@baseline-ui/icons/16";import{XIcon as Lg}from"@baseline-ui/icons/12";import{SearchIcon as tm}from"@baseline-ui/icons/24";import{SearchIcon as Fg}from"@baseline-ui/icons/20";import am from"react";import{classNames as Mg,filterTruthyValues as Bg}from"@baseline-ui/utils";import{mergeProps as jg,useFocusRing as Dg,useSearchField as Hg}from"react-aria";import{useSearchFieldState as Vg}from"react-stately";var om="_19n40yy9",rm=y({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:[]});import{jsx as Ut,jsxs as Ag}from"react/jsx-runtime";var Og={sm:Fg,md:tm,lg:tm},sm=am.forwardRef(({className:e,size:a="md",variant:o="primary",...r},s)=>{let t=am.useRef(null),n=Vg(r),{inputProps:i,clearButtonProps:l}=Hg({...r,"aria-haspopup":!1,"aria-autocomplete":"none",type:"search"},n,t),{focusProps:p,isFocusVisible:d,isFocused:u}=Dg({within:!0,isTextInput:!0}),c=Og[a],f=a==="sm"?Lg:Sg,g=Bg({"data-blockid":r["data-blockid"],"data-focused":u,"data-disabled":r.isDisabled,"data-focus-visible":d});return Ag("div",{...g,className:Mg(rm({size:a,isFocused:u,variant:o,hasText:!!n.value,isDisabled:r.isDisabled}),"BaselineUI-SearchInput",e),ref:s,children:[Ut(c,{size:a==="sm"?20:24}),Ut("input",{...jg(i,p),className:om,ref:t}),n.value!==""&&Ut(L,{icon:f,...l,size:a==="sm"?"xs":"sm",variant:"secondary"})]})});sm.displayName="SearchInput";import{classNames as Ug}from"@baseline-ui/utils";import Kg,{useMemo as Gg}from"react";import{assignInlineVars as im}from"@vanilla-extract/dynamic";import{darkTheme as Xg,lightTheme as Wg,themeVars as Yg}from"@baseline-ui/tokens";import{mergeProps as Zg,useLocale as Qg}from"react-aria";import{useEffect as Or,useState as Ar}from"react";function Kt(){let[e,a]=Ar("light"),[o,r]=Ar(!1),[s,t]=Ar(!1),[n,i]=Ar(!1);return Or(()=>{let l=window.matchMedia("(prefers-color-scheme: dark)"),p=d=>{a(d.matches?"dark":"light")};return l.matches&&a("dark"),l.addEventListener("change",p),()=>{l.addEventListener("change",p)}},[]),Or(()=>{let l=window.matchMedia("(prefers-contrast: more)"),p=d=>{r(d.matches)};return r(l.matches),l.addEventListener("change",p),()=>{l.addEventListener("change",p)}},[]),Or(()=>{let l=window.matchMedia("(prefers-reduced-motion: reduce)"),p=d=>{t(d.matches)};return l.matches&&t(!0),l.addEventListener("change",p),()=>{l.addEventListener("change",p)}},[]),Or(()=>{let l=window.matchMedia("(prefers-reduced-transparency: reduce)"),p=d=>{i(d.matches)};return l.matches&&i(!0),l.addEventListener("change",p),()=>{l.addEventListener("change",p)}},[]),{colorScheme:e,highContrast:o,reducedMotion:s,transparency:n}}import{lightTheme as Eg}from"@baseline-ui/tokens";import{createContext as qg}from"react";var Ge=qg({theme:Eg,setTheme:()=>{}});var nm="var(--hj25q10)";import{jsx as lm}from"react/jsx-runtime";var Er={LIGHT:{name:"light",theme:Wg},DARK:{name:"dark",theme:Xg}},Xe=Kg.forwardRef(({theme:e="system",children:a,setTheme:o,className:r,style:s,UNSAFE_domProps:t,"data-blockid":n},i)=>{let{direction:l}=Qg(),{colorScheme:p,reducedMotion:d,highContrast:u,transparency:c}=Kt(),{name:f,theme:g}=Gg(()=>{switch(e){case"system":return p==="light"?Er.LIGHT:Er.DARK;case"light":return Er.LIGHT;case"dark":return Er.DARK;default:return{name:"custom",theme:e}}},[p,e]),b={"data-theme":f,"data-blockid":n,"data-reduced-motion":d,"data-high-contrast":u,"data-transparency":c};return lm(Ge.Provider,{value:{theme:g,setTheme:o},children:lm("div",{...Zg(t,b),className:Ug(jr,"BaselineUI-ThemeProvider",r),style:{...im(Yg,g),...im({[nm]:l==="rtl"?"-1":"1"}),...s},ref:i,children:a})})});Xe.displayName="ThemeProvider";import Sb from"react";import{useMenuTriggerState as Lb}from"react-stately";import{Slot as Pb}from"@radix-ui/react-slot";import Gr from"react";import{Item as zm,Section as zb}from"react-stately";import{classNames as kb,invariant as Rb}from"@baseline-ui/utils";import{mergeProps as wb,useMenuTrigger as Ib}from"react-aria";var pm=y({defaultClassName:"_1mdhlqv4",variantClassNames:{isOpen:{true:"_1mdhlqv5"}},defaultVariants:{},compoundVariants:[]}),qr="_1mdhlqv7 _1yep5z6aj _1yep5z6ar _1yep5z6az _1yep5z6b7 _1yep5z6bf",mm=y({defaultClassName:"_1mdhlqv1 _1yep5z66 _1yep5z67 _1yep5z68 _1yep5z62i _1yep5z62j _1yep5z62k _1yep5z63o _1yep5z63p _1yep5z63q _1yep5z61c _1yep5z61d _1yep5z61e _1yep5z6g7 _1yep5z6g8 _1yep5z6g9 _1yep5z6gy _1yep5z6gz _1yep5z6h0 _1yep5z69o _1yep5z69p _1yep5z69q _1yep5z6d2 _1yep5z6hy _1yep5z6hz _1yep5z6i0 _1yep5z6c6",variantClassNames:{isFocused:{false:"_1mdhlqv2"},isDisabled:{true:"z9nup83 _1yep5z6d6"}},defaultVariants:{},compoundVariants:[]}),dm="_1mdhlqv8 _1yep5z6aj _1yep5z6ar _1yep5z6az _1yep5z6b7 _1yep5z6e0",cm="_1yep5z66x _1yep5z66y _1yep5z66z",um="_1mdhlqv6 _1yep5z6g7 _1yep5z6g8 _1yep5z6g9 _1yep5z6gg _1yep5z6gh _1yep5z6gi _1yep5z6gy _1yep5z6gz _1yep5z6h0 _1yep5z69i _1yep5z69j _1yep5z69k";import{classNames as ob}from"@baseline-ui/utils";import{mergeRefs as rb}from"@react-aria/utils";import{animated as tb}from"@react-spring/web";import{assignInlineVars as ab}from"@vanilla-extract/dynamic";import bm,{useContext as sb,useEffect as nb}from"react";import{DismissButton as vm,Overlay as ib,usePopover as lb}from"react-aria";import{config as $g,useReducedMotion as Jg,useTransition as eb}from"@react-spring/web";function fm({placement:e}){let a=Jg();return eb(!0,{from:{opacity:0,transform:`translate3d(${e==="bottom"?"0, 4px, 0":"0, -4px, 0"})`},enter:{opacity:1,transform:"translate3d(0, 0, 0)"},immediate:!!a,config:$g.stiff})}var ym="_1gzftth1",gm="var(--_1gzftth0)";import{jsx as Ur,jsxs as hm}from"react/jsx-runtime";var Be=bm.forwardRef(({className:e,style:a,state:o,overlayProps:r,underlayClassName:s,children:t,...n},i)=>{let{theme:l}=sb(Ge),p=bm.useRef(null),{underlayProps:d,popoverProps:u,placement:c}=lb({...n,popoverRef:p},o),f=fm({placement:c});return nb(()=>(n.scrollRef?.current?.addEventListener("scroll",o.close),()=>{n.scrollRef?.current?.removeEventListener("scroll",o.close)}),[n.scrollRef,o.close,n.isNonModal]),f((g,b)=>b&&Ur(ib,{children:hm(Xe,{ref:i,theme:l,style:a,className:s,UNSAFE_domProps:r,children:[Ur("div",{...d}),hm(tb.div,{...u,style:{...u.style,...g,...ab({[gm]:`${n.triggerRef?.current?.offsetWidth}px`})},ref:rb(p,i),className:ob(ym,e),"data-placement":["top","bottom","left","right"].filter(v=>c?.includes(v)),children:[Ur(vm,{onDismiss:o.close}),t,Ur(vm,{onDismiss:o.close})]})]})}))});Be.displayName="PopoverContentCore";import{mergeRefs as bb}from"@react-aria/utils";import Pm from"react";import{mergeProps as vb,useKeyboard as hb,useMenu as _b}from"react-aria";import{useTreeState as Cb}from"react-stately";import{classNames as xb}from"@baseline-ui/utils";var _m="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 _1yep5z6aj _1yep5z6ar _1yep5z6az _1yep5z6b7 _1yep5z6j7 _1yep5z6j6 _1yep5z6fl _1yep5z6ja _1yep5z6e0",Cm="xyd2ss0 _1yep5z66 _1yep5z67 _1yep5z68 _1yep5z62i _1yep5z62j _1yep5z62k _1yep5z64l _1yep5z64m _1yep5z64n _1yep5z629 _1yep5z62a _1yep5z62b";import{invariant as pb}from"@baseline-ui/utils";import mb from"react";import{VisuallyHidden as db,mergeProps as cb,useFocusRing as ub,useMenuItem as fb,useMenuSection as yb}from"react-aria";import{Fragment as gb,jsx as go,jsxs as xm}from"react/jsx-runtime";var Gt=({section:e,showSelectedIcon:a,state:o})=>{let{itemProps:r,groupProps:s,headingProps:t}=yb({heading:e.value?.title,"aria-label":e["aria-label"]});return xm(gb,{children:[e.key!==o.collection.getFirstKey()&&go(E,{elementType:"li"}),xm("li",{...r,children:[e.value?.title&&go(db,{children:go("span",{...t,children:e.value.title})}),go("ul",{...s,className:Cm,children:[...e.childNodes].map(n=>(pb(n.type==="item"),go(Kr,{item:n,state:o,showSelectedIcon:a},n.key)))})]})]})};Gt.displayName="MenuSection";var Kr=({item:e,state:a,className:o,showSelectedIcon:r})=>{let s=mb.useRef(null),t=fb({key:e.key},a,s),{isFocusVisible:n,focusProps:i}=ub();return go(Lo,{item:e,liProps:cb(t.menuItemProps,i,{className:o}),...t,isFocusVisible:n,ref:s,description:e.value?.keyboardShortcut,descriptionProps:t.keyboardShortcutProps,_state:a,showSelectedIcon:r})};Kr.displayName="MenuItem";import{jsx as Xt}from"react/jsx-runtime";var Wt=Pm.forwardRef(({className:e,itemClassName:a,onContentKeyDown:o,...r},s)=>{let t=Cb(r),n=Pm.useRef(null),{menuProps:i}=_b(r,t,n),{keyboardProps:l}=hb({onKeyDown:o});return Xt("ul",{...vb(i,l),className:xb(_m,e),ref:bb(n,s),children:[...t.collection].map(p=>p.type==="section"?Xt(Gt,{section:p,state:t,showSelectedIcon:r.selectionMode==="multiple"||r.selectionMode==="single"},p.key):Xt(Kr,{item:p,state:t,className:a,showSelectedIcon:r.selectionMode==="multiple"||r.selectionMode==="single"},p.key))})});Wt.displayName="MenuContent";import{Fragment as Nb,jsx as eo,jsxs as Tb}from"react/jsx-runtime";var P9=Gr.createContext({menuTriggerProps:{}}),km=Gr.forwardRef(({isDisabled:e,contentClassName:a,state:o,placement:r="bottom start",isNonModal:s,shouldFlip:t,shouldUpdatePosition:n,boundaryElement:i,crossOffset:l,offset:p,triggerButton:d,...u},c)=>{let f=Gr.useRef(null),{menuTriggerProps:g,menuProps:b}=Ib({isDisabled:e,type:"menu"},o,f);return Tb(Nb,{children:[eo(Pb,{...wb(g,{isDisabled:e,popupPlacement:["top","bottom","right","left"].find(v=>r.includes(v)),isSelected:o.isOpen,className:"BaselineUI-Menu-Trigger"}),ref:f,children:d}),o.isOpen&&eo(Be,{triggerRef:f,state:o,placement:r,isNonModal:s,shouldFlip:t,shouldUpdatePosition:n,boundaryElement:i,crossOffset:l,offset:p||2,className:kb(qr,"BaselineUI-Menu-Popover"),children:eo(Wt,{className:a,...b,...u,ref:c,autoFocus:o.focusStrategy||"first"})})]})});km.displayName="MenuRoot";var Yt=Gr.forwardRef((e,a)=>{let o=e.children;return eo(km,{...e,ref:a,triggerButton:o,children:r=>"type"in r&&r.type==="section"?eo(zb,{items:r.children,title:r.title,children:s=>eo(zm,{children:s.label},s.id)},r.id):(Rb("label"in r,"Item doesn't have a label"),eo(zm,{textValue:r.label,children:r.label},r.id))})});Yt.displayName="MenuBase";import{jsx as Fb}from"react/jsx-runtime";var Rm=Sb.forwardRef(({defaultOpen:e,isOpen:a,onOpenChange:o,...r},s)=>{let t=Lb({defaultOpen:e,isOpen:a,onOpenChange:o});return Fb(Yt,{...r,state:t,ref:s})});Rm.displayName="Menu";import{mergeRefs as Mb}from"@react-aria/utils";import Im from"react";import{classNames as Bb,filterTruthyValues as jb}from"@baseline-ui/utils";import{mergeProps as Db,useFocusRing as Hb,useHover as Vb,useLink as Ob}from"react-aria";var wm=y({defaultClassName:"_13f0naj0",variantClassNames:{variant:{default:"_13f0naj1",inline:"_13f0naj2"},isHovered:{true:"_13f0naj3"},isFocusVisible:{true:"_13f0naj4"},isDisabled:{true:"_13f0naj5"},size:{sm:"_13f0naj6",md:"_13f0naj7",lg:"_13f0naj8"},isActive:{true:"_13f0naj9"}},defaultVariants:{},compoundVariants:[[{isActive:!0,isDisabled:!1},"_13f0naja"]]});import{jsx as Ab}from"react/jsx-runtime";var Nm=Im.forwardRef(({className:e,style:a,children:o,variant:r="default",size:s="md",elementType:t="a","data-blockid":n,...i},l)=>{let p=Im.useRef(null),{linkProps:d,isPressed:u}=Ob({...i,elementType:i.onPress?"span":t},p),{isFocusVisible:c,isFocused:f,focusProps:g}=Hb(),{hoverProps:b,isHovered:v}=Vb({isDisabled:i.isDisabled}),h=t,_=jb({"data-blockid":n,"data-disabled":i.isDisabled,"data-focused":f,"data-pressed":u,"data-focus-visible":c,"data-hovered":v});return Ab(h,{...Db(d,g,b,_),className:Bb(wm({variant:r,isFocusVisible:c,isHovered:v,isDisabled:i.isDisabled,size:s,isActive:u}),"BaselineUI-Link",e),ref:Mb(p,l),style:a,children:o})});Nm.displayName="Link";import{mergeRefs as qb}from"@react-aria/utils";import Bm from"react";import{classNames as Ub,invariant as Kb}from"@baseline-ui/utils";import{VisuallyHidden as Gb,mergeProps as jm,useDrop as Xb,useFocusRing as Wb,useHover as Yb}from"react-aria";import{invariant as Eb}from"@baseline-ui/utils";import{useId as Zt}from"react-aria";function Tm({isDisabled:e,onValueChange:a,onChange:o,name:r,"aria-describedby":s,"aria-label":t,accept:n,multiple:i}){let l=Zt(),p=Zt(),d=Zt();return{inputProps:{type:"file",id:p,disabled:!!e,"aria-labelledby":t?void 0:l,"aria-describedby":s||d,"aria-label":t,onChange:c=>{let f=[...c.target.files||[]];a?.(f),o?.(c)},name:r,accept:n,multiple:i},labelProps:{htmlFor:p,id:l},descriptionProps:{id:d}}}async function Qt({items:e}){let a=e.filter(o=>o.kind==="file").map(o=>(Eb(o.kind==="file"),o.getFile()));return await Promise.all(a)}var Sm=y({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"]]}),Lm=y({defaultClassName:"_180w5ede",variantClassNames:{disabled:{true:"_180w5edf"}},defaultVariants:{},compoundVariants:[]}),Fm=y({defaultClassName:"_180w5ed9",variantClassNames:{disabled:{true:"_180w5eda"}},defaultVariants:{},compoundVariants:[]}),Mm=y({defaultClassName:"_180w5edb",variantClassNames:{disabled:{true:"_180w5edc"},hovered:{true:"_180w5edd"}},defaultVariants:{},compoundVariants:[]});import{jsx as Ho,jsxs as Dm}from"react/jsx-runtime";var Hm=Bm.forwardRef(({className:e,label:a,description:o,icon:r,variant:s="default",...t},n)=>{let i=Bm.useRef(null),{inputProps:l,descriptionProps:p,labelProps:d}=Tm(t),{dropProps:u}=Xb({ref:i,onDrop:async({items:v})=>{let h=v.filter(C=>C.kind==="file").map(C=>(Kb(C.kind==="file"),C.getFile())),_=await Promise.all(h);t.onValueChange?.(_)}}),{focusProps:c,isFocusVisible:f}=Wb(),{hoverProps:g,isHovered:b}=Yb({isDisabled:t.isDisabled});return Dm("label",{...jm(u,g,d),className:Ub(Sm({variant:s,disabled:t.isDisabled,hoveredOrFocusedOrActive:b||f}),e),ref:qb(n,i),children:[Ho(Gb,{children:Ho("input",{...jm(c,l)})}),r&&Ho(r,{size:20,className:Fm({disabled:t.isDisabled})}),Dm("div",{children:[Ho("div",{className:Mm({disabled:t.isDisabled,hovered:b}),children:a}),o&&Ho("div",{...p,className:Lm({disabled:t.isDisabled}),children:o})]})]})});Hm.displayName="FileUpload";import Zb from"react";import{classNames as Qb}from"@baseline-ui/utils";import{useId as $b,useProgressBar as Jb}from"react-aria";var Vm="_12vfhl40 z9nup81",Om="_12vfhl41 z9nup82",Am=y({defaultClassName:"_12vfhl48",variantClassNames:{variant:{success:"_12vfhl49",error:"_12vfhl4a",active:"_12vfhl4b"}},defaultVariants:{},compoundVariants:[]}),Em="_12vfhl42",qm="_12vfhl47",Um="_12vfhl46 z9nup82",Km="_12vfhl45",Gm=y({defaultClassName:"_12vfhl43 _12vfhl42",variantClassNames:{hasLabel:{false:"_12vfhl44"}},defaultVariants:{},compoundVariants:[]});import{jsx as Vo,jsxs as Xr}from"react/jsx-runtime";var Xm=Zb.forwardRef(({className:e,variant:a="active",showValue:o,description:r,errorMessage:s,...t},n)=>{let i=$b(),{labelProps:l,progressBarProps:p}=Jb({...t,"aria-describedby":r?i:t["aria-describedby"]}),{minValue:d=0,maxValue:u=100,value:c=0,label:f}=t,g=(c-d)/(u-d),b=`${Math.round(g*100)}%`,v=Vo("output",{className:Gm({hasLabel:!!f}),children:p["aria-valuetext"]}),h=a==="error"?s:r;return Xr("div",{...p,className:Qb(Vm,e),ref:n,children:[f&&Xr("div",{className:Om,children:[Vo("label",{...l,className:Em,children:f}),o&&v]}),Xr("div",{className:Km,children:[Xr("div",{className:Um,children:[Vo("div",{className:qm,children:Vo("div",{style:{width:b},className:Am({variant:a})})}),!f&&o&&v]}),h&&Vo("div",{className:mo({hasError:a==="error"}),id:i,children:h})]})]})});Xm.displayName="ProgressBar";import Wm from"react";import{classNames as $t}from"@baseline-ui/utils";import{mergeProps as tv,useFocusRing as av,useHover as sv,useTextField as nv}from"react-aria";import{ErrorFilledIcon as ev,ReadOnlyIcon as ov,WarningFilledIcon as rv}from"@baseline-ui/icons/16";function Wr({isReadOnly:e,validationState:a}){return e?ov:a==="error"?ev:a==="warning"?rv:null}import{jsx as Jt,jsxs as Yr}from"react/jsx-runtime";var Ym=Wm.forwardRef(({className:e,validationState:a="valid",variant:o="primary",style:r,labelPosition:s="top",inputStyle:t,inputClassName:n,...i},l)=>{let p=Wm.useRef(null),{inputProps:d,labelProps:u,descriptionProps:c,errorMessageProps:f}=nv({...i,validationState:a==="error"?"invalid":"valid"},p),{hoverProps:g,isHovered:b}=sv({isDisabled:i.isDisabled}),{isFocused:v,focusProps:h}=av(),_=Wr({isReadOnly:i.isReadOnly,validationState:a}),C=Ue({...i,descriptionProps:c,errorMessageProps:f,labelPosition:s});return Yr("div",{className:$t(qe({labelPosition:s}),e),style:r,ref:l,children:[Yr("div",{className:Ee({labelPosition:s,hasMessage:!!C}),children:[Jt("label",{...u,className:Ae,children:i.label}),s==="start"&&C]}),Yr("div",{className:$t({[po]:i.isDisabled}),children:[Yr("div",{...g,className:uo({validationState:a,isHovered:b,isFocused:v,variant:o,isReadOnly:!!i.isReadOnly,isDisabled:!!i.isDisabled}),children:[Jt("input",{...tv(d,h),className:$t(Dr({isDisabled:i.isDisabled,labelPosition:s}),n),style:t,ref:p}),_&&Jt(_,{className:co({validationState:a,isReadOnly:i.isReadOnly}),size:16})]}),s==="top"&&C]})]})});Ym.displayName="TextInput";import{CheckmarkIcon as mv}from"@baseline-ui/icons/20";import{CheckmarkIcon as dv}from"@baseline-ui/icons/16";import{classNames as cv}from"@baseline-ui/utils";import ed from"react";import{VisuallyHidden as uv,useFocusRing as fv,useHover as yv,useSwitch as gv}from"react-aria";import{useToggleState as bv}from"react-stately";import{useNumberFormatter as iv}from"react-aria";import{Fragment as lv,jsx as pv}from"react/jsx-runtime";var bo=({value:e,...a})=>{let o=iv(a);return pv(lv,{children:o.format(e)})};bo.displayName="NumberFormat";var Zm="_1yep5z6ga _1yep5z6gb _1yep5z6gc",Qm=y({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"]]}),$m=y({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"]]}),Jm=y({defaultClassName:"_9b1tmlc",variantClassNames:{isDisabled:{true:"_9b1tmld"},isReadOnly:{true:"_9b1tmle"}},defaultVariants:{},compoundVariants:[]});import{jsx as vo,jsxs as od}from"react/jsx-runtime";var rd=ed.forwardRef(({className:e,count:a,style:o,size:r="md",icon:s,...t},n)=>{let i={isRequired:!1},l=s||(r==="md"?mv:dv);!t["aria-label"]&&!t["aria-labelledby"]&&console.warn("You must provide either an `aria-label` or `aria-labelledby` prop to the `Reaction` component.");let p=ed.useRef(null),d=bv({...t,...i}),{inputProps:u,isPressed:c,isDisabled:f,isReadOnly:g,isSelected:b}=gv({...t,...i},d,p),{focusProps:v,isFocused:h,isFocusVisible:_}=fv(),{hoverProps:C,isHovered:P}=yv({});return od("label",{ref:n,style:o,className:cv(Zm,"BaselineUI-Reaction",e),"data-blockid":t["data-blockid"],"data-focused":h,"data-focus-visible":_,"data-disabled":f,"data-hovered":P,"data-pressed":c,"data-selected":b,children:[vo(uv,{children:vo("input",{...u,...v,ref:p})}),od("div",{...C,className:Qm({isSelected:b,isFocusVisible:_,isHovered:P,isReadOnly:g,isDisabled:f}),children:[vo("div",{className:Jm({isDisabled:f,isReadOnly:g}),children:vo(l,{size:r==="md"?20:16})}),vo("div",{className:$m({isSelected:d.isSelected,isDisabled:f,isReadOnly:g,size:r}),children:vo(bo,{value:a})})]})]})});rd.displayName="Reaction";import{mergeRefs as Zv}from"@react-aria/utils";import ta from"react";import{useOverlayPosition as Qv,useTooltipTrigger as $v}from"react-aria";import{useTooltipTriggerState as Jv}from"react-stately";import{FocusableProvider as e1}from"@react-aria/focus";import vv,{useMemo as hv}from"react";import{mergeProps as _v,useTooltip as Cv}from"react-aria";import{animated as xv,useReducedMotion as Pv,useSpring as zv}from"@react-spring/web";var td=y({defaultClassName:"_1jwycy80",variantClassNames:{placement:{bottom:"_1jwycy81",left:"_1jwycy82",right:"_1jwycy83",top:"_1jwycy84"}},defaultVariants:{},compoundVariants:[]}),ad="_1jwycy85 _1yep5z63u _1yep5z63v _1yep5z63w _1yep5z61i _1yep5z61j _1yep5z61k _1yep5z66 _1yep5z67 _1yep5z68 _1yep5z62i _1yep5z62j _1yep5z62k _1yep5z6aj _1yep5z6ar _1yep5z6az _1yep5z6b7 _1yep5z6e8 _1yep5z6d7 _1yep5z6cf";import{jsx as sd,jsxs as kv}from"react/jsx-runtime";var ea=vv.forwardRef(({children:e,state:a,overlayProps:o,arrowProps:r,placement:s,tooltipProps:t},n)=>{let{tooltipProps:i}=Cv({isOpen:a.isOpen},a),l=hv(()=>{switch(s){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}}},[s]),p=Pv(),[d]=zv(()=>({from:{opacity:0,transform:`translate(${l.x}px, ${l.y}px)`},to:{opacity:1,transform:"translate(0, 0)"},immediate:!!p})),u=s==="center"?"bottom":s;return kv(xv.span,{...o,style:{...d,...o.style},ref:n,"data-placement":u,children:[sd("div",{className:td({placement:u}),...r}),sd("div",{..._v(i,t),className:ad,children:e})]})});ea.displayName="TooltipContent";import Rv,{useContext as wv}from"react";import{Overlay as Iv}from"react-aria";import{jsx as nd}from"react/jsx-runtime";var Zr=Rv.forwardRef(({className:e,children:a,...o},r)=>{let{theme:s}=wv(Ge);return nd(Iv,{...o,children:nd(Xe,{ref:r,theme:s,className:e,children:a})})});Zr.displayName="Portal";import Nv,{useEffect as id}from"react";function ld({ref:e,onIntersect:a,isDisabled:o,threshold:r,rootMargin:s,root:t}){let n=Nv.useRef(null);id(()=>{if(o){n.current?.disconnect(),n.current=null;return}n.current=new IntersectionObserver(([i])=>{a(i)},{root:t?.current,rootMargin:s,threshold:r})},[a,o,t,s,r]),id(()=>{let{current:i}=n;return e.current&&i?.observe(e.current),()=>i?.disconnect()},[e])}import Qr from"react";function pd({ref:e,onResize:a,isDisabled:o}){let r=Qr.useRef(null),[s,t]=Qr.useState();return Qr.useEffect(()=>{if(o){r.current?.disconnect(),r.current=null;return}r.current=new ResizeObserver(([n])=>{t(n.contentRect),a?.(n)})},[a,o,t]),Qr.useEffect(()=>{let{current:n}=r;return e.current&&n?.observe(e.current),()=>n?.disconnect()},[e]),{size:s}}import{useEffect as Tv,useState as oa}from"react";function $r({src:e,alt:a}){let[o,r]=oa(!1),[s,t]=oa(!1),[n,i]=oa(!1),l=()=>{r(!0),i(!1)},p=()=>{t(!0),i(!1)};return Tv(()=>{if(!e)return;i(!0);let d=new Image;return d.src=e,d.addEventListener("load",l),d.addEventListener("error",p),()=>{d.removeEventListener("load",l),d.removeEventListener("error",p)}},[e]),{isLoaded:o,hasError:s,isLoading:n,imgProps:{src:o?e:void 0,alt:a}}}import{useGranularEffect as Fv}from"granular-hooks";import{useReducer as Mv,useRef as Bv}from"react";import{useEffect as Sv,useRef as Lv}from"react";function ho(){let e=Lv(!0);return Sv(()=>{e.current=!1},[]),e.current}var md="SET_STATE",Jr="UNDO",et="REDO",jv=(e,a)=>{let{past:o,present:r,future:s}=e;switch(a.type){case md:return{past:[...o,r],present:a.data,future:[]};case Jr:return{past:o.slice(0,o?.length-1),present:o[o?.length-1],future:[r,...s]};case et:return{past:[...o,r],present:s[0],future:s.slice(1)};default:throw new Error("Invalid action type")}},dd=(e={},{isDisabled:a,onAction:o})=>{let r=ho(),[s,t]=Mv(jv,{past:[],present:e,future:[]}),{past:n,present:i,future:l}=s,p=b=>t({type:md,data:b}),d=Bv(),u=()=>{d.current=Jr,t({type:Jr})},c=()=>{d.current=et,t({type:et})},f=!!n?.length,g=!!l?.length;return Fv(()=>{(d.current===Jr||d.current===et)&&(o?.(i,d.current),d.current=void 0)},[i],[o,r]),{state:i,push:a?()=>{}:p,undo:a?()=>{}:u,redo:a?()=>{}:c,pastStates:n,futureStates:l,canUndo:f,canRedo:g}};import{cleanKeyFromGlobImport as Vv}from"@baseline-ui/utils";import{useContext as Ov}from"react";import{useLocale as Av,useMessageFormatter as Ev}from"react-aria";import{I18nProvider as Dv}from"react-aria";import Hv from"react";import{jsx as cd}from"react/jsx-runtime";var ra=Hv.createContext({messages:{}}),ud=({children:e,messages:a={},...o})=>cd(Dv,{...o,children:cd(ra.Provider,{value:{messages:a},children:e})});ud.displayName="I18nProvider";function V(e){let{messages:a}=Ov(ra),o=Ev(e?Vv(e):a),r=Av();return{formatMessage:(s,t)=>{if(typeof s=="object")try{return o(s.id,t)}catch{return s.defaultMessage||s.id}else try{return o(s,t)}catch{return s}},locale:r}}function XV(e){return Object.fromEntries(Object.keys(e).map(a=>[a,e[a].id]))}import fd from"react";function ZV(e,a,o){let r=fd.useRef(null);return fd.useEffect(()=>{if(e)return r.current=new MutationObserver(o),r.current.observe(e,a),()=>{r.current&&r.current.disconnect()}},[e,a,o]),r.current}import{useState as qv}from"react";function yd(e,a){let[o,r]=qv(()=>{try{let t=window.localStorage.getItem(e);return t?JSON.parse(t):a}catch(t){return console.log(t),a}});return[o,t=>{try{let n=t instanceof Function?t(o):t;r(n),window.localStorage.setItem(e,JSON.stringify(n))}catch(n){console.log(n)}}]}import Uv,{useEffect as Kv}from"react";import{usePress as Gv}from"react-aria";function rO({ref:e,onSelectionChange:a,onSelectionEnd:o,isDisabled:r}){let s=Uv.useRef(null);Gv({ref:e,isDisabled:r,onPressEnd(){let t=window.getSelection();t&&e.current?.contains(t.anchorNode)&&o?.(t)},onPressStart(){s.current=window.getSelection(),s.current&&s.current.removeAllRanges()}}),Kv(()=>{if(!e.current||r)return;function n(){let i=window.getSelection();i&&e.current?.contains(i.anchorNode)&&a(i)}return document.addEventListener("selectionchange",n),()=>{document.removeEventListener("selectionchange",n)}},[e,a,r])}import{queries as gd}from"@baseline-ui/tokens";import{getOwnerWindow as Xv,useLayoutEffect as Wv}from"@react-aria/utils";import Yv from"react";function bd(e){let[a,o]=Yv.useState("mobile");return Wv(()=>{let r=Xv(e||document.body),s=r.matchMedia(gd.tablet),t=r.matchMedia(gd.desktop),n=()=>{s.matches?o("tablet"):t.matches?o("desktop"):o("mobile")};return r.addEventListener("resize",n),n(),()=>{r.removeEventListener("resize",n)}},[e]),a}import{jsx as vd,jsxs as o1}from"react/jsx-runtime";var hd=ta.forwardRef(({children:e,placement:a="bottom",delay:o=1e3,closeDelay:r=500,...s},t)=>{let n=ta.useRef(null),i=ta.useRef(null),l=!s.text||s.isDisabled,p=Jv({...s,delay:o,closeDelay:r,isDisabled:l}),{triggerProps:d,tooltipProps:u}=$v({...s,isDisabled:l,delay:o,closeDelay:r},p,n),{overlayProps:c,arrowProps:f,placement:g,updatePosition:b}=Qv({arrowSize:13,targetRef:n,arrowBoundaryOffset:8,offset:12,overlayRef:i,placement:a,isOpen:p.isOpen,...s});return ld({ref:i,threshold:1,onIntersect:b,isDisabled:!p.isOpen}),pd({ref:n,onResize:b,isDisabled:!p.isOpen}),o1(e1,{...d,ref:n,children:[e,p.isOpen&&vd(Zr,{disableFocusManagement:!0,children:vd(ea,{ref:Zv(t,i),state:p,arrowProps:f,overlayProps:c,placement:g,tooltipProps:u,children:s.text})})]})});hd.displayName="Tooltip";import r1 from"react";import{classNames as t1}from"@baseline-ui/utils";import{CheckFilledIcon as a1,ErrorAltFilledIcon as s1}from"@baseline-ui/icons/16";import{CheckFilledIcon as n1,ErrorAltFilledIcon as i1}from"@baseline-ui/icons/20";import{useProgressBar as l1}from"react-aria";import{assignInlineVars as p1}from"@vanilla-extract/dynamic";var _d="_1azy5686",Cd="_1azy5685",xd="var(--_1azy5680)",Pd="_1azy5688",zd="_1azy5689",kd="_1azy5681 z9nup82",Rd="_1azy5682";var wd="_1azy5687";import{jsx as Oo,jsxs as aa}from"react/jsx-runtime";var m1={sm:16,md:20},d1={sm:[a1,s1],md:[n1,i1]},ot=r1.forwardRef(({className:e,style:a,size:o="md",variant:r="active",...s},t)=>{let{labelProps:n,progressBarProps:i}=l1({...s,isIndeterminate:!0}),l=m1[o],p=l/2-2,d=2*p*Math.PI,u=d1[o][r==="success"?0:1];return aa("div",{className:t1(kd,e),ref:t,style:{...p1({[xd]:`${d}px`}),...a},children:[aa("div",{...i,className:Rd,children:[(r==="active"||r==="inactive")&&aa("svg",{height:l,width:l,viewBox:`0 0 ${l} ${l}`,children:[Oo("circle",{role:"presentation",className:_d,cx:l/2,cy:l/2,r:p}),r==="active"&&Oo("circle",{role:"presentation",className:Cd,cx:l/2,cy:l/2,r:p})]}),r==="success"&&Oo(u,{className:wd,size:l}),r==="error"&&Oo(u,{className:Pd,size:l})]}),s.label&&Oo("span",{...n,className:zd,children:s.label})]})});ot.displayName="ProgressSpinner";import{mergeRefs as c1}from"@react-aria/utils";import Nd from"react";import{classNames as u1,filterTruthyValues as f1}from"@baseline-ui/utils";import{mergeProps as y1,useFocusRing as g1,useHover as b1,useToggleButton as v1}from"react-aria";import{useToggleState as h1}from"react-stately";var Id=y({defaultClassName:"_5uw3kp0 oom8bs0 z9nup82",variantClassNames:{isHovered:{true:"_5uw3kp1"},isFocusVisible:{true:"_5uw3kp2"},isDisabled:{true:"_5uw3kp3"},isSelected:{true:"_5uw3kp4"},size:{md:"_5uw3kp5",lg:"_5uw3kp6"}},defaultVariants:{},compoundVariants:[[{isSelected:!0,isFocusVisible:!0},"_5uw3kp7"]]});import{jsx as C1,jsxs as x1}from"react/jsx-runtime";var _1={md:20,lg:24},Td=Nd.forwardRef(({className:e,style:a,iconStart:o,size:r="md",elementType:s="button",...t},n)=>{let i=Nd.useRef(null),l=h1(t),{buttonProps:p,isPressed:d}=v1(t,l,i),{hoverProps:u,isHovered:c}=b1({isDisabled:t.isDisabled}),{isFocusVisible:f,isFocused:g,focusProps:b}=g1(),v=f1({"data-blockid":t["data-blockid"],"data-focused":g,"data-focus-visible":f,"data-disabled":t.isDisabled,"data-hovered":c,"data-pressed":d,"data-selected":l.isSelected});return x1(s,{...y1(p,u,b,v),className:u1(Id({isHovered:c,isFocusVisible:f,isSelected:l.isSelected,size:r,isDisabled:t.isDisabled}),"BaselineUI-ToggleButton",e),style:a,ref:c1(i,n),children:[o&&C1(o,{size:_1[r]}),t.label]})});Td.displayName="ToggleButton";import Fd from"react";import{classNames as P1,filterTruthyValues as z1}from"@baseline-ui/utils";import{VisuallyHidden as k1,mergeProps as R1,useCheckbox as w1,useFocusRing as I1,useHover as N1}from"react-aria";import{useToggleState as T1}from"react-stately";import{CheckmarkIcon as S1,MinusIcon as L1}from"@baseline-ui/icons/12";var rt=y({defaultClassName:"_16vugd0e",variantClassNames:{isDisabled:{true:"_16vugd0f"}},defaultVariants:{},compoundVariants:[]}),Sd=y({defaultClassName:"_16vugd01 _1yep5z6g7 _1yep5z6g8 _1yep5z6g9 _1yep5z6gy _1yep5z6gz _1yep5z6h0",variantClassNames:{labelPosition:{end:"_1yep5z6zy _1yep5z6zz _1yep5z6100 _1yep5z6t0 _1yep5z6t1 _1yep5z6t2",start:"_1yep5z6104 _1yep5z6105 _1yep5z6106 _1yep5z611g _1yep5z611h _1yep5z611i"}},defaultVariants:{},compoundVariants:[]}),Ld=y({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"]]});import{jsx as Ao,jsxs as Md}from"react/jsx-runtime";var Bd=Fd.forwardRef(({className:e,style:a,label:o,labelPosition:r="end","data-blockid":s,...t},n)=>{let i=Fd.useRef(null),l=T1(t),{isFocusVisible:p,isFocused:d,focusProps:u}=I1(),{inputProps:c,isPressed:f,isDisabled:g,isSelected:b,isReadOnly:v}=w1({...t,children:o},l,i),{hoverProps:h,isHovered:_}=N1({isDisabled:g}),C=z1({"data-disabled":g,"data-readonly":v,"data-hovered":_,"data-selected":b,"data-pressed":f,"data-indeterminate":t.isIndeterminate,"data-invalid":t.isInvalid,"data-focus-visible":p,"data-focused":d,"data-blockid":s});return Md("label",{...C,className:P1(Sd({labelPosition:r}),"BaselineUI-Checkbox",e),style:a,ref:n,children:[Ao(k1,{children:Ao("input",{...R1(c,u),ref:i})}),Md("div",{...h,className:Ld({isSelected:b&&!t.isIndeterminate,isIndeterminate:t.isIndeterminate,isFocusVisible:p,isDisabled:g,isReadOnly:v,hasError:t.isInvalid,isHovered:_}),children:[b&&!t.isIndeterminate&&Ao(S1,{size:12}),t.isIndeterminate&&Ao(L1,{size:12})]}),o&&Ao("span",{className:rt({isDisabled:g}),children:o})]})});Bd.displayName="Checkbox";import Ad from"react";import{classNames as Ed,filterTruthyValues as DC}from"@baseline-ui/utils";import{mergeProps as qd,useFocusRing as HC,useHover as VC,useLocale as OC,useNumberField as AC}from"react-aria";import{useNumberFieldState as EC}from"react-stately";import{CaretLeftIcon as qC,CaretRightIcon as UC}from"@baseline-ui/icons/12";import{CaretLeftIcon as KC,CaretRightIcon as GC}from"@baseline-ui/icons/16";import{CaretLeftIcon as XC,CaretRightIcon as WC}from"@baseline-ui/icons/20";import{CaretLeftIcon as YC,CaretRightIcon as ZC}from"@baseline-ui/icons/24";var sa={};m(sa,{default:()=>D1,goToPage:()=>F1,nextPage:()=>M1,pageXofY:()=>B1,prevPage:()=>j1});var F1="\u0627\u0646\u062A\u0642\u0627\u0644 \u0625\u0644\u0649 \u0635\u0641\u062D\u0629",M1="\u0627\u0644\u0635\u0641\u062D\u0629 \u0627\u0644\u062A\u0627\u0644\u064A\u0629",B1="\u0635\u0641\u062D\u0629 {arg0} \u0645\u0646 {arg1}",j1="\u0627\u0644\u0635\u0641\u062D\u0629 \u0627\u0644\u0633\u0627\u0628\u0642\u0629",D1={goToPage:F1,nextPage:M1,pageXofY:B1,prevPage:j1};var na={};m(na,{default:()=>E1,goToPage:()=>H1,nextPage:()=>V1,pageXofY:()=>O1,prevPage:()=>A1});var H1="P\u0159ej\xEDt na stranu",V1="Dal\u0161\xED str\xE1nka",O1="Strana {arg0} z {arg1}",A1="P\u0159edchoz\xED strana",E1={goToPage:H1,nextPage:V1,pageXofY:O1,prevPage:A1};var ia={};m(ia,{default:()=>X1,goToPage:()=>q1,nextPage:()=>U1,pageXofY:()=>K1,prevPage:()=>G1});var q1="Mynd i Dudalen",U1="Tudalen Nesaf",K1="Tudalen {arg0} o {arg1}",G1="Tudalen Blaenorol",X1={goToPage:q1,nextPage:U1,pageXofY:K1,prevPage:G1};var la={};m(la,{default:()=>$1,goToPage:()=>W1,nextPage:()=>Y1,pageXofY:()=>Z1,prevPage:()=>Q1});var W1="G\xE5 til side",Y1="N\xE6ste side",Z1="Side {arg0} af {arg1}",Q1="Forrige side",$1={goToPage:W1,nextPage:Y1,pageXofY:Z1,prevPage:Q1};var pa={};m(pa,{default:()=>th,goToPage:()=>J1,nextPage:()=>eh,pageXofY:()=>oh,prevPage:()=>rh});var J1="Zu Seite wechseln",eh="N\xE4chste Seite",oh="Seite {arg0} von {arg1}",rh="Vorherige Seite",th={goToPage:J1,nextPage:eh,pageXofY:oh,prevPage:rh};var ma={};m(ma,{default:()=>lh,goToPage:()=>ah,nextPage:()=>sh,pageXofY:()=>nh,prevPage:()=>ih});var ah="\u039C\u03B5\u03C4\u03AC\u03B2\u03B1\u03C3\u03B7 \u03C3\u03C4\u03B7 \u03C3\u03B5\u03BB\u03AF\u03B4\u03B1",sh="\u0395\u03C0\u03CC\u03BC\u03B5\u03BD\u03B7 \u03C3\u03B5\u03BB\u03AF\u03B4\u03B1",nh="\u03A3\u03B5\u03BB\u03AF\u03B4\u03B1 {arg0} \u03B1\u03C0\u03CC {arg1}",ih="\u03A0\u03C1\u03BF\u03B7\u03B3\u03BF\u03CD\u03BC\u03B5\u03BD\u03B7 \u03C3\u03B5\u03BB\u03AF\u03B4\u03B1",lh={goToPage:ah,nextPage:sh,pageXofY:nh,prevPage:ih};var da={};m(da,{default:()=>uh,goToPage:()=>ph,nextPage:()=>mh,pageXofY:()=>dh,prevPage:()=>ch});var ph="Go to Page",mh="Next Page",dh="Page {arg0} of {arg1}",ch="Previous Page",uh={goToPage:ph,nextPage:mh,pageXofY:dh,prevPage:ch};var ca={};m(ca,{default:()=>vh,goToPage:()=>fh,nextPage:()=>yh,pageXofY:()=>gh,prevPage:()=>bh});var fh="Go to Page",yh="Next Page",gh="Page {arg0} of {arg1}",bh="Previous Page",vh={goToPage:fh,nextPage:yh,pageXofY:gh,prevPage:bh};var ua={};m(ua,{default:()=>Ph,goToPage:()=>hh,nextPage:()=>_h,pageXofY:()=>Ch,prevPage:()=>xh});var hh="Ir a la p\xE1gina",_h="P\xE1gina siguiente",Ch="P\xE1gina {arg0} de {arg1}",xh="P\xE1gina anterior",Ph={goToPage:hh,nextPage:_h,pageXofY:Ch,prevPage:xh};var fa={};m(fa,{default:()=>Ih,goToPage:()=>zh,nextPage:()=>kh,pageXofY:()=>Rh,prevPage:()=>wh});var zh="Mene sivulle",kh="Seuraava sivu",Rh="Sivu {arg0} / {arg1}",wh="Edellinen sivu",Ih={goToPage:zh,nextPage:kh,pageXofY:Rh,prevPage:wh};var ya={};m(ya,{default:()=>Fh,goToPage:()=>Nh,nextPage:()=>Th,pageXofY:()=>Sh,prevPage:()=>Lh});var Nh="Aller \xE0 la page",Th="Page suivante",Sh="Page {arg0} sur {arg1}",Lh="Page pr\xE9c\xE9dente",Fh={goToPage:Nh,nextPage:Th,pageXofY:Sh,prevPage:Lh};var ga={};m(ga,{default:()=>Hh,goToPage:()=>Mh,nextPage:()=>Bh,pageXofY:()=>jh,prevPage:()=>Dh});var Mh="Aller \xE0 la page",Bh="Page suivante",jh="Page {arg0} sur {arg1}",Dh="Page pr\xE9c\xE9dente",Hh={goToPage:Mh,nextPage:Bh,pageXofY:jh,prevPage:Dh};var ba={};m(ba,{default:()=>qh,goToPage:()=>Vh,nextPage:()=>Oh,pageXofY:()=>Ah,prevPage:()=>Eh});var Vh="\u05DE\u05E2\u05D1\u05E8 \u05DC\u05E2\u05DE\u05D5\u05D3",Oh="\u05D4\u05E2\u05DE\u05D5\u05D3 \u05D4\u05D1\u05D0",Ah="\u05E2\u05DE\u05D5\u05D3 {arg0} \u05DE\u05EA\u05D5\u05DA {arg1}",Eh="\u05D4\u05E2\u05DE\u05D5\u05D3 \u05D4\u05E7\u05D5\u05D3\u05DD",qh={goToPage:Vh,nextPage:Oh,pageXofY:Ah,prevPage:Eh};var va={};m(va,{default:()=>Wh,goToPage:()=>Uh,nextPage:()=>Kh,pageXofY:()=>Gh,prevPage:()=>Xh});var Uh="Idi na stranicu",Kh="Slijede\u0107a stranica",Gh="Stranica {arg0} od {arg1}",Xh="Prethodna stranica",Wh={goToPage:Uh,nextPage:Kh,pageXofY:Gh,prevPage:Xh};var ha={};m(ha,{default:()=>Jh,goToPage:()=>Yh,nextPage:()=>Zh,pageXofY:()=>Qh,prevPage:()=>$h});var Yh="Buka halaman",Zh="Halaman Berikutnya",Qh="Halaman {arg0} dari {arg1}",$h="Halaman Sebelumnya",Jh={goToPage:Yh,nextPage:Zh,pageXofY:Qh,prevPage:$h};var _a={};m(_a,{default:()=>a_,goToPage:()=>e_,nextPage:()=>o_,pageXofY:()=>r_,prevPage:()=>t_});var e_="Vai a pagina",o_="Pagina successiva",r_="Pagina {arg0} di {arg1}",t_="Pagina precedente",a_={goToPage:e_,nextPage:o_,pageXofY:r_,prevPage:t_};var Ca={};m(Ca,{default:()=>p_,goToPage:()=>s_,nextPage:()=>n_,pageXofY:()=>i_,prevPage:()=>l_});var s_="\u30DA\u30FC\u30B8\u306B\u79FB\u52D5",n_="\u6B21\u306E\u30DA\u30FC\u30B8",i_="\u30DA\u30FC\u30B8 {arg0}/{arg1}",l_="\u524D\u306E\u30DA\u30FC\u30B8",p_={goToPage:s_,nextPage:n_,pageXofY:i_,prevPage:l_};var xa={};m(xa,{default:()=>f_,goToPage:()=>m_,nextPage:()=>d_,pageXofY:()=>c_,prevPage:()=>u_});var m_="\uD398\uC774\uC9C0\uB85C \uC774\uB3D9",d_="\uB2E4\uC74C \uD398\uC774\uC9C0",c_="{arg0}/{arg1} \uD398\uC774\uC9C0",u_="\uC774\uC804 \uD398\uC774\uC9C0",f_={goToPage:m_,nextPage:d_,pageXofY:c_,prevPage:u_};var Pa={};m(Pa,{default:()=>h_,goToPage:()=>y_,nextPage:()=>g_,pageXofY:()=>b_,prevPage:()=>v_});var y_="Pergi ke Halaman",g_="Halaman Seterusnya",b_="Halaman {arg0} daripada {arg1}",v_="Halaman Sebelumnya",h_={goToPage:y_,nextPage:g_,pageXofY:b_,prevPage:v_};var za={};m(za,{default:()=>z_,goToPage:()=>__,nextPage:()=>C_,pageXofY:()=>x_,prevPage:()=>P_});var __="G\xE5 til side",C_="Neste side",x_="Side {arg0} av {arg1}",P_="Forrige side",z_={goToPage:__,nextPage:C_,pageXofY:x_,prevPage:P_};var ka={};m(ka,{default:()=>N_,goToPage:()=>k_,nextPage:()=>R_,pageXofY:()=>w_,prevPage:()=>I_});var k_="Ga naar pagina",R_="Volgende pagina",w_="Pagina {arg0} van {arg1}",I_="Vorige pagina",N_={goToPage:k_,nextPage:R_,pageXofY:w_,prevPage:I_};var Ra={};m(Ra,{default:()=>M_,goToPage:()=>T_,nextPage:()=>S_,pageXofY:()=>L_,prevPage:()=>F_});var T_="Przejd\u017A do strony",S_="Nast\u0119pna strona",L_="Strona {arg0} z {arg1}",F_="Poprzednia strona",M_={goToPage:T_,nextPage:S_,pageXofY:L_,prevPage:F_};var wa={};m(wa,{default:()=>V_,goToPage:()=>B_,nextPage:()=>j_,pageXofY:()=>D_,prevPage:()=>H_});var B_="Ir para p\xE1gina",j_="P\xE1gina seguinte",D_="P\xE1gina {arg0} de {arg1}",H_="P\xE1gina anterior",V_={goToPage:B_,nextPage:j_,pageXofY:D_,prevPage:H_};var Ia={};m(Ia,{default:()=>U_,goToPage:()=>O_,nextPage:()=>A_,pageXofY:()=>E_,prevPage:()=>q_});var O_="Ir \xE0 P\xE1gina",A_="P\xE1gina Seguinte",E_="P\xE1gina {arg0} de {arg1}",q_="P\xE1gina Anterior",U_={goToPage:O_,nextPage:A_,pageXofY:E_,prevPage:q_};var Na={};m(Na,{default:()=>Y_,goToPage:()=>K_,nextPage:()=>G_,pageXofY:()=>X_,prevPage:()=>W_});var K_="\u041F\u0435\u0440\u0435\u0439\u0442\u0438 \u043A \u0441\u0442\u0440\u0430\u043D\u0438\u0446\u0435",G_="\u0421\u043B\u0435\u0434\u0443\u044E\u0449\u0430\u044F \u0441\u0442\u0440\u0430\u043D\u0438\u0446\u0430",X_="\u0421\u0442\u0440\u0430\u043D\u0438\u0446\u0430 {arg0} \u0438\u0437 {arg1}",W_="\u041F\u0440\u0435\u0434\u044B\u0434\u0443\u0449\u0430\u044F \u0441\u0442\u0440\u0430\u043D\u0438\u0446\u0430",Y_={goToPage:K_,nextPage:G_,pageXofY:X_,prevPage:W_};var Ta={};m(Ta,{default:()=>eC,goToPage:()=>Z_,nextPage:()=>Q_,pageXofY:()=>$_,prevPage:()=>J_});var Z_="\xCDs\u0165 na stranu",Q_="Dal\u0161ia strana",$_="Strana {arg0} z {arg1}",J_="Predch\xE1dzaj\xFAca strana",eC={goToPage:Z_,nextPage:Q_,pageXofY:$_,prevPage:J_};var Sa={};m(Sa,{default:()=>sC,goToPage:()=>oC,nextPage:()=>rC,pageXofY:()=>tC,prevPage:()=>aC});var oC="Pojdi na stran",rC="Naslednja stran",tC="Stran {arg0} od {arg1}",aC="Prej\u0161nja stran",sC={goToPage:oC,nextPage:rC,pageXofY:tC,prevPage:aC};var La={};m(La,{default:()=>mC,goToPage:()=>nC,nextPage:()=>iC,pageXofY:()=>lC,prevPage:()=>pC});var nC="G\xE5 till sida",iC="N\xE4sta sida",lC="Sida {arg0} av {arg1}",pC="F\xF6reg\xE5ende sida",mC={goToPage:nC,nextPage:iC,pageXofY:lC,prevPage:pC};var Fa={};m(Fa,{default:()=>yC,goToPage:()=>dC,nextPage:()=>cC,pageXofY:()=>uC,prevPage:()=>fC});var dC="\u0E44\u0E1B\u0E17\u0E35\u0E48\u0E2B\u0E19\u0E49\u0E32",cC="\u0E2B\u0E19\u0E49\u0E32\u0E16\u0E31\u0E14\u0E44\u0E1B",uC="\u0E2B\u0E19\u0E49\u0E32 {arg0} \u0E08\u0E32\u0E01 {arg1}",fC="\u0E2B\u0E19\u0E49\u0E32\u0E01\u0E48\u0E2D\u0E19\u0E2B\u0E19\u0E49\u0E32",yC={goToPage:dC,nextPage:cC,pageXofY:uC,prevPage:fC};var Ma={};m(Ma,{default:()=>_C,goToPage:()=>gC,nextPage:()=>bC,pageXofY:()=>vC,prevPage:()=>hC});var gC="Sayfaya Git",bC="Sonraki Sayfa",vC="Sayfa {arg0}/{arg1}",hC="\xD6nceki Sayfa",_C={goToPage:gC,nextPage:bC,pageXofY:vC,prevPage:hC};var Ba={};m(Ba,{default:()=>kC,goToPage:()=>CC,nextPage:()=>xC,pageXofY:()=>PC,prevPage:()=>zC});var CC="\u041F\u0435\u0440\u0435\u0439\u0442\u0438 \u043D\u0430 \u0441\u0442\u043E\u0440\u0456\u043D\u043A\u0443",xC="\u041D\u0430\u0441\u0442\u0443\u043F\u043D\u0430 \u0441\u0442\u043E\u0440\u0456\u043D\u043A\u0430",PC="\u0421\u0442\u043E\u0440\u0456\u043D\u043A\u0430 {arg0} \u0437 {arg1}",zC="\u041F\u043E\u043F\u0435\u0440\u0435\u0434\u043D\u044F \u0441\u0442\u043E\u0440\u0456\u043D\u043A\u0430",kC={goToPage:CC,nextPage:xC,pageXofY:PC,prevPage:zC};var ja={};m(ja,{default:()=>TC,goToPage:()=>RC,nextPage:()=>wC,pageXofY:()=>IC,prevPage:()=>NC});var RC="\u524D\u5F80\u9875\u9762",wC="\u4E0B\u4E00\u9875",IC="\u7B2C {arg0}/{arg1} \u9875",NC="\u4E0A\u4E00\u9875",TC={goToPage:RC,nextPage:wC,pageXofY:IC,prevPage:NC};var Da={};m(Da,{default:()=>BC,goToPage:()=>SC,nextPage:()=>LC,pageXofY:()=>FC,prevPage:()=>MC});var SC="\u5230\u6B64\u9801",LC="\u4E0B\u4E00\u9801",FC="\u7B2C{arg0}\u9801\uFF0C\u5171{arg1}\u9801",MC="\u4E0A\u4E00\u9801",BC={goToPage:SC,nextPage:LC,pageXofY:FC,prevPage:MC};var jC=[sa,na,ia,la,pa,ma,da,ca,ua,fa,ya,ga,ba,va,ha,_a,Ca,xa,Pa,za,ka,Ra,wa,Ia,Na,Ta,Sa,La,Fa,Ma,Ba,ja,Da],jd=jC;var Dd=y({defaultClassName:"_1nsi9h17",variantClassNames:{isFocusVisible:{true:"_1nsi9h18"},variant:{pinned:"_1nsi9h19",floating:"_1nsi9h1a"}},defaultVariants:{},compoundVariants:[]}),Hd="_1nsi9h1b",Vd=y({defaultClassName:"_1nsi9h10",variantClassNames:{size:{xs:"_1nsi9h11",sm:"_1nsi9h12",md:"_1nsi9h13",lg:"_1nsi9h14"},variant:{floating:"_1nsi9h15",pinned:"_1nsi9h16"}},defaultVariants:{},compoundVariants:[]}),Od="_1nsi9h1c";import{jsx as _o,jsxs as Ha}from"react/jsx-runtime";var QC={style:"decimal"},$C={xs:[qC,UC],sm:[KC,GC],md:[XC,WC],lg:[YC,ZC]},Ud=Ad.forwardRef(({className:e,style:a,minValue:o=1,defaultValue:r=1,incrementAriaLabel:s,decrementAriaLabel:t,"aria-label":n,size:i="md",variant:l="floating",...p},d)=>{let{locale:u}=OC(),c=V(jd),f={...p,formatOptions:QC,minValue:o,incrementAriaLabel:s||c.formatMessage("nextPage"),decrementAriaLabel:t||c.formatMessage("prevPage"),defaultValue:r,"aria-label":n||c.formatMessage("goToPage")},g=Ad.useRef(null),b=EC({...f,locale:u}),{inputProps:v,decrementButtonProps:h,incrementButtonProps:_,groupProps:C}=AC({...f,onKeyDown:N=>{N.key==="Enter"&&g.current?.blur(),p.onKeyDown?.(N)}},b,g),{hoverProps:P,isHovered:w}=VC({}),{focusProps:x,isFocused:k,isFocusVisible:S}=HC(),R=l==="floating",[T,I]=$C[i],F=DC({"data-focus-visible":S,"data-focused":k,"data-hovered":w,"data-blockid":p["data-blockid"]});return Ha("div",{...qd(C,P,F),className:Ed(Vd({size:i,variant:l}),"BaselineUI-Pagination",e),style:a,ref:d,children:[_o(L,{icon:T,...h,elementType:"div",size:i,style:{height:"100%",...R&&{borderRadius:0}},className:"BaselineUI-Pagination-DecrementButton"}),l==="floating"&&_o(E,{orientation:"vertical"}),Ha("div",{className:Dd({isFocusVisible:S,variant:l}),"aria-label":c.formatMessage("pageXofY",{arg0:v.value,arg1:b.maxValue}),children:[_o("input",{...qd(v,x),ref:g,className:Ed("BaselineUI-Pagination-Input",Hd),style:{width:`${v.value?.toString().length||1}ch`}}),Ha("span",{className:Od,children:["/ ",_o(bo,{value:b.maxValue})]})]}),l==="floating"&&_o(E,{orientation:"vertical"}),_o(L,{icon:I,..._,elementType:"div",size:i,style:{height:"100%",...R&&{borderRadius:0}},className:"BaselineUI-Pagination-IncrementButton"})]})});Ud.displayName="Pagination";import{useNumberFormatter as QA,useDateFormatter as $A,useCollator as JA}from"react-aria";import{useDateFormatter as JC}from"react-aria";import{Fragment as ex,jsx as ox}from"react/jsx-runtime";var Kd=({date:e,...a})=>{let o=JC(a);return ox(ex,{children:o.format(e)})};Kd.displayName="DateFormat";import ux from"react";import{Item as fx}from"react-stately";import{XIcon as rx}from"@baseline-ui/icons/12";import{CheckmarkIcon as tx}from"@baseline-ui/icons/16";import{classNames as ax}from"@baseline-ui/utils";import{mergeRefs as sx}from"@react-aria/utils";import tt from"react";import{mergeProps as Zd,useButton as nx,useFocusRing as ix,useHover as Qd,useTag as lx,useTagGroup as px}from"react-aria";import{useListState as mx}from"react-stately";var Gd=y({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"]]}),Xd="_1f789qjj",Wd="_1f789qj0",Yd=y({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"]]});import{jsx as oo,jsxs as cx}from"react/jsx-runtime";var dx=({item:e,state:a,variant:o="neutral"})=>{let r=tt.useRef(null),{focusProps:s,isFocusVisible:t}=ix({within:!0}),{rowProps:n,gridCellProps:i,removeButtonProps:l,allowsRemoving:p,isDisabled:d,isSelected:u,allowsSelection:c}=lx({item:e},a,r),f=tt.useRef(null),{buttonProps:g}=nx(l,f),{hoverProps:b,isHovered:v}=Qd({isDisabled:d}),{hoverProps:h,isHovered:_}=Qd({isDisabled:d}),C=e.value?.icon,P=e.value?.variant??o;return oo("div",{...Zd(n,s,h),ref:r,className:Gd({isFocusVisible:t,variant:P,isDisabled:d,allowsRemoving:p,isSelected:u,allowsSelection:c,isHovered:_}),children:cx("div",{...i,className:Xd,children:[u&&oo(tx,{size:16}),!u&&C&&oo(C,{size:16}),e.rendered,p&&oo("button",{...Zd(g,b),className:Yd({variant:P,isHovered:v}),children:oo(rx,{})})]})})},Va=tt.forwardRef(({className:e,style:a,...o},r)=>{let s=tt.useRef(null),t=mx(o),{gridProps:n}=px(o,t,s);return oo("div",{...n,className:ax(Wd,e),style:a,ref:sx(r,s),children:[...t.collection].map(i=>oo(dx,{state:t,item:i,variant:o.variant},i.key))})});Va.displayName="TagGroupBase";import{jsx as $d}from"react/jsx-runtime";var Jd=ux.forwardRef(({items:e,...a},o)=>$d(Va,{...a,items:e,ref:o,children:r=>$d(fx,{children:r.label})}));Jd.displayName="TagGroup";import Cr,{useEffect as lc}from"react";import{FocusScope as hx}from"react-aria";import{classNames as yx}from"@baseline-ui/utils";import{getOwnerDocument as gx}from"@react-aria/utils";import Oa,{useContext as ic}from"react";import{useKeyboard as bx}from"react-aria";var ec="_1yep5z6j2",oc=y({defaultClassName:"_1kvz17db _1yep5z6ip _1yep5z6ir",variantClassNames:{showActionsOnTriggerOnly:{true:"_1kvz17dc"},isTriggered:{true:"_1kvz17dd"}},defaultVariants:{},compoundVariants:[]}),rc=y({defaultClassName:"_1kvz17d0 _1yep5z64u _1yep5z64v _1yep5z64w _1yep5z676 _1yep5z677 _1yep5z678 _1yep5z68c _1yep5z68d _1yep5z68e _1yep5z660 _1yep5z661 _1yep5z662 _1yep5z6ip _1yep5z6iq",variantClassNames:{isExpanded:{true:"_1kvz17d1"}},defaultVariants:{},compoundVariants:[]}),tc="_1yep5z6d3 _1yep5z6c6",ac=y({defaultClassName:"_1kvz17d2 _1yep5z63o _1yep5z63p _1yep5z63q _1yep5z61f _1yep5z61g _1yep5z61h _1yep5z63 _1yep5z64 _1yep5z65 _1yep5z62f _1yep5z62g _1yep5z62h _1yep5z6g7 _1yep5z6g8 _1yep5z6g9 _1yep5z6gy _1yep5z6gz _1yep5z6h0 _1yep5z6hy _1yep5z6hz _1yep5z6i0 _1yep5z6ip _1yep5z6is",variantClassNames:{isFocusVisible:{true:"_1kvz17d3"},isHovered:{true:"_1yep5z6e1",false:"_1yep5z6e2"},isDisabled:{true:"z9nup83"}},defaultVariants:{},compoundVariants:[]}),sc="_1kvz17da _1yep5z66 _1yep5z67 _1yep5z68 _1yep5z62i _1yep5z62j _1yep5z62k _1yep5z6c7",nc=y({defaultClassName:"_1kvz17d7 _1yep5z6g7 _1yep5z6g8 _1yep5z6g9 _1yep5z6gy _1yep5z6gz _1yep5z6h0",variantClassNames:{isDisabled:{true:"_1yep5z6d6",false:"_1yep5z6d2"}},defaultVariants:{},compoundVariants:[]});import{jsx as vx}from"react/jsx-runtime";var Aa=Oa.forwardRef(({children:e,className:a,style:o},r)=>{let{headers:s}=ic(We),{disabledKeys:t}=ic(We),{keyboardProps:n}=bx({onKeyDown:i=>{let l=gx(i.target),p=[...s?.keys()||[]].findIndex(g=>s?.get(g)?.current===l.activeElement),d=s?.get(p||0),u=s?.size||0,c=g=>{let b=s.get(g-1<0?u-1:g-1);t?.has(b?.current?.getAttribute("data-key")||"")?c(g-1):b?.current?.focus()},f=g=>{let b=s.get((g+1)%u);t?.has(b?.current?.getAttribute("data-key")||"")?f(g+1):b?.current?.focus()};if(d)switch(i.key){case"Home":{i.preventDefault(),f(-1);break}case"End":{i.preventDefault(),c(u);break}case"ArrowDown":{i.preventDefault(),f(p);break}case"ArrowUp":{i.preventDefault(),c(p);break}default:i.continuePropagation()}}});return vx("div",{...n,style:o,className:yx(ec,a),ref:r,children:Oa.Children.map(e,(i,l)=>Oa.cloneElement(i,{index:l}))})});Aa.displayName="AccordionBase";import{jsx as Ea}from"react/jsx-runtime";var We=Cr.createContext({expandedKeys:new Set,setExpandedKeys:()=>{},disabledKeys:new Set,headers:new Map,expansionMode:"multiple"}),pc=Cr.forwardRef(({children:e,disabledKeys:a,defaultExpandedKeys:o=new Set,expandedKeys:r,expansionMode:s="multiple",onChange:t,className:n,style:i},l)=>{let[p,d]=Cr.useState(o),u=Cr.useRef(new Map).current,[c,f]=Cr.useState(s);return lc(()=>{f(c)},[c]),lc(()=>{t?.(p)},[p,t]),Ea(We.Provider,{value:{expandedKeys:r||p,setExpandedKeys:r?()=>{}:d,disabledKeys:a,headers:u,expansionMode:c},children:Ea(hx,{children:Ea(Aa,{className:n,style:i,ref:l,children:e})})})});pc.displayName="Accordion";import{animated as Ix,useReducedMotion as Nx,useTransition as Tx}from"@react-spring/web";import yc,{useContext as Sx}from"react";import{FocusScope as Lx,useId as gc}from"react-aria";import{ChevronRightIcon as _x}from"@baseline-ui/icons/8";import{invariant as mc}from"@baseline-ui/utils";import dc,{useContext as Cx,useEffect as xx}from"react";import{mergeProps as cc,useButton as Px,useFocusManager as zx,useFocusRing as uc,useHover as kx,useKeyboard as Rx,usePress as wx}from"react-aria";import{jsx as xr,jsxs as fc}from"react/jsx-runtime";var qa=dc.forwardRef(({title:e,actions:a,controlId:o,value:r,id:s,index:t,subLabel:n,showActionsOnTriggerOnly:i},l)=>{let p=dc.useRef(null),{expandedKeys:d,setExpandedKeys:u,expansionMode:c,disabledKeys:f,headers:g}=Cx(We),b=f?.has(r),v=zx();mc(v);let{focusNext:h,focusPrevious:_}=v,{keyboardProps:C}=Rx({onKeyDown:O=>{O.key==="ArrowRight"?h({wrap:!0}):O.key==="ArrowLeft"?_({wrap:!0}):O.continuePropagation()},isDisabled:b});xx(()=>{mc(typeof t=="number","AccordionItem must have an index"),g?.set(t,p)},[t,g]);let P=()=>{u(O=>{let H=new Set(O);return H.has(r)?H.delete(r):(c==="single"&&H.clear(),H.add(r)),H})},{buttonProps:w}=Px({"aria-expanded":d.has(r),"aria-controls":o,onPress:P,isDisabled:b},p),{pressProps:x}=wx({onPress:P,isDisabled:b}),{focusProps:k,isFocusVisible:S}=uc(),{hoverProps:R,isHovered:T}=kx({isDisabled:b}),{focusProps:I,isFocusVisible:F}=uc({within:!0}),N=d.has(r);return fc("h3",{...cc(C,x,R,I),className:ac({isFocusVisible:S,isHovered:T,isDisabled:b}),ref:l,children:[fc("div",{className:nc({isDisabled:!!b}),children:[xr(_x,{className:rc({isExpanded:N}),size:8}),xr("button",{...cc(w,k),id:s,"data-key":r,className:sc,ref:p,children:e})]}),a?.length&&xr("div",{"data-testid":"action-buttons",className:oc({showActionsOnTriggerOnly:i,isTriggered:F||T}),children:a.map((O,H)=>xr(L,{variant:"secondary",size:"sm",excludeFromTabOrder:!0,isDisabled:b,...O},H))}),n&&xr("div",{className:tc,children:n})]})});qa.displayName="AccordionHeader";import{Fragment as Fx,jsx as at,jsxs as Mx}from"react/jsx-runtime";var bc=yc.forwardRef(({title:e,actions:a,children:o,value:r,index:s,subLabel:t,style:n,className:i,showActionsOnTriggerOnly:l},p)=>{let d=gc(),u=gc(),{expandedKeys:c}=Sx(We),f=yc.useRef(null),g=c.has(r),b=ho(),v=Nx(),h=Tx(g?[r]:[],{from:!b&&!v&&{height:0,opacity:0},enter:()=>async _=>{await _({height:f.current?.scrollHeight,opacity:1})},leave:{height:0,opacity:0},keys:_=>_});return Mx(Fx,{children:[at(Lx,{children:at(qa,{value:r,actions:a,id:u,title:e,controlId:d,ref:p,index:s,subLabel:t,showActionsOnTriggerOnly:l})}),h(_=>at(Ix.div,{role:"region","aria-labelledby":u,id:d,style:{..._,overflow:"hidden"},children:at("div",{ref:f,className:i,style:n,children:o})}))]})});bc.displayName="AccordionItem";import Xx from"react";import{Item as Cc,Section as Wx}from"react-stately";import{classNames as Ka}from"@baseline-ui/utils";import _c from"react";import{HiddenSelect as qx,useSelect as Ux}from"react-aria";import{useSelectState as Kx}from"react-stately";import{ChevronDownIcon as Bx}from"@baseline-ui/icons/8";import{classNames as vc,filterTruthyValues as jx}from"@baseline-ui/utils";import{mergeRefs as Dx}from"@react-aria/utils";import hc from"react";import{mergeProps as Hx,useButton as Vx,useFocusRing as Ox,useHover as Ax}from"react-aria";import{jsx as st,jsxs as Ex}from"react/jsx-runtime";var Ua=hc.forwardRef(({variant:e,isOpen:a,validationState:o="valid",...r},s)=>{let t=hc.useRef(null),{buttonProps:n,isPressed:i}=Vx({...r,isDisabled:r.isDisabled||r.isReadOnly},t),{hoverProps:l,isHovered:p}=Ax({isDisabled:r.isDisabled}),{focusProps:d,isFocused:u,isFocusVisible:c}=Ox(),f=Wr({isReadOnly:r.isReadOnly,validationState:o});r.isReadOnly&&(n.disabled=!1);let g=jx({"data-disabled":r.isDisabled,"data-readonly":r.isReadOnly,"data-focused":u,"data-focus-visible":c,"data-hovered":p,"data-pressed":i,"data-open":a});return Ex("button",{...Hx(n,l,d,g),ref:Dx(s,t),className:vc(mm({isFocused:c,isDisabled:r.isDisabled}),uo({variant:e,isHovered:p,isFocused:c,validationState:o,isDisabled:!!r.isDisabled,isReadOnly:r.isReadOnly}),"BaselineUI-Select-Button"),children:[r.children,f&&st("span",{"aria-hidden":!0,className:vc(co({validationState:o,isReadOnly:!!r.isReadOnly}),cm),children:st(f,{size:16})}),st("span",{"aria-hidden":!0,children:st(Bx,{size:8,className:pm({isOpen:a})})})]})});Ua.displayName="SelectButton";import{Fragment as Gx,jsx as ro,jsxs as nt}from"react/jsx-runtime";var Ga=_c.forwardRef(({className:e,style:a,labelPosition:o="top",variant:r="primary","data-blockid":s,...t},n)=>{let i=_c.useRef(null),l=Kx({...t,validationState:t.validationState==="error"?"invalid":"valid"}),{labelProps:p,triggerProps:d,valueProps:u,menuProps:c,descriptionProps:f,errorMessageProps:g}=Ux({...t,validationState:t.validationState==="error"?"invalid":"valid"},l,i),b=Ue({...t,descriptionProps:f,errorMessageProps:g,labelPosition:o}),v=l.selectedItem?.value,h=v&&"icon"in v&&v.icon;return nt(Gx,{children:[nt("div",{style:a,className:Ka(qe({labelPosition:o}),"BaselineUI-Select",e),"data-blockid":s,ref:n,children:[(t.label||b)&&nt("div",{className:Ee({labelPosition:o,hasMessage:!!b}),children:[t.label&&ro("div",{...p,className:Ka(Ae,"BaselineUI-Select-Label"),children:t.label}),o==="start"&&b]}),ro(qx,{state:l,triggerRef:i,isDisabled:t.isDisabled,label:t.label,name:t.name}),ro(Ua,{...d,isOpen:l.isOpen,variant:r,validationState:t.validationState,ref:i,isReadOnly:t.isReadOnly,children:nt("span",{className:um,children:[h&&ro(h,{size:24}),ro("span",{...u,children:v?"label"in v&&v?.label:t.placeholder})]})}),o==="top"&&b]}),l.isOpen&&ro(Be,{offset:2,state:l,triggerRef:i,style:a,className:Ka(qr,"BaselineUI-Select-Popover"),...t,children:ro(Oe,{...c,label:t.label,items:t.items,UNSAFE_state:l,showSelectedIcon:t.showSelectedIcon,className:dm})})]})});Ga.displayName="SelectBase";import{jsx as it}from"react/jsx-runtime";var lt=Xx.forwardRef((e,a)=>it(Ga,{...e,ref:a,children:o=>o.type==="section"?it(Wx,{items:o.children,title:o.id,children:r=>it(Cc,{children:r.label},r.id)},o.id):it(Cc,{textValue:o.label,children:o.label},o.id)}));lt.displayName="Select";import{AvatarIcon as Yx}from"@baseline-ui/icons/16";import{AvatarIcon as Zx}from"@baseline-ui/icons/24";import Qx from"react";import{classNames as $x}from"@baseline-ui/utils";var xc="_1017q4c5",Pc=y({defaultClassName:"_1017q4c0",variantClassNames:{size:{md:"_1017q4c1",sm:"_1017q4c2"},isDisabled:{true:"_1017q4c3"}},defaultVariants:{},compoundVariants:[]}),zc="_1017q4c4";import{jsx as Xa,jsxs as eP}from"react/jsx-runtime";var Jx={sm:Yx,md:Zx},kc=Qx.forwardRef(({className:e,style:a,size:o="md",icon:r=Jx[o],name:s,imgSrc:t,showInitials:n,isDisabled:i,hasNotifications:l,imgLoading:p,"data-blockid":d},u)=>{let{imgProps:c}=$r({src:t,alt:s}),f=s?.split(" ").map(g=>g[0]).join("");return eP("span",{className:$x(Pc({size:o,isDisabled:i}),"BaselineUI-Avatar",e),"data-disabled":i,ref:u,style:a,"aria-disabled":i,"data-blockid":d,children:[t&&Xa("img",{...c,loading:p,className:zc}),!n&&!t&&Xa(r,{size:o==="sm"?16:24}),n&&!t&&(o==="sm"?f[0]:f),l&&Xa("div",{"data-testid":"notification",className:xc})]})});kc.displayName="Avatar";import Qa,{useMemo as gP}from"react";import{Item as bP}from"react-stately";import{XIcon as iP}from"@baseline-ui/icons/8";import{classNames as pt,filterTruthyValues as lP,invariant as Fc}from"@baseline-ui/utils";import Wa from"react";import{mergeProps as pP,useFocusRing as mP,useHover as dP,useKeyboard as cP,useTab as uP,useTabList as fP}from"react-aria";import{useTabListState as yP}from"react-stately";var Rc="_1x62fhbj",wc=y({defaultClassName:"_1x62fhb6",variantClassNames:{isHovered:{true:"_1x62fhb7"},isSelected:{true:"_1x62fhb8"},isFocusVisible:{true:"_1x62fhb9"},isDisabled:{true:"_1x62fhba z9nup83"},variant:{primary:"_1x62fhbb",ghost:"_1x62fhbc"}},defaultVariants:{},compoundVariants:[[{variant:"primary",isSelected:!0,isDisabled:!1},"_1x62fhbd"],[{variant:"primary",isSelected:!0},"_1x62fhbe"],[{variant:"ghost",isSelected:!0,isFocusVisible:!1},"_1x62fhbf"],[{variant:"ghost",isSelected:!0,isDisabled:!1},"_1x62fhbg"],[{variant:"ghost",isDisabled:!0,isSelected:!0},"_1x62fhbh"],[{variant:"primary",isHovered:!0},"_1x62fhbi"]]}),Ic=y({defaultClassName:"_1x62fhb3 z9nup82",variantClassNames:{variant:{primary:"_1x62fhb4",ghost:"_1x62fhb5"}},defaultVariants:{},compoundVariants:[]}),Nc="_1x62fhbk",Tc="_1x62fhbl",Sc=y({defaultClassName:"_1x62fhb0 z9nup82",variantClassNames:{variant:{primary:"_1x62fhb1",ghost:"_1x62fhb2"}},defaultVariants:{},compoundVariants:[]});import{classNames as oP}from"@baseline-ui/utils";import rP from"react";import{mergeProps as tP,useFocusRing as aP,useTabPanel as sP}from"react-aria";import{jsx as nP}from"react/jsx-runtime";var Lc=({state:e,...a})=>{let o=rP.useRef(null),{tabPanelProps:r}=sP(a,e,o),{selectedItem:s}=e,{focusProps:t,isFocusVisible:n}=aP();if(!s?.value)return null;let{className:i,style:l,"data-blockid":p}=s.value;return nP("div",{...tP(r,t),ref:o,className:oP({[Tc]:n},"Baseline-Tabs-TabPanel",i),"data-blockid":p,style:l,children:s?.props.children})};import{jsx as to,jsxs as Ya}from"react/jsx-runtime";var Za=Wa.forwardRef(({className:e,style:a,tabHeaderStyle:o,tabHeaderClassName:r,variant:s="primary",actions:t,onRemove:n,"data-blockid":i,...l},p)=>{let d=yP({...l,selectedKey:l.selectedValue,defaultSelectedKey:l.defaultSelectedValue,disabledKeys:l.disabledValues}),u=Wa.useRef(null),{tabListProps:c}=fP({...l,selectedKey:l.selectedValue,defaultSelectedKey:l.defaultSelectedValue,disabledKeys:l.disabledValues},d,u);return Ya("div",{className:pt("BaselineUI-Tabs",e),style:a,ref:p,"data-blockid":i,children:[Ya("div",{className:pt(Sc({variant:s}),r),style:o,children:[to("div",{...c,className:Ic({variant:s}),ref:u,children:[...d.collection].map(f=>(Fc(f.value,"TabItem requires a value prop"),to(Mc,{item:f,state:d,onRemove:n,variant:s},f.key)))}),t?.map((f,g)=>to("div",{className:Rc,children:to(L,{...f,variant:"secondary",size:"sm",className:pt(Nc,f.className)})},g))]}),to(Lc,{state:d},d.selectedItem?.key)]})});Za.displayName="TabsBase";var Mc=({item:e,onRemove:a,state:o,variant:r})=>{let{key:s,value:t}=e,n=Wa.useRef(null),{tabProps:i,isSelected:l,isDisabled:p}=uP({key:s},o,n),{hoverProps:d,isHovered:u}=dP({});Fc(t,"TabButton requires a value prop");let{title:c,icon:f,titleStyle:g,titleClassName:b}=t,{focusProps:v,isFocusVisible:h,isFocused:_}=mP(),{keyboardProps:C}=cP({onKeyDown:w=>{w.key==="Backspace"&&a?a(s):w.continuePropagation()}}),P=lP({"data-selected":l,"data-disabled":p,"data-focused":_,"data-hovered":u,"data-focus-visible":h});return Ya("div",{...pP(C,i,d,v,P),className:pt(wc({isHovered:u,isSelected:l,isFocusVisible:h,isDisabled:p,variant:r}),"BaselineUI-Tabs-TabButton",b),style:g,ref:n,children:[f&&to(f,{size:20}),c,a&&to(L,{variant:"secondary",elementType:"div",icon:iP,size:"xxs",onPress:()=>a(s),excludeFromTabOrder:!0,UNSAFE_NON_INTERACTIVE:!0,style:{display:"inline-flex",color:"inherit",opacity:l||_||u?1:0}})]})};Mc.displayName="TabButton";import{jsx as Bc}from"react/jsx-runtime";var jc=Qa.forwardRef(({children:e,...a},o)=>{let r=gP(()=>Qa.Children.map(e,s=>!s||!Qa.isValidElement(s)||typeof s.type=="string"?null:{...s.props,id:s.props.value}).filter(Boolean),[e]);return Bc(Za,{...a,ref:o,items:r,children:s=>Bc(bP,{title:s.title,children:s.children},s.key)})});jc.displayName="Tabs";import{invariant as $a}from"@baseline-ui/utils";var Dc=({children:e,title:a,value:o})=>($a(o,"TabItem requires a value prop"),$a(a,"TabItem requires a title prop"),$a(e,"TabItem requires children"),e);Dc.displayName="TabItem";import{CheckFilledIcon as S6,CloseIcon as L6,ErrorAltFilledIcon as F6,InfoFilledIcon as M6,WarningFilledIcon as B6}from"@baseline-ui/icons/16";import{CheckFilledIcon as j6,ErrorAltFilledIcon as D6,InfoFilledIcon as H6,WarningFilledIcon as V6}from"@baseline-ui/icons/20";import O6 from"react";import{classNames as A6}from"@baseline-ui/utils";var Ja={};m(Ja,{close:()=>vP,default:()=>hP});var vP="\u0625\u063A\u0644\u0627\u0642",hP={close:vP};var es={};m(es,{close:()=>_P,default:()=>CP});var _P="Zav\u0159\xEDt",CP={close:_P};var os={};m(os,{close:()=>xP,default:()=>PP});var xP="Cau",PP={close:xP};var rs={};m(rs,{close:()=>zP,default:()=>kP});var zP="Luk",kP={close:zP};var ts={};m(ts,{close:()=>RP,default:()=>wP});var RP="Schlie\xDFen",wP={close:RP};var as={};m(as,{close:()=>IP,default:()=>NP});var IP="\u039A\u03BB\u03B5\u03AF\u03C3\u03B9\u03BC\u03BF",NP={close:IP};var ss={};m(ss,{close:()=>TP,default:()=>SP});var TP="Close",SP={close:TP};var ns={};m(ns,{close:()=>LP,default:()=>FP});var LP="Close",FP={close:LP};var is={};m(is,{close:()=>MP,default:()=>BP});var MP="Cerrar",BP={close:MP};var ls={};m(ls,{close:()=>jP,default:()=>DP});var jP="Sulje",DP={close:jP};var ps={};m(ps,{close:()=>HP,default:()=>VP});var HP="Fermer",VP={close:HP};var ms={};m(ms,{close:()=>OP,default:()=>AP});var OP="Fermer",AP={close:OP};var ds={};m(ds,{close:()=>EP,default:()=>qP});var EP="\u05E1\u05D2\u05D9\u05E8\u05D4",qP={close:EP};var cs={};m(cs,{close:()=>UP,default:()=>KP});var UP="Zatvori",KP={close:UP};var us={};m(us,{close:()=>GP,default:()=>XP});var GP="Tutup",XP={close:GP};var fs={};m(fs,{close:()=>WP,default:()=>YP});var WP="Chiudi",YP={close:WP};var ys={};m(ys,{close:()=>ZP,default:()=>QP});var ZP="\u9589\u3058\u308B",QP={close:ZP};var gs={};m(gs,{close:()=>$P,default:()=>JP});var $P="\uB2EB\uAE30",JP={close:$P};var bs={};m(bs,{close:()=>e6,default:()=>o6});var e6="Tutup",o6={close:e6};var vs={};m(vs,{close:()=>r6,default:()=>t6});var r6="Lukk",t6={close:r6};var hs={};m(hs,{close:()=>a6,default:()=>s6});var a6="Sluit",s6={close:a6};var _s={};m(_s,{close:()=>n6,default:()=>i6});var n6="Zamknij",i6={close:n6};var Cs={};m(Cs,{close:()=>l6,default:()=>p6});var l6="Fechar",p6={close:l6};var xs={};m(xs,{close:()=>m6,default:()=>d6});var m6="Fechar",d6={close:m6};var Ps={};m(Ps,{close:()=>c6,default:()=>u6});var c6="\u0417\u0430\u043A\u0440\u044B\u0442\u044C",u6={close:c6};var zs={};m(zs,{close:()=>f6,default:()=>y6});var f6="Zavrie\u0165",y6={close:f6};var ks={};m(ks,{close:()=>g6,default:()=>b6});var g6="Zapri",b6={close:g6};var Rs={};m(Rs,{close:()=>v6,default:()=>h6});var v6="St\xE4ng",h6={close:v6};var ws={};m(ws,{close:()=>_6,default:()=>C6});var _6="\u0E1B\u0E34\u0E14",C6={close:_6};var Is={};m(Is,{close:()=>x6,default:()=>P6});var x6="Kapat",P6={close:x6};var Ns={};m(Ns,{close:()=>z6,default:()=>k6});var z6="\u0417\u0430\u043A\u0440\u0438\u0442\u0438",k6={close:z6};var Ts={};m(Ts,{close:()=>R6,default:()=>w6});var R6="\u5173\u95ED",w6={close:R6};var Ss={};m(Ss,{close:()=>I6,default:()=>N6});var I6="\u95DC\u9589",N6={close:I6};var T6=[Ja,es,os,rs,ts,as,ss,ns,is,ls,ps,ms,ds,cs,us,fs,ys,gs,bs,vs,hs,_s,Cs,xs,Ps,zs,ks,Rs,ws,Is,Ns,Ts,Ss],bu=T6;var vu=y({defaultClassName:"kfun6yw",variantClassNames:{arrangement:{single:"kfun6yx",multi:"kfun6yy",compact:"kfun6yz"}},defaultVariants:{},compoundVariants:[]}),hu=y({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"]]}),_u=y({defaultClassName:"kfun6yt",variantClassNames:{size:{sm:"kfun6yu",md:"kfun6yv"}},defaultVariants:{},compoundVariants:[]}),Cu=y({defaultClassName:"kfun6yp",variantClassNames:{arrangement:{single:"kfun6yq",multi:"kfun6yr",compact:"kfun6ys"}},defaultVariants:{},compoundVariants:[]}),xu=y({defaultClassName:"kfun6yk",variantClassNames:{variant:{info:"kfun6yl",warning:"kfun6ym",error:"kfun6yn",success:"kfun6yo"}},defaultVariants:{},compoundVariants:[]}),Pu=y({defaultClassName:"kfun6yh",variantClassNames:{size:{sm:"kfun6yi",md:"kfun6yj"}},defaultVariants:{},compoundVariants:[]}),zu=y({defaultClassName:"kfun6yd z9nup82",variantClassNames:{arrangement:{single:"kfun6ye",multi:"kfun6yf",compact:"kfun6yg"}},defaultVariants:{},compoundVariants:[]});import{jsx as Pr,jsxs as mt}from"react/jsx-runtime";var E6={error:{sm:F6,md:D6},info:{sm:M6,md:H6},success:{sm:S6,md:j6},warning:{sm:B6,md:V6}},ku=O6.forwardRef(({className:e,description:a,actionLabel:o,onAction:r,style:s,variant:t="info",title:n,arrangement:i="single",onClose:l,size:p="sm"},d)=>{let u=V(bu),c=o&&Pr(U,{variant:i==="compact"?"tertiary":"ghost",label:o,onPress:r}),f=E6[t][p];return mt("div",{className:A6(hu({variant:t,arrangement:i,hasButton:!!o||!!l,hasCloseButton:!!l}),e),style:s,role:"alert",ref:d,children:[mt("div",{className:zu({arrangement:i}),children:[Pr(f,{className:xu({variant:t}),size:16}),mt("div",{className:vu({arrangement:i}),children:[Pr("h3",{className:Pu({size:p}),children:n}),Pr("section",{className:_u({size:p}),children:a})]}),i==="compact"&&c]}),mt("div",{className:Cu({arrangement:i}),children:[i!=="compact"&&c,l&&Pr(L,{variant:"secondary",icon:L6,size:"sm",onPress:l,"aria-label":u.formatMessage("close")})]})]})});ku.displayName="InlineAlert";import{classNames as q6}from"@baseline-ui/utils";import{mergeRefs as U6}from"@react-aria/utils";import Ls from"react";import{useDialog as K6}from"react-aria";var Ru=y({defaultClassName:"cjv3et0 _1yep5z6aj _1yep5z6ar _1yep5z6az _1yep5z6b7 _1yep5z6e0 _1yep5z6bf",variantClassNames:{size:{sm:"cjv3et1",md:"cjv3et2",lg:"cjv3et3",content:"cjv3et4"},variant:{primary:"cjv3et5 _1yep5z6ex",ghost:"cjv3et6"}},defaultVariants:{},compoundVariants:[]});import{jsx as wu}from"react/jsx-runtime";var Fs=Ls.createContext({titleProps:{}}),Co=Ls.forwardRef(({children:e,className:a,style:o,size:r="md",variant:s="primary",...t},n)=>{let i=Ls.useRef(null),{dialogProps:l,titleProps:p}=K6(t,i);return wu(Fs.Provider,{value:{titleProps:p},children:wu("div",{...l,ref:U6(i,n),style:o,className:q6(Ru({size:r,variant:s}),a),children:e})})});Co.displayName="Dialog";import{Slot as G6}from"@radix-ui/react-slot";import Iu,{useContext as X6}from"react";import{jsx as W6}from"react/jsx-runtime";var Nu=Iu.forwardRef(({children:e,className:a,style:o},r)=>{let{titleProps:s}=X6(Fs),t=Iu.isValidElement(e)?G6:"h3";return W6(t,{...s,ref:r,className:a,style:o,children:e})});Nu.displayName="DialogTitle";import{parseColor as lT}from"@react-stately/color";import kt,{useCallback as pT,useMemo as Rt}from"react";import{classNames as gf}from"@baseline-ui/utils";import{VisuallyHidden as mT,mergeProps as dT,useId as cT,useOverlayTrigger as uT}from"react-aria";import{useOverlayTriggerState as fT}from"react-stately";var Ms={};m(Ms,{add:()=>Y6,addColor:()=>Z6,cancel:()=>Q6,colorFormat:()=>$6,colorPresets:()=>J6,customColors:()=>ez,default:()=>sz,newColor:()=>oz,noColor:()=>rz,removeColor:()=>tz,transparent:()=>az});var Y6="\u0625\u0636\u0627\u0641\u0629",Z6="\u0625\u0636\u0627\u0641\u0629 \u0644\u0648\u0646",Q6="\u0625\u0644\u063A\u0627\u0621",$6="\u062A\u0646\u0633\u064A\u0642 \u0627\u0644\u0644\u0648\u0646",J6="\u0627\u0644\u0623\u0644\u0648\u0627\u0646 \u0627\u0644\u0645\u0633\u0628\u0642\u0629",ez="\u0623\u0644\u0648\u0627\u0646 \u0645\u062E\u0635\u0635\u0629",oz="\u0644\u0648\u0646 \u0645\u062E\u0635\u0635 \u062C\u062F\u064A\u062F",rz="\u0644\u0627 \u064A\u0648\u062C\u062F",tz="\u0625\u0632\u0627\u0644\u0629 \u0627\u0644\u0644\u0648\u0646",az="\u0634\u0641\u0627\u0641",sz={add:Y6,addColor:Z6,cancel:Q6,colorFormat:$6,colorPresets:J6,customColors:ez,newColor:oz,noColor:rz,removeColor:tz,transparent:az};var Bs={};m(Bs,{add:()=>nz,addColor:()=>iz,cancel:()=>lz,colorFormat:()=>pz,colorPresets:()=>mz,customColors:()=>dz,default:()=>gz,newColor:()=>cz,noColor:()=>uz,removeColor:()=>fz,transparent:()=>yz});var nz="P\u0159idat",iz="P\u0159idat barvu",lz="Zru\u0161it",pz="Form\xE1t barvy",mz="P\u0159edvolby barev",dz="Vlastn\xED barvy",cz="Vlastn\xED barva",uz="Nen\xED",fz="Odebrat barvu",yz="Pr\u016Fhledn\xE1",gz={add:nz,addColor:iz,cancel:lz,colorFormat:pz,colorPresets:mz,customColors:dz,newColor:cz,noColor:uz,removeColor:fz,transparent:yz};var js={};m(js,{add:()=>bz,addColor:()=>vz,cancel:()=>hz,colorFormat:()=>_z,colorPresets:()=>Cz,customColors:()=>xz,default:()=>wz,newColor:()=>Pz,noColor:()=>zz,removeColor:()=>kz,transparent:()=>Rz});var bz="Ychwanegu",vz="Ychwanegu Lliw",hz="Canslo",_z="Fformat Lliw",Cz="Rhagosodiadau Lliw",xz="Lliwiau Custom",Pz="Lliw Personol Newydd",zz="Dim",kz="Tynnu Lliw",Rz="Tryloyw",wz={add:bz,addColor:vz,cancel:hz,colorFormat:_z,colorPresets:Cz,customColors:xz,newColor:Pz,noColor:zz,removeColor:kz,transparent:Rz};var Ds={};m(Ds,{add:()=>Iz,addColor:()=>Nz,cancel:()=>Tz,colorFormat:()=>Sz,colorPresets:()=>Lz,customColors:()=>Fz,default:()=>Hz,newColor:()=>Mz,noColor:()=>Bz,removeColor:()=>jz,transparent:()=>Dz});var Iz="Tilf\xF8j",Nz="Tilf\xF8j Farve",Tz="Annuller",Sz="Farveformat",Lz="Farvevalg",Fz="Brugerdefinerede farver",Mz="Ny tilpasset farve",Bz="Ingen",jz="Fjern Farve",Dz="Transparent",Hz={add:Iz,addColor:Nz,cancel:Tz,colorFormat:Sz,colorPresets:Lz,customColors:Fz,newColor:Mz,noColor:Bz,removeColor:jz,transparent:Dz};var Hs={};m(Hs,{add:()=>Vz,addColor:()=>Oz,cancel:()=>Az,colorFormat:()=>Ez,colorPresets:()=>qz,customColors:()=>Uz,default:()=>Yz,newColor:()=>Kz,noColor:()=>Gz,removeColor:()=>Xz,transparent:()=>Wz});var Vz="Hinzuf\xFCgen",Oz="Farbe hinzuf\xFCgen",Az="Abbrechen",Ez="Farbformat",qz="Farbvorlagen",Uz="Benutzerdefinierte Farben",Kz="Neue benutzerdefinierte Farbe",Gz="Kein",Xz="Farbe entfernen",Wz="Transparent",Yz={add:Vz,addColor:Oz,cancel:Az,colorFormat:Ez,colorPresets:qz,customColors:Uz,newColor:Kz,noColor:Gz,removeColor:Xz,transparent:Wz};var Vs={};m(Vs,{add:()=>Zz,addColor:()=>Qz,cancel:()=>$z,colorFormat:()=>Jz,colorPresets:()=>e5,customColors:()=>o5,default:()=>n5,newColor:()=>r5,noColor:()=>t5,removeColor:()=>a5,transparent:()=>s5});var Zz="\u03A0\u03C1\u03BF\u03C3\u03B8\u03AE\u03BA\u03B7",Qz="\u03A0\u03C1\u03BF\u03C3\u03B8\u03AE\u03BA\u03B7 \u03A7\u03C1\u03CE\u03BC\u03B1\u03C4\u03BF\u03C2",$z="\u0391\u03BA\u03CD\u03C1\u03C9\u03C3\u03B7",Jz="\u039C\u03BF\u03C1\u03C6\u03AE \u03C7\u03C1\u03CE\u03BC\u03B1\u03C4\u03BF\u03C2",e5="\u03A0\u03C1\u03BF\u03B5\u03C0\u03B9\u03BB\u03BF\u03B3\u03AD\u03C2 \u03C7\u03C1\u03C9\u03BC\u03AC\u03C4\u03C9\u03BD",o5="\u03A0\u03C1\u03BF\u03C3\u03B1\u03C1\u03BC\u03BF\u03C3\u03BC\u03AD\u03BD\u03B1 \u03A7\u03C1\u03CE\u03BC\u03B1\u03C4\u03B1",r5="\u039D\u03AD\u03BF \u03C0\u03C1\u03BF\u03C3\u03B1\u03C1\u03BC\u03BF\u03C3\u03BC\u03AD\u03BD\u03BF \u03C7\u03C1\u03CE\u03BC\u03B1",t5="\u039A\u03B1\u03BD\u03AD\u03BD\u03B1\u03C2",a5="\u0391\u03C6\u03B1\u03AF\u03C1\u03B5\u03C3\u03B7 \u03A7\u03C1\u03CE\u03BC\u03B1\u03C4\u03BF\u03C2",s5="\u0397\u03BC\u03B9\u03B4\u03B9\u03B1\u03C6\u03B1\u03BD\u03AE\u03C2",n5={add:Zz,addColor:Qz,cancel:$z,colorFormat:Jz,colorPresets:e5,customColors:o5,newColor:r5,noColor:t5,removeColor:a5,transparent:s5};var Os={};m(Os,{add:()=>i5,addColor:()=>l5,cancel:()=>p5,colorFormat:()=>m5,colorPresets:()=>d5,customColors:()=>c5,default:()=>b5,newColor:()=>u5,noColor:()=>f5,removeColor:()=>y5,transparent:()=>g5});var i5="Add",l5="Add Colour",p5="Cancel",m5="Colour Format",d5="Colour Presets",c5="Custom Colours",u5="New Custom Colour",f5="None",y5="Remove Colour",g5="Transparent",b5={add:i5,addColor:l5,cancel:p5,colorFormat:m5,colorPresets:d5,customColors:c5,newColor:u5,noColor:f5,removeColor:y5,transparent:g5};var As={};m(As,{add:()=>v5,addColor:()=>h5,cancel:()=>_5,colorFormat:()=>C5,colorPresets:()=>x5,customColors:()=>P5,default:()=>I5,newColor:()=>z5,noColor:()=>k5,removeColor:()=>R5,transparent:()=>w5});var v5="Add",h5="Add Color",_5="Cancel",C5="Color Format",x5="Color Presets",P5="Custom Colors",z5="New Custom Color",k5="None",R5="Remove Color",w5="Transparent",I5={add:v5,addColor:h5,cancel:_5,colorFormat:C5,colorPresets:x5,customColors:P5,newColor:z5,noColor:k5,removeColor:R5,transparent:w5};var Es={};m(Es,{add:()=>N5,addColor:()=>T5,cancel:()=>S5,colorFormat:()=>L5,colorPresets:()=>F5,customColors:()=>M5,default:()=>V5,newColor:()=>B5,noColor:()=>j5,removeColor:()=>D5,transparent:()=>H5});var N5="A\xF1adir",T5="A\xF1adir color",S5="Cancelar",L5="Formato de color",F5="Preajustes de color",M5="Colores personalizados",B5="Nuevo color personalizado",j5="Ninguna",D5="Eliminar color",H5="Transparente",V5={add:N5,addColor:T5,cancel:S5,colorFormat:L5,colorPresets:F5,customColors:M5,newColor:B5,noColor:j5,removeColor:D5,transparent:H5};var qs={};m(qs,{add:()=>O5,addColor:()=>A5,cancel:()=>E5,colorFormat:()=>q5,colorPresets:()=>U5,customColors:()=>K5,default:()=>Z5,newColor:()=>G5,noColor:()=>X5,removeColor:()=>W5,transparent:()=>Y5});var O5="Lis\xE4\xE4",A5="Lis\xE4\xE4 v\xE4ri",E5="Kumoa",q5="V\xE4rimuoto",U5="V\xE4rin esiasetukset",K5="Mukautetut v\xE4rit",G5="Uusi muokattu v\xE4ri",X5="Ei mit\xE4\xE4n",W5="Poista v\xE4ri",Y5="L\xE4pin\xE4kyv\xE4",Z5={add:O5,addColor:A5,cancel:E5,colorFormat:q5,colorPresets:U5,customColors:K5,newColor:G5,noColor:X5,removeColor:W5,transparent:Y5};var Us={};m(Us,{add:()=>Q5,addColor:()=>$5,cancel:()=>J5,colorFormat:()=>ek,colorPresets:()=>ok,customColors:()=>rk,default:()=>ik,newColor:()=>tk,noColor:()=>ak,removeColor:()=>sk,transparent:()=>nk});var Q5="Ajouter",$5="Ajouter une couleur",J5="Annuler",ek="Format de couleur",ok="Pr\xE9r\xE9glages de couleur",rk="Couleurs personnalis\xE9es",tk="Nouvelle couleur personnalis\xE9e",ak="Aucune",sk="Supprimer la couleur",nk="Transparent",ik={add:Q5,addColor:$5,cancel:J5,colorFormat:ek,colorPresets:ok,customColors:rk,newColor:tk,noColor:ak,removeColor:sk,transparent:nk};var Ks={};m(Ks,{add:()=>lk,addColor:()=>pk,cancel:()=>mk,colorFormat:()=>dk,colorPresets:()=>ck,customColors:()=>uk,default:()=>vk,newColor:()=>fk,noColor:()=>yk,removeColor:()=>gk,transparent:()=>bk});var lk="Ajouter",pk="Ajouter une couleur",mk="Annuler",dk="Format de couleur",ck="Pr\xE9r\xE9glages de couleur",uk="Couleurs personnalis\xE9es",fk="Nouvelle couleur personnalis\xE9e",yk="Aucune",gk="Supprimer la couleur",bk="Transparent",vk={add:lk,addColor:pk,cancel:mk,colorFormat:dk,colorPresets:ck,customColors:uk,newColor:fk,noColor:yk,removeColor:gk,transparent:bk};var Gs={};m(Gs,{add:()=>hk,addColor:()=>_k,cancel:()=>Ck,colorFormat:()=>xk,colorPresets:()=>Pk,customColors:()=>zk,default:()=>Nk,newColor:()=>kk,noColor:()=>Rk,removeColor:()=>wk,transparent:()=>Ik});var hk="\u05D4\u05D5\u05E1\u05E4\u05D4",_k="\u05D4\u05D5\u05E1\u05E3 \u05E6\u05D1\u05E2",Ck="\u05D1\u05D9\u05D8\u05D5\u05DC",xk="\u05E4\u05D5\u05E8\u05DE\u05D8 \u05E6\u05D1\u05E2",Pk="\u05DE\u05E6\u05D1\u05D9 \u05E6\u05D1\u05E2 \u05DE\u05EA\u05D5\u05DB\u05E0\u05EA\u05D9\u05DD",zk="\u05E6\u05D1\u05E2\u05D9\u05DD \u05DE\u05D5\u05EA\u05D0\u05DE\u05D9\u05DD \u05D0\u05D9\u05E9\u05D9\u05EA",kk="\u05E6\u05D1\u05E2 \u05DE\u05D5\u05EA\u05D0\u05DD \u05D0\u05D9\u05E9\u05D9\u05EA \u05D7\u05D3\u05E9",Rk="\u05DC\u05DC\u05D0",wk="\u05D4\u05E1\u05E8 \u05E6\u05D1\u05E2",Ik="\u05E9\u05E7\u05D5\u05E3",Nk={add:hk,addColor:_k,cancel:Ck,colorFormat:xk,colorPresets:Pk,customColors:zk,newColor:kk,noColor:Rk,removeColor:wk,transparent:Ik};var Xs={};m(Xs,{add:()=>Tk,addColor:()=>Sk,cancel:()=>Lk,colorFormat:()=>Fk,colorPresets:()=>Mk,customColors:()=>Bk,default:()=>Ok,newColor:()=>jk,noColor:()=>Dk,removeColor:()=>Hk,transparent:()=>Vk});var Tk="Dodati",Sk="Dodaj boju",Lk="Otka\u017Ei",Fk="Format boje",Mk="Prijedlozi boja",Bk="Prilago\u0111ene boje",jk="Nova prilago\u0111ena boja",Dk="Prazno",Hk="Ukloni boju",Vk="Prozirna",Ok={add:Tk,addColor:Sk,cancel:Lk,colorFormat:Fk,colorPresets:Mk,customColors:Bk,newColor:jk,noColor:Dk,removeColor:Hk,transparent:Vk};var Ws={};m(Ws,{add:()=>Ak,addColor:()=>Ek,cancel:()=>qk,colorFormat:()=>Uk,colorPresets:()=>Kk,customColors:()=>Gk,default:()=>Qk,newColor:()=>Xk,noColor:()=>Wk,removeColor:()=>Yk,transparent:()=>Zk});var Ak="Tambah",Ek="Tambah Warna",qk="Batalkan",Uk="Format Warna",Kk="Preset Warna",Gk="Warna Kustom",Xk="Warna Khusus Baru",Wk="Tidak ada",Yk="Hapus Warna",Zk="Transparan",Qk={add:Ak,addColor:Ek,cancel:qk,colorFormat:Uk,colorPresets:Kk,customColors:Gk,newColor:Xk,noColor:Wk,removeColor:Yk,transparent:Zk};var Ys={};m(Ys,{add:()=>$k,addColor:()=>Jk,cancel:()=>e0,colorFormat:()=>o0,colorPresets:()=>r0,customColors:()=>t0,default:()=>l0,newColor:()=>a0,noColor:()=>s0,removeColor:()=>n0,transparent:()=>i0});var $k="Aggiungi",Jk="Aggiungi colore",e0="Annulla",o0="Formato del colore",r0="Colori predefiniti",t0="Colori personalizzati",a0="Nuovo colore personalizzato",s0="Nessuno",n0="Rimuovi colore",i0="Trasparente",l0={add:$k,addColor:Jk,cancel:e0,colorFormat:o0,colorPresets:r0,customColors:t0,newColor:a0,noColor:s0,removeColor:n0,transparent:i0};var Zs={};m(Zs,{add:()=>p0,addColor:()=>m0,cancel:()=>d0,colorFormat:()=>c0,colorPresets:()=>u0,customColors:()=>f0,default:()=>h0,newColor:()=>y0,noColor:()=>g0,removeColor:()=>b0,transparent:()=>v0});var p0="\u8FFD\u52A0",m0="\u8272\u3092\u8FFD\u52A0",d0="\u30AD\u30E3\u30F3\u30BB\u30EB",c0="\u30AB\u30E9\u30FC\u30D5\u30A9\u30FC\u30DE\u30C3\u30C8",u0="\u30AB\u30E9\u30FC\u30D7\u30EA\u30BB\u30C3\u30C8",f0="\u30AB\u30B9\u30BF\u30E0\u30AB\u30E9\u30FC",y0="\u65B0\u898F\u30AB\u30B9\u30BF\u30E0\u30AB\u30E9\u30FC",g0="\u306A\u3057",b0="\u8272\u3092\u524A\u9664",v0="\u900F\u660E",h0={add:p0,addColor:m0,cancel:d0,colorFormat:c0,colorPresets:u0,customColors:f0,newColor:y0,noColor:g0,removeColor:b0,transparent:v0};var Qs={};m(Qs,{add:()=>_0,addColor:()=>C0,cancel:()=>x0,colorFormat:()=>P0,colorPresets:()=>z0,customColors:()=>k0,default:()=>T0,newColor:()=>R0,noColor:()=>w0,removeColor:()=>I0,transparent:()=>N0});var _0="\uCD94\uAC00",C0="\uC0C9\uC0C1 \uCD94\uAC00",x0="\uCDE8\uC18C",P0="\uC0C9\uC0C1 \uD615\uC2DD",z0="\uC0C9\uC0C1 \uBBF8\uB9AC\uC124\uC815",k0="\uC0AC\uC6A9\uC790 \uC815\uC758 \uC0C9\uC0C1",R0="\uC0C8\uB85C\uC6B4 \uC0AC\uC6A9\uC790\uC9C0\uC815 \uC0C9\uC0C1",w0="\uC5C6\uC74C",I0="\uC0C9\uC0C1 \uC81C\uAC70",N0="\uD22C\uBA85",T0={add:_0,addColor:C0,cancel:x0,colorFormat:P0,colorPresets:z0,customColors:k0,newColor:R0,noColor:w0,removeColor:I0,transparent:N0};var $s={};m($s,{add:()=>S0,addColor:()=>L0,cancel:()=>F0,colorFormat:()=>M0,colorPresets:()=>B0,customColors:()=>j0,default:()=>A0,newColor:()=>D0,noColor:()=>H0,removeColor:()=>V0,transparent:()=>O0});var S0="Tambah",L0="Tambah Warna",F0="Batal",M0="Format Warna",B0="Praset Warna",j0="Warna Kustom",D0="Warna Tersuai Baharu",H0="Tiada",V0="Buang Warna",O0="Lut Sinar",A0={add:S0,addColor:L0,cancel:F0,colorFormat:M0,colorPresets:B0,customColors:j0,newColor:D0,noColor:H0,removeColor:V0,transparent:O0};var Js={};m(Js,{add:()=>E0,addColor:()=>q0,cancel:()=>U0,colorFormat:()=>K0,colorPresets:()=>G0,customColors:()=>X0,default:()=>$0,newColor:()=>W0,noColor:()=>Y0,removeColor:()=>Z0,transparent:()=>Q0});var E0="Legg til",q0="Legg til farge",U0="Avbryt",K0="Fargeformat",G0="Fargeinnstillinger",X0="Egendefinerte farger",W0="Ny tilpasset farge",Y0="Ingen",Z0="Fjern farge",Q0="Gjennomsiktig",$0={add:E0,addColor:q0,cancel:U0,colorFormat:K0,colorPresets:G0,customColors:X0,newColor:W0,noColor:Y0,removeColor:Z0,transparent:Q0};var en={};m(en,{add:()=>J0,addColor:()=>eR,cancel:()=>oR,colorFormat:()=>rR,colorPresets:()=>tR,customColors:()=>aR,default:()=>pR,newColor:()=>sR,noColor:()=>nR,removeColor:()=>iR,transparent:()=>lR});var J0="Voeg toe",eR="Kleur toevoegen",oR="Annuleer",rR="Kleurformaat",tR="Kleurvoorinstellingen",aR="Aangepaste kleuren",sR="Nieuwe aangepaste kleur",nR="Geen",iR="Kleur verwijderen",lR="Doorzichtig",pR={add:J0,addColor:eR,cancel:oR,colorFormat:rR,colorPresets:tR,customColors:aR,newColor:sR,noColor:nR,removeColor:iR,transparent:lR};var on={};m(on,{add:()=>mR,addColor:()=>dR,cancel:()=>cR,colorFormat:()=>uR,colorPresets:()=>fR,customColors:()=>yR,default:()=>_R,newColor:()=>gR,noColor:()=>bR,removeColor:()=>vR,transparent:()=>hR});var mR="Dodaj",dR="Dodaj kolor",cR="Anuluj",uR="Format koloru",fR="Wst\u0119pnie ustawione kolory",yR="Niestandardowe kolory",gR="Nowy kolor niestandardowy",bR="Brak",vR="Usu\u0144 kolor",hR="Prze\u015Bwiecaj\u0105ce",_R={add:mR,addColor:dR,cancel:cR,colorFormat:uR,colorPresets:fR,customColors:yR,newColor:gR,noColor:bR,removeColor:vR,transparent:hR};var rn={};m(rn,{add:()=>CR,addColor:()=>xR,cancel:()=>PR,colorFormat:()=>zR,colorPresets:()=>kR,customColors:()=>RR,default:()=>SR,newColor:()=>wR,noColor:()=>IR,removeColor:()=>NR,transparent:()=>TR});var CR="Adicionar",xR="Adicionar cor",PR="Cancelar",zR="Formato de cor",kR="Predefini\xE7\xF5es de cor",RR="Cores personalizadas",wR="Nova cor personalizada",IR="Nenhum",NR="Remover cor",TR="Transparente",SR={add:CR,addColor:xR,cancel:PR,colorFormat:zR,colorPresets:kR,customColors:RR,newColor:wR,noColor:IR,removeColor:NR,transparent:TR};var tn={};m(tn,{add:()=>LR,addColor:()=>FR,cancel:()=>MR,colorFormat:()=>BR,colorPresets:()=>jR,customColors:()=>DR,default:()=>ER,newColor:()=>HR,noColor:()=>VR,removeColor:()=>OR,transparent:()=>AR});var LR="Adicionar",FR="Adicionar cor",MR="Cancelar",BR="Formato de cor",jR="Pr\xE9-ajustes de Cores",DR="Cores personalizadas",HR="Nova Cor Personalizada",VR="Nenhum",OR="Remover cor",AR="Transparente",ER={add:LR,addColor:FR,cancel:MR,colorFormat:BR,colorPresets:jR,customColors:DR,newColor:HR,noColor:VR,removeColor:OR,transparent:AR};var an={};m(an,{add:()=>qR,addColor:()=>UR,cancel:()=>KR,colorFormat:()=>GR,colorPresets:()=>XR,customColors:()=>WR,default:()=>JR,newColor:()=>YR,noColor:()=>ZR,removeColor:()=>QR,transparent:()=>$R});var qR="\u0414\u043E\u0431\u0430\u0432\u0438\u0442\u044C",UR="\u0414\u043E\u0431\u0430\u0432\u0438\u0442\u044C \u0446\u0432\u0435\u0442",KR="\u041E\u0442\u043C\u0435\u043D\u0438\u0442\u044C",GR="\u0424\u043E\u0440\u043C\u0430\u0442 \u0446\u0432\u0435\u0442\u0430",XR="\u0411\u0438\u0431\u043B\u0438\u043E\u0442\u0435\u043A\u0430 \u0446\u0432\u0435\u0442\u043E\u0432",WR="\u041F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u0442\u0435\u043B\u044C\u0441\u043A\u0438\u0435 \u0446\u0432\u0435\u0442\u0430",YR="\u041D\u043E\u0432\u044B\u0439 \u0441\u043E\u0431\u0441\u0442\u0432\u0435\u043D\u043D\u044B\u0439 \u0446\u0432\u0435\u0442",ZR="\u041D\u0435\u0442",QR="\u0423\u0434\u0430\u043B\u0438\u0442\u044C \u0446\u0432\u0435\u0442",$R="\u041F\u0440\u043E\u0437\u0440\u0430\u0447\u043D\u044B\u0439",JR={add:qR,addColor:UR,cancel:KR,colorFormat:GR,colorPresets:XR,customColors:WR,newColor:YR,noColor:ZR,removeColor:QR,transparent:$R};var sn={};m(sn,{add:()=>ew,addColor:()=>ow,cancel:()=>rw,colorFormat:()=>tw,colorPresets:()=>aw,customColors:()=>sw,default:()=>mw,newColor:()=>nw,noColor:()=>iw,removeColor:()=>lw,transparent:()=>pw});var ew="Prida\u0165",ow="Prida\u0165 farbu",rw="Zru\u0161i\u0165",tw="Form\xE1t farby",aw="Predvo\u013Eby farieb",sw="Vlastn\xE9 farby",nw="Vlastn\xE1 farba",iw="\u017Diadny",lw="Odstr\xE1ni\u0165 farbu",pw="Prieh\u013Eadn\xE1",mw={add:ew,addColor:ow,cancel:rw,colorFormat:tw,colorPresets:aw,customColors:sw,newColor:nw,noColor:iw,removeColor:lw,transparent:pw};var nn={};m(nn,{add:()=>dw,addColor:()=>cw,cancel:()=>uw,colorFormat:()=>fw,colorPresets:()=>yw,customColors:()=>gw,default:()=>Cw,newColor:()=>bw,noColor:()=>vw,removeColor:()=>hw,transparent:()=>_w});var dw="Dodaj",cw="Dodaj barvo",uw="Prekli\u010Di",fw="Barvni format",yw="Barvne predloge",gw="Prilagojene barve",bw="Nova barva po meri",vw="Prazna stran",hw="Odstrani barvo",_w="Prosojna",Cw={add:dw,addColor:cw,cancel:uw,colorFormat:fw,colorPresets:yw,customColors:gw,newColor:bw,noColor:vw,removeColor:hw,transparent:_w};var ln={};m(ln,{add:()=>xw,addColor:()=>Pw,cancel:()=>zw,colorFormat:()=>kw,colorPresets:()=>Rw,customColors:()=>ww,default:()=>Lw,newColor:()=>Iw,noColor:()=>Nw,removeColor:()=>Tw,transparent:()=>Sw});var xw="L\xE4gg till",Pw="L\xE4gg till f\xE4rg",zw="Avbryt",kw="F\xE4rgformat",Rw="F\xF6rval f\xF6r f\xE4rger",ww="Anpassade f\xE4rger",Iw="Ny anpassad f\xE4rg",Nw="Ingen",Tw="Ta bort f\xE4rg",Sw="Genomskinligt",Lw={add:xw,addColor:Pw,cancel:zw,colorFormat:kw,colorPresets:Rw,customColors:ww,newColor:Iw,noColor:Nw,removeColor:Tw,transparent:Sw};var pn={};m(pn,{add:()=>Fw,addColor:()=>Mw,cancel:()=>Bw,colorFormat:()=>jw,colorPresets:()=>Dw,customColors:()=>Hw,default:()=>qw,newColor:()=>Vw,noColor:()=>Ow,removeColor:()=>Aw,transparent:()=>Ew});var Fw="\u0E40\u0E1E\u0E34\u0E48\u0E21",Mw="\u0E40\u0E1E\u0E34\u0E48\u0E21\u0E2A\u0E35",Bw="\u0E22\u0E01\u0E40\u0E25\u0E34\u0E01",jw="\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E2A\u0E35",Dw="\u0E04\u0E48\u0E32\u0E2A\u0E35\u0E17\u0E35\u0E48\u0E15\u0E31\u0E49\u0E07\u0E44\u0E27\u0E49\u0E25\u0E48\u0E27\u0E07\u0E2B\u0E19\u0E49\u0E32",Hw="\u0E2A\u0E35\u0E17\u0E35\u0E48\u0E01\u0E33\u0E2B\u0E19\u0E14\u0E40\u0E2D\u0E07",Vw="\u0E2A\u0E35\u0E17\u0E35\u0E48\u0E01\u0E33\u0E2B\u0E19\u0E14\u0E40\u0E2D\u0E07\u0E43\u0E2B\u0E21\u0E48",Ow="\u0E44\u0E21\u0E48\u0E21\u0E35\u0E40\u0E25\u0E22",Aw="\u0E25\u0E1A\u0E2A\u0E35",Ew="\u0E42\u0E1B\u0E23\u0E48\u0E07\u0E43\u0E2A",qw={add:Fw,addColor:Mw,cancel:Bw,colorFormat:jw,colorPresets:Dw,customColors:Hw,newColor:Vw,noColor:Ow,removeColor:Aw,transparent:Ew};var mn={};m(mn,{add:()=>Uw,addColor:()=>Kw,cancel:()=>Gw,colorFormat:()=>Xw,colorPresets:()=>Ww,customColors:()=>Yw,default:()=>eI,newColor:()=>Zw,noColor:()=>Qw,removeColor:()=>$w,transparent:()=>Jw});var Uw="Ekle",Kw="Renk Ekle",Gw="Vazge\xE7",Xw="Renk Format\u0131",Ww="Renk \xD6nayarlar\u0131",Yw="\xD6zel Renkler",Zw="Yeni \xF6zel renk",Qw="Hi\xE7biri",$w="Rengi Kald\u0131r",Jw="\u015Eeffaf",eI={add:Uw,addColor:Kw,cancel:Gw,colorFormat:Xw,colorPresets:Ww,customColors:Yw,newColor:Zw,noColor:Qw,removeColor:$w,transparent:Jw};var dn={};m(dn,{add:()=>oI,addColor:()=>rI,cancel:()=>tI,colorFormat:()=>aI,colorPresets:()=>sI,customColors:()=>nI,default:()=>dI,newColor:()=>iI,noColor:()=>lI,removeColor:()=>pI,transparent:()=>mI});var oI="\u0414\u043E\u0434\u0430\u0442\u0438",rI="\u0414\u043E\u0434\u0430\u0442\u0438 \u043A\u043E\u043B\u0456\u0440",tI="\u0421\u043A\u0430\u0441\u0443\u0432\u0430\u0442\u0438",aI="\u0424\u043E\u0440\u043C\u0430\u0442 \u043A\u043E\u043B\u044C\u043E\u0440\u0443",sI="\u0411\u0456\u0431\u043B\u0456\u043E\u0442\u0435\u043A\u0430 \u043A\u043E\u043B\u044C\u043E\u0440\u0456\u0432",nI="\u041A\u043E\u0440\u0438\u0441\u0442\u0443\u0432\u0430\u0446\u044C\u043A\u0456 \u043A\u043E\u043B\u044C\u043E\u0440\u0438",iI="\u041D\u043E\u0432\u0438\u0439 \u0432\u043B\u0430\u0441\u043D\u0438\u0439 \u043A\u043E\u043B\u0456\u0440",lI="\u041D\u0435\u043C\u0430\u0454",pI="\u0412\u0438\u0434\u0430\u043B\u0438\u0442\u0438 \u043A\u043E\u043B\u0456\u0440",mI="\u041F\u0440\u043E\u0437\u043E\u0440\u0438\u0439",dI={add:oI,addColor:rI,cancel:tI,colorFormat:aI,colorPresets:sI,customColors:nI,newColor:iI,noColor:lI,removeColor:pI,transparent:mI};var cn={};m(cn,{add:()=>cI,addColor:()=>uI,cancel:()=>fI,colorFormat:()=>yI,colorPresets:()=>gI,customColors:()=>bI,default:()=>xI,newColor:()=>vI,noColor:()=>hI,removeColor:()=>_I,transparent:()=>CI});var cI="\u6DFB\u52A0",uI="\u6DFB\u52A0\u989C\u8272",fI="\u53D6\u6D88",yI="\u989C\u8272\u683C\u5F0F",gI="\u989C\u8272\u9884\u8BBE",bI="\u81EA\u5B9A\u4E49\u989C\u8272",vI="\u65B0\u81EA\u5B9A\u4E49\u989C\u8272",hI="\u65E0",_I="\u79FB\u9664\u989C\u8272",CI="\u900F\u660E",xI={add:cI,addColor:uI,cancel:fI,colorFormat:yI,colorPresets:gI,customColors:bI,newColor:vI,noColor:hI,removeColor:_I,transparent:CI};var un={};m(un,{add:()=>PI,addColor:()=>zI,cancel:()=>kI,colorFormat:()=>RI,colorPresets:()=>wI,customColors:()=>II,default:()=>FI,newColor:()=>NI,noColor:()=>TI,removeColor:()=>SI,transparent:()=>LI});var PI="\u52A0\u5165",zI="\u6DFB\u52A0\u984F\u8272",kI="\u53D6\u6D88",RI="\u984F\u8272\u683C\u5F0F",wI="\u984F\u8272\u9810\u8A2D\u9805",II="\u81EA\u8A02\u984F\u8272",NI="\u65B0\u81EA\u8A02\u984F\u8272",TI="\u7121",SI="\u79FB\u9664\u984F\u8272",LI="\u900F\u660E",FI={add:PI,addColor:zI,cancel:kI,colorFormat:RI,colorPresets:wI,customColors:II,newColor:NI,noColor:TI,removeColor:SI,transparent:LI};var MI=[Ms,Bs,js,Ds,Hs,Vs,Os,As,Es,qs,Us,Ks,Gs,Xs,Ws,Ys,Zs,Qs,$s,Js,en,on,rn,tn,an,sn,nn,ln,pn,mn,dn,cn,un],Ye=MI;import{MinusIcon as UN,PlusIcon as KN}from"@baseline-ui/icons/20";import{sprinkles as GN}from"@baseline-ui/tokens";import{classNames as cf,invariant as XN}from"@baseline-ui/utils";import zt,{useCallback as wn,useEffect as WN}from"react";import{parseColor as YN}from"@react-stately/color";import{useId as ZN}from"react-aria";import BI from"react";import{useOverlayTrigger as jI}from"react-aria";import{useOverlayTriggerState as DI}from"react-stately";import{jsx as HI}from"react/jsx-runtime";var Ze=BI.createContext({state:null,triggerProps:{},overlayProps:{}}),dt=({children:e,...a})=>{let o=DI(a),{triggerProps:r,overlayProps:s}=jI({type:"dialog"},o);return HI(Ze.Provider,{value:{state:o,triggerProps:r,overlayProps:s},children:e})};dt.displayName="Modal";import{classNames as VI,invariant as Su}from"@baseline-ui/utils";import{animated as Lu,easings as OI,useReducedMotion as Fu,useSpring as AI,useTransition as EI}from"@react-spring/web";import fn,{useContext as qI}from"react";import{Overlay as UI,useModalOverlay as KI}from"react-aria";var Tu="aml2vl0 _1yep5z6ea _1yep5z6g7 _1yep5z6g8 _1yep5z6g9 _1yep5z6gy _1yep5z6gz _1yep5z6h0 _1yep5z6hs _1yep5z6ht _1yep5z6hu";import{jsx as ct}from"react/jsx-runtime";var GI=({children:e,className:a,style:o,isDismissable:r=!0,isKeyboardDismissDisabled:s=!1,portalContainer:t})=>{let{state:n}=fn.useContext(Ze);Su(n,"ModalContent must be a child of Modal");let i=fn.useRef(null),{modalProps:l,underlayProps:p}=KI({isDismissable:r,isKeyboardDismissDisabled:s},n,i),{theme:d}=qI(Ge),u=Fu(),c=AI({from:{opacity:0,transform:"scale(0.95)"},to:{opacity:1,transform:"scale(1)"},immediate:!!u,config:{easing:OI.easeInBounce}});return ct(UI,{portalContainer:t,children:ct(Xe,{className:VI(Tu,a),theme:d,UNSAFE_domProps:{...p,"data-testid":"underlay"},style:o,children:ct(Lu.div,{...l,style:{...l.style,...c},ref:i,children:e})})})},XI=Lu(GI),yn=({children:e,style:a,...o})=>{let{state:r}=fn.useContext(Ze);Su(r,"ModalContent must be a child of Modal");let s=Fu();return EI(r.isOpen,{from:{opacity:0},enter:{opacity:1},immediate:!!s})((n,i)=>i&&ct(XI,{...o,style:{...a,...n},children:typeof e=="function"?e({close:r.close}):e}))};import{Slot as WI}from"@radix-ui/react-slot";import YI from"react";import{jsx as ZI}from"react/jsx-runtime";var ut=({children:e})=>{let{triggerProps:a}=YI.useContext(Ze);return ZI(WI,{...a,children:e})};ut.displayName="ModalTrigger";import{Slot as QI}from"@radix-ui/react-slot";import $I from"react";import{jsx as eN}from"react/jsx-runtime";var JI=({children:e})=>{let{state:a}=$I.useContext(Ze);return eN(QI,{onPress:()=>a?.close(),children:e})};import{sprinkles as Mu}from"@baseline-ui/tokens";import{classNames as oN}from"@baseline-ui/utils";import rN,{useMemo as tN}from"react";import{jsx as sN}from"react/jsx-runtime";function aN(e){return Mu.properties.has(e)}var zr=rN.forwardRef(({elementType:e="div",children:a,...o},r)=>{let s=e,{sprinkleProps:t,domProps:n}=tN(()=>{let i={},l={};for(let p in o)aN(p)?i[p]=o[p]:l[p]=o[p];return{sprinkleProps:i,domProps:l}},[o]);return sN(s,{...n,className:oN(Mu(t),"BaselineUI-Box",n.className),ref:r,children:a})});zr.displayName="Box";import{invariant as pN}from"@baseline-ui/utils";import mN,{useContext as dN}from"react";import Bu from"react";import{useOverlayTrigger as nN}from"react-aria";import{useOverlayTriggerState as iN}from"react-stately";import{jsx as lN}from"react/jsx-runtime";var kr=Bu.createContext({state:null,overlayTriggerAria:{triggerProps:{},overlayProps:{}},triggerRef:void 0}),gn=({children:e,...a})=>{let o=Bu.useRef(null),r=iN(a),s=nN(a,r);return lN(kr.Provider,{value:{state:r,overlayTriggerAria:s,triggerRef:o},children:typeof e=="function"?e(r):e})};import{jsx as cN}from"react/jsx-runtime";var ft=mN.forwardRef((e,a)=>{let{state:o,overlayTriggerAria:{overlayProps:r},triggerRef:s}=dN(kr);return pN(s),o?.isOpen?cN(Be,{ref:a,...e,triggerRef:e.triggerRef||s,overlayProps:r,state:o}):null});ft.displayName="PopoverContent";import{invariant as uN}from"@baseline-ui/utils";import{Slot as fN}from"@radix-ui/react-slot";import{useContext as yN}from"react";import{jsx as gN}from"react/jsx-runtime";var bn=({children:e})=>{let{state:a,overlayTriggerAria:o,triggerRef:r}=yN(kr);uN(a,"PopoverTrigger must be used within a Popover");let{triggerProps:s}=o;return gN(fN,{...s,ref:r,children:e})};var ju="_1dbkl5q",Du="_1yep5z6g7 _1yep5z6g8 _1yep5z6g9 _1yep5z6gg _1yep5z6gh _1yep5z6gi _1yep5z69l _1yep5z69m _1yep5z69n _1yep5z6gy _1yep5z6gz _1yep5z6h0 _1yep5z6hy _1yep5z6hz _1yep5z6i0",Hu=y({defaultClassName:"_1dbkl54 _1yep5z66 _1yep5z67 _1yep5z68 _1yep5z62i _1yep5z62j _1yep5z62k _1yep5z63o _1yep5z63p _1yep5z63q _1yep5z61c _1yep5z61d _1yep5z61e _1yep5z6ai _1yep5z6aq _1yep5z6ay _1yep5z6b6 _1yep5z6g7 _1yep5z6g8 _1yep5z6g9 _1yep5z6gg _1yep5z6gh _1yep5z6gi _1yep5z6jd _1yep5z6j5 _1yep5z69i _1yep5z69j _1yep5z69k _1yep5z6d2 _1yep5z6j4 _1yep5z6c6",variantClassNames:{isHovered:{true:"_1dbkl55"},isFocusVisible:{true:"_1dbkl56"},isDisabled:{true:"z9nup83 _1yep5z6wo"},labelPosition:{top:"_1dbkl58",start:"_1dbkl59"}},defaultVariants:{},compoundVariants:[]}),Vu=y({defaultClassName:"_1dbkl50 _1yep5z6g7 _1yep5z6g8 _1yep5z6g9 _1yep5z6c6 _1yep5z6d3",variantClassNames:{labelPosition:{top:"_1yep5z6lx _1yep5z6ly _1yep5z6lz",start:"_1dbkl52"}},defaultVariants:{},compoundVariants:[]}),yt="_1dbkl5o _1yep5z6gd _1yep5z6ge _1yep5z6gf _1yep5z69f _1yep5z69g _1yep5z69h",Ou="_1dbkl5a z9nup87",gt="_1dbkl5p _1yep5z6ao _1yep5z6aw _1yep5z6b4 _1yep5z6bc _1yep5z6fs _1yep5z6ft _1yep5z6fu",Au=y({defaultClassName:"_1dbkl5c _1yep5z6ao _1yep5z6aw _1yep5z6b4 _1yep5z6bc _1yep5z6fs _1yep5z6ft _1yep5z6fu _1yep5z6j4 _1yep5z6iz",variantClassNames:{isFocusVisible:{true:"_1dbkl5d _1dbkl5b"},isDisabled:{true:"_1yep5z6v0"},removeBlendMode:{true:"_1dbkl5f"},isSelected:{true:"_1dbkl5b"},isHovered:{true:"_1dbkl5b"}},defaultVariants:{},compoundVariants:[]}),Eu="_1dbkl5n _1yep5z66 _1yep5z67 _1yep5z68 _1yep5z62i _1yep5z62j _1yep5z62k _1yep5z63o _1yep5z63p _1yep5z63q _1yep5z61c _1yep5z61d _1yep5z61e _1yep5z6j5",bt="_1dbkl5i _1yep5z6ao _1yep5z6aw _1yep5z6b4 _1yep5z6bc _1yep5z6iv _1yep5z6iw _1yep5z6iy _1yep5z6ix _1yep5z6fv _1yep5z6fw _1yep5z6fx _1yep5z6g7 _1yep5z6g8 _1yep5z6g9 _1yep5z6gy _1yep5z6gz _1yep5z6h0 _1yep5z6hs _1yep5z6ht _1yep5z6hu",qu="_1yep5z63r _1yep5z63s _1yep5z63t _1yep5z619 _1yep5z61a _1yep5z61b _1yep5z6g7 _1yep5z6g8 _1yep5z6g9 _1yep5z6gg _1yep5z6gh _1yep5z6gi _1yep5z6hy _1yep5z6hz _1yep5z6i0 _1yep5z6c6 _1yep5z6d3 _1yep5z69l _1yep5z69m _1yep5z69n _1yep5z6gy _1yep5z6gz _1yep5z6h0",vt=y({defaultClassName:"_1dbkl5k _1yep5z63 _1yep5z64 _1yep5z65 _1yep5z62f _1yep5z62g _1yep5z62h _1yep5z6e0",variantClassNames:{includesCustomColorPicker:{true:"_1yep5z6kl _1yep5z6km _1yep5z6kn"}},defaultVariants:{},compoundVariants:[]}),vn="_1dbkl5z _1yep5z6g7 _1yep5z6g8 _1yep5z6g9 _1yep5z6gg _1yep5z6gh _1yep5z6gi",Uu="_1dbkl53",Ku=y({defaultClassName:"_1dbkl5u _1yep5z66 _1yep5z67 _1yep5z68 _1yep5z62i _1yep5z62j _1yep5z62k _1yep5z63o _1yep5z63p _1yep5z63q _1yep5z61c _1yep5z61d _1yep5z61e _1yep5z6ai _1yep5z6ay _1yep5z6ax _1yep5z6bd _1yep5z6g7 _1yep5z6g8 _1yep5z6g9 _1yep5z6gg _1yep5z6gh _1yep5z6gi _1yep5z6gy _1yep5z6gz _1yep5z6h0 _1yep5z6je _1yep5z6ex _1yep5z6j5 _1yep5z6d2 _1yep5z6c6",variantClassNames:{isFocused:{true:"_1dbkl5v _1yep5z6yc"},isHovered:{true:"_1dbkl5w"},allowAlpha:{false:"_1yep5z6u8 _1yep5z6uo _1yep5z612k"}},defaultVariants:{},compoundVariants:[[{isHovered:!0,isFocused:!1},"_1yep5z61hy"]]}),Rr="_1dbkl5y",ht="_1dbkl5j _1yep5z6aj _1yep5z6ar _1yep5z6az _1yep5z6b7 _1yep5z6bf",_t="_1dbkl5m _1yep5z69 _1yep5z6a _1yep5z6b _1yep5z62l _1yep5z62m _1yep5z62n _1yep5z63r _1yep5z63s _1yep5z63t _1yep5z61f _1yep5z61g _1yep5z61h _1yep5z6g7 _1yep5z6g8 _1yep5z6g9 _1yep5z6gj _1yep5z6gk _1yep5z6gl _1yep5z69f _1yep5z69g _1yep5z69h",hn="_1dbkl511",Gu="_1dbkl510",_n="_1yep5z69 _1yep5z6a _1yep5z6b _1yep5z62l _1yep5z62m _1yep5z62n _1yep5z63r _1yep5z63s _1yep5z63t _1yep5z61f _1yep5z61g _1yep5z61h _1yep5z6g7 _1yep5z6g8 _1yep5z6g9 _1yep5z6gj _1yep5z6gk _1yep5z6gl _1yep5z69l _1yep5z69m _1yep5z69n",Ct=y({defaultClassName:"_1dbkl5r _1yep5z6ao _1yep5z6aw _1yep5z6b4 _1yep5z6bc _1yep5z6j9 _1yep5z6fv _1yep5z6fw _1yep5z6fx _1yep5z6je _1yep5z6jh",variantClassNames:{isFocusVisible:{true:"_1dbkl5s _1yep5z612o _1yep5z6z1 _1yep5z612q"}},defaultVariants:{},compoundVariants:[]}),Cn="z9nup84 z9nup86 _1yep5z6ao _1yep5z6aw _1yep5z6b4 _1yep5z6bc _1yep5z6iv _1yep5z6iw _1yep5z6iy _1yep5z6ix _1yep5z6fv _1yep5z6fw _1yep5z6fx";import{sprinkles as ON}from"@baseline-ui/tokens";import{classNames as AN}from"@baseline-ui/utils";import EN from"react";import{classNames as Ju}from"@baseline-ui/utils";import{useColorArea as PN}from"@react-aria/color";import{useColorAreaState as zN}from"@react-stately/color";import Pn,{useEffect as kN}from"react";import{useFocusRing as RN}from"react-aria";import{invariant as xN}from"@baseline-ui/utils";import{parseColor as xn}from"@react-stately/color";import{NoneIcon as bN}from"@baseline-ui/icons/16";import{classNames as Xu}from"@baseline-ui/utils";import{parseColor as vN}from"@react-stately/color";import{useHover as hN}from"react-aria";import{Fragment as _N,jsx as wr,jsxs as CN}from"react/jsx-runtime";var ao=({color:e,isFocusVisible:a,isDisabled:o,isSelected:r,isPresentational:s})=>{let t=e&&e!==je&&vN(e),n=t&&t.getChannelValue("alpha")===0,{hoverProps:i,isHovered:l}=hN({isDisabled:o});return wr("div",{...i,className:Xu(Au({removeBlendMode:!t,isFocusVisible:a,isDisabled:o,isSelected:r,isHovered:l&&!s&&!o}),{[Mo({size:"xs"})]:n}),children:t?CN(_N,{children:[wr("div",{className:Xu(bt,Mo({size:"xs"}))}),wr("div",{className:bt,style:{backgroundColor:n?void 0:t.toString("hexa")}})]}):wr("div",{className:bt,children:wr(bN,{size:14})})})};import{jsx as Wu}from"react/jsx-runtime";var Yu=[{id:"hex",label:"HEX"},{id:"rgb",label:"RGB"}],xo=xn("#000000").toFormat("hsla"),A="hsla",Ir="hexa";function Po(e){return typeof e=="string"?xn(e).toFormat(A):e?e.toFormat(A):null}function Zu(e,a){return e?.getChannelValue("alpha")?a?.toString(Ir)===e.toString(Ir):!a?.getChannelValue("alpha")}function Qu(e,a,o){return a?a.label:e?.getChannelValue("alpha")===0?o:e?.toString("rgba")}var je="NONE";function $u(e,a){let o=a?.map(s=>({id:xn(s.color).toString(Ir),label:s.label}))||[],r={id:je,label:e};return[...o,r]}var xt=(e,{optionProps:a,isFocusVisible:o,isSelected:r},s)=>(xN(e.value&&"label"in e.value,"Item must have label"),Wu("li",{...a,ref:s,"aria-label":e.value?.label||void 0,className:Eu,children:Wu(ao,{color:e.value.id,isFocusVisible:o,isSelected:r})}));import{jsx as zn,jsxs as ef}from"react/jsx-runtime";var of=({value:e,...a})=>{let o=Pn.useRef(null),r=Pn.useRef(null),s=Pn.useRef(null),t=zN({...a,value:e}),{colorAreaProps:n,gradientProps:i,xInputProps:l,yInputProps:p,thumbProps:d}=PN({...a,value:e,inputXRef:o,inputYRef:r,containerRef:s},t);kN(()=>{o.current?.focus()},[]);let{focusProps:u,isFocusVisible:c}=RN();return ef("div",{ref:s,...n,className:Ju(ju,"BaselineUI-ColorInput-ColorArea"),children:[zn("div",{...i,className:Uu}),ef("div",{...d,className:Ju(Ct({isFocusVisible:c}),"BaselineUI-ColorInput-ColorAreaThumb"),style:{...d.style,transform:"translate(-50%, -50%)",backgroundColor:Po(e)?.withChannelValue("alpha",1).toString("css")},children:[zn("input",{ref:o,...l,...u}),zn("input",{ref:r,...p,...u})]})]})};import{classNames as rf}from"@baseline-ui/utils";import{useColorField as wN}from"@react-aria/color";import IN,{useCallback as NN}from"react";import{useColorFieldState as TN}from"@react-stately/color";import{mergeProps as SN,useFocusRing as LN,useHover as FN,useLocale as tf}from"react-aria";import{jsx as so,jsxs as lf}from"react/jsx-runtime";var af=({color:e,setColor:a,allowAlpha:o,...r})=>{let s=TN({value:e,onChange:u=>{a(Po(u)?.toFormat(A).withChannelValue("alpha",e.getChannelValue("alpha")??1)||xo)}}),t=IN.useRef(null),{inputProps:n}=wN({...r,"aria-label":"Hex"},s,t),{focusProps:i,isFocused:l}=LN({isTextInput:!0}),{hoverProps:p,isHovered:d}=FN({});return lf("div",{className:rf(vn,"BaselineUI-ColorInput-FieldInput"),"data-color-mode":o?"hexa":"hex",children:[so("input",{...SN(n,i,p),ref:t,className:Ku({isFocused:l,isHovered:d,allowAlpha:o})}),o&&so(nf,{color:e,setColor:a})]})},sf=({color:e,setColor:a,allowAlpha:o})=>{let r=e.toFormat("rgba"),{locale:s}=tf();return lf("div",{className:rf(vn,"BaselineUI-ColorInput-FieldInput"),"data-color-mode":o?"rgba":"rgb",children:[so(Me,{"aria-label":e.getChannelName("red",s),value:r.getChannelValue("red"),showStepper:!1,className:Rr,onChange:t=>{a(r.withChannelValue("red",t).toFormat(A))},step:1,minValue:0,maxValue:255}),so(Me,{"aria-label":e.getChannelName("green",s),value:r.getChannelValue("green"),showStepper:!1,className:Rr,onChange:t=>{a(r.withChannelValue("green",t).toFormat(A))},step:1,minValue:0,maxValue:255}),so(Me,{"aria-label":e.getChannelName("blue",s),value:r.getChannelValue("blue"),showStepper:!1,className:Rr,onChange:t=>{a(r.withChannelValue("blue",t).toFormat(A))},step:1,minValue:0,maxValue:255}),o&&so(nf,{color:e,setColor:a})]})},MN={style:"percent",maximumFractionDigits:0},nf=({color:e,setColor:a})=>{let{locale:o}=tf(),r=NN(s=>{a(e.withChannelValue("alpha",s))},[e,a]);return so(Me,{"aria-label":e.getChannelName("alpha",o),value:e.getChannelValue("alpha"),formatOptions:MN,className:Rr,showStepper:!1,onChange:r,minValue:0,maxValue:1})};import{classNames as pf}from"@baseline-ui/utils";import{useColorSlider as BN}from"@react-aria/color";import{useColorSliderState as jN}from"@react-stately/color";import mf from"react";import{VisuallyHidden as DN,useFocusRing as HN,useLocale as VN}from"react-aria";import{jsx as zo,jsxs as df}from"react/jsx-runtime";var kn=({channel:e,...a})=>{let{locale:o}=VN(),r=jN({...a,channel:e,locale:o}),s=mf.useRef(null),t=mf.useRef(null),{trackProps:n,thumbProps:i,inputProps:l}=BN({...a,channel:e,trackRef:s,inputRef:t,"aria-label":r.value.getChannelName(e,o)},r),{focusProps:p,isFocusVisible:d}=HN();return df("div",{className:pf(gt,{[Mo({size:"xs"})]:e==="alpha"},"BaselineUI-ColorInput-ColorSlider"),"data-channel":e,...n,ref:s,children:[e==="alpha"&&zo("div",{className:Cn}),zo("div",{className:gt,style:n.style}),df("div",{className:pf(Ct({isFocusVisible:d}),"BaselineUI-ColorInput-ColorSliderThumb"),...i,children:[zo("div",{className:Cn,style:{backgroundColor:"#ffffff"}}),zo("div",{style:{backgroundColor:r.getDisplayColor().toString("css"),height:8},className:gt}),zo(DN,{children:zo("input",{ref:t,...l,...p})})]})]})};import{Fragment as qN,jsx as ko,jsxs as Rn}from"react/jsx-runtime";var Pt=({color:e,setColor:a,allowAlpha:o})=>{let[r,s]=EN.useState("hex"),{formatMessage:t}=V(Ye);return Rn(qN,{children:[ko(of,{value:e,xChannel:"saturation",yChannel:"lightness",onChange:a}),Rn("div",{className:_n,children:[ko(kn,{channel:"hue",value:e,onChange:a}),o&&ko(kn,{channel:"alpha",value:e,onChange:a})]}),Rn("div",{className:AN(_n,ON.variants({paddingTop:"none",gap:"sm"})),children:[ko(lt,{label:t("colorFormat"),labelPosition:"start",variant:"ghost",items:Yu,selectedKey:r,onSelectionChange:n=>s(n)}),r==="hex"&&ko(af,{color:e,setColor:a,allowAlpha:o}),r==="rgb"&&ko(sf,{color:e,setColor:a,allowAlpha:o})]})]})};import{Fragment as uf,jsx as q,jsxs as no}from"react/jsx-runtime";var In=({color:e,setColor:a,storePickedColorKey:o,addColorButtonLabel:r,removeColorButtonLabel:s,customColorsLabel:t,pickerMode:n,allowAlpha:i})=>{let{formatMessage:l}=V(Ye),p=zt.useRef(null),d=bd(p.current),[u,c]=yd(o,[]),f=zt.useRef(null),[g,b]=zt.useState(e),v=zt.useMemo(()=>u.map(x=>({id:x,label:x,description:x})),[u]),h=wn(()=>{let x=n==="active"?e:g;if(u.includes(x.toString(A))){f.current?.querySelector(`[data-key='${x.toString(A)}']`)?.classList.add(hn);return}c([...u,x.toString(A)])},[u,e,c,g,n]);WN(()=>{let x=f.current;function k(S){S.animationName===Gu&&S.target?.classList.remove(hn)}return x?.addEventListener("animationend",k),()=>{x?.removeEventListener("animationend",k)}},[]);let _=ZN(),C=q(L,{ref:p,variant:"secondary",size:"md","aria-label":r,icon:KN,onPress:n==="active"?h:void 0}),P=wn(x=>no(Co,{size:"content",className:vt({includesCustomColorPicker:!0}),style:{paddingBlockEnd:0},"aria-label":l("newColor"),children:[q(Pt,{color:g,setColor:b,allowAlpha:i}),q(E,{}),q(zr,{padding:"lg",display:"flex",flexDirection:"row-reverse",children:no(zr,{display:"inline-flex",gap:"lg",children:[q(U,{label:l("cancel"),size:"sm",variant:"secondary",onPress:x}),q(U,{label:l("add"),variant:"primary",onPress:()=>{h(),x(),a(g)},size:"sm"})]})})]}),[g,h,a,l,i]),w=wn(x=>{XN(x instanceof Set,"Key must be a set");let k=[...x][0];k&&a(YN(k).toFormat(A))},[a]);return no(uf,{children:[q(E,{}),no("div",{className:cf(qu,"BaselineUI-ColorInput-CustomColors"),children:[q("span",{id:_,children:t}),no("div",{children:[!!u.length&&u.includes(e.toString(A))&&q(L,{variant:"secondary",size:"md",elementType:"div",icon:UN,"aria-label":s,onPress:()=>{c(u.filter(x=>x!==e.toString(A)))}}),n==="active"&&C,n==="lazy"&&(d==="mobile"?no(dt,{children:[q(ut,{children:C}),q(yn,{style:{zIndex:1e5},children:({close:x})=>P(x)})]}):q(gn,{type:"dialog",children:({close:x})=>no(uf,{children:[q(bn,{children:C}),q(ft,{placement:"right top",className:ht,offset:6,children:P(x)})]})}))]})]}),!!u.length&&q(Oe,{items:v,layout:"grid","aria-labelledby":_,className:cf(yt,_t,GN.variants({paddingTop:"xs"}),"BaselineUI-ColorInput-CustomColorsListBox"),renderOption:xt,ref:f,autoFocus:!1,selectionMode:"single",selectedKeys:[e.toString(A)],onSelectionChange:w})]})};import{classNames as QN,invariant as $N}from"@baseline-ui/utils";import JN,{useCallback as eT}from"react";import{parseColor as oT}from"@react-stately/color";import{jsx as ff}from"react/jsx-runtime";var Nn=JN.forwardRef(({setColor:e,color:a,triggerRef:o,autoFocus:r,presets:s,state:t},n)=>{let{formatMessage:i}=V(Ye),l=eT(p=>{if(p instanceof Set&&p.size){let d=[...p][0],u=s.find(c=>c.id===d);$N(u,"Preset not found"),e(u.id===je?null:oT(u.id).toFormat(A)),t.close()}},[t,s,e]);return ff("div",{className:QN(_t,"BaselineUI-ColorInput-Presets"),style:{minWidth:o.current?.offsetWidth},ref:n,children:ff(Oe,{autoFocus:r,items:s,layout:"grid","aria-label":i("colorPresets"),className:yt,renderOption:xt,selectionMode:"single",selectedKeys:[a?.toString(Ir)||je],onSelectionChange:l})})});Nn.displayName="ColorPresetList";import{mergeRefs as rT}from"@react-aria/utils";import yf from"react";import{mergeProps as tT,useButton as aT,useFocusRing as sT,useHover as nT}from"react-aria";import{jsx as iT}from"react/jsx-runtime";var Tn=yf.forwardRef((e,a)=>{let o=yf.useRef(null),{hoverProps:r,isHovered:s}=nT({isDisabled:e.isDisabled}),{buttonProps:t}=aT(e,o),{isFocusVisible:n,focusProps:i}=sT();return iT("button",{...tT(t,r,i),className:Hu({isHovered:s,isFocusVisible:n||e.isOpen,isDisabled:e.isDisabled,labelPosition:e.labelPosition}),ref:rT(a,o),children:e.children})});Tn.displayName="ColorInputButton";import{Fragment as Sn,jsx as Le,jsxs as Ro}from"react/jsx-runtime";var bf=kt.forwardRef(({className:e,style:a,allowRemoval:o,allowAlpha:r=!0,presets:s,labelPosition:t="top",colorLabel:n=!0,includePicker:i=!0,onChange:l,defaultValue:p,storePickedColorKey:d="baselinePickedColor",value:u,addColorButtonLabel:c,removeColorButtonLabel:f,customColorsLabel:g,renderTriggerButton:b,pickerMode:v="active","data-blockid":h,..._},C)=>{let P=kt.useRef(null),w=kt.useRef(null),x=fT(_),{triggerProps:k,overlayProps:S}=uT({type:"listbox"},x,P),[R,T]=kt.useState(Po(u||p)),{formatMessage:I}=V(Ye),F=Rt(()=>$u(I("noColor"),s),[s,I]),N=Rt(()=>F.find(M=>M.id===je?!R:R?Zu(R,lT(M.id)):!1),[F,R]),O=cT(),H=Rt(()=>typeof n=="function"?n?.(R):n?Qu(R,N,I("transparent")):!1,[R,n,I,N]),De=Rt(()=>F.filter(M=>o||M.id!==je),[F,o]),X=pT(M=>{u||T(M),l?.(M?.toFormat("rgba")||null)},[u,l,T]),He=c||I("addColor"),K=f||I("removeColor"),G=g||I("customColors");return Ro(Sn,{children:[Ro("div",{className:gf({[Du]:t==="start"},"BaselineUI-ColorInput-Trigger",e),"data-blockid":h,style:a,ref:C,children:[_.label&&Le("label",{id:O,className:Vu({labelPosition:t}),children:_.label}),b?.({isOpen:x.isOpen,color:R,ref:P,colorName:H,triggerProps:k})||Ro(Tn,{...dT(k,{..._.label?{"aria-labelledby":O}:{"aria-label":_["aria-label"]}}),ref:P,isOpen:x.isOpen,isDisabled:_.isDisabled,labelPosition:t,children:[Le(ao,{isPresentational:!0,color:R?.toString("hexa")}),n?Le("div",{className:Ou,children:H}):Le(mT,{children:H})]})]}),x.isOpen&&Le(Be,{placement:t==="start"?"bottom end":"bottom start",state:x,offset:2,className:gf(ht,"BaselineUI-ColorInput-Popover"),triggerRef:P,overlayProps:S,children:Ro(Co,{size:"content",className:vt({includesCustomColorPicker:i}),ref:w,"aria-labelledby":O,"aria-label":_["aria-label"],children:[i&&v==="active"&&Ro(Sn,{children:[Le(Pt,{color:R||xo,setColor:X,allowAlpha:r}),Le(In,{color:R||xo,setColor:X,storePickedColorKey:d,addColorButtonLabel:He,removeColorButtonLabel:K,customColorsLabel:G,pickerMode:v,allowAlpha:r})]}),!!De.length&&Ro(Sn,{children:[i&&Le(E,{}),Le(Nn,{autoFocus:i&&v==="active"?!1:"first",state:x,triggerRef:P,presets:De,color:R,setColor:X})]}),i&&v==="lazy"&&Le(In,{color:R||xo,setColor:X,storePickedColorKey:d,addColorButtonLabel:He,removeColorButtonLabel:K,customColorsLabel:G,pickerMode:v,allowAlpha:r})]})})]})});bf.displayName="ColorInput";import{RedoIcon as m2,UndoIcon as d2}from"@baseline-ui/icons/16";import{classNames as Ui,getSvgPathFromStroke as c2,invariant as u2}from"@baseline-ui/utils";import{clamp as Rf,mergeRefs as f2}from"@react-aria/utils";import{useGranularEffect as y2}from"granular-hooks";import{getStroke as Tt}from"perfect-freehand";import wo,{useCallback as Ki}from"react";import{VisuallyHidden as g2,mergeProps as b2,useFocusRing as v2,useHover as h2,useId as _2,useKeyboard as C2,useLabel as x2}from"react-aria";var Ln={};m(Ln,{default:()=>bT,redo:()=>yT,undo:()=>gT});var yT="\u0625\u0639\u0627\u062F\u0629",gT="\u062A\u0631\u0627\u062C\u0639",bT={redo:yT,undo:gT};var Mn={};m(Mn,{default:()=>_T,redo:()=>vT,undo:()=>hT});var vT="Opakovat",hT="Zru\u0161it",_T={redo:vT,undo:hT};var jn={};m(jn,{default:()=>PT,redo:()=>CT,undo:()=>xT});var CT="Ail-wneud",xT="Dad-wneud",PT={redo:CT,undo:xT};var Hn={};m(Hn,{default:()=>RT,redo:()=>zT,undo:()=>kT});var zT="Gentag",kT="Fortryd",RT={redo:zT,undo:kT};var On={};m(On,{default:()=>NT,redo:()=>wT,undo:()=>IT});var wT="Wiederholen",IT="R\xFCckg\xE4ngig machen",NT={redo:wT,undo:IT};var En={};m(En,{default:()=>LT,redo:()=>TT,undo:()=>ST});var TT="\u0395\u03C0\u03B1\u03BD\u03AC\u03BB\u03B7\u03C8\u03B7",ST="\u0391\u03BD\u03B1\u03AF\u03C1\u03B5\u03C3\u03B7",LT={redo:TT,undo:ST};var Un={};m(Un,{default:()=>BT,redo:()=>FT,undo:()=>MT});var FT="Redo",MT="Undo",BT={redo:FT,undo:MT};var Gn={};m(Gn,{default:()=>HT,redo:()=>jT,undo:()=>DT});var jT="Redo",DT="Undo",HT={redo:jT,undo:DT};var Wn={};m(Wn,{default:()=>AT,redo:()=>VT,undo:()=>OT});var VT="Rehacer",OT="Deshacer",AT={redo:VT,undo:OT};var Zn={};m(Zn,{default:()=>UT,redo:()=>ET,undo:()=>qT});var ET="Tee sittenkin",qT="Peru",UT={redo:ET,undo:qT};var $n={};m($n,{default:()=>XT,redo:()=>KT,undo:()=>GT});var KT="R\xE9tablir",GT="Annuler",XT={redo:KT,undo:GT};var ei={};m(ei,{default:()=>ZT,redo:()=>WT,undo:()=>YT});var WT="R\xE9tablir",YT="Annuler",ZT={redo:WT,undo:YT};var ri={};m(ri,{default:()=>JT,redo:()=>QT,undo:()=>$T});var QT="\u05D1\u05D9\u05E6\u05D5\u05E2 \u05DE\u05D7\u05D3\u05E9",$T="\u05D1\u05D9\u05D8\u05D5\u05DC \u05E4\u05E2\u05D5\u05DC\u05D4",JT={redo:QT,undo:$T};var ai={};m(ai,{default:()=>rS,redo:()=>eS,undo:()=>oS});var eS="Ponovi",oS="Vrati",rS={redo:eS,undo:oS};var ni={};m(ni,{default:()=>sS,redo:()=>tS,undo:()=>aS});var tS="Ulangi",aS="Kembalikan",sS={redo:tS,undo:aS};var li={};m(li,{default:()=>lS,redo:()=>nS,undo:()=>iS});var nS="Ripristina",iS="Annulla",lS={redo:nS,undo:iS};var mi={};m(mi,{default:()=>dS,redo:()=>pS,undo:()=>mS});var pS="\u3084\u308A\u76F4\u3059",mS="\u53D6\u308A\u6D88\u3059",dS={redo:pS,undo:mS};var ci={};m(ci,{default:()=>fS,redo:()=>cS,undo:()=>uS});var cS="\uC2E4\uD589\uBCF5\uADC0",uS="\uC2E4\uD589\uCDE8\uC18C",fS={redo:cS,undo:uS};var fi={};m(fi,{default:()=>bS,redo:()=>yS,undo:()=>gS});var yS="Buat Semula",gS="Buat Asal",bS={redo:yS,undo:gS};var gi={};m(gi,{default:()=>_S,redo:()=>vS,undo:()=>hS});var vS="Gj\xF8r om igjen",hS="Angre",_S={redo:vS,undo:hS};var vi={};m(vi,{default:()=>PS,redo:()=>CS,undo:()=>xS});var CS="Opnieuw",xS="Herstel",PS={redo:CS,undo:xS};var _i={};m(_i,{default:()=>RS,redo:()=>zS,undo:()=>kS});var zS="Pon\xF3w",kS="Cofnij",RS={redo:zS,undo:kS};var xi={};m(xi,{default:()=>NS,redo:()=>wS,undo:()=>IS});var wS="Refazer",IS="Desfazer",NS={redo:wS,undo:IS};var zi={};m(zi,{default:()=>LS,redo:()=>TS,undo:()=>SS});var TS="Refazer",SS="Desfazer",LS={redo:TS,undo:SS};var Ri={};m(Ri,{default:()=>BS,redo:()=>FS,undo:()=>MS});var FS="\u041F\u043E\u0432\u0442\u043E\u0440\u0438\u0442\u044C",MS="\u041E\u0442\u043C\u0435\u043D\u0438\u0442\u044C",BS={redo:FS,undo:MS};var Ii={};m(Ii,{default:()=>HS,redo:()=>jS,undo:()=>DS});var jS="Opakova\u0165",DS="Zru\u0161i\u0165",HS={redo:jS,undo:DS};var Ti={};m(Ti,{default:()=>AS,redo:()=>VS,undo:()=>OS});var VS="Uveljavi",OS="Razveljavi",AS={redo:VS,undo:OS};var Li={};m(Li,{default:()=>US,redo:()=>ES,undo:()=>qS});var ES="G\xF6r om",qS="\xC5ngra",US={redo:ES,undo:qS};var Mi={};m(Mi,{default:()=>XS,redo:()=>KS,undo:()=>GS});var KS="\u0E17\u0E33\u0E0B\u0E49\u0E33",GS="\u0E16\u0E2D\u0E19\u0E04\u0E33\u0E2A\u0E31\u0E48\u0E07\u0E01\u0E25\u0E31\u0E1A",XS={redo:KS,undo:GS};var ji={};m(ji,{default:()=>ZS,redo:()=>WS,undo:()=>YS});var WS="Yinele",YS="Geri Al",ZS={redo:WS,undo:YS};var Hi={};m(Hi,{default:()=>JS,redo:()=>QS,undo:()=>$S});var QS="\u041F\u043E\u0432\u0442\u043E\u0440\u0438\u0442\u0438",$S="\u0421\u043A\u0430\u0441\u0443\u0432\u0430\u0442\u0438",JS={redo:QS,undo:$S};var Oi={};m(Oi,{default:()=>r2,redo:()=>e2,undo:()=>o2});var e2="\u91CD\u505A",o2="\u64A4\u9500",r2={redo:e2,undo:o2};var Ei={};m(Ei,{default:()=>s2,redo:()=>t2,undo:()=>a2});var t2="\u91CD\u4F5C",a2="\u5FA9\u539F",s2={redo:t2,undo:a2};var n2=[Ln,Mn,jn,Hn,On,En,Un,Gn,Wn,Zn,$n,ei,ri,ai,ni,li,mi,ci,fi,gi,vi,_i,xi,zi,Ri,Ii,Ti,Li,Mi,ji,Hi,Oi,Ei],vf=n2;var wt=y({defaultClassName:"mnnh5s1",variantClassNames:{isInline:{true:"mnnh5s2",false:"mnnh5s3"},isHovered:{true:"mnnh5s4"},hasLoadedImage:{true:"mnnh5s5"},includeCheckeredBackground:{true:"mnnh5s6"},showFocusRing:{true:"mnnh5s7"},isDisabled:{true:"mnnh5s8 z9nup83"}},defaultVariants:{},compoundVariants:[[{isHovered:!0,hasLoadedImage:!1},"mnnh5s9"],[{isInline:!0,isDisabled:!0},"mnnh5sa"],[{hasLoadedImage:!0,includeCheckeredBackground:!0},"mnnh5sb"]]}),hf=y({defaultClassName:"mnnh5sh",variantClassNames:{isInline:{true:"mnnh5si",false:"mnnh5sj"}},defaultVariants:{},compoundVariants:[]}),_f="mnnh5sk",It=y({defaultClassName:"mnnh5sc",variantClassNames:{isInline:{true:"mnnh5sd",false:"mnnh5se"},isDisabled:{true:"mnnh5sf"},hasLoadedImage:{true:"mnnh5s0"}},defaultVariants:{},compoundVariants:[]});var Cf=y({defaultClassName:"_1i0ytqa3",variantClassNames:{isFocusVisible:{true:"_1i0ytqa4"},isInline:{true:"_1i0ytqa5",false:"_1i0ytqa6"},isDisabled:{true:"_1i0ytqa7 z9nup83"}},defaultVariants:{},compoundVariants:[[{isInline:!0,isFocusVisible:!0},"_1i0ytqa8"],[{isInline:!1,isFocusVisible:!0},"_1i0ytqa9"],[{isInline:!0,isDisabled:!0},"_1i0ytqaa"],[{isInline:!1,isDisabled:!0},"_1i0ytqab"]]}),xf="_1i0ytqa0",Pf=y({defaultClassName:"_1i0ytqac",variantClassNames:{isInline:{false:"_1i0ytqad"},isDisabled:{true:"_1i0ytqae z9nup83"}},defaultVariants:{},compoundVariants:[]}),zf=y({defaultClassName:"_1i0ytqa1 z9nup82",variantClassNames:{isInline:{false:"_1i0ytqa2"}},defaultVariants:{},compoundVariants:[]});import i2 from"react";import{classNames as l2}from"@baseline-ui/utils";var kf=y({defaultClassName:"_1tkzayn0 _1yep5z6c6",variantClassNames:{size:{sm:"_1tkzayn1",md:"_1tkzayn2",lg:"_1tkzayn3"},type:{subtitle:"_1yep5z6wk",title:"_1yep5z6wk",body:"_1yep5z6wl",value:"_1yep5z6wl",helper:"_1yep5z6wm"}},defaultVariants:{},compoundVariants:[[{type:"title",size:"sm"},"_1yep5z61el"],[{type:"title",size:"md"},"_1yep5z61eo"],[{type:"title",size:"lg"},"_1yep5z61er"],[{type:"subtitle",size:"sm"},"_1yep5z61f7"],[{type:"subtitle",size:"md"},"_1yep5z61fa"],[{type:"subtitle",size:"lg"},"_1yep5z61fa"],[{type:"body",size:"md"},"_1yep5z61f9"],[{type:"body",size:"lg"},"_1yep5z61f9"],[{type:"value",size:"md"},"_1yep5z61f9"],[{type:"value",size:"lg"},"_1yep5z61f9"],[{type:"helper",size:"sm"},"_1yep5z61f3"]]});import{jsx as p2}from"react/jsx-runtime";var Nt=i2.forwardRef(({elementType:e="span",type:a="title",children:o,size:r="md",...s},t)=>p2(e,{...s,className:l2(kf({size:r,type:a}),"BaselineUI-Text",s.className),ref:t,children:o}));Nt.displayName="Text";import{jsx as Ne,jsxs as St}from"react/jsx-runtime";var P2={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},wf=wo.forwardRef(({className:e,style:a,canvasClassName:o,canvasStyle:r,isBound:s=!0,strokeWidth:t=2,strokeColor:n="#3A87FD",onChange:i,defaultValue:l,onChangeEnd:p,enableHistory:d=!1,isInline:u=!0,isDisabled:c,placeholder:f,clearLabel:g,undoLabel:b,redoLabel:v,footerClassName:h,canvasRef:_,footerStyle:C,"data-blockid":P,description:w="This is a canvas for drawing using a mouse or touch input.",...x},k)=>{let S=V(vf),R=wo.useRef(null),[T,I]=wo.useState(l?z2(l):[]),F=wo.useRef((l?.length||0)-1),[N,O]=wo.useState(),H=_2(),{labelProps:De,fieldProps:X}=x2({...x,labelElementType:"span"}),{isFocusVisible:He,focusProps:K}=v2({within:!0}),{hoverProps:G,isHovered:M}=h2({isDisabled:c}),{undo:io,redo:Te,canRedo:W,canUndo:Qe,push:Ve}=dd(T,{onAction:z=>{z&&(I(z),F.current=z.length-1,p?.(z.map(Y=>Tt(Y,j))))},isDisabled:!d}),{keyboardProps:lo}=C2({onKeyDown:z=>{z.key==="Backspace"?Lr():z.key==="z"&&(z.metaKey||z.ctrlKey)&&(z.shiftKey?W&&Te():Qe&&io())}}),j=wo.useMemo(()=>({...P2,...x}),[x]),D=Ki(z=>{z.persist(),z.buttons===1&&(u2(N,"svgCoordinates must be defined"),I(Y=>{let $e=[...Y];return $e[F.current]=[...$e[F.current],{x:s?Rf(z.clientX-N.left,0,N.width):z.clientX-N.left,y:s?Rf(z.clientY-N.top,0,N.height):z.clientY-N.top,pressure:z.pressure}],$e}))},[N,s]),jt=Ki(z=>{z.persist();let Y=z.currentTarget.getBoundingClientRect();O(Y),z.target.setPointerCapture(z.pointerId),F.current+=1,I($e=>{let Fr=[...$e];return Fr[F.current]=[{x:z.clientX-Y.x,y:z.clientY-Y.y,pressure:z.pressure}],Fr})},[]),Sr=ho();y2(()=>{Sr||i?.(T.map(z=>Tt(z,j)))},[T],[i,j,Sr]);let Lr=()=>{I([]),F.current=-1,Ve([])},Dt=Ki(()=>{p?.(T.map(z=>Tt(z,j))),Ve(T)},[T,p,j,Ve]);return St("div",{ref:f2(R,k),className:Ui(xf,"BaselineUI-FreehandCanvas",e),style:a,"aria-disabled":c,"data-blockid":P,children:[(x.label||d)&&St("div",{className:zf({isInline:u}),children:[x.label?Ne(Nt,{type:"body",size:"sm",...De,children:x.label}):Ne("span",{}),d&&St("div",{children:[Ne(L,{variant:"secondary",size:"sm",isDisabled:!Qe||c,icon:d2,onPress:io,"aria-label":b||S.formatMessage("undo")}),Ne(L,{variant:"secondary",size:"sm",isDisabled:!W||c,icon:m2,onPress:Te,"aria-label":v||S.formatMessage("redo")})]})]}),St("div",{role:"application",...b2(K,lo,G,X),tabIndex:c?void 0:0,className:Ui(wt({isInline:u,isHovered:M}),Cf({isFocusVisible:He,isInline:u,isDisabled:c}),o),"aria-describedby":x["aria-describedby"]||H,style:r,ref:_,children:[Ne(g2,{children:Ne("div",{id:H,children:w})}),Ne("svg",{width:r?.width||"100%",height:r?.height||"100%",onPointerDown:jt,onPointerMove:D,onPointerUp:Dt,children:T.map((z,Y)=>Ne("path",{d:c2(Tt(z,j)),stroke:n,strokeWidth:t},Y))})]}),(f||g)&&Ne("div",{style:C,className:Ui(Pf({isInline:u,isDisabled:c}),h),children:(T.length||!f)&&g?Ne(U,{size:"sm",variant:"ghost",label:g,isDisabled:c,onPress:Lr}):Ne(U,{size:"sm",variant:"ghost",label:f,isDisabled:!0})})]})});wf.displayName="FreehandCanvas";var z2=e=>e.map(a=>a.map(([o,r])=>({x:o,y:r,pressure:0})));import{getOwnerDocument as I2,mergeRefs as N2}from"@react-aria/utils";import T2,{useCallback as Gi,useEffect as S2,useLayoutEffect as L2,useRef as Xi,useState as Nr}from"react";import{createPortal as F2}from"react-dom";import{classNames as M2,getHTMLElement as B2}from"@baseline-ui/utils";import{useKeyboard as j2}from"react-aria";import{Draggable as D2,Resizable as H2,Rotatable as V2,Snappable as O2,makeMoveable as A2}from"react-moveable";var If="_1vac7ws0",Nf=y({defaultClassName:"_1vac7ws1",variantClassNames:{isDragging:{true:"_1vac7ws2"}},defaultVariants:{},compoundVariants:[]});import{useGranularEffect as Tf}from"granular-hooks";import{useState as k2}from"react";function Sf(e,a){let[o,r]=k2([]),s=()=>e?.flatMap(t=>[...a.querySelectorAll(t)]).map(t=>({current:t}));return Tf(()=>{r(s())},[],[s]),Tf(()=>{let t=s();r(t)},[e],[s]),o}import{useEffect as R2}from"react";import{getHTMLElement as w2}from"@baseline-ui/utils";function Lf(e){let{scrollable:a,ownerDocument:o,onScroll:r}=e;R2(()=>{let s=w2(a,o);if(s)return(s.style.position==="static"||!s.style.position)&&console.warn("Scrollable ancestor passed to `Transform` component should not be statically positioned."),s.addEventListener("scroll",r),()=>{s.removeEventListener("scroll",r)}},[a,r,o])}import{Fragment as q2,jsx as Ff,jsxs as U2}from"react/jsx-runtime";var E2=A2([D2,H2,V2,O2]),Mf=T2.forwardRef(({className:e,children:a,isRotatable:o,isResizable:r,isDraggable:s,style:t,onTransform:n,onTransformStart:i,onTransformEnd:l,onDoubleClick:p,onDragStart:d,onDragEnd:u,onDrag:c,onResizeStart:f,onResizeEnd:g,onResize:b,onRotateStart:v,onRotateEnd:h,onRotate:_,onSnap:C,isSnappable:P,elementGuidelines:w,hideAnchorOnDrag:x=!0,title:k,rotationPosition:S,autoUpdate:R,bound:T,snapRotationDegrees:I,snapRotationThreshold:F,scrollableAncestor:N,renderDirections:O,stopPropagation:H,transformOrigin:De,preventDefault:X},He)=>{let K=Xi(null),G=Xi(null),[M,io]=Nr(document),Te=Xi(M.createElement("div")),[W,Qe]=Nr({}),[Ve,lo]=Nr(!1),[j,D]=Nr(!1),[jt,Sr]=Nr(),Lr=Sf(w,M);L2(()=>{let B=Te.current;return Te.current=M.createElement("div"),()=>{B.remove()}},[M]);let{keyboardProps:Dt}=j2({onKeyDown:B=>{let Fe=B.shiftKey?10:1,Se=B.metaKey||B.ctrlKey;Se&&B.shiftKey&&(Fe=45);function Je(To,ty="x"){Se?G.current?.request("rotatable",{deltaRotate:To*Fe},!0):G.current?.request("draggable",ty==="x"?{deltaX:To*Fe}:{deltaY:To*Fe},!0)}switch(B.key){case"ArrowRight":{Je(1);break}case"ArrowLeft":{Je(-1);break}case"ArrowUp":{Je(-1,"y");break}case"ArrowDown":Je(1,"y")}requestAnimationFrame(()=>{G.current?.updateRect()})}});S2(()=>{let B=I2(K.current);io(B);let Fe=Te.current;B.body.append(Te.current);function Se(To){D(To.shiftKey)}function Je(){D(!1)}return B.addEventListener("keydown",Se),B.addEventListener("keyup",Je),()=>{B.removeEventListener("keydown",Se),B.removeEventListener("keyup",Je),Fe.remove()}},[]),Lf({scrollable:N,onScroll:()=>{G.current?.updateRect()},ownerDocument:M});let z=Gi(B=>{Qe(Fe=>({...Fe,...B.style})),n?.(B)},[n]),Y=Gi(B=>{if(lo(!0),K.current?.focus(),T){let Se=B2(T,M)?.getBoundingClientRect();Sr({position:"client",left:Se?.left??0,top:Se?.top??0,right:Se?.right??0,bottom:Se?.bottom??0})}d?.(B)},[T,M,d]),$e=Gi(B=>{lo(!1),u?.(B)},[u]),Fr=a({style:{...W.width&&{width:W.width},...W.height&&{height:W.height}}});return U2(q2,{children:[Ff("div",{role:"button",...Dt,ref:N2(K,He),style:{display:"inline-block",...t,...W},className:M2(If,e),onDoubleClick:p,tabIndex:0,title:k,children:Fr}),F2(Ff(E2,{ref:G,target:K,draggable:s,resizable:r,rotatable:o,keepRatio:j,throttleDrag:1,snappable:P||!!T,elementGuidelines:Lr,snapRenderThreshold:.9,className:Nf({isDragging:Ve&&x}),onRender:z,onDragStart:Y,onDragEnd:$e,useResizeObserver:R,useMutationObserver:R,onRenderEnd:l,onDrag:c,onResizeStart:f,onResizeEnd:g,onResize:b,onRotateStart:v,onRotateEnd:h,onRotate:_,onRenderStart:i,onSnap:C,rotationPosition:S,bounds:jt,snapRotationDegrees:I,snapRotationThreshold:F,renderDirections:O,stopPropagation:H,preventDefault:X,transformOrigin:De}),Te.current)]})});Mf.displayName="Transform";import{mergeRefs as KF}from"@react-aria/utils";import Tr from"react";import{classNames as jf,filterTruthyValues as GF}from"@baseline-ui/utils";import{VisuallyHidden as XF,mergeProps as Df,useClipboard as WF,useDrop as YF,useField as ZF,useFocusRing as QF,useHover as $F}from"react-aria";var Wi={};m(Wi,{default:()=>X2,delete:()=>K2,selectImage:()=>G2});var K2="\u062D\u0630\u0641",G2="\u062A\u062D\u062F\u064A\u062F \u0635\u0648\u0631\u0629",X2={delete:K2,selectImage:G2};var Zi={};m(Zi,{default:()=>Z2,delete:()=>W2,selectImage:()=>Y2});var W2="Smazat",Y2="Vybrat obr\xE1zek",Z2={delete:W2,selectImage:Y2};var $i={};m($i,{default:()=>J2,delete:()=>Q2,selectImage:()=>$2});var Q2="Dileu",$2="Dewiswch Ddelwedd",J2={delete:Q2,selectImage:$2};var el={};m(el,{default:()=>rL,delete:()=>eL,selectImage:()=>oL});var eL="Slet",oL="V\xE6lg billede",rL={delete:eL,selectImage:oL};var rl={};m(rl,{default:()=>sL,delete:()=>tL,selectImage:()=>aL});var tL="L\xF6schen",aL="Bild ausw\xE4hlen",sL={delete:tL,selectImage:aL};var al={};m(al,{default:()=>lL,delete:()=>nL,selectImage:()=>iL});var nL="\u0394\u03B9\u03B1\u03B3\u03C1\u03B1\u03C6\u03AE",iL="\u0395\u03C0\u03B9\u03BB\u03BF\u03B3\u03AE \u03B5\u03B9\u03BA\u03CC\u03BD\u03B1\u03C2",lL={delete:nL,selectImage:iL};var nl={};m(nl,{default:()=>dL,delete:()=>pL,selectImage:()=>mL});var pL="Delete",mL="Select Image",dL={delete:pL,selectImage:mL};var ll={};m(ll,{default:()=>fL,delete:()=>cL,selectImage:()=>uL});var cL="Delete",uL="Select Image",fL={delete:cL,selectImage:uL};var ml={};m(ml,{default:()=>bL,delete:()=>yL,selectImage:()=>gL});var yL="Eliminar",gL="Seleccionar imagen",bL={delete:yL,selectImage:gL};var cl={};m(cl,{default:()=>_L,delete:()=>vL,selectImage:()=>hL});var vL="Poista",hL="Valitse kuva",_L={delete:vL,selectImage:hL};var fl={};m(fl,{default:()=>PL,delete:()=>CL,selectImage:()=>xL});var CL="Supprimer",xL="S\xE9lectionner une image",PL={delete:CL,selectImage:xL};var gl={};m(gl,{default:()=>RL,delete:()=>zL,selectImage:()=>kL});var zL="Supprimer",kL="S\xE9lectionner une image",RL={delete:zL,selectImage:kL};var vl={};m(vl,{default:()=>NL,delete:()=>wL,selectImage:()=>IL});var wL="\u05DE\u05D7\u05D9\u05E7\u05D4",IL="\u05D1\u05D7\u05D9\u05E8\u05EA \u05EA\u05DE\u05D5\u05E0\u05D4",NL={delete:wL,selectImage:IL};var _l={};m(_l,{default:()=>LL,delete:()=>TL,selectImage:()=>SL});var TL="Obri\u0161i",SL="Odaberi sliku",LL={delete:TL,selectImage:SL};var xl={};m(xl,{default:()=>BL,delete:()=>FL,selectImage:()=>ML});var FL="Hapus",ML="Pilih Gambar",BL={delete:FL,selectImage:ML};var zl={};m(zl,{default:()=>HL,delete:()=>jL,selectImage:()=>DL});var jL="Elimina",DL="Seleziona immagine",HL={delete:jL,selectImage:DL};var Rl={};m(Rl,{default:()=>AL,delete:()=>VL,selectImage:()=>OL});var VL="\u524A\u9664",OL="\u30A4\u30E1\u30FC\u30B8\u3092\u9078\u629E",AL={delete:VL,selectImage:OL};var Il={};m(Il,{default:()=>UL,delete:()=>EL,selectImage:()=>qL});var EL="\uC0AD\uC81C",qL="\uC774\uBBF8\uC9C0 \uC120\uD0DD",UL={delete:EL,selectImage:qL};var Tl={};m(Tl,{default:()=>XL,delete:()=>KL,selectImage:()=>GL});var KL="Padam",GL="Pilih Imej",XL={delete:KL,selectImage:GL};var Ll={};m(Ll,{default:()=>ZL,delete:()=>WL,selectImage:()=>YL});var WL="Slett",YL="Velg bilde",ZL={delete:WL,selectImage:YL};var Ml={};m(Ml,{default:()=>JL,delete:()=>QL,selectImage:()=>$L});var QL="Verwijder",$L="Selecteer afbeelding",JL={delete:QL,selectImage:$L};var jl={};m(jl,{default:()=>rF,delete:()=>eF,selectImage:()=>oF});var eF="Usu\u0144",oF="Wybierz obraz",rF={delete:eF,selectImage:oF};var Hl={};m(Hl,{default:()=>sF,delete:()=>tF,selectImage:()=>aF});var tF="Apagar",aF="Selecionar imagem",sF={delete:tF,selectImage:aF};var Ol={};m(Ol,{default:()=>lF,delete:()=>nF,selectImage:()=>iF});var nF="Apagar",iF="Selecionar Imagem",lF={delete:nF,selectImage:iF};var El={};m(El,{default:()=>dF,delete:()=>pF,selectImage:()=>mF});var pF="\u0423\u0434\u0430\u043B\u0438\u0442\u044C",mF="\u0412\u044B\u0431\u0440\u0430\u0442\u044C \u0438\u0437\u043E\u0431\u0440.",dF={delete:pF,selectImage:mF};var Ul={};m(Ul,{default:()=>fF,delete:()=>cF,selectImage:()=>uF});var cF="Zmaza\u0165",uF="Vybra\u0165 obr\xE1zok",fF={delete:cF,selectImage:uF};var Gl={};m(Gl,{default:()=>bF,delete:()=>yF,selectImage:()=>gF});var yF="Izbri\u0161i",gF="Izberi sliko",bF={delete:yF,selectImage:gF};var Wl={};m(Wl,{default:()=>_F,delete:()=>vF,selectImage:()=>hF});var vF="Radera",hF="V\xE4lj bild",_F={delete:vF,selectImage:hF};var Zl={};m(Zl,{default:()=>PF,delete:()=>CF,selectImage:()=>xF});var CF="\u0E25\u0E1A",xF="\u0E40\u0E25\u0E37\u0E2D\u0E01\u0E23\u0E39\u0E1B\u0E20\u0E32\u0E1E",PF={delete:CF,selectImage:xF};var $l={};m($l,{default:()=>RF,delete:()=>zF,selectImage:()=>kF});var zF="Sil",kF="Resim Se\xE7",RF={delete:zF,selectImage:kF};var ep={};m(ep,{default:()=>NF,delete:()=>wF,selectImage:()=>IF});var wF="\u0412\u0438\u0434\u0430\u043B\u0438\u0442\u0438",IF="\u041E\u0431\u0440\u0430\u0442\u0438 \u0437\u043E\u0431\u0440\u0430\u0436\u0435\u043D\u043D\u044F",NF={delete:wF,selectImage:IF};var rp={};m(rp,{default:()=>LF,delete:()=>TF,selectImage:()=>SF});var TF="\u5220\u9664",SF="\u9009\u62E9\u56FE\u50CF",LF={delete:TF,selectImage:SF};var ap={};m(ap,{default:()=>BF,delete:()=>FF,selectImage:()=>MF});var FF="\u522A\u9664",MF="\u9078\u53D6\u5716\u50CF",BF={delete:FF,selectImage:MF};var jF=[Wi,Zi,$i,el,rl,al,nl,ll,ml,cl,fl,gl,vl,_l,xl,zl,Rl,Il,Tl,Ll,Ml,jl,Hl,Ol,El,Ul,Gl,Wl,Zl,$l,ep,rp,ap],Bf=jF;import{invariant as DF}from"@baseline-ui/utils";import{animated as HF,useTransition as VF}from"@react-spring/web";import{FocusScope as OF,useFocusManager as AF,useKeyboard as EF}from"react-aria";import{jsx as Lt}from"react/jsx-runtime";var qF=({isInline:e,style:a,actionButtons:o})=>{let r=AF();DF(r);let{keyboardProps:s}=EF({onKeyDown:t=>{t.key==="ArrowLeft"?(t.preventDefault(),r.focusPrevious()):t.key==="ArrowRight"?(t.preventDefault(),r.focusNext()):t.continuePropagation()}});return Lt("div",{...s,className:hf({isInline:e}),style:a,onClick:t=>{t.stopPropagation(),t.preventDefault()},children:o.map((t,n)=>Lt(U,{excludeFromTabOrder:!0,...t},n))})},UF=HF(qF),Ft=({show:e,...a})=>VF(e,{from:{opacity:0},enter:{opacity:1}})((r,s)=>s&&Lt(OF,{restoreFocus:!1,autoFocus:!0,children:Lt(UF,{...a,style:r})}));import{jsx as Io,jsxs as JF}from"react/jsx-runtime";var Hf=Tr.forwardRef(({className:e,style:a,isInline:o=!0,accept:r="image/*",defaultImageSrc:s,imageSrc:t,imageAlt:n,pickerButtonLabel:i,removeButtonLabel:l,isDisabled:p,onDrop:d,onPaste:u,includeCheckeredBackground:c=!0,"data-blockid":f,pickerButtonStyle:g,pickerButtonClassName:b,...v},h)=>{let _=Tr.useRef(null),C=Tr.useRef(null),{formatMessage:P}=V(Bf),[w,x]=Tr.useState(s||null),k=Tr.useCallback(j=>{let D=new FileReader;D.addEventListener("load",()=>{x(D.result)}),D.readAsDataURL(j)},[]),{fieldProps:S,labelProps:R}=ZF(v),{dropProps:T,isDropTarget:I}=YF({ref:_,onDrop:async j=>{if(p)return;let D=await Qt({items:j.items});D.length&&(v.onValueChange?.(D),k(D[0])),d?.(j)},...v}),{clipboardProps:F}=WF({onPaste:async j=>{if(p)return;let D=await Qt({items:j});D.length&&(v.onValueChange?.(D),k(D[0])),u?.(j)},...v}),N=()=>{x(null),C.current&&(C.current.value=""),v.onValueChange?.([])},O={type:"file",onChange:j=>{let D=[...j.target.files];v.onValueChange?.(D),k(D[0]),v.onChange?.(j)},accept:r,disabled:p||!!t},{focusProps:H,isFocused:De,isFocusVisible:X}=QF({within:!0}),{hoverProps:He,isHovered:K}=$F({isDisabled:p}),G=t||w||void 0,M=!!G,{imgProps:io,isLoading:Te,isLoaded:W}=$r({src:G,alt:n||""}),Qe=M&&!t&&(X||K),Ve={label:i||P("selectImage"),onPress:()=>_.current?.click(),variant:"secondary",isDisabled:p,excludeFromTabOrder:!0,className:jf({[_f]:I&&!p},b),style:g},lo=GF({"data-loaded":W,"data-blockid":f,"data-hovered":K,"data-focused":De,"data-drop-target":I,"data-disabled":p,"data-focus-visible":X});return JF("label",{...Df(T,R,He,H,lo),className:jf(wt({isInline:o,isHovered:K&&!t&&!I,isDisabled:p,hasLoadedImage:W,includeCheckeredBackground:c,showFocusRing:(X||I)&&!p&&!Qe}),"BaselineUI-ImageDropZone",e),style:a,ref:KF(_,h),children:[Io(XF,{children:Io("input",{...Df(S,F,O),ref:C})}),!M&&Io(U,{...Ve}),M&&(Te?Io(ot,{}):Io("img",{className:It({isInline:o,isDisabled:p,hasLoadedImage:M&&W&&c}),...io})),Io(Ft,{isInline:o,style:a,show:Qe,actionButtons:[Ve,{label:l||P("delete"),onPress:N}]})]})});Hf.displayName="ImageDropZone";import eM from"react";import{classNames as oM,invariant as rM}from"@baseline-ui/utils";import{mergeProps as tM,useFocusRing as aM,useHover as sM,usePress as nM}from"react-aria";var np="_1vm2oh4b",Vf=y({defaultClassName:"_1vm2oh40 mnnh5s1",variantClassNames:{isInline:{true:"_1vm2oh41 mnnh5s2",false:"_1vm2oh42"},isFocusVisible:{true:"_1vm2oh43 mnnh5s7"},isDisabled:{true:"mnnh5s8 z9nup83"},hasActionButtons:{true:"_1vm2oh45",false:"_1vm2oh46"},isHovered:{true:"_1vm2oh47"}},defaultVariants:{},compoundVariants:[[{isFocusVisible:!0,hasActionButtons:!1},"_1vm2oh48"],[{isHovered:!0,hasActionButtons:!1,isInline:!0},"_1vm2oh49"],[{isHovered:!0,hasActionButtons:!1,isInline:!1},"_1vm2oh4a"]]});import{jsx as ip,jsxs as Of}from"react/jsx-runtime";var Af=eM.forwardRef(({className:e,style:a,isDisabled:o,actionButtons:r,isInline:s=!0,imageAlt:t,imageSrc:n,svgSrc:i,textValue:l,textStyle:p,onPress:d,"data-blockid":u,...c},f)=>{let{focusProps:g,isFocused:b,isFocusVisible:v}=aM({within:!0}),{isHovered:h,hoverProps:_}=sM({isDisabled:o}),{pressProps:C}=nM({isDisabled:o||!!r,onPress:d});return rM(n||i||l,"Preview must have content. You must provide either an `imageSrc`, `svgSrc`, or `textValue` prop."),Of("div",{...tM(_,g,c,C),className:oM(Vf({isInline:s,isFocusVisible:v,isDisabled:o,hasActionButtons:!!r,isHovered:h}),"BaselineUI-Preview",e),"data-hovered":h,"data-focus-visible":v,"data-focused":b,"aria-label":c["aria-label"]||t||l,"data-blockid":u,"data-disabled":o,style:a,ref:f,tabIndex:v&&r||o?-1:0,"aria-disabled":o,children:[Of("div",{style:p,className:np,children:[n&&ip("img",{src:n,alt:t,className:It({isInline:s,isDisabled:o})}),!!i&&typeof i=="object"&&i,l]}),typeof i=="string"&&ip("div",{className:np,dangerouslySetInnerHTML:{__html:i}}),r&&ip(Ft,{isInline:s,actionButtons:r,show:v||h})]})});Af.displayName="Preview";import gM from"react";import{classNames as Mt,filterTruthyValues as bM}from"@baseline-ui/utils";import{mergeProps as vM,useRadioGroup as hM}from"react-aria";import{useRadioGroupState as _M}from"react-stately";var Ef="_1yep5z6g7 _1yep5z6g8 _1yep5z6g9 _1yep5z6gj _1yep5z6gk _1yep5z6gl _1yep5z69c _1yep5z69d _1yep5z69e",qf=y({defaultClassName:"cw3m0n8 _1yep5z6d4 _1yep5z6c3",variantClassNames:{isDisabled:{true:"_1yep5z6wo"}},defaultVariants:{},compoundVariants:[]}),Uf="cw3m0n7",Kf=y({defaultClassName:"cw3m0n0 _1yep5z6g7 _1yep5z6g8 _1yep5z6g9 _1yep5z6gy _1yep5z6gz _1yep5z6h0 _1yep5z6gg _1yep5z6gh _1yep5z6gi",variantClassNames:{labelPosition:{end:"_1yep5z6zy _1yep5z6zz _1yep5z6100 _1yep5z6t0 _1yep5z6t1 _1yep5z6t2",start:"_1yep5z6104 _1yep5z6105 _1yep5z6106 _1yep5z611g _1yep5z611h _1yep5z611i"}},defaultVariants:{},compoundVariants:[]}),Gf="_1yep5z6ai _1yep5z6aq _1yep5z6ay _1yep5z6b6 _1yep5z6g7 _1yep5z6g8 _1yep5z6g9 _1yep5z6gj _1yep5z6gk _1yep5z6gl _1yep5z69i _1yep5z69j _1yep5z69k _1yep5z6iz",Xf=y({defaultClassName:"cw3m0n3 _16vugd05",variantClassNames:{isFocusVisible:{true:"_16vugd08"},isSelected:{true:"_16vugd07"},isDisabled:{true:"_16vugd0a"}},defaultVariants:{},compoundVariants:[]});import{classNames as iM,filterTruthyValues as lM}from"@baseline-ui/utils";import pM from"react";import{VisuallyHidden as mM,mergeProps as dM,useFocusRing as cM,useHover as uM,useRadio as fM}from"react-aria";import{jsx as No,jsxs as lp}from"react/jsx-runtime";var yM=({label:e,description:a},{isSelected:o,isFocusVisible:r,isDisabled:s,optionLabelPosition:t})=>lp("div",{className:Kf({labelPosition:t}),children:[No("div",{className:Xf({isSelected:o,isFocusVisible:r,isDisabled:s}),children:o&&No("div",{className:Uf})}),e&&lp("div",{className:Ef,children:[No("span",{className:rt({isDisabled:s}),children:e}),a&&No("span",{className:qf({isDisabled:s}),children:a})]})]}),Wf=({state:e,renderOption:a=yM,item:o,optionLabelPosition:r="end",optionStyle:s,optionClassName:t,isReadOnly:n,...i})=>{let l=!!i.isDisabled||!!i.disabledValues?.includes(o.id),p=pM.useRef(null),{inputProps:d,isPressed:u,isSelected:c}=fM({...i,isDisabled:l,children:o.label,value:o.id},e,p),{focusProps:f,isFocusVisible:g,isFocused:b}=cM(),{isHovered:v}=uM({isDisabled:l}),h=lM({"data-selected":c,"data-focused":b,"data-focus-visible":g,"data-hovered":v,"data-disabled":l,"data-pressed":u,"data-read-only":n});return lp("label",{...h,style:s,className:iM("BaselineUI-Radio-Item",t),children:[No(mM,{children:No("input",{...dM(d,f),ref:p})}),a(o,{isFocusVisible:g,isSelected:c,isFocused:b,isHovered:v,isDisabled:l,optionLabelPosition:r,isReadOnly:n})]})};import{jsx as pp,jsxs as mp}from"react/jsx-runtime";var Bt=gM.forwardRef(({className:e,style:a,optionsContainerClassName:o,optionsContainerStyle:r,items:s,labelPosition:t="top",renderOption:n,"aria-label":i,"aria-labelledby":l,"aria-describedby":p,"aria-details":d,"data-blockid":u,...c},f)=>{let g=_M(c),{radioGroupProps:b,labelProps:v,descriptionProps:h,errorMessageProps:_}=hM({...c,"aria-label":i,"aria-labelledby":l,"aria-describedby":p,"aria-details":d},g),C=Ue({...c,descriptionProps:h,errorMessageProps:_,labelPosition:t}),P=bM({"data-orientation":c.orientation,"data-blockid":u,"data-disabled":c.isDisabled,"data-readonly":c.isReadOnly});return mp("div",{...vM(b,P),className:Mt(qe({labelPosition:t}),"BaselineUI-RadioGroup",e),style:a,ref:f,children:[(c.label||C)&&mp("div",{className:Ee({labelPosition:t,hasMessage:!!C}),children:[pp("span",{...v,className:Mt(Ae,"BaselineUI-RadioGroup-Label"),children:c.label}),t==="start"&&C]}),mp("div",{className:Mt({[po]:c.isDisabled}),children:[pp("div",{className:Mt(Gf,o),style:r,children:s.map(w=>pp(Wf,{state:g,renderOption:n,item:w,value:w.id,...c},w.id))}),t==="top"&&C]})]})});Bt.displayName="RadioGroup";import{invariant as CM}from"@baseline-ui/utils";import{Fragment as xM}from"react";import{jsx as PM}from"react/jsx-runtime";var Yf=({id:e,defaultMessage:a,elementType:o=xM})=>{CM(e||a,"`id` or `defaultMessage` is required.");let r=V();return PM(o,{children:r.formatMessage(e)||a})};Yf.displayName="MessageFormat";import zM from"react";import{useHover as kM}from"react-aria";import{jsx as RM}from"react/jsx-runtime";var Zf=zM.forwardRef(({className:e,style:a,children:o,role:r="group",isDisabled:s,...t},n)=>{let{hoverProps:i,isHovered:l}=kM({isDisabled:s});return RM("div",{...i,role:r,"data-hovered":l,"data-disabled":s,className:e,style:a,...t,ref:n,children:o})});Zf.displayName="Group";import{classNames as Jf}from"@baseline-ui/utils";import wM,{useMemo as IM}from"react";import{VisuallyHidden as NM}from"react-aria";var Qf="_1yep5z66 _1yep5z67 _1yep5z68 _1yep5z62i _1yep5z62j _1yep5z62k _1yep5z63o _1yep5z63p _1yep5z63q _1yep5z61c _1yep5z61d _1yep5z61e",$f="_1yep5z61jg _1yep5z61jh _1yep5z61ji _1yep5z61cf _1yep5z61cg _1yep5z61ch";import{jsx as dp,jsxs as TM}from"react/jsx-runtime";var ey=wM.forwardRef(({items:e,optionsContainerClassName:a,...o},r)=>{let s=IM(()=>e.map(t=>({id:t.color,label:t.label})),[e]);return dp(Bt,{items:s,optionsContainerClassName:Jf($f,a),orientation:"horizontal",renderOption:({label:t,id:n},{isSelected:i,isFocusVisible:l})=>TM("div",{className:Qf,children:[dp(ao,{isFocusVisible:l,color:n,isSelected:i}),dp(NM,{children:t})]}),...o,className:Jf(o.className,"BaselineUI-ColorPresetInput"),ref:r})});ey.displayName="ColorPresetInput";import{useToolbar as SM}from"@react-aria/toolbar";import{mergeRefs as LM}from"@react-aria/utils";import oy from"react";import{classNames as FM,filterTruthyValues as MM}from"@baseline-ui/utils";import{mergeProps as BM,useFocusRing as jM}from"react-aria";import{jsx as DM}from"react/jsx-runtime";var ry=oy.forwardRef(({className:e,style:a,"data-blockid":o,...r},s)=>{let t=oy.useRef(null),{toolbarProps:n}=SM(r,t),{isFocusVisible:i,focusProps:l}=jM(),p=MM({"data-blockid":o,"data-focus-visible":i});return DM("div",{...BM(n,l,p),className:FM("BaselineUI-Toolbar",e),style:a,ref:LM(s,t),children:r.children})});ry.displayName="Toolbar";export{pc as Accordion,bc as AccordionItem,U as ActionButton,L as ActionIconButton,kc as Avatar,zr as Box,Bd as Checkbox,bf as ColorInput,ey as ColorPresetInlineInput,ao as ColorSwatch,Kd as DateFormat,Co as Dialog,Nu as DialogTitle,Ip as DomNodeRenderer,Hm as FileUpload,wf as FreehandCanvas,Zf as Group,ud as I18nProvider,Hf as ImageDropZone,ku as InlineAlert,Nm as Link,Oe as ListBox,Rm as Menu,Yf as MessageFormat,dt as Modal,JI as ModalClose,yn as ModalContent,ut as ModalTrigger,bo as NumberFormat,Me as NumberInput,Ud as Pagination,gn as Popover,ft as PopoverContent,bn as PopoverTrigger,Zr as Portal,Af as Preview,Xm as ProgressBar,ot as ProgressSpinner,Bt as RadioGroup,rd as Reaction,sm as SearchInput,lt as Select,E as Separator,Up as Slider,em as Switch,Dc as TabItem,jc as Tabs,Jd as TagGroup,Nt as Text,Ym as TextInput,Xe as ThemeProvider,Td as ToggleButton,ry as Toolbar,hd as Tooltip,Mf as Transform,XV as defineMessages,JA as useCollator,$A as useDateFormatter,bd as useDevice,V as useI18n,$r as useImage,ld as useIntersectionObserver,ho as useIsFirstRender,yd as useLocalStorage,ZV as useMutationObserver,QA as useNumberFormatter,pd as useResizeObserver,rO as useTextSelection,dd as useUndoRedo,Kt as useUserPreferences};