timeline-calendar-react
Version:
A timeline calendar component for React, built with TypeScript and Vite.
41 lines (39 loc) • 102 kB
JavaScript
(function(){"use strict";try{if(typeof document<"u"){var e=document.createElement("style");e.appendChild(document.createTextNode('._flexBox_1n0fv_1{display:block;width:100%}._flexContainer_1n0fv_6{display:flex;width:100%}._row_1n0fv_11{flex-direction:row}._column_1n0fv_15{flex-direction:column}._padding0_1n0fv_19{padding:0}._padding1_1n0fv_22{padding:8px}._padding2_1n0fv_25{padding:16px}._padding3_1n0fv_28{padding:24px}._padding4_1n0fv_31{padding:32px}._size1_1n0fv_36{flex-basis:8.33%;max-width:8.33%}._size2_1n0fv_40{flex-basis:16.66%;max-width:16.66%}._size3_1n0fv_44{flex-basis:25%;max-width:25%}._size4_1n0fv_48{flex-basis:33.33%;max-width:33.33%}._size5_1n0fv_52{flex-basis:41.66%;max-width:41.66%}._size6_1n0fv_56{flex-basis:50%;max-width:50%}._size7_1n0fv_60{flex-basis:58.33%;max-width:58.33%}._size8_1n0fv_64{flex-basis:66.66%;max-width:66.66%}._size9_1n0fv_68{flex-basis:75%;max-width:75%}._size10_1n0fv_72{flex-basis:83.33%;max-width:83.33%}._size11_1n0fv_76{flex-basis:91.66%;max-width:91.66%}._size12_1n0fv_80{flex-basis:100%;max-width:100%}._customSize_1n0fv_85{min-width:var(--custom-width);max-width:var(--custom-width);flex-basis:var(--custom-width)}@media (max-width: 1200px){._size1_1n0fv_36,._size2_1n0fv_40,._size3_1n0fv_44,._size4_1n0fv_48,._size5_1n0fv_52{flex-basis:50%;max-width:50%}._size6_1n0fv_56,._size7_1n0fv_60,._size8_1n0fv_64,._size9_1n0fv_68,._size10_1n0fv_72,._size11_1n0fv_76,._size12_1n0fv_80{flex-basis:100%;max-width:100%}}@media (max-width: 992px){._size1_1n0fv_36,._size2_1n0fv_40,._size3_1n0fv_44,._size4_1n0fv_48,._size5_1n0fv_52{flex-basis:50%;max-width:50%}._size6_1n0fv_56,._size7_1n0fv_60,._size8_1n0fv_64,._size9_1n0fv_68,._size10_1n0fv_72,._size11_1n0fv_76,._size12_1n0fv_80{flex-basis:100%;max-width:100%}}@media (max-width: 768px){._size1_1n0fv_36,._size2_1n0fv_40,._size3_1n0fv_44,._size4_1n0fv_48,._size5_1n0fv_52,._size6_1n0fv_56,._size7_1n0fv_60,._size8_1n0fv_64,._size9_1n0fv_68,._size10_1n0fv_72,._size11_1n0fv_76,._size12_1n0fv_80{flex-basis:100%;max-width:100%}}@media (max-width: 600px){._size1_1n0fv_36,._size2_1n0fv_40,._size3_1n0fv_44,._size4_1n0fv_48,._size5_1n0fv_52,._size6_1n0fv_56,._size7_1n0fv_60,._size8_1n0fv_64,._size9_1n0fv_68,._size10_1n0fv_72,._size11_1n0fv_76,._size12_1n0fv_80{flex-basis:100%;max-width:100%}}._selectContainer_13z1k_1{display:inline-block;width:320px;text-align:center;position:relative;z-index:9}._selectedText_13z1k_9{cursor:pointer;background-color:transparent;padding:7px 20px;border:2px solid #575757;border-radius:6px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}._selectedTextActive_13z1k_20{border-bottom-left-radius:0;border-bottom-right-radius:0}._selectOptions_13z1k_25{position:absolute;top:100%;left:0;width:100%;max-height:320px;overflow-y:auto;border:2px solid #9f9f9f;border-radius:0 0 6px 6px;border-top:0;list-style:none;padding:0;margin:0;z-index:1}._selectedText_13z1k_9:after{content:"";position:absolute;right:10px;top:16px;border:7px solid transparent;border-color:currentColor transparent transparent transparent}._selectedTextActive_13z1k_20:after{top:8px;border-color:transparent transparent currentColor transparent}ul{margin:0;padding:0;text-align:center}li{list-style-type:none;padding:10px 8px;cursor:pointer}._selectOption_13z1k_25{display:flex;position:relative;padding-left:16px;margin-bottom:0;cursor:pointer;font-size:14px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;justify-content:flex-start;align-items:center}._selectOption_13z1k_25 input{position:absolute;opacity:0;cursor:pointer;height:0;width:0}._checkmark_13z1k_92{position:relative;height:22px;width:22px;margin-right:24px;border-radius:6px}._selectOption_13z1k_25 input~._checkmark_13z1k_92{background-color:#989898}._checkmark_13z1k_92:after{content:"";position:absolute;display:none}._selectOption_13z1k_25 input:checked~._checkmark_13z1k_92:after{display:block}._selectOption_13z1k_25 ._checkmark_13z1k_92:after{left:8px;top:3px;width:5px;height:10px;border:solid white;border-width:0 3px 3px 0;-webkit-transform:rotate(45deg);-ms-transform:rotate(45deg);transform:rotate(45deg)}._selectOption_13z1k_25:hover{background-color:var(--hover-checkmark)!important;color:#fff!important}@media (max-width: 992px){._selectContainer_13z1k_1{width:100%}}._button_2l5nr_1{text-align:center;font-size:14px;font-weight:500;cursor:pointer;text-transform:uppercase;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;border:none;border-radius:6px}._small_2l5nr_15{padding:6px 10px}._medium_2l5nr_19{padding:8px 20px}._large_2l5nr_23{padding:16px 32px}._button_2l5nr_1:disabled{opacity:.5;cursor:not-allowed}._wrap_slllc_1{flex-wrap:wrap}._container_slllc_5{flex-wrap:wrap;max-width:inherit}._monthControlContainer_slllc_10{display:flex;align-items:center;flex-wrap:wrap;max-width:inherit}._controlsContainer_slllc_17{display:flex;justify-content:flex-end;flex-wrap:wrap;max-width:inherit}._selectContainer_slllc_24{display:flex;flex-basis:260px;min-width:240px}._eventSelectContainer_slllc_30,._searchContainer_slllc_36{display:flex;flex-basis:320px;min-width:240px}._select_slllc_24{z-index:10!important;min-width:240px}._eventSelect_slllc_30{min-width:240px}._monthContainer_slllc_51{align-items:center;flex-wrap:wrap}._currentMonthContainer_slllc_56{flex-basis:172px;max-width:inherit}._navigationContainer_slllc_61{flex-basis:110px;max-width:inherit}._dateContainer_slllc_66{flex-basis:100px;max-width:inherit}._currentMonthButton_slllc_71{margin-right:4px}._prevButton_slllc_75{border-top-right-radius:0!important;border-bottom-right-radius:0!important}._nextButton_slllc_80{border-top-left-radius:0!important;border-bottom-left-radius:0!important;margin-right:16px}._separator_slllc_86{width:1px;background:transparent}@media (min-width: 1200px) and (max-width: 1367px){._dateContainer_slllc_66{flex-basis:calc(100% - 285px);max-width:calc(100% - 285px)}}@media (max-width: 992px){._selectContainer_slllc_24,._eventSelectContainer_slllc_30,._searchContainer_slllc_36{flex-basis:33%;min-width:33%}._monthControlContainer_slllc_10{flex-basis:100%;min-width:100%}._selectContainer_slllc_24{padding-left:0}._select_slllc_24,._eventSelect_slllc_30,._searchContainer_slllc_36{min-width:220px}}@media (max-width: 768px){._selectContainer_slllc_24,._eventSelectContainer_slllc_30{flex-basis:50%;min-width:50%}._searchContainer_slllc_36{flex-basis:100%;min-width:100%}._selectContainer_slllc_24{padding-left:8px}._controlsContainer_slllc_17{justify-content:normal}}@media (max-width: 600px){._selectContainer_slllc_24,._eventSelectContainer_slllc_30,._searchContainer_slllc_36{flex-basis:100%;min-width:100%}}@media (max-width: 500px) and (min-width: 450px){._dateContainer_slllc_66{flex-basis:calc(100% - 285px);max-width:calc(100% - 285px)}}@media (max-width: 450px){._dateContainer_slllc_66{padding:8px 8px 0;flex-basis:100%;max-width:100%}}@media (max-width: 390px){._currentMonthContainer_slllc_56{padding:8px;flex-basis:100%;max-width:100%}._currentMonthContainer_slllc_56 button{width:100%;margin-right:0}._navigationContainer_slllc_61{padding:8px;flex-basis:113px;max-width:113px}._nextButton_slllc_80{margin-right:0}._dateContainer_slllc_66{flex-basis:calc(100% - 113px);max-width:calc(100% - 113px)}}._calendar_15cdj_1{padding:4px}._range_15cdj_5{box-sizing:border-box;font-size:14px;padding:0 12px;text-align:left;border-radius:6px;height:2rem;line-height:2rem;cursor:pointer;top:14px;left:4px;position:absolute;z-index:2;font-weight:600;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}._startPrev_15cdj_24{border-top-left-radius:0;border-bottom-left-radius:0;left:0}._endNext_15cdj_30{border-top-right-radius:0;border-bottom-right-radius:0}._avatar_15cdj_35{border-radius:50%;width:32px;height:32px;text-align:center;display:flex;justify-content:center;font-size:17px;font-weight:600;align-items:center}._sidebar_15cdj_47,._content_15cdj_48,._range_15cdj_5{transition:max-width .5s,width .5s,flex-basis .5s,min-width .5s ease-in-out}._item_15cdj_57{padding:8px;text-align:center;border-radius:0;height:40px}._sidebar_15cdj_47 ._headSidebar_15cdj_64>._item_15cdj_57{border-top-left-radius:6px}._sidebar_15cdj_47 ._bodySidebar_15cdj_68 ._item_15cdj_57:last-child{border-bottom-left-radius:6px}._content_15cdj_48 ._headContent_15cdj_72>div:last-child ._item_15cdj_57{border-top-right-radius:6px}._content_15cdj_48 ._bodyContent_15cdj_76>div:last-child>div:last-child>div:last-child ._item_15cdj_57{border-bottom-right-radius:6px}._text_15cdj_80{margin:0;font-family:Golos Text,Tofu;font-weight:400}._title_15cdj_86{font-weight:500;font-size:1.25rem;line-height:1.6;letter-spacing:.0075em}._subtitle_15cdj_93{font-weight:500;font-size:.875rem;line-height:1.57;letter-spacing:.00714em}._bodyTitle_15cdj_100,._subtitle_15cdj_93{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}._bodyTitle_15cdj_100{font-size:1rem;line-height:1.5;letter-spacing:.00938em}._bodyText_15cdj_113{font-size:.875rem;line-height:1.43;letter-spacing:.01071em}._caption_15cdj_119{font-size:.75rem;line-height:1.66;letter-spacing:.03333em;opacity:.7}._input_6cl0p_1{background:transparent;min-width:200px;height:30px;width:100%;border-radius:6px;border:2px solid #575757;font-size:14px;font-weight:400;padding:4px 12px}._dayContainer_rqea9_1{min-height:40px;position:relative}._tooltip_rqea9_6{z-index:999;border-radius:8px;text-align:left}._flexContainer_rqea9_12{max-width:var(--cell-width, var(--max-width))}._loadingContainer_1u9yu_1{margin:0 auto;place-items:center;height:200px;display:flex;align-items:center;justify-content:center}._loading_1u9yu_1{border:4px solid #eeeeee;border-top:4px solid #2196f3;border-radius:50%;width:48px;height:48px;animation:_spin_1u9yu_1 1s linear infinite}@keyframes _spin_1u9yu_1{0%{transform:rotate(0)}to{transform:rotate(360deg)}}')),document.head.appendChild(e)}}catch(t){console.error("vite-plugin-css-injected-by-js",t)}})();
(function(h,Ye){typeof exports=="object"&&typeof module<"u"?module.exports=Ye(require("react")):typeof define=="function"&&define.amd?define(["react"],Ye):(h=typeof globalThis<"u"?globalThis:h||self,h["timeline-calendar-react"]=Ye(h.React))})(this,function(h){"use strict";function Ye(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Pt={exports:{}},Dt={};/**
* @license React
* react-jsx-runtime.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var gn;function cr(){if(gn)return Dt;gn=1;var e=h,t=Symbol.for("react.element"),r=Symbol.for("react.fragment"),n=Object.prototype.hasOwnProperty,o=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,a={key:!0,ref:!0,__self:!0,__source:!0};function s(l,c,d){var u,f={},w=null,_=null;d!==void 0&&(w=""+d),c.key!==void 0&&(w=""+c.key),c.ref!==void 0&&(_=c.ref);for(u in c)n.call(c,u)&&!a.hasOwnProperty(u)&&(f[u]=c[u]);if(l&&l.defaultProps)for(u in c=l.defaultProps,c)f[u]===void 0&&(f[u]=c[u]);return{$$typeof:t,type:l,key:w,ref:_,props:f,_owner:o.current}}return Dt.Fragment=r,Dt.jsx=s,Dt.jsxs=s,Dt}var jt={};/**
* @license React
* react-jsx-runtime.development.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var yn;function ur(){return yn||(yn=1,process.env.NODE_ENV!=="production"&&function(){var e=h,t=Symbol.for("react.element"),r=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),s=Symbol.for("react.provider"),l=Symbol.for("react.context"),c=Symbol.for("react.forward_ref"),d=Symbol.for("react.suspense"),u=Symbol.for("react.suspense_list"),f=Symbol.for("react.memo"),w=Symbol.for("react.lazy"),_=Symbol.for("react.offscreen"),y=Symbol.iterator,v="@@iterator";function m(i){if(i===null||typeof i!="object")return null;var x=y&&i[y]||i[v];return typeof x=="function"?x:null}var b=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function E(i){{for(var x=arguments.length,$=new Array(x>1?x-1:0),Y=1;Y<x;Y++)$[Y-1]=arguments[Y];O("error",i,$)}}function O(i,x,$){{var Y=b.ReactDebugCurrentFrame,re=Y.getStackAddendum();re!==""&&(x+="%s",$=$.concat([re]));var se=$.map(function(Z){return String(Z)});se.unshift("Warning: "+x),Function.prototype.apply.call(console[i],console,se)}}var P=!1,L=!1,V=!1,D=!1,M=!1,H;H=Symbol.for("react.module.reference");function F(i){return!!(typeof i=="string"||typeof i=="function"||i===n||i===a||M||i===o||i===d||i===u||D||i===_||P||L||V||typeof i=="object"&&i!==null&&(i.$$typeof===w||i.$$typeof===f||i.$$typeof===s||i.$$typeof===l||i.$$typeof===c||i.$$typeof===H||i.getModuleId!==void 0))}function N(i,x,$){var Y=i.displayName;if(Y)return Y;var re=x.displayName||x.name||"";return re!==""?$+"("+re+")":$}function K(i){return i.displayName||"Context"}function U(i){if(i==null)return null;if(typeof i.tag=="number"&&E("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof i=="function")return i.displayName||i.name||null;if(typeof i=="string")return i;switch(i){case n:return"Fragment";case r:return"Portal";case a:return"Profiler";case o:return"StrictMode";case d:return"Suspense";case u:return"SuspenseList"}if(typeof i=="object")switch(i.$$typeof){case l:var x=i;return K(x)+".Consumer";case s:var $=i;return K($._context)+".Provider";case c:return N(i,i.render,"ForwardRef");case f:var Y=i.displayName||null;return Y!==null?Y:U(i.type)||"Memo";case w:{var re=i,se=re._payload,Z=re._init;try{return U(Z(se))}catch{return null}}}return null}var T=Object.assign,S=0,p,R,C,k,z,A,G;function oe(){}oe.__reactDisabledLog=!0;function ae(){{if(S===0){p=console.log,R=console.info,C=console.warn,k=console.error,z=console.group,A=console.groupCollapsed,G=console.groupEnd;var i={configurable:!0,enumerable:!0,value:oe,writable:!0};Object.defineProperties(console,{info:i,log:i,warn:i,error:i,group:i,groupCollapsed:i,groupEnd:i})}S++}}function me(){{if(S--,S===0){var i={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:T({},i,{value:p}),info:T({},i,{value:R}),warn:T({},i,{value:C}),error:T({},i,{value:k}),group:T({},i,{value:z}),groupCollapsed:T({},i,{value:A}),groupEnd:T({},i,{value:G})})}S<0&&E("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var $e=b.ReactCurrentDispatcher,_e;function ie(i,x,$){{if(_e===void 0)try{throw Error()}catch(re){var Y=re.stack.trim().match(/\n( *(at )?)/);_e=Y&&Y[1]||""}return`
`+_e+i}}var pe=!1,Q;{var ue=typeof WeakMap=="function"?WeakMap:Map;Q=new ue}function we(i,x){if(!i||pe)return"";{var $=Q.get(i);if($!==void 0)return $}var Y;pe=!0;var re=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var se;se=$e.current,$e.current=null,ae();try{if(x){var Z=function(){throw Error()};if(Object.defineProperty(Z.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(Z,[])}catch(ye){Y=ye}Reflect.construct(i,[],Z)}else{try{Z.call()}catch(ye){Y=ye}i.call(Z.prototype)}}else{try{throw Error()}catch(ye){Y=ye}i()}}catch(ye){if(ye&&Y&&typeof ye.stack=="string"){for(var J=ye.stack.split(`
`),Ce=Y.stack.split(`
`),ce=J.length-1,fe=Ce.length-1;ce>=1&&fe>=0&&J[ce]!==Ce[fe];)fe--;for(;ce>=1&&fe>=0;ce--,fe--)if(J[ce]!==Ce[fe]){if(ce!==1||fe!==1)do if(ce--,fe--,fe<0||J[ce]!==Ce[fe]){var q=`
`+J[ce].replace(" at new "," at ");return i.displayName&&q.includes("<anonymous>")&&(q=q.replace("<anonymous>",i.displayName)),typeof i=="function"&&Q.set(i,q),q}while(ce>=1&&fe>=0);break}}}finally{pe=!1,$e.current=se,me(),Error.prepareStackTrace=re}var Re=i?i.displayName||i.name:"",Ve=Re?ie(Re):"";return typeof i=="function"&&Q.set(i,Ve),Ve}function be(i,x,$){return we(i,!1)}function Xe(i){var x=i.prototype;return!!(x&&x.isReactComponent)}function de(i,x,$){if(i==null)return"";if(typeof i=="function")return we(i,Xe(i));if(typeof i=="string")return ie(i);switch(i){case d:return ie("Suspense");case u:return ie("SuspenseList")}if(typeof i=="object")switch(i.$$typeof){case c:return be(i.render);case f:return de(i.type,x,$);case w:{var Y=i,re=Y._payload,se=Y._init;try{return de(se(re),x,$)}catch{}}}return""}var ke=Object.prototype.hasOwnProperty,Me={},Ae=b.ReactDebugCurrentFrame;function ne(i){if(i){var x=i._owner,$=de(i.type,i._source,x?x.type:null);Ae.setExtraStackFrame($)}else Ae.setExtraStackFrame(null)}function ct(i,x,$,Y,re){{var se=Function.call.bind(ke);for(var Z in i)if(se(i,Z)){var J=void 0;try{if(typeof i[Z]!="function"){var Ce=Error((Y||"React class")+": "+$+" type `"+Z+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof i[Z]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw Ce.name="Invariant Violation",Ce}J=i[Z](x,Z,Y,$,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(ce){J=ce}J&&!(J instanceof Error)&&(ne(re),E("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",Y||"React class",$,Z,typeof J),ne(null)),J instanceof Error&&!(J.message in Me)&&(Me[J.message]=!0,ne(re),E("Failed %s type: %s",$,J.message),ne(null))}}}var vt=Array.isArray;function Qe(i){return vt(i)}function gt(i){{var x=typeof Symbol=="function"&&Symbol.toStringTag,$=x&&i[Symbol.toStringTag]||i.constructor.name||"Object";return $}}function $t(i){try{return et(i),!1}catch{return!0}}function et(i){return""+i}function qe(i){if($t(i))return E("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",gt(i)),et(i)}var ut=b.ReactCurrentOwner,tt={key:!0,ref:!0,__self:!0,__source:!0},nt,Ot;function dt(i){if(ke.call(i,"ref")){var x=Object.getOwnPropertyDescriptor(i,"ref").get;if(x&&x.isReactWarning)return!1}return i.ref!==void 0}function rt(i){if(ke.call(i,"key")){var x=Object.getOwnPropertyDescriptor(i,"key").get;if(x&&x.isReactWarning)return!1}return i.key!==void 0}function ze(i,x){typeof i.ref=="string"&&ut.current}function he(i,x){{var $=function(){nt||(nt=!0,E("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",x))};$.isReactWarning=!0,Object.defineProperty(i,"key",{get:$,configurable:!0})}}function Rt(i,x){{var $=function(){Ot||(Ot=!0,E("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",x))};$.isReactWarning=!0,Object.defineProperty(i,"ref",{get:$,configurable:!0})}}var yt=function(i,x,$,Y,re,se,Z){var J={$$typeof:t,type:i,key:x,ref:$,props:Z,_owner:se};return J._store={},Object.defineProperty(J._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(J,"_self",{configurable:!1,enumerable:!1,writable:!1,value:Y}),Object.defineProperty(J,"_source",{configurable:!1,enumerable:!1,writable:!1,value:re}),Object.freeze&&(Object.freeze(J.props),Object.freeze(J)),J};function ft(i,x,$,Y,re){{var se,Z={},J=null,Ce=null;$!==void 0&&(qe($),J=""+$),rt(x)&&(qe(x.key),J=""+x.key),dt(x)&&(Ce=x.ref,ze(x,re));for(se in x)ke.call(x,se)&&!tt.hasOwnProperty(se)&&(Z[se]=x[se]);if(i&&i.defaultProps){var ce=i.defaultProps;for(se in ce)Z[se]===void 0&&(Z[se]=ce[se])}if(J||Ce){var fe=typeof i=="function"?i.displayName||i.name||"Unknown":i;J&&he(Z,fe),Ce&&Rt(Z,fe)}return yt(i,J,Ce,re,Y,ut.current,Z)}}var ot=b.ReactCurrentOwner,st=b.ReactDebugCurrentFrame;function Ne(i){if(i){var x=i._owner,$=de(i.type,i._source,x?x.type:null);st.setExtraStackFrame($)}else st.setExtraStackFrame(null)}var Ze;Ze=!1;function it(i){return typeof i=="object"&&i!==null&&i.$$typeof===t}function xt(){{if(ot.current){var i=U(ot.current.type);if(i)return`
Check the render method of \``+i+"`."}return""}}function ge(i){return""}var je={};function W(i){{var x=xt();if(!x){var $=typeof i=="string"?i:i.displayName||i.name;$&&(x=`
Check the top-level render call using <`+$+">.")}return x}}function X(i,x){{if(!i._store||i._store.validated||i.key!=null)return;i._store.validated=!0;var $=W(x);if(je[$])return;je[$]=!0;var Y="";i&&i._owner&&i._owner!==ot.current&&(Y=" It was passed a child from "+U(i._owner.type)+"."),Ne(i),E('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',$,Y),Ne(null)}}function Oe(i,x){{if(typeof i!="object")return;if(Qe(i))for(var $=0;$<i.length;$++){var Y=i[$];it(Y)&&X(Y,x)}else if(it(i))i._store&&(i._store.validated=!0);else if(i){var re=m(i);if(typeof re=="function"&&re!==i.entries)for(var se=re.call(i),Z;!(Z=se.next()).done;)it(Z.value)&&X(Z.value,x)}}}function at(i){{var x=i.type;if(x==null||typeof x=="string")return;var $;if(typeof x=="function")$=x.propTypes;else if(typeof x=="object"&&(x.$$typeof===c||x.$$typeof===f))$=x.propTypes;else return;if($){var Y=U(x);ct($,i.props,"prop",Y,i)}else if(x.PropTypes!==void 0&&!Ze){Ze=!0;var re=U(x);E("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",re||"Unknown")}typeof x.getDefaultProps=="function"&&!x.getDefaultProps.isReactClassApproved&&E("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function j(i){{for(var x=Object.keys(i.props),$=0;$<x.length;$++){var Y=x[$];if(Y!=="children"&&Y!=="key"){Ne(i),E("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",Y),Ne(null);break}}i.ref!==null&&(Ne(i),E("Invalid attribute `ref` supplied to `React.Fragment`."),Ne(null))}}var I={};function B(i,x,$,Y,re,se){{var Z=F(i);if(!Z){var J="";(i===void 0||typeof i=="object"&&i!==null&&Object.keys(i).length===0)&&(J+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var Ce=ge();Ce?J+=Ce:J+=xt();var ce;i===null?ce="null":Qe(i)?ce="array":i!==void 0&&i.$$typeof===t?(ce="<"+(U(i.type)||"Unknown")+" />",J=" Did you accidentally export a JSX literal instead of a component?"):ce=typeof i,E("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",ce,J)}var fe=ft(i,x,$,re,se);if(fe==null)return fe;if(Z){var q=x.children;if(q!==void 0)if(Y)if(Qe(q)){for(var Re=0;Re<q.length;Re++)Oe(q[Re],i);Object.freeze&&Object.freeze(q)}else E("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else Oe(q,i)}if(ke.call(x,"key")){var Ve=U(i),ye=Object.keys(x).filter(function(ds){return ds!=="key"}),Ft=ye.length>0?"{key: someKey, "+ye.join(": ..., ")+": ...}":"{key: someKey}";if(!I[Ve+Ft]){var Wt=ye.length>0?"{"+ye.join(": ..., ")+": ...}":"{}";E(`A props object containing a "key" prop is being spread into JSX:
let props = %s;
<%s {...props} />
React keys must be passed directly to JSX without using spread:
let props = %s;
<%s key={someKey} {...props} />`,Ft,Ve,Wt,Ve),I[Ve+Ft]=!0}}return i===n?j(fe):at(fe),fe}}function ve(i,x,$){return B(i,x,$,!0)}function Se(i,x,$){return B(i,x,$,!1)}var We=Se,Pe=ve;jt.Fragment=n,jt.jsx=We,jt.jsxs=Pe}()),jt}var xn;function dr(){return xn||(xn=1,process.env.NODE_ENV==="production"?Pt.exports=cr():Pt.exports=ur()),Pt.exports}var g=dr(),rn={exports:{}};/*!
Copyright (c) 2018 Jed Watson.
Licensed under the MIT License (MIT), see
http://jedwatson.github.io/classnames
*/var _n;function fr(){return _n||(_n=1,function(e){(function(){var t={}.hasOwnProperty;function r(){for(var a="",s=0;s<arguments.length;s++){var l=arguments[s];l&&(a=o(a,n(l)))}return a}function n(a){if(typeof a=="string"||typeof a=="number")return a;if(typeof a!="object")return"";if(Array.isArray(a))return r.apply(null,a);if(a.toString!==Object.prototype.toString&&!a.toString.toString().includes("[native code]"))return a.toString();var s="";for(var l in a)t.call(a,l)&&a[l]&&(s=o(s,l));return s}function o(a,s){return s?a?a+" "+s:a+s:a}e.exports?(r.default=r,e.exports=r):window.classNames=r})()}(rn)),rn.exports}var hr=fr();const Ee=Ye(hr),_t={flexBox:"_flexBox_1n0fv_1",flexContainer:"_flexContainer_1n0fv_6",row:"_row_1n0fv_11",column:"_column_1n0fv_15",padding0:"_padding0_1n0fv_19",padding1:"_padding1_1n0fv_22",padding2:"_padding2_1n0fv_25",padding3:"_padding3_1n0fv_28",padding4:"_padding4_1n0fv_31",size1:"_size1_1n0fv_36",size2:"_size2_1n0fv_40",size3:"_size3_1n0fv_44",size4:"_size4_1n0fv_48",size5:"_size5_1n0fv_52",size6:"_size6_1n0fv_56",size7:"_size7_1n0fv_60",size8:"_size8_1n0fv_64",size9:"_size9_1n0fv_68",size10:"_size10_1n0fv_72",size11:"_size11_1n0fv_76",size12:"_size12_1n0fv_80",customSize:"_customSize_1n0fv_85"},te=h.forwardRef((e,t)=>{const{size:r=12,pxSize:n,padding:o=0,type:a="box",children:s,direction:l="row",className:c,dataTestid:d,style:u}=e,f=Ee(a==="flex"?_t.flexContainer:_t.flexBox,_t[`size${r}`],_t[`padding${o}`],_t[l],{[_t.customSize]:n},c),w=100*r/12,_=n?{"--custom-width":n,...u}:12%r!==0&&r%2!==0?{flexBasis:`${w}%`,maxWidth:`${w}%`,minWidth:"auto",...u}:u;return g.jsx("div",{"data-testid":d,className:f,ref:t,style:_,children:s})});var It={exports:{}},mr=It.exports,bn;function wn(){return bn||(bn=1,function(e,t){(function(r,n){e.exports=n()})(mr,function(){var r=1e3,n=6e4,o=36e5,a="millisecond",s="second",l="minute",c="hour",d="day",u="week",f="month",w="quarter",_="year",y="date",v="Invalid Date",m=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,b=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,E={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(T){var S=["th","st","nd","rd"],p=T%100;return"["+T+(S[(p-20)%10]||S[p]||S[0])+"]"}},O=function(T,S,p){var R=String(T);return!R||R.length>=S?T:""+Array(S+1-R.length).join(p)+T},P={s:O,z:function(T){var S=-T.utcOffset(),p=Math.abs(S),R=Math.floor(p/60),C=p%60;return(S<=0?"+":"-")+O(R,2,"0")+":"+O(C,2,"0")},m:function T(S,p){if(S.date()<p.date())return-T(p,S);var R=12*(p.year()-S.year())+(p.month()-S.month()),C=S.clone().add(R,f),k=p-C<0,z=S.clone().add(R+(k?-1:1),f);return+(-(R+(p-C)/(k?C-z:z-C))||0)},a:function(T){return T<0?Math.ceil(T)||0:Math.floor(T)},p:function(T){return{M:f,y:_,w:u,d,D:y,h:c,m:l,s,ms:a,Q:w}[T]||String(T||"").toLowerCase().replace(/s$/,"")},u:function(T){return T===void 0}},L="en",V={};V[L]=E;var D="$isDayjsObject",M=function(T){return T instanceof K||!(!T||!T[D])},H=function T(S,p,R){var C;if(!S)return L;if(typeof S=="string"){var k=S.toLowerCase();V[k]&&(C=k),p&&(V[k]=p,C=k);var z=S.split("-");if(!C&&z.length>1)return T(z[0])}else{var A=S.name;V[A]=S,C=A}return!R&&C&&(L=C),C||!R&&L},F=function(T,S){if(M(T))return T.clone();var p=typeof S=="object"?S:{};return p.date=T,p.args=arguments,new K(p)},N=P;N.l=H,N.i=M,N.w=function(T,S){return F(T,{locale:S.$L,utc:S.$u,x:S.$x,$offset:S.$offset})};var K=function(){function T(p){this.$L=H(p.locale,null,!0),this.parse(p),this.$x=this.$x||p.x||{},this[D]=!0}var S=T.prototype;return S.parse=function(p){this.$d=function(R){var C=R.date,k=R.utc;if(C===null)return new Date(NaN);if(N.u(C))return new Date;if(C instanceof Date)return new Date(C);if(typeof C=="string"&&!/Z$/i.test(C)){var z=C.match(m);if(z){var A=z[2]-1||0,G=(z[7]||"0").substring(0,3);return k?new Date(Date.UTC(z[1],A,z[3]||1,z[4]||0,z[5]||0,z[6]||0,G)):new Date(z[1],A,z[3]||1,z[4]||0,z[5]||0,z[6]||0,G)}}return new Date(C)}(p),this.init()},S.init=function(){var p=this.$d;this.$y=p.getFullYear(),this.$M=p.getMonth(),this.$D=p.getDate(),this.$W=p.getDay(),this.$H=p.getHours(),this.$m=p.getMinutes(),this.$s=p.getSeconds(),this.$ms=p.getMilliseconds()},S.$utils=function(){return N},S.isValid=function(){return this.$d.toString()!==v},S.isSame=function(p,R){var C=F(p);return this.startOf(R)<=C&&C<=this.endOf(R)},S.isAfter=function(p,R){return F(p)<this.startOf(R)},S.isBefore=function(p,R){return this.endOf(R)<F(p)},S.$g=function(p,R,C){return N.u(p)?this[R]:this.set(C,p)},S.unix=function(){return Math.floor(this.valueOf()/1e3)},S.valueOf=function(){return this.$d.getTime()},S.startOf=function(p,R){var C=this,k=!!N.u(R)||R,z=N.p(p),A=function(pe,Q){var ue=N.w(C.$u?Date.UTC(C.$y,Q,pe):new Date(C.$y,Q,pe),C);return k?ue:ue.endOf(d)},G=function(pe,Q){return N.w(C.toDate()[pe].apply(C.toDate("s"),(k?[0,0,0,0]:[23,59,59,999]).slice(Q)),C)},oe=this.$W,ae=this.$M,me=this.$D,$e="set"+(this.$u?"UTC":"");switch(z){case _:return k?A(1,0):A(31,11);case f:return k?A(1,ae):A(0,ae+1);case u:var _e=this.$locale().weekStart||0,ie=(oe<_e?oe+7:oe)-_e;return A(k?me-ie:me+(6-ie),ae);case d:case y:return G($e+"Hours",0);case c:return G($e+"Minutes",1);case l:return G($e+"Seconds",2);case s:return G($e+"Milliseconds",3);default:return this.clone()}},S.endOf=function(p){return this.startOf(p,!1)},S.$set=function(p,R){var C,k=N.p(p),z="set"+(this.$u?"UTC":""),A=(C={},C[d]=z+"Date",C[y]=z+"Date",C[f]=z+"Month",C[_]=z+"FullYear",C[c]=z+"Hours",C[l]=z+"Minutes",C[s]=z+"Seconds",C[a]=z+"Milliseconds",C)[k],G=k===d?this.$D+(R-this.$W):R;if(k===f||k===_){var oe=this.clone().set(y,1);oe.$d[A](G),oe.init(),this.$d=oe.set(y,Math.min(this.$D,oe.daysInMonth())).$d}else A&&this.$d[A](G);return this.init(),this},S.set=function(p,R){return this.clone().$set(p,R)},S.get=function(p){return this[N.p(p)]()},S.add=function(p,R){var C,k=this;p=Number(p);var z=N.p(R),A=function(ae){var me=F(k);return N.w(me.date(me.date()+Math.round(ae*p)),k)};if(z===f)return this.set(f,this.$M+p);if(z===_)return this.set(_,this.$y+p);if(z===d)return A(1);if(z===u)return A(7);var G=(C={},C[l]=n,C[c]=o,C[s]=r,C)[z]||1,oe=this.$d.getTime()+p*G;return N.w(oe,this)},S.subtract=function(p,R){return this.add(-1*p,R)},S.format=function(p){var R=this,C=this.$locale();if(!this.isValid())return C.invalidDate||v;var k=p||"YYYY-MM-DDTHH:mm:ssZ",z=N.z(this),A=this.$H,G=this.$m,oe=this.$M,ae=C.weekdays,me=C.months,$e=C.meridiem,_e=function(Q,ue,we,be){return Q&&(Q[ue]||Q(R,k))||we[ue].slice(0,be)},ie=function(Q){return N.s(A%12||12,Q,"0")},pe=$e||function(Q,ue,we){var be=Q<12?"AM":"PM";return we?be.toLowerCase():be};return k.replace(b,function(Q,ue){return ue||function(we){switch(we){case"YY":return String(R.$y).slice(-2);case"YYYY":return N.s(R.$y,4,"0");case"M":return oe+1;case"MM":return N.s(oe+1,2,"0");case"MMM":return _e(C.monthsShort,oe,me,3);case"MMMM":return _e(me,oe);case"D":return R.$D;case"DD":return N.s(R.$D,2,"0");case"d":return String(R.$W);case"dd":return _e(C.weekdaysMin,R.$W,ae,2);case"ddd":return _e(C.weekdaysShort,R.$W,ae,3);case"dddd":return ae[R.$W];case"H":return String(A);case"HH":return N.s(A,2,"0");case"h":return ie(1);case"hh":return ie(2);case"a":return pe(A,G,!0);case"A":return pe(A,G,!1);case"m":return String(G);case"mm":return N.s(G,2,"0");case"s":return String(R.$s);case"ss":return N.s(R.$s,2,"0");case"SSS":return N.s(R.$ms,3,"0");case"Z":return z}return null}(Q)||z.replace(":","")})},S.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},S.diff=function(p,R,C){var k,z=this,A=N.p(R),G=F(p),oe=(G.utcOffset()-this.utcOffset())*n,ae=this-G,me=function(){return N.m(z,G)};switch(A){case _:k=me()/12;break;case f:k=me();break;case w:k=me()/3;break;case u:k=(ae-oe)/6048e5;break;case d:k=(ae-oe)/864e5;break;case c:k=ae/o;break;case l:k=ae/n;break;case s:k=ae/r;break;default:k=ae}return C?k:N.a(k)},S.daysInMonth=function(){return this.endOf(f).$D},S.$locale=function(){return V[this.$L]},S.locale=function(p,R){if(!p)return this.$L;var C=this.clone(),k=H(p,R,!0);return k&&(C.$L=k),C},S.clone=function(){return N.w(this.$d,this)},S.toDate=function(){return new Date(this.valueOf())},S.toJSON=function(){return this.isValid()?this.toISOString():null},S.toISOString=function(){return this.$d.toISOString()},S.toString=function(){return this.$d.toUTCString()},T}(),U=K.prototype;return F.prototype=U,[["$ms",a],["$s",s],["$m",l],["$H",c],["$W",d],["$M",f],["$y",_],["$D",y]].forEach(function(T){U[T[1]]=function(S){return this.$g(S,T[0],T[1])}}),F.extend=function(T,S){return T.$i||(T(S,K,F),T.$i=!0),F},F.locale=H,F.isDayjs=M,F.unix=function(T){return F(1e3*T)},F.en=V[L],F.Ls=V,F.p={},F})}(It)),It.exports}var pr=wn();const le=Ye(pr),Ge={ru:{from:"с",to:"по",status:"статус",allStatuses:"Все статусы",selectStatus:"Выбрать тип статуса",allEvents:"Все события",selectEvent:"Выбрать тип события",currentMonth:"Текущий месяц",search:"Поиск",day1:"День",day2:"Дня",day3:"Дней"},en:{from:"from",to:"to",status:"status",allStatuses:"All statuses",selectStatus:"Select status type",allEvents:"All events",selectEvent:"Select event type",currentMonth:"Current month",search:"Search",day1:"Day",day2:"Day",day3:"Days"}};function vr(e,t){let r;return function(){clearTimeout(r),r=setTimeout(()=>e(),t)}}const gr=(e,t)=>le(e).format("DD-MM-YYYY")===le(t).format("DD-MM-YYYY"),De="light",Sn=["#f44336","#2196f3","#4caf50","#ffeb3b","#ff9800","#9c27b0","#673ab7","#3f51b5","#00bcd4","#8bc34a","#ff5722"],xe={dark:{bgPrimary:"#1e2123",bgSecondary:"#252525",textPrimary:"#ffffffb3",textSecondary:"#a1b4d3",eventColor:"#f44336",statusColor:"#4caf50",buttonBg:"#a7bac3",boxShadow:"#00000099",avatarBg:"#a7bac3",avatarColor:"#000000",checkmark:"#32373b",hoverCheckmark:"#656565"},light:{bgPrimary:"#dbdbde",bgSecondary:"#f3f3f3",textPrimary:"#000000b3",textSecondary:"#cccccc",eventColor:"#f44336",statusColor:"#4caf50",buttonBg:"#455a64",boxShadow:"#FFFFFFEA",avatarBg:"#455a64",avatarColor:"#FFFFFF",checkmark:"#c0c3cd",hoverCheckmark:"#7f7f7f"}},Cn=e=>{const t=[],r=[...Sn];return e.forEach((n,o)=>{r.length||r.push(...Sn);const a=Math.floor(Math.random()*r.length);t.push({id:o,label:n,icon:void 0,color:r.splice(a,1)[0]})}),t},kt=(e,t,r,n)=>{if(t===void 0)return e;if(typeof t=="string")return t;if(typeof t=="number"&&n){if(n instanceof Map)return n.get(t)||e;if(Array.isArray(n)){const o=n.find(a=>a.id===t);if(r&&o&&o[r])return r in o?o[r]:e}}return e},yr=e=>new RegExp(e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),"i"),xr=e=>e.every(t=>typeof t=="string")?new Map(e.map((t,r)=>[r,t])):new Map(e.map(t=>[t.id,t.label])),En=(e,t,r)=>typeof e.eventType=="number"?t.has(e.eventType):r.some(n=>n===e.eventType),Tn=(e,t,r)=>typeof e.statusType=="number"?t.has(e.statusType):r.some(n=>n===e.statusType),_r=(e,t,r,n,o,a)=>{if(!e)return[];const s=new Map(a==null?void 0:a.map(u=>[u.id,u.name])),l=r?xr(r):void 0,c=n?new Map(n.map(u=>[u.id,u.label])):void 0;o&&o.trim().length>0&&(e=e.filter(u=>yr(o).test(u.name)));const d=t==null?void 0:t.reduce((u,f)=>{var y;const w=(y=f.userId)==null?void 0:y.toString();return w&&(r&&r.length>0&&n&&n.length>0?En(f,l,r)&&Tn(f,c,n):r&&r.length>0?En(f,l,r):n&&n.length>0?Tn(f,c,n):!0)&&(u.has(w)||u.set(w,[]),u.get(w).push(f)),u},new Map);return e.map(u=>({id:u.id,name:u.name,department:kt("",u.department,void 0,s),events:(d==null?void 0:d.get(u.id.toString()))||[]}))},br=e=>{const{ranges:t,users:r,departments:n,currentDate:o,events:a,statuses:s,openedSidebar:l}=e,[c,d]=h.useState([]),[u,f]=h.useState(!1),[w,_]=h.useState(null),y=h.createRef(),[v,m]=h.useState(l),[b,E]=h.useState(o??le().toString()),[O,P]=h.useState(""),[L,V]=h.useState([]),[D,M]=h.useState([]),[H,F]=h.useState([]),[N,K]=h.useState([]),U=h.useCallback(()=>{if(t&&r){const p=_r(r,t,D,N,O,n);d(p)}},[t,r,D,N,O,n]),T=h.useCallback(()=>{var p;(p=y.current)!=null&&p.offsetWidth&&_(y.current.offsetWidth/le(b).daysInMonth())},[b,y]);h.useEffect(()=>{if(a)if(a.every(p=>typeof p=="string")){const p=Cn(a);V(p),M(p)}else V(a),M(a)},[a]),h.useEffect(()=>{if(s)if(s.every(p=>typeof p=="string")){const p=Cn(s);F(p),K(p)}else F(s),K(s)},[s]),h.useEffect(()=>{m(l)},[l]),h.useEffect(()=>{o&&E(o)},[o]);const S=h.useCallback(p=>{P(p)},[]);return{state:{filteredData:c,isLoading:u,tdWidth:w,thRef:y,openSidebar:v,currentDate:b,currentEvents:L,currentStatuses:H},actions:{setIsLoading:f,setOpenSidebar:m,setCurrentDate:E,setSelectedEvents:M,setSelectedStatuses:K,handleChangeSearch:S,getTdWidth:T,updateFilteredData:U}}},$n=h.createContext({activeSelectId:null,setActiveSelectId:()=>{}}),wr=()=>h.useContext($n),Ie={selectContainer:"_selectContainer_13z1k_1",selectedText:"_selectedText_13z1k_9",selectedTextActive:"_selectedTextActive_13z1k_20",selectOptions:"_selectOptions_13z1k_25",selectOption:"_selectOption_13z1k_25",checkmark:"_checkmark_13z1k_92"};function On(e){const t=h.useId(),{activeSelectId:r,setActiveSelectId:n}=wr(),{theme:o,defaultText:a,optionsList:s,multiselect:l=!1,selectedOptions:c=[],onOptionSelect:d,defaultAll:u,className:f,style:w,dataTestid:_,accentColor:y}=e,[v,m]=h.useState(a),[b,E]=h.useState(c),O=r===t,P=D=>{var M,H,F,N,K,U,T,S;(D==null?void 0:D.target)instanceof HTMLElement&&!((H=(M=D==null?void 0:D.target)==null?void 0:M.classList)!=null&&H.contains(Ie.selectContainer))&&!((N=(F=D==null?void 0:D.target)==null?void 0:F.classList)!=null&&N.contains(Ie.selectOption))&&!((U=(K=D==null?void 0:D.target)==null?void 0:K.classList)!=null&&U.contains(Ie.checkmark))&&!((S=(T=D==null?void 0:D.target)==null?void 0:T.classList)!=null&&S.contains(Ie.selectedText))&&n(null)};h.useEffect(()=>{E(c)},[c]),h.useEffect(()=>(c.length===s.length&&m(u),document.addEventListener("mousedown",P),()=>{document.removeEventListener("mousedown",P)}),[]);const L=()=>{n(O?null:t)},V=D=>{if(l){const M=[...b],H=M.indexOf(D);H===-1?M.push(D):M.splice(H,1),E(M),M.length>0?M.length===s.length?m(u):m(M.map(F=>F.label).join(", ")):m(a),d&&d(M)}else m(D.label),n(null),d&&d([D])};return g.jsxs("div",{className:Ee(Ie.selectContainer,f),style:w,children:[g.jsx("div",{className:Ee(Ie.selectedText,O&&Ie.selectedTextActive),"data-testid":_,onClick:L,style:{color:xe[o].textPrimary,...O&&{borderColor:y}},children:v}),O&&g.jsx("ul",{className:Ie.selectOptions,children:s.map(D=>{const M=b.some(F=>F.id===D.id),H={"--hover-checkmark":xe[o].hoverCheckmark,background:M?xe[o].checkmark:xe[o].bgPrimary,color:xe[o].textPrimary};return g.jsxs("li",{className:Ie.selectOption+(M?" "+Ie.selected:""),"data-name":D.label,style:H,onClick:()=>V(D),children:[g.jsx("input",{onChange:()=>{V(D)},type:"checkbox",checked:M}),g.jsx("span",{className:Ie.checkmark,style:{background:xe[o].checkmark,...M&&{background:y}}}),D.label]},D.id)})})]})}const Sr=({children:e})=>{const[t,r]=h.useState(null);return g.jsx($n.Provider,{value:{activeSelectId:t,setActiveSelectId:r},children:e})},Rn={button:"_button_2l5nr_1",small:"_small_2l5nr_15",medium:"_medium_2l5nr_19",large:"_large_2l5nr_23"},Bt=e=>{const{onClick:t,theme:r=De,size:n="medium",variant:o="contained",children:a,disabled:s=!1,className:l,dataTestid:c,accentColor:d,sx:u}=e,f={contained:{backgroundColor:d,color:xe[r].bgSecondary},text:{backgroundColor:"transparent",color:d},outlined:{backgroundColor:"transparent",color:d,border:`1px solid ${d}`}}[o];return g.jsx("button",{disabled:s,"data-testid":c,onClick:t,className:Ee(Rn.button,Rn[n],l),style:{...f,...u},children:a})},Te={wrap:"_wrap_slllc_1",container:"_container_slllc_5",monthControlContainer:"_monthControlContainer_slllc_10",controlsContainer:"_controlsContainer_slllc_17",selectContainer:"_selectContainer_slllc_24",eventSelectContainer:"_eventSelectContainer_slllc_30",searchContainer:"_searchContainer_slllc_36",select:"_select_slllc_24",eventSelect:"_eventSelect_slllc_30",monthContainer:"_monthContainer_slllc_51",currentMonthContainer:"_currentMonthContainer_slllc_56",navigationContainer:"_navigationContainer_slllc_61",dateContainer:"_dateContainer_slllc_66",currentMonthButton:"_currentMonthButton_slllc_71",prevButton:"_prevButton_slllc_75",nextButton:"_nextButton_slllc_80",separator:"_separator_slllc_86"},ee={calendar:"_calendar_15cdj_1",range:"_range_15cdj_5",startPrev:"_startPrev_15cdj_24",endNext:"_endNext_15cdj_30",avatar:"_avatar_15cdj_35",sidebar:"_sidebar_15cdj_47",content:"_content_15cdj_48",item:"_item_15cdj_57",headSidebar:"_headSidebar_15cdj_64",bodySidebar:"_bodySidebar_15cdj_68",headContent:"_headContent_15cdj_72",bodyContent:"_bodyContent_15cdj_76",text:"_text_15cdj_80",subtitle:"_subtitle_15cdj_93",bodyTitle:"_bodyTitle_15cdj_100",bodyText:"_bodyText_15cdj_113",caption:"_caption_15cdj_119"};function Dn(e){const{fill:t,width:r,height:n}=e;return g.jsx("svg",{fill:t||"#000000",height:r||"32px",width:n||"32px",version:"1.1",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",viewBox:"0 0 55.752 55.752",xmlSpace:"preserve",children:g.jsx("g",{children:g.jsx("path",{d:`M43.006,23.916c-0.28-0.282-0.59-0.52-0.912-0.727L20.485,1.581c-2.109-2.107-5.527-2.108-7.637,0.001
c-2.109,2.108-2.109,5.527,0,7.637l18.611,18.609L12.754,46.535c-2.11,2.107-2.11,5.527,0,7.637c1.055,1.053,2.436,1.58,3.817,1.58
s2.765-0.527,3.817-1.582l21.706-21.703c0.322-0.207,0.631-0.444,0.912-0.727c1.08-1.08,1.598-2.498,1.574-3.912
C44.605,26.413,44.086,24.993,43.006,23.916z`})})})}function jn(e){const{fill:t,width:r,height:n}=e;return g.jsx("svg",{fill:t||"#000000",height:r||"32px",width:n||"32px",version:"1.1",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",viewBox:"0 0 55.752 55.752",xmlSpace:"preserve",children:g.jsx("g",{children:g.jsx("path",{d:`M12.745,23.915c0.283-0.282,0.59-0.52,0.913-0.727L35.266,1.581c2.108-2.107,5.528-2.108,7.637,0.001
c2.109,2.108,2.109,5.527,0,7.637L24.294,27.828l18.705,18.706c2.109,2.108,2.109,5.526,0,7.637
c-1.055,1.056-2.438,1.582-3.818,1.582s-2.764-0.526-3.818-1.582L13.658,32.464c-0.323-0.207-0.632-0.445-0.913-0.727
c-1.078-1.078-1.598-2.498-1.572-3.911C11.147,26.413,11.667,24.994,12.745,23.915z`})})})}function Cr({currentDate:e,onDateChange:t,theme:r=De,accentColor:n,lang:o}){const a=h.useCallback(()=>{t(le().toString())},[t]),s=l=>{const c=le(e).add(l?1:-1,"month").toString();t(c)};return g.jsxs(te,{type:"flex",padding:1,className:Te.monthContainer,children:[g.jsx(te,{type:"flex",className:Te.currentMonthContainer,children:g.jsx(Bt,{theme:r,className:Te.currentMonthButton,accentColor:n,onClick:a,children:Ge[o].currentMonth})}),g.jsxs(te,{type:"flex",className:Te.navigationContainer,children:[g.jsx(Bt,{theme:r,onClick:()=>s(!1),accentColor:n,className:Te.prevButton,children:g.jsx(jn,{fill:xe[r].bgSecondary,width:"12px",height:"11px"})}),g.jsx("div",{className:Te.separator}),g.jsx(Bt,{theme:r,onClick:()=>s(!0),accentColor:n,className:Te.nextButton,dataTestid:"next-button",children:g.jsx(Dn,{fill:xe[r].bgSecondary,width:"12px",height:"11px"})})]}),g.jsx(te,{type:"flex",className:Te.dateContainer,children:g.jsx("div",{className:Ee(ee.text,ee.bodyTitle),children:le(e).locale(o).format("MMMM YYYY")})})]})}const Er={input:"_input_6cl0p_1"};function Tr({onChange:e,value:t,label:r,className:n,dataTestid:o,style:a}){return g.jsx("input",{type:"text",placeholder:r,className:`${Er.input}${n?" "+n:""}`,style:{...a},"data-testid":o,value:t,onChange:e})}function $r({onSearch:e,lang:t,style:r}){const[n,o]=h.useState(""),[a,s]=h.useState(n);h.useEffect(()=>{const c=setTimeout(()=>{s(n)},300);return()=>{clearTimeout(c)}},[n]),h.useEffect(()=>{e(a)},[a,e]);const l=h.useCallback(c=>{o(c.target.value)},[]);return g.jsx(Tr,{label:Ge[t].search,value:n,style:r,dataTestid:"search-input",onChange:l})}function Or({currentDate:e,onDateChange:t,onSearch:r,events:n,statuses:o,theme:a=De,handleEventSelect:s,handleStatusSelect:l,accentColor:c,lang:d}){return g.jsx(Sr,{children:g.jsx(te,{size:12,className:Te.wrap,children:g.jsxs(te,{type:"flex",size:12,padding:0,className:Te.container,children:[g.jsx(te,{size:4,className:Te.monthControlContainer,children:g.jsx(Cr,{currentDate:e,onDateChange:t,lang:d,accentColor:c,theme:a})}),g.jsxs(te,{size:8,className:Te.controlsContainer,children:[g.jsxs(g.Fragment,{children:[o&&o.length>0&&g.jsx(te,{size:4,padding:1,className:Te.selectContainer,children:g.jsx(On,{theme:a,optionsList:o,multiselect:!0,onOptionSelect:l,selectedOptions:o,className:Te.select,dataTestid:"status-select",accentColor:c,defaultAll:Ge[d].allStatuses,defaultText:Ge[d].selectStatus})}),n&&n.length>0&&g.jsx(te,{size:4,padding:1,className:Te.eventSelectContainer,children:g.jsx(On,{theme:a,optionsList:n,multiselect:!0,onOptionSelect:s,selectedOptions:n,accentColor:c,className:Te.eventSelect,dataTestid:"event-select",defaultAll:Ge[d].allEvents,defaultText:Ge[d].selectEvent})})]}),g.jsx(te,{size:4,padding:1,className:Te.searchContainer,children:g.jsx($r,{onSearch:r,lang:d})})]})]})})})}const Mt=e=>{const{theme:t,sx:r,children:n,className:o,dataTestid:a}=e;return g.jsx("div",{className:ee.item+(o?" "+o:""),"data-testid":a,style:{backgroundColor:xe[t].bgPrimary,color:xe[t].textPrimary,boxShadow:`inset 0.5px 0.5px ${xe[t].boxShadow}, inset -0.5px -0.5px ${xe[t].boxShadow}`,...r},children:n})};function Rr(e){const{theme:t=De,onToggle:r,opened:n,accentColor:o}=e;return g.jsx(te,{type:"flex",className:ee.headSidebar,children:g.jsx(Mt,{theme:t,dataTestid:"sidebar-head",sx:{minHeight:"40px",border:0,width:"100%",textAlign:"left",alignItems:"center",display:"flex"},children:g.jsx(Bt,{theme:t,onClick:r,size:"small",variant:"outlined",dataTestid:"sidebar-toggle",accentColor:o,children:n?g.jsx(jn,{fill:o,width:"11px",height:"11px"}):g.jsx(Dn,{fill:o,width:"11px",height:"11px"})})})})}const Dr=e=>{if(!e)return"";const t=e.trim().split(/\s+/);return t.length===0?"":t.length===1?t[0][0].toUpperCase():(t[t.length-1][0]+t[0][0]).toUpperCase()},jr=(e,t,r,n,o,a)=>{const s=r,l=4;let c={border:`0px solid ${n}55`,width:`${s-l*2}px`,maxWidth:`${s-l*2}px`,background:`${n??"#f44336"}55`,color:n??"#f44336"};return a&&(c={...c,width:`${s-l}px`,maxWidth:`${s-l}px`}),o&&(c={...c,width:`${s}px`,maxWidth:`${s}px`}),c},kr=(e,t)=>Ee(ee.range,e&&ee.startPrev,t&&ee.endNext),Mr=(e,t)=>{const r=le(e).daysInMonth();return Array.from({length:r},(n,o)=>le(e).locale(t).startOf("month").add(o,"day").format("dd"))};function Ar(e){const{userWithRange:t,theme:r=De,opened:n}=e;return g.jsx(te,{className:ee.bodySidebar,children:t.map(o=>g.jsxs(Mt,{theme:r,sx:{textAlign:"left",display:"flex",flexDirection:"column",justifyContent:"center"},children:[n&&g.jsxs("div",{children:[g.jsx("div",{"data-testid":"user-item",className:Ee(ee.text,ee.bodyTitle),children:o.name}),o.department&&g.jsx("div",{style:{opacity:.7},className:Ee(ee.text,ee.subtitle),children:o.department})]}),!n&&g.jsx(te,{style:{flexBasis:"10%"},children:g.jsx("div",{className:ee.avatar,style:{background:xe[r].avatarBg,color:xe[r].avatarColor},children:Dr(o.name)})})]},o.id))})}function Lr(e){const{theme:t=De,userWithRange:r,onToggle:n,opened:o,accentColor:a}=e;return g.jsxs(te,{dataTestid:"sidebar",type:"flex",direction:"column",className:ee.sidebar+(o?" opened":" closed"),children:[g.jsx(te,{size:12,children:g.jsx(Rr,{accentColor:a,theme:t,onToggle:n,opened:o})}),g.jsx(te,{size:12,children:g.jsx(Ar,{opened:o,theme:t,userWithRange:r})})]})}const zr=(e,t,r)=>{const n=le(t),o=n.daysInMonth();return Array.from({length:o},(a,s)=>{const l=s+1,c=n.date(l),d=e.events.find(v=>{const m=le(v.startDate),b=le(v.endDate);return c.isBetween(m,b,"day","[]")});if(!d)return{isStart:!1};const u=le(d.startDate),f=le(d.endDate);if(!(u.isSame(c,"day")||c.date()===1))return{isStart:!1};const _=f.isAfter(n.endOf("month"))?n.endOf("month").add(-1,"day"):f,y=Math.ceil(_.diff(c,"day",!0))+1;return{isStart:!0,width:r*y,isAllMonth:u.isBefore(n.startOf("month"))&&f.isAfter(n.endOf("month")),isStartPrevMonth:u.isBefore(n.startOf("month")),isEndNextMonth:f.isAfter(n.endOf("month")),...d}})},bt=Math.min,ht=Math.max,Ht=Math.round,qt=Math.floor,Ue=e=>({x:e,y:e}),Nr={left:"right",right:"left",bottom:"top",top:"bottom"},Yr={start:"end",end:"start"};function on(e,t,r){return ht(e,bt(t,r))}function At(e,t){return typeof e=="function"?e(t):e}function mt(e){return e.split("-")[0]}function Lt(e){return e.split("-")[1]}function kn(e){return e==="x"?"y":"x"}function sn(e){return e==="y"?"height":"width"}function wt(e){return["top","bottom"].includes(mt(e))?"y":"x"}function an(e){return kn(wt(e))}function Fr(e,t,r){r===void 0&&(r=!1);const n=Lt(e),o=an(e),a=sn(o);let s=o==="x"?n===(r?"end":"start")?"right":"left":n==="start"?"bottom":"top";return t.reference[a]>t.floating[a]&&(s=Vt(s)),[s,Vt(s)]}function Wr(e){const t=Vt(e);return[ln(e),t,ln(t)]}function ln(e){return e.replace(/start|end/g,t=>Yr[t])}function Pr(e,t,r){const n=["left","right"],o=["right","left"],a=["top","bottom"],s=["bottom","top"];switch(e){case"top":case"bottom":return r?t?o:n:t?n:o;case"left":case"right":return t?a:s;default:return[]}}function Ir(e,t,r,n){const o=Lt(e);let a=Pr(mt(e),r==="start",n);return o&&(a=a.map(s=>s+"-"+o),t&&(a=a.concat(a.map(ln)))),a}function Vt(e){return e.replace(/left|right|bottom|top/g,t=>Nr[t])}function Br(e){return{top:0,right:0,bottom:0,left:0,...e}}function Mn(e){return typeof e!="number"?Br(e):{top:e,right:e,bottom:e,left:e}}function Ut(e){const{x:t,y:r,width:n,height:o}=e;return{width:n,height:o,top:r,left:t,right:t+n,bottom:r+o,x:t,y:r}}function An(e,t,r){let{reference:n,floating:o}=e;const a=wt(t),s=an(t),l=sn(s),c=mt(t),d=a==="y",u=n.x+n.width/2-o.width/2,f=n.y+n.height/2-o.height/2,w=n[l]/2-o[l]/2;let _;switch(c){case"top":_={x:u,y:n.y-o.height};break;case"bottom":_={x:u,y:n.y+n.height};break;case"right":_={x:n.x+n.width,y:f};break;case"left":_={x:n.x-o.width,y:f};break;default:_={x:n.x,y:n.y}}switch(Lt(t)){case"start":_[s]-=w*(r&&d?-1:1);break;c