@producteca/producteca-ui-kit 1.96.0 → 1.97.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  import { default as React } from 'react';
2
2
  import { ReduxFormInput } from '../../../hooks/useReduxFormField';
3
- import { Meta } from '../../../validators';
3
+ import { InputValue, Meta } from '../../../validators';
4
4
 
5
5
  export interface CheckboxItem {
6
6
  id?: string;
@@ -21,6 +21,9 @@ export interface CheckboxInputProps {
21
21
  size?: 'sm' | 'md' | 'lg';
22
22
  input?: ReduxFormInput;
23
23
  meta?: Meta;
24
+ isValid?: (value: InputValue) => boolean;
25
+ noErrors?: boolean;
26
+ required?: boolean;
24
27
  }
25
28
  export type CheckboxInputSingleProps = Omit<CheckboxInputProps, 'items'> & {
26
29
  checked?: boolean;
@@ -6885,7 +6885,7 @@ facade:{get current(){return ref.value;},set current(value){var last2=ref.value;
6885
6885
  styles2[overflow]!=="hidden"&&// contains scroll inside self
6886
6886
  !(styles2.overflowY===styles2.overflowX&&!alwaysContainsScroll(node2)&&styles2[overflow]==="visible"));};var elementCouldBeVScrolled=function elementCouldBeVScrolled(node2){return elementCanBeScrolled(node2,"overflowY");};var elementCouldBeHScrolled=function elementCouldBeHScrolled(node2){return elementCanBeScrolled(node2,"overflowX");};var locationCouldBeScrolled=function locationCouldBeScrolled(axis,node2){var ownerDocument2=node2.ownerDocument;var current2=node2;do{if(typeof ShadowRoot!=="undefined"&&current2 instanceof ShadowRoot){current2=current2.host;}var isScrollable2=elementCouldBeScrolled(axis,current2);if(isScrollable2){var _a=getScrollVariables(axis,current2),scrollHeight=_a[1],clientHeight=_a[2];if(scrollHeight>clientHeight){return true;}}current2=current2.parentNode;}while(current2&&current2!==ownerDocument2.body);return false;};var getVScrollVariables=function getVScrollVariables(_a){var scrollTop=_a.scrollTop,scrollHeight=_a.scrollHeight,clientHeight=_a.clientHeight;return[scrollTop,scrollHeight,clientHeight];};var getHScrollVariables=function getHScrollVariables(_a){var scrollLeft=_a.scrollLeft,scrollWidth=_a.scrollWidth,clientWidth=_a.clientWidth;return[scrollLeft,scrollWidth,clientWidth];};var elementCouldBeScrolled=function elementCouldBeScrolled(axis,node2){return axis==="v"?elementCouldBeVScrolled(node2):elementCouldBeHScrolled(node2);};var getScrollVariables=function getScrollVariables(axis,node2){return axis==="v"?getVScrollVariables(node2):getHScrollVariables(node2);};var getDirectionFactor=function getDirectionFactor(axis,direction){return axis==="h"&&direction==="rtl"?-1:1;};var handleScroll=function handleScroll(axis,endTarget,event,sourceDelta,noOverscroll){var directionFactor=getDirectionFactor(axis,window.getComputedStyle(endTarget).direction);var delta=directionFactor*sourceDelta;var target=event.target;var targetInLock=endTarget.contains(target);var shouldCancelScroll=false;var isDeltaPositive=delta>0;var availableScroll=0;var availableScrollTop=0;do{if(!target){break;}var _a=getScrollVariables(axis,target),position2=_a[0],scroll_1=_a[1],capacity=_a[2];var elementScroll=scroll_1-capacity-directionFactor*position2;if(position2||elementScroll){if(elementCouldBeScrolled(axis,target)){availableScroll+=elementScroll;availableScrollTop+=position2;}}var parent_1=target.parentNode;target=parent_1&&parent_1.nodeType===Node.DOCUMENT_FRAGMENT_NODE?parent_1.host:parent_1;}while(// portaled content
6887
6887
  !targetInLock&&target!==document.body||// self content
6888
- targetInLock&&(endTarget.contains(target)||endTarget===target));if(isDeltaPositive&&(Math.abs(availableScroll)<1||false)){shouldCancelScroll=true;}else if(!isDeltaPositive&&(Math.abs(availableScrollTop)<1||false)){shouldCancelScroll=true;}return shouldCancelScroll;};var getTouchXY=function getTouchXY(event){return"changedTouches"in event?[event.changedTouches[0].clientX,event.changedTouches[0].clientY]:[0,0];};var getDeltaXY=function getDeltaXY(event){return[event.deltaX,event.deltaY];};var extractRef=function extractRef(ref){return ref&&"current"in ref?ref.current:ref;};var deltaCompare=function deltaCompare(x,y){return x[0]===y[0]&&x[1]===y[1];};var generateStyle=function generateStyle(id){return"\n .block-interactivity-".concat(id," {pointer-events: none;}\n .allow-interactivity-").concat(id," {pointer-events: all;}\n");};var idCounter=0;var lockStack=[];function RemoveScrollSideCar(props){var shouldPreventQueue=React.useRef([]);var touchStartRef=React.useRef([0,0]);var activeAxis=React.useRef();var id=React.useState(idCounter++)[0];var Style2=React.useState(styleSingleton)[0];var lastProps=React.useRef(props);React.useEffect(function(){lastProps.current=props;},[props]);React.useEffect(function(){if(props.inert){document.body.classList.add("block-interactivity-".concat(id));var allow_1=__spreadArray([props.lockRef.current],(props.shards||[]).map(extractRef),true).filter(Boolean);allow_1.forEach(function(el){return el.classList.add("allow-interactivity-".concat(id));});return function(){document.body.classList.remove("block-interactivity-".concat(id));allow_1.forEach(function(el){return el.classList.remove("allow-interactivity-".concat(id));});};}return;},[props.inert,props.lockRef.current,props.shards]);var shouldCancelEvent=React.useCallback(function(event,parent2){if("touches"in event&&event.touches.length===2||event.type==="wheel"&&event.ctrlKey){return!lastProps.current.allowPinchZoom;}var touch=getTouchXY(event);var touchStart=touchStartRef.current;var deltaX="deltaX"in event?event.deltaX:touchStart[0]-touch[0];var deltaY="deltaY"in event?event.deltaY:touchStart[1]-touch[1];var currentAxis;var target=event.target;var moveDirection=Math.abs(deltaX)>Math.abs(deltaY)?"h":"v";if("touches"in event&&moveDirection==="h"&&target.type==="range"){return false;}var selection=window.getSelection();var anchorNode=selection&&selection.anchorNode;var isTouchingSelection=anchorNode?anchorNode===target||anchorNode.contains(target):false;if(isTouchingSelection){return false;}var canBeScrolledInMainDirection=locationCouldBeScrolled(moveDirection,target);if(!canBeScrolledInMainDirection){return true;}if(canBeScrolledInMainDirection){currentAxis=moveDirection;}else{currentAxis=moveDirection==="v"?"h":"v";canBeScrolledInMainDirection=locationCouldBeScrolled(moveDirection,target);}if(!canBeScrolledInMainDirection){return false;}if(!activeAxis.current&&"changedTouches"in event&&(deltaX||deltaY)){activeAxis.current=currentAxis;}if(!currentAxis){return true;}var cancelingAxis=activeAxis.current||currentAxis;return handleScroll(cancelingAxis,parent2,event,cancelingAxis==="h"?deltaX:deltaY);},[]);var shouldPrevent=React.useCallback(function(_event){var event=_event;if(!lockStack.length||lockStack[lockStack.length-1]!==Style2){return;}var delta="deltaY"in event?getDeltaXY(event):getTouchXY(event);var sourceEvent=shouldPreventQueue.current.filter(function(e){return e.name===event.type&&(e.target===event.target||event.target===e.shadowParent)&&deltaCompare(e.delta,delta);})[0];if(sourceEvent&&sourceEvent.should){if(event.cancelable){event.preventDefault();}return;}if(!sourceEvent){var shardNodes=(lastProps.current.shards||[]).map(extractRef).filter(Boolean).filter(function(node2){return node2.contains(event.target);});var shouldStop=shardNodes.length>0?shouldCancelEvent(event,shardNodes[0]):!lastProps.current.noIsolation;if(shouldStop){if(event.cancelable){event.preventDefault();}}}},[]);var shouldCancel=React.useCallback(function(name2,delta,target,should){var event={name:name2,delta:delta,target:target,should:should,shadowParent:getOutermostShadowParent(target)};shouldPreventQueue.current.push(event);setTimeout(function(){shouldPreventQueue.current=shouldPreventQueue.current.filter(function(e){return e!==event;});},1);},[]);var scrollTouchStart=React.useCallback(function(event){touchStartRef.current=getTouchXY(event);activeAxis.current=void 0;},[]);var scrollWheel=React.useCallback(function(event){shouldCancel(event.type,getDeltaXY(event),event.target,shouldCancelEvent(event,props.lockRef.current));},[]);var scrollTouchMove=React.useCallback(function(event){shouldCancel(event.type,getTouchXY(event),event.target,shouldCancelEvent(event,props.lockRef.current));},[]);React.useEffect(function(){lockStack.push(Style2);props.setCallbacks({onScrollCapture:scrollWheel,onWheelCapture:scrollWheel,onTouchMoveCapture:scrollTouchMove});document.addEventListener("wheel",shouldPrevent,nonPassive);document.addEventListener("touchmove",shouldPrevent,nonPassive);document.addEventListener("touchstart",scrollTouchStart,nonPassive);return function(){lockStack=lockStack.filter(function(inst){return inst!==Style2;});document.removeEventListener("wheel",shouldPrevent,nonPassive);document.removeEventListener("touchmove",shouldPrevent,nonPassive);document.removeEventListener("touchstart",scrollTouchStart,nonPassive);};},[]);var removeScrollBar=props.removeScrollBar,inert=props.inert;return/*#__PURE__*/React.createElement(React.Fragment,null,inert?/*#__PURE__*/React.createElement(Style2,{styles:generateStyle(id)}):null,removeScrollBar?/*#__PURE__*/React.createElement(RemoveScrollBar,{noRelative:props.noRelative,gapMode:props.gapMode}):null);}function getOutermostShadowParent(node2){var shadowParent=null;while(node2!==null){if(node2 instanceof ShadowRoot){shadowParent=node2.host;node2=node2.host;}node2=node2.parentNode;}return shadowParent;}var SideCar=exportSidecar(effectCar,RemoveScrollSideCar);var ReactRemoveScroll=/*#__PURE__*/React.forwardRef(function(props,ref){return/*#__PURE__*/React.createElement(RemoveScroll,_assign$({},props,{ref:ref,sideCar:SideCar}));});ReactRemoveScroll.classNames=RemoveScroll.classNames;var POPOVER_NAME="Popover";var _createContextScope3=createContextScope(POPOVER_NAME,[createPopperScope]),_createContextScope4=_slicedToArray2(_createContextScope3,1),createPopoverContext=_createContextScope4[0];var usePopperScope=createPopperScope();var _createPopoverContext=createPopoverContext(POPOVER_NAME),_createPopoverContext2=_slicedToArray2(_createPopoverContext,2),PopoverProvider=_createPopoverContext2[0],usePopoverContext=_createPopoverContext2[1];var Popover2=function Popover2(props){var __scopePopover=props.__scopePopover,children=props.children,openProp=props.open,defaultOpen=props.defaultOpen,onOpenChange=props.onOpenChange,_props$modal=props.modal,modal2=_props$modal===void 0?false:_props$modal;var popperScope=usePopperScope(__scopePopover);var triggerRef=React.useRef(null);var _React$useState111=React.useState(false),_React$useState112=_slicedToArray2(_React$useState111,2),hasCustomAnchor=_React$useState112[0],setHasCustomAnchor=_React$useState112[1];var _useControllableState=useControllableState({prop:openProp,defaultProp:defaultOpen!=null?defaultOpen:false,onChange:onOpenChange,caller:POPOVER_NAME}),_useControllableState2=_slicedToArray2(_useControllableState,2),open=_useControllableState2[0],setOpen=_useControllableState2[1];return/* @__PURE__ */jsx$1(Root2$1,__spreadProps(__spreadValues({},popperScope),{children:/* @__PURE__ */jsx$1(PopoverProvider,{scope:__scopePopover,contentId:useId(),triggerRef:triggerRef,open:open,onOpenChange:setOpen,onOpenToggle:React.useCallback(function(){return setOpen(function(prevOpen){return!prevOpen;});},[setOpen]),hasCustomAnchor:hasCustomAnchor,onCustomAnchorAdd:React.useCallback(function(){return setHasCustomAnchor(true);},[]),onCustomAnchorRemove:React.useCallback(function(){return setHasCustomAnchor(false);},[]),modal:modal2,children:children})}));};Popover2.displayName=POPOVER_NAME;var ANCHOR_NAME="PopoverAnchor";var PopoverAnchor=/*#__PURE__*/React.forwardRef(function(props,forwardedRef){var _a=props,__scopePopover=_a.__scopePopover,anchorProps=__objRest(_a,["__scopePopover"]);var context=usePopoverContext(ANCHOR_NAME,__scopePopover);var popperScope=usePopperScope(__scopePopover);var onCustomAnchorAdd=context.onCustomAnchorAdd,onCustomAnchorRemove=context.onCustomAnchorRemove;React.useEffect(function(){onCustomAnchorAdd();return function(){return onCustomAnchorRemove();};},[onCustomAnchorAdd,onCustomAnchorRemove]);return/* @__PURE__ */jsx$1(Anchor,__spreadProps(__spreadValues(__spreadValues({},popperScope),anchorProps),{ref:forwardedRef}));});PopoverAnchor.displayName=ANCHOR_NAME;var TRIGGER_NAME="PopoverTrigger";var PopoverTrigger=/*#__PURE__*/React.forwardRef(function(props,forwardedRef){var _a=props,__scopePopover=_a.__scopePopover,triggerProps=__objRest(_a,["__scopePopover"]);var context=usePopoverContext(TRIGGER_NAME,__scopePopover);var popperScope=usePopperScope(__scopePopover);var composedTriggerRef=useComposedRefs(forwardedRef,context.triggerRef);var trigger=/* @__PURE__ */jsx$1(Primitive.button,__spreadProps(__spreadValues({type:"button","aria-haspopup":"dialog","aria-expanded":context.open,"aria-controls":context.contentId,"data-state":getState(context.open)},triggerProps),{ref:composedTriggerRef,onClick:composeEventHandlers(props.onClick,context.onOpenToggle)}));return context.hasCustomAnchor?trigger:/* @__PURE__ */jsx$1(Anchor,__spreadProps(__spreadValues({asChild:true},popperScope),{children:trigger}));});PopoverTrigger.displayName=TRIGGER_NAME;var PORTAL_NAME="PopoverPortal";var _createPopoverContext3=createPopoverContext(PORTAL_NAME,{forceMount:void 0}),_createPopoverContext4=_slicedToArray2(_createPopoverContext3,2),PortalProvider=_createPopoverContext4[0],usePortalContext=_createPopoverContext4[1];var PopoverPortal=function PopoverPortal(props){var __scopePopover=props.__scopePopover,forceMount=props.forceMount,children=props.children,container2=props.container;var context=usePopoverContext(PORTAL_NAME,__scopePopover);return/* @__PURE__ */jsx$1(PortalProvider,{scope:__scopePopover,forceMount:forceMount,children:/* @__PURE__ */jsx$1(Presence,{present:forceMount||context.open,children:/* @__PURE__ */jsx$1(Portal$1,{asChild:true,container:container2,children:children})})});};PopoverPortal.displayName=PORTAL_NAME;var CONTENT_NAME="PopoverContent";var PopoverContent=/*#__PURE__*/React.forwardRef(function(props,forwardedRef){var portalContext=usePortalContext(CONTENT_NAME,props.__scopePopover);var _a=props,_a$forceMount=_a.forceMount,forceMount=_a$forceMount===void 0?portalContext.forceMount:_a$forceMount,contentProps=__objRest(_a,["forceMount"]);var context=usePopoverContext(CONTENT_NAME,props.__scopePopover);return/* @__PURE__ */jsx$1(Presence,{present:forceMount||context.open,children:context.modal?/* @__PURE__ */jsx$1(PopoverContentModal,__spreadProps(__spreadValues({},contentProps),{ref:forwardedRef})):/* @__PURE__ */jsx$1(PopoverContentNonModal,__spreadProps(__spreadValues({},contentProps),{ref:forwardedRef}))});});PopoverContent.displayName=CONTENT_NAME;var Slot=/* @__PURE__ */createSlot("PopoverContent.RemoveScroll");var PopoverContentModal=/*#__PURE__*/React.forwardRef(function(props,forwardedRef){var context=usePopoverContext(CONTENT_NAME,props.__scopePopover);var contentRef=React.useRef(null);var composedRefs=useComposedRefs(forwardedRef,contentRef);var isRightClickOutsideRef=React.useRef(false);React.useEffect(function(){var content2=contentRef.current;if(content2)return hideOthers(content2);},[]);return/* @__PURE__ */jsx$1(ReactRemoveScroll,{as:Slot,allowPinchZoom:true,children:/* @__PURE__ */jsx$1(PopoverContentImpl,__spreadProps(__spreadValues({},props),{ref:composedRefs,trapFocus:context.open,disableOutsidePointerEvents:true,onCloseAutoFocus:composeEventHandlers(props.onCloseAutoFocus,function(event){var _a;event.preventDefault();if(!isRightClickOutsideRef.current)(_a=context.triggerRef.current)==null?void 0:_a.focus();}),onPointerDownOutside:composeEventHandlers(props.onPointerDownOutside,function(event){var originalEvent=event.detail.originalEvent;var ctrlLeftClick=originalEvent.button===0&&originalEvent.ctrlKey===true;var isRightClick=originalEvent.button===2||ctrlLeftClick;isRightClickOutsideRef.current=isRightClick;},{checkForDefaultPrevented:false}),onFocusOutside:composeEventHandlers(props.onFocusOutside,function(event){return event.preventDefault();},{checkForDefaultPrevented:false})}))});});var PopoverContentNonModal=/*#__PURE__*/React.forwardRef(function(props,forwardedRef){var context=usePopoverContext(CONTENT_NAME,props.__scopePopover);var hasInteractedOutsideRef=React.useRef(false);var hasPointerDownOutsideRef=React.useRef(false);return/* @__PURE__ */jsx$1(PopoverContentImpl,__spreadProps(__spreadValues({},props),{ref:forwardedRef,trapFocus:false,disableOutsidePointerEvents:false,onCloseAutoFocus:function onCloseAutoFocus(event){var _a,_b;(_a=props.onCloseAutoFocus)==null?void 0:_a.call(props,event);if(!event.defaultPrevented){if(!hasInteractedOutsideRef.current)(_b=context.triggerRef.current)==null?void 0:_b.focus();event.preventDefault();}hasInteractedOutsideRef.current=false;hasPointerDownOutsideRef.current=false;},onInteractOutside:function onInteractOutside(event){var _a,_b;(_a=props.onInteractOutside)==null?void 0:_a.call(props,event);if(!event.defaultPrevented){hasInteractedOutsideRef.current=true;if(event.detail.originalEvent.type==="pointerdown"){hasPointerDownOutsideRef.current=true;}}var target=event.target;var targetIsTrigger=(_b=context.triggerRef.current)==null?void 0:_b.contains(target);if(targetIsTrigger)event.preventDefault();if(event.detail.originalEvent.type==="focusin"&&hasPointerDownOutsideRef.current){event.preventDefault();}}}));});var PopoverContentImpl=/*#__PURE__*/React.forwardRef(function(props,forwardedRef){var _a=props,__scopePopover=_a.__scopePopover,trapFocus=_a.trapFocus,onOpenAutoFocus=_a.onOpenAutoFocus,onCloseAutoFocus=_a.onCloseAutoFocus,disableOutsidePointerEvents=_a.disableOutsidePointerEvents,onEscapeKeyDown=_a.onEscapeKeyDown,onPointerDownOutside=_a.onPointerDownOutside,onFocusOutside=_a.onFocusOutside,onInteractOutside=_a.onInteractOutside,contentProps=__objRest(_a,["__scopePopover","trapFocus","onOpenAutoFocus","onCloseAutoFocus","disableOutsidePointerEvents","onEscapeKeyDown","onPointerDownOutside","onFocusOutside","onInteractOutside"]);var context=usePopoverContext(CONTENT_NAME,__scopePopover);var popperScope=usePopperScope(__scopePopover);useFocusGuards();return/* @__PURE__ */jsx$1(FocusScope,{asChild:true,loop:true,trapped:trapFocus,onMountAutoFocus:onOpenAutoFocus,onUnmountAutoFocus:onCloseAutoFocus,children:/* @__PURE__ */jsx$1(DismissableLayer,{asChild:true,disableOutsidePointerEvents:disableOutsidePointerEvents,onInteractOutside:onInteractOutside,onEscapeKeyDown:onEscapeKeyDown,onPointerDownOutside:onPointerDownOutside,onFocusOutside:onFocusOutside,onDismiss:function onDismiss(){return context.onOpenChange(false);},children:/* @__PURE__ */jsx$1(Content,__spreadProps(__spreadValues(__spreadValues({"data-state":getState(context.open),role:"dialog",id:context.contentId},popperScope),contentProps),{ref:forwardedRef,style:__spreadValues(__spreadValues({},contentProps.style),{"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"})}))})});});var CLOSE_NAME="PopoverClose";var PopoverClose=/*#__PURE__*/React.forwardRef(function(props,forwardedRef){var _a=props,__scopePopover=_a.__scopePopover,closeProps=__objRest(_a,["__scopePopover"]);var context=usePopoverContext(CLOSE_NAME,__scopePopover);return/* @__PURE__ */jsx$1(Primitive.button,__spreadProps(__spreadValues({type:"button"},closeProps),{ref:forwardedRef,onClick:composeEventHandlers(props.onClick,function(){return context.onOpenChange(false);})}));});PopoverClose.displayName=CLOSE_NAME;var ARROW_NAME="PopoverArrow";var PopoverArrow=/*#__PURE__*/React.forwardRef(function(props,forwardedRef){var _a=props,__scopePopover=_a.__scopePopover,arrowProps=__objRest(_a,["__scopePopover"]);var popperScope=usePopperScope(__scopePopover);return/* @__PURE__ */jsx$1(Arrow,__spreadProps(__spreadValues(__spreadValues({},popperScope),arrowProps),{ref:forwardedRef}));});PopoverArrow.displayName=ARROW_NAME;function getState(open){return open?"open":"closed";}var Root2=Popover2;var Anchor2=PopoverAnchor;var Trigger=PopoverTrigger;var Portal2=PopoverPortal;var Content2=PopoverContent;var lg$7="dateRangePicker-module_lg_Z5cAW";var md$6="dateRangePicker-module_md_U7O4u";var sm$8="dateRangePicker-module_sm_eQU4f";var disabled$9="dateRangePicker-module_disabled_O2wo6";var focused="dateRangePicker-module_focused_ZciL9";var popoverEnter="dateRangePicker-module_popoverEnter_LA-QD";var popoverExit="dateRangePicker-module_popoverExit_7P00p";var nav="dateRangePicker-module_nav_wpLSQ";var months="dateRangePicker-module_months_KJVIG";var month="dateRangePicker-module_month_5xEDo";var weekdays="dateRangePicker-module_weekdays_Ifsr6";var weekday="dateRangePicker-module_weekday_2PP3h";var week="dateRangePicker-module_week_t5X3S";var day="dateRangePicker-module_day_wqJov";var selected="dateRangePicker-module_selected_RUsR-";var styles$A={"date-range-picker":"dateRangePicker-module_date-range-picker_PFF9Q",lg:lg$7,"input-wrapper":"dateRangePicker-module_input-wrapper_hyxTt",md:md$6,sm:sm$8,disabled:disabled$9,focused:focused,"popover-content":"dateRangePicker-module_popover-content_RKQTm",popoverEnter:popoverEnter,popoverExit:popoverExit,nav:nav,months:months,month:month,"month-caption":"dateRangePicker-module_month-caption_SaiMe",weekdays:weekdays,weekday:weekday,week:week,day:day,selected:selected,"range-middle":"dateRangePicker-module_range-middle_xm-3W","range-start":"dateRangePicker-module_range-start_52uOV","range-end":"dateRangePicker-module_range-end_VR3Y-","rdp-slide_in_left":"dateRangePicker-module_rdp-slide_in_left_yJv6o","rdp-slide_in_right":"dateRangePicker-module_rdp-slide_in_right_DtL-m","rdp-slide_out_left":"dateRangePicker-module_rdp-slide_out_left_pmbO5","rdp-slide_out_right":"dateRangePicker-module_rdp-slide_out_right_MDJeD","rdp-fade_in":"dateRangePicker-module_rdp-fade_in_TxHKu","rdp-fade_out":"dateRangePicker-module_rdp-fade_out_-8FsW"};var MAX_SAFE_INTEGER=9007199254740991;var nativeFloor=Math.floor;function baseRepeat$1(string,n){var result="";if(!string||n<1||n>MAX_SAFE_INTEGER){return result;}do{if(n%2){result+=string;}n=nativeFloor(n/2);if(n){string+=string;}}while(n);return result;}var _baseRepeat=baseRepeat$1;var baseSlice=_baseSlice;function castSlice$1(array,start2,end2){var length2=array.length;end2=end2===void 0?length2:end2;return!start2&&end2>=length2?array:baseSlice(array,start2,end2);}var _castSlice=castSlice$1;var rsAstralRange$2="\\ud800-\\udfff",rsComboMarksRange$2="\\u0300-\\u036f",reComboHalfMarksRange$2="\\ufe20-\\ufe2f",rsComboSymbolsRange$2="\\u20d0-\\u20ff",rsComboRange$2=rsComboMarksRange$2+reComboHalfMarksRange$2+rsComboSymbolsRange$2,rsVarRange$2="\\ufe0e\\ufe0f";var rsZWJ$2="\\u200d";var reHasUnicode=RegExp("["+rsZWJ$2+rsAstralRange$2+rsComboRange$2+rsVarRange$2+"]");function hasUnicode$3(string){return reHasUnicode.test(string);}var _hasUnicode=hasUnicode$3;var baseProperty=_baseProperty;var asciiSize$1=baseProperty("length");var _asciiSize=asciiSize$1;var rsAstralRange$1="\\ud800-\\udfff",rsComboMarksRange$1="\\u0300-\\u036f",reComboHalfMarksRange$1="\\ufe20-\\ufe2f",rsComboSymbolsRange$1="\\u20d0-\\u20ff",rsComboRange$1=rsComboMarksRange$1+reComboHalfMarksRange$1+rsComboSymbolsRange$1,rsVarRange$1="\\ufe0e\\ufe0f";var rsAstral$1="["+rsAstralRange$1+"]",rsCombo$1="["+rsComboRange$1+"]",rsFitz$1="\\ud83c[\\udffb-\\udfff]",rsModifier$1="(?:"+rsCombo$1+"|"+rsFitz$1+")",rsNonAstral$1="[^"+rsAstralRange$1+"]",rsRegional$1="(?:\\ud83c[\\udde6-\\uddff]){2}",rsSurrPair$1="[\\ud800-\\udbff][\\udc00-\\udfff]",rsZWJ$1="\\u200d";var reOptMod$1=rsModifier$1+"?",rsOptVar$1="["+rsVarRange$1+"]?",rsOptJoin$1="(?:"+rsZWJ$1+"(?:"+[rsNonAstral$1,rsRegional$1,rsSurrPair$1].join("|")+")"+rsOptVar$1+reOptMod$1+")*",rsSeq$1=rsOptVar$1+reOptMod$1+rsOptJoin$1,rsSymbol$1="(?:"+[rsNonAstral$1+rsCombo$1+"?",rsCombo$1,rsRegional$1,rsSurrPair$1,rsAstral$1].join("|")+")";var reUnicode$1=RegExp(rsFitz$1+"(?="+rsFitz$1+")|"+rsSymbol$1+rsSeq$1,"g");function unicodeSize$1(string){var result=reUnicode$1.lastIndex=0;while(reUnicode$1.test(string)){++result;}return result;}var _unicodeSize=unicodeSize$1;var asciiSize=_asciiSize,hasUnicode$2=_hasUnicode,unicodeSize=_unicodeSize;function stringSize$3(string){return hasUnicode$2(string)?unicodeSize(string):asciiSize(string);}var _stringSize=stringSize$3;function asciiToArray$1(string){return string.split("");}var _asciiToArray=asciiToArray$1;var rsAstralRange="\\ud800-\\udfff",rsComboMarksRange="\\u0300-\\u036f",reComboHalfMarksRange="\\ufe20-\\ufe2f",rsComboSymbolsRange="\\u20d0-\\u20ff",rsComboRange=rsComboMarksRange+reComboHalfMarksRange+rsComboSymbolsRange,rsVarRange="\\ufe0e\\ufe0f";var rsAstral="["+rsAstralRange+"]",rsCombo="["+rsComboRange+"]",rsFitz="\\ud83c[\\udffb-\\udfff]",rsModifier="(?:"+rsCombo+"|"+rsFitz+")",rsNonAstral="[^"+rsAstralRange+"]",rsRegional="(?:\\ud83c[\\udde6-\\uddff]){2}",rsSurrPair="[\\ud800-\\udbff][\\udc00-\\udfff]",rsZWJ="\\u200d";var reOptMod=rsModifier+"?",rsOptVar="["+rsVarRange+"]?",rsOptJoin="(?:"+rsZWJ+"(?:"+[rsNonAstral,rsRegional,rsSurrPair].join("|")+")"+rsOptVar+reOptMod+")*",rsSeq=rsOptVar+reOptMod+rsOptJoin,rsSymbol="(?:"+[rsNonAstral+rsCombo+"?",rsCombo,rsRegional,rsSurrPair,rsAstral].join("|")+")";var reUnicode=RegExp(rsFitz+"(?="+rsFitz+")|"+rsSymbol+rsSeq,"g");function unicodeToArray$1(string){return string.match(reUnicode)||[];}var _unicodeToArray=unicodeToArray$1;var asciiToArray=_asciiToArray,hasUnicode$1=_hasUnicode,unicodeToArray=_unicodeToArray;function stringToArray$1(string){return hasUnicode$1(string)?unicodeToArray(string):asciiToArray(string);}var _stringToArray=stringToArray$1;var baseRepeat=_baseRepeat,baseToString=_baseToString,castSlice=_castSlice,hasUnicode=_hasUnicode,stringSize$2=_stringSize,stringToArray=_stringToArray;var nativeCeil=Math.ceil;function createPadding$1(length2,chars2){chars2=chars2===void 0?" ":baseToString(chars2);var charsLength=chars2.length;if(charsLength<2){return charsLength?baseRepeat(chars2,length2):chars2;}var result=baseRepeat(chars2,nativeCeil(length2/stringSize$2(chars2)));return hasUnicode(chars2)?castSlice(stringToArray(result),0,length2).join(""):result.slice(0,length2);}var _createPadding=createPadding$1;var createPadding=_createPadding,stringSize$1=_stringSize,toInteger$1=toInteger_1,toString$1=toString_1;function padStart(string,length2,chars2){string=toString$1(string);length2=toInteger$1(length2);var strLength=length2?stringSize$1(string):0;return length2&&strLength<length2?createPadding(length2-strLength,chars2)+string:string;}var padStart_1=padStart;var padStart$1=/* @__PURE__ */getDefaultExportFromCjs(padStart_1);function arrayReduce$1(array,iteratee,accumulator,initAccum){var index2=-1,length2=array==null?0:array.length;if(initAccum&&length2){accumulator=array[++index2];}while(++index2<length2){accumulator=iteratee(accumulator,array[index2],index2,array);}return accumulator;}var _arrayReduce=arrayReduce$1;function baseReduce$1(collection,iteratee,accumulator,initAccum,eachFunc){eachFunc(collection,function(value,index2,collection2){accumulator=initAccum?(initAccum=false,value):iteratee(accumulator,value,index2,collection2);});return accumulator;}var _baseReduce=baseReduce$1;var arrayReduce=_arrayReduce,baseEach=_baseEach,baseIteratee$2=_baseIteratee,baseReduce=_baseReduce,isArray$1=isArray_1;function reduce(collection,iteratee,accumulator){var func=isArray$1(collection)?arrayReduce:baseReduce,initAccum=arguments.length<3;return func(collection,baseIteratee$2(iteratee),accumulator,initAccum,baseEach);}var reduce_1=reduce;var reduce$1=/* @__PURE__ */getDefaultExportFromCjs(reduce_1);var toString=toString_1;function replace$1(){var args=arguments,string=toString(args[0]);return args.length<3?string:string.replace(args[1],args[2]);}var replace_1=replace$1;var replace$2=/* @__PURE__ */getDefaultExportFromCjs(replace_1);var formatDate=function formatDate2(date,format2){var _pad=function _pad2(n){return padStart$1(String(n),2,"0");};var dateMap={YYYY:String(date.getFullYear()),MM:_pad(date.getMonth()+1),DD:_pad(date.getDate()),HH:_pad(date.getHours()),mm:_pad(date.getMinutes()),ss:_pad(date.getSeconds())};return reduce$1(dateMap,function(acc,value,token2){return replace$2(acc,token2,value);},format2);};var formatRangeLimits=function formatRangeLimits2(range){if(!range)return void 0;var from2=new Date(range.from);from2.setHours(0,0,0);var to=new Date(range.to);to.setHours(23,59,59);return{from:from2,to:to};};dayjs.extend(customParseFormat);var fromInputValue=function fromInputValue2(inputValue){if(!inputValue)return void 0;if(_typeof$1(inputValue)==="object"&&"from"in inputValue&&"to"in inputValue){var rangeValue=inputValue;return{from:convertToDate2(rangeValue.from),to:convertToDate2(rangeValue.to)};}if(typeof inputValue==="string"&&inputValue.includes(" - ")){var _inputValue$split=inputValue.split(" - "),_inputValue$split2=_slicedToArray$1(_inputValue$split,2),fromStr=_inputValue$split2[0],toStr=_inputValue$split2[1];return{from:convertToDate2(fromStr.trim()),to:convertToDate2(toStr.trim())};}return void 0;};var getDisplayRange=function getDisplayRange2(range){var format2=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"DD/MM/YYYY";if(!(range!==null&&range!==void 0&&range.from))return"";var fromFormatted=formatDate(range.from,format2);var toFormatted=range.to?formatDate(range.to,format2):"";if(range.from&&range.to){return"".concat(fromFormatted," - ").concat(toFormatted);}return fromFormatted;};var convertToDate2=function convertToDate3(val){if(!val)return void 0;if(val instanceof Date){return val;}if(typeof val==="string"){var parsed=dayjs(val);return parsed.isValid()?parsed.toDate():void 0;}if(typeof val==="number"){return dayjs(val).toDate();}return void 0;};var getDisabledDays=function getDisabledDays2(disabled2,minDate,maxDate){if(disabled2)return true;var min2=convertToDate2(minDate);var max2=convertToDate2(maxDate);if(min2&&max2)return[{before:min2},{after:max2}];if(min2)return{before:min2};if(max2)return{after:max2};return void 0;};var _excluded$J=["meta","name","value","disabled","required","placeholder","size","noErrors","label","format","isValid","onChange","input","minDate","maxDate"],_excluded2$a=["label","rightAdornment","value"];var DateRangePickerInput=function DateRangePickerInput2(props){var _input$value;var meta=props.meta,name2=props.name,_props$value=props.value,value=_props$value===void 0?null:_props$value,_props$disabled=props.disabled,disabled2=_props$disabled===void 0?false:_props$disabled;props.required;var placeholder=props.placeholder,_props$size=props.size,size2=_props$size===void 0?"md":_props$size,_props$noErrors=props.noErrors,noErrors=_props$noErrors===void 0?false:_props$noErrors,label2=props.label,_props$format=props.format,format2=_props$format===void 0?"DD/MM/YYYY":_props$format,isValid2=props.isValid,onChange2=props.onChange,input2=props.input,minDate=props.minDate,maxDate=props.maxDate,otherProps=_objectWithoutProperties$1(props,_excluded$J);var currentValue=(_input$value=input2===null||input2===void 0?void 0:input2.value)!==null&&_input$value!==void 0?_input$value:value;var dateLocale=getActiveDateLocale();var validationProps={meta:meta,value:currentValue,isValid:isValid2,required:props.required};var validated=formValidation(validationProps);var _useReduxFormField=useReduxFormField({input:input2,onChange:onChange2?function(range){var syntheticEvent={target:{value:formatRangeLimits(range),name:name2}};onChange2(syntheticEvent);}:void 0}),fieldHandleChange=_useReduxFormField.handleChange,handleBlur=_useReduxFormField.handleBlur;var handleSelect=function handleSelect2(range){fieldHandleChange(range);if(range!==null&&range!==void 0&&range.from&&range!==null&&range!==void 0&&range.to&&(range===null||range===void 0?void 0:range.from)!==(range===null||range===void 0?void 0:range.to)){setIsOpen(false);}};var handleClear=function handleClear2(){fieldHandleChange(void 0);};var selectedRange=fromInputValue(currentValue);var displayValue=getDisplayRange(selectedRange,format2);var _useState=useState(false),_useState2=_slicedToArray$1(_useState,2),isOpen=_useState2[0],setIsOpen=_useState2[1];var getInitialMonth2=function getInitialMonth3(){return(selectedRange===null||selectedRange===void 0?void 0:selectedRange.from)||(selectedRange===null||selectedRange===void 0?void 0:selectedRange.to)||/* @__PURE__ */new Date();};return/* @__PURE__ */jsxs("div",{className:clsx(styles$A["date-range-picker"],styles$A[size2],_defineProperty$2(_defineProperty$2(_defineProperty$2(_defineProperty$2({},errorStyles["validation-wrapper"],validated),errorStyles[validated],validated),errorStyles["disabled"],disabled2),errorStyles["focused"],isOpen)),children:[/* @__PURE__ */jsxs(Root2,{open:isOpen&&!disabled2,onOpenChange:setIsOpen,children:[/* @__PURE__ */jsx$1(Anchor2,{asChild:true,children:/* @__PURE__ */jsxs("div",{className:styles$A["input-wrapper"],children:[/* @__PURE__ */jsx$1(Trigger,{asChild:true,children:/* @__PURE__ */jsx$1("input",_objectSpread2$1({type:"text",role:"combobox","aria-label":label2||placeholder||format2,name:name2,value:displayValue,placeholder:placeholder||format2,readOnly:true,onBlur:handleBlur},otherProps))}),/* @__PURE__ */jsx$1(ActionComponent,{onOpen:function onOpen(){return setIsOpen(!isOpen);},showClearIcon:!!displayValue,onClear:handleClear})]})}),/* @__PURE__ */jsx$1(Portal2,{children:/* @__PURE__ */jsx$1(Content2,{className:styles$A["popover-content"],sideOffset:4,align:"start",side:"bottom",avoidCollisions:true,collisionPadding:8,children:/* @__PURE__ */jsx$1(DayPicker,{mode:"range",locale:dateLocale.dateFns,selected:selectedRange,onSelect:handleSelect,numberOfMonths:2,defaultMonth:getInitialMonth2(),disabled:getDisabledDays(disabled2,minDate,maxDate),className:styles$A["day-picker"],animate:true,classNames:{months:styles$A["months"],month:styles$A["month"],month_caption:styles$A["month-caption"],nav:styles$A["nav"],weekdays:styles$A["weekdays"],weekday:styles$A["weekday"],week:styles$A["week"],day:styles$A["day"],selected:styles$A["selected"],range_start:styles$A["range-start"],range_middle:styles$A["range-middle"],range_end:styles$A["range-end"],disabled:styles$A["disabled"]},formatters:{formatWeekdayName:formatWeekdayInitial}})})})]}),!noErrors&&validated&&/* @__PURE__ */jsx$1(ErrorMessage,{validationProps:validationProps})]});};var DateRangePicker=function DateRangePicker2(_ref3){var label2=_ref3.label,rightAdornment=_ref3.rightAdornment,value=_ref3.value,props=_objectWithoutProperties$1(_ref3,_excluded2$a);return/* @__PURE__ */jsx$1(FormField,_objectSpread2$1({type:"dateRange",label:label2,rightAdornment:rightAdornment,value:value},props));};var _excluded$I=["label","rightAdornment","children"];var inputByType=function inputByType2(type){var inputs={password:PasswordInput,text:TextInput,number:TextInput,date:DatePickerInput,dateRange:DateRangePickerInput};return!!type?inputs[type]:TextInput;};var FormField=function FormField2(_ref3){var label2=_ref3.label,rightAdornment=_ref3.rightAdornment,children=_ref3.children,props=_objectWithoutProperties$1(_ref3,_excluded$I);var InputComponent=inputByType(props.type);return/* @__PURE__ */jsxs("div",{className:styles$F["form-field"],children:[label2&&/* @__PURE__ */jsx$1("label",{htmlFor:props.name,children:label2}),/* @__PURE__ */jsxs("div",{className:"".concat(styles$F["input-container"]),children:[/* @__PURE__ */jsx$1(InputComponent,_objectSpread2$1(_objectSpread2$1({},props),{},{children:children})),!!rightAdornment&&/* @__PURE__ */jsx$1("div",{className:"".concat(styles$F["right-modifier"]),children:rightAdornment})]})]});};var _buildSingleToggleItem=function _buildSingleToggleItem2(_ref3){var id=_ref3.id,name2=_ref3.name,label2=_ref3.label,checked=_ref3.checked,disabled2=_ref3.disabled;return{id:"".concat(id||name2,"-single"),name:name2,label:label2,checked:checked,disabled:disabled2};};var _getBooleanValueFromInputEvent=function _getBooleanValueFromInputEvent2(event){return event.target.checked;};var _resolveCheckedValue=function _resolveCheckedValue2(_ref22){var input2=_ref22.input,inputName=_ref22.inputName,checked=_ref22.checked;if(input2&&inputName){return typeof input2.value==="boolean"?input2.value:get$3(input2.value,inputName);}return checked;};var title$7="checkboxInput-module_title_cvp-g";var disabled$8="checkboxInput-module_disabled_3EFy5";var lg$6="checkboxInput-module_lg_VoVop";var md$5="checkboxInput-module_md_Nh-Gg";var sm$7="checkboxInput-module_sm_965vX";var styles$z={"checkbox-input-container":"checkboxInput-module_checkbox-input-container_prYRe",title:title$7,"checkbox-input-items":"checkboxInput-module_checkbox-input-items_AMkaS",disabled:disabled$8,lg:lg$6,md:md$5,sm:sm$7};var _excluded$H=["title","name","type","items","onChange","size","input","meta"],_excluded2$9=["id","name","label","disabled","checked"];var CheckboxInputGroupBase=function CheckboxInputGroupBase2(_ref3){var title2=_ref3.title,name2=_ref3.name,_ref$type=_ref3.type,type=_ref$type===void 0?"checkbox":_ref$type,items=_ref3.items,onChange2=_ref3.onChange,_ref$size=_ref3.size,size2=_ref$size===void 0?"lg":_ref$size,input2=_ref3.input;_ref3.meta;var props=_objectWithoutProperties$1(_ref3,_excluded$H);var _useReduxFormField=useReduxFormField({input:input2,onChange:onChange2,transformValue:_getBooleanValueFromInputEvent}),handleChange=_useReduxFormField.handleChange,handleBlur=_useReduxFormField.handleBlur;return/* @__PURE__ */jsxs("div",{className:styles$z["checkbox-input-container"],children:[title2&&/* @__PURE__ */jsxs("label",{className:styles$z["title"],children:[" ",title2," "]}),/* @__PURE__ */jsx$1("div",{className:"".concat(styles$z["checkbox-input-items"]," ").concat(styles$z[size2]),children:map$2(items,function(_ref22){var id=_ref22.id,itemName=_ref22.name,label2=_ref22.label,disabled2=_ref22.disabled,checked=_ref22.checked,itemProps=_objectWithoutProperties$1(_ref22,_excluded2$9);var inputName=itemName||name2;var inputId=id||inputName;var checkedValue=_resolveCheckedValue({input:input2,inputName:inputName,checked:checked});return/* @__PURE__ */jsxs("label",{htmlFor:inputId,className:"".concat(disabled2?styles$z["disabled"]:""),children:[/* @__PURE__ */jsx$1("input",_objectSpread2$1(_objectSpread2$1(_objectSpread2$1({},props),itemProps),{},{type:type,id:inputId,name:inputName,onBlur:handleBlur,disabled:disabled2,checked:checkedValue,onChange:handleChange})),/* @__PURE__ */jsxs("span",{children:[" ",label2," "]})]},inputId);})})]});};var CheckboxInputGroup=withDebugHandlers(CheckboxInputGroupBase,"CheckboxInputGroup");var _excluded$G=["id","name","checked","onChange","label","title","disabled","size","input","type"];var CheckboxInputBase=function CheckboxInputBase2(_ref3){var _input$name;var id=_ref3.id,name2=_ref3.name,checked=_ref3.checked,onChange2=_ref3.onChange,label2=_ref3.label,title2=_ref3.title,_ref$disabled=_ref3.disabled,disabled2=_ref$disabled===void 0?false:_ref$disabled,_ref$size=_ref3.size,size2=_ref$size===void 0?"lg":_ref$size,input2=_ref3.input,_ref$type=_ref3.type,type=_ref$type===void 0?"checkbox":_ref$type,props=_objectWithoutProperties$1(_ref3,_excluded$G);var item2=_buildSingleToggleItem({id:id,name:name2,label:label2,checked:checked,disabled:disabled2});return/* @__PURE__ */jsx$1(CheckboxInputGroup,_objectSpread2$1(_objectSpread2$1({},props),{},{type:type,size:size2,input:input2,title:title2,items:[item2],onChange:onChange2,name:(_input$name=input2===null||input2===void 0?void 0:input2.name)!==null&&_input$name!==void 0?_input$name:name2}));};var CheckboxInput=withDebugHandlers(CheckboxInputBase,"CheckboxInput");var baseKeys$1=_baseKeys,getTag$1=_getTag,isArguments=isArguments_1,isArray=isArray_1,isArrayLike$2=isArrayLike_1,isBuffer=isBufferExports,isPrototype=_isPrototype,isTypedArray=isTypedArray_1;var mapTag$1="[object Map]",setTag$1="[object Set]";var objectProto=Object.prototype;var hasOwnProperty$1=objectProto.hasOwnProperty;function isEmpty(value){if(value==null){return true;}if(isArrayLike$2(value)&&(isArray(value)||typeof value=="string"||typeof value.splice=="function"||isBuffer(value)||isTypedArray(value)||isArguments(value))){return!value.length;}var tag=getTag$1(value);if(tag==mapTag$1||tag==setTag$1){return!value.size;}if(isPrototype(value)){return!baseKeys$1(value).length;}for(var key in value){if(hasOwnProperty$1.call(value,key)){return false;}}return true;}var isEmpty_1=isEmpty;var isEmpty$1=/* @__PURE__ */getDefaultExportFromCjs(isEmpty_1);var _excluded$F=["defaultOptions","cacheOptions","loadOptions","options","isLoading","onInputChange","filterOption"];function useAsync(_ref3){var _ref$defaultOptions=_ref3.defaultOptions,propsDefaultOptions=_ref$defaultOptions===void 0?false:_ref$defaultOptions,_ref$cacheOptions=_ref3.cacheOptions,cacheOptions=_ref$cacheOptions===void 0?false:_ref$cacheOptions,propsLoadOptions=_ref3.loadOptions;_ref3.options;var _ref$isLoading=_ref3.isLoading,propsIsLoading=_ref$isLoading===void 0?false:_ref$isLoading,propsOnInputChange=_ref3.onInputChange,_ref$filterOption=_ref3.filterOption,filterOption=_ref$filterOption===void 0?null:_ref$filterOption,restSelectProps=_objectWithoutProperties(_ref3,_excluded$F);var propsInputValue=restSelectProps.inputValue;var lastRequest=useRef(void 0);var mounted=useRef(false);var _useState=useState(Array.isArray(propsDefaultOptions)?propsDefaultOptions:void 0),_useState2=_slicedToArray(_useState,2),defaultOptions2=_useState2[0],setDefaultOptions=_useState2[1];var _useState3=useState(typeof propsInputValue!=="undefined"?propsInputValue:""),_useState4=_slicedToArray(_useState3,2),stateInputValue=_useState4[0],setStateInputValue=_useState4[1];var _useState5=useState(propsDefaultOptions===true),_useState6=_slicedToArray(_useState5,2),isLoading=_useState6[0],setIsLoading=_useState6[1];var _useState7=useState(void 0),_useState8=_slicedToArray(_useState7,2),loadedInputValue=_useState8[0],setLoadedInputValue=_useState8[1];var _useState9=useState([]),_useState10=_slicedToArray(_useState9,2),loadedOptions=_useState10[0],setLoadedOptions=_useState10[1];var _useState11=useState(false),_useState12=_slicedToArray(_useState11,2),passEmptyOptions=_useState12[0],setPassEmptyOptions=_useState12[1];var _useState13=useState({}),_useState14=_slicedToArray(_useState13,2),optionsCache=_useState14[0],setOptionsCache=_useState14[1];var _useState15=useState(void 0),_useState16=_slicedToArray(_useState15,2),prevDefaultOptions=_useState16[0],setPrevDefaultOptions=_useState16[1];var _useState17=useState(void 0),_useState18=_slicedToArray(_useState17,2),prevCacheOptions=_useState18[0],setPrevCacheOptions=_useState18[1];if(cacheOptions!==prevCacheOptions){setOptionsCache({});setPrevCacheOptions(cacheOptions);}if(propsDefaultOptions!==prevDefaultOptions){setDefaultOptions(Array.isArray(propsDefaultOptions)?propsDefaultOptions:void 0);setPrevDefaultOptions(propsDefaultOptions);}useEffect(function(){mounted.current=true;return function(){mounted.current=false;};},[]);var loadOptions=useCallback(function(inputValue,callback){if(!propsLoadOptions)return callback();var loader2=propsLoadOptions(inputValue,callback);if(loader2&&typeof loader2.then==="function"){loader2.then(callback,function(){return callback();});}},[propsLoadOptions]);useEffect(function(){if(propsDefaultOptions===true){loadOptions(stateInputValue,function(options2){if(!mounted.current)return;setDefaultOptions(options2||[]);setIsLoading(!!lastRequest.current);});}},[]);var onInputChange2=useCallback(function(newValue,actionMeta){var inputValue=handleInputChange(newValue,actionMeta,propsOnInputChange);if(!inputValue){lastRequest.current=void 0;setStateInputValue("");setLoadedInputValue("");setLoadedOptions([]);setIsLoading(false);setPassEmptyOptions(false);return;}if(cacheOptions&&optionsCache[inputValue]){setStateInputValue(inputValue);setLoadedInputValue(inputValue);setLoadedOptions(optionsCache[inputValue]);setIsLoading(false);setPassEmptyOptions(false);}else{var request=lastRequest.current={};setStateInputValue(inputValue);setIsLoading(true);setPassEmptyOptions(!loadedInputValue);loadOptions(inputValue,function(options2){if(!mounted)return;if(request!==lastRequest.current)return;lastRequest.current=void 0;setIsLoading(false);setLoadedInputValue(inputValue);setLoadedOptions(options2||[]);setPassEmptyOptions(false);setOptionsCache(options2?_objectSpread2(_objectSpread2({},optionsCache),{},_defineProperty({},inputValue,options2)):optionsCache);});}},[cacheOptions,loadOptions,loadedInputValue,optionsCache,propsOnInputChange]);var options=passEmptyOptions?[]:stateInputValue&&loadedInputValue?loadedOptions:defaultOptions2||[];return _objectSpread2(_objectSpread2({},restSelectProps),{},{options:options,isLoading:isLoading||propsIsLoading,onInputChange:onInputChange2,filterOption:filterOption});}var AsyncSelect=/* @__PURE__ */forwardRef(function(props,ref){var stateManagedProps=useAsync(props);var selectProps=useStateManager(stateManagedProps);return/* @__PURE__ */React.createElement(Select$2,_extends$1({ref:ref},selectProps));});var AsyncSelect$1=AsyncSelect;var loader="spinner-module_loader_UIupC";var styles$y={loader:loader};var _excluded$E=["size"];var Spinner=function Spinner2(_ref3){var _ref$size=_ref3.size,size2=_ref$size===void 0?"lg":_ref$size,props=_objectWithoutProperties$1(_ref3,_excluded$E);return/* @__PURE__ */jsx$1(CircularProgress,_objectSpread2$1({size:_size(size2),className:styles$y.loader,"aria-label":locale("a11y.loading")},props));};var _size=function _size2(size2){return{sm:18,lg:60}[size2];};var _excluded$D=["name","label","placeholder","noOptionsMessage","options","size","isSearchable","isClearable","clearOnSelect","required","disabled","rightModifier","isOptionDisabled","onChange","onInputChange","input","isLoading","formatOption","loadOptions","cacheOptions","defaultOptions","value","tooltipProps","meta","isValid","noErrors"];var _convertValueToOption=function _convertValueToOption2(value){if(!value)return null;return{value:value,label:value};};var SearcherBase=function SearcherBase2(props){var _input$value;var name2=props.name,label2=props.label,_props$placeholder=props.placeholder,placeholder=_props$placeholder===void 0?locale("selectPlaceholder"):_props$placeholder,_props$noOptionsMessa=props.noOptionsMessage,_noOptionsMessage=_props$noOptionsMessa===void 0?locale("noFoundOptions"):_props$noOptionsMessa,options=props.options,_props$size=props.size,size2=_props$size===void 0?"md":_props$size,_props$isSearchable=props.isSearchable,isSearchable=_props$isSearchable===void 0?true:_props$isSearchable,_props$isClearable=props.isClearable,isClearable=_props$isClearable===void 0?true:_props$isClearable,_props$clearOnSelect=props.clearOnSelect,clearOnSelect=_props$clearOnSelect===void 0?false:_props$clearOnSelect,required=props.required,disabled2=props.disabled,rightModifier=props.rightModifier,isOptionDisabled3=props.isOptionDisabled,onChange2=props.onChange,onInputChange2=props.onInputChange,input2=props.input,_props$isLoading=props.isLoading,isLoading=_props$isLoading===void 0?false:_props$isLoading,formatOption=props.formatOption,loadOptions=props.loadOptions,_props$cacheOptions=props.cacheOptions,cacheOptions=_props$cacheOptions===void 0?true:_props$cacheOptions,_props$defaultOptions=props.defaultOptions,defaultOptions2=_props$defaultOptions===void 0?true:_props$defaultOptions,value=props.value,tooltipProps=props.tooltipProps,meta=props.meta,isValid2=props.isValid,_props$noErrors=props.noErrors,noErrors=_props$noErrors===void 0?false:_props$noErrors,otherProps=_objectWithoutProperties$1(props,_excluded$D);var accessibleName=label2||placeholder||locale("a11y.search");var _splitDataProps=splitDataProps(otherProps),_splitDataProps2=_slicedToArray$1(_splitDataProps,2),dataProps=_splitDataProps2[0],selectOtherProps=_splitDataProps2[1];var currentValue=(_input$value=input2===null||input2===void 0?void 0:input2.value)!==null&&_input$value!==void 0?_input$value:value;var validationProps={meta:meta,value:currentValue!==null&&currentValue!==void 0?currentValue:null,isValid:isValid2,required:required};var validated=formValidation(validationProps);var _useState=useState(_convertValueToOption(currentValue)),_useState2=_slicedToArray$1(_useState,2),optionSelected=_useState2[0],setOptionSelected=_useState2[1];var _useState3=useState(false),_useState4=_slicedToArray$1(_useState3,2),isMenuOpen=_useState4[0],setIsMenuOpen=_useState4[1];var _useState5=useState(0),_useState6=_slicedToArray$1(_useState5,2),menuKey=_useState6[0],setMenuKey=_useState6[1];useEffect(function(){setOptionSelected(_convertValueToOption(currentValue));},[currentValue]);useEffect(function(){if(isMenuOpen&&options&&!isEmpty$1(options)){setMenuKey(function(prev2){return prev2+1;});}},[options,isMenuOpen]);var handleInputChange2=useCallback(function(value2){var fakeEvent={target:{name:name2,value:value2}};onInputChange2===null||onInputChange2===void 0||onInputChange2(fakeEvent);setIsMenuOpen(true);},[name2,onInputChange2]);var handleSelect=useCallback(function(selected2){var fakeEvent={target:{name:name2,value:selected2===null||selected2===void 0?void 0:selected2.value}};setOptionSelected(selected2);if(input2){input2.onChange(selected2===null||selected2===void 0?void 0:selected2.value);}else{onChange2===null||onChange2===void 0||onChange2(fakeEvent);}if(clearOnSelect&&selected2){setOptionSelected(null);}setIsMenuOpen(false);},[name2,input2,onChange2,clearOnSelect]);var handleBlur=useCallback(function(){if(input2){input2.onBlur();}setIsMenuOpen(false);},[input2]);var handleClear=useCallback(function(){setOptionSelected(null);if(input2){input2.onChange(null);}else{var fakeEvent={target:{name:name2,value:null}};onChange2===null||onChange2===void 0||onChange2(fakeEvent);}},[input2,name2,onChange2]);var OptionWithFormat=useCallback(function(optionProps){return/* @__PURE__ */jsx$1(Option$1,_objectSpread2$1(_objectSpread2$1({},optionProps),{},{formatOption:formatOption,tooltipProps:tooltipProps}));},[formatOption,tooltipProps]);var SingleValueWithFormat=useCallback(function(singleValueProps){return/* @__PURE__ */jsx$1(SingleValue2,_objectSpread2$1({},singleValueProps));},[]);var _renderSelectComponent=useCallback(function(){var commonProps=_objectSpread2$1(_objectSpread2$1({},selectOtherProps),{},{name:name2,inputId:name2,"aria-label":accessibleName,placeholder:placeholder,classNamePrefix:"producteca-select-field",isDisabled:disabled2,isClearable:isClearable,isOptionDisabled:isOptionDisabled3,isSearchable:isSearchable,isLoading:isLoading,loadingMessage:function loadingMessage2(){return isLoading?/* @__PURE__ */jsx$1(Spinner,{size:"sm"}):_noOptionsMessage;},noOptionsMessage:function noOptionsMessage2(){return isLoading?/* @__PURE__ */jsx$1(Spinner,{size:"sm"}):_noOptionsMessage;},onInputChange:handleInputChange2,onChange:handleSelect,onBlur:handleBlur,value:optionSelected,components:{Option:OptionWithFormat,SingleValue:SingleValueWithFormat},menuPortalTarget:document.body,menuIsOpen:isMenuOpen,onMenuOpen:function onMenuOpen(){return setIsMenuOpen(true);},onMenuClose:function onMenuClose(){return setIsMenuOpen(false);}});if(loadOptions){return/* @__PURE__ */jsx$1(AsyncSelect$1,_objectSpread2$1(_objectSpread2$1({},commonProps),{},{loadOptions:loadOptions,cacheOptions:cacheOptions,defaultOptions:defaultOptions2}),menuKey);}return/* @__PURE__ */jsx$1(StateManagedSelect$1,_objectSpread2$1(_objectSpread2$1({},commonProps),{},{options:options}),menuKey);},[otherProps,menuKey,name2,accessibleName,placeholder,disabled2,isClearable,isOptionDisabled3,isSearchable,isLoading,_noOptionsMessage,handleInputChange2,handleSelect,handleBlur,optionSelected,OptionWithFormat,SingleValueWithFormat,isMenuOpen,loadOptions,cacheOptions,defaultOptions2,options]);return/* @__PURE__ */jsxs("div",_objectSpread2$1(_objectSpread2$1({className:clsx(styles$G["producteca-select-field-container"],_defineProperty$2({},errorStyles[validated],validated))},dataProps),{},{children:[label2&&/* @__PURE__ */jsx$1("label",{htmlFor:name2,children:label2}),/* @__PURE__ */jsxs("div",{className:clsx(_defineProperty$2({},errorStyles["validation-wrapper"],validated)),children:[/* @__PURE__ */jsxs("div",{className:clsx(styles$G[size2],styles$G["producteca-select-field-body"],_defineProperty$2(_defineProperty$2(_defineProperty$2(_defineProperty$2({},styles$G["producteca-select-field--is-searchable"],isSearchable),styles$G["producteca-select-field--is-clearable"],isClearable),styles$G["producteca-select-field--with-modifier"],rightModifier),styles$G["producteca-select-field--on-error"],validated)),children:[/* @__PURE__ */jsxs("div",{className:styles$G["searcher-body"],children:[isSearchable&&/* @__PURE__ */jsx$1(SearchComponent,{}),_renderSelectComponent(),/* @__PURE__ */jsx$1(ClearComponent,{optionSelected:optionSelected,isClearable:isClearable,handleChange:handleClear})]}),!!rightModifier&&rightModifier]}),!noErrors&&validated&&/* @__PURE__ */jsx$1(ErrorMessage,{validationProps:validationProps})]})]}));};var Searcher=withDebugHandlers(SearcherBase,"Searcher");var title$6="switchInput-module_title_lBK2p";var disabled$7="switchInput-module_disabled_yz9dR";var lg$5="switchInput-module_lg_WMIDO";var md$4="switchInput-module_md_683sQ";var sm$6="switchInput-module_sm_sh92j";var styles$x={"switch-input-container":"switchInput-module_switch-input-container_t9Kpp",title:title$6,"switch-input-items":"switchInput-module_switch-input-items_P3RMy","switch-wrapper":"switchInput-module_switch-wrapper_cZvDV","switch-input":"switchInput-module_switch-input_e9PWi","switch-slider":"switchInput-module_switch-slider_ICfGn","switch-label":"switchInput-module_switch-label_Nj-Hh",disabled:disabled$7,lg:lg$5,md:md$4,sm:sm$6};var _excluded$C=["title","name","items","onChange","size","input","meta"],_excluded2$8=["id","name","label","disabled","checked","value"];var SwitchInputGroupBase=function SwitchInputGroupBase2(_ref3){var title2=_ref3.title,name2=_ref3.name,items=_ref3.items,onChange2=_ref3.onChange,_ref$size=_ref3.size,size2=_ref$size===void 0?"md":_ref$size,input2=_ref3.input;_ref3.meta;var props=_objectWithoutProperties$1(_ref3,_excluded$C);var _useReduxFormField=useReduxFormField({input:input2,onChange:onChange2,transformValue:_getBooleanValueFromInputEvent}),handleChange=_useReduxFormField.handleChange,handleBlur=_useReduxFormField.handleBlur;return/* @__PURE__ */jsxs("div",{className:styles$x["switch-input-container"],"data-testid":"switch-input-container",children:[title2&&/* @__PURE__ */jsxs("label",{className:styles$x["title"],"data-testid":"switch-title",children:[" ",title2," "]}),/* @__PURE__ */jsx$1("div",{className:"".concat(styles$x["switch-input-items"]," ").concat(styles$x[size2]),"data-testid":"switch-input-items",children:map$2(items,function(_ref22){var id=_ref22.id,itemName=_ref22.name,label2=_ref22.label,disabled2=_ref22.disabled,checked=_ref22.checked;_ref22.value;var itemProps=_objectWithoutProperties$1(_ref22,_excluded2$8);var inputName=itemName||name2;var inputId=id||inputName;var checkedValue=_resolveCheckedValue({input:input2,inputName:inputName,checked:checked});return/* @__PURE__ */jsxs("label",{htmlFor:inputId,className:"".concat(disabled2?styles$x["disabled"]:""),"data-testid":"switch-label-".concat(inputId),children:[/* @__PURE__ */jsxs("div",{className:styles$x["switch-wrapper"],children:[/* @__PURE__ */jsx$1("input",_objectSpread2$1(_objectSpread2$1(_objectSpread2$1({},props),itemProps),{},{id:inputId,type:"checkbox",name:inputName,disabled:disabled2,onBlur:handleBlur,checked:checkedValue,onChange:handleChange,className:styles$x["switch-input"],"data-testid":"switch-input-".concat(inputId),"aria-label":label2?void 0:inputName})),/* @__PURE__ */jsx$1("span",{className:styles$x["switch-slider"]})]}),/* @__PURE__ */jsxs("span",{className:styles$x["switch-label"],children:[" ",label2," "]})]},inputId);})})]});};var SwitchInputGroup=withDebugHandlers(SwitchInputGroupBase,"SwitchInputGroup");var _excluded$B=["id","name","checked","onChange","label","title","disabled","size","input"];var SwitchInputBase=function SwitchInputBase2(_ref3){var _input$name;var id=_ref3.id,name2=_ref3.name,checked=_ref3.checked,onChange2=_ref3.onChange,label2=_ref3.label,title2=_ref3.title,_ref$disabled=_ref3.disabled,disabled2=_ref$disabled===void 0?false:_ref$disabled,_ref$size=_ref3.size,size2=_ref$size===void 0?"sm":_ref$size,input2=_ref3.input,props=_objectWithoutProperties$1(_ref3,_excluded$B);var item2=_buildSingleToggleItem({id:id,name:name2,label:label2,checked:checked,disabled:disabled2});return/* @__PURE__ */jsx$1(SwitchInputGroup,_objectSpread2$1(_objectSpread2$1({},props),{},{size:size2,title:title2,input:input2,items:[item2],onChange:onChange2,name:(_input$name=input2===null||input2===void 0?void 0:input2.name)!==null&&_input$name!==void 0?_input$name:name2}));};var SwitchInput=withDebugHandlers(SwitchInputBase,"SwitchInput");var styles$w={"async-content-container":"asyncContent-module_async-content-container_UEl81","state-container":"asyncContent-module_state-container_FgE4I","loading-container":"asyncContent-module_loading-container_nXfG5","error-container":"asyncContent-module_error-container_7TLNR","empty-container":"asyncContent-module_empty-container_exoXG","success-container":"asyncContent-module_success-container_jEkhm","content-container":"asyncContent-module_content-container_Lj05u"};var LoadingView=/* @__PURE__ */memo(function(){return/* @__PURE__ */jsx$1("div",{className:clsx(styles$w["state-container"],styles$w["loading-container"]),children:/* @__PURE__ */jsx$1(Spinner,{size:"lg"})});});LoadingView.displayName="LoadingView";var styles$v={"empty-state-container":"emptyState-module_empty-state-container_azCks","link-container":"emptyState-module_link-container_kXroF","empty-state-text":"emptyState-module_empty-state-text_W1HX5"};var link="link-module_link_Nwimt";var sm$5="link-module_sm_Roymo";var md$3="link-module_md_MM1DP";var lg$4="link-module_lg_Yh-xD";var none="link-module_none_S8BaL";var underline="link-module_underline_PqOji";var disabled$6="link-module_disabled_BgNPl";var styles$u={link:link,sm:sm$5,md:md$3,lg:lg$4,none:none,underline:underline,"tooltip-link":"link-module_tooltip-link_DdWtn","weight-100":"link-module_weight-100_eDdnp","weight-200":"link-module_weight-200_8oRhr","weight-300":"link-module_weight-300_8vVYQ","weight-400":"link-module_weight-400_vjPHp","weight-500":"link-module_weight-500_SKGTU","weight-600":"link-module_weight-600_-KWak","weight-700":"link-module_weight-700_tQ2N-","weight-800":"link-module_weight-800_enJ5o","weight-900":"link-module_weight-900_Yxl7i",disabled:disabled$6};var _excluded$A=["size","decoration","variant","weight","disabled","href","onClick","children"];var ACTIVATION_KEYS=["Enter"," "];var LinkBase=/* @__PURE__ */React__default.memo(/* @__PURE__ */React__default.forwardRef(function(_ref3,ref){var _ref$size=_ref3.size,size2=_ref$size===void 0?"md":_ref$size,_ref$decoration=_ref3.decoration,decoration=_ref$decoration===void 0?"none":_ref$decoration,_ref$variant=_ref3.variant,variant=_ref$variant===void 0?"default":_ref$variant,weight=_ref3.weight,_ref$disabled=_ref3.disabled,disabled2=_ref$disabled===void 0?false:_ref$disabled,href=_ref3.href,onClick=_ref3.onClick,children=_ref3.children,props=_objectWithoutProperties$1(_ref3,_excluded$A);var isAction=!href;var _handleClick=function _handleClick2(event){if(disabled2){event.preventDefault();return;}var isCtrlClick=event.ctrlKey||event.metaKey;var isMiddleClick=event.button===1;var isTargetBlank=props.target==="_blank";if(isCtrlClick||isMiddleClick||isTargetBlank){return;}if(onClick){event.preventDefault();onClick(event);}};var _handleKeyDown=function _handleKeyDown2(event){if(!includes$1(ACTIVATION_KEYS,event.key)){return;}event.preventDefault();event.currentTarget.click();};return/* @__PURE__ */jsx$1("a",_objectSpread2$1(_objectSpread2$1({ref:ref,href:href,role:isAction?"button":void 0,tabIndex:isAction&&!disabled2?0:void 0,onClick:_handleClick,onKeyDown:isAction?_handleKeyDown:void 0,"aria-disabled":disabled2,className:clsx(styles$u.link,styles$u[size2],styles$u[decoration],_defineProperty$2(_defineProperty$2(_defineProperty$2({},styles$u["tooltip-link"],variant==="tooltip-link"),styles$u["weight-".concat(weight)],!!weight),styles$u.disabled,disabled2))},props),{},{children:children}));}));LinkBase.displayName="Link";var Link=withDebugHandlers(LinkBase,"Link");var _excluded$z=["onActionClick","icon","actionText","text"];var DefaultIcon$2=/* @__PURE__ */jsx$1(EmptyStateIcon,{});var EmptyStateBase=function EmptyStateBase2(_ref3){var onActionClick=_ref3.onActionClick,_ref$icon=_ref3.icon,icon2=_ref$icon===void 0?DefaultIcon$2:_ref$icon,_ref$actionText=_ref3.actionText,actionText=_ref$actionText===void 0?locale("reloadPage"):_ref$actionText,_ref$text=_ref3.text,text2=_ref$text===void 0?locale("noResultsFound"):_ref$text,props=_objectWithoutProperties$1(_ref3,_excluded$z);return/* @__PURE__ */jsxs("div",_objectSpread2$1(_objectSpread2$1({className:styles$v["empty-state-container"]},props),{},{children:[icon2,/* @__PURE__ */jsxs("div",{className:styles$v["link-container"],children:[/* @__PURE__ */jsx$1("span",{className:styles$v["empty-state-text"],children:text2}),onActionClick&&/* @__PURE__ */jsx$1(Link,{href:"",onClick:onActionClick,children:actionText})]})]}));};var EmptyState=withDebugHandlers(EmptyStateBase,"EmptyState");var ErrorView=/* @__PURE__ */memo(function(_ref3){var text2=_ref3.text,actionText=_ref3.actionText,onClick=_ref3.onClick;return/* @__PURE__ */jsx$1("div",{className:clsx(styles$w["state-container"],styles$w["error-container"]),children:/* @__PURE__ */jsx$1(EmptyState,{text:text2,icon:/* @__PURE__ */jsx$1(ErrorStateIcon,{}),actionText:actionText,onActionClick:onClick})});});ErrorView.displayName="ErrorView";var EmptyView=/* @__PURE__ */memo(function(_ref3){var text2=_ref3.text,actionText=_ref3.actionText,onClick=_ref3.onClick;return/* @__PURE__ */jsx$1("div",{className:clsx(styles$w["state-container"],styles$w["empty-container"]),children:/* @__PURE__ */jsx$1(EmptyState,{text:text2,actionText:actionText,onActionClick:onClick})});});EmptyView.displayName="EmptyView";var NewView=/* @__PURE__ */memo(function(_ref3){var text2=_ref3.text,actionText=_ref3.actionText,onClick=_ref3.onClick;return/* @__PURE__ */jsx$1("div",{className:clsx(styles$w["state-container"],styles$w["empty-container"]),children:/* @__PURE__ */jsx$1(EmptyState,{icon:/* @__PURE__ */jsx$1(NewStateIcon,{}),text:text2,actionText:actionText,onActionClick:onClick})});});NewView.displayName="NewView";var SuccessView=/* @__PURE__ */memo(function(_ref3){var text2=_ref3.text,actionText=_ref3.actionText,onClick=_ref3.onClick;return/* @__PURE__ */jsx$1("div",{className:clsx(styles$w["state-container"],styles$w["success-container"]),children:/* @__PURE__ */jsx$1(EmptyState,{icon:/* @__PURE__ */jsx$1(SuccessStateIcon,{}),text:text2,actionText:actionText,onActionClick:onClick})});});SuccessView.displayName="SuccessView";var _excluded$y=["error","empty","success","children","className","isLoading"];var _resolveStatus=function _resolveStatus2(_ref3){var isLoading=_ref3.isLoading,error2=_ref3.error,empty=_ref3.empty,success2=_ref3.success;if(isLoading)return"loading";if(error2!==null&&error2!==void 0&&error2.value)return"error";if(success2!==null&&success2!==void 0&&success2.value)return"success";if(empty!==null&&empty!==void 0&&empty.items&&empty.items.length===0)return empty.creation?"creation":"empty";return"content";};var _getStatusComponent=function _getStatusComponent2(_ref22){var _error$text,_error$actionText,_success$text;var status=_ref22.status,children=_ref22.children,error2=_ref22.error,empty=_ref22.empty,success2=_ref22.success;var statusComponents={loading:/* @__PURE__ */jsx$1(LoadingView,{}),error:/* @__PURE__ */jsx$1(ErrorView,{onClick:error2===null||error2===void 0?void 0:error2.onClick,text:(_error$text=error2===null||error2===void 0?void 0:error2.text)!==null&&_error$text!==void 0?_error$text:locale("asyncContent.errorOccurred"),actionText:(_error$actionText=error2===null||error2===void 0?void 0:error2.actionText)!==null&&_error$actionText!==void 0?_error$actionText:locale("asyncContent.retry")}),empty:/* @__PURE__ */jsx$1(EmptyView,{text:empty===null||empty===void 0?void 0:empty.text,onClick:empty===null||empty===void 0?void 0:empty.onClick,actionText:empty===null||empty===void 0?void 0:empty.actionText}),creation:/* @__PURE__ */jsx$1(NewView,{text:empty===null||empty===void 0?void 0:empty.text,onClick:empty===null||empty===void 0?void 0:empty.onClick,actionText:empty===null||empty===void 0?void 0:empty.actionText}),success:/* @__PURE__ */jsx$1(SuccessView,{onClick:success2===null||success2===void 0?void 0:success2.onClick,actionText:success2===null||success2===void 0?void 0:success2.actionText,text:(_success$text=success2===null||success2===void 0?void 0:success2.text)!==null&&_success$text!==void 0?_success$text:locale("asyncContent.successCompleted")}),content:/* @__PURE__ */jsx$1("div",{className:styles$w["content-container"],children:children})};return statusComponents[status];};var AsyncContentBase=/* @__PURE__ */memo(function(_ref3){var _empty$text;var error2=_ref3.error,empty=_ref3.empty,success2=_ref3.success,children=_ref3.children,className=_ref3.className,isLoading=_ref3.isLoading,props=_objectWithoutProperties$1(_ref3,_excluded$y);var status=_resolveStatus({isLoading:isLoading,error:error2,empty:empty,success:success2});var _resolvedEmpty=empty?_objectSpread2$1(_objectSpread2$1({},empty),{},{text:(_empty$text=empty.text)!==null&&_empty$text!==void 0?_empty$text:locale("asyncContent.noResultsFound")}):void 0;return/* @__PURE__ */jsx$1("div",_objectSpread2$1(_objectSpread2$1({className:clsx(styles$w["async-content-container"],className)},props),{},{children:_getStatusComponent({status:status,children:children,error:error2,empty:_resolvedEmpty,success:success2})}));});AsyncContentBase.displayName="AsyncContent";var AsyncContent=withDebugHandlers(AsyncContentBase,"AsyncContent");var fullPage="actionBar-module_fullPage_A4wiw";var modal$2="actionBar-module_modal_jZfAJ";var page="actionBar-module_page_Oq8Jb";var styles$t={"action-bar":"actionBar-module_action-bar_Y-sjl",fullPage:fullPage,modal:modal$2,page:page};var _excluded$x=["onCancel","label"],_excluded2$7=["onPrevious","label"],_excluded3$2=["onSave","label"];var ActionBarBase=function ActionBarBase2(_ref3){var _ref$variant=_ref3.variant,variant=_ref$variant===void 0?"page":_ref$variant,saveProps=_ref3.saveProps,cancelProps=_ref3.cancelProps,previousProps=_ref3.previousProps;var _ref22=cancelProps||{},onCancel=_ref22.onCancel,_ref2$label=_ref22.label,cancelText=_ref2$label===void 0?locale("cancel"):_ref2$label,cancelOtherProps=_objectWithoutProperties$1(_ref22,_excluded$x);var _ref32=previousProps||{},onPrevious=_ref32.onPrevious,_ref3$label=_ref32.label,previousText=_ref3$label===void 0?locale("previous"):_ref3$label,previousOtherProps=_objectWithoutProperties$1(_ref32,_excluded2$7);var _ref4=saveProps||{},onSave=_ref4.onSave,_ref4$label=_ref4.label,saveText=_ref4$label===void 0?locale("save"):_ref4$label,saveOtherProps=_objectWithoutProperties$1(_ref4,_excluded3$2);return/* @__PURE__ */jsxs("div",{className:clsx(styles$t["action-bar"],styles$t[variant]),children:[!!onCancel&&/* @__PURE__ */jsx$1(Button$2,_objectSpread2$1({size:"md",variant:"link",label:cancelText,onClick:onCancel},cancelOtherProps)),!!onPrevious&&/* @__PURE__ */jsx$1(Button$2,_objectSpread2$1({outline:true,label:previousText,onClick:onPrevious},previousOtherProps)),!!onSave&&/* @__PURE__ */jsx$1(Button$2,_objectSpread2$1({label:saveText,onClick:onSave},saveOtherProps))]});};var ActionBar=withDebugHandlers(ActionBarBase,"ActionBar");var Check=createSvgIcon(/* @__PURE__ */jsx$1("path",{d:"M9 16.17 4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z"}),"Check");var ContentCopy=createSvgIcon(/* @__PURE__ */jsx$1("path",{d:"M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2m0 16H8V7h11z"}),"ContentCopy");var _excluded$w=["onClick","copyText","copiedText","textToCopy","resetTime"];var CopyButtonBase=function CopyButtonBase2(_ref3){var _onClick=_ref3.onClick,_ref$copyText=_ref3.copyText,copyText=_ref$copyText===void 0?locale("copyButton.copy"):_ref$copyText,_ref$copiedText=_ref3.copiedText,copiedText=_ref$copiedText===void 0?locale("copyButton.copied"):_ref$copiedText,textToCopy=_ref3.textToCopy,_ref$resetTime=_ref3.resetTime,resetTime=_ref$resetTime===void 0?2e3:_ref$resetTime,props=_objectWithoutProperties$1(_ref3,_excluded$w);var _useState=useState(false),_useState2=_slicedToArray$1(_useState,2),copied=_useState2[0],setCopied=_useState2[1];var _useState3=useState(false),_useState4=_slicedToArray$1(_useState3,2),isAnimating=_useState4[0],setIsAnimating=_useState4[1];useEffect(function(){if(copied){setIsAnimating(true);var timer=setTimeout(function(){setIsAnimating(false);},resetTime/2);return function(){return clearTimeout(timer);};}},[copied]);var defaultCopyFunction=function defaultCopyFunction2(){if(textToCopy){setCopied(true);navigator.clipboard.writeText(textToCopy).then(function(){setTimeout(function(){return setCopied(false);},resetTime);}).catch(function(){setCopied(false);});}};return/* @__PURE__ */jsx$1("div",{onClick:function onClick(){return _onClick?_onClick():defaultCopyFunction();},children:/* @__PURE__ */jsx$1(Button$2,_objectSpread2$1({className:"copy-btn ".concat(copied?"copied":""," ").concat(isAnimating?"animating":""),outline:true,label:copied?copiedText:copyText,leftAdornment:/* @__PURE__ */jsx$1(Icons,{copied:copied})},props))});};var Icons=function Icons2(_ref22){var copied=_ref22.copied;return/* @__PURE__ */jsxs("div",{className:"copy-btn-icons",children:[/* @__PURE__ */jsx$1("div",{className:"copy-icon ".concat(copied?"hidden":""),children:/* @__PURE__ */jsx$1(ContentCopy,{"data-testid":"ContentCopyIcon"})}),/* @__PURE__ */jsx$1("div",{className:"check-icon ".concat(!copied?"hidden":""),children:/* @__PURE__ */jsx$1(Check,{})})]});};var CopyButton=withDebugHandlers(CopyButtonBase,"CopyButton");var dense="headerSection-module_dense_f1FWn";var content="headerSection-module_content_5y2PB";var title$5="headerSection-module_title_cabYm";var styles$s={"header-section-container":"headerSection-module_header-section-container_M-ZSv",dense:dense,"header-section":"headerSection-module_header-section_UIh2F",content:content,title:title$5};var _excluded$v=["breadcrumb","image","dense","title","subtitle","link","menuAction"];var HeaderSection=function HeaderSection2(_ref3){var breadcrumb2=_ref3.breadcrumb,image2=_ref3.image,_ref$dense=_ref3.dense,dense2=_ref$dense===void 0?false:_ref$dense,title2=_ref3.title,subtitle2=_ref3.subtitle,link2=_ref3.link,menuAction=_ref3.menuAction,props=_objectWithoutProperties$1(_ref3,_excluded$v);return/* @__PURE__ */jsxs("div",_objectSpread2$1(_objectSpread2$1({className:clsx(styles$s["header-section-container"],_defineProperty$2({},styles$s["dense"],dense2))},props),{},{children:[!!breadcrumb2&&breadcrumb2,/* @__PURE__ */jsxs("div",{className:styles$s["header-section"],children:[!!image2&&image2,/* @__PURE__ */jsxs("div",{className:styles$s.content,children:[title2&&/* @__PURE__ */jsx$1("h3",{className:styles$s.title,children:title2}),!!subtitle2&&subtitle2,!!link2&&link2]}),!!menuAction&&menuAction]})]}));};var action$1="linkWithIcon-module_action_3K4he";var styles$r={action:action$1};var _excluded$u=["text","icon","onClick","className","size","otherProps"];var SIZE_TO_ICON={sm:"8",md:"12",lg:"12"};var transformSize=function transformSize2(size2){return SIZE_TO_ICON[size2!==null&&size2!==void 0?size2:"md"];};var LinkWithIcon=function LinkWithIcon2(_ref3){var text2=_ref3.text,icon2=_ref3.icon,onClick=_ref3.onClick,className=_ref3.className,_ref$size=_ref3.size,size2=_ref$size===void 0?"md":_ref$size,_ref$otherProps=_ref3.otherProps,otherProps=_ref$otherProps===void 0?{}:_ref$otherProps,props=_objectWithoutProperties$1(_ref3,_excluded$u);var _splitDataProps=splitDataProps(otherProps),_splitDataProps2=_slicedToArray$1(_splitDataProps,2),iconProps=_splitDataProps2[1];return/* @__PURE__ */jsxs("div",{className:clsx(styles$r.action,className),onClick:onClick,children:[icon2&&/* @__PURE__ */jsx$1(CustomIcon,_objectSpread2$1(_objectSpread2$1({color:getColor("primary","500")},iconProps),{},{size:transformSize(size2),children:icon2})),/* @__PURE__ */jsx$1(Button$2,_objectSpread2$1(_objectSpread2$1({variant:"link",label:text2,size:size2},otherProps),props))]});};var sm$4="iconWithIdentifier-module_sm_9KqJO";var md$2="iconWithIdentifier-module_md_BUC1r";var icon$2="iconWithIdentifier-module_icon_y8sd3";var divider="iconWithIdentifier-module_divider_fCBSV";var identifier$1="iconWithIdentifier-module_identifier_kWrOU";var styles$q={"icon-with-identifier":"iconWithIdentifier-module_icon-with-identifier_3-SZE",sm:sm$4,md:md$2,icon:icon$2,divider:divider,identifier:identifier$1};var _excluded$t=["text","icon","color","size","showDivider"];var IconWithIdentifier=function IconWithIdentifier2(_ref3){var text2=_ref3.text,icon2=_ref3.icon,color2=_ref3.color,_ref$size=_ref3.size,size2=_ref$size===void 0?"md":_ref$size,_ref$showDivider=_ref3.showDivider,showDivider=_ref$showDivider===void 0?true:_ref$showDivider,props=_objectWithoutProperties$1(_ref3,_excluded$t);return/* @__PURE__ */jsxs("div",_objectSpread2$1(_objectSpread2$1({className:clsx(styles$q["icon-with-identifier"],styles$q[size2])},props),{},{children:[!!icon2&&icon2,showDivider&&/* @__PURE__ */jsx$1("div",{className:styles$q.divider}),!!text2&&/* @__PURE__ */jsx$1("span",{className:styles$q.identifier,style:{color:color2},children:text2})]}));};var styles$p={"conditional-operator":"conditionalOperator-module_conditional-operator_k-Czb","conditional-operator-segment":"conditionalOperator-module_conditional-operator-segment_9RYOJ"};var VALUE_OR="or";var VALUE_AND="and";var _excluded$s=["name","value","onChange","options"];var _getDefaultOptions=function _getDefaultOptions2(){return[{value:VALUE_OR,label:locale("conditionalOperator.or")},{value:VALUE_AND,label:locale("conditionalOperator.and")}];};var ConditionalOperatorBase=function ConditionalOperatorBase2(_ref3){var _ref$name=_ref3.name,name2=_ref$name===void 0?"conditionalOperator":_ref$name,value=_ref3.value,onChange2=_ref3.onChange,optionsProp=_ref3.options,props=_objectWithoutProperties$1(_ref3,_excluded$s);var options=useMemo(function(){return optionsProp!==null&&optionsProp!==void 0?optionsProp:_getDefaultOptions();},[optionsProp]);var _options=_slicedToArray$1(options,2),leftOption=_options[0],rightOption=_options[1];var selectedValue=value!==null&&value!==void 0?value:leftOption.value;var isLeftSelected=selectedValue===leftOption.value;var _handleChange=useCallback(function(){if(onChange2){var nextValue=isLeftSelected?rightOption.value:leftOption.value;var event={target:{name:name2,value:nextValue}};onChange2(event);}},[isLeftSelected,leftOption.value,rightOption.value,name2,onChange2]);return/* @__PURE__ */jsxs("div",_objectSpread2$1(_objectSpread2$1({role:"button","data-or":isLeftSelected,onClick:_handleChange,className:styles$p["conditional-operator"]},props),{},{children:[/* @__PURE__ */jsx$1("div",{className:styles$p["conditional-operator-segment"],children:leftOption.label}),/* @__PURE__ */jsx$1("div",{className:styles$p["conditional-operator-segment"],children:rightOption.label})]}));};ConditionalOperatorBase.displayName="ConditionalOperator";ConditionalOperatorBase.VALUE_OR=VALUE_OR;ConditionalOperatorBase.VALUE_AND=VALUE_AND;var ConditionalOperator=Object.assign(withDebugHandlers(ConditionalOperatorBase,"ConditionalOperator"),{VALUE_OR:VALUE_OR,VALUE_AND:VALUE_AND});var AutoStoriesIcon=createSvgIcon(/* @__PURE__ */jsx$1("path",{d:"m19 1-5 5v11l5-4.5zM1 6v14.65c0 .25.25.5.5.5.1 0 .15-.05.25-.05C3.1 20.45 5.05 20 6.5 20c1.95 0 4.05.4 5.5 1.5V6c-1.45-1.1-3.55-1.5-5.5-1.5S2.45 4.9 1 6m22 13.5V6c-.6-.45-1.25-.75-2-1v13.5c-1.1-.35-2.3-.5-3.5-.5-1.7 0-4.15.65-5.5 1.5v2c1.35-.85 3.8-1.5 5.5-1.5 1.65 0 3.35.3 4.75 1.05.1.05.15.05.25.05.25 0 .5-.25.5-.5z"}),"AutoStories");var styles$o={entering:{transform:"none"},entered:{transform:"none"},exiting:{transform:"scale(0)"},exited:{transform:"scale(0)"}};var hiddenStyles$1={transform:"scale(0)",visibility:"hidden"};var Zoom=/* @__PURE__ */React.forwardRef(function Zoom2(props,ref){var theme=useTheme();var defaultTimeout={enter:theme.transitions.duration.enteringScreen,exit:theme.transitions.duration.leavingScreen};var _a=props,addEndListener=_a.addEndListener,_a$appear3=_a.appear,appear=_a$appear3===void 0?true:_a$appear3,_children7=_a.children,easing2=_a.easing,inProp=_a.in,onEnter=_a.onEnter,onEntered=_a.onEntered,onEntering=_a.onEntering,onExit=_a.onExit,onExited=_a.onExited,onExiting=_a.onExiting,style2=_a.style,_a$timeout3=_a.timeout,timeout2=_a$timeout3===void 0?defaultTimeout:_a$timeout3,other=__objRest(_a,["addEndListener","appear","children","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout"]);var nodeRef=React.useRef(null);var handleRef=useForkRef(nodeRef,getReactElementRef(_children7),ref);var handleEntering=normalizedTransitionCallback(nodeRef,onEntering);var handleEnter=normalizedTransitionCallback(nodeRef,function(node2,isAppearing){reflow(node2);var transitionProps=getTransitionProps({style:style2,timeout:timeout2,easing:easing2},{mode:"enter"});node2.style.transition=theme.transitions.create("transform",transitionProps);if(onEnter){onEnter(node2,isAppearing);}});var handleEntered=normalizedTransitionCallback(nodeRef,onEntered);var handleExiting=normalizedTransitionCallback(nodeRef,onExiting);var handleExit=normalizedTransitionCallback(nodeRef,function(node2){var transitionProps=getTransitionProps({style:style2,timeout:timeout2,easing:easing2},{mode:"exit"});node2.style.transition=theme.transitions.create("transform",transitionProps);if(onExit){onExit(node2);}});var handleExited=normalizedTransitionCallback(nodeRef,function(node2){node2.style.transition="";if(onExited){onExited(node2);}});var handleAddEndListener=function handleAddEndListener(next2){if(addEndListener){addEndListener(nodeRef.current,next2);}};return/* @__PURE__ */jsx$1(Transition,__spreadProps(__spreadValues({appear:appear,in:inProp,nodeRef:nodeRef,onEnter:handleEnter,onEntered:handleEntered,onEntering:handleEntering,onExit:handleExit,onExited:handleExited,onExiting:handleExiting,addEndListener:handleAddEndListener,timeout:timeout2},other),{children:function children(state,_b){var _c=_b,ownerState=_c.ownerState,restChildProps=__objRest(_c,["ownerState"]);var childStyle=getTransitionChildStyle(state,inProp,styles$o,hiddenStyles$1,style2,_children7.props.style);return/* @__PURE__ */React.cloneElement(_children7,__spreadValues({style:childStyle,ref:handleRef},restChildProps));}}));});process.env.NODE_ENV!=="production"?Zoom.propTypes={// ┌────────────────────────────── Warning ──────────────────────────────┐
6888
+ targetInLock&&(endTarget.contains(target)||endTarget===target));if(isDeltaPositive&&(Math.abs(availableScroll)<1||false)){shouldCancelScroll=true;}else if(!isDeltaPositive&&(Math.abs(availableScrollTop)<1||false)){shouldCancelScroll=true;}return shouldCancelScroll;};var getTouchXY=function getTouchXY(event){return"changedTouches"in event?[event.changedTouches[0].clientX,event.changedTouches[0].clientY]:[0,0];};var getDeltaXY=function getDeltaXY(event){return[event.deltaX,event.deltaY];};var extractRef=function extractRef(ref){return ref&&"current"in ref?ref.current:ref;};var deltaCompare=function deltaCompare(x,y){return x[0]===y[0]&&x[1]===y[1];};var generateStyle=function generateStyle(id){return"\n .block-interactivity-".concat(id," {pointer-events: none;}\n .allow-interactivity-").concat(id," {pointer-events: all;}\n");};var idCounter=0;var lockStack=[];function RemoveScrollSideCar(props){var shouldPreventQueue=React.useRef([]);var touchStartRef=React.useRef([0,0]);var activeAxis=React.useRef();var id=React.useState(idCounter++)[0];var Style2=React.useState(styleSingleton)[0];var lastProps=React.useRef(props);React.useEffect(function(){lastProps.current=props;},[props]);React.useEffect(function(){if(props.inert){document.body.classList.add("block-interactivity-".concat(id));var allow_1=__spreadArray([props.lockRef.current],(props.shards||[]).map(extractRef),true).filter(Boolean);allow_1.forEach(function(el){return el.classList.add("allow-interactivity-".concat(id));});return function(){document.body.classList.remove("block-interactivity-".concat(id));allow_1.forEach(function(el){return el.classList.remove("allow-interactivity-".concat(id));});};}return;},[props.inert,props.lockRef.current,props.shards]);var shouldCancelEvent=React.useCallback(function(event,parent2){if("touches"in event&&event.touches.length===2||event.type==="wheel"&&event.ctrlKey){return!lastProps.current.allowPinchZoom;}var touch=getTouchXY(event);var touchStart=touchStartRef.current;var deltaX="deltaX"in event?event.deltaX:touchStart[0]-touch[0];var deltaY="deltaY"in event?event.deltaY:touchStart[1]-touch[1];var currentAxis;var target=event.target;var moveDirection=Math.abs(deltaX)>Math.abs(deltaY)?"h":"v";if("touches"in event&&moveDirection==="h"&&target.type==="range"){return false;}var selection=window.getSelection();var anchorNode=selection&&selection.anchorNode;var isTouchingSelection=anchorNode?anchorNode===target||anchorNode.contains(target):false;if(isTouchingSelection){return false;}var canBeScrolledInMainDirection=locationCouldBeScrolled(moveDirection,target);if(!canBeScrolledInMainDirection){return true;}if(canBeScrolledInMainDirection){currentAxis=moveDirection;}else{currentAxis=moveDirection==="v"?"h":"v";canBeScrolledInMainDirection=locationCouldBeScrolled(moveDirection,target);}if(!canBeScrolledInMainDirection){return false;}if(!activeAxis.current&&"changedTouches"in event&&(deltaX||deltaY)){activeAxis.current=currentAxis;}if(!currentAxis){return true;}var cancelingAxis=activeAxis.current||currentAxis;return handleScroll(cancelingAxis,parent2,event,cancelingAxis==="h"?deltaX:deltaY);},[]);var shouldPrevent=React.useCallback(function(_event){var event=_event;if(!lockStack.length||lockStack[lockStack.length-1]!==Style2){return;}var delta="deltaY"in event?getDeltaXY(event):getTouchXY(event);var sourceEvent=shouldPreventQueue.current.filter(function(e){return e.name===event.type&&(e.target===event.target||event.target===e.shadowParent)&&deltaCompare(e.delta,delta);})[0];if(sourceEvent&&sourceEvent.should){if(event.cancelable){event.preventDefault();}return;}if(!sourceEvent){var shardNodes=(lastProps.current.shards||[]).map(extractRef).filter(Boolean).filter(function(node2){return node2.contains(event.target);});var shouldStop=shardNodes.length>0?shouldCancelEvent(event,shardNodes[0]):!lastProps.current.noIsolation;if(shouldStop){if(event.cancelable){event.preventDefault();}}}},[]);var shouldCancel=React.useCallback(function(name2,delta,target,should){var event={name:name2,delta:delta,target:target,should:should,shadowParent:getOutermostShadowParent(target)};shouldPreventQueue.current.push(event);setTimeout(function(){shouldPreventQueue.current=shouldPreventQueue.current.filter(function(e){return e!==event;});},1);},[]);var scrollTouchStart=React.useCallback(function(event){touchStartRef.current=getTouchXY(event);activeAxis.current=void 0;},[]);var scrollWheel=React.useCallback(function(event){shouldCancel(event.type,getDeltaXY(event),event.target,shouldCancelEvent(event,props.lockRef.current));},[]);var scrollTouchMove=React.useCallback(function(event){shouldCancel(event.type,getTouchXY(event),event.target,shouldCancelEvent(event,props.lockRef.current));},[]);React.useEffect(function(){lockStack.push(Style2);props.setCallbacks({onScrollCapture:scrollWheel,onWheelCapture:scrollWheel,onTouchMoveCapture:scrollTouchMove});document.addEventListener("wheel",shouldPrevent,nonPassive);document.addEventListener("touchmove",shouldPrevent,nonPassive);document.addEventListener("touchstart",scrollTouchStart,nonPassive);return function(){lockStack=lockStack.filter(function(inst){return inst!==Style2;});document.removeEventListener("wheel",shouldPrevent,nonPassive);document.removeEventListener("touchmove",shouldPrevent,nonPassive);document.removeEventListener("touchstart",scrollTouchStart,nonPassive);};},[]);var removeScrollBar=props.removeScrollBar,inert=props.inert;return/*#__PURE__*/React.createElement(React.Fragment,null,inert?/*#__PURE__*/React.createElement(Style2,{styles:generateStyle(id)}):null,removeScrollBar?/*#__PURE__*/React.createElement(RemoveScrollBar,{noRelative:props.noRelative,gapMode:props.gapMode}):null);}function getOutermostShadowParent(node2){var shadowParent=null;while(node2!==null){if(node2 instanceof ShadowRoot){shadowParent=node2.host;node2=node2.host;}node2=node2.parentNode;}return shadowParent;}var SideCar=exportSidecar(effectCar,RemoveScrollSideCar);var ReactRemoveScroll=/*#__PURE__*/React.forwardRef(function(props,ref){return/*#__PURE__*/React.createElement(RemoveScroll,_assign$({},props,{ref:ref,sideCar:SideCar}));});ReactRemoveScroll.classNames=RemoveScroll.classNames;var POPOVER_NAME="Popover";var _createContextScope3=createContextScope(POPOVER_NAME,[createPopperScope]),_createContextScope4=_slicedToArray2(_createContextScope3,1),createPopoverContext=_createContextScope4[0];var usePopperScope=createPopperScope();var _createPopoverContext=createPopoverContext(POPOVER_NAME),_createPopoverContext2=_slicedToArray2(_createPopoverContext,2),PopoverProvider=_createPopoverContext2[0],usePopoverContext=_createPopoverContext2[1];var Popover2=function Popover2(props){var __scopePopover=props.__scopePopover,children=props.children,openProp=props.open,defaultOpen=props.defaultOpen,onOpenChange=props.onOpenChange,_props$modal=props.modal,modal2=_props$modal===void 0?false:_props$modal;var popperScope=usePopperScope(__scopePopover);var triggerRef=React.useRef(null);var _React$useState111=React.useState(false),_React$useState112=_slicedToArray2(_React$useState111,2),hasCustomAnchor=_React$useState112[0],setHasCustomAnchor=_React$useState112[1];var _useControllableState=useControllableState({prop:openProp,defaultProp:defaultOpen!=null?defaultOpen:false,onChange:onOpenChange,caller:POPOVER_NAME}),_useControllableState2=_slicedToArray2(_useControllableState,2),open=_useControllableState2[0],setOpen=_useControllableState2[1];return/* @__PURE__ */jsx$1(Root2$1,__spreadProps(__spreadValues({},popperScope),{children:/* @__PURE__ */jsx$1(PopoverProvider,{scope:__scopePopover,contentId:useId(),triggerRef:triggerRef,open:open,onOpenChange:setOpen,onOpenToggle:React.useCallback(function(){return setOpen(function(prevOpen){return!prevOpen;});},[setOpen]),hasCustomAnchor:hasCustomAnchor,onCustomAnchorAdd:React.useCallback(function(){return setHasCustomAnchor(true);},[]),onCustomAnchorRemove:React.useCallback(function(){return setHasCustomAnchor(false);},[]),modal:modal2,children:children})}));};Popover2.displayName=POPOVER_NAME;var ANCHOR_NAME="PopoverAnchor";var PopoverAnchor=/*#__PURE__*/React.forwardRef(function(props,forwardedRef){var _a=props,__scopePopover=_a.__scopePopover,anchorProps=__objRest(_a,["__scopePopover"]);var context=usePopoverContext(ANCHOR_NAME,__scopePopover);var popperScope=usePopperScope(__scopePopover);var onCustomAnchorAdd=context.onCustomAnchorAdd,onCustomAnchorRemove=context.onCustomAnchorRemove;React.useEffect(function(){onCustomAnchorAdd();return function(){return onCustomAnchorRemove();};},[onCustomAnchorAdd,onCustomAnchorRemove]);return/* @__PURE__ */jsx$1(Anchor,__spreadProps(__spreadValues(__spreadValues({},popperScope),anchorProps),{ref:forwardedRef}));});PopoverAnchor.displayName=ANCHOR_NAME;var TRIGGER_NAME="PopoverTrigger";var PopoverTrigger=/*#__PURE__*/React.forwardRef(function(props,forwardedRef){var _a=props,__scopePopover=_a.__scopePopover,triggerProps=__objRest(_a,["__scopePopover"]);var context=usePopoverContext(TRIGGER_NAME,__scopePopover);var popperScope=usePopperScope(__scopePopover);var composedTriggerRef=useComposedRefs(forwardedRef,context.triggerRef);var trigger=/* @__PURE__ */jsx$1(Primitive.button,__spreadProps(__spreadValues({type:"button","aria-haspopup":"dialog","aria-expanded":context.open,"aria-controls":context.contentId,"data-state":getState(context.open)},triggerProps),{ref:composedTriggerRef,onClick:composeEventHandlers(props.onClick,context.onOpenToggle)}));return context.hasCustomAnchor?trigger:/* @__PURE__ */jsx$1(Anchor,__spreadProps(__spreadValues({asChild:true},popperScope),{children:trigger}));});PopoverTrigger.displayName=TRIGGER_NAME;var PORTAL_NAME="PopoverPortal";var _createPopoverContext3=createPopoverContext(PORTAL_NAME,{forceMount:void 0}),_createPopoverContext4=_slicedToArray2(_createPopoverContext3,2),PortalProvider=_createPopoverContext4[0],usePortalContext=_createPopoverContext4[1];var PopoverPortal=function PopoverPortal(props){var __scopePopover=props.__scopePopover,forceMount=props.forceMount,children=props.children,container2=props.container;var context=usePopoverContext(PORTAL_NAME,__scopePopover);return/* @__PURE__ */jsx$1(PortalProvider,{scope:__scopePopover,forceMount:forceMount,children:/* @__PURE__ */jsx$1(Presence,{present:forceMount||context.open,children:/* @__PURE__ */jsx$1(Portal$1,{asChild:true,container:container2,children:children})})});};PopoverPortal.displayName=PORTAL_NAME;var CONTENT_NAME="PopoverContent";var PopoverContent=/*#__PURE__*/React.forwardRef(function(props,forwardedRef){var portalContext=usePortalContext(CONTENT_NAME,props.__scopePopover);var _a=props,_a$forceMount=_a.forceMount,forceMount=_a$forceMount===void 0?portalContext.forceMount:_a$forceMount,contentProps=__objRest(_a,["forceMount"]);var context=usePopoverContext(CONTENT_NAME,props.__scopePopover);return/* @__PURE__ */jsx$1(Presence,{present:forceMount||context.open,children:context.modal?/* @__PURE__ */jsx$1(PopoverContentModal,__spreadProps(__spreadValues({},contentProps),{ref:forwardedRef})):/* @__PURE__ */jsx$1(PopoverContentNonModal,__spreadProps(__spreadValues({},contentProps),{ref:forwardedRef}))});});PopoverContent.displayName=CONTENT_NAME;var Slot=/* @__PURE__ */createSlot("PopoverContent.RemoveScroll");var PopoverContentModal=/*#__PURE__*/React.forwardRef(function(props,forwardedRef){var context=usePopoverContext(CONTENT_NAME,props.__scopePopover);var contentRef=React.useRef(null);var composedRefs=useComposedRefs(forwardedRef,contentRef);var isRightClickOutsideRef=React.useRef(false);React.useEffect(function(){var content2=contentRef.current;if(content2)return hideOthers(content2);},[]);return/* @__PURE__ */jsx$1(ReactRemoveScroll,{as:Slot,allowPinchZoom:true,children:/* @__PURE__ */jsx$1(PopoverContentImpl,__spreadProps(__spreadValues({},props),{ref:composedRefs,trapFocus:context.open,disableOutsidePointerEvents:true,onCloseAutoFocus:composeEventHandlers(props.onCloseAutoFocus,function(event){var _a;event.preventDefault();if(!isRightClickOutsideRef.current)(_a=context.triggerRef.current)==null?void 0:_a.focus();}),onPointerDownOutside:composeEventHandlers(props.onPointerDownOutside,function(event){var originalEvent=event.detail.originalEvent;var ctrlLeftClick=originalEvent.button===0&&originalEvent.ctrlKey===true;var isRightClick=originalEvent.button===2||ctrlLeftClick;isRightClickOutsideRef.current=isRightClick;},{checkForDefaultPrevented:false}),onFocusOutside:composeEventHandlers(props.onFocusOutside,function(event){return event.preventDefault();},{checkForDefaultPrevented:false})}))});});var PopoverContentNonModal=/*#__PURE__*/React.forwardRef(function(props,forwardedRef){var context=usePopoverContext(CONTENT_NAME,props.__scopePopover);var hasInteractedOutsideRef=React.useRef(false);var hasPointerDownOutsideRef=React.useRef(false);return/* @__PURE__ */jsx$1(PopoverContentImpl,__spreadProps(__spreadValues({},props),{ref:forwardedRef,trapFocus:false,disableOutsidePointerEvents:false,onCloseAutoFocus:function onCloseAutoFocus(event){var _a,_b;(_a=props.onCloseAutoFocus)==null?void 0:_a.call(props,event);if(!event.defaultPrevented){if(!hasInteractedOutsideRef.current)(_b=context.triggerRef.current)==null?void 0:_b.focus();event.preventDefault();}hasInteractedOutsideRef.current=false;hasPointerDownOutsideRef.current=false;},onInteractOutside:function onInteractOutside(event){var _a,_b;(_a=props.onInteractOutside)==null?void 0:_a.call(props,event);if(!event.defaultPrevented){hasInteractedOutsideRef.current=true;if(event.detail.originalEvent.type==="pointerdown"){hasPointerDownOutsideRef.current=true;}}var target=event.target;var targetIsTrigger=(_b=context.triggerRef.current)==null?void 0:_b.contains(target);if(targetIsTrigger)event.preventDefault();if(event.detail.originalEvent.type==="focusin"&&hasPointerDownOutsideRef.current){event.preventDefault();}}}));});var PopoverContentImpl=/*#__PURE__*/React.forwardRef(function(props,forwardedRef){var _a=props,__scopePopover=_a.__scopePopover,trapFocus=_a.trapFocus,onOpenAutoFocus=_a.onOpenAutoFocus,onCloseAutoFocus=_a.onCloseAutoFocus,disableOutsidePointerEvents=_a.disableOutsidePointerEvents,onEscapeKeyDown=_a.onEscapeKeyDown,onPointerDownOutside=_a.onPointerDownOutside,onFocusOutside=_a.onFocusOutside,onInteractOutside=_a.onInteractOutside,contentProps=__objRest(_a,["__scopePopover","trapFocus","onOpenAutoFocus","onCloseAutoFocus","disableOutsidePointerEvents","onEscapeKeyDown","onPointerDownOutside","onFocusOutside","onInteractOutside"]);var context=usePopoverContext(CONTENT_NAME,__scopePopover);var popperScope=usePopperScope(__scopePopover);useFocusGuards();return/* @__PURE__ */jsx$1(FocusScope,{asChild:true,loop:true,trapped:trapFocus,onMountAutoFocus:onOpenAutoFocus,onUnmountAutoFocus:onCloseAutoFocus,children:/* @__PURE__ */jsx$1(DismissableLayer,{asChild:true,disableOutsidePointerEvents:disableOutsidePointerEvents,onInteractOutside:onInteractOutside,onEscapeKeyDown:onEscapeKeyDown,onPointerDownOutside:onPointerDownOutside,onFocusOutside:onFocusOutside,onDismiss:function onDismiss(){return context.onOpenChange(false);},children:/* @__PURE__ */jsx$1(Content,__spreadProps(__spreadValues(__spreadValues({"data-state":getState(context.open),role:"dialog",id:context.contentId},popperScope),contentProps),{ref:forwardedRef,style:__spreadValues(__spreadValues({},contentProps.style),{"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"})}))})});});var CLOSE_NAME="PopoverClose";var PopoverClose=/*#__PURE__*/React.forwardRef(function(props,forwardedRef){var _a=props,__scopePopover=_a.__scopePopover,closeProps=__objRest(_a,["__scopePopover"]);var context=usePopoverContext(CLOSE_NAME,__scopePopover);return/* @__PURE__ */jsx$1(Primitive.button,__spreadProps(__spreadValues({type:"button"},closeProps),{ref:forwardedRef,onClick:composeEventHandlers(props.onClick,function(){return context.onOpenChange(false);})}));});PopoverClose.displayName=CLOSE_NAME;var ARROW_NAME="PopoverArrow";var PopoverArrow=/*#__PURE__*/React.forwardRef(function(props,forwardedRef){var _a=props,__scopePopover=_a.__scopePopover,arrowProps=__objRest(_a,["__scopePopover"]);var popperScope=usePopperScope(__scopePopover);return/* @__PURE__ */jsx$1(Arrow,__spreadProps(__spreadValues(__spreadValues({},popperScope),arrowProps),{ref:forwardedRef}));});PopoverArrow.displayName=ARROW_NAME;function getState(open){return open?"open":"closed";}var Root2=Popover2;var Anchor2=PopoverAnchor;var Trigger=PopoverTrigger;var Portal2=PopoverPortal;var Content2=PopoverContent;var lg$7="dateRangePicker-module_lg_Z5cAW";var md$6="dateRangePicker-module_md_U7O4u";var sm$8="dateRangePicker-module_sm_eQU4f";var disabled$9="dateRangePicker-module_disabled_O2wo6";var focused="dateRangePicker-module_focused_ZciL9";var popoverEnter="dateRangePicker-module_popoverEnter_LA-QD";var popoverExit="dateRangePicker-module_popoverExit_7P00p";var nav="dateRangePicker-module_nav_wpLSQ";var months="dateRangePicker-module_months_KJVIG";var month="dateRangePicker-module_month_5xEDo";var weekdays="dateRangePicker-module_weekdays_Ifsr6";var weekday="dateRangePicker-module_weekday_2PP3h";var week="dateRangePicker-module_week_t5X3S";var day="dateRangePicker-module_day_wqJov";var selected="dateRangePicker-module_selected_RUsR-";var styles$A={"date-range-picker":"dateRangePicker-module_date-range-picker_PFF9Q",lg:lg$7,"input-wrapper":"dateRangePicker-module_input-wrapper_hyxTt",md:md$6,sm:sm$8,disabled:disabled$9,focused:focused,"popover-content":"dateRangePicker-module_popover-content_RKQTm",popoverEnter:popoverEnter,popoverExit:popoverExit,nav:nav,months:months,month:month,"month-caption":"dateRangePicker-module_month-caption_SaiMe",weekdays:weekdays,weekday:weekday,week:week,day:day,selected:selected,"range-middle":"dateRangePicker-module_range-middle_xm-3W","range-start":"dateRangePicker-module_range-start_52uOV","range-end":"dateRangePicker-module_range-end_VR3Y-","rdp-slide_in_left":"dateRangePicker-module_rdp-slide_in_left_yJv6o","rdp-slide_in_right":"dateRangePicker-module_rdp-slide_in_right_DtL-m","rdp-slide_out_left":"dateRangePicker-module_rdp-slide_out_left_pmbO5","rdp-slide_out_right":"dateRangePicker-module_rdp-slide_out_right_MDJeD","rdp-fade_in":"dateRangePicker-module_rdp-fade_in_TxHKu","rdp-fade_out":"dateRangePicker-module_rdp-fade_out_-8FsW"};var MAX_SAFE_INTEGER=9007199254740991;var nativeFloor=Math.floor;function baseRepeat$1(string,n){var result="";if(!string||n<1||n>MAX_SAFE_INTEGER){return result;}do{if(n%2){result+=string;}n=nativeFloor(n/2);if(n){string+=string;}}while(n);return result;}var _baseRepeat=baseRepeat$1;var baseSlice=_baseSlice;function castSlice$1(array,start2,end2){var length2=array.length;end2=end2===void 0?length2:end2;return!start2&&end2>=length2?array:baseSlice(array,start2,end2);}var _castSlice=castSlice$1;var rsAstralRange$2="\\ud800-\\udfff",rsComboMarksRange$2="\\u0300-\\u036f",reComboHalfMarksRange$2="\\ufe20-\\ufe2f",rsComboSymbolsRange$2="\\u20d0-\\u20ff",rsComboRange$2=rsComboMarksRange$2+reComboHalfMarksRange$2+rsComboSymbolsRange$2,rsVarRange$2="\\ufe0e\\ufe0f";var rsZWJ$2="\\u200d";var reHasUnicode=RegExp("["+rsZWJ$2+rsAstralRange$2+rsComboRange$2+rsVarRange$2+"]");function hasUnicode$3(string){return reHasUnicode.test(string);}var _hasUnicode=hasUnicode$3;var baseProperty=_baseProperty;var asciiSize$1=baseProperty("length");var _asciiSize=asciiSize$1;var rsAstralRange$1="\\ud800-\\udfff",rsComboMarksRange$1="\\u0300-\\u036f",reComboHalfMarksRange$1="\\ufe20-\\ufe2f",rsComboSymbolsRange$1="\\u20d0-\\u20ff",rsComboRange$1=rsComboMarksRange$1+reComboHalfMarksRange$1+rsComboSymbolsRange$1,rsVarRange$1="\\ufe0e\\ufe0f";var rsAstral$1="["+rsAstralRange$1+"]",rsCombo$1="["+rsComboRange$1+"]",rsFitz$1="\\ud83c[\\udffb-\\udfff]",rsModifier$1="(?:"+rsCombo$1+"|"+rsFitz$1+")",rsNonAstral$1="[^"+rsAstralRange$1+"]",rsRegional$1="(?:\\ud83c[\\udde6-\\uddff]){2}",rsSurrPair$1="[\\ud800-\\udbff][\\udc00-\\udfff]",rsZWJ$1="\\u200d";var reOptMod$1=rsModifier$1+"?",rsOptVar$1="["+rsVarRange$1+"]?",rsOptJoin$1="(?:"+rsZWJ$1+"(?:"+[rsNonAstral$1,rsRegional$1,rsSurrPair$1].join("|")+")"+rsOptVar$1+reOptMod$1+")*",rsSeq$1=rsOptVar$1+reOptMod$1+rsOptJoin$1,rsSymbol$1="(?:"+[rsNonAstral$1+rsCombo$1+"?",rsCombo$1,rsRegional$1,rsSurrPair$1,rsAstral$1].join("|")+")";var reUnicode$1=RegExp(rsFitz$1+"(?="+rsFitz$1+")|"+rsSymbol$1+rsSeq$1,"g");function unicodeSize$1(string){var result=reUnicode$1.lastIndex=0;while(reUnicode$1.test(string)){++result;}return result;}var _unicodeSize=unicodeSize$1;var asciiSize=_asciiSize,hasUnicode$2=_hasUnicode,unicodeSize=_unicodeSize;function stringSize$3(string){return hasUnicode$2(string)?unicodeSize(string):asciiSize(string);}var _stringSize=stringSize$3;function asciiToArray$1(string){return string.split("");}var _asciiToArray=asciiToArray$1;var rsAstralRange="\\ud800-\\udfff",rsComboMarksRange="\\u0300-\\u036f",reComboHalfMarksRange="\\ufe20-\\ufe2f",rsComboSymbolsRange="\\u20d0-\\u20ff",rsComboRange=rsComboMarksRange+reComboHalfMarksRange+rsComboSymbolsRange,rsVarRange="\\ufe0e\\ufe0f";var rsAstral="["+rsAstralRange+"]",rsCombo="["+rsComboRange+"]",rsFitz="\\ud83c[\\udffb-\\udfff]",rsModifier="(?:"+rsCombo+"|"+rsFitz+")",rsNonAstral="[^"+rsAstralRange+"]",rsRegional="(?:\\ud83c[\\udde6-\\uddff]){2}",rsSurrPair="[\\ud800-\\udbff][\\udc00-\\udfff]",rsZWJ="\\u200d";var reOptMod=rsModifier+"?",rsOptVar="["+rsVarRange+"]?",rsOptJoin="(?:"+rsZWJ+"(?:"+[rsNonAstral,rsRegional,rsSurrPair].join("|")+")"+rsOptVar+reOptMod+")*",rsSeq=rsOptVar+reOptMod+rsOptJoin,rsSymbol="(?:"+[rsNonAstral+rsCombo+"?",rsCombo,rsRegional,rsSurrPair,rsAstral].join("|")+")";var reUnicode=RegExp(rsFitz+"(?="+rsFitz+")|"+rsSymbol+rsSeq,"g");function unicodeToArray$1(string){return string.match(reUnicode)||[];}var _unicodeToArray=unicodeToArray$1;var asciiToArray=_asciiToArray,hasUnicode$1=_hasUnicode,unicodeToArray=_unicodeToArray;function stringToArray$1(string){return hasUnicode$1(string)?unicodeToArray(string):asciiToArray(string);}var _stringToArray=stringToArray$1;var baseRepeat=_baseRepeat,baseToString=_baseToString,castSlice=_castSlice,hasUnicode=_hasUnicode,stringSize$2=_stringSize,stringToArray=_stringToArray;var nativeCeil=Math.ceil;function createPadding$1(length2,chars2){chars2=chars2===void 0?" ":baseToString(chars2);var charsLength=chars2.length;if(charsLength<2){return charsLength?baseRepeat(chars2,length2):chars2;}var result=baseRepeat(chars2,nativeCeil(length2/stringSize$2(chars2)));return hasUnicode(chars2)?castSlice(stringToArray(result),0,length2).join(""):result.slice(0,length2);}var _createPadding=createPadding$1;var createPadding=_createPadding,stringSize$1=_stringSize,toInteger$1=toInteger_1,toString$1=toString_1;function padStart(string,length2,chars2){string=toString$1(string);length2=toInteger$1(length2);var strLength=length2?stringSize$1(string):0;return length2&&strLength<length2?createPadding(length2-strLength,chars2)+string:string;}var padStart_1=padStart;var padStart$1=/* @__PURE__ */getDefaultExportFromCjs(padStart_1);function arrayReduce$1(array,iteratee,accumulator,initAccum){var index2=-1,length2=array==null?0:array.length;if(initAccum&&length2){accumulator=array[++index2];}while(++index2<length2){accumulator=iteratee(accumulator,array[index2],index2,array);}return accumulator;}var _arrayReduce=arrayReduce$1;function baseReduce$1(collection,iteratee,accumulator,initAccum,eachFunc){eachFunc(collection,function(value,index2,collection2){accumulator=initAccum?(initAccum=false,value):iteratee(accumulator,value,index2,collection2);});return accumulator;}var _baseReduce=baseReduce$1;var arrayReduce=_arrayReduce,baseEach=_baseEach,baseIteratee$2=_baseIteratee,baseReduce=_baseReduce,isArray$1=isArray_1;function reduce(collection,iteratee,accumulator){var func=isArray$1(collection)?arrayReduce:baseReduce,initAccum=arguments.length<3;return func(collection,baseIteratee$2(iteratee),accumulator,initAccum,baseEach);}var reduce_1=reduce;var reduce$1=/* @__PURE__ */getDefaultExportFromCjs(reduce_1);var toString=toString_1;function replace$1(){var args=arguments,string=toString(args[0]);return args.length<3?string:string.replace(args[1],args[2]);}var replace_1=replace$1;var replace$2=/* @__PURE__ */getDefaultExportFromCjs(replace_1);var formatDate=function formatDate2(date,format2){var _pad=function _pad2(n){return padStart$1(String(n),2,"0");};var dateMap={YYYY:String(date.getFullYear()),MM:_pad(date.getMonth()+1),DD:_pad(date.getDate()),HH:_pad(date.getHours()),mm:_pad(date.getMinutes()),ss:_pad(date.getSeconds())};return reduce$1(dateMap,function(acc,value,token2){return replace$2(acc,token2,value);},format2);};var formatRangeLimits=function formatRangeLimits2(range){if(!range)return void 0;var from2=new Date(range.from);from2.setHours(0,0,0);var to=new Date(range.to);to.setHours(23,59,59);return{from:from2,to:to};};dayjs.extend(customParseFormat);var fromInputValue=function fromInputValue2(inputValue){if(!inputValue)return void 0;if(_typeof$1(inputValue)==="object"&&"from"in inputValue&&"to"in inputValue){var rangeValue=inputValue;return{from:convertToDate2(rangeValue.from),to:convertToDate2(rangeValue.to)};}if(typeof inputValue==="string"&&inputValue.includes(" - ")){var _inputValue$split=inputValue.split(" - "),_inputValue$split2=_slicedToArray$1(_inputValue$split,2),fromStr=_inputValue$split2[0],toStr=_inputValue$split2[1];return{from:convertToDate2(fromStr.trim()),to:convertToDate2(toStr.trim())};}return void 0;};var getDisplayRange=function getDisplayRange2(range){var format2=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"DD/MM/YYYY";if(!(range!==null&&range!==void 0&&range.from))return"";var fromFormatted=formatDate(range.from,format2);var toFormatted=range.to?formatDate(range.to,format2):"";if(range.from&&range.to){return"".concat(fromFormatted," - ").concat(toFormatted);}return fromFormatted;};var convertToDate2=function convertToDate3(val){if(!val)return void 0;if(val instanceof Date){return val;}if(typeof val==="string"){var parsed=dayjs(val);return parsed.isValid()?parsed.toDate():void 0;}if(typeof val==="number"){return dayjs(val).toDate();}return void 0;};var getDisabledDays=function getDisabledDays2(disabled2,minDate,maxDate){if(disabled2)return true;var min2=convertToDate2(minDate);var max2=convertToDate2(maxDate);if(min2&&max2)return[{before:min2},{after:max2}];if(min2)return{before:min2};if(max2)return{after:max2};return void 0;};var _excluded$J=["meta","name","value","disabled","required","placeholder","size","noErrors","label","format","isValid","onChange","input","minDate","maxDate"],_excluded2$a=["label","rightAdornment","value"];var DateRangePickerInput=function DateRangePickerInput2(props){var _input$value;var meta=props.meta,name2=props.name,_props$value=props.value,value=_props$value===void 0?null:_props$value,_props$disabled=props.disabled,disabled2=_props$disabled===void 0?false:_props$disabled;props.required;var placeholder=props.placeholder,_props$size=props.size,size2=_props$size===void 0?"md":_props$size,_props$noErrors=props.noErrors,noErrors=_props$noErrors===void 0?false:_props$noErrors,label2=props.label,_props$format=props.format,format2=_props$format===void 0?"DD/MM/YYYY":_props$format,isValid2=props.isValid,onChange2=props.onChange,input2=props.input,minDate=props.minDate,maxDate=props.maxDate,otherProps=_objectWithoutProperties$1(props,_excluded$J);var currentValue=(_input$value=input2===null||input2===void 0?void 0:input2.value)!==null&&_input$value!==void 0?_input$value:value;var dateLocale=getActiveDateLocale();var validationProps={meta:meta,value:currentValue,isValid:isValid2,required:props.required};var validated=formValidation(validationProps);var _useReduxFormField=useReduxFormField({input:input2,onChange:onChange2?function(range){var syntheticEvent={target:{value:formatRangeLimits(range),name:name2}};onChange2(syntheticEvent);}:void 0}),fieldHandleChange=_useReduxFormField.handleChange,handleBlur=_useReduxFormField.handleBlur;var handleSelect=function handleSelect2(range){fieldHandleChange(range);if(range!==null&&range!==void 0&&range.from&&range!==null&&range!==void 0&&range.to&&(range===null||range===void 0?void 0:range.from)!==(range===null||range===void 0?void 0:range.to)){setIsOpen(false);}};var handleClear=function handleClear2(){fieldHandleChange(void 0);};var selectedRange=fromInputValue(currentValue);var displayValue=getDisplayRange(selectedRange,format2);var _useState=useState(false),_useState2=_slicedToArray$1(_useState,2),isOpen=_useState2[0],setIsOpen=_useState2[1];var getInitialMonth2=function getInitialMonth3(){return(selectedRange===null||selectedRange===void 0?void 0:selectedRange.from)||(selectedRange===null||selectedRange===void 0?void 0:selectedRange.to)||/* @__PURE__ */new Date();};return/* @__PURE__ */jsxs("div",{className:clsx(styles$A["date-range-picker"],styles$A[size2],_defineProperty$2(_defineProperty$2(_defineProperty$2(_defineProperty$2({},errorStyles["validation-wrapper"],validated),errorStyles[validated],validated),errorStyles["disabled"],disabled2),errorStyles["focused"],isOpen)),children:[/* @__PURE__ */jsxs(Root2,{open:isOpen&&!disabled2,onOpenChange:setIsOpen,children:[/* @__PURE__ */jsx$1(Anchor2,{asChild:true,children:/* @__PURE__ */jsxs("div",{className:styles$A["input-wrapper"],children:[/* @__PURE__ */jsx$1(Trigger,{asChild:true,children:/* @__PURE__ */jsx$1("input",_objectSpread2$1({type:"text",role:"combobox","aria-label":label2||placeholder||format2,name:name2,value:displayValue,placeholder:placeholder||format2,readOnly:true,onBlur:handleBlur},otherProps))}),/* @__PURE__ */jsx$1(ActionComponent,{onOpen:function onOpen(){return setIsOpen(!isOpen);},showClearIcon:!!displayValue,onClear:handleClear})]})}),/* @__PURE__ */jsx$1(Portal2,{children:/* @__PURE__ */jsx$1(Content2,{className:styles$A["popover-content"],sideOffset:4,align:"start",side:"bottom",avoidCollisions:true,collisionPadding:8,children:/* @__PURE__ */jsx$1(DayPicker,{mode:"range",locale:dateLocale.dateFns,selected:selectedRange,onSelect:handleSelect,numberOfMonths:2,defaultMonth:getInitialMonth2(),disabled:getDisabledDays(disabled2,minDate,maxDate),className:styles$A["day-picker"],animate:true,classNames:{months:styles$A["months"],month:styles$A["month"],month_caption:styles$A["month-caption"],nav:styles$A["nav"],weekdays:styles$A["weekdays"],weekday:styles$A["weekday"],week:styles$A["week"],day:styles$A["day"],selected:styles$A["selected"],range_start:styles$A["range-start"],range_middle:styles$A["range-middle"],range_end:styles$A["range-end"],disabled:styles$A["disabled"]},formatters:{formatWeekdayName:formatWeekdayInitial}})})})]}),!noErrors&&validated&&/* @__PURE__ */jsx$1(ErrorMessage,{validationProps:validationProps})]});};var DateRangePicker=function DateRangePicker2(_ref3){var label2=_ref3.label,rightAdornment=_ref3.rightAdornment,value=_ref3.value,props=_objectWithoutProperties$1(_ref3,_excluded2$a);return/* @__PURE__ */jsx$1(FormField,_objectSpread2$1({type:"dateRange",label:label2,rightAdornment:rightAdornment,value:value},props));};var _excluded$I=["label","rightAdornment","children"];var inputByType=function inputByType2(type){var inputs={password:PasswordInput,text:TextInput,number:TextInput,date:DatePickerInput,dateRange:DateRangePickerInput};return!!type?inputs[type]:TextInput;};var FormField=function FormField2(_ref3){var label2=_ref3.label,rightAdornment=_ref3.rightAdornment,children=_ref3.children,props=_objectWithoutProperties$1(_ref3,_excluded$I);var InputComponent=inputByType(props.type);return/* @__PURE__ */jsxs("div",{className:styles$F["form-field"],children:[label2&&/* @__PURE__ */jsx$1("label",{htmlFor:props.name,children:label2}),/* @__PURE__ */jsxs("div",{className:"".concat(styles$F["input-container"]),children:[/* @__PURE__ */jsx$1(InputComponent,_objectSpread2$1(_objectSpread2$1({},props),{},{children:children})),!!rightAdornment&&/* @__PURE__ */jsx$1("div",{className:"".concat(styles$F["right-modifier"]),children:rightAdornment})]})]});};var _buildSingleToggleItem=function _buildSingleToggleItem2(_ref3){var id=_ref3.id,name2=_ref3.name,label2=_ref3.label,checked=_ref3.checked,disabled2=_ref3.disabled;return{id:"".concat(id||name2,"-single"),name:name2,label:label2,checked:checked,disabled:disabled2};};var _getBooleanValueFromInputEvent=function _getBooleanValueFromInputEvent2(event){return event.target.checked;};var _resolveCheckedValue=function _resolveCheckedValue2(_ref22){var input2=_ref22.input,inputName=_ref22.inputName,checked=_ref22.checked;if(input2&&inputName){return typeof input2.value==="boolean"?input2.value:get$3(input2.value,inputName);}return checked;};var title$7="checkboxInput-module_title_cvp-g";var disabled$8="checkboxInput-module_disabled_3EFy5";var lg$6="checkboxInput-module_lg_VoVop";var md$5="checkboxInput-module_md_Nh-Gg";var sm$7="checkboxInput-module_sm_965vX";var styles$z={"checkbox-input-container":"checkboxInput-module_checkbox-input-container_prYRe",title:title$7,"checkbox-input-items":"checkboxInput-module_checkbox-input-items_AMkaS",disabled:disabled$8,lg:lg$6,md:md$5,sm:sm$7};var _excluded$H=["title","name","type","items","onChange","size","input","meta","isValid","noErrors"],_excluded2$9=["id","name","label","disabled","checked"];var CheckboxInputGroupBase=function CheckboxInputGroupBase2(_ref3){var _input$value;var title2=_ref3.title,name2=_ref3.name,_ref$type=_ref3.type,type=_ref$type===void 0?"checkbox":_ref$type,items=_ref3.items,onChange2=_ref3.onChange,_ref$size=_ref3.size,size2=_ref$size===void 0?"lg":_ref$size,input2=_ref3.input,meta=_ref3.meta,isValid2=_ref3.isValid,_ref$noErrors=_ref3.noErrors,noErrors=_ref$noErrors===void 0?false:_ref$noErrors,props=_objectWithoutProperties$1(_ref3,_excluded$H);var _useReduxFormField=useReduxFormField({input:input2,onChange:onChange2,transformValue:_getBooleanValueFromInputEvent}),handleChange=_useReduxFormField.handleChange,handleBlur=_useReduxFormField.handleBlur;var validationProps={meta:meta,value:(_input$value=input2===null||input2===void 0?void 0:input2.value)!==null&&_input$value!==void 0?_input$value:null,isValid:isValid2,required:props.required};var validated=formValidation(validationProps);return/* @__PURE__ */jsxs("div",{className:clsx(styles$z["checkbox-input-container"],_defineProperty$2(_defineProperty$2({},errorStyles[validated],validated),errorStyles["validation-wrapper"],validated)),children:[title2&&/* @__PURE__ */jsxs("label",{className:styles$z["title"],children:[" ",title2," "]}),/* @__PURE__ */jsx$1("div",{className:"".concat(styles$z["checkbox-input-items"]," ").concat(styles$z[size2]),children:map$2(items,function(_ref22){var id=_ref22.id,itemName=_ref22.name,label2=_ref22.label,disabled2=_ref22.disabled,checked=_ref22.checked,itemProps=_objectWithoutProperties$1(_ref22,_excluded2$9);var inputName=itemName||name2;var inputId=id||inputName;var checkedValue=_resolveCheckedValue({input:input2,inputName:inputName,checked:checked});return/* @__PURE__ */jsxs("label",{htmlFor:inputId,className:"".concat(disabled2?styles$z["disabled"]:""),children:[/* @__PURE__ */jsx$1("input",_objectSpread2$1(_objectSpread2$1(_objectSpread2$1({},props),itemProps),{},{type:type,id:inputId,name:inputName,onBlur:handleBlur,disabled:disabled2,checked:checkedValue,onChange:handleChange})),/* @__PURE__ */jsxs("span",{children:[" ",label2," "]})]},inputId);})}),!noErrors&&validated&&/* @__PURE__ */jsx$1(ErrorMessage,{validationProps:validationProps})]});};var CheckboxInputGroup=withDebugHandlers(CheckboxInputGroupBase,"CheckboxInputGroup");var _excluded$G=["id","name","checked","onChange","label","title","disabled","size","input","type"];var CheckboxInputBase=function CheckboxInputBase2(_ref3){var _input$name;var id=_ref3.id,name2=_ref3.name,checked=_ref3.checked,onChange2=_ref3.onChange,label2=_ref3.label,title2=_ref3.title,_ref$disabled=_ref3.disabled,disabled2=_ref$disabled===void 0?false:_ref$disabled,_ref$size=_ref3.size,size2=_ref$size===void 0?"lg":_ref$size,input2=_ref3.input,_ref$type=_ref3.type,type=_ref$type===void 0?"checkbox":_ref$type,props=_objectWithoutProperties$1(_ref3,_excluded$G);var item2=_buildSingleToggleItem({id:id,name:name2,label:label2,checked:checked,disabled:disabled2});return/* @__PURE__ */jsx$1(CheckboxInputGroup,_objectSpread2$1(_objectSpread2$1({},props),{},{type:type,size:size2,input:input2,title:title2,items:[item2],onChange:onChange2,name:(_input$name=input2===null||input2===void 0?void 0:input2.name)!==null&&_input$name!==void 0?_input$name:name2}));};var CheckboxInput=withDebugHandlers(CheckboxInputBase,"CheckboxInput");var baseKeys$1=_baseKeys,getTag$1=_getTag,isArguments=isArguments_1,isArray=isArray_1,isArrayLike$2=isArrayLike_1,isBuffer=isBufferExports,isPrototype=_isPrototype,isTypedArray=isTypedArray_1;var mapTag$1="[object Map]",setTag$1="[object Set]";var objectProto=Object.prototype;var hasOwnProperty$1=objectProto.hasOwnProperty;function isEmpty(value){if(value==null){return true;}if(isArrayLike$2(value)&&(isArray(value)||typeof value=="string"||typeof value.splice=="function"||isBuffer(value)||isTypedArray(value)||isArguments(value))){return!value.length;}var tag=getTag$1(value);if(tag==mapTag$1||tag==setTag$1){return!value.size;}if(isPrototype(value)){return!baseKeys$1(value).length;}for(var key in value){if(hasOwnProperty$1.call(value,key)){return false;}}return true;}var isEmpty_1=isEmpty;var isEmpty$1=/* @__PURE__ */getDefaultExportFromCjs(isEmpty_1);var _excluded$F=["defaultOptions","cacheOptions","loadOptions","options","isLoading","onInputChange","filterOption"];function useAsync(_ref3){var _ref$defaultOptions=_ref3.defaultOptions,propsDefaultOptions=_ref$defaultOptions===void 0?false:_ref$defaultOptions,_ref$cacheOptions=_ref3.cacheOptions,cacheOptions=_ref$cacheOptions===void 0?false:_ref$cacheOptions,propsLoadOptions=_ref3.loadOptions;_ref3.options;var _ref$isLoading=_ref3.isLoading,propsIsLoading=_ref$isLoading===void 0?false:_ref$isLoading,propsOnInputChange=_ref3.onInputChange,_ref$filterOption=_ref3.filterOption,filterOption=_ref$filterOption===void 0?null:_ref$filterOption,restSelectProps=_objectWithoutProperties(_ref3,_excluded$F);var propsInputValue=restSelectProps.inputValue;var lastRequest=useRef(void 0);var mounted=useRef(false);var _useState=useState(Array.isArray(propsDefaultOptions)?propsDefaultOptions:void 0),_useState2=_slicedToArray(_useState,2),defaultOptions2=_useState2[0],setDefaultOptions=_useState2[1];var _useState3=useState(typeof propsInputValue!=="undefined"?propsInputValue:""),_useState4=_slicedToArray(_useState3,2),stateInputValue=_useState4[0],setStateInputValue=_useState4[1];var _useState5=useState(propsDefaultOptions===true),_useState6=_slicedToArray(_useState5,2),isLoading=_useState6[0],setIsLoading=_useState6[1];var _useState7=useState(void 0),_useState8=_slicedToArray(_useState7,2),loadedInputValue=_useState8[0],setLoadedInputValue=_useState8[1];var _useState9=useState([]),_useState10=_slicedToArray(_useState9,2),loadedOptions=_useState10[0],setLoadedOptions=_useState10[1];var _useState11=useState(false),_useState12=_slicedToArray(_useState11,2),passEmptyOptions=_useState12[0],setPassEmptyOptions=_useState12[1];var _useState13=useState({}),_useState14=_slicedToArray(_useState13,2),optionsCache=_useState14[0],setOptionsCache=_useState14[1];var _useState15=useState(void 0),_useState16=_slicedToArray(_useState15,2),prevDefaultOptions=_useState16[0],setPrevDefaultOptions=_useState16[1];var _useState17=useState(void 0),_useState18=_slicedToArray(_useState17,2),prevCacheOptions=_useState18[0],setPrevCacheOptions=_useState18[1];if(cacheOptions!==prevCacheOptions){setOptionsCache({});setPrevCacheOptions(cacheOptions);}if(propsDefaultOptions!==prevDefaultOptions){setDefaultOptions(Array.isArray(propsDefaultOptions)?propsDefaultOptions:void 0);setPrevDefaultOptions(propsDefaultOptions);}useEffect(function(){mounted.current=true;return function(){mounted.current=false;};},[]);var loadOptions=useCallback(function(inputValue,callback){if(!propsLoadOptions)return callback();var loader2=propsLoadOptions(inputValue,callback);if(loader2&&typeof loader2.then==="function"){loader2.then(callback,function(){return callback();});}},[propsLoadOptions]);useEffect(function(){if(propsDefaultOptions===true){loadOptions(stateInputValue,function(options2){if(!mounted.current)return;setDefaultOptions(options2||[]);setIsLoading(!!lastRequest.current);});}},[]);var onInputChange2=useCallback(function(newValue,actionMeta){var inputValue=handleInputChange(newValue,actionMeta,propsOnInputChange);if(!inputValue){lastRequest.current=void 0;setStateInputValue("");setLoadedInputValue("");setLoadedOptions([]);setIsLoading(false);setPassEmptyOptions(false);return;}if(cacheOptions&&optionsCache[inputValue]){setStateInputValue(inputValue);setLoadedInputValue(inputValue);setLoadedOptions(optionsCache[inputValue]);setIsLoading(false);setPassEmptyOptions(false);}else{var request=lastRequest.current={};setStateInputValue(inputValue);setIsLoading(true);setPassEmptyOptions(!loadedInputValue);loadOptions(inputValue,function(options2){if(!mounted)return;if(request!==lastRequest.current)return;lastRequest.current=void 0;setIsLoading(false);setLoadedInputValue(inputValue);setLoadedOptions(options2||[]);setPassEmptyOptions(false);setOptionsCache(options2?_objectSpread2(_objectSpread2({},optionsCache),{},_defineProperty({},inputValue,options2)):optionsCache);});}},[cacheOptions,loadOptions,loadedInputValue,optionsCache,propsOnInputChange]);var options=passEmptyOptions?[]:stateInputValue&&loadedInputValue?loadedOptions:defaultOptions2||[];return _objectSpread2(_objectSpread2({},restSelectProps),{},{options:options,isLoading:isLoading||propsIsLoading,onInputChange:onInputChange2,filterOption:filterOption});}var AsyncSelect=/* @__PURE__ */forwardRef(function(props,ref){var stateManagedProps=useAsync(props);var selectProps=useStateManager(stateManagedProps);return/* @__PURE__ */React.createElement(Select$2,_extends$1({ref:ref},selectProps));});var AsyncSelect$1=AsyncSelect;var loader="spinner-module_loader_UIupC";var styles$y={loader:loader};var _excluded$E=["size"];var Spinner=function Spinner2(_ref3){var _ref$size=_ref3.size,size2=_ref$size===void 0?"lg":_ref$size,props=_objectWithoutProperties$1(_ref3,_excluded$E);return/* @__PURE__ */jsx$1(CircularProgress,_objectSpread2$1({size:_size(size2),className:styles$y.loader,"aria-label":locale("a11y.loading")},props));};var _size=function _size2(size2){return{sm:18,lg:60}[size2];};var _excluded$D=["name","label","placeholder","noOptionsMessage","options","size","isSearchable","isClearable","clearOnSelect","required","disabled","rightModifier","isOptionDisabled","onChange","onInputChange","input","isLoading","formatOption","loadOptions","cacheOptions","defaultOptions","value","tooltipProps","meta","isValid","noErrors"];var _convertValueToOption=function _convertValueToOption2(value){if(!value)return null;return{value:value,label:value};};var SearcherBase=function SearcherBase2(props){var _input$value;var name2=props.name,label2=props.label,_props$placeholder=props.placeholder,placeholder=_props$placeholder===void 0?locale("selectPlaceholder"):_props$placeholder,_props$noOptionsMessa=props.noOptionsMessage,_noOptionsMessage=_props$noOptionsMessa===void 0?locale("noFoundOptions"):_props$noOptionsMessa,options=props.options,_props$size=props.size,size2=_props$size===void 0?"md":_props$size,_props$isSearchable=props.isSearchable,isSearchable=_props$isSearchable===void 0?true:_props$isSearchable,_props$isClearable=props.isClearable,isClearable=_props$isClearable===void 0?true:_props$isClearable,_props$clearOnSelect=props.clearOnSelect,clearOnSelect=_props$clearOnSelect===void 0?false:_props$clearOnSelect,required=props.required,disabled2=props.disabled,rightModifier=props.rightModifier,isOptionDisabled3=props.isOptionDisabled,onChange2=props.onChange,onInputChange2=props.onInputChange,input2=props.input,_props$isLoading=props.isLoading,isLoading=_props$isLoading===void 0?false:_props$isLoading,formatOption=props.formatOption,loadOptions=props.loadOptions,_props$cacheOptions=props.cacheOptions,cacheOptions=_props$cacheOptions===void 0?true:_props$cacheOptions,_props$defaultOptions=props.defaultOptions,defaultOptions2=_props$defaultOptions===void 0?true:_props$defaultOptions,value=props.value,tooltipProps=props.tooltipProps,meta=props.meta,isValid2=props.isValid,_props$noErrors=props.noErrors,noErrors=_props$noErrors===void 0?false:_props$noErrors,otherProps=_objectWithoutProperties$1(props,_excluded$D);var accessibleName=label2||placeholder||locale("a11y.search");var _splitDataProps=splitDataProps(otherProps),_splitDataProps2=_slicedToArray$1(_splitDataProps,2),dataProps=_splitDataProps2[0],selectOtherProps=_splitDataProps2[1];var currentValue=(_input$value=input2===null||input2===void 0?void 0:input2.value)!==null&&_input$value!==void 0?_input$value:value;var validationProps={meta:meta,value:currentValue!==null&&currentValue!==void 0?currentValue:null,isValid:isValid2,required:required};var validated=formValidation(validationProps);var _useState=useState(_convertValueToOption(currentValue)),_useState2=_slicedToArray$1(_useState,2),optionSelected=_useState2[0],setOptionSelected=_useState2[1];var _useState3=useState(false),_useState4=_slicedToArray$1(_useState3,2),isMenuOpen=_useState4[0],setIsMenuOpen=_useState4[1];var _useState5=useState(0),_useState6=_slicedToArray$1(_useState5,2),menuKey=_useState6[0],setMenuKey=_useState6[1];useEffect(function(){setOptionSelected(_convertValueToOption(currentValue));},[currentValue]);useEffect(function(){if(isMenuOpen&&options&&!isEmpty$1(options)){setMenuKey(function(prev2){return prev2+1;});}},[options,isMenuOpen]);var handleInputChange2=useCallback(function(value2){var fakeEvent={target:{name:name2,value:value2}};onInputChange2===null||onInputChange2===void 0||onInputChange2(fakeEvent);setIsMenuOpen(true);},[name2,onInputChange2]);var handleSelect=useCallback(function(selected2){var fakeEvent={target:{name:name2,value:selected2===null||selected2===void 0?void 0:selected2.value}};setOptionSelected(selected2);if(input2){input2.onChange(selected2===null||selected2===void 0?void 0:selected2.value);}else{onChange2===null||onChange2===void 0||onChange2(fakeEvent);}if(clearOnSelect&&selected2){setOptionSelected(null);}setIsMenuOpen(false);},[name2,input2,onChange2,clearOnSelect]);var handleBlur=useCallback(function(){if(input2){input2.onBlur();}setIsMenuOpen(false);},[input2]);var handleClear=useCallback(function(){setOptionSelected(null);if(input2){input2.onChange(null);}else{var fakeEvent={target:{name:name2,value:null}};onChange2===null||onChange2===void 0||onChange2(fakeEvent);}},[input2,name2,onChange2]);var OptionWithFormat=useCallback(function(optionProps){return/* @__PURE__ */jsx$1(Option$1,_objectSpread2$1(_objectSpread2$1({},optionProps),{},{formatOption:formatOption,tooltipProps:tooltipProps}));},[formatOption,tooltipProps]);var SingleValueWithFormat=useCallback(function(singleValueProps){return/* @__PURE__ */jsx$1(SingleValue2,_objectSpread2$1({},singleValueProps));},[]);var _renderSelectComponent=useCallback(function(){var commonProps=_objectSpread2$1(_objectSpread2$1({},selectOtherProps),{},{name:name2,inputId:name2,"aria-label":accessibleName,placeholder:placeholder,classNamePrefix:"producteca-select-field",isDisabled:disabled2,isClearable:isClearable,isOptionDisabled:isOptionDisabled3,isSearchable:isSearchable,isLoading:isLoading,loadingMessage:function loadingMessage2(){return isLoading?/* @__PURE__ */jsx$1(Spinner,{size:"sm"}):_noOptionsMessage;},noOptionsMessage:function noOptionsMessage2(){return isLoading?/* @__PURE__ */jsx$1(Spinner,{size:"sm"}):_noOptionsMessage;},onInputChange:handleInputChange2,onChange:handleSelect,onBlur:handleBlur,value:optionSelected,components:{Option:OptionWithFormat,SingleValue:SingleValueWithFormat},menuPortalTarget:document.body,menuIsOpen:isMenuOpen,onMenuOpen:function onMenuOpen(){return setIsMenuOpen(true);},onMenuClose:function onMenuClose(){return setIsMenuOpen(false);}});if(loadOptions){return/* @__PURE__ */jsx$1(AsyncSelect$1,_objectSpread2$1(_objectSpread2$1({},commonProps),{},{loadOptions:loadOptions,cacheOptions:cacheOptions,defaultOptions:defaultOptions2}),menuKey);}return/* @__PURE__ */jsx$1(StateManagedSelect$1,_objectSpread2$1(_objectSpread2$1({},commonProps),{},{options:options}),menuKey);},[otherProps,menuKey,name2,accessibleName,placeholder,disabled2,isClearable,isOptionDisabled3,isSearchable,isLoading,_noOptionsMessage,handleInputChange2,handleSelect,handleBlur,optionSelected,OptionWithFormat,SingleValueWithFormat,isMenuOpen,loadOptions,cacheOptions,defaultOptions2,options]);return/* @__PURE__ */jsxs("div",_objectSpread2$1(_objectSpread2$1({className:clsx(styles$G["producteca-select-field-container"],_defineProperty$2({},errorStyles[validated],validated))},dataProps),{},{children:[label2&&/* @__PURE__ */jsx$1("label",{htmlFor:name2,children:label2}),/* @__PURE__ */jsxs("div",{className:clsx(_defineProperty$2({},errorStyles["validation-wrapper"],validated)),children:[/* @__PURE__ */jsxs("div",{className:clsx(styles$G[size2],styles$G["producteca-select-field-body"],_defineProperty$2(_defineProperty$2(_defineProperty$2(_defineProperty$2({},styles$G["producteca-select-field--is-searchable"],isSearchable),styles$G["producteca-select-field--is-clearable"],isClearable),styles$G["producteca-select-field--with-modifier"],rightModifier),styles$G["producteca-select-field--on-error"],validated)),children:[/* @__PURE__ */jsxs("div",{className:styles$G["searcher-body"],children:[isSearchable&&/* @__PURE__ */jsx$1(SearchComponent,{}),_renderSelectComponent(),/* @__PURE__ */jsx$1(ClearComponent,{optionSelected:optionSelected,isClearable:isClearable,handleChange:handleClear})]}),!!rightModifier&&rightModifier]}),!noErrors&&validated&&/* @__PURE__ */jsx$1(ErrorMessage,{validationProps:validationProps})]})]}));};var Searcher=withDebugHandlers(SearcherBase,"Searcher");var title$6="switchInput-module_title_lBK2p";var disabled$7="switchInput-module_disabled_yz9dR";var lg$5="switchInput-module_lg_WMIDO";var md$4="switchInput-module_md_683sQ";var sm$6="switchInput-module_sm_sh92j";var styles$x={"switch-input-container":"switchInput-module_switch-input-container_t9Kpp",title:title$6,"switch-input-items":"switchInput-module_switch-input-items_P3RMy","switch-wrapper":"switchInput-module_switch-wrapper_cZvDV","switch-input":"switchInput-module_switch-input_e9PWi","switch-slider":"switchInput-module_switch-slider_ICfGn","switch-label":"switchInput-module_switch-label_Nj-Hh",disabled:disabled$7,lg:lg$5,md:md$4,sm:sm$6};var _excluded$C=["title","name","items","onChange","size","input","meta"],_excluded2$8=["id","name","label","disabled","checked","value"];var SwitchInputGroupBase=function SwitchInputGroupBase2(_ref3){var title2=_ref3.title,name2=_ref3.name,items=_ref3.items,onChange2=_ref3.onChange,_ref$size=_ref3.size,size2=_ref$size===void 0?"md":_ref$size,input2=_ref3.input;_ref3.meta;var props=_objectWithoutProperties$1(_ref3,_excluded$C);var _useReduxFormField=useReduxFormField({input:input2,onChange:onChange2,transformValue:_getBooleanValueFromInputEvent}),handleChange=_useReduxFormField.handleChange,handleBlur=_useReduxFormField.handleBlur;return/* @__PURE__ */jsxs("div",{className:styles$x["switch-input-container"],"data-testid":"switch-input-container",children:[title2&&/* @__PURE__ */jsxs("label",{className:styles$x["title"],"data-testid":"switch-title",children:[" ",title2," "]}),/* @__PURE__ */jsx$1("div",{className:"".concat(styles$x["switch-input-items"]," ").concat(styles$x[size2]),"data-testid":"switch-input-items",children:map$2(items,function(_ref22){var id=_ref22.id,itemName=_ref22.name,label2=_ref22.label,disabled2=_ref22.disabled,checked=_ref22.checked;_ref22.value;var itemProps=_objectWithoutProperties$1(_ref22,_excluded2$8);var inputName=itemName||name2;var inputId=id||inputName;var checkedValue=_resolveCheckedValue({input:input2,inputName:inputName,checked:checked});return/* @__PURE__ */jsxs("label",{htmlFor:inputId,className:"".concat(disabled2?styles$x["disabled"]:""),"data-testid":"switch-label-".concat(inputId),children:[/* @__PURE__ */jsxs("div",{className:styles$x["switch-wrapper"],children:[/* @__PURE__ */jsx$1("input",_objectSpread2$1(_objectSpread2$1(_objectSpread2$1({},props),itemProps),{},{id:inputId,type:"checkbox",name:inputName,disabled:disabled2,onBlur:handleBlur,checked:checkedValue,onChange:handleChange,className:styles$x["switch-input"],"data-testid":"switch-input-".concat(inputId),"aria-label":label2?void 0:inputName})),/* @__PURE__ */jsx$1("span",{className:styles$x["switch-slider"]})]}),/* @__PURE__ */jsxs("span",{className:styles$x["switch-label"],children:[" ",label2," "]})]},inputId);})})]});};var SwitchInputGroup=withDebugHandlers(SwitchInputGroupBase,"SwitchInputGroup");var _excluded$B=["id","name","checked","onChange","label","title","disabled","size","input"];var SwitchInputBase=function SwitchInputBase2(_ref3){var _input$name;var id=_ref3.id,name2=_ref3.name,checked=_ref3.checked,onChange2=_ref3.onChange,label2=_ref3.label,title2=_ref3.title,_ref$disabled=_ref3.disabled,disabled2=_ref$disabled===void 0?false:_ref$disabled,_ref$size=_ref3.size,size2=_ref$size===void 0?"sm":_ref$size,input2=_ref3.input,props=_objectWithoutProperties$1(_ref3,_excluded$B);var item2=_buildSingleToggleItem({id:id,name:name2,label:label2,checked:checked,disabled:disabled2});return/* @__PURE__ */jsx$1(SwitchInputGroup,_objectSpread2$1(_objectSpread2$1({},props),{},{size:size2,title:title2,input:input2,items:[item2],onChange:onChange2,name:(_input$name=input2===null||input2===void 0?void 0:input2.name)!==null&&_input$name!==void 0?_input$name:name2}));};var SwitchInput=withDebugHandlers(SwitchInputBase,"SwitchInput");var styles$w={"async-content-container":"asyncContent-module_async-content-container_UEl81","state-container":"asyncContent-module_state-container_FgE4I","loading-container":"asyncContent-module_loading-container_nXfG5","error-container":"asyncContent-module_error-container_7TLNR","empty-container":"asyncContent-module_empty-container_exoXG","success-container":"asyncContent-module_success-container_jEkhm","content-container":"asyncContent-module_content-container_Lj05u"};var LoadingView=/* @__PURE__ */memo(function(){return/* @__PURE__ */jsx$1("div",{className:clsx(styles$w["state-container"],styles$w["loading-container"]),children:/* @__PURE__ */jsx$1(Spinner,{size:"lg"})});});LoadingView.displayName="LoadingView";var styles$v={"empty-state-container":"emptyState-module_empty-state-container_azCks","link-container":"emptyState-module_link-container_kXroF","empty-state-text":"emptyState-module_empty-state-text_W1HX5"};var link="link-module_link_Nwimt";var sm$5="link-module_sm_Roymo";var md$3="link-module_md_MM1DP";var lg$4="link-module_lg_Yh-xD";var none="link-module_none_S8BaL";var underline="link-module_underline_PqOji";var disabled$6="link-module_disabled_BgNPl";var styles$u={link:link,sm:sm$5,md:md$3,lg:lg$4,none:none,underline:underline,"tooltip-link":"link-module_tooltip-link_DdWtn","weight-100":"link-module_weight-100_eDdnp","weight-200":"link-module_weight-200_8oRhr","weight-300":"link-module_weight-300_8vVYQ","weight-400":"link-module_weight-400_vjPHp","weight-500":"link-module_weight-500_SKGTU","weight-600":"link-module_weight-600_-KWak","weight-700":"link-module_weight-700_tQ2N-","weight-800":"link-module_weight-800_enJ5o","weight-900":"link-module_weight-900_Yxl7i",disabled:disabled$6};var _excluded$A=["size","decoration","variant","weight","disabled","href","onClick","children"];var ACTIVATION_KEYS=["Enter"," "];var LinkBase=/* @__PURE__ */React__default.memo(/* @__PURE__ */React__default.forwardRef(function(_ref3,ref){var _ref$size=_ref3.size,size2=_ref$size===void 0?"md":_ref$size,_ref$decoration=_ref3.decoration,decoration=_ref$decoration===void 0?"none":_ref$decoration,_ref$variant=_ref3.variant,variant=_ref$variant===void 0?"default":_ref$variant,weight=_ref3.weight,_ref$disabled=_ref3.disabled,disabled2=_ref$disabled===void 0?false:_ref$disabled,href=_ref3.href,onClick=_ref3.onClick,children=_ref3.children,props=_objectWithoutProperties$1(_ref3,_excluded$A);var isAction=!href;var _handleClick=function _handleClick2(event){if(disabled2){event.preventDefault();return;}var isCtrlClick=event.ctrlKey||event.metaKey;var isMiddleClick=event.button===1;var isTargetBlank=props.target==="_blank";if(isCtrlClick||isMiddleClick||isTargetBlank){return;}if(onClick){event.preventDefault();onClick(event);}};var _handleKeyDown=function _handleKeyDown2(event){if(!includes$1(ACTIVATION_KEYS,event.key)){return;}event.preventDefault();event.currentTarget.click();};return/* @__PURE__ */jsx$1("a",_objectSpread2$1(_objectSpread2$1({ref:ref,href:href,role:isAction?"button":void 0,tabIndex:isAction&&!disabled2?0:void 0,onClick:_handleClick,onKeyDown:isAction?_handleKeyDown:void 0,"aria-disabled":disabled2,className:clsx(styles$u.link,styles$u[size2],styles$u[decoration],_defineProperty$2(_defineProperty$2(_defineProperty$2({},styles$u["tooltip-link"],variant==="tooltip-link"),styles$u["weight-".concat(weight)],!!weight),styles$u.disabled,disabled2))},props),{},{children:children}));}));LinkBase.displayName="Link";var Link=withDebugHandlers(LinkBase,"Link");var _excluded$z=["onActionClick","icon","actionText","text"];var DefaultIcon$2=/* @__PURE__ */jsx$1(EmptyStateIcon,{});var EmptyStateBase=function EmptyStateBase2(_ref3){var onActionClick=_ref3.onActionClick,_ref$icon=_ref3.icon,icon2=_ref$icon===void 0?DefaultIcon$2:_ref$icon,_ref$actionText=_ref3.actionText,actionText=_ref$actionText===void 0?locale("reloadPage"):_ref$actionText,_ref$text=_ref3.text,text2=_ref$text===void 0?locale("noResultsFound"):_ref$text,props=_objectWithoutProperties$1(_ref3,_excluded$z);return/* @__PURE__ */jsxs("div",_objectSpread2$1(_objectSpread2$1({className:styles$v["empty-state-container"]},props),{},{children:[icon2,/* @__PURE__ */jsxs("div",{className:styles$v["link-container"],children:[/* @__PURE__ */jsx$1("span",{className:styles$v["empty-state-text"],children:text2}),onActionClick&&/* @__PURE__ */jsx$1(Link,{href:"",onClick:onActionClick,children:actionText})]})]}));};var EmptyState=withDebugHandlers(EmptyStateBase,"EmptyState");var ErrorView=/* @__PURE__ */memo(function(_ref3){var text2=_ref3.text,actionText=_ref3.actionText,onClick=_ref3.onClick;return/* @__PURE__ */jsx$1("div",{className:clsx(styles$w["state-container"],styles$w["error-container"]),children:/* @__PURE__ */jsx$1(EmptyState,{text:text2,icon:/* @__PURE__ */jsx$1(ErrorStateIcon,{}),actionText:actionText,onActionClick:onClick})});});ErrorView.displayName="ErrorView";var EmptyView=/* @__PURE__ */memo(function(_ref3){var text2=_ref3.text,actionText=_ref3.actionText,onClick=_ref3.onClick;return/* @__PURE__ */jsx$1("div",{className:clsx(styles$w["state-container"],styles$w["empty-container"]),children:/* @__PURE__ */jsx$1(EmptyState,{text:text2,actionText:actionText,onActionClick:onClick})});});EmptyView.displayName="EmptyView";var NewView=/* @__PURE__ */memo(function(_ref3){var text2=_ref3.text,actionText=_ref3.actionText,onClick=_ref3.onClick;return/* @__PURE__ */jsx$1("div",{className:clsx(styles$w["state-container"],styles$w["empty-container"]),children:/* @__PURE__ */jsx$1(EmptyState,{icon:/* @__PURE__ */jsx$1(NewStateIcon,{}),text:text2,actionText:actionText,onActionClick:onClick})});});NewView.displayName="NewView";var SuccessView=/* @__PURE__ */memo(function(_ref3){var text2=_ref3.text,actionText=_ref3.actionText,onClick=_ref3.onClick;return/* @__PURE__ */jsx$1("div",{className:clsx(styles$w["state-container"],styles$w["success-container"]),children:/* @__PURE__ */jsx$1(EmptyState,{icon:/* @__PURE__ */jsx$1(SuccessStateIcon,{}),text:text2,actionText:actionText,onActionClick:onClick})});});SuccessView.displayName="SuccessView";var _excluded$y=["error","empty","success","children","className","isLoading"];var _resolveStatus=function _resolveStatus2(_ref3){var isLoading=_ref3.isLoading,error2=_ref3.error,empty=_ref3.empty,success2=_ref3.success;if(isLoading)return"loading";if(error2!==null&&error2!==void 0&&error2.value)return"error";if(success2!==null&&success2!==void 0&&success2.value)return"success";if(empty!==null&&empty!==void 0&&empty.items&&empty.items.length===0)return empty.creation?"creation":"empty";return"content";};var _getStatusComponent=function _getStatusComponent2(_ref22){var _error$text,_error$actionText,_success$text;var status=_ref22.status,children=_ref22.children,error2=_ref22.error,empty=_ref22.empty,success2=_ref22.success;var statusComponents={loading:/* @__PURE__ */jsx$1(LoadingView,{}),error:/* @__PURE__ */jsx$1(ErrorView,{onClick:error2===null||error2===void 0?void 0:error2.onClick,text:(_error$text=error2===null||error2===void 0?void 0:error2.text)!==null&&_error$text!==void 0?_error$text:locale("asyncContent.errorOccurred"),actionText:(_error$actionText=error2===null||error2===void 0?void 0:error2.actionText)!==null&&_error$actionText!==void 0?_error$actionText:locale("asyncContent.retry")}),empty:/* @__PURE__ */jsx$1(EmptyView,{text:empty===null||empty===void 0?void 0:empty.text,onClick:empty===null||empty===void 0?void 0:empty.onClick,actionText:empty===null||empty===void 0?void 0:empty.actionText}),creation:/* @__PURE__ */jsx$1(NewView,{text:empty===null||empty===void 0?void 0:empty.text,onClick:empty===null||empty===void 0?void 0:empty.onClick,actionText:empty===null||empty===void 0?void 0:empty.actionText}),success:/* @__PURE__ */jsx$1(SuccessView,{onClick:success2===null||success2===void 0?void 0:success2.onClick,actionText:success2===null||success2===void 0?void 0:success2.actionText,text:(_success$text=success2===null||success2===void 0?void 0:success2.text)!==null&&_success$text!==void 0?_success$text:locale("asyncContent.successCompleted")}),content:/* @__PURE__ */jsx$1("div",{className:styles$w["content-container"],children:children})};return statusComponents[status];};var AsyncContentBase=/* @__PURE__ */memo(function(_ref3){var _empty$text;var error2=_ref3.error,empty=_ref3.empty,success2=_ref3.success,children=_ref3.children,className=_ref3.className,isLoading=_ref3.isLoading,props=_objectWithoutProperties$1(_ref3,_excluded$y);var status=_resolveStatus({isLoading:isLoading,error:error2,empty:empty,success:success2});var _resolvedEmpty=empty?_objectSpread2$1(_objectSpread2$1({},empty),{},{text:(_empty$text=empty.text)!==null&&_empty$text!==void 0?_empty$text:locale("asyncContent.noResultsFound")}):void 0;return/* @__PURE__ */jsx$1("div",_objectSpread2$1(_objectSpread2$1({className:clsx(styles$w["async-content-container"],className)},props),{},{children:_getStatusComponent({status:status,children:children,error:error2,empty:_resolvedEmpty,success:success2})}));});AsyncContentBase.displayName="AsyncContent";var AsyncContent=withDebugHandlers(AsyncContentBase,"AsyncContent");var fullPage="actionBar-module_fullPage_A4wiw";var modal$2="actionBar-module_modal_jZfAJ";var page="actionBar-module_page_Oq8Jb";var styles$t={"action-bar":"actionBar-module_action-bar_Y-sjl",fullPage:fullPage,modal:modal$2,page:page};var _excluded$x=["onCancel","label"],_excluded2$7=["onPrevious","label"],_excluded3$2=["onSave","label"];var ActionBarBase=function ActionBarBase2(_ref3){var _ref$variant=_ref3.variant,variant=_ref$variant===void 0?"page":_ref$variant,saveProps=_ref3.saveProps,cancelProps=_ref3.cancelProps,previousProps=_ref3.previousProps;var _ref22=cancelProps||{},onCancel=_ref22.onCancel,_ref2$label=_ref22.label,cancelText=_ref2$label===void 0?locale("cancel"):_ref2$label,cancelOtherProps=_objectWithoutProperties$1(_ref22,_excluded$x);var _ref32=previousProps||{},onPrevious=_ref32.onPrevious,_ref3$label=_ref32.label,previousText=_ref3$label===void 0?locale("previous"):_ref3$label,previousOtherProps=_objectWithoutProperties$1(_ref32,_excluded2$7);var _ref4=saveProps||{},onSave=_ref4.onSave,_ref4$label=_ref4.label,saveText=_ref4$label===void 0?locale("save"):_ref4$label,saveOtherProps=_objectWithoutProperties$1(_ref4,_excluded3$2);return/* @__PURE__ */jsxs("div",{className:clsx(styles$t["action-bar"],styles$t[variant]),children:[!!onCancel&&/* @__PURE__ */jsx$1(Button$2,_objectSpread2$1({size:"md",variant:"link",label:cancelText,onClick:onCancel},cancelOtherProps)),!!onPrevious&&/* @__PURE__ */jsx$1(Button$2,_objectSpread2$1({outline:true,label:previousText,onClick:onPrevious},previousOtherProps)),!!onSave&&/* @__PURE__ */jsx$1(Button$2,_objectSpread2$1({label:saveText,onClick:onSave},saveOtherProps))]});};var ActionBar=withDebugHandlers(ActionBarBase,"ActionBar");var Check=createSvgIcon(/* @__PURE__ */jsx$1("path",{d:"M9 16.17 4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z"}),"Check");var ContentCopy=createSvgIcon(/* @__PURE__ */jsx$1("path",{d:"M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2m0 16H8V7h11z"}),"ContentCopy");var _excluded$w=["onClick","copyText","copiedText","textToCopy","resetTime"];var CopyButtonBase=function CopyButtonBase2(_ref3){var _onClick=_ref3.onClick,_ref$copyText=_ref3.copyText,copyText=_ref$copyText===void 0?locale("copyButton.copy"):_ref$copyText,_ref$copiedText=_ref3.copiedText,copiedText=_ref$copiedText===void 0?locale("copyButton.copied"):_ref$copiedText,textToCopy=_ref3.textToCopy,_ref$resetTime=_ref3.resetTime,resetTime=_ref$resetTime===void 0?2e3:_ref$resetTime,props=_objectWithoutProperties$1(_ref3,_excluded$w);var _useState=useState(false),_useState2=_slicedToArray$1(_useState,2),copied=_useState2[0],setCopied=_useState2[1];var _useState3=useState(false),_useState4=_slicedToArray$1(_useState3,2),isAnimating=_useState4[0],setIsAnimating=_useState4[1];useEffect(function(){if(copied){setIsAnimating(true);var timer=setTimeout(function(){setIsAnimating(false);},resetTime/2);return function(){return clearTimeout(timer);};}},[copied]);var defaultCopyFunction=function defaultCopyFunction2(){if(textToCopy){setCopied(true);navigator.clipboard.writeText(textToCopy).then(function(){setTimeout(function(){return setCopied(false);},resetTime);}).catch(function(){setCopied(false);});}};return/* @__PURE__ */jsx$1("div",{onClick:function onClick(){return _onClick?_onClick():defaultCopyFunction();},children:/* @__PURE__ */jsx$1(Button$2,_objectSpread2$1({className:"copy-btn ".concat(copied?"copied":""," ").concat(isAnimating?"animating":""),outline:true,label:copied?copiedText:copyText,leftAdornment:/* @__PURE__ */jsx$1(Icons,{copied:copied})},props))});};var Icons=function Icons2(_ref22){var copied=_ref22.copied;return/* @__PURE__ */jsxs("div",{className:"copy-btn-icons",children:[/* @__PURE__ */jsx$1("div",{className:"copy-icon ".concat(copied?"hidden":""),children:/* @__PURE__ */jsx$1(ContentCopy,{"data-testid":"ContentCopyIcon"})}),/* @__PURE__ */jsx$1("div",{className:"check-icon ".concat(!copied?"hidden":""),children:/* @__PURE__ */jsx$1(Check,{})})]});};var CopyButton=withDebugHandlers(CopyButtonBase,"CopyButton");var dense="headerSection-module_dense_f1FWn";var content="headerSection-module_content_5y2PB";var title$5="headerSection-module_title_cabYm";var styles$s={"header-section-container":"headerSection-module_header-section-container_M-ZSv",dense:dense,"header-section":"headerSection-module_header-section_UIh2F",content:content,title:title$5};var _excluded$v=["breadcrumb","image","dense","title","subtitle","link","menuAction"];var HeaderSection=function HeaderSection2(_ref3){var breadcrumb2=_ref3.breadcrumb,image2=_ref3.image,_ref$dense=_ref3.dense,dense2=_ref$dense===void 0?false:_ref$dense,title2=_ref3.title,subtitle2=_ref3.subtitle,link2=_ref3.link,menuAction=_ref3.menuAction,props=_objectWithoutProperties$1(_ref3,_excluded$v);return/* @__PURE__ */jsxs("div",_objectSpread2$1(_objectSpread2$1({className:clsx(styles$s["header-section-container"],_defineProperty$2({},styles$s["dense"],dense2))},props),{},{children:[!!breadcrumb2&&breadcrumb2,/* @__PURE__ */jsxs("div",{className:styles$s["header-section"],children:[!!image2&&image2,/* @__PURE__ */jsxs("div",{className:styles$s.content,children:[title2&&/* @__PURE__ */jsx$1("h3",{className:styles$s.title,children:title2}),!!subtitle2&&subtitle2,!!link2&&link2]}),!!menuAction&&menuAction]})]}));};var action$1="linkWithIcon-module_action_3K4he";var styles$r={action:action$1};var _excluded$u=["text","icon","onClick","className","size","otherProps"];var SIZE_TO_ICON={sm:"8",md:"12",lg:"12"};var transformSize=function transformSize2(size2){return SIZE_TO_ICON[size2!==null&&size2!==void 0?size2:"md"];};var LinkWithIcon=function LinkWithIcon2(_ref3){var text2=_ref3.text,icon2=_ref3.icon,onClick=_ref3.onClick,className=_ref3.className,_ref$size=_ref3.size,size2=_ref$size===void 0?"md":_ref$size,_ref$otherProps=_ref3.otherProps,otherProps=_ref$otherProps===void 0?{}:_ref$otherProps,props=_objectWithoutProperties$1(_ref3,_excluded$u);var _splitDataProps=splitDataProps(otherProps),_splitDataProps2=_slicedToArray$1(_splitDataProps,2),iconProps=_splitDataProps2[1];return/* @__PURE__ */jsxs("div",{className:clsx(styles$r.action,className),onClick:onClick,children:[icon2&&/* @__PURE__ */jsx$1(CustomIcon,_objectSpread2$1(_objectSpread2$1({color:getColor("primary","500")},iconProps),{},{size:transformSize(size2),children:icon2})),/* @__PURE__ */jsx$1(Button$2,_objectSpread2$1(_objectSpread2$1({variant:"link",label:text2,size:size2},otherProps),props))]});};var sm$4="iconWithIdentifier-module_sm_9KqJO";var md$2="iconWithIdentifier-module_md_BUC1r";var icon$2="iconWithIdentifier-module_icon_y8sd3";var divider="iconWithIdentifier-module_divider_fCBSV";var identifier$1="iconWithIdentifier-module_identifier_kWrOU";var styles$q={"icon-with-identifier":"iconWithIdentifier-module_icon-with-identifier_3-SZE",sm:sm$4,md:md$2,icon:icon$2,divider:divider,identifier:identifier$1};var _excluded$t=["text","icon","color","size","showDivider"];var IconWithIdentifier=function IconWithIdentifier2(_ref3){var text2=_ref3.text,icon2=_ref3.icon,color2=_ref3.color,_ref$size=_ref3.size,size2=_ref$size===void 0?"md":_ref$size,_ref$showDivider=_ref3.showDivider,showDivider=_ref$showDivider===void 0?true:_ref$showDivider,props=_objectWithoutProperties$1(_ref3,_excluded$t);return/* @__PURE__ */jsxs("div",_objectSpread2$1(_objectSpread2$1({className:clsx(styles$q["icon-with-identifier"],styles$q[size2])},props),{},{children:[!!icon2&&icon2,showDivider&&/* @__PURE__ */jsx$1("div",{className:styles$q.divider}),!!text2&&/* @__PURE__ */jsx$1("span",{className:styles$q.identifier,style:{color:color2},children:text2})]}));};var styles$p={"conditional-operator":"conditionalOperator-module_conditional-operator_k-Czb","conditional-operator-segment":"conditionalOperator-module_conditional-operator-segment_9RYOJ"};var VALUE_OR="or";var VALUE_AND="and";var _excluded$s=["name","value","onChange","options"];var _getDefaultOptions=function _getDefaultOptions2(){return[{value:VALUE_OR,label:locale("conditionalOperator.or")},{value:VALUE_AND,label:locale("conditionalOperator.and")}];};var ConditionalOperatorBase=function ConditionalOperatorBase2(_ref3){var _ref$name=_ref3.name,name2=_ref$name===void 0?"conditionalOperator":_ref$name,value=_ref3.value,onChange2=_ref3.onChange,optionsProp=_ref3.options,props=_objectWithoutProperties$1(_ref3,_excluded$s);var options=useMemo(function(){return optionsProp!==null&&optionsProp!==void 0?optionsProp:_getDefaultOptions();},[optionsProp]);var _options=_slicedToArray$1(options,2),leftOption=_options[0],rightOption=_options[1];var selectedValue=value!==null&&value!==void 0?value:leftOption.value;var isLeftSelected=selectedValue===leftOption.value;var _handleChange=useCallback(function(){if(onChange2){var nextValue=isLeftSelected?rightOption.value:leftOption.value;var event={target:{name:name2,value:nextValue}};onChange2(event);}},[isLeftSelected,leftOption.value,rightOption.value,name2,onChange2]);return/* @__PURE__ */jsxs("div",_objectSpread2$1(_objectSpread2$1({role:"button","data-or":isLeftSelected,onClick:_handleChange,className:styles$p["conditional-operator"]},props),{},{children:[/* @__PURE__ */jsx$1("div",{className:styles$p["conditional-operator-segment"],children:leftOption.label}),/* @__PURE__ */jsx$1("div",{className:styles$p["conditional-operator-segment"],children:rightOption.label})]}));};ConditionalOperatorBase.displayName="ConditionalOperator";ConditionalOperatorBase.VALUE_OR=VALUE_OR;ConditionalOperatorBase.VALUE_AND=VALUE_AND;var ConditionalOperator=Object.assign(withDebugHandlers(ConditionalOperatorBase,"ConditionalOperator"),{VALUE_OR:VALUE_OR,VALUE_AND:VALUE_AND});var AutoStoriesIcon=createSvgIcon(/* @__PURE__ */jsx$1("path",{d:"m19 1-5 5v11l5-4.5zM1 6v14.65c0 .25.25.5.5.5.1 0 .15-.05.25-.05C3.1 20.45 5.05 20 6.5 20c1.95 0 4.05.4 5.5 1.5V6c-1.45-1.1-3.55-1.5-5.5-1.5S2.45 4.9 1 6m22 13.5V6c-.6-.45-1.25-.75-2-1v13.5c-1.1-.35-2.3-.5-3.5-.5-1.7 0-4.15.65-5.5 1.5v2c1.35-.85 3.8-1.5 5.5-1.5 1.65 0 3.35.3 4.75 1.05.1.05.15.05.25.05.25 0 .5-.25.5-.5z"}),"AutoStories");var styles$o={entering:{transform:"none"},entered:{transform:"none"},exiting:{transform:"scale(0)"},exited:{transform:"scale(0)"}};var hiddenStyles$1={transform:"scale(0)",visibility:"hidden"};var Zoom=/* @__PURE__ */React.forwardRef(function Zoom2(props,ref){var theme=useTheme();var defaultTimeout={enter:theme.transitions.duration.enteringScreen,exit:theme.transitions.duration.leavingScreen};var _a=props,addEndListener=_a.addEndListener,_a$appear3=_a.appear,appear=_a$appear3===void 0?true:_a$appear3,_children7=_a.children,easing2=_a.easing,inProp=_a.in,onEnter=_a.onEnter,onEntered=_a.onEntered,onEntering=_a.onEntering,onExit=_a.onExit,onExited=_a.onExited,onExiting=_a.onExiting,style2=_a.style,_a$timeout3=_a.timeout,timeout2=_a$timeout3===void 0?defaultTimeout:_a$timeout3,other=__objRest(_a,["addEndListener","appear","children","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout"]);var nodeRef=React.useRef(null);var handleRef=useForkRef(nodeRef,getReactElementRef(_children7),ref);var handleEntering=normalizedTransitionCallback(nodeRef,onEntering);var handleEnter=normalizedTransitionCallback(nodeRef,function(node2,isAppearing){reflow(node2);var transitionProps=getTransitionProps({style:style2,timeout:timeout2,easing:easing2},{mode:"enter"});node2.style.transition=theme.transitions.create("transform",transitionProps);if(onEnter){onEnter(node2,isAppearing);}});var handleEntered=normalizedTransitionCallback(nodeRef,onEntered);var handleExiting=normalizedTransitionCallback(nodeRef,onExiting);var handleExit=normalizedTransitionCallback(nodeRef,function(node2){var transitionProps=getTransitionProps({style:style2,timeout:timeout2,easing:easing2},{mode:"exit"});node2.style.transition=theme.transitions.create("transform",transitionProps);if(onExit){onExit(node2);}});var handleExited=normalizedTransitionCallback(nodeRef,function(node2){node2.style.transition="";if(onExited){onExited(node2);}});var handleAddEndListener=function handleAddEndListener(next2){if(addEndListener){addEndListener(nodeRef.current,next2);}};return/* @__PURE__ */jsx$1(Transition,__spreadProps(__spreadValues({appear:appear,in:inProp,nodeRef:nodeRef,onEnter:handleEnter,onEntered:handleEntered,onEntering:handleEntering,onExit:handleExit,onExited:handleExited,onExiting:handleExiting,addEndListener:handleAddEndListener,timeout:timeout2},other),{children:function children(state,_b){var _c=_b,ownerState=_c.ownerState,restChildProps=__objRest(_c,["ownerState"]);var childStyle=getTransitionChildStyle(state,inProp,styles$o,hiddenStyles$1,style2,_children7.props.style);return/* @__PURE__ */React.cloneElement(_children7,__spreadValues({style:childStyle,ref:handleRef},restChildProps));}}));});process.env.NODE_ENV!=="production"?Zoom.propTypes={// ┌────────────────────────────── Warning ──────────────────────────────┐
6889
6889
  // │ These PropTypes are generated from the TypeScript type definitions. │
6890
6890
  // │ To update them, edit the d.ts file and run `pnpm proptypes`. │
6891
6891
  // └─────────────────────────────────────────────────────────────────────┘