"use strict";(self.webpackChunkhhgHealthCareV1=self.webpackChunkhhgHealthCareV1||[]).push([[4985],{86711:function(n,e,t){var o,i,r,a,l,c,d,u,s=t(73884);function p(){return p=Object.assign?Object.assign.bind():function(n){for(var e=1;e=0&&v<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var g=(0,i.A)(n),m=g.getDay(),b=6+(m=0&&v<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var g=(0,o.A)(n),m=g.getDay(),b=(m=4&&(T.current=!0,null===S||void 0===S||S(l,n))}},onPointerUp:function(n){N.current=null;try{var e,t;null===(t=(e=n.currentTarget).releasePointerCapture)||void 0===t||t.call(e,n.pointerId)}catch(o){}}}:{};return(0,o.Y)(D,{children:(0,o.FD)("div",(0,p.A)((0,s.A)({style:(r={opacity:O?.4:g?1:0,top:"calc(var(--px-per-min, ".concat(M,") * ").concat(_," * 1px)"),position:"absolute",backgroundColor:R?"#F2F2F2":V?v.w.colors.yellow50:"#E3F2FF",height:"calc(var(--px-per-min, ".concat(M,") * ").concat(H," * 1px)"),width:"100%",display:"flex",flexDirection:"column",cursor:"pointer"},(0,u.A)(r,"--max-height","calc(var(--px-per-min, ".concat(M,") * ").concat(H," * 1px)")),(0,u.A)(r,"fontSize",H<=20?"12px":"inherit"),(0,u.A)(r,"overflow","visible"),r),id:"js-booking-".concat(l.id),className:m()("cell event",{compact:H<=20}),onClick:function(){T.current?T.current=!1:h(l.id)},"data-draggable":I||void 0,"data-dragging":O||void 0,"data-day":F?(0,d.A)(F,k.cuM):void 0,"data-started":U(L),"data-ended":U(B),"data-schedule-id":(null===l||void 0===l||null===(e=l.schedule)||void 0===e||null===(t=e.slot)||void 0===t?void 0:t.schedule_id)||"booking-".concat(l.id),"data-booked":k._5h.BOOKED},X),{children:[(0,o.Y)("div",{className:R?"past":"upcoming",children:l.name}),(0,o.Y)("div",{className:"time",children:"".concat(U(L)," - ").concat(U(B))})]}))})},E=t(39765),S=t(36891),Y=t(6442),O=t(45105),F=t(8859),I=t(90206),N=function(n){return+n.split(":")[0]},T=function(n){return+n.split(":")[1]},L=function(n){var e=n.schedule,t=n.currentDate,r=n.onClickAdd,a=n.isFirst,l=n.isLast,u=n.isEdit,s=n.onEdit,p=n.type,h=n.disableActionSchedule,f=void 0!==h&&h,g=n.onSetUnavailable,m=n.pxPerMin,b=void 0===m?2:m,y=n.allowCreateOnSlotClick,w=void 0!==y&&y,x=n.dragActive,A=void 0!==x&&x,M=n.isValidTarget,D=void 0!==M&&M,C=(0,Y.A)().formatMessage,L=Number(e.appointment_type),B=(0,i.useState)(),z=B[0],P=B[1],j=new Date,_=j.getFullYear(),H=j.getMonth(),R=j.getDate(),U=(0,c.A)(new Date(_,H,R,N(e.started),T(e.started),0),new Date(_,H,R,0,0,0)),V=(0,c.A)(new Date(_,H,R,N(e.ended),T(e.ended),0),new Date(_,H,R,N(e.started),T(e.started),0)),X=(0,i.useMemo)((function(){return[{value:"appointment",name:C({id:"admin.schedule.create.appointment",defaultMessage:"Appointment"}),action:function(){return r(e,t)}},{value:"unavailable",name:C({id:"admin.schedule.create.setUnavailable",defaultMessage:"Set unavailable"}),action:function(){return null===g||void 0===g?void 0:g(e,t)}}]}),[C]);return(0,i.useEffect)((function(){"schedules"!==p||u||P(void 0)}),[u]),(0,o.FD)(E.tH,{differenceMinutes:U,durationMinutes:V,pxPerMin:b,className:"cell schedule ".concat(f?"hide-action-schedule":""),onMouseEnter:function(){"schedules"===p?L===k.foO.TELEMEDICINE?P("set-unavailable"):P("full"):L!==k.foO.TELEMEDICINE&&P("appointment")},onMouseLeave:function(){P(void 0)},onClick:function(){f&&!w||(f&&w?"schedules"!==p&&L!==k.foO.TELEMEDICINE&&r(e,t):"schedules"===p?L===k.foO.TELEMEDICINE?null===g||void 0===g||g(e,t):null===s||void 0===s||s(e.schedule_id):L!==k.foO.TELEMEDICINE&&r(e,t))},"data-appointment-type":L,"data-is-first":a,"data-is-last":l,"data-type":p,"data-schedule-id":e.schedule_id,"data-started":e.started,"data-ended":e.ended,"data-booked":e.booked,"data-day":(0,d.A)(t,k.cuM),"data-drag-active":A||void 0,"data-drag-valid":A?D:void 0,children:[!f&&"full"===z&&(0,o.Y)(E.aw,{children:(0,o.Y)(O.r,{data:X,button:(0,o.FD)("div",{children:[(0,o.Y)(S.T,{size:"n1",type:"semiBold",color:v.w.colors.primaryBase,children:C({id:"admin.booking.addNew",defaultMessage:"Add new"})}),(0,o.Y)(F.A,{})]})})}),!f&&"set-unavailable"===z&&(0,o.Y)(E.aw,{children:(0,o.Y)(S.T,{size:"n1",type:"semiBold",color:v.w.colors.gray600,children:C({id:"admin.schedule.create.setUnavailable",defaultMessage:"Set unavailable"})})}),(!f||w)&&"appointment"===z&&(0,o.FD)("div",{className:"add-new",children:[(0,o.Y)(I.A,{width:"16px",height:"16px"}),(0,o.Y)(S.T,{size:"n1",type:"semiBold",color:v.w.colors.primaryBase,children:C({id:"admin.booking.addNew",defaultMessage:"Add new"})})]})]})},B=t(66e3),z=t(1032),P=function(n){var e=n.unavailable,t=n.onRemoveUnavailable,r=n.visible,a=void 0===r||r,l=n.pxPerMin,d=void 0===l?2:l,u=n.disableActionSchedule,s=void 0!==u&&u,p=(0,Y.A)().formatMessage,h="00:00"===e.started&&"24:00"===e.ended,f=(0,b.A)("".concat(e.date," ").concat(e.started)||"","yyyy-MM-dd HH:mm",new Date),g=(0,b.A)("".concat(e.date," ").concat("24:00"===e.ended?"23:59":e.ended)||"","yyyy-MM-dd HH:mm",new Date),m=f.getFullYear(),y=f.getMonth(),w=f.getDate(),x=(0,c.A)(f,new Date(m,y,w,0,0,0)),A=(0,c.A)(g,f),k=(0,i.useState)(!1),M=k[0],D=k[1];return(0,o.Y)(E.FK,{visible:a?1:0,difference:x,height:A,pxPerMin:d,id:"js-booking-".concat(e.id),"data-is-day-off":h,onMouseEnter:function(){D(!0)},onMouseLeave:function(){D(!1)},onClick:function(){s||null===t||void 0===t||t(e)},children:M&&(0,o.FD)(E.LX,{style:{alignItems:"flex-start",padding:"14px 6px 0 6px"},children:[(0,o.FD)("div",{className:"dayoff",children:[(0,o.Y)(B.A,{className:"remove"}),(0,o.Y)(S.T,{size:"n1",type:"semiBold",color:v.w.colors.violet600,children:p({id:"admin.schedule.create.remove",defaultMessage:"Unavailable"})})]}),!s&&(0,o.Y)(z.A,{className:"bin off"})]})})},j={availability:!0,past:!0,upcoming:!0,telemed:!0},_=function(n){var e=n.date,t=n.schedules,i=n.bookings,u=n.unavailable,s=n.pxPerMin,p=void 0===s?2:s,h=n.onClickDetailBooking,f=void 0===h?function(){}:h,v=n.onAddAppointment,g=void 0===v?function(){}:v,m=n.onSetUnavailable,b=n.onEdit,y=n.isChoosingAction,w=n.type,x=n.onRemoveUnavailable,A=n.disableActionSchedule,M=void 0!==A&&A,D=n.showOption,S=void 0===D?j:D,Y=n.isClientRendered,O=void 0===Y||Y,F=n.currentTimeDots,I=void 0===F?"both":F,N=n.allowCreateOnSlotClick,T=void 0!==N&&N,B=n.enableDragReschedule,z=void 0!==B&&B,_=n.draggingBookingId,H=n.onDragStart,R=n.isValidDropSlot;return(0,o.FD)("div",{className:"day-hours","data-day-column":(0,d.A)(e,k.cuM),children:[S.availability&&function(n,e){var t=(0,r.A)(n);if(void 0!==e&&e.hasOwnProperty(t))return(0,o.Y)("div",{children:e[t].map((function(i,r){var a,l=Boolean((null===(a=e[t][r-1])||void 0===a?void 0:a.appointment_type)&&e[t][r-1].appointment_type!==i.appointment_type),c=Boolean(!e[t][r+1]||e[t][r+1].appointment_type!==i.appointment_type);return(0,o.Y)(L,{isFirst:l,isLast:c,schedule:i,onClickAdd:g,onSetUnavailable:m,currentDate:n,isEdit:y===i.schedule_id,onEdit:b,type:w,disableActionSchedule:M,pxPerMin:p,allowCreateOnSlotClick:T,dragActive:z&&null!=_,isValidTarget:!(!z||null==_)&&Boolean(null===R||void 0===R?void 0:R(i,n))},i.schedule_id)}))})}(e,t),function(n,e){var t=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],i=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],l=!(arguments.length>4&&void 0!==arguments[4])||arguments[4];if(!t){var c=(0,a.A)(n);if(c)return null}var d=(0,r.A)(n);if(void 0!==e&&e.hasOwnProperty(d))return(0,o.Y)("div",{children:e[d].map((function(e){var t=!0;return(i||e.appointmentType!==k.YYr.INPATIENT_HOSPITAL)&&(l||e.appointmentType!==k.YYr.VIDEO_CALL)||(t=!1),(0,o.Y)(C,{booking:e,onClickDetailBooking:f,visible:t,pxPerMin:p,draggable:z,onDragStart:H,isDragging:_===e.id,currentDate:n},e.id)}))})}(e,i||{},S.past,S.upcoming,S.telemed),function(n){var e=(0,r.A)(n);if(void 0!==u&&u.hasOwnProperty(e))return(0,o.Y)("div",{children:u[e].map((function(n){return(0,o.Y)(P,{unavailable:n,onRemoveUnavailable:x,pxPerMin:p,disableActionSchedule:M},n.id)}))})}(e),function(n){var e=(0,l.A)(n);if(O&&e){var t=new Date,i=t.getDate(),r=t.getMonth(),a=t.getFullYear(),d=(0,c.A)(t,new Date(a,r,i,0,0,0));return(0,o.Y)(E.oA,{style:{top:"calc(var(--px-per-min, ".concat(p,") * ").concat(d," * 1px)")},currentTimeDots:I,id:"currentTime"})}return null}(e)]})}},23800:function(n,e,t){t.d(e,{J:function(){return p}});var o=t(24537),i=t(81539),r=t(2445),a=(t(73884),t(27317));function l(){var n=(0,o.A)(["\n display: flex;\n flex-direction: column;\n"]);return l=function(){return n},n}function c(){var n=(0,o.A)(["\n height: 60px;\n"]);return c=function(){return n},n}var d=function(n,e){for(var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:30,o=[],r=n;r<=e;r++)for(var a=0;a<60;a+=t){var l=r<10?"0"+r:r,c=0===a?a+"0":a,d=l+":"+c;o=(0,i.A)(o).concat([d])}return o},u=a.Ay.div.withConfig({componentId:"sc-907b1eb0-0"})(l()),s=a.Ay.div.withConfig({componentId:"sc-907b1eb0-1"})(c()),p=function(n){var e=n.pxPerMin,t=30*(void 0===e?2:e);return(0,r.Y)("div",{className:"timeline",children:(0,r.FD)("div",{className:"day-column",children:[(0,r.Y)(s,{className:"empty-title",children:(0,r.FD)("div",{style:{visibility:"hidden"},className:"date",children:[" ","Empty Cell"]})}),(0,r.Y)(u,{className:"day-hours",children:d(0,23).map((function(n,e){return(0,r.Y)("div",{className:"cell",style:{position:"relative",borderLeft:"1px solid #F1F2F4",flex:"0 0 ".concat(t,"px")},children:(0,r.Y)("span",{style:{fontSize:"13px",paddingLeft:5},children:e%2!==0?"":n})},"header-".concat(e))}))})]})})}},82471:function(n,e,t){t.d(e,{AI:function(){return h},GF:function(){return w},Jd:function(){return v},L7:function(){return g},ch:function(){return M},ej:function(){return D},hp:function(){return y},sN:function(){return f},vn:function(){return x},y2:function(){return A}});var o=t(40568),i=t(66298),r=t(82920),a=t(79672),l=t(65886),c=t(53303),d=t(25072),u=t(45351),s=t(40959),p="yyyy-MM-dd HH:mm:ss",h=function(n,e){return n?n.booked!==s._5h.AVAILABLE?"booked":function(n,e){if(!n||!(null===e||void 0===e?void 0:e.started))return!1;var t=(0,i.A)(n,s.cuM),o=(0,r.A)("".concat(t," ").concat(e.started),"".concat(s.cuM," HH:mm"),new Date);return(0,a.A)(o,new Date)}(e,n)?function(n){var e=null===n||void 0===n?void 0:n.appointment_type,t=Number(e);return 1===t||3===t||e===s.YYr.ALL||e===s.YYr.VIDEO_CALL}(n)?"valid":"unavailable":"past":"unavailable"},f=function(n,e){return"valid"===h(n,e)},v=function(n){if(!(null===n||void 0===n?void 0:n.started_at))return!1;var e=(0,r.A)(n.started_at,p,new Date);return n.appointmentType===s.YYr.VIDEO_CALL&&n.status===s.Ae.UPCOMING&&!(0,l.A)(e)},g=function(n){var e=(0,o.A)(n.split(":").map(Number),2);return 60*e[0]+e[1]},m=function(n){var e=(n%1440+1440)%1440,t=Math.floor(e/60),o=e%60;return"".concat(String(t).padStart(2,"0"),":").concat(String(o).padStart(2,"0"))},b=function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];if(e.length){var t=e.find((function(e){var t=g(e.started),o=g(e.ended);return n>=t&&n5&&void 0!==arguments[5]?arguments[5]:{},a=k(n,e,t),l=b(a,r[i]);if(l)return{day:o,slot:l}},D=function(n,e,t){return{fromLabel:[(null===n||void 0===n?void 0:n.started_at)?(0,u.o1)((0,r.A)(n.started_at,p,new Date),t):void 0,null===n||void 0===n?void 0:n.time].filter(Boolean).join(" \xb7 "),toLabel:e?[(0,u.o1)(e.day,t),"".concat(e.started," - ").concat(e.ended)].filter(Boolean).join(" \xb7 "):""}}},39765:function(n,e,t){t.d(e,{D6:function(){return M},F1:function(){return k},FK:function(){return F},Hc:function(){return A},LX:function(){return O},TO:function(){return N},aw:function(){return S},cQ:function(){return D},d4:function(){return w},oA:function(){return I},tH:function(){return E},wE:function(){return Y},zO:function(){return x}});var o=t(24537),i=t(68021),r=t(27317),a=t(40959);function l(){var n=(0,o.A)([""]);return l=function(){return n},n}function c(){var n=(0,o.A)(["\n display: flex;\n align-items: center;\n justify-content: space-between;\n\n "," {\n flex-wrap: wrap;\n align-items: stretch;\n flex-direction: column;\n width: 100%;\n }\n\n .dropdown {\n min-width: 160px;\n margin-right: 16px;\n }\n .checkbox {\n margin-right: 8px;\n }\n\n .skip-buttons {\n margin-top: 10px;\n white-space: nowrap;\n > svg {\n overflow: visible;\n cursor: pointer;\n &:first-of-type {\n margin-right: 8px;\n transform: rotate(180deg);\n }\n &[data-is-first-week='true'],\n &[data-is-last-week='true'] {\n opacity: 0.3;\n pointer-events: none;\n }\n }\n }\n & {\n .week_display {\n min-width: 200px;\n margin-right: 6px;\n font-size: 14px;\n }\n }\n\n .edit-btn {\n color: ",";\n margin-right: 10px;\n }\n"]);return c=function(){return n},n}function d(){var n=(0,o.A)(["\n position: relative;\n display: table;\n width: 100%;\n height: 100%;\n box-sizing: border-box;\n .timeline {\n display: table-cell;\n width: 60px;\n vertical-align: top;\n\n "," {\n width: 45px;\n }\n\n .day-column {\n width: 60px;\n min-width: 0;\n\n "," {\n width: 45px;\n }\n }\n .empty-title {\n height: 60px;\n border-width: 1px 0px 1px 1px;\n "," {\n height: 56px;\n }\n }\n }\n .day-column {\n min-width: 150px;\n flex: 1 1 auto;\n border-collapse: collapse;\n border: 0.1px solid ",";\n\n min-width: 14.28%;\n width: 14.28%;\n &:last-child {\n border-right: 1px solid #f1f2f4;\n }\n .date {\n font-size: 14px;\n line-height: 22px;\n text-overflow: ellipsis;\n overflow: hidden;\n }\n }\n\n .day-hours {\n position: relative;\n display: flex;\n flex-direction: column;\n }\n\n .cell {\n display: flex;\n flex: 1 1 60px;\n align-items: flex-start;\n justify-content: flex-start;\n &:last-child {\n border-bottom: 1px solid #f1f2f4;\n }\n }\n .calendar {\n display: flex;\n /* border: 0.1px solid ","; */\n border-collapse: collapse;\n text-align: center;\n "," {\n &.sticky {\n z-index: 1;\n top: 64px;\n position: sticky;\n background-color: ",";\n }\n }\n }\n .heading {\n min-height: 60px;\n border: 1px solid #f1f2f4;\n border-width: 1px 0px 1px 1px;\n "," {\n min-height: 56px;\n &:last-child {\n border-right-width: 1px;\n }\n }\n .heading-wrap {\n height: 100%;\n display: flex;\n flex-wrap: wrap;\n align-items: center;\n padding: 4px 0;\n }\n }\n .calendar_overlay {\n position: absolute;\n top: 0;\n left: 0;\n display: flex;\n width: 100%;\n height: 100%;\n border-collapse: collapse;\n text-align: center;\n\n /* AS-1026 FIX A (TC-04): scope 'position: relative' to the overlay's\n OWN '.day-column' wrapper only (not the shared '.day-column' rule\n above, used by the background grid / timeline elsewhere in this\n file). The drag ghost ('StyledDragGhost', 'position: absolute; width:\n 100%') is mounted directly inside this overlay day-column -- without\n a positioned ancestor here, its 'width: 100%'/'top' resolved against\n THIS '.calendar_overlay' (itself 'position: absolute; width: 100%',\n spanning all 7 columns) instead of its own one-column box, rendering\n ~7x too wide. Every existing child of this overlay column (Schedule/\n Event/UnavailableLayer, all rendered inside CalendarColumn's own\n '.day-hours', which is already 'position: relative' and NESTED\n inside this) is unaffected -- their absolutely-positioned children\n still resolve against '.day-hours' (the nearer positioned ancestor),\n unchanged. This only newly establishes a positioning context for the\n ghost, the sole element positioned directly against the overlay's\n day-column itself. */\n .day-column {\n position: relative;\n }\n }\n\n "," {\n .sticky {\n position: sticky;\n z-index: 8;\n top: 312px;\n background-color: white;\n }\n\n &[data-is-in-schedule='true'] {\n .sticky {\n top: 136px;\n }\n }\n }\n"]);return d=function(){return n},n}function u(){var n=(0,o.A)(["\n z-index: 10;\n min-width: 186px;\n margin-right: 16px;\n\n "," {\n flex: 1;\n }\n\n .time {\n input {\n height: 40px;\n }\n }\n"]);return u=function(){return n},n}function s(){var n=(0,o.A)(["\n position: relative;\n display: flex;\n justify-content: flex-end;\n & > img {\n position: absolute;\n top: -32px;\n right: 12px;\n cursor: pointer;\n }\n"]);return s=function(){return n},n}function p(){var n=(0,o.A)(["\n margin-top: -16px;\n padding-top: 16px;\n background-color: ",";\n padding-bottom: 16px;\n\n "," {\n position: sticky;\n z-index: 10;\n top: 238px;\n &[data-is-in-schedule='true'] {\n top: 64px;\n }\n }\n\n "," {\n padding-left: 16px;\n padding-right: 16px;\n }\n"]);return p=function(){return n},n}function h(){var n=(0,o.A)(["\n /* z-index: 1; */\n\n top: ",";\n height: ",";\n position: absolute;\n width: 100%;\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n background-color: ",";\n\n &[data-appointment-type] {\n &::before {\n content: '';\n position: absolute;\n left: 2px;\n width: 3px;\n height: ",";\n }\n\n &[data-is-first='true'] {\n &::before {\n margin-top: 4px;\n height: ",";\n border-top-right-radius: 2px;\n border-top-left-radius: 2px;\n }\n }\n &[data-is-last='true'] {\n &::before {\n height: ",";\n border-bottom-right-radius: 2px;\n border-bottom-left-radius: 2px;\n }\n }\n }\n\n &[data-appointment-type='","'] {\n &::before {\n background-color: ",";\n }\n }\n &[data-appointment-type='","'] {\n &::before {\n background-color: ",";\n }\n }\n &[data-appointment-type='","'] {\n &::before {\n background-color: ",";\n }\n }\n\n &:not([data-appointment-type='","']) {\n &:hover {\n cursor: pointer;\n outline: 1px solid ",";\n background-color: white;\n }\n\n &.hide-action-schedule {\n &:hover {\n outline: none;\n background-color: ",";\n pointer-events: none;\n }\n }\n }\n\n &[data-type='schedules'] {\n &:hover {\n cursor: pointer;\n outline: 1px solid ",";\n background-color: white;\n }\n\n &.hide-action-schedule {\n &:hover {\n outline: none;\n background-color: ",";\n pointer-events: none;\n }\n }\n }\n\n .add-new {\n width: 100%;\n height: 100%;\n display: flex;\n justify-content: center;\n align-items: center;\n gap: 4px;\n svg {\n width: 16px;\n }\n }\n\n .schedule {\n height: 100%;\n display: flex;\n justify-content: space-between;\n align-items: center;\n padding: 0 6px;\n }\n\n /* AS-1026 AC1: while a drag-reschedule gesture is in progress, valid\n open same-doctor slots highlight; everything else (booked/past/\n telemed-incompatible) is muted and non-interactive for the drag. Both\n attributes default unset (dragActive=false), so this block has zero\n effect on any existing caller. */\n &[data-drag-active='true'] {\n &[data-drag-valid='true'] {\n outline: 2px solid\n ",";\n background-color: ",";\n cursor: pointer;\n }\n &[data-drag-valid='false'] {\n opacity: 0.35;\n pointer-events: none;\n }\n }\n"]);return h=function(){return n},n}function f(){var n=(0,o.A)(["\n width: 100%;\n height: 100%;\n display: flex;\n justify-content: center;\n align-items: center;\n\n .remove-unavailable {\n background-color: white;\n }\n\n svg > path {\n stroke: ",";\n width: 16px;\n height: 16px;\n }\n div {\n width: 100%;\n height: 100%;\n display: flex;\n justify-content: center;\n flex-direction: row;\n align-items: center;\n gap: 4px;\n }\n ul {\n margin: 1px 0;\n min-width: 100px;\n width: 100%;\n }\n"]);return f=function(){return n},n}function v(){var n=(0,o.A)(["\n display: flex;\n flex-direction: row;\n justify-content: center;\n align-items: center;\n padding: 9px 12px 9px 16px;\n gap: 8px;\n width: max-content;\n height: 42px;\n\n color: ",";\n background-color: ",";\n border-radius: 4px;\n\n font-weight: 700;\n font-size: 14px;\n line-height: 22px;\n svg > path {\n stroke: ",";\n width: 18px;\n height: 18px;\n }\n"]);return v=function(){return n},n}function g(){var n=(0,o.A)(['\n width: 100%;\n height: 100%;\n display: flex;\n align-items: center;\n justify-content: space-between;\n cursor: pointer;\n padding: 2px 6px 0 6px;\n\n /* FIX 16: at narrow column widths (e.g. the overview\'s Compact density,\n 80px columns) "width: fit-content" on .dayoff forced the label onto one\n unbreakable line, which the parent StyledUnavailableLayer\'s\n "overflow: hidden" then clipped mid-word instead of wrapping. Let it\n shrink/wrap within the available row width instead of demanding its\n natural unwrapped width \u2014 same visual treatment at normal/wide widths\n where it already fits on one line. */\n .dayoff {\n display: flex;\n align-items: center;\n justify-content: center;\n flex: 1 1 auto;\n min-width: 0;\n gap: 4px;\n border-radius: 4px;\n background-color: ',";\n width: fit-content;\n max-width: 100%;\n padding: 0 2px;\n margin-bottom: 4px;\n\n span {\n white-space: normal;\n word-break: break-word;\n }\n }\n svg {\n flex: none;\n width: 16px;\n "," {\n display: none;\n }\n }\n .remove {\n path {\n stroke: ",";\n }\n }\n .bin {\n path {\n stroke: ",";\n }\n }\n .off {\n margin-top: 4px;\n }\n"]);return g=function(){return n},n}function m(){var n=(0,o.A)(["\n position: absolute;\n opacity: ",";\n /* AS-1013: same calc(var(--px-per-min, pxPerMin) * minutes * 1px) scaling\n as StyledSchedule -- see StyledScheduleProps comment above. difference/\n height here are already raw minutes (attrs default 1/15), unchanged by\n this fix; only how the px value is computed changed. */\n top: ",";\n height: ",";\n max-height: ",";\n font-size: ",';\n width: 100%;\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n cursor: pointer;\n /* AS-985 FIX 21: was "overflow: hidden" \u2014 on a short time-span block\n (e.g. a 30min "Tidak Tersedia" block at normal density, ~60px tall)\n the on-hover StyledDayOff label (FIX 16 already lets ".dayoff span"\n wrap instead of clipping mid-word) still had its WRAPPED lines cut off\n vertically by this parent\'s overflow:hidden once the label needed more\n vertical space than the block\'s own time-accurate height. The label is\n hover-only (StyledDayOff only renders when "showAction" is true, see\n UnavailableLayer.tsx) so letting it spill outside the block\'s box reads\n like a tooltip, not a layout break \u2014 the block\'s own top/height/\n max-height (this layer\'s actual TIME-SPAN position/size) are untouched,\n only whether overflowing hover content is clipped or shown. CSS-only,\n additive; the always-visible striped background rectangle is a\n "background" property on this element itself (not a clipped child), so\n it is unaffected by this change. */\n overflow: visible;\n background: repeating-linear-gradient(\n -45deg,\n ',",\n "," 1px,\n white 0,\n white 3px\n );\n\n &:hover {\n cursor: pointer;\n background: ",";\n }\n .off {\n /* height: 100%; */\n margin-top: 4px;\n }\n"]);return m=function(){return n},n}function b(){var n=(0,o.A)(["\n position: absolute;\n height: 2px;\n background-color: #2d87f3;\n width: 100%;\n z-index: 7;\n display: flex;\n\n ","\n\n ","\n"]);return b=function(){return n},n}function y(){var n=(0,o.A)(["\n position: absolute;\n top: ",";\n height: ",";\n width: 100%;\n pointer-events: none;\n z-index: 6;\n border-radius: 4px;\n display: flex;\n align-items: center;\n justify-content: center;\n font-size: 12px;\n font-weight: 600;\n border: 2px dashed\n ",";\n background-color: ",";\n color: ",";\n"]);return y=function(){return n},n}var w=r.Ay.div.withConfig({componentId:"sc-d1077155-0"})(l()),x=r.Ay.div.withConfig({componentId:"sc-d1077155-1"})(c(),i.M.mbDown,(function(n){return n.theme.colors.primaryBase})),A=r.Ay.div.withConfig({componentId:"sc-d1077155-2"})(d(),i.M.tdDown,i.M.tdDown,i.M.mbDown,(function(n){return n.theme.colors.neutral100}),(function(n){return n.theme.colors.neutral100}),i.M.mbDown,(function(n){return n.theme.colors.white}),i.M.mbDown,i.M.tdUp),k=r.Ay.div.withConfig({componentId:"sc-d1077155-3"})(u(),i.M.mbDown),M=r.Ay.div.withConfig({componentId:"sc-d1077155-4"})(s()),D=r.Ay.header.withConfig({componentId:"sc-d1077155-5"})(p(),(function(n){return n.theme.colors.white}),i.M.tdUp,i.M.mbDown),C=function(n,e){var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return"calc(var(--px-per-min, ".concat(n.pxPerMin,") * ").concat(e," * 1px").concat(t?" - ".concat(t,"px"):"",")")},E=r.Ay.div.withConfig({componentId:"sc-d1077155-6"})(h(),(function(n){return C(n,n.differenceMinutes)}),(function(n){return C(n,n.durationMinutes)}),(function(n){return n.theme.colors.green50}),(function(n){return C(n,n.durationMinutes)}),(function(n){return C(n,n.durationMinutes,4)}),(function(n){return C(n,n.durationMinutes,4)}),a.foO.BOTH,(function(n){return n.theme.colors.green700}),a.foO.OUTPATIENT,(function(n){return n.theme.colors.primaryBase}),a.foO.TELEMEDICINE,(function(n){return n.theme.colors.yellow900}),a.foO.TELEMEDICINE,(function(n){return n.theme.colors.neutral100}),(function(n){return n.theme.colors.green50}),(function(n){return n.theme.colors.neutral100}),(function(n){return n.theme.colors.green50}),(function(n){return n.theme.colors.primaryBase}),(function(n){return n.theme.colors.blue50})),S=r.Ay.div.withConfig({componentId:"sc-d1077155-7"})(f(),(function(n){return n.theme.colors.primaryBase})),Y=r.Ay.div.withConfig({componentId:"sc-d1077155-8"})(v(),(function(n){return n.theme.colors.white}),(function(n){return n.theme.colors.primaryBase}),(function(n){return n.theme.colors.white})),O=r.Ay.div.withConfig({componentId:"sc-d1077155-9"})(g(),(function(n){return n.theme.colors.violet50}),i.M.mbDown,(function(n){return n.theme.colors.violet600}),(function(n){return n.theme.colors.gray600})),F=r.Ay.div.attrs((function(n){return{difference:n.difference||1,height:n.height||15,visible:n.visible||1,pxPerMin:n.pxPerMin||2}})).withConfig({componentId:"sc-d1077155-10"})(m(),(function(n){return n.visible}),(function(n){return"calc(var(--px-per-min, ".concat(n.pxPerMin,") * ").concat(n.difference," * 1px)")}),(function(n){return"calc(var(--px-per-min, ".concat(n.pxPerMin,") * ").concat(n.height," * 1px)")}),(function(n){return"calc(var(--px-per-min, ".concat(n.pxPerMin,") * ").concat(n.height," * 1px)")}),(function(n){return n.height<=20?"12px":"inherit"}),(function(n){return n.theme.colors.violet50}),(function(n){return n.theme.colors.violet50}),(function(n){return n.theme.colors.violet50})),I=r.Ay.div.withConfig({componentId:"sc-d1077155-11"})(b(),(function(n){return"right"!==n.currentTimeDots&&"none"!==n.currentTimeDots&&"\n &::before {\n position: absolute;\n top: -5px;\n left: -5px;\n display: inline-block;\n width: 12px;\n height: 12px;\n background-color: #2d87f3;\n border-radius: 50%;\n content: '';\n }\n "}),(function(n){return"left"!==n.currentTimeDots&&"none"!==n.currentTimeDots&&"\n &::after {\n position: absolute;\n top: -5px;\n right: -5px;\n display: inline-block;\n width: 12px;\n height: 12px;\n background-color: #2d87f3;\n border-radius: 50%;\n content: '';\n }\n "})),N=r.Ay.div.withConfig({componentId:"sc-d1077155-12"})(y(),(function(n){return"calc(var(--px-per-min, ".concat(n.pxPerMin,") * ").concat(n.differenceMinutes," * 1px)")}),(function(n){return"calc(var(--px-per-min, ".concat(n.pxPerMin,") * ").concat(n.durationMinutes," * 1px)")}),(function(n){return n.valid?n.theme.colors.primaryBase:n.theme.colors.red600}),(function(n){return n.valid?n.theme.colors.blue50:"#FDEBEB"}),(function(n){return n.valid?n.theme.colors.primaryBase:n.theme.colors.red600}))},47744:function(n,e,t){t.d(e,{qi:function(){return J},EJ:function(){return q},DP:function(){return W}});var o=t(858),i=t(53513),r=t(63538),a=t(81539),l=t(83776),c=t(2445),d=t(73884),u=t(7648),s=t(36533),p=t(64582),h=t(36891),f=t(35291),v=t(69973),g=t(27827),m=t(81810),b=t(36462),y=t(66298),w=t(92998),x=t(25072),A=t(979),k=t(40063),M=t(88491),D=t(83545),C=t(67188),E=t.n(C),S=t(10297),Y=t.n(S),O=t(31017),F=t(6442),I=t(36259),N=t(45105),T=t(18094),L=t(23800),B=t(82471),z=t(39765),P=t(38057),j=t(40959),_=t(66e3),H=t(8859),R=t(64889),U=t(1032),V=E()((function(){return t.e(8240).then(t.bind(t,98240)).then((function(n){return n.RescheduleConfirmPopup}))}),{loadableGenerated:{webpack:function(){return[98240]}},ssr:!1}),X={Mon:"day.Mon",Tue:"day.Tue",Wed:"day.Wed",Thu:"day.Thu",Fri:"day.Fri",Sat:"day.Sat",Sun:"day.Sun"};function W(n){return n.getBoundingClientRect().top+(window.scrollY||document.documentElement.scrollTop)}function K(n,e){var t=document.querySelector(n),o=window.outerHeight||document.documentElement.clientHeight||document.body.clientHeight;t&&(e?window.scrollTo({top:W(t)-o/2,left:0,behavior:"smooth"}):t.scrollIntoView({behavior:"smooth",block:"center",inline:"center"}))}var q=function(n,e){for(var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:30,o=[],i=n;i<=e;i++)for(var r=0;r<60;r+=t){var l=i<10?"0"+i:i,c=0===r?r+"0":r,d=l+":"+c;o=(0,a.A)(o).concat([d])}return o},J=function(n){return(0,D.B)(G,n)},G=function(n){var e,t,D=n.eventObject,C=n.scheduleObject,E=n.onClickDetailBooking,W=n.onAddAppointment,J=n.addNewAppointment,G=n.scrollCalendarId,Q=n.initDisplayDate,Z=void 0===Q?new Date:Q,$=n.isInSchedule,nn=void 0!==$&&$,en=n.type,tn=n.isChoosingAction,on=n.setIsChoosingAction,rn=n.addUnavailable,an=n.addUnavailableOnSchedule,ln=n.onRemoveUnavailable,cn=n.fetchEventObject,dn=n.unavailableSchedules,un=n.disableActionSchedule,sn=void 0!==un&&un,pn=n.enableDragReschedule,hn=void 0!==pn&&pn,fn=n.onRescheduleByDrag,vn=n.onDragToast,gn=(0,d.useContext)(I.B).state,mn=gn.userInfo,bn=gn.language,yn=(0,F.A)().formatMessage,wn=(0,S.useRouter)().locale,xn=(0,M.d)().isMobileOrTablet,An=new Date,kn=(0,d.useState)(!1),Mn=kn[0],Dn=kn[1],Cn=(0,d.useState)(Z),En=Cn[0],Sn=Cn[1],Yn=(0,d.useState)(!1),On=Yn[0],Fn=Yn[1],In=(0,d.useRef)(!1),Nn=function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=n.onInvalidDrop,t=n.scheduleObject,o=(0,d.useState)(),i=o[0],r=o[1],a=(0,d.useState)(),l=a[0],c=a[1],u=(0,d.useState)(),s=u[0],p=u[1],h=(0,d.useRef)(),f=(0,d.useRef)(),v=(0,d.useRef)(t);v.current=t;var g=(0,d.useCallback)((function(n){h.current=n,f.current=void 0,r(n),c(void 0)}),[]),m=(0,d.useCallback)((function(){h.current=void 0,f.current=void 0,r(void 0),c(void 0)}),[]),b=(0,d.useCallback)((function(){p(void 0)}),[]),y=(0,d.useCallback)((function(){p(void 0)}),[]),w=(0,d.useCallback)((function(){m(),p(void 0)}),[m]);return(0,d.useEffect)((function(){if(i){var n=function(n){var e=h.current;if(e){var t="function"===typeof document.elementsFromPoint?document.elementsFromPoint(n.clientX,n.clientY):[],o=(0,B.GF)(t);if(!o){var i=(0,B.y2)(t);if(i){var r=0,a=2;try{var l,d,u,s=null===(d=(l=i.el).getBoundingClientRect)||void 0===d?void 0:d.call(l);r=null!==(u=null===s||void 0===s?void 0:s.top)&&void 0!==u?u:0;var p=parseFloat(window.getComputedStyle(i.el).getPropertyValue("--px-per-min"));Number.isFinite(p)&&p>0&&(a=p)}catch(b){}o=(0,B.ch)(n.clientY,r,a,i.day,i.dayKey,v.current)}}if(!o)return f.current=void 0,void c(void 0);var g=(0,B.vn)(e,o.slot),m={day:o.day,dayKey:(0,x.A)(o.day),slot:o.slot,started:(null===g||void 0===g?void 0:g.started)||o.slot.started,ended:(null===g||void 0===g?void 0:g.ended)||o.slot.ended,valid:(0,B.sN)(o.slot,o.day)};f.current=m,c(m)}},t=function(){var n,t,o=h.current,i=f.current;if(m(),o){var r,a=String(null!==(r=null===(n=o.schedule)||void 0===n||null===(t=n.slot)||void 0===t?void 0:t.schedule_id)&&void 0!==r?r:"")||"booking-".concat(o.id);if(!i||String(i.slot.schedule_id)!==a)if(null===i||void 0===i?void 0:i.valid)p({booking:o,day:i.day,slot:i.slot,started:i.started,ended:i.ended});else{var l=i?(0,B.AI)(i.slot,i.day):"unavailable";null===e||void 0===e||e(l)}}};return document.addEventListener("pointermove",n),document.addEventListener("pointerup",t),function(){document.removeEventListener("pointermove",n),document.removeEventListener("pointerup",t)}}}),[i,m,e]),(0,d.useEffect)((function(){if(i||s){var n=function(n){"Escape"===n.key&&(h.current&&m(),p(void 0))};return document.addEventListener("keydown",n),function(){document.removeEventListener("keydown",n)}}}),[i,s,m]),{draggingBooking:i,ghost:l,confirmTarget:s,beginDrag:g,cancelConfirm:b,finishConfirm:y,resetDragState:w}}({onInvalidDrop:function(n){return null===vn||void 0===vn?void 0:vn(function(n){return"booked"===n?{type:"danger",content:"".concat(yn({id:"admin.booking.reschedule.toastBookedTitle",defaultMessage:"That slot is already booked"})," \u2014 ").concat(yn({id:"admin.booking.reschedule.toastBookedBody",defaultMessage:"Pick another open slot."}))}:"past"===n?{type:"danger",content:"".concat(yn({id:"admin.booking.reschedule.toastPastTitle",defaultMessage:"Can't move a booking to a past time"})," \u2014 ").concat(yn({id:"admin.booking.reschedule.toastPastBody",defaultMessage:"Pick a slot in the future."}))}:{type:"danger",content:yn({id:"admin.booking.reschedule.toastUnavailable",defaultMessage:"Slot unavailable"})}}(n))},scheduleObject:C}),Tn=Nn.draggingBooking,Ln=Nn.ghost,Bn=Nn.confirmTarget,zn=Nn.beginDrag,Pn=Nn.cancelConfirm,jn=Nn.finishConfirm,_n=Nn.resetDragState;(0,P.I)(!!Bn);var Hn=hn?function(n){_n(),E(n)}:E,Rn=function(){var n=(0,o.A)((function(){var n;return(0,l.__generator)(this,(function(e){switch(e.label){case 0:return Bn&&fn?(Fn(!0),[4,fn(Bn.booking,Number(Bn.slot.schedule_id))]):[2];case 1:return n=e.sent(),Fn(!1),(null===n||void 0===n?void 0:n.success)||null===vn||void 0===vn||vn({type:"danger",content:yn({id:"error.anErrorOccurred",defaultMessage:"An error occurred!"})}),jn(),[2]}}))}));return function(){return n.apply(this,arguments)}}(),Un=(0,d.useState)({availability:!0,past:!0,upcoming:!0,telemed:!0}),Vn=Un[0],Xn=Un[1],Wn=(0,g.A)(En,{weekStartsOn:1});(0,d.useEffect)((function(){return Dn(!0)}),[]);var Kn=function(n){var e,t=(0,x.A)(n);return!!(dn&&(null===(e=dn[t])||void 0===e?void 0:e.every((function(n){return"00:00"===n.started&&"24:00"===n.ended}))))},qn=function(){setTimeout((function(){K('[id*="js-booking-"]',xn)}),100)},Jn=(0,d.useMemo)((function(){return[{value:"appointment",name:yn({id:"admin.schedule.create.appointment",defaultMessage:"Appointment"}),action:J},{value:"unavailable",name:yn({id:"admin.schedule.create.setUnavailable",defaultMessage:"Set unavailable"}),action:rn}]}),[yn]),Gn=function(n){var e=yn({id:X[(0,y.A)((0,w.A)(Wn,n),"ccc")],defaultMessage:"Day"});return"vi-VN"===wn?xn?e.split(" ").map((function(n){return n[0].toUpperCase()})).join(""):e:xn?e[0]:e};(0,d.useEffect)((function(){if(G||!In.current){var n=setTimeout((function(){K("#"+(G?"js-booking-".concat(G):"currentTime"),xn),G||(In.current=!0)}),100);return function(){return clearTimeout(n)}}}),[G,xn]);var Qn=bn||wn,Zn=(0,B.ej)(null===Bn||void 0===Bn?void 0:Bn.booking,Bn,Qn);return(0,c.FD)(z.d4,{children:[(0,c.Y)(z.cQ,{"data-is-in-schedule":nn,children:(0,c.FD)(z.zO,{children:[(0,c.FD)("div",{className:"d-flex",children:[(0,c.FD)(z.F1,{children:[(0,c.Y)(u.I,{autoComplete:"off",name:"date",placeholder:"",type:"text",size:"sm",value:function(n){if((0,m.A)(n,(0,g.A)(new Date,{weekStartsOn:1})))return yn({id:"admin.schedule.thisWeek",defaultMessage:"This week"});var e=(0,b.A)(n,{weekStartsOn:1});return"".concat((0,y.A)(n,"MMM dd")," - ").concat((0,y.A)(e,"MMM dd yyyy"))}(Wn),className:"time"}),(0,c.Y)(s.D,{pickedDate:function(n){for(var e=(0,b.A)(Wn,{weekStartsOn:1}),t=[],o=n;o<=e;)t.push(new Date(o)),o=(0,w.A)(o,1);return t}(Wn),customInput:function(n){return(0,c.Y)(z.D6,{onClick:n.onClick,children:(0,c.Y)("img",{src:"".concat(j.JpE,"/images/chevron-down.svg")})})},className:"Selectable",onChange:function(n){Sn(n),qn(),cn&&cn(n)},locale:wn})]}),(0,c.FD)("div",{className:"skip-buttons",children:[(0,c.Y)(O.A,{onClick:function(){Sn((0,A.A)(En,7)),qn(),cn&&cn((0,A.A)(En,7))},role:"button"}),(0,c.Y)(O.A,{onClick:function(){Sn((0,w.A)(En,7)),qn(),cn&&cn((0,w.A)(En,7))},role:"button"})]})]}),(0,c.FD)("div",{className:"d-flex sp-mt-10",children:[(0,c.FD)("div",{className:"d-flex-center",children:[(0,c.Y)(v.g,{label:"Telemedicine",name:"telemed",id:"telemed",color:"orange",checked:Vn.telemed,onChange:function(){return Xn((0,r.A)((0,i.A)({},Vn),{telemed:!Vn.telemed}))}}),(0,c.Y)(v.g,{label:"Outpatient",name:"upcoming",id:"upcoming",color:"blue",checked:Vn.upcoming,onChange:function(){return Xn((0,r.A)((0,i.A)({},Vn),{upcoming:!Vn.upcoming}))}}),(0,c.Y)(v.g,{label:yn({id:"admin.booking.availability",defaultMessage:"Availability"}),name:"checkbox",id:"availability",color:"green",checked:Vn.availability,onChange:function(){return Xn((0,r.A)((0,i.A)({},Vn),{availability:!Vn.availability}))}}),(0,c.Y)(v.g,{label:yn({id:"admin.booking.past",defaultMessage:"Past"}),name:"checkbox",id:"past",color:"grey",checked:Vn.past,onChange:function(){return Xn((0,r.A)((0,i.A)({},Vn),{past:!Vn.past}))}})]}),"doctor"===(null===mn||void 0===mn?void 0:mn.role)&&(0,c.Y)(p.B,{onClick:function(){return Y().push("/admin/schedule/edit")},color:"transparent",size:"md",icon:(0,c.Y)(R.A,{}),className:"edit-btn",children:yn({id:"admin.doctors.editSchedule",defaultMessage:"Edit Schedule"})}),!sn&&!xn&&(0,c.Y)(c.FK,{children:"schedules"===en?(0,c.Y)(N.r,{data:Jn,button:(0,c.FD)(z.wE,{children:[yn({id:"admin.schedule.create.title",defaultMessage:"Create"})," ",(0,c.Y)(H.A,{})]})}):(0,c.FD)(p.B,{color:"primary",size:"md",onClick:J,children:["+"," ",yn({id:"admin.booking.addAnAppointment",defaultMessage:"Add an appointment"})]})})]})]})}),(0,c.FD)(z.Hc,{"data-is-in-schedule":nn,children:[(0,c.Y)(L.J,{}),(0,c.Y)("div",{className:"calendar sticky",children:(0,a.A)(Array(7)).map((function(n,e){return(0,c.Y)("div",{className:"day-column heading",style:{backgroundColor:(0,x.A)(An)===(0,x.A)((0,w.A)(Wn,e))?"#E3F2FF":""},children:(0,c.FD)("div",{className:"heading-wrap",children:[(0,c.Y)("div",{className:"w-full font-bold date",children:Gn(e)}),Kn((0,w.A)(Wn,e))?(0,c.Y)(z.LX,{onClick:function(){var n=(0,x.A)((0,w.A)(Wn,e)),t=dn&&dn[n];t&&(null===ln||void 0===ln||ln(t[0]))},style:{justifyContent:"center",alignItems:"flex-start"},children:(0,c.FD)("div",{className:"dayoff",children:[(0,c.Y)(_.A,{className:"remove"}),(0,c.Y)(h.T,{size:"n1",color:f.w.colors.violet600,children:(0,y.A)((0,w.A)(Wn,e),xn?"dd/MM":"dd/MM/yyyy")}),(0,c.Y)(U.A,{className:"bin"})]})}):(0,c.Y)("div",{style:{color:"#737373"},className:"w-full date",children:(0,y.A)((0,w.A)(Wn,e),xn?"dd/MM":"dd/MM/yyyy")})]})},"day-title-".concat(e+1))}))}),(0,c.FD)("div",{style:{position:"relative"},children:[(0,c.Y)("div",{className:"calendar",children:(0,a.A)(Array(7)).map((function(n,e){return(0,c.Y)("div",{className:"day-column",style:{borderLeft:"1px solid #F1F2F4"},children:(0,c.Y)("div",{className:"day-hours",children:q(0,23,30).map((function(n,e){return(0,c.Y)("div",{id:"empty-cell-".concat(e),className:"cell",style:{borderBottom:e%2===0?"1px dashed #E6E7EC":"1px solid #E6E7EC"}},"empty-cell-".concat(e))}))})},"day-".concat(e+1))}))}),(0,c.Y)("div",{className:"calendar_overlay",children:(0,a.A)(Array(7)).map((function(n,e){var t=(0,w.A)(Wn,e),o=hn&&!!Ln&&0===(0,k.A)(Ln.day,t);return(0,c.FD)("div",{className:"day-column",children:[(0,c.Y)(T.z,{date:t,schedules:C,bookings:D,unavailable:dn,onClickDetailBooking:Hn,onAddAppointment:W,onSetUnavailable:an,onEdit:on,isChoosingAction:tn,type:en,onRemoveUnavailable:ln,disableActionSchedule:sn,showOption:Vn,isClientRendered:Mn,enableDragReschedule:hn,draggingBookingId:null===Tn||void 0===Tn?void 0:Tn.id,onDragStart:zn,isValidDropSlot:B.sN}),o&&Ln&&(0,c.FD)(z.TO,{differenceMinutes:(0,B.L7)(Ln.started),durationMinutes:Math.max((0,B.L7)(Ln.ended)-(0,B.L7)(Ln.started),0),pxPerMin:2,valid:Ln.valid,children:[Ln.started," - ",Ln.ended]})]},"day-event-".concat(e+1))}))})]})]}),hn&&(0,c.Y)(V,{isShowing:!!Bn,booking:null===Bn||void 0===Bn?void 0:Bn.booking,doctorName:null===Bn||void 0===Bn||null===(e=Bn.booking)||void 0===e||null===(t=e.doctor)||void 0===t?void 0:t.name,fromLabel:Zn.fromLabel,toLabel:Zn.toLabel,isLoading:On,onCancel:Pn,onConfirm:Rn})]})}},38057:function(n,e,t){t.d(e,{I:function(){return i}});var o=t(73884);function i(n){(0,o.useLayoutEffect)((function(){if(n&&"undefined"!==typeof document){var e=document.body,t=function(){e.classList.contains("hhc-disabled-scroll")&&e.classList.remove("hhc-disabled-scroll"),"hidden"===e.style.overflow&&(e.style.overflow=""),e.style.paddingRight&&e.style.removeProperty("padding-right")};t();var o=new MutationObserver(t);return o.observe(e,{attributes:!0,attributeFilter:["class","style"]}),function(){o.disconnect()}}}),[n])}},83545:function(n,e,t){t.d(e,{B:function(){return a}});var o=t(53513),i=t(2445),r=t(73884);function a(n,e){var t=(0,r.useState)(!1),a=t[0],l=t[1];return(0,r.useEffect)((function(){return l(!0)}),[]),a?(0,i.Y)(n,(0,o.A)({},e)):null}}}]);