Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@quasar/quasar-ui-qcalendar

Package Overview
Dependencies
Maintainers
4
Versions
121
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@quasar/quasar-ui-qcalendar - npm Package Compare versions

Comparing version 1.2.3 to 1.3.0

100

dist/api/QCalendar.json

@@ -747,2 +747,64 @@ {

]
},
"mini-mode": {
"type": [
"Boolean",
"String"
],
"category": "behavior",
"addedIn": "v1.2.4",
"values": [
true,
false,
"auto"
],
"desc": "When `true` puts the calendar into mini-mode. When `auto`, then the property `breakpoint` is used to determine when the calendar will be put into mini-mode",
"applicable": [
"month"
],
"examples": [
"mini-mode",
":mini-mode=\"true\"",
"mini-mode=\"auto\""
]
},
"breakpoint": {
"type": "String",
"category": "behavior",
"addedIn": "v1.2.4",
"values": [
"xs",
"sm",
"md",
"lg",
"xl"
],
"desc": "This property is used when `mini-mode` is set with `auto`",
"applicable": [
"month"
],
"examples": [
"breakpoint=\"sm\"",
"breakpoint=\"md\""
]
},
"month-label-size": {
"type": "String",
"category": "style",
"addedIn": "v1.2.4",
"values": [
"xs",
"sm",
"md",
"lg",
"xl"
],
"desc": "This property is used change the size of the month label button. This property is ignored when `mini-mode` is set to true",
"applicable": [
"month"
],
"examples": [
"month-label-size=\"sm\"",
"month-label-size=\"md\""
]
}

@@ -773,3 +835,3 @@ },

"day",
"month"
"agenda"
]

@@ -787,3 +849,3 @@ },

"intervals-header": {
"desc": "",
"desc": "Use to render items in the intervals header",
"scope": {

@@ -854,5 +916,5 @@ "days": {

"column-header-before": {
"desc": "",
"desc": "Use to render items before the column header",
"scope": {
"day": {
"data": {
"type": "Object",

@@ -867,5 +929,5 @@ "desc": "Timestamp object"

"column-header-after": {
"desc": "",
"desc": "Use to render items after the column header",
"scope": {
"day": {
"data": {
"type": "Object",

@@ -880,7 +942,7 @@ "desc": "Timestamp object"

"day": {
"desc": "",
"desc": "Use to add items to the `day` rendering",
"scope": {
"day": {
"data": {
"type": "Object",
"desc": "Timestamp object"
"desc": "Timestamp object, outside and miniMode"
}

@@ -892,4 +954,16 @@ },

},
"day-label": {
"desc": "Use to replace the `day label`",
"scope": {
"data": {
"type": "Object",
"desc": "Timestamp object, dayLabel and miniMode"
}
},
"applicable": [
"month"
]
},
"month-label": {
"desc": "",
"desc": "Use to replace the `month label`. Not applicable in `mini-mode`",
"scope": {

@@ -906,3 +980,3 @@ "data": {

"day-of-year": {
"desc": "",
"desc": "Use to replace the `day of year` label. Not applicable in `mini-mode`",
"scope": {

@@ -918,3 +992,3 @@ "data": {

},
"work-week-label": {
"workweek": {
"desc": "",

@@ -924,3 +998,3 @@ "scope": {

"type": "Object",
"desc": "Timestamp object with workWeekLabel"
"desc": "Timestamp object, workWeekLabel and miniMode"
}

@@ -927,0 +1001,0 @@ },

4

dist/index.common.js
/*!
* @quasar/quasar-ui-qcalendar v1.2.3
* @quasar/quasar-ui-qcalendar v1.3.0
* (c) 2019 Jeff Galbraith <jeff@quasar.dev>
* Released under the MIT License.
*/
"use strict";var quasar=require("quasar"),version="1.2.3",PARSE_REGEX=/^(\d{4})-(\d{1,2})(-(\d{1,2}))?([^\d]+(\d{1,2}))?(:(\d{1,2}))?(:(\d{1,2}))?$/,PARSE_TIME=/(\d\d?)(:(\d\d?)|)(:(\d\d?)|)/,DAYS_IN_MONTH=[0,31,28,31,30,31,30,31,31,30,31,30,31],DAYS_IN_MONTH_LEAP=[0,31,29,31,30,31,30,31,31,30,31,30,31],DAYS_IN_MONTH_MIN=28,DAYS_IN_MONTH_MAX=31,MONTH_MAX=12,MONTH_MIN=1,DAY_MIN=1,DAYS_IN_WEEK=7,MINUTES_IN_HOUR=60;function getStartOfWeek(e,t,a){if(1===e.day)for(;!t.includes(e.weekday);)nextDay(e);var r=copyTimestamp(e);return findWeekday(r,t[0],prevDay,t.length),updateFormatted(r),a&&updateRelative(r,a,r.hasTime),r}function getEndOfWeek(e,t,a){if(daysInMonth(e.year,e.month)===e.day)for(;!t.includes(e.weekday);)prevDay(e);var r=copyTimestamp(e);return findWeekday(r,t[t.length-1],nextDay,t.length),updateFormatted(r),a&&updateRelative(r,a,r.hasTime),r}function getStartOfMonth(e){var t=copyTimestamp(e);return t.day=DAY_MIN,updateFormatted(t),t}function getEndOfMonth(e){var t=copyTimestamp(e);return t.day=daysInMonth(t.year,t.month),updateFormatted(t),t}function parseTime(e){if("number"==typeof e)return e;if("string"==typeof e){var t=PARSE_TIME.exec(e);return!!t&&60*parseInt(t[1],10)+parseInt(t[3]||0,10)}return"object"==typeof e&&("number"==typeof e.hour&&"number"==typeof e.minute&&60*e.hour+e.minute)}function validateTimestamp(e){return!!PARSE_REGEX.exec(e)}function parsed(e){var t=PARSE_REGEX.exec(e);return t?{date:e,time:"",year:parseInt(t[1],10),month:parseInt(t[2],10),day:parseInt(t[4],10)||1,hour:parseInt(t[6],10)||0,minute:parseInt(t[8],10)||0,weekday:0,doy:0,workweek:0,hasDay:!!t[4],hasTime:!(!t[6]||!t[8]),past:!1,current:!1,future:!1,disabled:!1}:null}function parseTimestamp(e,t){var a=parsed(e);return null===a?null:(updateFormatted(a),t&&updateRelative(a,t,a.hasTime),a)}function parseDate(e){return updateFormatted({date:"",time:"",year:e.getFullYear(),month:e.getMonth()+1,day:e.getDate(),weekday:e.getDay(),hour:e.getHours(),minute:e.getMinutes(),doy:0,workweek:0,hasDay:!0,hasTime:!0,past:!1,current:!0,future:!1,disabled:!1})}function getDayIdentifier(e){return 1e4*e.year+100*e.month+e.day}function getTimeIdentifier(e){return 100*e.hour+e.minute}function updateRelative(e,t,a){void 0===a&&(a=!1);var r=getDayIdentifier(t),n=getDayIdentifier(e),s=r===n;return e.hasTime&&a&&s&&(s=(r=getTimeIdentifier(t))===(n=getTimeIdentifier(e))),e.past=n<r,e.current=s,e.future=n>r,e}function updateMinutes(e,t,a){return e.hasTime=!0,e.hour=Math.floor(t/MINUTES_IN_HOUR),e.minute=t%MINUTES_IN_HOUR,e.time=getTime(e),a&&updateRelative(e,a,!0),e}function updateWeekday(e){return e.weekday=getWeekday(e),e}function updateDayOfYear(e){return e.doy=getDayOfYear(e),e}function updateDisabled(e,t){if(Array.isArray(t)&&0!==t.length){var a=getDayIdentifier(e);for(var r in t){if(getDayIdentifier(parseTimestamp(t[r]+" 00:00"))===a){e.disabled=!0;break}}}}function updateFormatted(e){return e.time=getTime(e),e.date=getDate(e),e.weekday=getWeekday(e),e.doy=getDayOfYear(e),e.workweek=getWorkWeek(e),e}function getDayOfYear(e){if(0!==e.year){var t=new Date(Date.UTC(e.year,e.month-1,e.day,0,0));return quasar.date.getDayOfYear(t)}}function getWorkWeek(e){if(0!==e.year){var t=new Date(Date.UTC(e.year,e.month-1,e.day,0,0));return quasar.date.getWeekOfYear(t)}}function getWeekday(e){if(e.hasDay){var t=Math.floor,a=e.day,r=(e.month+9)%MONTH_MAX+1,n=t(e.year/100),s=e.year%100-(e.month<=2?1:0);return((a+t(2.6*r-.2)-2*n+s+t(s/4)+t(n/4))%7+7)%7}return e.weekday}function isLeapYear(e){return e%4==0&&e%100!=0||e%400==0}function daysInMonth(e,t){return isLeapYear(e)?DAYS_IN_MONTH_LEAP[t]:DAYS_IN_MONTH[t]}function copyTimestamp(e){return Object.assign({},e)}function padNumber(e,t){for(var a=String(e);a.length<t;)a="0"+a;return a}function getDate(e){var t=padNumber(e.year,4)+"-"+padNumber(e.month,2);return e.hasDay&&(t+="-"+padNumber(e.day,2)),t}function getTime(e){return e.hasTime?padNumber(e.hour,2)+":"+padNumber(e.minute,2):""}function nextDay(e){return++e.day,e.weekday=(e.weekday+1)%DAYS_IN_WEEK,e.day>DAYS_IN_MONTH_MIN&&e.day>daysInMonth(e.year,e.month)&&(e.day=DAY_MIN,++e.month,e.month>MONTH_MAX&&(e.month=MONTH_MIN,++e.year)),e}function prevDay(e){return e.day--,e.weekday=(e.weekday+6)%DAYS_IN_WEEK,e.day<DAY_MIN&&(e.month--,e.month<MONTH_MIN&&(e.year--,e.month=MONTH_MAX),e.day=daysInMonth(e.year,e.month)),e}function relativeDays(e,t,a,r){for(void 0===t&&(t=nextDay),void 0===a&&(a=1),void 0===r&&(r=[0,1,2,3,4,5,6]);--a>=0;)t(e),r.length<7&&!r.includes(e.weekday)&&++a;return e}function findWeekday(e,t,a,r){for(void 0===a&&(a=nextDay),void 0===r&&(r=6);e.weekday!==t&&--r>=0;)a(e);return e}function getWeekdaySkips(e){for(var t=[1,1,1,1,1,1,1],a=[0,0,0,0,0,0,0],r=0;r<e.length;++r)a[e[r]]=1;for(var n=0;n<DAYS_IN_WEEK;++n){for(var s=1,i=1;i<DAYS_IN_WEEK;++i){if(a[(n+i)%DAYS_IN_WEEK])break;++s}t[n]=a[n]*s}return t}function createDayList(e,t,a,r,n,s,i){void 0===n&&(n=[]),void 0===s&&(s=42),void 0===i&&(i=0);var o=getDayIdentifier(t),d=[],u=copyTimestamp(e),l=0,c=l===o;if(o<getDayIdentifier(e))return d;for(;(!c||d.length<i)&&d.length<s&&(l=getDayIdentifier(u),!(c=c||l>o));)if(0!==r[u.weekday]){var h=copyTimestamp(u);updateFormatted(h),updateRelative(h,a),updateDisabled(h,n),d.push(h),u=relativeDays(u,nextDay)}else u=nextDay(u);return d}function createIntervalList(e,t,a,r,n){for(var s=[],i=0;i<r;++i){var o=(t+i)*a,d=copyTimestamp(e);s.push(updateMinutes(d,o,n))}return s}function createNativeLocaleFormatter(e,t){return"undefined"==typeof Intl||void 0===Intl.DateTimeFormat?function(e,t){return""}:function(a,r){try{return new Intl.DateTimeFormat(e||void 0,t(a,r)).format(new Date(Date.UTC(a.year,a.month-1,a.day,a.hour,a.minute)))}catch(e){return""}}}function validateNumber(e){return isFinite(parseInt(e,10))}var Times={name:"Times",props:{now:{type:String,validator:function(e){return""===e||validateTimestamp(e)}}},data:function(){return{times:{now:parseTimestamp("0000-00-00 00:00"),today:parseTimestamp("0000-00-00")}}},computed:{parsedNow:function(){return this.now?parseTimestamp(this.now):null}},watch:{parsedNow:"updateCurrent"},created:function(){this.updateCurrent(),this.setCurrent()},methods:{setCurrent:function(){this.times.now.current=this.times.today.current=!0,this.times.now.past=this.times.today.past=!1,this.times.now.future=this.times.today.future=!1},updateCurrent:function(){var e=this.parsedNow||this.getNow();this.updateDay(e,this.times.now),this.updateTime(e,this.times.now),this.updateDay(e,this.times.today)},getNow:function(){return parseDate(new Date)},updateDay:function(e,t){e.date!==t.date&&(t.year=e.year,t.month=e.month,t.day=e.day,t.weekday=e.weekday,t.date=e.date)},updateTime:function(e,t){e.time!==t.time&&(t.hour=e.hour,t.minute=e.minute,t.time=e.time)}}},Mouse={name:"Mouse",methods:{getDefaultMouseEventHandlers:function(e,t){var a;return this.getMouseEventHandlers(((a={})["click"+e]={event:"click"},a["contextmenu"+e]={event:"contextmenu",prevent:!0,result:!1},a["mousedown"+e]={event:"mousedown"},a["mousemove"+e]={event:"mousemove"},a["mouseup"+e]={event:"mouseup"},a["mouseenter"+e]={event:"mouseenter"},a["mouseleave"+e]={event:"mouseleave"},a["touchstart"+e]={event:"touchstart"},a["touchmove"+e]={event:"touchmove"},a["touchend"+e]={event:"touchend"},a),t)},getMouseEventHandlers:function(e,t){var a=this,r={},n=function(n){var s=e[n];if(a.$listeners[n]){var i=(s.passive?"&":(s.once?"~":"")+(s.capture?"!":""))+s.event,o=function(e){var r=e;return(void 0===s.button||r.buttons>0&&r.button===s.button)&&(s.prevent&&e.preventDefault(),s.stop&&e.stopPropagation(),a.$emit(n,t(e))),s.result};i in r?Array.isArray(r[i])?r[i].push(o):r[i]=[r[i],o]:r[i]=o}};for(var s in e)n(s);return r}}},version$1="1.0.5",CSS_COLOR_NAMES=["transparent","aliceblue","antiquewhite","aqua","aquamarine","azure","beige","bisque","black","blanchedalmond","blue","blueviolet","brown","burlywood","cadetblue","chartreuse","chocolate","coral","cornflowerblue","cornsilk","crimson","cyan","darkblue","darkcyan","darkgoldenrod","darkgray","darkgrey","darkgreen","darkkhaki","darkmagenta","darkolivegreen","darkorange","darkorchid","darkred","darksalmon","darkseagreen","darkslateblue","darkslategray","darkslategrey","darkturquoise","darkviolet","deeppink","deepskyblue","dimgray","dimgrey","dodgerblue","firebrick","floralwhite","forestgreen","fuchsia","gainsboro","ghostwhite","gold","goldenrod","gray","grey","green","greenyellow","honeydew","hotpink","indianred","indigo","ivory","khaki","lavender","lavenderblush","lawngreen","lemonchiffon","lightblue","lightcoral","lightcyan","lightgoldenrodyellow","lightgray","lightgrey","lightgreen","lightpink","lightsalmon","lightseagreen","lightskyblue","lightslategray","lightslategrey","lightsteelblue","lightyellow","lime","limegreen","linen","magenta","maroon","mediumaquamarine","mediumblue","mediumorchid","mediumpurple","mediumseagreen","mediumslateblue","mediumspringgreen","mediumturquoise","mediumvioletred","midnightblue","mintcream","mistyrose","moccasin","navajowhite","navy","oldlace","olive","olivedrab","orange","orangered","orchid","palegoldenrod","palegreen","paleturquoise","palevioletred","papayawhip","peachpuff","peru","pink","plum","powderblue","purple","red","rosybrown","royalblue","saddlebrown","salmon","sandybrown","seagreen","seashell","sienna","silver","skyblue","slateblue","slategray","slategrey","snow","springgreen","steelblue","tan","teal","thistle","tomato","turquoise","violet","wheat","white","whitesmoke","yellow","yellowgreen"],QColorizeMixin={name:"QColorizeMixin",props:{color:String},methods:{isNamedCssColor:function(e){return!!e&&CSS_COLOR_NAMES.includes(e.toLowerCase())},isCssColor:function(e){return!!e&&(!!e.match(/^(#|(rgb|hsl)a?\()/)||this.isNamedCssColor(e))},isCssVar:function(e){return!!e&&e.startsWith("--")},calculateColor:function(e,t){return void 0===t&&(t="black"),void 0===e&&void 0!==t?this.calculateColor(t):this.isCssColor(e)?e:this.makeQuasarColorVar(e,t)},makeQuasarColorVar:function(e,t){return"var("+(this.isCssVar(e)?e:"--q-color-"+e)+", '"+t+"')"},isValidCssColor:function(e){return this.isCssColor(e)||this.isCssVar(e)},setBothColors:function(e,t,a){return void 0===a&&(a={}),this.setTextColor(e,this.setBackgroundColor(t,a))},setBackgroundColor:function(e,t){var a;if(void 0===t&&(t={}),this.isValidCssColor(e)){var r=this.calculateColor(e);void 0===t.style&&(t.style={}),t.style=Object.assign({},t.style,{"background-color":""+r})}else if(e){var n=e.toString().trim();void 0===t.class&&(t.class={}),t.class=Object.assign({},t.class,((a={})["bg-"+n]=!0,a))}return t},setTextColor:function(e,t){var a;if(void 0===t&&(t={}),this.isValidCssColor(e)){var r=this.calculateColor(e);void 0===t.style&&(t.style={}),t.style=Object.assign({},t.style,{color:""+r,"caret-color":""+r})}else if(e){var n=e.toString().trim();void 0===t.class&&(t.class={}),t.class=Object.assign({},t.class,((a={})["text-"+n]=!0,a))}return t},setBorderColor:function(e,t){var a;if(void 0===t&&(t={}),this.isValidCssColor(e)){var r=this.calculateColor(e);void 0===t.style&&(t.style={}),t.style=Object.assign({},t.style,{"border-color":""+r})}else if(e){var n=e.toString().trim();void 0===t.class&&(t.class={}),t.class=Object.assign({},t.class,((a={})["border-"+n]=!0,a))}return t}}};QColorizeMixin.version=version$1;var version$2="1.0.0",QThemeMixin={name:"QThemeMixin",props:{theme:{type:Object,default:function(){}},enableTheme:Boolean},methods:{useDefaultTheme:function(e,t,a){return void 0===a&&(a={}),a},getThemeColors:function(e){var t=this;void 0===e&&(e=[]);var a=new Map;return!0===this.enableTheme&&void 0!==this.theme&&e.forEach(function(e){a.set(e,t.theme[e])}),a}}};function validateView(e){return["month","week","day","2day","3day","4day","5day","6day","month-scheduler","week-scheduler","custom-scheduler","scheduler","day-scheduler","2day-scheduler","3day-scheduler","4day-scheduler","5day-scheduler","6day-scheduler","month-agenda","week-agenda","custom-agenda","agenda","day-agenda","2day-agenda","3day-agenda","4day-agenda","5day-agenda","6day-agenda","month-interval","custom-interval"].includes(e)}QThemeMixin.version=version$2;var props={base:{weekdays:{type:Array,default:function(){return[0,1,2,3,4,5,6]}},disabledDays:Array,hideHeader:Boolean,noScroll:Boolean,shortWeekdayLabel:Boolean,noDefaultHeaderText:Boolean,noDefaultHeaderBtn:Boolean,locale:{type:String,default:"en-us"},animated:Boolean,transitionPrev:{type:String,default:"slide-right"},transitionNext:{type:String,default:"slide-left"},dragOverFunc:{type:Function},dropFunc:{type:Function}},intervals:{maxDays:{type:Number,default:7},shortIntervalLabel:Boolean,intervalHeight:{type:[Number,String],default:40,validator:validateNumber},intervalMinutes:{type:[Number,String],default:60,validator:validateNumber},intervalStart:{type:[Number,String],default:0,validator:validateNumber},intervalCount:{type:[Number,String],default:24,validator:validateNumber},intervalStyle:{type:Function,default:null},showIntervalLabel:{type:Function,default:null},hour24Format:Boolean,columnHeaderBefore:Boolean,columnHeaderAfter:Boolean,columnCount:{type:[Number,String],default:1,validator:validateNumber},columnIndexStart:{type:[Number,String],default:0,validator:validateNumber}},weeks:{dayHeight:{type:[Number,String],default:0,validator:validateNumber},dayStyle:{type:Function,default:null},dayPadding:String,minWeeks:{type:[Number,String],validator:validateNumber,default:1},shortMonthLabel:Boolean,showWorkWeeks:Boolean,showMonthLabel:{type:Boolean,default:!0},showDayOfYearLabel:Boolean,selectedStartEndDates:{type:Array,default:function(){return[]},validator:function(e){return e.length<=2}}},scheduler:{resources:Array,resourceKey:{type:String,default:"label"},maxDays:{type:Number,default:7},resourceHeight:{type:[Number,String],default:70,validator:validateNumber},resourceWidth:{type:[Number,String],validator:function(e){return void 0===e||validateNumber(e)}},resourceStyle:{type:Function,default:null},columnHeaderBefore:Boolean,columnHeaderAfter:Boolean,columnCount:{type:[Number,String],default:1,validator:validateNumber},columnIndexStart:{type:[Number,String],default:0,validator:validateNumber}},calendar:{view:{type:String,default:"month",validator:validateView},value:{type:String,validator:function(e){return""===e||validateTimestamp(e)}}}},CalendarBase={name:"CalendarBase",mixins:[QColorizeMixin,QThemeMixin,Mouse,Times],props:Object.assign({},props.base,{start:{type:String,validator:validateTimestamp,default:function(){return parseDate(new Date).date}},end:{type:String,validator:validateTimestamp,default:"0000-00-00"}}),data:function(){return{keyValue:"YYYY-mm-dd",direction:"next"}},computed:{weekdaySkips:function(){return getWeekdaySkips(this.weekdays)},parsedStart:function(){return parseTimestamp(this.start)},parsedEnd:function(){return parseTimestamp(this.end)},days:function(){return createDayList(this.parsedStart,this.parsedEnd,this.times.today,this.weekdaySkips,this.disabledDays)},dayFormatter:function(){var e={timeZone:"UTC",day:"numeric"};return createNativeLocaleFormatter(this.locale,function(t,a){return e})},weekdayFormatter:function(){var e={timeZone:"UTC",weekday:"long"},t={timeZone:"UTC",weekday:"short"};return createNativeLocaleFormatter(this.locale,function(a,r){return r?t:e})}},methods:{getRelativeClasses:function(e,t){return void 0===t&&(t=!1),{"q-current-day":e.current,"q-past-day":e.past,"q-future-day":e.future,"q-outside":t}},getStartOfWeek:function(e){return getStartOfWeek(e,this.weekdays,this.times.today)},getEndOfWeek:function(e){return getEndOfWeek(e,this.weekdays,this.times.today)},dayStyleDefault:function(e){}}};function convertToUnit(e,t){return void 0===t&&(t="px"),null==e||""===e?void 0:isNaN(e)?String(e):""+Number(e)+t}var QCalendarWeekly={name:"QCalendarWeekly",mixins:[CalendarBase],props:props.weeks,computed:{staticClass:function(){return"q-calendar-weekly"},parsedMinWeeks:function(){return parseInt(this.minWeeks,10)},days:function(){var e=this.parsedMinWeeks*this.weekdays.length;return createDayList(this.getStartOfWeek(this.parsedStart),this.getEndOfWeek(this.parsedEnd),this.times.today,this.weekdaySkips,this.disabledDays,Number.MAX_SAFE_INTEGER,e)},todayWeek:function(){var e=this.times.today;return createDayList(this.getStartOfWeek(e),this.getEndOfWeek(e),e,this.weekdaySkips,this.disabledDays,this.weekdays.length,this.weekdays.length)},monthFormatter:function(){var e={timeZone:"UTC",month:"long"},t={timeZone:"UTC",month:"short"};return createNativeLocaleFormatter(this.locale,function(a,r){return r?t:e})},styles:function(){var e={};if(this.dayHeight>0){var t=convertToUnit(this.dayHeight);e.height=t}return void 0!==this.dayPadding&&(e.padding=this.dayPadding),e}},methods:{isOutside:function(e){var t=getDayIdentifier(e);return t<getDayIdentifier(this.parsedStart)||t>getDayIdentifier(this.parsedEnd)},isCurrentWeek:function(e){for(var t=0;t<e.length;++t)if(!0===e[t].current)return{timestamp:e[t]};return{timestamp:!1}},__renderHead:function(e){return e("div",{staticClass:"q-calendar-weekly__head"},[!0===this.showWorkWeeks&&this.__renderWorkWeekHead(e),this.__renderHeadDays(e)])},__renderWorkWeekHead:function(e){var t,a,r=new Map,n=this.useDefaultTheme;return!0===this.enableTheme&&(t="colorHeader",a="backgroundHeader",r=this.getThemeColors([t,a]),n=this.setBothColors),e("div",n(r.get(t),r.get(a),{staticClass:"q-calendar-weekly__head-workweek"}),"#")},__renderHeadDays:function(e){var t=this;return this.todayWeek.map(function(a,r){return t.__renderHeadDay(e,a,r)})},__renderHeadDay:function(e,t,a){var r,n,s=this.isOutside(this.days[a]),i=new Map,o=this.useDefaultTheme;return!0===this.enableTheme&&(s?(r="colorHeaderOutside",n="backgroundHeaderOutside"):(r="colorHeader",n="backgroundHeader"),i=this.getThemeColors([r,n]),o=this.setBothColors),e("div",o(i.get(r),i.get(n),{key:t.date,staticClass:"ellipsis q-calendar-weekly__head-weekday",class:this.getRelativeClasses(t,s)}),[this.__renderHeadDayLabel(e,t,this.shortWeekdayLabel)])},__renderHeadDayLabel:function(e,t,a){return e("span",{staticClass:"ellipsis"},this.weekdayFormatter(t,a))},__renderWeeks:function(e){for(var t=this.days,a=this.weekdays.length,r=[],n=0;n<t.length;n+=a)r.push(this.__renderWeek(e,t.slice(n,n+a)));return r},__renderWeek:function(e,t){var a=this;return e("div",{key:t[0].date,staticClass:"q-calendar-weekly__week"},[!0===this.showWorkWeeks&&this.__renderWorkWeekGutter(e,t),t.map(function(t){return a.__renderDay(e,t)})])},__renderWorkWeekGutter:function(e,t){var a,r,n=this.$scopedSlots.workweek,s=t.length>2?t[2]:t[0],i=this.isCurrentWeek(t).timestamp,o=i&&!0===i.current?this.color:void 0,d=convertToUnit(this.dayHeight),u=new Map,l=this.useDefaultTheme;!0===this.enableTheme&&(i&&!0===i.current||!0===s.current?(a="colorWorkWeekCurrent",r="backgroundWorkWeekCurrent"):i&&!0===i.past||!0===s.past?(a="colorWorkWeekPast",r="backgroundWorkWeekPast"):(i&&!0===i.future||!0===s.future)&&(a="colorWorkWeekFuture",r="backgroundWorkWeekFuture"),u=this.getThemeColors([a,r]),l=this.setBothColors);var c=Number(s.workweek).toLocaleString(this.locale);return e("div",l(void 0!==o?o:u.get(a),u.get(r),{key:s.workweek,staticClass:"q-calendar-weekly__workweek",class:this.getRelativeClasses(!1!==i?i:s,!1),style:{height:this.dayHeight&&this.dayHeight>0?d:"auto"}}),n?n({workweekLabel:c,week:t}):c)},__renderDay:function(e,t){var a,r,n,s=this,i=this.dayStyle||this.dayStyleDefault,o=this.isOutside(t),d=this.$scopedSlots.day,u=Object.assign({},{outside:o},t),l=!1===o&&this.days.find(function(e){return e.month===t.month}).day===t.day&&!0===this.showMonthLabel,c=new Map,h=this.useDefaultTheme;!0===this.enableTheme&&(!0===o?(r="colorBodyOutside",n="backgroundBodyOutside"):!0===t.past?(r="colorBodyPast",n="backgroundBodyPast"):!0===t.current?(r="colorBodyCurrent",n="backgroundBodyCurrent"):!0===t.future&&(r="colorBodyFuture",n="backgroundBodyFuture"),c=this.getThemeColors([r,n]),h=this.setBothColors);var y=Object.assign({},this.styles);return y=Object.assign(y,i(t)),e("div",h(c.get(r),c.get(n),{key:t.date,staticClass:"q-calendar-weekly__day",class:Object.assign({},this.getRelativeClasses(t,o),{"q-calendar-weekly__day--droppable":a}),style:y,domProps:{ondragover:function(e){void 0!==s.dragOverFunc&&(a=s.dragOverFunc(e,t,"day"))},ondrop:function(e){void 0!==s.dropFunc&&s.dropFunc(e,t,"day")}},on:this.getDefaultMouseEventHandlers(":day",function(e){return t})}),[this.__renderDayLabel(e,t),this.showDayOfYearLabel&&!l?this.__renderDayOfYearLabel(e,t):"",l?this.__renderDayMonth(e,t):"",d?d(u):""])},__renderDayLabel:function(e,t){var a,r,n=this.isOutside(t),s=!0===t.current?this.color:void 0,i=this.$scopedSlots["day-label"],o=new Map,d=this.useDefaultTheme;!0===this.enableTheme&&(!0===n?(a="colorDayLabelOutside",r="backgroundDayLabelOutside"):!0===t.past?(a="colorDayLabelPast",r="backgroundDayLabelPast"):!0===t.current?(a="colorDayLabelCurrent",r="backgroundDayLabelCurrent"):!0===t.future&&(a="colorDayLabelFuture",r="backgroundDayLabelFuture"),o=this.getThemeColors([a,r]),d=this.setBothColors);var u=this.dayFormatter(t,!1);return e(quasar.QBtn,d(void 0!==s?s:o.get(a),o.get(r),{staticClass:"q-calendar-weekly__day-label",props:{unelevated:!0,round:!0,dense:!0,noCaps:!0,outline:!0===t.current,disable:t.disabled},on:this.getMouseEventHandlers({"click:date":{event:"click",stop:!0},"contextmenu:date":{event:"contextmenu",stop:!0,prevent:!0,result:!1}},function(e){return t})}),i?i(Object.assign({},{dayLabel:u},t)):u)},__renderDayOfYearLabel:function(e,t){var a=!0===t.current?this.color:void 0,r=this.$scopedSlots["day-of-year"];return e("div",this.setTextColor(a,{staticClass:"q-calendar-weekly__day-month--day-of-year"}),r?r(t):t.doy)},__renderDayMonth:function(e,t){var a=!0===t.current?this.color:void 0,r=this.$scopedSlots["month-label"],n=this.monthFormatter(t,this.shortMonthLabel);return e("div",this.setTextColor(a,{staticClass:"q-calendar-weekly__day-month"}),r?r(Object.assign({},{monthLabel:n},t)):n)}},render:function(e){return e("div",{staticClass:this.staticClass,nativeOn:{dragstart:function(e){e.preventDefault()}}},[!this.hideHeader&&this.__renderHead(e)].concat(this.__renderWeeks(e)))}},QCalendarMonthly={name:"QCalendarMonthly",mixins:[QCalendarWeekly],computed:{staticClass:function(){return"q-calendar-weekly"},parsedStart:function(){return getStartOfMonth(parseTimestamp(this.start))},parsedEnd:function(){return getEndOfMonth(parseTimestamp(this.end))}}},Resize={name:"resize",inserted:function(e,t){var a=t.value,r=t.options||{passive:!0};window.addEventListener("resize",a,r),e._onResize={callback:a,options:r},t.modifiers&&t.modifiers.quiet||a()},unbind:function(e){if(e._onResize){var t=e._onResize,a=t.callback,r=t.options;window.removeEventListener("resize",a,r),delete e._onResize}}},CalendarIntervals={name:"CalendarWithIntervals",mixins:[CalendarBase],props:Object.assign({},props.intervals),computed:{parsedIntervalStart:function(){return parseInt(this.intervalStart,10)},parsedIntervalMinutes:function(){return parseInt(this.intervalMinutes,10)},parsedIntervalCount:function(){return parseInt(this.intervalCount,10)},parsedIntervalHeight:function(){return parseFloat(this.intervalHeight)},startMinute:function(){return this.parsedIntervalStart*this.parsedIntervalMinutes},bodyHeight:function(){return this.parsedIntervalCount*this.parsedIntervalHeight},days:function(){return createDayList(this.parsedStart,this.parsedEnd,this.times.today,this.weekdaySkips,this.disabledDays,this.maxDays)},intervals:function(){var e=this.days,t=this.parsedIntervalStart,a=this.parsedIntervalMinutes,r=this.parsedIntervalCount,n=this.times.now;return 0===e.length&&console.error("QCalendar: days array has no content"),e.map(function(e){return createIntervalList(e,t,a,r,n)})},intervalFormatter:function(){var e={timeZone:"UTC",hour12:!this.hour24Format,hour:"2-digit",minute:"2-digit"},t={timeZone:"UTC",hour12:!this.hour24Format,hour:"numeric",minute:"2-digit"},a={timeZone:"UTC",hour12:!this.hour24Format,hour:"numeric"};return createNativeLocaleFormatter(this.locale,function(r,n){return n?0===r.minute?a:t:e})}},methods:{showIntervalLabelDefault:function(e){var t=this.intervals[0][0];return!(t.hour===e.hour&&t.minute===e.minute)&&0===e.minute},intervalStyleDefault:function(e){},getTimestampAtEvent:function(e,t){var a=copyTimestamp(t),r=e.currentTarget.getBoundingClientRect(),n=this.startMinute,s=e,i=e,o=s.changedTouches||s.touches,d=((o&&o[0]?o[0].clientY:i.clientY)-r.top)/this.parsedIntervalHeight;return updateMinutes(a,n+Math.floor(d*this.parsedIntervalMinutes),this.times.now)},getScopeForSlot:function(e,t){var a=copyTimestamp(e);return a.timeStartPos=this.timeStartPos,a.timeDurationHeight=this.timeDurationHeight,void 0!==t&&(a.index=t),a},scrollToTime:function(e){var t=this.timeStartPos(e),a=this.$refs.scrollArea;return!(!1===t||!a)&&(a.scrollTop=t,!0)},timeDurationHeight:function(e){return e/this.parsedIntervalMinutes*this.parsedIntervalHeight},timeStartPos:function(e,t){void 0===t&&(t=!0);var a=parseTime(e);if(!1===a)return!1;var r=(a-this.startMinute)/(this.parsedIntervalCount*this.parsedIntervalMinutes)*this.bodyHeight;return t&&(r<0&&(r=0),r>this.bodyHeight&&(r=this.bodyHeight)),r}}},QCalendarDaily={name:"QCalendarDaily",mixins:[CalendarIntervals],directives:{Resize:Resize},data:function(){return{scrollWidth:0}},computed:{classes:function(){return{"q-calendar-daily":!0}}},mounted:function(){this.init()},watch:{noScroll:function(e){!0===e?this.scrollWidth=0:this.$nextTick(this.onResize)}},methods:{init:function(){this.$nextTick(this.onResize)},onResize:function(){this.scrollWidth=this.getScrollWidth()},getScrollWidth:function(){var e=this.$refs.scrollArea,t=this.$refs.pane;return e&&t?e.offsetWidth-t.offsetWidth:0},__renderHead:function(e){return e("div",{staticClass:"q-calendar-daily__head",style:{marginRight:this.scrollWidth+"px"}},[this.__renderHeadIntervals(e)].concat(this.__renderHeadDays(e)))},__renderHeadIntervals:function(e){var t,a,r=this.$scopedSlots["intervals-header"],n=new Map,s=this.useDefaultTheme;return!0===this.enableTheme&&(t="colorIntervalHeader",a="backgroundIntervalHeader",n=this.getThemeColors([t,a]),s=this.setBothColors),e("div",s(n.get(t),n.get(a),{staticClass:"q-calendar-daily__intervals-head q-calendar-daily__intervals-head--text"}),[r&&r(this.days)])},__renderHeadDays:function(e){var t=this;return 1===this.days.length&&void 0!==this.columnCount&&parseInt(this.columnCount,10)>0?Array.apply(null,new Array(parseInt(this.columnCount,10))).map(function(e,a){return a+parseInt(t.columnIndexStart,10)}).map(function(a){return t.__renderHeadDay(e,t.days[0],a)}):this.days.map(function(a){return t.__renderHeadDay(e,a)})},__renderHeadDay:function(e,t,a){var r,n,s,i=this,o=this.$scopedSlots["day-header"],d=this.getScopeForSlot(t,a),u=100/this.days.length,l=new Map,c=this.useDefaultTheme;return!0===this.enableTheme&&(!0===t.past?(n="colorHeaderPast",s="backgroundHeaderPast"):!0===t.current?(n="colorHeaderCurrent",s="backgroundHeaderCurrent"):!0===t.future&&(n="colorHeaderFuture",s="backgroundHeaderFuture"),l=this.getThemeColors([n,s]),c=this.setBothColors),e("div",c(l.get(n),l.get(s),{key:t.date+(void 0!==a?"-"+a:""),staticClass:"q-calendar-daily__head-day",class:Object.assign({},this.getRelativeClasses(t),{"q-calendar-daily__head-day--droppable":r}),style:{maxWidth:u+"%"},domProps:{ondragover:function(e){void 0!==i.dragOverFunc&&(r=i.dragOverFunc(e,t,"day",a))},ondrop:function(e){void 0!==i.dropFunc&&i.dropFunc(e,t,"day",a)}},on:this.getDefaultMouseEventHandlers(":day",function(e){return d})}),[!0===this.columnHeaderBefore&&this.__renderColumnHeaderBefore(e,t,a),!0!==this.noDefaultHeaderText&&this.__renderHeadWeekday(e,t),!0!==this.noDefaultHeaderBtn&&this.__renderHeadDayBtn(e,t),o&&o(d),!0===this.columnHeaderAfter&&this.__renderColumnHeaderAfter(e,t,a)])},__renderHeadWeekday:function(e,t){var a,r,n=!0===t.current?this.color:void 0,s=new Map,i=this.useDefaultTheme;return!0===this.enableTheme&&(!0===t.past?(a="colorDayLabelPast",r="backgroundDayLabelPast"):!0===t.current?(a="colorDayLabelCurrent",r="backgroundDayLabelCurrent"):!0===t.future&&(a="colorDayLabelFuture",r="backgroundDayLabelFuture"),s=this.getThemeColors([a,r]),i=this.setBothColors),e("div",i(void 0!==n?n:s.get(a),s.get(r),{staticClass:"ellipsis q-calendar-daily__head-weekday"}),[this.__renderHeadDayLabel(e,t,this.shortWeekdayLabel)])},__renderHeadDayLabel:function(e,t,a){return e("span",{staticClass:"ellipsis"},this.weekdayFormatter(t,a))},__renderHeadDayBtn:function(e,t){var a,r,n=!0===t.current?this.color:void 0,s=new Map,i=this.useDefaultTheme;return!0===this.enableTheme&&(!0===t.past?(a="colorDayLabelPast",r="backgroundDayLabelPast"):!0===t.current?(a="colorDayLabelCurrent",r="backgroundDayLabelCurrent"):!0===t.future&&(a="colorDayLabelFuture",r="backgroundDayLabelFuture"),s=this.getThemeColors([a,r]),i=this.setBothColors),e(quasar.QBtn,i(void 0!==n?n:s.get(a),s.get(r),{staticClass:"q-calendar-daily__head-day-label",style:{color:!0===t.current?n:void 0},props:{unelevated:!0,round:!0,dense:!0,noCaps:!0,outline:!0===t.current,disable:t.disabled},on:this.getMouseEventHandlers({"click:date":{event:"click",stop:!0},"contextmenu:date":{event:"contextmenu",stop:!0,prevent:!0,result:!1}},function(e){return t})}),this.dayFormatter(t,!1))},__renderColumnHeaderBefore:function(e,t,a){var r=this.$scopedSlots["column-header-before"],n=Object.assign({},t);return n.index=a,e("div",{staticClass:"q-calendar-daily__column-header--before"},[r&&r(n)])},__renderColumnHeaderAfter:function(e,t,a){var r=this.$scopedSlots["column-header-after"],n=Object.assign({},t);return n.index=a,e("div",{staticClass:"q-calendar-daily__column-header--after"},[r&&r(n)])},__renderBody:function(e){return e("div",{staticClass:"q-calendar-daily__body"},[this.__renderScrollArea(e)])},__renderScrollArea:function(e){return void 0!==this.noScroll&&!0===this.noScroll?this.__renderPane(e):e("div",{ref:"scrollArea",staticClass:"q-calendar-daily__scroll-area"},[this.__renderPane(e)])},__renderPane:function(e){return e("div",{ref:"pane",staticClass:"q-calendar-daily__pane",style:{height:convertToUnit(this.bodyHeight)}},[this.__renderDayContainer(e)])},__renderDayContainer:function(e){var t=this.$scopedSlots["day-container"];return e("div",{staticClass:"q-calendar-daily__day-container"},[this.__renderBodyIntervals(e)].concat(this.__renderDays(e),[t&&t(this.days)]))},__renderDays:function(e){var t=this;return 1===this.days.length&&this.columnCount&&parseInt(this.columnCount,10)>0?Array.apply(null,new Array(parseInt(this.columnCount,10))).map(function(e,a){return a+parseInt(t.columnIndexStart,10)}).map(function(a){return t.__renderDay(e,t.days[0],0,a)}):this.days.map(function(a,r){return t.__renderDay(e,a,r)})},__renderDay:function(e,t,a,r){var n,s,i=this,o=this.$scopedSlots["day-body"],d=this.getScopeForSlot(t,r),u=100/this.days.length,l=new Map,c=this.useDefaultTheme;return!0===this.enableTheme&&(!0===t.past?(n="colorBodyPast",s="backgroundBodyPast"):!0===t.current?(n="colorBodyCurrent",s="backgroundBodyCurrent"):!0===t.future&&(n="colorBodyFuture",s="backgroundBodyFuture"),l=this.getThemeColors([n,s]),c=this.setBothColors),e("div",c(l.get(n),l.get(s),{key:t.date+(void 0!==r?":"+r:""),staticClass:"q-calendar-daily__day",class:this.getRelativeClasses(t),style:{maxWidth:u+"%"},on:this.getDefaultMouseEventHandlers(":time",function(e){return i.getScopeForSlot(i.getTimestampAtEvent(e,t),r)})}),this.__renderDayIntervals(e,a,r).concat([o&&o(d)]))},__renderDayIntervals:function(e,t,a){var r=this;return this.intervals[t].map(function(t){return r.__renderDayInterval(e,t,a)})},__renderDayInterval:function(e,t,a){var r,n=this,s=convertToUnit(this.intervalHeight),i=this.intervalStyle||this.intervalStyleDefault,o=this.$scopedSlots.interval,d=this.getScopeForSlot(t,a);return e("div",{key:t.time,staticClass:"q-calendar-daily__day-interval",class:{"q-calendar-daily__day-interval--droppable":r},style:Object.assign({},{height:s},i(t)),domProps:{ondragover:function(e){void 0!==n.dragOverFunc&&(r=n.dragOverFunc(e,t,"interval"))},ondrop:function(e){void 0!==n.dropFunc&&n.dropFunc(e,t,"interval")}}},o?o(d):void 0)},__renderBodyIntervals:function(e){var t,a,r=this,n=new Map,s=this.useDefaultTheme;!0===this.enableTheme&&(t="colorIntervalBody",a="backgroundIntervalBody",n=this.getThemeColors([t,a]),s=this.setBothColors);var i={staticClass:"q-calendar-daily__intervals-body",on:this.getDefaultMouseEventHandlers(":interval",function(e){return r.getTimestampAtEvent(e,r.parsedStart)})};return e("div",s(n.get(t),n.get(a),i),this.__renderIntervalLabels(e))},__renderIntervalLabels:function(e){var t=this;return this.intervals[0].map(function(a){return t.__renderIntervalLabel(e,a)})},__renderIntervalLabel:function(e,t){var a,r,n=convertToUnit(this.intervalHeight),s=this.shortIntervalLabel,i=(this.showIntervalLabel||this.showIntervalLabelDefault)(t)?this.intervalFormatter(t,s):void 0,o=new Map,d=this.useDefaultTheme;return!0===this.enableTheme&&(a="colorIntervalText",r="backgroundIntervalText",o=this.getThemeColors([a,r]),d=this.setBothColors),e("div",{key:t.time,staticClass:"q-calendar-daily__interval",style:{height:n}},[e("div",d(o.get(a),o.get(r),{staticClass:"q-calendar-daily__interval-text"}),i)])}},render:function(e){return e("div",{class:this.classes,directives:[{modifiers:{quiet:!0},name:"resize",value:this.onResize}]},[!this.hideHeader&&this.__renderHead(e),this.__renderBody(e)])}},CalendarScheduler={name:"CalendarWithScheduler",mixins:[CalendarBase],props:Object.assign({},props.scheduler),computed:{parsedResourceHeight:function(){return parseFloat(this.resourceHeight)},parsedResourceWidth:function(){return parseFloat(this.resourceWidth)},bodyHeight:function(){return this.resources&&this.resources.length>0?this.resources.length*this.parsedResourceHeight:0},days:function(){return createDayList(this.parsedStart,this.parsedEnd,this.times.today,this.weekdaySkips,this.disabledDays,this.maxDays)}},methods:{resourceStyleDefault:function(e){},getTimestampAtEvent:function(e,t){return updateRelative(copyTimestamp(t),this.times.now,!1)},getScopeForSlot:function(e,t,a){var r={};return r.day=copyTimestamp(e),void 0!==t&&(r.index=t),void 0!==a&&(r.resource=a),r}}},QCalendarScheduler={name:"QCalendarScheduler",mixins:[CalendarScheduler],directives:{Resize:Resize},data:function(){return{scrollWidth:0}},computed:{classes:function(){return{"q-calendar-scheduler":!0}}},mounted:function(){this.init()},watch:{noScroll:function(e){!0===e?this.scrollWidth=0:this.$nextTick(this.onResize)}},methods:{init:function(){this.$nextTick(this.onResize)},onResize:function(){this.scrollWidth=this.getScrollWidth()},getScrollWidth:function(){var e=this.$refs.scrollArea,t=this.$refs.pane;return e&&t?e.offsetWidth-t.offsetWidth:0},resourceStartPos:function(e,t){void 0===t&&(t=!0);var a=this.resource.indexOf(e)*this.parsedResourceHeight;return t&&(a<0&&(a=0),a>this.bodyHeight&&(a=this.bodyHeight)),a},__renderHead:function(e){return e("div",{staticClass:"q-calendar-scheduler__head",style:{marginRight:this.scrollWidth+"px"}},[this.__renderHeadResources(e)].concat(this.__renderHeadDays(e)))},__renderHeadResources:function(e){var t,a,r=this.$scopedSlots["scheduler-resources-header"],n=convertToUnit(this.resourceWidth),s=new Map,i=this.useDefaultTheme;return!0===this.enableTheme&&(t="colorSchedulerHeader",a="backgroundSchedulerHeader",s=this.getThemeColors([t,a]),i=this.setBothColors),e("div",i(s.get(t),s.get(a),{staticClass:"q-calendar-scheduler__resources-head q-calendar-scheduler__resources-head--text",style:{width:n}}),[r&&r(this.days)])},__renderHeadDays:function(e){var t=this;return 1===this.days.length&&this.columnCount&&parseInt(this.columnCount,10)>0?Array.apply(null,new Array(parseInt(this.columnCount,10))).map(function(e,a){return a+parseInt(t.columnIndexStart,10)}).map(function(a){return t.__renderHeadDay(e,t.days[0],a)}):this.days.map(function(a){return t.__renderHeadDay(e,a)})},__renderHeadDay:function(e,t,a){var r,n,s,i=this,o=this.$scopedSlots["scheduler-day-header"],d=this.getScopeForSlot(t,a),u=100/this.days.length,l=new Map,c=this.useDefaultTheme;return!0===this.enableTheme&&(!0===t.past?(n="colorHeaderPast",s="backgroundHeaderPast"):!0===t.current?(n="colorHeaderCurrent",s="backgroundHeaderCurrent"):!0===t.future&&(n="colorHeaderFuture",s="backgroundHeaderFuture"),l=this.getThemeColors([n,s]),c=this.setBothColors),e("div",c(l.get(n),l.get(s),{key:t.date+(void 0!==a?"-"+a:""),staticClass:"q-calendar-scheduler__head-day",class:Object.assign({},this.getRelativeClasses(t),{"q-calendar-scheduler__head-day--droppable":r}),style:{maxWidth:u+"%"},domProps:{ondragover:function(e){void 0!==i.dragOverFunc&&(r=i.dragOverFunc(e,t,"day",a))},ondrop:function(e){void 0!==i.dropFunc&&i.dropFunc(e,t,"day",a)}},on:this.getDefaultMouseEventHandlers(":day",function(e){return d})}),[!0===this.columnHeaderBefore&&this.__renderColumnHeaderBefore(e,t,a),!0!==this.noDefaultHeaderText&&this.__renderHeadWeekday(e,t,a),!0!==this.noDefaultHeaderBtn&&this.__renderHeadDayBtn(e,t,a),o&&o(d),!0===this.columnHeaderAfter&&this.__renderColumnHeaderAfter(e,t,a)])},__renderHeadWeekday:function(e,t){var a,r,n=!0===t.current?this.color:void 0,s=new Map,i=this.useDefaultTheme;return!0===this.enableTheme&&(!0===t.past?(a="colorDayLabelPast",r="backgroundDayLabelPast"):!0===t.current?(a="colorDayLabelCurrent",r="backgroundDayLabelCurrent"):!0===t.future&&(a="colorDayLabelFuture",r="backgroundDayLabelFuture"),s=this.getThemeColors([a,r]),i=this.setBothColors),e("div",i(void 0!==n?n:s.get(a),s.get(r),{staticClass:"ellipsis q-calendar-scheduler__head-weekday"}),[this.__renderHeadDayLabel(e,t,this.shortWeekdayLabel)])},__renderHeadDayLabel:function(e,t,a){return e("span",{staticClass:"ellipsis"},this.weekdayFormatter(t,a))},__renderHeadDayBtn:function(e,t,a){var r,n,s=!0===t.current?this.color:void 0,i={day:t,idx:a},o=new Map,d=this.useDefaultTheme;return!0===this.enableTheme&&(!0===t.past?(r="colorDayLabelPast",n="backgroundDayLabelPast"):!0===t.current?(r="colorDayLabelCurrent",n="backgroundDayLabelCurrent"):!0===t.future&&(r="colorDayLabelFuture",n="backgroundDayLabelFuture"),o=this.getThemeColors([r,n]),d=this.setBothColors),e(quasar.QBtn,d(void 0!==s?s:o.get(r),o.get(n),{staticClass:"q-calendar-scheduler__head-day-label",style:{color:!0===t.current?s:void 0},props:{unelevated:!0,round:!0,dense:!0,noCaps:!0,outline:!0===t.current,disable:t.disabled},on:this.getMouseEventHandlers({"click:date":{event:"click",stop:!0},"contextmenu:date":{event:"contextmenu",stop:!0,prevent:!0,result:!1}},function(e){return i})}),this.dayFormatter(t,!1))},__renderColumnHeaderBefore:function(e,t,a){var r=this.$scopedSlots["scheduler-column-header-before"],n=Object.assign({},t);return n.index=a,e("div",{staticClass:"q-calendar-scheduler__column-header--before"},[r&&r(n)])},__renderColumnHeaderAfter:function(e,t,a){var r=this.$scopedSlots["scheduler-column-header-after"],n=Object.assign({},t);return n.index=a,e("div",{staticClass:"q-calendar-scheduler__column-header--after"},[r&&r(n)])},__renderBody:function(e){return e("div",{staticClass:"q-calendar-scheduler__body"},[this.__renderScrollArea(e)])},__renderScrollArea:function(e){return void 0!==this.noScroll&&!0===this.noScroll?this.__renderPane(e):e("div",{ref:"scrollArea",staticClass:"q-calendar-scheduler__scroll-area"},[this.__renderPane(e)])},__renderPane:function(e){return e("div",{ref:"pane",staticClass:"q-calendar-scheduler__pane",style:{height:convertToUnit(this.bodyHeight)}},[this.__renderDayContainer(e)])},__renderDayContainer:function(e){return e("div",{staticClass:"q-calendar-scheduler__day-container"},[this.__renderBodyResources(e)].concat(this.__renderDays(e)))},__renderDays:function(e){var t=this;return 1===this.days.length&&this.columnCount&&parseInt(this.columnCount,10)>0?Array.apply(null,new Array(parseInt(this.columnCount,10))).map(function(e,a){return a+parseInt(t.columnIndexStart,10)}).map(function(a){return t.__renderDay(e,t.days[0],0,a)}):this.days.map(function(a,r){return t.__renderDay(e,a,r)})},__renderDay:function(e,t,a){var r,n,s=100/this.days.length,i=new Map,o=this.useDefaultTheme;return!0===this.enableTheme&&(!0===t.past?(r="colorBodyPast",n="backgroundBodyPast"):!0===t.current?(r="colorBodyCurrent",n="backgroundBodyCurrent"):!0===t.future&&(r="colorBodyFuture",n="backgroundBodyFuture"),i=this.getThemeColors([r,n]),o=this.setBothColors),e("div",o(i.get(r),i.get(n),{key:t.date+(void 0!==a?":"+a:""),staticClass:"q-calendar-scheduler__day",class:this.getRelativeClasses(t),style:{maxWidth:s+"%"}}),[].concat(this.__renderDayResources(e,t,a)))},__renderDayResources:function(e,t,a){var r=this;return this.resources.map(function(n){return r.__renderDayResource(e,n,t,a)})},__renderDayResource:function(e,t,a,r){var n,s=this,i=convertToUnit(this.resourceHeight),o=this.resourceStyle||this.resourceStyleDefault,d=this.$scopedSlots["scheduler-resource-day"],u=this.getScopeForSlot(a,r,t),l={height:i};return l=Object.assign(l,o(u)),e("div",{key:t[this.resourceKey]+"-"+r,staticClass:"q-calendar-scheduler__day-resource",class:{"q-calendar-scheduler__day-resource--droppable":n},style:l,domProps:{ondragover:function(e){void 0!==s.dragOverFunc&&(n=s.dragOverFunc(e,t,"resource",r))},ondrop:function(e){void 0!==s.dropFunc&&s.dropFunc(e,t,"resource",r)}},on:this.getDefaultMouseEventHandlers(":resource:day",function(e){return s.getScopeForSlot(s.getTimestampAtEvent(e,a),r,t)})},d?d(u):void 0)},__renderBodyResources:function(e){var t,a,r=convertToUnit(this.resourceWidth),n=new Map,s=this.useDefaultTheme;!0===this.enableTheme&&(t="colorSchedulerBody",a="backgroundSchedulerBody",n=this.getThemeColors([t,a]),s=this.setBothColors);var i={staticClass:"q-calendar-scheduler__resources-body",style:{width:r}};return e("div",s(n.get(t),n.get(a),i),this.__renderResourceLabels(e))},__renderResourceLabels:function(e){var t=this;return this.resources.map(function(a,r){return t.__renderResourceLabel(e,a,r)})},__renderResourceLabel:function(e,t,a){var r,n,s=this.$scopedSlots["scheduler-resource"],i={resource:t,index:a},o=convertToUnit(this.resourceHeight),d=t.label,u=new Map,l=this.useDefaultTheme;return!0===this.enableTheme&&(r="colorSchedulerText",n="backgroundSchedulerText",u=this.getThemeColors([r,n]),l=this.setBothColors),e("div",{key:t.label,staticClass:"q-calendar-scheduler__resource",style:{height:o},on:this.getDefaultMouseEventHandlers(":resource",function(e){return i})},[s?s(i):e("div",l(u.get(r),u.get(n),{staticClass:"q-calendar-scheduler__resource-text"}),d)])},__renderResourcesError:function(e){return e("div",{},"No resources have been defined")}},render:function(e){return e("div",{class:this.classes,directives:[{modifiers:{quiet:!0},name:"resize",value:this.onResize}]},[!this.hideHeader&&void 0!==this.resources&&this.__renderHead(e),void 0!==this.resources&&this.__renderBody(e),void 0===this.resources&&this.__renderResourcesError(e)])}},QCalendarAgenda={name:"QCalendarAgenda",mixins:[QCalendarDaily],methods:{__renderHead:function(e){return e("div",{staticClass:"q-calendar-daily__head",style:{marginRight:this.scrollWidth+"px"}},[].concat(this.__renderHeadDays(e)))},__renderPane:function(e){return e("div",{ref:"pane",staticClass:"q-calendar-daily__pane",style:{}},[this.__renderDayContainer(e)])},__renderBodyIntervals:function(e){},__renderDayIntervals:function(e,t,a){return[]},__renderDay:function(e,t,a,r){var n,s,i,o=this,d=this.$scopedSlots["day-body"],u=Object.assign({},t),l=100/this.days.length,c=new Map,h=this.useDefaultTheme;return!0===this.enableTheme&&(!0===t.past?(s="colorBodyPast",i="backgroundBodyPast"):!0===t.current?(s="colorBodyCurrent",i="backgroundBodyCurrent"):!0===t.future&&(s="colorBodyFuture",i="backgroundBodyFuture"),c=this.getThemeColors([s,i]),h=this.setBothColors),e("div",h(c.get(s),c.get(i),{key:t.date+(void 0!==r?":"+r:""),staticClass:"q-calendar-daily__day",class:Object.assign({},this.getRelativeClasses(t),{"q-calendar-daily__day--droppable":n}),style:{maxWidth:l+"%"},domProps:{ondragover:function(e){void 0!==o.dragOverFunc&&(n=o.dragOverFunc(e,t,"day"))},ondrop:function(e){void 0!==o.dropFunc&&o.dropFunc(e,t,"day")}},on:this.getDefaultMouseEventHandlers(":time",function(e){return o.getScopeForSlot(o.getTimestampAtEvent(e,t),r)})}),this.__renderDayIntervals(e,a,r).concat([d&&d(u)]))}},render:function(e){return e("div",{class:this.classes,directives:[{modifiers:{quiet:!0},name:"resize",value:this.onResize}]},[!this.hideHeader&&this.__renderHead(e),this.__renderBody(e)])}},Component={name:"QCalendar",mixins:[CalendarBase],props:Object.assign({},props.calendar,props.weeks,props.intervals,props.scheduler),data:function(){return{lastStart:void 0,lastEnd:void 0}},computed:{parsedValue:function(){return parseTimestamp(this.value)||this.parsedStart||this.times.today},renderProps:function(){var e=this.parsedValue,t="div",a=this.maxDays,r=e,n=e;switch(this.view){case"month":t=QCalendarMonthly,r=getStartOfMonth(e),n=getEndOfMonth(e);break;case"week":case"week-agenda":case"week-scheduler":t=this.view.endsWith("-agenda")?QCalendarAgenda:this.view.endsWith("-scheduler")?QCalendarScheduler:QCalendarDaily,r=this.getStartOfWeek(e),n=this.getEndOfWeek(e),a=this.weekdays.length;break;case"day":case"day-scheduler":case"day-agenda":t=this.view.endsWith("-agenda")?QCalendarAgenda:this.view.endsWith("-scheduler")?QCalendarScheduler:QCalendarDaily,a=1,updateFormatted(n=relativeDays(copyTimestamp(n),nextDay,a,this.weekdays));break;case"2day":case"2day-scheduler":case"2day-agenda":t=this.view.endsWith("-agenda")?QCalendarAgenda:this.view.endsWith("-scheduler")?QCalendarScheduler:QCalendarDaily,a=2,updateFormatted(n=relativeDays(copyTimestamp(n),nextDay,a,this.weekdays));break;case"3day":case"3day-scheduler":case"3day-agenda":t=this.view.endsWith("-agenda")?QCalendarAgenda:this.view.endsWith("-scheduler")?QCalendarScheduler:QCalendarDaily,a=3,updateFormatted(n=relativeDays(copyTimestamp(n),nextDay,a,this.weekdays));break;case"4day":case"4day-scheduler":case"4day-agenda":t=this.view.endsWith("-agenda")?QCalendarAgenda:this.view.endsWith("-scheduler")?QCalendarScheduler:QCalendarDaily,a=4,updateFormatted(n=relativeDays(copyTimestamp(n),nextDay,a,this.weekdays));break;case"5day":case"5day-scheduler":case"5day-agenda":t=this.view.endsWith("-agenda")?QCalendarAgenda:this.view.endsWith("-scheduler")?QCalendarScheduler:QCalendarDaily,a=5,updateFormatted(n=relativeDays(copyTimestamp(n),nextDay,a,this.weekdays));break;case"6day":case"6day-scheduler":case"6day-agenda":t=this.view.endsWith("-agenda")?QCalendarAgenda:this.view.endsWith("-scheduler")?QCalendarScheduler:QCalendarDaily,a=6,updateFormatted(n=relativeDays(copyTimestamp(n),nextDay,a,this.weekdays));break;case"custom-interval":case"custom-scheduler":case"custom-agenda":t=this.view.endsWith("-agenda")?QCalendarAgenda:this.view.endsWith("-scheduler")?QCalendarScheduler:QCalendarDaily,updateFormatted(n=relativeDays(copyTimestamp(n),nextDay,this.maxDays,this.weekdays));break;case"scheduler":case"agenda":t="scheduler"===this.view?QCalendarScheduler:QCalendarAgenda,updateFormatted(n=relativeDays(copyTimestamp(n),nextDay,this.maxDays,this.weekdays));break;case"month-interval":case"month-scheduler":case"month-agenda":t=this.view.endsWith("-agenda")?QCalendarAgenda:this.view.endsWith("-scheduler")?QCalendarScheduler:QCalendarDaily,r=getStartOfMonth(e),updateFormatted(n=getEndOfMonth(e)),a=DAYS_IN_MONTH_MAX}return{component:t,start:r,end:n,maxDays:a}}},watch:{renderProps:"__checkChange"},methods:{__checkChange:function(e,t){var a=this.renderProps,r=a.start,n=a.end;this.keyValue=0,void 0!==this.lastStart&&void 0!==this.lastEnd&&r.date===this.lastStart&&n.date===this.lastEnd||(this.lastStart=r.date,this.lastEnd=n.date,this.$emit("change",{start:r,end:n})),this.keyValue=getDayIdentifier(r)},move:function(e){void 0===e&&(e=1);var t=copyTimestamp(this.parsedValue),a=e>0,r=a?nextDay:prevDay,n=a?DAYS_IN_MONTH_MAX:DAY_MIN,s=a?e:-e;this.direction=a?"next":"prev";this.maxDays;for(var i=this.weekdaySkips.filter(function(e){return 0!==e}).length;--s>=0;)switch(this.view){case"month":t.day=n,r(t);break;case"week":case"week-scheduler":case"week-agenda":relativeDays(t,r,i,this.weekdays);break;case"day":case"day-scheduler":case"day-agenda":relativeDays(t,r,1,this.weekdays);break;case"2day":case"2day-scheduler":case"2day-agenda":relativeDays(t,r,2,this.weekdays);break;case"3day":case"3day-scheduler":case"3day-agenda":relativeDays(t,r,3,this.weekdays);break;case"4day":case"4day-scheduler":case"4day-agenda":relativeDays(t,r,4,this.weekdays);break;case"5day":case"5day-scheduler":case"5day-agenda":relativeDays(t,r,5,this.weekdays);break;case"6day":case"6day-scheduler":case"6day-agenda":relativeDays(t,r,6,this.weekdays);break;case"custom-interval":case"custom-scheduler":case"custom-agenda":case"agenda":relativeDays(t,r,this.maxDays,this.weekdays);break;case"month-interval":case"month-agenda":case"month-scheduler":t.day=n,r(t)}updateWeekday(t),updateFormatted(t),updateDayOfYear(t),updateRelative(t,this.times.now),this.$emit("input",t.date),this.$emit("moved",t)},next:function(e){void 0===e&&(e=1),this.move(e)},prev:function(e){void 0===e&&(e=1),this.move(-e)},timeStartPos:function(e,t){void 0===t&&(t=!0);var a=this.$children[0];return!(!a||!a.timeStartPos)&&a.timeStartPos(e,t)},timeDurationHeight:function(e){var t=this.$children[0];return t&&t.timeDurationHeight?t.timeDurationHeight(e):-1},scrollToTime:function(e){var t=this.$children[0];return!(!t||!t.scrollToTime)&&t.scrollToTime(e)},__renderComponent:function(e,t,a){return e(t,a)}},render:function(e){var t=this,a=this.renderProps,r=a.start,n=a.end,s=a.maxDays,i=a.component,o={staticClass:"q-calendar",key:this.keyValue,props:Object.assign({},this.$props,{start:r.date,end:n.date,maxDays:s}),on:Object.assign({},this.$listeners,{"click:date":function(e){void 0!==t.$listeners.input&&(void 0!==e.date?t.$emit("input",e.date):void 0!==e.day&&void 0!==e.day.date&&t.$emit("input",e.day.date)),t.$listeners["click:date"]&&t.$emit("click:date",e)}}),scopedSlots:this.$scopedSlots};return!0===this.animated?e("transition",{props:{name:"q-transition--"+("prev"===this.direction?this.transitionPrev:this.transitionNext),appear:!0}},[this.__renderComponent(e,i,o)]):this.__renderComponent(e,i,o)}},Plugin={version:version,Component:Component,install:function(e){e.component(Component.name,Component)}};module.exports=Plugin;
"use strict";var quasar=require("quasar"),version="1.3.0",PARSE_REGEX=/^(\d{4})-(\d{1,2})(-(\d{1,2}))?([^\d]+(\d{1,2}))?(:(\d{1,2}))?(:(\d{1,2}))?$/,PARSE_TIME=/(\d\d?)(:(\d\d?)|)(:(\d\d?)|)/,DAYS_IN_MONTH=[0,31,28,31,30,31,30,31,31,30,31,30,31],DAYS_IN_MONTH_LEAP=[0,31,29,31,30,31,30,31,31,30,31,30,31],DAYS_IN_MONTH_MIN=28,DAYS_IN_MONTH_MAX=31,MONTH_MAX=12,MONTH_MIN=1,DAY_MIN=1,DAYS_IN_WEEK=7,MINUTES_IN_HOUR=60;function getStartOfWeek(e,t,a){if(1===e.day)for(;!t.includes(e.weekday);)nextDay(e);var r=copyTimestamp(e);return findWeekday(r,t[0],prevDay,t.length),updateFormatted(r),a&&updateRelative(r,a,r.hasTime),r}function getEndOfWeek(e,t,a){if(daysInMonth(e.year,e.month)===e.day)for(;!t.includes(e.weekday);)prevDay(e);var r=copyTimestamp(e);return findWeekday(r,t[t.length-1],nextDay,t.length),updateFormatted(r),a&&updateRelative(r,a,r.hasTime),r}function getStartOfMonth(e){var t=copyTimestamp(e);return t.day=DAY_MIN,updateFormatted(t),t}function getEndOfMonth(e){var t=copyTimestamp(e);return t.day=daysInMonth(t.year,t.month),updateFormatted(t),t}function parseTime(e){if("number"==typeof e)return e;if("string"==typeof e){var t=PARSE_TIME.exec(e);return!!t&&60*parseInt(t[1],10)+parseInt(t[3]||0,10)}return"object"==typeof e&&("number"==typeof e.hour&&"number"==typeof e.minute&&60*e.hour+e.minute)}function validateTimestamp(e){return!!PARSE_REGEX.exec(e)}function parsed(e){var t=PARSE_REGEX.exec(e);return t?{date:e,time:"",year:parseInt(t[1],10),month:parseInt(t[2],10),day:parseInt(t[4],10)||1,hour:parseInt(t[6],10)||0,minute:parseInt(t[8],10)||0,weekday:0,doy:0,workweek:0,hasDay:!!t[4],hasTime:!(!t[6]||!t[8]),past:!1,current:!1,future:!1,disabled:!1}:null}function parseTimestamp(e,t){var a=parsed(e);return null===a?null:(updateFormatted(a),t&&updateRelative(a,t,a.hasTime),a)}function parseDate(e){return updateFormatted({date:"",time:"",year:e.getFullYear(),month:e.getMonth()+1,day:e.getDate(),weekday:e.getDay(),hour:e.getHours(),minute:e.getMinutes(),doy:0,workweek:0,hasDay:!0,hasTime:!0,past:!1,current:!0,future:!1,disabled:!1})}function getDayIdentifier(e){return 1e4*e.year+100*e.month+e.day}function getTimeIdentifier(e){return 100*e.hour+e.minute}function updateRelative(e,t,a){void 0===a&&(a=!1);var r=getDayIdentifier(t),n=getDayIdentifier(e),s=r===n;return e.hasTime&&a&&s&&(s=(r=getTimeIdentifier(t))===(n=getTimeIdentifier(e))),e.past=n<r,e.current=s,e.future=n>r,e}function updateMinutes(e,t,a){return e.hasTime=!0,e.hour=Math.floor(t/MINUTES_IN_HOUR),e.minute=t%MINUTES_IN_HOUR,e.time=getTime(e),a&&updateRelative(e,a,!0),e}function updateWeekday(e){return e.weekday=getWeekday(e),e}function updateDayOfYear(e){return e.doy=getDayOfYear(e),e}function updateDisabled(e,t){if(Array.isArray(t)&&0!==t.length){var a=getDayIdentifier(e);for(var r in t){if(getDayIdentifier(parseTimestamp(t[r]+" 00:00"))===a){e.disabled=!0;break}}}}function updateFormatted(e){return e.time=getTime(e),e.date=getDate(e),e.weekday=getWeekday(e),e.doy=getDayOfYear(e),e.workweek=getWorkWeek(e),e}function getDayOfYear(e){if(0!==e.year){var t=new Date(Date.UTC(e.year,e.month-1,e.day,0,0));return quasar.date.getDayOfYear(t)}}function getWorkWeek(e){if(0!==e.year){var t=new Date(Date.UTC(e.year,e.month-1,e.day,0,0));return quasar.date.getWeekOfYear(t)}}function getWeekday(e){if(e.hasDay){var t=Math.floor,a=e.day,r=(e.month+9)%MONTH_MAX+1,n=t(e.year/100),s=e.year%100-(e.month<=2?1:0);return((a+t(2.6*r-.2)-2*n+s+t(s/4)+t(n/4))%7+7)%7}return e.weekday}function isLeapYear(e){return e%4==0&&e%100!=0||e%400==0}function daysInMonth(e,t){return isLeapYear(e)?DAYS_IN_MONTH_LEAP[t]:DAYS_IN_MONTH[t]}function copyTimestamp(e){return Object.assign({},e)}function padNumber(e,t){for(var a=String(e);a.length<t;)a="0"+a;return a}function getDate(e){var t=padNumber(e.year,4)+"-"+padNumber(e.month,2);return e.hasDay&&(t+="-"+padNumber(e.day,2)),t}function getTime(e){return e.hasTime?padNumber(e.hour,2)+":"+padNumber(e.minute,2):""}function nextDay(e){return++e.day,e.weekday=(e.weekday+1)%DAYS_IN_WEEK,e.day>DAYS_IN_MONTH_MIN&&e.day>daysInMonth(e.year,e.month)&&(e.day=DAY_MIN,++e.month,e.month>MONTH_MAX&&(e.month=MONTH_MIN,++e.year)),e}function prevDay(e){return e.day--,e.weekday=(e.weekday+6)%DAYS_IN_WEEK,e.day<DAY_MIN&&(e.month--,e.month<MONTH_MIN&&(e.year--,e.month=MONTH_MAX),e.day=daysInMonth(e.year,e.month)),e}function relativeDays(e,t,a,r){for(void 0===t&&(t=nextDay),void 0===a&&(a=1),void 0===r&&(r=[0,1,2,3,4,5,6]);--a>=0;)t(e),r.length<7&&!r.includes(e.weekday)&&++a;return e}function findWeekday(e,t,a,r){for(void 0===a&&(a=nextDay),void 0===r&&(r=6);e.weekday!==t&&--r>=0;)a(e);return e}function getWeekdaySkips(e){for(var t=[1,1,1,1,1,1,1],a=[0,0,0,0,0,0,0],r=0;r<e.length;++r)a[e[r]]=1;for(var n=0;n<DAYS_IN_WEEK;++n){for(var s=1,i=1;i<DAYS_IN_WEEK;++i){if(a[(n+i)%DAYS_IN_WEEK])break;++s}t[n]=a[n]*s}return t}function createDayList(e,t,a,r,n,s,i){void 0===n&&(n=[]),void 0===s&&(s=42),void 0===i&&(i=0);var o=getDayIdentifier(t),d=[],u=copyTimestamp(e),l=0,c=l===o;if(o<getDayIdentifier(e))return d;for(;(!c||d.length<i)&&d.length<s&&(l=getDayIdentifier(u),!(c=c||l>o));)if(0!==r[u.weekday]){var h=copyTimestamp(u);updateFormatted(h),updateRelative(h,a),updateDisabled(h,n),d.push(h),u=relativeDays(u,nextDay)}else u=nextDay(u);return d}function createIntervalList(e,t,a,r,n){for(var s=[],i=0;i<r;++i){var o=(t+i)*a,d=copyTimestamp(e);s.push(updateMinutes(d,o,n))}return s}function createNativeLocaleFormatter(e,t){return"undefined"==typeof Intl||void 0===Intl.DateTimeFormat?function(e,t){return""}:function(a,r){try{return new Intl.DateTimeFormat(e||void 0,t(a,r)).format(new Date(Date.UTC(a.year,a.month-1,a.day,a.hour,a.minute)))}catch(e){return""}}}function validateNumber(e){return isFinite(parseInt(e,10))}var Times={name:"Times",props:{now:{type:String,validator:function(e){return""===e||validateTimestamp(e)}}},data:function(){return{times:{now:parseTimestamp("0000-00-00 00:00"),today:parseTimestamp("0000-00-00")}}},computed:{parsedNow:function(){return this.now?parseTimestamp(this.now):null}},watch:{parsedNow:"updateCurrent"},created:function(){this.updateCurrent(),this.setCurrent()},methods:{setCurrent:function(){this.times.now.current=this.times.today.current=!0,this.times.now.past=this.times.today.past=!1,this.times.now.future=this.times.today.future=!1},updateCurrent:function(){var e=this.parsedNow||this.getNow();this.updateDay(e,this.times.now),this.updateTime(e,this.times.now),this.updateDay(e,this.times.today)},getNow:function(){return parseDate(new Date)},updateDay:function(e,t){e.date!==t.date&&(t.year=e.year,t.month=e.month,t.day=e.day,t.weekday=e.weekday,t.date=e.date)},updateTime:function(e,t){e.time!==t.time&&(t.hour=e.hour,t.minute=e.minute,t.time=e.time)}}},Mouse={name:"Mouse",methods:{getDefaultMouseEventHandlers:function(e,t){var a;return this.getMouseEventHandlers(((a={})["click"+e]={event:"click"},a["contextmenu"+e]={event:"contextmenu",prevent:!0,result:!1},a["mousedown"+e]={event:"mousedown"},a["mousemove"+e]={event:"mousemove"},a["mouseup"+e]={event:"mouseup"},a["mouseenter"+e]={event:"mouseenter"},a["mouseleave"+e]={event:"mouseleave"},a["touchstart"+e]={event:"touchstart"},a["touchmove"+e]={event:"touchmove"},a["touchend"+e]={event:"touchend"},a),t)},getMouseEventHandlers:function(e,t){var a=this,r={},n=function(n){var s=e[n];if(a.$listeners[n]){var i=(s.passive?"&":(s.once?"~":"")+(s.capture?"!":""))+s.event,o=function(e){var r=e;return(void 0===s.button||r.buttons>0&&r.button===s.button)&&(s.prevent&&e.preventDefault(),s.stop&&e.stopPropagation(),a.$emit(n,t(e))),s.result};i in r?Array.isArray(r[i])?r[i].push(o):r[i]=[r[i],o]:r[i]=o}};for(var s in e)n(s);return r}}},version$1="1.0.5",CSS_COLOR_NAMES=["transparent","aliceblue","antiquewhite","aqua","aquamarine","azure","beige","bisque","black","blanchedalmond","blue","blueviolet","brown","burlywood","cadetblue","chartreuse","chocolate","coral","cornflowerblue","cornsilk","crimson","cyan","darkblue","darkcyan","darkgoldenrod","darkgray","darkgrey","darkgreen","darkkhaki","darkmagenta","darkolivegreen","darkorange","darkorchid","darkred","darksalmon","darkseagreen","darkslateblue","darkslategray","darkslategrey","darkturquoise","darkviolet","deeppink","deepskyblue","dimgray","dimgrey","dodgerblue","firebrick","floralwhite","forestgreen","fuchsia","gainsboro","ghostwhite","gold","goldenrod","gray","grey","green","greenyellow","honeydew","hotpink","indianred","indigo","ivory","khaki","lavender","lavenderblush","lawngreen","lemonchiffon","lightblue","lightcoral","lightcyan","lightgoldenrodyellow","lightgray","lightgrey","lightgreen","lightpink","lightsalmon","lightseagreen","lightskyblue","lightslategray","lightslategrey","lightsteelblue","lightyellow","lime","limegreen","linen","magenta","maroon","mediumaquamarine","mediumblue","mediumorchid","mediumpurple","mediumseagreen","mediumslateblue","mediumspringgreen","mediumturquoise","mediumvioletred","midnightblue","mintcream","mistyrose","moccasin","navajowhite","navy","oldlace","olive","olivedrab","orange","orangered","orchid","palegoldenrod","palegreen","paleturquoise","palevioletred","papayawhip","peachpuff","peru","pink","plum","powderblue","purple","red","rosybrown","royalblue","saddlebrown","salmon","sandybrown","seagreen","seashell","sienna","silver","skyblue","slateblue","slategray","slategrey","snow","springgreen","steelblue","tan","teal","thistle","tomato","turquoise","violet","wheat","white","whitesmoke","yellow","yellowgreen"],QColorizeMixin={name:"QColorizeMixin",props:{color:String},methods:{isNamedCssColor:function(e){return!!e&&CSS_COLOR_NAMES.includes(e.toLowerCase())},isCssColor:function(e){return!!e&&(!!e.match(/^(#|(rgb|hsl)a?\()/)||this.isNamedCssColor(e))},isCssVar:function(e){return!!e&&e.startsWith("--")},calculateColor:function(e,t){return void 0===t&&(t="black"),void 0===e&&void 0!==t?this.calculateColor(t):this.isCssColor(e)?e:this.makeQuasarColorVar(e,t)},makeQuasarColorVar:function(e,t){return"var("+(this.isCssVar(e)?e:"--q-color-"+e)+", '"+t+"')"},isValidCssColor:function(e){return this.isCssColor(e)||this.isCssVar(e)},setBothColors:function(e,t,a){return void 0===a&&(a={}),this.setTextColor(e,this.setBackgroundColor(t,a))},setBackgroundColor:function(e,t){var a;if(void 0===t&&(t={}),this.isValidCssColor(e)){var r=this.calculateColor(e);void 0===t.style&&(t.style={}),t.style=Object.assign({},t.style,{"background-color":""+r})}else if(e){var n=e.toString().trim();void 0===t.class&&(t.class={}),t.class=Object.assign({},t.class,((a={})["bg-"+n]=!0,a))}return t},setTextColor:function(e,t){var a;if(void 0===t&&(t={}),this.isValidCssColor(e)){var r=this.calculateColor(e);void 0===t.style&&(t.style={}),t.style=Object.assign({},t.style,{color:""+r,"caret-color":""+r})}else if(e){var n=e.toString().trim();void 0===t.class&&(t.class={}),t.class=Object.assign({},t.class,((a={})["text-"+n]=!0,a))}return t},setBorderColor:function(e,t){var a;if(void 0===t&&(t={}),this.isValidCssColor(e)){var r=this.calculateColor(e);void 0===t.style&&(t.style={}),t.style=Object.assign({},t.style,{"border-color":""+r})}else if(e){var n=e.toString().trim();void 0===t.class&&(t.class={}),t.class=Object.assign({},t.class,((a={})["border-"+n]=!0,a))}return t}}};QColorizeMixin.version=version$1;var version$2="1.0.0",QThemeMixin={name:"QThemeMixin",props:{theme:{type:Object,default:function(){}},enableTheme:Boolean},methods:{useDefaultTheme:function(e,t,a){return void 0===a&&(a={}),a},getThemeColors:function(e){var t=this;void 0===e&&(e=[]);var a=new Map;return!0===this.enableTheme&&void 0!==this.theme&&e.forEach(function(e){a.set(e,t.theme[e])}),a}}};function validateView(e){return["month","week","day","2day","3day","4day","5day","6day","month-scheduler","week-scheduler","custom-scheduler","scheduler","day-scheduler","2day-scheduler","3day-scheduler","4day-scheduler","5day-scheduler","6day-scheduler","month-agenda","week-agenda","custom-agenda","agenda","day-agenda","2day-agenda","3day-agenda","4day-agenda","5day-agenda","6day-agenda","month-interval","custom-interval"].includes(e)}QThemeMixin.version=version$2;var props={base:{weekdays:{type:Array,default:function(){return[0,1,2,3,4,5,6]}},disabledDays:Array,hideHeader:Boolean,noScroll:Boolean,shortWeekdayLabel:Boolean,noDefaultHeaderText:Boolean,noDefaultHeaderBtn:Boolean,locale:{type:String,default:"en-us"},animated:Boolean,transitionPrev:{type:String,default:"slide-right"},transitionNext:{type:String,default:"slide-left"},dragOverFunc:{type:Function},dropFunc:{type:Function}},intervals:{maxDays:{type:Number,default:7},shortIntervalLabel:Boolean,intervalHeight:{type:[Number,String],default:40,validator:validateNumber},intervalMinutes:{type:[Number,String],default:60,validator:validateNumber},intervalStart:{type:[Number,String],default:0,validator:validateNumber},intervalCount:{type:[Number,String],default:24,validator:validateNumber},intervalStyle:{type:Function,default:null},showIntervalLabel:{type:Function,default:null},hour24Format:Boolean,columnHeaderBefore:Boolean,columnHeaderAfter:Boolean,columnCount:{type:[Number,String],default:1,validator:validateNumber},columnIndexStart:{type:[Number,String],default:0,validator:validateNumber}},weeks:{dayHeight:{type:[Number,String],default:0,validator:validateNumber},dayStyle:{type:Function,default:null},dayPadding:String,minWeeks:{type:[Number,String],validator:validateNumber,default:1},shortMonthLabel:Boolean,showWorkWeeks:Boolean,showMonthLabel:{type:Boolean,default:!0},showDayOfYearLabel:Boolean,selectedStartEndDates:{type:Array,default:function(){return[]},validator:function(e){return e.length<=2}},miniMode:{type:[Boolean,String],validator:function(e){return void 0===e||!0===e||!1===e||"auto"===e}},breakpoint:{type:String,default:"md",validator:function(e){return["xs","sm","md","lg","xl"].includes(e)}},monthLabelSize:{type:String,default:"md",validator:function(e){return["xs","sm","md","lg","xl"].includes(e)}}},scheduler:{resources:Array,resourceKey:{type:String,default:"label"},maxDays:{type:Number,default:7},resourceHeight:{type:[Number,String],default:70,validator:validateNumber},resourceWidth:{type:[Number,String],validator:function(e){return void 0===e||validateNumber(e)}},resourceStyle:{type:Function,default:null},columnHeaderBefore:Boolean,columnHeaderAfter:Boolean,columnCount:{type:[Number,String],default:1,validator:validateNumber},columnIndexStart:{type:[Number,String],default:0,validator:validateNumber}},calendar:{view:{type:String,default:"month",validator:validateView},value:{type:String,validator:function(e){return""===e||validateTimestamp(e)}}}},CalendarBase={name:"CalendarBase",mixins:[QColorizeMixin,QThemeMixin,Mouse,Times],props:Object.assign({},props.base,{start:{type:String,validator:validateTimestamp,default:function(){return parseDate(new Date).date}},end:{type:String,validator:validateTimestamp,default:"0000-00-00"}}),data:function(){return{keyValue:"YYYY-mm-dd",direction:"next"}},computed:{weekdaySkips:function(){return getWeekdaySkips(this.weekdays)},parsedStart:function(){return parseTimestamp(this.start)},parsedEnd:function(){return parseTimestamp(this.end)},days:function(){return createDayList(this.parsedStart,this.parsedEnd,this.times.today,this.weekdaySkips,this.disabledDays)},dayFormatter:function(){var e={timeZone:"UTC",day:"numeric"};return createNativeLocaleFormatter(this.locale,function(t,a){return e})},weekdayFormatter:function(){var e={timeZone:"UTC",weekday:"long"},t={timeZone:"UTC",weekday:"short"};return createNativeLocaleFormatter(this.locale,function(a,r){return r?t:e})}},methods:{getRelativeClasses:function(e,t){return void 0===t&&(t=!1),{"q-current-day":e.current,"q-past-day":e.past,"q-future-day":e.future,"q-outside":t}},getStartOfWeek:function(e){return getStartOfWeek(e,this.weekdays,this.times.today)},getEndOfWeek:function(e){return getEndOfWeek(e,this.weekdays,this.times.today)},dayStyleDefault:function(e){}}};function convertToUnit(e,t){return void 0===t&&(t="px"),null==e||""===e?void 0:isNaN(e)?String(e):""+Number(e)+t}var QCalendarWeekly={name:"QCalendarWeekly",mixins:[CalendarBase],props:props.weeks,computed:{staticClass:function(){return(this.isMiniMode?" q-calendar-mini ":"")+"q-calendar-weekly"},parsedMinWeeks:function(){return parseInt(this.minWeeks,10)},days:function(){var e=this.parsedMinWeeks*this.weekdays.length;return createDayList(this.getStartOfWeek(this.parsedStart),this.getEndOfWeek(this.parsedEnd),this.times.today,this.weekdaySkips,this.disabledDays,Number.MAX_SAFE_INTEGER,e)},todayWeek:function(){var e=this.times.today;return createDayList(this.getStartOfWeek(e),this.getEndOfWeek(e),e,this.weekdaySkips,this.disabledDays,this.weekdays.length,this.weekdays.length)},monthFormatter:function(){var e={timeZone:"UTC",month:"long"},t={timeZone:"UTC",month:"short"};return createNativeLocaleFormatter(this.locale,function(a,r){return r?t:e})},styles:function(){var e={};if(this.dayHeight>0){var t=convertToUnit(this.dayHeight);e.height=t}return void 0!==this.dayPadding&&(e.padding=this.dayPadding),e},isMiniMode:function(){return!0===this.miniMode||"auto"===this.miniMode&&this.$q.screen.lt[this.breakpoint]}},methods:{isOutside:function(e){var t=getDayIdentifier(e);return t<getDayIdentifier(this.parsedStart)||t>getDayIdentifier(this.parsedEnd)},isCurrentWeek:function(e){for(var t=0;t<e.length;++t)if(!0===e[t].current)return{timestamp:e[t]};return{timestamp:!1}},__renderHead:function(e){return e("div",{staticClass:"q-calendar-weekly__head"},[!0===this.showWorkWeeks&&this.__renderWorkWeekHead(e),this.__renderHeadDays(e)])},__renderWorkWeekHead:function(e){var t,a,r=new Map,n=this.useDefaultTheme;return!0===this.enableTheme&&(t="colorHeader",a="backgroundHeader",r=this.getThemeColors([t,a]),n=this.setBothColors),e("div",n(r.get(t),r.get(a),{staticClass:"q-calendar-weekly__head-workweek"}),"#")},__renderHeadDays:function(e){var t=this;return this.todayWeek.map(function(a,r){return t.__renderHeadDay(e,a,r)})},__renderHeadDay:function(e,t,a){var r,n,s=this.isOutside(this.days[a]),i=new Map,o=this.useDefaultTheme;return!0===this.enableTheme&&(s?(r="colorHeaderOutside",n="backgroundHeaderOutside"):(r="colorHeader",n="backgroundHeader"),i=this.getThemeColors([r,n]),o=this.setBothColors),e("div",o(i.get(r),i.get(n),{key:t.date,staticClass:"ellipsis q-calendar-weekly__head-weekday",class:this.getRelativeClasses(t,s)}),[this.__renderHeadDayLabel(e,t,this.shortWeekdayLabel||this.isMiniMode)])},__renderHeadDayLabel:function(e,t,a){return e("span",{staticClass:"ellipsis"},this.weekdayFormatter(t,a))},__renderWeeks:function(e){for(var t=this.days,a=this.weekdays.length,r=[],n=0;n<t.length;n+=a)r.push(this.__renderWeek(e,t.slice(n,n+a)));return r},__renderWeek:function(e,t){var a=this;return e("div",{key:t[0].date,staticClass:"q-calendar-weekly__week"},[!0===this.showWorkWeeks&&this.__renderWorkWeekGutter(e,t),t.map(function(t){return a.__renderDay(e,t)})])},__renderWorkWeekGutter:function(e,t){var a,r,n=this.$scopedSlots.workweek,s=t.length>2?t[2]:t[0],i=this.isCurrentWeek(t).timestamp,o=Number(s.workweek).toLocaleString(this.locale),d={workweekLabel:o,week:t,miniMode:this.isMiniMode},u=i&&!0===i.current?this.color:void 0,l=convertToUnit(this.dayHeight),c=new Map,h=this.useDefaultTheme;return!0===this.enableTheme&&(i&&!0===i.current||!0===s.current?(a="colorWorkWeekCurrent",r="backgroundWorkWeekCurrent"):i&&!0===i.past||!0===s.past?(a="colorWorkWeekPast",r="backgroundWorkWeekPast"):(i&&!0===i.future||!0===s.future)&&(a="colorWorkWeekFuture",r="backgroundWorkWeekFuture"),c=this.getThemeColors([a,r]),h=this.setBothColors),e("div",h(void 0!==u?u:c.get(a),c.get(r),{key:s.workweek,staticClass:"q-calendar-weekly__workweek",class:this.getRelativeClasses(!1!==i?i:s,!1),style:{height:this.dayHeight&&this.dayHeight>0?l:"auto"}}),n?n(d):o)},__renderDay:function(e,t){var a,r,n,s=this,i=this.dayStyle||this.dayStyleDefault,o=this.isOutside(t),d=this.$scopedSlots.day,u=Object.assign({},{outside:o},t,{miniMode:this.isMiniMode}),l=!1===o&&this.days.find(function(e){return e.month===t.month}).day===t.day&&!0===this.showMonthLabel,c=new Map,h=this.useDefaultTheme;!0===this.enableTheme&&(!0===o?(r="colorBodyOutside",n="backgroundBodyOutside"):!0===t.past?(r="colorBodyPast",n="backgroundBodyPast"):!0===t.current?(r="colorBodyCurrent",n="backgroundBodyCurrent"):!0===t.future&&(r="colorBodyFuture",n="backgroundBodyFuture"),c=this.getThemeColors([r,n]),h=this.setBothColors);var y=Object.assign({},this.styles);return y=Object.assign(y,i(t)),e("div",h(c.get(r),c.get(n),{key:t.date,staticClass:"q-calendar-weekly__day row justify-center items-center",class:Object.assign({},this.getRelativeClasses(t,o),{"q-calendar-weekly__day--droppable":a}),style:y,domProps:{ondragover:function(e){void 0!==s.dragOverFunc&&(a=s.dragOverFunc(e,t,"day"))},ondrop:function(e){void 0!==s.dropFunc&&s.dropFunc(e,t,"day")}},on:this.getDefaultMouseEventHandlers(":day",function(e){return t})}),[this.__renderDayLabel(e,t),!0!==this.isMiniMode&&this.showDayOfYearLabel&&!l?this.__renderDayOfYearLabel(e,t):"",!0!==this.isMiniMode&&l?this.__renderDayMonth(e,t):"",e("div",{staticClass:"row full-width justify-center"},d?d(u):"")])},__renderDayLabel:function(e,t){var a,r,n=this.isOutside(t),s=!0===t.current?this.color:void 0,i=this.dayFormatter(t,!1),o=this.$scopedSlots["day-label"],d=Object.assign({},{dayLabel:i},t,{miniMode:this.isMiniMode}),u=new Map,l=this.useDefaultTheme;return!0===this.enableTheme&&(!0===n?(a="colorDayLabelOutside",r="backgroundDayLabelOutside"):!0===t.past?(a="colorDayLabelPast",r="backgroundDayLabelPast"):!0===t.current?(a="colorDayLabelCurrent",r="backgroundDayLabelCurrent"):!0===t.future&&(a="colorDayLabelFuture",r="backgroundDayLabelFuture"),u=this.getThemeColors([a,r]),l=this.setBothColors),e(quasar.QBtn,l(void 0!==s?s:u.get(a),u.get(r),{staticClass:"q-calendar-weekly__day-label",props:{size:this.isMiniMode?"sm":this.monthLabelSize,unelevated:!0,round:!0,dense:!0,noCaps:!0,outline:!0===t.current,disable:t.disabled},on:this.getMouseEventHandlers({"click:date":{event:"click",stop:!0},"contextmenu:date":{event:"contextmenu",stop:!0,prevent:!0,result:!1}},function(e){return t})}),[o?o(d):i])},__renderDayOfYearLabel:function(e,t){var a=!0===t.current?this.color:void 0,r=this.$scopedSlots["day-of-year"],n=Object.assign({},t);return e("div",this.setTextColor(a,{staticClass:"q-calendar-weekly__day-month--day-of-year"}),r?r(n):t.doy)},__renderDayMonth:function(e,t){var a=!0===t.current?this.color:void 0,r=this.$scopedSlots["month-label"],n=this.monthFormatter(t,this.shortMonthLabel),s=Object.assign({},{monthLabel:n},t,{miniMode:this.isMiniMode});return e("div",this.setTextColor(a,{staticClass:"q-calendar-weekly__day-month"}),r?r(s):!0!==this.isMiniMode?n:"")}},render:function(e){return e("div",{staticClass:this.staticClass,nativeOn:{dragstart:function(e){e.preventDefault()}}},[!this.hideHeader&&this.__renderHead(e)].concat(this.__renderWeeks(e)))}},QCalendarMonthly={name:"QCalendarMonthly",mixins:[QCalendarWeekly],computed:{parsedStart:function(){return getStartOfMonth(parseTimestamp(this.start))},parsedEnd:function(){return getEndOfMonth(parseTimestamp(this.end))}}},Resize={name:"resize",inserted:function(e,t){var a=t.value,r=t.options||{passive:!0};window.addEventListener("resize",a,r),e._onResize={callback:a,options:r},t.modifiers&&t.modifiers.quiet||a()},unbind:function(e){if(e._onResize){var t=e._onResize,a=t.callback,r=t.options;window.removeEventListener("resize",a,r),delete e._onResize}}},CalendarIntervals={name:"CalendarWithIntervals",mixins:[CalendarBase],props:Object.assign({},props.intervals),computed:{parsedIntervalStart:function(){return parseInt(this.intervalStart,10)},parsedIntervalMinutes:function(){return parseInt(this.intervalMinutes,10)},parsedIntervalCount:function(){return parseInt(this.intervalCount,10)},parsedIntervalHeight:function(){return parseFloat(this.intervalHeight)},startMinute:function(){return this.parsedIntervalStart*this.parsedIntervalMinutes},bodyHeight:function(){return this.parsedIntervalCount*this.parsedIntervalHeight},days:function(){return createDayList(this.parsedStart,this.parsedEnd,this.times.today,this.weekdaySkips,this.disabledDays,this.maxDays)},intervals:function(){var e=this.days,t=this.parsedIntervalStart,a=this.parsedIntervalMinutes,r=this.parsedIntervalCount,n=this.times.now;return 0===e.length&&console.error("QCalendar: days array has no content"),e.map(function(e){return createIntervalList(e,t,a,r,n)})},intervalFormatter:function(){var e={timeZone:"UTC",hour12:!this.hour24Format,hour:"2-digit",minute:"2-digit"},t={timeZone:"UTC",hour12:!this.hour24Format,hour:"numeric",minute:"2-digit"},a={timeZone:"UTC",hour12:!this.hour24Format,hour:"numeric"};return createNativeLocaleFormatter(this.locale,function(r,n){return n?0===r.minute?a:t:e})}},methods:{showIntervalLabelDefault:function(e){var t=this.intervals[0][0];return!(t.hour===e.hour&&t.minute===e.minute)&&0===e.minute},intervalStyleDefault:function(e){},getTimestampAtEvent:function(e,t){var a=copyTimestamp(t),r=e.currentTarget.getBoundingClientRect(),n=this.startMinute,s=e,i=e,o=s.changedTouches||s.touches,d=((o&&o[0]?o[0].clientY:i.clientY)-r.top)/this.parsedIntervalHeight;return updateMinutes(a,n+Math.floor(d*this.parsedIntervalMinutes),this.times.now)},getScopeForSlot:function(e,t){var a=copyTimestamp(e);return a.timeStartPos=this.timeStartPos,a.timeDurationHeight=this.timeDurationHeight,void 0!==t&&(a.index=t),a},scrollToTime:function(e){var t=this.timeStartPos(e),a=this.$refs.scrollArea;return!(!1===t||!a)&&(a.scrollTop=t,!0)},timeDurationHeight:function(e){return e/this.parsedIntervalMinutes*this.parsedIntervalHeight},timeStartPos:function(e,t){void 0===t&&(t=!0);var a=parseTime(e);if(!1===a)return!1;var r=(a-this.startMinute)/(this.parsedIntervalCount*this.parsedIntervalMinutes)*this.bodyHeight;return t&&(r<0&&(r=0),r>this.bodyHeight&&(r=this.bodyHeight)),r}}},QCalendarDaily={name:"QCalendarDaily",mixins:[CalendarIntervals],directives:{Resize:Resize},data:function(){return{scrollWidth:0}},computed:{classes:function(){return{"q-calendar-daily":!0}}},mounted:function(){this.init()},watch:{noScroll:function(e){!0===e?this.scrollWidth=0:this.$nextTick(this.onResize)}},methods:{init:function(){this.$nextTick(this.onResize)},onResize:function(){this.scrollWidth=this.getScrollWidth()},getScrollWidth:function(){var e=this.$refs.scrollArea,t=this.$refs.pane;return e&&t?e.offsetWidth-t.offsetWidth:0},__renderHead:function(e){return e("div",{staticClass:"q-calendar-daily__head",style:{marginRight:this.scrollWidth+"px"}},[this.__renderHeadIntervals(e)].concat(this.__renderHeadDays(e)))},__renderHeadIntervals:function(e){var t,a,r=this.$scopedSlots["intervals-header"],n=new Map,s=this.useDefaultTheme;return!0===this.enableTheme&&(t="colorIntervalHeader",a="backgroundIntervalHeader",n=this.getThemeColors([t,a]),s=this.setBothColors),e("div",s(n.get(t),n.get(a),{staticClass:"q-calendar-daily__intervals-head q-calendar-daily__intervals-head--text"}),[r&&r(this.days)])},__renderHeadDays:function(e){var t=this;return 1===this.days.length&&void 0!==this.columnCount&&parseInt(this.columnCount,10)>0?Array.apply(null,new Array(parseInt(this.columnCount,10))).map(function(e,a){return a+parseInt(t.columnIndexStart,10)}).map(function(a){return t.__renderHeadDay(e,t.days[0],a)}):this.days.map(function(a){return t.__renderHeadDay(e,a)})},__renderHeadDay:function(e,t,a){var r,n,s,i=this,o=this.$scopedSlots["day-header"],d=this.getScopeForSlot(t,a),u=100/this.days.length,l=new Map,c=this.useDefaultTheme;return!0===this.enableTheme&&(!0===t.past?(n="colorHeaderPast",s="backgroundHeaderPast"):!0===t.current?(n="colorHeaderCurrent",s="backgroundHeaderCurrent"):!0===t.future&&(n="colorHeaderFuture",s="backgroundHeaderFuture"),l=this.getThemeColors([n,s]),c=this.setBothColors),e("div",c(l.get(n),l.get(s),{key:t.date+(void 0!==a?"-"+a:""),staticClass:"q-calendar-daily__head-day",class:Object.assign({},this.getRelativeClasses(t),{"q-calendar-daily__head-day--droppable":r}),style:{maxWidth:u+"%"},domProps:{ondragover:function(e){void 0!==i.dragOverFunc&&(r=i.dragOverFunc(e,t,"day",a))},ondrop:function(e){void 0!==i.dropFunc&&i.dropFunc(e,t,"day",a)}},on:this.getDefaultMouseEventHandlers(":day",function(e){return d})}),[!0===this.columnHeaderBefore&&this.__renderColumnHeaderBefore(e,t,a),!0!==this.noDefaultHeaderText&&this.__renderHeadWeekday(e,t),!0!==this.noDefaultHeaderBtn&&this.__renderHeadDayBtn(e,t),o&&o(d),!0===this.columnHeaderAfter&&this.__renderColumnHeaderAfter(e,t,a)])},__renderHeadWeekday:function(e,t){var a,r,n=!0===t.current?this.color:void 0,s=new Map,i=this.useDefaultTheme;return!0===this.enableTheme&&(!0===t.past?(a="colorDayLabelPast",r="backgroundDayLabelPast"):!0===t.current?(a="colorDayLabelCurrent",r="backgroundDayLabelCurrent"):!0===t.future&&(a="colorDayLabelFuture",r="backgroundDayLabelFuture"),s=this.getThemeColors([a,r]),i=this.setBothColors),e("div",i(void 0!==n?n:s.get(a),s.get(r),{staticClass:"ellipsis q-calendar-daily__head-weekday"}),[this.__renderHeadDayLabel(e,t,this.shortWeekdayLabel)])},__renderHeadDayLabel:function(e,t,a){return e("span",{staticClass:"ellipsis"},this.weekdayFormatter(t,a))},__renderHeadDayBtn:function(e,t){var a,r,n=!0===t.current?this.color:void 0,s=new Map,i=this.useDefaultTheme;return!0===this.enableTheme&&(!0===t.past?(a="colorDayLabelPast",r="backgroundDayLabelPast"):!0===t.current?(a="colorDayLabelCurrent",r="backgroundDayLabelCurrent"):!0===t.future&&(a="colorDayLabelFuture",r="backgroundDayLabelFuture"),s=this.getThemeColors([a,r]),i=this.setBothColors),e(quasar.QBtn,i(void 0!==n?n:s.get(a),s.get(r),{staticClass:"q-calendar-daily__head-day-label",style:{color:!0===t.current?n:void 0},props:{unelevated:!0,round:!0,dense:!0,noCaps:!0,outline:!0===t.current,disable:t.disabled},on:this.getMouseEventHandlers({"click:date":{event:"click",stop:!0},"contextmenu:date":{event:"contextmenu",stop:!0,prevent:!0,result:!1}},function(e){return t})}),this.dayFormatter(t,!1))},__renderColumnHeaderBefore:function(e,t,a){var r=this.$scopedSlots["column-header-before"],n=Object.assign({},t);return n.index=a,e("div",{staticClass:"q-calendar-daily__column-header--before"},[r&&r(n)])},__renderColumnHeaderAfter:function(e,t,a){var r=this.$scopedSlots["column-header-after"],n=Object.assign({},t);return n.index=a,e("div",{staticClass:"q-calendar-daily__column-header--after"},[r&&r(n)])},__renderBody:function(e){return e("div",{staticClass:"q-calendar-daily__body"},[this.__renderScrollArea(e)])},__renderScrollArea:function(e){return void 0!==this.noScroll&&!0===this.noScroll?this.__renderPane(e):e("div",{ref:"scrollArea",staticClass:"q-calendar-daily__scroll-area"},[this.__renderPane(e)])},__renderPane:function(e){return e("div",{ref:"pane",staticClass:"q-calendar-daily__pane",style:{height:convertToUnit(this.bodyHeight)}},[this.__renderDayContainer(e)])},__renderDayContainer:function(e){var t=this.$scopedSlots["day-container"];return e("div",{staticClass:"q-calendar-daily__day-container"},[this.__renderBodyIntervals(e)].concat(this.__renderDays(e),[t&&t(this.days)]))},__renderDays:function(e){var t=this;return 1===this.days.length&&this.columnCount&&parseInt(this.columnCount,10)>0?Array.apply(null,new Array(parseInt(this.columnCount,10))).map(function(e,a){return a+parseInt(t.columnIndexStart,10)}).map(function(a){return t.__renderDay(e,t.days[0],0,a)}):this.days.map(function(a,r){return t.__renderDay(e,a,r)})},__renderDay:function(e,t,a,r){var n,s,i=this,o=this.$scopedSlots["day-body"],d=this.getScopeForSlot(t,r),u=100/this.days.length,l=new Map,c=this.useDefaultTheme;return!0===this.enableTheme&&(!0===t.past?(n="colorBodyPast",s="backgroundBodyPast"):!0===t.current?(n="colorBodyCurrent",s="backgroundBodyCurrent"):!0===t.future&&(n="colorBodyFuture",s="backgroundBodyFuture"),l=this.getThemeColors([n,s]),c=this.setBothColors),e("div",c(l.get(n),l.get(s),{key:t.date+(void 0!==r?":"+r:""),staticClass:"q-calendar-daily__day",class:this.getRelativeClasses(t),style:{maxWidth:u+"%"},on:this.getDefaultMouseEventHandlers(":time",function(e){return i.getScopeForSlot(i.getTimestampAtEvent(e,t),r)})}),this.__renderDayIntervals(e,a,r).concat([o&&o(d)]))},__renderDayIntervals:function(e,t,a){var r=this;return this.intervals[t].map(function(t){return r.__renderDayInterval(e,t,a)})},__renderDayInterval:function(e,t,a){var r,n=this,s=convertToUnit(this.intervalHeight),i=this.intervalStyle||this.intervalStyleDefault,o=this.$scopedSlots.interval,d=this.getScopeForSlot(t,a);return e("div",{key:t.time,staticClass:"q-calendar-daily__day-interval",class:{"q-calendar-daily__day-interval--droppable":r},style:Object.assign({},{height:s},i(t)),domProps:{ondragover:function(e){void 0!==n.dragOverFunc&&(r=n.dragOverFunc(e,t,"interval"))},ondrop:function(e){void 0!==n.dropFunc&&n.dropFunc(e,t,"interval")}}},o?o(d):void 0)},__renderBodyIntervals:function(e){var t,a,r=this,n=new Map,s=this.useDefaultTheme;!0===this.enableTheme&&(t="colorIntervalBody",a="backgroundIntervalBody",n=this.getThemeColors([t,a]),s=this.setBothColors);var i={staticClass:"q-calendar-daily__intervals-body",on:this.getDefaultMouseEventHandlers(":interval",function(e){return r.getTimestampAtEvent(e,r.parsedStart)})};return e("div",s(n.get(t),n.get(a),i),this.__renderIntervalLabels(e))},__renderIntervalLabels:function(e){var t=this;return this.intervals[0].map(function(a){return t.__renderIntervalLabel(e,a)})},__renderIntervalLabel:function(e,t){var a,r,n=convertToUnit(this.intervalHeight),s=this.shortIntervalLabel,i=(this.showIntervalLabel||this.showIntervalLabelDefault)(t)?this.intervalFormatter(t,s):void 0,o=new Map,d=this.useDefaultTheme;return!0===this.enableTheme&&(a="colorIntervalText",r="backgroundIntervalText",o=this.getThemeColors([a,r]),d=this.setBothColors),e("div",{key:t.time,staticClass:"q-calendar-daily__interval",style:{height:n}},[e("div",d(o.get(a),o.get(r),{staticClass:"q-calendar-daily__interval-text"}),i)])}},render:function(e){return e("div",{class:this.classes,directives:[{modifiers:{quiet:!0},name:"resize",value:this.onResize}]},[!this.hideHeader&&this.__renderHead(e),this.__renderBody(e)])}},CalendarScheduler={name:"CalendarWithScheduler",mixins:[CalendarBase],props:Object.assign({},props.scheduler),computed:{parsedResourceHeight:function(){return parseFloat(this.resourceHeight)},parsedResourceWidth:function(){return parseFloat(this.resourceWidth)},bodyHeight:function(){return this.resources&&this.resources.length>0?this.resources.length*this.parsedResourceHeight:0},days:function(){return createDayList(this.parsedStart,this.parsedEnd,this.times.today,this.weekdaySkips,this.disabledDays,this.maxDays)}},methods:{resourceStyleDefault:function(e){},getTimestampAtEvent:function(e,t){return updateRelative(copyTimestamp(t),this.times.now,!1)},getScopeForSlot:function(e,t,a){var r={};return r.day=copyTimestamp(e),void 0!==t&&(r.index=t),void 0!==a&&(r.resource=a),r}}},QCalendarScheduler={name:"QCalendarScheduler",mixins:[CalendarScheduler],directives:{Resize:Resize},data:function(){return{scrollWidth:0}},computed:{classes:function(){return{"q-calendar-scheduler":!0}}},mounted:function(){this.init()},watch:{noScroll:function(e){!0===e?this.scrollWidth=0:this.$nextTick(this.onResize)}},methods:{init:function(){this.$nextTick(this.onResize)},onResize:function(){this.scrollWidth=this.getScrollWidth()},getScrollWidth:function(){var e=this.$refs.scrollArea,t=this.$refs.pane;return e&&t?e.offsetWidth-t.offsetWidth:0},resourceStartPos:function(e,t){void 0===t&&(t=!0);var a=this.resource.indexOf(e)*this.parsedResourceHeight;return t&&(a<0&&(a=0),a>this.bodyHeight&&(a=this.bodyHeight)),a},__renderHead:function(e){return e("div",{staticClass:"q-calendar-scheduler__head",style:{marginRight:this.scrollWidth+"px"}},[this.__renderHeadResources(e)].concat(this.__renderHeadDays(e)))},__renderHeadResources:function(e){var t,a,r=this.$scopedSlots["scheduler-resources-header"],n=convertToUnit(this.resourceWidth),s=new Map,i=this.useDefaultTheme;return!0===this.enableTheme&&(t="colorSchedulerHeader",a="backgroundSchedulerHeader",s=this.getThemeColors([t,a]),i=this.setBothColors),e("div",i(s.get(t),s.get(a),{staticClass:"q-calendar-scheduler__resources-head q-calendar-scheduler__resources-head--text",style:{width:n}}),[r&&r(this.days)])},__renderHeadDays:function(e){var t=this;return 1===this.days.length&&this.columnCount&&parseInt(this.columnCount,10)>0?Array.apply(null,new Array(parseInt(this.columnCount,10))).map(function(e,a){return a+parseInt(t.columnIndexStart,10)}).map(function(a){return t.__renderHeadDay(e,t.days[0],a)}):this.days.map(function(a){return t.__renderHeadDay(e,a)})},__renderHeadDay:function(e,t,a){var r,n,s,i=this,o=this.$scopedSlots["scheduler-day-header"],d=this.getScopeForSlot(t,a),u=100/this.days.length,l=new Map,c=this.useDefaultTheme;return!0===this.enableTheme&&(!0===t.past?(n="colorHeaderPast",s="backgroundHeaderPast"):!0===t.current?(n="colorHeaderCurrent",s="backgroundHeaderCurrent"):!0===t.future&&(n="colorHeaderFuture",s="backgroundHeaderFuture"),l=this.getThemeColors([n,s]),c=this.setBothColors),e("div",c(l.get(n),l.get(s),{key:t.date+(void 0!==a?"-"+a:""),staticClass:"q-calendar-scheduler__head-day",class:Object.assign({},this.getRelativeClasses(t),{"q-calendar-scheduler__head-day--droppable":r}),style:{maxWidth:u+"%"},domProps:{ondragover:function(e){void 0!==i.dragOverFunc&&(r=i.dragOverFunc(e,t,"day",a))},ondrop:function(e){void 0!==i.dropFunc&&i.dropFunc(e,t,"day",a)}},on:this.getDefaultMouseEventHandlers(":day",function(e){return d})}),[!0===this.columnHeaderBefore&&this.__renderColumnHeaderBefore(e,t,a),!0!==this.noDefaultHeaderText&&this.__renderHeadWeekday(e,t,a),!0!==this.noDefaultHeaderBtn&&this.__renderHeadDayBtn(e,t,a),o&&o(d),!0===this.columnHeaderAfter&&this.__renderColumnHeaderAfter(e,t,a)])},__renderHeadWeekday:function(e,t){var a,r,n=!0===t.current?this.color:void 0,s=new Map,i=this.useDefaultTheme;return!0===this.enableTheme&&(!0===t.past?(a="colorDayLabelPast",r="backgroundDayLabelPast"):!0===t.current?(a="colorDayLabelCurrent",r="backgroundDayLabelCurrent"):!0===t.future&&(a="colorDayLabelFuture",r="backgroundDayLabelFuture"),s=this.getThemeColors([a,r]),i=this.setBothColors),e("div",i(void 0!==n?n:s.get(a),s.get(r),{staticClass:"ellipsis q-calendar-scheduler__head-weekday"}),[this.__renderHeadDayLabel(e,t,this.shortWeekdayLabel)])},__renderHeadDayLabel:function(e,t,a){return e("span",{staticClass:"ellipsis"},this.weekdayFormatter(t,a))},__renderHeadDayBtn:function(e,t,a){var r,n,s=!0===t.current?this.color:void 0,i={day:t,idx:a},o=new Map,d=this.useDefaultTheme;return!0===this.enableTheme&&(!0===t.past?(r="colorDayLabelPast",n="backgroundDayLabelPast"):!0===t.current?(r="colorDayLabelCurrent",n="backgroundDayLabelCurrent"):!0===t.future&&(r="colorDayLabelFuture",n="backgroundDayLabelFuture"),o=this.getThemeColors([r,n]),d=this.setBothColors),e(quasar.QBtn,d(void 0!==s?s:o.get(r),o.get(n),{staticClass:"q-calendar-scheduler__head-day-label",style:{color:!0===t.current?s:void 0},props:{unelevated:!0,round:!0,dense:!0,noCaps:!0,outline:!0===t.current,disable:t.disabled},on:this.getMouseEventHandlers({"click:date":{event:"click",stop:!0},"contextmenu:date":{event:"contextmenu",stop:!0,prevent:!0,result:!1}},function(e){return i})}),this.dayFormatter(t,!1))},__renderColumnHeaderBefore:function(e,t,a){var r=this.$scopedSlots["scheduler-column-header-before"],n=Object.assign({},t);return n.index=a,e("div",{staticClass:"q-calendar-scheduler__column-header--before"},[r&&r(n)])},__renderColumnHeaderAfter:function(e,t,a){var r=this.$scopedSlots["scheduler-column-header-after"],n=Object.assign({},t);return n.index=a,e("div",{staticClass:"q-calendar-scheduler__column-header--after"},[r&&r(n)])},__renderBody:function(e){return e("div",{staticClass:"q-calendar-scheduler__body"},[this.__renderScrollArea(e)])},__renderScrollArea:function(e){return void 0!==this.noScroll&&!0===this.noScroll?this.__renderPane(e):e("div",{ref:"scrollArea",staticClass:"q-calendar-scheduler__scroll-area"},[this.__renderPane(e)])},__renderPane:function(e){return e("div",{ref:"pane",staticClass:"q-calendar-scheduler__pane",style:{height:convertToUnit(this.bodyHeight)}},[this.__renderDayContainer(e)])},__renderDayContainer:function(e){return e("div",{staticClass:"q-calendar-scheduler__day-container"},[this.__renderBodyResources(e)].concat(this.__renderDays(e)))},__renderDays:function(e){var t=this;return 1===this.days.length&&this.columnCount&&parseInt(this.columnCount,10)>0?Array.apply(null,new Array(parseInt(this.columnCount,10))).map(function(e,a){return a+parseInt(t.columnIndexStart,10)}).map(function(a){return t.__renderDay(e,t.days[0],0,a)}):this.days.map(function(a,r){return t.__renderDay(e,a,r)})},__renderDay:function(e,t,a){var r,n,s=100/this.days.length,i=new Map,o=this.useDefaultTheme;return!0===this.enableTheme&&(!0===t.past?(r="colorBodyPast",n="backgroundBodyPast"):!0===t.current?(r="colorBodyCurrent",n="backgroundBodyCurrent"):!0===t.future&&(r="colorBodyFuture",n="backgroundBodyFuture"),i=this.getThemeColors([r,n]),o=this.setBothColors),e("div",o(i.get(r),i.get(n),{key:t.date+(void 0!==a?":"+a:""),staticClass:"q-calendar-scheduler__day",class:this.getRelativeClasses(t),style:{maxWidth:s+"%"}}),[].concat(this.__renderDayResources(e,t,a)))},__renderDayResources:function(e,t,a){var r=this;return this.resources.map(function(n){return r.__renderDayResource(e,n,t,a)})},__renderDayResource:function(e,t,a,r){var n,s=this,i=convertToUnit(this.resourceHeight),o=this.resourceStyle||this.resourceStyleDefault,d=this.$scopedSlots["scheduler-resource-day"],u=this.getScopeForSlot(a,r,t),l={height:i};return l=Object.assign(l,o(u)),e("div",{key:t[this.resourceKey]+"-"+r,staticClass:"q-calendar-scheduler__day-resource",class:{"q-calendar-scheduler__day-resource--droppable":n},style:l,domProps:{ondragover:function(e){void 0!==s.dragOverFunc&&(n=s.dragOverFunc(e,t,"resource",r))},ondrop:function(e){void 0!==s.dropFunc&&s.dropFunc(e,t,"resource",r)}},on:this.getDefaultMouseEventHandlers(":resource:day",function(e){return s.getScopeForSlot(s.getTimestampAtEvent(e,a),r,t)})},d?d(u):void 0)},__renderBodyResources:function(e){var t,a,r=convertToUnit(this.resourceWidth),n=new Map,s=this.useDefaultTheme;!0===this.enableTheme&&(t="colorSchedulerBody",a="backgroundSchedulerBody",n=this.getThemeColors([t,a]),s=this.setBothColors);var i={staticClass:"q-calendar-scheduler__resources-body",style:{width:r}};return e("div",s(n.get(t),n.get(a),i),this.__renderResourceLabels(e))},__renderResourceLabels:function(e){var t=this;return this.resources.map(function(a,r){return t.__renderResourceLabel(e,a,r)})},__renderResourceLabel:function(e,t,a){var r,n,s=this.$scopedSlots["scheduler-resource"],i={resource:t,index:a},o=convertToUnit(this.resourceHeight),d=t.label,u=new Map,l=this.useDefaultTheme;return!0===this.enableTheme&&(r="colorSchedulerText",n="backgroundSchedulerText",u=this.getThemeColors([r,n]),l=this.setBothColors),e("div",{key:t.label,staticClass:"q-calendar-scheduler__resource",style:{height:o},on:this.getDefaultMouseEventHandlers(":resource",function(e){return i})},[s?s(i):e("div",l(u.get(r),u.get(n),{staticClass:"q-calendar-scheduler__resource-text"}),d)])},__renderResourcesError:function(e){return e("div",{},"No resources have been defined")}},render:function(e){return e("div",{class:this.classes,directives:[{modifiers:{quiet:!0},name:"resize",value:this.onResize}]},[!this.hideHeader&&void 0!==this.resources&&this.__renderHead(e),void 0!==this.resources&&this.__renderBody(e),void 0===this.resources&&this.__renderResourcesError(e)])}},QCalendarAgenda={name:"QCalendarAgenda",mixins:[QCalendarDaily],methods:{__renderHead:function(e){return e("div",{staticClass:"q-calendar-daily__head",style:{marginRight:this.scrollWidth+"px"}},[].concat(this.__renderHeadDays(e)))},__renderPane:function(e){return e("div",{ref:"pane",staticClass:"q-calendar-daily__pane",style:{}},[this.__renderDayContainer(e)])},__renderBodyIntervals:function(e){},__renderDayIntervals:function(e,t,a){return[]},__renderDay:function(e,t,a,r){var n,s,i,o=this,d=this.$scopedSlots["day-body"],u=Object.assign({},t),l=100/this.days.length,c=new Map,h=this.useDefaultTheme;return!0===this.enableTheme&&(!0===t.past?(s="colorBodyPast",i="backgroundBodyPast"):!0===t.current?(s="colorBodyCurrent",i="backgroundBodyCurrent"):!0===t.future&&(s="colorBodyFuture",i="backgroundBodyFuture"),c=this.getThemeColors([s,i]),h=this.setBothColors),e("div",h(c.get(s),c.get(i),{key:t.date+(void 0!==r?":"+r:""),staticClass:"q-calendar-daily__day",class:Object.assign({},this.getRelativeClasses(t),{"q-calendar-daily__day--droppable":n}),style:{maxWidth:l+"%"},domProps:{ondragover:function(e){void 0!==o.dragOverFunc&&(n=o.dragOverFunc(e,t,"day"))},ondrop:function(e){void 0!==o.dropFunc&&o.dropFunc(e,t,"day")}},on:this.getDefaultMouseEventHandlers(":time",function(e){return o.getScopeForSlot(o.getTimestampAtEvent(e,t),r)})}),this.__renderDayIntervals(e,a,r).concat([d&&d(u)]))}},render:function(e){return e("div",{class:this.classes,directives:[{modifiers:{quiet:!0},name:"resize",value:this.onResize}]},[!this.hideHeader&&this.__renderHead(e),this.__renderBody(e)])}},Component={name:"QCalendar",mixins:[CalendarBase],props:Object.assign({},props.calendar,props.weeks,props.intervals,props.scheduler),data:function(){return{lastStart:void 0,lastEnd:void 0}},computed:{parsedValue:function(){return parseTimestamp(this.value)||this.parsedStart||this.times.today},renderProps:function(){var e=this.parsedValue,t="div",a=this.maxDays,r=e,n=e;switch(this.view){case"month":t=QCalendarMonthly,r=getStartOfMonth(e),n=getEndOfMonth(e);break;case"week":case"week-agenda":case"week-scheduler":t=this.view.endsWith("-agenda")?QCalendarAgenda:this.view.endsWith("-scheduler")?QCalendarScheduler:QCalendarDaily,r=this.getStartOfWeek(e),n=this.getEndOfWeek(e),a=this.weekdays.length;break;case"day":case"day-scheduler":case"day-agenda":t=this.view.endsWith("-agenda")?QCalendarAgenda:this.view.endsWith("-scheduler")?QCalendarScheduler:QCalendarDaily,a=1,updateFormatted(n=relativeDays(copyTimestamp(n),nextDay,a,this.weekdays));break;case"2day":case"2day-scheduler":case"2day-agenda":t=this.view.endsWith("-agenda")?QCalendarAgenda:this.view.endsWith("-scheduler")?QCalendarScheduler:QCalendarDaily,a=2,updateFormatted(n=relativeDays(copyTimestamp(n),nextDay,a,this.weekdays));break;case"3day":case"3day-scheduler":case"3day-agenda":t=this.view.endsWith("-agenda")?QCalendarAgenda:this.view.endsWith("-scheduler")?QCalendarScheduler:QCalendarDaily,a=3,updateFormatted(n=relativeDays(copyTimestamp(n),nextDay,a,this.weekdays));break;case"4day":case"4day-scheduler":case"4day-agenda":t=this.view.endsWith("-agenda")?QCalendarAgenda:this.view.endsWith("-scheduler")?QCalendarScheduler:QCalendarDaily,a=4,updateFormatted(n=relativeDays(copyTimestamp(n),nextDay,a,this.weekdays));break;case"5day":case"5day-scheduler":case"5day-agenda":t=this.view.endsWith("-agenda")?QCalendarAgenda:this.view.endsWith("-scheduler")?QCalendarScheduler:QCalendarDaily,a=5,updateFormatted(n=relativeDays(copyTimestamp(n),nextDay,a,this.weekdays));break;case"6day":case"6day-scheduler":case"6day-agenda":t=this.view.endsWith("-agenda")?QCalendarAgenda:this.view.endsWith("-scheduler")?QCalendarScheduler:QCalendarDaily,a=6,updateFormatted(n=relativeDays(copyTimestamp(n),nextDay,a,this.weekdays));break;case"custom-interval":case"custom-scheduler":case"custom-agenda":t=this.view.endsWith("-agenda")?QCalendarAgenda:this.view.endsWith("-scheduler")?QCalendarScheduler:QCalendarDaily,updateFormatted(n=relativeDays(copyTimestamp(n),nextDay,this.maxDays,this.weekdays));break;case"scheduler":case"agenda":t="scheduler"===this.view?QCalendarScheduler:QCalendarAgenda,updateFormatted(n=relativeDays(copyTimestamp(n),nextDay,this.maxDays,this.weekdays));break;case"month-interval":case"month-scheduler":case"month-agenda":t=this.view.endsWith("-agenda")?QCalendarAgenda:this.view.endsWith("-scheduler")?QCalendarScheduler:QCalendarDaily,r=getStartOfMonth(e),updateFormatted(n=getEndOfMonth(e)),a=DAYS_IN_MONTH_MAX}return{component:t,start:r,end:n,maxDays:a}}},watch:{renderProps:"__checkChange"},methods:{__checkChange:function(e,t){var a=this.renderProps,r=a.start,n=a.end;this.keyValue=0,void 0!==this.lastStart&&void 0!==this.lastEnd&&r.date===this.lastStart&&n.date===this.lastEnd||(this.lastStart=r.date,this.lastEnd=n.date,this.$emit("change",{start:r,end:n})),this.keyValue=getDayIdentifier(r)},move:function(e){void 0===e&&(e=1);var t=copyTimestamp(this.parsedValue),a=e>0,r=a?nextDay:prevDay,n=a?DAYS_IN_MONTH_MAX:DAY_MIN,s=a?e:-e;this.direction=a?"next":"prev";this.maxDays;for(var i=this.weekdaySkips.filter(function(e){return 0!==e}).length;--s>=0;)switch(this.view){case"month":t.day=n,r(t);break;case"week":case"week-scheduler":case"week-agenda":relativeDays(t,r,i,this.weekdays);break;case"day":case"day-scheduler":case"day-agenda":relativeDays(t,r,1,this.weekdays);break;case"2day":case"2day-scheduler":case"2day-agenda":relativeDays(t,r,2,this.weekdays);break;case"3day":case"3day-scheduler":case"3day-agenda":relativeDays(t,r,3,this.weekdays);break;case"4day":case"4day-scheduler":case"4day-agenda":relativeDays(t,r,4,this.weekdays);break;case"5day":case"5day-scheduler":case"5day-agenda":relativeDays(t,r,5,this.weekdays);break;case"6day":case"6day-scheduler":case"6day-agenda":relativeDays(t,r,6,this.weekdays);break;case"custom-interval":case"custom-scheduler":case"custom-agenda":case"agenda":relativeDays(t,r,this.maxDays,this.weekdays);break;case"month-interval":case"month-agenda":case"month-scheduler":t.day=n,r(t)}updateWeekday(t),updateFormatted(t),updateDayOfYear(t),updateRelative(t,this.times.now),this.$emit("input",t.date),this.$emit("moved",t)},next:function(e){void 0===e&&(e=1),this.move(e)},prev:function(e){void 0===e&&(e=1),this.move(-e)},timeStartPos:function(e,t){void 0===t&&(t=!0);var a=this.$children[0];return!(!a||!a.timeStartPos)&&a.timeStartPos(e,t)},timeDurationHeight:function(e){var t=this.$children[0];return t&&t.timeDurationHeight?t.timeDurationHeight(e):-1},scrollToTime:function(e){var t=this.$children[0];return!(!t||!t.scrollToTime)&&t.scrollToTime(e)},__renderComponent:function(e,t,a){return e(t,a)}},render:function(e){var t=this,a=this.renderProps,r=a.start,n=a.end,s=a.maxDays,i=a.component,o={staticClass:"q-calendar",key:this.keyValue,props:Object.assign({},this.$props,{start:r.date,end:n.date,maxDays:s}),on:Object.assign({},this.$listeners,{"click:date":function(e){void 0!==t.$listeners.input&&(void 0!==e.date?t.$emit("input",e.date):void 0!==e.day&&void 0!==e.day.date&&t.$emit("input",e.day.date)),t.$listeners["click:date"]&&t.$emit("click:date",e)}}),scopedSlots:this.$scopedSlots};return!0===this.animated?e("transition",{props:{name:"q-transition--"+("prev"===this.direction?this.transitionPrev:this.transitionNext),appear:!0}},[this.__renderComponent(e,i,o)]):this.__renderComponent(e,i,o)}},Plugin={version:version,Component:Component,install:function(e){e.component(Component.name,Component)}};module.exports=Plugin;
/*!
* @quasar/quasar-ui-qcalendar v1.2.3
* @quasar/quasar-ui-qcalendar v1.3.0
* (c) 2019 Jeff Galbraith <jeff@quasar.dev>
* Released under the MIT License.
*/
import{date,QBtn}from"quasar";var version="1.2.3",PARSE_REGEX=/^(\d{4})-(\d{1,2})(-(\d{1,2}))?([^\d]+(\d{1,2}))?(:(\d{1,2}))?(:(\d{1,2}))?$/,PARSE_TIME=/(\d\d?)(:(\d\d?)|)(:(\d\d?)|)/,DAYS_IN_MONTH=[0,31,28,31,30,31,30,31,31,30,31,30,31],DAYS_IN_MONTH_LEAP=[0,31,29,31,30,31,30,31,31,30,31,30,31],DAYS_IN_MONTH_MIN=28,DAYS_IN_MONTH_MAX=31,MONTH_MAX=12,MONTH_MIN=1,DAY_MIN=1,DAYS_IN_WEEK=7,MINUTES_IN_HOUR=60;function getStartOfWeek(e,t,a){if(1===e.day)for(;!t.includes(e.weekday);)nextDay(e);var r=copyTimestamp(e);return findWeekday(r,t[0],prevDay,t.length),updateFormatted(r),a&&updateRelative(r,a,r.hasTime),r}function getEndOfWeek(e,t,a){if(daysInMonth(e.year,e.month)===e.day)for(;!t.includes(e.weekday);)prevDay(e);var r=copyTimestamp(e);return findWeekday(r,t[t.length-1],nextDay,t.length),updateFormatted(r),a&&updateRelative(r,a,r.hasTime),r}function getStartOfMonth(e){var t=copyTimestamp(e);return t.day=DAY_MIN,updateFormatted(t),t}function getEndOfMonth(e){var t=copyTimestamp(e);return t.day=daysInMonth(t.year,t.month),updateFormatted(t),t}function parseTime(e){if("number"==typeof e)return e;if("string"==typeof e){var t=PARSE_TIME.exec(e);return!!t&&60*parseInt(t[1],10)+parseInt(t[3]||0,10)}return"object"==typeof e&&("number"==typeof e.hour&&"number"==typeof e.minute&&60*e.hour+e.minute)}function validateTimestamp(e){return!!PARSE_REGEX.exec(e)}function parsed(e){var t=PARSE_REGEX.exec(e);return t?{date:e,time:"",year:parseInt(t[1],10),month:parseInt(t[2],10),day:parseInt(t[4],10)||1,hour:parseInt(t[6],10)||0,minute:parseInt(t[8],10)||0,weekday:0,doy:0,workweek:0,hasDay:!!t[4],hasTime:!(!t[6]||!t[8]),past:!1,current:!1,future:!1,disabled:!1}:null}function parseTimestamp(e,t){var a=parsed(e);return null===a?null:(updateFormatted(a),t&&updateRelative(a,t,a.hasTime),a)}function parseDate(e){return updateFormatted({date:"",time:"",year:e.getFullYear(),month:e.getMonth()+1,day:e.getDate(),weekday:e.getDay(),hour:e.getHours(),minute:e.getMinutes(),doy:0,workweek:0,hasDay:!0,hasTime:!0,past:!1,current:!0,future:!1,disabled:!1})}function getDayIdentifier(e){return 1e4*e.year+100*e.month+e.day}function getTimeIdentifier(e){return 100*e.hour+e.minute}function updateRelative(e,t,a){void 0===a&&(a=!1);var r=getDayIdentifier(t),n=getDayIdentifier(e),s=r===n;return e.hasTime&&a&&s&&(s=(r=getTimeIdentifier(t))===(n=getTimeIdentifier(e))),e.past=n<r,e.current=s,e.future=n>r,e}function updateMinutes(e,t,a){return e.hasTime=!0,e.hour=Math.floor(t/MINUTES_IN_HOUR),e.minute=t%MINUTES_IN_HOUR,e.time=getTime(e),a&&updateRelative(e,a,!0),e}function updateWeekday(e){return e.weekday=getWeekday(e),e}function updateDayOfYear(e){return e.doy=getDayOfYear(e),e}function updateDisabled(e,t){if(Array.isArray(t)&&0!==t.length){var a=getDayIdentifier(e);for(var r in t){if(getDayIdentifier(parseTimestamp(t[r]+" 00:00"))===a){e.disabled=!0;break}}}}function updateFormatted(e){return e.time=getTime(e),e.date=getDate(e),e.weekday=getWeekday(e),e.doy=getDayOfYear(e),e.workweek=getWorkWeek(e),e}function getDayOfYear(e){if(0!==e.year){var t=new Date(Date.UTC(e.year,e.month-1,e.day,0,0));return date.getDayOfYear(t)}}function getWorkWeek(e){if(0!==e.year){var t=new Date(Date.UTC(e.year,e.month-1,e.day,0,0));return date.getWeekOfYear(t)}}function getWeekday(e){if(e.hasDay){var t=Math.floor,a=e.day,r=(e.month+9)%MONTH_MAX+1,n=t(e.year/100),s=e.year%100-(e.month<=2?1:0);return((a+t(2.6*r-.2)-2*n+s+t(s/4)+t(n/4))%7+7)%7}return e.weekday}function isLeapYear(e){return e%4==0&&e%100!=0||e%400==0}function daysInMonth(e,t){return isLeapYear(e)?DAYS_IN_MONTH_LEAP[t]:DAYS_IN_MONTH[t]}function copyTimestamp(e){return Object.assign({},e)}function padNumber(e,t){for(var a=String(e);a.length<t;)a="0"+a;return a}function getDate(e){var t=padNumber(e.year,4)+"-"+padNumber(e.month,2);return e.hasDay&&(t+="-"+padNumber(e.day,2)),t}function getTime(e){return e.hasTime?padNumber(e.hour,2)+":"+padNumber(e.minute,2):""}function nextDay(e){return++e.day,e.weekday=(e.weekday+1)%DAYS_IN_WEEK,e.day>DAYS_IN_MONTH_MIN&&e.day>daysInMonth(e.year,e.month)&&(e.day=DAY_MIN,++e.month,e.month>MONTH_MAX&&(e.month=MONTH_MIN,++e.year)),e}function prevDay(e){return e.day--,e.weekday=(e.weekday+6)%DAYS_IN_WEEK,e.day<DAY_MIN&&(e.month--,e.month<MONTH_MIN&&(e.year--,e.month=MONTH_MAX),e.day=daysInMonth(e.year,e.month)),e}function relativeDays(e,t,a,r){for(void 0===t&&(t=nextDay),void 0===a&&(a=1),void 0===r&&(r=[0,1,2,3,4,5,6]);--a>=0;)t(e),r.length<7&&!r.includes(e.weekday)&&++a;return e}function findWeekday(e,t,a,r){for(void 0===a&&(a=nextDay),void 0===r&&(r=6);e.weekday!==t&&--r>=0;)a(e);return e}function getWeekdaySkips(e){for(var t=[1,1,1,1,1,1,1],a=[0,0,0,0,0,0,0],r=0;r<e.length;++r)a[e[r]]=1;for(var n=0;n<DAYS_IN_WEEK;++n){for(var s=1,i=1;i<DAYS_IN_WEEK;++i){if(a[(n+i)%DAYS_IN_WEEK])break;++s}t[n]=a[n]*s}return t}function createDayList(e,t,a,r,n,s,i){void 0===n&&(n=[]),void 0===s&&(s=42),void 0===i&&(i=0);var o=getDayIdentifier(t),d=[],l=copyTimestamp(e),u=0,c=u===o;if(o<getDayIdentifier(e))return d;for(;(!c||d.length<i)&&d.length<s&&(u=getDayIdentifier(l),!(c=c||u>o));)if(0!==r[l.weekday]){var h=copyTimestamp(l);updateFormatted(h),updateRelative(h,a),updateDisabled(h,n),d.push(h),l=relativeDays(l,nextDay)}else l=nextDay(l);return d}function createIntervalList(e,t,a,r,n){for(var s=[],i=0;i<r;++i){var o=(t+i)*a,d=copyTimestamp(e);s.push(updateMinutes(d,o,n))}return s}function createNativeLocaleFormatter(e,t){return"undefined"==typeof Intl||void 0===Intl.DateTimeFormat?function(e,t){return""}:function(a,r){try{return new Intl.DateTimeFormat(e||void 0,t(a,r)).format(new Date(Date.UTC(a.year,a.month-1,a.day,a.hour,a.minute)))}catch(e){return""}}}function validateNumber(e){return isFinite(parseInt(e,10))}var Times={name:"Times",props:{now:{type:String,validator:function(e){return""===e||validateTimestamp(e)}}},data:function(){return{times:{now:parseTimestamp("0000-00-00 00:00"),today:parseTimestamp("0000-00-00")}}},computed:{parsedNow:function(){return this.now?parseTimestamp(this.now):null}},watch:{parsedNow:"updateCurrent"},created:function(){this.updateCurrent(),this.setCurrent()},methods:{setCurrent:function(){this.times.now.current=this.times.today.current=!0,this.times.now.past=this.times.today.past=!1,this.times.now.future=this.times.today.future=!1},updateCurrent:function(){var e=this.parsedNow||this.getNow();this.updateDay(e,this.times.now),this.updateTime(e,this.times.now),this.updateDay(e,this.times.today)},getNow:function(){return parseDate(new Date)},updateDay:function(e,t){e.date!==t.date&&(t.year=e.year,t.month=e.month,t.day=e.day,t.weekday=e.weekday,t.date=e.date)},updateTime:function(e,t){e.time!==t.time&&(t.hour=e.hour,t.minute=e.minute,t.time=e.time)}}},Mouse={name:"Mouse",methods:{getDefaultMouseEventHandlers:function(e,t){var a;return this.getMouseEventHandlers(((a={})["click"+e]={event:"click"},a["contextmenu"+e]={event:"contextmenu",prevent:!0,result:!1},a["mousedown"+e]={event:"mousedown"},a["mousemove"+e]={event:"mousemove"},a["mouseup"+e]={event:"mouseup"},a["mouseenter"+e]={event:"mouseenter"},a["mouseleave"+e]={event:"mouseleave"},a["touchstart"+e]={event:"touchstart"},a["touchmove"+e]={event:"touchmove"},a["touchend"+e]={event:"touchend"},a),t)},getMouseEventHandlers:function(e,t){var a=this,r={},n=function(n){var s=e[n];if(a.$listeners[n]){var i=(s.passive?"&":(s.once?"~":"")+(s.capture?"!":""))+s.event,o=function(e){var r=e;return(void 0===s.button||r.buttons>0&&r.button===s.button)&&(s.prevent&&e.preventDefault(),s.stop&&e.stopPropagation(),a.$emit(n,t(e))),s.result};i in r?Array.isArray(r[i])?r[i].push(o):r[i]=[r[i],o]:r[i]=o}};for(var s in e)n(s);return r}}},version$1="1.0.5",CSS_COLOR_NAMES=["transparent","aliceblue","antiquewhite","aqua","aquamarine","azure","beige","bisque","black","blanchedalmond","blue","blueviolet","brown","burlywood","cadetblue","chartreuse","chocolate","coral","cornflowerblue","cornsilk","crimson","cyan","darkblue","darkcyan","darkgoldenrod","darkgray","darkgrey","darkgreen","darkkhaki","darkmagenta","darkolivegreen","darkorange","darkorchid","darkred","darksalmon","darkseagreen","darkslateblue","darkslategray","darkslategrey","darkturquoise","darkviolet","deeppink","deepskyblue","dimgray","dimgrey","dodgerblue","firebrick","floralwhite","forestgreen","fuchsia","gainsboro","ghostwhite","gold","goldenrod","gray","grey","green","greenyellow","honeydew","hotpink","indianred","indigo","ivory","khaki","lavender","lavenderblush","lawngreen","lemonchiffon","lightblue","lightcoral","lightcyan","lightgoldenrodyellow","lightgray","lightgrey","lightgreen","lightpink","lightsalmon","lightseagreen","lightskyblue","lightslategray","lightslategrey","lightsteelblue","lightyellow","lime","limegreen","linen","magenta","maroon","mediumaquamarine","mediumblue","mediumorchid","mediumpurple","mediumseagreen","mediumslateblue","mediumspringgreen","mediumturquoise","mediumvioletred","midnightblue","mintcream","mistyrose","moccasin","navajowhite","navy","oldlace","olive","olivedrab","orange","orangered","orchid","palegoldenrod","palegreen","paleturquoise","palevioletred","papayawhip","peachpuff","peru","pink","plum","powderblue","purple","red","rosybrown","royalblue","saddlebrown","salmon","sandybrown","seagreen","seashell","sienna","silver","skyblue","slateblue","slategray","slategrey","snow","springgreen","steelblue","tan","teal","thistle","tomato","turquoise","violet","wheat","white","whitesmoke","yellow","yellowgreen"],QColorizeMixin={name:"QColorizeMixin",props:{color:String},methods:{isNamedCssColor:function(e){return!!e&&CSS_COLOR_NAMES.includes(e.toLowerCase())},isCssColor:function(e){return!!e&&(!!e.match(/^(#|(rgb|hsl)a?\()/)||this.isNamedCssColor(e))},isCssVar:function(e){return!!e&&e.startsWith("--")},calculateColor:function(e,t){return void 0===t&&(t="black"),void 0===e&&void 0!==t?this.calculateColor(t):this.isCssColor(e)?e:this.makeQuasarColorVar(e,t)},makeQuasarColorVar:function(e,t){return"var("+(this.isCssVar(e)?e:"--q-color-"+e)+", '"+t+"')"},isValidCssColor:function(e){return this.isCssColor(e)||this.isCssVar(e)},setBothColors:function(e,t,a){return void 0===a&&(a={}),this.setTextColor(e,this.setBackgroundColor(t,a))},setBackgroundColor:function(e,t){var a;if(void 0===t&&(t={}),this.isValidCssColor(e)){var r=this.calculateColor(e);void 0===t.style&&(t.style={}),t.style=Object.assign({},t.style,{"background-color":""+r})}else if(e){var n=e.toString().trim();void 0===t.class&&(t.class={}),t.class=Object.assign({},t.class,((a={})["bg-"+n]=!0,a))}return t},setTextColor:function(e,t){var a;if(void 0===t&&(t={}),this.isValidCssColor(e)){var r=this.calculateColor(e);void 0===t.style&&(t.style={}),t.style=Object.assign({},t.style,{color:""+r,"caret-color":""+r})}else if(e){var n=e.toString().trim();void 0===t.class&&(t.class={}),t.class=Object.assign({},t.class,((a={})["text-"+n]=!0,a))}return t},setBorderColor:function(e,t){var a;if(void 0===t&&(t={}),this.isValidCssColor(e)){var r=this.calculateColor(e);void 0===t.style&&(t.style={}),t.style=Object.assign({},t.style,{"border-color":""+r})}else if(e){var n=e.toString().trim();void 0===t.class&&(t.class={}),t.class=Object.assign({},t.class,((a={})["border-"+n]=!0,a))}return t}}};QColorizeMixin.version=version$1;var version$2="1.0.0",QThemeMixin={name:"QThemeMixin",props:{theme:{type:Object,default:function(){}},enableTheme:Boolean},methods:{useDefaultTheme:function(e,t,a){return void 0===a&&(a={}),a},getThemeColors:function(e){var t=this;void 0===e&&(e=[]);var a=new Map;return!0===this.enableTheme&&void 0!==this.theme&&e.forEach(function(e){a.set(e,t.theme[e])}),a}}};function validateView(e){return["month","week","day","2day","3day","4day","5day","6day","month-scheduler","week-scheduler","custom-scheduler","scheduler","day-scheduler","2day-scheduler","3day-scheduler","4day-scheduler","5day-scheduler","6day-scheduler","month-agenda","week-agenda","custom-agenda","agenda","day-agenda","2day-agenda","3day-agenda","4day-agenda","5day-agenda","6day-agenda","month-interval","custom-interval"].includes(e)}QThemeMixin.version=version$2;var props={base:{weekdays:{type:Array,default:function(){return[0,1,2,3,4,5,6]}},disabledDays:Array,hideHeader:Boolean,noScroll:Boolean,shortWeekdayLabel:Boolean,noDefaultHeaderText:Boolean,noDefaultHeaderBtn:Boolean,locale:{type:String,default:"en-us"},animated:Boolean,transitionPrev:{type:String,default:"slide-right"},transitionNext:{type:String,default:"slide-left"},dragOverFunc:{type:Function},dropFunc:{type:Function}},intervals:{maxDays:{type:Number,default:7},shortIntervalLabel:Boolean,intervalHeight:{type:[Number,String],default:40,validator:validateNumber},intervalMinutes:{type:[Number,String],default:60,validator:validateNumber},intervalStart:{type:[Number,String],default:0,validator:validateNumber},intervalCount:{type:[Number,String],default:24,validator:validateNumber},intervalStyle:{type:Function,default:null},showIntervalLabel:{type:Function,default:null},hour24Format:Boolean,columnHeaderBefore:Boolean,columnHeaderAfter:Boolean,columnCount:{type:[Number,String],default:1,validator:validateNumber},columnIndexStart:{type:[Number,String],default:0,validator:validateNumber}},weeks:{dayHeight:{type:[Number,String],default:0,validator:validateNumber},dayStyle:{type:Function,default:null},dayPadding:String,minWeeks:{type:[Number,String],validator:validateNumber,default:1},shortMonthLabel:Boolean,showWorkWeeks:Boolean,showMonthLabel:{type:Boolean,default:!0},showDayOfYearLabel:Boolean,selectedStartEndDates:{type:Array,default:function(){return[]},validator:function(e){return e.length<=2}}},scheduler:{resources:Array,resourceKey:{type:String,default:"label"},maxDays:{type:Number,default:7},resourceHeight:{type:[Number,String],default:70,validator:validateNumber},resourceWidth:{type:[Number,String],validator:function(e){return void 0===e||validateNumber(e)}},resourceStyle:{type:Function,default:null},columnHeaderBefore:Boolean,columnHeaderAfter:Boolean,columnCount:{type:[Number,String],default:1,validator:validateNumber},columnIndexStart:{type:[Number,String],default:0,validator:validateNumber}},calendar:{view:{type:String,default:"month",validator:validateView},value:{type:String,validator:function(e){return""===e||validateTimestamp(e)}}}},CalendarBase={name:"CalendarBase",mixins:[QColorizeMixin,QThemeMixin,Mouse,Times],props:Object.assign({},props.base,{start:{type:String,validator:validateTimestamp,default:function(){return parseDate(new Date).date}},end:{type:String,validator:validateTimestamp,default:"0000-00-00"}}),data:function(){return{keyValue:"YYYY-mm-dd",direction:"next"}},computed:{weekdaySkips:function(){return getWeekdaySkips(this.weekdays)},parsedStart:function(){return parseTimestamp(this.start)},parsedEnd:function(){return parseTimestamp(this.end)},days:function(){return createDayList(this.parsedStart,this.parsedEnd,this.times.today,this.weekdaySkips,this.disabledDays)},dayFormatter:function(){var e={timeZone:"UTC",day:"numeric"};return createNativeLocaleFormatter(this.locale,function(t,a){return e})},weekdayFormatter:function(){var e={timeZone:"UTC",weekday:"long"},t={timeZone:"UTC",weekday:"short"};return createNativeLocaleFormatter(this.locale,function(a,r){return r?t:e})}},methods:{getRelativeClasses:function(e,t){return void 0===t&&(t=!1),{"q-current-day":e.current,"q-past-day":e.past,"q-future-day":e.future,"q-outside":t}},getStartOfWeek:function(e){return getStartOfWeek(e,this.weekdays,this.times.today)},getEndOfWeek:function(e){return getEndOfWeek(e,this.weekdays,this.times.today)},dayStyleDefault:function(e){}}};function convertToUnit(e,t){return void 0===t&&(t="px"),null==e||""===e?void 0:isNaN(e)?String(e):""+Number(e)+t}var QCalendarWeekly={name:"QCalendarWeekly",mixins:[CalendarBase],props:props.weeks,computed:{staticClass:function(){return"q-calendar-weekly"},parsedMinWeeks:function(){return parseInt(this.minWeeks,10)},days:function(){var e=this.parsedMinWeeks*this.weekdays.length;return createDayList(this.getStartOfWeek(this.parsedStart),this.getEndOfWeek(this.parsedEnd),this.times.today,this.weekdaySkips,this.disabledDays,Number.MAX_SAFE_INTEGER,e)},todayWeek:function(){var e=this.times.today;return createDayList(this.getStartOfWeek(e),this.getEndOfWeek(e),e,this.weekdaySkips,this.disabledDays,this.weekdays.length,this.weekdays.length)},monthFormatter:function(){var e={timeZone:"UTC",month:"long"},t={timeZone:"UTC",month:"short"};return createNativeLocaleFormatter(this.locale,function(a,r){return r?t:e})},styles:function(){var e={};if(this.dayHeight>0){var t=convertToUnit(this.dayHeight);e.height=t}return void 0!==this.dayPadding&&(e.padding=this.dayPadding),e}},methods:{isOutside:function(e){var t=getDayIdentifier(e);return t<getDayIdentifier(this.parsedStart)||t>getDayIdentifier(this.parsedEnd)},isCurrentWeek:function(e){for(var t=0;t<e.length;++t)if(!0===e[t].current)return{timestamp:e[t]};return{timestamp:!1}},__renderHead:function(e){return e("div",{staticClass:"q-calendar-weekly__head"},[!0===this.showWorkWeeks&&this.__renderWorkWeekHead(e),this.__renderHeadDays(e)])},__renderWorkWeekHead:function(e){var t,a,r=new Map,n=this.useDefaultTheme;return!0===this.enableTheme&&(t="colorHeader",a="backgroundHeader",r=this.getThemeColors([t,a]),n=this.setBothColors),e("div",n(r.get(t),r.get(a),{staticClass:"q-calendar-weekly__head-workweek"}),"#")},__renderHeadDays:function(e){var t=this;return this.todayWeek.map(function(a,r){return t.__renderHeadDay(e,a,r)})},__renderHeadDay:function(e,t,a){var r,n,s=this.isOutside(this.days[a]),i=new Map,o=this.useDefaultTheme;return!0===this.enableTheme&&(s?(r="colorHeaderOutside",n="backgroundHeaderOutside"):(r="colorHeader",n="backgroundHeader"),i=this.getThemeColors([r,n]),o=this.setBothColors),e("div",o(i.get(r),i.get(n),{key:t.date,staticClass:"ellipsis q-calendar-weekly__head-weekday",class:this.getRelativeClasses(t,s)}),[this.__renderHeadDayLabel(e,t,this.shortWeekdayLabel)])},__renderHeadDayLabel:function(e,t,a){return e("span",{staticClass:"ellipsis"},this.weekdayFormatter(t,a))},__renderWeeks:function(e){for(var t=this.days,a=this.weekdays.length,r=[],n=0;n<t.length;n+=a)r.push(this.__renderWeek(e,t.slice(n,n+a)));return r},__renderWeek:function(e,t){var a=this;return e("div",{key:t[0].date,staticClass:"q-calendar-weekly__week"},[!0===this.showWorkWeeks&&this.__renderWorkWeekGutter(e,t),t.map(function(t){return a.__renderDay(e,t)})])},__renderWorkWeekGutter:function(e,t){var a,r,n=this.$scopedSlots.workweek,s=t.length>2?t[2]:t[0],i=this.isCurrentWeek(t).timestamp,o=i&&!0===i.current?this.color:void 0,d=convertToUnit(this.dayHeight),l=new Map,u=this.useDefaultTheme;!0===this.enableTheme&&(i&&!0===i.current||!0===s.current?(a="colorWorkWeekCurrent",r="backgroundWorkWeekCurrent"):i&&!0===i.past||!0===s.past?(a="colorWorkWeekPast",r="backgroundWorkWeekPast"):(i&&!0===i.future||!0===s.future)&&(a="colorWorkWeekFuture",r="backgroundWorkWeekFuture"),l=this.getThemeColors([a,r]),u=this.setBothColors);var c=Number(s.workweek).toLocaleString(this.locale);return e("div",u(void 0!==o?o:l.get(a),l.get(r),{key:s.workweek,staticClass:"q-calendar-weekly__workweek",class:this.getRelativeClasses(!1!==i?i:s,!1),style:{height:this.dayHeight&&this.dayHeight>0?d:"auto"}}),n?n({workweekLabel:c,week:t}):c)},__renderDay:function(e,t){var a,r,n,s=this,i=this.dayStyle||this.dayStyleDefault,o=this.isOutside(t),d=this.$scopedSlots.day,l=Object.assign({},{outside:o},t),u=!1===o&&this.days.find(function(e){return e.month===t.month}).day===t.day&&!0===this.showMonthLabel,c=new Map,h=this.useDefaultTheme;!0===this.enableTheme&&(!0===o?(r="colorBodyOutside",n="backgroundBodyOutside"):!0===t.past?(r="colorBodyPast",n="backgroundBodyPast"):!0===t.current?(r="colorBodyCurrent",n="backgroundBodyCurrent"):!0===t.future&&(r="colorBodyFuture",n="backgroundBodyFuture"),c=this.getThemeColors([r,n]),h=this.setBothColors);var y=Object.assign({},this.styles);return y=Object.assign(y,i(t)),e("div",h(c.get(r),c.get(n),{key:t.date,staticClass:"q-calendar-weekly__day",class:Object.assign({},this.getRelativeClasses(t,o),{"q-calendar-weekly__day--droppable":a}),style:y,domProps:{ondragover:function(e){void 0!==s.dragOverFunc&&(a=s.dragOverFunc(e,t,"day"))},ondrop:function(e){void 0!==s.dropFunc&&s.dropFunc(e,t,"day")}},on:this.getDefaultMouseEventHandlers(":day",function(e){return t})}),[this.__renderDayLabel(e,t),this.showDayOfYearLabel&&!u?this.__renderDayOfYearLabel(e,t):"",u?this.__renderDayMonth(e,t):"",d?d(l):""])},__renderDayLabel:function(e,t){var a,r,n=this.isOutside(t),s=!0===t.current?this.color:void 0,i=this.$scopedSlots["day-label"],o=new Map,d=this.useDefaultTheme;!0===this.enableTheme&&(!0===n?(a="colorDayLabelOutside",r="backgroundDayLabelOutside"):!0===t.past?(a="colorDayLabelPast",r="backgroundDayLabelPast"):!0===t.current?(a="colorDayLabelCurrent",r="backgroundDayLabelCurrent"):!0===t.future&&(a="colorDayLabelFuture",r="backgroundDayLabelFuture"),o=this.getThemeColors([a,r]),d=this.setBothColors);var l=this.dayFormatter(t,!1);return e(QBtn,d(void 0!==s?s:o.get(a),o.get(r),{staticClass:"q-calendar-weekly__day-label",props:{unelevated:!0,round:!0,dense:!0,noCaps:!0,outline:!0===t.current,disable:t.disabled},on:this.getMouseEventHandlers({"click:date":{event:"click",stop:!0},"contextmenu:date":{event:"contextmenu",stop:!0,prevent:!0,result:!1}},function(e){return t})}),i?i(Object.assign({},{dayLabel:l},t)):l)},__renderDayOfYearLabel:function(e,t){var a=!0===t.current?this.color:void 0,r=this.$scopedSlots["day-of-year"];return e("div",this.setTextColor(a,{staticClass:"q-calendar-weekly__day-month--day-of-year"}),r?r(t):t.doy)},__renderDayMonth:function(e,t){var a=!0===t.current?this.color:void 0,r=this.$scopedSlots["month-label"],n=this.monthFormatter(t,this.shortMonthLabel);return e("div",this.setTextColor(a,{staticClass:"q-calendar-weekly__day-month"}),r?r(Object.assign({},{monthLabel:n},t)):n)}},render:function(e){return e("div",{staticClass:this.staticClass,nativeOn:{dragstart:function(e){e.preventDefault()}}},[!this.hideHeader&&this.__renderHead(e)].concat(this.__renderWeeks(e)))}},QCalendarMonthly={name:"QCalendarMonthly",mixins:[QCalendarWeekly],computed:{staticClass:function(){return"q-calendar-weekly"},parsedStart:function(){return getStartOfMonth(parseTimestamp(this.start))},parsedEnd:function(){return getEndOfMonth(parseTimestamp(this.end))}}},Resize={name:"resize",inserted:function(e,t){var a=t.value,r=t.options||{passive:!0};window.addEventListener("resize",a,r),e._onResize={callback:a,options:r},t.modifiers&&t.modifiers.quiet||a()},unbind:function(e){if(e._onResize){var t=e._onResize,a=t.callback,r=t.options;window.removeEventListener("resize",a,r),delete e._onResize}}},CalendarIntervals={name:"CalendarWithIntervals",mixins:[CalendarBase],props:Object.assign({},props.intervals),computed:{parsedIntervalStart:function(){return parseInt(this.intervalStart,10)},parsedIntervalMinutes:function(){return parseInt(this.intervalMinutes,10)},parsedIntervalCount:function(){return parseInt(this.intervalCount,10)},parsedIntervalHeight:function(){return parseFloat(this.intervalHeight)},startMinute:function(){return this.parsedIntervalStart*this.parsedIntervalMinutes},bodyHeight:function(){return this.parsedIntervalCount*this.parsedIntervalHeight},days:function(){return createDayList(this.parsedStart,this.parsedEnd,this.times.today,this.weekdaySkips,this.disabledDays,this.maxDays)},intervals:function(){var e=this.days,t=this.parsedIntervalStart,a=this.parsedIntervalMinutes,r=this.parsedIntervalCount,n=this.times.now;return 0===e.length&&console.error("QCalendar: days array has no content"),e.map(function(e){return createIntervalList(e,t,a,r,n)})},intervalFormatter:function(){var e={timeZone:"UTC",hour12:!this.hour24Format,hour:"2-digit",minute:"2-digit"},t={timeZone:"UTC",hour12:!this.hour24Format,hour:"numeric",minute:"2-digit"},a={timeZone:"UTC",hour12:!this.hour24Format,hour:"numeric"};return createNativeLocaleFormatter(this.locale,function(r,n){return n?0===r.minute?a:t:e})}},methods:{showIntervalLabelDefault:function(e){var t=this.intervals[0][0];return!(t.hour===e.hour&&t.minute===e.minute)&&0===e.minute},intervalStyleDefault:function(e){},getTimestampAtEvent:function(e,t){var a=copyTimestamp(t),r=e.currentTarget.getBoundingClientRect(),n=this.startMinute,s=e,i=e,o=s.changedTouches||s.touches,d=((o&&o[0]?o[0].clientY:i.clientY)-r.top)/this.parsedIntervalHeight;return updateMinutes(a,n+Math.floor(d*this.parsedIntervalMinutes),this.times.now)},getScopeForSlot:function(e,t){var a=copyTimestamp(e);return a.timeStartPos=this.timeStartPos,a.timeDurationHeight=this.timeDurationHeight,void 0!==t&&(a.index=t),a},scrollToTime:function(e){var t=this.timeStartPos(e),a=this.$refs.scrollArea;return!(!1===t||!a)&&(a.scrollTop=t,!0)},timeDurationHeight:function(e){return e/this.parsedIntervalMinutes*this.parsedIntervalHeight},timeStartPos:function(e,t){void 0===t&&(t=!0);var a=parseTime(e);if(!1===a)return!1;var r=(a-this.startMinute)/(this.parsedIntervalCount*this.parsedIntervalMinutes)*this.bodyHeight;return t&&(r<0&&(r=0),r>this.bodyHeight&&(r=this.bodyHeight)),r}}},QCalendarDaily={name:"QCalendarDaily",mixins:[CalendarIntervals],directives:{Resize:Resize},data:function(){return{scrollWidth:0}},computed:{classes:function(){return{"q-calendar-daily":!0}}},mounted:function(){this.init()},watch:{noScroll:function(e){!0===e?this.scrollWidth=0:this.$nextTick(this.onResize)}},methods:{init:function(){this.$nextTick(this.onResize)},onResize:function(){this.scrollWidth=this.getScrollWidth()},getScrollWidth:function(){var e=this.$refs.scrollArea,t=this.$refs.pane;return e&&t?e.offsetWidth-t.offsetWidth:0},__renderHead:function(e){return e("div",{staticClass:"q-calendar-daily__head",style:{marginRight:this.scrollWidth+"px"}},[this.__renderHeadIntervals(e)].concat(this.__renderHeadDays(e)))},__renderHeadIntervals:function(e){var t,a,r=this.$scopedSlots["intervals-header"],n=new Map,s=this.useDefaultTheme;return!0===this.enableTheme&&(t="colorIntervalHeader",a="backgroundIntervalHeader",n=this.getThemeColors([t,a]),s=this.setBothColors),e("div",s(n.get(t),n.get(a),{staticClass:"q-calendar-daily__intervals-head q-calendar-daily__intervals-head--text"}),[r&&r(this.days)])},__renderHeadDays:function(e){var t=this;return 1===this.days.length&&void 0!==this.columnCount&&parseInt(this.columnCount,10)>0?Array.apply(null,new Array(parseInt(this.columnCount,10))).map(function(e,a){return a+parseInt(t.columnIndexStart,10)}).map(function(a){return t.__renderHeadDay(e,t.days[0],a)}):this.days.map(function(a){return t.__renderHeadDay(e,a)})},__renderHeadDay:function(e,t,a){var r,n,s,i=this,o=this.$scopedSlots["day-header"],d=this.getScopeForSlot(t,a),l=100/this.days.length,u=new Map,c=this.useDefaultTheme;return!0===this.enableTheme&&(!0===t.past?(n="colorHeaderPast",s="backgroundHeaderPast"):!0===t.current?(n="colorHeaderCurrent",s="backgroundHeaderCurrent"):!0===t.future&&(n="colorHeaderFuture",s="backgroundHeaderFuture"),u=this.getThemeColors([n,s]),c=this.setBothColors),e("div",c(u.get(n),u.get(s),{key:t.date+(void 0!==a?"-"+a:""),staticClass:"q-calendar-daily__head-day",class:Object.assign({},this.getRelativeClasses(t),{"q-calendar-daily__head-day--droppable":r}),style:{maxWidth:l+"%"},domProps:{ondragover:function(e){void 0!==i.dragOverFunc&&(r=i.dragOverFunc(e,t,"day",a))},ondrop:function(e){void 0!==i.dropFunc&&i.dropFunc(e,t,"day",a)}},on:this.getDefaultMouseEventHandlers(":day",function(e){return d})}),[!0===this.columnHeaderBefore&&this.__renderColumnHeaderBefore(e,t,a),!0!==this.noDefaultHeaderText&&this.__renderHeadWeekday(e,t),!0!==this.noDefaultHeaderBtn&&this.__renderHeadDayBtn(e,t),o&&o(d),!0===this.columnHeaderAfter&&this.__renderColumnHeaderAfter(e,t,a)])},__renderHeadWeekday:function(e,t){var a,r,n=!0===t.current?this.color:void 0,s=new Map,i=this.useDefaultTheme;return!0===this.enableTheme&&(!0===t.past?(a="colorDayLabelPast",r="backgroundDayLabelPast"):!0===t.current?(a="colorDayLabelCurrent",r="backgroundDayLabelCurrent"):!0===t.future&&(a="colorDayLabelFuture",r="backgroundDayLabelFuture"),s=this.getThemeColors([a,r]),i=this.setBothColors),e("div",i(void 0!==n?n:s.get(a),s.get(r),{staticClass:"ellipsis q-calendar-daily__head-weekday"}),[this.__renderHeadDayLabel(e,t,this.shortWeekdayLabel)])},__renderHeadDayLabel:function(e,t,a){return e("span",{staticClass:"ellipsis"},this.weekdayFormatter(t,a))},__renderHeadDayBtn:function(e,t){var a,r,n=!0===t.current?this.color:void 0,s=new Map,i=this.useDefaultTheme;return!0===this.enableTheme&&(!0===t.past?(a="colorDayLabelPast",r="backgroundDayLabelPast"):!0===t.current?(a="colorDayLabelCurrent",r="backgroundDayLabelCurrent"):!0===t.future&&(a="colorDayLabelFuture",r="backgroundDayLabelFuture"),s=this.getThemeColors([a,r]),i=this.setBothColors),e(QBtn,i(void 0!==n?n:s.get(a),s.get(r),{staticClass:"q-calendar-daily__head-day-label",style:{color:!0===t.current?n:void 0},props:{unelevated:!0,round:!0,dense:!0,noCaps:!0,outline:!0===t.current,disable:t.disabled},on:this.getMouseEventHandlers({"click:date":{event:"click",stop:!0},"contextmenu:date":{event:"contextmenu",stop:!0,prevent:!0,result:!1}},function(e){return t})}),this.dayFormatter(t,!1))},__renderColumnHeaderBefore:function(e,t,a){var r=this.$scopedSlots["column-header-before"],n=Object.assign({},t);return n.index=a,e("div",{staticClass:"q-calendar-daily__column-header--before"},[r&&r(n)])},__renderColumnHeaderAfter:function(e,t,a){var r=this.$scopedSlots["column-header-after"],n=Object.assign({},t);return n.index=a,e("div",{staticClass:"q-calendar-daily__column-header--after"},[r&&r(n)])},__renderBody:function(e){return e("div",{staticClass:"q-calendar-daily__body"},[this.__renderScrollArea(e)])},__renderScrollArea:function(e){return void 0!==this.noScroll&&!0===this.noScroll?this.__renderPane(e):e("div",{ref:"scrollArea",staticClass:"q-calendar-daily__scroll-area"},[this.__renderPane(e)])},__renderPane:function(e){return e("div",{ref:"pane",staticClass:"q-calendar-daily__pane",style:{height:convertToUnit(this.bodyHeight)}},[this.__renderDayContainer(e)])},__renderDayContainer:function(e){var t=this.$scopedSlots["day-container"];return e("div",{staticClass:"q-calendar-daily__day-container"},[this.__renderBodyIntervals(e)].concat(this.__renderDays(e),[t&&t(this.days)]))},__renderDays:function(e){var t=this;return 1===this.days.length&&this.columnCount&&parseInt(this.columnCount,10)>0?Array.apply(null,new Array(parseInt(this.columnCount,10))).map(function(e,a){return a+parseInt(t.columnIndexStart,10)}).map(function(a){return t.__renderDay(e,t.days[0],0,a)}):this.days.map(function(a,r){return t.__renderDay(e,a,r)})},__renderDay:function(e,t,a,r){var n,s,i=this,o=this.$scopedSlots["day-body"],d=this.getScopeForSlot(t,r),l=100/this.days.length,u=new Map,c=this.useDefaultTheme;return!0===this.enableTheme&&(!0===t.past?(n="colorBodyPast",s="backgroundBodyPast"):!0===t.current?(n="colorBodyCurrent",s="backgroundBodyCurrent"):!0===t.future&&(n="colorBodyFuture",s="backgroundBodyFuture"),u=this.getThemeColors([n,s]),c=this.setBothColors),e("div",c(u.get(n),u.get(s),{key:t.date+(void 0!==r?":"+r:""),staticClass:"q-calendar-daily__day",class:this.getRelativeClasses(t),style:{maxWidth:l+"%"},on:this.getDefaultMouseEventHandlers(":time",function(e){return i.getScopeForSlot(i.getTimestampAtEvent(e,t),r)})}),this.__renderDayIntervals(e,a,r).concat([o&&o(d)]))},__renderDayIntervals:function(e,t,a){var r=this;return this.intervals[t].map(function(t){return r.__renderDayInterval(e,t,a)})},__renderDayInterval:function(e,t,a){var r,n=this,s=convertToUnit(this.intervalHeight),i=this.intervalStyle||this.intervalStyleDefault,o=this.$scopedSlots.interval,d=this.getScopeForSlot(t,a);return e("div",{key:t.time,staticClass:"q-calendar-daily__day-interval",class:{"q-calendar-daily__day-interval--droppable":r},style:Object.assign({},{height:s},i(t)),domProps:{ondragover:function(e){void 0!==n.dragOverFunc&&(r=n.dragOverFunc(e,t,"interval"))},ondrop:function(e){void 0!==n.dropFunc&&n.dropFunc(e,t,"interval")}}},o?o(d):void 0)},__renderBodyIntervals:function(e){var t,a,r=this,n=new Map,s=this.useDefaultTheme;!0===this.enableTheme&&(t="colorIntervalBody",a="backgroundIntervalBody",n=this.getThemeColors([t,a]),s=this.setBothColors);var i={staticClass:"q-calendar-daily__intervals-body",on:this.getDefaultMouseEventHandlers(":interval",function(e){return r.getTimestampAtEvent(e,r.parsedStart)})};return e("div",s(n.get(t),n.get(a),i),this.__renderIntervalLabels(e))},__renderIntervalLabels:function(e){var t=this;return this.intervals[0].map(function(a){return t.__renderIntervalLabel(e,a)})},__renderIntervalLabel:function(e,t){var a,r,n=convertToUnit(this.intervalHeight),s=this.shortIntervalLabel,i=(this.showIntervalLabel||this.showIntervalLabelDefault)(t)?this.intervalFormatter(t,s):void 0,o=new Map,d=this.useDefaultTheme;return!0===this.enableTheme&&(a="colorIntervalText",r="backgroundIntervalText",o=this.getThemeColors([a,r]),d=this.setBothColors),e("div",{key:t.time,staticClass:"q-calendar-daily__interval",style:{height:n}},[e("div",d(o.get(a),o.get(r),{staticClass:"q-calendar-daily__interval-text"}),i)])}},render:function(e){return e("div",{class:this.classes,directives:[{modifiers:{quiet:!0},name:"resize",value:this.onResize}]},[!this.hideHeader&&this.__renderHead(e),this.__renderBody(e)])}},CalendarScheduler={name:"CalendarWithScheduler",mixins:[CalendarBase],props:Object.assign({},props.scheduler),computed:{parsedResourceHeight:function(){return parseFloat(this.resourceHeight)},parsedResourceWidth:function(){return parseFloat(this.resourceWidth)},bodyHeight:function(){return this.resources&&this.resources.length>0?this.resources.length*this.parsedResourceHeight:0},days:function(){return createDayList(this.parsedStart,this.parsedEnd,this.times.today,this.weekdaySkips,this.disabledDays,this.maxDays)}},methods:{resourceStyleDefault:function(e){},getTimestampAtEvent:function(e,t){return updateRelative(copyTimestamp(t),this.times.now,!1)},getScopeForSlot:function(e,t,a){var r={};return r.day=copyTimestamp(e),void 0!==t&&(r.index=t),void 0!==a&&(r.resource=a),r}}},QCalendarScheduler={name:"QCalendarScheduler",mixins:[CalendarScheduler],directives:{Resize:Resize},data:function(){return{scrollWidth:0}},computed:{classes:function(){return{"q-calendar-scheduler":!0}}},mounted:function(){this.init()},watch:{noScroll:function(e){!0===e?this.scrollWidth=0:this.$nextTick(this.onResize)}},methods:{init:function(){this.$nextTick(this.onResize)},onResize:function(){this.scrollWidth=this.getScrollWidth()},getScrollWidth:function(){var e=this.$refs.scrollArea,t=this.$refs.pane;return e&&t?e.offsetWidth-t.offsetWidth:0},resourceStartPos:function(e,t){void 0===t&&(t=!0);var a=this.resource.indexOf(e)*this.parsedResourceHeight;return t&&(a<0&&(a=0),a>this.bodyHeight&&(a=this.bodyHeight)),a},__renderHead:function(e){return e("div",{staticClass:"q-calendar-scheduler__head",style:{marginRight:this.scrollWidth+"px"}},[this.__renderHeadResources(e)].concat(this.__renderHeadDays(e)))},__renderHeadResources:function(e){var t,a,r=this.$scopedSlots["scheduler-resources-header"],n=convertToUnit(this.resourceWidth),s=new Map,i=this.useDefaultTheme;return!0===this.enableTheme&&(t="colorSchedulerHeader",a="backgroundSchedulerHeader",s=this.getThemeColors([t,a]),i=this.setBothColors),e("div",i(s.get(t),s.get(a),{staticClass:"q-calendar-scheduler__resources-head q-calendar-scheduler__resources-head--text",style:{width:n}}),[r&&r(this.days)])},__renderHeadDays:function(e){var t=this;return 1===this.days.length&&this.columnCount&&parseInt(this.columnCount,10)>0?Array.apply(null,new Array(parseInt(this.columnCount,10))).map(function(e,a){return a+parseInt(t.columnIndexStart,10)}).map(function(a){return t.__renderHeadDay(e,t.days[0],a)}):this.days.map(function(a){return t.__renderHeadDay(e,a)})},__renderHeadDay:function(e,t,a){var r,n,s,i=this,o=this.$scopedSlots["scheduler-day-header"],d=this.getScopeForSlot(t,a),l=100/this.days.length,u=new Map,c=this.useDefaultTheme;return!0===this.enableTheme&&(!0===t.past?(n="colorHeaderPast",s="backgroundHeaderPast"):!0===t.current?(n="colorHeaderCurrent",s="backgroundHeaderCurrent"):!0===t.future&&(n="colorHeaderFuture",s="backgroundHeaderFuture"),u=this.getThemeColors([n,s]),c=this.setBothColors),e("div",c(u.get(n),u.get(s),{key:t.date+(void 0!==a?"-"+a:""),staticClass:"q-calendar-scheduler__head-day",class:Object.assign({},this.getRelativeClasses(t),{"q-calendar-scheduler__head-day--droppable":r}),style:{maxWidth:l+"%"},domProps:{ondragover:function(e){void 0!==i.dragOverFunc&&(r=i.dragOverFunc(e,t,"day",a))},ondrop:function(e){void 0!==i.dropFunc&&i.dropFunc(e,t,"day",a)}},on:this.getDefaultMouseEventHandlers(":day",function(e){return d})}),[!0===this.columnHeaderBefore&&this.__renderColumnHeaderBefore(e,t,a),!0!==this.noDefaultHeaderText&&this.__renderHeadWeekday(e,t,a),!0!==this.noDefaultHeaderBtn&&this.__renderHeadDayBtn(e,t,a),o&&o(d),!0===this.columnHeaderAfter&&this.__renderColumnHeaderAfter(e,t,a)])},__renderHeadWeekday:function(e,t){var a,r,n=!0===t.current?this.color:void 0,s=new Map,i=this.useDefaultTheme;return!0===this.enableTheme&&(!0===t.past?(a="colorDayLabelPast",r="backgroundDayLabelPast"):!0===t.current?(a="colorDayLabelCurrent",r="backgroundDayLabelCurrent"):!0===t.future&&(a="colorDayLabelFuture",r="backgroundDayLabelFuture"),s=this.getThemeColors([a,r]),i=this.setBothColors),e("div",i(void 0!==n?n:s.get(a),s.get(r),{staticClass:"ellipsis q-calendar-scheduler__head-weekday"}),[this.__renderHeadDayLabel(e,t,this.shortWeekdayLabel)])},__renderHeadDayLabel:function(e,t,a){return e("span",{staticClass:"ellipsis"},this.weekdayFormatter(t,a))},__renderHeadDayBtn:function(e,t,a){var r,n,s=!0===t.current?this.color:void 0,i={day:t,idx:a},o=new Map,d=this.useDefaultTheme;return!0===this.enableTheme&&(!0===t.past?(r="colorDayLabelPast",n="backgroundDayLabelPast"):!0===t.current?(r="colorDayLabelCurrent",n="backgroundDayLabelCurrent"):!0===t.future&&(r="colorDayLabelFuture",n="backgroundDayLabelFuture"),o=this.getThemeColors([r,n]),d=this.setBothColors),e(QBtn,d(void 0!==s?s:o.get(r),o.get(n),{staticClass:"q-calendar-scheduler__head-day-label",style:{color:!0===t.current?s:void 0},props:{unelevated:!0,round:!0,dense:!0,noCaps:!0,outline:!0===t.current,disable:t.disabled},on:this.getMouseEventHandlers({"click:date":{event:"click",stop:!0},"contextmenu:date":{event:"contextmenu",stop:!0,prevent:!0,result:!1}},function(e){return i})}),this.dayFormatter(t,!1))},__renderColumnHeaderBefore:function(e,t,a){var r=this.$scopedSlots["scheduler-column-header-before"],n=Object.assign({},t);return n.index=a,e("div",{staticClass:"q-calendar-scheduler__column-header--before"},[r&&r(n)])},__renderColumnHeaderAfter:function(e,t,a){var r=this.$scopedSlots["scheduler-column-header-after"],n=Object.assign({},t);return n.index=a,e("div",{staticClass:"q-calendar-scheduler__column-header--after"},[r&&r(n)])},__renderBody:function(e){return e("div",{staticClass:"q-calendar-scheduler__body"},[this.__renderScrollArea(e)])},__renderScrollArea:function(e){return void 0!==this.noScroll&&!0===this.noScroll?this.__renderPane(e):e("div",{ref:"scrollArea",staticClass:"q-calendar-scheduler__scroll-area"},[this.__renderPane(e)])},__renderPane:function(e){return e("div",{ref:"pane",staticClass:"q-calendar-scheduler__pane",style:{height:convertToUnit(this.bodyHeight)}},[this.__renderDayContainer(e)])},__renderDayContainer:function(e){return e("div",{staticClass:"q-calendar-scheduler__day-container"},[this.__renderBodyResources(e)].concat(this.__renderDays(e)))},__renderDays:function(e){var t=this;return 1===this.days.length&&this.columnCount&&parseInt(this.columnCount,10)>0?Array.apply(null,new Array(parseInt(this.columnCount,10))).map(function(e,a){return a+parseInt(t.columnIndexStart,10)}).map(function(a){return t.__renderDay(e,t.days[0],0,a)}):this.days.map(function(a,r){return t.__renderDay(e,a,r)})},__renderDay:function(e,t,a){var r,n,s=100/this.days.length,i=new Map,o=this.useDefaultTheme;return!0===this.enableTheme&&(!0===t.past?(r="colorBodyPast",n="backgroundBodyPast"):!0===t.current?(r="colorBodyCurrent",n="backgroundBodyCurrent"):!0===t.future&&(r="colorBodyFuture",n="backgroundBodyFuture"),i=this.getThemeColors([r,n]),o=this.setBothColors),e("div",o(i.get(r),i.get(n),{key:t.date+(void 0!==a?":"+a:""),staticClass:"q-calendar-scheduler__day",class:this.getRelativeClasses(t),style:{maxWidth:s+"%"}}),[].concat(this.__renderDayResources(e,t,a)))},__renderDayResources:function(e,t,a){var r=this;return this.resources.map(function(n){return r.__renderDayResource(e,n,t,a)})},__renderDayResource:function(e,t,a,r){var n,s=this,i=convertToUnit(this.resourceHeight),o=this.resourceStyle||this.resourceStyleDefault,d=this.$scopedSlots["scheduler-resource-day"],l=this.getScopeForSlot(a,r,t),u={height:i};return u=Object.assign(u,o(l)),e("div",{key:t[this.resourceKey]+"-"+r,staticClass:"q-calendar-scheduler__day-resource",class:{"q-calendar-scheduler__day-resource--droppable":n},style:u,domProps:{ondragover:function(e){void 0!==s.dragOverFunc&&(n=s.dragOverFunc(e,t,"resource",r))},ondrop:function(e){void 0!==s.dropFunc&&s.dropFunc(e,t,"resource",r)}},on:this.getDefaultMouseEventHandlers(":resource:day",function(e){return s.getScopeForSlot(s.getTimestampAtEvent(e,a),r,t)})},d?d(l):void 0)},__renderBodyResources:function(e){var t,a,r=convertToUnit(this.resourceWidth),n=new Map,s=this.useDefaultTheme;!0===this.enableTheme&&(t="colorSchedulerBody",a="backgroundSchedulerBody",n=this.getThemeColors([t,a]),s=this.setBothColors);var i={staticClass:"q-calendar-scheduler__resources-body",style:{width:r}};return e("div",s(n.get(t),n.get(a),i),this.__renderResourceLabels(e))},__renderResourceLabels:function(e){var t=this;return this.resources.map(function(a,r){return t.__renderResourceLabel(e,a,r)})},__renderResourceLabel:function(e,t,a){var r,n,s=this.$scopedSlots["scheduler-resource"],i={resource:t,index:a},o=convertToUnit(this.resourceHeight),d=t.label,l=new Map,u=this.useDefaultTheme;return!0===this.enableTheme&&(r="colorSchedulerText",n="backgroundSchedulerText",l=this.getThemeColors([r,n]),u=this.setBothColors),e("div",{key:t.label,staticClass:"q-calendar-scheduler__resource",style:{height:o},on:this.getDefaultMouseEventHandlers(":resource",function(e){return i})},[s?s(i):e("div",u(l.get(r),l.get(n),{staticClass:"q-calendar-scheduler__resource-text"}),d)])},__renderResourcesError:function(e){return e("div",{},"No resources have been defined")}},render:function(e){return e("div",{class:this.classes,directives:[{modifiers:{quiet:!0},name:"resize",value:this.onResize}]},[!this.hideHeader&&void 0!==this.resources&&this.__renderHead(e),void 0!==this.resources&&this.__renderBody(e),void 0===this.resources&&this.__renderResourcesError(e)])}},QCalendarAgenda={name:"QCalendarAgenda",mixins:[QCalendarDaily],methods:{__renderHead:function(e){return e("div",{staticClass:"q-calendar-daily__head",style:{marginRight:this.scrollWidth+"px"}},[].concat(this.__renderHeadDays(e)))},__renderPane:function(e){return e("div",{ref:"pane",staticClass:"q-calendar-daily__pane",style:{}},[this.__renderDayContainer(e)])},__renderBodyIntervals:function(e){},__renderDayIntervals:function(e,t,a){return[]},__renderDay:function(e,t,a,r){var n,s,i,o=this,d=this.$scopedSlots["day-body"],l=Object.assign({},t),u=100/this.days.length,c=new Map,h=this.useDefaultTheme;return!0===this.enableTheme&&(!0===t.past?(s="colorBodyPast",i="backgroundBodyPast"):!0===t.current?(s="colorBodyCurrent",i="backgroundBodyCurrent"):!0===t.future&&(s="colorBodyFuture",i="backgroundBodyFuture"),c=this.getThemeColors([s,i]),h=this.setBothColors),e("div",h(c.get(s),c.get(i),{key:t.date+(void 0!==r?":"+r:""),staticClass:"q-calendar-daily__day",class:Object.assign({},this.getRelativeClasses(t),{"q-calendar-daily__day--droppable":n}),style:{maxWidth:u+"%"},domProps:{ondragover:function(e){void 0!==o.dragOverFunc&&(n=o.dragOverFunc(e,t,"day"))},ondrop:function(e){void 0!==o.dropFunc&&o.dropFunc(e,t,"day")}},on:this.getDefaultMouseEventHandlers(":time",function(e){return o.getScopeForSlot(o.getTimestampAtEvent(e,t),r)})}),this.__renderDayIntervals(e,a,r).concat([d&&d(l)]))}},render:function(e){return e("div",{class:this.classes,directives:[{modifiers:{quiet:!0},name:"resize",value:this.onResize}]},[!this.hideHeader&&this.__renderHead(e),this.__renderBody(e)])}},Component={name:"QCalendar",mixins:[CalendarBase],props:Object.assign({},props.calendar,props.weeks,props.intervals,props.scheduler),data:function(){return{lastStart:void 0,lastEnd:void 0}},computed:{parsedValue:function(){return parseTimestamp(this.value)||this.parsedStart||this.times.today},renderProps:function(){var e=this.parsedValue,t="div",a=this.maxDays,r=e,n=e;switch(this.view){case"month":t=QCalendarMonthly,r=getStartOfMonth(e),n=getEndOfMonth(e);break;case"week":case"week-agenda":case"week-scheduler":t=this.view.endsWith("-agenda")?QCalendarAgenda:this.view.endsWith("-scheduler")?QCalendarScheduler:QCalendarDaily,r=this.getStartOfWeek(e),n=this.getEndOfWeek(e),a=this.weekdays.length;break;case"day":case"day-scheduler":case"day-agenda":t=this.view.endsWith("-agenda")?QCalendarAgenda:this.view.endsWith("-scheduler")?QCalendarScheduler:QCalendarDaily,a=1,updateFormatted(n=relativeDays(copyTimestamp(n),nextDay,a,this.weekdays));break;case"2day":case"2day-scheduler":case"2day-agenda":t=this.view.endsWith("-agenda")?QCalendarAgenda:this.view.endsWith("-scheduler")?QCalendarScheduler:QCalendarDaily,a=2,updateFormatted(n=relativeDays(copyTimestamp(n),nextDay,a,this.weekdays));break;case"3day":case"3day-scheduler":case"3day-agenda":t=this.view.endsWith("-agenda")?QCalendarAgenda:this.view.endsWith("-scheduler")?QCalendarScheduler:QCalendarDaily,a=3,updateFormatted(n=relativeDays(copyTimestamp(n),nextDay,a,this.weekdays));break;case"4day":case"4day-scheduler":case"4day-agenda":t=this.view.endsWith("-agenda")?QCalendarAgenda:this.view.endsWith("-scheduler")?QCalendarScheduler:QCalendarDaily,a=4,updateFormatted(n=relativeDays(copyTimestamp(n),nextDay,a,this.weekdays));break;case"5day":case"5day-scheduler":case"5day-agenda":t=this.view.endsWith("-agenda")?QCalendarAgenda:this.view.endsWith("-scheduler")?QCalendarScheduler:QCalendarDaily,a=5,updateFormatted(n=relativeDays(copyTimestamp(n),nextDay,a,this.weekdays));break;case"6day":case"6day-scheduler":case"6day-agenda":t=this.view.endsWith("-agenda")?QCalendarAgenda:this.view.endsWith("-scheduler")?QCalendarScheduler:QCalendarDaily,a=6,updateFormatted(n=relativeDays(copyTimestamp(n),nextDay,a,this.weekdays));break;case"custom-interval":case"custom-scheduler":case"custom-agenda":t=this.view.endsWith("-agenda")?QCalendarAgenda:this.view.endsWith("-scheduler")?QCalendarScheduler:QCalendarDaily,updateFormatted(n=relativeDays(copyTimestamp(n),nextDay,this.maxDays,this.weekdays));break;case"scheduler":case"agenda":t="scheduler"===this.view?QCalendarScheduler:QCalendarAgenda,updateFormatted(n=relativeDays(copyTimestamp(n),nextDay,this.maxDays,this.weekdays));break;case"month-interval":case"month-scheduler":case"month-agenda":t=this.view.endsWith("-agenda")?QCalendarAgenda:this.view.endsWith("-scheduler")?QCalendarScheduler:QCalendarDaily,r=getStartOfMonth(e),updateFormatted(n=getEndOfMonth(e)),a=DAYS_IN_MONTH_MAX}return{component:t,start:r,end:n,maxDays:a}}},watch:{renderProps:"__checkChange"},methods:{__checkChange:function(e,t){var a=this.renderProps,r=a.start,n=a.end;this.keyValue=0,void 0!==this.lastStart&&void 0!==this.lastEnd&&r.date===this.lastStart&&n.date===this.lastEnd||(this.lastStart=r.date,this.lastEnd=n.date,this.$emit("change",{start:r,end:n})),this.keyValue=getDayIdentifier(r)},move:function(e){void 0===e&&(e=1);var t=copyTimestamp(this.parsedValue),a=e>0,r=a?nextDay:prevDay,n=a?DAYS_IN_MONTH_MAX:DAY_MIN,s=a?e:-e;this.direction=a?"next":"prev";this.maxDays;for(var i=this.weekdaySkips.filter(function(e){return 0!==e}).length;--s>=0;)switch(this.view){case"month":t.day=n,r(t);break;case"week":case"week-scheduler":case"week-agenda":relativeDays(t,r,i,this.weekdays);break;case"day":case"day-scheduler":case"day-agenda":relativeDays(t,r,1,this.weekdays);break;case"2day":case"2day-scheduler":case"2day-agenda":relativeDays(t,r,2,this.weekdays);break;case"3day":case"3day-scheduler":case"3day-agenda":relativeDays(t,r,3,this.weekdays);break;case"4day":case"4day-scheduler":case"4day-agenda":relativeDays(t,r,4,this.weekdays);break;case"5day":case"5day-scheduler":case"5day-agenda":relativeDays(t,r,5,this.weekdays);break;case"6day":case"6day-scheduler":case"6day-agenda":relativeDays(t,r,6,this.weekdays);break;case"custom-interval":case"custom-scheduler":case"custom-agenda":case"agenda":relativeDays(t,r,this.maxDays,this.weekdays);break;case"month-interval":case"month-agenda":case"month-scheduler":t.day=n,r(t)}updateWeekday(t),updateFormatted(t),updateDayOfYear(t),updateRelative(t,this.times.now),this.$emit("input",t.date),this.$emit("moved",t)},next:function(e){void 0===e&&(e=1),this.move(e)},prev:function(e){void 0===e&&(e=1),this.move(-e)},timeStartPos:function(e,t){void 0===t&&(t=!0);var a=this.$children[0];return!(!a||!a.timeStartPos)&&a.timeStartPos(e,t)},timeDurationHeight:function(e){var t=this.$children[0];return t&&t.timeDurationHeight?t.timeDurationHeight(e):-1},scrollToTime:function(e){var t=this.$children[0];return!(!t||!t.scrollToTime)&&t.scrollToTime(e)},__renderComponent:function(e,t,a){return e(t,a)}},render:function(e){var t=this,a=this.renderProps,r=a.start,n=a.end,s=a.maxDays,i=a.component,o={staticClass:"q-calendar",key:this.keyValue,props:Object.assign({},this.$props,{start:r.date,end:n.date,maxDays:s}),on:Object.assign({},this.$listeners,{"click:date":function(e){void 0!==t.$listeners.input&&(void 0!==e.date?t.$emit("input",e.date):void 0!==e.day&&void 0!==e.day.date&&t.$emit("input",e.day.date)),t.$listeners["click:date"]&&t.$emit("click:date",e)}}),scopedSlots:this.$scopedSlots};return!0===this.animated?e("transition",{props:{name:"q-transition--"+("prev"===this.direction?this.transitionPrev:this.transitionNext),appear:!0}},[this.__renderComponent(e,i,o)]):this.__renderComponent(e,i,o)}},Plugin={version:version,Component:Component,install:function(e){e.component(Component.name,Component)}};export default Plugin;export{Component,version};
import{date,QBtn}from"quasar";var version="1.3.0",PARSE_REGEX=/^(\d{4})-(\d{1,2})(-(\d{1,2}))?([^\d]+(\d{1,2}))?(:(\d{1,2}))?(:(\d{1,2}))?$/,PARSE_TIME=/(\d\d?)(:(\d\d?)|)(:(\d\d?)|)/,DAYS_IN_MONTH=[0,31,28,31,30,31,30,31,31,30,31,30,31],DAYS_IN_MONTH_LEAP=[0,31,29,31,30,31,30,31,31,30,31,30,31],DAYS_IN_MONTH_MIN=28,DAYS_IN_MONTH_MAX=31,MONTH_MAX=12,MONTH_MIN=1,DAY_MIN=1,DAYS_IN_WEEK=7,MINUTES_IN_HOUR=60;function getStartOfWeek(e,t,a){if(1===e.day)for(;!t.includes(e.weekday);)nextDay(e);var r=copyTimestamp(e);return findWeekday(r,t[0],prevDay,t.length),updateFormatted(r),a&&updateRelative(r,a,r.hasTime),r}function getEndOfWeek(e,t,a){if(daysInMonth(e.year,e.month)===e.day)for(;!t.includes(e.weekday);)prevDay(e);var r=copyTimestamp(e);return findWeekday(r,t[t.length-1],nextDay,t.length),updateFormatted(r),a&&updateRelative(r,a,r.hasTime),r}function getStartOfMonth(e){var t=copyTimestamp(e);return t.day=DAY_MIN,updateFormatted(t),t}function getEndOfMonth(e){var t=copyTimestamp(e);return t.day=daysInMonth(t.year,t.month),updateFormatted(t),t}function parseTime(e){if("number"==typeof e)return e;if("string"==typeof e){var t=PARSE_TIME.exec(e);return!!t&&60*parseInt(t[1],10)+parseInt(t[3]||0,10)}return"object"==typeof e&&("number"==typeof e.hour&&"number"==typeof e.minute&&60*e.hour+e.minute)}function validateTimestamp(e){return!!PARSE_REGEX.exec(e)}function parsed(e){var t=PARSE_REGEX.exec(e);return t?{date:e,time:"",year:parseInt(t[1],10),month:parseInt(t[2],10),day:parseInt(t[4],10)||1,hour:parseInt(t[6],10)||0,minute:parseInt(t[8],10)||0,weekday:0,doy:0,workweek:0,hasDay:!!t[4],hasTime:!(!t[6]||!t[8]),past:!1,current:!1,future:!1,disabled:!1}:null}function parseTimestamp(e,t){var a=parsed(e);return null===a?null:(updateFormatted(a),t&&updateRelative(a,t,a.hasTime),a)}function parseDate(e){return updateFormatted({date:"",time:"",year:e.getFullYear(),month:e.getMonth()+1,day:e.getDate(),weekday:e.getDay(),hour:e.getHours(),minute:e.getMinutes(),doy:0,workweek:0,hasDay:!0,hasTime:!0,past:!1,current:!0,future:!1,disabled:!1})}function getDayIdentifier(e){return 1e4*e.year+100*e.month+e.day}function getTimeIdentifier(e){return 100*e.hour+e.minute}function updateRelative(e,t,a){void 0===a&&(a=!1);var r=getDayIdentifier(t),n=getDayIdentifier(e),s=r===n;return e.hasTime&&a&&s&&(s=(r=getTimeIdentifier(t))===(n=getTimeIdentifier(e))),e.past=n<r,e.current=s,e.future=n>r,e}function updateMinutes(e,t,a){return e.hasTime=!0,e.hour=Math.floor(t/MINUTES_IN_HOUR),e.minute=t%MINUTES_IN_HOUR,e.time=getTime(e),a&&updateRelative(e,a,!0),e}function updateWeekday(e){return e.weekday=getWeekday(e),e}function updateDayOfYear(e){return e.doy=getDayOfYear(e),e}function updateDisabled(e,t){if(Array.isArray(t)&&0!==t.length){var a=getDayIdentifier(e);for(var r in t){if(getDayIdentifier(parseTimestamp(t[r]+" 00:00"))===a){e.disabled=!0;break}}}}function updateFormatted(e){return e.time=getTime(e),e.date=getDate(e),e.weekday=getWeekday(e),e.doy=getDayOfYear(e),e.workweek=getWorkWeek(e),e}function getDayOfYear(e){if(0!==e.year){var t=new Date(Date.UTC(e.year,e.month-1,e.day,0,0));return date.getDayOfYear(t)}}function getWorkWeek(e){if(0!==e.year){var t=new Date(Date.UTC(e.year,e.month-1,e.day,0,0));return date.getWeekOfYear(t)}}function getWeekday(e){if(e.hasDay){var t=Math.floor,a=e.day,r=(e.month+9)%MONTH_MAX+1,n=t(e.year/100),s=e.year%100-(e.month<=2?1:0);return((a+t(2.6*r-.2)-2*n+s+t(s/4)+t(n/4))%7+7)%7}return e.weekday}function isLeapYear(e){return e%4==0&&e%100!=0||e%400==0}function daysInMonth(e,t){return isLeapYear(e)?DAYS_IN_MONTH_LEAP[t]:DAYS_IN_MONTH[t]}function copyTimestamp(e){return Object.assign({},e)}function padNumber(e,t){for(var a=String(e);a.length<t;)a="0"+a;return a}function getDate(e){var t=padNumber(e.year,4)+"-"+padNumber(e.month,2);return e.hasDay&&(t+="-"+padNumber(e.day,2)),t}function getTime(e){return e.hasTime?padNumber(e.hour,2)+":"+padNumber(e.minute,2):""}function nextDay(e){return++e.day,e.weekday=(e.weekday+1)%DAYS_IN_WEEK,e.day>DAYS_IN_MONTH_MIN&&e.day>daysInMonth(e.year,e.month)&&(e.day=DAY_MIN,++e.month,e.month>MONTH_MAX&&(e.month=MONTH_MIN,++e.year)),e}function prevDay(e){return e.day--,e.weekday=(e.weekday+6)%DAYS_IN_WEEK,e.day<DAY_MIN&&(e.month--,e.month<MONTH_MIN&&(e.year--,e.month=MONTH_MAX),e.day=daysInMonth(e.year,e.month)),e}function relativeDays(e,t,a,r){for(void 0===t&&(t=nextDay),void 0===a&&(a=1),void 0===r&&(r=[0,1,2,3,4,5,6]);--a>=0;)t(e),r.length<7&&!r.includes(e.weekday)&&++a;return e}function findWeekday(e,t,a,r){for(void 0===a&&(a=nextDay),void 0===r&&(r=6);e.weekday!==t&&--r>=0;)a(e);return e}function getWeekdaySkips(e){for(var t=[1,1,1,1,1,1,1],a=[0,0,0,0,0,0,0],r=0;r<e.length;++r)a[e[r]]=1;for(var n=0;n<DAYS_IN_WEEK;++n){for(var s=1,i=1;i<DAYS_IN_WEEK;++i){if(a[(n+i)%DAYS_IN_WEEK])break;++s}t[n]=a[n]*s}return t}function createDayList(e,t,a,r,n,s,i){void 0===n&&(n=[]),void 0===s&&(s=42),void 0===i&&(i=0);var o=getDayIdentifier(t),d=[],l=copyTimestamp(e),u=0,c=u===o;if(o<getDayIdentifier(e))return d;for(;(!c||d.length<i)&&d.length<s&&(u=getDayIdentifier(l),!(c=c||u>o));)if(0!==r[l.weekday]){var h=copyTimestamp(l);updateFormatted(h),updateRelative(h,a),updateDisabled(h,n),d.push(h),l=relativeDays(l,nextDay)}else l=nextDay(l);return d}function createIntervalList(e,t,a,r,n){for(var s=[],i=0;i<r;++i){var o=(t+i)*a,d=copyTimestamp(e);s.push(updateMinutes(d,o,n))}return s}function createNativeLocaleFormatter(e,t){return"undefined"==typeof Intl||void 0===Intl.DateTimeFormat?function(e,t){return""}:function(a,r){try{return new Intl.DateTimeFormat(e||void 0,t(a,r)).format(new Date(Date.UTC(a.year,a.month-1,a.day,a.hour,a.minute)))}catch(e){return""}}}function validateNumber(e){return isFinite(parseInt(e,10))}var Times={name:"Times",props:{now:{type:String,validator:function(e){return""===e||validateTimestamp(e)}}},data:function(){return{times:{now:parseTimestamp("0000-00-00 00:00"),today:parseTimestamp("0000-00-00")}}},computed:{parsedNow:function(){return this.now?parseTimestamp(this.now):null}},watch:{parsedNow:"updateCurrent"},created:function(){this.updateCurrent(),this.setCurrent()},methods:{setCurrent:function(){this.times.now.current=this.times.today.current=!0,this.times.now.past=this.times.today.past=!1,this.times.now.future=this.times.today.future=!1},updateCurrent:function(){var e=this.parsedNow||this.getNow();this.updateDay(e,this.times.now),this.updateTime(e,this.times.now),this.updateDay(e,this.times.today)},getNow:function(){return parseDate(new Date)},updateDay:function(e,t){e.date!==t.date&&(t.year=e.year,t.month=e.month,t.day=e.day,t.weekday=e.weekday,t.date=e.date)},updateTime:function(e,t){e.time!==t.time&&(t.hour=e.hour,t.minute=e.minute,t.time=e.time)}}},Mouse={name:"Mouse",methods:{getDefaultMouseEventHandlers:function(e,t){var a;return this.getMouseEventHandlers(((a={})["click"+e]={event:"click"},a["contextmenu"+e]={event:"contextmenu",prevent:!0,result:!1},a["mousedown"+e]={event:"mousedown"},a["mousemove"+e]={event:"mousemove"},a["mouseup"+e]={event:"mouseup"},a["mouseenter"+e]={event:"mouseenter"},a["mouseleave"+e]={event:"mouseleave"},a["touchstart"+e]={event:"touchstart"},a["touchmove"+e]={event:"touchmove"},a["touchend"+e]={event:"touchend"},a),t)},getMouseEventHandlers:function(e,t){var a=this,r={},n=function(n){var s=e[n];if(a.$listeners[n]){var i=(s.passive?"&":(s.once?"~":"")+(s.capture?"!":""))+s.event,o=function(e){var r=e;return(void 0===s.button||r.buttons>0&&r.button===s.button)&&(s.prevent&&e.preventDefault(),s.stop&&e.stopPropagation(),a.$emit(n,t(e))),s.result};i in r?Array.isArray(r[i])?r[i].push(o):r[i]=[r[i],o]:r[i]=o}};for(var s in e)n(s);return r}}},version$1="1.0.5",CSS_COLOR_NAMES=["transparent","aliceblue","antiquewhite","aqua","aquamarine","azure","beige","bisque","black","blanchedalmond","blue","blueviolet","brown","burlywood","cadetblue","chartreuse","chocolate","coral","cornflowerblue","cornsilk","crimson","cyan","darkblue","darkcyan","darkgoldenrod","darkgray","darkgrey","darkgreen","darkkhaki","darkmagenta","darkolivegreen","darkorange","darkorchid","darkred","darksalmon","darkseagreen","darkslateblue","darkslategray","darkslategrey","darkturquoise","darkviolet","deeppink","deepskyblue","dimgray","dimgrey","dodgerblue","firebrick","floralwhite","forestgreen","fuchsia","gainsboro","ghostwhite","gold","goldenrod","gray","grey","green","greenyellow","honeydew","hotpink","indianred","indigo","ivory","khaki","lavender","lavenderblush","lawngreen","lemonchiffon","lightblue","lightcoral","lightcyan","lightgoldenrodyellow","lightgray","lightgrey","lightgreen","lightpink","lightsalmon","lightseagreen","lightskyblue","lightslategray","lightslategrey","lightsteelblue","lightyellow","lime","limegreen","linen","magenta","maroon","mediumaquamarine","mediumblue","mediumorchid","mediumpurple","mediumseagreen","mediumslateblue","mediumspringgreen","mediumturquoise","mediumvioletred","midnightblue","mintcream","mistyrose","moccasin","navajowhite","navy","oldlace","olive","olivedrab","orange","orangered","orchid","palegoldenrod","palegreen","paleturquoise","palevioletred","papayawhip","peachpuff","peru","pink","plum","powderblue","purple","red","rosybrown","royalblue","saddlebrown","salmon","sandybrown","seagreen","seashell","sienna","silver","skyblue","slateblue","slategray","slategrey","snow","springgreen","steelblue","tan","teal","thistle","tomato","turquoise","violet","wheat","white","whitesmoke","yellow","yellowgreen"],QColorizeMixin={name:"QColorizeMixin",props:{color:String},methods:{isNamedCssColor:function(e){return!!e&&CSS_COLOR_NAMES.includes(e.toLowerCase())},isCssColor:function(e){return!!e&&(!!e.match(/^(#|(rgb|hsl)a?\()/)||this.isNamedCssColor(e))},isCssVar:function(e){return!!e&&e.startsWith("--")},calculateColor:function(e,t){return void 0===t&&(t="black"),void 0===e&&void 0!==t?this.calculateColor(t):this.isCssColor(e)?e:this.makeQuasarColorVar(e,t)},makeQuasarColorVar:function(e,t){return"var("+(this.isCssVar(e)?e:"--q-color-"+e)+", '"+t+"')"},isValidCssColor:function(e){return this.isCssColor(e)||this.isCssVar(e)},setBothColors:function(e,t,a){return void 0===a&&(a={}),this.setTextColor(e,this.setBackgroundColor(t,a))},setBackgroundColor:function(e,t){var a;if(void 0===t&&(t={}),this.isValidCssColor(e)){var r=this.calculateColor(e);void 0===t.style&&(t.style={}),t.style=Object.assign({},t.style,{"background-color":""+r})}else if(e){var n=e.toString().trim();void 0===t.class&&(t.class={}),t.class=Object.assign({},t.class,((a={})["bg-"+n]=!0,a))}return t},setTextColor:function(e,t){var a;if(void 0===t&&(t={}),this.isValidCssColor(e)){var r=this.calculateColor(e);void 0===t.style&&(t.style={}),t.style=Object.assign({},t.style,{color:""+r,"caret-color":""+r})}else if(e){var n=e.toString().trim();void 0===t.class&&(t.class={}),t.class=Object.assign({},t.class,((a={})["text-"+n]=!0,a))}return t},setBorderColor:function(e,t){var a;if(void 0===t&&(t={}),this.isValidCssColor(e)){var r=this.calculateColor(e);void 0===t.style&&(t.style={}),t.style=Object.assign({},t.style,{"border-color":""+r})}else if(e){var n=e.toString().trim();void 0===t.class&&(t.class={}),t.class=Object.assign({},t.class,((a={})["border-"+n]=!0,a))}return t}}};QColorizeMixin.version=version$1;var version$2="1.0.0",QThemeMixin={name:"QThemeMixin",props:{theme:{type:Object,default:function(){}},enableTheme:Boolean},methods:{useDefaultTheme:function(e,t,a){return void 0===a&&(a={}),a},getThemeColors:function(e){var t=this;void 0===e&&(e=[]);var a=new Map;return!0===this.enableTheme&&void 0!==this.theme&&e.forEach(function(e){a.set(e,t.theme[e])}),a}}};function validateView(e){return["month","week","day","2day","3day","4day","5day","6day","month-scheduler","week-scheduler","custom-scheduler","scheduler","day-scheduler","2day-scheduler","3day-scheduler","4day-scheduler","5day-scheduler","6day-scheduler","month-agenda","week-agenda","custom-agenda","agenda","day-agenda","2day-agenda","3day-agenda","4day-agenda","5day-agenda","6day-agenda","month-interval","custom-interval"].includes(e)}QThemeMixin.version=version$2;var props={base:{weekdays:{type:Array,default:function(){return[0,1,2,3,4,5,6]}},disabledDays:Array,hideHeader:Boolean,noScroll:Boolean,shortWeekdayLabel:Boolean,noDefaultHeaderText:Boolean,noDefaultHeaderBtn:Boolean,locale:{type:String,default:"en-us"},animated:Boolean,transitionPrev:{type:String,default:"slide-right"},transitionNext:{type:String,default:"slide-left"},dragOverFunc:{type:Function},dropFunc:{type:Function}},intervals:{maxDays:{type:Number,default:7},shortIntervalLabel:Boolean,intervalHeight:{type:[Number,String],default:40,validator:validateNumber},intervalMinutes:{type:[Number,String],default:60,validator:validateNumber},intervalStart:{type:[Number,String],default:0,validator:validateNumber},intervalCount:{type:[Number,String],default:24,validator:validateNumber},intervalStyle:{type:Function,default:null},showIntervalLabel:{type:Function,default:null},hour24Format:Boolean,columnHeaderBefore:Boolean,columnHeaderAfter:Boolean,columnCount:{type:[Number,String],default:1,validator:validateNumber},columnIndexStart:{type:[Number,String],default:0,validator:validateNumber}},weeks:{dayHeight:{type:[Number,String],default:0,validator:validateNumber},dayStyle:{type:Function,default:null},dayPadding:String,minWeeks:{type:[Number,String],validator:validateNumber,default:1},shortMonthLabel:Boolean,showWorkWeeks:Boolean,showMonthLabel:{type:Boolean,default:!0},showDayOfYearLabel:Boolean,selectedStartEndDates:{type:Array,default:function(){return[]},validator:function(e){return e.length<=2}},miniMode:{type:[Boolean,String],validator:function(e){return void 0===e||!0===e||!1===e||"auto"===e}},breakpoint:{type:String,default:"md",validator:function(e){return["xs","sm","md","lg","xl"].includes(e)}},monthLabelSize:{type:String,default:"md",validator:function(e){return["xs","sm","md","lg","xl"].includes(e)}}},scheduler:{resources:Array,resourceKey:{type:String,default:"label"},maxDays:{type:Number,default:7},resourceHeight:{type:[Number,String],default:70,validator:validateNumber},resourceWidth:{type:[Number,String],validator:function(e){return void 0===e||validateNumber(e)}},resourceStyle:{type:Function,default:null},columnHeaderBefore:Boolean,columnHeaderAfter:Boolean,columnCount:{type:[Number,String],default:1,validator:validateNumber},columnIndexStart:{type:[Number,String],default:0,validator:validateNumber}},calendar:{view:{type:String,default:"month",validator:validateView},value:{type:String,validator:function(e){return""===e||validateTimestamp(e)}}}},CalendarBase={name:"CalendarBase",mixins:[QColorizeMixin,QThemeMixin,Mouse,Times],props:Object.assign({},props.base,{start:{type:String,validator:validateTimestamp,default:function(){return parseDate(new Date).date}},end:{type:String,validator:validateTimestamp,default:"0000-00-00"}}),data:function(){return{keyValue:"YYYY-mm-dd",direction:"next"}},computed:{weekdaySkips:function(){return getWeekdaySkips(this.weekdays)},parsedStart:function(){return parseTimestamp(this.start)},parsedEnd:function(){return parseTimestamp(this.end)},days:function(){return createDayList(this.parsedStart,this.parsedEnd,this.times.today,this.weekdaySkips,this.disabledDays)},dayFormatter:function(){var e={timeZone:"UTC",day:"numeric"};return createNativeLocaleFormatter(this.locale,function(t,a){return e})},weekdayFormatter:function(){var e={timeZone:"UTC",weekday:"long"},t={timeZone:"UTC",weekday:"short"};return createNativeLocaleFormatter(this.locale,function(a,r){return r?t:e})}},methods:{getRelativeClasses:function(e,t){return void 0===t&&(t=!1),{"q-current-day":e.current,"q-past-day":e.past,"q-future-day":e.future,"q-outside":t}},getStartOfWeek:function(e){return getStartOfWeek(e,this.weekdays,this.times.today)},getEndOfWeek:function(e){return getEndOfWeek(e,this.weekdays,this.times.today)},dayStyleDefault:function(e){}}};function convertToUnit(e,t){return void 0===t&&(t="px"),null==e||""===e?void 0:isNaN(e)?String(e):""+Number(e)+t}var QCalendarWeekly={name:"QCalendarWeekly",mixins:[CalendarBase],props:props.weeks,computed:{staticClass:function(){return(this.isMiniMode?" q-calendar-mini ":"")+"q-calendar-weekly"},parsedMinWeeks:function(){return parseInt(this.minWeeks,10)},days:function(){var e=this.parsedMinWeeks*this.weekdays.length;return createDayList(this.getStartOfWeek(this.parsedStart),this.getEndOfWeek(this.parsedEnd),this.times.today,this.weekdaySkips,this.disabledDays,Number.MAX_SAFE_INTEGER,e)},todayWeek:function(){var e=this.times.today;return createDayList(this.getStartOfWeek(e),this.getEndOfWeek(e),e,this.weekdaySkips,this.disabledDays,this.weekdays.length,this.weekdays.length)},monthFormatter:function(){var e={timeZone:"UTC",month:"long"},t={timeZone:"UTC",month:"short"};return createNativeLocaleFormatter(this.locale,function(a,r){return r?t:e})},styles:function(){var e={};if(this.dayHeight>0){var t=convertToUnit(this.dayHeight);e.height=t}return void 0!==this.dayPadding&&(e.padding=this.dayPadding),e},isMiniMode:function(){return!0===this.miniMode||"auto"===this.miniMode&&this.$q.screen.lt[this.breakpoint]}},methods:{isOutside:function(e){var t=getDayIdentifier(e);return t<getDayIdentifier(this.parsedStart)||t>getDayIdentifier(this.parsedEnd)},isCurrentWeek:function(e){for(var t=0;t<e.length;++t)if(!0===e[t].current)return{timestamp:e[t]};return{timestamp:!1}},__renderHead:function(e){return e("div",{staticClass:"q-calendar-weekly__head"},[!0===this.showWorkWeeks&&this.__renderWorkWeekHead(e),this.__renderHeadDays(e)])},__renderWorkWeekHead:function(e){var t,a,r=new Map,n=this.useDefaultTheme;return!0===this.enableTheme&&(t="colorHeader",a="backgroundHeader",r=this.getThemeColors([t,a]),n=this.setBothColors),e("div",n(r.get(t),r.get(a),{staticClass:"q-calendar-weekly__head-workweek"}),"#")},__renderHeadDays:function(e){var t=this;return this.todayWeek.map(function(a,r){return t.__renderHeadDay(e,a,r)})},__renderHeadDay:function(e,t,a){var r,n,s=this.isOutside(this.days[a]),i=new Map,o=this.useDefaultTheme;return!0===this.enableTheme&&(s?(r="colorHeaderOutside",n="backgroundHeaderOutside"):(r="colorHeader",n="backgroundHeader"),i=this.getThemeColors([r,n]),o=this.setBothColors),e("div",o(i.get(r),i.get(n),{key:t.date,staticClass:"ellipsis q-calendar-weekly__head-weekday",class:this.getRelativeClasses(t,s)}),[this.__renderHeadDayLabel(e,t,this.shortWeekdayLabel||this.isMiniMode)])},__renderHeadDayLabel:function(e,t,a){return e("span",{staticClass:"ellipsis"},this.weekdayFormatter(t,a))},__renderWeeks:function(e){for(var t=this.days,a=this.weekdays.length,r=[],n=0;n<t.length;n+=a)r.push(this.__renderWeek(e,t.slice(n,n+a)));return r},__renderWeek:function(e,t){var a=this;return e("div",{key:t[0].date,staticClass:"q-calendar-weekly__week"},[!0===this.showWorkWeeks&&this.__renderWorkWeekGutter(e,t),t.map(function(t){return a.__renderDay(e,t)})])},__renderWorkWeekGutter:function(e,t){var a,r,n=this.$scopedSlots.workweek,s=t.length>2?t[2]:t[0],i=this.isCurrentWeek(t).timestamp,o=Number(s.workweek).toLocaleString(this.locale),d={workweekLabel:o,week:t,miniMode:this.isMiniMode},l=i&&!0===i.current?this.color:void 0,u=convertToUnit(this.dayHeight),c=new Map,h=this.useDefaultTheme;return!0===this.enableTheme&&(i&&!0===i.current||!0===s.current?(a="colorWorkWeekCurrent",r="backgroundWorkWeekCurrent"):i&&!0===i.past||!0===s.past?(a="colorWorkWeekPast",r="backgroundWorkWeekPast"):(i&&!0===i.future||!0===s.future)&&(a="colorWorkWeekFuture",r="backgroundWorkWeekFuture"),c=this.getThemeColors([a,r]),h=this.setBothColors),e("div",h(void 0!==l?l:c.get(a),c.get(r),{key:s.workweek,staticClass:"q-calendar-weekly__workweek",class:this.getRelativeClasses(!1!==i?i:s,!1),style:{height:this.dayHeight&&this.dayHeight>0?u:"auto"}}),n?n(d):o)},__renderDay:function(e,t){var a,r,n,s=this,i=this.dayStyle||this.dayStyleDefault,o=this.isOutside(t),d=this.$scopedSlots.day,l=Object.assign({},{outside:o},t,{miniMode:this.isMiniMode}),u=!1===o&&this.days.find(function(e){return e.month===t.month}).day===t.day&&!0===this.showMonthLabel,c=new Map,h=this.useDefaultTheme;!0===this.enableTheme&&(!0===o?(r="colorBodyOutside",n="backgroundBodyOutside"):!0===t.past?(r="colorBodyPast",n="backgroundBodyPast"):!0===t.current?(r="colorBodyCurrent",n="backgroundBodyCurrent"):!0===t.future&&(r="colorBodyFuture",n="backgroundBodyFuture"),c=this.getThemeColors([r,n]),h=this.setBothColors);var y=Object.assign({},this.styles);return y=Object.assign(y,i(t)),e("div",h(c.get(r),c.get(n),{key:t.date,staticClass:"q-calendar-weekly__day row justify-center items-center",class:Object.assign({},this.getRelativeClasses(t,o),{"q-calendar-weekly__day--droppable":a}),style:y,domProps:{ondragover:function(e){void 0!==s.dragOverFunc&&(a=s.dragOverFunc(e,t,"day"))},ondrop:function(e){void 0!==s.dropFunc&&s.dropFunc(e,t,"day")}},on:this.getDefaultMouseEventHandlers(":day",function(e){return t})}),[this.__renderDayLabel(e,t),!0!==this.isMiniMode&&this.showDayOfYearLabel&&!u?this.__renderDayOfYearLabel(e,t):"",!0!==this.isMiniMode&&u?this.__renderDayMonth(e,t):"",e("div",{staticClass:"row full-width justify-center"},d?d(l):"")])},__renderDayLabel:function(e,t){var a,r,n=this.isOutside(t),s=!0===t.current?this.color:void 0,i=this.dayFormatter(t,!1),o=this.$scopedSlots["day-label"],d=Object.assign({},{dayLabel:i},t,{miniMode:this.isMiniMode}),l=new Map,u=this.useDefaultTheme;return!0===this.enableTheme&&(!0===n?(a="colorDayLabelOutside",r="backgroundDayLabelOutside"):!0===t.past?(a="colorDayLabelPast",r="backgroundDayLabelPast"):!0===t.current?(a="colorDayLabelCurrent",r="backgroundDayLabelCurrent"):!0===t.future&&(a="colorDayLabelFuture",r="backgroundDayLabelFuture"),l=this.getThemeColors([a,r]),u=this.setBothColors),e(QBtn,u(void 0!==s?s:l.get(a),l.get(r),{staticClass:"q-calendar-weekly__day-label",props:{size:this.isMiniMode?"sm":this.monthLabelSize,unelevated:!0,round:!0,dense:!0,noCaps:!0,outline:!0===t.current,disable:t.disabled},on:this.getMouseEventHandlers({"click:date":{event:"click",stop:!0},"contextmenu:date":{event:"contextmenu",stop:!0,prevent:!0,result:!1}},function(e){return t})}),[o?o(d):i])},__renderDayOfYearLabel:function(e,t){var a=!0===t.current?this.color:void 0,r=this.$scopedSlots["day-of-year"],n=Object.assign({},t);return e("div",this.setTextColor(a,{staticClass:"q-calendar-weekly__day-month--day-of-year"}),r?r(n):t.doy)},__renderDayMonth:function(e,t){var a=!0===t.current?this.color:void 0,r=this.$scopedSlots["month-label"],n=this.monthFormatter(t,this.shortMonthLabel),s=Object.assign({},{monthLabel:n},t,{miniMode:this.isMiniMode});return e("div",this.setTextColor(a,{staticClass:"q-calendar-weekly__day-month"}),r?r(s):!0!==this.isMiniMode?n:"")}},render:function(e){return e("div",{staticClass:this.staticClass,nativeOn:{dragstart:function(e){e.preventDefault()}}},[!this.hideHeader&&this.__renderHead(e)].concat(this.__renderWeeks(e)))}},QCalendarMonthly={name:"QCalendarMonthly",mixins:[QCalendarWeekly],computed:{parsedStart:function(){return getStartOfMonth(parseTimestamp(this.start))},parsedEnd:function(){return getEndOfMonth(parseTimestamp(this.end))}}},Resize={name:"resize",inserted:function(e,t){var a=t.value,r=t.options||{passive:!0};window.addEventListener("resize",a,r),e._onResize={callback:a,options:r},t.modifiers&&t.modifiers.quiet||a()},unbind:function(e){if(e._onResize){var t=e._onResize,a=t.callback,r=t.options;window.removeEventListener("resize",a,r),delete e._onResize}}},CalendarIntervals={name:"CalendarWithIntervals",mixins:[CalendarBase],props:Object.assign({},props.intervals),computed:{parsedIntervalStart:function(){return parseInt(this.intervalStart,10)},parsedIntervalMinutes:function(){return parseInt(this.intervalMinutes,10)},parsedIntervalCount:function(){return parseInt(this.intervalCount,10)},parsedIntervalHeight:function(){return parseFloat(this.intervalHeight)},startMinute:function(){return this.parsedIntervalStart*this.parsedIntervalMinutes},bodyHeight:function(){return this.parsedIntervalCount*this.parsedIntervalHeight},days:function(){return createDayList(this.parsedStart,this.parsedEnd,this.times.today,this.weekdaySkips,this.disabledDays,this.maxDays)},intervals:function(){var e=this.days,t=this.parsedIntervalStart,a=this.parsedIntervalMinutes,r=this.parsedIntervalCount,n=this.times.now;return 0===e.length&&console.error("QCalendar: days array has no content"),e.map(function(e){return createIntervalList(e,t,a,r,n)})},intervalFormatter:function(){var e={timeZone:"UTC",hour12:!this.hour24Format,hour:"2-digit",minute:"2-digit"},t={timeZone:"UTC",hour12:!this.hour24Format,hour:"numeric",minute:"2-digit"},a={timeZone:"UTC",hour12:!this.hour24Format,hour:"numeric"};return createNativeLocaleFormatter(this.locale,function(r,n){return n?0===r.minute?a:t:e})}},methods:{showIntervalLabelDefault:function(e){var t=this.intervals[0][0];return!(t.hour===e.hour&&t.minute===e.minute)&&0===e.minute},intervalStyleDefault:function(e){},getTimestampAtEvent:function(e,t){var a=copyTimestamp(t),r=e.currentTarget.getBoundingClientRect(),n=this.startMinute,s=e,i=e,o=s.changedTouches||s.touches,d=((o&&o[0]?o[0].clientY:i.clientY)-r.top)/this.parsedIntervalHeight;return updateMinutes(a,n+Math.floor(d*this.parsedIntervalMinutes),this.times.now)},getScopeForSlot:function(e,t){var a=copyTimestamp(e);return a.timeStartPos=this.timeStartPos,a.timeDurationHeight=this.timeDurationHeight,void 0!==t&&(a.index=t),a},scrollToTime:function(e){var t=this.timeStartPos(e),a=this.$refs.scrollArea;return!(!1===t||!a)&&(a.scrollTop=t,!0)},timeDurationHeight:function(e){return e/this.parsedIntervalMinutes*this.parsedIntervalHeight},timeStartPos:function(e,t){void 0===t&&(t=!0);var a=parseTime(e);if(!1===a)return!1;var r=(a-this.startMinute)/(this.parsedIntervalCount*this.parsedIntervalMinutes)*this.bodyHeight;return t&&(r<0&&(r=0),r>this.bodyHeight&&(r=this.bodyHeight)),r}}},QCalendarDaily={name:"QCalendarDaily",mixins:[CalendarIntervals],directives:{Resize:Resize},data:function(){return{scrollWidth:0}},computed:{classes:function(){return{"q-calendar-daily":!0}}},mounted:function(){this.init()},watch:{noScroll:function(e){!0===e?this.scrollWidth=0:this.$nextTick(this.onResize)}},methods:{init:function(){this.$nextTick(this.onResize)},onResize:function(){this.scrollWidth=this.getScrollWidth()},getScrollWidth:function(){var e=this.$refs.scrollArea,t=this.$refs.pane;return e&&t?e.offsetWidth-t.offsetWidth:0},__renderHead:function(e){return e("div",{staticClass:"q-calendar-daily__head",style:{marginRight:this.scrollWidth+"px"}},[this.__renderHeadIntervals(e)].concat(this.__renderHeadDays(e)))},__renderHeadIntervals:function(e){var t,a,r=this.$scopedSlots["intervals-header"],n=new Map,s=this.useDefaultTheme;return!0===this.enableTheme&&(t="colorIntervalHeader",a="backgroundIntervalHeader",n=this.getThemeColors([t,a]),s=this.setBothColors),e("div",s(n.get(t),n.get(a),{staticClass:"q-calendar-daily__intervals-head q-calendar-daily__intervals-head--text"}),[r&&r(this.days)])},__renderHeadDays:function(e){var t=this;return 1===this.days.length&&void 0!==this.columnCount&&parseInt(this.columnCount,10)>0?Array.apply(null,new Array(parseInt(this.columnCount,10))).map(function(e,a){return a+parseInt(t.columnIndexStart,10)}).map(function(a){return t.__renderHeadDay(e,t.days[0],a)}):this.days.map(function(a){return t.__renderHeadDay(e,a)})},__renderHeadDay:function(e,t,a){var r,n,s,i=this,o=this.$scopedSlots["day-header"],d=this.getScopeForSlot(t,a),l=100/this.days.length,u=new Map,c=this.useDefaultTheme;return!0===this.enableTheme&&(!0===t.past?(n="colorHeaderPast",s="backgroundHeaderPast"):!0===t.current?(n="colorHeaderCurrent",s="backgroundHeaderCurrent"):!0===t.future&&(n="colorHeaderFuture",s="backgroundHeaderFuture"),u=this.getThemeColors([n,s]),c=this.setBothColors),e("div",c(u.get(n),u.get(s),{key:t.date+(void 0!==a?"-"+a:""),staticClass:"q-calendar-daily__head-day",class:Object.assign({},this.getRelativeClasses(t),{"q-calendar-daily__head-day--droppable":r}),style:{maxWidth:l+"%"},domProps:{ondragover:function(e){void 0!==i.dragOverFunc&&(r=i.dragOverFunc(e,t,"day",a))},ondrop:function(e){void 0!==i.dropFunc&&i.dropFunc(e,t,"day",a)}},on:this.getDefaultMouseEventHandlers(":day",function(e){return d})}),[!0===this.columnHeaderBefore&&this.__renderColumnHeaderBefore(e,t,a),!0!==this.noDefaultHeaderText&&this.__renderHeadWeekday(e,t),!0!==this.noDefaultHeaderBtn&&this.__renderHeadDayBtn(e,t),o&&o(d),!0===this.columnHeaderAfter&&this.__renderColumnHeaderAfter(e,t,a)])},__renderHeadWeekday:function(e,t){var a,r,n=!0===t.current?this.color:void 0,s=new Map,i=this.useDefaultTheme;return!0===this.enableTheme&&(!0===t.past?(a="colorDayLabelPast",r="backgroundDayLabelPast"):!0===t.current?(a="colorDayLabelCurrent",r="backgroundDayLabelCurrent"):!0===t.future&&(a="colorDayLabelFuture",r="backgroundDayLabelFuture"),s=this.getThemeColors([a,r]),i=this.setBothColors),e("div",i(void 0!==n?n:s.get(a),s.get(r),{staticClass:"ellipsis q-calendar-daily__head-weekday"}),[this.__renderHeadDayLabel(e,t,this.shortWeekdayLabel)])},__renderHeadDayLabel:function(e,t,a){return e("span",{staticClass:"ellipsis"},this.weekdayFormatter(t,a))},__renderHeadDayBtn:function(e,t){var a,r,n=!0===t.current?this.color:void 0,s=new Map,i=this.useDefaultTheme;return!0===this.enableTheme&&(!0===t.past?(a="colorDayLabelPast",r="backgroundDayLabelPast"):!0===t.current?(a="colorDayLabelCurrent",r="backgroundDayLabelCurrent"):!0===t.future&&(a="colorDayLabelFuture",r="backgroundDayLabelFuture"),s=this.getThemeColors([a,r]),i=this.setBothColors),e(QBtn,i(void 0!==n?n:s.get(a),s.get(r),{staticClass:"q-calendar-daily__head-day-label",style:{color:!0===t.current?n:void 0},props:{unelevated:!0,round:!0,dense:!0,noCaps:!0,outline:!0===t.current,disable:t.disabled},on:this.getMouseEventHandlers({"click:date":{event:"click",stop:!0},"contextmenu:date":{event:"contextmenu",stop:!0,prevent:!0,result:!1}},function(e){return t})}),this.dayFormatter(t,!1))},__renderColumnHeaderBefore:function(e,t,a){var r=this.$scopedSlots["column-header-before"],n=Object.assign({},t);return n.index=a,e("div",{staticClass:"q-calendar-daily__column-header--before"},[r&&r(n)])},__renderColumnHeaderAfter:function(e,t,a){var r=this.$scopedSlots["column-header-after"],n=Object.assign({},t);return n.index=a,e("div",{staticClass:"q-calendar-daily__column-header--after"},[r&&r(n)])},__renderBody:function(e){return e("div",{staticClass:"q-calendar-daily__body"},[this.__renderScrollArea(e)])},__renderScrollArea:function(e){return void 0!==this.noScroll&&!0===this.noScroll?this.__renderPane(e):e("div",{ref:"scrollArea",staticClass:"q-calendar-daily__scroll-area"},[this.__renderPane(e)])},__renderPane:function(e){return e("div",{ref:"pane",staticClass:"q-calendar-daily__pane",style:{height:convertToUnit(this.bodyHeight)}},[this.__renderDayContainer(e)])},__renderDayContainer:function(e){var t=this.$scopedSlots["day-container"];return e("div",{staticClass:"q-calendar-daily__day-container"},[this.__renderBodyIntervals(e)].concat(this.__renderDays(e),[t&&t(this.days)]))},__renderDays:function(e){var t=this;return 1===this.days.length&&this.columnCount&&parseInt(this.columnCount,10)>0?Array.apply(null,new Array(parseInt(this.columnCount,10))).map(function(e,a){return a+parseInt(t.columnIndexStart,10)}).map(function(a){return t.__renderDay(e,t.days[0],0,a)}):this.days.map(function(a,r){return t.__renderDay(e,a,r)})},__renderDay:function(e,t,a,r){var n,s,i=this,o=this.$scopedSlots["day-body"],d=this.getScopeForSlot(t,r),l=100/this.days.length,u=new Map,c=this.useDefaultTheme;return!0===this.enableTheme&&(!0===t.past?(n="colorBodyPast",s="backgroundBodyPast"):!0===t.current?(n="colorBodyCurrent",s="backgroundBodyCurrent"):!0===t.future&&(n="colorBodyFuture",s="backgroundBodyFuture"),u=this.getThemeColors([n,s]),c=this.setBothColors),e("div",c(u.get(n),u.get(s),{key:t.date+(void 0!==r?":"+r:""),staticClass:"q-calendar-daily__day",class:this.getRelativeClasses(t),style:{maxWidth:l+"%"},on:this.getDefaultMouseEventHandlers(":time",function(e){return i.getScopeForSlot(i.getTimestampAtEvent(e,t),r)})}),this.__renderDayIntervals(e,a,r).concat([o&&o(d)]))},__renderDayIntervals:function(e,t,a){var r=this;return this.intervals[t].map(function(t){return r.__renderDayInterval(e,t,a)})},__renderDayInterval:function(e,t,a){var r,n=this,s=convertToUnit(this.intervalHeight),i=this.intervalStyle||this.intervalStyleDefault,o=this.$scopedSlots.interval,d=this.getScopeForSlot(t,a);return e("div",{key:t.time,staticClass:"q-calendar-daily__day-interval",class:{"q-calendar-daily__day-interval--droppable":r},style:Object.assign({},{height:s},i(t)),domProps:{ondragover:function(e){void 0!==n.dragOverFunc&&(r=n.dragOverFunc(e,t,"interval"))},ondrop:function(e){void 0!==n.dropFunc&&n.dropFunc(e,t,"interval")}}},o?o(d):void 0)},__renderBodyIntervals:function(e){var t,a,r=this,n=new Map,s=this.useDefaultTheme;!0===this.enableTheme&&(t="colorIntervalBody",a="backgroundIntervalBody",n=this.getThemeColors([t,a]),s=this.setBothColors);var i={staticClass:"q-calendar-daily__intervals-body",on:this.getDefaultMouseEventHandlers(":interval",function(e){return r.getTimestampAtEvent(e,r.parsedStart)})};return e("div",s(n.get(t),n.get(a),i),this.__renderIntervalLabels(e))},__renderIntervalLabels:function(e){var t=this;return this.intervals[0].map(function(a){return t.__renderIntervalLabel(e,a)})},__renderIntervalLabel:function(e,t){var a,r,n=convertToUnit(this.intervalHeight),s=this.shortIntervalLabel,i=(this.showIntervalLabel||this.showIntervalLabelDefault)(t)?this.intervalFormatter(t,s):void 0,o=new Map,d=this.useDefaultTheme;return!0===this.enableTheme&&(a="colorIntervalText",r="backgroundIntervalText",o=this.getThemeColors([a,r]),d=this.setBothColors),e("div",{key:t.time,staticClass:"q-calendar-daily__interval",style:{height:n}},[e("div",d(o.get(a),o.get(r),{staticClass:"q-calendar-daily__interval-text"}),i)])}},render:function(e){return e("div",{class:this.classes,directives:[{modifiers:{quiet:!0},name:"resize",value:this.onResize}]},[!this.hideHeader&&this.__renderHead(e),this.__renderBody(e)])}},CalendarScheduler={name:"CalendarWithScheduler",mixins:[CalendarBase],props:Object.assign({},props.scheduler),computed:{parsedResourceHeight:function(){return parseFloat(this.resourceHeight)},parsedResourceWidth:function(){return parseFloat(this.resourceWidth)},bodyHeight:function(){return this.resources&&this.resources.length>0?this.resources.length*this.parsedResourceHeight:0},days:function(){return createDayList(this.parsedStart,this.parsedEnd,this.times.today,this.weekdaySkips,this.disabledDays,this.maxDays)}},methods:{resourceStyleDefault:function(e){},getTimestampAtEvent:function(e,t){return updateRelative(copyTimestamp(t),this.times.now,!1)},getScopeForSlot:function(e,t,a){var r={};return r.day=copyTimestamp(e),void 0!==t&&(r.index=t),void 0!==a&&(r.resource=a),r}}},QCalendarScheduler={name:"QCalendarScheduler",mixins:[CalendarScheduler],directives:{Resize:Resize},data:function(){return{scrollWidth:0}},computed:{classes:function(){return{"q-calendar-scheduler":!0}}},mounted:function(){this.init()},watch:{noScroll:function(e){!0===e?this.scrollWidth=0:this.$nextTick(this.onResize)}},methods:{init:function(){this.$nextTick(this.onResize)},onResize:function(){this.scrollWidth=this.getScrollWidth()},getScrollWidth:function(){var e=this.$refs.scrollArea,t=this.$refs.pane;return e&&t?e.offsetWidth-t.offsetWidth:0},resourceStartPos:function(e,t){void 0===t&&(t=!0);var a=this.resource.indexOf(e)*this.parsedResourceHeight;return t&&(a<0&&(a=0),a>this.bodyHeight&&(a=this.bodyHeight)),a},__renderHead:function(e){return e("div",{staticClass:"q-calendar-scheduler__head",style:{marginRight:this.scrollWidth+"px"}},[this.__renderHeadResources(e)].concat(this.__renderHeadDays(e)))},__renderHeadResources:function(e){var t,a,r=this.$scopedSlots["scheduler-resources-header"],n=convertToUnit(this.resourceWidth),s=new Map,i=this.useDefaultTheme;return!0===this.enableTheme&&(t="colorSchedulerHeader",a="backgroundSchedulerHeader",s=this.getThemeColors([t,a]),i=this.setBothColors),e("div",i(s.get(t),s.get(a),{staticClass:"q-calendar-scheduler__resources-head q-calendar-scheduler__resources-head--text",style:{width:n}}),[r&&r(this.days)])},__renderHeadDays:function(e){var t=this;return 1===this.days.length&&this.columnCount&&parseInt(this.columnCount,10)>0?Array.apply(null,new Array(parseInt(this.columnCount,10))).map(function(e,a){return a+parseInt(t.columnIndexStart,10)}).map(function(a){return t.__renderHeadDay(e,t.days[0],a)}):this.days.map(function(a){return t.__renderHeadDay(e,a)})},__renderHeadDay:function(e,t,a){var r,n,s,i=this,o=this.$scopedSlots["scheduler-day-header"],d=this.getScopeForSlot(t,a),l=100/this.days.length,u=new Map,c=this.useDefaultTheme;return!0===this.enableTheme&&(!0===t.past?(n="colorHeaderPast",s="backgroundHeaderPast"):!0===t.current?(n="colorHeaderCurrent",s="backgroundHeaderCurrent"):!0===t.future&&(n="colorHeaderFuture",s="backgroundHeaderFuture"),u=this.getThemeColors([n,s]),c=this.setBothColors),e("div",c(u.get(n),u.get(s),{key:t.date+(void 0!==a?"-"+a:""),staticClass:"q-calendar-scheduler__head-day",class:Object.assign({},this.getRelativeClasses(t),{"q-calendar-scheduler__head-day--droppable":r}),style:{maxWidth:l+"%"},domProps:{ondragover:function(e){void 0!==i.dragOverFunc&&(r=i.dragOverFunc(e,t,"day",a))},ondrop:function(e){void 0!==i.dropFunc&&i.dropFunc(e,t,"day",a)}},on:this.getDefaultMouseEventHandlers(":day",function(e){return d})}),[!0===this.columnHeaderBefore&&this.__renderColumnHeaderBefore(e,t,a),!0!==this.noDefaultHeaderText&&this.__renderHeadWeekday(e,t,a),!0!==this.noDefaultHeaderBtn&&this.__renderHeadDayBtn(e,t,a),o&&o(d),!0===this.columnHeaderAfter&&this.__renderColumnHeaderAfter(e,t,a)])},__renderHeadWeekday:function(e,t){var a,r,n=!0===t.current?this.color:void 0,s=new Map,i=this.useDefaultTheme;return!0===this.enableTheme&&(!0===t.past?(a="colorDayLabelPast",r="backgroundDayLabelPast"):!0===t.current?(a="colorDayLabelCurrent",r="backgroundDayLabelCurrent"):!0===t.future&&(a="colorDayLabelFuture",r="backgroundDayLabelFuture"),s=this.getThemeColors([a,r]),i=this.setBothColors),e("div",i(void 0!==n?n:s.get(a),s.get(r),{staticClass:"ellipsis q-calendar-scheduler__head-weekday"}),[this.__renderHeadDayLabel(e,t,this.shortWeekdayLabel)])},__renderHeadDayLabel:function(e,t,a){return e("span",{staticClass:"ellipsis"},this.weekdayFormatter(t,a))},__renderHeadDayBtn:function(e,t,a){var r,n,s=!0===t.current?this.color:void 0,i={day:t,idx:a},o=new Map,d=this.useDefaultTheme;return!0===this.enableTheme&&(!0===t.past?(r="colorDayLabelPast",n="backgroundDayLabelPast"):!0===t.current?(r="colorDayLabelCurrent",n="backgroundDayLabelCurrent"):!0===t.future&&(r="colorDayLabelFuture",n="backgroundDayLabelFuture"),o=this.getThemeColors([r,n]),d=this.setBothColors),e(QBtn,d(void 0!==s?s:o.get(r),o.get(n),{staticClass:"q-calendar-scheduler__head-day-label",style:{color:!0===t.current?s:void 0},props:{unelevated:!0,round:!0,dense:!0,noCaps:!0,outline:!0===t.current,disable:t.disabled},on:this.getMouseEventHandlers({"click:date":{event:"click",stop:!0},"contextmenu:date":{event:"contextmenu",stop:!0,prevent:!0,result:!1}},function(e){return i})}),this.dayFormatter(t,!1))},__renderColumnHeaderBefore:function(e,t,a){var r=this.$scopedSlots["scheduler-column-header-before"],n=Object.assign({},t);return n.index=a,e("div",{staticClass:"q-calendar-scheduler__column-header--before"},[r&&r(n)])},__renderColumnHeaderAfter:function(e,t,a){var r=this.$scopedSlots["scheduler-column-header-after"],n=Object.assign({},t);return n.index=a,e("div",{staticClass:"q-calendar-scheduler__column-header--after"},[r&&r(n)])},__renderBody:function(e){return e("div",{staticClass:"q-calendar-scheduler__body"},[this.__renderScrollArea(e)])},__renderScrollArea:function(e){return void 0!==this.noScroll&&!0===this.noScroll?this.__renderPane(e):e("div",{ref:"scrollArea",staticClass:"q-calendar-scheduler__scroll-area"},[this.__renderPane(e)])},__renderPane:function(e){return e("div",{ref:"pane",staticClass:"q-calendar-scheduler__pane",style:{height:convertToUnit(this.bodyHeight)}},[this.__renderDayContainer(e)])},__renderDayContainer:function(e){return e("div",{staticClass:"q-calendar-scheduler__day-container"},[this.__renderBodyResources(e)].concat(this.__renderDays(e)))},__renderDays:function(e){var t=this;return 1===this.days.length&&this.columnCount&&parseInt(this.columnCount,10)>0?Array.apply(null,new Array(parseInt(this.columnCount,10))).map(function(e,a){return a+parseInt(t.columnIndexStart,10)}).map(function(a){return t.__renderDay(e,t.days[0],0,a)}):this.days.map(function(a,r){return t.__renderDay(e,a,r)})},__renderDay:function(e,t,a){var r,n,s=100/this.days.length,i=new Map,o=this.useDefaultTheme;return!0===this.enableTheme&&(!0===t.past?(r="colorBodyPast",n="backgroundBodyPast"):!0===t.current?(r="colorBodyCurrent",n="backgroundBodyCurrent"):!0===t.future&&(r="colorBodyFuture",n="backgroundBodyFuture"),i=this.getThemeColors([r,n]),o=this.setBothColors),e("div",o(i.get(r),i.get(n),{key:t.date+(void 0!==a?":"+a:""),staticClass:"q-calendar-scheduler__day",class:this.getRelativeClasses(t),style:{maxWidth:s+"%"}}),[].concat(this.__renderDayResources(e,t,a)))},__renderDayResources:function(e,t,a){var r=this;return this.resources.map(function(n){return r.__renderDayResource(e,n,t,a)})},__renderDayResource:function(e,t,a,r){var n,s=this,i=convertToUnit(this.resourceHeight),o=this.resourceStyle||this.resourceStyleDefault,d=this.$scopedSlots["scheduler-resource-day"],l=this.getScopeForSlot(a,r,t),u={height:i};return u=Object.assign(u,o(l)),e("div",{key:t[this.resourceKey]+"-"+r,staticClass:"q-calendar-scheduler__day-resource",class:{"q-calendar-scheduler__day-resource--droppable":n},style:u,domProps:{ondragover:function(e){void 0!==s.dragOverFunc&&(n=s.dragOverFunc(e,t,"resource",r))},ondrop:function(e){void 0!==s.dropFunc&&s.dropFunc(e,t,"resource",r)}},on:this.getDefaultMouseEventHandlers(":resource:day",function(e){return s.getScopeForSlot(s.getTimestampAtEvent(e,a),r,t)})},d?d(l):void 0)},__renderBodyResources:function(e){var t,a,r=convertToUnit(this.resourceWidth),n=new Map,s=this.useDefaultTheme;!0===this.enableTheme&&(t="colorSchedulerBody",a="backgroundSchedulerBody",n=this.getThemeColors([t,a]),s=this.setBothColors);var i={staticClass:"q-calendar-scheduler__resources-body",style:{width:r}};return e("div",s(n.get(t),n.get(a),i),this.__renderResourceLabels(e))},__renderResourceLabels:function(e){var t=this;return this.resources.map(function(a,r){return t.__renderResourceLabel(e,a,r)})},__renderResourceLabel:function(e,t,a){var r,n,s=this.$scopedSlots["scheduler-resource"],i={resource:t,index:a},o=convertToUnit(this.resourceHeight),d=t.label,l=new Map,u=this.useDefaultTheme;return!0===this.enableTheme&&(r="colorSchedulerText",n="backgroundSchedulerText",l=this.getThemeColors([r,n]),u=this.setBothColors),e("div",{key:t.label,staticClass:"q-calendar-scheduler__resource",style:{height:o},on:this.getDefaultMouseEventHandlers(":resource",function(e){return i})},[s?s(i):e("div",u(l.get(r),l.get(n),{staticClass:"q-calendar-scheduler__resource-text"}),d)])},__renderResourcesError:function(e){return e("div",{},"No resources have been defined")}},render:function(e){return e("div",{class:this.classes,directives:[{modifiers:{quiet:!0},name:"resize",value:this.onResize}]},[!this.hideHeader&&void 0!==this.resources&&this.__renderHead(e),void 0!==this.resources&&this.__renderBody(e),void 0===this.resources&&this.__renderResourcesError(e)])}},QCalendarAgenda={name:"QCalendarAgenda",mixins:[QCalendarDaily],methods:{__renderHead:function(e){return e("div",{staticClass:"q-calendar-daily__head",style:{marginRight:this.scrollWidth+"px"}},[].concat(this.__renderHeadDays(e)))},__renderPane:function(e){return e("div",{ref:"pane",staticClass:"q-calendar-daily__pane",style:{}},[this.__renderDayContainer(e)])},__renderBodyIntervals:function(e){},__renderDayIntervals:function(e,t,a){return[]},__renderDay:function(e,t,a,r){var n,s,i,o=this,d=this.$scopedSlots["day-body"],l=Object.assign({},t),u=100/this.days.length,c=new Map,h=this.useDefaultTheme;return!0===this.enableTheme&&(!0===t.past?(s="colorBodyPast",i="backgroundBodyPast"):!0===t.current?(s="colorBodyCurrent",i="backgroundBodyCurrent"):!0===t.future&&(s="colorBodyFuture",i="backgroundBodyFuture"),c=this.getThemeColors([s,i]),h=this.setBothColors),e("div",h(c.get(s),c.get(i),{key:t.date+(void 0!==r?":"+r:""),staticClass:"q-calendar-daily__day",class:Object.assign({},this.getRelativeClasses(t),{"q-calendar-daily__day--droppable":n}),style:{maxWidth:u+"%"},domProps:{ondragover:function(e){void 0!==o.dragOverFunc&&(n=o.dragOverFunc(e,t,"day"))},ondrop:function(e){void 0!==o.dropFunc&&o.dropFunc(e,t,"day")}},on:this.getDefaultMouseEventHandlers(":time",function(e){return o.getScopeForSlot(o.getTimestampAtEvent(e,t),r)})}),this.__renderDayIntervals(e,a,r).concat([d&&d(l)]))}},render:function(e){return e("div",{class:this.classes,directives:[{modifiers:{quiet:!0},name:"resize",value:this.onResize}]},[!this.hideHeader&&this.__renderHead(e),this.__renderBody(e)])}},Component={name:"QCalendar",mixins:[CalendarBase],props:Object.assign({},props.calendar,props.weeks,props.intervals,props.scheduler),data:function(){return{lastStart:void 0,lastEnd:void 0}},computed:{parsedValue:function(){return parseTimestamp(this.value)||this.parsedStart||this.times.today},renderProps:function(){var e=this.parsedValue,t="div",a=this.maxDays,r=e,n=e;switch(this.view){case"month":t=QCalendarMonthly,r=getStartOfMonth(e),n=getEndOfMonth(e);break;case"week":case"week-agenda":case"week-scheduler":t=this.view.endsWith("-agenda")?QCalendarAgenda:this.view.endsWith("-scheduler")?QCalendarScheduler:QCalendarDaily,r=this.getStartOfWeek(e),n=this.getEndOfWeek(e),a=this.weekdays.length;break;case"day":case"day-scheduler":case"day-agenda":t=this.view.endsWith("-agenda")?QCalendarAgenda:this.view.endsWith("-scheduler")?QCalendarScheduler:QCalendarDaily,a=1,updateFormatted(n=relativeDays(copyTimestamp(n),nextDay,a,this.weekdays));break;case"2day":case"2day-scheduler":case"2day-agenda":t=this.view.endsWith("-agenda")?QCalendarAgenda:this.view.endsWith("-scheduler")?QCalendarScheduler:QCalendarDaily,a=2,updateFormatted(n=relativeDays(copyTimestamp(n),nextDay,a,this.weekdays));break;case"3day":case"3day-scheduler":case"3day-agenda":t=this.view.endsWith("-agenda")?QCalendarAgenda:this.view.endsWith("-scheduler")?QCalendarScheduler:QCalendarDaily,a=3,updateFormatted(n=relativeDays(copyTimestamp(n),nextDay,a,this.weekdays));break;case"4day":case"4day-scheduler":case"4day-agenda":t=this.view.endsWith("-agenda")?QCalendarAgenda:this.view.endsWith("-scheduler")?QCalendarScheduler:QCalendarDaily,a=4,updateFormatted(n=relativeDays(copyTimestamp(n),nextDay,a,this.weekdays));break;case"5day":case"5day-scheduler":case"5day-agenda":t=this.view.endsWith("-agenda")?QCalendarAgenda:this.view.endsWith("-scheduler")?QCalendarScheduler:QCalendarDaily,a=5,updateFormatted(n=relativeDays(copyTimestamp(n),nextDay,a,this.weekdays));break;case"6day":case"6day-scheduler":case"6day-agenda":t=this.view.endsWith("-agenda")?QCalendarAgenda:this.view.endsWith("-scheduler")?QCalendarScheduler:QCalendarDaily,a=6,updateFormatted(n=relativeDays(copyTimestamp(n),nextDay,a,this.weekdays));break;case"custom-interval":case"custom-scheduler":case"custom-agenda":t=this.view.endsWith("-agenda")?QCalendarAgenda:this.view.endsWith("-scheduler")?QCalendarScheduler:QCalendarDaily,updateFormatted(n=relativeDays(copyTimestamp(n),nextDay,this.maxDays,this.weekdays));break;case"scheduler":case"agenda":t="scheduler"===this.view?QCalendarScheduler:QCalendarAgenda,updateFormatted(n=relativeDays(copyTimestamp(n),nextDay,this.maxDays,this.weekdays));break;case"month-interval":case"month-scheduler":case"month-agenda":t=this.view.endsWith("-agenda")?QCalendarAgenda:this.view.endsWith("-scheduler")?QCalendarScheduler:QCalendarDaily,r=getStartOfMonth(e),updateFormatted(n=getEndOfMonth(e)),a=DAYS_IN_MONTH_MAX}return{component:t,start:r,end:n,maxDays:a}}},watch:{renderProps:"__checkChange"},methods:{__checkChange:function(e,t){var a=this.renderProps,r=a.start,n=a.end;this.keyValue=0,void 0!==this.lastStart&&void 0!==this.lastEnd&&r.date===this.lastStart&&n.date===this.lastEnd||(this.lastStart=r.date,this.lastEnd=n.date,this.$emit("change",{start:r,end:n})),this.keyValue=getDayIdentifier(r)},move:function(e){void 0===e&&(e=1);var t=copyTimestamp(this.parsedValue),a=e>0,r=a?nextDay:prevDay,n=a?DAYS_IN_MONTH_MAX:DAY_MIN,s=a?e:-e;this.direction=a?"next":"prev";this.maxDays;for(var i=this.weekdaySkips.filter(function(e){return 0!==e}).length;--s>=0;)switch(this.view){case"month":t.day=n,r(t);break;case"week":case"week-scheduler":case"week-agenda":relativeDays(t,r,i,this.weekdays);break;case"day":case"day-scheduler":case"day-agenda":relativeDays(t,r,1,this.weekdays);break;case"2day":case"2day-scheduler":case"2day-agenda":relativeDays(t,r,2,this.weekdays);break;case"3day":case"3day-scheduler":case"3day-agenda":relativeDays(t,r,3,this.weekdays);break;case"4day":case"4day-scheduler":case"4day-agenda":relativeDays(t,r,4,this.weekdays);break;case"5day":case"5day-scheduler":case"5day-agenda":relativeDays(t,r,5,this.weekdays);break;case"6day":case"6day-scheduler":case"6day-agenda":relativeDays(t,r,6,this.weekdays);break;case"custom-interval":case"custom-scheduler":case"custom-agenda":case"agenda":relativeDays(t,r,this.maxDays,this.weekdays);break;case"month-interval":case"month-agenda":case"month-scheduler":t.day=n,r(t)}updateWeekday(t),updateFormatted(t),updateDayOfYear(t),updateRelative(t,this.times.now),this.$emit("input",t.date),this.$emit("moved",t)},next:function(e){void 0===e&&(e=1),this.move(e)},prev:function(e){void 0===e&&(e=1),this.move(-e)},timeStartPos:function(e,t){void 0===t&&(t=!0);var a=this.$children[0];return!(!a||!a.timeStartPos)&&a.timeStartPos(e,t)},timeDurationHeight:function(e){var t=this.$children[0];return t&&t.timeDurationHeight?t.timeDurationHeight(e):-1},scrollToTime:function(e){var t=this.$children[0];return!(!t||!t.scrollToTime)&&t.scrollToTime(e)},__renderComponent:function(e,t,a){return e(t,a)}},render:function(e){var t=this,a=this.renderProps,r=a.start,n=a.end,s=a.maxDays,i=a.component,o={staticClass:"q-calendar",key:this.keyValue,props:Object.assign({},this.$props,{start:r.date,end:n.date,maxDays:s}),on:Object.assign({},this.$listeners,{"click:date":function(e){void 0!==t.$listeners.input&&(void 0!==e.date?t.$emit("input",e.date):void 0!==e.day&&void 0!==e.day.date&&t.$emit("input",e.day.date)),t.$listeners["click:date"]&&t.$emit("click:date",e)}}),scopedSlots:this.$scopedSlots};return!0===this.animated?e("transition",{props:{name:"q-transition--"+("prev"===this.direction?this.transitionPrev:this.transitionNext),appear:!0}},[this.__renderComponent(e,i,o)]):this.__renderComponent(e,i,o)}},Plugin={version:version,Component:Component,install:function(e){e.component(Component.name,Component)}};export default Plugin;export{Component,version};
/*!
* @quasar/quasar-ui-qcalendar v1.2.3
* @quasar/quasar-ui-qcalendar v1.3.0
* (c) 2019 Jeff Galbraith <jeff@quasar.dev>
* Released under the MIT License.
*/
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("vue"),require("quasar")):"function"==typeof define&&define.amd?define(["exports","vue","quasar"],t):t((e=e||self).QCalendar={},e.Vue,e.Quasar)}(this,function(e,t,r){"use strict";if(void 0!==t){t=t&&t.hasOwnProperty("default")?t.default:t;var a=/^(\d{4})-(\d{1,2})(-(\d{1,2}))?([^\d]+(\d{1,2}))?(:(\d{1,2}))?(:(\d{1,2}))?$/,n=/(\d\d?)(:(\d\d?)|)(:(\d\d?)|)/,s=[0,31,28,31,30,31,30,31,31,30,31,30,31],i=[0,31,29,31,30,31,30,31,31,30,31,30,31],o=28,d=12,u=1,l=1,c=7,h=60,y={name:"Times",props:{now:{type:String,validator:function(e){return""===e||W(e)}}},data:function(){return{times:{now:B("0000-00-00 00:00"),today:B("0000-00-00")}}},computed:{parsedNow:function(){return this.now?B(this.now):null}},watch:{parsedNow:"updateCurrent"},created:function(){this.updateCurrent(),this.setCurrent()},methods:{setCurrent:function(){this.times.now.current=this.times.today.current=!0,this.times.now.past=this.times.today.past=!1,this.times.now.future=this.times.today.future=!1},updateCurrent:function(){var e=this.parsedNow||this.getNow();this.updateDay(e,this.times.now),this.updateTime(e,this.times.now),this.updateDay(e,this.times.today)},getNow:function(){return F(new Date)},updateDay:function(e,t){e.date!==t.date&&(t.year=e.year,t.month=e.month,t.day=e.day,t.weekday=e.weekday,t.date=e.date)},updateTime:function(e,t){e.time!==t.time&&(t.hour=e.hour,t.minute=e.minute,t.time=e.time)}}},m=["transparent","aliceblue","antiquewhite","aqua","aquamarine","azure","beige","bisque","black","blanchedalmond","blue","blueviolet","brown","burlywood","cadetblue","chartreuse","chocolate","coral","cornflowerblue","cornsilk","crimson","cyan","darkblue","darkcyan","darkgoldenrod","darkgray","darkgrey","darkgreen","darkkhaki","darkmagenta","darkolivegreen","darkorange","darkorchid","darkred","darksalmon","darkseagreen","darkslateblue","darkslategray","darkslategrey","darkturquoise","darkviolet","deeppink","deepskyblue","dimgray","dimgrey","dodgerblue","firebrick","floralwhite","forestgreen","fuchsia","gainsboro","ghostwhite","gold","goldenrod","gray","grey","green","greenyellow","honeydew","hotpink","indianred","indigo","ivory","khaki","lavender","lavenderblush","lawngreen","lemonchiffon","lightblue","lightcoral","lightcyan","lightgoldenrodyellow","lightgray","lightgrey","lightgreen","lightpink","lightsalmon","lightseagreen","lightskyblue","lightslategray","lightslategrey","lightsteelblue","lightyellow","lime","limegreen","linen","magenta","maroon","mediumaquamarine","mediumblue","mediumorchid","mediumpurple","mediumseagreen","mediumslateblue","mediumspringgreen","mediumturquoise","mediumvioletred","midnightblue","mintcream","mistyrose","moccasin","navajowhite","navy","oldlace","olive","olivedrab","orange","orangered","orchid","palegoldenrod","palegreen","paleturquoise","palevioletred","papayawhip","peachpuff","peru","pink","plum","powderblue","purple","red","rosybrown","royalblue","saddlebrown","salmon","sandybrown","seagreen","seashell","sienna","silver","skyblue","slateblue","slategray","slategrey","snow","springgreen","steelblue","tan","teal","thistle","tomato","turquoise","violet","wheat","white","whitesmoke","yellow","yellowgreen"],v={name:"QColorizeMixin",props:{color:String},methods:{isNamedCssColor:function(e){return!!e&&m.includes(e.toLowerCase())},isCssColor:function(e){return!!e&&(!!e.match(/^(#|(rgb|hsl)a?\()/)||this.isNamedCssColor(e))},isCssVar:function(e){return!!e&&e.startsWith("--")},calculateColor:function(e,t){return void 0===t&&(t="black"),void 0===e&&void 0!==t?this.calculateColor(t):this.isCssColor(e)?e:this.makeQuasarColorVar(e,t)},makeQuasarColorVar:function(e,t){return"var("+(this.isCssVar(e)?e:"--q-color-"+e)+", '"+t+"')"},isValidCssColor:function(e){return this.isCssColor(e)||this.isCssVar(e)},setBothColors:function(e,t,r){return void 0===r&&(r={}),this.setTextColor(e,this.setBackgroundColor(t,r))},setBackgroundColor:function(e,t){var r;if(void 0===t&&(t={}),this.isValidCssColor(e)){var a=this.calculateColor(e);void 0===t.style&&(t.style={}),t.style=Object.assign({},t.style,{"background-color":""+a})}else if(e){var n=e.toString().trim();void 0===t.class&&(t.class={}),t.class=Object.assign({},t.class,((r={})["bg-"+n]=!0,r))}return t},setTextColor:function(e,t){var r;if(void 0===t&&(t={}),this.isValidCssColor(e)){var a=this.calculateColor(e);void 0===t.style&&(t.style={}),t.style=Object.assign({},t.style,{color:""+a,"caret-color":""+a})}else if(e){var n=e.toString().trim();void 0===t.class&&(t.class={}),t.class=Object.assign({},t.class,((r={})["text-"+n]=!0,r))}return t},setBorderColor:function(e,t){var r;if(void 0===t&&(t={}),this.isValidCssColor(e)){var a=this.calculateColor(e);void 0===t.style&&(t.style={}),t.style=Object.assign({},t.style,{"border-color":""+a})}else if(e){var n=e.toString().trim();void 0===t.class&&(t.class={}),t.class=Object.assign({},t.class,((r={})["border-"+n]=!0,r))}return t}},version:"1.0.5"},f={name:"QThemeMixin",props:{theme:{type:Object,default:function(){}},enableTheme:Boolean},methods:{useDefaultTheme:function(e,t,r){return void 0===r&&(r={}),r},getThemeColors:function(e){var t=this;void 0===e&&(e=[]);var r=new Map;return!0===this.enableTheme&&void 0!==this.theme&&e.forEach(function(e){r.set(e,t.theme[e])}),r}},version:"1.0.0"},g={base:{weekdays:{type:Array,default:function(){return[0,1,2,3,4,5,6]}},disabledDays:Array,hideHeader:Boolean,noScroll:Boolean,shortWeekdayLabel:Boolean,noDefaultHeaderText:Boolean,noDefaultHeaderBtn:Boolean,locale:{type:String,default:"en-us"},animated:Boolean,transitionPrev:{type:String,default:"slide-right"},transitionNext:{type:String,default:"slide-left"},dragOverFunc:{type:Function},dropFunc:{type:Function}},intervals:{maxDays:{type:Number,default:7},shortIntervalLabel:Boolean,intervalHeight:{type:[Number,String],default:40,validator:Z},intervalMinutes:{type:[Number,String],default:60,validator:Z},intervalStart:{type:[Number,String],default:0,validator:Z},intervalCount:{type:[Number,String],default:24,validator:Z},intervalStyle:{type:Function,default:null},showIntervalLabel:{type:Function,default:null},hour24Format:Boolean,columnHeaderBefore:Boolean,columnHeaderAfter:Boolean,columnCount:{type:[Number,String],default:1,validator:Z},columnIndexStart:{type:[Number,String],default:0,validator:Z}},weeks:{dayHeight:{type:[Number,String],default:0,validator:Z},dayStyle:{type:Function,default:null},dayPadding:String,minWeeks:{type:[Number,String],validator:Z,default:1},shortMonthLabel:Boolean,showWorkWeeks:Boolean,showMonthLabel:{type:Boolean,default:!0},showDayOfYearLabel:Boolean,selectedStartEndDates:{type:Array,default:function(){return[]},validator:function(e){return e.length<=2}}},scheduler:{resources:Array,resourceKey:{type:String,default:"label"},maxDays:{type:Number,default:7},resourceHeight:{type:[Number,String],default:70,validator:Z},resourceWidth:{type:[Number,String],validator:function(e){return void 0===e||Z(e)}},resourceStyle:{type:Function,default:null},columnHeaderBefore:Boolean,columnHeaderAfter:Boolean,columnCount:{type:[Number,String],default:1,validator:Z},columnIndexStart:{type:[Number,String],default:0,validator:Z}},calendar:{view:{type:String,default:"month",validator:function(e){return["month","week","day","2day","3day","4day","5day","6day","month-scheduler","week-scheduler","custom-scheduler","scheduler","day-scheduler","2day-scheduler","3day-scheduler","4day-scheduler","5day-scheduler","6day-scheduler","month-agenda","week-agenda","custom-agenda","agenda","day-agenda","2day-agenda","3day-agenda","4day-agenda","5day-agenda","6day-agenda","month-interval","custom-interval"].includes(e)}},value:{type:String,validator:function(e){return""===e||W(e)}}}},p={name:"CalendarBase",mixins:[v,f,{name:"Mouse",methods:{getDefaultMouseEventHandlers:function(e,t){var r;return this.getMouseEventHandlers(((r={})["click"+e]={event:"click"},r["contextmenu"+e]={event:"contextmenu",prevent:!0,result:!1},r["mousedown"+e]={event:"mousedown"},r["mousemove"+e]={event:"mousemove"},r["mouseup"+e]={event:"mouseup"},r["mouseenter"+e]={event:"mouseenter"},r["mouseleave"+e]={event:"mouseleave"},r["touchstart"+e]={event:"touchstart"},r["touchmove"+e]={event:"touchmove"},r["touchend"+e]={event:"touchend"},r),t)},getMouseEventHandlers:function(e,t){var r=this,a={},n=function(n){var s=e[n];if(r.$listeners[n]){var i=(s.passive?"&":(s.once?"~":"")+(s.capture?"!":""))+s.event,o=function(e){var a=e;return(void 0===s.button||a.buttons>0&&a.button===s.button)&&(s.prevent&&e.preventDefault(),s.stop&&e.stopPropagation(),r.$emit(n,t(e))),s.result};i in a?Array.isArray(a[i])?a[i].push(o):a[i]=[a[i],o]:a[i]=o}};for(var s in e)n(s);return a}}},y],props:Object.assign({},g.base,{start:{type:String,validator:W,default:function(){return F(new Date).date}},end:{type:String,validator:W,default:"0000-00-00"}}),data:function(){return{keyValue:"YYYY-mm-dd",direction:"next"}},computed:{weekdaySkips:function(){return function(e){for(var t=[1,1,1,1,1,1,1],r=[0,0,0,0,0,0,0],a=0;a<e.length;++a)r[e[a]]=1;for(var n=0;n<c;++n){for(var s=1,i=1;i<c&&!r[(n+i)%c];++i)++s;t[n]=r[n]*s}return t}(this.weekdays)},parsedStart:function(){return B(this.start)},parsedEnd:function(){return B(this.end)},days:function(){return Y(this.parsedStart,this.parsedEnd,this.times.today,this.weekdaySkips,this.disabledDays)},dayFormatter:function(){var e={timeZone:"UTC",day:"numeric"};return U(this.locale,function(t,r){return e})},weekdayFormatter:function(){var e={timeZone:"UTC",weekday:"long"},t={timeZone:"UTC",weekday:"short"};return U(this.locale,function(r,a){return a?t:e})}},methods:{getRelativeClasses:function(e,t){return void 0===t&&(t=!1),{"q-current-day":e.current,"q-past-day":e.past,"q-future-day":e.future,"q-outside":t}},getStartOfWeek:function(e){return function(e,t,r){if(1===e.day)for(;!t.includes(e.weekday);)N(e);var a=E(e);return V(a,t[0],z,t.length),M(a),r&&I(a,r,a.hasTime),a}(e,this.weekdays,this.times.today)},getEndOfWeek:function(e){return function(e,t,r){if($(e.year,e.month)===e.day)for(;!t.includes(e.weekday);)z(e);var a=E(e);return V(a,t[t.length-1],N,t.length),M(a),r&&I(a,r,a.hasTime),a}(e,this.weekdays,this.times.today)},dayStyleDefault:function(e){}}},_={name:"QCalendarMonthly",mixins:[{name:"QCalendarWeekly",mixins:[p],props:g.weeks,computed:{staticClass:function(){return"q-calendar-weekly"},parsedMinWeeks:function(){return parseInt(this.minWeeks,10)},days:function(){var e=this.parsedMinWeeks*this.weekdays.length;return Y(this.getStartOfWeek(this.parsedStart),this.getEndOfWeek(this.parsedEnd),this.times.today,this.weekdaySkips,this.disabledDays,Number.MAX_SAFE_INTEGER,e)},todayWeek:function(){var e=this.times.today;return Y(this.getStartOfWeek(e),this.getEndOfWeek(e),e,this.weekdaySkips,this.disabledDays,this.weekdays.length,this.weekdays.length)},monthFormatter:function(){var e={timeZone:"UTC",month:"long"},t={timeZone:"UTC",month:"short"};return U(this.locale,function(r,a){return a?t:e})},styles:function(){var e={};if(this.dayHeight>0){var t=G(this.dayHeight);e.height=t}return void 0!==this.dayPadding&&(e.padding=this.dayPadding),e}},methods:{isOutside:function(e){var t=x(e);return t<x(this.parsedStart)||t>x(this.parsedEnd)},isCurrentWeek:function(e){for(var t=0;t<e.length;++t)if(!0===e[t].current)return{timestamp:e[t]};return{timestamp:!1}},__renderHead:function(e){return e("div",{staticClass:"q-calendar-weekly__head"},[!0===this.showWorkWeeks&&this.__renderWorkWeekHead(e),this.__renderHeadDays(e)])},__renderWorkWeekHead:function(e){var t,r,a=new Map,n=this.useDefaultTheme;return!0===this.enableTheme&&(t="colorHeader",r="backgroundHeader",a=this.getThemeColors([t,r]),n=this.setBothColors),e("div",n(a.get(t),a.get(r),{staticClass:"q-calendar-weekly__head-workweek"}),"#")},__renderHeadDays:function(e){var t=this;return this.todayWeek.map(function(r,a){return t.__renderHeadDay(e,r,a)})},__renderHeadDay:function(e,t,r){var a,n,s=this.isOutside(this.days[r]),i=new Map,o=this.useDefaultTheme;return!0===this.enableTheme&&(s?(a="colorHeaderOutside",n="backgroundHeaderOutside"):(a="colorHeader",n="backgroundHeader"),i=this.getThemeColors([a,n]),o=this.setBothColors),e("div",o(i.get(a),i.get(n),{key:t.date,staticClass:"ellipsis q-calendar-weekly__head-weekday",class:this.getRelativeClasses(t,s)}),[this.__renderHeadDayLabel(e,t,this.shortWeekdayLabel)])},__renderHeadDayLabel:function(e,t,r){return e("span",{staticClass:"ellipsis"},this.weekdayFormatter(t,r))},__renderWeeks:function(e){for(var t=this.days,r=this.weekdays.length,a=[],n=0;n<t.length;n+=r)a.push(this.__renderWeek(e,t.slice(n,n+r)));return a},__renderWeek:function(e,t){var r=this;return e("div",{key:t[0].date,staticClass:"q-calendar-weekly__week"},[!0===this.showWorkWeeks&&this.__renderWorkWeekGutter(e,t),t.map(function(t){return r.__renderDay(e,t)})])},__renderWorkWeekGutter:function(e,t){var r,a,n=this.$scopedSlots.workweek,s=t.length>2?t[2]:t[0],i=this.isCurrentWeek(t).timestamp,o=i&&!0===i.current?this.color:void 0,d=G(this.dayHeight),u=new Map,l=this.useDefaultTheme;!0===this.enableTheme&&(i&&!0===i.current||!0===s.current?(r="colorWorkWeekCurrent",a="backgroundWorkWeekCurrent"):i&&!0===i.past||!0===s.past?(r="colorWorkWeekPast",a="backgroundWorkWeekPast"):(i&&!0===i.future||!0===s.future)&&(r="colorWorkWeekFuture",a="backgroundWorkWeekFuture"),u=this.getThemeColors([r,a]),l=this.setBothColors);var c=Number(s.workweek).toLocaleString(this.locale);return e("div",l(void 0!==o?o:u.get(r),u.get(a),{key:s.workweek,staticClass:"q-calendar-weekly__workweek",class:this.getRelativeClasses(!1!==i?i:s,!1),style:{height:this.dayHeight&&this.dayHeight>0?d:"auto"}}),n?n({workweekLabel:c,week:t}):c)},__renderDay:function(e,t){var r,a,n,s=this,i=this.dayStyle||this.dayStyleDefault,o=this.isOutside(t),d=this.$scopedSlots.day,u=Object.assign({},{outside:o},t),l=!1===o&&this.days.find(function(e){return e.month===t.month}).day===t.day&&!0===this.showMonthLabel,c=new Map,h=this.useDefaultTheme;!0===this.enableTheme&&(!0===o?(a="colorBodyOutside",n="backgroundBodyOutside"):!0===t.past?(a="colorBodyPast",n="backgroundBodyPast"):!0===t.current?(a="colorBodyCurrent",n="backgroundBodyCurrent"):!0===t.future&&(a="colorBodyFuture",n="backgroundBodyFuture"),c=this.getThemeColors([a,n]),h=this.setBothColors);var y=Object.assign({},this.styles);return y=Object.assign(y,i(t)),e("div",h(c.get(a),c.get(n),{key:t.date,staticClass:"q-calendar-weekly__day",class:Object.assign({},this.getRelativeClasses(t,o),{"q-calendar-weekly__day--droppable":r}),style:y,domProps:{ondragover:function(e){void 0!==s.dragOverFunc&&(r=s.dragOverFunc(e,t,"day"))},ondrop:function(e){void 0!==s.dropFunc&&s.dropFunc(e,t,"day")}},on:this.getDefaultMouseEventHandlers(":day",function(e){return t})}),[this.__renderDayLabel(e,t),this.showDayOfYearLabel&&!l?this.__renderDayOfYearLabel(e,t):"",l?this.__renderDayMonth(e,t):"",d?d(u):""])},__renderDayLabel:function(e,t){var a,n,s=this.isOutside(t),i=!0===t.current?this.color:void 0,o=this.$scopedSlots["day-label"],d=new Map,u=this.useDefaultTheme;!0===this.enableTheme&&(!0===s?(a="colorDayLabelOutside",n="backgroundDayLabelOutside"):!0===t.past?(a="colorDayLabelPast",n="backgroundDayLabelPast"):!0===t.current?(a="colorDayLabelCurrent",n="backgroundDayLabelCurrent"):!0===t.future&&(a="colorDayLabelFuture",n="backgroundDayLabelFuture"),d=this.getThemeColors([a,n]),u=this.setBothColors);var l=this.dayFormatter(t,!1);return e(r.QBtn,u(void 0!==i?i:d.get(a),d.get(n),{staticClass:"q-calendar-weekly__day-label",props:{unelevated:!0,round:!0,dense:!0,noCaps:!0,outline:!0===t.current,disable:t.disabled},on:this.getMouseEventHandlers({"click:date":{event:"click",stop:!0},"contextmenu:date":{event:"contextmenu",stop:!0,prevent:!0,result:!1}},function(e){return t})}),o?o(Object.assign({},{dayLabel:l},t)):l)},__renderDayOfYearLabel:function(e,t){var r=!0===t.current?this.color:void 0,a=this.$scopedSlots["day-of-year"];return e("div",this.setTextColor(r,{staticClass:"q-calendar-weekly__day-month--day-of-year"}),a?a(t):t.doy)},__renderDayMonth:function(e,t){var r=!0===t.current?this.color:void 0,a=this.$scopedSlots["month-label"],n=this.monthFormatter(t,this.shortMonthLabel);return e("div",this.setTextColor(r,{staticClass:"q-calendar-weekly__day-month"}),a?a(Object.assign({},{monthLabel:n},t)):n)}},render:function(e){return e("div",{staticClass:this.staticClass,nativeOn:{dragstart:function(e){e.preventDefault()}}},[!this.hideHeader&&this.__renderHead(e)].concat(this.__renderWeeks(e)))}}],computed:{staticClass:function(){return"q-calendar-weekly"},parsedStart:function(){return H(B(this.start))},parsedEnd:function(){return T(B(this.end))}}},b={name:"resize",inserted:function(e,t){var r=t.value,a=t.options||{passive:!0};window.addEventListener("resize",r,a),e._onResize={callback:r,options:a},t.modifiers&&t.modifiers.quiet||r()},unbind:function(e){if(e._onResize){var t=e._onResize,r=t.callback,a=t.options;window.removeEventListener("resize",r,a),delete e._onResize}}},k={name:"QCalendarDaily",mixins:[{name:"CalendarWithIntervals",mixins:[p],props:Object.assign({},g.intervals),computed:{parsedIntervalStart:function(){return parseInt(this.intervalStart,10)},parsedIntervalMinutes:function(){return parseInt(this.intervalMinutes,10)},parsedIntervalCount:function(){return parseInt(this.intervalCount,10)},parsedIntervalHeight:function(){return parseFloat(this.intervalHeight)},startMinute:function(){return this.parsedIntervalStart*this.parsedIntervalMinutes},bodyHeight:function(){return this.parsedIntervalCount*this.parsedIntervalHeight},days:function(){return Y(this.parsedStart,this.parsedEnd,this.times.today,this.weekdaySkips,this.disabledDays,this.maxDays)},intervals:function(){var e=this.days,t=this.parsedIntervalStart,r=this.parsedIntervalMinutes,a=this.parsedIntervalCount,n=this.times.now;return 0===e.length&&console.error("QCalendar: days array has no content"),e.map(function(e){return function(e,t,r,a,n){for(var s=[],i=0;i<a;++i){var o=(t+i)*r,d=E(e);s.push(L(d,o,n))}return s}(e,t,r,a,n)})},intervalFormatter:function(){var e={timeZone:"UTC",hour12:!this.hour24Format,hour:"2-digit",minute:"2-digit"},t={timeZone:"UTC",hour12:!this.hour24Format,hour:"numeric",minute:"2-digit"},r={timeZone:"UTC",hour12:!this.hour24Format,hour:"numeric"};return U(this.locale,function(a,n){return n?0===a.minute?r:t:e})}},methods:{showIntervalLabelDefault:function(e){var t=this.intervals[0][0];return!(t.hour===e.hour&&t.minute===e.minute)&&0===e.minute},intervalStyleDefault:function(e){},getTimestampAtEvent:function(e,t){var r=E(t),a=e.currentTarget.getBoundingClientRect(),n=this.startMinute,s=e,i=e,o=s.changedTouches||s.touches,d=((o&&o[0]?o[0].clientY:i.clientY)-a.top)/this.parsedIntervalHeight;return L(r,n+Math.floor(d*this.parsedIntervalMinutes),this.times.now)},getScopeForSlot:function(e,t){var r=E(e);return r.timeStartPos=this.timeStartPos,r.timeDurationHeight=this.timeDurationHeight,void 0!==t&&(r.index=t),r},scrollToTime:function(e){var t=this.timeStartPos(e),r=this.$refs.scrollArea;return!(!1===t||!r)&&(r.scrollTop=t,!0)},timeDurationHeight:function(e){return e/this.parsedIntervalMinutes*this.parsedIntervalHeight},timeStartPos:function(e,t){void 0===t&&(t=!0);var r=function(e){if("number"==typeof e)return e;if("string"==typeof e){var t=n.exec(e);return!!t&&60*parseInt(t[1],10)+parseInt(t[3]||0,10)}return"object"==typeof e&&"number"==typeof e.hour&&"number"==typeof e.minute&&60*e.hour+e.minute}(e);if(!1===r)return!1;var a=(r-this.startMinute)/(this.parsedIntervalCount*this.parsedIntervalMinutes)*this.bodyHeight;return t&&(a<0&&(a=0),a>this.bodyHeight&&(a=this.bodyHeight)),a}}}],directives:{Resize:b},data:function(){return{scrollWidth:0}},computed:{classes:function(){return{"q-calendar-daily":!0}}},mounted:function(){this.init()},watch:{noScroll:function(e){!0===e?this.scrollWidth=0:this.$nextTick(this.onResize)}},methods:{init:function(){this.$nextTick(this.onResize)},onResize:function(){this.scrollWidth=this.getScrollWidth()},getScrollWidth:function(){var e=this.$refs.scrollArea,t=this.$refs.pane;return e&&t?e.offsetWidth-t.offsetWidth:0},__renderHead:function(e){return e("div",{staticClass:"q-calendar-daily__head",style:{marginRight:this.scrollWidth+"px"}},[this.__renderHeadIntervals(e)].concat(this.__renderHeadDays(e)))},__renderHeadIntervals:function(e){var t,r,a=this.$scopedSlots["intervals-header"],n=new Map,s=this.useDefaultTheme;return!0===this.enableTheme&&(t="colorIntervalHeader",r="backgroundIntervalHeader",n=this.getThemeColors([t,r]),s=this.setBothColors),e("div",s(n.get(t),n.get(r),{staticClass:"q-calendar-daily__intervals-head q-calendar-daily__intervals-head--text"}),[a&&a(this.days)])},__renderHeadDays:function(e){var t=this;return 1===this.days.length&&void 0!==this.columnCount&&parseInt(this.columnCount,10)>0?Array.apply(null,new Array(parseInt(this.columnCount,10))).map(function(e,r){return r+parseInt(t.columnIndexStart,10)}).map(function(r){return t.__renderHeadDay(e,t.days[0],r)}):this.days.map(function(r){return t.__renderHeadDay(e,r)})},__renderHeadDay:function(e,t,r){var a,n,s,i=this,o=this.$scopedSlots["day-header"],d=this.getScopeForSlot(t,r),u=100/this.days.length,l=new Map,c=this.useDefaultTheme;return!0===this.enableTheme&&(!0===t.past?(n="colorHeaderPast",s="backgroundHeaderPast"):!0===t.current?(n="colorHeaderCurrent",s="backgroundHeaderCurrent"):!0===t.future&&(n="colorHeaderFuture",s="backgroundHeaderFuture"),l=this.getThemeColors([n,s]),c=this.setBothColors),e("div",c(l.get(n),l.get(s),{key:t.date+(void 0!==r?"-"+r:""),staticClass:"q-calendar-daily__head-day",class:Object.assign({},this.getRelativeClasses(t),{"q-calendar-daily__head-day--droppable":a}),style:{maxWidth:u+"%"},domProps:{ondragover:function(e){void 0!==i.dragOverFunc&&(a=i.dragOverFunc(e,t,"day",r))},ondrop:function(e){void 0!==i.dropFunc&&i.dropFunc(e,t,"day",r)}},on:this.getDefaultMouseEventHandlers(":day",function(e){return d})}),[!0===this.columnHeaderBefore&&this.__renderColumnHeaderBefore(e,t,r),!0!==this.noDefaultHeaderText&&this.__renderHeadWeekday(e,t),!0!==this.noDefaultHeaderBtn&&this.__renderHeadDayBtn(e,t),o&&o(d),!0===this.columnHeaderAfter&&this.__renderColumnHeaderAfter(e,t,r)])},__renderHeadWeekday:function(e,t){var r,a,n=!0===t.current?this.color:void 0,s=new Map,i=this.useDefaultTheme;return!0===this.enableTheme&&(!0===t.past?(r="colorDayLabelPast",a="backgroundDayLabelPast"):!0===t.current?(r="colorDayLabelCurrent",a="backgroundDayLabelCurrent"):!0===t.future&&(r="colorDayLabelFuture",a="backgroundDayLabelFuture"),s=this.getThemeColors([r,a]),i=this.setBothColors),e("div",i(void 0!==n?n:s.get(r),s.get(a),{staticClass:"ellipsis q-calendar-daily__head-weekday"}),[this.__renderHeadDayLabel(e,t,this.shortWeekdayLabel)])},__renderHeadDayLabel:function(e,t,r){return e("span",{staticClass:"ellipsis"},this.weekdayFormatter(t,r))},__renderHeadDayBtn:function(e,t){var a,n,s=!0===t.current?this.color:void 0,i=new Map,o=this.useDefaultTheme;return!0===this.enableTheme&&(!0===t.past?(a="colorDayLabelPast",n="backgroundDayLabelPast"):!0===t.current?(a="colorDayLabelCurrent",n="backgroundDayLabelCurrent"):!0===t.future&&(a="colorDayLabelFuture",n="backgroundDayLabelFuture"),i=this.getThemeColors([a,n]),o=this.setBothColors),e(r.QBtn,o(void 0!==s?s:i.get(a),i.get(n),{staticClass:"q-calendar-daily__head-day-label",style:{color:!0===t.current?s:void 0},props:{unelevated:!0,round:!0,dense:!0,noCaps:!0,outline:!0===t.current,disable:t.disabled},on:this.getMouseEventHandlers({"click:date":{event:"click",stop:!0},"contextmenu:date":{event:"contextmenu",stop:!0,prevent:!0,result:!1}},function(e){return t})}),this.dayFormatter(t,!1))},__renderColumnHeaderBefore:function(e,t,r){var a=this.$scopedSlots["column-header-before"],n=Object.assign({},t);return n.index=r,e("div",{staticClass:"q-calendar-daily__column-header--before"},[a&&a(n)])},__renderColumnHeaderAfter:function(e,t,r){var a=this.$scopedSlots["column-header-after"],n=Object.assign({},t);return n.index=r,e("div",{staticClass:"q-calendar-daily__column-header--after"},[a&&a(n)])},__renderBody:function(e){return e("div",{staticClass:"q-calendar-daily__body"},[this.__renderScrollArea(e)])},__renderScrollArea:function(e){return void 0!==this.noScroll&&!0===this.noScroll?this.__renderPane(e):e("div",{ref:"scrollArea",staticClass:"q-calendar-daily__scroll-area"},[this.__renderPane(e)])},__renderPane:function(e){return e("div",{ref:"pane",staticClass:"q-calendar-daily__pane",style:{height:G(this.bodyHeight)}},[this.__renderDayContainer(e)])},__renderDayContainer:function(e){var t=this.$scopedSlots["day-container"];return e("div",{staticClass:"q-calendar-daily__day-container"},[this.__renderBodyIntervals(e)].concat(this.__renderDays(e),[t&&t(this.days)]))},__renderDays:function(e){var t=this;return 1===this.days.length&&this.columnCount&&parseInt(this.columnCount,10)>0?Array.apply(null,new Array(parseInt(this.columnCount,10))).map(function(e,r){return r+parseInt(t.columnIndexStart,10)}).map(function(r){return t.__renderDay(e,t.days[0],0,r)}):this.days.map(function(r,a){return t.__renderDay(e,r,a)})},__renderDay:function(e,t,r,a){var n,s,i=this,o=this.$scopedSlots["day-body"],d=this.getScopeForSlot(t,a),u=100/this.days.length,l=new Map,c=this.useDefaultTheme;return!0===this.enableTheme&&(!0===t.past?(n="colorBodyPast",s="backgroundBodyPast"):!0===t.current?(n="colorBodyCurrent",s="backgroundBodyCurrent"):!0===t.future&&(n="colorBodyFuture",s="backgroundBodyFuture"),l=this.getThemeColors([n,s]),c=this.setBothColors),e("div",c(l.get(n),l.get(s),{key:t.date+(void 0!==a?":"+a:""),staticClass:"q-calendar-daily__day",class:this.getRelativeClasses(t),style:{maxWidth:u+"%"},on:this.getDefaultMouseEventHandlers(":time",function(e){return i.getScopeForSlot(i.getTimestampAtEvent(e,t),a)})}),this.__renderDayIntervals(e,r,a).concat([o&&o(d)]))},__renderDayIntervals:function(e,t,r){var a=this;return this.intervals[t].map(function(t){return a.__renderDayInterval(e,t,r)})},__renderDayInterval:function(e,t,r){var a,n=this,s=G(this.intervalHeight),i=this.intervalStyle||this.intervalStyleDefault,o=this.$scopedSlots.interval,d=this.getScopeForSlot(t,r);return e("div",{key:t.time,staticClass:"q-calendar-daily__day-interval",class:{"q-calendar-daily__day-interval--droppable":a},style:Object.assign({},{height:s},i(t)),domProps:{ondragover:function(e){void 0!==n.dragOverFunc&&(a=n.dragOverFunc(e,t,"interval"))},ondrop:function(e){void 0!==n.dropFunc&&n.dropFunc(e,t,"interval")}}},o?o(d):void 0)},__renderBodyIntervals:function(e){var t,r,a=this,n=new Map,s=this.useDefaultTheme;!0===this.enableTheme&&(t="colorIntervalBody",r="backgroundIntervalBody",n=this.getThemeColors([t,r]),s=this.setBothColors);var i={staticClass:"q-calendar-daily__intervals-body",on:this.getDefaultMouseEventHandlers(":interval",function(e){return a.getTimestampAtEvent(e,a.parsedStart)})};return e("div",s(n.get(t),n.get(r),i),this.__renderIntervalLabels(e))},__renderIntervalLabels:function(e){var t=this;return this.intervals[0].map(function(r){return t.__renderIntervalLabel(e,r)})},__renderIntervalLabel:function(e,t){var r,a,n=G(this.intervalHeight),s=this.shortIntervalLabel,i=(this.showIntervalLabel||this.showIntervalLabelDefault)(t)?this.intervalFormatter(t,s):void 0,o=new Map,d=this.useDefaultTheme;return!0===this.enableTheme&&(r="colorIntervalText",a="backgroundIntervalText",o=this.getThemeColors([r,a]),d=this.setBothColors),e("div",{key:t.time,staticClass:"q-calendar-daily__interval",style:{height:n}},[e("div",d(o.get(r),o.get(a),{staticClass:"q-calendar-daily__interval-text"}),i)])}},render:function(e){return e("div",{class:this.classes,directives:[{modifiers:{quiet:!0},name:"resize",value:this.onResize}]},[!this.hideHeader&&this.__renderHead(e),this.__renderBody(e)])}},C={name:"QCalendarScheduler",mixins:[{name:"CalendarWithScheduler",mixins:[p],props:Object.assign({},g.scheduler),computed:{parsedResourceHeight:function(){return parseFloat(this.resourceHeight)},parsedResourceWidth:function(){return parseFloat(this.resourceWidth)},bodyHeight:function(){return this.resources&&this.resources.length>0?this.resources.length*this.parsedResourceHeight:0},days:function(){return Y(this.parsedStart,this.parsedEnd,this.times.today,this.weekdaySkips,this.disabledDays,this.maxDays)}},methods:{resourceStyleDefault:function(e){},getTimestampAtEvent:function(e,t){return I(E(t),this.times.now,!1)},getScopeForSlot:function(e,t,r){var a={};return a.day=E(e),void 0!==t&&(a.index=t),void 0!==r&&(a.resource=r),a}}}],directives:{Resize:b},data:function(){return{scrollWidth:0}},computed:{classes:function(){return{"q-calendar-scheduler":!0}}},mounted:function(){this.init()},watch:{noScroll:function(e){!0===e?this.scrollWidth=0:this.$nextTick(this.onResize)}},methods:{init:function(){this.$nextTick(this.onResize)},onResize:function(){this.scrollWidth=this.getScrollWidth()},getScrollWidth:function(){var e=this.$refs.scrollArea,t=this.$refs.pane;return e&&t?e.offsetWidth-t.offsetWidth:0},resourceStartPos:function(e,t){void 0===t&&(t=!0);var r=this.resource.indexOf(e)*this.parsedResourceHeight;return t&&(r<0&&(r=0),r>this.bodyHeight&&(r=this.bodyHeight)),r},__renderHead:function(e){return e("div",{staticClass:"q-calendar-scheduler__head",style:{marginRight:this.scrollWidth+"px"}},[this.__renderHeadResources(e)].concat(this.__renderHeadDays(e)))},__renderHeadResources:function(e){var t,r,a=this.$scopedSlots["scheduler-resources-header"],n=G(this.resourceWidth),s=new Map,i=this.useDefaultTheme;return!0===this.enableTheme&&(t="colorSchedulerHeader",r="backgroundSchedulerHeader",s=this.getThemeColors([t,r]),i=this.setBothColors),e("div",i(s.get(t),s.get(r),{staticClass:"q-calendar-scheduler__resources-head q-calendar-scheduler__resources-head--text",style:{width:n}}),[a&&a(this.days)])},__renderHeadDays:function(e){var t=this;return 1===this.days.length&&this.columnCount&&parseInt(this.columnCount,10)>0?Array.apply(null,new Array(parseInt(this.columnCount,10))).map(function(e,r){return r+parseInt(t.columnIndexStart,10)}).map(function(r){return t.__renderHeadDay(e,t.days[0],r)}):this.days.map(function(r){return t.__renderHeadDay(e,r)})},__renderHeadDay:function(e,t,r){var a,n,s,i=this,o=this.$scopedSlots["scheduler-day-header"],d=this.getScopeForSlot(t,r),u=100/this.days.length,l=new Map,c=this.useDefaultTheme;return!0===this.enableTheme&&(!0===t.past?(n="colorHeaderPast",s="backgroundHeaderPast"):!0===t.current?(n="colorHeaderCurrent",s="backgroundHeaderCurrent"):!0===t.future&&(n="colorHeaderFuture",s="backgroundHeaderFuture"),l=this.getThemeColors([n,s]),c=this.setBothColors),e("div",c(l.get(n),l.get(s),{key:t.date+(void 0!==r?"-"+r:""),staticClass:"q-calendar-scheduler__head-day",class:Object.assign({},this.getRelativeClasses(t),{"q-calendar-scheduler__head-day--droppable":a}),style:{maxWidth:u+"%"},domProps:{ondragover:function(e){void 0!==i.dragOverFunc&&(a=i.dragOverFunc(e,t,"day",r))},ondrop:function(e){void 0!==i.dropFunc&&i.dropFunc(e,t,"day",r)}},on:this.getDefaultMouseEventHandlers(":day",function(e){return d})}),[!0===this.columnHeaderBefore&&this.__renderColumnHeaderBefore(e,t,r),!0!==this.noDefaultHeaderText&&this.__renderHeadWeekday(e,t,r),!0!==this.noDefaultHeaderBtn&&this.__renderHeadDayBtn(e,t,r),o&&o(d),!0===this.columnHeaderAfter&&this.__renderColumnHeaderAfter(e,t,r)])},__renderHeadWeekday:function(e,t){var r,a,n=!0===t.current?this.color:void 0,s=new Map,i=this.useDefaultTheme;return!0===this.enableTheme&&(!0===t.past?(r="colorDayLabelPast",a="backgroundDayLabelPast"):!0===t.current?(r="colorDayLabelCurrent",a="backgroundDayLabelCurrent"):!0===t.future&&(r="colorDayLabelFuture",a="backgroundDayLabelFuture"),s=this.getThemeColors([r,a]),i=this.setBothColors),e("div",i(void 0!==n?n:s.get(r),s.get(a),{staticClass:"ellipsis q-calendar-scheduler__head-weekday"}),[this.__renderHeadDayLabel(e,t,this.shortWeekdayLabel)])},__renderHeadDayLabel:function(e,t,r){return e("span",{staticClass:"ellipsis"},this.weekdayFormatter(t,r))},__renderHeadDayBtn:function(e,t,a){var n,s,i=!0===t.current?this.color:void 0,o={day:t,idx:a},d=new Map,u=this.useDefaultTheme;return!0===this.enableTheme&&(!0===t.past?(n="colorDayLabelPast",s="backgroundDayLabelPast"):!0===t.current?(n="colorDayLabelCurrent",s="backgroundDayLabelCurrent"):!0===t.future&&(n="colorDayLabelFuture",s="backgroundDayLabelFuture"),d=this.getThemeColors([n,s]),u=this.setBothColors),e(r.QBtn,u(void 0!==i?i:d.get(n),d.get(s),{staticClass:"q-calendar-scheduler__head-day-label",style:{color:!0===t.current?i:void 0},props:{unelevated:!0,round:!0,dense:!0,noCaps:!0,outline:!0===t.current,disable:t.disabled},on:this.getMouseEventHandlers({"click:date":{event:"click",stop:!0},"contextmenu:date":{event:"contextmenu",stop:!0,prevent:!0,result:!1}},function(e){return o})}),this.dayFormatter(t,!1))},__renderColumnHeaderBefore:function(e,t,r){var a=this.$scopedSlots["scheduler-column-header-before"],n=Object.assign({},t);return n.index=r,e("div",{staticClass:"q-calendar-scheduler__column-header--before"},[a&&a(n)])},__renderColumnHeaderAfter:function(e,t,r){var a=this.$scopedSlots["scheduler-column-header-after"],n=Object.assign({},t);return n.index=r,e("div",{staticClass:"q-calendar-scheduler__column-header--after"},[a&&a(n)])},__renderBody:function(e){return e("div",{staticClass:"q-calendar-scheduler__body"},[this.__renderScrollArea(e)])},__renderScrollArea:function(e){return void 0!==this.noScroll&&!0===this.noScroll?this.__renderPane(e):e("div",{ref:"scrollArea",staticClass:"q-calendar-scheduler__scroll-area"},[this.__renderPane(e)])},__renderPane:function(e){return e("div",{ref:"pane",staticClass:"q-calendar-scheduler__pane",style:{height:G(this.bodyHeight)}},[this.__renderDayContainer(e)])},__renderDayContainer:function(e){return e("div",{staticClass:"q-calendar-scheduler__day-container"},[this.__renderBodyResources(e)].concat(this.__renderDays(e)))},__renderDays:function(e){var t=this;return 1===this.days.length&&this.columnCount&&parseInt(this.columnCount,10)>0?Array.apply(null,new Array(parseInt(this.columnCount,10))).map(function(e,r){return r+parseInt(t.columnIndexStart,10)}).map(function(r){return t.__renderDay(e,t.days[0],0,r)}):this.days.map(function(r,a){return t.__renderDay(e,r,a)})},__renderDay:function(e,t,r){var a,n,s=100/this.days.length,i=new Map,o=this.useDefaultTheme;return!0===this.enableTheme&&(!0===t.past?(a="colorBodyPast",n="backgroundBodyPast"):!0===t.current?(a="colorBodyCurrent",n="backgroundBodyCurrent"):!0===t.future&&(a="colorBodyFuture",n="backgroundBodyFuture"),i=this.getThemeColors([a,n]),o=this.setBothColors),e("div",o(i.get(a),i.get(n),{key:t.date+(void 0!==r?":"+r:""),staticClass:"q-calendar-scheduler__day",class:this.getRelativeClasses(t),style:{maxWidth:s+"%"}}),[].concat(this.__renderDayResources(e,t,r)))},__renderDayResources:function(e,t,r){var a=this;return this.resources.map(function(n){return a.__renderDayResource(e,n,t,r)})},__renderDayResource:function(e,t,r,a){var n,s=this,i=G(this.resourceHeight),o=this.resourceStyle||this.resourceStyleDefault,d=this.$scopedSlots["scheduler-resource-day"],u=this.getScopeForSlot(r,a,t),l={height:i};return l=Object.assign(l,o(u)),e("div",{key:t[this.resourceKey]+"-"+a,staticClass:"q-calendar-scheduler__day-resource",class:{"q-calendar-scheduler__day-resource--droppable":n},style:l,domProps:{ondragover:function(e){void 0!==s.dragOverFunc&&(n=s.dragOverFunc(e,t,"resource",a))},ondrop:function(e){void 0!==s.dropFunc&&s.dropFunc(e,t,"resource",a)}},on:this.getDefaultMouseEventHandlers(":resource:day",function(e){return s.getScopeForSlot(s.getTimestampAtEvent(e,r),a,t)})},d?d(u):void 0)},__renderBodyResources:function(e){var t,r,a=G(this.resourceWidth),n=new Map,s=this.useDefaultTheme;!0===this.enableTheme&&(t="colorSchedulerBody",r="backgroundSchedulerBody",n=this.getThemeColors([t,r]),s=this.setBothColors);var i={staticClass:"q-calendar-scheduler__resources-body",style:{width:a}};return e("div",s(n.get(t),n.get(r),i),this.__renderResourceLabels(e))},__renderResourceLabels:function(e){var t=this;return this.resources.map(function(r,a){return t.__renderResourceLabel(e,r,a)})},__renderResourceLabel:function(e,t,r){var a,n,s=this.$scopedSlots["scheduler-resource"],i={resource:t,index:r},o=G(this.resourceHeight),d=t.label,u=new Map,l=this.useDefaultTheme;return!0===this.enableTheme&&(a="colorSchedulerText",n="backgroundSchedulerText",u=this.getThemeColors([a,n]),l=this.setBothColors),e("div",{key:t.label,staticClass:"q-calendar-scheduler__resource",style:{height:o},on:this.getDefaultMouseEventHandlers(":resource",function(e){return i})},[s?s(i):e("div",l(u.get(a),u.get(n),{staticClass:"q-calendar-scheduler__resource-text"}),d)])},__renderResourcesError:function(e){return e("div",{},"No resources have been defined")}},render:function(e){return e("div",{class:this.classes,directives:[{modifiers:{quiet:!0},name:"resize",value:this.onResize}]},[!this.hideHeader&&void 0!==this.resources&&this.__renderHead(e),void 0!==this.resources&&this.__renderBody(e),void 0===this.resources&&this.__renderResourcesError(e)])}},w={name:"QCalendarAgenda",mixins:[k],methods:{__renderHead:function(e){return e("div",{staticClass:"q-calendar-daily__head",style:{marginRight:this.scrollWidth+"px"}},[].concat(this.__renderHeadDays(e)))},__renderPane:function(e){return e("div",{ref:"pane",staticClass:"q-calendar-daily__pane",style:{}},[this.__renderDayContainer(e)])},__renderBodyIntervals:function(e){},__renderDayIntervals:function(e,t,r){return[]},__renderDay:function(e,t,r,a){var n,s,i,o=this,d=this.$scopedSlots["day-body"],u=Object.assign({},t),l=100/this.days.length,c=new Map,h=this.useDefaultTheme;return!0===this.enableTheme&&(!0===t.past?(s="colorBodyPast",i="backgroundBodyPast"):!0===t.current?(s="colorBodyCurrent",i="backgroundBodyCurrent"):!0===t.future&&(s="colorBodyFuture",i="backgroundBodyFuture"),c=this.getThemeColors([s,i]),h=this.setBothColors),e("div",h(c.get(s),c.get(i),{key:t.date+(void 0!==a?":"+a:""),staticClass:"q-calendar-daily__day",class:Object.assign({},this.getRelativeClasses(t),{"q-calendar-daily__day--droppable":n}),style:{maxWidth:l+"%"},domProps:{ondragover:function(e){void 0!==o.dragOverFunc&&(n=o.dragOverFunc(e,t,"day"))},ondrop:function(e){void 0!==o.dropFunc&&o.dropFunc(e,t,"day")}},on:this.getDefaultMouseEventHandlers(":time",function(e){return o.getScopeForSlot(o.getTimestampAtEvent(e,t),a)})}),this.__renderDayIntervals(e,r,a).concat([d&&d(u)]))}},render:function(e){return e("div",{class:this.classes,directives:[{modifiers:{quiet:!0},name:"resize",value:this.onResize}]},[!this.hideHeader&&this.__renderHead(e),this.__renderBody(e)])}},D={name:"QCalendar",mixins:[p],props:Object.assign({},g.calendar,g.weeks,g.intervals,g.scheduler),data:function(){return{lastStart:void 0,lastEnd:void 0}},computed:{parsedValue:function(){return B(this.value)||this.parsedStart||this.times.today},renderProps:function(){var e=this.parsedValue,t="div",r=this.maxDays,a=e,n=e;switch(this.view){case"month":t=_,a=H(e),n=T(e);break;case"week":case"week-agenda":case"week-scheduler":t=this.view.endsWith("-agenda")?w:this.view.endsWith("-scheduler")?C:k,a=this.getStartOfWeek(e),n=this.getEndOfWeek(e),r=this.weekdays.length;break;case"day":case"day-scheduler":case"day-agenda":t=this.view.endsWith("-agenda")?w:this.view.endsWith("-scheduler")?C:k,r=1,M(n=Q(E(n),N,r,this.weekdays));break;case"2day":case"2day-scheduler":case"2day-agenda":t=this.view.endsWith("-agenda")?w:this.view.endsWith("-scheduler")?C:k,r=2,M(n=Q(E(n),N,r,this.weekdays));break;case"3day":case"3day-scheduler":case"3day-agenda":t=this.view.endsWith("-agenda")?w:this.view.endsWith("-scheduler")?C:k,r=3,M(n=Q(E(n),N,r,this.weekdays));break;case"4day":case"4day-scheduler":case"4day-agenda":t=this.view.endsWith("-agenda")?w:this.view.endsWith("-scheduler")?C:k,r=4,M(n=Q(E(n),N,r,this.weekdays));break;case"5day":case"5day-scheduler":case"5day-agenda":t=this.view.endsWith("-agenda")?w:this.view.endsWith("-scheduler")?C:k,r=5,M(n=Q(E(n),N,r,this.weekdays));break;case"6day":case"6day-scheduler":case"6day-agenda":t=this.view.endsWith("-agenda")?w:this.view.endsWith("-scheduler")?C:k,r=6,M(n=Q(E(n),N,r,this.weekdays));break;case"custom-interval":case"custom-scheduler":case"custom-agenda":t=this.view.endsWith("-agenda")?w:this.view.endsWith("-scheduler")?C:k,M(n=Q(E(n),N,this.maxDays,this.weekdays));break;case"scheduler":case"agenda":t="scheduler"===this.view?C:w,M(n=Q(E(n),N,this.maxDays,this.weekdays));break;case"month-interval":case"month-scheduler":case"month-agenda":t=this.view.endsWith("-agenda")?w:this.view.endsWith("-scheduler")?C:k,a=H(e),M(n=T(e)),r=31}return{component:t,start:a,end:n,maxDays:r}}},watch:{renderProps:"__checkChange"},methods:{__checkChange:function(e,t){var r=this.renderProps,a=r.start,n=r.end;this.keyValue=0,void 0!==this.lastStart&&void 0!==this.lastEnd&&a.date===this.lastStart&&n.date===this.lastEnd||(this.lastStart=a.date,this.lastEnd=n.date,this.$emit("change",{start:a,end:n})),this.keyValue=x(a)},move:function(e){void 0===e&&(e=1);var t=E(this.parsedValue),r=e>0,a=r?N:z,n=r?31:l,s=r?e:-e;this.direction=r?"next":"prev";this.maxDays;for(var i,o=this.weekdaySkips.filter(function(e){return 0!==e}).length;--s>=0;)switch(this.view){case"month":t.day=n,a(t);break;case"week":case"week-scheduler":case"week-agenda":Q(t,a,o,this.weekdays);break;case"day":case"day-scheduler":case"day-agenda":Q(t,a,1,this.weekdays);break;case"2day":case"2day-scheduler":case"2day-agenda":Q(t,a,2,this.weekdays);break;case"3day":case"3day-scheduler":case"3day-agenda":Q(t,a,3,this.weekdays);break;case"4day":case"4day-scheduler":case"4day-agenda":Q(t,a,4,this.weekdays);break;case"5day":case"5day-scheduler":case"5day-agenda":Q(t,a,5,this.weekdays);break;case"6day":case"6day-scheduler":case"6day-agenda":Q(t,a,6,this.weekdays);break;case"custom-interval":case"custom-scheduler":case"custom-agenda":case"agenda":Q(t,a,this.maxDays,this.weekdays);break;case"month-interval":case"month-agenda":case"month-scheduler":t.day=n,a(t)}(i=t).weekday=R(i),M(t),function(e){e.doy=P(e)}(t),I(t,this.times.now),this.$emit("input",t.date),this.$emit("moved",t)},next:function(e){void 0===e&&(e=1),this.move(e)},prev:function(e){void 0===e&&(e=1),this.move(-e)},timeStartPos:function(e,t){void 0===t&&(t=!0);var r=this.$children[0];return!(!r||!r.timeStartPos)&&r.timeStartPos(e,t)},timeDurationHeight:function(e){var t=this.$children[0];return t&&t.timeDurationHeight?t.timeDurationHeight(e):-1},scrollToTime:function(e){var t=this.$children[0];return!(!t||!t.scrollToTime)&&t.scrollToTime(e)},__renderComponent:function(e,t,r){return e(t,r)}},render:function(e){var t=this,r=this.renderProps,a=r.start,n=r.end,s=r.maxDays,i=r.component,o={staticClass:"q-calendar",key:this.keyValue,props:Object.assign({},this.$props,{start:a.date,end:n.date,maxDays:s}),on:Object.assign({},this.$listeners,{"click:date":function(e){void 0!==t.$listeners.input&&(void 0!==e.date?t.$emit("input",e.date):void 0!==e.day&&void 0!==e.day.date&&t.$emit("input",e.day.date)),t.$listeners["click:date"]&&t.$emit("click:date",e)}}),scopedSlots:this.$scopedSlots};return!0===this.animated?e("transition",{props:{name:"q-transition--"+("prev"===this.direction?this.transitionPrev:this.transitionNext),appear:!0}},[this.__renderComponent(e,i,o)]):this.__renderComponent(e,i,o)}},S={version:"1.2.3",Component:D,install:function(e){e.component(D.name,D)}};t.use(S),e.Component=D,e.version="1.2.3",Object.defineProperty(e,"__esModule",{value:!0})}else console.error("[ Quasar ] Vue is required to run. Please add a script tag for it before loading Quasar.");function H(e){var t=E(e);return t.day=l,M(t),t}function T(e){var t=E(e);return t.day=$(t.year,t.month),M(t),t}function W(e){return!!a.exec(e)}function B(e,t){var r=function(e){var t=a.exec(e);return t?{date:e,time:"",year:parseInt(t[1],10),month:parseInt(t[2],10),day:parseInt(t[4],10)||1,hour:parseInt(t[6],10)||0,minute:parseInt(t[8],10)||0,weekday:0,doy:0,workweek:0,hasDay:!!t[4],hasTime:!(!t[6]||!t[8]),past:!1,current:!1,future:!1,disabled:!1}:null}(e);return null===r?null:(M(r),t&&I(r,t,r.hasTime),r)}function F(e){return M({date:"",time:"",year:e.getFullYear(),month:e.getMonth()+1,day:e.getDate(),weekday:e.getDay(),hour:e.getHours(),minute:e.getMinutes(),doy:0,workweek:0,hasDay:!0,hasTime:!0,past:!1,current:!0,future:!1,disabled:!1})}function x(e){return 1e4*e.year+100*e.month+e.day}function q(e){return 100*e.hour+e.minute}function I(e,t,r){void 0===r&&(r=!1);var a=x(t),n=x(e),s=a===n;return e.hasTime&&r&&s&&(s=(a=q(t))===(n=q(e))),e.past=n<a,e.current=s,e.future=n>a,e}function L(e,t,r){return e.hasTime=!0,e.hour=Math.floor(t/h),e.minute=t%h,e.time=j(e),r&&I(e,r,!0),e}function O(e,t){if(Array.isArray(t)&&0!==t.length){var r=x(e);for(var a in t){if(x(B(t[a]+" 00:00"))===r){e.disabled=!0;break}}}}function M(e){return e.time=j(e),e.date=function(e){var t=A(e.year,4)+"-"+A(e.month,2);e.hasDay&&(t+="-"+A(e.day,2));return t}(e),e.weekday=R(e),e.doy=P(e),e.workweek=function(e){if(0===e.year)return;var t=new Date(Date.UTC(e.year,e.month-1,e.day,0,0));return r.date.getWeekOfYear(t)}(e),e}function P(e){if(0!==e.year){var t=new Date(Date.UTC(e.year,e.month-1,e.day,0,0));return r.date.getDayOfYear(t)}}function R(e){if(e.hasDay){var t=Math.floor,r=e.day,a=(e.month+9)%d+1,n=t(e.year/100),s=e.year%100-(e.month<=2?1:0);return((r+t(2.6*a-.2)-2*n+s+t(s/4)+t(n/4))%7+7)%7}return e.weekday}function $(e,t){return function(e){return e%4==0&&e%100!=0||e%400==0}(e)?i[t]:s[t]}function E(e){return Object.assign({},e)}function A(e,t){for(var r=String(e);r.length<t;)r="0"+r;return r}function j(e){return e.hasTime?A(e.hour,2)+":"+A(e.minute,2):""}function N(e){return++e.day,e.weekday=(e.weekday+1)%c,e.day>o&&e.day>$(e.year,e.month)&&(e.day=l,++e.month,e.month>d&&(e.month=u,++e.year)),e}function z(e){return e.day--,e.weekday=(e.weekday+6)%c,e.day<l&&(e.month--,e.month<u&&(e.year--,e.month=d),e.day=$(e.year,e.month)),e}function Q(e,t,r,a){for(void 0===t&&(t=N),void 0===r&&(r=1),void 0===a&&(a=[0,1,2,3,4,5,6]);--r>=0;)t(e),a.length<7&&!a.includes(e.weekday)&&++r;return e}function V(e,t,r,a){for(void 0===r&&(r=N),void 0===a&&(a=6);e.weekday!==t&&--a>=0;)r(e);return e}function Y(e,t,r,a,n,s,i){void 0===n&&(n=[]),void 0===s&&(s=42),void 0===i&&(i=0);var o=x(t),d=[],u=E(e),l=0,c=l===o;if(o<x(e))return d;for(;(!c||d.length<i)&&d.length<s&&(l=x(u),!(c=c||l>o));)if(0!==a[u.weekday]){var h=E(u);M(h),I(h,r),O(h,n),d.push(h),u=Q(u,N)}else u=N(u);return d}function U(e,t){return"undefined"==typeof Intl||void 0===Intl.DateTimeFormat?function(e,t){return""}:function(r,a){try{return new Intl.DateTimeFormat(e||void 0,t(r,a)).format(new Date(Date.UTC(r.year,r.month-1,r.day,r.hour,r.minute)))}catch(e){return""}}}function Z(e){return isFinite(parseInt(e,10))}function G(e,t){return void 0===t&&(t="px"),null==e||""===e?void 0:isNaN(e)?String(e):""+Number(e)+t}});
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("vue"),require("quasar")):"function"==typeof define&&define.amd?define(["exports","vue","quasar"],t):t((e=e||self).QCalendar={},e.Vue,e.Quasar)}(this,function(e,t,r){"use strict";if(void 0!==t){t=t&&t.hasOwnProperty("default")?t.default:t;var a=/^(\d{4})-(\d{1,2})(-(\d{1,2}))?([^\d]+(\d{1,2}))?(:(\d{1,2}))?(:(\d{1,2}))?$/,n=/(\d\d?)(:(\d\d?)|)(:(\d\d?)|)/,s=[0,31,28,31,30,31,30,31,31,30,31,30,31],i=[0,31,29,31,30,31,30,31,31,30,31,30,31],o=28,d=12,u=1,l=1,c=7,h=60,y={name:"Times",props:{now:{type:String,validator:function(e){return""===e||W(e)}}},data:function(){return{times:{now:B("0000-00-00 00:00"),today:B("0000-00-00")}}},computed:{parsedNow:function(){return this.now?B(this.now):null}},watch:{parsedNow:"updateCurrent"},created:function(){this.updateCurrent(),this.setCurrent()},methods:{setCurrent:function(){this.times.now.current=this.times.today.current=!0,this.times.now.past=this.times.today.past=!1,this.times.now.future=this.times.today.future=!1},updateCurrent:function(){var e=this.parsedNow||this.getNow();this.updateDay(e,this.times.now),this.updateTime(e,this.times.now),this.updateDay(e,this.times.today)},getNow:function(){return M(new Date)},updateDay:function(e,t){e.date!==t.date&&(t.year=e.year,t.month=e.month,t.day=e.day,t.weekday=e.weekday,t.date=e.date)},updateTime:function(e,t){e.time!==t.time&&(t.hour=e.hour,t.minute=e.minute,t.time=e.time)}}},m=["transparent","aliceblue","antiquewhite","aqua","aquamarine","azure","beige","bisque","black","blanchedalmond","blue","blueviolet","brown","burlywood","cadetblue","chartreuse","chocolate","coral","cornflowerblue","cornsilk","crimson","cyan","darkblue","darkcyan","darkgoldenrod","darkgray","darkgrey","darkgreen","darkkhaki","darkmagenta","darkolivegreen","darkorange","darkorchid","darkred","darksalmon","darkseagreen","darkslateblue","darkslategray","darkslategrey","darkturquoise","darkviolet","deeppink","deepskyblue","dimgray","dimgrey","dodgerblue","firebrick","floralwhite","forestgreen","fuchsia","gainsboro","ghostwhite","gold","goldenrod","gray","grey","green","greenyellow","honeydew","hotpink","indianred","indigo","ivory","khaki","lavender","lavenderblush","lawngreen","lemonchiffon","lightblue","lightcoral","lightcyan","lightgoldenrodyellow","lightgray","lightgrey","lightgreen","lightpink","lightsalmon","lightseagreen","lightskyblue","lightslategray","lightslategrey","lightsteelblue","lightyellow","lime","limegreen","linen","magenta","maroon","mediumaquamarine","mediumblue","mediumorchid","mediumpurple","mediumseagreen","mediumslateblue","mediumspringgreen","mediumturquoise","mediumvioletred","midnightblue","mintcream","mistyrose","moccasin","navajowhite","navy","oldlace","olive","olivedrab","orange","orangered","orchid","palegoldenrod","palegreen","paleturquoise","palevioletred","papayawhip","peachpuff","peru","pink","plum","powderblue","purple","red","rosybrown","royalblue","saddlebrown","salmon","sandybrown","seagreen","seashell","sienna","silver","skyblue","slateblue","slategray","slategrey","snow","springgreen","steelblue","tan","teal","thistle","tomato","turquoise","violet","wheat","white","whitesmoke","yellow","yellowgreen"],v={name:"QColorizeMixin",props:{color:String},methods:{isNamedCssColor:function(e){return!!e&&m.includes(e.toLowerCase())},isCssColor:function(e){return!!e&&(!!e.match(/^(#|(rgb|hsl)a?\()/)||this.isNamedCssColor(e))},isCssVar:function(e){return!!e&&e.startsWith("--")},calculateColor:function(e,t){return void 0===t&&(t="black"),void 0===e&&void 0!==t?this.calculateColor(t):this.isCssColor(e)?e:this.makeQuasarColorVar(e,t)},makeQuasarColorVar:function(e,t){return"var("+(this.isCssVar(e)?e:"--q-color-"+e)+", '"+t+"')"},isValidCssColor:function(e){return this.isCssColor(e)||this.isCssVar(e)},setBothColors:function(e,t,r){return void 0===r&&(r={}),this.setTextColor(e,this.setBackgroundColor(t,r))},setBackgroundColor:function(e,t){var r;if(void 0===t&&(t={}),this.isValidCssColor(e)){var a=this.calculateColor(e);void 0===t.style&&(t.style={}),t.style=Object.assign({},t.style,{"background-color":""+a})}else if(e){var n=e.toString().trim();void 0===t.class&&(t.class={}),t.class=Object.assign({},t.class,((r={})["bg-"+n]=!0,r))}return t},setTextColor:function(e,t){var r;if(void 0===t&&(t={}),this.isValidCssColor(e)){var a=this.calculateColor(e);void 0===t.style&&(t.style={}),t.style=Object.assign({},t.style,{color:""+a,"caret-color":""+a})}else if(e){var n=e.toString().trim();void 0===t.class&&(t.class={}),t.class=Object.assign({},t.class,((r={})["text-"+n]=!0,r))}return t},setBorderColor:function(e,t){var r;if(void 0===t&&(t={}),this.isValidCssColor(e)){var a=this.calculateColor(e);void 0===t.style&&(t.style={}),t.style=Object.assign({},t.style,{"border-color":""+a})}else if(e){var n=e.toString().trim();void 0===t.class&&(t.class={}),t.class=Object.assign({},t.class,((r={})["border-"+n]=!0,r))}return t}},version:"1.0.5"},f={name:"QThemeMixin",props:{theme:{type:Object,default:function(){}},enableTheme:Boolean},methods:{useDefaultTheme:function(e,t,r){return void 0===r&&(r={}),r},getThemeColors:function(e){var t=this;void 0===e&&(e=[]);var r=new Map;return!0===this.enableTheme&&void 0!==this.theme&&e.forEach(function(e){r.set(e,t.theme[e])}),r}},version:"1.0.0"},g={base:{weekdays:{type:Array,default:function(){return[0,1,2,3,4,5,6]}},disabledDays:Array,hideHeader:Boolean,noScroll:Boolean,shortWeekdayLabel:Boolean,noDefaultHeaderText:Boolean,noDefaultHeaderBtn:Boolean,locale:{type:String,default:"en-us"},animated:Boolean,transitionPrev:{type:String,default:"slide-right"},transitionNext:{type:String,default:"slide-left"},dragOverFunc:{type:Function},dropFunc:{type:Function}},intervals:{maxDays:{type:Number,default:7},shortIntervalLabel:Boolean,intervalHeight:{type:[Number,String],default:40,validator:Z},intervalMinutes:{type:[Number,String],default:60,validator:Z},intervalStart:{type:[Number,String],default:0,validator:Z},intervalCount:{type:[Number,String],default:24,validator:Z},intervalStyle:{type:Function,default:null},showIntervalLabel:{type:Function,default:null},hour24Format:Boolean,columnHeaderBefore:Boolean,columnHeaderAfter:Boolean,columnCount:{type:[Number,String],default:1,validator:Z},columnIndexStart:{type:[Number,String],default:0,validator:Z}},weeks:{dayHeight:{type:[Number,String],default:0,validator:Z},dayStyle:{type:Function,default:null},dayPadding:String,minWeeks:{type:[Number,String],validator:Z,default:1},shortMonthLabel:Boolean,showWorkWeeks:Boolean,showMonthLabel:{type:Boolean,default:!0},showDayOfYearLabel:Boolean,selectedStartEndDates:{type:Array,default:function(){return[]},validator:function(e){return e.length<=2}},miniMode:{type:[Boolean,String],validator:function(e){return void 0===e||!0===e||!1===e||"auto"===e}},breakpoint:{type:String,default:"md",validator:function(e){return["xs","sm","md","lg","xl"].includes(e)}},monthLabelSize:{type:String,default:"md",validator:function(e){return["xs","sm","md","lg","xl"].includes(e)}}},scheduler:{resources:Array,resourceKey:{type:String,default:"label"},maxDays:{type:Number,default:7},resourceHeight:{type:[Number,String],default:70,validator:Z},resourceWidth:{type:[Number,String],validator:function(e){return void 0===e||Z(e)}},resourceStyle:{type:Function,default:null},columnHeaderBefore:Boolean,columnHeaderAfter:Boolean,columnCount:{type:[Number,String],default:1,validator:Z},columnIndexStart:{type:[Number,String],default:0,validator:Z}},calendar:{view:{type:String,default:"month",validator:function(e){return["month","week","day","2day","3day","4day","5day","6day","month-scheduler","week-scheduler","custom-scheduler","scheduler","day-scheduler","2day-scheduler","3day-scheduler","4day-scheduler","5day-scheduler","6day-scheduler","month-agenda","week-agenda","custom-agenda","agenda","day-agenda","2day-agenda","3day-agenda","4day-agenda","5day-agenda","6day-agenda","month-interval","custom-interval"].includes(e)}},value:{type:String,validator:function(e){return""===e||W(e)}}}},p={name:"CalendarBase",mixins:[v,f,{name:"Mouse",methods:{getDefaultMouseEventHandlers:function(e,t){var r;return this.getMouseEventHandlers(((r={})["click"+e]={event:"click"},r["contextmenu"+e]={event:"contextmenu",prevent:!0,result:!1},r["mousedown"+e]={event:"mousedown"},r["mousemove"+e]={event:"mousemove"},r["mouseup"+e]={event:"mouseup"},r["mouseenter"+e]={event:"mouseenter"},r["mouseleave"+e]={event:"mouseleave"},r["touchstart"+e]={event:"touchstart"},r["touchmove"+e]={event:"touchmove"},r["touchend"+e]={event:"touchend"},r),t)},getMouseEventHandlers:function(e,t){var r=this,a={},n=function(n){var s=e[n];if(r.$listeners[n]){var i=(s.passive?"&":(s.once?"~":"")+(s.capture?"!":""))+s.event,o=function(e){var a=e;return(void 0===s.button||a.buttons>0&&a.button===s.button)&&(s.prevent&&e.preventDefault(),s.stop&&e.stopPropagation(),r.$emit(n,t(e))),s.result};i in a?Array.isArray(a[i])?a[i].push(o):a[i]=[a[i],o]:a[i]=o}};for(var s in e)n(s);return a}}},y],props:Object.assign({},g.base,{start:{type:String,validator:W,default:function(){return M(new Date).date}},end:{type:String,validator:W,default:"0000-00-00"}}),data:function(){return{keyValue:"YYYY-mm-dd",direction:"next"}},computed:{weekdaySkips:function(){return function(e){for(var t=[1,1,1,1,1,1,1],r=[0,0,0,0,0,0,0],a=0;a<e.length;++a)r[e[a]]=1;for(var n=0;n<c;++n){for(var s=1,i=1;i<c&&!r[(n+i)%c];++i)++s;t[n]=r[n]*s}return t}(this.weekdays)},parsedStart:function(){return B(this.start)},parsedEnd:function(){return B(this.end)},days:function(){return Y(this.parsedStart,this.parsedEnd,this.times.today,this.weekdaySkips,this.disabledDays)},dayFormatter:function(){var e={timeZone:"UTC",day:"numeric"};return U(this.locale,function(t,r){return e})},weekdayFormatter:function(){var e={timeZone:"UTC",weekday:"long"},t={timeZone:"UTC",weekday:"short"};return U(this.locale,function(r,a){return a?t:e})}},methods:{getRelativeClasses:function(e,t){return void 0===t&&(t=!1),{"q-current-day":e.current,"q-past-day":e.past,"q-future-day":e.future,"q-outside":t}},getStartOfWeek:function(e){return function(e,t,r){if(1===e.day)for(;!t.includes(e.weekday);)N(e);var a=E(e);return V(a,t[0],z,t.length),O(a),r&&q(a,r,a.hasTime),a}(e,this.weekdays,this.times.today)},getEndOfWeek:function(e){return function(e,t,r){if($(e.year,e.month)===e.day)for(;!t.includes(e.weekday);)z(e);var a=E(e);return V(a,t[t.length-1],N,t.length),O(a),r&&q(a,r,a.hasTime),a}(e,this.weekdays,this.times.today)},dayStyleDefault:function(e){}}},_={name:"QCalendarMonthly",mixins:[{name:"QCalendarWeekly",mixins:[p],props:g.weeks,computed:{staticClass:function(){return(this.isMiniMode?" q-calendar-mini ":"")+"q-calendar-weekly"},parsedMinWeeks:function(){return parseInt(this.minWeeks,10)},days:function(){var e=this.parsedMinWeeks*this.weekdays.length;return Y(this.getStartOfWeek(this.parsedStart),this.getEndOfWeek(this.parsedEnd),this.times.today,this.weekdaySkips,this.disabledDays,Number.MAX_SAFE_INTEGER,e)},todayWeek:function(){var e=this.times.today;return Y(this.getStartOfWeek(e),this.getEndOfWeek(e),e,this.weekdaySkips,this.disabledDays,this.weekdays.length,this.weekdays.length)},monthFormatter:function(){var e={timeZone:"UTC",month:"long"},t={timeZone:"UTC",month:"short"};return U(this.locale,function(r,a){return a?t:e})},styles:function(){var e={};if(this.dayHeight>0){var t=G(this.dayHeight);e.height=t}return void 0!==this.dayPadding&&(e.padding=this.dayPadding),e},isMiniMode:function(){return!0===this.miniMode||"auto"===this.miniMode&&this.$q.screen.lt[this.breakpoint]}},methods:{isOutside:function(e){var t=x(e);return t<x(this.parsedStart)||t>x(this.parsedEnd)},isCurrentWeek:function(e){for(var t=0;t<e.length;++t)if(!0===e[t].current)return{timestamp:e[t]};return{timestamp:!1}},__renderHead:function(e){return e("div",{staticClass:"q-calendar-weekly__head"},[!0===this.showWorkWeeks&&this.__renderWorkWeekHead(e),this.__renderHeadDays(e)])},__renderWorkWeekHead:function(e){var t,r,a=new Map,n=this.useDefaultTheme;return!0===this.enableTheme&&(t="colorHeader",r="backgroundHeader",a=this.getThemeColors([t,r]),n=this.setBothColors),e("div",n(a.get(t),a.get(r),{staticClass:"q-calendar-weekly__head-workweek"}),"#")},__renderHeadDays:function(e){var t=this;return this.todayWeek.map(function(r,a){return t.__renderHeadDay(e,r,a)})},__renderHeadDay:function(e,t,r){var a,n,s=this.isOutside(this.days[r]),i=new Map,o=this.useDefaultTheme;return!0===this.enableTheme&&(s?(a="colorHeaderOutside",n="backgroundHeaderOutside"):(a="colorHeader",n="backgroundHeader"),i=this.getThemeColors([a,n]),o=this.setBothColors),e("div",o(i.get(a),i.get(n),{key:t.date,staticClass:"ellipsis q-calendar-weekly__head-weekday",class:this.getRelativeClasses(t,s)}),[this.__renderHeadDayLabel(e,t,this.shortWeekdayLabel||this.isMiniMode)])},__renderHeadDayLabel:function(e,t,r){return e("span",{staticClass:"ellipsis"},this.weekdayFormatter(t,r))},__renderWeeks:function(e){for(var t=this.days,r=this.weekdays.length,a=[],n=0;n<t.length;n+=r)a.push(this.__renderWeek(e,t.slice(n,n+r)));return a},__renderWeek:function(e,t){var r=this;return e("div",{key:t[0].date,staticClass:"q-calendar-weekly__week"},[!0===this.showWorkWeeks&&this.__renderWorkWeekGutter(e,t),t.map(function(t){return r.__renderDay(e,t)})])},__renderWorkWeekGutter:function(e,t){var r,a,n=this.$scopedSlots.workweek,s=t.length>2?t[2]:t[0],i=this.isCurrentWeek(t).timestamp,o=Number(s.workweek).toLocaleString(this.locale),d={workweekLabel:o,week:t,miniMode:this.isMiniMode},u=i&&!0===i.current?this.color:void 0,l=G(this.dayHeight),c=new Map,h=this.useDefaultTheme;return!0===this.enableTheme&&(i&&!0===i.current||!0===s.current?(r="colorWorkWeekCurrent",a="backgroundWorkWeekCurrent"):i&&!0===i.past||!0===s.past?(r="colorWorkWeekPast",a="backgroundWorkWeekPast"):(i&&!0===i.future||!0===s.future)&&(r="colorWorkWeekFuture",a="backgroundWorkWeekFuture"),c=this.getThemeColors([r,a]),h=this.setBothColors),e("div",h(void 0!==u?u:c.get(r),c.get(a),{key:s.workweek,staticClass:"q-calendar-weekly__workweek",class:this.getRelativeClasses(!1!==i?i:s,!1),style:{height:this.dayHeight&&this.dayHeight>0?l:"auto"}}),n?n(d):o)},__renderDay:function(e,t){var r,a,n,s=this,i=this.dayStyle||this.dayStyleDefault,o=this.isOutside(t),d=this.$scopedSlots.day,u=Object.assign({},{outside:o},t,{miniMode:this.isMiniMode}),l=!1===o&&this.days.find(function(e){return e.month===t.month}).day===t.day&&!0===this.showMonthLabel,c=new Map,h=this.useDefaultTheme;!0===this.enableTheme&&(!0===o?(a="colorBodyOutside",n="backgroundBodyOutside"):!0===t.past?(a="colorBodyPast",n="backgroundBodyPast"):!0===t.current?(a="colorBodyCurrent",n="backgroundBodyCurrent"):!0===t.future&&(a="colorBodyFuture",n="backgroundBodyFuture"),c=this.getThemeColors([a,n]),h=this.setBothColors);var y=Object.assign({},this.styles);return y=Object.assign(y,i(t)),e("div",h(c.get(a),c.get(n),{key:t.date,staticClass:"q-calendar-weekly__day row justify-center items-center",class:Object.assign({},this.getRelativeClasses(t,o),{"q-calendar-weekly__day--droppable":r}),style:y,domProps:{ondragover:function(e){void 0!==s.dragOverFunc&&(r=s.dragOverFunc(e,t,"day"))},ondrop:function(e){void 0!==s.dropFunc&&s.dropFunc(e,t,"day")}},on:this.getDefaultMouseEventHandlers(":day",function(e){return t})}),[this.__renderDayLabel(e,t),!0!==this.isMiniMode&&this.showDayOfYearLabel&&!l?this.__renderDayOfYearLabel(e,t):"",!0!==this.isMiniMode&&l?this.__renderDayMonth(e,t):"",e("div",{staticClass:"row full-width justify-center"},d?d(u):"")])},__renderDayLabel:function(e,t){var a,n,s=this.isOutside(t),i=!0===t.current?this.color:void 0,o=this.dayFormatter(t,!1),d=this.$scopedSlots["day-label"],u=Object.assign({},{dayLabel:o},t,{miniMode:this.isMiniMode}),l=new Map,c=this.useDefaultTheme;return!0===this.enableTheme&&(!0===s?(a="colorDayLabelOutside",n="backgroundDayLabelOutside"):!0===t.past?(a="colorDayLabelPast",n="backgroundDayLabelPast"):!0===t.current?(a="colorDayLabelCurrent",n="backgroundDayLabelCurrent"):!0===t.future&&(a="colorDayLabelFuture",n="backgroundDayLabelFuture"),l=this.getThemeColors([a,n]),c=this.setBothColors),e(r.QBtn,c(void 0!==i?i:l.get(a),l.get(n),{staticClass:"q-calendar-weekly__day-label",props:{size:this.isMiniMode?"sm":this.monthLabelSize,unelevated:!0,round:!0,dense:!0,noCaps:!0,outline:!0===t.current,disable:t.disabled},on:this.getMouseEventHandlers({"click:date":{event:"click",stop:!0},"contextmenu:date":{event:"contextmenu",stop:!0,prevent:!0,result:!1}},function(e){return t})}),[d?d(u):o])},__renderDayOfYearLabel:function(e,t){var r=!0===t.current?this.color:void 0,a=this.$scopedSlots["day-of-year"],n=Object.assign({},t);return e("div",this.setTextColor(r,{staticClass:"q-calendar-weekly__day-month--day-of-year"}),a?a(n):t.doy)},__renderDayMonth:function(e,t){var r=!0===t.current?this.color:void 0,a=this.$scopedSlots["month-label"],n=this.monthFormatter(t,this.shortMonthLabel),s=Object.assign({},{monthLabel:n},t,{miniMode:this.isMiniMode});return e("div",this.setTextColor(r,{staticClass:"q-calendar-weekly__day-month"}),a?a(s):!0!==this.isMiniMode?n:"")}},render:function(e){return e("div",{staticClass:this.staticClass,nativeOn:{dragstart:function(e){e.preventDefault()}}},[!this.hideHeader&&this.__renderHead(e)].concat(this.__renderWeeks(e)))}}],computed:{parsedStart:function(){return H(B(this.start))},parsedEnd:function(){return T(B(this.end))}}},b={name:"resize",inserted:function(e,t){var r=t.value,a=t.options||{passive:!0};window.addEventListener("resize",r,a),e._onResize={callback:r,options:a},t.modifiers&&t.modifiers.quiet||r()},unbind:function(e){if(e._onResize){var t=e._onResize,r=t.callback,a=t.options;window.removeEventListener("resize",r,a),delete e._onResize}}},k={name:"QCalendarDaily",mixins:[{name:"CalendarWithIntervals",mixins:[p],props:Object.assign({},g.intervals),computed:{parsedIntervalStart:function(){return parseInt(this.intervalStart,10)},parsedIntervalMinutes:function(){return parseInt(this.intervalMinutes,10)},parsedIntervalCount:function(){return parseInt(this.intervalCount,10)},parsedIntervalHeight:function(){return parseFloat(this.intervalHeight)},startMinute:function(){return this.parsedIntervalStart*this.parsedIntervalMinutes},bodyHeight:function(){return this.parsedIntervalCount*this.parsedIntervalHeight},days:function(){return Y(this.parsedStart,this.parsedEnd,this.times.today,this.weekdaySkips,this.disabledDays,this.maxDays)},intervals:function(){var e=this.days,t=this.parsedIntervalStart,r=this.parsedIntervalMinutes,a=this.parsedIntervalCount,n=this.times.now;return 0===e.length&&console.error("QCalendar: days array has no content"),e.map(function(e){return function(e,t,r,a,n){for(var s=[],i=0;i<a;++i){var o=(t+i)*r,d=E(e);s.push(I(d,o,n))}return s}(e,t,r,a,n)})},intervalFormatter:function(){var e={timeZone:"UTC",hour12:!this.hour24Format,hour:"2-digit",minute:"2-digit"},t={timeZone:"UTC",hour12:!this.hour24Format,hour:"numeric",minute:"2-digit"},r={timeZone:"UTC",hour12:!this.hour24Format,hour:"numeric"};return U(this.locale,function(a,n){return n?0===a.minute?r:t:e})}},methods:{showIntervalLabelDefault:function(e){var t=this.intervals[0][0];return!(t.hour===e.hour&&t.minute===e.minute)&&0===e.minute},intervalStyleDefault:function(e){},getTimestampAtEvent:function(e,t){var r=E(t),a=e.currentTarget.getBoundingClientRect(),n=this.startMinute,s=e,i=e,o=s.changedTouches||s.touches,d=((o&&o[0]?o[0].clientY:i.clientY)-a.top)/this.parsedIntervalHeight;return I(r,n+Math.floor(d*this.parsedIntervalMinutes),this.times.now)},getScopeForSlot:function(e,t){var r=E(e);return r.timeStartPos=this.timeStartPos,r.timeDurationHeight=this.timeDurationHeight,void 0!==t&&(r.index=t),r},scrollToTime:function(e){var t=this.timeStartPos(e),r=this.$refs.scrollArea;return!(!1===t||!r)&&(r.scrollTop=t,!0)},timeDurationHeight:function(e){return e/this.parsedIntervalMinutes*this.parsedIntervalHeight},timeStartPos:function(e,t){void 0===t&&(t=!0);var r=function(e){if("number"==typeof e)return e;if("string"==typeof e){var t=n.exec(e);return!!t&&60*parseInt(t[1],10)+parseInt(t[3]||0,10)}return"object"==typeof e&&"number"==typeof e.hour&&"number"==typeof e.minute&&60*e.hour+e.minute}(e);if(!1===r)return!1;var a=(r-this.startMinute)/(this.parsedIntervalCount*this.parsedIntervalMinutes)*this.bodyHeight;return t&&(a<0&&(a=0),a>this.bodyHeight&&(a=this.bodyHeight)),a}}}],directives:{Resize:b},data:function(){return{scrollWidth:0}},computed:{classes:function(){return{"q-calendar-daily":!0}}},mounted:function(){this.init()},watch:{noScroll:function(e){!0===e?this.scrollWidth=0:this.$nextTick(this.onResize)}},methods:{init:function(){this.$nextTick(this.onResize)},onResize:function(){this.scrollWidth=this.getScrollWidth()},getScrollWidth:function(){var e=this.$refs.scrollArea,t=this.$refs.pane;return e&&t?e.offsetWidth-t.offsetWidth:0},__renderHead:function(e){return e("div",{staticClass:"q-calendar-daily__head",style:{marginRight:this.scrollWidth+"px"}},[this.__renderHeadIntervals(e)].concat(this.__renderHeadDays(e)))},__renderHeadIntervals:function(e){var t,r,a=this.$scopedSlots["intervals-header"],n=new Map,s=this.useDefaultTheme;return!0===this.enableTheme&&(t="colorIntervalHeader",r="backgroundIntervalHeader",n=this.getThemeColors([t,r]),s=this.setBothColors),e("div",s(n.get(t),n.get(r),{staticClass:"q-calendar-daily__intervals-head q-calendar-daily__intervals-head--text"}),[a&&a(this.days)])},__renderHeadDays:function(e){var t=this;return 1===this.days.length&&void 0!==this.columnCount&&parseInt(this.columnCount,10)>0?Array.apply(null,new Array(parseInt(this.columnCount,10))).map(function(e,r){return r+parseInt(t.columnIndexStart,10)}).map(function(r){return t.__renderHeadDay(e,t.days[0],r)}):this.days.map(function(r){return t.__renderHeadDay(e,r)})},__renderHeadDay:function(e,t,r){var a,n,s,i=this,o=this.$scopedSlots["day-header"],d=this.getScopeForSlot(t,r),u=100/this.days.length,l=new Map,c=this.useDefaultTheme;return!0===this.enableTheme&&(!0===t.past?(n="colorHeaderPast",s="backgroundHeaderPast"):!0===t.current?(n="colorHeaderCurrent",s="backgroundHeaderCurrent"):!0===t.future&&(n="colorHeaderFuture",s="backgroundHeaderFuture"),l=this.getThemeColors([n,s]),c=this.setBothColors),e("div",c(l.get(n),l.get(s),{key:t.date+(void 0!==r?"-"+r:""),staticClass:"q-calendar-daily__head-day",class:Object.assign({},this.getRelativeClasses(t),{"q-calendar-daily__head-day--droppable":a}),style:{maxWidth:u+"%"},domProps:{ondragover:function(e){void 0!==i.dragOverFunc&&(a=i.dragOverFunc(e,t,"day",r))},ondrop:function(e){void 0!==i.dropFunc&&i.dropFunc(e,t,"day",r)}},on:this.getDefaultMouseEventHandlers(":day",function(e){return d})}),[!0===this.columnHeaderBefore&&this.__renderColumnHeaderBefore(e,t,r),!0!==this.noDefaultHeaderText&&this.__renderHeadWeekday(e,t),!0!==this.noDefaultHeaderBtn&&this.__renderHeadDayBtn(e,t),o&&o(d),!0===this.columnHeaderAfter&&this.__renderColumnHeaderAfter(e,t,r)])},__renderHeadWeekday:function(e,t){var r,a,n=!0===t.current?this.color:void 0,s=new Map,i=this.useDefaultTheme;return!0===this.enableTheme&&(!0===t.past?(r="colorDayLabelPast",a="backgroundDayLabelPast"):!0===t.current?(r="colorDayLabelCurrent",a="backgroundDayLabelCurrent"):!0===t.future&&(r="colorDayLabelFuture",a="backgroundDayLabelFuture"),s=this.getThemeColors([r,a]),i=this.setBothColors),e("div",i(void 0!==n?n:s.get(r),s.get(a),{staticClass:"ellipsis q-calendar-daily__head-weekday"}),[this.__renderHeadDayLabel(e,t,this.shortWeekdayLabel)])},__renderHeadDayLabel:function(e,t,r){return e("span",{staticClass:"ellipsis"},this.weekdayFormatter(t,r))},__renderHeadDayBtn:function(e,t){var a,n,s=!0===t.current?this.color:void 0,i=new Map,o=this.useDefaultTheme;return!0===this.enableTheme&&(!0===t.past?(a="colorDayLabelPast",n="backgroundDayLabelPast"):!0===t.current?(a="colorDayLabelCurrent",n="backgroundDayLabelCurrent"):!0===t.future&&(a="colorDayLabelFuture",n="backgroundDayLabelFuture"),i=this.getThemeColors([a,n]),o=this.setBothColors),e(r.QBtn,o(void 0!==s?s:i.get(a),i.get(n),{staticClass:"q-calendar-daily__head-day-label",style:{color:!0===t.current?s:void 0},props:{unelevated:!0,round:!0,dense:!0,noCaps:!0,outline:!0===t.current,disable:t.disabled},on:this.getMouseEventHandlers({"click:date":{event:"click",stop:!0},"contextmenu:date":{event:"contextmenu",stop:!0,prevent:!0,result:!1}},function(e){return t})}),this.dayFormatter(t,!1))},__renderColumnHeaderBefore:function(e,t,r){var a=this.$scopedSlots["column-header-before"],n=Object.assign({},t);return n.index=r,e("div",{staticClass:"q-calendar-daily__column-header--before"},[a&&a(n)])},__renderColumnHeaderAfter:function(e,t,r){var a=this.$scopedSlots["column-header-after"],n=Object.assign({},t);return n.index=r,e("div",{staticClass:"q-calendar-daily__column-header--after"},[a&&a(n)])},__renderBody:function(e){return e("div",{staticClass:"q-calendar-daily__body"},[this.__renderScrollArea(e)])},__renderScrollArea:function(e){return void 0!==this.noScroll&&!0===this.noScroll?this.__renderPane(e):e("div",{ref:"scrollArea",staticClass:"q-calendar-daily__scroll-area"},[this.__renderPane(e)])},__renderPane:function(e){return e("div",{ref:"pane",staticClass:"q-calendar-daily__pane",style:{height:G(this.bodyHeight)}},[this.__renderDayContainer(e)])},__renderDayContainer:function(e){var t=this.$scopedSlots["day-container"];return e("div",{staticClass:"q-calendar-daily__day-container"},[this.__renderBodyIntervals(e)].concat(this.__renderDays(e),[t&&t(this.days)]))},__renderDays:function(e){var t=this;return 1===this.days.length&&this.columnCount&&parseInt(this.columnCount,10)>0?Array.apply(null,new Array(parseInt(this.columnCount,10))).map(function(e,r){return r+parseInt(t.columnIndexStart,10)}).map(function(r){return t.__renderDay(e,t.days[0],0,r)}):this.days.map(function(r,a){return t.__renderDay(e,r,a)})},__renderDay:function(e,t,r,a){var n,s,i=this,o=this.$scopedSlots["day-body"],d=this.getScopeForSlot(t,a),u=100/this.days.length,l=new Map,c=this.useDefaultTheme;return!0===this.enableTheme&&(!0===t.past?(n="colorBodyPast",s="backgroundBodyPast"):!0===t.current?(n="colorBodyCurrent",s="backgroundBodyCurrent"):!0===t.future&&(n="colorBodyFuture",s="backgroundBodyFuture"),l=this.getThemeColors([n,s]),c=this.setBothColors),e("div",c(l.get(n),l.get(s),{key:t.date+(void 0!==a?":"+a:""),staticClass:"q-calendar-daily__day",class:this.getRelativeClasses(t),style:{maxWidth:u+"%"},on:this.getDefaultMouseEventHandlers(":time",function(e){return i.getScopeForSlot(i.getTimestampAtEvent(e,t),a)})}),this.__renderDayIntervals(e,r,a).concat([o&&o(d)]))},__renderDayIntervals:function(e,t,r){var a=this;return this.intervals[t].map(function(t){return a.__renderDayInterval(e,t,r)})},__renderDayInterval:function(e,t,r){var a,n=this,s=G(this.intervalHeight),i=this.intervalStyle||this.intervalStyleDefault,o=this.$scopedSlots.interval,d=this.getScopeForSlot(t,r);return e("div",{key:t.time,staticClass:"q-calendar-daily__day-interval",class:{"q-calendar-daily__day-interval--droppable":a},style:Object.assign({},{height:s},i(t)),domProps:{ondragover:function(e){void 0!==n.dragOverFunc&&(a=n.dragOverFunc(e,t,"interval"))},ondrop:function(e){void 0!==n.dropFunc&&n.dropFunc(e,t,"interval")}}},o?o(d):void 0)},__renderBodyIntervals:function(e){var t,r,a=this,n=new Map,s=this.useDefaultTheme;!0===this.enableTheme&&(t="colorIntervalBody",r="backgroundIntervalBody",n=this.getThemeColors([t,r]),s=this.setBothColors);var i={staticClass:"q-calendar-daily__intervals-body",on:this.getDefaultMouseEventHandlers(":interval",function(e){return a.getTimestampAtEvent(e,a.parsedStart)})};return e("div",s(n.get(t),n.get(r),i),this.__renderIntervalLabels(e))},__renderIntervalLabels:function(e){var t=this;return this.intervals[0].map(function(r){return t.__renderIntervalLabel(e,r)})},__renderIntervalLabel:function(e,t){var r,a,n=G(this.intervalHeight),s=this.shortIntervalLabel,i=(this.showIntervalLabel||this.showIntervalLabelDefault)(t)?this.intervalFormatter(t,s):void 0,o=new Map,d=this.useDefaultTheme;return!0===this.enableTheme&&(r="colorIntervalText",a="backgroundIntervalText",o=this.getThemeColors([r,a]),d=this.setBothColors),e("div",{key:t.time,staticClass:"q-calendar-daily__interval",style:{height:n}},[e("div",d(o.get(r),o.get(a),{staticClass:"q-calendar-daily__interval-text"}),i)])}},render:function(e){return e("div",{class:this.classes,directives:[{modifiers:{quiet:!0},name:"resize",value:this.onResize}]},[!this.hideHeader&&this.__renderHead(e),this.__renderBody(e)])}},C={name:"QCalendarScheduler",mixins:[{name:"CalendarWithScheduler",mixins:[p],props:Object.assign({},g.scheduler),computed:{parsedResourceHeight:function(){return parseFloat(this.resourceHeight)},parsedResourceWidth:function(){return parseFloat(this.resourceWidth)},bodyHeight:function(){return this.resources&&this.resources.length>0?this.resources.length*this.parsedResourceHeight:0},days:function(){return Y(this.parsedStart,this.parsedEnd,this.times.today,this.weekdaySkips,this.disabledDays,this.maxDays)}},methods:{resourceStyleDefault:function(e){},getTimestampAtEvent:function(e,t){return q(E(t),this.times.now,!1)},getScopeForSlot:function(e,t,r){var a={};return a.day=E(e),void 0!==t&&(a.index=t),void 0!==r&&(a.resource=r),a}}}],directives:{Resize:b},data:function(){return{scrollWidth:0}},computed:{classes:function(){return{"q-calendar-scheduler":!0}}},mounted:function(){this.init()},watch:{noScroll:function(e){!0===e?this.scrollWidth=0:this.$nextTick(this.onResize)}},methods:{init:function(){this.$nextTick(this.onResize)},onResize:function(){this.scrollWidth=this.getScrollWidth()},getScrollWidth:function(){var e=this.$refs.scrollArea,t=this.$refs.pane;return e&&t?e.offsetWidth-t.offsetWidth:0},resourceStartPos:function(e,t){void 0===t&&(t=!0);var r=this.resource.indexOf(e)*this.parsedResourceHeight;return t&&(r<0&&(r=0),r>this.bodyHeight&&(r=this.bodyHeight)),r},__renderHead:function(e){return e("div",{staticClass:"q-calendar-scheduler__head",style:{marginRight:this.scrollWidth+"px"}},[this.__renderHeadResources(e)].concat(this.__renderHeadDays(e)))},__renderHeadResources:function(e){var t,r,a=this.$scopedSlots["scheduler-resources-header"],n=G(this.resourceWidth),s=new Map,i=this.useDefaultTheme;return!0===this.enableTheme&&(t="colorSchedulerHeader",r="backgroundSchedulerHeader",s=this.getThemeColors([t,r]),i=this.setBothColors),e("div",i(s.get(t),s.get(r),{staticClass:"q-calendar-scheduler__resources-head q-calendar-scheduler__resources-head--text",style:{width:n}}),[a&&a(this.days)])},__renderHeadDays:function(e){var t=this;return 1===this.days.length&&this.columnCount&&parseInt(this.columnCount,10)>0?Array.apply(null,new Array(parseInt(this.columnCount,10))).map(function(e,r){return r+parseInt(t.columnIndexStart,10)}).map(function(r){return t.__renderHeadDay(e,t.days[0],r)}):this.days.map(function(r){return t.__renderHeadDay(e,r)})},__renderHeadDay:function(e,t,r){var a,n,s,i=this,o=this.$scopedSlots["scheduler-day-header"],d=this.getScopeForSlot(t,r),u=100/this.days.length,l=new Map,c=this.useDefaultTheme;return!0===this.enableTheme&&(!0===t.past?(n="colorHeaderPast",s="backgroundHeaderPast"):!0===t.current?(n="colorHeaderCurrent",s="backgroundHeaderCurrent"):!0===t.future&&(n="colorHeaderFuture",s="backgroundHeaderFuture"),l=this.getThemeColors([n,s]),c=this.setBothColors),e("div",c(l.get(n),l.get(s),{key:t.date+(void 0!==r?"-"+r:""),staticClass:"q-calendar-scheduler__head-day",class:Object.assign({},this.getRelativeClasses(t),{"q-calendar-scheduler__head-day--droppable":a}),style:{maxWidth:u+"%"},domProps:{ondragover:function(e){void 0!==i.dragOverFunc&&(a=i.dragOverFunc(e,t,"day",r))},ondrop:function(e){void 0!==i.dropFunc&&i.dropFunc(e,t,"day",r)}},on:this.getDefaultMouseEventHandlers(":day",function(e){return d})}),[!0===this.columnHeaderBefore&&this.__renderColumnHeaderBefore(e,t,r),!0!==this.noDefaultHeaderText&&this.__renderHeadWeekday(e,t,r),!0!==this.noDefaultHeaderBtn&&this.__renderHeadDayBtn(e,t,r),o&&o(d),!0===this.columnHeaderAfter&&this.__renderColumnHeaderAfter(e,t,r)])},__renderHeadWeekday:function(e,t){var r,a,n=!0===t.current?this.color:void 0,s=new Map,i=this.useDefaultTheme;return!0===this.enableTheme&&(!0===t.past?(r="colorDayLabelPast",a="backgroundDayLabelPast"):!0===t.current?(r="colorDayLabelCurrent",a="backgroundDayLabelCurrent"):!0===t.future&&(r="colorDayLabelFuture",a="backgroundDayLabelFuture"),s=this.getThemeColors([r,a]),i=this.setBothColors),e("div",i(void 0!==n?n:s.get(r),s.get(a),{staticClass:"ellipsis q-calendar-scheduler__head-weekday"}),[this.__renderHeadDayLabel(e,t,this.shortWeekdayLabel)])},__renderHeadDayLabel:function(e,t,r){return e("span",{staticClass:"ellipsis"},this.weekdayFormatter(t,r))},__renderHeadDayBtn:function(e,t,a){var n,s,i=!0===t.current?this.color:void 0,o={day:t,idx:a},d=new Map,u=this.useDefaultTheme;return!0===this.enableTheme&&(!0===t.past?(n="colorDayLabelPast",s="backgroundDayLabelPast"):!0===t.current?(n="colorDayLabelCurrent",s="backgroundDayLabelCurrent"):!0===t.future&&(n="colorDayLabelFuture",s="backgroundDayLabelFuture"),d=this.getThemeColors([n,s]),u=this.setBothColors),e(r.QBtn,u(void 0!==i?i:d.get(n),d.get(s),{staticClass:"q-calendar-scheduler__head-day-label",style:{color:!0===t.current?i:void 0},props:{unelevated:!0,round:!0,dense:!0,noCaps:!0,outline:!0===t.current,disable:t.disabled},on:this.getMouseEventHandlers({"click:date":{event:"click",stop:!0},"contextmenu:date":{event:"contextmenu",stop:!0,prevent:!0,result:!1}},function(e){return o})}),this.dayFormatter(t,!1))},__renderColumnHeaderBefore:function(e,t,r){var a=this.$scopedSlots["scheduler-column-header-before"],n=Object.assign({},t);return n.index=r,e("div",{staticClass:"q-calendar-scheduler__column-header--before"},[a&&a(n)])},__renderColumnHeaderAfter:function(e,t,r){var a=this.$scopedSlots["scheduler-column-header-after"],n=Object.assign({},t);return n.index=r,e("div",{staticClass:"q-calendar-scheduler__column-header--after"},[a&&a(n)])},__renderBody:function(e){return e("div",{staticClass:"q-calendar-scheduler__body"},[this.__renderScrollArea(e)])},__renderScrollArea:function(e){return void 0!==this.noScroll&&!0===this.noScroll?this.__renderPane(e):e("div",{ref:"scrollArea",staticClass:"q-calendar-scheduler__scroll-area"},[this.__renderPane(e)])},__renderPane:function(e){return e("div",{ref:"pane",staticClass:"q-calendar-scheduler__pane",style:{height:G(this.bodyHeight)}},[this.__renderDayContainer(e)])},__renderDayContainer:function(e){return e("div",{staticClass:"q-calendar-scheduler__day-container"},[this.__renderBodyResources(e)].concat(this.__renderDays(e)))},__renderDays:function(e){var t=this;return 1===this.days.length&&this.columnCount&&parseInt(this.columnCount,10)>0?Array.apply(null,new Array(parseInt(this.columnCount,10))).map(function(e,r){return r+parseInt(t.columnIndexStart,10)}).map(function(r){return t.__renderDay(e,t.days[0],0,r)}):this.days.map(function(r,a){return t.__renderDay(e,r,a)})},__renderDay:function(e,t,r){var a,n,s=100/this.days.length,i=new Map,o=this.useDefaultTheme;return!0===this.enableTheme&&(!0===t.past?(a="colorBodyPast",n="backgroundBodyPast"):!0===t.current?(a="colorBodyCurrent",n="backgroundBodyCurrent"):!0===t.future&&(a="colorBodyFuture",n="backgroundBodyFuture"),i=this.getThemeColors([a,n]),o=this.setBothColors),e("div",o(i.get(a),i.get(n),{key:t.date+(void 0!==r?":"+r:""),staticClass:"q-calendar-scheduler__day",class:this.getRelativeClasses(t),style:{maxWidth:s+"%"}}),[].concat(this.__renderDayResources(e,t,r)))},__renderDayResources:function(e,t,r){var a=this;return this.resources.map(function(n){return a.__renderDayResource(e,n,t,r)})},__renderDayResource:function(e,t,r,a){var n,s=this,i=G(this.resourceHeight),o=this.resourceStyle||this.resourceStyleDefault,d=this.$scopedSlots["scheduler-resource-day"],u=this.getScopeForSlot(r,a,t),l={height:i};return l=Object.assign(l,o(u)),e("div",{key:t[this.resourceKey]+"-"+a,staticClass:"q-calendar-scheduler__day-resource",class:{"q-calendar-scheduler__day-resource--droppable":n},style:l,domProps:{ondragover:function(e){void 0!==s.dragOverFunc&&(n=s.dragOverFunc(e,t,"resource",a))},ondrop:function(e){void 0!==s.dropFunc&&s.dropFunc(e,t,"resource",a)}},on:this.getDefaultMouseEventHandlers(":resource:day",function(e){return s.getScopeForSlot(s.getTimestampAtEvent(e,r),a,t)})},d?d(u):void 0)},__renderBodyResources:function(e){var t,r,a=G(this.resourceWidth),n=new Map,s=this.useDefaultTheme;!0===this.enableTheme&&(t="colorSchedulerBody",r="backgroundSchedulerBody",n=this.getThemeColors([t,r]),s=this.setBothColors);var i={staticClass:"q-calendar-scheduler__resources-body",style:{width:a}};return e("div",s(n.get(t),n.get(r),i),this.__renderResourceLabels(e))},__renderResourceLabels:function(e){var t=this;return this.resources.map(function(r,a){return t.__renderResourceLabel(e,r,a)})},__renderResourceLabel:function(e,t,r){var a,n,s=this.$scopedSlots["scheduler-resource"],i={resource:t,index:r},o=G(this.resourceHeight),d=t.label,u=new Map,l=this.useDefaultTheme;return!0===this.enableTheme&&(a="colorSchedulerText",n="backgroundSchedulerText",u=this.getThemeColors([a,n]),l=this.setBothColors),e("div",{key:t.label,staticClass:"q-calendar-scheduler__resource",style:{height:o},on:this.getDefaultMouseEventHandlers(":resource",function(e){return i})},[s?s(i):e("div",l(u.get(a),u.get(n),{staticClass:"q-calendar-scheduler__resource-text"}),d)])},__renderResourcesError:function(e){return e("div",{},"No resources have been defined")}},render:function(e){return e("div",{class:this.classes,directives:[{modifiers:{quiet:!0},name:"resize",value:this.onResize}]},[!this.hideHeader&&void 0!==this.resources&&this.__renderHead(e),void 0!==this.resources&&this.__renderBody(e),void 0===this.resources&&this.__renderResourcesError(e)])}},w={name:"QCalendarAgenda",mixins:[k],methods:{__renderHead:function(e){return e("div",{staticClass:"q-calendar-daily__head",style:{marginRight:this.scrollWidth+"px"}},[].concat(this.__renderHeadDays(e)))},__renderPane:function(e){return e("div",{ref:"pane",staticClass:"q-calendar-daily__pane",style:{}},[this.__renderDayContainer(e)])},__renderBodyIntervals:function(e){},__renderDayIntervals:function(e,t,r){return[]},__renderDay:function(e,t,r,a){var n,s,i,o=this,d=this.$scopedSlots["day-body"],u=Object.assign({},t),l=100/this.days.length,c=new Map,h=this.useDefaultTheme;return!0===this.enableTheme&&(!0===t.past?(s="colorBodyPast",i="backgroundBodyPast"):!0===t.current?(s="colorBodyCurrent",i="backgroundBodyCurrent"):!0===t.future&&(s="colorBodyFuture",i="backgroundBodyFuture"),c=this.getThemeColors([s,i]),h=this.setBothColors),e("div",h(c.get(s),c.get(i),{key:t.date+(void 0!==a?":"+a:""),staticClass:"q-calendar-daily__day",class:Object.assign({},this.getRelativeClasses(t),{"q-calendar-daily__day--droppable":n}),style:{maxWidth:l+"%"},domProps:{ondragover:function(e){void 0!==o.dragOverFunc&&(n=o.dragOverFunc(e,t,"day"))},ondrop:function(e){void 0!==o.dropFunc&&o.dropFunc(e,t,"day")}},on:this.getDefaultMouseEventHandlers(":time",function(e){return o.getScopeForSlot(o.getTimestampAtEvent(e,t),a)})}),this.__renderDayIntervals(e,r,a).concat([d&&d(u)]))}},render:function(e){return e("div",{class:this.classes,directives:[{modifiers:{quiet:!0},name:"resize",value:this.onResize}]},[!this.hideHeader&&this.__renderHead(e),this.__renderBody(e)])}},D={name:"QCalendar",mixins:[p],props:Object.assign({},g.calendar,g.weeks,g.intervals,g.scheduler),data:function(){return{lastStart:void 0,lastEnd:void 0}},computed:{parsedValue:function(){return B(this.value)||this.parsedStart||this.times.today},renderProps:function(){var e=this.parsedValue,t="div",r=this.maxDays,a=e,n=e;switch(this.view){case"month":t=_,a=H(e),n=T(e);break;case"week":case"week-agenda":case"week-scheduler":t=this.view.endsWith("-agenda")?w:this.view.endsWith("-scheduler")?C:k,a=this.getStartOfWeek(e),n=this.getEndOfWeek(e),r=this.weekdays.length;break;case"day":case"day-scheduler":case"day-agenda":t=this.view.endsWith("-agenda")?w:this.view.endsWith("-scheduler")?C:k,r=1,O(n=Q(E(n),N,r,this.weekdays));break;case"2day":case"2day-scheduler":case"2day-agenda":t=this.view.endsWith("-agenda")?w:this.view.endsWith("-scheduler")?C:k,r=2,O(n=Q(E(n),N,r,this.weekdays));break;case"3day":case"3day-scheduler":case"3day-agenda":t=this.view.endsWith("-agenda")?w:this.view.endsWith("-scheduler")?C:k,r=3,O(n=Q(E(n),N,r,this.weekdays));break;case"4day":case"4day-scheduler":case"4day-agenda":t=this.view.endsWith("-agenda")?w:this.view.endsWith("-scheduler")?C:k,r=4,O(n=Q(E(n),N,r,this.weekdays));break;case"5day":case"5day-scheduler":case"5day-agenda":t=this.view.endsWith("-agenda")?w:this.view.endsWith("-scheduler")?C:k,r=5,O(n=Q(E(n),N,r,this.weekdays));break;case"6day":case"6day-scheduler":case"6day-agenda":t=this.view.endsWith("-agenda")?w:this.view.endsWith("-scheduler")?C:k,r=6,O(n=Q(E(n),N,r,this.weekdays));break;case"custom-interval":case"custom-scheduler":case"custom-agenda":t=this.view.endsWith("-agenda")?w:this.view.endsWith("-scheduler")?C:k,O(n=Q(E(n),N,this.maxDays,this.weekdays));break;case"scheduler":case"agenda":t="scheduler"===this.view?C:w,O(n=Q(E(n),N,this.maxDays,this.weekdays));break;case"month-interval":case"month-scheduler":case"month-agenda":t=this.view.endsWith("-agenda")?w:this.view.endsWith("-scheduler")?C:k,a=H(e),O(n=T(e)),r=31}return{component:t,start:a,end:n,maxDays:r}}},watch:{renderProps:"__checkChange"},methods:{__checkChange:function(e,t){var r=this.renderProps,a=r.start,n=r.end;this.keyValue=0,void 0!==this.lastStart&&void 0!==this.lastEnd&&a.date===this.lastStart&&n.date===this.lastEnd||(this.lastStart=a.date,this.lastEnd=n.date,this.$emit("change",{start:a,end:n})),this.keyValue=x(a)},move:function(e){void 0===e&&(e=1);var t=E(this.parsedValue),r=e>0,a=r?N:z,n=r?31:l,s=r?e:-e;this.direction=r?"next":"prev";this.maxDays;for(var i,o=this.weekdaySkips.filter(function(e){return 0!==e}).length;--s>=0;)switch(this.view){case"month":t.day=n,a(t);break;case"week":case"week-scheduler":case"week-agenda":Q(t,a,o,this.weekdays);break;case"day":case"day-scheduler":case"day-agenda":Q(t,a,1,this.weekdays);break;case"2day":case"2day-scheduler":case"2day-agenda":Q(t,a,2,this.weekdays);break;case"3day":case"3day-scheduler":case"3day-agenda":Q(t,a,3,this.weekdays);break;case"4day":case"4day-scheduler":case"4day-agenda":Q(t,a,4,this.weekdays);break;case"5day":case"5day-scheduler":case"5day-agenda":Q(t,a,5,this.weekdays);break;case"6day":case"6day-scheduler":case"6day-agenda":Q(t,a,6,this.weekdays);break;case"custom-interval":case"custom-scheduler":case"custom-agenda":case"agenda":Q(t,a,this.maxDays,this.weekdays);break;case"month-interval":case"month-agenda":case"month-scheduler":t.day=n,a(t)}(i=t).weekday=R(i),O(t),function(e){e.doy=P(e)}(t),q(t,this.times.now),this.$emit("input",t.date),this.$emit("moved",t)},next:function(e){void 0===e&&(e=1),this.move(e)},prev:function(e){void 0===e&&(e=1),this.move(-e)},timeStartPos:function(e,t){void 0===t&&(t=!0);var r=this.$children[0];return!(!r||!r.timeStartPos)&&r.timeStartPos(e,t)},timeDurationHeight:function(e){var t=this.$children[0];return t&&t.timeDurationHeight?t.timeDurationHeight(e):-1},scrollToTime:function(e){var t=this.$children[0];return!(!t||!t.scrollToTime)&&t.scrollToTime(e)},__renderComponent:function(e,t,r){return e(t,r)}},render:function(e){var t=this,r=this.renderProps,a=r.start,n=r.end,s=r.maxDays,i=r.component,o={staticClass:"q-calendar",key:this.keyValue,props:Object.assign({},this.$props,{start:a.date,end:n.date,maxDays:s}),on:Object.assign({},this.$listeners,{"click:date":function(e){void 0!==t.$listeners.input&&(void 0!==e.date?t.$emit("input",e.date):void 0!==e.day&&void 0!==e.day.date&&t.$emit("input",e.day.date)),t.$listeners["click:date"]&&t.$emit("click:date",e)}}),scopedSlots:this.$scopedSlots};return!0===this.animated?e("transition",{props:{name:"q-transition--"+("prev"===this.direction?this.transitionPrev:this.transitionNext),appear:!0}},[this.__renderComponent(e,i,o)]):this.__renderComponent(e,i,o)}},S={version:"1.3.0",Component:D,install:function(e){e.component(D.name,D)}};t.use(S),e.Component=D,e.version="1.3.0",Object.defineProperty(e,"__esModule",{value:!0})}else console.error("[ Quasar ] Vue is required to run. Please add a script tag for it before loading Quasar.");function H(e){var t=E(e);return t.day=l,O(t),t}function T(e){var t=E(e);return t.day=$(t.year,t.month),O(t),t}function W(e){return!!a.exec(e)}function B(e,t){var r=function(e){var t=a.exec(e);return t?{date:e,time:"",year:parseInt(t[1],10),month:parseInt(t[2],10),day:parseInt(t[4],10)||1,hour:parseInt(t[6],10)||0,minute:parseInt(t[8],10)||0,weekday:0,doy:0,workweek:0,hasDay:!!t[4],hasTime:!(!t[6]||!t[8]),past:!1,current:!1,future:!1,disabled:!1}:null}(e);return null===r?null:(O(r),t&&q(r,t,r.hasTime),r)}function M(e){return O({date:"",time:"",year:e.getFullYear(),month:e.getMonth()+1,day:e.getDate(),weekday:e.getDay(),hour:e.getHours(),minute:e.getMinutes(),doy:0,workweek:0,hasDay:!0,hasTime:!0,past:!1,current:!0,future:!1,disabled:!1})}function x(e){return 1e4*e.year+100*e.month+e.day}function F(e){return 100*e.hour+e.minute}function q(e,t,r){void 0===r&&(r=!1);var a=x(t),n=x(e),s=a===n;return e.hasTime&&r&&s&&(s=(a=F(t))===(n=F(e))),e.past=n<a,e.current=s,e.future=n>a,e}function I(e,t,r){return e.hasTime=!0,e.hour=Math.floor(t/h),e.minute=t%h,e.time=j(e),r&&q(e,r,!0),e}function L(e,t){if(Array.isArray(t)&&0!==t.length){var r=x(e);for(var a in t){if(x(B(t[a]+" 00:00"))===r){e.disabled=!0;break}}}}function O(e){return e.time=j(e),e.date=function(e){var t=A(e.year,4)+"-"+A(e.month,2);e.hasDay&&(t+="-"+A(e.day,2));return t}(e),e.weekday=R(e),e.doy=P(e),e.workweek=function(e){if(0===e.year)return;var t=new Date(Date.UTC(e.year,e.month-1,e.day,0,0));return r.date.getWeekOfYear(t)}(e),e}function P(e){if(0!==e.year){var t=new Date(Date.UTC(e.year,e.month-1,e.day,0,0));return r.date.getDayOfYear(t)}}function R(e){if(e.hasDay){var t=Math.floor,r=e.day,a=(e.month+9)%d+1,n=t(e.year/100),s=e.year%100-(e.month<=2?1:0);return((r+t(2.6*a-.2)-2*n+s+t(s/4)+t(n/4))%7+7)%7}return e.weekday}function $(e,t){return function(e){return e%4==0&&e%100!=0||e%400==0}(e)?i[t]:s[t]}function E(e){return Object.assign({},e)}function A(e,t){for(var r=String(e);r.length<t;)r="0"+r;return r}function j(e){return e.hasTime?A(e.hour,2)+":"+A(e.minute,2):""}function N(e){return++e.day,e.weekday=(e.weekday+1)%c,e.day>o&&e.day>$(e.year,e.month)&&(e.day=l,++e.month,e.month>d&&(e.month=u,++e.year)),e}function z(e){return e.day--,e.weekday=(e.weekday+6)%c,e.day<l&&(e.month--,e.month<u&&(e.year--,e.month=d),e.day=$(e.year,e.month)),e}function Q(e,t,r,a){for(void 0===t&&(t=N),void 0===r&&(r=1),void 0===a&&(a=[0,1,2,3,4,5,6]);--r>=0;)t(e),a.length<7&&!a.includes(e.weekday)&&++r;return e}function V(e,t,r,a){for(void 0===r&&(r=N),void 0===a&&(a=6);e.weekday!==t&&--a>=0;)r(e);return e}function Y(e,t,r,a,n,s,i){void 0===n&&(n=[]),void 0===s&&(s=42),void 0===i&&(i=0);var o=x(t),d=[],u=E(e),l=0,c=l===o;if(o<x(e))return d;for(;(!c||d.length<i)&&d.length<s&&(l=x(u),!(c=c||l>o));)if(0!==a[u.weekday]){var h=E(u);O(h),q(h,r),L(h,n),d.push(h),u=Q(u,N)}else u=N(u);return d}function U(e,t){return"undefined"==typeof Intl||void 0===Intl.DateTimeFormat?function(e,t){return""}:function(r,a){try{return new Intl.DateTimeFormat(e||void 0,t(r,a)).format(new Date(Date.UTC(r.year,r.month-1,r.day,r.hour,r.minute)))}catch(e){return""}}}function Z(e){return isFinite(parseInt(e,10))}function G(e,t){return void 0===t&&(t="px"),null==e||""===e?void 0:isNaN(e)?String(e):""+Number(e)+t}});
{
"name": "@quasar/quasar-ui-qcalendar",
"version": "1.2.3",
"version": "1.3.0",
"author": "Jeff Galbraith <jeff@quasar.dev>",

@@ -62,6 +62,6 @@ "description": "QCalendar - Embed Calendars and Schedules in your Quasar Apps",

"postcss-rtl": "^1.5.0",
"quasar": "^1.5.8",
"quasar": "^1.5.9",
"quasar-json-api": "^0.0.12",
"rimraf": "^3.0.0",
"rollup": "^1.27.9",
"rollup": "^1.27.10",
"rollup-plugin-node-resolve": "^5.2.0",

@@ -68,0 +68,0 @@ "uglify-es": "^3.3.9",

@@ -20,6 +20,2 @@ // Mixins

computed: {
staticClass () {
return 'q-calendar-weekly'
},
parsedStart () {

@@ -26,0 +22,0 @@ return getStartOfMonth(parseTimestamp(this.start))

@@ -29,3 +29,3 @@ // Quasar

staticClass () {
return 'q-calendar-weekly'
return (this.isMiniMode ? ' q-calendar-mini ' : '') + 'q-calendar-weekly'
},

@@ -89,2 +89,7 @@

return style
},
isMiniMode () {
return this.miniMode === true ||
(this.miniMode === 'auto' && this.$q.screen.lt[this.breakpoint])
}

@@ -159,3 +164,3 @@ },

}), [
this.__renderHeadDayLabel(h, day, this.shortWeekdayLabel)
this.__renderHeadDayLabel(h, day, this.shortWeekdayLabel || this.isMiniMode)
])

@@ -196,2 +201,4 @@ },

const { timestamp } = this.isCurrentWeek(week)
const workweekLabel = Number(day.workweek).toLocaleString(this.locale)
const slotData = { workweekLabel, week, miniMode: this.isMiniMode }
const colorCurrent = timestamp && timestamp.current === true ? this.color : void 0

@@ -216,4 +223,2 @@ const height = convertToUnit(this.dayHeight)

const workweekLabel = Number(day.workweek).toLocaleString(this.locale)
return h('div', updateColors(colorCurrent !== void 0 ? colorCurrent : colors.get(color), colors.get(backgroundColor), {

@@ -226,3 +231,3 @@ key: day.workweek,

}
}), slot ? slot({ workweekLabel, week }) : workweekLabel)
}), slot ? slot(slotData) : workweekLabel)
},

@@ -234,3 +239,3 @@

const slot = this.$scopedSlots.day
const slotData = { outside, ...day }
const slotData = { outside, ...day, miniMode: this.isMiniMode }
const hasMonth = (outside === false && this.days.find(d => d.month === day.month).day === day.day && this.showMonthLabel === true)

@@ -264,3 +269,3 @@ let dragOver

key: day.date,
staticClass: 'q-calendar-weekly__day',
staticClass: 'q-calendar-weekly__day row justify-center items-center',
class: {

@@ -286,5 +291,8 @@ ...this.getRelativeClasses(day, outside),

this.__renderDayLabel(h, day),
this.showDayOfYearLabel && !hasMonth ? this.__renderDayOfYearLabel(h, day) : '',
hasMonth ? this.__renderDayMonth(h, day) : '',
slot ? slot(slotData) : ''
this.isMiniMode !== true && this.showDayOfYearLabel && !hasMonth ? this.__renderDayOfYearLabel(h, day) : '',
this.isMiniMode !== true && hasMonth ? this.__renderDayMonth(h, day) : '',
h('div', {
staticClass: 'row full-width justify-center'
}, slot ? slot(slotData) : '')
])

@@ -296,4 +304,5 @@ },

const colorCurrent = day.current === true ? this.color : void 0
const dayLabel = this.dayFormatter(day, false)
const slot = this.$scopedSlots['day-label']
const slotData = { dayLabel, ...day, miniMode: this.isMiniMode }
let colors = new Map(), color, backgroundColor

@@ -319,7 +328,6 @@ let updateColors = this.useDefaultTheme

const dayLabel = this.dayFormatter(day, false)
return h(QBtn, updateColors(colorCurrent !== void 0 ? colorCurrent : colors.get(color), colors.get(backgroundColor), {
staticClass: 'q-calendar-weekly__day-label',
props: {
size: this.isMiniMode ? 'sm' : this.monthLabelSize,
unelevated: true,

@@ -336,3 +344,5 @@ round: true,

}, _event => day)
}), slot ? slot({ dayLabel, ...day }) : dayLabel)
}), [
slot ? slot(slotData) : dayLabel
])
},

@@ -343,6 +353,7 @@

const slot = this.$scopedSlots['day-of-year']
const slotData = { ...day }
return h('div', this.setTextColor(color, {
staticClass: 'q-calendar-weekly__day-month--day-of-year'
}), slot ? slot(day) : day.doy)
}), slot ? slot(slotData) : day.doy)
},

@@ -354,6 +365,7 @@

const monthLabel = this.monthFormatter(day, this.shortMonthLabel)
const slotData = { monthLabel, ...day, miniMode: this.isMiniMode }
return h('div', this.setTextColor(color, {
staticClass: 'q-calendar-weekly__day-month'
}), slot ? slot({ monthLabel, ...day }) : monthLabel)
}), slot ? slot(slotData) : this.isMiniMode !== true ? monthLabel : '')
}

@@ -360,0 +372,0 @@ },

@@ -114,2 +114,16 @@ import { validateNumber, validateTimestamp } from './timestamp'

validator: v => v.length <= 2
},
miniMode: {
type: [Boolean, String],
validator: v => v === void 0 || v === true || v === false || v === 'auto'
},
breakpoint: {
type: String,
default: 'md',
validator: v => ['xs', 'sm', 'md', 'lg', 'xl'].includes(v)
},
monthLabelSize: {
type: String,
default: 'md',
validator: v => ['xs', 'sm', 'md', 'lg', 'xl'].includes(v)
}

@@ -116,0 +130,0 @@ },

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc