@quasar/quasar-ui-qcalendar
Advanced tools
Comparing version 1.3.11 to 1.3.12
@@ -2242,3 +2242,3 @@ { | ||
"applicable": [ | ||
"All " | ||
"All" | ||
] | ||
@@ -2249,3 +2249,3 @@ }, | ||
"applicable": [ | ||
"All " | ||
"All" | ||
] | ||
@@ -2256,3 +2256,3 @@ }, | ||
"applicable": [ | ||
"All " | ||
"All" | ||
], | ||
@@ -2273,3 +2273,3 @@ "params": { | ||
"applicable": [ | ||
"All " | ||
"All" | ||
] | ||
@@ -2276,0 +2276,0 @@ }, |
@@ -245,3 +245,3 @@ { | ||
"diffTimestamp": { | ||
"desc": "Turns passed in timestamp object to a time identifier", | ||
"desc": "Returns the number of milliseconds between the two days", | ||
"params": { | ||
@@ -266,3 +266,3 @@ "timestamp1": { | ||
"type": "Number", | ||
"desc": "The number of days different between the two timestamp objects. 0 if **strict** is true and the value would be negative" | ||
"desc": "The number of milliseconds between the two timestamp objects. 0 if **strict** is true and the value would be negative" | ||
} | ||
@@ -544,20 +544,2 @@ }, | ||
}, | ||
"nextMinutes": { | ||
"desc": "Returns the timestamp with the passed minutes added to it", | ||
"params": { | ||
"timestamp": { | ||
"type": "Object", | ||
"required": true, | ||
"desc": "A timestamp object" | ||
}, | ||
"minutes": { | ||
"type": "Number", | ||
"desc": "The number of minutes to add to the timestamp. It can handle large amounts of minutes that cause increments in hours or days" | ||
} | ||
}, | ||
"returns": { | ||
"type": "Object", | ||
"desc": "A timestamp object with the additional minutes added" | ||
} | ||
}, | ||
"nextDay": { | ||
@@ -637,3 +619,3 @@ "desc": "Returns the timestamp set to the next day, updating month and year if needed", | ||
"findWeekday": { | ||
"desc": "Returns the timestamp associated to the specified weekday", | ||
"desc": "Returns the timestamp associated to the specified weekday. Use `parseTimestamp`, not `parsed` (or manually call `updateFormatted` before calling this method), so associated fields are updated correctly, otherwise this function will not work as expected.", | ||
"params": { | ||
@@ -859,2 +841,73 @@ "timestamp": { | ||
}, | ||
"isOverlappingDates": { | ||
"desc": "Checks passed start and end timestamps overlap the first and last timestamps. This method can be used to find if an event, with start and end dates overlap a range, like a week", | ||
"examples": [ | ||
"isOverlappingDates(parsed('2020-01-01'), parsed('2020-01-10'), parsed('2019-12-29'), parsed('2020-01-04')) === true", | ||
"isOverlappingDates(parsed('2020-01-01'), parsed('2020-01-10'), parsed('2020-01-29'), parsed('2020-01-30')) === false" | ||
], | ||
"params": { | ||
"startTimestamp": { | ||
"type": "Object", | ||
"desc": "The starting timestamp object to use for the comparison", | ||
"required": true | ||
}, | ||
"endTimestamp": { | ||
"type": "Object", | ||
"desc": "The ending timestamp object to use for the comparison", | ||
"required": true | ||
}, | ||
"firstTimestamp": { | ||
"type": "Object", | ||
"desc": "The first timestamp object to use for the comparison (typically the first day in a week)", | ||
"required": true | ||
}, | ||
"lastTimestamp": { | ||
"type": "Object", | ||
"desc": "The last timestamp object to use for the comparison (typically the last day in a week)", | ||
"required": true | ||
} | ||
}, | ||
"returns": { | ||
"type": "Boolean", | ||
"desc": "true if the start and end timestamps overlap the first and last timestamps" | ||
} | ||
}, | ||
"daysBetween": { | ||
"desc": "Returns the number days between two timestamps", | ||
"params": { | ||
"startTimestamp": { | ||
"type": "Object", | ||
"desc": "The starting timestamp object to use for the comparison", | ||
"required": true | ||
}, | ||
"endTimestamp": { | ||
"type": "Object", | ||
"desc": "The ending timestamp object to use for the comparison", | ||
"required": true | ||
} | ||
}, | ||
"returns": { | ||
"type": "Number", | ||
"desc": "The number of days beween the two timestamps" | ||
} | ||
}, | ||
"weeksBetween": { | ||
"desc": "Returns the number weeks between two timestamps", | ||
"params": { | ||
"startTimestamp": { | ||
"type": "Object", | ||
"desc": "The starting timestamp object to use for the comparison", | ||
"required": true | ||
}, | ||
"endTimestamp": { | ||
"type": "Object", | ||
"desc": "The ending timestamp object to use for the comparison", | ||
"required": true | ||
} | ||
}, | ||
"returns": { | ||
"type": "Number", | ||
"desc": "The number of weeks beween the two timestamps" | ||
} | ||
}, | ||
"addToDate": { | ||
@@ -871,2 +924,3 @@ "desc": "Takes a timestamp and increments/decrements based on options", | ||
"desc": "The options passed to the method. All items are optional and can be positive or negative", | ||
"required": true, | ||
"examples": [ | ||
@@ -940,6 +994,6 @@ "{ year: 1, month: -1, day: 10, hour: 2, minute: 3 }", | ||
"type": "Object", | ||
"desc": "A copy of the modified timestamp object", | ||
"desc": "A copy of the modified timestamp object with the applied options", | ||
"examples": [ | ||
"ts = addToDate(ts, { hour: 1 })", | ||
"ts = addToDate(ts, { month: 3, hour: -1 })" | ||
"const ts1 = addToDate(timestamp, { hour: 1 })", | ||
"const ts2 = addToDate(timestamp, { month: 3, hour: -1 })" | ||
] | ||
@@ -946,0 +1000,0 @@ } |
/*! | ||
* @quasar/quasar-ui-qcalendar v1.3.11 | ||
* (c) 2019 Jeff Galbraith <jeff@quasar.dev> | ||
* @quasar/quasar-ui-qcalendar v1.3.12 | ||
* (c) 2020 Jeff Galbraith <jeff@quasar.dev> | ||
* Released under the MIT License. | ||
*/ | ||
"use strict";var quasar=require("quasar"),version="1.3.11",PARSE_REGEX=/^(\d{4})-(\d{1,2})(-(\d{1,2}))?([^\d]+(\d{1,2}))?(:(\d{1,2}))?(:(\d{1,2}))?(.(\d{1,3}))?$/,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,HOURS_IN_DAY=24,FIRST_HOUR=0,MILLISECONDS_IN_DAY=864e5,MILLISECONDS_IN_HOUR=36e5,MILLISECONDS_IN_MINUTE=6e4,Timestamp={date:"",time:"",year:0,month:0,day:0,weekday:0,hour:0,minute:0,doy:0,workweek:0,hasDay:!1,hasTime:!1,past:!1,current:!1,future:!1,disabled:!1},TimeObject={hour:0,minute:0};function getStartOfWeek(e,t,a){if(1===e.day||0===e.weekday)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||6===e.weekday)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 diffTimestamp(e,t,a){var r=Date.UTC(e.year,e.month-1,e.day,e.hour,e.minute),n=Date.UTC(t.year,t.month-1,t.day,t.hour,t.minute);return!0===a&&n<r?0:Math.floor((n-r)/MILLISECONDS_IN_DAY)}function updateRelative(e,t,a){void 0===a&&(a=!1);var r=getDayIdentifier(t),n=getDayIdentifier(e),i=r===n;return e.hasTime&&a&&i&&(i=(r=getTimeIdentifier(t))===(n=getTimeIdentifier(e))),e.past=n<r,e.current=i,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 updateWorkWeek(e){return e.workweek=getWorkWeek(e),e}function updateDisabled(e,t){if(!Array.isArray(t)||0===t.length)return e;var a=getDayIdentifier(e);for(var r in t){if(getDayIdentifier(parseTimestamp(t[r]+" 00:00"))===a){e.disabled=!0;break}}return e}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)return(Date.UTC(e.year,e.month-1,e.day)-Date.UTC(e.year,0,0))/24/60/60/1e3}function getWorkWeek(e){if(0!==e.year){var t=makeDate(e);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),i=e.year%100-(e.month<=2?1:0);return((a+t(2.6*r-.2)-2*n+i+t(i/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 getDateTime(e){return getDate(e)+" "+getTime(e)}function nextMinutes(e,t){for(e.minute+=t;e.minute>MINUTES_IN_HOUR;)e.minute-=MINUTES_IN_HOUR,++e.hour,e.hour>=HOURS_IN_DAY&&(nextDay(e),e.hour=FIRST_HOUR);return e}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 i=1,s=1;s<DAYS_IN_WEEK;++s){if(a[(n+s)%DAYS_IN_WEEK])break;++i}t[n]=a[n]*i}return t}function createDayList(e,t,a,r,n,i,s){void 0===n&&(n=[]),void 0===i&&(i=42),void 0===s&&(s=0);var o=getDayIdentifier(t),d=[],u=copyTimestamp(e),l=0,h=l===o;if(o<getDayIdentifier(e))return d;for(;(!h||d.length<s)&&d.length<i&&(l=getDayIdentifier(u),!(h=h||l>o));)if(0!==r[u.weekday]){var c=copyTimestamp(u);updateFormatted(c),updateRelative(c,a),updateDisabled(c,n),d.push(c),u=relativeDays(u,nextDay)}else u=nextDay(u);return d}function createIntervalList(e,t,a,r,n){for(var i=[],s=0;s<r;++s){var o=(t+s)*a,d=copyTimestamp(e);i.push(updateMinutes(d,o,n))}return i}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(makeDateTime(a))}catch(e){return""}}}function makeDate(e){return new Date(Date.UTC(e.year,e.month-1,e.day,0,0))}function makeDateTime(e){return new Date(Date.UTC(e.year,e.month-1,e.day,e.hour,e.minute))}function validateNumber(e){return isFinite(parseInt(e,10))}function isBetweenDates(e,t,a,r){void 0===r&&(r=!1);var n=parseInt(getDayIdentifier(e)+String(!0===r?getTimeIdentifier(e):""),10),i=parseInt(getDayIdentifier(t)+String(!0===r?getTimeIdentifier(t):""),10),s=parseInt(getDayIdentifier(a)+String(!0===r?getTimeIdentifier(a):""),10);return n>=i&&n<=s}function __normalizeMinute(e){if(e.minute>=MINUTES_IN_HOUR){var t=Math.floor(e.minute/MINUTES_IN_HOUR);e.minute-=t*MINUTES_IN_HOUR,e.hour+=t}else if(e.minute<0){var a=-1*e.minute,r=Math.floor(a/MINUTES_IN_HOUR)+1;a%=MINUTES_IN_HOUR,e.minute=MINUTES_IN_HOUR-a,e.hour-=r}return e}function __normalizeHour(e){if(e.hour>=HOURS_IN_DAY){var t=Math.floor(e.hour/HOURS_IN_DAY);e.hour-=t*HOURS_IN_DAY,e.day+=t}else if(e.hour<0){var a=-1*e.hour,r=Math.floor(a/HOURS_IN_DAY)+1;a%=HOURS_IN_DAY,e.hour=HOURS_IN_DAY-a,e.day-=r}return e}function __normalizeDay(e){__normalizeMonth(e);var t=daysInMonth(e.year,e.month);if(e.day>t){++e.month,e.month>MONTH_MAX&&__normalizeMonth(e);var a=e.day-t;t=daysInMonth(e.year,e.month);do{a>t&&(++e.month,e.month>MONTH_MAX&&__normalizeMonth(e),a-=t,t=daysInMonth(e.year,e.month))}while(a>t);e.day=a}else if(e.day<=0){var r=-1*e.day;--e.month,e.month<=0&&__normalizeMonth(e),t=daysInMonth(e.year,e.month);do{r>t&&(r-=t,--e.month,e.month<=0&&__normalizeMonth(e),t=daysInMonth(e.year,e.month))}while(r>t);e.day=t-r}return e}function __normalizeMonth(e){var t=copyTimestamp(e);if(t.month>MONTH_MAX){var a=Math.floor(t.month/MONTH_MAX);t.month=t.month%MONTH_MAX,t.year+=a}else if(t.month<MONTH_MIN){var r=-1*t.month;t.month=MONTH_MAX-r,--t.year}return t}function addToDate(e,t){var a=copyTimestamp(e);return Object.keys(t).forEach(function(e){void 0!==a[e]&&(a[e]+=parseInt(t[e],10))}),__normalizeMinute(a),__normalizeHour(a),__normalizeDay(a),__normalizeMonth(a),updateFormatted(a),a}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 i=e[n];if(a.$listeners[n]){var s=(i.passive?"&":(i.once?"~":"")+(i.capture?"!":""))+i.event,o=function(e){var r=e;return(void 0===i.button||r.buttons>0&&r.button===i.button)&&(i.prevent&&e.preventDefault(),i.stop&&e.stopPropagation(),a.$emit(n,t(e))),i.result};s in r?Array.isArray(r[s])?r[s].push(o):r[s]=[r[s],o]:r[s]=o}};for(var i in e)n(i);return r}}},version$1="1.0.6",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.1",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},dayClass:{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}function indexOf(e,t){for(var a=0;a<e.length;a++)if(!0===t(e[a],a))return a;return-1}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.width=100/this.weekdays.length+"%",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,i=this.isOutside(this.days[a]),s=new Map,o=this.useDefaultTheme;return!0===this.enableTheme&&(i?(r="colorHeaderOutside",n="backgroundHeaderOutside"):(r="colorHeader",n="backgroundHeader"),s=this.getThemeColors([r,n]),o=this.setBothColors),e("div",o(s.get(r),s.get(n),{key:t.date,staticClass:"q-calendar-weekly__head-weekday",style:{width:100/this.weekdays.length+"%"},class:this.getRelativeClasses(t,i)}),[this.__renderHeadDayLabel(e,t,this.shortWeekdayLabel||this.isMiniMode)])},__renderHeadDayLabel:function(e,t,a){var r=this.weekdayFormatter(t,a);return e("span",{staticClass:"ellipsis"},!0===this.isMiniMode&&!0===this.shortWeekdayLabel?r.charAt(0):r)},__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,r=this.$scopedSlots.week,n={week:t,weekdays:this.weekdays,miniMode:this.isMiniMode},i=convertToUnit(this.dayHeight);return e("div",{key:t[0].date,staticClass:"q-calendar-weekly__week--wrapper",style:{height:this.dayHeight&&this.dayHeight>0?i:this.isMiniMode?"auto":"100px"}},[!0===this.showWorkWeeks&&this.__renderWorkWeekGutter(e,t),e("div",{key:t[0].date,staticClass:"q-calendar-weekly__week"},[e("div",{staticClass:"q-calendar-weekly__week-days"},t.map(function(t){return a.__renderDay(e,t)})),void 0!==r?e("div",{staticClass:"q-calendar-weekly__week-events"},r(n)):""])])},__renderWorkWeekGutter:function(e,t){var a,r,n=this.$scopedSlots.workweek,i=t.length>2?t[2]:t[0],s=this.isCurrentWeek(t).timestamp,o=Number(i.workweek).toLocaleString(this.locale),d={workweekLabel:o,week:t,miniMode:this.isMiniMode},u=s&&!0===s.current?this.color:void 0,l=convertToUnit(this.dayHeight),h=new Map,c=this.useDefaultTheme;return!0===this.enableTheme&&(s&&!0===s.current||!0===i.current?(a="colorWorkWeekCurrent",r="backgroundWorkWeekCurrent"):s&&!0===s.past||!0===i.past?(a="colorWorkWeekPast",r="backgroundWorkWeekPast"):(s&&!0===s.future||!0===i.future)&&(a="colorWorkWeekFuture",r="backgroundWorkWeekFuture"),h=this.getThemeColors([a,r]),c=this.setBothColors),e("div",c(void 0!==u?u:h.get(a),h.get(r),{key:i.workweek,staticClass:"q-calendar-weekly__workweek",class:this.getRelativeClasses(!1!==s?s:i,!1),style:{height:this.dayHeight&&this.dayHeight>0?l:"auto"}}),n?n(d):o)},__renderDay:function(e,t){var a,r,n,i=this,s=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,h=new Map,c=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"),h=this.getThemeColors([r,n]),c=this.setBothColors);var y=Object.assign(Object.assign({},this.styles),s(t)),m="function"==typeof this.dayClass?this.dayClass(t):null;return e("div",c(h.get(r),h.get(n),{key:t.date,staticClass:"q-calendar-weekly__day",class:[m,Object.assign({},this.getRelativeClasses(t,o),{"q-calendar-weekly__day--droppable":a})],style:y,domProps:{ondragover:function(e){void 0!==i.dragOverFunc&&(a=i.dragOverFunc(e,t,"day"))},ondrop:function(e){void 0!==i.dropFunc&&i.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:"full-width"+(!0===this.isMiniMode?" row justify-around":"")},d?d(u):"")])},__renderDayLabel:function(e,t){var a,r,n=this.isOutside(t),i=!0===t.current?this.color:void 0,s=this.dayFormatter(t,!1),o=this.$scopedSlots["day-label"],d=Object.assign({},{dayLabel:s},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!==i?i: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:!0===t.disabled||!0===n},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):s])},__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),i=Object.assign({},{monthLabel:n},t,{miniMode:this.isMiniMode});return e("div",this.setTextColor(a,{staticClass:"q-calendar-weekly__day-month"}),r?r(i):!0!==this.isMiniMode?n:"")}},render:function(e){return e("div",{staticClass:this.staticClass,on:{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,i=e,s=e,o=i.changedTouches||i.touches,d=((o&&o[0]?o[0].clientY:s.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,i=this.useDefaultTheme;return!0===this.enableTheme&&(t="colorIntervalHeader",a="backgroundIntervalHeader",n=this.getThemeColors([t,a]),i=this.setBothColors),e("div",i(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,i,s=this,o=this.$scopedSlots["day-header"],d=this.getScopeForSlot(t,a),u=100/this.days.length,l=new Map,h=this.useDefaultTheme;return!0===this.enableTheme&&(!0===t.past?(n="colorHeaderPast",i="backgroundHeaderPast"):!0===t.current?(n="colorHeaderCurrent",i="backgroundHeaderCurrent"):!0===t.future&&(n="colorHeaderFuture",i="backgroundHeaderFuture"),l=this.getThemeColors([n,i]),h=this.setBothColors),e("div",h(l.get(n),l.get(i),{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!==s.dragOverFunc&&(r=s.dragOverFunc(e,t,"day",a))},ondrop:function(e){void 0!==s.dropFunc&&s.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,i=new Map,s=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"),i=this.getThemeColors([a,r]),s=this.setBothColors),e("div",s(void 0!==n?n:i.get(a),i.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,i=new Map,s=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"),i=this.getThemeColors([a,r]),s=this.setBothColors),e(quasar.QBtn,s(void 0!==n?n:i.get(a),i.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,i,s=this,o=this.$scopedSlots["day-body"],d=this.getScopeForSlot(t,r),u=100/this.days.length,l=new Map,h=this.useDefaultTheme;return!0===this.enableTheme&&(!0===t.past?(n="colorBodyPast",i="backgroundBodyPast"):!0===t.current?(n="colorBodyCurrent",i="backgroundBodyCurrent"):!0===t.future&&(n="colorBodyFuture",i="backgroundBodyFuture"),l=this.getThemeColors([n,i]),h=this.setBothColors),e("div",h(l.get(n),l.get(i),{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 s.getScopeForSlot(s.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,i=convertToUnit(this.intervalHeight),s=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:i},s(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,i=this.useDefaultTheme;!0===this.enableTheme&&(t="colorIntervalBody",a="backgroundIntervalBody",n=this.getThemeColors([t,a]),i=this.setBothColors);var s={staticClass:"q-calendar-daily__intervals-body",on:this.getDefaultMouseEventHandlers(":interval",function(e){return r.getTimestampAtEvent(e,r.parsedStart)})};return e("div",i(n.get(t),n.get(a),s),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),i=this.shortIntervalLabel,s=(this.showIntervalLabel||this.showIntervalLabelDefault)(t)?this.intervalFormatter(t,i):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"}),s)])}},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),i=new Map,s=this.useDefaultTheme;return!0===this.enableTheme&&(t="colorSchedulerHeader",a="backgroundSchedulerHeader",i=this.getThemeColors([t,a]),s=this.setBothColors),e("div",s(i.get(t),i.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,i,s=this,o=this.$scopedSlots["scheduler-day-header"],d=this.getScopeForSlot(t,a),u=100/this.days.length,l=new Map,h=this.useDefaultTheme;return!0===this.enableTheme&&(!0===t.past?(n="colorHeaderPast",i="backgroundHeaderPast"):!0===t.current?(n="colorHeaderCurrent",i="backgroundHeaderCurrent"):!0===t.future&&(n="colorHeaderFuture",i="backgroundHeaderFuture"),l=this.getThemeColors([n,i]),h=this.setBothColors),e("div",h(l.get(n),l.get(i),{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!==s.dragOverFunc&&(r=s.dragOverFunc(e,t,"day",a))},ondrop:function(e){void 0!==s.dropFunc&&s.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,i=new Map,s=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"),i=this.getThemeColors([a,r]),s=this.setBothColors),e("div",s(void 0!==n?n:i.get(a),i.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,i=!0===t.current?this.color:void 0,s={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!==i?i:o.get(r),o.get(n),{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 s})}),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,i=100/this.days.length,s=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"),s=this.getThemeColors([r,n]),o=this.setBothColors),e("div",o(s.get(r),s.get(n),{key:t.date+(void 0!==a?":"+a:""),staticClass:"q-calendar-scheduler__day",class:this.getRelativeClasses(t),style:{maxWidth:i+"%"}}),[].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,i=this,s=convertToUnit(this.resourceHeight),o=this.resourceStyle||this.resourceStyleDefault,d=this.$scopedSlots["scheduler-resource-day"],u=this.getScopeForSlot(a,r,t),l={height:s};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!==i.dragOverFunc&&(n=i.dragOverFunc(e,t,"resource",r))},ondrop:function(e){void 0!==i.dropFunc&&i.dropFunc(e,t,"resource",r)}},on:this.getDefaultMouseEventHandlers(":resource:day",function(e){return i.getScopeForSlot(i.getTimestampAtEvent(e,a),r,t)})},d?d(u):void 0)},__renderBodyResources:function(e){var t,a,r=convertToUnit(this.resourceWidth),n=new Map,i=this.useDefaultTheme;!0===this.enableTheme&&(t="colorSchedulerBody",a="backgroundSchedulerBody",n=this.getThemeColors([t,a]),i=this.setBothColors);var s={staticClass:"q-calendar-scheduler__resources-body",style:{width:r}};return e("div",i(n.get(t),n.get(a),s),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,i=this.$scopedSlots["scheduler-resource"],s={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 s})},[i?i(s):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,i,s,o=this,d=this.$scopedSlots["day-body"],u=Object.assign({},t),l=100/this.days.length,h=new Map,c=this.useDefaultTheme;return!0===this.enableTheme&&(!0===t.past?(i="colorBodyPast",s="backgroundBodyPast"):!0===t.current?(i="colorBodyCurrent",s="backgroundBodyCurrent"):!0===t.future&&(i="colorBodyFuture",s="backgroundBodyFuture"),h=this.getThemeColors([i,s]),c=this.setBothColors),e("div",c(h.get(i),h.get(s),{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)])}},QCalendar={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,i=a?e:-e;this.direction=a?"next":"prev";this.maxDays;for(var s=this.weekdaySkips.filter(function(e){return 0!==e}).length;--i>=0;)switch(this.view){case"month":t.day=n,r(t);break;case"week":case"week-scheduler":case"week-agenda":relativeDays(t,r,s,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,i=a.maxDays,s=a.component,o={staticClass:"q-calendar",key:this.keyValue,props:Object.assign({},this.$props,{start:r.date,end:n.date,maxDays:i}),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,s,o)]):this.__renderComponent(e,s,o)}},Plugin={version:version,QCalendar:QCalendar,PARSE_REGEX:PARSE_REGEX,PARSE_TIME:PARSE_TIME,DAYS_IN_MONTH:DAYS_IN_MONTH,DAYS_IN_MONTH_LEAP:DAYS_IN_MONTH_LEAP,DAYS_IN_MONTH_MIN:DAYS_IN_MONTH_MIN,DAYS_IN_MONTH_MAX:DAYS_IN_MONTH_MAX,MONTH_MAX:MONTH_MAX,MONTH_MIN:MONTH_MIN,DAY_MIN:DAY_MIN,DAYS_IN_WEEK:DAYS_IN_WEEK,MINUTES_IN_HOUR:MINUTES_IN_HOUR,HOURS_IN_DAY:HOURS_IN_DAY,FIRST_HOUR:FIRST_HOUR,MILLISECONDS_IN_DAY:MILLISECONDS_IN_DAY,MILLISECONDS_IN_HOUR:MILLISECONDS_IN_HOUR,MILLISECONDS_IN_MINUTE:MILLISECONDS_IN_MINUTE,Timestamp:Timestamp,TimeObject:TimeObject,getStartOfWeek:getStartOfWeek,getEndOfWeek:getEndOfWeek,getStartOfMonth:getStartOfMonth,getEndOfMonth:getEndOfMonth,parseTime:parseTime,validateTimestamp:validateTimestamp,parsed:parsed,parseTimestamp:parseTimestamp,parseDate:parseDate,getDayIdentifier:getDayIdentifier,getTimeIdentifier:getTimeIdentifier,diffTimestamp:diffTimestamp,updateRelative:updateRelative,updateMinutes:updateMinutes,updateWeekday:updateWeekday,updateDayOfYear:updateDayOfYear,updateWorkWeek:updateWorkWeek,updateDisabled:updateDisabled,updateFormatted:updateFormatted,getDayOfYear:getDayOfYear,getWorkWeek:getWorkWeek,getWeekday:getWeekday,isLeapYear:isLeapYear,daysInMonth:daysInMonth,copyTimestamp:copyTimestamp,padNumber:padNumber,getDate:getDate,getTime:getTime,getDateTime:getDateTime,nextMinutes:nextMinutes,nextDay:nextDay,prevDay:prevDay,relativeDays:relativeDays,findWeekday:findWeekday,getWeekdaySkips:getWeekdaySkips,createDayList:createDayList,createIntervalList:createIntervalList,createNativeLocaleFormatter:createNativeLocaleFormatter,makeDate:makeDate,makeDateTime:makeDateTime,validateNumber:validateNumber,isBetweenDates:isBetweenDates,addToDate:addToDate,convertToUnit:convertToUnit,indexOf:indexOf,install:function(e){e.component(QCalendar.name,QCalendar)}};module.exports=Plugin; | ||
"use strict";var quasar=require("quasar"),version="1.3.12",PARSE_REGEX=/^(\d{4})-(\d{1,2})(-(\d{1,2}))?([^\d]+(\d{1,2}))?(:(\d{1,2}))?(:(\d{1,2}))?(.(\d{1,3}))?$/,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,HOURS_IN_DAY=24,FIRST_HOUR=0,MILLISECONDS_IN_DAY=864e5,MILLISECONDS_IN_HOUR=36e5,MILLISECONDS_IN_MINUTE=6e4,Timestamp={date:"",time:"",year:0,month:0,day:0,weekday:0,hour:0,minute:0,doy:0,workweek:0,hasDay:!1,hasTime:!1,past:!1,current:!1,future:!1,disabled:!1},TimeObject={hour:0,minute:0};function getStartOfWeek(e,t,a){var r=copyTimestamp(e);if(1===r.day||0===r.weekday)for(;!t.includes(r.weekday);)nextDay(r);return findWeekday(r,t[0],prevDay,t.length),updateFormatted(r),a&&updateRelative(r,a,r.hasTime),r}function getEndOfWeek(e,t,a){var r=copyTimestamp(e);if(daysInMonth(r.year,r.month)===r.day||6===r.weekday)for(;!t.includes(r.weekday);)prevDay(r);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){switch(Object.prototype.toString.call(e)){case"[object Number]":return e;case"[object String]":var t=PARSE_TIME.exec(e);return!!t&&60*parseInt(t[1],10)+parseInt(t[3]||0,10);case"[object Object]":return"number"==typeof e.hour&&"number"==typeof e.minute&&60*e.hour+e.minute}return!1}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 1e8*e.year+1e6*e.month+1e4*e.day}function getTimeIdentifier(e){return 100*e.hour+e.minute}function diffTimestamp(e,t,a){var r=Date.UTC(e.year,e.month-1,e.day,e.hour,e.minute),n=Date.UTC(t.year,t.month-1,t.day,t.hour,t.minute);return!0===a&&n<r?0:n-r}function updateRelative(e,t,a){void 0===a&&(a=!1);var r=getDayIdentifier(t),n=getDayIdentifier(e),i=r===n;return e.hasTime&&a&&i&&(i=(r=getTimeIdentifier(t))===(n=getTimeIdentifier(e))),e.past=n<r,e.current=i,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 updateWorkWeek(e){return e.workweek=getWorkWeek(e),e}function updateDisabled(e,t){if(!Array.isArray(t)||0===t.length)return e;var a=getDayIdentifier(e);for(var r in t){if(getDayIdentifier(parseTimestamp(t[r]+" 00:00"))===a){e.disabled=!0;break}}return e}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)return(Date.UTC(e.year,e.month-1,e.day)-Date.UTC(e.year,0,0))/24/60/60/1e3}function getWorkWeek(e){if(0!==e.year){var t=makeDate(e);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),i=e.year%100-(e.month<=2?1:0);return((a+t(2.6*r-.2)-2*n+i+t(i/4)+t(n/4))%7+7)%7}return e.weekday}function isLeapYear(e){return 1==(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 getDateTime(e){return getDate(e)+(e.hasTime?" "+getTime(e):"")}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 i=1,s=1;s<DAYS_IN_WEEK;++s){if(a[(n+s)%DAYS_IN_WEEK])break;++i}t[n]=a[n]*i}return t}function createDayList(e,t,a,r,n,i,s){void 0===n&&(n=[]),void 0===i&&(i=42),void 0===s&&(s=0);var o=getDayIdentifier(t),d=[],u=copyTimestamp(e),l=0,c=l===o;if(o<getDayIdentifier(e))return d;for(;(!c||d.length<s)&&d.length<i&&(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 i=[],s=0;s<r;++s){var o=(t+s)*a,d=copyTimestamp(e);i.push(updateMinutes(d,o,n))}return i}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(makeDateTime(a))}catch(e){return""}}}function makeDate(e){return new Date(Date.UTC(e.year,e.month-1,e.day,0,0))}function makeDateTime(e){return new Date(Date.UTC(e.year,e.month-1,e.day,e.hour,e.minute))}function validateNumber(e){return isFinite(parseInt(e,10))}function isBetweenDates(e,t,a,r){var n=getDayIdentifier(e)+(!0===r?getTimeIdentifier(e):0),i=getDayIdentifier(t)+(!0===r?getTimeIdentifier(t):0),s=getDayIdentifier(a)+(!0===r?getTimeIdentifier(a):0);return n>=i&&n<=s}function isOverlappingDates(e,t,a,r){var n=getDayIdentifier(e),i=getDayIdentifier(t),s=getDayIdentifier(a),o=getDayIdentifier(r);return n>=s&&n<=o||i>=s&&i<=o||s>=n&&i>=o}function addToDate(e,t){var a,r=copyTimestamp(e);return __forEachObject(t,function(e,t){if(void 0!==r[t]){r[t]+=parseInt(e,10);var n=NORMALIZE_TYPES.indexOf(t);-1!==n&&(a=void 0===a?n:Math.min(n,a))}}),void 0!==a&&__normalize(r,NORMALIZE_TYPES[a]),updateFormatted(r),r}var NORMALIZE_TYPES=["minute","hour","day","month"];function __forEachObject(e,t){Object.keys(e).forEach(function(a){return t(e[a],a)})}function __normalizeMinute(e){if(e.minute>=MINUTES_IN_HOUR||e.minute<0){var t=Math.floor(e.minute/MINUTES_IN_HOUR);e.minute-=t*MINUTES_IN_HOUR,e.hour+=t,__normalizeHour(e)}return e}function __normalizeHour(e){if(e.hour>=HOURS_IN_DAY||e.hour<0){var t=Math.floor(e.hour/HOURS_IN_DAY);e.hour-=t*HOURS_IN_DAY,e.day+=t,__normalizeDay(e)}return e}function __normalizeDay(e){__normalizeMonth(e);var t=daysInMonth(e.year,e.month);if(e.day>t){++e.month,e.month>MONTH_MAX&&__normalizeMonth(e);var a=e.day-t;t=daysInMonth(e.year,e.month);do{a>t&&(++e.month,e.month>MONTH_MAX&&__normalizeMonth(e),a-=t,t=daysInMonth(e.year,e.month))}while(a>t);e.day=a}else if(e.day<=0){var r=-1*e.day;--e.month,e.month<=0&&__normalizeMonth(e),t=daysInMonth(e.year,e.month);do{r>t&&(r-=t,--e.month,e.month<=0&&__normalizeMonth(e),t=daysInMonth(e.year,e.month))}while(r>t);e.day=t-r}return e}function __normalizeMonth(e){if(e.month>MONTH_MAX){var t=Math.floor(e.month/MONTH_MAX);e.month=e.month%MONTH_MAX,e.year+=t}else e.month<MONTH_MIN&&(e.month+=MONTH_MAX,--e.year);return e}function __normalize(e,t){switch(t){case"minute":return __normalizeMinute(e);case"hour":return __normalizeHour(e);case"day":return __normalizeDay(e);case"month":return __normalizeMonth(e)}}function daysBetween(e,t){var a=diffTimestamp(e,t,!0);return Math.floor(a/MILLISECONDS_IN_DAY)}function weeksBetween(e,t){var a=copyTimestamp(e),r=copyTimestamp(t);return a=findWeekday(a,0),r=findWeekday(r,6),Math.ceil(daysBetween(a,r)/DAYS_IN_WEEK)}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 i=e[n];if(a.$listeners[n]){var s=(i.passive?"&":(i.once?"~":"")+(i.capture?"!":""))+i.event,o=function(e){var r=e;return(void 0===i.button||r.buttons>0&&r.button===i.button)&&(i.prevent&&e.preventDefault(),i.stop&&e.stopPropagation(),a.$emit(n,t(e))),i.result};s in r?Array.isArray(r[s])?r[s].push(o):r[s]=[r[s],o]:r[s]=o}};for(var i in e)n(i);return r}}},version$1="1.0.6",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.1",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},dayClass:{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}function indexOf(e,t){for(var a=0;a<e.length;a++)if(!0===t(e[a],a))return a;return-1}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.width=100/this.weekdays.length+"%",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,i=this.isOutside(this.days[a]),s=new Map,o=this.useDefaultTheme;return!0===this.enableTheme&&(i?(r="colorHeaderOutside",n="backgroundHeaderOutside"):(r="colorHeader",n="backgroundHeader"),s=this.getThemeColors([r,n]),o=this.setBothColors),e("div",o(s.get(r),s.get(n),{key:t.date,staticClass:"q-calendar-weekly__head-weekday",style:{width:100/this.weekdays.length+"%"},class:this.getRelativeClasses(t,i)}),[this.__renderHeadDayLabel(e,t,this.shortWeekdayLabel||this.isMiniMode)])},__renderHeadDayLabel:function(e,t,a){var r=this.weekdayFormatter(t,a);return e("span",{staticClass:"ellipsis"},!0===this.isMiniMode&&!0===this.shortWeekdayLabel?r.charAt(0):r)},__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,r=this.$scopedSlots.week,n={week:t,weekdays:this.weekdays,miniMode:this.isMiniMode},i=convertToUnit(this.dayHeight);return e("div",{key:t[0].date,staticClass:"q-calendar-weekly__week--wrapper",style:{height:this.dayHeight&&this.dayHeight>0?i:this.isMiniMode?"auto":"100px"}},[!0===this.showWorkWeeks&&this.__renderWorkWeekGutter(e,t),e("div",{key:t[0].date,staticClass:"q-calendar-weekly__week"},[e("div",{staticClass:"q-calendar-weekly__week-days"},t.map(function(t){return a.__renderDay(e,t)})),void 0!==r?e("div",{staticClass:"q-calendar-weekly__week-events"},r(n)):""])])},__renderWorkWeekGutter:function(e,t){var a,r,n=this.$scopedSlots.workweek,i=t.length>2?t[2]:t[0],s=this.isCurrentWeek(t).timestamp,o=Number(i.workweek).toLocaleString(this.locale),d={workweekLabel:o,week:t,miniMode:this.isMiniMode},u=s&&!0===s.current?this.color:void 0,l=convertToUnit(this.dayHeight),c=new Map,h=this.useDefaultTheme;return!0===this.enableTheme&&(s&&!0===s.current||!0===i.current?(a="colorWorkWeekCurrent",r="backgroundWorkWeekCurrent"):s&&!0===s.past||!0===i.past?(a="colorWorkWeekPast",r="backgroundWorkWeekPast"):(s&&!0===s.future||!0===i.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:i.workweek,staticClass:"q-calendar-weekly__workweek",class:this.getRelativeClasses(!1!==s?s:i,!1),style:{height:this.dayHeight&&this.dayHeight>0?l:"auto"}}),n?n(d):o)},__renderDay:function(e,t){var a,r,n,i=this,s=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(Object.assign({},this.styles),s(t)),m="function"==typeof this.dayClass?this.dayClass(t):null;return e("div",h(c.get(r),c.get(n),{key:t.date,staticClass:"q-calendar-weekly__day",class:[m,Object.assign({},this.getRelativeClasses(t,o),{"q-calendar-weekly__day--droppable":a})],style:y,domProps:{ondragover:function(e){void 0!==i.dragOverFunc&&(a=i.dragOverFunc(e,t,"day"))},ondrop:function(e){void 0!==i.dropFunc&&i.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:"full-width"+(!0===this.isMiniMode?" row justify-around":"")},d?d(u):"")])},__renderDayLabel:function(e,t){var a,r,n=this.isOutside(t),i=!0===t.current?this.color:void 0,s=this.dayFormatter(t,!1),o=this.$scopedSlots["day-label"],d=Object.assign({},{dayLabel:s},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!==i?i: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:!0===t.disabled||!0===n},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):s])},__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),i=Object.assign({},{monthLabel:n},t,{miniMode:this.isMiniMode});return e("div",this.setTextColor(a,{staticClass:"q-calendar-weekly__day-month"}),r?r(i):!0!==this.isMiniMode?n:"")}},render:function(e){return e("div",{staticClass:this.staticClass,on:{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,i=e,s=e,o=i.changedTouches||i.touches,d=((o&&o[0]?o[0].clientY:s.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,i=this.useDefaultTheme;return!0===this.enableTheme&&(t="colorIntervalHeader",a="backgroundIntervalHeader",n=this.getThemeColors([t,a]),i=this.setBothColors),e("div",i(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,i,s=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",i="backgroundHeaderPast"):!0===t.current?(n="colorHeaderCurrent",i="backgroundHeaderCurrent"):!0===t.future&&(n="colorHeaderFuture",i="backgroundHeaderFuture"),l=this.getThemeColors([n,i]),c=this.setBothColors),e("div",c(l.get(n),l.get(i),{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!==s.dragOverFunc&&(r=s.dragOverFunc(e,t,"day",a))},ondrop:function(e){void 0!==s.dropFunc&&s.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,i=new Map,s=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"),i=this.getThemeColors([a,r]),s=this.setBothColors),e("div",s(void 0!==n?n:i.get(a),i.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,i=new Map,s=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"),i=this.getThemeColors([a,r]),s=this.setBothColors),e(quasar.QBtn,s(void 0!==n?n:i.get(a),i.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,i,s=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",i="backgroundBodyPast"):!0===t.current?(n="colorBodyCurrent",i="backgroundBodyCurrent"):!0===t.future&&(n="colorBodyFuture",i="backgroundBodyFuture"),l=this.getThemeColors([n,i]),c=this.setBothColors),e("div",c(l.get(n),l.get(i),{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 s.getScopeForSlot(s.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,i=convertToUnit(this.intervalHeight),s=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:i},s(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,i=this.useDefaultTheme;!0===this.enableTheme&&(t="colorIntervalBody",a="backgroundIntervalBody",n=this.getThemeColors([t,a]),i=this.setBothColors);var s={staticClass:"q-calendar-daily__intervals-body",on:this.getDefaultMouseEventHandlers(":interval",function(e){return r.getTimestampAtEvent(e,r.parsedStart)})};return e("div",i(n.get(t),n.get(a),s),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),i=this.shortIntervalLabel,s=(this.showIntervalLabel||this.showIntervalLabelDefault)(t)?this.intervalFormatter(t,i):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"}),s)])}},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),i=new Map,s=this.useDefaultTheme;return!0===this.enableTheme&&(t="colorSchedulerHeader",a="backgroundSchedulerHeader",i=this.getThemeColors([t,a]),s=this.setBothColors),e("div",s(i.get(t),i.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,i,s=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",i="backgroundHeaderPast"):!0===t.current?(n="colorHeaderCurrent",i="backgroundHeaderCurrent"):!0===t.future&&(n="colorHeaderFuture",i="backgroundHeaderFuture"),l=this.getThemeColors([n,i]),c=this.setBothColors),e("div",c(l.get(n),l.get(i),{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!==s.dragOverFunc&&(r=s.dragOverFunc(e,t,"day",a))},ondrop:function(e){void 0!==s.dropFunc&&s.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,i=new Map,s=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"),i=this.getThemeColors([a,r]),s=this.setBothColors),e("div",s(void 0!==n?n:i.get(a),i.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,i=!0===t.current?this.color:void 0,s={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!==i?i:o.get(r),o.get(n),{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 s})}),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,i=100/this.days.length,s=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"),s=this.getThemeColors([r,n]),o=this.setBothColors),e("div",o(s.get(r),s.get(n),{key:t.date+(void 0!==a?":"+a:""),staticClass:"q-calendar-scheduler__day",class:this.getRelativeClasses(t),style:{maxWidth:i+"%"}}),[].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,i=this,s=convertToUnit(this.resourceHeight),o=this.resourceStyle||this.resourceStyleDefault,d=this.$scopedSlots["scheduler-resource-day"],u=this.getScopeForSlot(a,r,t),l={height:s};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!==i.dragOverFunc&&(n=i.dragOverFunc(e,t,"resource",r))},ondrop:function(e){void 0!==i.dropFunc&&i.dropFunc(e,t,"resource",r)}},on:this.getDefaultMouseEventHandlers(":resource:day",function(e){return i.getScopeForSlot(i.getTimestampAtEvent(e,a),r,t)})},d?d(u):void 0)},__renderBodyResources:function(e){var t,a,r=convertToUnit(this.resourceWidth),n=new Map,i=this.useDefaultTheme;!0===this.enableTheme&&(t="colorSchedulerBody",a="backgroundSchedulerBody",n=this.getThemeColors([t,a]),i=this.setBothColors);var s={staticClass:"q-calendar-scheduler__resources-body",style:{width:r}};return e("div",i(n.get(t),n.get(a),s),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,i=this.$scopedSlots["scheduler-resource"],s={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 s})},[i?i(s):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,i,s,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?(i="colorBodyPast",s="backgroundBodyPast"):!0===t.current?(i="colorBodyCurrent",s="backgroundBodyCurrent"):!0===t.future&&(i="colorBodyFuture",s="backgroundBodyFuture"),c=this.getThemeColors([i,s]),h=this.setBothColors),e("div",h(c.get(i),c.get(s),{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)])}},QCalendar={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,i=a?e:-e;this.direction=a?"next":"prev";this.maxDays;for(var s=this.weekdaySkips.filter(function(e){return 0!==e}).length;--i>=0;)switch(this.view){case"month":t.day=n,r(t);break;case"week":case"week-scheduler":case"week-agenda":relativeDays(t,r,s,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,i=a.maxDays,s=a.component,o={staticClass:"q-calendar",key:this.keyValue,props:Object.assign({},this.$props,{start:r.date,end:n.date,maxDays:i}),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,s,o)]):this.__renderComponent(e,s,o)}},Plugin={version:version,QCalendar:QCalendar,PARSE_REGEX:PARSE_REGEX,PARSE_TIME:PARSE_TIME,DAYS_IN_MONTH:DAYS_IN_MONTH,DAYS_IN_MONTH_LEAP:DAYS_IN_MONTH_LEAP,DAYS_IN_MONTH_MIN:DAYS_IN_MONTH_MIN,DAYS_IN_MONTH_MAX:DAYS_IN_MONTH_MAX,MONTH_MAX:MONTH_MAX,MONTH_MIN:MONTH_MIN,DAY_MIN:DAY_MIN,DAYS_IN_WEEK:DAYS_IN_WEEK,MINUTES_IN_HOUR:MINUTES_IN_HOUR,HOURS_IN_DAY:HOURS_IN_DAY,FIRST_HOUR:FIRST_HOUR,MILLISECONDS_IN_DAY:MILLISECONDS_IN_DAY,MILLISECONDS_IN_HOUR:MILLISECONDS_IN_HOUR,MILLISECONDS_IN_MINUTE:MILLISECONDS_IN_MINUTE,Timestamp:Timestamp,TimeObject:TimeObject,getStartOfWeek:getStartOfWeek,getEndOfWeek:getEndOfWeek,getStartOfMonth:getStartOfMonth,getEndOfMonth:getEndOfMonth,parseTime:parseTime,validateTimestamp:validateTimestamp,parsed:parsed,parseTimestamp:parseTimestamp,parseDate:parseDate,getDayIdentifier:getDayIdentifier,getTimeIdentifier:getTimeIdentifier,diffTimestamp:diffTimestamp,updateRelative:updateRelative,updateMinutes:updateMinutes,updateWeekday:updateWeekday,updateDayOfYear:updateDayOfYear,updateWorkWeek:updateWorkWeek,updateDisabled:updateDisabled,updateFormatted:updateFormatted,getDayOfYear:getDayOfYear,getWorkWeek:getWorkWeek,getWeekday:getWeekday,isLeapYear:isLeapYear,daysInMonth:daysInMonth,copyTimestamp:copyTimestamp,padNumber:padNumber,getDate:getDate,getTime:getTime,getDateTime:getDateTime,nextDay:nextDay,prevDay:prevDay,relativeDays:relativeDays,findWeekday:findWeekday,getWeekdaySkips:getWeekdaySkips,createDayList:createDayList,createIntervalList:createIntervalList,createNativeLocaleFormatter:createNativeLocaleFormatter,makeDate:makeDate,makeDateTime:makeDateTime,validateNumber:validateNumber,isBetweenDates:isBetweenDates,isOverlappingDates:isOverlappingDates,daysBetween:daysBetween,weeksBetween:weeksBetween,addToDate:addToDate,convertToUnit:convertToUnit,indexOf:indexOf,install:function(e){e.component(QCalendar.name,QCalendar)}};module.exports=Plugin; |
/*! | ||
* @quasar/quasar-ui-qcalendar v1.3.11 | ||
* (c) 2019 Jeff Galbraith <jeff@quasar.dev> | ||
* @quasar/quasar-ui-qcalendar v1.3.12 | ||
* (c) 2020 Jeff Galbraith <jeff@quasar.dev> | ||
* Released under the MIT License. | ||
*/ | ||
import{date,QBtn}from"quasar";var version="1.3.11",PARSE_REGEX=/^(\d{4})-(\d{1,2})(-(\d{1,2}))?([^\d]+(\d{1,2}))?(:(\d{1,2}))?(:(\d{1,2}))?(.(\d{1,3}))?$/,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,HOURS_IN_DAY=24,FIRST_HOUR=0,MILLISECONDS_IN_DAY=864e5,MILLISECONDS_IN_HOUR=36e5,MILLISECONDS_IN_MINUTE=6e4,Timestamp={date:"",time:"",year:0,month:0,day:0,weekday:0,hour:0,minute:0,doy:0,workweek:0,hasDay:!1,hasTime:!1,past:!1,current:!1,future:!1,disabled:!1},TimeObject={hour:0,minute:0};function getStartOfWeek(e,t,a){if(1===e.day||0===e.weekday)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||6===e.weekday)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 diffTimestamp(e,t,a){var r=Date.UTC(e.year,e.month-1,e.day,e.hour,e.minute),n=Date.UTC(t.year,t.month-1,t.day,t.hour,t.minute);return!0===a&&n<r?0:Math.floor((n-r)/MILLISECONDS_IN_DAY)}function updateRelative(e,t,a){void 0===a&&(a=!1);var r=getDayIdentifier(t),n=getDayIdentifier(e),i=r===n;return e.hasTime&&a&&i&&(i=(r=getTimeIdentifier(t))===(n=getTimeIdentifier(e))),e.past=n<r,e.current=i,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 updateWorkWeek(e){return e.workweek=getWorkWeek(e),e}function updateDisabled(e,t){if(!Array.isArray(t)||0===t.length)return e;var a=getDayIdentifier(e);for(var r in t){if(getDayIdentifier(parseTimestamp(t[r]+" 00:00"))===a){e.disabled=!0;break}}return e}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)return(Date.UTC(e.year,e.month-1,e.day)-Date.UTC(e.year,0,0))/24/60/60/1e3}function getWorkWeek(e){if(0!==e.year){var t=makeDate(e);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),i=e.year%100-(e.month<=2?1:0);return((a+t(2.6*r-.2)-2*n+i+t(i/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 getDateTime(e){return getDate(e)+" "+getTime(e)}function nextMinutes(e,t){for(e.minute+=t;e.minute>MINUTES_IN_HOUR;)e.minute-=MINUTES_IN_HOUR,++e.hour,e.hour>=HOURS_IN_DAY&&(nextDay(e),e.hour=FIRST_HOUR);return e}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 i=1,s=1;s<DAYS_IN_WEEK;++s){if(a[(n+s)%DAYS_IN_WEEK])break;++i}t[n]=a[n]*i}return t}function createDayList(e,t,a,r,n,i,s){void 0===n&&(n=[]),void 0===i&&(i=42),void 0===s&&(s=0);var o=getDayIdentifier(t),d=[],u=copyTimestamp(e),l=0,h=l===o;if(o<getDayIdentifier(e))return d;for(;(!h||d.length<s)&&d.length<i&&(l=getDayIdentifier(u),!(h=h||l>o));)if(0!==r[u.weekday]){var c=copyTimestamp(u);updateFormatted(c),updateRelative(c,a),updateDisabled(c,n),d.push(c),u=relativeDays(u,nextDay)}else u=nextDay(u);return d}function createIntervalList(e,t,a,r,n){for(var i=[],s=0;s<r;++s){var o=(t+s)*a,d=copyTimestamp(e);i.push(updateMinutes(d,o,n))}return i}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(makeDateTime(a))}catch(e){return""}}}function makeDate(e){return new Date(Date.UTC(e.year,e.month-1,e.day,0,0))}function makeDateTime(e){return new Date(Date.UTC(e.year,e.month-1,e.day,e.hour,e.minute))}function validateNumber(e){return isFinite(parseInt(e,10))}function isBetweenDates(e,t,a,r){void 0===r&&(r=!1);var n=parseInt(getDayIdentifier(e)+String(!0===r?getTimeIdentifier(e):""),10),i=parseInt(getDayIdentifier(t)+String(!0===r?getTimeIdentifier(t):""),10),s=parseInt(getDayIdentifier(a)+String(!0===r?getTimeIdentifier(a):""),10);return n>=i&&n<=s}function __normalizeMinute(e){if(e.minute>=MINUTES_IN_HOUR){var t=Math.floor(e.minute/MINUTES_IN_HOUR);e.minute-=t*MINUTES_IN_HOUR,e.hour+=t}else if(e.minute<0){var a=-1*e.minute,r=Math.floor(a/MINUTES_IN_HOUR)+1;a%=MINUTES_IN_HOUR,e.minute=MINUTES_IN_HOUR-a,e.hour-=r}return e}function __normalizeHour(e){if(e.hour>=HOURS_IN_DAY){var t=Math.floor(e.hour/HOURS_IN_DAY);e.hour-=t*HOURS_IN_DAY,e.day+=t}else if(e.hour<0){var a=-1*e.hour,r=Math.floor(a/HOURS_IN_DAY)+1;a%=HOURS_IN_DAY,e.hour=HOURS_IN_DAY-a,e.day-=r}return e}function __normalizeDay(e){__normalizeMonth(e);var t=daysInMonth(e.year,e.month);if(e.day>t){++e.month,e.month>MONTH_MAX&&__normalizeMonth(e);var a=e.day-t;t=daysInMonth(e.year,e.month);do{a>t&&(++e.month,e.month>MONTH_MAX&&__normalizeMonth(e),a-=t,t=daysInMonth(e.year,e.month))}while(a>t);e.day=a}else if(e.day<=0){var r=-1*e.day;--e.month,e.month<=0&&__normalizeMonth(e),t=daysInMonth(e.year,e.month);do{r>t&&(r-=t,--e.month,e.month<=0&&__normalizeMonth(e),t=daysInMonth(e.year,e.month))}while(r>t);e.day=t-r}return e}function __normalizeMonth(e){var t=copyTimestamp(e);if(t.month>MONTH_MAX){var a=Math.floor(t.month/MONTH_MAX);t.month=t.month%MONTH_MAX,t.year+=a}else if(t.month<MONTH_MIN){var r=-1*t.month;t.month=MONTH_MAX-r,--t.year}return t}function addToDate(e,t){var a=copyTimestamp(e);return Object.keys(t).forEach(function(e){void 0!==a[e]&&(a[e]+=parseInt(t[e],10))}),__normalizeMinute(a),__normalizeHour(a),__normalizeDay(a),__normalizeMonth(a),updateFormatted(a),a}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 i=e[n];if(a.$listeners[n]){var s=(i.passive?"&":(i.once?"~":"")+(i.capture?"!":""))+i.event,o=function(e){var r=e;return(void 0===i.button||r.buttons>0&&r.button===i.button)&&(i.prevent&&e.preventDefault(),i.stop&&e.stopPropagation(),a.$emit(n,t(e))),i.result};s in r?Array.isArray(r[s])?r[s].push(o):r[s]=[r[s],o]:r[s]=o}};for(var i in e)n(i);return r}}},version$1="1.0.6",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.1",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},dayClass:{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}function indexOf(e,t){for(var a=0;a<e.length;a++)if(!0===t(e[a],a))return a;return-1}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.width=100/this.weekdays.length+"%",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,i=this.isOutside(this.days[a]),s=new Map,o=this.useDefaultTheme;return!0===this.enableTheme&&(i?(r="colorHeaderOutside",n="backgroundHeaderOutside"):(r="colorHeader",n="backgroundHeader"),s=this.getThemeColors([r,n]),o=this.setBothColors),e("div",o(s.get(r),s.get(n),{key:t.date,staticClass:"q-calendar-weekly__head-weekday",style:{width:100/this.weekdays.length+"%"},class:this.getRelativeClasses(t,i)}),[this.__renderHeadDayLabel(e,t,this.shortWeekdayLabel||this.isMiniMode)])},__renderHeadDayLabel:function(e,t,a){var r=this.weekdayFormatter(t,a);return e("span",{staticClass:"ellipsis"},!0===this.isMiniMode&&!0===this.shortWeekdayLabel?r.charAt(0):r)},__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,r=this.$scopedSlots.week,n={week:t,weekdays:this.weekdays,miniMode:this.isMiniMode},i=convertToUnit(this.dayHeight);return e("div",{key:t[0].date,staticClass:"q-calendar-weekly__week--wrapper",style:{height:this.dayHeight&&this.dayHeight>0?i:this.isMiniMode?"auto":"100px"}},[!0===this.showWorkWeeks&&this.__renderWorkWeekGutter(e,t),e("div",{key:t[0].date,staticClass:"q-calendar-weekly__week"},[e("div",{staticClass:"q-calendar-weekly__week-days"},t.map(function(t){return a.__renderDay(e,t)})),void 0!==r?e("div",{staticClass:"q-calendar-weekly__week-events"},r(n)):""])])},__renderWorkWeekGutter:function(e,t){var a,r,n=this.$scopedSlots.workweek,i=t.length>2?t[2]:t[0],s=this.isCurrentWeek(t).timestamp,o=Number(i.workweek).toLocaleString(this.locale),d={workweekLabel:o,week:t,miniMode:this.isMiniMode},u=s&&!0===s.current?this.color:void 0,l=convertToUnit(this.dayHeight),h=new Map,c=this.useDefaultTheme;return!0===this.enableTheme&&(s&&!0===s.current||!0===i.current?(a="colorWorkWeekCurrent",r="backgroundWorkWeekCurrent"):s&&!0===s.past||!0===i.past?(a="colorWorkWeekPast",r="backgroundWorkWeekPast"):(s&&!0===s.future||!0===i.future)&&(a="colorWorkWeekFuture",r="backgroundWorkWeekFuture"),h=this.getThemeColors([a,r]),c=this.setBothColors),e("div",c(void 0!==u?u:h.get(a),h.get(r),{key:i.workweek,staticClass:"q-calendar-weekly__workweek",class:this.getRelativeClasses(!1!==s?s:i,!1),style:{height:this.dayHeight&&this.dayHeight>0?l:"auto"}}),n?n(d):o)},__renderDay:function(e,t){var a,r,n,i=this,s=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,h=new Map,c=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"),h=this.getThemeColors([r,n]),c=this.setBothColors);var y=Object.assign(Object.assign({},this.styles),s(t)),m="function"==typeof this.dayClass?this.dayClass(t):null;return e("div",c(h.get(r),h.get(n),{key:t.date,staticClass:"q-calendar-weekly__day",class:[m,Object.assign({},this.getRelativeClasses(t,o),{"q-calendar-weekly__day--droppable":a})],style:y,domProps:{ondragover:function(e){void 0!==i.dragOverFunc&&(a=i.dragOverFunc(e,t,"day"))},ondrop:function(e){void 0!==i.dropFunc&&i.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:"full-width"+(!0===this.isMiniMode?" row justify-around":"")},d?d(u):"")])},__renderDayLabel:function(e,t){var a,r,n=this.isOutside(t),i=!0===t.current?this.color:void 0,s=this.dayFormatter(t,!1),o=this.$scopedSlots["day-label"],d=Object.assign({},{dayLabel:s},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(QBtn,l(void 0!==i?i: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:!0===t.disabled||!0===n},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):s])},__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),i=Object.assign({},{monthLabel:n},t,{miniMode:this.isMiniMode});return e("div",this.setTextColor(a,{staticClass:"q-calendar-weekly__day-month"}),r?r(i):!0!==this.isMiniMode?n:"")}},render:function(e){return e("div",{staticClass:this.staticClass,on:{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,i=e,s=e,o=i.changedTouches||i.touches,d=((o&&o[0]?o[0].clientY:s.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,i=this.useDefaultTheme;return!0===this.enableTheme&&(t="colorIntervalHeader",a="backgroundIntervalHeader",n=this.getThemeColors([t,a]),i=this.setBothColors),e("div",i(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,i,s=this,o=this.$scopedSlots["day-header"],d=this.getScopeForSlot(t,a),u=100/this.days.length,l=new Map,h=this.useDefaultTheme;return!0===this.enableTheme&&(!0===t.past?(n="colorHeaderPast",i="backgroundHeaderPast"):!0===t.current?(n="colorHeaderCurrent",i="backgroundHeaderCurrent"):!0===t.future&&(n="colorHeaderFuture",i="backgroundHeaderFuture"),l=this.getThemeColors([n,i]),h=this.setBothColors),e("div",h(l.get(n),l.get(i),{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!==s.dragOverFunc&&(r=s.dragOverFunc(e,t,"day",a))},ondrop:function(e){void 0!==s.dropFunc&&s.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,i=new Map,s=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"),i=this.getThemeColors([a,r]),s=this.setBothColors),e("div",s(void 0!==n?n:i.get(a),i.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,i=new Map,s=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"),i=this.getThemeColors([a,r]),s=this.setBothColors),e(QBtn,s(void 0!==n?n:i.get(a),i.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,i,s=this,o=this.$scopedSlots["day-body"],d=this.getScopeForSlot(t,r),u=100/this.days.length,l=new Map,h=this.useDefaultTheme;return!0===this.enableTheme&&(!0===t.past?(n="colorBodyPast",i="backgroundBodyPast"):!0===t.current?(n="colorBodyCurrent",i="backgroundBodyCurrent"):!0===t.future&&(n="colorBodyFuture",i="backgroundBodyFuture"),l=this.getThemeColors([n,i]),h=this.setBothColors),e("div",h(l.get(n),l.get(i),{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 s.getScopeForSlot(s.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,i=convertToUnit(this.intervalHeight),s=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:i},s(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,i=this.useDefaultTheme;!0===this.enableTheme&&(t="colorIntervalBody",a="backgroundIntervalBody",n=this.getThemeColors([t,a]),i=this.setBothColors);var s={staticClass:"q-calendar-daily__intervals-body",on:this.getDefaultMouseEventHandlers(":interval",function(e){return r.getTimestampAtEvent(e,r.parsedStart)})};return e("div",i(n.get(t),n.get(a),s),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),i=this.shortIntervalLabel,s=(this.showIntervalLabel||this.showIntervalLabelDefault)(t)?this.intervalFormatter(t,i):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"}),s)])}},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),i=new Map,s=this.useDefaultTheme;return!0===this.enableTheme&&(t="colorSchedulerHeader",a="backgroundSchedulerHeader",i=this.getThemeColors([t,a]),s=this.setBothColors),e("div",s(i.get(t),i.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,i,s=this,o=this.$scopedSlots["scheduler-day-header"],d=this.getScopeForSlot(t,a),u=100/this.days.length,l=new Map,h=this.useDefaultTheme;return!0===this.enableTheme&&(!0===t.past?(n="colorHeaderPast",i="backgroundHeaderPast"):!0===t.current?(n="colorHeaderCurrent",i="backgroundHeaderCurrent"):!0===t.future&&(n="colorHeaderFuture",i="backgroundHeaderFuture"),l=this.getThemeColors([n,i]),h=this.setBothColors),e("div",h(l.get(n),l.get(i),{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!==s.dragOverFunc&&(r=s.dragOverFunc(e,t,"day",a))},ondrop:function(e){void 0!==s.dropFunc&&s.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,i=new Map,s=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"),i=this.getThemeColors([a,r]),s=this.setBothColors),e("div",s(void 0!==n?n:i.get(a),i.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,i=!0===t.current?this.color:void 0,s={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!==i?i:o.get(r),o.get(n),{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 s})}),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,i=100/this.days.length,s=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"),s=this.getThemeColors([r,n]),o=this.setBothColors),e("div",o(s.get(r),s.get(n),{key:t.date+(void 0!==a?":"+a:""),staticClass:"q-calendar-scheduler__day",class:this.getRelativeClasses(t),style:{maxWidth:i+"%"}}),[].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,i=this,s=convertToUnit(this.resourceHeight),o=this.resourceStyle||this.resourceStyleDefault,d=this.$scopedSlots["scheduler-resource-day"],u=this.getScopeForSlot(a,r,t),l={height:s};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!==i.dragOverFunc&&(n=i.dragOverFunc(e,t,"resource",r))},ondrop:function(e){void 0!==i.dropFunc&&i.dropFunc(e,t,"resource",r)}},on:this.getDefaultMouseEventHandlers(":resource:day",function(e){return i.getScopeForSlot(i.getTimestampAtEvent(e,a),r,t)})},d?d(u):void 0)},__renderBodyResources:function(e){var t,a,r=convertToUnit(this.resourceWidth),n=new Map,i=this.useDefaultTheme;!0===this.enableTheme&&(t="colorSchedulerBody",a="backgroundSchedulerBody",n=this.getThemeColors([t,a]),i=this.setBothColors);var s={staticClass:"q-calendar-scheduler__resources-body",style:{width:r}};return e("div",i(n.get(t),n.get(a),s),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,i=this.$scopedSlots["scheduler-resource"],s={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 s})},[i?i(s):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,i,s,o=this,d=this.$scopedSlots["day-body"],u=Object.assign({},t),l=100/this.days.length,h=new Map,c=this.useDefaultTheme;return!0===this.enableTheme&&(!0===t.past?(i="colorBodyPast",s="backgroundBodyPast"):!0===t.current?(i="colorBodyCurrent",s="backgroundBodyCurrent"):!0===t.future&&(i="colorBodyFuture",s="backgroundBodyFuture"),h=this.getThemeColors([i,s]),c=this.setBothColors),e("div",c(h.get(i),h.get(s),{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)])}},QCalendar={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,i=a?e:-e;this.direction=a?"next":"prev";this.maxDays;for(var s=this.weekdaySkips.filter(function(e){return 0!==e}).length;--i>=0;)switch(this.view){case"month":t.day=n,r(t);break;case"week":case"week-scheduler":case"week-agenda":relativeDays(t,r,s,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,i=a.maxDays,s=a.component,o={staticClass:"q-calendar",key:this.keyValue,props:Object.assign({},this.$props,{start:r.date,end:n.date,maxDays:i}),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,s,o)]):this.__renderComponent(e,s,o)}},Plugin={version:version,QCalendar:QCalendar,PARSE_REGEX:PARSE_REGEX,PARSE_TIME:PARSE_TIME,DAYS_IN_MONTH:DAYS_IN_MONTH,DAYS_IN_MONTH_LEAP:DAYS_IN_MONTH_LEAP,DAYS_IN_MONTH_MIN:DAYS_IN_MONTH_MIN,DAYS_IN_MONTH_MAX:DAYS_IN_MONTH_MAX,MONTH_MAX:MONTH_MAX,MONTH_MIN:MONTH_MIN,DAY_MIN:DAY_MIN,DAYS_IN_WEEK:DAYS_IN_WEEK,MINUTES_IN_HOUR:MINUTES_IN_HOUR,HOURS_IN_DAY:HOURS_IN_DAY,FIRST_HOUR:FIRST_HOUR,MILLISECONDS_IN_DAY:MILLISECONDS_IN_DAY,MILLISECONDS_IN_HOUR:MILLISECONDS_IN_HOUR,MILLISECONDS_IN_MINUTE:MILLISECONDS_IN_MINUTE,Timestamp:Timestamp,TimeObject:TimeObject,getStartOfWeek:getStartOfWeek,getEndOfWeek:getEndOfWeek,getStartOfMonth:getStartOfMonth,getEndOfMonth:getEndOfMonth,parseTime:parseTime,validateTimestamp:validateTimestamp,parsed:parsed,parseTimestamp:parseTimestamp,parseDate:parseDate,getDayIdentifier:getDayIdentifier,getTimeIdentifier:getTimeIdentifier,diffTimestamp:diffTimestamp,updateRelative:updateRelative,updateMinutes:updateMinutes,updateWeekday:updateWeekday,updateDayOfYear:updateDayOfYear,updateWorkWeek:updateWorkWeek,updateDisabled:updateDisabled,updateFormatted:updateFormatted,getDayOfYear:getDayOfYear,getWorkWeek:getWorkWeek,getWeekday:getWeekday,isLeapYear:isLeapYear,daysInMonth:daysInMonth,copyTimestamp:copyTimestamp,padNumber:padNumber,getDate:getDate,getTime:getTime,getDateTime:getDateTime,nextMinutes:nextMinutes,nextDay:nextDay,prevDay:prevDay,relativeDays:relativeDays,findWeekday:findWeekday,getWeekdaySkips:getWeekdaySkips,createDayList:createDayList,createIntervalList:createIntervalList,createNativeLocaleFormatter:createNativeLocaleFormatter,makeDate:makeDate,makeDateTime:makeDateTime,validateNumber:validateNumber,isBetweenDates:isBetweenDates,addToDate:addToDate,convertToUnit:convertToUnit,indexOf:indexOf,install:function(e){e.component(QCalendar.name,QCalendar)}};export default Plugin;export{DAYS_IN_MONTH,DAYS_IN_MONTH_LEAP,DAYS_IN_MONTH_MAX,DAYS_IN_MONTH_MIN,DAYS_IN_WEEK,DAY_MIN,FIRST_HOUR,HOURS_IN_DAY,MILLISECONDS_IN_DAY,MILLISECONDS_IN_HOUR,MILLISECONDS_IN_MINUTE,MINUTES_IN_HOUR,MONTH_MAX,MONTH_MIN,PARSE_REGEX,PARSE_TIME,QCalendar,TimeObject,Timestamp,addToDate,convertToUnit,copyTimestamp,createDayList,createIntervalList,createNativeLocaleFormatter,daysInMonth,diffTimestamp,findWeekday,getDate,getDateTime,getDayIdentifier,getDayOfYear,getEndOfMonth,getEndOfWeek,getStartOfMonth,getStartOfWeek,getTime,getTimeIdentifier,getWeekday,getWeekdaySkips,getWorkWeek,indexOf,isBetweenDates,isLeapYear,makeDate,makeDateTime,nextDay,nextMinutes,padNumber,parseDate,parseTime,parseTimestamp,parsed,prevDay,relativeDays,updateDayOfYear,updateDisabled,updateFormatted,updateMinutes,updateRelative,updateWeekday,updateWorkWeek,validateNumber,validateTimestamp,version}; | ||
import{date,QBtn}from"quasar";var version="1.3.12",PARSE_REGEX=/^(\d{4})-(\d{1,2})(-(\d{1,2}))?([^\d]+(\d{1,2}))?(:(\d{1,2}))?(:(\d{1,2}))?(.(\d{1,3}))?$/,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,HOURS_IN_DAY=24,FIRST_HOUR=0,MILLISECONDS_IN_DAY=864e5,MILLISECONDS_IN_HOUR=36e5,MILLISECONDS_IN_MINUTE=6e4,Timestamp={date:"",time:"",year:0,month:0,day:0,weekday:0,hour:0,minute:0,doy:0,workweek:0,hasDay:!1,hasTime:!1,past:!1,current:!1,future:!1,disabled:!1},TimeObject={hour:0,minute:0};function getStartOfWeek(e,t,a){var r=copyTimestamp(e);if(1===r.day||0===r.weekday)for(;!t.includes(r.weekday);)nextDay(r);return findWeekday(r,t[0],prevDay,t.length),updateFormatted(r),a&&updateRelative(r,a,r.hasTime),r}function getEndOfWeek(e,t,a){var r=copyTimestamp(e);if(daysInMonth(r.year,r.month)===r.day||6===r.weekday)for(;!t.includes(r.weekday);)prevDay(r);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){switch(Object.prototype.toString.call(e)){case"[object Number]":return e;case"[object String]":var t=PARSE_TIME.exec(e);return!!t&&60*parseInt(t[1],10)+parseInt(t[3]||0,10);case"[object Object]":return"number"==typeof e.hour&&"number"==typeof e.minute&&60*e.hour+e.minute}return!1}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 1e8*e.year+1e6*e.month+1e4*e.day}function getTimeIdentifier(e){return 100*e.hour+e.minute}function diffTimestamp(e,t,a){var r=Date.UTC(e.year,e.month-1,e.day,e.hour,e.minute),n=Date.UTC(t.year,t.month-1,t.day,t.hour,t.minute);return!0===a&&n<r?0:n-r}function updateRelative(e,t,a){void 0===a&&(a=!1);var r=getDayIdentifier(t),n=getDayIdentifier(e),i=r===n;return e.hasTime&&a&&i&&(i=(r=getTimeIdentifier(t))===(n=getTimeIdentifier(e))),e.past=n<r,e.current=i,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 updateWorkWeek(e){return e.workweek=getWorkWeek(e),e}function updateDisabled(e,t){if(!Array.isArray(t)||0===t.length)return e;var a=getDayIdentifier(e);for(var r in t){if(getDayIdentifier(parseTimestamp(t[r]+" 00:00"))===a){e.disabled=!0;break}}return e}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)return(Date.UTC(e.year,e.month-1,e.day)-Date.UTC(e.year,0,0))/24/60/60/1e3}function getWorkWeek(e){if(0!==e.year){var t=makeDate(e);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),i=e.year%100-(e.month<=2?1:0);return((a+t(2.6*r-.2)-2*n+i+t(i/4)+t(n/4))%7+7)%7}return e.weekday}function isLeapYear(e){return 1==(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 getDateTime(e){return getDate(e)+(e.hasTime?" "+getTime(e):"")}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 i=1,s=1;s<DAYS_IN_WEEK;++s){if(a[(n+s)%DAYS_IN_WEEK])break;++i}t[n]=a[n]*i}return t}function createDayList(e,t,a,r,n,i,s){void 0===n&&(n=[]),void 0===i&&(i=42),void 0===s&&(s=0);var o=getDayIdentifier(t),d=[],u=copyTimestamp(e),l=0,c=l===o;if(o<getDayIdentifier(e))return d;for(;(!c||d.length<s)&&d.length<i&&(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 i=[],s=0;s<r;++s){var o=(t+s)*a,d=copyTimestamp(e);i.push(updateMinutes(d,o,n))}return i}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(makeDateTime(a))}catch(e){return""}}}function makeDate(e){return new Date(Date.UTC(e.year,e.month-1,e.day,0,0))}function makeDateTime(e){return new Date(Date.UTC(e.year,e.month-1,e.day,e.hour,e.minute))}function validateNumber(e){return isFinite(parseInt(e,10))}function isBetweenDates(e,t,a,r){var n=getDayIdentifier(e)+(!0===r?getTimeIdentifier(e):0),i=getDayIdentifier(t)+(!0===r?getTimeIdentifier(t):0),s=getDayIdentifier(a)+(!0===r?getTimeIdentifier(a):0);return n>=i&&n<=s}function isOverlappingDates(e,t,a,r){var n=getDayIdentifier(e),i=getDayIdentifier(t),s=getDayIdentifier(a),o=getDayIdentifier(r);return n>=s&&n<=o||i>=s&&i<=o||s>=n&&i>=o}function addToDate(e,t){var a,r=copyTimestamp(e);return __forEachObject(t,function(e,t){if(void 0!==r[t]){r[t]+=parseInt(e,10);var n=NORMALIZE_TYPES.indexOf(t);-1!==n&&(a=void 0===a?n:Math.min(n,a))}}),void 0!==a&&__normalize(r,NORMALIZE_TYPES[a]),updateFormatted(r),r}var NORMALIZE_TYPES=["minute","hour","day","month"];function __forEachObject(e,t){Object.keys(e).forEach(function(a){return t(e[a],a)})}function __normalizeMinute(e){if(e.minute>=MINUTES_IN_HOUR||e.minute<0){var t=Math.floor(e.minute/MINUTES_IN_HOUR);e.minute-=t*MINUTES_IN_HOUR,e.hour+=t,__normalizeHour(e)}return e}function __normalizeHour(e){if(e.hour>=HOURS_IN_DAY||e.hour<0){var t=Math.floor(e.hour/HOURS_IN_DAY);e.hour-=t*HOURS_IN_DAY,e.day+=t,__normalizeDay(e)}return e}function __normalizeDay(e){__normalizeMonth(e);var t=daysInMonth(e.year,e.month);if(e.day>t){++e.month,e.month>MONTH_MAX&&__normalizeMonth(e);var a=e.day-t;t=daysInMonth(e.year,e.month);do{a>t&&(++e.month,e.month>MONTH_MAX&&__normalizeMonth(e),a-=t,t=daysInMonth(e.year,e.month))}while(a>t);e.day=a}else if(e.day<=0){var r=-1*e.day;--e.month,e.month<=0&&__normalizeMonth(e),t=daysInMonth(e.year,e.month);do{r>t&&(r-=t,--e.month,e.month<=0&&__normalizeMonth(e),t=daysInMonth(e.year,e.month))}while(r>t);e.day=t-r}return e}function __normalizeMonth(e){if(e.month>MONTH_MAX){var t=Math.floor(e.month/MONTH_MAX);e.month=e.month%MONTH_MAX,e.year+=t}else e.month<MONTH_MIN&&(e.month+=MONTH_MAX,--e.year);return e}function __normalize(e,t){switch(t){case"minute":return __normalizeMinute(e);case"hour":return __normalizeHour(e);case"day":return __normalizeDay(e);case"month":return __normalizeMonth(e)}}function daysBetween(e,t){var a=diffTimestamp(e,t,!0);return Math.floor(a/MILLISECONDS_IN_DAY)}function weeksBetween(e,t){var a=copyTimestamp(e),r=copyTimestamp(t);return a=findWeekday(a,0),r=findWeekday(r,6),Math.ceil(daysBetween(a,r)/DAYS_IN_WEEK)}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 i=e[n];if(a.$listeners[n]){var s=(i.passive?"&":(i.once?"~":"")+(i.capture?"!":""))+i.event,o=function(e){var r=e;return(void 0===i.button||r.buttons>0&&r.button===i.button)&&(i.prevent&&e.preventDefault(),i.stop&&e.stopPropagation(),a.$emit(n,t(e))),i.result};s in r?Array.isArray(r[s])?r[s].push(o):r[s]=[r[s],o]:r[s]=o}};for(var i in e)n(i);return r}}},version$1="1.0.6",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.1",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},dayClass:{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}function indexOf(e,t){for(var a=0;a<e.length;a++)if(!0===t(e[a],a))return a;return-1}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.width=100/this.weekdays.length+"%",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,i=this.isOutside(this.days[a]),s=new Map,o=this.useDefaultTheme;return!0===this.enableTheme&&(i?(r="colorHeaderOutside",n="backgroundHeaderOutside"):(r="colorHeader",n="backgroundHeader"),s=this.getThemeColors([r,n]),o=this.setBothColors),e("div",o(s.get(r),s.get(n),{key:t.date,staticClass:"q-calendar-weekly__head-weekday",style:{width:100/this.weekdays.length+"%"},class:this.getRelativeClasses(t,i)}),[this.__renderHeadDayLabel(e,t,this.shortWeekdayLabel||this.isMiniMode)])},__renderHeadDayLabel:function(e,t,a){var r=this.weekdayFormatter(t,a);return e("span",{staticClass:"ellipsis"},!0===this.isMiniMode&&!0===this.shortWeekdayLabel?r.charAt(0):r)},__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,r=this.$scopedSlots.week,n={week:t,weekdays:this.weekdays,miniMode:this.isMiniMode},i=convertToUnit(this.dayHeight);return e("div",{key:t[0].date,staticClass:"q-calendar-weekly__week--wrapper",style:{height:this.dayHeight&&this.dayHeight>0?i:this.isMiniMode?"auto":"100px"}},[!0===this.showWorkWeeks&&this.__renderWorkWeekGutter(e,t),e("div",{key:t[0].date,staticClass:"q-calendar-weekly__week"},[e("div",{staticClass:"q-calendar-weekly__week-days"},t.map(function(t){return a.__renderDay(e,t)})),void 0!==r?e("div",{staticClass:"q-calendar-weekly__week-events"},r(n)):""])])},__renderWorkWeekGutter:function(e,t){var a,r,n=this.$scopedSlots.workweek,i=t.length>2?t[2]:t[0],s=this.isCurrentWeek(t).timestamp,o=Number(i.workweek).toLocaleString(this.locale),d={workweekLabel:o,week:t,miniMode:this.isMiniMode},u=s&&!0===s.current?this.color:void 0,l=convertToUnit(this.dayHeight),c=new Map,h=this.useDefaultTheme;return!0===this.enableTheme&&(s&&!0===s.current||!0===i.current?(a="colorWorkWeekCurrent",r="backgroundWorkWeekCurrent"):s&&!0===s.past||!0===i.past?(a="colorWorkWeekPast",r="backgroundWorkWeekPast"):(s&&!0===s.future||!0===i.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:i.workweek,staticClass:"q-calendar-weekly__workweek",class:this.getRelativeClasses(!1!==s?s:i,!1),style:{height:this.dayHeight&&this.dayHeight>0?l:"auto"}}),n?n(d):o)},__renderDay:function(e,t){var a,r,n,i=this,s=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(Object.assign({},this.styles),s(t)),m="function"==typeof this.dayClass?this.dayClass(t):null;return e("div",h(c.get(r),c.get(n),{key:t.date,staticClass:"q-calendar-weekly__day",class:[m,Object.assign({},this.getRelativeClasses(t,o),{"q-calendar-weekly__day--droppable":a})],style:y,domProps:{ondragover:function(e){void 0!==i.dragOverFunc&&(a=i.dragOverFunc(e,t,"day"))},ondrop:function(e){void 0!==i.dropFunc&&i.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:"full-width"+(!0===this.isMiniMode?" row justify-around":"")},d?d(u):"")])},__renderDayLabel:function(e,t){var a,r,n=this.isOutside(t),i=!0===t.current?this.color:void 0,s=this.dayFormatter(t,!1),o=this.$scopedSlots["day-label"],d=Object.assign({},{dayLabel:s},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(QBtn,l(void 0!==i?i: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:!0===t.disabled||!0===n},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):s])},__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),i=Object.assign({},{monthLabel:n},t,{miniMode:this.isMiniMode});return e("div",this.setTextColor(a,{staticClass:"q-calendar-weekly__day-month"}),r?r(i):!0!==this.isMiniMode?n:"")}},render:function(e){return e("div",{staticClass:this.staticClass,on:{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,i=e,s=e,o=i.changedTouches||i.touches,d=((o&&o[0]?o[0].clientY:s.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,i=this.useDefaultTheme;return!0===this.enableTheme&&(t="colorIntervalHeader",a="backgroundIntervalHeader",n=this.getThemeColors([t,a]),i=this.setBothColors),e("div",i(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,i,s=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",i="backgroundHeaderPast"):!0===t.current?(n="colorHeaderCurrent",i="backgroundHeaderCurrent"):!0===t.future&&(n="colorHeaderFuture",i="backgroundHeaderFuture"),l=this.getThemeColors([n,i]),c=this.setBothColors),e("div",c(l.get(n),l.get(i),{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!==s.dragOverFunc&&(r=s.dragOverFunc(e,t,"day",a))},ondrop:function(e){void 0!==s.dropFunc&&s.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,i=new Map,s=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"),i=this.getThemeColors([a,r]),s=this.setBothColors),e("div",s(void 0!==n?n:i.get(a),i.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,i=new Map,s=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"),i=this.getThemeColors([a,r]),s=this.setBothColors),e(QBtn,s(void 0!==n?n:i.get(a),i.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,i,s=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",i="backgroundBodyPast"):!0===t.current?(n="colorBodyCurrent",i="backgroundBodyCurrent"):!0===t.future&&(n="colorBodyFuture",i="backgroundBodyFuture"),l=this.getThemeColors([n,i]),c=this.setBothColors),e("div",c(l.get(n),l.get(i),{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 s.getScopeForSlot(s.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,i=convertToUnit(this.intervalHeight),s=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:i},s(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,i=this.useDefaultTheme;!0===this.enableTheme&&(t="colorIntervalBody",a="backgroundIntervalBody",n=this.getThemeColors([t,a]),i=this.setBothColors);var s={staticClass:"q-calendar-daily__intervals-body",on:this.getDefaultMouseEventHandlers(":interval",function(e){return r.getTimestampAtEvent(e,r.parsedStart)})};return e("div",i(n.get(t),n.get(a),s),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),i=this.shortIntervalLabel,s=(this.showIntervalLabel||this.showIntervalLabelDefault)(t)?this.intervalFormatter(t,i):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"}),s)])}},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),i=new Map,s=this.useDefaultTheme;return!0===this.enableTheme&&(t="colorSchedulerHeader",a="backgroundSchedulerHeader",i=this.getThemeColors([t,a]),s=this.setBothColors),e("div",s(i.get(t),i.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,i,s=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",i="backgroundHeaderPast"):!0===t.current?(n="colorHeaderCurrent",i="backgroundHeaderCurrent"):!0===t.future&&(n="colorHeaderFuture",i="backgroundHeaderFuture"),l=this.getThemeColors([n,i]),c=this.setBothColors),e("div",c(l.get(n),l.get(i),{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!==s.dragOverFunc&&(r=s.dragOverFunc(e,t,"day",a))},ondrop:function(e){void 0!==s.dropFunc&&s.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,i=new Map,s=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"),i=this.getThemeColors([a,r]),s=this.setBothColors),e("div",s(void 0!==n?n:i.get(a),i.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,i=!0===t.current?this.color:void 0,s={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!==i?i:o.get(r),o.get(n),{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 s})}),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,i=100/this.days.length,s=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"),s=this.getThemeColors([r,n]),o=this.setBothColors),e("div",o(s.get(r),s.get(n),{key:t.date+(void 0!==a?":"+a:""),staticClass:"q-calendar-scheduler__day",class:this.getRelativeClasses(t),style:{maxWidth:i+"%"}}),[].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,i=this,s=convertToUnit(this.resourceHeight),o=this.resourceStyle||this.resourceStyleDefault,d=this.$scopedSlots["scheduler-resource-day"],u=this.getScopeForSlot(a,r,t),l={height:s};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!==i.dragOverFunc&&(n=i.dragOverFunc(e,t,"resource",r))},ondrop:function(e){void 0!==i.dropFunc&&i.dropFunc(e,t,"resource",r)}},on:this.getDefaultMouseEventHandlers(":resource:day",function(e){return i.getScopeForSlot(i.getTimestampAtEvent(e,a),r,t)})},d?d(u):void 0)},__renderBodyResources:function(e){var t,a,r=convertToUnit(this.resourceWidth),n=new Map,i=this.useDefaultTheme;!0===this.enableTheme&&(t="colorSchedulerBody",a="backgroundSchedulerBody",n=this.getThemeColors([t,a]),i=this.setBothColors);var s={staticClass:"q-calendar-scheduler__resources-body",style:{width:r}};return e("div",i(n.get(t),n.get(a),s),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,i=this.$scopedSlots["scheduler-resource"],s={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 s})},[i?i(s):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,i,s,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?(i="colorBodyPast",s="backgroundBodyPast"):!0===t.current?(i="colorBodyCurrent",s="backgroundBodyCurrent"):!0===t.future&&(i="colorBodyFuture",s="backgroundBodyFuture"),c=this.getThemeColors([i,s]),h=this.setBothColors),e("div",h(c.get(i),c.get(s),{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)])}},QCalendar={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,i=a?e:-e;this.direction=a?"next":"prev";this.maxDays;for(var s=this.weekdaySkips.filter(function(e){return 0!==e}).length;--i>=0;)switch(this.view){case"month":t.day=n,r(t);break;case"week":case"week-scheduler":case"week-agenda":relativeDays(t,r,s,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,i=a.maxDays,s=a.component,o={staticClass:"q-calendar",key:this.keyValue,props:Object.assign({},this.$props,{start:r.date,end:n.date,maxDays:i}),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,s,o)]):this.__renderComponent(e,s,o)}},Plugin={version:version,QCalendar:QCalendar,PARSE_REGEX:PARSE_REGEX,PARSE_TIME:PARSE_TIME,DAYS_IN_MONTH:DAYS_IN_MONTH,DAYS_IN_MONTH_LEAP:DAYS_IN_MONTH_LEAP,DAYS_IN_MONTH_MIN:DAYS_IN_MONTH_MIN,DAYS_IN_MONTH_MAX:DAYS_IN_MONTH_MAX,MONTH_MAX:MONTH_MAX,MONTH_MIN:MONTH_MIN,DAY_MIN:DAY_MIN,DAYS_IN_WEEK:DAYS_IN_WEEK,MINUTES_IN_HOUR:MINUTES_IN_HOUR,HOURS_IN_DAY:HOURS_IN_DAY,FIRST_HOUR:FIRST_HOUR,MILLISECONDS_IN_DAY:MILLISECONDS_IN_DAY,MILLISECONDS_IN_HOUR:MILLISECONDS_IN_HOUR,MILLISECONDS_IN_MINUTE:MILLISECONDS_IN_MINUTE,Timestamp:Timestamp,TimeObject:TimeObject,getStartOfWeek:getStartOfWeek,getEndOfWeek:getEndOfWeek,getStartOfMonth:getStartOfMonth,getEndOfMonth:getEndOfMonth,parseTime:parseTime,validateTimestamp:validateTimestamp,parsed:parsed,parseTimestamp:parseTimestamp,parseDate:parseDate,getDayIdentifier:getDayIdentifier,getTimeIdentifier:getTimeIdentifier,diffTimestamp:diffTimestamp,updateRelative:updateRelative,updateMinutes:updateMinutes,updateWeekday:updateWeekday,updateDayOfYear:updateDayOfYear,updateWorkWeek:updateWorkWeek,updateDisabled:updateDisabled,updateFormatted:updateFormatted,getDayOfYear:getDayOfYear,getWorkWeek:getWorkWeek,getWeekday:getWeekday,isLeapYear:isLeapYear,daysInMonth:daysInMonth,copyTimestamp:copyTimestamp,padNumber:padNumber,getDate:getDate,getTime:getTime,getDateTime:getDateTime,nextDay:nextDay,prevDay:prevDay,relativeDays:relativeDays,findWeekday:findWeekday,getWeekdaySkips:getWeekdaySkips,createDayList:createDayList,createIntervalList:createIntervalList,createNativeLocaleFormatter:createNativeLocaleFormatter,makeDate:makeDate,makeDateTime:makeDateTime,validateNumber:validateNumber,isBetweenDates:isBetweenDates,isOverlappingDates:isOverlappingDates,daysBetween:daysBetween,weeksBetween:weeksBetween,addToDate:addToDate,convertToUnit:convertToUnit,indexOf:indexOf,install:function(e){e.component(QCalendar.name,QCalendar)}};export default Plugin;export{DAYS_IN_MONTH,DAYS_IN_MONTH_LEAP,DAYS_IN_MONTH_MAX,DAYS_IN_MONTH_MIN,DAYS_IN_WEEK,DAY_MIN,FIRST_HOUR,HOURS_IN_DAY,MILLISECONDS_IN_DAY,MILLISECONDS_IN_HOUR,MILLISECONDS_IN_MINUTE,MINUTES_IN_HOUR,MONTH_MAX,MONTH_MIN,PARSE_REGEX,PARSE_TIME,QCalendar,TimeObject,Timestamp,addToDate,convertToUnit,copyTimestamp,createDayList,createIntervalList,createNativeLocaleFormatter,daysBetween,daysInMonth,diffTimestamp,findWeekday,getDate,getDateTime,getDayIdentifier,getDayOfYear,getEndOfMonth,getEndOfWeek,getStartOfMonth,getStartOfWeek,getTime,getTimeIdentifier,getWeekday,getWeekdaySkips,getWorkWeek,indexOf,isBetweenDates,isLeapYear,isOverlappingDates,makeDate,makeDateTime,nextDay,padNumber,parseDate,parseTime,parseTimestamp,parsed,prevDay,relativeDays,updateDayOfYear,updateDisabled,updateFormatted,updateMinutes,updateRelative,updateWeekday,updateWorkWeek,validateNumber,validateTimestamp,version,weeksBetween}; |
/*! | ||
* @quasar/quasar-ui-qcalendar v1.3.11 | ||
* (c) 2019 Jeff Galbraith <jeff@quasar.dev> | ||
* @quasar/quasar-ui-qcalendar v1.3.12 | ||
* (c) 2020 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}))?(.(\d{1,3}))?$/,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,h=7,c=60,y=24,m=0,f=864e5,v={date:"",time:"",year:0,month:0,day:0,weekday:0,hour:0,minute:0,doy:0,workweek:0,hasDay:!1,hasTime:!1,past:!1,current:!1,future:!1,disabled:!1},g={hour:0,minute:0},p={name:"Times",props:{now:{type:String,validator:function(e){return""===e||q(e)}}},data:function(){return{times:{now:E("0000-00-00 00:00"),today:E("0000-00-00")}}},computed:{parsedNow:function(){return this.now?E(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 A(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)}}},_=["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"],k={name:"QColorizeMixin",props:{color:String},methods:{isNamedCssColor:function(e){return!!e&&_.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.6"},b={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.1"},C={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:ge},intervalMinutes:{type:[Number,String],default:60,validator:ge},intervalStart:{type:[Number,String],default:0,validator:ge},intervalCount:{type:[Number,String],default:24,validator:ge},intervalStyle:{type:Function,default:null},showIntervalLabel:{type:Function,default:null},hour24Format:Boolean,columnHeaderBefore:Boolean,columnHeaderAfter:Boolean,columnCount:{type:[Number,String],default:1,validator:ge},columnIndexStart:{type:[Number,String],default:0,validator:ge}},weeks:{dayHeight:{type:[Number,String],default:0,validator:ge},dayStyle:{type:Function,default:null},dayClass:{type:Function,default:null},dayPadding:String,minWeeks:{type:[Number,String],validator:ge,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:ge},resourceWidth:{type:[Number,String],validator:function(e){return void 0===e||ge(e)}},resourceStyle:{type:Function,default:null},columnHeaderBefore:Boolean,columnHeaderAfter:Boolean,columnCount:{type:[Number,String],default:1,validator:ge},columnIndexStart:{type:[Number,String],default:0,validator:ge}},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||q(e)}}}},w={name:"CalendarBase",mixins:[k,b,{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}}},p],props:Object.assign({},C.base,{start:{type:String,validator:q,default:function(){return A(new Date).date}},end:{type:String,validator:q,default:"0000-00-00"}}),data:function(){return{keyValue:"YYYY-mm-dd",direction:"next"}},computed:{weekdaySkips:function(){return he(this.weekdays)},parsedStart:function(){return E(this.start)},parsedEnd:function(){return E(this.end)},days:function(){return ce(this.parsedStart,this.parsedEnd,this.times.today,this.weekdaySkips,this.disabledDays)},dayFormatter:function(){var e={timeZone:"UTC",day:"numeric"};return me(this.locale,function(t,r){return e})},weekdayFormatter:function(){var e={timeZone:"UTC",weekday:"long"},t={timeZone:"UTC",weekday:"short"};return me(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 O(e,this.weekdays,this.times.today)},getEndOfWeek:function(e){return B(e,this.weekdays,this.times.today)},dayStyleDefault:function(e){}}},D={name:"QCalendarMonthly",mixins:[{name:"QCalendarWeekly",mixins:[w],props:C.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 ce(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 ce(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 me(this.locale,function(r,a){return a?t:e})},styles:function(){var e={};if(this.dayHeight>0){var t=be(this.dayHeight);e.height=t}return void 0!==this.dayPadding&&(e.padding=this.dayPadding),e.width=100/this.weekdays.length+"%",e},isMiniMode:function(){return!0===this.miniMode||"auto"===this.miniMode&&this.$q.screen.lt[this.breakpoint]}},methods:{isOutside:function(e){var t=R(e);return t<R(this.parsedStart)||t>R(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:"q-calendar-weekly__head-weekday",style:{width:100/this.weekdays.length+"%"},class:this.getRelativeClasses(t,s)}),[this.__renderHeadDayLabel(e,t,this.shortWeekdayLabel||this.isMiniMode)])},__renderHeadDayLabel:function(e,t,r){var a=this.weekdayFormatter(t,r);return e("span",{staticClass:"ellipsis"},!0===this.isMiniMode&&!0===this.shortWeekdayLabel?a.charAt(0):a)},__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,a=this.$scopedSlots.week,n={week:t,weekdays:this.weekdays,miniMode:this.isMiniMode},s=be(this.dayHeight);return e("div",{key:t[0].date,staticClass:"q-calendar-weekly__week--wrapper",style:{height:this.dayHeight&&this.dayHeight>0?s:this.isMiniMode?"auto":"100px"}},[!0===this.showWorkWeeks&&this.__renderWorkWeekGutter(e,t),e("div",{key:t[0].date,staticClass:"q-calendar-weekly__week"},[e("div",{staticClass:"q-calendar-weekly__week-days"},t.map(function(t){return r.__renderDay(e,t)})),void 0!==a?e("div",{staticClass:"q-calendar-weekly__week-events"},a(n)):""])])},__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=be(this.dayHeight),h=new Map,c=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"),h=this.getThemeColors([r,a]),c=this.setBothColors),e("div",c(void 0!==u?u:h.get(r),h.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,h=new Map,c=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"),h=this.getThemeColors([a,n]),c=this.setBothColors);var y=Object.assign(Object.assign({},this.styles),i(t)),m="function"==typeof this.dayClass?this.dayClass(t):null;return e("div",c(h.get(a),h.get(n),{key:t.date,staticClass:"q-calendar-weekly__day",class:[m,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:"full-width"+(!0===this.isMiniMode?" row justify-around":"")},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,h=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]),h=this.setBothColors),e(r.QBtn,h(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:!0===t.disabled||!0===s},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,on:{dragstart:function(e){e.preventDefault()}}},[!this.hideHeader&&this.__renderHead(e)].concat(this.__renderWeeks(e)))}}],computed:{parsedStart:function(){return L(E(this.start))},parsedEnd:function(){return x(E(this.end))}}},S={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}}},T={name:"QCalendarDaily",mixins:[{name:"CalendarWithIntervals",mixins:[w],props:Object.assign({},C.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 ce(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 ye(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 me(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=te(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 Y(r,n+Math.floor(d*this.parsedIntervalMinutes),this.times.now)},getScopeForSlot:function(e,t){var r=te(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=F(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:S},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,h=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]),h=this.setBothColors),e("div",h(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:be(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,h=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]),h=this.setBothColors),e("div",h(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=be(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=be(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)])}},H={name:"QCalendarScheduler",mixins:[{name:"CalendarWithScheduler",mixins:[w],props:Object.assign({},C.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 ce(this.parsedStart,this.parsedEnd,this.times.today,this.weekdaySkips,this.disabledDays,this.maxDays)}},methods:{resourceStyleDefault:function(e){},getTimestampAtEvent:function(e,t){return j(te(t),this.times.now,!1)},getScopeForSlot:function(e,t,r){var a={};return a.day=te(e),void 0!==t&&(a.index=t),void 0!==r&&(a.resource=r),a}}}],directives:{Resize:S},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=be(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,h=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]),h=this.setBothColors),e("div",h(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:be(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=be(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=be(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=be(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)])}},M={name:"QCalendarAgenda",mixins:[T],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,h=new Map,c=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"),h=this.getThemeColors([s,i]),c=this.setBothColors),e("div",c(h.get(s),h.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)])}},I={name:"QCalendar",mixins:[w],props:Object.assign({},C.calendar,C.weeks,C.intervals,C.scheduler),data:function(){return{lastStart:void 0,lastEnd:void 0}},computed:{parsedValue:function(){return E(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=D,a=L(e),n=x(e);break;case"week":case"week-agenda":case"week-scheduler":t=this.view.endsWith("-agenda")?M:this.view.endsWith("-scheduler")?H:T,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")?M:this.view.endsWith("-scheduler")?H:T,r=1,Z(n=ue(te(n),oe,r,this.weekdays));break;case"2day":case"2day-scheduler":case"2day-agenda":t=this.view.endsWith("-agenda")?M:this.view.endsWith("-scheduler")?H:T,r=2,Z(n=ue(te(n),oe,r,this.weekdays));break;case"3day":case"3day-scheduler":case"3day-agenda":t=this.view.endsWith("-agenda")?M:this.view.endsWith("-scheduler")?H:T,r=3,Z(n=ue(te(n),oe,r,this.weekdays));break;case"4day":case"4day-scheduler":case"4day-agenda":t=this.view.endsWith("-agenda")?M:this.view.endsWith("-scheduler")?H:T,r=4,Z(n=ue(te(n),oe,r,this.weekdays));break;case"5day":case"5day-scheduler":case"5day-agenda":t=this.view.endsWith("-agenda")?M:this.view.endsWith("-scheduler")?H:T,r=5,Z(n=ue(te(n),oe,r,this.weekdays));break;case"6day":case"6day-scheduler":case"6day-agenda":t=this.view.endsWith("-agenda")?M:this.view.endsWith("-scheduler")?H:T,r=6,Z(n=ue(te(n),oe,r,this.weekdays));break;case"custom-interval":case"custom-scheduler":case"custom-agenda":t=this.view.endsWith("-agenda")?M:this.view.endsWith("-scheduler")?H:T,Z(n=ue(te(n),oe,this.maxDays,this.weekdays));break;case"scheduler":case"agenda":t="scheduler"===this.view?H:M,Z(n=ue(te(n),oe,this.maxDays,this.weekdays));break;case"month-interval":case"month-scheduler":case"month-agenda":t=this.view.endsWith("-agenda")?M:this.view.endsWith("-scheduler")?H:T,a=L(e),Z(n=x(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=R(a)},move:function(e){void 0===e&&(e=1);var t=te(this.parsedValue),r=e>0,a=r?oe:de,n=r?31:l,s=r?e:-e;this.direction=r?"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,a(t);break;case"week":case"week-scheduler":case"week-agenda":ue(t,a,i,this.weekdays);break;case"day":case"day-scheduler":case"day-agenda":ue(t,a,1,this.weekdays);break;case"2day":case"2day-scheduler":case"2day-agenda":ue(t,a,2,this.weekdays);break;case"3day":case"3day-scheduler":case"3day-agenda":ue(t,a,3,this.weekdays);break;case"4day":case"4day-scheduler":case"4day-agenda":ue(t,a,4,this.weekdays);break;case"5day":case"5day-scheduler":case"5day-agenda":ue(t,a,5,this.weekdays);break;case"6day":case"6day-scheduler":case"6day-agenda":ue(t,a,6,this.weekdays);break;case"custom-interval":case"custom-scheduler":case"custom-agenda":case"agenda":ue(t,a,this.maxDays,this.weekdays);break;case"month-interval":case"month-agenda":case"month-scheduler":t.day=n,a(t)}U(t),Z(t),z(t),j(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)}},W={version:"1.3.11",QCalendar:I,PARSE_REGEX:a,PARSE_TIME:n,DAYS_IN_MONTH:s,DAYS_IN_MONTH_LEAP:i,DAYS_IN_MONTH_MIN:o,DAYS_IN_MONTH_MAX:31,MONTH_MAX:d,MONTH_MIN:u,DAY_MIN:l,DAYS_IN_WEEK:h,MINUTES_IN_HOUR:c,HOURS_IN_DAY:y,FIRST_HOUR:m,MILLISECONDS_IN_DAY:f,MILLISECONDS_IN_HOUR:36e5,MILLISECONDS_IN_MINUTE:6e4,Timestamp:v,TimeObject:g,getStartOfWeek:O,getEndOfWeek:B,getStartOfMonth:L,getEndOfMonth:x,parseTime:F,validateTimestamp:q,parsed:N,parseTimestamp:E,parseDate:A,getDayIdentifier:R,getTimeIdentifier:P,diffTimestamp:$,updateRelative:j,updateMinutes:Y,updateWeekday:U,updateDayOfYear:z,updateWorkWeek:Q,updateDisabled:V,updateFormatted:Z,getDayOfYear:X,getWorkWeek:G,getWeekday:K,isLeapYear:J,daysInMonth:ee,copyTimestamp:te,padNumber:re,getDate:ae,getTime:ne,getDateTime:se,nextMinutes:ie,nextDay:oe,prevDay:de,relativeDays:ue,findWeekday:le,getWeekdaySkips:he,createDayList:ce,createIntervalList:ye,createNativeLocaleFormatter:me,makeDate:fe,makeDateTime:ve,validateNumber:ge,isBetweenDates:pe,addToDate:ke,convertToUnit:be,indexOf:Ce,install:function(e){e.component(I.name,I)}};t.use(W),e.DAYS_IN_MONTH=s,e.DAYS_IN_MONTH_LEAP=i,e.DAYS_IN_MONTH_MAX=31,e.DAYS_IN_MONTH_MIN=o,e.DAYS_IN_WEEK=h,e.DAY_MIN=l,e.FIRST_HOUR=m,e.HOURS_IN_DAY=y,e.MILLISECONDS_IN_DAY=f,e.MILLISECONDS_IN_HOUR=36e5,e.MILLISECONDS_IN_MINUTE=6e4,e.MINUTES_IN_HOUR=c,e.MONTH_MAX=d,e.MONTH_MIN=u,e.PARSE_REGEX=a,e.PARSE_TIME=n,e.QCalendar=I,e.TimeObject=g,e.Timestamp=v,e.addToDate=ke,e.convertToUnit=be,e.copyTimestamp=te,e.createDayList=ce,e.createIntervalList=ye,e.createNativeLocaleFormatter=me,e.daysInMonth=ee,e.diffTimestamp=$,e.findWeekday=le,e.getDate=ae,e.getDateTime=se,e.getDayIdentifier=R,e.getDayOfYear=X,e.getEndOfMonth=x,e.getEndOfWeek=B,e.getStartOfMonth=L,e.getStartOfWeek=O,e.getTime=ne,e.getTimeIdentifier=P,e.getWeekday=K,e.getWeekdaySkips=he,e.getWorkWeek=G,e.indexOf=Ce,e.isBetweenDates=pe,e.isLeapYear=J,e.makeDate=fe,e.makeDateTime=ve,e.nextDay=oe,e.nextMinutes=ie,e.padNumber=re,e.parseDate=A,e.parseTime=F,e.parseTimestamp=E,e.parsed=N,e.prevDay=de,e.relativeDays=ue,e.updateDayOfYear=z,e.updateDisabled=V,e.updateFormatted=Z,e.updateMinutes=Y,e.updateRelative=j,e.updateWeekday=U,e.updateWorkWeek=Q,e.validateNumber=ge,e.validateTimestamp=q,e.version="1.3.11",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 O(e,t,r){if(1===e.day||0===e.weekday)for(;!t.includes(e.weekday);)oe(e);var a=te(e);return le(a,t[0],de,t.length),Z(a),r&&j(a,r,a.hasTime),a}function B(e,t,r){if(ee(e.year,e.month)===e.day||6===e.weekday)for(;!t.includes(e.weekday);)de(e);var a=te(e);return le(a,t[t.length-1],oe,t.length),Z(a),r&&j(a,r,a.hasTime),a}function L(e){var t=te(e);return t.day=l,Z(t),t}function x(e){var t=te(e);return t.day=ee(t.year,t.month),Z(t),t}function F(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)}function q(e){return!!a.exec(e)}function N(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}function E(e,t){var r=N(e);return null===r?null:(Z(r),t&&j(r,t,r.hasTime),r)}function A(e){return Z({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 R(e){return 1e4*e.year+100*e.month+e.day}function P(e){return 100*e.hour+e.minute}function $(e,t,r){var a=Date.UTC(e.year,e.month-1,e.day,e.hour,e.minute),n=Date.UTC(t.year,t.month-1,t.day,t.hour,t.minute);return!0===r&&n<a?0:Math.floor((n-a)/f)}function j(e,t,r){void 0===r&&(r=!1);var a=R(t),n=R(e),s=a===n;return e.hasTime&&r&&s&&(s=(a=P(t))===(n=P(e))),e.past=n<a,e.current=s,e.future=n>a,e}function Y(e,t,r){return e.hasTime=!0,e.hour=Math.floor(t/c),e.minute=t%c,e.time=ne(e),r&&j(e,r,!0),e}function U(e){return e.weekday=K(e),e}function z(e){return e.doy=X(e),e}function Q(e){return e.workweek=G(e),e}function V(e,t){if(!Array.isArray(t)||0===t.length)return e;var r=R(e);for(var a in t){if(R(E(t[a]+" 00:00"))===r){e.disabled=!0;break}}return e}function Z(e){return e.time=ne(e),e.date=ae(e),e.weekday=K(e),e.doy=X(e),e.workweek=G(e),e}function X(e){if(0!==e.year)return(Date.UTC(e.year,e.month-1,e.day)-Date.UTC(e.year,0,0))/24/60/60/1e3}function G(e){if(0!==e.year){var t=fe(e);return r.date.getWeekOfYear(t)}}function K(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 J(e){return e%4==0&&e%100!=0||e%400==0}function ee(e,t){return J(e)?i[t]:s[t]}function te(e){return Object.assign({},e)}function re(e,t){for(var r=String(e);r.length<t;)r="0"+r;return r}function ae(e){var t=re(e.year,4)+"-"+re(e.month,2);return e.hasDay&&(t+="-"+re(e.day,2)),t}function ne(e){return e.hasTime?re(e.hour,2)+":"+re(e.minute,2):""}function se(e){return ae(e)+" "+ne(e)}function ie(e,t){for(e.minute+=t;e.minute>c;)e.minute-=c,++e.hour,e.hour>=y&&(oe(e),e.hour=m);return e}function oe(e){return++e.day,e.weekday=(e.weekday+1)%h,e.day>o&&e.day>ee(e.year,e.month)&&(e.day=l,++e.month,e.month>d&&(e.month=u,++e.year)),e}function de(e){return e.day--,e.weekday=(e.weekday+6)%h,e.day<l&&(e.month--,e.month<u&&(e.year--,e.month=d),e.day=ee(e.year,e.month)),e}function ue(e,t,r,a){for(void 0===t&&(t=oe),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 le(e,t,r,a){for(void 0===r&&(r=oe),void 0===a&&(a=6);e.weekday!==t&&--a>=0;)r(e);return e}function he(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<h;++n){for(var s=1,i=1;i<h;++i){if(r[(n+i)%h])break;++s}t[n]=r[n]*s}return t}function ce(e,t,r,a,n,s,i){void 0===n&&(n=[]),void 0===s&&(s=42),void 0===i&&(i=0);var o=R(t),d=[],u=te(e),l=0,h=l===o;if(o<R(e))return d;for(;(!h||d.length<i)&&d.length<s&&(l=R(u),!(h=h||l>o));)if(0!==a[u.weekday]){var c=te(u);Z(c),j(c,r),V(c,n),d.push(c),u=ue(u,oe)}else u=oe(u);return d}function ye(e,t,r,a,n){for(var s=[],i=0;i<a;++i){var o=(t+i)*r,d=te(e);s.push(Y(d,o,n))}return s}function me(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(ve(r))}catch(e){return""}}}function fe(e){return new Date(Date.UTC(e.year,e.month-1,e.day,0,0))}function ve(e){return new Date(Date.UTC(e.year,e.month-1,e.day,e.hour,e.minute))}function ge(e){return isFinite(parseInt(e,10))}function pe(e,t,r,a){void 0===a&&(a=!1);var n=parseInt(R(e)+String(!0===a?P(e):""),10),s=parseInt(R(t)+String(!0===a?P(t):""),10),i=parseInt(R(r)+String(!0===a?P(r):""),10);return n>=s&&n<=i}function _e(e){var t=te(e);if(t.month>d){var r=Math.floor(t.month/d);t.month=t.month%d,t.year+=r}else if(t.month<u){var a=-1*t.month;t.month=d-a,--t.year}return t}function ke(e,t){var r=te(e);return Object.keys(t).forEach(function(e){void 0!==r[e]&&(r[e]+=parseInt(t[e],10))}),function(e){if(e.minute>=c){var t=Math.floor(e.minute/c);e.minute-=t*c,e.hour+=t}else if(e.minute<0){var r=-1*e.minute,a=Math.floor(r/c)+1;r%=c,e.minute=c-r,e.hour-=a}}(r),function(e){if(e.hour>=y){var t=Math.floor(e.hour/y);e.hour-=t*y,e.day+=t}else if(e.hour<0){var r=-1*e.hour,a=Math.floor(r/y)+1;r%=y,e.hour=y-r,e.day-=a}}(r),function(e){_e(e);var t=ee(e.year,e.month);if(e.day>t){++e.month,e.month>d&&_e(e);var r=e.day-t;t=ee(e.year,e.month);do{r>t&&(++e.month,e.month>d&&_e(e),r-=t,t=ee(e.year,e.month))}while(r>t);e.day=r}else if(e.day<=0){var a=-1*e.day;--e.month,e.month<=0&&_e(e),t=ee(e.year,e.month);do{a>t&&(a-=t,--e.month,e.month<=0&&_e(e),t=ee(e.year,e.month))}while(a>t);e.day=t-a}}(r),_e(r),Z(r),r}function be(e,t){return void 0===t&&(t="px"),null==e||""===e?void 0:isNaN(e)?String(e):""+Number(e)+t}function Ce(e,t){for(var r=0;r<e.length;r++)if(!0===t(e[r],r))return r;return-1}}); | ||
!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}))?(.(\d{1,3}))?$/,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,h=7,c=60,y=24,m=864e5,f={date:"",time:"",year:0,month:0,day:0,weekday:0,hour:0,minute:0,doy:0,workweek:0,hasDay:!1,hasTime:!1,past:!1,current:!1,future:!1,disabled:!1},v={hour:0,minute:0},g=["minute","hour","day","month"],p={name:"Times",props:{now:{type:String,validator:function(e){return""===e||q(e)}}},data:function(){return{times:{now:E("0000-00-00 00:00"),today:E("0000-00-00")}}},computed:{parsedNow:function(){return this.now?E(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 A(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)}}},_=["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"],k={name:"QColorizeMixin",props:{color:String},methods:{isNamedCssColor:function(e){return!!e&&_.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.6"},b={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.1"},w={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:ve},intervalMinutes:{type:[Number,String],default:60,validator:ve},intervalStart:{type:[Number,String],default:0,validator:ve},intervalCount:{type:[Number,String],default:24,validator:ve},intervalStyle:{type:Function,default:null},showIntervalLabel:{type:Function,default:null},hour24Format:Boolean,columnHeaderBefore:Boolean,columnHeaderAfter:Boolean,columnCount:{type:[Number,String],default:1,validator:ve},columnIndexStart:{type:[Number,String],default:0,validator:ve}},weeks:{dayHeight:{type:[Number,String],default:0,validator:ve},dayStyle:{type:Function,default:null},dayClass:{type:Function,default:null},dayPadding:String,minWeeks:{type:[Number,String],validator:ve,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:ve},resourceWidth:{type:[Number,String],validator:function(e){return void 0===e||ve(e)}},resourceStyle:{type:Function,default:null},columnHeaderBefore:Boolean,columnHeaderAfter:Boolean,columnCount:{type:[Number,String],default:1,validator:ve},columnIndexStart:{type:[Number,String],default:0,validator:ve}},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||q(e)}}}},C={name:"CalendarBase",mixins:[k,b,{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}}},p],props:Object.assign({},w.base,{start:{type:String,validator:q,default:function(){return A(new Date).date}},end:{type:String,validator:q,default:"0000-00-00"}}),data:function(){return{keyValue:"YYYY-mm-dd",direction:"next"}},computed:{weekdaySkips:function(){return le(this.weekdays)},parsedStart:function(){return E(this.start)},parsedEnd:function(){return E(this.end)},days:function(){return he(this.parsedStart,this.parsedEnd,this.times.today,this.weekdaySkips,this.disabledDays)},dayFormatter:function(){var e={timeZone:"UTC",day:"numeric"};return ye(this.locale,function(t,r){return e})},weekdayFormatter:function(){var e={timeZone:"UTC",weekday:"long"},t={timeZone:"UTC",weekday:"short"};return ye(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 O(e,this.weekdays,this.times.today)},getEndOfWeek:function(e){return B(e,this.weekdays,this.times.today)},dayStyleDefault:function(e){}}},D={name:"QCalendarMonthly",mixins:[{name:"QCalendarWeekly",mixins:[C],props:w.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 he(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 he(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 ye(this.locale,function(r,a){return a?t:e})},styles:function(){var e={};if(this.dayHeight>0){var t=Se(this.dayHeight);e.height=t}return void 0!==this.dayPadding&&(e.padding=this.dayPadding),e.width=100/this.weekdays.length+"%",e},isMiniMode:function(){return!0===this.miniMode||"auto"===this.miniMode&&this.$q.screen.lt[this.breakpoint]}},methods:{isOutside:function(e){var t=R(e);return t<R(this.parsedStart)||t>R(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:"q-calendar-weekly__head-weekday",style:{width:100/this.weekdays.length+"%"},class:this.getRelativeClasses(t,s)}),[this.__renderHeadDayLabel(e,t,this.shortWeekdayLabel||this.isMiniMode)])},__renderHeadDayLabel:function(e,t,r){var a=this.weekdayFormatter(t,r);return e("span",{staticClass:"ellipsis"},!0===this.isMiniMode&&!0===this.shortWeekdayLabel?a.charAt(0):a)},__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,a=this.$scopedSlots.week,n={week:t,weekdays:this.weekdays,miniMode:this.isMiniMode},s=Se(this.dayHeight);return e("div",{key:t[0].date,staticClass:"q-calendar-weekly__week--wrapper",style:{height:this.dayHeight&&this.dayHeight>0?s:this.isMiniMode?"auto":"100px"}},[!0===this.showWorkWeeks&&this.__renderWorkWeekGutter(e,t),e("div",{key:t[0].date,staticClass:"q-calendar-weekly__week"},[e("div",{staticClass:"q-calendar-weekly__week-days"},t.map(function(t){return r.__renderDay(e,t)})),void 0!==a?e("div",{staticClass:"q-calendar-weekly__week-events"},a(n)):""])])},__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=Se(this.dayHeight),h=new Map,c=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"),h=this.getThemeColors([r,a]),c=this.setBothColors),e("div",c(void 0!==u?u:h.get(r),h.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,h=new Map,c=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"),h=this.getThemeColors([a,n]),c=this.setBothColors);var y=Object.assign(Object.assign({},this.styles),i(t)),m="function"==typeof this.dayClass?this.dayClass(t):null;return e("div",c(h.get(a),h.get(n),{key:t.date,staticClass:"q-calendar-weekly__day",class:[m,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:"full-width"+(!0===this.isMiniMode?" row justify-around":"")},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,h=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]),h=this.setBothColors),e(r.QBtn,h(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:!0===t.disabled||!0===s},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,on:{dragstart:function(e){e.preventDefault()}}},[!this.hideHeader&&this.__renderHead(e)].concat(this.__renderWeeks(e)))}}],computed:{parsedStart:function(){return L(E(this.start))},parsedEnd:function(){return F(E(this.end))}}},S={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}}},T={name:"QCalendarDaily",mixins:[{name:"CalendarWithIntervals",mixins:[C],props:Object.assign({},w.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 he(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 ce(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 ye(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=te(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 Y(r,n+Math.floor(d*this.parsedIntervalMinutes),this.times.now)},getScopeForSlot:function(e,t){var r=te(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=x(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:S},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,h=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]),h=this.setBothColors),e("div",h(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:Se(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,h=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]),h=this.setBothColors),e("div",h(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=Se(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=Se(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)])}},H={name:"QCalendarScheduler",mixins:[{name:"CalendarWithScheduler",mixins:[C],props:Object.assign({},w.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 he(this.parsedStart,this.parsedEnd,this.times.today,this.weekdaySkips,this.disabledDays,this.maxDays)}},methods:{resourceStyleDefault:function(e){},getTimestampAtEvent:function(e,t){return j(te(t),this.times.now,!1)},getScopeForSlot:function(e,t,r){var a={};return a.day=te(e),void 0!==t&&(a.index=t),void 0!==r&&(a.resource=r),a}}}],directives:{Resize:S},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=Se(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,h=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]),h=this.setBothColors),e("div",h(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:Se(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=Se(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=Se(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=Se(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)])}},M={name:"QCalendarAgenda",mixins:[T],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,h=new Map,c=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"),h=this.getThemeColors([s,i]),c=this.setBothColors),e("div",c(h.get(s),h.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)])}},I={name:"QCalendar",mixins:[C],props:Object.assign({},w.calendar,w.weeks,w.intervals,w.scheduler),data:function(){return{lastStart:void 0,lastEnd:void 0}},computed:{parsedValue:function(){return E(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=D,a=L(e),n=F(e);break;case"week":case"week-agenda":case"week-scheduler":t=this.view.endsWith("-agenda")?M:this.view.endsWith("-scheduler")?H:T,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")?M:this.view.endsWith("-scheduler")?H:T,r=1,Z(n=de(te(n),ie,r,this.weekdays));break;case"2day":case"2day-scheduler":case"2day-agenda":t=this.view.endsWith("-agenda")?M:this.view.endsWith("-scheduler")?H:T,r=2,Z(n=de(te(n),ie,r,this.weekdays));break;case"3day":case"3day-scheduler":case"3day-agenda":t=this.view.endsWith("-agenda")?M:this.view.endsWith("-scheduler")?H:T,r=3,Z(n=de(te(n),ie,r,this.weekdays));break;case"4day":case"4day-scheduler":case"4day-agenda":t=this.view.endsWith("-agenda")?M:this.view.endsWith("-scheduler")?H:T,r=4,Z(n=de(te(n),ie,r,this.weekdays));break;case"5day":case"5day-scheduler":case"5day-agenda":t=this.view.endsWith("-agenda")?M:this.view.endsWith("-scheduler")?H:T,r=5,Z(n=de(te(n),ie,r,this.weekdays));break;case"6day":case"6day-scheduler":case"6day-agenda":t=this.view.endsWith("-agenda")?M:this.view.endsWith("-scheduler")?H:T,r=6,Z(n=de(te(n),ie,r,this.weekdays));break;case"custom-interval":case"custom-scheduler":case"custom-agenda":t=this.view.endsWith("-agenda")?M:this.view.endsWith("-scheduler")?H:T,Z(n=de(te(n),ie,this.maxDays,this.weekdays));break;case"scheduler":case"agenda":t="scheduler"===this.view?H:M,Z(n=de(te(n),ie,this.maxDays,this.weekdays));break;case"month-interval":case"month-scheduler":case"month-agenda":t=this.view.endsWith("-agenda")?M:this.view.endsWith("-scheduler")?H:T,a=L(e),Z(n=F(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=R(a)},move:function(e){void 0===e&&(e=1);var t=te(this.parsedValue),r=e>0,a=r?ie:oe,n=r?31:l,s=r?e:-e;this.direction=r?"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,a(t);break;case"week":case"week-scheduler":case"week-agenda":de(t,a,i,this.weekdays);break;case"day":case"day-scheduler":case"day-agenda":de(t,a,1,this.weekdays);break;case"2day":case"2day-scheduler":case"2day-agenda":de(t,a,2,this.weekdays);break;case"3day":case"3day-scheduler":case"3day-agenda":de(t,a,3,this.weekdays);break;case"4day":case"4day-scheduler":case"4day-agenda":de(t,a,4,this.weekdays);break;case"5day":case"5day-scheduler":case"5day-agenda":de(t,a,5,this.weekdays);break;case"6day":case"6day-scheduler":case"6day-agenda":de(t,a,6,this.weekdays);break;case"custom-interval":case"custom-scheduler":case"custom-agenda":case"agenda":de(t,a,this.maxDays,this.weekdays);break;case"month-interval":case"month-agenda":case"month-scheduler":t.day=n,a(t)}U(t),Z(t),z(t),j(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)}},W={version:"1.3.12",QCalendar:I,PARSE_REGEX:a,PARSE_TIME:n,DAYS_IN_MONTH:s,DAYS_IN_MONTH_LEAP:i,DAYS_IN_MONTH_MIN:o,DAYS_IN_MONTH_MAX:31,MONTH_MAX:d,MONTH_MIN:u,DAY_MIN:l,DAYS_IN_WEEK:h,MINUTES_IN_HOUR:c,HOURS_IN_DAY:y,FIRST_HOUR:0,MILLISECONDS_IN_DAY:m,MILLISECONDS_IN_HOUR:36e5,MILLISECONDS_IN_MINUTE:6e4,Timestamp:f,TimeObject:v,getStartOfWeek:O,getEndOfWeek:B,getStartOfMonth:L,getEndOfMonth:F,parseTime:x,validateTimestamp:q,parsed:N,parseTimestamp:E,parseDate:A,getDayIdentifier:R,getTimeIdentifier:P,diffTimestamp:$,updateRelative:j,updateMinutes:Y,updateWeekday:U,updateDayOfYear:z,updateWorkWeek:Q,updateDisabled:V,updateFormatted:Z,getDayOfYear:X,getWorkWeek:G,getWeekday:K,isLeapYear:J,daysInMonth:ee,copyTimestamp:te,padNumber:re,getDate:ae,getTime:ne,getDateTime:se,nextDay:ie,prevDay:oe,relativeDays:de,findWeekday:ue,getWeekdaySkips:le,createDayList:he,createIntervalList:ce,createNativeLocaleFormatter:ye,makeDate:me,makeDateTime:fe,validateNumber:ve,isBetweenDates:ge,isOverlappingDates:pe,daysBetween:Ce,weeksBetween:De,addToDate:_e,convertToUnit:Se,indexOf:Te,install:function(e){e.component(I.name,I)}};t.use(W),e.DAYS_IN_MONTH=s,e.DAYS_IN_MONTH_LEAP=i,e.DAYS_IN_MONTH_MAX=31,e.DAYS_IN_MONTH_MIN=o,e.DAYS_IN_WEEK=h,e.DAY_MIN=l,e.FIRST_HOUR=0,e.HOURS_IN_DAY=y,e.MILLISECONDS_IN_DAY=m,e.MILLISECONDS_IN_HOUR=36e5,e.MILLISECONDS_IN_MINUTE=6e4,e.MINUTES_IN_HOUR=c,e.MONTH_MAX=d,e.MONTH_MIN=u,e.PARSE_REGEX=a,e.PARSE_TIME=n,e.QCalendar=I,e.TimeObject=v,e.Timestamp=f,e.addToDate=_e,e.convertToUnit=Se,e.copyTimestamp=te,e.createDayList=he,e.createIntervalList=ce,e.createNativeLocaleFormatter=ye,e.daysBetween=Ce,e.daysInMonth=ee,e.diffTimestamp=$,e.findWeekday=ue,e.getDate=ae,e.getDateTime=se,e.getDayIdentifier=R,e.getDayOfYear=X,e.getEndOfMonth=F,e.getEndOfWeek=B,e.getStartOfMonth=L,e.getStartOfWeek=O,e.getTime=ne,e.getTimeIdentifier=P,e.getWeekday=K,e.getWeekdaySkips=le,e.getWorkWeek=G,e.indexOf=Te,e.isBetweenDates=ge,e.isLeapYear=J,e.isOverlappingDates=pe,e.makeDate=me,e.makeDateTime=fe,e.nextDay=ie,e.padNumber=re,e.parseDate=A,e.parseTime=x,e.parseTimestamp=E,e.parsed=N,e.prevDay=oe,e.relativeDays=de,e.updateDayOfYear=z,e.updateDisabled=V,e.updateFormatted=Z,e.updateMinutes=Y,e.updateRelative=j,e.updateWeekday=U,e.updateWorkWeek=Q,e.validateNumber=ve,e.validateTimestamp=q,e.version="1.3.12",e.weeksBetween=De,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 O(e,t,r){var a=te(e);if(1===a.day||0===a.weekday)for(;!t.includes(a.weekday);)ie(a);return ue(a,t[0],oe,t.length),Z(a),r&&j(a,r,a.hasTime),a}function B(e,t,r){var a=te(e);if(ee(a.year,a.month)===a.day||6===a.weekday)for(;!t.includes(a.weekday);)oe(a);return ue(a,t[t.length-1],ie,t.length),Z(a),r&&j(a,r,a.hasTime),a}function L(e){var t=te(e);return t.day=l,Z(t),t}function F(e){var t=te(e);return t.day=ee(t.year,t.month),Z(t),t}function x(e){switch(Object.prototype.toString.call(e)){case"[object Number]":return e;case"[object String]":var t=n.exec(e);return!!t&&60*parseInt(t[1],10)+parseInt(t[3]||0,10);case"[object Object]":return"number"==typeof e.hour&&"number"==typeof e.minute&&60*e.hour+e.minute}return!1}function q(e){return!!a.exec(e)}function N(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}function E(e,t){var r=N(e);return null===r?null:(Z(r),t&&j(r,t,r.hasTime),r)}function A(e){return Z({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 R(e){return 1e8*e.year+1e6*e.month+1e4*e.day}function P(e){return 100*e.hour+e.minute}function $(e,t,r){var a=Date.UTC(e.year,e.month-1,e.day,e.hour,e.minute),n=Date.UTC(t.year,t.month-1,t.day,t.hour,t.minute);return!0===r&&n<a?0:n-a}function j(e,t,r){void 0===r&&(r=!1);var a=R(t),n=R(e),s=a===n;return e.hasTime&&r&&s&&(s=(a=P(t))===(n=P(e))),e.past=n<a,e.current=s,e.future=n>a,e}function Y(e,t,r){return e.hasTime=!0,e.hour=Math.floor(t/c),e.minute=t%c,e.time=ne(e),r&&j(e,r,!0),e}function U(e){return e.weekday=K(e),e}function z(e){return e.doy=X(e),e}function Q(e){return e.workweek=G(e),e}function V(e,t){if(!Array.isArray(t)||0===t.length)return e;var r=R(e);for(var a in t){if(R(E(t[a]+" 00:00"))===r){e.disabled=!0;break}}return e}function Z(e){return e.time=ne(e),e.date=ae(e),e.weekday=K(e),e.doy=X(e),e.workweek=G(e),e}function X(e){if(0!==e.year)return(Date.UTC(e.year,e.month-1,e.day)-Date.UTC(e.year,0,0))/24/60/60/1e3}function G(e){if(0!==e.year){var t=me(e);return r.date.getWeekOfYear(t)}}function K(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 J(e){return 1==(e%4==0^e%100==0^e%400==0)}function ee(e,t){return J(e)?i[t]:s[t]}function te(e){return Object.assign({},e)}function re(e,t){for(var r=String(e);r.length<t;)r="0"+r;return r}function ae(e){var t=re(e.year,4)+"-"+re(e.month,2);return e.hasDay&&(t+="-"+re(e.day,2)),t}function ne(e){return e.hasTime?re(e.hour,2)+":"+re(e.minute,2):""}function se(e){return ae(e)+(e.hasTime?" "+ne(e):"")}function ie(e){return++e.day,e.weekday=(e.weekday+1)%h,e.day>o&&e.day>ee(e.year,e.month)&&(e.day=l,++e.month,e.month>d&&(e.month=u,++e.year)),e}function oe(e){return e.day--,e.weekday=(e.weekday+6)%h,e.day<l&&(e.month--,e.month<u&&(e.year--,e.month=d),e.day=ee(e.year,e.month)),e}function de(e,t,r,a){for(void 0===t&&(t=ie),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 ue(e,t,r,a){for(void 0===r&&(r=ie),void 0===a&&(a=6);e.weekday!==t&&--a>=0;)r(e);return e}function le(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<h;++n){for(var s=1,i=1;i<h;++i){if(r[(n+i)%h])break;++s}t[n]=r[n]*s}return t}function he(e,t,r,a,n,s,i){void 0===n&&(n=[]),void 0===s&&(s=42),void 0===i&&(i=0);var o=R(t),d=[],u=te(e),l=0,h=l===o;if(o<R(e))return d;for(;(!h||d.length<i)&&d.length<s&&(l=R(u),!(h=h||l>o));)if(0!==a[u.weekday]){var c=te(u);Z(c),j(c,r),V(c,n),d.push(c),u=de(u,ie)}else u=ie(u);return d}function ce(e,t,r,a,n){for(var s=[],i=0;i<a;++i){var o=(t+i)*r,d=te(e);s.push(Y(d,o,n))}return s}function ye(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(fe(r))}catch(e){return""}}}function me(e){return new Date(Date.UTC(e.year,e.month-1,e.day,0,0))}function fe(e){return new Date(Date.UTC(e.year,e.month-1,e.day,e.hour,e.minute))}function ve(e){return isFinite(parseInt(e,10))}function ge(e,t,r,a){var n=R(e)+(!0===a?P(e):0),s=R(t)+(!0===a?P(t):0),i=R(r)+(!0===a?P(r):0);return n>=s&&n<=i}function pe(e,t,r,a){var n=R(e),s=R(t),i=R(r),o=R(a);return n>=i&&n<=o||s>=i&&s<=o||i>=n&&s>=o}function _e(e,t){var r,a,n,s=te(e);return a=t,n=function(e,t){if(void 0!==s[t]){s[t]+=parseInt(e,10);var a=g.indexOf(t);-1!==a&&(r=void 0===r?a:Math.min(a,r))}},Object.keys(a).forEach(function(e){return n(a[e],e)}),void 0!==r&&function(e,t){switch(t){case"minute":return function(e){if(e.minute>=c||e.minute<0){var t=Math.floor(e.minute/c);e.minute-=t*c,e.hour+=t,ke(e)}return e}(e);case"hour":return ke(e);case"day":return be(e);case"month":we(e)}}(s,g[r]),Z(s),s}function ke(e){if(e.hour>=y||e.hour<0){var t=Math.floor(e.hour/y);e.hour-=t*y,e.day+=t,be(e)}return e}function be(e){we(e);var t=ee(e.year,e.month);if(e.day>t){++e.month,e.month>d&&we(e);var r=e.day-t;t=ee(e.year,e.month);do{r>t&&(++e.month,e.month>d&&we(e),r-=t,t=ee(e.year,e.month))}while(r>t);e.day=r}else if(e.day<=0){var a=-1*e.day;--e.month,e.month<=0&&we(e),t=ee(e.year,e.month);do{a>t&&(a-=t,--e.month,e.month<=0&&we(e),t=ee(e.year,e.month))}while(a>t);e.day=t-a}return e}function we(e){if(e.month>d){var t=Math.floor(e.month/d);e.month=e.month%d,e.year+=t}else e.month<u&&(e.month+=d,--e.year);return e}function Ce(e,t){var r=$(e,t,!0);return Math.floor(r/m)}function De(e,t){var r=te(e),a=te(t);return r=ue(r,0),a=ue(a,6),Math.ceil(Ce(r,a)/h)}function Se(e,t){return void 0===t&&(t="px"),null==e||""===e?void 0:isNaN(e)?String(e):""+Number(e)+t}function Te(e,t){for(var r=0;r<e.length;r++)if(!0===t(e[r],r))return r;return-1}}); |
{ | ||
"name": "@quasar/quasar-ui-qcalendar", | ||
"version": "1.3.11", | ||
"version": "1.3.12", | ||
"author": "Jeff Galbraith <jeff@quasar.dev>", | ||
@@ -21,3 +21,4 @@ "description": "QCalendar - Embed Calendars, Schedules and Agendas in your Quasar Apps", | ||
"build:css": "node build/script.css.js", | ||
"build:api": "node build/build.api.js" | ||
"build:api": "node build/build.api.js", | ||
"test": "jest --runInBand --no-cache" | ||
}, | ||
@@ -49,22 +50,39 @@ "funding": { | ||
"devDependencies": { | ||
"@babel/core": "^7.7.7", | ||
"@babel/plugin-syntax-dynamic-import": "^7.7.4", | ||
"@babel/preset-env": "^7.7.7", | ||
"@rollup/plugin-buble": "^0.21.0", | ||
"@rollup/plugin-json": "^4.0.1", | ||
"@vue/eslint-config-standard": "^5.0.1", | ||
"@rollup/plugin-node-resolve": "^7.0.0", | ||
"@vue/eslint-config-standard": "^5.1.0", | ||
"autoprefixer": "^9.7.3", | ||
"babel-core": "^6.26.3", | ||
"babel-eslint": "^10.0.3", | ||
"babel-jest": "^24.9.0", | ||
"babel-plugin-transform-relative-paths": "^0.1.0", | ||
"chalk": "^3.0.0", | ||
"cssnano": "^4.1.10", | ||
"dotenv": "^8.2.0", | ||
"eslint": "^6.8.0", | ||
"eslint-loader": "^3.0.3", | ||
"eslint-plugin-vue": "^6.1.1", | ||
"eslint-plugin-import": "^2.19.1", | ||
"eslint-plugin-node": "^11.0.0", | ||
"eslint-plugin-promise": "^4.2.1", | ||
"eslint-plugin-quasar": "^1.0.0-alpha.18", | ||
"eslint-plugin-standard": "^4.0.1", | ||
"eslint-plugin-vue": "^6.1.2", | ||
"jest": "^24.9.0", | ||
"jest-serializer-vue": "^2.0.2", | ||
"jest-transform-stub": "^2.0.0", | ||
"node-sass": "^4.13.0", | ||
"open": "^7.0.0", | ||
"postcss": "^7.0.25", | ||
"postcss": "^7.0.26", | ||
"postcss-rtl": "^1.5.0", | ||
"quasar": "^1.5.11", | ||
"quasar-json-api": "^0.0.13", | ||
"promise": "^8.0.3", | ||
"quasar": "^1.6.1", | ||
"quasar-json-api": "^0.0.19", | ||
"rimraf": "^3.0.0", | ||
"rollup": "^1.27.14", | ||
"rollup-plugin-node-resolve": "^5.2.0", | ||
"rollup": "^1.29.0", | ||
"uglify-es": "^3.3.9", | ||
"vue-jest": "^3.0.5", | ||
"zlib": "^1.0.5" | ||
@@ -71,0 +89,0 @@ }, |
@@ -51,3 +51,2 @@ import { version } from '../package.json' | ||
getDateTime, | ||
nextMinutes, | ||
nextDay, | ||
@@ -65,2 +64,5 @@ prevDay, | ||
isBetweenDates, | ||
isOverlappingDates, | ||
daysBetween, | ||
weeksBetween, | ||
addToDate | ||
@@ -125,3 +127,2 @@ } from './utils/timestamp.js' | ||
getDateTime, | ||
nextMinutes, | ||
nextDay, | ||
@@ -139,2 +140,5 @@ prevDay, | ||
isBetweenDates, | ||
isOverlappingDates, | ||
daysBetween, | ||
weeksBetween, | ||
addToDate, | ||
@@ -197,3 +201,2 @@ // helpers | ||
getDateTime, | ||
nextMinutes, | ||
nextDay, | ||
@@ -211,2 +214,5 @@ prevDay, | ||
isBetweenDates, | ||
isOverlappingDates, | ||
daysBetween, | ||
weeksBetween, | ||
addToDate, | ||
@@ -213,0 +219,0 @@ // helpers |
@@ -48,8 +48,8 @@ import { date } from 'quasar' | ||
export function getStartOfWeek (timestamp, weekdays, today) { | ||
if (timestamp.day === 1 || timestamp.weekday === 0) { | ||
while (!weekdays.includes(timestamp.weekday)) { | ||
nextDay(timestamp) | ||
const start = copyTimestamp(timestamp) | ||
if (start.day === 1 || start.weekday === 0) { | ||
while (!weekdays.includes(start.weekday)) { | ||
nextDay(start) | ||
} | ||
} | ||
const start = copyTimestamp(timestamp) | ||
findWeekday(start, weekdays[0], prevDay, weekdays.length) | ||
@@ -64,10 +64,10 @@ updateFormatted(start) | ||
export function getEndOfWeek (timestamp, weekdays, today) { | ||
const end = copyTimestamp(timestamp) | ||
// is last day of month? | ||
const lastDay = daysInMonth(timestamp.year, timestamp.month) | ||
if (lastDay === timestamp.day || timestamp.weekday === 6) { | ||
while (!weekdays.includes(timestamp.weekday)) { | ||
prevDay(timestamp) | ||
const lastDay = daysInMonth(end.year, end.month) | ||
if (lastDay === end.day || end.weekday === 6) { | ||
while (!weekdays.includes(end.weekday)) { | ||
prevDay(end) | ||
} | ||
} | ||
const end = copyTimestamp(timestamp) | ||
findWeekday(end, weekdays[weekdays.length - 1], nextDay, weekdays.length) | ||
@@ -96,22 +96,25 @@ updateFormatted(end) | ||
export function parseTime (input) { | ||
if (typeof input === 'number') { | ||
// when a number is given, it's minutes since 12:00am | ||
return input | ||
} else if (typeof input === 'string') { | ||
// when a string is given, it's a hh:mm:ss format where seconds are optional | ||
const parts = PARSE_TIME.exec(input) | ||
if (!parts) { | ||
return false | ||
const type = Object.prototype.toString.call(input) | ||
switch (type) { | ||
case '[object Number]': | ||
// when a number is given, it's minutes since 12:00am | ||
return input | ||
case '[object String]': | ||
{ | ||
// when a string is given, it's a hh:mm:ss format where seconds are optional | ||
const parts = PARSE_TIME.exec(input) | ||
if (!parts) { | ||
return false | ||
} | ||
return parseInt(parts[1], 10) * 60 + parseInt(parts[3] || 0, 10) | ||
} | ||
return parseInt(parts[1], 10) * 60 + parseInt(parts[3] || 0, 10) | ||
} else if (typeof input === 'object') { | ||
// when an object is given, it must have hour and minute | ||
if (typeof input.hour !== 'number' || typeof input.minute !== 'number') { | ||
return false | ||
} | ||
return input.hour * 60 + input.minute | ||
} else { | ||
// unsupported type | ||
return false | ||
case '[object Object]': | ||
// when an object is given, it must have hour and minute | ||
if (typeof input.hour !== 'number' || typeof input.minute !== 'number') { | ||
return false | ||
} | ||
return input.hour * 60 + input.minute | ||
} | ||
return false | ||
} | ||
@@ -184,3 +187,3 @@ | ||
export function getDayIdentifier (timestamp) { | ||
return timestamp.year * 10000 + timestamp.month * 100 + timestamp.day | ||
return timestamp.year * 100000000 + timestamp.month * 1000000 + timestamp.day * 10000 | ||
} | ||
@@ -200,3 +203,3 @@ | ||
} | ||
return Math.floor((utc2 - utc1) / MILLISECONDS_IN_DAY) | ||
return utc2 - utc1 | ||
} | ||
@@ -303,3 +306,3 @@ | ||
export function isLeapYear (year) { | ||
return ((year % 4 === 0) && (year % 100 !== 0)) || (year % 400 === 0) | ||
return ((year % 4 === 0) ^ (year % 100 === 0) ^ (year % 400 === 0)) === 1 | ||
} | ||
@@ -341,19 +344,5 @@ | ||
export function getDateTime (timestamp) { | ||
return getDate(timestamp) + ' ' + getTime(timestamp) | ||
return getDate(timestamp) + (timestamp.hasTime ? ' ' + getTime(timestamp) : '') | ||
} | ||
export function nextMinutes (timestamp, minutes) { | ||
timestamp.minute += minutes | ||
while (timestamp.minute > MINUTES_IN_HOUR) { | ||
timestamp.minute -= MINUTES_IN_HOUR | ||
++timestamp.hour | ||
if (timestamp.hour >= HOURS_IN_DAY) { | ||
nextDay(timestamp) | ||
timestamp.hour = FIRST_HOUR | ||
} | ||
} | ||
return timestamp | ||
} | ||
export function nextDay (timestamp) { | ||
@@ -500,6 +489,6 @@ ++timestamp.day | ||
export function isBetweenDates (timestamp, startTimestamp, endTimestamp, useTime = false) { | ||
const cd = parseInt(getDayIdentifier(timestamp) + String(useTime === true ? getTimeIdentifier(timestamp) : ''), 10) | ||
const sd = parseInt(getDayIdentifier(startTimestamp) + String(useTime === true ? getTimeIdentifier(startTimestamp) : ''), 10) | ||
const ed = parseInt(getDayIdentifier(endTimestamp) + String(useTime === true ? getTimeIdentifier(endTimestamp) : ''), 10) | ||
export function isBetweenDates (timestamp, startTimestamp, endTimestamp, useTime /* = false */) { | ||
const cd = getDayIdentifier(timestamp) + (useTime === true ? getTimeIdentifier(timestamp) : 0) | ||
const sd = getDayIdentifier(startTimestamp) + (useTime === true ? getTimeIdentifier(startTimestamp) : 0) | ||
const ed = getDayIdentifier(endTimestamp) + (useTime === true ? getTimeIdentifier(endTimestamp) : 0) | ||
@@ -509,13 +498,53 @@ return cd >= sd && cd <= ed | ||
export function isOverlappingDates (startTimestamp, endTimestamp, firstTimestamp, lastTimestamp) { | ||
const start = getDayIdentifier(startTimestamp) | ||
const end = getDayIdentifier(endTimestamp) | ||
const first = getDayIdentifier(firstTimestamp) | ||
const last = getDayIdentifier(lastTimestamp) | ||
return ( | ||
(start >= first && start <= last) || // overlap left | ||
(end >= first && end <= last) || // overlap right | ||
(first >= start && end >= last) // surrounding | ||
) | ||
} | ||
export function addToDate (timestamp, options) { | ||
const ts = copyTimestamp(timestamp) | ||
let minType | ||
__forEachObject(options, (value, key) => { | ||
if (ts[key] !== void 0) { | ||
ts[key] += parseInt(value, 10) | ||
const indexType = NORMALIZE_TYPES.indexOf(key) | ||
if (indexType !== -1) { | ||
if (minType === void 0) { | ||
minType = indexType | ||
} else { | ||
minType = Math.min(indexType, minType) | ||
} | ||
} | ||
} | ||
}) | ||
// normalize timestamp | ||
if (minType !== void 0) { | ||
__normalize(ts, NORMALIZE_TYPES[minType]) | ||
} | ||
updateFormatted(ts) | ||
return ts | ||
} | ||
const NORMALIZE_TYPES = ['minute', 'hour', 'day', 'month'] | ||
// addToDate helper | ||
function __forEachObject (obj, cb) { | ||
Object.keys(obj).forEach(k => cb(obj[k], k)) | ||
} | ||
// normalize minutes | ||
function __normalizeMinute (ts) { | ||
if (ts.minute >= MINUTES_IN_HOUR) { | ||
if (ts.minute >= MINUTES_IN_HOUR || ts.minute < 0) { | ||
const hours = Math.floor(ts.minute / MINUTES_IN_HOUR) | ||
ts.minute -= hours * MINUTES_IN_HOUR | ||
ts.hour += hours | ||
} else if (ts.minute < 0) { | ||
let minutes = -1 * ts.minute | ||
const hours = Math.floor(minutes / MINUTES_IN_HOUR) + 1 | ||
minutes = minutes % MINUTES_IN_HOUR | ||
ts.minute = MINUTES_IN_HOUR - minutes | ||
ts.hour -= hours | ||
__normalizeHour(ts) | ||
} | ||
@@ -525,13 +554,9 @@ return ts | ||
// normalize hours | ||
function __normalizeHour (ts) { | ||
if (ts.hour >= HOURS_IN_DAY) { | ||
if (ts.hour >= HOURS_IN_DAY || ts.hour < 0) { | ||
const days = Math.floor(ts.hour / HOURS_IN_DAY) | ||
ts.hour -= days * HOURS_IN_DAY | ||
ts.day += days | ||
} else if (ts.hour < 0) { | ||
let hours = -1 * ts.hour | ||
const days = Math.floor(hours / HOURS_IN_DAY) + 1 | ||
hours = hours % HOURS_IN_DAY | ||
ts.hour = HOURS_IN_DAY - hours | ||
ts.day -= days | ||
__normalizeDay(ts) | ||
} | ||
@@ -541,2 +566,3 @@ return ts | ||
// normalize days | ||
function __normalizeDay (ts) { | ||
@@ -585,4 +611,4 @@ __normalizeMonth(ts) | ||
function __normalizeMonth (timestamp) { | ||
const ts = copyTimestamp(timestamp) | ||
// normalize months | ||
function __normalizeMonth (ts) { | ||
if (ts.month > MONTH_MAX) { | ||
@@ -593,4 +619,3 @@ const years = Math.floor(ts.month / MONTH_MAX) | ||
} else if (ts.month < MONTH_MIN) { | ||
const months = -1 * ts.month | ||
ts.month = MONTH_MAX - months | ||
ts.month += MONTH_MAX | ||
--ts.year | ||
@@ -601,18 +626,27 @@ } | ||
export function addToDate (timestamp, options) { | ||
const ts = copyTimestamp(timestamp) | ||
// normalize all | ||
function __normalize (ts, type) { | ||
switch (type) { | ||
case 'minute': | ||
return __normalizeMinute(ts) | ||
case 'hour': | ||
return __normalizeHour(ts) | ||
case 'day': | ||
return __normalizeDay(ts) | ||
case 'month': | ||
return __normalizeMonth(ts) | ||
} | ||
} | ||
Object.keys(options).forEach(key => { | ||
if (ts[key] !== void 0) { | ||
ts[key] += parseInt(options[key], 10) | ||
} | ||
}) | ||
export function daysBetween (ts1, ts2) { | ||
const diff = diffTimestamp(ts1, ts2, true) | ||
return Math.floor(diff / MILLISECONDS_IN_DAY) | ||
} | ||
// normalize timestamp | ||
__normalizeMinute(ts) | ||
__normalizeHour(ts) | ||
__normalizeDay(ts) | ||
__normalizeMonth(ts) | ||
updateFormatted(ts) | ||
return ts | ||
export function weeksBetween (ts1, ts2) { | ||
let t1 = copyTimestamp(ts1) | ||
let t2 = copyTimestamp(ts2) | ||
t1 = findWeekday(t1, 0) | ||
t2 = findWeekday(t2, 6) | ||
return Math.ceil(daysBetween(t1, t2) / DAYS_IN_WEEK) | ||
} | ||
@@ -668,3 +702,2 @@ | ||
getDateTime, | ||
nextMinutes, | ||
nextDay, | ||
@@ -682,3 +715,6 @@ prevDay, | ||
isBetweenDates, | ||
isOverlappingDates, | ||
daysBetween, | ||
weeksBetween, | ||
addToDate | ||
} |
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
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
702392
38
37
12790