andoncloud-dashboard-toolkit 1.5.10 → 1.5.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/helpers/sdk.d.ts +1 -0
- package/dist/helpers/shifts.test.d.ts +1 -0
- package/dist/helpers/time.d.ts +2 -0
- package/dist/helpers/time.test.d.ts +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/locales/index.d.ts +2 -0
- package/dist/version.d.ts +1 -1
- package/package.json +1 -1
package/dist/helpers/sdk.d.ts
CHANGED
|
@@ -10,6 +10,7 @@ export declare const getGraphqlSdk: (url: string, fetch: typeof global.fetch) =>
|
|
|
10
10
|
createWidget(variables: import("../graphql-request").CreateWidgetMutationVariables, requestHeaders?: (import("graphql-request/dist/types.dom").Headers | string[][] | Record<string, string>) | undefined, signal?: RequestInit["signal"]): Promise<import("../graphql-request").CreateWidgetMutation>;
|
|
11
11
|
pauseOrderExecution(variables: import("../graphql-request").PauseOrderExecutionMutationVariables, requestHeaders?: (import("graphql-request/dist/types.dom").Headers | string[][] | Record<string, string>) | undefined, signal?: RequestInit["signal"]): Promise<import("../graphql-request").PauseOrderExecutionMutation>;
|
|
12
12
|
removeDashboard(variables: import("../graphql-request").RemoveDashboardMutationVariables, requestHeaders?: (import("graphql-request/dist/types.dom").Headers | string[][] | Record<string, string>) | undefined, signal?: RequestInit["signal"]): Promise<import("../graphql-request").RemoveDashboardMutation>;
|
|
13
|
+
removeStaffingPlan(variables: import("../graphql-request").RemoveStaffingPlanMutationVariables, requestHeaders?: (import("graphql-request/dist/types.dom").Headers | string[][] | Record<string, string>) | undefined, signal?: RequestInit["signal"]): Promise<import("../graphql-request").RemoveStaffingPlanMutation>;
|
|
13
14
|
removeUserPresence(variables: import("../graphql-request").RemoveUserPresenceMutationVariables, requestHeaders?: (import("graphql-request/dist/types.dom").Headers | string[][] | Record<string, string>) | undefined, signal?: RequestInit["signal"]): Promise<import("../graphql-request").RemoveUserPresenceMutation>;
|
|
14
15
|
removeWidget(variables: import("../graphql-request").RemoveWidgetMutationVariables, requestHeaders?: (import("graphql-request/dist/types.dom").Headers | string[][] | Record<string, string>) | undefined, signal?: RequestInit["signal"]): Promise<import("../graphql-request").RemoveWidgetMutation>;
|
|
15
16
|
removeWorkplaceUsersPresences(variables: import("../graphql-request").RemoveWorkplaceUsersPresencesMutationVariables, requestHeaders?: (import("graphql-request/dist/types.dom").Headers | string[][] | Record<string, string>) | undefined, signal?: RequestInit["signal"]): Promise<import("../graphql-request").RemoveWorkplaceUsersPresencesMutation>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/dist/index.d.ts
CHANGED
|
@@ -3,6 +3,7 @@ export * from './graphql-request';
|
|
|
3
3
|
export * from './graphql-ws';
|
|
4
4
|
export * from './helpers/sdk';
|
|
5
5
|
export * from './helpers/shifts';
|
|
6
|
+
export * from './helpers/time';
|
|
6
7
|
export * from './types';
|
|
7
8
|
export { default as GraphqlWsClient } from './utils/graphql-ws-client';
|
|
8
9
|
export { default as useGqlClients } from './hooks/useGqlClients';
|
package/dist/index.js
CHANGED
|
@@ -12,5 +12,5 @@ return A.createElement("div",null,u)}var c=a[0]?this.getOptionValue(a[0]):"";/*#
|
|
|
12
12
|
return A.createElement("input",{name:o,type:"hidden",value:c})}}},{key:"renderLiveRegion",value:function(){var e=this.commonProps,n=this.state,t=n.ariaSelection,r=n.focusedOption,i=n.focusedValue,o=n.isFocused,a=n.selectValue,s=this.getFocusableOptions();/*#__PURE__*/
|
|
13
13
|
return A.createElement(sa,Di({},e,{id:this.getElementId("live-region"),ariaSelection:t,focusedOption:r,focusedValue:i,isFocused:o,selectValue:a,focusableOptions:s,isAppleDevice:this.state.isAppleDevice}))}},{key:"render",value:function(){var e=this.getComponents(),n=e.Control,t=e.IndicatorsContainer,r=e.SelectContainer,i=e.ValueContainer,o=this.props,a=o.className,s=o.id,u=o.isDisabled,c=o.menuIsOpen,l=this.state.isFocused,d=this.commonProps=this.getCommonProps();/*#__PURE__*/
|
|
14
14
|
return A.createElement(r,Di({},d,{className:a,innerProps:{id:s,onKeyDown:this.onKeyDown},isDisabled:u,isFocused:l}),this.renderLiveRegion(),/*#__PURE__*/A.createElement(n,Di({},d,{innerRef:this.getControlRef,innerProps:{onMouseDown:this.onControlMouseDown,onTouchEnd:this.onControlTouchEnd},isDisabled:u,isFocused:l,menuIsOpen:c}),/*#__PURE__*/A.createElement(i,Di({},d,{isDisabled:u}),this.renderPlaceholderOrValue(),this.renderInput()),/*#__PURE__*/A.createElement(t,Di({},d,{isDisabled:u}),this.renderClearIndicator(),this.renderLoadingIndicator(),this.renderIndicatorSeparator(),this.renderDropdownIndicator())),this.renderMenu(),this.renderFormField())}}],[{key:"getDerivedStateFromProps",value:function(e,n){var t=n.prevProps,r=n.clearFocusValueOnUpdate,i=n.inputIsHiddenAfterUpdate,o=n.ariaSelection,a=n.isFocused,s=n.prevWasFocused,u=n.instancePrefix,c=e.options,l=e.value,d=e.menuIsOpen,p=e.inputValue,f=e.isMulti,m=mo(l),g={};if(t&&(l!==t.value||c!==t.options||d!==t.menuIsOpen||p!==t.inputValue)){var h=d?function(e,n){return La(Fa(e,n))}(e,m):[],b=d?Xa(Fa(e,m),"".concat(u,"-option")):[],v=r?function(e,n){var t=e.focusedValue,r=e.selectValue.indexOf(t);if(r>-1){if(n.indexOf(t)>-1)return t;if(r<n.length)return n[r]}return null}(n,m):null,I=function(e,n){var t=e.focusedOption;return t&&n.indexOf(t)>-1?t:n[0]}(n,h);g={selectValue:m,focusedOption:I,focusedOptionId:Za(b,I),focusableOptionsWithIds:b,focusedValue:v,clearFocusValueOnUpdate:!1}}var y=null!=i&&e!==t?{inputIsHidden:i,inputIsHiddenAfterUpdate:void 0}:{},C=o,x=a&&s;return a&&!x&&(C={value:To(f,m,m[0]||null),options:m,action:"initial-input-focus"},x=!s),"initial-input-focus"===(null==o?void 0:o.action)&&(C=null),Ei(Ei(Ei({},g),y),{},{prevProps:e,ariaSelection:C,prevWasFocused:x})}}]),i}();Qa.defaultProps=Wa;var Ka=/*#__PURE__*/e.forwardRef(function(n,t){var r=function(n){var t=n.defaultInputValue,r=void 0===t?"":t,i=n.defaultMenuIsOpen,o=void 0!==i&&i,a=n.defaultValue,s=void 0===a?null:a,u=n.inputValue,c=n.menuIsOpen,l=n.onChange,d=n.onInputChange,p=n.onMenuClose,f=n.onMenuOpen,m=n.value,g=Oi(n,Ni),h=Si(e.useState(void 0!==u?u:r),2),b=h[0],v=h[1],I=Si(e.useState(void 0!==c?c:o),2),y=I[0],C=I[1],x=Si(e.useState(void 0!==m?m:s),2),A=x[0],w=x[1],E=e.useCallback(function(e,n){"function"==typeof l&&l(e,n),w(e)},[l]),R=e.useCallback(function(e,n){var t;"function"==typeof d&&(t=d(e,n)),v(void 0!==t?t:e)},[d]),T=e.useCallback(function(){"function"==typeof f&&f(),C(!0)},[f]),S=e.useCallback(function(){"function"==typeof p&&p(),C(!1)},[p]),O=void 0!==u?u:b,N=void 0!==c?c:y,D=void 0!==m?m:A;return Ei(Ei({},g),{},{inputValue:O,menuIsOpen:N,onChange:E,onInputChange:R,onMenuClose:S,onMenuOpen:T,value:D})}(n);/*#__PURE__*/
|
|
15
|
-
return A.createElement(Qa,Di({ref:t},r))}),es=Ka;const ns="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement;function ts(e){const n=Object.prototype.toString.call(e);return"[object Window]"===n||"[object global]"===n}function rs(e){return"nodeType"in e}function is(e){var n,t;return e?ts(e)?e:rs(e)&&null!=(n=null==(t=e.ownerDocument)?void 0:t.defaultView)?n:window:window}function os(e){const{Document:n}=is(e);return e instanceof n}function as(e){return!ts(e)&&e instanceof is(e).HTMLElement}function ss(e){return e instanceof is(e).SVGElement}function us(e){return e?ts(e)?e.document:rs(e)?os(e)?e:as(e)||ss(e)?e.ownerDocument:document:document:document}const cs=ns?e.useLayoutEffect:e.useEffect;function ls(n){const t=e.useRef(n);return cs(()=>{t.current=n}),e.useCallback(function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return null==t.current?void 0:t.current(...n)},[])}function ds(n,t){void 0===t&&(t=[n]);const r=e.useRef(n);return cs(()=>{r.current!==n&&(r.current=n)},t),r}function ps(n,t){const r=e.useRef();return e.useMemo(()=>{const e=n(r.current);return r.current=e,e},[...t])}function fs(n){const t=ls(n),r=e.useRef(null),i=e.useCallback(e=>{e!==r.current&&(null==t||t(e,r.current)),r.current=e},[]);return[r,i]}function ms(n){const t=e.useRef();return e.useEffect(()=>{t.current=n},[n]),t.current}let gs={};function hs(n,t){return e.useMemo(()=>{if(t)return t;const e=null==gs[n]?0:gs[n]+1;return gs[n]=e,n+"-"+e},[n,t])}function bs(e){return function(n){for(var t=arguments.length,r=new Array(t>1?t-1:0),i=1;i<t;i++)r[i-1]=arguments[i];return r.reduce((n,t)=>{const r=Object.entries(t);for(const[t,i]of r){const r=n[t];null!=r&&(n[t]=r+e*i)}return n},{...n})}}const vs=/*#__PURE__*/bs(1),Is=/*#__PURE__*/bs(-1);function ys(e){if(!e)return!1;const{KeyboardEvent:n}=is(e.target);return n&&e instanceof n}function Cs(e){if(function(e){if(!e)return!1;const{TouchEvent:n}=is(e.target);return n&&e instanceof n}(e)){if(e.touches&&e.touches.length){const{clientX:n,clientY:t}=e.touches[0];return{x:n,y:t}}if(e.changedTouches&&e.changedTouches.length){const{clientX:n,clientY:t}=e.changedTouches[0];return{x:n,y:t}}}return function(e){return"clientX"in e&&"clientY"in e}(e)?{x:e.clientX,y:e.clientY}:null}const xs=/*#__PURE__*/Object.freeze({Translate:{toString(e){if(!e)return;const{x:n,y:t}=e;return"translate3d("+(n?Math.round(n):0)+"px, "+(t?Math.round(t):0)+"px, 0)"}},Scale:{toString(e){if(!e)return;const{scaleX:n,scaleY:t}=e;return"scaleX("+n+") scaleY("+t+")"}},Transform:{toString(e){if(e)return[xs.Translate.toString(e),xs.Scale.toString(e)].join(" ")}},Transition:{toString(e){let{property:n,duration:t,easing:r}=e;return n+" "+t+"ms "+r}}}),As="a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";function ws(e){return e.matches(As)?e:e.querySelector(As)}const Es={display:"none"};function Rs(e){let{id:n,value:t}=e;return x.default.createElement("div",{id:n,style:Es},t)}function Ts(e){let{id:n,announcement:t,ariaLiveType:r="assertive"}=e;return x.default.createElement("div",{id:n,style:{position:"fixed",top:0,left:0,width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0 0 0 0)",clipPath:"inset(100%)",whiteSpace:"nowrap"},role:"status","aria-live":r,"aria-atomic":!0},t)}const Ss=/*#__PURE__*/e.createContext(null),Os={draggable:"\n To pick up a draggable item, press the space bar.\n While dragging, use the arrow keys to move the item.\n Press space again to drop the item in its new position, or press escape to cancel.\n "},Ns={onDragStart(e){let{active:n}=e;return"Picked up draggable item "+n.id+"."},onDragOver(e){let{active:n,over:t}=e;return t?"Draggable item "+n.id+" was moved over droppable area "+t.id+".":"Draggable item "+n.id+" is no longer over a droppable area."},onDragEnd(e){let{active:n,over:t}=e;return t?"Draggable item "+n.id+" was dropped over droppable area "+t.id:"Draggable item "+n.id+" was dropped."},onDragCancel(e){let{active:n}=e;return"Dragging was cancelled. Draggable item "+n.id+" was dropped."}};function Ds(n){let{announcements:t=Ns,container:r,hiddenTextDescribedById:i,screenReaderInstructions:o=Os}=n;const{announce:a,announcement:s}=function(){const[n,t]=e.useState("");return{announce:e.useCallback(e=>{null!=e&&t(e)},[]),announcement:n}}(),u=hs("DndLiveRegion"),[c,l]=e.useState(!1);if(e.useEffect(()=>{l(!0)},[]),function(n){const t=e.useContext(Ss);e.useEffect(()=>{if(!t)throw new Error("useDndMonitor must be used within a children of <DndContext>");return t(n)},[n,t])}(e.useMemo(()=>({onDragStart(e){let{active:n}=e;a(t.onDragStart({active:n}))},onDragMove(e){let{active:n,over:r}=e;t.onDragMove&&a(t.onDragMove({active:n,over:r}))},onDragOver(e){let{active:n,over:r}=e;a(t.onDragOver({active:n,over:r}))},onDragEnd(e){let{active:n,over:r}=e;a(t.onDragEnd({active:n,over:r}))},onDragCancel(e){let{active:n,over:r}=e;a(t.onDragCancel({active:n,over:r}))}}),[a,t])),!c)return null;const d=x.default.createElement(x.default.Fragment,null,x.default.createElement(Rs,{id:i,value:o.draggable}),x.default.createElement(Ts,{id:u,announcement:s}));return r?m.createPortal(d,r):d}var ks;function Gs(){}!function(e){e.DragStart="dragStart",e.DragMove="dragMove",e.DragEnd="dragEnd",e.DragCancel="dragCancel",e.DragOver="dragOver",e.RegisterDroppable="registerDroppable",e.SetDroppableDisabled="setDroppableDisabled",e.UnregisterDroppable="unregisterDroppable"}(ks||(ks={}));const Bs=/*#__PURE__*/Object.freeze({x:0,y:0});function Ms(e,n){let{data:{value:t}}=e,{data:{value:r}}=n;return r-t}function Ps(e,n){const t=Math.max(n.top,e.top),r=Math.max(n.left,e.left),i=Math.min(n.left+n.width,e.left+e.width),o=Math.min(n.top+n.height,e.top+e.height);if(r<i&&t<o){const a=(i-r)*(o-t);return Number((a/(n.width*n.height+e.width*e.height-a)).toFixed(4))}return 0}const Vs=e=>{let{collisionRect:n,droppableRects:t,droppableContainers:r}=e;const i=[];for(const e of r){const{id:r}=e,o=t.get(r);if(o){const t=Ps(o,n);t>0&&i.push({id:r,data:{droppableContainer:e,value:t}})}}return i.sort(Ms)};function Ws(e,n){return e&&n?{x:e.left-n.left,y:e.top-n.top}:Bs}function Hs(e){return function(n){for(var t=arguments.length,r=new Array(t>1?t-1:0),i=1;i<t;i++)r[i-1]=arguments[i];return r.reduce((n,t)=>({...n,top:n.top+e*t.y,bottom:n.bottom+e*t.y,left:n.left+e*t.x,right:n.right+e*t.x}),{...n})}}const Fs=/*#__PURE__*/Hs(1),Ls={ignoreTransform:!1};function Xs(e,n){void 0===n&&(n=Ls);let t=e.getBoundingClientRect();if(n.ignoreTransform){const{transform:n,transformOrigin:r}=is(e).getComputedStyle(e);n&&(t=function(e,n,t){const r=function(e){if(e.startsWith("matrix3d(")){const n=e.slice(9,-1).split(/, /);return{x:+n[12],y:+n[13],scaleX:+n[0],scaleY:+n[5]}}if(e.startsWith("matrix(")){const n=e.slice(7,-1).split(/, /);return{x:+n[4],y:+n[5],scaleX:+n[0],scaleY:+n[3]}}return null}(n);if(!r)return e;const{scaleX:i,scaleY:o,x:a,y:s}=r,u=e.left-a-(1-i)*parseFloat(t),c=e.top-s-(1-o)*parseFloat(t.slice(t.indexOf(" ")+1)),l=i?e.width/i:e.width,d=o?e.height/o:e.height;return{width:l,height:d,top:c,right:u+l,bottom:c+d,left:u}}(t,n,r))}const{top:r,left:i,width:o,height:a,bottom:s,right:u}=t;return{top:r,left:i,width:o,height:a,bottom:s,right:u}}function Ys(e){return Xs(e,{ignoreTransform:!0})}function Zs(e,n){const t=[];return e?function r(i){if(null!=n&&t.length>=n)return t;if(!i)return t;if(os(i)&&null!=i.scrollingElement&&!t.includes(i.scrollingElement))return t.push(i.scrollingElement),t;if(!as(i)||ss(i))return t;if(t.includes(i))return t;const o=is(e).getComputedStyle(i);return i!==e&&function(e,n){void 0===n&&(n=is(e).getComputedStyle(e));const t=/(auto|scroll|overlay)/;return["overflow","overflowX","overflowY"].some(e=>{const r=n[e];return"string"==typeof r&&t.test(r)})}(i,o)&&t.push(i),function(e,n){return void 0===n&&(n=is(e).getComputedStyle(e)),"fixed"===n.position}(i,o)?t:r(i.parentNode)}(e):t}function js(e){const[n]=Zs(e,1);return null!=n?n:null}function zs(e){return ns&&e?ts(e)?e:rs(e)?os(e)||e===us(e).scrollingElement?window:as(e)?e:null:null:null}function Js(e){return ts(e)?e.scrollX:e.scrollLeft}function _s(e){return ts(e)?e.scrollY:e.scrollTop}function Us(e){return{x:Js(e),y:_s(e)}}var qs;function $s(e){return!(!ns||!e)&&e===document.scrollingElement}function Qs(e){const n={x:0,y:0},t=$s(e)?{height:window.innerHeight,width:window.innerWidth}:{height:e.clientHeight,width:e.clientWidth},r={x:e.scrollWidth-t.width,y:e.scrollHeight-t.height};return{isTop:e.scrollTop<=n.y,isLeft:e.scrollLeft<=n.x,isBottom:e.scrollTop>=r.y,isRight:e.scrollLeft>=r.x,maxScroll:r,minScroll:n}}!function(e){e[e.Forward=1]="Forward",e[e.Backward=-1]="Backward"}(qs||(qs={}));const Ks={x:.2,y:.2};function eu(e,n,t,r,i){let{top:o,left:a,right:s,bottom:u}=t;void 0===r&&(r=10),void 0===i&&(i=Ks);const{isTop:c,isBottom:l,isLeft:d,isRight:p}=Qs(e),f={x:0,y:0},m={x:0,y:0},g=n.height*i.y,h=n.width*i.x;return!c&&o<=n.top+g?(f.y=qs.Backward,m.y=r*Math.abs((n.top+g-o)/g)):!l&&u>=n.bottom-g&&(f.y=qs.Forward,m.y=r*Math.abs((n.bottom-g-u)/g)),!p&&s>=n.right-h?(f.x=qs.Forward,m.x=r*Math.abs((n.right-h-s)/h)):!d&&a<=n.left+h&&(f.x=qs.Backward,m.x=r*Math.abs((n.left+h-a)/h)),{direction:f,speed:m}}function nu(e){if(e===document.scrollingElement){const{innerWidth:e,innerHeight:n}=window;return{top:0,left:0,right:e,bottom:n,width:e,height:n}}const{top:n,left:t,right:r,bottom:i}=e.getBoundingClientRect();return{top:n,left:t,right:r,bottom:i,width:e.clientWidth,height:e.clientHeight}}function tu(e){return e.reduce((e,n)=>vs(e,Us(n)),Bs)}const ru=[["x",["left","right"],function(e){return e.reduce((e,n)=>e+Js(n),0)}],["y",["top","bottom"],function(e){return e.reduce((e,n)=>e+_s(n),0)}]];class iu{constructor(e,n){this.rect=void 0,this.width=void 0,this.height=void 0,this.top=void 0,this.bottom=void 0,this.right=void 0,this.left=void 0;const t=Zs(n),r=tu(t);this.rect={...e},this.width=e.width,this.height=e.height;for(const[e,n,i]of ru)for(const o of n)Object.defineProperty(this,o,{get:()=>{const n=i(t);return this.rect[o]+(r[e]-n)},enumerable:!0});Object.defineProperty(this,"rect",{enumerable:!1})}}class ou{constructor(e){this.target=void 0,this.listeners=[],this.removeAll=()=>{this.listeners.forEach(e=>{var n;return null==(n=this.target)?void 0:n.removeEventListener(...e)})},this.target=e}add(e,n,t){var r;null==(r=this.target)||r.addEventListener(e,n,t),this.listeners.push([e,n,t])}}function au(e,n){const t=Math.abs(e.x),r=Math.abs(e.y);return"number"==typeof n?Math.sqrt(t**2+r**2)>n:"x"in n&&"y"in n?t>n.x&&r>n.y:"x"in n?t>n.x:"y"in n&&r>n.y}var su,uu;function cu(e){e.preventDefault()}function lu(e){e.stopPropagation()}!function(e){e.Click="click",e.DragStart="dragstart",e.Keydown="keydown",e.ContextMenu="contextmenu",e.Resize="resize",e.SelectionChange="selectionchange",e.VisibilityChange="visibilitychange"}(su||(su={})),function(e){e.Space="Space",e.Down="ArrowDown",e.Right="ArrowRight",e.Left="ArrowLeft",e.Up="ArrowUp",e.Esc="Escape",e.Enter="Enter",e.Tab="Tab"}(uu||(uu={}));const du={start:[uu.Space,uu.Enter],cancel:[uu.Esc],end:[uu.Space,uu.Enter,uu.Tab]},pu=(e,n)=>{let{currentCoordinates:t}=n;switch(e.code){case uu.Right:return{...t,x:t.x+25};case uu.Left:return{...t,x:t.x-25};case uu.Down:return{...t,y:t.y+25};case uu.Up:return{...t,y:t.y-25}}};class fu{constructor(e){this.props=void 0,this.autoScrollEnabled=!1,this.referenceCoordinates=void 0,this.listeners=void 0,this.windowListeners=void 0,this.props=e;const{event:{target:n}}=e;this.props=e,this.listeners=new ou(us(n)),this.windowListeners=new ou(is(n)),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleCancel=this.handleCancel.bind(this),this.attach()}attach(){this.handleStart(),this.windowListeners.add(su.Resize,this.handleCancel),this.windowListeners.add(su.VisibilityChange,this.handleCancel),setTimeout(()=>this.listeners.add(su.Keydown,this.handleKeyDown))}handleStart(){const{activeNode:e,onStart:n}=this.props,t=e.node.current;t&&function(e,n){if(void 0===n&&(n=Xs),!e)return;const{top:t,left:r,bottom:i,right:o}=n(e);js(e)&&(i<=0||o<=0||t>=window.innerHeight||r>=window.innerWidth)&&e.scrollIntoView({block:"center",inline:"center"})}(t),n(Bs)}handleKeyDown(e){if(ys(e)){const{active:n,context:t,options:r}=this.props,{keyboardCodes:i=du,coordinateGetter:o=pu,scrollBehavior:a="smooth"}=r,{code:s}=e;if(i.end.includes(s))return void this.handleEnd(e);if(i.cancel.includes(s))return void this.handleCancel(e);const{collisionRect:u}=t.current,c=u?{x:u.left,y:u.top}:Bs;this.referenceCoordinates||(this.referenceCoordinates=c);const l=o(e,{active:n,context:t.current,currentCoordinates:c});if(l){const n=Is(l,c),r={x:0,y:0},{scrollableAncestors:i}=t.current;for(const t of i){const i=e.code,{isTop:o,isRight:s,isLeft:u,isBottom:c,maxScroll:d,minScroll:p}=Qs(t),f=nu(t),m={x:Math.min(i===uu.Right?f.right-f.width/2:f.right,Math.max(i===uu.Right?f.left:f.left+f.width/2,l.x)),y:Math.min(i===uu.Down?f.bottom-f.height/2:f.bottom,Math.max(i===uu.Down?f.top:f.top+f.height/2,l.y))},g=i===uu.Down&&!c||i===uu.Up&&!o;if((i===uu.Right&&!s||i===uu.Left&&!u)&&m.x!==l.x){const e=t.scrollLeft+n.x,o=i===uu.Right&&e<=d.x||i===uu.Left&&e>=p.x;if(o&&!n.y)return void t.scrollTo({left:e,behavior:a});r.x=o?t.scrollLeft-e:i===uu.Right?t.scrollLeft-d.x:t.scrollLeft-p.x,r.x&&t.scrollBy({left:-r.x,behavior:a});break}if(g&&m.y!==l.y){const e=t.scrollTop+n.y,o=i===uu.Down&&e<=d.y||i===uu.Up&&e>=p.y;if(o&&!n.x)return void t.scrollTo({top:e,behavior:a});r.y=o?t.scrollTop-e:i===uu.Down?t.scrollTop-d.y:t.scrollTop-p.y,r.y&&t.scrollBy({top:-r.y,behavior:a});break}}this.handleMove(e,vs(Is(l,this.referenceCoordinates),r))}}}handleMove(e,n){const{onMove:t}=this.props;e.preventDefault(),t(n)}handleEnd(e){const{onEnd:n}=this.props;e.preventDefault(),this.detach(),n()}handleCancel(e){const{onCancel:n}=this.props;e.preventDefault(),this.detach(),n()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll()}}function mu(e){return Boolean(e&&"distance"in e)}function gu(e){return Boolean(e&&"delay"in e)}fu.activators=[{eventName:"onKeyDown",handler:(e,n,t)=>{let{keyboardCodes:r=du,onActivation:i}=n,{active:o}=t;const{code:a}=e.nativeEvent;if(r.start.includes(a)){const n=o.activatorNode.current;return!(n&&e.target!==n||(e.preventDefault(),null==i||i({event:e.nativeEvent}),0))}return!1}}];class hu{constructor(e,n,t){var r;void 0===t&&(t=function(e){const{EventTarget:n}=is(e);return e instanceof n?e:us(e)}(e.event.target)),this.props=void 0,this.events=void 0,this.autoScrollEnabled=!0,this.document=void 0,this.activated=!1,this.initialCoordinates=void 0,this.timeoutId=null,this.listeners=void 0,this.documentListeners=void 0,this.windowListeners=void 0,this.props=e,this.events=n;const{event:i}=e,{target:o}=i;this.props=e,this.events=n,this.document=us(o),this.documentListeners=new ou(this.document),this.listeners=new ou(t),this.windowListeners=new ou(is(o)),this.initialCoordinates=null!=(r=Cs(i))?r:Bs,this.handleStart=this.handleStart.bind(this),this.handleMove=this.handleMove.bind(this),this.handleEnd=this.handleEnd.bind(this),this.handleCancel=this.handleCancel.bind(this),this.handleKeydown=this.handleKeydown.bind(this),this.removeTextSelection=this.removeTextSelection.bind(this),this.attach()}attach(){const{events:e,props:{options:{activationConstraint:n,bypassActivationConstraint:t}}}=this;if(this.listeners.add(e.move.name,this.handleMove,{passive:!1}),this.listeners.add(e.end.name,this.handleEnd),e.cancel&&this.listeners.add(e.cancel.name,this.handleCancel),this.windowListeners.add(su.Resize,this.handleCancel),this.windowListeners.add(su.DragStart,cu),this.windowListeners.add(su.VisibilityChange,this.handleCancel),this.windowListeners.add(su.ContextMenu,cu),this.documentListeners.add(su.Keydown,this.handleKeydown),n){if(null!=t&&t({event:this.props.event,activeNode:this.props.activeNode,options:this.props.options}))return this.handleStart();if(gu(n))return this.timeoutId=setTimeout(this.handleStart,n.delay),void this.handlePending(n);if(mu(n))return void this.handlePending(n)}this.handleStart()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll(),setTimeout(this.documentListeners.removeAll,50),null!==this.timeoutId&&(clearTimeout(this.timeoutId),this.timeoutId=null)}handlePending(e,n){const{active:t,onPending:r}=this.props;r(t,e,this.initialCoordinates,n)}handleStart(){const{initialCoordinates:e}=this,{onStart:n}=this.props;e&&(this.activated=!0,this.documentListeners.add(su.Click,lu,{capture:!0}),this.removeTextSelection(),this.documentListeners.add(su.SelectionChange,this.removeTextSelection),n(e))}handleMove(e){var n;const{activated:t,initialCoordinates:r,props:i}=this,{onMove:o,options:{activationConstraint:a}}=i;if(!r)return;const s=null!=(n=Cs(e))?n:Bs,u=Is(r,s);if(!t&&a){if(mu(a)){if(null!=a.tolerance&&au(u,a.tolerance))return this.handleCancel();if(au(u,a.distance))return this.handleStart()}return gu(a)&&au(u,a.tolerance)?this.handleCancel():void this.handlePending(a,u)}e.cancelable&&e.preventDefault(),o(s)}handleEnd(){const{onAbort:e,onEnd:n}=this.props;this.detach(),this.activated||e(this.props.active),n()}handleCancel(){const{onAbort:e,onCancel:n}=this.props;this.detach(),this.activated||e(this.props.active),n()}handleKeydown(e){e.code===uu.Esc&&this.handleCancel()}removeTextSelection(){var e;null==(e=this.document.getSelection())||e.removeAllRanges()}}const bu={cancel:{name:"pointercancel"},move:{name:"pointermove"},end:{name:"pointerup"}};class vu extends hu{constructor(e){const{event:n}=e,t=us(n.target);super(e,bu,t)}}vu.activators=[{eventName:"onPointerDown",handler:(e,n)=>{let{nativeEvent:t}=e,{onActivation:r}=n;return!(!t.isPrimary||0!==t.button||(null==r||r({event:t}),0))}}];const Iu={move:{name:"mousemove"},end:{name:"mouseup"}};var yu;!function(e){e[e.RightClick=2]="RightClick"}(yu||(yu={})),class extends hu{constructor(e){super(e,Iu,us(e.event.target))}}.activators=[{eventName:"onMouseDown",handler:(e,n)=>{let{nativeEvent:t}=e,{onActivation:r}=n;return t.button!==yu.RightClick&&(null==r||r({event:t}),!0)}}];const Cu={cancel:{name:"touchcancel"},move:{name:"touchmove"},end:{name:"touchend"}};var xu,Au;(class extends hu{constructor(e){super(e,Cu)}static setup(){return window.addEventListener(Cu.move.name,e,{capture:!1,passive:!1}),function(){window.removeEventListener(Cu.move.name,e)};function e(){}}}).activators=[{eventName:"onTouchStart",handler:(e,n)=>{let{nativeEvent:t}=e,{onActivation:r}=n;const{touches:i}=t;return!(i.length>1||(null==r||r({event:t}),0))}}],function(e){e[e.Pointer=0]="Pointer",e[e.DraggableRect=1]="DraggableRect"}(xu||(xu={})),function(e){e[e.TreeOrder=0]="TreeOrder",e[e.ReversedTreeOrder=1]="ReversedTreeOrder"}(Au||(Au={}));const wu={x:{[qs.Backward]:!1,[qs.Forward]:!1},y:{[qs.Backward]:!1,[qs.Forward]:!1}};var Eu,Ru;!function(e){e[e.Always=0]="Always",e[e.BeforeDragging=1]="BeforeDragging",e[e.WhileDragging=2]="WhileDragging"}(Eu||(Eu={})),function(e){e.Optimized="optimized"}(Ru||(Ru={}));const Tu=/*#__PURE__*/new Map;function Su(e,n){return ps(t=>e?t||("function"==typeof n?n(e):e):null,[n,e])}function Ou(n){let{callback:t,disabled:r}=n;const i=ls(t),o=e.useMemo(()=>{if(r||"undefined"==typeof window||void 0===window.ResizeObserver)return;const{ResizeObserver:e}=window;return new e(i)},[r]);return e.useEffect(()=>()=>null==o?void 0:o.disconnect(),[o]),o}function Nu(e){return new iu(Xs(e),e)}function Du(n,t,r){void 0===t&&(t=Nu);const[i,o]=e.useState(null);function a(){o(e=>{if(!n)return null;var i;if(!1===n.isConnected)return null!=(i=null!=e?e:r)?i:null;const o=t(n);return JSON.stringify(e)===JSON.stringify(o)?e:o})}const s=function(n){let{callback:t,disabled:r}=n;const i=ls(t),o=e.useMemo(()=>{if(r||"undefined"==typeof window||void 0===window.MutationObserver)return;const{MutationObserver:e}=window;return new e(i)},[i,r]);return e.useEffect(()=>()=>null==o?void 0:o.disconnect(),[o]),o}({callback(e){if(n)for(const t of e){const{type:e,target:r}=t;if("childList"===e&&r instanceof HTMLElement&&r.contains(n)){a();break}}}}),u=Ou({callback:a});return cs(()=>{a(),n?(null==u||u.observe(n),null==s||s.observe(document.body,{childList:!0,subtree:!0})):(null==u||u.disconnect(),null==s||s.disconnect())},[n]),i}const ku=[];function Gu(n,t){void 0===t&&(t=[]);const r=e.useRef(null);return e.useEffect(()=>{r.current=null},t),e.useEffect(()=>{const e=n!==Bs;e&&!r.current&&(r.current=n),!e&&r.current&&(r.current=null)},[n]),r.current?Is(n,r.current):Bs}function Bu(n){return e.useMemo(()=>n?function(e){const n=e.innerWidth,t=e.innerHeight;return{top:0,left:0,right:n,bottom:t,width:n,height:t}}(n):null,[n])}const Mu=[],Pu=[{sensor:vu,options:{}},{sensor:fu,options:{}}],Vu={current:{}},Wu={draggable:{measure:Ys},droppable:{measure:Ys,strategy:Eu.WhileDragging,frequency:Ru.Optimized},dragOverlay:{measure:Xs}};class Hu extends Map{get(e){var n;return null!=e&&null!=(n=super.get(e))?n:void 0}toArray(){return Array.from(this.values())}getEnabled(){return this.toArray().filter(e=>{let{disabled:n}=e;return!n})}getNodeFor(e){var n,t;return null!=(n=null==(t=this.get(e))?void 0:t.node.current)?n:void 0}}const Fu={activatorEvent:null,active:null,activeNode:null,activeNodeRect:null,collisions:null,containerNodeRect:null,draggableNodes:/*#__PURE__*/new Map,droppableRects:/*#__PURE__*/new Map,droppableContainers:/*#__PURE__*/new Hu,over:null,dragOverlay:{nodeRef:{current:null},rect:null,setRef:Gs},scrollableAncestors:[],scrollableAncestorRects:[],measuringConfiguration:Wu,measureDroppableContainers:Gs,windowRect:null,measuringScheduled:!1},Lu=/*#__PURE__*/e.createContext({activatorEvent:null,activators:[],active:null,activeNodeRect:null,ariaDescribedById:{draggable:""},dispatch:Gs,draggableNodes:/*#__PURE__*/new Map,over:null,measureDroppableContainers:Gs}),Xu=/*#__PURE__*/e.createContext(Fu);function Yu(){return{draggable:{active:null,initialCoordinates:{x:0,y:0},nodes:new Map,translate:{x:0,y:0}},droppable:{containers:new Hu}}}function Zu(e,n){switch(n.type){case ks.DragStart:return{...e,draggable:{...e.draggable,initialCoordinates:n.initialCoordinates,active:n.active}};case ks.DragMove:return null==e.draggable.active?e:{...e,draggable:{...e.draggable,translate:{x:n.coordinates.x-e.draggable.initialCoordinates.x,y:n.coordinates.y-e.draggable.initialCoordinates.y}}};case ks.DragEnd:case ks.DragCancel:return{...e,draggable:{...e.draggable,active:null,initialCoordinates:{x:0,y:0},translate:{x:0,y:0}}};case ks.RegisterDroppable:{const{element:t}=n,{id:r}=t,i=new Hu(e.droppable.containers);return i.set(r,t),{...e,droppable:{...e.droppable,containers:i}}}case ks.SetDroppableDisabled:{const{id:t,key:r,disabled:i}=n,o=e.droppable.containers.get(t);if(!o||r!==o.key)return e;const a=new Hu(e.droppable.containers);return a.set(t,{...o,disabled:i}),{...e,droppable:{...e.droppable,containers:a}}}case ks.UnregisterDroppable:{const{id:t,key:r}=n,i=e.droppable.containers.get(t);if(!i||r!==i.key)return e;const o=new Hu(e.droppable.containers);return o.delete(t),{...e,droppable:{...e.droppable,containers:o}}}default:return e}}function ju(n){let{disabled:t}=n;const{active:r,activatorEvent:i,draggableNodes:o}=e.useContext(Lu),a=ms(i),s=ms(null==r?void 0:r.id);return e.useEffect(()=>{if(!t&&!i&&a&&null!=s){if(!ys(a))return;if(document.activeElement===a.target)return;const e=o.get(s);if(!e)return;const{activatorNode:n,node:t}=e;if(!n.current&&!t.current)return;requestAnimationFrame(()=>{for(const e of[n.current,t.current]){if(!e)continue;const n=ws(e);if(n){n.focus();break}}})}},[i,t,o,s,a]),null}const zu=/*#__PURE__*/e.createContext({...Bs,scaleX:1,scaleY:1});var Ju;!function(e){e[e.Uninitialized=0]="Uninitialized",e[e.Initializing=1]="Initializing",e[e.Initialized=2]="Initialized"}(Ju||(Ju={}));const _u=/*#__PURE__*/e.memo(function(n){var t,r,i,o;let{id:a,accessibility:s,autoScroll:u=!0,children:c,sensors:l=Pu,collisionDetection:d=Vs,measuring:p,modifiers:f,...g}=n;const h=e.useReducer(Zu,void 0,Yu),[b,v]=h,[I,y]=function(){const[n]=e.useState(()=>new Set),t=e.useCallback(e=>(n.add(e),()=>n.delete(e)),[n]),r=e.useCallback(e=>{let{type:t,event:r}=e;n.forEach(e=>{var n;return null==(n=e[t])?void 0:n.call(e,r)})},[n]);return[r,t]}(),[C,A]=e.useState(Ju.Uninitialized),w=C===Ju.Initialized,{draggable:{active:E,nodes:R,translate:T},droppable:{containers:S}}=b,O=null!=E?R.get(E):null,N=e.useRef({initial:null,translated:null}),D=e.useMemo(()=>{var e;return null!=E?{id:E,data:null!=(e=null==O?void 0:O.data)?e:Vu,rect:N}:null},[E,O]),k=e.useRef(null),[G,B]=e.useState(null),[M,P]=e.useState(null),V=ds(g,Object.values(g)),W=hs("DndDescribedBy",a),H=e.useMemo(()=>S.getEnabled(),[S]),F=function(n){return e.useMemo(()=>({draggable:{...Wu.draggable,...null==n?void 0:n.draggable},droppable:{...Wu.droppable,...null==n?void 0:n.droppable},dragOverlay:{...Wu.dragOverlay,...null==n?void 0:n.dragOverlay}}),[null==n?void 0:n.draggable,null==n?void 0:n.droppable,null==n?void 0:n.dragOverlay])}(p),{droppableRects:L,measureDroppableContainers:X,measuringScheduled:Y}=function(n,t){let{dragging:r,dependencies:i,config:o}=t;const[a,s]=e.useState(null),{frequency:u,measure:c,strategy:l}=o,d=e.useRef(n),p=function(){switch(l){case Eu.Always:return!1;case Eu.BeforeDragging:return r;default:return!r}}(),f=ds(p),m=e.useCallback(function(e){void 0===e&&(e=[]),f.current||s(n=>null===n?e:n.concat(e.filter(e=>!n.includes(e))))},[f]),g=e.useRef(null),h=ps(e=>{if(p&&!r)return Tu;if(!e||e===Tu||d.current!==n||null!=a){const e=new Map;for(let t of n){if(!t)continue;if(a&&a.length>0&&!a.includes(t.id)&&t.rect.current){e.set(t.id,t.rect.current);continue}const n=t.node.current,r=n?new iu(c(n),n):null;t.rect.current=r,r&&e.set(t.id,r)}return e}return e},[n,a,r,p,c]);return e.useEffect(()=>{d.current=n},[n]),e.useEffect(()=>{p||m()},[r,p]),e.useEffect(()=>{a&&a.length>0&&s(null)},[JSON.stringify(a)]),e.useEffect(()=>{p||"number"!=typeof u||null!==g.current||(g.current=setTimeout(()=>{m(),g.current=null},u))},[u,p,m,...i]),{droppableRects:h,measureDroppableContainers:m,measuringScheduled:null!=a}}(H,{dragging:w,dependencies:[T.x,T.y],config:F.droppable}),Z=function(e,n){const t=null!=n?e.get(n):void 0,r=t?t.node.current:null;return ps(e=>{var t;return null==n?null:null!=(t=null!=r?r:e)?t:null},[r,n])}(R,E),j=e.useMemo(()=>M?Cs(M):null,[M]),z=function(){const e=w&&!(!1===(null==G?void 0:G.autoScrollEnabled))&&!("object"==typeof u?!1===u.enabled:!1===u);return"object"==typeof u?{...u,enabled:e}:{enabled:e}}(),J=function(e,n){return Su(e,n)}(Z,F.draggable.measure);!function(n){let{activeNode:t,measure:r,initialRect:i,config:o=!0}=n;const a=e.useRef(!1),{x:s,y:u}="boolean"==typeof o?{x:o,y:o}:o;cs(()=>{if(!s&&!u||!t)return void(a.current=!1);if(a.current||!i)return;const e=null==t?void 0:t.node.current;if(!e||!1===e.isConnected)return;const n=Ws(r(e),i);if(s||(n.x=0),u||(n.y=0),a.current=!0,Math.abs(n.x)>0||Math.abs(n.y)>0){const t=js(e);t&&t.scrollBy({top:n.y,left:n.x})}},[t,s,u,i,r])}({activeNode:null!=E?R.get(E):null,config:z.layoutShiftCompensation,initialRect:J,measure:F.draggable.measure});const _=Du(Z,F.draggable.measure,J),U=Du(Z?Z.parentElement:null),q=e.useRef({activatorEvent:null,active:null,activeNode:Z,collisionRect:null,collisions:null,droppableRects:L,draggableNodes:R,draggingNode:null,draggingNodeRect:null,droppableContainers:S,over:null,scrollableAncestors:[],scrollAdjustedTranslate:null}),$=S.getNodeFor(null==(t=q.current.over)?void 0:t.id),Q=function(n){let{measure:t}=n;const[r,i]=e.useState(null),o=e.useCallback(e=>{for(const{target:n}of e)if(as(n)){i(e=>{const r=t(n);return e?{...e,width:r.width,height:r.height}:r});break}},[t]),a=Ou({callback:o}),s=e.useCallback(e=>{const n=function(e){if(!e)return null;if(e.children.length>1)return e;const n=e.children[0];return as(n)?n:e}(e);null==a||a.disconnect(),n&&(null==a||a.observe(n)),i(n?t(n):null)},[t,a]),[u,c]=fs(s);return e.useMemo(()=>({nodeRef:u,rect:r,setRef:c}),[r,u,c])}({measure:F.dragOverlay.measure}),K=null!=(r=Q.nodeRef.current)?r:Z,ee=w?null!=(i=Q.rect)?i:_:null,ne=Boolean(Q.nodeRef.current&&Q.rect),te=Ws(re=ne?null:_,Su(re));var re;const ie=Bu(K?is(K):null),oe=function(n){const t=e.useRef(n),r=ps(e=>n?e&&e!==ku&&n&&t.current&&n.parentNode===t.current.parentNode?e:Zs(n):ku,[n]);return e.useEffect(()=>{t.current=n},[n]),r}(w?null!=$?$:Z:null),ae=function(n,t){void 0===t&&(t=Xs);const[r]=n,i=Bu(r?is(r):null),[o,a]=e.useState(Mu);function s(){a(()=>n.length?n.map(e=>$s(e)?i:new iu(t(e),e)):Mu)}const u=Ou({callback:s});return cs(()=>{null==u||u.disconnect(),s(),n.forEach(e=>null==u?void 0:u.observe(e))},[n]),o}(oe),se=function(e,n){let{transform:t,...r}=n;return null!=e&&e.length?e.reduce((e,n)=>n({transform:e,...r}),t):t}(f,{transform:{x:T.x-te.x,y:T.y-te.y,scaleX:1,scaleY:1},activatorEvent:M,active:D,activeNodeRect:_,containerNodeRect:U,draggingNodeRect:ee,over:q.current.over,overlayNodeRect:Q.rect,scrollableAncestors:oe,scrollableAncestorRects:ae,windowRect:ie}),ue=j?vs(j,T):null,ce=function(n){const[t,r]=e.useState(null),i=e.useRef(n),o=e.useCallback(e=>{const n=zs(e.target);n&&r(e=>e?(e.set(n,Us(n)),new Map(e)):null)},[]);return e.useEffect(()=>{const e=i.current;if(n!==e){t(e);const a=n.map(e=>{const n=zs(e);return n?(n.addEventListener("scroll",o,{passive:!0}),[n,Us(n)]):null}).filter(e=>null!=e);r(a.length?new Map(a):null),i.current=n}return()=>{t(n),t(e)};function t(e){e.forEach(e=>{const n=zs(e);null==n||n.removeEventListener("scroll",o)})}},[o,n]),e.useMemo(()=>n.length?t?Array.from(t.values()).reduce((e,n)=>vs(e,n),Bs):tu(n):Bs,[n,t])}(oe),le=Gu(ce),de=Gu(ce,[_]),pe=vs(se,le),fe=ee?Fs(ee,se):null,me=D&&fe?d({active:D,collisionRect:fe,droppableRects:L,droppableContainers:H,pointerCoordinates:ue}):null,ge=function(e){if(!e||0===e.length)return null;const[n]=e;return n.id}(me),[he,be]=e.useState(null),ve=function(e,n,t){return{...e,scaleX:n&&t?n.width/t.width:1,scaleY:n&&t?n.height/t.height:1}}(ne?se:vs(se,de),null!=(o=null==he?void 0:he.rect)?o:null,_),Ie=e.useRef(null),ye=e.useCallback((e,n)=>{let{sensor:t,options:r}=n;if(null==k.current)return;const i=R.get(k.current);if(!i)return;const o=e.nativeEvent,a=new t({active:k.current,activeNode:i,event:o,options:r,context:q,onAbort(e){if(!R.get(e))return;const{onDragAbort:n}=V.current,t={id:e};null==n||n(t),I({type:"onDragAbort",event:t})},onPending(e,n,t,r){if(!R.get(e))return;const{onDragPending:i}=V.current,o={id:e,constraint:n,initialCoordinates:t,offset:r};null==i||i(o),I({type:"onDragPending",event:o})},onStart(e){const n=k.current;if(null==n)return;const t=R.get(n);if(!t)return;const{onDragStart:r}=V.current,i={activatorEvent:o,active:{id:n,data:t.data,rect:N}};m.unstable_batchedUpdates(()=>{null==r||r(i),A(Ju.Initializing),v({type:ks.DragStart,initialCoordinates:e,active:n}),I({type:"onDragStart",event:i}),B(Ie.current),P(o)})},onMove(e){v({type:ks.DragMove,coordinates:e})},onEnd:s(ks.DragEnd),onCancel:s(ks.DragCancel)});function s(e){return async function(){const{active:n,collisions:t,over:r,scrollAdjustedTranslate:i}=q.current;let a=null;if(n&&i){const{cancelDrop:s}=V.current;a={activatorEvent:o,active:n,collisions:t,delta:i,over:r},e===ks.DragEnd&&"function"==typeof s&&await Promise.resolve(s(a))&&(e=ks.DragCancel)}k.current=null,m.unstable_batchedUpdates(()=>{v({type:e}),A(Ju.Uninitialized),be(null),B(null),P(null),Ie.current=null;const n=e===ks.DragEnd?"onDragEnd":"onDragCancel";if(a){const e=V.current[n];null==e||e(a),I({type:n,event:a})}})}}Ie.current=a},[R]),Ce=e.useCallback((e,n)=>(t,r)=>{const i=t.nativeEvent,o=R.get(r);null!==k.current||!o||i.dndKit||i.defaultPrevented||!0===e(t,n.options,{active:o})&&(i.dndKit={capturedBy:n.sensor},k.current=r,ye(t,n))},[R,ye]),xe=function(n,t){return e.useMemo(()=>n.reduce((e,n)=>{const{sensor:r}=n;return[...e,...r.activators.map(e=>({eventName:e.eventName,handler:t(e.handler,n)}))]},[]),[n,t])}(l,Ce);!function(n){e.useEffect(()=>{if(!ns)return;const e=n.map(e=>{let{sensor:n}=e;return null==n.setup?void 0:n.setup()});return()=>{for(const n of e)null==n||n()}},n.map(e=>{let{sensor:n}=e;return n}))}(l),cs(()=>{_&&C===Ju.Initializing&&A(Ju.Initialized)},[_,C]),e.useEffect(()=>{const{onDragMove:e}=V.current,{active:n,activatorEvent:t,collisions:r,over:i}=q.current;if(!n||!t)return;const o={active:n,activatorEvent:t,collisions:r,delta:{x:pe.x,y:pe.y},over:i};m.unstable_batchedUpdates(()=>{null==e||e(o),I({type:"onDragMove",event:o})})},[pe.x,pe.y]),e.useEffect(()=>{const{active:e,activatorEvent:n,collisions:t,droppableContainers:r,scrollAdjustedTranslate:i}=q.current;if(!e||null==k.current||!n||!i)return;const{onDragOver:o}=V.current,a=r.get(ge),s=a&&a.rect.current?{id:a.id,rect:a.rect.current,data:a.data,disabled:a.disabled}:null,u={active:e,activatorEvent:n,collisions:t,delta:{x:i.x,y:i.y},over:s};m.unstable_batchedUpdates(()=>{be(s),null==o||o(u),I({type:"onDragOver",event:u})})},[ge]),cs(()=>{q.current={activatorEvent:M,active:D,activeNode:Z,collisionRect:fe,collisions:me,droppableRects:L,draggableNodes:R,draggingNode:K,draggingNodeRect:ee,droppableContainers:S,over:he,scrollableAncestors:oe,scrollAdjustedTranslate:pe},N.current={initial:ee,translated:fe}},[D,Z,me,fe,R,K,ee,L,S,he,oe,pe]),function(n){let{acceleration:t,activator:r=xu.Pointer,canScroll:i,draggingRect:o,enabled:a,interval:s=5,order:u=Au.TreeOrder,pointerCoordinates:c,scrollableAncestors:l,scrollableAncestorRects:d,delta:p,threshold:f}=n;const m=function(e){let{delta:n,disabled:t}=e;const r=ms(n);return ps(e=>{if(t||!r||!e)return wu;const i=Math.sign(n.x-r.x),o=Math.sign(n.y-r.y);return{x:{[qs.Backward]:e.x[qs.Backward]||-1===i,[qs.Forward]:e.x[qs.Forward]||1===i},y:{[qs.Backward]:e.y[qs.Backward]||-1===o,[qs.Forward]:e.y[qs.Forward]||1===o}}},[t,n,r])}({delta:p,disabled:!a}),[g,h]=function(){const n=e.useRef(null),t=e.useCallback((e,t)=>{n.current=setInterval(e,t)},[]);return[t,e.useCallback(()=>{null!==n.current&&(clearInterval(n.current),n.current=null)},[])]}(),b=e.useRef({x:0,y:0}),v=e.useRef({x:0,y:0}),I=e.useMemo(()=>{switch(r){case xu.Pointer:return c?{top:c.y,bottom:c.y,left:c.x,right:c.x}:null;case xu.DraggableRect:return o}},[r,o,c]),y=e.useRef(null),C=e.useCallback(()=>{const e=y.current;e&&e.scrollBy(b.current.x*v.current.x,b.current.y*v.current.y)},[]),x=e.useMemo(()=>u===Au.TreeOrder?[...l].reverse():l,[u,l]);e.useEffect(()=>{if(a&&l.length&&I){for(const e of x){if(!1===(null==i?void 0:i(e)))continue;const n=l.indexOf(e),r=d[n];if(!r)continue;const{direction:o,speed:a}=eu(e,r,I,t,f);for(const e of["x","y"])m[e][o[e]]||(a[e]=0,o[e]=0);if(a.x>0||a.y>0)return h(),y.current=e,g(C,s),b.current=a,void(v.current=o)}b.current={x:0,y:0},v.current={x:0,y:0},h()}else h()},[t,C,i,h,a,s,JSON.stringify(I),JSON.stringify(m),g,l,x,d,JSON.stringify(f)])}({...z,delta:T,draggingRect:fe,pointerCoordinates:ue,scrollableAncestors:oe,scrollableAncestorRects:ae});const Ae=e.useMemo(()=>({active:D,activeNode:Z,activeNodeRect:_,activatorEvent:M,collisions:me,containerNodeRect:U,dragOverlay:Q,draggableNodes:R,droppableContainers:S,droppableRects:L,over:he,measureDroppableContainers:X,scrollableAncestors:oe,scrollableAncestorRects:ae,measuringConfiguration:F,measuringScheduled:Y,windowRect:ie}),[D,Z,_,M,me,U,Q,R,S,L,he,X,oe,ae,F,Y,ie]),we=e.useMemo(()=>({activatorEvent:M,activators:xe,active:D,activeNodeRect:_,ariaDescribedById:{draggable:W},dispatch:v,draggableNodes:R,over:he,measureDroppableContainers:X}),[M,xe,D,_,v,W,R,he,X]);return x.default.createElement(Ss.Provider,{value:y},x.default.createElement(Lu.Provider,{value:we},x.default.createElement(Xu.Provider,{value:Ae},x.default.createElement(zu.Provider,{value:ve},c)),x.default.createElement(ju,{disabled:!1===(null==s?void 0:s.restoreFocus)})),x.default.createElement(Ds,{...s,hiddenTextDescribedById:W}))}),Uu=/*#__PURE__*/e.createContext(null),qu="button",$u={timeout:25};function Qu(e,n,t){const r=e.slice();return r.splice(t<0?r.length+t:t,0,r.splice(n,1)[0]),r}function Ku(e,n){return e.reduce((e,t,r)=>{const i=n.get(t);return i&&(e[r]=i),e},Array(e.length))}function ec(e){return null!==e&&e>=0}const nc=e=>{let{rects:n,activeIndex:t,overIndex:r,index:i}=e;const o=Qu(n,r,t),a=n[i],s=o[i];return s&&a?{x:s.left-a.left,y:s.top-a.top,scaleX:s.width/a.width,scaleY:s.height/a.height}:null},tc="Sortable",rc=/*#__PURE__*/x.default.createContext({activeIndex:-1,containerId:tc,disableTransforms:!1,items:[],overIndex:-1,useDragOverlay:!1,sortedRects:[],strategy:nc,disabled:{draggable:!1,droppable:!1}});function ic(n){let{children:t,id:r,items:i,strategy:o=nc,disabled:a=!1}=n;const{active:s,dragOverlay:u,droppableRects:c,over:l,measureDroppableContainers:d}=e.useContext(Xu),p=hs(tc,r),f=Boolean(null!==u.rect),m=e.useMemo(()=>i.map(e=>"object"==typeof e&&"id"in e?e.id:e),[i]),g=null!=s,h=s?m.indexOf(s.id):-1,b=l?m.indexOf(l.id):-1,v=e.useRef(m),I=!function(e,n){if(e===n)return!0;if(e.length!==n.length)return!1;for(let t=0;t<e.length;t++)if(e[t]!==n[t])return!1;return!0}(m,v.current),y=-1!==b&&-1===h||I,C=function(e){return"boolean"==typeof e?{draggable:e,droppable:e}:e}(a);cs(()=>{I&&g&&d(m)},[I,m,g,d]),e.useEffect(()=>{v.current=m},[m]);const A=e.useMemo(()=>({activeIndex:h,containerId:p,disabled:C,disableTransforms:y,items:m,overIndex:b,useDragOverlay:f,sortedRects:Ku(m,c),strategy:o}),[h,p,C.draggable,C.droppable,y,m,b,c,f,o]);return x.default.createElement(rc.Provider,{value:A},t)}const oc=e=>{let{id:n,items:t,activeIndex:r,overIndex:i}=e;return Qu(t,r,i).indexOf(n)},ac=e=>{let{containerId:n,isSorting:t,wasDragging:r,index:i,items:o,newIndex:a,previousItems:s,previousContainerId:u,transition:c}=e;return!(!c||!r||s!==o&&i===a||!t&&(a===i||n!==u))},sc={duration:200,easing:"ease"},uc="transform",cc=/*#__PURE__*/xs.Transition.toString({property:uc,duration:0,easing:"linear"}),lc={roleDescription:"sortable"};var dc=function(n){var t=function(n){let{animateLayoutChanges:t=ac,attributes:r,disabled:i,data:o,getNewIndex:a=oc,id:s,strategy:u,resizeObserverConfig:c,transition:l=sc}=n;const{items:d,containerId:p,activeIndex:f,disabled:m,disableTransforms:g,sortedRects:h,overIndex:b,useDragOverlay:v,strategy:I}=e.useContext(rc),y=function(e,n){var t,r;return"boolean"==typeof e?{draggable:e,droppable:!1}:{draggable:null!=(t=null==e?void 0:e.draggable)?t:n.draggable,droppable:null!=(r=null==e?void 0:e.droppable)?r:n.droppable}}(i,m),C=d.indexOf(s),x=e.useMemo(()=>({sortable:{containerId:p,index:C,items:d},...o}),[p,o,C,d]),A=e.useMemo(()=>d.slice(d.indexOf(s)),[d,s]),{rect:w,node:E,isOver:R,setNodeRef:T}=function(n){let{data:t,disabled:r=!1,id:i,resizeObserverConfig:o}=n;const a=hs("Droppable"),{active:s,dispatch:u,over:c,measureDroppableContainers:l}=e.useContext(Lu),d=e.useRef({disabled:r}),p=e.useRef(!1),f=e.useRef(null),m=e.useRef(null),{disabled:g,updateMeasurementsFor:h,timeout:b}={...$u,...o},v=ds(null!=h?h:i),I=Ou({callback:e.useCallback(()=>{p.current?(null!=m.current&&clearTimeout(m.current),m.current=setTimeout(()=>{l(Array.isArray(v.current)?v.current:[v.current]),m.current=null},b)):p.current=!0},[b]),disabled:g||!s}),y=e.useCallback((e,n)=>{I&&(n&&(I.unobserve(n),p.current=!1),e&&I.observe(e))},[I]),[C,x]=fs(y),A=ds(t);return e.useEffect(()=>{I&&C.current&&(I.disconnect(),p.current=!1,I.observe(C.current))},[C,I]),e.useEffect(()=>(u({type:ks.RegisterDroppable,element:{id:i,key:a,disabled:r,node:C,rect:f,data:A}}),()=>u({type:ks.UnregisterDroppable,key:a,id:i})),[i]),e.useEffect(()=>{r!==d.current.disabled&&(u({type:ks.SetDroppableDisabled,id:i,key:a,disabled:r}),d.current.disabled=r)},[i,a,r,u]),{active:s,rect:f,isOver:(null==c?void 0:c.id)===i,node:C,over:c,setNodeRef:x}}({id:s,data:x,disabled:y.droppable,resizeObserverConfig:{updateMeasurementsFor:A,...c}}),{active:S,activatorEvent:O,activeNodeRect:N,attributes:D,setNodeRef:k,listeners:G,isDragging:B,over:M,setActivatorNodeRef:P,transform:V}=function(n){let{id:t,data:r,disabled:i=!1,attributes:o}=n;const a=hs("Draggable"),{activators:s,activatorEvent:u,active:c,activeNodeRect:l,ariaDescribedById:d,draggableNodes:p,over:f}=e.useContext(Lu),{role:m=qu,roleDescription:g="draggable",tabIndex:h=0}=null!=o?o:{},b=(null==c?void 0:c.id)===t,v=e.useContext(b?zu:Uu),[I,y]=fs(),[C,x]=fs(),A=function(n,t){return e.useMemo(()=>n.reduce((e,n)=>{let{eventName:r,handler:i}=n;return e[r]=e=>{i(e,t)},e},{}),[n,t])}(s,t),w=ds(r);return cs(()=>(p.set(t,{id:t,key:a,node:I,activatorNode:C,data:w}),()=>{const e=p.get(t);e&&e.key===a&&p.delete(t)}),[p,t]),{active:c,activatorEvent:u,activeNodeRect:l,attributes:e.useMemo(()=>({role:m,tabIndex:h,"aria-disabled":i,"aria-pressed":!(!b||m!==qu)||void 0,"aria-roledescription":g,"aria-describedby":d.draggable}),[i,m,h,b,g,d.draggable]),isDragging:b,listeners:i?void 0:A,node:I,over:f,setNodeRef:y,setActivatorNodeRef:x,transform:v}}({id:s,data:x,attributes:{...lc,...r},disabled:y.draggable}),W=function(){for(var n=arguments.length,t=new Array(n),r=0;r<n;r++)t[r]=arguments[r];return e.useMemo(()=>e=>{t.forEach(n=>n(e))},t)}(T,k),H=Boolean(S),F=H&&!g&&ec(f)&&ec(b),L=!v&&B,X=L&&F?V:null,Y=F?null!=X?X:(null!=u?u:I)({rects:h,activeNodeRect:N,activeIndex:f,overIndex:b,index:C}):null,Z=ec(f)&&ec(b)?a({id:s,items:d,activeIndex:f,overIndex:b}):C,j=null==S?void 0:S.id,z=e.useRef({activeId:j,items:d,newIndex:Z,containerId:p}),J=d!==z.current.items,_=t({active:S,containerId:p,isDragging:B,isSorting:H,id:s,index:C,items:d,newIndex:z.current.newIndex,previousItems:z.current.items,previousContainerId:z.current.containerId,transition:l,wasDragging:null!=z.current.activeId}),U=function(n){let{disabled:t,index:r,node:i,rect:o}=n;const[a,s]=e.useState(null),u=e.useRef(r);return cs(()=>{if(!t&&r!==u.current&&i.current){const e=o.current;if(e){const n=Xs(i.current,{ignoreTransform:!0}),t={x:e.left-n.left,y:e.top-n.top,scaleX:e.width/n.width,scaleY:e.height/n.height};(t.x||t.y)&&s(t)}}r!==u.current&&(u.current=r)},[t,r,i,o]),e.useEffect(()=>{a&&s(null)},[a]),a}({disabled:!_,index:C,node:E,rect:w});return e.useEffect(()=>{H&&z.current.newIndex!==Z&&(z.current.newIndex=Z),p!==z.current.containerId&&(z.current.containerId=p),d!==z.current.items&&(z.current.items=d)},[H,Z,p,d]),e.useEffect(()=>{if(j===z.current.activeId)return;if(null!=j&&null==z.current.activeId)return void(z.current.activeId=j);const e=setTimeout(()=>{z.current.activeId=j},50);return()=>clearTimeout(e)},[j]),{active:S,activeIndex:f,attributes:D,data:x,rect:w,index:C,newIndex:Z,items:d,isOver:R,isSorting:H,isDragging:B,listeners:G,node:E,overIndex:b,over:M,setNodeRef:W,setActivatorNodeRef:P,setDroppableNodeRef:T,setDraggableNodeRef:k,transform:null!=U?U:Y,transition:U||J&&z.current.newIndex===C?cc:L&&!ys(O)||!l?void 0:H||_?xs.Transition.toString({...l,property:uc}):void 0}}({id:n.data.value}),r=t.attributes,i=t.listeners,o=t.setNodeRef,a=t.transition,s={display:"flex",transform:xs.Transform.toString(t.transform),transition:a};return x.default.createElement("div",D({ref:o,style:s},r,i,{onPointerDown:function(e){e.target instanceof HTMLElement&&(["svg","path"].includes(e.target.nodeName)&&(e.preventDefault(),e.stopPropagation()),null==i||i.onPointerDown(e))}}),x.default.createElement(ea.MultiValueContainer,D({},n)))},pc=function(e){var n=D({},e.innerProps,{style:{cursor:"grab"},onMouseDown:function(e){e.preventDefault(),e.stopPropagation()}});return x.default.createElement(ea.MultiValueLabel,D({},e,{innerProps:n}))},fc={en:{translation:{"Are you sure you want to delete this widget?":"Are you sure you want to delete this widget?",Cancel:"Cancel",Delete:"Delete","filters.dayType.label":"Day type","filters.dayType.calendar":"Calendar","filters.dayType.production":"Production","filters.shifts.label":"Shifts","filters.shifts.allShifts":"All shifts","filters.dateRange.label":"Date range","filters.dateRange.from":"From","filters.dateRange.to":"To","filters.search.placeholder":"Search periods...","filters.search.noResults":"No periods found","filters.premium.indicator":"Premium","filters.periods.today":"Today","filters.periods.yesterday":"Yesterday","filters.periods.last7Days":"Last 7 days","filters.periods.last14Days":"Last 14 days","filters.periods.last30Days":"Last 30 days","filters.periods.last90Days":"Last 90 days","filters.periods.last180Days":"Last 180 days","filters.periods.last365Days":"Last 365 days","filters.periods.currentWeek":"Current week","filters.periods.currentMonth":"Current month","filters.periods.currentQuarter":"Current quarter","filters.periods.currentYear":"Current year","filters.periods.previousWeek":"Previous week","filters.periods.previousMonth":"Previous month","filters.periods.previousQuarter":"Previous quarter","filters.periods.previousYear":"Previous year","filters.periods.last2Weeks":"Last 2 weeks","filters.periods.last4Weeks":"Last 4 weeks","filters.periods.last8Weeks":"Last 8 weeks","filters.periods.last12Weeks":"Last 12 weeks","filters.periods.last3Months":"Last 3 months","filters.periods.last6Months":"Last 6 months","filters.periods.last12Months":"Last 12 months","filters.periods.week":"Week {{week}}","filters.accessDenied.title":"Premium feature","filters.accessDenied.close":"Close"}},pl:{translation:{"Are you sure you want to delete this widget?":"Czy na pewno usunąć ten widżet?",Cancel:"Anuluj",Delete:"Usuń","filters.dayType.label":"Typ dnia","filters.dayType.calendar":"Kalendarzowy","filters.dayType.production":"Produkcyjny","filters.shifts.label":"Zmiany","filters.shifts.allShifts":"Wszystkie zmiany","filters.dateRange.label":"Zakres dat","filters.dateRange.from":"Od","filters.dateRange.to":"Do","filters.search.placeholder":"Szukaj okresów...","filters.search.noResults":"Nie znaleziono okresów","filters.premium.indicator":"Premium","filters.periods.today":"Dzisiaj","filters.periods.yesterday":"Wczoraj","filters.periods.last7Days":"Ostatnie 7 dni","filters.periods.last14Days":"Ostatnie 14 dni","filters.periods.last30Days":"Ostatnie 30 dni","filters.periods.last90Days":"Ostatnie 90 dni","filters.periods.last180Days":"Ostatnie 180 dni","filters.periods.last365Days":"Ostatnie 365 dni","filters.periods.currentWeek":"Bieżący tydzień","filters.periods.currentMonth":"Bieżący miesiąc","filters.periods.currentQuarter":"Bieżący kwartał","filters.periods.currentYear":"Bieżący rok","filters.periods.previousWeek":"Poprzedni tydzień","filters.periods.previousMonth":"Poprzedni miesiąc","filters.periods.previousQuarter":"Poprzedni kwartał","filters.periods.previousYear":"Poprzedni rok","filters.periods.last2Weeks":"Ostatnie 2 tygodnie","filters.periods.last4Weeks":"Ostatnie 4 tygodnie","filters.periods.last8Weeks":"Ostatnie 8 tygodni","filters.periods.last12Weeks":"Ostatnie 12 tygodni","filters.periods.last3Months":"Ostatnie 3 miesiące","filters.periods.last6Months":"Ostatnie 6 miesięcy","filters.periods.last12Months":"Ostatnie 12 miesięcy","filters.periods.week":"Tydzień {{week}}","filters.accessDenied.title":"Funkcja Premium","filters.accessDenied.close":"Zamknij"}}},mc=H(function(e,n){var t,r,i,o="[object Map]",a="[object Promise]",s="[object Set]",u="[object WeakMap]",c="[object DataView]",l=/^\[object .+?Constructor\]$/,d="object"==typeof self&&self&&self.Object===Object&&self,p="object"==typeof V&&V&&V.Object===Object&&V||d||Function("return this")(),f=n&&!n.nodeType&&n,m=f&&e&&!e.nodeType&&e,g=m&&m.exports===f,h=Function.prototype,b=Object.prototype,v=p["__core-js_shared__"],I=(t=/[^.]+$/.exec(v&&v.keys&&v.keys.IE_PROTO||""))?"Symbol(src)_1."+t:"",y=h.toString,C=b.hasOwnProperty,x=b.toString,A=RegExp("^"+y.call(C).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),w=g?p.Buffer:void 0,E=b.propertyIsEnumerable,R=w?w.isBuffer:void 0,T=(r=Object.keys,i=Object,function(e){return r(i(e))}),S=F(p,"DataView"),O=F(p,"Map"),N=F(p,"Promise"),D=F(p,"Set"),k=F(p,"WeakMap"),G=!E.call({valueOf:1},"valueOf"),B=X(S),M=X(O),P=X(N),W=X(D),H=X(k);function F(e,n){var t=function(e,n){return null==e?void 0:e[n]}(e,n);return function(e){if(!J(e)||function(e){return!!I&&I in e}(e))return!1;var n=z(e)||function(e){var n=!1;if(null!=e&&"function"!=typeof e.toString)try{n=!!(e+"")}catch(e){}return n}(e)?A:l;return n.test(X(e))}(t)?t:void 0}var L=function(e){return x.call(e)};function X(e){if(null!=e){try{return y.call(e)}catch(e){}try{return e+""}catch(e){}}return""}(S&&L(new S(new ArrayBuffer(1)))!=c||O&&L(new O)!=o||N&&L(N.resolve())!=a||D&&L(new D)!=s||k&&L(new k)!=u)&&(L=function(e){var n=x.call(e),t="[object Object]"==n?e.constructor:void 0,r=t?X(t):void 0;if(r)switch(r){case B:return c;case M:return o;case P:return a;case W:return s;case H:return u}return n});var Y=Array.isArray;function Z(e){return null!=e&&function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}(e.length)&&!z(e)}var j=R||function(){return!1};function z(e){var n=J(e)?x.call(e):"";return"[object Function]"==n||"[object GeneratorFunction]"==n}function J(e){var n=typeof e;return!!e&&("object"==n||"function"==n)}e.exports=function(e){if(Z(e)&&(Y(e)||"string"==typeof e||"function"==typeof e.splice||j(e)||function(e){return function(e){return function(e){return!!e&&"object"==typeof e}(e)&&Z(e)}(e)&&C.call(e,"callee")&&(!E.call(e,"callee")||"[object Arguments]"==x.call(e))}(e)))return!e.length;var n=L(e);if(n==o||n==s)return!e.size;if(G||function(e){var n=e&&e.constructor;return e===("function"==typeof n&&n.prototype||b)}(e))return!T(e).length;for(var t in e)if(C.call(e,t))return!1;return!0}}),gc=function(e,n){return gc=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,n){e.__proto__=n}||function(e,n){for(var t in n)n.hasOwnProperty(t)&&(e[t]=n[t])},gc(e,n)};function hc(e,n){function t(){this.constructor=e}gc(e,n),e.prototype=null===n?Object.create(n):(t.prototype=n.prototype,new t)}function bc(e){return"function"==typeof e}var vc=!1,Ic={Promise:void 0,set useDeprecatedSynchronousErrorHandling(e){vc=e},get useDeprecatedSynchronousErrorHandling(){return vc}};function yc(e){setTimeout(function(){throw e},0)}var Cc={closed:!0,next:function(e){},error:function(e){if(Ic.useDeprecatedSynchronousErrorHandling)throw e;yc(e)},complete:function(){}},xc=/*@__PURE__*/function(){return Array.isArray||function(e){return e&&"number"==typeof e.length}}();function Ac(e){return null!==e&&"object"==typeof e}var wc=/*@__PURE__*/function(){function e(e){return Error.call(this),this.message=e?e.length+" errors occurred during unsubscription:\n"+e.map(function(e,n){return n+1+") "+e.toString()}).join("\n "):"",this.name="UnsubscriptionError",this.errors=e,this}return e.prototype=/*@__PURE__*/Object.create(Error.prototype),e}(),Ec=wc,Rc=/*@__PURE__*/function(){function e(e){this.closed=!1,this._parentOrParents=null,this._subscriptions=null,e&&(this._ctorUnsubscribe=!0,this._unsubscribe=e)}return e.prototype.unsubscribe=function(){var n;if(!this.closed){var t=this,r=t._parentOrParents,i=t._ctorUnsubscribe,o=t._unsubscribe,a=t._subscriptions;if(this.closed=!0,this._parentOrParents=null,this._subscriptions=null,r instanceof e)r.remove(this);else if(null!==r)for(var s=0;s<r.length;++s)r[s].remove(this);if(bc(o)){i&&(this._unsubscribe=void 0);try{o.call(this)}catch(e){n=e instanceof Ec?Tc(e.errors):[e]}}if(xc(a)){s=-1;for(var u=a.length;++s<u;){var c=a[s];if(Ac(c))try{c.unsubscribe()}catch(e){n=n||[],e instanceof Ec?n=n.concat(Tc(e.errors)):n.push(e)}}}if(n)throw new Ec(n)}},e.prototype.add=function(n){var t=n;if(!n)return e.EMPTY;switch(typeof n){case"function":t=new e(n);case"object":if(t===this||t.closed||"function"!=typeof t.unsubscribe)return t;if(this.closed)return t.unsubscribe(),t;if(!(t instanceof e)){var r=t;(t=new e)._subscriptions=[r]}break;default:throw new Error("unrecognized teardown "+n+" added to Subscription.")}var i=t._parentOrParents;if(null===i)t._parentOrParents=this;else if(i instanceof e){if(i===this)return t;t._parentOrParents=[i,this]}else{if(-1!==i.indexOf(this))return t;i.push(this)}var o=this._subscriptions;return null===o?this._subscriptions=[t]:o.push(t),t},e.prototype.remove=function(e){var n=this._subscriptions;if(n){var t=n.indexOf(e);-1!==t&&n.splice(t,1)}},e.EMPTY=function(e){return e.closed=!0,e}(new e),e}();function Tc(e){return e.reduce(function(e,n){return e.concat(n instanceof Ec?n.errors:n)},[])}var Sc=/*@__PURE__*/function(){return"function"==typeof Symbol?/*@__PURE__*/Symbol("rxSubscriber"):"@@rxSubscriber_"+/*@__PURE__*/Math.random()}(),Oc=/*@__PURE__*/function(e){function n(t,r,i){var o=e.call(this)||this;switch(o.syncErrorValue=null,o.syncErrorThrown=!1,o.syncErrorThrowable=!1,o.isStopped=!1,arguments.length){case 0:o.destination=Cc;break;case 1:if(!t){o.destination=Cc;break}if("object"==typeof t){t instanceof n?(o.syncErrorThrowable=t.syncErrorThrowable,o.destination=t,t.add(o)):(o.syncErrorThrowable=!0,o.destination=new Nc(o,t));break}default:o.syncErrorThrowable=!0,o.destination=new Nc(o,t,r,i)}return o}return hc(n,e),n.prototype[Sc]=function(){return this},n.create=function(e,t,r){var i=new n(e,t,r);return i.syncErrorThrowable=!1,i},n.prototype.next=function(e){this.isStopped||this._next(e)},n.prototype.error=function(e){this.isStopped||(this.isStopped=!0,this._error(e))},n.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())},n.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,e.prototype.unsubscribe.call(this))},n.prototype._next=function(e){this.destination.next(e)},n.prototype._error=function(e){this.destination.error(e),this.unsubscribe()},n.prototype._complete=function(){this.destination.complete(),this.unsubscribe()},n.prototype._unsubscribeAndRecycle=function(){var e=this._parentOrParents;return this._parentOrParents=null,this.unsubscribe(),this.closed=!1,this.isStopped=!1,this._parentOrParents=e,this},n}(Rc),Nc=/*@__PURE__*/function(e){function n(n,t,r,i){var o,a=e.call(this)||this;a._parentSubscriber=n;var s=a;return bc(t)?o=t:t&&(o=t.next,r=t.error,i=t.complete,t!==Cc&&(bc((s=Object.create(t)).unsubscribe)&&a.add(s.unsubscribe.bind(s)),s.unsubscribe=a.unsubscribe.bind(a))),a._context=s,a._next=o,a._error=r,a._complete=i,a}return hc(n,e),n.prototype.next=function(e){if(!this.isStopped&&this._next){var n=this._parentSubscriber;Ic.useDeprecatedSynchronousErrorHandling&&n.syncErrorThrowable?this.__tryOrSetError(n,this._next,e)&&this.unsubscribe():this.__tryOrUnsub(this._next,e)}},n.prototype.error=function(e){if(!this.isStopped){var n=this._parentSubscriber,t=Ic.useDeprecatedSynchronousErrorHandling;if(this._error)t&&n.syncErrorThrowable?(this.__tryOrSetError(n,this._error,e),this.unsubscribe()):(this.__tryOrUnsub(this._error,e),this.unsubscribe());else if(n.syncErrorThrowable)t?(n.syncErrorValue=e,n.syncErrorThrown=!0):yc(e),this.unsubscribe();else{if(this.unsubscribe(),t)throw e;yc(e)}}},n.prototype.complete=function(){var e=this;if(!this.isStopped){var n=this._parentSubscriber;if(this._complete){var t=function(){return e._complete.call(e._context)};Ic.useDeprecatedSynchronousErrorHandling&&n.syncErrorThrowable?(this.__tryOrSetError(n,t),this.unsubscribe()):(this.__tryOrUnsub(t),this.unsubscribe())}else this.unsubscribe()}},n.prototype.__tryOrUnsub=function(e,n){try{e.call(this._context,n)}catch(e){if(this.unsubscribe(),Ic.useDeprecatedSynchronousErrorHandling)throw e;yc(e)}},n.prototype.__tryOrSetError=function(e,n,t){if(!Ic.useDeprecatedSynchronousErrorHandling)throw new Error("bad call");try{n.call(this._context,t)}catch(n){return Ic.useDeprecatedSynchronousErrorHandling?(e.syncErrorValue=n,e.syncErrorThrown=!0,!0):(yc(n),!0)}return!1},n.prototype._unsubscribe=function(){var e=this._parentSubscriber;this._context=null,this._parentSubscriber=null,e.unsubscribe()},n}(Oc),Dc=/*@__PURE__*/function(){return"function"==typeof Symbol&&Symbol.observable||"@@observable"}();function kc(e){return e}var Gc=/*@__PURE__*/function(){function e(e){this._isScalar=!1,e&&(this._subscribe=e)}return e.prototype.lift=function(n){var t=new e;return t.source=this,t.operator=n,t},e.prototype.subscribe=function(e,n,t){var r=this.operator,i=function(e,n,t){if(e){if(e instanceof Oc)return e;if(e[Sc])return e[Sc]()}return e||n||t?new Oc(e,n,t):new Oc(Cc)}(e,n,t);if(i.add(r?r.call(i,this.source):this.source||Ic.useDeprecatedSynchronousErrorHandling&&!i.syncErrorThrowable?this._subscribe(i):this._trySubscribe(i)),Ic.useDeprecatedSynchronousErrorHandling&&i.syncErrorThrowable&&(i.syncErrorThrowable=!1,i.syncErrorThrown))throw i.syncErrorValue;return i},e.prototype._trySubscribe=function(e){try{return this._subscribe(e)}catch(n){Ic.useDeprecatedSynchronousErrorHandling&&(e.syncErrorThrown=!0,e.syncErrorValue=n),function(e){for(;e;){var n=e.destination;if(e.closed||e.isStopped)return!1;e=n&&n instanceof Oc?n:null}return!0}(e)?e.error(n):console.warn(n)}},e.prototype.forEach=function(e,n){var t=this;return new(n=Bc(n))(function(n,r){var i;i=t.subscribe(function(n){try{e(n)}catch(e){r(e),i&&i.unsubscribe()}},r,n)})},e.prototype._subscribe=function(e){var n=this.source;return n&&n.subscribe(e)},e.prototype[Dc]=function(){return this},e.prototype.pipe=function(){for(var e,n=[],t=0;t<arguments.length;t++)n[t]=arguments[t];return 0===n.length?this:(0===(e=n).length?kc:1===e.length?e[0]:function(n){return e.reduce(function(e,n){return n(e)},n)})(this)},e.prototype.toPromise=function(e){var n=this;return new(e=Bc(e))(function(e,t){var r;n.subscribe(function(e){return r=e},function(e){return t(e)},function(){return e(r)})})},e.create=function(n){return new e(n)},e}();function Bc(e){if(e||(e=Ic.Promise||Promise),!e)throw new Error("no Promise impl found");return e}var Mc=/*#__PURE__*/function(){function e(e){var n=this;this.wsURL=void 0,this.cable=null,this.subscriptions=new Map,this.addSubscription=function(e,t){n.subscriptions.set(e,t)},this.wsURL=e}var n=e.prototype;return n.connect=function(e,n){this.cable=O.default.createConsumer(this.wsURL+"?token="+e+"&lang="+n)},n.request=function(e){var n,t=this.cable,r=this.subscriptions,i=this.addSubscription;return new Gc(function(o){if(t){var a,s=(null==(a=e.variables)?void 0:a.id)||"company";r.has(s)||(n=t.subscriptions.create({channel:"GraphqlChannel",channelId:Math.round(Date.now()+1e5*Math.random()).toString(16)},{connected:function(){this.perform("execute",e)},received:function(e){e.more?e.result.errors?o.error&&o.error(e.result.errors[0]):e.result.data&&o.next&&(mc(e.result.data)||o.next(e.result)):o.complete&&o.complete()}}),i(s,n))}})},n.hasSubscription=function(e){return this.subscriptions.has(e)},e}(),Pc=/*#__PURE__*/function(){function e(e,n,t){this.actionCableClient=null,this.actionCableClient=new Mc(e),this.actionCableClient.connect(n,t)}return e.prototype.subscribe=function(e,n,t,r){if(void 0===r&&(r=function(e){throw e}),!this.actionCableClient)throw new Error("No WS client available");var i=this.actionCableClient.request({query:e,variables:n}).subscribe({next:function(e){var n=e.data,i=e.errors;if(i)return r(new Error(JSON.stringify(i)));n&&t&&t(function(e){var n=Object.keys(e);if(1!==n.length)throw new Error("Expected exactly one response key, got: "+n.join(", "));return e[n[0]]}(n))}});return function(){return i.unsubscribe()}},e}(),Vc=function(e,n,t){return new Pc(e,n,t)},Wc=function(e,n){return Yr(new v.GraphQLClient(e,{fetch:n}))},Hc=function(n){var t,r=n.url,o=n.wsUrl,a=n.lang,s=i.useStore().sessionStore,u=e.useState(),c=u[0],l=u[1],d=e.useState(),p=d[0],f=d[1],m=o||r.replace("graphql","cable"),g=(null==(t=s.loginStatus.authResponse)?void 0:t.accessToken)||"";return e.useEffect(function(){r&&l(Wc(r,i.fetch))},[r]),e.useEffect(function(){r&&g&&f(Vc(m||r.replace("graphql","cable"),g,a))},[r,m,g,a]),{graphqlSdk:c,gqlWsClient:p}},Fc={root:{boxShadow:"none","& .react-resizable-handle":{width:"24px",height:"24px",borderRadius:"4px",background:function(e){return e.palette.primary.main+" url("+N.default+")"},backgroundRepeat:"no-repeat",backgroundSize:"50%",backgroundPosition:"50%","&:hover":{backgroundColor:function(e){return e.palette.primary.dark}}},"& .react-resizable-handle:after":{display:"none"}},header:{height:"40px"},dragIcon:{width:"30px",height:"30px",marginLeft:function(e){return"-"+e.spacing(1)},padding:"8px",borderRadius:"4px",background:function(e){return e.palette.primary.main},"&:hover":{cursor:"move",background:function(e){return e.palette.primary.dark}}},actionButtons:{height:"30px",marginTop:"-7px"},settingsButton:{color:"rgba(255, 255, 255, 0.45)",borderRadius:"4px",borderTopRightRadius:0,borderBottomRightRadius:0,borderColor:"rgba(255,255,255,0.1)",background:"rgba(255,255,255,0.1)","&:focus":{boxShadow:"0 0 0 1px rgba(255, 255, 255, 0.1)"},"&:hover":{opacity:.8}},infoButton:{marginLeft:"1px",color:"rgba(255, 255, 255, 0.45)",borderRadius:0,borderColor:"rgba(255,255,255,0.1)",background:"rgba(255,255,255,0.1)","&:focus":{boxShadow:"0 0 0 1px rgba(255, 255, 255, 0.1)"},"&:hover":{opacity:.8}},deleteButton:{marginLeft:"1px",color:"rgba(255, 255, 255, 0.45)",borderRadius:"4px",borderTopLeftRadius:0,borderBottomLeftRadius:0,borderColor:"rgba(255,255,255,0.1)",background:"rgba(255,255,255,0.1)","&:focus":{boxShadow:"0 0 0 1px rgba(255, 255, 255, 0.1)"},"&:hover":{opacity:.8}},content:{height:"calc(100% - 40px)",padding:0,background:"transparent",border:"1px solid rgba(255, 255, 255, 0.2)",borderTop:"none",borderRadius:"4px",boxShadow:"0px 4px 8px rgba(0, 0, 0, 0.25)","&:last-child":{paddingBottom:0}}},Lc=["children","title","Widget","id","url","wsUrl","lang","data","filters","settings","openSettingsModal","onSettingsModalOpened","onSettingsModalClosed","sidePanelOpened","updateSidePanelProps","onDelete","editMode","version","requiredFeatures","extraPermissions"];function Xc(e,n){try{var t=e()}catch(e){return n(e)}return t&&t.then?t.then(void 0,n):t}var Yc=x.default.forwardRef(function(r,o){var a=r.children,s=r.title,u=r.Widget,c=r.id,l=r.url,d=r.wsUrl,p=r.lang,f=r.data,m=r.filters,b=r.settings,v=r.openSettingsModal,I=r.onSettingsModalOpened,y=r.onSettingsModalClosed,C=r.sidePanelOpened,A=r.updateSidePanelProps,w=r.onDelete,E=r.editMode,R=r.version,T=r.requiredFeatures,S=r.extraPermissions,O=k(r,Lc),N=Hc({url:l,wsUrl:d,lang:p}).graphqlSdk,G=i.useAccess(T,{extraPermissions:S}).hasAccess,B=e.useState(!1),M=B[0],V=B[1],W=e.useState(!1),H=W[0],F=W[1],L=t.useTranslation(),X=L.i18n,Y=L.t;return e.useEffect(function(){for(var e="translation",n=0,t=Object.entries(fc);n<t.length;n++){var r=t[n];X.addResources(r[0],e,r[1][e])}},[X]),x.default.createElement(n.Card,D({ref:o,sx:Fc.root},O),x.default.createElement(n.CardHeader,{avatar:E&&x.default.createElement(n.SvgIcon,{component:h.ReactComponent,className:"draggable-handle",sx:Fc.dragIcon,inheritViewBox:!0}),title:s,titleTypographyProps:{variant:"subtitle1"},action:E&&x.default.createElement(n.Stack,{direction:"row",sx:Fc.actionButtons},x.default.createElement(n.Button,{color:"secondary",sx:Fc.settingsButton,onClick:function(){I&&I()},disabled:!G},x.default.createElement(g.Settings,null)),R&&x.default.createElement(x.default.Fragment,null,x.default.createElement(n.Tooltip,{title:R},x.default.createElement(n.Button,{color:"secondary",sx:Fc.infoButton},x.default.createElement(g.Info,null)))),x.default.createElement(P,{open:H,confirmMessage:Y("Are you sure you want to delete this widget?"),confirmButtonText:Y("Delete"),cancelButtonText:Y("Cancel"),onCancel:function(){return F(!1)},onConfirm:function(){try{var e=function(){V(!1)};V(!0),F(!1);var n=function(){if(w)return Promise.resolve(w()).then(function(){})}();return Promise.resolve(n&&n.then?n.then(e):e())}catch(e){return Promise.reject(e)}}},x.default.createElement(n.Button,{color:"secondary",sx:Fc.deleteButton,onClick:function(e){e.stopPropagation(),F(!0)},disabled:M},x.default.createElement(g.Delete,null)))),sx:Fc.header}),x.default.createElement(n.CardContent,{sx:Fc.content},x.default.createElement(i.AccessGuard,{features:T,extraPermissions:S,onTrialRequest:function(e){try{return Promise.resolve(Xc(function(){return Promise.resolve(null==N?void 0:N.startTrial({input:{featureKey:e}})).then(function(){return Promise.resolve(i.refreshUserData()).then(function(){return!0})})},function(e){return console.error("Failed to start trial:",e),!1}))}catch(e){return Promise.reject(e)}},onFeatureRequest:function(e){var n=e.featureKey,t=e.requestType,r=e.workplaceId;try{return Promise.resolve(Xc(function(){return Promise.resolve(null==N?void 0:N.requestFeatureAccess({input:{featureKey:n,requestType:t.toUpperCase(),workplaceId:r}})).then(function(){return Promise.resolve(i.refreshUserData()).then(function(){return!0})})},function(e){return console.error("Failed to request feature access:",e),!1}))}catch(e){return Promise.reject(e)}}},x.default.createElement(u,{id:c,url:l,wsUrl:d,lang:p,data:f,filters:m,settings:b,openSettingsModal:v,onSettingsModalOpened:I,onSettingsModalClosed:y,sidePanelOpened:C,updateSidePanelProps:A,editMode:E}))),E&&a)});F.extend(zr);var Zc=function(e,n){return n.year(e.year()).month(e.month()).date(e.date())};exports.ActualStaffingCountsDocument=tr,exports.ApplicationInfoDocument=rr,exports.AssignOperatorDocument=kr,exports.AssignOperatorToWorkplaceDocument=Tt,exports.BulkUpsertStaffingPlansDocument=St,exports.CompanyConfigDocument=ir,exports.ConfirmTooltip=P,exports.CounterDirectoriesDocument=or,exports.CountersDocument=ar,exports.CreateDashboardDocument=Ot,exports.CreateOrderDocument=Nt,exports.CreateProductDocument=Dt,exports.CreateStaffingPlanDocument=kt,exports.CreateStatusChangeDocument=Gt,exports.CreateUserPresenceDocument=Bt,exports.CreateWidgetDocument=Mt,exports.CurrentUserDocument=sr,exports.DashboardFilters=function(r){var o=r.initialValues,a=r.onChange,s=r.shifts,u=r.onFeatureRequest,c=e.useState(function(){return null!=o?o:{dayType:exports.DayType.Production,dateRange:(e=F().format("YYYY-MM-DD"),{from:e+"T00:00:00",to:e+"T23:59:59"}),shiftIds:[]};var e}),l=c[0],d=c[1],p=e.useState(),f=p[0],m=p[1],g=e.useState(!1),h=g[0],b=g[1],v=e.useState(!1),I=v[0],y=v[1],C=e.useRef(null),A=i.useAccess([gi]),E=A.hasAccess,R=A.accessState,T=A.buttons,S=A.cooldownInfo,O=A.features,N=e.useMemo(function(){var e,n=O.find(function(e){return e.featureKey===gi});return null!=(e=null==n?void 0:n.daysSinceExpiry)?e:null},[O]),k=e.useMemo(function(){return T.filter(function(e){return"start_trial"!==e.action})},[T]);e.useEffect(function(){if(f){var e=ri.find(function(e){return e.id===f});if(e){var n=e.calculate({dayType:l.dayType,shifts:s,selectedShiftIds:l.shiftIds});d(function(e){return D({},e,{dateRange:n})}),a(D({},l,{dateRange:n}))}}},[l.dayType,l.shiftIds,s,f]);var G,B,M,P=t.useTranslation().t,V=e.useCallback(function(e){var n=D({},l,{dayType:e});d(n),a(n)},[l,a]),W=e.useCallback(function(e){var n=D({},l,{shiftIds:e});d(n),a(n)},[l,a]),H=e.useCallback(function(e){m(void 0);var n=D({},l,{dateRange:e});d(n),a(n)},[l,a]),L=e.useCallback(function(e,n){if(!e.needAccess||E){m(e.id);var t=D({},l,{dateRange:n});d(t),a(t)}else b(!0)},[l,E,a]),X=e.useCallback(function(){b(!1)},[]),Y=e.useCallback(function(){b(!0)},[]),Z=e.useCallback(function(){y(!0)},[]),j=e.useCallback(function(){y(!1)},[]);return x.default.createElement(n.Box,{sx:mi.container},x.default.createElement(n.Stack,{direction:"row",spacing:2,alignItems:"center"},x.default.createElement(n.TextField,{ref:C,label:P("filters.dateRange.label"),value:(G=l.dateRange,B=F(G.from).format("YYYY-MM-DD"),M=F(G.to).format("YYYY-MM-DD"),B===M?B:B+" - "+M),onClick:Z,size:"small",InputProps:{readOnly:!0,startAdornment:x.default.createElement(n.InputAdornment,{position:"start"},x.default.createElement(w.default,{sx:{fontSize:16}}))},sx:mi.dateField}),x.default.createElement(fi,{shifts:s,selectedShiftIds:l.shiftIds,onChange:W})),x.default.createElement(n.Popover,{open:I,anchorEl:C.current,onClose:j,anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"},sx:mi.popover},x.default.createElement(n.Box,{sx:mi.popoverContent},x.default.createElement(di,{dateRange:l.dateRange,dayType:l.dayType,shifts:s,selectedShiftIds:l.shiftIds,hasAccess:E,selectedPeriodId:f,onDayTypeChange:V,onDateRangeChange:H,onPeriodSelect:L,onAccessDenied:Y}))),x.default.createElement(jr,{open:h,onClose:X,accessState:R,buttons:k,daysSinceExpiry:N,cooldownInfo:S,onFeatureRequest:u}))},exports.DashboardsDocument=ur,exports.DepartmentsDocument=cr,exports.FloorPlansDocument=lr,exports.GetWorkplacePerformanceInsightsDocument=Br,exports.GraphqlWsClient=Pc,exports.ListActualStaffingCountsDocument=Mr,exports.ListStaffingPlansDocument=Pr,exports.ListStatusChangesDocument=Vr,exports.ListWorkOrdersDocument=Wr,exports.ListWorkplaceAssignmentsDocument=Hr,exports.ListWorkplacesDocument=Fr,exports.MetricCard=function(e){var r=e.title,i=e.metricLabel,o=e.metricValue,a=e.extraValue,s=e.animateBackgroundColor,u=e.rounded,c=k(e,yi),l=t.useTranslation().t,d=function(e){return{card:D({position:"relative",width:"100%",height:"100%"},e.showBgPattern&&{mixBlendMode:"hard-light",background:"url("+S.default+"), linear-gradient(329.66deg, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.75) 100%)",backgroundSize:"cover"},e.card.rounded?{borderRadius:"4px"}:{borderTopLeftRadius:0,borderTopRightRadius:0}),cardOverlay:D({position:"absolute",top:0,left:0,width:"100%",height:"100%",zIndex:-1},e.showBgPattern&&{mixBlendMode:"hard-light"},e.card.rounded?{borderRadius:"4px"}:{borderTopLeftRadius:0,borderTopRightRadius:0},e.cardOverlay,{animation:e.animateBackgroundColor?(t=e.backgroundColor,f.keyframes(ci||(ci=G(["\n 0% {\n background: ",";\n }\n\n 50% {\n background: ",";\n }\n\n 100% {\n background: ",";\n }\n"])),Ii(t,.5),Ii(t,1),Ii(t,.5))+" 3s infinite"):"none"}),cardHeader:{height:"3em",color:"#090B0E",borderBottom:"1px solid rgba(0, 0, 0, 0.1)",background:"rgba(0, 0, 0, 0.05)","& span":{lineHeight:"3em",fontSize:"1em",fontWeight:500}},cardContent:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",height:"80%",minWidth:"auto",minHeight:"auto",maxWidth:"none",background:"transparent","& > img":{flexBasis:"25%",minWidth:"125px",maxWidth:"25%"}},cardLabel:{width:"100%",lineHeight:"2.5em",fontSize:"1.8em",fontWeight:700,whiteSpace:"nowrap",overflow:"hidden",textAlign:"center",textOverflow:"ellipsis",color:"#090B0E"},cardValue:{lineHeight:"1.2em",textAlign:"center",fontSize:"1.6em",fontWeight:700,color:n.lighten("#090B0E",.15)},cardExtra:{lineHeight:"4em",textAlign:"center",fontSize:"1em",fontWeight:600,color:"#090B0E"}};var t}({card:{rounded:u},cardOverlay:{background:function(){var e=null==o?void 0:o.statusColor;if(e)switch(e){case exports.AndonLightColor.Green:return"linear-gradient(180deg, #31BF59 0%, #32D74B 100%)";case exports.AndonLightColor.Yellow:return"linear-gradient(360deg, #FFD60A 0%, #FFC12F 100%)";case exports.AndonLightColor.Red:return"linear-gradient(0deg, #F05C53 0%, #FF3B2F 100%)";default:return"rgba(187, 187, 187, 0.75)"}return"rgba(255, 255, 255, 0.75)"}()},showBgPattern:!0,backgroundColor:function(){var e=null==o?void 0:o.statusColor;if(e)switch(e){case exports.AndonLightColor.Green:return"#32D74B";case exports.AndonLightColor.Yellow:return"#FFC12F";case exports.AndonLightColor.Red:return"#FF3B2F";default:return"#BBBBBBBF"}return"#FFFFFFBF"}(),animateBackgroundColor:s});return x.default.createElement(n.Card,D({sx:d.card},c),x.default.createElement(n.Box,{sx:d.cardOverlay}),x.default.createElement(n.CardHeader,{title:x.default.createElement(bi,{line:1,text:r}),sx:d.cardHeader}),x.default.createElement(n.CardContent,{sx:d.cardContent},x.default.createElement(n.Typography,{sx:d.cardLabel},i),x.default.createElement(n.Typography,{sx:d.cardValue},o?function(e){var n=e.textValue;if(n){var t=F.duration(Number(n),"seconds");return Math.floor(t.asMinutes())+"m "+t.seconds()+"s"}return""}(o):x.default.createElement(t.Trans,{t:l},"No value for the selected metric")),a&&x.default.createElement(n.Typography,{sx:d.cardExtra},a)))},exports.MetricValuesDocument=dr,exports.MetricsDocument=pr,exports.NotificationsDocument=fr,exports.OrdersDocument=mr,exports.OrdersExecutionsDocument=gr,exports.PauseOrderExecutionDocument=Pt,exports.ProductsDocument=hr,exports.ReasonsDocument=br,exports.ReasonsRecommendationDocument=vr,exports.RemoveDashboardDocument=Vt,exports.RemoveStaffingPlanDocument=Wt,exports.RemoveUserPresenceDocument=Ht,exports.RemoveWidgetDocument=Ft,exports.RemoveWorkplaceUsersPresencesDocument=Lt,exports.RequestFeatureAccessDocument=Xt,exports.SetCounterDocument=Yt,exports.ShiftsDocument=Ir,exports.SortableSelect=function(e){var n=e.options,t=e.selected,r=e.onChange,i=function(e){var n,i,o,a=e.active,s=e.over;if(a.id!==(null==s?void 0:s.id)){var u=t.findIndex(function(e){return e===a.id}),c=t.findIndex(function(e){return e===(null==s?void 0:s.id)});r((n=t,i=u,o=c,function(e,n,t){const r=n<0?e.length+n:n;if(r>=0&&r<e.length){const r=t<0?e.length+t:t,[i]=e.splice(n,1);e.splice(r,0,i)}}(n=[...n],i,o),n))}};return x.default.createElement(es,{placeholder:e.placeholder,isMulti:!0,options:n,value:t.map(function(e){return n.find(function(n){return n.value===e})}),onChange:function(e){return r([].concat(e||[]).map(function(e){return e.value}))},closeMenuOnSelect:!1,components:{MultiValueContainer:dc,MultiValueLabel:pc,ValueContainer:function(e){return x.default.createElement(_u,{onDragEnd:i},x.default.createElement(ic,{items:t},e.children))}},styles:{control:function(e,n){return D({},e,{padding:"6px 0 6px 8px",borderColor:"rgba(255, 255, 255, 0.15)",background:"#1C1F25"},n.isFocused&&{borderColor:"#4E5A67",boxShadow:"none"},{"&:hover":{borderColor:"#4E5A67",boxShadow:"none"}})},menu:function(e){return D({},e,{background:"#1C1F25"})},option:function(e,n){return D({},e,{background:n.isFocused?"#2A2E34":"#1C1F25"})}}})},exports.StaffingPlansDocument=yr,exports.StandardRatesDocument=Cr,exports.StartOrderExecutionDocument=Zt,exports.StartTrialDocument=jt,exports.StatusChangeTransitionPermissionsDocument=xr,exports.StatusChangesDocument=Ar,exports.StopOrderExecutionDocument=zt,exports.UnassignOperatorDocument=Gr,exports.UnassignOperatorFromWorkplaceDocument=Jt,exports.UpdateDashboardDocument=_t,exports.UpdateNotificationDocument=Ut,exports.UpdateOrderDocument=qt,exports.UpdateOrderExecutionDocument=$t,exports.UpdateStaffingPlanDocument=Qt,exports.UpdateStatusChangeDocument=Kt,exports.UpdateWidgetDocument=er,exports.UpdateWorkOrderDocument=nr,exports.UsersDocument=wr,exports.UsersPresencesDocument=Er,exports.WidgetCard=Yc,exports.WidgetDocument=Rr,exports.WidgetsDocument=Tr,exports.WorkOrdersDocument=Sr,exports.WorkplaceAssignmentsDocument=Or,exports.WorkplaceEventDocument=Lr,exports.WorkplacePerformanceInsightsDocument=Nr,exports.WorkplacesDocument=Dr,exports.getCurrentShift=function(e,n){return n.find(function(n){return e.isBetween(n.startedAt,n.finishedAt)})||null},exports.getGqlWsClient=Vc,exports.getGraphqlSdk=Wc,exports.getRecentShift=function(e,n){return n.length?n.reduce(function(n,t){return Math.abs(e.diff(t.finishedAt))<Math.abs(e.diff(n.finishedAt))?t:n}):null},exports.getSdk=Yr,exports.normalizeShifts=function(e,n){var t=[];return e.forEach(function(e){var r=F(e.startedAt,"YYYY-MM-DD HH:mm:ss ZZ"),i=F(e.finishedAt,"YYYY-MM-DD HH:mm:ss ZZ");if(r=Zc(n,r),i=Zc(n,i),r.isAfter(i)){var o=r.subtract(1,"day"),a=i.add(1,"day");t.push({name:e.name,startedAt:o,finishedAt:i}),t.push({name:e.name,startedAt:r,finishedAt:a})}else t.push({name:e.name,startedAt:r,finishedAt:i})}),t},exports.useGqlClients=Hc,exports.version="1.5.10";
|
|
15
|
+
return A.createElement(Qa,Di({ref:t},r))}),es=Ka;const ns="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement;function ts(e){const n=Object.prototype.toString.call(e);return"[object Window]"===n||"[object global]"===n}function rs(e){return"nodeType"in e}function is(e){var n,t;return e?ts(e)?e:rs(e)&&null!=(n=null==(t=e.ownerDocument)?void 0:t.defaultView)?n:window:window}function os(e){const{Document:n}=is(e);return e instanceof n}function as(e){return!ts(e)&&e instanceof is(e).HTMLElement}function ss(e){return e instanceof is(e).SVGElement}function us(e){return e?ts(e)?e.document:rs(e)?os(e)?e:as(e)||ss(e)?e.ownerDocument:document:document:document}const cs=ns?e.useLayoutEffect:e.useEffect;function ls(n){const t=e.useRef(n);return cs(()=>{t.current=n}),e.useCallback(function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return null==t.current?void 0:t.current(...n)},[])}function ds(n,t){void 0===t&&(t=[n]);const r=e.useRef(n);return cs(()=>{r.current!==n&&(r.current=n)},t),r}function ps(n,t){const r=e.useRef();return e.useMemo(()=>{const e=n(r.current);return r.current=e,e},[...t])}function fs(n){const t=ls(n),r=e.useRef(null),i=e.useCallback(e=>{e!==r.current&&(null==t||t(e,r.current)),r.current=e},[]);return[r,i]}function ms(n){const t=e.useRef();return e.useEffect(()=>{t.current=n},[n]),t.current}let gs={};function hs(n,t){return e.useMemo(()=>{if(t)return t;const e=null==gs[n]?0:gs[n]+1;return gs[n]=e,n+"-"+e},[n,t])}function bs(e){return function(n){for(var t=arguments.length,r=new Array(t>1?t-1:0),i=1;i<t;i++)r[i-1]=arguments[i];return r.reduce((n,t)=>{const r=Object.entries(t);for(const[t,i]of r){const r=n[t];null!=r&&(n[t]=r+e*i)}return n},{...n})}}const vs=/*#__PURE__*/bs(1),Is=/*#__PURE__*/bs(-1);function ys(e){if(!e)return!1;const{KeyboardEvent:n}=is(e.target);return n&&e instanceof n}function Cs(e){if(function(e){if(!e)return!1;const{TouchEvent:n}=is(e.target);return n&&e instanceof n}(e)){if(e.touches&&e.touches.length){const{clientX:n,clientY:t}=e.touches[0];return{x:n,y:t}}if(e.changedTouches&&e.changedTouches.length){const{clientX:n,clientY:t}=e.changedTouches[0];return{x:n,y:t}}}return function(e){return"clientX"in e&&"clientY"in e}(e)?{x:e.clientX,y:e.clientY}:null}const xs=/*#__PURE__*/Object.freeze({Translate:{toString(e){if(!e)return;const{x:n,y:t}=e;return"translate3d("+(n?Math.round(n):0)+"px, "+(t?Math.round(t):0)+"px, 0)"}},Scale:{toString(e){if(!e)return;const{scaleX:n,scaleY:t}=e;return"scaleX("+n+") scaleY("+t+")"}},Transform:{toString(e){if(e)return[xs.Translate.toString(e),xs.Scale.toString(e)].join(" ")}},Transition:{toString(e){let{property:n,duration:t,easing:r}=e;return n+" "+t+"ms "+r}}}),As="a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";function ws(e){return e.matches(As)?e:e.querySelector(As)}const Es={display:"none"};function Rs(e){let{id:n,value:t}=e;return x.default.createElement("div",{id:n,style:Es},t)}function Ts(e){let{id:n,announcement:t,ariaLiveType:r="assertive"}=e;return x.default.createElement("div",{id:n,style:{position:"fixed",top:0,left:0,width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0 0 0 0)",clipPath:"inset(100%)",whiteSpace:"nowrap"},role:"status","aria-live":r,"aria-atomic":!0},t)}const Ss=/*#__PURE__*/e.createContext(null),Os={draggable:"\n To pick up a draggable item, press the space bar.\n While dragging, use the arrow keys to move the item.\n Press space again to drop the item in its new position, or press escape to cancel.\n "},Ns={onDragStart(e){let{active:n}=e;return"Picked up draggable item "+n.id+"."},onDragOver(e){let{active:n,over:t}=e;return t?"Draggable item "+n.id+" was moved over droppable area "+t.id+".":"Draggable item "+n.id+" is no longer over a droppable area."},onDragEnd(e){let{active:n,over:t}=e;return t?"Draggable item "+n.id+" was dropped over droppable area "+t.id:"Draggable item "+n.id+" was dropped."},onDragCancel(e){let{active:n}=e;return"Dragging was cancelled. Draggable item "+n.id+" was dropped."}};function Ds(n){let{announcements:t=Ns,container:r,hiddenTextDescribedById:i,screenReaderInstructions:o=Os}=n;const{announce:a,announcement:s}=function(){const[n,t]=e.useState("");return{announce:e.useCallback(e=>{null!=e&&t(e)},[]),announcement:n}}(),u=hs("DndLiveRegion"),[c,l]=e.useState(!1);if(e.useEffect(()=>{l(!0)},[]),function(n){const t=e.useContext(Ss);e.useEffect(()=>{if(!t)throw new Error("useDndMonitor must be used within a children of <DndContext>");return t(n)},[n,t])}(e.useMemo(()=>({onDragStart(e){let{active:n}=e;a(t.onDragStart({active:n}))},onDragMove(e){let{active:n,over:r}=e;t.onDragMove&&a(t.onDragMove({active:n,over:r}))},onDragOver(e){let{active:n,over:r}=e;a(t.onDragOver({active:n,over:r}))},onDragEnd(e){let{active:n,over:r}=e;a(t.onDragEnd({active:n,over:r}))},onDragCancel(e){let{active:n,over:r}=e;a(t.onDragCancel({active:n,over:r}))}}),[a,t])),!c)return null;const d=x.default.createElement(x.default.Fragment,null,x.default.createElement(Rs,{id:i,value:o.draggable}),x.default.createElement(Ts,{id:u,announcement:s}));return r?m.createPortal(d,r):d}var ks;function Gs(){}!function(e){e.DragStart="dragStart",e.DragMove="dragMove",e.DragEnd="dragEnd",e.DragCancel="dragCancel",e.DragOver="dragOver",e.RegisterDroppable="registerDroppable",e.SetDroppableDisabled="setDroppableDisabled",e.UnregisterDroppable="unregisterDroppable"}(ks||(ks={}));const Bs=/*#__PURE__*/Object.freeze({x:0,y:0});function Ms(e,n){let{data:{value:t}}=e,{data:{value:r}}=n;return r-t}function Ps(e,n){const t=Math.max(n.top,e.top),r=Math.max(n.left,e.left),i=Math.min(n.left+n.width,e.left+e.width),o=Math.min(n.top+n.height,e.top+e.height);if(r<i&&t<o){const a=(i-r)*(o-t);return Number((a/(n.width*n.height+e.width*e.height-a)).toFixed(4))}return 0}const Vs=e=>{let{collisionRect:n,droppableRects:t,droppableContainers:r}=e;const i=[];for(const e of r){const{id:r}=e,o=t.get(r);if(o){const t=Ps(o,n);t>0&&i.push({id:r,data:{droppableContainer:e,value:t}})}}return i.sort(Ms)};function Ws(e,n){return e&&n?{x:e.left-n.left,y:e.top-n.top}:Bs}function Hs(e){return function(n){for(var t=arguments.length,r=new Array(t>1?t-1:0),i=1;i<t;i++)r[i-1]=arguments[i];return r.reduce((n,t)=>({...n,top:n.top+e*t.y,bottom:n.bottom+e*t.y,left:n.left+e*t.x,right:n.right+e*t.x}),{...n})}}const Fs=/*#__PURE__*/Hs(1),Ls={ignoreTransform:!1};function Xs(e,n){void 0===n&&(n=Ls);let t=e.getBoundingClientRect();if(n.ignoreTransform){const{transform:n,transformOrigin:r}=is(e).getComputedStyle(e);n&&(t=function(e,n,t){const r=function(e){if(e.startsWith("matrix3d(")){const n=e.slice(9,-1).split(/, /);return{x:+n[12],y:+n[13],scaleX:+n[0],scaleY:+n[5]}}if(e.startsWith("matrix(")){const n=e.slice(7,-1).split(/, /);return{x:+n[4],y:+n[5],scaleX:+n[0],scaleY:+n[3]}}return null}(n);if(!r)return e;const{scaleX:i,scaleY:o,x:a,y:s}=r,u=e.left-a-(1-i)*parseFloat(t),c=e.top-s-(1-o)*parseFloat(t.slice(t.indexOf(" ")+1)),l=i?e.width/i:e.width,d=o?e.height/o:e.height;return{width:l,height:d,top:c,right:u+l,bottom:c+d,left:u}}(t,n,r))}const{top:r,left:i,width:o,height:a,bottom:s,right:u}=t;return{top:r,left:i,width:o,height:a,bottom:s,right:u}}function Ys(e){return Xs(e,{ignoreTransform:!0})}function Zs(e,n){const t=[];return e?function r(i){if(null!=n&&t.length>=n)return t;if(!i)return t;if(os(i)&&null!=i.scrollingElement&&!t.includes(i.scrollingElement))return t.push(i.scrollingElement),t;if(!as(i)||ss(i))return t;if(t.includes(i))return t;const o=is(e).getComputedStyle(i);return i!==e&&function(e,n){void 0===n&&(n=is(e).getComputedStyle(e));const t=/(auto|scroll|overlay)/;return["overflow","overflowX","overflowY"].some(e=>{const r=n[e];return"string"==typeof r&&t.test(r)})}(i,o)&&t.push(i),function(e,n){return void 0===n&&(n=is(e).getComputedStyle(e)),"fixed"===n.position}(i,o)?t:r(i.parentNode)}(e):t}function js(e){const[n]=Zs(e,1);return null!=n?n:null}function zs(e){return ns&&e?ts(e)?e:rs(e)?os(e)||e===us(e).scrollingElement?window:as(e)?e:null:null:null}function Js(e){return ts(e)?e.scrollX:e.scrollLeft}function _s(e){return ts(e)?e.scrollY:e.scrollTop}function Us(e){return{x:Js(e),y:_s(e)}}var qs;function $s(e){return!(!ns||!e)&&e===document.scrollingElement}function Qs(e){const n={x:0,y:0},t=$s(e)?{height:window.innerHeight,width:window.innerWidth}:{height:e.clientHeight,width:e.clientWidth},r={x:e.scrollWidth-t.width,y:e.scrollHeight-t.height};return{isTop:e.scrollTop<=n.y,isLeft:e.scrollLeft<=n.x,isBottom:e.scrollTop>=r.y,isRight:e.scrollLeft>=r.x,maxScroll:r,minScroll:n}}!function(e){e[e.Forward=1]="Forward",e[e.Backward=-1]="Backward"}(qs||(qs={}));const Ks={x:.2,y:.2};function eu(e,n,t,r,i){let{top:o,left:a,right:s,bottom:u}=t;void 0===r&&(r=10),void 0===i&&(i=Ks);const{isTop:c,isBottom:l,isLeft:d,isRight:p}=Qs(e),f={x:0,y:0},m={x:0,y:0},g=n.height*i.y,h=n.width*i.x;return!c&&o<=n.top+g?(f.y=qs.Backward,m.y=r*Math.abs((n.top+g-o)/g)):!l&&u>=n.bottom-g&&(f.y=qs.Forward,m.y=r*Math.abs((n.bottom-g-u)/g)),!p&&s>=n.right-h?(f.x=qs.Forward,m.x=r*Math.abs((n.right-h-s)/h)):!d&&a<=n.left+h&&(f.x=qs.Backward,m.x=r*Math.abs((n.left+h-a)/h)),{direction:f,speed:m}}function nu(e){if(e===document.scrollingElement){const{innerWidth:e,innerHeight:n}=window;return{top:0,left:0,right:e,bottom:n,width:e,height:n}}const{top:n,left:t,right:r,bottom:i}=e.getBoundingClientRect();return{top:n,left:t,right:r,bottom:i,width:e.clientWidth,height:e.clientHeight}}function tu(e){return e.reduce((e,n)=>vs(e,Us(n)),Bs)}const ru=[["x",["left","right"],function(e){return e.reduce((e,n)=>e+Js(n),0)}],["y",["top","bottom"],function(e){return e.reduce((e,n)=>e+_s(n),0)}]];class iu{constructor(e,n){this.rect=void 0,this.width=void 0,this.height=void 0,this.top=void 0,this.bottom=void 0,this.right=void 0,this.left=void 0;const t=Zs(n),r=tu(t);this.rect={...e},this.width=e.width,this.height=e.height;for(const[e,n,i]of ru)for(const o of n)Object.defineProperty(this,o,{get:()=>{const n=i(t);return this.rect[o]+(r[e]-n)},enumerable:!0});Object.defineProperty(this,"rect",{enumerable:!1})}}class ou{constructor(e){this.target=void 0,this.listeners=[],this.removeAll=()=>{this.listeners.forEach(e=>{var n;return null==(n=this.target)?void 0:n.removeEventListener(...e)})},this.target=e}add(e,n,t){var r;null==(r=this.target)||r.addEventListener(e,n,t),this.listeners.push([e,n,t])}}function au(e,n){const t=Math.abs(e.x),r=Math.abs(e.y);return"number"==typeof n?Math.sqrt(t**2+r**2)>n:"x"in n&&"y"in n?t>n.x&&r>n.y:"x"in n?t>n.x:"y"in n&&r>n.y}var su,uu;function cu(e){e.preventDefault()}function lu(e){e.stopPropagation()}!function(e){e.Click="click",e.DragStart="dragstart",e.Keydown="keydown",e.ContextMenu="contextmenu",e.Resize="resize",e.SelectionChange="selectionchange",e.VisibilityChange="visibilitychange"}(su||(su={})),function(e){e.Space="Space",e.Down="ArrowDown",e.Right="ArrowRight",e.Left="ArrowLeft",e.Up="ArrowUp",e.Esc="Escape",e.Enter="Enter",e.Tab="Tab"}(uu||(uu={}));const du={start:[uu.Space,uu.Enter],cancel:[uu.Esc],end:[uu.Space,uu.Enter,uu.Tab]},pu=(e,n)=>{let{currentCoordinates:t}=n;switch(e.code){case uu.Right:return{...t,x:t.x+25};case uu.Left:return{...t,x:t.x-25};case uu.Down:return{...t,y:t.y+25};case uu.Up:return{...t,y:t.y-25}}};class fu{constructor(e){this.props=void 0,this.autoScrollEnabled=!1,this.referenceCoordinates=void 0,this.listeners=void 0,this.windowListeners=void 0,this.props=e;const{event:{target:n}}=e;this.props=e,this.listeners=new ou(us(n)),this.windowListeners=new ou(is(n)),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleCancel=this.handleCancel.bind(this),this.attach()}attach(){this.handleStart(),this.windowListeners.add(su.Resize,this.handleCancel),this.windowListeners.add(su.VisibilityChange,this.handleCancel),setTimeout(()=>this.listeners.add(su.Keydown,this.handleKeyDown))}handleStart(){const{activeNode:e,onStart:n}=this.props,t=e.node.current;t&&function(e,n){if(void 0===n&&(n=Xs),!e)return;const{top:t,left:r,bottom:i,right:o}=n(e);js(e)&&(i<=0||o<=0||t>=window.innerHeight||r>=window.innerWidth)&&e.scrollIntoView({block:"center",inline:"center"})}(t),n(Bs)}handleKeyDown(e){if(ys(e)){const{active:n,context:t,options:r}=this.props,{keyboardCodes:i=du,coordinateGetter:o=pu,scrollBehavior:a="smooth"}=r,{code:s}=e;if(i.end.includes(s))return void this.handleEnd(e);if(i.cancel.includes(s))return void this.handleCancel(e);const{collisionRect:u}=t.current,c=u?{x:u.left,y:u.top}:Bs;this.referenceCoordinates||(this.referenceCoordinates=c);const l=o(e,{active:n,context:t.current,currentCoordinates:c});if(l){const n=Is(l,c),r={x:0,y:0},{scrollableAncestors:i}=t.current;for(const t of i){const i=e.code,{isTop:o,isRight:s,isLeft:u,isBottom:c,maxScroll:d,minScroll:p}=Qs(t),f=nu(t),m={x:Math.min(i===uu.Right?f.right-f.width/2:f.right,Math.max(i===uu.Right?f.left:f.left+f.width/2,l.x)),y:Math.min(i===uu.Down?f.bottom-f.height/2:f.bottom,Math.max(i===uu.Down?f.top:f.top+f.height/2,l.y))},g=i===uu.Down&&!c||i===uu.Up&&!o;if((i===uu.Right&&!s||i===uu.Left&&!u)&&m.x!==l.x){const e=t.scrollLeft+n.x,o=i===uu.Right&&e<=d.x||i===uu.Left&&e>=p.x;if(o&&!n.y)return void t.scrollTo({left:e,behavior:a});r.x=o?t.scrollLeft-e:i===uu.Right?t.scrollLeft-d.x:t.scrollLeft-p.x,r.x&&t.scrollBy({left:-r.x,behavior:a});break}if(g&&m.y!==l.y){const e=t.scrollTop+n.y,o=i===uu.Down&&e<=d.y||i===uu.Up&&e>=p.y;if(o&&!n.x)return void t.scrollTo({top:e,behavior:a});r.y=o?t.scrollTop-e:i===uu.Down?t.scrollTop-d.y:t.scrollTop-p.y,r.y&&t.scrollBy({top:-r.y,behavior:a});break}}this.handleMove(e,vs(Is(l,this.referenceCoordinates),r))}}}handleMove(e,n){const{onMove:t}=this.props;e.preventDefault(),t(n)}handleEnd(e){const{onEnd:n}=this.props;e.preventDefault(),this.detach(),n()}handleCancel(e){const{onCancel:n}=this.props;e.preventDefault(),this.detach(),n()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll()}}function mu(e){return Boolean(e&&"distance"in e)}function gu(e){return Boolean(e&&"delay"in e)}fu.activators=[{eventName:"onKeyDown",handler:(e,n,t)=>{let{keyboardCodes:r=du,onActivation:i}=n,{active:o}=t;const{code:a}=e.nativeEvent;if(r.start.includes(a)){const n=o.activatorNode.current;return!(n&&e.target!==n||(e.preventDefault(),null==i||i({event:e.nativeEvent}),0))}return!1}}];class hu{constructor(e,n,t){var r;void 0===t&&(t=function(e){const{EventTarget:n}=is(e);return e instanceof n?e:us(e)}(e.event.target)),this.props=void 0,this.events=void 0,this.autoScrollEnabled=!0,this.document=void 0,this.activated=!1,this.initialCoordinates=void 0,this.timeoutId=null,this.listeners=void 0,this.documentListeners=void 0,this.windowListeners=void 0,this.props=e,this.events=n;const{event:i}=e,{target:o}=i;this.props=e,this.events=n,this.document=us(o),this.documentListeners=new ou(this.document),this.listeners=new ou(t),this.windowListeners=new ou(is(o)),this.initialCoordinates=null!=(r=Cs(i))?r:Bs,this.handleStart=this.handleStart.bind(this),this.handleMove=this.handleMove.bind(this),this.handleEnd=this.handleEnd.bind(this),this.handleCancel=this.handleCancel.bind(this),this.handleKeydown=this.handleKeydown.bind(this),this.removeTextSelection=this.removeTextSelection.bind(this),this.attach()}attach(){const{events:e,props:{options:{activationConstraint:n,bypassActivationConstraint:t}}}=this;if(this.listeners.add(e.move.name,this.handleMove,{passive:!1}),this.listeners.add(e.end.name,this.handleEnd),e.cancel&&this.listeners.add(e.cancel.name,this.handleCancel),this.windowListeners.add(su.Resize,this.handleCancel),this.windowListeners.add(su.DragStart,cu),this.windowListeners.add(su.VisibilityChange,this.handleCancel),this.windowListeners.add(su.ContextMenu,cu),this.documentListeners.add(su.Keydown,this.handleKeydown),n){if(null!=t&&t({event:this.props.event,activeNode:this.props.activeNode,options:this.props.options}))return this.handleStart();if(gu(n))return this.timeoutId=setTimeout(this.handleStart,n.delay),void this.handlePending(n);if(mu(n))return void this.handlePending(n)}this.handleStart()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll(),setTimeout(this.documentListeners.removeAll,50),null!==this.timeoutId&&(clearTimeout(this.timeoutId),this.timeoutId=null)}handlePending(e,n){const{active:t,onPending:r}=this.props;r(t,e,this.initialCoordinates,n)}handleStart(){const{initialCoordinates:e}=this,{onStart:n}=this.props;e&&(this.activated=!0,this.documentListeners.add(su.Click,lu,{capture:!0}),this.removeTextSelection(),this.documentListeners.add(su.SelectionChange,this.removeTextSelection),n(e))}handleMove(e){var n;const{activated:t,initialCoordinates:r,props:i}=this,{onMove:o,options:{activationConstraint:a}}=i;if(!r)return;const s=null!=(n=Cs(e))?n:Bs,u=Is(r,s);if(!t&&a){if(mu(a)){if(null!=a.tolerance&&au(u,a.tolerance))return this.handleCancel();if(au(u,a.distance))return this.handleStart()}return gu(a)&&au(u,a.tolerance)?this.handleCancel():void this.handlePending(a,u)}e.cancelable&&e.preventDefault(),o(s)}handleEnd(){const{onAbort:e,onEnd:n}=this.props;this.detach(),this.activated||e(this.props.active),n()}handleCancel(){const{onAbort:e,onCancel:n}=this.props;this.detach(),this.activated||e(this.props.active),n()}handleKeydown(e){e.code===uu.Esc&&this.handleCancel()}removeTextSelection(){var e;null==(e=this.document.getSelection())||e.removeAllRanges()}}const bu={cancel:{name:"pointercancel"},move:{name:"pointermove"},end:{name:"pointerup"}};class vu extends hu{constructor(e){const{event:n}=e,t=us(n.target);super(e,bu,t)}}vu.activators=[{eventName:"onPointerDown",handler:(e,n)=>{let{nativeEvent:t}=e,{onActivation:r}=n;return!(!t.isPrimary||0!==t.button||(null==r||r({event:t}),0))}}];const Iu={move:{name:"mousemove"},end:{name:"mouseup"}};var yu;!function(e){e[e.RightClick=2]="RightClick"}(yu||(yu={})),class extends hu{constructor(e){super(e,Iu,us(e.event.target))}}.activators=[{eventName:"onMouseDown",handler:(e,n)=>{let{nativeEvent:t}=e,{onActivation:r}=n;return t.button!==yu.RightClick&&(null==r||r({event:t}),!0)}}];const Cu={cancel:{name:"touchcancel"},move:{name:"touchmove"},end:{name:"touchend"}};var xu,Au;(class extends hu{constructor(e){super(e,Cu)}static setup(){return window.addEventListener(Cu.move.name,e,{capture:!1,passive:!1}),function(){window.removeEventListener(Cu.move.name,e)};function e(){}}}).activators=[{eventName:"onTouchStart",handler:(e,n)=>{let{nativeEvent:t}=e,{onActivation:r}=n;const{touches:i}=t;return!(i.length>1||(null==r||r({event:t}),0))}}],function(e){e[e.Pointer=0]="Pointer",e[e.DraggableRect=1]="DraggableRect"}(xu||(xu={})),function(e){e[e.TreeOrder=0]="TreeOrder",e[e.ReversedTreeOrder=1]="ReversedTreeOrder"}(Au||(Au={}));const wu={x:{[qs.Backward]:!1,[qs.Forward]:!1},y:{[qs.Backward]:!1,[qs.Forward]:!1}};var Eu,Ru;!function(e){e[e.Always=0]="Always",e[e.BeforeDragging=1]="BeforeDragging",e[e.WhileDragging=2]="WhileDragging"}(Eu||(Eu={})),function(e){e.Optimized="optimized"}(Ru||(Ru={}));const Tu=/*#__PURE__*/new Map;function Su(e,n){return ps(t=>e?t||("function"==typeof n?n(e):e):null,[n,e])}function Ou(n){let{callback:t,disabled:r}=n;const i=ls(t),o=e.useMemo(()=>{if(r||"undefined"==typeof window||void 0===window.ResizeObserver)return;const{ResizeObserver:e}=window;return new e(i)},[r]);return e.useEffect(()=>()=>null==o?void 0:o.disconnect(),[o]),o}function Nu(e){return new iu(Xs(e),e)}function Du(n,t,r){void 0===t&&(t=Nu);const[i,o]=e.useState(null);function a(){o(e=>{if(!n)return null;var i;if(!1===n.isConnected)return null!=(i=null!=e?e:r)?i:null;const o=t(n);return JSON.stringify(e)===JSON.stringify(o)?e:o})}const s=function(n){let{callback:t,disabled:r}=n;const i=ls(t),o=e.useMemo(()=>{if(r||"undefined"==typeof window||void 0===window.MutationObserver)return;const{MutationObserver:e}=window;return new e(i)},[i,r]);return e.useEffect(()=>()=>null==o?void 0:o.disconnect(),[o]),o}({callback(e){if(n)for(const t of e){const{type:e,target:r}=t;if("childList"===e&&r instanceof HTMLElement&&r.contains(n)){a();break}}}}),u=Ou({callback:a});return cs(()=>{a(),n?(null==u||u.observe(n),null==s||s.observe(document.body,{childList:!0,subtree:!0})):(null==u||u.disconnect(),null==s||s.disconnect())},[n]),i}const ku=[];function Gu(n,t){void 0===t&&(t=[]);const r=e.useRef(null);return e.useEffect(()=>{r.current=null},t),e.useEffect(()=>{const e=n!==Bs;e&&!r.current&&(r.current=n),!e&&r.current&&(r.current=null)},[n]),r.current?Is(n,r.current):Bs}function Bu(n){return e.useMemo(()=>n?function(e){const n=e.innerWidth,t=e.innerHeight;return{top:0,left:0,right:n,bottom:t,width:n,height:t}}(n):null,[n])}const Mu=[],Pu=[{sensor:vu,options:{}},{sensor:fu,options:{}}],Vu={current:{}},Wu={draggable:{measure:Ys},droppable:{measure:Ys,strategy:Eu.WhileDragging,frequency:Ru.Optimized},dragOverlay:{measure:Xs}};class Hu extends Map{get(e){var n;return null!=e&&null!=(n=super.get(e))?n:void 0}toArray(){return Array.from(this.values())}getEnabled(){return this.toArray().filter(e=>{let{disabled:n}=e;return!n})}getNodeFor(e){var n,t;return null!=(n=null==(t=this.get(e))?void 0:t.node.current)?n:void 0}}const Fu={activatorEvent:null,active:null,activeNode:null,activeNodeRect:null,collisions:null,containerNodeRect:null,draggableNodes:/*#__PURE__*/new Map,droppableRects:/*#__PURE__*/new Map,droppableContainers:/*#__PURE__*/new Hu,over:null,dragOverlay:{nodeRef:{current:null},rect:null,setRef:Gs},scrollableAncestors:[],scrollableAncestorRects:[],measuringConfiguration:Wu,measureDroppableContainers:Gs,windowRect:null,measuringScheduled:!1},Lu=/*#__PURE__*/e.createContext({activatorEvent:null,activators:[],active:null,activeNodeRect:null,ariaDescribedById:{draggable:""},dispatch:Gs,draggableNodes:/*#__PURE__*/new Map,over:null,measureDroppableContainers:Gs}),Xu=/*#__PURE__*/e.createContext(Fu);function Yu(){return{draggable:{active:null,initialCoordinates:{x:0,y:0},nodes:new Map,translate:{x:0,y:0}},droppable:{containers:new Hu}}}function Zu(e,n){switch(n.type){case ks.DragStart:return{...e,draggable:{...e.draggable,initialCoordinates:n.initialCoordinates,active:n.active}};case ks.DragMove:return null==e.draggable.active?e:{...e,draggable:{...e.draggable,translate:{x:n.coordinates.x-e.draggable.initialCoordinates.x,y:n.coordinates.y-e.draggable.initialCoordinates.y}}};case ks.DragEnd:case ks.DragCancel:return{...e,draggable:{...e.draggable,active:null,initialCoordinates:{x:0,y:0},translate:{x:0,y:0}}};case ks.RegisterDroppable:{const{element:t}=n,{id:r}=t,i=new Hu(e.droppable.containers);return i.set(r,t),{...e,droppable:{...e.droppable,containers:i}}}case ks.SetDroppableDisabled:{const{id:t,key:r,disabled:i}=n,o=e.droppable.containers.get(t);if(!o||r!==o.key)return e;const a=new Hu(e.droppable.containers);return a.set(t,{...o,disabled:i}),{...e,droppable:{...e.droppable,containers:a}}}case ks.UnregisterDroppable:{const{id:t,key:r}=n,i=e.droppable.containers.get(t);if(!i||r!==i.key)return e;const o=new Hu(e.droppable.containers);return o.delete(t),{...e,droppable:{...e.droppable,containers:o}}}default:return e}}function ju(n){let{disabled:t}=n;const{active:r,activatorEvent:i,draggableNodes:o}=e.useContext(Lu),a=ms(i),s=ms(null==r?void 0:r.id);return e.useEffect(()=>{if(!t&&!i&&a&&null!=s){if(!ys(a))return;if(document.activeElement===a.target)return;const e=o.get(s);if(!e)return;const{activatorNode:n,node:t}=e;if(!n.current&&!t.current)return;requestAnimationFrame(()=>{for(const e of[n.current,t.current]){if(!e)continue;const n=ws(e);if(n){n.focus();break}}})}},[i,t,o,s,a]),null}const zu=/*#__PURE__*/e.createContext({...Bs,scaleX:1,scaleY:1});var Ju;!function(e){e[e.Uninitialized=0]="Uninitialized",e[e.Initializing=1]="Initializing",e[e.Initialized=2]="Initialized"}(Ju||(Ju={}));const _u=/*#__PURE__*/e.memo(function(n){var t,r,i,o;let{id:a,accessibility:s,autoScroll:u=!0,children:c,sensors:l=Pu,collisionDetection:d=Vs,measuring:p,modifiers:f,...g}=n;const h=e.useReducer(Zu,void 0,Yu),[b,v]=h,[I,y]=function(){const[n]=e.useState(()=>new Set),t=e.useCallback(e=>(n.add(e),()=>n.delete(e)),[n]),r=e.useCallback(e=>{let{type:t,event:r}=e;n.forEach(e=>{var n;return null==(n=e[t])?void 0:n.call(e,r)})},[n]);return[r,t]}(),[C,A]=e.useState(Ju.Uninitialized),w=C===Ju.Initialized,{draggable:{active:E,nodes:R,translate:T},droppable:{containers:S}}=b,O=null!=E?R.get(E):null,N=e.useRef({initial:null,translated:null}),D=e.useMemo(()=>{var e;return null!=E?{id:E,data:null!=(e=null==O?void 0:O.data)?e:Vu,rect:N}:null},[E,O]),k=e.useRef(null),[G,B]=e.useState(null),[M,P]=e.useState(null),V=ds(g,Object.values(g)),W=hs("DndDescribedBy",a),H=e.useMemo(()=>S.getEnabled(),[S]),F=function(n){return e.useMemo(()=>({draggable:{...Wu.draggable,...null==n?void 0:n.draggable},droppable:{...Wu.droppable,...null==n?void 0:n.droppable},dragOverlay:{...Wu.dragOverlay,...null==n?void 0:n.dragOverlay}}),[null==n?void 0:n.draggable,null==n?void 0:n.droppable,null==n?void 0:n.dragOverlay])}(p),{droppableRects:L,measureDroppableContainers:X,measuringScheduled:Y}=function(n,t){let{dragging:r,dependencies:i,config:o}=t;const[a,s]=e.useState(null),{frequency:u,measure:c,strategy:l}=o,d=e.useRef(n),p=function(){switch(l){case Eu.Always:return!1;case Eu.BeforeDragging:return r;default:return!r}}(),f=ds(p),m=e.useCallback(function(e){void 0===e&&(e=[]),f.current||s(n=>null===n?e:n.concat(e.filter(e=>!n.includes(e))))},[f]),g=e.useRef(null),h=ps(e=>{if(p&&!r)return Tu;if(!e||e===Tu||d.current!==n||null!=a){const e=new Map;for(let t of n){if(!t)continue;if(a&&a.length>0&&!a.includes(t.id)&&t.rect.current){e.set(t.id,t.rect.current);continue}const n=t.node.current,r=n?new iu(c(n),n):null;t.rect.current=r,r&&e.set(t.id,r)}return e}return e},[n,a,r,p,c]);return e.useEffect(()=>{d.current=n},[n]),e.useEffect(()=>{p||m()},[r,p]),e.useEffect(()=>{a&&a.length>0&&s(null)},[JSON.stringify(a)]),e.useEffect(()=>{p||"number"!=typeof u||null!==g.current||(g.current=setTimeout(()=>{m(),g.current=null},u))},[u,p,m,...i]),{droppableRects:h,measureDroppableContainers:m,measuringScheduled:null!=a}}(H,{dragging:w,dependencies:[T.x,T.y],config:F.droppable}),Z=function(e,n){const t=null!=n?e.get(n):void 0,r=t?t.node.current:null;return ps(e=>{var t;return null==n?null:null!=(t=null!=r?r:e)?t:null},[r,n])}(R,E),j=e.useMemo(()=>M?Cs(M):null,[M]),z=function(){const e=w&&!(!1===(null==G?void 0:G.autoScrollEnabled))&&!("object"==typeof u?!1===u.enabled:!1===u);return"object"==typeof u?{...u,enabled:e}:{enabled:e}}(),J=function(e,n){return Su(e,n)}(Z,F.draggable.measure);!function(n){let{activeNode:t,measure:r,initialRect:i,config:o=!0}=n;const a=e.useRef(!1),{x:s,y:u}="boolean"==typeof o?{x:o,y:o}:o;cs(()=>{if(!s&&!u||!t)return void(a.current=!1);if(a.current||!i)return;const e=null==t?void 0:t.node.current;if(!e||!1===e.isConnected)return;const n=Ws(r(e),i);if(s||(n.x=0),u||(n.y=0),a.current=!0,Math.abs(n.x)>0||Math.abs(n.y)>0){const t=js(e);t&&t.scrollBy({top:n.y,left:n.x})}},[t,s,u,i,r])}({activeNode:null!=E?R.get(E):null,config:z.layoutShiftCompensation,initialRect:J,measure:F.draggable.measure});const _=Du(Z,F.draggable.measure,J),U=Du(Z?Z.parentElement:null),q=e.useRef({activatorEvent:null,active:null,activeNode:Z,collisionRect:null,collisions:null,droppableRects:L,draggableNodes:R,draggingNode:null,draggingNodeRect:null,droppableContainers:S,over:null,scrollableAncestors:[],scrollAdjustedTranslate:null}),$=S.getNodeFor(null==(t=q.current.over)?void 0:t.id),Q=function(n){let{measure:t}=n;const[r,i]=e.useState(null),o=e.useCallback(e=>{for(const{target:n}of e)if(as(n)){i(e=>{const r=t(n);return e?{...e,width:r.width,height:r.height}:r});break}},[t]),a=Ou({callback:o}),s=e.useCallback(e=>{const n=function(e){if(!e)return null;if(e.children.length>1)return e;const n=e.children[0];return as(n)?n:e}(e);null==a||a.disconnect(),n&&(null==a||a.observe(n)),i(n?t(n):null)},[t,a]),[u,c]=fs(s);return e.useMemo(()=>({nodeRef:u,rect:r,setRef:c}),[r,u,c])}({measure:F.dragOverlay.measure}),K=null!=(r=Q.nodeRef.current)?r:Z,ee=w?null!=(i=Q.rect)?i:_:null,ne=Boolean(Q.nodeRef.current&&Q.rect),te=Ws(re=ne?null:_,Su(re));var re;const ie=Bu(K?is(K):null),oe=function(n){const t=e.useRef(n),r=ps(e=>n?e&&e!==ku&&n&&t.current&&n.parentNode===t.current.parentNode?e:Zs(n):ku,[n]);return e.useEffect(()=>{t.current=n},[n]),r}(w?null!=$?$:Z:null),ae=function(n,t){void 0===t&&(t=Xs);const[r]=n,i=Bu(r?is(r):null),[o,a]=e.useState(Mu);function s(){a(()=>n.length?n.map(e=>$s(e)?i:new iu(t(e),e)):Mu)}const u=Ou({callback:s});return cs(()=>{null==u||u.disconnect(),s(),n.forEach(e=>null==u?void 0:u.observe(e))},[n]),o}(oe),se=function(e,n){let{transform:t,...r}=n;return null!=e&&e.length?e.reduce((e,n)=>n({transform:e,...r}),t):t}(f,{transform:{x:T.x-te.x,y:T.y-te.y,scaleX:1,scaleY:1},activatorEvent:M,active:D,activeNodeRect:_,containerNodeRect:U,draggingNodeRect:ee,over:q.current.over,overlayNodeRect:Q.rect,scrollableAncestors:oe,scrollableAncestorRects:ae,windowRect:ie}),ue=j?vs(j,T):null,ce=function(n){const[t,r]=e.useState(null),i=e.useRef(n),o=e.useCallback(e=>{const n=zs(e.target);n&&r(e=>e?(e.set(n,Us(n)),new Map(e)):null)},[]);return e.useEffect(()=>{const e=i.current;if(n!==e){t(e);const a=n.map(e=>{const n=zs(e);return n?(n.addEventListener("scroll",o,{passive:!0}),[n,Us(n)]):null}).filter(e=>null!=e);r(a.length?new Map(a):null),i.current=n}return()=>{t(n),t(e)};function t(e){e.forEach(e=>{const n=zs(e);null==n||n.removeEventListener("scroll",o)})}},[o,n]),e.useMemo(()=>n.length?t?Array.from(t.values()).reduce((e,n)=>vs(e,n),Bs):tu(n):Bs,[n,t])}(oe),le=Gu(ce),de=Gu(ce,[_]),pe=vs(se,le),fe=ee?Fs(ee,se):null,me=D&&fe?d({active:D,collisionRect:fe,droppableRects:L,droppableContainers:H,pointerCoordinates:ue}):null,ge=function(e){if(!e||0===e.length)return null;const[n]=e;return n.id}(me),[he,be]=e.useState(null),ve=function(e,n,t){return{...e,scaleX:n&&t?n.width/t.width:1,scaleY:n&&t?n.height/t.height:1}}(ne?se:vs(se,de),null!=(o=null==he?void 0:he.rect)?o:null,_),Ie=e.useRef(null),ye=e.useCallback((e,n)=>{let{sensor:t,options:r}=n;if(null==k.current)return;const i=R.get(k.current);if(!i)return;const o=e.nativeEvent,a=new t({active:k.current,activeNode:i,event:o,options:r,context:q,onAbort(e){if(!R.get(e))return;const{onDragAbort:n}=V.current,t={id:e};null==n||n(t),I({type:"onDragAbort",event:t})},onPending(e,n,t,r){if(!R.get(e))return;const{onDragPending:i}=V.current,o={id:e,constraint:n,initialCoordinates:t,offset:r};null==i||i(o),I({type:"onDragPending",event:o})},onStart(e){const n=k.current;if(null==n)return;const t=R.get(n);if(!t)return;const{onDragStart:r}=V.current,i={activatorEvent:o,active:{id:n,data:t.data,rect:N}};m.unstable_batchedUpdates(()=>{null==r||r(i),A(Ju.Initializing),v({type:ks.DragStart,initialCoordinates:e,active:n}),I({type:"onDragStart",event:i}),B(Ie.current),P(o)})},onMove(e){v({type:ks.DragMove,coordinates:e})},onEnd:s(ks.DragEnd),onCancel:s(ks.DragCancel)});function s(e){return async function(){const{active:n,collisions:t,over:r,scrollAdjustedTranslate:i}=q.current;let a=null;if(n&&i){const{cancelDrop:s}=V.current;a={activatorEvent:o,active:n,collisions:t,delta:i,over:r},e===ks.DragEnd&&"function"==typeof s&&await Promise.resolve(s(a))&&(e=ks.DragCancel)}k.current=null,m.unstable_batchedUpdates(()=>{v({type:e}),A(Ju.Uninitialized),be(null),B(null),P(null),Ie.current=null;const n=e===ks.DragEnd?"onDragEnd":"onDragCancel";if(a){const e=V.current[n];null==e||e(a),I({type:n,event:a})}})}}Ie.current=a},[R]),Ce=e.useCallback((e,n)=>(t,r)=>{const i=t.nativeEvent,o=R.get(r);null!==k.current||!o||i.dndKit||i.defaultPrevented||!0===e(t,n.options,{active:o})&&(i.dndKit={capturedBy:n.sensor},k.current=r,ye(t,n))},[R,ye]),xe=function(n,t){return e.useMemo(()=>n.reduce((e,n)=>{const{sensor:r}=n;return[...e,...r.activators.map(e=>({eventName:e.eventName,handler:t(e.handler,n)}))]},[]),[n,t])}(l,Ce);!function(n){e.useEffect(()=>{if(!ns)return;const e=n.map(e=>{let{sensor:n}=e;return null==n.setup?void 0:n.setup()});return()=>{for(const n of e)null==n||n()}},n.map(e=>{let{sensor:n}=e;return n}))}(l),cs(()=>{_&&C===Ju.Initializing&&A(Ju.Initialized)},[_,C]),e.useEffect(()=>{const{onDragMove:e}=V.current,{active:n,activatorEvent:t,collisions:r,over:i}=q.current;if(!n||!t)return;const o={active:n,activatorEvent:t,collisions:r,delta:{x:pe.x,y:pe.y},over:i};m.unstable_batchedUpdates(()=>{null==e||e(o),I({type:"onDragMove",event:o})})},[pe.x,pe.y]),e.useEffect(()=>{const{active:e,activatorEvent:n,collisions:t,droppableContainers:r,scrollAdjustedTranslate:i}=q.current;if(!e||null==k.current||!n||!i)return;const{onDragOver:o}=V.current,a=r.get(ge),s=a&&a.rect.current?{id:a.id,rect:a.rect.current,data:a.data,disabled:a.disabled}:null,u={active:e,activatorEvent:n,collisions:t,delta:{x:i.x,y:i.y},over:s};m.unstable_batchedUpdates(()=>{be(s),null==o||o(u),I({type:"onDragOver",event:u})})},[ge]),cs(()=>{q.current={activatorEvent:M,active:D,activeNode:Z,collisionRect:fe,collisions:me,droppableRects:L,draggableNodes:R,draggingNode:K,draggingNodeRect:ee,droppableContainers:S,over:he,scrollableAncestors:oe,scrollAdjustedTranslate:pe},N.current={initial:ee,translated:fe}},[D,Z,me,fe,R,K,ee,L,S,he,oe,pe]),function(n){let{acceleration:t,activator:r=xu.Pointer,canScroll:i,draggingRect:o,enabled:a,interval:s=5,order:u=Au.TreeOrder,pointerCoordinates:c,scrollableAncestors:l,scrollableAncestorRects:d,delta:p,threshold:f}=n;const m=function(e){let{delta:n,disabled:t}=e;const r=ms(n);return ps(e=>{if(t||!r||!e)return wu;const i=Math.sign(n.x-r.x),o=Math.sign(n.y-r.y);return{x:{[qs.Backward]:e.x[qs.Backward]||-1===i,[qs.Forward]:e.x[qs.Forward]||1===i},y:{[qs.Backward]:e.y[qs.Backward]||-1===o,[qs.Forward]:e.y[qs.Forward]||1===o}}},[t,n,r])}({delta:p,disabled:!a}),[g,h]=function(){const n=e.useRef(null),t=e.useCallback((e,t)=>{n.current=setInterval(e,t)},[]);return[t,e.useCallback(()=>{null!==n.current&&(clearInterval(n.current),n.current=null)},[])]}(),b=e.useRef({x:0,y:0}),v=e.useRef({x:0,y:0}),I=e.useMemo(()=>{switch(r){case xu.Pointer:return c?{top:c.y,bottom:c.y,left:c.x,right:c.x}:null;case xu.DraggableRect:return o}},[r,o,c]),y=e.useRef(null),C=e.useCallback(()=>{const e=y.current;e&&e.scrollBy(b.current.x*v.current.x,b.current.y*v.current.y)},[]),x=e.useMemo(()=>u===Au.TreeOrder?[...l].reverse():l,[u,l]);e.useEffect(()=>{if(a&&l.length&&I){for(const e of x){if(!1===(null==i?void 0:i(e)))continue;const n=l.indexOf(e),r=d[n];if(!r)continue;const{direction:o,speed:a}=eu(e,r,I,t,f);for(const e of["x","y"])m[e][o[e]]||(a[e]=0,o[e]=0);if(a.x>0||a.y>0)return h(),y.current=e,g(C,s),b.current=a,void(v.current=o)}b.current={x:0,y:0},v.current={x:0,y:0},h()}else h()},[t,C,i,h,a,s,JSON.stringify(I),JSON.stringify(m),g,l,x,d,JSON.stringify(f)])}({...z,delta:T,draggingRect:fe,pointerCoordinates:ue,scrollableAncestors:oe,scrollableAncestorRects:ae});const Ae=e.useMemo(()=>({active:D,activeNode:Z,activeNodeRect:_,activatorEvent:M,collisions:me,containerNodeRect:U,dragOverlay:Q,draggableNodes:R,droppableContainers:S,droppableRects:L,over:he,measureDroppableContainers:X,scrollableAncestors:oe,scrollableAncestorRects:ae,measuringConfiguration:F,measuringScheduled:Y,windowRect:ie}),[D,Z,_,M,me,U,Q,R,S,L,he,X,oe,ae,F,Y,ie]),we=e.useMemo(()=>({activatorEvent:M,activators:xe,active:D,activeNodeRect:_,ariaDescribedById:{draggable:W},dispatch:v,draggableNodes:R,over:he,measureDroppableContainers:X}),[M,xe,D,_,v,W,R,he,X]);return x.default.createElement(Ss.Provider,{value:y},x.default.createElement(Lu.Provider,{value:we},x.default.createElement(Xu.Provider,{value:Ae},x.default.createElement(zu.Provider,{value:ve},c)),x.default.createElement(ju,{disabled:!1===(null==s?void 0:s.restoreFocus)})),x.default.createElement(Ds,{...s,hiddenTextDescribedById:W}))}),Uu=/*#__PURE__*/e.createContext(null),qu="button",$u={timeout:25};function Qu(e,n,t){const r=e.slice();return r.splice(t<0?r.length+t:t,0,r.splice(n,1)[0]),r}function Ku(e,n){return e.reduce((e,t,r)=>{const i=n.get(t);return i&&(e[r]=i),e},Array(e.length))}function ec(e){return null!==e&&e>=0}const nc=e=>{let{rects:n,activeIndex:t,overIndex:r,index:i}=e;const o=Qu(n,r,t),a=n[i],s=o[i];return s&&a?{x:s.left-a.left,y:s.top-a.top,scaleX:s.width/a.width,scaleY:s.height/a.height}:null},tc="Sortable",rc=/*#__PURE__*/x.default.createContext({activeIndex:-1,containerId:tc,disableTransforms:!1,items:[],overIndex:-1,useDragOverlay:!1,sortedRects:[],strategy:nc,disabled:{draggable:!1,droppable:!1}});function ic(n){let{children:t,id:r,items:i,strategy:o=nc,disabled:a=!1}=n;const{active:s,dragOverlay:u,droppableRects:c,over:l,measureDroppableContainers:d}=e.useContext(Xu),p=hs(tc,r),f=Boolean(null!==u.rect),m=e.useMemo(()=>i.map(e=>"object"==typeof e&&"id"in e?e.id:e),[i]),g=null!=s,h=s?m.indexOf(s.id):-1,b=l?m.indexOf(l.id):-1,v=e.useRef(m),I=!function(e,n){if(e===n)return!0;if(e.length!==n.length)return!1;for(let t=0;t<e.length;t++)if(e[t]!==n[t])return!1;return!0}(m,v.current),y=-1!==b&&-1===h||I,C=function(e){return"boolean"==typeof e?{draggable:e,droppable:e}:e}(a);cs(()=>{I&&g&&d(m)},[I,m,g,d]),e.useEffect(()=>{v.current=m},[m]);const A=e.useMemo(()=>({activeIndex:h,containerId:p,disabled:C,disableTransforms:y,items:m,overIndex:b,useDragOverlay:f,sortedRects:Ku(m,c),strategy:o}),[h,p,C.draggable,C.droppable,y,m,b,c,f,o]);return x.default.createElement(rc.Provider,{value:A},t)}const oc=e=>{let{id:n,items:t,activeIndex:r,overIndex:i}=e;return Qu(t,r,i).indexOf(n)},ac=e=>{let{containerId:n,isSorting:t,wasDragging:r,index:i,items:o,newIndex:a,previousItems:s,previousContainerId:u,transition:c}=e;return!(!c||!r||s!==o&&i===a||!t&&(a===i||n!==u))},sc={duration:200,easing:"ease"},uc="transform",cc=/*#__PURE__*/xs.Transition.toString({property:uc,duration:0,easing:"linear"}),lc={roleDescription:"sortable"};var dc=function(n){var t=function(n){let{animateLayoutChanges:t=ac,attributes:r,disabled:i,data:o,getNewIndex:a=oc,id:s,strategy:u,resizeObserverConfig:c,transition:l=sc}=n;const{items:d,containerId:p,activeIndex:f,disabled:m,disableTransforms:g,sortedRects:h,overIndex:b,useDragOverlay:v,strategy:I}=e.useContext(rc),y=function(e,n){var t,r;return"boolean"==typeof e?{draggable:e,droppable:!1}:{draggable:null!=(t=null==e?void 0:e.draggable)?t:n.draggable,droppable:null!=(r=null==e?void 0:e.droppable)?r:n.droppable}}(i,m),C=d.indexOf(s),x=e.useMemo(()=>({sortable:{containerId:p,index:C,items:d},...o}),[p,o,C,d]),A=e.useMemo(()=>d.slice(d.indexOf(s)),[d,s]),{rect:w,node:E,isOver:R,setNodeRef:T}=function(n){let{data:t,disabled:r=!1,id:i,resizeObserverConfig:o}=n;const a=hs("Droppable"),{active:s,dispatch:u,over:c,measureDroppableContainers:l}=e.useContext(Lu),d=e.useRef({disabled:r}),p=e.useRef(!1),f=e.useRef(null),m=e.useRef(null),{disabled:g,updateMeasurementsFor:h,timeout:b}={...$u,...o},v=ds(null!=h?h:i),I=Ou({callback:e.useCallback(()=>{p.current?(null!=m.current&&clearTimeout(m.current),m.current=setTimeout(()=>{l(Array.isArray(v.current)?v.current:[v.current]),m.current=null},b)):p.current=!0},[b]),disabled:g||!s}),y=e.useCallback((e,n)=>{I&&(n&&(I.unobserve(n),p.current=!1),e&&I.observe(e))},[I]),[C,x]=fs(y),A=ds(t);return e.useEffect(()=>{I&&C.current&&(I.disconnect(),p.current=!1,I.observe(C.current))},[C,I]),e.useEffect(()=>(u({type:ks.RegisterDroppable,element:{id:i,key:a,disabled:r,node:C,rect:f,data:A}}),()=>u({type:ks.UnregisterDroppable,key:a,id:i})),[i]),e.useEffect(()=>{r!==d.current.disabled&&(u({type:ks.SetDroppableDisabled,id:i,key:a,disabled:r}),d.current.disabled=r)},[i,a,r,u]),{active:s,rect:f,isOver:(null==c?void 0:c.id)===i,node:C,over:c,setNodeRef:x}}({id:s,data:x,disabled:y.droppable,resizeObserverConfig:{updateMeasurementsFor:A,...c}}),{active:S,activatorEvent:O,activeNodeRect:N,attributes:D,setNodeRef:k,listeners:G,isDragging:B,over:M,setActivatorNodeRef:P,transform:V}=function(n){let{id:t,data:r,disabled:i=!1,attributes:o}=n;const a=hs("Draggable"),{activators:s,activatorEvent:u,active:c,activeNodeRect:l,ariaDescribedById:d,draggableNodes:p,over:f}=e.useContext(Lu),{role:m=qu,roleDescription:g="draggable",tabIndex:h=0}=null!=o?o:{},b=(null==c?void 0:c.id)===t,v=e.useContext(b?zu:Uu),[I,y]=fs(),[C,x]=fs(),A=function(n,t){return e.useMemo(()=>n.reduce((e,n)=>{let{eventName:r,handler:i}=n;return e[r]=e=>{i(e,t)},e},{}),[n,t])}(s,t),w=ds(r);return cs(()=>(p.set(t,{id:t,key:a,node:I,activatorNode:C,data:w}),()=>{const e=p.get(t);e&&e.key===a&&p.delete(t)}),[p,t]),{active:c,activatorEvent:u,activeNodeRect:l,attributes:e.useMemo(()=>({role:m,tabIndex:h,"aria-disabled":i,"aria-pressed":!(!b||m!==qu)||void 0,"aria-roledescription":g,"aria-describedby":d.draggable}),[i,m,h,b,g,d.draggable]),isDragging:b,listeners:i?void 0:A,node:I,over:f,setNodeRef:y,setActivatorNodeRef:x,transform:v}}({id:s,data:x,attributes:{...lc,...r},disabled:y.draggable}),W=function(){for(var n=arguments.length,t=new Array(n),r=0;r<n;r++)t[r]=arguments[r];return e.useMemo(()=>e=>{t.forEach(n=>n(e))},t)}(T,k),H=Boolean(S),F=H&&!g&&ec(f)&&ec(b),L=!v&&B,X=L&&F?V:null,Y=F?null!=X?X:(null!=u?u:I)({rects:h,activeNodeRect:N,activeIndex:f,overIndex:b,index:C}):null,Z=ec(f)&&ec(b)?a({id:s,items:d,activeIndex:f,overIndex:b}):C,j=null==S?void 0:S.id,z=e.useRef({activeId:j,items:d,newIndex:Z,containerId:p}),J=d!==z.current.items,_=t({active:S,containerId:p,isDragging:B,isSorting:H,id:s,index:C,items:d,newIndex:z.current.newIndex,previousItems:z.current.items,previousContainerId:z.current.containerId,transition:l,wasDragging:null!=z.current.activeId}),U=function(n){let{disabled:t,index:r,node:i,rect:o}=n;const[a,s]=e.useState(null),u=e.useRef(r);return cs(()=>{if(!t&&r!==u.current&&i.current){const e=o.current;if(e){const n=Xs(i.current,{ignoreTransform:!0}),t={x:e.left-n.left,y:e.top-n.top,scaleX:e.width/n.width,scaleY:e.height/n.height};(t.x||t.y)&&s(t)}}r!==u.current&&(u.current=r)},[t,r,i,o]),e.useEffect(()=>{a&&s(null)},[a]),a}({disabled:!_,index:C,node:E,rect:w});return e.useEffect(()=>{H&&z.current.newIndex!==Z&&(z.current.newIndex=Z),p!==z.current.containerId&&(z.current.containerId=p),d!==z.current.items&&(z.current.items=d)},[H,Z,p,d]),e.useEffect(()=>{if(j===z.current.activeId)return;if(null!=j&&null==z.current.activeId)return void(z.current.activeId=j);const e=setTimeout(()=>{z.current.activeId=j},50);return()=>clearTimeout(e)},[j]),{active:S,activeIndex:f,attributes:D,data:x,rect:w,index:C,newIndex:Z,items:d,isOver:R,isSorting:H,isDragging:B,listeners:G,node:E,overIndex:b,over:M,setNodeRef:W,setActivatorNodeRef:P,setDroppableNodeRef:T,setDraggableNodeRef:k,transform:null!=U?U:Y,transition:U||J&&z.current.newIndex===C?cc:L&&!ys(O)||!l?void 0:H||_?xs.Transition.toString({...l,property:uc}):void 0}}({id:n.data.value}),r=t.attributes,i=t.listeners,o=t.setNodeRef,a=t.transition,s={display:"flex",transform:xs.Transform.toString(t.transform),transition:a};return x.default.createElement("div",D({ref:o,style:s},r,i,{onPointerDown:function(e){e.target instanceof HTMLElement&&(["svg","path"].includes(e.target.nodeName)&&(e.preventDefault(),e.stopPropagation()),null==i||i.onPointerDown(e))}}),x.default.createElement(ea.MultiValueContainer,D({},n)))},pc=function(e){var n=D({},e.innerProps,{style:{cursor:"grab"},onMouseDown:function(e){e.preventDefault(),e.stopPropagation()}});return x.default.createElement(ea.MultiValueLabel,D({},e,{innerProps:n}))},fc={en:{translation:{"Are you sure you want to delete this widget?":"Are you sure you want to delete this widget?",Cancel:"Cancel",Delete:"Delete","filters.dayType.label":"Day type","filters.dayType.calendar":"Calendar","filters.dayType.production":"Production","filters.shifts.label":"Shifts","filters.shifts.allShifts":"All shifts","filters.dateRange.label":"Date range","filters.dateRange.from":"From","filters.dateRange.to":"To","filters.search.placeholder":"Search periods...","filters.search.noResults":"No periods found","filters.premium.indicator":"Premium","filters.periods.today":"Today","filters.periods.yesterday":"Yesterday","filters.periods.last7Days":"Last 7 days","filters.periods.last14Days":"Last 14 days","filters.periods.last30Days":"Last 30 days","filters.periods.last90Days":"Last 90 days","filters.periods.last180Days":"Last 180 days","filters.periods.last365Days":"Last 365 days","filters.periods.currentWeek":"Current week","filters.periods.currentMonth":"Current month","filters.periods.currentQuarter":"Current quarter","filters.periods.currentYear":"Current year","filters.periods.previousWeek":"Previous week","filters.periods.previousMonth":"Previous month","filters.periods.previousQuarter":"Previous quarter","filters.periods.previousYear":"Previous year","filters.periods.last2Weeks":"Last 2 weeks","filters.periods.last4Weeks":"Last 4 weeks","filters.periods.last8Weeks":"Last 8 weeks","filters.periods.last12Weeks":"Last 12 weeks","filters.periods.last3Months":"Last 3 months","filters.periods.last6Months":"Last 6 months","filters.periods.last12Months":"Last 12 months","filters.periods.week":"Week {{week}}","filters.accessDenied.title":"Premium feature","filters.accessDenied.close":"Close"}},pl:{translation:{"Are you sure you want to delete this widget?":"Czy na pewno usunąć ten widżet?",Cancel:"Anuluj",Delete:"Usuń","filters.dayType.label":"Typ dnia","filters.dayType.calendar":"Kalendarzowy","filters.dayType.production":"Produkcyjny","filters.shifts.label":"Zmiany","filters.shifts.allShifts":"Wszystkie zmiany","filters.dateRange.label":"Zakres dat","filters.dateRange.from":"Od","filters.dateRange.to":"Do","filters.search.placeholder":"Szukaj okresów...","filters.search.noResults":"Nie znaleziono okresów","filters.premium.indicator":"Premium","filters.periods.today":"Dzisiaj","filters.periods.yesterday":"Wczoraj","filters.periods.last7Days":"Ostatnie 7 dni","filters.periods.last14Days":"Ostatnie 14 dni","filters.periods.last30Days":"Ostatnie 30 dni","filters.periods.last90Days":"Ostatnie 90 dni","filters.periods.last180Days":"Ostatnie 180 dni","filters.periods.last365Days":"Ostatnie 365 dni","filters.periods.currentWeek":"Bieżący tydzień","filters.periods.currentMonth":"Bieżący miesiąc","filters.periods.currentQuarter":"Bieżący kwartał","filters.periods.currentYear":"Bieżący rok","filters.periods.previousWeek":"Poprzedni tydzień","filters.periods.previousMonth":"Poprzedni miesiąc","filters.periods.previousQuarter":"Poprzedni kwartał","filters.periods.previousYear":"Poprzedni rok","filters.periods.last2Weeks":"Ostatnie 2 tygodnie","filters.periods.last4Weeks":"Ostatnie 4 tygodnie","filters.periods.last8Weeks":"Ostatnie 8 tygodni","filters.periods.last12Weeks":"Ostatnie 12 tygodni","filters.periods.last3Months":"Ostatnie 3 miesiące","filters.periods.last6Months":"Ostatnie 6 miesięcy","filters.periods.last12Months":"Ostatnie 12 miesięcy","filters.periods.week":"Tydzień {{week}}","filters.accessDenied.title":"Funkcja Premium","filters.accessDenied.close":"Zamknij"}}},mc=H(function(e,n){var t,r,i,o="[object Map]",a="[object Promise]",s="[object Set]",u="[object WeakMap]",c="[object DataView]",l=/^\[object .+?Constructor\]$/,d="object"==typeof self&&self&&self.Object===Object&&self,p="object"==typeof V&&V&&V.Object===Object&&V||d||Function("return this")(),f=n&&!n.nodeType&&n,m=f&&e&&!e.nodeType&&e,g=m&&m.exports===f,h=Function.prototype,b=Object.prototype,v=p["__core-js_shared__"],I=(t=/[^.]+$/.exec(v&&v.keys&&v.keys.IE_PROTO||""))?"Symbol(src)_1."+t:"",y=h.toString,C=b.hasOwnProperty,x=b.toString,A=RegExp("^"+y.call(C).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),w=g?p.Buffer:void 0,E=b.propertyIsEnumerable,R=w?w.isBuffer:void 0,T=(r=Object.keys,i=Object,function(e){return r(i(e))}),S=F(p,"DataView"),O=F(p,"Map"),N=F(p,"Promise"),D=F(p,"Set"),k=F(p,"WeakMap"),G=!E.call({valueOf:1},"valueOf"),B=X(S),M=X(O),P=X(N),W=X(D),H=X(k);function F(e,n){var t=function(e,n){return null==e?void 0:e[n]}(e,n);return function(e){if(!J(e)||function(e){return!!I&&I in e}(e))return!1;var n=z(e)||function(e){var n=!1;if(null!=e&&"function"!=typeof e.toString)try{n=!!(e+"")}catch(e){}return n}(e)?A:l;return n.test(X(e))}(t)?t:void 0}var L=function(e){return x.call(e)};function X(e){if(null!=e){try{return y.call(e)}catch(e){}try{return e+""}catch(e){}}return""}(S&&L(new S(new ArrayBuffer(1)))!=c||O&&L(new O)!=o||N&&L(N.resolve())!=a||D&&L(new D)!=s||k&&L(new k)!=u)&&(L=function(e){var n=x.call(e),t="[object Object]"==n?e.constructor:void 0,r=t?X(t):void 0;if(r)switch(r){case B:return c;case M:return o;case P:return a;case W:return s;case H:return u}return n});var Y=Array.isArray;function Z(e){return null!=e&&function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}(e.length)&&!z(e)}var j=R||function(){return!1};function z(e){var n=J(e)?x.call(e):"";return"[object Function]"==n||"[object GeneratorFunction]"==n}function J(e){var n=typeof e;return!!e&&("object"==n||"function"==n)}e.exports=function(e){if(Z(e)&&(Y(e)||"string"==typeof e||"function"==typeof e.splice||j(e)||function(e){return function(e){return function(e){return!!e&&"object"==typeof e}(e)&&Z(e)}(e)&&C.call(e,"callee")&&(!E.call(e,"callee")||"[object Arguments]"==x.call(e))}(e)))return!e.length;var n=L(e);if(n==o||n==s)return!e.size;if(G||function(e){var n=e&&e.constructor;return e===("function"==typeof n&&n.prototype||b)}(e))return!T(e).length;for(var t in e)if(C.call(e,t))return!1;return!0}}),gc=function(e,n){return gc=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,n){e.__proto__=n}||function(e,n){for(var t in n)n.hasOwnProperty(t)&&(e[t]=n[t])},gc(e,n)};function hc(e,n){function t(){this.constructor=e}gc(e,n),e.prototype=null===n?Object.create(n):(t.prototype=n.prototype,new t)}function bc(e){return"function"==typeof e}var vc=!1,Ic={Promise:void 0,set useDeprecatedSynchronousErrorHandling(e){vc=e},get useDeprecatedSynchronousErrorHandling(){return vc}};function yc(e){setTimeout(function(){throw e},0)}var Cc={closed:!0,next:function(e){},error:function(e){if(Ic.useDeprecatedSynchronousErrorHandling)throw e;yc(e)},complete:function(){}},xc=/*@__PURE__*/function(){return Array.isArray||function(e){return e&&"number"==typeof e.length}}();function Ac(e){return null!==e&&"object"==typeof e}var wc=/*@__PURE__*/function(){function e(e){return Error.call(this),this.message=e?e.length+" errors occurred during unsubscription:\n"+e.map(function(e,n){return n+1+") "+e.toString()}).join("\n "):"",this.name="UnsubscriptionError",this.errors=e,this}return e.prototype=/*@__PURE__*/Object.create(Error.prototype),e}(),Ec=wc,Rc=/*@__PURE__*/function(){function e(e){this.closed=!1,this._parentOrParents=null,this._subscriptions=null,e&&(this._ctorUnsubscribe=!0,this._unsubscribe=e)}return e.prototype.unsubscribe=function(){var n;if(!this.closed){var t=this,r=t._parentOrParents,i=t._ctorUnsubscribe,o=t._unsubscribe,a=t._subscriptions;if(this.closed=!0,this._parentOrParents=null,this._subscriptions=null,r instanceof e)r.remove(this);else if(null!==r)for(var s=0;s<r.length;++s)r[s].remove(this);if(bc(o)){i&&(this._unsubscribe=void 0);try{o.call(this)}catch(e){n=e instanceof Ec?Tc(e.errors):[e]}}if(xc(a)){s=-1;for(var u=a.length;++s<u;){var c=a[s];if(Ac(c))try{c.unsubscribe()}catch(e){n=n||[],e instanceof Ec?n=n.concat(Tc(e.errors)):n.push(e)}}}if(n)throw new Ec(n)}},e.prototype.add=function(n){var t=n;if(!n)return e.EMPTY;switch(typeof n){case"function":t=new e(n);case"object":if(t===this||t.closed||"function"!=typeof t.unsubscribe)return t;if(this.closed)return t.unsubscribe(),t;if(!(t instanceof e)){var r=t;(t=new e)._subscriptions=[r]}break;default:throw new Error("unrecognized teardown "+n+" added to Subscription.")}var i=t._parentOrParents;if(null===i)t._parentOrParents=this;else if(i instanceof e){if(i===this)return t;t._parentOrParents=[i,this]}else{if(-1!==i.indexOf(this))return t;i.push(this)}var o=this._subscriptions;return null===o?this._subscriptions=[t]:o.push(t),t},e.prototype.remove=function(e){var n=this._subscriptions;if(n){var t=n.indexOf(e);-1!==t&&n.splice(t,1)}},e.EMPTY=function(e){return e.closed=!0,e}(new e),e}();function Tc(e){return e.reduce(function(e,n){return e.concat(n instanceof Ec?n.errors:n)},[])}var Sc=/*@__PURE__*/function(){return"function"==typeof Symbol?/*@__PURE__*/Symbol("rxSubscriber"):"@@rxSubscriber_"+/*@__PURE__*/Math.random()}(),Oc=/*@__PURE__*/function(e){function n(t,r,i){var o=e.call(this)||this;switch(o.syncErrorValue=null,o.syncErrorThrown=!1,o.syncErrorThrowable=!1,o.isStopped=!1,arguments.length){case 0:o.destination=Cc;break;case 1:if(!t){o.destination=Cc;break}if("object"==typeof t){t instanceof n?(o.syncErrorThrowable=t.syncErrorThrowable,o.destination=t,t.add(o)):(o.syncErrorThrowable=!0,o.destination=new Nc(o,t));break}default:o.syncErrorThrowable=!0,o.destination=new Nc(o,t,r,i)}return o}return hc(n,e),n.prototype[Sc]=function(){return this},n.create=function(e,t,r){var i=new n(e,t,r);return i.syncErrorThrowable=!1,i},n.prototype.next=function(e){this.isStopped||this._next(e)},n.prototype.error=function(e){this.isStopped||(this.isStopped=!0,this._error(e))},n.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())},n.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,e.prototype.unsubscribe.call(this))},n.prototype._next=function(e){this.destination.next(e)},n.prototype._error=function(e){this.destination.error(e),this.unsubscribe()},n.prototype._complete=function(){this.destination.complete(),this.unsubscribe()},n.prototype._unsubscribeAndRecycle=function(){var e=this._parentOrParents;return this._parentOrParents=null,this.unsubscribe(),this.closed=!1,this.isStopped=!1,this._parentOrParents=e,this},n}(Rc),Nc=/*@__PURE__*/function(e){function n(n,t,r,i){var o,a=e.call(this)||this;a._parentSubscriber=n;var s=a;return bc(t)?o=t:t&&(o=t.next,r=t.error,i=t.complete,t!==Cc&&(bc((s=Object.create(t)).unsubscribe)&&a.add(s.unsubscribe.bind(s)),s.unsubscribe=a.unsubscribe.bind(a))),a._context=s,a._next=o,a._error=r,a._complete=i,a}return hc(n,e),n.prototype.next=function(e){if(!this.isStopped&&this._next){var n=this._parentSubscriber;Ic.useDeprecatedSynchronousErrorHandling&&n.syncErrorThrowable?this.__tryOrSetError(n,this._next,e)&&this.unsubscribe():this.__tryOrUnsub(this._next,e)}},n.prototype.error=function(e){if(!this.isStopped){var n=this._parentSubscriber,t=Ic.useDeprecatedSynchronousErrorHandling;if(this._error)t&&n.syncErrorThrowable?(this.__tryOrSetError(n,this._error,e),this.unsubscribe()):(this.__tryOrUnsub(this._error,e),this.unsubscribe());else if(n.syncErrorThrowable)t?(n.syncErrorValue=e,n.syncErrorThrown=!0):yc(e),this.unsubscribe();else{if(this.unsubscribe(),t)throw e;yc(e)}}},n.prototype.complete=function(){var e=this;if(!this.isStopped){var n=this._parentSubscriber;if(this._complete){var t=function(){return e._complete.call(e._context)};Ic.useDeprecatedSynchronousErrorHandling&&n.syncErrorThrowable?(this.__tryOrSetError(n,t),this.unsubscribe()):(this.__tryOrUnsub(t),this.unsubscribe())}else this.unsubscribe()}},n.prototype.__tryOrUnsub=function(e,n){try{e.call(this._context,n)}catch(e){if(this.unsubscribe(),Ic.useDeprecatedSynchronousErrorHandling)throw e;yc(e)}},n.prototype.__tryOrSetError=function(e,n,t){if(!Ic.useDeprecatedSynchronousErrorHandling)throw new Error("bad call");try{n.call(this._context,t)}catch(n){return Ic.useDeprecatedSynchronousErrorHandling?(e.syncErrorValue=n,e.syncErrorThrown=!0,!0):(yc(n),!0)}return!1},n.prototype._unsubscribe=function(){var e=this._parentSubscriber;this._context=null,this._parentSubscriber=null,e.unsubscribe()},n}(Oc),Dc=/*@__PURE__*/function(){return"function"==typeof Symbol&&Symbol.observable||"@@observable"}();function kc(e){return e}var Gc=/*@__PURE__*/function(){function e(e){this._isScalar=!1,e&&(this._subscribe=e)}return e.prototype.lift=function(n){var t=new e;return t.source=this,t.operator=n,t},e.prototype.subscribe=function(e,n,t){var r=this.operator,i=function(e,n,t){if(e){if(e instanceof Oc)return e;if(e[Sc])return e[Sc]()}return e||n||t?new Oc(e,n,t):new Oc(Cc)}(e,n,t);if(i.add(r?r.call(i,this.source):this.source||Ic.useDeprecatedSynchronousErrorHandling&&!i.syncErrorThrowable?this._subscribe(i):this._trySubscribe(i)),Ic.useDeprecatedSynchronousErrorHandling&&i.syncErrorThrowable&&(i.syncErrorThrowable=!1,i.syncErrorThrown))throw i.syncErrorValue;return i},e.prototype._trySubscribe=function(e){try{return this._subscribe(e)}catch(n){Ic.useDeprecatedSynchronousErrorHandling&&(e.syncErrorThrown=!0,e.syncErrorValue=n),function(e){for(;e;){var n=e.destination;if(e.closed||e.isStopped)return!1;e=n&&n instanceof Oc?n:null}return!0}(e)?e.error(n):console.warn(n)}},e.prototype.forEach=function(e,n){var t=this;return new(n=Bc(n))(function(n,r){var i;i=t.subscribe(function(n){try{e(n)}catch(e){r(e),i&&i.unsubscribe()}},r,n)})},e.prototype._subscribe=function(e){var n=this.source;return n&&n.subscribe(e)},e.prototype[Dc]=function(){return this},e.prototype.pipe=function(){for(var e,n=[],t=0;t<arguments.length;t++)n[t]=arguments[t];return 0===n.length?this:(0===(e=n).length?kc:1===e.length?e[0]:function(n){return e.reduce(function(e,n){return n(e)},n)})(this)},e.prototype.toPromise=function(e){var n=this;return new(e=Bc(e))(function(e,t){var r;n.subscribe(function(e){return r=e},function(e){return t(e)},function(){return e(r)})})},e.create=function(n){return new e(n)},e}();function Bc(e){if(e||(e=Ic.Promise||Promise),!e)throw new Error("no Promise impl found");return e}var Mc=/*#__PURE__*/function(){function e(e){var n=this;this.wsURL=void 0,this.cable=null,this.subscriptions=new Map,this.addSubscription=function(e,t){n.subscriptions.set(e,t)},this.wsURL=e}var n=e.prototype;return n.connect=function(e,n){this.cable=O.default.createConsumer(this.wsURL+"?token="+e+"&lang="+n)},n.request=function(e){var n,t=this.cable,r=this.subscriptions,i=this.addSubscription;return new Gc(function(o){if(t){var a,s=(null==(a=e.variables)?void 0:a.id)||"company";r.has(s)||(n=t.subscriptions.create({channel:"GraphqlChannel",channelId:Math.round(Date.now()+1e5*Math.random()).toString(16)},{connected:function(){this.perform("execute",e)},received:function(e){e.more?e.result.errors?o.error&&o.error(e.result.errors[0]):e.result.data&&o.next&&(mc(e.result.data)||o.next(e.result)):o.complete&&o.complete()}}),i(s,n))}})},n.hasSubscription=function(e){return this.subscriptions.has(e)},e}(),Pc=/*#__PURE__*/function(){function e(e,n,t){this.actionCableClient=null,this.actionCableClient=new Mc(e),this.actionCableClient.connect(n,t)}return e.prototype.subscribe=function(e,n,t,r){if(void 0===r&&(r=function(e){throw e}),!this.actionCableClient)throw new Error("No WS client available");var i=this.actionCableClient.request({query:e,variables:n}).subscribe({next:function(e){var n=e.data,i=e.errors;if(i)return r(new Error(JSON.stringify(i)));n&&t&&t(function(e){var n=Object.keys(e);if(1!==n.length)throw new Error("Expected exactly one response key, got: "+n.join(", "));return e[n[0]]}(n))}});return function(){return i.unsubscribe()}},e}(),Vc=function(e,n,t){return new Pc(e,n,t)},Wc=function(e,n){return Yr(new v.GraphQLClient(e,{fetch:n}))},Hc=function(n){var t,r=n.url,o=n.wsUrl,a=n.lang,s=i.useStore().sessionStore,u=e.useState(),c=u[0],l=u[1],d=e.useState(),p=d[0],f=d[1],m=o||r.replace("graphql","cable"),g=(null==(t=s.loginStatus.authResponse)?void 0:t.accessToken)||"";return e.useEffect(function(){r&&l(Wc(r,i.fetch))},[r]),e.useEffect(function(){r&&g&&f(Vc(m||r.replace("graphql","cable"),g,a))},[r,m,g,a]),{graphqlSdk:c,gqlWsClient:p}},Fc={root:{boxShadow:"none","& .react-resizable-handle":{width:"24px",height:"24px",borderRadius:"4px",background:function(e){return e.palette.primary.main+" url("+N.default+")"},backgroundRepeat:"no-repeat",backgroundSize:"50%",backgroundPosition:"50%","&:hover":{backgroundColor:function(e){return e.palette.primary.dark}}},"& .react-resizable-handle:after":{display:"none"}},header:{height:"40px"},dragIcon:{width:"30px",height:"30px",marginLeft:function(e){return"-"+e.spacing(1)},padding:"8px",borderRadius:"4px",background:function(e){return e.palette.primary.main},"&:hover":{cursor:"move",background:function(e){return e.palette.primary.dark}}},actionButtons:{height:"30px",marginTop:"-7px"},settingsButton:{color:"rgba(255, 255, 255, 0.45)",borderRadius:"4px",borderTopRightRadius:0,borderBottomRightRadius:0,borderColor:"rgba(255,255,255,0.1)",background:"rgba(255,255,255,0.1)","&:focus":{boxShadow:"0 0 0 1px rgba(255, 255, 255, 0.1)"},"&:hover":{opacity:.8}},infoButton:{marginLeft:"1px",color:"rgba(255, 255, 255, 0.45)",borderRadius:0,borderColor:"rgba(255,255,255,0.1)",background:"rgba(255,255,255,0.1)","&:focus":{boxShadow:"0 0 0 1px rgba(255, 255, 255, 0.1)"},"&:hover":{opacity:.8}},deleteButton:{marginLeft:"1px",color:"rgba(255, 255, 255, 0.45)",borderRadius:"4px",borderTopLeftRadius:0,borderBottomLeftRadius:0,borderColor:"rgba(255,255,255,0.1)",background:"rgba(255,255,255,0.1)","&:focus":{boxShadow:"0 0 0 1px rgba(255, 255, 255, 0.1)"},"&:hover":{opacity:.8}},content:{height:"calc(100% - 40px)",padding:0,background:"transparent",border:"1px solid rgba(255, 255, 255, 0.2)",borderTop:"none",borderRadius:"4px",boxShadow:"0px 4px 8px rgba(0, 0, 0, 0.25)","&:last-child":{paddingBottom:0}}},Lc=["children","title","Widget","id","url","wsUrl","lang","data","filters","settings","openSettingsModal","onSettingsModalOpened","onSettingsModalClosed","sidePanelOpened","updateSidePanelProps","onDelete","editMode","version","requiredFeatures","extraPermissions"];function Xc(e,n){try{var t=e()}catch(e){return n(e)}return t&&t.then?t.then(void 0,n):t}var Yc=x.default.forwardRef(function(r,o){var a=r.children,s=r.title,u=r.Widget,c=r.id,l=r.url,d=r.wsUrl,p=r.lang,f=r.data,m=r.filters,b=r.settings,v=r.openSettingsModal,I=r.onSettingsModalOpened,y=r.onSettingsModalClosed,C=r.sidePanelOpened,A=r.updateSidePanelProps,w=r.onDelete,E=r.editMode,R=r.version,T=r.requiredFeatures,S=r.extraPermissions,O=k(r,Lc),N=Hc({url:l,wsUrl:d,lang:p}).graphqlSdk,G=i.useAccess(T,{extraPermissions:S}).hasAccess,B=e.useState(!1),M=B[0],V=B[1],W=e.useState(!1),H=W[0],F=W[1],L=t.useTranslation(),X=L.i18n,Y=L.t;return e.useEffect(function(){for(var e="translation",n=0,t=Object.entries(fc);n<t.length;n++){var r=t[n];X.addResources(r[0],e,r[1][e])}},[X]),x.default.createElement(n.Card,D({ref:o,sx:Fc.root},O),x.default.createElement(n.CardHeader,{avatar:E&&x.default.createElement(n.SvgIcon,{component:h.ReactComponent,className:"draggable-handle",sx:Fc.dragIcon,inheritViewBox:!0}),title:s,titleTypographyProps:{variant:"subtitle1"},action:E&&x.default.createElement(n.Stack,{direction:"row",sx:Fc.actionButtons},x.default.createElement(n.Button,{color:"secondary",sx:Fc.settingsButton,onClick:function(){I&&I()},disabled:!G},x.default.createElement(g.Settings,null)),R&&x.default.createElement(x.default.Fragment,null,x.default.createElement(n.Tooltip,{title:R},x.default.createElement(n.Button,{color:"secondary",sx:Fc.infoButton},x.default.createElement(g.Info,null)))),x.default.createElement(P,{open:H,confirmMessage:Y("Are you sure you want to delete this widget?"),confirmButtonText:Y("Delete"),cancelButtonText:Y("Cancel"),onCancel:function(){return F(!1)},onConfirm:function(){try{var e=function(){V(!1)};V(!0),F(!1);var n=function(){if(w)return Promise.resolve(w()).then(function(){})}();return Promise.resolve(n&&n.then?n.then(e):e())}catch(e){return Promise.reject(e)}}},x.default.createElement(n.Button,{color:"secondary",sx:Fc.deleteButton,onClick:function(e){e.stopPropagation(),F(!0)},disabled:M},x.default.createElement(g.Delete,null)))),sx:Fc.header}),x.default.createElement(n.CardContent,{sx:Fc.content},x.default.createElement(i.AccessGuard,{features:T,extraPermissions:S,onTrialRequest:function(e){try{return Promise.resolve(Xc(function(){return Promise.resolve(null==N?void 0:N.startTrial({input:{featureKey:e}})).then(function(){return Promise.resolve(i.refreshUserData()).then(function(){return!0})})},function(e){return console.error("Failed to start trial:",e),!1}))}catch(e){return Promise.reject(e)}},onFeatureRequest:function(e){var n=e.featureKey,t=e.requestType,r=e.workplaceId;try{return Promise.resolve(Xc(function(){return Promise.resolve(null==N?void 0:N.requestFeatureAccess({input:{featureKey:n,requestType:t.toUpperCase(),workplaceId:r}})).then(function(){return Promise.resolve(i.refreshUserData()).then(function(){return!0})})},function(e){return console.error("Failed to request feature access:",e),!1}))}catch(e){return Promise.reject(e)}}},x.default.createElement(u,{id:c,url:l,wsUrl:d,lang:p,data:f,filters:m,settings:b,openSettingsModal:v,onSettingsModalOpened:I,onSettingsModalClosed:y,sidePanelOpened:C,updateSidePanelProps:A,editMode:E}))),E&&a)}),Zc=function(e,n){return n.year(e.year()).month(e.month()).date(e.date())};exports.ActualStaffingCountsDocument=tr,exports.ApplicationInfoDocument=rr,exports.AssignOperatorDocument=kr,exports.AssignOperatorToWorkplaceDocument=Tt,exports.BulkUpsertStaffingPlansDocument=St,exports.CompanyConfigDocument=ir,exports.ConfirmTooltip=P,exports.CounterDirectoriesDocument=or,exports.CountersDocument=ar,exports.CreateDashboardDocument=Ot,exports.CreateOrderDocument=Nt,exports.CreateProductDocument=Dt,exports.CreateStaffingPlanDocument=kt,exports.CreateStatusChangeDocument=Gt,exports.CreateUserPresenceDocument=Bt,exports.CreateWidgetDocument=Mt,exports.CurrentUserDocument=sr,exports.DashboardFilters=function(r){var o=r.initialValues,a=r.onChange,s=r.shifts,u=r.onFeatureRequest,c=e.useState(function(){return null!=o?o:{dayType:exports.DayType.Production,dateRange:(e=F().format("YYYY-MM-DD"),{from:e+"T00:00:00",to:e+"T23:59:59"}),shiftIds:[]};var e}),l=c[0],d=c[1],p=e.useState(),f=p[0],m=p[1],g=e.useState(!1),h=g[0],b=g[1],v=e.useState(!1),I=v[0],y=v[1],C=e.useRef(null),A=i.useAccess([gi]),E=A.hasAccess,R=A.accessState,T=A.buttons,S=A.cooldownInfo,O=A.features,N=e.useMemo(function(){var e,n=O.find(function(e){return e.featureKey===gi});return null!=(e=null==n?void 0:n.daysSinceExpiry)?e:null},[O]),k=e.useMemo(function(){return T.filter(function(e){return"start_trial"!==e.action})},[T]);e.useEffect(function(){if(f){var e=ri.find(function(e){return e.id===f});if(e){var n=e.calculate({dayType:l.dayType,shifts:s,selectedShiftIds:l.shiftIds});d(function(e){return D({},e,{dateRange:n})}),a(D({},l,{dateRange:n}))}}},[l.dayType,l.shiftIds,s,f]);var G,B,M,P=t.useTranslation().t,V=e.useCallback(function(e){var n=D({},l,{dayType:e});d(n),a(n)},[l,a]),W=e.useCallback(function(e){var n=D({},l,{shiftIds:e});d(n),a(n)},[l,a]),H=e.useCallback(function(e){m(void 0);var n=D({},l,{dateRange:e});d(n),a(n)},[l,a]),L=e.useCallback(function(e,n){if(!e.needAccess||E){m(e.id);var t=D({},l,{dateRange:n});d(t),a(t)}else b(!0)},[l,E,a]),X=e.useCallback(function(){b(!1)},[]),Y=e.useCallback(function(){b(!0)},[]),Z=e.useCallback(function(){y(!0)},[]),j=e.useCallback(function(){y(!1)},[]);return x.default.createElement(n.Box,{sx:mi.container},x.default.createElement(n.Stack,{direction:"row",spacing:2,alignItems:"center"},x.default.createElement(n.TextField,{ref:C,label:P("filters.dateRange.label"),value:(G=l.dateRange,B=F(G.from).format("YYYY-MM-DD"),M=F(G.to).format("YYYY-MM-DD"),B===M?B:B+" - "+M),onClick:Z,size:"small",InputProps:{readOnly:!0,startAdornment:x.default.createElement(n.InputAdornment,{position:"start"},x.default.createElement(w.default,{sx:{fontSize:16}}))},sx:mi.dateField}),x.default.createElement(fi,{shifts:s,selectedShiftIds:l.shiftIds,onChange:W})),x.default.createElement(n.Popover,{open:I,anchorEl:C.current,onClose:j,anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"},sx:mi.popover},x.default.createElement(n.Box,{sx:mi.popoverContent},x.default.createElement(di,{dateRange:l.dateRange,dayType:l.dayType,shifts:s,selectedShiftIds:l.shiftIds,hasAccess:E,selectedPeriodId:f,onDayTypeChange:V,onDateRangeChange:H,onPeriodSelect:L,onAccessDenied:Y}))),x.default.createElement(jr,{open:h,onClose:X,accessState:R,buttons:k,daysSinceExpiry:N,cooldownInfo:S,onFeatureRequest:u}))},exports.DashboardsDocument=ur,exports.DepartmentsDocument=cr,exports.FloorPlansDocument=lr,exports.GetWorkplacePerformanceInsightsDocument=Br,exports.GraphqlWsClient=Pc,exports.ListActualStaffingCountsDocument=Mr,exports.ListStaffingPlansDocument=Pr,exports.ListStatusChangesDocument=Vr,exports.ListWorkOrdersDocument=Wr,exports.ListWorkplaceAssignmentsDocument=Hr,exports.ListWorkplacesDocument=Fr,exports.MetricCard=function(e){var r=e.title,i=e.metricLabel,o=e.metricValue,a=e.extraValue,s=e.animateBackgroundColor,u=e.rounded,c=k(e,yi),l=t.useTranslation().t,d=function(e){return{card:D({position:"relative",width:"100%",height:"100%"},e.showBgPattern&&{mixBlendMode:"hard-light",background:"url("+S.default+"), linear-gradient(329.66deg, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.75) 100%)",backgroundSize:"cover"},e.card.rounded?{borderRadius:"4px"}:{borderTopLeftRadius:0,borderTopRightRadius:0}),cardOverlay:D({position:"absolute",top:0,left:0,width:"100%",height:"100%",zIndex:-1},e.showBgPattern&&{mixBlendMode:"hard-light"},e.card.rounded?{borderRadius:"4px"}:{borderTopLeftRadius:0,borderTopRightRadius:0},e.cardOverlay,{animation:e.animateBackgroundColor?(t=e.backgroundColor,f.keyframes(ci||(ci=G(["\n 0% {\n background: ",";\n }\n\n 50% {\n background: ",";\n }\n\n 100% {\n background: ",";\n }\n"])),Ii(t,.5),Ii(t,1),Ii(t,.5))+" 3s infinite"):"none"}),cardHeader:{height:"3em",color:"#090B0E",borderBottom:"1px solid rgba(0, 0, 0, 0.1)",background:"rgba(0, 0, 0, 0.05)","& span":{lineHeight:"3em",fontSize:"1em",fontWeight:500}},cardContent:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",height:"80%",minWidth:"auto",minHeight:"auto",maxWidth:"none",background:"transparent","& > img":{flexBasis:"25%",minWidth:"125px",maxWidth:"25%"}},cardLabel:{width:"100%",lineHeight:"2.5em",fontSize:"1.8em",fontWeight:700,whiteSpace:"nowrap",overflow:"hidden",textAlign:"center",textOverflow:"ellipsis",color:"#090B0E"},cardValue:{lineHeight:"1.2em",textAlign:"center",fontSize:"1.6em",fontWeight:700,color:n.lighten("#090B0E",.15)},cardExtra:{lineHeight:"4em",textAlign:"center",fontSize:"1em",fontWeight:600,color:"#090B0E"}};var t}({card:{rounded:u},cardOverlay:{background:function(){var e=null==o?void 0:o.statusColor;if(e)switch(e){case exports.AndonLightColor.Green:return"linear-gradient(180deg, #31BF59 0%, #32D74B 100%)";case exports.AndonLightColor.Yellow:return"linear-gradient(360deg, #FFD60A 0%, #FFC12F 100%)";case exports.AndonLightColor.Red:return"linear-gradient(0deg, #F05C53 0%, #FF3B2F 100%)";default:return"rgba(187, 187, 187, 0.75)"}return"rgba(255, 255, 255, 0.75)"}()},showBgPattern:!0,backgroundColor:function(){var e=null==o?void 0:o.statusColor;if(e)switch(e){case exports.AndonLightColor.Green:return"#32D74B";case exports.AndonLightColor.Yellow:return"#FFC12F";case exports.AndonLightColor.Red:return"#FF3B2F";default:return"#BBBBBBBF"}return"#FFFFFFBF"}(),animateBackgroundColor:s});return x.default.createElement(n.Card,D({sx:d.card},c),x.default.createElement(n.Box,{sx:d.cardOverlay}),x.default.createElement(n.CardHeader,{title:x.default.createElement(bi,{line:1,text:r}),sx:d.cardHeader}),x.default.createElement(n.CardContent,{sx:d.cardContent},x.default.createElement(n.Typography,{sx:d.cardLabel},i),x.default.createElement(n.Typography,{sx:d.cardValue},o?function(e){var n=e.textValue;if(n){var t=F.duration(Number(n),"seconds");return Math.floor(t.asMinutes())+"m "+t.seconds()+"s"}return""}(o):x.default.createElement(t.Trans,{t:l},"No value for the selected metric")),a&&x.default.createElement(n.Typography,{sx:d.cardExtra},a)))},exports.MetricValuesDocument=dr,exports.MetricsDocument=pr,exports.NotificationsDocument=fr,exports.OrdersDocument=mr,exports.OrdersExecutionsDocument=gr,exports.PauseOrderExecutionDocument=Pt,exports.ProductsDocument=hr,exports.ReasonsDocument=br,exports.ReasonsRecommendationDocument=vr,exports.RemoveDashboardDocument=Vt,exports.RemoveStaffingPlanDocument=Wt,exports.RemoveUserPresenceDocument=Ht,exports.RemoveWidgetDocument=Ft,exports.RemoveWorkplaceUsersPresencesDocument=Lt,exports.RequestFeatureAccessDocument=Xt,exports.SetCounterDocument=Yt,exports.ShiftsDocument=Ir,exports.SortableSelect=function(e){var n=e.options,t=e.selected,r=e.onChange,i=function(e){var n,i,o,a=e.active,s=e.over;if(a.id!==(null==s?void 0:s.id)){var u=t.findIndex(function(e){return e===a.id}),c=t.findIndex(function(e){return e===(null==s?void 0:s.id)});r((n=t,i=u,o=c,function(e,n,t){const r=n<0?e.length+n:n;if(r>=0&&r<e.length){const r=t<0?e.length+t:t,[i]=e.splice(n,1);e.splice(r,0,i)}}(n=[...n],i,o),n))}};return x.default.createElement(es,{placeholder:e.placeholder,isMulti:!0,options:n,value:t.map(function(e){return n.find(function(n){return n.value===e})}),onChange:function(e){return r([].concat(e||[]).map(function(e){return e.value}))},closeMenuOnSelect:!1,components:{MultiValueContainer:dc,MultiValueLabel:pc,ValueContainer:function(e){return x.default.createElement(_u,{onDragEnd:i},x.default.createElement(ic,{items:t},e.children))}},styles:{control:function(e,n){return D({},e,{padding:"6px 0 6px 8px",borderColor:"rgba(255, 255, 255, 0.15)",background:"#1C1F25"},n.isFocused&&{borderColor:"#4E5A67",boxShadow:"none"},{"&:hover":{borderColor:"#4E5A67",boxShadow:"none"}})},menu:function(e){return D({},e,{background:"#1C1F25"})},option:function(e,n){return D({},e,{background:n.isFocused?"#2A2E34":"#1C1F25"})}}})},exports.StaffingPlansDocument=yr,exports.StandardRatesDocument=Cr,exports.StartOrderExecutionDocument=Zt,exports.StartTrialDocument=jt,exports.StatusChangeTransitionPermissionsDocument=xr,exports.StatusChangesDocument=Ar,exports.StopOrderExecutionDocument=zt,exports.UnassignOperatorDocument=Gr,exports.UnassignOperatorFromWorkplaceDocument=Jt,exports.UpdateDashboardDocument=_t,exports.UpdateNotificationDocument=Ut,exports.UpdateOrderDocument=qt,exports.UpdateOrderExecutionDocument=$t,exports.UpdateStaffingPlanDocument=Qt,exports.UpdateStatusChangeDocument=Kt,exports.UpdateWidgetDocument=er,exports.UpdateWorkOrderDocument=nr,exports.UsersDocument=wr,exports.UsersPresencesDocument=Er,exports.WidgetCard=Yc,exports.WidgetDocument=Rr,exports.WidgetsDocument=Tr,exports.WorkOrdersDocument=Sr,exports.WorkplaceAssignmentsDocument=Or,exports.WorkplaceEventDocument=Lr,exports.WorkplacePerformanceInsightsDocument=Nr,exports.WorkplacesDocument=Dr,exports.generateTimeRange=function(e,n,t,r){for(var i=[],o=e,a=e.isAfter(n);a?o.isAfter(n)||o.isSame(n):o.isBefore(n)||o.isSame(n);)i.push(o),o=a?o.subtract(r,t):o.add(r,t);return i},exports.getCurrentShift=function(e,n){return n.find(function(n){return e.isAfter(n.startedAt)&&e.isBefore(n.finishedAt)})||null},exports.getGqlWsClient=Vc,exports.getGraphqlSdk=Wc,exports.getRecentShift=function(e,n){return n.length?n.reduce(function(n,t){return Math.abs(e.diff(t.finishedAt))<Math.abs(e.diff(n.finishedAt))?t:n}):null},exports.getSdk=Yr,exports.normalizeShifts=function(e,n){var t=[];return e.forEach(function(e){var r=F(e.startedAt,"YYYY-MM-DD HH:mm:ss ZZ"),i=F(e.finishedAt,"YYYY-MM-DD HH:mm:ss ZZ");if(r=Zc(n,r),i=Zc(n,i),r.isAfter(i)){var o=r.subtract(1,"day"),a=i.add(1,"day");t.push({name:e.name,startedAt:o,finishedAt:i}),t.push({name:e.name,startedAt:r,finishedAt:a})}else t.push({name:e.name,startedAt:r,finishedAt:i})}),t},exports.useGqlClients=Hc,exports.version="1.5.12";
|
|
16
16
|
//# sourceMappingURL=index.js.map
|