@progress/kendo-react-scheduler 14.5.0-develop.10 → 14.5.0-develop.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/README.md CHANGED
@@ -1,4 +1,4 @@
1
- [![KendoReact NPM Banner](https://raw.githubusercontent.com/telerik/kendo-react/master/images/kendoreact-github-banner.png)](https://www.telerik.com/kendo-react-ui/components/free?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-react-trial-npm-scheduler&utm_content=banner)
1
+ [![KendoReact NPM Banner](https://raw.githubusercontent.com/telerik/kendo-react/master/images/kendoreact-github-banner.png)](https://www.telerik.com/kendo-react-ui/components/getting-started/free-vs-premium?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-react-trial-npm-scheduler&utm_content=banner)
2
2
 
3
3
  # KendoReact Scheduler Component for React
4
4
 
@@ -12,7 +12,7 @@
12
12
  >
13
13
  > [Start using KendoReact](https://www.telerik.com/try/kendo-react-ui?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-react-trial-npm-scheduler) and speed up your development process!
14
14
  >
15
- > If you're looking for free React components, check out [Get Started with KendoReact Free](https://www.telerik.com/kendo-react-ui/components/free).
15
+ > If you're looking for free React components, check out [Get Started with KendoReact Free](https://www.telerik.com/kendo-react-ui/components/getting-started).
16
16
 
17
17
  The [React Scheduler](https://www.telerik.com/kendo-react-ui/components/scheduler), part of KendoReact, provides out-of-the-box support for timezone conversion, resources visualization, grouping, editing, and recurring events.
18
18
 
@@ -36,7 +36,7 @@ Among the many features which the KendoReact Scheduler delivers are:
36
36
 
37
37
  The following table outlines the key resources available with KendoReact and KendoReact Free.
38
38
 
39
- | | [KendoReact Free](https://www.telerik.com/kendo-react-ui/components/free) | [KendoReact](https://www.telerik.com/kendo-react-ui) |
39
+ | | [KendoReact Free](https://www.telerik.com/kendo-react-ui/components/getting-started/free-vs-premium) | [KendoReact](https://www.telerik.com/kendo-react-ui) |
40
40
  | -------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
41
41
  | React components | 50+ | 120+ |
42
42
  | Four professional themes | <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M20.285 2l-11.285 11.567-5.286-5.011-3.714 3.716 9 8.728 15-15.285z" stroke="white" stroke-width="2"/></svg> | <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M20.285 2l-11.285 11.567-5.286-5.011-3.714 3.716 9 8.728 15-15.285z" stroke="white" stroke-width="2"/></svg> |
@@ -59,7 +59,7 @@ For any issues you might encounter while working with the KendoReact Scheduler,
59
59
  ## Resources
60
60
 
61
61
  - [Getting Started with KendoReact](https://www.telerik.com/kendo-react-ui/components/getting-started/?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-react-trial-npm-scheduler)
62
- - [Get Started with KendoReact Free](https://www.telerik.com/kendo-react-ui/components/free)
62
+ - [Get Started with KendoReact Free](https://www.telerik.com/kendo-react-ui/components/getting-started)
63
63
  - [Getting Started with the KendoReact Scheduler](https://www.telerik.com/kendo-react-ui/components/scheduler/get-started/?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-react-trial-npm-scheduler)
64
64
  - [API Reference of the KendoReact Scheduler](https://www.telerik.com/kendo-react-ui/components/scheduler/api/SchedulerProps/?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-react-trial-npm-scheduler)
65
65
  - [KendoReact Roadmap](https://www.telerik.com/support/whats-new/kendo-react-ui/roadmap?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-react-trial-npm-scheduler)
@@ -12,4 +12,4 @@
12
12
  * Licensed under commercial license. See LICENSE.md in the package root for more information
13
13
  *-------------------------------------------------------------------------------------------
14
14
  */
15
- !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("react"),require("prop-types"),require("@progress/kendo-date-math"),require("@progress/kendo-react-common"),require("@progress/kendo-data-query"),require("@progress/kendo-react-intl"),require("@progress/kendo-react-buttons"),require("@progress/kendo-react-dateinputs"),require("@progress/kendo-react-popup"),require("@progress/kendo-svg-icons"),require("react-dom"),require("@progress/kendo-react-form"),require("@progress/kendo-react-dialogs"),require("@progress/kendo-react-labels"),require("@progress/kendo-react-inputs"),require("@progress/kendo-react-dropdowns"),require("@progress/kendo-recurrence")):"function"==typeof define&&define.amd?define(["exports","react","prop-types","@progress/kendo-date-math","@progress/kendo-react-common","@progress/kendo-data-query","@progress/kendo-react-intl","@progress/kendo-react-buttons","@progress/kendo-react-dateinputs","@progress/kendo-react-popup","@progress/kendo-svg-icons","react-dom","@progress/kendo-react-form","@progress/kendo-react-dialogs","@progress/kendo-react-labels","@progress/kendo-react-inputs","@progress/kendo-react-dropdowns","@progress/kendo-recurrence"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).KendoReactScheduler={},e.React,e.PropTypes,e.KendoDateMath,e.KendoReactCommon,e.KendoDataQuery,e.KendoReactIntl,e.KendoReactButtons,e.KendoReactDateinputs,e.KendoReactPopup,e.KendoSvgIcons,e.ReactDOM,e.KendoReactForm,e.KendoReactDialogs,e.KendoReactLabels,e.KendoReactInputs,e.KendoReactDropdowns,e.KendoRecurrence)}(this,function(e,t,r,a,n,l,o,s,c,i,d,u,m,p,g,E,h,v){"use strict";function y(e){var t=Object.create(null);return e&&Object.keys(e).forEach(function(r){if("default"!==r){var a=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,a.get?a:{enumerable:!0,get:function(){return e[r]}})}}),t.default=e,Object.freeze(t)}var f=y(t),D=y(u);const k=(e,t=0,r=0,a=[])=>{if(e.length<=t)return[a];const n=[];return e[t].data.map(l=>{n.push(...k(e,t+1,r+1,[...a,{...l,field:e[t].field,valueField:e[t].valueField,colorField:e[t].colorField,multiple:e[t].multiple}]))}),n};function S(e,t){const r=[];if(!t||!t.length)return r;if(e&&e.resources&&e.resources.length){const a=e.resources;for(let e=0;e<a.length;e++){const n=t.find(t=>t.name===a[e]);r.push(n)}}return r}const C=(e,t=e.length-1)=>{const r=Math.max(0,t),a=[];e&&e.length||(e=[{}]);const n=(e[r].data||[]).map(t=>({...t,text:t[e[r].textField]}))||[],l=n.length;let o=1;for(let t=0;t<=r;t++)o*=(e[t].data||[]).length||1;for(let e=0;e<o;e++)n[e%l]&&a.push(n[e%l]);return a},b=e=>{if(!e)return{top:0,left:0,width:0,height:0,right:0};return{top:e.offsetTop,left:e.offsetLeft,right:e.offsetParent?e.offsetParent.offsetWidth-(e.offsetLeft+e.offsetWidth):0,width:e.offsetWidth,height:e.offsetHeight}},I=(e,t=!1)=>parseFloat(window.getComputedStyle(e)[t?"paddingLeft":"paddingTop"]||"0")+parseFloat(window.getComputedStyle(e)[t?"paddingRight":"paddingBottom"]||"0"),w=(e,t,r=!1)=>{e&&(void 0!==t.top&&(e.style.top=`${t.top}px`),void 0!==t.left&&(e.style.left=`${t.left}px`),void 0!==t.width&&(e.style.width=`${t.width}px`),void 0!==t.height&&!r&&(e.style.height="number"==typeof t.height?`${t.height}px`:t.height),r&&(e.style.minHeight=void 0!==t.height&&t.height>0?`${t.height}px`:""))},T=e=>e[0],R=e=>e[e.length-1],x=e=>{const t=new Set;return e.forEach(e=>{t.add(e.field)}),t.size===e.length};const A=(e,t,r,a=0)=>{if(a===r)return null;let n=null;const l=document.elementFromPoint(e,t);if(!l)return n;if("true"===l.getAttribute("data-slot"))return l;const o=l.style.pointerEvents;return l.style.pointerEvents="none",n=A(e,t,r,a+1),l.style.pointerEvents=o,n},_=(e,t)=>n.getter(t)(e),M=(e,t,r)=>{if(t)return n.setter(t)(e,r)},N=e=>null!=e;function z(e){return new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()))}const L=(e,t,r)=>{const a=O(e,t)?_(e,t.id):_(e,t.recurrenceId);return r.find(e=>_(e,t.id)===a)},O=(e,t)=>{const r=_(e,t.id),a=_(e,t.recurrenceId),n=_(e,t.recurrenceRule);return!(!r||!n||null!=a)},F=(e,t)=>Math.max(e.getTime(),t.getTime()),P=(e,t)=>Math.min(e.getTime(),t.getTime()),H=(e,t,r,a,n=!1)=>n?F(t,a)-P(e,r)<=t.getTime()-e.getTime()+(a.getTime()-r.getTime()):F(t,a)-P(e,r)<t.getTime()-e.getTime()+(a.getTime()-r.getTime()),W={id:"id",start:"start",startTimezone:"startTimezone",originalStart:"originalStart",end:"end",endTimezone:"endTimezone",isAllDay:"isAllDay",title:"title",description:"description",recurrenceRule:"recurrenceRule",recurrenceId:"recurrenceId",recurrenceExceptions:"recurrenceExceptions"},K=(e,t,r)=>(t.getHours()<e.getHours()||t.getHours()===e.getHours()&&t.getMinutes()<=e.getMinutes())&&(e.getHours()<r.getHours()||r.getHours()===e.getHours()&&e.getMinutes()<r.getMinutes()),V=(e,t,r)=>t<r?t<=e&&e<=r:e<=r||t<=e,G=e=>{let t=0;const r=e.slice();return r.sort((e,t)=>e-t).forEach((e,a)=>{r[a]===a&&(t=a+1)}),t},B=(e,t,r=!1)=>{e.forEach(e=>{e.order=null}),t.forEach(e=>e.items.splice(0,e.items.length));const a=[...e].sort((e,t)=>e.start.getTime()-t.start.getTime());t.forEach(e=>{const t=[];a.forEach(a=>{if((r||a.isAllDay===e.isAllDay)&&a.range.index===e.range.index&&(void 0===a.range.isAllDay||void 0===e.range.isAllDay||a.range.isAllDay===e.range.isAllDay)&&a.group.index===e.group.index&&H(a.start,a.end,e.start,e.end)){if(null!==a.order&&void 0!==a.order)t.includes(a.order)||(t.push(a.order),t.sort((e,t)=>e-t));else{const e=G(t);a.order=e,t.push(e),t.sort((e,t)=>e-t)}e.items.push(a)}})})},$=(e,t,r=!1)=>{e.forEach(e=>e.slots.splice(0,e.slots.length)),e.forEach(e=>{t.forEach(t=>{(r||e.isAllDay===t.isAllDay)&&e.range.index===t.range.index&&(void 0===e.range.isAllDay||void 0===t.range.isAllDay||e.range.isAllDay===t.range.isAllDay)&&e.group.index===t.group.index&&H(e.start,e.end,t.start,t.end)&&e.slots.push(t)})})},U=(...e)=>{},Z=(e,t,r=!1,a=!1)=>{const n=e.current;if(!n||!t)return null;const o=t.filter(e=>null!==e.current&&null!==e.current.element),s=l.orderBy(o,[{field:"current.props.group.index",dir:"asc"},{field:"current.props.range.index",dir:"asc"},r?{field:""}:{field:"current.props.isAllDay",dir:"desc"},{field:"current.props.start",dir:"asc"}]),c=s.findIndex(e=>null!==e.current&&!(e.current.props.uid!==n.props.uid||void 0!==e.current.props.occurrenceId&&e.current.props.occurrenceId!==n.props.occurrenceId||e.current.props.group.index!==n.props.group.index||e.current.props.range.index!==n.props.range.index||!r&&e.current.props.isAllDay!==n.props.isAllDay));return s[c+(a?-1:1)]},q=(e,t)=>(e.order||0)-(t.order||0),Y=6e4,j=[{}],X=new Date(1900,0,1),Q=new Date(2099,11,31);a.ZonedDate.fromLocalDate(X),a.ZonedDate.fromLocalDate(Q);var J=(e=>(e[e.create=0]="create",e[e.update=1]="update",e[e.remove=2]="remove",e))(J||{});const ee=f.createContext({current:null}),te=()=>f.useContext(ee);ee.displayName="SchedulerElementContext";const re=f.createContext({}),ae=()=>f.useContext(re);re.displayName="SchedulerPropsContext";const ne=f.createContext([]),le=()=>f.useContext(ne);ne.displayName="SchedulerViewsContext";const oe=f.createContext(W),se=()=>f.useContext(oe);oe.displayName="SchedulerFieldsContext";const ce=f.createContext({dateFormat:"{0:D}",shortDateFormat:"{0:d}"});ce.displayName="SchedulerDateFormatContext";const ie=f.createContext([{index:0,resources:[]}]),de=()=>f.useContext(ie);ie.displayName="SchedulerGroupsContext";const ue=f.createContext({start:new Date,end:new Date,zonedStart:a.ZonedDate.fromLocalDate(new Date),zonedEnd:a.ZonedDate.fromLocalDate(new Date)}),me=()=>f.useContext(ue);ue.displayName="SchedulerDateRangeContext";const pe=f.createContext(null),ge=()=>f.useContext(pe);pe.displayName="SchedulerOrientationContext";const Ee=f.createContext([new Date,U]),he=()=>f.useContext(Ee);Ee.displayName="SchedulerDateContext";const ve=f.createContext([[],U]),ye=()=>f.useContext(ve);ve.displayName="SchedulerDataContext";const fe=f.createContext(["day",U]),De=()=>f.useContext(fe);fe.displayName="SchedulerActiveViewContext";const ke=f.createContext([null,()=>{}]);ke.displayName="SchedulerItemSelectionContext";const Se=({children:e,element:t,props:r,views:a,fields:n,groups:l,dateRange:o,dateFormat:s,orientation:c,date:i,data:d,activeView:u,selection:m})=>f.createElement(ee.Provider,{value:t},f.createElement(re.Provider,{value:r},f.createElement(ne.Provider,{value:a},f.createElement(oe.Provider,{value:n},f.createElement(ce.Provider,{value:s},f.createElement(ie.Provider,{value:l},f.createElement(ue.Provider,{value:o},f.createElement(pe.Provider,{value:c},f.createElement(Ee.Provider,{value:i},f.createElement(ve.Provider,{value:d},f.createElement(fe.Provider,{value:u},f.createElement(ke.Provider,{value:m},e)))))))))))),Ce=(e,t,r)=>{const[a,n]=f.useState(t||e),l=f.useCallback((e,t)=>{n(e),r&&r.call(void 0,{...t,value:e})},[r,n]);return[void 0!==t?t:a,l]},be=f.forwardRef((e,t)=>{const{className:r,...a}=e,l=f.useRef(null),o=f.useRef(null);f.useImperativeHandle(o,()=>({element:l.current,props:e})),f.useImperativeHandle(t,()=>o.current);const c=f.useMemo(()=>n.classNames("k-scheduler-toolbar",r),[r]);return f.createElement(s.Toolbar,{id:e.id,ref:e=>{e&&(l.current=e.element)},className:c,...a},e.children)});be.displayName="KendoReactSchedulerHeader";const Ie=f.forwardRef((e,t)=>{const{className:r,...a}=e,l=f.useRef(null);return f.useImperativeHandle(t,()=>({element:l.current,props:e})),f.createElement(s.ToolbarItem,{ref:e=>{e&&(l.current=e.element)},className:n.classNames(r),...a},e.children)});Ie.displayName="KendoReactSchedulerSchedulerNavigation";const we=f.forwardRef((e,t)=>{const{className:r,...a}=e,l=f.useRef(null);return f.useImperativeHandle(t,()=>({element:l.current,props:e})),f.createElement(s.ToolbarItem,{ref:e=>{e&&(l.current=e.element)},className:n.classNames("k-scheduler-views",r),...a},e.children)});we.displayName="KendoReactSchedulerViewSelector";const Te=f.forwardRef((e,t)=>{const{className:r,style:a,...l}=e,o=f.useRef(null),c=f.useRef(null);f.useImperativeHandle(o,()=>({element:c.current,props:e})),f.useImperativeHandle(t,()=>o.current);const i=f.useMemo(()=>n.classNames("k-scheduler-footer",e.className),[e.className]);return f.createElement(s.Toolbar,{ref:e=>{e&&(c.current=e.element)},className:i,style:{boxShadow:"none",...a},...l},e.children)});Te.displayName="KendoReactSchedulerFooter";const Re="scheduler.allEvents",xe="scheduler.allDay",Ae="scheduler.today",_e="scheduler.timelineViewTitle",Me="scheduler.weekViewTitle",Ne="scheduler.workWeekViewTitle",ze="scheduler.agendaViewTitle",Le="scheduler.dayViewTitle",Oe="scheduler.monthViewTitle",Fe="scheduler.deleteTitle",Pe="scheduler.previousTitle",He="scheduler.nextTitle",We="scheduler.showFullDay",Ke="scheduler.showWorkDay",Ve="scheduler.editOccurrence",Ge="scheduler.editSeries",Be="scheduler.editRecurringConfirmation",$e="scheduler.editRecurringDialogTitle",Ue="scheduler.editSave",Ze="scheduler.editCancel",qe="scheduler.editorTitle",Ye="scheduler.editorEventTitle",je="scheduler.editorEventStart",Xe="scheduler.editorEventStartTimeZone",Qe="scheduler.editorEventEnd",Je="scheduler.editorEventEndTimeZone",et="scheduler.editorEventAllDay",tt="scheduler.editorEventDescription",rt="scheduler.editorEventSeparateTimeZones",at="scheduler.editorEventTimeZone",nt="scheduler.recurrenceEditorRepeat",lt="scheduler.recurrenceEditorDailyInterval",ot="scheduler.recurrenceEditorDailyRepeatEvery",st="scheduler.recurrenceEditorWeeklyInterval",ct="scheduler.recurrenceEditorWeeklyRepeatEvery",it="scheduler.recurrenceEditorWeeklyRepeatOn",dt="scheduler.recurrenceEditorMonthlyDay",ut="scheduler.recurrenceEditorMonthlyInterval",mt="scheduler.recurrenceEditorMonthlyRepeatEvery",pt="scheduler.recurrenceEditorMonthlyRepeatOn",gt="scheduler.recurrenceEditorYearlyOf",Et="scheduler.recurrenceEditorYearlyRepeatEvery",ht="scheduler.recurrenceEditorYearlyRepeatOn",vt="scheduler.recurrenceEditorYearlyInterval",yt="scheduler.recurrenceEditorFrequenciesDaily",ft="scheduler.recurrenceEditorFrequenciesMonthly",Dt="scheduler.recurrenceEditorFrequenciesNever",kt="scheduler.recurrenceEditorFrequenciesWeekly",St="scheduler.recurrenceEditorFrequenciesYearly",Ct="scheduler.recurrenceEditorOffsetPositionsFirst",bt="scheduler.recurrenceEditorOffsetPositionsSecond",It="scheduler.recurrenceEditorOffsetPositionsThird",wt="scheduler.recurrenceEditorOffsetPositionsFourth",Tt="scheduler.recurrenceEditorOffsetPositionsLast",Rt="scheduler.recurrenceEditorWeekdaysDay",xt="scheduler.recurrenceEditorWeekdaysWeekday",At="scheduler.recurrenceEditorWeekdaysWeekendday",_t="scheduler.recurrenceEditorEndAfter",Mt="scheduler.recurrenceEditorEndOccurrence",Nt="scheduler.recurrenceEditorEndLabel",zt="scheduler.recurrenceEditorEndNever",Lt="scheduler.recurrenceEditorEndOn",Ot="scheduler.editorDelete",Ft="scheduler.deleteConfirmation",Pt="scheduler.deleteRecurringConfirmation",Ht="scheduler.deleteOccurrence",Wt="scheduler.deleteSeries",Kt="scheduler.deleteDialogTitle",Vt="scheduler.deleteRecurringDialogTitle",Gt="scheduler.dateTitle",Bt="scheduler.timeTitle",$t="scheduler.eventTitle",Ut="scheduler.editorValidationRequired",Zt="scheduler.editorValidationStart",qt="scheduler.editorValidationEnd",Yt="scheduler.noEvents",jt="scheduler.moreEvents",Xt={[Ut]:"Field is required.",[Zt]:"Start time must be before End time.",[qt]:"End time must be after Start time.",[Re]:"All events",[xe]:"all day",[Ae]:"Today",[Le]:"Day",[Oe]:"Month",[Me]:"Week",[Ne]:"Work Week",[_e]:"Timeline",[ze]:"Agenda",[Fe]:"Delete",[Pe]:"Previous",[He]:"Next",[We]:"Show full day",[Ke]:"Show business hours",[Ve]:"Edit current occurrence",[Ge]:"Edit the series",[Be]:"Do you want to edit only this event occurrence or the whole series?",[$e]:"Edit Recurring Item",[Ue]:"Save",[Ze]:"Cancel",[Ot]:"Delete",[qe]:"Event",[Ye]:"Title",[je]:"Start",[Xe]:"Start Time Zone",[Qe]:"End",[Je]:"End Time Zone",[et]:"All Day Event",[tt]:"Description",[rt]:"End in different Time Zone",[at]:"Specify Time Zone",[nt]:"Repeat",[lt]:"day(s)",[ot]:"Repeat every",[st]:"week(s)",[ct]:"Repeat every",[it]:"Repeat on",[dt]:"Day",[ut]:"month(s)",[mt]:"Repeat every",[pt]:"Repeat on",[gt]:"of",[Et]:"Repeat every",[ht]:"Repeat on",[vt]:"year(s)",[yt]:"Daily",[ft]:"Monthly",[Dt]:"Never",[kt]:"Weekly",[St]:"Yearly",[Ct]:"First",[bt]:"Second",[It]:"Third",[wt]:"Fourth",[Tt]:"Last",[Rt]:"Day",[xt]:"Weekday",[At]:"Weekend Day",[_t]:"After",[Mt]:"occurrence(s)",[Nt]:"End",[zt]:"Never",[Lt]:"On",[Ft]:"Are you sure you want to delete this event?",[Pt]:"Do you want to delete only this event occurrence or the whole series?",[Ht]:"Delete current occurrence",[Wt]:"Delete the series",[Kt]:"Delete Event",[Vt]:"Delete Recurring Item",[Gt]:"Date",[Bt]:"Time",[$t]:"Event",[Yt]:"no events",[jt]:"More events"},Qt=f.forwardRef((e,t)=>{var r;const l=f.useRef(null),u=f.useRef(null);f.useImperativeHandle(t,()=>l.current);const{timezone:m}=ae(),p=a.ZonedDate.fromLocalDate(e.value,m),g=a.getDate(p),E=te(),h=n.useWindow(E),[v,y]=f.useState("desktop"),[D,k]=f.useState(!1),[S,C]=f.useState(!1),b=o.useInternationalization(),{dateFormat:I,shortDateFormat:w}=f.useContext(ce),T=me(),[R]=he(),x=T.end.getTime()-T.start.getTime()>27*a.MS_PER_DAY,A=b.format(I,x?R:T.zonedStart,x?R:T.zonedEnd.addDays(-1)),_=b.format(w,x?R:T.zonedStart,x?R:T.zonedEnd.addDays(-1)),M=f.useCallback(()=>{k(!D)},[D]),N=f.useCallback(()=>{C(!0)},[]),L=f.useCallback(()=>{k(!1),C(!1)},[]),O=f.useCallback(t=>{if(e.onChange){const r=a.ZonedDate.fromUTCDate(z(t.value),m);e.onChange.call(void 0,{...t,value:r})}k(!1)},[e.onChange,m]),F=f.useCallback(()=>{h().matchMedia&&y(h().matchMedia("(min-width: 1024px)").matches?"desktop":"mobile")},[h]);f.useEffect(()=>{F();const e=h().ResizeObserver,t=e&&new e(F);return t&&t.observe(E.current),()=>{e&&t.disconnect()}},[F,E,h]),f.useEffect(()=>{D&&S&&u.current&&u.current.focus()},[S,D]);const{onFocus:P,onBlur:H}=n.useAsyncFocusBlur({onFocus:N,onBlur:L});return f.createElement(f.Fragment,null,f.createElement(s.Button,{ref:l,onFocus:P,onBlur:H,fillMode:"flat",className:"k-nav-current",icon:"calendar",svgIcon:d.calendarIcon,"aria-live":"polite",tabIndex:-1,onClick:M},"desktop"===v?A:_),f.createElement(i.Popup,{anchor:null==(r=l.current)?void 0:r.element,show:D},f.createElement(c.Calendar,{ref:u,onFocus:P,onBlur:H,onChange:O,value:g})))});Qt.displayName="KendoReactSchedulerNavigationDatePicker";const Jt=f.forwardRef(()=>{const e=f.useRef(null),[t,r]=f.useState("desktop"),a=le(),l=n.useWindow(e),[c,i]=De(),u=a.find(e=>e.props.name===c),m=o.useLocalization(),p=f.useCallback(e=>{i&&(e.syntheticEvent.preventDefault(),i(e.item.name))},[i]),g=f.useCallback(e=>{i&&i(e)},[i]),E=f.useMemo(()=>a.map(e=>({value:e.props.name,text:"function"==typeof e.props.title?e.props.title(m):e.props.title,tabIndex:-1})),[a,m]),h=()=>{l().matchMedia&&r(l().matchMedia("(min-width: 1024px)").matches?"desktop":"mobile")};return f.useEffect(()=>{h();const t=l().ResizeObserver,r=t&&new t(h);return r&&r.observe(e.current),()=>{r&&r.disconnect()}},[]),f.createElement(f.Fragment,null,u&&"mobile"===t&&f.createElement("div",{className:"k-scheduler-tools",ref:e},f.createElement(s.DropDownButton,{className:"k-views-dropdown",onItemClick:p,popupSettings:{popupClass:"k-scheduler-toolbar"},textField:"title",items:a.map(e=>({...e.props,selected:e.props.name===c,title:"function"==typeof e.props.title?e.props.title(m):e.props.title})),text:f.createElement(f.Fragment,null,"function"==typeof u.props.title?u.props.title(m):u.props.title,f.createElement(n.IconWrap,{name:"chevron-down",icon:d.chevronDownIcon}))})),"desktop"===t&&f.createElement(s.SegmentedControl,{ref:t=>{t&&(e.current=t.element)},className:"k-scheduler-views",role:"group",value:c,onChange:g,items:E}))});Jt.displayName="KendoReactSchedulerViewSelectorList";const er=f.forwardRef((e,t)=>{const{className:r,...a}=e,l=f.useRef(null);return f.useImperativeHandle(t,()=>({element:l.current,props:e})),f.createElement(s.ToolbarItem,{ref:e=>{e&&(l.current=e.element)},className:n.classNames("k-scheduler-navigation",r),...a},e.children)}),tr=f.createContext({});tr.displayName="SchedulerViewPropsContext";const rr=f.createContext([]),ar=()=>f.useContext(rr);rr.displayName="SchedulerViewRangesContext";const nr=f.createContext([[],U]),lr=()=>f.useContext(nr);nr.displayName="SchedulerViewSlotsContext";const or=f.createContext([[],U]),sr=()=>f.useContext(or);or.displayName="SchedulerViewItemsContext";const cr=f.createContext([[],U]);cr.displayName="SchedulerViewSelectedSlotsContext";const ir=f.createContext([[],U]),dr=()=>f.useContext(ir);ir.displayName="SchedulerViewSelectedItemsContext";const ur=f.createContext([[],U]);ur.displayName="SchedulerViewFocusedItemsContext";const mr=f.createContext([[],U]),pr=()=>f.useContext(mr);mr.displayName="SchedulerViewFocusedSlotsContext";const gr=({children:e,props:t,ranges:r,slots:a,items:n,selectedSlots:l,selectedItems:o,focusedItems:s,focusedSlots:c})=>f.createElement(tr.Provider,{value:t},f.createElement(rr.Provider,{value:r},f.createElement(nr.Provider,{value:a},f.createElement(or.Provider,{value:n},f.createElement(cr.Provider,{value:l},f.createElement(ir.Provider,{value:o},f.createElement(ur.Provider,{value:s},f.createElement(mr.Provider,{value:c},e))))))));var Er=(e=>(e.select="ITEMS_SELECT_SELECT",e.selectNext="ITEMS_SELECT_SELECT_NEXT",e.selectPrev="ITEMS_SELECT_SELECT_PREV",e.reset="ITEMS_SELECT_RESET",e.add="ITEMS_SELECT_ADD",e.remove="ITEMS_SELECT_REMOVE",e))(Er||{});var hr=(e=>(e.select="SLOTS_SELECT_SELECT",e.reset="SLOTS_SELECT_RESET",e.add="SLOTS_SELECT_ADD",e))(hr||{});const vr=(e,t)=>{const{element:r}=e;n.useIsomorphicLayoutEffect(()=>{if(!r||!r.current)return;const t=[],a=[],n=[],l=r.current.querySelectorAll(e.selector);l.forEach(r=>{const l=r.getBoundingClientRect().width,o=e.explicitDepth&&void 0!==e.attribute?r.getAttribute(e.attribute):0,s=I(r,!0),c=((e,t=!1)=>parseFloat(window.getComputedStyle(e)[t?"borderLeftWidth":"borderTopWidth"]||"0")+parseFloat(window.getComputedStyle(e)[t?"borderRightWidth":"borderBottomWidth"]||"0"))(r,!0);null!==o&&((!n[o]||c>n[o])&&(n[o]=c),(!a[o]||s>a[o])&&(a[o]=s),(!t[o]||l>t[o])&&(t[o]=l))}),l.forEach(r=>{const l=e.explicitDepth?r.getAttribute(e.attribute):0;null!==l&&(r.style.minWidth=t[l]-a[l]-n[l]+"px")})},t)};var yr=(e=>(e.up="SLOT_FOCUS_UP",e.down="SLOT_FOCUS_DOWN",e.left="SLOT_FOCUS_LEFT",e.right="SLOT_FOCUS_RIGHT",e))(yr||{});const fr=(e,t)=>t.find(t=>null!==t.current&&null!==e.current&&t.current.props.row===e.current.props.row-1&&t.current.props.col===e.current.props.col),Dr=(e,t)=>t.find(t=>null!==t.current&&null!==e.current&&t.current.props.row===e.current.props.row&&t.current.props.col===e.current.props.col-1),kr=(e,t)=>t.find(t=>null!==t.current&&null!==e.current&&t.current.props.row===e.current.props.row&&t.current.props.col===e.current.props.col+1),Sr=(e,t)=>t.find(t=>null!==t.current&&null!==e.current&&t.current.props.row===e.current.props.row+1&&t.current.props.col===e.current.props.col);var Cr=(e=>(e.next="ITEMS_FOCUS_NEXT",e.prev="ITEMS_FOCUS_PREV",e))(Cr||{});const br=f.forwardRef((e,t)=>{const r=f.useRef(null);f.useImperativeHandle(t,()=>r.current);const[a,l]=n.useCollection([]),[o,s]=n.useCollection([]),[c,i]=(e=>[[],(t,r)=>{switch(t.type){case"ITEMS_FOCUS_NEXT":{if(!t.item||!t.item.current||!e)return;const a=Z(t.item,e,t.ignoreIsAllDay,!1);a&&a.current&&a.current.element&&(r.preventDefault(),a.current.element.focus());break}case"ITEMS_FOCUS_PREV":{if(!t.item||!t.item.current||!e)return;const a=Z(t.item,e,t.ignoreIsAllDay,!0);a&&a.current&&a.current.element&&(r.preventDefault(),a.current.element.focus());break}}}])(a),[d,u]=(e=>[[],(t,r)=>{switch(t.type){case"SLOT_FOCUS_UP":{if(!t.slot.current||!e)return;const a=fr(t.slot,e);a&&a.current&&a.current.element&&(r.preventDefault(),a.current.element.focus());break}case"SLOT_FOCUS_DOWN":{if(!t.slot||!e)return;const a=Sr(t.slot,e);a&&a.current&&a.current.element&&(r.preventDefault(),a.current.element.focus());break}case"SLOT_FOCUS_LEFT":{if(!t.slot||!e)return;const a=Dr(t.slot,e);a&&a.current&&a.current.element&&(r.preventDefault(),a.current.element.focus());break}case"SLOT_FOCUS_RIGHT":{if(!t.slot||!e)return;const a=kr(t.slot,e);a&&a.current&&a.current.element&&(r.preventDefault(),a.current.element.focus());break}}}])(o),[m,p]=(e=>{const[t,r]=f.useState([]),a=f.useCallback((a,n)=>{switch(a.type){case"ITEMS_SELECT_SELECT":if(!a.item)return;r([a.item]);break;case"ITEMS_SELECT_SELECT_NEXT":{if(!a.item||!a.item.current||!e)return;const t=Z(a.item,e,a.ignoreIsAllDay,!1);t&&(n.preventDefault(),r([t]));break}case"ITEMS_SELECT_SELECT_PREV":{if(!a.item||!a.item.current||!e)return;const t=Z(a.item,e,a.ignoreIsAllDay,!0);t&&(n.preventDefault(),r([t]));break}case"ITEMS_SELECT_RESET":r([]);break;case"ITEMS_SELECT_ADD":if(!a.item)return;t.some(e=>e===a.item)||r([...t,a.item]);break;case"ITEMS_SELECT_REMOVE":if(!a.item)return;r([...t.filter(e=>e!==a.item)])}},[e,t]);return[t,a]})(a),[g,E]=(()=>{const[e,t]=f.useState([]),r=f.useCallback(r=>{switch(r.type){case"SLOTS_SELECT_SELECT":if(!r.slot)return;t([r.slot]);break;case"SLOTS_SELECT_RESET":t([]);break;case"SLOTS_SELECT_ADD":if(!r.slot)return;e.some(e=>e===r.slot)||t([...e,r.slot])}},[e]);return[e,r]})(),h=f.useCallback((e,t)=>{E({type:hr.reset}),p(e,t)},[p,E]),v=f.useCallback((e,t)=>{p({type:Er.reset},t),E(e)},[p,E]),y=f.useMemo(()=>n.classNames("k-scheduler-layout k-scheduler-layout-flex",e.className),[e.className]);return vr({element:r,selector:".k-group-cell",attribute:"data-depth-index",explicitDepth:!0}),vr({element:r,selector:".k-side-cell",attribute:"data-depth-index",explicitDepth:!1}),f.createElement(gr,{props:e.props,ranges:e.ranges,items:[a,l],slots:[o,s],selectedItems:[m,h],selectedSlots:[g,v],focusedItems:[c,i],focusedSlots:[d,u]},f.createElement("div",{ref:r,style:e.style,className:y,role:"presentation"},e.children))});br.displayName="KendoReactSchedulerBaseView";const Ir=f.createContext({resource:{},groupIndex:0}),wr=e=>{const{nested:t,children:r,rowContentProps:a}=e,n=e.rowContent||xr,l=e.childRowContent||n,o=S(e.group,e.resources);return f.createElement("div",{className:"k-scheduler-group k-group-horizontal"},t?Tr({resources:o,children:r,nested:t,groupIndex:0,rowContent:n,rowContentProps:a,childRowContent:l}):Rr({resources:o,children:r,rowContentProps:a,childRowContent:l}))},Tr=e=>{const{resources:t,rowContent:r,nested:a,children:n,groupIndex:l,rowContentProps:o,childRowContent:s}=e;if(l===t.length)return Rr({resources:t,children:n,rowContentProps:o,childRowContent:s});const c=C(t,l),i=r;return f.createElement(f.Fragment,null,a?f.createElement("div",{className:"k-scheduler-row"},f.createElement(i,{resources:t,groupIndex:l,...o},c.map((e,t)=>f.createElement("div",{key:t,className:"k-scheduler-cell k-heading-cell"},e.text)))):f.createElement(i,{resources:t,groupIndex:l,...o},c.map((e,t)=>f.createElement("div",{key:t,className:"k-scheduler-cell k-heading-cell"},e.text))),Tr({resources:t,children:n,nested:a,rowContent:r,childRowContent:s,groupIndex:l+1}))},Rr=e=>{const{resources:t,childRowContent:r,children:a,rowContentProps:n}=e,l=C(t,t.length-1),o=r,s=t.length>0;return f.createElement("div",{className:"k-scheduler-row"},f.createElement(o,{resources:t,...n},(l.length?l:j).map((e,t)=>f.createElement("div",{key:t,className:"k-scheduler-cell k-group-cell"},f.createElement(Ir.Provider,{value:{resource:e,groupIndex:s?t:0}},a)))))};wr.displayName="KendoReactSchedulerHorizontalResourceIterator";const xr=e=>e.children,Ar=e=>f.createElement(f.Fragment,null,f.createElement("div",{className:"k-scheduler-cell k-side-cell","data-range-index":e.rangeIndex}),e.children),_r=e=>{const{nested:t,wrapGroup:r,children:a}=e,n=e.cellContent||Pr,l=S(e.group,e.resources);return f.createElement("div",{className:"k-scheduler-group"},t?r?f.createElement("div",{className:"k-scheduler-row"},f.createElement("div",{className:"k-sticky-cell"},zr({resources:l,children:a,cellContent:n,depth:0,groupIndex:0})),f.createElement("div",{className:"k-scheduler-cell k-group-content"},Nr({resources:l,children:a,cellContent:n,depth:0,groupIndex:0},!1))):Nr({resources:l,children:a,cellContent:n,depth:0,groupIndex:0},!0):r?f.createElement("div",{className:"k-scheduler-row"},f.createElement("div",{className:"k-sticky-cell"},Mr({resources:l})),f.createElement("div",{className:"k-scheduler-cell k-group-content"},a)):Lr({resources:l,children:a,cellContent:n,groupIndex:0}))},Mr=e=>f.createElement("div",{className:"k-scheduler-row"},f.createElement("div",{className:"k-scheduler-row"},e.resources.map((e,t)=>f.createElement("div",{key:t,className:"k-scheduler-cell k-resource-cell k-heading-cell","data-depth-index":t})))),Nr=(e,t=!0)=>{const{resources:r,children:a,cellContent:n,groupIndex:l,depth:o}=e,s=r.length>0;if(o===r.length||!s)return f.createElement(Ir.Provider,{value:{resource:r[o],groupIndex:s?l:0}},a);const c=r[o].data.length;return r[o].data.map((e,s)=>f.createElement("div",{key:s,className:"k-scheduler-row"},t&&f.createElement("div",{className:"k-scheduler-cell k-group-cell k-heading-cell","data-depth-index":o},e[r[o].textField]),f.createElement("div",{className:"k-scheduler-cell k-group-content k-resource-row","data-depth-index":o,"data-resource-index":c*l+s},Nr({resources:r,children:a,cellContent:n,groupIndex:c*l+s,depth:o+1},t))))},zr=e=>{const{resources:t,children:r,cellContent:a,groupIndex:n,depth:l}=e,o=t.length?t[l].data.length:0;return t[l]?t[l].data.map((e,s)=>f.createElement("div",{key:s,className:"k-scheduler-row"},f.createElement("div",{className:"k-scheduler-cell k-resource-cell k-resource-row k-heading-cell","data-depth-index":l,"data-resource-index":o*n+s},e[t[l].textField]),l+1!==t.length&&f.createElement("div",{className:"k-scheduler-cell k-resource-content"},zr({resources:t,children:r,cellContent:a,groupIndex:o*n+s,depth:l+1})))):null},Lr=e=>{const{resources:t,children:r,groupIndex:a,cellContent:n}=e;return f.createElement("div",{className:"k-scheduler-row"},Fr(t),n,Or(r,t,a))},Or=(e,t,r)=>{const a=t.length>0;return f.createElement("div",{className:"k-scheduler-cell k-group-content"},f.createElement(Ir.Provider,{value:{resource:t[r],groupIndex:a?r:void 0}},e))},Fr=e=>e.map((e,t)=>f.createElement("div",{key:t,className:"k-scheduler-cell k-group-cell k-heading-cell","data-depth-index":t}));_r.displayName="KendoReactSchedulerVerticalResourceIterator";const Pr=null,Hr=e=>{const t=o.useLocalization();return f.createElement(f.Fragment,null,f.createElement("div",{className:"k-scheduler-cell k-heading-cell k-side-cell k-scheduler-times-all-day"},t.toLanguageString(xe,Xt[xe])),e.children)},Wr=f.forwardRef((e,t)=>{const{as:r=Kr.as,...a}=e,l=f.useRef(null),s=f.useRef(null),c=o.useInternationalization(),i=f.useMemo(()=>n.classNames("k-scheduler-cell k-heading-cell",e.className),[e.className]);return f.useImperativeHandle(s,()=>({element:l.current&&l.current.element?l.current.element:l.current,props:e})),f.useImperativeHandle(t,()=>s.current),f.createElement(r,{ref:r!==Kr.as?void 0:l,...a,className:i},c.formatDate(e.date,e.format?e.format:Kr.format))}),Kr={as:f.forwardRef(({as:e,format:t,start:r,end:a,...n},l)=>f.createElement("div",{...n,ref:l})),format:"t"};Wr.displayName="KendoReactSchedulerTimeHeaderCell";const Vr=e=>{const{slot:t,children:r}=e;return f.createElement(f.Fragment,null,e.isMaster?f.createElement(Wr,{as:e.timeHeaderCell,date:t.zonedStart,start:t.zonedStart,end:t.zonedEnd,className:n.classNames("k-side-cell",{"k-major-cell":!e.isLast})}):f.createElement("div",{className:"k-scheduler-cell k-heading-cell k-side-cell"}),r)},Gr=e=>{const{onChange:t,data:r,validationMessage:a,visited:n,touched:o,modified:s,...c}=e,[i,d]=f.useState(r),u=f.useCallback(e=>t(e),[t]),m=f.useCallback(e=>{const t=l.filterBy(r||[],e.filter);d(t)},[]);return f.createElement(h.ComboBox,{style:{width:"100%"},data:i,filterable:!0,onFilterChange:m,onChange:u,...c})},Br=e=>{const{value:t,data:r,onChange:a,...n}=e,l=f.useCallback(e=>{a&&a.call(void 0,e.currentTarget.dataset.value)},[a]);return f.createElement(s.ButtonGroup,{className:"k-scheduler-recurrence-repeat",width:"100%",...n},r.map(e=>f.createElement(s.Button,{type:"button",key:e.value,selected:e.value===t,onClick:l,"data-value":e.value,togglable:!0},e.text)))},$r=e=>e.charAt(0).toUpperCase()+e.slice(1),Ur=["first","second","third","fourth","last"],Zr=["never","daily","weekly","monthly","yearly"],qr=[{day:0,offset:0},{day:1,offset:0},{day:2,offset:0},{day:3,offset:0},{day:4,offset:0},{day:5,offset:0},{day:6,offset:0}],Yr=[{day:1,offset:0},{day:2,offset:0},{day:3,offset:0},{day:4,offset:0},{day:5,offset:0}],jr=[{day:0,offset:0},{day:6,offset:0}],Xr=e=>{switch(e){case"day":return qr;case"weekday":return Yr;case"weekend":return jr}},Qr=e=>{const{value:t,data:r,onChange:a,...n}={...Jr,...e},l=r=>{const a=Number(r.currentTarget.dataset.key);e.onChange&&e.onChange.call(void 0,t.some(e=>e===a)?t.filter(e=>e!==a):[...t,a])};return f.createElement(s.ButtonGroup,{width:"auto",...n},(e.data||Jr.data).map(e=>f.createElement(s.Button,{type:"button",key:e.value,"data-key":e.value,selected:t.some(t=>t===e.value),togglable:!0,onClick:l},$r(e.text))))},Jr={data:[],value:[]},ea=e=>{const t=o.useInternationalization(),r=o.useLocalization(),{timezone:n}=ae(),[l,s]=f.useState(1),[i,d]=f.useState(a.ZonedDate.fromUTCDate(e.start)),u=f.useCallback((e,t)=>{const a=t?e:"scheduler.recurrenceEditor"+e;return r.toLanguageString(a,Xt[a])},[r]),p=f.useMemo(()=>{var t;return(e=>v.parseRule({recurrenceRule:e})||{})(null!=(t=e.value)?t:ra.value)},[e.value]),y=f.useMemo(()=>(e=>Zr.map(t=>({value:t,text:e("Frequencies"+$r(t))})))(u),[u]),D=f.useMemo(()=>(e=>N(e)&&!(e=>(e=>null==e)(e)||e.trim&&0===e.trim().length)(e.freq)?e.freq:"never")(p),[p]),k=f.useMemo(()=>((e,t)=>{const r=e.firstDay(),a=e.dateFormatNames({type:"days",nameType:"wide"}).map((e,t)=>({text:e,value:t})),n=a.slice(r).concat(a.slice(0,r));return[{text:t("WeekdaysDay"),value:"day"},{text:t("WeekdaysWeekday"),value:"weekday"},{text:t("WeekdaysWeekendday"),value:"weekend"}].concat(n)})(t,u),[t,u]),S=f.useMemo(()=>((e,t,r)=>{var a;let n;if(N(t.byWeekDay))switch(t.byWeekDay.length){case 7:n="day";break;case 5:n="weekday";break;case 2:n="weekend";break;case 1:n=t.byWeekDay[0].day;break;default:n=r.getDay()}else n=r.getDay();return null!=(a=e.find(e=>n===e.value))?a:e[0]})(k,p,e.start),[k,p,e.start]),C=f.useMemo(()=>(e=>e.dateFormatNames({type:"months",nameType:"wide",standAlone:!0}).map((e,t)=>({text:e,value:t+1})))(t),[t]),b=f.useMemo(()=>((e,t)=>e.find(e=>(t.byMonth?t.byMonth[0]:null)===e.value)||e[0])(C,p),[C,p]),I=f.useMemo(()=>(e=>{const t=[1,2,3,4,-1];return Ur.map((r,a)=>({text:e("OffsetPositions"+$r(r)),value:t[a]}))})(u),[u]),w=f.useMemo(()=>((e,t)=>e.find(e=>e.value===(t.bySetPosition?t.bySetPosition[0]:t.byWeekDay&&t.byWeekDay[0]?t.byWeekDay[0].offset:1))||e[0])(I,p),[I,p]),T=f.useMemo(()=>(e=>N(e.count)?"count":N(e.until)?"until":"never")(p),[p]),R=f.useMemo(()=>((e,t)=>N(e.byMonthDay)&&e.byMonthDay.length>0?e.byMonthDay[0]:t.getDate())(p,e.start),[p,e.start]),x=f.useMemo(()=>(e=>N(e.until)?a.toLocalDate(e.until):null)(p),[p.until]),A=f.useMemo(()=>(e=>{const t=e.firstDay(),r=e.dateFormatNames({type:"days",nameType:"abbreviated"}).map((e,t)=>({text:e,value:t}));return r.slice(t).concat(r.slice(0,t))})(t),[t]),_=f.useMemo(()=>(e=>N(e.byWeekDay)?"weekday":N(e.byMonthDay)?"monthday":void 0)(p),[p.byWeekDay,p.byMonthDay]),M=f.useCallback(r=>{"never"===r.freq?e.onChange({value:null}):(void 0===r.weekStart&&(r.weekStart=t.firstDay()),e.onChange({value:v.serializeRule(r,e.timezone)}))},[e.onChange,e.timezone]),z=f.useCallback(t=>{const r={};r.freq=t,r.interval=1,"weekly"===t&&(r.byWeekDay=[{day:a.ZonedDate.fromLocalDate(e.start,n).getDay(),offset:0}]),("monthly"===t||"yearly"===t)&&(r.byMonthDay=[e.start.getDate()]),"yearly"===t&&(r.byMonth=[e.start.getMonth()+1]),M(r)},[M,e.start,n]),L=f.useCallback(e=>{const t=e.value;M(Object.assign({},p,{interval:t}))},[M,p]),O=f.useCallback(e=>{const t=e.value;M(Object.assign({},p,{count:t})),null!==t&&s(t)},[M,p]),F=f.useCallback(t=>{const r=t.value;if(!r)return;const n=a.ZonedDate.fromLocalDate(r,e.timezone);M(Object.assign({},p,{until:n})),d(n)},[M,p,e.timezone]),P=f.useCallback(e=>{M(Object.assign({},p,{byWeekDay:A.filter(t=>e.some(e=>e===t.value)).map(e=>({offset:0,day:e.value}))}))},[M,p,A]),H=f.useCallback(e=>{const t=Object.assign({},p),r=e.target.value;"string"==typeof r.value?(t.byWeekDay=Xr(r.value),t.bySetPosition=[w.value]):(t.bySetPosition=void 0,t.byWeekDay=[{day:r.value,offset:w.value}]),M(t)},[w.value,M,p]),W=f.useCallback(e=>{M(Object.assign({},p,{byMonthDay:[e.value]}))},[M,p]),K=f.useCallback(e=>{const t=e.value;M(Object.assign({},p,{byMonth:[t.value]}))},[M,p]),V=f.useCallback(e=>{const t=e.value,r=Object.assign({},p);switch(t){case"never":r.until=void 0,r.count=void 0;break;case"count":r.until=void 0,r.count=l;break;case"until":r.until=i,r.count=void 0}M(r)},[M,p,e.timezone]),G=f.useCallback(e=>{const t=Object.assign({},p);"monthday"===e.value?(t.byWeekDay=void 0,t.bySetPosition=void 0,t.byMonthDay=[R]):"weekday"===e.value&&(t.byMonthDay=void 0,"string"==typeof S.value?(t.bySetPosition=[w.value],t.byWeekDay=Xr(S.value)):t.byWeekDay=[{day:S.value,offset:w.value}]),M(t)},[M,p,R,S]),B=f.useCallback(e=>{const t=Object.assign({},p),r=e.value;if(t.byWeekDay)switch(t.byWeekDay.length){case 7:case 5:case 2:t.bySetPosition=[r.value];break;case 1:t.byWeekDay[0].offset=r.value}M(t)},[M,p]);return f.createElement(f.Fragment,null,f.createElement(m.FieldWrapper,null,f.createElement(g.Label,{className:"k-form-label"},r.toLanguageString(nt,Xt[nt])),f.createElement("div",{className:"k-form-field-wrap"},f.createElement(Br,{value:D,data:y,onChange:z}))),"never"!==D&&f.createElement(m.FieldWrapper,null,f.createElement(g.Label,{editorId:"interval-editor",className:"k-form-label"},u($r(D)+"RepeatEvery")),f.createElement("div",{className:"k-form-field-wrap"},f.createElement(E.NumericTextBox,{min:1,step:1,defaultValue:1,value:p.interval,onChange:L,id:"interval-editor",className:"k-recur-interval"})," ",f.createElement(g.Label,{editorId:"interval-editor",className:"k-form-label"},u($r(D)+"Interval")))),"weekly"===D&&f.createElement(m.FieldWrapper,null,f.createElement(g.Label,{className:"k-form-label"},u(it,!0)),f.createElement("div",{className:"k-form-field-wrap"},f.createElement(Qr,{data:A,value:(p.byWeekDay||[]).map(({day:e})=>e),onChange:P}))),"monthly"===D&&f.createElement(m.FieldWrapper,null,f.createElement(g.Label,{key:"recurrence-repeat-on-monthly-label",className:"k-form-label"},u(pt,!0)),f.createElement("div",{className:"k-form-field-wrap"},f.createElement(E.RadioGroup,{value:_,onChange:G,item:ta,className:"k-reset",data:[{value:"monthday",label:u(dt,!0),children:[f.createElement(f.Fragment,{key:"separator"}," "),f.createElement(E.NumericTextBox,{key:"weekday-day",min:1,max:31,disabled:"monthday"!==_,value:p&&p.byMonthDay&&p.byMonthDay[0],onChange:W,width:"auto"})]},{value:"weekday",label:" ",children:[f.createElement(h.DropDownList,{key:"weekday-offset",textField:"text",dataItemKey:"value",disabled:"weekday"!==_,data:I,value:w,onChange:B,style:{width:"auto"}}),f.createElement(f.Fragment,{key:"separator"}," "),f.createElement(h.DropDownList,{key:"weekday-value",disabled:"weekday"!==_,value:S,data:k,onChange:H,textField:"text",dataItemKey:"value",style:{width:"auto"}})]}]}))),"yearly"===D&&f.createElement(m.FieldWrapper,null,f.createElement(g.Label,null,u(ht,!0)),f.createElement("div",{className:"k-form-field-wrap"},f.createElement(E.RadioGroup,{value:_,item:ta,onChange:G,className:"k-reset",data:[{value:"monthday",label:" ",children:[f.createElement(h.DropDownList,{key:"monthday-month",disabled:"monthday"!==_,value:b,data:C,textField:"text",dataItemKey:"value",onChange:K,style:{width:"auto"}}),f.createElement(f.Fragment,{key:"separator"}," "),f.createElement(E.NumericTextBox,{key:"monthday-day",min:1,max:31,disabled:"monthday"!==_,value:R,onChange:W,width:"auto"})]},{value:"weekday",label:" ",children:[f.createElement(h.DropDownList,{key:"yearly-weekday-offset",textField:"text",dataItemKey:"value",disabled:"weekday"!==_,data:I,value:w,onChange:B,style:{width:"auto"}}),f.createElement(f.Fragment,{key:"yearly-separator-1"}," "),f.createElement(h.DropDownList,{key:"yearly-weekday-day",textField:"text",dataItemKey:"value",disabled:"weekday"!==_,value:S,data:k,onChange:H,style:{width:"auto"}}),f.createElement(f.Fragment,{key:"yearly-separator-2"}," "),f.createElement("span",{key:"yearly-weekday-of-label"},u(gt,!0)),f.createElement(f.Fragment,{key:"yearly-separator-3"}," "),f.createElement(h.DropDownList,{key:"yearly-weekday-month",textField:"text",dataItemKey:"value",disabled:"weekday"!==_,value:b,data:C,onChange:K,style:{width:"auto"}})]}]}))),"never"!==D&&f.createElement("div",{className:"k-scheduler-recurrence-end-rule-editor"},f.createElement(m.FieldWrapper,null,f.createElement(g.Label,{className:"k-form-label"},u(Nt,!0)),f.createElement("div",{className:"k-form-field-wrap"},f.createElement(E.RadioGroup,{item:ta,value:T,onChange:V,data:[{value:"never",label:u(zt,!0)},{value:"count",label:u(_t,!0),children:[f.createElement(f.Fragment,{key:"separator-1"}," "),f.createElement(E.NumericTextBox,{key:"endrule-after-editor",id:"k-endrule-after",className:"k-recur-count",min:1,width:"auto",value:"count"===T?p.count:l,onChange:O,disabled:"count"!==T}),f.createElement(f.Fragment,{key:"separator-2"}," "),f.createElement(g.Label,{key:"endrule-after-label",className:"k-radio-label",editorId:"k-endrule-after"},u(Mt,!0))]},{value:"until",label:u(Lt,!0),children:[f.createElement(f.Fragment,{key:"separator"}," "),f.createElement(c.DatePicker,{key:"k-endrule-until-editor",id:"k-endrule-until",disabled:"until"!==T,min:e.start,value:"until"===T?x:a.toLocalDate(i),onChange:F,width:"auto"})]}]})))))},ta=e=>f.createElement("li",{...e},e.children),ra={value:""};ea.displayName="KendoReactSchedulerRepeatEditor";const aa=e=>{const{as:t=oa.as,value:r,onChange:a,...n}=e,{timezone:l}=ae(),o=f.useMemo(()=>na(r,l),[r,l]);return f.createElement(t,{...n,value:o,onChange:e=>{a&&a({value:la(e.target.value,l)})}})},na=(e,t)=>{if(e){if(!t)return e;const r=a.toLocalDate(a.ZonedDate.fromLocalDate(e,t).toUTCDate());return r.setUTCFullYear(e.getFullYear()),r}return e},la=(e,t)=>{if(e){if(!t)return e;const r=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()));return r.setUTCFullYear(e.getFullYear()),a.ZonedDate.fromUTCDate(r,t).toLocalDate()}return e},oa={as:c.DateTimePicker},sa=f.forwardRef((e,t)=>{const r=f.useRef(null),l=f.useRef(null),s=a.timezoneNames(),i=o.useLocalization(),d=se(),{resources:u,timezone:p}=ae();f.useImperativeHandle(l,()=>{var t;return{element:null!=(t=r.current)&&t.element?r.current.element:r.current,props:e}}),f.useImperativeHandle(t,()=>l.current);const{as:E=ca.as,...h}=e,{titleLabel:v=ca.titleLabel,titleError:y=ca.titleError,titleEditor:D=ca.titleEditor,startLabel:k=ca.startLabel,startError:S=ca.startError,startEditor:C=ca.startEditor,startTimezoneLabel:b=ca.startTimezoneLabel,startTimezoneError:I=ca.startTimezoneError,startTimezoneEditor:w=ca.startTimezoneEditor,startTimezoneCheckedLabel:T=ca.startTimezoneCheckedLabel,startTimezoneCheckedEditor:R=ca.startTimezoneCheckedEditor,endLabel:x=ca.endLabel,endError:A=ca.endError,endEditor:_=ca.endEditor,endTimezoneLabel:M=ca.endTimezoneLabel,endTimezoneError:N=ca.endTimezoneError,endTimezoneEditor:z=ca.endTimezoneEditor,endTimezoneCheckedLabel:L=ca.endTimezoneCheckedLabel,endTimezoneCheckedEditor:O=ca.endTimezoneCheckedEditor,allDayLabel:F=ca.allDayLabel,allDayEditor:P=ca.allDayEditor,recurrenceEditor:H=ca.recurrenceEditor,descriptionLabel:W=ca.descriptionLabel,descriptionEditor:K=ca.descriptionEditor,descriptionError:V=ca.descriptionError,resourceLabel:G=ca.resourceLabel,resourceEditor:B=ca.resourceEditor}=e,$=e.valueGetter(d.start)||new Date,U=e.valueGetter(d.startTimezone)||p||"",Z=e.valueGetter(d.endTimezone)||p||"",q=f.useMemo(()=>i.toLanguageString(Ut,Xt[Ut]),[i]),[Y,j]=f.useState(!!e.valueGetter(d.startTimezone)),[X,Q]=f.useState(!!e.valueGetter(d.endTimezone)),J=f.useCallback(t=>{t.value||(e.onChange(d.startTimezone,{value:null}),e.onChange(d.endTimezone,{value:null}),Q(t.value)),j(t.value)},[e.onChange,d.startTimezone,d.endTimezone]),ee=f.useCallback(t=>{t.value||e.onChange(d.endTimezone,{value:null}),Q(t.value)},[e.onChange]),te=f.useCallback(e=>e?void 0:q,[q]),re=f.useCallback((e,t)=>Y?te(t(d.startTimezone)):void 0,[te,Y,d.startTimezone]),ne=f.useCallback((e,t)=>Y&&X?te(t(d.endTimezone))||te(t(d.startTimezone)):void 0,[te,Y,X,d.startTimezone,d.endTimezone]),le=f.useMemo(()=>n.classNames("k-scheduler-edit-form",e.className),[e.className]);return f.createElement(E,{ref:E===ca.as?r:void 0,...h,className:le},f.createElement(f.Fragment,null,f.createElement(m.FieldWrapper,null,f.createElement(m.Field,{name:d.title,component:v,editorId:"k-scheduler-editor-title",className:"k-form-label"},i.toLanguageString(Ye,Xt[Ye])),f.createElement("div",{className:"k-form-field-wrap"},f.createElement(m.Field,{id:"k-scheduler-editor-title",name:d.title,field:d.title,component:D}),e.errors[d.title]&&f.createElement(m.Field,{name:d.title,component:y},e.errors[d.title]))),f.createElement(m.FieldWrapper,null,f.createElement(m.Field,{name:d.start,component:k,editorId:"k-scheduler-editor-start",className:"k-form-label"},i.toLanguageString(je,Xt[je])),f.createElement("div",{className:"k-form-field-wrap"},f.createElement(m.Field,{id:"k-scheduler-editor-start",name:d.start,width:"auto",component:C,as:e.valueGetter(d.isAllDay)?c.DatePicker:c.DateTimePicker,timezone:p}),e.errors[d.start]&&f.createElement(m.Field,{name:d.start,component:S},e.errors[d.start]))),f.createElement(m.FieldWrapper,null,f.createElement(T,{className:"k-form-label"}),f.createElement("div",{className:"k-form-field-wrap"},f.createElement(R,{id:"k-scheduler-editor-set-start-timezone",onChange:J,value:Y}),f.createElement(T,{className:"k-checkbox-label",editorId:"k-scheduler-editor-set-start-timezone"},i.toLanguageString(at,Xt[at])))),Y&&f.createElement(m.FieldWrapper,null,f.createElement(m.Field,{name:d.start,component:b,className:"k-form-label"},i.toLanguageString(Xe,Xt[Xe])),f.createElement("div",{className:"k-form-field-wrap"},f.createElement(m.Field,{component:w,value:U,validator:re,data:s,name:d.startTimezone}),e.errors[d.startTimezone]&&f.createElement(m.Field,{name:d.startTimezone,component:I},e.errors[d.startTimezone]))),f.createElement(m.FieldWrapper,null,f.createElement(m.Field,{name:d.end,component:x,editorId:"k-scheduler-editor-end",className:"k-form-label"},i.toLanguageString(Qe,Xt[Qe])),f.createElement("div",{className:"k-form-field-wrap"},f.createElement(m.Field,{id:"k-scheduler-editor-end",name:d.end,width:"auto",component:_,as:e.valueGetter(d.isAllDay)?c.DatePicker:c.DateTimePicker,timezone:p}),e.errors[d.end]&&f.createElement(m.Field,{name:d.end,component:A},e.errors[d.end]))),Y&&f.createElement(m.FieldWrapper,null,f.createElement("div",{className:"k-form-field-wrap"},f.createElement(O,{id:"k-scheduler-editor-set-end-timezone",onChange:ee,value:X})),f.createElement(L,{editorId:"k-scheduler-editor-set-end-timezone",className:"k-form-label"},i.toLanguageString(rt,Xt[rt]))),X&&f.createElement(m.FieldWrapper,null,f.createElement(m.Field,{name:d.endTimezone,component:M,className:"k-form-label"},i.toLanguageString(Je,Xt[Je])),f.createElement("div",{className:"k-form-field-wrap"},f.createElement(m.Field,{value:Z,data:s,validator:ne,component:z,name:d.endTimezone}),e.errors[d.endTimezone]&&f.createElement(m.Field,{name:d.endTimezone,component:N},e.errors[d.endTimezone]))),f.createElement(m.FieldWrapper,null,f.createElement(m.Field,{name:d.isAllDay,component:g.Label,className:"k-form-label"}),f.createElement("div",{className:"k-form-field-wrap"},f.createElement(m.Field,{id:"k-is-allday-checkbox",name:d.isAllDay,component:P}),f.createElement(m.Field,{name:d.isAllDay,field:d.isAllDay,editorId:"k-is-allday-checkbox",className:"k-checkbox-label",component:F},i.toLanguageString(et,Xt[et])))),f.createElement("div",{className:"k-recurrence-editor"},f.createElement(m.Field,{component:H,field:d.recurrenceRule,name:d.recurrenceRule,start:$})),f.createElement(m.FieldWrapper,null,f.createElement(m.Field,{name:d.description,component:W,className:"k-form-label"},i.toLanguageString(tt,Xt[tt])),f.createElement("div",{className:"k-form-field-wrap"},f.createElement(m.Field,{component:K,name:d.description,rows:1,id:"k-event-description"}),e.errors[d.description]&&f.createElement(m.Field,{name:d.description,component:V},e.errors[d.description]))),(u||[]).map(e=>f.createElement(m.FieldWrapper,{key:e.field},f.createElement(m.Field,{name:e.field,component:G,className:"k-form-label"}),f.createElement(g.Label,{className:"k-form-label"},e.name),f.createElement(m.Field,{name:e.field,component:B,resource:e,multiple:e.multiple,data:e.data,textField:e.textField,valueField:e.valueField,colorField:e.colorField})))))}),ca={as:f.forwardRef((e,t)=>f.createElement(m.FormElement,{ref:t,id:e.id,style:e.style,tabIndex:e.tabIndex,className:e.className,horizontal:e.horizontal,children:e.children})),titleLabel:g.Label,titleError:g.Error,titleEditor:E.Input,startLabel:g.Label,startError:g.Error,startEditor:aa,startTimezoneLabel:g.Label,startTimezoneError:g.Error,startTimezoneEditor:Gr,startTimezoneCheckedLabel:g.Label,startTimezoneCheckedEditor:E.Checkbox,endLabel:g.Label,endError:g.Error,endEditor:aa,endTimezoneLabel:g.Label,endTimezoneError:g.Error,endTimezoneEditor:Gr,endTimezoneCheckedLabel:g.Label,endTimezoneCheckedEditor:E.Checkbox,allDayLabel:g.Label,allDayEditor:E.Checkbox,recurrenceEditor:ea,descriptionLabel:g.Label,descriptionEditor:E.TextArea,descriptionError:g.Error,resourceLabel:g.Label,resourceEditor:e=>{const t=e.multiple?h.MultiSelect:h.DropDownList,r=f.useCallback(t=>{const r=t.target.props.dataItemKey,a=e.multiple?(t.target.value||[]).map(e=>e[r]):t.target.value[r];e.onChange.call(void 0,{value:a})},[e.multiple,e.onChange]),a=f.useCallback((t,r)=>{const a=f.createElement(f.Fragment,null,e.colorField&&f.createElement("span",{key:1,className:"k-scheduler-mark",style:{backgroundColor:r.dataItem[e.colorField],marginRight:N(r.dataItem[e.valueField])?"8px":"4px"}}," "),f.createElement("span",{key:2},"  ",t.props.children));return f.cloneElement(t,{...t.props},a)},[e.colorField,e.valueField]),n=f.useCallback((t,r)=>{const a=f.createElement(f.Fragment,null,e.colorField&&r&&f.createElement("span",{key:1,className:"k-scheduler-mark",style:{backgroundColor:r[e.colorField],marginRight:r[e.valueField]?"8px":"4px"}}," "),t.props.children);return f.cloneElement(t,{},a)},[e.colorField,e.valueField]),l=Array.isArray(e.value)?e.data.filter(t=>e.value.some(r=>t[e.valueField]===r)):e.data.find(t=>t[e.valueField]===e.value);return f.createElement(t,{value:l,onChange:r,data:e.data,textField:e.textField,dataItemKey:e.valueField,valid:e.valid,validationMessage:e.validationMessage,itemRender:a,valueRender:n})}};sa.displayName="KendoReactSchedulerFormEditor";const ia=f.forwardRef((e,t)=>{const{onCancel:r,onClose:a,onSubmit:l,editor:c,dialog:i=da.dialog,validator:u=da.validator,...g}=e,E=f.useRef(null);f.useImperativeHandle(E,()=>({props:e})),f.useImperativeHandle(t,()=>E.current);const h=o.useLocalization(),v=se(),y=f.useMemo(()=>h.toLanguageString(Ut,Xt[Ut]),[h]),k=f.useMemo(()=>h.toLanguageString(qt,Xt[qt]),[h]),S=f.useMemo(()=>h.toLanguageString(Ue,Xt[Ue]),[h]),C=f.useMemo(()=>h.toLanguageString(Ze,Xt[Ze]),[h]),b=f.useMemo(()=>h.toLanguageString(qe,Xt[qe]),[h]),I=f.useMemo(()=>h.toLanguageString(Zt,Xt[Zt]),[h]),w=f.useCallback(e=>{r&&r.call(void 0,{value:null,syntheticEvent:e,target:E.current})},[r]),T=f.useCallback(({syntheticEvent:e})=>{a&&a.call(void 0,{value:null,syntheticEvent:e,target:E.current})},[a]),R=f.useCallback((e,t)=>{l&&l.call(void 0,{value:e,syntheticEvent:t,target:E.current})},[l]),x=f.useCallback((e,t)=>e&&t(v.end)&&e.getTime()>t(v.end).getTime()?I:void 0,[v,I]),A=f.useCallback((e,t)=>e&&t(v.start)&&e.getTime()<t(v.start).getTime()?k:void 0,[v,k]),_=f.useCallback(e=>e?void 0:y,[y]),M=f.useCallback((e,t)=>{const r={};r[v.start]=[_(t(v.start)),x(t(v.start),t)].filter(Boolean).reduce((e,t)=>e||t,""),r[v.end]=[_(t(v.start)),A(t(v.start),t)].filter(Boolean).reduce((e,t)=>e||t,"");const a=u(e,t);return{...r,...a}},[A,v.end,v.start,_,x,u]);return n.canUseDOM?D.createPortal(f.createElement(m.Form,{initialValues:e.dataItem,onSubmit:R,validator:M,render:e=>f.createElement(i,{title:b,minWidth:400,onClose:T,className:"k-scheduler-edit-dialog"},f.createElement(sa,{...e,as:c}),f.createElement(p.DialogActionsBar,{layout:"start"},f.createElement(s.Button,{themeColor:"primary",disabled:!e.allowSubmit,onClick:e.onSubmit,icon:"save",svgIcon:d.saveIcon},S),f.createElement(s.Button,{onClick:w,icon:"cancel",svgIcon:d.cancelIcon},C))),...g}),document&&document.body):null}),da={dialog:p.Dialog,validator:()=>({})};ia.displayName="KendoReactSchedulerForm";const ua=f.forwardRef((e,t)=>{const{onFocus:r,onBlur:a,onClick:l,onMouseEnter:o,onMouseLeave:s,onMouseOut:c,onMouseOver:i,onDoubleClick:d,onKeyDown:u,onKeyPress:m,onKeyUp:p}=e,{slot:g,element:E}=((e,t)=>{const{_ref:r}=e,a=f.useRef(null),l=f.useRef(null),[,o]=lr();return f.useImperativeHandle(a,()=>({element:l.current,props:e})),f.useImperativeHandle(t,()=>a.current),f.useImperativeHandle(r,()=>a.current),f.useLayoutEffect(()=>(o({type:n.COLLECTION_ACTION.add,item:a}),()=>{o({type:n.COLLECTION_ACTION.remove,item:a})})),{slot:a,element:l}})(e,t),h=void 0!==e.tabIndex?null===e.tabIndex?void 0:e.tabIndex:e.selected?0:-1,v=f.useMemo(()=>{var t,r;const a=null!=(t=e.isWorkHour)?t:ma.isWorkHour,l=null!=(r=e.isWorkDay)?r:ma.isWorkDay;return n.classNames("k-scheduler-cell",e.className,"k-slot-cell",{"k-nonwork-hour":!a||!l,"k-selected":e.selected})},[e.className,e.selected,e.isWorkHour,e.isWorkDay]),y=f.useMemo(()=>({userSelect:"none",...e.style}),[e.style]),D=f.useCallback(e=>{r&&r.call(void 0,{syntheticEvent:e,target:g.current})},[r,g]),k=f.useCallback(e=>{a&&a.call(void 0,{syntheticEvent:e,target:g.current})},[a,g]),S=f.useCallback(e=>{l&&l.call(void 0,{syntheticEvent:e,target:g.current})},[l,g]),C=f.useCallback(e=>{i&&i.call(void 0,{syntheticEvent:e,target:g.current})},[i,g]),b=f.useCallback(e=>{c&&c.call(void 0,{syntheticEvent:e,target:g.current})},[c,g]),I=f.useCallback(e=>{o&&o.call(void 0,{syntheticEvent:e,target:g.current})},[o,g]),w=f.useCallback(e=>{s&&s.call(void 0,{syntheticEvent:e,target:g.current})},[s,g]),T=f.useCallback(e=>{d&&d.call(void 0,{syntheticEvent:e,target:g.current})},[d,g]),R=f.useCallback(e=>{u&&u.call(void 0,{syntheticEvent:e,target:g.current})},[u,g]),x=f.useCallback(e=>{m&&m.call(void 0,{syntheticEvent:e,target:g.current})},[m,g]),A=f.useCallback(e=>{p&&p.call(void 0,{syntheticEvent:e,target:g.current})},[p,g]);return f.createElement("div",{ref:E,id:e.id,style:y,className:v,tabIndex:h,"aria-selected":e.selected||void 0,onFocus:D,onBlur:k,onClick:S,onMouseEnter:I,onMouseLeave:w,onMouseOver:C,onMouseOut:b,onDoubleClick:T,onKeyDown:R,onKeyPress:x,onKeyUp:A,"data-slot":!0,"data-slot-allday":e.isAllDay,"data-slot-start":e.start.getTime(),"data-slot-end":e.end.getTime(),"data-slot-group":e.group.index,"data-slot-range":e.range.index,"data-slot-index":e.index},e.children)}),ma={isWorkHour:!0,isWorkDay:!0};ua.displayName="KendoReactSchedulerSlot";const pa=f.forwardRef((e,t)=>{var r;const{slot:a,_ref:l,...o}=e,s=a||ga.slot,c=f.useRef(null),i=f.useRef(null);return f.useImperativeHandle(c,()=>({props:e})),f.useImperativeHandle(l,()=>i.current),f.useImperativeHandle(t,()=>c.current),((e,t)=>{const r=f.useRef(void 0),a=f.useRef(0),l=te(),o=f.useCallback(()=>{if(!t||!e.current)return;const r=e.current.element,n=e.current.props;if(!r)return;const l=I(r),o=new Map,s=n.items.filter(e=>e._ref.current);s.forEach(e=>{var t,r,a,n;if(!e._ref.current)return;const{height:l}=b(e._ref.current.element),s=null!=(a=null!=(r=e.order)?r:null==(t=e._ref.current)?void 0:t._order)?a:-1;(null!=(n=o.get(s))?n:0)<l&&o.set(s,l)});const c=Array.from(o.values()).reduce((e,t)=>e+t,0),i=1*s.length*2+c-(l||0)+("object"==typeof t&&t.offsetTop?t.offsetTop:0)+("object"==typeof t&&t.offsetBottom?t.offsetBottom:0);s.length?i>a.current-l&&w(r,{height:i},!0):r&&(r.style.minHeight="")},[t,e]),s=f.useCallback(()=>{void 0!==r.current&&window.cancelAnimationFrame(r.current),r.current=window.requestAnimationFrame(()=>{o()})},[o]);n.useIsomorphicLayoutEffect(()=>{if(!e.current)return;const t=e.current.element;t&&(a.current=t.clientHeight)},[]),f.useEffect(o,[e,e.current&&e.current.props,t]),f.useEffect(()=>{if(!e.current)return;const t=e.current.props.items.filter(e=>e._ref.current).map(e=>{if(!e._ref.current||!e._ref.current.element||!l.current)return;const t=window.ResizeObserver,r=t&&new t(s);return r&&r.observe(e._ref.current.element),()=>{r&&r.disconnect()}});return()=>{t.forEach(e=>e&&e())}},[s,l,e])})(i,null!=(r=e.expandable)?r:ga.expandable),f.createElement(s,{...o,_ref:i})}),ga={slot:ua,expandable:!1};pa.displayName="KendoReactSchedulerViewSlot";const Ea=f.createContext([null]);Ea.displayName="SchedulerEditSlotPropsContext";const ha=f.createContext([null]);ha.displayName="SchedulerEditSlotFormItemContext";const va=({props:e,form:t,children:r})=>f.createElement(Ea.Provider,{value:e},f.createElement(ha.Provider,{value:t},r)),ya=e=>{const t=f.useContext(re),r=void 0!==e?e:t.editable||!1,a=!0===r||void 0!==r&&!1!==r&&!0===r.edit,n=!0===r||void 0!==r&&!1!==r&&!0===r.resize,l=!0===r||void 0!==r&&!1!==r&&!0===r.remove,o=!0===r||void 0!==r&&!1!==r&&!0===r.drag;return{add:!0===r||void 0!==r&&!1!==r&&!0===r.add,edit:a,drag:o,remove:l,resize:n,select:!0===r||void 0!==r&&!1!==r&&!0===r.select}},fa=f.forwardRef((e,t)=>{const{_ref:r,onDataAction:a,viewSlot:l,form:o,formItem:s,onFormItemChange:c,...i}=e,[d,u]=f.useState(e.tabIndex),m=f.useRef(null),p=f.useRef(null);f.useImperativeHandle(p,()=>({props:e})),f.useImperativeHandle(t,()=>p.current),f.useImperativeHandle(r,()=>m.current);const g=ya(e.editable),E=se(),[h]=lr(),[v]=sr(),[y,D]=f.useContext(cr),[,k]=pr(),S=o||Da.form,C=l||Da.viewSlot,[b,I]=Ce(null,s,e.onFormItemChange),w=y.some(t=>!(!t.current||t.current.props.start.getTime()!==e.start.getTime()||t.current.props.end.getTime()!==e.end.getTime()||t.current.props.index!==e.index||t.current.props.group.index!==e.group.index||t.current.props.range.index!==e.range.index||t.current.props.isAllDay!==e.isAllDay)),T=f.useCallback(()=>{const t={};if(M(t,E.start,new Date(e.start.getTime())),M(t,E.end,new Date(e.end.getTime())),M(t,E.isAllDay,e.isAllDay),e.group.resources.length)for(let r=0;r<e.group.resources.length;r++){const a=e.group.resources[r];if(x(e.group.resources)){const n=_(e.group.resources[r],a.valueField);M(t,a.field,a.multiple?[n]:n)}else M(t,a.field,a.multiple?[]:void 0)}return t},[E.start,E.end,E.isAllDay,e.start,e.end,e.isAllDay,e.group.resources]),R=f.useCallback(t=>{g.select&&D({type:hr.select,slot:m},t.syntheticEvent),e.onFocus&&e.onFocus.call(void 0,t)},[D,g.select,e.onFocus]),A=f.useCallback(t=>{if(g.add){const e=T();I(e,t)}e.onDoubleClick&&e.onDoubleClick.call(void 0,t)},[T,g.add,e.onDoubleClick,I]),N=f.useCallback(e=>{let t;switch(e.syntheticEvent.keyCode){case n.Keys.left:if(!h)return;e.syntheticEvent.preventDefault(),k({type:yr.left,slot:m},e.syntheticEvent);break;case n.Keys.right:if(!h)return;e.syntheticEvent.preventDefault(),k({type:yr.right,slot:m},e.syntheticEvent);break;case n.Keys.up:if(!h)return;e.syntheticEvent.preventDefault(),k({type:yr.up,slot:m},e.syntheticEvent);break;case n.Keys.down:if(!h)return;e.syntheticEvent.preventDefault(),k({type:yr.down,slot:m},e.syntheticEvent);break;case n.Keys.enter:{if(!h||!g.add)return;const e=T();I(e);break}case n.Keys.tab:t=(e=>{const t=e.props.items.find(e=>0===e.order)||e.props.items[0];return t&&t._ref.current})(e.target)}t&&(e.syntheticEvent.preventDefault(),t.element&&t.element.focus())},[T,k,g.add,I,h]),z=f.useCallback(e=>{a&&a.call(void 0,{type:J.create,series:!1,dataItem:e.value},e),I(null,e.syntheticEvent)},[a,I]),L=f.useCallback(e=>{I(null,e.syntheticEvent)},[I]),O=f.useCallback(e=>{I(null,e)},[I]),F=f.useCallback((e,t)=>{I&&I(e,t)},[I]);return f.useEffect(()=>{const t=h.length&&h[0].current===m.current;u(void 0!==e.tabIndex?null===e.tabIndex?void 0:e.tabIndex:0===y.length&&t&&0===v.length?0:void 0)},[v,e.tabIndex,y.length,h]),f.createElement(va,{props:e,form:[b,F]},f.createElement(C,{...i,_ref:m,selected:w,tabIndex:d,onFocus:R,onDoubleClick:A,onKeyDown:N}),b&&f.createElement(S,{dataItem:b,onSubmit:z,onClose:O,onCancel:L}))}),Da={viewSlot:pa,form:ia};fa.displayName="KendoReactSchedulerEditSlot";const ka=f.forwardRef((e,t)=>{const{isRemove:r,onClose:a,onSeriesClick:l,onOccurrenceClick:c}=e,i=f.useRef(null);f.useImperativeHandle(i,()=>({props:e})),f.useImperativeHandle(t,()=>i.current);const d=o.useLocalization(),u=e=>d.toLanguageString(e,Xt[e]),m=u(Ve),g=u(Ge),E=u(Be),h=u($e),v=u(Ht),y=u(Wt),k=u(Vt),S=u(Pt),C=r?k:h,b=r?S:E,I=r?v:m,w=r?y:g,T=f.useCallback(({syntheticEvent:e})=>{a&&a.call(void 0,{syntheticEvent:e,value:null,target:i.current})},[a]),R=f.useCallback(e=>{l&&l.call(void 0,{syntheticEvent:e,value:null,target:i.current})},[l]),x=f.useCallback(e=>{c&&c.call(void 0,{syntheticEvent:e,value:null,target:i.current})},[c]);return n.canUseDOM?D.createPortal(f.createElement(p.Dialog,{title:C,onClose:T},b,f.createElement(p.DialogActionsBar,null,f.createElement(s.Button,{onClick:x},I),f.createElement(s.Button,{onClick:R},w))),document&&document.body):null});ka.displayName="KendoReactSchedulerSchedulerOccurrenceDialog";const Sa=f.forwardRef((e,t)=>{const{onClose:r,onCancel:a,onConfirm:l}=e,c=f.useRef(null);f.useImperativeHandle(c,()=>({props:e})),f.useImperativeHandle(t,()=>c.current);const i=o.useLocalization(),d=i.toLanguageString(Ze,Xt[Ze]),u=i.toLanguageString(Ot,Xt[Ot]),m=i.toLanguageString(Ft,Xt[Ft]),g=i.toLanguageString(Kt,Xt[Kt]),E=f.useCallback(({syntheticEvent:e})=>{if(!r)return;const t={syntheticEvent:e,value:null,target:c.current};r.call(void 0,t)},[r]),h=f.useCallback(e=>{a&&a.call(void 0,{syntheticEvent:e,value:null})},[a]),v=f.useCallback(e=>{l&&l.call(void 0,{syntheticEvent:e,value:null})},[l]);return n.canUseDOM?D.createPortal(f.createElement(p.Dialog,{title:g,onClose:E},m,f.createElement(p.DialogActionsBar,null,f.createElement(s.Button,{onClick:h},d),f.createElement(s.Button,{onClick:v},u))),document&&document.body):null});Sa.displayName="KendoReactSchedulerRemoveDialog";const Ca=f.forwardRef((e,t)=>{const{onFocus:r,onBlur:a,onMouseDown:l,onClick:s,onMouseUp:c,onMouseOut:i,onMouseOver:u,onMouseEnter:m,onMouseLeave:p,onDoubleClick:g,onRemoveClick:E,onKeyUp:h,onKeyDown:v,onKeyPress:y,onPress:D,onDrag:k,onRelease:S,onResizePress:C,onResizeEndDrag:b,onResizeRelease:I,onResizeStartDrag:w}=e,{item:T,element:R}=((e,t)=>{const{_ref:r,itemRef:a,_maxSiblingsPerSlot:l,_siblings:o,_order:s}=e,c=f.useRef(null),i=f.useRef(null),[,d]=sr();return f.useImperativeHandle(c,()=>({element:i.current,props:e,get _maxSiblingsPerSlot(){return null==l?void 0:l.current},set _maxSiblingsPerSlot(e){var t;null!=e&&void 0!==l&&void 0!==l.current&&(l.current=e,null==(t=null==o?void 0:o.current)||t.forEach(t=>{var r;!t||t._maxSiblingsPerSlot===e||e<(null!=(r=t._maxSiblingsPerSlot)?r:0)||(t._maxSiblingsPerSlot=e)}))},get _order(){return null==s?void 0:s.current},set _order(e){void 0!==e&&void 0!==s&&void 0!==s.current&&(s.current=e)}})),f.useImperativeHandle(t,()=>c.current),f.useImperativeHandle(r,()=>c.current),f.useImperativeHandle(a,()=>c.current),n.useIsomorphicLayoutEffect(()=>(d({type:n.COLLECTION_ACTION.add,item:c}),()=>{d({type:n.COLLECTION_ACTION.remove,item:c})})),{item:c,element:i}})(e,t),x=n.useDir(R),A=f.useRef(null),_=f.useRef(null),M=f.useRef(null),N=f.useRef(null),z=ya(e.editable),L=o.useInternationalization(),O=o.useLocalization(),F=O.toLanguageString(Fe,Xt[Fe]),P=O.toLanguageString(xe,Xt[xe]),H=e.group.resources.find(e=>!(!e.colorField||""===e[e.colorField]||void 0===e[e.colorField])),W=H&&H.colorField&&H[H.colorField],K=void 0!==e.tabIndex?null===e.tabIndex?void 0:e.tabIndex:e.selected?0:-1,V=f.useMemo(()=>n.classNames({"k-event":!e.resizeHint,"k-selected":e.selected&&z.select,"k-event-drag-hint":e.dragHint,"k-scheduler-marquee":e.resizeHint,"k-marquee":e.resizeHint,"k-first":e.resizeHint&&!e.tail,"k-last":e.resizeHint&&!e.head},e.className),[e.resizeHint,e.selected,e.dragHint,e.tail,e.head,e.className,z.select]),G=f.useMemo(()=>`${e.title}, ${function(e,t,r,a,n="all day"){const l={skeleton:"yMMMMEEEEdhm"},o={skeleton:"yMMMMEEEEd"},s=t.getFullYear()===r.getFullYear()&&t.getMonth()===r.getMonth()&&t.getDate()===r.getDate();if(a){const a=0===r.getHours()&&0===r.getMinutes()&&0===r.getSeconds()&&r.getTime()-t.getTime()===864e5;return s||a?`${e.formatDate(t,o)} (${n})`:`${e.formatDate(t,o)} to ${e.formatDate(r,o)} (${n})`}return s?`${e.formatDate(t,l)}–${e.formatDate(r,"t")}`:`${e.formatDate(t,l)}-${e.formatDate(r,l)}`}(L,e.zonedStart,e.zonedEnd,e.isAllDay,P)}`,[L,e.isAllDay,e.title,e.zonedEnd,e.zonedStart,P]),B=f.useMemo(()=>({cursor:"pointer",userSelect:"none",borderColor:e.resizeHint?void 0:W,backgroundColor:e.resizeHint?void 0:W,touchAction:"none",...e.style}),[W,e.style,e.resizeHint]),$=f.useCallback(e=>{r&&r.call(void 0,{syntheticEvent:e,target:T.current})},[r,T]),U=f.useCallback(e=>{a&&a.call(void 0,{syntheticEvent:e,target:T.current})},[a,T]),Z=f.useCallback(e=>{l&&l.call(void 0,{syntheticEvent:e,target:T.current})},[l,T]),q=f.useCallback(e=>{s&&s.call(void 0,{syntheticEvent:e,target:T.current})},[s,T]),Y=f.useCallback(e=>{c&&c.call(void 0,{syntheticEvent:e,target:T.current})},[c,T]),j=f.useCallback(e=>{u&&u.call(void 0,{syntheticEvent:e,target:T.current})},[u,T]),X=f.useCallback(e=>{i&&i.call(void 0,{syntheticEvent:e,target:T.current})},[i,T]),Q=f.useCallback(e=>{m&&m.call(void 0,{syntheticEvent:e,target:T.current})},[m,T]),J=f.useCallback(e=>{p&&p.call(void 0,{syntheticEvent:e,target:T.current})},[p,T]),ee=f.useCallback(e=>{g&&g.call(void 0,{syntheticEvent:e,target:T.current})},[g,T]),te=f.useCallback(e=>{E&&E.call(void 0,{syntheticEvent:e,target:T.current})},[E,T]),re=f.useCallback(e=>{v&&v.call(void 0,{syntheticEvent:e,target:T.current})},[v,T]),ae=f.useCallback(e=>{y&&y.call(void 0,{syntheticEvent:e,target:T.current})},[y,T]),ne=f.useCallback(e=>{h&&h.call(void 0,{syntheticEvent:e,target:T.current})},[h,T]),le=f.useCallback(e=>{D&&D.call(void 0,{dragEvent:e,target:T.current})},[D,T]),oe=f.useCallback(e=>{k&&k.call(void 0,{dragEvent:e,target:T.current})},[k,T]),se=f.useCallback(e=>{S&&S.call(void 0,{dragEvent:e,target:T.current})},[S,T]),ce=f.useCallback(e=>{C&&C.call(void 0,{dragEvent:e,target:T.current})},[C,T]),ie=f.useCallback(e=>{w&&w.call(void 0,{dragEvent:e,target:T.current})},[w,T]),de=f.useCallback(e=>{b&&b.call(void 0,{dragEvent:e,target:T.current})},[b,T]),ue=f.useCallback(e=>{I&&I.call(void 0,{dragEvent:e,target:T.current})},[I,T]);return n.useDraggable(R,{onPress:le,onDrag:oe,onRelease:se}),n.useDraggable(A,{onPress:ce,onDrag:de,onRelease:ue}),n.useDraggable(_,{onPress:ce,onDrag:ie,onRelease:ue}),n.useDraggable(M,{onPress:ce,onDrag:ie,onRelease:ue}),n.useDraggable(N,{onPress:ce,onDrag:de,onRelease:ue}),f.createElement("div",{ref:R,id:e.id,style:B,tabIndex:K,className:V,role:"button","aria-label":G,onFocus:$,onBlur:U,onMouseUp:Y,onMouseDown:Z,onClick:q,onMouseOver:j,onMouseOut:X,onMouseEnter:Q,onMouseLeave:J,onDoubleClick:ee,onKeyDown:re,onKeyPress:ae,onKeyUp:ne,"data-group-index":e.group.index,"data-range-index":e.range.index},e.children,!e.resizeHint&&f.createElement("span",{className:"k-event-actions"},z.remove&&f.createElement("a",{tabIndex:-1,"aria-hidden":"true",className:"k-link k-event-delete",title:F,"aria-label":F,onClick:te},f.createElement(n.IconWrap,{name:"x",icon:d.xIcon})),e.head&&f.createElement(n.IconWrap,{name:"rtl"===x?"chevron-left":"chevron-right",icon:"rtl"===x?d.chevronLeftIcon:d.chevronRightIcon})),z.resize&&e.vertical&&f.createElement(f.Fragment,null,f.createElement("span",{className:"k-resize-handle k-resize-n",ref:M}),f.createElement("span",{className:"k-resize-handle k-resize-s",ref:N})),z.resize&&!e.vertical&&f.createElement(f.Fragment,null,f.createElement("span",{className:"k-resize-handle k-resize-w",ref:_}),f.createElement("span",{className:"k-resize-handle k-resize-e",ref:A})),e.resizeHint&&f.createElement(f.Fragment,null,f.createElement("div",{className:"k-marquee-color",style:{borderColor:W,backgroundColor:W}}),f.createElement("div",{className:"k-marquee-text"},!e.tail&&f.createElement("div",{className:"k-label-top"},L.formatDate(e.zonedStart,e.format)),!e.head&&f.createElement("div",{className:"k-label-bottom"},L.formatDate(e.zonedEnd,e.format)))))});Ca.displayName="KendoReactSchedulerItem";const ba=f.forwardRef((e,t)=>{const r=f.useMemo(()=>n.classNames("k-event-template",e.className),[e.className]);return f.createElement("div",{ref:t,...e,className:r})}),Ia=(e,t)=>{const{element:r}=e;f.useEffect(()=>{if(!r||!e.syncHeight)return;const t=[[]];Array.from(r.querySelectorAll(e.selector)).filter(t=>!t.classList.contains((e=>e.slice(1,e.length))(e.applyTo))).forEach(r=>{const a=r.clientHeight,n=r.getAttribute(e.horizontalAttribute),l=r.getAttribute(e.verticalAttribute);null===n||null===l||(t[n]||(t[n]=[]),(!t[n][l]||a>t[n][l])&&(t[n][l]=a-1))}),Array.from(r.querySelectorAll(e.applyTo)).forEach(r=>{const a=r.getAttribute(e.horizontalAttribute),n=r.getAttribute(e.verticalAttribute);if(null===a||null===n)return;const l=I(r),o=Math.round(t[a][n]-l);w(r,{height:o},!0)})},t)},wa=f.forwardRef((e,t)=>{const{item:r,_ref:a,itemRef:l,...s}=e,c=f.useRef(void 0),i=f.useRef(null),u=f.useRef(null),m=f.useRef(null),p=ya(e.editable);f.useImperativeHandle(u,()=>({props:e,element:i.current&&i.current.element})),f.useImperativeHandle(t,()=>u.current),f.useImperativeHandle(a,()=>i.current),f.useImperativeHandle(l,()=>i.current);const g=r||Ta.item,E=o.useInternationalization(),[h]=sr(),[v]=lr(),y=te(),[D,k]=f.useState(!0),[S,C]=f.useState(!1),I=f.useRef(e.order),R=f.useRef(0),x=n.useDir(y),A=f.useMemo(()=>{var t,r;return e.isAllDay?null!=(t=e.title)?t:"":`(${E.format("{0:t} - {1:t}",e.zonedStart,e.zonedEnd)}): ${null!=(r=e.title)?r:""}`},[E,e.isAllDay,e.title,e.zonedEnd,e.zonedStart]),_=(e,t)=>{let r=1;return e.forEach(e=>{const a=t.filter(t=>M(e.current.props,t.props));a.length>r&&(r=a.length)}),r},M=(t,r)=>H(t.start,t.end,r.start,r.end)&&t.group.index===r.group.index&&t.range.index===r.range.index&&(void 0===t.range.isAllDay||void 0===r.range.isAllDay||t.range.isAllDay===r.range.isAllDay)&&(e.ignoreIsAllDay||t.isAllDay===r.isAllDay),N=()=>{var t,r,a,n;const l=(v||[]).filter(t=>t.current&&M(t.current.props,e)),o=i.current&&i.current.element,s=T(l);if(0===l.length)return void k(!1);if(!s.current||!o)return;const c=b(s.current.element),d=[],u=[],m=[];(h||[]).forEach(e=>{e.current&&(e.current.props.dragHint?u.push(e.current):e.current.props.resizeHint?m.push(e.current):d.push(e.current))});const g=e.dragHint||e.resizeHint?((e,t,r,a=!1)=>{let n;return r.forEach(r=>{const l=[];t.sort((e,t)=>e.props.start.getTime()-t.props.start.getTime()).forEach(t=>{if((a||t.props.isAllDay===r.current.props.isAllDay)&&t.props.range.index===r.current.props.range.index&&t.props.group.index===r.current.props.group.index&&H(t.props.start,t.props.end,r.current.props.start,r.current.props.end)){const r=G(l);t===e&&void 0===n&&(n=r),l.splice(r,0,r)}})}),n})(i.current,e.dragHint?u:m,l,e.ignoreIsAllDay):null!=(t=e.order)?t:0;if(e.vertical||e.dragHint||e.resizeHint||null===e.order||void 0===e.order)I.current=g;else{const t=d.filter(e=>e.props.isAllDay);I.current=((e,t)=>{var r;const a=t.filter(e=>null!==e.props.order&&void 0!==e.props.order).map(e=>{let t=e.props.start,r=e.props.end;return e.props.isAllDay&&(t=new Date(t.getFullYear(),t.getMonth(),t.getDate()),r=new Date(r.getFullYear(),r.getMonth(),r.getDate())),{order:e.props.order,start:t,end:r}}),n=Array.from(new Set(a.map(e=>e.order))).sort((e,t)=>e-t),l=new Map;for(const e of a)l.has(e.order)||l.set(e.order,[]),l.get(e.order).push({start:e.start,end:e.end});const o=[],s=new Map;for(const e of n){const t=l.get(e);let r=-1;for(let e=0;e<o.length;e++)if(t.every(t=>o[e].every(e=>!H(e.start,e.end,t.start,t.end,!0)))){r=e;break}-1===r&&(r=o.length,o.push([])),o[r].push(...t),s.set(e,r)}return null!=(r=s.get(e))?r:e})(e.order,t)}let E=e.dragHint||e.resizeHint?_(l,e.dragHint?u:m):_(l,d);const y=((e,t)=>e.map(e=>t.filter(t=>M(e.current.props,t.props))))(l,d);let f=0;const D=!e.vertical&&null!==I.current;if(y.forEach(t=>{let r=0;t.forEach(t=>{if(H(t.props.start,t.props.end,e.start,e.end)&&!(e.dragHint||e.resizeHint)&&t._maxSiblingsPerSlot&&t._maxSiblingsPerSlot>E&&t.element!==o&&(E=t._maxSiblingsPerSlot),!D){const e=b(t.element);null!==t.props.order&&void 0!==t.props.order&&t.props.order<I.current&&(r=e.top+e.height-c.top-1*I.current+1)}}),r>f&&(f=r)}),D){const t=null==(r=e.style)?void 0:r.height,a="number"==typeof t?t:25;f=I.current*(a+1)}if(0===l.length)return void k(!1);const S=p.add?20:0;c.width=e.vertical?c.width/E-1-S/E:c.width*l.length-1,e.vertical?c.height=c.height*l.length-1:(e.resizeHint||e.dragHint)&&E<=1||(c.height=null!=(n=null==(a=e.style)?void 0:a.height)?n:25),c.left=e.vertical?c.left+I.current*c.width+1*I.current:c.left,c.top=e.vertical?c.top:c.top+f+1*I.current,R.current=E,w(o,c),C(!0),k(!0)},z=f.useCallback(e=>{const t=e&&e[0],r=m.current;void 0!==c.current&&window.cancelAnimationFrame(c.current),r&&t&&(r.width!==t.contentRect.width||r.height!==t.contentRect.height)&&(c.current=window.requestAnimationFrame(()=>{N()})),m.current={width:t.contentRect.width,height:t.contentRect.height}},[N]);f.useEffect(N);const L=i.current&&i.current.element?i.current.element.closest(".k-scheduler-layout"):null;return Ia({element:L,selector:".k-resource-row",horizontalAttribute:"data-depth-index",verticalAttribute:"data-resource-index",applyTo:".k-resource-cell",syncHeight:e.isLast}),f.useEffect(()=>{if(!y.current)return;const e=window.ResizeObserver,t=e&&new e(z);return t&&t.observe(y.current),()=>{t&&t.disconnect()}},[z,y]),f.createElement(g,{...s,_ref:i,_maxSiblingsPerSlot:R,_order:I,itemRef:i,style:{visibility:S?void 0:"hidden",display:D?void 0:"none",...e.style}},!e.resizeHint&&f.createElement("span",{className:"k-event-actions"},e.tail&&f.createElement(n.IconWrap,{name:"rtl"===x?"chevron-right":"chevron-left",icon:"rtl"===x?d.chevronRightIcon:d.chevronLeftIcon}),e.isRecurring&&!e.isException&&f.createElement(n.IconWrap,{name:"arrow-rotate-cw",icon:d.arrowRotateCwIcon}),!e.isRecurring&&e.isException&&f.createElement(n.IconWrap,{name:"arrows-no-repeat",icon:d.arrowsNoRepeatIcon})),!e.resizeHint&&f.createElement("div",{title:A},!e.isAllDay&&f.createElement(ba,{className:"k-event-time"},A),f.createElement(ba,null,e.title)))}),Ta={item:Ca};wa.displayName="KendoReactSchedulerViewItem";const Ra=(e,{dateRange:t,fields:r,timezone:a})=>e.map(xa(r)).reduce(Aa(t,a,r),[]).filter(e=>!O(e.dataItem,r)),xa=e=>t=>({uid:n.getter(e.id||"id")(t),start:n.getter(e.start||"start")(t),startTimezone:n.getter(e.startTimezone||"startTimezone")(t),originalStart:n.getter(e.originalStart||"originalStart")(t),end:n.getter(e.end||"end")(t),endTimezone:n.getter(e.endTimezone||"endTimezone")(t),isAllDay:n.getter(e.isAllDay||"isAllDay")(t),title:n.getter(e.title||"title")(t),description:n.getter(e.description||"description")(t),occurrenceId:n.getter("occurrenceId")(t),recurrenceRule:n.getter(e.recurrenceRule||"recurrenceRule")(t),recurrenceExceptions:n.getter(e.recurrenceExceptions||"recurrenceExceptions")(t),recurrenceId:n.getter(e.recurrenceId||"recurrenceId")(t),dataItem:n.clone(t)}),Aa=(e,t,r)=>(a,n)=>[...a,...n.recurrenceRule&&(null===n.recurrenceId||void 0===n.recurrenceId)&&O(n.dataItem,r)?[..._a(n,{dateRange:e,timezone:t,fields:r})]:[n]],_a=(e,{dateRange:t,timezone:r,fields:l})=>{const o=e.recurrenceRule,s=v.parseRule({recurrenceRule:o});if(!s)return[];s.start||(s.start=a.ZonedDate.fromLocalDate(e.start,r)),s.end||(s.end=a.ZonedDate.fromLocalDate(e.end,r));const c=e.recurrenceExceptions;c&&(s.exceptionDates=c.map(e=>a.ZonedDate.fromLocalDate(e,r)));const i=t.zonedStart,d=t.zonedEnd,u=v.expand(s,{rangeStart:i,rangeEnd:d});return u.events.length?u.events.map((t,r)=>{const a=n.clone(e),o=n.clone(e.dataItem);return a.recurrenceId=a.uid,M(o,l.recurrenceId,e.uid),a.originalStart=t.start.toLocalDate(),M(o,l.originalStart,t.start.toLocalDate()),a.start=t.start.toLocalDate(),M(o,l.start,t.start.toLocalDate()),a.end=t.end.toLocalDate(),M(o,l.end,t.end.toLocalDate()),a.occurrenceId=String(r),M(o,"occurrenceId",String(r)),a.dataItem=o,a}):[]},Ma=(e,{timezone:t},{groups:r,ranges:n})=>{const o=[];return l.orderBy(e,[{field:"start",dir:"asc"},{field:"end",dir:"desc"},{field:"isAllDay",dir:"desc"},{field:"title",dir:"asc"},{field:"uid",dir:"asc"}]).forEach(e=>{r.forEach(l=>{const s=1===r.length?Na(e,l):l;La(e,s)&&n.forEach(r=>{if(Oa(e,r)){const n=f.createRef(),l=f.createRef(),c=r.end<e.end,i=e.start<r.start,d=a.ZonedDate.fromLocalDate(e.start,t),u=a.ZonedDate.fromLocalDate(e.end,t),m={...e,_ref:l,itemRef:n,head:c,tail:i,order:null,zonedStart:d,zonedEnd:u,group:s,range:r,slots:[],isRecurring:!!e.recurrenceRule,isException:!e.recurrenceRule&&null!==e.recurrenceId&&void 0!==e.recurrenceId,isAllDay:!!e.isAllDay};o.push(m)}})})}),o},Na=(e,t)=>({index:0,resources:t.resources.filter(t=>za(e,t))}),za=(e,t)=>t.multiple?(e.dataItem[t.field]||[]).some(e=>t[t.valueField]===e):e.dataItem[t.field]===t[t.valueField],La=(e,t)=>!t.resources.some(t=>t.multiple?!e.dataItem[t.field].some(e=>t[t.valueField]===e):e.dataItem[t.field]!==t[t.valueField]),Oa=(e,t)=>H(t.start,t.end,e.start,e.end)&&(void 0===t.isAllDay||!!e.isAllDay==!!t.isAllDay),Fa=e=>{const t=ar(),{timezone:r}=ae(),a=de(),n=se(),l=me(),[o]=lr(),s=e.viewItem||Pa.viewItem,c=f.useMemo(()=>Ra([e.dataItem],{dateRange:l,fields:n,timezone:r}),[e.dataItem,l,n,r]),i=f.useMemo(()=>Ma(c,{timezone:r},{groups:a,ranges:t}),[c,r,a,t]),d=(o||[]).map(e=>e.current.props);return $(i,d),f.createElement(f.Fragment,null,i.map((t,r)=>f.createElement(s,{key:r,...t,item:e.item,dragHint:!0,vertical:e.vertical,ignoreIsAllDay:e.ignoreIsAllDay})))},Pa={viewItem:wa,item:Ca};Fa.displayName="KendoReactSchedulerDrag";const Ha=e=>{const t=ar(),{timezone:r}=ae(),a=de(),n=se(),l=me(),[o]=lr(),s=e.viewItem||Wa.viewItem,c=f.useMemo(()=>Ra([e.dataItem],{dateRange:l,fields:n,timezone:r}),[e.dataItem,l.start.getTime(),l.end.getTime(),n,r]),i=f.useMemo(()=>Ma(c,{timezone:r},{groups:a,ranges:t}),[c,r,a,t]),d=(o||[]).map(e=>e.current.props);return $(i,d),f.createElement(f.Fragment,null,i.map((t,r)=>{var a;return f.createElement(s,{key:r,...t,format:e.format,item:null!=(a=e.item)?a:Wa.item,resizeHint:!0,vertical:e.vertical,ignoreIsAllDay:e.ignoreIsAllDay})}))},Wa={viewItem:wa,item:Ca};Ha.displayName="KendoReactSchedulerResize";const Ka=f.createContext([null]);Ka.displayName="SchedulerEditItemPropsContext";const Va=f.createContext([null,n.noop,n.noop]);Va.displayName="SchedulerEditItemFormItemContext";const Ga=f.createContext([null,n.noop,n.noop]);Ga.displayName="SchedulerEditItemDragItemContext";const Ba=f.createContext([null,n.noop,n.noop]);Ba.displayName="SchedulerEditItemResizeItemContext";const $a=f.createContext([null,n.noop,n.noop]);$a.displayName="SchedulerEditItemRemoveItemContext";const Ua=f.createContext([!1,n.noop,n.noop]);Ua.displayName="SchedulerEditItemShowRemoveDialogContext";const Za=f.createContext([!1,n.noop,n.noop]);Za.displayName="SchedulerEditItemShowOccurrenceDialogContext";const qa=({props:e,form:t,drag:r,resize:a,remove:n,showRemoveDialog:l,showOccurrenceDialog:o,children:s})=>f.createElement(Ka.Provider,{value:e},f.createElement(Va.Provider,{value:t},f.createElement(Ga.Provider,{value:r},f.createElement(Ba.Provider,{value:a},f.createElement($a.Provider,{value:n},f.createElement(Ua.Provider,{value:l},f.createElement(Za.Provider,{value:o},s)))))));var Ya=(e=>(e.set="FORM_ITEM_SET",e.setMaster="FORM_ITEM_SET_MASTER",e.reset="FORM_ITEM_RESET",e.complete="FORM_ITEM_COMPLETE",e))(Ya||{});var ja=(e=>(e.set="SHOW_OCCURRENCE_DIALOG_SET",e.open="SHOW_OCCURRENCE_DIALOG_OPEN",e.close="SHOW_OCCURRENCE_DIALOG_CLOSE",e.reset="SHOW_OCCURRENCE_DIALOG_RESET",e.toggle="SHOW_OCCURRENCE_DIALOG_TOGGLE",e))(ja||{});var Xa=(e=>(e.set="REMOVE_ITEM_SET",e.reset="REMOVE_ITEM_RESET",e.complete="REMOVE_ITEM_COMPLETE",e))(Xa||{});var Qa=(e=>(e.set="SHOW_REMOVE_DIALOG_SET",e.open="SHOW_REMOVE_DIALOG_OPEN",e.close="SHOW_REMOVE_DIALOG_CLOSE",e.reset="SHOW_REMOVE_DIALOG_RESET",e.toggle="SHOW_REMOVE_DIALOG_TOGGLE",e))(Qa||{});var Ja=(e=>(e.set="DRAG_ITEM_SET",e.start="DRAG_ITEM_START",e.drag="DRAG_ITEM_DRAG",e.complete="DRAG_ITEM_COMPLETE",e.completeOccurrence="DRAG_ITEM_COMPLETE_OCCURRENCE",e.completeSeries="DRAG_ITEM_COMPLETE_SERIES",e.reset="DRAG_ITEM_RESET",e.dragSelected="DRAG_ITEM_DRAG_SELECTED",e))(Ja||{});var en=(e=>(e.set="RESIZE_ITEM_SET",e.start="RESIZE_ITEM_START",e.startDrag="RESIZE_ITEM_START_DRAG",e.startDragSelected="RESIZE_ITEM_START_DRAG_SELECTED",e.endDrag="RESIZE_ITEM_END_DRAG",e.endDragSelected="RESIZE_ITEM_END_DRAG_SELECTED",e.complete="RESIZE_ITEM_COMPLETE",e.completeOccurrence="RESIZE_ITEM_COMPLETE_OCCURRENCE",e.completeSeries="RESIZE_ITEM_COMPLETE_SERIES",e.reset="RESIZE_ITEM_RESET",e))(en||{});var tn=(e=>(e.reset="SERIES_RESET",e.set="SERIES_SET",e.toggle="SERIES_TOGGLE",e))(tn||{});const rn=f.forwardRef((e,t)=>{const{_ref:r,itemRef:a,onDataAction:l,ignoreIsAllDay:o,viewItem:s,series:c,onSeriesChange:i,form:d,formItem:u,onFormItemChange:m,drag:p,dragItem:g,onDragItemChange:E,resize:h,resizeItem:v,onResizeItemChange:y,removeDialog:D,removeItem:k,onRemoveItemChange:S,occurrenceDialog:C,showOccurrenceDialog:b,onShowOccurrenceDialogChange:I,showRemoveDialog:w,onShowRemoveDialogChange:T,onFocus:R,onFocusAction:x,onMouseDown:N,onMouseDownAction:z,onMouseUp:O,onMouseUpAction:F,onClick:P,onClickAction:H,onDoubleClick:W,onDoubleClickAction:K,onRemoveClick:V,onRemoveClickAction:G,onPress:B,onPressAction:$,onDrag:U,onDragAction:Z,onRelease:q,onReleaseAction:Y,onResizePress:j,onResizePressAction:X,onResizeStartDrag:Q,onResizeStartDragAction:ee,onResizeEndDrag:te,onResizeEndDragAction:re,onResizeRelease:ae,onResizeReleaseAction:ne,onOccurrenceClick:le,onOccurrenceClickAction:oe,onSeriesClick:ce,onSeriesClickAction:ie,onKeyDown:ue,onKeyDownAction:me,onKeyUp:pe,onKeyUpAction:ge,onRemoveConfirm:Ee,onRemoveConfirmAction:he,onFormSubmit:ve,onFormSubmitAction:fe,onCancel:De,onCancelAction:Se}={...an,...e},[be,Ie]=f.useState(e.tabIndex),we=f.useRef(null),Te=f.useRef(null),Re=n.useId();f.useImperativeHandle(we,()=>({props:e,element:Te.current&&Te.current.element})),f.useImperativeHandle(t,()=>we.current),f.useImperativeHandle(r,()=>Te.current),f.useImperativeHandle(a,()=>Te.current);const xe=s||an.viewItem,Ae=p||an.drag,_e=h||an.resize,Me=d||an.form,Ne=C||an.occurrenceDialog,ze=D||an.removeDialog,Le=ya(e.editable),[Oe,Fe]=dr(),[Pe,,He]=((e,t,r)=>{const[a,n]=Ce(e,t,r);return[a,n,e=>{const t=((e,t)=>{switch(t.type){case"SERIES_RESET":return null;case"SERIES_SET":return t.payload;case"SERIES_TOGGLE":return!e;default:return e}})(a,e);n(t)}]})(null,c,i),[We,Ke,Ve]=((e,t)=>{const[r,a]=Ce(...t),l=se(),[o]=ye();return[r,a,(t,s)=>{let c;switch(t.type){case"FORM_ITEM_SET":c=t.payload;break;case"FORM_ITEM_RESET":c=null;break;case"FORM_ITEM_SET_MASTER":c=n.clone(L(t.payload,l,o));break;case"FORM_ITEM_COMPLETE":e.onDataAction&&r&&(e.onDataAction.call(void 0,{type:J.update,series:e.series,dataItem:t.payload}),c=null);break;default:c=r}a(c,s)}]})({series:Pe,onDataAction:l},[null,u,m]),[Ge,Be,$e]=((e,t)=>{const r=f.useRef(0),a=f.useRef(0),l=f.useRef(0),o=f.useRef(null),[s,c]=Ce(...t),[i]=dr(),d=se(),u=de();return[s,c,t=>{switch(t.type){case"DRAG_ITEM_SET":c(t.payload);break;case"DRAG_ITEM_RESET":c(null);break;case"DRAG_ITEM_DRAG_SELECTED":{if(Math.abs(a.current-t.payload.x)<10&&Math.abs(l.current-t.payload.y)<10)return;const r=A(t.payload.x,t.payload.y,7);if(!r||r===o.current)return;const s=n.clone(e.dataItem),u=r.getAttribute("data-slot-start"),m="true"===r.getAttribute("data-slot-allday");if(!e.ignoreIsAllDay&&m!==e.isAllDay)return;const p=new Date(_(s,d.start)),g=Number(u)-p.getTime(),E=i.map(e=>{if(!e.current)return null;const t=n.clone(e.current.props.dataItem),r=new Date(e.current.props.start.getTime()+g),a=new Date(e.current.props.end.getTime()+g);return M(t,d.start,r),M(t,d.end,a),t}).filter(Boolean);o.current=r,c([...E]);break}case"DRAG_ITEM_START":{const o=t.payload.x,s=t.payload.y;a.current=o,l.current=s;const c=A(o,s,7);if(!c)return;const i=n.clone(e.dataItem),u=c.getAttribute("data-slot-start"),m=_(i,d.start);if(null===u)return;r.current=Number(u)-new Date(m).getTime();break}case"DRAG_ITEM_DRAG":{if(Math.abs(a.current-t.payload.x)<10&&Math.abs(l.current-t.payload.y)<10)return;const s=A(t.payload.x,t.payload.y,7);if(!s||s===o.current)return;const i=n.clone(e.dataItem),m=s.getAttribute("data-slot-start"),p=s.getAttribute("data-slot-group"),g="true"===s.getAttribute("data-slot-allday");if(!e.ignoreIsAllDay&&g!==e.isAllDay)return;const E=new Date(_(i,d.start)),h=new Date(_(i,d.end)).getTime()-E.getTime(),v=new Date(Number(m)-Number(r.current)),y=new Date(Number(m)-Number(r.current)+h),f=u.find(e=>e.index===Number(p));M(i,d.start,v),M(i,d.end,y),f&&u.length>1&&f.resources.forEach(e=>{e.multiple||M(i,e.field,e[e.valueField])}),o.current=s,i&&c(i);break}case"DRAG_ITEM_COMPLETE":c(null),e.onDataAction&&s&&e.onDataAction.call(void 0,{type:J.update,series:!1,dataItem:s});break;case"DRAG_ITEM_COMPLETE_OCCURRENCE":{const t=Array.isArray(s)?s.slice():n.clone(s);c(null),e.onDataAction&&s&&e.onDataAction.call(void 0,{type:J.update,series:!1,dataItem:t});break}case"DRAG_ITEM_COMPLETE_SERIES":{let t;if(Array.isArray(s))t=s.map(e=>{const t=n.clone(e);return M(t,d.start,_(e,d.start)),M(t,d.end,_(e,d.end)),t});else{const e=n.clone(s);M(e,d.start,_(s,d.start)),M(e,d.end,_(s,d.end)),t=e}c(null),e.onDataAction&&t&&e.onDataAction.call(void 0,{type:J.update,series:!0,dataItem:t});break}default:c(s)}}]})({dataItem:e.dataItem,ignoreIsAllDay:e.ignoreIsAllDay,isAllDay:e.isAllDay,onDataAction:l},[null,g,E]),[Ue,Ze,qe]=((e,t)=>{const r=f.useRef(null),[a,l]=Ce(...t),[o]=dr(),s=se();return[a,l,(t,c)=>{let i=a;switch(t.type){case"RESIZE_ITEM_SET":i=t.payload;break;case"RESIZE_ITEM_RESET":default:i=null;break;case"RESIZE_ITEM_START":{if(c.stopPropagation(),!i)return;const a=t.payload.x,l=t.payload.y,o=A(a,l,7);if(!o||o===r.current)return;const d=o.getAttribute("data-slot-start"),u=new Date(Number(d)),m=n.clone(e.dataItem);if(u>=_(m,s.end))return;M(m,s.start,u),r.current=o,i=m;break}case"RESIZE_ITEM_START_DRAG_SELECTED":{c.stopPropagation();const a=t.payload.x,l=t.payload.y,d=n.clone(e.dataItem),u=A(a,l,7);if(!u||u===r.current)return;const m=u.getAttribute("data-slot-start"),p=new Date(_(d,s.start)),g=new Date(Number(m)).getTime()-p.getTime();let E=!1;const h=o.map(e=>{if(!e.current)return null;const t=n.clone(e.current.props.dataItem),r=new Date(e.current.props.start.getTime()+g);if(!(r>=_(t,s.end)))return M(t,s.start,r),t;E=!0}).filter(Boolean);E||(i=[...h]);break}case"RESIZE_ITEM_START_DRAG":{const a=t.payload.x,l=t.payload.y,o=A(a,l,7);if(!o||o===r.current)return;const c=o.getAttribute("data-slot-start"),d=new Date(Number(c)),u=n.clone(e.dataItem);if(d>=u.end)return;M(u,s.start,d),r.current=o,i=u;break}case"RESIZE_ITEM_END_DRAG":{const a=t.payload.x,l=t.payload.y,o=A(a,l,7);if(!o||o===r.current)return;const c=o.getAttribute("data-slot-end"),d=new Date(Number(c)),u=n.clone(e.dataItem);if(d<=u.start)return;M(u,s.end,d),r.current=o,i=u;break}case"RESIZE_ITEM_END_DRAG_SELECTED":{c.stopPropagation();const a=t.payload.x,l=t.payload.y,d=n.clone(e.dataItem),u=A(a,l,7);if(!u||u===r.current)return;const m=u.getAttribute("data-slot-start"),p=new Date(_(d,s.end)),g=new Date(Number(m)).getTime()-p.getTime();let E;const h=o.map(e=>{if(!e.current)return null;const t=n.clone(e.current.props.dataItem),r=new Date(e.current.props.end.getTime()+g);if(!(r<=_(t,s.start)))return M(t,s.end,r),t;E=!0}).filter(Boolean);E||(i=[...h]);break}case"RESIZE_ITEM_COMPLETE":case"RESIZE_ITEM_COMPLETE_OCCURRENCE":i=null,e.onDataAction&&a&&e.onDataAction.call(void 0,{type:J.update,series:!1,dataItem:a});break;case"RESIZE_ITEM_COMPLETE_SERIES":{let t;if(i=null,Array.isArray(a))t=a.map(e=>{const t=n.clone(e);return M(t,s.start,_(e,s.start)),M(t,s.end,_(e,s.end)),t});else{const e=n.clone(a);M(e,s.start,_(a,s.start)),M(e,s.end,_(a,s.end)),t=e}e.onDataAction&&t&&e.onDataAction.call(void 0,{type:J.update,series:!0,dataItem:t});break}}l(i)}]})({dataItem:e.dataItem,onDataAction:l},[null,v,y]),[Ye,je,Xe]=((e,t)=>{const[r,a]=Ce(...t);return[r,a,t=>{let n;switch(t.type){case"REMOVE_ITEM_SET":n=t.payload;break;case"REMOVE_ITEM_RESET":n=null;break;case"REMOVE_ITEM_COMPLETE":e.onDataAction&&r&&e.onDataAction.call(void 0,{type:J.remove,series:e.series,dataItem:r}),n=null;break;default:n=r}a(n)}]})({series:Pe,onDataAction:l},[null,k,S]),[Qe,Je,et]=((e,t,r)=>{const[a,n]=Ce(e,t,r);return[a,n,e=>{const t=((e,t)=>{switch(t.type){case"SHOW_REMOVE_DIALOG_RESET":case"SHOW_REMOVE_DIALOG_CLOSE":return!1;case"SHOW_REMOVE_DIALOG_SET":return t.payload;case"SHOW_REMOVE_DIALOG_OPEN":return!0;case"SHOW_REMOVE_DIALOG_TOGGLE":return!e;default:return e}})(a,e);n(t)}]})(!1,w,T),[tt,rt,at]=((e,t,r)=>{const[a,n]=Ce(e,t,r);return[a,n,e=>{const t=((e,t)=>{switch(t.type){case"SHOW_OCCURRENCE_DIALOG_RESET":case"SHOW_OCCURRENCE_DIALOG_CLOSE":return!1;case"SHOW_OCCURRENCE_DIALOG_SET":return t.payload;case"SHOW_OCCURRENCE_DIALOG_OPEN":return!0;case"SHOW_OCCURRENCE_DIALOG_TOGGLE":return!e;default:return e}})(a,e);n(t)}]})(!1,b,I),[nt]=sr(),[,lt]=f.useContext(ur),[,ot]=pr(),st=!!(Te.current&&Oe&&Oe.some(e=>e.current===Te.current)),ct=f.useMemo(()=>({selected:st,series:Pe,formItem:We,dragItem:Ge,resizeItem:Ue,removeItem:Ye,showRemoveDialog:Qe,showOccurrenceDialog:tt}),[Ge,We,Ye,Ue,st,Pe,tt,Qe]),it=f.useMemo(()=>({[tn.set]:He,[tn.toggle]:He,[tn.reset]:He,[Er.select]:Fe,[Er.add]:Fe,[Er.remove]:Fe,[Er.reset]:Fe,[Er.selectNext]:Fe,[Er.selectPrev]:Fe,[Ya.set]:Ve,[Ya.setMaster]:Ve,[Ya.reset]:Ve,[Ya.complete]:Ve,[Xa.set]:Xe,[Xa.reset]:Xe,[Xa.complete]:Xe,[ja.close]:at,[ja.open]:at,[ja.set]:at,[ja.toggle]:at,[ja.reset]:at,[Qa.close]:et,[Qa.open]:et,[Qa.set]:et,[Qa.toggle]:et,[Qa.reset]:et,[Ja.start]:$e,[Ja.drag]:$e,[Ja.complete]:$e,[Ja.completeOccurrence]:$e,[Ja.completeSeries]:$e,[Ja.set]:$e,[Ja.reset]:$e,[Ja.dragSelected]:$e,[en.start]:qe,[en.startDrag]:qe,[en.startDragSelected]:qe,[en.endDrag]:qe,[en.endDragSelected]:qe,[en.complete]:qe,[en.completeOccurrence]:qe,[en.completeSeries]:qe,[en.set]:qe,[en.reset]:qe,[Cr.next]:lt,[Cr.prev]:lt,[yr.left]:ot,[yr.right]:ot,[yr.up]:ot,[yr.down]:ot,null:()=>{}}),[$e,Ve,Fe,Xe,qe,He,at,et,lt,ot]),dt=f.useCallback(t=>{if(x){const r=x(t,e,ct);r&&(Array.isArray(r)?r.filter(Boolean).map(e=>e&&it[e.type]({...e,item:Te},t)):it[r.type]({...r,item:Te}))}R&&R.call(void 0,t)},[it,R,x,e,ct]),ut=f.useCallback(t=>{if(z){const r=z(t,e,ct);r&&(Array.isArray(r)?r.filter(Boolean).map(e=>e&&it[e.type]({...e,item:Te},t)):it[r.type]({...r,item:Te}))}N&&N.call(void 0,t)},[it,N,z,e,ct]),mt=f.useCallback(t=>{if(F){const r=F(t,e,ct);r&&(Array.isArray(r)?r.filter(Boolean).map(e=>e&&it[e.type]({...e,item:Te},t)):it[r.type]({...r,item:Te}))}O&&O.call(void 0,t)},[it,O,F,e,ct]),[,pt]=f.useContext(ke),gt=f.useCallback(t=>{if(H){pt(Te.current);const r=H(t,e,ct);r&&(Array.isArray(r)?r.filter(Boolean).map(e=>e&&it[e.type]({...e,item:Te},t)):it[r.type]({...r,item:Te}))}P&&P.call(void 0,t)},[it,P,H,e,ct]),Et=f.useCallback(t=>{if(K){const r=K(t,e,ct);r&&(Array.isArray(r)?r.filter(Boolean).map(e=>e&&it[e.type]({...e,item:Te},t)):it[r.type]({...r,item:Te}))}W&&W.call(void 0,t)},[K,W,e,it,ct]),ht=f.useCallback(t=>{if(G){const r=G(t,e,ct);r&&(Array.isArray(r)?r.filter(Boolean).map(e=>e&&it[e.type]({...e,item:Te},t)):it[r.type]({...r,item:Te}))}V&&V.call(void 0,t)},[G,V,e,it,ct]),vt=f.useCallback(t=>{if($){const r=$(t,e,ct);r&&(Array.isArray(r)?r.filter(Boolean).map(e=>e&&it[e.type]({...e,item:Te},t)):it[r.type]({...r,item:Te},t))}B&&B.call(void 0,t)},[$,B,e,it,ct]),yt=f.useCallback(t=>{if(Z){const r=Z(t,e,ct);r&&(Array.isArray(r)?r.filter(Boolean).map(e=>e&&it[e.type]({...e,item:Te},t.dragEvent.originalEvent)):it[r.type]({...r,item:Te},t.dragEvent.originalEvent))}U&&U.call(void 0,t)},[Z,U,e,it,ct]),ft=f.useCallback(t=>{if(Y){const r=Y(t,e,ct);r&&(Array.isArray(r)?r.filter(Boolean).map(e=>e&&it[e.type]({...e,item:Te},t.dragEvent.originalEvent)):it[r.type]({...r,item:Te},t.dragEvent.originalEvent))}q&&q.call(void 0,t)},[Y,q,e,it,ct]),Dt=f.useCallback(t=>{if(X){const r=X(t,e,ct);r&&(Array.isArray(r)?r.filter(Boolean).map(e=>e&&it[e.type]({...e,item:Te},t.dragEvent.originalEvent)):it[r.type]({...r,item:Te},t.dragEvent.originalEvent))}j&&j.call(void 0,t)},[X,j,e,ct,it]),kt=f.useCallback(t=>{if(ee){const r=ee(t,e,ct);r&&(Array.isArray(r)?r.filter(Boolean).map(e=>e&&it[e.type]({...e,item:Te},t.dragEvent.originalEvent)):it[r.type]({...r,item:Te},t.dragEvent.originalEvent))}Q&&Q.call(void 0,t)},[Q,ee,e,it,ct]),St=f.useCallback(t=>{if(re){const r=re(t,e,ct);r&&(Array.isArray(r)?r.filter(Boolean).map(e=>e&&it[e.type]({...e,item:Te},t.dragEvent.originalEvent)):it[r.type]({...r,item:Te},t.dragEvent.originalEvent))}te&&te.call(void 0,t)},[te,re,e,it,ct]),Ct=f.useCallback(t=>{if(ne){const r=ne(t,e,ct);r&&(Array.isArray(r)?r.filter(Boolean).map(e=>e&&it[e.type]({...e,item:Te},t.dragEvent.originalEvent)):it[r.type]({...r,item:Te},t.dragEvent.originalEvent))}ae&&ae.call(void 0,t)},[ne,ae,e,it,ct]),bt=f.useCallback(t=>{if(fe){const r=fe(t,e,ct);r&&(Array.isArray(r)?r.filter(Boolean).map(e=>e&&it[e.type]({...e,item:Te},t)):it[r.type]({...r,item:Te},t))}ve&&ve.call(void 0,t)},[fe,ve,e,ct,it]),It=f.useCallback(t=>{if(Se){const r=Se(t,e,ct);r&&(Array.isArray(r)?r.filter(Boolean).map(e=>e&&it[e.type]({...e,item:Te},t)):it[r.type]({...r,item:Te},t))}De&&De.call(void 0,t)},[Se,De,e,ct,it]),wt=f.useCallback(t=>{if(oe){const r=oe(t,e,ct);r&&(Array.isArray(r)?r.filter(Boolean).map(e=>e&&it[e.type]({...e,item:Te},t)):it[r.type]({...r,item:Te},t))}le&&le.call(void 0,t)},[oe,le,e,ct,it]),Tt=f.useCallback(t=>{if(ie){const r=ie(t,e,ct);r&&(Array.isArray(r)?r.filter(Boolean).map(e=>e&&it[e.type]({...e,item:Te},t)):it[r.type]({...r,item:Te},t))}ce&&ce.call(void 0,t)},[ie,ce,e,ct,it]),Rt=f.useCallback(t=>{if(me){const r=me(t,e,ct);r&&(Array.isArray(r)?r.filter(Boolean).map(e=>e&&it[e.type]({...e,item:Te},t.syntheticEvent)):it[r.type]({...r,item:Te},t.syntheticEvent))}ue&&ue.call(void 0,t)},[me,ue,e,ct,it]),xt=f.useCallback(t=>{if(ge){const r=ge(t,e,ct);r&&(Array.isArray(r)?r.filter(Boolean).map(e=>e&&it[e.type]({...e,item:Te},t.syntheticEvent)):it[r.type]({...r,item:Te},t.syntheticEvent))}pe&&pe.call(void 0,t)},[ge,pe,e,ct,it]),At=f.useCallback(t=>{if(he){const r=he(t,e,ct);r&&(Array.isArray(r)?r.filter(Boolean).map(e=>e&&it[e.type]({...e,item:Te},t.syntheticEvent)):it[r.type]({...r,item:Te},t.syntheticEvent))}Ee&&Ee.call(void 0,t)},[he,Ee,e,ct,it]);return f.useEffect(()=>{const t=nt.length&&nt[0].current===Te.current;Ie(void 0!==e.tabIndex?null===e.tabIndex?void 0:e.tabIndex:0===Oe.length&&t?0:void 0)},[nt,e.tabIndex,Oe.length]),f.createElement(qa,{props:e,form:[We,Ke,Ve],drag:[Ge,Be,$e],resize:[Ue,Ze,qe],remove:[Ye,je,Xe],showRemoveDialog:[Qe,Je,et],showOccurrenceDialog:[tt,rt,at]},f.createElement(xe,{...e,_ref:Te,itemRef:Te,selected:st,tabIndex:be,id:Re,onKeyDown:Rt,onKeyUp:xt,onFocus:dt,onMouseUp:mt,onMouseDown:ut,onClick:gt,onDoubleClick:Et,onRemoveClick:ht,onPress:vt,onDrag:yt,onRelease:ft,onResizePress:Dt,onResizeEndDrag:St,onResizeStartDrag:kt,onResizeRelease:Ct}),Ge&&Le.drag&&(Array.isArray(Ge)?Ge.map((t,r)=>f.createElement(Ae,{key:r,ignoreIsAllDay:o,dataItem:t,vertical:e.vertical,viewItem:xe,item:e.item})):f.createElement(Ae,{ignoreIsAllDay:o,dataItem:Ge,vertical:e.vertical,viewItem:xe,item:e.item})),Ue&&Le.resize&&(Array.isArray(Ue)?Ue.map((t,r)=>f.createElement(_e,{key:r,format:e.format,ignoreIsAllDay:o,dataItem:t,viewItem:e.viewItem,item:e.item,vertical:e.vertical})):f.createElement(_e,{format:e.format,ignoreIsAllDay:o,dataItem:Ue,viewItem:e.viewItem,item:e.item,vertical:e.vertical})),We&&!tt&&Le.edit&&f.createElement(Me,{dataItem:We,onSubmit:bt,onClose:It,onCancel:It}),tt&&f.createElement(Ne,{dataItem:We||Ge||Ue||Ye,isRemove:null!==Ye,onClose:It,onOccurrenceClick:wt,onSeriesClick:Tt}),Qe&&Ye&&Le.remove&&f.createElement(ze,{dataItem:Ye,onClose:It,onCancel:It,onConfirm:At}))}),an={viewItem:wa,drag:Fa,resize:Ha,form:ia,occurrenceDialog:ka,removeDialog:Sa,onClickAction:(e,t,r)=>[{type:e.syntheticEvent.metaKey||e.syntheticEvent.ctrlKey?!r.selected||r.dragItem||r.resizeItem?Er.add:Er.remove:Er.select}],onDoubleClickAction:(e,t)=>t.editable?[{type:Ya.set,payload:t.dataItem},t.isRecurring&&{type:ja.open}].filter(Boolean):[],onRemoveClickAction:(e,t)=>t.editable?[{type:Xa.set,payload:t.dataItem},t.isRecurring?{type:ja.open}:{type:Qa.open}]:[],onPressAction:(e,t)=>t.editable?{type:Ja.start,payload:{x:e.dragEvent.clientX,y:e.dragEvent.clientY}}:[],onDragAction:(e,t)=>t.editable?{type:e.dragEvent.originalEvent.metaKey||e.dragEvent.originalEvent.ctrlKey?Ja.dragSelected:Ja.drag,payload:{x:e.dragEvent.clientX,y:e.dragEvent.clientY}}:[],onReleaseAction:(e,t,r)=>t.editable&&r.dragItem?t.isRecurring&&!t.isException&&null===r.series?{type:ja.open}:{type:t.isRecurring?r.series?Ja.completeSeries:Ja.completeOccurrence:Ja.complete,payload:{x:e.dragEvent.clientX,y:e.dragEvent.clientY}}:[],onResizePressAction:(e,t)=>t.editable?{type:en.start,payload:{x:e.dragEvent.clientX,y:e.dragEvent.clientY}}:[],onResizeStartDragAction:(e,t)=>t.editable?{type:e.dragEvent.originalEvent.metaKey||e.dragEvent.originalEvent.ctrlKey?en.startDragSelected:en.startDrag,payload:{x:e.dragEvent.clientX,y:e.dragEvent.clientY}}:[],onResizeEndDragAction:(e,t)=>t.editable?{type:e.dragEvent.originalEvent.metaKey||e.dragEvent.originalEvent.ctrlKey?en.endDragSelected:en.endDrag,payload:{x:e.dragEvent.clientX,y:e.dragEvent.clientY}}:[],onResizeReleaseAction:(e,t,r)=>t.editable&&r.resizeItem?t.isRecurring&&!t.isException&&null===r.series?{type:ja.open}:{type:t.isRecurring?r.series?en.completeSeries:en.completeOccurrence:en.complete,payload:{x:e.dragEvent.clientX,y:e.dragEvent.clientY}}:[],onOccurrenceClickAction:(e,t,r)=>r.dragItem?[{type:Ja.completeOccurrence},{type:ja.close}]:r.resizeItem?[{type:en.completeOccurrence},{type:ja.close}]:r.formItem?[{type:tn.set,payload:!1},{type:Ya.set,payload:t.dataItem},{type:ja.close}]:r.removeItem?[{type:tn.set,payload:!1},{type:Xa.set,payload:t.dataItem},{type:Qa.open},{type:ja.close}]:[],onSeriesClickAction:(e,t,r)=>r.dragItem?[{type:Ja.completeSeries},{type:ja.close}]:r.resizeItem?[{type:en.completeSeries},{type:ja.close}]:r.formItem?[{type:tn.set,payload:!0},{type:Ya.setMaster,payload:t.dataItem},{type:ja.close}]:r.removeItem?[{type:tn.set,payload:!0},{type:Xa.set,payload:t.dataItem},{type:Qa.open},{type:ja.close}]:[],onKeyDownAction:(e,t)=>{switch(e.syntheticEvent.keyCode){case n.Keys.enter:return[{type:Ya.set,payload:t.dataItem},t.isRecurring&&{type:ja.open}];case n.Keys.tab:return[{type:e.syntheticEvent.shiftKey?Cr.prev:Cr.next,ignoreIsAllDay:t.ignoreIsAllDay},{type:e.syntheticEvent.shiftKey?Er.selectPrev:Er.selectNext,ignoreIsAllDay:t.ignoreIsAllDay}];case n.Keys.up:return[!(!t.slots.length||!t.slots[0]._ref.current)&&{type:yr.up,slot:t.slots[0]._ref}];case n.Keys.right:return[!(!t.slots.length||!t.slots[0]._ref.current)&&{type:yr.right,slot:t.slots[0]._ref}];case n.Keys.down:return[!(!t.slots.length||!t.slots[t.slots.length-1]._ref.current)&&{type:yr.down,slot:t.slots[t.slots.length-1]._ref}];case n.Keys.left:return[!(!t.slots.length||!t.slots[0]._ref.current)&&{type:yr.left,slot:t.slots[0]._ref}];default:return}},onFormSubmitAction:e=>[{type:Ya.complete,payload:e.value}],onRemoveConfirmAction:()=>[{type:Xa.complete},{type:ja.close}],onCancelAction:()=>[{type:tn.reset},{type:Xa.reset},{type:Ya.reset},{type:Ja.reset},{type:en.reset},{type:Qa.reset},{type:ja.reset}]};rn.displayName="KendoReactSchedulerEditItem";const nn=e=>{const[t,r]=f.useState(!1),l=te(),o=ae(),s=f.useRef(void 0),c=f.useRef(null),i=f.useRef(null),d=e.updateInterval||ln.updateInterval,[,u]=f.useState(!1),m=n.useDir(i,!0===o.rtl?"rtl":void 0),[p]=lr(),g=f.useCallback(()=>{if(!p)return;const t=p.filter(t=>t.current&&(void 0===e.groupIndex||null===e.groupIndex||t.current.props.group.index===e.groupIndex)&&(e.vertical?H(new Date,new Date,t.current.props.start,t.current.props.end,!0):K(new Date,t.current.props.start,t.current.props.end))&&!t.current.props.isAllDay);if(t&&t.length&&c.current&&i.current){const n=T(t);if(!n.current)return;const l=e.vertical?(e=>{let t=0;return e.forEach(e=>{if(e.current){const r=b(e.current.element);t+=r.height}}),t})(t):(e=>{let t=0;return e.forEach(e=>{if(e.current){const r=b(e.current.element);t+=r.width}}),t})(t),o=b(n.current.element),s=b(c.current),d=(e.vertical?o.width:o.height)/(n.current.props.end.getTime()-n.current.props.start.getTime()),u=(Date.now()-((e,t)=>{const r=a.cloneDate(e);return r.setHours(t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()),r})(new Date,n.current.props.start).getTime())*d,p="rtl"===m,g=e.vertical?o.top:o.top+u-s.height/2,E=p?"right":"left",h=e.vertical?o[E]+u-s.width/2:o[E];e.vertical?c.current.style[E]=`${h}px`:c.current.style.top=`${g}px`,i.current.style[E]=`${h}px`,i.current.style.top=`${g}px`,i.current.style[e.vertical?"height":"width"]=l-1+"px",r(!0)}else r(!1)},[p,e.groupIndex,e.vertical,m]),E=f.useCallback(()=>{g(),u(e=>!e)},[g]);f.useEffect(()=>{if(!l.current||!window)return;clearInterval(s.current),s.current=window.setInterval(E,d);const e=window.ResizeObserver,t=e&&new e(E);return t&&t.observe(l.current),()=>{clearInterval(s.current),t&&t.disconnect()}},[g,E,l,d]),f.useEffect(g);const h=f.createElement("div",{ref:c,className:n.classNames("k-current-time",{"k-current-time-arrow-right":!e.vertical&&"rtl"!==m,"k-current-time-arrow-left":!e.vertical&&"rtl"===m,"k-current-time-arrow-down":e.vertical}),style:{transform:e.vertical?"rtl"===m?"translateX(50%)":"translateX(-50%)":"translateY(-50%)",visibility:t?void 0:"hidden"}});return f.createElement(f.Fragment,null,e.attachArrow&&e.attachArrow.current?D.createPortal(h,e.attachArrow.current):h,f.createElement("div",{className:"k-current-time",ref:i,style:{transform:e.vertical?"translateX(-50%)":"translateY(-50%)",[e.vertical?"width":"height"]:"1px",visibility:t?void 0:"hidden"}}))},ln={updateInterval:6e4},on=f.forwardRef((e,t)=>{const{as:r=sn.as,...a}=e,l=f.useRef(null),s=f.useRef(null),c=o.useInternationalization(),i=f.useMemo(()=>n.classNames("k-scheduler-cell k-heading-cell",e.className),[e.className]);return f.useImperativeHandle(s,()=>({element:l.current&&l.current.element?l.current.element:l.current,props:e})),f.useImperativeHandle(t,()=>s.current),f.createElement(r,{ref:r!==sn.as?void 0:l,...a,className:i},f.createElement("span",{className:"k-link k-nav-day"},c.formatDate(e.date,e.format?e.format:sn.format)))}),sn={as:f.forwardRef(({as:e,format:t,start:r,end:a,...n},l)=>f.createElement("div",{...n,ref:l})),format:"d"};on.displayName="KendoReactSchedulerDateHeaderCell";const cn=(e,{step:t,timezone:r})=>{const n=[],l=a.ZonedDate.fromLocalDate(e.start,r),o=a.ZonedDate.fromLocalDate(e.end,r);for(let e=l.clone(),r=0;e.getTime()<o.getTime();r++,e=e.addTime(t)){const a=e.clone(),l=a.clone().addTime(t),o=new Date(a.getTime()),s={index:r,end:new Date(l.getTime()),start:o,zonedStart:a,zonedEnd:l};n.push(s)}return n},dn=(e,{step:t},{groups:r,ranges:n})=>{const l=[];return r.forEach(e=>{n.forEach(r=>{const n=r.zonedStart,o=r.zonedEnd,s=o.timezoneOffset-n.timezoneOffset;for(let c=n.clone(),i=0,d=s<0?s*Y*-1:0;c.getTime()<o.getTime();){const n=f.createRef(),o=c.clone(),s=c.addTime(t),u=(s.timezoneOffset-o.timezoneOffset)*Y,m=t<=Math.abs(u);d&&m&&(d-=t,c=c.addTime(-t));const p=new Date(o.getTime()),g={_ref:n,index:i,end:new Date(s.getTime()),start:p,zonedStart:o,zonedEnd:s,range:r,group:e,items:[],isAllDay:a.MS_PER_DAY<=t};l.push(g),c=c.addTime(t),i++}})}),l},un=f.createElement("div",{className:"k-scheduler-cell k-side-cell"}),mn=e=>{var t,r,l,s,c,i,d,u,m,p,g;const{group:E,timezone:h,resources:v}=ae(),y=o.useInternationalization(),D=e.editItem||rn,k=e.editSlot||fa,S=e.showWorkHours,C=null!=(t=e.numberOfDays)?t:pn.numberOfDays,b=null!=(r=e.slotDivisions)?r:pn.slotDivisions,I=null!=(l=e.slotDuration)?l:pn.slotDuration,w=null!=(s=e.workWeekStart)?s:pn.workWeekStart,x=null!=(c=e.workWeekEnd)?c:pn.workWeekEnd,A=!1!==e.currentTimeMarker&&pn.currentTimeMarker,_=y.parseDate(null!=(d=null!=(i=e.workDayStart)?i:e.isWorkDayStart)?d:pn.isWorkDayStart),M=y.parseDate(null!=(m=null!=(u=e.workDayEnd)?u:e.isWorkDayEnd)?m:pn.isWorkDayEnd),N=y.parseDate(null!=(p=e.startTime)?p:pn.startTime),z=y.parseDate(null!=(g=e.endTime)?g:pn.endTime),[L]=ye(),O=de(),F=ge(),P=se(),W=me(),G=f.useMemo(()=>S?_:N,[S,_,N]),U=f.useMemo(()=>S?M:z,[S,M,z]),Z=f.useMemo(()=>cn(W,{step:a.MS_PER_DAY*C,timezone:h}).map(e=>({...e,isAllDay:!0})),[W.start.getTime(),W.end.getTime(),C]),q=f.useMemo(()=>cn(W,{step:a.MS_PER_DAY,timezone:h}).map(e=>({...e,isAllDay:!1})),[W.start.getTime(),W.end.getTime(),h]),j=f.useMemo(()=>dn(0,{step:a.MS_PER_DAY},{groups:O,ranges:Z}),[W.start.getTime(),W.end.getTime(),h,Z,O]),X=f.useMemo(()=>dn(0,{step:I*Y/b},{groups:O,ranges:q}).filter(e=>U.getTime()===G.getTime()||K(e.zonedStart,G,U)),[W.start.getTime(),W.end.getTime(),I,b,G.getTime(),U.getTime(),O,q]),Q=f.useMemo(()=>Ra(L,{dateRange:W,fields:P,timezone:h}),[L,W.start.getTime(),W.end.getTime(),P,h]),J=f.useMemo(()=>Q.filter(e=>e.isAllDay),[Q]),ee=f.useMemo(()=>Q.filter(e=>!e.isAllDay),[Q]),te=f.useMemo(()=>Ma(J,{timezone:h},{groups:O,ranges:Z}),[Q,h,O,Z]),re=f.useMemo(()=>Ma(ee,{timezone:h},{groups:O,ranges:q}).filter(e=>G.getTime()===U.getTime()||K(e.zonedStart,G,U)||K(e.zonedEnd,G,U)||K(new Date(e.zonedEnd.getTime()-(e.zonedEnd.getTime()-e.zonedStart.getTime())/2),G,U)),[Q,h,O,q,G.getTime(),U.getTime()]);f.useMemo(()=>$(te,j,!1),[te,j]),f.useMemo(()=>B(te,j,!1),[te,j]),f.useMemo(()=>$(re,X,!1),[re,X]),f.useMemo(()=>B(re,X,!1),[re,X]);const ne=f.createElement(Ir.Consumer,null,({groupIndex:t})=>f.createElement("div",{className:"k-scheduler-row",key:t},q.map((t,r)=>f.createElement(on,{as:e.dateHeaderCell,key:r,date:a.ZonedDate.fromLocalDate(new Date(t.zonedEnd.getTime()-(t.zonedEnd.getTime()-t.zonedStart.getTime())/2),h),start:t.start,end:t.end,format:{skeleton:"MEd"}})))),le=f.createElement(Ir.Consumer,null,({groupIndex:t})=>f.createElement("div",{key:t,className:"k-scheduler-row"},Z.map((r,a)=>j.filter(e=>e.group.index===t&&e.range.index===a).map((r,a,n)=>f.createElement(k,{...r,onDataAction:e.onDataAction,form:e.form,slot:e.slot,viewSlot:e.viewSlot,key:`${r.start.getTime()}:${r.group.index}`,row:0,col:"horizontal"===F?n.length*(t||0)+a:a,isWorkDay:0<=r.zonedStart.getDay()+(C-w)&&(r.zonedStart.getDay()+(C-w))%C<=x+(C-w),expandable:!0}))))),oe=f.useMemo(()=>n.classNames("week"===e.name?"k-scheduler-weekview":"k-scheduler-dayview",e.className),[e.name,e.className]),ce=f.useCallback((t,r,a)=>q.map((n,l)=>X.filter(e=>e.index===t.index&&e.range.index===l&&e.group.index===a).map(t=>f.createElement(k,{key:`${t.start.getTime()}:${t.group.index}`,...t,onDataAction:e.onDataAction,slot:e.slot,viewSlot:e.viewSlot,form:e.form,row:r+1,col:q.length*(a||0)+l,isWorkHour:K(t.zonedStart,_,M),isWorkDay:V(t.zonedEnd.getDay(),w,x),editable:e.editable}))),[q,k,e.editable,e.form,e.onDataAction,e.slot,e.viewSlot,X,M,_,x,w]),ie=f.useCallback((t,r,a)=>j.filter(e=>e.group.index===r&&e.range.index===a).map((a,n)=>f.createElement(k,{slot:e.slot,viewSlot:e.viewSlot,form:e.form,...a,onDataAction:e.onDataAction,key:`${a.start.getTime()}:${a.group.index}`,className:"k-scheduler-alldays-slot",row:t*(r||0)+1*(r||0),col:n,expandable:!0})),[k,j,e.form,e.onDataAction,e.slot,e.viewSlot]),ue=f.useCallback((t,r,a,n)=>q.map((l,o)=>X.filter(e=>e.index===t.index&&e.group.index===a&&e.range.index===o).map(t=>f.createElement(k,{slot:e.slot,viewSlot:e.viewSlot,form:e.form,onDataAction:e.onDataAction,...t,key:`${t.start.getTime()}:${t.group.index}`,row:r.length*(a||0)+n+1*(a||0)+1,col:o,editable:e.editable,isWorkHour:K(t.zonedStart,_,M),isWorkDay:0<=t.zonedStart.getDay()+(C-w)&&(t.zonedStart.getDay()+(C-w))%C<=x+(C-w)}))),[k,C,e.editable,e.form,e.onDataAction,e.slot,e.viewSlot,q,X,M,_,x,w]);return f.createElement(br,{id:e.id,props:e,style:e.style,className:oe,ranges:[...Z,...q],slots:[...j,...X]},f.createElement("div",{className:"k-scheduler-head"},"horizontal"===F?f.createElement(f.Fragment,null,f.createElement(wr,{nested:!0,group:E,resources:v,rowContent:Ar,childRowContent:Ar},ne),f.createElement(wr,{group:E,resources:v,rowContent:Hr,childRowContent:Hr},le),te.map(t=>f.createElement(D,{key:t.isRecurring?`${t.uid}:${t.group.index}:${t.range.index}:${t.originalStart}`:`${t.uid}:${t.group.index}:${t.range.index}`,...t,form:e.form,onDataAction:e.onDataAction,item:e.item,viewItem:e.viewItem,editable:e.editable,vertical:!1}))):f.createElement(_r,{group:E,resources:v,cellContent:un},ne)),f.createElement("div",{className:"k-scheduler-body"},"horizontal"===F?f.createElement(f.Fragment,null,X.filter(e=>0===e.group.index&&0===e.range.index).map((t,r)=>f.createElement(f.Fragment,{key:t.index},f.createElement(wr,{nested:!1,group:E,resources:v,rowContent:Vr,rowContentProps:{timeHeaderCell:e.timeHeaderCell,isMaster:r%b===0,isLast:(r+1)%b===0,slot:t}},f.createElement(Ir.Consumer,null,({groupIndex:e})=>f.createElement("div",{className:n.classNames("k-scheduler-row",{"k-middle-row":(r+1)%b!==0})},ce(t,r,e)))))),!1!==A&&H(T(q).start,R(q).end,new Date,new Date,!0)&&f.createElement(nn,null)):f.createElement(f.Fragment,null,f.createElement(_r,{nested:!0,group:E,resources:v},f.createElement(Ir.Consumer,null,({groupIndex:t})=>f.createElement(f.Fragment,{key:t},f.createElement("div",{className:"k-scheduler-row"},f.createElement(Hr,{groupIndex:t},Z.map((e,r)=>{const a=X.filter(e=>e.group.index===t&&0===e.range.index).length;return ie(a,t,r)}))),X.filter(e=>e.group.index===t&&0===e.range.index).map((r,a,n)=>f.createElement("div",{className:"k-scheduler-row",key:r.index},f.createElement(Vr,{slot:r,isMaster:a%b===0,isLast:(a+1)%b===0,timeHeaderCell:e.timeHeaderCell},ue(r,n,t,a)))),!1!==A&&H(T(q).start,R(q).end,new Date,new Date,!0)&&f.createElement(nn,{groupIndex:t})))),te.map(t=>f.createElement(D,{key:t.isRecurring?`${t.uid}:${t.group.index}:${t.range.index}:${t.originalStart}`:`${t.uid}:${t.group.index}:${t.range.index}`,...t,onDataAction:e.onDataAction,viewItem:e.viewItem,item:e.item,form:e.form,editable:e.editable,vertical:!1}))),re.map(t=>f.createElement(D,{key:t.isRecurring?`${t.uid}:${t.group.index}:${t.range.index}:${t.originalStart}`:`${t.uid}:${t.group.index}:${t.range.index}`,...t,format:"t",onDataAction:e.onDataAction,viewItem:e.viewItem,item:e.item,form:e.form,editable:e.editable,vertical:!0}))))},pn={name:"multi-day",title:"Multi Day",currentTimeMarker:!0,dateRange:({date:e,numberOfDays:t=1,timezone:r})=>{const n=a.ZonedDate.fromLocalDate(e,r),l=a.getDate(n),o=a.addDays(l,t),s=a.ZonedDate.fromUTCDate(z(l),r),c=a.ZonedDate.fromUTCDate(z(o),r);return{start:new Date(s.getTime()),end:new Date(c.getTime()),zonedStart:s,zonedEnd:c}},selectedDateFormat:"{0:D} - {1:D}",selectedShortDateFormat:"{0:d} - {1:d}",numberOfDays:1,startTime:"00:00",endTime:"23:59",isWorkDayStart:"08:00",isWorkDayEnd:"17:00",workWeekStart:a.Day.Monday,workWeekEnd:a.Day.Friday,slotDivisions:2,slotDuration:60,showCurrentTime:!0,defaultShowWorkHours:!0};mn.propTypes={currentTimeMarker:r.bool,name:r.string,numberOfDays:r.number,startTime:r.string,endTime:r.string,workDayStart:r.string,workDayEnd:r.string,workWeekStart:r.number,workWeekEnd:r.any,slotDivisions:r.number,slotDuration:r.number,showWorkHours:r.bool,selectedDateFormat:r.string,selectedShortDateFormat:r.string},mn.displayName="KendoReactSchedulerMultiDayView";const gn=e=>f.createElement(mn,{...e}),En={...pn,name:"day",title:e=>e.toLanguageString(Le,Xt[Le]),numberOfDays:1,slotDuration:60,slotDivisions:2,selectedDateFormat:"{0:D}",selectedShortDateFormat:"{0:d}"};gn.displayName="KendoReactSchedulerDayView";const hn=Object.freeze({name:"@progress/kendo-react-scheduler",productName:"KendoReact",productCode:"KENDOUIREACT",productCodes:["KENDOUIREACT"],publishDate:1607496606,version:"14.5.0-develop.10",licensingDocsUrl:"https://www.telerik.com/kendo-react-ui"}),vn=f.forwardRef((e,t)=>{const{_ref:r,onRemoveClick:a}=e,l=f.useRef(null),s=f.useRef(null);f.useImperativeHandle(l,()=>({props:e,element:s.current})),f.useImperativeHandle(t,()=>l.current),f.useImperativeHandle(r,()=>l.current);const c=ya(e.editable),i=o.useLocalization().toLanguageString(Fe,Xt[Fe]),u=e.group.resources.find(e=>!(!e.colorField||void 0===e[e.colorField])),m=u&&u.colorField&&u[u.colorField],p=f.useCallback(e=>{a&&a.call(void 0,{syntheticEvent:e,target:l.current})},[a,l]),g=f.useMemo(()=>n.classNames("k-task",e.className),[e.className]);return f.createElement("div",{id:e.id,ref:s,style:e.style,className:g,tabIndex:e.tabIndex||void 0},m&&f.createElement("span",{className:"k-scheduler-mark",style:{color:m,backgroundColor:m}}),e.isRecurring&&f.createElement(n.IconWrap,{name:"arrow-rotate-cw",icon:d.arrowRotateCwIcon}),e.isException&&f.createElement(n.IconWrap,{name:"arrows-no-repeat",icon:d.arrowsNoRepeatIcon}),e.title,c.remove&&f.createElement("a",{className:"k-link k-event-delete",title:i,"aria-label":i,onClick:p},f.createElement(n.IconWrap,{name:"x",icon:d.xIcon})))});vn.displayName="KendoReactSchedulerTask";const yn=f.forwardRef((e,t)=>{const{task:r,_ref:a,...n}=e,l=f.useRef(null),o=f.useRef(null);f.useImperativeHandle(o,()=>({props:e,element:l.current&&l.current.element})),f.useImperativeHandle(a,()=>l.current),f.useImperativeHandle(t,()=>o.current);const s=r||fn.task;return f.createElement(s,{...n,_ref:l})}),fn={task:vn};yn.displayName="KendoReactSchedulerViewTask";const Dn=f.createContext([null]),kn=f.createContext([!1]),Sn=f.createContext([!1]),Cn=e=>f.createElement(Dn.Provider,{value:e.remove},f.createElement(kn.Provider,{value:e.showRemoveDialog},f.createElement(Sn.Provider,{value:e.showOccurrenceDialog},e.children))),bn=f.forwardRef((e,t)=>{const{_ref:r,onDataAction:a,viewTask:n,removeDialog:l,removeItem:o,onRemoveItemChange:s,occurrenceDialog:c,showOccurrenceDialog:i,onShowOccurrenceDialogChange:d,showRemoveDialog:u,onShowRemoveDialogChange:m,...p}=e,g=f.useRef(null);f.useImperativeHandle(g,()=>({props:e,element:g.current&&g.current.element})),f.useImperativeHandle(r,()=>g.current),f.useImperativeHandle(t,()=>g.current);const E=n||In.viewTask,h=c||In.occurrenceDialog,v=l||In.removeDialog,y=ya(e.editable),D=se(),[k,S]=ye(),[C,b]=f.useState(null),[I,w]=Ce(null,o,s),[T,R]=Ce(!1,u,m),[x,A]=Ce(!1,i,d),_=f.useCallback(t=>{y.remove&&(w(e.dataItem,t),e.isRecurring?A(!0,t):R(!0,t))},[w,e.dataItem,e.isRecurring,A,R]),M=f.useCallback(e=>{b(null),w(null,e),R(!1,e),A(!1,e)},[b,w,R,A]),N=f.useCallback(e=>{a&&I&&a.call(void 0,{type:J.remove,series:C,dataItem:I}),w(null,e),R(!1,e)},[I,S,R]),z=f.useCallback((e,t)=>{w&&w(e,t)},[w]),O=f.useCallback((e,t)=>{R&&R(e,t)},[R]),F=f.useCallback((e,t)=>{A&&A(e,t)},[A]),P=f.useCallback(t=>{I&&(b(!1),w(e.dataItem,t),R(!0,t)),A(!1,t)},[b,e.dataItem,I,w,R]),H=f.useCallback(e=>{if(I){b(!0);const t=L(I,D,k);w(t,e),R(!0,e)}A(!1,e)},[D,I,b,w,R,A]);return f.createElement(Cn,{remove:[I,z],showRemoveDialog:[T,O],showOccurrenceDialog:[x,F]},f.createElement(E,{_ref:g,...p,onRemoveClick:_}),x&&f.createElement(h,{dataItem:I,isRemove:null!==I,onClose:M,onOccurrenceClick:P,onSeriesClick:H}),T&&f.createElement(v,{dataItem:I,onClose:M,onCancel:M,onConfirm:N}))}),In={viewTask:yn,occurrenceDialog:ka,removeDialog:Sa};bn.displayName="KendoReactSchedulerEditTask";const wn=e=>{const{group:t,timezone:r,resources:l}=ae(),s=e.editTask||bn,c=e.editSlot||fa,i=f.useRef(null),u=n.useDir(i),m=o.useInternationalization(),p=o.useLocalization(),[g]=ye(),E=de(),h=se(),v=me(),y=f.useMemo(()=>cn(v,{step:a.MS_PER_DAY,timezone:r}),[v.start.getTime(),v.end.getTime(),r]),D=f.useMemo(()=>dn(0,{step:a.MS_PER_DAY},{groups:E,ranges:y}),[v.start.getTime(),v.end.getTime(),r,E,y]),k=f.useMemo(()=>Ra(g,{dateRange:v,fields:h,timezone:r}),[g,v.start.getTime(),v.end.getTime(),h,r]),S=f.useMemo(()=>Ma(k,{timezone:r},{groups:E,ranges:y}),[k,r,E,y]),C=f.useMemo(()=>n.classNames("k-scheduler-agendaview",e.className),[e.className]);return vr({element:i,selector:".k-scheduler-datecolumn",explicitDepth:!1}),vr({element:i,selector:".k-scheduler-timecolumn",explicitDepth:!1}),f.useMemo(()=>$(S,D,!0),[S,D]),f.useMemo(()=>B(S,D,!0),[S,D]),f.createElement(br,{ref:i,id:e.id,style:e.style,className:C,props:e,slots:S,ranges:y},f.createElement("div",{className:"k-scheduler-head"},f.createElement(_r,{resources:l,group:t},f.createElement(Ir.Consumer,null,({groupIndex:e})=>f.createElement("div",{className:"k-scheduler-row",key:e},f.createElement("div",{className:"k-scheduler-cell k-heading-cell k-group-cell k-scheduler-datecolumn"},p.toLanguageString(Gt,Xt[Gt])),f.createElement("div",{className:"k-scheduler-cell k-heading-cell k-group-cell k-scheduler-timecolumn"},p.toLanguageString(Bt,Xt[Bt])),f.createElement("div",{className:"k-scheduler-cell k-heading-cell k-scheduler-eventcolumn"},p.toLanguageString($t,Xt[$t])))))),f.createElement("div",{className:"k-scheduler-body"},f.createElement(_r,{resources:l,group:t,nested:!0},f.createElement(Ir.Consumer,null,({groupIndex:t})=>D.filter(e=>e.group.index===(t||0)).map((r,a,l)=>f.createElement("div",{className:"k-scheduler-row k-scheduler-content",key:`${t}:${a}`},f.createElement(c,{...r,editable:e.editable,row:l.length*(t||0)+a,col:0,slot:e.slot,viewSlot:e.viewSlot,className:"k-scheduler-datecolumn k-group-cell"},f.createElement("div",null,f.createElement("strong",{className:"k-scheduler-agendaday"},m.formatDate(r.zonedStart,"dd")),f.createElement("em",{className:"k-scheduler-agendaweek"},m.formatDate(r.zonedStart,"EEEE")),f.createElement("span",{className:"k-scheduler-agendadate"},m.formatDate(r.zonedStart,"y")))),f.createElement("div",{className:"k-scheduler-cell k-group-content"},r.items.length?r.items.map((t,r)=>f.createElement("div",{className:"k-scheduler-row",key:r},f.createElement("div",{className:"k-scheduler-cell k-scheduler-timecolumn"},f.createElement("div",null,t.tail&&f.createElement(n.IconWrap,{name:"rtl"===u?"chevron-right":"chevron-left",icon:"rtl"===u?d.chevronRightIcon:d.chevronLeftIcon}),t.isAllDay?p.toLanguageString(xe,Xt[xe]):Tn(m,t),t.head&&f.createElement(n.IconWrap,{name:"rtl"===u?"chevron-left":"chevron-right",icon:"rtl"===u?d.chevronLeftIcon:d.chevronRightIcon}))),f.createElement("div",{className:"k-scheduler-cell"},f.createElement(s,{key:`${a}:${r}`,...t,onDataAction:e.onDataAction,task:e.task,viewTask:e.viewTask,editable:e.editable})))):f.createElement("div",{className:"k-scheduler-cell k-heading-cell k-group-cell"},p.toLanguageString(Yt,Xt[Yt])))))))))},Tn=(e,t)=>{let r="{0:t}-{1:t}";return t.head?r="{0:t}":t.tail&&(r="{1:t}"),e.format(r,t.zonedStart,t.zonedEnd)},Rn={name:"agenda",title:e=>e.toLanguageString(ze,Xt[ze]),dateRange:({intl:e,date:t,numberOfDays:r=1,timezone:n})=>{const l=a.ZonedDate.fromLocalDate(t,n),o=(e=>a.getDate(e))(7===r?a.firstDayInWeek(l,e.firstDay()):l),s=((e,t)=>a.getDate(a.addDays(e,t||1)))(o,r),c=a.ZonedDate.fromUTCDate(z(o),n),i=a.ZonedDate.fromUTCDate(z(s),n);return{start:new Date(c.getTime()),end:new Date(i.getTime()),zonedStart:c,zonedEnd:i}},selectedDateFormat:"{0:D} - {1:D}",selectedShortDateFormat:"{0:d} - {1:d}",slotDuration:1440,slotDivision:1,numberOfDays:7},xn={title:r.any};wn.propTypes=xn,wn.displayName="KendoReactSchedulerAgendaView";const An=f.forwardRef((e,t)=>{const r=f.useRef(null),a=f.useRef(null),n=o.useLocalization();f.useImperativeHandle(r,()=>({element:a.current&&a.current.element,...e})),f.useImperativeHandle(t,()=>r.current);const l=f.useCallback(t=>{!e.onClick||!r.current||e.onClick.call(void 0,{target:r.current,syntheticEvent:t})},[r,e.slot,e.onClick]),c=n.toLanguageString(jt,Xt[jt]);return f.createElement(s.Button,{ref:a,tabIndex:-1,className:"k-more-events",onClick:l,"aria-label":c,icon:"more-horizontal",svgIcon:d.moreHorizontalIcon})});An.displayName="KendoReactSchedulerShowMoreItemsButton";const _n={skeleton:"dd"},Mn=e=>{const{group:t,timezone:r,resources:l}=ae(),s=e.editItem||rn,c=e.editSlot||fa,[i]=ye(),[d,u]=he(),[,m]=De(),p=le(),g=de(),E=ge(),h=me(),v=o.useInternationalization(),y=se(),D=e.itemsPerSlot||Nn.itemsPerSlot,k=f.useMemo(()=>cn(h,{step:7*a.MS_PER_DAY,timezone:r}),[h.start.getTime(),h.end.getTime(),r]),S=f.useMemo(()=>dn(0,{step:a.MS_PER_DAY},{groups:g,ranges:k}),[h.start.getTime(),h.end.getTime(),g,k]),C=f.useMemo(()=>Ra(i,{dateRange:h,fields:y,timezone:r}),[i,h.start.getTime(),h.end.getTime(),y,r]),b=f.useMemo(()=>Ma(C,{timezone:r},{groups:g,ranges:k}),[C,r,g,k]),I=f.useCallback(e=>{const t=p.find(e=>"day"===e.props.name);!m||!t||!t.props.name||!e.target.slot||(m(t.props.name,e),u(e.target.slot.start,e))},[m,p]);f.useMemo(()=>$(b,S,!0),[b,S]),f.useMemo(()=>B(b,S,!0),[b,S]);const w=f.createElement(Ir.Consumer,null,({groupIndex:t})=>f.createElement("div",{className:"k-scheduler-row",key:t},S.filter(e=>e.group.index===t&&0===e.range.index).map((t,n)=>f.createElement(on,{as:e.dateHeaderCell,key:n,"data-dayslot-index":n,date:a.ZonedDate.fromLocalDate(new Date(t.zonedEnd.getTime()-(t.zonedEnd.getTime()-t.zonedStart.getTime())/2),r),start:t.start,end:t.end,format:{skeleton:"EEEE"}})))),T=f.createElement(Ir.Consumer,null,({groupIndex:t})=>k.map((r,a)=>f.createElement("div",{className:"k-scheduler-row",key:a},S.filter(e=>e.group.index===t&&e.range.index===a).map((r,l,o)=>f.createElement(c,{slot:e.slot,viewSlot:e.viewSlot,key:l,form:e.form,...r,expandable:{offsetTop:30,offsetBottom:D<r.items.length?15:0},onDataAction:e.onDataAction,col:"horizontal"===E?o.length*(t||0)+l:l,row:"horizontal"===E?a:k.length*(t||0)+a,editable:e.editable,className:n.classNames({"k-other-month":r.start.getMonth()<d.getMonth()||r.start.getMonth()>d.getMonth()})},f.createElement("span",{className:"k-link k-nav-day"},v.formatDate(new Date(r.end.getTime()-(r.end.getTime()-r.start.getTime())/2),_n)),D<r.items.length&&f.createElement(An,{slot:r,onClick:I}))))));return f.createElement(br,{props:e,slots:S,ranges:k,className:n.classNames("k-scheduler-monthview",e.className)},f.createElement("div",{className:"k-scheduler-head"},"horizontal"===E?f.createElement(wr,{nested:!0,resources:l,group:t},w):f.createElement(_r,{resources:l,group:t},w)),f.createElement("div",{className:"k-scheduler-body"},"horizontal"===E?f.createElement(wr,{resources:l,group:t},T):f.createElement(_r,{nested:!0,resources:l,group:t},T),b.filter(e=>null===e.order||e.order<D).sort(q).map(t=>f.createElement(s,{item:e.item,viewItem:e.viewItem,form:e.form,key:t.isRecurring?`${t.uid}:${t.group.index}:${t.range.index}:${t.originalStart}`:`${t.uid}:${t.group.index}:${t.range.index}`,...t,onDataAction:e.onDataAction,style:{transform:"translateY(30px)"},vertical:!1,editable:e.editable,ignoreIsAllDay:!0}))))},Nn={name:"month",dateRange:({intl:e,date:t,timezone:r})=>{const n=a.firstDayInWeek(a.firstDayOfMonth(a.getDate(t)),e.firstDay()),l=a.addDays(a.firstDayInWeek(a.lastDayOfMonth(a.getDate(t)),e.firstDay()),7),o=a.ZonedDate.fromUTCDate(z(n),r),s=a.ZonedDate.fromUTCDate(z(l),r);return{start:new Date(o.getTime()),end:new Date(s.getTime()),zonedStart:o,zonedEnd:s}},slotDuration:1440,slotDivision:1,itemsPerSlot:2,numberOfDays:31,title:e=>e.toLanguageString(Oe,Xt[Oe]),selectedDateFormat:"{0:Y}",selectedShortDateFormat:"{0:Y}"},zn={itemsPerSlot:r.number};Mn.propTypes=zn,Mn.displayName="KendoReactSchedulerMonthView";const Ln=e=>f.createElement(mn,{...e,step:7,numberOfDays:7}),On={name:"week",slotDuration:60,slotDivisions:2,numberOfDays:7,dateRange:({intl:e,date:t,timezone:r})=>{const n=a.ZonedDate.fromLocalDate(t,r),l=(e=>a.getDate(e))(a.firstDayInWeek(n,e.firstDay())),o=((e,t)=>a.getDate(a.addDays(e,t)))(l,7),s=a.ZonedDate.fromUTCDate(z(l),r),c=a.ZonedDate.fromUTCDate(z(o),r);return{start:new Date(s.getTime()),end:new Date(c.getTime()),zonedStart:s,zonedEnd:c}},title:e=>e.toLanguageString(Me,Xt[Me]),selectedDateFormat:"{0:D} - {1:D}",selectedShortDateFormat:"{0:d} - {1:d}"};Ln.displayName="KendoReactSchedulerWeekView";const Fn=e=>{const t=me(),r=Math.round((t.end.getTime()-t.start.getTime())/a.MS_PER_DAY);return f.createElement(mn,{...e,step:7,numberOfDays:r})},Pn={name:"work-week",slotDuration:60,slotDivisions:2,numberOfDays:7,dateRange:({intl:e,date:t,timezone:r,...n})=>{const l=a.ZonedDate.fromLocalDate(t,r),o=void 0!==n.workWeekStart?n.workWeekStart:a.Day.Monday,s=void 0!==n.workWeekEnd?n.workWeekEnd:a.Day.Friday,c=s<o?7+s-o+1:s-o+1,i=a.getDate(((e,t=a.Day.Sunday)=>{let r=e.clone();for(;r.getDay()!==t;)r=r.addDays(-1);return r})(l,o)),d=a.addDays(i,c),u=a.ZonedDate.fromUTCDate(z(i),r),m=a.ZonedDate.fromUTCDate(z(d),r);return{start:new Date(u.getTime()),end:new Date(m.getTime()),zonedStart:u,zonedEnd:m}},title:e=>e.toLanguageString(Ne,Xt[Ne]),workWeekStart:a.Day.Monday,workWeekEnd:a.Day.Friday,selectedDateFormat:"{0:D} - {1:D}",selectedShortDateFormat:"{0:d} - {1:d}"};Fn.displayName="KendoReactSchedulerWorkWeekView";const Hn=f.createElement("div",{className:"k-scheduler-cell k-side-cell"}),Wn=e=>f.createElement(f.Fragment,null,f.createElement("div",{className:"k-sticky-cell"},Hn),e.children),Kn=e=>{const t=o.useLocalization();return f.createElement(f.Fragment,null,f.createElement("div",{className:"k-sticky-cell"},f.createElement("div",{className:"k-scheduler-cell k-heading-cell k-side-cell k-scheduler-times-all-day","data-range-index":0},t.toLanguageString(Re,Xt[Re]))),e.children)},Vn=e=>{const{group:t,timezone:r,resources:l}=ae(),s=f.useRef(null),c=f.useRef(null),i=e.editItem||rn,d=e.editSlot||fa,u=f.useRef(null),[m]=ye(),p=ge(),g=de(),E=me(),h=se(),v=o.useInternationalization(),y=e.showWorkHours,D=e.slotDivisions||Gn.slotDivisions,k=e.slotDuration||Gn.slotDuration,S=e.workWeekStart||Gn.workWeekStart,C=e.workWeekEnd||Gn.workWeekEnd,b=v.parseDate(e.workDayStart||e.isWorkDayStart||Gn.isWorkDayStart),I=v.parseDate(e.workDayEnd||e.isWorkDayEnd||Gn.isWorkDayEnd),w=v.parseDate(e.startTime||Gn.startTime),x=v.parseDate(e.endTime||Gn.endTime),A=f.useMemo(()=>y?b:w,[y,b,w]),_=f.useMemo(()=>y?I:x,[y,I,x]),M=f.useMemo(()=>cn(E,{step:a.MS_PER_DAY,timezone:r}),[E.start.getTime(),E.end.getTime(),r]),N=f.useMemo(()=>dn(0,{step:k/D*a.MS_PER_MINUTE},{groups:g,ranges:M}).filter(e=>K(e.zonedStart,A,_)||A.getTime()===_.getTime()),[g,M,E.start.getTime(),E.end.getTime(),r,k,D,A.getTime(),_.getTime()]),L=f.useMemo(()=>Ra(m,{dateRange:E,fields:h,timezone:r}),[m,E.start.getTime(),E.end.getTime(),h,r]),O=f.useMemo(()=>Ma(L,{timezone:r},{groups:g,ranges:M}).filter(e=>A.getTime()===_.getTime()||K(e.zonedStart,A,_)||K(e.zonedEnd,A,_)||K(new Date(e.zonedEnd.getTime()-(e.zonedEnd.getTime()-e.zonedStart.getTime())/2),A,_)),[L,r,g,M,A.getTime(),_.getTime()]);f.useMemo(()=>$(O,N,!0),[O,N]),f.useMemo(()=>B(O,N,!0),[O,N]);const F=("horizontal"===p?N.length:N.length/g.length)*((e.columnWidth||Gn.columnWidth)+1),P=f.createElement(Ir.Consumer,null,()=>f.createElement(f.Fragment,null,f.createElement("div",{className:"k-scheduler-row"},M.map((t,r)=>f.createElement(on,{as:e.dateHeaderCell,key:r,date:t.zonedStart,start:t.start,end:t.end,format:"m"}))),f.createElement("div",{className:"k-scheduler-row",ref:s},M.map((t,r)=>N.filter(e=>0===e.group.index&&e.range.index===r).map(t=>t.zonedStart.getMinutes()%k===0?f.createElement(Wr,{key:t.index,as:e.timeHeaderCell,format:"t",date:t.zonedStart,start:t.zonedStart,end:t.zonedEnd}):null))))),W=f.createElement(Ir.Consumer,null,({groupIndex:t})=>f.createElement("div",{className:"k-scheduler-row"},M.map((n,l)=>N.filter(e=>e.group.index===t&&e.range.index===l).map((n,o,s)=>{const c=a.ZonedDate.fromUTCDate(z(n.zonedStart),r),i=V(c.getDay(),S,C);return f.createElement(d,{key:`${n.start.getTime()}:${n.group.index}`,slot:e.slot,viewSlot:e.viewSlot,...n,form:e.form,onDataAction:e.onDataAction,isWorkHour:K(n.zonedStart,b,I),isWorkDay:i,col:"horizontal"===p?l*s.length+o+s.length*M.length*(t||0):l*s.length+o,row:"horizontal"===p?0:t||0,expandable:!0,editable:e.editable})})))),G=f.useMemo(()=>n.classNames("k-scheduler-timelineview",e.className),[e.className]);vr({element:u,selector:".k-resource-cell",attribute:"data-depth-index",explicitDepth:!0});const U=u.current?u.current.closest(".k-scheduler-layout"):null;return Ia({element:U,selector:".k-resource-row",horizontalAttribute:"data-depth-index",verticalAttribute:"data-resource-index",applyTo:".k-resource-cell",syncHeight:O&&!O.length}),f.createElement(br,{ref:u,id:e.id,style:{...e.style},className:G,props:e,slots:N,ranges:M},f.createElement("div",{className:"k-scheduler-head",style:{width:F}},"horizontal"===p?f.createElement(wr,{nested:!0,group:t,resources:l,rowContent:Wn},P):f.createElement(_r,{wrapGroup:!0,group:t,resources:l},P)),f.createElement("div",{className:"k-scheduler-body",style:{width:F},ref:c},"horizontal"===p?f.createElement(wr,{group:t,resources:l,rowContent:Kn},W,f.createElement(Ir.Consumer,null,({groupIndex:t})=>e.currentTimeMarker&&H(T(M).start,R(M).end,new Date,new Date,!0)&&f.createElement(nn,{groupIndex:t,attachArrow:s,vertical:!0}))):f.createElement(_r,{nested:!0,wrapGroup:!0,group:t,resources:l},W),"vertical"===p&&e.currentTimeMarker&&H(T(M).start,R(M).end,new Date,new Date,!0)&&f.createElement(nn,{attachArrow:s,vertical:!0}),O.sort(q).map((t,r)=>f.createElement(i,{key:t.isRecurring?`${t.uid}:${t.group.index}:${t.range.index}:${t.originalStart}`:`${t.uid}:${t.group.index}:${t.range.index}`,...t,format:"t",form:e.form,onDataAction:e.onDataAction,item:e.item,viewItem:e.viewItem,editable:e.editable,ignoreIsAllDay:!0,vertical:!1,isLast:r===O.length-1}))))},Gn={name:"multi-day-timeline",title:"Multi Day Timeline",currentTimeMarker:!0,dateRange:({date:e,numberOfDays:t=1,timezone:r})=>{const n=a.ZonedDate.fromLocalDate(e,r),l=a.getDate(n),o=a.addDays(l,t),s=a.ZonedDate.fromUTCDate(z(l),r),c=a.ZonedDate.fromUTCDate(z(o),r);return{start:new Date(s.getTime()),end:new Date(c.getTime()),zonedStart:s,zonedEnd:c}},selectedDateFormat:"{0:D} - {1:D}",selectedShortDateFormat:"{0:d} - {1:d}",numberOfDays:1,startTime:"00:00",endTime:"00:00",isWorkDayStart:"8:00",isWorkDayEnd:"17:00",workWeekStart:a.Day.Monday,workWeekEnd:a.Day.Friday,slotDivisions:2,slotDuration:60,defaultShowWorkHours:!0,columnWidth:100},Bn=e=>f.createElement(Vn,{...e}),$n={...Gn,name:"timeline",title:e=>e.toLanguageString(_e,Xt[_e]),slotDuration:60,slotDivisions:2,numberOfDays:1,selectedDateFormat:"{0:D}",selectedShortDateFormat:"{0:d}"};Bn.displayName="KendoReactSchedulerTimelineView";const Un=new Map;Un.set(wn,Rn),Un.set(gn,En),Un.set(Mn,Nn),Un.set(Ln,On),Un.set(Fn,Pn),Un.set(Bn,$n);const Zn=f.forwardRef((e,t)=>{var r,l,c;const i=!n.validatePackage(hn,{component:"Scheduler"}),u=n.getLicenseMessage(hn),{timezone:m,onDataChange:p}=e,g=f.useRef(null),E=f.useRef(null);f.useImperativeHandle(E,()=>({props:e,element:g.current})),f.useImperativeHandle(t,()=>E.current);const h=n.useRtl(g),v=o.useInternationalization(),y=o.useLocalization(),{fields:D}=f.useMemo(()=>(e=>({fields:{...W,...e}}))(e.modelFields),[e.modelFields]),[C,b]=Ce(e.defaultDate||qn.defaultDate,e.date,e.onDateChange),I=f.Children.toArray(e.children||[]).map(e=>{var t;return f.isValidElement(e)?f.cloneElement(e,{...Un.get(e.type),...null!=(t=e.props)?t:{}}):e}),w=f.cloneElement(f.createElement(gn,null),Un.get(gn)),[T,R]=Ce(e.defaultView||I[0]&&I[0].props.name||"day",e.view,e.onViewChange),[x,A]=Ce(!0),N=I.find(e=>e.props.name===T)||I[0]||w,z=(null!=(r=e.data)?r:qn.data)||qn.data,O=((e,t)=>{const r=S(e,t),a=k(r);return 1===a.length?[{index:0,resources:(t||[]).reduce((e,t)=>[...e,...t.data.map(e=>({...e,field:t.field,valueField:t.valueField,colorField:t.colorField,multiple:t.multiple}))],[])}]:a.map((e,t)=>({index:t,resources:e}))})(e.group,e.resources),F=e.group&&e.group.orientation?e.group.orientation:"horizontal",P=N.props.selectedDateFormat||"{0:D}",H=N.props.selectedShortDateFormat||"{0:d}",K=N.props.slotDuration,V=void 0!==N.props.dateRange?"function"==typeof N.props.dateRange?N.props.dateRange.call(void 0,{intl:v,date:C,timezone:m,numberOfDays:N.props.numberOfDays,workWeekStart:N.props.workWeekStart||v.firstDay(),workWeekEnd:N.props.workWeekEnd||(v.firstDay()+N.props.numberOfDays)%6}):N.props.dateRange:{start:qn.defaultDate,end:qn.defaultDate},G=f.useCallback(({created:e=[],updated:t=[],deleted:r=[]})=>{if(p){const a={created:e,updated:t,deleted:r};p.call(void 0,a)}},[p]),B=f.useCallback(e=>{const t=[e.dataItem];G({created:t})},[G]),$=f.useCallback(e=>{const t=[],r=[];if(e.series)if(Array.isArray(e.dataItem))e.dataItem.forEach(t=>{const a=n.clone(L(e.dataItem,D,z)),l=n.clone(t);M(l,D.originalStart,_(a,D.originalStart)),M(l,D.recurrenceId,_(a,D.recurrenceId)),M(l,D.recurrenceExceptions,_(a,D.recurrenceExceptions)),r.push(l)});else{const t=n.clone(L(e.dataItem,D,z)),a=n.clone(e.dataItem);M(a,D.originalStart,_(t,D.originalStart)),M(a,D.recurrenceId,_(t,D.recurrenceId)),M(a,D.recurrenceExceptions,_(t,D.recurrenceExceptions)),r.push(a)}else if(Array.isArray(e.dataItem))e.dataItem.forEach(e=>{const a=null!==_(e,D.recurrenceRule)&&void 0!==_(e,D.recurrenceRule);if(null!==_(e,D.recurrenceId)&&void 0!==_(e,D.recurrenceId)&&a){const a=n.clone(L(e,D,z)),l=_(e,D.originalStart),o=_(a,D.recurrenceExceptions)||[];M(a,D.recurrenceExceptions,[...o,l]),M(e,D.recurrenceRule,null),r.push(a),t.push(e)}else r.push(e)});else{const a=null!==_(e.dataItem,D.recurrenceRule)&&void 0!==_(e.dataItem,D.recurrenceRule);if(null!==_(e.dataItem,D.recurrenceId)&&void 0!==_(e.dataItem,D.recurrenceId)&&a){const a=n.clone(L(e.dataItem,D,z)),l=_(e.dataItem,D.originalStart),o=_(a,D.recurrenceExceptions)||[];M(a,D.recurrenceExceptions,[...o,l]),M(e.dataItem,D.recurrenceRule,null),r.push(a),t.push(e.dataItem)}else r.push(e.dataItem)}G({updated:r,created:t})},[G,D,z]),U=f.useCallback(e=>{const t=[],r=[];if(e.series){const t=n.clone(L(e.dataItem,D,z)),a=n.clone(e.dataItem);M(a,D.originalStart,_(t,D.originalStart)),M(a,D.recurrenceId,_(t,D.recurrenceId)),M(a,D.recurrenceRule,_(t,D.recurrenceRule)),M(a,D.recurrenceExceptions,_(t,D.recurrenceExceptions)),r.push(a)}else if(null===_(e.dataItem,D.recurrenceRule)||void 0===_(e.dataItem,D.recurrenceRule))r.push(e.dataItem);else{const r=n.clone(L(e.dataItem,D,z)),a=_(e.dataItem,D.originalStart),l=_(r,D.recurrenceExceptions)||[];M(r,D.recurrenceExceptions,[...l,a]),M(e.dataItem,D.recurrenceRule,null),t.push(r)}G({updated:t,deleted:r})},[G,D,z]),Z=f.useCallback(e=>{switch(e.type){case J.create:B(e);break;case J.update:$(e);break;case J.remove:U(e)}},[B,U,$]),q=f.useCallback((e,t)=>{R(e,{...t,target:E.current})},[R,E]),Y=f.useCallback((e,t)=>{b(e,{...t,target:E.current})},[b,E]),j=f.useCallback(e=>{e.value&&b(e.value,{...e,target:E.current,nativeEvent:e.nativeEvent})},[b,E]),X=f.useCallback(e=>{var t,r;e.preventDefault();const n=null!=(r=null!=(t=N.props.step)?t:N.props.numberOfDays)?r:1,l=n>27?a.addMonths(C,Math.round(n/27)):a.addDays(C,n);b(l,e)},[C,b,N.props.numberOfDays,N.props.step]),Q=f.useCallback(e=>{var t,r;e.preventDefault();const n=null!=(r=null!=(t=N.props.step)?t:N.props.numberOfDays)?r:1,l=n>27?a.addMonths(C,-Math.round(n/27)):a.addDays(C,-n);b(l,e)},[C,b,N.props.numberOfDays,N.props.step]),ee=f.useCallback(e=>{e.preventDefault();const t=a.ZonedDate.fromLocalDate(new Date,m);b(new Date(t.getTime()),e)},[b,m]),te=f.useCallback(()=>{A(!x)},[A,x]),re=f.useCallback(()=>{g.current&&(g.current.style.boxShadow="0 0.5px 0.5px 0.5px rgba(0, 0, 0, .12)")},[g]),ae=f.useCallback(()=>{g.current&&(g.current.style.boxShadow="")},[g]),ne=f.useMemo(()=>{var t;return{...e.style,height:null!=(t=e.height)?t:qn.height}},[e.height,e.style]),le=f.useMemo(()=>n.classNames({"k-rtl":void 0!==e.rtl?e.rtl:"rtl"===h},"k-scheduler",e.className),[e.className,e.rtl,h]),oe=y.toLanguageString(Ae,Xt[Ae]),se=y.toLanguageString(Pe,Xt[Pe]),ce=y.toLanguageString(He,Xt[He]),ie=N.props.header||e.header||qn.header,de=N.props.footer||e.footer||qn.footer,ue=Ie,[me,pe]=f.useState(null);return f.createElement(Se,{element:g,props:e,views:I,fields:D,groups:O,dateRange:V,orientation:F,dateFormat:{dateFormat:P,shortDateFormat:H},date:[C,Y],activeView:[T,q],selection:[me,pe],data:[z,Z]},f.createElement("div",{ref:g,id:e.id,style:ne,className:le,tabIndex:null!=(l=e.tabIndex)?l:qn.tabIndex,dir:h,role:e.role||"application","aria-label":e.ariaLabel,"aria-labelledby":e.ariaLabelledby,"aria-activedescendant":me&&me.props.id||void 0,onFocus:re,onBlur:ae},f.createElement(ie,null,f.createElement(ue,null,f.createElement(s.ButtonGroup,{className:"k-scheduler-navigation"},f.createElement(s.Button,{role:"button",tabIndex:-1,title:oe,"aria-label":oe,onClick:ee},oe),f.createElement(s.Button,{role:"button",tabIndex:-1,icon:"rtl"===h?"chevron-right":"chevron-left",svgIcon:"rtl"===h?d.chevronRightIcon:d.chevronLeftIcon,title:se,"aria-label":se,onClick:Q}),f.createElement(s.Button,{role:"button",tabIndex:-1,icon:"rtl"===h?"chevron-left":"chevron-right",svgIcon:"rtl"===h?d.chevronLeftIcon:d.chevronRightIcon,title:ce,"aria-label":ce,onClick:X}))),f.createElement(Qt,{value:C,onChange:j}),f.createElement(s.ToolbarSpacer,null),f.createElement(Jt,null)),N&&f.createElement(N.type,{editable:null!=(c=e.editable)?c:qn.editable,key:N.props.name,item:e.item,viewItem:e.viewItem,editItem:e.editItem,task:e.task,viewTask:e.viewTask,editTask:e.viewTask,slot:e.slot,viewSlot:e.viewSlot,editSlot:e.editSlot,form:e.form,onDataAction:Z,showWorkHours:x,...N.props}),f.createElement(de,null,K&&K<1440&&f.createElement(er,null,f.createElement(s.Button,{tabIndex:-1,onClick:te,icon:"clock",svgIcon:d.clockIcon},y.toLanguageString(x?We:Ke,Xt[x?We:Ke])))),i&&f.createElement(n.WatermarkOverlay,{message:u})))}),qn={data:[],height:600,tabIndex:-1,editable:!1,defaultDate:new Date,header:be,footer:Te,navigation:Ie,viewSelector:we};Zn.propTypes={data:r.array,editable:r.oneOfType([r.bool,r.shape({add:r.bool,drag:r.bool,edit:r.bool,remove:r.bool,resize:r.bool})]),view:r.string,defaultView:r.string,date:r.any,defaultDate:r.any,rtl:r.bool,height:r.oneOfType([r.number,r.string]),children:r.any,timezone:r.string,group:r.any,resources:r.any,modelFields:r.shape({id:r.string,start:r.string,startTimezone:r.string,end:r.string,endTimezone:r.string,isAllDay:r.string,title:r.string,description:r.string,recurrenceRule:r.string,recurrenceId:r.string,recurrenceException:r.string})},Zn.displayName="KendoReactScheduler";const Yn=f.forwardRef((e,t)=>{const{item:r,_ref:a,itemRef:l,...s}=e,c=f.useRef(void 0),i=f.useRef(null),u=f.useRef(null),m=f.useRef(null);f.useImperativeHandle(u,()=>({props:e,element:i.current&&i.current.element})),f.useImperativeHandle(t,()=>u.current),f.useImperativeHandle(a,()=>i.current),f.useImperativeHandle(l,()=>i.current);const p=r||jn.item,g=o.useInternationalization(),[E]=sr(),[h]=lr(),v=te(),[y,D]=f.useState(!0),[k,S]=f.useState(!1),C=f.useRef(0),I=f.useRef(null),x=f.useRef([]),A=n.useDir(v),_=f.useMemo(()=>{var t,r;return e.isAllDay?null!=(t=e.title)?t:"":`(${g.format("{0:t} - {1:t}",e.zonedStart,e.zonedEnd)}): ${null!=(r=e.title)?r:""}`},[g,e.isAllDay,e.title,e.zonedEnd,e.zonedStart]),M=()=>{var t,r,a,n,l;const o=h.filter(t=>t.current&&((t,r)=>t.group.index===r.group.index&&t.range.index===r.range.index&&(void 0===t.range.isAllDay||void 0===r.range.isAllDay||t.range.isAllDay===r.range.isAllDay)&&(e.ignoreIsAllDay||t.isAllDay===r.isAllDay))(t.current.props,e)).sort((e,t)=>e.current.props.start.getTime()-t.current.props.start.getTime()),s=o.filter(t=>H(t.current.props.start,t.current.props.end,e.start,e.end)),c=i.current&&i.current.element;if(!c||!s.length)return;const d=T(o),u=R(o),m=T(s),p=R(s);if(!(m.current&&i.current&&p.current&&d.current&&u.current))return;if(!H(m.current.props.start,p.current.props.end,e.start,e.end))return void D(!1);const g=[],v=[],y=[],f=b(m.current.element),k=(e.vertical?f.height:f.width)/(m.current.props.end.getTime()-m.current.props.start.getTime()),A=(e.vertical?25:8)/k,_=(Math.min(e.start.getTime(),p.current.props.end.getTime()-A)-m.current.props.start.getTime())*k,M=Math.floor(Math.min(e.end.getTime(),p.current.props.end.getTime())-Math.max(e.start.getTime(),m.current.props.start.getTime()))*k;(E||[]).forEach(e=>{e.current&&(e.current.props.dragHint?v.push(e.current):e.current.props.resizeHint?y.push(e.current):g.push(e.current))}),x.current=((t,r,a)=>{const[n,l]=r,o=new Date(Math.min(l.props.end.getTime()-a,Math.max(e.start.getTime(),n.props.start.getTime()))),s=new Date(Math.max(o.getTime()+a,Math.min(e.end.getTime(),l.props.end.getTime())));return t.filter(t=>{const r=Math.max(Math.min(l.props.end.getTime()-a,t.props.start.getTime()),n.props.start.getTime()),c=Math.min(Math.max(r+a,t.props.end.getTime()),l.props.end.getTime());return t.props.id!==e.id&&t.props.group.index===e.group.index&&t.props.range.index===e.range.index&&(e.ignoreIsAllDay||t.props.isAllDay===e.isAllDay)&&H(new Date(r),new Date(c),o,s)&&H(n.props.start,l.props.end,t.props.start,t.props.end)})})(g,[d.current,u.current],A),I.current=e.resizeHint||e.dragHint?0:((e,t)=>{const r=new Set;return t.forEach(e=>{void 0!==e._order&&null!==e._order&&r.add(e._order)}),G(Array.from(r))})(i.current,x.current);let N=1;e.resizeHint||e.dragHint||(N=((e,t)=>{let r=0;return t.forEach(e=>{void 0!==e._order&&null!==e._order&&r<e._order&&(r=e._order)}),r+1})(i.current,x.current),x.current.forEach(e=>{e._maxSiblingsPerSlot&&N<e._maxSiblingsPerSlot&&(N=e._maxSiblingsPerSlot)}),x.current.forEach(e=>{void 0!==e._maxSiblingsPerSlot&&null!==e._maxSiblingsPerSlot&&e._maxSiblingsPerSlot<N&&(e._maxSiblingsPerSlot=N)}));let z=0;const L=f;x.current.forEach(e=>{let t=0;void 0!==e._order&&null!==e._order&&e._order<I.current&&(t=b(e.element).top+b(e.element).height-L.top-1*I.current+1),t>z&&(z=t)});L.width=e.vertical?L.width/N-1-20/N:M-1,e.vertical?L.height=M-1:(e.resizeHint||e.dragHint)&&N<=1||(L.height=null!=(r=null==(t=e.style)?void 0:t.height)?r:25),L.left=e.vertical?L.left+(null!=(a=I.current)?a:0)+1*(null!=(n=I.current)?n:0)*L.width:L.left+(_<0?0:_),L.top=e.vertical?L.top+(_<0?0:_):L.top+z+1*(null!=(l=I.current)?l:0),C.current=N,w(c,L),S(!0),D(!0)},N=f.useCallback(e=>{const t=e&&e[0],r=m.current;void 0!==c.current&&window.cancelAnimationFrame(c.current),r&&t&&(r.width!==t.contentRect.width||r.height!==t.contentRect.height)&&(c.current=window.requestAnimationFrame(()=>{M()})),m.current={width:t.contentRect.width,height:t.contentRect.height}},[M]);f.useEffect(M);const z=i.current&&i.current.element?i.current.element.closest(".k-scheduler-layout"):null;return Ia({element:z,selector:".k-resource-row",horizontalAttribute:"data-depth-index",verticalAttribute:"data-resource-index",applyTo:".k-resource-cell",syncHeight:e.isLast}),f.useEffect(()=>{if(!v.current)return;const e=window.ResizeObserver,t=e&&new e(N);return t&&t.observe(v.current),()=>{t&&t.disconnect()}},[N,v]),f.createElement(p,{...s,_ref:i,_order:I,_maxSiblingsPerSlot:C,_siblings:x,itemRef:i,style:{visibility:k?void 0:"hidden",display:y?void 0:"none",...e.style}},!e.resizeHint&&f.createElement("span",{className:"k-event-actions"},e.tail&&f.createElement(n.IconWrap,{name:"rtl"===A?"chevron-right":"chevron-left",icon:"rtl"===A?d.chevronRightIcon:d.chevronLeftIcon}),e.isRecurring&&!e.isException&&f.createElement(n.IconWrap,{name:"reload",icon:d.arrowRotateCwIcon}),!e.isRecurring&&e.isException&&f.createElement(n.IconWrap,{name:"non-recurrence",icon:d.nonRecurrenceIcon})),!e.resizeHint&&f.createElement("div",{title:_},!e.isAllDay&&f.createElement(ba,{className:"k-event-time"},_),f.createElement(ba,null,e.title)))}),jn={item:Ca};Yn.displayName="KendoReactSchedulerProportionalViewItem",e.AgendaView=wn,e.DATA_ACTION=J,e.DRAG_ITEM_ACTION=Ja,e.DateHeaderCell=on,e.DayView=gn,e.ITEMS_FOCUS_ACTION=Cr,e.ITEMS_SELECT_ACTION=Er,e.MonthView=Mn,e.REMOVE_ITEM_ACTION=Xa,e.RESIZE_ITEM_ACTION=en,e.SERIES_ACTION=tn,e.SHOW_OCCURRENCE_DIALOG_ACTION=ja,e.SHOW_REMOVE_DIALOG_ACTION=Qa,e.SLOTS_FOCUS_ACTION=yr,e.SLOTS_SELECT_ACTION=hr,e.Scheduler=Zn,e.SchedulerActiveViewContext=fe,e.SchedulerDataContext=ve,e.SchedulerDateContext=Ee,e.SchedulerDateRangeContext=ue,e.SchedulerDrag=Fa,e.SchedulerEditItem=rn,e.SchedulerEditItemDragItemContext=Ga,e.SchedulerEditItemFormItemContext=Va,e.SchedulerEditItemPropsContext=Ka,e.SchedulerEditItemRemoveItemContext=$a,e.SchedulerEditItemResizeItemContext=Ba,e.SchedulerEditItemShowOccurrenceDialogContext=Za,e.SchedulerEditItemShowRemoveDialogContext=Ua,e.SchedulerEditSlot=fa,e.SchedulerEditSlotFormItemContext=ha,e.SchedulerEditSlotPropsContext=Ea,e.SchedulerEditTask=bn,e.SchedulerFieldsContext=oe,e.SchedulerFooter=Te,e.SchedulerForm=ia,e.SchedulerFormEditor=sa,e.SchedulerGroupsContext=ie,e.SchedulerHeader=be,e.SchedulerItem=Ca,e.SchedulerItemContent=ba,e.SchedulerOccurrenceDialog=ka,e.SchedulerOrientationContext=pe,e.SchedulerProportionalViewItem=Yn,e.SchedulerPropsContext=re,e.SchedulerRemoveDialog=Sa,e.SchedulerResize=Ha,e.SchedulerSlot=ua,e.SchedulerTask=vn,e.SchedulerViewItem=wa,e.SchedulerViewSlot=pa,e.SchedulerViewTask=yn,e.SchedulerViewsContext=ne,e.TimeHeaderCell=Wr,e.TimelineView=Bn,e.WeekView=Ln,e.WorkWeekView=Fn,e.agendaViewDefaultProps=Rn,e.dateHeaderCellDefaultProps=sn,e.dayViewDefaultProps=En,e.monthViewDefaultProps=Nn,e.schedulerDefaultProps=qn,e.schedulerDragDefaultProps=Pa,e.schedulerEditItemDefaultProps=an,e.schedulerEditSlotDefaultProps=Da,e.schedulerEditTaskDefaultProps=In,e.schedulerFormDefaultProps=da,e.schedulerFormEditorDefaultProps=ca,e.schedulerProportionalViewItemDefaultProps=jn,e.schedulerResizeDefaultProps=Wa,e.schedulerSlotDefaultProps=ma,e.schedulerViewItemDefaultProps=Ta,e.schedulerViewSlotDefaultProps=ga,e.schedulerViewTaskDefaultProps=fn,e.timeHeaderCellDefaultProps=Kr,e.timeLineViewDefaultProps=$n,e.useSchedulerActiveViewContext=De,e.useSchedulerDataContext=ye,e.useSchedulerDateContext=he,e.useSchedulerDateRangeContext=me,e.useSchedulerEditItemDragItemContext=()=>f.useContext(Ga),e.useSchedulerEditItemFormItemContext=()=>f.useContext(Va),e.useSchedulerEditItemPropsContext=()=>f.useContext(Ka),e.useSchedulerEditItemRemoveItemContext=()=>f.useContext($a),e.useSchedulerEditItemResizeItemContext=()=>f.useContext(Ba),e.useSchedulerEditItemShowOccurrenceDialogContext=()=>f.useContext(Za),e.useSchedulerEditItemShowRemoveDialogContext=()=>f.useContext(Ua),e.useSchedulerEditSlotFormItemContext=()=>f.useContext(ha),e.useSchedulerEditSlotPropsContext=()=>f.useContext(Ea),e.useSchedulerFieldsContext=se,e.useSchedulerGroupsContext=de,e.useSchedulerOrientationContext=ge,e.useSchedulerPropsContext=ae,e.useSchedulerViewsContext=le,e.weekViewDefaultProps=On,e.workWeekDefaultProps=Pn});
15
+ !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("react"),require("prop-types"),require("@progress/kendo-date-math"),require("@progress/kendo-react-common"),require("@progress/kendo-data-query"),require("@progress/kendo-react-intl"),require("@progress/kendo-react-buttons"),require("@progress/kendo-react-dateinputs"),require("@progress/kendo-react-popup"),require("@progress/kendo-svg-icons"),require("react-dom"),require("@progress/kendo-react-form"),require("@progress/kendo-react-dialogs"),require("@progress/kendo-react-labels"),require("@progress/kendo-react-inputs"),require("@progress/kendo-react-dropdowns"),require("@progress/kendo-recurrence")):"function"==typeof define&&define.amd?define(["exports","react","prop-types","@progress/kendo-date-math","@progress/kendo-react-common","@progress/kendo-data-query","@progress/kendo-react-intl","@progress/kendo-react-buttons","@progress/kendo-react-dateinputs","@progress/kendo-react-popup","@progress/kendo-svg-icons","react-dom","@progress/kendo-react-form","@progress/kendo-react-dialogs","@progress/kendo-react-labels","@progress/kendo-react-inputs","@progress/kendo-react-dropdowns","@progress/kendo-recurrence"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).KendoReactScheduler={},e.React,e.PropTypes,e.KendoDateMath,e.KendoReactCommon,e.KendoDataQuery,e.KendoReactIntl,e.KendoReactButtons,e.KendoReactDateinputs,e.KendoReactPopup,e.KendoSvgIcons,e.ReactDOM,e.KendoReactForm,e.KendoReactDialogs,e.KendoReactLabels,e.KendoReactInputs,e.KendoReactDropdowns,e.KendoRecurrence)}(this,function(e,t,r,a,n,l,o,s,c,i,d,u,m,p,g,E,h,v){"use strict";function y(e){var t=Object.create(null);return e&&Object.keys(e).forEach(function(r){if("default"!==r){var a=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,a.get?a:{enumerable:!0,get:function(){return e[r]}})}}),t.default=e,Object.freeze(t)}var f=y(t),D=y(u);const k=(e,t=0,r=0,a=[])=>{if(e.length<=t)return[a];const n=[];return e[t].data.map(l=>{n.push(...k(e,t+1,r+1,[...a,{...l,field:e[t].field,valueField:e[t].valueField,colorField:e[t].colorField,multiple:e[t].multiple}]))}),n};function S(e,t){const r=[];if(!t||!t.length)return r;if(e&&e.resources&&e.resources.length){const a=e.resources;for(let e=0;e<a.length;e++){const n=t.find(t=>t.name===a[e]);r.push(n)}}return r}const C=(e,t=e.length-1)=>{const r=Math.max(0,t),a=[];e&&e.length||(e=[{}]);const n=(e[r].data||[]).map(t=>({...t,text:t[e[r].textField]}))||[],l=n.length;let o=1;for(let t=0;t<=r;t++)o*=(e[t].data||[]).length||1;for(let e=0;e<o;e++)n[e%l]&&a.push(n[e%l]);return a},b=e=>{if(!e)return{top:0,left:0,width:0,height:0,right:0};return{top:e.offsetTop,left:e.offsetLeft,right:e.offsetParent?e.offsetParent.offsetWidth-(e.offsetLeft+e.offsetWidth):0,width:e.offsetWidth,height:e.offsetHeight}},I=(e,t=!1)=>parseFloat(window.getComputedStyle(e)[t?"paddingLeft":"paddingTop"]||"0")+parseFloat(window.getComputedStyle(e)[t?"paddingRight":"paddingBottom"]||"0"),w=(e,t,r=!1)=>{e&&(void 0!==t.top&&(e.style.top=`${t.top}px`),void 0!==t.left&&(e.style.left=`${t.left}px`),void 0!==t.width&&(e.style.width=`${t.width}px`),void 0!==t.height&&!r&&(e.style.height="number"==typeof t.height?`${t.height}px`:t.height),r&&(e.style.minHeight=void 0!==t.height&&t.height>0?`${t.height}px`:""))},T=e=>e[0],R=e=>e[e.length-1],x=e=>{const t=new Set;return e.forEach(e=>{t.add(e.field)}),t.size===e.length};const A=(e,t,r,a=0)=>{if(a===r)return null;let n=null;const l=document.elementFromPoint(e,t);if(!l)return n;if("true"===l.getAttribute("data-slot"))return l;const o=l.style.pointerEvents;return l.style.pointerEvents="none",n=A(e,t,r,a+1),l.style.pointerEvents=o,n},_=(e,t)=>n.getter(t)(e),M=(e,t,r)=>{if(t)return n.setter(t)(e,r)},N=e=>null!=e;function z(e){return new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()))}const L=(e,t,r)=>{const a=O(e,t)?_(e,t.id):_(e,t.recurrenceId);return r.find(e=>_(e,t.id)===a)},O=(e,t)=>{const r=_(e,t.id),a=_(e,t.recurrenceId),n=_(e,t.recurrenceRule);return!(!r||!n||null!=a)},F=(e,t)=>Math.max(e.getTime(),t.getTime()),P=(e,t)=>Math.min(e.getTime(),t.getTime()),H=(e,t,r,a,n=!1)=>n?F(t,a)-P(e,r)<=t.getTime()-e.getTime()+(a.getTime()-r.getTime()):F(t,a)-P(e,r)<t.getTime()-e.getTime()+(a.getTime()-r.getTime()),W={id:"id",start:"start",startTimezone:"startTimezone",originalStart:"originalStart",end:"end",endTimezone:"endTimezone",isAllDay:"isAllDay",title:"title",description:"description",recurrenceRule:"recurrenceRule",recurrenceId:"recurrenceId",recurrenceExceptions:"recurrenceExceptions"},K=(e,t,r)=>(t.getHours()<e.getHours()||t.getHours()===e.getHours()&&t.getMinutes()<=e.getMinutes())&&(e.getHours()<r.getHours()||r.getHours()===e.getHours()&&e.getMinutes()<r.getMinutes()),V=(e,t,r)=>t<r?t<=e&&e<=r:e<=r||t<=e,G=e=>{let t=0;const r=e.slice();return r.sort((e,t)=>e-t).forEach((e,a)=>{r[a]===a&&(t=a+1)}),t},B=(e,t,r=!1)=>{e.forEach(e=>{e.order=null}),t.forEach(e=>e.items.splice(0,e.items.length));const a=[...e].sort((e,t)=>e.start.getTime()-t.start.getTime());t.forEach(e=>{const t=[];a.forEach(a=>{if((r||a.isAllDay===e.isAllDay)&&a.range.index===e.range.index&&(void 0===a.range.isAllDay||void 0===e.range.isAllDay||a.range.isAllDay===e.range.isAllDay)&&a.group.index===e.group.index&&H(a.start,a.end,e.start,e.end)){if(null!==a.order&&void 0!==a.order)t.includes(a.order)||(t.push(a.order),t.sort((e,t)=>e-t));else{const e=G(t);a.order=e,t.push(e),t.sort((e,t)=>e-t)}e.items.push(a)}})})},$=(e,t,r=!1)=>{e.forEach(e=>e.slots.splice(0,e.slots.length)),e.forEach(e=>{t.forEach(t=>{(r||e.isAllDay===t.isAllDay)&&e.range.index===t.range.index&&(void 0===e.range.isAllDay||void 0===t.range.isAllDay||e.range.isAllDay===t.range.isAllDay)&&e.group.index===t.group.index&&H(e.start,e.end,t.start,t.end)&&e.slots.push(t)})})},U=(...e)=>{},Z=(e,t,r=!1,a=!1)=>{const n=e.current;if(!n||!t)return null;const o=t.filter(e=>null!==e.current&&null!==e.current.element),s=l.orderBy(o,[{field:"current.props.group.index",dir:"asc"},{field:"current.props.range.index",dir:"asc"},r?{field:""}:{field:"current.props.isAllDay",dir:"desc"},{field:"current.props.start",dir:"asc"}]),c=s.findIndex(e=>null!==e.current&&!(e.current.props.uid!==n.props.uid||void 0!==e.current.props.occurrenceId&&e.current.props.occurrenceId!==n.props.occurrenceId||e.current.props.group.index!==n.props.group.index||e.current.props.range.index!==n.props.range.index||!r&&e.current.props.isAllDay!==n.props.isAllDay));return s[c+(a?-1:1)]},q=(e,t)=>(e.order||0)-(t.order||0),Y=6e4,j=[{}],X=new Date(1900,0,1),Q=new Date(2099,11,31);a.ZonedDate.fromLocalDate(X),a.ZonedDate.fromLocalDate(Q);var J=(e=>(e[e.create=0]="create",e[e.update=1]="update",e[e.remove=2]="remove",e))(J||{});const ee=f.createContext({current:null}),te=()=>f.useContext(ee);ee.displayName="SchedulerElementContext";const re=f.createContext({}),ae=()=>f.useContext(re);re.displayName="SchedulerPropsContext";const ne=f.createContext([]),le=()=>f.useContext(ne);ne.displayName="SchedulerViewsContext";const oe=f.createContext(W),se=()=>f.useContext(oe);oe.displayName="SchedulerFieldsContext";const ce=f.createContext({dateFormat:"{0:D}",shortDateFormat:"{0:d}"});ce.displayName="SchedulerDateFormatContext";const ie=f.createContext([{index:0,resources:[]}]),de=()=>f.useContext(ie);ie.displayName="SchedulerGroupsContext";const ue=f.createContext({start:new Date,end:new Date,zonedStart:a.ZonedDate.fromLocalDate(new Date),zonedEnd:a.ZonedDate.fromLocalDate(new Date)}),me=()=>f.useContext(ue);ue.displayName="SchedulerDateRangeContext";const pe=f.createContext(null),ge=()=>f.useContext(pe);pe.displayName="SchedulerOrientationContext";const Ee=f.createContext([new Date,U]),he=()=>f.useContext(Ee);Ee.displayName="SchedulerDateContext";const ve=f.createContext([[],U]),ye=()=>f.useContext(ve);ve.displayName="SchedulerDataContext";const fe=f.createContext(["day",U]),De=()=>f.useContext(fe);fe.displayName="SchedulerActiveViewContext";const ke=f.createContext([null,()=>{}]);ke.displayName="SchedulerItemSelectionContext";const Se=({children:e,element:t,props:r,views:a,fields:n,groups:l,dateRange:o,dateFormat:s,orientation:c,date:i,data:d,activeView:u,selection:m})=>f.createElement(ee.Provider,{value:t},f.createElement(re.Provider,{value:r},f.createElement(ne.Provider,{value:a},f.createElement(oe.Provider,{value:n},f.createElement(ce.Provider,{value:s},f.createElement(ie.Provider,{value:l},f.createElement(ue.Provider,{value:o},f.createElement(pe.Provider,{value:c},f.createElement(Ee.Provider,{value:i},f.createElement(ve.Provider,{value:d},f.createElement(fe.Provider,{value:u},f.createElement(ke.Provider,{value:m},e)))))))))))),Ce=(e,t,r)=>{const[a,n]=f.useState(t||e),l=f.useCallback((e,t)=>{n(e),r&&r.call(void 0,{...t,value:e})},[r,n]);return[void 0!==t?t:a,l]},be=f.forwardRef((e,t)=>{const{className:r,...a}=e,l=f.useRef(null),o=f.useRef(null);f.useImperativeHandle(o,()=>({element:l.current,props:e})),f.useImperativeHandle(t,()=>o.current);const c=f.useMemo(()=>n.classNames("k-scheduler-toolbar",r),[r]);return f.createElement(s.Toolbar,{id:e.id,ref:e=>{e&&(l.current=e.element)},className:c,...a},e.children)});be.displayName="KendoReactSchedulerHeader";const Ie=f.forwardRef((e,t)=>{const{className:r,...a}=e,l=f.useRef(null);return f.useImperativeHandle(t,()=>({element:l.current,props:e})),f.createElement(s.ToolbarItem,{ref:e=>{e&&(l.current=e.element)},className:n.classNames(r),...a},e.children)});Ie.displayName="KendoReactSchedulerSchedulerNavigation";const we=f.forwardRef((e,t)=>{const{className:r,...a}=e,l=f.useRef(null);return f.useImperativeHandle(t,()=>({element:l.current,props:e})),f.createElement(s.ToolbarItem,{ref:e=>{e&&(l.current=e.element)},className:n.classNames("k-scheduler-views",r),...a},e.children)});we.displayName="KendoReactSchedulerViewSelector";const Te=f.forwardRef((e,t)=>{const{className:r,style:a,...l}=e,o=f.useRef(null),c=f.useRef(null);f.useImperativeHandle(o,()=>({element:c.current,props:e})),f.useImperativeHandle(t,()=>o.current);const i=f.useMemo(()=>n.classNames("k-scheduler-footer",e.className),[e.className]);return f.createElement(s.Toolbar,{ref:e=>{e&&(c.current=e.element)},className:i,style:{boxShadow:"none",...a},...l},e.children)});Te.displayName="KendoReactSchedulerFooter";const Re="scheduler.allEvents",xe="scheduler.allDay",Ae="scheduler.today",_e="scheduler.timelineViewTitle",Me="scheduler.weekViewTitle",Ne="scheduler.workWeekViewTitle",ze="scheduler.agendaViewTitle",Le="scheduler.dayViewTitle",Oe="scheduler.monthViewTitle",Fe="scheduler.deleteTitle",Pe="scheduler.previousTitle",He="scheduler.nextTitle",We="scheduler.showFullDay",Ke="scheduler.showWorkDay",Ve="scheduler.editOccurrence",Ge="scheduler.editSeries",Be="scheduler.editRecurringConfirmation",$e="scheduler.editRecurringDialogTitle",Ue="scheduler.editSave",Ze="scheduler.editCancel",qe="scheduler.editorTitle",Ye="scheduler.editorEventTitle",je="scheduler.editorEventStart",Xe="scheduler.editorEventStartTimeZone",Qe="scheduler.editorEventEnd",Je="scheduler.editorEventEndTimeZone",et="scheduler.editorEventAllDay",tt="scheduler.editorEventDescription",rt="scheduler.editorEventSeparateTimeZones",at="scheduler.editorEventTimeZone",nt="scheduler.recurrenceEditorRepeat",lt="scheduler.recurrenceEditorDailyInterval",ot="scheduler.recurrenceEditorDailyRepeatEvery",st="scheduler.recurrenceEditorWeeklyInterval",ct="scheduler.recurrenceEditorWeeklyRepeatEvery",it="scheduler.recurrenceEditorWeeklyRepeatOn",dt="scheduler.recurrenceEditorMonthlyDay",ut="scheduler.recurrenceEditorMonthlyInterval",mt="scheduler.recurrenceEditorMonthlyRepeatEvery",pt="scheduler.recurrenceEditorMonthlyRepeatOn",gt="scheduler.recurrenceEditorYearlyOf",Et="scheduler.recurrenceEditorYearlyRepeatEvery",ht="scheduler.recurrenceEditorYearlyRepeatOn",vt="scheduler.recurrenceEditorYearlyInterval",yt="scheduler.recurrenceEditorFrequenciesDaily",ft="scheduler.recurrenceEditorFrequenciesMonthly",Dt="scheduler.recurrenceEditorFrequenciesNever",kt="scheduler.recurrenceEditorFrequenciesWeekly",St="scheduler.recurrenceEditorFrequenciesYearly",Ct="scheduler.recurrenceEditorOffsetPositionsFirst",bt="scheduler.recurrenceEditorOffsetPositionsSecond",It="scheduler.recurrenceEditorOffsetPositionsThird",wt="scheduler.recurrenceEditorOffsetPositionsFourth",Tt="scheduler.recurrenceEditorOffsetPositionsLast",Rt="scheduler.recurrenceEditorWeekdaysDay",xt="scheduler.recurrenceEditorWeekdaysWeekday",At="scheduler.recurrenceEditorWeekdaysWeekendday",_t="scheduler.recurrenceEditorEndAfter",Mt="scheduler.recurrenceEditorEndOccurrence",Nt="scheduler.recurrenceEditorEndLabel",zt="scheduler.recurrenceEditorEndNever",Lt="scheduler.recurrenceEditorEndOn",Ot="scheduler.editorDelete",Ft="scheduler.deleteConfirmation",Pt="scheduler.deleteRecurringConfirmation",Ht="scheduler.deleteOccurrence",Wt="scheduler.deleteSeries",Kt="scheduler.deleteDialogTitle",Vt="scheduler.deleteRecurringDialogTitle",Gt="scheduler.dateTitle",Bt="scheduler.timeTitle",$t="scheduler.eventTitle",Ut="scheduler.editorValidationRequired",Zt="scheduler.editorValidationStart",qt="scheduler.editorValidationEnd",Yt="scheduler.noEvents",jt="scheduler.moreEvents",Xt={[Ut]:"Field is required.",[Zt]:"Start time must be before End time.",[qt]:"End time must be after Start time.",[Re]:"All events",[xe]:"all day",[Ae]:"Today",[Le]:"Day",[Oe]:"Month",[Me]:"Week",[Ne]:"Work Week",[_e]:"Timeline",[ze]:"Agenda",[Fe]:"Delete",[Pe]:"Previous",[He]:"Next",[We]:"Show full day",[Ke]:"Show business hours",[Ve]:"Edit current occurrence",[Ge]:"Edit the series",[Be]:"Do you want to edit only this event occurrence or the whole series?",[$e]:"Edit Recurring Item",[Ue]:"Save",[Ze]:"Cancel",[Ot]:"Delete",[qe]:"Event",[Ye]:"Title",[je]:"Start",[Xe]:"Start Time Zone",[Qe]:"End",[Je]:"End Time Zone",[et]:"All Day Event",[tt]:"Description",[rt]:"End in different Time Zone",[at]:"Specify Time Zone",[nt]:"Repeat",[lt]:"day(s)",[ot]:"Repeat every",[st]:"week(s)",[ct]:"Repeat every",[it]:"Repeat on",[dt]:"Day",[ut]:"month(s)",[mt]:"Repeat every",[pt]:"Repeat on",[gt]:"of",[Et]:"Repeat every",[ht]:"Repeat on",[vt]:"year(s)",[yt]:"Daily",[ft]:"Monthly",[Dt]:"Never",[kt]:"Weekly",[St]:"Yearly",[Ct]:"First",[bt]:"Second",[It]:"Third",[wt]:"Fourth",[Tt]:"Last",[Rt]:"Day",[xt]:"Weekday",[At]:"Weekend Day",[_t]:"After",[Mt]:"occurrence(s)",[Nt]:"End",[zt]:"Never",[Lt]:"On",[Ft]:"Are you sure you want to delete this event?",[Pt]:"Do you want to delete only this event occurrence or the whole series?",[Ht]:"Delete current occurrence",[Wt]:"Delete the series",[Kt]:"Delete Event",[Vt]:"Delete Recurring Item",[Gt]:"Date",[Bt]:"Time",[$t]:"Event",[Yt]:"no events",[jt]:"More events"},Qt=f.forwardRef((e,t)=>{var r;const l=f.useRef(null),u=f.useRef(null);f.useImperativeHandle(t,()=>l.current);const{timezone:m}=ae(),p=a.ZonedDate.fromLocalDate(e.value,m),g=a.getDate(p),E=te(),h=n.useWindow(E),[v,y]=f.useState("desktop"),[D,k]=f.useState(!1),[S,C]=f.useState(!1),b=o.useInternationalization(),{dateFormat:I,shortDateFormat:w}=f.useContext(ce),T=me(),[R]=he(),x=T.end.getTime()-T.start.getTime()>27*a.MS_PER_DAY,A=b.format(I,x?R:T.zonedStart,x?R:T.zonedEnd.addDays(-1)),_=b.format(w,x?R:T.zonedStart,x?R:T.zonedEnd.addDays(-1)),M=f.useCallback(()=>{k(!D)},[D]),N=f.useCallback(()=>{C(!0)},[]),L=f.useCallback(()=>{k(!1),C(!1)},[]),O=f.useCallback(t=>{if(e.onChange){const r=a.ZonedDate.fromUTCDate(z(t.value),m);e.onChange.call(void 0,{...t,value:r})}k(!1)},[e.onChange,m]),F=f.useCallback(()=>{h().matchMedia&&y(h().matchMedia("(min-width: 1024px)").matches?"desktop":"mobile")},[h]);f.useEffect(()=>{F();const e=h().ResizeObserver,t=e&&new e(F);return t&&t.observe(E.current),()=>{e&&t.disconnect()}},[F,E,h]),f.useEffect(()=>{D&&S&&u.current&&u.current.focus()},[S,D]);const{onFocus:P,onBlur:H}=n.useAsyncFocusBlur({onFocus:N,onBlur:L});return f.createElement(f.Fragment,null,f.createElement(s.Button,{ref:l,onFocus:P,onBlur:H,fillMode:"flat",className:"k-nav-current",icon:"calendar",svgIcon:d.calendarIcon,"aria-live":"polite",tabIndex:-1,onClick:M},"desktop"===v?A:_),f.createElement(i.Popup,{anchor:null==(r=l.current)?void 0:r.element,show:D},f.createElement(c.Calendar,{ref:u,onFocus:P,onBlur:H,onChange:O,value:g})))});Qt.displayName="KendoReactSchedulerNavigationDatePicker";const Jt=f.forwardRef(()=>{const e=f.useRef(null),[t,r]=f.useState("desktop"),a=le(),l=n.useWindow(e),[c,i]=De(),u=a.find(e=>e.props.name===c),m=o.useLocalization(),p=f.useCallback(e=>{i&&(e.syntheticEvent.preventDefault(),i(e.item.name))},[i]),g=f.useCallback(e=>{i&&i(e)},[i]),E=f.useMemo(()=>a.map(e=>({value:e.props.name,text:"function"==typeof e.props.title?e.props.title(m):e.props.title,tabIndex:-1})),[a,m]),h=()=>{l().matchMedia&&r(l().matchMedia("(min-width: 1024px)").matches?"desktop":"mobile")};return f.useEffect(()=>{h();const t=l().ResizeObserver,r=t&&new t(h);return r&&r.observe(e.current),()=>{r&&r.disconnect()}},[]),f.createElement(f.Fragment,null,u&&"mobile"===t&&f.createElement("div",{className:"k-scheduler-tools",ref:e},f.createElement(s.DropDownButton,{className:"k-views-dropdown",onItemClick:p,popupSettings:{popupClass:"k-scheduler-toolbar"},textField:"title",items:a.map(e=>({...e.props,selected:e.props.name===c,title:"function"==typeof e.props.title?e.props.title(m):e.props.title})),text:f.createElement(f.Fragment,null,"function"==typeof u.props.title?u.props.title(m):u.props.title,f.createElement(n.IconWrap,{name:"chevron-down",icon:d.chevronDownIcon}))})),"desktop"===t&&f.createElement(s.SegmentedControl,{ref:t=>{t&&(e.current=t.element)},className:"k-scheduler-views",role:"group",value:c,onChange:g,items:E}))});Jt.displayName="KendoReactSchedulerViewSelectorList";const er=f.forwardRef((e,t)=>{const{className:r,...a}=e,l=f.useRef(null);return f.useImperativeHandle(t,()=>({element:l.current,props:e})),f.createElement(s.ToolbarItem,{ref:e=>{e&&(l.current=e.element)},className:n.classNames("k-scheduler-navigation",r),...a},e.children)}),tr=f.createContext({});tr.displayName="SchedulerViewPropsContext";const rr=f.createContext([]),ar=()=>f.useContext(rr);rr.displayName="SchedulerViewRangesContext";const nr=f.createContext([[],U]),lr=()=>f.useContext(nr);nr.displayName="SchedulerViewSlotsContext";const or=f.createContext([[],U]),sr=()=>f.useContext(or);or.displayName="SchedulerViewItemsContext";const cr=f.createContext([[],U]);cr.displayName="SchedulerViewSelectedSlotsContext";const ir=f.createContext([[],U]),dr=()=>f.useContext(ir);ir.displayName="SchedulerViewSelectedItemsContext";const ur=f.createContext([[],U]);ur.displayName="SchedulerViewFocusedItemsContext";const mr=f.createContext([[],U]),pr=()=>f.useContext(mr);mr.displayName="SchedulerViewFocusedSlotsContext";const gr=({children:e,props:t,ranges:r,slots:a,items:n,selectedSlots:l,selectedItems:o,focusedItems:s,focusedSlots:c})=>f.createElement(tr.Provider,{value:t},f.createElement(rr.Provider,{value:r},f.createElement(nr.Provider,{value:a},f.createElement(or.Provider,{value:n},f.createElement(cr.Provider,{value:l},f.createElement(ir.Provider,{value:o},f.createElement(ur.Provider,{value:s},f.createElement(mr.Provider,{value:c},e))))))));var Er=(e=>(e.select="ITEMS_SELECT_SELECT",e.selectNext="ITEMS_SELECT_SELECT_NEXT",e.selectPrev="ITEMS_SELECT_SELECT_PREV",e.reset="ITEMS_SELECT_RESET",e.add="ITEMS_SELECT_ADD",e.remove="ITEMS_SELECT_REMOVE",e))(Er||{});var hr=(e=>(e.select="SLOTS_SELECT_SELECT",e.reset="SLOTS_SELECT_RESET",e.add="SLOTS_SELECT_ADD",e))(hr||{});const vr=(e,t)=>{const{element:r}=e;n.useIsomorphicLayoutEffect(()=>{if(!r||!r.current)return;const t=[],a=[],n=[],l=r.current.querySelectorAll(e.selector);l.forEach(r=>{const l=r.getBoundingClientRect().width,o=e.explicitDepth&&void 0!==e.attribute?r.getAttribute(e.attribute):0,s=I(r,!0),c=((e,t=!1)=>parseFloat(window.getComputedStyle(e)[t?"borderLeftWidth":"borderTopWidth"]||"0")+parseFloat(window.getComputedStyle(e)[t?"borderRightWidth":"borderBottomWidth"]||"0"))(r,!0);null!==o&&((!n[o]||c>n[o])&&(n[o]=c),(!a[o]||s>a[o])&&(a[o]=s),(!t[o]||l>t[o])&&(t[o]=l))}),l.forEach(r=>{const l=e.explicitDepth?r.getAttribute(e.attribute):0;null!==l&&(r.style.minWidth=t[l]-a[l]-n[l]+"px")})},t)};var yr=(e=>(e.up="SLOT_FOCUS_UP",e.down="SLOT_FOCUS_DOWN",e.left="SLOT_FOCUS_LEFT",e.right="SLOT_FOCUS_RIGHT",e))(yr||{});const fr=(e,t)=>t.find(t=>null!==t.current&&null!==e.current&&t.current.props.row===e.current.props.row-1&&t.current.props.col===e.current.props.col),Dr=(e,t)=>t.find(t=>null!==t.current&&null!==e.current&&t.current.props.row===e.current.props.row&&t.current.props.col===e.current.props.col-1),kr=(e,t)=>t.find(t=>null!==t.current&&null!==e.current&&t.current.props.row===e.current.props.row&&t.current.props.col===e.current.props.col+1),Sr=(e,t)=>t.find(t=>null!==t.current&&null!==e.current&&t.current.props.row===e.current.props.row+1&&t.current.props.col===e.current.props.col);var Cr=(e=>(e.next="ITEMS_FOCUS_NEXT",e.prev="ITEMS_FOCUS_PREV",e))(Cr||{});const br=f.forwardRef((e,t)=>{const r=f.useRef(null);f.useImperativeHandle(t,()=>r.current);const[a,l]=n.useCollection([]),[o,s]=n.useCollection([]),[c,i]=(e=>[[],(t,r)=>{switch(t.type){case"ITEMS_FOCUS_NEXT":{if(!t.item||!t.item.current||!e)return;const a=Z(t.item,e,t.ignoreIsAllDay,!1);a&&a.current&&a.current.element&&(r.preventDefault(),a.current.element.focus());break}case"ITEMS_FOCUS_PREV":{if(!t.item||!t.item.current||!e)return;const a=Z(t.item,e,t.ignoreIsAllDay,!0);a&&a.current&&a.current.element&&(r.preventDefault(),a.current.element.focus());break}}}])(a),[d,u]=(e=>[[],(t,r)=>{switch(t.type){case"SLOT_FOCUS_UP":{if(!t.slot.current||!e)return;const a=fr(t.slot,e);a&&a.current&&a.current.element&&(r.preventDefault(),a.current.element.focus());break}case"SLOT_FOCUS_DOWN":{if(!t.slot||!e)return;const a=Sr(t.slot,e);a&&a.current&&a.current.element&&(r.preventDefault(),a.current.element.focus());break}case"SLOT_FOCUS_LEFT":{if(!t.slot||!e)return;const a=Dr(t.slot,e);a&&a.current&&a.current.element&&(r.preventDefault(),a.current.element.focus());break}case"SLOT_FOCUS_RIGHT":{if(!t.slot||!e)return;const a=kr(t.slot,e);a&&a.current&&a.current.element&&(r.preventDefault(),a.current.element.focus());break}}}])(o),[m,p]=(e=>{const[t,r]=f.useState([]),a=f.useCallback((a,n)=>{switch(a.type){case"ITEMS_SELECT_SELECT":if(!a.item)return;r([a.item]);break;case"ITEMS_SELECT_SELECT_NEXT":{if(!a.item||!a.item.current||!e)return;const t=Z(a.item,e,a.ignoreIsAllDay,!1);t&&(n.preventDefault(),r([t]));break}case"ITEMS_SELECT_SELECT_PREV":{if(!a.item||!a.item.current||!e)return;const t=Z(a.item,e,a.ignoreIsAllDay,!0);t&&(n.preventDefault(),r([t]));break}case"ITEMS_SELECT_RESET":r([]);break;case"ITEMS_SELECT_ADD":if(!a.item)return;t.some(e=>e===a.item)||r([...t,a.item]);break;case"ITEMS_SELECT_REMOVE":if(!a.item)return;r([...t.filter(e=>e!==a.item)])}},[e,t]);return[t,a]})(a),[g,E]=(()=>{const[e,t]=f.useState([]),r=f.useCallback(r=>{switch(r.type){case"SLOTS_SELECT_SELECT":if(!r.slot)return;t([r.slot]);break;case"SLOTS_SELECT_RESET":t([]);break;case"SLOTS_SELECT_ADD":if(!r.slot)return;e.some(e=>e===r.slot)||t([...e,r.slot])}},[e]);return[e,r]})(),h=f.useCallback((e,t)=>{E({type:hr.reset}),p(e,t)},[p,E]),v=f.useCallback((e,t)=>{p({type:Er.reset},t),E(e)},[p,E]),y=f.useMemo(()=>n.classNames("k-scheduler-layout k-scheduler-layout-flex",e.className),[e.className]);return vr({element:r,selector:".k-group-cell",attribute:"data-depth-index",explicitDepth:!0}),vr({element:r,selector:".k-side-cell",attribute:"data-depth-index",explicitDepth:!1}),f.createElement(gr,{props:e.props,ranges:e.ranges,items:[a,l],slots:[o,s],selectedItems:[m,h],selectedSlots:[g,v],focusedItems:[c,i],focusedSlots:[d,u]},f.createElement("div",{ref:r,style:e.style,className:y,role:"presentation"},e.children))});br.displayName="KendoReactSchedulerBaseView";const Ir=f.createContext({resource:{},groupIndex:0}),wr=e=>{const{nested:t,children:r,rowContentProps:a}=e,n=e.rowContent||xr,l=e.childRowContent||n,o=S(e.group,e.resources);return f.createElement("div",{className:"k-scheduler-group k-group-horizontal"},t?Tr({resources:o,children:r,nested:t,groupIndex:0,rowContent:n,rowContentProps:a,childRowContent:l}):Rr({resources:o,children:r,rowContentProps:a,childRowContent:l}))},Tr=e=>{const{resources:t,rowContent:r,nested:a,children:n,groupIndex:l,rowContentProps:o,childRowContent:s}=e;if(l===t.length)return Rr({resources:t,children:n,rowContentProps:o,childRowContent:s});const c=C(t,l),i=r;return f.createElement(f.Fragment,null,a?f.createElement("div",{className:"k-scheduler-row"},f.createElement(i,{resources:t,groupIndex:l,...o},c.map((e,t)=>f.createElement("div",{key:t,className:"k-scheduler-cell k-heading-cell"},e.text)))):f.createElement(i,{resources:t,groupIndex:l,...o},c.map((e,t)=>f.createElement("div",{key:t,className:"k-scheduler-cell k-heading-cell"},e.text))),Tr({resources:t,children:n,nested:a,rowContent:r,childRowContent:s,groupIndex:l+1}))},Rr=e=>{const{resources:t,childRowContent:r,children:a,rowContentProps:n}=e,l=C(t,t.length-1),o=r,s=t.length>0;return f.createElement("div",{className:"k-scheduler-row"},f.createElement(o,{resources:t,...n},(l.length?l:j).map((e,t)=>f.createElement("div",{key:t,className:"k-scheduler-cell k-group-cell"},f.createElement(Ir.Provider,{value:{resource:e,groupIndex:s?t:0}},a)))))};wr.displayName="KendoReactSchedulerHorizontalResourceIterator";const xr=e=>e.children,Ar=e=>f.createElement(f.Fragment,null,f.createElement("div",{className:"k-scheduler-cell k-side-cell","data-range-index":e.rangeIndex}),e.children),_r=e=>{const{nested:t,wrapGroup:r,children:a}=e,n=e.cellContent||Pr,l=S(e.group,e.resources);return f.createElement("div",{className:"k-scheduler-group"},t?r?f.createElement("div",{className:"k-scheduler-row"},f.createElement("div",{className:"k-sticky-cell"},zr({resources:l,children:a,cellContent:n,depth:0,groupIndex:0})),f.createElement("div",{className:"k-scheduler-cell k-group-content"},Nr({resources:l,children:a,cellContent:n,depth:0,groupIndex:0},!1))):Nr({resources:l,children:a,cellContent:n,depth:0,groupIndex:0},!0):r?f.createElement("div",{className:"k-scheduler-row"},f.createElement("div",{className:"k-sticky-cell"},Mr({resources:l})),f.createElement("div",{className:"k-scheduler-cell k-group-content"},a)):Lr({resources:l,children:a,cellContent:n,groupIndex:0}))},Mr=e=>f.createElement("div",{className:"k-scheduler-row"},f.createElement("div",{className:"k-scheduler-row"},e.resources.map((e,t)=>f.createElement("div",{key:t,className:"k-scheduler-cell k-resource-cell k-heading-cell","data-depth-index":t})))),Nr=(e,t=!0)=>{const{resources:r,children:a,cellContent:n,groupIndex:l,depth:o}=e,s=r.length>0;if(o===r.length||!s)return f.createElement(Ir.Provider,{value:{resource:r[o],groupIndex:s?l:0}},a);const c=r[o].data.length;return r[o].data.map((e,s)=>f.createElement("div",{key:s,className:"k-scheduler-row"},t&&f.createElement("div",{className:"k-scheduler-cell k-group-cell k-heading-cell","data-depth-index":o},e[r[o].textField]),f.createElement("div",{className:"k-scheduler-cell k-group-content k-resource-row","data-depth-index":o,"data-resource-index":c*l+s},Nr({resources:r,children:a,cellContent:n,groupIndex:c*l+s,depth:o+1},t))))},zr=e=>{const{resources:t,children:r,cellContent:a,groupIndex:n,depth:l}=e,o=t.length?t[l].data.length:0;return t[l]?t[l].data.map((e,s)=>f.createElement("div",{key:s,className:"k-scheduler-row"},f.createElement("div",{className:"k-scheduler-cell k-resource-cell k-resource-row k-heading-cell","data-depth-index":l,"data-resource-index":o*n+s},e[t[l].textField]),l+1!==t.length&&f.createElement("div",{className:"k-scheduler-cell k-resource-content"},zr({resources:t,children:r,cellContent:a,groupIndex:o*n+s,depth:l+1})))):null},Lr=e=>{const{resources:t,children:r,groupIndex:a,cellContent:n}=e;return f.createElement("div",{className:"k-scheduler-row"},Fr(t),n,Or(r,t,a))},Or=(e,t,r)=>{const a=t.length>0;return f.createElement("div",{className:"k-scheduler-cell k-group-content"},f.createElement(Ir.Provider,{value:{resource:t[r],groupIndex:a?r:void 0}},e))},Fr=e=>e.map((e,t)=>f.createElement("div",{key:t,className:"k-scheduler-cell k-group-cell k-heading-cell","data-depth-index":t}));_r.displayName="KendoReactSchedulerVerticalResourceIterator";const Pr=null,Hr=e=>{const t=o.useLocalization();return f.createElement(f.Fragment,null,f.createElement("div",{className:"k-scheduler-cell k-heading-cell k-side-cell k-scheduler-times-all-day"},t.toLanguageString(xe,Xt[xe])),e.children)},Wr=f.forwardRef((e,t)=>{const{as:r=Kr.as,...a}=e,l=f.useRef(null),s=f.useRef(null),c=o.useInternationalization(),i=f.useMemo(()=>n.classNames("k-scheduler-cell k-heading-cell",e.className),[e.className]);return f.useImperativeHandle(s,()=>({element:l.current&&l.current.element?l.current.element:l.current,props:e})),f.useImperativeHandle(t,()=>s.current),f.createElement(r,{ref:r!==Kr.as?void 0:l,...a,className:i},c.formatDate(e.date,e.format?e.format:Kr.format))}),Kr={as:f.forwardRef(({as:e,format:t,start:r,end:a,...n},l)=>f.createElement("div",{...n,ref:l})),format:"t"};Wr.displayName="KendoReactSchedulerTimeHeaderCell";const Vr=e=>{const{slot:t,children:r}=e;return f.createElement(f.Fragment,null,e.isMaster?f.createElement(Wr,{as:e.timeHeaderCell,date:t.zonedStart,start:t.zonedStart,end:t.zonedEnd,className:n.classNames("k-side-cell",{"k-major-cell":!e.isLast})}):f.createElement("div",{className:"k-scheduler-cell k-heading-cell k-side-cell"}),r)},Gr=e=>{const{onChange:t,data:r,validationMessage:a,visited:n,touched:o,modified:s,...c}=e,[i,d]=f.useState(r),u=f.useCallback(e=>t(e),[t]),m=f.useCallback(e=>{const t=l.filterBy(r||[],e.filter);d(t)},[]);return f.createElement(h.ComboBox,{style:{width:"100%"},data:i,filterable:!0,onFilterChange:m,onChange:u,...c})},Br=e=>{const{value:t,data:r,onChange:a,...n}=e,l=f.useCallback(e=>{a&&a.call(void 0,e.currentTarget.dataset.value)},[a]);return f.createElement(s.ButtonGroup,{className:"k-scheduler-recurrence-repeat",width:"100%",...n},r.map(e=>f.createElement(s.Button,{type:"button",key:e.value,selected:e.value===t,onClick:l,"data-value":e.value,togglable:!0},e.text)))},$r=e=>e.charAt(0).toUpperCase()+e.slice(1),Ur=["first","second","third","fourth","last"],Zr=["never","daily","weekly","monthly","yearly"],qr=[{day:0,offset:0},{day:1,offset:0},{day:2,offset:0},{day:3,offset:0},{day:4,offset:0},{day:5,offset:0},{day:6,offset:0}],Yr=[{day:1,offset:0},{day:2,offset:0},{day:3,offset:0},{day:4,offset:0},{day:5,offset:0}],jr=[{day:0,offset:0},{day:6,offset:0}],Xr=e=>{switch(e){case"day":return qr;case"weekday":return Yr;case"weekend":return jr}},Qr=e=>{const{value:t,data:r,onChange:a,...n}={...Jr,...e},l=r=>{const a=Number(r.currentTarget.dataset.key);e.onChange&&e.onChange.call(void 0,t.some(e=>e===a)?t.filter(e=>e!==a):[...t,a])};return f.createElement(s.ButtonGroup,{width:"auto",...n},(e.data||Jr.data).map(e=>f.createElement(s.Button,{type:"button",key:e.value,"data-key":e.value,selected:t.some(t=>t===e.value),togglable:!0,onClick:l},$r(e.text))))},Jr={data:[],value:[]},ea=e=>{const t=o.useInternationalization(),r=o.useLocalization(),{timezone:n}=ae(),[l,s]=f.useState(1),[i,d]=f.useState(a.ZonedDate.fromUTCDate(e.start)),u=f.useCallback((e,t)=>{const a=t?e:"scheduler.recurrenceEditor"+e;return r.toLanguageString(a,Xt[a])},[r]),p=f.useMemo(()=>{var t;return(e=>v.parseRule({recurrenceRule:e})||{})(null!=(t=e.value)?t:ra.value)},[e.value]),y=f.useMemo(()=>(e=>Zr.map(t=>({value:t,text:e("Frequencies"+$r(t))})))(u),[u]),D=f.useMemo(()=>(e=>N(e)&&!(e=>(e=>null==e)(e)||e.trim&&0===e.trim().length)(e.freq)?e.freq:"never")(p),[p]),k=f.useMemo(()=>((e,t)=>{const r=e.firstDay(),a=e.dateFormatNames({type:"days",nameType:"wide"}).map((e,t)=>({text:e,value:t})),n=a.slice(r).concat(a.slice(0,r));return[{text:t("WeekdaysDay"),value:"day"},{text:t("WeekdaysWeekday"),value:"weekday"},{text:t("WeekdaysWeekendday"),value:"weekend"}].concat(n)})(t,u),[t,u]),S=f.useMemo(()=>((e,t,r)=>{var a;let n;if(N(t.byWeekDay))switch(t.byWeekDay.length){case 7:n="day";break;case 5:n="weekday";break;case 2:n="weekend";break;case 1:n=t.byWeekDay[0].day;break;default:n=r.getDay()}else n=r.getDay();return null!=(a=e.find(e=>n===e.value))?a:e[0]})(k,p,e.start),[k,p,e.start]),C=f.useMemo(()=>(e=>e.dateFormatNames({type:"months",nameType:"wide",standAlone:!0}).map((e,t)=>({text:e,value:t+1})))(t),[t]),b=f.useMemo(()=>((e,t)=>e.find(e=>(t.byMonth?t.byMonth[0]:null)===e.value)||e[0])(C,p),[C,p]),I=f.useMemo(()=>(e=>{const t=[1,2,3,4,-1];return Ur.map((r,a)=>({text:e("OffsetPositions"+$r(r)),value:t[a]}))})(u),[u]),w=f.useMemo(()=>((e,t)=>e.find(e=>e.value===(t.bySetPosition?t.bySetPosition[0]:t.byWeekDay&&t.byWeekDay[0]?t.byWeekDay[0].offset:1))||e[0])(I,p),[I,p]),T=f.useMemo(()=>(e=>N(e.count)?"count":N(e.until)?"until":"never")(p),[p]),R=f.useMemo(()=>((e,t)=>N(e.byMonthDay)&&e.byMonthDay.length>0?e.byMonthDay[0]:t.getDate())(p,e.start),[p,e.start]),x=f.useMemo(()=>(e=>N(e.until)?a.toLocalDate(e.until):null)(p),[p.until]),A=f.useMemo(()=>(e=>{const t=e.firstDay(),r=e.dateFormatNames({type:"days",nameType:"abbreviated"}).map((e,t)=>({text:e,value:t}));return r.slice(t).concat(r.slice(0,t))})(t),[t]),_=f.useMemo(()=>(e=>N(e.byWeekDay)?"weekday":N(e.byMonthDay)?"monthday":void 0)(p),[p.byWeekDay,p.byMonthDay]),M=f.useCallback(r=>{"never"===r.freq?e.onChange({value:null}):(void 0===r.weekStart&&(r.weekStart=t.firstDay()),e.onChange({value:v.serializeRule(r,e.timezone)}))},[e.onChange,e.timezone]),z=f.useCallback(t=>{const r={};r.freq=t,r.interval=1,"weekly"===t&&(r.byWeekDay=[{day:a.ZonedDate.fromLocalDate(e.start,n).getDay(),offset:0}]),("monthly"===t||"yearly"===t)&&(r.byMonthDay=[e.start.getDate()]),"yearly"===t&&(r.byMonth=[e.start.getMonth()+1]),M(r)},[M,e.start,n]),L=f.useCallback(e=>{const t=e.value;M(Object.assign({},p,{interval:t}))},[M,p]),O=f.useCallback(e=>{const t=e.value;M(Object.assign({},p,{count:t})),null!==t&&s(t)},[M,p]),F=f.useCallback(t=>{const r=t.value;if(!r)return;const n=a.ZonedDate.fromLocalDate(r,e.timezone);M(Object.assign({},p,{until:n})),d(n)},[M,p,e.timezone]),P=f.useCallback(e=>{M(Object.assign({},p,{byWeekDay:A.filter(t=>e.some(e=>e===t.value)).map(e=>({offset:0,day:e.value}))}))},[M,p,A]),H=f.useCallback(e=>{const t=Object.assign({},p),r=e.target.value;"string"==typeof r.value?(t.byWeekDay=Xr(r.value),t.bySetPosition=[w.value]):(t.bySetPosition=void 0,t.byWeekDay=[{day:r.value,offset:w.value}]),M(t)},[w.value,M,p]),W=f.useCallback(e=>{M(Object.assign({},p,{byMonthDay:[e.value]}))},[M,p]),K=f.useCallback(e=>{const t=e.value;M(Object.assign({},p,{byMonth:[t.value]}))},[M,p]),V=f.useCallback(e=>{const t=e.value,r=Object.assign({},p);switch(t){case"never":r.until=void 0,r.count=void 0;break;case"count":r.until=void 0,r.count=l;break;case"until":r.until=i,r.count=void 0}M(r)},[M,p,e.timezone]),G=f.useCallback(e=>{const t=Object.assign({},p);"monthday"===e.value?(t.byWeekDay=void 0,t.bySetPosition=void 0,t.byMonthDay=[R]):"weekday"===e.value&&(t.byMonthDay=void 0,"string"==typeof S.value?(t.bySetPosition=[w.value],t.byWeekDay=Xr(S.value)):t.byWeekDay=[{day:S.value,offset:w.value}]),M(t)},[M,p,R,S]),B=f.useCallback(e=>{const t=Object.assign({},p),r=e.value;if(t.byWeekDay)switch(t.byWeekDay.length){case 7:case 5:case 2:t.bySetPosition=[r.value];break;case 1:t.byWeekDay[0].offset=r.value}M(t)},[M,p]);return f.createElement(f.Fragment,null,f.createElement(m.FieldWrapper,null,f.createElement(g.Label,{className:"k-form-label"},r.toLanguageString(nt,Xt[nt])),f.createElement("div",{className:"k-form-field-wrap"},f.createElement(Br,{value:D,data:y,onChange:z}))),"never"!==D&&f.createElement(m.FieldWrapper,null,f.createElement(g.Label,{editorId:"interval-editor",className:"k-form-label"},u($r(D)+"RepeatEvery")),f.createElement("div",{className:"k-form-field-wrap"},f.createElement(E.NumericTextBox,{min:1,step:1,defaultValue:1,value:p.interval,onChange:L,id:"interval-editor",className:"k-recur-interval"})," ",f.createElement(g.Label,{editorId:"interval-editor",className:"k-form-label"},u($r(D)+"Interval")))),"weekly"===D&&f.createElement(m.FieldWrapper,null,f.createElement(g.Label,{className:"k-form-label"},u(it,!0)),f.createElement("div",{className:"k-form-field-wrap"},f.createElement(Qr,{data:A,value:(p.byWeekDay||[]).map(({day:e})=>e),onChange:P}))),"monthly"===D&&f.createElement(m.FieldWrapper,null,f.createElement(g.Label,{key:"recurrence-repeat-on-monthly-label",className:"k-form-label"},u(pt,!0)),f.createElement("div",{className:"k-form-field-wrap"},f.createElement(E.RadioGroup,{value:_,onChange:G,item:ta,className:"k-reset",data:[{value:"monthday",label:u(dt,!0),children:[f.createElement(f.Fragment,{key:"separator"}," "),f.createElement(E.NumericTextBox,{key:"weekday-day",min:1,max:31,disabled:"monthday"!==_,value:p&&p.byMonthDay&&p.byMonthDay[0],onChange:W,width:"auto"})]},{value:"weekday",label:" ",children:[f.createElement(h.DropDownList,{key:"weekday-offset",textField:"text",dataItemKey:"value",disabled:"weekday"!==_,data:I,value:w,onChange:B,style:{width:"auto"}}),f.createElement(f.Fragment,{key:"separator"}," "),f.createElement(h.DropDownList,{key:"weekday-value",disabled:"weekday"!==_,value:S,data:k,onChange:H,textField:"text",dataItemKey:"value",style:{width:"auto"}})]}]}))),"yearly"===D&&f.createElement(m.FieldWrapper,null,f.createElement(g.Label,null,u(ht,!0)),f.createElement("div",{className:"k-form-field-wrap"},f.createElement(E.RadioGroup,{value:_,item:ta,onChange:G,className:"k-reset",data:[{value:"monthday",label:" ",children:[f.createElement(h.DropDownList,{key:"monthday-month",disabled:"monthday"!==_,value:b,data:C,textField:"text",dataItemKey:"value",onChange:K,style:{width:"auto"}}),f.createElement(f.Fragment,{key:"separator"}," "),f.createElement(E.NumericTextBox,{key:"monthday-day",min:1,max:31,disabled:"monthday"!==_,value:R,onChange:W,width:"auto"})]},{value:"weekday",label:" ",children:[f.createElement(h.DropDownList,{key:"yearly-weekday-offset",textField:"text",dataItemKey:"value",disabled:"weekday"!==_,data:I,value:w,onChange:B,style:{width:"auto"}}),f.createElement(f.Fragment,{key:"yearly-separator-1"}," "),f.createElement(h.DropDownList,{key:"yearly-weekday-day",textField:"text",dataItemKey:"value",disabled:"weekday"!==_,value:S,data:k,onChange:H,style:{width:"auto"}}),f.createElement(f.Fragment,{key:"yearly-separator-2"}," "),f.createElement("span",{key:"yearly-weekday-of-label"},u(gt,!0)),f.createElement(f.Fragment,{key:"yearly-separator-3"}," "),f.createElement(h.DropDownList,{key:"yearly-weekday-month",textField:"text",dataItemKey:"value",disabled:"weekday"!==_,value:b,data:C,onChange:K,style:{width:"auto"}})]}]}))),"never"!==D&&f.createElement("div",{className:"k-scheduler-recurrence-end-rule-editor"},f.createElement(m.FieldWrapper,null,f.createElement(g.Label,{className:"k-form-label"},u(Nt,!0)),f.createElement("div",{className:"k-form-field-wrap"},f.createElement(E.RadioGroup,{item:ta,value:T,onChange:V,data:[{value:"never",label:u(zt,!0)},{value:"count",label:u(_t,!0),children:[f.createElement(f.Fragment,{key:"separator-1"}," "),f.createElement(E.NumericTextBox,{key:"endrule-after-editor",id:"k-endrule-after",className:"k-recur-count",min:1,width:"auto",value:"count"===T?p.count:l,onChange:O,disabled:"count"!==T}),f.createElement(f.Fragment,{key:"separator-2"}," "),f.createElement(g.Label,{key:"endrule-after-label",className:"k-radio-label",editorId:"k-endrule-after"},u(Mt,!0))]},{value:"until",label:u(Lt,!0),children:[f.createElement(f.Fragment,{key:"separator"}," "),f.createElement(c.DatePicker,{key:"k-endrule-until-editor",id:"k-endrule-until",disabled:"until"!==T,min:e.start,value:"until"===T?x:a.toLocalDate(i),onChange:F,width:"auto"})]}]})))))},ta=e=>f.createElement("li",{...e},e.children),ra={value:""};ea.displayName="KendoReactSchedulerRepeatEditor";const aa=e=>{const{as:t=oa.as,value:r,onChange:a,...n}=e,{timezone:l}=ae(),o=f.useMemo(()=>na(r,l),[r,l]);return f.createElement(t,{...n,value:o,onChange:e=>{a&&a({value:la(e.target.value,l)})}})},na=(e,t)=>{if(e){if(!t)return e;const r=a.toLocalDate(a.ZonedDate.fromLocalDate(e,t).toUTCDate());return r.setUTCFullYear(e.getFullYear()),r}return e},la=(e,t)=>{if(e){if(!t)return e;const r=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()));return r.setUTCFullYear(e.getFullYear()),a.ZonedDate.fromUTCDate(r,t).toLocalDate()}return e},oa={as:c.DateTimePicker},sa=f.forwardRef((e,t)=>{const r=f.useRef(null),l=f.useRef(null),s=a.timezoneNames(),i=o.useLocalization(),d=se(),{resources:u,timezone:p}=ae();f.useImperativeHandle(l,()=>{var t;return{element:null!=(t=r.current)&&t.element?r.current.element:r.current,props:e}}),f.useImperativeHandle(t,()=>l.current);const{as:E=ca.as,...h}=e,{titleLabel:v=ca.titleLabel,titleError:y=ca.titleError,titleEditor:D=ca.titleEditor,startLabel:k=ca.startLabel,startError:S=ca.startError,startEditor:C=ca.startEditor,startTimezoneLabel:b=ca.startTimezoneLabel,startTimezoneError:I=ca.startTimezoneError,startTimezoneEditor:w=ca.startTimezoneEditor,startTimezoneCheckedLabel:T=ca.startTimezoneCheckedLabel,startTimezoneCheckedEditor:R=ca.startTimezoneCheckedEditor,endLabel:x=ca.endLabel,endError:A=ca.endError,endEditor:_=ca.endEditor,endTimezoneLabel:M=ca.endTimezoneLabel,endTimezoneError:N=ca.endTimezoneError,endTimezoneEditor:z=ca.endTimezoneEditor,endTimezoneCheckedLabel:L=ca.endTimezoneCheckedLabel,endTimezoneCheckedEditor:O=ca.endTimezoneCheckedEditor,allDayLabel:F=ca.allDayLabel,allDayEditor:P=ca.allDayEditor,recurrenceEditor:H=ca.recurrenceEditor,descriptionLabel:W=ca.descriptionLabel,descriptionEditor:K=ca.descriptionEditor,descriptionError:V=ca.descriptionError,resourceLabel:G=ca.resourceLabel,resourceEditor:B=ca.resourceEditor}=e,$=e.valueGetter(d.start)||new Date,U=e.valueGetter(d.startTimezone)||p||"",Z=e.valueGetter(d.endTimezone)||p||"",q=f.useMemo(()=>i.toLanguageString(Ut,Xt[Ut]),[i]),[Y,j]=f.useState(!!e.valueGetter(d.startTimezone)),[X,Q]=f.useState(!!e.valueGetter(d.endTimezone)),J=f.useCallback(t=>{t.value||(e.onChange(d.startTimezone,{value:null}),e.onChange(d.endTimezone,{value:null}),Q(t.value)),j(t.value)},[e.onChange,d.startTimezone,d.endTimezone]),ee=f.useCallback(t=>{t.value||e.onChange(d.endTimezone,{value:null}),Q(t.value)},[e.onChange]),te=f.useCallback(e=>e?void 0:q,[q]),re=f.useCallback((e,t)=>Y?te(t(d.startTimezone)):void 0,[te,Y,d.startTimezone]),ne=f.useCallback((e,t)=>Y&&X?te(t(d.endTimezone))||te(t(d.startTimezone)):void 0,[te,Y,X,d.startTimezone,d.endTimezone]),le=f.useMemo(()=>n.classNames("k-scheduler-edit-form",e.className),[e.className]);return f.createElement(E,{ref:E===ca.as?r:void 0,...h,className:le},f.createElement(f.Fragment,null,f.createElement(m.FieldWrapper,null,f.createElement(m.Field,{name:d.title,component:v,editorId:"k-scheduler-editor-title",className:"k-form-label"},i.toLanguageString(Ye,Xt[Ye])),f.createElement("div",{className:"k-form-field-wrap"},f.createElement(m.Field,{id:"k-scheduler-editor-title",name:d.title,field:d.title,component:D}),e.errors[d.title]&&f.createElement(m.Field,{name:d.title,component:y},e.errors[d.title]))),f.createElement(m.FieldWrapper,null,f.createElement(m.Field,{name:d.start,component:k,editorId:"k-scheduler-editor-start",className:"k-form-label"},i.toLanguageString(je,Xt[je])),f.createElement("div",{className:"k-form-field-wrap"},f.createElement(m.Field,{id:"k-scheduler-editor-start",name:d.start,width:"auto",component:C,as:e.valueGetter(d.isAllDay)?c.DatePicker:c.DateTimePicker,timezone:p}),e.errors[d.start]&&f.createElement(m.Field,{name:d.start,component:S},e.errors[d.start]))),f.createElement(m.FieldWrapper,null,f.createElement(T,{className:"k-form-label"}),f.createElement("div",{className:"k-form-field-wrap"},f.createElement(R,{id:"k-scheduler-editor-set-start-timezone",onChange:J,value:Y}),f.createElement(T,{className:"k-checkbox-label",editorId:"k-scheduler-editor-set-start-timezone"},i.toLanguageString(at,Xt[at])))),Y&&f.createElement(m.FieldWrapper,null,f.createElement(m.Field,{name:d.start,component:b,className:"k-form-label"},i.toLanguageString(Xe,Xt[Xe])),f.createElement("div",{className:"k-form-field-wrap"},f.createElement(m.Field,{component:w,value:U,validator:re,data:s,name:d.startTimezone}),e.errors[d.startTimezone]&&f.createElement(m.Field,{name:d.startTimezone,component:I},e.errors[d.startTimezone]))),f.createElement(m.FieldWrapper,null,f.createElement(m.Field,{name:d.end,component:x,editorId:"k-scheduler-editor-end",className:"k-form-label"},i.toLanguageString(Qe,Xt[Qe])),f.createElement("div",{className:"k-form-field-wrap"},f.createElement(m.Field,{id:"k-scheduler-editor-end",name:d.end,width:"auto",component:_,as:e.valueGetter(d.isAllDay)?c.DatePicker:c.DateTimePicker,timezone:p}),e.errors[d.end]&&f.createElement(m.Field,{name:d.end,component:A},e.errors[d.end]))),Y&&f.createElement(m.FieldWrapper,null,f.createElement("div",{className:"k-form-field-wrap"},f.createElement(O,{id:"k-scheduler-editor-set-end-timezone",onChange:ee,value:X})),f.createElement(L,{editorId:"k-scheduler-editor-set-end-timezone",className:"k-form-label"},i.toLanguageString(rt,Xt[rt]))),X&&f.createElement(m.FieldWrapper,null,f.createElement(m.Field,{name:d.endTimezone,component:M,className:"k-form-label"},i.toLanguageString(Je,Xt[Je])),f.createElement("div",{className:"k-form-field-wrap"},f.createElement(m.Field,{value:Z,data:s,validator:ne,component:z,name:d.endTimezone}),e.errors[d.endTimezone]&&f.createElement(m.Field,{name:d.endTimezone,component:N},e.errors[d.endTimezone]))),f.createElement(m.FieldWrapper,null,f.createElement(m.Field,{name:d.isAllDay,component:g.Label,className:"k-form-label"}),f.createElement("div",{className:"k-form-field-wrap"},f.createElement(m.Field,{id:"k-is-allday-checkbox",name:d.isAllDay,component:P}),f.createElement(m.Field,{name:d.isAllDay,field:d.isAllDay,editorId:"k-is-allday-checkbox",className:"k-checkbox-label",component:F},i.toLanguageString(et,Xt[et])))),f.createElement("div",{className:"k-recurrence-editor"},f.createElement(m.Field,{component:H,field:d.recurrenceRule,name:d.recurrenceRule,start:$})),f.createElement(m.FieldWrapper,null,f.createElement(m.Field,{name:d.description,component:W,className:"k-form-label"},i.toLanguageString(tt,Xt[tt])),f.createElement("div",{className:"k-form-field-wrap"},f.createElement(m.Field,{component:K,name:d.description,rows:1,id:"k-event-description"}),e.errors[d.description]&&f.createElement(m.Field,{name:d.description,component:V},e.errors[d.description]))),(u||[]).map(e=>f.createElement(m.FieldWrapper,{key:e.field},f.createElement(m.Field,{name:e.field,component:G,className:"k-form-label"}),f.createElement(g.Label,{className:"k-form-label"},e.name),f.createElement(m.Field,{name:e.field,component:B,resource:e,multiple:e.multiple,data:e.data,textField:e.textField,valueField:e.valueField,colorField:e.colorField})))))}),ca={as:f.forwardRef((e,t)=>f.createElement(m.FormElement,{ref:t,id:e.id,style:e.style,tabIndex:e.tabIndex,className:e.className,horizontal:e.horizontal,children:e.children})),titleLabel:g.Label,titleError:g.Error,titleEditor:E.Input,startLabel:g.Label,startError:g.Error,startEditor:aa,startTimezoneLabel:g.Label,startTimezoneError:g.Error,startTimezoneEditor:Gr,startTimezoneCheckedLabel:g.Label,startTimezoneCheckedEditor:E.Checkbox,endLabel:g.Label,endError:g.Error,endEditor:aa,endTimezoneLabel:g.Label,endTimezoneError:g.Error,endTimezoneEditor:Gr,endTimezoneCheckedLabel:g.Label,endTimezoneCheckedEditor:E.Checkbox,allDayLabel:g.Label,allDayEditor:E.Checkbox,recurrenceEditor:ea,descriptionLabel:g.Label,descriptionEditor:E.TextArea,descriptionError:g.Error,resourceLabel:g.Label,resourceEditor:e=>{const t=e.multiple?h.MultiSelect:h.DropDownList,r=f.useCallback(t=>{const r=t.target.props.dataItemKey,a=e.multiple?(t.target.value||[]).map(e=>e[r]):t.target.value[r];e.onChange.call(void 0,{value:a})},[e.multiple,e.onChange]),a=f.useCallback((t,r)=>{const a=f.createElement(f.Fragment,null,e.colorField&&f.createElement("span",{key:1,className:"k-scheduler-mark",style:{backgroundColor:r.dataItem[e.colorField],marginRight:N(r.dataItem[e.valueField])?"8px":"4px"}}," "),f.createElement("span",{key:2},"  ",t.props.children));return f.cloneElement(t,{...t.props},a)},[e.colorField,e.valueField]),n=f.useCallback((t,r)=>{const a=f.createElement(f.Fragment,null,e.colorField&&r&&f.createElement("span",{key:1,className:"k-scheduler-mark",style:{backgroundColor:r[e.colorField],marginRight:r[e.valueField]?"8px":"4px"}}," "),t.props.children);return f.cloneElement(t,{},a)},[e.colorField,e.valueField]),l=Array.isArray(e.value)?e.data.filter(t=>e.value.some(r=>t[e.valueField]===r)):e.data.find(t=>t[e.valueField]===e.value);return f.createElement(t,{value:l,onChange:r,data:e.data,textField:e.textField,dataItemKey:e.valueField,valid:e.valid,validationMessage:e.validationMessage,itemRender:a,valueRender:n})}};sa.displayName="KendoReactSchedulerFormEditor";const ia=f.forwardRef((e,t)=>{const{onCancel:r,onClose:a,onSubmit:l,editor:c,dialog:i=da.dialog,validator:u=da.validator,...g}=e,E=f.useRef(null);f.useImperativeHandle(E,()=>({props:e})),f.useImperativeHandle(t,()=>E.current);const h=o.useLocalization(),v=se(),y=f.useMemo(()=>h.toLanguageString(Ut,Xt[Ut]),[h]),k=f.useMemo(()=>h.toLanguageString(qt,Xt[qt]),[h]),S=f.useMemo(()=>h.toLanguageString(Ue,Xt[Ue]),[h]),C=f.useMemo(()=>h.toLanguageString(Ze,Xt[Ze]),[h]),b=f.useMemo(()=>h.toLanguageString(qe,Xt[qe]),[h]),I=f.useMemo(()=>h.toLanguageString(Zt,Xt[Zt]),[h]),w=f.useCallback(e=>{r&&r.call(void 0,{value:null,syntheticEvent:e,target:E.current})},[r]),T=f.useCallback(({syntheticEvent:e})=>{a&&a.call(void 0,{value:null,syntheticEvent:e,target:E.current})},[a]),R=f.useCallback((e,t)=>{l&&l.call(void 0,{value:e,syntheticEvent:t,target:E.current})},[l]),x=f.useCallback((e,t)=>e&&t(v.end)&&e.getTime()>t(v.end).getTime()?I:void 0,[v,I]),A=f.useCallback((e,t)=>e&&t(v.start)&&e.getTime()<t(v.start).getTime()?k:void 0,[v,k]),_=f.useCallback(e=>e?void 0:y,[y]),M=f.useCallback((e,t)=>{const r={};r[v.start]=[_(t(v.start)),x(t(v.start),t)].filter(Boolean).reduce((e,t)=>e||t,""),r[v.end]=[_(t(v.start)),A(t(v.start),t)].filter(Boolean).reduce((e,t)=>e||t,"");const a=u(e,t);return{...r,...a}},[A,v.end,v.start,_,x,u]);return n.canUseDOM?D.createPortal(f.createElement(m.Form,{initialValues:e.dataItem,onSubmit:R,validator:M,render:e=>f.createElement(i,{title:b,minWidth:400,onClose:T,className:"k-scheduler-edit-dialog"},f.createElement(sa,{...e,as:c}),f.createElement(p.DialogActionsBar,{layout:"start"},f.createElement(s.Button,{themeColor:"primary",disabled:!e.allowSubmit,onClick:e.onSubmit,icon:"save",svgIcon:d.saveIcon},S),f.createElement(s.Button,{onClick:w,icon:"cancel",svgIcon:d.cancelIcon},C))),...g}),document&&document.body):null}),da={dialog:p.Dialog,validator:()=>({})};ia.displayName="KendoReactSchedulerForm";const ua=f.forwardRef((e,t)=>{const{onFocus:r,onBlur:a,onClick:l,onMouseEnter:o,onMouseLeave:s,onMouseOut:c,onMouseOver:i,onDoubleClick:d,onKeyDown:u,onKeyPress:m,onKeyUp:p}=e,{slot:g,element:E}=((e,t)=>{const{_ref:r}=e,a=f.useRef(null),l=f.useRef(null),[,o]=lr();return f.useImperativeHandle(a,()=>({element:l.current,props:e})),f.useImperativeHandle(t,()=>a.current),f.useImperativeHandle(r,()=>a.current),f.useLayoutEffect(()=>(o({type:n.COLLECTION_ACTION.add,item:a}),()=>{o({type:n.COLLECTION_ACTION.remove,item:a})})),{slot:a,element:l}})(e,t),h=void 0!==e.tabIndex?null===e.tabIndex?void 0:e.tabIndex:e.selected?0:-1,v=f.useMemo(()=>{var t,r;const a=null!=(t=e.isWorkHour)?t:ma.isWorkHour,l=null!=(r=e.isWorkDay)?r:ma.isWorkDay;return n.classNames("k-scheduler-cell",e.className,"k-slot-cell",{"k-nonwork-hour":!a||!l,"k-selected":e.selected})},[e.className,e.selected,e.isWorkHour,e.isWorkDay]),y=f.useMemo(()=>({userSelect:"none",...e.style}),[e.style]),D=f.useCallback(e=>{r&&r.call(void 0,{syntheticEvent:e,target:g.current})},[r,g]),k=f.useCallback(e=>{a&&a.call(void 0,{syntheticEvent:e,target:g.current})},[a,g]),S=f.useCallback(e=>{l&&l.call(void 0,{syntheticEvent:e,target:g.current})},[l,g]),C=f.useCallback(e=>{i&&i.call(void 0,{syntheticEvent:e,target:g.current})},[i,g]),b=f.useCallback(e=>{c&&c.call(void 0,{syntheticEvent:e,target:g.current})},[c,g]),I=f.useCallback(e=>{o&&o.call(void 0,{syntheticEvent:e,target:g.current})},[o,g]),w=f.useCallback(e=>{s&&s.call(void 0,{syntheticEvent:e,target:g.current})},[s,g]),T=f.useCallback(e=>{d&&d.call(void 0,{syntheticEvent:e,target:g.current})},[d,g]),R=f.useCallback(e=>{u&&u.call(void 0,{syntheticEvent:e,target:g.current})},[u,g]),x=f.useCallback(e=>{m&&m.call(void 0,{syntheticEvent:e,target:g.current})},[m,g]),A=f.useCallback(e=>{p&&p.call(void 0,{syntheticEvent:e,target:g.current})},[p,g]);return f.createElement("div",{ref:E,id:e.id,style:y,className:v,tabIndex:h,"aria-selected":e.selected||void 0,onFocus:D,onBlur:k,onClick:S,onMouseEnter:I,onMouseLeave:w,onMouseOver:C,onMouseOut:b,onDoubleClick:T,onKeyDown:R,onKeyPress:x,onKeyUp:A,"data-slot":!0,"data-slot-allday":e.isAllDay,"data-slot-start":e.start.getTime(),"data-slot-end":e.end.getTime(),"data-slot-group":e.group.index,"data-slot-range":e.range.index,"data-slot-index":e.index},e.children)}),ma={isWorkHour:!0,isWorkDay:!0};ua.displayName="KendoReactSchedulerSlot";const pa=f.forwardRef((e,t)=>{var r;const{slot:a,_ref:l,...o}=e,s=a||ga.slot,c=f.useRef(null),i=f.useRef(null);return f.useImperativeHandle(c,()=>({props:e})),f.useImperativeHandle(l,()=>i.current),f.useImperativeHandle(t,()=>c.current),((e,t)=>{const r=f.useRef(void 0),a=f.useRef(0),l=te(),o=f.useCallback(()=>{if(!t||!e.current)return;const r=e.current.element,n=e.current.props;if(!r)return;const l=I(r),o=new Map,s=n.items.filter(e=>e._ref.current);s.forEach(e=>{var t,r,a,n;if(!e._ref.current)return;const{height:l}=b(e._ref.current.element),s=null!=(a=null!=(r=e.order)?r:null==(t=e._ref.current)?void 0:t._order)?a:-1;(null!=(n=o.get(s))?n:0)<l&&o.set(s,l)});const c=Array.from(o.values()).reduce((e,t)=>e+t,0),i=1*s.length*2+c-(l||0)+("object"==typeof t&&t.offsetTop?t.offsetTop:0)+("object"==typeof t&&t.offsetBottom?t.offsetBottom:0);s.length?i>a.current-l&&w(r,{height:i},!0):r&&(r.style.minHeight="")},[t,e]),s=f.useCallback(()=>{void 0!==r.current&&window.cancelAnimationFrame(r.current),r.current=window.requestAnimationFrame(()=>{o()})},[o]);n.useIsomorphicLayoutEffect(()=>{if(!e.current)return;const t=e.current.element;t&&(a.current=t.clientHeight)},[]),f.useEffect(o,[e,e.current&&e.current.props,t]),f.useEffect(()=>{if(!e.current)return;const t=e.current.props.items.filter(e=>e._ref.current).map(e=>{if(!e._ref.current||!e._ref.current.element||!l.current)return;const t=window.ResizeObserver,r=t&&new t(s);return r&&r.observe(e._ref.current.element),()=>{r&&r.disconnect()}});return()=>{t.forEach(e=>e&&e())}},[s,l,e])})(i,null!=(r=e.expandable)?r:ga.expandable),f.createElement(s,{...o,_ref:i})}),ga={slot:ua,expandable:!1};pa.displayName="KendoReactSchedulerViewSlot";const Ea=f.createContext([null]);Ea.displayName="SchedulerEditSlotPropsContext";const ha=f.createContext([null]);ha.displayName="SchedulerEditSlotFormItemContext";const va=({props:e,form:t,children:r})=>f.createElement(Ea.Provider,{value:e},f.createElement(ha.Provider,{value:t},r)),ya=e=>{const t=f.useContext(re),r=void 0!==e?e:t.editable||!1,a=!0===r||void 0!==r&&!1!==r&&!0===r.edit,n=!0===r||void 0!==r&&!1!==r&&!0===r.resize,l=!0===r||void 0!==r&&!1!==r&&!0===r.remove,o=!0===r||void 0!==r&&!1!==r&&!0===r.drag;return{add:!0===r||void 0!==r&&!1!==r&&!0===r.add,edit:a,drag:o,remove:l,resize:n,select:!0===r||void 0!==r&&!1!==r&&!0===r.select}},fa=f.forwardRef((e,t)=>{const{_ref:r,onDataAction:a,viewSlot:l,form:o,formItem:s,onFormItemChange:c,...i}=e,[d,u]=f.useState(e.tabIndex),m=f.useRef(null),p=f.useRef(null);f.useImperativeHandle(p,()=>({props:e})),f.useImperativeHandle(t,()=>p.current),f.useImperativeHandle(r,()=>m.current);const g=ya(e.editable),E=se(),[h]=lr(),[v]=sr(),[y,D]=f.useContext(cr),[,k]=pr(),S=o||Da.form,C=l||Da.viewSlot,[b,I]=Ce(null,s,e.onFormItemChange),w=y.some(t=>!(!t.current||t.current.props.start.getTime()!==e.start.getTime()||t.current.props.end.getTime()!==e.end.getTime()||t.current.props.index!==e.index||t.current.props.group.index!==e.group.index||t.current.props.range.index!==e.range.index||t.current.props.isAllDay!==e.isAllDay)),T=f.useCallback(()=>{const t={};if(M(t,E.start,new Date(e.start.getTime())),M(t,E.end,new Date(e.end.getTime())),M(t,E.isAllDay,e.isAllDay),e.group.resources.length)for(let r=0;r<e.group.resources.length;r++){const a=e.group.resources[r];if(x(e.group.resources)){const n=_(e.group.resources[r],a.valueField);M(t,a.field,a.multiple?[n]:n)}else M(t,a.field,a.multiple?[]:void 0)}return t},[E.start,E.end,E.isAllDay,e.start,e.end,e.isAllDay,e.group.resources]),R=f.useCallback(t=>{g.select&&D({type:hr.select,slot:m},t.syntheticEvent),e.onFocus&&e.onFocus.call(void 0,t)},[D,g.select,e.onFocus]),A=f.useCallback(t=>{if(g.add){const e=T();I(e,t)}e.onDoubleClick&&e.onDoubleClick.call(void 0,t)},[T,g.add,e.onDoubleClick,I]),N=f.useCallback(e=>{let t;switch(e.syntheticEvent.keyCode){case n.Keys.left:if(!h)return;e.syntheticEvent.preventDefault(),k({type:yr.left,slot:m},e.syntheticEvent);break;case n.Keys.right:if(!h)return;e.syntheticEvent.preventDefault(),k({type:yr.right,slot:m},e.syntheticEvent);break;case n.Keys.up:if(!h)return;e.syntheticEvent.preventDefault(),k({type:yr.up,slot:m},e.syntheticEvent);break;case n.Keys.down:if(!h)return;e.syntheticEvent.preventDefault(),k({type:yr.down,slot:m},e.syntheticEvent);break;case n.Keys.enter:{if(!h||!g.add)return;const e=T();I(e);break}case n.Keys.tab:t=(e=>{const t=e.props.items.find(e=>0===e.order)||e.props.items[0];return t&&t._ref.current})(e.target)}t&&(e.syntheticEvent.preventDefault(),t.element&&t.element.focus())},[T,k,g.add,I,h]),z=f.useCallback(e=>{a&&a.call(void 0,{type:J.create,series:!1,dataItem:e.value},e),I(null,e.syntheticEvent)},[a,I]),L=f.useCallback(e=>{I(null,e.syntheticEvent)},[I]),O=f.useCallback(e=>{I(null,e)},[I]),F=f.useCallback((e,t)=>{I&&I(e,t)},[I]);return f.useEffect(()=>{const t=h.length&&h[0].current===m.current;u(void 0!==e.tabIndex?null===e.tabIndex?void 0:e.tabIndex:0===y.length&&t&&0===v.length?0:void 0)},[v,e.tabIndex,y.length,h]),f.createElement(va,{props:e,form:[b,F]},f.createElement(C,{...i,_ref:m,selected:w,tabIndex:d,onFocus:R,onDoubleClick:A,onKeyDown:N}),b&&f.createElement(S,{dataItem:b,onSubmit:z,onClose:O,onCancel:L}))}),Da={viewSlot:pa,form:ia};fa.displayName="KendoReactSchedulerEditSlot";const ka=f.forwardRef((e,t)=>{const{isRemove:r,onClose:a,onSeriesClick:l,onOccurrenceClick:c}=e,i=f.useRef(null);f.useImperativeHandle(i,()=>({props:e})),f.useImperativeHandle(t,()=>i.current);const d=o.useLocalization(),u=e=>d.toLanguageString(e,Xt[e]),m=u(Ve),g=u(Ge),E=u(Be),h=u($e),v=u(Ht),y=u(Wt),k=u(Vt),S=u(Pt),C=r?k:h,b=r?S:E,I=r?v:m,w=r?y:g,T=f.useCallback(({syntheticEvent:e})=>{a&&a.call(void 0,{syntheticEvent:e,value:null,target:i.current})},[a]),R=f.useCallback(e=>{l&&l.call(void 0,{syntheticEvent:e,value:null,target:i.current})},[l]),x=f.useCallback(e=>{c&&c.call(void 0,{syntheticEvent:e,value:null,target:i.current})},[c]);return n.canUseDOM?D.createPortal(f.createElement(p.Dialog,{title:C,onClose:T},b,f.createElement(p.DialogActionsBar,null,f.createElement(s.Button,{onClick:x},I),f.createElement(s.Button,{onClick:R},w))),document&&document.body):null});ka.displayName="KendoReactSchedulerSchedulerOccurrenceDialog";const Sa=f.forwardRef((e,t)=>{const{onClose:r,onCancel:a,onConfirm:l}=e,c=f.useRef(null);f.useImperativeHandle(c,()=>({props:e})),f.useImperativeHandle(t,()=>c.current);const i=o.useLocalization(),d=i.toLanguageString(Ze,Xt[Ze]),u=i.toLanguageString(Ot,Xt[Ot]),m=i.toLanguageString(Ft,Xt[Ft]),g=i.toLanguageString(Kt,Xt[Kt]),E=f.useCallback(({syntheticEvent:e})=>{if(!r)return;const t={syntheticEvent:e,value:null,target:c.current};r.call(void 0,t)},[r]),h=f.useCallback(e=>{a&&a.call(void 0,{syntheticEvent:e,value:null})},[a]),v=f.useCallback(e=>{l&&l.call(void 0,{syntheticEvent:e,value:null})},[l]);return n.canUseDOM?D.createPortal(f.createElement(p.Dialog,{title:g,onClose:E},m,f.createElement(p.DialogActionsBar,null,f.createElement(s.Button,{onClick:h},d),f.createElement(s.Button,{onClick:v},u))),document&&document.body):null});Sa.displayName="KendoReactSchedulerRemoveDialog";const Ca=f.forwardRef((e,t)=>{const{onFocus:r,onBlur:a,onMouseDown:l,onClick:s,onMouseUp:c,onMouseOut:i,onMouseOver:u,onMouseEnter:m,onMouseLeave:p,onDoubleClick:g,onRemoveClick:E,onKeyUp:h,onKeyDown:v,onKeyPress:y,onPress:D,onDrag:k,onRelease:S,onResizePress:C,onResizeEndDrag:b,onResizeRelease:I,onResizeStartDrag:w}=e,{item:T,element:R}=((e,t)=>{const{_ref:r,itemRef:a,_maxSiblingsPerSlot:l,_siblings:o,_order:s}=e,c=f.useRef(null),i=f.useRef(null),[,d]=sr();return f.useImperativeHandle(c,()=>({element:i.current,props:e,get _maxSiblingsPerSlot(){return null==l?void 0:l.current},set _maxSiblingsPerSlot(e){var t;null!=e&&void 0!==l&&void 0!==l.current&&(l.current=e,null==(t=null==o?void 0:o.current)||t.forEach(t=>{var r;!t||t._maxSiblingsPerSlot===e||e<(null!=(r=t._maxSiblingsPerSlot)?r:0)||(t._maxSiblingsPerSlot=e)}))},get _order(){return null==s?void 0:s.current},set _order(e){void 0!==e&&void 0!==s&&void 0!==s.current&&(s.current=e)}})),f.useImperativeHandle(t,()=>c.current),f.useImperativeHandle(r,()=>c.current),f.useImperativeHandle(a,()=>c.current),n.useIsomorphicLayoutEffect(()=>(d({type:n.COLLECTION_ACTION.add,item:c}),()=>{d({type:n.COLLECTION_ACTION.remove,item:c})})),{item:c,element:i}})(e,t),x=n.useDir(R),A=f.useRef(null),_=f.useRef(null),M=f.useRef(null),N=f.useRef(null),z=ya(e.editable),L=o.useInternationalization(),O=o.useLocalization(),F=O.toLanguageString(Fe,Xt[Fe]),P=O.toLanguageString(xe,Xt[xe]),H=e.group.resources.find(e=>!(!e.colorField||""===e[e.colorField]||void 0===e[e.colorField])),W=H&&H.colorField&&H[H.colorField],K=void 0!==e.tabIndex?null===e.tabIndex?void 0:e.tabIndex:e.selected?0:-1,V=f.useMemo(()=>n.classNames({"k-event":!e.resizeHint,"k-selected":e.selected&&z.select,"k-event-drag-hint":e.dragHint,"k-scheduler-marquee":e.resizeHint,"k-marquee":e.resizeHint,"k-first":e.resizeHint&&!e.tail,"k-last":e.resizeHint&&!e.head},e.className),[e.resizeHint,e.selected,e.dragHint,e.tail,e.head,e.className,z.select]),G=f.useMemo(()=>`${e.title}, ${function(e,t,r,a,n="all day"){const l={skeleton:"yMMMMEEEEdhm"},o={skeleton:"yMMMMEEEEd"},s=t.getFullYear()===r.getFullYear()&&t.getMonth()===r.getMonth()&&t.getDate()===r.getDate();if(a){const a=0===r.getHours()&&0===r.getMinutes()&&0===r.getSeconds()&&r.getTime()-t.getTime()===864e5;return s||a?`${e.formatDate(t,o)} (${n})`:`${e.formatDate(t,o)} to ${e.formatDate(r,o)} (${n})`}return s?`${e.formatDate(t,l)}–${e.formatDate(r,"t")}`:`${e.formatDate(t,l)}-${e.formatDate(r,l)}`}(L,e.zonedStart,e.zonedEnd,e.isAllDay,P)}`,[L,e.isAllDay,e.title,e.zonedEnd,e.zonedStart,P]),B=f.useMemo(()=>({cursor:"pointer",userSelect:"none",borderColor:e.resizeHint?void 0:W,backgroundColor:e.resizeHint?void 0:W,touchAction:"none",...e.style}),[W,e.style,e.resizeHint]),$=f.useCallback(e=>{r&&r.call(void 0,{syntheticEvent:e,target:T.current})},[r,T]),U=f.useCallback(e=>{a&&a.call(void 0,{syntheticEvent:e,target:T.current})},[a,T]),Z=f.useCallback(e=>{l&&l.call(void 0,{syntheticEvent:e,target:T.current})},[l,T]),q=f.useCallback(e=>{s&&s.call(void 0,{syntheticEvent:e,target:T.current})},[s,T]),Y=f.useCallback(e=>{c&&c.call(void 0,{syntheticEvent:e,target:T.current})},[c,T]),j=f.useCallback(e=>{u&&u.call(void 0,{syntheticEvent:e,target:T.current})},[u,T]),X=f.useCallback(e=>{i&&i.call(void 0,{syntheticEvent:e,target:T.current})},[i,T]),Q=f.useCallback(e=>{m&&m.call(void 0,{syntheticEvent:e,target:T.current})},[m,T]),J=f.useCallback(e=>{p&&p.call(void 0,{syntheticEvent:e,target:T.current})},[p,T]),ee=f.useCallback(e=>{g&&g.call(void 0,{syntheticEvent:e,target:T.current})},[g,T]),te=f.useCallback(e=>{E&&E.call(void 0,{syntheticEvent:e,target:T.current})},[E,T]),re=f.useCallback(e=>{v&&v.call(void 0,{syntheticEvent:e,target:T.current})},[v,T]),ae=f.useCallback(e=>{y&&y.call(void 0,{syntheticEvent:e,target:T.current})},[y,T]),ne=f.useCallback(e=>{h&&h.call(void 0,{syntheticEvent:e,target:T.current})},[h,T]),le=f.useCallback(e=>{D&&D.call(void 0,{dragEvent:e,target:T.current})},[D,T]),oe=f.useCallback(e=>{k&&k.call(void 0,{dragEvent:e,target:T.current})},[k,T]),se=f.useCallback(e=>{S&&S.call(void 0,{dragEvent:e,target:T.current})},[S,T]),ce=f.useCallback(e=>{C&&C.call(void 0,{dragEvent:e,target:T.current})},[C,T]),ie=f.useCallback(e=>{w&&w.call(void 0,{dragEvent:e,target:T.current})},[w,T]),de=f.useCallback(e=>{b&&b.call(void 0,{dragEvent:e,target:T.current})},[b,T]),ue=f.useCallback(e=>{I&&I.call(void 0,{dragEvent:e,target:T.current})},[I,T]);return n.useDraggable(R,{onPress:le,onDrag:oe,onRelease:se}),n.useDraggable(A,{onPress:ce,onDrag:de,onRelease:ue}),n.useDraggable(_,{onPress:ce,onDrag:ie,onRelease:ue}),n.useDraggable(M,{onPress:ce,onDrag:ie,onRelease:ue}),n.useDraggable(N,{onPress:ce,onDrag:de,onRelease:ue}),f.createElement("div",{ref:R,id:e.id,style:B,tabIndex:K,className:V,role:"button","aria-label":G,onFocus:$,onBlur:U,onMouseUp:Y,onMouseDown:Z,onClick:q,onMouseOver:j,onMouseOut:X,onMouseEnter:Q,onMouseLeave:J,onDoubleClick:ee,onKeyDown:re,onKeyPress:ae,onKeyUp:ne,"data-group-index":e.group.index,"data-range-index":e.range.index},e.children,!e.resizeHint&&f.createElement("span",{className:"k-event-actions"},z.remove&&f.createElement("a",{tabIndex:-1,"aria-hidden":"true",className:"k-link k-event-delete",title:F,"aria-label":F,onClick:te},f.createElement(n.IconWrap,{name:"x",icon:d.xIcon})),e.head&&f.createElement(n.IconWrap,{name:"rtl"===x?"chevron-left":"chevron-right",icon:"rtl"===x?d.chevronLeftIcon:d.chevronRightIcon})),z.resize&&e.vertical&&f.createElement(f.Fragment,null,f.createElement("span",{className:"k-resize-handle k-resize-n",ref:M}),f.createElement("span",{className:"k-resize-handle k-resize-s",ref:N})),z.resize&&!e.vertical&&f.createElement(f.Fragment,null,f.createElement("span",{className:"k-resize-handle k-resize-w",ref:_}),f.createElement("span",{className:"k-resize-handle k-resize-e",ref:A})),e.resizeHint&&f.createElement(f.Fragment,null,f.createElement("div",{className:"k-marquee-color",style:{borderColor:W,backgroundColor:W}}),f.createElement("div",{className:"k-marquee-text"},!e.tail&&f.createElement("div",{className:"k-label-top"},L.formatDate(e.zonedStart,e.format)),!e.head&&f.createElement("div",{className:"k-label-bottom"},L.formatDate(e.zonedEnd,e.format)))))});Ca.displayName="KendoReactSchedulerItem";const ba=f.forwardRef((e,t)=>{const r=f.useMemo(()=>n.classNames("k-event-template",e.className),[e.className]);return f.createElement("div",{ref:t,...e,className:r})}),Ia=(e,t)=>{const{element:r}=e;f.useEffect(()=>{if(!r||!e.syncHeight)return;const t=[[]];Array.from(r.querySelectorAll(e.selector)).filter(t=>!t.classList.contains((e=>e.slice(1,e.length))(e.applyTo))).forEach(r=>{const a=r.clientHeight,n=r.getAttribute(e.horizontalAttribute),l=r.getAttribute(e.verticalAttribute);null===n||null===l||(t[n]||(t[n]=[]),(!t[n][l]||a>t[n][l])&&(t[n][l]=a-1))}),Array.from(r.querySelectorAll(e.applyTo)).forEach(r=>{const a=r.getAttribute(e.horizontalAttribute),n=r.getAttribute(e.verticalAttribute);if(null===a||null===n)return;const l=I(r),o=Math.round(t[a][n]-l);w(r,{height:o},!0)})},t)},wa=f.forwardRef((e,t)=>{const{item:r,_ref:a,itemRef:l,...s}=e,c=f.useRef(void 0),i=f.useRef(null),u=f.useRef(null),m=f.useRef(null),p=ya(e.editable);f.useImperativeHandle(u,()=>({props:e,element:i.current&&i.current.element})),f.useImperativeHandle(t,()=>u.current),f.useImperativeHandle(a,()=>i.current),f.useImperativeHandle(l,()=>i.current);const g=r||Ta.item,E=o.useInternationalization(),[h]=sr(),[v]=lr(),y=te(),[D,k]=f.useState(!0),[S,C]=f.useState(!1),I=f.useRef(e.order),R=f.useRef(0),x=n.useDir(y),A=f.useMemo(()=>{var t,r;return e.isAllDay?null!=(t=e.title)?t:"":`(${E.format("{0:t} - {1:t}",e.zonedStart,e.zonedEnd)}): ${null!=(r=e.title)?r:""}`},[E,e.isAllDay,e.title,e.zonedEnd,e.zonedStart]),_=(e,t)=>{let r=1;return e.forEach(e=>{const a=t.filter(t=>M(e.current.props,t.props));a.length>r&&(r=a.length)}),r},M=(t,r)=>H(t.start,t.end,r.start,r.end)&&t.group.index===r.group.index&&t.range.index===r.range.index&&(void 0===t.range.isAllDay||void 0===r.range.isAllDay||t.range.isAllDay===r.range.isAllDay)&&(e.ignoreIsAllDay||t.isAllDay===r.isAllDay),N=()=>{var t,r,a,n;const l=(v||[]).filter(t=>t.current&&M(t.current.props,e)),o=i.current&&i.current.element,s=T(l);if(0===l.length)return void k(!1);if(!s.current||!o)return;const c=b(s.current.element),d=[],u=[],m=[];(h||[]).forEach(e=>{e.current&&(e.current.props.dragHint?u.push(e.current):e.current.props.resizeHint?m.push(e.current):d.push(e.current))});const g=e.dragHint||e.resizeHint?((e,t,r,a=!1)=>{let n;return r.forEach(r=>{const l=[];t.sort((e,t)=>e.props.start.getTime()-t.props.start.getTime()).forEach(t=>{if((a||t.props.isAllDay===r.current.props.isAllDay)&&t.props.range.index===r.current.props.range.index&&t.props.group.index===r.current.props.group.index&&H(t.props.start,t.props.end,r.current.props.start,r.current.props.end)){const r=G(l);t===e&&void 0===n&&(n=r),l.splice(r,0,r)}})}),n})(i.current,e.dragHint?u:m,l,e.ignoreIsAllDay):null!=(t=e.order)?t:0;if(e.vertical||e.dragHint||e.resizeHint||null===e.order||void 0===e.order)I.current=g;else{const t=d.filter(e=>e.props.isAllDay);I.current=((e,t)=>{var r;const a=t.filter(e=>null!==e.props.order&&void 0!==e.props.order).map(e=>{let t=e.props.start,r=e.props.end;return e.props.isAllDay&&(t=new Date(t.getFullYear(),t.getMonth(),t.getDate()),r=new Date(r.getFullYear(),r.getMonth(),r.getDate())),{order:e.props.order,start:t,end:r}}),n=Array.from(new Set(a.map(e=>e.order))).sort((e,t)=>e-t),l=new Map;for(const e of a)l.has(e.order)||l.set(e.order,[]),l.get(e.order).push({start:e.start,end:e.end});const o=[],s=new Map;for(const e of n){const t=l.get(e);let r=-1;for(let e=0;e<o.length;e++)if(t.every(t=>o[e].every(e=>!H(e.start,e.end,t.start,t.end,!0)))){r=e;break}-1===r&&(r=o.length,o.push([])),o[r].push(...t),s.set(e,r)}return null!=(r=s.get(e))?r:e})(e.order,t)}let E=e.dragHint||e.resizeHint?_(l,e.dragHint?u:m):_(l,d);const y=((e,t)=>e.map(e=>t.filter(t=>M(e.current.props,t.props))))(l,d);let f=0;const D=!e.vertical&&null!==I.current;if(y.forEach(t=>{let r=0;t.forEach(t=>{if(H(t.props.start,t.props.end,e.start,e.end)&&!(e.dragHint||e.resizeHint)&&t._maxSiblingsPerSlot&&t._maxSiblingsPerSlot>E&&t.element!==o&&(E=t._maxSiblingsPerSlot),!D){const e=b(t.element);null!==t.props.order&&void 0!==t.props.order&&t.props.order<I.current&&(r=e.top+e.height-c.top-1*I.current+1)}}),r>f&&(f=r)}),D){const t=null==(r=e.style)?void 0:r.height,a="number"==typeof t?t:25;f=I.current*(a+1)}if(0===l.length)return void k(!1);const S=p.add?20:0;c.width=e.vertical?c.width/E-1-S/E:c.width*l.length-1,e.vertical?c.height=c.height*l.length-1:(e.resizeHint||e.dragHint)&&E<=1||(c.height=null!=(n=null==(a=e.style)?void 0:a.height)?n:25),c.left=e.vertical?c.left+I.current*c.width+1*I.current:c.left,c.top=e.vertical?c.top:c.top+f+1*I.current,R.current=E,w(o,c),C(!0),k(!0)},z=f.useCallback(e=>{const t=e&&e[0],r=m.current;void 0!==c.current&&window.cancelAnimationFrame(c.current),r&&t&&(r.width!==t.contentRect.width||r.height!==t.contentRect.height)&&(c.current=window.requestAnimationFrame(()=>{N()})),m.current={width:t.contentRect.width,height:t.contentRect.height}},[N]);f.useEffect(N);const L=i.current&&i.current.element?i.current.element.closest(".k-scheduler-layout"):null;return Ia({element:L,selector:".k-resource-row",horizontalAttribute:"data-depth-index",verticalAttribute:"data-resource-index",applyTo:".k-resource-cell",syncHeight:e.isLast}),f.useEffect(()=>{if(!y.current)return;const e=window.ResizeObserver,t=e&&new e(z);return t&&t.observe(y.current),()=>{t&&t.disconnect()}},[z,y]),f.createElement(g,{...s,_ref:i,_maxSiblingsPerSlot:R,_order:I,itemRef:i,style:{visibility:S?void 0:"hidden",display:D?void 0:"none",...e.style}},!e.resizeHint&&f.createElement("span",{className:"k-event-actions"},e.tail&&f.createElement(n.IconWrap,{name:"rtl"===x?"chevron-right":"chevron-left",icon:"rtl"===x?d.chevronRightIcon:d.chevronLeftIcon}),e.isRecurring&&!e.isException&&f.createElement(n.IconWrap,{name:"arrow-rotate-cw",icon:d.arrowRotateCwIcon}),!e.isRecurring&&e.isException&&f.createElement(n.IconWrap,{name:"arrows-no-repeat",icon:d.arrowsNoRepeatIcon})),!e.resizeHint&&f.createElement("div",{title:A},!e.isAllDay&&f.createElement(ba,{className:"k-event-time"},A),f.createElement(ba,null,e.title)))}),Ta={item:Ca};wa.displayName="KendoReactSchedulerViewItem";const Ra=(e,{dateRange:t,fields:r,timezone:a})=>e.map(xa(r)).reduce(Aa(t,a,r),[]).filter(e=>!O(e.dataItem,r)),xa=e=>t=>({uid:n.getter(e.id||"id")(t),start:n.getter(e.start||"start")(t),startTimezone:n.getter(e.startTimezone||"startTimezone")(t),originalStart:n.getter(e.originalStart||"originalStart")(t),end:n.getter(e.end||"end")(t),endTimezone:n.getter(e.endTimezone||"endTimezone")(t),isAllDay:n.getter(e.isAllDay||"isAllDay")(t),title:n.getter(e.title||"title")(t),description:n.getter(e.description||"description")(t),occurrenceId:n.getter("occurrenceId")(t),recurrenceRule:n.getter(e.recurrenceRule||"recurrenceRule")(t),recurrenceExceptions:n.getter(e.recurrenceExceptions||"recurrenceExceptions")(t),recurrenceId:n.getter(e.recurrenceId||"recurrenceId")(t),dataItem:n.clone(t)}),Aa=(e,t,r)=>(a,n)=>[...a,...n.recurrenceRule&&(null===n.recurrenceId||void 0===n.recurrenceId)&&O(n.dataItem,r)?[..._a(n,{dateRange:e,timezone:t,fields:r})]:[n]],_a=(e,{dateRange:t,timezone:r,fields:l})=>{const o=e.recurrenceRule,s=v.parseRule({recurrenceRule:o});if(!s)return[];s.start||(s.start=a.ZonedDate.fromLocalDate(e.start,r)),s.end||(s.end=a.ZonedDate.fromLocalDate(e.end,r));const c=e.recurrenceExceptions;c&&(s.exceptionDates=c.map(e=>a.ZonedDate.fromLocalDate(e,r)));const i=t.zonedStart,d=t.zonedEnd,u=v.expand(s,{rangeStart:i,rangeEnd:d});return u.events.length?u.events.map((t,r)=>{const a=n.clone(e),o=n.clone(e.dataItem);return a.recurrenceId=a.uid,M(o,l.recurrenceId,e.uid),a.originalStart=t.start.toLocalDate(),M(o,l.originalStart,t.start.toLocalDate()),a.start=t.start.toLocalDate(),M(o,l.start,t.start.toLocalDate()),a.end=t.end.toLocalDate(),M(o,l.end,t.end.toLocalDate()),a.occurrenceId=String(r),M(o,"occurrenceId",String(r)),a.dataItem=o,a}):[]},Ma=(e,{timezone:t},{groups:r,ranges:n})=>{const o=[];return l.orderBy(e,[{field:"start",dir:"asc"},{field:"end",dir:"desc"},{field:"isAllDay",dir:"desc"},{field:"title",dir:"asc"},{field:"uid",dir:"asc"}]).forEach(e=>{r.forEach(l=>{const s=1===r.length?Na(e,l):l;La(e,s)&&n.forEach(r=>{if(Oa(e,r)){const n=f.createRef(),l=f.createRef(),c=r.end<e.end,i=e.start<r.start,d=a.ZonedDate.fromLocalDate(e.start,t),u=a.ZonedDate.fromLocalDate(e.end,t),m={...e,_ref:l,itemRef:n,head:c,tail:i,order:null,zonedStart:d,zonedEnd:u,group:s,range:r,slots:[],isRecurring:!!e.recurrenceRule,isException:!e.recurrenceRule&&null!==e.recurrenceId&&void 0!==e.recurrenceId,isAllDay:!!e.isAllDay};o.push(m)}})})}),o},Na=(e,t)=>({index:0,resources:t.resources.filter(t=>za(e,t))}),za=(e,t)=>t.multiple?(e.dataItem[t.field]||[]).some(e=>t[t.valueField]===e):e.dataItem[t.field]===t[t.valueField],La=(e,t)=>!t.resources.some(t=>t.multiple?!e.dataItem[t.field].some(e=>t[t.valueField]===e):e.dataItem[t.field]!==t[t.valueField]),Oa=(e,t)=>H(t.start,t.end,e.start,e.end)&&(void 0===t.isAllDay||!!e.isAllDay==!!t.isAllDay),Fa=e=>{const t=ar(),{timezone:r}=ae(),a=de(),n=se(),l=me(),[o]=lr(),s=e.viewItem||Pa.viewItem,c=f.useMemo(()=>Ra([e.dataItem],{dateRange:l,fields:n,timezone:r}),[e.dataItem,l,n,r]),i=f.useMemo(()=>Ma(c,{timezone:r},{groups:a,ranges:t}),[c,r,a,t]),d=(o||[]).map(e=>e.current.props);return $(i,d),f.createElement(f.Fragment,null,i.map((t,r)=>f.createElement(s,{key:r,...t,item:e.item,dragHint:!0,vertical:e.vertical,ignoreIsAllDay:e.ignoreIsAllDay})))},Pa={viewItem:wa,item:Ca};Fa.displayName="KendoReactSchedulerDrag";const Ha=e=>{const t=ar(),{timezone:r}=ae(),a=de(),n=se(),l=me(),[o]=lr(),s=e.viewItem||Wa.viewItem,c=f.useMemo(()=>Ra([e.dataItem],{dateRange:l,fields:n,timezone:r}),[e.dataItem,l.start.getTime(),l.end.getTime(),n,r]),i=f.useMemo(()=>Ma(c,{timezone:r},{groups:a,ranges:t}),[c,r,a,t]),d=(o||[]).map(e=>e.current.props);return $(i,d),f.createElement(f.Fragment,null,i.map((t,r)=>{var a;return f.createElement(s,{key:r,...t,format:e.format,item:null!=(a=e.item)?a:Wa.item,resizeHint:!0,vertical:e.vertical,ignoreIsAllDay:e.ignoreIsAllDay})}))},Wa={viewItem:wa,item:Ca};Ha.displayName="KendoReactSchedulerResize";const Ka=f.createContext([null]);Ka.displayName="SchedulerEditItemPropsContext";const Va=f.createContext([null,n.noop,n.noop]);Va.displayName="SchedulerEditItemFormItemContext";const Ga=f.createContext([null,n.noop,n.noop]);Ga.displayName="SchedulerEditItemDragItemContext";const Ba=f.createContext([null,n.noop,n.noop]);Ba.displayName="SchedulerEditItemResizeItemContext";const $a=f.createContext([null,n.noop,n.noop]);$a.displayName="SchedulerEditItemRemoveItemContext";const Ua=f.createContext([!1,n.noop,n.noop]);Ua.displayName="SchedulerEditItemShowRemoveDialogContext";const Za=f.createContext([!1,n.noop,n.noop]);Za.displayName="SchedulerEditItemShowOccurrenceDialogContext";const qa=({props:e,form:t,drag:r,resize:a,remove:n,showRemoveDialog:l,showOccurrenceDialog:o,children:s})=>f.createElement(Ka.Provider,{value:e},f.createElement(Va.Provider,{value:t},f.createElement(Ga.Provider,{value:r},f.createElement(Ba.Provider,{value:a},f.createElement($a.Provider,{value:n},f.createElement(Ua.Provider,{value:l},f.createElement(Za.Provider,{value:o},s)))))));var Ya=(e=>(e.set="FORM_ITEM_SET",e.setMaster="FORM_ITEM_SET_MASTER",e.reset="FORM_ITEM_RESET",e.complete="FORM_ITEM_COMPLETE",e))(Ya||{});var ja=(e=>(e.set="SHOW_OCCURRENCE_DIALOG_SET",e.open="SHOW_OCCURRENCE_DIALOG_OPEN",e.close="SHOW_OCCURRENCE_DIALOG_CLOSE",e.reset="SHOW_OCCURRENCE_DIALOG_RESET",e.toggle="SHOW_OCCURRENCE_DIALOG_TOGGLE",e))(ja||{});var Xa=(e=>(e.set="REMOVE_ITEM_SET",e.reset="REMOVE_ITEM_RESET",e.complete="REMOVE_ITEM_COMPLETE",e))(Xa||{});var Qa=(e=>(e.set="SHOW_REMOVE_DIALOG_SET",e.open="SHOW_REMOVE_DIALOG_OPEN",e.close="SHOW_REMOVE_DIALOG_CLOSE",e.reset="SHOW_REMOVE_DIALOG_RESET",e.toggle="SHOW_REMOVE_DIALOG_TOGGLE",e))(Qa||{});var Ja=(e=>(e.set="DRAG_ITEM_SET",e.start="DRAG_ITEM_START",e.drag="DRAG_ITEM_DRAG",e.complete="DRAG_ITEM_COMPLETE",e.completeOccurrence="DRAG_ITEM_COMPLETE_OCCURRENCE",e.completeSeries="DRAG_ITEM_COMPLETE_SERIES",e.reset="DRAG_ITEM_RESET",e.dragSelected="DRAG_ITEM_DRAG_SELECTED",e))(Ja||{});var en=(e=>(e.set="RESIZE_ITEM_SET",e.start="RESIZE_ITEM_START",e.startDrag="RESIZE_ITEM_START_DRAG",e.startDragSelected="RESIZE_ITEM_START_DRAG_SELECTED",e.endDrag="RESIZE_ITEM_END_DRAG",e.endDragSelected="RESIZE_ITEM_END_DRAG_SELECTED",e.complete="RESIZE_ITEM_COMPLETE",e.completeOccurrence="RESIZE_ITEM_COMPLETE_OCCURRENCE",e.completeSeries="RESIZE_ITEM_COMPLETE_SERIES",e.reset="RESIZE_ITEM_RESET",e))(en||{});var tn=(e=>(e.reset="SERIES_RESET",e.set="SERIES_SET",e.toggle="SERIES_TOGGLE",e))(tn||{});const rn=f.forwardRef((e,t)=>{const{_ref:r,itemRef:a,onDataAction:l,ignoreIsAllDay:o,viewItem:s,series:c,onSeriesChange:i,form:d,formItem:u,onFormItemChange:m,drag:p,dragItem:g,onDragItemChange:E,resize:h,resizeItem:v,onResizeItemChange:y,removeDialog:D,removeItem:k,onRemoveItemChange:S,occurrenceDialog:C,showOccurrenceDialog:b,onShowOccurrenceDialogChange:I,showRemoveDialog:w,onShowRemoveDialogChange:T,onFocus:R,onFocusAction:x,onMouseDown:N,onMouseDownAction:z,onMouseUp:O,onMouseUpAction:F,onClick:P,onClickAction:H,onDoubleClick:W,onDoubleClickAction:K,onRemoveClick:V,onRemoveClickAction:G,onPress:B,onPressAction:$,onDrag:U,onDragAction:Z,onRelease:q,onReleaseAction:Y,onResizePress:j,onResizePressAction:X,onResizeStartDrag:Q,onResizeStartDragAction:ee,onResizeEndDrag:te,onResizeEndDragAction:re,onResizeRelease:ae,onResizeReleaseAction:ne,onOccurrenceClick:le,onOccurrenceClickAction:oe,onSeriesClick:ce,onSeriesClickAction:ie,onKeyDown:ue,onKeyDownAction:me,onKeyUp:pe,onKeyUpAction:ge,onRemoveConfirm:Ee,onRemoveConfirmAction:he,onFormSubmit:ve,onFormSubmitAction:fe,onCancel:De,onCancelAction:Se}={...an,...e},[be,Ie]=f.useState(e.tabIndex),we=f.useRef(null),Te=f.useRef(null),Re=n.useId();f.useImperativeHandle(we,()=>({props:e,element:Te.current&&Te.current.element})),f.useImperativeHandle(t,()=>we.current),f.useImperativeHandle(r,()=>Te.current),f.useImperativeHandle(a,()=>Te.current);const xe=s||an.viewItem,Ae=p||an.drag,_e=h||an.resize,Me=d||an.form,Ne=C||an.occurrenceDialog,ze=D||an.removeDialog,Le=ya(e.editable),[Oe,Fe]=dr(),[Pe,,He]=((e,t,r)=>{const[a,n]=Ce(e,t,r);return[a,n,e=>{const t=((e,t)=>{switch(t.type){case"SERIES_RESET":return null;case"SERIES_SET":return t.payload;case"SERIES_TOGGLE":return!e;default:return e}})(a,e);n(t)}]})(null,c,i),[We,Ke,Ve]=((e,t)=>{const[r,a]=Ce(...t),l=se(),[o]=ye();return[r,a,(t,s)=>{let c;switch(t.type){case"FORM_ITEM_SET":c=t.payload;break;case"FORM_ITEM_RESET":c=null;break;case"FORM_ITEM_SET_MASTER":c=n.clone(L(t.payload,l,o));break;case"FORM_ITEM_COMPLETE":e.onDataAction&&r&&(e.onDataAction.call(void 0,{type:J.update,series:e.series,dataItem:t.payload}),c=null);break;default:c=r}a(c,s)}]})({series:Pe,onDataAction:l},[null,u,m]),[Ge,Be,$e]=((e,t)=>{const r=f.useRef(0),a=f.useRef(0),l=f.useRef(0),o=f.useRef(null),[s,c]=Ce(...t),[i]=dr(),d=se(),u=de();return[s,c,t=>{switch(t.type){case"DRAG_ITEM_SET":c(t.payload);break;case"DRAG_ITEM_RESET":c(null);break;case"DRAG_ITEM_DRAG_SELECTED":{if(Math.abs(a.current-t.payload.x)<10&&Math.abs(l.current-t.payload.y)<10)return;const r=A(t.payload.x,t.payload.y,7);if(!r||r===o.current)return;const s=n.clone(e.dataItem),u=r.getAttribute("data-slot-start"),m="true"===r.getAttribute("data-slot-allday");if(!e.ignoreIsAllDay&&m!==e.isAllDay)return;const p=new Date(_(s,d.start)),g=Number(u)-p.getTime(),E=i.map(e=>{if(!e.current)return null;const t=n.clone(e.current.props.dataItem),r=new Date(e.current.props.start.getTime()+g),a=new Date(e.current.props.end.getTime()+g);return M(t,d.start,r),M(t,d.end,a),t}).filter(Boolean);o.current=r,c([...E]);break}case"DRAG_ITEM_START":{const o=t.payload.x,s=t.payload.y;a.current=o,l.current=s;const c=A(o,s,7);if(!c)return;const i=n.clone(e.dataItem),u=c.getAttribute("data-slot-start"),m=_(i,d.start);if(null===u)return;r.current=Number(u)-new Date(m).getTime();break}case"DRAG_ITEM_DRAG":{if(Math.abs(a.current-t.payload.x)<10&&Math.abs(l.current-t.payload.y)<10)return;const s=A(t.payload.x,t.payload.y,7);if(!s||s===o.current)return;const i=n.clone(e.dataItem),m=s.getAttribute("data-slot-start"),p=s.getAttribute("data-slot-group"),g="true"===s.getAttribute("data-slot-allday");if(!e.ignoreIsAllDay&&g!==e.isAllDay)return;const E=new Date(_(i,d.start)),h=new Date(_(i,d.end)).getTime()-E.getTime(),v=new Date(Number(m)-Number(r.current)),y=new Date(Number(m)-Number(r.current)+h),f=u.find(e=>e.index===Number(p));M(i,d.start,v),M(i,d.end,y),f&&u.length>1&&f.resources.forEach(e=>{e.multiple||M(i,e.field,e[e.valueField])}),o.current=s,i&&c(i);break}case"DRAG_ITEM_COMPLETE":c(null),e.onDataAction&&s&&e.onDataAction.call(void 0,{type:J.update,series:!1,dataItem:s});break;case"DRAG_ITEM_COMPLETE_OCCURRENCE":{const t=Array.isArray(s)?s.slice():n.clone(s);c(null),e.onDataAction&&s&&e.onDataAction.call(void 0,{type:J.update,series:!1,dataItem:t});break}case"DRAG_ITEM_COMPLETE_SERIES":{let t;if(Array.isArray(s))t=s.map(e=>{const t=n.clone(e);return M(t,d.start,_(e,d.start)),M(t,d.end,_(e,d.end)),t});else{const e=n.clone(s);M(e,d.start,_(s,d.start)),M(e,d.end,_(s,d.end)),t=e}c(null),e.onDataAction&&t&&e.onDataAction.call(void 0,{type:J.update,series:!0,dataItem:t});break}default:c(s)}}]})({dataItem:e.dataItem,ignoreIsAllDay:e.ignoreIsAllDay,isAllDay:e.isAllDay,onDataAction:l},[null,g,E]),[Ue,Ze,qe]=((e,t)=>{const r=f.useRef(null),[a,l]=Ce(...t),[o]=dr(),s=se();return[a,l,(t,c)=>{let i=a;switch(t.type){case"RESIZE_ITEM_SET":i=t.payload;break;case"RESIZE_ITEM_RESET":default:i=null;break;case"RESIZE_ITEM_START":{if(c.stopPropagation(),!i)return;const a=t.payload.x,l=t.payload.y,o=A(a,l,7);if(!o||o===r.current)return;const d=o.getAttribute("data-slot-start"),u=new Date(Number(d)),m=n.clone(e.dataItem);if(u>=_(m,s.end))return;M(m,s.start,u),r.current=o,i=m;break}case"RESIZE_ITEM_START_DRAG_SELECTED":{c.stopPropagation();const a=t.payload.x,l=t.payload.y,d=n.clone(e.dataItem),u=A(a,l,7);if(!u||u===r.current)return;const m=u.getAttribute("data-slot-start"),p=new Date(_(d,s.start)),g=new Date(Number(m)).getTime()-p.getTime();let E=!1;const h=o.map(e=>{if(!e.current)return null;const t=n.clone(e.current.props.dataItem),r=new Date(e.current.props.start.getTime()+g);if(!(r>=_(t,s.end)))return M(t,s.start,r),t;E=!0}).filter(Boolean);E||(i=[...h]);break}case"RESIZE_ITEM_START_DRAG":{const a=t.payload.x,l=t.payload.y,o=A(a,l,7);if(!o||o===r.current)return;const c=o.getAttribute("data-slot-start"),d=new Date(Number(c)),u=n.clone(e.dataItem);if(d>=u.end)return;M(u,s.start,d),r.current=o,i=u;break}case"RESIZE_ITEM_END_DRAG":{const a=t.payload.x,l=t.payload.y,o=A(a,l,7);if(!o||o===r.current)return;const c=o.getAttribute("data-slot-end"),d=new Date(Number(c)),u=n.clone(e.dataItem);if(d<=u.start)return;M(u,s.end,d),r.current=o,i=u;break}case"RESIZE_ITEM_END_DRAG_SELECTED":{c.stopPropagation();const a=t.payload.x,l=t.payload.y,d=n.clone(e.dataItem),u=A(a,l,7);if(!u||u===r.current)return;const m=u.getAttribute("data-slot-start"),p=new Date(_(d,s.end)),g=new Date(Number(m)).getTime()-p.getTime();let E;const h=o.map(e=>{if(!e.current)return null;const t=n.clone(e.current.props.dataItem),r=new Date(e.current.props.end.getTime()+g);if(!(r<=_(t,s.start)))return M(t,s.end,r),t;E=!0}).filter(Boolean);E||(i=[...h]);break}case"RESIZE_ITEM_COMPLETE":case"RESIZE_ITEM_COMPLETE_OCCURRENCE":i=null,e.onDataAction&&a&&e.onDataAction.call(void 0,{type:J.update,series:!1,dataItem:a});break;case"RESIZE_ITEM_COMPLETE_SERIES":{let t;if(i=null,Array.isArray(a))t=a.map(e=>{const t=n.clone(e);return M(t,s.start,_(e,s.start)),M(t,s.end,_(e,s.end)),t});else{const e=n.clone(a);M(e,s.start,_(a,s.start)),M(e,s.end,_(a,s.end)),t=e}e.onDataAction&&t&&e.onDataAction.call(void 0,{type:J.update,series:!0,dataItem:t});break}}l(i)}]})({dataItem:e.dataItem,onDataAction:l},[null,v,y]),[Ye,je,Xe]=((e,t)=>{const[r,a]=Ce(...t);return[r,a,t=>{let n;switch(t.type){case"REMOVE_ITEM_SET":n=t.payload;break;case"REMOVE_ITEM_RESET":n=null;break;case"REMOVE_ITEM_COMPLETE":e.onDataAction&&r&&e.onDataAction.call(void 0,{type:J.remove,series:e.series,dataItem:r}),n=null;break;default:n=r}a(n)}]})({series:Pe,onDataAction:l},[null,k,S]),[Qe,Je,et]=((e,t,r)=>{const[a,n]=Ce(e,t,r);return[a,n,e=>{const t=((e,t)=>{switch(t.type){case"SHOW_REMOVE_DIALOG_RESET":case"SHOW_REMOVE_DIALOG_CLOSE":return!1;case"SHOW_REMOVE_DIALOG_SET":return t.payload;case"SHOW_REMOVE_DIALOG_OPEN":return!0;case"SHOW_REMOVE_DIALOG_TOGGLE":return!e;default:return e}})(a,e);n(t)}]})(!1,w,T),[tt,rt,at]=((e,t,r)=>{const[a,n]=Ce(e,t,r);return[a,n,e=>{const t=((e,t)=>{switch(t.type){case"SHOW_OCCURRENCE_DIALOG_RESET":case"SHOW_OCCURRENCE_DIALOG_CLOSE":return!1;case"SHOW_OCCURRENCE_DIALOG_SET":return t.payload;case"SHOW_OCCURRENCE_DIALOG_OPEN":return!0;case"SHOW_OCCURRENCE_DIALOG_TOGGLE":return!e;default:return e}})(a,e);n(t)}]})(!1,b,I),[nt]=sr(),[,lt]=f.useContext(ur),[,ot]=pr(),st=!!(Te.current&&Oe&&Oe.some(e=>e.current===Te.current)),ct=f.useMemo(()=>({selected:st,series:Pe,formItem:We,dragItem:Ge,resizeItem:Ue,removeItem:Ye,showRemoveDialog:Qe,showOccurrenceDialog:tt}),[Ge,We,Ye,Ue,st,Pe,tt,Qe]),it=f.useMemo(()=>({[tn.set]:He,[tn.toggle]:He,[tn.reset]:He,[Er.select]:Fe,[Er.add]:Fe,[Er.remove]:Fe,[Er.reset]:Fe,[Er.selectNext]:Fe,[Er.selectPrev]:Fe,[Ya.set]:Ve,[Ya.setMaster]:Ve,[Ya.reset]:Ve,[Ya.complete]:Ve,[Xa.set]:Xe,[Xa.reset]:Xe,[Xa.complete]:Xe,[ja.close]:at,[ja.open]:at,[ja.set]:at,[ja.toggle]:at,[ja.reset]:at,[Qa.close]:et,[Qa.open]:et,[Qa.set]:et,[Qa.toggle]:et,[Qa.reset]:et,[Ja.start]:$e,[Ja.drag]:$e,[Ja.complete]:$e,[Ja.completeOccurrence]:$e,[Ja.completeSeries]:$e,[Ja.set]:$e,[Ja.reset]:$e,[Ja.dragSelected]:$e,[en.start]:qe,[en.startDrag]:qe,[en.startDragSelected]:qe,[en.endDrag]:qe,[en.endDragSelected]:qe,[en.complete]:qe,[en.completeOccurrence]:qe,[en.completeSeries]:qe,[en.set]:qe,[en.reset]:qe,[Cr.next]:lt,[Cr.prev]:lt,[yr.left]:ot,[yr.right]:ot,[yr.up]:ot,[yr.down]:ot,null:()=>{}}),[$e,Ve,Fe,Xe,qe,He,at,et,lt,ot]),dt=f.useCallback(t=>{if(x){const r=x(t,e,ct);r&&(Array.isArray(r)?r.filter(Boolean).map(e=>e&&it[e.type]({...e,item:Te},t)):it[r.type]({...r,item:Te}))}R&&R.call(void 0,t)},[it,R,x,e,ct]),ut=f.useCallback(t=>{if(z){const r=z(t,e,ct);r&&(Array.isArray(r)?r.filter(Boolean).map(e=>e&&it[e.type]({...e,item:Te},t)):it[r.type]({...r,item:Te}))}N&&N.call(void 0,t)},[it,N,z,e,ct]),mt=f.useCallback(t=>{if(F){const r=F(t,e,ct);r&&(Array.isArray(r)?r.filter(Boolean).map(e=>e&&it[e.type]({...e,item:Te},t)):it[r.type]({...r,item:Te}))}O&&O.call(void 0,t)},[it,O,F,e,ct]),[,pt]=f.useContext(ke),gt=f.useCallback(t=>{if(H){pt(Te.current);const r=H(t,e,ct);r&&(Array.isArray(r)?r.filter(Boolean).map(e=>e&&it[e.type]({...e,item:Te},t)):it[r.type]({...r,item:Te}))}P&&P.call(void 0,t)},[it,P,H,e,ct]),Et=f.useCallback(t=>{if(K){const r=K(t,e,ct);r&&(Array.isArray(r)?r.filter(Boolean).map(e=>e&&it[e.type]({...e,item:Te},t)):it[r.type]({...r,item:Te}))}W&&W.call(void 0,t)},[K,W,e,it,ct]),ht=f.useCallback(t=>{if(G){const r=G(t,e,ct);r&&(Array.isArray(r)?r.filter(Boolean).map(e=>e&&it[e.type]({...e,item:Te},t)):it[r.type]({...r,item:Te}))}V&&V.call(void 0,t)},[G,V,e,it,ct]),vt=f.useCallback(t=>{if($){const r=$(t,e,ct);r&&(Array.isArray(r)?r.filter(Boolean).map(e=>e&&it[e.type]({...e,item:Te},t)):it[r.type]({...r,item:Te},t))}B&&B.call(void 0,t)},[$,B,e,it,ct]),yt=f.useCallback(t=>{if(Z){const r=Z(t,e,ct);r&&(Array.isArray(r)?r.filter(Boolean).map(e=>e&&it[e.type]({...e,item:Te},t.dragEvent.originalEvent)):it[r.type]({...r,item:Te},t.dragEvent.originalEvent))}U&&U.call(void 0,t)},[Z,U,e,it,ct]),ft=f.useCallback(t=>{if(Y){const r=Y(t,e,ct);r&&(Array.isArray(r)?r.filter(Boolean).map(e=>e&&it[e.type]({...e,item:Te},t.dragEvent.originalEvent)):it[r.type]({...r,item:Te},t.dragEvent.originalEvent))}q&&q.call(void 0,t)},[Y,q,e,it,ct]),Dt=f.useCallback(t=>{if(X){const r=X(t,e,ct);r&&(Array.isArray(r)?r.filter(Boolean).map(e=>e&&it[e.type]({...e,item:Te},t.dragEvent.originalEvent)):it[r.type]({...r,item:Te},t.dragEvent.originalEvent))}j&&j.call(void 0,t)},[X,j,e,ct,it]),kt=f.useCallback(t=>{if(ee){const r=ee(t,e,ct);r&&(Array.isArray(r)?r.filter(Boolean).map(e=>e&&it[e.type]({...e,item:Te},t.dragEvent.originalEvent)):it[r.type]({...r,item:Te},t.dragEvent.originalEvent))}Q&&Q.call(void 0,t)},[Q,ee,e,it,ct]),St=f.useCallback(t=>{if(re){const r=re(t,e,ct);r&&(Array.isArray(r)?r.filter(Boolean).map(e=>e&&it[e.type]({...e,item:Te},t.dragEvent.originalEvent)):it[r.type]({...r,item:Te},t.dragEvent.originalEvent))}te&&te.call(void 0,t)},[te,re,e,it,ct]),Ct=f.useCallback(t=>{if(ne){const r=ne(t,e,ct);r&&(Array.isArray(r)?r.filter(Boolean).map(e=>e&&it[e.type]({...e,item:Te},t.dragEvent.originalEvent)):it[r.type]({...r,item:Te},t.dragEvent.originalEvent))}ae&&ae.call(void 0,t)},[ne,ae,e,it,ct]),bt=f.useCallback(t=>{if(fe){const r=fe(t,e,ct);r&&(Array.isArray(r)?r.filter(Boolean).map(e=>e&&it[e.type]({...e,item:Te},t)):it[r.type]({...r,item:Te},t))}ve&&ve.call(void 0,t)},[fe,ve,e,ct,it]),It=f.useCallback(t=>{if(Se){const r=Se(t,e,ct);r&&(Array.isArray(r)?r.filter(Boolean).map(e=>e&&it[e.type]({...e,item:Te},t)):it[r.type]({...r,item:Te},t))}De&&De.call(void 0,t)},[Se,De,e,ct,it]),wt=f.useCallback(t=>{if(oe){const r=oe(t,e,ct);r&&(Array.isArray(r)?r.filter(Boolean).map(e=>e&&it[e.type]({...e,item:Te},t)):it[r.type]({...r,item:Te},t))}le&&le.call(void 0,t)},[oe,le,e,ct,it]),Tt=f.useCallback(t=>{if(ie){const r=ie(t,e,ct);r&&(Array.isArray(r)?r.filter(Boolean).map(e=>e&&it[e.type]({...e,item:Te},t)):it[r.type]({...r,item:Te},t))}ce&&ce.call(void 0,t)},[ie,ce,e,ct,it]),Rt=f.useCallback(t=>{if(me){const r=me(t,e,ct);r&&(Array.isArray(r)?r.filter(Boolean).map(e=>e&&it[e.type]({...e,item:Te},t.syntheticEvent)):it[r.type]({...r,item:Te},t.syntheticEvent))}ue&&ue.call(void 0,t)},[me,ue,e,ct,it]),xt=f.useCallback(t=>{if(ge){const r=ge(t,e,ct);r&&(Array.isArray(r)?r.filter(Boolean).map(e=>e&&it[e.type]({...e,item:Te},t.syntheticEvent)):it[r.type]({...r,item:Te},t.syntheticEvent))}pe&&pe.call(void 0,t)},[ge,pe,e,ct,it]),At=f.useCallback(t=>{if(he){const r=he(t,e,ct);r&&(Array.isArray(r)?r.filter(Boolean).map(e=>e&&it[e.type]({...e,item:Te},t.syntheticEvent)):it[r.type]({...r,item:Te},t.syntheticEvent))}Ee&&Ee.call(void 0,t)},[he,Ee,e,ct,it]);return f.useEffect(()=>{const t=nt.length&&nt[0].current===Te.current;Ie(void 0!==e.tabIndex?null===e.tabIndex?void 0:e.tabIndex:0===Oe.length&&t?0:void 0)},[nt,e.tabIndex,Oe.length]),f.createElement(qa,{props:e,form:[We,Ke,Ve],drag:[Ge,Be,$e],resize:[Ue,Ze,qe],remove:[Ye,je,Xe],showRemoveDialog:[Qe,Je,et],showOccurrenceDialog:[tt,rt,at]},f.createElement(xe,{...e,_ref:Te,itemRef:Te,selected:st,tabIndex:be,id:Re,onKeyDown:Rt,onKeyUp:xt,onFocus:dt,onMouseUp:mt,onMouseDown:ut,onClick:gt,onDoubleClick:Et,onRemoveClick:ht,onPress:vt,onDrag:yt,onRelease:ft,onResizePress:Dt,onResizeEndDrag:St,onResizeStartDrag:kt,onResizeRelease:Ct}),Ge&&Le.drag&&(Array.isArray(Ge)?Ge.map((t,r)=>f.createElement(Ae,{key:r,ignoreIsAllDay:o,dataItem:t,vertical:e.vertical,viewItem:xe,item:e.item})):f.createElement(Ae,{ignoreIsAllDay:o,dataItem:Ge,vertical:e.vertical,viewItem:xe,item:e.item})),Ue&&Le.resize&&(Array.isArray(Ue)?Ue.map((t,r)=>f.createElement(_e,{key:r,format:e.format,ignoreIsAllDay:o,dataItem:t,viewItem:e.viewItem,item:e.item,vertical:e.vertical})):f.createElement(_e,{format:e.format,ignoreIsAllDay:o,dataItem:Ue,viewItem:e.viewItem,item:e.item,vertical:e.vertical})),We&&!tt&&Le.edit&&f.createElement(Me,{dataItem:We,onSubmit:bt,onClose:It,onCancel:It}),tt&&f.createElement(Ne,{dataItem:We||Ge||Ue||Ye,isRemove:null!==Ye,onClose:It,onOccurrenceClick:wt,onSeriesClick:Tt}),Qe&&Ye&&Le.remove&&f.createElement(ze,{dataItem:Ye,onClose:It,onCancel:It,onConfirm:At}))}),an={viewItem:wa,drag:Fa,resize:Ha,form:ia,occurrenceDialog:ka,removeDialog:Sa,onClickAction:(e,t,r)=>[{type:e.syntheticEvent.metaKey||e.syntheticEvent.ctrlKey?!r.selected||r.dragItem||r.resizeItem?Er.add:Er.remove:Er.select}],onDoubleClickAction:(e,t)=>t.editable?[{type:Ya.set,payload:t.dataItem},t.isRecurring&&{type:ja.open}].filter(Boolean):[],onRemoveClickAction:(e,t)=>t.editable?[{type:Xa.set,payload:t.dataItem},t.isRecurring?{type:ja.open}:{type:Qa.open}]:[],onPressAction:(e,t)=>t.editable?{type:Ja.start,payload:{x:e.dragEvent.clientX,y:e.dragEvent.clientY}}:[],onDragAction:(e,t)=>t.editable?{type:e.dragEvent.originalEvent.metaKey||e.dragEvent.originalEvent.ctrlKey?Ja.dragSelected:Ja.drag,payload:{x:e.dragEvent.clientX,y:e.dragEvent.clientY}}:[],onReleaseAction:(e,t,r)=>t.editable&&r.dragItem?t.isRecurring&&!t.isException&&null===r.series?{type:ja.open}:{type:t.isRecurring?r.series?Ja.completeSeries:Ja.completeOccurrence:Ja.complete,payload:{x:e.dragEvent.clientX,y:e.dragEvent.clientY}}:[],onResizePressAction:(e,t)=>t.editable?{type:en.start,payload:{x:e.dragEvent.clientX,y:e.dragEvent.clientY}}:[],onResizeStartDragAction:(e,t)=>t.editable?{type:e.dragEvent.originalEvent.metaKey||e.dragEvent.originalEvent.ctrlKey?en.startDragSelected:en.startDrag,payload:{x:e.dragEvent.clientX,y:e.dragEvent.clientY}}:[],onResizeEndDragAction:(e,t)=>t.editable?{type:e.dragEvent.originalEvent.metaKey||e.dragEvent.originalEvent.ctrlKey?en.endDragSelected:en.endDrag,payload:{x:e.dragEvent.clientX,y:e.dragEvent.clientY}}:[],onResizeReleaseAction:(e,t,r)=>t.editable&&r.resizeItem?t.isRecurring&&!t.isException&&null===r.series?{type:ja.open}:{type:t.isRecurring?r.series?en.completeSeries:en.completeOccurrence:en.complete,payload:{x:e.dragEvent.clientX,y:e.dragEvent.clientY}}:[],onOccurrenceClickAction:(e,t,r)=>r.dragItem?[{type:Ja.completeOccurrence},{type:ja.close}]:r.resizeItem?[{type:en.completeOccurrence},{type:ja.close}]:r.formItem?[{type:tn.set,payload:!1},{type:Ya.set,payload:t.dataItem},{type:ja.close}]:r.removeItem?[{type:tn.set,payload:!1},{type:Xa.set,payload:t.dataItem},{type:Qa.open},{type:ja.close}]:[],onSeriesClickAction:(e,t,r)=>r.dragItem?[{type:Ja.completeSeries},{type:ja.close}]:r.resizeItem?[{type:en.completeSeries},{type:ja.close}]:r.formItem?[{type:tn.set,payload:!0},{type:Ya.setMaster,payload:t.dataItem},{type:ja.close}]:r.removeItem?[{type:tn.set,payload:!0},{type:Xa.set,payload:t.dataItem},{type:Qa.open},{type:ja.close}]:[],onKeyDownAction:(e,t)=>{switch(e.syntheticEvent.keyCode){case n.Keys.enter:return[{type:Ya.set,payload:t.dataItem},t.isRecurring&&{type:ja.open}];case n.Keys.tab:return[{type:e.syntheticEvent.shiftKey?Cr.prev:Cr.next,ignoreIsAllDay:t.ignoreIsAllDay},{type:e.syntheticEvent.shiftKey?Er.selectPrev:Er.selectNext,ignoreIsAllDay:t.ignoreIsAllDay}];case n.Keys.up:return[!(!t.slots.length||!t.slots[0]._ref.current)&&{type:yr.up,slot:t.slots[0]._ref}];case n.Keys.right:return[!(!t.slots.length||!t.slots[0]._ref.current)&&{type:yr.right,slot:t.slots[0]._ref}];case n.Keys.down:return[!(!t.slots.length||!t.slots[t.slots.length-1]._ref.current)&&{type:yr.down,slot:t.slots[t.slots.length-1]._ref}];case n.Keys.left:return[!(!t.slots.length||!t.slots[0]._ref.current)&&{type:yr.left,slot:t.slots[0]._ref}];default:return}},onFormSubmitAction:e=>[{type:Ya.complete,payload:e.value}],onRemoveConfirmAction:()=>[{type:Xa.complete},{type:ja.close}],onCancelAction:()=>[{type:tn.reset},{type:Xa.reset},{type:Ya.reset},{type:Ja.reset},{type:en.reset},{type:Qa.reset},{type:ja.reset}]};rn.displayName="KendoReactSchedulerEditItem";const nn=e=>{const[t,r]=f.useState(!1),l=te(),o=ae(),s=f.useRef(void 0),c=f.useRef(null),i=f.useRef(null),d=e.updateInterval||ln.updateInterval,[,u]=f.useState(!1),m=n.useDir(i,!0===o.rtl?"rtl":void 0),[p]=lr(),g=f.useCallback(()=>{if(!p)return;const t=p.filter(t=>t.current&&(void 0===e.groupIndex||null===e.groupIndex||t.current.props.group.index===e.groupIndex)&&(e.vertical?H(new Date,new Date,t.current.props.start,t.current.props.end,!0):K(new Date,t.current.props.start,t.current.props.end))&&!t.current.props.isAllDay);if(t&&t.length&&c.current&&i.current){const n=T(t);if(!n.current)return;const l=e.vertical?(e=>{let t=0;return e.forEach(e=>{if(e.current){const r=b(e.current.element);t+=r.height}}),t})(t):(e=>{let t=0;return e.forEach(e=>{if(e.current){const r=b(e.current.element);t+=r.width}}),t})(t),o=b(n.current.element),s=b(c.current),d=(e.vertical?o.width:o.height)/(n.current.props.end.getTime()-n.current.props.start.getTime()),u=(Date.now()-((e,t)=>{const r=a.cloneDate(e);return r.setHours(t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()),r})(new Date,n.current.props.start).getTime())*d,p="rtl"===m,g=e.vertical?o.top:o.top+u-s.height/2,E=p?"right":"left",h=e.vertical?o[E]+u-s.width/2:o[E];e.vertical?c.current.style[E]=`${h}px`:c.current.style.top=`${g}px`,i.current.style[E]=`${h}px`,i.current.style.top=`${g}px`,i.current.style[e.vertical?"height":"width"]=l-1+"px",r(!0)}else r(!1)},[p,e.groupIndex,e.vertical,m]),E=f.useCallback(()=>{g(),u(e=>!e)},[g]);f.useEffect(()=>{if(!l.current||!window)return;clearInterval(s.current),s.current=window.setInterval(E,d);const e=window.ResizeObserver,t=e&&new e(E);return t&&t.observe(l.current),()=>{clearInterval(s.current),t&&t.disconnect()}},[g,E,l,d]),f.useEffect(g);const h=f.createElement("div",{ref:c,className:n.classNames("k-current-time",{"k-current-time-arrow-right":!e.vertical&&"rtl"!==m,"k-current-time-arrow-left":!e.vertical&&"rtl"===m,"k-current-time-arrow-down":e.vertical}),style:{transform:e.vertical?"rtl"===m?"translateX(50%)":"translateX(-50%)":"translateY(-50%)",visibility:t?void 0:"hidden"}});return f.createElement(f.Fragment,null,e.attachArrow&&e.attachArrow.current?D.createPortal(h,e.attachArrow.current):h,f.createElement("div",{className:"k-current-time",ref:i,style:{transform:e.vertical?"translateX(-50%)":"translateY(-50%)",[e.vertical?"width":"height"]:"1px",visibility:t?void 0:"hidden"}}))},ln={updateInterval:6e4},on=f.forwardRef((e,t)=>{const{as:r=sn.as,...a}=e,l=f.useRef(null),s=f.useRef(null),c=o.useInternationalization(),i=f.useMemo(()=>n.classNames("k-scheduler-cell k-heading-cell",e.className),[e.className]);return f.useImperativeHandle(s,()=>({element:l.current&&l.current.element?l.current.element:l.current,props:e})),f.useImperativeHandle(t,()=>s.current),f.createElement(r,{ref:r!==sn.as?void 0:l,...a,className:i},f.createElement("span",{className:"k-link k-nav-day"},c.formatDate(e.date,e.format?e.format:sn.format)))}),sn={as:f.forwardRef(({as:e,format:t,start:r,end:a,...n},l)=>f.createElement("div",{...n,ref:l})),format:"d"};on.displayName="KendoReactSchedulerDateHeaderCell";const cn=(e,{step:t,timezone:r})=>{const n=[],l=a.ZonedDate.fromLocalDate(e.start,r),o=a.ZonedDate.fromLocalDate(e.end,r);for(let e=l.clone(),r=0;e.getTime()<o.getTime();r++,e=e.addTime(t)){const a=e.clone(),l=a.clone().addTime(t),o=new Date(a.getTime()),s={index:r,end:new Date(l.getTime()),start:o,zonedStart:a,zonedEnd:l};n.push(s)}return n},dn=(e,{step:t},{groups:r,ranges:n})=>{const l=[];return r.forEach(e=>{n.forEach(r=>{const n=r.zonedStart,o=r.zonedEnd,s=o.timezoneOffset-n.timezoneOffset;for(let c=n.clone(),i=0,d=s<0?s*Y*-1:0;c.getTime()<o.getTime();){const n=f.createRef(),o=c.clone(),s=c.addTime(t),u=(s.timezoneOffset-o.timezoneOffset)*Y,m=t<=Math.abs(u);d&&m&&(d-=t,c=c.addTime(-t));const p=new Date(o.getTime()),g={_ref:n,index:i,end:new Date(s.getTime()),start:p,zonedStart:o,zonedEnd:s,range:r,group:e,items:[],isAllDay:a.MS_PER_DAY<=t};l.push(g),c=c.addTime(t),i++}})}),l},un=f.createElement("div",{className:"k-scheduler-cell k-side-cell"}),mn=e=>{var t,r,l,s,c,i,d,u,m,p,g;const{group:E,timezone:h,resources:v}=ae(),y=o.useInternationalization(),D=e.editItem||rn,k=e.editSlot||fa,S=e.showWorkHours,C=null!=(t=e.numberOfDays)?t:pn.numberOfDays,b=null!=(r=e.slotDivisions)?r:pn.slotDivisions,I=null!=(l=e.slotDuration)?l:pn.slotDuration,w=null!=(s=e.workWeekStart)?s:pn.workWeekStart,x=null!=(c=e.workWeekEnd)?c:pn.workWeekEnd,A=!1!==e.currentTimeMarker&&pn.currentTimeMarker,_=y.parseDate(null!=(d=null!=(i=e.workDayStart)?i:e.isWorkDayStart)?d:pn.isWorkDayStart),M=y.parseDate(null!=(m=null!=(u=e.workDayEnd)?u:e.isWorkDayEnd)?m:pn.isWorkDayEnd),N=y.parseDate(null!=(p=e.startTime)?p:pn.startTime),z=y.parseDate(null!=(g=e.endTime)?g:pn.endTime),[L]=ye(),O=de(),F=ge(),P=se(),W=me(),G=f.useMemo(()=>S?_:N,[S,_,N]),U=f.useMemo(()=>S?M:z,[S,M,z]),Z=f.useMemo(()=>cn(W,{step:a.MS_PER_DAY*C,timezone:h}).map(e=>({...e,isAllDay:!0})),[W.start.getTime(),W.end.getTime(),C]),q=f.useMemo(()=>cn(W,{step:a.MS_PER_DAY,timezone:h}).map(e=>({...e,isAllDay:!1})),[W.start.getTime(),W.end.getTime(),h]),j=f.useMemo(()=>dn(0,{step:a.MS_PER_DAY},{groups:O,ranges:Z}),[W.start.getTime(),W.end.getTime(),h,Z,O]),X=f.useMemo(()=>dn(0,{step:I*Y/b},{groups:O,ranges:q}).filter(e=>U.getTime()===G.getTime()||K(e.zonedStart,G,U)),[W.start.getTime(),W.end.getTime(),I,b,G.getTime(),U.getTime(),O,q]),Q=f.useMemo(()=>Ra(L,{dateRange:W,fields:P,timezone:h}),[L,W.start.getTime(),W.end.getTime(),P,h]),J=f.useMemo(()=>Q.filter(e=>e.isAllDay),[Q]),ee=f.useMemo(()=>Q.filter(e=>!e.isAllDay),[Q]),te=f.useMemo(()=>Ma(J,{timezone:h},{groups:O,ranges:Z}),[Q,h,O,Z]),re=f.useMemo(()=>Ma(ee,{timezone:h},{groups:O,ranges:q}).filter(e=>G.getTime()===U.getTime()||K(e.zonedStart,G,U)||K(e.zonedEnd,G,U)||K(new Date(e.zonedEnd.getTime()-(e.zonedEnd.getTime()-e.zonedStart.getTime())/2),G,U)),[Q,h,O,q,G.getTime(),U.getTime()]);f.useMemo(()=>$(te,j,!1),[te,j]),f.useMemo(()=>B(te,j,!1),[te,j]),f.useMemo(()=>$(re,X,!1),[re,X]),f.useMemo(()=>B(re,X,!1),[re,X]);const ne=f.createElement(Ir.Consumer,null,({groupIndex:t})=>f.createElement("div",{className:"k-scheduler-row",key:t},q.map((t,r)=>f.createElement(on,{as:e.dateHeaderCell,key:r,date:a.ZonedDate.fromLocalDate(new Date(t.zonedEnd.getTime()-(t.zonedEnd.getTime()-t.zonedStart.getTime())/2),h),start:t.start,end:t.end,format:{skeleton:"MEd"}})))),le=f.createElement(Ir.Consumer,null,({groupIndex:t})=>f.createElement("div",{key:t,className:"k-scheduler-row"},Z.map((r,a)=>j.filter(e=>e.group.index===t&&e.range.index===a).map((r,a,n)=>f.createElement(k,{...r,onDataAction:e.onDataAction,form:e.form,slot:e.slot,viewSlot:e.viewSlot,key:`${r.start.getTime()}:${r.group.index}`,row:0,col:"horizontal"===F?n.length*(t||0)+a:a,isWorkDay:0<=r.zonedStart.getDay()+(C-w)&&(r.zonedStart.getDay()+(C-w))%C<=x+(C-w),expandable:!0}))))),oe=f.useMemo(()=>n.classNames("week"===e.name?"k-scheduler-weekview":"k-scheduler-dayview",e.className),[e.name,e.className]),ce=f.useCallback((t,r,a)=>q.map((n,l)=>X.filter(e=>e.index===t.index&&e.range.index===l&&e.group.index===a).map(t=>f.createElement(k,{key:`${t.start.getTime()}:${t.group.index}`,...t,onDataAction:e.onDataAction,slot:e.slot,viewSlot:e.viewSlot,form:e.form,row:r+1,col:q.length*(a||0)+l,isWorkHour:K(t.zonedStart,_,M),isWorkDay:V(t.zonedEnd.getDay(),w,x),editable:e.editable}))),[q,k,e.editable,e.form,e.onDataAction,e.slot,e.viewSlot,X,M,_,x,w]),ie=f.useCallback((t,r,a)=>j.filter(e=>e.group.index===r&&e.range.index===a).map((a,n)=>f.createElement(k,{slot:e.slot,viewSlot:e.viewSlot,form:e.form,...a,onDataAction:e.onDataAction,key:`${a.start.getTime()}:${a.group.index}`,className:"k-scheduler-alldays-slot",row:t*(r||0)+1*(r||0),col:n,expandable:!0})),[k,j,e.form,e.onDataAction,e.slot,e.viewSlot]),ue=f.useCallback((t,r,a,n)=>q.map((l,o)=>X.filter(e=>e.index===t.index&&e.group.index===a&&e.range.index===o).map(t=>f.createElement(k,{slot:e.slot,viewSlot:e.viewSlot,form:e.form,onDataAction:e.onDataAction,...t,key:`${t.start.getTime()}:${t.group.index}`,row:r.length*(a||0)+n+1*(a||0)+1,col:o,editable:e.editable,isWorkHour:K(t.zonedStart,_,M),isWorkDay:0<=t.zonedStart.getDay()+(C-w)&&(t.zonedStart.getDay()+(C-w))%C<=x+(C-w)}))),[k,C,e.editable,e.form,e.onDataAction,e.slot,e.viewSlot,q,X,M,_,x,w]);return f.createElement(br,{id:e.id,props:e,style:e.style,className:oe,ranges:[...Z,...q],slots:[...j,...X]},f.createElement("div",{className:"k-scheduler-head"},"horizontal"===F?f.createElement(f.Fragment,null,f.createElement(wr,{nested:!0,group:E,resources:v,rowContent:Ar,childRowContent:Ar},ne),f.createElement(wr,{group:E,resources:v,rowContent:Hr,childRowContent:Hr},le),te.map(t=>f.createElement(D,{key:t.isRecurring?`${t.uid}:${t.group.index}:${t.range.index}:${t.originalStart}`:`${t.uid}:${t.group.index}:${t.range.index}`,...t,form:e.form,onDataAction:e.onDataAction,item:e.item,viewItem:e.viewItem,editable:e.editable,vertical:!1}))):f.createElement(_r,{group:E,resources:v,cellContent:un},ne)),f.createElement("div",{className:"k-scheduler-body"},"horizontal"===F?f.createElement(f.Fragment,null,X.filter(e=>0===e.group.index&&0===e.range.index).map((t,r)=>f.createElement(f.Fragment,{key:t.index},f.createElement(wr,{nested:!1,group:E,resources:v,rowContent:Vr,rowContentProps:{timeHeaderCell:e.timeHeaderCell,isMaster:r%b===0,isLast:(r+1)%b===0,slot:t}},f.createElement(Ir.Consumer,null,({groupIndex:e})=>f.createElement("div",{className:n.classNames("k-scheduler-row",{"k-middle-row":(r+1)%b!==0})},ce(t,r,e)))))),!1!==A&&H(T(q).start,R(q).end,new Date,new Date,!0)&&f.createElement(nn,null)):f.createElement(f.Fragment,null,f.createElement(_r,{nested:!0,group:E,resources:v},f.createElement(Ir.Consumer,null,({groupIndex:t})=>f.createElement(f.Fragment,{key:t},f.createElement("div",{className:"k-scheduler-row"},f.createElement(Hr,{groupIndex:t},Z.map((e,r)=>{const a=X.filter(e=>e.group.index===t&&0===e.range.index).length;return ie(a,t,r)}))),X.filter(e=>e.group.index===t&&0===e.range.index).map((r,a,n)=>f.createElement("div",{className:"k-scheduler-row",key:r.index},f.createElement(Vr,{slot:r,isMaster:a%b===0,isLast:(a+1)%b===0,timeHeaderCell:e.timeHeaderCell},ue(r,n,t,a)))),!1!==A&&H(T(q).start,R(q).end,new Date,new Date,!0)&&f.createElement(nn,{groupIndex:t})))),te.map(t=>f.createElement(D,{key:t.isRecurring?`${t.uid}:${t.group.index}:${t.range.index}:${t.originalStart}`:`${t.uid}:${t.group.index}:${t.range.index}`,...t,onDataAction:e.onDataAction,viewItem:e.viewItem,item:e.item,form:e.form,editable:e.editable,vertical:!1}))),re.map(t=>f.createElement(D,{key:t.isRecurring?`${t.uid}:${t.group.index}:${t.range.index}:${t.originalStart}`:`${t.uid}:${t.group.index}:${t.range.index}`,...t,format:"t",onDataAction:e.onDataAction,viewItem:e.viewItem,item:e.item,form:e.form,editable:e.editable,vertical:!0}))))},pn={name:"multi-day",title:"Multi Day",currentTimeMarker:!0,dateRange:({date:e,numberOfDays:t=1,timezone:r})=>{const n=a.ZonedDate.fromLocalDate(e,r),l=a.getDate(n),o=a.addDays(l,t),s=a.ZonedDate.fromUTCDate(z(l),r),c=a.ZonedDate.fromUTCDate(z(o),r);return{start:new Date(s.getTime()),end:new Date(c.getTime()),zonedStart:s,zonedEnd:c}},selectedDateFormat:"{0:D} - {1:D}",selectedShortDateFormat:"{0:d} - {1:d}",numberOfDays:1,startTime:"00:00",endTime:"23:59",isWorkDayStart:"08:00",isWorkDayEnd:"17:00",workWeekStart:a.Day.Monday,workWeekEnd:a.Day.Friday,slotDivisions:2,slotDuration:60,showCurrentTime:!0,defaultShowWorkHours:!0};mn.propTypes={currentTimeMarker:r.bool,name:r.string,numberOfDays:r.number,startTime:r.string,endTime:r.string,workDayStart:r.string,workDayEnd:r.string,workWeekStart:r.number,workWeekEnd:r.any,slotDivisions:r.number,slotDuration:r.number,showWorkHours:r.bool,selectedDateFormat:r.string,selectedShortDateFormat:r.string},mn.displayName="KendoReactSchedulerMultiDayView";const gn=e=>f.createElement(mn,{...e}),En={...pn,name:"day",title:e=>e.toLanguageString(Le,Xt[Le]),numberOfDays:1,slotDuration:60,slotDivisions:2,selectedDateFormat:"{0:D}",selectedShortDateFormat:"{0:d}"};gn.displayName="KendoReactSchedulerDayView";const hn=Object.freeze({name:"@progress/kendo-react-scheduler",productName:"KendoReact",productCode:"KENDOUIREACT",productCodes:["KENDOUIREACT"],publishDate:1607496606,version:"14.5.0-develop.12",licensingDocsUrl:"https://www.telerik.com/kendo-react-ui"}),vn=f.forwardRef((e,t)=>{const{_ref:r,onRemoveClick:a}=e,l=f.useRef(null),s=f.useRef(null);f.useImperativeHandle(l,()=>({props:e,element:s.current})),f.useImperativeHandle(t,()=>l.current),f.useImperativeHandle(r,()=>l.current);const c=ya(e.editable),i=o.useLocalization().toLanguageString(Fe,Xt[Fe]),u=e.group.resources.find(e=>!(!e.colorField||void 0===e[e.colorField])),m=u&&u.colorField&&u[u.colorField],p=f.useCallback(e=>{a&&a.call(void 0,{syntheticEvent:e,target:l.current})},[a,l]),g=f.useMemo(()=>n.classNames("k-task",e.className),[e.className]);return f.createElement("div",{id:e.id,ref:s,style:e.style,className:g,tabIndex:e.tabIndex||void 0},m&&f.createElement("span",{className:"k-scheduler-mark",style:{color:m,backgroundColor:m}}),e.isRecurring&&f.createElement(n.IconWrap,{name:"arrow-rotate-cw",icon:d.arrowRotateCwIcon}),e.isException&&f.createElement(n.IconWrap,{name:"arrows-no-repeat",icon:d.arrowsNoRepeatIcon}),e.title,c.remove&&f.createElement("a",{className:"k-link k-event-delete",title:i,"aria-label":i,onClick:p},f.createElement(n.IconWrap,{name:"x",icon:d.xIcon})))});vn.displayName="KendoReactSchedulerTask";const yn=f.forwardRef((e,t)=>{const{task:r,_ref:a,...n}=e,l=f.useRef(null),o=f.useRef(null);f.useImperativeHandle(o,()=>({props:e,element:l.current&&l.current.element})),f.useImperativeHandle(a,()=>l.current),f.useImperativeHandle(t,()=>o.current);const s=r||fn.task;return f.createElement(s,{...n,_ref:l})}),fn={task:vn};yn.displayName="KendoReactSchedulerViewTask";const Dn=f.createContext([null]),kn=f.createContext([!1]),Sn=f.createContext([!1]),Cn=e=>f.createElement(Dn.Provider,{value:e.remove},f.createElement(kn.Provider,{value:e.showRemoveDialog},f.createElement(Sn.Provider,{value:e.showOccurrenceDialog},e.children))),bn=f.forwardRef((e,t)=>{const{_ref:r,onDataAction:a,viewTask:n,removeDialog:l,removeItem:o,onRemoveItemChange:s,occurrenceDialog:c,showOccurrenceDialog:i,onShowOccurrenceDialogChange:d,showRemoveDialog:u,onShowRemoveDialogChange:m,...p}=e,g=f.useRef(null);f.useImperativeHandle(g,()=>({props:e,element:g.current&&g.current.element})),f.useImperativeHandle(r,()=>g.current),f.useImperativeHandle(t,()=>g.current);const E=n||In.viewTask,h=c||In.occurrenceDialog,v=l||In.removeDialog,y=ya(e.editable),D=se(),[k,S]=ye(),[C,b]=f.useState(null),[I,w]=Ce(null,o,s),[T,R]=Ce(!1,u,m),[x,A]=Ce(!1,i,d),_=f.useCallback(t=>{y.remove&&(w(e.dataItem,t),e.isRecurring?A(!0,t):R(!0,t))},[w,e.dataItem,e.isRecurring,A,R]),M=f.useCallback(e=>{b(null),w(null,e),R(!1,e),A(!1,e)},[b,w,R,A]),N=f.useCallback(e=>{a&&I&&a.call(void 0,{type:J.remove,series:C,dataItem:I}),w(null,e),R(!1,e)},[I,S,R]),z=f.useCallback((e,t)=>{w&&w(e,t)},[w]),O=f.useCallback((e,t)=>{R&&R(e,t)},[R]),F=f.useCallback((e,t)=>{A&&A(e,t)},[A]),P=f.useCallback(t=>{I&&(b(!1),w(e.dataItem,t),R(!0,t)),A(!1,t)},[b,e.dataItem,I,w,R]),H=f.useCallback(e=>{if(I){b(!0);const t=L(I,D,k);w(t,e),R(!0,e)}A(!1,e)},[D,I,b,w,R,A]);return f.createElement(Cn,{remove:[I,z],showRemoveDialog:[T,O],showOccurrenceDialog:[x,F]},f.createElement(E,{_ref:g,...p,onRemoveClick:_}),x&&f.createElement(h,{dataItem:I,isRemove:null!==I,onClose:M,onOccurrenceClick:P,onSeriesClick:H}),T&&f.createElement(v,{dataItem:I,onClose:M,onCancel:M,onConfirm:N}))}),In={viewTask:yn,occurrenceDialog:ka,removeDialog:Sa};bn.displayName="KendoReactSchedulerEditTask";const wn=e=>{const{group:t,timezone:r,resources:l}=ae(),s=e.editTask||bn,c=e.editSlot||fa,i=f.useRef(null),u=n.useDir(i),m=o.useInternationalization(),p=o.useLocalization(),[g]=ye(),E=de(),h=se(),v=me(),y=f.useMemo(()=>cn(v,{step:a.MS_PER_DAY,timezone:r}),[v.start.getTime(),v.end.getTime(),r]),D=f.useMemo(()=>dn(0,{step:a.MS_PER_DAY},{groups:E,ranges:y}),[v.start.getTime(),v.end.getTime(),r,E,y]),k=f.useMemo(()=>Ra(g,{dateRange:v,fields:h,timezone:r}),[g,v.start.getTime(),v.end.getTime(),h,r]),S=f.useMemo(()=>Ma(k,{timezone:r},{groups:E,ranges:y}),[k,r,E,y]),C=f.useMemo(()=>n.classNames("k-scheduler-agendaview",e.className),[e.className]);return vr({element:i,selector:".k-scheduler-datecolumn",explicitDepth:!1}),vr({element:i,selector:".k-scheduler-timecolumn",explicitDepth:!1}),f.useMemo(()=>$(S,D,!0),[S,D]),f.useMemo(()=>B(S,D,!0),[S,D]),f.createElement(br,{ref:i,id:e.id,style:e.style,className:C,props:e,slots:S,ranges:y},f.createElement("div",{className:"k-scheduler-head"},f.createElement(_r,{resources:l,group:t},f.createElement(Ir.Consumer,null,({groupIndex:e})=>f.createElement("div",{className:"k-scheduler-row",key:e},f.createElement("div",{className:"k-scheduler-cell k-heading-cell k-group-cell k-scheduler-datecolumn"},p.toLanguageString(Gt,Xt[Gt])),f.createElement("div",{className:"k-scheduler-cell k-heading-cell k-group-cell k-scheduler-timecolumn"},p.toLanguageString(Bt,Xt[Bt])),f.createElement("div",{className:"k-scheduler-cell k-heading-cell k-scheduler-eventcolumn"},p.toLanguageString($t,Xt[$t])))))),f.createElement("div",{className:"k-scheduler-body"},f.createElement(_r,{resources:l,group:t,nested:!0},f.createElement(Ir.Consumer,null,({groupIndex:t})=>D.filter(e=>e.group.index===(t||0)).map((r,a,l)=>f.createElement("div",{className:"k-scheduler-row k-scheduler-content",key:`${t}:${a}`},f.createElement(c,{...r,editable:e.editable,row:l.length*(t||0)+a,col:0,slot:e.slot,viewSlot:e.viewSlot,className:"k-scheduler-datecolumn k-group-cell"},f.createElement("div",null,f.createElement("strong",{className:"k-scheduler-agendaday"},m.formatDate(r.zonedStart,"dd")),f.createElement("em",{className:"k-scheduler-agendaweek"},m.formatDate(r.zonedStart,"EEEE")),f.createElement("span",{className:"k-scheduler-agendadate"},m.formatDate(r.zonedStart,"y")))),f.createElement("div",{className:"k-scheduler-cell k-group-content"},r.items.length?r.items.map((t,r)=>f.createElement("div",{className:"k-scheduler-row",key:r},f.createElement("div",{className:"k-scheduler-cell k-scheduler-timecolumn"},f.createElement("div",null,t.tail&&f.createElement(n.IconWrap,{name:"rtl"===u?"chevron-right":"chevron-left",icon:"rtl"===u?d.chevronRightIcon:d.chevronLeftIcon}),t.isAllDay?p.toLanguageString(xe,Xt[xe]):Tn(m,t),t.head&&f.createElement(n.IconWrap,{name:"rtl"===u?"chevron-left":"chevron-right",icon:"rtl"===u?d.chevronLeftIcon:d.chevronRightIcon}))),f.createElement("div",{className:"k-scheduler-cell"},f.createElement(s,{key:`${a}:${r}`,...t,onDataAction:e.onDataAction,task:e.task,viewTask:e.viewTask,editable:e.editable})))):f.createElement("div",{className:"k-scheduler-cell k-heading-cell k-group-cell"},p.toLanguageString(Yt,Xt[Yt])))))))))},Tn=(e,t)=>{let r="{0:t}-{1:t}";return t.head?r="{0:t}":t.tail&&(r="{1:t}"),e.format(r,t.zonedStart,t.zonedEnd)},Rn={name:"agenda",title:e=>e.toLanguageString(ze,Xt[ze]),dateRange:({intl:e,date:t,numberOfDays:r=1,timezone:n})=>{const l=a.ZonedDate.fromLocalDate(t,n),o=(e=>a.getDate(e))(7===r?a.firstDayInWeek(l,e.firstDay()):l),s=((e,t)=>a.getDate(a.addDays(e,t||1)))(o,r),c=a.ZonedDate.fromUTCDate(z(o),n),i=a.ZonedDate.fromUTCDate(z(s),n);return{start:new Date(c.getTime()),end:new Date(i.getTime()),zonedStart:c,zonedEnd:i}},selectedDateFormat:"{0:D} - {1:D}",selectedShortDateFormat:"{0:d} - {1:d}",slotDuration:1440,slotDivision:1,numberOfDays:7},xn={title:r.any};wn.propTypes=xn,wn.displayName="KendoReactSchedulerAgendaView";const An=f.forwardRef((e,t)=>{const r=f.useRef(null),a=f.useRef(null),n=o.useLocalization();f.useImperativeHandle(r,()=>({element:a.current&&a.current.element,...e})),f.useImperativeHandle(t,()=>r.current);const l=f.useCallback(t=>{!e.onClick||!r.current||e.onClick.call(void 0,{target:r.current,syntheticEvent:t})},[r,e.slot,e.onClick]),c=n.toLanguageString(jt,Xt[jt]);return f.createElement(s.Button,{ref:a,tabIndex:-1,className:"k-more-events",onClick:l,"aria-label":c,icon:"more-horizontal",svgIcon:d.moreHorizontalIcon})});An.displayName="KendoReactSchedulerShowMoreItemsButton";const _n={skeleton:"dd"},Mn=e=>{const{group:t,timezone:r,resources:l}=ae(),s=e.editItem||rn,c=e.editSlot||fa,[i]=ye(),[d,u]=he(),[,m]=De(),p=le(),g=de(),E=ge(),h=me(),v=o.useInternationalization(),y=se(),D=e.itemsPerSlot||Nn.itemsPerSlot,k=f.useMemo(()=>cn(h,{step:7*a.MS_PER_DAY,timezone:r}),[h.start.getTime(),h.end.getTime(),r]),S=f.useMemo(()=>dn(0,{step:a.MS_PER_DAY},{groups:g,ranges:k}),[h.start.getTime(),h.end.getTime(),g,k]),C=f.useMemo(()=>Ra(i,{dateRange:h,fields:y,timezone:r}),[i,h.start.getTime(),h.end.getTime(),y,r]),b=f.useMemo(()=>Ma(C,{timezone:r},{groups:g,ranges:k}),[C,r,g,k]),I=f.useCallback(e=>{const t=p.find(e=>"day"===e.props.name);!m||!t||!t.props.name||!e.target.slot||(m(t.props.name,e),u(e.target.slot.start,e))},[m,p]);f.useMemo(()=>$(b,S,!0),[b,S]),f.useMemo(()=>B(b,S,!0),[b,S]);const w=f.createElement(Ir.Consumer,null,({groupIndex:t})=>f.createElement("div",{className:"k-scheduler-row",key:t},S.filter(e=>e.group.index===t&&0===e.range.index).map((t,n)=>f.createElement(on,{as:e.dateHeaderCell,key:n,"data-dayslot-index":n,date:a.ZonedDate.fromLocalDate(new Date(t.zonedEnd.getTime()-(t.zonedEnd.getTime()-t.zonedStart.getTime())/2),r),start:t.start,end:t.end,format:{skeleton:"EEEE"}})))),T=f.createElement(Ir.Consumer,null,({groupIndex:t})=>k.map((r,a)=>f.createElement("div",{className:"k-scheduler-row",key:a},S.filter(e=>e.group.index===t&&e.range.index===a).map((r,l,o)=>f.createElement(c,{slot:e.slot,viewSlot:e.viewSlot,key:l,form:e.form,...r,expandable:{offsetTop:30,offsetBottom:D<r.items.length?15:0},onDataAction:e.onDataAction,col:"horizontal"===E?o.length*(t||0)+l:l,row:"horizontal"===E?a:k.length*(t||0)+a,editable:e.editable,className:n.classNames({"k-other-month":r.start.getMonth()<d.getMonth()||r.start.getMonth()>d.getMonth()})},f.createElement("span",{className:"k-link k-nav-day"},v.formatDate(new Date(r.end.getTime()-(r.end.getTime()-r.start.getTime())/2),_n)),D<r.items.length&&f.createElement(An,{slot:r,onClick:I}))))));return f.createElement(br,{props:e,slots:S,ranges:k,className:n.classNames("k-scheduler-monthview",e.className)},f.createElement("div",{className:"k-scheduler-head"},"horizontal"===E?f.createElement(wr,{nested:!0,resources:l,group:t},w):f.createElement(_r,{resources:l,group:t},w)),f.createElement("div",{className:"k-scheduler-body"},"horizontal"===E?f.createElement(wr,{resources:l,group:t},T):f.createElement(_r,{nested:!0,resources:l,group:t},T),b.filter(e=>null===e.order||e.order<D).sort(q).map(t=>f.createElement(s,{item:e.item,viewItem:e.viewItem,form:e.form,key:t.isRecurring?`${t.uid}:${t.group.index}:${t.range.index}:${t.originalStart}`:`${t.uid}:${t.group.index}:${t.range.index}`,...t,onDataAction:e.onDataAction,style:{transform:"translateY(30px)"},vertical:!1,editable:e.editable,ignoreIsAllDay:!0}))))},Nn={name:"month",dateRange:({intl:e,date:t,timezone:r})=>{const n=a.firstDayInWeek(a.firstDayOfMonth(a.getDate(t)),e.firstDay()),l=a.addDays(a.firstDayInWeek(a.lastDayOfMonth(a.getDate(t)),e.firstDay()),7),o=a.ZonedDate.fromUTCDate(z(n),r),s=a.ZonedDate.fromUTCDate(z(l),r);return{start:new Date(o.getTime()),end:new Date(s.getTime()),zonedStart:o,zonedEnd:s}},slotDuration:1440,slotDivision:1,itemsPerSlot:2,numberOfDays:31,title:e=>e.toLanguageString(Oe,Xt[Oe]),selectedDateFormat:"{0:Y}",selectedShortDateFormat:"{0:Y}"},zn={itemsPerSlot:r.number};Mn.propTypes=zn,Mn.displayName="KendoReactSchedulerMonthView";const Ln=e=>f.createElement(mn,{...e,step:7,numberOfDays:7}),On={name:"week",slotDuration:60,slotDivisions:2,numberOfDays:7,dateRange:({intl:e,date:t,timezone:r})=>{const n=a.ZonedDate.fromLocalDate(t,r),l=(e=>a.getDate(e))(a.firstDayInWeek(n,e.firstDay())),o=((e,t)=>a.getDate(a.addDays(e,t)))(l,7),s=a.ZonedDate.fromUTCDate(z(l),r),c=a.ZonedDate.fromUTCDate(z(o),r);return{start:new Date(s.getTime()),end:new Date(c.getTime()),zonedStart:s,zonedEnd:c}},title:e=>e.toLanguageString(Me,Xt[Me]),selectedDateFormat:"{0:D} - {1:D}",selectedShortDateFormat:"{0:d} - {1:d}"};Ln.displayName="KendoReactSchedulerWeekView";const Fn=e=>{const t=me(),r=Math.round((t.end.getTime()-t.start.getTime())/a.MS_PER_DAY);return f.createElement(mn,{...e,step:7,numberOfDays:r})},Pn={name:"work-week",slotDuration:60,slotDivisions:2,numberOfDays:7,dateRange:({intl:e,date:t,timezone:r,...n})=>{const l=a.ZonedDate.fromLocalDate(t,r),o=void 0!==n.workWeekStart?n.workWeekStart:a.Day.Monday,s=void 0!==n.workWeekEnd?n.workWeekEnd:a.Day.Friday,c=s<o?7+s-o+1:s-o+1,i=a.getDate(((e,t=a.Day.Sunday)=>{let r=e.clone();for(;r.getDay()!==t;)r=r.addDays(-1);return r})(l,o)),d=a.addDays(i,c),u=a.ZonedDate.fromUTCDate(z(i),r),m=a.ZonedDate.fromUTCDate(z(d),r);return{start:new Date(u.getTime()),end:new Date(m.getTime()),zonedStart:u,zonedEnd:m}},title:e=>e.toLanguageString(Ne,Xt[Ne]),workWeekStart:a.Day.Monday,workWeekEnd:a.Day.Friday,selectedDateFormat:"{0:D} - {1:D}",selectedShortDateFormat:"{0:d} - {1:d}"};Fn.displayName="KendoReactSchedulerWorkWeekView";const Hn=f.createElement("div",{className:"k-scheduler-cell k-side-cell"}),Wn=e=>f.createElement(f.Fragment,null,f.createElement("div",{className:"k-sticky-cell"},Hn),e.children),Kn=e=>{const t=o.useLocalization();return f.createElement(f.Fragment,null,f.createElement("div",{className:"k-sticky-cell"},f.createElement("div",{className:"k-scheduler-cell k-heading-cell k-side-cell k-scheduler-times-all-day","data-range-index":0},t.toLanguageString(Re,Xt[Re]))),e.children)},Vn=e=>{const{group:t,timezone:r,resources:l}=ae(),s=f.useRef(null),c=f.useRef(null),i=e.editItem||rn,d=e.editSlot||fa,u=f.useRef(null),[m]=ye(),p=ge(),g=de(),E=me(),h=se(),v=o.useInternationalization(),y=e.showWorkHours,D=e.slotDivisions||Gn.slotDivisions,k=e.slotDuration||Gn.slotDuration,S=e.workWeekStart||Gn.workWeekStart,C=e.workWeekEnd||Gn.workWeekEnd,b=v.parseDate(e.workDayStart||e.isWorkDayStart||Gn.isWorkDayStart),I=v.parseDate(e.workDayEnd||e.isWorkDayEnd||Gn.isWorkDayEnd),w=v.parseDate(e.startTime||Gn.startTime),x=v.parseDate(e.endTime||Gn.endTime),A=f.useMemo(()=>y?b:w,[y,b,w]),_=f.useMemo(()=>y?I:x,[y,I,x]),M=f.useMemo(()=>cn(E,{step:a.MS_PER_DAY,timezone:r}),[E.start.getTime(),E.end.getTime(),r]),N=f.useMemo(()=>dn(0,{step:k/D*a.MS_PER_MINUTE},{groups:g,ranges:M}).filter(e=>K(e.zonedStart,A,_)||A.getTime()===_.getTime()),[g,M,E.start.getTime(),E.end.getTime(),r,k,D,A.getTime(),_.getTime()]),L=f.useMemo(()=>Ra(m,{dateRange:E,fields:h,timezone:r}),[m,E.start.getTime(),E.end.getTime(),h,r]),O=f.useMemo(()=>Ma(L,{timezone:r},{groups:g,ranges:M}).filter(e=>A.getTime()===_.getTime()||K(e.zonedStart,A,_)||K(e.zonedEnd,A,_)||K(new Date(e.zonedEnd.getTime()-(e.zonedEnd.getTime()-e.zonedStart.getTime())/2),A,_)),[L,r,g,M,A.getTime(),_.getTime()]);f.useMemo(()=>$(O,N,!0),[O,N]),f.useMemo(()=>B(O,N,!0),[O,N]);const F=("horizontal"===p?N.length:N.length/g.length)*((e.columnWidth||Gn.columnWidth)+1),P=f.createElement(Ir.Consumer,null,()=>f.createElement(f.Fragment,null,f.createElement("div",{className:"k-scheduler-row"},M.map((t,r)=>f.createElement(on,{as:e.dateHeaderCell,key:r,date:t.zonedStart,start:t.start,end:t.end,format:"m"}))),f.createElement("div",{className:"k-scheduler-row",ref:s},M.map((t,r)=>N.filter(e=>0===e.group.index&&e.range.index===r).map(t=>t.zonedStart.getMinutes()%k===0?f.createElement(Wr,{key:t.index,as:e.timeHeaderCell,format:"t",date:t.zonedStart,start:t.zonedStart,end:t.zonedEnd}):null))))),W=f.createElement(Ir.Consumer,null,({groupIndex:t})=>f.createElement("div",{className:"k-scheduler-row"},M.map((n,l)=>N.filter(e=>e.group.index===t&&e.range.index===l).map((n,o,s)=>{const c=a.ZonedDate.fromUTCDate(z(n.zonedStart),r),i=V(c.getDay(),S,C);return f.createElement(d,{key:`${n.start.getTime()}:${n.group.index}`,slot:e.slot,viewSlot:e.viewSlot,...n,form:e.form,onDataAction:e.onDataAction,isWorkHour:K(n.zonedStart,b,I),isWorkDay:i,col:"horizontal"===p?l*s.length+o+s.length*M.length*(t||0):l*s.length+o,row:"horizontal"===p?0:t||0,expandable:!0,editable:e.editable})})))),G=f.useMemo(()=>n.classNames("k-scheduler-timelineview",e.className),[e.className]);vr({element:u,selector:".k-resource-cell",attribute:"data-depth-index",explicitDepth:!0});const U=u.current?u.current.closest(".k-scheduler-layout"):null;return Ia({element:U,selector:".k-resource-row",horizontalAttribute:"data-depth-index",verticalAttribute:"data-resource-index",applyTo:".k-resource-cell",syncHeight:O&&!O.length}),f.createElement(br,{ref:u,id:e.id,style:{...e.style},className:G,props:e,slots:N,ranges:M},f.createElement("div",{className:"k-scheduler-head",style:{width:F}},"horizontal"===p?f.createElement(wr,{nested:!0,group:t,resources:l,rowContent:Wn},P):f.createElement(_r,{wrapGroup:!0,group:t,resources:l},P)),f.createElement("div",{className:"k-scheduler-body",style:{width:F},ref:c},"horizontal"===p?f.createElement(wr,{group:t,resources:l,rowContent:Kn},W,f.createElement(Ir.Consumer,null,({groupIndex:t})=>e.currentTimeMarker&&H(T(M).start,R(M).end,new Date,new Date,!0)&&f.createElement(nn,{groupIndex:t,attachArrow:s,vertical:!0}))):f.createElement(_r,{nested:!0,wrapGroup:!0,group:t,resources:l},W),"vertical"===p&&e.currentTimeMarker&&H(T(M).start,R(M).end,new Date,new Date,!0)&&f.createElement(nn,{attachArrow:s,vertical:!0}),O.sort(q).map((t,r)=>f.createElement(i,{key:t.isRecurring?`${t.uid}:${t.group.index}:${t.range.index}:${t.originalStart}`:`${t.uid}:${t.group.index}:${t.range.index}`,...t,format:"t",form:e.form,onDataAction:e.onDataAction,item:e.item,viewItem:e.viewItem,editable:e.editable,ignoreIsAllDay:!0,vertical:!1,isLast:r===O.length-1}))))},Gn={name:"multi-day-timeline",title:"Multi Day Timeline",currentTimeMarker:!0,dateRange:({date:e,numberOfDays:t=1,timezone:r})=>{const n=a.ZonedDate.fromLocalDate(e,r),l=a.getDate(n),o=a.addDays(l,t),s=a.ZonedDate.fromUTCDate(z(l),r),c=a.ZonedDate.fromUTCDate(z(o),r);return{start:new Date(s.getTime()),end:new Date(c.getTime()),zonedStart:s,zonedEnd:c}},selectedDateFormat:"{0:D} - {1:D}",selectedShortDateFormat:"{0:d} - {1:d}",numberOfDays:1,startTime:"00:00",endTime:"00:00",isWorkDayStart:"8:00",isWorkDayEnd:"17:00",workWeekStart:a.Day.Monday,workWeekEnd:a.Day.Friday,slotDivisions:2,slotDuration:60,defaultShowWorkHours:!0,columnWidth:100},Bn=e=>f.createElement(Vn,{...e}),$n={...Gn,name:"timeline",title:e=>e.toLanguageString(_e,Xt[_e]),slotDuration:60,slotDivisions:2,numberOfDays:1,selectedDateFormat:"{0:D}",selectedShortDateFormat:"{0:d}"};Bn.displayName="KendoReactSchedulerTimelineView";const Un=new Map;Un.set(wn,Rn),Un.set(gn,En),Un.set(Mn,Nn),Un.set(Ln,On),Un.set(Fn,Pn),Un.set(Bn,$n);const Zn=f.forwardRef((e,t)=>{var r,l,c;const i=!n.validatePackage(hn,{component:"Scheduler"}),u=n.getLicenseMessage(hn),{timezone:m,onDataChange:p}=e,g=f.useRef(null),E=f.useRef(null);f.useImperativeHandle(E,()=>({props:e,element:g.current})),f.useImperativeHandle(t,()=>E.current);const h=n.useRtl(g),v=o.useInternationalization(),y=o.useLocalization(),{fields:D}=f.useMemo(()=>(e=>({fields:{...W,...e}}))(e.modelFields),[e.modelFields]),[C,b]=Ce(e.defaultDate||qn.defaultDate,e.date,e.onDateChange),I=f.Children.toArray(e.children||[]).map(e=>{var t;return f.isValidElement(e)?f.cloneElement(e,{...Un.get(e.type),...null!=(t=e.props)?t:{}}):e}),w=f.cloneElement(f.createElement(gn,null),Un.get(gn)),[T,R]=Ce(e.defaultView||I[0]&&I[0].props.name||"day",e.view,e.onViewChange),[x,A]=Ce(!0),N=I.find(e=>e.props.name===T)||I[0]||w,z=(null!=(r=e.data)?r:qn.data)||qn.data,O=((e,t)=>{const r=S(e,t),a=k(r);return 1===a.length?[{index:0,resources:(t||[]).reduce((e,t)=>[...e,...t.data.map(e=>({...e,field:t.field,valueField:t.valueField,colorField:t.colorField,multiple:t.multiple}))],[])}]:a.map((e,t)=>({index:t,resources:e}))})(e.group,e.resources),F=e.group&&e.group.orientation?e.group.orientation:"horizontal",P=N.props.selectedDateFormat||"{0:D}",H=N.props.selectedShortDateFormat||"{0:d}",K=N.props.slotDuration,V=void 0!==N.props.dateRange?"function"==typeof N.props.dateRange?N.props.dateRange.call(void 0,{intl:v,date:C,timezone:m,numberOfDays:N.props.numberOfDays,workWeekStart:N.props.workWeekStart||v.firstDay(),workWeekEnd:N.props.workWeekEnd||(v.firstDay()+N.props.numberOfDays)%6}):N.props.dateRange:{start:qn.defaultDate,end:qn.defaultDate},G=f.useCallback(({created:e=[],updated:t=[],deleted:r=[]})=>{if(p){const a={created:e,updated:t,deleted:r};p.call(void 0,a)}},[p]),B=f.useCallback(e=>{const t=[e.dataItem];G({created:t})},[G]),$=f.useCallback(e=>{const t=[],r=[];if(e.series)if(Array.isArray(e.dataItem))e.dataItem.forEach(t=>{const a=n.clone(L(e.dataItem,D,z)),l=n.clone(t);M(l,D.originalStart,_(a,D.originalStart)),M(l,D.recurrenceId,_(a,D.recurrenceId)),M(l,D.recurrenceExceptions,_(a,D.recurrenceExceptions)),r.push(l)});else{const t=n.clone(L(e.dataItem,D,z)),a=n.clone(e.dataItem);M(a,D.originalStart,_(t,D.originalStart)),M(a,D.recurrenceId,_(t,D.recurrenceId)),M(a,D.recurrenceExceptions,_(t,D.recurrenceExceptions)),r.push(a)}else if(Array.isArray(e.dataItem))e.dataItem.forEach(e=>{const a=null!==_(e,D.recurrenceRule)&&void 0!==_(e,D.recurrenceRule);if(null!==_(e,D.recurrenceId)&&void 0!==_(e,D.recurrenceId)&&a){const a=n.clone(L(e,D,z)),l=_(e,D.originalStart),o=_(a,D.recurrenceExceptions)||[];M(a,D.recurrenceExceptions,[...o,l]),M(e,D.recurrenceRule,null),r.push(a),t.push(e)}else r.push(e)});else{const a=null!==_(e.dataItem,D.recurrenceRule)&&void 0!==_(e.dataItem,D.recurrenceRule);if(null!==_(e.dataItem,D.recurrenceId)&&void 0!==_(e.dataItem,D.recurrenceId)&&a){const a=n.clone(L(e.dataItem,D,z)),l=_(e.dataItem,D.originalStart),o=_(a,D.recurrenceExceptions)||[];M(a,D.recurrenceExceptions,[...o,l]),M(e.dataItem,D.recurrenceRule,null),r.push(a),t.push(e.dataItem)}else r.push(e.dataItem)}G({updated:r,created:t})},[G,D,z]),U=f.useCallback(e=>{const t=[],r=[];if(e.series){const t=n.clone(L(e.dataItem,D,z)),a=n.clone(e.dataItem);M(a,D.originalStart,_(t,D.originalStart)),M(a,D.recurrenceId,_(t,D.recurrenceId)),M(a,D.recurrenceRule,_(t,D.recurrenceRule)),M(a,D.recurrenceExceptions,_(t,D.recurrenceExceptions)),r.push(a)}else if(null===_(e.dataItem,D.recurrenceRule)||void 0===_(e.dataItem,D.recurrenceRule))r.push(e.dataItem);else{const r=n.clone(L(e.dataItem,D,z)),a=_(e.dataItem,D.originalStart),l=_(r,D.recurrenceExceptions)||[];M(r,D.recurrenceExceptions,[...l,a]),M(e.dataItem,D.recurrenceRule,null),t.push(r)}G({updated:t,deleted:r})},[G,D,z]),Z=f.useCallback(e=>{switch(e.type){case J.create:B(e);break;case J.update:$(e);break;case J.remove:U(e)}},[B,U,$]),q=f.useCallback((e,t)=>{R(e,{...t,target:E.current})},[R,E]),Y=f.useCallback((e,t)=>{b(e,{...t,target:E.current})},[b,E]),j=f.useCallback(e=>{e.value&&b(e.value,{...e,target:E.current,nativeEvent:e.nativeEvent})},[b,E]),X=f.useCallback(e=>{var t,r;e.preventDefault();const n=null!=(r=null!=(t=N.props.step)?t:N.props.numberOfDays)?r:1,l=n>27?a.addMonths(C,Math.round(n/27)):a.addDays(C,n);b(l,e)},[C,b,N.props.numberOfDays,N.props.step]),Q=f.useCallback(e=>{var t,r;e.preventDefault();const n=null!=(r=null!=(t=N.props.step)?t:N.props.numberOfDays)?r:1,l=n>27?a.addMonths(C,-Math.round(n/27)):a.addDays(C,-n);b(l,e)},[C,b,N.props.numberOfDays,N.props.step]),ee=f.useCallback(e=>{e.preventDefault();const t=a.ZonedDate.fromLocalDate(new Date,m);b(new Date(t.getTime()),e)},[b,m]),te=f.useCallback(()=>{A(!x)},[A,x]),re=f.useCallback(()=>{g.current&&(g.current.style.boxShadow="0 0.5px 0.5px 0.5px rgba(0, 0, 0, .12)")},[g]),ae=f.useCallback(()=>{g.current&&(g.current.style.boxShadow="")},[g]),ne=f.useMemo(()=>{var t;return{...e.style,height:null!=(t=e.height)?t:qn.height}},[e.height,e.style]),le=f.useMemo(()=>n.classNames({"k-rtl":void 0!==e.rtl?e.rtl:"rtl"===h},"k-scheduler",e.className),[e.className,e.rtl,h]),oe=y.toLanguageString(Ae,Xt[Ae]),se=y.toLanguageString(Pe,Xt[Pe]),ce=y.toLanguageString(He,Xt[He]),ie=N.props.header||e.header||qn.header,de=N.props.footer||e.footer||qn.footer,ue=Ie,[me,pe]=f.useState(null);return f.createElement(Se,{element:g,props:e,views:I,fields:D,groups:O,dateRange:V,orientation:F,dateFormat:{dateFormat:P,shortDateFormat:H},date:[C,Y],activeView:[T,q],selection:[me,pe],data:[z,Z]},f.createElement("div",{ref:g,id:e.id,style:ne,className:le,tabIndex:null!=(l=e.tabIndex)?l:qn.tabIndex,dir:h,role:e.role||"application","aria-label":e.ariaLabel,"aria-labelledby":e.ariaLabelledby,"aria-activedescendant":me&&me.props.id||void 0,onFocus:re,onBlur:ae},f.createElement(ie,null,f.createElement(ue,null,f.createElement(s.ButtonGroup,{className:"k-scheduler-navigation"},f.createElement(s.Button,{role:"button",tabIndex:-1,title:oe,"aria-label":oe,onClick:ee},oe),f.createElement(s.Button,{role:"button",tabIndex:-1,icon:"rtl"===h?"chevron-right":"chevron-left",svgIcon:"rtl"===h?d.chevronRightIcon:d.chevronLeftIcon,title:se,"aria-label":se,onClick:Q}),f.createElement(s.Button,{role:"button",tabIndex:-1,icon:"rtl"===h?"chevron-left":"chevron-right",svgIcon:"rtl"===h?d.chevronLeftIcon:d.chevronRightIcon,title:ce,"aria-label":ce,onClick:X}))),f.createElement(Qt,{value:C,onChange:j}),f.createElement(s.ToolbarSpacer,null),f.createElement(Jt,null)),N&&f.createElement(N.type,{editable:null!=(c=e.editable)?c:qn.editable,key:N.props.name,item:e.item,viewItem:e.viewItem,editItem:e.editItem,task:e.task,viewTask:e.viewTask,editTask:e.viewTask,slot:e.slot,viewSlot:e.viewSlot,editSlot:e.editSlot,form:e.form,onDataAction:Z,showWorkHours:x,...N.props}),f.createElement(de,null,K&&K<1440&&f.createElement(er,null,f.createElement(s.Button,{tabIndex:-1,onClick:te,icon:"clock",svgIcon:d.clockIcon},y.toLanguageString(x?We:Ke,Xt[x?We:Ke])))),i&&f.createElement(n.WatermarkOverlay,{message:u})))}),qn={data:[],height:600,tabIndex:-1,editable:!1,defaultDate:new Date,header:be,footer:Te,navigation:Ie,viewSelector:we};Zn.propTypes={data:r.array,editable:r.oneOfType([r.bool,r.shape({add:r.bool,drag:r.bool,edit:r.bool,remove:r.bool,resize:r.bool})]),view:r.string,defaultView:r.string,date:r.any,defaultDate:r.any,rtl:r.bool,height:r.oneOfType([r.number,r.string]),children:r.any,timezone:r.string,group:r.any,resources:r.any,modelFields:r.shape({id:r.string,start:r.string,startTimezone:r.string,end:r.string,endTimezone:r.string,isAllDay:r.string,title:r.string,description:r.string,recurrenceRule:r.string,recurrenceId:r.string,recurrenceException:r.string})},Zn.displayName="KendoReactScheduler";const Yn=f.forwardRef((e,t)=>{const{item:r,_ref:a,itemRef:l,...s}=e,c=f.useRef(void 0),i=f.useRef(null),u=f.useRef(null),m=f.useRef(null);f.useImperativeHandle(u,()=>({props:e,element:i.current&&i.current.element})),f.useImperativeHandle(t,()=>u.current),f.useImperativeHandle(a,()=>i.current),f.useImperativeHandle(l,()=>i.current);const p=r||jn.item,g=o.useInternationalization(),[E]=sr(),[h]=lr(),v=te(),[y,D]=f.useState(!0),[k,S]=f.useState(!1),C=f.useRef(0),I=f.useRef(null),x=f.useRef([]),A=n.useDir(v),_=f.useMemo(()=>{var t,r;return e.isAllDay?null!=(t=e.title)?t:"":`(${g.format("{0:t} - {1:t}",e.zonedStart,e.zonedEnd)}): ${null!=(r=e.title)?r:""}`},[g,e.isAllDay,e.title,e.zonedEnd,e.zonedStart]),M=()=>{var t,r,a,n,l;const o=h.filter(t=>t.current&&((t,r)=>t.group.index===r.group.index&&t.range.index===r.range.index&&(void 0===t.range.isAllDay||void 0===r.range.isAllDay||t.range.isAllDay===r.range.isAllDay)&&(e.ignoreIsAllDay||t.isAllDay===r.isAllDay))(t.current.props,e)).sort((e,t)=>e.current.props.start.getTime()-t.current.props.start.getTime()),s=o.filter(t=>H(t.current.props.start,t.current.props.end,e.start,e.end)),c=i.current&&i.current.element;if(!c||!s.length)return;const d=T(o),u=R(o),m=T(s),p=R(s);if(!(m.current&&i.current&&p.current&&d.current&&u.current))return;if(!H(m.current.props.start,p.current.props.end,e.start,e.end))return void D(!1);const g=[],v=[],y=[],f=b(m.current.element),k=(e.vertical?f.height:f.width)/(m.current.props.end.getTime()-m.current.props.start.getTime()),A=(e.vertical?25:8)/k,_=(Math.min(e.start.getTime(),p.current.props.end.getTime()-A)-m.current.props.start.getTime())*k,M=Math.floor(Math.min(e.end.getTime(),p.current.props.end.getTime())-Math.max(e.start.getTime(),m.current.props.start.getTime()))*k;(E||[]).forEach(e=>{e.current&&(e.current.props.dragHint?v.push(e.current):e.current.props.resizeHint?y.push(e.current):g.push(e.current))}),x.current=((t,r,a)=>{const[n,l]=r,o=new Date(Math.min(l.props.end.getTime()-a,Math.max(e.start.getTime(),n.props.start.getTime()))),s=new Date(Math.max(o.getTime()+a,Math.min(e.end.getTime(),l.props.end.getTime())));return t.filter(t=>{const r=Math.max(Math.min(l.props.end.getTime()-a,t.props.start.getTime()),n.props.start.getTime()),c=Math.min(Math.max(r+a,t.props.end.getTime()),l.props.end.getTime());return t.props.id!==e.id&&t.props.group.index===e.group.index&&t.props.range.index===e.range.index&&(e.ignoreIsAllDay||t.props.isAllDay===e.isAllDay)&&H(new Date(r),new Date(c),o,s)&&H(n.props.start,l.props.end,t.props.start,t.props.end)})})(g,[d.current,u.current],A),I.current=e.resizeHint||e.dragHint?0:((e,t)=>{const r=new Set;return t.forEach(e=>{void 0!==e._order&&null!==e._order&&r.add(e._order)}),G(Array.from(r))})(i.current,x.current);let N=1;e.resizeHint||e.dragHint||(N=((e,t)=>{let r=0;return t.forEach(e=>{void 0!==e._order&&null!==e._order&&r<e._order&&(r=e._order)}),r+1})(i.current,x.current),x.current.forEach(e=>{e._maxSiblingsPerSlot&&N<e._maxSiblingsPerSlot&&(N=e._maxSiblingsPerSlot)}),x.current.forEach(e=>{void 0!==e._maxSiblingsPerSlot&&null!==e._maxSiblingsPerSlot&&e._maxSiblingsPerSlot<N&&(e._maxSiblingsPerSlot=N)}));let z=0;const L=f;x.current.forEach(e=>{let t=0;void 0!==e._order&&null!==e._order&&e._order<I.current&&(t=b(e.element).top+b(e.element).height-L.top-1*I.current+1),t>z&&(z=t)});L.width=e.vertical?L.width/N-1-20/N:M-1,e.vertical?L.height=M-1:(e.resizeHint||e.dragHint)&&N<=1||(L.height=null!=(r=null==(t=e.style)?void 0:t.height)?r:25),L.left=e.vertical?L.left+(null!=(a=I.current)?a:0)+1*(null!=(n=I.current)?n:0)*L.width:L.left+(_<0?0:_),L.top=e.vertical?L.top+(_<0?0:_):L.top+z+1*(null!=(l=I.current)?l:0),C.current=N,w(c,L),S(!0),D(!0)},N=f.useCallback(e=>{const t=e&&e[0],r=m.current;void 0!==c.current&&window.cancelAnimationFrame(c.current),r&&t&&(r.width!==t.contentRect.width||r.height!==t.contentRect.height)&&(c.current=window.requestAnimationFrame(()=>{M()})),m.current={width:t.contentRect.width,height:t.contentRect.height}},[M]);f.useEffect(M);const z=i.current&&i.current.element?i.current.element.closest(".k-scheduler-layout"):null;return Ia({element:z,selector:".k-resource-row",horizontalAttribute:"data-depth-index",verticalAttribute:"data-resource-index",applyTo:".k-resource-cell",syncHeight:e.isLast}),f.useEffect(()=>{if(!v.current)return;const e=window.ResizeObserver,t=e&&new e(N);return t&&t.observe(v.current),()=>{t&&t.disconnect()}},[N,v]),f.createElement(p,{...s,_ref:i,_order:I,_maxSiblingsPerSlot:C,_siblings:x,itemRef:i,style:{visibility:k?void 0:"hidden",display:y?void 0:"none",...e.style}},!e.resizeHint&&f.createElement("span",{className:"k-event-actions"},e.tail&&f.createElement(n.IconWrap,{name:"rtl"===A?"chevron-right":"chevron-left",icon:"rtl"===A?d.chevronRightIcon:d.chevronLeftIcon}),e.isRecurring&&!e.isException&&f.createElement(n.IconWrap,{name:"reload",icon:d.arrowRotateCwIcon}),!e.isRecurring&&e.isException&&f.createElement(n.IconWrap,{name:"non-recurrence",icon:d.nonRecurrenceIcon})),!e.resizeHint&&f.createElement("div",{title:_},!e.isAllDay&&f.createElement(ba,{className:"k-event-time"},_),f.createElement(ba,null,e.title)))}),jn={item:Ca};Yn.displayName="KendoReactSchedulerProportionalViewItem",e.AgendaView=wn,e.DATA_ACTION=J,e.DRAG_ITEM_ACTION=Ja,e.DateHeaderCell=on,e.DayView=gn,e.ITEMS_FOCUS_ACTION=Cr,e.ITEMS_SELECT_ACTION=Er,e.MonthView=Mn,e.REMOVE_ITEM_ACTION=Xa,e.RESIZE_ITEM_ACTION=en,e.SERIES_ACTION=tn,e.SHOW_OCCURRENCE_DIALOG_ACTION=ja,e.SHOW_REMOVE_DIALOG_ACTION=Qa,e.SLOTS_FOCUS_ACTION=yr,e.SLOTS_SELECT_ACTION=hr,e.Scheduler=Zn,e.SchedulerActiveViewContext=fe,e.SchedulerDataContext=ve,e.SchedulerDateContext=Ee,e.SchedulerDateRangeContext=ue,e.SchedulerDrag=Fa,e.SchedulerEditItem=rn,e.SchedulerEditItemDragItemContext=Ga,e.SchedulerEditItemFormItemContext=Va,e.SchedulerEditItemPropsContext=Ka,e.SchedulerEditItemRemoveItemContext=$a,e.SchedulerEditItemResizeItemContext=Ba,e.SchedulerEditItemShowOccurrenceDialogContext=Za,e.SchedulerEditItemShowRemoveDialogContext=Ua,e.SchedulerEditSlot=fa,e.SchedulerEditSlotFormItemContext=ha,e.SchedulerEditSlotPropsContext=Ea,e.SchedulerEditTask=bn,e.SchedulerFieldsContext=oe,e.SchedulerFooter=Te,e.SchedulerForm=ia,e.SchedulerFormEditor=sa,e.SchedulerGroupsContext=ie,e.SchedulerHeader=be,e.SchedulerItem=Ca,e.SchedulerItemContent=ba,e.SchedulerOccurrenceDialog=ka,e.SchedulerOrientationContext=pe,e.SchedulerProportionalViewItem=Yn,e.SchedulerPropsContext=re,e.SchedulerRemoveDialog=Sa,e.SchedulerResize=Ha,e.SchedulerSlot=ua,e.SchedulerTask=vn,e.SchedulerViewItem=wa,e.SchedulerViewSlot=pa,e.SchedulerViewTask=yn,e.SchedulerViewsContext=ne,e.TimeHeaderCell=Wr,e.TimelineView=Bn,e.WeekView=Ln,e.WorkWeekView=Fn,e.agendaViewDefaultProps=Rn,e.dateHeaderCellDefaultProps=sn,e.dayViewDefaultProps=En,e.monthViewDefaultProps=Nn,e.schedulerDefaultProps=qn,e.schedulerDragDefaultProps=Pa,e.schedulerEditItemDefaultProps=an,e.schedulerEditSlotDefaultProps=Da,e.schedulerEditTaskDefaultProps=In,e.schedulerFormDefaultProps=da,e.schedulerFormEditorDefaultProps=ca,e.schedulerProportionalViewItemDefaultProps=jn,e.schedulerResizeDefaultProps=Wa,e.schedulerSlotDefaultProps=ma,e.schedulerViewItemDefaultProps=Ta,e.schedulerViewSlotDefaultProps=ga,e.schedulerViewTaskDefaultProps=fn,e.timeHeaderCellDefaultProps=Kr,e.timeLineViewDefaultProps=$n,e.useSchedulerActiveViewContext=De,e.useSchedulerDataContext=ye,e.useSchedulerDateContext=he,e.useSchedulerDateRangeContext=me,e.useSchedulerEditItemDragItemContext=()=>f.useContext(Ga),e.useSchedulerEditItemFormItemContext=()=>f.useContext(Va),e.useSchedulerEditItemPropsContext=()=>f.useContext(Ka),e.useSchedulerEditItemRemoveItemContext=()=>f.useContext($a),e.useSchedulerEditItemResizeItemContext=()=>f.useContext(Ba),e.useSchedulerEditItemShowOccurrenceDialogContext=()=>f.useContext(Za),e.useSchedulerEditItemShowRemoveDialogContext=()=>f.useContext(Ua),e.useSchedulerEditSlotFormItemContext=()=>f.useContext(ha),e.useSchedulerEditSlotPropsContext=()=>f.useContext(Ea),e.useSchedulerFieldsContext=se,e.useSchedulerGroupsContext=de,e.useSchedulerOrientationContext=ge,e.useSchedulerPropsContext=ae,e.useSchedulerViewsContext=le,e.weekViewDefaultProps=On,e.workWeekDefaultProps=Pn});
@@ -5,4 +5,4 @@
5
5
  * Licensed under commercial license. See LICENSE.md in the package root for more information
6
6
  *-------------------------------------------------------------------------------------------
7
7
  */
8
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=Object.freeze({name:"@progress/kendo-react-scheduler",productName:"KendoReact",productCode:"KENDOUIREACT",productCodes:["KENDOUIREACT"],publishDate: 1778664338,version:"14.5.0-develop.10",licensingDocsUrl:"https://www.telerik.com/kendo-react-ui"});exports.packageMetadata=e;
8
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=Object.freeze({name:"@progress/kendo-react-scheduler",productName:"KendoReact",productCode:"KENDOUIREACT",productCodes:["KENDOUIREACT"],publishDate: 1778677221,version:"14.5.0-develop.12",licensingDocsUrl:"https://www.telerik.com/kendo-react-ui"});exports.packageMetadata=e;
@@ -6,7 +6,7 @@ export const packageMetadata = Object.freeze({
6
6
  productName: 'KendoReact',
7
7
  productCode: 'KENDOUIREACT',
8
8
  productCodes: ['KENDOUIREACT'],
9
- publishDate: 1778664338,
10
- version: '14.5.0-develop.10',
9
+ publishDate: 1778677221,
10
+ version: '14.5.0-develop.12',
11
11
  licensingDocsUrl: 'https://www.telerik.com/kendo-react-ui'
12
12
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@progress/kendo-react-scheduler",
3
- "version": "14.5.0-develop.10",
3
+ "version": "14.5.0-develop.12",
4
4
  "description": "React Scheduler brings the functionality of Outlook's Calendar to a single UI component. KendoReact Scheduler package",
5
5
  "author": "Progress",
6
6
  "license": "SEE LICENSE IN LICENSE.md",
@@ -29,15 +29,15 @@
29
29
  "@progress/kendo-date-math": "^1.4.1",
30
30
  "@progress/kendo-drawing": "^1.21.2",
31
31
  "@progress/kendo-licensing": "^1.7.2",
32
- "@progress/kendo-react-buttons": "14.5.0-develop.10",
33
- "@progress/kendo-react-common": "14.5.0-develop.10",
34
- "@progress/kendo-react-dateinputs": "14.5.0-develop.10",
35
- "@progress/kendo-react-dialogs": "14.5.0-develop.10",
36
- "@progress/kendo-react-dropdowns": "14.5.0-develop.10",
37
- "@progress/kendo-react-form": "14.5.0-develop.10",
38
- "@progress/kendo-react-inputs": "14.5.0-develop.10",
39
- "@progress/kendo-react-intl": "14.5.0-develop.10",
40
- "@progress/kendo-react-popup": "14.5.0-develop.10",
32
+ "@progress/kendo-react-buttons": "14.5.0-develop.12",
33
+ "@progress/kendo-react-common": "14.5.0-develop.12",
34
+ "@progress/kendo-react-dateinputs": "14.5.0-develop.12",
35
+ "@progress/kendo-react-dialogs": "14.5.0-develop.12",
36
+ "@progress/kendo-react-dropdowns": "14.5.0-develop.12",
37
+ "@progress/kendo-react-form": "14.5.0-develop.12",
38
+ "@progress/kendo-react-inputs": "14.5.0-develop.12",
39
+ "@progress/kendo-react-intl": "14.5.0-develop.12",
40
+ "@progress/kendo-react-popup": "14.5.0-develop.12",
41
41
  "@progress/kendo-svg-icons": "^4.9.0 || ^5.0.0",
42
42
  "react": "^18.0.0 || ^19.0.0",
43
43
  "react-dom": "^18.0.0 || ^19.0.0"
@@ -67,7 +67,7 @@
67
67
  "package": {
68
68
  "productName": "KendoReact",
69
69
  "productCode": "KENDOUIREACT",
70
- "publishDate": 1778664338,
70
+ "publishDate": 1778677221,
71
71
  "licensingDocsUrl": "https://www.telerik.com/kendo-react-ui"
72
72
  }
73
73
  },