text: /*!
   * OpenUI5
   * (c) Copyright 2009-2019 SAP SE or an SAP affiliate company.
   * Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
   */
  sap.ui.define(["sap/ui/unified/calendar/CalendarDate","sap/ui/unified/calendar/CalendarUtils","sap/ui/core/date/UniversalDate","sap/ui/core/InvisibleText","sap/ui/unified/library"],function(e,t,a,i,r){"use strict";var l=r.CalendarDayType;var s={};s.render=function(e,t){e.write("<div");e.writeControlData(t);e.addClass("sapMSinglePCGrid");e.addClass("sapUiSizeCompact");e.writeClasses();e.write(">");e.renderControl(t.getAggregation("_columnHeaders"));this.renderBlockersContainer(e,t);e.write("<div");e.addClass("sapMSinglePCGridContent");e.writeClasses();e.write(">");this.renderRowHeaders(e,t);this.renderNowMarker(e,t);this.renderColumns(e,t);e.write("</div>");e.write("</div>")};s.renderBlockersContainer=function(a,i){var r=i._getColumns(),l=i._getBlockersToRender().iMaxlevel,s=i.getStartDate(),d=(l+1)*i._getBlockerRowHeight();a.write("<div");a.addClass("sapMSinglePCBlockersRow");a.writeClasses();a.write(">");a.write("<div");a.addClass("sapMSinglePCBlockersColumns");if(l>0){d=d+3}a.addStyle("height",d+"px");a.writeClasses();a.writeStyles();a.write(">");for(var n=0;n<r;n++){var o=new e(s.getFullYear(),s.getMonth(),s.getDate()+n),p=i._formatDayAsString(o);a.write("<div");a.writeAttribute("data-sap-day",p);a.addClass("sapMSinglePCBlockersColumn");if(o.isSame(new e)){a.addClass("sapMSinglePCBlockersColumnToday")}if(t._isWeekend(o,i._getCoreLocaleData())){a.addClass("sapMSinglePCBlockersColumnWeekend")}a.writeClasses();a.write(">");a.write("</div>")}this.renderBlockers(a,i);a.write("</div>");a.write("</div>")};s.renderBlockers=function(e,t){var a=this,r=t._getBlockersToRender().oBlockersList;e.write("<div");e.writeAttribute("role","grid");e.writeAttribute("aria-labelledby",i.getStaticId("sap.m","SPC_BLOCKERS"));e.addClass("sapMSinglePCBlockers");e.addClass("sapUiCalendarRowVisFilled");e.writeClasses();e.write(">");r.getIterator().forEach(function(i){a.renderBlockerAppointment(e,t,i)});e.write("</div>")};s.renderBlockerAppointment=function(a,r,s){var d=e.fromLocalJSDate(r.getStartDate()),n=s.getData(),o=e.fromLocalJSDate(n.getStartDate()),p=e.fromLocalJSDate(n.getEndDate()),w=t._daysBetween(o,d),C=t._daysBetween(p,d),g=r._getColumns(),u=r._getBlockerRowHeight(),c=s.level,b=s.width,v=n.getTooltip_AsString(),S=n.getType(),f=n.getColor(),A=n.getTitle(),y=n.getText(),T=n.getIcon(),M=n.getId(),m={role:"gridcell",labelledby:{value:i.getStaticId("sap.ui.unified","APPOINTMENT"),append:true}},P=r.getAriaLabelledBy(),_=w*(100/g),I=(g-C-1)*(100/g),h=sap.ui.getCore().getConfiguration().getRTL(),k;if(P.length>0){m["labelledby"].value=m["labelledby"].value+" "+P.join(" ")}if(A){m["labelledby"].value=m["labelledby"].value+" "+M+"-Title"}m["labelledby"].value=m["labelledby"].value+" "+M+"-Descr";if(y){m["labelledby"].value=m["labelledby"].value+" "+M+"-Text"}if(n.getSelected()){m["labelledby"].value=m["labelledby"].value+" "+i.getStaticId("sap.ui.unified","APPOINTMENT_SELECTED")}if(n.getTentative()){m["labelledby"].value=m["labelledby"].value+" "+i.getStaticId("sap.ui.unified","APPOINTMENT_TENTATIVE")}a.write("<div");a.writeElementData(n);a.writeAttribute("data-sap-level",c);a.writeAttribute("data-sap-width",b);a.writeAttribute("tabindex",0);if(v){a.writeAttributeEscaped("title",v)}a.writeAccessibilityState(n,m);a.addClass("sapMSinglePCAppointmentWrap");a.addClass("sapUiCalendarRowApps");a.addStyle("top",u*c+1+"px");a.addStyle(h?"right":"left",Math.max(_,0)+"%");a.addStyle(h?"left":"right",Math.max(I,0)+"%");a.writeClasses();a.writeStyles();a.write(">");a.write("<div");a.addClass("sapUiCalendarApp");if(n.getSelected()){a.addClass("sapUiCalendarAppSel")}if(n.getTentative()){a.addClass("sapUiCalendarAppTent")}if(T){a.addClass("sapUiCalendarAppWithIcon")}if(!f&&S&&S!=l.None){a.addClass("sapUiCalendarApp"+S)}if(f){if(sap.ui.getCore().getConfiguration().getRTL()){a.addStyle("border-right-color",f)}else{a.addStyle("border-left-color",f)}}a.writeClasses();a.writeStyles();a.write(">");a.write("<div");a.addClass("sapUiCalendarAppCont");if(f){a.addStyle("background-color",n._getCSSColorForBackground(f));a.writeStyles()}a.writeClasses();a.write(">");if(_<0){k=["sapUiCalendarAppArrowIconLeft","sapUiCalendarAppArrowIcon"];a.writeIcon("sap-icon://arrow-left",k,{title:null})}if(T){k=["sapUiCalendarAppIcon"];var D={};D["id"]=M+"-Icon";D["title"]=null;a.writeIcon(T,k,D)}if(A){a.write("<span");a.writeAttribute("id",M+"-Title");a.addClass("sapUiCalendarAppTitle");a.writeClasses();a.write(">");a.writeEscaped(A,true);a.write("</span>")}if(I<0){k=["sapUiCalendarAppArrowIconRight","sapUiCalendarAppArrowIcon"];a.writeIcon("sap-icon://arrow-right",k,{title:null})}a.write('<span id="'+M+'-Descr" class="sapUiInvisibleText">'+r._getAppointmentStartEndInfo(n)+"</span>");a.write("</div>");a.write("</div>");a.write("</div>")};s.renderRowHeaders=function(e,t){var a=t._getVisibleStartHour(),i=t._getVisibleEndHour(),r=new Date,l=t._getHoursFormat(),s=t._getAMPMFormat();e.write("<div");e.addClass("sapMSinglePCRowHeaders");e.writeClasses();e.write(">");for(var d=a;d<=i;d++){r.setHours(d);e.write("<span");e.addClass("sapMSinglePCRowHeader");e.addClass("sapMSinglePCRowHeader"+d);if(t._shouldHideRowHeader(d)){e.addClass("sapMSinglePCRowHeaderHidden")}e.writeClasses();e.write(">");e.write(l.format(r));if(t._hasAMPM()){e.write("<span");e.addClass("sapMSinglePCRowHeaderAMPM");e.writeClasses();e.write(">");e.write(" "+s.format(r));e.write("</span>")}e.write("</span>")}e.write("</div>")};s.renderColumns=function(a,r){var l=r._getColumns(),s=r.getStartDate(),d=r._getAppointmentsToRender();a.write("<div");a.writeAttribute("role","grid");a.writeAttribute("aria-labelledby",i.getStaticId("sap.m","SPC_APPOINTMENTS"));a.addClass("sapMSinglePCColumns");a.writeClasses();a.write(">");for(var n=0;n<l;n++){var o=new e(s.getFullYear(),s.getMonth(),s.getDate()+n),p=r._formatDayAsString(o);a.write("<div");a.writeAttribute("data-sap-day",p);a.addClass("sapMSinglePCColumn");if(o.isSame(new e)){a.addClass("sapMSinglePCColumnToday")}if(t._isWeekend(o,r._getCoreLocaleData())){a.addClass("sapMSinglePCColumnWeekend")}a.writeClasses();a.write(">");this.renderRows(a,r);this.renderAppointments(a,r,d[p],o);a.write("</div>")}a.write("</div>")};s.renderRows=function(e,t){var a=t._getVisibleStartHour(),i=t._getVisibleEndHour();for(var r=a;r<=i;r++){e.write("<div");e.addClass("sapMSinglePCRow");if(!t._isVisibleHour(r)){e.addClass("sapMSinglePCNonWorkingRow")}e.writeAttribute("data-sap-hour",r);e.writeClasses();e.write(">");e.write("</div>")}};s.renderAppointments=function(e,t,a,i){var r=this;if(a){e.write("<div");e.addClass("sapMSinglePCAppointments");e.addClass("sapUiCalendarRowVisFilled");e.writeClasses();e.write(">");a.oAppointmentsList.getIterator().forEach(function(l){var s=a.iMaxLevel,d=l.level,n=l.width,o=l.getData();r.renderAppointment(e,t,s,d,n,o,i)});e.write("</div>")}};s.renderAppointment=function(e,t,r,s,d,n,o){var p=t._getRowHeight(),w=new a(o.getYear(),o.getMonth(),o.getDate(),t._getVisibleStartHour()),C=new a(o.getYear(),o.getMonth(),o.getDate(),t._getVisibleEndHour(),59,59),g=n.getStartDate(),u=n.getEndDate(),c=n.getTooltip_AsString(),b=n.getType(),v=n.getColor(),S=n.getTitle(),f=n.getText(),A=n.getIcon(),y=n.getId(),T={role:"gridcell",labelledby:{value:i.getStaticId("sap.ui.unified","APPOINTMENT"),append:true}},M=t.getAriaLabelledBy(),m=w.getTime()>g.getTime(),P=C.getTime()<u.getTime(),_=m?0:t._calculateTopPosition(g),I=P?0:t._calculateBottomPosition(u),h=100/(r+1);if(M.length>0){T["labelledby"].value=T["labelledby"].value+" "+M.join(" ")}if(S){T["labelledby"].value=T["labelledby"].value+" "+y+"-Title"}T["labelledby"].value=T["labelledby"].value+" "+y+"-Descr";if(f){T["labelledby"].value=T["labelledby"].value+" "+y+"-Text"}if(n.getSelected()){T["labelledby"].value=T["labelledby"].value+" "+i.getStaticId("sap.ui.unified","APPOINTMENT_SELECTED")}if(n.getTentative()){T["labelledby"].value=T["labelledby"].value+" "+i.getStaticId("sap.ui.unified","APPOINTMENT_TENTATIVE")}e.write("<div");e.writeElementData(n);e.writeAttribute("data-sap-level",s);e.writeAttribute("data-sap-width",d);e.writeAttribute("tabindex",0);if(c){e.writeAttributeEscaped("title",c)}e.writeAccessibilityState(n,T);e.addClass("sapMSinglePCAppointmentWrap");e.addClass("sapUiCalendarRowApps");e.addStyle("top",_+"px");e.addStyle("bottom",I+"px");e.addStyle(sap.ui.getCore().getConfiguration().getRTL()?"right":"left",h*s+"%");e.addStyle("width",h*d+"%");e.writeClasses();e.writeStyles();e.write(">");e.write("<div");e.addClass("sapUiCalendarApp");e.addStyle("min-height",p/2-1+"px");if(n.getSelected()){e.addClass("sapUiCalendarAppSel")}if(n.getTentative()){e.addClass("sapUiCalendarAppTent")}if(A){e.addClass("sapUiCalendarAppWithIcon")}if(!v&&b&&b!=l.None){e.addClass("sapUiCalendarApp"+b)}if(v){if(sap.ui.getCore().getConfiguration().getRTL()){e.addStyle("border-right-color",v)}else{e.addStyle("border-left-color",v)}}e.writeClasses();e.writeStyles();e.write(">");e.write("<div");e.addClass("sapUiCalendarAppCont");if(v){e.addStyle("background-color",n._getCSSColorForBackground(v));e.writeStyles()}e.writeClasses();e.write(">");if(A){var k=["sapUiCalendarAppIcon"];var D={};D["id"]=y+"-Icon";D["title"]=null;e.writeIcon(A,k,D)}if(S){e.write("<span");e.writeAttribute("id",y+"-Title");e.addClass("sapUiCalendarAppTitle");e.writeClasses();e.write(">");e.writeEscaped(S,true);e.write("</span>")}if(f){e.write("<span");e.writeAttribute("id",y+"-Text");e.addClass("sapUiCalendarAppText");e.writeClasses();e.write(">");e.writeEscaped(f,true);e.write("</span>")}e.write('<span id="'+y+'-Descr" class="sapUiInvisibleText">'+t._getAppointmentStartEndInfo(n)+"</span>");e.write("</div>");e.write("</div>");e.write("</div>")};s.renderNowMarker=function(e,t){var a=new Date;e.write("<div");e.writeAttribute("id",t.getId()+"-nowMarker");e.addStyle("top",t._calculateTopPosition(a)+"px");e.addClass("sapMSinglePCNowMarker");if(t._isOutsideVisibleHours(a.getHours())){e.addClass("sapMSinglePCNowMarkerHidden")}e.writeClasses();e.writeStyles();e.write(">");e.write("<span");e.writeAttribute("id",t.getId()+"-nowMarkerText");e.addClass("sapMSinglePCNowMarkerText");e.writeClasses();e.write(">");e.write(t._formatTimeAsString(a));if(t._hasAMPM()){e.write("<span");e.writeAttribute("id",t.getId()+"-nowMarkerAMPM");e.addClass("sapMSinglePCNowMarkerAMPM");e.writeClasses();e.write(">");e.write(t._addAMPM(a));e.write("</span>")}e.write("</span>");e.write("</div>")};return s},true);