@quasar/quasar-ui-qcalendar
Advanced tools
Comparing version 4.1.0 to 4.1.1
/*! | ||
* @quasar/quasar-ui-qcalendar v4.1.0 | ||
* @quasar/quasar-ui-qcalendar v4.1.1 | ||
* (c) 2025 Jeff Galbraith <jeff@quasar.dev> | ||
* Released under the MIT License. | ||
*/ | ||
var vue=require("vue");const PARSE_DATETIME=/^(\d{4})-(\d{1,2})(-(\d{1,2}))?([^\d]+(\d{1,2}))?(:(\d{1,2}))?(:(\d{1,2}))?(.(\d{1,3}))?$/,PARSE_DATE=/^(\d{4})-(\d{1,2})(-(\d{1,2}))?/,PARSE_TIME=/(\d\d?)(:(\d\d?)|)(:(\d\d?)|)/,DAYS_IN_MONTH=[0,31,28,31,30,31,30,31,31,30,31,30,31],DAYS_IN_MONTH_LEAP=[0,31,29,31,30,31,30,31,31,30,31,30,31],TIME_CONSTANTS={MILLISECONDS_IN:{SECOND:1e3,MINUTE:6e4,HOUR:36e5,DAY:864e5,WEEK:6048e5},SECONDS_IN:{MINUTE:60,HOUR:3600,DAY:86400,WEEK:604800},MINUTES_IN:{MINUTE:1,HOUR:60,DAY:1440,WEEK:10080},HOURS_IN:{DAY:24,WEEK:168},DAYS_IN:{WEEK:7}},DAYS_IN_MONTH_MIN=28,DAYS_IN_MONTH_MAX=31,MONTH_MAX=12,MONTH_MIN=1,DAY_MIN=1,FIRST_HOUR=0;function validateTimestamp(e){return"string"===typeof e&&PARSE_DATETIME.test(e)}function parsed(e){if("string"!==typeof e)return null;const t=PARSE_DATETIME.exec(e);if(!t||!t[1]||!t[2])return null;const a=parseInt(t[1],10),n=parseInt(t[2],10),r=parseInt(t[4]||"1",10),o=parseInt(t[6]||"0",10),u=parseInt(t[8]||"0",10);return{date:e,time:o.toString().padStart(2,"0")+":"+u.toString().padStart(2,"0"),year:a,month:n,day:r,hour:o,minute:u,hasDay:!!t[4],hasTime:!0,past:!1,current:!1,future:!1,disabled:!1,weekday:0,doy:0,workweek:0}}function parseDate(e,t=!1){if(!(e instanceof Date))return null;const a=t?"UTC":"";return updateFormatted({date:padNumber(e[`get${a}FullYear`](),4)+"-"+padNumber(e[`get${a}Month`]()+1,2)+"-"+padNumber(e[`get${a}Date`](),2),time:padNumber(e[`get${a}Hours`]()||0,2)+":"+padNumber(e[`get${a}Minutes`]()||0,2),year:e[`get${a}FullYear`](),month:e[`get${a}Month`]()+1,day:e[`get${a}Date`](),hour:e[`get${a}Hours`](),minute:e[`get${a}Minutes`](),weekday:0,doy:0,workweek:0,hasDay:!0,hasTime:!0,past:!1,current:!1,future:!1,disabled:!1})}function padNumber(e,t){let a=String(e);while(a.length<t)a="0"+a;return a}function isLeapYear(e){return e%4===0&&e%100!==0||e%400===0}function daysInMonth(e,t){return(isLeapYear(e)?DAYS_IN_MONTH_LEAP:DAYS_IN_MONTH)[t]}function nextDay(e){const t=new Date(e.year,e.month-1,e.day+1);return updateFormatted(normalizeTimestamp({...e,year:t.getFullYear(),month:t.getMonth()+1,day:t.getDate()}))}function prevDay(e){const t=new Date(e.year,e.month-1,e.day-1);return updateFormatted(normalizeTimestamp({...e,year:t.getFullYear(),month:t.getMonth()+1,day:t.getDate()}))}function today(){const e=new Date,t=e.getMonth()+1,a=e.getDate(),n=e.getFullYear();return[n,padNumber(t,2),padNumber(a,2)].join("-")}function isToday(e){return e===today()}function getStartOfWeek(e,t,a){let n=copyTimestamp(e);if(t){if(1===n.day||0===n.weekday)while(!t.includes(Number(n.weekday)))n=nextDay(n);n=findWeekday(n,t[0],prevDay),n=updateFormatted(n),a&&(n=updateRelative(n,a,n.hasTime))}return n}function getEndOfWeek(e,t,a){let n=copyTimestamp(e);if(t&&Array.isArray(t)){const r=daysInMonth(n.year,n.month);if(r===n.day||n.weekday===t[t.length-1])while(!t.includes(Number(n.weekday)))n=prevDay(n);n=findWeekday(n,t[t.length-1],nextDay),n=updateFormatted(n),a&&(n=updateRelative(n,a,n.hasTime))}return n}function getStartOfMonth(e){let t=copyTimestamp(e);return t.day=DAY_MIN,t=updateFormatted(t),t}function getEndOfMonth(e){let t=copyTimestamp(e);return t.day=daysInMonth(t.year,t.month),t=updateFormatted(t),t}function parseTime(e){const t=Object.prototype.toString.call(e);switch(t){case"[object Number]":return e;case"[object String]":{const a=PARSE_TIME.exec(e);return a?60*parseInt(a[1],10)+parseInt(a[3]||"0",10):!1}case"[object Object]":return"object"!==typeof e||"number"!==typeof e.hour||"number"!==typeof e.minute?!1:"object"===typeof e&&"hour"in e&&"minute"in e&&60*e.hour+e.minute}return!1}function compareTimestamps(e,t){return!(!e||!t)&&e.year===t.year&&e.month===t.month&&e.day===t.day&&e.hour===t.hour&&e.minute===t.minute}function compareDate(e,t){return getDate(e)===getDate(t)}function compareTime(e,t){return getTime(e)===getTime(t)}function compareDateTime(e,t){return getDateTime(e)===getDateTime(t)}function parseTimestamp(e,t=null){let a=parsed(e);return a?(a=updateFormatted(a),t&&(a=updateRelative(a,t,a.hasTime)),a):null}function getDayIdentifier(e){return 1e8*(e.year??0)+1e6*(e.month??0)+1e4*(e.day??0)}function getTimeIdentifier(e){return 100*(e.hour??0)+(e.minute??0)}function getDayTimeIdentifier(e){return getDayIdentifier(e)+getTimeIdentifier(e)}function diffTimestamp(e,t,a=!1){const n=Date.UTC(e.year??0,(e.month??1)-1,e.day??1,e.hour??0,e.minute??0),r=Date.UTC(t.year??0,(t.month??1)-1,t.day??1,t.hour??0,t.minute??0);return!0===a&&r<n?0:r-n}function updateRelative(e,t,a=!1){let n=copyTimestamp(e),r=getDayIdentifier(t),o=getDayIdentifier(n),u=r===o;return n.hasTime&&a&&u&&(r=getTimeIdentifier(t),o=getTimeIdentifier(n),u=r===o),n.past=o<r,n.current=u,n.future=o>r,n.currentWeekday=n.weekday===t.weekday,n}function updateMinutes(e,t,a=null){let n=copyTimestamp(e);return n.hasTime=!0,n.hour=Math.floor(t/TIME_CONSTANTS.MINUTES_IN.HOUR),n.minute=t%TIME_CONSTANTS.MINUTES_IN.HOUR,n.time=getTime(n),a&&(n=updateRelative(n,a,!0)),n}function updateWeekday(e){let t=copyTimestamp(e);return t.weekday=getWeekday(t),t}function updateDayOfYear(e){let t=copyTimestamp(e);return t.doy=getDayOfYear(t)||0,t}function updateWorkWeek(e){let t=copyTimestamp(e);return t.workweek=getWorkWeek(t),t}function updateDisabled(e,t,a,n,r){let o=copyTimestamp(e);const u=getDayIdentifier(o);if(void 0!==t){const l=parsed(t);if(l){const c=getDayIdentifier(l);u<=c&&(o.disabled=!0)}}if(!0!==o.disabled&&void 0!==a){const m=parsed(a);if(m){const v=getDayIdentifier(m);u>=v&&(o.disabled=!0)}}if(!0!==o.disabled&&Array.isArray(n)&&n.length>0)for(var i in n)if(n[i]===o.weekday){o.disabled=!0;break}if(!0!==o.disabled&&Array.isArray(r)&&r.length>0)for(var d in r)if(Array.isArray(r[d])&&2===r[d].length&&r[d][0]&&r[d][1]){const p=parsed(r[d][0]),y=parsed(r[d][1]);if(p&&y&&isBetweenDates(o,p,y)){o.disabled=!0;break}}else{const f=r[d];if(Array.isArray(f))for(var s of f){const g=parseTimestamp(s);if(g){const h=getDayIdentifier(g);if(h===u){o.disabled=!0;break}}}else if(f){const T=parseTimestamp(f);if(T){const D=getDayIdentifier(T);D===u&&(o.disabled=!0)}}}return o}function updateFormatted(e){let t=copyTimestamp(e);return t.hasTime=!0,t.time=getTime(t),t.date=getDate(t),t.weekday=getWeekday(t),t.doy=getDayOfYear(t)||0,t.workweek=getWorkWeek(t),t}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){let t=copyTimestamp(e);if(0===t.year){const r=parseTimestamp(today());r&&(t=r)}const a=new Date(Date.UTC(t.year,t.month-1,t.day)),n=4;a.setUTCDate(a.getUTCDate()-(a.getUTCDay()+6)%7+n),a.setUTCDate(a.getUTCDate()+n-(a.getUTCDay()||7));e=new Date(Date.UTC(a.getUTCFullYear(),0,1)),e=Math.ceil(((a.valueOf()-e.valueOf())/864e5+1)/7);return e}function getWeekday(e){let t=e.weekday;if(e.hasDay){const a=Math.floor,n=e.day,r=(e.month+9)%MONTH_MAX+1,o=a(e.year/100),u=e.year%100-(e.month<=2?1:0);t=((n+a(2.6*r-.2)-2*o+u+a(u/4)+a(o/4))%7+7)%7}return t??0}function copyTimestamp(e){return{...e}}function getDate(e){let 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):"00:00")}function moveRelativeDays(e,t=nextDay,a=1,n=[0,1,2,3,4,5,6]){const r=copyTimestamp(e);return relativeDays(r,t,a,n)}function relativeDays(e,t=nextDay,a=1,n=[0,1,2,3,4,5,6]){let r=copyTimestamp(e);n.includes(Number(r.weekday))||0!==r.weekday||t!==nextDay||++a;while(--a>=0)r=t(r),n.length<7&&!n.includes(Number(r.weekday))&&++a;return r}function findWeekday(e,t,a=nextDay,n=6){let r=copyTimestamp(e);while(r.weekday!==t&&--n>=0)r=a(r);return r}function createDayList(e,t,a,n=[0,1,2,3,4,5,6],r=void 0,o=void 0,u=[],i=[],d=42,s=0){const l=getDayIdentifier(e),c=getDayIdentifier(t),m=[];let v=copyTimestamp(e),p=0,y=p===c;if(!(c<l))while((!y||m.length<s)&&m.length<d){if(p=getDayIdentifier(v),y=y||p>c&&m.length>=s,y)break;if(n.includes(Number(v.weekday))){let e=copyTimestamp(v);e=updateFormatted(e),e=updateRelative(e,a),e=updateDisabled(e,r,o,u,i),m.push(e)}v=relativeDays(v,nextDay)}return m}function createIntervalList(t,a,n,r,o){const u=[];for(let e=0;e<r;++e){const i=(a+e)*n,d=copyTimestamp(t);u.push(updateMinutes(d,i,o))}return u}function createNativeLocaleFormatter(n,r){const e=()=>"";return"undefined"===typeof Intl||"undefined"===typeof Intl.DateTimeFormat?e:(t,e)=>{try{const a=new Intl.DateTimeFormat(n||void 0,r(t,e));return a.format(makeDateTime(t))}catch(e){return console.error(`Intl.DateTimeFormat: ${e.message} -> `+getDateTime(t)),""}}}function makeDate(e,t=!0){return t?new Date(Date.UTC(e.year,e.month-1,e.day,0,0)):new Date(e.year,e.month-1,e.day,0,0)}function makeDateTime(e,t=!0){return t?new Date(Date.UTC(e.year,e.month-1,e.day,e.hour,e.minute)):new Date(e.year,e.month-1,e.day,e.hour,e.minute)}function validateNumber(e){return isFinite(Number(e))}function maxTimestamp(e,t=!1){const a=!0===t?getDayTimeIdentifier:getDayIdentifier;return e.reduce((e,t)=>{return Math.max(a(e),a(t))===a(e)?e:t})}function minTimestamp(e,t=!1){const a=!0===t?getDayTimeIdentifier:getDayIdentifier;return e.reduce((e,t)=>{return Math.min(a(e),a(t))===a(e)?e:t})}function isBetweenDates(e,t,a,n=!1){const r=getDayIdentifier(e)+(!0===n?getTimeIdentifier(e):0),o=getDayIdentifier(t)+(!0===n?getTimeIdentifier(t):0),u=getDayIdentifier(a)+(!0===n?getTimeIdentifier(a):0);return r>=o&&r<=u}function isOverlappingDates(e,t,a,n){const r=getDayIdentifier(e),o=getDayIdentifier(t),u=getDayIdentifier(a),i=getDayIdentifier(n);return r>=u&&r<=i||o>=u&&o<=i||u>=r&&o>=i}function addToDate(e,t){const a=copyTimestamp(e);return t.year&&(a.year+=t.year),t.month&&(a.month+=t.month),t.day&&(a.day+=t.day),t.hour&&(a.hour+=t.hour),t.minute&&(a.minute+=t.minute),updateFormatted(normalizeTimestamp(a))}function normalizeTimestamp(e){const t=new Date(e.year,e.month-1,e.day,e.hour,e.minute);return{...e,year:t.getFullYear(),month:t.getMonth()+1,day:t.getDate(),hour:t.getHours(),minute:t.getMinutes()}}function daysBetween(e,t){const a=diffTimestamp(e,t,!0);return Math.floor(a/TIME_CONSTANTS.MILLISECONDS_IN.DAY)}function weeksBetween(e,t){let a=copyTimestamp(e),n=copyTimestamp(t);return a=findWeekday(a,0),n=findWeekday(n,6),Math.ceil(daysBetween(a,n)/TIME_CONSTANTS.DAYS_IN.WEEK)}const weekdayDateMap={Sun:new Date("2020-01-05T00:00:00.000Z"),Mon:new Date("2020-01-06T00:00:00.000Z"),Tue:new Date("2020-01-07T00:00:00.000Z"),Wed:new Date("2020-01-08T00:00:00.000Z"),Thu:new Date("2020-01-09T00:00:00.000Z"),Fri:new Date("2020-01-10T00:00:00.000Z"),Sat:new Date("2020-01-11T00:00:00.000Z")};function getWeekdayFormatter(){const e=()=>"",r={long:{timeZone:"UTC",weekday:"long"},short:{timeZone:"UTC",weekday:"short"},narrow:{timeZone:"UTC",weekday:"narrow"}};return"undefined"===typeof Intl||"undefined"===typeof Intl.DateTimeFormat?e:t;function t(t,e,a){try{const n=new Intl.DateTimeFormat(a||void 0,r[e]||r["long"]);return n.format(weekdayDateMap[t])}catch(e){return e instanceof Error&&console.error(`Intl.DateTimeFormat: ${e.message} -> day of week: `+t),""}}}function getWeekdayNames(t,a){const e=Object.keys(weekdayDateMap),n=getWeekdayFormatter();return e.map(e=>String(n(e,t,a)))}function getMonthFormatter(){const e=()=>"",o={long:{timeZone:"UTC",month:"long"},short:{timeZone:"UTC",month:"short"},narrow:{timeZone:"UTC",month:"narrow"}};return"undefined"===typeof Intl||"undefined"===typeof Intl.DateTimeFormat?e:t;function t(t,e,a){try{const n=new Intl.DateTimeFormat(a||void 0,o[e]||o["long"]),r=new Date;return r.setDate(1),r.setMonth(t),n.format(r)}catch(e){return e instanceof Error&&console.error(`Intl.DateTimeFormat: ${e.message} -> month: `+t),""}}}function getMonthNames(t,a){const n=getMonthFormatter();return[...Array(12).keys()].map(e=>n(e,t,a))}var Timestamp={PARSE_DATETIME:PARSE_DATETIME,PARSE_DATE:PARSE_DATE,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,TIME_CONSTANTS:TIME_CONSTANTS,FIRST_HOUR:FIRST_HOUR,today:today,getStartOfWeek:getStartOfWeek,getEndOfWeek:getEndOfWeek,getStartOfMonth:getStartOfMonth,getEndOfMonth:getEndOfMonth,parseTime:parseTime,validateTimestamp:validateTimestamp,parsed:parsed,parseTimestamp:parseTimestamp,parseDate:parseDate,getDayIdentifier:getDayIdentifier,getTimeIdentifier:getTimeIdentifier,getDayTimeIdentifier:getDayTimeIdentifier,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,createDayList:createDayList,createIntervalList:createIntervalList,createNativeLocaleFormatter:createNativeLocaleFormatter,makeDate:makeDate,makeDateTime:makeDateTime,validateNumber:validateNumber,isBetweenDates:isBetweenDates,isOverlappingDates:isOverlappingDates,daysBetween:daysBetween,weeksBetween:weeksBetween,addToDate:addToDate,compareTimestamps:compareTimestamps,compareDate:compareDate,compareTime:compareTime,compareDateTime:compareDateTime,getWeekdayFormatter:getWeekdayFormatter,getWeekdayNames:getWeekdayNames,getMonthFormatter:getMonthFormatter,getMonthNames:getMonthNames},Timestamp$1=Object.freeze({__proto__:null,DAYS_IN_MONTH:DAYS_IN_MONTH,DAYS_IN_MONTH_LEAP:DAYS_IN_MONTH_LEAP,DAYS_IN_MONTH_MAX:DAYS_IN_MONTH_MAX,DAYS_IN_MONTH_MIN:DAYS_IN_MONTH_MIN,DAY_MIN:DAY_MIN,FIRST_HOUR:FIRST_HOUR,MONTH_MAX:MONTH_MAX,MONTH_MIN:MONTH_MIN,PARSE_DATE:PARSE_DATE,PARSE_DATETIME:PARSE_DATETIME,PARSE_TIME:PARSE_TIME,TIME_CONSTANTS:TIME_CONSTANTS,addToDate:addToDate,compareDate:compareDate,compareDateTime:compareDateTime,compareTime:compareTime,compareTimestamps:compareTimestamps,copyTimestamp:copyTimestamp,createDayList:createDayList,createIntervalList:createIntervalList,createNativeLocaleFormatter:createNativeLocaleFormatter,daysBetween:daysBetween,daysInMonth:daysInMonth,default:Timestamp,diffTimestamp:diffTimestamp,findWeekday:findWeekday,getDate:getDate,getDateTime:getDateTime,getDayIdentifier:getDayIdentifier,getDayOfYear:getDayOfYear,getDayTimeIdentifier:getDayTimeIdentifier,getEndOfMonth:getEndOfMonth,getEndOfWeek:getEndOfWeek,getMonthFormatter:getMonthFormatter,getMonthNames:getMonthNames,getStartOfMonth:getStartOfMonth,getStartOfWeek:getStartOfWeek,getTime:getTime,getTimeIdentifier:getTimeIdentifier,getWeekday:getWeekday,getWeekdayFormatter:getWeekdayFormatter,getWeekdayNames:getWeekdayNames,getWorkWeek:getWorkWeek,isBetweenDates:isBetweenDates,isLeapYear:isLeapYear,isOverlappingDates:isOverlappingDates,isToday:isToday,makeDate:makeDate,makeDateTime:makeDateTime,maxTimestamp:maxTimestamp,minTimestamp:minTimestamp,moveRelativeDays:moveRelativeDays,nextDay:nextDay,padNumber:padNumber,parseDate:parseDate,parseTime:parseTime,parseTimestamp:parseTimestamp,parsed:parsed,prevDay:prevDay,relativeDays:relativeDays,today:today,updateDayOfYear:updateDayOfYear,updateDisabled:updateDisabled,updateFormatted:updateFormatted,updateMinutes:updateMinutes,updateRelative:updateRelative,updateWeekday:updateWeekday,updateWorkWeek:updateWorkWeek,validateNumber:validateNumber,validateTimestamp:validateTimestamp,weeksBetween:weeksBetween});function convertToUnit(e,t="px"){if(e)return isNaN(e)?String(e):"auto"===e?e:""+Number(e)+t}function indexOf(t,a){for(let e=0;e<t.length;e++)if(!0===a(t[e],e))return e;return-1}function minCharWidth(e,t){return 0===t?e:e.slice(0,t)}var helpers={convertToUnit:convertToUnit,indexOf:indexOf,minCharWidth:minCharWidth},helpers$1=Object.freeze({__proto__:null,convertToUnit:convertToUnit,default:helpers,indexOf:indexOf,minCharWidth:minCharWidth});const ResizeObserverDirective={mounted(e,t){if("function"===typeof t.value){const a=t.value,n={callback:a,size:{width:0,height:0},observer:new ResizeObserver(e=>{const t=e[0].contentRect;t.width===n.size.width&&t.height===n.size.height||(n.size.width=t.width,n.size.height=t.height,n.debounceTimeout&&clearTimeout(n.debounceTimeout),n.debounceTimeout=setTimeout(()=>{n.callback(n.size),n.debounceTimeout=void 0},100))})};n.observer.observe(e),e.__onResizeObserver=n}},beforeUnmount(e){if(e.__onResizeObserver){const{observer:t,debounceTimeout:a}=e.__onResizeObserver;a&&clearTimeout(a),t.unobserve(e),delete e.__onResizeObserver}}};function useCalendar(t,a,{scrollArea:e,pane:n}){if(!a){const l="[error: renderCalendar] no renderFunc has been supplied to useCalendar";throw console.error(l),new Error(l)}const r=vue.reactive({width:0,height:0}),o=vue.ref(null);function u({width:e,height:t}){r.width=e,r.height=t}const i=vue.computed(()=>{return!0!==t.noScroll&&e.value&&n.value&&r.height?e.value.offsetWidth-n.value.offsetWidth:0});function d(){}function s(){const e={ref:o,role:"complementary",lang:t.locale,class:`q-calendar ${t.dark?"q-calendar--dark":""} `+(t.bordered?"q-calendar__bordered":"")};return vue.withDirectives(vue.h("div",{...e},[a()]),[[ResizeObserverDirective,u]])}return{rootRef:o,scrollWidth:i,__initCalendar:d,__renderCalendar:s}}const isValidFocusType=e=>e.every(e=>["day","date","weekday","interval","time","resource","task"].includes(e)),useCommonProps={modelValue:{type:String,default:today(),validator:e=>""===e||validateTimestamp(e)},weekdays:{type:Array,default:()=>[0,1,2,3,4,5,6]},dateType:{type:String,default:"round",validator:e=>["round","rounded","square"].includes(e)},weekdayAlign:{type:String,default:"center",validator:e=>["left","center","right"].includes(e)},dateAlign:{type:String,default:"center",validator:e=>["left","center","right"].includes(e)},bordered:Boolean,dark:Boolean,noAria:Boolean,noActiveDate:Boolean,noHeader:Boolean,noScroll:Boolean,shortWeekdayLabel:Boolean,noDefaultHeaderText:Boolean,noDefaultHeaderBtn:Boolean,minWeekdayLabel:{type:[Number,String],default:1},weekdayBreakpoints:{type:Array,default:()=>[75,35],validator:e=>2===e.length},locale:{type:String,default:"en-US"},animated:Boolean,transitionPrev:{type:String,default:"slide-right"},transitionNext:{type:String,default:"slide-left"},disabledDays:Array,disabledBefore:String,disabledAfter:String,disabledWeekdays:{type:Array,default:()=>[]},dragEnterFunc:Function,dragOverFunc:Function,dragLeaveFunc:Function,dropFunc:Function,selectedDates:{type:[Array,Set],default:()=>[]},selectedStartEndDates:{type:Array,default:()=>[]},hoverable:Boolean,focusable:Boolean,focusType:{type:Array,default:()=>["date"],validator:isValidFocusType}};function useCommon(t,{startDate:e,endDate:a,times:n}){const r=vue.computed(()=>parseTimestamp(e.value)),o=vue.computed(()=>{return"0000-00-00"===a.value?getEndOfWeek(r.value,t.weekdays,n.today):parseTimestamp(a.value)||r.value}),u=vue.computed(()=>createNativeLocaleFormatter(t.locale,()=>({timeZone:"UTC",day:"numeric"}))),i=vue.computed(()=>createNativeLocaleFormatter(t.locale,(e,t)=>({timeZone:"UTC",weekday:t?"short":"long"}))),d=vue.computed(()=>createNativeLocaleFormatter(t.locale,()=>({timeZone:"UTC",dateStyle:"full"})));function s(e,t){return e&&e.length>0&&e.includes(t.date)}function l(e,t){const a={firstDay:!1,betweenDays:!1,lastDay:!1};if(2===e.length){const n=getDayIdentifier(t),r=getDayIdentifier(parsed(e[0])),o=getDayIdentifier(parsed(e[1]));a.firstDay=r===n,a.lastDay=o===n,a.betweenDays=r<n&&o>n}return a}function c(e,t=!1,a=[],n=[],r=!1){const o=s(a,e),{firstDay:u,lastDay:i,betweenDays:d}=l(n,e);return{"q-past-day":!u&&!d&&!i&&!o&&!t&&!!e.past,"q-future-day":!u&&!d&&!i&&!o&&!t&&!!e.future,"q-outside":t,"q-current-day":!!e.current,"q-selected":o,"q-range-first":u,"q-range":d,"q-range-last":i,"q-range-hover":r&&(u||i||d),"q-disabled-day disabled":!0===e.disabled}}function m(e){return getStartOfWeek(e,t.weekdays,n.today)}function v(e){return getEndOfWeek(e,t.weekdays,n.today)}function p(){return{}}return{parsedStart:r,parsedEnd:o,dayFormatter:u,weekdayFormatter:i,ariaDateFormatter:d,arrayHasDate:s,checkDays:l,getRelativeClasses:c,startOfWeek:m,endOfWeek:v,dayStyleDefault:p}}function scrollTo(e,t){e instanceof Window?e.scrollTo({top:t,behavior:"instant"}):e.scrollTop=t}function getVerticalScrollPosition(e){return e instanceof Window?e.scrollY:e.scrollTop}function animVerticalScrollTo(o,u,i=500,d=performance.now(),s=getVerticalScrollPosition(o)){i<=0||s===u?scrollTo(o,u):requestAnimationFrame(e=>{const t=e-d,a=Math.min(t/i,1),n=e=>e<.5?2*e*e:(4-2*e)*e-1,r=s+(u-s)*n(a);scrollTo(o,r),a<1&&animVerticalScrollTo(o,u,i,d,s)})}function animHorizontalScrollTo(r,e,o=500){const u=r.scrollLeft,i=e-u;let d=null;function s(e){null===d&&(d=e);const t=e-d,a=Math.min(t/o,1),n=e=>e<.5?2*e*e:(4-2*e)*e-1;r.scrollLeft=u+i*n(a),t<o&&requestAnimationFrame(s)}requestAnimationFrame(s)}const useAgendaProps={view:{type:String,validator:e=>["day","week","month","month-interval"].includes(e),default:"day"},leftColumnOptions:{type:Array},rightColumnOptions:{type:Array},columnOptionsId:{type:String},columnOptionsLabel:{type:String},weekdayStyle:{type:Function,default:null},weekdayClass:{type:Function,default:null},dayStyle:{type:Function,default:null},dayClass:{type:Function,default:null},dateHeader:{type:String,default:"stacked",validator:e=>["stacked","inline","inverted"].includes(e)},dayHeight:{type:[Number,String],default:0,validator:validateNumber},dayMinHeight:{type:[Number,String],default:40,validator:validateNumber}};function useInterval(o,{times:t,scrollArea:n,parsedStart:e,parsedEnd:a,maxDays:r,size:u,headerColumnRef:i}){const d=vue.computed(()=>parseInt(String(o.intervalStart),10)),m=vue.computed(()=>parseInt(String(o.intervalMinutes),10)),s=vue.computed(()=>parseInt(String(o.intervalCount),10)),v=vue.computed(()=>parseFloat(String(o.intervalHeight))),p=vue.computed(()=>{let e=0;const t=Number(o.columnCount);return o.cellWidth?e=Number(o.cellWidth):u.width>0&&i.value&&(e=i.value.offsetWidth/(t>1?t:r.value)),e}),l=vue.computed(()=>d.value*m.value),c=vue.computed(()=>s.value*v.value),y=vue.computed(()=>s.value*p.value),f=vue.computed(()=>D(e.value)),g=vue.computed(()=>k(a.value)),h=vue.computed(()=>{return createDayList(e.value,a.value,t.today,o.weekdays,o.disabledBefore,o.disabledAfter,o.disabledWeekdays,o.disabledDays,r.value)}),T=vue.computed(()=>{return h.value.map(e=>createIntervalList(e,d.value,m.value,s.value,t.now))});function D(e){return getStartOfWeek(e,o.weekdays,t.today)}function k(e){return getEndOfWeek(e,o.weekdays,t.today)}function w(e,t){return e&&e.length>0&&e.includes(getDateTime(t))}function _(e,t){const a={firstDay:!1,betweenDays:!1,lastDay:!1};if(e&&2===e.length){const n=getDayTimeIdentifier(t),r=getDayTimeIdentifier(parsed(e[0])),o=getDayTimeIdentifier(parsed(e[1]));a.firstDay=r===n,a.lastDay=o===n,a.betweenDays=r<n&&o>n}return a}function b(e,t=[],a=[]){const n=w(t,e),{firstDay:r,lastDay:o,betweenDays:u}=_(a,e);return{"q-selected":n,"q-range-first":!0===r,"q-range":!0===u,"q-range-last":!0===o,"q-disabled-interval disabled":!0===e.disabled}}function I(e,t,a){return[]}const N=vue.computed(()=>{const a={timeZone:"UTC",hour12:!o.hour24Format,hour:"2-digit",minute:"2-digit"},n={timeZone:"UTC",hour12:!o.hour24Format,hour:"numeric",minute:"2-digit"},r={timeZone:"UTC",hour12:!o.hour24Format,hour:"numeric"};return createNativeLocaleFormatter(o.locale,(e,t)=>t?0===e.minute?r:n:a)}),M=vue.computed(()=>{const e={timeZone:"UTC",dateStyle:"full",timeStyle:"short"};return createNativeLocaleFormatter(o.locale,()=>e)});function S(e){const t=T.value[0][0],a=t.hour===e.hour&&t.minute===e.minute;return!a&&0===e.minute}function O(e){}function A(e){return{}}function E(e,t,a=!1,n){let r=copyTimestamp(t);if(e.currentTarget){const o=e.currentTarget.getBoundingClientRect(),u=e,i=e,d=u.changedTouches||u.touches,s=(d&&d[0]?d[0]:i).clientY,l=(s-o.top)/v.value,c=Math.floor((a?Math.floor(l):l)*m.value);0!==c&&(r=addToDate(r,{minute:c})),n&&(r=updateRelative(r,n,!0))}return r}function H(e,t,a=!1,n){let r=copyTimestamp(t);const o=e.currentTarget.getBoundingClientRect(),u=e,i=e,d=u.changedTouches||u.touches,s=(d&&d[0]?d[0]:i).clientY,l=(s-o.top)/v.value,c=Math.floor((a?Math.floor(l):l)*m.value);return 0!==c&&(r=addToDate(r,{minute:c})),n&&(r=updateRelative(r,n,!0)),r}function x(e,t,a=!1,n){let r=copyTimestamp(t);if(e.currentTarget){const o=e.currentTarget.getBoundingClientRect(),u=e,i=e,d=u.changedTouches||u.touches,s=(d&&d[0]?d[0]:i).clientX,l=(s-o.left)/p.value,c=Math.floor((a?Math.floor(l):l)*m.value);0!==c&&(r=addToDate(r,{minute:c})),n&&(r=updateRelative(r,n,!0))}return r}function L(e,t){const a={timestamp:e,timeStartPos:F,timeDurationHeight:C};return void 0!==t&&(a.columnIndex=t),a}function q(e,t){const a={timestamp:copyTimestamp(e),timeStartPosX:R,timeDurationWidth:W};return void 0!==t&&(a.index=t),a}function Y(e,t=0){const a=F(e);return!(!1===a||!n.value)&&(animVerticalScrollTo(n.value,a,t),!0)}function U(e,t=0){const a=R(e);return!(!1===a||!n.value)&&(animHorizontalScrollTo(n.value,a,t),!0)}function C(e){return e/m.value*v.value}function W(e){return e/m.value*p.value}function B(e){return e*m.value/v.value}function P(e){return e*m.value/p.value}function F(e,t=!0){const a=parseTime(e);if(!1===a)return!1;const n=l.value,r=s.value*m.value,o=(a-n)/r;let u=o*c.value;return t&&(u<0&&(u=0),u>c.value)&&(u=c.value),u}function R(e,t=!0){const a=parseTime(e);if(!1===a)return!1;const n=l.value,r=s.value*m.value,o=(a-n)/r;let u=o*y.value;return t&&(u<0&&(u=0),u>y.value)&&(u=y.value),u}return{parsedIntervalStart:d,parsedIntervalMinutes:m,parsedIntervalCount:s,parsedIntervalHeight:v,parsedCellWidth:p,parsedStartMinute:l,bodyHeight:c,bodyWidth:y,parsedWeekStart:f,parsedWeekEnd:g,days:h,intervals:T,intervalFormatter:N,ariaDateTimeFormatter:M,arrayHasDateTime:w,checkIntervals:_,getIntervalClasses:b,getResourceClasses:I,showIntervalLabelDefault:S,showResourceLabelDefault:O,styleDefault:A,getTimestampAtEventInterval:E,getTimestampAtEvent:H,getTimestampAtEventX:x,getScopeForSlot:L,getScopeForSlotX:q,scrollToTime:Y,scrollToTimeX:U,timeDurationHeight:C,timeDurationWidth:W,heightToMinutes:B,widthToMinutes:P,timeStartPos:F,timeStartPosX:R}}const useColumnProps={columnCount:{type:[Number,String],default:0,validator:validateNumber},columnIndexStart:{type:[Number,String],default:0,validator:validateNumber}},useMaxDaysProps={maxDays:{type:Number,default:1}},useTimesProps={now:{type:String,validator:e=>""===e||validateTimestamp(e),default:""}};function useTimes(e){const t=vue.reactive({now:parseTimestamp("0000-00-00 00:00"),today:parseTimestamp("0000-00-00")}),a=vue.computed(()=>e.now?parseTimestamp(e.now):o());function n(){t.now&&t.today&&(t.now.current=t.today.current=!0,t.now.past=t.today.past=!1,t.now.future=t.today.future=!1)}function r(){const e=a.value||o();u(e,t.now),i(e,t.now),u(e,t.today)}function o(){return parseDate(new Date)}function u(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)}function i(e,t){e.time!==t.time&&(t.hour=e.hour,t.minute=e.minute,t.time=e.time)}return vue.watch(a,()=>r()),{times:t,parsedNow:a,setCurrent:n,updateCurrent:r,getNow:o,updateDay:u,updateTime:i}}function useRenderValues(r,{parsedView:o,parsedValue:u,times:i}){const e=vue.computed(()=>{const e=u.value;let t=r.maxDays,a=e,n=e;switch(o.value){case"month":a=getStartOfMonth(e),n=getEndOfMonth(e),t=daysInMonth(a.year,a.month);break;case"week":case"week-agenda":case"week-scheduler":a=getStartOfWeek(e,r.weekdays,i.today),n=getEndOfWeek(a,r.weekdays,i.today),t=r.weekdays.length;break;case"day":case"scheduler":case"agenda":n=moveRelativeDays(copyTimestamp(n),nextDay,t>1?t-1:t,r.weekdays),n=updateFormatted(n);break;case"month-interval":case"month-scheduler":case"month-agenda":a=getStartOfMonth(e),n=getEndOfMonth(e),n=updateFormatted(n),t=daysInMonth(a.year,a.month);break;case"resource":t=1,n=moveRelativeDays(copyTimestamp(n),nextDay,t,r.weekdays),n=updateFormatted(n);break}return{start:a,end:n,maxDays:t}});return{renderValues:e}}const toCamelCase=e=>e.replace(/(-\w)/g,e=>e[1].toUpperCase());function getMouseEventHandlers(t,e,a,n){const r={};for(const o in a){const u=a[o],i=toCamelCase("on-"+o);if(!e.value)return console.warn("$listeners has not been set up"),{};if(void 0!==e.value[i]){const d="on"+u.event.charAt(0).toUpperCase()+u.event.slice(1),s=e=>{return(void 0===u.button||"buttons"in e&&e.buttons>0&&e.button===u.button)&&(u.prevent&&e.preventDefault(),u.stop&&e.stopPropagation(),t(o,n(e,o))),u.result};d in r?Array.isArray(r[d])?r[d].push(s):r[d]=[r[d],s]:r[d]=s}}return r}function getDefaultMouseEventHandlers(e,t,a,n){return getMouseEventHandlers(e,t,getMouseEventName(a),n)}function getMouseEventName(e){return{["click"+e]:{event:"click"},["contextmenu"+e]:{event:"contextmenu",prevent:!0,result:!1},["mousedown"+e]:{event:"mousedown"},["mousemove"+e]:{event:"mousemove"},["mouseup"+e]:{event:"mouseup"},["mouseenter"+e]:{event:"mouseenter"},["mouseleave"+e]:{event:"mouseleave"},["touchstart"+e]:{event:"touchstart"},["touchmove"+e]:{event:"touchmove"},["touchend"+e]:{event:"touchend"}}}function getRawMouseEvents(e){return Object.keys(getMouseEventName(e))}function useMouseEvents(a,n){return{getMouseEventHandlers:(e,t)=>getMouseEventHandlers(a,n,e,t),getDefaultMouseEventHandlers:(e,t)=>getDefaultMouseEventHandlers(a,n,e,t),getMouseEventName:getMouseEventName,getRawMouseEvents:getRawMouseEvents}}const useMoveEmits=["moved"];function useMove(d,{parsedView:s,parsedValue:l,direction:c,maxDays:m,times:v,emittedValue:p,emit:y}){function e(a=1){if(0===a)p.value=today();else{let e=copyTimestamp(l.value);const n=getEndOfMonth(e),r=a>0,o=r?nextDay:prevDay,u=r?n.day:1;let t=r?a:-a;c.value=r?"next":"prev";const i=d.weekdays.length;while(--t>=0)switch(s.value){case"month":e.day=u,e=o(e),e=updateWeekday(e);while(!d.weekdays.includes(Number(e.weekday)))e=addToDate(e,{day:r?1:-1});break;case"week":case"week-agenda":case"week-scheduler":e=relativeDays(e,o,i,d.weekdays);break;case"day":case"scheduler":case"agenda":e=relativeDays(e,o,m.value,d.weekdays);break;case"month-interval":case"month-agenda":case"month-scheduler":e.day=u,e=o(e);break;case"resource":e=relativeDays(e,o,m.value,d.weekdays);break}e=updateWeekday(e),e=updateFormatted(e),e=updateDayOfYear(e),e=updateRelative(e,v.now),p.value=e.date,y("moved",e)}}return{move:e}}const listenerRE=/^on[A-Z]/;function useEmitListeners(e=vue.getCurrentInstance()){return{emitListeners:vue.computed(()=>{const t={};return e?.vnode?.props&&Object.keys(e.vnode.props).forEach(e=>{listenerRE.test(e)&&(t[e]=!0)}),t})}}function useFocusHelper(){const e={"aria-hidden":"true",class:"q-calendar__focus-helper"};return[vue.h("span",e)]}function useButton(){function e({focusable:e,focusType:t},a,n){const r=e&&t.includes("date");return vue.h("button",{...a,tabindex:r?0:-1},[n,r&&useFocusHelper()])}return{renderButton:e}}const useCellWidthProps={cellWidth:[Number,String]};function useCellWidth(e){const t=vue.computed(()=>void 0!==e.cellWidth);return{isSticky:t}}const useCheckChangeEmits=["change"];function useCheckChange(n,{days:r,lastStart:o,lastEnd:u}){function e(){const e=r.value;if(0===e.length)return!1;const t=e[0].date,a=e[e.length-1].date;return(!o.value||!u.value||t!==o.value||a!==u.value)&&(o.value=t,u.value=a,n("change",{start:t,end:a,days:e}),!0)}return{checkChange:e}}function useEventUtils(){function e(e,t){return(Array.isArray(t)?t:[t]).includes(e.keyCode)}return{isKeyCode:e}}const isKeyCode=useEventUtils().isKeyCode,useNavigationProps={useNavigation:Boolean};function useNavigation(t,{rootRef:a,focusRef:n,focusValue:r,datesRef:o,parsedView:u,emittedValue:i,direction:d,times:s}){let e=!1;function l(){e||document&&(e=!0,document.addEventListener("keyup",y),document.addEventListener("keydown",p))}function c(){document&&(document.removeEventListener("keyup",y),document.removeEventListener("keydown",p),e=!1)}function m(e){if(e&&document){const t=document.activeElement;if(t!==document.body&&a.value?.contains(t))return!0}return!1}function v(){let t=0;const a=window.setInterval(()=>{const e=o.value[n.value];e&&(e.focus(),50!==++t)&&document.activeElement!==e||window.clearInterval(a)},250)}function p(e){m(e)&&isKeyCode(e,[33,34,35,36,37,38,39,40])&&(e.stopPropagation(),e.preventDefault())}function y(e){if(m(e)&&isKeyCode(e,[33,34,35,36,37,38,39,40])){const t={33:D,34:k,35:_,36:w,37:h,38:f,39:T,40:g};t[e.keyCode]?.()}}function f(){let e=copyTimestamp(r.value);if("month"===u.value){if(e=addToDate(e,{day:-7}),r.value.month!==e.month)return d.value="prev",void(i.value=e.date)}else e=addToDate(e,{minute:Number(t.intervalMinutes)});d.value="prev",n.value=e.date}function g(){let e=copyTimestamp(r.value);if("month"===u.value){if(e=addToDate(e,{day:7}),r.value.month!==e.month)return d.value="next",void(i.value=e.date)}else e=addToDate(e,{minute:Number(t.intervalMinutes)});d.value="next",n.value=e.date}function h(){let e=copyTimestamp(r.value);d.value="prev";do{e=addToDate(e,{day:-1})}while(!t.weekdays.includes(Number(e.weekday)));n.value=e.date}function T(){let e=copyTimestamp(r.value);d.value="next";do{e=addToDate(e,{day:1})}while(!t.weekdays.includes(Number(e.weekday)));n.value=e.date}function D(){let e=copyTimestamp(r.value);e="month"===u.value?addToDate(e,{month:-1}):addToDate(e,{day:-7}),d.value="prev",n.value=e.date}function k(){let e=copyTimestamp(r.value);e="month"===u.value?addToDate(e,{month:1}):addToDate(e,{day:7}),d.value="next",n.value=e.date}function w(){let e=copyTimestamp(r.value);e="month"===u.value?getStartOfMonth(e):getStartOfWeek(e,t.weekdays||[],s.today);while(!t.weekdays.includes(Number(e.weekday)))e=addToDate(e,{day:-1});n.value=e.date}function _(){let e=copyTimestamp(r.value);e="month"===u.value?getEndOfMonth(e):getEndOfWeek(e,t.weekdays||[],s.today);while(!t.weekdays.includes(Number(e.weekday)))e=addToDate(e,{day:-1});n.value=e.date}return vue.onBeforeUnmount(()=>{c()}),vue.watch(()=>t.useNavigation,e=>{(!0===e?l:c)()}),!0===t.useNavigation&&l(),{startNavigation:l,endNavigation:c,tryFocus:v}}const renderButton=useButton().renderButton;var QCalendarAgenda=vue.defineComponent({name:"QCalendarAgenda",directives:{ResizeObserver:ResizeObserverDirective},props:{...useCommonProps,...useAgendaProps,...useColumnProps,...useMaxDaysProps,...useTimesProps,...useCellWidthProps,...useNavigationProps},emits:["update:model-value",...useCheckChangeEmits,...useMoveEmits,...getRawMouseEvents("-date"),...getRawMouseEvents("-head-day"),...getRawMouseEvents("-time")],setup(m,{slots:v,emit:i,expose:H}){const e=vue.ref(null),t=vue.ref(null),x=vue.ref(null),p=vue.ref(m.modelValue||today()),a=vue.ref(parsed(m.modelValue||today())),y=vue.ref({}),n=vue.ref(),r=vue.ref(),u=vue.ref("next"),d=vue.ref(m.modelValue||today()),s=vue.ref("0000-00-00"),l=vue.ref(0),c=vue.ref(m.modelValue),f=vue.reactive({width:0,height:0}),g=vue.ref(""),L=vue.ref(null),q=vue.ref(null),o=(vue.watch(()=>m.view,()=>{l.value=0}),vue.computed(()=>{return"month"===m.view?"month-interval":m.view})),Y=vue.getCurrentInstance();if(null===Y)throw new Error("current instance is null");const U=useEmitListeners(Y).emitListeners,h=useCellWidth(m).isSticky,{times:T,setCurrent:B,updateCurrent:P}=(vue.watch(h,()=>{}),useTimes(m)),{parsedStart:V,parsedEnd:z,dayFormatter:Z,weekdayFormatter:$,ariaDateFormatter:X,dayStyleDefault:K,getRelativeClasses:D}=(P(),B(),useCommon(m,{startDate:d,endDate:s,times:T})),k=vue.computed(()=>{return parseTimestamp(m.modelValue,T.now)||V.value||T.today}),j=(a.value=k.value,p.value=k.value.date,useRenderValues(m,{parsedView:o,parsedValue:k,times:T})).renderValues,{rootRef:w,scrollWidth:Q,__renderCalendar:G}=useCalendar(m,Ie,{scrollArea:e,pane:t}),{days:_,parsedCellWidth:J,getScopeForSlot:b}=useInterval(m,{times:T,scrollArea:e,parsedStart:V,parsedEnd:z,maxDays:l,size:f,headerColumnRef:x}),I=useMove(m,{parsedView:o,parsedValue:k,direction:u,maxDays:l,times:T,emittedValue:c,emit:i}).move,N=useMouseEvents(i,U).getDefaultMouseEventHandlers,ee=useCheckChange(i,{days:_,lastStart:L,lastEnd:q}).checkChange,te=useEventUtils().isKeyCode,ae=useNavigation(m,{rootRef:w,focusRef:p,focusValue:a,datesRef:y,parsedView:o,emittedValue:c,direction:u,times:T}).tryFocus,M=vue.computed(()=>{return _.value.length+(!0===S.value?m.leftColumnOptions.length:0)+(!0===O.value?m.rightColumnOptions.length:0)+_.value.length===1&&parseInt(String(m.columnCount),10)>0?parseInt(String(m.columnCount),10):0}),S=vue.computed(()=>{return void 0!==m.leftColumnOptions&&Array.isArray(m.leftColumnOptions)}),O=vue.computed(()=>{return void 0!==m.rightColumnOptions&&Array.isArray(m.rightColumnOptions)}),A=vue.computed(()=>{if(w.value){const e=f.width||w.value.getBoundingClientRect().width;if(e&&M.value)return(e-Q.value)/M.value+"px"}return 100/M.value+"%"});function ne(){c.value=today()}function re(e=1){I(e)}function oe(e=1){I(-e)}function ue({width:e,height:t}){f.width=e,f.height=t}function E(e){return e.date===c.value}function C(t,a){const e=v["head-column"],n={column:t,index:a,days:_.value},r=!0===h.value?m.cellWidth:A.value,o=!0===m.focusable&&m.focusType.includes("weekday"),u=void 0!==m.columnOptionsId?t[m.columnOptionsId]:"id",i={maxWidth:r,width:r};return vue.h("div",{key:u,tabindex:!0===o?0:-1,class:{"q-calendar-agenda__head--day":!0,"q-column-day":!0,"q-calendar__hoverable":!0===m.hoverable,"q-calendar__focusable":!0===o},style:i,onDragenter:e=>{void 0!==m.dragEnterFunc&&"function"===typeof m.dragEnterFunc&&(!0===m.dragEnterFunc(e,"head-column",{scope:n})?g.value=u:g.value="")},onDragover:e=>{void 0!==m.dragOverFunc&&"function"===typeof m.dragOverFunc&&(!0===m.dragOverFunc(e,"head-column",{scope:n})?g.value=u:g.value="")},onDragleave:e=>{void 0!==m.dragLeaveFunc&&"function"===typeof m.dragLeaveFunc&&(!0===m.dragLeaveFunc(e,"head-column",{scope:n})?g.value=u:g.value="")},onDrop:e=>{void 0!==m.dropFunc&&"function"===typeof m.dropFunc&&(!0===m.dropFunc(e,"head-column",{scope:n})?g.value=u:g.value="")},...N("-head-column",e=>{return{scope:{column:t,index:a},event:e}})},[!0!==m.noDefaultHeaderText&&ie(t),e&&e(n),useFocusHelper()])}function ie(e){const t=v["head-column-label"],a={column:e},n=void 0!==m.columnOptionsLabel?e[m.columnOptionsLabel]:e.label,r=vue.h("div",{class:{"q-calendar-agenda__head--weekday":!0,["q-calendar__"+m.weekdayAlign]:!0,ellipsis:!0},style:{alignSelf:"center"}},[t&&t({scope:a}),!t&&vue.h("span",{class:"ellipsis"},n)]);return"stacked"===m.dateHeader?r:vue.h("div",{class:"q-calendar__header--inline",style:{height:"100%"}},[r])}function de(){return vue.h("div",{roll:"presentation",class:{"q-calendar-agenda__head":!0,"q-calendar__sticky":!0===h.value},style:{marginRight:Q.value+"px"}},[se()])}function se(){return vue.h("div",{ref:x,class:{"q-calendar-agenda__head--days__column":!0}},[le(),ce()])}function le(){return vue.h("div",{class:{"q-calendar-agenda__head--days__weekdays":!0}},me())}function ce(){const e=v["head-days-events"];return vue.nextTick(()=>{if(r.value&&0===m.columnCount&&window)try{const e=window.getComputedStyle(r.value);n.value&&n.value.parentElement&&(n.value.parentElement.style.height=e.height,n.value.style.height=e.height)}catch{}}),vue.h("div",{class:{"q-calendar-agenda__head--days__event":!0}},[e&&vue.h("div",{ref:n,style:{position:"absolute",left:0,top:0,right:0,overflow:"hidden",zIndex:1}},[e({scope:{days:_.value,ref:r}})]),...ve()])}function me(){const e=parseInt(String(m.columnCount),10),a=parseInt(String(m.columnIndexStart),10);return(1===_.value.length&&e>0?[!0===S.value?m.leftColumnOptions.map((e,t)=>C(e,t)):[],...Array.apply(null,new Array(e)).map((e,t)=>t+a).map(e=>pe(_.value[0],e)),!0===O.value?m.rightColumnOptions.map((e,t)=>C(e,t)):[]]:[!0===S.value?m.leftColumnOptions.map((e,t)=>C(e,t)):[],..._.value.map(e=>pe(e)),!0===O.value?m.rightColumnOptions.map((e,t)=>C(e,t)):[]]).flat()}function ve(){const a=parseInt(String(m.columnCount),10);return 1===_.value.length&&a>0?[...Array.apply(null,new Array(parseInt(String(m.columnCount),10))).map((e,t)=>t+a).map(e=>fe(_.value[0],e))]:_.value.map(e=>fe(e,0))}function pe(t,e){const a=v["head-day"],n=v["head-date"],r=!0!==m.noActiveDate&&E(t),o=b(t,e??0),u=(o.activeDate=r,o.droppable=g.value===t.date,o.disabled=!!m.disabledWeekdays&&m.disabledWeekdays.includes(Number(t.weekday)),!0===h.value?m.cellWidth:A.value),i=m.weekdayStyle||K,d={width:u,maxWidth:u,...i({scope:o})},s=(!0===h.value&&(d.minWidth=u),"function"===typeof m.weekdayClass?m.weekdayClass({scope:o}):{}),l=!0===m.focusable&&m.focusType.includes("weekday"),c={key:t.date+(void 0!==e?"-"+e:""),ref:e=>{y.value[t.date]=e},tabindex:!0===l?0:-1,class:{"q-calendar-agenda__head--day":!0,...s,...D(t),"q-active-date":r,"q-calendar__hoverable":!0===m.hoverable,"q-calendar__focusable":!0===l},style:d,onDragenter:e=>{void 0!==m.dragEnterFunc&&"function"===typeof m.dragEnterFunc&&(!0===m.dragEnterFunc(e,"head-day",{scope:o})?g.value=t.date:g.value="")},onDragover:e=>{void 0!==m.dragOverFunc&&"function"===typeof m.dragOverFunc&&(!0===m.dragOverFunc(e,"head-day",{scope:o})?g.value=t.date:g.value="")},onDragleave:e=>{void 0!==m.dragLeaveFunc&&"function"===typeof m.dragLeaveFunc&&(!0===m.dragLeaveFunc(e,"head-day",{scope:o})?g.value=t.date:g.value="")},onDrop:e=>{void 0!==m.dropFunc&&"function"===typeof m.dropFunc&&(!0===m.dropFunc(e,"head-day",{scope:o})?g.value=t.date:g.value="")},onFocus:()=>{!0===l&&(p.value=t.date)},...N("-head-day",e=>{return{scope:o,event:e}})};return vue.h("div",c,[void 0!==a&&a({scope:o}),void 0===a&&ye(t),void 0===a&&n&&n({scope:o}),useFocusHelper()])}function ye(e){return"stacked"===m.dateHeader?[!0!==m.noDefaultHeaderText&&W(e),!0!==m.noDefaultHeaderBtn&&F(e)].filter(e=>!1!==e):"inline"===m.dateHeader?("left"===m.weekdayAlign&&"right"===m.dateAlign||"right"===m.weekdayAlign&&m.dateAlign,vue.h("div",{class:"q-calendar__header--inline"},[!0!==m.noDefaultHeaderText&&W(e),!0!==m.noDefaultHeaderBtn&&F(e)])):"inverted"===m.dateHeader?("left"===m.weekdayAlign&&"right"===m.dateAlign||"right"===m.weekdayAlign&&m.dateAlign,vue.h("div",{class:"q-calendar__header--inline"},[!0!==m.noDefaultHeaderBtn&&F(e),!0!==m.noDefaultHeaderText&&W(e)])):void 0}function fe(e,t){const a=v["head-day-event"],n=!0!==m.noActiveDate&&E(e),r=b(e,t),o=(r.activeDate=n,r.disabled=!!m.disabledWeekdays&&m.disabledWeekdays.includes(Number(e.weekday)),!0===h.value?m.cellWidth:A.value),u={width:o,maxWidth:o};return!0===h.value&&(u.minWidth=o),vue.h("div",{key:"event-"+e.date+(void 0!==t?"-"+t:""),class:{"q-calendar-agenda__head--day__event":!0,...D(e),"q-active-date":n},style:u},[a&&a({scope:r})])}function W(e){const t=v["head-weekday-label"],a=b(e,0),n=(a.shortWeekdayLabel=m.shortWeekdayLabel,{class:{"q-calendar-agenda__head--weekday":!0,["q-calendar__"+m.weekdayAlign]:!0,"q-calendar__ellipsis":!0}});return vue.h("div",n,t&&t({scope:a})||ge(e,m.shortWeekdayLabel))}function ge(e,t){const a=$.value(e,t||m.weekdayBreakpoints[0]>0&&J.value<=m.weekdayBreakpoints[0]);return vue.h("span",{class:"q-calendar__ellipsis"},m.weekdayBreakpoints[1]>0&&J.value<=m.weekdayBreakpoints[1]?minCharWidth(a,Number(m.minWeekdayLabel)):a)}function F(e){const t={class:{"q-calendar-agenda__head--date":!0,["q-calendar__"+m.dateAlign]:!0}};return vue.h("div",t,he(e))}function he(a){const e=!0!==m.noActiveDate&&E(a),t=Z.value(a,!1),n=v["head-day-label"],r=v["head-day-button"],o={dayLabel:t,timestamp:a,activeDate:e,disabled:!!m.disabledWeekdays&&m.disabledWeekdays.includes(Number(a.weekday))},u={class:{"q-calendar-agenda__head--day__label":!0,"q-calendar__button":!0,"q-calendar__button--round":"round"===m.dateType,"q-calendar__button--rounded":"rounded"===m.dateType,"q-calendar__button--bordered":!0===a.current,"q-calendar__focusable":!0},disabled:a.disabled,onKeydown:e=>{!0!==a.disabled&&te(e,[13,32])&&(e.stopPropagation(),e.preventDefault())},onKeyup:e=>{!0!==a.disabled&&te(e,[13,32])&&(c.value=a.date,void 0!==U.value.onClickDate)&&i("click-date",{scope:o})},...N("-date",(e,t)=>{return"click-date"!==t&&"contextmenu-date"!==t||(c.value=a.date,"click-date"===t&&e.preventDefault()),{scope:o,event:e}})};return!0!==m.noAria&&(u.ariaLabel=X.value(a,!1)),r?r({scope:o}):renderButton(m,u,n?n({scope:o}):t)}function Te(){return vue.h("div",{class:"q-calendar-agenda__body"},[De()])}function De(){return!0===h.value?vue.h("div",{ref:e,class:{"q-calendar-agenda__scroll-area":!0,"q-calendar__scroll":!0}},[we()]):!0===m.noScroll?ke():vue.h("div",{ref:e,class:{"q-calendar-agenda__scroll-area":!0,"q-calendar__scroll":!0}},[ke()])}function ke(){return vue.h("div",{ref:t,class:"q-calendar-agenda__pane"},[we()])}function we(){const e=v["day-container"];return vue.h("div",{class:"q-calendar-agenda__day-container"},[!0===h.value&&!0!==m.noHeader&&de(),vue.h("div",{style:{display:"flex",flexDirection:"row",height:"100%"}},[..._e()||[]].flat()),e&&e({scope:{days:_.value}})])}function _e(){const e=parseInt(String(m.columnCount),10),a=parseInt(String(m.columnIndexStart),10);return(1===_.value.length&&e>0?[!0===S.value?m.leftColumnOptions.map((e,t)=>R(e,t)):[],...Array.apply(null,new Array(e)).map((e,t)=>t+a).map(e=>be(_.value[0],0,e)),!0===O.value?m.rightColumnOptions.map((e,t)=>R(e,t)):[]]:[!0===S.value?m.leftColumnOptions.map((e,t)=>R(e,t)):[],..._.value.map((e,t)=>be(e,t,0)),!0===O.value?m.rightColumnOptions.map((e,t)=>R(e,t)):[]]).flat()}function R(e,t){const a=v.column,n={column:e,days:_.value,index:t},r=!0===h.value?m.cellWidth:A.value,o=!0===m.focusable&&m.focusType.includes("day"),u=void 0!==m.columnOptionsId?e[m.columnOptionsId]:void 0;return vue.h("div",{key:u,tabindex:!0===o?0:-1,class:{"q-calendar-agenda__day":!0,"q-column-day":!0,"q-calendar__hoverable":!0===m.hoverable,"q-calendar__focusable":!0===o},style:{maxWidth:r,width:r},onDragenter:e=>{void 0!==m.dragEnterFunc&&"function"===typeof m.dragEnterFunc&&(!0===m.dragEnterFunc(e,"column",{scope:n})?g.value=u:g.value="")},onDragover:e=>{void 0!==m.dragOverFunc&&"function"===typeof m.dragOverFunc&&(!0===m.dragOverFunc(e,"column",{scope:n})?g.value=u:g.value="")},onDragleave:e=>{void 0!==m.dragLeaveFunc&&"function"===typeof m.dragLeaveFunc&&(!0===m.dragLeaveFunc(e,"column",{scope:n})?g.value=u:g.value="")},onDrop:e=>{void 0!==m.dropFunc&&"function"===typeof m.dropFunc&&(!0===m.dropFunc(e,"column",{scope:n})?g.value=u:g.value="")},...N("-column",e=>{return{scope:n,event:e}})},[a&&a({scope:n})])}function be(e,t,a){const n=parseInt(String(m.dayHeight),10),r=parseInt(String(m.dayMinHeight),10),o=v.day,u=b(e,a),i=!0===h.value?m.cellWidth:A.value,d={width:i,maxWidth:i};return!0===h.value&&(d.minWidth=i),d.height=n>0?convertToUnit(n):"auto",r>0&&(d.minHeight=convertToUnit(r)),vue.h("div",{key:e.date+(void 0!==a?":"+a:""),class:{"q-calendar-agenda__day":!0,...D(e)},style:d},[o&&o({scope:u})])}function Ie(){const{start:e,end:t,maxDays:a}=j.value,n=(d.value===e.date&&s.value===t.date&&l.value===a||(d.value=e.date,s.value=t.date,l.value=a),f.width>0),r=vue.withDirectives(vue.h("div",{class:"q-calendar-agenda",key:d.value},[!0===n&&!0!==h.value&&!0!==m.noHeader&&de(),!0===n&&Te()]),[[ResizeObserverDirective,ue]]);if(!0!==m.animated)return r;{const o="q-calendar--"+("prev"===u.value?m.transitionPrev:m.transitionNext);return vue.h(vue.Transition,{name:o,appear:!0},()=>r)}}return vue.watch([_],ee,{deep:!0,immediate:!0}),vue.watch(()=>m.modelValue,(e,t)=>{if(c.value!==e){if(!0===m.animated){const a=getDayIdentifier(parsed(e)),n=getDayIdentifier(parsed(t));u.value=a>=n?"next":"prev"}c.value=e}p.value=e}),vue.watch(c,(e,t)=>{if(c.value!==m.modelValue){if(!0===m.animated){const a=getDayIdentifier(parsed(e)),n=getDayIdentifier(parsed(t));u.value=a>=n?"next":"prev"}i("update:model-value",e)}}),vue.watch(p,e=>{e&&(a.value=parseTimestamp(e))}),vue.watch(a,()=>{p.value&&y.value[p.value]?y.value[p.value].focus():ae()}),vue.watch(()=>m.maxDays,e=>{l.value=e}),vue.onBeforeUpdate(()=>{y.value={}}),vue.onMounted(()=>{}),H({prev:oe,next:re,move:I,moveToToday:ne,updateCurrent:P}),()=>G()}});const version="4.1.0";var Plugin={version:version,QCalendarAgenda:QCalendarAgenda,...Timestamp$1,...helpers$1,install(e){e.component(String(QCalendarAgenda.name),QCalendarAgenda)}};module.exports=Plugin; | ||
var vue=require("vue");const PARSE_DATETIME=/^(\d{4})-(\d{1,2})(-(\d{1,2}))?([^\d]+(\d{1,2}))?(:(\d{1,2}))?(:(\d{1,2}))?(.(\d{1,3}))?$/,PARSE_DATE=/^(\d{4})-(\d{1,2})(-(\d{1,2}))?/,PARSE_TIME=/(\d\d?)(:(\d\d?)|)(:(\d\d?)|)/,DAYS_IN_MONTH=[0,31,28,31,30,31,30,31,31,30,31,30,31],DAYS_IN_MONTH_LEAP=[0,31,29,31,30,31,30,31,31,30,31,30,31],TIME_CONSTANTS={MILLISECONDS_IN:{SECOND:1e3,MINUTE:6e4,HOUR:36e5,DAY:864e5,WEEK:6048e5},SECONDS_IN:{MINUTE:60,HOUR:3600,DAY:86400,WEEK:604800},MINUTES_IN:{MINUTE:1,HOUR:60,DAY:1440,WEEK:10080},HOURS_IN:{DAY:24,WEEK:168},DAYS_IN:{WEEK:7}},DAYS_IN_MONTH_MIN=28,DAYS_IN_MONTH_MAX=31,MONTH_MAX=12,MONTH_MIN=1,DAY_MIN=1,FIRST_HOUR=0;function validateTimestamp(e){return"string"===typeof e&&PARSE_DATETIME.test(e)}function parsed(e){if("string"!==typeof e)return null;const t=PARSE_DATETIME.exec(e);if(!t||!t[1]||!t[2])return null;const a=parseInt(t[1],10),n=parseInt(t[2],10),r=parseInt(t[4]||"1",10),o=parseInt(t[6]||"0",10),u=parseInt(t[8]||"0",10);return{date:e,time:o.toString().padStart(2,"0")+":"+u.toString().padStart(2,"0"),year:a,month:n,day:r,hour:o,minute:u,hasDay:!!t[4],hasTime:!0,past:!1,current:!1,future:!1,disabled:!1,weekday:0,doy:0,workweek:0}}function parseDate(e,t=!1){if(!(e instanceof Date))return null;const a=t?"UTC":"";return updateFormatted({date:padNumber(e[`get${a}FullYear`](),4)+"-"+padNumber(e[`get${a}Month`]()+1,2)+"-"+padNumber(e[`get${a}Date`](),2),time:padNumber(e[`get${a}Hours`]()||0,2)+":"+padNumber(e[`get${a}Minutes`]()||0,2),year:e[`get${a}FullYear`](),month:e[`get${a}Month`]()+1,day:e[`get${a}Date`](),hour:e[`get${a}Hours`](),minute:e[`get${a}Minutes`](),weekday:0,doy:0,workweek:0,hasDay:!0,hasTime:!0,past:!1,current:!1,future:!1,disabled:!1})}function padNumber(e,t){let a=String(e);while(a.length<t)a="0"+a;return a}function isLeapYear(e){return e%4===0&&e%100!==0||e%400===0}function daysInMonth(e,t){return(isLeapYear(e)?DAYS_IN_MONTH_LEAP:DAYS_IN_MONTH)[t]}function nextDay(e){const t=new Date(e.year,e.month-1,e.day+1);return updateFormatted(normalizeTimestamp({...e,year:t.getFullYear(),month:t.getMonth()+1,day:t.getDate()}))}function prevDay(e){const t=new Date(e.year,e.month-1,e.day-1);return updateFormatted(normalizeTimestamp({...e,year:t.getFullYear(),month:t.getMonth()+1,day:t.getDate()}))}function today(){const e=new Date,t=e.getMonth()+1,a=e.getDate(),n=e.getFullYear();return[n,padNumber(t,2),padNumber(a,2)].join("-")}function isToday(e){return e===today()}function getStartOfWeek(e,t,a){let n=copyTimestamp(e);if(t){if(1===n.day||0===n.weekday)while(!t.includes(Number(n.weekday)))n=nextDay(n);n=findWeekday(n,t[0],prevDay),n=updateFormatted(n),a&&(n=updateRelative(n,a,n.hasTime))}return n}function getEndOfWeek(e,t,a){let n=copyTimestamp(e);if(t&&Array.isArray(t)){const r=daysInMonth(n.year,n.month);if(r===n.day||n.weekday===t[t.length-1])while(!t.includes(Number(n.weekday)))n=prevDay(n);n=findWeekday(n,t[t.length-1],nextDay),n=updateFormatted(n),a&&(n=updateRelative(n,a,n.hasTime))}return n}function getStartOfMonth(e){let t=copyTimestamp(e);return t.day=DAY_MIN,t=updateFormatted(t),t}function getEndOfMonth(e){let t=copyTimestamp(e);return t.day=daysInMonth(t.year,t.month),t=updateFormatted(t),t}function parseTime(e){const t=Object.prototype.toString.call(e);switch(t){case"[object Number]":return e;case"[object String]":{const a=PARSE_TIME.exec(e);return a?60*parseInt(a[1],10)+parseInt(a[3]||"0",10):!1}case"[object Object]":return"object"!==typeof e||"number"!==typeof e.hour||"number"!==typeof e.minute?!1:"object"===typeof e&&"hour"in e&&"minute"in e&&60*e.hour+e.minute}return!1}function compareTimestamps(e,t){return!(!e||!t)&&e.year===t.year&&e.month===t.month&&e.day===t.day&&e.hour===t.hour&&e.minute===t.minute}function compareDate(e,t){return getDate(e)===getDate(t)}function compareTime(e,t){return getTime(e)===getTime(t)}function compareDateTime(e,t){return getDateTime(e)===getDateTime(t)}function parseTimestamp(e,t=null){let a=parsed(e);return a?(a=updateFormatted(a),t&&(a=updateRelative(a,t,a.hasTime)),a):null}function getDayIdentifier(e){return 1e8*(e.year??0)+1e6*(e.month??0)+1e4*(e.day??0)}function getTimeIdentifier(e){return 100*(e.hour??0)+(e.minute??0)}function getDayTimeIdentifier(e){return getDayIdentifier(e)+getTimeIdentifier(e)}function diffTimestamp(e,t,a=!1){const n=Date.UTC(e.year??0,(e.month??1)-1,e.day??1,e.hour??0,e.minute??0),r=Date.UTC(t.year??0,(t.month??1)-1,t.day??1,t.hour??0,t.minute??0);return!0===a&&r<n?0:r-n}function updateRelative(e,t,a=!1){let n=copyTimestamp(e),r=getDayIdentifier(t),o=getDayIdentifier(n),u=r===o;return n.hasTime&&a&&u&&(r=getTimeIdentifier(t),o=getTimeIdentifier(n),u=r===o),n.past=o<r,n.current=u,n.future=o>r,n.currentWeekday=n.weekday===t.weekday,n}function updateMinutes(e,t,a=null){let n=copyTimestamp(e);return n.hasTime=!0,n.hour=Math.floor(t/TIME_CONSTANTS.MINUTES_IN.HOUR),n.minute=t%TIME_CONSTANTS.MINUTES_IN.HOUR,n.time=getTime(n),a&&(n=updateRelative(n,a,!0)),n}function updateWeekday(e){let t=copyTimestamp(e);return t.weekday=getWeekday(t),t}function updateDayOfYear(e){let t=copyTimestamp(e);return t.doy=getDayOfYear(t)||0,t}function updateWorkWeek(e){let t=copyTimestamp(e);return t.workweek=getWorkWeek(t),t}function updateDisabled(e,t,a,n,r){let o=copyTimestamp(e);const u=getDayIdentifier(o);if(void 0!==t){const l=parsed(t);if(l){const c=getDayIdentifier(l);u<=c&&(o.disabled=!0)}}if(!0!==o.disabled&&void 0!==a){const m=parsed(a);if(m){const v=getDayIdentifier(m);u>=v&&(o.disabled=!0)}}if(!0!==o.disabled&&Array.isArray(n)&&n.length>0)for(var i in n)if(n[i]===o.weekday){o.disabled=!0;break}if(!0!==o.disabled&&Array.isArray(r)&&r.length>0)for(var d in r)if(Array.isArray(r[d])&&2===r[d].length&&r[d][0]&&r[d][1]){const p=parsed(r[d][0]),y=parsed(r[d][1]);if(p&&y&&isBetweenDates(o,p,y)){o.disabled=!0;break}}else{const f=r[d];if(Array.isArray(f))for(var s of f){const g=parseTimestamp(s);if(g){const h=getDayIdentifier(g);if(h===u){o.disabled=!0;break}}}else if(f){const T=parseTimestamp(f);if(T){const D=getDayIdentifier(T);D===u&&(o.disabled=!0)}}}return o}function updateFormatted(e){let t=copyTimestamp(e);return t.hasTime=!0,t.time=getTime(t),t.date=getDate(t),t.weekday=getWeekday(t),t.doy=getDayOfYear(t)||0,t.workweek=getWorkWeek(t),t}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){let t=copyTimestamp(e);if(0===t.year){const r=parseTimestamp(today());r&&(t=r)}const a=new Date(Date.UTC(t.year,t.month-1,t.day)),n=4;a.setUTCDate(a.getUTCDate()-(a.getUTCDay()+6)%7+n),a.setUTCDate(a.getUTCDate()+n-(a.getUTCDay()||7));e=new Date(Date.UTC(a.getUTCFullYear(),0,1)),e=Math.ceil(((a.valueOf()-e.valueOf())/864e5+1)/7);return e}function getWeekday(e){let t=e.weekday;if(e.hasDay){const a=Math.floor,n=e.day,r=(e.month+9)%MONTH_MAX+1,o=a(e.year/100),u=e.year%100-(e.month<=2?1:0);t=((n+a(2.6*r-.2)-2*o+u+a(u/4)+a(o/4))%7+7)%7}return t??0}function copyTimestamp(e){return{...e}}function getDate(e){let 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):"00:00")}function moveRelativeDays(e,t=nextDay,a=1,n=[0,1,2,3,4,5,6]){const r=copyTimestamp(e);return relativeDays(r,t,a,n)}function relativeDays(e,t=nextDay,a=1,n=[0,1,2,3,4,5,6]){let r=copyTimestamp(e);n.includes(Number(r.weekday))||0!==r.weekday||t!==nextDay||++a;while(--a>=0)r=t(r),n.length<7&&!n.includes(Number(r.weekday))&&++a;return r}function findWeekday(e,t,a=nextDay,n=6){let r=copyTimestamp(e);while(r.weekday!==t&&--n>=0)r=a(r);return r}function createDayList(e,t,a,n=[0,1,2,3,4,5,6],r=void 0,o=void 0,u=[],i=[],d=42,s=0){const l=getDayIdentifier(e),c=getDayIdentifier(t),m=[];let v=copyTimestamp(e),p=0,y=p===c;if(!(c<l))while((!y||m.length<s)&&m.length<d){if(p=getDayIdentifier(v),y=y||p>c&&m.length>=s,y)break;if(n.includes(Number(v.weekday))){let e=copyTimestamp(v);e=updateFormatted(e),e=updateRelative(e,a),e=updateDisabled(e,r,o,u,i),m.push(e)}v=relativeDays(v,nextDay)}return m}function createIntervalList(t,a,n,r,o){const u=[];for(let e=0;e<r;++e){const i=(a+e)*n,d=copyTimestamp(t);u.push(updateMinutes(d,i,o))}return u}function createNativeLocaleFormatter(n,r){const e=()=>"";return"undefined"===typeof Intl||"undefined"===typeof Intl.DateTimeFormat?e:(t,e)=>{try{const a=new Intl.DateTimeFormat(n||void 0,r(t,e));return a.format(makeDateTime(t))}catch(e){return console.error(`Intl.DateTimeFormat: ${e.message} -> `+getDateTime(t)),""}}}function makeDate(e,t=!0){return t?new Date(Date.UTC(e.year,e.month-1,e.day,0,0)):new Date(e.year,e.month-1,e.day,0,0)}function makeDateTime(e,t=!0){return t?new Date(Date.UTC(e.year,e.month-1,e.day,e.hour,e.minute)):new Date(e.year,e.month-1,e.day,e.hour,e.minute)}function validateNumber(e){return isFinite(Number(e))}function maxTimestamp(e,t=!1){const a=!0===t?getDayTimeIdentifier:getDayIdentifier;return e.reduce((e,t)=>{return Math.max(a(e),a(t))===a(e)?e:t})}function minTimestamp(e,t=!1){const a=!0===t?getDayTimeIdentifier:getDayIdentifier;return e.reduce((e,t)=>{return Math.min(a(e),a(t))===a(e)?e:t})}function isBetweenDates(e,t,a,n=!1){const r=getDayIdentifier(e)+(!0===n?getTimeIdentifier(e):0),o=getDayIdentifier(t)+(!0===n?getTimeIdentifier(t):0),u=getDayIdentifier(a)+(!0===n?getTimeIdentifier(a):0);return r>=o&&r<=u}function isOverlappingDates(e,t,a,n){const r=getDayIdentifier(e),o=getDayIdentifier(t),u=getDayIdentifier(a),i=getDayIdentifier(n);return r>=u&&r<=i||o>=u&&o<=i||u>=r&&o>=i}function addToDate(e,t){const a=copyTimestamp(e);return t.year&&(a.year+=t.year),t.month&&(a.month+=t.month),t.day&&(a.day+=t.day),t.hour&&(a.hour+=t.hour),t.minute&&(a.minute+=t.minute),updateFormatted(normalizeTimestamp(a))}function normalizeTimestamp(e){const t=new Date(e.year,e.month-1,e.day,e.hour,e.minute);return{...e,year:t.getFullYear(),month:t.getMonth()+1,day:t.getDate(),hour:t.getHours(),minute:t.getMinutes()}}function daysBetween(e,t){const a=diffTimestamp(e,t,!0);return Math.floor(a/TIME_CONSTANTS.MILLISECONDS_IN.DAY)}function weeksBetween(e,t){let a=copyTimestamp(e),n=copyTimestamp(t);return a=findWeekday(a,0),n=findWeekday(n,6),Math.ceil(daysBetween(a,n)/TIME_CONSTANTS.DAYS_IN.WEEK)}const weekdayDateMap={Sun:new Date("2020-01-05T00:00:00.000Z"),Mon:new Date("2020-01-06T00:00:00.000Z"),Tue:new Date("2020-01-07T00:00:00.000Z"),Wed:new Date("2020-01-08T00:00:00.000Z"),Thu:new Date("2020-01-09T00:00:00.000Z"),Fri:new Date("2020-01-10T00:00:00.000Z"),Sat:new Date("2020-01-11T00:00:00.000Z")};function getWeekdayFormatter(){const e=()=>"",r={long:{timeZone:"UTC",weekday:"long"},short:{timeZone:"UTC",weekday:"short"},narrow:{timeZone:"UTC",weekday:"narrow"}};return"undefined"===typeof Intl||"undefined"===typeof Intl.DateTimeFormat?e:t;function t(t,e,a){try{const n=new Intl.DateTimeFormat(a||void 0,r[e]||r["long"]);return n.format(weekdayDateMap[t])}catch(e){return e instanceof Error&&console.error(`Intl.DateTimeFormat: ${e.message} -> day of week: `+t),""}}}function getWeekdayNames(t,a){const e=Object.keys(weekdayDateMap),n=getWeekdayFormatter();return e.map(e=>String(n(e,t,a)))}function getMonthFormatter(){const e=()=>"",o={long:{timeZone:"UTC",month:"long"},short:{timeZone:"UTC",month:"short"},narrow:{timeZone:"UTC",month:"narrow"}};return"undefined"===typeof Intl||"undefined"===typeof Intl.DateTimeFormat?e:t;function t(t,e,a){try{const n=new Intl.DateTimeFormat(a||void 0,o[e]||o["long"]),r=new Date;return r.setDate(1),r.setMonth(t),n.format(r)}catch(e){return e instanceof Error&&console.error(`Intl.DateTimeFormat: ${e.message} -> month: `+t),""}}}function getMonthNames(t,a){const n=getMonthFormatter();return[...Array(12).keys()].map(e=>n(e,t,a))}var Timestamp={PARSE_DATETIME:PARSE_DATETIME,PARSE_DATE:PARSE_DATE,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,TIME_CONSTANTS:TIME_CONSTANTS,FIRST_HOUR:FIRST_HOUR,today:today,getStartOfWeek:getStartOfWeek,getEndOfWeek:getEndOfWeek,getStartOfMonth:getStartOfMonth,getEndOfMonth:getEndOfMonth,parseTime:parseTime,validateTimestamp:validateTimestamp,parsed:parsed,parseTimestamp:parseTimestamp,parseDate:parseDate,getDayIdentifier:getDayIdentifier,getTimeIdentifier:getTimeIdentifier,getDayTimeIdentifier:getDayTimeIdentifier,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,createDayList:createDayList,createIntervalList:createIntervalList,createNativeLocaleFormatter:createNativeLocaleFormatter,makeDate:makeDate,makeDateTime:makeDateTime,validateNumber:validateNumber,isBetweenDates:isBetweenDates,isOverlappingDates:isOverlappingDates,daysBetween:daysBetween,weeksBetween:weeksBetween,addToDate:addToDate,compareTimestamps:compareTimestamps,compareDate:compareDate,compareTime:compareTime,compareDateTime:compareDateTime,getWeekdayFormatter:getWeekdayFormatter,getWeekdayNames:getWeekdayNames,getMonthFormatter:getMonthFormatter,getMonthNames:getMonthNames},Timestamp$1=Object.freeze({__proto__:null,DAYS_IN_MONTH:DAYS_IN_MONTH,DAYS_IN_MONTH_LEAP:DAYS_IN_MONTH_LEAP,DAYS_IN_MONTH_MAX:DAYS_IN_MONTH_MAX,DAYS_IN_MONTH_MIN:DAYS_IN_MONTH_MIN,DAY_MIN:DAY_MIN,FIRST_HOUR:FIRST_HOUR,MONTH_MAX:MONTH_MAX,MONTH_MIN:MONTH_MIN,PARSE_DATE:PARSE_DATE,PARSE_DATETIME:PARSE_DATETIME,PARSE_TIME:PARSE_TIME,TIME_CONSTANTS:TIME_CONSTANTS,addToDate:addToDate,compareDate:compareDate,compareDateTime:compareDateTime,compareTime:compareTime,compareTimestamps:compareTimestamps,copyTimestamp:copyTimestamp,createDayList:createDayList,createIntervalList:createIntervalList,createNativeLocaleFormatter:createNativeLocaleFormatter,daysBetween:daysBetween,daysInMonth:daysInMonth,default:Timestamp,diffTimestamp:diffTimestamp,findWeekday:findWeekday,getDate:getDate,getDateTime:getDateTime,getDayIdentifier:getDayIdentifier,getDayOfYear:getDayOfYear,getDayTimeIdentifier:getDayTimeIdentifier,getEndOfMonth:getEndOfMonth,getEndOfWeek:getEndOfWeek,getMonthFormatter:getMonthFormatter,getMonthNames:getMonthNames,getStartOfMonth:getStartOfMonth,getStartOfWeek:getStartOfWeek,getTime:getTime,getTimeIdentifier:getTimeIdentifier,getWeekday:getWeekday,getWeekdayFormatter:getWeekdayFormatter,getWeekdayNames:getWeekdayNames,getWorkWeek:getWorkWeek,isBetweenDates:isBetweenDates,isLeapYear:isLeapYear,isOverlappingDates:isOverlappingDates,isToday:isToday,makeDate:makeDate,makeDateTime:makeDateTime,maxTimestamp:maxTimestamp,minTimestamp:minTimestamp,moveRelativeDays:moveRelativeDays,nextDay:nextDay,padNumber:padNumber,parseDate:parseDate,parseTime:parseTime,parseTimestamp:parseTimestamp,parsed:parsed,prevDay:prevDay,relativeDays:relativeDays,today:today,updateDayOfYear:updateDayOfYear,updateDisabled:updateDisabled,updateFormatted:updateFormatted,updateMinutes:updateMinutes,updateRelative:updateRelative,updateWeekday:updateWeekday,updateWorkWeek:updateWorkWeek,validateNumber:validateNumber,validateTimestamp:validateTimestamp,weeksBetween:weeksBetween});function convertToUnit(e,t="px"){if(e)return isNaN(e)?String(e):"auto"===e?e:""+Number(e)+t}function indexOf(t,a){for(let e=0;e<t.length;e++)if(!0===a(t[e],e))return e;return-1}function minCharWidth(e,t){return 0===t?e:e.slice(0,t)}var helpers={convertToUnit:convertToUnit,indexOf:indexOf,minCharWidth:minCharWidth},helpers$1=Object.freeze({__proto__:null,convertToUnit:convertToUnit,default:helpers,indexOf:indexOf,minCharWidth:minCharWidth});const ResizeObserverDirective={mounted(e,t){if("function"===typeof t.value){const a=t.value,n={callback:a,size:{width:0,height:0},observer:new ResizeObserver(e=>{const t=e[0].contentRect;t.width===n.size.width&&t.height===n.size.height||(n.size.width=t.width,n.size.height=t.height,n.debounceTimeout&&clearTimeout(n.debounceTimeout),n.debounceTimeout=setTimeout(()=>{n.callback(n.size),n.debounceTimeout=void 0},100))})};n.observer.observe(e),e.__onResizeObserver=n}},beforeUnmount(e){if(e.__onResizeObserver){const{observer:t,debounceTimeout:a}=e.__onResizeObserver;a&&clearTimeout(a),t.unobserve(e),delete e.__onResizeObserver}}};function useCalendar(t,a,{scrollArea:e,pane:n}){if(!a){const l="[error: renderCalendar] no renderFunc has been supplied to useCalendar";throw console.error(l),new Error(l)}const r=vue.reactive({width:0,height:0}),o=vue.ref(null);function u({width:e,height:t}){r.width=e,r.height=t}const i=vue.computed(()=>{return!0!==t.noScroll&&e.value&&n.value&&r.height?e.value.offsetWidth-n.value.offsetWidth:0});function d(){}function s(){const e={ref:o,role:"complementary",lang:t.locale,class:`q-calendar ${t.dark?"q-calendar--dark":""} `+(t.bordered?"q-calendar__bordered":"")};return vue.withDirectives(vue.h("div",{...e},[a()]),[[ResizeObserverDirective,u]])}return{rootRef:o,scrollWidth:i,__initCalendar:d,__renderCalendar:s}}const isValidFocusType=e=>e.every(e=>["day","date","weekday","interval","time","resource","task"].includes(e)),useCommonProps={modelValue:{type:String,default:today(),validator:e=>""===e||validateTimestamp(e)},weekdays:{type:Array,default:()=>[0,1,2,3,4,5,6]},dateType:{type:String,default:"round",validator:e=>["round","rounded","square"].includes(e)},weekdayAlign:{type:String,default:"center",validator:e=>["left","center","right"].includes(e)},dateAlign:{type:String,default:"center",validator:e=>["left","center","right"].includes(e)},bordered:Boolean,dark:Boolean,noAria:Boolean,noActiveDate:Boolean,noHeader:Boolean,noScroll:Boolean,shortWeekdayLabel:Boolean,noDefaultHeaderText:Boolean,noDefaultHeaderBtn:Boolean,minWeekdayLabel:{type:[Number,String],default:1},weekdayBreakpoints:{type:Array,default:()=>[75,35],validator:e=>2===e.length},locale:{type:String,default:"en-US"},animated:Boolean,transitionPrev:{type:String,default:"slide-right"},transitionNext:{type:String,default:"slide-left"},disabledDays:Array,disabledBefore:String,disabledAfter:String,disabledWeekdays:{type:Array,default:()=>[]},dragEnterFunc:Function,dragOverFunc:Function,dragLeaveFunc:Function,dropFunc:Function,selectedDates:{type:[Array,Set],default:()=>[]},selectedStartEndDates:{type:Array,default:()=>[]},hoverable:Boolean,focusable:Boolean,focusType:{type:Array,default:()=>["date"],validator:isValidFocusType}};function useCommon(t,{startDate:e,endDate:a,times:n}){const r=vue.computed(()=>parseTimestamp(e.value)),o=vue.computed(()=>{return"0000-00-00"===a.value?getEndOfWeek(r.value,t.weekdays,n.today):parseTimestamp(a.value)||r.value}),u=vue.computed(()=>createNativeLocaleFormatter(t.locale,()=>({timeZone:"UTC",day:"numeric"}))),i=vue.computed(()=>createNativeLocaleFormatter(t.locale,(e,t)=>({timeZone:"UTC",weekday:t?"short":"long"}))),d=vue.computed(()=>createNativeLocaleFormatter(t.locale,()=>({timeZone:"UTC",dateStyle:"full"})));function s(e,t){return e&&e.length>0&&e.includes(t.date)}function l(e,t){const a={firstDay:!1,betweenDays:!1,lastDay:!1};if(2===e.length){const n=getDayIdentifier(t),r=getDayIdentifier(parsed(e[0])),o=getDayIdentifier(parsed(e[1]));a.firstDay=r===n,a.lastDay=o===n,a.betweenDays=r<n&&o>n}return a}function c(e,t=!1,a=[],n=[],r=!1){const o=s(a,e),{firstDay:u,lastDay:i,betweenDays:d}=l(n,e);return{"q-past-day":!u&&!d&&!i&&!o&&!t&&!!e.past,"q-future-day":!u&&!d&&!i&&!o&&!t&&!!e.future,"q-outside":t,"q-current-day":!!e.current,"q-selected":o,"q-range-first":u,"q-range":d,"q-range-last":i,"q-range-hover":r&&(u||i||d),"q-disabled-day disabled":!0===e.disabled}}function m(e){return getStartOfWeek(e,t.weekdays,n.today)}function v(e){return getEndOfWeek(e,t.weekdays,n.today)}function p(){return{}}return{parsedStart:r,parsedEnd:o,dayFormatter:u,weekdayFormatter:i,ariaDateFormatter:d,arrayHasDate:s,checkDays:l,getRelativeClasses:c,startOfWeek:m,endOfWeek:v,dayStyleDefault:p}}function scrollTo(e,t){e instanceof Window?e.scrollTo({top:t,behavior:"instant"}):e.scrollTop=t}function getVerticalScrollPosition(e){return e instanceof Window?e.scrollY:e.scrollTop}function animVerticalScrollTo(o,u,i=500,d=performance.now(),s=getVerticalScrollPosition(o)){i<=0||s===u?scrollTo(o,u):requestAnimationFrame(e=>{const t=e-d,a=Math.min(t/i,1),n=e=>e<.5?2*e*e:(4-2*e)*e-1,r=s+(u-s)*n(a);scrollTo(o,r),a<1&&animVerticalScrollTo(o,u,i,d,s)})}function animHorizontalScrollTo(r,e,o=500){const u=r.scrollLeft,i=e-u;let d=null;function s(e){null===d&&(d=e);const t=e-d,a=Math.min(t/o,1),n=e=>e<.5?2*e*e:(4-2*e)*e-1;r.scrollLeft=u+i*n(a),t<o&&requestAnimationFrame(s)}requestAnimationFrame(s)}const useAgendaProps={view:{type:String,validator:e=>["day","week","month","month-interval"].includes(e),default:"day"},leftColumnOptions:{type:Array},rightColumnOptions:{type:Array},columnOptionsId:{type:String},columnOptionsLabel:{type:String},weekdayStyle:{type:Function,default:null},weekdayClass:{type:Function,default:null},dayStyle:{type:Function,default:null},dayClass:{type:Function,default:null},dateHeader:{type:String,default:"stacked",validator:e=>["stacked","inline","inverted"].includes(e)},dayHeight:{type:[Number,String],default:0,validator:validateNumber},dayMinHeight:{type:[Number,String],default:40,validator:validateNumber}};function useInterval(o,{times:t,scrollArea:n,parsedStart:e,parsedEnd:a,maxDays:r,size:u,headerColumnRef:i}){const d=vue.computed(()=>parseInt(String(o.intervalStart),10)),m=vue.computed(()=>parseInt(String(o.intervalMinutes),10)),s=vue.computed(()=>parseInt(String(o.intervalCount),10)),v=vue.computed(()=>parseFloat(String(o.intervalHeight))),p=vue.computed(()=>{let e=0;const t=Number(o.columnCount);return o.cellWidth?e=Number(o.cellWidth):u.width>0&&i.value&&(e=i.value.offsetWidth/(t>1?t:r.value)),e}),l=vue.computed(()=>d.value*m.value),c=vue.computed(()=>s.value*v.value),y=vue.computed(()=>s.value*p.value),f=vue.computed(()=>D(e.value)),g=vue.computed(()=>k(a.value)),h=vue.computed(()=>{return createDayList(e.value,a.value,t.today,o.weekdays,o.disabledBefore,o.disabledAfter,o.disabledWeekdays,o.disabledDays,r.value)}),T=vue.computed(()=>{return h.value.map(e=>createIntervalList(e,d.value,m.value,s.value,t.now))});function D(e){return getStartOfWeek(e,o.weekdays,t.today)}function k(e){return getEndOfWeek(e,o.weekdays,t.today)}function w(e,t){return e&&e.length>0&&e.includes(getDateTime(t))}function _(e,t){const a={firstDay:!1,betweenDays:!1,lastDay:!1};if(e&&2===e.length){const n=getDayTimeIdentifier(t),r=getDayTimeIdentifier(parsed(e[0])),o=getDayTimeIdentifier(parsed(e[1]));a.firstDay=r===n,a.lastDay=o===n,a.betweenDays=r<n&&o>n}return a}function b(e,t=[],a=[]){const n=w(t,e),{firstDay:r,lastDay:o,betweenDays:u}=_(a,e);return{"q-selected":n,"q-range-first":!0===r,"q-range":!0===u,"q-range-last":!0===o,"q-disabled-interval disabled":!0===e.disabled}}function I(e,t,a){return[]}const N=vue.computed(()=>{const a={timeZone:"UTC",hour12:!o.hour24Format,hour:"2-digit",minute:"2-digit"},n={timeZone:"UTC",hour12:!o.hour24Format,hour:"numeric",minute:"2-digit"},r={timeZone:"UTC",hour12:!o.hour24Format,hour:"numeric"};return createNativeLocaleFormatter(o.locale,(e,t)=>t?0===e.minute?r:n:a)}),M=vue.computed(()=>{const e={timeZone:"UTC",dateStyle:"full",timeStyle:"short"};return createNativeLocaleFormatter(o.locale,()=>e)});function S(e){const t=T.value[0][0],a=t.hour===e.hour&&t.minute===e.minute;return!a&&0===e.minute}function O(e){}function A(e){return{}}function E(e,t,a=!1,n){let r=copyTimestamp(t);if(e.currentTarget){const o=e.currentTarget.getBoundingClientRect(),u=e,i=e,d=u.changedTouches||u.touches,s=(d&&d[0]?d[0]:i).clientY,l=(s-o.top)/v.value,c=Math.floor((a?Math.floor(l):l)*m.value);0!==c&&(r=addToDate(r,{minute:c})),n&&(r=updateRelative(r,n,!0))}return r}function H(e,t,a=!1,n){let r=copyTimestamp(t);const o=e.currentTarget.getBoundingClientRect(),u=e,i=e,d=u.changedTouches||u.touches,s=(d&&d[0]?d[0]:i).clientY,l=(s-o.top)/v.value,c=Math.floor((a?Math.floor(l):l)*m.value);return 0!==c&&(r=addToDate(r,{minute:c})),n&&(r=updateRelative(r,n,!0)),r}function x(e,t,a=!1,n){let r=copyTimestamp(t);if(e.currentTarget){const o=e.currentTarget.getBoundingClientRect(),u=e,i=e,d=u.changedTouches||u.touches,s=(d&&d[0]?d[0]:i).clientX,l=(s-o.left)/p.value,c=Math.floor((a?Math.floor(l):l)*m.value);0!==c&&(r=addToDate(r,{minute:c})),n&&(r=updateRelative(r,n,!0))}return r}function L(e,t){const a={timestamp:e,timeStartPos:F,timeDurationHeight:C};return void 0!==t&&(a.columnIndex=t),a}function q(e,t){const a={timestamp:copyTimestamp(e),timeStartPosX:R,timeDurationWidth:W};return void 0!==t&&(a.index=t),a}function Y(e,t=0){const a=F(e);return!(!1===a||!n.value)&&(animVerticalScrollTo(n.value,a,t),!0)}function U(e,t=0){const a=R(e);return!(!1===a||!n.value)&&(animHorizontalScrollTo(n.value,a,t),!0)}function C(e){return e/m.value*v.value}function W(e){return e/m.value*p.value}function B(e){return e*m.value/v.value}function P(e){return e*m.value/p.value}function F(e,t=!0){const a=parseTime(e);if(!1===a)return!1;const n=l.value,r=s.value*m.value,o=(a-n)/r;let u=o*c.value;return t&&(u<0&&(u=0),u>c.value)&&(u=c.value),u}function R(e,t=!0){const a=parseTime(e);if(!1===a)return!1;const n=l.value,r=s.value*m.value,o=(a-n)/r;let u=o*y.value;return t&&(u<0&&(u=0),u>y.value)&&(u=y.value),u}return{parsedIntervalStart:d,parsedIntervalMinutes:m,parsedIntervalCount:s,parsedIntervalHeight:v,parsedCellWidth:p,parsedStartMinute:l,bodyHeight:c,bodyWidth:y,parsedWeekStart:f,parsedWeekEnd:g,days:h,intervals:T,intervalFormatter:N,ariaDateTimeFormatter:M,arrayHasDateTime:w,checkIntervals:_,getIntervalClasses:b,getResourceClasses:I,showIntervalLabelDefault:S,showResourceLabelDefault:O,styleDefault:A,getTimestampAtEventInterval:E,getTimestampAtEvent:H,getTimestampAtEventX:x,getScopeForSlot:L,getScopeForSlotX:q,scrollToTime:Y,scrollToTimeX:U,timeDurationHeight:C,timeDurationWidth:W,heightToMinutes:B,widthToMinutes:P,timeStartPos:F,timeStartPosX:R}}const useColumnProps={columnCount:{type:[Number,String],default:0,validator:validateNumber},columnIndexStart:{type:[Number,String],default:0,validator:validateNumber}},useMaxDaysProps={maxDays:{type:Number,default:1}},useTimesProps={now:{type:String,validator:e=>""===e||validateTimestamp(e),default:""}};function useTimes(e){const t=vue.reactive({now:parseTimestamp("0000-00-00 00:00"),today:parseTimestamp("0000-00-00")}),a=vue.computed(()=>e.now?parseTimestamp(e.now):o());function n(){t.now&&t.today&&(t.now.current=t.today.current=!0,t.now.past=t.today.past=!1,t.now.future=t.today.future=!1)}function r(){const e=a.value||o();u(e,t.now),i(e,t.now),u(e,t.today)}function o(){return parseDate(new Date)}function u(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)}function i(e,t){e.time!==t.time&&(t.hour=e.hour,t.minute=e.minute,t.time=e.time)}return vue.watch(a,()=>r()),{times:t,parsedNow:a,setCurrent:n,updateCurrent:r,getNow:o,updateDay:u,updateTime:i}}function useRenderValues(r,{parsedView:o,parsedValue:u,times:i}){const e=vue.computed(()=>{const e=u.value;let t=r.maxDays,a=e,n=e;switch(o.value){case"month":a=getStartOfMonth(e),n=getEndOfMonth(e),t=daysInMonth(a.year,a.month);break;case"week":case"week-agenda":case"week-scheduler":a=getStartOfWeek(e,r.weekdays,i.today),n=getEndOfWeek(a,r.weekdays,i.today),t=r.weekdays.length;break;case"day":case"scheduler":case"agenda":n=moveRelativeDays(copyTimestamp(n),nextDay,t>1?t-1:t,r.weekdays),n=updateFormatted(n);break;case"month-interval":case"month-scheduler":case"month-agenda":a=getStartOfMonth(e),n=getEndOfMonth(e),n=updateFormatted(n),t=daysInMonth(a.year,a.month);break;case"resource":t=1,n=moveRelativeDays(copyTimestamp(n),nextDay,t,r.weekdays),n=updateFormatted(n);break}return{start:a,end:n,maxDays:t}});return{renderValues:e}}const toCamelCase=e=>e.replace(/(-\w)/g,e=>e[1].toUpperCase());function getMouseEventHandlers(t,e,a,n){const r={};for(const o in a){const u=a[o],i=toCamelCase("on-"+o);if(!e.value)return console.warn("$listeners has not been set up"),{};if(void 0!==e.value[i]){const d="on"+u.event.charAt(0).toUpperCase()+u.event.slice(1),s=e=>{return(void 0===u.button||"buttons"in e&&e.buttons>0&&e.button===u.button)&&(u.prevent&&e.preventDefault(),u.stop&&e.stopPropagation(),t(o,n(e,o))),u.result};d in r?Array.isArray(r[d])?r[d].push(s):r[d]=[r[d],s]:r[d]=s}}return r}function getDefaultMouseEventHandlers(e,t,a,n){return getMouseEventHandlers(e,t,getMouseEventName(a),n)}function getMouseEventName(e){return{["click"+e]:{event:"click"},["contextmenu"+e]:{event:"contextmenu",prevent:!0,result:!1},["mousedown"+e]:{event:"mousedown"},["mousemove"+e]:{event:"mousemove"},["mouseup"+e]:{event:"mouseup"},["mouseenter"+e]:{event:"mouseenter"},["mouseleave"+e]:{event:"mouseleave"},["touchstart"+e]:{event:"touchstart"},["touchmove"+e]:{event:"touchmove"},["touchend"+e]:{event:"touchend"}}}function getRawMouseEvents(e){return Object.keys(getMouseEventName(e))}function useMouseEvents(a,n){return{getMouseEventHandlers:(e,t)=>getMouseEventHandlers(a,n,e,t),getDefaultMouseEventHandlers:(e,t)=>getDefaultMouseEventHandlers(a,n,e,t),getMouseEventName:getMouseEventName,getRawMouseEvents:getRawMouseEvents}}const useMoveEmits=["moved"];function useMove(d,{parsedView:s,parsedValue:l,direction:c,maxDays:m,times:v,emittedValue:p,emit:y}){function e(a=1){if(0===a)p.value=today();else{let e=copyTimestamp(l.value);const n=getEndOfMonth(e),r=a>0,o=r?nextDay:prevDay,u=r?n.day:1;let t=r?a:-a;c.value=r?"next":"prev";const i=d.weekdays.length;while(--t>=0)switch(s.value){case"month":e.day=u,e=o(e),e=updateWeekday(e);while(!d.weekdays.includes(Number(e.weekday)))e=addToDate(e,{day:r?1:-1});break;case"week":case"week-agenda":case"week-scheduler":e=relativeDays(e,o,i,d.weekdays);break;case"day":case"scheduler":case"agenda":e=relativeDays(e,o,m.value,d.weekdays);break;case"month-interval":case"month-agenda":case"month-scheduler":e.day=u,e=o(e);break;case"resource":e=relativeDays(e,o,m.value,d.weekdays);break}e=updateWeekday(e),e=updateFormatted(e),e=updateDayOfYear(e),e=updateRelative(e,v.now),p.value=e.date,y("moved",e)}}return{move:e}}const listenerRE=/^on[A-Z]/;function useEmitListeners(e=vue.getCurrentInstance()){return{emitListeners:vue.computed(()=>{const t={};return e?.vnode?.props&&Object.keys(e.vnode.props).forEach(e=>{listenerRE.test(e)&&(t[e]=!0)}),t})}}function useFocusHelper(){const e={"aria-hidden":"true",class:"q-calendar__focus-helper"};return[vue.h("span",e)]}function useButton(){function e({focusable:e,focusType:t},a,n){const r=e&&t.includes("date");return vue.h("button",{...a,tabindex:r?0:-1},[n,r&&useFocusHelper()])}return{renderButton:e}}const useCellWidthProps={cellWidth:[Number,String]};function useCellWidth(e){const t=vue.computed(()=>void 0!==e.cellWidth);return{isSticky:t}}const useCheckChangeEmits=["change"];function useCheckChange(n,{days:r,lastStart:o,lastEnd:u}){function e(){const e=r.value;if(0===e.length)return!1;const t=e[0].date,a=e[e.length-1].date;return(!o.value||!u.value||t!==o.value||a!==u.value)&&(o.value=t,u.value=a,n("change",{start:t,end:a,days:e}),!0)}return{checkChange:e}}function useEventUtils(){function e(e,t){return(Array.isArray(t)?t:[t]).includes(e.keyCode)}return{isKeyCode:e}}const isKeyCode=useEventUtils().isKeyCode,useNavigationProps={useNavigation:Boolean};function useNavigation(t,{rootRef:a,focusRef:n,focusValue:r,datesRef:o,parsedView:u,emittedValue:i,direction:d,times:s}){let e=!1;function l(){e||document&&(e=!0,document.addEventListener("keyup",y),document.addEventListener("keydown",p))}function c(){document&&(document.removeEventListener("keyup",y),document.removeEventListener("keydown",p),e=!1)}function m(e){if(e&&document){const t=document.activeElement;if(t!==document.body&&a.value?.contains(t))return!0}return!1}function v(){let t=0;const a=window.setInterval(()=>{const e=o.value[n.value];e&&(e.focus(),50!==++t)&&document.activeElement!==e||window.clearInterval(a)},250)}function p(e){m(e)&&isKeyCode(e,[33,34,35,36,37,38,39,40])&&(e.stopPropagation(),e.preventDefault())}function y(e){if(m(e)&&isKeyCode(e,[33,34,35,36,37,38,39,40])){const t={33:D,34:k,35:_,36:w,37:h,38:f,39:T,40:g};t[e.keyCode]?.()}}function f(){let e=copyTimestamp(r.value);if("month"===u.value){if(e=addToDate(e,{day:-7}),r.value.month!==e.month)return d.value="prev",void(i.value=e.date)}else e=addToDate(e,{minute:Number(t.intervalMinutes)});d.value="prev",n.value=e.date}function g(){let e=copyTimestamp(r.value);if("month"===u.value){if(e=addToDate(e,{day:7}),r.value.month!==e.month)return d.value="next",void(i.value=e.date)}else e=addToDate(e,{minute:Number(t.intervalMinutes)});d.value="next",n.value=e.date}function h(){let e=copyTimestamp(r.value);d.value="prev";do{e=addToDate(e,{day:-1})}while(!t.weekdays.includes(Number(e.weekday)));n.value=e.date}function T(){let e=copyTimestamp(r.value);d.value="next";do{e=addToDate(e,{day:1})}while(!t.weekdays.includes(Number(e.weekday)));n.value=e.date}function D(){let e=copyTimestamp(r.value);e="month"===u.value?addToDate(e,{month:-1}):addToDate(e,{day:-7}),d.value="prev",n.value=e.date}function k(){let e=copyTimestamp(r.value);e="month"===u.value?addToDate(e,{month:1}):addToDate(e,{day:7}),d.value="next",n.value=e.date}function w(){let e=copyTimestamp(r.value);e="month"===u.value?getStartOfMonth(e):getStartOfWeek(e,t.weekdays||[],s.today);while(!t.weekdays.includes(Number(e.weekday)))e=addToDate(e,{day:-1});n.value=e.date}function _(){let e=copyTimestamp(r.value);e="month"===u.value?getEndOfMonth(e):getEndOfWeek(e,t.weekdays||[],s.today);while(!t.weekdays.includes(Number(e.weekday)))e=addToDate(e,{day:-1});n.value=e.date}return vue.onBeforeUnmount(()=>{c()}),vue.watch(()=>t.useNavigation,e=>{(!0===e?l:c)()}),!0===t.useNavigation&&l(),{startNavigation:l,endNavigation:c,tryFocus:v}}const renderButton=useButton().renderButton;var QCalendarAgenda=vue.defineComponent({name:"QCalendarAgenda",directives:{ResizeObserver:ResizeObserverDirective},props:{...useCommonProps,...useAgendaProps,...useColumnProps,...useMaxDaysProps,...useTimesProps,...useCellWidthProps,...useNavigationProps},emits:["update:model-value",...useCheckChangeEmits,...useMoveEmits,...getRawMouseEvents("-date"),...getRawMouseEvents("-head-day"),...getRawMouseEvents("-time")],setup(m,{slots:v,emit:i,expose:H}){const e=vue.ref(null),t=vue.ref(null),x=vue.ref(null),p=vue.ref(m.modelValue||today()),a=vue.ref(parsed(m.modelValue||today())),y=vue.ref({}),n=vue.ref(),r=vue.ref(),u=vue.ref("next"),d=vue.ref(m.modelValue||today()),s=vue.ref("0000-00-00"),l=vue.ref(0),c=vue.ref(m.modelValue),f=vue.reactive({width:0,height:0}),g=vue.ref(""),L=vue.ref(null),q=vue.ref(null),o=(vue.watch(()=>m.view,()=>{l.value=0}),vue.computed(()=>{return"month"===m.view?"month-interval":m.view})),Y=vue.getCurrentInstance();if(null===Y)throw new Error("current instance is null");const U=useEmitListeners(Y).emitListeners,h=useCellWidth(m).isSticky,{times:T,setCurrent:B,updateCurrent:P}=(vue.watch(h,()=>{}),useTimes(m)),{parsedStart:V,parsedEnd:z,dayFormatter:Z,weekdayFormatter:$,ariaDateFormatter:X,dayStyleDefault:K,getRelativeClasses:D}=(P(),B(),useCommon(m,{startDate:d,endDate:s,times:T})),k=vue.computed(()=>{return parseTimestamp(m.modelValue,T.now)||V.value||T.today}),j=(a.value=k.value,p.value=k.value.date,useRenderValues(m,{parsedView:o,parsedValue:k,times:T})).renderValues,{rootRef:w,scrollWidth:Q,__renderCalendar:G}=useCalendar(m,Ie,{scrollArea:e,pane:t}),{days:_,parsedCellWidth:J,getScopeForSlot:b}=useInterval(m,{times:T,scrollArea:e,parsedStart:V,parsedEnd:z,maxDays:l,size:f,headerColumnRef:x}),I=useMove(m,{parsedView:o,parsedValue:k,direction:u,maxDays:l,times:T,emittedValue:c,emit:i}).move,N=useMouseEvents(i,U).getDefaultMouseEventHandlers,ee=useCheckChange(i,{days:_,lastStart:L,lastEnd:q}).checkChange,te=useEventUtils().isKeyCode,ae=useNavigation(m,{rootRef:w,focusRef:p,focusValue:a,datesRef:y,parsedView:o,emittedValue:c,direction:u,times:T}).tryFocus,M=vue.computed(()=>{return _.value.length+(!0===S.value?m.leftColumnOptions.length:0)+(!0===O.value?m.rightColumnOptions.length:0)+_.value.length===1&&parseInt(String(m.columnCount),10)>0?parseInt(String(m.columnCount),10):0}),S=vue.computed(()=>{return void 0!==m.leftColumnOptions&&Array.isArray(m.leftColumnOptions)}),O=vue.computed(()=>{return void 0!==m.rightColumnOptions&&Array.isArray(m.rightColumnOptions)}),A=vue.computed(()=>{if(w.value){const e=f.width||w.value.getBoundingClientRect().width;if(e&&M.value)return(e-Q.value)/M.value+"px"}return 100/M.value+"%"});function ne(){c.value=today()}function re(e=1){I(e)}function oe(e=1){I(-e)}function ue({width:e,height:t}){f.width=e,f.height=t}function E(e){return e.date===c.value}function C(t,a){const e=v["head-column"],n={column:t,index:a,days:_.value},r=!0===h.value?m.cellWidth:A.value,o=!0===m.focusable&&m.focusType.includes("weekday"),u=void 0!==m.columnOptionsId?t[m.columnOptionsId]:"id",i={maxWidth:r,width:r};return vue.h("div",{key:u,tabindex:!0===o?0:-1,class:{"q-calendar-agenda__head--day":!0,"q-column-day":!0,"q-calendar__hoverable":!0===m.hoverable,"q-calendar__focusable":!0===o},style:i,onDragenter:e=>{void 0!==m.dragEnterFunc&&"function"===typeof m.dragEnterFunc&&(!0===m.dragEnterFunc(e,"head-column",{scope:n})?g.value=u:g.value="")},onDragover:e=>{void 0!==m.dragOverFunc&&"function"===typeof m.dragOverFunc&&(!0===m.dragOverFunc(e,"head-column",{scope:n})?g.value=u:g.value="")},onDragleave:e=>{void 0!==m.dragLeaveFunc&&"function"===typeof m.dragLeaveFunc&&(!0===m.dragLeaveFunc(e,"head-column",{scope:n})?g.value=u:g.value="")},onDrop:e=>{void 0!==m.dropFunc&&"function"===typeof m.dropFunc&&(!0===m.dropFunc(e,"head-column",{scope:n})?g.value=u:g.value="")},...N("-head-column",e=>{return{scope:{column:t,index:a},event:e}})},[!0!==m.noDefaultHeaderText&&ie(t),e&&e(n),useFocusHelper()])}function ie(e){const t=v["head-column-label"],a={column:e},n=void 0!==m.columnOptionsLabel?e[m.columnOptionsLabel]:e.label,r=vue.h("div",{class:{"q-calendar-agenda__head--weekday":!0,["q-calendar__"+m.weekdayAlign]:!0,ellipsis:!0},style:{alignSelf:"center"}},[t&&t({scope:a}),!t&&vue.h("span",{class:"ellipsis"},n)]);return"stacked"===m.dateHeader?r:vue.h("div",{class:"q-calendar__header--inline",style:{height:"100%"}},[r])}function de(){return vue.h("div",{roll:"presentation",class:{"q-calendar-agenda__head":!0,"q-calendar__sticky":!0===h.value},style:{marginRight:Q.value+"px"}},[se()])}function se(){return vue.h("div",{ref:x,class:{"q-calendar-agenda__head--days__column":!0}},[le(),ce()])}function le(){return vue.h("div",{class:{"q-calendar-agenda__head--days__weekdays":!0}},me())}function ce(){const e=v["head-days-events"];return vue.nextTick(()=>{if(r.value&&0===m.columnCount&&window)try{const e=window.getComputedStyle(r.value);n.value&&n.value.parentElement&&(n.value.parentElement.style.height=e.height,n.value.style.height=e.height)}catch{}}),vue.h("div",{class:{"q-calendar-agenda__head--days__event":!0}},[e&&vue.h("div",{ref:n,style:{position:"absolute",left:0,top:0,right:0,overflow:"hidden",zIndex:1}},[e({scope:{days:_.value,ref:r}})]),...ve()])}function me(){const e=parseInt(String(m.columnCount),10),a=parseInt(String(m.columnIndexStart),10);return(1===_.value.length&&e>0?[!0===S.value?m.leftColumnOptions.map((e,t)=>C(e,t)):[],...Array.apply(null,new Array(e)).map((e,t)=>t+a).map(e=>pe(_.value[0],e)),!0===O.value?m.rightColumnOptions.map((e,t)=>C(e,t)):[]]:[!0===S.value?m.leftColumnOptions.map((e,t)=>C(e,t)):[],..._.value.map(e=>pe(e)),!0===O.value?m.rightColumnOptions.map((e,t)=>C(e,t)):[]]).flat()}function ve(){const a=parseInt(String(m.columnCount),10);return 1===_.value.length&&a>0?[...Array.apply(null,new Array(parseInt(String(m.columnCount),10))).map((e,t)=>t+a).map(e=>fe(_.value[0],e))]:_.value.map(e=>fe(e,0))}function pe(t,e){const a=v["head-day"],n=v["head-date"],r=!0!==m.noActiveDate&&E(t),o=b(t,e??0),u=(o.activeDate=r,o.droppable=g.value===t.date,o.disabled=!!m.disabledWeekdays&&m.disabledWeekdays.includes(Number(t.weekday)),!0===h.value?m.cellWidth:A.value),i=m.weekdayStyle||K,d={width:u,maxWidth:u,...i({scope:o})},s=(!0===h.value&&(d.minWidth=u),"function"===typeof m.weekdayClass?m.weekdayClass({scope:o}):{}),l=!0===m.focusable&&m.focusType.includes("weekday"),c={key:t.date+(void 0!==e?"-"+e:""),ref:e=>{y.value[t.date]=e},tabindex:!0===l?0:-1,class:{"q-calendar-agenda__head--day":!0,...s,...D(t),"q-active-date":r,"q-calendar__hoverable":!0===m.hoverable,"q-calendar__focusable":!0===l},style:d,onDragenter:e=>{void 0!==m.dragEnterFunc&&"function"===typeof m.dragEnterFunc&&(!0===m.dragEnterFunc(e,"head-day",{scope:o})?g.value=t.date:g.value="")},onDragover:e=>{void 0!==m.dragOverFunc&&"function"===typeof m.dragOverFunc&&(!0===m.dragOverFunc(e,"head-day",{scope:o})?g.value=t.date:g.value="")},onDragleave:e=>{void 0!==m.dragLeaveFunc&&"function"===typeof m.dragLeaveFunc&&(!0===m.dragLeaveFunc(e,"head-day",{scope:o})?g.value=t.date:g.value="")},onDrop:e=>{void 0!==m.dropFunc&&"function"===typeof m.dropFunc&&(!0===m.dropFunc(e,"head-day",{scope:o})?g.value=t.date:g.value="")},onFocus:()=>{!0===l&&(p.value=t.date)},...N("-head-day",e=>{return{scope:o,event:e}})};return vue.h("div",c,[void 0!==a&&a({scope:o}),void 0===a&&ye(t),void 0===a&&n&&n({scope:o}),useFocusHelper()])}function ye(e){return"stacked"===m.dateHeader?[!0!==m.noDefaultHeaderText&&W(e),!0!==m.noDefaultHeaderBtn&&F(e)].filter(e=>!1!==e):"inline"===m.dateHeader?("left"===m.weekdayAlign&&"right"===m.dateAlign||"right"===m.weekdayAlign&&m.dateAlign,vue.h("div",{class:"q-calendar__header--inline"},[!0!==m.noDefaultHeaderText&&W(e),!0!==m.noDefaultHeaderBtn&&F(e)])):"inverted"===m.dateHeader?("left"===m.weekdayAlign&&"right"===m.dateAlign||"right"===m.weekdayAlign&&m.dateAlign,vue.h("div",{class:"q-calendar__header--inline"},[!0!==m.noDefaultHeaderBtn&&F(e),!0!==m.noDefaultHeaderText&&W(e)])):void 0}function fe(e,t){const a=v["head-day-event"],n=!0!==m.noActiveDate&&E(e),r=b(e,t),o=(r.activeDate=n,r.disabled=!!m.disabledWeekdays&&m.disabledWeekdays.includes(Number(e.weekday)),!0===h.value?m.cellWidth:A.value),u={width:o,maxWidth:o};return!0===h.value&&(u.minWidth=o),vue.h("div",{key:"event-"+e.date+(void 0!==t?"-"+t:""),class:{"q-calendar-agenda__head--day__event":!0,...D(e),"q-active-date":n},style:u},[a&&a({scope:r})])}function W(e){const t=v["head-weekday-label"],a=b(e,0),n=(a.shortWeekdayLabel=m.shortWeekdayLabel,{class:{"q-calendar-agenda__head--weekday":!0,["q-calendar__"+m.weekdayAlign]:!0,"q-calendar__ellipsis":!0}});return vue.h("div",n,t&&t({scope:a})||ge(e,m.shortWeekdayLabel))}function ge(e,t){const a=$.value(e,t||m.weekdayBreakpoints[0]>0&&J.value<=m.weekdayBreakpoints[0]);return vue.h("span",{class:"q-calendar__ellipsis"},m.weekdayBreakpoints[1]>0&&J.value<=m.weekdayBreakpoints[1]?minCharWidth(a,Number(m.minWeekdayLabel)):a)}function F(e){const t={class:{"q-calendar-agenda__head--date":!0,["q-calendar__"+m.dateAlign]:!0}};return vue.h("div",t,he(e))}function he(a){const e=!0!==m.noActiveDate&&E(a),t=Z.value(a,!1),n=v["head-day-label"],r=v["head-day-button"],o={dayLabel:t,timestamp:a,activeDate:e,disabled:!!m.disabledWeekdays&&m.disabledWeekdays.includes(Number(a.weekday))},u={class:{"q-calendar-agenda__head--day__label":!0,"q-calendar__button":!0,"q-calendar__button--round":"round"===m.dateType,"q-calendar__button--rounded":"rounded"===m.dateType,"q-calendar__button--bordered":!0===a.current,"q-calendar__focusable":!0},disabled:a.disabled,onKeydown:e=>{!0!==a.disabled&&te(e,[13,32])&&(e.stopPropagation(),e.preventDefault())},onKeyup:e=>{!0!==a.disabled&&te(e,[13,32])&&(c.value=a.date,void 0!==U.value.onClickDate)&&i("click-date",{scope:o})},...N("-date",(e,t)=>{return"click-date"!==t&&"contextmenu-date"!==t||(c.value=a.date,"click-date"===t&&e.preventDefault()),{scope:o,event:e}})};return!0!==m.noAria&&(u.ariaLabel=X.value(a,!1)),r?r({scope:o}):renderButton(m,u,n?n({scope:o}):t)}function Te(){return vue.h("div",{class:"q-calendar-agenda__body"},[De()])}function De(){return!0===h.value?vue.h("div",{ref:e,class:{"q-calendar-agenda__scroll-area":!0,"q-calendar__scroll":!0}},[we()]):!0===m.noScroll?ke():vue.h("div",{ref:e,class:{"q-calendar-agenda__scroll-area":!0,"q-calendar__scroll":!0}},[ke()])}function ke(){return vue.h("div",{ref:t,class:"q-calendar-agenda__pane"},[we()])}function we(){const e=v["day-container"];return vue.h("div",{class:"q-calendar-agenda__day-container"},[!0===h.value&&!0!==m.noHeader&&de(),vue.h("div",{style:{display:"flex",flexDirection:"row",height:"100%"}},[..._e()||[]].flat()),e&&e({scope:{days:_.value}})])}function _e(){const e=parseInt(String(m.columnCount),10),a=parseInt(String(m.columnIndexStart),10);return(1===_.value.length&&e>0?[!0===S.value?m.leftColumnOptions.map((e,t)=>R(e,t)):[],...Array.apply(null,new Array(e)).map((e,t)=>t+a).map(e=>be(_.value[0],0,e)),!0===O.value?m.rightColumnOptions.map((e,t)=>R(e,t)):[]]:[!0===S.value?m.leftColumnOptions.map((e,t)=>R(e,t)):[],..._.value.map((e,t)=>be(e,t,0)),!0===O.value?m.rightColumnOptions.map((e,t)=>R(e,t)):[]]).flat()}function R(e,t){const a=v.column,n={column:e,days:_.value,index:t},r=!0===h.value?m.cellWidth:A.value,o=!0===m.focusable&&m.focusType.includes("day"),u=void 0!==m.columnOptionsId?e[m.columnOptionsId]:void 0;return vue.h("div",{key:u,tabindex:!0===o?0:-1,class:{"q-calendar-agenda__day":!0,"q-column-day":!0,"q-calendar__hoverable":!0===m.hoverable,"q-calendar__focusable":!0===o},style:{maxWidth:r,width:r},onDragenter:e=>{void 0!==m.dragEnterFunc&&"function"===typeof m.dragEnterFunc&&(!0===m.dragEnterFunc(e,"column",{scope:n})?g.value=u:g.value="")},onDragover:e=>{void 0!==m.dragOverFunc&&"function"===typeof m.dragOverFunc&&(!0===m.dragOverFunc(e,"column",{scope:n})?g.value=u:g.value="")},onDragleave:e=>{void 0!==m.dragLeaveFunc&&"function"===typeof m.dragLeaveFunc&&(!0===m.dragLeaveFunc(e,"column",{scope:n})?g.value=u:g.value="")},onDrop:e=>{void 0!==m.dropFunc&&"function"===typeof m.dropFunc&&(!0===m.dropFunc(e,"column",{scope:n})?g.value=u:g.value="")},...N("-column",e=>{return{scope:n,event:e}})},[a&&a({scope:n})])}function be(e,t,a){const n=parseInt(String(m.dayHeight),10),r=parseInt(String(m.dayMinHeight),10),o=v.day,u=b(e,a),i=!0===h.value?m.cellWidth:A.value,d={width:i,maxWidth:i};return!0===h.value&&(d.minWidth=i),d.height=n>0?convertToUnit(n):"auto",r>0&&(d.minHeight=convertToUnit(r)),vue.h("div",{key:e.date+(void 0!==a?":"+a:""),class:{"q-calendar-agenda__day":!0,...D(e)},style:d},[o&&o({scope:u})])}function Ie(){const{start:e,end:t,maxDays:a}=j.value,n=(d.value===e.date&&s.value===t.date&&l.value===a||(d.value=e.date,s.value=t.date,l.value=a),f.width>0),r=vue.withDirectives(vue.h("div",{class:"q-calendar-agenda",key:d.value},[!0===n&&!0!==h.value&&!0!==m.noHeader&&de(),!0===n&&Te()]),[[ResizeObserverDirective,ue]]);if(!0!==m.animated)return r;{const o="q-calendar--"+("prev"===u.value?m.transitionPrev:m.transitionNext);return vue.h(vue.Transition,{name:o,appear:!0},()=>r)}}return vue.watch([_],ee,{deep:!0,immediate:!0}),vue.watch(()=>m.modelValue,(e,t)=>{if(c.value!==e){if(!0===m.animated){const a=getDayIdentifier(parsed(e)),n=getDayIdentifier(parsed(t));u.value=a>=n?"next":"prev"}c.value=e}p.value=e}),vue.watch(c,(e,t)=>{if(c.value!==m.modelValue){if(!0===m.animated){const a=getDayIdentifier(parsed(e)),n=getDayIdentifier(parsed(t));u.value=a>=n?"next":"prev"}i("update:model-value",e)}}),vue.watch(p,e=>{e&&(a.value=parseTimestamp(e))}),vue.watch(a,()=>{p.value&&y.value[p.value]?y.value[p.value].focus():ae()}),vue.watch(()=>m.maxDays,e=>{l.value=e}),vue.onBeforeUpdate(()=>{y.value={}}),vue.onMounted(()=>{}),H({prev:oe,next:re,move:I,moveToToday:ne,updateCurrent:P}),()=>G()}});const version="4.1.1";var Plugin={version:version,QCalendarAgenda:QCalendarAgenda,...Timestamp$1,...helpers$1,install(e){e.component(String(QCalendarAgenda.name),QCalendarAgenda)}};module.exports=Plugin; |
/*! | ||
* @quasar/quasar-ui-qcalendar v4.1.0 | ||
* @quasar/quasar-ui-qcalendar v4.1.1 | ||
* (c) 2025 Jeff Galbraith <jeff@quasar.dev> | ||
* Released under the MIT License. | ||
*/ | ||
import{reactive,ref,computed,withDirectives,h,watch,getCurrentInstance,onBeforeUnmount,defineComponent,onBeforeUpdate,onMounted,Transition,nextTick}from"vue";const PARSE_DATETIME=/^(\d{4})-(\d{1,2})(-(\d{1,2}))?([^\d]+(\d{1,2}))?(:(\d{1,2}))?(:(\d{1,2}))?(.(\d{1,3}))?$/,PARSE_DATE=/^(\d{4})-(\d{1,2})(-(\d{1,2}))?/,PARSE_TIME=/(\d\d?)(:(\d\d?)|)(:(\d\d?)|)/,DAYS_IN_MONTH=[0,31,28,31,30,31,30,31,31,30,31,30,31],DAYS_IN_MONTH_LEAP=[0,31,29,31,30,31,30,31,31,30,31,30,31],TIME_CONSTANTS={MILLISECONDS_IN:{SECOND:1e3,MINUTE:6e4,HOUR:36e5,DAY:864e5,WEEK:6048e5},SECONDS_IN:{MINUTE:60,HOUR:3600,DAY:86400,WEEK:604800},MINUTES_IN:{MINUTE:1,HOUR:60,DAY:1440,WEEK:10080},HOURS_IN:{DAY:24,WEEK:168},DAYS_IN:{WEEK:7}},DAYS_IN_MONTH_MIN=28,DAYS_IN_MONTH_MAX=31,MONTH_MAX=12,MONTH_MIN=1,DAY_MIN=1,FIRST_HOUR=0;function validateTimestamp(e){return"string"===typeof e&&PARSE_DATETIME.test(e)}function parsed(e){if("string"!==typeof e)return null;const t=PARSE_DATETIME.exec(e);if(!t||!t[1]||!t[2])return null;const a=parseInt(t[1],10),n=parseInt(t[2],10),r=parseInt(t[4]||"1",10),o=parseInt(t[6]||"0",10),i=parseInt(t[8]||"0",10);return{date:e,time:o.toString().padStart(2,"0")+":"+i.toString().padStart(2,"0"),year:a,month:n,day:r,hour:o,minute:i,hasDay:!!t[4],hasTime:!0,past:!1,current:!1,future:!1,disabled:!1,weekday:0,doy:0,workweek:0}}function parseDate(e,t=!1){if(!(e instanceof Date))return null;const a=t?"UTC":"";return updateFormatted({date:padNumber(e[`get${a}FullYear`](),4)+"-"+padNumber(e[`get${a}Month`]()+1,2)+"-"+padNumber(e[`get${a}Date`](),2),time:padNumber(e[`get${a}Hours`]()||0,2)+":"+padNumber(e[`get${a}Minutes`]()||0,2),year:e[`get${a}FullYear`](),month:e[`get${a}Month`]()+1,day:e[`get${a}Date`](),hour:e[`get${a}Hours`](),minute:e[`get${a}Minutes`](),weekday:0,doy:0,workweek:0,hasDay:!0,hasTime:!0,past:!1,current:!1,future:!1,disabled:!1})}function padNumber(e,t){let a=String(e);while(a.length<t)a="0"+a;return a}function isLeapYear(e){return e%4===0&&e%100!==0||e%400===0}function daysInMonth(e,t){return(isLeapYear(e)?DAYS_IN_MONTH_LEAP:DAYS_IN_MONTH)[t]}function nextDay(e){const t=new Date(e.year,e.month-1,e.day+1);return updateFormatted(normalizeTimestamp({...e,year:t.getFullYear(),month:t.getMonth()+1,day:t.getDate()}))}function prevDay(e){const t=new Date(e.year,e.month-1,e.day-1);return updateFormatted(normalizeTimestamp({...e,year:t.getFullYear(),month:t.getMonth()+1,day:t.getDate()}))}function today(){const e=new Date,t=e.getMonth()+1,a=e.getDate(),n=e.getFullYear();return[n,padNumber(t,2),padNumber(a,2)].join("-")}function isToday(e){return e===today()}function getStartOfWeek(e,t,a){let n=copyTimestamp(e);if(t){if(1===n.day||0===n.weekday)while(!t.includes(Number(n.weekday)))n=nextDay(n);n=findWeekday(n,t[0],prevDay),n=updateFormatted(n),a&&(n=updateRelative(n,a,n.hasTime))}return n}function getEndOfWeek(e,t,a){let n=copyTimestamp(e);if(t&&Array.isArray(t)){const r=daysInMonth(n.year,n.month);if(r===n.day||n.weekday===t[t.length-1])while(!t.includes(Number(n.weekday)))n=prevDay(n);n=findWeekday(n,t[t.length-1],nextDay),n=updateFormatted(n),a&&(n=updateRelative(n,a,n.hasTime))}return n}function getStartOfMonth(e){let t=copyTimestamp(e);return t.day=DAY_MIN,t=updateFormatted(t),t}function getEndOfMonth(e){let t=copyTimestamp(e);return t.day=daysInMonth(t.year,t.month),t=updateFormatted(t),t}function parseTime(e){const t=Object.prototype.toString.call(e);switch(t){case"[object Number]":return e;case"[object String]":{const a=PARSE_TIME.exec(e);return a?60*parseInt(a[1],10)+parseInt(a[3]||"0",10):!1}case"[object Object]":return"object"!==typeof e||"number"!==typeof e.hour||"number"!==typeof e.minute?!1:"object"===typeof e&&"hour"in e&&"minute"in e&&60*e.hour+e.minute}return!1}function compareTimestamps(e,t){return!(!e||!t)&&e.year===t.year&&e.month===t.month&&e.day===t.day&&e.hour===t.hour&&e.minute===t.minute}function compareDate(e,t){return getDate(e)===getDate(t)}function compareTime(e,t){return getTime(e)===getTime(t)}function compareDateTime(e,t){return getDateTime(e)===getDateTime(t)}function parseTimestamp(e,t=null){let a=parsed(e);return a?(a=updateFormatted(a),t&&(a=updateRelative(a,t,a.hasTime)),a):null}function getDayIdentifier(e){return 1e8*(e.year??0)+1e6*(e.month??0)+1e4*(e.day??0)}function getTimeIdentifier(e){return 100*(e.hour??0)+(e.minute??0)}function getDayTimeIdentifier(e){return getDayIdentifier(e)+getTimeIdentifier(e)}function diffTimestamp(e,t,a=!1){const n=Date.UTC(e.year??0,(e.month??1)-1,e.day??1,e.hour??0,e.minute??0),r=Date.UTC(t.year??0,(t.month??1)-1,t.day??1,t.hour??0,t.minute??0);return!0===a&&r<n?0:r-n}function updateRelative(e,t,a=!1){let n=copyTimestamp(e),r=getDayIdentifier(t),o=getDayIdentifier(n),i=r===o;return n.hasTime&&a&&i&&(r=getTimeIdentifier(t),o=getTimeIdentifier(n),i=r===o),n.past=o<r,n.current=i,n.future=o>r,n.currentWeekday=n.weekday===t.weekday,n}function updateMinutes(e,t,a=null){let n=copyTimestamp(e);return n.hasTime=!0,n.hour=Math.floor(t/TIME_CONSTANTS.MINUTES_IN.HOUR),n.minute=t%TIME_CONSTANTS.MINUTES_IN.HOUR,n.time=getTime(n),a&&(n=updateRelative(n,a,!0)),n}function updateWeekday(e){let t=copyTimestamp(e);return t.weekday=getWeekday(t),t}function updateDayOfYear(e){let t=copyTimestamp(e);return t.doy=getDayOfYear(t)||0,t}function updateWorkWeek(e){let t=copyTimestamp(e);return t.workweek=getWorkWeek(t),t}function updateDisabled(e,t,a,n,r){let o=copyTimestamp(e);const i=getDayIdentifier(o);if(void 0!==t){const l=parsed(t);if(l){const c=getDayIdentifier(l);i<=c&&(o.disabled=!0)}}if(!0!==o.disabled&&void 0!==a){const m=parsed(a);if(m){const p=getDayIdentifier(m);i>=p&&(o.disabled=!0)}}if(!0!==o.disabled&&Array.isArray(n)&&n.length>0)for(var d in n)if(n[d]===o.weekday){o.disabled=!0;break}if(!0!==o.disabled&&Array.isArray(r)&&r.length>0)for(var u in r)if(Array.isArray(r[u])&&2===r[u].length&&r[u][0]&&r[u][1]){const y=parsed(r[u][0]),v=parsed(r[u][1]);if(y&&v&&isBetweenDates(o,y,v)){o.disabled=!0;break}}else{const f=r[u];if(Array.isArray(f))for(var s of f){const g=parseTimestamp(s);if(g){const h=getDayIdentifier(g);if(h===i){o.disabled=!0;break}}}else if(f){const T=parseTimestamp(f);if(T){const D=getDayIdentifier(T);D===i&&(o.disabled=!0)}}}return o}function updateFormatted(e){let t=copyTimestamp(e);return t.hasTime=!0,t.time=getTime(t),t.date=getDate(t),t.weekday=getWeekday(t),t.doy=getDayOfYear(t)||0,t.workweek=getWorkWeek(t),t}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){let t=copyTimestamp(e);if(0===t.year){const r=parseTimestamp(today());r&&(t=r)}const a=new Date(Date.UTC(t.year,t.month-1,t.day)),n=4;a.setUTCDate(a.getUTCDate()-(a.getUTCDay()+6)%7+n),a.setUTCDate(a.getUTCDate()+n-(a.getUTCDay()||7));e=new Date(Date.UTC(a.getUTCFullYear(),0,1)),e=Math.ceil(((a.valueOf()-e.valueOf())/864e5+1)/7);return e}function getWeekday(e){let t=e.weekday;if(e.hasDay){const a=Math.floor,n=e.day,r=(e.month+9)%MONTH_MAX+1,o=a(e.year/100),i=e.year%100-(e.month<=2?1:0);t=((n+a(2.6*r-.2)-2*o+i+a(i/4)+a(o/4))%7+7)%7}return t??0}function copyTimestamp(e){return{...e}}function getDate(e){let 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):"00:00")}function moveRelativeDays(e,t=nextDay,a=1,n=[0,1,2,3,4,5,6]){const r=copyTimestamp(e);return relativeDays(r,t,a,n)}function relativeDays(e,t=nextDay,a=1,n=[0,1,2,3,4,5,6]){let r=copyTimestamp(e);n.includes(Number(r.weekday))||0!==r.weekday||t!==nextDay||++a;while(--a>=0)r=t(r),n.length<7&&!n.includes(Number(r.weekday))&&++a;return r}function findWeekday(e,t,a=nextDay,n=6){let r=copyTimestamp(e);while(r.weekday!==t&&--n>=0)r=a(r);return r}function createDayList(e,t,a,n=[0,1,2,3,4,5,6],r=void 0,o=void 0,i=[],d=[],u=42,s=0){const l=getDayIdentifier(e),c=getDayIdentifier(t),m=[];let p=copyTimestamp(e),y=0,v=y===c;if(!(c<l))while((!v||m.length<s)&&m.length<u){if(y=getDayIdentifier(p),v=v||y>c&&m.length>=s,v)break;if(n.includes(Number(p.weekday))){let e=copyTimestamp(p);e=updateFormatted(e),e=updateRelative(e,a),e=updateDisabled(e,r,o,i,d),m.push(e)}p=relativeDays(p,nextDay)}return m}function createIntervalList(t,a,n,r,o){const i=[];for(let e=0;e<r;++e){const d=(a+e)*n,u=copyTimestamp(t);i.push(updateMinutes(u,d,o))}return i}function createNativeLocaleFormatter(n,r){const e=()=>"";return"undefined"===typeof Intl||"undefined"===typeof Intl.DateTimeFormat?e:(t,e)=>{try{const a=new Intl.DateTimeFormat(n||void 0,r(t,e));return a.format(makeDateTime(t))}catch(e){return console.error(`Intl.DateTimeFormat: ${e.message} -> `+getDateTime(t)),""}}}function makeDate(e,t=!0){return t?new Date(Date.UTC(e.year,e.month-1,e.day,0,0)):new Date(e.year,e.month-1,e.day,0,0)}function makeDateTime(e,t=!0){return t?new Date(Date.UTC(e.year,e.month-1,e.day,e.hour,e.minute)):new Date(e.year,e.month-1,e.day,e.hour,e.minute)}function validateNumber(e){return isFinite(Number(e))}function maxTimestamp(e,t=!1){const a=!0===t?getDayTimeIdentifier:getDayIdentifier;return e.reduce((e,t)=>{return Math.max(a(e),a(t))===a(e)?e:t})}function minTimestamp(e,t=!1){const a=!0===t?getDayTimeIdentifier:getDayIdentifier;return e.reduce((e,t)=>{return Math.min(a(e),a(t))===a(e)?e:t})}function isBetweenDates(e,t,a,n=!1){const r=getDayIdentifier(e)+(!0===n?getTimeIdentifier(e):0),o=getDayIdentifier(t)+(!0===n?getTimeIdentifier(t):0),i=getDayIdentifier(a)+(!0===n?getTimeIdentifier(a):0);return r>=o&&r<=i}function isOverlappingDates(e,t,a,n){const r=getDayIdentifier(e),o=getDayIdentifier(t),i=getDayIdentifier(a),d=getDayIdentifier(n);return r>=i&&r<=d||o>=i&&o<=d||i>=r&&o>=d}function addToDate(e,t){const a=copyTimestamp(e);return t.year&&(a.year+=t.year),t.month&&(a.month+=t.month),t.day&&(a.day+=t.day),t.hour&&(a.hour+=t.hour),t.minute&&(a.minute+=t.minute),updateFormatted(normalizeTimestamp(a))}function normalizeTimestamp(e){const t=new Date(e.year,e.month-1,e.day,e.hour,e.minute);return{...e,year:t.getFullYear(),month:t.getMonth()+1,day:t.getDate(),hour:t.getHours(),minute:t.getMinutes()}}function daysBetween(e,t){const a=diffTimestamp(e,t,!0);return Math.floor(a/TIME_CONSTANTS.MILLISECONDS_IN.DAY)}function weeksBetween(e,t){let a=copyTimestamp(e),n=copyTimestamp(t);return a=findWeekday(a,0),n=findWeekday(n,6),Math.ceil(daysBetween(a,n)/TIME_CONSTANTS.DAYS_IN.WEEK)}const weekdayDateMap={Sun:new Date("2020-01-05T00:00:00.000Z"),Mon:new Date("2020-01-06T00:00:00.000Z"),Tue:new Date("2020-01-07T00:00:00.000Z"),Wed:new Date("2020-01-08T00:00:00.000Z"),Thu:new Date("2020-01-09T00:00:00.000Z"),Fri:new Date("2020-01-10T00:00:00.000Z"),Sat:new Date("2020-01-11T00:00:00.000Z")};function getWeekdayFormatter(){const e=()=>"",r={long:{timeZone:"UTC",weekday:"long"},short:{timeZone:"UTC",weekday:"short"},narrow:{timeZone:"UTC",weekday:"narrow"}};return"undefined"===typeof Intl||"undefined"===typeof Intl.DateTimeFormat?e:t;function t(t,e,a){try{const n=new Intl.DateTimeFormat(a||void 0,r[e]||r["long"]);return n.format(weekdayDateMap[t])}catch(e){return e instanceof Error&&console.error(`Intl.DateTimeFormat: ${e.message} -> day of week: `+t),""}}}function getWeekdayNames(t,a){const e=Object.keys(weekdayDateMap),n=getWeekdayFormatter();return e.map(e=>String(n(e,t,a)))}function getMonthFormatter(){const e=()=>"",o={long:{timeZone:"UTC",month:"long"},short:{timeZone:"UTC",month:"short"},narrow:{timeZone:"UTC",month:"narrow"}};return"undefined"===typeof Intl||"undefined"===typeof Intl.DateTimeFormat?e:t;function t(t,e,a){try{const n=new Intl.DateTimeFormat(a||void 0,o[e]||o["long"]),r=new Date;return r.setDate(1),r.setMonth(t),n.format(r)}catch(e){return e instanceof Error&&console.error(`Intl.DateTimeFormat: ${e.message} -> month: `+t),""}}}function getMonthNames(t,a){const n=getMonthFormatter();return[...Array(12).keys()].map(e=>n(e,t,a))}var Timestamp={PARSE_DATETIME:PARSE_DATETIME,PARSE_DATE:PARSE_DATE,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,TIME_CONSTANTS:TIME_CONSTANTS,FIRST_HOUR:FIRST_HOUR,today:today,getStartOfWeek:getStartOfWeek,getEndOfWeek:getEndOfWeek,getStartOfMonth:getStartOfMonth,getEndOfMonth:getEndOfMonth,parseTime:parseTime,validateTimestamp:validateTimestamp,parsed:parsed,parseTimestamp:parseTimestamp,parseDate:parseDate,getDayIdentifier:getDayIdentifier,getTimeIdentifier:getTimeIdentifier,getDayTimeIdentifier:getDayTimeIdentifier,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,createDayList:createDayList,createIntervalList:createIntervalList,createNativeLocaleFormatter:createNativeLocaleFormatter,makeDate:makeDate,makeDateTime:makeDateTime,validateNumber:validateNumber,isBetweenDates:isBetweenDates,isOverlappingDates:isOverlappingDates,daysBetween:daysBetween,weeksBetween:weeksBetween,addToDate:addToDate,compareTimestamps:compareTimestamps,compareDate:compareDate,compareTime:compareTime,compareDateTime:compareDateTime,getWeekdayFormatter:getWeekdayFormatter,getWeekdayNames:getWeekdayNames,getMonthFormatter:getMonthFormatter,getMonthNames:getMonthNames},Timestamp$1=Object.freeze({__proto__:null,DAYS_IN_MONTH:DAYS_IN_MONTH,DAYS_IN_MONTH_LEAP:DAYS_IN_MONTH_LEAP,DAYS_IN_MONTH_MAX:DAYS_IN_MONTH_MAX,DAYS_IN_MONTH_MIN:DAYS_IN_MONTH_MIN,DAY_MIN:DAY_MIN,FIRST_HOUR:FIRST_HOUR,MONTH_MAX:MONTH_MAX,MONTH_MIN:MONTH_MIN,PARSE_DATE:PARSE_DATE,PARSE_DATETIME:PARSE_DATETIME,PARSE_TIME:PARSE_TIME,TIME_CONSTANTS:TIME_CONSTANTS,addToDate:addToDate,compareDate:compareDate,compareDateTime:compareDateTime,compareTime:compareTime,compareTimestamps:compareTimestamps,copyTimestamp:copyTimestamp,createDayList:createDayList,createIntervalList:createIntervalList,createNativeLocaleFormatter:createNativeLocaleFormatter,daysBetween:daysBetween,daysInMonth:daysInMonth,default:Timestamp,diffTimestamp:diffTimestamp,findWeekday:findWeekday,getDate:getDate,getDateTime:getDateTime,getDayIdentifier:getDayIdentifier,getDayOfYear:getDayOfYear,getDayTimeIdentifier:getDayTimeIdentifier,getEndOfMonth:getEndOfMonth,getEndOfWeek:getEndOfWeek,getMonthFormatter:getMonthFormatter,getMonthNames:getMonthNames,getStartOfMonth:getStartOfMonth,getStartOfWeek:getStartOfWeek,getTime:getTime,getTimeIdentifier:getTimeIdentifier,getWeekday:getWeekday,getWeekdayFormatter:getWeekdayFormatter,getWeekdayNames:getWeekdayNames,getWorkWeek:getWorkWeek,isBetweenDates:isBetweenDates,isLeapYear:isLeapYear,isOverlappingDates:isOverlappingDates,isToday:isToday,makeDate:makeDate,makeDateTime:makeDateTime,maxTimestamp:maxTimestamp,minTimestamp:minTimestamp,moveRelativeDays:moveRelativeDays,nextDay:nextDay,padNumber:padNumber,parseDate:parseDate,parseTime:parseTime,parseTimestamp:parseTimestamp,parsed:parsed,prevDay:prevDay,relativeDays:relativeDays,today:today,updateDayOfYear:updateDayOfYear,updateDisabled:updateDisabled,updateFormatted:updateFormatted,updateMinutes:updateMinutes,updateRelative:updateRelative,updateWeekday:updateWeekday,updateWorkWeek:updateWorkWeek,validateNumber:validateNumber,validateTimestamp:validateTimestamp,weeksBetween:weeksBetween});function convertToUnit(e,t="px"){if(e)return isNaN(e)?String(e):"auto"===e?e:""+Number(e)+t}function indexOf(t,a){for(let e=0;e<t.length;e++)if(!0===a(t[e],e))return e;return-1}function minCharWidth(e,t){return 0===t?e:e.slice(0,t)}var helpers={convertToUnit:convertToUnit,indexOf:indexOf,minCharWidth:minCharWidth},helpers$1=Object.freeze({__proto__:null,convertToUnit:convertToUnit,default:helpers,indexOf:indexOf,minCharWidth:minCharWidth});const ResizeObserverDirective={mounted(e,t){if("function"===typeof t.value){const a=t.value,n={callback:a,size:{width:0,height:0},observer:new ResizeObserver(e=>{const t=e[0].contentRect;t.width===n.size.width&&t.height===n.size.height||(n.size.width=t.width,n.size.height=t.height,n.debounceTimeout&&clearTimeout(n.debounceTimeout),n.debounceTimeout=setTimeout(()=>{n.callback(n.size),n.debounceTimeout=void 0},100))})};n.observer.observe(e),e.__onResizeObserver=n}},beforeUnmount(e){if(e.__onResizeObserver){const{observer:t,debounceTimeout:a}=e.__onResizeObserver;a&&clearTimeout(a),t.unobserve(e),delete e.__onResizeObserver}}};function useCalendar(t,a,{scrollArea:e,pane:n}){if(!a){const l="[error: renderCalendar] no renderFunc has been supplied to useCalendar";throw console.error(l),new Error(l)}const r=reactive({width:0,height:0}),o=ref(null);function i({width:e,height:t}){r.width=e,r.height=t}const d=computed(()=>{return!0!==t.noScroll&&e.value&&n.value&&r.height?e.value.offsetWidth-n.value.offsetWidth:0});function u(){}function s(){const e={ref:o,role:"complementary",lang:t.locale,class:`q-calendar ${t.dark?"q-calendar--dark":""} `+(t.bordered?"q-calendar__bordered":"")};return withDirectives(h("div",{...e},[a()]),[[ResizeObserverDirective,i]])}return{rootRef:o,scrollWidth:d,__initCalendar:u,__renderCalendar:s}}const isValidFocusType=e=>e.every(e=>["day","date","weekday","interval","time","resource","task"].includes(e)),useCommonProps={modelValue:{type:String,default:today(),validator:e=>""===e||validateTimestamp(e)},weekdays:{type:Array,default:()=>[0,1,2,3,4,5,6]},dateType:{type:String,default:"round",validator:e=>["round","rounded","square"].includes(e)},weekdayAlign:{type:String,default:"center",validator:e=>["left","center","right"].includes(e)},dateAlign:{type:String,default:"center",validator:e=>["left","center","right"].includes(e)},bordered:Boolean,dark:Boolean,noAria:Boolean,noActiveDate:Boolean,noHeader:Boolean,noScroll:Boolean,shortWeekdayLabel:Boolean,noDefaultHeaderText:Boolean,noDefaultHeaderBtn:Boolean,minWeekdayLabel:{type:[Number,String],default:1},weekdayBreakpoints:{type:Array,default:()=>[75,35],validator:e=>2===e.length},locale:{type:String,default:"en-US"},animated:Boolean,transitionPrev:{type:String,default:"slide-right"},transitionNext:{type:String,default:"slide-left"},disabledDays:Array,disabledBefore:String,disabledAfter:String,disabledWeekdays:{type:Array,default:()=>[]},dragEnterFunc:Function,dragOverFunc:Function,dragLeaveFunc:Function,dropFunc:Function,selectedDates:{type:[Array,Set],default:()=>[]},selectedStartEndDates:{type:Array,default:()=>[]},hoverable:Boolean,focusable:Boolean,focusType:{type:Array,default:()=>["date"],validator:isValidFocusType}};function useCommon(t,{startDate:e,endDate:a,times:n}){const r=computed(()=>parseTimestamp(e.value)),o=computed(()=>{return"0000-00-00"===a.value?getEndOfWeek(r.value,t.weekdays,n.today):parseTimestamp(a.value)||r.value}),i=computed(()=>createNativeLocaleFormatter(t.locale,()=>({timeZone:"UTC",day:"numeric"}))),d=computed(()=>createNativeLocaleFormatter(t.locale,(e,t)=>({timeZone:"UTC",weekday:t?"short":"long"}))),u=computed(()=>createNativeLocaleFormatter(t.locale,()=>({timeZone:"UTC",dateStyle:"full"})));function s(e,t){return e&&e.length>0&&e.includes(t.date)}function l(e,t){const a={firstDay:!1,betweenDays:!1,lastDay:!1};if(2===e.length){const n=getDayIdentifier(t),r=getDayIdentifier(parsed(e[0])),o=getDayIdentifier(parsed(e[1]));a.firstDay=r===n,a.lastDay=o===n,a.betweenDays=r<n&&o>n}return a}function c(e,t=!1,a=[],n=[],r=!1){const o=s(a,e),{firstDay:i,lastDay:d,betweenDays:u}=l(n,e);return{"q-past-day":!i&&!u&&!d&&!o&&!t&&!!e.past,"q-future-day":!i&&!u&&!d&&!o&&!t&&!!e.future,"q-outside":t,"q-current-day":!!e.current,"q-selected":o,"q-range-first":i,"q-range":u,"q-range-last":d,"q-range-hover":r&&(i||d||u),"q-disabled-day disabled":!0===e.disabled}}function m(e){return getStartOfWeek(e,t.weekdays,n.today)}function p(e){return getEndOfWeek(e,t.weekdays,n.today)}function y(){return{}}return{parsedStart:r,parsedEnd:o,dayFormatter:i,weekdayFormatter:d,ariaDateFormatter:u,arrayHasDate:s,checkDays:l,getRelativeClasses:c,startOfWeek:m,endOfWeek:p,dayStyleDefault:y}}function scrollTo(e,t){e instanceof Window?e.scrollTo({top:t,behavior:"instant"}):e.scrollTop=t}function getVerticalScrollPosition(e){return e instanceof Window?e.scrollY:e.scrollTop}function animVerticalScrollTo(o,i,d=500,u=performance.now(),s=getVerticalScrollPosition(o)){d<=0||s===i?scrollTo(o,i):requestAnimationFrame(e=>{const t=e-u,a=Math.min(t/d,1),n=e=>e<.5?2*e*e:(4-2*e)*e-1,r=s+(i-s)*n(a);scrollTo(o,r),a<1&&animVerticalScrollTo(o,i,d,u,s)})}function animHorizontalScrollTo(r,e,o=500){const i=r.scrollLeft,d=e-i;let u=null;function s(e){null===u&&(u=e);const t=e-u,a=Math.min(t/o,1),n=e=>e<.5?2*e*e:(4-2*e)*e-1;r.scrollLeft=i+d*n(a),t<o&&requestAnimationFrame(s)}requestAnimationFrame(s)}const useAgendaProps={view:{type:String,validator:e=>["day","week","month","month-interval"].includes(e),default:"day"},leftColumnOptions:{type:Array},rightColumnOptions:{type:Array},columnOptionsId:{type:String},columnOptionsLabel:{type:String},weekdayStyle:{type:Function,default:null},weekdayClass:{type:Function,default:null},dayStyle:{type:Function,default:null},dayClass:{type:Function,default:null},dateHeader:{type:String,default:"stacked",validator:e=>["stacked","inline","inverted"].includes(e)},dayHeight:{type:[Number,String],default:0,validator:validateNumber},dayMinHeight:{type:[Number,String],default:40,validator:validateNumber}};function useInterval(o,{times:t,scrollArea:n,parsedStart:e,parsedEnd:a,maxDays:r,size:i,headerColumnRef:d}){const u=computed(()=>parseInt(String(o.intervalStart),10)),m=computed(()=>parseInt(String(o.intervalMinutes),10)),s=computed(()=>parseInt(String(o.intervalCount),10)),p=computed(()=>parseFloat(String(o.intervalHeight))),y=computed(()=>{let e=0;const t=Number(o.columnCount);return o.cellWidth?e=Number(o.cellWidth):i.width>0&&d.value&&(e=d.value.offsetWidth/(t>1?t:r.value)),e}),l=computed(()=>u.value*m.value),c=computed(()=>s.value*p.value),v=computed(()=>s.value*y.value),f=computed(()=>D(e.value)),g=computed(()=>k(a.value)),h=computed(()=>{return createDayList(e.value,a.value,t.today,o.weekdays,o.disabledBefore,o.disabledAfter,o.disabledWeekdays,o.disabledDays,r.value)}),T=computed(()=>{return h.value.map(e=>createIntervalList(e,u.value,m.value,s.value,t.now))});function D(e){return getStartOfWeek(e,o.weekdays,t.today)}function k(e){return getEndOfWeek(e,o.weekdays,t.today)}function w(e,t){return e&&e.length>0&&e.includes(getDateTime(t))}function _(e,t){const a={firstDay:!1,betweenDays:!1,lastDay:!1};if(e&&2===e.length){const n=getDayTimeIdentifier(t),r=getDayTimeIdentifier(parsed(e[0])),o=getDayTimeIdentifier(parsed(e[1]));a.firstDay=r===n,a.lastDay=o===n,a.betweenDays=r<n&&o>n}return a}function I(e,t=[],a=[]){const n=w(t,e),{firstDay:r,lastDay:o,betweenDays:i}=_(a,e);return{"q-selected":n,"q-range-first":!0===r,"q-range":!0===i,"q-range-last":!0===o,"q-disabled-interval disabled":!0===e.disabled}}function N(e,t,a){return[]}const b=computed(()=>{const a={timeZone:"UTC",hour12:!o.hour24Format,hour:"2-digit",minute:"2-digit"},n={timeZone:"UTC",hour12:!o.hour24Format,hour:"numeric",minute:"2-digit"},r={timeZone:"UTC",hour12:!o.hour24Format,hour:"numeric"};return createNativeLocaleFormatter(o.locale,(e,t)=>t?0===e.minute?r:n:a)}),M=computed(()=>{const e={timeZone:"UTC",dateStyle:"full",timeStyle:"short"};return createNativeLocaleFormatter(o.locale,()=>e)});function S(e){const t=T.value[0][0],a=t.hour===e.hour&&t.minute===e.minute;return!a&&0===e.minute}function O(e){}function A(e){return{}}function E(e,t,a=!1,n){let r=copyTimestamp(t);if(e.currentTarget){const o=e.currentTarget.getBoundingClientRect(),i=e,d=e,u=i.changedTouches||i.touches,s=(u&&u[0]?u[0]:d).clientY,l=(s-o.top)/p.value,c=Math.floor((a?Math.floor(l):l)*m.value);0!==c&&(r=addToDate(r,{minute:c})),n&&(r=updateRelative(r,n,!0))}return r}function H(e,t,a=!1,n){let r=copyTimestamp(t);const o=e.currentTarget.getBoundingClientRect(),i=e,d=e,u=i.changedTouches||i.touches,s=(u&&u[0]?u[0]:d).clientY,l=(s-o.top)/p.value,c=Math.floor((a?Math.floor(l):l)*m.value);return 0!==c&&(r=addToDate(r,{minute:c})),n&&(r=updateRelative(r,n,!0)),r}function x(e,t,a=!1,n){let r=copyTimestamp(t);if(e.currentTarget){const o=e.currentTarget.getBoundingClientRect(),i=e,d=e,u=i.changedTouches||i.touches,s=(u&&u[0]?u[0]:d).clientX,l=(s-o.left)/y.value,c=Math.floor((a?Math.floor(l):l)*m.value);0!==c&&(r=addToDate(r,{minute:c})),n&&(r=updateRelative(r,n,!0))}return r}function L(e,t){const a={timestamp:e,timeStartPos:F,timeDurationHeight:W};return void 0!==t&&(a.columnIndex=t),a}function Y(e,t){const a={timestamp:copyTimestamp(e),timeStartPosX:R,timeDurationWidth:C};return void 0!==t&&(a.index=t),a}function q(e,t=0){const a=F(e);return!(!1===a||!n.value)&&(animVerticalScrollTo(n.value,a,t),!0)}function U(e,t=0){const a=R(e);return!(!1===a||!n.value)&&(animHorizontalScrollTo(n.value,a,t),!0)}function W(e){return e/m.value*p.value}function C(e){return e/m.value*y.value}function B(e){return e*m.value/p.value}function P(e){return e*m.value/y.value}function F(e,t=!0){const a=parseTime(e);if(!1===a)return!1;const n=l.value,r=s.value*m.value,o=(a-n)/r;let i=o*c.value;return t&&(i<0&&(i=0),i>c.value)&&(i=c.value),i}function R(e,t=!0){const a=parseTime(e);if(!1===a)return!1;const n=l.value,r=s.value*m.value,o=(a-n)/r;let i=o*v.value;return t&&(i<0&&(i=0),i>v.value)&&(i=v.value),i}return{parsedIntervalStart:u,parsedIntervalMinutes:m,parsedIntervalCount:s,parsedIntervalHeight:p,parsedCellWidth:y,parsedStartMinute:l,bodyHeight:c,bodyWidth:v,parsedWeekStart:f,parsedWeekEnd:g,days:h,intervals:T,intervalFormatter:b,ariaDateTimeFormatter:M,arrayHasDateTime:w,checkIntervals:_,getIntervalClasses:I,getResourceClasses:N,showIntervalLabelDefault:S,showResourceLabelDefault:O,styleDefault:A,getTimestampAtEventInterval:E,getTimestampAtEvent:H,getTimestampAtEventX:x,getScopeForSlot:L,getScopeForSlotX:Y,scrollToTime:q,scrollToTimeX:U,timeDurationHeight:W,timeDurationWidth:C,heightToMinutes:B,widthToMinutes:P,timeStartPos:F,timeStartPosX:R}}const useColumnProps={columnCount:{type:[Number,String],default:0,validator:validateNumber},columnIndexStart:{type:[Number,String],default:0,validator:validateNumber}},useMaxDaysProps={maxDays:{type:Number,default:1}},useTimesProps={now:{type:String,validator:e=>""===e||validateTimestamp(e),default:""}};function useTimes(e){const t=reactive({now:parseTimestamp("0000-00-00 00:00"),today:parseTimestamp("0000-00-00")}),a=computed(()=>e.now?parseTimestamp(e.now):o());function n(){t.now&&t.today&&(t.now.current=t.today.current=!0,t.now.past=t.today.past=!1,t.now.future=t.today.future=!1)}function r(){const e=a.value||o();i(e,t.now),d(e,t.now),i(e,t.today)}function o(){return parseDate(new Date)}function i(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)}function d(e,t){e.time!==t.time&&(t.hour=e.hour,t.minute=e.minute,t.time=e.time)}return watch(a,()=>r()),{times:t,parsedNow:a,setCurrent:n,updateCurrent:r,getNow:o,updateDay:i,updateTime:d}}function useRenderValues(r,{parsedView:o,parsedValue:i,times:d}){const e=computed(()=>{const e=i.value;let t=r.maxDays,a=e,n=e;switch(o.value){case"month":a=getStartOfMonth(e),n=getEndOfMonth(e),t=daysInMonth(a.year,a.month);break;case"week":case"week-agenda":case"week-scheduler":a=getStartOfWeek(e,r.weekdays,d.today),n=getEndOfWeek(a,r.weekdays,d.today),t=r.weekdays.length;break;case"day":case"scheduler":case"agenda":n=moveRelativeDays(copyTimestamp(n),nextDay,t>1?t-1:t,r.weekdays),n=updateFormatted(n);break;case"month-interval":case"month-scheduler":case"month-agenda":a=getStartOfMonth(e),n=getEndOfMonth(e),n=updateFormatted(n),t=daysInMonth(a.year,a.month);break;case"resource":t=1,n=moveRelativeDays(copyTimestamp(n),nextDay,t,r.weekdays),n=updateFormatted(n);break}return{start:a,end:n,maxDays:t}});return{renderValues:e}}const toCamelCase=e=>e.replace(/(-\w)/g,e=>e[1].toUpperCase());function getMouseEventHandlers(t,e,a,n){const r={};for(const o in a){const i=a[o],d=toCamelCase("on-"+o);if(!e.value)return console.warn("$listeners has not been set up"),{};if(void 0!==e.value[d]){const u="on"+i.event.charAt(0).toUpperCase()+i.event.slice(1),s=e=>{return(void 0===i.button||"buttons"in e&&e.buttons>0&&e.button===i.button)&&(i.prevent&&e.preventDefault(),i.stop&&e.stopPropagation(),t(o,n(e,o))),i.result};u in r?Array.isArray(r[u])?r[u].push(s):r[u]=[r[u],s]:r[u]=s}}return r}function getDefaultMouseEventHandlers(e,t,a,n){return getMouseEventHandlers(e,t,getMouseEventName(a),n)}function getMouseEventName(e){return{["click"+e]:{event:"click"},["contextmenu"+e]:{event:"contextmenu",prevent:!0,result:!1},["mousedown"+e]:{event:"mousedown"},["mousemove"+e]:{event:"mousemove"},["mouseup"+e]:{event:"mouseup"},["mouseenter"+e]:{event:"mouseenter"},["mouseleave"+e]:{event:"mouseleave"},["touchstart"+e]:{event:"touchstart"},["touchmove"+e]:{event:"touchmove"},["touchend"+e]:{event:"touchend"}}}function getRawMouseEvents(e){return Object.keys(getMouseEventName(e))}function useMouseEvents(a,n){return{getMouseEventHandlers:(e,t)=>getMouseEventHandlers(a,n,e,t),getDefaultMouseEventHandlers:(e,t)=>getDefaultMouseEventHandlers(a,n,e,t),getMouseEventName:getMouseEventName,getRawMouseEvents:getRawMouseEvents}}const useMoveEmits=["moved"];function useMove(u,{parsedView:s,parsedValue:l,direction:c,maxDays:m,times:p,emittedValue:y,emit:v}){function e(a=1){if(0===a)y.value=today();else{let e=copyTimestamp(l.value);const n=getEndOfMonth(e),r=a>0,o=r?nextDay:prevDay,i=r?n.day:1;let t=r?a:-a;c.value=r?"next":"prev";const d=u.weekdays.length;while(--t>=0)switch(s.value){case"month":e.day=i,e=o(e),e=updateWeekday(e);while(!u.weekdays.includes(Number(e.weekday)))e=addToDate(e,{day:r?1:-1});break;case"week":case"week-agenda":case"week-scheduler":e=relativeDays(e,o,d,u.weekdays);break;case"day":case"scheduler":case"agenda":e=relativeDays(e,o,m.value,u.weekdays);break;case"month-interval":case"month-agenda":case"month-scheduler":e.day=i,e=o(e);break;case"resource":e=relativeDays(e,o,m.value,u.weekdays);break}e=updateWeekday(e),e=updateFormatted(e),e=updateDayOfYear(e),e=updateRelative(e,p.now),y.value=e.date,v("moved",e)}}return{move:e}}const listenerRE=/^on[A-Z]/;function useEmitListeners(e=getCurrentInstance()){return{emitListeners:computed(()=>{const t={};return e?.vnode?.props&&Object.keys(e.vnode.props).forEach(e=>{listenerRE.test(e)&&(t[e]=!0)}),t})}}function useFocusHelper(){const e={"aria-hidden":"true",class:"q-calendar__focus-helper"};return[h("span",e)]}function useButton(){function e({focusable:e,focusType:t},a,n){const r=e&&t.includes("date");return h("button",{...a,tabindex:r?0:-1},[n,r&&useFocusHelper()])}return{renderButton:e}}const useCellWidthProps={cellWidth:[Number,String]};function useCellWidth(e){const t=computed(()=>void 0!==e.cellWidth);return{isSticky:t}}const useCheckChangeEmits=["change"];function useCheckChange(n,{days:r,lastStart:o,lastEnd:i}){function e(){const e=r.value;if(0===e.length)return!1;const t=e[0].date,a=e[e.length-1].date;return(!o.value||!i.value||t!==o.value||a!==i.value)&&(o.value=t,i.value=a,n("change",{start:t,end:a,days:e}),!0)}return{checkChange:e}}function useEventUtils(){function e(e,t){return(Array.isArray(t)?t:[t]).includes(e.keyCode)}return{isKeyCode:e}}const isKeyCode=useEventUtils().isKeyCode,useNavigationProps={useNavigation:Boolean};function useNavigation(t,{rootRef:a,focusRef:n,focusValue:r,datesRef:o,parsedView:i,emittedValue:d,direction:u,times:s}){let e=!1;function l(){e||document&&(e=!0,document.addEventListener("keyup",v),document.addEventListener("keydown",y))}function c(){document&&(document.removeEventListener("keyup",v),document.removeEventListener("keydown",y),e=!1)}function m(e){if(e&&document){const t=document.activeElement;if(t!==document.body&&a.value?.contains(t))return!0}return!1}function p(){let t=0;const a=window.setInterval(()=>{const e=o.value[n.value];e&&(e.focus(),50!==++t)&&document.activeElement!==e||window.clearInterval(a)},250)}function y(e){m(e)&&isKeyCode(e,[33,34,35,36,37,38,39,40])&&(e.stopPropagation(),e.preventDefault())}function v(e){if(m(e)&&isKeyCode(e,[33,34,35,36,37,38,39,40])){const t={33:D,34:k,35:_,36:w,37:h,38:f,39:T,40:g};t[e.keyCode]?.()}}function f(){let e=copyTimestamp(r.value);if("month"===i.value){if(e=addToDate(e,{day:-7}),r.value.month!==e.month)return u.value="prev",void(d.value=e.date)}else e=addToDate(e,{minute:Number(t.intervalMinutes)});u.value="prev",n.value=e.date}function g(){let e=copyTimestamp(r.value);if("month"===i.value){if(e=addToDate(e,{day:7}),r.value.month!==e.month)return u.value="next",void(d.value=e.date)}else e=addToDate(e,{minute:Number(t.intervalMinutes)});u.value="next",n.value=e.date}function h(){let e=copyTimestamp(r.value);u.value="prev";do{e=addToDate(e,{day:-1})}while(!t.weekdays.includes(Number(e.weekday)));n.value=e.date}function T(){let e=copyTimestamp(r.value);u.value="next";do{e=addToDate(e,{day:1})}while(!t.weekdays.includes(Number(e.weekday)));n.value=e.date}function D(){let e=copyTimestamp(r.value);e="month"===i.value?addToDate(e,{month:-1}):addToDate(e,{day:-7}),u.value="prev",n.value=e.date}function k(){let e=copyTimestamp(r.value);e="month"===i.value?addToDate(e,{month:1}):addToDate(e,{day:7}),u.value="next",n.value=e.date}function w(){let e=copyTimestamp(r.value);e="month"===i.value?getStartOfMonth(e):getStartOfWeek(e,t.weekdays||[],s.today);while(!t.weekdays.includes(Number(e.weekday)))e=addToDate(e,{day:-1});n.value=e.date}function _(){let e=copyTimestamp(r.value);e="month"===i.value?getEndOfMonth(e):getEndOfWeek(e,t.weekdays||[],s.today);while(!t.weekdays.includes(Number(e.weekday)))e=addToDate(e,{day:-1});n.value=e.date}return onBeforeUnmount(()=>{c()}),watch(()=>t.useNavigation,e=>{(!0===e?l:c)()}),!0===t.useNavigation&&l(),{startNavigation:l,endNavigation:c,tryFocus:p}}const renderButton=useButton().renderButton;var QCalendarAgenda=defineComponent({name:"QCalendarAgenda",directives:{ResizeObserver:ResizeObserverDirective},props:{...useCommonProps,...useAgendaProps,...useColumnProps,...useMaxDaysProps,...useTimesProps,...useCellWidthProps,...useNavigationProps},emits:["update:model-value",...useCheckChangeEmits,...useMoveEmits,...getRawMouseEvents("-date"),...getRawMouseEvents("-head-day"),...getRawMouseEvents("-time")],setup(m,{slots:p,emit:d,expose:x}){const e=ref(null),t=ref(null),L=ref(null),y=ref(m.modelValue||today()),a=ref(parsed(m.modelValue||today())),v=ref({}),n=ref(),r=ref(),i=ref("next"),u=ref(m.modelValue||today()),s=ref("0000-00-00"),l=ref(0),c=ref(m.modelValue),f=reactive({width:0,height:0}),g=ref(""),Y=ref(null),q=ref(null),o=(watch(()=>m.view,()=>{l.value=0}),computed(()=>{return"month"===m.view?"month-interval":m.view})),U=getCurrentInstance();if(null===U)throw new Error("current instance is null");const B=useEmitListeners(U).emitListeners,T=useCellWidth(m).isSticky,{times:D,setCurrent:P,updateCurrent:V}=(watch(T,()=>{}),useTimes(m)),{parsedStart:z,parsedEnd:Z,dayFormatter:$,weekdayFormatter:X,ariaDateFormatter:K,dayStyleDefault:j,getRelativeClasses:k}=(V(),P(),useCommon(m,{startDate:u,endDate:s,times:D})),w=computed(()=>{return parseTimestamp(m.modelValue,D.now)||z.value||D.today}),Q=(a.value=w.value,y.value=w.value.date,useRenderValues(m,{parsedView:o,parsedValue:w,times:D})).renderValues,{rootRef:_,scrollWidth:G,__renderCalendar:J}=useCalendar(m,be,{scrollArea:e,pane:t}),{days:I,parsedCellWidth:ee,getScopeForSlot:N}=useInterval(m,{times:D,scrollArea:e,parsedStart:z,parsedEnd:Z,maxDays:l,size:f,headerColumnRef:L}),b=useMove(m,{parsedView:o,parsedValue:w,direction:i,maxDays:l,times:D,emittedValue:c,emit:d}).move,M=useMouseEvents(d,B).getDefaultMouseEventHandlers,te=useCheckChange(d,{days:I,lastStart:Y,lastEnd:q}).checkChange,ae=useEventUtils().isKeyCode,ne=useNavigation(m,{rootRef:_,focusRef:y,focusValue:a,datesRef:v,parsedView:o,emittedValue:c,direction:i,times:D}).tryFocus,S=computed(()=>{return I.value.length+(!0===O.value?m.leftColumnOptions.length:0)+(!0===A.value?m.rightColumnOptions.length:0)+I.value.length===1&&parseInt(String(m.columnCount),10)>0?parseInt(String(m.columnCount),10):0}),O=computed(()=>{return void 0!==m.leftColumnOptions&&Array.isArray(m.leftColumnOptions)}),A=computed(()=>{return void 0!==m.rightColumnOptions&&Array.isArray(m.rightColumnOptions)}),E=computed(()=>{if(_.value){const e=f.width||_.value.getBoundingClientRect().width;if(e&&S.value)return(e-G.value)/S.value+"px"}return 100/S.value+"%"});function re(){c.value=today()}function oe(e=1){b(e)}function ie(e=1){b(-e)}function de({width:e,height:t}){f.width=e,f.height=t}function W(e){return e.date===c.value}function C(t,a){const e=p["head-column"],n={column:t,index:a,days:I.value},r=!0===T.value?m.cellWidth:E.value,o=!0===m.focusable&&m.focusType.includes("weekday"),i=void 0!==m.columnOptionsId?t[m.columnOptionsId]:"id",d={maxWidth:r,width:r};return h("div",{key:i,tabindex:!0===o?0:-1,class:{"q-calendar-agenda__head--day":!0,"q-column-day":!0,"q-calendar__hoverable":!0===m.hoverable,"q-calendar__focusable":!0===o},style:d,onDragenter:e=>{void 0!==m.dragEnterFunc&&"function"===typeof m.dragEnterFunc&&(!0===m.dragEnterFunc(e,"head-column",{scope:n})?g.value=i:g.value="")},onDragover:e=>{void 0!==m.dragOverFunc&&"function"===typeof m.dragOverFunc&&(!0===m.dragOverFunc(e,"head-column",{scope:n})?g.value=i:g.value="")},onDragleave:e=>{void 0!==m.dragLeaveFunc&&"function"===typeof m.dragLeaveFunc&&(!0===m.dragLeaveFunc(e,"head-column",{scope:n})?g.value=i:g.value="")},onDrop:e=>{void 0!==m.dropFunc&&"function"===typeof m.dropFunc&&(!0===m.dropFunc(e,"head-column",{scope:n})?g.value=i:g.value="")},...M("-head-column",e=>{return{scope:{column:t,index:a},event:e}})},[!0!==m.noDefaultHeaderText&&ue(t),e&&e(n),useFocusHelper()])}function ue(e){const t=p["head-column-label"],a={column:e},n=void 0!==m.columnOptionsLabel?e[m.columnOptionsLabel]:e.label,r=h("div",{class:{"q-calendar-agenda__head--weekday":!0,["q-calendar__"+m.weekdayAlign]:!0,ellipsis:!0},style:{alignSelf:"center"}},[t&&t({scope:a}),!t&&h("span",{class:"ellipsis"},n)]);return"stacked"===m.dateHeader?r:h("div",{class:"q-calendar__header--inline",style:{height:"100%"}},[r])}function se(){return h("div",{roll:"presentation",class:{"q-calendar-agenda__head":!0,"q-calendar__sticky":!0===T.value},style:{marginRight:G.value+"px"}},[le()])}function le(){return h("div",{ref:L,class:{"q-calendar-agenda__head--days__column":!0}},[ce(),me()])}function ce(){return h("div",{class:{"q-calendar-agenda__head--days__weekdays":!0}},pe())}function me(){const e=p["head-days-events"];return nextTick(()=>{if(r.value&&0===m.columnCount&&window)try{const e=window.getComputedStyle(r.value);n.value&&n.value.parentElement&&(n.value.parentElement.style.height=e.height,n.value.style.height=e.height)}catch{}}),h("div",{class:{"q-calendar-agenda__head--days__event":!0}},[e&&h("div",{ref:n,style:{position:"absolute",left:0,top:0,right:0,overflow:"hidden",zIndex:1}},[e({scope:{days:I.value,ref:r}})]),...ye()])}function pe(){const e=parseInt(String(m.columnCount),10),a=parseInt(String(m.columnIndexStart),10);return(1===I.value.length&&e>0?[!0===O.value?m.leftColumnOptions.map((e,t)=>C(e,t)):[],...Array.apply(null,new Array(e)).map((e,t)=>t+a).map(e=>ve(I.value[0],e)),!0===A.value?m.rightColumnOptions.map((e,t)=>C(e,t)):[]]:[!0===O.value?m.leftColumnOptions.map((e,t)=>C(e,t)):[],...I.value.map(e=>ve(e)),!0===A.value?m.rightColumnOptions.map((e,t)=>C(e,t)):[]]).flat()}function ye(){const a=parseInt(String(m.columnCount),10);return 1===I.value.length&&a>0?[...Array.apply(null,new Array(parseInt(String(m.columnCount),10))).map((e,t)=>t+a).map(e=>ge(I.value[0],e))]:I.value.map(e=>ge(e,0))}function ve(t,e){const a=p["head-day"],n=p["head-date"],r=!0!==m.noActiveDate&&W(t),o=N(t,e??0),i=(o.activeDate=r,o.droppable=g.value===t.date,o.disabled=!!m.disabledWeekdays&&m.disabledWeekdays.includes(Number(t.weekday)),!0===T.value?m.cellWidth:E.value),d=m.weekdayStyle||j,u={width:i,maxWidth:i,...d({scope:o})},s=(!0===T.value&&(u.minWidth=i),"function"===typeof m.weekdayClass?m.weekdayClass({scope:o}):{}),l=!0===m.focusable&&m.focusType.includes("weekday"),c={key:t.date+(void 0!==e?"-"+e:""),ref:e=>{v.value[t.date]=e},tabindex:!0===l?0:-1,class:{"q-calendar-agenda__head--day":!0,...s,...k(t),"q-active-date":r,"q-calendar__hoverable":!0===m.hoverable,"q-calendar__focusable":!0===l},style:u,onDragenter:e=>{void 0!==m.dragEnterFunc&&"function"===typeof m.dragEnterFunc&&(!0===m.dragEnterFunc(e,"head-day",{scope:o})?g.value=t.date:g.value="")},onDragover:e=>{void 0!==m.dragOverFunc&&"function"===typeof m.dragOverFunc&&(!0===m.dragOverFunc(e,"head-day",{scope:o})?g.value=t.date:g.value="")},onDragleave:e=>{void 0!==m.dragLeaveFunc&&"function"===typeof m.dragLeaveFunc&&(!0===m.dragLeaveFunc(e,"head-day",{scope:o})?g.value=t.date:g.value="")},onDrop:e=>{void 0!==m.dropFunc&&"function"===typeof m.dropFunc&&(!0===m.dropFunc(e,"head-day",{scope:o})?g.value=t.date:g.value="")},onFocus:()=>{!0===l&&(y.value=t.date)},...M("-head-day",e=>{return{scope:o,event:e}})};return h("div",c,[void 0!==a&&a({scope:o}),void 0===a&&fe(t),void 0===a&&n&&n({scope:o}),useFocusHelper()])}function fe(e){return"stacked"===m.dateHeader?[!0!==m.noDefaultHeaderText&&F(e),!0!==m.noDefaultHeaderBtn&&R(e)].filter(e=>!1!==e):"inline"===m.dateHeader?("left"===m.weekdayAlign&&"right"===m.dateAlign||"right"===m.weekdayAlign&&m.dateAlign,h("div",{class:"q-calendar__header--inline"},[!0!==m.noDefaultHeaderText&&F(e),!0!==m.noDefaultHeaderBtn&&R(e)])):"inverted"===m.dateHeader?("left"===m.weekdayAlign&&"right"===m.dateAlign||"right"===m.weekdayAlign&&m.dateAlign,h("div",{class:"q-calendar__header--inline"},[!0!==m.noDefaultHeaderBtn&&R(e),!0!==m.noDefaultHeaderText&&F(e)])):void 0}function ge(e,t){const a=p["head-day-event"],n=!0!==m.noActiveDate&&W(e),r=N(e,t),o=(r.activeDate=n,r.disabled=!!m.disabledWeekdays&&m.disabledWeekdays.includes(Number(e.weekday)),!0===T.value?m.cellWidth:E.value),i={width:o,maxWidth:o};return!0===T.value&&(i.minWidth=o),h("div",{key:"event-"+e.date+(void 0!==t?"-"+t:""),class:{"q-calendar-agenda__head--day__event":!0,...k(e),"q-active-date":n},style:i},[a&&a({scope:r})])}function F(e){const t=p["head-weekday-label"],a=N(e,0),n=(a.shortWeekdayLabel=m.shortWeekdayLabel,{class:{"q-calendar-agenda__head--weekday":!0,["q-calendar__"+m.weekdayAlign]:!0,"q-calendar__ellipsis":!0}});return h("div",n,t&&t({scope:a})||he(e,m.shortWeekdayLabel))}function he(e,t){const a=X.value(e,t||m.weekdayBreakpoints[0]>0&&ee.value<=m.weekdayBreakpoints[0]);return h("span",{class:"q-calendar__ellipsis"},m.weekdayBreakpoints[1]>0&&ee.value<=m.weekdayBreakpoints[1]?minCharWidth(a,Number(m.minWeekdayLabel)):a)}function R(e){const t={class:{"q-calendar-agenda__head--date":!0,["q-calendar__"+m.dateAlign]:!0}};return h("div",t,Te(e))}function Te(a){const e=!0!==m.noActiveDate&&W(a),t=$.value(a,!1),n=p["head-day-label"],r=p["head-day-button"],o={dayLabel:t,timestamp:a,activeDate:e,disabled:!!m.disabledWeekdays&&m.disabledWeekdays.includes(Number(a.weekday))},i={class:{"q-calendar-agenda__head--day__label":!0,"q-calendar__button":!0,"q-calendar__button--round":"round"===m.dateType,"q-calendar__button--rounded":"rounded"===m.dateType,"q-calendar__button--bordered":!0===a.current,"q-calendar__focusable":!0},disabled:a.disabled,onKeydown:e=>{!0!==a.disabled&&ae(e,[13,32])&&(e.stopPropagation(),e.preventDefault())},onKeyup:e=>{!0!==a.disabled&&ae(e,[13,32])&&(c.value=a.date,void 0!==B.value.onClickDate)&&d("click-date",{scope:o})},...M("-date",(e,t)=>{return"click-date"!==t&&"contextmenu-date"!==t||(c.value=a.date,"click-date"===t&&e.preventDefault()),{scope:o,event:e}})};return!0!==m.noAria&&(i.ariaLabel=K.value(a,!1)),r?r({scope:o}):renderButton(m,i,n?n({scope:o}):t)}function De(){return h("div",{class:"q-calendar-agenda__body"},[ke()])}function ke(){return!0===T.value?h("div",{ref:e,class:{"q-calendar-agenda__scroll-area":!0,"q-calendar__scroll":!0}},[_e()]):!0===m.noScroll?we():h("div",{ref:e,class:{"q-calendar-agenda__scroll-area":!0,"q-calendar__scroll":!0}},[we()])}function we(){return h("div",{ref:t,class:"q-calendar-agenda__pane"},[_e()])}function _e(){const e=p["day-container"];return h("div",{class:"q-calendar-agenda__day-container"},[!0===T.value&&!0!==m.noHeader&&se(),h("div",{style:{display:"flex",flexDirection:"row",height:"100%"}},[...Ie()||[]].flat()),e&&e({scope:{days:I.value}})])}function Ie(){const e=parseInt(String(m.columnCount),10),a=parseInt(String(m.columnIndexStart),10);return(1===I.value.length&&e>0?[!0===O.value?m.leftColumnOptions.map((e,t)=>H(e,t)):[],...Array.apply(null,new Array(e)).map((e,t)=>t+a).map(e=>Ne(I.value[0],0,e)),!0===A.value?m.rightColumnOptions.map((e,t)=>H(e,t)):[]]:[!0===O.value?m.leftColumnOptions.map((e,t)=>H(e,t)):[],...I.value.map((e,t)=>Ne(e,t,0)),!0===A.value?m.rightColumnOptions.map((e,t)=>H(e,t)):[]]).flat()}function H(e,t){const a=p.column,n={column:e,days:I.value,index:t},r=!0===T.value?m.cellWidth:E.value,o=!0===m.focusable&&m.focusType.includes("day"),i=void 0!==m.columnOptionsId?e[m.columnOptionsId]:void 0;return h("div",{key:i,tabindex:!0===o?0:-1,class:{"q-calendar-agenda__day":!0,"q-column-day":!0,"q-calendar__hoverable":!0===m.hoverable,"q-calendar__focusable":!0===o},style:{maxWidth:r,width:r},onDragenter:e=>{void 0!==m.dragEnterFunc&&"function"===typeof m.dragEnterFunc&&(!0===m.dragEnterFunc(e,"column",{scope:n})?g.value=i:g.value="")},onDragover:e=>{void 0!==m.dragOverFunc&&"function"===typeof m.dragOverFunc&&(!0===m.dragOverFunc(e,"column",{scope:n})?g.value=i:g.value="")},onDragleave:e=>{void 0!==m.dragLeaveFunc&&"function"===typeof m.dragLeaveFunc&&(!0===m.dragLeaveFunc(e,"column",{scope:n})?g.value=i:g.value="")},onDrop:e=>{void 0!==m.dropFunc&&"function"===typeof m.dropFunc&&(!0===m.dropFunc(e,"column",{scope:n})?g.value=i:g.value="")},...M("-column",e=>{return{scope:n,event:e}})},[a&&a({scope:n})])}function Ne(e,t,a){const n=parseInt(String(m.dayHeight),10),r=parseInt(String(m.dayMinHeight),10),o=p.day,i=N(e,a),d=!0===T.value?m.cellWidth:E.value,u={width:d,maxWidth:d};return!0===T.value&&(u.minWidth=d),u.height=n>0?convertToUnit(n):"auto",r>0&&(u.minHeight=convertToUnit(r)),h("div",{key:e.date+(void 0!==a?":"+a:""),class:{"q-calendar-agenda__day":!0,...k(e)},style:u},[o&&o({scope:i})])}function be(){const{start:e,end:t,maxDays:a}=Q.value,n=(u.value===e.date&&s.value===t.date&&l.value===a||(u.value=e.date,s.value=t.date,l.value=a),f.width>0),r=withDirectives(h("div",{class:"q-calendar-agenda",key:u.value},[!0===n&&!0!==T.value&&!0!==m.noHeader&&se(),!0===n&&De()]),[[ResizeObserverDirective,de]]);if(!0!==m.animated)return r;{const o="q-calendar--"+("prev"===i.value?m.transitionPrev:m.transitionNext);return h(Transition,{name:o,appear:!0},()=>r)}}return watch([I],te,{deep:!0,immediate:!0}),watch(()=>m.modelValue,(e,t)=>{if(c.value!==e){if(!0===m.animated){const a=getDayIdentifier(parsed(e)),n=getDayIdentifier(parsed(t));i.value=a>=n?"next":"prev"}c.value=e}y.value=e}),watch(c,(e,t)=>{if(c.value!==m.modelValue){if(!0===m.animated){const a=getDayIdentifier(parsed(e)),n=getDayIdentifier(parsed(t));i.value=a>=n?"next":"prev"}d("update:model-value",e)}}),watch(y,e=>{e&&(a.value=parseTimestamp(e))}),watch(a,()=>{y.value&&v.value[y.value]?v.value[y.value].focus():ne()}),watch(()=>m.maxDays,e=>{l.value=e}),onBeforeUpdate(()=>{v.value={}}),onMounted(()=>{}),x({prev:ie,next:oe,move:b,moveToToday:re,updateCurrent:V}),()=>J()}});const version="4.1.0";var Plugin={version:version,QCalendarAgenda:QCalendarAgenda,...Timestamp$1,...helpers$1,install(e){e.component(String(QCalendarAgenda.name),QCalendarAgenda)}};export{DAYS_IN_MONTH,DAYS_IN_MONTH_LEAP,DAYS_IN_MONTH_MAX,DAYS_IN_MONTH_MIN,DAY_MIN,FIRST_HOUR,MONTH_MAX,MONTH_MIN,PARSE_DATE,PARSE_DATETIME,PARSE_TIME,QCalendarAgenda,TIME_CONSTANTS,addToDate,compareDate,compareDateTime,compareTime,compareTimestamps,convertToUnit,copyTimestamp,createDayList,createIntervalList,createNativeLocaleFormatter,daysBetween,daysInMonth,Plugin as default,diffTimestamp,findWeekday,getDate,getDateTime,getDayIdentifier,getDayOfYear,getDayTimeIdentifier,getEndOfMonth,getEndOfWeek,getMonthFormatter,getMonthNames,getStartOfMonth,getStartOfWeek,getTime,getTimeIdentifier,getWeekday,getWeekdayFormatter,getWeekdayNames,getWorkWeek,indexOf,isBetweenDates,isLeapYear,isOverlappingDates,isToday,makeDate,makeDateTime,maxTimestamp,minCharWidth,minTimestamp,moveRelativeDays,nextDay,padNumber,parseDate,parseTime,parseTimestamp,parsed,prevDay,relativeDays,today,updateDayOfYear,updateDisabled,updateFormatted,updateMinutes,updateRelative,updateWeekday,updateWorkWeek,validateNumber,validateTimestamp,version,weeksBetween}; | ||
import{reactive,ref,computed,withDirectives,h,watch,getCurrentInstance,onBeforeUnmount,defineComponent,onBeforeUpdate,onMounted,Transition,nextTick}from"vue";const PARSE_DATETIME=/^(\d{4})-(\d{1,2})(-(\d{1,2}))?([^\d]+(\d{1,2}))?(:(\d{1,2}))?(:(\d{1,2}))?(.(\d{1,3}))?$/,PARSE_DATE=/^(\d{4})-(\d{1,2})(-(\d{1,2}))?/,PARSE_TIME=/(\d\d?)(:(\d\d?)|)(:(\d\d?)|)/,DAYS_IN_MONTH=[0,31,28,31,30,31,30,31,31,30,31,30,31],DAYS_IN_MONTH_LEAP=[0,31,29,31,30,31,30,31,31,30,31,30,31],TIME_CONSTANTS={MILLISECONDS_IN:{SECOND:1e3,MINUTE:6e4,HOUR:36e5,DAY:864e5,WEEK:6048e5},SECONDS_IN:{MINUTE:60,HOUR:3600,DAY:86400,WEEK:604800},MINUTES_IN:{MINUTE:1,HOUR:60,DAY:1440,WEEK:10080},HOURS_IN:{DAY:24,WEEK:168},DAYS_IN:{WEEK:7}},DAYS_IN_MONTH_MIN=28,DAYS_IN_MONTH_MAX=31,MONTH_MAX=12,MONTH_MIN=1,DAY_MIN=1,FIRST_HOUR=0;function validateTimestamp(e){return"string"===typeof e&&PARSE_DATETIME.test(e)}function parsed(e){if("string"!==typeof e)return null;const t=PARSE_DATETIME.exec(e);if(!t||!t[1]||!t[2])return null;const a=parseInt(t[1],10),n=parseInt(t[2],10),r=parseInt(t[4]||"1",10),o=parseInt(t[6]||"0",10),i=parseInt(t[8]||"0",10);return{date:e,time:o.toString().padStart(2,"0")+":"+i.toString().padStart(2,"0"),year:a,month:n,day:r,hour:o,minute:i,hasDay:!!t[4],hasTime:!0,past:!1,current:!1,future:!1,disabled:!1,weekday:0,doy:0,workweek:0}}function parseDate(e,t=!1){if(!(e instanceof Date))return null;const a=t?"UTC":"";return updateFormatted({date:padNumber(e[`get${a}FullYear`](),4)+"-"+padNumber(e[`get${a}Month`]()+1,2)+"-"+padNumber(e[`get${a}Date`](),2),time:padNumber(e[`get${a}Hours`]()||0,2)+":"+padNumber(e[`get${a}Minutes`]()||0,2),year:e[`get${a}FullYear`](),month:e[`get${a}Month`]()+1,day:e[`get${a}Date`](),hour:e[`get${a}Hours`](),minute:e[`get${a}Minutes`](),weekday:0,doy:0,workweek:0,hasDay:!0,hasTime:!0,past:!1,current:!1,future:!1,disabled:!1})}function padNumber(e,t){let a=String(e);while(a.length<t)a="0"+a;return a}function isLeapYear(e){return e%4===0&&e%100!==0||e%400===0}function daysInMonth(e,t){return(isLeapYear(e)?DAYS_IN_MONTH_LEAP:DAYS_IN_MONTH)[t]}function nextDay(e){const t=new Date(e.year,e.month-1,e.day+1);return updateFormatted(normalizeTimestamp({...e,year:t.getFullYear(),month:t.getMonth()+1,day:t.getDate()}))}function prevDay(e){const t=new Date(e.year,e.month-1,e.day-1);return updateFormatted(normalizeTimestamp({...e,year:t.getFullYear(),month:t.getMonth()+1,day:t.getDate()}))}function today(){const e=new Date,t=e.getMonth()+1,a=e.getDate(),n=e.getFullYear();return[n,padNumber(t,2),padNumber(a,2)].join("-")}function isToday(e){return e===today()}function getStartOfWeek(e,t,a){let n=copyTimestamp(e);if(t){if(1===n.day||0===n.weekday)while(!t.includes(Number(n.weekday)))n=nextDay(n);n=findWeekday(n,t[0],prevDay),n=updateFormatted(n),a&&(n=updateRelative(n,a,n.hasTime))}return n}function getEndOfWeek(e,t,a){let n=copyTimestamp(e);if(t&&Array.isArray(t)){const r=daysInMonth(n.year,n.month);if(r===n.day||n.weekday===t[t.length-1])while(!t.includes(Number(n.weekday)))n=prevDay(n);n=findWeekday(n,t[t.length-1],nextDay),n=updateFormatted(n),a&&(n=updateRelative(n,a,n.hasTime))}return n}function getStartOfMonth(e){let t=copyTimestamp(e);return t.day=DAY_MIN,t=updateFormatted(t),t}function getEndOfMonth(e){let t=copyTimestamp(e);return t.day=daysInMonth(t.year,t.month),t=updateFormatted(t),t}function parseTime(e){const t=Object.prototype.toString.call(e);switch(t){case"[object Number]":return e;case"[object String]":{const a=PARSE_TIME.exec(e);return a?60*parseInt(a[1],10)+parseInt(a[3]||"0",10):!1}case"[object Object]":return"object"!==typeof e||"number"!==typeof e.hour||"number"!==typeof e.minute?!1:"object"===typeof e&&"hour"in e&&"minute"in e&&60*e.hour+e.minute}return!1}function compareTimestamps(e,t){return!(!e||!t)&&e.year===t.year&&e.month===t.month&&e.day===t.day&&e.hour===t.hour&&e.minute===t.minute}function compareDate(e,t){return getDate(e)===getDate(t)}function compareTime(e,t){return getTime(e)===getTime(t)}function compareDateTime(e,t){return getDateTime(e)===getDateTime(t)}function parseTimestamp(e,t=null){let a=parsed(e);return a?(a=updateFormatted(a),t&&(a=updateRelative(a,t,a.hasTime)),a):null}function getDayIdentifier(e){return 1e8*(e.year??0)+1e6*(e.month??0)+1e4*(e.day??0)}function getTimeIdentifier(e){return 100*(e.hour??0)+(e.minute??0)}function getDayTimeIdentifier(e){return getDayIdentifier(e)+getTimeIdentifier(e)}function diffTimestamp(e,t,a=!1){const n=Date.UTC(e.year??0,(e.month??1)-1,e.day??1,e.hour??0,e.minute??0),r=Date.UTC(t.year??0,(t.month??1)-1,t.day??1,t.hour??0,t.minute??0);return!0===a&&r<n?0:r-n}function updateRelative(e,t,a=!1){let n=copyTimestamp(e),r=getDayIdentifier(t),o=getDayIdentifier(n),i=r===o;return n.hasTime&&a&&i&&(r=getTimeIdentifier(t),o=getTimeIdentifier(n),i=r===o),n.past=o<r,n.current=i,n.future=o>r,n.currentWeekday=n.weekday===t.weekday,n}function updateMinutes(e,t,a=null){let n=copyTimestamp(e);return n.hasTime=!0,n.hour=Math.floor(t/TIME_CONSTANTS.MINUTES_IN.HOUR),n.minute=t%TIME_CONSTANTS.MINUTES_IN.HOUR,n.time=getTime(n),a&&(n=updateRelative(n,a,!0)),n}function updateWeekday(e){let t=copyTimestamp(e);return t.weekday=getWeekday(t),t}function updateDayOfYear(e){let t=copyTimestamp(e);return t.doy=getDayOfYear(t)||0,t}function updateWorkWeek(e){let t=copyTimestamp(e);return t.workweek=getWorkWeek(t),t}function updateDisabled(e,t,a,n,r){let o=copyTimestamp(e);const i=getDayIdentifier(o);if(void 0!==t){const l=parsed(t);if(l){const c=getDayIdentifier(l);i<=c&&(o.disabled=!0)}}if(!0!==o.disabled&&void 0!==a){const m=parsed(a);if(m){const p=getDayIdentifier(m);i>=p&&(o.disabled=!0)}}if(!0!==o.disabled&&Array.isArray(n)&&n.length>0)for(var d in n)if(n[d]===o.weekday){o.disabled=!0;break}if(!0!==o.disabled&&Array.isArray(r)&&r.length>0)for(var u in r)if(Array.isArray(r[u])&&2===r[u].length&&r[u][0]&&r[u][1]){const y=parsed(r[u][0]),v=parsed(r[u][1]);if(y&&v&&isBetweenDates(o,y,v)){o.disabled=!0;break}}else{const f=r[u];if(Array.isArray(f))for(var s of f){const g=parseTimestamp(s);if(g){const h=getDayIdentifier(g);if(h===i){o.disabled=!0;break}}}else if(f){const T=parseTimestamp(f);if(T){const D=getDayIdentifier(T);D===i&&(o.disabled=!0)}}}return o}function updateFormatted(e){let t=copyTimestamp(e);return t.hasTime=!0,t.time=getTime(t),t.date=getDate(t),t.weekday=getWeekday(t),t.doy=getDayOfYear(t)||0,t.workweek=getWorkWeek(t),t}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){let t=copyTimestamp(e);if(0===t.year){const r=parseTimestamp(today());r&&(t=r)}const a=new Date(Date.UTC(t.year,t.month-1,t.day)),n=4;a.setUTCDate(a.getUTCDate()-(a.getUTCDay()+6)%7+n),a.setUTCDate(a.getUTCDate()+n-(a.getUTCDay()||7));e=new Date(Date.UTC(a.getUTCFullYear(),0,1)),e=Math.ceil(((a.valueOf()-e.valueOf())/864e5+1)/7);return e}function getWeekday(e){let t=e.weekday;if(e.hasDay){const a=Math.floor,n=e.day,r=(e.month+9)%MONTH_MAX+1,o=a(e.year/100),i=e.year%100-(e.month<=2?1:0);t=((n+a(2.6*r-.2)-2*o+i+a(i/4)+a(o/4))%7+7)%7}return t??0}function copyTimestamp(e){return{...e}}function getDate(e){let 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):"00:00")}function moveRelativeDays(e,t=nextDay,a=1,n=[0,1,2,3,4,5,6]){const r=copyTimestamp(e);return relativeDays(r,t,a,n)}function relativeDays(e,t=nextDay,a=1,n=[0,1,2,3,4,5,6]){let r=copyTimestamp(e);n.includes(Number(r.weekday))||0!==r.weekday||t!==nextDay||++a;while(--a>=0)r=t(r),n.length<7&&!n.includes(Number(r.weekday))&&++a;return r}function findWeekday(e,t,a=nextDay,n=6){let r=copyTimestamp(e);while(r.weekday!==t&&--n>=0)r=a(r);return r}function createDayList(e,t,a,n=[0,1,2,3,4,5,6],r=void 0,o=void 0,i=[],d=[],u=42,s=0){const l=getDayIdentifier(e),c=getDayIdentifier(t),m=[];let p=copyTimestamp(e),y=0,v=y===c;if(!(c<l))while((!v||m.length<s)&&m.length<u){if(y=getDayIdentifier(p),v=v||y>c&&m.length>=s,v)break;if(n.includes(Number(p.weekday))){let e=copyTimestamp(p);e=updateFormatted(e),e=updateRelative(e,a),e=updateDisabled(e,r,o,i,d),m.push(e)}p=relativeDays(p,nextDay)}return m}function createIntervalList(t,a,n,r,o){const i=[];for(let e=0;e<r;++e){const d=(a+e)*n,u=copyTimestamp(t);i.push(updateMinutes(u,d,o))}return i}function createNativeLocaleFormatter(n,r){const e=()=>"";return"undefined"===typeof Intl||"undefined"===typeof Intl.DateTimeFormat?e:(t,e)=>{try{const a=new Intl.DateTimeFormat(n||void 0,r(t,e));return a.format(makeDateTime(t))}catch(e){return console.error(`Intl.DateTimeFormat: ${e.message} -> `+getDateTime(t)),""}}}function makeDate(e,t=!0){return t?new Date(Date.UTC(e.year,e.month-1,e.day,0,0)):new Date(e.year,e.month-1,e.day,0,0)}function makeDateTime(e,t=!0){return t?new Date(Date.UTC(e.year,e.month-1,e.day,e.hour,e.minute)):new Date(e.year,e.month-1,e.day,e.hour,e.minute)}function validateNumber(e){return isFinite(Number(e))}function maxTimestamp(e,t=!1){const a=!0===t?getDayTimeIdentifier:getDayIdentifier;return e.reduce((e,t)=>{return Math.max(a(e),a(t))===a(e)?e:t})}function minTimestamp(e,t=!1){const a=!0===t?getDayTimeIdentifier:getDayIdentifier;return e.reduce((e,t)=>{return Math.min(a(e),a(t))===a(e)?e:t})}function isBetweenDates(e,t,a,n=!1){const r=getDayIdentifier(e)+(!0===n?getTimeIdentifier(e):0),o=getDayIdentifier(t)+(!0===n?getTimeIdentifier(t):0),i=getDayIdentifier(a)+(!0===n?getTimeIdentifier(a):0);return r>=o&&r<=i}function isOverlappingDates(e,t,a,n){const r=getDayIdentifier(e),o=getDayIdentifier(t),i=getDayIdentifier(a),d=getDayIdentifier(n);return r>=i&&r<=d||o>=i&&o<=d||i>=r&&o>=d}function addToDate(e,t){const a=copyTimestamp(e);return t.year&&(a.year+=t.year),t.month&&(a.month+=t.month),t.day&&(a.day+=t.day),t.hour&&(a.hour+=t.hour),t.minute&&(a.minute+=t.minute),updateFormatted(normalizeTimestamp(a))}function normalizeTimestamp(e){const t=new Date(e.year,e.month-1,e.day,e.hour,e.minute);return{...e,year:t.getFullYear(),month:t.getMonth()+1,day:t.getDate(),hour:t.getHours(),minute:t.getMinutes()}}function daysBetween(e,t){const a=diffTimestamp(e,t,!0);return Math.floor(a/TIME_CONSTANTS.MILLISECONDS_IN.DAY)}function weeksBetween(e,t){let a=copyTimestamp(e),n=copyTimestamp(t);return a=findWeekday(a,0),n=findWeekday(n,6),Math.ceil(daysBetween(a,n)/TIME_CONSTANTS.DAYS_IN.WEEK)}const weekdayDateMap={Sun:new Date("2020-01-05T00:00:00.000Z"),Mon:new Date("2020-01-06T00:00:00.000Z"),Tue:new Date("2020-01-07T00:00:00.000Z"),Wed:new Date("2020-01-08T00:00:00.000Z"),Thu:new Date("2020-01-09T00:00:00.000Z"),Fri:new Date("2020-01-10T00:00:00.000Z"),Sat:new Date("2020-01-11T00:00:00.000Z")};function getWeekdayFormatter(){const e=()=>"",r={long:{timeZone:"UTC",weekday:"long"},short:{timeZone:"UTC",weekday:"short"},narrow:{timeZone:"UTC",weekday:"narrow"}};return"undefined"===typeof Intl||"undefined"===typeof Intl.DateTimeFormat?e:t;function t(t,e,a){try{const n=new Intl.DateTimeFormat(a||void 0,r[e]||r["long"]);return n.format(weekdayDateMap[t])}catch(e){return e instanceof Error&&console.error(`Intl.DateTimeFormat: ${e.message} -> day of week: `+t),""}}}function getWeekdayNames(t,a){const e=Object.keys(weekdayDateMap),n=getWeekdayFormatter();return e.map(e=>String(n(e,t,a)))}function getMonthFormatter(){const e=()=>"",o={long:{timeZone:"UTC",month:"long"},short:{timeZone:"UTC",month:"short"},narrow:{timeZone:"UTC",month:"narrow"}};return"undefined"===typeof Intl||"undefined"===typeof Intl.DateTimeFormat?e:t;function t(t,e,a){try{const n=new Intl.DateTimeFormat(a||void 0,o[e]||o["long"]),r=new Date;return r.setDate(1),r.setMonth(t),n.format(r)}catch(e){return e instanceof Error&&console.error(`Intl.DateTimeFormat: ${e.message} -> month: `+t),""}}}function getMonthNames(t,a){const n=getMonthFormatter();return[...Array(12).keys()].map(e=>n(e,t,a))}var Timestamp={PARSE_DATETIME:PARSE_DATETIME,PARSE_DATE:PARSE_DATE,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,TIME_CONSTANTS:TIME_CONSTANTS,FIRST_HOUR:FIRST_HOUR,today:today,getStartOfWeek:getStartOfWeek,getEndOfWeek:getEndOfWeek,getStartOfMonth:getStartOfMonth,getEndOfMonth:getEndOfMonth,parseTime:parseTime,validateTimestamp:validateTimestamp,parsed:parsed,parseTimestamp:parseTimestamp,parseDate:parseDate,getDayIdentifier:getDayIdentifier,getTimeIdentifier:getTimeIdentifier,getDayTimeIdentifier:getDayTimeIdentifier,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,createDayList:createDayList,createIntervalList:createIntervalList,createNativeLocaleFormatter:createNativeLocaleFormatter,makeDate:makeDate,makeDateTime:makeDateTime,validateNumber:validateNumber,isBetweenDates:isBetweenDates,isOverlappingDates:isOverlappingDates,daysBetween:daysBetween,weeksBetween:weeksBetween,addToDate:addToDate,compareTimestamps:compareTimestamps,compareDate:compareDate,compareTime:compareTime,compareDateTime:compareDateTime,getWeekdayFormatter:getWeekdayFormatter,getWeekdayNames:getWeekdayNames,getMonthFormatter:getMonthFormatter,getMonthNames:getMonthNames},Timestamp$1=Object.freeze({__proto__:null,DAYS_IN_MONTH:DAYS_IN_MONTH,DAYS_IN_MONTH_LEAP:DAYS_IN_MONTH_LEAP,DAYS_IN_MONTH_MAX:DAYS_IN_MONTH_MAX,DAYS_IN_MONTH_MIN:DAYS_IN_MONTH_MIN,DAY_MIN:DAY_MIN,FIRST_HOUR:FIRST_HOUR,MONTH_MAX:MONTH_MAX,MONTH_MIN:MONTH_MIN,PARSE_DATE:PARSE_DATE,PARSE_DATETIME:PARSE_DATETIME,PARSE_TIME:PARSE_TIME,TIME_CONSTANTS:TIME_CONSTANTS,addToDate:addToDate,compareDate:compareDate,compareDateTime:compareDateTime,compareTime:compareTime,compareTimestamps:compareTimestamps,copyTimestamp:copyTimestamp,createDayList:createDayList,createIntervalList:createIntervalList,createNativeLocaleFormatter:createNativeLocaleFormatter,daysBetween:daysBetween,daysInMonth:daysInMonth,default:Timestamp,diffTimestamp:diffTimestamp,findWeekday:findWeekday,getDate:getDate,getDateTime:getDateTime,getDayIdentifier:getDayIdentifier,getDayOfYear:getDayOfYear,getDayTimeIdentifier:getDayTimeIdentifier,getEndOfMonth:getEndOfMonth,getEndOfWeek:getEndOfWeek,getMonthFormatter:getMonthFormatter,getMonthNames:getMonthNames,getStartOfMonth:getStartOfMonth,getStartOfWeek:getStartOfWeek,getTime:getTime,getTimeIdentifier:getTimeIdentifier,getWeekday:getWeekday,getWeekdayFormatter:getWeekdayFormatter,getWeekdayNames:getWeekdayNames,getWorkWeek:getWorkWeek,isBetweenDates:isBetweenDates,isLeapYear:isLeapYear,isOverlappingDates:isOverlappingDates,isToday:isToday,makeDate:makeDate,makeDateTime:makeDateTime,maxTimestamp:maxTimestamp,minTimestamp:minTimestamp,moveRelativeDays:moveRelativeDays,nextDay:nextDay,padNumber:padNumber,parseDate:parseDate,parseTime:parseTime,parseTimestamp:parseTimestamp,parsed:parsed,prevDay:prevDay,relativeDays:relativeDays,today:today,updateDayOfYear:updateDayOfYear,updateDisabled:updateDisabled,updateFormatted:updateFormatted,updateMinutes:updateMinutes,updateRelative:updateRelative,updateWeekday:updateWeekday,updateWorkWeek:updateWorkWeek,validateNumber:validateNumber,validateTimestamp:validateTimestamp,weeksBetween:weeksBetween});function convertToUnit(e,t="px"){if(e)return isNaN(e)?String(e):"auto"===e?e:""+Number(e)+t}function indexOf(t,a){for(let e=0;e<t.length;e++)if(!0===a(t[e],e))return e;return-1}function minCharWidth(e,t){return 0===t?e:e.slice(0,t)}var helpers={convertToUnit:convertToUnit,indexOf:indexOf,minCharWidth:minCharWidth},helpers$1=Object.freeze({__proto__:null,convertToUnit:convertToUnit,default:helpers,indexOf:indexOf,minCharWidth:minCharWidth});const ResizeObserverDirective={mounted(e,t){if("function"===typeof t.value){const a=t.value,n={callback:a,size:{width:0,height:0},observer:new ResizeObserver(e=>{const t=e[0].contentRect;t.width===n.size.width&&t.height===n.size.height||(n.size.width=t.width,n.size.height=t.height,n.debounceTimeout&&clearTimeout(n.debounceTimeout),n.debounceTimeout=setTimeout(()=>{n.callback(n.size),n.debounceTimeout=void 0},100))})};n.observer.observe(e),e.__onResizeObserver=n}},beforeUnmount(e){if(e.__onResizeObserver){const{observer:t,debounceTimeout:a}=e.__onResizeObserver;a&&clearTimeout(a),t.unobserve(e),delete e.__onResizeObserver}}};function useCalendar(t,a,{scrollArea:e,pane:n}){if(!a){const l="[error: renderCalendar] no renderFunc has been supplied to useCalendar";throw console.error(l),new Error(l)}const r=reactive({width:0,height:0}),o=ref(null);function i({width:e,height:t}){r.width=e,r.height=t}const d=computed(()=>{return!0!==t.noScroll&&e.value&&n.value&&r.height?e.value.offsetWidth-n.value.offsetWidth:0});function u(){}function s(){const e={ref:o,role:"complementary",lang:t.locale,class:`q-calendar ${t.dark?"q-calendar--dark":""} `+(t.bordered?"q-calendar__bordered":"")};return withDirectives(h("div",{...e},[a()]),[[ResizeObserverDirective,i]])}return{rootRef:o,scrollWidth:d,__initCalendar:u,__renderCalendar:s}}const isValidFocusType=e=>e.every(e=>["day","date","weekday","interval","time","resource","task"].includes(e)),useCommonProps={modelValue:{type:String,default:today(),validator:e=>""===e||validateTimestamp(e)},weekdays:{type:Array,default:()=>[0,1,2,3,4,5,6]},dateType:{type:String,default:"round",validator:e=>["round","rounded","square"].includes(e)},weekdayAlign:{type:String,default:"center",validator:e=>["left","center","right"].includes(e)},dateAlign:{type:String,default:"center",validator:e=>["left","center","right"].includes(e)},bordered:Boolean,dark:Boolean,noAria:Boolean,noActiveDate:Boolean,noHeader:Boolean,noScroll:Boolean,shortWeekdayLabel:Boolean,noDefaultHeaderText:Boolean,noDefaultHeaderBtn:Boolean,minWeekdayLabel:{type:[Number,String],default:1},weekdayBreakpoints:{type:Array,default:()=>[75,35],validator:e=>2===e.length},locale:{type:String,default:"en-US"},animated:Boolean,transitionPrev:{type:String,default:"slide-right"},transitionNext:{type:String,default:"slide-left"},disabledDays:Array,disabledBefore:String,disabledAfter:String,disabledWeekdays:{type:Array,default:()=>[]},dragEnterFunc:Function,dragOverFunc:Function,dragLeaveFunc:Function,dropFunc:Function,selectedDates:{type:[Array,Set],default:()=>[]},selectedStartEndDates:{type:Array,default:()=>[]},hoverable:Boolean,focusable:Boolean,focusType:{type:Array,default:()=>["date"],validator:isValidFocusType}};function useCommon(t,{startDate:e,endDate:a,times:n}){const r=computed(()=>parseTimestamp(e.value)),o=computed(()=>{return"0000-00-00"===a.value?getEndOfWeek(r.value,t.weekdays,n.today):parseTimestamp(a.value)||r.value}),i=computed(()=>createNativeLocaleFormatter(t.locale,()=>({timeZone:"UTC",day:"numeric"}))),d=computed(()=>createNativeLocaleFormatter(t.locale,(e,t)=>({timeZone:"UTC",weekday:t?"short":"long"}))),u=computed(()=>createNativeLocaleFormatter(t.locale,()=>({timeZone:"UTC",dateStyle:"full"})));function s(e,t){return e&&e.length>0&&e.includes(t.date)}function l(e,t){const a={firstDay:!1,betweenDays:!1,lastDay:!1};if(2===e.length){const n=getDayIdentifier(t),r=getDayIdentifier(parsed(e[0])),o=getDayIdentifier(parsed(e[1]));a.firstDay=r===n,a.lastDay=o===n,a.betweenDays=r<n&&o>n}return a}function c(e,t=!1,a=[],n=[],r=!1){const o=s(a,e),{firstDay:i,lastDay:d,betweenDays:u}=l(n,e);return{"q-past-day":!i&&!u&&!d&&!o&&!t&&!!e.past,"q-future-day":!i&&!u&&!d&&!o&&!t&&!!e.future,"q-outside":t,"q-current-day":!!e.current,"q-selected":o,"q-range-first":i,"q-range":u,"q-range-last":d,"q-range-hover":r&&(i||d||u),"q-disabled-day disabled":!0===e.disabled}}function m(e){return getStartOfWeek(e,t.weekdays,n.today)}function p(e){return getEndOfWeek(e,t.weekdays,n.today)}function y(){return{}}return{parsedStart:r,parsedEnd:o,dayFormatter:i,weekdayFormatter:d,ariaDateFormatter:u,arrayHasDate:s,checkDays:l,getRelativeClasses:c,startOfWeek:m,endOfWeek:p,dayStyleDefault:y}}function scrollTo(e,t){e instanceof Window?e.scrollTo({top:t,behavior:"instant"}):e.scrollTop=t}function getVerticalScrollPosition(e){return e instanceof Window?e.scrollY:e.scrollTop}function animVerticalScrollTo(o,i,d=500,u=performance.now(),s=getVerticalScrollPosition(o)){d<=0||s===i?scrollTo(o,i):requestAnimationFrame(e=>{const t=e-u,a=Math.min(t/d,1),n=e=>e<.5?2*e*e:(4-2*e)*e-1,r=s+(i-s)*n(a);scrollTo(o,r),a<1&&animVerticalScrollTo(o,i,d,u,s)})}function animHorizontalScrollTo(r,e,o=500){const i=r.scrollLeft,d=e-i;let u=null;function s(e){null===u&&(u=e);const t=e-u,a=Math.min(t/o,1),n=e=>e<.5?2*e*e:(4-2*e)*e-1;r.scrollLeft=i+d*n(a),t<o&&requestAnimationFrame(s)}requestAnimationFrame(s)}const useAgendaProps={view:{type:String,validator:e=>["day","week","month","month-interval"].includes(e),default:"day"},leftColumnOptions:{type:Array},rightColumnOptions:{type:Array},columnOptionsId:{type:String},columnOptionsLabel:{type:String},weekdayStyle:{type:Function,default:null},weekdayClass:{type:Function,default:null},dayStyle:{type:Function,default:null},dayClass:{type:Function,default:null},dateHeader:{type:String,default:"stacked",validator:e=>["stacked","inline","inverted"].includes(e)},dayHeight:{type:[Number,String],default:0,validator:validateNumber},dayMinHeight:{type:[Number,String],default:40,validator:validateNumber}};function useInterval(o,{times:t,scrollArea:n,parsedStart:e,parsedEnd:a,maxDays:r,size:i,headerColumnRef:d}){const u=computed(()=>parseInt(String(o.intervalStart),10)),m=computed(()=>parseInt(String(o.intervalMinutes),10)),s=computed(()=>parseInt(String(o.intervalCount),10)),p=computed(()=>parseFloat(String(o.intervalHeight))),y=computed(()=>{let e=0;const t=Number(o.columnCount);return o.cellWidth?e=Number(o.cellWidth):i.width>0&&d.value&&(e=d.value.offsetWidth/(t>1?t:r.value)),e}),l=computed(()=>u.value*m.value),c=computed(()=>s.value*p.value),v=computed(()=>s.value*y.value),f=computed(()=>D(e.value)),g=computed(()=>k(a.value)),h=computed(()=>{return createDayList(e.value,a.value,t.today,o.weekdays,o.disabledBefore,o.disabledAfter,o.disabledWeekdays,o.disabledDays,r.value)}),T=computed(()=>{return h.value.map(e=>createIntervalList(e,u.value,m.value,s.value,t.now))});function D(e){return getStartOfWeek(e,o.weekdays,t.today)}function k(e){return getEndOfWeek(e,o.weekdays,t.today)}function w(e,t){return e&&e.length>0&&e.includes(getDateTime(t))}function _(e,t){const a={firstDay:!1,betweenDays:!1,lastDay:!1};if(e&&2===e.length){const n=getDayTimeIdentifier(t),r=getDayTimeIdentifier(parsed(e[0])),o=getDayTimeIdentifier(parsed(e[1]));a.firstDay=r===n,a.lastDay=o===n,a.betweenDays=r<n&&o>n}return a}function I(e,t=[],a=[]){const n=w(t,e),{firstDay:r,lastDay:o,betweenDays:i}=_(a,e);return{"q-selected":n,"q-range-first":!0===r,"q-range":!0===i,"q-range-last":!0===o,"q-disabled-interval disabled":!0===e.disabled}}function N(e,t,a){return[]}const b=computed(()=>{const a={timeZone:"UTC",hour12:!o.hour24Format,hour:"2-digit",minute:"2-digit"},n={timeZone:"UTC",hour12:!o.hour24Format,hour:"numeric",minute:"2-digit"},r={timeZone:"UTC",hour12:!o.hour24Format,hour:"numeric"};return createNativeLocaleFormatter(o.locale,(e,t)=>t?0===e.minute?r:n:a)}),M=computed(()=>{const e={timeZone:"UTC",dateStyle:"full",timeStyle:"short"};return createNativeLocaleFormatter(o.locale,()=>e)});function S(e){const t=T.value[0][0],a=t.hour===e.hour&&t.minute===e.minute;return!a&&0===e.minute}function O(e){}function A(e){return{}}function E(e,t,a=!1,n){let r=copyTimestamp(t);if(e.currentTarget){const o=e.currentTarget.getBoundingClientRect(),i=e,d=e,u=i.changedTouches||i.touches,s=(u&&u[0]?u[0]:d).clientY,l=(s-o.top)/p.value,c=Math.floor((a?Math.floor(l):l)*m.value);0!==c&&(r=addToDate(r,{minute:c})),n&&(r=updateRelative(r,n,!0))}return r}function H(e,t,a=!1,n){let r=copyTimestamp(t);const o=e.currentTarget.getBoundingClientRect(),i=e,d=e,u=i.changedTouches||i.touches,s=(u&&u[0]?u[0]:d).clientY,l=(s-o.top)/p.value,c=Math.floor((a?Math.floor(l):l)*m.value);return 0!==c&&(r=addToDate(r,{minute:c})),n&&(r=updateRelative(r,n,!0)),r}function x(e,t,a=!1,n){let r=copyTimestamp(t);if(e.currentTarget){const o=e.currentTarget.getBoundingClientRect(),i=e,d=e,u=i.changedTouches||i.touches,s=(u&&u[0]?u[0]:d).clientX,l=(s-o.left)/y.value,c=Math.floor((a?Math.floor(l):l)*m.value);0!==c&&(r=addToDate(r,{minute:c})),n&&(r=updateRelative(r,n,!0))}return r}function L(e,t){const a={timestamp:e,timeStartPos:F,timeDurationHeight:W};return void 0!==t&&(a.columnIndex=t),a}function Y(e,t){const a={timestamp:copyTimestamp(e),timeStartPosX:R,timeDurationWidth:C};return void 0!==t&&(a.index=t),a}function q(e,t=0){const a=F(e);return!(!1===a||!n.value)&&(animVerticalScrollTo(n.value,a,t),!0)}function U(e,t=0){const a=R(e);return!(!1===a||!n.value)&&(animHorizontalScrollTo(n.value,a,t),!0)}function W(e){return e/m.value*p.value}function C(e){return e/m.value*y.value}function B(e){return e*m.value/p.value}function P(e){return e*m.value/y.value}function F(e,t=!0){const a=parseTime(e);if(!1===a)return!1;const n=l.value,r=s.value*m.value,o=(a-n)/r;let i=o*c.value;return t&&(i<0&&(i=0),i>c.value)&&(i=c.value),i}function R(e,t=!0){const a=parseTime(e);if(!1===a)return!1;const n=l.value,r=s.value*m.value,o=(a-n)/r;let i=o*v.value;return t&&(i<0&&(i=0),i>v.value)&&(i=v.value),i}return{parsedIntervalStart:u,parsedIntervalMinutes:m,parsedIntervalCount:s,parsedIntervalHeight:p,parsedCellWidth:y,parsedStartMinute:l,bodyHeight:c,bodyWidth:v,parsedWeekStart:f,parsedWeekEnd:g,days:h,intervals:T,intervalFormatter:b,ariaDateTimeFormatter:M,arrayHasDateTime:w,checkIntervals:_,getIntervalClasses:I,getResourceClasses:N,showIntervalLabelDefault:S,showResourceLabelDefault:O,styleDefault:A,getTimestampAtEventInterval:E,getTimestampAtEvent:H,getTimestampAtEventX:x,getScopeForSlot:L,getScopeForSlotX:Y,scrollToTime:q,scrollToTimeX:U,timeDurationHeight:W,timeDurationWidth:C,heightToMinutes:B,widthToMinutes:P,timeStartPos:F,timeStartPosX:R}}const useColumnProps={columnCount:{type:[Number,String],default:0,validator:validateNumber},columnIndexStart:{type:[Number,String],default:0,validator:validateNumber}},useMaxDaysProps={maxDays:{type:Number,default:1}},useTimesProps={now:{type:String,validator:e=>""===e||validateTimestamp(e),default:""}};function useTimes(e){const t=reactive({now:parseTimestamp("0000-00-00 00:00"),today:parseTimestamp("0000-00-00")}),a=computed(()=>e.now?parseTimestamp(e.now):o());function n(){t.now&&t.today&&(t.now.current=t.today.current=!0,t.now.past=t.today.past=!1,t.now.future=t.today.future=!1)}function r(){const e=a.value||o();i(e,t.now),d(e,t.now),i(e,t.today)}function o(){return parseDate(new Date)}function i(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)}function d(e,t){e.time!==t.time&&(t.hour=e.hour,t.minute=e.minute,t.time=e.time)}return watch(a,()=>r()),{times:t,parsedNow:a,setCurrent:n,updateCurrent:r,getNow:o,updateDay:i,updateTime:d}}function useRenderValues(r,{parsedView:o,parsedValue:i,times:d}){const e=computed(()=>{const e=i.value;let t=r.maxDays,a=e,n=e;switch(o.value){case"month":a=getStartOfMonth(e),n=getEndOfMonth(e),t=daysInMonth(a.year,a.month);break;case"week":case"week-agenda":case"week-scheduler":a=getStartOfWeek(e,r.weekdays,d.today),n=getEndOfWeek(a,r.weekdays,d.today),t=r.weekdays.length;break;case"day":case"scheduler":case"agenda":n=moveRelativeDays(copyTimestamp(n),nextDay,t>1?t-1:t,r.weekdays),n=updateFormatted(n);break;case"month-interval":case"month-scheduler":case"month-agenda":a=getStartOfMonth(e),n=getEndOfMonth(e),n=updateFormatted(n),t=daysInMonth(a.year,a.month);break;case"resource":t=1,n=moveRelativeDays(copyTimestamp(n),nextDay,t,r.weekdays),n=updateFormatted(n);break}return{start:a,end:n,maxDays:t}});return{renderValues:e}}const toCamelCase=e=>e.replace(/(-\w)/g,e=>e[1].toUpperCase());function getMouseEventHandlers(t,e,a,n){const r={};for(const o in a){const i=a[o],d=toCamelCase("on-"+o);if(!e.value)return console.warn("$listeners has not been set up"),{};if(void 0!==e.value[d]){const u="on"+i.event.charAt(0).toUpperCase()+i.event.slice(1),s=e=>{return(void 0===i.button||"buttons"in e&&e.buttons>0&&e.button===i.button)&&(i.prevent&&e.preventDefault(),i.stop&&e.stopPropagation(),t(o,n(e,o))),i.result};u in r?Array.isArray(r[u])?r[u].push(s):r[u]=[r[u],s]:r[u]=s}}return r}function getDefaultMouseEventHandlers(e,t,a,n){return getMouseEventHandlers(e,t,getMouseEventName(a),n)}function getMouseEventName(e){return{["click"+e]:{event:"click"},["contextmenu"+e]:{event:"contextmenu",prevent:!0,result:!1},["mousedown"+e]:{event:"mousedown"},["mousemove"+e]:{event:"mousemove"},["mouseup"+e]:{event:"mouseup"},["mouseenter"+e]:{event:"mouseenter"},["mouseleave"+e]:{event:"mouseleave"},["touchstart"+e]:{event:"touchstart"},["touchmove"+e]:{event:"touchmove"},["touchend"+e]:{event:"touchend"}}}function getRawMouseEvents(e){return Object.keys(getMouseEventName(e))}function useMouseEvents(a,n){return{getMouseEventHandlers:(e,t)=>getMouseEventHandlers(a,n,e,t),getDefaultMouseEventHandlers:(e,t)=>getDefaultMouseEventHandlers(a,n,e,t),getMouseEventName:getMouseEventName,getRawMouseEvents:getRawMouseEvents}}const useMoveEmits=["moved"];function useMove(u,{parsedView:s,parsedValue:l,direction:c,maxDays:m,times:p,emittedValue:y,emit:v}){function e(a=1){if(0===a)y.value=today();else{let e=copyTimestamp(l.value);const n=getEndOfMonth(e),r=a>0,o=r?nextDay:prevDay,i=r?n.day:1;let t=r?a:-a;c.value=r?"next":"prev";const d=u.weekdays.length;while(--t>=0)switch(s.value){case"month":e.day=i,e=o(e),e=updateWeekday(e);while(!u.weekdays.includes(Number(e.weekday)))e=addToDate(e,{day:r?1:-1});break;case"week":case"week-agenda":case"week-scheduler":e=relativeDays(e,o,d,u.weekdays);break;case"day":case"scheduler":case"agenda":e=relativeDays(e,o,m.value,u.weekdays);break;case"month-interval":case"month-agenda":case"month-scheduler":e.day=i,e=o(e);break;case"resource":e=relativeDays(e,o,m.value,u.weekdays);break}e=updateWeekday(e),e=updateFormatted(e),e=updateDayOfYear(e),e=updateRelative(e,p.now),y.value=e.date,v("moved",e)}}return{move:e}}const listenerRE=/^on[A-Z]/;function useEmitListeners(e=getCurrentInstance()){return{emitListeners:computed(()=>{const t={};return e?.vnode?.props&&Object.keys(e.vnode.props).forEach(e=>{listenerRE.test(e)&&(t[e]=!0)}),t})}}function useFocusHelper(){const e={"aria-hidden":"true",class:"q-calendar__focus-helper"};return[h("span",e)]}function useButton(){function e({focusable:e,focusType:t},a,n){const r=e&&t.includes("date");return h("button",{...a,tabindex:r?0:-1},[n,r&&useFocusHelper()])}return{renderButton:e}}const useCellWidthProps={cellWidth:[Number,String]};function useCellWidth(e){const t=computed(()=>void 0!==e.cellWidth);return{isSticky:t}}const useCheckChangeEmits=["change"];function useCheckChange(n,{days:r,lastStart:o,lastEnd:i}){function e(){const e=r.value;if(0===e.length)return!1;const t=e[0].date,a=e[e.length-1].date;return(!o.value||!i.value||t!==o.value||a!==i.value)&&(o.value=t,i.value=a,n("change",{start:t,end:a,days:e}),!0)}return{checkChange:e}}function useEventUtils(){function e(e,t){return(Array.isArray(t)?t:[t]).includes(e.keyCode)}return{isKeyCode:e}}const isKeyCode=useEventUtils().isKeyCode,useNavigationProps={useNavigation:Boolean};function useNavigation(t,{rootRef:a,focusRef:n,focusValue:r,datesRef:o,parsedView:i,emittedValue:d,direction:u,times:s}){let e=!1;function l(){e||document&&(e=!0,document.addEventListener("keyup",v),document.addEventListener("keydown",y))}function c(){document&&(document.removeEventListener("keyup",v),document.removeEventListener("keydown",y),e=!1)}function m(e){if(e&&document){const t=document.activeElement;if(t!==document.body&&a.value?.contains(t))return!0}return!1}function p(){let t=0;const a=window.setInterval(()=>{const e=o.value[n.value];e&&(e.focus(),50!==++t)&&document.activeElement!==e||window.clearInterval(a)},250)}function y(e){m(e)&&isKeyCode(e,[33,34,35,36,37,38,39,40])&&(e.stopPropagation(),e.preventDefault())}function v(e){if(m(e)&&isKeyCode(e,[33,34,35,36,37,38,39,40])){const t={33:D,34:k,35:_,36:w,37:h,38:f,39:T,40:g};t[e.keyCode]?.()}}function f(){let e=copyTimestamp(r.value);if("month"===i.value){if(e=addToDate(e,{day:-7}),r.value.month!==e.month)return u.value="prev",void(d.value=e.date)}else e=addToDate(e,{minute:Number(t.intervalMinutes)});u.value="prev",n.value=e.date}function g(){let e=copyTimestamp(r.value);if("month"===i.value){if(e=addToDate(e,{day:7}),r.value.month!==e.month)return u.value="next",void(d.value=e.date)}else e=addToDate(e,{minute:Number(t.intervalMinutes)});u.value="next",n.value=e.date}function h(){let e=copyTimestamp(r.value);u.value="prev";do{e=addToDate(e,{day:-1})}while(!t.weekdays.includes(Number(e.weekday)));n.value=e.date}function T(){let e=copyTimestamp(r.value);u.value="next";do{e=addToDate(e,{day:1})}while(!t.weekdays.includes(Number(e.weekday)));n.value=e.date}function D(){let e=copyTimestamp(r.value);e="month"===i.value?addToDate(e,{month:-1}):addToDate(e,{day:-7}),u.value="prev",n.value=e.date}function k(){let e=copyTimestamp(r.value);e="month"===i.value?addToDate(e,{month:1}):addToDate(e,{day:7}),u.value="next",n.value=e.date}function w(){let e=copyTimestamp(r.value);e="month"===i.value?getStartOfMonth(e):getStartOfWeek(e,t.weekdays||[],s.today);while(!t.weekdays.includes(Number(e.weekday)))e=addToDate(e,{day:-1});n.value=e.date}function _(){let e=copyTimestamp(r.value);e="month"===i.value?getEndOfMonth(e):getEndOfWeek(e,t.weekdays||[],s.today);while(!t.weekdays.includes(Number(e.weekday)))e=addToDate(e,{day:-1});n.value=e.date}return onBeforeUnmount(()=>{c()}),watch(()=>t.useNavigation,e=>{(!0===e?l:c)()}),!0===t.useNavigation&&l(),{startNavigation:l,endNavigation:c,tryFocus:p}}const renderButton=useButton().renderButton;var QCalendarAgenda=defineComponent({name:"QCalendarAgenda",directives:{ResizeObserver:ResizeObserverDirective},props:{...useCommonProps,...useAgendaProps,...useColumnProps,...useMaxDaysProps,...useTimesProps,...useCellWidthProps,...useNavigationProps},emits:["update:model-value",...useCheckChangeEmits,...useMoveEmits,...getRawMouseEvents("-date"),...getRawMouseEvents("-head-day"),...getRawMouseEvents("-time")],setup(m,{slots:p,emit:d,expose:x}){const e=ref(null),t=ref(null),L=ref(null),y=ref(m.modelValue||today()),a=ref(parsed(m.modelValue||today())),v=ref({}),n=ref(),r=ref(),i=ref("next"),u=ref(m.modelValue||today()),s=ref("0000-00-00"),l=ref(0),c=ref(m.modelValue),f=reactive({width:0,height:0}),g=ref(""),Y=ref(null),q=ref(null),o=(watch(()=>m.view,()=>{l.value=0}),computed(()=>{return"month"===m.view?"month-interval":m.view})),U=getCurrentInstance();if(null===U)throw new Error("current instance is null");const B=useEmitListeners(U).emitListeners,T=useCellWidth(m).isSticky,{times:D,setCurrent:P,updateCurrent:V}=(watch(T,()=>{}),useTimes(m)),{parsedStart:z,parsedEnd:Z,dayFormatter:$,weekdayFormatter:X,ariaDateFormatter:K,dayStyleDefault:j,getRelativeClasses:k}=(V(),P(),useCommon(m,{startDate:u,endDate:s,times:D})),w=computed(()=>{return parseTimestamp(m.modelValue,D.now)||z.value||D.today}),Q=(a.value=w.value,y.value=w.value.date,useRenderValues(m,{parsedView:o,parsedValue:w,times:D})).renderValues,{rootRef:_,scrollWidth:G,__renderCalendar:J}=useCalendar(m,be,{scrollArea:e,pane:t}),{days:I,parsedCellWidth:ee,getScopeForSlot:N}=useInterval(m,{times:D,scrollArea:e,parsedStart:z,parsedEnd:Z,maxDays:l,size:f,headerColumnRef:L}),b=useMove(m,{parsedView:o,parsedValue:w,direction:i,maxDays:l,times:D,emittedValue:c,emit:d}).move,M=useMouseEvents(d,B).getDefaultMouseEventHandlers,te=useCheckChange(d,{days:I,lastStart:Y,lastEnd:q}).checkChange,ae=useEventUtils().isKeyCode,ne=useNavigation(m,{rootRef:_,focusRef:y,focusValue:a,datesRef:v,parsedView:o,emittedValue:c,direction:i,times:D}).tryFocus,S=computed(()=>{return I.value.length+(!0===O.value?m.leftColumnOptions.length:0)+(!0===A.value?m.rightColumnOptions.length:0)+I.value.length===1&&parseInt(String(m.columnCount),10)>0?parseInt(String(m.columnCount),10):0}),O=computed(()=>{return void 0!==m.leftColumnOptions&&Array.isArray(m.leftColumnOptions)}),A=computed(()=>{return void 0!==m.rightColumnOptions&&Array.isArray(m.rightColumnOptions)}),E=computed(()=>{if(_.value){const e=f.width||_.value.getBoundingClientRect().width;if(e&&S.value)return(e-G.value)/S.value+"px"}return 100/S.value+"%"});function re(){c.value=today()}function oe(e=1){b(e)}function ie(e=1){b(-e)}function de({width:e,height:t}){f.width=e,f.height=t}function W(e){return e.date===c.value}function C(t,a){const e=p["head-column"],n={column:t,index:a,days:I.value},r=!0===T.value?m.cellWidth:E.value,o=!0===m.focusable&&m.focusType.includes("weekday"),i=void 0!==m.columnOptionsId?t[m.columnOptionsId]:"id",d={maxWidth:r,width:r};return h("div",{key:i,tabindex:!0===o?0:-1,class:{"q-calendar-agenda__head--day":!0,"q-column-day":!0,"q-calendar__hoverable":!0===m.hoverable,"q-calendar__focusable":!0===o},style:d,onDragenter:e=>{void 0!==m.dragEnterFunc&&"function"===typeof m.dragEnterFunc&&(!0===m.dragEnterFunc(e,"head-column",{scope:n})?g.value=i:g.value="")},onDragover:e=>{void 0!==m.dragOverFunc&&"function"===typeof m.dragOverFunc&&(!0===m.dragOverFunc(e,"head-column",{scope:n})?g.value=i:g.value="")},onDragleave:e=>{void 0!==m.dragLeaveFunc&&"function"===typeof m.dragLeaveFunc&&(!0===m.dragLeaveFunc(e,"head-column",{scope:n})?g.value=i:g.value="")},onDrop:e=>{void 0!==m.dropFunc&&"function"===typeof m.dropFunc&&(!0===m.dropFunc(e,"head-column",{scope:n})?g.value=i:g.value="")},...M("-head-column",e=>{return{scope:{column:t,index:a},event:e}})},[!0!==m.noDefaultHeaderText&&ue(t),e&&e(n),useFocusHelper()])}function ue(e){const t=p["head-column-label"],a={column:e},n=void 0!==m.columnOptionsLabel?e[m.columnOptionsLabel]:e.label,r=h("div",{class:{"q-calendar-agenda__head--weekday":!0,["q-calendar__"+m.weekdayAlign]:!0,ellipsis:!0},style:{alignSelf:"center"}},[t&&t({scope:a}),!t&&h("span",{class:"ellipsis"},n)]);return"stacked"===m.dateHeader?r:h("div",{class:"q-calendar__header--inline",style:{height:"100%"}},[r])}function se(){return h("div",{roll:"presentation",class:{"q-calendar-agenda__head":!0,"q-calendar__sticky":!0===T.value},style:{marginRight:G.value+"px"}},[le()])}function le(){return h("div",{ref:L,class:{"q-calendar-agenda__head--days__column":!0}},[ce(),me()])}function ce(){return h("div",{class:{"q-calendar-agenda__head--days__weekdays":!0}},pe())}function me(){const e=p["head-days-events"];return nextTick(()=>{if(r.value&&0===m.columnCount&&window)try{const e=window.getComputedStyle(r.value);n.value&&n.value.parentElement&&(n.value.parentElement.style.height=e.height,n.value.style.height=e.height)}catch{}}),h("div",{class:{"q-calendar-agenda__head--days__event":!0}},[e&&h("div",{ref:n,style:{position:"absolute",left:0,top:0,right:0,overflow:"hidden",zIndex:1}},[e({scope:{days:I.value,ref:r}})]),...ye()])}function pe(){const e=parseInt(String(m.columnCount),10),a=parseInt(String(m.columnIndexStart),10);return(1===I.value.length&&e>0?[!0===O.value?m.leftColumnOptions.map((e,t)=>C(e,t)):[],...Array.apply(null,new Array(e)).map((e,t)=>t+a).map(e=>ve(I.value[0],e)),!0===A.value?m.rightColumnOptions.map((e,t)=>C(e,t)):[]]:[!0===O.value?m.leftColumnOptions.map((e,t)=>C(e,t)):[],...I.value.map(e=>ve(e)),!0===A.value?m.rightColumnOptions.map((e,t)=>C(e,t)):[]]).flat()}function ye(){const a=parseInt(String(m.columnCount),10);return 1===I.value.length&&a>0?[...Array.apply(null,new Array(parseInt(String(m.columnCount),10))).map((e,t)=>t+a).map(e=>ge(I.value[0],e))]:I.value.map(e=>ge(e,0))}function ve(t,e){const a=p["head-day"],n=p["head-date"],r=!0!==m.noActiveDate&&W(t),o=N(t,e??0),i=(o.activeDate=r,o.droppable=g.value===t.date,o.disabled=!!m.disabledWeekdays&&m.disabledWeekdays.includes(Number(t.weekday)),!0===T.value?m.cellWidth:E.value),d=m.weekdayStyle||j,u={width:i,maxWidth:i,...d({scope:o})},s=(!0===T.value&&(u.minWidth=i),"function"===typeof m.weekdayClass?m.weekdayClass({scope:o}):{}),l=!0===m.focusable&&m.focusType.includes("weekday"),c={key:t.date+(void 0!==e?"-"+e:""),ref:e=>{v.value[t.date]=e},tabindex:!0===l?0:-1,class:{"q-calendar-agenda__head--day":!0,...s,...k(t),"q-active-date":r,"q-calendar__hoverable":!0===m.hoverable,"q-calendar__focusable":!0===l},style:u,onDragenter:e=>{void 0!==m.dragEnterFunc&&"function"===typeof m.dragEnterFunc&&(!0===m.dragEnterFunc(e,"head-day",{scope:o})?g.value=t.date:g.value="")},onDragover:e=>{void 0!==m.dragOverFunc&&"function"===typeof m.dragOverFunc&&(!0===m.dragOverFunc(e,"head-day",{scope:o})?g.value=t.date:g.value="")},onDragleave:e=>{void 0!==m.dragLeaveFunc&&"function"===typeof m.dragLeaveFunc&&(!0===m.dragLeaveFunc(e,"head-day",{scope:o})?g.value=t.date:g.value="")},onDrop:e=>{void 0!==m.dropFunc&&"function"===typeof m.dropFunc&&(!0===m.dropFunc(e,"head-day",{scope:o})?g.value=t.date:g.value="")},onFocus:()=>{!0===l&&(y.value=t.date)},...M("-head-day",e=>{return{scope:o,event:e}})};return h("div",c,[void 0!==a&&a({scope:o}),void 0===a&&fe(t),void 0===a&&n&&n({scope:o}),useFocusHelper()])}function fe(e){return"stacked"===m.dateHeader?[!0!==m.noDefaultHeaderText&&F(e),!0!==m.noDefaultHeaderBtn&&R(e)].filter(e=>!1!==e):"inline"===m.dateHeader?("left"===m.weekdayAlign&&"right"===m.dateAlign||"right"===m.weekdayAlign&&m.dateAlign,h("div",{class:"q-calendar__header--inline"},[!0!==m.noDefaultHeaderText&&F(e),!0!==m.noDefaultHeaderBtn&&R(e)])):"inverted"===m.dateHeader?("left"===m.weekdayAlign&&"right"===m.dateAlign||"right"===m.weekdayAlign&&m.dateAlign,h("div",{class:"q-calendar__header--inline"},[!0!==m.noDefaultHeaderBtn&&R(e),!0!==m.noDefaultHeaderText&&F(e)])):void 0}function ge(e,t){const a=p["head-day-event"],n=!0!==m.noActiveDate&&W(e),r=N(e,t),o=(r.activeDate=n,r.disabled=!!m.disabledWeekdays&&m.disabledWeekdays.includes(Number(e.weekday)),!0===T.value?m.cellWidth:E.value),i={width:o,maxWidth:o};return!0===T.value&&(i.minWidth=o),h("div",{key:"event-"+e.date+(void 0!==t?"-"+t:""),class:{"q-calendar-agenda__head--day__event":!0,...k(e),"q-active-date":n},style:i},[a&&a({scope:r})])}function F(e){const t=p["head-weekday-label"],a=N(e,0),n=(a.shortWeekdayLabel=m.shortWeekdayLabel,{class:{"q-calendar-agenda__head--weekday":!0,["q-calendar__"+m.weekdayAlign]:!0,"q-calendar__ellipsis":!0}});return h("div",n,t&&t({scope:a})||he(e,m.shortWeekdayLabel))}function he(e,t){const a=X.value(e,t||m.weekdayBreakpoints[0]>0&&ee.value<=m.weekdayBreakpoints[0]);return h("span",{class:"q-calendar__ellipsis"},m.weekdayBreakpoints[1]>0&&ee.value<=m.weekdayBreakpoints[1]?minCharWidth(a,Number(m.minWeekdayLabel)):a)}function R(e){const t={class:{"q-calendar-agenda__head--date":!0,["q-calendar__"+m.dateAlign]:!0}};return h("div",t,Te(e))}function Te(a){const e=!0!==m.noActiveDate&&W(a),t=$.value(a,!1),n=p["head-day-label"],r=p["head-day-button"],o={dayLabel:t,timestamp:a,activeDate:e,disabled:!!m.disabledWeekdays&&m.disabledWeekdays.includes(Number(a.weekday))},i={class:{"q-calendar-agenda__head--day__label":!0,"q-calendar__button":!0,"q-calendar__button--round":"round"===m.dateType,"q-calendar__button--rounded":"rounded"===m.dateType,"q-calendar__button--bordered":!0===a.current,"q-calendar__focusable":!0},disabled:a.disabled,onKeydown:e=>{!0!==a.disabled&&ae(e,[13,32])&&(e.stopPropagation(),e.preventDefault())},onKeyup:e=>{!0!==a.disabled&&ae(e,[13,32])&&(c.value=a.date,void 0!==B.value.onClickDate)&&d("click-date",{scope:o})},...M("-date",(e,t)=>{return"click-date"!==t&&"contextmenu-date"!==t||(c.value=a.date,"click-date"===t&&e.preventDefault()),{scope:o,event:e}})};return!0!==m.noAria&&(i.ariaLabel=K.value(a,!1)),r?r({scope:o}):renderButton(m,i,n?n({scope:o}):t)}function De(){return h("div",{class:"q-calendar-agenda__body"},[ke()])}function ke(){return!0===T.value?h("div",{ref:e,class:{"q-calendar-agenda__scroll-area":!0,"q-calendar__scroll":!0}},[_e()]):!0===m.noScroll?we():h("div",{ref:e,class:{"q-calendar-agenda__scroll-area":!0,"q-calendar__scroll":!0}},[we()])}function we(){return h("div",{ref:t,class:"q-calendar-agenda__pane"},[_e()])}function _e(){const e=p["day-container"];return h("div",{class:"q-calendar-agenda__day-container"},[!0===T.value&&!0!==m.noHeader&&se(),h("div",{style:{display:"flex",flexDirection:"row",height:"100%"}},[...Ie()||[]].flat()),e&&e({scope:{days:I.value}})])}function Ie(){const e=parseInt(String(m.columnCount),10),a=parseInt(String(m.columnIndexStart),10);return(1===I.value.length&&e>0?[!0===O.value?m.leftColumnOptions.map((e,t)=>H(e,t)):[],...Array.apply(null,new Array(e)).map((e,t)=>t+a).map(e=>Ne(I.value[0],0,e)),!0===A.value?m.rightColumnOptions.map((e,t)=>H(e,t)):[]]:[!0===O.value?m.leftColumnOptions.map((e,t)=>H(e,t)):[],...I.value.map((e,t)=>Ne(e,t,0)),!0===A.value?m.rightColumnOptions.map((e,t)=>H(e,t)):[]]).flat()}function H(e,t){const a=p.column,n={column:e,days:I.value,index:t},r=!0===T.value?m.cellWidth:E.value,o=!0===m.focusable&&m.focusType.includes("day"),i=void 0!==m.columnOptionsId?e[m.columnOptionsId]:void 0;return h("div",{key:i,tabindex:!0===o?0:-1,class:{"q-calendar-agenda__day":!0,"q-column-day":!0,"q-calendar__hoverable":!0===m.hoverable,"q-calendar__focusable":!0===o},style:{maxWidth:r,width:r},onDragenter:e=>{void 0!==m.dragEnterFunc&&"function"===typeof m.dragEnterFunc&&(!0===m.dragEnterFunc(e,"column",{scope:n})?g.value=i:g.value="")},onDragover:e=>{void 0!==m.dragOverFunc&&"function"===typeof m.dragOverFunc&&(!0===m.dragOverFunc(e,"column",{scope:n})?g.value=i:g.value="")},onDragleave:e=>{void 0!==m.dragLeaveFunc&&"function"===typeof m.dragLeaveFunc&&(!0===m.dragLeaveFunc(e,"column",{scope:n})?g.value=i:g.value="")},onDrop:e=>{void 0!==m.dropFunc&&"function"===typeof m.dropFunc&&(!0===m.dropFunc(e,"column",{scope:n})?g.value=i:g.value="")},...M("-column",e=>{return{scope:n,event:e}})},[a&&a({scope:n})])}function Ne(e,t,a){const n=parseInt(String(m.dayHeight),10),r=parseInt(String(m.dayMinHeight),10),o=p.day,i=N(e,a),d=!0===T.value?m.cellWidth:E.value,u={width:d,maxWidth:d};return!0===T.value&&(u.minWidth=d),u.height=n>0?convertToUnit(n):"auto",r>0&&(u.minHeight=convertToUnit(r)),h("div",{key:e.date+(void 0!==a?":"+a:""),class:{"q-calendar-agenda__day":!0,...k(e)},style:u},[o&&o({scope:i})])}function be(){const{start:e,end:t,maxDays:a}=Q.value,n=(u.value===e.date&&s.value===t.date&&l.value===a||(u.value=e.date,s.value=t.date,l.value=a),f.width>0),r=withDirectives(h("div",{class:"q-calendar-agenda",key:u.value},[!0===n&&!0!==T.value&&!0!==m.noHeader&&se(),!0===n&&De()]),[[ResizeObserverDirective,de]]);if(!0!==m.animated)return r;{const o="q-calendar--"+("prev"===i.value?m.transitionPrev:m.transitionNext);return h(Transition,{name:o,appear:!0},()=>r)}}return watch([I],te,{deep:!0,immediate:!0}),watch(()=>m.modelValue,(e,t)=>{if(c.value!==e){if(!0===m.animated){const a=getDayIdentifier(parsed(e)),n=getDayIdentifier(parsed(t));i.value=a>=n?"next":"prev"}c.value=e}y.value=e}),watch(c,(e,t)=>{if(c.value!==m.modelValue){if(!0===m.animated){const a=getDayIdentifier(parsed(e)),n=getDayIdentifier(parsed(t));i.value=a>=n?"next":"prev"}d("update:model-value",e)}}),watch(y,e=>{e&&(a.value=parseTimestamp(e))}),watch(a,()=>{y.value&&v.value[y.value]?v.value[y.value].focus():ne()}),watch(()=>m.maxDays,e=>{l.value=e}),onBeforeUpdate(()=>{v.value={}}),onMounted(()=>{}),x({prev:ie,next:oe,move:b,moveToToday:re,updateCurrent:V}),()=>J()}});const version="4.1.1";var Plugin={version:version,QCalendarAgenda:QCalendarAgenda,...Timestamp$1,...helpers$1,install(e){e.component(String(QCalendarAgenda.name),QCalendarAgenda)}};export{DAYS_IN_MONTH,DAYS_IN_MONTH_LEAP,DAYS_IN_MONTH_MAX,DAYS_IN_MONTH_MIN,DAY_MIN,FIRST_HOUR,MONTH_MAX,MONTH_MIN,PARSE_DATE,PARSE_DATETIME,PARSE_TIME,QCalendarAgenda,TIME_CONSTANTS,addToDate,compareDate,compareDateTime,compareTime,compareTimestamps,convertToUnit,copyTimestamp,createDayList,createIntervalList,createNativeLocaleFormatter,daysBetween,daysInMonth,Plugin as default,diffTimestamp,findWeekday,getDate,getDateTime,getDayIdentifier,getDayOfYear,getDayTimeIdentifier,getEndOfMonth,getEndOfWeek,getMonthFormatter,getMonthNames,getStartOfMonth,getStartOfWeek,getTime,getTimeIdentifier,getWeekday,getWeekdayFormatter,getWeekdayNames,getWorkWeek,indexOf,isBetweenDates,isLeapYear,isOverlappingDates,isToday,makeDate,makeDateTime,maxTimestamp,minCharWidth,minTimestamp,moveRelativeDays,nextDay,padNumber,parseDate,parseTime,parseTimestamp,parsed,prevDay,relativeDays,today,updateDayOfYear,updateDisabled,updateFormatted,updateMinutes,updateRelative,updateWeekday,updateWorkWeek,validateNumber,validateTimestamp,version,weeksBetween}; |
/*! | ||
* @quasar/quasar-ui-qcalendar v4.1.0 | ||
* @quasar/quasar-ui-qcalendar v4.1.1 | ||
* (c) 2025 Jeff Galbraith <jeff@quasar.dev> | ||
* Released under the MIT License. | ||
*/ | ||
(function(e,t){"object"===typeof exports&&"undefined"!==typeof module?module.exports=t(require("vue")):"function"===typeof define&&define.amd?define(["vue"],t):(e="undefined"!==typeof globalThis?globalThis:e||self,e.QCalendarAgenda=t(e.Vue))})(this,function(Ce){const i=/^(\d{4})-(\d{1,2})(-(\d{1,2}))?([^\d]+(\d{1,2}))?(:(\d{1,2}))?(:(\d{1,2}))?(.(\d{1,3}))?$/,f=/^(\d{4})-(\d{1,2})(-(\d{1,2}))?/,y=/(\d\d?)(:(\d\d?)|)(:(\d\d?)|)/,k=[0,31,28,31,30,31,30,31,31,30,31,30,31],b=[0,31,29,31,30,31,30,31,31,30,31,30,31],r={MILLISECONDS_IN:{SECOND:1e3,MINUTE:6e4,HOUR:36e5,DAY:864e5,WEEK:6048e5},SECONDS_IN:{MINUTE:60,HOUR:3600,DAY:86400,WEEK:604800},MINUTES_IN:{MINUTE:1,HOUR:60,DAY:1440,WEEK:10080},HOURS_IN:{DAY:24,WEEK:168},DAYS_IN:{WEEK:7}},T=28,C=31,A=12,I=1,N=1,F=0;function t(e){return"string"===typeof e&&i.test(e)}function Ae(e){if("string"!==typeof e)return null;const t=i.exec(e);if(!t||!t[1]||!t[2])return null;const a=parseInt(t[1],10),n=parseInt(t[2],10),r=parseInt(t[4]||"1",10),o=parseInt(t[6]||"0",10),u=parseInt(t[8]||"0",10);return{date:e,time:o.toString().padStart(2,"0")+":"+u.toString().padStart(2,"0"),year:a,month:n,day:r,hour:o,minute:u,hasDay:!!t[4],hasTime:!0,past:!1,current:!1,future:!1,disabled:!1,weekday:0,doy:0,workweek:0}}function O(e,t=!1){if(!(e instanceof Date))return null;const a=t?"UTC":"";return w({date:o(e[`get${a}FullYear`](),4)+"-"+o(e[`get${a}Month`]()+1,2)+"-"+o(e[`get${a}Date`](),2),time:o(e[`get${a}Hours`]()||0,2)+":"+o(e[`get${a}Minutes`]()||0,2),year:e[`get${a}FullYear`](),month:e[`get${a}Month`]()+1,day:e[`get${a}Date`](),hour:e[`get${a}Hours`](),minute:e[`get${a}Minutes`](),weekday:0,doy:0,workweek:0,hasDay:!0,hasTime:!0,past:!1,current:!1,future:!1,disabled:!1})}function o(e,t){let a=String(e);while(a.length<t)a="0"+a;return a}function M(e){return e%4===0&&e%100!==0||e%400===0}function d(e,t){return(M(e)?b:k)[t]}function h(e){const t=new Date(e.year,e.month-1,e.day+1);return w(ie({...e,year:t.getFullYear(),month:t.getMonth()+1,day:t.getDate()}))}function p(e){const t=new Date(e.year,e.month-1,e.day-1);return w(ie({...e,year:t.getFullYear(),month:t.getMonth()+1,day:t.getDate()}))}function Ie(){const e=new Date,t=e.getMonth()+1,a=e.getDate(),n=e.getFullYear();return[n,o(t,2),o(a,2)].join("-")}function E(e){return e===Ie()}function Z(e,t,a){let n=K(e);if(t){if(1===n.day||0===n.weekday)while(!t.includes(Number(n.weekday)))n=h(n);n=m(n,t[0],p),n=w(n),a&&(n=j(n,a,n.hasTime))}return n}function z(e,t,a){let n=K(e);if(t&&Array.isArray(t)){const r=d(n.year,n.month);if(r===n.day||n.weekday===t[t.length-1])while(!t.includes(Number(n.weekday)))n=p(n);n=m(n,t[t.length-1],h),n=w(n),a&&(n=j(n,a,n.hasTime))}return n}function _(e){let t=K(e);return t.day=N,t=w(t),t}function S(e){let t=K(e);return t.day=d(t.year,t.month),t=w(t),t}function P(e){const t=Object.prototype.toString.call(e);switch(t){case"[object Number]":return e;case"[object String]":{const a=y.exec(e);return a?60*parseInt(a[1],10)+parseInt(a[3]||"0",10):!1}case"[object Object]":return"object"!==typeof e||"number"!==typeof e.hour||"number"!==typeof e.minute?!1:"object"===typeof e&&"hour"in e&&"minute"in e&&60*e.hour+e.minute}return!1}function W(e,t){return!(!e||!t)&&e.year===t.year&&e.month===t.month&&e.day===t.day&&e.hour===t.hour&&e.minute===t.minute}function q(e,t){return s(e)===s(t)}function x(e,t){return c(e)===c(t)}function H(e,t){return X(e)===X(t)}function Ne(e,t=null){let a=Ae(e);return a?(a=w(a),t&&(a=j(a,t,a.hasTime)),a):null}function Fe(e){return 1e8*(e.year??0)+1e6*(e.month??0)+1e4*(e.day??0)}function l(e){return 100*(e.hour??0)+(e.minute??0)}function $(e){return Fe(e)+l(e)}function U(e,t,a=!1){const n=Date.UTC(e.year??0,(e.month??1)-1,e.day??1,e.hour??0,e.minute??0),r=Date.UTC(t.year??0,(t.month??1)-1,t.day??1,t.hour??0,t.minute??0);return!0===a&&r<n?0:r-n}function j(e,t,a=!1){let n=K(e),r=Fe(t),o=Fe(n),u=r===o;return n.hasTime&&a&&u&&(r=l(t),o=l(n),u=r===o),n.past=o<r,n.current=u,n.future=o>r,n.currentWeekday=n.weekday===t.weekday,n}function R(e,t,a=null){let n=K(e);return n.hasTime=!0,n.hour=Math.floor(t/r.MINUTES_IN.HOUR),n.minute=t%r.MINUTES_IN.HOUR,n.time=c(n),a&&(n=j(n,a,!0)),n}function g(e){let t=K(e);return t.weekday=u(t),t}function L(e){let t=K(e);return t.doy=a(t)||0,t}function B(e){let t=K(e);return t.workweek=n(t),t}function Y(e,t,a,n,r){let o=K(e);const u=Fe(o);if(void 0!==t){const s=Ae(t);if(s){const c=Fe(s);u<=c&&(o.disabled=!0)}}if(!0!==o.disabled&&void 0!==a){const m=Ae(a);if(m){const v=Fe(m);u>=v&&(o.disabled=!0)}}if(!0!==o.disabled&&Array.isArray(n)&&n.length>0)for(var i in n)if(n[i]===o.weekday){o.disabled=!0;break}if(!0!==o.disabled&&Array.isArray(r)&&r.length>0)for(var d in r)if(Array.isArray(r[d])&&2===r[d].length&&r[d][0]&&r[d][1]){const f=Ae(r[d][0]),y=Ae(r[d][1]);if(f&&y&&oe(o,f,y)){o.disabled=!0;break}}else{const h=r[d];if(Array.isArray(h))for(var l of h){const p=Ne(l);if(p){const g=Fe(p);if(g===u){o.disabled=!0;break}}}else if(h){const w=Ne(h);if(w){const D=Fe(w);D===u&&(o.disabled=!0)}}}return o}function w(e){let t=K(e);return t.hasTime=!0,t.time=c(t),t.date=s(t),t.weekday=u(t),t.doy=a(t)||0,t.workweek=n(t),t}function a(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 n(e){let t=K(e);if(0===t.year){const r=Ne(Ie());r&&(t=r)}const a=new Date(Date.UTC(t.year,t.month-1,t.day)),n=4;a.setUTCDate(a.getUTCDate()-(a.getUTCDay()+6)%7+n),a.setUTCDate(a.getUTCDate()+n-(a.getUTCDay()||7));e=new Date(Date.UTC(a.getUTCFullYear(),0,1)),e=Math.ceil(((a.valueOf()-e.valueOf())/864e5+1)/7);return e}function u(e){let t=e.weekday;if(e.hasDay){const a=Math.floor,n=e.day,r=(e.month+9)%A+1,o=a(e.year/100),u=e.year%100-(e.month<=2?1:0);t=((n+a(2.6*r-.2)-2*o+u+a(u/4)+a(o/4))%7+7)%7}return t??0}function K(e){return{...e}}function s(e){let t=o(e.year,4)+"-"+o(e.month,2);return e.hasDay&&(t+="-"+o(e.day,2)),t}function c(e){return e.hasTime?o(e.hour,2)+":"+o(e.minute,2):""}function X(e){return s(e)+" "+(e.hasTime?c(e):"00:00")}function V(e,t=h,a=1,n=[0,1,2,3,4,5,6]){const r=K(e);return D(r,t,a,n)}function D(e,t=h,a=1,n=[0,1,2,3,4,5,6]){let r=K(e);n.includes(Number(r.weekday))||0!==r.weekday||t!==h||++a;while(--a>=0)r=t(r),n.length<7&&!n.includes(Number(r.weekday))&&++a;return r}function m(e,t,a=h,n=6){let r=K(e);while(r.weekday!==t&&--n>=0)r=a(r);return r}function J(e,t,a,n=[0,1,2,3,4,5,6],r=void 0,o=void 0,u=[],i=[],d=42,l=0){const s=Fe(e),c=Fe(t),m=[];let v=K(e),f=0,y=f===c;if(!(c<s))while((!y||m.length<l)&&m.length<d){if(f=Fe(v),y=y||f>c&&m.length>=l,y)break;if(n.includes(Number(v.weekday))){let e=K(v);e=w(e),e=j(e,a),e=Y(e,r,o,u,i),m.push(e)}v=D(v,h)}return m}function ee(t,a,n,r,o){const u=[];for(let e=0;e<r;++e){const i=(a+e)*n,d=K(t);u.push(R(d,i,o))}return u}function Q(n,r){const e=()=>"";return"undefined"===typeof Intl||"undefined"===typeof Intl.DateTimeFormat?e:(t,e)=>{try{const a=new Intl.DateTimeFormat(n||void 0,r(t,e));return a.format(ae(t))}catch(e){return console.error(`Intl.DateTimeFormat: ${e.message} -> `+X(t)),""}}}function te(e,t=!0){return t?new Date(Date.UTC(e.year,e.month-1,e.day,0,0)):new Date(e.year,e.month-1,e.day,0,0)}function ae(e,t=!0){return t?new Date(Date.UTC(e.year,e.month-1,e.day,e.hour,e.minute)):new Date(e.year,e.month-1,e.day,e.hour,e.minute)}function e(e){return isFinite(Number(e))}function ne(e,t=!1){const a=!0===t?$:Fe;return e.reduce((e,t)=>{return Math.max(a(e),a(t))===a(e)?e:t})}function re(e,t=!1){const a=!0===t?$:Fe;return e.reduce((e,t)=>{return Math.min(a(e),a(t))===a(e)?e:t})}function oe(e,t,a,n=!1){const r=Fe(e)+(!0===n?l(e):0),o=Fe(t)+(!0===n?l(t):0),u=Fe(a)+(!0===n?l(a):0);return r>=o&&r<=u}function ue(e,t,a,n){const r=Fe(e),o=Fe(t),u=Fe(a),i=Fe(n);return r>=u&&r<=i||o>=u&&o<=i||u>=r&&o>=i}function G(e,t){const a=K(e);return t.year&&(a.year+=t.year),t.month&&(a.month+=t.month),t.day&&(a.day+=t.day),t.hour&&(a.hour+=t.hour),t.minute&&(a.minute+=t.minute),w(ie(a))}function ie(e){const t=new Date(e.year,e.month-1,e.day,e.hour,e.minute);return{...e,year:t.getFullYear(),month:t.getMonth()+1,day:t.getDate(),hour:t.getHours(),minute:t.getMinutes()}}function de(e,t){const a=U(e,t,!0);return Math.floor(a/r.MILLISECONDS_IN.DAY)}function le(e,t){let a=K(e),n=K(t);return a=m(a,0),n=m(n,6),Math.ceil(de(a,n)/r.DAYS_IN.WEEK)}const se={Sun:new Date("2020-01-05T00:00:00.000Z"),Mon:new Date("2020-01-06T00:00:00.000Z"),Tue:new Date("2020-01-07T00:00:00.000Z"),Wed:new Date("2020-01-08T00:00:00.000Z"),Thu:new Date("2020-01-09T00:00:00.000Z"),Fri:new Date("2020-01-10T00:00:00.000Z"),Sat:new Date("2020-01-11T00:00:00.000Z")};function ce(){const e=()=>"",r={long:{timeZone:"UTC",weekday:"long"},short:{timeZone:"UTC",weekday:"short"},narrow:{timeZone:"UTC",weekday:"narrow"}};return"undefined"===typeof Intl||"undefined"===typeof Intl.DateTimeFormat?e:t;function t(t,e,a){try{const n=new Intl.DateTimeFormat(a||void 0,r[e]||r["long"]);return n.format(se[t])}catch(e){return e instanceof Error&&console.error(`Intl.DateTimeFormat: ${e.message} -> day of week: `+t),""}}}function me(t,a){const e=Object.keys(se),n=ce();return e.map(e=>String(n(e,t,a)))}function ve(){const e=()=>"",o={long:{timeZone:"UTC",month:"long"},short:{timeZone:"UTC",month:"short"},narrow:{timeZone:"UTC",month:"narrow"}};return"undefined"===typeof Intl||"undefined"===typeof Intl.DateTimeFormat?e:t;function t(t,e,a){try{const n=new Intl.DateTimeFormat(a||void 0,o[e]||o["long"]),r=new Date;return r.setDate(1),r.setMonth(t),n.format(r)}catch(e){return e instanceof Error&&console.error(`Intl.DateTimeFormat: ${e.message} -> month: `+t),""}}}function fe(t,a){const n=ve();return[...Array(12).keys()].map(e=>n(e,t,a))}var v={PARSE_DATETIME:i,PARSE_DATE:f,PARSE_TIME:y,DAYS_IN_MONTH:k,DAYS_IN_MONTH_LEAP:b,DAYS_IN_MONTH_MIN:T,DAYS_IN_MONTH_MAX:C,MONTH_MAX:A,MONTH_MIN:I,DAY_MIN:N,TIME_CONSTANTS:r,FIRST_HOUR:F,today:Ie,getStartOfWeek:Z,getEndOfWeek:z,getStartOfMonth:_,getEndOfMonth:S,parseTime:P,validateTimestamp:t,parsed:Ae,parseTimestamp:Ne,parseDate:O,getDayIdentifier:Fe,getTimeIdentifier:l,getDayTimeIdentifier:$,diffTimestamp:U,updateRelative:j,updateMinutes:R,updateWeekday:g,updateDayOfYear:L,updateWorkWeek:B,updateDisabled:Y,updateFormatted:w,getDayOfYear:a,getWorkWeek:n,getWeekday:u,isLeapYear:M,daysInMonth:d,copyTimestamp:K,padNumber:o,getDate:s,getTime:c,getDateTime:X,nextDay:h,prevDay:p,relativeDays:D,findWeekday:m,createDayList:J,createIntervalList:ee,createNativeLocaleFormatter:Q,makeDate:te,makeDateTime:ae,validateNumber:e,isBetweenDates:oe,isOverlappingDates:ue,daysBetween:de,weeksBetween:le,addToDate:G,compareTimestamps:W,compareDate:q,compareTime:x,compareDateTime:H,getWeekdayFormatter:ce,getWeekdayNames:me,getMonthFormatter:ve,getMonthNames:fe},v=Object.freeze({__proto__:null,DAYS_IN_MONTH:k,DAYS_IN_MONTH_LEAP:b,DAYS_IN_MONTH_MAX:C,DAYS_IN_MONTH_MIN:T,DAY_MIN:N,FIRST_HOUR:F,MONTH_MAX:A,MONTH_MIN:I,PARSE_DATE:f,PARSE_DATETIME:i,PARSE_TIME:y,TIME_CONSTANTS:r,addToDate:G,compareDate:q,compareDateTime:H,compareTime:x,compareTimestamps:W,copyTimestamp:K,createDayList:J,createIntervalList:ee,createNativeLocaleFormatter:Q,daysBetween:de,daysInMonth:d,default:v,diffTimestamp:U,findWeekday:m,getDate:s,getDateTime:X,getDayIdentifier:Fe,getDayOfYear:a,getDayTimeIdentifier:$,getEndOfMonth:S,getEndOfWeek:z,getMonthFormatter:ve,getMonthNames:fe,getStartOfMonth:_,getStartOfWeek:Z,getTime:c,getTimeIdentifier:l,getWeekday:u,getWeekdayFormatter:ce,getWeekdayNames:me,getWorkWeek:n,isBetweenDates:oe,isLeapYear:M,isOverlappingDates:ue,isToday:E,makeDate:te,makeDateTime:ae,maxTimestamp:ne,minTimestamp:re,moveRelativeDays:V,nextDay:h,padNumber:o,parseDate:O,parseTime:P,parseTimestamp:Ne,parsed:Ae,prevDay:p,relativeDays:D,today:Ie,updateDayOfYear:L,updateDisabled:Y,updateFormatted:w,updateMinutes:R,updateRelative:j,updateWeekday:g,updateWorkWeek:B,validateNumber:e,validateTimestamp:t,weeksBetween:le});function Oe(e,t="px"){if(e)return isNaN(e)?String(e):"auto"===e?e:""+Number(e)+t}function ye(t,a){for(let e=0;e<t.length;e++)if(!0===a(t[e],e))return e;return-1}function Me(e,t){return 0===t?e:e.slice(0,t)}var he={convertToUnit:Oe,indexOf:ye,minCharWidth:Me},he=Object.freeze({__proto__:null,convertToUnit:Oe,default:he,indexOf:ye,minCharWidth:Me});const Ee={mounted(e,t){if("function"===typeof t.value){const a=t.value,n={callback:a,size:{width:0,height:0},observer:new ResizeObserver(e=>{const t=e[0].contentRect;t.width===n.size.width&&t.height===n.size.height||(n.size.width=t.width,n.size.height=t.height,n.debounceTimeout&&clearTimeout(n.debounceTimeout),n.debounceTimeout=setTimeout(()=>{n.callback(n.size),n.debounceTimeout=void 0},100))})};n.observer.observe(e),e.__onResizeObserver=n}},beforeUnmount(e){if(e.__onResizeObserver){const{observer:t,debounceTimeout:a}=e.__onResizeObserver;a&&clearTimeout(a),t.unobserve(e),delete e.__onResizeObserver}}};function We(t,a,{scrollArea:e,pane:n}){if(!a){const s="[error: renderCalendar] no renderFunc has been supplied to useCalendar";throw console.error(s),new Error(s)}const r=Ce.reactive({width:0,height:0}),o=Ce.ref(null);function u({width:e,height:t}){r.width=e,r.height=t}const i=Ce.computed(()=>{return!0!==t.noScroll&&e.value&&n.value&&r.height?e.value.offsetWidth-n.value.offsetWidth:0});function d(){}function l(){const e={ref:o,role:"complementary",lang:t.locale,class:`q-calendar ${t.dark?"q-calendar--dark":""} `+(t.bordered?"q-calendar__bordered":"")};return Ce.withDirectives(Ce.h("div",{...e},[a()]),[[Ee,u]])}return{rootRef:o,scrollWidth:i,__initCalendar:d,__renderCalendar:l}}const pe=e=>e.every(e=>["day","date","weekday","interval","time","resource","task"].includes(e)),ge={modelValue:{type:String,default:Ie(),validator:e=>""===e||t(e)},weekdays:{type:Array,default:()=>[0,1,2,3,4,5,6]},dateType:{type:String,default:"round",validator:e=>["round","rounded","square"].includes(e)},weekdayAlign:{type:String,default:"center",validator:e=>["left","center","right"].includes(e)},dateAlign:{type:String,default:"center",validator:e=>["left","center","right"].includes(e)},bordered:Boolean,dark:Boolean,noAria:Boolean,noActiveDate:Boolean,noHeader:Boolean,noScroll:Boolean,shortWeekdayLabel:Boolean,noDefaultHeaderText:Boolean,noDefaultHeaderBtn:Boolean,minWeekdayLabel:{type:[Number,String],default:1},weekdayBreakpoints:{type:Array,default:()=>[75,35],validator:e=>2===e.length},locale:{type:String,default:"en-US"},animated:Boolean,transitionPrev:{type:String,default:"slide-right"},transitionNext:{type:String,default:"slide-left"},disabledDays:Array,disabledBefore:String,disabledAfter:String,disabledWeekdays:{type:Array,default:()=>[]},dragEnterFunc:Function,dragOverFunc:Function,dragLeaveFunc:Function,dropFunc:Function,selectedDates:{type:[Array,Set],default:()=>[]},selectedStartEndDates:{type:Array,default:()=>[]},hoverable:Boolean,focusable:Boolean,focusType:{type:Array,default:()=>["date"],validator:pe}};function qe(t,{startDate:e,endDate:a,times:n}){const r=Ce.computed(()=>Ne(e.value)),o=Ce.computed(()=>{return"0000-00-00"===a.value?z(r.value,t.weekdays,n.today):Ne(a.value)||r.value}),u=Ce.computed(()=>Q(t.locale,()=>({timeZone:"UTC",day:"numeric"}))),i=Ce.computed(()=>Q(t.locale,(e,t)=>({timeZone:"UTC",weekday:t?"short":"long"}))),d=Ce.computed(()=>Q(t.locale,()=>({timeZone:"UTC",dateStyle:"full"})));function l(e,t){return e&&e.length>0&&e.includes(t.date)}function s(e,t){const a={firstDay:!1,betweenDays:!1,lastDay:!1};if(2===e.length){const n=Fe(t),r=Fe(Ae(e[0])),o=Fe(Ae(e[1]));a.firstDay=r===n,a.lastDay=o===n,a.betweenDays=r<n&&o>n}return a}function c(e,t=!1,a=[],n=[],r=!1){const o=l(a,e),{firstDay:u,lastDay:i,betweenDays:d}=s(n,e);return{"q-past-day":!u&&!d&&!i&&!o&&!t&&!!e.past,"q-future-day":!u&&!d&&!i&&!o&&!t&&!!e.future,"q-outside":t,"q-current-day":!!e.current,"q-selected":o,"q-range-first":u,"q-range":d,"q-range-last":i,"q-range-hover":r&&(u||i||d),"q-disabled-day disabled":!0===e.disabled}}function m(e){return Z(e,t.weekdays,n.today)}function v(e){return z(e,t.weekdays,n.today)}function f(){return{}}return{parsedStart:r,parsedEnd:o,dayFormatter:u,weekdayFormatter:i,ariaDateFormatter:d,arrayHasDate:l,checkDays:s,getRelativeClasses:c,startOfWeek:m,endOfWeek:v,dayStyleDefault:f}}function we(e,t){e instanceof Window?e.scrollTo({top:t,behavior:"instant"}):e.scrollTop=t}function De(e){return e instanceof Window?e.scrollY:e.scrollTop}function ke(o,u,i=500,d=performance.now(),l=De(o)){i<=0||l===u?we(o,u):requestAnimationFrame(e=>{const t=e-d,a=Math.min(t/i,1),n=e=>e<.5?2*e*e:(4-2*e)*e-1,r=l+(u-l)*n(a);we(o,r),a<1&&ke(o,u,i,d,l)})}function be(r,e,o=500){const u=r.scrollLeft,i=e-u;let d=null;function l(e){null===d&&(d=e);const t=e-d,a=Math.min(t/o,1),n=e=>e<.5?2*e*e:(4-2*e)*e-1;r.scrollLeft=u+i*n(a),t<o&&requestAnimationFrame(l)}requestAnimationFrame(l)}const Te={view:{type:String,validator:e=>["day","week","month","month-interval"].includes(e),default:"day"},leftColumnOptions:{type:Array},rightColumnOptions:{type:Array},columnOptionsId:{type:String},columnOptionsLabel:{type:String},weekdayStyle:{type:Function,default:null},weekdayClass:{type:Function,default:null},dayStyle:{type:Function,default:null},dayClass:{type:Function,default:null},dateHeader:{type:String,default:"stacked",validator:e=>["stacked","inline","inverted"].includes(e)},dayHeight:{type:[Number,String],default:0,validator:e},dayMinHeight:{type:[Number,String],default:40,validator:e}};function xe(o,{times:t,scrollArea:n,parsedStart:e,parsedEnd:a,maxDays:r,size:u,headerColumnRef:i}){const d=Ce.computed(()=>parseInt(String(o.intervalStart),10)),m=Ce.computed(()=>parseInt(String(o.intervalMinutes),10)),l=Ce.computed(()=>parseInt(String(o.intervalCount),10)),v=Ce.computed(()=>parseFloat(String(o.intervalHeight))),f=Ce.computed(()=>{let e=0;const t=Number(o.columnCount);return o.cellWidth?e=Number(o.cellWidth):u.width>0&&i.value&&(e=i.value.offsetWidth/(t>1?t:r.value)),e}),s=Ce.computed(()=>d.value*m.value),c=Ce.computed(()=>l.value*v.value),y=Ce.computed(()=>l.value*f.value),h=Ce.computed(()=>D(e.value)),p=Ce.computed(()=>k(a.value)),g=Ce.computed(()=>{return J(e.value,a.value,t.today,o.weekdays,o.disabledBefore,o.disabledAfter,o.disabledWeekdays,o.disabledDays,r.value)}),w=Ce.computed(()=>{return g.value.map(e=>ee(e,d.value,m.value,l.value,t.now))});function D(e){return Z(e,o.weekdays,t.today)}function k(e){return z(e,o.weekdays,t.today)}function b(e,t){return e&&e.length>0&&e.includes(X(t))}function T(e,t){const a={firstDay:!1,betweenDays:!1,lastDay:!1};if(e&&2===e.length){const n=$(t),r=$(Ae(e[0])),o=$(Ae(e[1]));a.firstDay=r===n,a.lastDay=o===n,a.betweenDays=r<n&&o>n}return a}function _(e,t=[],a=[]){const n=b(t,e),{firstDay:r,lastDay:o,betweenDays:u}=T(a,e);return{"q-selected":n,"q-range-first":!0===r,"q-range":!0===u,"q-range-last":!0===o,"q-disabled-interval disabled":!0===e.disabled}}function S(e,t,a){return[]}const C=Ce.computed(()=>{const a={timeZone:"UTC",hour12:!o.hour24Format,hour:"2-digit",minute:"2-digit"},n={timeZone:"UTC",hour12:!o.hour24Format,hour:"numeric",minute:"2-digit"},r={timeZone:"UTC",hour12:!o.hour24Format,hour:"numeric"};return Q(o.locale,(e,t)=>t?0===e.minute?r:n:a)}),A=Ce.computed(()=>{const e={timeZone:"UTC",dateStyle:"full",timeStyle:"short"};return Q(o.locale,()=>e)});function I(e){const t=w.value[0][0],a=t.hour===e.hour&&t.minute===e.minute;return!a&&0===e.minute}function N(e){}function F(e){return{}}function O(e,t,a=!1,n){let r=K(t);if(e.currentTarget){const o=e.currentTarget.getBoundingClientRect(),u=e,i=e,d=u.changedTouches||u.touches,l=(d&&d[0]?d[0]:i).clientY,s=(l-o.top)/v.value,c=Math.floor((a?Math.floor(s):s)*m.value);0!==c&&(r=G(r,{minute:c})),n&&(r=j(r,n,!0))}return r}function x(e,t,a=!1,n){let r=K(t);const o=e.currentTarget.getBoundingClientRect(),u=e,i=e,d=u.changedTouches||u.touches,l=(d&&d[0]?d[0]:i).clientY,s=(l-o.top)/v.value,c=Math.floor((a?Math.floor(s):s)*m.value);return 0!==c&&(r=G(r,{minute:c})),n&&(r=j(r,n,!0)),r}function H(e,t,a=!1,n){let r=K(t);if(e.currentTarget){const o=e.currentTarget.getBoundingClientRect(),u=e,i=e,d=u.changedTouches||u.touches,l=(d&&d[0]?d[0]:i).clientX,s=(l-o.left)/f.value,c=Math.floor((a?Math.floor(s):s)*m.value);0!==c&&(r=G(r,{minute:c})),n&&(r=j(r,n,!0))}return r}function U(e,t){const a={timestamp:e,timeStartPos:W,timeDurationHeight:M};return void 0!==t&&(a.columnIndex=t),a}function R(e,t){const a={timestamp:K(e),timeStartPosX:q,timeDurationWidth:E};return void 0!==t&&(a.index=t),a}function L(e,t=0){const a=W(e);return!(!1===a||!n.value)&&(ke(n.value,a,t),!0)}function B(e,t=0){const a=q(e);return!(!1===a||!n.value)&&(be(n.value,a,t),!0)}function M(e){return e/m.value*v.value}function E(e){return e/m.value*f.value}function Y(e){return e*m.value/v.value}function V(e){return e*m.value/f.value}function W(e,t=!0){const a=P(e);if(!1===a)return!1;const n=s.value,r=l.value*m.value,o=(a-n)/r;let u=o*c.value;return t&&(u<0&&(u=0),u>c.value)&&(u=c.value),u}function q(e,t=!0){const a=P(e);if(!1===a)return!1;const n=s.value,r=l.value*m.value,o=(a-n)/r;let u=o*y.value;return t&&(u<0&&(u=0),u>y.value)&&(u=y.value),u}return{parsedIntervalStart:d,parsedIntervalMinutes:m,parsedIntervalCount:l,parsedIntervalHeight:v,parsedCellWidth:f,parsedStartMinute:s,bodyHeight:c,bodyWidth:y,parsedWeekStart:h,parsedWeekEnd:p,days:g,intervals:w,intervalFormatter:C,ariaDateTimeFormatter:A,arrayHasDateTime:b,checkIntervals:T,getIntervalClasses:_,getResourceClasses:S,showIntervalLabelDefault:I,showResourceLabelDefault:N,styleDefault:F,getTimestampAtEventInterval:O,getTimestampAtEvent:x,getTimestampAtEventX:H,getScopeForSlot:U,getScopeForSlotX:R,scrollToTime:L,scrollToTimeX:B,timeDurationHeight:M,timeDurationWidth:E,heightToMinutes:Y,widthToMinutes:V,timeStartPos:W,timeStartPosX:q}}const _e={columnCount:{type:[Number,String],default:0,validator:e},columnIndexStart:{type:[Number,String],default:0,validator:e}},Se={maxDays:{type:Number,default:1}},He={now:{type:String,validator:e=>""===e||t(e),default:""}};function Ue(e){const t=Ce.reactive({now:Ne("0000-00-00 00:00"),today:Ne("0000-00-00")}),a=Ce.computed(()=>e.now?Ne(e.now):o());function n(){t.now&&t.today&&(t.now.current=t.today.current=!0,t.now.past=t.today.past=!1,t.now.future=t.today.future=!1)}function r(){const e=a.value||o();u(e,t.now),i(e,t.now),u(e,t.today)}function o(){return O(new Date)}function u(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)}function i(e,t){e.time!==t.time&&(t.hour=e.hour,t.minute=e.minute,t.time=e.time)}return Ce.watch(a,()=>r()),{times:t,parsedNow:a,setCurrent:n,updateCurrent:r,getNow:o,updateDay:u,updateTime:i}}function Re(r,{parsedView:o,parsedValue:u,times:i}){const e=Ce.computed(()=>{const e=u.value;let t=r.maxDays,a=e,n=e;switch(o.value){case"month":a=_(e),n=S(e),t=d(a.year,a.month);break;case"week":case"week-agenda":case"week-scheduler":a=Z(e,r.weekdays,i.today),n=z(a,r.weekdays,i.today),t=r.weekdays.length;break;case"day":case"scheduler":case"agenda":n=V(K(n),h,t>1?t-1:t,r.weekdays),n=w(n);break;case"month-interval":case"month-scheduler":case"month-agenda":a=_(e),n=S(e),n=w(n),t=d(a.year,a.month);break;case"resource":t=1,n=V(K(n),h,t,r.weekdays),n=w(n);break}return{start:a,end:n,maxDays:t}});return{renderValues:e}}const Le=e=>e.replace(/(-\w)/g,e=>e[1].toUpperCase());function Be(t,e,a,n){const r={};for(const o in a){const u=a[o],i=Le("on-"+o);if(!e.value)return console.warn("$listeners has not been set up"),{};if(void 0!==e.value[i]){const d="on"+u.event.charAt(0).toUpperCase()+u.event.slice(1),l=e=>{return(void 0===u.button||"buttons"in e&&e.buttons>0&&e.button===u.button)&&(u.prevent&&e.preventDefault(),u.stop&&e.stopPropagation(),t(o,n(e,o))),u.result};d in r?Array.isArray(r[d])?r[d].push(l):r[d]=[r[d],l]:r[d]=l}}return r}function Ye(e,t,a,n){return Be(e,t,Ve(a),n)}function Ve(e){return{["click"+e]:{event:"click"},["contextmenu"+e]:{event:"contextmenu",prevent:!0,result:!1},["mousedown"+e]:{event:"mousedown"},["mousemove"+e]:{event:"mousemove"},["mouseup"+e]:{event:"mouseup"},["mouseenter"+e]:{event:"mouseenter"},["mouseleave"+e]:{event:"mouseleave"},["touchstart"+e]:{event:"touchstart"},["touchmove"+e]:{event:"touchmove"},["touchend"+e]:{event:"touchend"}}}function Ze(e){return Object.keys(Ve(e))}function ze(a,n){return{getMouseEventHandlers:(e,t)=>Be(a,n,e,t),getDefaultMouseEventHandlers:(e,t)=>Ye(a,n,e,t),getMouseEventName:Ve,getRawMouseEvents:Ze}}const Pe=["moved"];function $e(d,{parsedView:l,parsedValue:s,direction:c,maxDays:m,times:v,emittedValue:f,emit:y}){function e(a=1){if(0===a)f.value=Ie();else{let e=K(s.value);const n=S(e),r=a>0,o=r?h:p,u=r?n.day:1;let t=r?a:-a;c.value=r?"next":"prev";const i=d.weekdays.length;while(--t>=0)switch(l.value){case"month":e.day=u,e=o(e),e=g(e);while(!d.weekdays.includes(Number(e.weekday)))e=G(e,{day:r?1:-1});break;case"week":case"week-agenda":case"week-scheduler":e=D(e,o,i,d.weekdays);break;case"day":case"scheduler":case"agenda":e=D(e,o,m.value,d.weekdays);break;case"month-interval":case"month-agenda":case"month-scheduler":e.day=u,e=o(e);break;case"resource":e=D(e,o,m.value,d.weekdays);break}e=g(e),e=w(e),e=L(e),e=j(e,v.now),f.value=e.date,y("moved",e)}}return{move:e}}const je=/^on[A-Z]/;function Ke(e=Ce.getCurrentInstance()){return{emitListeners:Ce.computed(()=>{const t={};return e?.vnode?.props&&Object.keys(e.vnode.props).forEach(e=>{je.test(e)&&(t[e]=!0)}),t})}}function Xe(){const e={"aria-hidden":"true",class:"q-calendar__focus-helper"};return[Ce.h("span",e)]}function Qe(){function e({focusable:e,focusType:t},a,n){const r=e&&t.includes("date");return Ce.h("button",{...a,tabindex:r?0:-1},[n,r&&Xe()])}return{renderButton:e}}const Ge={cellWidth:[Number,String]};function Je(e){const t=Ce.computed(()=>void 0!==e.cellWidth);return{isSticky:t}}const et=["change"];function tt(n,{days:r,lastStart:o,lastEnd:u}){function e(){const e=r.value;if(0===e.length)return!1;const t=e[0].date,a=e[e.length-1].date;return(!o.value||!u.value||t!==o.value||a!==u.value)&&(o.value=t,u.value=a,n("change",{start:t,end:a,days:e}),!0)}return{checkChange:e}}function at(){function e(e,t){return(Array.isArray(t)?t:[t]).includes(e.keyCode)}return{isKeyCode:e}}const nt=at().isKeyCode,rt={useNavigation:Boolean};function ot(t,{rootRef:a,focusRef:n,focusValue:r,datesRef:o,parsedView:u,emittedValue:i,direction:d,times:l}){let e=!1;function s(){e||document&&(e=!0,document.addEventListener("keyup",y),document.addEventListener("keydown",f))}function c(){document&&(document.removeEventListener("keyup",y),document.removeEventListener("keydown",f),e=!1)}function m(e){if(e&&document){const t=document.activeElement;if(t!==document.body&&a.value?.contains(t))return!0}return!1}function v(){let t=0;const a=window.setInterval(()=>{const e=o.value[n.value];e&&(e.focus(),50!==++t)&&document.activeElement!==e||window.clearInterval(a)},250)}function f(e){m(e)&&nt(e,[33,34,35,36,37,38,39,40])&&(e.stopPropagation(),e.preventDefault())}function y(e){if(m(e)&&nt(e,[33,34,35,36,37,38,39,40])){const t={33:D,34:k,35:T,36:b,37:g,38:h,39:w,40:p};t[e.keyCode]?.()}}function h(){let e=K(r.value);if("month"===u.value){if(e=G(e,{day:-7}),r.value.month!==e.month)return d.value="prev",void(i.value=e.date)}else e=G(e,{minute:Number(t.intervalMinutes)});d.value="prev",n.value=e.date}function p(){let e=K(r.value);if("month"===u.value){if(e=G(e,{day:7}),r.value.month!==e.month)return d.value="next",void(i.value=e.date)}else e=G(e,{minute:Number(t.intervalMinutes)});d.value="next",n.value=e.date}function g(){let e=K(r.value);d.value="prev";do{e=G(e,{day:-1})}while(!t.weekdays.includes(Number(e.weekday)));n.value=e.date}function w(){let e=K(r.value);d.value="next";do{e=G(e,{day:1})}while(!t.weekdays.includes(Number(e.weekday)));n.value=e.date}function D(){let e=K(r.value);e="month"===u.value?G(e,{month:-1}):G(e,{day:-7}),d.value="prev",n.value=e.date}function k(){let e=K(r.value);e="month"===u.value?G(e,{month:1}):G(e,{day:7}),d.value="next",n.value=e.date}function b(){let e=K(r.value);e="month"===u.value?_(e):Z(e,t.weekdays||[],l.today);while(!t.weekdays.includes(Number(e.weekday)))e=G(e,{day:-1});n.value=e.date}function T(){let e=K(r.value);e="month"===u.value?S(e):z(e,t.weekdays||[],l.today);while(!t.weekdays.includes(Number(e.weekday)))e=G(e,{day:-1});n.value=e.date}return Ce.onBeforeUnmount(()=>{c()}),Ce.watch(()=>t.useNavigation,e=>{(!0===e?s:c)()}),!0===t.useNavigation&&s(),{startNavigation:s,endNavigation:c,tryFocus:v}}const ut=Qe().renderButton;var it=Ce.defineComponent({name:"QCalendarAgenda",directives:{ResizeObserver:Ee},props:{...ge,...Te,..._e,...Se,...He,...Ge,...rt},emits:["update:model-value",...et,...Pe,...Ze("-date"),...Ze("-head-day"),...Ze("-time")],setup(m,{slots:v,emit:i,expose:x}){const e=Ce.ref(null),t=Ce.ref(null),H=Ce.ref(null),f=Ce.ref(m.modelValue||Ie()),a=Ce.ref(Ae(m.modelValue||Ie())),y=Ce.ref({}),n=Ce.ref(),r=Ce.ref(),u=Ce.ref("next"),d=Ce.ref(m.modelValue||Ie()),l=Ce.ref("0000-00-00"),s=Ce.ref(0),c=Ce.ref(m.modelValue),h=Ce.reactive({width:0,height:0}),p=Ce.ref(""),U=Ce.ref(null),R=Ce.ref(null),o=(Ce.watch(()=>m.view,()=>{s.value=0}),Ce.computed(()=>{return"month"===m.view?"month-interval":m.view})),L=Ce.getCurrentInstance();if(null===L)throw new Error("current instance is null");const B=Ke(L).emitListeners,g=Je(m).isSticky,{times:w,setCurrent:Y,updateCurrent:V}=(Ce.watch(g,()=>{}),Ue(m)),{parsedStart:Z,parsedEnd:z,dayFormatter:P,weekdayFormatter:$,ariaDateFormatter:j,dayStyleDefault:K,getRelativeClasses:D}=(V(),Y(),qe(m,{startDate:d,endDate:l,times:w})),k=Ce.computed(()=>{return Ne(m.modelValue,w.now)||Z.value||w.today}),X=(a.value=k.value,f.value=k.value.date,Re(m,{parsedView:o,parsedValue:k,times:w})).renderValues,{rootRef:b,scrollWidth:Q,__renderCalendar:G}=We(m,Se,{scrollArea:e,pane:t}),{days:T,parsedCellWidth:J,getScopeForSlot:_}=xe(m,{times:w,scrollArea:e,parsedStart:Z,parsedEnd:z,maxDays:s,size:h,headerColumnRef:H}),S=$e(m,{parsedView:o,parsedValue:k,direction:u,maxDays:s,times:w,emittedValue:c,emit:i}).move,C=ze(i,B).getDefaultMouseEventHandlers,ee=tt(i,{days:T,lastStart:U,lastEnd:R}).checkChange,te=at().isKeyCode,ae=ot(m,{rootRef:b,focusRef:f,focusValue:a,datesRef:y,parsedView:o,emittedValue:c,direction:u,times:w}).tryFocus,A=Ce.computed(()=>{return T.value.length+(!0===I.value?m.leftColumnOptions.length:0)+(!0===N.value?m.rightColumnOptions.length:0)+T.value.length===1&&parseInt(String(m.columnCount),10)>0?parseInt(String(m.columnCount),10):0}),I=Ce.computed(()=>{return void 0!==m.leftColumnOptions&&Array.isArray(m.leftColumnOptions)}),N=Ce.computed(()=>{return void 0!==m.rightColumnOptions&&Array.isArray(m.rightColumnOptions)}),F=Ce.computed(()=>{if(b.value){const e=h.width||b.value.getBoundingClientRect().width;if(e&&A.value)return(e-Q.value)/A.value+"px"}return 100/A.value+"%"});function ne(){c.value=Ie()}function re(e=1){S(e)}function oe(e=1){S(-e)}function ue({width:e,height:t}){h.width=e,h.height=t}function O(e){return e.date===c.value}function M(t,a){const e=v["head-column"],n={column:t,index:a,days:T.value},r=!0===g.value?m.cellWidth:F.value,o=!0===m.focusable&&m.focusType.includes("weekday"),u=void 0!==m.columnOptionsId?t[m.columnOptionsId]:"id",i={maxWidth:r,width:r};return Ce.h("div",{key:u,tabindex:!0===o?0:-1,class:{"q-calendar-agenda__head--day":!0,"q-column-day":!0,"q-calendar__hoverable":!0===m.hoverable,"q-calendar__focusable":!0===o},style:i,onDragenter:e=>{void 0!==m.dragEnterFunc&&"function"===typeof m.dragEnterFunc&&(!0===m.dragEnterFunc(e,"head-column",{scope:n})?p.value=u:p.value="")},onDragover:e=>{void 0!==m.dragOverFunc&&"function"===typeof m.dragOverFunc&&(!0===m.dragOverFunc(e,"head-column",{scope:n})?p.value=u:p.value="")},onDragleave:e=>{void 0!==m.dragLeaveFunc&&"function"===typeof m.dragLeaveFunc&&(!0===m.dragLeaveFunc(e,"head-column",{scope:n})?p.value=u:p.value="")},onDrop:e=>{void 0!==m.dropFunc&&"function"===typeof m.dropFunc&&(!0===m.dropFunc(e,"head-column",{scope:n})?p.value=u:p.value="")},...C("-head-column",e=>{return{scope:{column:t,index:a},event:e}})},[!0!==m.noDefaultHeaderText&&ie(t),e&&e(n),Xe()])}function ie(e){const t=v["head-column-label"],a={column:e},n=void 0!==m.columnOptionsLabel?e[m.columnOptionsLabel]:e.label,r=Ce.h("div",{class:{"q-calendar-agenda__head--weekday":!0,["q-calendar__"+m.weekdayAlign]:!0,ellipsis:!0},style:{alignSelf:"center"}},[t&&t({scope:a}),!t&&Ce.h("span",{class:"ellipsis"},n)]);return"stacked"===m.dateHeader?r:Ce.h("div",{class:"q-calendar__header--inline",style:{height:"100%"}},[r])}function de(){return Ce.h("div",{roll:"presentation",class:{"q-calendar-agenda__head":!0,"q-calendar__sticky":!0===g.value},style:{marginRight:Q.value+"px"}},[le()])}function le(){return Ce.h("div",{ref:H,class:{"q-calendar-agenda__head--days__column":!0}},[se(),ce()])}function se(){return Ce.h("div",{class:{"q-calendar-agenda__head--days__weekdays":!0}},me())}function ce(){const e=v["head-days-events"];return Ce.nextTick(()=>{if(r.value&&0===m.columnCount&&window)try{const e=window.getComputedStyle(r.value);n.value&&n.value.parentElement&&(n.value.parentElement.style.height=e.height,n.value.style.height=e.height)}catch{}}),Ce.h("div",{class:{"q-calendar-agenda__head--days__event":!0}},[e&&Ce.h("div",{ref:n,style:{position:"absolute",left:0,top:0,right:0,overflow:"hidden",zIndex:1}},[e({scope:{days:T.value,ref:r}})]),...ve()])}function me(){const e=parseInt(String(m.columnCount),10),a=parseInt(String(m.columnIndexStart),10);return(1===T.value.length&&e>0?[!0===I.value?m.leftColumnOptions.map((e,t)=>M(e,t)):[],...Array.apply(null,new Array(e)).map((e,t)=>t+a).map(e=>fe(T.value[0],e)),!0===N.value?m.rightColumnOptions.map((e,t)=>M(e,t)):[]]:[!0===I.value?m.leftColumnOptions.map((e,t)=>M(e,t)):[],...T.value.map(e=>fe(e)),!0===N.value?m.rightColumnOptions.map((e,t)=>M(e,t)):[]]).flat()}function ve(){const a=parseInt(String(m.columnCount),10);return 1===T.value.length&&a>0?[...Array.apply(null,new Array(parseInt(String(m.columnCount),10))).map((e,t)=>t+a).map(e=>he(T.value[0],e))]:T.value.map(e=>he(e,0))}function fe(t,e){const a=v["head-day"],n=v["head-date"],r=!0!==m.noActiveDate&&O(t),o=_(t,e??0),u=(o.activeDate=r,o.droppable=p.value===t.date,o.disabled=!!m.disabledWeekdays&&m.disabledWeekdays.includes(Number(t.weekday)),!0===g.value?m.cellWidth:F.value),i=m.weekdayStyle||K,d={width:u,maxWidth:u,...i({scope:o})},l=(!0===g.value&&(d.minWidth=u),"function"===typeof m.weekdayClass?m.weekdayClass({scope:o}):{}),s=!0===m.focusable&&m.focusType.includes("weekday"),c={key:t.date+(void 0!==e?"-"+e:""),ref:e=>{y.value[t.date]=e},tabindex:!0===s?0:-1,class:{"q-calendar-agenda__head--day":!0,...l,...D(t),"q-active-date":r,"q-calendar__hoverable":!0===m.hoverable,"q-calendar__focusable":!0===s},style:d,onDragenter:e=>{void 0!==m.dragEnterFunc&&"function"===typeof m.dragEnterFunc&&(!0===m.dragEnterFunc(e,"head-day",{scope:o})?p.value=t.date:p.value="")},onDragover:e=>{void 0!==m.dragOverFunc&&"function"===typeof m.dragOverFunc&&(!0===m.dragOverFunc(e,"head-day",{scope:o})?p.value=t.date:p.value="")},onDragleave:e=>{void 0!==m.dragLeaveFunc&&"function"===typeof m.dragLeaveFunc&&(!0===m.dragLeaveFunc(e,"head-day",{scope:o})?p.value=t.date:p.value="")},onDrop:e=>{void 0!==m.dropFunc&&"function"===typeof m.dropFunc&&(!0===m.dropFunc(e,"head-day",{scope:o})?p.value=t.date:p.value="")},onFocus:()=>{!0===s&&(f.value=t.date)},...C("-head-day",e=>{return{scope:o,event:e}})};return Ce.h("div",c,[void 0!==a&&a({scope:o}),void 0===a&&ye(t),void 0===a&&n&&n({scope:o}),Xe()])}function ye(e){return"stacked"===m.dateHeader?[!0!==m.noDefaultHeaderText&&E(e),!0!==m.noDefaultHeaderBtn&&W(e)].filter(e=>!1!==e):"inline"===m.dateHeader?("left"===m.weekdayAlign&&"right"===m.dateAlign||"right"===m.weekdayAlign&&m.dateAlign,Ce.h("div",{class:"q-calendar__header--inline"},[!0!==m.noDefaultHeaderText&&E(e),!0!==m.noDefaultHeaderBtn&&W(e)])):"inverted"===m.dateHeader?("left"===m.weekdayAlign&&"right"===m.dateAlign||"right"===m.weekdayAlign&&m.dateAlign,Ce.h("div",{class:"q-calendar__header--inline"},[!0!==m.noDefaultHeaderBtn&&W(e),!0!==m.noDefaultHeaderText&&E(e)])):void 0}function he(e,t){const a=v["head-day-event"],n=!0!==m.noActiveDate&&O(e),r=_(e,t),o=(r.activeDate=n,r.disabled=!!m.disabledWeekdays&&m.disabledWeekdays.includes(Number(e.weekday)),!0===g.value?m.cellWidth:F.value),u={width:o,maxWidth:o};return!0===g.value&&(u.minWidth=o),Ce.h("div",{key:"event-"+e.date+(void 0!==t?"-"+t:""),class:{"q-calendar-agenda__head--day__event":!0,...D(e),"q-active-date":n},style:u},[a&&a({scope:r})])}function E(e){const t=v["head-weekday-label"],a=_(e,0),n=(a.shortWeekdayLabel=m.shortWeekdayLabel,{class:{"q-calendar-agenda__head--weekday":!0,["q-calendar__"+m.weekdayAlign]:!0,"q-calendar__ellipsis":!0}});return Ce.h("div",n,t&&t({scope:a})||pe(e,m.shortWeekdayLabel))}function pe(e,t){const a=$.value(e,t||m.weekdayBreakpoints[0]>0&&J.value<=m.weekdayBreakpoints[0]);return Ce.h("span",{class:"q-calendar__ellipsis"},m.weekdayBreakpoints[1]>0&&J.value<=m.weekdayBreakpoints[1]?Me(a,Number(m.minWeekdayLabel)):a)}function W(e){const t={class:{"q-calendar-agenda__head--date":!0,["q-calendar__"+m.dateAlign]:!0}};return Ce.h("div",t,ge(e))}function ge(a){const e=!0!==m.noActiveDate&&O(a),t=P.value(a,!1),n=v["head-day-label"],r=v["head-day-button"],o={dayLabel:t,timestamp:a,activeDate:e,disabled:!!m.disabledWeekdays&&m.disabledWeekdays.includes(Number(a.weekday))},u={class:{"q-calendar-agenda__head--day__label":!0,"q-calendar__button":!0,"q-calendar__button--round":"round"===m.dateType,"q-calendar__button--rounded":"rounded"===m.dateType,"q-calendar__button--bordered":!0===a.current,"q-calendar__focusable":!0},disabled:a.disabled,onKeydown:e=>{!0!==a.disabled&&te(e,[13,32])&&(e.stopPropagation(),e.preventDefault())},onKeyup:e=>{!0!==a.disabled&&te(e,[13,32])&&(c.value=a.date,void 0!==B.value.onClickDate)&&i("click-date",{scope:o})},...C("-date",(e,t)=>{return"click-date"!==t&&"contextmenu-date"!==t||(c.value=a.date,"click-date"===t&&e.preventDefault()),{scope:o,event:e}})};return!0!==m.noAria&&(u.ariaLabel=j.value(a,!1)),r?r({scope:o}):ut(m,u,n?n({scope:o}):t)}function we(){return Ce.h("div",{class:"q-calendar-agenda__body"},[De()])}function De(){return!0===g.value?Ce.h("div",{ref:e,class:{"q-calendar-agenda__scroll-area":!0,"q-calendar__scroll":!0}},[be()]):!0===m.noScroll?ke():Ce.h("div",{ref:e,class:{"q-calendar-agenda__scroll-area":!0,"q-calendar__scroll":!0}},[ke()])}function ke(){return Ce.h("div",{ref:t,class:"q-calendar-agenda__pane"},[be()])}function be(){const e=v["day-container"];return Ce.h("div",{class:"q-calendar-agenda__day-container"},[!0===g.value&&!0!==m.noHeader&&de(),Ce.h("div",{style:{display:"flex",flexDirection:"row",height:"100%"}},[...Te()||[]].flat()),e&&e({scope:{days:T.value}})])}function Te(){const e=parseInt(String(m.columnCount),10),a=parseInt(String(m.columnIndexStart),10);return(1===T.value.length&&e>0?[!0===I.value?m.leftColumnOptions.map((e,t)=>q(e,t)):[],...Array.apply(null,new Array(e)).map((e,t)=>t+a).map(e=>_e(T.value[0],0,e)),!0===N.value?m.rightColumnOptions.map((e,t)=>q(e,t)):[]]:[!0===I.value?m.leftColumnOptions.map((e,t)=>q(e,t)):[],...T.value.map((e,t)=>_e(e,t,0)),!0===N.value?m.rightColumnOptions.map((e,t)=>q(e,t)):[]]).flat()}function q(e,t){const a=v.column,n={column:e,days:T.value,index:t},r=!0===g.value?m.cellWidth:F.value,o=!0===m.focusable&&m.focusType.includes("day"),u=void 0!==m.columnOptionsId?e[m.columnOptionsId]:void 0;return Ce.h("div",{key:u,tabindex:!0===o?0:-1,class:{"q-calendar-agenda__day":!0,"q-column-day":!0,"q-calendar__hoverable":!0===m.hoverable,"q-calendar__focusable":!0===o},style:{maxWidth:r,width:r},onDragenter:e=>{void 0!==m.dragEnterFunc&&"function"===typeof m.dragEnterFunc&&(!0===m.dragEnterFunc(e,"column",{scope:n})?p.value=u:p.value="")},onDragover:e=>{void 0!==m.dragOverFunc&&"function"===typeof m.dragOverFunc&&(!0===m.dragOverFunc(e,"column",{scope:n})?p.value=u:p.value="")},onDragleave:e=>{void 0!==m.dragLeaveFunc&&"function"===typeof m.dragLeaveFunc&&(!0===m.dragLeaveFunc(e,"column",{scope:n})?p.value=u:p.value="")},onDrop:e=>{void 0!==m.dropFunc&&"function"===typeof m.dropFunc&&(!0===m.dropFunc(e,"column",{scope:n})?p.value=u:p.value="")},...C("-column",e=>{return{scope:n,event:e}})},[a&&a({scope:n})])}function _e(e,t,a){const n=parseInt(String(m.dayHeight),10),r=parseInt(String(m.dayMinHeight),10),o=v.day,u=_(e,a),i=!0===g.value?m.cellWidth:F.value,d={width:i,maxWidth:i};return!0===g.value&&(d.minWidth=i),d.height=n>0?Oe(n):"auto",r>0&&(d.minHeight=Oe(r)),Ce.h("div",{key:e.date+(void 0!==a?":"+a:""),class:{"q-calendar-agenda__day":!0,...D(e)},style:d},[o&&o({scope:u})])}function Se(){const{start:e,end:t,maxDays:a}=X.value,n=(d.value===e.date&&l.value===t.date&&s.value===a||(d.value=e.date,l.value=t.date,s.value=a),h.width>0),r=Ce.withDirectives(Ce.h("div",{class:"q-calendar-agenda",key:d.value},[!0===n&&!0!==g.value&&!0!==m.noHeader&&de(),!0===n&&we()]),[[Ee,ue]]);if(!0!==m.animated)return r;{const o="q-calendar--"+("prev"===u.value?m.transitionPrev:m.transitionNext);return Ce.h(Ce.Transition,{name:o,appear:!0},()=>r)}}return Ce.watch([T],ee,{deep:!0,immediate:!0}),Ce.watch(()=>m.modelValue,(e,t)=>{if(c.value!==e){if(!0===m.animated){const a=Fe(Ae(e)),n=Fe(Ae(t));u.value=a>=n?"next":"prev"}c.value=e}f.value=e}),Ce.watch(c,(e,t)=>{if(c.value!==m.modelValue){if(!0===m.animated){const a=Fe(Ae(e)),n=Fe(Ae(t));u.value=a>=n?"next":"prev"}i("update:model-value",e)}}),Ce.watch(f,e=>{e&&(a.value=Ne(e))}),Ce.watch(a,()=>{f.value&&y.value[f.value]?y.value[f.value].focus():ae()}),Ce.watch(()=>m.maxDays,e=>{s.value=e}),Ce.onBeforeUpdate(()=>{y.value={}}),Ce.onMounted(()=>{}),x({prev:oe,next:re,move:S,moveToToday:ne,updateCurrent:V}),()=>G()}});const dt="4.1.0";v={version:dt,QCalendarAgenda:it,...v,...he,install(e){e.component(String(it.name),it)}};return v}); | ||
(function(e,t){"object"===typeof exports&&"undefined"!==typeof module?module.exports=t(require("vue")):"function"===typeof define&&define.amd?define(["vue"],t):(e="undefined"!==typeof globalThis?globalThis:e||self,e.QCalendarAgenda=t(e.Vue))})(this,function(Ce){const i=/^(\d{4})-(\d{1,2})(-(\d{1,2}))?([^\d]+(\d{1,2}))?(:(\d{1,2}))?(:(\d{1,2}))?(.(\d{1,3}))?$/,f=/^(\d{4})-(\d{1,2})(-(\d{1,2}))?/,y=/(\d\d?)(:(\d\d?)|)(:(\d\d?)|)/,k=[0,31,28,31,30,31,30,31,31,30,31,30,31],b=[0,31,29,31,30,31,30,31,31,30,31,30,31],r={MILLISECONDS_IN:{SECOND:1e3,MINUTE:6e4,HOUR:36e5,DAY:864e5,WEEK:6048e5},SECONDS_IN:{MINUTE:60,HOUR:3600,DAY:86400,WEEK:604800},MINUTES_IN:{MINUTE:1,HOUR:60,DAY:1440,WEEK:10080},HOURS_IN:{DAY:24,WEEK:168},DAYS_IN:{WEEK:7}},T=28,C=31,A=12,I=1,N=1,F=0;function t(e){return"string"===typeof e&&i.test(e)}function Ae(e){if("string"!==typeof e)return null;const t=i.exec(e);if(!t||!t[1]||!t[2])return null;const a=parseInt(t[1],10),n=parseInt(t[2],10),r=parseInt(t[4]||"1",10),o=parseInt(t[6]||"0",10),u=parseInt(t[8]||"0",10);return{date:e,time:o.toString().padStart(2,"0")+":"+u.toString().padStart(2,"0"),year:a,month:n,day:r,hour:o,minute:u,hasDay:!!t[4],hasTime:!0,past:!1,current:!1,future:!1,disabled:!1,weekday:0,doy:0,workweek:0}}function O(e,t=!1){if(!(e instanceof Date))return null;const a=t?"UTC":"";return w({date:o(e[`get${a}FullYear`](),4)+"-"+o(e[`get${a}Month`]()+1,2)+"-"+o(e[`get${a}Date`](),2),time:o(e[`get${a}Hours`]()||0,2)+":"+o(e[`get${a}Minutes`]()||0,2),year:e[`get${a}FullYear`](),month:e[`get${a}Month`]()+1,day:e[`get${a}Date`](),hour:e[`get${a}Hours`](),minute:e[`get${a}Minutes`](),weekday:0,doy:0,workweek:0,hasDay:!0,hasTime:!0,past:!1,current:!1,future:!1,disabled:!1})}function o(e,t){let a=String(e);while(a.length<t)a="0"+a;return a}function M(e){return e%4===0&&e%100!==0||e%400===0}function d(e,t){return(M(e)?b:k)[t]}function h(e){const t=new Date(e.year,e.month-1,e.day+1);return w(ie({...e,year:t.getFullYear(),month:t.getMonth()+1,day:t.getDate()}))}function p(e){const t=new Date(e.year,e.month-1,e.day-1);return w(ie({...e,year:t.getFullYear(),month:t.getMonth()+1,day:t.getDate()}))}function Ie(){const e=new Date,t=e.getMonth()+1,a=e.getDate(),n=e.getFullYear();return[n,o(t,2),o(a,2)].join("-")}function E(e){return e===Ie()}function Z(e,t,a){let n=K(e);if(t){if(1===n.day||0===n.weekday)while(!t.includes(Number(n.weekday)))n=h(n);n=m(n,t[0],p),n=w(n),a&&(n=j(n,a,n.hasTime))}return n}function z(e,t,a){let n=K(e);if(t&&Array.isArray(t)){const r=d(n.year,n.month);if(r===n.day||n.weekday===t[t.length-1])while(!t.includes(Number(n.weekday)))n=p(n);n=m(n,t[t.length-1],h),n=w(n),a&&(n=j(n,a,n.hasTime))}return n}function _(e){let t=K(e);return t.day=N,t=w(t),t}function S(e){let t=K(e);return t.day=d(t.year,t.month),t=w(t),t}function P(e){const t=Object.prototype.toString.call(e);switch(t){case"[object Number]":return e;case"[object String]":{const a=y.exec(e);return a?60*parseInt(a[1],10)+parseInt(a[3]||"0",10):!1}case"[object Object]":return"object"!==typeof e||"number"!==typeof e.hour||"number"!==typeof e.minute?!1:"object"===typeof e&&"hour"in e&&"minute"in e&&60*e.hour+e.minute}return!1}function W(e,t){return!(!e||!t)&&e.year===t.year&&e.month===t.month&&e.day===t.day&&e.hour===t.hour&&e.minute===t.minute}function q(e,t){return s(e)===s(t)}function x(e,t){return c(e)===c(t)}function H(e,t){return X(e)===X(t)}function Ne(e,t=null){let a=Ae(e);return a?(a=w(a),t&&(a=j(a,t,a.hasTime)),a):null}function Fe(e){return 1e8*(e.year??0)+1e6*(e.month??0)+1e4*(e.day??0)}function l(e){return 100*(e.hour??0)+(e.minute??0)}function $(e){return Fe(e)+l(e)}function U(e,t,a=!1){const n=Date.UTC(e.year??0,(e.month??1)-1,e.day??1,e.hour??0,e.minute??0),r=Date.UTC(t.year??0,(t.month??1)-1,t.day??1,t.hour??0,t.minute??0);return!0===a&&r<n?0:r-n}function j(e,t,a=!1){let n=K(e),r=Fe(t),o=Fe(n),u=r===o;return n.hasTime&&a&&u&&(r=l(t),o=l(n),u=r===o),n.past=o<r,n.current=u,n.future=o>r,n.currentWeekday=n.weekday===t.weekday,n}function R(e,t,a=null){let n=K(e);return n.hasTime=!0,n.hour=Math.floor(t/r.MINUTES_IN.HOUR),n.minute=t%r.MINUTES_IN.HOUR,n.time=c(n),a&&(n=j(n,a,!0)),n}function g(e){let t=K(e);return t.weekday=u(t),t}function L(e){let t=K(e);return t.doy=a(t)||0,t}function B(e){let t=K(e);return t.workweek=n(t),t}function Y(e,t,a,n,r){let o=K(e);const u=Fe(o);if(void 0!==t){const s=Ae(t);if(s){const c=Fe(s);u<=c&&(o.disabled=!0)}}if(!0!==o.disabled&&void 0!==a){const m=Ae(a);if(m){const v=Fe(m);u>=v&&(o.disabled=!0)}}if(!0!==o.disabled&&Array.isArray(n)&&n.length>0)for(var i in n)if(n[i]===o.weekday){o.disabled=!0;break}if(!0!==o.disabled&&Array.isArray(r)&&r.length>0)for(var d in r)if(Array.isArray(r[d])&&2===r[d].length&&r[d][0]&&r[d][1]){const f=Ae(r[d][0]),y=Ae(r[d][1]);if(f&&y&&oe(o,f,y)){o.disabled=!0;break}}else{const h=r[d];if(Array.isArray(h))for(var l of h){const p=Ne(l);if(p){const g=Fe(p);if(g===u){o.disabled=!0;break}}}else if(h){const w=Ne(h);if(w){const D=Fe(w);D===u&&(o.disabled=!0)}}}return o}function w(e){let t=K(e);return t.hasTime=!0,t.time=c(t),t.date=s(t),t.weekday=u(t),t.doy=a(t)||0,t.workweek=n(t),t}function a(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 n(e){let t=K(e);if(0===t.year){const r=Ne(Ie());r&&(t=r)}const a=new Date(Date.UTC(t.year,t.month-1,t.day)),n=4;a.setUTCDate(a.getUTCDate()-(a.getUTCDay()+6)%7+n),a.setUTCDate(a.getUTCDate()+n-(a.getUTCDay()||7));e=new Date(Date.UTC(a.getUTCFullYear(),0,1)),e=Math.ceil(((a.valueOf()-e.valueOf())/864e5+1)/7);return e}function u(e){let t=e.weekday;if(e.hasDay){const a=Math.floor,n=e.day,r=(e.month+9)%A+1,o=a(e.year/100),u=e.year%100-(e.month<=2?1:0);t=((n+a(2.6*r-.2)-2*o+u+a(u/4)+a(o/4))%7+7)%7}return t??0}function K(e){return{...e}}function s(e){let t=o(e.year,4)+"-"+o(e.month,2);return e.hasDay&&(t+="-"+o(e.day,2)),t}function c(e){return e.hasTime?o(e.hour,2)+":"+o(e.minute,2):""}function X(e){return s(e)+" "+(e.hasTime?c(e):"00:00")}function V(e,t=h,a=1,n=[0,1,2,3,4,5,6]){const r=K(e);return D(r,t,a,n)}function D(e,t=h,a=1,n=[0,1,2,3,4,5,6]){let r=K(e);n.includes(Number(r.weekday))||0!==r.weekday||t!==h||++a;while(--a>=0)r=t(r),n.length<7&&!n.includes(Number(r.weekday))&&++a;return r}function m(e,t,a=h,n=6){let r=K(e);while(r.weekday!==t&&--n>=0)r=a(r);return r}function J(e,t,a,n=[0,1,2,3,4,5,6],r=void 0,o=void 0,u=[],i=[],d=42,l=0){const s=Fe(e),c=Fe(t),m=[];let v=K(e),f=0,y=f===c;if(!(c<s))while((!y||m.length<l)&&m.length<d){if(f=Fe(v),y=y||f>c&&m.length>=l,y)break;if(n.includes(Number(v.weekday))){let e=K(v);e=w(e),e=j(e,a),e=Y(e,r,o,u,i),m.push(e)}v=D(v,h)}return m}function ee(t,a,n,r,o){const u=[];for(let e=0;e<r;++e){const i=(a+e)*n,d=K(t);u.push(R(d,i,o))}return u}function Q(n,r){const e=()=>"";return"undefined"===typeof Intl||"undefined"===typeof Intl.DateTimeFormat?e:(t,e)=>{try{const a=new Intl.DateTimeFormat(n||void 0,r(t,e));return a.format(ae(t))}catch(e){return console.error(`Intl.DateTimeFormat: ${e.message} -> `+X(t)),""}}}function te(e,t=!0){return t?new Date(Date.UTC(e.year,e.month-1,e.day,0,0)):new Date(e.year,e.month-1,e.day,0,0)}function ae(e,t=!0){return t?new Date(Date.UTC(e.year,e.month-1,e.day,e.hour,e.minute)):new Date(e.year,e.month-1,e.day,e.hour,e.minute)}function e(e){return isFinite(Number(e))}function ne(e,t=!1){const a=!0===t?$:Fe;return e.reduce((e,t)=>{return Math.max(a(e),a(t))===a(e)?e:t})}function re(e,t=!1){const a=!0===t?$:Fe;return e.reduce((e,t)=>{return Math.min(a(e),a(t))===a(e)?e:t})}function oe(e,t,a,n=!1){const r=Fe(e)+(!0===n?l(e):0),o=Fe(t)+(!0===n?l(t):0),u=Fe(a)+(!0===n?l(a):0);return r>=o&&r<=u}function ue(e,t,a,n){const r=Fe(e),o=Fe(t),u=Fe(a),i=Fe(n);return r>=u&&r<=i||o>=u&&o<=i||u>=r&&o>=i}function G(e,t){const a=K(e);return t.year&&(a.year+=t.year),t.month&&(a.month+=t.month),t.day&&(a.day+=t.day),t.hour&&(a.hour+=t.hour),t.minute&&(a.minute+=t.minute),w(ie(a))}function ie(e){const t=new Date(e.year,e.month-1,e.day,e.hour,e.minute);return{...e,year:t.getFullYear(),month:t.getMonth()+1,day:t.getDate(),hour:t.getHours(),minute:t.getMinutes()}}function de(e,t){const a=U(e,t,!0);return Math.floor(a/r.MILLISECONDS_IN.DAY)}function le(e,t){let a=K(e),n=K(t);return a=m(a,0),n=m(n,6),Math.ceil(de(a,n)/r.DAYS_IN.WEEK)}const se={Sun:new Date("2020-01-05T00:00:00.000Z"),Mon:new Date("2020-01-06T00:00:00.000Z"),Tue:new Date("2020-01-07T00:00:00.000Z"),Wed:new Date("2020-01-08T00:00:00.000Z"),Thu:new Date("2020-01-09T00:00:00.000Z"),Fri:new Date("2020-01-10T00:00:00.000Z"),Sat:new Date("2020-01-11T00:00:00.000Z")};function ce(){const e=()=>"",r={long:{timeZone:"UTC",weekday:"long"},short:{timeZone:"UTC",weekday:"short"},narrow:{timeZone:"UTC",weekday:"narrow"}};return"undefined"===typeof Intl||"undefined"===typeof Intl.DateTimeFormat?e:t;function t(t,e,a){try{const n=new Intl.DateTimeFormat(a||void 0,r[e]||r["long"]);return n.format(se[t])}catch(e){return e instanceof Error&&console.error(`Intl.DateTimeFormat: ${e.message} -> day of week: `+t),""}}}function me(t,a){const e=Object.keys(se),n=ce();return e.map(e=>String(n(e,t,a)))}function ve(){const e=()=>"",o={long:{timeZone:"UTC",month:"long"},short:{timeZone:"UTC",month:"short"},narrow:{timeZone:"UTC",month:"narrow"}};return"undefined"===typeof Intl||"undefined"===typeof Intl.DateTimeFormat?e:t;function t(t,e,a){try{const n=new Intl.DateTimeFormat(a||void 0,o[e]||o["long"]),r=new Date;return r.setDate(1),r.setMonth(t),n.format(r)}catch(e){return e instanceof Error&&console.error(`Intl.DateTimeFormat: ${e.message} -> month: `+t),""}}}function fe(t,a){const n=ve();return[...Array(12).keys()].map(e=>n(e,t,a))}var v={PARSE_DATETIME:i,PARSE_DATE:f,PARSE_TIME:y,DAYS_IN_MONTH:k,DAYS_IN_MONTH_LEAP:b,DAYS_IN_MONTH_MIN:T,DAYS_IN_MONTH_MAX:C,MONTH_MAX:A,MONTH_MIN:I,DAY_MIN:N,TIME_CONSTANTS:r,FIRST_HOUR:F,today:Ie,getStartOfWeek:Z,getEndOfWeek:z,getStartOfMonth:_,getEndOfMonth:S,parseTime:P,validateTimestamp:t,parsed:Ae,parseTimestamp:Ne,parseDate:O,getDayIdentifier:Fe,getTimeIdentifier:l,getDayTimeIdentifier:$,diffTimestamp:U,updateRelative:j,updateMinutes:R,updateWeekday:g,updateDayOfYear:L,updateWorkWeek:B,updateDisabled:Y,updateFormatted:w,getDayOfYear:a,getWorkWeek:n,getWeekday:u,isLeapYear:M,daysInMonth:d,copyTimestamp:K,padNumber:o,getDate:s,getTime:c,getDateTime:X,nextDay:h,prevDay:p,relativeDays:D,findWeekday:m,createDayList:J,createIntervalList:ee,createNativeLocaleFormatter:Q,makeDate:te,makeDateTime:ae,validateNumber:e,isBetweenDates:oe,isOverlappingDates:ue,daysBetween:de,weeksBetween:le,addToDate:G,compareTimestamps:W,compareDate:q,compareTime:x,compareDateTime:H,getWeekdayFormatter:ce,getWeekdayNames:me,getMonthFormatter:ve,getMonthNames:fe},v=Object.freeze({__proto__:null,DAYS_IN_MONTH:k,DAYS_IN_MONTH_LEAP:b,DAYS_IN_MONTH_MAX:C,DAYS_IN_MONTH_MIN:T,DAY_MIN:N,FIRST_HOUR:F,MONTH_MAX:A,MONTH_MIN:I,PARSE_DATE:f,PARSE_DATETIME:i,PARSE_TIME:y,TIME_CONSTANTS:r,addToDate:G,compareDate:q,compareDateTime:H,compareTime:x,compareTimestamps:W,copyTimestamp:K,createDayList:J,createIntervalList:ee,createNativeLocaleFormatter:Q,daysBetween:de,daysInMonth:d,default:v,diffTimestamp:U,findWeekday:m,getDate:s,getDateTime:X,getDayIdentifier:Fe,getDayOfYear:a,getDayTimeIdentifier:$,getEndOfMonth:S,getEndOfWeek:z,getMonthFormatter:ve,getMonthNames:fe,getStartOfMonth:_,getStartOfWeek:Z,getTime:c,getTimeIdentifier:l,getWeekday:u,getWeekdayFormatter:ce,getWeekdayNames:me,getWorkWeek:n,isBetweenDates:oe,isLeapYear:M,isOverlappingDates:ue,isToday:E,makeDate:te,makeDateTime:ae,maxTimestamp:ne,minTimestamp:re,moveRelativeDays:V,nextDay:h,padNumber:o,parseDate:O,parseTime:P,parseTimestamp:Ne,parsed:Ae,prevDay:p,relativeDays:D,today:Ie,updateDayOfYear:L,updateDisabled:Y,updateFormatted:w,updateMinutes:R,updateRelative:j,updateWeekday:g,updateWorkWeek:B,validateNumber:e,validateTimestamp:t,weeksBetween:le});function Oe(e,t="px"){if(e)return isNaN(e)?String(e):"auto"===e?e:""+Number(e)+t}function ye(t,a){for(let e=0;e<t.length;e++)if(!0===a(t[e],e))return e;return-1}function Me(e,t){return 0===t?e:e.slice(0,t)}var he={convertToUnit:Oe,indexOf:ye,minCharWidth:Me},he=Object.freeze({__proto__:null,convertToUnit:Oe,default:he,indexOf:ye,minCharWidth:Me});const Ee={mounted(e,t){if("function"===typeof t.value){const a=t.value,n={callback:a,size:{width:0,height:0},observer:new ResizeObserver(e=>{const t=e[0].contentRect;t.width===n.size.width&&t.height===n.size.height||(n.size.width=t.width,n.size.height=t.height,n.debounceTimeout&&clearTimeout(n.debounceTimeout),n.debounceTimeout=setTimeout(()=>{n.callback(n.size),n.debounceTimeout=void 0},100))})};n.observer.observe(e),e.__onResizeObserver=n}},beforeUnmount(e){if(e.__onResizeObserver){const{observer:t,debounceTimeout:a}=e.__onResizeObserver;a&&clearTimeout(a),t.unobserve(e),delete e.__onResizeObserver}}};function We(t,a,{scrollArea:e,pane:n}){if(!a){const s="[error: renderCalendar] no renderFunc has been supplied to useCalendar";throw console.error(s),new Error(s)}const r=Ce.reactive({width:0,height:0}),o=Ce.ref(null);function u({width:e,height:t}){r.width=e,r.height=t}const i=Ce.computed(()=>{return!0!==t.noScroll&&e.value&&n.value&&r.height?e.value.offsetWidth-n.value.offsetWidth:0});function d(){}function l(){const e={ref:o,role:"complementary",lang:t.locale,class:`q-calendar ${t.dark?"q-calendar--dark":""} `+(t.bordered?"q-calendar__bordered":"")};return Ce.withDirectives(Ce.h("div",{...e},[a()]),[[Ee,u]])}return{rootRef:o,scrollWidth:i,__initCalendar:d,__renderCalendar:l}}const pe=e=>e.every(e=>["day","date","weekday","interval","time","resource","task"].includes(e)),ge={modelValue:{type:String,default:Ie(),validator:e=>""===e||t(e)},weekdays:{type:Array,default:()=>[0,1,2,3,4,5,6]},dateType:{type:String,default:"round",validator:e=>["round","rounded","square"].includes(e)},weekdayAlign:{type:String,default:"center",validator:e=>["left","center","right"].includes(e)},dateAlign:{type:String,default:"center",validator:e=>["left","center","right"].includes(e)},bordered:Boolean,dark:Boolean,noAria:Boolean,noActiveDate:Boolean,noHeader:Boolean,noScroll:Boolean,shortWeekdayLabel:Boolean,noDefaultHeaderText:Boolean,noDefaultHeaderBtn:Boolean,minWeekdayLabel:{type:[Number,String],default:1},weekdayBreakpoints:{type:Array,default:()=>[75,35],validator:e=>2===e.length},locale:{type:String,default:"en-US"},animated:Boolean,transitionPrev:{type:String,default:"slide-right"},transitionNext:{type:String,default:"slide-left"},disabledDays:Array,disabledBefore:String,disabledAfter:String,disabledWeekdays:{type:Array,default:()=>[]},dragEnterFunc:Function,dragOverFunc:Function,dragLeaveFunc:Function,dropFunc:Function,selectedDates:{type:[Array,Set],default:()=>[]},selectedStartEndDates:{type:Array,default:()=>[]},hoverable:Boolean,focusable:Boolean,focusType:{type:Array,default:()=>["date"],validator:pe}};function qe(t,{startDate:e,endDate:a,times:n}){const r=Ce.computed(()=>Ne(e.value)),o=Ce.computed(()=>{return"0000-00-00"===a.value?z(r.value,t.weekdays,n.today):Ne(a.value)||r.value}),u=Ce.computed(()=>Q(t.locale,()=>({timeZone:"UTC",day:"numeric"}))),i=Ce.computed(()=>Q(t.locale,(e,t)=>({timeZone:"UTC",weekday:t?"short":"long"}))),d=Ce.computed(()=>Q(t.locale,()=>({timeZone:"UTC",dateStyle:"full"})));function l(e,t){return e&&e.length>0&&e.includes(t.date)}function s(e,t){const a={firstDay:!1,betweenDays:!1,lastDay:!1};if(2===e.length){const n=Fe(t),r=Fe(Ae(e[0])),o=Fe(Ae(e[1]));a.firstDay=r===n,a.lastDay=o===n,a.betweenDays=r<n&&o>n}return a}function c(e,t=!1,a=[],n=[],r=!1){const o=l(a,e),{firstDay:u,lastDay:i,betweenDays:d}=s(n,e);return{"q-past-day":!u&&!d&&!i&&!o&&!t&&!!e.past,"q-future-day":!u&&!d&&!i&&!o&&!t&&!!e.future,"q-outside":t,"q-current-day":!!e.current,"q-selected":o,"q-range-first":u,"q-range":d,"q-range-last":i,"q-range-hover":r&&(u||i||d),"q-disabled-day disabled":!0===e.disabled}}function m(e){return Z(e,t.weekdays,n.today)}function v(e){return z(e,t.weekdays,n.today)}function f(){return{}}return{parsedStart:r,parsedEnd:o,dayFormatter:u,weekdayFormatter:i,ariaDateFormatter:d,arrayHasDate:l,checkDays:s,getRelativeClasses:c,startOfWeek:m,endOfWeek:v,dayStyleDefault:f}}function we(e,t){e instanceof Window?e.scrollTo({top:t,behavior:"instant"}):e.scrollTop=t}function De(e){return e instanceof Window?e.scrollY:e.scrollTop}function ke(o,u,i=500,d=performance.now(),l=De(o)){i<=0||l===u?we(o,u):requestAnimationFrame(e=>{const t=e-d,a=Math.min(t/i,1),n=e=>e<.5?2*e*e:(4-2*e)*e-1,r=l+(u-l)*n(a);we(o,r),a<1&&ke(o,u,i,d,l)})}function be(r,e,o=500){const u=r.scrollLeft,i=e-u;let d=null;function l(e){null===d&&(d=e);const t=e-d,a=Math.min(t/o,1),n=e=>e<.5?2*e*e:(4-2*e)*e-1;r.scrollLeft=u+i*n(a),t<o&&requestAnimationFrame(l)}requestAnimationFrame(l)}const Te={view:{type:String,validator:e=>["day","week","month","month-interval"].includes(e),default:"day"},leftColumnOptions:{type:Array},rightColumnOptions:{type:Array},columnOptionsId:{type:String},columnOptionsLabel:{type:String},weekdayStyle:{type:Function,default:null},weekdayClass:{type:Function,default:null},dayStyle:{type:Function,default:null},dayClass:{type:Function,default:null},dateHeader:{type:String,default:"stacked",validator:e=>["stacked","inline","inverted"].includes(e)},dayHeight:{type:[Number,String],default:0,validator:e},dayMinHeight:{type:[Number,String],default:40,validator:e}};function xe(o,{times:t,scrollArea:n,parsedStart:e,parsedEnd:a,maxDays:r,size:u,headerColumnRef:i}){const d=Ce.computed(()=>parseInt(String(o.intervalStart),10)),m=Ce.computed(()=>parseInt(String(o.intervalMinutes),10)),l=Ce.computed(()=>parseInt(String(o.intervalCount),10)),v=Ce.computed(()=>parseFloat(String(o.intervalHeight))),f=Ce.computed(()=>{let e=0;const t=Number(o.columnCount);return o.cellWidth?e=Number(o.cellWidth):u.width>0&&i.value&&(e=i.value.offsetWidth/(t>1?t:r.value)),e}),s=Ce.computed(()=>d.value*m.value),c=Ce.computed(()=>l.value*v.value),y=Ce.computed(()=>l.value*f.value),h=Ce.computed(()=>D(e.value)),p=Ce.computed(()=>k(a.value)),g=Ce.computed(()=>{return J(e.value,a.value,t.today,o.weekdays,o.disabledBefore,o.disabledAfter,o.disabledWeekdays,o.disabledDays,r.value)}),w=Ce.computed(()=>{return g.value.map(e=>ee(e,d.value,m.value,l.value,t.now))});function D(e){return Z(e,o.weekdays,t.today)}function k(e){return z(e,o.weekdays,t.today)}function b(e,t){return e&&e.length>0&&e.includes(X(t))}function T(e,t){const a={firstDay:!1,betweenDays:!1,lastDay:!1};if(e&&2===e.length){const n=$(t),r=$(Ae(e[0])),o=$(Ae(e[1]));a.firstDay=r===n,a.lastDay=o===n,a.betweenDays=r<n&&o>n}return a}function _(e,t=[],a=[]){const n=b(t,e),{firstDay:r,lastDay:o,betweenDays:u}=T(a,e);return{"q-selected":n,"q-range-first":!0===r,"q-range":!0===u,"q-range-last":!0===o,"q-disabled-interval disabled":!0===e.disabled}}function S(e,t,a){return[]}const C=Ce.computed(()=>{const a={timeZone:"UTC",hour12:!o.hour24Format,hour:"2-digit",minute:"2-digit"},n={timeZone:"UTC",hour12:!o.hour24Format,hour:"numeric",minute:"2-digit"},r={timeZone:"UTC",hour12:!o.hour24Format,hour:"numeric"};return Q(o.locale,(e,t)=>t?0===e.minute?r:n:a)}),A=Ce.computed(()=>{const e={timeZone:"UTC",dateStyle:"full",timeStyle:"short"};return Q(o.locale,()=>e)});function I(e){const t=w.value[0][0],a=t.hour===e.hour&&t.minute===e.minute;return!a&&0===e.minute}function N(e){}function F(e){return{}}function O(e,t,a=!1,n){let r=K(t);if(e.currentTarget){const o=e.currentTarget.getBoundingClientRect(),u=e,i=e,d=u.changedTouches||u.touches,l=(d&&d[0]?d[0]:i).clientY,s=(l-o.top)/v.value,c=Math.floor((a?Math.floor(s):s)*m.value);0!==c&&(r=G(r,{minute:c})),n&&(r=j(r,n,!0))}return r}function x(e,t,a=!1,n){let r=K(t);const o=e.currentTarget.getBoundingClientRect(),u=e,i=e,d=u.changedTouches||u.touches,l=(d&&d[0]?d[0]:i).clientY,s=(l-o.top)/v.value,c=Math.floor((a?Math.floor(s):s)*m.value);return 0!==c&&(r=G(r,{minute:c})),n&&(r=j(r,n,!0)),r}function H(e,t,a=!1,n){let r=K(t);if(e.currentTarget){const o=e.currentTarget.getBoundingClientRect(),u=e,i=e,d=u.changedTouches||u.touches,l=(d&&d[0]?d[0]:i).clientX,s=(l-o.left)/f.value,c=Math.floor((a?Math.floor(s):s)*m.value);0!==c&&(r=G(r,{minute:c})),n&&(r=j(r,n,!0))}return r}function U(e,t){const a={timestamp:e,timeStartPos:W,timeDurationHeight:M};return void 0!==t&&(a.columnIndex=t),a}function R(e,t){const a={timestamp:K(e),timeStartPosX:q,timeDurationWidth:E};return void 0!==t&&(a.index=t),a}function L(e,t=0){const a=W(e);return!(!1===a||!n.value)&&(ke(n.value,a,t),!0)}function B(e,t=0){const a=q(e);return!(!1===a||!n.value)&&(be(n.value,a,t),!0)}function M(e){return e/m.value*v.value}function E(e){return e/m.value*f.value}function Y(e){return e*m.value/v.value}function V(e){return e*m.value/f.value}function W(e,t=!0){const a=P(e);if(!1===a)return!1;const n=s.value,r=l.value*m.value,o=(a-n)/r;let u=o*c.value;return t&&(u<0&&(u=0),u>c.value)&&(u=c.value),u}function q(e,t=!0){const a=P(e);if(!1===a)return!1;const n=s.value,r=l.value*m.value,o=(a-n)/r;let u=o*y.value;return t&&(u<0&&(u=0),u>y.value)&&(u=y.value),u}return{parsedIntervalStart:d,parsedIntervalMinutes:m,parsedIntervalCount:l,parsedIntervalHeight:v,parsedCellWidth:f,parsedStartMinute:s,bodyHeight:c,bodyWidth:y,parsedWeekStart:h,parsedWeekEnd:p,days:g,intervals:w,intervalFormatter:C,ariaDateTimeFormatter:A,arrayHasDateTime:b,checkIntervals:T,getIntervalClasses:_,getResourceClasses:S,showIntervalLabelDefault:I,showResourceLabelDefault:N,styleDefault:F,getTimestampAtEventInterval:O,getTimestampAtEvent:x,getTimestampAtEventX:H,getScopeForSlot:U,getScopeForSlotX:R,scrollToTime:L,scrollToTimeX:B,timeDurationHeight:M,timeDurationWidth:E,heightToMinutes:Y,widthToMinutes:V,timeStartPos:W,timeStartPosX:q}}const _e={columnCount:{type:[Number,String],default:0,validator:e},columnIndexStart:{type:[Number,String],default:0,validator:e}},Se={maxDays:{type:Number,default:1}},He={now:{type:String,validator:e=>""===e||t(e),default:""}};function Ue(e){const t=Ce.reactive({now:Ne("0000-00-00 00:00"),today:Ne("0000-00-00")}),a=Ce.computed(()=>e.now?Ne(e.now):o());function n(){t.now&&t.today&&(t.now.current=t.today.current=!0,t.now.past=t.today.past=!1,t.now.future=t.today.future=!1)}function r(){const e=a.value||o();u(e,t.now),i(e,t.now),u(e,t.today)}function o(){return O(new Date)}function u(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)}function i(e,t){e.time!==t.time&&(t.hour=e.hour,t.minute=e.minute,t.time=e.time)}return Ce.watch(a,()=>r()),{times:t,parsedNow:a,setCurrent:n,updateCurrent:r,getNow:o,updateDay:u,updateTime:i}}function Re(r,{parsedView:o,parsedValue:u,times:i}){const e=Ce.computed(()=>{const e=u.value;let t=r.maxDays,a=e,n=e;switch(o.value){case"month":a=_(e),n=S(e),t=d(a.year,a.month);break;case"week":case"week-agenda":case"week-scheduler":a=Z(e,r.weekdays,i.today),n=z(a,r.weekdays,i.today),t=r.weekdays.length;break;case"day":case"scheduler":case"agenda":n=V(K(n),h,t>1?t-1:t,r.weekdays),n=w(n);break;case"month-interval":case"month-scheduler":case"month-agenda":a=_(e),n=S(e),n=w(n),t=d(a.year,a.month);break;case"resource":t=1,n=V(K(n),h,t,r.weekdays),n=w(n);break}return{start:a,end:n,maxDays:t}});return{renderValues:e}}const Le=e=>e.replace(/(-\w)/g,e=>e[1].toUpperCase());function Be(t,e,a,n){const r={};for(const o in a){const u=a[o],i=Le("on-"+o);if(!e.value)return console.warn("$listeners has not been set up"),{};if(void 0!==e.value[i]){const d="on"+u.event.charAt(0).toUpperCase()+u.event.slice(1),l=e=>{return(void 0===u.button||"buttons"in e&&e.buttons>0&&e.button===u.button)&&(u.prevent&&e.preventDefault(),u.stop&&e.stopPropagation(),t(o,n(e,o))),u.result};d in r?Array.isArray(r[d])?r[d].push(l):r[d]=[r[d],l]:r[d]=l}}return r}function Ye(e,t,a,n){return Be(e,t,Ve(a),n)}function Ve(e){return{["click"+e]:{event:"click"},["contextmenu"+e]:{event:"contextmenu",prevent:!0,result:!1},["mousedown"+e]:{event:"mousedown"},["mousemove"+e]:{event:"mousemove"},["mouseup"+e]:{event:"mouseup"},["mouseenter"+e]:{event:"mouseenter"},["mouseleave"+e]:{event:"mouseleave"},["touchstart"+e]:{event:"touchstart"},["touchmove"+e]:{event:"touchmove"},["touchend"+e]:{event:"touchend"}}}function Ze(e){return Object.keys(Ve(e))}function ze(a,n){return{getMouseEventHandlers:(e,t)=>Be(a,n,e,t),getDefaultMouseEventHandlers:(e,t)=>Ye(a,n,e,t),getMouseEventName:Ve,getRawMouseEvents:Ze}}const Pe=["moved"];function $e(d,{parsedView:l,parsedValue:s,direction:c,maxDays:m,times:v,emittedValue:f,emit:y}){function e(a=1){if(0===a)f.value=Ie();else{let e=K(s.value);const n=S(e),r=a>0,o=r?h:p,u=r?n.day:1;let t=r?a:-a;c.value=r?"next":"prev";const i=d.weekdays.length;while(--t>=0)switch(l.value){case"month":e.day=u,e=o(e),e=g(e);while(!d.weekdays.includes(Number(e.weekday)))e=G(e,{day:r?1:-1});break;case"week":case"week-agenda":case"week-scheduler":e=D(e,o,i,d.weekdays);break;case"day":case"scheduler":case"agenda":e=D(e,o,m.value,d.weekdays);break;case"month-interval":case"month-agenda":case"month-scheduler":e.day=u,e=o(e);break;case"resource":e=D(e,o,m.value,d.weekdays);break}e=g(e),e=w(e),e=L(e),e=j(e,v.now),f.value=e.date,y("moved",e)}}return{move:e}}const je=/^on[A-Z]/;function Ke(e=Ce.getCurrentInstance()){return{emitListeners:Ce.computed(()=>{const t={};return e?.vnode?.props&&Object.keys(e.vnode.props).forEach(e=>{je.test(e)&&(t[e]=!0)}),t})}}function Xe(){const e={"aria-hidden":"true",class:"q-calendar__focus-helper"};return[Ce.h("span",e)]}function Qe(){function e({focusable:e,focusType:t},a,n){const r=e&&t.includes("date");return Ce.h("button",{...a,tabindex:r?0:-1},[n,r&&Xe()])}return{renderButton:e}}const Ge={cellWidth:[Number,String]};function Je(e){const t=Ce.computed(()=>void 0!==e.cellWidth);return{isSticky:t}}const et=["change"];function tt(n,{days:r,lastStart:o,lastEnd:u}){function e(){const e=r.value;if(0===e.length)return!1;const t=e[0].date,a=e[e.length-1].date;return(!o.value||!u.value||t!==o.value||a!==u.value)&&(o.value=t,u.value=a,n("change",{start:t,end:a,days:e}),!0)}return{checkChange:e}}function at(){function e(e,t){return(Array.isArray(t)?t:[t]).includes(e.keyCode)}return{isKeyCode:e}}const nt=at().isKeyCode,rt={useNavigation:Boolean};function ot(t,{rootRef:a,focusRef:n,focusValue:r,datesRef:o,parsedView:u,emittedValue:i,direction:d,times:l}){let e=!1;function s(){e||document&&(e=!0,document.addEventListener("keyup",y),document.addEventListener("keydown",f))}function c(){document&&(document.removeEventListener("keyup",y),document.removeEventListener("keydown",f),e=!1)}function m(e){if(e&&document){const t=document.activeElement;if(t!==document.body&&a.value?.contains(t))return!0}return!1}function v(){let t=0;const a=window.setInterval(()=>{const e=o.value[n.value];e&&(e.focus(),50!==++t)&&document.activeElement!==e||window.clearInterval(a)},250)}function f(e){m(e)&&nt(e,[33,34,35,36,37,38,39,40])&&(e.stopPropagation(),e.preventDefault())}function y(e){if(m(e)&&nt(e,[33,34,35,36,37,38,39,40])){const t={33:D,34:k,35:T,36:b,37:g,38:h,39:w,40:p};t[e.keyCode]?.()}}function h(){let e=K(r.value);if("month"===u.value){if(e=G(e,{day:-7}),r.value.month!==e.month)return d.value="prev",void(i.value=e.date)}else e=G(e,{minute:Number(t.intervalMinutes)});d.value="prev",n.value=e.date}function p(){let e=K(r.value);if("month"===u.value){if(e=G(e,{day:7}),r.value.month!==e.month)return d.value="next",void(i.value=e.date)}else e=G(e,{minute:Number(t.intervalMinutes)});d.value="next",n.value=e.date}function g(){let e=K(r.value);d.value="prev";do{e=G(e,{day:-1})}while(!t.weekdays.includes(Number(e.weekday)));n.value=e.date}function w(){let e=K(r.value);d.value="next";do{e=G(e,{day:1})}while(!t.weekdays.includes(Number(e.weekday)));n.value=e.date}function D(){let e=K(r.value);e="month"===u.value?G(e,{month:-1}):G(e,{day:-7}),d.value="prev",n.value=e.date}function k(){let e=K(r.value);e="month"===u.value?G(e,{month:1}):G(e,{day:7}),d.value="next",n.value=e.date}function b(){let e=K(r.value);e="month"===u.value?_(e):Z(e,t.weekdays||[],l.today);while(!t.weekdays.includes(Number(e.weekday)))e=G(e,{day:-1});n.value=e.date}function T(){let e=K(r.value);e="month"===u.value?S(e):z(e,t.weekdays||[],l.today);while(!t.weekdays.includes(Number(e.weekday)))e=G(e,{day:-1});n.value=e.date}return Ce.onBeforeUnmount(()=>{c()}),Ce.watch(()=>t.useNavigation,e=>{(!0===e?s:c)()}),!0===t.useNavigation&&s(),{startNavigation:s,endNavigation:c,tryFocus:v}}const ut=Qe().renderButton;var it=Ce.defineComponent({name:"QCalendarAgenda",directives:{ResizeObserver:Ee},props:{...ge,...Te,..._e,...Se,...He,...Ge,...rt},emits:["update:model-value",...et,...Pe,...Ze("-date"),...Ze("-head-day"),...Ze("-time")],setup(m,{slots:v,emit:i,expose:x}){const e=Ce.ref(null),t=Ce.ref(null),H=Ce.ref(null),f=Ce.ref(m.modelValue||Ie()),a=Ce.ref(Ae(m.modelValue||Ie())),y=Ce.ref({}),n=Ce.ref(),r=Ce.ref(),u=Ce.ref("next"),d=Ce.ref(m.modelValue||Ie()),l=Ce.ref("0000-00-00"),s=Ce.ref(0),c=Ce.ref(m.modelValue),h=Ce.reactive({width:0,height:0}),p=Ce.ref(""),U=Ce.ref(null),R=Ce.ref(null),o=(Ce.watch(()=>m.view,()=>{s.value=0}),Ce.computed(()=>{return"month"===m.view?"month-interval":m.view})),L=Ce.getCurrentInstance();if(null===L)throw new Error("current instance is null");const B=Ke(L).emitListeners,g=Je(m).isSticky,{times:w,setCurrent:Y,updateCurrent:V}=(Ce.watch(g,()=>{}),Ue(m)),{parsedStart:Z,parsedEnd:z,dayFormatter:P,weekdayFormatter:$,ariaDateFormatter:j,dayStyleDefault:K,getRelativeClasses:D}=(V(),Y(),qe(m,{startDate:d,endDate:l,times:w})),k=Ce.computed(()=>{return Ne(m.modelValue,w.now)||Z.value||w.today}),X=(a.value=k.value,f.value=k.value.date,Re(m,{parsedView:o,parsedValue:k,times:w})).renderValues,{rootRef:b,scrollWidth:Q,__renderCalendar:G}=We(m,Se,{scrollArea:e,pane:t}),{days:T,parsedCellWidth:J,getScopeForSlot:_}=xe(m,{times:w,scrollArea:e,parsedStart:Z,parsedEnd:z,maxDays:s,size:h,headerColumnRef:H}),S=$e(m,{parsedView:o,parsedValue:k,direction:u,maxDays:s,times:w,emittedValue:c,emit:i}).move,C=ze(i,B).getDefaultMouseEventHandlers,ee=tt(i,{days:T,lastStart:U,lastEnd:R}).checkChange,te=at().isKeyCode,ae=ot(m,{rootRef:b,focusRef:f,focusValue:a,datesRef:y,parsedView:o,emittedValue:c,direction:u,times:w}).tryFocus,A=Ce.computed(()=>{return T.value.length+(!0===I.value?m.leftColumnOptions.length:0)+(!0===N.value?m.rightColumnOptions.length:0)+T.value.length===1&&parseInt(String(m.columnCount),10)>0?parseInt(String(m.columnCount),10):0}),I=Ce.computed(()=>{return void 0!==m.leftColumnOptions&&Array.isArray(m.leftColumnOptions)}),N=Ce.computed(()=>{return void 0!==m.rightColumnOptions&&Array.isArray(m.rightColumnOptions)}),F=Ce.computed(()=>{if(b.value){const e=h.width||b.value.getBoundingClientRect().width;if(e&&A.value)return(e-Q.value)/A.value+"px"}return 100/A.value+"%"});function ne(){c.value=Ie()}function re(e=1){S(e)}function oe(e=1){S(-e)}function ue({width:e,height:t}){h.width=e,h.height=t}function O(e){return e.date===c.value}function M(t,a){const e=v["head-column"],n={column:t,index:a,days:T.value},r=!0===g.value?m.cellWidth:F.value,o=!0===m.focusable&&m.focusType.includes("weekday"),u=void 0!==m.columnOptionsId?t[m.columnOptionsId]:"id",i={maxWidth:r,width:r};return Ce.h("div",{key:u,tabindex:!0===o?0:-1,class:{"q-calendar-agenda__head--day":!0,"q-column-day":!0,"q-calendar__hoverable":!0===m.hoverable,"q-calendar__focusable":!0===o},style:i,onDragenter:e=>{void 0!==m.dragEnterFunc&&"function"===typeof m.dragEnterFunc&&(!0===m.dragEnterFunc(e,"head-column",{scope:n})?p.value=u:p.value="")},onDragover:e=>{void 0!==m.dragOverFunc&&"function"===typeof m.dragOverFunc&&(!0===m.dragOverFunc(e,"head-column",{scope:n})?p.value=u:p.value="")},onDragleave:e=>{void 0!==m.dragLeaveFunc&&"function"===typeof m.dragLeaveFunc&&(!0===m.dragLeaveFunc(e,"head-column",{scope:n})?p.value=u:p.value="")},onDrop:e=>{void 0!==m.dropFunc&&"function"===typeof m.dropFunc&&(!0===m.dropFunc(e,"head-column",{scope:n})?p.value=u:p.value="")},...C("-head-column",e=>{return{scope:{column:t,index:a},event:e}})},[!0!==m.noDefaultHeaderText&&ie(t),e&&e(n),Xe()])}function ie(e){const t=v["head-column-label"],a={column:e},n=void 0!==m.columnOptionsLabel?e[m.columnOptionsLabel]:e.label,r=Ce.h("div",{class:{"q-calendar-agenda__head--weekday":!0,["q-calendar__"+m.weekdayAlign]:!0,ellipsis:!0},style:{alignSelf:"center"}},[t&&t({scope:a}),!t&&Ce.h("span",{class:"ellipsis"},n)]);return"stacked"===m.dateHeader?r:Ce.h("div",{class:"q-calendar__header--inline",style:{height:"100%"}},[r])}function de(){return Ce.h("div",{roll:"presentation",class:{"q-calendar-agenda__head":!0,"q-calendar__sticky":!0===g.value},style:{marginRight:Q.value+"px"}},[le()])}function le(){return Ce.h("div",{ref:H,class:{"q-calendar-agenda__head--days__column":!0}},[se(),ce()])}function se(){return Ce.h("div",{class:{"q-calendar-agenda__head--days__weekdays":!0}},me())}function ce(){const e=v["head-days-events"];return Ce.nextTick(()=>{if(r.value&&0===m.columnCount&&window)try{const e=window.getComputedStyle(r.value);n.value&&n.value.parentElement&&(n.value.parentElement.style.height=e.height,n.value.style.height=e.height)}catch{}}),Ce.h("div",{class:{"q-calendar-agenda__head--days__event":!0}},[e&&Ce.h("div",{ref:n,style:{position:"absolute",left:0,top:0,right:0,overflow:"hidden",zIndex:1}},[e({scope:{days:T.value,ref:r}})]),...ve()])}function me(){const e=parseInt(String(m.columnCount),10),a=parseInt(String(m.columnIndexStart),10);return(1===T.value.length&&e>0?[!0===I.value?m.leftColumnOptions.map((e,t)=>M(e,t)):[],...Array.apply(null,new Array(e)).map((e,t)=>t+a).map(e=>fe(T.value[0],e)),!0===N.value?m.rightColumnOptions.map((e,t)=>M(e,t)):[]]:[!0===I.value?m.leftColumnOptions.map((e,t)=>M(e,t)):[],...T.value.map(e=>fe(e)),!0===N.value?m.rightColumnOptions.map((e,t)=>M(e,t)):[]]).flat()}function ve(){const a=parseInt(String(m.columnCount),10);return 1===T.value.length&&a>0?[...Array.apply(null,new Array(parseInt(String(m.columnCount),10))).map((e,t)=>t+a).map(e=>he(T.value[0],e))]:T.value.map(e=>he(e,0))}function fe(t,e){const a=v["head-day"],n=v["head-date"],r=!0!==m.noActiveDate&&O(t),o=_(t,e??0),u=(o.activeDate=r,o.droppable=p.value===t.date,o.disabled=!!m.disabledWeekdays&&m.disabledWeekdays.includes(Number(t.weekday)),!0===g.value?m.cellWidth:F.value),i=m.weekdayStyle||K,d={width:u,maxWidth:u,...i({scope:o})},l=(!0===g.value&&(d.minWidth=u),"function"===typeof m.weekdayClass?m.weekdayClass({scope:o}):{}),s=!0===m.focusable&&m.focusType.includes("weekday"),c={key:t.date+(void 0!==e?"-"+e:""),ref:e=>{y.value[t.date]=e},tabindex:!0===s?0:-1,class:{"q-calendar-agenda__head--day":!0,...l,...D(t),"q-active-date":r,"q-calendar__hoverable":!0===m.hoverable,"q-calendar__focusable":!0===s},style:d,onDragenter:e=>{void 0!==m.dragEnterFunc&&"function"===typeof m.dragEnterFunc&&(!0===m.dragEnterFunc(e,"head-day",{scope:o})?p.value=t.date:p.value="")},onDragover:e=>{void 0!==m.dragOverFunc&&"function"===typeof m.dragOverFunc&&(!0===m.dragOverFunc(e,"head-day",{scope:o})?p.value=t.date:p.value="")},onDragleave:e=>{void 0!==m.dragLeaveFunc&&"function"===typeof m.dragLeaveFunc&&(!0===m.dragLeaveFunc(e,"head-day",{scope:o})?p.value=t.date:p.value="")},onDrop:e=>{void 0!==m.dropFunc&&"function"===typeof m.dropFunc&&(!0===m.dropFunc(e,"head-day",{scope:o})?p.value=t.date:p.value="")},onFocus:()=>{!0===s&&(f.value=t.date)},...C("-head-day",e=>{return{scope:o,event:e}})};return Ce.h("div",c,[void 0!==a&&a({scope:o}),void 0===a&&ye(t),void 0===a&&n&&n({scope:o}),Xe()])}function ye(e){return"stacked"===m.dateHeader?[!0!==m.noDefaultHeaderText&&E(e),!0!==m.noDefaultHeaderBtn&&W(e)].filter(e=>!1!==e):"inline"===m.dateHeader?("left"===m.weekdayAlign&&"right"===m.dateAlign||"right"===m.weekdayAlign&&m.dateAlign,Ce.h("div",{class:"q-calendar__header--inline"},[!0!==m.noDefaultHeaderText&&E(e),!0!==m.noDefaultHeaderBtn&&W(e)])):"inverted"===m.dateHeader?("left"===m.weekdayAlign&&"right"===m.dateAlign||"right"===m.weekdayAlign&&m.dateAlign,Ce.h("div",{class:"q-calendar__header--inline"},[!0!==m.noDefaultHeaderBtn&&W(e),!0!==m.noDefaultHeaderText&&E(e)])):void 0}function he(e,t){const a=v["head-day-event"],n=!0!==m.noActiveDate&&O(e),r=_(e,t),o=(r.activeDate=n,r.disabled=!!m.disabledWeekdays&&m.disabledWeekdays.includes(Number(e.weekday)),!0===g.value?m.cellWidth:F.value),u={width:o,maxWidth:o};return!0===g.value&&(u.minWidth=o),Ce.h("div",{key:"event-"+e.date+(void 0!==t?"-"+t:""),class:{"q-calendar-agenda__head--day__event":!0,...D(e),"q-active-date":n},style:u},[a&&a({scope:r})])}function E(e){const t=v["head-weekday-label"],a=_(e,0),n=(a.shortWeekdayLabel=m.shortWeekdayLabel,{class:{"q-calendar-agenda__head--weekday":!0,["q-calendar__"+m.weekdayAlign]:!0,"q-calendar__ellipsis":!0}});return Ce.h("div",n,t&&t({scope:a})||pe(e,m.shortWeekdayLabel))}function pe(e,t){const a=$.value(e,t||m.weekdayBreakpoints[0]>0&&J.value<=m.weekdayBreakpoints[0]);return Ce.h("span",{class:"q-calendar__ellipsis"},m.weekdayBreakpoints[1]>0&&J.value<=m.weekdayBreakpoints[1]?Me(a,Number(m.minWeekdayLabel)):a)}function W(e){const t={class:{"q-calendar-agenda__head--date":!0,["q-calendar__"+m.dateAlign]:!0}};return Ce.h("div",t,ge(e))}function ge(a){const e=!0!==m.noActiveDate&&O(a),t=P.value(a,!1),n=v["head-day-label"],r=v["head-day-button"],o={dayLabel:t,timestamp:a,activeDate:e,disabled:!!m.disabledWeekdays&&m.disabledWeekdays.includes(Number(a.weekday))},u={class:{"q-calendar-agenda__head--day__label":!0,"q-calendar__button":!0,"q-calendar__button--round":"round"===m.dateType,"q-calendar__button--rounded":"rounded"===m.dateType,"q-calendar__button--bordered":!0===a.current,"q-calendar__focusable":!0},disabled:a.disabled,onKeydown:e=>{!0!==a.disabled&&te(e,[13,32])&&(e.stopPropagation(),e.preventDefault())},onKeyup:e=>{!0!==a.disabled&&te(e,[13,32])&&(c.value=a.date,void 0!==B.value.onClickDate)&&i("click-date",{scope:o})},...C("-date",(e,t)=>{return"click-date"!==t&&"contextmenu-date"!==t||(c.value=a.date,"click-date"===t&&e.preventDefault()),{scope:o,event:e}})};return!0!==m.noAria&&(u.ariaLabel=j.value(a,!1)),r?r({scope:o}):ut(m,u,n?n({scope:o}):t)}function we(){return Ce.h("div",{class:"q-calendar-agenda__body"},[De()])}function De(){return!0===g.value?Ce.h("div",{ref:e,class:{"q-calendar-agenda__scroll-area":!0,"q-calendar__scroll":!0}},[be()]):!0===m.noScroll?ke():Ce.h("div",{ref:e,class:{"q-calendar-agenda__scroll-area":!0,"q-calendar__scroll":!0}},[ke()])}function ke(){return Ce.h("div",{ref:t,class:"q-calendar-agenda__pane"},[be()])}function be(){const e=v["day-container"];return Ce.h("div",{class:"q-calendar-agenda__day-container"},[!0===g.value&&!0!==m.noHeader&&de(),Ce.h("div",{style:{display:"flex",flexDirection:"row",height:"100%"}},[...Te()||[]].flat()),e&&e({scope:{days:T.value}})])}function Te(){const e=parseInt(String(m.columnCount),10),a=parseInt(String(m.columnIndexStart),10);return(1===T.value.length&&e>0?[!0===I.value?m.leftColumnOptions.map((e,t)=>q(e,t)):[],...Array.apply(null,new Array(e)).map((e,t)=>t+a).map(e=>_e(T.value[0],0,e)),!0===N.value?m.rightColumnOptions.map((e,t)=>q(e,t)):[]]:[!0===I.value?m.leftColumnOptions.map((e,t)=>q(e,t)):[],...T.value.map((e,t)=>_e(e,t,0)),!0===N.value?m.rightColumnOptions.map((e,t)=>q(e,t)):[]]).flat()}function q(e,t){const a=v.column,n={column:e,days:T.value,index:t},r=!0===g.value?m.cellWidth:F.value,o=!0===m.focusable&&m.focusType.includes("day"),u=void 0!==m.columnOptionsId?e[m.columnOptionsId]:void 0;return Ce.h("div",{key:u,tabindex:!0===o?0:-1,class:{"q-calendar-agenda__day":!0,"q-column-day":!0,"q-calendar__hoverable":!0===m.hoverable,"q-calendar__focusable":!0===o},style:{maxWidth:r,width:r},onDragenter:e=>{void 0!==m.dragEnterFunc&&"function"===typeof m.dragEnterFunc&&(!0===m.dragEnterFunc(e,"column",{scope:n})?p.value=u:p.value="")},onDragover:e=>{void 0!==m.dragOverFunc&&"function"===typeof m.dragOverFunc&&(!0===m.dragOverFunc(e,"column",{scope:n})?p.value=u:p.value="")},onDragleave:e=>{void 0!==m.dragLeaveFunc&&"function"===typeof m.dragLeaveFunc&&(!0===m.dragLeaveFunc(e,"column",{scope:n})?p.value=u:p.value="")},onDrop:e=>{void 0!==m.dropFunc&&"function"===typeof m.dropFunc&&(!0===m.dropFunc(e,"column",{scope:n})?p.value=u:p.value="")},...C("-column",e=>{return{scope:n,event:e}})},[a&&a({scope:n})])}function _e(e,t,a){const n=parseInt(String(m.dayHeight),10),r=parseInt(String(m.dayMinHeight),10),o=v.day,u=_(e,a),i=!0===g.value?m.cellWidth:F.value,d={width:i,maxWidth:i};return!0===g.value&&(d.minWidth=i),d.height=n>0?Oe(n):"auto",r>0&&(d.minHeight=Oe(r)),Ce.h("div",{key:e.date+(void 0!==a?":"+a:""),class:{"q-calendar-agenda__day":!0,...D(e)},style:d},[o&&o({scope:u})])}function Se(){const{start:e,end:t,maxDays:a}=X.value,n=(d.value===e.date&&l.value===t.date&&s.value===a||(d.value=e.date,l.value=t.date,s.value=a),h.width>0),r=Ce.withDirectives(Ce.h("div",{class:"q-calendar-agenda",key:d.value},[!0===n&&!0!==g.value&&!0!==m.noHeader&&de(),!0===n&&we()]),[[Ee,ue]]);if(!0!==m.animated)return r;{const o="q-calendar--"+("prev"===u.value?m.transitionPrev:m.transitionNext);return Ce.h(Ce.Transition,{name:o,appear:!0},()=>r)}}return Ce.watch([T],ee,{deep:!0,immediate:!0}),Ce.watch(()=>m.modelValue,(e,t)=>{if(c.value!==e){if(!0===m.animated){const a=Fe(Ae(e)),n=Fe(Ae(t));u.value=a>=n?"next":"prev"}c.value=e}f.value=e}),Ce.watch(c,(e,t)=>{if(c.value!==m.modelValue){if(!0===m.animated){const a=Fe(Ae(e)),n=Fe(Ae(t));u.value=a>=n?"next":"prev"}i("update:model-value",e)}}),Ce.watch(f,e=>{e&&(a.value=Ne(e))}),Ce.watch(a,()=>{f.value&&y.value[f.value]?y.value[f.value].focus():ae()}),Ce.watch(()=>m.maxDays,e=>{s.value=e}),Ce.onBeforeUpdate(()=>{y.value={}}),Ce.onMounted(()=>{}),x({prev:oe,next:re,move:S,moveToToday:ne,updateCurrent:V}),()=>G()}});const dt="4.1.1";v={version:dt,QCalendarAgenda:it,...v,...he,install(e){e.component(String(it.name),it)}};return v}); |
/*! | ||
* @quasar/quasar-ui-qcalendar v4.1.0 | ||
* @quasar/quasar-ui-qcalendar v4.1.1 | ||
* (c) 2025 Jeff Galbraith <jeff@quasar.dev> | ||
* Released under the MIT License. | ||
*/ | ||
var vue=require("vue");const PARSE_DATETIME=/^(\d{4})-(\d{1,2})(-(\d{1,2}))?([^\d]+(\d{1,2}))?(:(\d{1,2}))?(:(\d{1,2}))?(.(\d{1,3}))?$/,PARSE_DATE=/^(\d{4})-(\d{1,2})(-(\d{1,2}))?/,PARSE_TIME=/(\d\d?)(:(\d\d?)|)(:(\d\d?)|)/,DAYS_IN_MONTH=[0,31,28,31,30,31,30,31,31,30,31,30,31],DAYS_IN_MONTH_LEAP=[0,31,29,31,30,31,30,31,31,30,31,30,31],TIME_CONSTANTS={MILLISECONDS_IN:{DAY:864e5},MINUTES_IN:{HOUR:60},DAYS_IN:{WEEK:7}},DAYS_IN_MONTH_MIN=28,DAYS_IN_MONTH_MAX=31,MONTH_MAX=12,MONTH_MIN=1,DAY_MIN=1,FIRST_HOUR=0;function validateTimestamp(e){return"string"===typeof e&&PARSE_DATETIME.test(e)}function parsed(e){if("string"!==typeof e)return null;const t=PARSE_DATETIME.exec(e);if(!t||!t[1]||!t[2])return null;const a=parseInt(t[1],10),n=parseInt(t[2],10),r=parseInt(t[4]||"1",10),o=parseInt(t[6]||"0",10),i=parseInt(t[8]||"0",10);return{date:e,time:o.toString().padStart(2,"0")+":"+i.toString().padStart(2,"0"),year:a,month:n,day:r,hour:o,minute:i,hasDay:!!t[4],hasTime:!0,past:!1,current:!1,future:!1,disabled:!1,weekday:0,doy:0,workweek:0}}function parseDate(e,t=!1){if(!(e instanceof Date))return null;const a=t?"UTC":"";return updateFormatted({date:padNumber(e[`get${a}FullYear`](),4)+"-"+padNumber(e[`get${a}Month`]()+1,2)+"-"+padNumber(e[`get${a}Date`](),2),time:padNumber(e[`get${a}Hours`]()||0,2)+":"+padNumber(e[`get${a}Minutes`]()||0,2),year:e[`get${a}FullYear`](),month:e[`get${a}Month`]()+1,day:e[`get${a}Date`](),hour:e[`get${a}Hours`](),minute:e[`get${a}Minutes`](),weekday:0,doy:0,workweek:0,hasDay:!0,hasTime:!0,past:!1,current:!1,future:!1,disabled:!1})}function padNumber(e,t){let a=String(e);while(a.length<t)a="0"+a;return a}function isLeapYear(e){return e%4===0&&e%100!==0||e%400===0}function daysInMonth(e,t){return(isLeapYear(e)?DAYS_IN_MONTH_LEAP:DAYS_IN_MONTH)[t]}function nextDay(e){const t=new Date(e.year,e.month-1,e.day+1);return updateFormatted(normalizeTimestamp({...e,year:t.getFullYear(),month:t.getMonth()+1,day:t.getDate()}))}function prevDay(e){const t=new Date(e.year,e.month-1,e.day-1);return updateFormatted(normalizeTimestamp({...e,year:t.getFullYear(),month:t.getMonth()+1,day:t.getDate()}))}function today(){const e=new Date,t=e.getMonth()+1,a=e.getDate(),n=e.getFullYear();return[n,padNumber(t,2),padNumber(a,2)].join("-")}function isToday(e){return e===today()}function getStartOfWeek(e,t,a){let n=copyTimestamp(e);if(t){if(1===n.day||0===n.weekday)while(!t.includes(Number(n.weekday)))n=nextDay(n);n=findWeekday(n,t[0],prevDay),n=updateFormatted(n),a&&(n=updateRelative(n,a,n.hasTime))}return n}function getEndOfWeek(e,t,a){let n=copyTimestamp(e);if(t&&Array.isArray(t)){const r=daysInMonth(n.year,n.month);if(r===n.day||n.weekday===t[t.length-1])while(!t.includes(Number(n.weekday)))n=prevDay(n);n=findWeekday(n,t[t.length-1],nextDay),n=updateFormatted(n),a&&(n=updateRelative(n,a,n.hasTime))}return n}function getStartOfMonth(e){let t=copyTimestamp(e);return t.day=DAY_MIN,t=updateFormatted(t),t}function getEndOfMonth(e){let t=copyTimestamp(e);return t.day=daysInMonth(t.year,t.month),t=updateFormatted(t),t}function parseTime(e){const t=Object.prototype.toString.call(e);switch(t){case"[object Number]":return e;case"[object String]":{const a=PARSE_TIME.exec(e);return a?60*parseInt(a[1],10)+parseInt(a[3]||"0",10):!1}case"[object Object]":return"object"!==typeof e||"number"!==typeof e.hour||"number"!==typeof e.minute?!1:"object"===typeof e&&"hour"in e&&"minute"in e&&60*e.hour+e.minute}return!1}function compareTimestamps(e,t){return!(!e||!t)&&e.year===t.year&&e.month===t.month&&e.day===t.day&&e.hour===t.hour&&e.minute===t.minute}function compareDate(e,t){return getDate(e)===getDate(t)}function compareTime(e,t){return getTime(e)===getTime(t)}function compareDateTime(e,t){return getDateTime(e)===getDateTime(t)}function parseTimestamp(e,t=null){let a=parsed(e);return a?(a=updateFormatted(a),t&&(a=updateRelative(a,t,a.hasTime)),a):null}function getDayIdentifier(e){return 1e8*(e.year??0)+1e6*(e.month??0)+1e4*(e.day??0)}function getTimeIdentifier(e){return 100*(e.hour??0)+(e.minute??0)}function getDayTimeIdentifier(e){return getDayIdentifier(e)+getTimeIdentifier(e)}function diffTimestamp(e,t,a=!1){const n=Date.UTC(e.year??0,(e.month??1)-1,e.day??1,e.hour??0,e.minute??0),r=Date.UTC(t.year??0,(t.month??1)-1,t.day??1,t.hour??0,t.minute??0);return!0===a&&r<n?0:r-n}function updateRelative(e,t,a=!1){let n=copyTimestamp(e),r=getDayIdentifier(t),o=getDayIdentifier(n),i=r===o;return n.hasTime&&a&&i&&(r=getTimeIdentifier(t),o=getTimeIdentifier(n),i=r===o),n.past=o<r,n.current=i,n.future=o>r,n.currentWeekday=n.weekday===t.weekday,n}function updateMinutes(e,t,a=null){let n=copyTimestamp(e);return n.hasTime=!0,n.hour=Math.floor(t/TIME_CONSTANTS.MINUTES_IN.HOUR),n.minute=t%TIME_CONSTANTS.MINUTES_IN.HOUR,n.time=getTime(n),a&&(n=updateRelative(n,a,!0)),n}function updateWeekday(e){let t=copyTimestamp(e);return t.weekday=getWeekday(t),t}function updateDayOfYear(e){let t=copyTimestamp(e);return t.doy=getDayOfYear(t)||0,t}function updateWorkWeek(e){let t=copyTimestamp(e);return t.workweek=getWorkWeek(t),t}function updateDisabled(e,t,a,n,r){let o=copyTimestamp(e);const i=getDayIdentifier(o);if(void 0!==t){const l=parsed(t);if(l){const c=getDayIdentifier(l);i<=c&&(o.disabled=!0)}}if(!0!==o.disabled&&void 0!==a){const m=parsed(a);if(m){const v=getDayIdentifier(m);i>=v&&(o.disabled=!0)}}if(!0!==o.disabled&&Array.isArray(n)&&n.length>0)for(var u in n)if(n[u]===o.weekday){o.disabled=!0;break}if(!0!==o.disabled&&Array.isArray(r)&&r.length>0)for(var d in r)if(Array.isArray(r[d])&&2===r[d].length&&r[d][0]&&r[d][1]){const p=parsed(r[d][0]),y=parsed(r[d][1]);if(p&&y&&isBetweenDates(o,p,y)){o.disabled=!0;break}}else{const f=r[d];if(Array.isArray(f))for(var s of f){const h=parseTimestamp(s);if(h){const g=getDayIdentifier(h);if(g===i){o.disabled=!0;break}}}else if(f){const D=parseTimestamp(f);if(D){const T=getDayIdentifier(D);T===i&&(o.disabled=!0)}}}return o}function updateFormatted(e){let t=copyTimestamp(e);return t.hasTime=!0,t.time=getTime(t),t.date=getDate(t),t.weekday=getWeekday(t),t.doy=getDayOfYear(t)||0,t.workweek=getWorkWeek(t),t}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){let t=copyTimestamp(e);if(0===t.year){const r=parseTimestamp(today());r&&(t=r)}const a=new Date(Date.UTC(t.year,t.month-1,t.day)),n=4;a.setUTCDate(a.getUTCDate()-(a.getUTCDay()+6)%7+n),a.setUTCDate(a.getUTCDate()+n-(a.getUTCDay()||7));e=new Date(Date.UTC(a.getUTCFullYear(),0,1)),e=Math.ceil(((a.valueOf()-e.valueOf())/864e5+1)/7);return e}function getWeekday(e){let t=e.weekday;if(e.hasDay){const a=Math.floor,n=e.day,r=(e.month+9)%MONTH_MAX+1,o=a(e.year/100),i=e.year%100-(e.month<=2?1:0);t=((n+a(2.6*r-.2)-2*o+i+a(i/4)+a(o/4))%7+7)%7}return t??0}function copyTimestamp(e){return{...e}}function getDate(e){let 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):"00:00")}function moveRelativeDays(e,t=nextDay,a=1,n=[0,1,2,3,4,5,6]){const r=copyTimestamp(e);return relativeDays(r,t,a,n)}function relativeDays(e,t=nextDay,a=1,n=[0,1,2,3,4,5,6]){let r=copyTimestamp(e);n.includes(Number(r.weekday))||0!==r.weekday||t!==nextDay||++a;while(--a>=0)r=t(r),n.length<7&&!n.includes(Number(r.weekday))&&++a;return r}function findWeekday(e,t,a=nextDay,n=6){let r=copyTimestamp(e);while(r.weekday!==t&&--n>=0)r=a(r);return r}function createDayList(e,t,a,n=[0,1,2,3,4,5,6],r=void 0,o=void 0,i=[],u=[],d=42,s=0){const l=getDayIdentifier(e),c=getDayIdentifier(t),m=[];let v=copyTimestamp(e),p=0,y=p===c;if(!(c<l))while((!y||m.length<s)&&m.length<d){if(p=getDayIdentifier(v),y=y||p>c&&m.length>=s,y)break;if(n.includes(Number(v.weekday))){let e=copyTimestamp(v);e=updateFormatted(e),e=updateRelative(e,a),e=updateDisabled(e,r,o,i,u),m.push(e)}v=relativeDays(v,nextDay)}return m}function createIntervalList(t,a,n,r,o){const i=[];for(let e=0;e<r;++e){const u=(a+e)*n,d=copyTimestamp(t);i.push(updateMinutes(d,u,o))}return i}function createNativeLocaleFormatter(n,r){const e=()=>"";return"undefined"===typeof Intl||"undefined"===typeof Intl.DateTimeFormat?e:(t,e)=>{try{const a=new Intl.DateTimeFormat(n||void 0,r(t,e));return a.format(makeDateTime(t))}catch(e){return console.error(`Intl.DateTimeFormat: ${e.message} -> `+getDateTime(t)),""}}}function makeDate(e,t=!0){return t?new Date(Date.UTC(e.year,e.month-1,e.day,0,0)):new Date(e.year,e.month-1,e.day,0,0)}function makeDateTime(e,t=!0){return t?new Date(Date.UTC(e.year,e.month-1,e.day,e.hour,e.minute)):new Date(e.year,e.month-1,e.day,e.hour,e.minute)}function validateNumber(e){return isFinite(Number(e))}function maxTimestamp(e,t=!1){const a=!0===t?getDayTimeIdentifier:getDayIdentifier;return e.reduce((e,t)=>{return Math.max(a(e),a(t))===a(e)?e:t})}function minTimestamp(e,t=!1){const a=!0===t?getDayTimeIdentifier:getDayIdentifier;return e.reduce((e,t)=>{return Math.min(a(e),a(t))===a(e)?e:t})}function isBetweenDates(e,t,a,n=!1){const r=getDayIdentifier(e)+(!0===n?getTimeIdentifier(e):0),o=getDayIdentifier(t)+(!0===n?getTimeIdentifier(t):0),i=getDayIdentifier(a)+(!0===n?getTimeIdentifier(a):0);return r>=o&&r<=i}function isOverlappingDates(e,t,a,n){const r=getDayIdentifier(e),o=getDayIdentifier(t),i=getDayIdentifier(a),u=getDayIdentifier(n);return r>=i&&r<=u||o>=i&&o<=u||i>=r&&o>=u}function addToDate(e,t){const a=copyTimestamp(e);return t.year&&(a.year+=t.year),t.month&&(a.month+=t.month),t.day&&(a.day+=t.day),t.hour&&(a.hour+=t.hour),t.minute&&(a.minute+=t.minute),updateFormatted(normalizeTimestamp(a))}function normalizeTimestamp(e){const t=new Date(e.year,e.month-1,e.day,e.hour,e.minute);return{...e,year:t.getFullYear(),month:t.getMonth()+1,day:t.getDate(),hour:t.getHours(),minute:t.getMinutes()}}function daysBetween(e,t){const a=diffTimestamp(e,t,!0);return Math.floor(a/TIME_CONSTANTS.MILLISECONDS_IN.DAY)}function weeksBetween(e,t){let a=copyTimestamp(e),n=copyTimestamp(t);return a=findWeekday(a,0),n=findWeekday(n,6),Math.ceil(daysBetween(a,n)/TIME_CONSTANTS.DAYS_IN.WEEK)}const weekdayDateMap={Sun:new Date("2020-01-05T00:00:00.000Z"),Mon:new Date("2020-01-06T00:00:00.000Z"),Tue:new Date("2020-01-07T00:00:00.000Z"),Wed:new Date("2020-01-08T00:00:00.000Z"),Thu:new Date("2020-01-09T00:00:00.000Z"),Fri:new Date("2020-01-10T00:00:00.000Z"),Sat:new Date("2020-01-11T00:00:00.000Z")};function getWeekdayFormatter(){const e=()=>"",r={long:{timeZone:"UTC",weekday:"long"},short:{timeZone:"UTC",weekday:"short"},narrow:{timeZone:"UTC",weekday:"narrow"}};return"undefined"===typeof Intl||"undefined"===typeof Intl.DateTimeFormat?e:t;function t(t,e,a){try{const n=new Intl.DateTimeFormat(a||void 0,r[e]||r["long"]);return n.format(weekdayDateMap[t])}catch(e){return e instanceof Error&&console.error(`Intl.DateTimeFormat: ${e.message} -> day of week: `+t),""}}}function getWeekdayNames(t,a){const e=Object.keys(weekdayDateMap),n=getWeekdayFormatter();return e.map(e=>String(n(e,t,a)))}function getMonthFormatter(){const e=()=>"",o={long:{timeZone:"UTC",month:"long"},short:{timeZone:"UTC",month:"short"},narrow:{timeZone:"UTC",month:"narrow"}};return"undefined"===typeof Intl||"undefined"===typeof Intl.DateTimeFormat?e:t;function t(t,e,a){try{const n=new Intl.DateTimeFormat(a||void 0,o[e]||o["long"]),r=new Date;return r.setDate(1),r.setMonth(t),n.format(r)}catch(e){return e instanceof Error&&console.error(`Intl.DateTimeFormat: ${e.message} -> month: `+t),""}}}function getMonthNames(t,a){const n=getMonthFormatter();return[...Array(12).keys()].map(e=>n(e,t,a))}function convertToUnit(e,t="px"){if(e)return isNaN(e)?String(e):"auto"===e?e:""+Number(e)+t}function indexOf(t,a){for(let e=0;e<t.length;e++)if(!0===a(t[e],e))return e;return-1}function minCharWidth(e,t){return 0===t?e:e.slice(0,t)}const ResizeObserverDirective={mounted(e,t){if("function"===typeof t.value){const a=t.value,n={callback:a,size:{width:0,height:0},observer:new ResizeObserver(e=>{const t=e[0].contentRect;t.width===n.size.width&&t.height===n.size.height||(n.size.width=t.width,n.size.height=t.height,n.debounceTimeout&&clearTimeout(n.debounceTimeout),n.debounceTimeout=setTimeout(()=>{n.callback(n.size),n.debounceTimeout=void 0},100))})};n.observer.observe(e),e.__onResizeObserver=n}},beforeUnmount(e){if(e.__onResizeObserver){const{observer:t,debounceTimeout:a}=e.__onResizeObserver;a&&clearTimeout(a),t.unobserve(e),delete e.__onResizeObserver}}};function useCalendar(t,a,{scrollArea:e,pane:n}){if(!a){const l="[error: renderCalendar] no renderFunc has been supplied to useCalendar";throw console.error(l),new Error(l)}const r=vue.reactive({width:0,height:0}),o=vue.ref(null);function i({width:e,height:t}){r.width=e,r.height=t}const u=vue.computed(()=>{return!0!==t.noScroll&&e.value&&n.value&&r.height?e.value.offsetWidth-n.value.offsetWidth:0});function d(){}function s(){const e={ref:o,role:"complementary",lang:t.locale,class:`q-calendar ${t.dark?"q-calendar--dark":""} `+(t.bordered?"q-calendar__bordered":"")};return vue.withDirectives(vue.h("div",{...e},[a()]),[[ResizeObserverDirective,i]])}return{rootRef:o,scrollWidth:u,__initCalendar:d,__renderCalendar:s}}const isValidFocusType=e=>e.every(e=>["day","date","weekday","interval","time","resource","task"].includes(e)),useCommonProps={modelValue:{type:String,default:today(),validator:e=>""===e||validateTimestamp(e)},weekdays:{type:Array,default:()=>[0,1,2,3,4,5,6]},dateType:{type:String,default:"round",validator:e=>["round","rounded","square"].includes(e)},weekdayAlign:{type:String,default:"center",validator:e=>["left","center","right"].includes(e)},dateAlign:{type:String,default:"center",validator:e=>["left","center","right"].includes(e)},bordered:Boolean,dark:Boolean,noAria:Boolean,noActiveDate:Boolean,noHeader:Boolean,noScroll:Boolean,shortWeekdayLabel:Boolean,noDefaultHeaderText:Boolean,noDefaultHeaderBtn:Boolean,minWeekdayLabel:{type:[Number,String],default:1},weekdayBreakpoints:{type:Array,default:()=>[75,35],validator:e=>2===e.length},locale:{type:String,default:"en-US"},animated:Boolean,transitionPrev:{type:String,default:"slide-right"},transitionNext:{type:String,default:"slide-left"},disabledDays:Array,disabledBefore:String,disabledAfter:String,disabledWeekdays:{type:Array,default:()=>[]},dragEnterFunc:Function,dragOverFunc:Function,dragLeaveFunc:Function,dropFunc:Function,selectedDates:{type:[Array,Set],default:()=>[]},selectedStartEndDates:{type:Array,default:()=>[]},hoverable:Boolean,focusable:Boolean,focusType:{type:Array,default:()=>["date"],validator:isValidFocusType}};function useCommon(t,{startDate:e,endDate:a,times:n}){const r=vue.computed(()=>parseTimestamp(e.value)),o=vue.computed(()=>{return"0000-00-00"===a.value?getEndOfWeek(r.value,t.weekdays,n.today):parseTimestamp(a.value)||r.value}),i=vue.computed(()=>createNativeLocaleFormatter(t.locale,()=>({timeZone:"UTC",day:"numeric"}))),u=vue.computed(()=>createNativeLocaleFormatter(t.locale,(e,t)=>({timeZone:"UTC",weekday:t?"short":"long"}))),d=vue.computed(()=>createNativeLocaleFormatter(t.locale,()=>({timeZone:"UTC",dateStyle:"full"})));function s(e,t){return e&&e.length>0&&e.includes(t.date)}function l(e,t){const a={firstDay:!1,betweenDays:!1,lastDay:!1};if(2===e.length){const n=getDayIdentifier(t),r=getDayIdentifier(parsed(e[0])),o=getDayIdentifier(parsed(e[1]));a.firstDay=r===n,a.lastDay=o===n,a.betweenDays=r<n&&o>n}return a}function c(e,t=!1,a=[],n=[],r=!1){const o=s(a,e),{firstDay:i,lastDay:u,betweenDays:d}=l(n,e);return{"q-past-day":!i&&!d&&!u&&!o&&!t&&!!e.past,"q-future-day":!i&&!d&&!u&&!o&&!t&&!!e.future,"q-outside":t,"q-current-day":!!e.current,"q-selected":o,"q-range-first":i,"q-range":d,"q-range-last":u,"q-range-hover":r&&(i||u||d),"q-disabled-day disabled":!0===e.disabled}}function m(e){return getStartOfWeek(e,t.weekdays,n.today)}function v(e){return getEndOfWeek(e,t.weekdays,n.today)}function p(){return{}}return{parsedStart:r,parsedEnd:o,dayFormatter:i,weekdayFormatter:u,ariaDateFormatter:d,arrayHasDate:s,checkDays:l,getRelativeClasses:c,startOfWeek:m,endOfWeek:v,dayStyleDefault:p}}function scrollTo(e,t){e instanceof Window?e.scrollTo({top:t,behavior:"instant"}):e.scrollTop=t}function getVerticalScrollPosition(e){return e instanceof Window?e.scrollY:e.scrollTop}function animVerticalScrollTo(o,i,u=500,d=performance.now(),s=getVerticalScrollPosition(o)){u<=0||s===i?scrollTo(o,i):requestAnimationFrame(e=>{const t=e-d,a=Math.min(t/u,1),n=e=>e<.5?2*e*e:(4-2*e)*e-1,r=s+(i-s)*n(a);scrollTo(o,r),a<1&&animVerticalScrollTo(o,i,u,d,s)})}function animHorizontalScrollTo(r,e,o=500){const i=r.scrollLeft,u=e-i;let d=null;function s(e){null===d&&(d=e);const t=e-d,a=Math.min(t/o,1),n=e=>e<.5?2*e*e:(4-2*e)*e-1;r.scrollLeft=i+u*n(a),t<o&&requestAnimationFrame(s)}requestAnimationFrame(s)}const useIntervalProps={view:{type:String,validator:e=>["day","week","month","month-interval"].includes(e),default:"day"},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},intervalClass:{type:Function,default:null},weekdayStyle:{type:Function,default:null},weekdayClass:{type:Function,default:null},showIntervalLabel:{type:Function,default:null},hour24Format:Boolean,timeClicksClamped:Boolean,dateHeader:{type:String,default:"stacked",validator:e=>["stacked","inline","inverted"].includes(e)}};function useInterval(o,{times:t,scrollArea:n,parsedStart:e,parsedEnd:a,maxDays:r,size:i,headerColumnRef:u}){const d=vue.computed(()=>parseInt(String(o.intervalStart),10)),m=vue.computed(()=>parseInt(String(o.intervalMinutes),10)),s=vue.computed(()=>parseInt(String(o.intervalCount),10)),v=vue.computed(()=>parseFloat(String(o.intervalHeight))),p=vue.computed(()=>{let e=0;const t=Number(o.columnCount);return o.cellWidth?e=Number(o.cellWidth):i.width>0&&u.value&&(e=u.value.offsetWidth/(t>1?t:r.value)),e}),l=vue.computed(()=>d.value*m.value),c=vue.computed(()=>s.value*v.value),y=vue.computed(()=>s.value*p.value),f=vue.computed(()=>T(e.value)),h=vue.computed(()=>w(a.value)),g=vue.computed(()=>{return createDayList(e.value,a.value,t.today,o.weekdays,o.disabledBefore,o.disabledAfter,o.disabledWeekdays,o.disabledDays,r.value)}),D=vue.computed(()=>{return g.value.map(e=>createIntervalList(e,d.value,m.value,s.value,t.now))});function T(e){return getStartOfWeek(e,o.weekdays,t.today)}function w(e){return getEndOfWeek(e,o.weekdays,t.today)}function k(e,t){return e&&e.length>0&&e.includes(getDateTime(t))}function b(e,t){const a={firstDay:!1,betweenDays:!1,lastDay:!1};if(e&&2===e.length){const n=getDayTimeIdentifier(t),r=getDayTimeIdentifier(parsed(e[0])),o=getDayTimeIdentifier(parsed(e[1]));a.firstDay=r===n,a.lastDay=o===n,a.betweenDays=r<n&&o>n}return a}function _(e,t=[],a=[]){const n=k(t,e),{firstDay:r,lastDay:o,betweenDays:i}=b(a,e);return{"q-selected":n,"q-range-first":!0===r,"q-range":!0===i,"q-range-last":!0===o,"q-disabled-interval disabled":!0===e.disabled}}function I(e,t,a){return[]}const S=vue.computed(()=>{const a={timeZone:"UTC",hour12:!o.hour24Format,hour:"2-digit",minute:"2-digit"},n={timeZone:"UTC",hour12:!o.hour24Format,hour:"numeric",minute:"2-digit"},r={timeZone:"UTC",hour12:!o.hour24Format,hour:"numeric"};return createNativeLocaleFormatter(o.locale,(e,t)=>t?0===e.minute?r:n:a)}),N=vue.computed(()=>{const e={timeZone:"UTC",dateStyle:"full",timeStyle:"short"};return createNativeLocaleFormatter(o.locale,()=>e)});function M(e){const t=D.value[0][0],a=t.hour===e.hour&&t.minute===e.minute;return!a&&0===e.minute}function x(e){}function C(e){return{}}function E(e,t,a=!1,n){let r=copyTimestamp(t);if(e.currentTarget){const o=e.currentTarget.getBoundingClientRect(),i=e,u=e,d=i.changedTouches||i.touches,s=(d&&d[0]?d[0]:u).clientY,l=(s-o.top)/v.value,c=Math.floor((a?Math.floor(l):l)*m.value);0!==c&&(r=addToDate(r,{minute:c})),n&&(r=updateRelative(r,n,!0))}return r}function R(e,t,a=!1,n){let r=copyTimestamp(t);const o=e.currentTarget.getBoundingClientRect(),i=e,u=e,d=i.changedTouches||i.touches,s=(d&&d[0]?d[0]:u).clientY,l=(s-o.top)/v.value,c=Math.floor((a?Math.floor(l):l)*m.value);return 0!==c&&(r=addToDate(r,{minute:c})),n&&(r=updateRelative(r,n,!0)),r}function q(e,t,a=!1,n){let r=copyTimestamp(t);if(e.currentTarget){const o=e.currentTarget.getBoundingClientRect(),i=e,u=e,d=i.changedTouches||i.touches,s=(d&&d[0]?d[0]:u).clientX,l=(s-o.left)/p.value,c=Math.floor((a?Math.floor(l):l)*m.value);0!==c&&(r=addToDate(r,{minute:c})),n&&(r=updateRelative(r,n,!0))}return r}function H(e,t){const a={timestamp:e,timeStartPos:W,timeDurationHeight:A};return void 0!==t&&(a.columnIndex=t),a}function L(e,t){const a={timestamp:copyTimestamp(e),timeStartPosX:O,timeDurationWidth:F};return void 0!==t&&(a.index=t),a}function U(e,t=0){const a=W(e);return!(!1===a||!n.value)&&(animVerticalScrollTo(n.value,a,t),!0)}function B(e,t=0){const a=O(e);return!(!1===a||!n.value)&&(animHorizontalScrollTo(n.value,a,t),!0)}function A(e){return e/m.value*v.value}function F(e){return e/m.value*p.value}function P(e){return e*m.value/v.value}function Y(e){return e*m.value/p.value}function W(e,t=!0){const a=parseTime(e);if(!1===a)return!1;const n=l.value,r=s.value*m.value,o=(a-n)/r;let i=o*c.value;return t&&(i<0&&(i=0),i>c.value)&&(i=c.value),i}function O(e,t=!0){const a=parseTime(e);if(!1===a)return!1;const n=l.value,r=s.value*m.value,o=(a-n)/r;let i=o*y.value;return t&&(i<0&&(i=0),i>y.value)&&(i=y.value),i}return{parsedIntervalStart:d,parsedIntervalMinutes:m,parsedIntervalCount:s,parsedIntervalHeight:v,parsedCellWidth:p,parsedStartMinute:l,bodyHeight:c,bodyWidth:y,parsedWeekStart:f,parsedWeekEnd:h,days:g,intervals:D,intervalFormatter:S,ariaDateTimeFormatter:N,arrayHasDateTime:k,checkIntervals:b,getIntervalClasses:_,getResourceClasses:I,showIntervalLabelDefault:M,showResourceLabelDefault:x,styleDefault:C,getTimestampAtEventInterval:E,getTimestampAtEvent:R,getTimestampAtEventX:q,getScopeForSlot:H,getScopeForSlotX:L,scrollToTime:U,scrollToTimeX:B,timeDurationHeight:A,timeDurationWidth:F,heightToMinutes:P,widthToMinutes:Y,timeStartPos:W,timeStartPosX:O}}const useColumnProps={columnCount:{type:[Number,String],default:0,validator:validateNumber},columnIndexStart:{type:[Number,String],default:0,validator:validateNumber}},useMaxDaysProps={maxDays:{type:Number,default:1}},useTimesProps={now:{type:String,validator:e=>""===e||validateTimestamp(e),default:""}};function useTimes(e){const t=vue.reactive({now:parseTimestamp("0000-00-00 00:00"),today:parseTimestamp("0000-00-00")}),a=vue.computed(()=>e.now?parseTimestamp(e.now):o());function n(){t.now&&t.today&&(t.now.current=t.today.current=!0,t.now.past=t.today.past=!1,t.now.future=t.today.future=!1)}function r(){const e=a.value||o();i(e,t.now),u(e,t.now),i(e,t.today)}function o(){return parseDate(new Date)}function i(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)}function u(e,t){e.time!==t.time&&(t.hour=e.hour,t.minute=e.minute,t.time=e.time)}return vue.watch(a,()=>r()),{times:t,parsedNow:a,setCurrent:n,updateCurrent:r,getNow:o,updateDay:i,updateTime:u}}function useRenderValues(r,{parsedView:o,parsedValue:i,times:u}){const e=vue.computed(()=>{const e=i.value;let t=r.maxDays,a=e,n=e;switch(o.value){case"month":a=getStartOfMonth(e),n=getEndOfMonth(e),t=daysInMonth(a.year,a.month);break;case"week":case"week-agenda":case"week-scheduler":a=getStartOfWeek(e,r.weekdays,u.today),n=getEndOfWeek(a,r.weekdays,u.today),t=r.weekdays.length;break;case"day":case"scheduler":case"agenda":n=moveRelativeDays(copyTimestamp(n),nextDay,t>1?t-1:t,r.weekdays),n=updateFormatted(n);break;case"month-interval":case"month-scheduler":case"month-agenda":a=getStartOfMonth(e),n=getEndOfMonth(e),n=updateFormatted(n),t=daysInMonth(a.year,a.month);break;case"resource":t=1,n=moveRelativeDays(copyTimestamp(n),nextDay,t,r.weekdays),n=updateFormatted(n);break}return{start:a,end:n,maxDays:t}});return{renderValues:e}}const toCamelCase=e=>e.replace(/(-\w)/g,e=>e[1].toUpperCase());function getMouseEventHandlers(t,e,a,n){const r={};for(const o in a){const i=a[o],u=toCamelCase("on-"+o);if(!e.value)return console.warn("$listeners has not been set up"),{};if(void 0!==e.value[u]){const d="on"+i.event.charAt(0).toUpperCase()+i.event.slice(1),s=e=>{return(void 0===i.button||"buttons"in e&&e.buttons>0&&e.button===i.button)&&(i.prevent&&e.preventDefault(),i.stop&&e.stopPropagation(),t(o,n(e,o))),i.result};d in r?Array.isArray(r[d])?r[d].push(s):r[d]=[r[d],s]:r[d]=s}}return r}function getDefaultMouseEventHandlers(e,t,a,n){return getMouseEventHandlers(e,t,getMouseEventName(a),n)}function getMouseEventName(e){return{["click"+e]:{event:"click"},["contextmenu"+e]:{event:"contextmenu",prevent:!0,result:!1},["mousedown"+e]:{event:"mousedown"},["mousemove"+e]:{event:"mousemove"},["mouseup"+e]:{event:"mouseup"},["mouseenter"+e]:{event:"mouseenter"},["mouseleave"+e]:{event:"mouseleave"},["touchstart"+e]:{event:"touchstart"},["touchmove"+e]:{event:"touchmove"},["touchend"+e]:{event:"touchend"}}}function getRawMouseEvents(e){return Object.keys(getMouseEventName(e))}function useMouseEvents(a,n){return{getMouseEventHandlers:(e,t)=>getMouseEventHandlers(a,n,e,t),getDefaultMouseEventHandlers:(e,t)=>getDefaultMouseEventHandlers(a,n,e,t),getMouseEventName:getMouseEventName,getRawMouseEvents:getRawMouseEvents}}const useMoveEmits=["moved"];function useMove(d,{parsedView:s,parsedValue:l,direction:c,maxDays:m,times:v,emittedValue:p,emit:y}){function e(a=1){if(0===a)p.value=today();else{let e=copyTimestamp(l.value);const n=getEndOfMonth(e),r=a>0,o=r?nextDay:prevDay,i=r?n.day:1;let t=r?a:-a;c.value=r?"next":"prev";const u=d.weekdays.length;while(--t>=0)switch(s.value){case"month":e.day=i,e=o(e),e=updateWeekday(e);while(!d.weekdays.includes(Number(e.weekday)))e=addToDate(e,{day:r?1:-1});break;case"week":case"week-agenda":case"week-scheduler":e=relativeDays(e,o,u,d.weekdays);break;case"day":case"scheduler":case"agenda":e=relativeDays(e,o,m.value,d.weekdays);break;case"month-interval":case"month-agenda":case"month-scheduler":e.day=i,e=o(e);break;case"resource":e=relativeDays(e,o,m.value,d.weekdays);break}e=updateWeekday(e),e=updateFormatted(e),e=updateDayOfYear(e),e=updateRelative(e,v.now),p.value=e.date,y("moved",e)}}return{move:e}}const listenerRE=/^on[A-Z]/;function useEmitListeners(e=vue.getCurrentInstance()){return{emitListeners:vue.computed(()=>{const t={};return e?.vnode?.props&&Object.keys(e.vnode.props).forEach(e=>{listenerRE.test(e)&&(t[e]=!0)}),t})}}function useFocusHelper(){const e={"aria-hidden":"true",class:"q-calendar__focus-helper"};return[vue.h("span",e)]}function useButton(){function e({focusable:e,focusType:t},a,n){const r=e&&t.includes("date");return vue.h("button",{...a,tabindex:r?0:-1},[n,r&&useFocusHelper()])}return{renderButton:e}}const useCellWidthProps={cellWidth:[Number,String]};function useCellWidth(e){const t=vue.computed(()=>void 0!==e.cellWidth);return{isSticky:t}}const useCheckChangeEmits=["change"];function useCheckChange(n,{days:r,lastStart:o,lastEnd:i}){function e(){const e=r.value;if(0===e.length)return!1;const t=e[0].date,a=e[e.length-1].date;return(!o.value||!i.value||t!==o.value||a!==i.value)&&(o.value=t,i.value=a,n("change",{start:t,end:a,days:e}),!0)}return{checkChange:e}}function useEventUtils(){function e(e,t){return(Array.isArray(t)?t:[t]).includes(e.keyCode)}return{isKeyCode:e}}const isKeyCode=useEventUtils().isKeyCode,useNavigationProps={useNavigation:Boolean};function useNavigation(t,{rootRef:a,focusRef:n,focusValue:r,datesRef:o,parsedView:i,emittedValue:u,direction:d,times:s}){let e=!1;function l(){e||document&&(e=!0,document.addEventListener("keyup",y),document.addEventListener("keydown",p))}function c(){document&&(document.removeEventListener("keyup",y),document.removeEventListener("keydown",p),e=!1)}function m(e){if(e&&document){const t=document.activeElement;if(t!==document.body&&a.value?.contains(t))return!0}return!1}function v(){let t=0;const a=window.setInterval(()=>{const e=o.value[n.value];e&&(e.focus(),50!==++t)&&document.activeElement!==e||window.clearInterval(a)},250)}function p(e){m(e)&&isKeyCode(e,[33,34,35,36,37,38,39,40])&&(e.stopPropagation(),e.preventDefault())}function y(e){if(m(e)&&isKeyCode(e,[33,34,35,36,37,38,39,40])){const t={33:T,34:w,35:b,36:k,37:g,38:f,39:D,40:h};t[e.keyCode]?.()}}function f(){let e=copyTimestamp(r.value);if("month"===i.value){if(e=addToDate(e,{day:-7}),r.value.month!==e.month)return d.value="prev",void(u.value=e.date)}else e=addToDate(e,{minute:Number(t.intervalMinutes)});d.value="prev",n.value=e.date}function h(){let e=copyTimestamp(r.value);if("month"===i.value){if(e=addToDate(e,{day:7}),r.value.month!==e.month)return d.value="next",void(u.value=e.date)}else e=addToDate(e,{minute:Number(t.intervalMinutes)});d.value="next",n.value=e.date}function g(){let e=copyTimestamp(r.value);d.value="prev";do{e=addToDate(e,{day:-1})}while(!t.weekdays.includes(Number(e.weekday)));n.value=e.date}function D(){let e=copyTimestamp(r.value);d.value="next";do{e=addToDate(e,{day:1})}while(!t.weekdays.includes(Number(e.weekday)));n.value=e.date}function T(){let e=copyTimestamp(r.value);e="month"===i.value?addToDate(e,{month:-1}):addToDate(e,{day:-7}),d.value="prev",n.value=e.date}function w(){let e=copyTimestamp(r.value);e="month"===i.value?addToDate(e,{month:1}):addToDate(e,{day:7}),d.value="next",n.value=e.date}function k(){let e=copyTimestamp(r.value);e="month"===i.value?getStartOfMonth(e):getStartOfWeek(e,t.weekdays||[],s.today);while(!t.weekdays.includes(Number(e.weekday)))e=addToDate(e,{day:-1});n.value=e.date}function b(){let e=copyTimestamp(r.value);e="month"===i.value?getEndOfMonth(e):getEndOfWeek(e,t.weekdays||[],s.today);while(!t.weekdays.includes(Number(e.weekday)))e=addToDate(e,{day:-1});n.value=e.date}return vue.onBeforeUnmount(()=>{c()}),vue.watch(()=>t.useNavigation,e=>{(!0===e?l:c)()}),!0===t.useNavigation&&l(),{startNavigation:l,endNavigation:c,tryFocus:v}}const renderButton=useButton().renderButton;var QCalendarDay=vue.defineComponent({name:"QCalendarDay",directives:{ResizeObserver:ResizeObserverDirective},props:{...useCommonProps,...useIntervalProps,...useColumnProps,...useMaxDaysProps,...useTimesProps,...useCellWidthProps,...useNavigationProps},emits:["update:model-value",...useCheckChangeEmits,...useMoveEmits,...getRawMouseEvents("-date"),...getRawMouseEvents("-interval"),...getRawMouseEvents("-head-intervals"),...getRawMouseEvents("-head-day"),...getRawMouseEvents("-time")],setup(v,{slots:p,emit:m,expose:R}){const e=vue.ref(null),q=vue.ref(null),H=vue.ref(null),y=vue.ref(v.modelValue||today()),t=vue.ref(parsed(v.modelValue||today())),f=vue.ref({}),a=vue.ref(),n=vue.ref(),i=vue.ref("next"),u=vue.ref(v.modelValue||today()),d=vue.ref("0000-00-00"),s=vue.ref(0),h=vue.ref(v.modelValue||today()),l=vue.reactive({width:0,height:0}),g=vue.ref(""),D=vue.ref(0),L=vue.ref(null),U=vue.ref(null),r=(vue.watch(()=>v.view,()=>{s.value=0}),vue.computed(()=>{return"month"===v.view?"month-interval":v.view})),B=vue.getCurrentInstance();if(null===B)throw new Error("current instance is null");const T=useEmitListeners(B).emitListeners,w=useCellWidth(v).isSticky,{times:k,setCurrent:P,updateCurrent:Y}=useTimes(v),{parsedStart:o,parsedEnd:V,dayFormatter:z,weekdayFormatter:Z,ariaDateFormatter:$,dayStyleDefault:K,getRelativeClasses:b}=(Y(),P(),useCommon(v,{startDate:u,endDate:d,times:k})),c=vue.computed(()=>{return parseTimestamp(v.modelValue,k.now)||o.value||k.today}),X=(t.value=c.value,y.value=c.value.date,useRenderValues(v,{parsedView:r,parsedValue:c,times:k})).renderValues,{rootRef:_,scrollWidth:j,__renderCalendar:Q}=useCalendar(v,Pe,{scrollArea:e,pane:q}),{days:I,intervals:G,intervalFormatter:J,ariaDateTimeFormatter:ee,parsedCellWidth:S,getIntervalClasses:te,showIntervalLabelDefault:ae,styleDefault:ne,getTimestampAtEventInterval:re,getTimestampAtEvent:oe,getScopeForSlot:N,scrollToTime:ie,heightToMinutes:ue,timeDurationHeight:de,timeStartPos:se}=useInterval(v,{times:k,scrollArea:e,parsedStart:o,parsedEnd:V,maxDays:s,size:l,headerColumnRef:H}),M=useMove(v,{parsedView:r,parsedValue:c,direction:i,maxDays:s,times:k,emittedValue:h,emit:m}).move,x=useMouseEvents(m,T).getDefaultMouseEventHandlers,le=useCheckChange(m,{days:I,lastStart:L,lastEnd:U}).checkChange,C=useEventUtils().isKeyCode,ce=useNavigation(v,{rootRef:_,focusRef:y,focusValue:t,datesRef:f,parsedView:r,emittedValue:h,direction:i,times:k}).tryFocus,E=vue.computed(()=>{const e=parseInt(String(v.columnCount),10);return"day"===r.value&&e>1?e:"day"===r.value&&v.maxDays&&v.maxDays>1?v.maxDays:I.value.length}),me=vue.computed(()=>{return _.value?parseInt(window.getComputedStyle(_.value).getPropertyValue("--calendar-intervals-width"),10):0}),A=vue.computed(()=>{if(_.value){const e=l.width||_.value.getBoundingClientRect().width;if(e&&me.value&&E.value)return(e-j.value-me.value)/E.value+"px"}return 100/E.value+"%"});function ve(){h.value=today()}function pe(e=1){M(e)}function ye(e=1){M(-e)}function fe({width:e,height:t}){l.width=e,l.height=t}function F(e){return e.date===h.value}function he(){return vue.h("div",{roll:"presentation",class:{"q-calendar-day__head":!0,"q-calendar__sticky":!0===w.value},style:{marginRight:j.value+"px"}},[ge(),De()])}function ge(){const e=p["head-intervals"],t={timestamps:I.value,days:I.value,date:v.modelValue};return vue.h("div",{class:{"q-calendar-day__head--intervals":!0,"q-calendar__sticky":!0===w.value},...x("-head-intervals",e=>{return{scope:t,event:e}})},[e&&e({scope:t})])}function De(){return vue.h("div",{ref:H,class:{"q-calendar-day__head--days__column":!0}},[Te(),we()])}function Te(){return vue.h("div",{class:{"q-calendar-day__head--days__weekdays":!0}},[...ke()])}function we(){const e=p["head-days-events"],t=parseInt(String(v.columnCount),10);return vue.nextTick(()=>{if(n.value&&0===t&&window)try{const e=window.getComputedStyle(n.value);a.value&&a.value.parentElement&&(a.value.parentElement.style.height=e.height,a.value.style.height=e.height)}catch{}}),vue.h("div",{class:{"q-calendar-day__head--days__event":!0}},[e&&vue.h("div",{ref:a,style:{position:"absolute",left:0,top:0,right:0,overflow:"hidden",zIndex:1}},[e({scope:{days:I.value,ref:n}})]),...be()])}function ke(){const e=parseInt(String(v.columnCount),10),a=parseInt(String(v.columnIndexStart),10);return 1===I.value.length&&e>0?Array.apply(null,new Array(e)).map((e,t)=>t+a).map(e=>_e(I.value[0],e)):I.value.map(e=>_e(e,0))}function be(){const e=parseInt(String(v.columnCount),10),a=parseInt(String(v.columnIndexStart),10);return 1===I.value.length&&e>0?Array.apply(null,new Array(e)).map((e,t)=>t+a).map(e=>Se(I.value[0],e)).filter(e=>void 0!==e):I.value.map(e=>Se(e,0)).filter(e=>void 0!==e)}function _e(t,e){const a=p["head-day"],n=p["head-date"],r=!0!==v.noActiveDate&&F(t),o=N(t,e),i=(o.activeDate=r,o.droppable=g.value===t.date,o.disabled=!!v.disabledWeekdays&&v.disabledWeekdays.includes(Number(t.weekday)),!0===w.value?v.cellWidth:A.value),u=v.weekdayStyle||K,d={width:i,maxWidth:i,minWidth:i,...u({scope:o})},s=(!0===w.value&&(d.minWidth=i),"function"===typeof v.weekdayClass?v.weekdayClass({scope:o}):{}),l=!0===v.focusable&&v.focusType.includes("weekday"),c=t.date+(void 0!==e?"-"+e:""),m={key:c,ref:e=>{f.value[c]=e},tabindex:!0===l?0:-1,class:{"q-calendar-day__head--day":!0,...s,...b(t),"q-active-date":r,"q-calendar__hoverable":!0===v.hoverable,"q-calendar__focusable":!0===l},style:d,onFocus:()=>{!0===l&&(y.value=c)},onKeydown:e=>{!0!==t.disabled&&C(e,[13,32])&&(e.stopPropagation(),e.preventDefault())},onKeyup:e=>{!0!==t.disabled&&C(e,[13,32])&&(h.value=t.date)},...x("-head-day",e=>{return{scope:o,event:e}}),onDragenter:e=>{void 0!==v.dragEnterFunc&&"function"===typeof v.dragEnterFunc&&(!0===v.dragEnterFunc(e,"head-day",{scope:o})?g.value=t.date:g.value="")},onDragover:e=>{void 0!==v.dragOverFunc&&"function"===typeof v.dragOverFunc&&(!0===v.dragOverFunc(e,"head-day",{scope:o})?g.value=t.date:g.value="")},onDragleave:e=>{void 0!==v.dragLeaveFunc&&"function"===typeof v.dragLeaveFunc&&(!0===v.dragLeaveFunc(e,"head-day",{scope:o})?g.value=t.date:g.value="")},onDrop:e=>{void 0!==v.dropFunc&&"function"===typeof v.dropFunc&&(!0===v.dropFunc(e,"head-day",{scope:o})?g.value=t.date:g.value="")}};return vue.h("div",m,[void 0!==a&&a({scope:o}),void 0===a&&xe(t,e),void 0===a&&Ie(t),void 0===a&&n&&n({scope:o}),void 0===a&&Ce(t,e),useFocusHelper()])}function Ie(e){return"stacked"===v.dateHeader?[!0!==v.noDefaultHeaderText?W(e):[],!0!==v.noDefaultHeaderBtn?O(e):[]].filter(e=>void 0!==e):"inline"===v.dateHeader?("left"===v.weekdayAlign&&"right"===v.dateAlign||"right"===v.weekdayAlign&&v.dateAlign,vue.h("div",{class:"q-calendar__header--inline"},[!0!==v.noDefaultHeaderText&&W(e),!0!==v.noDefaultHeaderBtn&&O(e)])):"inverted"===v.dateHeader?("left"===v.weekdayAlign&&"right"===v.dateAlign||"right"===v.weekdayAlign&&v.dateAlign,vue.h("div",{class:"q-calendar__header--inline"},[!0!==v.noDefaultHeaderBtn&&O(e),!0!==v.noDefaultHeaderText&&W(e)])):void 0}function Se(e,t){const a=p["head-day-event"],n=!0!==v.noActiveDate&&F(e),r=N(e,t),o=(r.activeDate=n,r.disabled=!!v.disabledWeekdays&&v.disabledWeekdays.includes(Number(e.weekday)),!0===w.value?convertToUnit(S.value):A.value),i={width:o,maxWidth:o,minWidth:o};return!0===w.value&&(i.minWidth=o),vue.h("div",{key:"event-"+e.date+(void 0!==t?"-"+t:""),class:{"q-calendar-day__head--day__event":!0,...b(e),"q-active-date":n},style:i},[a&&a({scope:r})])}function W(e){const t=p["head-weekday-label"],a=!0===v.shortWeekdayLabel,n=N(e,0),r=(n.shortWeekdayLabel=v.shortWeekdayLabel,n.disabled=!!v.disabledWeekdays&&v.disabledWeekdays.includes(Number(e.weekday)),{class:{"q-calendar-day__head--weekday":!0,["q-calendar__"+v.weekdayAlign]:!0,"q-calendar__ellipsis":!0}});return vue.h("div",r,t&&t({scope:n})||Ne(e,a))}function Ne(e,t){const a=Z.value(e,t||v.weekdayBreakpoints[0]>0&&S.value<=v.weekdayBreakpoints[0]);return vue.h("span",{class:"q-calendar-day__head--weekday-label q-calendar__ellipsis"},v.weekdayBreakpoints[1]>0&&S.value<=v.weekdayBreakpoints[1]?minCharWidth(a,Number(v.minWeekdayLabel)):a)}function O(e){const t={class:{"q-calendar-day__head--date":!0,["q-calendar__"+v.dateAlign]:!0}};return vue.h("div",t,Me(e))}function Me(a){const e=!0!==v.noActiveDate&&F(a),t=z.value(a,!1),n=p["head-day-label"],r=p["head-day-button"],o={dayLabel:t,timestamp:a,activeDate:e,disabled:!!v.disabledWeekdays&&v.disabledWeekdays.includes(Number(a.weekday))},i={class:{"q-calendar-day__head--day__label":!0,"q-calendar__button":!0,"q-calendar__button--round":"round"===v.dateType,"q-calendar__button--rounded":"rounded"===v.dateType,"q-calendar__button--bordered":!0===a.current,"q-calendar__focusable":!0},disabled:a.disabled,onKeydown:e=>{!0!==a.disabled&&C(e,[13,32])&&(e.stopPropagation(),e.preventDefault())},onKeyup:e=>{!0!==a.disabled&&C(e,[13,32])&&(h.value=a.date,void 0!==T.value.onClickDate)&&m("click-date",{scope:o})},...x("-date",(e,t)=>{return"click-date"!==t&&"contextmenu-date"!==t||(h.value=a.date,"click-date"===t&&e.preventDefault()),{scope:o,event:e}})};return!0!==v.noAria&&(i.ariaLabel=$.value(a,!1)),r?r({scope:o}):renderButton(v,i,n?n({scope:o}):t)}function xe(e,t){const a=p["column-header-before"];if(a){const n={timestamp:e,columnIndex:t};return vue.h("div",{class:"q-calendar-day__column-header--before"},[a({scope:n})])}}function Ce(e,t){const a=p["column-header-after"];if(a){const n={timestamp:e,columnIndex:t};return vue.h("div",{class:"q-calendar-day__column-header--after"},[a({scope:n})])}}function Ee(){return vue.h("div",{class:"q-calendar-day__body"},[Ae()])}function Ae(){return!0===w.value?vue.h("div",{ref:e,class:{"q-calendar-day__scroll-area":!0,"q-calendar__scroll":!0}},[!0!==w.value&&Le(),We()]):!0===v.noScroll?Fe():vue.h("div",{ref:e,class:{"q-calendar-day__scroll-area":!0,"q-calendar__scroll":!0}},[Fe()])}function Fe(){return vue.h("div",{ref:q,class:"q-calendar-day__pane"},[Le(),We()])}function We(){const e=p["day-container"];return vue.h("div",{class:"q-calendar-day__day-container"},[!0===w.value&&!0!==v.noHeader&&he(),vue.h("div",{style:{display:"flex",flexDirection:"row"}},[!0===w.value&&Le(),...Oe()]),e&&e({scope:{days:I.value}})])}function Oe(){const e=parseInt(String(v.columnCount),10),a=parseInt(String(v.columnIndexStart),10);return 1===I.value.length&&e>0?Array.apply(null,new Array(e)).map((e,t)=>t+a).map(e=>Re(I.value[0],0,e)):I.value.map((e,t)=>Re(e,t,0))}function Re(e,t,a){const n=p["day-body"],r=N(e,a),o=!0===w.value?v.cellWidth:A.value,i={width:o,maxWidth:o,minWidth:o};return!0===w.value&&(i.minWidth=o),vue.h("div",{key:e.date+(void 0!==a?":"+a:""),class:{"q-calendar-day__day":!0,...b(e)},style:i},[...qe(t,a),n&&n({scope:r})])}function qe(e,t){return G.value[e].map(e=>He(e,t))}function He(a,n){const e=convertToUnit(v.intervalHeight),t=v.intervalStyle||ne,r=p["day-interval"],o=N(a,n),i=(o.droppable=D.value===getDayTimeIdentifier(a),"function"===typeof v.intervalClass?v.intervalClass({scope:o}):{}),u=!0===v.focusable&&v.focusType.includes("interval"),d=getDateTime(a),s={height:e,...t({scope:o})},l={key:d,tabindex:!0===u?0:-1,class:{"q-calendar-day__day-interval":0===a.minute,"q-calendar-day__day-interval--section":0!==a.minute,...i,...te(a,Array.from(v.selectedDates),v.selectedStartEndDates),"q-calendar__hoverable":!0===v.hoverable,"q-calendar__focusable":!0===u},style:s,onDragenter:e=>{void 0!==v.dragEnterFunc&&"function"===typeof v.dragEnterFunc&&(!0===v.dragEnterFunc(e,"interval",{scope:o})?D.value=getDayTimeIdentifier(a):D.value=0)},onDragover:e=>{void 0!==v.dragOverFunc&&"function"===typeof v.dragOverFunc&&(!0===v.dragOverFunc(e,"interval",{scope:o})?D.value=getDayTimeIdentifier(a):D.value=0)},onDragleave:e=>{void 0!==v.dragLeaveFunc&&"function"===typeof v.dragLeaveFunc&&(!0===v.dragLeaveFunc(e,"interval",{scope:o})?D.value=getDayTimeIdentifier(a):D.value=0)},onDrop:e=>{void 0!==v.dropFunc&&"function"===typeof v.dropFunc&&(!0===v.dropFunc(e,"interval",{scope:o})?D.value=getDayTimeIdentifier(a):D.value=0)},onKeydown:e=>{C(e,[13,32])&&(e.stopPropagation(),e.preventDefault())},onKeyup:e=>{if(C(e,[13,32])){const t=N(a,n);h.value=t.timestamp.date,void 0!==T.value.onClickTime&&m("click-time",{scope:t,event:e})}},...x("-time",e=>{const t=N(re(e,a,v.timeClicksClamped,k.now),n);return{scope:t,event:e}})},c=(!0!==v.noAria&&(l.ariaLabel=ee.value(a,!1)),r?r({scope:o}):void 0);return vue.h("div",l,[c,useFocusHelper()])}function Le(){const e={ariaHidden:"true",class:{"q-calendar-day__intervals-column":!0,"q-calendar__ellipsis":!0,"q-calendar__sticky":!0===w.value},...x("-interval",e=>{const t=oe(e,o.value,v.timeClicksClamped,k.now);return{scope:{timestamp:t},event:e}})};return vue.h("div",e,Ue())}function Ue(){return G.value[0].map(e=>Be(e))}function Be(e){const t=p["interval-label"],a=convertToUnit(v.intervalHeight),n=v.shortIntervalLabel??!1,r=v.showIntervalLabel||ae,o=r(e),i=o?J.value(e,n):void 0;return vue.h("div",{key:e.time,class:{"q-calendar-day__interval":0===e.minute,"q-calendar-day__interval--section":0!==e.minute},style:{height:a}},[vue.h("div",{class:"q-calendar-day__interval--text q-calendar__overflow-wrap"},[t?t({scope:{timestamp:e,label:i}}):i])])}function Pe(){const{start:e,end:t,maxDays:a}=X.value,n=(u.value===e.date&&d.value===t.date&&s.value===a||(u.value=e.date,d.value=t.date,s.value=a),l.width>0),r=vue.withDirectives(vue.h("div",{key:u.value,class:"q-calendar-day"},[!0===n&&!0!==w.value&&!0!==v.noHeader&&he(),n&&Ee()]),[[ResizeObserverDirective,fe]]);if(!0!==v.animated)return r;{const o="q-calendar--"+("prev"===i.value?v.transitionPrev:v.transitionNext);return vue.h(vue.Transition,{name:o,appear:!0},()=>r)}}return vue.watch([I],le,{deep:!0,immediate:!0}),vue.watch(()=>v.modelValue,(e,t)=>{if(h.value!==v.modelValue){if(!0===v.animated){const a=getDayIdentifier(parsed(e)),n=getDayIdentifier(parsed(t));i.value=a>=n?"next":"prev"}h.value=e}y.value=e}),vue.watch(h,(e,t)=>{if(h.value!==v.modelValue){if(!0===v.animated){const a=getDayIdentifier(parsed(e)),n=getDayIdentifier(parsed(t));i.value=a>=n?"next":"prev"}m("update:model-value",e)}}),vue.watch(y,e=>{e&&(t.value=parseTimestamp(e))}),vue.watch(t,()=>{y.value&&f.value[y.value]?f.value[y.value].focus():ce()}),vue.watch(()=>v.maxDays,e=>{s.value=e}),vue.onBeforeUpdate(()=>{f.value={},a.value=void 0,n.value=void 0}),vue.onMounted(()=>{}),R({prev:ye,next:pe,move:M,moveToToday:ve,updateCurrent:Y,timeStartPos:se,timeDurationHeight:de,heightToMinutes:ue,scrollToTime:ie}),()=>Q()}});const version="4.1.0";exports.DAYS_IN_MONTH=DAYS_IN_MONTH,exports.DAYS_IN_MONTH_LEAP=DAYS_IN_MONTH_LEAP,exports.DAYS_IN_MONTH_MAX=DAYS_IN_MONTH_MAX,exports.DAYS_IN_MONTH_MIN=DAYS_IN_MONTH_MIN,exports.DAY_MIN=DAY_MIN,exports.FIRST_HOUR=FIRST_HOUR,exports.MONTH_MAX=MONTH_MAX,exports.MONTH_MIN=MONTH_MIN,exports.PARSE_DATE=PARSE_DATE,exports.PARSE_DATETIME=PARSE_DATETIME,exports.PARSE_TIME=PARSE_TIME,exports.QCalendarDay=QCalendarDay,exports.TIME_CONSTANTS=TIME_CONSTANTS,exports.addToDate=addToDate,exports.compareDate=compareDate,exports.compareDateTime=compareDateTime,exports.compareTime=compareTime,exports.compareTimestamps=compareTimestamps,exports.convertToUnit=convertToUnit,exports.copyTimestamp=copyTimestamp,exports.createDayList=createDayList,exports.createIntervalList=createIntervalList,exports.createNativeLocaleFormatter=createNativeLocaleFormatter,exports.daysBetween=daysBetween,exports.daysInMonth=daysInMonth,exports.diffTimestamp=diffTimestamp,exports.findWeekday=findWeekday,exports.getDate=getDate,exports.getDateTime=getDateTime,exports.getDayIdentifier=getDayIdentifier,exports.getDayOfYear=getDayOfYear,exports.getDayTimeIdentifier=getDayTimeIdentifier,exports.getEndOfMonth=getEndOfMonth,exports.getEndOfWeek=getEndOfWeek,exports.getMonthFormatter=getMonthFormatter,exports.getMonthNames=getMonthNames,exports.getStartOfMonth=getStartOfMonth,exports.getStartOfWeek=getStartOfWeek,exports.getTime=getTime,exports.getTimeIdentifier=getTimeIdentifier,exports.getWeekday=getWeekday,exports.getWeekdayFormatter=getWeekdayFormatter,exports.getWeekdayNames=getWeekdayNames,exports.getWorkWeek=getWorkWeek,exports.indexOf=indexOf,exports.isBetweenDates=isBetweenDates,exports.isLeapYear=isLeapYear,exports.isOverlappingDates=isOverlappingDates,exports.isToday=isToday,exports.makeDate=makeDate,exports.makeDateTime=makeDateTime,exports.maxTimestamp=maxTimestamp,exports.minCharWidth=minCharWidth,exports.minTimestamp=minTimestamp,exports.moveRelativeDays=moveRelativeDays,exports.nextDay=nextDay,exports.padNumber=padNumber,exports.parseDate=parseDate,exports.parseTime=parseTime,exports.parseTimestamp=parseTimestamp,exports.parsed=parsed,exports.prevDay=prevDay,exports.relativeDays=relativeDays,exports.today=today,exports.updateDayOfYear=updateDayOfYear,exports.updateDisabled=updateDisabled,exports.updateFormatted=updateFormatted,exports.updateMinutes=updateMinutes,exports.updateRelative=updateRelative,exports.updateWeekday=updateWeekday,exports.updateWorkWeek=updateWorkWeek,exports.validateNumber=validateNumber,exports.validateTimestamp=validateTimestamp,exports.version=version,exports.weeksBetween=weeksBetween; | ||
var vue=require("vue");const PARSE_DATETIME=/^(\d{4})-(\d{1,2})(-(\d{1,2}))?([^\d]+(\d{1,2}))?(:(\d{1,2}))?(:(\d{1,2}))?(.(\d{1,3}))?$/,PARSE_DATE=/^(\d{4})-(\d{1,2})(-(\d{1,2}))?/,PARSE_TIME=/(\d\d?)(:(\d\d?)|)(:(\d\d?)|)/,DAYS_IN_MONTH=[0,31,28,31,30,31,30,31,31,30,31,30,31],DAYS_IN_MONTH_LEAP=[0,31,29,31,30,31,30,31,31,30,31,30,31],TIME_CONSTANTS={MILLISECONDS_IN:{DAY:864e5},MINUTES_IN:{HOUR:60},DAYS_IN:{WEEK:7}},DAYS_IN_MONTH_MIN=28,DAYS_IN_MONTH_MAX=31,MONTH_MAX=12,MONTH_MIN=1,DAY_MIN=1,FIRST_HOUR=0;function validateTimestamp(e){return"string"===typeof e&&PARSE_DATETIME.test(e)}function parsed(e){if("string"!==typeof e)return null;const t=PARSE_DATETIME.exec(e);if(!t||!t[1]||!t[2])return null;const a=parseInt(t[1],10),n=parseInt(t[2],10),r=parseInt(t[4]||"1",10),o=parseInt(t[6]||"0",10),i=parseInt(t[8]||"0",10);return{date:e,time:o.toString().padStart(2,"0")+":"+i.toString().padStart(2,"0"),year:a,month:n,day:r,hour:o,minute:i,hasDay:!!t[4],hasTime:!0,past:!1,current:!1,future:!1,disabled:!1,weekday:0,doy:0,workweek:0}}function parseDate(e,t=!1){if(!(e instanceof Date))return null;const a=t?"UTC":"";return updateFormatted({date:padNumber(e[`get${a}FullYear`](),4)+"-"+padNumber(e[`get${a}Month`]()+1,2)+"-"+padNumber(e[`get${a}Date`](),2),time:padNumber(e[`get${a}Hours`]()||0,2)+":"+padNumber(e[`get${a}Minutes`]()||0,2),year:e[`get${a}FullYear`](),month:e[`get${a}Month`]()+1,day:e[`get${a}Date`](),hour:e[`get${a}Hours`](),minute:e[`get${a}Minutes`](),weekday:0,doy:0,workweek:0,hasDay:!0,hasTime:!0,past:!1,current:!1,future:!1,disabled:!1})}function padNumber(e,t){let a=String(e);while(a.length<t)a="0"+a;return a}function isLeapYear(e){return e%4===0&&e%100!==0||e%400===0}function daysInMonth(e,t){return(isLeapYear(e)?DAYS_IN_MONTH_LEAP:DAYS_IN_MONTH)[t]}function nextDay(e){const t=new Date(e.year,e.month-1,e.day+1);return updateFormatted(normalizeTimestamp({...e,year:t.getFullYear(),month:t.getMonth()+1,day:t.getDate()}))}function prevDay(e){const t=new Date(e.year,e.month-1,e.day-1);return updateFormatted(normalizeTimestamp({...e,year:t.getFullYear(),month:t.getMonth()+1,day:t.getDate()}))}function today(){const e=new Date,t=e.getMonth()+1,a=e.getDate(),n=e.getFullYear();return[n,padNumber(t,2),padNumber(a,2)].join("-")}function isToday(e){return e===today()}function getStartOfWeek(e,t,a){let n=copyTimestamp(e);if(t){if(1===n.day||0===n.weekday)while(!t.includes(Number(n.weekday)))n=nextDay(n);n=findWeekday(n,t[0],prevDay),n=updateFormatted(n),a&&(n=updateRelative(n,a,n.hasTime))}return n}function getEndOfWeek(e,t,a){let n=copyTimestamp(e);if(t&&Array.isArray(t)){const r=daysInMonth(n.year,n.month);if(r===n.day||n.weekday===t[t.length-1])while(!t.includes(Number(n.weekday)))n=prevDay(n);n=findWeekday(n,t[t.length-1],nextDay),n=updateFormatted(n),a&&(n=updateRelative(n,a,n.hasTime))}return n}function getStartOfMonth(e){let t=copyTimestamp(e);return t.day=DAY_MIN,t=updateFormatted(t),t}function getEndOfMonth(e){let t=copyTimestamp(e);return t.day=daysInMonth(t.year,t.month),t=updateFormatted(t),t}function parseTime(e){const t=Object.prototype.toString.call(e);switch(t){case"[object Number]":return e;case"[object String]":{const a=PARSE_TIME.exec(e);return a?60*parseInt(a[1],10)+parseInt(a[3]||"0",10):!1}case"[object Object]":return"object"!==typeof e||"number"!==typeof e.hour||"number"!==typeof e.minute?!1:"object"===typeof e&&"hour"in e&&"minute"in e&&60*e.hour+e.minute}return!1}function compareTimestamps(e,t){return!(!e||!t)&&e.year===t.year&&e.month===t.month&&e.day===t.day&&e.hour===t.hour&&e.minute===t.minute}function compareDate(e,t){return getDate(e)===getDate(t)}function compareTime(e,t){return getTime(e)===getTime(t)}function compareDateTime(e,t){return getDateTime(e)===getDateTime(t)}function parseTimestamp(e,t=null){let a=parsed(e);return a?(a=updateFormatted(a),t&&(a=updateRelative(a,t,a.hasTime)),a):null}function getDayIdentifier(e){return 1e8*(e.year??0)+1e6*(e.month??0)+1e4*(e.day??0)}function getTimeIdentifier(e){return 100*(e.hour??0)+(e.minute??0)}function getDayTimeIdentifier(e){return getDayIdentifier(e)+getTimeIdentifier(e)}function diffTimestamp(e,t,a=!1){const n=Date.UTC(e.year??0,(e.month??1)-1,e.day??1,e.hour??0,e.minute??0),r=Date.UTC(t.year??0,(t.month??1)-1,t.day??1,t.hour??0,t.minute??0);return!0===a&&r<n?0:r-n}function updateRelative(e,t,a=!1){let n=copyTimestamp(e),r=getDayIdentifier(t),o=getDayIdentifier(n),i=r===o;return n.hasTime&&a&&i&&(r=getTimeIdentifier(t),o=getTimeIdentifier(n),i=r===o),n.past=o<r,n.current=i,n.future=o>r,n.currentWeekday=n.weekday===t.weekday,n}function updateMinutes(e,t,a=null){let n=copyTimestamp(e);return n.hasTime=!0,n.hour=Math.floor(t/TIME_CONSTANTS.MINUTES_IN.HOUR),n.minute=t%TIME_CONSTANTS.MINUTES_IN.HOUR,n.time=getTime(n),a&&(n=updateRelative(n,a,!0)),n}function updateWeekday(e){let t=copyTimestamp(e);return t.weekday=getWeekday(t),t}function updateDayOfYear(e){let t=copyTimestamp(e);return t.doy=getDayOfYear(t)||0,t}function updateWorkWeek(e){let t=copyTimestamp(e);return t.workweek=getWorkWeek(t),t}function updateDisabled(e,t,a,n,r){let o=copyTimestamp(e);const i=getDayIdentifier(o);if(void 0!==t){const l=parsed(t);if(l){const c=getDayIdentifier(l);i<=c&&(o.disabled=!0)}}if(!0!==o.disabled&&void 0!==a){const m=parsed(a);if(m){const v=getDayIdentifier(m);i>=v&&(o.disabled=!0)}}if(!0!==o.disabled&&Array.isArray(n)&&n.length>0)for(var u in n)if(n[u]===o.weekday){o.disabled=!0;break}if(!0!==o.disabled&&Array.isArray(r)&&r.length>0)for(var d in r)if(Array.isArray(r[d])&&2===r[d].length&&r[d][0]&&r[d][1]){const p=parsed(r[d][0]),y=parsed(r[d][1]);if(p&&y&&isBetweenDates(o,p,y)){o.disabled=!0;break}}else{const f=r[d];if(Array.isArray(f))for(var s of f){const h=parseTimestamp(s);if(h){const g=getDayIdentifier(h);if(g===i){o.disabled=!0;break}}}else if(f){const D=parseTimestamp(f);if(D){const T=getDayIdentifier(D);T===i&&(o.disabled=!0)}}}return o}function updateFormatted(e){let t=copyTimestamp(e);return t.hasTime=!0,t.time=getTime(t),t.date=getDate(t),t.weekday=getWeekday(t),t.doy=getDayOfYear(t)||0,t.workweek=getWorkWeek(t),t}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){let t=copyTimestamp(e);if(0===t.year){const r=parseTimestamp(today());r&&(t=r)}const a=new Date(Date.UTC(t.year,t.month-1,t.day)),n=4;a.setUTCDate(a.getUTCDate()-(a.getUTCDay()+6)%7+n),a.setUTCDate(a.getUTCDate()+n-(a.getUTCDay()||7));e=new Date(Date.UTC(a.getUTCFullYear(),0,1)),e=Math.ceil(((a.valueOf()-e.valueOf())/864e5+1)/7);return e}function getWeekday(e){let t=e.weekday;if(e.hasDay){const a=Math.floor,n=e.day,r=(e.month+9)%MONTH_MAX+1,o=a(e.year/100),i=e.year%100-(e.month<=2?1:0);t=((n+a(2.6*r-.2)-2*o+i+a(i/4)+a(o/4))%7+7)%7}return t??0}function copyTimestamp(e){return{...e}}function getDate(e){let 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):"00:00")}function moveRelativeDays(e,t=nextDay,a=1,n=[0,1,2,3,4,5,6]){const r=copyTimestamp(e);return relativeDays(r,t,a,n)}function relativeDays(e,t=nextDay,a=1,n=[0,1,2,3,4,5,6]){let r=copyTimestamp(e);n.includes(Number(r.weekday))||0!==r.weekday||t!==nextDay||++a;while(--a>=0)r=t(r),n.length<7&&!n.includes(Number(r.weekday))&&++a;return r}function findWeekday(e,t,a=nextDay,n=6){let r=copyTimestamp(e);while(r.weekday!==t&&--n>=0)r=a(r);return r}function createDayList(e,t,a,n=[0,1,2,3,4,5,6],r=void 0,o=void 0,i=[],u=[],d=42,s=0){const l=getDayIdentifier(e),c=getDayIdentifier(t),m=[];let v=copyTimestamp(e),p=0,y=p===c;if(!(c<l))while((!y||m.length<s)&&m.length<d){if(p=getDayIdentifier(v),y=y||p>c&&m.length>=s,y)break;if(n.includes(Number(v.weekday))){let e=copyTimestamp(v);e=updateFormatted(e),e=updateRelative(e,a),e=updateDisabled(e,r,o,i,u),m.push(e)}v=relativeDays(v,nextDay)}return m}function createIntervalList(t,a,n,r,o){const i=[];for(let e=0;e<r;++e){const u=(a+e)*n,d=copyTimestamp(t);i.push(updateMinutes(d,u,o))}return i}function createNativeLocaleFormatter(n,r){const e=()=>"";return"undefined"===typeof Intl||"undefined"===typeof Intl.DateTimeFormat?e:(t,e)=>{try{const a=new Intl.DateTimeFormat(n||void 0,r(t,e));return a.format(makeDateTime(t))}catch(e){return console.error(`Intl.DateTimeFormat: ${e.message} -> `+getDateTime(t)),""}}}function makeDate(e,t=!0){return t?new Date(Date.UTC(e.year,e.month-1,e.day,0,0)):new Date(e.year,e.month-1,e.day,0,0)}function makeDateTime(e,t=!0){return t?new Date(Date.UTC(e.year,e.month-1,e.day,e.hour,e.minute)):new Date(e.year,e.month-1,e.day,e.hour,e.minute)}function validateNumber(e){return isFinite(Number(e))}function maxTimestamp(e,t=!1){const a=!0===t?getDayTimeIdentifier:getDayIdentifier;return e.reduce((e,t)=>{return Math.max(a(e),a(t))===a(e)?e:t})}function minTimestamp(e,t=!1){const a=!0===t?getDayTimeIdentifier:getDayIdentifier;return e.reduce((e,t)=>{return Math.min(a(e),a(t))===a(e)?e:t})}function isBetweenDates(e,t,a,n=!1){const r=getDayIdentifier(e)+(!0===n?getTimeIdentifier(e):0),o=getDayIdentifier(t)+(!0===n?getTimeIdentifier(t):0),i=getDayIdentifier(a)+(!0===n?getTimeIdentifier(a):0);return r>=o&&r<=i}function isOverlappingDates(e,t,a,n){const r=getDayIdentifier(e),o=getDayIdentifier(t),i=getDayIdentifier(a),u=getDayIdentifier(n);return r>=i&&r<=u||o>=i&&o<=u||i>=r&&o>=u}function addToDate(e,t){const a=copyTimestamp(e);return t.year&&(a.year+=t.year),t.month&&(a.month+=t.month),t.day&&(a.day+=t.day),t.hour&&(a.hour+=t.hour),t.minute&&(a.minute+=t.minute),updateFormatted(normalizeTimestamp(a))}function normalizeTimestamp(e){const t=new Date(e.year,e.month-1,e.day,e.hour,e.minute);return{...e,year:t.getFullYear(),month:t.getMonth()+1,day:t.getDate(),hour:t.getHours(),minute:t.getMinutes()}}function daysBetween(e,t){const a=diffTimestamp(e,t,!0);return Math.floor(a/TIME_CONSTANTS.MILLISECONDS_IN.DAY)}function weeksBetween(e,t){let a=copyTimestamp(e),n=copyTimestamp(t);return a=findWeekday(a,0),n=findWeekday(n,6),Math.ceil(daysBetween(a,n)/TIME_CONSTANTS.DAYS_IN.WEEK)}const weekdayDateMap={Sun:new Date("2020-01-05T00:00:00.000Z"),Mon:new Date("2020-01-06T00:00:00.000Z"),Tue:new Date("2020-01-07T00:00:00.000Z"),Wed:new Date("2020-01-08T00:00:00.000Z"),Thu:new Date("2020-01-09T00:00:00.000Z"),Fri:new Date("2020-01-10T00:00:00.000Z"),Sat:new Date("2020-01-11T00:00:00.000Z")};function getWeekdayFormatter(){const e=()=>"",r={long:{timeZone:"UTC",weekday:"long"},short:{timeZone:"UTC",weekday:"short"},narrow:{timeZone:"UTC",weekday:"narrow"}};return"undefined"===typeof Intl||"undefined"===typeof Intl.DateTimeFormat?e:t;function t(t,e,a){try{const n=new Intl.DateTimeFormat(a||void 0,r[e]||r["long"]);return n.format(weekdayDateMap[t])}catch(e){return e instanceof Error&&console.error(`Intl.DateTimeFormat: ${e.message} -> day of week: `+t),""}}}function getWeekdayNames(t,a){const e=Object.keys(weekdayDateMap),n=getWeekdayFormatter();return e.map(e=>String(n(e,t,a)))}function getMonthFormatter(){const e=()=>"",o={long:{timeZone:"UTC",month:"long"},short:{timeZone:"UTC",month:"short"},narrow:{timeZone:"UTC",month:"narrow"}};return"undefined"===typeof Intl||"undefined"===typeof Intl.DateTimeFormat?e:t;function t(t,e,a){try{const n=new Intl.DateTimeFormat(a||void 0,o[e]||o["long"]),r=new Date;return r.setDate(1),r.setMonth(t),n.format(r)}catch(e){return e instanceof Error&&console.error(`Intl.DateTimeFormat: ${e.message} -> month: `+t),""}}}function getMonthNames(t,a){const n=getMonthFormatter();return[...Array(12).keys()].map(e=>n(e,t,a))}function convertToUnit(e,t="px"){if(e)return isNaN(e)?String(e):"auto"===e?e:""+Number(e)+t}function indexOf(t,a){for(let e=0;e<t.length;e++)if(!0===a(t[e],e))return e;return-1}function minCharWidth(e,t){return 0===t?e:e.slice(0,t)}const ResizeObserverDirective={mounted(e,t){if("function"===typeof t.value){const a=t.value,n={callback:a,size:{width:0,height:0},observer:new ResizeObserver(e=>{const t=e[0].contentRect;t.width===n.size.width&&t.height===n.size.height||(n.size.width=t.width,n.size.height=t.height,n.debounceTimeout&&clearTimeout(n.debounceTimeout),n.debounceTimeout=setTimeout(()=>{n.callback(n.size),n.debounceTimeout=void 0},100))})};n.observer.observe(e),e.__onResizeObserver=n}},beforeUnmount(e){if(e.__onResizeObserver){const{observer:t,debounceTimeout:a}=e.__onResizeObserver;a&&clearTimeout(a),t.unobserve(e),delete e.__onResizeObserver}}};function useCalendar(t,a,{scrollArea:e,pane:n}){if(!a){const l="[error: renderCalendar] no renderFunc has been supplied to useCalendar";throw console.error(l),new Error(l)}const r=vue.reactive({width:0,height:0}),o=vue.ref(null);function i({width:e,height:t}){r.width=e,r.height=t}const u=vue.computed(()=>{return!0!==t.noScroll&&e.value&&n.value&&r.height?e.value.offsetWidth-n.value.offsetWidth:0});function d(){}function s(){const e={ref:o,role:"complementary",lang:t.locale,class:`q-calendar ${t.dark?"q-calendar--dark":""} `+(t.bordered?"q-calendar__bordered":"")};return vue.withDirectives(vue.h("div",{...e},[a()]),[[ResizeObserverDirective,i]])}return{rootRef:o,scrollWidth:u,__initCalendar:d,__renderCalendar:s}}const isValidFocusType=e=>e.every(e=>["day","date","weekday","interval","time","resource","task"].includes(e)),useCommonProps={modelValue:{type:String,default:today(),validator:e=>""===e||validateTimestamp(e)},weekdays:{type:Array,default:()=>[0,1,2,3,4,5,6]},dateType:{type:String,default:"round",validator:e=>["round","rounded","square"].includes(e)},weekdayAlign:{type:String,default:"center",validator:e=>["left","center","right"].includes(e)},dateAlign:{type:String,default:"center",validator:e=>["left","center","right"].includes(e)},bordered:Boolean,dark:Boolean,noAria:Boolean,noActiveDate:Boolean,noHeader:Boolean,noScroll:Boolean,shortWeekdayLabel:Boolean,noDefaultHeaderText:Boolean,noDefaultHeaderBtn:Boolean,minWeekdayLabel:{type:[Number,String],default:1},weekdayBreakpoints:{type:Array,default:()=>[75,35],validator:e=>2===e.length},locale:{type:String,default:"en-US"},animated:Boolean,transitionPrev:{type:String,default:"slide-right"},transitionNext:{type:String,default:"slide-left"},disabledDays:Array,disabledBefore:String,disabledAfter:String,disabledWeekdays:{type:Array,default:()=>[]},dragEnterFunc:Function,dragOverFunc:Function,dragLeaveFunc:Function,dropFunc:Function,selectedDates:{type:[Array,Set],default:()=>[]},selectedStartEndDates:{type:Array,default:()=>[]},hoverable:Boolean,focusable:Boolean,focusType:{type:Array,default:()=>["date"],validator:isValidFocusType}};function useCommon(t,{startDate:e,endDate:a,times:n}){const r=vue.computed(()=>parseTimestamp(e.value)),o=vue.computed(()=>{return"0000-00-00"===a.value?getEndOfWeek(r.value,t.weekdays,n.today):parseTimestamp(a.value)||r.value}),i=vue.computed(()=>createNativeLocaleFormatter(t.locale,()=>({timeZone:"UTC",day:"numeric"}))),u=vue.computed(()=>createNativeLocaleFormatter(t.locale,(e,t)=>({timeZone:"UTC",weekday:t?"short":"long"}))),d=vue.computed(()=>createNativeLocaleFormatter(t.locale,()=>({timeZone:"UTC",dateStyle:"full"})));function s(e,t){return e&&e.length>0&&e.includes(t.date)}function l(e,t){const a={firstDay:!1,betweenDays:!1,lastDay:!1};if(2===e.length){const n=getDayIdentifier(t),r=getDayIdentifier(parsed(e[0])),o=getDayIdentifier(parsed(e[1]));a.firstDay=r===n,a.lastDay=o===n,a.betweenDays=r<n&&o>n}return a}function c(e,t=!1,a=[],n=[],r=!1){const o=s(a,e),{firstDay:i,lastDay:u,betweenDays:d}=l(n,e);return{"q-past-day":!i&&!d&&!u&&!o&&!t&&!!e.past,"q-future-day":!i&&!d&&!u&&!o&&!t&&!!e.future,"q-outside":t,"q-current-day":!!e.current,"q-selected":o,"q-range-first":i,"q-range":d,"q-range-last":u,"q-range-hover":r&&(i||u||d),"q-disabled-day disabled":!0===e.disabled}}function m(e){return getStartOfWeek(e,t.weekdays,n.today)}function v(e){return getEndOfWeek(e,t.weekdays,n.today)}function p(){return{}}return{parsedStart:r,parsedEnd:o,dayFormatter:i,weekdayFormatter:u,ariaDateFormatter:d,arrayHasDate:s,checkDays:l,getRelativeClasses:c,startOfWeek:m,endOfWeek:v,dayStyleDefault:p}}function scrollTo(e,t){e instanceof Window?e.scrollTo({top:t,behavior:"instant"}):e.scrollTop=t}function getVerticalScrollPosition(e){return e instanceof Window?e.scrollY:e.scrollTop}function animVerticalScrollTo(o,i,u=500,d=performance.now(),s=getVerticalScrollPosition(o)){u<=0||s===i?scrollTo(o,i):requestAnimationFrame(e=>{const t=e-d,a=Math.min(t/u,1),n=e=>e<.5?2*e*e:(4-2*e)*e-1,r=s+(i-s)*n(a);scrollTo(o,r),a<1&&animVerticalScrollTo(o,i,u,d,s)})}function animHorizontalScrollTo(r,e,o=500){const i=r.scrollLeft,u=e-i;let d=null;function s(e){null===d&&(d=e);const t=e-d,a=Math.min(t/o,1),n=e=>e<.5?2*e*e:(4-2*e)*e-1;r.scrollLeft=i+u*n(a),t<o&&requestAnimationFrame(s)}requestAnimationFrame(s)}const useIntervalProps={view:{type:String,validator:e=>["day","week","month","month-interval"].includes(e),default:"day"},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},intervalClass:{type:Function,default:null},weekdayStyle:{type:Function,default:null},weekdayClass:{type:Function,default:null},showIntervalLabel:{type:Function,default:null},hour24Format:Boolean,timeClicksClamped:Boolean,dateHeader:{type:String,default:"stacked",validator:e=>["stacked","inline","inverted"].includes(e)}};function useInterval(o,{times:t,scrollArea:n,parsedStart:e,parsedEnd:a,maxDays:r,size:i,headerColumnRef:u}){const d=vue.computed(()=>parseInt(String(o.intervalStart),10)),m=vue.computed(()=>parseInt(String(o.intervalMinutes),10)),s=vue.computed(()=>parseInt(String(o.intervalCount),10)),v=vue.computed(()=>parseFloat(String(o.intervalHeight))),p=vue.computed(()=>{let e=0;const t=Number(o.columnCount);return o.cellWidth?e=Number(o.cellWidth):i.width>0&&u.value&&(e=u.value.offsetWidth/(t>1?t:r.value)),e}),l=vue.computed(()=>d.value*m.value),c=vue.computed(()=>s.value*v.value),y=vue.computed(()=>s.value*p.value),f=vue.computed(()=>T(e.value)),h=vue.computed(()=>w(a.value)),g=vue.computed(()=>{return createDayList(e.value,a.value,t.today,o.weekdays,o.disabledBefore,o.disabledAfter,o.disabledWeekdays,o.disabledDays,r.value)}),D=vue.computed(()=>{return g.value.map(e=>createIntervalList(e,d.value,m.value,s.value,t.now))});function T(e){return getStartOfWeek(e,o.weekdays,t.today)}function w(e){return getEndOfWeek(e,o.weekdays,t.today)}function k(e,t){return e&&e.length>0&&e.includes(getDateTime(t))}function b(e,t){const a={firstDay:!1,betweenDays:!1,lastDay:!1};if(e&&2===e.length){const n=getDayTimeIdentifier(t),r=getDayTimeIdentifier(parsed(e[0])),o=getDayTimeIdentifier(parsed(e[1]));a.firstDay=r===n,a.lastDay=o===n,a.betweenDays=r<n&&o>n}return a}function _(e,t=[],a=[]){const n=k(t,e),{firstDay:r,lastDay:o,betweenDays:i}=b(a,e);return{"q-selected":n,"q-range-first":!0===r,"q-range":!0===i,"q-range-last":!0===o,"q-disabled-interval disabled":!0===e.disabled}}function I(e,t,a){return[]}const S=vue.computed(()=>{const a={timeZone:"UTC",hour12:!o.hour24Format,hour:"2-digit",minute:"2-digit"},n={timeZone:"UTC",hour12:!o.hour24Format,hour:"numeric",minute:"2-digit"},r={timeZone:"UTC",hour12:!o.hour24Format,hour:"numeric"};return createNativeLocaleFormatter(o.locale,(e,t)=>t?0===e.minute?r:n:a)}),N=vue.computed(()=>{const e={timeZone:"UTC",dateStyle:"full",timeStyle:"short"};return createNativeLocaleFormatter(o.locale,()=>e)});function M(e){const t=D.value[0][0],a=t.hour===e.hour&&t.minute===e.minute;return!a&&0===e.minute}function x(e){}function C(e){return{}}function E(e,t,a=!1,n){let r=copyTimestamp(t);if(e.currentTarget){const o=e.currentTarget.getBoundingClientRect(),i=e,u=e,d=i.changedTouches||i.touches,s=(d&&d[0]?d[0]:u).clientY,l=(s-o.top)/v.value,c=Math.floor((a?Math.floor(l):l)*m.value);0!==c&&(r=addToDate(r,{minute:c})),n&&(r=updateRelative(r,n,!0))}return r}function R(e,t,a=!1,n){let r=copyTimestamp(t);const o=e.currentTarget.getBoundingClientRect(),i=e,u=e,d=i.changedTouches||i.touches,s=(d&&d[0]?d[0]:u).clientY,l=(s-o.top)/v.value,c=Math.floor((a?Math.floor(l):l)*m.value);return 0!==c&&(r=addToDate(r,{minute:c})),n&&(r=updateRelative(r,n,!0)),r}function q(e,t,a=!1,n){let r=copyTimestamp(t);if(e.currentTarget){const o=e.currentTarget.getBoundingClientRect(),i=e,u=e,d=i.changedTouches||i.touches,s=(d&&d[0]?d[0]:u).clientX,l=(s-o.left)/p.value,c=Math.floor((a?Math.floor(l):l)*m.value);0!==c&&(r=addToDate(r,{minute:c})),n&&(r=updateRelative(r,n,!0))}return r}function H(e,t){const a={timestamp:e,timeStartPos:W,timeDurationHeight:A};return void 0!==t&&(a.columnIndex=t),a}function L(e,t){const a={timestamp:copyTimestamp(e),timeStartPosX:O,timeDurationWidth:F};return void 0!==t&&(a.index=t),a}function U(e,t=0){const a=W(e);return!(!1===a||!n.value)&&(animVerticalScrollTo(n.value,a,t),!0)}function B(e,t=0){const a=O(e);return!(!1===a||!n.value)&&(animHorizontalScrollTo(n.value,a,t),!0)}function A(e){return e/m.value*v.value}function F(e){return e/m.value*p.value}function P(e){return e*m.value/v.value}function Y(e){return e*m.value/p.value}function W(e,t=!0){const a=parseTime(e);if(!1===a)return!1;const n=l.value,r=s.value*m.value,o=(a-n)/r;let i=o*c.value;return t&&(i<0&&(i=0),i>c.value)&&(i=c.value),i}function O(e,t=!0){const a=parseTime(e);if(!1===a)return!1;const n=l.value,r=s.value*m.value,o=(a-n)/r;let i=o*y.value;return t&&(i<0&&(i=0),i>y.value)&&(i=y.value),i}return{parsedIntervalStart:d,parsedIntervalMinutes:m,parsedIntervalCount:s,parsedIntervalHeight:v,parsedCellWidth:p,parsedStartMinute:l,bodyHeight:c,bodyWidth:y,parsedWeekStart:f,parsedWeekEnd:h,days:g,intervals:D,intervalFormatter:S,ariaDateTimeFormatter:N,arrayHasDateTime:k,checkIntervals:b,getIntervalClasses:_,getResourceClasses:I,showIntervalLabelDefault:M,showResourceLabelDefault:x,styleDefault:C,getTimestampAtEventInterval:E,getTimestampAtEvent:R,getTimestampAtEventX:q,getScopeForSlot:H,getScopeForSlotX:L,scrollToTime:U,scrollToTimeX:B,timeDurationHeight:A,timeDurationWidth:F,heightToMinutes:P,widthToMinutes:Y,timeStartPos:W,timeStartPosX:O}}const useColumnProps={columnCount:{type:[Number,String],default:0,validator:validateNumber},columnIndexStart:{type:[Number,String],default:0,validator:validateNumber}},useMaxDaysProps={maxDays:{type:Number,default:1}},useTimesProps={now:{type:String,validator:e=>""===e||validateTimestamp(e),default:""}};function useTimes(e){const t=vue.reactive({now:parseTimestamp("0000-00-00 00:00"),today:parseTimestamp("0000-00-00")}),a=vue.computed(()=>e.now?parseTimestamp(e.now):o());function n(){t.now&&t.today&&(t.now.current=t.today.current=!0,t.now.past=t.today.past=!1,t.now.future=t.today.future=!1)}function r(){const e=a.value||o();i(e,t.now),u(e,t.now),i(e,t.today)}function o(){return parseDate(new Date)}function i(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)}function u(e,t){e.time!==t.time&&(t.hour=e.hour,t.minute=e.minute,t.time=e.time)}return vue.watch(a,()=>r()),{times:t,parsedNow:a,setCurrent:n,updateCurrent:r,getNow:o,updateDay:i,updateTime:u}}function useRenderValues(r,{parsedView:o,parsedValue:i,times:u}){const e=vue.computed(()=>{const e=i.value;let t=r.maxDays,a=e,n=e;switch(o.value){case"month":a=getStartOfMonth(e),n=getEndOfMonth(e),t=daysInMonth(a.year,a.month);break;case"week":case"week-agenda":case"week-scheduler":a=getStartOfWeek(e,r.weekdays,u.today),n=getEndOfWeek(a,r.weekdays,u.today),t=r.weekdays.length;break;case"day":case"scheduler":case"agenda":n=moveRelativeDays(copyTimestamp(n),nextDay,t>1?t-1:t,r.weekdays),n=updateFormatted(n);break;case"month-interval":case"month-scheduler":case"month-agenda":a=getStartOfMonth(e),n=getEndOfMonth(e),n=updateFormatted(n),t=daysInMonth(a.year,a.month);break;case"resource":t=1,n=moveRelativeDays(copyTimestamp(n),nextDay,t,r.weekdays),n=updateFormatted(n);break}return{start:a,end:n,maxDays:t}});return{renderValues:e}}const toCamelCase=e=>e.replace(/(-\w)/g,e=>e[1].toUpperCase());function getMouseEventHandlers(t,e,a,n){const r={};for(const o in a){const i=a[o],u=toCamelCase("on-"+o);if(!e.value)return console.warn("$listeners has not been set up"),{};if(void 0!==e.value[u]){const d="on"+i.event.charAt(0).toUpperCase()+i.event.slice(1),s=e=>{return(void 0===i.button||"buttons"in e&&e.buttons>0&&e.button===i.button)&&(i.prevent&&e.preventDefault(),i.stop&&e.stopPropagation(),t(o,n(e,o))),i.result};d in r?Array.isArray(r[d])?r[d].push(s):r[d]=[r[d],s]:r[d]=s}}return r}function getDefaultMouseEventHandlers(e,t,a,n){return getMouseEventHandlers(e,t,getMouseEventName(a),n)}function getMouseEventName(e){return{["click"+e]:{event:"click"},["contextmenu"+e]:{event:"contextmenu",prevent:!0,result:!1},["mousedown"+e]:{event:"mousedown"},["mousemove"+e]:{event:"mousemove"},["mouseup"+e]:{event:"mouseup"},["mouseenter"+e]:{event:"mouseenter"},["mouseleave"+e]:{event:"mouseleave"},["touchstart"+e]:{event:"touchstart"},["touchmove"+e]:{event:"touchmove"},["touchend"+e]:{event:"touchend"}}}function getRawMouseEvents(e){return Object.keys(getMouseEventName(e))}function useMouseEvents(a,n){return{getMouseEventHandlers:(e,t)=>getMouseEventHandlers(a,n,e,t),getDefaultMouseEventHandlers:(e,t)=>getDefaultMouseEventHandlers(a,n,e,t),getMouseEventName:getMouseEventName,getRawMouseEvents:getRawMouseEvents}}const useMoveEmits=["moved"];function useMove(d,{parsedView:s,parsedValue:l,direction:c,maxDays:m,times:v,emittedValue:p,emit:y}){function e(a=1){if(0===a)p.value=today();else{let e=copyTimestamp(l.value);const n=getEndOfMonth(e),r=a>0,o=r?nextDay:prevDay,i=r?n.day:1;let t=r?a:-a;c.value=r?"next":"prev";const u=d.weekdays.length;while(--t>=0)switch(s.value){case"month":e.day=i,e=o(e),e=updateWeekday(e);while(!d.weekdays.includes(Number(e.weekday)))e=addToDate(e,{day:r?1:-1});break;case"week":case"week-agenda":case"week-scheduler":e=relativeDays(e,o,u,d.weekdays);break;case"day":case"scheduler":case"agenda":e=relativeDays(e,o,m.value,d.weekdays);break;case"month-interval":case"month-agenda":case"month-scheduler":e.day=i,e=o(e);break;case"resource":e=relativeDays(e,o,m.value,d.weekdays);break}e=updateWeekday(e),e=updateFormatted(e),e=updateDayOfYear(e),e=updateRelative(e,v.now),p.value=e.date,y("moved",e)}}return{move:e}}const listenerRE=/^on[A-Z]/;function useEmitListeners(e=vue.getCurrentInstance()){return{emitListeners:vue.computed(()=>{const t={};return e?.vnode?.props&&Object.keys(e.vnode.props).forEach(e=>{listenerRE.test(e)&&(t[e]=!0)}),t})}}function useFocusHelper(){const e={"aria-hidden":"true",class:"q-calendar__focus-helper"};return[vue.h("span",e)]}function useButton(){function e({focusable:e,focusType:t},a,n){const r=e&&t.includes("date");return vue.h("button",{...a,tabindex:r?0:-1},[n,r&&useFocusHelper()])}return{renderButton:e}}const useCellWidthProps={cellWidth:[Number,String]};function useCellWidth(e){const t=vue.computed(()=>void 0!==e.cellWidth);return{isSticky:t}}const useCheckChangeEmits=["change"];function useCheckChange(n,{days:r,lastStart:o,lastEnd:i}){function e(){const e=r.value;if(0===e.length)return!1;const t=e[0].date,a=e[e.length-1].date;return(!o.value||!i.value||t!==o.value||a!==i.value)&&(o.value=t,i.value=a,n("change",{start:t,end:a,days:e}),!0)}return{checkChange:e}}function useEventUtils(){function e(e,t){return(Array.isArray(t)?t:[t]).includes(e.keyCode)}return{isKeyCode:e}}const isKeyCode=useEventUtils().isKeyCode,useNavigationProps={useNavigation:Boolean};function useNavigation(t,{rootRef:a,focusRef:n,focusValue:r,datesRef:o,parsedView:i,emittedValue:u,direction:d,times:s}){let e=!1;function l(){e||document&&(e=!0,document.addEventListener("keyup",y),document.addEventListener("keydown",p))}function c(){document&&(document.removeEventListener("keyup",y),document.removeEventListener("keydown",p),e=!1)}function m(e){if(e&&document){const t=document.activeElement;if(t!==document.body&&a.value?.contains(t))return!0}return!1}function v(){let t=0;const a=window.setInterval(()=>{const e=o.value[n.value];e&&(e.focus(),50!==++t)&&document.activeElement!==e||window.clearInterval(a)},250)}function p(e){m(e)&&isKeyCode(e,[33,34,35,36,37,38,39,40])&&(e.stopPropagation(),e.preventDefault())}function y(e){if(m(e)&&isKeyCode(e,[33,34,35,36,37,38,39,40])){const t={33:T,34:w,35:b,36:k,37:g,38:f,39:D,40:h};t[e.keyCode]?.()}}function f(){let e=copyTimestamp(r.value);if("month"===i.value){if(e=addToDate(e,{day:-7}),r.value.month!==e.month)return d.value="prev",void(u.value=e.date)}else e=addToDate(e,{minute:Number(t.intervalMinutes)});d.value="prev",n.value=e.date}function h(){let e=copyTimestamp(r.value);if("month"===i.value){if(e=addToDate(e,{day:7}),r.value.month!==e.month)return d.value="next",void(u.value=e.date)}else e=addToDate(e,{minute:Number(t.intervalMinutes)});d.value="next",n.value=e.date}function g(){let e=copyTimestamp(r.value);d.value="prev";do{e=addToDate(e,{day:-1})}while(!t.weekdays.includes(Number(e.weekday)));n.value=e.date}function D(){let e=copyTimestamp(r.value);d.value="next";do{e=addToDate(e,{day:1})}while(!t.weekdays.includes(Number(e.weekday)));n.value=e.date}function T(){let e=copyTimestamp(r.value);e="month"===i.value?addToDate(e,{month:-1}):addToDate(e,{day:-7}),d.value="prev",n.value=e.date}function w(){let e=copyTimestamp(r.value);e="month"===i.value?addToDate(e,{month:1}):addToDate(e,{day:7}),d.value="next",n.value=e.date}function k(){let e=copyTimestamp(r.value);e="month"===i.value?getStartOfMonth(e):getStartOfWeek(e,t.weekdays||[],s.today);while(!t.weekdays.includes(Number(e.weekday)))e=addToDate(e,{day:-1});n.value=e.date}function b(){let e=copyTimestamp(r.value);e="month"===i.value?getEndOfMonth(e):getEndOfWeek(e,t.weekdays||[],s.today);while(!t.weekdays.includes(Number(e.weekday)))e=addToDate(e,{day:-1});n.value=e.date}return vue.onBeforeUnmount(()=>{c()}),vue.watch(()=>t.useNavigation,e=>{(!0===e?l:c)()}),!0===t.useNavigation&&l(),{startNavigation:l,endNavigation:c,tryFocus:v}}const renderButton=useButton().renderButton;var QCalendarDay=vue.defineComponent({name:"QCalendarDay",directives:{ResizeObserver:ResizeObserverDirective},props:{...useCommonProps,...useIntervalProps,...useColumnProps,...useMaxDaysProps,...useTimesProps,...useCellWidthProps,...useNavigationProps},emits:["update:model-value",...useCheckChangeEmits,...useMoveEmits,...getRawMouseEvents("-date"),...getRawMouseEvents("-interval"),...getRawMouseEvents("-head-intervals"),...getRawMouseEvents("-head-day"),...getRawMouseEvents("-time")],setup(v,{slots:p,emit:m,expose:R}){const e=vue.ref(null),q=vue.ref(null),H=vue.ref(null),y=vue.ref(v.modelValue||today()),t=vue.ref(parsed(v.modelValue||today())),f=vue.ref({}),a=vue.ref(),n=vue.ref(),i=vue.ref("next"),u=vue.ref(v.modelValue||today()),d=vue.ref("0000-00-00"),s=vue.ref(0),h=vue.ref(v.modelValue||today()),l=vue.reactive({width:0,height:0}),g=vue.ref(""),D=vue.ref(0),L=vue.ref(null),U=vue.ref(null),r=(vue.watch(()=>v.view,()=>{s.value=0}),vue.computed(()=>{return"month"===v.view?"month-interval":v.view})),B=vue.getCurrentInstance();if(null===B)throw new Error("current instance is null");const T=useEmitListeners(B).emitListeners,w=useCellWidth(v).isSticky,{times:k,setCurrent:P,updateCurrent:Y}=useTimes(v),{parsedStart:o,parsedEnd:V,dayFormatter:z,weekdayFormatter:Z,ariaDateFormatter:$,dayStyleDefault:K,getRelativeClasses:b}=(Y(),P(),useCommon(v,{startDate:u,endDate:d,times:k})),c=vue.computed(()=>{return parseTimestamp(v.modelValue,k.now)||o.value||k.today}),X=(t.value=c.value,y.value=c.value.date,useRenderValues(v,{parsedView:r,parsedValue:c,times:k})).renderValues,{rootRef:_,scrollWidth:j,__renderCalendar:Q}=useCalendar(v,Pe,{scrollArea:e,pane:q}),{days:I,intervals:G,intervalFormatter:J,ariaDateTimeFormatter:ee,parsedCellWidth:S,getIntervalClasses:te,showIntervalLabelDefault:ae,styleDefault:ne,getTimestampAtEventInterval:re,getTimestampAtEvent:oe,getScopeForSlot:N,scrollToTime:ie,heightToMinutes:ue,timeDurationHeight:de,timeStartPos:se}=useInterval(v,{times:k,scrollArea:e,parsedStart:o,parsedEnd:V,maxDays:s,size:l,headerColumnRef:H}),M=useMove(v,{parsedView:r,parsedValue:c,direction:i,maxDays:s,times:k,emittedValue:h,emit:m}).move,x=useMouseEvents(m,T).getDefaultMouseEventHandlers,le=useCheckChange(m,{days:I,lastStart:L,lastEnd:U}).checkChange,C=useEventUtils().isKeyCode,ce=useNavigation(v,{rootRef:_,focusRef:y,focusValue:t,datesRef:f,parsedView:r,emittedValue:h,direction:i,times:k}).tryFocus,E=vue.computed(()=>{const e=parseInt(String(v.columnCount),10);return"day"===r.value&&e>1?e:"day"===r.value&&v.maxDays&&v.maxDays>1?v.maxDays:I.value.length}),me=vue.computed(()=>{return _.value?parseInt(window.getComputedStyle(_.value).getPropertyValue("--calendar-intervals-width"),10):0}),A=vue.computed(()=>{if(_.value){const e=l.width||_.value.getBoundingClientRect().width;if(e&&me.value&&E.value)return(e-j.value-me.value)/E.value+"px"}return 100/E.value+"%"});function ve(){h.value=today()}function pe(e=1){M(e)}function ye(e=1){M(-e)}function fe({width:e,height:t}){l.width=e,l.height=t}function F(e){return e.date===h.value}function he(){return vue.h("div",{roll:"presentation",class:{"q-calendar-day__head":!0,"q-calendar__sticky":!0===w.value},style:{marginRight:j.value+"px"}},[ge(),De()])}function ge(){const e=p["head-intervals"],t={timestamps:I.value,days:I.value,date:v.modelValue};return vue.h("div",{class:{"q-calendar-day__head--intervals":!0,"q-calendar__sticky":!0===w.value},...x("-head-intervals",e=>{return{scope:t,event:e}})},[e&&e({scope:t})])}function De(){return vue.h("div",{ref:H,class:{"q-calendar-day__head--days__column":!0}},[Te(),we()])}function Te(){return vue.h("div",{class:{"q-calendar-day__head--days__weekdays":!0}},[...ke()])}function we(){const e=p["head-days-events"],t=parseInt(String(v.columnCount),10);return vue.nextTick(()=>{if(n.value&&0===t&&window)try{const e=window.getComputedStyle(n.value);a.value&&a.value.parentElement&&(a.value.parentElement.style.height=e.height,a.value.style.height=e.height)}catch{}}),vue.h("div",{class:{"q-calendar-day__head--days__event":!0}},[e&&vue.h("div",{ref:a,style:{position:"absolute",left:0,top:0,right:0,overflow:"hidden",zIndex:1}},[e({scope:{days:I.value,ref:n}})]),...be()])}function ke(){const e=parseInt(String(v.columnCount),10),a=parseInt(String(v.columnIndexStart),10);return 1===I.value.length&&e>0?Array.apply(null,new Array(e)).map((e,t)=>t+a).map(e=>_e(I.value[0],e)):I.value.map(e=>_e(e,0))}function be(){const e=parseInt(String(v.columnCount),10),a=parseInt(String(v.columnIndexStart),10);return 1===I.value.length&&e>0?Array.apply(null,new Array(e)).map((e,t)=>t+a).map(e=>Se(I.value[0],e)).filter(e=>void 0!==e):I.value.map(e=>Se(e,0)).filter(e=>void 0!==e)}function _e(t,e){const a=p["head-day"],n=p["head-date"],r=!0!==v.noActiveDate&&F(t),o=N(t,e),i=(o.activeDate=r,o.droppable=g.value===t.date,o.disabled=!!v.disabledWeekdays&&v.disabledWeekdays.includes(Number(t.weekday)),!0===w.value?v.cellWidth:A.value),u=v.weekdayStyle||K,d={width:i,maxWidth:i,minWidth:i,...u({scope:o})},s=(!0===w.value&&(d.minWidth=i),"function"===typeof v.weekdayClass?v.weekdayClass({scope:o}):{}),l=!0===v.focusable&&v.focusType.includes("weekday"),c=t.date+(void 0!==e?"-"+e:""),m={key:c,ref:e=>{f.value[c]=e},tabindex:!0===l?0:-1,class:{"q-calendar-day__head--day":!0,...s,...b(t),"q-active-date":r,"q-calendar__hoverable":!0===v.hoverable,"q-calendar__focusable":!0===l},style:d,onFocus:()=>{!0===l&&(y.value=c)},onKeydown:e=>{!0!==t.disabled&&C(e,[13,32])&&(e.stopPropagation(),e.preventDefault())},onKeyup:e=>{!0!==t.disabled&&C(e,[13,32])&&(h.value=t.date)},...x("-head-day",e=>{return{scope:o,event:e}}),onDragenter:e=>{void 0!==v.dragEnterFunc&&"function"===typeof v.dragEnterFunc&&(!0===v.dragEnterFunc(e,"head-day",{scope:o})?g.value=t.date:g.value="")},onDragover:e=>{void 0!==v.dragOverFunc&&"function"===typeof v.dragOverFunc&&(!0===v.dragOverFunc(e,"head-day",{scope:o})?g.value=t.date:g.value="")},onDragleave:e=>{void 0!==v.dragLeaveFunc&&"function"===typeof v.dragLeaveFunc&&(!0===v.dragLeaveFunc(e,"head-day",{scope:o})?g.value=t.date:g.value="")},onDrop:e=>{void 0!==v.dropFunc&&"function"===typeof v.dropFunc&&(!0===v.dropFunc(e,"head-day",{scope:o})?g.value=t.date:g.value="")}};return vue.h("div",m,[void 0!==a&&a({scope:o}),void 0===a&&xe(t,e),void 0===a&&Ie(t),void 0===a&&n&&n({scope:o}),void 0===a&&Ce(t,e),useFocusHelper()])}function Ie(e){return"stacked"===v.dateHeader?[!0!==v.noDefaultHeaderText?W(e):[],!0!==v.noDefaultHeaderBtn?O(e):[]].filter(e=>void 0!==e):"inline"===v.dateHeader?("left"===v.weekdayAlign&&"right"===v.dateAlign||"right"===v.weekdayAlign&&v.dateAlign,vue.h("div",{class:"q-calendar__header--inline"},[!0!==v.noDefaultHeaderText&&W(e),!0!==v.noDefaultHeaderBtn&&O(e)])):"inverted"===v.dateHeader?("left"===v.weekdayAlign&&"right"===v.dateAlign||"right"===v.weekdayAlign&&v.dateAlign,vue.h("div",{class:"q-calendar__header--inline"},[!0!==v.noDefaultHeaderBtn&&O(e),!0!==v.noDefaultHeaderText&&W(e)])):void 0}function Se(e,t){const a=p["head-day-event"],n=!0!==v.noActiveDate&&F(e),r=N(e,t),o=(r.activeDate=n,r.disabled=!!v.disabledWeekdays&&v.disabledWeekdays.includes(Number(e.weekday)),!0===w.value?convertToUnit(S.value):A.value),i={width:o,maxWidth:o,minWidth:o};return!0===w.value&&(i.minWidth=o),vue.h("div",{key:"event-"+e.date+(void 0!==t?"-"+t:""),class:{"q-calendar-day__head--day__event":!0,...b(e),"q-active-date":n},style:i},[a&&a({scope:r})])}function W(e){const t=p["head-weekday-label"],a=!0===v.shortWeekdayLabel,n=N(e,0),r=(n.shortWeekdayLabel=v.shortWeekdayLabel,n.disabled=!!v.disabledWeekdays&&v.disabledWeekdays.includes(Number(e.weekday)),{class:{"q-calendar-day__head--weekday":!0,["q-calendar__"+v.weekdayAlign]:!0,"q-calendar__ellipsis":!0}});return vue.h("div",r,t&&t({scope:n})||Ne(e,a))}function Ne(e,t){const a=Z.value(e,t||v.weekdayBreakpoints[0]>0&&S.value<=v.weekdayBreakpoints[0]);return vue.h("span",{class:"q-calendar-day__head--weekday-label q-calendar__ellipsis"},v.weekdayBreakpoints[1]>0&&S.value<=v.weekdayBreakpoints[1]?minCharWidth(a,Number(v.minWeekdayLabel)):a)}function O(e){const t={class:{"q-calendar-day__head--date":!0,["q-calendar__"+v.dateAlign]:!0}};return vue.h("div",t,Me(e))}function Me(a){const e=!0!==v.noActiveDate&&F(a),t=z.value(a,!1),n=p["head-day-label"],r=p["head-day-button"],o={dayLabel:t,timestamp:a,activeDate:e,disabled:!!v.disabledWeekdays&&v.disabledWeekdays.includes(Number(a.weekday))},i={class:{"q-calendar-day__head--day__label":!0,"q-calendar__button":!0,"q-calendar__button--round":"round"===v.dateType,"q-calendar__button--rounded":"rounded"===v.dateType,"q-calendar__button--bordered":!0===a.current,"q-calendar__focusable":!0},disabled:a.disabled,onKeydown:e=>{!0!==a.disabled&&C(e,[13,32])&&(e.stopPropagation(),e.preventDefault())},onKeyup:e=>{!0!==a.disabled&&C(e,[13,32])&&(h.value=a.date,void 0!==T.value.onClickDate)&&m("click-date",{scope:o})},...x("-date",(e,t)=>{return"click-date"!==t&&"contextmenu-date"!==t||(h.value=a.date,"click-date"===t&&e.preventDefault()),{scope:o,event:e}})};return!0!==v.noAria&&(i.ariaLabel=$.value(a,!1)),r?r({scope:o}):renderButton(v,i,n?n({scope:o}):t)}function xe(e,t){const a=p["column-header-before"];if(a){const n={timestamp:e,columnIndex:t};return vue.h("div",{class:"q-calendar-day__column-header--before"},[a({scope:n})])}}function Ce(e,t){const a=p["column-header-after"];if(a){const n={timestamp:e,columnIndex:t};return vue.h("div",{class:"q-calendar-day__column-header--after"},[a({scope:n})])}}function Ee(){return vue.h("div",{class:"q-calendar-day__body"},[Ae()])}function Ae(){return!0===w.value?vue.h("div",{ref:e,class:{"q-calendar-day__scroll-area":!0,"q-calendar__scroll":!0}},[!0!==w.value&&Le(),We()]):!0===v.noScroll?Fe():vue.h("div",{ref:e,class:{"q-calendar-day__scroll-area":!0,"q-calendar__scroll":!0}},[Fe()])}function Fe(){return vue.h("div",{ref:q,class:"q-calendar-day__pane"},[Le(),We()])}function We(){const e=p["day-container"];return vue.h("div",{class:"q-calendar-day__day-container"},[!0===w.value&&!0!==v.noHeader&&he(),vue.h("div",{style:{display:"flex",flexDirection:"row"}},[!0===w.value&&Le(),...Oe()]),e&&e({scope:{days:I.value}})])}function Oe(){const e=parseInt(String(v.columnCount),10),a=parseInt(String(v.columnIndexStart),10);return 1===I.value.length&&e>0?Array.apply(null,new Array(e)).map((e,t)=>t+a).map(e=>Re(I.value[0],0,e)):I.value.map((e,t)=>Re(e,t,0))}function Re(e,t,a){const n=p["day-body"],r=N(e,a),o=!0===w.value?v.cellWidth:A.value,i={width:o,maxWidth:o,minWidth:o};return!0===w.value&&(i.minWidth=o),vue.h("div",{key:e.date+(void 0!==a?":"+a:""),class:{"q-calendar-day__day":!0,...b(e)},style:i},[...qe(t,a),n&&n({scope:r})])}function qe(e,t){return G.value[e].map(e=>He(e,t))}function He(a,n){const e=convertToUnit(v.intervalHeight),t=v.intervalStyle||ne,r=p["day-interval"],o=N(a,n),i=(o.droppable=D.value===getDayTimeIdentifier(a),"function"===typeof v.intervalClass?v.intervalClass({scope:o}):{}),u=!0===v.focusable&&v.focusType.includes("interval"),d=getDateTime(a),s={height:e,...t({scope:o})},l={key:d,tabindex:!0===u?0:-1,class:{"q-calendar-day__day-interval":0===a.minute,"q-calendar-day__day-interval--section":0!==a.minute,...i,...te(a,Array.from(v.selectedDates),v.selectedStartEndDates),"q-calendar__hoverable":!0===v.hoverable,"q-calendar__focusable":!0===u},style:s,onDragenter:e=>{void 0!==v.dragEnterFunc&&"function"===typeof v.dragEnterFunc&&(!0===v.dragEnterFunc(e,"interval",{scope:o})?D.value=getDayTimeIdentifier(a):D.value=0)},onDragover:e=>{void 0!==v.dragOverFunc&&"function"===typeof v.dragOverFunc&&(!0===v.dragOverFunc(e,"interval",{scope:o})?D.value=getDayTimeIdentifier(a):D.value=0)},onDragleave:e=>{void 0!==v.dragLeaveFunc&&"function"===typeof v.dragLeaveFunc&&(!0===v.dragLeaveFunc(e,"interval",{scope:o})?D.value=getDayTimeIdentifier(a):D.value=0)},onDrop:e=>{void 0!==v.dropFunc&&"function"===typeof v.dropFunc&&(!0===v.dropFunc(e,"interval",{scope:o})?D.value=getDayTimeIdentifier(a):D.value=0)},onKeydown:e=>{C(e,[13,32])&&(e.stopPropagation(),e.preventDefault())},onKeyup:e=>{if(C(e,[13,32])){const t=N(a,n);h.value=t.timestamp.date,void 0!==T.value.onClickTime&&m("click-time",{scope:t,event:e})}},...x("-time",e=>{const t=N(re(e,a,v.timeClicksClamped,k.now),n);return{scope:t,event:e}})},c=(!0!==v.noAria&&(l.ariaLabel=ee.value(a,!1)),r?r({scope:o}):void 0);return vue.h("div",l,[c,useFocusHelper()])}function Le(){const e={ariaHidden:"true",class:{"q-calendar-day__intervals-column":!0,"q-calendar__ellipsis":!0,"q-calendar__sticky":!0===w.value},...x("-interval",e=>{const t=oe(e,o.value,v.timeClicksClamped,k.now);return{scope:{timestamp:t},event:e}})};return vue.h("div",e,Ue())}function Ue(){return G.value[0].map(e=>Be(e))}function Be(e){const t=p["interval-label"],a=convertToUnit(v.intervalHeight),n=v.shortIntervalLabel??!1,r=v.showIntervalLabel||ae,o=r(e),i=o?J.value(e,n):void 0;return vue.h("div",{key:e.time,class:{"q-calendar-day__interval":0===e.minute,"q-calendar-day__interval--section":0!==e.minute},style:{height:a}},[vue.h("div",{class:"q-calendar-day__interval--text q-calendar__overflow-wrap"},[t?t({scope:{timestamp:e,label:i}}):i])])}function Pe(){const{start:e,end:t,maxDays:a}=X.value,n=(u.value===e.date&&d.value===t.date&&s.value===a||(u.value=e.date,d.value=t.date,s.value=a),l.width>0),r=vue.withDirectives(vue.h("div",{key:u.value,class:"q-calendar-day"},[!0===n&&!0!==w.value&&!0!==v.noHeader&&he(),n&&Ee()]),[[ResizeObserverDirective,fe]]);if(!0!==v.animated)return r;{const o="q-calendar--"+("prev"===i.value?v.transitionPrev:v.transitionNext);return vue.h(vue.Transition,{name:o,appear:!0},()=>r)}}return vue.watch([I],le,{deep:!0,immediate:!0}),vue.watch(()=>v.modelValue,(e,t)=>{if(h.value!==v.modelValue){if(!0===v.animated){const a=getDayIdentifier(parsed(e)),n=getDayIdentifier(parsed(t));i.value=a>=n?"next":"prev"}h.value=e}y.value=e}),vue.watch(h,(e,t)=>{if(h.value!==v.modelValue){if(!0===v.animated){const a=getDayIdentifier(parsed(e)),n=getDayIdentifier(parsed(t));i.value=a>=n?"next":"prev"}m("update:model-value",e)}}),vue.watch(y,e=>{e&&(t.value=parseTimestamp(e))}),vue.watch(t,()=>{y.value&&f.value[y.value]?f.value[y.value].focus():ce()}),vue.watch(()=>v.maxDays,e=>{s.value=e}),vue.onBeforeUpdate(()=>{f.value={},a.value=void 0,n.value=void 0}),vue.onMounted(()=>{}),R({prev:ye,next:pe,move:M,moveToToday:ve,updateCurrent:Y,timeStartPos:se,timeDurationHeight:de,heightToMinutes:ue,scrollToTime:ie}),()=>Q()}});const version="4.1.1";exports.DAYS_IN_MONTH=DAYS_IN_MONTH,exports.DAYS_IN_MONTH_LEAP=DAYS_IN_MONTH_LEAP,exports.DAYS_IN_MONTH_MAX=DAYS_IN_MONTH_MAX,exports.DAYS_IN_MONTH_MIN=DAYS_IN_MONTH_MIN,exports.DAY_MIN=DAY_MIN,exports.FIRST_HOUR=FIRST_HOUR,exports.MONTH_MAX=MONTH_MAX,exports.MONTH_MIN=MONTH_MIN,exports.PARSE_DATE=PARSE_DATE,exports.PARSE_DATETIME=PARSE_DATETIME,exports.PARSE_TIME=PARSE_TIME,exports.QCalendarDay=QCalendarDay,exports.TIME_CONSTANTS=TIME_CONSTANTS,exports.addToDate=addToDate,exports.compareDate=compareDate,exports.compareDateTime=compareDateTime,exports.compareTime=compareTime,exports.compareTimestamps=compareTimestamps,exports.convertToUnit=convertToUnit,exports.copyTimestamp=copyTimestamp,exports.createDayList=createDayList,exports.createIntervalList=createIntervalList,exports.createNativeLocaleFormatter=createNativeLocaleFormatter,exports.daysBetween=daysBetween,exports.daysInMonth=daysInMonth,exports.diffTimestamp=diffTimestamp,exports.findWeekday=findWeekday,exports.getDate=getDate,exports.getDateTime=getDateTime,exports.getDayIdentifier=getDayIdentifier,exports.getDayOfYear=getDayOfYear,exports.getDayTimeIdentifier=getDayTimeIdentifier,exports.getEndOfMonth=getEndOfMonth,exports.getEndOfWeek=getEndOfWeek,exports.getMonthFormatter=getMonthFormatter,exports.getMonthNames=getMonthNames,exports.getStartOfMonth=getStartOfMonth,exports.getStartOfWeek=getStartOfWeek,exports.getTime=getTime,exports.getTimeIdentifier=getTimeIdentifier,exports.getWeekday=getWeekday,exports.getWeekdayFormatter=getWeekdayFormatter,exports.getWeekdayNames=getWeekdayNames,exports.getWorkWeek=getWorkWeek,exports.indexOf=indexOf,exports.isBetweenDates=isBetweenDates,exports.isLeapYear=isLeapYear,exports.isOverlappingDates=isOverlappingDates,exports.isToday=isToday,exports.makeDate=makeDate,exports.makeDateTime=makeDateTime,exports.maxTimestamp=maxTimestamp,exports.minCharWidth=minCharWidth,exports.minTimestamp=minTimestamp,exports.moveRelativeDays=moveRelativeDays,exports.nextDay=nextDay,exports.padNumber=padNumber,exports.parseDate=parseDate,exports.parseTime=parseTime,exports.parseTimestamp=parseTimestamp,exports.parsed=parsed,exports.prevDay=prevDay,exports.relativeDays=relativeDays,exports.today=today,exports.updateDayOfYear=updateDayOfYear,exports.updateDisabled=updateDisabled,exports.updateFormatted=updateFormatted,exports.updateMinutes=updateMinutes,exports.updateRelative=updateRelative,exports.updateWeekday=updateWeekday,exports.updateWorkWeek=updateWorkWeek,exports.validateNumber=validateNumber,exports.validateTimestamp=validateTimestamp,exports.version=version,exports.weeksBetween=weeksBetween; |
/*! | ||
* @quasar/quasar-ui-qcalendar v4.1.0 | ||
* @quasar/quasar-ui-qcalendar v4.1.1 | ||
* (c) 2025 Jeff Galbraith <jeff@quasar.dev> | ||
* Released under the MIT License. | ||
*/ | ||
import{reactive,ref,computed,withDirectives,h,watch,getCurrentInstance,onBeforeUnmount,defineComponent,onBeforeUpdate,onMounted,Transition,nextTick}from"vue";const PARSE_DATETIME=/^(\d{4})-(\d{1,2})(-(\d{1,2}))?([^\d]+(\d{1,2}))?(:(\d{1,2}))?(:(\d{1,2}))?(.(\d{1,3}))?$/,PARSE_DATE=/^(\d{4})-(\d{1,2})(-(\d{1,2}))?/,PARSE_TIME=/(\d\d?)(:(\d\d?)|)(:(\d\d?)|)/,DAYS_IN_MONTH=[0,31,28,31,30,31,30,31,31,30,31,30,31],DAYS_IN_MONTH_LEAP=[0,31,29,31,30,31,30,31,31,30,31,30,31],TIME_CONSTANTS={MILLISECONDS_IN:{SECOND:1e3,MINUTE:6e4,HOUR:36e5,DAY:864e5,WEEK:6048e5},SECONDS_IN:{MINUTE:60,HOUR:3600,DAY:86400,WEEK:604800},MINUTES_IN:{MINUTE:1,HOUR:60,DAY:1440,WEEK:10080},HOURS_IN:{DAY:24,WEEK:168},DAYS_IN:{WEEK:7}},DAYS_IN_MONTH_MIN=28,DAYS_IN_MONTH_MAX=31,MONTH_MAX=12,MONTH_MIN=1,DAY_MIN=1,FIRST_HOUR=0;function validateTimestamp(e){return"string"===typeof e&&PARSE_DATETIME.test(e)}function parsed(e){if("string"!==typeof e)return null;const t=PARSE_DATETIME.exec(e);if(!t||!t[1]||!t[2])return null;const a=parseInt(t[1],10),n=parseInt(t[2],10),r=parseInt(t[4]||"1",10),i=parseInt(t[6]||"0",10),o=parseInt(t[8]||"0",10);return{date:e,time:i.toString().padStart(2,"0")+":"+o.toString().padStart(2,"0"),year:a,month:n,day:r,hour:i,minute:o,hasDay:!!t[4],hasTime:!0,past:!1,current:!1,future:!1,disabled:!1,weekday:0,doy:0,workweek:0}}function parseDate(e,t=!1){if(!(e instanceof Date))return null;const a=t?"UTC":"";return updateFormatted({date:padNumber(e[`get${a}FullYear`](),4)+"-"+padNumber(e[`get${a}Month`]()+1,2)+"-"+padNumber(e[`get${a}Date`](),2),time:padNumber(e[`get${a}Hours`]()||0,2)+":"+padNumber(e[`get${a}Minutes`]()||0,2),year:e[`get${a}FullYear`](),month:e[`get${a}Month`]()+1,day:e[`get${a}Date`](),hour:e[`get${a}Hours`](),minute:e[`get${a}Minutes`](),weekday:0,doy:0,workweek:0,hasDay:!0,hasTime:!0,past:!1,current:!1,future:!1,disabled:!1})}function padNumber(e,t){let a=String(e);while(a.length<t)a="0"+a;return a}function isLeapYear(e){return e%4===0&&e%100!==0||e%400===0}function daysInMonth(e,t){return(isLeapYear(e)?DAYS_IN_MONTH_LEAP:DAYS_IN_MONTH)[t]}function nextDay(e){const t=new Date(e.year,e.month-1,e.day+1);return updateFormatted(normalizeTimestamp({...e,year:t.getFullYear(),month:t.getMonth()+1,day:t.getDate()}))}function prevDay(e){const t=new Date(e.year,e.month-1,e.day-1);return updateFormatted(normalizeTimestamp({...e,year:t.getFullYear(),month:t.getMonth()+1,day:t.getDate()}))}function today(){const e=new Date,t=e.getMonth()+1,a=e.getDate(),n=e.getFullYear();return[n,padNumber(t,2),padNumber(a,2)].join("-")}function isToday(e){return e===today()}function getStartOfWeek(e,t,a){let n=copyTimestamp(e);if(t){if(1===n.day||0===n.weekday)while(!t.includes(Number(n.weekday)))n=nextDay(n);n=findWeekday(n,t[0],prevDay),n=updateFormatted(n),a&&(n=updateRelative(n,a,n.hasTime))}return n}function getEndOfWeek(e,t,a){let n=copyTimestamp(e);if(t&&Array.isArray(t)){const r=daysInMonth(n.year,n.month);if(r===n.day||n.weekday===t[t.length-1])while(!t.includes(Number(n.weekday)))n=prevDay(n);n=findWeekday(n,t[t.length-1],nextDay),n=updateFormatted(n),a&&(n=updateRelative(n,a,n.hasTime))}return n}function getStartOfMonth(e){let t=copyTimestamp(e);return t.day=DAY_MIN,t=updateFormatted(t),t}function getEndOfMonth(e){let t=copyTimestamp(e);return t.day=daysInMonth(t.year,t.month),t=updateFormatted(t),t}function parseTime(e){const t=Object.prototype.toString.call(e);switch(t){case"[object Number]":return e;case"[object String]":{const a=PARSE_TIME.exec(e);return a?60*parseInt(a[1],10)+parseInt(a[3]||"0",10):!1}case"[object Object]":return"object"!==typeof e||"number"!==typeof e.hour||"number"!==typeof e.minute?!1:"object"===typeof e&&"hour"in e&&"minute"in e&&60*e.hour+e.minute}return!1}function compareTimestamps(e,t){return!(!e||!t)&&e.year===t.year&&e.month===t.month&&e.day===t.day&&e.hour===t.hour&&e.minute===t.minute}function compareDate(e,t){return getDate(e)===getDate(t)}function compareTime(e,t){return getTime(e)===getTime(t)}function compareDateTime(e,t){return getDateTime(e)===getDateTime(t)}function parseTimestamp(e,t=null){let a=parsed(e);return a?(a=updateFormatted(a),t&&(a=updateRelative(a,t,a.hasTime)),a):null}function getDayIdentifier(e){return 1e8*(e.year??0)+1e6*(e.month??0)+1e4*(e.day??0)}function getTimeIdentifier(e){return 100*(e.hour??0)+(e.minute??0)}function getDayTimeIdentifier(e){return getDayIdentifier(e)+getTimeIdentifier(e)}function diffTimestamp(e,t,a=!1){const n=Date.UTC(e.year??0,(e.month??1)-1,e.day??1,e.hour??0,e.minute??0),r=Date.UTC(t.year??0,(t.month??1)-1,t.day??1,t.hour??0,t.minute??0);return!0===a&&r<n?0:r-n}function updateRelative(e,t,a=!1){let n=copyTimestamp(e),r=getDayIdentifier(t),i=getDayIdentifier(n),o=r===i;return n.hasTime&&a&&o&&(r=getTimeIdentifier(t),i=getTimeIdentifier(n),o=r===i),n.past=i<r,n.current=o,n.future=i>r,n.currentWeekday=n.weekday===t.weekday,n}function updateMinutes(e,t,a=null){let n=copyTimestamp(e);return n.hasTime=!0,n.hour=Math.floor(t/TIME_CONSTANTS.MINUTES_IN.HOUR),n.minute=t%TIME_CONSTANTS.MINUTES_IN.HOUR,n.time=getTime(n),a&&(n=updateRelative(n,a,!0)),n}function updateWeekday(e){let t=copyTimestamp(e);return t.weekday=getWeekday(t),t}function updateDayOfYear(e){let t=copyTimestamp(e);return t.doy=getDayOfYear(t)||0,t}function updateWorkWeek(e){let t=copyTimestamp(e);return t.workweek=getWorkWeek(t),t}function updateDisabled(e,t,a,n,r){let i=copyTimestamp(e);const o=getDayIdentifier(i);if(void 0!==t){const l=parsed(t);if(l){const c=getDayIdentifier(l);o<=c&&(i.disabled=!0)}}if(!0!==i.disabled&&void 0!==a){const m=parsed(a);if(m){const y=getDayIdentifier(m);o>=y&&(i.disabled=!0)}}if(!0!==i.disabled&&Array.isArray(n)&&n.length>0)for(var d in n)if(n[d]===i.weekday){i.disabled=!0;break}if(!0!==i.disabled&&Array.isArray(r)&&r.length>0)for(var u in r)if(Array.isArray(r[u])&&2===r[u].length&&r[u][0]&&r[u][1]){const p=parsed(r[u][0]),v=parsed(r[u][1]);if(p&&v&&isBetweenDates(i,p,v)){i.disabled=!0;break}}else{const f=r[u];if(Array.isArray(f))for(var s of f){const h=parseTimestamp(s);if(h){const g=getDayIdentifier(h);if(g===o){i.disabled=!0;break}}}else if(f){const T=parseTimestamp(f);if(T){const D=getDayIdentifier(T);D===o&&(i.disabled=!0)}}}return i}function updateFormatted(e){let t=copyTimestamp(e);return t.hasTime=!0,t.time=getTime(t),t.date=getDate(t),t.weekday=getWeekday(t),t.doy=getDayOfYear(t)||0,t.workweek=getWorkWeek(t),t}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){let t=copyTimestamp(e);if(0===t.year){const r=parseTimestamp(today());r&&(t=r)}const a=new Date(Date.UTC(t.year,t.month-1,t.day)),n=4;a.setUTCDate(a.getUTCDate()-(a.getUTCDay()+6)%7+n),a.setUTCDate(a.getUTCDate()+n-(a.getUTCDay()||7));e=new Date(Date.UTC(a.getUTCFullYear(),0,1)),e=Math.ceil(((a.valueOf()-e.valueOf())/864e5+1)/7);return e}function getWeekday(e){let t=e.weekday;if(e.hasDay){const a=Math.floor,n=e.day,r=(e.month+9)%MONTH_MAX+1,i=a(e.year/100),o=e.year%100-(e.month<=2?1:0);t=((n+a(2.6*r-.2)-2*i+o+a(o/4)+a(i/4))%7+7)%7}return t??0}function copyTimestamp(e){return{...e}}function getDate(e){let 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):"00:00")}function moveRelativeDays(e,t=nextDay,a=1,n=[0,1,2,3,4,5,6]){const r=copyTimestamp(e);return relativeDays(r,t,a,n)}function relativeDays(e,t=nextDay,a=1,n=[0,1,2,3,4,5,6]){let r=copyTimestamp(e);n.includes(Number(r.weekday))||0!==r.weekday||t!==nextDay||++a;while(--a>=0)r=t(r),n.length<7&&!n.includes(Number(r.weekday))&&++a;return r}function findWeekday(e,t,a=nextDay,n=6){let r=copyTimestamp(e);while(r.weekday!==t&&--n>=0)r=a(r);return r}function createDayList(e,t,a,n=[0,1,2,3,4,5,6],r=void 0,i=void 0,o=[],d=[],u=42,s=0){const l=getDayIdentifier(e),c=getDayIdentifier(t),m=[];let y=copyTimestamp(e),p=0,v=p===c;if(!(c<l))while((!v||m.length<s)&&m.length<u){if(p=getDayIdentifier(y),v=v||p>c&&m.length>=s,v)break;if(n.includes(Number(y.weekday))){let e=copyTimestamp(y);e=updateFormatted(e),e=updateRelative(e,a),e=updateDisabled(e,r,i,o,d),m.push(e)}y=relativeDays(y,nextDay)}return m}function createIntervalList(t,a,n,r,i){const o=[];for(let e=0;e<r;++e){const d=(a+e)*n,u=copyTimestamp(t);o.push(updateMinutes(u,d,i))}return o}function createNativeLocaleFormatter(n,r){const e=()=>"";return"undefined"===typeof Intl||"undefined"===typeof Intl.DateTimeFormat?e:(t,e)=>{try{const a=new Intl.DateTimeFormat(n||void 0,r(t,e));return a.format(makeDateTime(t))}catch(e){return console.error(`Intl.DateTimeFormat: ${e.message} -> `+getDateTime(t)),""}}}function makeDate(e,t=!0){return t?new Date(Date.UTC(e.year,e.month-1,e.day,0,0)):new Date(e.year,e.month-1,e.day,0,0)}function makeDateTime(e,t=!0){return t?new Date(Date.UTC(e.year,e.month-1,e.day,e.hour,e.minute)):new Date(e.year,e.month-1,e.day,e.hour,e.minute)}function validateNumber(e){return isFinite(Number(e))}function maxTimestamp(e,t=!1){const a=!0===t?getDayTimeIdentifier:getDayIdentifier;return e.reduce((e,t)=>{return Math.max(a(e),a(t))===a(e)?e:t})}function minTimestamp(e,t=!1){const a=!0===t?getDayTimeIdentifier:getDayIdentifier;return e.reduce((e,t)=>{return Math.min(a(e),a(t))===a(e)?e:t})}function isBetweenDates(e,t,a,n=!1){const r=getDayIdentifier(e)+(!0===n?getTimeIdentifier(e):0),i=getDayIdentifier(t)+(!0===n?getTimeIdentifier(t):0),o=getDayIdentifier(a)+(!0===n?getTimeIdentifier(a):0);return r>=i&&r<=o}function isOverlappingDates(e,t,a,n){const r=getDayIdentifier(e),i=getDayIdentifier(t),o=getDayIdentifier(a),d=getDayIdentifier(n);return r>=o&&r<=d||i>=o&&i<=d||o>=r&&i>=d}function addToDate(e,t){const a=copyTimestamp(e);return t.year&&(a.year+=t.year),t.month&&(a.month+=t.month),t.day&&(a.day+=t.day),t.hour&&(a.hour+=t.hour),t.minute&&(a.minute+=t.minute),updateFormatted(normalizeTimestamp(a))}function normalizeTimestamp(e){const t=new Date(e.year,e.month-1,e.day,e.hour,e.minute);return{...e,year:t.getFullYear(),month:t.getMonth()+1,day:t.getDate(),hour:t.getHours(),minute:t.getMinutes()}}function daysBetween(e,t){const a=diffTimestamp(e,t,!0);return Math.floor(a/TIME_CONSTANTS.MILLISECONDS_IN.DAY)}function weeksBetween(e,t){let a=copyTimestamp(e),n=copyTimestamp(t);return a=findWeekday(a,0),n=findWeekday(n,6),Math.ceil(daysBetween(a,n)/TIME_CONSTANTS.DAYS_IN.WEEK)}const weekdayDateMap={Sun:new Date("2020-01-05T00:00:00.000Z"),Mon:new Date("2020-01-06T00:00:00.000Z"),Tue:new Date("2020-01-07T00:00:00.000Z"),Wed:new Date("2020-01-08T00:00:00.000Z"),Thu:new Date("2020-01-09T00:00:00.000Z"),Fri:new Date("2020-01-10T00:00:00.000Z"),Sat:new Date("2020-01-11T00:00:00.000Z")};function getWeekdayFormatter(){const e=()=>"",r={long:{timeZone:"UTC",weekday:"long"},short:{timeZone:"UTC",weekday:"short"},narrow:{timeZone:"UTC",weekday:"narrow"}};return"undefined"===typeof Intl||"undefined"===typeof Intl.DateTimeFormat?e:t;function t(t,e,a){try{const n=new Intl.DateTimeFormat(a||void 0,r[e]||r["long"]);return n.format(weekdayDateMap[t])}catch(e){return e instanceof Error&&console.error(`Intl.DateTimeFormat: ${e.message} -> day of week: `+t),""}}}function getWeekdayNames(t,a){const e=Object.keys(weekdayDateMap),n=getWeekdayFormatter();return e.map(e=>String(n(e,t,a)))}function getMonthFormatter(){const e=()=>"",i={long:{timeZone:"UTC",month:"long"},short:{timeZone:"UTC",month:"short"},narrow:{timeZone:"UTC",month:"narrow"}};return"undefined"===typeof Intl||"undefined"===typeof Intl.DateTimeFormat?e:t;function t(t,e,a){try{const n=new Intl.DateTimeFormat(a||void 0,i[e]||i["long"]),r=new Date;return r.setDate(1),r.setMonth(t),n.format(r)}catch(e){return e instanceof Error&&console.error(`Intl.DateTimeFormat: ${e.message} -> month: `+t),""}}}function getMonthNames(t,a){const n=getMonthFormatter();return[...Array(12).keys()].map(e=>n(e,t,a))}var Timestamp={PARSE_DATETIME:PARSE_DATETIME,PARSE_DATE:PARSE_DATE,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,TIME_CONSTANTS:TIME_CONSTANTS,FIRST_HOUR:FIRST_HOUR,today:today,getStartOfWeek:getStartOfWeek,getEndOfWeek:getEndOfWeek,getStartOfMonth:getStartOfMonth,getEndOfMonth:getEndOfMonth,parseTime:parseTime,validateTimestamp:validateTimestamp,parsed:parsed,parseTimestamp:parseTimestamp,parseDate:parseDate,getDayIdentifier:getDayIdentifier,getTimeIdentifier:getTimeIdentifier,getDayTimeIdentifier:getDayTimeIdentifier,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,createDayList:createDayList,createIntervalList:createIntervalList,createNativeLocaleFormatter:createNativeLocaleFormatter,makeDate:makeDate,makeDateTime:makeDateTime,validateNumber:validateNumber,isBetweenDates:isBetweenDates,isOverlappingDates:isOverlappingDates,daysBetween:daysBetween,weeksBetween:weeksBetween,addToDate:addToDate,compareTimestamps:compareTimestamps,compareDate:compareDate,compareTime:compareTime,compareDateTime:compareDateTime,getWeekdayFormatter:getWeekdayFormatter,getWeekdayNames:getWeekdayNames,getMonthFormatter:getMonthFormatter,getMonthNames:getMonthNames},Timestamp$1=Object.freeze({__proto__:null,DAYS_IN_MONTH:DAYS_IN_MONTH,DAYS_IN_MONTH_LEAP:DAYS_IN_MONTH_LEAP,DAYS_IN_MONTH_MAX:DAYS_IN_MONTH_MAX,DAYS_IN_MONTH_MIN:DAYS_IN_MONTH_MIN,DAY_MIN:DAY_MIN,FIRST_HOUR:FIRST_HOUR,MONTH_MAX:MONTH_MAX,MONTH_MIN:MONTH_MIN,PARSE_DATE:PARSE_DATE,PARSE_DATETIME:PARSE_DATETIME,PARSE_TIME:PARSE_TIME,TIME_CONSTANTS:TIME_CONSTANTS,addToDate:addToDate,compareDate:compareDate,compareDateTime:compareDateTime,compareTime:compareTime,compareTimestamps:compareTimestamps,copyTimestamp:copyTimestamp,createDayList:createDayList,createIntervalList:createIntervalList,createNativeLocaleFormatter:createNativeLocaleFormatter,daysBetween:daysBetween,daysInMonth:daysInMonth,default:Timestamp,diffTimestamp:diffTimestamp,findWeekday:findWeekday,getDate:getDate,getDateTime:getDateTime,getDayIdentifier:getDayIdentifier,getDayOfYear:getDayOfYear,getDayTimeIdentifier:getDayTimeIdentifier,getEndOfMonth:getEndOfMonth,getEndOfWeek:getEndOfWeek,getMonthFormatter:getMonthFormatter,getMonthNames:getMonthNames,getStartOfMonth:getStartOfMonth,getStartOfWeek:getStartOfWeek,getTime:getTime,getTimeIdentifier:getTimeIdentifier,getWeekday:getWeekday,getWeekdayFormatter:getWeekdayFormatter,getWeekdayNames:getWeekdayNames,getWorkWeek:getWorkWeek,isBetweenDates:isBetweenDates,isLeapYear:isLeapYear,isOverlappingDates:isOverlappingDates,isToday:isToday,makeDate:makeDate,makeDateTime:makeDateTime,maxTimestamp:maxTimestamp,minTimestamp:minTimestamp,moveRelativeDays:moveRelativeDays,nextDay:nextDay,padNumber:padNumber,parseDate:parseDate,parseTime:parseTime,parseTimestamp:parseTimestamp,parsed:parsed,prevDay:prevDay,relativeDays:relativeDays,today:today,updateDayOfYear:updateDayOfYear,updateDisabled:updateDisabled,updateFormatted:updateFormatted,updateMinutes:updateMinutes,updateRelative:updateRelative,updateWeekday:updateWeekday,updateWorkWeek:updateWorkWeek,validateNumber:validateNumber,validateTimestamp:validateTimestamp,weeksBetween:weeksBetween});function convertToUnit(e,t="px"){if(e)return isNaN(e)?String(e):"auto"===e?e:""+Number(e)+t}function indexOf(t,a){for(let e=0;e<t.length;e++)if(!0===a(t[e],e))return e;return-1}function minCharWidth(e,t){return 0===t?e:e.slice(0,t)}var helpers={convertToUnit:convertToUnit,indexOf:indexOf,minCharWidth:minCharWidth},helpers$1=Object.freeze({__proto__:null,convertToUnit:convertToUnit,default:helpers,indexOf:indexOf,minCharWidth:minCharWidth});const ResizeObserverDirective={mounted(e,t){if("function"===typeof t.value){const a=t.value,n={callback:a,size:{width:0,height:0},observer:new ResizeObserver(e=>{const t=e[0].contentRect;t.width===n.size.width&&t.height===n.size.height||(n.size.width=t.width,n.size.height=t.height,n.debounceTimeout&&clearTimeout(n.debounceTimeout),n.debounceTimeout=setTimeout(()=>{n.callback(n.size),n.debounceTimeout=void 0},100))})};n.observer.observe(e),e.__onResizeObserver=n}},beforeUnmount(e){if(e.__onResizeObserver){const{observer:t,debounceTimeout:a}=e.__onResizeObserver;a&&clearTimeout(a),t.unobserve(e),delete e.__onResizeObserver}}};function useCalendar(t,a,{scrollArea:e,pane:n}){if(!a){const l="[error: renderCalendar] no renderFunc has been supplied to useCalendar";throw console.error(l),new Error(l)}const r=reactive({width:0,height:0}),i=ref(null);function o({width:e,height:t}){r.width=e,r.height=t}const d=computed(()=>{return!0!==t.noScroll&&e.value&&n.value&&r.height?e.value.offsetWidth-n.value.offsetWidth:0});function u(){}function s(){const e={ref:i,role:"complementary",lang:t.locale,class:`q-calendar ${t.dark?"q-calendar--dark":""} `+(t.bordered?"q-calendar__bordered":"")};return withDirectives(h("div",{...e},[a()]),[[ResizeObserverDirective,o]])}return{rootRef:i,scrollWidth:d,__initCalendar:u,__renderCalendar:s}}const isValidFocusType=e=>e.every(e=>["day","date","weekday","interval","time","resource","task"].includes(e)),useCommonProps={modelValue:{type:String,default:today(),validator:e=>""===e||validateTimestamp(e)},weekdays:{type:Array,default:()=>[0,1,2,3,4,5,6]},dateType:{type:String,default:"round",validator:e=>["round","rounded","square"].includes(e)},weekdayAlign:{type:String,default:"center",validator:e=>["left","center","right"].includes(e)},dateAlign:{type:String,default:"center",validator:e=>["left","center","right"].includes(e)},bordered:Boolean,dark:Boolean,noAria:Boolean,noActiveDate:Boolean,noHeader:Boolean,noScroll:Boolean,shortWeekdayLabel:Boolean,noDefaultHeaderText:Boolean,noDefaultHeaderBtn:Boolean,minWeekdayLabel:{type:[Number,String],default:1},weekdayBreakpoints:{type:Array,default:()=>[75,35],validator:e=>2===e.length},locale:{type:String,default:"en-US"},animated:Boolean,transitionPrev:{type:String,default:"slide-right"},transitionNext:{type:String,default:"slide-left"},disabledDays:Array,disabledBefore:String,disabledAfter:String,disabledWeekdays:{type:Array,default:()=>[]},dragEnterFunc:Function,dragOverFunc:Function,dragLeaveFunc:Function,dropFunc:Function,selectedDates:{type:[Array,Set],default:()=>[]},selectedStartEndDates:{type:Array,default:()=>[]},hoverable:Boolean,focusable:Boolean,focusType:{type:Array,default:()=>["date"],validator:isValidFocusType}};function useCommon(t,{startDate:e,endDate:a,times:n}){const r=computed(()=>parseTimestamp(e.value)),i=computed(()=>{return"0000-00-00"===a.value?getEndOfWeek(r.value,t.weekdays,n.today):parseTimestamp(a.value)||r.value}),o=computed(()=>createNativeLocaleFormatter(t.locale,()=>({timeZone:"UTC",day:"numeric"}))),d=computed(()=>createNativeLocaleFormatter(t.locale,(e,t)=>({timeZone:"UTC",weekday:t?"short":"long"}))),u=computed(()=>createNativeLocaleFormatter(t.locale,()=>({timeZone:"UTC",dateStyle:"full"})));function s(e,t){return e&&e.length>0&&e.includes(t.date)}function l(e,t){const a={firstDay:!1,betweenDays:!1,lastDay:!1};if(2===e.length){const n=getDayIdentifier(t),r=getDayIdentifier(parsed(e[0])),i=getDayIdentifier(parsed(e[1]));a.firstDay=r===n,a.lastDay=i===n,a.betweenDays=r<n&&i>n}return a}function c(e,t=!1,a=[],n=[],r=!1){const i=s(a,e),{firstDay:o,lastDay:d,betweenDays:u}=l(n,e);return{"q-past-day":!o&&!u&&!d&&!i&&!t&&!!e.past,"q-future-day":!o&&!u&&!d&&!i&&!t&&!!e.future,"q-outside":t,"q-current-day":!!e.current,"q-selected":i,"q-range-first":o,"q-range":u,"q-range-last":d,"q-range-hover":r&&(o||d||u),"q-disabled-day disabled":!0===e.disabled}}function m(e){return getStartOfWeek(e,t.weekdays,n.today)}function y(e){return getEndOfWeek(e,t.weekdays,n.today)}function p(){return{}}return{parsedStart:r,parsedEnd:i,dayFormatter:o,weekdayFormatter:d,ariaDateFormatter:u,arrayHasDate:s,checkDays:l,getRelativeClasses:c,startOfWeek:m,endOfWeek:y,dayStyleDefault:p}}function scrollTo(e,t){e instanceof Window?e.scrollTo({top:t,behavior:"instant"}):e.scrollTop=t}function getVerticalScrollPosition(e){return e instanceof Window?e.scrollY:e.scrollTop}function animVerticalScrollTo(i,o,d=500,u=performance.now(),s=getVerticalScrollPosition(i)){d<=0||s===o?scrollTo(i,o):requestAnimationFrame(e=>{const t=e-u,a=Math.min(t/d,1),n=e=>e<.5?2*e*e:(4-2*e)*e-1,r=s+(o-s)*n(a);scrollTo(i,r),a<1&&animVerticalScrollTo(i,o,d,u,s)})}function animHorizontalScrollTo(r,e,i=500){const o=r.scrollLeft,d=e-o;let u=null;function s(e){null===u&&(u=e);const t=e-u,a=Math.min(t/i,1),n=e=>e<.5?2*e*e:(4-2*e)*e-1;r.scrollLeft=o+d*n(a),t<i&&requestAnimationFrame(s)}requestAnimationFrame(s)}const useIntervalProps={view:{type:String,validator:e=>["day","week","month","month-interval"].includes(e),default:"day"},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},intervalClass:{type:Function,default:null},weekdayStyle:{type:Function,default:null},weekdayClass:{type:Function,default:null},showIntervalLabel:{type:Function,default:null},hour24Format:Boolean,timeClicksClamped:Boolean,dateHeader:{type:String,default:"stacked",validator:e=>["stacked","inline","inverted"].includes(e)}};function useInterval(i,{times:t,scrollArea:n,parsedStart:e,parsedEnd:a,maxDays:r,size:o,headerColumnRef:d}){const u=computed(()=>parseInt(String(i.intervalStart),10)),m=computed(()=>parseInt(String(i.intervalMinutes),10)),s=computed(()=>parseInt(String(i.intervalCount),10)),y=computed(()=>parseFloat(String(i.intervalHeight))),p=computed(()=>{let e=0;const t=Number(i.columnCount);return i.cellWidth?e=Number(i.cellWidth):o.width>0&&d.value&&(e=d.value.offsetWidth/(t>1?t:r.value)),e}),l=computed(()=>u.value*m.value),c=computed(()=>s.value*y.value),v=computed(()=>s.value*p.value),f=computed(()=>D(e.value)),h=computed(()=>k(a.value)),g=computed(()=>{return createDayList(e.value,a.value,t.today,i.weekdays,i.disabledBefore,i.disabledAfter,i.disabledWeekdays,i.disabledDays,r.value)}),T=computed(()=>{return g.value.map(e=>createIntervalList(e,u.value,m.value,s.value,t.now))});function D(e){return getStartOfWeek(e,i.weekdays,t.today)}function k(e){return getEndOfWeek(e,i.weekdays,t.today)}function w(e,t){return e&&e.length>0&&e.includes(getDateTime(t))}function _(e,t){const a={firstDay:!1,betweenDays:!1,lastDay:!1};if(e&&2===e.length){const n=getDayTimeIdentifier(t),r=getDayTimeIdentifier(parsed(e[0])),i=getDayTimeIdentifier(parsed(e[1]));a.firstDay=r===n,a.lastDay=i===n,a.betweenDays=r<n&&i>n}return a}function I(e,t=[],a=[]){const n=w(t,e),{firstDay:r,lastDay:i,betweenDays:o}=_(a,e);return{"q-selected":n,"q-range-first":!0===r,"q-range":!0===o,"q-range-last":!0===i,"q-disabled-interval disabled":!0===e.disabled}}function b(e,t,a){return[]}const N=computed(()=>{const a={timeZone:"UTC",hour12:!i.hour24Format,hour:"2-digit",minute:"2-digit"},n={timeZone:"UTC",hour12:!i.hour24Format,hour:"numeric",minute:"2-digit"},r={timeZone:"UTC",hour12:!i.hour24Format,hour:"numeric"};return createNativeLocaleFormatter(i.locale,(e,t)=>t?0===e.minute?r:n:a)}),M=computed(()=>{const e={timeZone:"UTC",dateStyle:"full",timeStyle:"short"};return createNativeLocaleFormatter(i.locale,()=>e)});function S(e){const t=T.value[0][0],a=t.hour===e.hour&&t.minute===e.minute;return!a&&0===e.minute}function E(e){}function A(e){return{}}function O(e,t,a=!1,n){let r=copyTimestamp(t);if(e.currentTarget){const i=e.currentTarget.getBoundingClientRect(),o=e,d=e,u=o.changedTouches||o.touches,s=(u&&u[0]?u[0]:d).clientY,l=(s-i.top)/y.value,c=Math.floor((a?Math.floor(l):l)*m.value);0!==c&&(r=addToDate(r,{minute:c})),n&&(r=updateRelative(r,n,!0))}return r}function H(e,t,a=!1,n){let r=copyTimestamp(t);const i=e.currentTarget.getBoundingClientRect(),o=e,d=e,u=o.changedTouches||o.touches,s=(u&&u[0]?u[0]:d).clientY,l=(s-i.top)/y.value,c=Math.floor((a?Math.floor(l):l)*m.value);return 0!==c&&(r=addToDate(r,{minute:c})),n&&(r=updateRelative(r,n,!0)),r}function x(e,t,a=!1,n){let r=copyTimestamp(t);if(e.currentTarget){const i=e.currentTarget.getBoundingClientRect(),o=e,d=e,u=o.changedTouches||o.touches,s=(u&&u[0]?u[0]:d).clientX,l=(s-i.left)/p.value,c=Math.floor((a?Math.floor(l):l)*m.value);0!==c&&(r=addToDate(r,{minute:c})),n&&(r=updateRelative(r,n,!0))}return r}function L(e,t){const a={timestamp:e,timeStartPos:F,timeDurationHeight:W};return void 0!==t&&(a.columnIndex=t),a}function q(e,t){const a={timestamp:copyTimestamp(e),timeStartPosX:R,timeDurationWidth:C};return void 0!==t&&(a.index=t),a}function Y(e,t=0){const a=F(e);return!(!1===a||!n.value)&&(animVerticalScrollTo(n.value,a,t),!0)}function U(e,t=0){const a=R(e);return!(!1===a||!n.value)&&(animHorizontalScrollTo(n.value,a,t),!0)}function W(e){return e/m.value*y.value}function C(e){return e/m.value*p.value}function B(e){return e*m.value/y.value}function P(e){return e*m.value/p.value}function F(e,t=!0){const a=parseTime(e);if(!1===a)return!1;const n=l.value,r=s.value*m.value,i=(a-n)/r;let o=i*c.value;return t&&(o<0&&(o=0),o>c.value)&&(o=c.value),o}function R(e,t=!0){const a=parseTime(e);if(!1===a)return!1;const n=l.value,r=s.value*m.value,i=(a-n)/r;let o=i*v.value;return t&&(o<0&&(o=0),o>v.value)&&(o=v.value),o}return{parsedIntervalStart:u,parsedIntervalMinutes:m,parsedIntervalCount:s,parsedIntervalHeight:y,parsedCellWidth:p,parsedStartMinute:l,bodyHeight:c,bodyWidth:v,parsedWeekStart:f,parsedWeekEnd:h,days:g,intervals:T,intervalFormatter:N,ariaDateTimeFormatter:M,arrayHasDateTime:w,checkIntervals:_,getIntervalClasses:I,getResourceClasses:b,showIntervalLabelDefault:S,showResourceLabelDefault:E,styleDefault:A,getTimestampAtEventInterval:O,getTimestampAtEvent:H,getTimestampAtEventX:x,getScopeForSlot:L,getScopeForSlotX:q,scrollToTime:Y,scrollToTimeX:U,timeDurationHeight:W,timeDurationWidth:C,heightToMinutes:B,widthToMinutes:P,timeStartPos:F,timeStartPosX:R}}const useColumnProps={columnCount:{type:[Number,String],default:0,validator:validateNumber},columnIndexStart:{type:[Number,String],default:0,validator:validateNumber}},useMaxDaysProps={maxDays:{type:Number,default:1}},useTimesProps={now:{type:String,validator:e=>""===e||validateTimestamp(e),default:""}};function useTimes(e){const t=reactive({now:parseTimestamp("0000-00-00 00:00"),today:parseTimestamp("0000-00-00")}),a=computed(()=>e.now?parseTimestamp(e.now):i());function n(){t.now&&t.today&&(t.now.current=t.today.current=!0,t.now.past=t.today.past=!1,t.now.future=t.today.future=!1)}function r(){const e=a.value||i();o(e,t.now),d(e,t.now),o(e,t.today)}function i(){return parseDate(new Date)}function o(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)}function d(e,t){e.time!==t.time&&(t.hour=e.hour,t.minute=e.minute,t.time=e.time)}return watch(a,()=>r()),{times:t,parsedNow:a,setCurrent:n,updateCurrent:r,getNow:i,updateDay:o,updateTime:d}}function useRenderValues(r,{parsedView:i,parsedValue:o,times:d}){const e=computed(()=>{const e=o.value;let t=r.maxDays,a=e,n=e;switch(i.value){case"month":a=getStartOfMonth(e),n=getEndOfMonth(e),t=daysInMonth(a.year,a.month);break;case"week":case"week-agenda":case"week-scheduler":a=getStartOfWeek(e,r.weekdays,d.today),n=getEndOfWeek(a,r.weekdays,d.today),t=r.weekdays.length;break;case"day":case"scheduler":case"agenda":n=moveRelativeDays(copyTimestamp(n),nextDay,t>1?t-1:t,r.weekdays),n=updateFormatted(n);break;case"month-interval":case"month-scheduler":case"month-agenda":a=getStartOfMonth(e),n=getEndOfMonth(e),n=updateFormatted(n),t=daysInMonth(a.year,a.month);break;case"resource":t=1,n=moveRelativeDays(copyTimestamp(n),nextDay,t,r.weekdays),n=updateFormatted(n);break}return{start:a,end:n,maxDays:t}});return{renderValues:e}}const toCamelCase=e=>e.replace(/(-\w)/g,e=>e[1].toUpperCase());function getMouseEventHandlers(t,e,a,n){const r={};for(const i in a){const o=a[i],d=toCamelCase("on-"+i);if(!e.value)return console.warn("$listeners has not been set up"),{};if(void 0!==e.value[d]){const u="on"+o.event.charAt(0).toUpperCase()+o.event.slice(1),s=e=>{return(void 0===o.button||"buttons"in e&&e.buttons>0&&e.button===o.button)&&(o.prevent&&e.preventDefault(),o.stop&&e.stopPropagation(),t(i,n(e,i))),o.result};u in r?Array.isArray(r[u])?r[u].push(s):r[u]=[r[u],s]:r[u]=s}}return r}function getDefaultMouseEventHandlers(e,t,a,n){return getMouseEventHandlers(e,t,getMouseEventName(a),n)}function getMouseEventName(e){return{["click"+e]:{event:"click"},["contextmenu"+e]:{event:"contextmenu",prevent:!0,result:!1},["mousedown"+e]:{event:"mousedown"},["mousemove"+e]:{event:"mousemove"},["mouseup"+e]:{event:"mouseup"},["mouseenter"+e]:{event:"mouseenter"},["mouseleave"+e]:{event:"mouseleave"},["touchstart"+e]:{event:"touchstart"},["touchmove"+e]:{event:"touchmove"},["touchend"+e]:{event:"touchend"}}}function getRawMouseEvents(e){return Object.keys(getMouseEventName(e))}function useMouseEvents(a,n){return{getMouseEventHandlers:(e,t)=>getMouseEventHandlers(a,n,e,t),getDefaultMouseEventHandlers:(e,t)=>getDefaultMouseEventHandlers(a,n,e,t),getMouseEventName:getMouseEventName,getRawMouseEvents:getRawMouseEvents}}const useMoveEmits=["moved"];function useMove(u,{parsedView:s,parsedValue:l,direction:c,maxDays:m,times:y,emittedValue:p,emit:v}){function e(a=1){if(0===a)p.value=today();else{let e=copyTimestamp(l.value);const n=getEndOfMonth(e),r=a>0,i=r?nextDay:prevDay,o=r?n.day:1;let t=r?a:-a;c.value=r?"next":"prev";const d=u.weekdays.length;while(--t>=0)switch(s.value){case"month":e.day=o,e=i(e),e=updateWeekday(e);while(!u.weekdays.includes(Number(e.weekday)))e=addToDate(e,{day:r?1:-1});break;case"week":case"week-agenda":case"week-scheduler":e=relativeDays(e,i,d,u.weekdays);break;case"day":case"scheduler":case"agenda":e=relativeDays(e,i,m.value,u.weekdays);break;case"month-interval":case"month-agenda":case"month-scheduler":e.day=o,e=i(e);break;case"resource":e=relativeDays(e,i,m.value,u.weekdays);break}e=updateWeekday(e),e=updateFormatted(e),e=updateDayOfYear(e),e=updateRelative(e,y.now),p.value=e.date,v("moved",e)}}return{move:e}}const listenerRE=/^on[A-Z]/;function useEmitListeners(e=getCurrentInstance()){return{emitListeners:computed(()=>{const t={};return e?.vnode?.props&&Object.keys(e.vnode.props).forEach(e=>{listenerRE.test(e)&&(t[e]=!0)}),t})}}function useFocusHelper(){const e={"aria-hidden":"true",class:"q-calendar__focus-helper"};return[h("span",e)]}function useButton(){function e({focusable:e,focusType:t},a,n){const r=e&&t.includes("date");return h("button",{...a,tabindex:r?0:-1},[n,r&&useFocusHelper()])}return{renderButton:e}}const useCellWidthProps={cellWidth:[Number,String]};function useCellWidth(e){const t=computed(()=>void 0!==e.cellWidth);return{isSticky:t}}const useCheckChangeEmits=["change"];function useCheckChange(n,{days:r,lastStart:i,lastEnd:o}){function e(){const e=r.value;if(0===e.length)return!1;const t=e[0].date,a=e[e.length-1].date;return(!i.value||!o.value||t!==i.value||a!==o.value)&&(i.value=t,o.value=a,n("change",{start:t,end:a,days:e}),!0)}return{checkChange:e}}function useEventUtils(){function e(e,t){return(Array.isArray(t)?t:[t]).includes(e.keyCode)}return{isKeyCode:e}}const isKeyCode=useEventUtils().isKeyCode,useNavigationProps={useNavigation:Boolean};function useNavigation(t,{rootRef:a,focusRef:n,focusValue:r,datesRef:i,parsedView:o,emittedValue:d,direction:u,times:s}){let e=!1;function l(){e||document&&(e=!0,document.addEventListener("keyup",v),document.addEventListener("keydown",p))}function c(){document&&(document.removeEventListener("keyup",v),document.removeEventListener("keydown",p),e=!1)}function m(e){if(e&&document){const t=document.activeElement;if(t!==document.body&&a.value?.contains(t))return!0}return!1}function y(){let t=0;const a=window.setInterval(()=>{const e=i.value[n.value];e&&(e.focus(),50!==++t)&&document.activeElement!==e||window.clearInterval(a)},250)}function p(e){m(e)&&isKeyCode(e,[33,34,35,36,37,38,39,40])&&(e.stopPropagation(),e.preventDefault())}function v(e){if(m(e)&&isKeyCode(e,[33,34,35,36,37,38,39,40])){const t={33:D,34:k,35:_,36:w,37:g,38:f,39:T,40:h};t[e.keyCode]?.()}}function f(){let e=copyTimestamp(r.value);if("month"===o.value){if(e=addToDate(e,{day:-7}),r.value.month!==e.month)return u.value="prev",void(d.value=e.date)}else e=addToDate(e,{minute:Number(t.intervalMinutes)});u.value="prev",n.value=e.date}function h(){let e=copyTimestamp(r.value);if("month"===o.value){if(e=addToDate(e,{day:7}),r.value.month!==e.month)return u.value="next",void(d.value=e.date)}else e=addToDate(e,{minute:Number(t.intervalMinutes)});u.value="next",n.value=e.date}function g(){let e=copyTimestamp(r.value);u.value="prev";do{e=addToDate(e,{day:-1})}while(!t.weekdays.includes(Number(e.weekday)));n.value=e.date}function T(){let e=copyTimestamp(r.value);u.value="next";do{e=addToDate(e,{day:1})}while(!t.weekdays.includes(Number(e.weekday)));n.value=e.date}function D(){let e=copyTimestamp(r.value);e="month"===o.value?addToDate(e,{month:-1}):addToDate(e,{day:-7}),u.value="prev",n.value=e.date}function k(){let e=copyTimestamp(r.value);e="month"===o.value?addToDate(e,{month:1}):addToDate(e,{day:7}),u.value="next",n.value=e.date}function w(){let e=copyTimestamp(r.value);e="month"===o.value?getStartOfMonth(e):getStartOfWeek(e,t.weekdays||[],s.today);while(!t.weekdays.includes(Number(e.weekday)))e=addToDate(e,{day:-1});n.value=e.date}function _(){let e=copyTimestamp(r.value);e="month"===o.value?getEndOfMonth(e):getEndOfWeek(e,t.weekdays||[],s.today);while(!t.weekdays.includes(Number(e.weekday)))e=addToDate(e,{day:-1});n.value=e.date}return onBeforeUnmount(()=>{c()}),watch(()=>t.useNavigation,e=>{(!0===e?l:c)()}),!0===t.useNavigation&&l(),{startNavigation:l,endNavigation:c,tryFocus:y}}const renderButton=useButton().renderButton;var QCalendarDay=defineComponent({name:"QCalendarDay",directives:{ResizeObserver:ResizeObserverDirective},props:{...useCommonProps,...useIntervalProps,...useColumnProps,...useMaxDaysProps,...useTimesProps,...useCellWidthProps,...useNavigationProps},emits:["update:model-value",...useCheckChangeEmits,...useMoveEmits,...getRawMouseEvents("-date"),...getRawMouseEvents("-interval"),...getRawMouseEvents("-head-intervals"),...getRawMouseEvents("-head-day"),...getRawMouseEvents("-time")],setup(y,{slots:p,emit:m,expose:x}){const e=ref(null),L=ref(null),q=ref(null),v=ref(y.modelValue||today()),t=ref(parsed(y.modelValue||today())),f=ref({}),a=ref(),n=ref(),o=ref("next"),d=ref(y.modelValue||today()),u=ref("0000-00-00"),s=ref(0),g=ref(y.modelValue||today()),l=reactive({width:0,height:0}),T=ref(""),D=ref(0),Y=ref(null),U=ref(null),r=(watch(()=>y.view,()=>{s.value=0}),computed(()=>{return"month"===y.view?"month-interval":y.view})),B=getCurrentInstance();if(null===B)throw new Error("current instance is null");const k=useEmitListeners(B).emitListeners,w=useCellWidth(y).isSticky,{times:_,setCurrent:P,updateCurrent:V}=useTimes(y),{parsedStart:i,parsedEnd:z,dayFormatter:Z,weekdayFormatter:$,ariaDateFormatter:X,dayStyleDefault:K,getRelativeClasses:I}=(V(),P(),useCommon(y,{startDate:d,endDate:u,times:_})),c=computed(()=>{return parseTimestamp(y.modelValue,_.now)||i.value||_.today}),j=(t.value=c.value,v.value=c.value.date,useRenderValues(y,{parsedView:r,parsedValue:c,times:_})).renderValues,{rootRef:b,scrollWidth:Q,__renderCalendar:G}=useCalendar(y,Pe,{scrollArea:e,pane:L}),{days:N,intervals:J,intervalFormatter:ee,ariaDateTimeFormatter:te,parsedCellWidth:M,getIntervalClasses:ae,showIntervalLabelDefault:ne,styleDefault:re,getTimestampAtEventInterval:ie,getTimestampAtEvent:oe,getScopeForSlot:S,scrollToTime:de,heightToMinutes:ue,timeDurationHeight:se,timeStartPos:le}=useInterval(y,{times:_,scrollArea:e,parsedStart:i,parsedEnd:z,maxDays:s,size:l,headerColumnRef:q}),E=useMove(y,{parsedView:r,parsedValue:c,direction:o,maxDays:s,times:_,emittedValue:g,emit:m}).move,A=useMouseEvents(m,k).getDefaultMouseEventHandlers,ce=useCheckChange(m,{days:N,lastStart:Y,lastEnd:U}).checkChange,O=useEventUtils().isKeyCode,me=useNavigation(y,{rootRef:b,focusRef:v,focusValue:t,datesRef:f,parsedView:r,emittedValue:g,direction:o,times:_}).tryFocus,W=computed(()=>{const e=parseInt(String(y.columnCount),10);return"day"===r.value&&e>1?e:"day"===r.value&&y.maxDays&&y.maxDays>1?y.maxDays:N.value.length}),ye=computed(()=>{return b.value?parseInt(window.getComputedStyle(b.value).getPropertyValue("--calendar-intervals-width"),10):0}),C=computed(()=>{if(b.value){const e=l.width||b.value.getBoundingClientRect().width;if(e&&ye.value&&W.value)return(e-Q.value-ye.value)/W.value+"px"}return 100/W.value+"%"});function pe(){g.value=today()}function ve(e=1){E(e)}function fe(e=1){E(-e)}function he({width:e,height:t}){l.width=e,l.height=t}function F(e){return e.date===g.value}function ge(){return h("div",{roll:"presentation",class:{"q-calendar-day__head":!0,"q-calendar__sticky":!0===w.value},style:{marginRight:Q.value+"px"}},[Te(),De()])}function Te(){const e=p["head-intervals"],t={timestamps:N.value,days:N.value,date:y.modelValue};return h("div",{class:{"q-calendar-day__head--intervals":!0,"q-calendar__sticky":!0===w.value},...A("-head-intervals",e=>{return{scope:t,event:e}})},[e&&e({scope:t})])}function De(){return h("div",{ref:q,class:{"q-calendar-day__head--days__column":!0}},[ke(),we()])}function ke(){return h("div",{class:{"q-calendar-day__head--days__weekdays":!0}},[..._e()])}function we(){const e=p["head-days-events"],t=parseInt(String(y.columnCount),10);return nextTick(()=>{if(n.value&&0===t&&window)try{const e=window.getComputedStyle(n.value);a.value&&a.value.parentElement&&(a.value.parentElement.style.height=e.height,a.value.style.height=e.height)}catch{}}),h("div",{class:{"q-calendar-day__head--days__event":!0}},[e&&h("div",{ref:a,style:{position:"absolute",left:0,top:0,right:0,overflow:"hidden",zIndex:1}},[e({scope:{days:N.value,ref:n}})]),...Ie()])}function _e(){const e=parseInt(String(y.columnCount),10),a=parseInt(String(y.columnIndexStart),10);return 1===N.value.length&&e>0?Array.apply(null,new Array(e)).map((e,t)=>t+a).map(e=>be(N.value[0],e)):N.value.map(e=>be(e,0))}function Ie(){const e=parseInt(String(y.columnCount),10),a=parseInt(String(y.columnIndexStart),10);return 1===N.value.length&&e>0?Array.apply(null,new Array(e)).map((e,t)=>t+a).map(e=>Me(N.value[0],e)).filter(e=>void 0!==e):N.value.map(e=>Me(e,0)).filter(e=>void 0!==e)}function be(t,e){const a=p["head-day"],n=p["head-date"],r=!0!==y.noActiveDate&&F(t),i=S(t,e),o=(i.activeDate=r,i.droppable=T.value===t.date,i.disabled=!!y.disabledWeekdays&&y.disabledWeekdays.includes(Number(t.weekday)),!0===w.value?y.cellWidth:C.value),d=y.weekdayStyle||K,u={width:o,maxWidth:o,minWidth:o,...d({scope:i})},s=(!0===w.value&&(u.minWidth=o),"function"===typeof y.weekdayClass?y.weekdayClass({scope:i}):{}),l=!0===y.focusable&&y.focusType.includes("weekday"),c=t.date+(void 0!==e?"-"+e:""),m={key:c,ref:e=>{f.value[c]=e},tabindex:!0===l?0:-1,class:{"q-calendar-day__head--day":!0,...s,...I(t),"q-active-date":r,"q-calendar__hoverable":!0===y.hoverable,"q-calendar__focusable":!0===l},style:u,onFocus:()=>{!0===l&&(v.value=c)},onKeydown:e=>{!0!==t.disabled&&O(e,[13,32])&&(e.stopPropagation(),e.preventDefault())},onKeyup:e=>{!0!==t.disabled&&O(e,[13,32])&&(g.value=t.date)},...A("-head-day",e=>{return{scope:i,event:e}}),onDragenter:e=>{void 0!==y.dragEnterFunc&&"function"===typeof y.dragEnterFunc&&(!0===y.dragEnterFunc(e,"head-day",{scope:i})?T.value=t.date:T.value="")},onDragover:e=>{void 0!==y.dragOverFunc&&"function"===typeof y.dragOverFunc&&(!0===y.dragOverFunc(e,"head-day",{scope:i})?T.value=t.date:T.value="")},onDragleave:e=>{void 0!==y.dragLeaveFunc&&"function"===typeof y.dragLeaveFunc&&(!0===y.dragLeaveFunc(e,"head-day",{scope:i})?T.value=t.date:T.value="")},onDrop:e=>{void 0!==y.dropFunc&&"function"===typeof y.dropFunc&&(!0===y.dropFunc(e,"head-day",{scope:i})?T.value=t.date:T.value="")}};return h("div",m,[void 0!==a&&a({scope:i}),void 0===a&&Ae(t,e),void 0===a&&Ne(t),void 0===a&&n&&n({scope:i}),void 0===a&&Oe(t,e),useFocusHelper()])}function Ne(e){return"stacked"===y.dateHeader?[!0!==y.noDefaultHeaderText?R(e):[],!0!==y.noDefaultHeaderBtn?H(e):[]].filter(e=>void 0!==e):"inline"===y.dateHeader?("left"===y.weekdayAlign&&"right"===y.dateAlign||"right"===y.weekdayAlign&&y.dateAlign,h("div",{class:"q-calendar__header--inline"},[!0!==y.noDefaultHeaderText&&R(e),!0!==y.noDefaultHeaderBtn&&H(e)])):"inverted"===y.dateHeader?("left"===y.weekdayAlign&&"right"===y.dateAlign||"right"===y.weekdayAlign&&y.dateAlign,h("div",{class:"q-calendar__header--inline"},[!0!==y.noDefaultHeaderBtn&&H(e),!0!==y.noDefaultHeaderText&&R(e)])):void 0}function Me(e,t){const a=p["head-day-event"],n=!0!==y.noActiveDate&&F(e),r=S(e,t),i=(r.activeDate=n,r.disabled=!!y.disabledWeekdays&&y.disabledWeekdays.includes(Number(e.weekday)),!0===w.value?convertToUnit(M.value):C.value),o={width:i,maxWidth:i,minWidth:i};return!0===w.value&&(o.minWidth=i),h("div",{key:"event-"+e.date+(void 0!==t?"-"+t:""),class:{"q-calendar-day__head--day__event":!0,...I(e),"q-active-date":n},style:o},[a&&a({scope:r})])}function R(e){const t=p["head-weekday-label"],a=!0===y.shortWeekdayLabel,n=S(e,0),r=(n.shortWeekdayLabel=y.shortWeekdayLabel,n.disabled=!!y.disabledWeekdays&&y.disabledWeekdays.includes(Number(e.weekday)),{class:{"q-calendar-day__head--weekday":!0,["q-calendar__"+y.weekdayAlign]:!0,"q-calendar__ellipsis":!0}});return h("div",r,t&&t({scope:n})||Se(e,a))}function Se(e,t){const a=$.value(e,t||y.weekdayBreakpoints[0]>0&&M.value<=y.weekdayBreakpoints[0]);return h("span",{class:"q-calendar-day__head--weekday-label q-calendar__ellipsis"},y.weekdayBreakpoints[1]>0&&M.value<=y.weekdayBreakpoints[1]?minCharWidth(a,Number(y.minWeekdayLabel)):a)}function H(e){const t={class:{"q-calendar-day__head--date":!0,["q-calendar__"+y.dateAlign]:!0}};return h("div",t,Ee(e))}function Ee(a){const e=!0!==y.noActiveDate&&F(a),t=Z.value(a,!1),n=p["head-day-label"],r=p["head-day-button"],i={dayLabel:t,timestamp:a,activeDate:e,disabled:!!y.disabledWeekdays&&y.disabledWeekdays.includes(Number(a.weekday))},o={class:{"q-calendar-day__head--day__label":!0,"q-calendar__button":!0,"q-calendar__button--round":"round"===y.dateType,"q-calendar__button--rounded":"rounded"===y.dateType,"q-calendar__button--bordered":!0===a.current,"q-calendar__focusable":!0},disabled:a.disabled,onKeydown:e=>{!0!==a.disabled&&O(e,[13,32])&&(e.stopPropagation(),e.preventDefault())},onKeyup:e=>{!0!==a.disabled&&O(e,[13,32])&&(g.value=a.date,void 0!==k.value.onClickDate)&&m("click-date",{scope:i})},...A("-date",(e,t)=>{return"click-date"!==t&&"contextmenu-date"!==t||(g.value=a.date,"click-date"===t&&e.preventDefault()),{scope:i,event:e}})};return!0!==y.noAria&&(o.ariaLabel=X.value(a,!1)),r?r({scope:i}):renderButton(y,o,n?n({scope:i}):t)}function Ae(e,t){const a=p["column-header-before"];if(a){const n={timestamp:e,columnIndex:t};return h("div",{class:"q-calendar-day__column-header--before"},[a({scope:n})])}}function Oe(e,t){const a=p["column-header-after"];if(a){const n={timestamp:e,columnIndex:t};return h("div",{class:"q-calendar-day__column-header--after"},[a({scope:n})])}}function We(){return h("div",{class:"q-calendar-day__body"},[Ce()])}function Ce(){return!0===w.value?h("div",{ref:e,class:{"q-calendar-day__scroll-area":!0,"q-calendar__scroll":!0}},[!0!==w.value&&Ye(),Re()]):!0===y.noScroll?Fe():h("div",{ref:e,class:{"q-calendar-day__scroll-area":!0,"q-calendar__scroll":!0}},[Fe()])}function Fe(){return h("div",{ref:L,class:"q-calendar-day__pane"},[Ye(),Re()])}function Re(){const e=p["day-container"];return h("div",{class:"q-calendar-day__day-container"},[!0===w.value&&!0!==y.noHeader&&ge(),h("div",{style:{display:"flex",flexDirection:"row"}},[!0===w.value&&Ye(),...He()]),e&&e({scope:{days:N.value}})])}function He(){const e=parseInt(String(y.columnCount),10),a=parseInt(String(y.columnIndexStart),10);return 1===N.value.length&&e>0?Array.apply(null,new Array(e)).map((e,t)=>t+a).map(e=>xe(N.value[0],0,e)):N.value.map((e,t)=>xe(e,t,0))}function xe(e,t,a){const n=p["day-body"],r=S(e,a),i=!0===w.value?y.cellWidth:C.value,o={width:i,maxWidth:i,minWidth:i};return!0===w.value&&(o.minWidth=i),h("div",{key:e.date+(void 0!==a?":"+a:""),class:{"q-calendar-day__day":!0,...I(e)},style:o},[...Le(t,a),n&&n({scope:r})])}function Le(e,t){return J.value[e].map(e=>qe(e,t))}function qe(a,n){const e=convertToUnit(y.intervalHeight),t=y.intervalStyle||re,r=p["day-interval"],i=S(a,n),o=(i.droppable=D.value===getDayTimeIdentifier(a),"function"===typeof y.intervalClass?y.intervalClass({scope:i}):{}),d=!0===y.focusable&&y.focusType.includes("interval"),u=getDateTime(a),s={height:e,...t({scope:i})},l={key:u,tabindex:!0===d?0:-1,class:{"q-calendar-day__day-interval":0===a.minute,"q-calendar-day__day-interval--section":0!==a.minute,...o,...ae(a,Array.from(y.selectedDates),y.selectedStartEndDates),"q-calendar__hoverable":!0===y.hoverable,"q-calendar__focusable":!0===d},style:s,onDragenter:e=>{void 0!==y.dragEnterFunc&&"function"===typeof y.dragEnterFunc&&(!0===y.dragEnterFunc(e,"interval",{scope:i})?D.value=getDayTimeIdentifier(a):D.value=0)},onDragover:e=>{void 0!==y.dragOverFunc&&"function"===typeof y.dragOverFunc&&(!0===y.dragOverFunc(e,"interval",{scope:i})?D.value=getDayTimeIdentifier(a):D.value=0)},onDragleave:e=>{void 0!==y.dragLeaveFunc&&"function"===typeof y.dragLeaveFunc&&(!0===y.dragLeaveFunc(e,"interval",{scope:i})?D.value=getDayTimeIdentifier(a):D.value=0)},onDrop:e=>{void 0!==y.dropFunc&&"function"===typeof y.dropFunc&&(!0===y.dropFunc(e,"interval",{scope:i})?D.value=getDayTimeIdentifier(a):D.value=0)},onKeydown:e=>{O(e,[13,32])&&(e.stopPropagation(),e.preventDefault())},onKeyup:e=>{if(O(e,[13,32])){const t=S(a,n);g.value=t.timestamp.date,void 0!==k.value.onClickTime&&m("click-time",{scope:t,event:e})}},...A("-time",e=>{const t=S(ie(e,a,y.timeClicksClamped,_.now),n);return{scope:t,event:e}})},c=(!0!==y.noAria&&(l.ariaLabel=te.value(a,!1)),r?r({scope:i}):void 0);return h("div",l,[c,useFocusHelper()])}function Ye(){const e={ariaHidden:"true",class:{"q-calendar-day__intervals-column":!0,"q-calendar__ellipsis":!0,"q-calendar__sticky":!0===w.value},...A("-interval",e=>{const t=oe(e,i.value,y.timeClicksClamped,_.now);return{scope:{timestamp:t},event:e}})};return h("div",e,Ue())}function Ue(){return J.value[0].map(e=>Be(e))}function Be(e){const t=p["interval-label"],a=convertToUnit(y.intervalHeight),n=y.shortIntervalLabel??!1,r=y.showIntervalLabel||ne,i=r(e),o=i?ee.value(e,n):void 0;return h("div",{key:e.time,class:{"q-calendar-day__interval":0===e.minute,"q-calendar-day__interval--section":0!==e.minute},style:{height:a}},[h("div",{class:"q-calendar-day__interval--text q-calendar__overflow-wrap"},[t?t({scope:{timestamp:e,label:o}}):o])])}function Pe(){const{start:e,end:t,maxDays:a}=j.value,n=(d.value===e.date&&u.value===t.date&&s.value===a||(d.value=e.date,u.value=t.date,s.value=a),l.width>0),r=withDirectives(h("div",{key:d.value,class:"q-calendar-day"},[!0===n&&!0!==w.value&&!0!==y.noHeader&&ge(),n&&We()]),[[ResizeObserverDirective,he]]);if(!0!==y.animated)return r;{const i="q-calendar--"+("prev"===o.value?y.transitionPrev:y.transitionNext);return h(Transition,{name:i,appear:!0},()=>r)}}return watch([N],ce,{deep:!0,immediate:!0}),watch(()=>y.modelValue,(e,t)=>{if(g.value!==y.modelValue){if(!0===y.animated){const a=getDayIdentifier(parsed(e)),n=getDayIdentifier(parsed(t));o.value=a>=n?"next":"prev"}g.value=e}v.value=e}),watch(g,(e,t)=>{if(g.value!==y.modelValue){if(!0===y.animated){const a=getDayIdentifier(parsed(e)),n=getDayIdentifier(parsed(t));o.value=a>=n?"next":"prev"}m("update:model-value",e)}}),watch(v,e=>{e&&(t.value=parseTimestamp(e))}),watch(t,()=>{v.value&&f.value[v.value]?f.value[v.value].focus():me()}),watch(()=>y.maxDays,e=>{s.value=e}),onBeforeUpdate(()=>{f.value={},a.value=void 0,n.value=void 0}),onMounted(()=>{}),x({prev:fe,next:ve,move:E,moveToToday:pe,updateCurrent:V,timeStartPos:le,timeDurationHeight:se,heightToMinutes:ue,scrollToTime:de}),()=>G()}});const version="4.1.0";var Plugin={version:version,QCalendarDay:QCalendarDay,...Timestamp$1,...helpers$1,install(e){e.component(String(QCalendarDay.name),QCalendarDay)}};export{DAYS_IN_MONTH,DAYS_IN_MONTH_LEAP,DAYS_IN_MONTH_MAX,DAYS_IN_MONTH_MIN,DAY_MIN,FIRST_HOUR,MONTH_MAX,MONTH_MIN,PARSE_DATE,PARSE_DATETIME,PARSE_TIME,QCalendarDay,TIME_CONSTANTS,addToDate,compareDate,compareDateTime,compareTime,compareTimestamps,convertToUnit,copyTimestamp,createDayList,createIntervalList,createNativeLocaleFormatter,daysBetween,daysInMonth,Plugin as default,diffTimestamp,findWeekday,getDate,getDateTime,getDayIdentifier,getDayOfYear,getDayTimeIdentifier,getEndOfMonth,getEndOfWeek,getMonthFormatter,getMonthNames,getStartOfMonth,getStartOfWeek,getTime,getTimeIdentifier,getWeekday,getWeekdayFormatter,getWeekdayNames,getWorkWeek,indexOf,isBetweenDates,isLeapYear,isOverlappingDates,isToday,makeDate,makeDateTime,maxTimestamp,minCharWidth,minTimestamp,moveRelativeDays,nextDay,padNumber,parseDate,parseTime,parseTimestamp,parsed,prevDay,relativeDays,today,updateDayOfYear,updateDisabled,updateFormatted,updateMinutes,updateRelative,updateWeekday,updateWorkWeek,validateNumber,validateTimestamp,version,weeksBetween}; | ||
import{reactive,ref,computed,withDirectives,h,watch,getCurrentInstance,onBeforeUnmount,defineComponent,onBeforeUpdate,onMounted,Transition,nextTick}from"vue";const PARSE_DATETIME=/^(\d{4})-(\d{1,2})(-(\d{1,2}))?([^\d]+(\d{1,2}))?(:(\d{1,2}))?(:(\d{1,2}))?(.(\d{1,3}))?$/,PARSE_DATE=/^(\d{4})-(\d{1,2})(-(\d{1,2}))?/,PARSE_TIME=/(\d\d?)(:(\d\d?)|)(:(\d\d?)|)/,DAYS_IN_MONTH=[0,31,28,31,30,31,30,31,31,30,31,30,31],DAYS_IN_MONTH_LEAP=[0,31,29,31,30,31,30,31,31,30,31,30,31],TIME_CONSTANTS={MILLISECONDS_IN:{SECOND:1e3,MINUTE:6e4,HOUR:36e5,DAY:864e5,WEEK:6048e5},SECONDS_IN:{MINUTE:60,HOUR:3600,DAY:86400,WEEK:604800},MINUTES_IN:{MINUTE:1,HOUR:60,DAY:1440,WEEK:10080},HOURS_IN:{DAY:24,WEEK:168},DAYS_IN:{WEEK:7}},DAYS_IN_MONTH_MIN=28,DAYS_IN_MONTH_MAX=31,MONTH_MAX=12,MONTH_MIN=1,DAY_MIN=1,FIRST_HOUR=0;function validateTimestamp(e){return"string"===typeof e&&PARSE_DATETIME.test(e)}function parsed(e){if("string"!==typeof e)return null;const t=PARSE_DATETIME.exec(e);if(!t||!t[1]||!t[2])return null;const a=parseInt(t[1],10),n=parseInt(t[2],10),r=parseInt(t[4]||"1",10),i=parseInt(t[6]||"0",10),o=parseInt(t[8]||"0",10);return{date:e,time:i.toString().padStart(2,"0")+":"+o.toString().padStart(2,"0"),year:a,month:n,day:r,hour:i,minute:o,hasDay:!!t[4],hasTime:!0,past:!1,current:!1,future:!1,disabled:!1,weekday:0,doy:0,workweek:0}}function parseDate(e,t=!1){if(!(e instanceof Date))return null;const a=t?"UTC":"";return updateFormatted({date:padNumber(e[`get${a}FullYear`](),4)+"-"+padNumber(e[`get${a}Month`]()+1,2)+"-"+padNumber(e[`get${a}Date`](),2),time:padNumber(e[`get${a}Hours`]()||0,2)+":"+padNumber(e[`get${a}Minutes`]()||0,2),year:e[`get${a}FullYear`](),month:e[`get${a}Month`]()+1,day:e[`get${a}Date`](),hour:e[`get${a}Hours`](),minute:e[`get${a}Minutes`](),weekday:0,doy:0,workweek:0,hasDay:!0,hasTime:!0,past:!1,current:!1,future:!1,disabled:!1})}function padNumber(e,t){let a=String(e);while(a.length<t)a="0"+a;return a}function isLeapYear(e){return e%4===0&&e%100!==0||e%400===0}function daysInMonth(e,t){return(isLeapYear(e)?DAYS_IN_MONTH_LEAP:DAYS_IN_MONTH)[t]}function nextDay(e){const t=new Date(e.year,e.month-1,e.day+1);return updateFormatted(normalizeTimestamp({...e,year:t.getFullYear(),month:t.getMonth()+1,day:t.getDate()}))}function prevDay(e){const t=new Date(e.year,e.month-1,e.day-1);return updateFormatted(normalizeTimestamp({...e,year:t.getFullYear(),month:t.getMonth()+1,day:t.getDate()}))}function today(){const e=new Date,t=e.getMonth()+1,a=e.getDate(),n=e.getFullYear();return[n,padNumber(t,2),padNumber(a,2)].join("-")}function isToday(e){return e===today()}function getStartOfWeek(e,t,a){let n=copyTimestamp(e);if(t){if(1===n.day||0===n.weekday)while(!t.includes(Number(n.weekday)))n=nextDay(n);n=findWeekday(n,t[0],prevDay),n=updateFormatted(n),a&&(n=updateRelative(n,a,n.hasTime))}return n}function getEndOfWeek(e,t,a){let n=copyTimestamp(e);if(t&&Array.isArray(t)){const r=daysInMonth(n.year,n.month);if(r===n.day||n.weekday===t[t.length-1])while(!t.includes(Number(n.weekday)))n=prevDay(n);n=findWeekday(n,t[t.length-1],nextDay),n=updateFormatted(n),a&&(n=updateRelative(n,a,n.hasTime))}return n}function getStartOfMonth(e){let t=copyTimestamp(e);return t.day=DAY_MIN,t=updateFormatted(t),t}function getEndOfMonth(e){let t=copyTimestamp(e);return t.day=daysInMonth(t.year,t.month),t=updateFormatted(t),t}function parseTime(e){const t=Object.prototype.toString.call(e);switch(t){case"[object Number]":return e;case"[object String]":{const a=PARSE_TIME.exec(e);return a?60*parseInt(a[1],10)+parseInt(a[3]||"0",10):!1}case"[object Object]":return"object"!==typeof e||"number"!==typeof e.hour||"number"!==typeof e.minute?!1:"object"===typeof e&&"hour"in e&&"minute"in e&&60*e.hour+e.minute}return!1}function compareTimestamps(e,t){return!(!e||!t)&&e.year===t.year&&e.month===t.month&&e.day===t.day&&e.hour===t.hour&&e.minute===t.minute}function compareDate(e,t){return getDate(e)===getDate(t)}function compareTime(e,t){return getTime(e)===getTime(t)}function compareDateTime(e,t){return getDateTime(e)===getDateTime(t)}function parseTimestamp(e,t=null){let a=parsed(e);return a?(a=updateFormatted(a),t&&(a=updateRelative(a,t,a.hasTime)),a):null}function getDayIdentifier(e){return 1e8*(e.year??0)+1e6*(e.month??0)+1e4*(e.day??0)}function getTimeIdentifier(e){return 100*(e.hour??0)+(e.minute??0)}function getDayTimeIdentifier(e){return getDayIdentifier(e)+getTimeIdentifier(e)}function diffTimestamp(e,t,a=!1){const n=Date.UTC(e.year??0,(e.month??1)-1,e.day??1,e.hour??0,e.minute??0),r=Date.UTC(t.year??0,(t.month??1)-1,t.day??1,t.hour??0,t.minute??0);return!0===a&&r<n?0:r-n}function updateRelative(e,t,a=!1){let n=copyTimestamp(e),r=getDayIdentifier(t),i=getDayIdentifier(n),o=r===i;return n.hasTime&&a&&o&&(r=getTimeIdentifier(t),i=getTimeIdentifier(n),o=r===i),n.past=i<r,n.current=o,n.future=i>r,n.currentWeekday=n.weekday===t.weekday,n}function updateMinutes(e,t,a=null){let n=copyTimestamp(e);return n.hasTime=!0,n.hour=Math.floor(t/TIME_CONSTANTS.MINUTES_IN.HOUR),n.minute=t%TIME_CONSTANTS.MINUTES_IN.HOUR,n.time=getTime(n),a&&(n=updateRelative(n,a,!0)),n}function updateWeekday(e){let t=copyTimestamp(e);return t.weekday=getWeekday(t),t}function updateDayOfYear(e){let t=copyTimestamp(e);return t.doy=getDayOfYear(t)||0,t}function updateWorkWeek(e){let t=copyTimestamp(e);return t.workweek=getWorkWeek(t),t}function updateDisabled(e,t,a,n,r){let i=copyTimestamp(e);const o=getDayIdentifier(i);if(void 0!==t){const l=parsed(t);if(l){const c=getDayIdentifier(l);o<=c&&(i.disabled=!0)}}if(!0!==i.disabled&&void 0!==a){const m=parsed(a);if(m){const y=getDayIdentifier(m);o>=y&&(i.disabled=!0)}}if(!0!==i.disabled&&Array.isArray(n)&&n.length>0)for(var d in n)if(n[d]===i.weekday){i.disabled=!0;break}if(!0!==i.disabled&&Array.isArray(r)&&r.length>0)for(var u in r)if(Array.isArray(r[u])&&2===r[u].length&&r[u][0]&&r[u][1]){const p=parsed(r[u][0]),v=parsed(r[u][1]);if(p&&v&&isBetweenDates(i,p,v)){i.disabled=!0;break}}else{const f=r[u];if(Array.isArray(f))for(var s of f){const h=parseTimestamp(s);if(h){const g=getDayIdentifier(h);if(g===o){i.disabled=!0;break}}}else if(f){const T=parseTimestamp(f);if(T){const D=getDayIdentifier(T);D===o&&(i.disabled=!0)}}}return i}function updateFormatted(e){let t=copyTimestamp(e);return t.hasTime=!0,t.time=getTime(t),t.date=getDate(t),t.weekday=getWeekday(t),t.doy=getDayOfYear(t)||0,t.workweek=getWorkWeek(t),t}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){let t=copyTimestamp(e);if(0===t.year){const r=parseTimestamp(today());r&&(t=r)}const a=new Date(Date.UTC(t.year,t.month-1,t.day)),n=4;a.setUTCDate(a.getUTCDate()-(a.getUTCDay()+6)%7+n),a.setUTCDate(a.getUTCDate()+n-(a.getUTCDay()||7));e=new Date(Date.UTC(a.getUTCFullYear(),0,1)),e=Math.ceil(((a.valueOf()-e.valueOf())/864e5+1)/7);return e}function getWeekday(e){let t=e.weekday;if(e.hasDay){const a=Math.floor,n=e.day,r=(e.month+9)%MONTH_MAX+1,i=a(e.year/100),o=e.year%100-(e.month<=2?1:0);t=((n+a(2.6*r-.2)-2*i+o+a(o/4)+a(i/4))%7+7)%7}return t??0}function copyTimestamp(e){return{...e}}function getDate(e){let 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):"00:00")}function moveRelativeDays(e,t=nextDay,a=1,n=[0,1,2,3,4,5,6]){const r=copyTimestamp(e);return relativeDays(r,t,a,n)}function relativeDays(e,t=nextDay,a=1,n=[0,1,2,3,4,5,6]){let r=copyTimestamp(e);n.includes(Number(r.weekday))||0!==r.weekday||t!==nextDay||++a;while(--a>=0)r=t(r),n.length<7&&!n.includes(Number(r.weekday))&&++a;return r}function findWeekday(e,t,a=nextDay,n=6){let r=copyTimestamp(e);while(r.weekday!==t&&--n>=0)r=a(r);return r}function createDayList(e,t,a,n=[0,1,2,3,4,5,6],r=void 0,i=void 0,o=[],d=[],u=42,s=0){const l=getDayIdentifier(e),c=getDayIdentifier(t),m=[];let y=copyTimestamp(e),p=0,v=p===c;if(!(c<l))while((!v||m.length<s)&&m.length<u){if(p=getDayIdentifier(y),v=v||p>c&&m.length>=s,v)break;if(n.includes(Number(y.weekday))){let e=copyTimestamp(y);e=updateFormatted(e),e=updateRelative(e,a),e=updateDisabled(e,r,i,o,d),m.push(e)}y=relativeDays(y,nextDay)}return m}function createIntervalList(t,a,n,r,i){const o=[];for(let e=0;e<r;++e){const d=(a+e)*n,u=copyTimestamp(t);o.push(updateMinutes(u,d,i))}return o}function createNativeLocaleFormatter(n,r){const e=()=>"";return"undefined"===typeof Intl||"undefined"===typeof Intl.DateTimeFormat?e:(t,e)=>{try{const a=new Intl.DateTimeFormat(n||void 0,r(t,e));return a.format(makeDateTime(t))}catch(e){return console.error(`Intl.DateTimeFormat: ${e.message} -> `+getDateTime(t)),""}}}function makeDate(e,t=!0){return t?new Date(Date.UTC(e.year,e.month-1,e.day,0,0)):new Date(e.year,e.month-1,e.day,0,0)}function makeDateTime(e,t=!0){return t?new Date(Date.UTC(e.year,e.month-1,e.day,e.hour,e.minute)):new Date(e.year,e.month-1,e.day,e.hour,e.minute)}function validateNumber(e){return isFinite(Number(e))}function maxTimestamp(e,t=!1){const a=!0===t?getDayTimeIdentifier:getDayIdentifier;return e.reduce((e,t)=>{return Math.max(a(e),a(t))===a(e)?e:t})}function minTimestamp(e,t=!1){const a=!0===t?getDayTimeIdentifier:getDayIdentifier;return e.reduce((e,t)=>{return Math.min(a(e),a(t))===a(e)?e:t})}function isBetweenDates(e,t,a,n=!1){const r=getDayIdentifier(e)+(!0===n?getTimeIdentifier(e):0),i=getDayIdentifier(t)+(!0===n?getTimeIdentifier(t):0),o=getDayIdentifier(a)+(!0===n?getTimeIdentifier(a):0);return r>=i&&r<=o}function isOverlappingDates(e,t,a,n){const r=getDayIdentifier(e),i=getDayIdentifier(t),o=getDayIdentifier(a),d=getDayIdentifier(n);return r>=o&&r<=d||i>=o&&i<=d||o>=r&&i>=d}function addToDate(e,t){const a=copyTimestamp(e);return t.year&&(a.year+=t.year),t.month&&(a.month+=t.month),t.day&&(a.day+=t.day),t.hour&&(a.hour+=t.hour),t.minute&&(a.minute+=t.minute),updateFormatted(normalizeTimestamp(a))}function normalizeTimestamp(e){const t=new Date(e.year,e.month-1,e.day,e.hour,e.minute);return{...e,year:t.getFullYear(),month:t.getMonth()+1,day:t.getDate(),hour:t.getHours(),minute:t.getMinutes()}}function daysBetween(e,t){const a=diffTimestamp(e,t,!0);return Math.floor(a/TIME_CONSTANTS.MILLISECONDS_IN.DAY)}function weeksBetween(e,t){let a=copyTimestamp(e),n=copyTimestamp(t);return a=findWeekday(a,0),n=findWeekday(n,6),Math.ceil(daysBetween(a,n)/TIME_CONSTANTS.DAYS_IN.WEEK)}const weekdayDateMap={Sun:new Date("2020-01-05T00:00:00.000Z"),Mon:new Date("2020-01-06T00:00:00.000Z"),Tue:new Date("2020-01-07T00:00:00.000Z"),Wed:new Date("2020-01-08T00:00:00.000Z"),Thu:new Date("2020-01-09T00:00:00.000Z"),Fri:new Date("2020-01-10T00:00:00.000Z"),Sat:new Date("2020-01-11T00:00:00.000Z")};function getWeekdayFormatter(){const e=()=>"",r={long:{timeZone:"UTC",weekday:"long"},short:{timeZone:"UTC",weekday:"short"},narrow:{timeZone:"UTC",weekday:"narrow"}};return"undefined"===typeof Intl||"undefined"===typeof Intl.DateTimeFormat?e:t;function t(t,e,a){try{const n=new Intl.DateTimeFormat(a||void 0,r[e]||r["long"]);return n.format(weekdayDateMap[t])}catch(e){return e instanceof Error&&console.error(`Intl.DateTimeFormat: ${e.message} -> day of week: `+t),""}}}function getWeekdayNames(t,a){const e=Object.keys(weekdayDateMap),n=getWeekdayFormatter();return e.map(e=>String(n(e,t,a)))}function getMonthFormatter(){const e=()=>"",i={long:{timeZone:"UTC",month:"long"},short:{timeZone:"UTC",month:"short"},narrow:{timeZone:"UTC",month:"narrow"}};return"undefined"===typeof Intl||"undefined"===typeof Intl.DateTimeFormat?e:t;function t(t,e,a){try{const n=new Intl.DateTimeFormat(a||void 0,i[e]||i["long"]),r=new Date;return r.setDate(1),r.setMonth(t),n.format(r)}catch(e){return e instanceof Error&&console.error(`Intl.DateTimeFormat: ${e.message} -> month: `+t),""}}}function getMonthNames(t,a){const n=getMonthFormatter();return[...Array(12).keys()].map(e=>n(e,t,a))}var Timestamp={PARSE_DATETIME:PARSE_DATETIME,PARSE_DATE:PARSE_DATE,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,TIME_CONSTANTS:TIME_CONSTANTS,FIRST_HOUR:FIRST_HOUR,today:today,getStartOfWeek:getStartOfWeek,getEndOfWeek:getEndOfWeek,getStartOfMonth:getStartOfMonth,getEndOfMonth:getEndOfMonth,parseTime:parseTime,validateTimestamp:validateTimestamp,parsed:parsed,parseTimestamp:parseTimestamp,parseDate:parseDate,getDayIdentifier:getDayIdentifier,getTimeIdentifier:getTimeIdentifier,getDayTimeIdentifier:getDayTimeIdentifier,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,createDayList:createDayList,createIntervalList:createIntervalList,createNativeLocaleFormatter:createNativeLocaleFormatter,makeDate:makeDate,makeDateTime:makeDateTime,validateNumber:validateNumber,isBetweenDates:isBetweenDates,isOverlappingDates:isOverlappingDates,daysBetween:daysBetween,weeksBetween:weeksBetween,addToDate:addToDate,compareTimestamps:compareTimestamps,compareDate:compareDate,compareTime:compareTime,compareDateTime:compareDateTime,getWeekdayFormatter:getWeekdayFormatter,getWeekdayNames:getWeekdayNames,getMonthFormatter:getMonthFormatter,getMonthNames:getMonthNames},Timestamp$1=Object.freeze({__proto__:null,DAYS_IN_MONTH:DAYS_IN_MONTH,DAYS_IN_MONTH_LEAP:DAYS_IN_MONTH_LEAP,DAYS_IN_MONTH_MAX:DAYS_IN_MONTH_MAX,DAYS_IN_MONTH_MIN:DAYS_IN_MONTH_MIN,DAY_MIN:DAY_MIN,FIRST_HOUR:FIRST_HOUR,MONTH_MAX:MONTH_MAX,MONTH_MIN:MONTH_MIN,PARSE_DATE:PARSE_DATE,PARSE_DATETIME:PARSE_DATETIME,PARSE_TIME:PARSE_TIME,TIME_CONSTANTS:TIME_CONSTANTS,addToDate:addToDate,compareDate:compareDate,compareDateTime:compareDateTime,compareTime:compareTime,compareTimestamps:compareTimestamps,copyTimestamp:copyTimestamp,createDayList:createDayList,createIntervalList:createIntervalList,createNativeLocaleFormatter:createNativeLocaleFormatter,daysBetween:daysBetween,daysInMonth:daysInMonth,default:Timestamp,diffTimestamp:diffTimestamp,findWeekday:findWeekday,getDate:getDate,getDateTime:getDateTime,getDayIdentifier:getDayIdentifier,getDayOfYear:getDayOfYear,getDayTimeIdentifier:getDayTimeIdentifier,getEndOfMonth:getEndOfMonth,getEndOfWeek:getEndOfWeek,getMonthFormatter:getMonthFormatter,getMonthNames:getMonthNames,getStartOfMonth:getStartOfMonth,getStartOfWeek:getStartOfWeek,getTime:getTime,getTimeIdentifier:getTimeIdentifier,getWeekday:getWeekday,getWeekdayFormatter:getWeekdayFormatter,getWeekdayNames:getWeekdayNames,getWorkWeek:getWorkWeek,isBetweenDates:isBetweenDates,isLeapYear:isLeapYear,isOverlappingDates:isOverlappingDates,isToday:isToday,makeDate:makeDate,makeDateTime:makeDateTime,maxTimestamp:maxTimestamp,minTimestamp:minTimestamp,moveRelativeDays:moveRelativeDays,nextDay:nextDay,padNumber:padNumber,parseDate:parseDate,parseTime:parseTime,parseTimestamp:parseTimestamp,parsed:parsed,prevDay:prevDay,relativeDays:relativeDays,today:today,updateDayOfYear:updateDayOfYear,updateDisabled:updateDisabled,updateFormatted:updateFormatted,updateMinutes:updateMinutes,updateRelative:updateRelative,updateWeekday:updateWeekday,updateWorkWeek:updateWorkWeek,validateNumber:validateNumber,validateTimestamp:validateTimestamp,weeksBetween:weeksBetween});function convertToUnit(e,t="px"){if(e)return isNaN(e)?String(e):"auto"===e?e:""+Number(e)+t}function indexOf(t,a){for(let e=0;e<t.length;e++)if(!0===a(t[e],e))return e;return-1}function minCharWidth(e,t){return 0===t?e:e.slice(0,t)}var helpers={convertToUnit:convertToUnit,indexOf:indexOf,minCharWidth:minCharWidth},helpers$1=Object.freeze({__proto__:null,convertToUnit:convertToUnit,default:helpers,indexOf:indexOf,minCharWidth:minCharWidth});const ResizeObserverDirective={mounted(e,t){if("function"===typeof t.value){const a=t.value,n={callback:a,size:{width:0,height:0},observer:new ResizeObserver(e=>{const t=e[0].contentRect;t.width===n.size.width&&t.height===n.size.height||(n.size.width=t.width,n.size.height=t.height,n.debounceTimeout&&clearTimeout(n.debounceTimeout),n.debounceTimeout=setTimeout(()=>{n.callback(n.size),n.debounceTimeout=void 0},100))})};n.observer.observe(e),e.__onResizeObserver=n}},beforeUnmount(e){if(e.__onResizeObserver){const{observer:t,debounceTimeout:a}=e.__onResizeObserver;a&&clearTimeout(a),t.unobserve(e),delete e.__onResizeObserver}}};function useCalendar(t,a,{scrollArea:e,pane:n}){if(!a){const l="[error: renderCalendar] no renderFunc has been supplied to useCalendar";throw console.error(l),new Error(l)}const r=reactive({width:0,height:0}),i=ref(null);function o({width:e,height:t}){r.width=e,r.height=t}const d=computed(()=>{return!0!==t.noScroll&&e.value&&n.value&&r.height?e.value.offsetWidth-n.value.offsetWidth:0});function u(){}function s(){const e={ref:i,role:"complementary",lang:t.locale,class:`q-calendar ${t.dark?"q-calendar--dark":""} `+(t.bordered?"q-calendar__bordered":"")};return withDirectives(h("div",{...e},[a()]),[[ResizeObserverDirective,o]])}return{rootRef:i,scrollWidth:d,__initCalendar:u,__renderCalendar:s}}const isValidFocusType=e=>e.every(e=>["day","date","weekday","interval","time","resource","task"].includes(e)),useCommonProps={modelValue:{type:String,default:today(),validator:e=>""===e||validateTimestamp(e)},weekdays:{type:Array,default:()=>[0,1,2,3,4,5,6]},dateType:{type:String,default:"round",validator:e=>["round","rounded","square"].includes(e)},weekdayAlign:{type:String,default:"center",validator:e=>["left","center","right"].includes(e)},dateAlign:{type:String,default:"center",validator:e=>["left","center","right"].includes(e)},bordered:Boolean,dark:Boolean,noAria:Boolean,noActiveDate:Boolean,noHeader:Boolean,noScroll:Boolean,shortWeekdayLabel:Boolean,noDefaultHeaderText:Boolean,noDefaultHeaderBtn:Boolean,minWeekdayLabel:{type:[Number,String],default:1},weekdayBreakpoints:{type:Array,default:()=>[75,35],validator:e=>2===e.length},locale:{type:String,default:"en-US"},animated:Boolean,transitionPrev:{type:String,default:"slide-right"},transitionNext:{type:String,default:"slide-left"},disabledDays:Array,disabledBefore:String,disabledAfter:String,disabledWeekdays:{type:Array,default:()=>[]},dragEnterFunc:Function,dragOverFunc:Function,dragLeaveFunc:Function,dropFunc:Function,selectedDates:{type:[Array,Set],default:()=>[]},selectedStartEndDates:{type:Array,default:()=>[]},hoverable:Boolean,focusable:Boolean,focusType:{type:Array,default:()=>["date"],validator:isValidFocusType}};function useCommon(t,{startDate:e,endDate:a,times:n}){const r=computed(()=>parseTimestamp(e.value)),i=computed(()=>{return"0000-00-00"===a.value?getEndOfWeek(r.value,t.weekdays,n.today):parseTimestamp(a.value)||r.value}),o=computed(()=>createNativeLocaleFormatter(t.locale,()=>({timeZone:"UTC",day:"numeric"}))),d=computed(()=>createNativeLocaleFormatter(t.locale,(e,t)=>({timeZone:"UTC",weekday:t?"short":"long"}))),u=computed(()=>createNativeLocaleFormatter(t.locale,()=>({timeZone:"UTC",dateStyle:"full"})));function s(e,t){return e&&e.length>0&&e.includes(t.date)}function l(e,t){const a={firstDay:!1,betweenDays:!1,lastDay:!1};if(2===e.length){const n=getDayIdentifier(t),r=getDayIdentifier(parsed(e[0])),i=getDayIdentifier(parsed(e[1]));a.firstDay=r===n,a.lastDay=i===n,a.betweenDays=r<n&&i>n}return a}function c(e,t=!1,a=[],n=[],r=!1){const i=s(a,e),{firstDay:o,lastDay:d,betweenDays:u}=l(n,e);return{"q-past-day":!o&&!u&&!d&&!i&&!t&&!!e.past,"q-future-day":!o&&!u&&!d&&!i&&!t&&!!e.future,"q-outside":t,"q-current-day":!!e.current,"q-selected":i,"q-range-first":o,"q-range":u,"q-range-last":d,"q-range-hover":r&&(o||d||u),"q-disabled-day disabled":!0===e.disabled}}function m(e){return getStartOfWeek(e,t.weekdays,n.today)}function y(e){return getEndOfWeek(e,t.weekdays,n.today)}function p(){return{}}return{parsedStart:r,parsedEnd:i,dayFormatter:o,weekdayFormatter:d,ariaDateFormatter:u,arrayHasDate:s,checkDays:l,getRelativeClasses:c,startOfWeek:m,endOfWeek:y,dayStyleDefault:p}}function scrollTo(e,t){e instanceof Window?e.scrollTo({top:t,behavior:"instant"}):e.scrollTop=t}function getVerticalScrollPosition(e){return e instanceof Window?e.scrollY:e.scrollTop}function animVerticalScrollTo(i,o,d=500,u=performance.now(),s=getVerticalScrollPosition(i)){d<=0||s===o?scrollTo(i,o):requestAnimationFrame(e=>{const t=e-u,a=Math.min(t/d,1),n=e=>e<.5?2*e*e:(4-2*e)*e-1,r=s+(o-s)*n(a);scrollTo(i,r),a<1&&animVerticalScrollTo(i,o,d,u,s)})}function animHorizontalScrollTo(r,e,i=500){const o=r.scrollLeft,d=e-o;let u=null;function s(e){null===u&&(u=e);const t=e-u,a=Math.min(t/i,1),n=e=>e<.5?2*e*e:(4-2*e)*e-1;r.scrollLeft=o+d*n(a),t<i&&requestAnimationFrame(s)}requestAnimationFrame(s)}const useIntervalProps={view:{type:String,validator:e=>["day","week","month","month-interval"].includes(e),default:"day"},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},intervalClass:{type:Function,default:null},weekdayStyle:{type:Function,default:null},weekdayClass:{type:Function,default:null},showIntervalLabel:{type:Function,default:null},hour24Format:Boolean,timeClicksClamped:Boolean,dateHeader:{type:String,default:"stacked",validator:e=>["stacked","inline","inverted"].includes(e)}};function useInterval(i,{times:t,scrollArea:n,parsedStart:e,parsedEnd:a,maxDays:r,size:o,headerColumnRef:d}){const u=computed(()=>parseInt(String(i.intervalStart),10)),m=computed(()=>parseInt(String(i.intervalMinutes),10)),s=computed(()=>parseInt(String(i.intervalCount),10)),y=computed(()=>parseFloat(String(i.intervalHeight))),p=computed(()=>{let e=0;const t=Number(i.columnCount);return i.cellWidth?e=Number(i.cellWidth):o.width>0&&d.value&&(e=d.value.offsetWidth/(t>1?t:r.value)),e}),l=computed(()=>u.value*m.value),c=computed(()=>s.value*y.value),v=computed(()=>s.value*p.value),f=computed(()=>D(e.value)),h=computed(()=>k(a.value)),g=computed(()=>{return createDayList(e.value,a.value,t.today,i.weekdays,i.disabledBefore,i.disabledAfter,i.disabledWeekdays,i.disabledDays,r.value)}),T=computed(()=>{return g.value.map(e=>createIntervalList(e,u.value,m.value,s.value,t.now))});function D(e){return getStartOfWeek(e,i.weekdays,t.today)}function k(e){return getEndOfWeek(e,i.weekdays,t.today)}function w(e,t){return e&&e.length>0&&e.includes(getDateTime(t))}function _(e,t){const a={firstDay:!1,betweenDays:!1,lastDay:!1};if(e&&2===e.length){const n=getDayTimeIdentifier(t),r=getDayTimeIdentifier(parsed(e[0])),i=getDayTimeIdentifier(parsed(e[1]));a.firstDay=r===n,a.lastDay=i===n,a.betweenDays=r<n&&i>n}return a}function I(e,t=[],a=[]){const n=w(t,e),{firstDay:r,lastDay:i,betweenDays:o}=_(a,e);return{"q-selected":n,"q-range-first":!0===r,"q-range":!0===o,"q-range-last":!0===i,"q-disabled-interval disabled":!0===e.disabled}}function b(e,t,a){return[]}const N=computed(()=>{const a={timeZone:"UTC",hour12:!i.hour24Format,hour:"2-digit",minute:"2-digit"},n={timeZone:"UTC",hour12:!i.hour24Format,hour:"numeric",minute:"2-digit"},r={timeZone:"UTC",hour12:!i.hour24Format,hour:"numeric"};return createNativeLocaleFormatter(i.locale,(e,t)=>t?0===e.minute?r:n:a)}),M=computed(()=>{const e={timeZone:"UTC",dateStyle:"full",timeStyle:"short"};return createNativeLocaleFormatter(i.locale,()=>e)});function S(e){const t=T.value[0][0],a=t.hour===e.hour&&t.minute===e.minute;return!a&&0===e.minute}function E(e){}function A(e){return{}}function O(e,t,a=!1,n){let r=copyTimestamp(t);if(e.currentTarget){const i=e.currentTarget.getBoundingClientRect(),o=e,d=e,u=o.changedTouches||o.touches,s=(u&&u[0]?u[0]:d).clientY,l=(s-i.top)/y.value,c=Math.floor((a?Math.floor(l):l)*m.value);0!==c&&(r=addToDate(r,{minute:c})),n&&(r=updateRelative(r,n,!0))}return r}function H(e,t,a=!1,n){let r=copyTimestamp(t);const i=e.currentTarget.getBoundingClientRect(),o=e,d=e,u=o.changedTouches||o.touches,s=(u&&u[0]?u[0]:d).clientY,l=(s-i.top)/y.value,c=Math.floor((a?Math.floor(l):l)*m.value);return 0!==c&&(r=addToDate(r,{minute:c})),n&&(r=updateRelative(r,n,!0)),r}function x(e,t,a=!1,n){let r=copyTimestamp(t);if(e.currentTarget){const i=e.currentTarget.getBoundingClientRect(),o=e,d=e,u=o.changedTouches||o.touches,s=(u&&u[0]?u[0]:d).clientX,l=(s-i.left)/p.value,c=Math.floor((a?Math.floor(l):l)*m.value);0!==c&&(r=addToDate(r,{minute:c})),n&&(r=updateRelative(r,n,!0))}return r}function L(e,t){const a={timestamp:e,timeStartPos:F,timeDurationHeight:W};return void 0!==t&&(a.columnIndex=t),a}function q(e,t){const a={timestamp:copyTimestamp(e),timeStartPosX:R,timeDurationWidth:C};return void 0!==t&&(a.index=t),a}function Y(e,t=0){const a=F(e);return!(!1===a||!n.value)&&(animVerticalScrollTo(n.value,a,t),!0)}function U(e,t=0){const a=R(e);return!(!1===a||!n.value)&&(animHorizontalScrollTo(n.value,a,t),!0)}function W(e){return e/m.value*y.value}function C(e){return e/m.value*p.value}function B(e){return e*m.value/y.value}function P(e){return e*m.value/p.value}function F(e,t=!0){const a=parseTime(e);if(!1===a)return!1;const n=l.value,r=s.value*m.value,i=(a-n)/r;let o=i*c.value;return t&&(o<0&&(o=0),o>c.value)&&(o=c.value),o}function R(e,t=!0){const a=parseTime(e);if(!1===a)return!1;const n=l.value,r=s.value*m.value,i=(a-n)/r;let o=i*v.value;return t&&(o<0&&(o=0),o>v.value)&&(o=v.value),o}return{parsedIntervalStart:u,parsedIntervalMinutes:m,parsedIntervalCount:s,parsedIntervalHeight:y,parsedCellWidth:p,parsedStartMinute:l,bodyHeight:c,bodyWidth:v,parsedWeekStart:f,parsedWeekEnd:h,days:g,intervals:T,intervalFormatter:N,ariaDateTimeFormatter:M,arrayHasDateTime:w,checkIntervals:_,getIntervalClasses:I,getResourceClasses:b,showIntervalLabelDefault:S,showResourceLabelDefault:E,styleDefault:A,getTimestampAtEventInterval:O,getTimestampAtEvent:H,getTimestampAtEventX:x,getScopeForSlot:L,getScopeForSlotX:q,scrollToTime:Y,scrollToTimeX:U,timeDurationHeight:W,timeDurationWidth:C,heightToMinutes:B,widthToMinutes:P,timeStartPos:F,timeStartPosX:R}}const useColumnProps={columnCount:{type:[Number,String],default:0,validator:validateNumber},columnIndexStart:{type:[Number,String],default:0,validator:validateNumber}},useMaxDaysProps={maxDays:{type:Number,default:1}},useTimesProps={now:{type:String,validator:e=>""===e||validateTimestamp(e),default:""}};function useTimes(e){const t=reactive({now:parseTimestamp("0000-00-00 00:00"),today:parseTimestamp("0000-00-00")}),a=computed(()=>e.now?parseTimestamp(e.now):i());function n(){t.now&&t.today&&(t.now.current=t.today.current=!0,t.now.past=t.today.past=!1,t.now.future=t.today.future=!1)}function r(){const e=a.value||i();o(e,t.now),d(e,t.now),o(e,t.today)}function i(){return parseDate(new Date)}function o(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)}function d(e,t){e.time!==t.time&&(t.hour=e.hour,t.minute=e.minute,t.time=e.time)}return watch(a,()=>r()),{times:t,parsedNow:a,setCurrent:n,updateCurrent:r,getNow:i,updateDay:o,updateTime:d}}function useRenderValues(r,{parsedView:i,parsedValue:o,times:d}){const e=computed(()=>{const e=o.value;let t=r.maxDays,a=e,n=e;switch(i.value){case"month":a=getStartOfMonth(e),n=getEndOfMonth(e),t=daysInMonth(a.year,a.month);break;case"week":case"week-agenda":case"week-scheduler":a=getStartOfWeek(e,r.weekdays,d.today),n=getEndOfWeek(a,r.weekdays,d.today),t=r.weekdays.length;break;case"day":case"scheduler":case"agenda":n=moveRelativeDays(copyTimestamp(n),nextDay,t>1?t-1:t,r.weekdays),n=updateFormatted(n);break;case"month-interval":case"month-scheduler":case"month-agenda":a=getStartOfMonth(e),n=getEndOfMonth(e),n=updateFormatted(n),t=daysInMonth(a.year,a.month);break;case"resource":t=1,n=moveRelativeDays(copyTimestamp(n),nextDay,t,r.weekdays),n=updateFormatted(n);break}return{start:a,end:n,maxDays:t}});return{renderValues:e}}const toCamelCase=e=>e.replace(/(-\w)/g,e=>e[1].toUpperCase());function getMouseEventHandlers(t,e,a,n){const r={};for(const i in a){const o=a[i],d=toCamelCase("on-"+i);if(!e.value)return console.warn("$listeners has not been set up"),{};if(void 0!==e.value[d]){const u="on"+o.event.charAt(0).toUpperCase()+o.event.slice(1),s=e=>{return(void 0===o.button||"buttons"in e&&e.buttons>0&&e.button===o.button)&&(o.prevent&&e.preventDefault(),o.stop&&e.stopPropagation(),t(i,n(e,i))),o.result};u in r?Array.isArray(r[u])?r[u].push(s):r[u]=[r[u],s]:r[u]=s}}return r}function getDefaultMouseEventHandlers(e,t,a,n){return getMouseEventHandlers(e,t,getMouseEventName(a),n)}function getMouseEventName(e){return{["click"+e]:{event:"click"},["contextmenu"+e]:{event:"contextmenu",prevent:!0,result:!1},["mousedown"+e]:{event:"mousedown"},["mousemove"+e]:{event:"mousemove"},["mouseup"+e]:{event:"mouseup"},["mouseenter"+e]:{event:"mouseenter"},["mouseleave"+e]:{event:"mouseleave"},["touchstart"+e]:{event:"touchstart"},["touchmove"+e]:{event:"touchmove"},["touchend"+e]:{event:"touchend"}}}function getRawMouseEvents(e){return Object.keys(getMouseEventName(e))}function useMouseEvents(a,n){return{getMouseEventHandlers:(e,t)=>getMouseEventHandlers(a,n,e,t),getDefaultMouseEventHandlers:(e,t)=>getDefaultMouseEventHandlers(a,n,e,t),getMouseEventName:getMouseEventName,getRawMouseEvents:getRawMouseEvents}}const useMoveEmits=["moved"];function useMove(u,{parsedView:s,parsedValue:l,direction:c,maxDays:m,times:y,emittedValue:p,emit:v}){function e(a=1){if(0===a)p.value=today();else{let e=copyTimestamp(l.value);const n=getEndOfMonth(e),r=a>0,i=r?nextDay:prevDay,o=r?n.day:1;let t=r?a:-a;c.value=r?"next":"prev";const d=u.weekdays.length;while(--t>=0)switch(s.value){case"month":e.day=o,e=i(e),e=updateWeekday(e);while(!u.weekdays.includes(Number(e.weekday)))e=addToDate(e,{day:r?1:-1});break;case"week":case"week-agenda":case"week-scheduler":e=relativeDays(e,i,d,u.weekdays);break;case"day":case"scheduler":case"agenda":e=relativeDays(e,i,m.value,u.weekdays);break;case"month-interval":case"month-agenda":case"month-scheduler":e.day=o,e=i(e);break;case"resource":e=relativeDays(e,i,m.value,u.weekdays);break}e=updateWeekday(e),e=updateFormatted(e),e=updateDayOfYear(e),e=updateRelative(e,y.now),p.value=e.date,v("moved",e)}}return{move:e}}const listenerRE=/^on[A-Z]/;function useEmitListeners(e=getCurrentInstance()){return{emitListeners:computed(()=>{const t={};return e?.vnode?.props&&Object.keys(e.vnode.props).forEach(e=>{listenerRE.test(e)&&(t[e]=!0)}),t})}}function useFocusHelper(){const e={"aria-hidden":"true",class:"q-calendar__focus-helper"};return[h("span",e)]}function useButton(){function e({focusable:e,focusType:t},a,n){const r=e&&t.includes("date");return h("button",{...a,tabindex:r?0:-1},[n,r&&useFocusHelper()])}return{renderButton:e}}const useCellWidthProps={cellWidth:[Number,String]};function useCellWidth(e){const t=computed(()=>void 0!==e.cellWidth);return{isSticky:t}}const useCheckChangeEmits=["change"];function useCheckChange(n,{days:r,lastStart:i,lastEnd:o}){function e(){const e=r.value;if(0===e.length)return!1;const t=e[0].date,a=e[e.length-1].date;return(!i.value||!o.value||t!==i.value||a!==o.value)&&(i.value=t,o.value=a,n("change",{start:t,end:a,days:e}),!0)}return{checkChange:e}}function useEventUtils(){function e(e,t){return(Array.isArray(t)?t:[t]).includes(e.keyCode)}return{isKeyCode:e}}const isKeyCode=useEventUtils().isKeyCode,useNavigationProps={useNavigation:Boolean};function useNavigation(t,{rootRef:a,focusRef:n,focusValue:r,datesRef:i,parsedView:o,emittedValue:d,direction:u,times:s}){let e=!1;function l(){e||document&&(e=!0,document.addEventListener("keyup",v),document.addEventListener("keydown",p))}function c(){document&&(document.removeEventListener("keyup",v),document.removeEventListener("keydown",p),e=!1)}function m(e){if(e&&document){const t=document.activeElement;if(t!==document.body&&a.value?.contains(t))return!0}return!1}function y(){let t=0;const a=window.setInterval(()=>{const e=i.value[n.value];e&&(e.focus(),50!==++t)&&document.activeElement!==e||window.clearInterval(a)},250)}function p(e){m(e)&&isKeyCode(e,[33,34,35,36,37,38,39,40])&&(e.stopPropagation(),e.preventDefault())}function v(e){if(m(e)&&isKeyCode(e,[33,34,35,36,37,38,39,40])){const t={33:D,34:k,35:_,36:w,37:g,38:f,39:T,40:h};t[e.keyCode]?.()}}function f(){let e=copyTimestamp(r.value);if("month"===o.value){if(e=addToDate(e,{day:-7}),r.value.month!==e.month)return u.value="prev",void(d.value=e.date)}else e=addToDate(e,{minute:Number(t.intervalMinutes)});u.value="prev",n.value=e.date}function h(){let e=copyTimestamp(r.value);if("month"===o.value){if(e=addToDate(e,{day:7}),r.value.month!==e.month)return u.value="next",void(d.value=e.date)}else e=addToDate(e,{minute:Number(t.intervalMinutes)});u.value="next",n.value=e.date}function g(){let e=copyTimestamp(r.value);u.value="prev";do{e=addToDate(e,{day:-1})}while(!t.weekdays.includes(Number(e.weekday)));n.value=e.date}function T(){let e=copyTimestamp(r.value);u.value="next";do{e=addToDate(e,{day:1})}while(!t.weekdays.includes(Number(e.weekday)));n.value=e.date}function D(){let e=copyTimestamp(r.value);e="month"===o.value?addToDate(e,{month:-1}):addToDate(e,{day:-7}),u.value="prev",n.value=e.date}function k(){let e=copyTimestamp(r.value);e="month"===o.value?addToDate(e,{month:1}):addToDate(e,{day:7}),u.value="next",n.value=e.date}function w(){let e=copyTimestamp(r.value);e="month"===o.value?getStartOfMonth(e):getStartOfWeek(e,t.weekdays||[],s.today);while(!t.weekdays.includes(Number(e.weekday)))e=addToDate(e,{day:-1});n.value=e.date}function _(){let e=copyTimestamp(r.value);e="month"===o.value?getEndOfMonth(e):getEndOfWeek(e,t.weekdays||[],s.today);while(!t.weekdays.includes(Number(e.weekday)))e=addToDate(e,{day:-1});n.value=e.date}return onBeforeUnmount(()=>{c()}),watch(()=>t.useNavigation,e=>{(!0===e?l:c)()}),!0===t.useNavigation&&l(),{startNavigation:l,endNavigation:c,tryFocus:y}}const renderButton=useButton().renderButton;var QCalendarDay=defineComponent({name:"QCalendarDay",directives:{ResizeObserver:ResizeObserverDirective},props:{...useCommonProps,...useIntervalProps,...useColumnProps,...useMaxDaysProps,...useTimesProps,...useCellWidthProps,...useNavigationProps},emits:["update:model-value",...useCheckChangeEmits,...useMoveEmits,...getRawMouseEvents("-date"),...getRawMouseEvents("-interval"),...getRawMouseEvents("-head-intervals"),...getRawMouseEvents("-head-day"),...getRawMouseEvents("-time")],setup(y,{slots:p,emit:m,expose:x}){const e=ref(null),L=ref(null),q=ref(null),v=ref(y.modelValue||today()),t=ref(parsed(y.modelValue||today())),f=ref({}),a=ref(),n=ref(),o=ref("next"),d=ref(y.modelValue||today()),u=ref("0000-00-00"),s=ref(0),g=ref(y.modelValue||today()),l=reactive({width:0,height:0}),T=ref(""),D=ref(0),Y=ref(null),U=ref(null),r=(watch(()=>y.view,()=>{s.value=0}),computed(()=>{return"month"===y.view?"month-interval":y.view})),B=getCurrentInstance();if(null===B)throw new Error("current instance is null");const k=useEmitListeners(B).emitListeners,w=useCellWidth(y).isSticky,{times:_,setCurrent:P,updateCurrent:V}=useTimes(y),{parsedStart:i,parsedEnd:z,dayFormatter:Z,weekdayFormatter:$,ariaDateFormatter:X,dayStyleDefault:K,getRelativeClasses:I}=(V(),P(),useCommon(y,{startDate:d,endDate:u,times:_})),c=computed(()=>{return parseTimestamp(y.modelValue,_.now)||i.value||_.today}),j=(t.value=c.value,v.value=c.value.date,useRenderValues(y,{parsedView:r,parsedValue:c,times:_})).renderValues,{rootRef:b,scrollWidth:Q,__renderCalendar:G}=useCalendar(y,Pe,{scrollArea:e,pane:L}),{days:N,intervals:J,intervalFormatter:ee,ariaDateTimeFormatter:te,parsedCellWidth:M,getIntervalClasses:ae,showIntervalLabelDefault:ne,styleDefault:re,getTimestampAtEventInterval:ie,getTimestampAtEvent:oe,getScopeForSlot:S,scrollToTime:de,heightToMinutes:ue,timeDurationHeight:se,timeStartPos:le}=useInterval(y,{times:_,scrollArea:e,parsedStart:i,parsedEnd:z,maxDays:s,size:l,headerColumnRef:q}),E=useMove(y,{parsedView:r,parsedValue:c,direction:o,maxDays:s,times:_,emittedValue:g,emit:m}).move,A=useMouseEvents(m,k).getDefaultMouseEventHandlers,ce=useCheckChange(m,{days:N,lastStart:Y,lastEnd:U}).checkChange,O=useEventUtils().isKeyCode,me=useNavigation(y,{rootRef:b,focusRef:v,focusValue:t,datesRef:f,parsedView:r,emittedValue:g,direction:o,times:_}).tryFocus,W=computed(()=>{const e=parseInt(String(y.columnCount),10);return"day"===r.value&&e>1?e:"day"===r.value&&y.maxDays&&y.maxDays>1?y.maxDays:N.value.length}),ye=computed(()=>{return b.value?parseInt(window.getComputedStyle(b.value).getPropertyValue("--calendar-intervals-width"),10):0}),C=computed(()=>{if(b.value){const e=l.width||b.value.getBoundingClientRect().width;if(e&&ye.value&&W.value)return(e-Q.value-ye.value)/W.value+"px"}return 100/W.value+"%"});function pe(){g.value=today()}function ve(e=1){E(e)}function fe(e=1){E(-e)}function he({width:e,height:t}){l.width=e,l.height=t}function F(e){return e.date===g.value}function ge(){return h("div",{roll:"presentation",class:{"q-calendar-day__head":!0,"q-calendar__sticky":!0===w.value},style:{marginRight:Q.value+"px"}},[Te(),De()])}function Te(){const e=p["head-intervals"],t={timestamps:N.value,days:N.value,date:y.modelValue};return h("div",{class:{"q-calendar-day__head--intervals":!0,"q-calendar__sticky":!0===w.value},...A("-head-intervals",e=>{return{scope:t,event:e}})},[e&&e({scope:t})])}function De(){return h("div",{ref:q,class:{"q-calendar-day__head--days__column":!0}},[ke(),we()])}function ke(){return h("div",{class:{"q-calendar-day__head--days__weekdays":!0}},[..._e()])}function we(){const e=p["head-days-events"],t=parseInt(String(y.columnCount),10);return nextTick(()=>{if(n.value&&0===t&&window)try{const e=window.getComputedStyle(n.value);a.value&&a.value.parentElement&&(a.value.parentElement.style.height=e.height,a.value.style.height=e.height)}catch{}}),h("div",{class:{"q-calendar-day__head--days__event":!0}},[e&&h("div",{ref:a,style:{position:"absolute",left:0,top:0,right:0,overflow:"hidden",zIndex:1}},[e({scope:{days:N.value,ref:n}})]),...Ie()])}function _e(){const e=parseInt(String(y.columnCount),10),a=parseInt(String(y.columnIndexStart),10);return 1===N.value.length&&e>0?Array.apply(null,new Array(e)).map((e,t)=>t+a).map(e=>be(N.value[0],e)):N.value.map(e=>be(e,0))}function Ie(){const e=parseInt(String(y.columnCount),10),a=parseInt(String(y.columnIndexStart),10);return 1===N.value.length&&e>0?Array.apply(null,new Array(e)).map((e,t)=>t+a).map(e=>Me(N.value[0],e)).filter(e=>void 0!==e):N.value.map(e=>Me(e,0)).filter(e=>void 0!==e)}function be(t,e){const a=p["head-day"],n=p["head-date"],r=!0!==y.noActiveDate&&F(t),i=S(t,e),o=(i.activeDate=r,i.droppable=T.value===t.date,i.disabled=!!y.disabledWeekdays&&y.disabledWeekdays.includes(Number(t.weekday)),!0===w.value?y.cellWidth:C.value),d=y.weekdayStyle||K,u={width:o,maxWidth:o,minWidth:o,...d({scope:i})},s=(!0===w.value&&(u.minWidth=o),"function"===typeof y.weekdayClass?y.weekdayClass({scope:i}):{}),l=!0===y.focusable&&y.focusType.includes("weekday"),c=t.date+(void 0!==e?"-"+e:""),m={key:c,ref:e=>{f.value[c]=e},tabindex:!0===l?0:-1,class:{"q-calendar-day__head--day":!0,...s,...I(t),"q-active-date":r,"q-calendar__hoverable":!0===y.hoverable,"q-calendar__focusable":!0===l},style:u,onFocus:()=>{!0===l&&(v.value=c)},onKeydown:e=>{!0!==t.disabled&&O(e,[13,32])&&(e.stopPropagation(),e.preventDefault())},onKeyup:e=>{!0!==t.disabled&&O(e,[13,32])&&(g.value=t.date)},...A("-head-day",e=>{return{scope:i,event:e}}),onDragenter:e=>{void 0!==y.dragEnterFunc&&"function"===typeof y.dragEnterFunc&&(!0===y.dragEnterFunc(e,"head-day",{scope:i})?T.value=t.date:T.value="")},onDragover:e=>{void 0!==y.dragOverFunc&&"function"===typeof y.dragOverFunc&&(!0===y.dragOverFunc(e,"head-day",{scope:i})?T.value=t.date:T.value="")},onDragleave:e=>{void 0!==y.dragLeaveFunc&&"function"===typeof y.dragLeaveFunc&&(!0===y.dragLeaveFunc(e,"head-day",{scope:i})?T.value=t.date:T.value="")},onDrop:e=>{void 0!==y.dropFunc&&"function"===typeof y.dropFunc&&(!0===y.dropFunc(e,"head-day",{scope:i})?T.value=t.date:T.value="")}};return h("div",m,[void 0!==a&&a({scope:i}),void 0===a&&Ae(t,e),void 0===a&&Ne(t),void 0===a&&n&&n({scope:i}),void 0===a&&Oe(t,e),useFocusHelper()])}function Ne(e){return"stacked"===y.dateHeader?[!0!==y.noDefaultHeaderText?R(e):[],!0!==y.noDefaultHeaderBtn?H(e):[]].filter(e=>void 0!==e):"inline"===y.dateHeader?("left"===y.weekdayAlign&&"right"===y.dateAlign||"right"===y.weekdayAlign&&y.dateAlign,h("div",{class:"q-calendar__header--inline"},[!0!==y.noDefaultHeaderText&&R(e),!0!==y.noDefaultHeaderBtn&&H(e)])):"inverted"===y.dateHeader?("left"===y.weekdayAlign&&"right"===y.dateAlign||"right"===y.weekdayAlign&&y.dateAlign,h("div",{class:"q-calendar__header--inline"},[!0!==y.noDefaultHeaderBtn&&H(e),!0!==y.noDefaultHeaderText&&R(e)])):void 0}function Me(e,t){const a=p["head-day-event"],n=!0!==y.noActiveDate&&F(e),r=S(e,t),i=(r.activeDate=n,r.disabled=!!y.disabledWeekdays&&y.disabledWeekdays.includes(Number(e.weekday)),!0===w.value?convertToUnit(M.value):C.value),o={width:i,maxWidth:i,minWidth:i};return!0===w.value&&(o.minWidth=i),h("div",{key:"event-"+e.date+(void 0!==t?"-"+t:""),class:{"q-calendar-day__head--day__event":!0,...I(e),"q-active-date":n},style:o},[a&&a({scope:r})])}function R(e){const t=p["head-weekday-label"],a=!0===y.shortWeekdayLabel,n=S(e,0),r=(n.shortWeekdayLabel=y.shortWeekdayLabel,n.disabled=!!y.disabledWeekdays&&y.disabledWeekdays.includes(Number(e.weekday)),{class:{"q-calendar-day__head--weekday":!0,["q-calendar__"+y.weekdayAlign]:!0,"q-calendar__ellipsis":!0}});return h("div",r,t&&t({scope:n})||Se(e,a))}function Se(e,t){const a=$.value(e,t||y.weekdayBreakpoints[0]>0&&M.value<=y.weekdayBreakpoints[0]);return h("span",{class:"q-calendar-day__head--weekday-label q-calendar__ellipsis"},y.weekdayBreakpoints[1]>0&&M.value<=y.weekdayBreakpoints[1]?minCharWidth(a,Number(y.minWeekdayLabel)):a)}function H(e){const t={class:{"q-calendar-day__head--date":!0,["q-calendar__"+y.dateAlign]:!0}};return h("div",t,Ee(e))}function Ee(a){const e=!0!==y.noActiveDate&&F(a),t=Z.value(a,!1),n=p["head-day-label"],r=p["head-day-button"],i={dayLabel:t,timestamp:a,activeDate:e,disabled:!!y.disabledWeekdays&&y.disabledWeekdays.includes(Number(a.weekday))},o={class:{"q-calendar-day__head--day__label":!0,"q-calendar__button":!0,"q-calendar__button--round":"round"===y.dateType,"q-calendar__button--rounded":"rounded"===y.dateType,"q-calendar__button--bordered":!0===a.current,"q-calendar__focusable":!0},disabled:a.disabled,onKeydown:e=>{!0!==a.disabled&&O(e,[13,32])&&(e.stopPropagation(),e.preventDefault())},onKeyup:e=>{!0!==a.disabled&&O(e,[13,32])&&(g.value=a.date,void 0!==k.value.onClickDate)&&m("click-date",{scope:i})},...A("-date",(e,t)=>{return"click-date"!==t&&"contextmenu-date"!==t||(g.value=a.date,"click-date"===t&&e.preventDefault()),{scope:i,event:e}})};return!0!==y.noAria&&(o.ariaLabel=X.value(a,!1)),r?r({scope:i}):renderButton(y,o,n?n({scope:i}):t)}function Ae(e,t){const a=p["column-header-before"];if(a){const n={timestamp:e,columnIndex:t};return h("div",{class:"q-calendar-day__column-header--before"},[a({scope:n})])}}function Oe(e,t){const a=p["column-header-after"];if(a){const n={timestamp:e,columnIndex:t};return h("div",{class:"q-calendar-day__column-header--after"},[a({scope:n})])}}function We(){return h("div",{class:"q-calendar-day__body"},[Ce()])}function Ce(){return!0===w.value?h("div",{ref:e,class:{"q-calendar-day__scroll-area":!0,"q-calendar__scroll":!0}},[!0!==w.value&&Ye(),Re()]):!0===y.noScroll?Fe():h("div",{ref:e,class:{"q-calendar-day__scroll-area":!0,"q-calendar__scroll":!0}},[Fe()])}function Fe(){return h("div",{ref:L,class:"q-calendar-day__pane"},[Ye(),Re()])}function Re(){const e=p["day-container"];return h("div",{class:"q-calendar-day__day-container"},[!0===w.value&&!0!==y.noHeader&&ge(),h("div",{style:{display:"flex",flexDirection:"row"}},[!0===w.value&&Ye(),...He()]),e&&e({scope:{days:N.value}})])}function He(){const e=parseInt(String(y.columnCount),10),a=parseInt(String(y.columnIndexStart),10);return 1===N.value.length&&e>0?Array.apply(null,new Array(e)).map((e,t)=>t+a).map(e=>xe(N.value[0],0,e)):N.value.map((e,t)=>xe(e,t,0))}function xe(e,t,a){const n=p["day-body"],r=S(e,a),i=!0===w.value?y.cellWidth:C.value,o={width:i,maxWidth:i,minWidth:i};return!0===w.value&&(o.minWidth=i),h("div",{key:e.date+(void 0!==a?":"+a:""),class:{"q-calendar-day__day":!0,...I(e)},style:o},[...Le(t,a),n&&n({scope:r})])}function Le(e,t){return J.value[e].map(e=>qe(e,t))}function qe(a,n){const e=convertToUnit(y.intervalHeight),t=y.intervalStyle||re,r=p["day-interval"],i=S(a,n),o=(i.droppable=D.value===getDayTimeIdentifier(a),"function"===typeof y.intervalClass?y.intervalClass({scope:i}):{}),d=!0===y.focusable&&y.focusType.includes("interval"),u=getDateTime(a),s={height:e,...t({scope:i})},l={key:u,tabindex:!0===d?0:-1,class:{"q-calendar-day__day-interval":0===a.minute,"q-calendar-day__day-interval--section":0!==a.minute,...o,...ae(a,Array.from(y.selectedDates),y.selectedStartEndDates),"q-calendar__hoverable":!0===y.hoverable,"q-calendar__focusable":!0===d},style:s,onDragenter:e=>{void 0!==y.dragEnterFunc&&"function"===typeof y.dragEnterFunc&&(!0===y.dragEnterFunc(e,"interval",{scope:i})?D.value=getDayTimeIdentifier(a):D.value=0)},onDragover:e=>{void 0!==y.dragOverFunc&&"function"===typeof y.dragOverFunc&&(!0===y.dragOverFunc(e,"interval",{scope:i})?D.value=getDayTimeIdentifier(a):D.value=0)},onDragleave:e=>{void 0!==y.dragLeaveFunc&&"function"===typeof y.dragLeaveFunc&&(!0===y.dragLeaveFunc(e,"interval",{scope:i})?D.value=getDayTimeIdentifier(a):D.value=0)},onDrop:e=>{void 0!==y.dropFunc&&"function"===typeof y.dropFunc&&(!0===y.dropFunc(e,"interval",{scope:i})?D.value=getDayTimeIdentifier(a):D.value=0)},onKeydown:e=>{O(e,[13,32])&&(e.stopPropagation(),e.preventDefault())},onKeyup:e=>{if(O(e,[13,32])){const t=S(a,n);g.value=t.timestamp.date,void 0!==k.value.onClickTime&&m("click-time",{scope:t,event:e})}},...A("-time",e=>{const t=S(ie(e,a,y.timeClicksClamped,_.now),n);return{scope:t,event:e}})},c=(!0!==y.noAria&&(l.ariaLabel=te.value(a,!1)),r?r({scope:i}):void 0);return h("div",l,[c,useFocusHelper()])}function Ye(){const e={ariaHidden:"true",class:{"q-calendar-day__intervals-column":!0,"q-calendar__ellipsis":!0,"q-calendar__sticky":!0===w.value},...A("-interval",e=>{const t=oe(e,i.value,y.timeClicksClamped,_.now);return{scope:{timestamp:t},event:e}})};return h("div",e,Ue())}function Ue(){return J.value[0].map(e=>Be(e))}function Be(e){const t=p["interval-label"],a=convertToUnit(y.intervalHeight),n=y.shortIntervalLabel??!1,r=y.showIntervalLabel||ne,i=r(e),o=i?ee.value(e,n):void 0;return h("div",{key:e.time,class:{"q-calendar-day__interval":0===e.minute,"q-calendar-day__interval--section":0!==e.minute},style:{height:a}},[h("div",{class:"q-calendar-day__interval--text q-calendar__overflow-wrap"},[t?t({scope:{timestamp:e,label:o}}):o])])}function Pe(){const{start:e,end:t,maxDays:a}=j.value,n=(d.value===e.date&&u.value===t.date&&s.value===a||(d.value=e.date,u.value=t.date,s.value=a),l.width>0),r=withDirectives(h("div",{key:d.value,class:"q-calendar-day"},[!0===n&&!0!==w.value&&!0!==y.noHeader&&ge(),n&&We()]),[[ResizeObserverDirective,he]]);if(!0!==y.animated)return r;{const i="q-calendar--"+("prev"===o.value?y.transitionPrev:y.transitionNext);return h(Transition,{name:i,appear:!0},()=>r)}}return watch([N],ce,{deep:!0,immediate:!0}),watch(()=>y.modelValue,(e,t)=>{if(g.value!==y.modelValue){if(!0===y.animated){const a=getDayIdentifier(parsed(e)),n=getDayIdentifier(parsed(t));o.value=a>=n?"next":"prev"}g.value=e}v.value=e}),watch(g,(e,t)=>{if(g.value!==y.modelValue){if(!0===y.animated){const a=getDayIdentifier(parsed(e)),n=getDayIdentifier(parsed(t));o.value=a>=n?"next":"prev"}m("update:model-value",e)}}),watch(v,e=>{e&&(t.value=parseTimestamp(e))}),watch(t,()=>{v.value&&f.value[v.value]?f.value[v.value].focus():me()}),watch(()=>y.maxDays,e=>{s.value=e}),onBeforeUpdate(()=>{f.value={},a.value=void 0,n.value=void 0}),onMounted(()=>{}),x({prev:fe,next:ve,move:E,moveToToday:pe,updateCurrent:V,timeStartPos:le,timeDurationHeight:se,heightToMinutes:ue,scrollToTime:de}),()=>G()}});const version="4.1.1";var Plugin={version:version,QCalendarDay:QCalendarDay,...Timestamp$1,...helpers$1,install(e){e.component(String(QCalendarDay.name),QCalendarDay)}};export{DAYS_IN_MONTH,DAYS_IN_MONTH_LEAP,DAYS_IN_MONTH_MAX,DAYS_IN_MONTH_MIN,DAY_MIN,FIRST_HOUR,MONTH_MAX,MONTH_MIN,PARSE_DATE,PARSE_DATETIME,PARSE_TIME,QCalendarDay,TIME_CONSTANTS,addToDate,compareDate,compareDateTime,compareTime,compareTimestamps,convertToUnit,copyTimestamp,createDayList,createIntervalList,createNativeLocaleFormatter,daysBetween,daysInMonth,Plugin as default,diffTimestamp,findWeekday,getDate,getDateTime,getDayIdentifier,getDayOfYear,getDayTimeIdentifier,getEndOfMonth,getEndOfWeek,getMonthFormatter,getMonthNames,getStartOfMonth,getStartOfWeek,getTime,getTimeIdentifier,getWeekday,getWeekdayFormatter,getWeekdayNames,getWorkWeek,indexOf,isBetweenDates,isLeapYear,isOverlappingDates,isToday,makeDate,makeDateTime,maxTimestamp,minCharWidth,minTimestamp,moveRelativeDays,nextDay,padNumber,parseDate,parseTime,parseTimestamp,parsed,prevDay,relativeDays,today,updateDayOfYear,updateDisabled,updateFormatted,updateMinutes,updateRelative,updateWeekday,updateWorkWeek,validateNumber,validateTimestamp,version,weeksBetween}; |
/*! | ||
* @quasar/quasar-ui-qcalendar v4.1.0 | ||
* @quasar/quasar-ui-qcalendar v4.1.1 | ||
* (c) 2025 Jeff Galbraith <jeff@quasar.dev> | ||
* Released under the MIT License. | ||
*/ | ||
(function(e,t){"object"===typeof exports&&"undefined"!==typeof module?module.exports=t(require("vue")):"function"===typeof define&&define.amd?define(["vue"],t):(e="undefined"!==typeof globalThis?globalThis:e||self,e.QCalendarDay=t(e.Vue))})(this,function(Ve){const i=/^(\d{4})-(\d{1,2})(-(\d{1,2}))?([^\d]+(\d{1,2}))?(:(\d{1,2}))?(:(\d{1,2}))?(.(\d{1,3}))?$/,y=/^(\d{4})-(\d{1,2})(-(\d{1,2}))?/,f=/(\d\d?)(:(\d\d?)|)(:(\d\d?)|)/,k=[0,31,28,31,30,31,30,31,31,30,31,30,31],b=[0,31,29,31,30,31,30,31,31,30,31,30,31],r={MILLISECONDS_IN:{SECOND:1e3,MINUTE:6e4,HOUR:36e5,DAY:864e5,WEEK:6048e5},SECONDS_IN:{MINUTE:60,HOUR:3600,DAY:86400,WEEK:604800},MINUTES_IN:{MINUTE:1,HOUR:60,DAY:1440,WEEK:10080},HOURS_IN:{DAY:24,WEEK:168},DAYS_IN:{WEEK:7}},T=28,I=31,N=12,C=1,A=1,F=0;function t(e){return"string"===typeof e&&i.test(e)}function Pe(e){if("string"!==typeof e)return null;const t=i.exec(e);if(!t||!t[1]||!t[2])return null;const a=parseInt(t[1],10),n=parseInt(t[2],10),r=parseInt(t[4]||"1",10),o=parseInt(t[6]||"0",10),u=parseInt(t[8]||"0",10);return{date:e,time:o.toString().padStart(2,"0")+":"+u.toString().padStart(2,"0"),year:a,month:n,day:r,hour:o,minute:u,hasDay:!!t[4],hasTime:!0,past:!1,current:!1,future:!1,disabled:!1,weekday:0,doy:0,workweek:0}}function M(e,t=!1){if(!(e instanceof Date))return null;const a=t?"UTC":"";return w({date:o(e[`get${a}FullYear`](),4)+"-"+o(e[`get${a}Month`]()+1,2)+"-"+o(e[`get${a}Date`](),2),time:o(e[`get${a}Hours`]()||0,2)+":"+o(e[`get${a}Minutes`]()||0,2),year:e[`get${a}FullYear`](),month:e[`get${a}Month`]()+1,day:e[`get${a}Date`](),hour:e[`get${a}Hours`](),minute:e[`get${a}Minutes`](),weekday:0,doy:0,workweek:0,hasDay:!0,hasTime:!0,past:!1,current:!1,future:!1,disabled:!1})}function o(e,t){let a=String(e);while(a.length<t)a="0"+a;return a}function E(e){return e%4===0&&e%100!==0||e%400===0}function l(e,t){return(E(e)?b:k)[t]}function h(e){const t=new Date(e.year,e.month-1,e.day+1);return w(oe({...e,year:t.getFullYear(),month:t.getMonth()+1,day:t.getDate()}))}function p(e){const t=new Date(e.year,e.month-1,e.day-1);return w(oe({...e,year:t.getFullYear(),month:t.getMonth()+1,day:t.getDate()}))}function Ze(){const e=new Date,t=e.getMonth()+1,a=e.getDate(),n=e.getFullYear();return[n,o(t,2),o(a,2)].join("-")}function W(e){return e===Ze()}function P(e,t,a){let n=K(e);if(t){if(1===n.day||0===n.weekday)while(!t.includes(Number(n.weekday)))n=h(n);n=v(n,t[0],p),n=w(n),a&&(n=$(n,a,n.hasTime))}return n}function Z(e,t,a){let n=K(e);if(t&&Array.isArray(t)){const r=l(n.year,n.month);if(r===n.day||n.weekday===t[t.length-1])while(!t.includes(Number(n.weekday)))n=p(n);n=v(n,t[t.length-1],h),n=w(n),a&&(n=$(n,a,n.hasTime))}return n}function _(e){let t=K(e);return t.day=A,t=w(t),t}function S(e){let t=K(e);return t.day=l(t.year,t.month),t=w(t),t}function z(e){const t=Object.prototype.toString.call(e);switch(t){case"[object Number]":return e;case"[object String]":{const a=f.exec(e);return a?60*parseInt(a[1],10)+parseInt(a[3]||"0",10):!1}case"[object Object]":return"object"!==typeof e||"number"!==typeof e.hour||"number"!==typeof e.minute?!1:"object"===typeof e&&"hour"in e&&"minute"in e&&60*e.hour+e.minute}return!1}function q(e,t){return!(!e||!t)&&e.year===t.year&&e.month===t.month&&e.day===t.day&&e.hour===t.hour&&e.minute===t.minute}function O(e,t){return s(e)===s(t)}function x(e,t){return c(e)===c(t)}function H(e,t){return je(e)===je(t)}function ze(e,t=null){let a=Pe(e);return a?(a=w(a),t&&(a=$(a,t,a.hasTime)),a):null}function $e(e){return 1e8*(e.year??0)+1e6*(e.month??0)+1e4*(e.day??0)}function d(e){return 100*(e.hour??0)+(e.minute??0)}function Ke(e){return $e(e)+d(e)}function U(e,t,a=!1){const n=Date.UTC(e.year??0,(e.month??1)-1,e.day??1,e.hour??0,e.minute??0),r=Date.UTC(t.year??0,(t.month??1)-1,t.day??1,t.hour??0,t.minute??0);return!0===a&&r<n?0:r-n}function $(e,t,a=!1){let n=K(e),r=$e(t),o=$e(n),u=r===o;return n.hasTime&&a&&u&&(r=d(t),o=d(n),u=r===o),n.past=o<r,n.current=u,n.future=o>r,n.currentWeekday=n.weekday===t.weekday,n}function R(e,t,a=null){let n=K(e);return n.hasTime=!0,n.hour=Math.floor(t/r.MINUTES_IN.HOUR),n.minute=t%r.MINUTES_IN.HOUR,n.time=c(n),a&&(n=$(n,a,!0)),n}function g(e){let t=K(e);return t.weekday=u(t),t}function L(e){let t=K(e);return t.doy=a(t)||0,t}function B(e){let t=K(e);return t.workweek=n(t),t}function Y(e,t,a,n,r){let o=K(e);const u=$e(o);if(void 0!==t){const s=Pe(t);if(s){const c=$e(s);u<=c&&(o.disabled=!0)}}if(!0!==o.disabled&&void 0!==a){const v=Pe(a);if(v){const m=$e(v);u>=m&&(o.disabled=!0)}}if(!0!==o.disabled&&Array.isArray(n)&&n.length>0)for(var i in n)if(n[i]===o.weekday){o.disabled=!0;break}if(!0!==o.disabled&&Array.isArray(r)&&r.length>0)for(var l in r)if(Array.isArray(r[l])&&2===r[l].length&&r[l][0]&&r[l][1]){const y=Pe(r[l][0]),f=Pe(r[l][1]);if(y&&f&&ne(o,y,f)){o.disabled=!0;break}}else{const h=r[l];if(Array.isArray(h))for(var d of h){const p=ze(d);if(p){const g=$e(p);if(g===u){o.disabled=!0;break}}}else if(h){const w=ze(h);if(w){const D=$e(w);D===u&&(o.disabled=!0)}}}return o}function w(e){let t=K(e);return t.hasTime=!0,t.time=c(t),t.date=s(t),t.weekday=u(t),t.doy=a(t)||0,t.workweek=n(t),t}function a(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 n(e){let t=K(e);if(0===t.year){const r=ze(Ze());r&&(t=r)}const a=new Date(Date.UTC(t.year,t.month-1,t.day)),n=4;a.setUTCDate(a.getUTCDate()-(a.getUTCDay()+6)%7+n),a.setUTCDate(a.getUTCDate()+n-(a.getUTCDay()||7));e=new Date(Date.UTC(a.getUTCFullYear(),0,1)),e=Math.ceil(((a.valueOf()-e.valueOf())/864e5+1)/7);return e}function u(e){let t=e.weekday;if(e.hasDay){const a=Math.floor,n=e.day,r=(e.month+9)%N+1,o=a(e.year/100),u=e.year%100-(e.month<=2?1:0);t=((n+a(2.6*r-.2)-2*o+u+a(u/4)+a(o/4))%7+7)%7}return t??0}function K(e){return{...e}}function s(e){let t=o(e.year,4)+"-"+o(e.month,2);return e.hasDay&&(t+="-"+o(e.day,2)),t}function c(e){return e.hasTime?o(e.hour,2)+":"+o(e.minute,2):""}function je(e){return s(e)+" "+(e.hasTime?c(e):"00:00")}function V(e,t=h,a=1,n=[0,1,2,3,4,5,6]){const r=K(e);return D(r,t,a,n)}function D(e,t=h,a=1,n=[0,1,2,3,4,5,6]){let r=K(e);n.includes(Number(r.weekday))||0!==r.weekday||t!==h||++a;while(--a>=0)r=t(r),n.length<7&&!n.includes(Number(r.weekday))&&++a;return r}function v(e,t,a=h,n=6){let r=K(e);while(r.weekday!==t&&--n>=0)r=a(r);return r}function Q(e,t,a,n=[0,1,2,3,4,5,6],r=void 0,o=void 0,u=[],i=[],l=42,d=0){const s=$e(e),c=$e(t),v=[];let m=K(e),y=0,f=y===c;if(!(c<s))while((!f||v.length<d)&&v.length<l){if(y=$e(m),f=f||y>c&&v.length>=d,f)break;if(n.includes(Number(m.weekday))){let e=K(m);e=w(e),e=$(e,a),e=Y(e,r,o,u,i),v.push(e)}m=D(m,h)}return v}function G(t,a,n,r,o){const u=[];for(let e=0;e<r;++e){const i=(a+e)*n,l=K(t);u.push(R(l,i,o))}return u}function j(n,r){const e=()=>"";return"undefined"===typeof Intl||"undefined"===typeof Intl.DateTimeFormat?e:(t,e)=>{try{const a=new Intl.DateTimeFormat(n||void 0,r(t,e));return a.format(ee(t))}catch(e){return console.error(`Intl.DateTimeFormat: ${e.message} -> `+je(t)),""}}}function J(e,t=!0){return t?new Date(Date.UTC(e.year,e.month-1,e.day,0,0)):new Date(e.year,e.month-1,e.day,0,0)}function ee(e,t=!0){return t?new Date(Date.UTC(e.year,e.month-1,e.day,e.hour,e.minute)):new Date(e.year,e.month-1,e.day,e.hour,e.minute)}function e(e){return isFinite(Number(e))}function te(e,t=!1){const a=!0===t?Ke:$e;return e.reduce((e,t)=>{return Math.max(a(e),a(t))===a(e)?e:t})}function ae(e,t=!1){const a=!0===t?Ke:$e;return e.reduce((e,t)=>{return Math.min(a(e),a(t))===a(e)?e:t})}function ne(e,t,a,n=!1){const r=$e(e)+(!0===n?d(e):0),o=$e(t)+(!0===n?d(t):0),u=$e(a)+(!0===n?d(a):0);return r>=o&&r<=u}function re(e,t,a,n){const r=$e(e),o=$e(t),u=$e(a),i=$e(n);return r>=u&&r<=i||o>=u&&o<=i||u>=r&&o>=i}function X(e,t){const a=K(e);return t.year&&(a.year+=t.year),t.month&&(a.month+=t.month),t.day&&(a.day+=t.day),t.hour&&(a.hour+=t.hour),t.minute&&(a.minute+=t.minute),w(oe(a))}function oe(e){const t=new Date(e.year,e.month-1,e.day,e.hour,e.minute);return{...e,year:t.getFullYear(),month:t.getMonth()+1,day:t.getDate(),hour:t.getHours(),minute:t.getMinutes()}}function ue(e,t){const a=U(e,t,!0);return Math.floor(a/r.MILLISECONDS_IN.DAY)}function ie(e,t){let a=K(e),n=K(t);return a=v(a,0),n=v(n,6),Math.ceil(ue(a,n)/r.DAYS_IN.WEEK)}const le={Sun:new Date("2020-01-05T00:00:00.000Z"),Mon:new Date("2020-01-06T00:00:00.000Z"),Tue:new Date("2020-01-07T00:00:00.000Z"),Wed:new Date("2020-01-08T00:00:00.000Z"),Thu:new Date("2020-01-09T00:00:00.000Z"),Fri:new Date("2020-01-10T00:00:00.000Z"),Sat:new Date("2020-01-11T00:00:00.000Z")};function de(){const e=()=>"",r={long:{timeZone:"UTC",weekday:"long"},short:{timeZone:"UTC",weekday:"short"},narrow:{timeZone:"UTC",weekday:"narrow"}};return"undefined"===typeof Intl||"undefined"===typeof Intl.DateTimeFormat?e:t;function t(t,e,a){try{const n=new Intl.DateTimeFormat(a||void 0,r[e]||r["long"]);return n.format(le[t])}catch(e){return e instanceof Error&&console.error(`Intl.DateTimeFormat: ${e.message} -> day of week: `+t),""}}}function se(t,a){const e=Object.keys(le),n=de();return e.map(e=>String(n(e,t,a)))}function ce(){const e=()=>"",o={long:{timeZone:"UTC",month:"long"},short:{timeZone:"UTC",month:"short"},narrow:{timeZone:"UTC",month:"narrow"}};return"undefined"===typeof Intl||"undefined"===typeof Intl.DateTimeFormat?e:t;function t(t,e,a){try{const n=new Intl.DateTimeFormat(a||void 0,o[e]||o["long"]),r=new Date;return r.setDate(1),r.setMonth(t),n.format(r)}catch(e){return e instanceof Error&&console.error(`Intl.DateTimeFormat: ${e.message} -> month: `+t),""}}}function ve(t,a){const n=ce();return[...Array(12).keys()].map(e=>n(e,t,a))}var me={PARSE_DATETIME:i,PARSE_DATE:y,PARSE_TIME:f,DAYS_IN_MONTH:k,DAYS_IN_MONTH_LEAP:b,DAYS_IN_MONTH_MIN:T,DAYS_IN_MONTH_MAX:I,MONTH_MAX:N,MONTH_MIN:C,DAY_MIN:A,TIME_CONSTANTS:r,FIRST_HOUR:F,today:Ze,getStartOfWeek:P,getEndOfWeek:Z,getStartOfMonth:_,getEndOfMonth:S,parseTime:z,validateTimestamp:t,parsed:Pe,parseTimestamp:ze,parseDate:M,getDayIdentifier:$e,getTimeIdentifier:d,getDayTimeIdentifier:Ke,diffTimestamp:U,updateRelative:$,updateMinutes:R,updateWeekday:g,updateDayOfYear:L,updateWorkWeek:B,updateDisabled:Y,updateFormatted:w,getDayOfYear:a,getWorkWeek:n,getWeekday:u,isLeapYear:E,daysInMonth:l,copyTimestamp:K,padNumber:o,getDate:s,getTime:c,getDateTime:je,nextDay:h,prevDay:p,relativeDays:D,findWeekday:v,createDayList:Q,createIntervalList:G,createNativeLocaleFormatter:j,makeDate:J,makeDateTime:ee,validateNumber:e,isBetweenDates:ne,isOverlappingDates:re,daysBetween:ue,weeksBetween:ie,addToDate:X,compareTimestamps:q,compareDate:O,compareTime:x,compareDateTime:H,getWeekdayFormatter:de,getWeekdayNames:se,getMonthFormatter:ce,getMonthNames:ve},me=Object.freeze({__proto__:null,DAYS_IN_MONTH:k,DAYS_IN_MONTH_LEAP:b,DAYS_IN_MONTH_MAX:I,DAYS_IN_MONTH_MIN:T,DAY_MIN:A,FIRST_HOUR:F,MONTH_MAX:N,MONTH_MIN:C,PARSE_DATE:y,PARSE_DATETIME:i,PARSE_TIME:f,TIME_CONSTANTS:r,addToDate:X,compareDate:O,compareDateTime:H,compareTime:x,compareTimestamps:q,copyTimestamp:K,createDayList:Q,createIntervalList:G,createNativeLocaleFormatter:j,daysBetween:ue,daysInMonth:l,default:me,diffTimestamp:U,findWeekday:v,getDate:s,getDateTime:je,getDayIdentifier:$e,getDayOfYear:a,getDayTimeIdentifier:Ke,getEndOfMonth:S,getEndOfWeek:Z,getMonthFormatter:ce,getMonthNames:ve,getStartOfMonth:_,getStartOfWeek:P,getTime:c,getTimeIdentifier:d,getWeekday:u,getWeekdayFormatter:de,getWeekdayNames:se,getWorkWeek:n,isBetweenDates:ne,isLeapYear:E,isOverlappingDates:re,isToday:W,makeDate:J,makeDateTime:ee,maxTimestamp:te,minTimestamp:ae,moveRelativeDays:V,nextDay:h,padNumber:o,parseDate:M,parseTime:z,parseTimestamp:ze,parsed:Pe,prevDay:p,relativeDays:D,today:Ze,updateDayOfYear:L,updateDisabled:Y,updateFormatted:w,updateMinutes:R,updateRelative:$,updateWeekday:g,updateWorkWeek:B,validateNumber:e,validateTimestamp:t,weeksBetween:ie});function Xe(e,t="px"){if(e)return isNaN(e)?String(e):"auto"===e?e:""+Number(e)+t}function ye(t,a){for(let e=0;e<t.length;e++)if(!0===a(t[e],e))return e;return-1}function Qe(e,t){return 0===t?e:e.slice(0,t)}var fe={convertToUnit:Xe,indexOf:ye,minCharWidth:Qe},fe=Object.freeze({__proto__:null,convertToUnit:Xe,default:fe,indexOf:ye,minCharWidth:Qe});const Ge={mounted(e,t){if("function"===typeof t.value){const a=t.value,n={callback:a,size:{width:0,height:0},observer:new ResizeObserver(e=>{const t=e[0].contentRect;t.width===n.size.width&&t.height===n.size.height||(n.size.width=t.width,n.size.height=t.height,n.debounceTimeout&&clearTimeout(n.debounceTimeout),n.debounceTimeout=setTimeout(()=>{n.callback(n.size),n.debounceTimeout=void 0},100))})};n.observer.observe(e),e.__onResizeObserver=n}},beforeUnmount(e){if(e.__onResizeObserver){const{observer:t,debounceTimeout:a}=e.__onResizeObserver;a&&clearTimeout(a),t.unobserve(e),delete e.__onResizeObserver}}};function Je(t,a,{scrollArea:e,pane:n}){if(!a){const s="[error: renderCalendar] no renderFunc has been supplied to useCalendar";throw console.error(s),new Error(s)}const r=Ve.reactive({width:0,height:0}),o=Ve.ref(null);function u({width:e,height:t}){r.width=e,r.height=t}const i=Ve.computed(()=>{return!0!==t.noScroll&&e.value&&n.value&&r.height?e.value.offsetWidth-n.value.offsetWidth:0});function l(){}function d(){const e={ref:o,role:"complementary",lang:t.locale,class:`q-calendar ${t.dark?"q-calendar--dark":""} `+(t.bordered?"q-calendar__bordered":"")};return Ve.withDirectives(Ve.h("div",{...e},[a()]),[[Ge,u]])}return{rootRef:o,scrollWidth:i,__initCalendar:l,__renderCalendar:d}}const he=e=>e.every(e=>["day","date","weekday","interval","time","resource","task"].includes(e)),pe={modelValue:{type:String,default:Ze(),validator:e=>""===e||t(e)},weekdays:{type:Array,default:()=>[0,1,2,3,4,5,6]},dateType:{type:String,default:"round",validator:e=>["round","rounded","square"].includes(e)},weekdayAlign:{type:String,default:"center",validator:e=>["left","center","right"].includes(e)},dateAlign:{type:String,default:"center",validator:e=>["left","center","right"].includes(e)},bordered:Boolean,dark:Boolean,noAria:Boolean,noActiveDate:Boolean,noHeader:Boolean,noScroll:Boolean,shortWeekdayLabel:Boolean,noDefaultHeaderText:Boolean,noDefaultHeaderBtn:Boolean,minWeekdayLabel:{type:[Number,String],default:1},weekdayBreakpoints:{type:Array,default:()=>[75,35],validator:e=>2===e.length},locale:{type:String,default:"en-US"},animated:Boolean,transitionPrev:{type:String,default:"slide-right"},transitionNext:{type:String,default:"slide-left"},disabledDays:Array,disabledBefore:String,disabledAfter:String,disabledWeekdays:{type:Array,default:()=>[]},dragEnterFunc:Function,dragOverFunc:Function,dragLeaveFunc:Function,dropFunc:Function,selectedDates:{type:[Array,Set],default:()=>[]},selectedStartEndDates:{type:Array,default:()=>[]},hoverable:Boolean,focusable:Boolean,focusType:{type:Array,default:()=>["date"],validator:he}};function et(t,{startDate:e,endDate:a,times:n}){const r=Ve.computed(()=>ze(e.value)),o=Ve.computed(()=>{return"0000-00-00"===a.value?Z(r.value,t.weekdays,n.today):ze(a.value)||r.value}),u=Ve.computed(()=>j(t.locale,()=>({timeZone:"UTC",day:"numeric"}))),i=Ve.computed(()=>j(t.locale,(e,t)=>({timeZone:"UTC",weekday:t?"short":"long"}))),l=Ve.computed(()=>j(t.locale,()=>({timeZone:"UTC",dateStyle:"full"})));function d(e,t){return e&&e.length>0&&e.includes(t.date)}function s(e,t){const a={firstDay:!1,betweenDays:!1,lastDay:!1};if(2===e.length){const n=$e(t),r=$e(Pe(e[0])),o=$e(Pe(e[1]));a.firstDay=r===n,a.lastDay=o===n,a.betweenDays=r<n&&o>n}return a}function c(e,t=!1,a=[],n=[],r=!1){const o=d(a,e),{firstDay:u,lastDay:i,betweenDays:l}=s(n,e);return{"q-past-day":!u&&!l&&!i&&!o&&!t&&!!e.past,"q-future-day":!u&&!l&&!i&&!o&&!t&&!!e.future,"q-outside":t,"q-current-day":!!e.current,"q-selected":o,"q-range-first":u,"q-range":l,"q-range-last":i,"q-range-hover":r&&(u||i||l),"q-disabled-day disabled":!0===e.disabled}}function v(e){return P(e,t.weekdays,n.today)}function m(e){return Z(e,t.weekdays,n.today)}function y(){return{}}return{parsedStart:r,parsedEnd:o,dayFormatter:u,weekdayFormatter:i,ariaDateFormatter:l,arrayHasDate:d,checkDays:s,getRelativeClasses:c,startOfWeek:v,endOfWeek:m,dayStyleDefault:y}}function ge(e,t){e instanceof Window?e.scrollTo({top:t,behavior:"instant"}):e.scrollTop=t}function we(e){return e instanceof Window?e.scrollY:e.scrollTop}function De(o,u,i=500,l=performance.now(),d=we(o)){i<=0||d===u?ge(o,u):requestAnimationFrame(e=>{const t=e-l,a=Math.min(t/i,1),n=e=>e<.5?2*e*e:(4-2*e)*e-1,r=d+(u-d)*n(a);ge(o,r),a<1&&De(o,u,i,l,d)})}function ke(r,e,o=500){const u=r.scrollLeft,i=e-u;let l=null;function d(e){null===l&&(l=e);const t=e-l,a=Math.min(t/o,1),n=e=>e<.5?2*e*e:(4-2*e)*e-1;r.scrollLeft=u+i*n(a),t<o&&requestAnimationFrame(d)}requestAnimationFrame(d)}const be={view:{type:String,validator:e=>["day","week","month","month-interval"].includes(e),default:"day"},shortIntervalLabel:Boolean,intervalHeight:{type:[Number,String],default:40,validator:e},intervalMinutes:{type:[Number,String],default:60,validator:e},intervalStart:{type:[Number,String],default:0,validator:e},intervalCount:{type:[Number,String],default:24,validator:e},intervalStyle:{type:Function,default:null},intervalClass:{type:Function,default:null},weekdayStyle:{type:Function,default:null},weekdayClass:{type:Function,default:null},showIntervalLabel:{type:Function,default:null},hour24Format:Boolean,timeClicksClamped:Boolean,dateHeader:{type:String,default:"stacked",validator:e=>["stacked","inline","inverted"].includes(e)}};function tt(o,{times:t,scrollArea:n,parsedStart:e,parsedEnd:a,maxDays:r,size:u,headerColumnRef:i}){const l=Ve.computed(()=>parseInt(String(o.intervalStart),10)),v=Ve.computed(()=>parseInt(String(o.intervalMinutes),10)),d=Ve.computed(()=>parseInt(String(o.intervalCount),10)),m=Ve.computed(()=>parseFloat(String(o.intervalHeight))),y=Ve.computed(()=>{let e=0;const t=Number(o.columnCount);return o.cellWidth?e=Number(o.cellWidth):u.width>0&&i.value&&(e=i.value.offsetWidth/(t>1?t:r.value)),e}),s=Ve.computed(()=>l.value*v.value),c=Ve.computed(()=>d.value*m.value),f=Ve.computed(()=>d.value*y.value),h=Ve.computed(()=>D(e.value)),p=Ve.computed(()=>k(a.value)),g=Ve.computed(()=>{return Q(e.value,a.value,t.today,o.weekdays,o.disabledBefore,o.disabledAfter,o.disabledWeekdays,o.disabledDays,r.value)}),w=Ve.computed(()=>{return g.value.map(e=>G(e,l.value,v.value,d.value,t.now))});function D(e){return P(e,o.weekdays,t.today)}function k(e){return Z(e,o.weekdays,t.today)}function b(e,t){return e&&e.length>0&&e.includes(je(t))}function T(e,t){const a={firstDay:!1,betweenDays:!1,lastDay:!1};if(e&&2===e.length){const n=Ke(t),r=Ke(Pe(e[0])),o=Ke(Pe(e[1]));a.firstDay=r===n,a.lastDay=o===n,a.betweenDays=r<n&&o>n}return a}function _(e,t=[],a=[]){const n=b(t,e),{firstDay:r,lastDay:o,betweenDays:u}=T(a,e);return{"q-selected":n,"q-range-first":!0===r,"q-range":!0===u,"q-range-last":!0===o,"q-disabled-interval disabled":!0===e.disabled}}function S(e,t,a){return[]}const I=Ve.computed(()=>{const a={timeZone:"UTC",hour12:!o.hour24Format,hour:"2-digit",minute:"2-digit"},n={timeZone:"UTC",hour12:!o.hour24Format,hour:"numeric",minute:"2-digit"},r={timeZone:"UTC",hour12:!o.hour24Format,hour:"numeric"};return j(o.locale,(e,t)=>t?0===e.minute?r:n:a)}),N=Ve.computed(()=>{const e={timeZone:"UTC",dateStyle:"full",timeStyle:"short"};return j(o.locale,()=>e)});function C(e){const t=w.value[0][0],a=t.hour===e.hour&&t.minute===e.minute;return!a&&0===e.minute}function A(e){}function F(e){return{}}function M(e,t,a=!1,n){let r=K(t);if(e.currentTarget){const o=e.currentTarget.getBoundingClientRect(),u=e,i=e,l=u.changedTouches||u.touches,d=(l&&l[0]?l[0]:i).clientY,s=(d-o.top)/m.value,c=Math.floor((a?Math.floor(s):s)*v.value);0!==c&&(r=X(r,{minute:c})),n&&(r=$(r,n,!0))}return r}function x(e,t,a=!1,n){let r=K(t);const o=e.currentTarget.getBoundingClientRect(),u=e,i=e,l=u.changedTouches||u.touches,d=(l&&l[0]?l[0]:i).clientY,s=(d-o.top)/m.value,c=Math.floor((a?Math.floor(s):s)*v.value);return 0!==c&&(r=X(r,{minute:c})),n&&(r=$(r,n,!0)),r}function H(e,t,a=!1,n){let r=K(t);if(e.currentTarget){const o=e.currentTarget.getBoundingClientRect(),u=e,i=e,l=u.changedTouches||u.touches,d=(l&&l[0]?l[0]:i).clientX,s=(d-o.left)/y.value,c=Math.floor((a?Math.floor(s):s)*v.value);0!==c&&(r=X(r,{minute:c})),n&&(r=$(r,n,!0))}return r}function U(e,t){const a={timestamp:e,timeStartPos:q,timeDurationHeight:E};return void 0!==t&&(a.columnIndex=t),a}function R(e,t){const a={timestamp:K(e),timeStartPosX:O,timeDurationWidth:W};return void 0!==t&&(a.index=t),a}function L(e,t=0){const a=q(e);return!(!1===a||!n.value)&&(De(n.value,a,t),!0)}function B(e,t=0){const a=O(e);return!(!1===a||!n.value)&&(ke(n.value,a,t),!0)}function E(e){return e/v.value*m.value}function W(e){return e/v.value*y.value}function Y(e){return e*v.value/m.value}function V(e){return e*v.value/y.value}function q(e,t=!0){const a=z(e);if(!1===a)return!1;const n=s.value,r=d.value*v.value,o=(a-n)/r;let u=o*c.value;return t&&(u<0&&(u=0),u>c.value)&&(u=c.value),u}function O(e,t=!0){const a=z(e);if(!1===a)return!1;const n=s.value,r=d.value*v.value,o=(a-n)/r;let u=o*f.value;return t&&(u<0&&(u=0),u>f.value)&&(u=f.value),u}return{parsedIntervalStart:l,parsedIntervalMinutes:v,parsedIntervalCount:d,parsedIntervalHeight:m,parsedCellWidth:y,parsedStartMinute:s,bodyHeight:c,bodyWidth:f,parsedWeekStart:h,parsedWeekEnd:p,days:g,intervals:w,intervalFormatter:I,ariaDateTimeFormatter:N,arrayHasDateTime:b,checkIntervals:T,getIntervalClasses:_,getResourceClasses:S,showIntervalLabelDefault:C,showResourceLabelDefault:A,styleDefault:F,getTimestampAtEventInterval:M,getTimestampAtEvent:x,getTimestampAtEventX:H,getScopeForSlot:U,getScopeForSlotX:R,scrollToTime:L,scrollToTimeX:B,timeDurationHeight:E,timeDurationWidth:W,heightToMinutes:Y,widthToMinutes:V,timeStartPos:q,timeStartPosX:O}}const Te={columnCount:{type:[Number,String],default:0,validator:e},columnIndexStart:{type:[Number,String],default:0,validator:e}},_e={maxDays:{type:Number,default:1}},Se={now:{type:String,validator:e=>""===e||t(e),default:""}};function at(e){const t=Ve.reactive({now:ze("0000-00-00 00:00"),today:ze("0000-00-00")}),a=Ve.computed(()=>e.now?ze(e.now):o());function n(){t.now&&t.today&&(t.now.current=t.today.current=!0,t.now.past=t.today.past=!1,t.now.future=t.today.future=!1)}function r(){const e=a.value||o();u(e,t.now),i(e,t.now),u(e,t.today)}function o(){return M(new Date)}function u(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)}function i(e,t){e.time!==t.time&&(t.hour=e.hour,t.minute=e.minute,t.time=e.time)}return Ve.watch(a,()=>r()),{times:t,parsedNow:a,setCurrent:n,updateCurrent:r,getNow:o,updateDay:u,updateTime:i}}function nt(r,{parsedView:o,parsedValue:u,times:i}){const e=Ve.computed(()=>{const e=u.value;let t=r.maxDays,a=e,n=e;switch(o.value){case"month":a=_(e),n=S(e),t=l(a.year,a.month);break;case"week":case"week-agenda":case"week-scheduler":a=P(e,r.weekdays,i.today),n=Z(a,r.weekdays,i.today),t=r.weekdays.length;break;case"day":case"scheduler":case"agenda":n=V(K(n),h,t>1?t-1:t,r.weekdays),n=w(n);break;case"month-interval":case"month-scheduler":case"month-agenda":a=_(e),n=S(e),n=w(n),t=l(a.year,a.month);break;case"resource":t=1,n=V(K(n),h,t,r.weekdays),n=w(n);break}return{start:a,end:n,maxDays:t}});return{renderValues:e}}const Ie=e=>e.replace(/(-\w)/g,e=>e[1].toUpperCase());function Ne(t,e,a,n){const r={};for(const o in a){const u=a[o],i=Ie("on-"+o);if(!e.value)return console.warn("$listeners has not been set up"),{};if(void 0!==e.value[i]){const l="on"+u.event.charAt(0).toUpperCase()+u.event.slice(1),d=e=>{return(void 0===u.button||"buttons"in e&&e.buttons>0&&e.button===u.button)&&(u.prevent&&e.preventDefault(),u.stop&&e.stopPropagation(),t(o,n(e,o))),u.result};l in r?Array.isArray(r[l])?r[l].push(d):r[l]=[r[l],d]:r[l]=d}}return r}function Ce(e,t,a,n){return Ne(e,t,Ae(a),n)}function Ae(e){return{["click"+e]:{event:"click"},["contextmenu"+e]:{event:"contextmenu",prevent:!0,result:!1},["mousedown"+e]:{event:"mousedown"},["mousemove"+e]:{event:"mousemove"},["mouseup"+e]:{event:"mouseup"},["mouseenter"+e]:{event:"mouseenter"},["mouseleave"+e]:{event:"mouseleave"},["touchstart"+e]:{event:"touchstart"},["touchmove"+e]:{event:"touchmove"},["touchend"+e]:{event:"touchend"}}}function m(e){return Object.keys(Ae(e))}function rt(a,n){return{getMouseEventHandlers:(e,t)=>Ne(a,n,e,t),getDefaultMouseEventHandlers:(e,t)=>Ce(a,n,e,t),getMouseEventName:Ae,getRawMouseEvents:m}}const Fe=["moved"];function ot(l,{parsedView:d,parsedValue:s,direction:c,maxDays:v,times:m,emittedValue:y,emit:f}){function e(a=1){if(0===a)y.value=Ze();else{let e=K(s.value);const n=S(e),r=a>0,o=r?h:p,u=r?n.day:1;let t=r?a:-a;c.value=r?"next":"prev";const i=l.weekdays.length;while(--t>=0)switch(d.value){case"month":e.day=u,e=o(e),e=g(e);while(!l.weekdays.includes(Number(e.weekday)))e=X(e,{day:r?1:-1});break;case"week":case"week-agenda":case"week-scheduler":e=D(e,o,i,l.weekdays);break;case"day":case"scheduler":case"agenda":e=D(e,o,v.value,l.weekdays);break;case"month-interval":case"month-agenda":case"month-scheduler":e.day=u,e=o(e);break;case"resource":e=D(e,o,v.value,l.weekdays);break}e=g(e),e=w(e),e=L(e),e=$(e,m.now),y.value=e.date,f("moved",e)}}return{move:e}}const Me=/^on[A-Z]/;function ut(e=Ve.getCurrentInstance()){return{emitListeners:Ve.computed(()=>{const t={};return e?.vnode?.props&&Object.keys(e.vnode.props).forEach(e=>{Me.test(e)&&(t[e]=!0)}),t})}}function it(){const e={"aria-hidden":"true",class:"q-calendar__focus-helper"};return[Ve.h("span",e)]}function Ee(){function e({focusable:e,focusType:t},a,n){const r=e&&t.includes("date");return Ve.h("button",{...a,tabindex:r?0:-1},[n,r&&it()])}return{renderButton:e}}const We={cellWidth:[Number,String]};function lt(e){const t=Ve.computed(()=>void 0!==e.cellWidth);return{isSticky:t}}const qe=["change"];function dt(n,{days:r,lastStart:o,lastEnd:u}){function e(){const e=r.value;if(0===e.length)return!1;const t=e[0].date,a=e[e.length-1].date;return(!o.value||!u.value||t!==o.value||a!==u.value)&&(o.value=t,u.value=a,n("change",{start:t,end:a,days:e}),!0)}return{checkChange:e}}function st(){function e(e,t){return(Array.isArray(t)?t:[t]).includes(e.keyCode)}return{isKeyCode:e}}const Oe=st().isKeyCode,xe={useNavigation:Boolean};function ct(t,{rootRef:a,focusRef:n,focusValue:r,datesRef:o,parsedView:u,emittedValue:i,direction:l,times:d}){let e=!1;function s(){e||document&&(e=!0,document.addEventListener("keyup",f),document.addEventListener("keydown",y))}function c(){document&&(document.removeEventListener("keyup",f),document.removeEventListener("keydown",y),e=!1)}function v(e){if(e&&document){const t=document.activeElement;if(t!==document.body&&a.value?.contains(t))return!0}return!1}function m(){let t=0;const a=window.setInterval(()=>{const e=o.value[n.value];e&&(e.focus(),50!==++t)&&document.activeElement!==e||window.clearInterval(a)},250)}function y(e){v(e)&&Oe(e,[33,34,35,36,37,38,39,40])&&(e.stopPropagation(),e.preventDefault())}function f(e){if(v(e)&&Oe(e,[33,34,35,36,37,38,39,40])){const t={33:D,34:k,35:T,36:b,37:g,38:h,39:w,40:p};t[e.keyCode]?.()}}function h(){let e=K(r.value);if("month"===u.value){if(e=X(e,{day:-7}),r.value.month!==e.month)return l.value="prev",void(i.value=e.date)}else e=X(e,{minute:Number(t.intervalMinutes)});l.value="prev",n.value=e.date}function p(){let e=K(r.value);if("month"===u.value){if(e=X(e,{day:7}),r.value.month!==e.month)return l.value="next",void(i.value=e.date)}else e=X(e,{minute:Number(t.intervalMinutes)});l.value="next",n.value=e.date}function g(){let e=K(r.value);l.value="prev";do{e=X(e,{day:-1})}while(!t.weekdays.includes(Number(e.weekday)));n.value=e.date}function w(){let e=K(r.value);l.value="next";do{e=X(e,{day:1})}while(!t.weekdays.includes(Number(e.weekday)));n.value=e.date}function D(){let e=K(r.value);e="month"===u.value?X(e,{month:-1}):X(e,{day:-7}),l.value="prev",n.value=e.date}function k(){let e=K(r.value);e="month"===u.value?X(e,{month:1}):X(e,{day:7}),l.value="next",n.value=e.date}function b(){let e=K(r.value);e="month"===u.value?_(e):P(e,t.weekdays||[],d.today);while(!t.weekdays.includes(Number(e.weekday)))e=X(e,{day:-1});n.value=e.date}function T(){let e=K(r.value);e="month"===u.value?S(e):Z(e,t.weekdays||[],d.today);while(!t.weekdays.includes(Number(e.weekday)))e=X(e,{day:-1});n.value=e.date}return Ve.onBeforeUnmount(()=>{c()}),Ve.watch(()=>t.useNavigation,e=>{(!0===e?s:c)()}),!0===t.useNavigation&&s(),{startNavigation:s,endNavigation:c,tryFocus:m}}const vt=Ee().renderButton;var He=Ve.defineComponent({name:"QCalendarDay",directives:{ResizeObserver:Ge},props:{...pe,...be,...Te,..._e,...Se,...We,...xe},emits:["update:model-value",...qe,...Fe,...m("-date"),...m("-interval"),...m("-head-intervals"),...m("-head-day"),...m("-time")],setup(m,{slots:y,emit:v,expose:x}){const e=Ve.ref(null),H=Ve.ref(null),U=Ve.ref(null),f=Ve.ref(m.modelValue||Ze()),t=Ve.ref(Pe(m.modelValue||Ze())),h=Ve.ref({}),a=Ve.ref(),n=Ve.ref(),u=Ve.ref("next"),i=Ve.ref(m.modelValue||Ze()),l=Ve.ref("0000-00-00"),d=Ve.ref(0),p=Ve.ref(m.modelValue||Ze()),s=Ve.reactive({width:0,height:0}),g=Ve.ref(""),w=Ve.ref(0),R=Ve.ref(null),L=Ve.ref(null),r=(Ve.watch(()=>m.view,()=>{d.value=0}),Ve.computed(()=>{return"month"===m.view?"month-interval":m.view})),B=Ve.getCurrentInstance();if(null===B)throw new Error("current instance is null");const D=ut(B).emitListeners,k=lt(m).isSticky,{times:b,setCurrent:Y,updateCurrent:V}=at(m),{parsedStart:o,parsedEnd:P,dayFormatter:Z,weekdayFormatter:z,ariaDateFormatter:$,dayStyleDefault:K,getRelativeClasses:T}=(V(),Y(),et(m,{startDate:i,endDate:l,times:b})),c=Ve.computed(()=>{return ze(m.modelValue,b.now)||o.value||b.today}),j=(t.value=c.value,f.value=c.value.date,nt(m,{parsedView:r,parsedValue:c,times:b})).renderValues,{rootRef:_,scrollWidth:X,__renderCalendar:Q}=Je(m,Ye,{scrollArea:e,pane:H}),{days:S,intervals:G,intervalFormatter:J,ariaDateTimeFormatter:ee,parsedCellWidth:I,getIntervalClasses:te,showIntervalLabelDefault:ae,styleDefault:ne,getTimestampAtEventInterval:re,getTimestampAtEvent:oe,getScopeForSlot:N,scrollToTime:ue,heightToMinutes:ie,timeDurationHeight:le,timeStartPos:de}=tt(m,{times:b,scrollArea:e,parsedStart:o,parsedEnd:P,maxDays:d,size:s,headerColumnRef:U}),C=ot(m,{parsedView:r,parsedValue:c,direction:u,maxDays:d,times:b,emittedValue:p,emit:v}).move,A=rt(v,D).getDefaultMouseEventHandlers,se=dt(v,{days:S,lastStart:R,lastEnd:L}).checkChange,F=st().isKeyCode,ce=ct(m,{rootRef:_,focusRef:f,focusValue:t,datesRef:h,parsedView:r,emittedValue:p,direction:u,times:b}).tryFocus,M=Ve.computed(()=>{const e=parseInt(String(m.columnCount),10);return"day"===r.value&&e>1?e:"day"===r.value&&m.maxDays&&m.maxDays>1?m.maxDays:S.value.length}),ve=Ve.computed(()=>{return _.value?parseInt(window.getComputedStyle(_.value).getPropertyValue("--calendar-intervals-width"),10):0}),E=Ve.computed(()=>{if(_.value){const e=s.width||_.value.getBoundingClientRect().width;if(e&&ve.value&&M.value)return(e-X.value-ve.value)/M.value+"px"}return 100/M.value+"%"});function me(){p.value=Ze()}function ye(e=1){C(e)}function fe(e=1){C(-e)}function he({width:e,height:t}){s.width=e,s.height=t}function W(e){return e.date===p.value}function pe(){return Ve.h("div",{roll:"presentation",class:{"q-calendar-day__head":!0,"q-calendar__sticky":!0===k.value},style:{marginRight:X.value+"px"}},[ge(),we()])}function ge(){const e=y["head-intervals"],t={timestamps:S.value,days:S.value,date:m.modelValue};return Ve.h("div",{class:{"q-calendar-day__head--intervals":!0,"q-calendar__sticky":!0===k.value},...A("-head-intervals",e=>{return{scope:t,event:e}})},[e&&e({scope:t})])}function we(){return Ve.h("div",{ref:U,class:{"q-calendar-day__head--days__column":!0}},[De(),ke()])}function De(){return Ve.h("div",{class:{"q-calendar-day__head--days__weekdays":!0}},[...be()])}function ke(){const e=y["head-days-events"],t=parseInt(String(m.columnCount),10);return Ve.nextTick(()=>{if(n.value&&0===t&&window)try{const e=window.getComputedStyle(n.value);a.value&&a.value.parentElement&&(a.value.parentElement.style.height=e.height,a.value.style.height=e.height)}catch{}}),Ve.h("div",{class:{"q-calendar-day__head--days__event":!0}},[e&&Ve.h("div",{ref:a,style:{position:"absolute",left:0,top:0,right:0,overflow:"hidden",zIndex:1}},[e({scope:{days:S.value,ref:n}})]),...Te()])}function be(){const e=parseInt(String(m.columnCount),10),a=parseInt(String(m.columnIndexStart),10);return 1===S.value.length&&e>0?Array.apply(null,new Array(e)).map((e,t)=>t+a).map(e=>_e(S.value[0],e)):S.value.map(e=>_e(e,0))}function Te(){const e=parseInt(String(m.columnCount),10),a=parseInt(String(m.columnIndexStart),10);return 1===S.value.length&&e>0?Array.apply(null,new Array(e)).map((e,t)=>t+a).map(e=>Ie(S.value[0],e)).filter(e=>void 0!==e):S.value.map(e=>Ie(e,0)).filter(e=>void 0!==e)}function _e(t,e){const a=y["head-day"],n=y["head-date"],r=!0!==m.noActiveDate&&W(t),o=N(t,e),u=(o.activeDate=r,o.droppable=g.value===t.date,o.disabled=!!m.disabledWeekdays&&m.disabledWeekdays.includes(Number(t.weekday)),!0===k.value?m.cellWidth:E.value),i=m.weekdayStyle||K,l={width:u,maxWidth:u,minWidth:u,...i({scope:o})},d=(!0===k.value&&(l.minWidth=u),"function"===typeof m.weekdayClass?m.weekdayClass({scope:o}):{}),s=!0===m.focusable&&m.focusType.includes("weekday"),c=t.date+(void 0!==e?"-"+e:""),v={key:c,ref:e=>{h.value[c]=e},tabindex:!0===s?0:-1,class:{"q-calendar-day__head--day":!0,...d,...T(t),"q-active-date":r,"q-calendar__hoverable":!0===m.hoverable,"q-calendar__focusable":!0===s},style:l,onFocus:()=>{!0===s&&(f.value=c)},onKeydown:e=>{!0!==t.disabled&&F(e,[13,32])&&(e.stopPropagation(),e.preventDefault())},onKeyup:e=>{!0!==t.disabled&&F(e,[13,32])&&(p.value=t.date)},...A("-head-day",e=>{return{scope:o,event:e}}),onDragenter:e=>{void 0!==m.dragEnterFunc&&"function"===typeof m.dragEnterFunc&&(!0===m.dragEnterFunc(e,"head-day",{scope:o})?g.value=t.date:g.value="")},onDragover:e=>{void 0!==m.dragOverFunc&&"function"===typeof m.dragOverFunc&&(!0===m.dragOverFunc(e,"head-day",{scope:o})?g.value=t.date:g.value="")},onDragleave:e=>{void 0!==m.dragLeaveFunc&&"function"===typeof m.dragLeaveFunc&&(!0===m.dragLeaveFunc(e,"head-day",{scope:o})?g.value=t.date:g.value="")},onDrop:e=>{void 0!==m.dropFunc&&"function"===typeof m.dropFunc&&(!0===m.dropFunc(e,"head-day",{scope:o})?g.value=t.date:g.value="")}};return Ve.h("div",v,[void 0!==a&&a({scope:o}),void 0===a&&Ae(t,e),void 0===a&&Se(t),void 0===a&&n&&n({scope:o}),void 0===a&&Fe(t,e),it()])}function Se(e){return"stacked"===m.dateHeader?[!0!==m.noDefaultHeaderText?q(e):[],!0!==m.noDefaultHeaderBtn?O(e):[]].filter(e=>void 0!==e):"inline"===m.dateHeader?("left"===m.weekdayAlign&&"right"===m.dateAlign||"right"===m.weekdayAlign&&m.dateAlign,Ve.h("div",{class:"q-calendar__header--inline"},[!0!==m.noDefaultHeaderText&&q(e),!0!==m.noDefaultHeaderBtn&&O(e)])):"inverted"===m.dateHeader?("left"===m.weekdayAlign&&"right"===m.dateAlign||"right"===m.weekdayAlign&&m.dateAlign,Ve.h("div",{class:"q-calendar__header--inline"},[!0!==m.noDefaultHeaderBtn&&O(e),!0!==m.noDefaultHeaderText&&q(e)])):void 0}function Ie(e,t){const a=y["head-day-event"],n=!0!==m.noActiveDate&&W(e),r=N(e,t),o=(r.activeDate=n,r.disabled=!!m.disabledWeekdays&&m.disabledWeekdays.includes(Number(e.weekday)),!0===k.value?Xe(I.value):E.value),u={width:o,maxWidth:o,minWidth:o};return!0===k.value&&(u.minWidth=o),Ve.h("div",{key:"event-"+e.date+(void 0!==t?"-"+t:""),class:{"q-calendar-day__head--day__event":!0,...T(e),"q-active-date":n},style:u},[a&&a({scope:r})])}function q(e){const t=y["head-weekday-label"],a=!0===m.shortWeekdayLabel,n=N(e,0),r=(n.shortWeekdayLabel=m.shortWeekdayLabel,n.disabled=!!m.disabledWeekdays&&m.disabledWeekdays.includes(Number(e.weekday)),{class:{"q-calendar-day__head--weekday":!0,["q-calendar__"+m.weekdayAlign]:!0,"q-calendar__ellipsis":!0}});return Ve.h("div",r,t&&t({scope:n})||Ne(e,a))}function Ne(e,t){const a=z.value(e,t||m.weekdayBreakpoints[0]>0&&I.value<=m.weekdayBreakpoints[0]);return Ve.h("span",{class:"q-calendar-day__head--weekday-label q-calendar__ellipsis"},m.weekdayBreakpoints[1]>0&&I.value<=m.weekdayBreakpoints[1]?Qe(a,Number(m.minWeekdayLabel)):a)}function O(e){const t={class:{"q-calendar-day__head--date":!0,["q-calendar__"+m.dateAlign]:!0}};return Ve.h("div",t,Ce(e))}function Ce(a){const e=!0!==m.noActiveDate&&W(a),t=Z.value(a,!1),n=y["head-day-label"],r=y["head-day-button"],o={dayLabel:t,timestamp:a,activeDate:e,disabled:!!m.disabledWeekdays&&m.disabledWeekdays.includes(Number(a.weekday))},u={class:{"q-calendar-day__head--day__label":!0,"q-calendar__button":!0,"q-calendar__button--round":"round"===m.dateType,"q-calendar__button--rounded":"rounded"===m.dateType,"q-calendar__button--bordered":!0===a.current,"q-calendar__focusable":!0},disabled:a.disabled,onKeydown:e=>{!0!==a.disabled&&F(e,[13,32])&&(e.stopPropagation(),e.preventDefault())},onKeyup:e=>{!0!==a.disabled&&F(e,[13,32])&&(p.value=a.date,void 0!==D.value.onClickDate)&&v("click-date",{scope:o})},...A("-date",(e,t)=>{return"click-date"!==t&&"contextmenu-date"!==t||(p.value=a.date,"click-date"===t&&e.preventDefault()),{scope:o,event:e}})};return!0!==m.noAria&&(u.ariaLabel=$.value(a,!1)),r?r({scope:o}):vt(m,u,n?n({scope:o}):t)}function Ae(e,t){const a=y["column-header-before"];if(a){const n={timestamp:e,columnIndex:t};return Ve.h("div",{class:"q-calendar-day__column-header--before"},[a({scope:n})])}}function Fe(e,t){const a=y["column-header-after"];if(a){const n={timestamp:e,columnIndex:t};return Ve.h("div",{class:"q-calendar-day__column-header--after"},[a({scope:n})])}}function Me(){return Ve.h("div",{class:"q-calendar-day__body"},[Ee()])}function Ee(){return!0===k.value?Ve.h("div",{ref:e,class:{"q-calendar-day__scroll-area":!0,"q-calendar__scroll":!0}},[!0!==k.value&&Re(),qe()]):!0===m.noScroll?We():Ve.h("div",{ref:e,class:{"q-calendar-day__scroll-area":!0,"q-calendar__scroll":!0}},[We()])}function We(){return Ve.h("div",{ref:H,class:"q-calendar-day__pane"},[Re(),qe()])}function qe(){const e=y["day-container"];return Ve.h("div",{class:"q-calendar-day__day-container"},[!0===k.value&&!0!==m.noHeader&&pe(),Ve.h("div",{style:{display:"flex",flexDirection:"row"}},[!0===k.value&&Re(),...Oe()]),e&&e({scope:{days:S.value}})])}function Oe(){const e=parseInt(String(m.columnCount),10),a=parseInt(String(m.columnIndexStart),10);return 1===S.value.length&&e>0?Array.apply(null,new Array(e)).map((e,t)=>t+a).map(e=>xe(S.value[0],0,e)):S.value.map((e,t)=>xe(e,t,0))}function xe(e,t,a){const n=y["day-body"],r=N(e,a),o=!0===k.value?m.cellWidth:E.value,u={width:o,maxWidth:o,minWidth:o};return!0===k.value&&(u.minWidth=o),Ve.h("div",{key:e.date+(void 0!==a?":"+a:""),class:{"q-calendar-day__day":!0,...T(e)},style:u},[...He(t,a),n&&n({scope:r})])}function He(e,t){return G.value[e].map(e=>Ue(e,t))}function Ue(a,n){const e=Xe(m.intervalHeight),t=m.intervalStyle||ne,r=y["day-interval"],o=N(a,n),u=(o.droppable=w.value===Ke(a),"function"===typeof m.intervalClass?m.intervalClass({scope:o}):{}),i=!0===m.focusable&&m.focusType.includes("interval"),l=je(a),d={height:e,...t({scope:o})},s={key:l,tabindex:!0===i?0:-1,class:{"q-calendar-day__day-interval":0===a.minute,"q-calendar-day__day-interval--section":0!==a.minute,...u,...te(a,Array.from(m.selectedDates),m.selectedStartEndDates),"q-calendar__hoverable":!0===m.hoverable,"q-calendar__focusable":!0===i},style:d,onDragenter:e=>{void 0!==m.dragEnterFunc&&"function"===typeof m.dragEnterFunc&&(!0===m.dragEnterFunc(e,"interval",{scope:o})?w.value=Ke(a):w.value=0)},onDragover:e=>{void 0!==m.dragOverFunc&&"function"===typeof m.dragOverFunc&&(!0===m.dragOverFunc(e,"interval",{scope:o})?w.value=Ke(a):w.value=0)},onDragleave:e=>{void 0!==m.dragLeaveFunc&&"function"===typeof m.dragLeaveFunc&&(!0===m.dragLeaveFunc(e,"interval",{scope:o})?w.value=Ke(a):w.value=0)},onDrop:e=>{void 0!==m.dropFunc&&"function"===typeof m.dropFunc&&(!0===m.dropFunc(e,"interval",{scope:o})?w.value=Ke(a):w.value=0)},onKeydown:e=>{F(e,[13,32])&&(e.stopPropagation(),e.preventDefault())},onKeyup:e=>{if(F(e,[13,32])){const t=N(a,n);p.value=t.timestamp.date,void 0!==D.value.onClickTime&&v("click-time",{scope:t,event:e})}},...A("-time",e=>{const t=N(re(e,a,m.timeClicksClamped,b.now),n);return{scope:t,event:e}})},c=(!0!==m.noAria&&(s.ariaLabel=ee.value(a,!1)),r?r({scope:o}):void 0);return Ve.h("div",s,[c,it()])}function Re(){const e={ariaHidden:"true",class:{"q-calendar-day__intervals-column":!0,"q-calendar__ellipsis":!0,"q-calendar__sticky":!0===k.value},...A("-interval",e=>{const t=oe(e,o.value,m.timeClicksClamped,b.now);return{scope:{timestamp:t},event:e}})};return Ve.h("div",e,Le())}function Le(){return G.value[0].map(e=>Be(e))}function Be(e){const t=y["interval-label"],a=Xe(m.intervalHeight),n=m.shortIntervalLabel??!1,r=m.showIntervalLabel||ae,o=r(e),u=o?J.value(e,n):void 0;return Ve.h("div",{key:e.time,class:{"q-calendar-day__interval":0===e.minute,"q-calendar-day__interval--section":0!==e.minute},style:{height:a}},[Ve.h("div",{class:"q-calendar-day__interval--text q-calendar__overflow-wrap"},[t?t({scope:{timestamp:e,label:u}}):u])])}function Ye(){const{start:e,end:t,maxDays:a}=j.value,n=(i.value===e.date&&l.value===t.date&&d.value===a||(i.value=e.date,l.value=t.date,d.value=a),s.width>0),r=Ve.withDirectives(Ve.h("div",{key:i.value,class:"q-calendar-day"},[!0===n&&!0!==k.value&&!0!==m.noHeader&&pe(),n&&Me()]),[[Ge,he]]);if(!0!==m.animated)return r;{const o="q-calendar--"+("prev"===u.value?m.transitionPrev:m.transitionNext);return Ve.h(Ve.Transition,{name:o,appear:!0},()=>r)}}return Ve.watch([S],se,{deep:!0,immediate:!0}),Ve.watch(()=>m.modelValue,(e,t)=>{if(p.value!==m.modelValue){if(!0===m.animated){const a=$e(Pe(e)),n=$e(Pe(t));u.value=a>=n?"next":"prev"}p.value=e}f.value=e}),Ve.watch(p,(e,t)=>{if(p.value!==m.modelValue){if(!0===m.animated){const a=$e(Pe(e)),n=$e(Pe(t));u.value=a>=n?"next":"prev"}v("update:model-value",e)}}),Ve.watch(f,e=>{e&&(t.value=ze(e))}),Ve.watch(t,()=>{f.value&&h.value[f.value]?h.value[f.value].focus():ce()}),Ve.watch(()=>m.maxDays,e=>{d.value=e}),Ve.onBeforeUpdate(()=>{h.value={},a.value=void 0,n.value=void 0}),Ve.onMounted(()=>{}),x({prev:fe,next:ye,move:C,moveToToday:me,updateCurrent:V,timeStartPos:de,timeDurationHeight:le,heightToMinutes:ie,scrollToTime:ue}),()=>Q()}});const Ue="4.1.0";me={version:Ue,QCalendarDay:He,...me,...fe,install(e){e.component(String(He.name),He)}};return me}); | ||
(function(e,t){"object"===typeof exports&&"undefined"!==typeof module?module.exports=t(require("vue")):"function"===typeof define&&define.amd?define(["vue"],t):(e="undefined"!==typeof globalThis?globalThis:e||self,e.QCalendarDay=t(e.Vue))})(this,function(Ve){const i=/^(\d{4})-(\d{1,2})(-(\d{1,2}))?([^\d]+(\d{1,2}))?(:(\d{1,2}))?(:(\d{1,2}))?(.(\d{1,3}))?$/,y=/^(\d{4})-(\d{1,2})(-(\d{1,2}))?/,f=/(\d\d?)(:(\d\d?)|)(:(\d\d?)|)/,k=[0,31,28,31,30,31,30,31,31,30,31,30,31],b=[0,31,29,31,30,31,30,31,31,30,31,30,31],r={MILLISECONDS_IN:{SECOND:1e3,MINUTE:6e4,HOUR:36e5,DAY:864e5,WEEK:6048e5},SECONDS_IN:{MINUTE:60,HOUR:3600,DAY:86400,WEEK:604800},MINUTES_IN:{MINUTE:1,HOUR:60,DAY:1440,WEEK:10080},HOURS_IN:{DAY:24,WEEK:168},DAYS_IN:{WEEK:7}},T=28,I=31,N=12,C=1,A=1,F=0;function t(e){return"string"===typeof e&&i.test(e)}function Pe(e){if("string"!==typeof e)return null;const t=i.exec(e);if(!t||!t[1]||!t[2])return null;const a=parseInt(t[1],10),n=parseInt(t[2],10),r=parseInt(t[4]||"1",10),o=parseInt(t[6]||"0",10),u=parseInt(t[8]||"0",10);return{date:e,time:o.toString().padStart(2,"0")+":"+u.toString().padStart(2,"0"),year:a,month:n,day:r,hour:o,minute:u,hasDay:!!t[4],hasTime:!0,past:!1,current:!1,future:!1,disabled:!1,weekday:0,doy:0,workweek:0}}function M(e,t=!1){if(!(e instanceof Date))return null;const a=t?"UTC":"";return w({date:o(e[`get${a}FullYear`](),4)+"-"+o(e[`get${a}Month`]()+1,2)+"-"+o(e[`get${a}Date`](),2),time:o(e[`get${a}Hours`]()||0,2)+":"+o(e[`get${a}Minutes`]()||0,2),year:e[`get${a}FullYear`](),month:e[`get${a}Month`]()+1,day:e[`get${a}Date`](),hour:e[`get${a}Hours`](),minute:e[`get${a}Minutes`](),weekday:0,doy:0,workweek:0,hasDay:!0,hasTime:!0,past:!1,current:!1,future:!1,disabled:!1})}function o(e,t){let a=String(e);while(a.length<t)a="0"+a;return a}function E(e){return e%4===0&&e%100!==0||e%400===0}function l(e,t){return(E(e)?b:k)[t]}function h(e){const t=new Date(e.year,e.month-1,e.day+1);return w(oe({...e,year:t.getFullYear(),month:t.getMonth()+1,day:t.getDate()}))}function p(e){const t=new Date(e.year,e.month-1,e.day-1);return w(oe({...e,year:t.getFullYear(),month:t.getMonth()+1,day:t.getDate()}))}function Ze(){const e=new Date,t=e.getMonth()+1,a=e.getDate(),n=e.getFullYear();return[n,o(t,2),o(a,2)].join("-")}function W(e){return e===Ze()}function P(e,t,a){let n=K(e);if(t){if(1===n.day||0===n.weekday)while(!t.includes(Number(n.weekday)))n=h(n);n=v(n,t[0],p),n=w(n),a&&(n=$(n,a,n.hasTime))}return n}function Z(e,t,a){let n=K(e);if(t&&Array.isArray(t)){const r=l(n.year,n.month);if(r===n.day||n.weekday===t[t.length-1])while(!t.includes(Number(n.weekday)))n=p(n);n=v(n,t[t.length-1],h),n=w(n),a&&(n=$(n,a,n.hasTime))}return n}function _(e){let t=K(e);return t.day=A,t=w(t),t}function S(e){let t=K(e);return t.day=l(t.year,t.month),t=w(t),t}function z(e){const t=Object.prototype.toString.call(e);switch(t){case"[object Number]":return e;case"[object String]":{const a=f.exec(e);return a?60*parseInt(a[1],10)+parseInt(a[3]||"0",10):!1}case"[object Object]":return"object"!==typeof e||"number"!==typeof e.hour||"number"!==typeof e.minute?!1:"object"===typeof e&&"hour"in e&&"minute"in e&&60*e.hour+e.minute}return!1}function q(e,t){return!(!e||!t)&&e.year===t.year&&e.month===t.month&&e.day===t.day&&e.hour===t.hour&&e.minute===t.minute}function O(e,t){return s(e)===s(t)}function x(e,t){return c(e)===c(t)}function H(e,t){return je(e)===je(t)}function ze(e,t=null){let a=Pe(e);return a?(a=w(a),t&&(a=$(a,t,a.hasTime)),a):null}function $e(e){return 1e8*(e.year??0)+1e6*(e.month??0)+1e4*(e.day??0)}function d(e){return 100*(e.hour??0)+(e.minute??0)}function Ke(e){return $e(e)+d(e)}function U(e,t,a=!1){const n=Date.UTC(e.year??0,(e.month??1)-1,e.day??1,e.hour??0,e.minute??0),r=Date.UTC(t.year??0,(t.month??1)-1,t.day??1,t.hour??0,t.minute??0);return!0===a&&r<n?0:r-n}function $(e,t,a=!1){let n=K(e),r=$e(t),o=$e(n),u=r===o;return n.hasTime&&a&&u&&(r=d(t),o=d(n),u=r===o),n.past=o<r,n.current=u,n.future=o>r,n.currentWeekday=n.weekday===t.weekday,n}function R(e,t,a=null){let n=K(e);return n.hasTime=!0,n.hour=Math.floor(t/r.MINUTES_IN.HOUR),n.minute=t%r.MINUTES_IN.HOUR,n.time=c(n),a&&(n=$(n,a,!0)),n}function g(e){let t=K(e);return t.weekday=u(t),t}function L(e){let t=K(e);return t.doy=a(t)||0,t}function B(e){let t=K(e);return t.workweek=n(t),t}function Y(e,t,a,n,r){let o=K(e);const u=$e(o);if(void 0!==t){const s=Pe(t);if(s){const c=$e(s);u<=c&&(o.disabled=!0)}}if(!0!==o.disabled&&void 0!==a){const v=Pe(a);if(v){const m=$e(v);u>=m&&(o.disabled=!0)}}if(!0!==o.disabled&&Array.isArray(n)&&n.length>0)for(var i in n)if(n[i]===o.weekday){o.disabled=!0;break}if(!0!==o.disabled&&Array.isArray(r)&&r.length>0)for(var l in r)if(Array.isArray(r[l])&&2===r[l].length&&r[l][0]&&r[l][1]){const y=Pe(r[l][0]),f=Pe(r[l][1]);if(y&&f&&ne(o,y,f)){o.disabled=!0;break}}else{const h=r[l];if(Array.isArray(h))for(var d of h){const p=ze(d);if(p){const g=$e(p);if(g===u){o.disabled=!0;break}}}else if(h){const w=ze(h);if(w){const D=$e(w);D===u&&(o.disabled=!0)}}}return o}function w(e){let t=K(e);return t.hasTime=!0,t.time=c(t),t.date=s(t),t.weekday=u(t),t.doy=a(t)||0,t.workweek=n(t),t}function a(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 n(e){let t=K(e);if(0===t.year){const r=ze(Ze());r&&(t=r)}const a=new Date(Date.UTC(t.year,t.month-1,t.day)),n=4;a.setUTCDate(a.getUTCDate()-(a.getUTCDay()+6)%7+n),a.setUTCDate(a.getUTCDate()+n-(a.getUTCDay()||7));e=new Date(Date.UTC(a.getUTCFullYear(),0,1)),e=Math.ceil(((a.valueOf()-e.valueOf())/864e5+1)/7);return e}function u(e){let t=e.weekday;if(e.hasDay){const a=Math.floor,n=e.day,r=(e.month+9)%N+1,o=a(e.year/100),u=e.year%100-(e.month<=2?1:0);t=((n+a(2.6*r-.2)-2*o+u+a(u/4)+a(o/4))%7+7)%7}return t??0}function K(e){return{...e}}function s(e){let t=o(e.year,4)+"-"+o(e.month,2);return e.hasDay&&(t+="-"+o(e.day,2)),t}function c(e){return e.hasTime?o(e.hour,2)+":"+o(e.minute,2):""}function je(e){return s(e)+" "+(e.hasTime?c(e):"00:00")}function V(e,t=h,a=1,n=[0,1,2,3,4,5,6]){const r=K(e);return D(r,t,a,n)}function D(e,t=h,a=1,n=[0,1,2,3,4,5,6]){let r=K(e);n.includes(Number(r.weekday))||0!==r.weekday||t!==h||++a;while(--a>=0)r=t(r),n.length<7&&!n.includes(Number(r.weekday))&&++a;return r}function v(e,t,a=h,n=6){let r=K(e);while(r.weekday!==t&&--n>=0)r=a(r);return r}function Q(e,t,a,n=[0,1,2,3,4,5,6],r=void 0,o=void 0,u=[],i=[],l=42,d=0){const s=$e(e),c=$e(t),v=[];let m=K(e),y=0,f=y===c;if(!(c<s))while((!f||v.length<d)&&v.length<l){if(y=$e(m),f=f||y>c&&v.length>=d,f)break;if(n.includes(Number(m.weekday))){let e=K(m);e=w(e),e=$(e,a),e=Y(e,r,o,u,i),v.push(e)}m=D(m,h)}return v}function G(t,a,n,r,o){const u=[];for(let e=0;e<r;++e){const i=(a+e)*n,l=K(t);u.push(R(l,i,o))}return u}function j(n,r){const e=()=>"";return"undefined"===typeof Intl||"undefined"===typeof Intl.DateTimeFormat?e:(t,e)=>{try{const a=new Intl.DateTimeFormat(n||void 0,r(t,e));return a.format(ee(t))}catch(e){return console.error(`Intl.DateTimeFormat: ${e.message} -> `+je(t)),""}}}function J(e,t=!0){return t?new Date(Date.UTC(e.year,e.month-1,e.day,0,0)):new Date(e.year,e.month-1,e.day,0,0)}function ee(e,t=!0){return t?new Date(Date.UTC(e.year,e.month-1,e.day,e.hour,e.minute)):new Date(e.year,e.month-1,e.day,e.hour,e.minute)}function e(e){return isFinite(Number(e))}function te(e,t=!1){const a=!0===t?Ke:$e;return e.reduce((e,t)=>{return Math.max(a(e),a(t))===a(e)?e:t})}function ae(e,t=!1){const a=!0===t?Ke:$e;return e.reduce((e,t)=>{return Math.min(a(e),a(t))===a(e)?e:t})}function ne(e,t,a,n=!1){const r=$e(e)+(!0===n?d(e):0),o=$e(t)+(!0===n?d(t):0),u=$e(a)+(!0===n?d(a):0);return r>=o&&r<=u}function re(e,t,a,n){const r=$e(e),o=$e(t),u=$e(a),i=$e(n);return r>=u&&r<=i||o>=u&&o<=i||u>=r&&o>=i}function X(e,t){const a=K(e);return t.year&&(a.year+=t.year),t.month&&(a.month+=t.month),t.day&&(a.day+=t.day),t.hour&&(a.hour+=t.hour),t.minute&&(a.minute+=t.minute),w(oe(a))}function oe(e){const t=new Date(e.year,e.month-1,e.day,e.hour,e.minute);return{...e,year:t.getFullYear(),month:t.getMonth()+1,day:t.getDate(),hour:t.getHours(),minute:t.getMinutes()}}function ue(e,t){const a=U(e,t,!0);return Math.floor(a/r.MILLISECONDS_IN.DAY)}function ie(e,t){let a=K(e),n=K(t);return a=v(a,0),n=v(n,6),Math.ceil(ue(a,n)/r.DAYS_IN.WEEK)}const le={Sun:new Date("2020-01-05T00:00:00.000Z"),Mon:new Date("2020-01-06T00:00:00.000Z"),Tue:new Date("2020-01-07T00:00:00.000Z"),Wed:new Date("2020-01-08T00:00:00.000Z"),Thu:new Date("2020-01-09T00:00:00.000Z"),Fri:new Date("2020-01-10T00:00:00.000Z"),Sat:new Date("2020-01-11T00:00:00.000Z")};function de(){const e=()=>"",r={long:{timeZone:"UTC",weekday:"long"},short:{timeZone:"UTC",weekday:"short"},narrow:{timeZone:"UTC",weekday:"narrow"}};return"undefined"===typeof Intl||"undefined"===typeof Intl.DateTimeFormat?e:t;function t(t,e,a){try{const n=new Intl.DateTimeFormat(a||void 0,r[e]||r["long"]);return n.format(le[t])}catch(e){return e instanceof Error&&console.error(`Intl.DateTimeFormat: ${e.message} -> day of week: `+t),""}}}function se(t,a){const e=Object.keys(le),n=de();return e.map(e=>String(n(e,t,a)))}function ce(){const e=()=>"",o={long:{timeZone:"UTC",month:"long"},short:{timeZone:"UTC",month:"short"},narrow:{timeZone:"UTC",month:"narrow"}};return"undefined"===typeof Intl||"undefined"===typeof Intl.DateTimeFormat?e:t;function t(t,e,a){try{const n=new Intl.DateTimeFormat(a||void 0,o[e]||o["long"]),r=new Date;return r.setDate(1),r.setMonth(t),n.format(r)}catch(e){return e instanceof Error&&console.error(`Intl.DateTimeFormat: ${e.message} -> month: `+t),""}}}function ve(t,a){const n=ce();return[...Array(12).keys()].map(e=>n(e,t,a))}var me={PARSE_DATETIME:i,PARSE_DATE:y,PARSE_TIME:f,DAYS_IN_MONTH:k,DAYS_IN_MONTH_LEAP:b,DAYS_IN_MONTH_MIN:T,DAYS_IN_MONTH_MAX:I,MONTH_MAX:N,MONTH_MIN:C,DAY_MIN:A,TIME_CONSTANTS:r,FIRST_HOUR:F,today:Ze,getStartOfWeek:P,getEndOfWeek:Z,getStartOfMonth:_,getEndOfMonth:S,parseTime:z,validateTimestamp:t,parsed:Pe,parseTimestamp:ze,parseDate:M,getDayIdentifier:$e,getTimeIdentifier:d,getDayTimeIdentifier:Ke,diffTimestamp:U,updateRelative:$,updateMinutes:R,updateWeekday:g,updateDayOfYear:L,updateWorkWeek:B,updateDisabled:Y,updateFormatted:w,getDayOfYear:a,getWorkWeek:n,getWeekday:u,isLeapYear:E,daysInMonth:l,copyTimestamp:K,padNumber:o,getDate:s,getTime:c,getDateTime:je,nextDay:h,prevDay:p,relativeDays:D,findWeekday:v,createDayList:Q,createIntervalList:G,createNativeLocaleFormatter:j,makeDate:J,makeDateTime:ee,validateNumber:e,isBetweenDates:ne,isOverlappingDates:re,daysBetween:ue,weeksBetween:ie,addToDate:X,compareTimestamps:q,compareDate:O,compareTime:x,compareDateTime:H,getWeekdayFormatter:de,getWeekdayNames:se,getMonthFormatter:ce,getMonthNames:ve},me=Object.freeze({__proto__:null,DAYS_IN_MONTH:k,DAYS_IN_MONTH_LEAP:b,DAYS_IN_MONTH_MAX:I,DAYS_IN_MONTH_MIN:T,DAY_MIN:A,FIRST_HOUR:F,MONTH_MAX:N,MONTH_MIN:C,PARSE_DATE:y,PARSE_DATETIME:i,PARSE_TIME:f,TIME_CONSTANTS:r,addToDate:X,compareDate:O,compareDateTime:H,compareTime:x,compareTimestamps:q,copyTimestamp:K,createDayList:Q,createIntervalList:G,createNativeLocaleFormatter:j,daysBetween:ue,daysInMonth:l,default:me,diffTimestamp:U,findWeekday:v,getDate:s,getDateTime:je,getDayIdentifier:$e,getDayOfYear:a,getDayTimeIdentifier:Ke,getEndOfMonth:S,getEndOfWeek:Z,getMonthFormatter:ce,getMonthNames:ve,getStartOfMonth:_,getStartOfWeek:P,getTime:c,getTimeIdentifier:d,getWeekday:u,getWeekdayFormatter:de,getWeekdayNames:se,getWorkWeek:n,isBetweenDates:ne,isLeapYear:E,isOverlappingDates:re,isToday:W,makeDate:J,makeDateTime:ee,maxTimestamp:te,minTimestamp:ae,moveRelativeDays:V,nextDay:h,padNumber:o,parseDate:M,parseTime:z,parseTimestamp:ze,parsed:Pe,prevDay:p,relativeDays:D,today:Ze,updateDayOfYear:L,updateDisabled:Y,updateFormatted:w,updateMinutes:R,updateRelative:$,updateWeekday:g,updateWorkWeek:B,validateNumber:e,validateTimestamp:t,weeksBetween:ie});function Xe(e,t="px"){if(e)return isNaN(e)?String(e):"auto"===e?e:""+Number(e)+t}function ye(t,a){for(let e=0;e<t.length;e++)if(!0===a(t[e],e))return e;return-1}function Qe(e,t){return 0===t?e:e.slice(0,t)}var fe={convertToUnit:Xe,indexOf:ye,minCharWidth:Qe},fe=Object.freeze({__proto__:null,convertToUnit:Xe,default:fe,indexOf:ye,minCharWidth:Qe});const Ge={mounted(e,t){if("function"===typeof t.value){const a=t.value,n={callback:a,size:{width:0,height:0},observer:new ResizeObserver(e=>{const t=e[0].contentRect;t.width===n.size.width&&t.height===n.size.height||(n.size.width=t.width,n.size.height=t.height,n.debounceTimeout&&clearTimeout(n.debounceTimeout),n.debounceTimeout=setTimeout(()=>{n.callback(n.size),n.debounceTimeout=void 0},100))})};n.observer.observe(e),e.__onResizeObserver=n}},beforeUnmount(e){if(e.__onResizeObserver){const{observer:t,debounceTimeout:a}=e.__onResizeObserver;a&&clearTimeout(a),t.unobserve(e),delete e.__onResizeObserver}}};function Je(t,a,{scrollArea:e,pane:n}){if(!a){const s="[error: renderCalendar] no renderFunc has been supplied to useCalendar";throw console.error(s),new Error(s)}const r=Ve.reactive({width:0,height:0}),o=Ve.ref(null);function u({width:e,height:t}){r.width=e,r.height=t}const i=Ve.computed(()=>{return!0!==t.noScroll&&e.value&&n.value&&r.height?e.value.offsetWidth-n.value.offsetWidth:0});function l(){}function d(){const e={ref:o,role:"complementary",lang:t.locale,class:`q-calendar ${t.dark?"q-calendar--dark":""} `+(t.bordered?"q-calendar__bordered":"")};return Ve.withDirectives(Ve.h("div",{...e},[a()]),[[Ge,u]])}return{rootRef:o,scrollWidth:i,__initCalendar:l,__renderCalendar:d}}const he=e=>e.every(e=>["day","date","weekday","interval","time","resource","task"].includes(e)),pe={modelValue:{type:String,default:Ze(),validator:e=>""===e||t(e)},weekdays:{type:Array,default:()=>[0,1,2,3,4,5,6]},dateType:{type:String,default:"round",validator:e=>["round","rounded","square"].includes(e)},weekdayAlign:{type:String,default:"center",validator:e=>["left","center","right"].includes(e)},dateAlign:{type:String,default:"center",validator:e=>["left","center","right"].includes(e)},bordered:Boolean,dark:Boolean,noAria:Boolean,noActiveDate:Boolean,noHeader:Boolean,noScroll:Boolean,shortWeekdayLabel:Boolean,noDefaultHeaderText:Boolean,noDefaultHeaderBtn:Boolean,minWeekdayLabel:{type:[Number,String],default:1},weekdayBreakpoints:{type:Array,default:()=>[75,35],validator:e=>2===e.length},locale:{type:String,default:"en-US"},animated:Boolean,transitionPrev:{type:String,default:"slide-right"},transitionNext:{type:String,default:"slide-left"},disabledDays:Array,disabledBefore:String,disabledAfter:String,disabledWeekdays:{type:Array,default:()=>[]},dragEnterFunc:Function,dragOverFunc:Function,dragLeaveFunc:Function,dropFunc:Function,selectedDates:{type:[Array,Set],default:()=>[]},selectedStartEndDates:{type:Array,default:()=>[]},hoverable:Boolean,focusable:Boolean,focusType:{type:Array,default:()=>["date"],validator:he}};function et(t,{startDate:e,endDate:a,times:n}){const r=Ve.computed(()=>ze(e.value)),o=Ve.computed(()=>{return"0000-00-00"===a.value?Z(r.value,t.weekdays,n.today):ze(a.value)||r.value}),u=Ve.computed(()=>j(t.locale,()=>({timeZone:"UTC",day:"numeric"}))),i=Ve.computed(()=>j(t.locale,(e,t)=>({timeZone:"UTC",weekday:t?"short":"long"}))),l=Ve.computed(()=>j(t.locale,()=>({timeZone:"UTC",dateStyle:"full"})));function d(e,t){return e&&e.length>0&&e.includes(t.date)}function s(e,t){const a={firstDay:!1,betweenDays:!1,lastDay:!1};if(2===e.length){const n=$e(t),r=$e(Pe(e[0])),o=$e(Pe(e[1]));a.firstDay=r===n,a.lastDay=o===n,a.betweenDays=r<n&&o>n}return a}function c(e,t=!1,a=[],n=[],r=!1){const o=d(a,e),{firstDay:u,lastDay:i,betweenDays:l}=s(n,e);return{"q-past-day":!u&&!l&&!i&&!o&&!t&&!!e.past,"q-future-day":!u&&!l&&!i&&!o&&!t&&!!e.future,"q-outside":t,"q-current-day":!!e.current,"q-selected":o,"q-range-first":u,"q-range":l,"q-range-last":i,"q-range-hover":r&&(u||i||l),"q-disabled-day disabled":!0===e.disabled}}function v(e){return P(e,t.weekdays,n.today)}function m(e){return Z(e,t.weekdays,n.today)}function y(){return{}}return{parsedStart:r,parsedEnd:o,dayFormatter:u,weekdayFormatter:i,ariaDateFormatter:l,arrayHasDate:d,checkDays:s,getRelativeClasses:c,startOfWeek:v,endOfWeek:m,dayStyleDefault:y}}function ge(e,t){e instanceof Window?e.scrollTo({top:t,behavior:"instant"}):e.scrollTop=t}function we(e){return e instanceof Window?e.scrollY:e.scrollTop}function De(o,u,i=500,l=performance.now(),d=we(o)){i<=0||d===u?ge(o,u):requestAnimationFrame(e=>{const t=e-l,a=Math.min(t/i,1),n=e=>e<.5?2*e*e:(4-2*e)*e-1,r=d+(u-d)*n(a);ge(o,r),a<1&&De(o,u,i,l,d)})}function ke(r,e,o=500){const u=r.scrollLeft,i=e-u;let l=null;function d(e){null===l&&(l=e);const t=e-l,a=Math.min(t/o,1),n=e=>e<.5?2*e*e:(4-2*e)*e-1;r.scrollLeft=u+i*n(a),t<o&&requestAnimationFrame(d)}requestAnimationFrame(d)}const be={view:{type:String,validator:e=>["day","week","month","month-interval"].includes(e),default:"day"},shortIntervalLabel:Boolean,intervalHeight:{type:[Number,String],default:40,validator:e},intervalMinutes:{type:[Number,String],default:60,validator:e},intervalStart:{type:[Number,String],default:0,validator:e},intervalCount:{type:[Number,String],default:24,validator:e},intervalStyle:{type:Function,default:null},intervalClass:{type:Function,default:null},weekdayStyle:{type:Function,default:null},weekdayClass:{type:Function,default:null},showIntervalLabel:{type:Function,default:null},hour24Format:Boolean,timeClicksClamped:Boolean,dateHeader:{type:String,default:"stacked",validator:e=>["stacked","inline","inverted"].includes(e)}};function tt(o,{times:t,scrollArea:n,parsedStart:e,parsedEnd:a,maxDays:r,size:u,headerColumnRef:i}){const l=Ve.computed(()=>parseInt(String(o.intervalStart),10)),v=Ve.computed(()=>parseInt(String(o.intervalMinutes),10)),d=Ve.computed(()=>parseInt(String(o.intervalCount),10)),m=Ve.computed(()=>parseFloat(String(o.intervalHeight))),y=Ve.computed(()=>{let e=0;const t=Number(o.columnCount);return o.cellWidth?e=Number(o.cellWidth):u.width>0&&i.value&&(e=i.value.offsetWidth/(t>1?t:r.value)),e}),s=Ve.computed(()=>l.value*v.value),c=Ve.computed(()=>d.value*m.value),f=Ve.computed(()=>d.value*y.value),h=Ve.computed(()=>D(e.value)),p=Ve.computed(()=>k(a.value)),g=Ve.computed(()=>{return Q(e.value,a.value,t.today,o.weekdays,o.disabledBefore,o.disabledAfter,o.disabledWeekdays,o.disabledDays,r.value)}),w=Ve.computed(()=>{return g.value.map(e=>G(e,l.value,v.value,d.value,t.now))});function D(e){return P(e,o.weekdays,t.today)}function k(e){return Z(e,o.weekdays,t.today)}function b(e,t){return e&&e.length>0&&e.includes(je(t))}function T(e,t){const a={firstDay:!1,betweenDays:!1,lastDay:!1};if(e&&2===e.length){const n=Ke(t),r=Ke(Pe(e[0])),o=Ke(Pe(e[1]));a.firstDay=r===n,a.lastDay=o===n,a.betweenDays=r<n&&o>n}return a}function _(e,t=[],a=[]){const n=b(t,e),{firstDay:r,lastDay:o,betweenDays:u}=T(a,e);return{"q-selected":n,"q-range-first":!0===r,"q-range":!0===u,"q-range-last":!0===o,"q-disabled-interval disabled":!0===e.disabled}}function S(e,t,a){return[]}const I=Ve.computed(()=>{const a={timeZone:"UTC",hour12:!o.hour24Format,hour:"2-digit",minute:"2-digit"},n={timeZone:"UTC",hour12:!o.hour24Format,hour:"numeric",minute:"2-digit"},r={timeZone:"UTC",hour12:!o.hour24Format,hour:"numeric"};return j(o.locale,(e,t)=>t?0===e.minute?r:n:a)}),N=Ve.computed(()=>{const e={timeZone:"UTC",dateStyle:"full",timeStyle:"short"};return j(o.locale,()=>e)});function C(e){const t=w.value[0][0],a=t.hour===e.hour&&t.minute===e.minute;return!a&&0===e.minute}function A(e){}function F(e){return{}}function M(e,t,a=!1,n){let r=K(t);if(e.currentTarget){const o=e.currentTarget.getBoundingClientRect(),u=e,i=e,l=u.changedTouches||u.touches,d=(l&&l[0]?l[0]:i).clientY,s=(d-o.top)/m.value,c=Math.floor((a?Math.floor(s):s)*v.value);0!==c&&(r=X(r,{minute:c})),n&&(r=$(r,n,!0))}return r}function x(e,t,a=!1,n){let r=K(t);const o=e.currentTarget.getBoundingClientRect(),u=e,i=e,l=u.changedTouches||u.touches,d=(l&&l[0]?l[0]:i).clientY,s=(d-o.top)/m.value,c=Math.floor((a?Math.floor(s):s)*v.value);return 0!==c&&(r=X(r,{minute:c})),n&&(r=$(r,n,!0)),r}function H(e,t,a=!1,n){let r=K(t);if(e.currentTarget){const o=e.currentTarget.getBoundingClientRect(),u=e,i=e,l=u.changedTouches||u.touches,d=(l&&l[0]?l[0]:i).clientX,s=(d-o.left)/y.value,c=Math.floor((a?Math.floor(s):s)*v.value);0!==c&&(r=X(r,{minute:c})),n&&(r=$(r,n,!0))}return r}function U(e,t){const a={timestamp:e,timeStartPos:q,timeDurationHeight:E};return void 0!==t&&(a.columnIndex=t),a}function R(e,t){const a={timestamp:K(e),timeStartPosX:O,timeDurationWidth:W};return void 0!==t&&(a.index=t),a}function L(e,t=0){const a=q(e);return!(!1===a||!n.value)&&(De(n.value,a,t),!0)}function B(e,t=0){const a=O(e);return!(!1===a||!n.value)&&(ke(n.value,a,t),!0)}function E(e){return e/v.value*m.value}function W(e){return e/v.value*y.value}function Y(e){return e*v.value/m.value}function V(e){return e*v.value/y.value}function q(e,t=!0){const a=z(e);if(!1===a)return!1;const n=s.value,r=d.value*v.value,o=(a-n)/r;let u=o*c.value;return t&&(u<0&&(u=0),u>c.value)&&(u=c.value),u}function O(e,t=!0){const a=z(e);if(!1===a)return!1;const n=s.value,r=d.value*v.value,o=(a-n)/r;let u=o*f.value;return t&&(u<0&&(u=0),u>f.value)&&(u=f.value),u}return{parsedIntervalStart:l,parsedIntervalMinutes:v,parsedIntervalCount:d,parsedIntervalHeight:m,parsedCellWidth:y,parsedStartMinute:s,bodyHeight:c,bodyWidth:f,parsedWeekStart:h,parsedWeekEnd:p,days:g,intervals:w,intervalFormatter:I,ariaDateTimeFormatter:N,arrayHasDateTime:b,checkIntervals:T,getIntervalClasses:_,getResourceClasses:S,showIntervalLabelDefault:C,showResourceLabelDefault:A,styleDefault:F,getTimestampAtEventInterval:M,getTimestampAtEvent:x,getTimestampAtEventX:H,getScopeForSlot:U,getScopeForSlotX:R,scrollToTime:L,scrollToTimeX:B,timeDurationHeight:E,timeDurationWidth:W,heightToMinutes:Y,widthToMinutes:V,timeStartPos:q,timeStartPosX:O}}const Te={columnCount:{type:[Number,String],default:0,validator:e},columnIndexStart:{type:[Number,String],default:0,validator:e}},_e={maxDays:{type:Number,default:1}},Se={now:{type:String,validator:e=>""===e||t(e),default:""}};function at(e){const t=Ve.reactive({now:ze("0000-00-00 00:00"),today:ze("0000-00-00")}),a=Ve.computed(()=>e.now?ze(e.now):o());function n(){t.now&&t.today&&(t.now.current=t.today.current=!0,t.now.past=t.today.past=!1,t.now.future=t.today.future=!1)}function r(){const e=a.value||o();u(e,t.now),i(e,t.now),u(e,t.today)}function o(){return M(new Date)}function u(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)}function i(e,t){e.time!==t.time&&(t.hour=e.hour,t.minute=e.minute,t.time=e.time)}return Ve.watch(a,()=>r()),{times:t,parsedNow:a,setCurrent:n,updateCurrent:r,getNow:o,updateDay:u,updateTime:i}}function nt(r,{parsedView:o,parsedValue:u,times:i}){const e=Ve.computed(()=>{const e=u.value;let t=r.maxDays,a=e,n=e;switch(o.value){case"month":a=_(e),n=S(e),t=l(a.year,a.month);break;case"week":case"week-agenda":case"week-scheduler":a=P(e,r.weekdays,i.today),n=Z(a,r.weekdays,i.today),t=r.weekdays.length;break;case"day":case"scheduler":case"agenda":n=V(K(n),h,t>1?t-1:t,r.weekdays),n=w(n);break;case"month-interval":case"month-scheduler":case"month-agenda":a=_(e),n=S(e),n=w(n),t=l(a.year,a.month);break;case"resource":t=1,n=V(K(n),h,t,r.weekdays),n=w(n);break}return{start:a,end:n,maxDays:t}});return{renderValues:e}}const Ie=e=>e.replace(/(-\w)/g,e=>e[1].toUpperCase());function Ne(t,e,a,n){const r={};for(const o in a){const u=a[o],i=Ie("on-"+o);if(!e.value)return console.warn("$listeners has not been set up"),{};if(void 0!==e.value[i]){const l="on"+u.event.charAt(0).toUpperCase()+u.event.slice(1),d=e=>{return(void 0===u.button||"buttons"in e&&e.buttons>0&&e.button===u.button)&&(u.prevent&&e.preventDefault(),u.stop&&e.stopPropagation(),t(o,n(e,o))),u.result};l in r?Array.isArray(r[l])?r[l].push(d):r[l]=[r[l],d]:r[l]=d}}return r}function Ce(e,t,a,n){return Ne(e,t,Ae(a),n)}function Ae(e){return{["click"+e]:{event:"click"},["contextmenu"+e]:{event:"contextmenu",prevent:!0,result:!1},["mousedown"+e]:{event:"mousedown"},["mousemove"+e]:{event:"mousemove"},["mouseup"+e]:{event:"mouseup"},["mouseenter"+e]:{event:"mouseenter"},["mouseleave"+e]:{event:"mouseleave"},["touchstart"+e]:{event:"touchstart"},["touchmove"+e]:{event:"touchmove"},["touchend"+e]:{event:"touchend"}}}function m(e){return Object.keys(Ae(e))}function rt(a,n){return{getMouseEventHandlers:(e,t)=>Ne(a,n,e,t),getDefaultMouseEventHandlers:(e,t)=>Ce(a,n,e,t),getMouseEventName:Ae,getRawMouseEvents:m}}const Fe=["moved"];function ot(l,{parsedView:d,parsedValue:s,direction:c,maxDays:v,times:m,emittedValue:y,emit:f}){function e(a=1){if(0===a)y.value=Ze();else{let e=K(s.value);const n=S(e),r=a>0,o=r?h:p,u=r?n.day:1;let t=r?a:-a;c.value=r?"next":"prev";const i=l.weekdays.length;while(--t>=0)switch(d.value){case"month":e.day=u,e=o(e),e=g(e);while(!l.weekdays.includes(Number(e.weekday)))e=X(e,{day:r?1:-1});break;case"week":case"week-agenda":case"week-scheduler":e=D(e,o,i,l.weekdays);break;case"day":case"scheduler":case"agenda":e=D(e,o,v.value,l.weekdays);break;case"month-interval":case"month-agenda":case"month-scheduler":e.day=u,e=o(e);break;case"resource":e=D(e,o,v.value,l.weekdays);break}e=g(e),e=w(e),e=L(e),e=$(e,m.now),y.value=e.date,f("moved",e)}}return{move:e}}const Me=/^on[A-Z]/;function ut(e=Ve.getCurrentInstance()){return{emitListeners:Ve.computed(()=>{const t={};return e?.vnode?.props&&Object.keys(e.vnode.props).forEach(e=>{Me.test(e)&&(t[e]=!0)}),t})}}function it(){const e={"aria-hidden":"true",class:"q-calendar__focus-helper"};return[Ve.h("span",e)]}function Ee(){function e({focusable:e,focusType:t},a,n){const r=e&&t.includes("date");return Ve.h("button",{...a,tabindex:r?0:-1},[n,r&&it()])}return{renderButton:e}}const We={cellWidth:[Number,String]};function lt(e){const t=Ve.computed(()=>void 0!==e.cellWidth);return{isSticky:t}}const qe=["change"];function dt(n,{days:r,lastStart:o,lastEnd:u}){function e(){const e=r.value;if(0===e.length)return!1;const t=e[0].date,a=e[e.length-1].date;return(!o.value||!u.value||t!==o.value||a!==u.value)&&(o.value=t,u.value=a,n("change",{start:t,end:a,days:e}),!0)}return{checkChange:e}}function st(){function e(e,t){return(Array.isArray(t)?t:[t]).includes(e.keyCode)}return{isKeyCode:e}}const Oe=st().isKeyCode,xe={useNavigation:Boolean};function ct(t,{rootRef:a,focusRef:n,focusValue:r,datesRef:o,parsedView:u,emittedValue:i,direction:l,times:d}){let e=!1;function s(){e||document&&(e=!0,document.addEventListener("keyup",f),document.addEventListener("keydown",y))}function c(){document&&(document.removeEventListener("keyup",f),document.removeEventListener("keydown",y),e=!1)}function v(e){if(e&&document){const t=document.activeElement;if(t!==document.body&&a.value?.contains(t))return!0}return!1}function m(){let t=0;const a=window.setInterval(()=>{const e=o.value[n.value];e&&(e.focus(),50!==++t)&&document.activeElement!==e||window.clearInterval(a)},250)}function y(e){v(e)&&Oe(e,[33,34,35,36,37,38,39,40])&&(e.stopPropagation(),e.preventDefault())}function f(e){if(v(e)&&Oe(e,[33,34,35,36,37,38,39,40])){const t={33:D,34:k,35:T,36:b,37:g,38:h,39:w,40:p};t[e.keyCode]?.()}}function h(){let e=K(r.value);if("month"===u.value){if(e=X(e,{day:-7}),r.value.month!==e.month)return l.value="prev",void(i.value=e.date)}else e=X(e,{minute:Number(t.intervalMinutes)});l.value="prev",n.value=e.date}function p(){let e=K(r.value);if("month"===u.value){if(e=X(e,{day:7}),r.value.month!==e.month)return l.value="next",void(i.value=e.date)}else e=X(e,{minute:Number(t.intervalMinutes)});l.value="next",n.value=e.date}function g(){let e=K(r.value);l.value="prev";do{e=X(e,{day:-1})}while(!t.weekdays.includes(Number(e.weekday)));n.value=e.date}function w(){let e=K(r.value);l.value="next";do{e=X(e,{day:1})}while(!t.weekdays.includes(Number(e.weekday)));n.value=e.date}function D(){let e=K(r.value);e="month"===u.value?X(e,{month:-1}):X(e,{day:-7}),l.value="prev",n.value=e.date}function k(){let e=K(r.value);e="month"===u.value?X(e,{month:1}):X(e,{day:7}),l.value="next",n.value=e.date}function b(){let e=K(r.value);e="month"===u.value?_(e):P(e,t.weekdays||[],d.today);while(!t.weekdays.includes(Number(e.weekday)))e=X(e,{day:-1});n.value=e.date}function T(){let e=K(r.value);e="month"===u.value?S(e):Z(e,t.weekdays||[],d.today);while(!t.weekdays.includes(Number(e.weekday)))e=X(e,{day:-1});n.value=e.date}return Ve.onBeforeUnmount(()=>{c()}),Ve.watch(()=>t.useNavigation,e=>{(!0===e?s:c)()}),!0===t.useNavigation&&s(),{startNavigation:s,endNavigation:c,tryFocus:m}}const vt=Ee().renderButton;var He=Ve.defineComponent({name:"QCalendarDay",directives:{ResizeObserver:Ge},props:{...pe,...be,...Te,..._e,...Se,...We,...xe},emits:["update:model-value",...qe,...Fe,...m("-date"),...m("-interval"),...m("-head-intervals"),...m("-head-day"),...m("-time")],setup(m,{slots:y,emit:v,expose:x}){const e=Ve.ref(null),H=Ve.ref(null),U=Ve.ref(null),f=Ve.ref(m.modelValue||Ze()),t=Ve.ref(Pe(m.modelValue||Ze())),h=Ve.ref({}),a=Ve.ref(),n=Ve.ref(),u=Ve.ref("next"),i=Ve.ref(m.modelValue||Ze()),l=Ve.ref("0000-00-00"),d=Ve.ref(0),p=Ve.ref(m.modelValue||Ze()),s=Ve.reactive({width:0,height:0}),g=Ve.ref(""),w=Ve.ref(0),R=Ve.ref(null),L=Ve.ref(null),r=(Ve.watch(()=>m.view,()=>{d.value=0}),Ve.computed(()=>{return"month"===m.view?"month-interval":m.view})),B=Ve.getCurrentInstance();if(null===B)throw new Error("current instance is null");const D=ut(B).emitListeners,k=lt(m).isSticky,{times:b,setCurrent:Y,updateCurrent:V}=at(m),{parsedStart:o,parsedEnd:P,dayFormatter:Z,weekdayFormatter:z,ariaDateFormatter:$,dayStyleDefault:K,getRelativeClasses:T}=(V(),Y(),et(m,{startDate:i,endDate:l,times:b})),c=Ve.computed(()=>{return ze(m.modelValue,b.now)||o.value||b.today}),j=(t.value=c.value,f.value=c.value.date,nt(m,{parsedView:r,parsedValue:c,times:b})).renderValues,{rootRef:_,scrollWidth:X,__renderCalendar:Q}=Je(m,Ye,{scrollArea:e,pane:H}),{days:S,intervals:G,intervalFormatter:J,ariaDateTimeFormatter:ee,parsedCellWidth:I,getIntervalClasses:te,showIntervalLabelDefault:ae,styleDefault:ne,getTimestampAtEventInterval:re,getTimestampAtEvent:oe,getScopeForSlot:N,scrollToTime:ue,heightToMinutes:ie,timeDurationHeight:le,timeStartPos:de}=tt(m,{times:b,scrollArea:e,parsedStart:o,parsedEnd:P,maxDays:d,size:s,headerColumnRef:U}),C=ot(m,{parsedView:r,parsedValue:c,direction:u,maxDays:d,times:b,emittedValue:p,emit:v}).move,A=rt(v,D).getDefaultMouseEventHandlers,se=dt(v,{days:S,lastStart:R,lastEnd:L}).checkChange,F=st().isKeyCode,ce=ct(m,{rootRef:_,focusRef:f,focusValue:t,datesRef:h,parsedView:r,emittedValue:p,direction:u,times:b}).tryFocus,M=Ve.computed(()=>{const e=parseInt(String(m.columnCount),10);return"day"===r.value&&e>1?e:"day"===r.value&&m.maxDays&&m.maxDays>1?m.maxDays:S.value.length}),ve=Ve.computed(()=>{return _.value?parseInt(window.getComputedStyle(_.value).getPropertyValue("--calendar-intervals-width"),10):0}),E=Ve.computed(()=>{if(_.value){const e=s.width||_.value.getBoundingClientRect().width;if(e&&ve.value&&M.value)return(e-X.value-ve.value)/M.value+"px"}return 100/M.value+"%"});function me(){p.value=Ze()}function ye(e=1){C(e)}function fe(e=1){C(-e)}function he({width:e,height:t}){s.width=e,s.height=t}function W(e){return e.date===p.value}function pe(){return Ve.h("div",{roll:"presentation",class:{"q-calendar-day__head":!0,"q-calendar__sticky":!0===k.value},style:{marginRight:X.value+"px"}},[ge(),we()])}function ge(){const e=y["head-intervals"],t={timestamps:S.value,days:S.value,date:m.modelValue};return Ve.h("div",{class:{"q-calendar-day__head--intervals":!0,"q-calendar__sticky":!0===k.value},...A("-head-intervals",e=>{return{scope:t,event:e}})},[e&&e({scope:t})])}function we(){return Ve.h("div",{ref:U,class:{"q-calendar-day__head--days__column":!0}},[De(),ke()])}function De(){return Ve.h("div",{class:{"q-calendar-day__head--days__weekdays":!0}},[...be()])}function ke(){const e=y["head-days-events"],t=parseInt(String(m.columnCount),10);return Ve.nextTick(()=>{if(n.value&&0===t&&window)try{const e=window.getComputedStyle(n.value);a.value&&a.value.parentElement&&(a.value.parentElement.style.height=e.height,a.value.style.height=e.height)}catch{}}),Ve.h("div",{class:{"q-calendar-day__head--days__event":!0}},[e&&Ve.h("div",{ref:a,style:{position:"absolute",left:0,top:0,right:0,overflow:"hidden",zIndex:1}},[e({scope:{days:S.value,ref:n}})]),...Te()])}function be(){const e=parseInt(String(m.columnCount),10),a=parseInt(String(m.columnIndexStart),10);return 1===S.value.length&&e>0?Array.apply(null,new Array(e)).map((e,t)=>t+a).map(e=>_e(S.value[0],e)):S.value.map(e=>_e(e,0))}function Te(){const e=parseInt(String(m.columnCount),10),a=parseInt(String(m.columnIndexStart),10);return 1===S.value.length&&e>0?Array.apply(null,new Array(e)).map((e,t)=>t+a).map(e=>Ie(S.value[0],e)).filter(e=>void 0!==e):S.value.map(e=>Ie(e,0)).filter(e=>void 0!==e)}function _e(t,e){const a=y["head-day"],n=y["head-date"],r=!0!==m.noActiveDate&&W(t),o=N(t,e),u=(o.activeDate=r,o.droppable=g.value===t.date,o.disabled=!!m.disabledWeekdays&&m.disabledWeekdays.includes(Number(t.weekday)),!0===k.value?m.cellWidth:E.value),i=m.weekdayStyle||K,l={width:u,maxWidth:u,minWidth:u,...i({scope:o})},d=(!0===k.value&&(l.minWidth=u),"function"===typeof m.weekdayClass?m.weekdayClass({scope:o}):{}),s=!0===m.focusable&&m.focusType.includes("weekday"),c=t.date+(void 0!==e?"-"+e:""),v={key:c,ref:e=>{h.value[c]=e},tabindex:!0===s?0:-1,class:{"q-calendar-day__head--day":!0,...d,...T(t),"q-active-date":r,"q-calendar__hoverable":!0===m.hoverable,"q-calendar__focusable":!0===s},style:l,onFocus:()=>{!0===s&&(f.value=c)},onKeydown:e=>{!0!==t.disabled&&F(e,[13,32])&&(e.stopPropagation(),e.preventDefault())},onKeyup:e=>{!0!==t.disabled&&F(e,[13,32])&&(p.value=t.date)},...A("-head-day",e=>{return{scope:o,event:e}}),onDragenter:e=>{void 0!==m.dragEnterFunc&&"function"===typeof m.dragEnterFunc&&(!0===m.dragEnterFunc(e,"head-day",{scope:o})?g.value=t.date:g.value="")},onDragover:e=>{void 0!==m.dragOverFunc&&"function"===typeof m.dragOverFunc&&(!0===m.dragOverFunc(e,"head-day",{scope:o})?g.value=t.date:g.value="")},onDragleave:e=>{void 0!==m.dragLeaveFunc&&"function"===typeof m.dragLeaveFunc&&(!0===m.dragLeaveFunc(e,"head-day",{scope:o})?g.value=t.date:g.value="")},onDrop:e=>{void 0!==m.dropFunc&&"function"===typeof m.dropFunc&&(!0===m.dropFunc(e,"head-day",{scope:o})?g.value=t.date:g.value="")}};return Ve.h("div",v,[void 0!==a&&a({scope:o}),void 0===a&&Ae(t,e),void 0===a&&Se(t),void 0===a&&n&&n({scope:o}),void 0===a&&Fe(t,e),it()])}function Se(e){return"stacked"===m.dateHeader?[!0!==m.noDefaultHeaderText?q(e):[],!0!==m.noDefaultHeaderBtn?O(e):[]].filter(e=>void 0!==e):"inline"===m.dateHeader?("left"===m.weekdayAlign&&"right"===m.dateAlign||"right"===m.weekdayAlign&&m.dateAlign,Ve.h("div",{class:"q-calendar__header--inline"},[!0!==m.noDefaultHeaderText&&q(e),!0!==m.noDefaultHeaderBtn&&O(e)])):"inverted"===m.dateHeader?("left"===m.weekdayAlign&&"right"===m.dateAlign||"right"===m.weekdayAlign&&m.dateAlign,Ve.h("div",{class:"q-calendar__header--inline"},[!0!==m.noDefaultHeaderBtn&&O(e),!0!==m.noDefaultHeaderText&&q(e)])):void 0}function Ie(e,t){const a=y["head-day-event"],n=!0!==m.noActiveDate&&W(e),r=N(e,t),o=(r.activeDate=n,r.disabled=!!m.disabledWeekdays&&m.disabledWeekdays.includes(Number(e.weekday)),!0===k.value?Xe(I.value):E.value),u={width:o,maxWidth:o,minWidth:o};return!0===k.value&&(u.minWidth=o),Ve.h("div",{key:"event-"+e.date+(void 0!==t?"-"+t:""),class:{"q-calendar-day__head--day__event":!0,...T(e),"q-active-date":n},style:u},[a&&a({scope:r})])}function q(e){const t=y["head-weekday-label"],a=!0===m.shortWeekdayLabel,n=N(e,0),r=(n.shortWeekdayLabel=m.shortWeekdayLabel,n.disabled=!!m.disabledWeekdays&&m.disabledWeekdays.includes(Number(e.weekday)),{class:{"q-calendar-day__head--weekday":!0,["q-calendar__"+m.weekdayAlign]:!0,"q-calendar__ellipsis":!0}});return Ve.h("div",r,t&&t({scope:n})||Ne(e,a))}function Ne(e,t){const a=z.value(e,t||m.weekdayBreakpoints[0]>0&&I.value<=m.weekdayBreakpoints[0]);return Ve.h("span",{class:"q-calendar-day__head--weekday-label q-calendar__ellipsis"},m.weekdayBreakpoints[1]>0&&I.value<=m.weekdayBreakpoints[1]?Qe(a,Number(m.minWeekdayLabel)):a)}function O(e){const t={class:{"q-calendar-day__head--date":!0,["q-calendar__"+m.dateAlign]:!0}};return Ve.h("div",t,Ce(e))}function Ce(a){const e=!0!==m.noActiveDate&&W(a),t=Z.value(a,!1),n=y["head-day-label"],r=y["head-day-button"],o={dayLabel:t,timestamp:a,activeDate:e,disabled:!!m.disabledWeekdays&&m.disabledWeekdays.includes(Number(a.weekday))},u={class:{"q-calendar-day__head--day__label":!0,"q-calendar__button":!0,"q-calendar__button--round":"round"===m.dateType,"q-calendar__button--rounded":"rounded"===m.dateType,"q-calendar__button--bordered":!0===a.current,"q-calendar__focusable":!0},disabled:a.disabled,onKeydown:e=>{!0!==a.disabled&&F(e,[13,32])&&(e.stopPropagation(),e.preventDefault())},onKeyup:e=>{!0!==a.disabled&&F(e,[13,32])&&(p.value=a.date,void 0!==D.value.onClickDate)&&v("click-date",{scope:o})},...A("-date",(e,t)=>{return"click-date"!==t&&"contextmenu-date"!==t||(p.value=a.date,"click-date"===t&&e.preventDefault()),{scope:o,event:e}})};return!0!==m.noAria&&(u.ariaLabel=$.value(a,!1)),r?r({scope:o}):vt(m,u,n?n({scope:o}):t)}function Ae(e,t){const a=y["column-header-before"];if(a){const n={timestamp:e,columnIndex:t};return Ve.h("div",{class:"q-calendar-day__column-header--before"},[a({scope:n})])}}function Fe(e,t){const a=y["column-header-after"];if(a){const n={timestamp:e,columnIndex:t};return Ve.h("div",{class:"q-calendar-day__column-header--after"},[a({scope:n})])}}function Me(){return Ve.h("div",{class:"q-calendar-day__body"},[Ee()])}function Ee(){return!0===k.value?Ve.h("div",{ref:e,class:{"q-calendar-day__scroll-area":!0,"q-calendar__scroll":!0}},[!0!==k.value&&Re(),qe()]):!0===m.noScroll?We():Ve.h("div",{ref:e,class:{"q-calendar-day__scroll-area":!0,"q-calendar__scroll":!0}},[We()])}function We(){return Ve.h("div",{ref:H,class:"q-calendar-day__pane"},[Re(),qe()])}function qe(){const e=y["day-container"];return Ve.h("div",{class:"q-calendar-day__day-container"},[!0===k.value&&!0!==m.noHeader&&pe(),Ve.h("div",{style:{display:"flex",flexDirection:"row"}},[!0===k.value&&Re(),...Oe()]),e&&e({scope:{days:S.value}})])}function Oe(){const e=parseInt(String(m.columnCount),10),a=parseInt(String(m.columnIndexStart),10);return 1===S.value.length&&e>0?Array.apply(null,new Array(e)).map((e,t)=>t+a).map(e=>xe(S.value[0],0,e)):S.value.map((e,t)=>xe(e,t,0))}function xe(e,t,a){const n=y["day-body"],r=N(e,a),o=!0===k.value?m.cellWidth:E.value,u={width:o,maxWidth:o,minWidth:o};return!0===k.value&&(u.minWidth=o),Ve.h("div",{key:e.date+(void 0!==a?":"+a:""),class:{"q-calendar-day__day":!0,...T(e)},style:u},[...He(t,a),n&&n({scope:r})])}function He(e,t){return G.value[e].map(e=>Ue(e,t))}function Ue(a,n){const e=Xe(m.intervalHeight),t=m.intervalStyle||ne,r=y["day-interval"],o=N(a,n),u=(o.droppable=w.value===Ke(a),"function"===typeof m.intervalClass?m.intervalClass({scope:o}):{}),i=!0===m.focusable&&m.focusType.includes("interval"),l=je(a),d={height:e,...t({scope:o})},s={key:l,tabindex:!0===i?0:-1,class:{"q-calendar-day__day-interval":0===a.minute,"q-calendar-day__day-interval--section":0!==a.minute,...u,...te(a,Array.from(m.selectedDates),m.selectedStartEndDates),"q-calendar__hoverable":!0===m.hoverable,"q-calendar__focusable":!0===i},style:d,onDragenter:e=>{void 0!==m.dragEnterFunc&&"function"===typeof m.dragEnterFunc&&(!0===m.dragEnterFunc(e,"interval",{scope:o})?w.value=Ke(a):w.value=0)},onDragover:e=>{void 0!==m.dragOverFunc&&"function"===typeof m.dragOverFunc&&(!0===m.dragOverFunc(e,"interval",{scope:o})?w.value=Ke(a):w.value=0)},onDragleave:e=>{void 0!==m.dragLeaveFunc&&"function"===typeof m.dragLeaveFunc&&(!0===m.dragLeaveFunc(e,"interval",{scope:o})?w.value=Ke(a):w.value=0)},onDrop:e=>{void 0!==m.dropFunc&&"function"===typeof m.dropFunc&&(!0===m.dropFunc(e,"interval",{scope:o})?w.value=Ke(a):w.value=0)},onKeydown:e=>{F(e,[13,32])&&(e.stopPropagation(),e.preventDefault())},onKeyup:e=>{if(F(e,[13,32])){const t=N(a,n);p.value=t.timestamp.date,void 0!==D.value.onClickTime&&v("click-time",{scope:t,event:e})}},...A("-time",e=>{const t=N(re(e,a,m.timeClicksClamped,b.now),n);return{scope:t,event:e}})},c=(!0!==m.noAria&&(s.ariaLabel=ee.value(a,!1)),r?r({scope:o}):void 0);return Ve.h("div",s,[c,it()])}function Re(){const e={ariaHidden:"true",class:{"q-calendar-day__intervals-column":!0,"q-calendar__ellipsis":!0,"q-calendar__sticky":!0===k.value},...A("-interval",e=>{const t=oe(e,o.value,m.timeClicksClamped,b.now);return{scope:{timestamp:t},event:e}})};return Ve.h("div",e,Le())}function Le(){return G.value[0].map(e=>Be(e))}function Be(e){const t=y["interval-label"],a=Xe(m.intervalHeight),n=m.shortIntervalLabel??!1,r=m.showIntervalLabel||ae,o=r(e),u=o?J.value(e,n):void 0;return Ve.h("div",{key:e.time,class:{"q-calendar-day__interval":0===e.minute,"q-calendar-day__interval--section":0!==e.minute},style:{height:a}},[Ve.h("div",{class:"q-calendar-day__interval--text q-calendar__overflow-wrap"},[t?t({scope:{timestamp:e,label:u}}):u])])}function Ye(){const{start:e,end:t,maxDays:a}=j.value,n=(i.value===e.date&&l.value===t.date&&d.value===a||(i.value=e.date,l.value=t.date,d.value=a),s.width>0),r=Ve.withDirectives(Ve.h("div",{key:i.value,class:"q-calendar-day"},[!0===n&&!0!==k.value&&!0!==m.noHeader&&pe(),n&&Me()]),[[Ge,he]]);if(!0!==m.animated)return r;{const o="q-calendar--"+("prev"===u.value?m.transitionPrev:m.transitionNext);return Ve.h(Ve.Transition,{name:o,appear:!0},()=>r)}}return Ve.watch([S],se,{deep:!0,immediate:!0}),Ve.watch(()=>m.modelValue,(e,t)=>{if(p.value!==m.modelValue){if(!0===m.animated){const a=$e(Pe(e)),n=$e(Pe(t));u.value=a>=n?"next":"prev"}p.value=e}f.value=e}),Ve.watch(p,(e,t)=>{if(p.value!==m.modelValue){if(!0===m.animated){const a=$e(Pe(e)),n=$e(Pe(t));u.value=a>=n?"next":"prev"}v("update:model-value",e)}}),Ve.watch(f,e=>{e&&(t.value=ze(e))}),Ve.watch(t,()=>{f.value&&h.value[f.value]?h.value[f.value].focus():ce()}),Ve.watch(()=>m.maxDays,e=>{d.value=e}),Ve.onBeforeUpdate(()=>{h.value={},a.value=void 0,n.value=void 0}),Ve.onMounted(()=>{}),x({prev:fe,next:ye,move:C,moveToToday:me,updateCurrent:V,timeStartPos:de,timeDurationHeight:le,heightToMinutes:ie,scrollToTime:ue}),()=>Q()}});const Ue="4.1.1";me={version:Ue,QCalendarDay:He,...me,...fe,install(e){e.component(String(He.name),He)}};return me}); |
/*! | ||
* @quasar/quasar-ui-qcalendar v4.1.0 | ||
* @quasar/quasar-ui-qcalendar v4.1.1 | ||
* (c) 2025 Jeff Galbraith <jeff@quasar.dev> | ||
* Released under the MIT License. | ||
*/ | ||
var vue=require("vue");const PARSE_DATETIME=/^(\d{4})-(\d{1,2})(-(\d{1,2}))?([^\d]+(\d{1,2}))?(:(\d{1,2}))?(:(\d{1,2}))?(.(\d{1,3}))?$/,PARSE_DATE=/^(\d{4})-(\d{1,2})(-(\d{1,2}))?/,PARSE_TIME=/(\d\d?)(:(\d\d?)|)(:(\d\d?)|)/,DAYS_IN_MONTH=[0,31,28,31,30,31,30,31,31,30,31,30,31],DAYS_IN_MONTH_LEAP=[0,31,29,31,30,31,30,31,31,30,31,30,31],TIME_CONSTANTS={MILLISECONDS_IN:{SECOND:1e3,MINUTE:6e4,HOUR:36e5,DAY:864e5,WEEK:6048e5},SECONDS_IN:{MINUTE:60,HOUR:3600,DAY:86400,WEEK:604800},MINUTES_IN:{MINUTE:1,HOUR:60,DAY:1440,WEEK:10080},HOURS_IN:{DAY:24,WEEK:168},DAYS_IN:{WEEK:7}},DAYS_IN_MONTH_MIN=28,DAYS_IN_MONTH_MAX=31,MONTH_MAX=12,MONTH_MIN=1,DAY_MIN=1,FIRST_HOUR=0;function validateTimestamp(e){return"string"===typeof e&&PARSE_DATETIME.test(e)}function parsed(e){if("string"!==typeof e)return null;const t=PARSE_DATETIME.exec(e);if(!t||!t[1]||!t[2])return null;const a=parseInt(t[1],10),n=parseInt(t[2],10),r=parseInt(t[4]||"1",10),o=parseInt(t[6]||"0",10),d=parseInt(t[8]||"0",10);return{date:e,time:o.toString().padStart(2,"0")+":"+d.toString().padStart(2,"0"),year:a,month:n,day:r,hour:o,minute:d,hasDay:!!t[4],hasTime:!0,past:!1,current:!1,future:!1,disabled:!1,weekday:0,doy:0,workweek:0}}function parseDate(e,t=!1){if(!(e instanceof Date))return null;const a=t?"UTC":"";return updateFormatted({date:padNumber(e[`get${a}FullYear`](),4)+"-"+padNumber(e[`get${a}Month`]()+1,2)+"-"+padNumber(e[`get${a}Date`](),2),time:padNumber(e[`get${a}Hours`]()||0,2)+":"+padNumber(e[`get${a}Minutes`]()||0,2),year:e[`get${a}FullYear`](),month:e[`get${a}Month`]()+1,day:e[`get${a}Date`](),hour:e[`get${a}Hours`](),minute:e[`get${a}Minutes`](),weekday:0,doy:0,workweek:0,hasDay:!0,hasTime:!0,past:!1,current:!1,future:!1,disabled:!1})}function padNumber(e,t){let a=String(e);while(a.length<t)a="0"+a;return a}function isLeapYear(e){return e%4===0&&e%100!==0||e%400===0}function daysInMonth(e,t){return(isLeapYear(e)?DAYS_IN_MONTH_LEAP:DAYS_IN_MONTH)[t]}function nextDay(e){const t=new Date(e.year,e.month-1,e.day+1);return updateFormatted(normalizeTimestamp({...e,year:t.getFullYear(),month:t.getMonth()+1,day:t.getDate()}))}function prevDay(e){const t=new Date(e.year,e.month-1,e.day-1);return updateFormatted(normalizeTimestamp({...e,year:t.getFullYear(),month:t.getMonth()+1,day:t.getDate()}))}function today(){const e=new Date,t=e.getMonth()+1,a=e.getDate(),n=e.getFullYear();return[n,padNumber(t,2),padNumber(a,2)].join("-")}function isToday(e){return e===today()}function getStartOfWeek(e,t,a){let n=copyTimestamp(e);if(t){if(1===n.day||0===n.weekday)while(!t.includes(Number(n.weekday)))n=nextDay(n);n=findWeekday(n,t[0],prevDay),n=updateFormatted(n),a&&(n=updateRelative(n,a,n.hasTime))}return n}function getEndOfWeek(e,t,a){let n=copyTimestamp(e);if(t&&Array.isArray(t)){const r=daysInMonth(n.year,n.month);if(r===n.day||n.weekday===t[t.length-1])while(!t.includes(Number(n.weekday)))n=prevDay(n);n=findWeekday(n,t[t.length-1],nextDay),n=updateFormatted(n),a&&(n=updateRelative(n,a,n.hasTime))}return n}function getStartOfMonth(e){let t=copyTimestamp(e);return t.day=DAY_MIN,t=updateFormatted(t),t}function getEndOfMonth(e){let t=copyTimestamp(e);return t.day=daysInMonth(t.year,t.month),t=updateFormatted(t),t}function parseTime(e){const t=Object.prototype.toString.call(e);switch(t){case"[object Number]":return e;case"[object String]":{const a=PARSE_TIME.exec(e);return a?60*parseInt(a[1],10)+parseInt(a[3]||"0",10):!1}case"[object Object]":return"object"!==typeof e||"number"!==typeof e.hour||"number"!==typeof e.minute?!1:"object"===typeof e&&"hour"in e&&"minute"in e&&60*e.hour+e.minute}return!1}function compareTimestamps(e,t){return!(!e||!t)&&e.year===t.year&&e.month===t.month&&e.day===t.day&&e.hour===t.hour&&e.minute===t.minute}function compareDate(e,t){return getDate(e)===getDate(t)}function compareTime(e,t){return getTime(e)===getTime(t)}function compareDateTime(e,t){return getDateTime(e)===getDateTime(t)}function parseTimestamp(e,t=null){let a=parsed(e);return a?(a=updateFormatted(a),t&&(a=updateRelative(a,t,a.hasTime)),a):null}function getDayIdentifier(e){return 1e8*(e.year??0)+1e6*(e.month??0)+1e4*(e.day??0)}function getTimeIdentifier(e){return 100*(e.hour??0)+(e.minute??0)}function getDayTimeIdentifier(e){return getDayIdentifier(e)+getTimeIdentifier(e)}function diffTimestamp(e,t,a=!1){const n=Date.UTC(e.year??0,(e.month??1)-1,e.day??1,e.hour??0,e.minute??0),r=Date.UTC(t.year??0,(t.month??1)-1,t.day??1,t.hour??0,t.minute??0);return!0===a&&r<n?0:r-n}function updateRelative(e,t,a=!1){let n=copyTimestamp(e),r=getDayIdentifier(t),o=getDayIdentifier(n),d=r===o;return n.hasTime&&a&&d&&(r=getTimeIdentifier(t),o=getTimeIdentifier(n),d=r===o),n.past=o<r,n.current=d,n.future=o>r,n.currentWeekday=n.weekday===t.weekday,n}function updateMinutes(e,t,a=null){let n=copyTimestamp(e);return n.hasTime=!0,n.hour=Math.floor(t/TIME_CONSTANTS.MINUTES_IN.HOUR),n.minute=t%TIME_CONSTANTS.MINUTES_IN.HOUR,n.time=getTime(n),a&&(n=updateRelative(n,a,!0)),n}function updateWeekday(e){let t=copyTimestamp(e);return t.weekday=getWeekday(t),t}function updateDayOfYear(e){let t=copyTimestamp(e);return t.doy=getDayOfYear(t)||0,t}function updateWorkWeek(e){let t=copyTimestamp(e);return t.workweek=getWorkWeek(t),t}function updateDisabled(e,t,a,n,r){let o=copyTimestamp(e);const d=getDayIdentifier(o);if(void 0!==t){const l=parsed(t);if(l){const c=getDayIdentifier(l);d<=c&&(o.disabled=!0)}}if(!0!==o.disabled&&void 0!==a){const m=parsed(a);if(m){const v=getDayIdentifier(m);d>=v&&(o.disabled=!0)}}if(!0!==o.disabled&&Array.isArray(n)&&n.length>0)for(var i in n)if(n[i]===o.weekday){o.disabled=!0;break}if(!0!==o.disabled&&Array.isArray(r)&&r.length>0)for(var u in r)if(Array.isArray(r[u])&&2===r[u].length&&r[u][0]&&r[u][1]){const y=parsed(r[u][0]),p=parsed(r[u][1]);if(y&&p&&isBetweenDates(o,y,p)){o.disabled=!0;break}}else{const f=r[u];if(Array.isArray(f))for(var s of f){const h=parseTimestamp(s);if(h){const g=getDayIdentifier(h);if(g===d){o.disabled=!0;break}}}else if(f){const D=parseTimestamp(f);if(D){const k=getDayIdentifier(D);k===d&&(o.disabled=!0)}}}return o}function updateFormatted(e){let t=copyTimestamp(e);return t.hasTime=!0,t.time=getTime(t),t.date=getDate(t),t.weekday=getWeekday(t),t.doy=getDayOfYear(t)||0,t.workweek=getWorkWeek(t),t}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){let t=copyTimestamp(e);if(0===t.year){const r=parseTimestamp(today());r&&(t=r)}const a=new Date(Date.UTC(t.year,t.month-1,t.day)),n=4;a.setUTCDate(a.getUTCDate()-(a.getUTCDay()+6)%7+n),a.setUTCDate(a.getUTCDate()+n-(a.getUTCDay()||7));e=new Date(Date.UTC(a.getUTCFullYear(),0,1)),e=Math.ceil(((a.valueOf()-e.valueOf())/864e5+1)/7);return e}function getWeekday(e){let t=e.weekday;if(e.hasDay){const a=Math.floor,n=e.day,r=(e.month+9)%MONTH_MAX+1,o=a(e.year/100),d=e.year%100-(e.month<=2?1:0);t=((n+a(2.6*r-.2)-2*o+d+a(d/4)+a(o/4))%7+7)%7}return t??0}function copyTimestamp(e){return{...e}}function getDate(e){let 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):"00:00")}function moveRelativeDays(e,t=nextDay,a=1,n=[0,1,2,3,4,5,6]){const r=copyTimestamp(e);return relativeDays(r,t,a,n)}function relativeDays(e,t=nextDay,a=1,n=[0,1,2,3,4,5,6]){let r=copyTimestamp(e);n.includes(Number(r.weekday))||0!==r.weekday||t!==nextDay||++a;while(--a>=0)r=t(r),n.length<7&&!n.includes(Number(r.weekday))&&++a;return r}function findWeekday(e,t,a=nextDay,n=6){let r=copyTimestamp(e);while(r.weekday!==t&&--n>=0)r=a(r);return r}function createDayList(e,t,a,n=[0,1,2,3,4,5,6],r=void 0,o=void 0,d=[],i=[],u=42,s=0){const l=getDayIdentifier(e),c=getDayIdentifier(t),m=[];let v=copyTimestamp(e),y=0,p=y===c;if(!(c<l))while((!p||m.length<s)&&m.length<u){if(y=getDayIdentifier(v),p=p||y>c&&m.length>=s,p)break;if(n.includes(Number(v.weekday))){let e=copyTimestamp(v);e=updateFormatted(e),e=updateRelative(e,a),e=updateDisabled(e,r,o,d,i),m.push(e)}v=relativeDays(v,nextDay)}return m}function createIntervalList(t,a,n,r,o){const d=[];for(let e=0;e<r;++e){const i=(a+e)*n,u=copyTimestamp(t);d.push(updateMinutes(u,i,o))}return d}function createNativeLocaleFormatter(n,r){const e=()=>"";return"undefined"===typeof Intl||"undefined"===typeof Intl.DateTimeFormat?e:(t,e)=>{try{const a=new Intl.DateTimeFormat(n||void 0,r(t,e));return a.format(makeDateTime(t))}catch(e){return console.error(`Intl.DateTimeFormat: ${e.message} -> `+getDateTime(t)),""}}}function makeDate(e,t=!0){return t?new Date(Date.UTC(e.year,e.month-1,e.day,0,0)):new Date(e.year,e.month-1,e.day,0,0)}function makeDateTime(e,t=!0){return t?new Date(Date.UTC(e.year,e.month-1,e.day,e.hour,e.minute)):new Date(e.year,e.month-1,e.day,e.hour,e.minute)}function validateNumber(e){return isFinite(Number(e))}function maxTimestamp(e,t=!1){const a=!0===t?getDayTimeIdentifier:getDayIdentifier;return e.reduce((e,t)=>{return Math.max(a(e),a(t))===a(e)?e:t})}function minTimestamp(e,t=!1){const a=!0===t?getDayTimeIdentifier:getDayIdentifier;return e.reduce((e,t)=>{return Math.min(a(e),a(t))===a(e)?e:t})}function isBetweenDates(e,t,a,n=!1){const r=getDayIdentifier(e)+(!0===n?getTimeIdentifier(e):0),o=getDayIdentifier(t)+(!0===n?getTimeIdentifier(t):0),d=getDayIdentifier(a)+(!0===n?getTimeIdentifier(a):0);return r>=o&&r<=d}function isOverlappingDates(e,t,a,n){const r=getDayIdentifier(e),o=getDayIdentifier(t),d=getDayIdentifier(a),i=getDayIdentifier(n);return r>=d&&r<=i||o>=d&&o<=i||d>=r&&o>=i}function addToDate(e,t){const a=copyTimestamp(e);return t.year&&(a.year+=t.year),t.month&&(a.month+=t.month),t.day&&(a.day+=t.day),t.hour&&(a.hour+=t.hour),t.minute&&(a.minute+=t.minute),updateFormatted(normalizeTimestamp(a))}function normalizeTimestamp(e){const t=new Date(e.year,e.month-1,e.day,e.hour,e.minute);return{...e,year:t.getFullYear(),month:t.getMonth()+1,day:t.getDate(),hour:t.getHours(),minute:t.getMinutes()}}function daysBetween(e,t){const a=diffTimestamp(e,t,!0);return Math.floor(a/TIME_CONSTANTS.MILLISECONDS_IN.DAY)}function weeksBetween(e,t){let a=copyTimestamp(e),n=copyTimestamp(t);return a=findWeekday(a,0),n=findWeekday(n,6),Math.ceil(daysBetween(a,n)/TIME_CONSTANTS.DAYS_IN.WEEK)}const weekdayDateMap={Sun:new Date("2020-01-05T00:00:00.000Z"),Mon:new Date("2020-01-06T00:00:00.000Z"),Tue:new Date("2020-01-07T00:00:00.000Z"),Wed:new Date("2020-01-08T00:00:00.000Z"),Thu:new Date("2020-01-09T00:00:00.000Z"),Fri:new Date("2020-01-10T00:00:00.000Z"),Sat:new Date("2020-01-11T00:00:00.000Z")};function getWeekdayFormatter(){const e=()=>"",r={long:{timeZone:"UTC",weekday:"long"},short:{timeZone:"UTC",weekday:"short"},narrow:{timeZone:"UTC",weekday:"narrow"}};return"undefined"===typeof Intl||"undefined"===typeof Intl.DateTimeFormat?e:t;function t(t,e,a){try{const n=new Intl.DateTimeFormat(a||void 0,r[e]||r["long"]);return n.format(weekdayDateMap[t])}catch(e){return e instanceof Error&&console.error(`Intl.DateTimeFormat: ${e.message} -> day of week: `+t),""}}}function getWeekdayNames(t,a){const e=Object.keys(weekdayDateMap),n=getWeekdayFormatter();return e.map(e=>String(n(e,t,a)))}function getMonthFormatter(){const e=()=>"",o={long:{timeZone:"UTC",month:"long"},short:{timeZone:"UTC",month:"short"},narrow:{timeZone:"UTC",month:"narrow"}};return"undefined"===typeof Intl||"undefined"===typeof Intl.DateTimeFormat?e:t;function t(t,e,a){try{const n=new Intl.DateTimeFormat(a||void 0,o[e]||o["long"]),r=new Date;return r.setDate(1),r.setMonth(t),n.format(r)}catch(e){return e instanceof Error&&console.error(`Intl.DateTimeFormat: ${e.message} -> month: `+t),""}}}function getMonthNames(t,a){const n=getMonthFormatter();return[...Array(12).keys()].map(e=>n(e,t,a))}function convertToUnit(e,t="px"){if(e)return isNaN(e)?String(e):"auto"===e?e:""+Number(e)+t}function indexOf(t,a){for(let e=0;e<t.length;e++)if(!0===a(t[e],e))return e;return-1}function minCharWidth(e,t){return 0===t?e:e.slice(0,t)}const toCamelCase=e=>e.replace(/(-\w)/g,e=>e[1].toUpperCase());function getMouseEventHandlers(t,e,a,n){const r={};for(const o in a){const d=a[o],i=toCamelCase("on-"+o);if(!e.value)return console.warn("$listeners has not been set up"),{};if(void 0!==e.value[i]){const u="on"+d.event.charAt(0).toUpperCase()+d.event.slice(1),s=e=>{return(void 0===d.button||"buttons"in e&&e.buttons>0&&e.button===d.button)&&(d.prevent&&e.preventDefault(),d.stop&&e.stopPropagation(),t(o,n(e,o))),d.result};u in r?Array.isArray(r[u])?r[u].push(s):r[u]=[r[u],s]:r[u]=s}}return r}function getDefaultMouseEventHandlers(e,t,a,n){return getMouseEventHandlers(e,t,getMouseEventName(a),n)}function getMouseEventName(e){return{["click"+e]:{event:"click"},["contextmenu"+e]:{event:"contextmenu",prevent:!0,result:!1},["mousedown"+e]:{event:"mousedown"},["mousemove"+e]:{event:"mousemove"},["mouseup"+e]:{event:"mouseup"},["mouseenter"+e]:{event:"mouseenter"},["mouseleave"+e]:{event:"mouseleave"},["touchstart"+e]:{event:"touchstart"},["touchmove"+e]:{event:"touchmove"},["touchend"+e]:{event:"touchend"}}}function getRawMouseEvents(e){return Object.keys(getMouseEventName(e))}function useMouseEvents(a,n){return{getMouseEventHandlers:(e,t)=>getMouseEventHandlers(a,n,e,t),getDefaultMouseEventHandlers:(e,t)=>getDefaultMouseEventHandlers(a,n,e,t),getMouseEventName:getMouseEventName,getRawMouseEvents:getRawMouseEvents}}const ResizeObserverDirective={mounted(e,t){if("function"===typeof t.value){const a=t.value,n={callback:a,size:{width:0,height:0},observer:new ResizeObserver(e=>{const t=e[0].contentRect;t.width===n.size.width&&t.height===n.size.height||(n.size.width=t.width,n.size.height=t.height,n.debounceTimeout&&clearTimeout(n.debounceTimeout),n.debounceTimeout=setTimeout(()=>{n.callback(n.size),n.debounceTimeout=void 0},100))})};n.observer.observe(e),e.__onResizeObserver=n}},beforeUnmount(e){if(e.__onResizeObserver){const{observer:t,debounceTimeout:a}=e.__onResizeObserver;a&&clearTimeout(a),t.unobserve(e),delete e.__onResizeObserver}}};function useCalendar(t,a,{scrollArea:e,pane:n}){if(!a){const l="[error: renderCalendar] no renderFunc has been supplied to useCalendar";throw console.error(l),new Error(l)}const r=vue.reactive({width:0,height:0}),o=vue.ref(null);function d({width:e,height:t}){r.width=e,r.height=t}const i=vue.computed(()=>{return!0!==t.noScroll&&e.value&&n.value&&r.height?e.value.offsetWidth-n.value.offsetWidth:0});function u(){}function s(){const e={ref:o,role:"complementary",lang:t.locale,class:`q-calendar ${t.dark?"q-calendar--dark":""} `+(t.bordered?"q-calendar__bordered":"")};return vue.withDirectives(vue.h("div",{...e},[a()]),[[ResizeObserverDirective,d]])}return{rootRef:o,scrollWidth:i,__initCalendar:u,__renderCalendar:s}}const isValidFocusType=e=>e.every(e=>["day","date","weekday","interval","time","resource","task"].includes(e)),useCommonProps={modelValue:{type:String,default:today(),validator:e=>""===e||validateTimestamp(e)},weekdays:{type:Array,default:()=>[0,1,2,3,4,5,6]},dateType:{type:String,default:"round",validator:e=>["round","rounded","square"].includes(e)},weekdayAlign:{type:String,default:"center",validator:e=>["left","center","right"].includes(e)},dateAlign:{type:String,default:"center",validator:e=>["left","center","right"].includes(e)},bordered:Boolean,dark:Boolean,noAria:Boolean,noActiveDate:Boolean,noHeader:Boolean,noScroll:Boolean,shortWeekdayLabel:Boolean,noDefaultHeaderText:Boolean,noDefaultHeaderBtn:Boolean,minWeekdayLabel:{type:[Number,String],default:1},weekdayBreakpoints:{type:Array,default:()=>[75,35],validator:e=>2===e.length},locale:{type:String,default:"en-US"},animated:Boolean,transitionPrev:{type:String,default:"slide-right"},transitionNext:{type:String,default:"slide-left"},disabledDays:Array,disabledBefore:String,disabledAfter:String,disabledWeekdays:{type:Array,default:()=>[]},dragEnterFunc:Function,dragOverFunc:Function,dragLeaveFunc:Function,dropFunc:Function,selectedDates:{type:[Array,Set],default:()=>[]},selectedStartEndDates:{type:Array,default:()=>[]},hoverable:Boolean,focusable:Boolean,focusType:{type:Array,default:()=>["date"],validator:isValidFocusType}};function useCommon(t,{startDate:e,endDate:a,times:n}){const r=vue.computed(()=>parseTimestamp(e.value)),o=vue.computed(()=>{return"0000-00-00"===a.value?getEndOfWeek(r.value,t.weekdays,n.today):parseTimestamp(a.value)||r.value}),d=vue.computed(()=>createNativeLocaleFormatter(t.locale,()=>({timeZone:"UTC",day:"numeric"}))),i=vue.computed(()=>createNativeLocaleFormatter(t.locale,(e,t)=>({timeZone:"UTC",weekday:t?"short":"long"}))),u=vue.computed(()=>createNativeLocaleFormatter(t.locale,()=>({timeZone:"UTC",dateStyle:"full"})));function s(e,t){return e&&e.length>0&&e.includes(t.date)}function l(e,t){const a={firstDay:!1,betweenDays:!1,lastDay:!1};if(2===e.length){const n=getDayIdentifier(t),r=getDayIdentifier(parsed(e[0])),o=getDayIdentifier(parsed(e[1]));a.firstDay=r===n,a.lastDay=o===n,a.betweenDays=r<n&&o>n}return a}function c(e,t=!1,a=[],n=[],r=!1){const o=s(a,e),{firstDay:d,lastDay:i,betweenDays:u}=l(n,e);return{"q-past-day":!d&&!u&&!i&&!o&&!t&&!!e.past,"q-future-day":!d&&!u&&!i&&!o&&!t&&!!e.future,"q-outside":t,"q-current-day":!!e.current,"q-selected":o,"q-range-first":d,"q-range":u,"q-range-last":i,"q-range-hover":r&&(d||i||u),"q-disabled-day disabled":!0===e.disabled}}function m(e){return getStartOfWeek(e,t.weekdays,n.today)}function v(e){return getEndOfWeek(e,t.weekdays,n.today)}function y(){return{}}return{parsedStart:r,parsedEnd:o,dayFormatter:d,weekdayFormatter:i,ariaDateFormatter:u,arrayHasDate:s,checkDays:l,getRelativeClasses:c,startOfWeek:m,endOfWeek:v,dayStyleDefault:y}}const useMonthProps={dayHeight:{type:[Number,String],default:0,validator:e=>validateNumber(e)},dayMinHeight:{type:[Number,String],default:0,validator:e=>validateNumber(e)},dayStyle:Function,dayClass:Function,weekdayStyle:Function,weekdayClass:Function,dayPadding:String,minWeeks:{type:[Number,String],default:1,validator:e=>validateNumber(e)},shortMonthLabel:Boolean,showWorkWeeks:Boolean,showMonthLabel:{type:Boolean,default:!0},showDayOfYearLabel:Boolean,enableOutsideDays:Boolean,noOutsideDays:Boolean,hover:Boolean,miniMode:{type:[Boolean,String],validator:e=>[!0,!1,"auto"].includes(e)},breakpoint:{type:[Number,String],default:"md",validator:e=>["xs","sm","md","lg","xl"].includes(e)||validateNumber(e)},monthLabelSize:{type:String,default:"sm",validator:e=>["xxs","xs","sm","md","lg","xl","xxl"].includes(e)||!!e&&e.length>0}};function useMonth(n,t,{times:r,parsedStart:a,parsedEnd:o,size:d,headerColumnRef:i}){const e=vue.computed(()=>parseInt(n.minWeeks,10)),u=vue.computed(()=>e.value*n.weekdays.length),s=vue.computed(()=>D(w(a.value))),l=vue.computed(()=>k(T(o.value))),c=vue.computed(()=>{let e=0;return n.cellWidth?e=Number(n.cellWidth):d.width>0&&i.value&&(e=i.value.offsetWidth/n.weekdays.length),e}),m=vue.computed(()=>createDayList(s.value,l.value,r.today,n.weekdays,n.disabledBefore,n.disabledAfter,n.disabledWeekdays,n.disabledDays,Number.MAX_SAFE_INTEGER,u.value)),v=vue.computed(()=>{const e=r.today,t=D(e),a=k(e);return createDayList(t,a,e,n.weekdays,n.disabledBefore,n.disabledAfter,n.disabledWeekdays,n.disabledDays,n.weekdays.length,n.weekdays.length)}),y=vue.computed(()=>createNativeLocaleFormatter(n.locale,(e,t)=>({timeZone:"UTC",month:t?"short":"long"}))),p=vue.computed(()=>{switch(n.breakpoint){case"xs":return 300;case"sm":return 350;case"md":return 400;case"lg":return 450;case"xl":return 500;default:return parseInt(n.breakpoint,10)}}),f=vue.computed(()=>{switch(n.monthLabelSize){case"xxs":return".4em";case"xs":return".6em";case"sm":return".8em";case"md":return"1.0em";case"lg":return"1.2em";case"xl":return"1.4em";case"xxl":return"1.6em";default:return n.monthLabelSize}});let h=!0;const g=vue.computed(()=>{const e=!0===n.miniMode||"auto"===n.miniMode&&void 0!==n.breakpoint&&d.width<p.value;return h&&(h=!1,t("mini-mode",e)),e});function D(e){return getStartOfWeek(e,n.weekdays,r.today)}function k(e){return getEndOfWeek(e,n.weekdays,r.today)}function w(e){return getStartOfMonth(e)}function T(e){return getEndOfMonth(e)}function b(e){const t=getDayIdentifier(e);return t<getDayIdentifier(a.value)||t>getDayIdentifier(o.value)}return vue.watch(g,e=>{t("mini-mode",e)}),{parsedCellWidth:c,parsedMinWeeks:e,parsedMinDays:u,parsedMonthStart:s,parsedMonthEnd:l,parsedBreakpoint:p,parsedMonthLabelSize:f,days:m,todayWeek:v,isMiniMode:g,monthFormatter:y,isOutside:b}}const useTimesProps={now:{type:String,validator:e=>""===e||validateTimestamp(e),default:""}};function useTimes(e){const t=vue.reactive({now:parseTimestamp("0000-00-00 00:00"),today:parseTimestamp("0000-00-00")}),a=vue.computed(()=>e.now?parseTimestamp(e.now):o());function n(){t.now&&t.today&&(t.now.current=t.today.current=!0,t.now.past=t.today.past=!1,t.now.future=t.today.future=!1)}function r(){const e=a.value||o();d(e,t.now),i(e,t.now),d(e,t.today)}function o(){return parseDate(new Date)}function d(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)}function i(e,t){e.time!==t.time&&(t.hour=e.hour,t.minute=e.minute,t.time=e.time)}return vue.watch(a,()=>r()),{times:t,parsedNow:a,setCurrent:n,updateCurrent:r,getNow:o,updateDay:d,updateTime:i}}function useRenderValues(r,{parsedView:o,parsedValue:d,times:i}){const e=vue.computed(()=>{const e=d.value;let t=r.maxDays,a=e,n=e;switch(o.value){case"month":a=getStartOfMonth(e),n=getEndOfMonth(e),t=daysInMonth(a.year,a.month);break;case"week":case"week-agenda":case"week-scheduler":a=getStartOfWeek(e,r.weekdays,i.today),n=getEndOfWeek(a,r.weekdays,i.today),t=r.weekdays.length;break;case"day":case"scheduler":case"agenda":n=moveRelativeDays(copyTimestamp(n),nextDay,t>1?t-1:t,r.weekdays),n=updateFormatted(n);break;case"month-interval":case"month-scheduler":case"month-agenda":a=getStartOfMonth(e),n=getEndOfMonth(e),n=updateFormatted(n),t=daysInMonth(a.year,a.month);break;case"resource":t=1,n=moveRelativeDays(copyTimestamp(n),nextDay,t,r.weekdays),n=updateFormatted(n);break}return{start:a,end:n,maxDays:t}});return{renderValues:e}}const useMoveEmits=["moved"];function useMove(u,{parsedView:s,parsedValue:l,direction:c,maxDays:m,times:v,emittedValue:y,emit:p}){function e(a=1){if(0===a)y.value=today();else{let e=copyTimestamp(l.value);const n=getEndOfMonth(e),r=a>0,o=r?nextDay:prevDay,d=r?n.day:1;let t=r?a:-a;c.value=r?"next":"prev";const i=u.weekdays.length;while(--t>=0)switch(s.value){case"month":e.day=d,e=o(e),e=updateWeekday(e);while(!u.weekdays.includes(Number(e.weekday)))e=addToDate(e,{day:r?1:-1});break;case"week":case"week-agenda":case"week-scheduler":e=relativeDays(e,o,i,u.weekdays);break;case"day":case"scheduler":case"agenda":e=relativeDays(e,o,m.value,u.weekdays);break;case"month-interval":case"month-agenda":case"month-scheduler":e.day=d,e=o(e);break;case"resource":e=relativeDays(e,o,m.value,u.weekdays);break}e=updateWeekday(e),e=updateFormatted(e),e=updateDayOfYear(e),e=updateRelative(e,v.now),y.value=e.date,p("moved",e)}}return{move:e}}const listenerRE=/^on[A-Z]/;function useEmitListeners(e=vue.getCurrentInstance()){return{emitListeners:vue.computed(()=>{const t={};return e?.vnode?.props&&Object.keys(e.vnode.props).forEach(e=>{listenerRE.test(e)&&(t[e]=!0)}),t})}}function useFocusHelper(){const e={"aria-hidden":"true",class:"q-calendar__focus-helper"};return[vue.h("span",e)]}function useButton(){function e({focusable:e,focusType:t},a,n){const r=e&&t.includes("date");return vue.h("button",{...a,tabindex:r?0:-1},[n,r&&useFocusHelper()])}return{renderButton:e}}const useCellWidthProps={cellWidth:[Number,String]};function useCellWidth(e){const t=vue.computed(()=>void 0!==e.cellWidth);return{isSticky:t}}const useCheckChangeEmits=["change"];function useCheckChange(n,{days:r,lastStart:o,lastEnd:d}){function e(){const e=r.value;if(0===e.length)return!1;const t=e[0].date,a=e[e.length-1].date;return(!o.value||!d.value||t!==o.value||a!==d.value)&&(o.value=t,d.value=a,n("change",{start:t,end:a,days:e}),!0)}return{checkChange:e}}function useEventUtils(){function e(e,t){return(Array.isArray(t)?t:[t]).includes(e.keyCode)}return{isKeyCode:e}}const isKeyCode=useEventUtils().isKeyCode,useNavigationProps={useNavigation:Boolean};function useNavigation(t,{rootRef:a,focusRef:n,focusValue:r,datesRef:o,parsedView:d,emittedValue:i,direction:u,times:s}){let e=!1;function l(){e||document&&(e=!0,document.addEventListener("keyup",p),document.addEventListener("keydown",y))}function c(){document&&(document.removeEventListener("keyup",p),document.removeEventListener("keydown",y),e=!1)}function m(e){if(e&&document){const t=document.activeElement;if(t!==document.body&&a.value?.contains(t))return!0}return!1}function v(){let t=0;const a=window.setInterval(()=>{const e=o.value[n.value];e&&(e.focus(),50!==++t)&&document.activeElement!==e||window.clearInterval(a)},250)}function y(e){m(e)&&isKeyCode(e,[33,34,35,36,37,38,39,40])&&(e.stopPropagation(),e.preventDefault())}function p(e){if(m(e)&&isKeyCode(e,[33,34,35,36,37,38,39,40])){const t={33:k,34:w,35:b,36:T,37:g,38:f,39:D,40:h};t[e.keyCode]?.()}}function f(){let e=copyTimestamp(r.value);if("month"===d.value){if(e=addToDate(e,{day:-7}),r.value.month!==e.month)return u.value="prev",void(i.value=e.date)}else e=addToDate(e,{minute:Number(t.intervalMinutes)});u.value="prev",n.value=e.date}function h(){let e=copyTimestamp(r.value);if("month"===d.value){if(e=addToDate(e,{day:7}),r.value.month!==e.month)return u.value="next",void(i.value=e.date)}else e=addToDate(e,{minute:Number(t.intervalMinutes)});u.value="next",n.value=e.date}function g(){let e=copyTimestamp(r.value);u.value="prev";do{e=addToDate(e,{day:-1})}while(!t.weekdays.includes(Number(e.weekday)));n.value=e.date}function D(){let e=copyTimestamp(r.value);u.value="next";do{e=addToDate(e,{day:1})}while(!t.weekdays.includes(Number(e.weekday)));n.value=e.date}function k(){let e=copyTimestamp(r.value);e="month"===d.value?addToDate(e,{month:-1}):addToDate(e,{day:-7}),u.value="prev",n.value=e.date}function w(){let e=copyTimestamp(r.value);e="month"===d.value?addToDate(e,{month:1}):addToDate(e,{day:7}),u.value="next",n.value=e.date}function T(){let e=copyTimestamp(r.value);e="month"===d.value?getStartOfMonth(e):getStartOfWeek(e,t.weekdays||[],s.today);while(!t.weekdays.includes(Number(e.weekday)))e=addToDate(e,{day:-1});n.value=e.date}function b(){let e=copyTimestamp(r.value);e="month"===d.value?getEndOfMonth(e):getEndOfWeek(e,t.weekdays||[],s.today);while(!t.weekdays.includes(Number(e.weekday)))e=addToDate(e,{day:-1});n.value=e.date}return vue.onBeforeUnmount(()=>{c()}),vue.watch(()=>t.useNavigation,e=>{(!0===e?l:c)()}),!0===t.useNavigation&&l(),{startNavigation:l,endNavigation:c,tryFocus:v}}const renderButton=useButton().renderButton;var QCalendarMonth=vue.defineComponent({name:"QCalendarMonth",directives:{ResizeObserver:ResizeObserverDirective},props:{...useCommonProps,...useMonthProps,...useTimesProps,...useCellWidthProps,...useNavigationProps},emits:["update:model-value",...useCheckChangeEmits,...useMoveEmits,"mini-mode",...getRawMouseEvents("-date"),...getRawMouseEvents("-day"),...getRawMouseEvents("-head-workweek"),...getRawMouseEvents("-head-day"),...getRawMouseEvents("-workweek")],setup(v,{slots:y,emit:c,expose:R}){const L=vue.ref(null),H=vue.ref(null),e=vue.ref(null),p=vue.ref(v.modelValue||today()),t=vue.ref(parsed(v.modelValue||today())),m=vue.ref({}),s=vue.ref([]),l=vue.ref([]),o=vue.ref("next"),d=vue.ref(v.modelValue||today()),i=vue.ref("0000-00-00"),q=vue.ref(0),f=vue.ref(v.modelValue),u=vue.reactive({width:0,height:0}),h=vue.ref(),g=vue.ref(""),U=vue.ref(null),B=vue.ref(null),a=vue.computed(()=>{return"month"}),n=vue.getCurrentInstance();if(null===n)throw new Error("current instance is null");const D=useEmitListeners(n).emitListeners,Y=useCellWidth(v).isSticky,{times:r,setCurrent:P,updateCurrent:k}=(vue.watch(Y,()=>{}),useTimes(v)),{parsedStart:w,parsedEnd:T,dayFormatter:V,weekdayFormatter:z,ariaDateFormatter:Z,dayStyleDefault:b,getRelativeClasses:K}=(k(),P(),useCommon(v,{startDate:d,endDate:i,times:r})),M=vue.computed(()=>{return parseTimestamp(v.modelValue,r.now)||w.value||r.today}),$=(t.value=M.value,p.value=M.value.date,vue.computed(()=>{const e={};return void 0!==v.dayPadding&&(e.padding=v.dayPadding),e.minWidth=W.value,e.maxWidth=W.value,e.width=W.value,e})),j=useRenderValues(v,{parsedView:a,times:r,parsedValue:M}).renderValues,{rootRef:_,__renderCalendar:X}=useCalendar(v,Ie,{scrollArea:L,pane:H}),{days:N,todayWeek:Q,isMiniMode:I,parsedCellWidth:G,parsedMonthLabelSize:J,isOutside:ee,monthFormatter:te}=useMonth(v,c,{times:r,parsedStart:w,parsedEnd:T,size:u,headerColumnRef:e}),x=useMove(v,{parsedView:a,parsedValue:M,direction:o,maxDays:q,times:r,emittedValue:f,emit:c}).move,E=useMouseEvents(c,D).getDefaultMouseEventHandlers,ae=useCheckChange(c,{days:N,lastStart:U,lastEnd:B}).checkChange,S=useEventUtils().isKeyCode,ne=useNavigation(v,{rootRef:_,focusRef:p,focusValue:t,datesRef:m,parsedView:a,emittedValue:f,direction:o,times:r}).tryFocus,re=vue.computed(()=>{return _.value&&!0===v.showWorkWeeks?parseInt(window.getComputedStyle(_.value).getPropertyValue(!0===I.value?"--calendar-mini-work-week-width":"--calendar-work-week-width"),10):0}),O=vue.computed(()=>{return v.weekdays.length}),W=vue.computed(()=>{if(_.value){const e=u.width||_.value.getBoundingClientRect().width;if(e&&O.value)return(e-re.value)/O.value+"px"}return 100/O.value+"%"}),F=vue.computed(()=>{return!0===v.focusable&&v.focusType.includes("day")&&!0!==I.value}),A=vue.computed(()=>{return!0===v.focusable&&v.focusType.includes("date")&&!0!==F.value});function oe(){f.value=today()}function de(e=1){x(e)}function ie(e=1){x(-e)}function ue({width:e,height:t}){u.width=e,u.height=t}function C(e){return e.date===f.value}function se(t){for(let e=0;e<t.length;++e)if(!0===t[e].current)return{timestamp:t[e]};return{timestamp:!1}}function le(){if(!0!==I.value&&0===v.dayHeight){const t=y.week;if(void 0!==t&&window)for(var e in s.value){const a=s.value[e];if(void 0!==a){const n=l.value[e];if(void 0!==n){const r=window.getComputedStyle(a),o=parseFloat(r.marginTop)+parseFloat(r.marginBottom);n.clientHeight+o>n.clientHeight&&(n.style.height=a.clientHeight+o+"px")}}}}}function ce(){return vue.h("div",{class:"q-calendar-month__body"},[...De()])}function me(){return vue.h("div",{role:"presentation",class:"q-calendar-month__head"},[!0===v.showWorkWeeks&&ye(),vue.h("div",{class:"q-calendar-month__head--wrapper"},[ve()])])}function ve(){return vue.h("div",{ref:e,class:{"q-calendar-month__head--weekdays":!0}},[...pe()])}function ye(){const e=y["head-workweek"],t={start:w.value,end:T.value,miniMode:I.value};return vue.h("div",{class:"q-calendar-month__head--workweek",...E("-head-workweek",e=>{return{scope:t,event:e}})},e?e({scope:t}):"#")}function pe(){return Q.value.map((e,t)=>fe(e,t))}function fe(t,e){const a=y["head-day"],n=N.value.filter(e=>e.weekday===t.weekday),r=n[0].weekday,o=!0!==v.noActiveDate&&C(t),d={activeDate:o,weekday:r,timestamp:t,days:n,index:e,miniMode:I.value,droppable:h.value===Number(t.weekday),disabled:!!v.disabledWeekdays&&v.disabledWeekdays.includes(Number(t.weekday))},i="function"===typeof v.weekdayClass?v.weekdayClass({scope:d}):{},u=!0===v.focusable&&v.focusType.includes("weekday"),s=W.value,l=v.weekdayStyle||b,c={width:s,maxWidth:s,minWidth:s,...l({scope:d})},m={key:t.date+(void 0!==e?"-"+e:""),tabindex:!0===u?0:-1,class:{"q-calendar-month__head--weekday":!0,...i,"q-disabled-day disabled":!0===d.disabled,["q-calendar__"+v.weekdayAlign]:!0,"q-calendar__ellipsis":!0,"q-calendar__focusable":!0===u},style:c,onDragenter:e=>{void 0!==v.dragEnterFunc&&"function"===typeof v.dragEnterFunc&&(!0===v.dragEnterFunc(e,"head-day",{scope:d})?h.value=Number(t.weekday):h.value=-1)},onDragover:e=>{void 0!==v.dragOverFunc&&"function"===typeof v.dragOverFunc&&(!0===v.dragOverFunc(e,"head-day",{scope:d})?h.value=Number(t.weekday):h.value=-1)},onDragleave:e=>{void 0!==v.dragLeaveFunc&&"function"===typeof v.dragLeaveFunc&&(!0===v.dragLeaveFunc(e,"head-day",{scope:d})?h.value=Number(t.weekday):h.value=-1)},onDrop:e=>{void 0!==v.dropFunc&&"function"===typeof v.dropFunc&&(!0===v.dropFunc(e,"head-day",{scope:d})?h.value=Number(t.weekday):h.value=-1)},onFocus:()=>{!0===u&&(p.value=t.date)},...E("-head-day",e=>{return{scope:d,event:e}})};return!0!==v.noAria&&(m.ariaLabel=z.value(t,!1)),vue.h("div",m,[void 0===a&&ge(t,v.shortWeekdayLabel||I.value),void 0!==a&&a({scope:d}),he(t,e),!0===u&&useFocusHelper()])}function he(t,e){const a=y["head-day-event"],n=!0!==v.noActiveDate&&C(t),r=N.value.filter(e=>e.weekday===t.weekday),o=r[0].weekday,d={weekday:o,timestamp:t,days:r,index:e,miniMode:I.value,activeDate:n,disabled:!!v.disabledWeekdays&&v.disabledWeekdays.includes(Number(t.weekday))},i=W.value,u=v.weekdayStyle||b,s={width:i,maxWidth:i,minWidth:i,...u({scope:d})};return vue.h("div",{key:"event-"+t.date+(void 0!==e?"-"+e:""),class:{"q-calendar-month__head--event":!0},style:s},[void 0!==a&&a({scope:d})])}function ge(e,t){const a=z.value(e,t||v.weekdayBreakpoints[0]>0&&G.value<=v.weekdayBreakpoints[0]);return vue.h("span",{class:"q-calendar__ellipsis"},!0===I.value&&!0===v.shortWeekdayLabel||v.weekdayBreakpoints[1]>0&&G.value<=v.weekdayBreakpoints[1]?minCharWidth(a,Number(v.minWeekdayLabel)):a)}function De(){const t=v.weekdays.length,a=[];for(let e=0;e<N.value.length;e+=t)a.push(ke(N.value.slice(e,e+t),e/t));return a}function ke(e,t){const a=y.week,n=v.weekdays,r={week:e,weekdays:n,miniMode:I.value},o={},d=parseInt(String(v.dayHeight),10),i=parseInt(String(v.dayMinHeight),10),u=(o.height=d>0&&!0!==I.value?convertToUnit(d):"auto",i>0&&!0!==I.value&&(o.minHeight=convertToUnit(i)),0===d&&0===i);return vue.h("div",{key:e[0].date,ref:e=>{l.value[t]=e},class:{"q-calendar-month__week--wrapper":!0,"q-calendar-month__week--auto-height":u},style:o},[!0===v.showWorkWeeks?we(e):void 0,vue.h("div",{class:"q-calendar-month__week"},[vue.h("div",{class:"q-calendar-month__week--days"},e.map(e=>Te(e))),!0!==I.value&&void 0!==a?vue.h("div",{ref:e=>{s.value[t]=e},class:"q-calendar-month__week--events"},a({scope:r})):void 0])])}function we(e){const t=y.workweek,a=e.length>2?e[2]:e[0],n=se(e).timestamp,r=Number(a.workweek).toLocaleString(v.locale),o={workweekLabel:r,week:e,miniMode:I.value};return vue.h("div",{key:a.workweek,class:{"q-calendar-month__workweek":!0,...K(!1!==n?n:a,!1)},...E("-workweek",e=>{return{scope:o,event:e}})},t?t({scope:o}):r)}function Te(t){const e=y.day,a=v.dayStyle||b,n=ee(t),r=!0!==v.noActiveDate&&M.value.date===t.date,o=!1===n&&!0===v.showMonthLabel&&N.value.find(e=>e.month===t.month)?.day===t.day,d={outside:n,timestamp:t,miniMode:I.value,activeDate:r,hasMonth:o,droppable:g.value===t.date,disabled:!!v.disabledWeekdays&&v.disabledWeekdays.includes(Number(t.weekday))},i=Object.assign({...$.value},a({scope:d})),u="function"===typeof v.dayClass?v.dayClass({scope:d}):{},s={key:t.date,ref:e=>{!0===F.value&&(m.value[t.date]=e)},tabindex:!0===F.value?0:-1,class:{"q-calendar-month__day":!0,...u,...K(t,n,Array.from(v.selectedDates),v.selectedStartEndDates,v.hover),"q-active-date":!0===r,disabled:!0!==v.enableOutsideDays&&!0===n,"q-calendar__hoverable":!0===v.hoverable,"q-calendar__focusable":!0===F.value},style:i,onFocus:()=>{!0===F.value&&(p.value=t.date)},onKeydown:e=>{!0!==n&&!0!==t.disabled&&S(e,[13,32])&&(e.stopPropagation(),e.preventDefault())},onKeyup:e=>{!0!==n&&!0!==t.disabled&&S(e,[13,32])&&(e.stopPropagation(),e.preventDefault(),void 0!==D.value.onClickDay)&&!0!==I.value&&c("click-day",{scope:d,e:e})},...E("-day",e=>{return{scope:d,event:e}})},l={onDragenter:e=>{void 0!==v.dragEnterFunc&&"function"===typeof v.dragEnterFunc&&(!0===v.dragEnterFunc(e,"day",{scope:d})?g.value=t.date:g.value="")},onDragover:e=>{void 0!==v.dragOverFunc&&"function"===typeof v.dragOverFunc&&(!0===v.dragOverFunc(e,"day",{scope:d})?g.value=t.date:g.value="")},onDragleave:e=>{void 0!==v.dragLeaveFunc&&"function"===typeof v.dragLeaveFunc&&(!0===v.dragLeaveFunc(e,"day",{scope:d})?g.value=t.date:g.value="")},onDrop:e=>{void 0!==v.dropFunc&&"function"===typeof v.dropFunc&&(!0===v.dropFunc(e,"day",{scope:d})?g.value=t.date:g.value="")}};return!0!==n&&Object.assign(s,l),!0!==v.noAria&&(s.ariaLabel=Z.value(t,!1)),vue.h("div",s,[be(t,n,o),vue.h("div",{class:{"q-calendar-month__day--content":!0}},e?e({scope:d}):void 0),!0===F.value&&useFocusHelper()])}function be(e,t,a){let n,r;const o=[Me(e,t)],d=(!0!==I.value&&!0===a&&u.width>340&&(r=Ne(e,t)),!0!==I.value&&!0===v.showDayOfYearLabel&&void 0===r&&u.width>300&&(n=_e(e,t)),"left"===v.dateAlign?(void 0!==n&&o.push(n),void 0!==r&&o.push(r)):"right"===v.dateAlign?(void 0!==n&&o.unshift(n),void 0!==r&&o.unshift(r)):(n=void 0,r=void 0),{class:{"q-calendar-month__day--label__wrapper":!0,"q-calendar__ellipsis":!0,["q-calendar__"+v.dateAlign]:void 0===n&&void 0===r,"q-calendar__justify":void 0!==n||void 0!==r}});return vue.h("div",d,o)}function Me(a,t){if(!0!==t||!0!==v.noOutsideDays){const e=V.value(a,!1),n=y["head-day-label"],r=y["head-day-button"],o=v.selectedDates&&Array.from(v.selectedDates).length>0&&Array.from(v.selectedDates).includes(a.date),d=!0!==v.noActiveDate&&C(a),i={dayLabel:e,timestamp:a,outside:t,activeDate:d,selectedDate:o,miniMode:I.value,disabled:!!v.disabledWeekdays&&v.disabledWeekdays.includes(Number(a.weekday))},u={key:a.date,ref:e=>{!0===A.value&&(m.value[a.date]=e)},tabindex:!0===A.value?0:-1,class:{"q-calendar-month__day--label":!0,"q-calendar__button":!0,"q-calendar__button--round":"round"===v.dateType,"q-calendar__button--rounded":"rounded"===v.dateType,"q-calendar__button--bordered":!0===a.current,"q-calendar__hoverable":!0===v.hoverable,"q-calendar__focusable":!0===A.value},disabled:!0===a.disabled||!0!==v.enableOutsideDays&&!0===t,onFocus:()=>{!0===A.value&&(p.value=a.date)},onKeydown:e=>{!0!==t&&!0!==a.disabled&&S(e,[13,32])&&(e.stopPropagation(),e.preventDefault())},onKeyup:e=>{!0===A.value&&!0!==t&&!0!==a.disabled&&S(e,[13,32])&&(e.stopPropagation(),e.preventDefault(),f.value=a.date,void 0!==D.value.onClickDate)&&c("click-date",{scope:i,event:e})},...E("-date",(e,t)=>{return e.stopPropagation(),"click-date"!==t&&"contextmenu-date"!==t||(f.value=a.date),{scope:i,event:e}})};return!0!==v.noAria&&(u.ariaLabel=Z.value(a,!1)),[r?r({scope:i}):renderButton(v,u,n?n({scope:i}):e),!0===A.value&&useFocusHelper()].filter(e=>!1!==e)}}function _e(e,t){if(!0!==t||!0!==v.noOutsideDays){const a=y["day-of-year"],n={timestamp:e};return vue.h("span",{class:{"q-calendar-month__day--day-of-year":!0,"q-calendar__ellipsis":!0}},a?a({scope:n}):e.doy)}}function Ne(e,t){if(!0!==t||!0!==v.noOutsideDays){const a=y["month-label"],n=te.value(e,v.shortMonthLabel||u.width<500),r={monthLabel:n,timestamp:e,miniMode:I.value},o={};return!0!==I.value&&void 0!==J.value&&(o.fontSize=J.value),vue.h("span",{class:"q-calendar-month__day--month q-calendar__ellipsis",style:o},[a?a({scope:r}):!0!==I.value?n:void 0])}}function Ie(){const{start:e,end:t}=j.value,a=(d.value=e.date,i.value=t.date,u.width>0),n=vue.withDirectives(vue.h("div",{class:{"q-calendar-mini":!0===I.value,"q-calendar-month":!0},key:d.value},[!0===a&&!0!==v.noHeader&&me(),!0===a&&ce()]),[[ResizeObserverDirective,ue]]);if(!0!==v.animated)return n;{const r="q-calendar--"+("prev"===o.value?v.transitionPrev:v.transitionNext);return vue.h(vue.Transition,{name:r,appear:!0},()=>n)}}return vue.watch([N],ae,{deep:!0,immediate:!0}),vue.watch(()=>v.modelValue,(e,t)=>{if(f.value!==e){if(!0===v.animated){const a=getDayIdentifier(parsed(e)),n=getDayIdentifier(parsed(t));o.value=a>=n?"next":"prev"}f.value=e}p.value=e}),vue.watch(f,(e,t)=>{if(f.value!==v.modelValue){if(!0===v.animated){const a=getDayIdentifier(parsed(e)),n=getDayIdentifier(parsed(t));o.value=a>=n?"next":"prev"}c("update:model-value",e)}}),vue.watch(p,e=>{e&&(t.value=parseTimestamp(e),f.value!==e)&&(f.value=e)}),vue.watch(t,()=>{m.value[p.value]?m.value[p.value].focus():ne()}),vue.onBeforeUpdate(()=>{m.value={},s.value=[],l.value=[],vue.nextTick(()=>{le()})}),vue.onMounted(()=>{le()}),R({prev:ie,next:de,move:x,moveToToday:oe,updateCurrent:k}),()=>X()}});const version="4.1.0";exports.DAYS_IN_MONTH=DAYS_IN_MONTH,exports.DAYS_IN_MONTH_LEAP=DAYS_IN_MONTH_LEAP,exports.DAYS_IN_MONTH_MAX=DAYS_IN_MONTH_MAX,exports.DAYS_IN_MONTH_MIN=DAYS_IN_MONTH_MIN,exports.DAY_MIN=DAY_MIN,exports.FIRST_HOUR=FIRST_HOUR,exports.MONTH_MAX=MONTH_MAX,exports.MONTH_MIN=MONTH_MIN,exports.PARSE_DATE=PARSE_DATE,exports.PARSE_DATETIME=PARSE_DATETIME,exports.PARSE_TIME=PARSE_TIME,exports.QCalendarMonth=QCalendarMonth,exports.TIME_CONSTANTS=TIME_CONSTANTS,exports.addToDate=addToDate,exports.compareDate=compareDate,exports.compareDateTime=compareDateTime,exports.compareTime=compareTime,exports.compareTimestamps=compareTimestamps,exports.convertToUnit=convertToUnit,exports.copyTimestamp=copyTimestamp,exports.createDayList=createDayList,exports.createIntervalList=createIntervalList,exports.createNativeLocaleFormatter=createNativeLocaleFormatter,exports.daysBetween=daysBetween,exports.daysInMonth=daysInMonth,exports.diffTimestamp=diffTimestamp,exports.findWeekday=findWeekday,exports.getDate=getDate,exports.getDateTime=getDateTime,exports.getDayIdentifier=getDayIdentifier,exports.getDayOfYear=getDayOfYear,exports.getDayTimeIdentifier=getDayTimeIdentifier,exports.getEndOfMonth=getEndOfMonth,exports.getEndOfWeek=getEndOfWeek,exports.getMonthFormatter=getMonthFormatter,exports.getMonthNames=getMonthNames,exports.getStartOfMonth=getStartOfMonth,exports.getStartOfWeek=getStartOfWeek,exports.getTime=getTime,exports.getTimeIdentifier=getTimeIdentifier,exports.getWeekday=getWeekday,exports.getWeekdayFormatter=getWeekdayFormatter,exports.getWeekdayNames=getWeekdayNames,exports.getWorkWeek=getWorkWeek,exports.indexOf=indexOf,exports.isBetweenDates=isBetweenDates,exports.isLeapYear=isLeapYear,exports.isOverlappingDates=isOverlappingDates,exports.isToday=isToday,exports.makeDate=makeDate,exports.makeDateTime=makeDateTime,exports.maxTimestamp=maxTimestamp,exports.minCharWidth=minCharWidth,exports.minTimestamp=minTimestamp,exports.moveRelativeDays=moveRelativeDays,exports.nextDay=nextDay,exports.padNumber=padNumber,exports.parseDate=parseDate,exports.parseTime=parseTime,exports.parseTimestamp=parseTimestamp,exports.parsed=parsed,exports.prevDay=prevDay,exports.relativeDays=relativeDays,exports.today=today,exports.updateDayOfYear=updateDayOfYear,exports.updateDisabled=updateDisabled,exports.updateFormatted=updateFormatted,exports.updateMinutes=updateMinutes,exports.updateRelative=updateRelative,exports.updateWeekday=updateWeekday,exports.updateWorkWeek=updateWorkWeek,exports.validateNumber=validateNumber,exports.validateTimestamp=validateTimestamp,exports.version=version,exports.weeksBetween=weeksBetween; | ||
var vue=require("vue");const PARSE_DATETIME=/^(\d{4})-(\d{1,2})(-(\d{1,2}))?([^\d]+(\d{1,2}))?(:(\d{1,2}))?(:(\d{1,2}))?(.(\d{1,3}))?$/,PARSE_DATE=/^(\d{4})-(\d{1,2})(-(\d{1,2}))?/,PARSE_TIME=/(\d\d?)(:(\d\d?)|)(:(\d\d?)|)/,DAYS_IN_MONTH=[0,31,28,31,30,31,30,31,31,30,31,30,31],DAYS_IN_MONTH_LEAP=[0,31,29,31,30,31,30,31,31,30,31,30,31],TIME_CONSTANTS={MILLISECONDS_IN:{SECOND:1e3,MINUTE:6e4,HOUR:36e5,DAY:864e5,WEEK:6048e5},SECONDS_IN:{MINUTE:60,HOUR:3600,DAY:86400,WEEK:604800},MINUTES_IN:{MINUTE:1,HOUR:60,DAY:1440,WEEK:10080},HOURS_IN:{DAY:24,WEEK:168},DAYS_IN:{WEEK:7}},DAYS_IN_MONTH_MIN=28,DAYS_IN_MONTH_MAX=31,MONTH_MAX=12,MONTH_MIN=1,DAY_MIN=1,FIRST_HOUR=0;function validateTimestamp(e){return"string"===typeof e&&PARSE_DATETIME.test(e)}function parsed(e){if("string"!==typeof e)return null;const t=PARSE_DATETIME.exec(e);if(!t||!t[1]||!t[2])return null;const a=parseInt(t[1],10),n=parseInt(t[2],10),r=parseInt(t[4]||"1",10),o=parseInt(t[6]||"0",10),d=parseInt(t[8]||"0",10);return{date:e,time:o.toString().padStart(2,"0")+":"+d.toString().padStart(2,"0"),year:a,month:n,day:r,hour:o,minute:d,hasDay:!!t[4],hasTime:!0,past:!1,current:!1,future:!1,disabled:!1,weekday:0,doy:0,workweek:0}}function parseDate(e,t=!1){if(!(e instanceof Date))return null;const a=t?"UTC":"";return updateFormatted({date:padNumber(e[`get${a}FullYear`](),4)+"-"+padNumber(e[`get${a}Month`]()+1,2)+"-"+padNumber(e[`get${a}Date`](),2),time:padNumber(e[`get${a}Hours`]()||0,2)+":"+padNumber(e[`get${a}Minutes`]()||0,2),year:e[`get${a}FullYear`](),month:e[`get${a}Month`]()+1,day:e[`get${a}Date`](),hour:e[`get${a}Hours`](),minute:e[`get${a}Minutes`](),weekday:0,doy:0,workweek:0,hasDay:!0,hasTime:!0,past:!1,current:!1,future:!1,disabled:!1})}function padNumber(e,t){let a=String(e);while(a.length<t)a="0"+a;return a}function isLeapYear(e){return e%4===0&&e%100!==0||e%400===0}function daysInMonth(e,t){return(isLeapYear(e)?DAYS_IN_MONTH_LEAP:DAYS_IN_MONTH)[t]}function nextDay(e){const t=new Date(e.year,e.month-1,e.day+1);return updateFormatted(normalizeTimestamp({...e,year:t.getFullYear(),month:t.getMonth()+1,day:t.getDate()}))}function prevDay(e){const t=new Date(e.year,e.month-1,e.day-1);return updateFormatted(normalizeTimestamp({...e,year:t.getFullYear(),month:t.getMonth()+1,day:t.getDate()}))}function today(){const e=new Date,t=e.getMonth()+1,a=e.getDate(),n=e.getFullYear();return[n,padNumber(t,2),padNumber(a,2)].join("-")}function isToday(e){return e===today()}function getStartOfWeek(e,t,a){let n=copyTimestamp(e);if(t){if(1===n.day||0===n.weekday)while(!t.includes(Number(n.weekday)))n=nextDay(n);n=findWeekday(n,t[0],prevDay),n=updateFormatted(n),a&&(n=updateRelative(n,a,n.hasTime))}return n}function getEndOfWeek(e,t,a){let n=copyTimestamp(e);if(t&&Array.isArray(t)){const r=daysInMonth(n.year,n.month);if(r===n.day||n.weekday===t[t.length-1])while(!t.includes(Number(n.weekday)))n=prevDay(n);n=findWeekday(n,t[t.length-1],nextDay),n=updateFormatted(n),a&&(n=updateRelative(n,a,n.hasTime))}return n}function getStartOfMonth(e){let t=copyTimestamp(e);return t.day=DAY_MIN,t=updateFormatted(t),t}function getEndOfMonth(e){let t=copyTimestamp(e);return t.day=daysInMonth(t.year,t.month),t=updateFormatted(t),t}function parseTime(e){const t=Object.prototype.toString.call(e);switch(t){case"[object Number]":return e;case"[object String]":{const a=PARSE_TIME.exec(e);return a?60*parseInt(a[1],10)+parseInt(a[3]||"0",10):!1}case"[object Object]":return"object"!==typeof e||"number"!==typeof e.hour||"number"!==typeof e.minute?!1:"object"===typeof e&&"hour"in e&&"minute"in e&&60*e.hour+e.minute}return!1}function compareTimestamps(e,t){return!(!e||!t)&&e.year===t.year&&e.month===t.month&&e.day===t.day&&e.hour===t.hour&&e.minute===t.minute}function compareDate(e,t){return getDate(e)===getDate(t)}function compareTime(e,t){return getTime(e)===getTime(t)}function compareDateTime(e,t){return getDateTime(e)===getDateTime(t)}function parseTimestamp(e,t=null){let a=parsed(e);return a?(a=updateFormatted(a),t&&(a=updateRelative(a,t,a.hasTime)),a):null}function getDayIdentifier(e){return 1e8*(e.year??0)+1e6*(e.month??0)+1e4*(e.day??0)}function getTimeIdentifier(e){return 100*(e.hour??0)+(e.minute??0)}function getDayTimeIdentifier(e){return getDayIdentifier(e)+getTimeIdentifier(e)}function diffTimestamp(e,t,a=!1){const n=Date.UTC(e.year??0,(e.month??1)-1,e.day??1,e.hour??0,e.minute??0),r=Date.UTC(t.year??0,(t.month??1)-1,t.day??1,t.hour??0,t.minute??0);return!0===a&&r<n?0:r-n}function updateRelative(e,t,a=!1){let n=copyTimestamp(e),r=getDayIdentifier(t),o=getDayIdentifier(n),d=r===o;return n.hasTime&&a&&d&&(r=getTimeIdentifier(t),o=getTimeIdentifier(n),d=r===o),n.past=o<r,n.current=d,n.future=o>r,n.currentWeekday=n.weekday===t.weekday,n}function updateMinutes(e,t,a=null){let n=copyTimestamp(e);return n.hasTime=!0,n.hour=Math.floor(t/TIME_CONSTANTS.MINUTES_IN.HOUR),n.minute=t%TIME_CONSTANTS.MINUTES_IN.HOUR,n.time=getTime(n),a&&(n=updateRelative(n,a,!0)),n}function updateWeekday(e){let t=copyTimestamp(e);return t.weekday=getWeekday(t),t}function updateDayOfYear(e){let t=copyTimestamp(e);return t.doy=getDayOfYear(t)||0,t}function updateWorkWeek(e){let t=copyTimestamp(e);return t.workweek=getWorkWeek(t),t}function updateDisabled(e,t,a,n,r){let o=copyTimestamp(e);const d=getDayIdentifier(o);if(void 0!==t){const l=parsed(t);if(l){const c=getDayIdentifier(l);d<=c&&(o.disabled=!0)}}if(!0!==o.disabled&&void 0!==a){const m=parsed(a);if(m){const v=getDayIdentifier(m);d>=v&&(o.disabled=!0)}}if(!0!==o.disabled&&Array.isArray(n)&&n.length>0)for(var i in n)if(n[i]===o.weekday){o.disabled=!0;break}if(!0!==o.disabled&&Array.isArray(r)&&r.length>0)for(var u in r)if(Array.isArray(r[u])&&2===r[u].length&&r[u][0]&&r[u][1]){const y=parsed(r[u][0]),p=parsed(r[u][1]);if(y&&p&&isBetweenDates(o,y,p)){o.disabled=!0;break}}else{const f=r[u];if(Array.isArray(f))for(var s of f){const h=parseTimestamp(s);if(h){const g=getDayIdentifier(h);if(g===d){o.disabled=!0;break}}}else if(f){const D=parseTimestamp(f);if(D){const k=getDayIdentifier(D);k===d&&(o.disabled=!0)}}}return o}function updateFormatted(e){let t=copyTimestamp(e);return t.hasTime=!0,t.time=getTime(t),t.date=getDate(t),t.weekday=getWeekday(t),t.doy=getDayOfYear(t)||0,t.workweek=getWorkWeek(t),t}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){let t=copyTimestamp(e);if(0===t.year){const r=parseTimestamp(today());r&&(t=r)}const a=new Date(Date.UTC(t.year,t.month-1,t.day)),n=4;a.setUTCDate(a.getUTCDate()-(a.getUTCDay()+6)%7+n),a.setUTCDate(a.getUTCDate()+n-(a.getUTCDay()||7));e=new Date(Date.UTC(a.getUTCFullYear(),0,1)),e=Math.ceil(((a.valueOf()-e.valueOf())/864e5+1)/7);return e}function getWeekday(e){let t=e.weekday;if(e.hasDay){const a=Math.floor,n=e.day,r=(e.month+9)%MONTH_MAX+1,o=a(e.year/100),d=e.year%100-(e.month<=2?1:0);t=((n+a(2.6*r-.2)-2*o+d+a(d/4)+a(o/4))%7+7)%7}return t??0}function copyTimestamp(e){return{...e}}function getDate(e){let 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):"00:00")}function moveRelativeDays(e,t=nextDay,a=1,n=[0,1,2,3,4,5,6]){const r=copyTimestamp(e);return relativeDays(r,t,a,n)}function relativeDays(e,t=nextDay,a=1,n=[0,1,2,3,4,5,6]){let r=copyTimestamp(e);n.includes(Number(r.weekday))||0!==r.weekday||t!==nextDay||++a;while(--a>=0)r=t(r),n.length<7&&!n.includes(Number(r.weekday))&&++a;return r}function findWeekday(e,t,a=nextDay,n=6){let r=copyTimestamp(e);while(r.weekday!==t&&--n>=0)r=a(r);return r}function createDayList(e,t,a,n=[0,1,2,3,4,5,6],r=void 0,o=void 0,d=[],i=[],u=42,s=0){const l=getDayIdentifier(e),c=getDayIdentifier(t),m=[];let v=copyTimestamp(e),y=0,p=y===c;if(!(c<l))while((!p||m.length<s)&&m.length<u){if(y=getDayIdentifier(v),p=p||y>c&&m.length>=s,p)break;if(n.includes(Number(v.weekday))){let e=copyTimestamp(v);e=updateFormatted(e),e=updateRelative(e,a),e=updateDisabled(e,r,o,d,i),m.push(e)}v=relativeDays(v,nextDay)}return m}function createIntervalList(t,a,n,r,o){const d=[];for(let e=0;e<r;++e){const i=(a+e)*n,u=copyTimestamp(t);d.push(updateMinutes(u,i,o))}return d}function createNativeLocaleFormatter(n,r){const e=()=>"";return"undefined"===typeof Intl||"undefined"===typeof Intl.DateTimeFormat?e:(t,e)=>{try{const a=new Intl.DateTimeFormat(n||void 0,r(t,e));return a.format(makeDateTime(t))}catch(e){return console.error(`Intl.DateTimeFormat: ${e.message} -> `+getDateTime(t)),""}}}function makeDate(e,t=!0){return t?new Date(Date.UTC(e.year,e.month-1,e.day,0,0)):new Date(e.year,e.month-1,e.day,0,0)}function makeDateTime(e,t=!0){return t?new Date(Date.UTC(e.year,e.month-1,e.day,e.hour,e.minute)):new Date(e.year,e.month-1,e.day,e.hour,e.minute)}function validateNumber(e){return isFinite(Number(e))}function maxTimestamp(e,t=!1){const a=!0===t?getDayTimeIdentifier:getDayIdentifier;return e.reduce((e,t)=>{return Math.max(a(e),a(t))===a(e)?e:t})}function minTimestamp(e,t=!1){const a=!0===t?getDayTimeIdentifier:getDayIdentifier;return e.reduce((e,t)=>{return Math.min(a(e),a(t))===a(e)?e:t})}function isBetweenDates(e,t,a,n=!1){const r=getDayIdentifier(e)+(!0===n?getTimeIdentifier(e):0),o=getDayIdentifier(t)+(!0===n?getTimeIdentifier(t):0),d=getDayIdentifier(a)+(!0===n?getTimeIdentifier(a):0);return r>=o&&r<=d}function isOverlappingDates(e,t,a,n){const r=getDayIdentifier(e),o=getDayIdentifier(t),d=getDayIdentifier(a),i=getDayIdentifier(n);return r>=d&&r<=i||o>=d&&o<=i||d>=r&&o>=i}function addToDate(e,t){const a=copyTimestamp(e);return t.year&&(a.year+=t.year),t.month&&(a.month+=t.month),t.day&&(a.day+=t.day),t.hour&&(a.hour+=t.hour),t.minute&&(a.minute+=t.minute),updateFormatted(normalizeTimestamp(a))}function normalizeTimestamp(e){const t=new Date(e.year,e.month-1,e.day,e.hour,e.minute);return{...e,year:t.getFullYear(),month:t.getMonth()+1,day:t.getDate(),hour:t.getHours(),minute:t.getMinutes()}}function daysBetween(e,t){const a=diffTimestamp(e,t,!0);return Math.floor(a/TIME_CONSTANTS.MILLISECONDS_IN.DAY)}function weeksBetween(e,t){let a=copyTimestamp(e),n=copyTimestamp(t);return a=findWeekday(a,0),n=findWeekday(n,6),Math.ceil(daysBetween(a,n)/TIME_CONSTANTS.DAYS_IN.WEEK)}const weekdayDateMap={Sun:new Date("2020-01-05T00:00:00.000Z"),Mon:new Date("2020-01-06T00:00:00.000Z"),Tue:new Date("2020-01-07T00:00:00.000Z"),Wed:new Date("2020-01-08T00:00:00.000Z"),Thu:new Date("2020-01-09T00:00:00.000Z"),Fri:new Date("2020-01-10T00:00:00.000Z"),Sat:new Date("2020-01-11T00:00:00.000Z")};function getWeekdayFormatter(){const e=()=>"",r={long:{timeZone:"UTC",weekday:"long"},short:{timeZone:"UTC",weekday:"short"},narrow:{timeZone:"UTC",weekday:"narrow"}};return"undefined"===typeof Intl||"undefined"===typeof Intl.DateTimeFormat?e:t;function t(t,e,a){try{const n=new Intl.DateTimeFormat(a||void 0,r[e]||r["long"]);return n.format(weekdayDateMap[t])}catch(e){return e instanceof Error&&console.error(`Intl.DateTimeFormat: ${e.message} -> day of week: `+t),""}}}function getWeekdayNames(t,a){const e=Object.keys(weekdayDateMap),n=getWeekdayFormatter();return e.map(e=>String(n(e,t,a)))}function getMonthFormatter(){const e=()=>"",o={long:{timeZone:"UTC",month:"long"},short:{timeZone:"UTC",month:"short"},narrow:{timeZone:"UTC",month:"narrow"}};return"undefined"===typeof Intl||"undefined"===typeof Intl.DateTimeFormat?e:t;function t(t,e,a){try{const n=new Intl.DateTimeFormat(a||void 0,o[e]||o["long"]),r=new Date;return r.setDate(1),r.setMonth(t),n.format(r)}catch(e){return e instanceof Error&&console.error(`Intl.DateTimeFormat: ${e.message} -> month: `+t),""}}}function getMonthNames(t,a){const n=getMonthFormatter();return[...Array(12).keys()].map(e=>n(e,t,a))}function convertToUnit(e,t="px"){if(e)return isNaN(e)?String(e):"auto"===e?e:""+Number(e)+t}function indexOf(t,a){for(let e=0;e<t.length;e++)if(!0===a(t[e],e))return e;return-1}function minCharWidth(e,t){return 0===t?e:e.slice(0,t)}const toCamelCase=e=>e.replace(/(-\w)/g,e=>e[1].toUpperCase());function getMouseEventHandlers(t,e,a,n){const r={};for(const o in a){const d=a[o],i=toCamelCase("on-"+o);if(!e.value)return console.warn("$listeners has not been set up"),{};if(void 0!==e.value[i]){const u="on"+d.event.charAt(0).toUpperCase()+d.event.slice(1),s=e=>{return(void 0===d.button||"buttons"in e&&e.buttons>0&&e.button===d.button)&&(d.prevent&&e.preventDefault(),d.stop&&e.stopPropagation(),t(o,n(e,o))),d.result};u in r?Array.isArray(r[u])?r[u].push(s):r[u]=[r[u],s]:r[u]=s}}return r}function getDefaultMouseEventHandlers(e,t,a,n){return getMouseEventHandlers(e,t,getMouseEventName(a),n)}function getMouseEventName(e){return{["click"+e]:{event:"click"},["contextmenu"+e]:{event:"contextmenu",prevent:!0,result:!1},["mousedown"+e]:{event:"mousedown"},["mousemove"+e]:{event:"mousemove"},["mouseup"+e]:{event:"mouseup"},["mouseenter"+e]:{event:"mouseenter"},["mouseleave"+e]:{event:"mouseleave"},["touchstart"+e]:{event:"touchstart"},["touchmove"+e]:{event:"touchmove"},["touchend"+e]:{event:"touchend"}}}function getRawMouseEvents(e){return Object.keys(getMouseEventName(e))}function useMouseEvents(a,n){return{getMouseEventHandlers:(e,t)=>getMouseEventHandlers(a,n,e,t),getDefaultMouseEventHandlers:(e,t)=>getDefaultMouseEventHandlers(a,n,e,t),getMouseEventName:getMouseEventName,getRawMouseEvents:getRawMouseEvents}}const ResizeObserverDirective={mounted(e,t){if("function"===typeof t.value){const a=t.value,n={callback:a,size:{width:0,height:0},observer:new ResizeObserver(e=>{const t=e[0].contentRect;t.width===n.size.width&&t.height===n.size.height||(n.size.width=t.width,n.size.height=t.height,n.debounceTimeout&&clearTimeout(n.debounceTimeout),n.debounceTimeout=setTimeout(()=>{n.callback(n.size),n.debounceTimeout=void 0},100))})};n.observer.observe(e),e.__onResizeObserver=n}},beforeUnmount(e){if(e.__onResizeObserver){const{observer:t,debounceTimeout:a}=e.__onResizeObserver;a&&clearTimeout(a),t.unobserve(e),delete e.__onResizeObserver}}};function useCalendar(t,a,{scrollArea:e,pane:n}){if(!a){const l="[error: renderCalendar] no renderFunc has been supplied to useCalendar";throw console.error(l),new Error(l)}const r=vue.reactive({width:0,height:0}),o=vue.ref(null);function d({width:e,height:t}){r.width=e,r.height=t}const i=vue.computed(()=>{return!0!==t.noScroll&&e.value&&n.value&&r.height?e.value.offsetWidth-n.value.offsetWidth:0});function u(){}function s(){const e={ref:o,role:"complementary",lang:t.locale,class:`q-calendar ${t.dark?"q-calendar--dark":""} `+(t.bordered?"q-calendar__bordered":"")};return vue.withDirectives(vue.h("div",{...e},[a()]),[[ResizeObserverDirective,d]])}return{rootRef:o,scrollWidth:i,__initCalendar:u,__renderCalendar:s}}const isValidFocusType=e=>e.every(e=>["day","date","weekday","interval","time","resource","task"].includes(e)),useCommonProps={modelValue:{type:String,default:today(),validator:e=>""===e||validateTimestamp(e)},weekdays:{type:Array,default:()=>[0,1,2,3,4,5,6]},dateType:{type:String,default:"round",validator:e=>["round","rounded","square"].includes(e)},weekdayAlign:{type:String,default:"center",validator:e=>["left","center","right"].includes(e)},dateAlign:{type:String,default:"center",validator:e=>["left","center","right"].includes(e)},bordered:Boolean,dark:Boolean,noAria:Boolean,noActiveDate:Boolean,noHeader:Boolean,noScroll:Boolean,shortWeekdayLabel:Boolean,noDefaultHeaderText:Boolean,noDefaultHeaderBtn:Boolean,minWeekdayLabel:{type:[Number,String],default:1},weekdayBreakpoints:{type:Array,default:()=>[75,35],validator:e=>2===e.length},locale:{type:String,default:"en-US"},animated:Boolean,transitionPrev:{type:String,default:"slide-right"},transitionNext:{type:String,default:"slide-left"},disabledDays:Array,disabledBefore:String,disabledAfter:String,disabledWeekdays:{type:Array,default:()=>[]},dragEnterFunc:Function,dragOverFunc:Function,dragLeaveFunc:Function,dropFunc:Function,selectedDates:{type:[Array,Set],default:()=>[]},selectedStartEndDates:{type:Array,default:()=>[]},hoverable:Boolean,focusable:Boolean,focusType:{type:Array,default:()=>["date"],validator:isValidFocusType}};function useCommon(t,{startDate:e,endDate:a,times:n}){const r=vue.computed(()=>parseTimestamp(e.value)),o=vue.computed(()=>{return"0000-00-00"===a.value?getEndOfWeek(r.value,t.weekdays,n.today):parseTimestamp(a.value)||r.value}),d=vue.computed(()=>createNativeLocaleFormatter(t.locale,()=>({timeZone:"UTC",day:"numeric"}))),i=vue.computed(()=>createNativeLocaleFormatter(t.locale,(e,t)=>({timeZone:"UTC",weekday:t?"short":"long"}))),u=vue.computed(()=>createNativeLocaleFormatter(t.locale,()=>({timeZone:"UTC",dateStyle:"full"})));function s(e,t){return e&&e.length>0&&e.includes(t.date)}function l(e,t){const a={firstDay:!1,betweenDays:!1,lastDay:!1};if(2===e.length){const n=getDayIdentifier(t),r=getDayIdentifier(parsed(e[0])),o=getDayIdentifier(parsed(e[1]));a.firstDay=r===n,a.lastDay=o===n,a.betweenDays=r<n&&o>n}return a}function c(e,t=!1,a=[],n=[],r=!1){const o=s(a,e),{firstDay:d,lastDay:i,betweenDays:u}=l(n,e);return{"q-past-day":!d&&!u&&!i&&!o&&!t&&!!e.past,"q-future-day":!d&&!u&&!i&&!o&&!t&&!!e.future,"q-outside":t,"q-current-day":!!e.current,"q-selected":o,"q-range-first":d,"q-range":u,"q-range-last":i,"q-range-hover":r&&(d||i||u),"q-disabled-day disabled":!0===e.disabled}}function m(e){return getStartOfWeek(e,t.weekdays,n.today)}function v(e){return getEndOfWeek(e,t.weekdays,n.today)}function y(){return{}}return{parsedStart:r,parsedEnd:o,dayFormatter:d,weekdayFormatter:i,ariaDateFormatter:u,arrayHasDate:s,checkDays:l,getRelativeClasses:c,startOfWeek:m,endOfWeek:v,dayStyleDefault:y}}const useMonthProps={dayHeight:{type:[Number,String],default:0,validator:e=>validateNumber(e)},dayMinHeight:{type:[Number,String],default:0,validator:e=>validateNumber(e)},dayStyle:Function,dayClass:Function,weekdayStyle:Function,weekdayClass:Function,dayPadding:String,minWeeks:{type:[Number,String],default:1,validator:e=>validateNumber(e)},shortMonthLabel:Boolean,showWorkWeeks:Boolean,showMonthLabel:{type:Boolean,default:!0},showDayOfYearLabel:Boolean,enableOutsideDays:Boolean,noOutsideDays:Boolean,hover:Boolean,miniMode:{type:[Boolean,String],validator:e=>[!0,!1,"auto"].includes(e)},breakpoint:{type:[Number,String],default:"md",validator:e=>["xs","sm","md","lg","xl"].includes(e)||validateNumber(e)},monthLabelSize:{type:String,default:"sm",validator:e=>["xxs","xs","sm","md","lg","xl","xxl"].includes(e)||!!e&&e.length>0}};function useMonth(n,t,{times:r,parsedStart:a,parsedEnd:o,size:d,headerColumnRef:i}){const e=vue.computed(()=>parseInt(n.minWeeks,10)),u=vue.computed(()=>e.value*n.weekdays.length),s=vue.computed(()=>D(w(a.value))),l=vue.computed(()=>k(T(o.value))),c=vue.computed(()=>{let e=0;return n.cellWidth?e=Number(n.cellWidth):d.width>0&&i.value&&(e=i.value.offsetWidth/n.weekdays.length),e}),m=vue.computed(()=>createDayList(s.value,l.value,r.today,n.weekdays,n.disabledBefore,n.disabledAfter,n.disabledWeekdays,n.disabledDays,Number.MAX_SAFE_INTEGER,u.value)),v=vue.computed(()=>{const e=r.today,t=D(e),a=k(e);return createDayList(t,a,e,n.weekdays,n.disabledBefore,n.disabledAfter,n.disabledWeekdays,n.disabledDays,n.weekdays.length,n.weekdays.length)}),y=vue.computed(()=>createNativeLocaleFormatter(n.locale,(e,t)=>({timeZone:"UTC",month:t?"short":"long"}))),p=vue.computed(()=>{switch(n.breakpoint){case"xs":return 300;case"sm":return 350;case"md":return 400;case"lg":return 450;case"xl":return 500;default:return parseInt(n.breakpoint,10)}}),f=vue.computed(()=>{switch(n.monthLabelSize){case"xxs":return".4em";case"xs":return".6em";case"sm":return".8em";case"md":return"1.0em";case"lg":return"1.2em";case"xl":return"1.4em";case"xxl":return"1.6em";default:return n.monthLabelSize}});let h=!0;const g=vue.computed(()=>{const e=!0===n.miniMode||"auto"===n.miniMode&&void 0!==n.breakpoint&&d.width<p.value;return h&&(h=!1,t("mini-mode",e)),e});function D(e){return getStartOfWeek(e,n.weekdays,r.today)}function k(e){return getEndOfWeek(e,n.weekdays,r.today)}function w(e){return getStartOfMonth(e)}function T(e){return getEndOfMonth(e)}function b(e){const t=getDayIdentifier(e);return t<getDayIdentifier(a.value)||t>getDayIdentifier(o.value)}return vue.watch(g,e=>{t("mini-mode",e)}),{parsedCellWidth:c,parsedMinWeeks:e,parsedMinDays:u,parsedMonthStart:s,parsedMonthEnd:l,parsedBreakpoint:p,parsedMonthLabelSize:f,days:m,todayWeek:v,isMiniMode:g,monthFormatter:y,isOutside:b}}const useTimesProps={now:{type:String,validator:e=>""===e||validateTimestamp(e),default:""}};function useTimes(e){const t=vue.reactive({now:parseTimestamp("0000-00-00 00:00"),today:parseTimestamp("0000-00-00")}),a=vue.computed(()=>e.now?parseTimestamp(e.now):o());function n(){t.now&&t.today&&(t.now.current=t.today.current=!0,t.now.past=t.today.past=!1,t.now.future=t.today.future=!1)}function r(){const e=a.value||o();d(e,t.now),i(e,t.now),d(e,t.today)}function o(){return parseDate(new Date)}function d(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)}function i(e,t){e.time!==t.time&&(t.hour=e.hour,t.minute=e.minute,t.time=e.time)}return vue.watch(a,()=>r()),{times:t,parsedNow:a,setCurrent:n,updateCurrent:r,getNow:o,updateDay:d,updateTime:i}}function useRenderValues(r,{parsedView:o,parsedValue:d,times:i}){const e=vue.computed(()=>{const e=d.value;let t=r.maxDays,a=e,n=e;switch(o.value){case"month":a=getStartOfMonth(e),n=getEndOfMonth(e),t=daysInMonth(a.year,a.month);break;case"week":case"week-agenda":case"week-scheduler":a=getStartOfWeek(e,r.weekdays,i.today),n=getEndOfWeek(a,r.weekdays,i.today),t=r.weekdays.length;break;case"day":case"scheduler":case"agenda":n=moveRelativeDays(copyTimestamp(n),nextDay,t>1?t-1:t,r.weekdays),n=updateFormatted(n);break;case"month-interval":case"month-scheduler":case"month-agenda":a=getStartOfMonth(e),n=getEndOfMonth(e),n=updateFormatted(n),t=daysInMonth(a.year,a.month);break;case"resource":t=1,n=moveRelativeDays(copyTimestamp(n),nextDay,t,r.weekdays),n=updateFormatted(n);break}return{start:a,end:n,maxDays:t}});return{renderValues:e}}const useMoveEmits=["moved"];function useMove(u,{parsedView:s,parsedValue:l,direction:c,maxDays:m,times:v,emittedValue:y,emit:p}){function e(a=1){if(0===a)y.value=today();else{let e=copyTimestamp(l.value);const n=getEndOfMonth(e),r=a>0,o=r?nextDay:prevDay,d=r?n.day:1;let t=r?a:-a;c.value=r?"next":"prev";const i=u.weekdays.length;while(--t>=0)switch(s.value){case"month":e.day=d,e=o(e),e=updateWeekday(e);while(!u.weekdays.includes(Number(e.weekday)))e=addToDate(e,{day:r?1:-1});break;case"week":case"week-agenda":case"week-scheduler":e=relativeDays(e,o,i,u.weekdays);break;case"day":case"scheduler":case"agenda":e=relativeDays(e,o,m.value,u.weekdays);break;case"month-interval":case"month-agenda":case"month-scheduler":e.day=d,e=o(e);break;case"resource":e=relativeDays(e,o,m.value,u.weekdays);break}e=updateWeekday(e),e=updateFormatted(e),e=updateDayOfYear(e),e=updateRelative(e,v.now),y.value=e.date,p("moved",e)}}return{move:e}}const listenerRE=/^on[A-Z]/;function useEmitListeners(e=vue.getCurrentInstance()){return{emitListeners:vue.computed(()=>{const t={};return e?.vnode?.props&&Object.keys(e.vnode.props).forEach(e=>{listenerRE.test(e)&&(t[e]=!0)}),t})}}function useFocusHelper(){const e={"aria-hidden":"true",class:"q-calendar__focus-helper"};return[vue.h("span",e)]}function useButton(){function e({focusable:e,focusType:t},a,n){const r=e&&t.includes("date");return vue.h("button",{...a,tabindex:r?0:-1},[n,r&&useFocusHelper()])}return{renderButton:e}}const useCellWidthProps={cellWidth:[Number,String]};function useCellWidth(e){const t=vue.computed(()=>void 0!==e.cellWidth);return{isSticky:t}}const useCheckChangeEmits=["change"];function useCheckChange(n,{days:r,lastStart:o,lastEnd:d}){function e(){const e=r.value;if(0===e.length)return!1;const t=e[0].date,a=e[e.length-1].date;return(!o.value||!d.value||t!==o.value||a!==d.value)&&(o.value=t,d.value=a,n("change",{start:t,end:a,days:e}),!0)}return{checkChange:e}}function useEventUtils(){function e(e,t){return(Array.isArray(t)?t:[t]).includes(e.keyCode)}return{isKeyCode:e}}const isKeyCode=useEventUtils().isKeyCode,useNavigationProps={useNavigation:Boolean};function useNavigation(t,{rootRef:a,focusRef:n,focusValue:r,datesRef:o,parsedView:d,emittedValue:i,direction:u,times:s}){let e=!1;function l(){e||document&&(e=!0,document.addEventListener("keyup",p),document.addEventListener("keydown",y))}function c(){document&&(document.removeEventListener("keyup",p),document.removeEventListener("keydown",y),e=!1)}function m(e){if(e&&document){const t=document.activeElement;if(t!==document.body&&a.value?.contains(t))return!0}return!1}function v(){let t=0;const a=window.setInterval(()=>{const e=o.value[n.value];e&&(e.focus(),50!==++t)&&document.activeElement!==e||window.clearInterval(a)},250)}function y(e){m(e)&&isKeyCode(e,[33,34,35,36,37,38,39,40])&&(e.stopPropagation(),e.preventDefault())}function p(e){if(m(e)&&isKeyCode(e,[33,34,35,36,37,38,39,40])){const t={33:k,34:w,35:b,36:T,37:g,38:f,39:D,40:h};t[e.keyCode]?.()}}function f(){let e=copyTimestamp(r.value);if("month"===d.value){if(e=addToDate(e,{day:-7}),r.value.month!==e.month)return u.value="prev",void(i.value=e.date)}else e=addToDate(e,{minute:Number(t.intervalMinutes)});u.value="prev",n.value=e.date}function h(){let e=copyTimestamp(r.value);if("month"===d.value){if(e=addToDate(e,{day:7}),r.value.month!==e.month)return u.value="next",void(i.value=e.date)}else e=addToDate(e,{minute:Number(t.intervalMinutes)});u.value="next",n.value=e.date}function g(){let e=copyTimestamp(r.value);u.value="prev";do{e=addToDate(e,{day:-1})}while(!t.weekdays.includes(Number(e.weekday)));n.value=e.date}function D(){let e=copyTimestamp(r.value);u.value="next";do{e=addToDate(e,{day:1})}while(!t.weekdays.includes(Number(e.weekday)));n.value=e.date}function k(){let e=copyTimestamp(r.value);e="month"===d.value?addToDate(e,{month:-1}):addToDate(e,{day:-7}),u.value="prev",n.value=e.date}function w(){let e=copyTimestamp(r.value);e="month"===d.value?addToDate(e,{month:1}):addToDate(e,{day:7}),u.value="next",n.value=e.date}function T(){let e=copyTimestamp(r.value);e="month"===d.value?getStartOfMonth(e):getStartOfWeek(e,t.weekdays||[],s.today);while(!t.weekdays.includes(Number(e.weekday)))e=addToDate(e,{day:-1});n.value=e.date}function b(){let e=copyTimestamp(r.value);e="month"===d.value?getEndOfMonth(e):getEndOfWeek(e,t.weekdays||[],s.today);while(!t.weekdays.includes(Number(e.weekday)))e=addToDate(e,{day:-1});n.value=e.date}return vue.onBeforeUnmount(()=>{c()}),vue.watch(()=>t.useNavigation,e=>{(!0===e?l:c)()}),!0===t.useNavigation&&l(),{startNavigation:l,endNavigation:c,tryFocus:v}}const renderButton=useButton().renderButton;var QCalendarMonth=vue.defineComponent({name:"QCalendarMonth",directives:{ResizeObserver:ResizeObserverDirective},props:{...useCommonProps,...useMonthProps,...useTimesProps,...useCellWidthProps,...useNavigationProps},emits:["update:model-value",...useCheckChangeEmits,...useMoveEmits,"mini-mode",...getRawMouseEvents("-date"),...getRawMouseEvents("-day"),...getRawMouseEvents("-head-workweek"),...getRawMouseEvents("-head-day"),...getRawMouseEvents("-workweek")],setup(v,{slots:y,emit:c,expose:R}){const L=vue.ref(null),H=vue.ref(null),e=vue.ref(null),p=vue.ref(v.modelValue||today()),t=vue.ref(parsed(v.modelValue||today())),m=vue.ref({}),s=vue.ref([]),l=vue.ref([]),o=vue.ref("next"),d=vue.ref(v.modelValue||today()),i=vue.ref("0000-00-00"),q=vue.ref(0),f=vue.ref(v.modelValue),u=vue.reactive({width:0,height:0}),h=vue.ref(),g=vue.ref(""),U=vue.ref(null),B=vue.ref(null),a=vue.computed(()=>{return"month"}),n=vue.getCurrentInstance();if(null===n)throw new Error("current instance is null");const D=useEmitListeners(n).emitListeners,Y=useCellWidth(v).isSticky,{times:r,setCurrent:P,updateCurrent:k}=(vue.watch(Y,()=>{}),useTimes(v)),{parsedStart:w,parsedEnd:T,dayFormatter:V,weekdayFormatter:z,ariaDateFormatter:Z,dayStyleDefault:b,getRelativeClasses:K}=(k(),P(),useCommon(v,{startDate:d,endDate:i,times:r})),M=vue.computed(()=>{return parseTimestamp(v.modelValue,r.now)||w.value||r.today}),$=(t.value=M.value,p.value=M.value.date,vue.computed(()=>{const e={};return void 0!==v.dayPadding&&(e.padding=v.dayPadding),e.minWidth=W.value,e.maxWidth=W.value,e.width=W.value,e})),j=useRenderValues(v,{parsedView:a,times:r,parsedValue:M}).renderValues,{rootRef:_,__renderCalendar:X}=useCalendar(v,Ie,{scrollArea:L,pane:H}),{days:N,todayWeek:Q,isMiniMode:I,parsedCellWidth:G,parsedMonthLabelSize:J,isOutside:ee,monthFormatter:te}=useMonth(v,c,{times:r,parsedStart:w,parsedEnd:T,size:u,headerColumnRef:e}),x=useMove(v,{parsedView:a,parsedValue:M,direction:o,maxDays:q,times:r,emittedValue:f,emit:c}).move,E=useMouseEvents(c,D).getDefaultMouseEventHandlers,ae=useCheckChange(c,{days:N,lastStart:U,lastEnd:B}).checkChange,S=useEventUtils().isKeyCode,ne=useNavigation(v,{rootRef:_,focusRef:p,focusValue:t,datesRef:m,parsedView:a,emittedValue:f,direction:o,times:r}).tryFocus,re=vue.computed(()=>{return _.value&&!0===v.showWorkWeeks?parseInt(window.getComputedStyle(_.value).getPropertyValue(!0===I.value?"--calendar-mini-work-week-width":"--calendar-work-week-width"),10):0}),O=vue.computed(()=>{return v.weekdays.length}),W=vue.computed(()=>{if(_.value){const e=u.width||_.value.getBoundingClientRect().width;if(e&&O.value)return(e-re.value)/O.value+"px"}return 100/O.value+"%"}),F=vue.computed(()=>{return!0===v.focusable&&v.focusType.includes("day")&&!0!==I.value}),A=vue.computed(()=>{return!0===v.focusable&&v.focusType.includes("date")&&!0!==F.value});function oe(){f.value=today()}function de(e=1){x(e)}function ie(e=1){x(-e)}function ue({width:e,height:t}){u.width=e,u.height=t}function C(e){return e.date===f.value}function se(t){for(let e=0;e<t.length;++e)if(!0===t[e].current)return{timestamp:t[e]};return{timestamp:!1}}function le(){if(!0!==I.value&&0===v.dayHeight){const t=y.week;if(void 0!==t&&window)for(var e in s.value){const a=s.value[e];if(void 0!==a){const n=l.value[e];if(void 0!==n){const r=window.getComputedStyle(a),o=parseFloat(r.marginTop)+parseFloat(r.marginBottom);n.clientHeight+o>n.clientHeight&&(n.style.height=a.clientHeight+o+"px")}}}}}function ce(){return vue.h("div",{class:"q-calendar-month__body"},[...De()])}function me(){return vue.h("div",{role:"presentation",class:"q-calendar-month__head"},[!0===v.showWorkWeeks&&ye(),vue.h("div",{class:"q-calendar-month__head--wrapper"},[ve()])])}function ve(){return vue.h("div",{ref:e,class:{"q-calendar-month__head--weekdays":!0}},[...pe()])}function ye(){const e=y["head-workweek"],t={start:w.value,end:T.value,miniMode:I.value};return vue.h("div",{class:"q-calendar-month__head--workweek",...E("-head-workweek",e=>{return{scope:t,event:e}})},e?e({scope:t}):"#")}function pe(){return Q.value.map((e,t)=>fe(e,t))}function fe(t,e){const a=y["head-day"],n=N.value.filter(e=>e.weekday===t.weekday),r=n[0].weekday,o=!0!==v.noActiveDate&&C(t),d={activeDate:o,weekday:r,timestamp:t,days:n,index:e,miniMode:I.value,droppable:h.value===Number(t.weekday),disabled:!!v.disabledWeekdays&&v.disabledWeekdays.includes(Number(t.weekday))},i="function"===typeof v.weekdayClass?v.weekdayClass({scope:d}):{},u=!0===v.focusable&&v.focusType.includes("weekday"),s=W.value,l=v.weekdayStyle||b,c={width:s,maxWidth:s,minWidth:s,...l({scope:d})},m={key:t.date+(void 0!==e?"-"+e:""),tabindex:!0===u?0:-1,class:{"q-calendar-month__head--weekday":!0,...i,"q-disabled-day disabled":!0===d.disabled,["q-calendar__"+v.weekdayAlign]:!0,"q-calendar__ellipsis":!0,"q-calendar__focusable":!0===u},style:c,onDragenter:e=>{void 0!==v.dragEnterFunc&&"function"===typeof v.dragEnterFunc&&(!0===v.dragEnterFunc(e,"head-day",{scope:d})?h.value=Number(t.weekday):h.value=-1)},onDragover:e=>{void 0!==v.dragOverFunc&&"function"===typeof v.dragOverFunc&&(!0===v.dragOverFunc(e,"head-day",{scope:d})?h.value=Number(t.weekday):h.value=-1)},onDragleave:e=>{void 0!==v.dragLeaveFunc&&"function"===typeof v.dragLeaveFunc&&(!0===v.dragLeaveFunc(e,"head-day",{scope:d})?h.value=Number(t.weekday):h.value=-1)},onDrop:e=>{void 0!==v.dropFunc&&"function"===typeof v.dropFunc&&(!0===v.dropFunc(e,"head-day",{scope:d})?h.value=Number(t.weekday):h.value=-1)},onFocus:()=>{!0===u&&(p.value=t.date)},...E("-head-day",e=>{return{scope:d,event:e}})};return!0!==v.noAria&&(m.ariaLabel=z.value(t,!1)),vue.h("div",m,[void 0===a&&ge(t,v.shortWeekdayLabel||I.value),void 0!==a&&a({scope:d}),he(t,e),!0===u&&useFocusHelper()])}function he(t,e){const a=y["head-day-event"],n=!0!==v.noActiveDate&&C(t),r=N.value.filter(e=>e.weekday===t.weekday),o=r[0].weekday,d={weekday:o,timestamp:t,days:r,index:e,miniMode:I.value,activeDate:n,disabled:!!v.disabledWeekdays&&v.disabledWeekdays.includes(Number(t.weekday))},i=W.value,u=v.weekdayStyle||b,s={width:i,maxWidth:i,minWidth:i,...u({scope:d})};return vue.h("div",{key:"event-"+t.date+(void 0!==e?"-"+e:""),class:{"q-calendar-month__head--event":!0},style:s},[void 0!==a&&a({scope:d})])}function ge(e,t){const a=z.value(e,t||v.weekdayBreakpoints[0]>0&&G.value<=v.weekdayBreakpoints[0]);return vue.h("span",{class:"q-calendar__ellipsis"},!0===I.value&&!0===v.shortWeekdayLabel||v.weekdayBreakpoints[1]>0&&G.value<=v.weekdayBreakpoints[1]?minCharWidth(a,Number(v.minWeekdayLabel)):a)}function De(){const t=v.weekdays.length,a=[];for(let e=0;e<N.value.length;e+=t)a.push(ke(N.value.slice(e,e+t),e/t));return a}function ke(e,t){const a=y.week,n=v.weekdays,r={week:e,weekdays:n,miniMode:I.value},o={},d=parseInt(String(v.dayHeight),10),i=parseInt(String(v.dayMinHeight),10),u=(o.height=d>0&&!0!==I.value?convertToUnit(d):"auto",i>0&&!0!==I.value&&(o.minHeight=convertToUnit(i)),0===d&&0===i);return vue.h("div",{key:e[0].date,ref:e=>{l.value[t]=e},class:{"q-calendar-month__week--wrapper":!0,"q-calendar-month__week--auto-height":u},style:o},[!0===v.showWorkWeeks?we(e):void 0,vue.h("div",{class:"q-calendar-month__week"},[vue.h("div",{class:"q-calendar-month__week--days"},e.map(e=>Te(e))),!0!==I.value&&void 0!==a?vue.h("div",{ref:e=>{s.value[t]=e},class:"q-calendar-month__week--events"},a({scope:r})):void 0])])}function we(e){const t=y.workweek,a=e.length>2?e[2]:e[0],n=se(e).timestamp,r=Number(a.workweek).toLocaleString(v.locale),o={workweekLabel:r,week:e,miniMode:I.value};return vue.h("div",{key:a.workweek,class:{"q-calendar-month__workweek":!0,...K(!1!==n?n:a,!1)},...E("-workweek",e=>{return{scope:o,event:e}})},t?t({scope:o}):r)}function Te(t){const e=y.day,a=v.dayStyle||b,n=ee(t),r=!0!==v.noActiveDate&&M.value.date===t.date,o=!1===n&&!0===v.showMonthLabel&&N.value.find(e=>e.month===t.month)?.day===t.day,d={outside:n,timestamp:t,miniMode:I.value,activeDate:r,hasMonth:o,droppable:g.value===t.date,disabled:!!v.disabledWeekdays&&v.disabledWeekdays.includes(Number(t.weekday))},i=Object.assign({...$.value},a({scope:d})),u="function"===typeof v.dayClass?v.dayClass({scope:d}):{},s={key:t.date,ref:e=>{!0===F.value&&(m.value[t.date]=e)},tabindex:!0===F.value?0:-1,class:{"q-calendar-month__day":!0,...u,...K(t,n,Array.from(v.selectedDates),v.selectedStartEndDates,v.hover),"q-active-date":!0===r,disabled:!0!==v.enableOutsideDays&&!0===n,"q-calendar__hoverable":!0===v.hoverable,"q-calendar__focusable":!0===F.value},style:i,onFocus:()=>{!0===F.value&&(p.value=t.date)},onKeydown:e=>{!0!==n&&!0!==t.disabled&&S(e,[13,32])&&(e.stopPropagation(),e.preventDefault())},onKeyup:e=>{!0!==n&&!0!==t.disabled&&S(e,[13,32])&&(e.stopPropagation(),e.preventDefault(),void 0!==D.value.onClickDay)&&!0!==I.value&&c("click-day",{scope:d,e:e})},...E("-day",e=>{return{scope:d,event:e}})},l={onDragenter:e=>{void 0!==v.dragEnterFunc&&"function"===typeof v.dragEnterFunc&&(!0===v.dragEnterFunc(e,"day",{scope:d})?g.value=t.date:g.value="")},onDragover:e=>{void 0!==v.dragOverFunc&&"function"===typeof v.dragOverFunc&&(!0===v.dragOverFunc(e,"day",{scope:d})?g.value=t.date:g.value="")},onDragleave:e=>{void 0!==v.dragLeaveFunc&&"function"===typeof v.dragLeaveFunc&&(!0===v.dragLeaveFunc(e,"day",{scope:d})?g.value=t.date:g.value="")},onDrop:e=>{void 0!==v.dropFunc&&"function"===typeof v.dropFunc&&(!0===v.dropFunc(e,"day",{scope:d})?g.value=t.date:g.value="")}};return!0!==n&&Object.assign(s,l),!0!==v.noAria&&(s.ariaLabel=Z.value(t,!1)),vue.h("div",s,[be(t,n,o),vue.h("div",{class:{"q-calendar-month__day--content":!0}},e?e({scope:d}):void 0),!0===F.value&&useFocusHelper()])}function be(e,t,a){let n,r;const o=[Me(e,t)],d=(!0!==I.value&&!0===a&&u.width>340&&(r=Ne(e,t)),!0!==I.value&&!0===v.showDayOfYearLabel&&void 0===r&&u.width>300&&(n=_e(e,t)),"left"===v.dateAlign?(void 0!==n&&o.push(n),void 0!==r&&o.push(r)):"right"===v.dateAlign?(void 0!==n&&o.unshift(n),void 0!==r&&o.unshift(r)):(n=void 0,r=void 0),{class:{"q-calendar-month__day--label__wrapper":!0,"q-calendar__ellipsis":!0,["q-calendar__"+v.dateAlign]:void 0===n&&void 0===r,"q-calendar__justify":void 0!==n||void 0!==r}});return vue.h("div",d,o)}function Me(a,t){if(!0!==t||!0!==v.noOutsideDays){const e=V.value(a,!1),n=y["head-day-label"],r=y["head-day-button"],o=v.selectedDates&&Array.from(v.selectedDates).length>0&&Array.from(v.selectedDates).includes(a.date),d=!0!==v.noActiveDate&&C(a),i={dayLabel:e,timestamp:a,outside:t,activeDate:d,selectedDate:o,miniMode:I.value,disabled:!!v.disabledWeekdays&&v.disabledWeekdays.includes(Number(a.weekday))},u={key:a.date,ref:e=>{!0===A.value&&(m.value[a.date]=e)},tabindex:!0===A.value?0:-1,class:{"q-calendar-month__day--label":!0,"q-calendar__button":!0,"q-calendar__button--round":"round"===v.dateType,"q-calendar__button--rounded":"rounded"===v.dateType,"q-calendar__button--bordered":!0===a.current,"q-calendar__hoverable":!0===v.hoverable,"q-calendar__focusable":!0===A.value},disabled:!0===a.disabled||!0!==v.enableOutsideDays&&!0===t,onFocus:()=>{!0===A.value&&(p.value=a.date)},onKeydown:e=>{!0!==t&&!0!==a.disabled&&S(e,[13,32])&&(e.stopPropagation(),e.preventDefault())},onKeyup:e=>{!0===A.value&&!0!==t&&!0!==a.disabled&&S(e,[13,32])&&(e.stopPropagation(),e.preventDefault(),f.value=a.date,void 0!==D.value.onClickDate)&&c("click-date",{scope:i,event:e})},...E("-date",(e,t)=>{return e.stopPropagation(),"click-date"!==t&&"contextmenu-date"!==t||(f.value=a.date),{scope:i,event:e}})};return!0!==v.noAria&&(u.ariaLabel=Z.value(a,!1)),[r?r({scope:i}):renderButton(v,u,n?n({scope:i}):e),!0===A.value&&useFocusHelper()].filter(e=>!1!==e)}}function _e(e,t){if(!0!==t||!0!==v.noOutsideDays){const a=y["day-of-year"],n={timestamp:e};return vue.h("span",{class:{"q-calendar-month__day--day-of-year":!0,"q-calendar__ellipsis":!0}},a?a({scope:n}):e.doy)}}function Ne(e,t){if(!0!==t||!0!==v.noOutsideDays){const a=y["month-label"],n=te.value(e,v.shortMonthLabel||u.width<500),r={monthLabel:n,timestamp:e,miniMode:I.value},o={};return!0!==I.value&&void 0!==J.value&&(o.fontSize=J.value),vue.h("span",{class:"q-calendar-month__day--month q-calendar__ellipsis",style:o},[a?a({scope:r}):!0!==I.value?n:void 0])}}function Ie(){const{start:e,end:t}=j.value,a=(d.value=e.date,i.value=t.date,u.width>0),n=vue.withDirectives(vue.h("div",{class:{"q-calendar-mini":!0===I.value,"q-calendar-month":!0},key:d.value},[!0===a&&!0!==v.noHeader&&me(),!0===a&&ce()]),[[ResizeObserverDirective,ue]]);if(!0!==v.animated)return n;{const r="q-calendar--"+("prev"===o.value?v.transitionPrev:v.transitionNext);return vue.h(vue.Transition,{name:r,appear:!0},()=>n)}}return vue.watch([N],ae,{deep:!0,immediate:!0}),vue.watch(()=>v.modelValue,(e,t)=>{if(f.value!==e){if(!0===v.animated){const a=getDayIdentifier(parsed(e)),n=getDayIdentifier(parsed(t));o.value=a>=n?"next":"prev"}f.value=e}p.value=e}),vue.watch(f,(e,t)=>{if(f.value!==v.modelValue){if(!0===v.animated){const a=getDayIdentifier(parsed(e)),n=getDayIdentifier(parsed(t));o.value=a>=n?"next":"prev"}c("update:model-value",e)}}),vue.watch(p,e=>{e&&(t.value=parseTimestamp(e),f.value!==e)&&(f.value=e)}),vue.watch(t,()=>{m.value[p.value]?m.value[p.value].focus():ne()}),vue.onBeforeUpdate(()=>{m.value={},s.value=[],l.value=[],vue.nextTick(()=>{le()})}),vue.onMounted(()=>{le()}),R({prev:ie,next:de,move:x,moveToToday:oe,updateCurrent:k}),()=>X()}});const version="4.1.1";exports.DAYS_IN_MONTH=DAYS_IN_MONTH,exports.DAYS_IN_MONTH_LEAP=DAYS_IN_MONTH_LEAP,exports.DAYS_IN_MONTH_MAX=DAYS_IN_MONTH_MAX,exports.DAYS_IN_MONTH_MIN=DAYS_IN_MONTH_MIN,exports.DAY_MIN=DAY_MIN,exports.FIRST_HOUR=FIRST_HOUR,exports.MONTH_MAX=MONTH_MAX,exports.MONTH_MIN=MONTH_MIN,exports.PARSE_DATE=PARSE_DATE,exports.PARSE_DATETIME=PARSE_DATETIME,exports.PARSE_TIME=PARSE_TIME,exports.QCalendarMonth=QCalendarMonth,exports.TIME_CONSTANTS=TIME_CONSTANTS,exports.addToDate=addToDate,exports.compareDate=compareDate,exports.compareDateTime=compareDateTime,exports.compareTime=compareTime,exports.compareTimestamps=compareTimestamps,exports.convertToUnit=convertToUnit,exports.copyTimestamp=copyTimestamp,exports.createDayList=createDayList,exports.createIntervalList=createIntervalList,exports.createNativeLocaleFormatter=createNativeLocaleFormatter,exports.daysBetween=daysBetween,exports.daysInMonth=daysInMonth,exports.diffTimestamp=diffTimestamp,exports.findWeekday=findWeekday,exports.getDate=getDate,exports.getDateTime=getDateTime,exports.getDayIdentifier=getDayIdentifier,exports.getDayOfYear=getDayOfYear,exports.getDayTimeIdentifier=getDayTimeIdentifier,exports.getEndOfMonth=getEndOfMonth,exports.getEndOfWeek=getEndOfWeek,exports.getMonthFormatter=getMonthFormatter,exports.getMonthNames=getMonthNames,exports.getStartOfMonth=getStartOfMonth,exports.getStartOfWeek=getStartOfWeek,exports.getTime=getTime,exports.getTimeIdentifier=getTimeIdentifier,exports.getWeekday=getWeekday,exports.getWeekdayFormatter=getWeekdayFormatter,exports.getWeekdayNames=getWeekdayNames,exports.getWorkWeek=getWorkWeek,exports.indexOf=indexOf,exports.isBetweenDates=isBetweenDates,exports.isLeapYear=isLeapYear,exports.isOverlappingDates=isOverlappingDates,exports.isToday=isToday,exports.makeDate=makeDate,exports.makeDateTime=makeDateTime,exports.maxTimestamp=maxTimestamp,exports.minCharWidth=minCharWidth,exports.minTimestamp=minTimestamp,exports.moveRelativeDays=moveRelativeDays,exports.nextDay=nextDay,exports.padNumber=padNumber,exports.parseDate=parseDate,exports.parseTime=parseTime,exports.parseTimestamp=parseTimestamp,exports.parsed=parsed,exports.prevDay=prevDay,exports.relativeDays=relativeDays,exports.today=today,exports.updateDayOfYear=updateDayOfYear,exports.updateDisabled=updateDisabled,exports.updateFormatted=updateFormatted,exports.updateMinutes=updateMinutes,exports.updateRelative=updateRelative,exports.updateWeekday=updateWeekday,exports.updateWorkWeek=updateWorkWeek,exports.validateNumber=validateNumber,exports.validateTimestamp=validateTimestamp,exports.version=version,exports.weeksBetween=weeksBetween; |
/*! | ||
* @quasar/quasar-ui-qcalendar v4.1.0 | ||
* @quasar/quasar-ui-qcalendar v4.1.1 | ||
* (c) 2025 Jeff Galbraith <jeff@quasar.dev> | ||
* Released under the MIT License. | ||
*/ | ||
import{reactive,ref,computed,withDirectives,h,watch,getCurrentInstance,onBeforeUnmount,defineComponent,onBeforeUpdate,nextTick,onMounted,Transition}from"vue";const PARSE_DATETIME=/^(\d{4})-(\d{1,2})(-(\d{1,2}))?([^\d]+(\d{1,2}))?(:(\d{1,2}))?(:(\d{1,2}))?(.(\d{1,3}))?$/,PARSE_DATE=/^(\d{4})-(\d{1,2})(-(\d{1,2}))?/,PARSE_TIME=/(\d\d?)(:(\d\d?)|)(:(\d\d?)|)/,DAYS_IN_MONTH=[0,31,28,31,30,31,30,31,31,30,31,30,31],DAYS_IN_MONTH_LEAP=[0,31,29,31,30,31,30,31,31,30,31,30,31],TIME_CONSTANTS={MILLISECONDS_IN:{SECOND:1e3,MINUTE:6e4,HOUR:36e5,DAY:864e5,WEEK:6048e5},SECONDS_IN:{MINUTE:60,HOUR:3600,DAY:86400,WEEK:604800},MINUTES_IN:{MINUTE:1,HOUR:60,DAY:1440,WEEK:10080},HOURS_IN:{DAY:24,WEEK:168},DAYS_IN:{WEEK:7}},DAYS_IN_MONTH_MIN=28,DAYS_IN_MONTH_MAX=31,MONTH_MAX=12,MONTH_MIN=1,DAY_MIN=1,FIRST_HOUR=0;function validateTimestamp(e){return"string"===typeof e&&PARSE_DATETIME.test(e)}function parsed(e){if("string"!==typeof e)return null;const t=PARSE_DATETIME.exec(e);if(!t||!t[1]||!t[2])return null;const a=parseInt(t[1],10),n=parseInt(t[2],10),r=parseInt(t[4]||"1",10),o=parseInt(t[6]||"0",10),i=parseInt(t[8]||"0",10);return{date:e,time:o.toString().padStart(2,"0")+":"+i.toString().padStart(2,"0"),year:a,month:n,day:r,hour:o,minute:i,hasDay:!!t[4],hasTime:!0,past:!1,current:!1,future:!1,disabled:!1,weekday:0,doy:0,workweek:0}}function parseDate(e,t=!1){if(!(e instanceof Date))return null;const a=t?"UTC":"";return updateFormatted({date:padNumber(e[`get${a}FullYear`](),4)+"-"+padNumber(e[`get${a}Month`]()+1,2)+"-"+padNumber(e[`get${a}Date`](),2),time:padNumber(e[`get${a}Hours`]()||0,2)+":"+padNumber(e[`get${a}Minutes`]()||0,2),year:e[`get${a}FullYear`](),month:e[`get${a}Month`]()+1,day:e[`get${a}Date`](),hour:e[`get${a}Hours`](),minute:e[`get${a}Minutes`](),weekday:0,doy:0,workweek:0,hasDay:!0,hasTime:!0,past:!1,current:!1,future:!1,disabled:!1})}function padNumber(e,t){let a=String(e);while(a.length<t)a="0"+a;return a}function isLeapYear(e){return e%4===0&&e%100!==0||e%400===0}function daysInMonth(e,t){return(isLeapYear(e)?DAYS_IN_MONTH_LEAP:DAYS_IN_MONTH)[t]}function nextDay(e){const t=new Date(e.year,e.month-1,e.day+1);return updateFormatted(normalizeTimestamp({...e,year:t.getFullYear(),month:t.getMonth()+1,day:t.getDate()}))}function prevDay(e){const t=new Date(e.year,e.month-1,e.day-1);return updateFormatted(normalizeTimestamp({...e,year:t.getFullYear(),month:t.getMonth()+1,day:t.getDate()}))}function today(){const e=new Date,t=e.getMonth()+1,a=e.getDate(),n=e.getFullYear();return[n,padNumber(t,2),padNumber(a,2)].join("-")}function isToday(e){return e===today()}function getStartOfWeek(e,t,a){let n=copyTimestamp(e);if(t){if(1===n.day||0===n.weekday)while(!t.includes(Number(n.weekday)))n=nextDay(n);n=findWeekday(n,t[0],prevDay),n=updateFormatted(n),a&&(n=updateRelative(n,a,n.hasTime))}return n}function getEndOfWeek(e,t,a){let n=copyTimestamp(e);if(t&&Array.isArray(t)){const r=daysInMonth(n.year,n.month);if(r===n.day||n.weekday===t[t.length-1])while(!t.includes(Number(n.weekday)))n=prevDay(n);n=findWeekday(n,t[t.length-1],nextDay),n=updateFormatted(n),a&&(n=updateRelative(n,a,n.hasTime))}return n}function getStartOfMonth(e){let t=copyTimestamp(e);return t.day=DAY_MIN,t=updateFormatted(t),t}function getEndOfMonth(e){let t=copyTimestamp(e);return t.day=daysInMonth(t.year,t.month),t=updateFormatted(t),t}function parseTime(e){const t=Object.prototype.toString.call(e);switch(t){case"[object Number]":return e;case"[object String]":{const a=PARSE_TIME.exec(e);return a?60*parseInt(a[1],10)+parseInt(a[3]||"0",10):!1}case"[object Object]":return"object"!==typeof e||"number"!==typeof e.hour||"number"!==typeof e.minute?!1:"object"===typeof e&&"hour"in e&&"minute"in e&&60*e.hour+e.minute}return!1}function compareTimestamps(e,t){return!(!e||!t)&&e.year===t.year&&e.month===t.month&&e.day===t.day&&e.hour===t.hour&&e.minute===t.minute}function compareDate(e,t){return getDate(e)===getDate(t)}function compareTime(e,t){return getTime(e)===getTime(t)}function compareDateTime(e,t){return getDateTime(e)===getDateTime(t)}function parseTimestamp(e,t=null){let a=parsed(e);return a?(a=updateFormatted(a),t&&(a=updateRelative(a,t,a.hasTime)),a):null}function getDayIdentifier(e){return 1e8*(e.year??0)+1e6*(e.month??0)+1e4*(e.day??0)}function getTimeIdentifier(e){return 100*(e.hour??0)+(e.minute??0)}function getDayTimeIdentifier(e){return getDayIdentifier(e)+getTimeIdentifier(e)}function diffTimestamp(e,t,a=!1){const n=Date.UTC(e.year??0,(e.month??1)-1,e.day??1,e.hour??0,e.minute??0),r=Date.UTC(t.year??0,(t.month??1)-1,t.day??1,t.hour??0,t.minute??0);return!0===a&&r<n?0:r-n}function updateRelative(e,t,a=!1){let n=copyTimestamp(e),r=getDayIdentifier(t),o=getDayIdentifier(n),i=r===o;return n.hasTime&&a&&i&&(r=getTimeIdentifier(t),o=getTimeIdentifier(n),i=r===o),n.past=o<r,n.current=i,n.future=o>r,n.currentWeekday=n.weekday===t.weekday,n}function updateMinutes(e,t,a=null){let n=copyTimestamp(e);return n.hasTime=!0,n.hour=Math.floor(t/TIME_CONSTANTS.MINUTES_IN.HOUR),n.minute=t%TIME_CONSTANTS.MINUTES_IN.HOUR,n.time=getTime(n),a&&(n=updateRelative(n,a,!0)),n}function updateWeekday(e){let t=copyTimestamp(e);return t.weekday=getWeekday(t),t}function updateDayOfYear(e){let t=copyTimestamp(e);return t.doy=getDayOfYear(t)||0,t}function updateWorkWeek(e){let t=copyTimestamp(e);return t.workweek=getWorkWeek(t),t}function updateDisabled(e,t,a,n,r){let o=copyTimestamp(e);const i=getDayIdentifier(o);if(void 0!==t){const l=parsed(t);if(l){const c=getDayIdentifier(l);i<=c&&(o.disabled=!0)}}if(!0!==o.disabled&&void 0!==a){const m=parsed(a);if(m){const y=getDayIdentifier(m);i>=y&&(o.disabled=!0)}}if(!0!==o.disabled&&Array.isArray(n)&&n.length>0)for(var d in n)if(n[d]===o.weekday){o.disabled=!0;break}if(!0!==o.disabled&&Array.isArray(r)&&r.length>0)for(var s in r)if(Array.isArray(r[s])&&2===r[s].length&&r[s][0]&&r[s][1]){const p=parsed(r[s][0]),v=parsed(r[s][1]);if(p&&v&&isBetweenDates(o,p,v)){o.disabled=!0;break}}else{const f=r[s];if(Array.isArray(f))for(var u of f){const h=parseTimestamp(u);if(h){const g=getDayIdentifier(h);if(g===i){o.disabled=!0;break}}}else if(f){const D=parseTimestamp(f);if(D){const T=getDayIdentifier(D);T===i&&(o.disabled=!0)}}}return o}function updateFormatted(e){let t=copyTimestamp(e);return t.hasTime=!0,t.time=getTime(t),t.date=getDate(t),t.weekday=getWeekday(t),t.doy=getDayOfYear(t)||0,t.workweek=getWorkWeek(t),t}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){let t=copyTimestamp(e);if(0===t.year){const r=parseTimestamp(today());r&&(t=r)}const a=new Date(Date.UTC(t.year,t.month-1,t.day)),n=4;a.setUTCDate(a.getUTCDate()-(a.getUTCDay()+6)%7+n),a.setUTCDate(a.getUTCDate()+n-(a.getUTCDay()||7));e=new Date(Date.UTC(a.getUTCFullYear(),0,1)),e=Math.ceil(((a.valueOf()-e.valueOf())/864e5+1)/7);return e}function getWeekday(e){let t=e.weekday;if(e.hasDay){const a=Math.floor,n=e.day,r=(e.month+9)%MONTH_MAX+1,o=a(e.year/100),i=e.year%100-(e.month<=2?1:0);t=((n+a(2.6*r-.2)-2*o+i+a(i/4)+a(o/4))%7+7)%7}return t??0}function copyTimestamp(e){return{...e}}function getDate(e){let 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):"00:00")}function moveRelativeDays(e,t=nextDay,a=1,n=[0,1,2,3,4,5,6]){const r=copyTimestamp(e);return relativeDays(r,t,a,n)}function relativeDays(e,t=nextDay,a=1,n=[0,1,2,3,4,5,6]){let r=copyTimestamp(e);n.includes(Number(r.weekday))||0!==r.weekday||t!==nextDay||++a;while(--a>=0)r=t(r),n.length<7&&!n.includes(Number(r.weekday))&&++a;return r}function findWeekday(e,t,a=nextDay,n=6){let r=copyTimestamp(e);while(r.weekday!==t&&--n>=0)r=a(r);return r}function createDayList(e,t,a,n=[0,1,2,3,4,5,6],r=void 0,o=void 0,i=[],d=[],s=42,u=0){const l=getDayIdentifier(e),c=getDayIdentifier(t),m=[];let y=copyTimestamp(e),p=0,v=p===c;if(!(c<l))while((!v||m.length<u)&&m.length<s){if(p=getDayIdentifier(y),v=v||p>c&&m.length>=u,v)break;if(n.includes(Number(y.weekday))){let e=copyTimestamp(y);e=updateFormatted(e),e=updateRelative(e,a),e=updateDisabled(e,r,o,i,d),m.push(e)}y=relativeDays(y,nextDay)}return m}function createIntervalList(t,a,n,r,o){const i=[];for(let e=0;e<r;++e){const d=(a+e)*n,s=copyTimestamp(t);i.push(updateMinutes(s,d,o))}return i}function createNativeLocaleFormatter(n,r){const e=()=>"";return"undefined"===typeof Intl||"undefined"===typeof Intl.DateTimeFormat?e:(t,e)=>{try{const a=new Intl.DateTimeFormat(n||void 0,r(t,e));return a.format(makeDateTime(t))}catch(e){return console.error(`Intl.DateTimeFormat: ${e.message} -> `+getDateTime(t)),""}}}function makeDate(e,t=!0){return t?new Date(Date.UTC(e.year,e.month-1,e.day,0,0)):new Date(e.year,e.month-1,e.day,0,0)}function makeDateTime(e,t=!0){return t?new Date(Date.UTC(e.year,e.month-1,e.day,e.hour,e.minute)):new Date(e.year,e.month-1,e.day,e.hour,e.minute)}function validateNumber(e){return isFinite(Number(e))}function maxTimestamp(e,t=!1){const a=!0===t?getDayTimeIdentifier:getDayIdentifier;return e.reduce((e,t)=>{return Math.max(a(e),a(t))===a(e)?e:t})}function minTimestamp(e,t=!1){const a=!0===t?getDayTimeIdentifier:getDayIdentifier;return e.reduce((e,t)=>{return Math.min(a(e),a(t))===a(e)?e:t})}function isBetweenDates(e,t,a,n=!1){const r=getDayIdentifier(e)+(!0===n?getTimeIdentifier(e):0),o=getDayIdentifier(t)+(!0===n?getTimeIdentifier(t):0),i=getDayIdentifier(a)+(!0===n?getTimeIdentifier(a):0);return r>=o&&r<=i}function isOverlappingDates(e,t,a,n){const r=getDayIdentifier(e),o=getDayIdentifier(t),i=getDayIdentifier(a),d=getDayIdentifier(n);return r>=i&&r<=d||o>=i&&o<=d||i>=r&&o>=d}function addToDate(e,t){const a=copyTimestamp(e);return t.year&&(a.year+=t.year),t.month&&(a.month+=t.month),t.day&&(a.day+=t.day),t.hour&&(a.hour+=t.hour),t.minute&&(a.minute+=t.minute),updateFormatted(normalizeTimestamp(a))}function normalizeTimestamp(e){const t=new Date(e.year,e.month-1,e.day,e.hour,e.minute);return{...e,year:t.getFullYear(),month:t.getMonth()+1,day:t.getDate(),hour:t.getHours(),minute:t.getMinutes()}}function daysBetween(e,t){const a=diffTimestamp(e,t,!0);return Math.floor(a/TIME_CONSTANTS.MILLISECONDS_IN.DAY)}function weeksBetween(e,t){let a=copyTimestamp(e),n=copyTimestamp(t);return a=findWeekday(a,0),n=findWeekday(n,6),Math.ceil(daysBetween(a,n)/TIME_CONSTANTS.DAYS_IN.WEEK)}const weekdayDateMap={Sun:new Date("2020-01-05T00:00:00.000Z"),Mon:new Date("2020-01-06T00:00:00.000Z"),Tue:new Date("2020-01-07T00:00:00.000Z"),Wed:new Date("2020-01-08T00:00:00.000Z"),Thu:new Date("2020-01-09T00:00:00.000Z"),Fri:new Date("2020-01-10T00:00:00.000Z"),Sat:new Date("2020-01-11T00:00:00.000Z")};function getWeekdayFormatter(){const e=()=>"",r={long:{timeZone:"UTC",weekday:"long"},short:{timeZone:"UTC",weekday:"short"},narrow:{timeZone:"UTC",weekday:"narrow"}};return"undefined"===typeof Intl||"undefined"===typeof Intl.DateTimeFormat?e:t;function t(t,e,a){try{const n=new Intl.DateTimeFormat(a||void 0,r[e]||r["long"]);return n.format(weekdayDateMap[t])}catch(e){return e instanceof Error&&console.error(`Intl.DateTimeFormat: ${e.message} -> day of week: `+t),""}}}function getWeekdayNames(t,a){const e=Object.keys(weekdayDateMap),n=getWeekdayFormatter();return e.map(e=>String(n(e,t,a)))}function getMonthFormatter(){const e=()=>"",o={long:{timeZone:"UTC",month:"long"},short:{timeZone:"UTC",month:"short"},narrow:{timeZone:"UTC",month:"narrow"}};return"undefined"===typeof Intl||"undefined"===typeof Intl.DateTimeFormat?e:t;function t(t,e,a){try{const n=new Intl.DateTimeFormat(a||void 0,o[e]||o["long"]),r=new Date;return r.setDate(1),r.setMonth(t),n.format(r)}catch(e){return e instanceof Error&&console.error(`Intl.DateTimeFormat: ${e.message} -> month: `+t),""}}}function getMonthNames(t,a){const n=getMonthFormatter();return[...Array(12).keys()].map(e=>n(e,t,a))}var Timestamp={PARSE_DATETIME:PARSE_DATETIME,PARSE_DATE:PARSE_DATE,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,TIME_CONSTANTS:TIME_CONSTANTS,FIRST_HOUR:FIRST_HOUR,today:today,getStartOfWeek:getStartOfWeek,getEndOfWeek:getEndOfWeek,getStartOfMonth:getStartOfMonth,getEndOfMonth:getEndOfMonth,parseTime:parseTime,validateTimestamp:validateTimestamp,parsed:parsed,parseTimestamp:parseTimestamp,parseDate:parseDate,getDayIdentifier:getDayIdentifier,getTimeIdentifier:getTimeIdentifier,getDayTimeIdentifier:getDayTimeIdentifier,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,createDayList:createDayList,createIntervalList:createIntervalList,createNativeLocaleFormatter:createNativeLocaleFormatter,makeDate:makeDate,makeDateTime:makeDateTime,validateNumber:validateNumber,isBetweenDates:isBetweenDates,isOverlappingDates:isOverlappingDates,daysBetween:daysBetween,weeksBetween:weeksBetween,addToDate:addToDate,compareTimestamps:compareTimestamps,compareDate:compareDate,compareTime:compareTime,compareDateTime:compareDateTime,getWeekdayFormatter:getWeekdayFormatter,getWeekdayNames:getWeekdayNames,getMonthFormatter:getMonthFormatter,getMonthNames:getMonthNames},Timestamp$1=Object.freeze({__proto__:null,DAYS_IN_MONTH:DAYS_IN_MONTH,DAYS_IN_MONTH_LEAP:DAYS_IN_MONTH_LEAP,DAYS_IN_MONTH_MAX:DAYS_IN_MONTH_MAX,DAYS_IN_MONTH_MIN:DAYS_IN_MONTH_MIN,DAY_MIN:DAY_MIN,FIRST_HOUR:FIRST_HOUR,MONTH_MAX:MONTH_MAX,MONTH_MIN:MONTH_MIN,PARSE_DATE:PARSE_DATE,PARSE_DATETIME:PARSE_DATETIME,PARSE_TIME:PARSE_TIME,TIME_CONSTANTS:TIME_CONSTANTS,addToDate:addToDate,compareDate:compareDate,compareDateTime:compareDateTime,compareTime:compareTime,compareTimestamps:compareTimestamps,copyTimestamp:copyTimestamp,createDayList:createDayList,createIntervalList:createIntervalList,createNativeLocaleFormatter:createNativeLocaleFormatter,daysBetween:daysBetween,daysInMonth:daysInMonth,default:Timestamp,diffTimestamp:diffTimestamp,findWeekday:findWeekday,getDate:getDate,getDateTime:getDateTime,getDayIdentifier:getDayIdentifier,getDayOfYear:getDayOfYear,getDayTimeIdentifier:getDayTimeIdentifier,getEndOfMonth:getEndOfMonth,getEndOfWeek:getEndOfWeek,getMonthFormatter:getMonthFormatter,getMonthNames:getMonthNames,getStartOfMonth:getStartOfMonth,getStartOfWeek:getStartOfWeek,getTime:getTime,getTimeIdentifier:getTimeIdentifier,getWeekday:getWeekday,getWeekdayFormatter:getWeekdayFormatter,getWeekdayNames:getWeekdayNames,getWorkWeek:getWorkWeek,isBetweenDates:isBetweenDates,isLeapYear:isLeapYear,isOverlappingDates:isOverlappingDates,isToday:isToday,makeDate:makeDate,makeDateTime:makeDateTime,maxTimestamp:maxTimestamp,minTimestamp:minTimestamp,moveRelativeDays:moveRelativeDays,nextDay:nextDay,padNumber:padNumber,parseDate:parseDate,parseTime:parseTime,parseTimestamp:parseTimestamp,parsed:parsed,prevDay:prevDay,relativeDays:relativeDays,today:today,updateDayOfYear:updateDayOfYear,updateDisabled:updateDisabled,updateFormatted:updateFormatted,updateMinutes:updateMinutes,updateRelative:updateRelative,updateWeekday:updateWeekday,updateWorkWeek:updateWorkWeek,validateNumber:validateNumber,validateTimestamp:validateTimestamp,weeksBetween:weeksBetween});function convertToUnit(e,t="px"){if(e)return isNaN(e)?String(e):"auto"===e?e:""+Number(e)+t}function indexOf(t,a){for(let e=0;e<t.length;e++)if(!0===a(t[e],e))return e;return-1}function minCharWidth(e,t){return 0===t?e:e.slice(0,t)}var helpers={convertToUnit:convertToUnit,indexOf:indexOf,minCharWidth:minCharWidth},helpers$1=Object.freeze({__proto__:null,convertToUnit:convertToUnit,default:helpers,indexOf:indexOf,minCharWidth:minCharWidth});const toCamelCase=e=>e.replace(/(-\w)/g,e=>e[1].toUpperCase());function getMouseEventHandlers(t,e,a,n){const r={};for(const o in a){const i=a[o],d=toCamelCase("on-"+o);if(!e.value)return console.warn("$listeners has not been set up"),{};if(void 0!==e.value[d]){const s="on"+i.event.charAt(0).toUpperCase()+i.event.slice(1),u=e=>{return(void 0===i.button||"buttons"in e&&e.buttons>0&&e.button===i.button)&&(i.prevent&&e.preventDefault(),i.stop&&e.stopPropagation(),t(o,n(e,o))),i.result};s in r?Array.isArray(r[s])?r[s].push(u):r[s]=[r[s],u]:r[s]=u}}return r}function getDefaultMouseEventHandlers(e,t,a,n){return getMouseEventHandlers(e,t,getMouseEventName(a),n)}function getMouseEventName(e){return{["click"+e]:{event:"click"},["contextmenu"+e]:{event:"contextmenu",prevent:!0,result:!1},["mousedown"+e]:{event:"mousedown"},["mousemove"+e]:{event:"mousemove"},["mouseup"+e]:{event:"mouseup"},["mouseenter"+e]:{event:"mouseenter"},["mouseleave"+e]:{event:"mouseleave"},["touchstart"+e]:{event:"touchstart"},["touchmove"+e]:{event:"touchmove"},["touchend"+e]:{event:"touchend"}}}function getRawMouseEvents(e){return Object.keys(getMouseEventName(e))}function useMouseEvents(a,n){return{getMouseEventHandlers:(e,t)=>getMouseEventHandlers(a,n,e,t),getDefaultMouseEventHandlers:(e,t)=>getDefaultMouseEventHandlers(a,n,e,t),getMouseEventName:getMouseEventName,getRawMouseEvents:getRawMouseEvents}}const ResizeObserverDirective={mounted(e,t){if("function"===typeof t.value){const a=t.value,n={callback:a,size:{width:0,height:0},observer:new ResizeObserver(e=>{const t=e[0].contentRect;t.width===n.size.width&&t.height===n.size.height||(n.size.width=t.width,n.size.height=t.height,n.debounceTimeout&&clearTimeout(n.debounceTimeout),n.debounceTimeout=setTimeout(()=>{n.callback(n.size),n.debounceTimeout=void 0},100))})};n.observer.observe(e),e.__onResizeObserver=n}},beforeUnmount(e){if(e.__onResizeObserver){const{observer:t,debounceTimeout:a}=e.__onResizeObserver;a&&clearTimeout(a),t.unobserve(e),delete e.__onResizeObserver}}};function useCalendar(t,a,{scrollArea:e,pane:n}){if(!a){const l="[error: renderCalendar] no renderFunc has been supplied to useCalendar";throw console.error(l),new Error(l)}const r=reactive({width:0,height:0}),o=ref(null);function i({width:e,height:t}){r.width=e,r.height=t}const d=computed(()=>{return!0!==t.noScroll&&e.value&&n.value&&r.height?e.value.offsetWidth-n.value.offsetWidth:0});function s(){}function u(){const e={ref:o,role:"complementary",lang:t.locale,class:`q-calendar ${t.dark?"q-calendar--dark":""} `+(t.bordered?"q-calendar__bordered":"")};return withDirectives(h("div",{...e},[a()]),[[ResizeObserverDirective,i]])}return{rootRef:o,scrollWidth:d,__initCalendar:s,__renderCalendar:u}}const isValidFocusType=e=>e.every(e=>["day","date","weekday","interval","time","resource","task"].includes(e)),useCommonProps={modelValue:{type:String,default:today(),validator:e=>""===e||validateTimestamp(e)},weekdays:{type:Array,default:()=>[0,1,2,3,4,5,6]},dateType:{type:String,default:"round",validator:e=>["round","rounded","square"].includes(e)},weekdayAlign:{type:String,default:"center",validator:e=>["left","center","right"].includes(e)},dateAlign:{type:String,default:"center",validator:e=>["left","center","right"].includes(e)},bordered:Boolean,dark:Boolean,noAria:Boolean,noActiveDate:Boolean,noHeader:Boolean,noScroll:Boolean,shortWeekdayLabel:Boolean,noDefaultHeaderText:Boolean,noDefaultHeaderBtn:Boolean,minWeekdayLabel:{type:[Number,String],default:1},weekdayBreakpoints:{type:Array,default:()=>[75,35],validator:e=>2===e.length},locale:{type:String,default:"en-US"},animated:Boolean,transitionPrev:{type:String,default:"slide-right"},transitionNext:{type:String,default:"slide-left"},disabledDays:Array,disabledBefore:String,disabledAfter:String,disabledWeekdays:{type:Array,default:()=>[]},dragEnterFunc:Function,dragOverFunc:Function,dragLeaveFunc:Function,dropFunc:Function,selectedDates:{type:[Array,Set],default:()=>[]},selectedStartEndDates:{type:Array,default:()=>[]},hoverable:Boolean,focusable:Boolean,focusType:{type:Array,default:()=>["date"],validator:isValidFocusType}};function useCommon(t,{startDate:e,endDate:a,times:n}){const r=computed(()=>parseTimestamp(e.value)),o=computed(()=>{return"0000-00-00"===a.value?getEndOfWeek(r.value,t.weekdays,n.today):parseTimestamp(a.value)||r.value}),i=computed(()=>createNativeLocaleFormatter(t.locale,()=>({timeZone:"UTC",day:"numeric"}))),d=computed(()=>createNativeLocaleFormatter(t.locale,(e,t)=>({timeZone:"UTC",weekday:t?"short":"long"}))),s=computed(()=>createNativeLocaleFormatter(t.locale,()=>({timeZone:"UTC",dateStyle:"full"})));function u(e,t){return e&&e.length>0&&e.includes(t.date)}function l(e,t){const a={firstDay:!1,betweenDays:!1,lastDay:!1};if(2===e.length){const n=getDayIdentifier(t),r=getDayIdentifier(parsed(e[0])),o=getDayIdentifier(parsed(e[1]));a.firstDay=r===n,a.lastDay=o===n,a.betweenDays=r<n&&o>n}return a}function c(e,t=!1,a=[],n=[],r=!1){const o=u(a,e),{firstDay:i,lastDay:d,betweenDays:s}=l(n,e);return{"q-past-day":!i&&!s&&!d&&!o&&!t&&!!e.past,"q-future-day":!i&&!s&&!d&&!o&&!t&&!!e.future,"q-outside":t,"q-current-day":!!e.current,"q-selected":o,"q-range-first":i,"q-range":s,"q-range-last":d,"q-range-hover":r&&(i||d||s),"q-disabled-day disabled":!0===e.disabled}}function m(e){return getStartOfWeek(e,t.weekdays,n.today)}function y(e){return getEndOfWeek(e,t.weekdays,n.today)}function p(){return{}}return{parsedStart:r,parsedEnd:o,dayFormatter:i,weekdayFormatter:d,ariaDateFormatter:s,arrayHasDate:u,checkDays:l,getRelativeClasses:c,startOfWeek:m,endOfWeek:y,dayStyleDefault:p}}const useMonthProps={dayHeight:{type:[Number,String],default:0,validator:e=>validateNumber(e)},dayMinHeight:{type:[Number,String],default:0,validator:e=>validateNumber(e)},dayStyle:Function,dayClass:Function,weekdayStyle:Function,weekdayClass:Function,dayPadding:String,minWeeks:{type:[Number,String],default:1,validator:e=>validateNumber(e)},shortMonthLabel:Boolean,showWorkWeeks:Boolean,showMonthLabel:{type:Boolean,default:!0},showDayOfYearLabel:Boolean,enableOutsideDays:Boolean,noOutsideDays:Boolean,hover:Boolean,miniMode:{type:[Boolean,String],validator:e=>[!0,!1,"auto"].includes(e)},breakpoint:{type:[Number,String],default:"md",validator:e=>["xs","sm","md","lg","xl"].includes(e)||validateNumber(e)},monthLabelSize:{type:String,default:"sm",validator:e=>["xxs","xs","sm","md","lg","xl","xxl"].includes(e)||!!e&&e.length>0}};function useMonth(n,t,{times:r,parsedStart:a,parsedEnd:o,size:i,headerColumnRef:d}){const e=computed(()=>parseInt(n.minWeeks,10)),s=computed(()=>e.value*n.weekdays.length),u=computed(()=>D(k(a.value))),l=computed(()=>T(w(o.value))),c=computed(()=>{let e=0;return n.cellWidth?e=Number(n.cellWidth):i.width>0&&d.value&&(e=d.value.offsetWidth/n.weekdays.length),e}),m=computed(()=>createDayList(u.value,l.value,r.today,n.weekdays,n.disabledBefore,n.disabledAfter,n.disabledWeekdays,n.disabledDays,Number.MAX_SAFE_INTEGER,s.value)),y=computed(()=>{const e=r.today,t=D(e),a=T(e);return createDayList(t,a,e,n.weekdays,n.disabledBefore,n.disabledAfter,n.disabledWeekdays,n.disabledDays,n.weekdays.length,n.weekdays.length)}),p=computed(()=>createNativeLocaleFormatter(n.locale,(e,t)=>({timeZone:"UTC",month:t?"short":"long"}))),v=computed(()=>{switch(n.breakpoint){case"xs":return 300;case"sm":return 350;case"md":return 400;case"lg":return 450;case"xl":return 500;default:return parseInt(n.breakpoint,10)}}),f=computed(()=>{switch(n.monthLabelSize){case"xxs":return".4em";case"xs":return".6em";case"sm":return".8em";case"md":return"1.0em";case"lg":return"1.2em";case"xl":return"1.4em";case"xxl":return"1.6em";default:return n.monthLabelSize}});let h=!0;const g=computed(()=>{const e=!0===n.miniMode||"auto"===n.miniMode&&void 0!==n.breakpoint&&i.width<v.value;return h&&(h=!1,t("mini-mode",e)),e});function D(e){return getStartOfWeek(e,n.weekdays,r.today)}function T(e){return getEndOfWeek(e,n.weekdays,r.today)}function k(e){return getStartOfMonth(e)}function w(e){return getEndOfMonth(e)}function M(e){const t=getDayIdentifier(e);return t<getDayIdentifier(a.value)||t>getDayIdentifier(o.value)}return watch(g,e=>{t("mini-mode",e)}),{parsedCellWidth:c,parsedMinWeeks:e,parsedMinDays:s,parsedMonthStart:u,parsedMonthEnd:l,parsedBreakpoint:v,parsedMonthLabelSize:f,days:m,todayWeek:y,isMiniMode:g,monthFormatter:p,isOutside:M}}const useTimesProps={now:{type:String,validator:e=>""===e||validateTimestamp(e),default:""}};function useTimes(e){const t=reactive({now:parseTimestamp("0000-00-00 00:00"),today:parseTimestamp("0000-00-00")}),a=computed(()=>e.now?parseTimestamp(e.now):o());function n(){t.now&&t.today&&(t.now.current=t.today.current=!0,t.now.past=t.today.past=!1,t.now.future=t.today.future=!1)}function r(){const e=a.value||o();i(e,t.now),d(e,t.now),i(e,t.today)}function o(){return parseDate(new Date)}function i(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)}function d(e,t){e.time!==t.time&&(t.hour=e.hour,t.minute=e.minute,t.time=e.time)}return watch(a,()=>r()),{times:t,parsedNow:a,setCurrent:n,updateCurrent:r,getNow:o,updateDay:i,updateTime:d}}function useRenderValues(r,{parsedView:o,parsedValue:i,times:d}){const e=computed(()=>{const e=i.value;let t=r.maxDays,a=e,n=e;switch(o.value){case"month":a=getStartOfMonth(e),n=getEndOfMonth(e),t=daysInMonth(a.year,a.month);break;case"week":case"week-agenda":case"week-scheduler":a=getStartOfWeek(e,r.weekdays,d.today),n=getEndOfWeek(a,r.weekdays,d.today),t=r.weekdays.length;break;case"day":case"scheduler":case"agenda":n=moveRelativeDays(copyTimestamp(n),nextDay,t>1?t-1:t,r.weekdays),n=updateFormatted(n);break;case"month-interval":case"month-scheduler":case"month-agenda":a=getStartOfMonth(e),n=getEndOfMonth(e),n=updateFormatted(n),t=daysInMonth(a.year,a.month);break;case"resource":t=1,n=moveRelativeDays(copyTimestamp(n),nextDay,t,r.weekdays),n=updateFormatted(n);break}return{start:a,end:n,maxDays:t}});return{renderValues:e}}const useMoveEmits=["moved"];function useMove(s,{parsedView:u,parsedValue:l,direction:c,maxDays:m,times:y,emittedValue:p,emit:v}){function e(a=1){if(0===a)p.value=today();else{let e=copyTimestamp(l.value);const n=getEndOfMonth(e),r=a>0,o=r?nextDay:prevDay,i=r?n.day:1;let t=r?a:-a;c.value=r?"next":"prev";const d=s.weekdays.length;while(--t>=0)switch(u.value){case"month":e.day=i,e=o(e),e=updateWeekday(e);while(!s.weekdays.includes(Number(e.weekday)))e=addToDate(e,{day:r?1:-1});break;case"week":case"week-agenda":case"week-scheduler":e=relativeDays(e,o,d,s.weekdays);break;case"day":case"scheduler":case"agenda":e=relativeDays(e,o,m.value,s.weekdays);break;case"month-interval":case"month-agenda":case"month-scheduler":e.day=i,e=o(e);break;case"resource":e=relativeDays(e,o,m.value,s.weekdays);break}e=updateWeekday(e),e=updateFormatted(e),e=updateDayOfYear(e),e=updateRelative(e,y.now),p.value=e.date,v("moved",e)}}return{move:e}}const listenerRE=/^on[A-Z]/;function useEmitListeners(e=getCurrentInstance()){return{emitListeners:computed(()=>{const t={};return e?.vnode?.props&&Object.keys(e.vnode.props).forEach(e=>{listenerRE.test(e)&&(t[e]=!0)}),t})}}function useFocusHelper(){const e={"aria-hidden":"true",class:"q-calendar__focus-helper"};return[h("span",e)]}function useButton(){function e({focusable:e,focusType:t},a,n){const r=e&&t.includes("date");return h("button",{...a,tabindex:r?0:-1},[n,r&&useFocusHelper()])}return{renderButton:e}}const useCellWidthProps={cellWidth:[Number,String]};function useCellWidth(e){const t=computed(()=>void 0!==e.cellWidth);return{isSticky:t}}const useCheckChangeEmits=["change"];function useCheckChange(n,{days:r,lastStart:o,lastEnd:i}){function e(){const e=r.value;if(0===e.length)return!1;const t=e[0].date,a=e[e.length-1].date;return(!o.value||!i.value||t!==o.value||a!==i.value)&&(o.value=t,i.value=a,n("change",{start:t,end:a,days:e}),!0)}return{checkChange:e}}function useEventUtils(){function e(e,t){return(Array.isArray(t)?t:[t]).includes(e.keyCode)}return{isKeyCode:e}}const isKeyCode=useEventUtils().isKeyCode,useNavigationProps={useNavigation:Boolean};function useNavigation(t,{rootRef:a,focusRef:n,focusValue:r,datesRef:o,parsedView:i,emittedValue:d,direction:s,times:u}){let e=!1;function l(){e||document&&(e=!0,document.addEventListener("keyup",v),document.addEventListener("keydown",p))}function c(){document&&(document.removeEventListener("keyup",v),document.removeEventListener("keydown",p),e=!1)}function m(e){if(e&&document){const t=document.activeElement;if(t!==document.body&&a.value?.contains(t))return!0}return!1}function y(){let t=0;const a=window.setInterval(()=>{const e=o.value[n.value];e&&(e.focus(),50!==++t)&&document.activeElement!==e||window.clearInterval(a)},250)}function p(e){m(e)&&isKeyCode(e,[33,34,35,36,37,38,39,40])&&(e.stopPropagation(),e.preventDefault())}function v(e){if(m(e)&&isKeyCode(e,[33,34,35,36,37,38,39,40])){const t={33:T,34:k,35:M,36:w,37:g,38:f,39:D,40:h};t[e.keyCode]?.()}}function f(){let e=copyTimestamp(r.value);if("month"===i.value){if(e=addToDate(e,{day:-7}),r.value.month!==e.month)return s.value="prev",void(d.value=e.date)}else e=addToDate(e,{minute:Number(t.intervalMinutes)});s.value="prev",n.value=e.date}function h(){let e=copyTimestamp(r.value);if("month"===i.value){if(e=addToDate(e,{day:7}),r.value.month!==e.month)return s.value="next",void(d.value=e.date)}else e=addToDate(e,{minute:Number(t.intervalMinutes)});s.value="next",n.value=e.date}function g(){let e=copyTimestamp(r.value);s.value="prev";do{e=addToDate(e,{day:-1})}while(!t.weekdays.includes(Number(e.weekday)));n.value=e.date}function D(){let e=copyTimestamp(r.value);s.value="next";do{e=addToDate(e,{day:1})}while(!t.weekdays.includes(Number(e.weekday)));n.value=e.date}function T(){let e=copyTimestamp(r.value);e="month"===i.value?addToDate(e,{month:-1}):addToDate(e,{day:-7}),s.value="prev",n.value=e.date}function k(){let e=copyTimestamp(r.value);e="month"===i.value?addToDate(e,{month:1}):addToDate(e,{day:7}),s.value="next",n.value=e.date}function w(){let e=copyTimestamp(r.value);e="month"===i.value?getStartOfMonth(e):getStartOfWeek(e,t.weekdays||[],u.today);while(!t.weekdays.includes(Number(e.weekday)))e=addToDate(e,{day:-1});n.value=e.date}function M(){let e=copyTimestamp(r.value);e="month"===i.value?getEndOfMonth(e):getEndOfWeek(e,t.weekdays||[],u.today);while(!t.weekdays.includes(Number(e.weekday)))e=addToDate(e,{day:-1});n.value=e.date}return onBeforeUnmount(()=>{c()}),watch(()=>t.useNavigation,e=>{(!0===e?l:c)()}),!0===t.useNavigation&&l(),{startNavigation:l,endNavigation:c,tryFocus:y}}const renderButton=useButton().renderButton;var QCalendarMonth=defineComponent({name:"QCalendarMonth",directives:{ResizeObserver:ResizeObserverDirective},props:{...useCommonProps,...useMonthProps,...useTimesProps,...useCellWidthProps,...useNavigationProps},emits:["update:model-value",...useCheckChangeEmits,...useMoveEmits,"mini-mode",...getRawMouseEvents("-date"),...getRawMouseEvents("-day"),...getRawMouseEvents("-head-workweek"),...getRawMouseEvents("-head-day"),...getRawMouseEvents("-workweek")],setup(y,{slots:p,emit:c,expose:x}){const L=ref(null),Y=ref(null),e=ref(null),v=ref(y.modelValue||today()),t=ref(parsed(y.modelValue||today())),m=ref({}),u=ref([]),l=ref([]),o=ref("next"),i=ref(y.modelValue||today()),d=ref("0000-00-00"),B=ref(0),f=ref(y.modelValue),s=reactive({width:0,height:0}),g=ref(),D=ref(""),U=ref(null),q=ref(null),a=computed(()=>{return"month"}),n=getCurrentInstance();if(null===n)throw new Error("current instance is null");const T=useEmitListeners(n).emitListeners,P=useCellWidth(y).isSticky,{times:r,setCurrent:V,updateCurrent:k}=(watch(P,()=>{}),useTimes(y)),{parsedStart:w,parsedEnd:M,dayFormatter:z,weekdayFormatter:$,ariaDateFormatter:Z,dayStyleDefault:b,getRelativeClasses:j}=(k(),V(),useCommon(y,{startDate:i,endDate:d,times:r})),_=computed(()=>{return parseTimestamp(y.modelValue,r.now)||w.value||r.today}),K=(t.value=_.value,v.value=_.value.date,computed(()=>{const e={};return void 0!==y.dayPadding&&(e.padding=y.dayPadding),e.minWidth=F.value,e.maxWidth=F.value,e.width=F.value,e})),X=useRenderValues(y,{parsedView:a,times:r,parsedValue:_}).renderValues,{rootRef:N,__renderCalendar:Q}=useCalendar(y,Ee,{scrollArea:L,pane:Y}),{days:I,todayWeek:G,isMiniMode:E,parsedCellWidth:J,parsedMonthLabelSize:ee,isOutside:te,monthFormatter:ae}=useMonth(y,c,{times:r,parsedStart:w,parsedEnd:M,size:s,headerColumnRef:e}),O=useMove(y,{parsedView:a,parsedValue:_,direction:o,maxDays:B,times:r,emittedValue:f,emit:c}).move,S=useMouseEvents(c,T).getDefaultMouseEventHandlers,ne=useCheckChange(c,{days:I,lastStart:U,lastEnd:q}).checkChange,A=useEventUtils().isKeyCode,re=useNavigation(y,{rootRef:N,focusRef:v,focusValue:t,datesRef:m,parsedView:a,emittedValue:f,direction:o,times:r}).tryFocus,oe=computed(()=>{return N.value&&!0===y.showWorkWeeks?parseInt(window.getComputedStyle(N.value).getPropertyValue(!0===E.value?"--calendar-mini-work-week-width":"--calendar-work-week-width"),10):0}),W=computed(()=>{return y.weekdays.length}),F=computed(()=>{if(N.value){const e=s.width||N.value.getBoundingClientRect().width;if(e&&W.value)return(e-oe.value)/W.value+"px"}return 100/W.value+"%"}),C=computed(()=>{return!0===y.focusable&&y.focusType.includes("day")&&!0!==E.value}),R=computed(()=>{return!0===y.focusable&&y.focusType.includes("date")&&!0!==C.value});function ie(){f.value=today()}function de(e=1){O(e)}function se(e=1){O(-e)}function ue({width:e,height:t}){s.width=e,s.height=t}function H(e){return e.date===f.value}function le(t){for(let e=0;e<t.length;++e)if(!0===t[e].current)return{timestamp:t[e]};return{timestamp:!1}}function ce(){if(!0!==E.value&&0===y.dayHeight){const t=p.week;if(void 0!==t&&window)for(var e in u.value){const a=u.value[e];if(void 0!==a){const n=l.value[e];if(void 0!==n){const r=window.getComputedStyle(a),o=parseFloat(r.marginTop)+parseFloat(r.marginBottom);n.clientHeight+o>n.clientHeight&&(n.style.height=a.clientHeight+o+"px")}}}}}function me(){return h("div",{class:"q-calendar-month__body"},[...Te()])}function ye(){return h("div",{role:"presentation",class:"q-calendar-month__head"},[!0===y.showWorkWeeks&&ve(),h("div",{class:"q-calendar-month__head--wrapper"},[pe()])])}function pe(){return h("div",{ref:e,class:{"q-calendar-month__head--weekdays":!0}},[...fe()])}function ve(){const e=p["head-workweek"],t={start:w.value,end:M.value,miniMode:E.value};return h("div",{class:"q-calendar-month__head--workweek",...S("-head-workweek",e=>{return{scope:t,event:e}})},e?e({scope:t}):"#")}function fe(){return G.value.map((e,t)=>he(e,t))}function he(t,e){const a=p["head-day"],n=I.value.filter(e=>e.weekday===t.weekday),r=n[0].weekday,o=!0!==y.noActiveDate&&H(t),i={activeDate:o,weekday:r,timestamp:t,days:n,index:e,miniMode:E.value,droppable:g.value===Number(t.weekday),disabled:!!y.disabledWeekdays&&y.disabledWeekdays.includes(Number(t.weekday))},d="function"===typeof y.weekdayClass?y.weekdayClass({scope:i}):{},s=!0===y.focusable&&y.focusType.includes("weekday"),u=F.value,l=y.weekdayStyle||b,c={width:u,maxWidth:u,minWidth:u,...l({scope:i})},m={key:t.date+(void 0!==e?"-"+e:""),tabindex:!0===s?0:-1,class:{"q-calendar-month__head--weekday":!0,...d,"q-disabled-day disabled":!0===i.disabled,["q-calendar__"+y.weekdayAlign]:!0,"q-calendar__ellipsis":!0,"q-calendar__focusable":!0===s},style:c,onDragenter:e=>{void 0!==y.dragEnterFunc&&"function"===typeof y.dragEnterFunc&&(!0===y.dragEnterFunc(e,"head-day",{scope:i})?g.value=Number(t.weekday):g.value=-1)},onDragover:e=>{void 0!==y.dragOverFunc&&"function"===typeof y.dragOverFunc&&(!0===y.dragOverFunc(e,"head-day",{scope:i})?g.value=Number(t.weekday):g.value=-1)},onDragleave:e=>{void 0!==y.dragLeaveFunc&&"function"===typeof y.dragLeaveFunc&&(!0===y.dragLeaveFunc(e,"head-day",{scope:i})?g.value=Number(t.weekday):g.value=-1)},onDrop:e=>{void 0!==y.dropFunc&&"function"===typeof y.dropFunc&&(!0===y.dropFunc(e,"head-day",{scope:i})?g.value=Number(t.weekday):g.value=-1)},onFocus:()=>{!0===s&&(v.value=t.date)},...S("-head-day",e=>{return{scope:i,event:e}})};return!0!==y.noAria&&(m.ariaLabel=$.value(t,!1)),h("div",m,[void 0===a&&De(t,y.shortWeekdayLabel||E.value),void 0!==a&&a({scope:i}),ge(t,e),!0===s&&useFocusHelper()])}function ge(t,e){const a=p["head-day-event"],n=!0!==y.noActiveDate&&H(t),r=I.value.filter(e=>e.weekday===t.weekday),o=r[0].weekday,i={weekday:o,timestamp:t,days:r,index:e,miniMode:E.value,activeDate:n,disabled:!!y.disabledWeekdays&&y.disabledWeekdays.includes(Number(t.weekday))},d=F.value,s=y.weekdayStyle||b,u={width:d,maxWidth:d,minWidth:d,...s({scope:i})};return h("div",{key:"event-"+t.date+(void 0!==e?"-"+e:""),class:{"q-calendar-month__head--event":!0},style:u},[void 0!==a&&a({scope:i})])}function De(e,t){const a=$.value(e,t||y.weekdayBreakpoints[0]>0&&J.value<=y.weekdayBreakpoints[0]);return h("span",{class:"q-calendar__ellipsis"},!0===E.value&&!0===y.shortWeekdayLabel||y.weekdayBreakpoints[1]>0&&J.value<=y.weekdayBreakpoints[1]?minCharWidth(a,Number(y.minWeekdayLabel)):a)}function Te(){const t=y.weekdays.length,a=[];for(let e=0;e<I.value.length;e+=t)a.push(ke(I.value.slice(e,e+t),e/t));return a}function ke(e,t){const a=p.week,n=y.weekdays,r={week:e,weekdays:n,miniMode:E.value},o={},i=parseInt(String(y.dayHeight),10),d=parseInt(String(y.dayMinHeight),10),s=(o.height=i>0&&!0!==E.value?convertToUnit(i):"auto",d>0&&!0!==E.value&&(o.minHeight=convertToUnit(d)),0===i&&0===d);return h("div",{key:e[0].date,ref:e=>{l.value[t]=e},class:{"q-calendar-month__week--wrapper":!0,"q-calendar-month__week--auto-height":s},style:o},[!0===y.showWorkWeeks?we(e):void 0,h("div",{class:"q-calendar-month__week"},[h("div",{class:"q-calendar-month__week--days"},e.map(e=>Me(e))),!0!==E.value&&void 0!==a?h("div",{ref:e=>{u.value[t]=e},class:"q-calendar-month__week--events"},a({scope:r})):void 0])])}function we(e){const t=p.workweek,a=e.length>2?e[2]:e[0],n=le(e).timestamp,r=Number(a.workweek).toLocaleString(y.locale),o={workweekLabel:r,week:e,miniMode:E.value};return h("div",{key:a.workweek,class:{"q-calendar-month__workweek":!0,...j(!1!==n?n:a,!1)},...S("-workweek",e=>{return{scope:o,event:e}})},t?t({scope:o}):r)}function Me(t){const e=p.day,a=y.dayStyle||b,n=te(t),r=!0!==y.noActiveDate&&_.value.date===t.date,o=!1===n&&!0===y.showMonthLabel&&I.value.find(e=>e.month===t.month)?.day===t.day,i={outside:n,timestamp:t,miniMode:E.value,activeDate:r,hasMonth:o,droppable:D.value===t.date,disabled:!!y.disabledWeekdays&&y.disabledWeekdays.includes(Number(t.weekday))},d=Object.assign({...K.value},a({scope:i})),s="function"===typeof y.dayClass?y.dayClass({scope:i}):{},u={key:t.date,ref:e=>{!0===C.value&&(m.value[t.date]=e)},tabindex:!0===C.value?0:-1,class:{"q-calendar-month__day":!0,...s,...j(t,n,Array.from(y.selectedDates),y.selectedStartEndDates,y.hover),"q-active-date":!0===r,disabled:!0!==y.enableOutsideDays&&!0===n,"q-calendar__hoverable":!0===y.hoverable,"q-calendar__focusable":!0===C.value},style:d,onFocus:()=>{!0===C.value&&(v.value=t.date)},onKeydown:e=>{!0!==n&&!0!==t.disabled&&A(e,[13,32])&&(e.stopPropagation(),e.preventDefault())},onKeyup:e=>{!0!==n&&!0!==t.disabled&&A(e,[13,32])&&(e.stopPropagation(),e.preventDefault(),void 0!==T.value.onClickDay)&&!0!==E.value&&c("click-day",{scope:i,e:e})},...S("-day",e=>{return{scope:i,event:e}})},l={onDragenter:e=>{void 0!==y.dragEnterFunc&&"function"===typeof y.dragEnterFunc&&(!0===y.dragEnterFunc(e,"day",{scope:i})?D.value=t.date:D.value="")},onDragover:e=>{void 0!==y.dragOverFunc&&"function"===typeof y.dragOverFunc&&(!0===y.dragOverFunc(e,"day",{scope:i})?D.value=t.date:D.value="")},onDragleave:e=>{void 0!==y.dragLeaveFunc&&"function"===typeof y.dragLeaveFunc&&(!0===y.dragLeaveFunc(e,"day",{scope:i})?D.value=t.date:D.value="")},onDrop:e=>{void 0!==y.dropFunc&&"function"===typeof y.dropFunc&&(!0===y.dropFunc(e,"day",{scope:i})?D.value=t.date:D.value="")}};return!0!==n&&Object.assign(u,l),!0!==y.noAria&&(u.ariaLabel=Z.value(t,!1)),h("div",u,[be(t,n,o),h("div",{class:{"q-calendar-month__day--content":!0}},e?e({scope:i}):void 0),!0===C.value&&useFocusHelper()])}function be(e,t,a){let n,r;const o=[_e(e,t)],i=(!0!==E.value&&!0===a&&s.width>340&&(r=Ie(e,t)),!0!==E.value&&!0===y.showDayOfYearLabel&&void 0===r&&s.width>300&&(n=Ne(e,t)),"left"===y.dateAlign?(void 0!==n&&o.push(n),void 0!==r&&o.push(r)):"right"===y.dateAlign?(void 0!==n&&o.unshift(n),void 0!==r&&o.unshift(r)):(n=void 0,r=void 0),{class:{"q-calendar-month__day--label__wrapper":!0,"q-calendar__ellipsis":!0,["q-calendar__"+y.dateAlign]:void 0===n&&void 0===r,"q-calendar__justify":void 0!==n||void 0!==r}});return h("div",i,o)}function _e(a,t){if(!0!==t||!0!==y.noOutsideDays){const e=z.value(a,!1),n=p["head-day-label"],r=p["head-day-button"],o=y.selectedDates&&Array.from(y.selectedDates).length>0&&Array.from(y.selectedDates).includes(a.date),i=!0!==y.noActiveDate&&H(a),d={dayLabel:e,timestamp:a,outside:t,activeDate:i,selectedDate:o,miniMode:E.value,disabled:!!y.disabledWeekdays&&y.disabledWeekdays.includes(Number(a.weekday))},s={key:a.date,ref:e=>{!0===R.value&&(m.value[a.date]=e)},tabindex:!0===R.value?0:-1,class:{"q-calendar-month__day--label":!0,"q-calendar__button":!0,"q-calendar__button--round":"round"===y.dateType,"q-calendar__button--rounded":"rounded"===y.dateType,"q-calendar__button--bordered":!0===a.current,"q-calendar__hoverable":!0===y.hoverable,"q-calendar__focusable":!0===R.value},disabled:!0===a.disabled||!0!==y.enableOutsideDays&&!0===t,onFocus:()=>{!0===R.value&&(v.value=a.date)},onKeydown:e=>{!0!==t&&!0!==a.disabled&&A(e,[13,32])&&(e.stopPropagation(),e.preventDefault())},onKeyup:e=>{!0===R.value&&!0!==t&&!0!==a.disabled&&A(e,[13,32])&&(e.stopPropagation(),e.preventDefault(),f.value=a.date,void 0!==T.value.onClickDate)&&c("click-date",{scope:d,event:e})},...S("-date",(e,t)=>{return e.stopPropagation(),"click-date"!==t&&"contextmenu-date"!==t||(f.value=a.date),{scope:d,event:e}})};return!0!==y.noAria&&(s.ariaLabel=Z.value(a,!1)),[r?r({scope:d}):renderButton(y,s,n?n({scope:d}):e),!0===R.value&&useFocusHelper()].filter(e=>!1!==e)}}function Ne(e,t){if(!0!==t||!0!==y.noOutsideDays){const a=p["day-of-year"],n={timestamp:e};return h("span",{class:{"q-calendar-month__day--day-of-year":!0,"q-calendar__ellipsis":!0}},a?a({scope:n}):e.doy)}}function Ie(e,t){if(!0!==t||!0!==y.noOutsideDays){const a=p["month-label"],n=ae.value(e,y.shortMonthLabel||s.width<500),r={monthLabel:n,timestamp:e,miniMode:E.value},o={};return!0!==E.value&&void 0!==ee.value&&(o.fontSize=ee.value),h("span",{class:"q-calendar-month__day--month q-calendar__ellipsis",style:o},[a?a({scope:r}):!0!==E.value?n:void 0])}}function Ee(){const{start:e,end:t}=X.value,a=(i.value=e.date,d.value=t.date,s.width>0),n=withDirectives(h("div",{class:{"q-calendar-mini":!0===E.value,"q-calendar-month":!0},key:i.value},[!0===a&&!0!==y.noHeader&&ye(),!0===a&&me()]),[[ResizeObserverDirective,ue]]);if(!0!==y.animated)return n;{const r="q-calendar--"+("prev"===o.value?y.transitionPrev:y.transitionNext);return h(Transition,{name:r,appear:!0},()=>n)}}return watch([I],ne,{deep:!0,immediate:!0}),watch(()=>y.modelValue,(e,t)=>{if(f.value!==e){if(!0===y.animated){const a=getDayIdentifier(parsed(e)),n=getDayIdentifier(parsed(t));o.value=a>=n?"next":"prev"}f.value=e}v.value=e}),watch(f,(e,t)=>{if(f.value!==y.modelValue){if(!0===y.animated){const a=getDayIdentifier(parsed(e)),n=getDayIdentifier(parsed(t));o.value=a>=n?"next":"prev"}c("update:model-value",e)}}),watch(v,e=>{e&&(t.value=parseTimestamp(e),f.value!==e)&&(f.value=e)}),watch(t,()=>{m.value[v.value]?m.value[v.value].focus():re()}),onBeforeUpdate(()=>{m.value={},u.value=[],l.value=[],nextTick(()=>{ce()})}),onMounted(()=>{ce()}),x({prev:se,next:de,move:O,moveToToday:ie,updateCurrent:k}),()=>Q()}});const version="4.1.0";var Plugin={version:version,QCalendarMonth:QCalendarMonth,...Timestamp$1,...helpers$1,install(e){e.component(String(QCalendarMonth.name),QCalendarMonth)}};export{DAYS_IN_MONTH,DAYS_IN_MONTH_LEAP,DAYS_IN_MONTH_MAX,DAYS_IN_MONTH_MIN,DAY_MIN,FIRST_HOUR,MONTH_MAX,MONTH_MIN,PARSE_DATE,PARSE_DATETIME,PARSE_TIME,QCalendarMonth,TIME_CONSTANTS,addToDate,compareDate,compareDateTime,compareTime,compareTimestamps,convertToUnit,copyTimestamp,createDayList,createIntervalList,createNativeLocaleFormatter,daysBetween,daysInMonth,Plugin as default,diffTimestamp,findWeekday,getDate,getDateTime,getDayIdentifier,getDayOfYear,getDayTimeIdentifier,getEndOfMonth,getEndOfWeek,getMonthFormatter,getMonthNames,getStartOfMonth,getStartOfWeek,getTime,getTimeIdentifier,getWeekday,getWeekdayFormatter,getWeekdayNames,getWorkWeek,indexOf,isBetweenDates,isLeapYear,isOverlappingDates,isToday,makeDate,makeDateTime,maxTimestamp,minCharWidth,minTimestamp,moveRelativeDays,nextDay,padNumber,parseDate,parseTime,parseTimestamp,parsed,prevDay,relativeDays,today,updateDayOfYear,updateDisabled,updateFormatted,updateMinutes,updateRelative,updateWeekday,updateWorkWeek,validateNumber,validateTimestamp,version,weeksBetween}; | ||
import{reactive,ref,computed,withDirectives,h,watch,getCurrentInstance,onBeforeUnmount,defineComponent,onBeforeUpdate,nextTick,onMounted,Transition}from"vue";const PARSE_DATETIME=/^(\d{4})-(\d{1,2})(-(\d{1,2}))?([^\d]+(\d{1,2}))?(:(\d{1,2}))?(:(\d{1,2}))?(.(\d{1,3}))?$/,PARSE_DATE=/^(\d{4})-(\d{1,2})(-(\d{1,2}))?/,PARSE_TIME=/(\d\d?)(:(\d\d?)|)(:(\d\d?)|)/,DAYS_IN_MONTH=[0,31,28,31,30,31,30,31,31,30,31,30,31],DAYS_IN_MONTH_LEAP=[0,31,29,31,30,31,30,31,31,30,31,30,31],TIME_CONSTANTS={MILLISECONDS_IN:{SECOND:1e3,MINUTE:6e4,HOUR:36e5,DAY:864e5,WEEK:6048e5},SECONDS_IN:{MINUTE:60,HOUR:3600,DAY:86400,WEEK:604800},MINUTES_IN:{MINUTE:1,HOUR:60,DAY:1440,WEEK:10080},HOURS_IN:{DAY:24,WEEK:168},DAYS_IN:{WEEK:7}},DAYS_IN_MONTH_MIN=28,DAYS_IN_MONTH_MAX=31,MONTH_MAX=12,MONTH_MIN=1,DAY_MIN=1,FIRST_HOUR=0;function validateTimestamp(e){return"string"===typeof e&&PARSE_DATETIME.test(e)}function parsed(e){if("string"!==typeof e)return null;const t=PARSE_DATETIME.exec(e);if(!t||!t[1]||!t[2])return null;const a=parseInt(t[1],10),n=parseInt(t[2],10),r=parseInt(t[4]||"1",10),o=parseInt(t[6]||"0",10),i=parseInt(t[8]||"0",10);return{date:e,time:o.toString().padStart(2,"0")+":"+i.toString().padStart(2,"0"),year:a,month:n,day:r,hour:o,minute:i,hasDay:!!t[4],hasTime:!0,past:!1,current:!1,future:!1,disabled:!1,weekday:0,doy:0,workweek:0}}function parseDate(e,t=!1){if(!(e instanceof Date))return null;const a=t?"UTC":"";return updateFormatted({date:padNumber(e[`get${a}FullYear`](),4)+"-"+padNumber(e[`get${a}Month`]()+1,2)+"-"+padNumber(e[`get${a}Date`](),2),time:padNumber(e[`get${a}Hours`]()||0,2)+":"+padNumber(e[`get${a}Minutes`]()||0,2),year:e[`get${a}FullYear`](),month:e[`get${a}Month`]()+1,day:e[`get${a}Date`](),hour:e[`get${a}Hours`](),minute:e[`get${a}Minutes`](),weekday:0,doy:0,workweek:0,hasDay:!0,hasTime:!0,past:!1,current:!1,future:!1,disabled:!1})}function padNumber(e,t){let a=String(e);while(a.length<t)a="0"+a;return a}function isLeapYear(e){return e%4===0&&e%100!==0||e%400===0}function daysInMonth(e,t){return(isLeapYear(e)?DAYS_IN_MONTH_LEAP:DAYS_IN_MONTH)[t]}function nextDay(e){const t=new Date(e.year,e.month-1,e.day+1);return updateFormatted(normalizeTimestamp({...e,year:t.getFullYear(),month:t.getMonth()+1,day:t.getDate()}))}function prevDay(e){const t=new Date(e.year,e.month-1,e.day-1);return updateFormatted(normalizeTimestamp({...e,year:t.getFullYear(),month:t.getMonth()+1,day:t.getDate()}))}function today(){const e=new Date,t=e.getMonth()+1,a=e.getDate(),n=e.getFullYear();return[n,padNumber(t,2),padNumber(a,2)].join("-")}function isToday(e){return e===today()}function getStartOfWeek(e,t,a){let n=copyTimestamp(e);if(t){if(1===n.day||0===n.weekday)while(!t.includes(Number(n.weekday)))n=nextDay(n);n=findWeekday(n,t[0],prevDay),n=updateFormatted(n),a&&(n=updateRelative(n,a,n.hasTime))}return n}function getEndOfWeek(e,t,a){let n=copyTimestamp(e);if(t&&Array.isArray(t)){const r=daysInMonth(n.year,n.month);if(r===n.day||n.weekday===t[t.length-1])while(!t.includes(Number(n.weekday)))n=prevDay(n);n=findWeekday(n,t[t.length-1],nextDay),n=updateFormatted(n),a&&(n=updateRelative(n,a,n.hasTime))}return n}function getStartOfMonth(e){let t=copyTimestamp(e);return t.day=DAY_MIN,t=updateFormatted(t),t}function getEndOfMonth(e){let t=copyTimestamp(e);return t.day=daysInMonth(t.year,t.month),t=updateFormatted(t),t}function parseTime(e){const t=Object.prototype.toString.call(e);switch(t){case"[object Number]":return e;case"[object String]":{const a=PARSE_TIME.exec(e);return a?60*parseInt(a[1],10)+parseInt(a[3]||"0",10):!1}case"[object Object]":return"object"!==typeof e||"number"!==typeof e.hour||"number"!==typeof e.minute?!1:"object"===typeof e&&"hour"in e&&"minute"in e&&60*e.hour+e.minute}return!1}function compareTimestamps(e,t){return!(!e||!t)&&e.year===t.year&&e.month===t.month&&e.day===t.day&&e.hour===t.hour&&e.minute===t.minute}function compareDate(e,t){return getDate(e)===getDate(t)}function compareTime(e,t){return getTime(e)===getTime(t)}function compareDateTime(e,t){return getDateTime(e)===getDateTime(t)}function parseTimestamp(e,t=null){let a=parsed(e);return a?(a=updateFormatted(a),t&&(a=updateRelative(a,t,a.hasTime)),a):null}function getDayIdentifier(e){return 1e8*(e.year??0)+1e6*(e.month??0)+1e4*(e.day??0)}function getTimeIdentifier(e){return 100*(e.hour??0)+(e.minute??0)}function getDayTimeIdentifier(e){return getDayIdentifier(e)+getTimeIdentifier(e)}function diffTimestamp(e,t,a=!1){const n=Date.UTC(e.year??0,(e.month??1)-1,e.day??1,e.hour??0,e.minute??0),r=Date.UTC(t.year??0,(t.month??1)-1,t.day??1,t.hour??0,t.minute??0);return!0===a&&r<n?0:r-n}function updateRelative(e,t,a=!1){let n=copyTimestamp(e),r=getDayIdentifier(t),o=getDayIdentifier(n),i=r===o;return n.hasTime&&a&&i&&(r=getTimeIdentifier(t),o=getTimeIdentifier(n),i=r===o),n.past=o<r,n.current=i,n.future=o>r,n.currentWeekday=n.weekday===t.weekday,n}function updateMinutes(e,t,a=null){let n=copyTimestamp(e);return n.hasTime=!0,n.hour=Math.floor(t/TIME_CONSTANTS.MINUTES_IN.HOUR),n.minute=t%TIME_CONSTANTS.MINUTES_IN.HOUR,n.time=getTime(n),a&&(n=updateRelative(n,a,!0)),n}function updateWeekday(e){let t=copyTimestamp(e);return t.weekday=getWeekday(t),t}function updateDayOfYear(e){let t=copyTimestamp(e);return t.doy=getDayOfYear(t)||0,t}function updateWorkWeek(e){let t=copyTimestamp(e);return t.workweek=getWorkWeek(t),t}function updateDisabled(e,t,a,n,r){let o=copyTimestamp(e);const i=getDayIdentifier(o);if(void 0!==t){const l=parsed(t);if(l){const c=getDayIdentifier(l);i<=c&&(o.disabled=!0)}}if(!0!==o.disabled&&void 0!==a){const m=parsed(a);if(m){const y=getDayIdentifier(m);i>=y&&(o.disabled=!0)}}if(!0!==o.disabled&&Array.isArray(n)&&n.length>0)for(var d in n)if(n[d]===o.weekday){o.disabled=!0;break}if(!0!==o.disabled&&Array.isArray(r)&&r.length>0)for(var s in r)if(Array.isArray(r[s])&&2===r[s].length&&r[s][0]&&r[s][1]){const p=parsed(r[s][0]),v=parsed(r[s][1]);if(p&&v&&isBetweenDates(o,p,v)){o.disabled=!0;break}}else{const f=r[s];if(Array.isArray(f))for(var u of f){const h=parseTimestamp(u);if(h){const g=getDayIdentifier(h);if(g===i){o.disabled=!0;break}}}else if(f){const D=parseTimestamp(f);if(D){const T=getDayIdentifier(D);T===i&&(o.disabled=!0)}}}return o}function updateFormatted(e){let t=copyTimestamp(e);return t.hasTime=!0,t.time=getTime(t),t.date=getDate(t),t.weekday=getWeekday(t),t.doy=getDayOfYear(t)||0,t.workweek=getWorkWeek(t),t}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){let t=copyTimestamp(e);if(0===t.year){const r=parseTimestamp(today());r&&(t=r)}const a=new Date(Date.UTC(t.year,t.month-1,t.day)),n=4;a.setUTCDate(a.getUTCDate()-(a.getUTCDay()+6)%7+n),a.setUTCDate(a.getUTCDate()+n-(a.getUTCDay()||7));e=new Date(Date.UTC(a.getUTCFullYear(),0,1)),e=Math.ceil(((a.valueOf()-e.valueOf())/864e5+1)/7);return e}function getWeekday(e){let t=e.weekday;if(e.hasDay){const a=Math.floor,n=e.day,r=(e.month+9)%MONTH_MAX+1,o=a(e.year/100),i=e.year%100-(e.month<=2?1:0);t=((n+a(2.6*r-.2)-2*o+i+a(i/4)+a(o/4))%7+7)%7}return t??0}function copyTimestamp(e){return{...e}}function getDate(e){let 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):"00:00")}function moveRelativeDays(e,t=nextDay,a=1,n=[0,1,2,3,4,5,6]){const r=copyTimestamp(e);return relativeDays(r,t,a,n)}function relativeDays(e,t=nextDay,a=1,n=[0,1,2,3,4,5,6]){let r=copyTimestamp(e);n.includes(Number(r.weekday))||0!==r.weekday||t!==nextDay||++a;while(--a>=0)r=t(r),n.length<7&&!n.includes(Number(r.weekday))&&++a;return r}function findWeekday(e,t,a=nextDay,n=6){let r=copyTimestamp(e);while(r.weekday!==t&&--n>=0)r=a(r);return r}function createDayList(e,t,a,n=[0,1,2,3,4,5,6],r=void 0,o=void 0,i=[],d=[],s=42,u=0){const l=getDayIdentifier(e),c=getDayIdentifier(t),m=[];let y=copyTimestamp(e),p=0,v=p===c;if(!(c<l))while((!v||m.length<u)&&m.length<s){if(p=getDayIdentifier(y),v=v||p>c&&m.length>=u,v)break;if(n.includes(Number(y.weekday))){let e=copyTimestamp(y);e=updateFormatted(e),e=updateRelative(e,a),e=updateDisabled(e,r,o,i,d),m.push(e)}y=relativeDays(y,nextDay)}return m}function createIntervalList(t,a,n,r,o){const i=[];for(let e=0;e<r;++e){const d=(a+e)*n,s=copyTimestamp(t);i.push(updateMinutes(s,d,o))}return i}function createNativeLocaleFormatter(n,r){const e=()=>"";return"undefined"===typeof Intl||"undefined"===typeof Intl.DateTimeFormat?e:(t,e)=>{try{const a=new Intl.DateTimeFormat(n||void 0,r(t,e));return a.format(makeDateTime(t))}catch(e){return console.error(`Intl.DateTimeFormat: ${e.message} -> `+getDateTime(t)),""}}}function makeDate(e,t=!0){return t?new Date(Date.UTC(e.year,e.month-1,e.day,0,0)):new Date(e.year,e.month-1,e.day,0,0)}function makeDateTime(e,t=!0){return t?new Date(Date.UTC(e.year,e.month-1,e.day,e.hour,e.minute)):new Date(e.year,e.month-1,e.day,e.hour,e.minute)}function validateNumber(e){return isFinite(Number(e))}function maxTimestamp(e,t=!1){const a=!0===t?getDayTimeIdentifier:getDayIdentifier;return e.reduce((e,t)=>{return Math.max(a(e),a(t))===a(e)?e:t})}function minTimestamp(e,t=!1){const a=!0===t?getDayTimeIdentifier:getDayIdentifier;return e.reduce((e,t)=>{return Math.min(a(e),a(t))===a(e)?e:t})}function isBetweenDates(e,t,a,n=!1){const r=getDayIdentifier(e)+(!0===n?getTimeIdentifier(e):0),o=getDayIdentifier(t)+(!0===n?getTimeIdentifier(t):0),i=getDayIdentifier(a)+(!0===n?getTimeIdentifier(a):0);return r>=o&&r<=i}function isOverlappingDates(e,t,a,n){const r=getDayIdentifier(e),o=getDayIdentifier(t),i=getDayIdentifier(a),d=getDayIdentifier(n);return r>=i&&r<=d||o>=i&&o<=d||i>=r&&o>=d}function addToDate(e,t){const a=copyTimestamp(e);return t.year&&(a.year+=t.year),t.month&&(a.month+=t.month),t.day&&(a.day+=t.day),t.hour&&(a.hour+=t.hour),t.minute&&(a.minute+=t.minute),updateFormatted(normalizeTimestamp(a))}function normalizeTimestamp(e){const t=new Date(e.year,e.month-1,e.day,e.hour,e.minute);return{...e,year:t.getFullYear(),month:t.getMonth()+1,day:t.getDate(),hour:t.getHours(),minute:t.getMinutes()}}function daysBetween(e,t){const a=diffTimestamp(e,t,!0);return Math.floor(a/TIME_CONSTANTS.MILLISECONDS_IN.DAY)}function weeksBetween(e,t){let a=copyTimestamp(e),n=copyTimestamp(t);return a=findWeekday(a,0),n=findWeekday(n,6),Math.ceil(daysBetween(a,n)/TIME_CONSTANTS.DAYS_IN.WEEK)}const weekdayDateMap={Sun:new Date("2020-01-05T00:00:00.000Z"),Mon:new Date("2020-01-06T00:00:00.000Z"),Tue:new Date("2020-01-07T00:00:00.000Z"),Wed:new Date("2020-01-08T00:00:00.000Z"),Thu:new Date("2020-01-09T00:00:00.000Z"),Fri:new Date("2020-01-10T00:00:00.000Z"),Sat:new Date("2020-01-11T00:00:00.000Z")};function getWeekdayFormatter(){const e=()=>"",r={long:{timeZone:"UTC",weekday:"long"},short:{timeZone:"UTC",weekday:"short"},narrow:{timeZone:"UTC",weekday:"narrow"}};return"undefined"===typeof Intl||"undefined"===typeof Intl.DateTimeFormat?e:t;function t(t,e,a){try{const n=new Intl.DateTimeFormat(a||void 0,r[e]||r["long"]);return n.format(weekdayDateMap[t])}catch(e){return e instanceof Error&&console.error(`Intl.DateTimeFormat: ${e.message} -> day of week: `+t),""}}}function getWeekdayNames(t,a){const e=Object.keys(weekdayDateMap),n=getWeekdayFormatter();return e.map(e=>String(n(e,t,a)))}function getMonthFormatter(){const e=()=>"",o={long:{timeZone:"UTC",month:"long"},short:{timeZone:"UTC",month:"short"},narrow:{timeZone:"UTC",month:"narrow"}};return"undefined"===typeof Intl||"undefined"===typeof Intl.DateTimeFormat?e:t;function t(t,e,a){try{const n=new Intl.DateTimeFormat(a||void 0,o[e]||o["long"]),r=new Date;return r.setDate(1),r.setMonth(t),n.format(r)}catch(e){return e instanceof Error&&console.error(`Intl.DateTimeFormat: ${e.message} -> month: `+t),""}}}function getMonthNames(t,a){const n=getMonthFormatter();return[...Array(12).keys()].map(e=>n(e,t,a))}var Timestamp={PARSE_DATETIME:PARSE_DATETIME,PARSE_DATE:PARSE_DATE,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,TIME_CONSTANTS:TIME_CONSTANTS,FIRST_HOUR:FIRST_HOUR,today:today,getStartOfWeek:getStartOfWeek,getEndOfWeek:getEndOfWeek,getStartOfMonth:getStartOfMonth,getEndOfMonth:getEndOfMonth,parseTime:parseTime,validateTimestamp:validateTimestamp,parsed:parsed,parseTimestamp:parseTimestamp,parseDate:parseDate,getDayIdentifier:getDayIdentifier,getTimeIdentifier:getTimeIdentifier,getDayTimeIdentifier:getDayTimeIdentifier,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,createDayList:createDayList,createIntervalList:createIntervalList,createNativeLocaleFormatter:createNativeLocaleFormatter,makeDate:makeDate,makeDateTime:makeDateTime,validateNumber:validateNumber,isBetweenDates:isBetweenDates,isOverlappingDates:isOverlappingDates,daysBetween:daysBetween,weeksBetween:weeksBetween,addToDate:addToDate,compareTimestamps:compareTimestamps,compareDate:compareDate,compareTime:compareTime,compareDateTime:compareDateTime,getWeekdayFormatter:getWeekdayFormatter,getWeekdayNames:getWeekdayNames,getMonthFormatter:getMonthFormatter,getMonthNames:getMonthNames},Timestamp$1=Object.freeze({__proto__:null,DAYS_IN_MONTH:DAYS_IN_MONTH,DAYS_IN_MONTH_LEAP:DAYS_IN_MONTH_LEAP,DAYS_IN_MONTH_MAX:DAYS_IN_MONTH_MAX,DAYS_IN_MONTH_MIN:DAYS_IN_MONTH_MIN,DAY_MIN:DAY_MIN,FIRST_HOUR:FIRST_HOUR,MONTH_MAX:MONTH_MAX,MONTH_MIN:MONTH_MIN,PARSE_DATE:PARSE_DATE,PARSE_DATETIME:PARSE_DATETIME,PARSE_TIME:PARSE_TIME,TIME_CONSTANTS:TIME_CONSTANTS,addToDate:addToDate,compareDate:compareDate,compareDateTime:compareDateTime,compareTime:compareTime,compareTimestamps:compareTimestamps,copyTimestamp:copyTimestamp,createDayList:createDayList,createIntervalList:createIntervalList,createNativeLocaleFormatter:createNativeLocaleFormatter,daysBetween:daysBetween,daysInMonth:daysInMonth,default:Timestamp,diffTimestamp:diffTimestamp,findWeekday:findWeekday,getDate:getDate,getDateTime:getDateTime,getDayIdentifier:getDayIdentifier,getDayOfYear:getDayOfYear,getDayTimeIdentifier:getDayTimeIdentifier,getEndOfMonth:getEndOfMonth,getEndOfWeek:getEndOfWeek,getMonthFormatter:getMonthFormatter,getMonthNames:getMonthNames,getStartOfMonth:getStartOfMonth,getStartOfWeek:getStartOfWeek,getTime:getTime,getTimeIdentifier:getTimeIdentifier,getWeekday:getWeekday,getWeekdayFormatter:getWeekdayFormatter,getWeekdayNames:getWeekdayNames,getWorkWeek:getWorkWeek,isBetweenDates:isBetweenDates,isLeapYear:isLeapYear,isOverlappingDates:isOverlappingDates,isToday:isToday,makeDate:makeDate,makeDateTime:makeDateTime,maxTimestamp:maxTimestamp,minTimestamp:minTimestamp,moveRelativeDays:moveRelativeDays,nextDay:nextDay,padNumber:padNumber,parseDate:parseDate,parseTime:parseTime,parseTimestamp:parseTimestamp,parsed:parsed,prevDay:prevDay,relativeDays:relativeDays,today:today,updateDayOfYear:updateDayOfYear,updateDisabled:updateDisabled,updateFormatted:updateFormatted,updateMinutes:updateMinutes,updateRelative:updateRelative,updateWeekday:updateWeekday,updateWorkWeek:updateWorkWeek,validateNumber:validateNumber,validateTimestamp:validateTimestamp,weeksBetween:weeksBetween});function convertToUnit(e,t="px"){if(e)return isNaN(e)?String(e):"auto"===e?e:""+Number(e)+t}function indexOf(t,a){for(let e=0;e<t.length;e++)if(!0===a(t[e],e))return e;return-1}function minCharWidth(e,t){return 0===t?e:e.slice(0,t)}var helpers={convertToUnit:convertToUnit,indexOf:indexOf,minCharWidth:minCharWidth},helpers$1=Object.freeze({__proto__:null,convertToUnit:convertToUnit,default:helpers,indexOf:indexOf,minCharWidth:minCharWidth});const toCamelCase=e=>e.replace(/(-\w)/g,e=>e[1].toUpperCase());function getMouseEventHandlers(t,e,a,n){const r={};for(const o in a){const i=a[o],d=toCamelCase("on-"+o);if(!e.value)return console.warn("$listeners has not been set up"),{};if(void 0!==e.value[d]){const s="on"+i.event.charAt(0).toUpperCase()+i.event.slice(1),u=e=>{return(void 0===i.button||"buttons"in e&&e.buttons>0&&e.button===i.button)&&(i.prevent&&e.preventDefault(),i.stop&&e.stopPropagation(),t(o,n(e,o))),i.result};s in r?Array.isArray(r[s])?r[s].push(u):r[s]=[r[s],u]:r[s]=u}}return r}function getDefaultMouseEventHandlers(e,t,a,n){return getMouseEventHandlers(e,t,getMouseEventName(a),n)}function getMouseEventName(e){return{["click"+e]:{event:"click"},["contextmenu"+e]:{event:"contextmenu",prevent:!0,result:!1},["mousedown"+e]:{event:"mousedown"},["mousemove"+e]:{event:"mousemove"},["mouseup"+e]:{event:"mouseup"},["mouseenter"+e]:{event:"mouseenter"},["mouseleave"+e]:{event:"mouseleave"},["touchstart"+e]:{event:"touchstart"},["touchmove"+e]:{event:"touchmove"},["touchend"+e]:{event:"touchend"}}}function getRawMouseEvents(e){return Object.keys(getMouseEventName(e))}function useMouseEvents(a,n){return{getMouseEventHandlers:(e,t)=>getMouseEventHandlers(a,n,e,t),getDefaultMouseEventHandlers:(e,t)=>getDefaultMouseEventHandlers(a,n,e,t),getMouseEventName:getMouseEventName,getRawMouseEvents:getRawMouseEvents}}const ResizeObserverDirective={mounted(e,t){if("function"===typeof t.value){const a=t.value,n={callback:a,size:{width:0,height:0},observer:new ResizeObserver(e=>{const t=e[0].contentRect;t.width===n.size.width&&t.height===n.size.height||(n.size.width=t.width,n.size.height=t.height,n.debounceTimeout&&clearTimeout(n.debounceTimeout),n.debounceTimeout=setTimeout(()=>{n.callback(n.size),n.debounceTimeout=void 0},100))})};n.observer.observe(e),e.__onResizeObserver=n}},beforeUnmount(e){if(e.__onResizeObserver){const{observer:t,debounceTimeout:a}=e.__onResizeObserver;a&&clearTimeout(a),t.unobserve(e),delete e.__onResizeObserver}}};function useCalendar(t,a,{scrollArea:e,pane:n}){if(!a){const l="[error: renderCalendar] no renderFunc has been supplied to useCalendar";throw console.error(l),new Error(l)}const r=reactive({width:0,height:0}),o=ref(null);function i({width:e,height:t}){r.width=e,r.height=t}const d=computed(()=>{return!0!==t.noScroll&&e.value&&n.value&&r.height?e.value.offsetWidth-n.value.offsetWidth:0});function s(){}function u(){const e={ref:o,role:"complementary",lang:t.locale,class:`q-calendar ${t.dark?"q-calendar--dark":""} `+(t.bordered?"q-calendar__bordered":"")};return withDirectives(h("div",{...e},[a()]),[[ResizeObserverDirective,i]])}return{rootRef:o,scrollWidth:d,__initCalendar:s,__renderCalendar:u}}const isValidFocusType=e=>e.every(e=>["day","date","weekday","interval","time","resource","task"].includes(e)),useCommonProps={modelValue:{type:String,default:today(),validator:e=>""===e||validateTimestamp(e)},weekdays:{type:Array,default:()=>[0,1,2,3,4,5,6]},dateType:{type:String,default:"round",validator:e=>["round","rounded","square"].includes(e)},weekdayAlign:{type:String,default:"center",validator:e=>["left","center","right"].includes(e)},dateAlign:{type:String,default:"center",validator:e=>["left","center","right"].includes(e)},bordered:Boolean,dark:Boolean,noAria:Boolean,noActiveDate:Boolean,noHeader:Boolean,noScroll:Boolean,shortWeekdayLabel:Boolean,noDefaultHeaderText:Boolean,noDefaultHeaderBtn:Boolean,minWeekdayLabel:{type:[Number,String],default:1},weekdayBreakpoints:{type:Array,default:()=>[75,35],validator:e=>2===e.length},locale:{type:String,default:"en-US"},animated:Boolean,transitionPrev:{type:String,default:"slide-right"},transitionNext:{type:String,default:"slide-left"},disabledDays:Array,disabledBefore:String,disabledAfter:String,disabledWeekdays:{type:Array,default:()=>[]},dragEnterFunc:Function,dragOverFunc:Function,dragLeaveFunc:Function,dropFunc:Function,selectedDates:{type:[Array,Set],default:()=>[]},selectedStartEndDates:{type:Array,default:()=>[]},hoverable:Boolean,focusable:Boolean,focusType:{type:Array,default:()=>["date"],validator:isValidFocusType}};function useCommon(t,{startDate:e,endDate:a,times:n}){const r=computed(()=>parseTimestamp(e.value)),o=computed(()=>{return"0000-00-00"===a.value?getEndOfWeek(r.value,t.weekdays,n.today):parseTimestamp(a.value)||r.value}),i=computed(()=>createNativeLocaleFormatter(t.locale,()=>({timeZone:"UTC",day:"numeric"}))),d=computed(()=>createNativeLocaleFormatter(t.locale,(e,t)=>({timeZone:"UTC",weekday:t?"short":"long"}))),s=computed(()=>createNativeLocaleFormatter(t.locale,()=>({timeZone:"UTC",dateStyle:"full"})));function u(e,t){return e&&e.length>0&&e.includes(t.date)}function l(e,t){const a={firstDay:!1,betweenDays:!1,lastDay:!1};if(2===e.length){const n=getDayIdentifier(t),r=getDayIdentifier(parsed(e[0])),o=getDayIdentifier(parsed(e[1]));a.firstDay=r===n,a.lastDay=o===n,a.betweenDays=r<n&&o>n}return a}function c(e,t=!1,a=[],n=[],r=!1){const o=u(a,e),{firstDay:i,lastDay:d,betweenDays:s}=l(n,e);return{"q-past-day":!i&&!s&&!d&&!o&&!t&&!!e.past,"q-future-day":!i&&!s&&!d&&!o&&!t&&!!e.future,"q-outside":t,"q-current-day":!!e.current,"q-selected":o,"q-range-first":i,"q-range":s,"q-range-last":d,"q-range-hover":r&&(i||d||s),"q-disabled-day disabled":!0===e.disabled}}function m(e){return getStartOfWeek(e,t.weekdays,n.today)}function y(e){return getEndOfWeek(e,t.weekdays,n.today)}function p(){return{}}return{parsedStart:r,parsedEnd:o,dayFormatter:i,weekdayFormatter:d,ariaDateFormatter:s,arrayHasDate:u,checkDays:l,getRelativeClasses:c,startOfWeek:m,endOfWeek:y,dayStyleDefault:p}}const useMonthProps={dayHeight:{type:[Number,String],default:0,validator:e=>validateNumber(e)},dayMinHeight:{type:[Number,String],default:0,validator:e=>validateNumber(e)},dayStyle:Function,dayClass:Function,weekdayStyle:Function,weekdayClass:Function,dayPadding:String,minWeeks:{type:[Number,String],default:1,validator:e=>validateNumber(e)},shortMonthLabel:Boolean,showWorkWeeks:Boolean,showMonthLabel:{type:Boolean,default:!0},showDayOfYearLabel:Boolean,enableOutsideDays:Boolean,noOutsideDays:Boolean,hover:Boolean,miniMode:{type:[Boolean,String],validator:e=>[!0,!1,"auto"].includes(e)},breakpoint:{type:[Number,String],default:"md",validator:e=>["xs","sm","md","lg","xl"].includes(e)||validateNumber(e)},monthLabelSize:{type:String,default:"sm",validator:e=>["xxs","xs","sm","md","lg","xl","xxl"].includes(e)||!!e&&e.length>0}};function useMonth(n,t,{times:r,parsedStart:a,parsedEnd:o,size:i,headerColumnRef:d}){const e=computed(()=>parseInt(n.minWeeks,10)),s=computed(()=>e.value*n.weekdays.length),u=computed(()=>D(k(a.value))),l=computed(()=>T(w(o.value))),c=computed(()=>{let e=0;return n.cellWidth?e=Number(n.cellWidth):i.width>0&&d.value&&(e=d.value.offsetWidth/n.weekdays.length),e}),m=computed(()=>createDayList(u.value,l.value,r.today,n.weekdays,n.disabledBefore,n.disabledAfter,n.disabledWeekdays,n.disabledDays,Number.MAX_SAFE_INTEGER,s.value)),y=computed(()=>{const e=r.today,t=D(e),a=T(e);return createDayList(t,a,e,n.weekdays,n.disabledBefore,n.disabledAfter,n.disabledWeekdays,n.disabledDays,n.weekdays.length,n.weekdays.length)}),p=computed(()=>createNativeLocaleFormatter(n.locale,(e,t)=>({timeZone:"UTC",month:t?"short":"long"}))),v=computed(()=>{switch(n.breakpoint){case"xs":return 300;case"sm":return 350;case"md":return 400;case"lg":return 450;case"xl":return 500;default:return parseInt(n.breakpoint,10)}}),f=computed(()=>{switch(n.monthLabelSize){case"xxs":return".4em";case"xs":return".6em";case"sm":return".8em";case"md":return"1.0em";case"lg":return"1.2em";case"xl":return"1.4em";case"xxl":return"1.6em";default:return n.monthLabelSize}});let h=!0;const g=computed(()=>{const e=!0===n.miniMode||"auto"===n.miniMode&&void 0!==n.breakpoint&&i.width<v.value;return h&&(h=!1,t("mini-mode",e)),e});function D(e){return getStartOfWeek(e,n.weekdays,r.today)}function T(e){return getEndOfWeek(e,n.weekdays,r.today)}function k(e){return getStartOfMonth(e)}function w(e){return getEndOfMonth(e)}function M(e){const t=getDayIdentifier(e);return t<getDayIdentifier(a.value)||t>getDayIdentifier(o.value)}return watch(g,e=>{t("mini-mode",e)}),{parsedCellWidth:c,parsedMinWeeks:e,parsedMinDays:s,parsedMonthStart:u,parsedMonthEnd:l,parsedBreakpoint:v,parsedMonthLabelSize:f,days:m,todayWeek:y,isMiniMode:g,monthFormatter:p,isOutside:M}}const useTimesProps={now:{type:String,validator:e=>""===e||validateTimestamp(e),default:""}};function useTimes(e){const t=reactive({now:parseTimestamp("0000-00-00 00:00"),today:parseTimestamp("0000-00-00")}),a=computed(()=>e.now?parseTimestamp(e.now):o());function n(){t.now&&t.today&&(t.now.current=t.today.current=!0,t.now.past=t.today.past=!1,t.now.future=t.today.future=!1)}function r(){const e=a.value||o();i(e,t.now),d(e,t.now),i(e,t.today)}function o(){return parseDate(new Date)}function i(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)}function d(e,t){e.time!==t.time&&(t.hour=e.hour,t.minute=e.minute,t.time=e.time)}return watch(a,()=>r()),{times:t,parsedNow:a,setCurrent:n,updateCurrent:r,getNow:o,updateDay:i,updateTime:d}}function useRenderValues(r,{parsedView:o,parsedValue:i,times:d}){const e=computed(()=>{const e=i.value;let t=r.maxDays,a=e,n=e;switch(o.value){case"month":a=getStartOfMonth(e),n=getEndOfMonth(e),t=daysInMonth(a.year,a.month);break;case"week":case"week-agenda":case"week-scheduler":a=getStartOfWeek(e,r.weekdays,d.today),n=getEndOfWeek(a,r.weekdays,d.today),t=r.weekdays.length;break;case"day":case"scheduler":case"agenda":n=moveRelativeDays(copyTimestamp(n),nextDay,t>1?t-1:t,r.weekdays),n=updateFormatted(n);break;case"month-interval":case"month-scheduler":case"month-agenda":a=getStartOfMonth(e),n=getEndOfMonth(e),n=updateFormatted(n),t=daysInMonth(a.year,a.month);break;case"resource":t=1,n=moveRelativeDays(copyTimestamp(n),nextDay,t,r.weekdays),n=updateFormatted(n);break}return{start:a,end:n,maxDays:t}});return{renderValues:e}}const useMoveEmits=["moved"];function useMove(s,{parsedView:u,parsedValue:l,direction:c,maxDays:m,times:y,emittedValue:p,emit:v}){function e(a=1){if(0===a)p.value=today();else{let e=copyTimestamp(l.value);const n=getEndOfMonth(e),r=a>0,o=r?nextDay:prevDay,i=r?n.day:1;let t=r?a:-a;c.value=r?"next":"prev";const d=s.weekdays.length;while(--t>=0)switch(u.value){case"month":e.day=i,e=o(e),e=updateWeekday(e);while(!s.weekdays.includes(Number(e.weekday)))e=addToDate(e,{day:r?1:-1});break;case"week":case"week-agenda":case"week-scheduler":e=relativeDays(e,o,d,s.weekdays);break;case"day":case"scheduler":case"agenda":e=relativeDays(e,o,m.value,s.weekdays);break;case"month-interval":case"month-agenda":case"month-scheduler":e.day=i,e=o(e);break;case"resource":e=relativeDays(e,o,m.value,s.weekdays);break}e=updateWeekday(e),e=updateFormatted(e),e=updateDayOfYear(e),e=updateRelative(e,y.now),p.value=e.date,v("moved",e)}}return{move:e}}const listenerRE=/^on[A-Z]/;function useEmitListeners(e=getCurrentInstance()){return{emitListeners:computed(()=>{const t={};return e?.vnode?.props&&Object.keys(e.vnode.props).forEach(e=>{listenerRE.test(e)&&(t[e]=!0)}),t})}}function useFocusHelper(){const e={"aria-hidden":"true",class:"q-calendar__focus-helper"};return[h("span",e)]}function useButton(){function e({focusable:e,focusType:t},a,n){const r=e&&t.includes("date");return h("button",{...a,tabindex:r?0:-1},[n,r&&useFocusHelper()])}return{renderButton:e}}const useCellWidthProps={cellWidth:[Number,String]};function useCellWidth(e){const t=computed(()=>void 0!==e.cellWidth);return{isSticky:t}}const useCheckChangeEmits=["change"];function useCheckChange(n,{days:r,lastStart:o,lastEnd:i}){function e(){const e=r.value;if(0===e.length)return!1;const t=e[0].date,a=e[e.length-1].date;return(!o.value||!i.value||t!==o.value||a!==i.value)&&(o.value=t,i.value=a,n("change",{start:t,end:a,days:e}),!0)}return{checkChange:e}}function useEventUtils(){function e(e,t){return(Array.isArray(t)?t:[t]).includes(e.keyCode)}return{isKeyCode:e}}const isKeyCode=useEventUtils().isKeyCode,useNavigationProps={useNavigation:Boolean};function useNavigation(t,{rootRef:a,focusRef:n,focusValue:r,datesRef:o,parsedView:i,emittedValue:d,direction:s,times:u}){let e=!1;function l(){e||document&&(e=!0,document.addEventListener("keyup",v),document.addEventListener("keydown",p))}function c(){document&&(document.removeEventListener("keyup",v),document.removeEventListener("keydown",p),e=!1)}function m(e){if(e&&document){const t=document.activeElement;if(t!==document.body&&a.value?.contains(t))return!0}return!1}function y(){let t=0;const a=window.setInterval(()=>{const e=o.value[n.value];e&&(e.focus(),50!==++t)&&document.activeElement!==e||window.clearInterval(a)},250)}function p(e){m(e)&&isKeyCode(e,[33,34,35,36,37,38,39,40])&&(e.stopPropagation(),e.preventDefault())}function v(e){if(m(e)&&isKeyCode(e,[33,34,35,36,37,38,39,40])){const t={33:T,34:k,35:M,36:w,37:g,38:f,39:D,40:h};t[e.keyCode]?.()}}function f(){let e=copyTimestamp(r.value);if("month"===i.value){if(e=addToDate(e,{day:-7}),r.value.month!==e.month)return s.value="prev",void(d.value=e.date)}else e=addToDate(e,{minute:Number(t.intervalMinutes)});s.value="prev",n.value=e.date}function h(){let e=copyTimestamp(r.value);if("month"===i.value){if(e=addToDate(e,{day:7}),r.value.month!==e.month)return s.value="next",void(d.value=e.date)}else e=addToDate(e,{minute:Number(t.intervalMinutes)});s.value="next",n.value=e.date}function g(){let e=copyTimestamp(r.value);s.value="prev";do{e=addToDate(e,{day:-1})}while(!t.weekdays.includes(Number(e.weekday)));n.value=e.date}function D(){let e=copyTimestamp(r.value);s.value="next";do{e=addToDate(e,{day:1})}while(!t.weekdays.includes(Number(e.weekday)));n.value=e.date}function T(){let e=copyTimestamp(r.value);e="month"===i.value?addToDate(e,{month:-1}):addToDate(e,{day:-7}),s.value="prev",n.value=e.date}function k(){let e=copyTimestamp(r.value);e="month"===i.value?addToDate(e,{month:1}):addToDate(e,{day:7}),s.value="next",n.value=e.date}function w(){let e=copyTimestamp(r.value);e="month"===i.value?getStartOfMonth(e):getStartOfWeek(e,t.weekdays||[],u.today);while(!t.weekdays.includes(Number(e.weekday)))e=addToDate(e,{day:-1});n.value=e.date}function M(){let e=copyTimestamp(r.value);e="month"===i.value?getEndOfMonth(e):getEndOfWeek(e,t.weekdays||[],u.today);while(!t.weekdays.includes(Number(e.weekday)))e=addToDate(e,{day:-1});n.value=e.date}return onBeforeUnmount(()=>{c()}),watch(()=>t.useNavigation,e=>{(!0===e?l:c)()}),!0===t.useNavigation&&l(),{startNavigation:l,endNavigation:c,tryFocus:y}}const renderButton=useButton().renderButton;var QCalendarMonth=defineComponent({name:"QCalendarMonth",directives:{ResizeObserver:ResizeObserverDirective},props:{...useCommonProps,...useMonthProps,...useTimesProps,...useCellWidthProps,...useNavigationProps},emits:["update:model-value",...useCheckChangeEmits,...useMoveEmits,"mini-mode",...getRawMouseEvents("-date"),...getRawMouseEvents("-day"),...getRawMouseEvents("-head-workweek"),...getRawMouseEvents("-head-day"),...getRawMouseEvents("-workweek")],setup(y,{slots:p,emit:c,expose:x}){const L=ref(null),Y=ref(null),e=ref(null),v=ref(y.modelValue||today()),t=ref(parsed(y.modelValue||today())),m=ref({}),u=ref([]),l=ref([]),o=ref("next"),i=ref(y.modelValue||today()),d=ref("0000-00-00"),B=ref(0),f=ref(y.modelValue),s=reactive({width:0,height:0}),g=ref(),D=ref(""),U=ref(null),q=ref(null),a=computed(()=>{return"month"}),n=getCurrentInstance();if(null===n)throw new Error("current instance is null");const T=useEmitListeners(n).emitListeners,P=useCellWidth(y).isSticky,{times:r,setCurrent:V,updateCurrent:k}=(watch(P,()=>{}),useTimes(y)),{parsedStart:w,parsedEnd:M,dayFormatter:z,weekdayFormatter:$,ariaDateFormatter:Z,dayStyleDefault:b,getRelativeClasses:j}=(k(),V(),useCommon(y,{startDate:i,endDate:d,times:r})),_=computed(()=>{return parseTimestamp(y.modelValue,r.now)||w.value||r.today}),K=(t.value=_.value,v.value=_.value.date,computed(()=>{const e={};return void 0!==y.dayPadding&&(e.padding=y.dayPadding),e.minWidth=F.value,e.maxWidth=F.value,e.width=F.value,e})),X=useRenderValues(y,{parsedView:a,times:r,parsedValue:_}).renderValues,{rootRef:N,__renderCalendar:Q}=useCalendar(y,Ee,{scrollArea:L,pane:Y}),{days:I,todayWeek:G,isMiniMode:E,parsedCellWidth:J,parsedMonthLabelSize:ee,isOutside:te,monthFormatter:ae}=useMonth(y,c,{times:r,parsedStart:w,parsedEnd:M,size:s,headerColumnRef:e}),O=useMove(y,{parsedView:a,parsedValue:_,direction:o,maxDays:B,times:r,emittedValue:f,emit:c}).move,S=useMouseEvents(c,T).getDefaultMouseEventHandlers,ne=useCheckChange(c,{days:I,lastStart:U,lastEnd:q}).checkChange,A=useEventUtils().isKeyCode,re=useNavigation(y,{rootRef:N,focusRef:v,focusValue:t,datesRef:m,parsedView:a,emittedValue:f,direction:o,times:r}).tryFocus,oe=computed(()=>{return N.value&&!0===y.showWorkWeeks?parseInt(window.getComputedStyle(N.value).getPropertyValue(!0===E.value?"--calendar-mini-work-week-width":"--calendar-work-week-width"),10):0}),W=computed(()=>{return y.weekdays.length}),F=computed(()=>{if(N.value){const e=s.width||N.value.getBoundingClientRect().width;if(e&&W.value)return(e-oe.value)/W.value+"px"}return 100/W.value+"%"}),C=computed(()=>{return!0===y.focusable&&y.focusType.includes("day")&&!0!==E.value}),R=computed(()=>{return!0===y.focusable&&y.focusType.includes("date")&&!0!==C.value});function ie(){f.value=today()}function de(e=1){O(e)}function se(e=1){O(-e)}function ue({width:e,height:t}){s.width=e,s.height=t}function H(e){return e.date===f.value}function le(t){for(let e=0;e<t.length;++e)if(!0===t[e].current)return{timestamp:t[e]};return{timestamp:!1}}function ce(){if(!0!==E.value&&0===y.dayHeight){const t=p.week;if(void 0!==t&&window)for(var e in u.value){const a=u.value[e];if(void 0!==a){const n=l.value[e];if(void 0!==n){const r=window.getComputedStyle(a),o=parseFloat(r.marginTop)+parseFloat(r.marginBottom);n.clientHeight+o>n.clientHeight&&(n.style.height=a.clientHeight+o+"px")}}}}}function me(){return h("div",{class:"q-calendar-month__body"},[...Te()])}function ye(){return h("div",{role:"presentation",class:"q-calendar-month__head"},[!0===y.showWorkWeeks&&ve(),h("div",{class:"q-calendar-month__head--wrapper"},[pe()])])}function pe(){return h("div",{ref:e,class:{"q-calendar-month__head--weekdays":!0}},[...fe()])}function ve(){const e=p["head-workweek"],t={start:w.value,end:M.value,miniMode:E.value};return h("div",{class:"q-calendar-month__head--workweek",...S("-head-workweek",e=>{return{scope:t,event:e}})},e?e({scope:t}):"#")}function fe(){return G.value.map((e,t)=>he(e,t))}function he(t,e){const a=p["head-day"],n=I.value.filter(e=>e.weekday===t.weekday),r=n[0].weekday,o=!0!==y.noActiveDate&&H(t),i={activeDate:o,weekday:r,timestamp:t,days:n,index:e,miniMode:E.value,droppable:g.value===Number(t.weekday),disabled:!!y.disabledWeekdays&&y.disabledWeekdays.includes(Number(t.weekday))},d="function"===typeof y.weekdayClass?y.weekdayClass({scope:i}):{},s=!0===y.focusable&&y.focusType.includes("weekday"),u=F.value,l=y.weekdayStyle||b,c={width:u,maxWidth:u,minWidth:u,...l({scope:i})},m={key:t.date+(void 0!==e?"-"+e:""),tabindex:!0===s?0:-1,class:{"q-calendar-month__head--weekday":!0,...d,"q-disabled-day disabled":!0===i.disabled,["q-calendar__"+y.weekdayAlign]:!0,"q-calendar__ellipsis":!0,"q-calendar__focusable":!0===s},style:c,onDragenter:e=>{void 0!==y.dragEnterFunc&&"function"===typeof y.dragEnterFunc&&(!0===y.dragEnterFunc(e,"head-day",{scope:i})?g.value=Number(t.weekday):g.value=-1)},onDragover:e=>{void 0!==y.dragOverFunc&&"function"===typeof y.dragOverFunc&&(!0===y.dragOverFunc(e,"head-day",{scope:i})?g.value=Number(t.weekday):g.value=-1)},onDragleave:e=>{void 0!==y.dragLeaveFunc&&"function"===typeof y.dragLeaveFunc&&(!0===y.dragLeaveFunc(e,"head-day",{scope:i})?g.value=Number(t.weekday):g.value=-1)},onDrop:e=>{void 0!==y.dropFunc&&"function"===typeof y.dropFunc&&(!0===y.dropFunc(e,"head-day",{scope:i})?g.value=Number(t.weekday):g.value=-1)},onFocus:()=>{!0===s&&(v.value=t.date)},...S("-head-day",e=>{return{scope:i,event:e}})};return!0!==y.noAria&&(m.ariaLabel=$.value(t,!1)),h("div",m,[void 0===a&&De(t,y.shortWeekdayLabel||E.value),void 0!==a&&a({scope:i}),ge(t,e),!0===s&&useFocusHelper()])}function ge(t,e){const a=p["head-day-event"],n=!0!==y.noActiveDate&&H(t),r=I.value.filter(e=>e.weekday===t.weekday),o=r[0].weekday,i={weekday:o,timestamp:t,days:r,index:e,miniMode:E.value,activeDate:n,disabled:!!y.disabledWeekdays&&y.disabledWeekdays.includes(Number(t.weekday))},d=F.value,s=y.weekdayStyle||b,u={width:d,maxWidth:d,minWidth:d,...s({scope:i})};return h("div",{key:"event-"+t.date+(void 0!==e?"-"+e:""),class:{"q-calendar-month__head--event":!0},style:u},[void 0!==a&&a({scope:i})])}function De(e,t){const a=$.value(e,t||y.weekdayBreakpoints[0]>0&&J.value<=y.weekdayBreakpoints[0]);return h("span",{class:"q-calendar__ellipsis"},!0===E.value&&!0===y.shortWeekdayLabel||y.weekdayBreakpoints[1]>0&&J.value<=y.weekdayBreakpoints[1]?minCharWidth(a,Number(y.minWeekdayLabel)):a)}function Te(){const t=y.weekdays.length,a=[];for(let e=0;e<I.value.length;e+=t)a.push(ke(I.value.slice(e,e+t),e/t));return a}function ke(e,t){const a=p.week,n=y.weekdays,r={week:e,weekdays:n,miniMode:E.value},o={},i=parseInt(String(y.dayHeight),10),d=parseInt(String(y.dayMinHeight),10),s=(o.height=i>0&&!0!==E.value?convertToUnit(i):"auto",d>0&&!0!==E.value&&(o.minHeight=convertToUnit(d)),0===i&&0===d);return h("div",{key:e[0].date,ref:e=>{l.value[t]=e},class:{"q-calendar-month__week--wrapper":!0,"q-calendar-month__week--auto-height":s},style:o},[!0===y.showWorkWeeks?we(e):void 0,h("div",{class:"q-calendar-month__week"},[h("div",{class:"q-calendar-month__week--days"},e.map(e=>Me(e))),!0!==E.value&&void 0!==a?h("div",{ref:e=>{u.value[t]=e},class:"q-calendar-month__week--events"},a({scope:r})):void 0])])}function we(e){const t=p.workweek,a=e.length>2?e[2]:e[0],n=le(e).timestamp,r=Number(a.workweek).toLocaleString(y.locale),o={workweekLabel:r,week:e,miniMode:E.value};return h("div",{key:a.workweek,class:{"q-calendar-month__workweek":!0,...j(!1!==n?n:a,!1)},...S("-workweek",e=>{return{scope:o,event:e}})},t?t({scope:o}):r)}function Me(t){const e=p.day,a=y.dayStyle||b,n=te(t),r=!0!==y.noActiveDate&&_.value.date===t.date,o=!1===n&&!0===y.showMonthLabel&&I.value.find(e=>e.month===t.month)?.day===t.day,i={outside:n,timestamp:t,miniMode:E.value,activeDate:r,hasMonth:o,droppable:D.value===t.date,disabled:!!y.disabledWeekdays&&y.disabledWeekdays.includes(Number(t.weekday))},d=Object.assign({...K.value},a({scope:i})),s="function"===typeof y.dayClass?y.dayClass({scope:i}):{},u={key:t.date,ref:e=>{!0===C.value&&(m.value[t.date]=e)},tabindex:!0===C.value?0:-1,class:{"q-calendar-month__day":!0,...s,...j(t,n,Array.from(y.selectedDates),y.selectedStartEndDates,y.hover),"q-active-date":!0===r,disabled:!0!==y.enableOutsideDays&&!0===n,"q-calendar__hoverable":!0===y.hoverable,"q-calendar__focusable":!0===C.value},style:d,onFocus:()=>{!0===C.value&&(v.value=t.date)},onKeydown:e=>{!0!==n&&!0!==t.disabled&&A(e,[13,32])&&(e.stopPropagation(),e.preventDefault())},onKeyup:e=>{!0!==n&&!0!==t.disabled&&A(e,[13,32])&&(e.stopPropagation(),e.preventDefault(),void 0!==T.value.onClickDay)&&!0!==E.value&&c("click-day",{scope:i,e:e})},...S("-day",e=>{return{scope:i,event:e}})},l={onDragenter:e=>{void 0!==y.dragEnterFunc&&"function"===typeof y.dragEnterFunc&&(!0===y.dragEnterFunc(e,"day",{scope:i})?D.value=t.date:D.value="")},onDragover:e=>{void 0!==y.dragOverFunc&&"function"===typeof y.dragOverFunc&&(!0===y.dragOverFunc(e,"day",{scope:i})?D.value=t.date:D.value="")},onDragleave:e=>{void 0!==y.dragLeaveFunc&&"function"===typeof y.dragLeaveFunc&&(!0===y.dragLeaveFunc(e,"day",{scope:i})?D.value=t.date:D.value="")},onDrop:e=>{void 0!==y.dropFunc&&"function"===typeof y.dropFunc&&(!0===y.dropFunc(e,"day",{scope:i})?D.value=t.date:D.value="")}};return!0!==n&&Object.assign(u,l),!0!==y.noAria&&(u.ariaLabel=Z.value(t,!1)),h("div",u,[be(t,n,o),h("div",{class:{"q-calendar-month__day--content":!0}},e?e({scope:i}):void 0),!0===C.value&&useFocusHelper()])}function be(e,t,a){let n,r;const o=[_e(e,t)],i=(!0!==E.value&&!0===a&&s.width>340&&(r=Ie(e,t)),!0!==E.value&&!0===y.showDayOfYearLabel&&void 0===r&&s.width>300&&(n=Ne(e,t)),"left"===y.dateAlign?(void 0!==n&&o.push(n),void 0!==r&&o.push(r)):"right"===y.dateAlign?(void 0!==n&&o.unshift(n),void 0!==r&&o.unshift(r)):(n=void 0,r=void 0),{class:{"q-calendar-month__day--label__wrapper":!0,"q-calendar__ellipsis":!0,["q-calendar__"+y.dateAlign]:void 0===n&&void 0===r,"q-calendar__justify":void 0!==n||void 0!==r}});return h("div",i,o)}function _e(a,t){if(!0!==t||!0!==y.noOutsideDays){const e=z.value(a,!1),n=p["head-day-label"],r=p["head-day-button"],o=y.selectedDates&&Array.from(y.selectedDates).length>0&&Array.from(y.selectedDates).includes(a.date),i=!0!==y.noActiveDate&&H(a),d={dayLabel:e,timestamp:a,outside:t,activeDate:i,selectedDate:o,miniMode:E.value,disabled:!!y.disabledWeekdays&&y.disabledWeekdays.includes(Number(a.weekday))},s={key:a.date,ref:e=>{!0===R.value&&(m.value[a.date]=e)},tabindex:!0===R.value?0:-1,class:{"q-calendar-month__day--label":!0,"q-calendar__button":!0,"q-calendar__button--round":"round"===y.dateType,"q-calendar__button--rounded":"rounded"===y.dateType,"q-calendar__button--bordered":!0===a.current,"q-calendar__hoverable":!0===y.hoverable,"q-calendar__focusable":!0===R.value},disabled:!0===a.disabled||!0!==y.enableOutsideDays&&!0===t,onFocus:()=>{!0===R.value&&(v.value=a.date)},onKeydown:e=>{!0!==t&&!0!==a.disabled&&A(e,[13,32])&&(e.stopPropagation(),e.preventDefault())},onKeyup:e=>{!0===R.value&&!0!==t&&!0!==a.disabled&&A(e,[13,32])&&(e.stopPropagation(),e.preventDefault(),f.value=a.date,void 0!==T.value.onClickDate)&&c("click-date",{scope:d,event:e})},...S("-date",(e,t)=>{return e.stopPropagation(),"click-date"!==t&&"contextmenu-date"!==t||(f.value=a.date),{scope:d,event:e}})};return!0!==y.noAria&&(s.ariaLabel=Z.value(a,!1)),[r?r({scope:d}):renderButton(y,s,n?n({scope:d}):e),!0===R.value&&useFocusHelper()].filter(e=>!1!==e)}}function Ne(e,t){if(!0!==t||!0!==y.noOutsideDays){const a=p["day-of-year"],n={timestamp:e};return h("span",{class:{"q-calendar-month__day--day-of-year":!0,"q-calendar__ellipsis":!0}},a?a({scope:n}):e.doy)}}function Ie(e,t){if(!0!==t||!0!==y.noOutsideDays){const a=p["month-label"],n=ae.value(e,y.shortMonthLabel||s.width<500),r={monthLabel:n,timestamp:e,miniMode:E.value},o={};return!0!==E.value&&void 0!==ee.value&&(o.fontSize=ee.value),h("span",{class:"q-calendar-month__day--month q-calendar__ellipsis",style:o},[a?a({scope:r}):!0!==E.value?n:void 0])}}function Ee(){const{start:e,end:t}=X.value,a=(i.value=e.date,d.value=t.date,s.width>0),n=withDirectives(h("div",{class:{"q-calendar-mini":!0===E.value,"q-calendar-month":!0},key:i.value},[!0===a&&!0!==y.noHeader&&ye(),!0===a&&me()]),[[ResizeObserverDirective,ue]]);if(!0!==y.animated)return n;{const r="q-calendar--"+("prev"===o.value?y.transitionPrev:y.transitionNext);return h(Transition,{name:r,appear:!0},()=>n)}}return watch([I],ne,{deep:!0,immediate:!0}),watch(()=>y.modelValue,(e,t)=>{if(f.value!==e){if(!0===y.animated){const a=getDayIdentifier(parsed(e)),n=getDayIdentifier(parsed(t));o.value=a>=n?"next":"prev"}f.value=e}v.value=e}),watch(f,(e,t)=>{if(f.value!==y.modelValue){if(!0===y.animated){const a=getDayIdentifier(parsed(e)),n=getDayIdentifier(parsed(t));o.value=a>=n?"next":"prev"}c("update:model-value",e)}}),watch(v,e=>{e&&(t.value=parseTimestamp(e),f.value!==e)&&(f.value=e)}),watch(t,()=>{m.value[v.value]?m.value[v.value].focus():re()}),onBeforeUpdate(()=>{m.value={},u.value=[],l.value=[],nextTick(()=>{ce()})}),onMounted(()=>{ce()}),x({prev:se,next:de,move:O,moveToToday:ie,updateCurrent:k}),()=>Q()}});const version="4.1.1";var Plugin={version:version,QCalendarMonth:QCalendarMonth,...Timestamp$1,...helpers$1,install(e){e.component(String(QCalendarMonth.name),QCalendarMonth)}};export{DAYS_IN_MONTH,DAYS_IN_MONTH_LEAP,DAYS_IN_MONTH_MAX,DAYS_IN_MONTH_MIN,DAY_MIN,FIRST_HOUR,MONTH_MAX,MONTH_MIN,PARSE_DATE,PARSE_DATETIME,PARSE_TIME,QCalendarMonth,TIME_CONSTANTS,addToDate,compareDate,compareDateTime,compareTime,compareTimestamps,convertToUnit,copyTimestamp,createDayList,createIntervalList,createNativeLocaleFormatter,daysBetween,daysInMonth,Plugin as default,diffTimestamp,findWeekday,getDate,getDateTime,getDayIdentifier,getDayOfYear,getDayTimeIdentifier,getEndOfMonth,getEndOfWeek,getMonthFormatter,getMonthNames,getStartOfMonth,getStartOfWeek,getTime,getTimeIdentifier,getWeekday,getWeekdayFormatter,getWeekdayNames,getWorkWeek,indexOf,isBetweenDates,isLeapYear,isOverlappingDates,isToday,makeDate,makeDateTime,maxTimestamp,minCharWidth,minTimestamp,moveRelativeDays,nextDay,padNumber,parseDate,parseTime,parseTimestamp,parsed,prevDay,relativeDays,today,updateDayOfYear,updateDisabled,updateFormatted,updateMinutes,updateRelative,updateWeekday,updateWorkWeek,validateNumber,validateTimestamp,version,weeksBetween}; |
/*! | ||
* @quasar/quasar-ui-qcalendar v4.1.0 | ||
* @quasar/quasar-ui-qcalendar v4.1.1 | ||
* (c) 2025 Jeff Galbraith <jeff@quasar.dev> | ||
* Released under the MIT License. | ||
*/ | ||
(function(e,t){"object"===typeof exports&&"undefined"!==typeof module?module.exports=t(require("vue")):"function"===typeof define&&define.amd?define(["vue"],t):(e="undefined"!==typeof globalThis?globalThis:e||self,e.QCalendarMonth=t(e.Vue))})(this,function(Ae){const u=/^(\d{4})-(\d{1,2})(-(\d{1,2}))?([^\d]+(\d{1,2}))?(:(\d{1,2}))?(:(\d{1,2}))?(.(\d{1,3}))?$/,_=/^(\d{4})-(\d{1,2})(-(\d{1,2}))?/,O=/(\d\d?)(:(\d\d?)|)(:(\d\d?)|)/,W=[0,31,28,31,30,31,30,31,31,30,31,30,31],C=[0,31,29,31,30,31,30,31,31,30,31,30,31],r={MILLISECONDS_IN:{SECOND:1e3,MINUTE:6e4,HOUR:36e5,DAY:864e5,WEEK:6048e5},SECONDS_IN:{MINUTE:60,HOUR:3600,DAY:86400,WEEK:604800},MINUTES_IN:{MINUTE:1,HOUR:60,DAY:1440,WEEK:10080},HOURS_IN:{DAY:24,WEEK:168},DAYS_IN:{WEEK:7}},x=28,q=31,L=12,U=1,B=1,R=0;function t(e){return"string"===typeof e&&u.test(e)}function Fe(e){if("string"!==typeof e)return null;const t=u.exec(e);if(!t||!t[1]||!t[2])return null;const a=parseInt(t[1],10),n=parseInt(t[2],10),r=parseInt(t[4]||"1",10),o=parseInt(t[6]||"0",10),d=parseInt(t[8]||"0",10);return{date:e,time:o.toString().padStart(2,"0")+":"+d.toString().padStart(2,"0"),year:a,month:n,day:r,hour:o,minute:d,hasDay:!!t[4],hasTime:!0,past:!1,current:!1,future:!1,disabled:!1,weekday:0,doy:0,workweek:0}}function H(e,t=!1){if(!(e instanceof Date))return null;const a=t?"UTC":"";return g({date:o(e[`get${a}FullYear`](),4)+"-"+o(e[`get${a}Month`]()+1,2)+"-"+o(e[`get${a}Date`](),2),time:o(e[`get${a}Hours`]()||0,2)+":"+o(e[`get${a}Minutes`]()||0,2),year:e[`get${a}FullYear`](),month:e[`get${a}Month`]()+1,day:e[`get${a}Date`](),hour:e[`get${a}Hours`](),minute:e[`get${a}Minutes`](),weekday:0,doy:0,workweek:0,hasDay:!0,hasTime:!0,past:!1,current:!1,future:!1,disabled:!1})}function o(e,t){let a=String(e);while(a.length<t)a="0"+a;return a}function Y(e){return e%4===0&&e%100!==0||e%400===0}function i(e,t){return(Y(e)?C:W)[t]}function h(e){const t=new Date(e.year,e.month-1,e.day+1);return g(ie({...e,year:t.getFullYear(),month:t.getMonth()+1,day:t.getDate()}))}function p(e){const t=new Date(e.year,e.month-1,e.day-1);return g(ie({...e,year:t.getFullYear(),month:t.getMonth()+1,day:t.getDate()}))}function Ie(){const e=new Date,t=e.getMonth()+1,a=e.getDate(),n=e.getFullYear();return[n,o(t,2),o(a,2)].join("-")}function V(e){return e===Ie()}function T(e,t,a){let n=A(e);if(t){if(1===n.day||0===n.weekday)while(!t.includes(Number(n.weekday)))n=h(n);n=v(n,t[0],p),n=g(n),a&&(n=w(n,a,n.hasTime))}return n}function M(e,t,a){let n=A(e);if(t&&Array.isArray(t)){const r=i(n.year,n.month);if(r===n.day||n.weekday===t[t.length-1])while(!t.includes(Number(n.weekday)))n=p(n);n=v(n,t[t.length-1],h),n=g(n),a&&(n=w(n,a,n.hasTime))}return n}function N(e){let t=A(e);return t.day=B,t=g(t),t}function S(e){let t=A(e);return t.day=i(t.year,t.month),t=g(t),t}function z(e){const t=Object.prototype.toString.call(e);switch(t){case"[object Number]":return e;case"[object String]":{const a=O.exec(e);return a?60*parseInt(a[1],10)+parseInt(a[3]||"0",10):!1}case"[object Object]":return"object"!==typeof e||"number"!==typeof e.hour||"number"!==typeof e.minute?!1:"object"===typeof e&&"hour"in e&&"minute"in e&&60*e.hour+e.minute}return!1}function P(e,t){return!(!e||!t)&&e.year===t.year&&e.month===t.month&&e.day===t.day&&e.hour===t.hour&&e.minute===t.minute}function Z(e,t){return c(e)===c(t)}function j(e,t){return m(e)===m(t)}function $(e,t){return y(e)===y(t)}function Ee(e,t=null){let a=Fe(e);return a?(a=g(a),t&&(a=w(a,t,a.hasTime)),a):null}function Oe(e){return 1e8*(e.year??0)+1e6*(e.month??0)+1e4*(e.day??0)}function s(e){return 100*(e.hour??0)+(e.minute??0)}function n(e){return Oe(e)+s(e)}function K(e,t,a=!1){const n=Date.UTC(e.year??0,(e.month??1)-1,e.day??1,e.hour??0,e.minute??0),r=Date.UTC(t.year??0,(t.month??1)-1,t.day??1,t.hour??0,t.minute??0);return!0===a&&r<n?0:r-n}function w(e,t,a=!1){let n=A(e),r=Oe(t),o=Oe(n),d=r===o;return n.hasTime&&a&&d&&(r=s(t),o=s(n),d=r===o),n.past=o<r,n.current=d,n.future=o>r,n.currentWeekday=n.weekday===t.weekday,n}function X(e,t,a=null){let n=A(e);return n.hasTime=!0,n.hour=Math.floor(t/r.MINUTES_IN.HOUR),n.minute=t%r.MINUTES_IN.HOUR,n.time=m(n),a&&(n=w(n,a,!0)),n}function k(e){let t=A(e);return t.weekday=l(t),t}function Q(e){let t=A(e);return t.doy=a(t)||0,t}function G(e){let t=A(e);return t.workweek=d(t),t}function J(e,t,a,n,r){let o=A(e);const d=Oe(o);if(void 0!==t){const l=Fe(t);if(l){const c=Oe(l);d<=c&&(o.disabled=!0)}}if(!0!==o.disabled&&void 0!==a){const m=Fe(a);if(m){const y=Oe(m);d>=y&&(o.disabled=!0)}}if(!0!==o.disabled&&Array.isArray(n)&&n.length>0)for(var u in n)if(n[u]===o.weekday){o.disabled=!0;break}if(!0!==o.disabled&&Array.isArray(r)&&r.length>0)for(var i in r)if(Array.isArray(r[i])&&2===r[i].length&&r[i][0]&&r[i][1]){const v=Fe(r[i][0]),f=Fe(r[i][1]);if(v&&f&&de(o,v,f)){o.disabled=!0;break}}else{const h=r[i];if(Array.isArray(h))for(var s of h){const p=Ee(s);if(p){const w=Oe(p);if(w===d){o.disabled=!0;break}}}else if(h){const k=Ee(h);if(k){const g=Oe(k);g===d&&(o.disabled=!0)}}}return o}function g(e){let t=A(e);return t.hasTime=!0,t.time=m(t),t.date=c(t),t.weekday=l(t),t.doy=a(t)||0,t.workweek=d(t),t}function a(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 d(e){let t=A(e);if(0===t.year){const r=Ee(Ie());r&&(t=r)}const a=new Date(Date.UTC(t.year,t.month-1,t.day)),n=4;a.setUTCDate(a.getUTCDate()-(a.getUTCDay()+6)%7+n),a.setUTCDate(a.getUTCDate()+n-(a.getUTCDay()||7));e=new Date(Date.UTC(a.getUTCFullYear(),0,1)),e=Math.ceil(((a.valueOf()-e.valueOf())/864e5+1)/7);return e}function l(e){let t=e.weekday;if(e.hasDay){const a=Math.floor,n=e.day,r=(e.month+9)%L+1,o=a(e.year/100),d=e.year%100-(e.month<=2?1:0);t=((n+a(2.6*r-.2)-2*o+d+a(d/4)+a(o/4))%7+7)%7}return t??0}function A(e){return{...e}}function c(e){let t=o(e.year,4)+"-"+o(e.month,2);return e.hasDay&&(t+="-"+o(e.day,2)),t}function m(e){return e.hasTime?o(e.hour,2)+":"+o(e.minute,2):""}function y(e){return c(e)+" "+(e.hasTime?m(e):"00:00")}function ee(e,t=h,a=1,n=[0,1,2,3,4,5,6]){const r=A(e);return b(r,t,a,n)}function b(e,t=h,a=1,n=[0,1,2,3,4,5,6]){let r=A(e);n.includes(Number(r.weekday))||0!==r.weekday||t!==h||++a;while(--a>=0)r=t(r),n.length<7&&!n.includes(Number(r.weekday))&&++a;return r}function v(e,t,a=h,n=6){let r=A(e);while(r.weekday!==t&&--n>=0)r=a(r);return r}function F(e,t,a,n=[0,1,2,3,4,5,6],r=void 0,o=void 0,d=[],u=[],i=42,s=0){const l=Oe(e),c=Oe(t),m=[];let y=A(e),v=0,f=v===c;if(!(c<l))while((!f||m.length<s)&&m.length<i){if(v=Oe(y),f=f||v>c&&m.length>=s,f)break;if(n.includes(Number(y.weekday))){let e=A(y);e=g(e),e=w(e,a),e=J(e,r,o,d,u),m.push(e)}y=b(y,h)}return m}function te(t,a,n,r,o){const d=[];for(let e=0;e<r;++e){const u=(a+e)*n,i=A(t);d.push(X(i,u,o))}return d}function I(n,r){const e=()=>"";return"undefined"===typeof Intl||"undefined"===typeof Intl.DateTimeFormat?e:(t,e)=>{try{const a=new Intl.DateTimeFormat(n||void 0,r(t,e));return a.format(ne(t))}catch(e){return console.error(`Intl.DateTimeFormat: ${e.message} -> `+y(t)),""}}}function ae(e,t=!0){return t?new Date(Date.UTC(e.year,e.month-1,e.day,0,0)):new Date(e.year,e.month-1,e.day,0,0)}function ne(e,t=!0){return t?new Date(Date.UTC(e.year,e.month-1,e.day,e.hour,e.minute)):new Date(e.year,e.month-1,e.day,e.hour,e.minute)}function f(e){return isFinite(Number(e))}function re(e,t=!1){const a=!0===t?n:Oe;return e.reduce((e,t)=>{return Math.max(a(e),a(t))===a(e)?e:t})}function oe(e,t=!1){const a=!0===t?n:Oe;return e.reduce((e,t)=>{return Math.min(a(e),a(t))===a(e)?e:t})}function de(e,t,a,n=!1){const r=Oe(e)+(!0===n?s(e):0),o=Oe(t)+(!0===n?s(t):0),d=Oe(a)+(!0===n?s(a):0);return r>=o&&r<=d}function ue(e,t,a,n){const r=Oe(e),o=Oe(t),d=Oe(a),u=Oe(n);return r>=d&&r<=u||o>=d&&o<=u||d>=r&&o>=u}function E(e,t){const a=A(e);return t.year&&(a.year+=t.year),t.month&&(a.month+=t.month),t.day&&(a.day+=t.day),t.hour&&(a.hour+=t.hour),t.minute&&(a.minute+=t.minute),g(ie(a))}function ie(e){const t=new Date(e.year,e.month-1,e.day,e.hour,e.minute);return{...e,year:t.getFullYear(),month:t.getMonth()+1,day:t.getDate(),hour:t.getHours(),minute:t.getMinutes()}}function se(e,t){const a=K(e,t,!0);return Math.floor(a/r.MILLISECONDS_IN.DAY)}function le(e,t){let a=A(e),n=A(t);return a=v(a,0),n=v(n,6),Math.ceil(se(a,n)/r.DAYS_IN.WEEK)}const ce={Sun:new Date("2020-01-05T00:00:00.000Z"),Mon:new Date("2020-01-06T00:00:00.000Z"),Tue:new Date("2020-01-07T00:00:00.000Z"),Wed:new Date("2020-01-08T00:00:00.000Z"),Thu:new Date("2020-01-09T00:00:00.000Z"),Fri:new Date("2020-01-10T00:00:00.000Z"),Sat:new Date("2020-01-11T00:00:00.000Z")};function me(){const e=()=>"",r={long:{timeZone:"UTC",weekday:"long"},short:{timeZone:"UTC",weekday:"short"},narrow:{timeZone:"UTC",weekday:"narrow"}};return"undefined"===typeof Intl||"undefined"===typeof Intl.DateTimeFormat?e:t;function t(t,e,a){try{const n=new Intl.DateTimeFormat(a||void 0,r[e]||r["long"]);return n.format(ce[t])}catch(e){return e instanceof Error&&console.error(`Intl.DateTimeFormat: ${e.message} -> day of week: `+t),""}}}function ye(t,a){const e=Object.keys(ce),n=me();return e.map(e=>String(n(e,t,a)))}function ve(){const e=()=>"",o={long:{timeZone:"UTC",month:"long"},short:{timeZone:"UTC",month:"short"},narrow:{timeZone:"UTC",month:"narrow"}};return"undefined"===typeof Intl||"undefined"===typeof Intl.DateTimeFormat?e:t;function t(t,e,a){try{const n=new Intl.DateTimeFormat(a||void 0,o[e]||o["long"]),r=new Date;return r.setDate(1),r.setMonth(t),n.format(r)}catch(e){return e instanceof Error&&console.error(`Intl.DateTimeFormat: ${e.message} -> month: `+t),""}}}function fe(t,a){const n=ve();return[...Array(12).keys()].map(e=>n(e,t,a))}var e={PARSE_DATETIME:u,PARSE_DATE:_,PARSE_TIME:O,DAYS_IN_MONTH:W,DAYS_IN_MONTH_LEAP:C,DAYS_IN_MONTH_MIN:x,DAYS_IN_MONTH_MAX:q,MONTH_MAX:L,MONTH_MIN:U,DAY_MIN:B,TIME_CONSTANTS:r,FIRST_HOUR:R,today:Ie,getStartOfWeek:T,getEndOfWeek:M,getStartOfMonth:N,getEndOfMonth:S,parseTime:z,validateTimestamp:t,parsed:Fe,parseTimestamp:Ee,parseDate:H,getDayIdentifier:Oe,getTimeIdentifier:s,getDayTimeIdentifier:n,diffTimestamp:K,updateRelative:w,updateMinutes:X,updateWeekday:k,updateDayOfYear:Q,updateWorkWeek:G,updateDisabled:J,updateFormatted:g,getDayOfYear:a,getWorkWeek:d,getWeekday:l,isLeapYear:Y,daysInMonth:i,copyTimestamp:A,padNumber:o,getDate:c,getTime:m,getDateTime:y,nextDay:h,prevDay:p,relativeDays:b,findWeekday:v,createDayList:F,createIntervalList:te,createNativeLocaleFormatter:I,makeDate:ae,makeDateTime:ne,validateNumber:f,isBetweenDates:de,isOverlappingDates:ue,daysBetween:se,weeksBetween:le,addToDate:E,compareTimestamps:P,compareDate:Z,compareTime:j,compareDateTime:$,getWeekdayFormatter:me,getWeekdayNames:ye,getMonthFormatter:ve,getMonthNames:fe},e=Object.freeze({__proto__:null,DAYS_IN_MONTH:W,DAYS_IN_MONTH_LEAP:C,DAYS_IN_MONTH_MAX:q,DAYS_IN_MONTH_MIN:x,DAY_MIN:B,FIRST_HOUR:R,MONTH_MAX:L,MONTH_MIN:U,PARSE_DATE:_,PARSE_DATETIME:u,PARSE_TIME:O,TIME_CONSTANTS:r,addToDate:E,compareDate:Z,compareDateTime:$,compareTime:j,compareTimestamps:P,copyTimestamp:A,createDayList:F,createIntervalList:te,createNativeLocaleFormatter:I,daysBetween:se,daysInMonth:i,default:e,diffTimestamp:K,findWeekday:v,getDate:c,getDateTime:y,getDayIdentifier:Oe,getDayOfYear:a,getDayTimeIdentifier:n,getEndOfMonth:S,getEndOfWeek:M,getMonthFormatter:ve,getMonthNames:fe,getStartOfMonth:N,getStartOfWeek:T,getTime:m,getTimeIdentifier:s,getWeekday:l,getWeekdayFormatter:me,getWeekdayNames:ye,getWorkWeek:d,isBetweenDates:de,isLeapYear:Y,isOverlappingDates:ue,isToday:V,makeDate:ae,makeDateTime:ne,maxTimestamp:re,minTimestamp:oe,moveRelativeDays:ee,nextDay:h,padNumber:o,parseDate:H,parseTime:z,parseTimestamp:Ee,parsed:Fe,prevDay:p,relativeDays:b,today:Ie,updateDayOfYear:Q,updateDisabled:J,updateFormatted:g,updateMinutes:X,updateRelative:w,updateWeekday:k,updateWorkWeek:G,validateNumber:f,validateTimestamp:t,weeksBetween:le});function We(e,t="px"){if(e)return isNaN(e)?String(e):"auto"===e?e:""+Number(e)+t}function he(t,a){for(let e=0;e<t.length;e++)if(!0===a(t[e],e))return e;return-1}function Ce(e,t){return 0===t?e:e.slice(0,t)}var pe={convertToUnit:We,indexOf:he,minCharWidth:Ce},pe=Object.freeze({__proto__:null,convertToUnit:We,default:pe,indexOf:he,minCharWidth:Ce});const we=e=>e.replace(/(-\w)/g,e=>e[1].toUpperCase());function ke(t,e,a,n){const r={};for(const o in a){const d=a[o],u=we("on-"+o);if(!e.value)return console.warn("$listeners has not been set up"),{};if(void 0!==e.value[u]){const i="on"+d.event.charAt(0).toUpperCase()+d.event.slice(1),s=e=>{return(void 0===d.button||"buttons"in e&&e.buttons>0&&e.button===d.button)&&(d.prevent&&e.preventDefault(),d.stop&&e.stopPropagation(),t(o,n(e,o))),d.result};i in r?Array.isArray(r[i])?r[i].push(s):r[i]=[r[i],s]:r[i]=s}}return r}function ge(e,t,a,n){return ke(e,t,be(a),n)}function be(e){return{["click"+e]:{event:"click"},["contextmenu"+e]:{event:"contextmenu",prevent:!0,result:!1},["mousedown"+e]:{event:"mousedown"},["mousemove"+e]:{event:"mousemove"},["mouseup"+e]:{event:"mouseup"},["mouseenter"+e]:{event:"mouseenter"},["mouseleave"+e]:{event:"mouseleave"},["touchstart"+e]:{event:"touchstart"},["touchmove"+e]:{event:"touchmove"},["touchend"+e]:{event:"touchend"}}}function D(e){return Object.keys(be(e))}function xe(a,n){return{getMouseEventHandlers:(e,t)=>ke(a,n,e,t),getDefaultMouseEventHandlers:(e,t)=>ge(a,n,e,t),getMouseEventName:be,getRawMouseEvents:D}}const qe={mounted(e,t){if("function"===typeof t.value){const a=t.value,n={callback:a,size:{width:0,height:0},observer:new ResizeObserver(e=>{const t=e[0].contentRect;t.width===n.size.width&&t.height===n.size.height||(n.size.width=t.width,n.size.height=t.height,n.debounceTimeout&&clearTimeout(n.debounceTimeout),n.debounceTimeout=setTimeout(()=>{n.callback(n.size),n.debounceTimeout=void 0},100))})};n.observer.observe(e),e.__onResizeObserver=n}},beforeUnmount(e){if(e.__onResizeObserver){const{observer:t,debounceTimeout:a}=e.__onResizeObserver;a&&clearTimeout(a),t.unobserve(e),delete e.__onResizeObserver}}};function Le(t,a,{scrollArea:e,pane:n}){if(!a){const l="[error: renderCalendar] no renderFunc has been supplied to useCalendar";throw console.error(l),new Error(l)}const r=Ae.reactive({width:0,height:0}),o=Ae.ref(null);function d({width:e,height:t}){r.width=e,r.height=t}const u=Ae.computed(()=>{return!0!==t.noScroll&&e.value&&n.value&&r.height?e.value.offsetWidth-n.value.offsetWidth:0});function i(){}function s(){const e={ref:o,role:"complementary",lang:t.locale,class:`q-calendar ${t.dark?"q-calendar--dark":""} `+(t.bordered?"q-calendar__bordered":"")};return Ae.withDirectives(Ae.h("div",{...e},[a()]),[[qe,d]])}return{rootRef:o,scrollWidth:u,__initCalendar:i,__renderCalendar:s}}const De=e=>e.every(e=>["day","date","weekday","interval","time","resource","task"].includes(e)),_e={modelValue:{type:String,default:Ie(),validator:e=>""===e||t(e)},weekdays:{type:Array,default:()=>[0,1,2,3,4,5,6]},dateType:{type:String,default:"round",validator:e=>["round","rounded","square"].includes(e)},weekdayAlign:{type:String,default:"center",validator:e=>["left","center","right"].includes(e)},dateAlign:{type:String,default:"center",validator:e=>["left","center","right"].includes(e)},bordered:Boolean,dark:Boolean,noAria:Boolean,noActiveDate:Boolean,noHeader:Boolean,noScroll:Boolean,shortWeekdayLabel:Boolean,noDefaultHeaderText:Boolean,noDefaultHeaderBtn:Boolean,minWeekdayLabel:{type:[Number,String],default:1},weekdayBreakpoints:{type:Array,default:()=>[75,35],validator:e=>2===e.length},locale:{type:String,default:"en-US"},animated:Boolean,transitionPrev:{type:String,default:"slide-right"},transitionNext:{type:String,default:"slide-left"},disabledDays:Array,disabledBefore:String,disabledAfter:String,disabledWeekdays:{type:Array,default:()=>[]},dragEnterFunc:Function,dragOverFunc:Function,dragLeaveFunc:Function,dropFunc:Function,selectedDates:{type:[Array,Set],default:()=>[]},selectedStartEndDates:{type:Array,default:()=>[]},hoverable:Boolean,focusable:Boolean,focusType:{type:Array,default:()=>["date"],validator:De}};function Ue(t,{startDate:e,endDate:a,times:n}){const r=Ae.computed(()=>Ee(e.value)),o=Ae.computed(()=>{return"0000-00-00"===a.value?M(r.value,t.weekdays,n.today):Ee(a.value)||r.value}),d=Ae.computed(()=>I(t.locale,()=>({timeZone:"UTC",day:"numeric"}))),u=Ae.computed(()=>I(t.locale,(e,t)=>({timeZone:"UTC",weekday:t?"short":"long"}))),i=Ae.computed(()=>I(t.locale,()=>({timeZone:"UTC",dateStyle:"full"})));function s(e,t){return e&&e.length>0&&e.includes(t.date)}function l(e,t){const a={firstDay:!1,betweenDays:!1,lastDay:!1};if(2===e.length){const n=Oe(t),r=Oe(Fe(e[0])),o=Oe(Fe(e[1]));a.firstDay=r===n,a.lastDay=o===n,a.betweenDays=r<n&&o>n}return a}function c(e,t=!1,a=[],n=[],r=!1){const o=s(a,e),{firstDay:d,lastDay:u,betweenDays:i}=l(n,e);return{"q-past-day":!d&&!i&&!u&&!o&&!t&&!!e.past,"q-future-day":!d&&!i&&!u&&!o&&!t&&!!e.future,"q-outside":t,"q-current-day":!!e.current,"q-selected":o,"q-range-first":d,"q-range":i,"q-range-last":u,"q-range-hover":r&&(d||u||i),"q-disabled-day disabled":!0===e.disabled}}function m(e){return T(e,t.weekdays,n.today)}function y(e){return M(e,t.weekdays,n.today)}function v(){return{}}return{parsedStart:r,parsedEnd:o,dayFormatter:d,weekdayFormatter:u,ariaDateFormatter:i,arrayHasDate:s,checkDays:l,getRelativeClasses:c,startOfWeek:m,endOfWeek:y,dayStyleDefault:v}}const Te={dayHeight:{type:[Number,String],default:0,validator:e=>f(e)},dayMinHeight:{type:[Number,String],default:0,validator:e=>f(e)},dayStyle:Function,dayClass:Function,weekdayStyle:Function,weekdayClass:Function,dayPadding:String,minWeeks:{type:[Number,String],default:1,validator:e=>f(e)},shortMonthLabel:Boolean,showWorkWeeks:Boolean,showMonthLabel:{type:Boolean,default:!0},showDayOfYearLabel:Boolean,enableOutsideDays:Boolean,noOutsideDays:Boolean,hover:Boolean,miniMode:{type:[Boolean,String],validator:e=>[!0,!1,"auto"].includes(e)},breakpoint:{type:[Number,String],default:"md",validator:e=>["xs","sm","md","lg","xl"].includes(e)||f(e)},monthLabelSize:{type:String,default:"sm",validator:e=>["xxs","xs","sm","md","lg","xl","xxl"].includes(e)||!!e&&e.length>0}};function Be(n,t,{times:r,parsedStart:a,parsedEnd:o,size:d,headerColumnRef:u}){const e=Ae.computed(()=>parseInt(n.minWeeks,10)),i=Ae.computed(()=>e.value*n.weekdays.length),s=Ae.computed(()=>k(b(a.value))),l=Ae.computed(()=>g(D(o.value))),c=Ae.computed(()=>{let e=0;return n.cellWidth?e=Number(n.cellWidth):d.width>0&&u.value&&(e=u.value.offsetWidth/n.weekdays.length),e}),m=Ae.computed(()=>F(s.value,l.value,r.today,n.weekdays,n.disabledBefore,n.disabledAfter,n.disabledWeekdays,n.disabledDays,Number.MAX_SAFE_INTEGER,i.value)),y=Ae.computed(()=>{const e=r.today,t=k(e),a=g(e);return F(t,a,e,n.weekdays,n.disabledBefore,n.disabledAfter,n.disabledWeekdays,n.disabledDays,n.weekdays.length,n.weekdays.length)}),v=Ae.computed(()=>I(n.locale,(e,t)=>({timeZone:"UTC",month:t?"short":"long"}))),f=Ae.computed(()=>{switch(n.breakpoint){case"xs":return 300;case"sm":return 350;case"md":return 400;case"lg":return 450;case"xl":return 500;default:return parseInt(n.breakpoint,10)}}),h=Ae.computed(()=>{switch(n.monthLabelSize){case"xxs":return".4em";case"xs":return".6em";case"sm":return".8em";case"md":return"1.0em";case"lg":return"1.2em";case"xl":return"1.4em";case"xxl":return"1.6em";default:return n.monthLabelSize}});let p=!0;const w=Ae.computed(()=>{const e=!0===n.miniMode||"auto"===n.miniMode&&void 0!==n.breakpoint&&d.width<f.value;return p&&(p=!1,t("mini-mode",e)),e});function k(e){return T(e,n.weekdays,r.today)}function g(e){return M(e,n.weekdays,r.today)}function b(e){return N(e)}function D(e){return S(e)}function _(e){const t=Oe(e);return t<Oe(a.value)||t>Oe(o.value)}return Ae.watch(w,e=>{t("mini-mode",e)}),{parsedCellWidth:c,parsedMinWeeks:e,parsedMinDays:i,parsedMonthStart:s,parsedMonthEnd:l,parsedBreakpoint:f,parsedMonthLabelSize:h,days:m,todayWeek:y,isMiniMode:w,monthFormatter:v,isOutside:_}}const Me={now:{type:String,validator:e=>""===e||t(e),default:""}};function Re(e){const t=Ae.reactive({now:Ee("0000-00-00 00:00"),today:Ee("0000-00-00")}),a=Ae.computed(()=>e.now?Ee(e.now):o());function n(){t.now&&t.today&&(t.now.current=t.today.current=!0,t.now.past=t.today.past=!1,t.now.future=t.today.future=!1)}function r(){const e=a.value||o();d(e,t.now),u(e,t.now),d(e,t.today)}function o(){return H(new Date)}function d(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)}function u(e,t){e.time!==t.time&&(t.hour=e.hour,t.minute=e.minute,t.time=e.time)}return Ae.watch(a,()=>r()),{times:t,parsedNow:a,setCurrent:n,updateCurrent:r,getNow:o,updateDay:d,updateTime:u}}function He(r,{parsedView:o,parsedValue:d,times:u}){const e=Ae.computed(()=>{const e=d.value;let t=r.maxDays,a=e,n=e;switch(o.value){case"month":a=N(e),n=S(e),t=i(a.year,a.month);break;case"week":case"week-agenda":case"week-scheduler":a=T(e,r.weekdays,u.today),n=M(a,r.weekdays,u.today),t=r.weekdays.length;break;case"day":case"scheduler":case"agenda":n=ee(A(n),h,t>1?t-1:t,r.weekdays),n=g(n);break;case"month-interval":case"month-scheduler":case"month-agenda":a=N(e),n=S(e),n=g(n),t=i(a.year,a.month);break;case"resource":t=1,n=ee(A(n),h,t,r.weekdays),n=g(n);break}return{start:a,end:n,maxDays:t}});return{renderValues:e}}const Ne=["moved"];function Ye(i,{parsedView:s,parsedValue:l,direction:c,maxDays:m,times:y,emittedValue:v,emit:f}){function e(a=1){if(0===a)v.value=Ie();else{let e=A(l.value);const n=S(e),r=a>0,o=r?h:p,d=r?n.day:1;let t=r?a:-a;c.value=r?"next":"prev";const u=i.weekdays.length;while(--t>=0)switch(s.value){case"month":e.day=d,e=o(e),e=k(e);while(!i.weekdays.includes(Number(e.weekday)))e=E(e,{day:r?1:-1});break;case"week":case"week-agenda":case"week-scheduler":e=b(e,o,u,i.weekdays);break;case"day":case"scheduler":case"agenda":e=b(e,o,m.value,i.weekdays);break;case"month-interval":case"month-agenda":case"month-scheduler":e.day=d,e=o(e);break;case"resource":e=b(e,o,m.value,i.weekdays);break}e=k(e),e=g(e),e=Q(e),e=w(e,y.now),v.value=e.date,f("moved",e)}}return{move:e}}const Se=/^on[A-Z]/;function Ve(e=Ae.getCurrentInstance()){return{emitListeners:Ae.computed(()=>{const t={};return e?.vnode?.props&&Object.keys(e.vnode.props).forEach(e=>{Se.test(e)&&(t[e]=!0)}),t})}}function ze(){const e={"aria-hidden":"true",class:"q-calendar__focus-helper"};return[Ae.h("span",e)]}function Pe(){function e({focusable:e,focusType:t},a,n){const r=e&&t.includes("date");return Ae.h("button",{...a,tabindex:r?0:-1},[n,r&&ze()])}return{renderButton:e}}const Ze={cellWidth:[Number,String]};function je(e){const t=Ae.computed(()=>void 0!==e.cellWidth);return{isSticky:t}}const $e=["change"];function Ke(n,{days:r,lastStart:o,lastEnd:d}){function e(){const e=r.value;if(0===e.length)return!1;const t=e[0].date,a=e[e.length-1].date;return(!o.value||!d.value||t!==o.value||a!==d.value)&&(o.value=t,d.value=a,n("change",{start:t,end:a,days:e}),!0)}return{checkChange:e}}function Xe(){function e(e,t){return(Array.isArray(t)?t:[t]).includes(e.keyCode)}return{isKeyCode:e}}const Qe=Xe().isKeyCode,Ge={useNavigation:Boolean};function Je(t,{rootRef:a,focusRef:n,focusValue:r,datesRef:o,parsedView:d,emittedValue:u,direction:i,times:s}){let e=!1;function l(){e||document&&(e=!0,document.addEventListener("keyup",f),document.addEventListener("keydown",v))}function c(){document&&(document.removeEventListener("keyup",f),document.removeEventListener("keydown",v),e=!1)}function m(e){if(e&&document){const t=document.activeElement;if(t!==document.body&&a.value?.contains(t))return!0}return!1}function y(){let t=0;const a=window.setInterval(()=>{const e=o.value[n.value];e&&(e.focus(),50!==++t)&&document.activeElement!==e||window.clearInterval(a)},250)}function v(e){m(e)&&Qe(e,[33,34,35,36,37,38,39,40])&&(e.stopPropagation(),e.preventDefault())}function f(e){if(m(e)&&Qe(e,[33,34,35,36,37,38,39,40])){const t={33:g,34:b,35:_,36:D,37:w,38:h,39:k,40:p};t[e.keyCode]?.()}}function h(){let e=A(r.value);if("month"===d.value){if(e=E(e,{day:-7}),r.value.month!==e.month)return i.value="prev",void(u.value=e.date)}else e=E(e,{minute:Number(t.intervalMinutes)});i.value="prev",n.value=e.date}function p(){let e=A(r.value);if("month"===d.value){if(e=E(e,{day:7}),r.value.month!==e.month)return i.value="next",void(u.value=e.date)}else e=E(e,{minute:Number(t.intervalMinutes)});i.value="next",n.value=e.date}function w(){let e=A(r.value);i.value="prev";do{e=E(e,{day:-1})}while(!t.weekdays.includes(Number(e.weekday)));n.value=e.date}function k(){let e=A(r.value);i.value="next";do{e=E(e,{day:1})}while(!t.weekdays.includes(Number(e.weekday)));n.value=e.date}function g(){let e=A(r.value);e="month"===d.value?E(e,{month:-1}):E(e,{day:-7}),i.value="prev",n.value=e.date}function b(){let e=A(r.value);e="month"===d.value?E(e,{month:1}):E(e,{day:7}),i.value="next",n.value=e.date}function D(){let e=A(r.value);e="month"===d.value?N(e):T(e,t.weekdays||[],s.today);while(!t.weekdays.includes(Number(e.weekday)))e=E(e,{day:-1});n.value=e.date}function _(){let e=A(r.value);e="month"===d.value?S(e):M(e,t.weekdays||[],s.today);while(!t.weekdays.includes(Number(e.weekday)))e=E(e,{day:-1});n.value=e.date}return Ae.onBeforeUnmount(()=>{c()}),Ae.watch(()=>t.useNavigation,e=>{(!0===e?l:c)()}),!0===t.useNavigation&&l(),{startNavigation:l,endNavigation:c,tryFocus:y}}const et=Pe().renderButton;var tt=Ae.defineComponent({name:"QCalendarMonth",directives:{ResizeObserver:qe},props:{..._e,...Te,...Me,...Ze,...Ge},emits:["update:model-value",...$e,...Ne,"mini-mode",...D("-date"),...D("-day"),...D("-head-workweek"),...D("-head-day"),...D("-workweek")],setup(y,{slots:v,emit:c,expose:q}){const L=Ae.ref(null),U=Ae.ref(null),e=Ae.ref(null),f=Ae.ref(y.modelValue||Ie()),t=Ae.ref(Fe(y.modelValue||Ie())),m=Ae.ref({}),s=Ae.ref([]),l=Ae.ref([]),o=Ae.ref("next"),d=Ae.ref(y.modelValue||Ie()),u=Ae.ref("0000-00-00"),B=Ae.ref(0),h=Ae.ref(y.modelValue),i=Ae.reactive({width:0,height:0}),p=Ae.ref(),w=Ae.ref(""),R=Ae.ref(null),H=Ae.ref(null),a=Ae.computed(()=>{return"month"}),n=Ae.getCurrentInstance();if(null===n)throw new Error("current instance is null");const k=Ve(n).emitListeners,Y=je(y).isSticky,{times:r,setCurrent:V,updateCurrent:g}=(Ae.watch(Y,()=>{}),Re(y)),{parsedStart:b,parsedEnd:D,dayFormatter:z,weekdayFormatter:P,ariaDateFormatter:Z,dayStyleDefault:_,getRelativeClasses:j}=(g(),V(),Ue(y,{startDate:d,endDate:u,times:r})),T=Ae.computed(()=>{return Ee(y.modelValue,r.now)||b.value||r.today}),$=(t.value=T.value,f.value=T.value.date,Ae.computed(()=>{const e={};return void 0!==y.dayPadding&&(e.padding=y.dayPadding),e.minWidth=O.value,e.maxWidth=O.value,e.width=O.value,e})),K=He(y,{parsedView:a,times:r,parsedValue:T}).renderValues,{rootRef:M,__renderCalendar:X}=Le(y,Se,{scrollArea:L,pane:U}),{days:N,todayWeek:Q,isMiniMode:S,parsedCellWidth:G,parsedMonthLabelSize:J,isOutside:ee,monthFormatter:te}=Be(y,c,{times:r,parsedStart:b,parsedEnd:D,size:i,headerColumnRef:e}),A=Ye(y,{parsedView:a,parsedValue:T,direction:o,maxDays:B,times:r,emittedValue:h,emit:c}).move,F=xe(c,k).getDefaultMouseEventHandlers,ae=Ke(c,{days:N,lastStart:R,lastEnd:H}).checkChange,I=Xe().isKeyCode,ne=Je(y,{rootRef:M,focusRef:f,focusValue:t,datesRef:m,parsedView:a,emittedValue:h,direction:o,times:r}).tryFocus,re=Ae.computed(()=>{return M.value&&!0===y.showWorkWeeks?parseInt(window.getComputedStyle(M.value).getPropertyValue(!0===S.value?"--calendar-mini-work-week-width":"--calendar-work-week-width"),10):0}),E=Ae.computed(()=>{return y.weekdays.length}),O=Ae.computed(()=>{if(M.value){const e=i.width||M.value.getBoundingClientRect().width;if(e&&E.value)return(e-re.value)/E.value+"px"}return 100/E.value+"%"}),W=Ae.computed(()=>{return!0===y.focusable&&y.focusType.includes("day")&&!0!==S.value}),C=Ae.computed(()=>{return!0===y.focusable&&y.focusType.includes("date")&&!0!==W.value});function oe(){h.value=Ie()}function de(e=1){A(e)}function ue(e=1){A(-e)}function ie({width:e,height:t}){i.width=e,i.height=t}function x(e){return e.date===h.value}function se(t){for(let e=0;e<t.length;++e)if(!0===t[e].current)return{timestamp:t[e]};return{timestamp:!1}}function le(){if(!0!==S.value&&0===y.dayHeight){const t=v.week;if(void 0!==t&&window)for(var e in s.value){const a=s.value[e];if(void 0!==a){const n=l.value[e];if(void 0!==n){const r=window.getComputedStyle(a),o=parseFloat(r.marginTop)+parseFloat(r.marginBottom);n.clientHeight+o>n.clientHeight&&(n.style.height=a.clientHeight+o+"px")}}}}}function ce(){return Ae.h("div",{class:"q-calendar-month__body"},[...ke()])}function me(){return Ae.h("div",{role:"presentation",class:"q-calendar-month__head"},[!0===y.showWorkWeeks&&ve(),Ae.h("div",{class:"q-calendar-month__head--wrapper"},[ye()])])}function ye(){return Ae.h("div",{ref:e,class:{"q-calendar-month__head--weekdays":!0}},[...fe()])}function ve(){const e=v["head-workweek"],t={start:b.value,end:D.value,miniMode:S.value};return Ae.h("div",{class:"q-calendar-month__head--workweek",...F("-head-workweek",e=>{return{scope:t,event:e}})},e?e({scope:t}):"#")}function fe(){return Q.value.map((e,t)=>he(e,t))}function he(t,e){const a=v["head-day"],n=N.value.filter(e=>e.weekday===t.weekday),r=n[0].weekday,o=!0!==y.noActiveDate&&x(t),d={activeDate:o,weekday:r,timestamp:t,days:n,index:e,miniMode:S.value,droppable:p.value===Number(t.weekday),disabled:!!y.disabledWeekdays&&y.disabledWeekdays.includes(Number(t.weekday))},u="function"===typeof y.weekdayClass?y.weekdayClass({scope:d}):{},i=!0===y.focusable&&y.focusType.includes("weekday"),s=O.value,l=y.weekdayStyle||_,c={width:s,maxWidth:s,minWidth:s,...l({scope:d})},m={key:t.date+(void 0!==e?"-"+e:""),tabindex:!0===i?0:-1,class:{"q-calendar-month__head--weekday":!0,...u,"q-disabled-day disabled":!0===d.disabled,["q-calendar__"+y.weekdayAlign]:!0,"q-calendar__ellipsis":!0,"q-calendar__focusable":!0===i},style:c,onDragenter:e=>{void 0!==y.dragEnterFunc&&"function"===typeof y.dragEnterFunc&&(!0===y.dragEnterFunc(e,"head-day",{scope:d})?p.value=Number(t.weekday):p.value=-1)},onDragover:e=>{void 0!==y.dragOverFunc&&"function"===typeof y.dragOverFunc&&(!0===y.dragOverFunc(e,"head-day",{scope:d})?p.value=Number(t.weekday):p.value=-1)},onDragleave:e=>{void 0!==y.dragLeaveFunc&&"function"===typeof y.dragLeaveFunc&&(!0===y.dragLeaveFunc(e,"head-day",{scope:d})?p.value=Number(t.weekday):p.value=-1)},onDrop:e=>{void 0!==y.dropFunc&&"function"===typeof y.dropFunc&&(!0===y.dropFunc(e,"head-day",{scope:d})?p.value=Number(t.weekday):p.value=-1)},onFocus:()=>{!0===i&&(f.value=t.date)},...F("-head-day",e=>{return{scope:d,event:e}})};return!0!==y.noAria&&(m.ariaLabel=P.value(t,!1)),Ae.h("div",m,[void 0===a&&we(t,y.shortWeekdayLabel||S.value),void 0!==a&&a({scope:d}),pe(t,e),!0===i&&ze()])}function pe(t,e){const a=v["head-day-event"],n=!0!==y.noActiveDate&&x(t),r=N.value.filter(e=>e.weekday===t.weekday),o=r[0].weekday,d={weekday:o,timestamp:t,days:r,index:e,miniMode:S.value,activeDate:n,disabled:!!y.disabledWeekdays&&y.disabledWeekdays.includes(Number(t.weekday))},u=O.value,i=y.weekdayStyle||_,s={width:u,maxWidth:u,minWidth:u,...i({scope:d})};return Ae.h("div",{key:"event-"+t.date+(void 0!==e?"-"+e:""),class:{"q-calendar-month__head--event":!0},style:s},[void 0!==a&&a({scope:d})])}function we(e,t){const a=P.value(e,t||y.weekdayBreakpoints[0]>0&&G.value<=y.weekdayBreakpoints[0]);return Ae.h("span",{class:"q-calendar__ellipsis"},!0===S.value&&!0===y.shortWeekdayLabel||y.weekdayBreakpoints[1]>0&&G.value<=y.weekdayBreakpoints[1]?Ce(a,Number(y.minWeekdayLabel)):a)}function ke(){const t=y.weekdays.length,a=[];for(let e=0;e<N.value.length;e+=t)a.push(ge(N.value.slice(e,e+t),e/t));return a}function ge(e,t){const a=v.week,n=y.weekdays,r={week:e,weekdays:n,miniMode:S.value},o={},d=parseInt(String(y.dayHeight),10),u=parseInt(String(y.dayMinHeight),10),i=(o.height=d>0&&!0!==S.value?We(d):"auto",u>0&&!0!==S.value&&(o.minHeight=We(u)),0===d&&0===u);return Ae.h("div",{key:e[0].date,ref:e=>{l.value[t]=e},class:{"q-calendar-month__week--wrapper":!0,"q-calendar-month__week--auto-height":i},style:o},[!0===y.showWorkWeeks?be(e):void 0,Ae.h("div",{class:"q-calendar-month__week"},[Ae.h("div",{class:"q-calendar-month__week--days"},e.map(e=>De(e))),!0!==S.value&&void 0!==a?Ae.h("div",{ref:e=>{s.value[t]=e},class:"q-calendar-month__week--events"},a({scope:r})):void 0])])}function be(e){const t=v.workweek,a=e.length>2?e[2]:e[0],n=se(e).timestamp,r=Number(a.workweek).toLocaleString(y.locale),o={workweekLabel:r,week:e,miniMode:S.value};return Ae.h("div",{key:a.workweek,class:{"q-calendar-month__workweek":!0,...j(!1!==n?n:a,!1)},...F("-workweek",e=>{return{scope:o,event:e}})},t?t({scope:o}):r)}function De(t){const e=v.day,a=y.dayStyle||_,n=ee(t),r=!0!==y.noActiveDate&&T.value.date===t.date,o=!1===n&&!0===y.showMonthLabel&&N.value.find(e=>e.month===t.month)?.day===t.day,d={outside:n,timestamp:t,miniMode:S.value,activeDate:r,hasMonth:o,droppable:w.value===t.date,disabled:!!y.disabledWeekdays&&y.disabledWeekdays.includes(Number(t.weekday))},u=Object.assign({...$.value},a({scope:d})),i="function"===typeof y.dayClass?y.dayClass({scope:d}):{},s={key:t.date,ref:e=>{!0===W.value&&(m.value[t.date]=e)},tabindex:!0===W.value?0:-1,class:{"q-calendar-month__day":!0,...i,...j(t,n,Array.from(y.selectedDates),y.selectedStartEndDates,y.hover),"q-active-date":!0===r,disabled:!0!==y.enableOutsideDays&&!0===n,"q-calendar__hoverable":!0===y.hoverable,"q-calendar__focusable":!0===W.value},style:u,onFocus:()=>{!0===W.value&&(f.value=t.date)},onKeydown:e=>{!0!==n&&!0!==t.disabled&&I(e,[13,32])&&(e.stopPropagation(),e.preventDefault())},onKeyup:e=>{!0!==n&&!0!==t.disabled&&I(e,[13,32])&&(e.stopPropagation(),e.preventDefault(),void 0!==k.value.onClickDay)&&!0!==S.value&&c("click-day",{scope:d,e:e})},...F("-day",e=>{return{scope:d,event:e}})},l={onDragenter:e=>{void 0!==y.dragEnterFunc&&"function"===typeof y.dragEnterFunc&&(!0===y.dragEnterFunc(e,"day",{scope:d})?w.value=t.date:w.value="")},onDragover:e=>{void 0!==y.dragOverFunc&&"function"===typeof y.dragOverFunc&&(!0===y.dragOverFunc(e,"day",{scope:d})?w.value=t.date:w.value="")},onDragleave:e=>{void 0!==y.dragLeaveFunc&&"function"===typeof y.dragLeaveFunc&&(!0===y.dragLeaveFunc(e,"day",{scope:d})?w.value=t.date:w.value="")},onDrop:e=>{void 0!==y.dropFunc&&"function"===typeof y.dropFunc&&(!0===y.dropFunc(e,"day",{scope:d})?w.value=t.date:w.value="")}};return!0!==n&&Object.assign(s,l),!0!==y.noAria&&(s.ariaLabel=Z.value(t,!1)),Ae.h("div",s,[_e(t,n,o),Ae.h("div",{class:{"q-calendar-month__day--content":!0}},e?e({scope:d}):void 0),!0===W.value&&ze()])}function _e(e,t,a){let n,r;const o=[Te(e,t)],d=(!0!==S.value&&!0===a&&i.width>340&&(r=Ne(e,t)),!0!==S.value&&!0===y.showDayOfYearLabel&&void 0===r&&i.width>300&&(n=Me(e,t)),"left"===y.dateAlign?(void 0!==n&&o.push(n),void 0!==r&&o.push(r)):"right"===y.dateAlign?(void 0!==n&&o.unshift(n),void 0!==r&&o.unshift(r)):(n=void 0,r=void 0),{class:{"q-calendar-month__day--label__wrapper":!0,"q-calendar__ellipsis":!0,["q-calendar__"+y.dateAlign]:void 0===n&&void 0===r,"q-calendar__justify":void 0!==n||void 0!==r}});return Ae.h("div",d,o)}function Te(a,t){if(!0!==t||!0!==y.noOutsideDays){const e=z.value(a,!1),n=v["head-day-label"],r=v["head-day-button"],o=y.selectedDates&&Array.from(y.selectedDates).length>0&&Array.from(y.selectedDates).includes(a.date),d=!0!==y.noActiveDate&&x(a),u={dayLabel:e,timestamp:a,outside:t,activeDate:d,selectedDate:o,miniMode:S.value,disabled:!!y.disabledWeekdays&&y.disabledWeekdays.includes(Number(a.weekday))},i={key:a.date,ref:e=>{!0===C.value&&(m.value[a.date]=e)},tabindex:!0===C.value?0:-1,class:{"q-calendar-month__day--label":!0,"q-calendar__button":!0,"q-calendar__button--round":"round"===y.dateType,"q-calendar__button--rounded":"rounded"===y.dateType,"q-calendar__button--bordered":!0===a.current,"q-calendar__hoverable":!0===y.hoverable,"q-calendar__focusable":!0===C.value},disabled:!0===a.disabled||!0!==y.enableOutsideDays&&!0===t,onFocus:()=>{!0===C.value&&(f.value=a.date)},onKeydown:e=>{!0!==t&&!0!==a.disabled&&I(e,[13,32])&&(e.stopPropagation(),e.preventDefault())},onKeyup:e=>{!0===C.value&&!0!==t&&!0!==a.disabled&&I(e,[13,32])&&(e.stopPropagation(),e.preventDefault(),h.value=a.date,void 0!==k.value.onClickDate)&&c("click-date",{scope:u,event:e})},...F("-date",(e,t)=>{return e.stopPropagation(),"click-date"!==t&&"contextmenu-date"!==t||(h.value=a.date),{scope:u,event:e}})};return!0!==y.noAria&&(i.ariaLabel=Z.value(a,!1)),[r?r({scope:u}):et(y,i,n?n({scope:u}):e),!0===C.value&&ze()].filter(e=>!1!==e)}}function Me(e,t){if(!0!==t||!0!==y.noOutsideDays){const a=v["day-of-year"],n={timestamp:e};return Ae.h("span",{class:{"q-calendar-month__day--day-of-year":!0,"q-calendar__ellipsis":!0}},a?a({scope:n}):e.doy)}}function Ne(e,t){if(!0!==t||!0!==y.noOutsideDays){const a=v["month-label"],n=te.value(e,y.shortMonthLabel||i.width<500),r={monthLabel:n,timestamp:e,miniMode:S.value},o={};return!0!==S.value&&void 0!==J.value&&(o.fontSize=J.value),Ae.h("span",{class:"q-calendar-month__day--month q-calendar__ellipsis",style:o},[a?a({scope:r}):!0!==S.value?n:void 0])}}function Se(){const{start:e,end:t}=K.value,a=(d.value=e.date,u.value=t.date,i.width>0),n=Ae.withDirectives(Ae.h("div",{class:{"q-calendar-mini":!0===S.value,"q-calendar-month":!0},key:d.value},[!0===a&&!0!==y.noHeader&&me(),!0===a&&ce()]),[[qe,ie]]);if(!0!==y.animated)return n;{const r="q-calendar--"+("prev"===o.value?y.transitionPrev:y.transitionNext);return Ae.h(Ae.Transition,{name:r,appear:!0},()=>n)}}return Ae.watch([N],ae,{deep:!0,immediate:!0}),Ae.watch(()=>y.modelValue,(e,t)=>{if(h.value!==e){if(!0===y.animated){const a=Oe(Fe(e)),n=Oe(Fe(t));o.value=a>=n?"next":"prev"}h.value=e}f.value=e}),Ae.watch(h,(e,t)=>{if(h.value!==y.modelValue){if(!0===y.animated){const a=Oe(Fe(e)),n=Oe(Fe(t));o.value=a>=n?"next":"prev"}c("update:model-value",e)}}),Ae.watch(f,e=>{e&&(t.value=Ee(e),h.value!==e)&&(h.value=e)}),Ae.watch(t,()=>{m.value[f.value]?m.value[f.value].focus():ne()}),Ae.onBeforeUpdate(()=>{m.value={},s.value=[],l.value=[],Ae.nextTick(()=>{le()})}),Ae.onMounted(()=>{le()}),q({prev:ue,next:de,move:A,moveToToday:oe,updateCurrent:g}),()=>X()}});const at="4.1.0";e={version:at,QCalendarMonth:tt,...e,...pe,install(e){e.component(String(tt.name),tt)}};return e}); | ||
(function(e,t){"object"===typeof exports&&"undefined"!==typeof module?module.exports=t(require("vue")):"function"===typeof define&&define.amd?define(["vue"],t):(e="undefined"!==typeof globalThis?globalThis:e||self,e.QCalendarMonth=t(e.Vue))})(this,function(Ae){const u=/^(\d{4})-(\d{1,2})(-(\d{1,2}))?([^\d]+(\d{1,2}))?(:(\d{1,2}))?(:(\d{1,2}))?(.(\d{1,3}))?$/,_=/^(\d{4})-(\d{1,2})(-(\d{1,2}))?/,O=/(\d\d?)(:(\d\d?)|)(:(\d\d?)|)/,W=[0,31,28,31,30,31,30,31,31,30,31,30,31],C=[0,31,29,31,30,31,30,31,31,30,31,30,31],r={MILLISECONDS_IN:{SECOND:1e3,MINUTE:6e4,HOUR:36e5,DAY:864e5,WEEK:6048e5},SECONDS_IN:{MINUTE:60,HOUR:3600,DAY:86400,WEEK:604800},MINUTES_IN:{MINUTE:1,HOUR:60,DAY:1440,WEEK:10080},HOURS_IN:{DAY:24,WEEK:168},DAYS_IN:{WEEK:7}},x=28,q=31,L=12,U=1,B=1,R=0;function t(e){return"string"===typeof e&&u.test(e)}function Fe(e){if("string"!==typeof e)return null;const t=u.exec(e);if(!t||!t[1]||!t[2])return null;const a=parseInt(t[1],10),n=parseInt(t[2],10),r=parseInt(t[4]||"1",10),o=parseInt(t[6]||"0",10),d=parseInt(t[8]||"0",10);return{date:e,time:o.toString().padStart(2,"0")+":"+d.toString().padStart(2,"0"),year:a,month:n,day:r,hour:o,minute:d,hasDay:!!t[4],hasTime:!0,past:!1,current:!1,future:!1,disabled:!1,weekday:0,doy:0,workweek:0}}function H(e,t=!1){if(!(e instanceof Date))return null;const a=t?"UTC":"";return g({date:o(e[`get${a}FullYear`](),4)+"-"+o(e[`get${a}Month`]()+1,2)+"-"+o(e[`get${a}Date`](),2),time:o(e[`get${a}Hours`]()||0,2)+":"+o(e[`get${a}Minutes`]()||0,2),year:e[`get${a}FullYear`](),month:e[`get${a}Month`]()+1,day:e[`get${a}Date`](),hour:e[`get${a}Hours`](),minute:e[`get${a}Minutes`](),weekday:0,doy:0,workweek:0,hasDay:!0,hasTime:!0,past:!1,current:!1,future:!1,disabled:!1})}function o(e,t){let a=String(e);while(a.length<t)a="0"+a;return a}function Y(e){return e%4===0&&e%100!==0||e%400===0}function i(e,t){return(Y(e)?C:W)[t]}function h(e){const t=new Date(e.year,e.month-1,e.day+1);return g(ie({...e,year:t.getFullYear(),month:t.getMonth()+1,day:t.getDate()}))}function p(e){const t=new Date(e.year,e.month-1,e.day-1);return g(ie({...e,year:t.getFullYear(),month:t.getMonth()+1,day:t.getDate()}))}function Ie(){const e=new Date,t=e.getMonth()+1,a=e.getDate(),n=e.getFullYear();return[n,o(t,2),o(a,2)].join("-")}function V(e){return e===Ie()}function T(e,t,a){let n=A(e);if(t){if(1===n.day||0===n.weekday)while(!t.includes(Number(n.weekday)))n=h(n);n=v(n,t[0],p),n=g(n),a&&(n=w(n,a,n.hasTime))}return n}function M(e,t,a){let n=A(e);if(t&&Array.isArray(t)){const r=i(n.year,n.month);if(r===n.day||n.weekday===t[t.length-1])while(!t.includes(Number(n.weekday)))n=p(n);n=v(n,t[t.length-1],h),n=g(n),a&&(n=w(n,a,n.hasTime))}return n}function N(e){let t=A(e);return t.day=B,t=g(t),t}function S(e){let t=A(e);return t.day=i(t.year,t.month),t=g(t),t}function z(e){const t=Object.prototype.toString.call(e);switch(t){case"[object Number]":return e;case"[object String]":{const a=O.exec(e);return a?60*parseInt(a[1],10)+parseInt(a[3]||"0",10):!1}case"[object Object]":return"object"!==typeof e||"number"!==typeof e.hour||"number"!==typeof e.minute?!1:"object"===typeof e&&"hour"in e&&"minute"in e&&60*e.hour+e.minute}return!1}function P(e,t){return!(!e||!t)&&e.year===t.year&&e.month===t.month&&e.day===t.day&&e.hour===t.hour&&e.minute===t.minute}function Z(e,t){return c(e)===c(t)}function j(e,t){return m(e)===m(t)}function $(e,t){return y(e)===y(t)}function Ee(e,t=null){let a=Fe(e);return a?(a=g(a),t&&(a=w(a,t,a.hasTime)),a):null}function Oe(e){return 1e8*(e.year??0)+1e6*(e.month??0)+1e4*(e.day??0)}function s(e){return 100*(e.hour??0)+(e.minute??0)}function n(e){return Oe(e)+s(e)}function K(e,t,a=!1){const n=Date.UTC(e.year??0,(e.month??1)-1,e.day??1,e.hour??0,e.minute??0),r=Date.UTC(t.year??0,(t.month??1)-1,t.day??1,t.hour??0,t.minute??0);return!0===a&&r<n?0:r-n}function w(e,t,a=!1){let n=A(e),r=Oe(t),o=Oe(n),d=r===o;return n.hasTime&&a&&d&&(r=s(t),o=s(n),d=r===o),n.past=o<r,n.current=d,n.future=o>r,n.currentWeekday=n.weekday===t.weekday,n}function X(e,t,a=null){let n=A(e);return n.hasTime=!0,n.hour=Math.floor(t/r.MINUTES_IN.HOUR),n.minute=t%r.MINUTES_IN.HOUR,n.time=m(n),a&&(n=w(n,a,!0)),n}function k(e){let t=A(e);return t.weekday=l(t),t}function Q(e){let t=A(e);return t.doy=a(t)||0,t}function G(e){let t=A(e);return t.workweek=d(t),t}function J(e,t,a,n,r){let o=A(e);const d=Oe(o);if(void 0!==t){const l=Fe(t);if(l){const c=Oe(l);d<=c&&(o.disabled=!0)}}if(!0!==o.disabled&&void 0!==a){const m=Fe(a);if(m){const y=Oe(m);d>=y&&(o.disabled=!0)}}if(!0!==o.disabled&&Array.isArray(n)&&n.length>0)for(var u in n)if(n[u]===o.weekday){o.disabled=!0;break}if(!0!==o.disabled&&Array.isArray(r)&&r.length>0)for(var i in r)if(Array.isArray(r[i])&&2===r[i].length&&r[i][0]&&r[i][1]){const v=Fe(r[i][0]),f=Fe(r[i][1]);if(v&&f&&de(o,v,f)){o.disabled=!0;break}}else{const h=r[i];if(Array.isArray(h))for(var s of h){const p=Ee(s);if(p){const w=Oe(p);if(w===d){o.disabled=!0;break}}}else if(h){const k=Ee(h);if(k){const g=Oe(k);g===d&&(o.disabled=!0)}}}return o}function g(e){let t=A(e);return t.hasTime=!0,t.time=m(t),t.date=c(t),t.weekday=l(t),t.doy=a(t)||0,t.workweek=d(t),t}function a(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 d(e){let t=A(e);if(0===t.year){const r=Ee(Ie());r&&(t=r)}const a=new Date(Date.UTC(t.year,t.month-1,t.day)),n=4;a.setUTCDate(a.getUTCDate()-(a.getUTCDay()+6)%7+n),a.setUTCDate(a.getUTCDate()+n-(a.getUTCDay()||7));e=new Date(Date.UTC(a.getUTCFullYear(),0,1)),e=Math.ceil(((a.valueOf()-e.valueOf())/864e5+1)/7);return e}function l(e){let t=e.weekday;if(e.hasDay){const a=Math.floor,n=e.day,r=(e.month+9)%L+1,o=a(e.year/100),d=e.year%100-(e.month<=2?1:0);t=((n+a(2.6*r-.2)-2*o+d+a(d/4)+a(o/4))%7+7)%7}return t??0}function A(e){return{...e}}function c(e){let t=o(e.year,4)+"-"+o(e.month,2);return e.hasDay&&(t+="-"+o(e.day,2)),t}function m(e){return e.hasTime?o(e.hour,2)+":"+o(e.minute,2):""}function y(e){return c(e)+" "+(e.hasTime?m(e):"00:00")}function ee(e,t=h,a=1,n=[0,1,2,3,4,5,6]){const r=A(e);return b(r,t,a,n)}function b(e,t=h,a=1,n=[0,1,2,3,4,5,6]){let r=A(e);n.includes(Number(r.weekday))||0!==r.weekday||t!==h||++a;while(--a>=0)r=t(r),n.length<7&&!n.includes(Number(r.weekday))&&++a;return r}function v(e,t,a=h,n=6){let r=A(e);while(r.weekday!==t&&--n>=0)r=a(r);return r}function F(e,t,a,n=[0,1,2,3,4,5,6],r=void 0,o=void 0,d=[],u=[],i=42,s=0){const l=Oe(e),c=Oe(t),m=[];let y=A(e),v=0,f=v===c;if(!(c<l))while((!f||m.length<s)&&m.length<i){if(v=Oe(y),f=f||v>c&&m.length>=s,f)break;if(n.includes(Number(y.weekday))){let e=A(y);e=g(e),e=w(e,a),e=J(e,r,o,d,u),m.push(e)}y=b(y,h)}return m}function te(t,a,n,r,o){const d=[];for(let e=0;e<r;++e){const u=(a+e)*n,i=A(t);d.push(X(i,u,o))}return d}function I(n,r){const e=()=>"";return"undefined"===typeof Intl||"undefined"===typeof Intl.DateTimeFormat?e:(t,e)=>{try{const a=new Intl.DateTimeFormat(n||void 0,r(t,e));return a.format(ne(t))}catch(e){return console.error(`Intl.DateTimeFormat: ${e.message} -> `+y(t)),""}}}function ae(e,t=!0){return t?new Date(Date.UTC(e.year,e.month-1,e.day,0,0)):new Date(e.year,e.month-1,e.day,0,0)}function ne(e,t=!0){return t?new Date(Date.UTC(e.year,e.month-1,e.day,e.hour,e.minute)):new Date(e.year,e.month-1,e.day,e.hour,e.minute)}function f(e){return isFinite(Number(e))}function re(e,t=!1){const a=!0===t?n:Oe;return e.reduce((e,t)=>{return Math.max(a(e),a(t))===a(e)?e:t})}function oe(e,t=!1){const a=!0===t?n:Oe;return e.reduce((e,t)=>{return Math.min(a(e),a(t))===a(e)?e:t})}function de(e,t,a,n=!1){const r=Oe(e)+(!0===n?s(e):0),o=Oe(t)+(!0===n?s(t):0),d=Oe(a)+(!0===n?s(a):0);return r>=o&&r<=d}function ue(e,t,a,n){const r=Oe(e),o=Oe(t),d=Oe(a),u=Oe(n);return r>=d&&r<=u||o>=d&&o<=u||d>=r&&o>=u}function E(e,t){const a=A(e);return t.year&&(a.year+=t.year),t.month&&(a.month+=t.month),t.day&&(a.day+=t.day),t.hour&&(a.hour+=t.hour),t.minute&&(a.minute+=t.minute),g(ie(a))}function ie(e){const t=new Date(e.year,e.month-1,e.day,e.hour,e.minute);return{...e,year:t.getFullYear(),month:t.getMonth()+1,day:t.getDate(),hour:t.getHours(),minute:t.getMinutes()}}function se(e,t){const a=K(e,t,!0);return Math.floor(a/r.MILLISECONDS_IN.DAY)}function le(e,t){let a=A(e),n=A(t);return a=v(a,0),n=v(n,6),Math.ceil(se(a,n)/r.DAYS_IN.WEEK)}const ce={Sun:new Date("2020-01-05T00:00:00.000Z"),Mon:new Date("2020-01-06T00:00:00.000Z"),Tue:new Date("2020-01-07T00:00:00.000Z"),Wed:new Date("2020-01-08T00:00:00.000Z"),Thu:new Date("2020-01-09T00:00:00.000Z"),Fri:new Date("2020-01-10T00:00:00.000Z"),Sat:new Date("2020-01-11T00:00:00.000Z")};function me(){const e=()=>"",r={long:{timeZone:"UTC",weekday:"long"},short:{timeZone:"UTC",weekday:"short"},narrow:{timeZone:"UTC",weekday:"narrow"}};return"undefined"===typeof Intl||"undefined"===typeof Intl.DateTimeFormat?e:t;function t(t,e,a){try{const n=new Intl.DateTimeFormat(a||void 0,r[e]||r["long"]);return n.format(ce[t])}catch(e){return e instanceof Error&&console.error(`Intl.DateTimeFormat: ${e.message} -> day of week: `+t),""}}}function ye(t,a){const e=Object.keys(ce),n=me();return e.map(e=>String(n(e,t,a)))}function ve(){const e=()=>"",o={long:{timeZone:"UTC",month:"long"},short:{timeZone:"UTC",month:"short"},narrow:{timeZone:"UTC",month:"narrow"}};return"undefined"===typeof Intl||"undefined"===typeof Intl.DateTimeFormat?e:t;function t(t,e,a){try{const n=new Intl.DateTimeFormat(a||void 0,o[e]||o["long"]),r=new Date;return r.setDate(1),r.setMonth(t),n.format(r)}catch(e){return e instanceof Error&&console.error(`Intl.DateTimeFormat: ${e.message} -> month: `+t),""}}}function fe(t,a){const n=ve();return[...Array(12).keys()].map(e=>n(e,t,a))}var e={PARSE_DATETIME:u,PARSE_DATE:_,PARSE_TIME:O,DAYS_IN_MONTH:W,DAYS_IN_MONTH_LEAP:C,DAYS_IN_MONTH_MIN:x,DAYS_IN_MONTH_MAX:q,MONTH_MAX:L,MONTH_MIN:U,DAY_MIN:B,TIME_CONSTANTS:r,FIRST_HOUR:R,today:Ie,getStartOfWeek:T,getEndOfWeek:M,getStartOfMonth:N,getEndOfMonth:S,parseTime:z,validateTimestamp:t,parsed:Fe,parseTimestamp:Ee,parseDate:H,getDayIdentifier:Oe,getTimeIdentifier:s,getDayTimeIdentifier:n,diffTimestamp:K,updateRelative:w,updateMinutes:X,updateWeekday:k,updateDayOfYear:Q,updateWorkWeek:G,updateDisabled:J,updateFormatted:g,getDayOfYear:a,getWorkWeek:d,getWeekday:l,isLeapYear:Y,daysInMonth:i,copyTimestamp:A,padNumber:o,getDate:c,getTime:m,getDateTime:y,nextDay:h,prevDay:p,relativeDays:b,findWeekday:v,createDayList:F,createIntervalList:te,createNativeLocaleFormatter:I,makeDate:ae,makeDateTime:ne,validateNumber:f,isBetweenDates:de,isOverlappingDates:ue,daysBetween:se,weeksBetween:le,addToDate:E,compareTimestamps:P,compareDate:Z,compareTime:j,compareDateTime:$,getWeekdayFormatter:me,getWeekdayNames:ye,getMonthFormatter:ve,getMonthNames:fe},e=Object.freeze({__proto__:null,DAYS_IN_MONTH:W,DAYS_IN_MONTH_LEAP:C,DAYS_IN_MONTH_MAX:q,DAYS_IN_MONTH_MIN:x,DAY_MIN:B,FIRST_HOUR:R,MONTH_MAX:L,MONTH_MIN:U,PARSE_DATE:_,PARSE_DATETIME:u,PARSE_TIME:O,TIME_CONSTANTS:r,addToDate:E,compareDate:Z,compareDateTime:$,compareTime:j,compareTimestamps:P,copyTimestamp:A,createDayList:F,createIntervalList:te,createNativeLocaleFormatter:I,daysBetween:se,daysInMonth:i,default:e,diffTimestamp:K,findWeekday:v,getDate:c,getDateTime:y,getDayIdentifier:Oe,getDayOfYear:a,getDayTimeIdentifier:n,getEndOfMonth:S,getEndOfWeek:M,getMonthFormatter:ve,getMonthNames:fe,getStartOfMonth:N,getStartOfWeek:T,getTime:m,getTimeIdentifier:s,getWeekday:l,getWeekdayFormatter:me,getWeekdayNames:ye,getWorkWeek:d,isBetweenDates:de,isLeapYear:Y,isOverlappingDates:ue,isToday:V,makeDate:ae,makeDateTime:ne,maxTimestamp:re,minTimestamp:oe,moveRelativeDays:ee,nextDay:h,padNumber:o,parseDate:H,parseTime:z,parseTimestamp:Ee,parsed:Fe,prevDay:p,relativeDays:b,today:Ie,updateDayOfYear:Q,updateDisabled:J,updateFormatted:g,updateMinutes:X,updateRelative:w,updateWeekday:k,updateWorkWeek:G,validateNumber:f,validateTimestamp:t,weeksBetween:le});function We(e,t="px"){if(e)return isNaN(e)?String(e):"auto"===e?e:""+Number(e)+t}function he(t,a){for(let e=0;e<t.length;e++)if(!0===a(t[e],e))return e;return-1}function Ce(e,t){return 0===t?e:e.slice(0,t)}var pe={convertToUnit:We,indexOf:he,minCharWidth:Ce},pe=Object.freeze({__proto__:null,convertToUnit:We,default:pe,indexOf:he,minCharWidth:Ce});const we=e=>e.replace(/(-\w)/g,e=>e[1].toUpperCase());function ke(t,e,a,n){const r={};for(const o in a){const d=a[o],u=we("on-"+o);if(!e.value)return console.warn("$listeners has not been set up"),{};if(void 0!==e.value[u]){const i="on"+d.event.charAt(0).toUpperCase()+d.event.slice(1),s=e=>{return(void 0===d.button||"buttons"in e&&e.buttons>0&&e.button===d.button)&&(d.prevent&&e.preventDefault(),d.stop&&e.stopPropagation(),t(o,n(e,o))),d.result};i in r?Array.isArray(r[i])?r[i].push(s):r[i]=[r[i],s]:r[i]=s}}return r}function ge(e,t,a,n){return ke(e,t,be(a),n)}function be(e){return{["click"+e]:{event:"click"},["contextmenu"+e]:{event:"contextmenu",prevent:!0,result:!1},["mousedown"+e]:{event:"mousedown"},["mousemove"+e]:{event:"mousemove"},["mouseup"+e]:{event:"mouseup"},["mouseenter"+e]:{event:"mouseenter"},["mouseleave"+e]:{event:"mouseleave"},["touchstart"+e]:{event:"touchstart"},["touchmove"+e]:{event:"touchmove"},["touchend"+e]:{event:"touchend"}}}function D(e){return Object.keys(be(e))}function xe(a,n){return{getMouseEventHandlers:(e,t)=>ke(a,n,e,t),getDefaultMouseEventHandlers:(e,t)=>ge(a,n,e,t),getMouseEventName:be,getRawMouseEvents:D}}const qe={mounted(e,t){if("function"===typeof t.value){const a=t.value,n={callback:a,size:{width:0,height:0},observer:new ResizeObserver(e=>{const t=e[0].contentRect;t.width===n.size.width&&t.height===n.size.height||(n.size.width=t.width,n.size.height=t.height,n.debounceTimeout&&clearTimeout(n.debounceTimeout),n.debounceTimeout=setTimeout(()=>{n.callback(n.size),n.debounceTimeout=void 0},100))})};n.observer.observe(e),e.__onResizeObserver=n}},beforeUnmount(e){if(e.__onResizeObserver){const{observer:t,debounceTimeout:a}=e.__onResizeObserver;a&&clearTimeout(a),t.unobserve(e),delete e.__onResizeObserver}}};function Le(t,a,{scrollArea:e,pane:n}){if(!a){const l="[error: renderCalendar] no renderFunc has been supplied to useCalendar";throw console.error(l),new Error(l)}const r=Ae.reactive({width:0,height:0}),o=Ae.ref(null);function d({width:e,height:t}){r.width=e,r.height=t}const u=Ae.computed(()=>{return!0!==t.noScroll&&e.value&&n.value&&r.height?e.value.offsetWidth-n.value.offsetWidth:0});function i(){}function s(){const e={ref:o,role:"complementary",lang:t.locale,class:`q-calendar ${t.dark?"q-calendar--dark":""} `+(t.bordered?"q-calendar__bordered":"")};return Ae.withDirectives(Ae.h("div",{...e},[a()]),[[qe,d]])}return{rootRef:o,scrollWidth:u,__initCalendar:i,__renderCalendar:s}}const De=e=>e.every(e=>["day","date","weekday","interval","time","resource","task"].includes(e)),_e={modelValue:{type:String,default:Ie(),validator:e=>""===e||t(e)},weekdays:{type:Array,default:()=>[0,1,2,3,4,5,6]},dateType:{type:String,default:"round",validator:e=>["round","rounded","square"].includes(e)},weekdayAlign:{type:String,default:"center",validator:e=>["left","center","right"].includes(e)},dateAlign:{type:String,default:"center",validator:e=>["left","center","right"].includes(e)},bordered:Boolean,dark:Boolean,noAria:Boolean,noActiveDate:Boolean,noHeader:Boolean,noScroll:Boolean,shortWeekdayLabel:Boolean,noDefaultHeaderText:Boolean,noDefaultHeaderBtn:Boolean,minWeekdayLabel:{type:[Number,String],default:1},weekdayBreakpoints:{type:Array,default:()=>[75,35],validator:e=>2===e.length},locale:{type:String,default:"en-US"},animated:Boolean,transitionPrev:{type:String,default:"slide-right"},transitionNext:{type:String,default:"slide-left"},disabledDays:Array,disabledBefore:String,disabledAfter:String,disabledWeekdays:{type:Array,default:()=>[]},dragEnterFunc:Function,dragOverFunc:Function,dragLeaveFunc:Function,dropFunc:Function,selectedDates:{type:[Array,Set],default:()=>[]},selectedStartEndDates:{type:Array,default:()=>[]},hoverable:Boolean,focusable:Boolean,focusType:{type:Array,default:()=>["date"],validator:De}};function Ue(t,{startDate:e,endDate:a,times:n}){const r=Ae.computed(()=>Ee(e.value)),o=Ae.computed(()=>{return"0000-00-00"===a.value?M(r.value,t.weekdays,n.today):Ee(a.value)||r.value}),d=Ae.computed(()=>I(t.locale,()=>({timeZone:"UTC",day:"numeric"}))),u=Ae.computed(()=>I(t.locale,(e,t)=>({timeZone:"UTC",weekday:t?"short":"long"}))),i=Ae.computed(()=>I(t.locale,()=>({timeZone:"UTC",dateStyle:"full"})));function s(e,t){return e&&e.length>0&&e.includes(t.date)}function l(e,t){const a={firstDay:!1,betweenDays:!1,lastDay:!1};if(2===e.length){const n=Oe(t),r=Oe(Fe(e[0])),o=Oe(Fe(e[1]));a.firstDay=r===n,a.lastDay=o===n,a.betweenDays=r<n&&o>n}return a}function c(e,t=!1,a=[],n=[],r=!1){const o=s(a,e),{firstDay:d,lastDay:u,betweenDays:i}=l(n,e);return{"q-past-day":!d&&!i&&!u&&!o&&!t&&!!e.past,"q-future-day":!d&&!i&&!u&&!o&&!t&&!!e.future,"q-outside":t,"q-current-day":!!e.current,"q-selected":o,"q-range-first":d,"q-range":i,"q-range-last":u,"q-range-hover":r&&(d||u||i),"q-disabled-day disabled":!0===e.disabled}}function m(e){return T(e,t.weekdays,n.today)}function y(e){return M(e,t.weekdays,n.today)}function v(){return{}}return{parsedStart:r,parsedEnd:o,dayFormatter:d,weekdayFormatter:u,ariaDateFormatter:i,arrayHasDate:s,checkDays:l,getRelativeClasses:c,startOfWeek:m,endOfWeek:y,dayStyleDefault:v}}const Te={dayHeight:{type:[Number,String],default:0,validator:e=>f(e)},dayMinHeight:{type:[Number,String],default:0,validator:e=>f(e)},dayStyle:Function,dayClass:Function,weekdayStyle:Function,weekdayClass:Function,dayPadding:String,minWeeks:{type:[Number,String],default:1,validator:e=>f(e)},shortMonthLabel:Boolean,showWorkWeeks:Boolean,showMonthLabel:{type:Boolean,default:!0},showDayOfYearLabel:Boolean,enableOutsideDays:Boolean,noOutsideDays:Boolean,hover:Boolean,miniMode:{type:[Boolean,String],validator:e=>[!0,!1,"auto"].includes(e)},breakpoint:{type:[Number,String],default:"md",validator:e=>["xs","sm","md","lg","xl"].includes(e)||f(e)},monthLabelSize:{type:String,default:"sm",validator:e=>["xxs","xs","sm","md","lg","xl","xxl"].includes(e)||!!e&&e.length>0}};function Be(n,t,{times:r,parsedStart:a,parsedEnd:o,size:d,headerColumnRef:u}){const e=Ae.computed(()=>parseInt(n.minWeeks,10)),i=Ae.computed(()=>e.value*n.weekdays.length),s=Ae.computed(()=>k(b(a.value))),l=Ae.computed(()=>g(D(o.value))),c=Ae.computed(()=>{let e=0;return n.cellWidth?e=Number(n.cellWidth):d.width>0&&u.value&&(e=u.value.offsetWidth/n.weekdays.length),e}),m=Ae.computed(()=>F(s.value,l.value,r.today,n.weekdays,n.disabledBefore,n.disabledAfter,n.disabledWeekdays,n.disabledDays,Number.MAX_SAFE_INTEGER,i.value)),y=Ae.computed(()=>{const e=r.today,t=k(e),a=g(e);return F(t,a,e,n.weekdays,n.disabledBefore,n.disabledAfter,n.disabledWeekdays,n.disabledDays,n.weekdays.length,n.weekdays.length)}),v=Ae.computed(()=>I(n.locale,(e,t)=>({timeZone:"UTC",month:t?"short":"long"}))),f=Ae.computed(()=>{switch(n.breakpoint){case"xs":return 300;case"sm":return 350;case"md":return 400;case"lg":return 450;case"xl":return 500;default:return parseInt(n.breakpoint,10)}}),h=Ae.computed(()=>{switch(n.monthLabelSize){case"xxs":return".4em";case"xs":return".6em";case"sm":return".8em";case"md":return"1.0em";case"lg":return"1.2em";case"xl":return"1.4em";case"xxl":return"1.6em";default:return n.monthLabelSize}});let p=!0;const w=Ae.computed(()=>{const e=!0===n.miniMode||"auto"===n.miniMode&&void 0!==n.breakpoint&&d.width<f.value;return p&&(p=!1,t("mini-mode",e)),e});function k(e){return T(e,n.weekdays,r.today)}function g(e){return M(e,n.weekdays,r.today)}function b(e){return N(e)}function D(e){return S(e)}function _(e){const t=Oe(e);return t<Oe(a.value)||t>Oe(o.value)}return Ae.watch(w,e=>{t("mini-mode",e)}),{parsedCellWidth:c,parsedMinWeeks:e,parsedMinDays:i,parsedMonthStart:s,parsedMonthEnd:l,parsedBreakpoint:f,parsedMonthLabelSize:h,days:m,todayWeek:y,isMiniMode:w,monthFormatter:v,isOutside:_}}const Me={now:{type:String,validator:e=>""===e||t(e),default:""}};function Re(e){const t=Ae.reactive({now:Ee("0000-00-00 00:00"),today:Ee("0000-00-00")}),a=Ae.computed(()=>e.now?Ee(e.now):o());function n(){t.now&&t.today&&(t.now.current=t.today.current=!0,t.now.past=t.today.past=!1,t.now.future=t.today.future=!1)}function r(){const e=a.value||o();d(e,t.now),u(e,t.now),d(e,t.today)}function o(){return H(new Date)}function d(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)}function u(e,t){e.time!==t.time&&(t.hour=e.hour,t.minute=e.minute,t.time=e.time)}return Ae.watch(a,()=>r()),{times:t,parsedNow:a,setCurrent:n,updateCurrent:r,getNow:o,updateDay:d,updateTime:u}}function He(r,{parsedView:o,parsedValue:d,times:u}){const e=Ae.computed(()=>{const e=d.value;let t=r.maxDays,a=e,n=e;switch(o.value){case"month":a=N(e),n=S(e),t=i(a.year,a.month);break;case"week":case"week-agenda":case"week-scheduler":a=T(e,r.weekdays,u.today),n=M(a,r.weekdays,u.today),t=r.weekdays.length;break;case"day":case"scheduler":case"agenda":n=ee(A(n),h,t>1?t-1:t,r.weekdays),n=g(n);break;case"month-interval":case"month-scheduler":case"month-agenda":a=N(e),n=S(e),n=g(n),t=i(a.year,a.month);break;case"resource":t=1,n=ee(A(n),h,t,r.weekdays),n=g(n);break}return{start:a,end:n,maxDays:t}});return{renderValues:e}}const Ne=["moved"];function Ye(i,{parsedView:s,parsedValue:l,direction:c,maxDays:m,times:y,emittedValue:v,emit:f}){function e(a=1){if(0===a)v.value=Ie();else{let e=A(l.value);const n=S(e),r=a>0,o=r?h:p,d=r?n.day:1;let t=r?a:-a;c.value=r?"next":"prev";const u=i.weekdays.length;while(--t>=0)switch(s.value){case"month":e.day=d,e=o(e),e=k(e);while(!i.weekdays.includes(Number(e.weekday)))e=E(e,{day:r?1:-1});break;case"week":case"week-agenda":case"week-scheduler":e=b(e,o,u,i.weekdays);break;case"day":case"scheduler":case"agenda":e=b(e,o,m.value,i.weekdays);break;case"month-interval":case"month-agenda":case"month-scheduler":e.day=d,e=o(e);break;case"resource":e=b(e,o,m.value,i.weekdays);break}e=k(e),e=g(e),e=Q(e),e=w(e,y.now),v.value=e.date,f("moved",e)}}return{move:e}}const Se=/^on[A-Z]/;function Ve(e=Ae.getCurrentInstance()){return{emitListeners:Ae.computed(()=>{const t={};return e?.vnode?.props&&Object.keys(e.vnode.props).forEach(e=>{Se.test(e)&&(t[e]=!0)}),t})}}function ze(){const e={"aria-hidden":"true",class:"q-calendar__focus-helper"};return[Ae.h("span",e)]}function Pe(){function e({focusable:e,focusType:t},a,n){const r=e&&t.includes("date");return Ae.h("button",{...a,tabindex:r?0:-1},[n,r&&ze()])}return{renderButton:e}}const Ze={cellWidth:[Number,String]};function je(e){const t=Ae.computed(()=>void 0!==e.cellWidth);return{isSticky:t}}const $e=["change"];function Ke(n,{days:r,lastStart:o,lastEnd:d}){function e(){const e=r.value;if(0===e.length)return!1;const t=e[0].date,a=e[e.length-1].date;return(!o.value||!d.value||t!==o.value||a!==d.value)&&(o.value=t,d.value=a,n("change",{start:t,end:a,days:e}),!0)}return{checkChange:e}}function Xe(){function e(e,t){return(Array.isArray(t)?t:[t]).includes(e.keyCode)}return{isKeyCode:e}}const Qe=Xe().isKeyCode,Ge={useNavigation:Boolean};function Je(t,{rootRef:a,focusRef:n,focusValue:r,datesRef:o,parsedView:d,emittedValue:u,direction:i,times:s}){let e=!1;function l(){e||document&&(e=!0,document.addEventListener("keyup",f),document.addEventListener("keydown",v))}function c(){document&&(document.removeEventListener("keyup",f),document.removeEventListener("keydown",v),e=!1)}function m(e){if(e&&document){const t=document.activeElement;if(t!==document.body&&a.value?.contains(t))return!0}return!1}function y(){let t=0;const a=window.setInterval(()=>{const e=o.value[n.value];e&&(e.focus(),50!==++t)&&document.activeElement!==e||window.clearInterval(a)},250)}function v(e){m(e)&&Qe(e,[33,34,35,36,37,38,39,40])&&(e.stopPropagation(),e.preventDefault())}function f(e){if(m(e)&&Qe(e,[33,34,35,36,37,38,39,40])){const t={33:g,34:b,35:_,36:D,37:w,38:h,39:k,40:p};t[e.keyCode]?.()}}function h(){let e=A(r.value);if("month"===d.value){if(e=E(e,{day:-7}),r.value.month!==e.month)return i.value="prev",void(u.value=e.date)}else e=E(e,{minute:Number(t.intervalMinutes)});i.value="prev",n.value=e.date}function p(){let e=A(r.value);if("month"===d.value){if(e=E(e,{day:7}),r.value.month!==e.month)return i.value="next",void(u.value=e.date)}else e=E(e,{minute:Number(t.intervalMinutes)});i.value="next",n.value=e.date}function w(){let e=A(r.value);i.value="prev";do{e=E(e,{day:-1})}while(!t.weekdays.includes(Number(e.weekday)));n.value=e.date}function k(){let e=A(r.value);i.value="next";do{e=E(e,{day:1})}while(!t.weekdays.includes(Number(e.weekday)));n.value=e.date}function g(){let e=A(r.value);e="month"===d.value?E(e,{month:-1}):E(e,{day:-7}),i.value="prev",n.value=e.date}function b(){let e=A(r.value);e="month"===d.value?E(e,{month:1}):E(e,{day:7}),i.value="next",n.value=e.date}function D(){let e=A(r.value);e="month"===d.value?N(e):T(e,t.weekdays||[],s.today);while(!t.weekdays.includes(Number(e.weekday)))e=E(e,{day:-1});n.value=e.date}function _(){let e=A(r.value);e="month"===d.value?S(e):M(e,t.weekdays||[],s.today);while(!t.weekdays.includes(Number(e.weekday)))e=E(e,{day:-1});n.value=e.date}return Ae.onBeforeUnmount(()=>{c()}),Ae.watch(()=>t.useNavigation,e=>{(!0===e?l:c)()}),!0===t.useNavigation&&l(),{startNavigation:l,endNavigation:c,tryFocus:y}}const et=Pe().renderButton;var tt=Ae.defineComponent({name:"QCalendarMonth",directives:{ResizeObserver:qe},props:{..._e,...Te,...Me,...Ze,...Ge},emits:["update:model-value",...$e,...Ne,"mini-mode",...D("-date"),...D("-day"),...D("-head-workweek"),...D("-head-day"),...D("-workweek")],setup(y,{slots:v,emit:c,expose:q}){const L=Ae.ref(null),U=Ae.ref(null),e=Ae.ref(null),f=Ae.ref(y.modelValue||Ie()),t=Ae.ref(Fe(y.modelValue||Ie())),m=Ae.ref({}),s=Ae.ref([]),l=Ae.ref([]),o=Ae.ref("next"),d=Ae.ref(y.modelValue||Ie()),u=Ae.ref("0000-00-00"),B=Ae.ref(0),h=Ae.ref(y.modelValue),i=Ae.reactive({width:0,height:0}),p=Ae.ref(),w=Ae.ref(""),R=Ae.ref(null),H=Ae.ref(null),a=Ae.computed(()=>{return"month"}),n=Ae.getCurrentInstance();if(null===n)throw new Error("current instance is null");const k=Ve(n).emitListeners,Y=je(y).isSticky,{times:r,setCurrent:V,updateCurrent:g}=(Ae.watch(Y,()=>{}),Re(y)),{parsedStart:b,parsedEnd:D,dayFormatter:z,weekdayFormatter:P,ariaDateFormatter:Z,dayStyleDefault:_,getRelativeClasses:j}=(g(),V(),Ue(y,{startDate:d,endDate:u,times:r})),T=Ae.computed(()=>{return Ee(y.modelValue,r.now)||b.value||r.today}),$=(t.value=T.value,f.value=T.value.date,Ae.computed(()=>{const e={};return void 0!==y.dayPadding&&(e.padding=y.dayPadding),e.minWidth=O.value,e.maxWidth=O.value,e.width=O.value,e})),K=He(y,{parsedView:a,times:r,parsedValue:T}).renderValues,{rootRef:M,__renderCalendar:X}=Le(y,Se,{scrollArea:L,pane:U}),{days:N,todayWeek:Q,isMiniMode:S,parsedCellWidth:G,parsedMonthLabelSize:J,isOutside:ee,monthFormatter:te}=Be(y,c,{times:r,parsedStart:b,parsedEnd:D,size:i,headerColumnRef:e}),A=Ye(y,{parsedView:a,parsedValue:T,direction:o,maxDays:B,times:r,emittedValue:h,emit:c}).move,F=xe(c,k).getDefaultMouseEventHandlers,ae=Ke(c,{days:N,lastStart:R,lastEnd:H}).checkChange,I=Xe().isKeyCode,ne=Je(y,{rootRef:M,focusRef:f,focusValue:t,datesRef:m,parsedView:a,emittedValue:h,direction:o,times:r}).tryFocus,re=Ae.computed(()=>{return M.value&&!0===y.showWorkWeeks?parseInt(window.getComputedStyle(M.value).getPropertyValue(!0===S.value?"--calendar-mini-work-week-width":"--calendar-work-week-width"),10):0}),E=Ae.computed(()=>{return y.weekdays.length}),O=Ae.computed(()=>{if(M.value){const e=i.width||M.value.getBoundingClientRect().width;if(e&&E.value)return(e-re.value)/E.value+"px"}return 100/E.value+"%"}),W=Ae.computed(()=>{return!0===y.focusable&&y.focusType.includes("day")&&!0!==S.value}),C=Ae.computed(()=>{return!0===y.focusable&&y.focusType.includes("date")&&!0!==W.value});function oe(){h.value=Ie()}function de(e=1){A(e)}function ue(e=1){A(-e)}function ie({width:e,height:t}){i.width=e,i.height=t}function x(e){return e.date===h.value}function se(t){for(let e=0;e<t.length;++e)if(!0===t[e].current)return{timestamp:t[e]};return{timestamp:!1}}function le(){if(!0!==S.value&&0===y.dayHeight){const t=v.week;if(void 0!==t&&window)for(var e in s.value){const a=s.value[e];if(void 0!==a){const n=l.value[e];if(void 0!==n){const r=window.getComputedStyle(a),o=parseFloat(r.marginTop)+parseFloat(r.marginBottom);n.clientHeight+o>n.clientHeight&&(n.style.height=a.clientHeight+o+"px")}}}}}function ce(){return Ae.h("div",{class:"q-calendar-month__body"},[...ke()])}function me(){return Ae.h("div",{role:"presentation",class:"q-calendar-month__head"},[!0===y.showWorkWeeks&&ve(),Ae.h("div",{class:"q-calendar-month__head--wrapper"},[ye()])])}function ye(){return Ae.h("div",{ref:e,class:{"q-calendar-month__head--weekdays":!0}},[...fe()])}function ve(){const e=v["head-workweek"],t={start:b.value,end:D.value,miniMode:S.value};return Ae.h("div",{class:"q-calendar-month__head--workweek",...F("-head-workweek",e=>{return{scope:t,event:e}})},e?e({scope:t}):"#")}function fe(){return Q.value.map((e,t)=>he(e,t))}function he(t,e){const a=v["head-day"],n=N.value.filter(e=>e.weekday===t.weekday),r=n[0].weekday,o=!0!==y.noActiveDate&&x(t),d={activeDate:o,weekday:r,timestamp:t,days:n,index:e,miniMode:S.value,droppable:p.value===Number(t.weekday),disabled:!!y.disabledWeekdays&&y.disabledWeekdays.includes(Number(t.weekday))},u="function"===typeof y.weekdayClass?y.weekdayClass({scope:d}):{},i=!0===y.focusable&&y.focusType.includes("weekday"),s=O.value,l=y.weekdayStyle||_,c={width:s,maxWidth:s,minWidth:s,...l({scope:d})},m={key:t.date+(void 0!==e?"-"+e:""),tabindex:!0===i?0:-1,class:{"q-calendar-month__head--weekday":!0,...u,"q-disabled-day disabled":!0===d.disabled,["q-calendar__"+y.weekdayAlign]:!0,"q-calendar__ellipsis":!0,"q-calendar__focusable":!0===i},style:c,onDragenter:e=>{void 0!==y.dragEnterFunc&&"function"===typeof y.dragEnterFunc&&(!0===y.dragEnterFunc(e,"head-day",{scope:d})?p.value=Number(t.weekday):p.value=-1)},onDragover:e=>{void 0!==y.dragOverFunc&&"function"===typeof y.dragOverFunc&&(!0===y.dragOverFunc(e,"head-day",{scope:d})?p.value=Number(t.weekday):p.value=-1)},onDragleave:e=>{void 0!==y.dragLeaveFunc&&"function"===typeof y.dragLeaveFunc&&(!0===y.dragLeaveFunc(e,"head-day",{scope:d})?p.value=Number(t.weekday):p.value=-1)},onDrop:e=>{void 0!==y.dropFunc&&"function"===typeof y.dropFunc&&(!0===y.dropFunc(e,"head-day",{scope:d})?p.value=Number(t.weekday):p.value=-1)},onFocus:()=>{!0===i&&(f.value=t.date)},...F("-head-day",e=>{return{scope:d,event:e}})};return!0!==y.noAria&&(m.ariaLabel=P.value(t,!1)),Ae.h("div",m,[void 0===a&&we(t,y.shortWeekdayLabel||S.value),void 0!==a&&a({scope:d}),pe(t,e),!0===i&&ze()])}function pe(t,e){const a=v["head-day-event"],n=!0!==y.noActiveDate&&x(t),r=N.value.filter(e=>e.weekday===t.weekday),o=r[0].weekday,d={weekday:o,timestamp:t,days:r,index:e,miniMode:S.value,activeDate:n,disabled:!!y.disabledWeekdays&&y.disabledWeekdays.includes(Number(t.weekday))},u=O.value,i=y.weekdayStyle||_,s={width:u,maxWidth:u,minWidth:u,...i({scope:d})};return Ae.h("div",{key:"event-"+t.date+(void 0!==e?"-"+e:""),class:{"q-calendar-month__head--event":!0},style:s},[void 0!==a&&a({scope:d})])}function we(e,t){const a=P.value(e,t||y.weekdayBreakpoints[0]>0&&G.value<=y.weekdayBreakpoints[0]);return Ae.h("span",{class:"q-calendar__ellipsis"},!0===S.value&&!0===y.shortWeekdayLabel||y.weekdayBreakpoints[1]>0&&G.value<=y.weekdayBreakpoints[1]?Ce(a,Number(y.minWeekdayLabel)):a)}function ke(){const t=y.weekdays.length,a=[];for(let e=0;e<N.value.length;e+=t)a.push(ge(N.value.slice(e,e+t),e/t));return a}function ge(e,t){const a=v.week,n=y.weekdays,r={week:e,weekdays:n,miniMode:S.value},o={},d=parseInt(String(y.dayHeight),10),u=parseInt(String(y.dayMinHeight),10),i=(o.height=d>0&&!0!==S.value?We(d):"auto",u>0&&!0!==S.value&&(o.minHeight=We(u)),0===d&&0===u);return Ae.h("div",{key:e[0].date,ref:e=>{l.value[t]=e},class:{"q-calendar-month__week--wrapper":!0,"q-calendar-month__week--auto-height":i},style:o},[!0===y.showWorkWeeks?be(e):void 0,Ae.h("div",{class:"q-calendar-month__week"},[Ae.h("div",{class:"q-calendar-month__week--days"},e.map(e=>De(e))),!0!==S.value&&void 0!==a?Ae.h("div",{ref:e=>{s.value[t]=e},class:"q-calendar-month__week--events"},a({scope:r})):void 0])])}function be(e){const t=v.workweek,a=e.length>2?e[2]:e[0],n=se(e).timestamp,r=Number(a.workweek).toLocaleString(y.locale),o={workweekLabel:r,week:e,miniMode:S.value};return Ae.h("div",{key:a.workweek,class:{"q-calendar-month__workweek":!0,...j(!1!==n?n:a,!1)},...F("-workweek",e=>{return{scope:o,event:e}})},t?t({scope:o}):r)}function De(t){const e=v.day,a=y.dayStyle||_,n=ee(t),r=!0!==y.noActiveDate&&T.value.date===t.date,o=!1===n&&!0===y.showMonthLabel&&N.value.find(e=>e.month===t.month)?.day===t.day,d={outside:n,timestamp:t,miniMode:S.value,activeDate:r,hasMonth:o,droppable:w.value===t.date,disabled:!!y.disabledWeekdays&&y.disabledWeekdays.includes(Number(t.weekday))},u=Object.assign({...$.value},a({scope:d})),i="function"===typeof y.dayClass?y.dayClass({scope:d}):{},s={key:t.date,ref:e=>{!0===W.value&&(m.value[t.date]=e)},tabindex:!0===W.value?0:-1,class:{"q-calendar-month__day":!0,...i,...j(t,n,Array.from(y.selectedDates),y.selectedStartEndDates,y.hover),"q-active-date":!0===r,disabled:!0!==y.enableOutsideDays&&!0===n,"q-calendar__hoverable":!0===y.hoverable,"q-calendar__focusable":!0===W.value},style:u,onFocus:()=>{!0===W.value&&(f.value=t.date)},onKeydown:e=>{!0!==n&&!0!==t.disabled&&I(e,[13,32])&&(e.stopPropagation(),e.preventDefault())},onKeyup:e=>{!0!==n&&!0!==t.disabled&&I(e,[13,32])&&(e.stopPropagation(),e.preventDefault(),void 0!==k.value.onClickDay)&&!0!==S.value&&c("click-day",{scope:d,e:e})},...F("-day",e=>{return{scope:d,event:e}})},l={onDragenter:e=>{void 0!==y.dragEnterFunc&&"function"===typeof y.dragEnterFunc&&(!0===y.dragEnterFunc(e,"day",{scope:d})?w.value=t.date:w.value="")},onDragover:e=>{void 0!==y.dragOverFunc&&"function"===typeof y.dragOverFunc&&(!0===y.dragOverFunc(e,"day",{scope:d})?w.value=t.date:w.value="")},onDragleave:e=>{void 0!==y.dragLeaveFunc&&"function"===typeof y.dragLeaveFunc&&(!0===y.dragLeaveFunc(e,"day",{scope:d})?w.value=t.date:w.value="")},onDrop:e=>{void 0!==y.dropFunc&&"function"===typeof y.dropFunc&&(!0===y.dropFunc(e,"day",{scope:d})?w.value=t.date:w.value="")}};return!0!==n&&Object.assign(s,l),!0!==y.noAria&&(s.ariaLabel=Z.value(t,!1)),Ae.h("div",s,[_e(t,n,o),Ae.h("div",{class:{"q-calendar-month__day--content":!0}},e?e({scope:d}):void 0),!0===W.value&&ze()])}function _e(e,t,a){let n,r;const o=[Te(e,t)],d=(!0!==S.value&&!0===a&&i.width>340&&(r=Ne(e,t)),!0!==S.value&&!0===y.showDayOfYearLabel&&void 0===r&&i.width>300&&(n=Me(e,t)),"left"===y.dateAlign?(void 0!==n&&o.push(n),void 0!==r&&o.push(r)):"right"===y.dateAlign?(void 0!==n&&o.unshift(n),void 0!==r&&o.unshift(r)):(n=void 0,r=void 0),{class:{"q-calendar-month__day--label__wrapper":!0,"q-calendar__ellipsis":!0,["q-calendar__"+y.dateAlign]:void 0===n&&void 0===r,"q-calendar__justify":void 0!==n||void 0!==r}});return Ae.h("div",d,o)}function Te(a,t){if(!0!==t||!0!==y.noOutsideDays){const e=z.value(a,!1),n=v["head-day-label"],r=v["head-day-button"],o=y.selectedDates&&Array.from(y.selectedDates).length>0&&Array.from(y.selectedDates).includes(a.date),d=!0!==y.noActiveDate&&x(a),u={dayLabel:e,timestamp:a,outside:t,activeDate:d,selectedDate:o,miniMode:S.value,disabled:!!y.disabledWeekdays&&y.disabledWeekdays.includes(Number(a.weekday))},i={key:a.date,ref:e=>{!0===C.value&&(m.value[a.date]=e)},tabindex:!0===C.value?0:-1,class:{"q-calendar-month__day--label":!0,"q-calendar__button":!0,"q-calendar__button--round":"round"===y.dateType,"q-calendar__button--rounded":"rounded"===y.dateType,"q-calendar__button--bordered":!0===a.current,"q-calendar__hoverable":!0===y.hoverable,"q-calendar__focusable":!0===C.value},disabled:!0===a.disabled||!0!==y.enableOutsideDays&&!0===t,onFocus:()=>{!0===C.value&&(f.value=a.date)},onKeydown:e=>{!0!==t&&!0!==a.disabled&&I(e,[13,32])&&(e.stopPropagation(),e.preventDefault())},onKeyup:e=>{!0===C.value&&!0!==t&&!0!==a.disabled&&I(e,[13,32])&&(e.stopPropagation(),e.preventDefault(),h.value=a.date,void 0!==k.value.onClickDate)&&c("click-date",{scope:u,event:e})},...F("-date",(e,t)=>{return e.stopPropagation(),"click-date"!==t&&"contextmenu-date"!==t||(h.value=a.date),{scope:u,event:e}})};return!0!==y.noAria&&(i.ariaLabel=Z.value(a,!1)),[r?r({scope:u}):et(y,i,n?n({scope:u}):e),!0===C.value&&ze()].filter(e=>!1!==e)}}function Me(e,t){if(!0!==t||!0!==y.noOutsideDays){const a=v["day-of-year"],n={timestamp:e};return Ae.h("span",{class:{"q-calendar-month__day--day-of-year":!0,"q-calendar__ellipsis":!0}},a?a({scope:n}):e.doy)}}function Ne(e,t){if(!0!==t||!0!==y.noOutsideDays){const a=v["month-label"],n=te.value(e,y.shortMonthLabel||i.width<500),r={monthLabel:n,timestamp:e,miniMode:S.value},o={};return!0!==S.value&&void 0!==J.value&&(o.fontSize=J.value),Ae.h("span",{class:"q-calendar-month__day--month q-calendar__ellipsis",style:o},[a?a({scope:r}):!0!==S.value?n:void 0])}}function Se(){const{start:e,end:t}=K.value,a=(d.value=e.date,u.value=t.date,i.width>0),n=Ae.withDirectives(Ae.h("div",{class:{"q-calendar-mini":!0===S.value,"q-calendar-month":!0},key:d.value},[!0===a&&!0!==y.noHeader&&me(),!0===a&&ce()]),[[qe,ie]]);if(!0!==y.animated)return n;{const r="q-calendar--"+("prev"===o.value?y.transitionPrev:y.transitionNext);return Ae.h(Ae.Transition,{name:r,appear:!0},()=>n)}}return Ae.watch([N],ae,{deep:!0,immediate:!0}),Ae.watch(()=>y.modelValue,(e,t)=>{if(h.value!==e){if(!0===y.animated){const a=Oe(Fe(e)),n=Oe(Fe(t));o.value=a>=n?"next":"prev"}h.value=e}f.value=e}),Ae.watch(h,(e,t)=>{if(h.value!==y.modelValue){if(!0===y.animated){const a=Oe(Fe(e)),n=Oe(Fe(t));o.value=a>=n?"next":"prev"}c("update:model-value",e)}}),Ae.watch(f,e=>{e&&(t.value=Ee(e),h.value!==e)&&(h.value=e)}),Ae.watch(t,()=>{m.value[f.value]?m.value[f.value].focus():ne()}),Ae.onBeforeUpdate(()=>{m.value={},s.value=[],l.value=[],Ae.nextTick(()=>{le()})}),Ae.onMounted(()=>{le()}),q({prev:ue,next:de,move:A,moveToToday:oe,updateCurrent:g}),()=>X()}});const at="4.1.1";e={version:at,QCalendarMonth:tt,...e,...pe,install(e){e.component(String(tt.name),tt)}};return e}); |
/*! | ||
* @quasar/quasar-ui-qcalendar v4.1.0 | ||
* @quasar/quasar-ui-qcalendar v4.1.1 | ||
* (c) 2025 Jeff Galbraith <jeff@quasar.dev> | ||
* Released under the MIT License. | ||
*/ | ||
var vue=require("vue");const PARSE_DATETIME=/^(\d{4})-(\d{1,2})(-(\d{1,2}))?([^\d]+(\d{1,2}))?(:(\d{1,2}))?(:(\d{1,2}))?(.(\d{1,3}))?$/,PARSE_DATE=/^(\d{4})-(\d{1,2})(-(\d{1,2}))?/,PARSE_TIME=/(\d\d?)(:(\d\d?)|)(:(\d\d?)|)/,DAYS_IN_MONTH=[0,31,28,31,30,31,30,31,31,30,31,30,31],DAYS_IN_MONTH_LEAP=[0,31,29,31,30,31,30,31,31,30,31,30,31],TIME_CONSTANTS={MILLISECONDS_IN:{DAY:864e5},MINUTES_IN:{HOUR:60},DAYS_IN:{WEEK:7}},DAYS_IN_MONTH_MIN=28,DAYS_IN_MONTH_MAX=31,MONTH_MAX=12,MONTH_MIN=1,DAY_MIN=1,FIRST_HOUR=0;function validateTimestamp(e){return"string"===typeof e&&PARSE_DATETIME.test(e)}function parsed(e){if("string"!==typeof e)return null;const t=PARSE_DATETIME.exec(e);if(!t||!t[1]||!t[2])return null;const a=parseInt(t[1],10),n=parseInt(t[2],10),r=parseInt(t[4]||"1",10),o=parseInt(t[6]||"0",10),u=parseInt(t[8]||"0",10);return{date:e,time:o.toString().padStart(2,"0")+":"+u.toString().padStart(2,"0"),year:a,month:n,day:r,hour:o,minute:u,hasDay:!!t[4],hasTime:!0,past:!1,current:!1,future:!1,disabled:!1,weekday:0,doy:0,workweek:0}}function parseDate(e,t=!1){if(!(e instanceof Date))return null;const a=t?"UTC":"";return updateFormatted({date:padNumber(e[`get${a}FullYear`](),4)+"-"+padNumber(e[`get${a}Month`]()+1,2)+"-"+padNumber(e[`get${a}Date`](),2),time:padNumber(e[`get${a}Hours`]()||0,2)+":"+padNumber(e[`get${a}Minutes`]()||0,2),year:e[`get${a}FullYear`](),month:e[`get${a}Month`]()+1,day:e[`get${a}Date`](),hour:e[`get${a}Hours`](),minute:e[`get${a}Minutes`](),weekday:0,doy:0,workweek:0,hasDay:!0,hasTime:!0,past:!1,current:!1,future:!1,disabled:!1})}function padNumber(e,t){let a=String(e);while(a.length<t)a="0"+a;return a}function isLeapYear(e){return e%4===0&&e%100!==0||e%400===0}function daysInMonth(e,t){return(isLeapYear(e)?DAYS_IN_MONTH_LEAP:DAYS_IN_MONTH)[t]}function nextDay(e){const t=new Date(e.year,e.month-1,e.day+1);return updateFormatted(normalizeTimestamp({...e,year:t.getFullYear(),month:t.getMonth()+1,day:t.getDate()}))}function prevDay(e){const t=new Date(e.year,e.month-1,e.day-1);return updateFormatted(normalizeTimestamp({...e,year:t.getFullYear(),month:t.getMonth()+1,day:t.getDate()}))}function today(){const e=new Date,t=e.getMonth()+1,a=e.getDate(),n=e.getFullYear();return[n,padNumber(t,2),padNumber(a,2)].join("-")}function isToday(e){return e===today()}function getStartOfWeek(e,t,a){let n=copyTimestamp(e);if(t){if(1===n.day||0===n.weekday)while(!t.includes(Number(n.weekday)))n=nextDay(n);n=findWeekday(n,t[0],prevDay),n=updateFormatted(n),a&&(n=updateRelative(n,a,n.hasTime))}return n}function getEndOfWeek(e,t,a){let n=copyTimestamp(e);if(t&&Array.isArray(t)){const r=daysInMonth(n.year,n.month);if(r===n.day||n.weekday===t[t.length-1])while(!t.includes(Number(n.weekday)))n=prevDay(n);n=findWeekday(n,t[t.length-1],nextDay),n=updateFormatted(n),a&&(n=updateRelative(n,a,n.hasTime))}return n}function getStartOfMonth(e){let t=copyTimestamp(e);return t.day=DAY_MIN,t=updateFormatted(t),t}function getEndOfMonth(e){let t=copyTimestamp(e);return t.day=daysInMonth(t.year,t.month),t=updateFormatted(t),t}function parseTime(e){const t=Object.prototype.toString.call(e);switch(t){case"[object Number]":return e;case"[object String]":{const a=PARSE_TIME.exec(e);return a?60*parseInt(a[1],10)+parseInt(a[3]||"0",10):!1}case"[object Object]":return"object"!==typeof e||"number"!==typeof e.hour||"number"!==typeof e.minute?!1:"object"===typeof e&&"hour"in e&&"minute"in e&&60*e.hour+e.minute}return!1}function compareTimestamps(e,t){return!(!e||!t)&&e.year===t.year&&e.month===t.month&&e.day===t.day&&e.hour===t.hour&&e.minute===t.minute}function compareDate(e,t){return getDate(e)===getDate(t)}function compareTime(e,t){return getTime(e)===getTime(t)}function compareDateTime(e,t){return getDateTime(e)===getDateTime(t)}function parseTimestamp(e,t=null){let a=parsed(e);return a?(a=updateFormatted(a),t&&(a=updateRelative(a,t,a.hasTime)),a):null}function getDayIdentifier(e){return 1e8*(e.year??0)+1e6*(e.month??0)+1e4*(e.day??0)}function getTimeIdentifier(e){return 100*(e.hour??0)+(e.minute??0)}function getDayTimeIdentifier(e){return getDayIdentifier(e)+getTimeIdentifier(e)}function diffTimestamp(e,t,a=!1){const n=Date.UTC(e.year??0,(e.month??1)-1,e.day??1,e.hour??0,e.minute??0),r=Date.UTC(t.year??0,(t.month??1)-1,t.day??1,t.hour??0,t.minute??0);return!0===a&&r<n?0:r-n}function updateRelative(e,t,a=!1){let n=copyTimestamp(e),r=getDayIdentifier(t),o=getDayIdentifier(n),u=r===o;return n.hasTime&&a&&u&&(r=getTimeIdentifier(t),o=getTimeIdentifier(n),u=r===o),n.past=o<r,n.current=u,n.future=o>r,n.currentWeekday=n.weekday===t.weekday,n}function updateMinutes(e,t,a=null){let n=copyTimestamp(e);return n.hasTime=!0,n.hour=Math.floor(t/TIME_CONSTANTS.MINUTES_IN.HOUR),n.minute=t%TIME_CONSTANTS.MINUTES_IN.HOUR,n.time=getTime(n),a&&(n=updateRelative(n,a,!0)),n}function updateWeekday(e){let t=copyTimestamp(e);return t.weekday=getWeekday(t),t}function updateDayOfYear(e){let t=copyTimestamp(e);return t.doy=getDayOfYear(t)||0,t}function updateWorkWeek(e){let t=copyTimestamp(e);return t.workweek=getWorkWeek(t),t}function updateDisabled(e,t,a,n,r){let o=copyTimestamp(e);const u=getDayIdentifier(o);if(void 0!==t){const l=parsed(t);if(l){const c=getDayIdentifier(l);u<=c&&(o.disabled=!0)}}if(!0!==o.disabled&&void 0!==a){const m=parsed(a);if(m){const v=getDayIdentifier(m);u>=v&&(o.disabled=!0)}}if(!0!==o.disabled&&Array.isArray(n)&&n.length>0)for(var i in n)if(n[i]===o.weekday){o.disabled=!0;break}if(!0!==o.disabled&&Array.isArray(r)&&r.length>0)for(var s in r)if(Array.isArray(r[s])&&2===r[s].length&&r[s][0]&&r[s][1]){const p=parsed(r[s][0]),y=parsed(r[s][1]);if(p&&y&&isBetweenDates(o,p,y)){o.disabled=!0;break}}else{const f=r[s];if(Array.isArray(f))for(var d of f){const h=parseTimestamp(d);if(h){const g=getDayIdentifier(h);if(g===u){o.disabled=!0;break}}}else if(f){const T=parseTimestamp(f);if(T){const D=getDayIdentifier(T);D===u&&(o.disabled=!0)}}}return o}function updateFormatted(e){let t=copyTimestamp(e);return t.hasTime=!0,t.time=getTime(t),t.date=getDate(t),t.weekday=getWeekday(t),t.doy=getDayOfYear(t)||0,t.workweek=getWorkWeek(t),t}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){let t=copyTimestamp(e);if(0===t.year){const r=parseTimestamp(today());r&&(t=r)}const a=new Date(Date.UTC(t.year,t.month-1,t.day)),n=4;a.setUTCDate(a.getUTCDate()-(a.getUTCDay()+6)%7+n),a.setUTCDate(a.getUTCDate()+n-(a.getUTCDay()||7));e=new Date(Date.UTC(a.getUTCFullYear(),0,1)),e=Math.ceil(((a.valueOf()-e.valueOf())/864e5+1)/7);return e}function getWeekday(e){let t=e.weekday;if(e.hasDay){const a=Math.floor,n=e.day,r=(e.month+9)%MONTH_MAX+1,o=a(e.year/100),u=e.year%100-(e.month<=2?1:0);t=((n+a(2.6*r-.2)-2*o+u+a(u/4)+a(o/4))%7+7)%7}return t??0}function copyTimestamp(e){return{...e}}function getDate(e){let 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):"00:00")}function moveRelativeDays(e,t=nextDay,a=1,n=[0,1,2,3,4,5,6]){const r=copyTimestamp(e);return relativeDays(r,t,a,n)}function relativeDays(e,t=nextDay,a=1,n=[0,1,2,3,4,5,6]){let r=copyTimestamp(e);n.includes(Number(r.weekday))||0!==r.weekday||t!==nextDay||++a;while(--a>=0)r=t(r),n.length<7&&!n.includes(Number(r.weekday))&&++a;return r}function findWeekday(e,t,a=nextDay,n=6){let r=copyTimestamp(e);while(r.weekday!==t&&--n>=0)r=a(r);return r}function createDayList(e,t,a,n=[0,1,2,3,4,5,6],r=void 0,o=void 0,u=[],i=[],s=42,d=0){const l=getDayIdentifier(e),c=getDayIdentifier(t),m=[];let v=copyTimestamp(e),p=0,y=p===c;if(!(c<l))while((!y||m.length<d)&&m.length<s){if(p=getDayIdentifier(v),y=y||p>c&&m.length>=d,y)break;if(n.includes(Number(v.weekday))){let e=copyTimestamp(v);e=updateFormatted(e),e=updateRelative(e,a),e=updateDisabled(e,r,o,u,i),m.push(e)}v=relativeDays(v,nextDay)}return m}function createIntervalList(t,a,n,r,o){const u=[];for(let e=0;e<r;++e){const i=(a+e)*n,s=copyTimestamp(t);u.push(updateMinutes(s,i,o))}return u}function createNativeLocaleFormatter(n,r){const e=()=>"";return"undefined"===typeof Intl||"undefined"===typeof Intl.DateTimeFormat?e:(t,e)=>{try{const a=new Intl.DateTimeFormat(n||void 0,r(t,e));return a.format(makeDateTime(t))}catch(e){return console.error(`Intl.DateTimeFormat: ${e.message} -> `+getDateTime(t)),""}}}function makeDate(e,t=!0){return t?new Date(Date.UTC(e.year,e.month-1,e.day,0,0)):new Date(e.year,e.month-1,e.day,0,0)}function makeDateTime(e,t=!0){return t?new Date(Date.UTC(e.year,e.month-1,e.day,e.hour,e.minute)):new Date(e.year,e.month-1,e.day,e.hour,e.minute)}function validateNumber(e){return isFinite(Number(e))}function maxTimestamp(e,t=!1){const a=!0===t?getDayTimeIdentifier:getDayIdentifier;return e.reduce((e,t)=>{return Math.max(a(e),a(t))===a(e)?e:t})}function minTimestamp(e,t=!1){const a=!0===t?getDayTimeIdentifier:getDayIdentifier;return e.reduce((e,t)=>{return Math.min(a(e),a(t))===a(e)?e:t})}function isBetweenDates(e,t,a,n=!1){const r=getDayIdentifier(e)+(!0===n?getTimeIdentifier(e):0),o=getDayIdentifier(t)+(!0===n?getTimeIdentifier(t):0),u=getDayIdentifier(a)+(!0===n?getTimeIdentifier(a):0);return r>=o&&r<=u}function isOverlappingDates(e,t,a,n){const r=getDayIdentifier(e),o=getDayIdentifier(t),u=getDayIdentifier(a),i=getDayIdentifier(n);return r>=u&&r<=i||o>=u&&o<=i||u>=r&&o>=i}function addToDate(e,t){const a=copyTimestamp(e);return t.year&&(a.year+=t.year),t.month&&(a.month+=t.month),t.day&&(a.day+=t.day),t.hour&&(a.hour+=t.hour),t.minute&&(a.minute+=t.minute),updateFormatted(normalizeTimestamp(a))}function normalizeTimestamp(e){const t=new Date(e.year,e.month-1,e.day,e.hour,e.minute);return{...e,year:t.getFullYear(),month:t.getMonth()+1,day:t.getDate(),hour:t.getHours(),minute:t.getMinutes()}}function daysBetween(e,t){const a=diffTimestamp(e,t,!0);return Math.floor(a/TIME_CONSTANTS.MILLISECONDS_IN.DAY)}function weeksBetween(e,t){let a=copyTimestamp(e),n=copyTimestamp(t);return a=findWeekday(a,0),n=findWeekday(n,6),Math.ceil(daysBetween(a,n)/TIME_CONSTANTS.DAYS_IN.WEEK)}const weekdayDateMap={Sun:new Date("2020-01-05T00:00:00.000Z"),Mon:new Date("2020-01-06T00:00:00.000Z"),Tue:new Date("2020-01-07T00:00:00.000Z"),Wed:new Date("2020-01-08T00:00:00.000Z"),Thu:new Date("2020-01-09T00:00:00.000Z"),Fri:new Date("2020-01-10T00:00:00.000Z"),Sat:new Date("2020-01-11T00:00:00.000Z")};function getWeekdayFormatter(){const e=()=>"",r={long:{timeZone:"UTC",weekday:"long"},short:{timeZone:"UTC",weekday:"short"},narrow:{timeZone:"UTC",weekday:"narrow"}};return"undefined"===typeof Intl||"undefined"===typeof Intl.DateTimeFormat?e:t;function t(t,e,a){try{const n=new Intl.DateTimeFormat(a||void 0,r[e]||r["long"]);return n.format(weekdayDateMap[t])}catch(e){return e instanceof Error&&console.error(`Intl.DateTimeFormat: ${e.message} -> day of week: `+t),""}}}function getWeekdayNames(t,a){const e=Object.keys(weekdayDateMap),n=getWeekdayFormatter();return e.map(e=>String(n(e,t,a)))}function getMonthFormatter(){const e=()=>"",o={long:{timeZone:"UTC",month:"long"},short:{timeZone:"UTC",month:"short"},narrow:{timeZone:"UTC",month:"narrow"}};return"undefined"===typeof Intl||"undefined"===typeof Intl.DateTimeFormat?e:t;function t(t,e,a){try{const n=new Intl.DateTimeFormat(a||void 0,o[e]||o["long"]),r=new Date;return r.setDate(1),r.setMonth(t),n.format(r)}catch(e){return e instanceof Error&&console.error(`Intl.DateTimeFormat: ${e.message} -> month: `+t),""}}}function getMonthNames(t,a){const n=getMonthFormatter();return[...Array(12).keys()].map(e=>n(e,t,a))}function convertToUnit(e,t="px"){if(e)return isNaN(e)?String(e):"auto"===e?e:""+Number(e)+t}function indexOf(t,a){for(let e=0;e<t.length;e++)if(!0===a(t[e],e))return e;return-1}function minCharWidth(e,t){return 0===t?e:e.slice(0,t)}const ResizeObserverDirective={mounted(e,t){if("function"===typeof t.value){const a=t.value,n={callback:a,size:{width:0,height:0},observer:new ResizeObserver(e=>{const t=e[0].contentRect;t.width===n.size.width&&t.height===n.size.height||(n.size.width=t.width,n.size.height=t.height,n.debounceTimeout&&clearTimeout(n.debounceTimeout),n.debounceTimeout=setTimeout(()=>{n.callback(n.size),n.debounceTimeout=void 0},100))})};n.observer.observe(e),e.__onResizeObserver=n}},beforeUnmount(e){if(e.__onResizeObserver){const{observer:t,debounceTimeout:a}=e.__onResizeObserver;a&&clearTimeout(a),t.unobserve(e),delete e.__onResizeObserver}}};function useCalendar(t,a,{scrollArea:e,pane:n}){if(!a){const l="[error: renderCalendar] no renderFunc has been supplied to useCalendar";throw console.error(l),new Error(l)}const r=vue.reactive({width:0,height:0}),o=vue.ref(null);function u({width:e,height:t}){r.width=e,r.height=t}const i=vue.computed(()=>{return!0!==t.noScroll&&e.value&&n.value&&r.height?e.value.offsetWidth-n.value.offsetWidth:0});function s(){}function d(){const e={ref:o,role:"complementary",lang:t.locale,class:`q-calendar ${t.dark?"q-calendar--dark":""} `+(t.bordered?"q-calendar__bordered":"")};return vue.withDirectives(vue.h("div",{...e},[a()]),[[ResizeObserverDirective,u]])}return{rootRef:o,scrollWidth:i,__initCalendar:s,__renderCalendar:d}}const isValidFocusType=e=>e.every(e=>["day","date","weekday","interval","time","resource","task"].includes(e)),useCommonProps={modelValue:{type:String,default:today(),validator:e=>""===e||validateTimestamp(e)},weekdays:{type:Array,default:()=>[0,1,2,3,4,5,6]},dateType:{type:String,default:"round",validator:e=>["round","rounded","square"].includes(e)},weekdayAlign:{type:String,default:"center",validator:e=>["left","center","right"].includes(e)},dateAlign:{type:String,default:"center",validator:e=>["left","center","right"].includes(e)},bordered:Boolean,dark:Boolean,noAria:Boolean,noActiveDate:Boolean,noHeader:Boolean,noScroll:Boolean,shortWeekdayLabel:Boolean,noDefaultHeaderText:Boolean,noDefaultHeaderBtn:Boolean,minWeekdayLabel:{type:[Number,String],default:1},weekdayBreakpoints:{type:Array,default:()=>[75,35],validator:e=>2===e.length},locale:{type:String,default:"en-US"},animated:Boolean,transitionPrev:{type:String,default:"slide-right"},transitionNext:{type:String,default:"slide-left"},disabledDays:Array,disabledBefore:String,disabledAfter:String,disabledWeekdays:{type:Array,default:()=>[]},dragEnterFunc:Function,dragOverFunc:Function,dragLeaveFunc:Function,dropFunc:Function,selectedDates:{type:[Array,Set],default:()=>[]},selectedStartEndDates:{type:Array,default:()=>[]},hoverable:Boolean,focusable:Boolean,focusType:{type:Array,default:()=>["date"],validator:isValidFocusType}};function useCommon(t,{startDate:e,endDate:a,times:n}){const r=vue.computed(()=>parseTimestamp(e.value)),o=vue.computed(()=>{return"0000-00-00"===a.value?getEndOfWeek(r.value,t.weekdays,n.today):parseTimestamp(a.value)||r.value}),u=vue.computed(()=>createNativeLocaleFormatter(t.locale,()=>({timeZone:"UTC",day:"numeric"}))),i=vue.computed(()=>createNativeLocaleFormatter(t.locale,(e,t)=>({timeZone:"UTC",weekday:t?"short":"long"}))),s=vue.computed(()=>createNativeLocaleFormatter(t.locale,()=>({timeZone:"UTC",dateStyle:"full"})));function d(e,t){return e&&e.length>0&&e.includes(t.date)}function l(e,t){const a={firstDay:!1,betweenDays:!1,lastDay:!1};if(2===e.length){const n=getDayIdentifier(t),r=getDayIdentifier(parsed(e[0])),o=getDayIdentifier(parsed(e[1]));a.firstDay=r===n,a.lastDay=o===n,a.betweenDays=r<n&&o>n}return a}function c(e,t=!1,a=[],n=[],r=!1){const o=d(a,e),{firstDay:u,lastDay:i,betweenDays:s}=l(n,e);return{"q-past-day":!u&&!s&&!i&&!o&&!t&&!!e.past,"q-future-day":!u&&!s&&!i&&!o&&!t&&!!e.future,"q-outside":t,"q-current-day":!!e.current,"q-selected":o,"q-range-first":u,"q-range":s,"q-range-last":i,"q-range-hover":r&&(u||i||s),"q-disabled-day disabled":!0===e.disabled}}function m(e){return getStartOfWeek(e,t.weekdays,n.today)}function v(e){return getEndOfWeek(e,t.weekdays,n.today)}function p(){return{}}return{parsedStart:r,parsedEnd:o,dayFormatter:u,weekdayFormatter:i,ariaDateFormatter:s,arrayHasDate:d,checkDays:l,getRelativeClasses:c,startOfWeek:m,endOfWeek:v,dayStyleDefault:p}}function scrollTo(e,t){e instanceof Window?e.scrollTo({top:t,behavior:"instant"}):e.scrollTop=t}function getVerticalScrollPosition(e){return e instanceof Window?e.scrollY:e.scrollTop}function animVerticalScrollTo(o,u,i=500,s=performance.now(),d=getVerticalScrollPosition(o)){i<=0||d===u?scrollTo(o,u):requestAnimationFrame(e=>{const t=e-s,a=Math.min(t/i,1),n=e=>e<.5?2*e*e:(4-2*e)*e-1,r=d+(u-d)*n(a);scrollTo(o,r),a<1&&animVerticalScrollTo(o,u,i,s,d)})}function animHorizontalScrollTo(r,e,o=500){const u=r.scrollLeft,i=e-u;let s=null;function d(e){null===s&&(s=e);const t=e-s,a=Math.min(t/o,1),n=e=>e<.5?2*e*e:(4-2*e)*e-1;r.scrollLeft=u+i*n(a),t<o&&requestAnimationFrame(d)}requestAnimationFrame(d)}const useIntervalProps={view:{type:String,validator:e=>["day","week","month","month-interval"].includes(e),default:"day"},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},intervalClass:{type:Function,default:null},weekdayStyle:{type:Function,default:null},weekdayClass:{type:Function,default:null},showIntervalLabel:{type:Function,default:null},hour24Format:Boolean,timeClicksClamped:Boolean,dateHeader:{type:String,default:"stacked",validator:e=>["stacked","inline","inverted"].includes(e)}},useResourceProps={modelResources:{type:Array},resourceKey:{type:String,default:"id"},resourceLabel:{type:String,default:"label"},resourceHeight:{type:[Number,String],default:0,validator:validateNumber},resourceMinHeight:{type:[Number,String],default:70,validator:validateNumber},resourceStyle:{type:Function,default:null},resourceClass:{type:Function,default:null},cellWidth:{type:[Number,String],default:100},intervalHeaderHeight:{type:[Number,String],default:20,validator:validateNumber},noSticky:Boolean};function useInterval(o,{times:t,scrollArea:n,parsedStart:e,parsedEnd:a,maxDays:r,size:u,headerColumnRef:i}){const s=vue.computed(()=>parseInt(String(o.intervalStart),10)),m=vue.computed(()=>parseInt(String(o.intervalMinutes),10)),d=vue.computed(()=>parseInt(String(o.intervalCount),10)),v=vue.computed(()=>parseFloat(String(o.intervalHeight))),p=vue.computed(()=>{let e=0;const t=Number(o.columnCount);return o.cellWidth?e=Number(o.cellWidth):u.width>0&&i.value&&(e=i.value.offsetWidth/(t>1?t:r.value)),e}),l=vue.computed(()=>s.value*m.value),c=vue.computed(()=>d.value*v.value),y=vue.computed(()=>d.value*p.value),f=vue.computed(()=>D(e.value)),h=vue.computed(()=>w(a.value)),g=vue.computed(()=>{return createDayList(e.value,a.value,t.today,o.weekdays,o.disabledBefore,o.disabledAfter,o.disabledWeekdays,o.disabledDays,r.value)}),T=vue.computed(()=>{return g.value.map(e=>createIntervalList(e,s.value,m.value,d.value,t.now))});function D(e){return getStartOfWeek(e,o.weekdays,t.today)}function w(e){return getEndOfWeek(e,o.weekdays,t.today)}function k(e,t){return e&&e.length>0&&e.includes(getDateTime(t))}function b(e,t){const a={firstDay:!1,betweenDays:!1,lastDay:!1};if(e&&2===e.length){const n=getDayTimeIdentifier(t),r=getDayTimeIdentifier(parsed(e[0])),o=getDayTimeIdentifier(parsed(e[1]));a.firstDay=r===n,a.lastDay=o===n,a.betweenDays=r<n&&o>n}return a}function I(e,t=[],a=[]){const n=k(t,e),{firstDay:r,lastDay:o,betweenDays:u}=b(a,e);return{"q-selected":n,"q-range-first":!0===r,"q-range":!0===u,"q-range-last":!0===o,"q-disabled-interval disabled":!0===e.disabled}}function M(e,t,a){return[]}const N=vue.computed(()=>{const a={timeZone:"UTC",hour12:!o.hour24Format,hour:"2-digit",minute:"2-digit"},n={timeZone:"UTC",hour12:!o.hour24Format,hour:"numeric",minute:"2-digit"},r={timeZone:"UTC",hour12:!o.hour24Format,hour:"numeric"};return createNativeLocaleFormatter(o.locale,(e,t)=>t?0===e.minute?r:n:a)}),S=vue.computed(()=>{const e={timeZone:"UTC",dateStyle:"full",timeStyle:"short"};return createNativeLocaleFormatter(o.locale,()=>e)});function _(e){const t=T.value[0][0],a=t.hour===e.hour&&t.minute===e.minute;return!a&&0===e.minute}function x(e){}function E(e){return{}}function F(e,t,a=!1,n){let r=copyTimestamp(t);if(e.currentTarget){const o=e.currentTarget.getBoundingClientRect(),u=e,i=e,s=u.changedTouches||u.touches,d=(s&&s[0]?s[0]:i).clientY,l=(d-o.top)/v.value,c=Math.floor((a?Math.floor(l):l)*m.value);0!==c&&(r=addToDate(r,{minute:c})),n&&(r=updateRelative(r,n,!0))}return r}function R(e,t,a=!1,n){let r=copyTimestamp(t);const o=e.currentTarget.getBoundingClientRect(),u=e,i=e,s=u.changedTouches||u.touches,d=(s&&s[0]?s[0]:i).clientY,l=(d-o.top)/v.value,c=Math.floor((a?Math.floor(l):l)*m.value);return 0!==c&&(r=addToDate(r,{minute:c})),n&&(r=updateRelative(r,n,!0)),r}function H(e,t,a=!1,n){let r=copyTimestamp(t);if(e.currentTarget){const o=e.currentTarget.getBoundingClientRect(),u=e,i=e,s=u.changedTouches||u.touches,d=(s&&s[0]?s[0]:i).clientX,l=(d-o.left)/p.value,c=Math.floor((a?Math.floor(l):l)*m.value);0!==c&&(r=addToDate(r,{minute:c})),n&&(r=updateRelative(r,n,!0))}return r}function U(e,t){const a={timestamp:e,timeStartPos:A,timeDurationHeight:C};return void 0!==t&&(a.columnIndex=t),a}function L(e,t){const a={timestamp:copyTimestamp(e),timeStartPosX:W,timeDurationWidth:O};return void 0!==t&&(a.index=t),a}function q(e,t=0){const a=A(e);return!(!1===a||!n.value)&&(animVerticalScrollTo(n.value,a,t),!0)}function P(e,t=0){const a=W(e);return!(!1===a||!n.value)&&(animHorizontalScrollTo(n.value,a,t),!0)}function C(e){return e/m.value*v.value}function O(e){return e/m.value*p.value}function Y(e){return e*m.value/v.value}function B(e){return e*m.value/p.value}function A(e,t=!0){const a=parseTime(e);if(!1===a)return!1;const n=l.value,r=d.value*m.value,o=(a-n)/r;let u=o*c.value;return t&&(u<0&&(u=0),u>c.value)&&(u=c.value),u}function W(e,t=!0){const a=parseTime(e);if(!1===a)return!1;const n=l.value,r=d.value*m.value,o=(a-n)/r;let u=o*y.value;return t&&(u<0&&(u=0),u>y.value)&&(u=y.value),u}return{parsedIntervalStart:s,parsedIntervalMinutes:m,parsedIntervalCount:d,parsedIntervalHeight:v,parsedCellWidth:p,parsedStartMinute:l,bodyHeight:c,bodyWidth:y,parsedWeekStart:f,parsedWeekEnd:h,days:g,intervals:T,intervalFormatter:N,ariaDateTimeFormatter:S,arrayHasDateTime:k,checkIntervals:b,getIntervalClasses:I,getResourceClasses:M,showIntervalLabelDefault:_,showResourceLabelDefault:x,styleDefault:E,getTimestampAtEventInterval:F,getTimestampAtEvent:R,getTimestampAtEventX:H,getScopeForSlot:U,getScopeForSlotX:L,scrollToTime:q,scrollToTimeX:P,timeDurationHeight:C,timeDurationWidth:O,heightToMinutes:Y,widthToMinutes:B,timeStartPos:A,timeStartPosX:W}}const useColumnProps={columnCount:{type:[Number,String],default:0,validator:validateNumber},columnIndexStart:{type:[Number,String],default:0,validator:validateNumber}},useMaxDaysProps={maxDays:{type:Number,default:1}},useTimesProps={now:{type:String,validator:e=>""===e||validateTimestamp(e),default:""}};function useTimes(e){const t=vue.reactive({now:parseTimestamp("0000-00-00 00:00"),today:parseTimestamp("0000-00-00")}),a=vue.computed(()=>e.now?parseTimestamp(e.now):o());function n(){t.now&&t.today&&(t.now.current=t.today.current=!0,t.now.past=t.today.past=!1,t.now.future=t.today.future=!1)}function r(){const e=a.value||o();u(e,t.now),i(e,t.now),u(e,t.today)}function o(){return parseDate(new Date)}function u(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)}function i(e,t){e.time!==t.time&&(t.hour=e.hour,t.minute=e.minute,t.time=e.time)}return vue.watch(a,()=>r()),{times:t,parsedNow:a,setCurrent:n,updateCurrent:r,getNow:o,updateDay:u,updateTime:i}}function useRenderValues(r,{parsedView:o,parsedValue:u,times:i}){const e=vue.computed(()=>{const e=u.value;let t=r.maxDays,a=e,n=e;switch(o.value){case"month":a=getStartOfMonth(e),n=getEndOfMonth(e),t=daysInMonth(a.year,a.month);break;case"week":case"week-agenda":case"week-scheduler":a=getStartOfWeek(e,r.weekdays,i.today),n=getEndOfWeek(a,r.weekdays,i.today),t=r.weekdays.length;break;case"day":case"scheduler":case"agenda":n=moveRelativeDays(copyTimestamp(n),nextDay,t>1?t-1:t,r.weekdays),n=updateFormatted(n);break;case"month-interval":case"month-scheduler":case"month-agenda":a=getStartOfMonth(e),n=getEndOfMonth(e),n=updateFormatted(n),t=daysInMonth(a.year,a.month);break;case"resource":t=1,n=moveRelativeDays(copyTimestamp(n),nextDay,t,r.weekdays),n=updateFormatted(n);break}return{start:a,end:n,maxDays:t}});return{renderValues:e}}const toCamelCase=e=>e.replace(/(-\w)/g,e=>e[1].toUpperCase());function getMouseEventHandlers(t,e,a,n){const r={};for(const o in a){const u=a[o],i=toCamelCase("on-"+o);if(!e.value)return console.warn("$listeners has not been set up"),{};if(void 0!==e.value[i]){const s="on"+u.event.charAt(0).toUpperCase()+u.event.slice(1),d=e=>{return(void 0===u.button||"buttons"in e&&e.buttons>0&&e.button===u.button)&&(u.prevent&&e.preventDefault(),u.stop&&e.stopPropagation(),t(o,n(e,o))),u.result};s in r?Array.isArray(r[s])?r[s].push(d):r[s]=[r[s],d]:r[s]=d}}return r}function getDefaultMouseEventHandlers(e,t,a,n){return getMouseEventHandlers(e,t,getMouseEventName(a),n)}function getMouseEventName(e){return{["click"+e]:{event:"click"},["contextmenu"+e]:{event:"contextmenu",prevent:!0,result:!1},["mousedown"+e]:{event:"mousedown"},["mousemove"+e]:{event:"mousemove"},["mouseup"+e]:{event:"mouseup"},["mouseenter"+e]:{event:"mouseenter"},["mouseleave"+e]:{event:"mouseleave"},["touchstart"+e]:{event:"touchstart"},["touchmove"+e]:{event:"touchmove"},["touchend"+e]:{event:"touchend"}}}function getRawMouseEvents(e){return Object.keys(getMouseEventName(e))}function useMouseEvents(a,n){return{getMouseEventHandlers:(e,t)=>getMouseEventHandlers(a,n,e,t),getDefaultMouseEventHandlers:(e,t)=>getDefaultMouseEventHandlers(a,n,e,t),getMouseEventName:getMouseEventName,getRawMouseEvents:getRawMouseEvents}}const useMoveEmits=["moved"];function useMove(s,{parsedView:d,parsedValue:l,direction:c,maxDays:m,times:v,emittedValue:p,emit:y}){function e(a=1){if(0===a)p.value=today();else{let e=copyTimestamp(l.value);const n=getEndOfMonth(e),r=a>0,o=r?nextDay:prevDay,u=r?n.day:1;let t=r?a:-a;c.value=r?"next":"prev";const i=s.weekdays.length;while(--t>=0)switch(d.value){case"month":e.day=u,e=o(e),e=updateWeekday(e);while(!s.weekdays.includes(Number(e.weekday)))e=addToDate(e,{day:r?1:-1});break;case"week":case"week-agenda":case"week-scheduler":e=relativeDays(e,o,i,s.weekdays);break;case"day":case"scheduler":case"agenda":e=relativeDays(e,o,m.value,s.weekdays);break;case"month-interval":case"month-agenda":case"month-scheduler":e.day=u,e=o(e);break;case"resource":e=relativeDays(e,o,m.value,s.weekdays);break}e=updateWeekday(e),e=updateFormatted(e),e=updateDayOfYear(e),e=updateRelative(e,v.now),p.value=e.date,y("moved",e)}}return{move:e}}const listenerRE=/^on[A-Z]/;function useEmitListeners(e=vue.getCurrentInstance()){return{emitListeners:vue.computed(()=>{const t={};return e?.vnode?.props&&Object.keys(e.vnode.props).forEach(e=>{listenerRE.test(e)&&(t[e]=!0)}),t})}}function useFocusHelper(){const e={"aria-hidden":"true",class:"q-calendar__focus-helper"};return[vue.h("span",e)]}const useCheckChangeEmits=["change"];function useCheckChange(n,{days:r,lastStart:o,lastEnd:u}){function e(){const e=r.value;if(0===e.length)return!1;const t=e[0].date,a=e[e.length-1].date;return(!o.value||!u.value||t!==o.value||a!==u.value)&&(o.value=t,u.value=a,n("change",{start:t,end:a,days:e}),!0)}return{checkChange:e}}function useEventUtils(){function e(e,t){return(Array.isArray(t)?t:[t]).includes(e.keyCode)}return{isKeyCode:e}}const isKeyCode=useEventUtils().isKeyCode,useNavigationProps={useNavigation:Boolean};function useNavigation(t,{rootRef:a,focusRef:n,focusValue:r,datesRef:o,parsedView:u,emittedValue:i,direction:s,times:d}){let e=!1;function l(){e||document&&(e=!0,document.addEventListener("keyup",y),document.addEventListener("keydown",p))}function c(){document&&(document.removeEventListener("keyup",y),document.removeEventListener("keydown",p),e=!1)}function m(e){if(e&&document){const t=document.activeElement;if(t!==document.body&&a.value?.contains(t))return!0}return!1}function v(){let t=0;const a=window.setInterval(()=>{const e=o.value[n.value];e&&(e.focus(),50!==++t)&&document.activeElement!==e||window.clearInterval(a)},250)}function p(e){m(e)&&isKeyCode(e,[33,34,35,36,37,38,39,40])&&(e.stopPropagation(),e.preventDefault())}function y(e){if(m(e)&&isKeyCode(e,[33,34,35,36,37,38,39,40])){const t={33:D,34:w,35:b,36:k,37:g,38:f,39:T,40:h};t[e.keyCode]?.()}}function f(){let e=copyTimestamp(r.value);if("month"===u.value){if(e=addToDate(e,{day:-7}),r.value.month!==e.month)return s.value="prev",void(i.value=e.date)}else e=addToDate(e,{minute:Number(t.intervalMinutes)});s.value="prev",n.value=e.date}function h(){let e=copyTimestamp(r.value);if("month"===u.value){if(e=addToDate(e,{day:7}),r.value.month!==e.month)return s.value="next",void(i.value=e.date)}else e=addToDate(e,{minute:Number(t.intervalMinutes)});s.value="next",n.value=e.date}function g(){let e=copyTimestamp(r.value);s.value="prev";do{e=addToDate(e,{day:-1})}while(!t.weekdays.includes(Number(e.weekday)));n.value=e.date}function T(){let e=copyTimestamp(r.value);s.value="next";do{e=addToDate(e,{day:1})}while(!t.weekdays.includes(Number(e.weekday)));n.value=e.date}function D(){let e=copyTimestamp(r.value);e="month"===u.value?addToDate(e,{month:-1}):addToDate(e,{day:-7}),s.value="prev",n.value=e.date}function w(){let e=copyTimestamp(r.value);e="month"===u.value?addToDate(e,{month:1}):addToDate(e,{day:7}),s.value="next",n.value=e.date}function k(){let e=copyTimestamp(r.value);e="month"===u.value?getStartOfMonth(e):getStartOfWeek(e,t.weekdays||[],d.today);while(!t.weekdays.includes(Number(e.weekday)))e=addToDate(e,{day:-1});n.value=e.date}function b(){let e=copyTimestamp(r.value);e="month"===u.value?getEndOfMonth(e):getEndOfWeek(e,t.weekdays||[],d.today);while(!t.weekdays.includes(Number(e.weekday)))e=addToDate(e,{day:-1});n.value=e.date}return vue.onBeforeUnmount(()=>{c()}),vue.watch(()=>t.useNavigation,e=>{(!0===e?l:c)()}),!0===t.useNavigation&&l(),{startNavigation:l,endNavigation:c,tryFocus:v}}var QCalendarResource=vue.defineComponent({name:"QCalendarResource",props:{...useCommonProps,...useResourceProps,...useIntervalProps,...useColumnProps,...useMaxDaysProps,...useTimesProps,...useNavigationProps},emits:["update:model-value","update:model-resources","resource-expanded",...useCheckChangeEmits,...useMoveEmits,...getRawMouseEvents("-date"),...getRawMouseEvents("-interval"),...getRawMouseEvents("-head-day"),...getRawMouseEvents("-time"),...getRawMouseEvents("-head-resources"),...getRawMouseEvents("-resource")],setup(v,{slots:p,emit:m,expose:R}){const e=vue.ref(null),H=vue.ref(null),U=vue.ref(null),t=vue.ref(null),y=vue.ref(v.modelValue||today()),a=vue.ref(parsed(v.modelValue||today())),f=vue.ref({}),h=vue.ref({}),u=vue.ref("next"),i=vue.ref(v.modelValue||today()),s=vue.ref("0000-00-00"),d=vue.ref(0),r=vue.ref(v.modelValue),l=vue.reactive({width:0,height:0}),g=vue.ref(""),T=vue.ref(""),D=vue.ref(""),L=vue.ref(null),q=vue.ref(null),n=(vue.watch(()=>v.view,()=>{d.value=0}),vue.computed(()=>{return"month"===v.view?"month-interval":v.view})),w=vue.computed(()=>{return parseInt(String(v.cellWidth),10)}),o=vue.getCurrentInstance();if(null===o)throw new Error("current instance is null");const k=useEmitListeners(o).emitListeners,{times:c,setCurrent:P,updateCurrent:b}=useTimes(v),{parsedStart:I,parsedEnd:Y,dayStyleDefault:M}=(b(),P(),useCommon(v,{startDate:i,endDate:s,times:c})),N=vue.computed(()=>{return parseTimestamp(v.modelValue,c.now)||I.value||c.today}),B=(a.value=N.value,y.value=N.value.date,useRenderValues(v,{parsedView:n,times:c,parsedValue:N})).renderValues,{rootRef:V,__renderCalendar:z}=useCalendar(v,ge,{scrollArea:e,pane:H}),{days:S,intervals:_,intervalFormatter:Z,styleDefault:X,scrollToTimeX:K,timeDurationWidth:x,timeStartPosX:E,widthToMinutes:$}=useInterval(v,{times:c,scrollArea:e,parsedStart:I,parsedEnd:Y,maxDays:d,size:l,headerColumnRef:t}),F=useMove(v,{parsedView:n,parsedValue:N,direction:u,maxDays:d,times:c,emittedValue:r,emit:m}).move,C=useMouseEvents(m,k).getDefaultMouseEventHandlers,j=useCheckChange(m,{days:S,lastStart:L,lastEnd:q}).checkChange,Q=useEventUtils().isKeyCode,G=useNavigation(v,{rootRef:V,focusRef:y,focusValue:a,datesRef:f,parsedView:n,emittedValue:r,direction:u,times:c}).tryFocus,O=vue.computed(()=>{const e=parseInt(String(v.resourceHeight),10);return 0===e?"auto":e}),A=vue.computed(()=>{return parseInt(String(v.resourceMinHeight),10)}),W=vue.computed(()=>{return parseInt(String(v.intervalHeaderHeight),10)});function J(){r.value=today()}function ee(e=1){F(e)}function te(e=1){F(-e)}function ae({width:e,height:t}){l.width=e,l.height=t}function ne(e){return e.date===r.value}function re(){const e={height:convertToUnit(W.value)};return vue.h("div",{ref:U,roll:"presentation",class:{"q-calendar-resource__head":!0,"q-calendar__sticky":!0!==v.noSticky},style:e},[oe(),ue()])}function oe(){const e=p["head-resources"],t=convertToUnit(W.value),a={timestamps:_,date:v.modelValue,resources:v.modelResources};return vue.h("div",{class:{"q-calendar-resource__head--resources":!0,"q-calendar__sticky":!0!==v.noSticky},style:{height:t},...C("-head-resources",e=>{return{scope:a,event:e}})},[e&&e({scope:a})])}function ue(){return vue.h("div",{ref:t,class:{"q-calendar-resource__head--intervals":!0}},[_.value.map(e=>e.map((e,t)=>ie(e,t)))])}function ie(e,t){const a=p["interval-label"],n=!0!==v.noActiveDate&&ne(e),r=convertToUnit(w.value),o=convertToUnit(W.value),u=v.shortIntervalLabel,i=Z.value(e,u),s={timestamp:e,index:t,label:i,droppable:g.value===i},d=v.intervalStyle||M,l={width:r,maxWidth:r,minWidth:r,height:o,...d({scope:s})},c="function"===typeof v.intervalClass?v.intervalClass({scope:s}):{},m=!0===v.focusable&&v.focusType.includes("interval");return vue.h("div",{key:i,tabindex:!0===m?0:-1,class:{"q-calendar-resource__head--interval":!0,...c,"q-active-date":n,"q-calendar__hoverable":!0===v.hoverable,"q-calendar__focusable":!0===m},style:l,onDragenter:e=>{void 0!==v.dragEnterFunc&&"function"===typeof v.dragEnterFunc&&(!0===v.dragEnterFunc(e,"interval",{scope:s})?g.value=i:g.value="")},onDragover:e=>{void 0!==v.dragOverFunc&&"function"===typeof v.dragOverFunc&&(!0===v.dragOverFunc(e,"interval",{scope:s})?g.value=i:g.value="")},onDragleave:e=>{void 0!==v.dragLeaveFunc&&"function"===typeof v.dragLeaveFunc&&(!0===v.dragLeaveFunc(e,"interval",{scope:s})?g.value=i:g.value="")},onDrop:e=>{void 0!==v.dropFunc&&"function"===typeof v.dropFunc&&(!0===v.dropFunc(e,"interval",{scope:s})?g.value=i:g.value="")},onFocus:()=>{!0===m&&(y.value=i)},...C("-interval",e=>{return{scope:s,event:e}})},[a?a({scope:s}):i,useFocusHelper()])}function se(){return vue.h("div",{class:"q-calendar-resource__body"},[de()])}function de(){return vue.h("div",{ref:e,class:{"q-calendar-resource__scroll-area":!0,"q-calendar__scroll":!0}},[ce()])}function le(){return vue.h("div",{},"No resources have been defined")}function ce(){return vue.h("div",{class:"q-calendar-resource__day--container"},[re(),void 0===v.modelResources&&le(),void 0!==v.modelResources&&me()])}function me(){const e={class:"q-calendar-resource__resources--body"};return vue.h("div",e,ve())}function ve(e=void 0,a=0,n=!0){return void 0===e&&(e=v.modelResources),e.map((e,t)=>{return pe(e,t,a,void 0!==e.children?e.expanded:n)}).filter(e=>!!e)}function pe(e,t,a=0,n=!0){const r={},o=(r.height="auto"===O.value?O.value:convertToUnit(O.value),A.value>0&&(r.minHeight=convertToUnit(A.value)),vue.h("div",{key:e[v.resourceKey]+"-"+t,class:{"q-calendar-resource__resource--row":!0},style:r},[ye(e,t,a,n),fe(e,t)]));return void 0!==e.children?[o,vue.h("div",{class:{"q-calendar__child":!0,"q-calendar__child--expanded":!0===n,"q-calendar__child--collapsed":!0!==n}},[ve(e.children,a+1,!1===n?n:e.expanded)])]:[o]}function ye(t,e,a=0,n=!0){const r=p["resource-label"],o={},u=(o.height=void 0!==t.height?convertToUnit(parseInt(t.height,10)):O.value?convertToUnit(O.value):"auto",A.value>0&&(o.minHeight=convertToUnit(A.value)),v.resourceStyle||X),i=t[v.resourceLabel],s=!0===v.focusable&&v.focusType.includes("resource")&&!0===n,d=t[v.resourceKey],l={resource:t,timestamps:_,resourceIndex:e,indentLevel:a,label:i,droppable:T.value===d},c="function"===typeof v.resourceClass?v.resourceClass({scope:l}):{};return vue.h("div",{key:t[v.resourceKey]+"-"+e,ref:e=>{e instanceof HTMLElement&&(h.value[t[v.resourceKey]]=e)},tabindex:!0===s?0:-1,class:{"q-calendar-resource__resource":0===a,"q-calendar-resource__resource--section":0!==a,...c,"q-calendar__sticky":!0!==v.noSticky,"q-calendar__hoverable":!0===v.hoverable,"q-calendar__focusable":!0===s},style:{...o,...u({scope:l})},onDragenter:e=>{void 0!==v.dragEnterFunc&&"function"===typeof v.dragEnterFunc&&(!0===v.dragEnterFunc(e,"resource",{scope:l})?T.value=d:T.value="")},onDragover:e=>{void 0!==v.dragOverFunc&&"function"===typeof v.dragOverFunc&&(!0===v.dragOverFunc(e,"resource",{scope:l})?T.value=d:T.value="")},onDragleave:e=>{void 0!==v.dragLeaveFunc&&"function"===typeof v.dragLeaveFunc&&(!0===v.dragLeaveFunc(e,"resource",{scope:l})?T.value=d:T.value="")},onDrop:e=>{void 0!==v.dropFunc&&"function"===typeof v.dropFunc&&(!0===v.dropFunc(e,"resource",{scope:l})?T.value=d:T.value="")},onKeydown:e=>{Q(e,[13,32])&&(e.stopPropagation(),e.preventDefault())},onKeyup:e=>{Q(e,[13,32])&&void 0!==k.value.onClickResource&&m("click-resource",{scope:l,event:e})},...C("-resource",e=>{return{scope:l,event:e}})},[[vue.h("div",{class:{"q-calendar__parent":void 0!==t.children,"q-calendar__parent--expanded":void 0!==t.children&&!0===t.expanded,"q-calendar__parent--collapsed":void 0!==t.children&&!0!==t.expanded},onClick:e=>{e.stopPropagation(),t.expanded=!t.expanded,m("resource-expanded",{expanded:t.expanded,scope:l})}}),vue.h("div",{class:{"q-calendar-resource__resource--text":!0,"q-calendar__ellipsis":!0},style:{paddingLeft:10*a+2+"px"}},[r?r({scope:l}):i]),useFocusHelper()]])}function fe(t,a){const e=p["resource-intervals"],n={resource:t,timestamps:_,resourceIndex:a,timeStartPosX:E,timeDurationWidth:x};return vue.h("div",{class:"q-calendar-resource__resource--intervals"},[_.value.map(e=>e.map(e=>he(t,e,a))),e&&e({scope:n})])}function he(t,e,a){const n=p["resource-interval"],r=!0!==v.noActiveDate&&ne(e),o=t[v.resourceKey],u=e.time+"-"+o,i=!0===v.focusable&&v.focusType.includes("time"),s={activeDate:r,resource:t,timestamp:e,resourceIndex:a,droppable:D.value===u},d=v.intervalStyle||M,l=convertToUnit(w.value),c={width:l,maxWidth:l,minWidth:l,...d({scope:s})};return c.height=void 0!==t.height?convertToUnit(parseInt(t.height,10)):"auto"===O.value?O.value:convertToUnit(O.value),A.value>0&&(c.minHeight=convertToUnit(A.value)),vue.h("div",{key:u,ref:e=>{e instanceof HTMLElement&&(f.value[t[v.resourceKey]]=e)},tabindex:!0===i?0:-1,class:{"q-calendar-resource__resource--interval":!0,"q-active-date":r,"q-calendar__hoverable":!0===v.hoverable,"q-calendar__focusable":!0===i},style:c,onDragenter:e=>{void 0!==v.dragEnterFunc&&"function"===typeof v.dragEnterFunc&&(!0===v.dragEnterFunc(e,"time",{scope:s})?D.value=u:D.value="")},onDragover:e=>{void 0!==v.dragOverFunc&&"function"===typeof v.dragOverFunc&&(!0===v.dragOverFunc(e,"time",{scope:s})?D.value=u:D.value="")},onDragleave:e=>{void 0!==v.dragLeaveFunc&&"function"===typeof v.dragLeaveFunc&&(!0===v.dragLeaveFunc(e,"time",{scope:s})?D.value=u:D.value="")},onDrop:e=>{void 0!==v.dropFunc&&"function"===typeof v.dropFunc&&(!0===v.dropFunc(e,"time",{scope:s})?D.value=u:D.value="")},onFocus:()=>{!0===i&&(y.value=u)},...C("-time",e=>{return{scope:s,event:e}})},[n&&n({scope:s}),useFocusHelper()])}function ge(){const{start:e,end:t,maxDays:a}=B.value,n=(i.value===e.date&&s.value===t.date&&d.value===a||(i.value=e.date,s.value=t.date,d.value=a),l.width>0),r=vue.withDirectives(vue.h("div",{class:"q-calendar-resource",key:i.value},[!0===n&&se()]),[[ResizeObserverDirective,ae]]);if(!0!==v.animated)return r;{const o="q-calendar--"+("prev"===u.value?v.transitionPrev:v.transitionNext);return vue.h(vue.Transition,{name:o,appear:!0},()=>r)}}return vue.watch([S],j,{deep:!0,immediate:!0}),vue.watch(()=>v.modelValue,(e,t)=>{if(r.value!==e){if(!0===v.animated){const a=getDayIdentifier(parsed(e)),n=getDayIdentifier(parsed(t));u.value=a>=n?"next":"prev"}r.value=e}y.value=e}),vue.watch(r,(e,t)=>{if(r.value!==v.modelValue){if(!0===v.animated){const a=getDayIdentifier(parsed(e)),n=getDayIdentifier(parsed(t));u.value=a>=n?"next":"prev"}m("update:model-value",e)}}),vue.watch(y,e=>{e&&(a.value=parseTimestamp(e))}),vue.watch(a,()=>{f.value[y.value]?f.value[y.value].focus():G()}),vue.onBeforeUpdate(()=>{f.value={},h.value={}}),vue.onMounted(()=>{}),R({prev:te,next:ee,move:F,moveToToday:J,updateCurrent:b,timeStartPosX:E,timeDurationWidth:x,widthToMinutes:$,scrollToTimeX:K}),()=>z()}});const version="4.1.0";exports.DAYS_IN_MONTH=DAYS_IN_MONTH,exports.DAYS_IN_MONTH_LEAP=DAYS_IN_MONTH_LEAP,exports.DAYS_IN_MONTH_MAX=DAYS_IN_MONTH_MAX,exports.DAYS_IN_MONTH_MIN=DAYS_IN_MONTH_MIN,exports.DAY_MIN=DAY_MIN,exports.FIRST_HOUR=FIRST_HOUR,exports.MONTH_MAX=MONTH_MAX,exports.MONTH_MIN=MONTH_MIN,exports.PARSE_DATE=PARSE_DATE,exports.PARSE_DATETIME=PARSE_DATETIME,exports.PARSE_TIME=PARSE_TIME,exports.QCalendarResource=QCalendarResource,exports.TIME_CONSTANTS=TIME_CONSTANTS,exports.addToDate=addToDate,exports.compareDate=compareDate,exports.compareDateTime=compareDateTime,exports.compareTime=compareTime,exports.compareTimestamps=compareTimestamps,exports.convertToUnit=convertToUnit,exports.copyTimestamp=copyTimestamp,exports.createDayList=createDayList,exports.createIntervalList=createIntervalList,exports.createNativeLocaleFormatter=createNativeLocaleFormatter,exports.daysBetween=daysBetween,exports.daysInMonth=daysInMonth,exports.diffTimestamp=diffTimestamp,exports.findWeekday=findWeekday,exports.getDate=getDate,exports.getDateTime=getDateTime,exports.getDayIdentifier=getDayIdentifier,exports.getDayOfYear=getDayOfYear,exports.getDayTimeIdentifier=getDayTimeIdentifier,exports.getEndOfMonth=getEndOfMonth,exports.getEndOfWeek=getEndOfWeek,exports.getMonthFormatter=getMonthFormatter,exports.getMonthNames=getMonthNames,exports.getStartOfMonth=getStartOfMonth,exports.getStartOfWeek=getStartOfWeek,exports.getTime=getTime,exports.getTimeIdentifier=getTimeIdentifier,exports.getWeekday=getWeekday,exports.getWeekdayFormatter=getWeekdayFormatter,exports.getWeekdayNames=getWeekdayNames,exports.getWorkWeek=getWorkWeek,exports.indexOf=indexOf,exports.isBetweenDates=isBetweenDates,exports.isLeapYear=isLeapYear,exports.isOverlappingDates=isOverlappingDates,exports.isToday=isToday,exports.makeDate=makeDate,exports.makeDateTime=makeDateTime,exports.maxTimestamp=maxTimestamp,exports.minCharWidth=minCharWidth,exports.minTimestamp=minTimestamp,exports.moveRelativeDays=moveRelativeDays,exports.nextDay=nextDay,exports.padNumber=padNumber,exports.parseDate=parseDate,exports.parseTime=parseTime,exports.parseTimestamp=parseTimestamp,exports.parsed=parsed,exports.prevDay=prevDay,exports.relativeDays=relativeDays,exports.today=today,exports.updateDayOfYear=updateDayOfYear,exports.updateDisabled=updateDisabled,exports.updateFormatted=updateFormatted,exports.updateMinutes=updateMinutes,exports.updateRelative=updateRelative,exports.updateWeekday=updateWeekday,exports.updateWorkWeek=updateWorkWeek,exports.validateNumber=validateNumber,exports.validateTimestamp=validateTimestamp,exports.version=version,exports.weeksBetween=weeksBetween; | ||
var vue=require("vue");const PARSE_DATETIME=/^(\d{4})-(\d{1,2})(-(\d{1,2}))?([^\d]+(\d{1,2}))?(:(\d{1,2}))?(:(\d{1,2}))?(.(\d{1,3}))?$/,PARSE_DATE=/^(\d{4})-(\d{1,2})(-(\d{1,2}))?/,PARSE_TIME=/(\d\d?)(:(\d\d?)|)(:(\d\d?)|)/,DAYS_IN_MONTH=[0,31,28,31,30,31,30,31,31,30,31,30,31],DAYS_IN_MONTH_LEAP=[0,31,29,31,30,31,30,31,31,30,31,30,31],TIME_CONSTANTS={MILLISECONDS_IN:{DAY:864e5},MINUTES_IN:{HOUR:60},DAYS_IN:{WEEK:7}},DAYS_IN_MONTH_MIN=28,DAYS_IN_MONTH_MAX=31,MONTH_MAX=12,MONTH_MIN=1,DAY_MIN=1,FIRST_HOUR=0;function validateTimestamp(e){return"string"===typeof e&&PARSE_DATETIME.test(e)}function parsed(e){if("string"!==typeof e)return null;const t=PARSE_DATETIME.exec(e);if(!t||!t[1]||!t[2])return null;const a=parseInt(t[1],10),n=parseInt(t[2],10),r=parseInt(t[4]||"1",10),o=parseInt(t[6]||"0",10),u=parseInt(t[8]||"0",10);return{date:e,time:o.toString().padStart(2,"0")+":"+u.toString().padStart(2,"0"),year:a,month:n,day:r,hour:o,minute:u,hasDay:!!t[4],hasTime:!0,past:!1,current:!1,future:!1,disabled:!1,weekday:0,doy:0,workweek:0}}function parseDate(e,t=!1){if(!(e instanceof Date))return null;const a=t?"UTC":"";return updateFormatted({date:padNumber(e[`get${a}FullYear`](),4)+"-"+padNumber(e[`get${a}Month`]()+1,2)+"-"+padNumber(e[`get${a}Date`](),2),time:padNumber(e[`get${a}Hours`]()||0,2)+":"+padNumber(e[`get${a}Minutes`]()||0,2),year:e[`get${a}FullYear`](),month:e[`get${a}Month`]()+1,day:e[`get${a}Date`](),hour:e[`get${a}Hours`](),minute:e[`get${a}Minutes`](),weekday:0,doy:0,workweek:0,hasDay:!0,hasTime:!0,past:!1,current:!1,future:!1,disabled:!1})}function padNumber(e,t){let a=String(e);while(a.length<t)a="0"+a;return a}function isLeapYear(e){return e%4===0&&e%100!==0||e%400===0}function daysInMonth(e,t){return(isLeapYear(e)?DAYS_IN_MONTH_LEAP:DAYS_IN_MONTH)[t]}function nextDay(e){const t=new Date(e.year,e.month-1,e.day+1);return updateFormatted(normalizeTimestamp({...e,year:t.getFullYear(),month:t.getMonth()+1,day:t.getDate()}))}function prevDay(e){const t=new Date(e.year,e.month-1,e.day-1);return updateFormatted(normalizeTimestamp({...e,year:t.getFullYear(),month:t.getMonth()+1,day:t.getDate()}))}function today(){const e=new Date,t=e.getMonth()+1,a=e.getDate(),n=e.getFullYear();return[n,padNumber(t,2),padNumber(a,2)].join("-")}function isToday(e){return e===today()}function getStartOfWeek(e,t,a){let n=copyTimestamp(e);if(t){if(1===n.day||0===n.weekday)while(!t.includes(Number(n.weekday)))n=nextDay(n);n=findWeekday(n,t[0],prevDay),n=updateFormatted(n),a&&(n=updateRelative(n,a,n.hasTime))}return n}function getEndOfWeek(e,t,a){let n=copyTimestamp(e);if(t&&Array.isArray(t)){const r=daysInMonth(n.year,n.month);if(r===n.day||n.weekday===t[t.length-1])while(!t.includes(Number(n.weekday)))n=prevDay(n);n=findWeekday(n,t[t.length-1],nextDay),n=updateFormatted(n),a&&(n=updateRelative(n,a,n.hasTime))}return n}function getStartOfMonth(e){let t=copyTimestamp(e);return t.day=DAY_MIN,t=updateFormatted(t),t}function getEndOfMonth(e){let t=copyTimestamp(e);return t.day=daysInMonth(t.year,t.month),t=updateFormatted(t),t}function parseTime(e){const t=Object.prototype.toString.call(e);switch(t){case"[object Number]":return e;case"[object String]":{const a=PARSE_TIME.exec(e);return a?60*parseInt(a[1],10)+parseInt(a[3]||"0",10):!1}case"[object Object]":return"object"!==typeof e||"number"!==typeof e.hour||"number"!==typeof e.minute?!1:"object"===typeof e&&"hour"in e&&"minute"in e&&60*e.hour+e.minute}return!1}function compareTimestamps(e,t){return!(!e||!t)&&e.year===t.year&&e.month===t.month&&e.day===t.day&&e.hour===t.hour&&e.minute===t.minute}function compareDate(e,t){return getDate(e)===getDate(t)}function compareTime(e,t){return getTime(e)===getTime(t)}function compareDateTime(e,t){return getDateTime(e)===getDateTime(t)}function parseTimestamp(e,t=null){let a=parsed(e);return a?(a=updateFormatted(a),t&&(a=updateRelative(a,t,a.hasTime)),a):null}function getDayIdentifier(e){return 1e8*(e.year??0)+1e6*(e.month??0)+1e4*(e.day??0)}function getTimeIdentifier(e){return 100*(e.hour??0)+(e.minute??0)}function getDayTimeIdentifier(e){return getDayIdentifier(e)+getTimeIdentifier(e)}function diffTimestamp(e,t,a=!1){const n=Date.UTC(e.year??0,(e.month??1)-1,e.day??1,e.hour??0,e.minute??0),r=Date.UTC(t.year??0,(t.month??1)-1,t.day??1,t.hour??0,t.minute??0);return!0===a&&r<n?0:r-n}function updateRelative(e,t,a=!1){let n=copyTimestamp(e),r=getDayIdentifier(t),o=getDayIdentifier(n),u=r===o;return n.hasTime&&a&&u&&(r=getTimeIdentifier(t),o=getTimeIdentifier(n),u=r===o),n.past=o<r,n.current=u,n.future=o>r,n.currentWeekday=n.weekday===t.weekday,n}function updateMinutes(e,t,a=null){let n=copyTimestamp(e);return n.hasTime=!0,n.hour=Math.floor(t/TIME_CONSTANTS.MINUTES_IN.HOUR),n.minute=t%TIME_CONSTANTS.MINUTES_IN.HOUR,n.time=getTime(n),a&&(n=updateRelative(n,a,!0)),n}function updateWeekday(e){let t=copyTimestamp(e);return t.weekday=getWeekday(t),t}function updateDayOfYear(e){let t=copyTimestamp(e);return t.doy=getDayOfYear(t)||0,t}function updateWorkWeek(e){let t=copyTimestamp(e);return t.workweek=getWorkWeek(t),t}function updateDisabled(e,t,a,n,r){let o=copyTimestamp(e);const u=getDayIdentifier(o);if(void 0!==t){const l=parsed(t);if(l){const c=getDayIdentifier(l);u<=c&&(o.disabled=!0)}}if(!0!==o.disabled&&void 0!==a){const m=parsed(a);if(m){const v=getDayIdentifier(m);u>=v&&(o.disabled=!0)}}if(!0!==o.disabled&&Array.isArray(n)&&n.length>0)for(var i in n)if(n[i]===o.weekday){o.disabled=!0;break}if(!0!==o.disabled&&Array.isArray(r)&&r.length>0)for(var s in r)if(Array.isArray(r[s])&&2===r[s].length&&r[s][0]&&r[s][1]){const p=parsed(r[s][0]),y=parsed(r[s][1]);if(p&&y&&isBetweenDates(o,p,y)){o.disabled=!0;break}}else{const f=r[s];if(Array.isArray(f))for(var d of f){const h=parseTimestamp(d);if(h){const g=getDayIdentifier(h);if(g===u){o.disabled=!0;break}}}else if(f){const T=parseTimestamp(f);if(T){const D=getDayIdentifier(T);D===u&&(o.disabled=!0)}}}return o}function updateFormatted(e){let t=copyTimestamp(e);return t.hasTime=!0,t.time=getTime(t),t.date=getDate(t),t.weekday=getWeekday(t),t.doy=getDayOfYear(t)||0,t.workweek=getWorkWeek(t),t}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){let t=copyTimestamp(e);if(0===t.year){const r=parseTimestamp(today());r&&(t=r)}const a=new Date(Date.UTC(t.year,t.month-1,t.day)),n=4;a.setUTCDate(a.getUTCDate()-(a.getUTCDay()+6)%7+n),a.setUTCDate(a.getUTCDate()+n-(a.getUTCDay()||7));e=new Date(Date.UTC(a.getUTCFullYear(),0,1)),e=Math.ceil(((a.valueOf()-e.valueOf())/864e5+1)/7);return e}function getWeekday(e){let t=e.weekday;if(e.hasDay){const a=Math.floor,n=e.day,r=(e.month+9)%MONTH_MAX+1,o=a(e.year/100),u=e.year%100-(e.month<=2?1:0);t=((n+a(2.6*r-.2)-2*o+u+a(u/4)+a(o/4))%7+7)%7}return t??0}function copyTimestamp(e){return{...e}}function getDate(e){let 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):"00:00")}function moveRelativeDays(e,t=nextDay,a=1,n=[0,1,2,3,4,5,6]){const r=copyTimestamp(e);return relativeDays(r,t,a,n)}function relativeDays(e,t=nextDay,a=1,n=[0,1,2,3,4,5,6]){let r=copyTimestamp(e);n.includes(Number(r.weekday))||0!==r.weekday||t!==nextDay||++a;while(--a>=0)r=t(r),n.length<7&&!n.includes(Number(r.weekday))&&++a;return r}function findWeekday(e,t,a=nextDay,n=6){let r=copyTimestamp(e);while(r.weekday!==t&&--n>=0)r=a(r);return r}function createDayList(e,t,a,n=[0,1,2,3,4,5,6],r=void 0,o=void 0,u=[],i=[],s=42,d=0){const l=getDayIdentifier(e),c=getDayIdentifier(t),m=[];let v=copyTimestamp(e),p=0,y=p===c;if(!(c<l))while((!y||m.length<d)&&m.length<s){if(p=getDayIdentifier(v),y=y||p>c&&m.length>=d,y)break;if(n.includes(Number(v.weekday))){let e=copyTimestamp(v);e=updateFormatted(e),e=updateRelative(e,a),e=updateDisabled(e,r,o,u,i),m.push(e)}v=relativeDays(v,nextDay)}return m}function createIntervalList(t,a,n,r,o){const u=[];for(let e=0;e<r;++e){const i=(a+e)*n,s=copyTimestamp(t);u.push(updateMinutes(s,i,o))}return u}function createNativeLocaleFormatter(n,r){const e=()=>"";return"undefined"===typeof Intl||"undefined"===typeof Intl.DateTimeFormat?e:(t,e)=>{try{const a=new Intl.DateTimeFormat(n||void 0,r(t,e));return a.format(makeDateTime(t))}catch(e){return console.error(`Intl.DateTimeFormat: ${e.message} -> `+getDateTime(t)),""}}}function makeDate(e,t=!0){return t?new Date(Date.UTC(e.year,e.month-1,e.day,0,0)):new Date(e.year,e.month-1,e.day,0,0)}function makeDateTime(e,t=!0){return t?new Date(Date.UTC(e.year,e.month-1,e.day,e.hour,e.minute)):new Date(e.year,e.month-1,e.day,e.hour,e.minute)}function validateNumber(e){return isFinite(Number(e))}function maxTimestamp(e,t=!1){const a=!0===t?getDayTimeIdentifier:getDayIdentifier;return e.reduce((e,t)=>{return Math.max(a(e),a(t))===a(e)?e:t})}function minTimestamp(e,t=!1){const a=!0===t?getDayTimeIdentifier:getDayIdentifier;return e.reduce((e,t)=>{return Math.min(a(e),a(t))===a(e)?e:t})}function isBetweenDates(e,t,a,n=!1){const r=getDayIdentifier(e)+(!0===n?getTimeIdentifier(e):0),o=getDayIdentifier(t)+(!0===n?getTimeIdentifier(t):0),u=getDayIdentifier(a)+(!0===n?getTimeIdentifier(a):0);return r>=o&&r<=u}function isOverlappingDates(e,t,a,n){const r=getDayIdentifier(e),o=getDayIdentifier(t),u=getDayIdentifier(a),i=getDayIdentifier(n);return r>=u&&r<=i||o>=u&&o<=i||u>=r&&o>=i}function addToDate(e,t){const a=copyTimestamp(e);return t.year&&(a.year+=t.year),t.month&&(a.month+=t.month),t.day&&(a.day+=t.day),t.hour&&(a.hour+=t.hour),t.minute&&(a.minute+=t.minute),updateFormatted(normalizeTimestamp(a))}function normalizeTimestamp(e){const t=new Date(e.year,e.month-1,e.day,e.hour,e.minute);return{...e,year:t.getFullYear(),month:t.getMonth()+1,day:t.getDate(),hour:t.getHours(),minute:t.getMinutes()}}function daysBetween(e,t){const a=diffTimestamp(e,t,!0);return Math.floor(a/TIME_CONSTANTS.MILLISECONDS_IN.DAY)}function weeksBetween(e,t){let a=copyTimestamp(e),n=copyTimestamp(t);return a=findWeekday(a,0),n=findWeekday(n,6),Math.ceil(daysBetween(a,n)/TIME_CONSTANTS.DAYS_IN.WEEK)}const weekdayDateMap={Sun:new Date("2020-01-05T00:00:00.000Z"),Mon:new Date("2020-01-06T00:00:00.000Z"),Tue:new Date("2020-01-07T00:00:00.000Z"),Wed:new Date("2020-01-08T00:00:00.000Z"),Thu:new Date("2020-01-09T00:00:00.000Z"),Fri:new Date("2020-01-10T00:00:00.000Z"),Sat:new Date("2020-01-11T00:00:00.000Z")};function getWeekdayFormatter(){const e=()=>"",r={long:{timeZone:"UTC",weekday:"long"},short:{timeZone:"UTC",weekday:"short"},narrow:{timeZone:"UTC",weekday:"narrow"}};return"undefined"===typeof Intl||"undefined"===typeof Intl.DateTimeFormat?e:t;function t(t,e,a){try{const n=new Intl.DateTimeFormat(a||void 0,r[e]||r["long"]);return n.format(weekdayDateMap[t])}catch(e){return e instanceof Error&&console.error(`Intl.DateTimeFormat: ${e.message} -> day of week: `+t),""}}}function getWeekdayNames(t,a){const e=Object.keys(weekdayDateMap),n=getWeekdayFormatter();return e.map(e=>String(n(e,t,a)))}function getMonthFormatter(){const e=()=>"",o={long:{timeZone:"UTC",month:"long"},short:{timeZone:"UTC",month:"short"},narrow:{timeZone:"UTC",month:"narrow"}};return"undefined"===typeof Intl||"undefined"===typeof Intl.DateTimeFormat?e:t;function t(t,e,a){try{const n=new Intl.DateTimeFormat(a||void 0,o[e]||o["long"]),r=new Date;return r.setDate(1),r.setMonth(t),n.format(r)}catch(e){return e instanceof Error&&console.error(`Intl.DateTimeFormat: ${e.message} -> month: `+t),""}}}function getMonthNames(t,a){const n=getMonthFormatter();return[...Array(12).keys()].map(e=>n(e,t,a))}function convertToUnit(e,t="px"){if(e)return isNaN(e)?String(e):"auto"===e?e:""+Number(e)+t}function indexOf(t,a){for(let e=0;e<t.length;e++)if(!0===a(t[e],e))return e;return-1}function minCharWidth(e,t){return 0===t?e:e.slice(0,t)}const ResizeObserverDirective={mounted(e,t){if("function"===typeof t.value){const a=t.value,n={callback:a,size:{width:0,height:0},observer:new ResizeObserver(e=>{const t=e[0].contentRect;t.width===n.size.width&&t.height===n.size.height||(n.size.width=t.width,n.size.height=t.height,n.debounceTimeout&&clearTimeout(n.debounceTimeout),n.debounceTimeout=setTimeout(()=>{n.callback(n.size),n.debounceTimeout=void 0},100))})};n.observer.observe(e),e.__onResizeObserver=n}},beforeUnmount(e){if(e.__onResizeObserver){const{observer:t,debounceTimeout:a}=e.__onResizeObserver;a&&clearTimeout(a),t.unobserve(e),delete e.__onResizeObserver}}};function useCalendar(t,a,{scrollArea:e,pane:n}){if(!a){const l="[error: renderCalendar] no renderFunc has been supplied to useCalendar";throw console.error(l),new Error(l)}const r=vue.reactive({width:0,height:0}),o=vue.ref(null);function u({width:e,height:t}){r.width=e,r.height=t}const i=vue.computed(()=>{return!0!==t.noScroll&&e.value&&n.value&&r.height?e.value.offsetWidth-n.value.offsetWidth:0});function s(){}function d(){const e={ref:o,role:"complementary",lang:t.locale,class:`q-calendar ${t.dark?"q-calendar--dark":""} `+(t.bordered?"q-calendar__bordered":"")};return vue.withDirectives(vue.h("div",{...e},[a()]),[[ResizeObserverDirective,u]])}return{rootRef:o,scrollWidth:i,__initCalendar:s,__renderCalendar:d}}const isValidFocusType=e=>e.every(e=>["day","date","weekday","interval","time","resource","task"].includes(e)),useCommonProps={modelValue:{type:String,default:today(),validator:e=>""===e||validateTimestamp(e)},weekdays:{type:Array,default:()=>[0,1,2,3,4,5,6]},dateType:{type:String,default:"round",validator:e=>["round","rounded","square"].includes(e)},weekdayAlign:{type:String,default:"center",validator:e=>["left","center","right"].includes(e)},dateAlign:{type:String,default:"center",validator:e=>["left","center","right"].includes(e)},bordered:Boolean,dark:Boolean,noAria:Boolean,noActiveDate:Boolean,noHeader:Boolean,noScroll:Boolean,shortWeekdayLabel:Boolean,noDefaultHeaderText:Boolean,noDefaultHeaderBtn:Boolean,minWeekdayLabel:{type:[Number,String],default:1},weekdayBreakpoints:{type:Array,default:()=>[75,35],validator:e=>2===e.length},locale:{type:String,default:"en-US"},animated:Boolean,transitionPrev:{type:String,default:"slide-right"},transitionNext:{type:String,default:"slide-left"},disabledDays:Array,disabledBefore:String,disabledAfter:String,disabledWeekdays:{type:Array,default:()=>[]},dragEnterFunc:Function,dragOverFunc:Function,dragLeaveFunc:Function,dropFunc:Function,selectedDates:{type:[Array,Set],default:()=>[]},selectedStartEndDates:{type:Array,default:()=>[]},hoverable:Boolean,focusable:Boolean,focusType:{type:Array,default:()=>["date"],validator:isValidFocusType}};function useCommon(t,{startDate:e,endDate:a,times:n}){const r=vue.computed(()=>parseTimestamp(e.value)),o=vue.computed(()=>{return"0000-00-00"===a.value?getEndOfWeek(r.value,t.weekdays,n.today):parseTimestamp(a.value)||r.value}),u=vue.computed(()=>createNativeLocaleFormatter(t.locale,()=>({timeZone:"UTC",day:"numeric"}))),i=vue.computed(()=>createNativeLocaleFormatter(t.locale,(e,t)=>({timeZone:"UTC",weekday:t?"short":"long"}))),s=vue.computed(()=>createNativeLocaleFormatter(t.locale,()=>({timeZone:"UTC",dateStyle:"full"})));function d(e,t){return e&&e.length>0&&e.includes(t.date)}function l(e,t){const a={firstDay:!1,betweenDays:!1,lastDay:!1};if(2===e.length){const n=getDayIdentifier(t),r=getDayIdentifier(parsed(e[0])),o=getDayIdentifier(parsed(e[1]));a.firstDay=r===n,a.lastDay=o===n,a.betweenDays=r<n&&o>n}return a}function c(e,t=!1,a=[],n=[],r=!1){const o=d(a,e),{firstDay:u,lastDay:i,betweenDays:s}=l(n,e);return{"q-past-day":!u&&!s&&!i&&!o&&!t&&!!e.past,"q-future-day":!u&&!s&&!i&&!o&&!t&&!!e.future,"q-outside":t,"q-current-day":!!e.current,"q-selected":o,"q-range-first":u,"q-range":s,"q-range-last":i,"q-range-hover":r&&(u||i||s),"q-disabled-day disabled":!0===e.disabled}}function m(e){return getStartOfWeek(e,t.weekdays,n.today)}function v(e){return getEndOfWeek(e,t.weekdays,n.today)}function p(){return{}}return{parsedStart:r,parsedEnd:o,dayFormatter:u,weekdayFormatter:i,ariaDateFormatter:s,arrayHasDate:d,checkDays:l,getRelativeClasses:c,startOfWeek:m,endOfWeek:v,dayStyleDefault:p}}function scrollTo(e,t){e instanceof Window?e.scrollTo({top:t,behavior:"instant"}):e.scrollTop=t}function getVerticalScrollPosition(e){return e instanceof Window?e.scrollY:e.scrollTop}function animVerticalScrollTo(o,u,i=500,s=performance.now(),d=getVerticalScrollPosition(o)){i<=0||d===u?scrollTo(o,u):requestAnimationFrame(e=>{const t=e-s,a=Math.min(t/i,1),n=e=>e<.5?2*e*e:(4-2*e)*e-1,r=d+(u-d)*n(a);scrollTo(o,r),a<1&&animVerticalScrollTo(o,u,i,s,d)})}function animHorizontalScrollTo(r,e,o=500){const u=r.scrollLeft,i=e-u;let s=null;function d(e){null===s&&(s=e);const t=e-s,a=Math.min(t/o,1),n=e=>e<.5?2*e*e:(4-2*e)*e-1;r.scrollLeft=u+i*n(a),t<o&&requestAnimationFrame(d)}requestAnimationFrame(d)}const useIntervalProps={view:{type:String,validator:e=>["day","week","month","month-interval"].includes(e),default:"day"},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},intervalClass:{type:Function,default:null},weekdayStyle:{type:Function,default:null},weekdayClass:{type:Function,default:null},showIntervalLabel:{type:Function,default:null},hour24Format:Boolean,timeClicksClamped:Boolean,dateHeader:{type:String,default:"stacked",validator:e=>["stacked","inline","inverted"].includes(e)}},useResourceProps={modelResources:{type:Array},resourceKey:{type:String,default:"id"},resourceLabel:{type:String,default:"label"},resourceHeight:{type:[Number,String],default:0,validator:validateNumber},resourceMinHeight:{type:[Number,String],default:70,validator:validateNumber},resourceStyle:{type:Function,default:null},resourceClass:{type:Function,default:null},cellWidth:{type:[Number,String],default:100},intervalHeaderHeight:{type:[Number,String],default:20,validator:validateNumber},noSticky:Boolean};function useInterval(o,{times:t,scrollArea:n,parsedStart:e,parsedEnd:a,maxDays:r,size:u,headerColumnRef:i}){const s=vue.computed(()=>parseInt(String(o.intervalStart),10)),m=vue.computed(()=>parseInt(String(o.intervalMinutes),10)),d=vue.computed(()=>parseInt(String(o.intervalCount),10)),v=vue.computed(()=>parseFloat(String(o.intervalHeight))),p=vue.computed(()=>{let e=0;const t=Number(o.columnCount);return o.cellWidth?e=Number(o.cellWidth):u.width>0&&i.value&&(e=i.value.offsetWidth/(t>1?t:r.value)),e}),l=vue.computed(()=>s.value*m.value),c=vue.computed(()=>d.value*v.value),y=vue.computed(()=>d.value*p.value),f=vue.computed(()=>D(e.value)),h=vue.computed(()=>w(a.value)),g=vue.computed(()=>{return createDayList(e.value,a.value,t.today,o.weekdays,o.disabledBefore,o.disabledAfter,o.disabledWeekdays,o.disabledDays,r.value)}),T=vue.computed(()=>{return g.value.map(e=>createIntervalList(e,s.value,m.value,d.value,t.now))});function D(e){return getStartOfWeek(e,o.weekdays,t.today)}function w(e){return getEndOfWeek(e,o.weekdays,t.today)}function k(e,t){return e&&e.length>0&&e.includes(getDateTime(t))}function b(e,t){const a={firstDay:!1,betweenDays:!1,lastDay:!1};if(e&&2===e.length){const n=getDayTimeIdentifier(t),r=getDayTimeIdentifier(parsed(e[0])),o=getDayTimeIdentifier(parsed(e[1]));a.firstDay=r===n,a.lastDay=o===n,a.betweenDays=r<n&&o>n}return a}function I(e,t=[],a=[]){const n=k(t,e),{firstDay:r,lastDay:o,betweenDays:u}=b(a,e);return{"q-selected":n,"q-range-first":!0===r,"q-range":!0===u,"q-range-last":!0===o,"q-disabled-interval disabled":!0===e.disabled}}function M(e,t,a){return[]}const N=vue.computed(()=>{const a={timeZone:"UTC",hour12:!o.hour24Format,hour:"2-digit",minute:"2-digit"},n={timeZone:"UTC",hour12:!o.hour24Format,hour:"numeric",minute:"2-digit"},r={timeZone:"UTC",hour12:!o.hour24Format,hour:"numeric"};return createNativeLocaleFormatter(o.locale,(e,t)=>t?0===e.minute?r:n:a)}),S=vue.computed(()=>{const e={timeZone:"UTC",dateStyle:"full",timeStyle:"short"};return createNativeLocaleFormatter(o.locale,()=>e)});function _(e){const t=T.value[0][0],a=t.hour===e.hour&&t.minute===e.minute;return!a&&0===e.minute}function x(e){}function E(e){return{}}function F(e,t,a=!1,n){let r=copyTimestamp(t);if(e.currentTarget){const o=e.currentTarget.getBoundingClientRect(),u=e,i=e,s=u.changedTouches||u.touches,d=(s&&s[0]?s[0]:i).clientY,l=(d-o.top)/v.value,c=Math.floor((a?Math.floor(l):l)*m.value);0!==c&&(r=addToDate(r,{minute:c})),n&&(r=updateRelative(r,n,!0))}return r}function R(e,t,a=!1,n){let r=copyTimestamp(t);const o=e.currentTarget.getBoundingClientRect(),u=e,i=e,s=u.changedTouches||u.touches,d=(s&&s[0]?s[0]:i).clientY,l=(d-o.top)/v.value,c=Math.floor((a?Math.floor(l):l)*m.value);return 0!==c&&(r=addToDate(r,{minute:c})),n&&(r=updateRelative(r,n,!0)),r}function H(e,t,a=!1,n){let r=copyTimestamp(t);if(e.currentTarget){const o=e.currentTarget.getBoundingClientRect(),u=e,i=e,s=u.changedTouches||u.touches,d=(s&&s[0]?s[0]:i).clientX,l=(d-o.left)/p.value,c=Math.floor((a?Math.floor(l):l)*m.value);0!==c&&(r=addToDate(r,{minute:c})),n&&(r=updateRelative(r,n,!0))}return r}function U(e,t){const a={timestamp:e,timeStartPos:A,timeDurationHeight:C};return void 0!==t&&(a.columnIndex=t),a}function L(e,t){const a={timestamp:copyTimestamp(e),timeStartPosX:W,timeDurationWidth:O};return void 0!==t&&(a.index=t),a}function q(e,t=0){const a=A(e);return!(!1===a||!n.value)&&(animVerticalScrollTo(n.value,a,t),!0)}function P(e,t=0){const a=W(e);return!(!1===a||!n.value)&&(animHorizontalScrollTo(n.value,a,t),!0)}function C(e){return e/m.value*v.value}function O(e){return e/m.value*p.value}function Y(e){return e*m.value/v.value}function B(e){return e*m.value/p.value}function A(e,t=!0){const a=parseTime(e);if(!1===a)return!1;const n=l.value,r=d.value*m.value,o=(a-n)/r;let u=o*c.value;return t&&(u<0&&(u=0),u>c.value)&&(u=c.value),u}function W(e,t=!0){const a=parseTime(e);if(!1===a)return!1;const n=l.value,r=d.value*m.value,o=(a-n)/r;let u=o*y.value;return t&&(u<0&&(u=0),u>y.value)&&(u=y.value),u}return{parsedIntervalStart:s,parsedIntervalMinutes:m,parsedIntervalCount:d,parsedIntervalHeight:v,parsedCellWidth:p,parsedStartMinute:l,bodyHeight:c,bodyWidth:y,parsedWeekStart:f,parsedWeekEnd:h,days:g,intervals:T,intervalFormatter:N,ariaDateTimeFormatter:S,arrayHasDateTime:k,checkIntervals:b,getIntervalClasses:I,getResourceClasses:M,showIntervalLabelDefault:_,showResourceLabelDefault:x,styleDefault:E,getTimestampAtEventInterval:F,getTimestampAtEvent:R,getTimestampAtEventX:H,getScopeForSlot:U,getScopeForSlotX:L,scrollToTime:q,scrollToTimeX:P,timeDurationHeight:C,timeDurationWidth:O,heightToMinutes:Y,widthToMinutes:B,timeStartPos:A,timeStartPosX:W}}const useColumnProps={columnCount:{type:[Number,String],default:0,validator:validateNumber},columnIndexStart:{type:[Number,String],default:0,validator:validateNumber}},useMaxDaysProps={maxDays:{type:Number,default:1}},useTimesProps={now:{type:String,validator:e=>""===e||validateTimestamp(e),default:""}};function useTimes(e){const t=vue.reactive({now:parseTimestamp("0000-00-00 00:00"),today:parseTimestamp("0000-00-00")}),a=vue.computed(()=>e.now?parseTimestamp(e.now):o());function n(){t.now&&t.today&&(t.now.current=t.today.current=!0,t.now.past=t.today.past=!1,t.now.future=t.today.future=!1)}function r(){const e=a.value||o();u(e,t.now),i(e,t.now),u(e,t.today)}function o(){return parseDate(new Date)}function u(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)}function i(e,t){e.time!==t.time&&(t.hour=e.hour,t.minute=e.minute,t.time=e.time)}return vue.watch(a,()=>r()),{times:t,parsedNow:a,setCurrent:n,updateCurrent:r,getNow:o,updateDay:u,updateTime:i}}function useRenderValues(r,{parsedView:o,parsedValue:u,times:i}){const e=vue.computed(()=>{const e=u.value;let t=r.maxDays,a=e,n=e;switch(o.value){case"month":a=getStartOfMonth(e),n=getEndOfMonth(e),t=daysInMonth(a.year,a.month);break;case"week":case"week-agenda":case"week-scheduler":a=getStartOfWeek(e,r.weekdays,i.today),n=getEndOfWeek(a,r.weekdays,i.today),t=r.weekdays.length;break;case"day":case"scheduler":case"agenda":n=moveRelativeDays(copyTimestamp(n),nextDay,t>1?t-1:t,r.weekdays),n=updateFormatted(n);break;case"month-interval":case"month-scheduler":case"month-agenda":a=getStartOfMonth(e),n=getEndOfMonth(e),n=updateFormatted(n),t=daysInMonth(a.year,a.month);break;case"resource":t=1,n=moveRelativeDays(copyTimestamp(n),nextDay,t,r.weekdays),n=updateFormatted(n);break}return{start:a,end:n,maxDays:t}});return{renderValues:e}}const toCamelCase=e=>e.replace(/(-\w)/g,e=>e[1].toUpperCase());function getMouseEventHandlers(t,e,a,n){const r={};for(const o in a){const u=a[o],i=toCamelCase("on-"+o);if(!e.value)return console.warn("$listeners has not been set up"),{};if(void 0!==e.value[i]){const s="on"+u.event.charAt(0).toUpperCase()+u.event.slice(1),d=e=>{return(void 0===u.button||"buttons"in e&&e.buttons>0&&e.button===u.button)&&(u.prevent&&e.preventDefault(),u.stop&&e.stopPropagation(),t(o,n(e,o))),u.result};s in r?Array.isArray(r[s])?r[s].push(d):r[s]=[r[s],d]:r[s]=d}}return r}function getDefaultMouseEventHandlers(e,t,a,n){return getMouseEventHandlers(e,t,getMouseEventName(a),n)}function getMouseEventName(e){return{["click"+e]:{event:"click"},["contextmenu"+e]:{event:"contextmenu",prevent:!0,result:!1},["mousedown"+e]:{event:"mousedown"},["mousemove"+e]:{event:"mousemove"},["mouseup"+e]:{event:"mouseup"},["mouseenter"+e]:{event:"mouseenter"},["mouseleave"+e]:{event:"mouseleave"},["touchstart"+e]:{event:"touchstart"},["touchmove"+e]:{event:"touchmove"},["touchend"+e]:{event:"touchend"}}}function getRawMouseEvents(e){return Object.keys(getMouseEventName(e))}function useMouseEvents(a,n){return{getMouseEventHandlers:(e,t)=>getMouseEventHandlers(a,n,e,t),getDefaultMouseEventHandlers:(e,t)=>getDefaultMouseEventHandlers(a,n,e,t),getMouseEventName:getMouseEventName,getRawMouseEvents:getRawMouseEvents}}const useMoveEmits=["moved"];function useMove(s,{parsedView:d,parsedValue:l,direction:c,maxDays:m,times:v,emittedValue:p,emit:y}){function e(a=1){if(0===a)p.value=today();else{let e=copyTimestamp(l.value);const n=getEndOfMonth(e),r=a>0,o=r?nextDay:prevDay,u=r?n.day:1;let t=r?a:-a;c.value=r?"next":"prev";const i=s.weekdays.length;while(--t>=0)switch(d.value){case"month":e.day=u,e=o(e),e=updateWeekday(e);while(!s.weekdays.includes(Number(e.weekday)))e=addToDate(e,{day:r?1:-1});break;case"week":case"week-agenda":case"week-scheduler":e=relativeDays(e,o,i,s.weekdays);break;case"day":case"scheduler":case"agenda":e=relativeDays(e,o,m.value,s.weekdays);break;case"month-interval":case"month-agenda":case"month-scheduler":e.day=u,e=o(e);break;case"resource":e=relativeDays(e,o,m.value,s.weekdays);break}e=updateWeekday(e),e=updateFormatted(e),e=updateDayOfYear(e),e=updateRelative(e,v.now),p.value=e.date,y("moved",e)}}return{move:e}}const listenerRE=/^on[A-Z]/;function useEmitListeners(e=vue.getCurrentInstance()){return{emitListeners:vue.computed(()=>{const t={};return e?.vnode?.props&&Object.keys(e.vnode.props).forEach(e=>{listenerRE.test(e)&&(t[e]=!0)}),t})}}function useFocusHelper(){const e={"aria-hidden":"true",class:"q-calendar__focus-helper"};return[vue.h("span",e)]}const useCheckChangeEmits=["change"];function useCheckChange(n,{days:r,lastStart:o,lastEnd:u}){function e(){const e=r.value;if(0===e.length)return!1;const t=e[0].date,a=e[e.length-1].date;return(!o.value||!u.value||t!==o.value||a!==u.value)&&(o.value=t,u.value=a,n("change",{start:t,end:a,days:e}),!0)}return{checkChange:e}}function useEventUtils(){function e(e,t){return(Array.isArray(t)?t:[t]).includes(e.keyCode)}return{isKeyCode:e}}const isKeyCode=useEventUtils().isKeyCode,useNavigationProps={useNavigation:Boolean};function useNavigation(t,{rootRef:a,focusRef:n,focusValue:r,datesRef:o,parsedView:u,emittedValue:i,direction:s,times:d}){let e=!1;function l(){e||document&&(e=!0,document.addEventListener("keyup",y),document.addEventListener("keydown",p))}function c(){document&&(document.removeEventListener("keyup",y),document.removeEventListener("keydown",p),e=!1)}function m(e){if(e&&document){const t=document.activeElement;if(t!==document.body&&a.value?.contains(t))return!0}return!1}function v(){let t=0;const a=window.setInterval(()=>{const e=o.value[n.value];e&&(e.focus(),50!==++t)&&document.activeElement!==e||window.clearInterval(a)},250)}function p(e){m(e)&&isKeyCode(e,[33,34,35,36,37,38,39,40])&&(e.stopPropagation(),e.preventDefault())}function y(e){if(m(e)&&isKeyCode(e,[33,34,35,36,37,38,39,40])){const t={33:D,34:w,35:b,36:k,37:g,38:f,39:T,40:h};t[e.keyCode]?.()}}function f(){let e=copyTimestamp(r.value);if("month"===u.value){if(e=addToDate(e,{day:-7}),r.value.month!==e.month)return s.value="prev",void(i.value=e.date)}else e=addToDate(e,{minute:Number(t.intervalMinutes)});s.value="prev",n.value=e.date}function h(){let e=copyTimestamp(r.value);if("month"===u.value){if(e=addToDate(e,{day:7}),r.value.month!==e.month)return s.value="next",void(i.value=e.date)}else e=addToDate(e,{minute:Number(t.intervalMinutes)});s.value="next",n.value=e.date}function g(){let e=copyTimestamp(r.value);s.value="prev";do{e=addToDate(e,{day:-1})}while(!t.weekdays.includes(Number(e.weekday)));n.value=e.date}function T(){let e=copyTimestamp(r.value);s.value="next";do{e=addToDate(e,{day:1})}while(!t.weekdays.includes(Number(e.weekday)));n.value=e.date}function D(){let e=copyTimestamp(r.value);e="month"===u.value?addToDate(e,{month:-1}):addToDate(e,{day:-7}),s.value="prev",n.value=e.date}function w(){let e=copyTimestamp(r.value);e="month"===u.value?addToDate(e,{month:1}):addToDate(e,{day:7}),s.value="next",n.value=e.date}function k(){let e=copyTimestamp(r.value);e="month"===u.value?getStartOfMonth(e):getStartOfWeek(e,t.weekdays||[],d.today);while(!t.weekdays.includes(Number(e.weekday)))e=addToDate(e,{day:-1});n.value=e.date}function b(){let e=copyTimestamp(r.value);e="month"===u.value?getEndOfMonth(e):getEndOfWeek(e,t.weekdays||[],d.today);while(!t.weekdays.includes(Number(e.weekday)))e=addToDate(e,{day:-1});n.value=e.date}return vue.onBeforeUnmount(()=>{c()}),vue.watch(()=>t.useNavigation,e=>{(!0===e?l:c)()}),!0===t.useNavigation&&l(),{startNavigation:l,endNavigation:c,tryFocus:v}}var QCalendarResource=vue.defineComponent({name:"QCalendarResource",props:{...useCommonProps,...useResourceProps,...useIntervalProps,...useColumnProps,...useMaxDaysProps,...useTimesProps,...useNavigationProps},emits:["update:model-value","update:model-resources","resource-expanded",...useCheckChangeEmits,...useMoveEmits,...getRawMouseEvents("-date"),...getRawMouseEvents("-interval"),...getRawMouseEvents("-head-day"),...getRawMouseEvents("-time"),...getRawMouseEvents("-head-resources"),...getRawMouseEvents("-resource")],setup(v,{slots:p,emit:m,expose:R}){const e=vue.ref(null),H=vue.ref(null),U=vue.ref(null),t=vue.ref(null),y=vue.ref(v.modelValue||today()),a=vue.ref(parsed(v.modelValue||today())),f=vue.ref({}),h=vue.ref({}),u=vue.ref("next"),i=vue.ref(v.modelValue||today()),s=vue.ref("0000-00-00"),d=vue.ref(0),r=vue.ref(v.modelValue),l=vue.reactive({width:0,height:0}),g=vue.ref(""),T=vue.ref(""),D=vue.ref(""),L=vue.ref(null),q=vue.ref(null),n=(vue.watch(()=>v.view,()=>{d.value=0}),vue.computed(()=>{return"month"===v.view?"month-interval":v.view})),w=vue.computed(()=>{return parseInt(String(v.cellWidth),10)}),o=vue.getCurrentInstance();if(null===o)throw new Error("current instance is null");const k=useEmitListeners(o).emitListeners,{times:c,setCurrent:P,updateCurrent:b}=useTimes(v),{parsedStart:I,parsedEnd:Y,dayStyleDefault:M}=(b(),P(),useCommon(v,{startDate:i,endDate:s,times:c})),N=vue.computed(()=>{return parseTimestamp(v.modelValue,c.now)||I.value||c.today}),B=(a.value=N.value,y.value=N.value.date,useRenderValues(v,{parsedView:n,times:c,parsedValue:N})).renderValues,{rootRef:V,__renderCalendar:z}=useCalendar(v,ge,{scrollArea:e,pane:H}),{days:S,intervals:_,intervalFormatter:Z,styleDefault:X,scrollToTimeX:K,timeDurationWidth:x,timeStartPosX:E,widthToMinutes:$}=useInterval(v,{times:c,scrollArea:e,parsedStart:I,parsedEnd:Y,maxDays:d,size:l,headerColumnRef:t}),F=useMove(v,{parsedView:n,parsedValue:N,direction:u,maxDays:d,times:c,emittedValue:r,emit:m}).move,C=useMouseEvents(m,k).getDefaultMouseEventHandlers,j=useCheckChange(m,{days:S,lastStart:L,lastEnd:q}).checkChange,Q=useEventUtils().isKeyCode,G=useNavigation(v,{rootRef:V,focusRef:y,focusValue:a,datesRef:f,parsedView:n,emittedValue:r,direction:u,times:c}).tryFocus,O=vue.computed(()=>{const e=parseInt(String(v.resourceHeight),10);return 0===e?"auto":e}),A=vue.computed(()=>{return parseInt(String(v.resourceMinHeight),10)}),W=vue.computed(()=>{return parseInt(String(v.intervalHeaderHeight),10)});function J(){r.value=today()}function ee(e=1){F(e)}function te(e=1){F(-e)}function ae({width:e,height:t}){l.width=e,l.height=t}function ne(e){return e.date===r.value}function re(){const e={height:convertToUnit(W.value)};return vue.h("div",{ref:U,roll:"presentation",class:{"q-calendar-resource__head":!0,"q-calendar__sticky":!0!==v.noSticky},style:e},[oe(),ue()])}function oe(){const e=p["head-resources"],t=convertToUnit(W.value),a={timestamps:_,date:v.modelValue,resources:v.modelResources};return vue.h("div",{class:{"q-calendar-resource__head--resources":!0,"q-calendar__sticky":!0!==v.noSticky},style:{height:t},...C("-head-resources",e=>{return{scope:a,event:e}})},[e&&e({scope:a})])}function ue(){return vue.h("div",{ref:t,class:{"q-calendar-resource__head--intervals":!0}},[_.value.map(e=>e.map((e,t)=>ie(e,t)))])}function ie(e,t){const a=p["interval-label"],n=!0!==v.noActiveDate&&ne(e),r=convertToUnit(w.value),o=convertToUnit(W.value),u=v.shortIntervalLabel,i=Z.value(e,u),s={timestamp:e,index:t,label:i,droppable:g.value===i},d=v.intervalStyle||M,l={width:r,maxWidth:r,minWidth:r,height:o,...d({scope:s})},c="function"===typeof v.intervalClass?v.intervalClass({scope:s}):{},m=!0===v.focusable&&v.focusType.includes("interval");return vue.h("div",{key:i,tabindex:!0===m?0:-1,class:{"q-calendar-resource__head--interval":!0,...c,"q-active-date":n,"q-calendar__hoverable":!0===v.hoverable,"q-calendar__focusable":!0===m},style:l,onDragenter:e=>{void 0!==v.dragEnterFunc&&"function"===typeof v.dragEnterFunc&&(!0===v.dragEnterFunc(e,"interval",{scope:s})?g.value=i:g.value="")},onDragover:e=>{void 0!==v.dragOverFunc&&"function"===typeof v.dragOverFunc&&(!0===v.dragOverFunc(e,"interval",{scope:s})?g.value=i:g.value="")},onDragleave:e=>{void 0!==v.dragLeaveFunc&&"function"===typeof v.dragLeaveFunc&&(!0===v.dragLeaveFunc(e,"interval",{scope:s})?g.value=i:g.value="")},onDrop:e=>{void 0!==v.dropFunc&&"function"===typeof v.dropFunc&&(!0===v.dropFunc(e,"interval",{scope:s})?g.value=i:g.value="")},onFocus:()=>{!0===m&&(y.value=i)},...C("-interval",e=>{return{scope:s,event:e}})},[a?a({scope:s}):i,useFocusHelper()])}function se(){return vue.h("div",{class:"q-calendar-resource__body"},[de()])}function de(){return vue.h("div",{ref:e,class:{"q-calendar-resource__scroll-area":!0,"q-calendar__scroll":!0}},[ce()])}function le(){return vue.h("div",{},"No resources have been defined")}function ce(){return vue.h("div",{class:"q-calendar-resource__day--container"},[re(),void 0===v.modelResources&&le(),void 0!==v.modelResources&&me()])}function me(){const e={class:"q-calendar-resource__resources--body"};return vue.h("div",e,ve())}function ve(e=void 0,a=0,n=!0){return void 0===e&&(e=v.modelResources),e.map((e,t)=>{return pe(e,t,a,void 0!==e.children?e.expanded:n)}).filter(e=>!!e)}function pe(e,t,a=0,n=!0){const r={},o=(r.height="auto"===O.value?O.value:convertToUnit(O.value),A.value>0&&(r.minHeight=convertToUnit(A.value)),vue.h("div",{key:e[v.resourceKey]+"-"+t,class:{"q-calendar-resource__resource--row":!0},style:r},[ye(e,t,a,n),fe(e,t)]));return void 0!==e.children?[o,vue.h("div",{class:{"q-calendar__child":!0,"q-calendar__child--expanded":!0===n,"q-calendar__child--collapsed":!0!==n}},[ve(e.children,a+1,!1===n?n:e.expanded)])]:[o]}function ye(t,e,a=0,n=!0){const r=p["resource-label"],o={},u=(o.height=void 0!==t.height?convertToUnit(parseInt(t.height,10)):O.value?convertToUnit(O.value):"auto",A.value>0&&(o.minHeight=convertToUnit(A.value)),v.resourceStyle||X),i=t[v.resourceLabel],s=!0===v.focusable&&v.focusType.includes("resource")&&!0===n,d=t[v.resourceKey],l={resource:t,timestamps:_,resourceIndex:e,indentLevel:a,label:i,droppable:T.value===d},c="function"===typeof v.resourceClass?v.resourceClass({scope:l}):{};return vue.h("div",{key:t[v.resourceKey]+"-"+e,ref:e=>{e instanceof HTMLElement&&(h.value[t[v.resourceKey]]=e)},tabindex:!0===s?0:-1,class:{"q-calendar-resource__resource":0===a,"q-calendar-resource__resource--section":0!==a,...c,"q-calendar__sticky":!0!==v.noSticky,"q-calendar__hoverable":!0===v.hoverable,"q-calendar__focusable":!0===s},style:{...o,...u({scope:l})},onDragenter:e=>{void 0!==v.dragEnterFunc&&"function"===typeof v.dragEnterFunc&&(!0===v.dragEnterFunc(e,"resource",{scope:l})?T.value=d:T.value="")},onDragover:e=>{void 0!==v.dragOverFunc&&"function"===typeof v.dragOverFunc&&(!0===v.dragOverFunc(e,"resource",{scope:l})?T.value=d:T.value="")},onDragleave:e=>{void 0!==v.dragLeaveFunc&&"function"===typeof v.dragLeaveFunc&&(!0===v.dragLeaveFunc(e,"resource",{scope:l})?T.value=d:T.value="")},onDrop:e=>{void 0!==v.dropFunc&&"function"===typeof v.dropFunc&&(!0===v.dropFunc(e,"resource",{scope:l})?T.value=d:T.value="")},onKeydown:e=>{Q(e,[13,32])&&(e.stopPropagation(),e.preventDefault())},onKeyup:e=>{Q(e,[13,32])&&void 0!==k.value.onClickResource&&m("click-resource",{scope:l,event:e})},...C("-resource",e=>{return{scope:l,event:e}})},[[vue.h("div",{class:{"q-calendar__parent":void 0!==t.children,"q-calendar__parent--expanded":void 0!==t.children&&!0===t.expanded,"q-calendar__parent--collapsed":void 0!==t.children&&!0!==t.expanded},onClick:e=>{e.stopPropagation(),t.expanded=!t.expanded,m("resource-expanded",{expanded:t.expanded,scope:l})}}),vue.h("div",{class:{"q-calendar-resource__resource--text":!0,"q-calendar__ellipsis":!0},style:{paddingLeft:10*a+2+"px"}},[r?r({scope:l}):i]),useFocusHelper()]])}function fe(t,a){const e=p["resource-intervals"],n={resource:t,timestamps:_,resourceIndex:a,timeStartPosX:E,timeDurationWidth:x};return vue.h("div",{class:"q-calendar-resource__resource--intervals"},[_.value.map(e=>e.map(e=>he(t,e,a))),e&&e({scope:n})])}function he(t,e,a){const n=p["resource-interval"],r=!0!==v.noActiveDate&&ne(e),o=t[v.resourceKey],u=e.time+"-"+o,i=!0===v.focusable&&v.focusType.includes("time"),s={activeDate:r,resource:t,timestamp:e,resourceIndex:a,droppable:D.value===u},d=v.intervalStyle||M,l=convertToUnit(w.value),c={width:l,maxWidth:l,minWidth:l,...d({scope:s})};return c.height=void 0!==t.height?convertToUnit(parseInt(t.height,10)):"auto"===O.value?O.value:convertToUnit(O.value),A.value>0&&(c.minHeight=convertToUnit(A.value)),vue.h("div",{key:u,ref:e=>{e instanceof HTMLElement&&(f.value[t[v.resourceKey]]=e)},tabindex:!0===i?0:-1,class:{"q-calendar-resource__resource--interval":!0,"q-active-date":r,"q-calendar__hoverable":!0===v.hoverable,"q-calendar__focusable":!0===i},style:c,onDragenter:e=>{void 0!==v.dragEnterFunc&&"function"===typeof v.dragEnterFunc&&(!0===v.dragEnterFunc(e,"time",{scope:s})?D.value=u:D.value="")},onDragover:e=>{void 0!==v.dragOverFunc&&"function"===typeof v.dragOverFunc&&(!0===v.dragOverFunc(e,"time",{scope:s})?D.value=u:D.value="")},onDragleave:e=>{void 0!==v.dragLeaveFunc&&"function"===typeof v.dragLeaveFunc&&(!0===v.dragLeaveFunc(e,"time",{scope:s})?D.value=u:D.value="")},onDrop:e=>{void 0!==v.dropFunc&&"function"===typeof v.dropFunc&&(!0===v.dropFunc(e,"time",{scope:s})?D.value=u:D.value="")},onFocus:()=>{!0===i&&(y.value=u)},...C("-time",e=>{return{scope:s,event:e}})},[n&&n({scope:s}),useFocusHelper()])}function ge(){const{start:e,end:t,maxDays:a}=B.value,n=(i.value===e.date&&s.value===t.date&&d.value===a||(i.value=e.date,s.value=t.date,d.value=a),l.width>0),r=vue.withDirectives(vue.h("div",{class:"q-calendar-resource",key:i.value},[!0===n&&se()]),[[ResizeObserverDirective,ae]]);if(!0!==v.animated)return r;{const o="q-calendar--"+("prev"===u.value?v.transitionPrev:v.transitionNext);return vue.h(vue.Transition,{name:o,appear:!0},()=>r)}}return vue.watch([S],j,{deep:!0,immediate:!0}),vue.watch(()=>v.modelValue,(e,t)=>{if(r.value!==e){if(!0===v.animated){const a=getDayIdentifier(parsed(e)),n=getDayIdentifier(parsed(t));u.value=a>=n?"next":"prev"}r.value=e}y.value=e}),vue.watch(r,(e,t)=>{if(r.value!==v.modelValue){if(!0===v.animated){const a=getDayIdentifier(parsed(e)),n=getDayIdentifier(parsed(t));u.value=a>=n?"next":"prev"}m("update:model-value",e)}}),vue.watch(y,e=>{e&&(a.value=parseTimestamp(e))}),vue.watch(a,()=>{f.value[y.value]?f.value[y.value].focus():G()}),vue.onBeforeUpdate(()=>{f.value={},h.value={}}),vue.onMounted(()=>{}),R({prev:te,next:ee,move:F,moveToToday:J,updateCurrent:b,timeStartPosX:E,timeDurationWidth:x,widthToMinutes:$,scrollToTimeX:K}),()=>z()}});const version="4.1.1";exports.DAYS_IN_MONTH=DAYS_IN_MONTH,exports.DAYS_IN_MONTH_LEAP=DAYS_IN_MONTH_LEAP,exports.DAYS_IN_MONTH_MAX=DAYS_IN_MONTH_MAX,exports.DAYS_IN_MONTH_MIN=DAYS_IN_MONTH_MIN,exports.DAY_MIN=DAY_MIN,exports.FIRST_HOUR=FIRST_HOUR,exports.MONTH_MAX=MONTH_MAX,exports.MONTH_MIN=MONTH_MIN,exports.PARSE_DATE=PARSE_DATE,exports.PARSE_DATETIME=PARSE_DATETIME,exports.PARSE_TIME=PARSE_TIME,exports.QCalendarResource=QCalendarResource,exports.TIME_CONSTANTS=TIME_CONSTANTS,exports.addToDate=addToDate,exports.compareDate=compareDate,exports.compareDateTime=compareDateTime,exports.compareTime=compareTime,exports.compareTimestamps=compareTimestamps,exports.convertToUnit=convertToUnit,exports.copyTimestamp=copyTimestamp,exports.createDayList=createDayList,exports.createIntervalList=createIntervalList,exports.createNativeLocaleFormatter=createNativeLocaleFormatter,exports.daysBetween=daysBetween,exports.daysInMonth=daysInMonth,exports.diffTimestamp=diffTimestamp,exports.findWeekday=findWeekday,exports.getDate=getDate,exports.getDateTime=getDateTime,exports.getDayIdentifier=getDayIdentifier,exports.getDayOfYear=getDayOfYear,exports.getDayTimeIdentifier=getDayTimeIdentifier,exports.getEndOfMonth=getEndOfMonth,exports.getEndOfWeek=getEndOfWeek,exports.getMonthFormatter=getMonthFormatter,exports.getMonthNames=getMonthNames,exports.getStartOfMonth=getStartOfMonth,exports.getStartOfWeek=getStartOfWeek,exports.getTime=getTime,exports.getTimeIdentifier=getTimeIdentifier,exports.getWeekday=getWeekday,exports.getWeekdayFormatter=getWeekdayFormatter,exports.getWeekdayNames=getWeekdayNames,exports.getWorkWeek=getWorkWeek,exports.indexOf=indexOf,exports.isBetweenDates=isBetweenDates,exports.isLeapYear=isLeapYear,exports.isOverlappingDates=isOverlappingDates,exports.isToday=isToday,exports.makeDate=makeDate,exports.makeDateTime=makeDateTime,exports.maxTimestamp=maxTimestamp,exports.minCharWidth=minCharWidth,exports.minTimestamp=minTimestamp,exports.moveRelativeDays=moveRelativeDays,exports.nextDay=nextDay,exports.padNumber=padNumber,exports.parseDate=parseDate,exports.parseTime=parseTime,exports.parseTimestamp=parseTimestamp,exports.parsed=parsed,exports.prevDay=prevDay,exports.relativeDays=relativeDays,exports.today=today,exports.updateDayOfYear=updateDayOfYear,exports.updateDisabled=updateDisabled,exports.updateFormatted=updateFormatted,exports.updateMinutes=updateMinutes,exports.updateRelative=updateRelative,exports.updateWeekday=updateWeekday,exports.updateWorkWeek=updateWorkWeek,exports.validateNumber=validateNumber,exports.validateTimestamp=validateTimestamp,exports.version=version,exports.weeksBetween=weeksBetween; |
/*! | ||
* @quasar/quasar-ui-qcalendar v4.1.0 | ||
* @quasar/quasar-ui-qcalendar v4.1.1 | ||
* (c) 2025 Jeff Galbraith <jeff@quasar.dev> | ||
* Released under the MIT License. | ||
*/ | ||
import{reactive,ref,computed,withDirectives,h,watch,getCurrentInstance,onBeforeUnmount,defineComponent,onBeforeUpdate,onMounted,Transition}from"vue";const PARSE_DATETIME=/^(\d{4})-(\d{1,2})(-(\d{1,2}))?([^\d]+(\d{1,2}))?(:(\d{1,2}))?(:(\d{1,2}))?(.(\d{1,3}))?$/,PARSE_DATE=/^(\d{4})-(\d{1,2})(-(\d{1,2}))?/,PARSE_TIME=/(\d\d?)(:(\d\d?)|)(:(\d\d?)|)/,DAYS_IN_MONTH=[0,31,28,31,30,31,30,31,31,30,31,30,31],DAYS_IN_MONTH_LEAP=[0,31,29,31,30,31,30,31,31,30,31,30,31],TIME_CONSTANTS={MILLISECONDS_IN:{SECOND:1e3,MINUTE:6e4,HOUR:36e5,DAY:864e5,WEEK:6048e5},SECONDS_IN:{MINUTE:60,HOUR:3600,DAY:86400,WEEK:604800},MINUTES_IN:{MINUTE:1,HOUR:60,DAY:1440,WEEK:10080},HOURS_IN:{DAY:24,WEEK:168},DAYS_IN:{WEEK:7}},DAYS_IN_MONTH_MIN=28,DAYS_IN_MONTH_MAX=31,MONTH_MAX=12,MONTH_MIN=1,DAY_MIN=1,FIRST_HOUR=0;function validateTimestamp(e){return"string"===typeof e&&PARSE_DATETIME.test(e)}function parsed(e){if("string"!==typeof e)return null;const t=PARSE_DATETIME.exec(e);if(!t||!t[1]||!t[2])return null;const a=parseInt(t[1],10),n=parseInt(t[2],10),r=parseInt(t[4]||"1",10),o=parseInt(t[6]||"0",10),i=parseInt(t[8]||"0",10);return{date:e,time:o.toString().padStart(2,"0")+":"+i.toString().padStart(2,"0"),year:a,month:n,day:r,hour:o,minute:i,hasDay:!!t[4],hasTime:!0,past:!1,current:!1,future:!1,disabled:!1,weekday:0,doy:0,workweek:0}}function parseDate(e,t=!1){if(!(e instanceof Date))return null;const a=t?"UTC":"";return updateFormatted({date:padNumber(e[`get${a}FullYear`](),4)+"-"+padNumber(e[`get${a}Month`]()+1,2)+"-"+padNumber(e[`get${a}Date`](),2),time:padNumber(e[`get${a}Hours`]()||0,2)+":"+padNumber(e[`get${a}Minutes`]()||0,2),year:e[`get${a}FullYear`](),month:e[`get${a}Month`]()+1,day:e[`get${a}Date`](),hour:e[`get${a}Hours`](),minute:e[`get${a}Minutes`](),weekday:0,doy:0,workweek:0,hasDay:!0,hasTime:!0,past:!1,current:!1,future:!1,disabled:!1})}function padNumber(e,t){let a=String(e);while(a.length<t)a="0"+a;return a}function isLeapYear(e){return e%4===0&&e%100!==0||e%400===0}function daysInMonth(e,t){return(isLeapYear(e)?DAYS_IN_MONTH_LEAP:DAYS_IN_MONTH)[t]}function nextDay(e){const t=new Date(e.year,e.month-1,e.day+1);return updateFormatted(normalizeTimestamp({...e,year:t.getFullYear(),month:t.getMonth()+1,day:t.getDate()}))}function prevDay(e){const t=new Date(e.year,e.month-1,e.day-1);return updateFormatted(normalizeTimestamp({...e,year:t.getFullYear(),month:t.getMonth()+1,day:t.getDate()}))}function today(){const e=new Date,t=e.getMonth()+1,a=e.getDate(),n=e.getFullYear();return[n,padNumber(t,2),padNumber(a,2)].join("-")}function isToday(e){return e===today()}function getStartOfWeek(e,t,a){let n=copyTimestamp(e);if(t){if(1===n.day||0===n.weekday)while(!t.includes(Number(n.weekday)))n=nextDay(n);n=findWeekday(n,t[0],prevDay),n=updateFormatted(n),a&&(n=updateRelative(n,a,n.hasTime))}return n}function getEndOfWeek(e,t,a){let n=copyTimestamp(e);if(t&&Array.isArray(t)){const r=daysInMonth(n.year,n.month);if(r===n.day||n.weekday===t[t.length-1])while(!t.includes(Number(n.weekday)))n=prevDay(n);n=findWeekday(n,t[t.length-1],nextDay),n=updateFormatted(n),a&&(n=updateRelative(n,a,n.hasTime))}return n}function getStartOfMonth(e){let t=copyTimestamp(e);return t.day=DAY_MIN,t=updateFormatted(t),t}function getEndOfMonth(e){let t=copyTimestamp(e);return t.day=daysInMonth(t.year,t.month),t=updateFormatted(t),t}function parseTime(e){const t=Object.prototype.toString.call(e);switch(t){case"[object Number]":return e;case"[object String]":{const a=PARSE_TIME.exec(e);return a?60*parseInt(a[1],10)+parseInt(a[3]||"0",10):!1}case"[object Object]":return"object"!==typeof e||"number"!==typeof e.hour||"number"!==typeof e.minute?!1:"object"===typeof e&&"hour"in e&&"minute"in e&&60*e.hour+e.minute}return!1}function compareTimestamps(e,t){return!(!e||!t)&&e.year===t.year&&e.month===t.month&&e.day===t.day&&e.hour===t.hour&&e.minute===t.minute}function compareDate(e,t){return getDate(e)===getDate(t)}function compareTime(e,t){return getTime(e)===getTime(t)}function compareDateTime(e,t){return getDateTime(e)===getDateTime(t)}function parseTimestamp(e,t=null){let a=parsed(e);return a?(a=updateFormatted(a),t&&(a=updateRelative(a,t,a.hasTime)),a):null}function getDayIdentifier(e){return 1e8*(e.year??0)+1e6*(e.month??0)+1e4*(e.day??0)}function getTimeIdentifier(e){return 100*(e.hour??0)+(e.minute??0)}function getDayTimeIdentifier(e){return getDayIdentifier(e)+getTimeIdentifier(e)}function diffTimestamp(e,t,a=!1){const n=Date.UTC(e.year??0,(e.month??1)-1,e.day??1,e.hour??0,e.minute??0),r=Date.UTC(t.year??0,(t.month??1)-1,t.day??1,t.hour??0,t.minute??0);return!0===a&&r<n?0:r-n}function updateRelative(e,t,a=!1){let n=copyTimestamp(e),r=getDayIdentifier(t),o=getDayIdentifier(n),i=r===o;return n.hasTime&&a&&i&&(r=getTimeIdentifier(t),o=getTimeIdentifier(n),i=r===o),n.past=o<r,n.current=i,n.future=o>r,n.currentWeekday=n.weekday===t.weekday,n}function updateMinutes(e,t,a=null){let n=copyTimestamp(e);return n.hasTime=!0,n.hour=Math.floor(t/TIME_CONSTANTS.MINUTES_IN.HOUR),n.minute=t%TIME_CONSTANTS.MINUTES_IN.HOUR,n.time=getTime(n),a&&(n=updateRelative(n,a,!0)),n}function updateWeekday(e){let t=copyTimestamp(e);return t.weekday=getWeekday(t),t}function updateDayOfYear(e){let t=copyTimestamp(e);return t.doy=getDayOfYear(t)||0,t}function updateWorkWeek(e){let t=copyTimestamp(e);return t.workweek=getWorkWeek(t),t}function updateDisabled(e,t,a,n,r){let o=copyTimestamp(e);const i=getDayIdentifier(o);if(void 0!==t){const l=parsed(t);if(l){const c=getDayIdentifier(l);i<=c&&(o.disabled=!0)}}if(!0!==o.disabled&&void 0!==a){const m=parsed(a);if(m){const p=getDayIdentifier(m);i>=p&&(o.disabled=!0)}}if(!0!==o.disabled&&Array.isArray(n)&&n.length>0)for(var u in n)if(n[u]===o.weekday){o.disabled=!0;break}if(!0!==o.disabled&&Array.isArray(r)&&r.length>0)for(var s in r)if(Array.isArray(r[s])&&2===r[s].length&&r[s][0]&&r[s][1]){const v=parsed(r[s][0]),y=parsed(r[s][1]);if(v&&y&&isBetweenDates(o,v,y)){o.disabled=!0;break}}else{const f=r[s];if(Array.isArray(f))for(var d of f){const g=parseTimestamp(d);if(g){const h=getDayIdentifier(g);if(h===i){o.disabled=!0;break}}}else if(f){const T=parseTimestamp(f);if(T){const D=getDayIdentifier(T);D===i&&(o.disabled=!0)}}}return o}function updateFormatted(e){let t=copyTimestamp(e);return t.hasTime=!0,t.time=getTime(t),t.date=getDate(t),t.weekday=getWeekday(t),t.doy=getDayOfYear(t)||0,t.workweek=getWorkWeek(t),t}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){let t=copyTimestamp(e);if(0===t.year){const r=parseTimestamp(today());r&&(t=r)}const a=new Date(Date.UTC(t.year,t.month-1,t.day)),n=4;a.setUTCDate(a.getUTCDate()-(a.getUTCDay()+6)%7+n),a.setUTCDate(a.getUTCDate()+n-(a.getUTCDay()||7));e=new Date(Date.UTC(a.getUTCFullYear(),0,1)),e=Math.ceil(((a.valueOf()-e.valueOf())/864e5+1)/7);return e}function getWeekday(e){let t=e.weekday;if(e.hasDay){const a=Math.floor,n=e.day,r=(e.month+9)%MONTH_MAX+1,o=a(e.year/100),i=e.year%100-(e.month<=2?1:0);t=((n+a(2.6*r-.2)-2*o+i+a(i/4)+a(o/4))%7+7)%7}return t??0}function copyTimestamp(e){return{...e}}function getDate(e){let 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):"00:00")}function moveRelativeDays(e,t=nextDay,a=1,n=[0,1,2,3,4,5,6]){const r=copyTimestamp(e);return relativeDays(r,t,a,n)}function relativeDays(e,t=nextDay,a=1,n=[0,1,2,3,4,5,6]){let r=copyTimestamp(e);n.includes(Number(r.weekday))||0!==r.weekday||t!==nextDay||++a;while(--a>=0)r=t(r),n.length<7&&!n.includes(Number(r.weekday))&&++a;return r}function findWeekday(e,t,a=nextDay,n=6){let r=copyTimestamp(e);while(r.weekday!==t&&--n>=0)r=a(r);return r}function createDayList(e,t,a,n=[0,1,2,3,4,5,6],r=void 0,o=void 0,i=[],u=[],s=42,d=0){const l=getDayIdentifier(e),c=getDayIdentifier(t),m=[];let p=copyTimestamp(e),v=0,y=v===c;if(!(c<l))while((!y||m.length<d)&&m.length<s){if(v=getDayIdentifier(p),y=y||v>c&&m.length>=d,y)break;if(n.includes(Number(p.weekday))){let e=copyTimestamp(p);e=updateFormatted(e),e=updateRelative(e,a),e=updateDisabled(e,r,o,i,u),m.push(e)}p=relativeDays(p,nextDay)}return m}function createIntervalList(t,a,n,r,o){const i=[];for(let e=0;e<r;++e){const u=(a+e)*n,s=copyTimestamp(t);i.push(updateMinutes(s,u,o))}return i}function createNativeLocaleFormatter(n,r){const e=()=>"";return"undefined"===typeof Intl||"undefined"===typeof Intl.DateTimeFormat?e:(t,e)=>{try{const a=new Intl.DateTimeFormat(n||void 0,r(t,e));return a.format(makeDateTime(t))}catch(e){return console.error(`Intl.DateTimeFormat: ${e.message} -> `+getDateTime(t)),""}}}function makeDate(e,t=!0){return t?new Date(Date.UTC(e.year,e.month-1,e.day,0,0)):new Date(e.year,e.month-1,e.day,0,0)}function makeDateTime(e,t=!0){return t?new Date(Date.UTC(e.year,e.month-1,e.day,e.hour,e.minute)):new Date(e.year,e.month-1,e.day,e.hour,e.minute)}function validateNumber(e){return isFinite(Number(e))}function maxTimestamp(e,t=!1){const a=!0===t?getDayTimeIdentifier:getDayIdentifier;return e.reduce((e,t)=>{return Math.max(a(e),a(t))===a(e)?e:t})}function minTimestamp(e,t=!1){const a=!0===t?getDayTimeIdentifier:getDayIdentifier;return e.reduce((e,t)=>{return Math.min(a(e),a(t))===a(e)?e:t})}function isBetweenDates(e,t,a,n=!1){const r=getDayIdentifier(e)+(!0===n?getTimeIdentifier(e):0),o=getDayIdentifier(t)+(!0===n?getTimeIdentifier(t):0),i=getDayIdentifier(a)+(!0===n?getTimeIdentifier(a):0);return r>=o&&r<=i}function isOverlappingDates(e,t,a,n){const r=getDayIdentifier(e),o=getDayIdentifier(t),i=getDayIdentifier(a),u=getDayIdentifier(n);return r>=i&&r<=u||o>=i&&o<=u||i>=r&&o>=u}function addToDate(e,t){const a=copyTimestamp(e);return t.year&&(a.year+=t.year),t.month&&(a.month+=t.month),t.day&&(a.day+=t.day),t.hour&&(a.hour+=t.hour),t.minute&&(a.minute+=t.minute),updateFormatted(normalizeTimestamp(a))}function normalizeTimestamp(e){const t=new Date(e.year,e.month-1,e.day,e.hour,e.minute);return{...e,year:t.getFullYear(),month:t.getMonth()+1,day:t.getDate(),hour:t.getHours(),minute:t.getMinutes()}}function daysBetween(e,t){const a=diffTimestamp(e,t,!0);return Math.floor(a/TIME_CONSTANTS.MILLISECONDS_IN.DAY)}function weeksBetween(e,t){let a=copyTimestamp(e),n=copyTimestamp(t);return a=findWeekday(a,0),n=findWeekday(n,6),Math.ceil(daysBetween(a,n)/TIME_CONSTANTS.DAYS_IN.WEEK)}const weekdayDateMap={Sun:new Date("2020-01-05T00:00:00.000Z"),Mon:new Date("2020-01-06T00:00:00.000Z"),Tue:new Date("2020-01-07T00:00:00.000Z"),Wed:new Date("2020-01-08T00:00:00.000Z"),Thu:new Date("2020-01-09T00:00:00.000Z"),Fri:new Date("2020-01-10T00:00:00.000Z"),Sat:new Date("2020-01-11T00:00:00.000Z")};function getWeekdayFormatter(){const e=()=>"",r={long:{timeZone:"UTC",weekday:"long"},short:{timeZone:"UTC",weekday:"short"},narrow:{timeZone:"UTC",weekday:"narrow"}};return"undefined"===typeof Intl||"undefined"===typeof Intl.DateTimeFormat?e:t;function t(t,e,a){try{const n=new Intl.DateTimeFormat(a||void 0,r[e]||r["long"]);return n.format(weekdayDateMap[t])}catch(e){return e instanceof Error&&console.error(`Intl.DateTimeFormat: ${e.message} -> day of week: `+t),""}}}function getWeekdayNames(t,a){const e=Object.keys(weekdayDateMap),n=getWeekdayFormatter();return e.map(e=>String(n(e,t,a)))}function getMonthFormatter(){const e=()=>"",o={long:{timeZone:"UTC",month:"long"},short:{timeZone:"UTC",month:"short"},narrow:{timeZone:"UTC",month:"narrow"}};return"undefined"===typeof Intl||"undefined"===typeof Intl.DateTimeFormat?e:t;function t(t,e,a){try{const n=new Intl.DateTimeFormat(a||void 0,o[e]||o["long"]),r=new Date;return r.setDate(1),r.setMonth(t),n.format(r)}catch(e){return e instanceof Error&&console.error(`Intl.DateTimeFormat: ${e.message} -> month: `+t),""}}}function getMonthNames(t,a){const n=getMonthFormatter();return[...Array(12).keys()].map(e=>n(e,t,a))}var Timestamp={PARSE_DATETIME:PARSE_DATETIME,PARSE_DATE:PARSE_DATE,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,TIME_CONSTANTS:TIME_CONSTANTS,FIRST_HOUR:FIRST_HOUR,today:today,getStartOfWeek:getStartOfWeek,getEndOfWeek:getEndOfWeek,getStartOfMonth:getStartOfMonth,getEndOfMonth:getEndOfMonth,parseTime:parseTime,validateTimestamp:validateTimestamp,parsed:parsed,parseTimestamp:parseTimestamp,parseDate:parseDate,getDayIdentifier:getDayIdentifier,getTimeIdentifier:getTimeIdentifier,getDayTimeIdentifier:getDayTimeIdentifier,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,createDayList:createDayList,createIntervalList:createIntervalList,createNativeLocaleFormatter:createNativeLocaleFormatter,makeDate:makeDate,makeDateTime:makeDateTime,validateNumber:validateNumber,isBetweenDates:isBetweenDates,isOverlappingDates:isOverlappingDates,daysBetween:daysBetween,weeksBetween:weeksBetween,addToDate:addToDate,compareTimestamps:compareTimestamps,compareDate:compareDate,compareTime:compareTime,compareDateTime:compareDateTime,getWeekdayFormatter:getWeekdayFormatter,getWeekdayNames:getWeekdayNames,getMonthFormatter:getMonthFormatter,getMonthNames:getMonthNames},Timestamp$1=Object.freeze({__proto__:null,DAYS_IN_MONTH:DAYS_IN_MONTH,DAYS_IN_MONTH_LEAP:DAYS_IN_MONTH_LEAP,DAYS_IN_MONTH_MAX:DAYS_IN_MONTH_MAX,DAYS_IN_MONTH_MIN:DAYS_IN_MONTH_MIN,DAY_MIN:DAY_MIN,FIRST_HOUR:FIRST_HOUR,MONTH_MAX:MONTH_MAX,MONTH_MIN:MONTH_MIN,PARSE_DATE:PARSE_DATE,PARSE_DATETIME:PARSE_DATETIME,PARSE_TIME:PARSE_TIME,TIME_CONSTANTS:TIME_CONSTANTS,addToDate:addToDate,compareDate:compareDate,compareDateTime:compareDateTime,compareTime:compareTime,compareTimestamps:compareTimestamps,copyTimestamp:copyTimestamp,createDayList:createDayList,createIntervalList:createIntervalList,createNativeLocaleFormatter:createNativeLocaleFormatter,daysBetween:daysBetween,daysInMonth:daysInMonth,default:Timestamp,diffTimestamp:diffTimestamp,findWeekday:findWeekday,getDate:getDate,getDateTime:getDateTime,getDayIdentifier:getDayIdentifier,getDayOfYear:getDayOfYear,getDayTimeIdentifier:getDayTimeIdentifier,getEndOfMonth:getEndOfMonth,getEndOfWeek:getEndOfWeek,getMonthFormatter:getMonthFormatter,getMonthNames:getMonthNames,getStartOfMonth:getStartOfMonth,getStartOfWeek:getStartOfWeek,getTime:getTime,getTimeIdentifier:getTimeIdentifier,getWeekday:getWeekday,getWeekdayFormatter:getWeekdayFormatter,getWeekdayNames:getWeekdayNames,getWorkWeek:getWorkWeek,isBetweenDates:isBetweenDates,isLeapYear:isLeapYear,isOverlappingDates:isOverlappingDates,isToday:isToday,makeDate:makeDate,makeDateTime:makeDateTime,maxTimestamp:maxTimestamp,minTimestamp:minTimestamp,moveRelativeDays:moveRelativeDays,nextDay:nextDay,padNumber:padNumber,parseDate:parseDate,parseTime:parseTime,parseTimestamp:parseTimestamp,parsed:parsed,prevDay:prevDay,relativeDays:relativeDays,today:today,updateDayOfYear:updateDayOfYear,updateDisabled:updateDisabled,updateFormatted:updateFormatted,updateMinutes:updateMinutes,updateRelative:updateRelative,updateWeekday:updateWeekday,updateWorkWeek:updateWorkWeek,validateNumber:validateNumber,validateTimestamp:validateTimestamp,weeksBetween:weeksBetween});function convertToUnit(e,t="px"){if(e)return isNaN(e)?String(e):"auto"===e?e:""+Number(e)+t}function indexOf(t,a){for(let e=0;e<t.length;e++)if(!0===a(t[e],e))return e;return-1}function minCharWidth(e,t){return 0===t?e:e.slice(0,t)}var helpers={convertToUnit:convertToUnit,indexOf:indexOf,minCharWidth:minCharWidth},helpers$1=Object.freeze({__proto__:null,convertToUnit:convertToUnit,default:helpers,indexOf:indexOf,minCharWidth:minCharWidth});const ResizeObserverDirective={mounted(e,t){if("function"===typeof t.value){const a=t.value,n={callback:a,size:{width:0,height:0},observer:new ResizeObserver(e=>{const t=e[0].contentRect;t.width===n.size.width&&t.height===n.size.height||(n.size.width=t.width,n.size.height=t.height,n.debounceTimeout&&clearTimeout(n.debounceTimeout),n.debounceTimeout=setTimeout(()=>{n.callback(n.size),n.debounceTimeout=void 0},100))})};n.observer.observe(e),e.__onResizeObserver=n}},beforeUnmount(e){if(e.__onResizeObserver){const{observer:t,debounceTimeout:a}=e.__onResizeObserver;a&&clearTimeout(a),t.unobserve(e),delete e.__onResizeObserver}}};function useCalendar(t,a,{scrollArea:e,pane:n}){if(!a){const l="[error: renderCalendar] no renderFunc has been supplied to useCalendar";throw console.error(l),new Error(l)}const r=reactive({width:0,height:0}),o=ref(null);function i({width:e,height:t}){r.width=e,r.height=t}const u=computed(()=>{return!0!==t.noScroll&&e.value&&n.value&&r.height?e.value.offsetWidth-n.value.offsetWidth:0});function s(){}function d(){const e={ref:o,role:"complementary",lang:t.locale,class:`q-calendar ${t.dark?"q-calendar--dark":""} `+(t.bordered?"q-calendar__bordered":"")};return withDirectives(h("div",{...e},[a()]),[[ResizeObserverDirective,i]])}return{rootRef:o,scrollWidth:u,__initCalendar:s,__renderCalendar:d}}const isValidFocusType=e=>e.every(e=>["day","date","weekday","interval","time","resource","task"].includes(e)),useCommonProps={modelValue:{type:String,default:today(),validator:e=>""===e||validateTimestamp(e)},weekdays:{type:Array,default:()=>[0,1,2,3,4,5,6]},dateType:{type:String,default:"round",validator:e=>["round","rounded","square"].includes(e)},weekdayAlign:{type:String,default:"center",validator:e=>["left","center","right"].includes(e)},dateAlign:{type:String,default:"center",validator:e=>["left","center","right"].includes(e)},bordered:Boolean,dark:Boolean,noAria:Boolean,noActiveDate:Boolean,noHeader:Boolean,noScroll:Boolean,shortWeekdayLabel:Boolean,noDefaultHeaderText:Boolean,noDefaultHeaderBtn:Boolean,minWeekdayLabel:{type:[Number,String],default:1},weekdayBreakpoints:{type:Array,default:()=>[75,35],validator:e=>2===e.length},locale:{type:String,default:"en-US"},animated:Boolean,transitionPrev:{type:String,default:"slide-right"},transitionNext:{type:String,default:"slide-left"},disabledDays:Array,disabledBefore:String,disabledAfter:String,disabledWeekdays:{type:Array,default:()=>[]},dragEnterFunc:Function,dragOverFunc:Function,dragLeaveFunc:Function,dropFunc:Function,selectedDates:{type:[Array,Set],default:()=>[]},selectedStartEndDates:{type:Array,default:()=>[]},hoverable:Boolean,focusable:Boolean,focusType:{type:Array,default:()=>["date"],validator:isValidFocusType}};function useCommon(t,{startDate:e,endDate:a,times:n}){const r=computed(()=>parseTimestamp(e.value)),o=computed(()=>{return"0000-00-00"===a.value?getEndOfWeek(r.value,t.weekdays,n.today):parseTimestamp(a.value)||r.value}),i=computed(()=>createNativeLocaleFormatter(t.locale,()=>({timeZone:"UTC",day:"numeric"}))),u=computed(()=>createNativeLocaleFormatter(t.locale,(e,t)=>({timeZone:"UTC",weekday:t?"short":"long"}))),s=computed(()=>createNativeLocaleFormatter(t.locale,()=>({timeZone:"UTC",dateStyle:"full"})));function d(e,t){return e&&e.length>0&&e.includes(t.date)}function l(e,t){const a={firstDay:!1,betweenDays:!1,lastDay:!1};if(2===e.length){const n=getDayIdentifier(t),r=getDayIdentifier(parsed(e[0])),o=getDayIdentifier(parsed(e[1]));a.firstDay=r===n,a.lastDay=o===n,a.betweenDays=r<n&&o>n}return a}function c(e,t=!1,a=[],n=[],r=!1){const o=d(a,e),{firstDay:i,lastDay:u,betweenDays:s}=l(n,e);return{"q-past-day":!i&&!s&&!u&&!o&&!t&&!!e.past,"q-future-day":!i&&!s&&!u&&!o&&!t&&!!e.future,"q-outside":t,"q-current-day":!!e.current,"q-selected":o,"q-range-first":i,"q-range":s,"q-range-last":u,"q-range-hover":r&&(i||u||s),"q-disabled-day disabled":!0===e.disabled}}function m(e){return getStartOfWeek(e,t.weekdays,n.today)}function p(e){return getEndOfWeek(e,t.weekdays,n.today)}function v(){return{}}return{parsedStart:r,parsedEnd:o,dayFormatter:i,weekdayFormatter:u,ariaDateFormatter:s,arrayHasDate:d,checkDays:l,getRelativeClasses:c,startOfWeek:m,endOfWeek:p,dayStyleDefault:v}}function scrollTo(e,t){e instanceof Window?e.scrollTo({top:t,behavior:"instant"}):e.scrollTop=t}function getVerticalScrollPosition(e){return e instanceof Window?e.scrollY:e.scrollTop}function animVerticalScrollTo(o,i,u=500,s=performance.now(),d=getVerticalScrollPosition(o)){u<=0||d===i?scrollTo(o,i):requestAnimationFrame(e=>{const t=e-s,a=Math.min(t/u,1),n=e=>e<.5?2*e*e:(4-2*e)*e-1,r=d+(i-d)*n(a);scrollTo(o,r),a<1&&animVerticalScrollTo(o,i,u,s,d)})}function animHorizontalScrollTo(r,e,o=500){const i=r.scrollLeft,u=e-i;let s=null;function d(e){null===s&&(s=e);const t=e-s,a=Math.min(t/o,1),n=e=>e<.5?2*e*e:(4-2*e)*e-1;r.scrollLeft=i+u*n(a),t<o&&requestAnimationFrame(d)}requestAnimationFrame(d)}const useIntervalProps={view:{type:String,validator:e=>["day","week","month","month-interval"].includes(e),default:"day"},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},intervalClass:{type:Function,default:null},weekdayStyle:{type:Function,default:null},weekdayClass:{type:Function,default:null},showIntervalLabel:{type:Function,default:null},hour24Format:Boolean,timeClicksClamped:Boolean,dateHeader:{type:String,default:"stacked",validator:e=>["stacked","inline","inverted"].includes(e)}},useResourceProps={modelResources:{type:Array},resourceKey:{type:String,default:"id"},resourceLabel:{type:String,default:"label"},resourceHeight:{type:[Number,String],default:0,validator:validateNumber},resourceMinHeight:{type:[Number,String],default:70,validator:validateNumber},resourceStyle:{type:Function,default:null},resourceClass:{type:Function,default:null},cellWidth:{type:[Number,String],default:100},intervalHeaderHeight:{type:[Number,String],default:20,validator:validateNumber},noSticky:Boolean};function useInterval(o,{times:t,scrollArea:n,parsedStart:e,parsedEnd:a,maxDays:r,size:i,headerColumnRef:u}){const s=computed(()=>parseInt(String(o.intervalStart),10)),m=computed(()=>parseInt(String(o.intervalMinutes),10)),d=computed(()=>parseInt(String(o.intervalCount),10)),p=computed(()=>parseFloat(String(o.intervalHeight))),v=computed(()=>{let e=0;const t=Number(o.columnCount);return o.cellWidth?e=Number(o.cellWidth):i.width>0&&u.value&&(e=u.value.offsetWidth/(t>1?t:r.value)),e}),l=computed(()=>s.value*m.value),c=computed(()=>d.value*p.value),y=computed(()=>d.value*v.value),f=computed(()=>D(e.value)),g=computed(()=>k(a.value)),h=computed(()=>{return createDayList(e.value,a.value,t.today,o.weekdays,o.disabledBefore,o.disabledAfter,o.disabledWeekdays,o.disabledDays,r.value)}),T=computed(()=>{return h.value.map(e=>createIntervalList(e,s.value,m.value,d.value,t.now))});function D(e){return getStartOfWeek(e,o.weekdays,t.today)}function k(e){return getEndOfWeek(e,o.weekdays,t.today)}function w(e,t){return e&&e.length>0&&e.includes(getDateTime(t))}function N(e,t){const a={firstDay:!1,betweenDays:!1,lastDay:!1};if(e&&2===e.length){const n=getDayTimeIdentifier(t),r=getDayTimeIdentifier(parsed(e[0])),o=getDayTimeIdentifier(parsed(e[1]));a.firstDay=r===n,a.lastDay=o===n,a.betweenDays=r<n&&o>n}return a}function M(e,t=[],a=[]){const n=w(t,e),{firstDay:r,lastDay:o,betweenDays:i}=N(a,e);return{"q-selected":n,"q-range-first":!0===r,"q-range":!0===i,"q-range-last":!0===o,"q-disabled-interval disabled":!0===e.disabled}}function _(e,t,a){return[]}const I=computed(()=>{const a={timeZone:"UTC",hour12:!o.hour24Format,hour:"2-digit",minute:"2-digit"},n={timeZone:"UTC",hour12:!o.hour24Format,hour:"numeric",minute:"2-digit"},r={timeZone:"UTC",hour12:!o.hour24Format,hour:"numeric"};return createNativeLocaleFormatter(o.locale,(e,t)=>t?0===e.minute?r:n:a)}),b=computed(()=>{const e={timeZone:"UTC",dateStyle:"full",timeStyle:"short"};return createNativeLocaleFormatter(o.locale,()=>e)});function S(e){const t=T.value[0][0],a=t.hour===e.hour&&t.minute===e.minute;return!a&&0===e.minute}function E(e){}function O(e){return{}}function A(e,t,a=!1,n){let r=copyTimestamp(t);if(e.currentTarget){const o=e.currentTarget.getBoundingClientRect(),i=e,u=e,s=i.changedTouches||i.touches,d=(s&&s[0]?s[0]:u).clientY,l=(d-o.top)/p.value,c=Math.floor((a?Math.floor(l):l)*m.value);0!==c&&(r=addToDate(r,{minute:c})),n&&(r=updateRelative(r,n,!0))}return r}function H(e,t,a=!1,n){let r=copyTimestamp(t);const o=e.currentTarget.getBoundingClientRect(),i=e,u=e,s=i.changedTouches||i.touches,d=(s&&s[0]?s[0]:u).clientY,l=(d-o.top)/p.value,c=Math.floor((a?Math.floor(l):l)*m.value);return 0!==c&&(r=addToDate(r,{minute:c})),n&&(r=updateRelative(r,n,!0)),r}function x(e,t,a=!1,n){let r=copyTimestamp(t);if(e.currentTarget){const o=e.currentTarget.getBoundingClientRect(),i=e,u=e,s=i.changedTouches||i.touches,d=(s&&s[0]?s[0]:u).clientX,l=(d-o.left)/v.value,c=Math.floor((a?Math.floor(l):l)*m.value);0!==c&&(r=addToDate(r,{minute:c})),n&&(r=updateRelative(r,n,!0))}return r}function U(e,t){const a={timestamp:e,timeStartPos:C,timeDurationHeight:F};return void 0!==t&&(a.columnIndex=t),a}function L(e,t){const a={timestamp:copyTimestamp(e),timeStartPosX:R,timeDurationWidth:W};return void 0!==t&&(a.index=t),a}function Y(e,t=0){const a=C(e);return!(!1===a||!n.value)&&(animVerticalScrollTo(n.value,a,t),!0)}function P(e,t=0){const a=R(e);return!(!1===a||!n.value)&&(animHorizontalScrollTo(n.value,a,t),!0)}function F(e){return e/m.value*p.value}function W(e){return e/m.value*v.value}function q(e){return e*m.value/p.value}function B(e){return e*m.value/v.value}function C(e,t=!0){const a=parseTime(e);if(!1===a)return!1;const n=l.value,r=d.value*m.value,o=(a-n)/r;let i=o*c.value;return t&&(i<0&&(i=0),i>c.value)&&(i=c.value),i}function R(e,t=!0){const a=parseTime(e);if(!1===a)return!1;const n=l.value,r=d.value*m.value,o=(a-n)/r;let i=o*y.value;return t&&(i<0&&(i=0),i>y.value)&&(i=y.value),i}return{parsedIntervalStart:s,parsedIntervalMinutes:m,parsedIntervalCount:d,parsedIntervalHeight:p,parsedCellWidth:v,parsedStartMinute:l,bodyHeight:c,bodyWidth:y,parsedWeekStart:f,parsedWeekEnd:g,days:h,intervals:T,intervalFormatter:I,ariaDateTimeFormatter:b,arrayHasDateTime:w,checkIntervals:N,getIntervalClasses:M,getResourceClasses:_,showIntervalLabelDefault:S,showResourceLabelDefault:E,styleDefault:O,getTimestampAtEventInterval:A,getTimestampAtEvent:H,getTimestampAtEventX:x,getScopeForSlot:U,getScopeForSlotX:L,scrollToTime:Y,scrollToTimeX:P,timeDurationHeight:F,timeDurationWidth:W,heightToMinutes:q,widthToMinutes:B,timeStartPos:C,timeStartPosX:R}}const useColumnProps={columnCount:{type:[Number,String],default:0,validator:validateNumber},columnIndexStart:{type:[Number,String],default:0,validator:validateNumber}},useMaxDaysProps={maxDays:{type:Number,default:1}},useTimesProps={now:{type:String,validator:e=>""===e||validateTimestamp(e),default:""}};function useTimes(e){const t=reactive({now:parseTimestamp("0000-00-00 00:00"),today:parseTimestamp("0000-00-00")}),a=computed(()=>e.now?parseTimestamp(e.now):o());function n(){t.now&&t.today&&(t.now.current=t.today.current=!0,t.now.past=t.today.past=!1,t.now.future=t.today.future=!1)}function r(){const e=a.value||o();i(e,t.now),u(e,t.now),i(e,t.today)}function o(){return parseDate(new Date)}function i(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)}function u(e,t){e.time!==t.time&&(t.hour=e.hour,t.minute=e.minute,t.time=e.time)}return watch(a,()=>r()),{times:t,parsedNow:a,setCurrent:n,updateCurrent:r,getNow:o,updateDay:i,updateTime:u}}function useRenderValues(r,{parsedView:o,parsedValue:i,times:u}){const e=computed(()=>{const e=i.value;let t=r.maxDays,a=e,n=e;switch(o.value){case"month":a=getStartOfMonth(e),n=getEndOfMonth(e),t=daysInMonth(a.year,a.month);break;case"week":case"week-agenda":case"week-scheduler":a=getStartOfWeek(e,r.weekdays,u.today),n=getEndOfWeek(a,r.weekdays,u.today),t=r.weekdays.length;break;case"day":case"scheduler":case"agenda":n=moveRelativeDays(copyTimestamp(n),nextDay,t>1?t-1:t,r.weekdays),n=updateFormatted(n);break;case"month-interval":case"month-scheduler":case"month-agenda":a=getStartOfMonth(e),n=getEndOfMonth(e),n=updateFormatted(n),t=daysInMonth(a.year,a.month);break;case"resource":t=1,n=moveRelativeDays(copyTimestamp(n),nextDay,t,r.weekdays),n=updateFormatted(n);break}return{start:a,end:n,maxDays:t}});return{renderValues:e}}const toCamelCase=e=>e.replace(/(-\w)/g,e=>e[1].toUpperCase());function getMouseEventHandlers(t,e,a,n){const r={};for(const o in a){const i=a[o],u=toCamelCase("on-"+o);if(!e.value)return console.warn("$listeners has not been set up"),{};if(void 0!==e.value[u]){const s="on"+i.event.charAt(0).toUpperCase()+i.event.slice(1),d=e=>{return(void 0===i.button||"buttons"in e&&e.buttons>0&&e.button===i.button)&&(i.prevent&&e.preventDefault(),i.stop&&e.stopPropagation(),t(o,n(e,o))),i.result};s in r?Array.isArray(r[s])?r[s].push(d):r[s]=[r[s],d]:r[s]=d}}return r}function getDefaultMouseEventHandlers(e,t,a,n){return getMouseEventHandlers(e,t,getMouseEventName(a),n)}function getMouseEventName(e){return{["click"+e]:{event:"click"},["contextmenu"+e]:{event:"contextmenu",prevent:!0,result:!1},["mousedown"+e]:{event:"mousedown"},["mousemove"+e]:{event:"mousemove"},["mouseup"+e]:{event:"mouseup"},["mouseenter"+e]:{event:"mouseenter"},["mouseleave"+e]:{event:"mouseleave"},["touchstart"+e]:{event:"touchstart"},["touchmove"+e]:{event:"touchmove"},["touchend"+e]:{event:"touchend"}}}function getRawMouseEvents(e){return Object.keys(getMouseEventName(e))}function useMouseEvents(a,n){return{getMouseEventHandlers:(e,t)=>getMouseEventHandlers(a,n,e,t),getDefaultMouseEventHandlers:(e,t)=>getDefaultMouseEventHandlers(a,n,e,t),getMouseEventName:getMouseEventName,getRawMouseEvents:getRawMouseEvents}}const useMoveEmits=["moved"];function useMove(s,{parsedView:d,parsedValue:l,direction:c,maxDays:m,times:p,emittedValue:v,emit:y}){function e(a=1){if(0===a)v.value=today();else{let e=copyTimestamp(l.value);const n=getEndOfMonth(e),r=a>0,o=r?nextDay:prevDay,i=r?n.day:1;let t=r?a:-a;c.value=r?"next":"prev";const u=s.weekdays.length;while(--t>=0)switch(d.value){case"month":e.day=i,e=o(e),e=updateWeekday(e);while(!s.weekdays.includes(Number(e.weekday)))e=addToDate(e,{day:r?1:-1});break;case"week":case"week-agenda":case"week-scheduler":e=relativeDays(e,o,u,s.weekdays);break;case"day":case"scheduler":case"agenda":e=relativeDays(e,o,m.value,s.weekdays);break;case"month-interval":case"month-agenda":case"month-scheduler":e.day=i,e=o(e);break;case"resource":e=relativeDays(e,o,m.value,s.weekdays);break}e=updateWeekday(e),e=updateFormatted(e),e=updateDayOfYear(e),e=updateRelative(e,p.now),v.value=e.date,y("moved",e)}}return{move:e}}const listenerRE=/^on[A-Z]/;function useEmitListeners(e=getCurrentInstance()){return{emitListeners:computed(()=>{const t={};return e?.vnode?.props&&Object.keys(e.vnode.props).forEach(e=>{listenerRE.test(e)&&(t[e]=!0)}),t})}}function useFocusHelper(){const e={"aria-hidden":"true",class:"q-calendar__focus-helper"};return[h("span",e)]}const useCheckChangeEmits=["change"];function useCheckChange(n,{days:r,lastStart:o,lastEnd:i}){function e(){const e=r.value;if(0===e.length)return!1;const t=e[0].date,a=e[e.length-1].date;return(!o.value||!i.value||t!==o.value||a!==i.value)&&(o.value=t,i.value=a,n("change",{start:t,end:a,days:e}),!0)}return{checkChange:e}}function useEventUtils(){function e(e,t){return(Array.isArray(t)?t:[t]).includes(e.keyCode)}return{isKeyCode:e}}const isKeyCode=useEventUtils().isKeyCode,useNavigationProps={useNavigation:Boolean};function useNavigation(t,{rootRef:a,focusRef:n,focusValue:r,datesRef:o,parsedView:i,emittedValue:u,direction:s,times:d}){let e=!1;function l(){e||document&&(e=!0,document.addEventListener("keyup",y),document.addEventListener("keydown",v))}function c(){document&&(document.removeEventListener("keyup",y),document.removeEventListener("keydown",v),e=!1)}function m(e){if(e&&document){const t=document.activeElement;if(t!==document.body&&a.value?.contains(t))return!0}return!1}function p(){let t=0;const a=window.setInterval(()=>{const e=o.value[n.value];e&&(e.focus(),50!==++t)&&document.activeElement!==e||window.clearInterval(a)},250)}function v(e){m(e)&&isKeyCode(e,[33,34,35,36,37,38,39,40])&&(e.stopPropagation(),e.preventDefault())}function y(e){if(m(e)&&isKeyCode(e,[33,34,35,36,37,38,39,40])){const t={33:D,34:k,35:N,36:w,37:h,38:f,39:T,40:g};t[e.keyCode]?.()}}function f(){let e=copyTimestamp(r.value);if("month"===i.value){if(e=addToDate(e,{day:-7}),r.value.month!==e.month)return s.value="prev",void(u.value=e.date)}else e=addToDate(e,{minute:Number(t.intervalMinutes)});s.value="prev",n.value=e.date}function g(){let e=copyTimestamp(r.value);if("month"===i.value){if(e=addToDate(e,{day:7}),r.value.month!==e.month)return s.value="next",void(u.value=e.date)}else e=addToDate(e,{minute:Number(t.intervalMinutes)});s.value="next",n.value=e.date}function h(){let e=copyTimestamp(r.value);s.value="prev";do{e=addToDate(e,{day:-1})}while(!t.weekdays.includes(Number(e.weekday)));n.value=e.date}function T(){let e=copyTimestamp(r.value);s.value="next";do{e=addToDate(e,{day:1})}while(!t.weekdays.includes(Number(e.weekday)));n.value=e.date}function D(){let e=copyTimestamp(r.value);e="month"===i.value?addToDate(e,{month:-1}):addToDate(e,{day:-7}),s.value="prev",n.value=e.date}function k(){let e=copyTimestamp(r.value);e="month"===i.value?addToDate(e,{month:1}):addToDate(e,{day:7}),s.value="next",n.value=e.date}function w(){let e=copyTimestamp(r.value);e="month"===i.value?getStartOfMonth(e):getStartOfWeek(e,t.weekdays||[],d.today);while(!t.weekdays.includes(Number(e.weekday)))e=addToDate(e,{day:-1});n.value=e.date}function N(){let e=copyTimestamp(r.value);e="month"===i.value?getEndOfMonth(e):getEndOfWeek(e,t.weekdays||[],d.today);while(!t.weekdays.includes(Number(e.weekday)))e=addToDate(e,{day:-1});n.value=e.date}return onBeforeUnmount(()=>{c()}),watch(()=>t.useNavigation,e=>{(!0===e?l:c)()}),!0===t.useNavigation&&l(),{startNavigation:l,endNavigation:c,tryFocus:p}}var QCalendarResource=defineComponent({name:"QCalendarResource",props:{...useCommonProps,...useResourceProps,...useIntervalProps,...useColumnProps,...useMaxDaysProps,...useTimesProps,...useNavigationProps},emits:["update:model-value","update:model-resources","resource-expanded",...useCheckChangeEmits,...useMoveEmits,...getRawMouseEvents("-date"),...getRawMouseEvents("-interval"),...getRawMouseEvents("-head-day"),...getRawMouseEvents("-time"),...getRawMouseEvents("-head-resources"),...getRawMouseEvents("-resource")],setup(p,{slots:v,emit:m,expose:x}){const e=ref(null),U=ref(null),L=ref(null),t=ref(null),y=ref(p.modelValue||today()),a=ref(parsed(p.modelValue||today())),f=ref({}),g=ref({}),i=ref("next"),u=ref(p.modelValue||today()),s=ref("0000-00-00"),d=ref(0),r=ref(p.modelValue),l=reactive({width:0,height:0}),T=ref(""),D=ref(""),k=ref(""),Y=ref(null),P=ref(null),n=(watch(()=>p.view,()=>{d.value=0}),computed(()=>{return"month"===p.view?"month-interval":p.view})),w=computed(()=>{return parseInt(String(p.cellWidth),10)}),o=getCurrentInstance();if(null===o)throw new Error("current instance is null");const N=useEmitListeners(o).emitListeners,{times:c,setCurrent:q,updateCurrent:M}=useTimes(p),{parsedStart:_,parsedEnd:B,dayStyleDefault:I}=(M(),q(),useCommon(p,{startDate:u,endDate:s,times:c})),b=computed(()=>{return parseTimestamp(p.modelValue,c.now)||_.value||c.today}),V=(a.value=b.value,y.value=b.value.date,useRenderValues(p,{parsedView:n,times:c,parsedValue:b})).renderValues,{rootRef:z,__renderCalendar:X}=useCalendar(p,Te,{scrollArea:e,pane:U}),{days:S,intervals:E,intervalFormatter:K,styleDefault:Z,scrollToTimeX:$,timeDurationWidth:O,timeStartPosX:A,widthToMinutes:j}=useInterval(p,{times:c,scrollArea:e,parsedStart:_,parsedEnd:B,maxDays:d,size:l,headerColumnRef:t}),F=useMove(p,{parsedView:n,parsedValue:b,direction:i,maxDays:d,times:c,emittedValue:r,emit:m}).move,W=useMouseEvents(m,N).getDefaultMouseEventHandlers,Q=useCheckChange(m,{days:S,lastStart:Y,lastEnd:P}).checkChange,G=useEventUtils().isKeyCode,J=useNavigation(p,{rootRef:z,focusRef:y,focusValue:a,datesRef:f,parsedView:n,emittedValue:r,direction:i,times:c}).tryFocus,C=computed(()=>{const e=parseInt(String(p.resourceHeight),10);return 0===e?"auto":e}),R=computed(()=>{return parseInt(String(p.resourceMinHeight),10)}),H=computed(()=>{return parseInt(String(p.intervalHeaderHeight),10)});function ee(){r.value=today()}function te(e=1){F(e)}function ae(e=1){F(-e)}function ne({width:e,height:t}){l.width=e,l.height=t}function re(e){return e.date===r.value}function oe(){const e={height:convertToUnit(H.value)};return h("div",{ref:L,roll:"presentation",class:{"q-calendar-resource__head":!0,"q-calendar__sticky":!0!==p.noSticky},style:e},[ie(),ue()])}function ie(){const e=v["head-resources"],t=convertToUnit(H.value),a={timestamps:E,date:p.modelValue,resources:p.modelResources};return h("div",{class:{"q-calendar-resource__head--resources":!0,"q-calendar__sticky":!0!==p.noSticky},style:{height:t},...W("-head-resources",e=>{return{scope:a,event:e}})},[e&&e({scope:a})])}function ue(){return h("div",{ref:t,class:{"q-calendar-resource__head--intervals":!0}},[E.value.map(e=>e.map((e,t)=>se(e,t)))])}function se(e,t){const a=v["interval-label"],n=!0!==p.noActiveDate&&re(e),r=convertToUnit(w.value),o=convertToUnit(H.value),i=p.shortIntervalLabel,u=K.value(e,i),s={timestamp:e,index:t,label:u,droppable:T.value===u},d=p.intervalStyle||I,l={width:r,maxWidth:r,minWidth:r,height:o,...d({scope:s})},c="function"===typeof p.intervalClass?p.intervalClass({scope:s}):{},m=!0===p.focusable&&p.focusType.includes("interval");return h("div",{key:u,tabindex:!0===m?0:-1,class:{"q-calendar-resource__head--interval":!0,...c,"q-active-date":n,"q-calendar__hoverable":!0===p.hoverable,"q-calendar__focusable":!0===m},style:l,onDragenter:e=>{void 0!==p.dragEnterFunc&&"function"===typeof p.dragEnterFunc&&(!0===p.dragEnterFunc(e,"interval",{scope:s})?T.value=u:T.value="")},onDragover:e=>{void 0!==p.dragOverFunc&&"function"===typeof p.dragOverFunc&&(!0===p.dragOverFunc(e,"interval",{scope:s})?T.value=u:T.value="")},onDragleave:e=>{void 0!==p.dragLeaveFunc&&"function"===typeof p.dragLeaveFunc&&(!0===p.dragLeaveFunc(e,"interval",{scope:s})?T.value=u:T.value="")},onDrop:e=>{void 0!==p.dropFunc&&"function"===typeof p.dropFunc&&(!0===p.dropFunc(e,"interval",{scope:s})?T.value=u:T.value="")},onFocus:()=>{!0===m&&(y.value=u)},...W("-interval",e=>{return{scope:s,event:e}})},[a?a({scope:s}):u,useFocusHelper()])}function de(){return h("div",{class:"q-calendar-resource__body"},[le()])}function le(){return h("div",{ref:e,class:{"q-calendar-resource__scroll-area":!0,"q-calendar__scroll":!0}},[me()])}function ce(){return h("div",{},"No resources have been defined")}function me(){return h("div",{class:"q-calendar-resource__day--container"},[oe(),void 0===p.modelResources&&ce(),void 0!==p.modelResources&&pe()])}function pe(){const e={class:"q-calendar-resource__resources--body"};return h("div",e,ve())}function ve(e=void 0,a=0,n=!0){return void 0===e&&(e=p.modelResources),e.map((e,t)=>{return ye(e,t,a,void 0!==e.children?e.expanded:n)}).filter(e=>!!e)}function ye(e,t,a=0,n=!0){const r={},o=(r.height="auto"===C.value?C.value:convertToUnit(C.value),R.value>0&&(r.minHeight=convertToUnit(R.value)),h("div",{key:e[p.resourceKey]+"-"+t,class:{"q-calendar-resource__resource--row":!0},style:r},[fe(e,t,a,n),ge(e,t)]));return void 0!==e.children?[o,h("div",{class:{"q-calendar__child":!0,"q-calendar__child--expanded":!0===n,"q-calendar__child--collapsed":!0!==n}},[ve(e.children,a+1,!1===n?n:e.expanded)])]:[o]}function fe(t,e,a=0,n=!0){const r=v["resource-label"],o={},i=(o.height=void 0!==t.height?convertToUnit(parseInt(t.height,10)):C.value?convertToUnit(C.value):"auto",R.value>0&&(o.minHeight=convertToUnit(R.value)),p.resourceStyle||Z),u=t[p.resourceLabel],s=!0===p.focusable&&p.focusType.includes("resource")&&!0===n,d=t[p.resourceKey],l={resource:t,timestamps:E,resourceIndex:e,indentLevel:a,label:u,droppable:D.value===d},c="function"===typeof p.resourceClass?p.resourceClass({scope:l}):{};return h("div",{key:t[p.resourceKey]+"-"+e,ref:e=>{e instanceof HTMLElement&&(g.value[t[p.resourceKey]]=e)},tabindex:!0===s?0:-1,class:{"q-calendar-resource__resource":0===a,"q-calendar-resource__resource--section":0!==a,...c,"q-calendar__sticky":!0!==p.noSticky,"q-calendar__hoverable":!0===p.hoverable,"q-calendar__focusable":!0===s},style:{...o,...i({scope:l})},onDragenter:e=>{void 0!==p.dragEnterFunc&&"function"===typeof p.dragEnterFunc&&(!0===p.dragEnterFunc(e,"resource",{scope:l})?D.value=d:D.value="")},onDragover:e=>{void 0!==p.dragOverFunc&&"function"===typeof p.dragOverFunc&&(!0===p.dragOverFunc(e,"resource",{scope:l})?D.value=d:D.value="")},onDragleave:e=>{void 0!==p.dragLeaveFunc&&"function"===typeof p.dragLeaveFunc&&(!0===p.dragLeaveFunc(e,"resource",{scope:l})?D.value=d:D.value="")},onDrop:e=>{void 0!==p.dropFunc&&"function"===typeof p.dropFunc&&(!0===p.dropFunc(e,"resource",{scope:l})?D.value=d:D.value="")},onKeydown:e=>{G(e,[13,32])&&(e.stopPropagation(),e.preventDefault())},onKeyup:e=>{G(e,[13,32])&&void 0!==N.value.onClickResource&&m("click-resource",{scope:l,event:e})},...W("-resource",e=>{return{scope:l,event:e}})},[[h("div",{class:{"q-calendar__parent":void 0!==t.children,"q-calendar__parent--expanded":void 0!==t.children&&!0===t.expanded,"q-calendar__parent--collapsed":void 0!==t.children&&!0!==t.expanded},onClick:e=>{e.stopPropagation(),t.expanded=!t.expanded,m("resource-expanded",{expanded:t.expanded,scope:l})}}),h("div",{class:{"q-calendar-resource__resource--text":!0,"q-calendar__ellipsis":!0},style:{paddingLeft:10*a+2+"px"}},[r?r({scope:l}):u]),useFocusHelper()]])}function ge(t,a){const e=v["resource-intervals"],n={resource:t,timestamps:E,resourceIndex:a,timeStartPosX:A,timeDurationWidth:O};return h("div",{class:"q-calendar-resource__resource--intervals"},[E.value.map(e=>e.map(e=>he(t,e,a))),e&&e({scope:n})])}function he(t,e,a){const n=v["resource-interval"],r=!0!==p.noActiveDate&&re(e),o=t[p.resourceKey],i=e.time+"-"+o,u=!0===p.focusable&&p.focusType.includes("time"),s={activeDate:r,resource:t,timestamp:e,resourceIndex:a,droppable:k.value===i},d=p.intervalStyle||I,l=convertToUnit(w.value),c={width:l,maxWidth:l,minWidth:l,...d({scope:s})};return c.height=void 0!==t.height?convertToUnit(parseInt(t.height,10)):"auto"===C.value?C.value:convertToUnit(C.value),R.value>0&&(c.minHeight=convertToUnit(R.value)),h("div",{key:i,ref:e=>{e instanceof HTMLElement&&(f.value[t[p.resourceKey]]=e)},tabindex:!0===u?0:-1,class:{"q-calendar-resource__resource--interval":!0,"q-active-date":r,"q-calendar__hoverable":!0===p.hoverable,"q-calendar__focusable":!0===u},style:c,onDragenter:e=>{void 0!==p.dragEnterFunc&&"function"===typeof p.dragEnterFunc&&(!0===p.dragEnterFunc(e,"time",{scope:s})?k.value=i:k.value="")},onDragover:e=>{void 0!==p.dragOverFunc&&"function"===typeof p.dragOverFunc&&(!0===p.dragOverFunc(e,"time",{scope:s})?k.value=i:k.value="")},onDragleave:e=>{void 0!==p.dragLeaveFunc&&"function"===typeof p.dragLeaveFunc&&(!0===p.dragLeaveFunc(e,"time",{scope:s})?k.value=i:k.value="")},onDrop:e=>{void 0!==p.dropFunc&&"function"===typeof p.dropFunc&&(!0===p.dropFunc(e,"time",{scope:s})?k.value=i:k.value="")},onFocus:()=>{!0===u&&(y.value=i)},...W("-time",e=>{return{scope:s,event:e}})},[n&&n({scope:s}),useFocusHelper()])}function Te(){const{start:e,end:t,maxDays:a}=V.value,n=(u.value===e.date&&s.value===t.date&&d.value===a||(u.value=e.date,s.value=t.date,d.value=a),l.width>0),r=withDirectives(h("div",{class:"q-calendar-resource",key:u.value},[!0===n&&de()]),[[ResizeObserverDirective,ne]]);if(!0!==p.animated)return r;{const o="q-calendar--"+("prev"===i.value?p.transitionPrev:p.transitionNext);return h(Transition,{name:o,appear:!0},()=>r)}}return watch([S],Q,{deep:!0,immediate:!0}),watch(()=>p.modelValue,(e,t)=>{if(r.value!==e){if(!0===p.animated){const a=getDayIdentifier(parsed(e)),n=getDayIdentifier(parsed(t));i.value=a>=n?"next":"prev"}r.value=e}y.value=e}),watch(r,(e,t)=>{if(r.value!==p.modelValue){if(!0===p.animated){const a=getDayIdentifier(parsed(e)),n=getDayIdentifier(parsed(t));i.value=a>=n?"next":"prev"}m("update:model-value",e)}}),watch(y,e=>{e&&(a.value=parseTimestamp(e))}),watch(a,()=>{f.value[y.value]?f.value[y.value].focus():J()}),onBeforeUpdate(()=>{f.value={},g.value={}}),onMounted(()=>{}),x({prev:ae,next:te,move:F,moveToToday:ee,updateCurrent:M,timeStartPosX:A,timeDurationWidth:O,widthToMinutes:j,scrollToTimeX:$}),()=>X()}});const version="4.1.0";var Plugin={version:version,QCalendarResource:QCalendarResource,...Timestamp$1,...helpers$1,install(e){e.component(String(QCalendarResource.name),QCalendarResource)}};export{DAYS_IN_MONTH,DAYS_IN_MONTH_LEAP,DAYS_IN_MONTH_MAX,DAYS_IN_MONTH_MIN,DAY_MIN,FIRST_HOUR,MONTH_MAX,MONTH_MIN,PARSE_DATE,PARSE_DATETIME,PARSE_TIME,QCalendarResource,TIME_CONSTANTS,addToDate,compareDate,compareDateTime,compareTime,compareTimestamps,convertToUnit,copyTimestamp,createDayList,createIntervalList,createNativeLocaleFormatter,daysBetween,daysInMonth,Plugin as default,diffTimestamp,findWeekday,getDate,getDateTime,getDayIdentifier,getDayOfYear,getDayTimeIdentifier,getEndOfMonth,getEndOfWeek,getMonthFormatter,getMonthNames,getStartOfMonth,getStartOfWeek,getTime,getTimeIdentifier,getWeekday,getWeekdayFormatter,getWeekdayNames,getWorkWeek,indexOf,isBetweenDates,isLeapYear,isOverlappingDates,isToday,makeDate,makeDateTime,maxTimestamp,minCharWidth,minTimestamp,moveRelativeDays,nextDay,padNumber,parseDate,parseTime,parseTimestamp,parsed,prevDay,relativeDays,today,updateDayOfYear,updateDisabled,updateFormatted,updateMinutes,updateRelative,updateWeekday,updateWorkWeek,validateNumber,validateTimestamp,version,weeksBetween}; | ||
import{reactive,ref,computed,withDirectives,h,watch,getCurrentInstance,onBeforeUnmount,defineComponent,onBeforeUpdate,onMounted,Transition}from"vue";const PARSE_DATETIME=/^(\d{4})-(\d{1,2})(-(\d{1,2}))?([^\d]+(\d{1,2}))?(:(\d{1,2}))?(:(\d{1,2}))?(.(\d{1,3}))?$/,PARSE_DATE=/^(\d{4})-(\d{1,2})(-(\d{1,2}))?/,PARSE_TIME=/(\d\d?)(:(\d\d?)|)(:(\d\d?)|)/,DAYS_IN_MONTH=[0,31,28,31,30,31,30,31,31,30,31,30,31],DAYS_IN_MONTH_LEAP=[0,31,29,31,30,31,30,31,31,30,31,30,31],TIME_CONSTANTS={MILLISECONDS_IN:{SECOND:1e3,MINUTE:6e4,HOUR:36e5,DAY:864e5,WEEK:6048e5},SECONDS_IN:{MINUTE:60,HOUR:3600,DAY:86400,WEEK:604800},MINUTES_IN:{MINUTE:1,HOUR:60,DAY:1440,WEEK:10080},HOURS_IN:{DAY:24,WEEK:168},DAYS_IN:{WEEK:7}},DAYS_IN_MONTH_MIN=28,DAYS_IN_MONTH_MAX=31,MONTH_MAX=12,MONTH_MIN=1,DAY_MIN=1,FIRST_HOUR=0;function validateTimestamp(e){return"string"===typeof e&&PARSE_DATETIME.test(e)}function parsed(e){if("string"!==typeof e)return null;const t=PARSE_DATETIME.exec(e);if(!t||!t[1]||!t[2])return null;const a=parseInt(t[1],10),n=parseInt(t[2],10),r=parseInt(t[4]||"1",10),o=parseInt(t[6]||"0",10),i=parseInt(t[8]||"0",10);return{date:e,time:o.toString().padStart(2,"0")+":"+i.toString().padStart(2,"0"),year:a,month:n,day:r,hour:o,minute:i,hasDay:!!t[4],hasTime:!0,past:!1,current:!1,future:!1,disabled:!1,weekday:0,doy:0,workweek:0}}function parseDate(e,t=!1){if(!(e instanceof Date))return null;const a=t?"UTC":"";return updateFormatted({date:padNumber(e[`get${a}FullYear`](),4)+"-"+padNumber(e[`get${a}Month`]()+1,2)+"-"+padNumber(e[`get${a}Date`](),2),time:padNumber(e[`get${a}Hours`]()||0,2)+":"+padNumber(e[`get${a}Minutes`]()||0,2),year:e[`get${a}FullYear`](),month:e[`get${a}Month`]()+1,day:e[`get${a}Date`](),hour:e[`get${a}Hours`](),minute:e[`get${a}Minutes`](),weekday:0,doy:0,workweek:0,hasDay:!0,hasTime:!0,past:!1,current:!1,future:!1,disabled:!1})}function padNumber(e,t){let a=String(e);while(a.length<t)a="0"+a;return a}function isLeapYear(e){return e%4===0&&e%100!==0||e%400===0}function daysInMonth(e,t){return(isLeapYear(e)?DAYS_IN_MONTH_LEAP:DAYS_IN_MONTH)[t]}function nextDay(e){const t=new Date(e.year,e.month-1,e.day+1);return updateFormatted(normalizeTimestamp({...e,year:t.getFullYear(),month:t.getMonth()+1,day:t.getDate()}))}function prevDay(e){const t=new Date(e.year,e.month-1,e.day-1);return updateFormatted(normalizeTimestamp({...e,year:t.getFullYear(),month:t.getMonth()+1,day:t.getDate()}))}function today(){const e=new Date,t=e.getMonth()+1,a=e.getDate(),n=e.getFullYear();return[n,padNumber(t,2),padNumber(a,2)].join("-")}function isToday(e){return e===today()}function getStartOfWeek(e,t,a){let n=copyTimestamp(e);if(t){if(1===n.day||0===n.weekday)while(!t.includes(Number(n.weekday)))n=nextDay(n);n=findWeekday(n,t[0],prevDay),n=updateFormatted(n),a&&(n=updateRelative(n,a,n.hasTime))}return n}function getEndOfWeek(e,t,a){let n=copyTimestamp(e);if(t&&Array.isArray(t)){const r=daysInMonth(n.year,n.month);if(r===n.day||n.weekday===t[t.length-1])while(!t.includes(Number(n.weekday)))n=prevDay(n);n=findWeekday(n,t[t.length-1],nextDay),n=updateFormatted(n),a&&(n=updateRelative(n,a,n.hasTime))}return n}function getStartOfMonth(e){let t=copyTimestamp(e);return t.day=DAY_MIN,t=updateFormatted(t),t}function getEndOfMonth(e){let t=copyTimestamp(e);return t.day=daysInMonth(t.year,t.month),t=updateFormatted(t),t}function parseTime(e){const t=Object.prototype.toString.call(e);switch(t){case"[object Number]":return e;case"[object String]":{const a=PARSE_TIME.exec(e);return a?60*parseInt(a[1],10)+parseInt(a[3]||"0",10):!1}case"[object Object]":return"object"!==typeof e||"number"!==typeof e.hour||"number"!==typeof e.minute?!1:"object"===typeof e&&"hour"in e&&"minute"in e&&60*e.hour+e.minute}return!1}function compareTimestamps(e,t){return!(!e||!t)&&e.year===t.year&&e.month===t.month&&e.day===t.day&&e.hour===t.hour&&e.minute===t.minute}function compareDate(e,t){return getDate(e)===getDate(t)}function compareTime(e,t){return getTime(e)===getTime(t)}function compareDateTime(e,t){return getDateTime(e)===getDateTime(t)}function parseTimestamp(e,t=null){let a=parsed(e);return a?(a=updateFormatted(a),t&&(a=updateRelative(a,t,a.hasTime)),a):null}function getDayIdentifier(e){return 1e8*(e.year??0)+1e6*(e.month??0)+1e4*(e.day??0)}function getTimeIdentifier(e){return 100*(e.hour??0)+(e.minute??0)}function getDayTimeIdentifier(e){return getDayIdentifier(e)+getTimeIdentifier(e)}function diffTimestamp(e,t,a=!1){const n=Date.UTC(e.year??0,(e.month??1)-1,e.day??1,e.hour??0,e.minute??0),r=Date.UTC(t.year??0,(t.month??1)-1,t.day??1,t.hour??0,t.minute??0);return!0===a&&r<n?0:r-n}function updateRelative(e,t,a=!1){let n=copyTimestamp(e),r=getDayIdentifier(t),o=getDayIdentifier(n),i=r===o;return n.hasTime&&a&&i&&(r=getTimeIdentifier(t),o=getTimeIdentifier(n),i=r===o),n.past=o<r,n.current=i,n.future=o>r,n.currentWeekday=n.weekday===t.weekday,n}function updateMinutes(e,t,a=null){let n=copyTimestamp(e);return n.hasTime=!0,n.hour=Math.floor(t/TIME_CONSTANTS.MINUTES_IN.HOUR),n.minute=t%TIME_CONSTANTS.MINUTES_IN.HOUR,n.time=getTime(n),a&&(n=updateRelative(n,a,!0)),n}function updateWeekday(e){let t=copyTimestamp(e);return t.weekday=getWeekday(t),t}function updateDayOfYear(e){let t=copyTimestamp(e);return t.doy=getDayOfYear(t)||0,t}function updateWorkWeek(e){let t=copyTimestamp(e);return t.workweek=getWorkWeek(t),t}function updateDisabled(e,t,a,n,r){let o=copyTimestamp(e);const i=getDayIdentifier(o);if(void 0!==t){const l=parsed(t);if(l){const c=getDayIdentifier(l);i<=c&&(o.disabled=!0)}}if(!0!==o.disabled&&void 0!==a){const m=parsed(a);if(m){const p=getDayIdentifier(m);i>=p&&(o.disabled=!0)}}if(!0!==o.disabled&&Array.isArray(n)&&n.length>0)for(var u in n)if(n[u]===o.weekday){o.disabled=!0;break}if(!0!==o.disabled&&Array.isArray(r)&&r.length>0)for(var s in r)if(Array.isArray(r[s])&&2===r[s].length&&r[s][0]&&r[s][1]){const v=parsed(r[s][0]),y=parsed(r[s][1]);if(v&&y&&isBetweenDates(o,v,y)){o.disabled=!0;break}}else{const f=r[s];if(Array.isArray(f))for(var d of f){const g=parseTimestamp(d);if(g){const h=getDayIdentifier(g);if(h===i){o.disabled=!0;break}}}else if(f){const T=parseTimestamp(f);if(T){const D=getDayIdentifier(T);D===i&&(o.disabled=!0)}}}return o}function updateFormatted(e){let t=copyTimestamp(e);return t.hasTime=!0,t.time=getTime(t),t.date=getDate(t),t.weekday=getWeekday(t),t.doy=getDayOfYear(t)||0,t.workweek=getWorkWeek(t),t}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){let t=copyTimestamp(e);if(0===t.year){const r=parseTimestamp(today());r&&(t=r)}const a=new Date(Date.UTC(t.year,t.month-1,t.day)),n=4;a.setUTCDate(a.getUTCDate()-(a.getUTCDay()+6)%7+n),a.setUTCDate(a.getUTCDate()+n-(a.getUTCDay()||7));e=new Date(Date.UTC(a.getUTCFullYear(),0,1)),e=Math.ceil(((a.valueOf()-e.valueOf())/864e5+1)/7);return e}function getWeekday(e){let t=e.weekday;if(e.hasDay){const a=Math.floor,n=e.day,r=(e.month+9)%MONTH_MAX+1,o=a(e.year/100),i=e.year%100-(e.month<=2?1:0);t=((n+a(2.6*r-.2)-2*o+i+a(i/4)+a(o/4))%7+7)%7}return t??0}function copyTimestamp(e){return{...e}}function getDate(e){let 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):"00:00")}function moveRelativeDays(e,t=nextDay,a=1,n=[0,1,2,3,4,5,6]){const r=copyTimestamp(e);return relativeDays(r,t,a,n)}function relativeDays(e,t=nextDay,a=1,n=[0,1,2,3,4,5,6]){let r=copyTimestamp(e);n.includes(Number(r.weekday))||0!==r.weekday||t!==nextDay||++a;while(--a>=0)r=t(r),n.length<7&&!n.includes(Number(r.weekday))&&++a;return r}function findWeekday(e,t,a=nextDay,n=6){let r=copyTimestamp(e);while(r.weekday!==t&&--n>=0)r=a(r);return r}function createDayList(e,t,a,n=[0,1,2,3,4,5,6],r=void 0,o=void 0,i=[],u=[],s=42,d=0){const l=getDayIdentifier(e),c=getDayIdentifier(t),m=[];let p=copyTimestamp(e),v=0,y=v===c;if(!(c<l))while((!y||m.length<d)&&m.length<s){if(v=getDayIdentifier(p),y=y||v>c&&m.length>=d,y)break;if(n.includes(Number(p.weekday))){let e=copyTimestamp(p);e=updateFormatted(e),e=updateRelative(e,a),e=updateDisabled(e,r,o,i,u),m.push(e)}p=relativeDays(p,nextDay)}return m}function createIntervalList(t,a,n,r,o){const i=[];for(let e=0;e<r;++e){const u=(a+e)*n,s=copyTimestamp(t);i.push(updateMinutes(s,u,o))}return i}function createNativeLocaleFormatter(n,r){const e=()=>"";return"undefined"===typeof Intl||"undefined"===typeof Intl.DateTimeFormat?e:(t,e)=>{try{const a=new Intl.DateTimeFormat(n||void 0,r(t,e));return a.format(makeDateTime(t))}catch(e){return console.error(`Intl.DateTimeFormat: ${e.message} -> `+getDateTime(t)),""}}}function makeDate(e,t=!0){return t?new Date(Date.UTC(e.year,e.month-1,e.day,0,0)):new Date(e.year,e.month-1,e.day,0,0)}function makeDateTime(e,t=!0){return t?new Date(Date.UTC(e.year,e.month-1,e.day,e.hour,e.minute)):new Date(e.year,e.month-1,e.day,e.hour,e.minute)}function validateNumber(e){return isFinite(Number(e))}function maxTimestamp(e,t=!1){const a=!0===t?getDayTimeIdentifier:getDayIdentifier;return e.reduce((e,t)=>{return Math.max(a(e),a(t))===a(e)?e:t})}function minTimestamp(e,t=!1){const a=!0===t?getDayTimeIdentifier:getDayIdentifier;return e.reduce((e,t)=>{return Math.min(a(e),a(t))===a(e)?e:t})}function isBetweenDates(e,t,a,n=!1){const r=getDayIdentifier(e)+(!0===n?getTimeIdentifier(e):0),o=getDayIdentifier(t)+(!0===n?getTimeIdentifier(t):0),i=getDayIdentifier(a)+(!0===n?getTimeIdentifier(a):0);return r>=o&&r<=i}function isOverlappingDates(e,t,a,n){const r=getDayIdentifier(e),o=getDayIdentifier(t),i=getDayIdentifier(a),u=getDayIdentifier(n);return r>=i&&r<=u||o>=i&&o<=u||i>=r&&o>=u}function addToDate(e,t){const a=copyTimestamp(e);return t.year&&(a.year+=t.year),t.month&&(a.month+=t.month),t.day&&(a.day+=t.day),t.hour&&(a.hour+=t.hour),t.minute&&(a.minute+=t.minute),updateFormatted(normalizeTimestamp(a))}function normalizeTimestamp(e){const t=new Date(e.year,e.month-1,e.day,e.hour,e.minute);return{...e,year:t.getFullYear(),month:t.getMonth()+1,day:t.getDate(),hour:t.getHours(),minute:t.getMinutes()}}function daysBetween(e,t){const a=diffTimestamp(e,t,!0);return Math.floor(a/TIME_CONSTANTS.MILLISECONDS_IN.DAY)}function weeksBetween(e,t){let a=copyTimestamp(e),n=copyTimestamp(t);return a=findWeekday(a,0),n=findWeekday(n,6),Math.ceil(daysBetween(a,n)/TIME_CONSTANTS.DAYS_IN.WEEK)}const weekdayDateMap={Sun:new Date("2020-01-05T00:00:00.000Z"),Mon:new Date("2020-01-06T00:00:00.000Z"),Tue:new Date("2020-01-07T00:00:00.000Z"),Wed:new Date("2020-01-08T00:00:00.000Z"),Thu:new Date("2020-01-09T00:00:00.000Z"),Fri:new Date("2020-01-10T00:00:00.000Z"),Sat:new Date("2020-01-11T00:00:00.000Z")};function getWeekdayFormatter(){const e=()=>"",r={long:{timeZone:"UTC",weekday:"long"},short:{timeZone:"UTC",weekday:"short"},narrow:{timeZone:"UTC",weekday:"narrow"}};return"undefined"===typeof Intl||"undefined"===typeof Intl.DateTimeFormat?e:t;function t(t,e,a){try{const n=new Intl.DateTimeFormat(a||void 0,r[e]||r["long"]);return n.format(weekdayDateMap[t])}catch(e){return e instanceof Error&&console.error(`Intl.DateTimeFormat: ${e.message} -> day of week: `+t),""}}}function getWeekdayNames(t,a){const e=Object.keys(weekdayDateMap),n=getWeekdayFormatter();return e.map(e=>String(n(e,t,a)))}function getMonthFormatter(){const e=()=>"",o={long:{timeZone:"UTC",month:"long"},short:{timeZone:"UTC",month:"short"},narrow:{timeZone:"UTC",month:"narrow"}};return"undefined"===typeof Intl||"undefined"===typeof Intl.DateTimeFormat?e:t;function t(t,e,a){try{const n=new Intl.DateTimeFormat(a||void 0,o[e]||o["long"]),r=new Date;return r.setDate(1),r.setMonth(t),n.format(r)}catch(e){return e instanceof Error&&console.error(`Intl.DateTimeFormat: ${e.message} -> month: `+t),""}}}function getMonthNames(t,a){const n=getMonthFormatter();return[...Array(12).keys()].map(e=>n(e,t,a))}var Timestamp={PARSE_DATETIME:PARSE_DATETIME,PARSE_DATE:PARSE_DATE,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,TIME_CONSTANTS:TIME_CONSTANTS,FIRST_HOUR:FIRST_HOUR,today:today,getStartOfWeek:getStartOfWeek,getEndOfWeek:getEndOfWeek,getStartOfMonth:getStartOfMonth,getEndOfMonth:getEndOfMonth,parseTime:parseTime,validateTimestamp:validateTimestamp,parsed:parsed,parseTimestamp:parseTimestamp,parseDate:parseDate,getDayIdentifier:getDayIdentifier,getTimeIdentifier:getTimeIdentifier,getDayTimeIdentifier:getDayTimeIdentifier,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,createDayList:createDayList,createIntervalList:createIntervalList,createNativeLocaleFormatter:createNativeLocaleFormatter,makeDate:makeDate,makeDateTime:makeDateTime,validateNumber:validateNumber,isBetweenDates:isBetweenDates,isOverlappingDates:isOverlappingDates,daysBetween:daysBetween,weeksBetween:weeksBetween,addToDate:addToDate,compareTimestamps:compareTimestamps,compareDate:compareDate,compareTime:compareTime,compareDateTime:compareDateTime,getWeekdayFormatter:getWeekdayFormatter,getWeekdayNames:getWeekdayNames,getMonthFormatter:getMonthFormatter,getMonthNames:getMonthNames},Timestamp$1=Object.freeze({__proto__:null,DAYS_IN_MONTH:DAYS_IN_MONTH,DAYS_IN_MONTH_LEAP:DAYS_IN_MONTH_LEAP,DAYS_IN_MONTH_MAX:DAYS_IN_MONTH_MAX,DAYS_IN_MONTH_MIN:DAYS_IN_MONTH_MIN,DAY_MIN:DAY_MIN,FIRST_HOUR:FIRST_HOUR,MONTH_MAX:MONTH_MAX,MONTH_MIN:MONTH_MIN,PARSE_DATE:PARSE_DATE,PARSE_DATETIME:PARSE_DATETIME,PARSE_TIME:PARSE_TIME,TIME_CONSTANTS:TIME_CONSTANTS,addToDate:addToDate,compareDate:compareDate,compareDateTime:compareDateTime,compareTime:compareTime,compareTimestamps:compareTimestamps,copyTimestamp:copyTimestamp,createDayList:createDayList,createIntervalList:createIntervalList,createNativeLocaleFormatter:createNativeLocaleFormatter,daysBetween:daysBetween,daysInMonth:daysInMonth,default:Timestamp,diffTimestamp:diffTimestamp,findWeekday:findWeekday,getDate:getDate,getDateTime:getDateTime,getDayIdentifier:getDayIdentifier,getDayOfYear:getDayOfYear,getDayTimeIdentifier:getDayTimeIdentifier,getEndOfMonth:getEndOfMonth,getEndOfWeek:getEndOfWeek,getMonthFormatter:getMonthFormatter,getMonthNames:getMonthNames,getStartOfMonth:getStartOfMonth,getStartOfWeek:getStartOfWeek,getTime:getTime,getTimeIdentifier:getTimeIdentifier,getWeekday:getWeekday,getWeekdayFormatter:getWeekdayFormatter,getWeekdayNames:getWeekdayNames,getWorkWeek:getWorkWeek,isBetweenDates:isBetweenDates,isLeapYear:isLeapYear,isOverlappingDates:isOverlappingDates,isToday:isToday,makeDate:makeDate,makeDateTime:makeDateTime,maxTimestamp:maxTimestamp,minTimestamp:minTimestamp,moveRelativeDays:moveRelativeDays,nextDay:nextDay,padNumber:padNumber,parseDate:parseDate,parseTime:parseTime,parseTimestamp:parseTimestamp,parsed:parsed,prevDay:prevDay,relativeDays:relativeDays,today:today,updateDayOfYear:updateDayOfYear,updateDisabled:updateDisabled,updateFormatted:updateFormatted,updateMinutes:updateMinutes,updateRelative:updateRelative,updateWeekday:updateWeekday,updateWorkWeek:updateWorkWeek,validateNumber:validateNumber,validateTimestamp:validateTimestamp,weeksBetween:weeksBetween});function convertToUnit(e,t="px"){if(e)return isNaN(e)?String(e):"auto"===e?e:""+Number(e)+t}function indexOf(t,a){for(let e=0;e<t.length;e++)if(!0===a(t[e],e))return e;return-1}function minCharWidth(e,t){return 0===t?e:e.slice(0,t)}var helpers={convertToUnit:convertToUnit,indexOf:indexOf,minCharWidth:minCharWidth},helpers$1=Object.freeze({__proto__:null,convertToUnit:convertToUnit,default:helpers,indexOf:indexOf,minCharWidth:minCharWidth});const ResizeObserverDirective={mounted(e,t){if("function"===typeof t.value){const a=t.value,n={callback:a,size:{width:0,height:0},observer:new ResizeObserver(e=>{const t=e[0].contentRect;t.width===n.size.width&&t.height===n.size.height||(n.size.width=t.width,n.size.height=t.height,n.debounceTimeout&&clearTimeout(n.debounceTimeout),n.debounceTimeout=setTimeout(()=>{n.callback(n.size),n.debounceTimeout=void 0},100))})};n.observer.observe(e),e.__onResizeObserver=n}},beforeUnmount(e){if(e.__onResizeObserver){const{observer:t,debounceTimeout:a}=e.__onResizeObserver;a&&clearTimeout(a),t.unobserve(e),delete e.__onResizeObserver}}};function useCalendar(t,a,{scrollArea:e,pane:n}){if(!a){const l="[error: renderCalendar] no renderFunc has been supplied to useCalendar";throw console.error(l),new Error(l)}const r=reactive({width:0,height:0}),o=ref(null);function i({width:e,height:t}){r.width=e,r.height=t}const u=computed(()=>{return!0!==t.noScroll&&e.value&&n.value&&r.height?e.value.offsetWidth-n.value.offsetWidth:0});function s(){}function d(){const e={ref:o,role:"complementary",lang:t.locale,class:`q-calendar ${t.dark?"q-calendar--dark":""} `+(t.bordered?"q-calendar__bordered":"")};return withDirectives(h("div",{...e},[a()]),[[ResizeObserverDirective,i]])}return{rootRef:o,scrollWidth:u,__initCalendar:s,__renderCalendar:d}}const isValidFocusType=e=>e.every(e=>["day","date","weekday","interval","time","resource","task"].includes(e)),useCommonProps={modelValue:{type:String,default:today(),validator:e=>""===e||validateTimestamp(e)},weekdays:{type:Array,default:()=>[0,1,2,3,4,5,6]},dateType:{type:String,default:"round",validator:e=>["round","rounded","square"].includes(e)},weekdayAlign:{type:String,default:"center",validator:e=>["left","center","right"].includes(e)},dateAlign:{type:String,default:"center",validator:e=>["left","center","right"].includes(e)},bordered:Boolean,dark:Boolean,noAria:Boolean,noActiveDate:Boolean,noHeader:Boolean,noScroll:Boolean,shortWeekdayLabel:Boolean,noDefaultHeaderText:Boolean,noDefaultHeaderBtn:Boolean,minWeekdayLabel:{type:[Number,String],default:1},weekdayBreakpoints:{type:Array,default:()=>[75,35],validator:e=>2===e.length},locale:{type:String,default:"en-US"},animated:Boolean,transitionPrev:{type:String,default:"slide-right"},transitionNext:{type:String,default:"slide-left"},disabledDays:Array,disabledBefore:String,disabledAfter:String,disabledWeekdays:{type:Array,default:()=>[]},dragEnterFunc:Function,dragOverFunc:Function,dragLeaveFunc:Function,dropFunc:Function,selectedDates:{type:[Array,Set],default:()=>[]},selectedStartEndDates:{type:Array,default:()=>[]},hoverable:Boolean,focusable:Boolean,focusType:{type:Array,default:()=>["date"],validator:isValidFocusType}};function useCommon(t,{startDate:e,endDate:a,times:n}){const r=computed(()=>parseTimestamp(e.value)),o=computed(()=>{return"0000-00-00"===a.value?getEndOfWeek(r.value,t.weekdays,n.today):parseTimestamp(a.value)||r.value}),i=computed(()=>createNativeLocaleFormatter(t.locale,()=>({timeZone:"UTC",day:"numeric"}))),u=computed(()=>createNativeLocaleFormatter(t.locale,(e,t)=>({timeZone:"UTC",weekday:t?"short":"long"}))),s=computed(()=>createNativeLocaleFormatter(t.locale,()=>({timeZone:"UTC",dateStyle:"full"})));function d(e,t){return e&&e.length>0&&e.includes(t.date)}function l(e,t){const a={firstDay:!1,betweenDays:!1,lastDay:!1};if(2===e.length){const n=getDayIdentifier(t),r=getDayIdentifier(parsed(e[0])),o=getDayIdentifier(parsed(e[1]));a.firstDay=r===n,a.lastDay=o===n,a.betweenDays=r<n&&o>n}return a}function c(e,t=!1,a=[],n=[],r=!1){const o=d(a,e),{firstDay:i,lastDay:u,betweenDays:s}=l(n,e);return{"q-past-day":!i&&!s&&!u&&!o&&!t&&!!e.past,"q-future-day":!i&&!s&&!u&&!o&&!t&&!!e.future,"q-outside":t,"q-current-day":!!e.current,"q-selected":o,"q-range-first":i,"q-range":s,"q-range-last":u,"q-range-hover":r&&(i||u||s),"q-disabled-day disabled":!0===e.disabled}}function m(e){return getStartOfWeek(e,t.weekdays,n.today)}function p(e){return getEndOfWeek(e,t.weekdays,n.today)}function v(){return{}}return{parsedStart:r,parsedEnd:o,dayFormatter:i,weekdayFormatter:u,ariaDateFormatter:s,arrayHasDate:d,checkDays:l,getRelativeClasses:c,startOfWeek:m,endOfWeek:p,dayStyleDefault:v}}function scrollTo(e,t){e instanceof Window?e.scrollTo({top:t,behavior:"instant"}):e.scrollTop=t}function getVerticalScrollPosition(e){return e instanceof Window?e.scrollY:e.scrollTop}function animVerticalScrollTo(o,i,u=500,s=performance.now(),d=getVerticalScrollPosition(o)){u<=0||d===i?scrollTo(o,i):requestAnimationFrame(e=>{const t=e-s,a=Math.min(t/u,1),n=e=>e<.5?2*e*e:(4-2*e)*e-1,r=d+(i-d)*n(a);scrollTo(o,r),a<1&&animVerticalScrollTo(o,i,u,s,d)})}function animHorizontalScrollTo(r,e,o=500){const i=r.scrollLeft,u=e-i;let s=null;function d(e){null===s&&(s=e);const t=e-s,a=Math.min(t/o,1),n=e=>e<.5?2*e*e:(4-2*e)*e-1;r.scrollLeft=i+u*n(a),t<o&&requestAnimationFrame(d)}requestAnimationFrame(d)}const useIntervalProps={view:{type:String,validator:e=>["day","week","month","month-interval"].includes(e),default:"day"},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},intervalClass:{type:Function,default:null},weekdayStyle:{type:Function,default:null},weekdayClass:{type:Function,default:null},showIntervalLabel:{type:Function,default:null},hour24Format:Boolean,timeClicksClamped:Boolean,dateHeader:{type:String,default:"stacked",validator:e=>["stacked","inline","inverted"].includes(e)}},useResourceProps={modelResources:{type:Array},resourceKey:{type:String,default:"id"},resourceLabel:{type:String,default:"label"},resourceHeight:{type:[Number,String],default:0,validator:validateNumber},resourceMinHeight:{type:[Number,String],default:70,validator:validateNumber},resourceStyle:{type:Function,default:null},resourceClass:{type:Function,default:null},cellWidth:{type:[Number,String],default:100},intervalHeaderHeight:{type:[Number,String],default:20,validator:validateNumber},noSticky:Boolean};function useInterval(o,{times:t,scrollArea:n,parsedStart:e,parsedEnd:a,maxDays:r,size:i,headerColumnRef:u}){const s=computed(()=>parseInt(String(o.intervalStart),10)),m=computed(()=>parseInt(String(o.intervalMinutes),10)),d=computed(()=>parseInt(String(o.intervalCount),10)),p=computed(()=>parseFloat(String(o.intervalHeight))),v=computed(()=>{let e=0;const t=Number(o.columnCount);return o.cellWidth?e=Number(o.cellWidth):i.width>0&&u.value&&(e=u.value.offsetWidth/(t>1?t:r.value)),e}),l=computed(()=>s.value*m.value),c=computed(()=>d.value*p.value),y=computed(()=>d.value*v.value),f=computed(()=>D(e.value)),g=computed(()=>k(a.value)),h=computed(()=>{return createDayList(e.value,a.value,t.today,o.weekdays,o.disabledBefore,o.disabledAfter,o.disabledWeekdays,o.disabledDays,r.value)}),T=computed(()=>{return h.value.map(e=>createIntervalList(e,s.value,m.value,d.value,t.now))});function D(e){return getStartOfWeek(e,o.weekdays,t.today)}function k(e){return getEndOfWeek(e,o.weekdays,t.today)}function w(e,t){return e&&e.length>0&&e.includes(getDateTime(t))}function N(e,t){const a={firstDay:!1,betweenDays:!1,lastDay:!1};if(e&&2===e.length){const n=getDayTimeIdentifier(t),r=getDayTimeIdentifier(parsed(e[0])),o=getDayTimeIdentifier(parsed(e[1]));a.firstDay=r===n,a.lastDay=o===n,a.betweenDays=r<n&&o>n}return a}function M(e,t=[],a=[]){const n=w(t,e),{firstDay:r,lastDay:o,betweenDays:i}=N(a,e);return{"q-selected":n,"q-range-first":!0===r,"q-range":!0===i,"q-range-last":!0===o,"q-disabled-interval disabled":!0===e.disabled}}function _(e,t,a){return[]}const I=computed(()=>{const a={timeZone:"UTC",hour12:!o.hour24Format,hour:"2-digit",minute:"2-digit"},n={timeZone:"UTC",hour12:!o.hour24Format,hour:"numeric",minute:"2-digit"},r={timeZone:"UTC",hour12:!o.hour24Format,hour:"numeric"};return createNativeLocaleFormatter(o.locale,(e,t)=>t?0===e.minute?r:n:a)}),b=computed(()=>{const e={timeZone:"UTC",dateStyle:"full",timeStyle:"short"};return createNativeLocaleFormatter(o.locale,()=>e)});function S(e){const t=T.value[0][0],a=t.hour===e.hour&&t.minute===e.minute;return!a&&0===e.minute}function E(e){}function O(e){return{}}function A(e,t,a=!1,n){let r=copyTimestamp(t);if(e.currentTarget){const o=e.currentTarget.getBoundingClientRect(),i=e,u=e,s=i.changedTouches||i.touches,d=(s&&s[0]?s[0]:u).clientY,l=(d-o.top)/p.value,c=Math.floor((a?Math.floor(l):l)*m.value);0!==c&&(r=addToDate(r,{minute:c})),n&&(r=updateRelative(r,n,!0))}return r}function H(e,t,a=!1,n){let r=copyTimestamp(t);const o=e.currentTarget.getBoundingClientRect(),i=e,u=e,s=i.changedTouches||i.touches,d=(s&&s[0]?s[0]:u).clientY,l=(d-o.top)/p.value,c=Math.floor((a?Math.floor(l):l)*m.value);return 0!==c&&(r=addToDate(r,{minute:c})),n&&(r=updateRelative(r,n,!0)),r}function x(e,t,a=!1,n){let r=copyTimestamp(t);if(e.currentTarget){const o=e.currentTarget.getBoundingClientRect(),i=e,u=e,s=i.changedTouches||i.touches,d=(s&&s[0]?s[0]:u).clientX,l=(d-o.left)/v.value,c=Math.floor((a?Math.floor(l):l)*m.value);0!==c&&(r=addToDate(r,{minute:c})),n&&(r=updateRelative(r,n,!0))}return r}function U(e,t){const a={timestamp:e,timeStartPos:C,timeDurationHeight:F};return void 0!==t&&(a.columnIndex=t),a}function L(e,t){const a={timestamp:copyTimestamp(e),timeStartPosX:R,timeDurationWidth:W};return void 0!==t&&(a.index=t),a}function Y(e,t=0){const a=C(e);return!(!1===a||!n.value)&&(animVerticalScrollTo(n.value,a,t),!0)}function P(e,t=0){const a=R(e);return!(!1===a||!n.value)&&(animHorizontalScrollTo(n.value,a,t),!0)}function F(e){return e/m.value*p.value}function W(e){return e/m.value*v.value}function q(e){return e*m.value/p.value}function B(e){return e*m.value/v.value}function C(e,t=!0){const a=parseTime(e);if(!1===a)return!1;const n=l.value,r=d.value*m.value,o=(a-n)/r;let i=o*c.value;return t&&(i<0&&(i=0),i>c.value)&&(i=c.value),i}function R(e,t=!0){const a=parseTime(e);if(!1===a)return!1;const n=l.value,r=d.value*m.value,o=(a-n)/r;let i=o*y.value;return t&&(i<0&&(i=0),i>y.value)&&(i=y.value),i}return{parsedIntervalStart:s,parsedIntervalMinutes:m,parsedIntervalCount:d,parsedIntervalHeight:p,parsedCellWidth:v,parsedStartMinute:l,bodyHeight:c,bodyWidth:y,parsedWeekStart:f,parsedWeekEnd:g,days:h,intervals:T,intervalFormatter:I,ariaDateTimeFormatter:b,arrayHasDateTime:w,checkIntervals:N,getIntervalClasses:M,getResourceClasses:_,showIntervalLabelDefault:S,showResourceLabelDefault:E,styleDefault:O,getTimestampAtEventInterval:A,getTimestampAtEvent:H,getTimestampAtEventX:x,getScopeForSlot:U,getScopeForSlotX:L,scrollToTime:Y,scrollToTimeX:P,timeDurationHeight:F,timeDurationWidth:W,heightToMinutes:q,widthToMinutes:B,timeStartPos:C,timeStartPosX:R}}const useColumnProps={columnCount:{type:[Number,String],default:0,validator:validateNumber},columnIndexStart:{type:[Number,String],default:0,validator:validateNumber}},useMaxDaysProps={maxDays:{type:Number,default:1}},useTimesProps={now:{type:String,validator:e=>""===e||validateTimestamp(e),default:""}};function useTimes(e){const t=reactive({now:parseTimestamp("0000-00-00 00:00"),today:parseTimestamp("0000-00-00")}),a=computed(()=>e.now?parseTimestamp(e.now):o());function n(){t.now&&t.today&&(t.now.current=t.today.current=!0,t.now.past=t.today.past=!1,t.now.future=t.today.future=!1)}function r(){const e=a.value||o();i(e,t.now),u(e,t.now),i(e,t.today)}function o(){return parseDate(new Date)}function i(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)}function u(e,t){e.time!==t.time&&(t.hour=e.hour,t.minute=e.minute,t.time=e.time)}return watch(a,()=>r()),{times:t,parsedNow:a,setCurrent:n,updateCurrent:r,getNow:o,updateDay:i,updateTime:u}}function useRenderValues(r,{parsedView:o,parsedValue:i,times:u}){const e=computed(()=>{const e=i.value;let t=r.maxDays,a=e,n=e;switch(o.value){case"month":a=getStartOfMonth(e),n=getEndOfMonth(e),t=daysInMonth(a.year,a.month);break;case"week":case"week-agenda":case"week-scheduler":a=getStartOfWeek(e,r.weekdays,u.today),n=getEndOfWeek(a,r.weekdays,u.today),t=r.weekdays.length;break;case"day":case"scheduler":case"agenda":n=moveRelativeDays(copyTimestamp(n),nextDay,t>1?t-1:t,r.weekdays),n=updateFormatted(n);break;case"month-interval":case"month-scheduler":case"month-agenda":a=getStartOfMonth(e),n=getEndOfMonth(e),n=updateFormatted(n),t=daysInMonth(a.year,a.month);break;case"resource":t=1,n=moveRelativeDays(copyTimestamp(n),nextDay,t,r.weekdays),n=updateFormatted(n);break}return{start:a,end:n,maxDays:t}});return{renderValues:e}}const toCamelCase=e=>e.replace(/(-\w)/g,e=>e[1].toUpperCase());function getMouseEventHandlers(t,e,a,n){const r={};for(const o in a){const i=a[o],u=toCamelCase("on-"+o);if(!e.value)return console.warn("$listeners has not been set up"),{};if(void 0!==e.value[u]){const s="on"+i.event.charAt(0).toUpperCase()+i.event.slice(1),d=e=>{return(void 0===i.button||"buttons"in e&&e.buttons>0&&e.button===i.button)&&(i.prevent&&e.preventDefault(),i.stop&&e.stopPropagation(),t(o,n(e,o))),i.result};s in r?Array.isArray(r[s])?r[s].push(d):r[s]=[r[s],d]:r[s]=d}}return r}function getDefaultMouseEventHandlers(e,t,a,n){return getMouseEventHandlers(e,t,getMouseEventName(a),n)}function getMouseEventName(e){return{["click"+e]:{event:"click"},["contextmenu"+e]:{event:"contextmenu",prevent:!0,result:!1},["mousedown"+e]:{event:"mousedown"},["mousemove"+e]:{event:"mousemove"},["mouseup"+e]:{event:"mouseup"},["mouseenter"+e]:{event:"mouseenter"},["mouseleave"+e]:{event:"mouseleave"},["touchstart"+e]:{event:"touchstart"},["touchmove"+e]:{event:"touchmove"},["touchend"+e]:{event:"touchend"}}}function getRawMouseEvents(e){return Object.keys(getMouseEventName(e))}function useMouseEvents(a,n){return{getMouseEventHandlers:(e,t)=>getMouseEventHandlers(a,n,e,t),getDefaultMouseEventHandlers:(e,t)=>getDefaultMouseEventHandlers(a,n,e,t),getMouseEventName:getMouseEventName,getRawMouseEvents:getRawMouseEvents}}const useMoveEmits=["moved"];function useMove(s,{parsedView:d,parsedValue:l,direction:c,maxDays:m,times:p,emittedValue:v,emit:y}){function e(a=1){if(0===a)v.value=today();else{let e=copyTimestamp(l.value);const n=getEndOfMonth(e),r=a>0,o=r?nextDay:prevDay,i=r?n.day:1;let t=r?a:-a;c.value=r?"next":"prev";const u=s.weekdays.length;while(--t>=0)switch(d.value){case"month":e.day=i,e=o(e),e=updateWeekday(e);while(!s.weekdays.includes(Number(e.weekday)))e=addToDate(e,{day:r?1:-1});break;case"week":case"week-agenda":case"week-scheduler":e=relativeDays(e,o,u,s.weekdays);break;case"day":case"scheduler":case"agenda":e=relativeDays(e,o,m.value,s.weekdays);break;case"month-interval":case"month-agenda":case"month-scheduler":e.day=i,e=o(e);break;case"resource":e=relativeDays(e,o,m.value,s.weekdays);break}e=updateWeekday(e),e=updateFormatted(e),e=updateDayOfYear(e),e=updateRelative(e,p.now),v.value=e.date,y("moved",e)}}return{move:e}}const listenerRE=/^on[A-Z]/;function useEmitListeners(e=getCurrentInstance()){return{emitListeners:computed(()=>{const t={};return e?.vnode?.props&&Object.keys(e.vnode.props).forEach(e=>{listenerRE.test(e)&&(t[e]=!0)}),t})}}function useFocusHelper(){const e={"aria-hidden":"true",class:"q-calendar__focus-helper"};return[h("span",e)]}const useCheckChangeEmits=["change"];function useCheckChange(n,{days:r,lastStart:o,lastEnd:i}){function e(){const e=r.value;if(0===e.length)return!1;const t=e[0].date,a=e[e.length-1].date;return(!o.value||!i.value||t!==o.value||a!==i.value)&&(o.value=t,i.value=a,n("change",{start:t,end:a,days:e}),!0)}return{checkChange:e}}function useEventUtils(){function e(e,t){return(Array.isArray(t)?t:[t]).includes(e.keyCode)}return{isKeyCode:e}}const isKeyCode=useEventUtils().isKeyCode,useNavigationProps={useNavigation:Boolean};function useNavigation(t,{rootRef:a,focusRef:n,focusValue:r,datesRef:o,parsedView:i,emittedValue:u,direction:s,times:d}){let e=!1;function l(){e||document&&(e=!0,document.addEventListener("keyup",y),document.addEventListener("keydown",v))}function c(){document&&(document.removeEventListener("keyup",y),document.removeEventListener("keydown",v),e=!1)}function m(e){if(e&&document){const t=document.activeElement;if(t!==document.body&&a.value?.contains(t))return!0}return!1}function p(){let t=0;const a=window.setInterval(()=>{const e=o.value[n.value];e&&(e.focus(),50!==++t)&&document.activeElement!==e||window.clearInterval(a)},250)}function v(e){m(e)&&isKeyCode(e,[33,34,35,36,37,38,39,40])&&(e.stopPropagation(),e.preventDefault())}function y(e){if(m(e)&&isKeyCode(e,[33,34,35,36,37,38,39,40])){const t={33:D,34:k,35:N,36:w,37:h,38:f,39:T,40:g};t[e.keyCode]?.()}}function f(){let e=copyTimestamp(r.value);if("month"===i.value){if(e=addToDate(e,{day:-7}),r.value.month!==e.month)return s.value="prev",void(u.value=e.date)}else e=addToDate(e,{minute:Number(t.intervalMinutes)});s.value="prev",n.value=e.date}function g(){let e=copyTimestamp(r.value);if("month"===i.value){if(e=addToDate(e,{day:7}),r.value.month!==e.month)return s.value="next",void(u.value=e.date)}else e=addToDate(e,{minute:Number(t.intervalMinutes)});s.value="next",n.value=e.date}function h(){let e=copyTimestamp(r.value);s.value="prev";do{e=addToDate(e,{day:-1})}while(!t.weekdays.includes(Number(e.weekday)));n.value=e.date}function T(){let e=copyTimestamp(r.value);s.value="next";do{e=addToDate(e,{day:1})}while(!t.weekdays.includes(Number(e.weekday)));n.value=e.date}function D(){let e=copyTimestamp(r.value);e="month"===i.value?addToDate(e,{month:-1}):addToDate(e,{day:-7}),s.value="prev",n.value=e.date}function k(){let e=copyTimestamp(r.value);e="month"===i.value?addToDate(e,{month:1}):addToDate(e,{day:7}),s.value="next",n.value=e.date}function w(){let e=copyTimestamp(r.value);e="month"===i.value?getStartOfMonth(e):getStartOfWeek(e,t.weekdays||[],d.today);while(!t.weekdays.includes(Number(e.weekday)))e=addToDate(e,{day:-1});n.value=e.date}function N(){let e=copyTimestamp(r.value);e="month"===i.value?getEndOfMonth(e):getEndOfWeek(e,t.weekdays||[],d.today);while(!t.weekdays.includes(Number(e.weekday)))e=addToDate(e,{day:-1});n.value=e.date}return onBeforeUnmount(()=>{c()}),watch(()=>t.useNavigation,e=>{(!0===e?l:c)()}),!0===t.useNavigation&&l(),{startNavigation:l,endNavigation:c,tryFocus:p}}var QCalendarResource=defineComponent({name:"QCalendarResource",props:{...useCommonProps,...useResourceProps,...useIntervalProps,...useColumnProps,...useMaxDaysProps,...useTimesProps,...useNavigationProps},emits:["update:model-value","update:model-resources","resource-expanded",...useCheckChangeEmits,...useMoveEmits,...getRawMouseEvents("-date"),...getRawMouseEvents("-interval"),...getRawMouseEvents("-head-day"),...getRawMouseEvents("-time"),...getRawMouseEvents("-head-resources"),...getRawMouseEvents("-resource")],setup(p,{slots:v,emit:m,expose:x}){const e=ref(null),U=ref(null),L=ref(null),t=ref(null),y=ref(p.modelValue||today()),a=ref(parsed(p.modelValue||today())),f=ref({}),g=ref({}),i=ref("next"),u=ref(p.modelValue||today()),s=ref("0000-00-00"),d=ref(0),r=ref(p.modelValue),l=reactive({width:0,height:0}),T=ref(""),D=ref(""),k=ref(""),Y=ref(null),P=ref(null),n=(watch(()=>p.view,()=>{d.value=0}),computed(()=>{return"month"===p.view?"month-interval":p.view})),w=computed(()=>{return parseInt(String(p.cellWidth),10)}),o=getCurrentInstance();if(null===o)throw new Error("current instance is null");const N=useEmitListeners(o).emitListeners,{times:c,setCurrent:q,updateCurrent:M}=useTimes(p),{parsedStart:_,parsedEnd:B,dayStyleDefault:I}=(M(),q(),useCommon(p,{startDate:u,endDate:s,times:c})),b=computed(()=>{return parseTimestamp(p.modelValue,c.now)||_.value||c.today}),V=(a.value=b.value,y.value=b.value.date,useRenderValues(p,{parsedView:n,times:c,parsedValue:b})).renderValues,{rootRef:z,__renderCalendar:X}=useCalendar(p,Te,{scrollArea:e,pane:U}),{days:S,intervals:E,intervalFormatter:K,styleDefault:Z,scrollToTimeX:$,timeDurationWidth:O,timeStartPosX:A,widthToMinutes:j}=useInterval(p,{times:c,scrollArea:e,parsedStart:_,parsedEnd:B,maxDays:d,size:l,headerColumnRef:t}),F=useMove(p,{parsedView:n,parsedValue:b,direction:i,maxDays:d,times:c,emittedValue:r,emit:m}).move,W=useMouseEvents(m,N).getDefaultMouseEventHandlers,Q=useCheckChange(m,{days:S,lastStart:Y,lastEnd:P}).checkChange,G=useEventUtils().isKeyCode,J=useNavigation(p,{rootRef:z,focusRef:y,focusValue:a,datesRef:f,parsedView:n,emittedValue:r,direction:i,times:c}).tryFocus,C=computed(()=>{const e=parseInt(String(p.resourceHeight),10);return 0===e?"auto":e}),R=computed(()=>{return parseInt(String(p.resourceMinHeight),10)}),H=computed(()=>{return parseInt(String(p.intervalHeaderHeight),10)});function ee(){r.value=today()}function te(e=1){F(e)}function ae(e=1){F(-e)}function ne({width:e,height:t}){l.width=e,l.height=t}function re(e){return e.date===r.value}function oe(){const e={height:convertToUnit(H.value)};return h("div",{ref:L,roll:"presentation",class:{"q-calendar-resource__head":!0,"q-calendar__sticky":!0!==p.noSticky},style:e},[ie(),ue()])}function ie(){const e=v["head-resources"],t=convertToUnit(H.value),a={timestamps:E,date:p.modelValue,resources:p.modelResources};return h("div",{class:{"q-calendar-resource__head--resources":!0,"q-calendar__sticky":!0!==p.noSticky},style:{height:t},...W("-head-resources",e=>{return{scope:a,event:e}})},[e&&e({scope:a})])}function ue(){return h("div",{ref:t,class:{"q-calendar-resource__head--intervals":!0}},[E.value.map(e=>e.map((e,t)=>se(e,t)))])}function se(e,t){const a=v["interval-label"],n=!0!==p.noActiveDate&&re(e),r=convertToUnit(w.value),o=convertToUnit(H.value),i=p.shortIntervalLabel,u=K.value(e,i),s={timestamp:e,index:t,label:u,droppable:T.value===u},d=p.intervalStyle||I,l={width:r,maxWidth:r,minWidth:r,height:o,...d({scope:s})},c="function"===typeof p.intervalClass?p.intervalClass({scope:s}):{},m=!0===p.focusable&&p.focusType.includes("interval");return h("div",{key:u,tabindex:!0===m?0:-1,class:{"q-calendar-resource__head--interval":!0,...c,"q-active-date":n,"q-calendar__hoverable":!0===p.hoverable,"q-calendar__focusable":!0===m},style:l,onDragenter:e=>{void 0!==p.dragEnterFunc&&"function"===typeof p.dragEnterFunc&&(!0===p.dragEnterFunc(e,"interval",{scope:s})?T.value=u:T.value="")},onDragover:e=>{void 0!==p.dragOverFunc&&"function"===typeof p.dragOverFunc&&(!0===p.dragOverFunc(e,"interval",{scope:s})?T.value=u:T.value="")},onDragleave:e=>{void 0!==p.dragLeaveFunc&&"function"===typeof p.dragLeaveFunc&&(!0===p.dragLeaveFunc(e,"interval",{scope:s})?T.value=u:T.value="")},onDrop:e=>{void 0!==p.dropFunc&&"function"===typeof p.dropFunc&&(!0===p.dropFunc(e,"interval",{scope:s})?T.value=u:T.value="")},onFocus:()=>{!0===m&&(y.value=u)},...W("-interval",e=>{return{scope:s,event:e}})},[a?a({scope:s}):u,useFocusHelper()])}function de(){return h("div",{class:"q-calendar-resource__body"},[le()])}function le(){return h("div",{ref:e,class:{"q-calendar-resource__scroll-area":!0,"q-calendar__scroll":!0}},[me()])}function ce(){return h("div",{},"No resources have been defined")}function me(){return h("div",{class:"q-calendar-resource__day--container"},[oe(),void 0===p.modelResources&&ce(),void 0!==p.modelResources&&pe()])}function pe(){const e={class:"q-calendar-resource__resources--body"};return h("div",e,ve())}function ve(e=void 0,a=0,n=!0){return void 0===e&&(e=p.modelResources),e.map((e,t)=>{return ye(e,t,a,void 0!==e.children?e.expanded:n)}).filter(e=>!!e)}function ye(e,t,a=0,n=!0){const r={},o=(r.height="auto"===C.value?C.value:convertToUnit(C.value),R.value>0&&(r.minHeight=convertToUnit(R.value)),h("div",{key:e[p.resourceKey]+"-"+t,class:{"q-calendar-resource__resource--row":!0},style:r},[fe(e,t,a,n),ge(e,t)]));return void 0!==e.children?[o,h("div",{class:{"q-calendar__child":!0,"q-calendar__child--expanded":!0===n,"q-calendar__child--collapsed":!0!==n}},[ve(e.children,a+1,!1===n?n:e.expanded)])]:[o]}function fe(t,e,a=0,n=!0){const r=v["resource-label"],o={},i=(o.height=void 0!==t.height?convertToUnit(parseInt(t.height,10)):C.value?convertToUnit(C.value):"auto",R.value>0&&(o.minHeight=convertToUnit(R.value)),p.resourceStyle||Z),u=t[p.resourceLabel],s=!0===p.focusable&&p.focusType.includes("resource")&&!0===n,d=t[p.resourceKey],l={resource:t,timestamps:E,resourceIndex:e,indentLevel:a,label:u,droppable:D.value===d},c="function"===typeof p.resourceClass?p.resourceClass({scope:l}):{};return h("div",{key:t[p.resourceKey]+"-"+e,ref:e=>{e instanceof HTMLElement&&(g.value[t[p.resourceKey]]=e)},tabindex:!0===s?0:-1,class:{"q-calendar-resource__resource":0===a,"q-calendar-resource__resource--section":0!==a,...c,"q-calendar__sticky":!0!==p.noSticky,"q-calendar__hoverable":!0===p.hoverable,"q-calendar__focusable":!0===s},style:{...o,...i({scope:l})},onDragenter:e=>{void 0!==p.dragEnterFunc&&"function"===typeof p.dragEnterFunc&&(!0===p.dragEnterFunc(e,"resource",{scope:l})?D.value=d:D.value="")},onDragover:e=>{void 0!==p.dragOverFunc&&"function"===typeof p.dragOverFunc&&(!0===p.dragOverFunc(e,"resource",{scope:l})?D.value=d:D.value="")},onDragleave:e=>{void 0!==p.dragLeaveFunc&&"function"===typeof p.dragLeaveFunc&&(!0===p.dragLeaveFunc(e,"resource",{scope:l})?D.value=d:D.value="")},onDrop:e=>{void 0!==p.dropFunc&&"function"===typeof p.dropFunc&&(!0===p.dropFunc(e,"resource",{scope:l})?D.value=d:D.value="")},onKeydown:e=>{G(e,[13,32])&&(e.stopPropagation(),e.preventDefault())},onKeyup:e=>{G(e,[13,32])&&void 0!==N.value.onClickResource&&m("click-resource",{scope:l,event:e})},...W("-resource",e=>{return{scope:l,event:e}})},[[h("div",{class:{"q-calendar__parent":void 0!==t.children,"q-calendar__parent--expanded":void 0!==t.children&&!0===t.expanded,"q-calendar__parent--collapsed":void 0!==t.children&&!0!==t.expanded},onClick:e=>{e.stopPropagation(),t.expanded=!t.expanded,m("resource-expanded",{expanded:t.expanded,scope:l})}}),h("div",{class:{"q-calendar-resource__resource--text":!0,"q-calendar__ellipsis":!0},style:{paddingLeft:10*a+2+"px"}},[r?r({scope:l}):u]),useFocusHelper()]])}function ge(t,a){const e=v["resource-intervals"],n={resource:t,timestamps:E,resourceIndex:a,timeStartPosX:A,timeDurationWidth:O};return h("div",{class:"q-calendar-resource__resource--intervals"},[E.value.map(e=>e.map(e=>he(t,e,a))),e&&e({scope:n})])}function he(t,e,a){const n=v["resource-interval"],r=!0!==p.noActiveDate&&re(e),o=t[p.resourceKey],i=e.time+"-"+o,u=!0===p.focusable&&p.focusType.includes("time"),s={activeDate:r,resource:t,timestamp:e,resourceIndex:a,droppable:k.value===i},d=p.intervalStyle||I,l=convertToUnit(w.value),c={width:l,maxWidth:l,minWidth:l,...d({scope:s})};return c.height=void 0!==t.height?convertToUnit(parseInt(t.height,10)):"auto"===C.value?C.value:convertToUnit(C.value),R.value>0&&(c.minHeight=convertToUnit(R.value)),h("div",{key:i,ref:e=>{e instanceof HTMLElement&&(f.value[t[p.resourceKey]]=e)},tabindex:!0===u?0:-1,class:{"q-calendar-resource__resource--interval":!0,"q-active-date":r,"q-calendar__hoverable":!0===p.hoverable,"q-calendar__focusable":!0===u},style:c,onDragenter:e=>{void 0!==p.dragEnterFunc&&"function"===typeof p.dragEnterFunc&&(!0===p.dragEnterFunc(e,"time",{scope:s})?k.value=i:k.value="")},onDragover:e=>{void 0!==p.dragOverFunc&&"function"===typeof p.dragOverFunc&&(!0===p.dragOverFunc(e,"time",{scope:s})?k.value=i:k.value="")},onDragleave:e=>{void 0!==p.dragLeaveFunc&&"function"===typeof p.dragLeaveFunc&&(!0===p.dragLeaveFunc(e,"time",{scope:s})?k.value=i:k.value="")},onDrop:e=>{void 0!==p.dropFunc&&"function"===typeof p.dropFunc&&(!0===p.dropFunc(e,"time",{scope:s})?k.value=i:k.value="")},onFocus:()=>{!0===u&&(y.value=i)},...W("-time",e=>{return{scope:s,event:e}})},[n&&n({scope:s}),useFocusHelper()])}function Te(){const{start:e,end:t,maxDays:a}=V.value,n=(u.value===e.date&&s.value===t.date&&d.value===a||(u.value=e.date,s.value=t.date,d.value=a),l.width>0),r=withDirectives(h("div",{class:"q-calendar-resource",key:u.value},[!0===n&&de()]),[[ResizeObserverDirective,ne]]);if(!0!==p.animated)return r;{const o="q-calendar--"+("prev"===i.value?p.transitionPrev:p.transitionNext);return h(Transition,{name:o,appear:!0},()=>r)}}return watch([S],Q,{deep:!0,immediate:!0}),watch(()=>p.modelValue,(e,t)=>{if(r.value!==e){if(!0===p.animated){const a=getDayIdentifier(parsed(e)),n=getDayIdentifier(parsed(t));i.value=a>=n?"next":"prev"}r.value=e}y.value=e}),watch(r,(e,t)=>{if(r.value!==p.modelValue){if(!0===p.animated){const a=getDayIdentifier(parsed(e)),n=getDayIdentifier(parsed(t));i.value=a>=n?"next":"prev"}m("update:model-value",e)}}),watch(y,e=>{e&&(a.value=parseTimestamp(e))}),watch(a,()=>{f.value[y.value]?f.value[y.value].focus():J()}),onBeforeUpdate(()=>{f.value={},g.value={}}),onMounted(()=>{}),x({prev:ae,next:te,move:F,moveToToday:ee,updateCurrent:M,timeStartPosX:A,timeDurationWidth:O,widthToMinutes:j,scrollToTimeX:$}),()=>X()}});const version="4.1.1";var Plugin={version:version,QCalendarResource:QCalendarResource,...Timestamp$1,...helpers$1,install(e){e.component(String(QCalendarResource.name),QCalendarResource)}};export{DAYS_IN_MONTH,DAYS_IN_MONTH_LEAP,DAYS_IN_MONTH_MAX,DAYS_IN_MONTH_MIN,DAY_MIN,FIRST_HOUR,MONTH_MAX,MONTH_MIN,PARSE_DATE,PARSE_DATETIME,PARSE_TIME,QCalendarResource,TIME_CONSTANTS,addToDate,compareDate,compareDateTime,compareTime,compareTimestamps,convertToUnit,copyTimestamp,createDayList,createIntervalList,createNativeLocaleFormatter,daysBetween,daysInMonth,Plugin as default,diffTimestamp,findWeekday,getDate,getDateTime,getDayIdentifier,getDayOfYear,getDayTimeIdentifier,getEndOfMonth,getEndOfWeek,getMonthFormatter,getMonthNames,getStartOfMonth,getStartOfWeek,getTime,getTimeIdentifier,getWeekday,getWeekdayFormatter,getWeekdayNames,getWorkWeek,indexOf,isBetweenDates,isLeapYear,isOverlappingDates,isToday,makeDate,makeDateTime,maxTimestamp,minCharWidth,minTimestamp,moveRelativeDays,nextDay,padNumber,parseDate,parseTime,parseTimestamp,parsed,prevDay,relativeDays,today,updateDayOfYear,updateDisabled,updateFormatted,updateMinutes,updateRelative,updateWeekday,updateWorkWeek,validateNumber,validateTimestamp,version,weeksBetween}; |
/*! | ||
* @quasar/quasar-ui-qcalendar v4.1.0 | ||
* @quasar/quasar-ui-qcalendar v4.1.1 | ||
* (c) 2025 Jeff Galbraith <jeff@quasar.dev> | ||
* Released under the MIT License. | ||
*/ | ||
(function(e,t){"object"===typeof exports&&"undefined"!==typeof module?module.exports=t(require("vue")):"function"===typeof define&&define.amd?define(["vue"],t):(e="undefined"!==typeof globalThis?globalThis:e||self,e.QCalendarResource=t(e.Vue))})(this,function(we){const i=/^(\d{4})-(\d{1,2})(-(\d{1,2}))?([^\d]+(\d{1,2}))?(:(\d{1,2}))?(:(\d{1,2}))?(.(\d{1,3}))?$/,f=/^(\d{4})-(\d{1,2})(-(\d{1,2}))?/,y=/(\d\d?)(:(\d\d?)|)(:(\d\d?)|)/,T=[0,31,28,31,30,31,30,31,31,30,31,30,31],b=[0,31,29,31,30,31,30,31,31,30,31,30,31],r={MILLISECONDS_IN:{SECOND:1e3,MINUTE:6e4,HOUR:36e5,DAY:864e5,WEEK:6048e5},SECONDS_IN:{MINUTE:60,HOUR:3600,DAY:86400,WEEK:604800},MINUTES_IN:{MINUTE:1,HOUR:60,DAY:1440,WEEK:10080},HOURS_IN:{DAY:24,WEEK:168},DAYS_IN:{WEEK:7}},k=28,N=31,F=12,I=1,M=1,C=0;function t(e){return"string"===typeof e&&i.test(e)}function De(e){if("string"!==typeof e)return null;const t=i.exec(e);if(!t||!t[1]||!t[2])return null;const n=parseInt(t[1],10),a=parseInt(t[2],10),r=parseInt(t[4]||"1",10),o=parseInt(t[6]||"0",10),u=parseInt(t[8]||"0",10);return{date:e,time:o.toString().padStart(2,"0")+":"+u.toString().padStart(2,"0"),year:n,month:a,day:r,hour:o,minute:u,hasDay:!!t[4],hasTime:!0,past:!1,current:!1,future:!1,disabled:!1,weekday:0,doy:0,workweek:0}}function E(e,t=!1){if(!(e instanceof Date))return null;const n=t?"UTC":"";return w({date:o(e[`get${n}FullYear`](),4)+"-"+o(e[`get${n}Month`]()+1,2)+"-"+o(e[`get${n}Date`](),2),time:o(e[`get${n}Hours`]()||0,2)+":"+o(e[`get${n}Minutes`]()||0,2),year:e[`get${n}FullYear`](),month:e[`get${n}Month`]()+1,day:e[`get${n}Date`](),hour:e[`get${n}Hours`](),minute:e[`get${n}Minutes`](),weekday:0,doy:0,workweek:0,hasDay:!0,hasTime:!0,past:!1,current:!1,future:!1,disabled:!1})}function o(e,t){let n=String(e);while(n.length<t)n="0"+n;return n}function A(e){return e%4===0&&e%100!==0||e%400===0}function l(e,t){return(A(e)?b:T)[t]}function h(e){const t=new Date(e.year,e.month-1,e.day+1);return w(ie({...e,year:t.getFullYear(),month:t.getMonth()+1,day:t.getDate()}))}function p(e){const t=new Date(e.year,e.month-1,e.day-1);return w(ie({...e,year:t.getFullYear(),month:t.getMonth()+1,day:t.getDate()}))}function Te(){const e=new Date,t=e.getMonth()+1,n=e.getDate(),a=e.getFullYear();return[a,o(t,2),o(n,2)].join("-")}function O(e){return e===Te()}function P(e,t,n){let a=X(e);if(t){if(1===a.day||0===a.weekday)while(!t.includes(Number(a.weekday)))a=h(a);a=v(a,t[0],p),a=w(a),n&&(a=z(a,n,a.hasTime))}return a}function Z(e,t,n){let a=X(e);if(t&&Array.isArray(t)){const r=l(a.year,a.month);if(r===a.day||a.weekday===t[t.length-1])while(!t.includes(Number(a.weekday)))a=p(a);a=v(a,t[t.length-1],h),a=w(a),n&&(a=z(a,n,a.hasTime))}return a}function _(e){let t=X(e);return t.day=M,t=w(t),t}function S(e){let t=X(e);return t.day=l(t.year,t.month),t=w(t),t}function K(e){const t=Object.prototype.toString.call(e);switch(t){case"[object Number]":return e;case"[object String]":{const n=y.exec(e);return n?60*parseInt(n[1],10)+parseInt(n[3]||"0",10):!1}case"[object Object]":return"object"!==typeof e||"number"!==typeof e.hour||"number"!==typeof e.minute?!1:"object"===typeof e&&"hour"in e&&"minute"in e&&60*e.hour+e.minute}return!1}function W(e,t){return!(!e||!t)&&e.year===t.year&&e.month===t.month&&e.day===t.day&&e.hour===t.hour&&e.minute===t.minute}function x(e,t){return s(e)===s(t)}function q(e,t){return c(e)===c(t)}function H(e,t){return j(e)===j(t)}function be(e,t=null){let n=De(e);return n?(n=w(n),t&&(n=z(n,t,n.hasTime)),n):null}function ke(e){return 1e8*(e.year??0)+1e6*(e.month??0)+1e4*(e.day??0)}function d(e){return 100*(e.hour??0)+(e.minute??0)}function $(e){return ke(e)+d(e)}function R(e,t,n=!1){const a=Date.UTC(e.year??0,(e.month??1)-1,e.day??1,e.hour??0,e.minute??0),r=Date.UTC(t.year??0,(t.month??1)-1,t.day??1,t.hour??0,t.minute??0);return!0===n&&r<a?0:r-a}function z(e,t,n=!1){let a=X(e),r=ke(t),o=ke(a),u=r===o;return a.hasTime&&n&&u&&(r=d(t),o=d(a),u=r===o),a.past=o<r,a.current=u,a.future=o>r,a.currentWeekday=a.weekday===t.weekday,a}function U(e,t,n=null){let a=X(e);return a.hasTime=!0,a.hour=Math.floor(t/r.MINUTES_IN.HOUR),a.minute=t%r.MINUTES_IN.HOUR,a.time=c(a),n&&(a=z(a,n,!0)),a}function g(e){let t=X(e);return t.weekday=u(t),t}function L(e){let t=X(e);return t.doy=n(t)||0,t}function Y(e){let t=X(e);return t.workweek=a(t),t}function B(e,t,n,a,r){let o=X(e);const u=ke(o);if(void 0!==t){const s=De(t);if(s){const c=ke(s);u<=c&&(o.disabled=!0)}}if(!0!==o.disabled&&void 0!==n){const v=De(n);if(v){const m=ke(v);u>=m&&(o.disabled=!0)}}if(!0!==o.disabled&&Array.isArray(a)&&a.length>0)for(var i in a)if(a[i]===o.weekday){o.disabled=!0;break}if(!0!==o.disabled&&Array.isArray(r)&&r.length>0)for(var l in r)if(Array.isArray(r[l])&&2===r[l].length&&r[l][0]&&r[l][1]){const f=De(r[l][0]),y=De(r[l][1]);if(f&&y&&oe(o,f,y)){o.disabled=!0;break}}else{const h=r[l];if(Array.isArray(h))for(var d of h){const p=be(d);if(p){const g=ke(p);if(g===u){o.disabled=!0;break}}}else if(h){const w=be(h);if(w){const D=ke(w);D===u&&(o.disabled=!0)}}}return o}function w(e){let t=X(e);return t.hasTime=!0,t.time=c(t),t.date=s(t),t.weekday=u(t),t.doy=n(t)||0,t.workweek=a(t),t}function n(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 a(e){let t=X(e);if(0===t.year){const r=be(Te());r&&(t=r)}const n=new Date(Date.UTC(t.year,t.month-1,t.day)),a=4;n.setUTCDate(n.getUTCDate()-(n.getUTCDay()+6)%7+a),n.setUTCDate(n.getUTCDate()+a-(n.getUTCDay()||7));e=new Date(Date.UTC(n.getUTCFullYear(),0,1)),e=Math.ceil(((n.valueOf()-e.valueOf())/864e5+1)/7);return e}function u(e){let t=e.weekday;if(e.hasDay){const n=Math.floor,a=e.day,r=(e.month+9)%F+1,o=n(e.year/100),u=e.year%100-(e.month<=2?1:0);t=((a+n(2.6*r-.2)-2*o+u+n(u/4)+n(o/4))%7+7)%7}return t??0}function X(e){return{...e}}function s(e){let t=o(e.year,4)+"-"+o(e.month,2);return e.hasDay&&(t+="-"+o(e.day,2)),t}function c(e){return e.hasTime?o(e.hour,2)+":"+o(e.minute,2):""}function j(e){return s(e)+" "+(e.hasTime?c(e):"00:00")}function V(e,t=h,n=1,a=[0,1,2,3,4,5,6]){const r=X(e);return D(r,t,n,a)}function D(e,t=h,n=1,a=[0,1,2,3,4,5,6]){let r=X(e);a.includes(Number(r.weekday))||0!==r.weekday||t!==h||++n;while(--n>=0)r=t(r),a.length<7&&!a.includes(Number(r.weekday))&&++n;return r}function v(e,t,n=h,a=6){let r=X(e);while(r.weekday!==t&&--a>=0)r=n(r);return r}function J(e,t,n,a=[0,1,2,3,4,5,6],r=void 0,o=void 0,u=[],i=[],l=42,d=0){const s=ke(e),c=ke(t),v=[];let m=X(e),f=0,y=f===c;if(!(c<s))while((!y||v.length<d)&&v.length<l){if(f=ke(m),y=y||f>c&&v.length>=d,y)break;if(a.includes(Number(m.weekday))){let e=X(m);e=w(e),e=z(e,n),e=B(e,r,o,u,i),v.push(e)}m=D(m,h)}return v}function ee(t,n,a,r,o){const u=[];for(let e=0;e<r;++e){const i=(n+e)*a,l=X(t);u.push(U(l,i,o))}return u}function Q(a,r){const e=()=>"";return"undefined"===typeof Intl||"undefined"===typeof Intl.DateTimeFormat?e:(t,e)=>{try{const n=new Intl.DateTimeFormat(a||void 0,r(t,e));return n.format(ne(t))}catch(e){return console.error(`Intl.DateTimeFormat: ${e.message} -> `+j(t)),""}}}function te(e,t=!0){return t?new Date(Date.UTC(e.year,e.month-1,e.day,0,0)):new Date(e.year,e.month-1,e.day,0,0)}function ne(e,t=!0){return t?new Date(Date.UTC(e.year,e.month-1,e.day,e.hour,e.minute)):new Date(e.year,e.month-1,e.day,e.hour,e.minute)}function e(e){return isFinite(Number(e))}function ae(e,t=!1){const n=!0===t?$:ke;return e.reduce((e,t)=>{return Math.max(n(e),n(t))===n(e)?e:t})}function re(e,t=!1){const n=!0===t?$:ke;return e.reduce((e,t)=>{return Math.min(n(e),n(t))===n(e)?e:t})}function oe(e,t,n,a=!1){const r=ke(e)+(!0===a?d(e):0),o=ke(t)+(!0===a?d(t):0),u=ke(n)+(!0===a?d(n):0);return r>=o&&r<=u}function ue(e,t,n,a){const r=ke(e),o=ke(t),u=ke(n),i=ke(a);return r>=u&&r<=i||o>=u&&o<=i||u>=r&&o>=i}function G(e,t){const n=X(e);return t.year&&(n.year+=t.year),t.month&&(n.month+=t.month),t.day&&(n.day+=t.day),t.hour&&(n.hour+=t.hour),t.minute&&(n.minute+=t.minute),w(ie(n))}function ie(e){const t=new Date(e.year,e.month-1,e.day,e.hour,e.minute);return{...e,year:t.getFullYear(),month:t.getMonth()+1,day:t.getDate(),hour:t.getHours(),minute:t.getMinutes()}}function le(e,t){const n=R(e,t,!0);return Math.floor(n/r.MILLISECONDS_IN.DAY)}function de(e,t){let n=X(e),a=X(t);return n=v(n,0),a=v(a,6),Math.ceil(le(n,a)/r.DAYS_IN.WEEK)}const se={Sun:new Date("2020-01-05T00:00:00.000Z"),Mon:new Date("2020-01-06T00:00:00.000Z"),Tue:new Date("2020-01-07T00:00:00.000Z"),Wed:new Date("2020-01-08T00:00:00.000Z"),Thu:new Date("2020-01-09T00:00:00.000Z"),Fri:new Date("2020-01-10T00:00:00.000Z"),Sat:new Date("2020-01-11T00:00:00.000Z")};function ce(){const e=()=>"",r={long:{timeZone:"UTC",weekday:"long"},short:{timeZone:"UTC",weekday:"short"},narrow:{timeZone:"UTC",weekday:"narrow"}};return"undefined"===typeof Intl||"undefined"===typeof Intl.DateTimeFormat?e:t;function t(t,e,n){try{const a=new Intl.DateTimeFormat(n||void 0,r[e]||r["long"]);return a.format(se[t])}catch(e){return e instanceof Error&&console.error(`Intl.DateTimeFormat: ${e.message} -> day of week: `+t),""}}}function ve(t,n){const e=Object.keys(se),a=ce();return e.map(e=>String(a(e,t,n)))}function me(){const e=()=>"",o={long:{timeZone:"UTC",month:"long"},short:{timeZone:"UTC",month:"short"},narrow:{timeZone:"UTC",month:"narrow"}};return"undefined"===typeof Intl||"undefined"===typeof Intl.DateTimeFormat?e:t;function t(t,e,n){try{const a=new Intl.DateTimeFormat(n||void 0,o[e]||o["long"]),r=new Date;return r.setDate(1),r.setMonth(t),a.format(r)}catch(e){return e instanceof Error&&console.error(`Intl.DateTimeFormat: ${e.message} -> month: `+t),""}}}function fe(t,n){const a=me();return[...Array(12).keys()].map(e=>a(e,t,n))}var ye={PARSE_DATETIME:i,PARSE_DATE:f,PARSE_TIME:y,DAYS_IN_MONTH:T,DAYS_IN_MONTH_LEAP:b,DAYS_IN_MONTH_MIN:k,DAYS_IN_MONTH_MAX:N,MONTH_MAX:F,MONTH_MIN:I,DAY_MIN:M,TIME_CONSTANTS:r,FIRST_HOUR:C,today:Te,getStartOfWeek:P,getEndOfWeek:Z,getStartOfMonth:_,getEndOfMonth:S,parseTime:K,validateTimestamp:t,parsed:De,parseTimestamp:be,parseDate:E,getDayIdentifier:ke,getTimeIdentifier:d,getDayTimeIdentifier:$,diffTimestamp:R,updateRelative:z,updateMinutes:U,updateWeekday:g,updateDayOfYear:L,updateWorkWeek:Y,updateDisabled:B,updateFormatted:w,getDayOfYear:n,getWorkWeek:a,getWeekday:u,isLeapYear:A,daysInMonth:l,copyTimestamp:X,padNumber:o,getDate:s,getTime:c,getDateTime:j,nextDay:h,prevDay:p,relativeDays:D,findWeekday:v,createDayList:J,createIntervalList:ee,createNativeLocaleFormatter:Q,makeDate:te,makeDateTime:ne,validateNumber:e,isBetweenDates:oe,isOverlappingDates:ue,daysBetween:le,weeksBetween:de,addToDate:G,compareTimestamps:W,compareDate:x,compareTime:q,compareDateTime:H,getWeekdayFormatter:ce,getWeekdayNames:ve,getMonthFormatter:me,getMonthNames:fe},ye=Object.freeze({__proto__:null,DAYS_IN_MONTH:T,DAYS_IN_MONTH_LEAP:b,DAYS_IN_MONTH_MAX:N,DAYS_IN_MONTH_MIN:k,DAY_MIN:M,FIRST_HOUR:C,MONTH_MAX:F,MONTH_MIN:I,PARSE_DATE:f,PARSE_DATETIME:i,PARSE_TIME:y,TIME_CONSTANTS:r,addToDate:G,compareDate:x,compareDateTime:H,compareTime:q,compareTimestamps:W,copyTimestamp:X,createDayList:J,createIntervalList:ee,createNativeLocaleFormatter:Q,daysBetween:le,daysInMonth:l,default:ye,diffTimestamp:R,findWeekday:v,getDate:s,getDateTime:j,getDayIdentifier:ke,getDayOfYear:n,getDayTimeIdentifier:$,getEndOfMonth:S,getEndOfWeek:Z,getMonthFormatter:me,getMonthNames:fe,getStartOfMonth:_,getStartOfWeek:P,getTime:c,getTimeIdentifier:d,getWeekday:u,getWeekdayFormatter:ce,getWeekdayNames:ve,getWorkWeek:a,isBetweenDates:oe,isLeapYear:A,isOverlappingDates:ue,isToday:O,makeDate:te,makeDateTime:ne,maxTimestamp:ae,minTimestamp:re,moveRelativeDays:V,nextDay:h,padNumber:o,parseDate:E,parseTime:K,parseTimestamp:be,parsed:De,prevDay:p,relativeDays:D,today:Te,updateDayOfYear:L,updateDisabled:B,updateFormatted:w,updateMinutes:U,updateRelative:z,updateWeekday:g,updateWorkWeek:Y,validateNumber:e,validateTimestamp:t,weeksBetween:de});function _e(e,t="px"){if(e)return isNaN(e)?String(e):"auto"===e?e:""+Number(e)+t}function he(t,n){for(let e=0;e<t.length;e++)if(!0===n(t[e],e))return e;return-1}function pe(e,t){return 0===t?e:e.slice(0,t)}var ge={convertToUnit:_e,indexOf:he,minCharWidth:pe},ge=Object.freeze({__proto__:null,convertToUnit:_e,default:ge,indexOf:he,minCharWidth:pe});const Se={mounted(e,t){if("function"===typeof t.value){const n=t.value,a={callback:n,size:{width:0,height:0},observer:new ResizeObserver(e=>{const t=e[0].contentRect;t.width===a.size.width&&t.height===a.size.height||(a.size.width=t.width,a.size.height=t.height,a.debounceTimeout&&clearTimeout(a.debounceTimeout),a.debounceTimeout=setTimeout(()=>{a.callback(a.size),a.debounceTimeout=void 0},100))})};a.observer.observe(e),e.__onResizeObserver=a}},beforeUnmount(e){if(e.__onResizeObserver){const{observer:t,debounceTimeout:n}=e.__onResizeObserver;n&&clearTimeout(n),t.unobserve(e),delete e.__onResizeObserver}}};function Ne(t,n,{scrollArea:e,pane:a}){if(!n){const s="[error: renderCalendar] no renderFunc has been supplied to useCalendar";throw console.error(s),new Error(s)}const r=we.reactive({width:0,height:0}),o=we.ref(null);function u({width:e,height:t}){r.width=e,r.height=t}const i=we.computed(()=>{return!0!==t.noScroll&&e.value&&a.value&&r.height?e.value.offsetWidth-a.value.offsetWidth:0});function l(){}function d(){const e={ref:o,role:"complementary",lang:t.locale,class:`q-calendar ${t.dark?"q-calendar--dark":""} `+(t.bordered?"q-calendar__bordered":"")};return we.withDirectives(we.h("div",{...e},[n()]),[[Se,u]])}return{rootRef:o,scrollWidth:i,__initCalendar:l,__renderCalendar:d}}const Fe=e=>e.every(e=>["day","date","weekday","interval","time","resource","task"].includes(e)),Ie={modelValue:{type:String,default:Te(),validator:e=>""===e||t(e)},weekdays:{type:Array,default:()=>[0,1,2,3,4,5,6]},dateType:{type:String,default:"round",validator:e=>["round","rounded","square"].includes(e)},weekdayAlign:{type:String,default:"center",validator:e=>["left","center","right"].includes(e)},dateAlign:{type:String,default:"center",validator:e=>["left","center","right"].includes(e)},bordered:Boolean,dark:Boolean,noAria:Boolean,noActiveDate:Boolean,noHeader:Boolean,noScroll:Boolean,shortWeekdayLabel:Boolean,noDefaultHeaderText:Boolean,noDefaultHeaderBtn:Boolean,minWeekdayLabel:{type:[Number,String],default:1},weekdayBreakpoints:{type:Array,default:()=>[75,35],validator:e=>2===e.length},locale:{type:String,default:"en-US"},animated:Boolean,transitionPrev:{type:String,default:"slide-right"},transitionNext:{type:String,default:"slide-left"},disabledDays:Array,disabledBefore:String,disabledAfter:String,disabledWeekdays:{type:Array,default:()=>[]},dragEnterFunc:Function,dragOverFunc:Function,dragLeaveFunc:Function,dropFunc:Function,selectedDates:{type:[Array,Set],default:()=>[]},selectedStartEndDates:{type:Array,default:()=>[]},hoverable:Boolean,focusable:Boolean,focusType:{type:Array,default:()=>["date"],validator:Fe}};function Me(t,{startDate:e,endDate:n,times:a}){const r=we.computed(()=>be(e.value)),o=we.computed(()=>{return"0000-00-00"===n.value?Z(r.value,t.weekdays,a.today):be(n.value)||r.value}),u=we.computed(()=>Q(t.locale,()=>({timeZone:"UTC",day:"numeric"}))),i=we.computed(()=>Q(t.locale,(e,t)=>({timeZone:"UTC",weekday:t?"short":"long"}))),l=we.computed(()=>Q(t.locale,()=>({timeZone:"UTC",dateStyle:"full"})));function d(e,t){return e&&e.length>0&&e.includes(t.date)}function s(e,t){const n={firstDay:!1,betweenDays:!1,lastDay:!1};if(2===e.length){const a=ke(t),r=ke(De(e[0])),o=ke(De(e[1]));n.firstDay=r===a,n.lastDay=o===a,n.betweenDays=r<a&&o>a}return n}function c(e,t=!1,n=[],a=[],r=!1){const o=d(n,e),{firstDay:u,lastDay:i,betweenDays:l}=s(a,e);return{"q-past-day":!u&&!l&&!i&&!o&&!t&&!!e.past,"q-future-day":!u&&!l&&!i&&!o&&!t&&!!e.future,"q-outside":t,"q-current-day":!!e.current,"q-selected":o,"q-range-first":u,"q-range":l,"q-range-last":i,"q-range-hover":r&&(u||i||l),"q-disabled-day disabled":!0===e.disabled}}function v(e){return P(e,t.weekdays,a.today)}function m(e){return Z(e,t.weekdays,a.today)}function f(){return{}}return{parsedStart:r,parsedEnd:o,dayFormatter:u,weekdayFormatter:i,ariaDateFormatter:l,arrayHasDate:d,checkDays:s,getRelativeClasses:c,startOfWeek:v,endOfWeek:m,dayStyleDefault:f}}function Ce(e,t){e instanceof Window?e.scrollTo({top:t,behavior:"instant"}):e.scrollTop=t}function Ee(e){return e instanceof Window?e.scrollY:e.scrollTop}function Ae(o,u,i=500,l=performance.now(),d=Ee(o)){i<=0||d===u?Ce(o,u):requestAnimationFrame(e=>{const t=e-l,n=Math.min(t/i,1),a=e=>e<.5?2*e*e:(4-2*e)*e-1,r=d+(u-d)*a(n);Ce(o,r),n<1&&Ae(o,u,i,l,d)})}function Oe(r,e,o=500){const u=r.scrollLeft,i=e-u;let l=null;function d(e){null===l&&(l=e);const t=e-l,n=Math.min(t/o,1),a=e=>e<.5?2*e*e:(4-2*e)*e-1;r.scrollLeft=u+i*a(n),t<o&&requestAnimationFrame(d)}requestAnimationFrame(d)}const We={view:{type:String,validator:e=>["day","week","month","month-interval"].includes(e),default:"day"},shortIntervalLabel:Boolean,intervalHeight:{type:[Number,String],default:40,validator:e},intervalMinutes:{type:[Number,String],default:60,validator:e},intervalStart:{type:[Number,String],default:0,validator:e},intervalCount:{type:[Number,String],default:24,validator:e},intervalStyle:{type:Function,default:null},intervalClass:{type:Function,default:null},weekdayStyle:{type:Function,default:null},weekdayClass:{type:Function,default:null},showIntervalLabel:{type:Function,default:null},hour24Format:Boolean,timeClicksClamped:Boolean,dateHeader:{type:String,default:"stacked",validator:e=>["stacked","inline","inverted"].includes(e)}},xe={modelResources:{type:Array},resourceKey:{type:String,default:"id"},resourceLabel:{type:String,default:"label"},resourceHeight:{type:[Number,String],default:0,validator:e},resourceMinHeight:{type:[Number,String],default:70,validator:e},resourceStyle:{type:Function,default:null},resourceClass:{type:Function,default:null},cellWidth:{type:[Number,String],default:100},intervalHeaderHeight:{type:[Number,String],default:20,validator:e},noSticky:Boolean};function qe(o,{times:t,scrollArea:a,parsedStart:e,parsedEnd:n,maxDays:r,size:u,headerColumnRef:i}){const l=we.computed(()=>parseInt(String(o.intervalStart),10)),v=we.computed(()=>parseInt(String(o.intervalMinutes),10)),d=we.computed(()=>parseInt(String(o.intervalCount),10)),m=we.computed(()=>parseFloat(String(o.intervalHeight))),f=we.computed(()=>{let e=0;const t=Number(o.columnCount);return o.cellWidth?e=Number(o.cellWidth):u.width>0&&i.value&&(e=i.value.offsetWidth/(t>1?t:r.value)),e}),s=we.computed(()=>l.value*v.value),c=we.computed(()=>d.value*m.value),y=we.computed(()=>d.value*f.value),h=we.computed(()=>D(e.value)),p=we.computed(()=>T(n.value)),g=we.computed(()=>{return J(e.value,n.value,t.today,o.weekdays,o.disabledBefore,o.disabledAfter,o.disabledWeekdays,o.disabledDays,r.value)}),w=we.computed(()=>{return g.value.map(e=>ee(e,l.value,v.value,d.value,t.now))});function D(e){return P(e,o.weekdays,t.today)}function T(e){return Z(e,o.weekdays,t.today)}function b(e,t){return e&&e.length>0&&e.includes(j(t))}function k(e,t){const n={firstDay:!1,betweenDays:!1,lastDay:!1};if(e&&2===e.length){const a=$(t),r=$(De(e[0])),o=$(De(e[1]));n.firstDay=r===a,n.lastDay=o===a,n.betweenDays=r<a&&o>a}return n}function _(e,t=[],n=[]){const a=b(t,e),{firstDay:r,lastDay:o,betweenDays:u}=k(n,e);return{"q-selected":a,"q-range-first":!0===r,"q-range":!0===u,"q-range-last":!0===o,"q-disabled-interval disabled":!0===e.disabled}}function S(e,t,n){return[]}const N=we.computed(()=>{const n={timeZone:"UTC",hour12:!o.hour24Format,hour:"2-digit",minute:"2-digit"},a={timeZone:"UTC",hour12:!o.hour24Format,hour:"numeric",minute:"2-digit"},r={timeZone:"UTC",hour12:!o.hour24Format,hour:"numeric"};return Q(o.locale,(e,t)=>t?0===e.minute?r:a:n)}),F=we.computed(()=>{const e={timeZone:"UTC",dateStyle:"full",timeStyle:"short"};return Q(o.locale,()=>e)});function I(e){const t=w.value[0][0],n=t.hour===e.hour&&t.minute===e.minute;return!n&&0===e.minute}function M(e){}function C(e){return{}}function E(e,t,n=!1,a){let r=X(t);if(e.currentTarget){const o=e.currentTarget.getBoundingClientRect(),u=e,i=e,l=u.changedTouches||u.touches,d=(l&&l[0]?l[0]:i).clientY,s=(d-o.top)/m.value,c=Math.floor((n?Math.floor(s):s)*v.value);0!==c&&(r=G(r,{minute:c})),a&&(r=z(r,a,!0))}return r}function q(e,t,n=!1,a){let r=X(t);const o=e.currentTarget.getBoundingClientRect(),u=e,i=e,l=u.changedTouches||u.touches,d=(l&&l[0]?l[0]:i).clientY,s=(d-o.top)/m.value,c=Math.floor((n?Math.floor(s):s)*v.value);return 0!==c&&(r=G(r,{minute:c})),a&&(r=z(r,a,!0)),r}function H(e,t,n=!1,a){let r=X(t);if(e.currentTarget){const o=e.currentTarget.getBoundingClientRect(),u=e,i=e,l=u.changedTouches||u.touches,d=(l&&l[0]?l[0]:i).clientX,s=(d-o.left)/f.value,c=Math.floor((n?Math.floor(s):s)*v.value);0!==c&&(r=G(r,{minute:c})),a&&(r=z(r,a,!0))}return r}function R(e,t){const n={timestamp:e,timeStartPos:W,timeDurationHeight:A};return void 0!==t&&(n.columnIndex=t),n}function U(e,t){const n={timestamp:X(e),timeStartPosX:x,timeDurationWidth:O};return void 0!==t&&(n.index=t),n}function L(e,t=0){const n=W(e);return!(!1===n||!a.value)&&(Ae(a.value,n,t),!0)}function Y(e,t=0){const n=x(e);return!(!1===n||!a.value)&&(Oe(a.value,n,t),!0)}function A(e){return e/v.value*m.value}function O(e){return e/v.value*f.value}function B(e){return e*v.value/m.value}function V(e){return e*v.value/f.value}function W(e,t=!0){const n=K(e);if(!1===n)return!1;const a=s.value,r=d.value*v.value,o=(n-a)/r;let u=o*c.value;return t&&(u<0&&(u=0),u>c.value)&&(u=c.value),u}function x(e,t=!0){const n=K(e);if(!1===n)return!1;const a=s.value,r=d.value*v.value,o=(n-a)/r;let u=o*y.value;return t&&(u<0&&(u=0),u>y.value)&&(u=y.value),u}return{parsedIntervalStart:l,parsedIntervalMinutes:v,parsedIntervalCount:d,parsedIntervalHeight:m,parsedCellWidth:f,parsedStartMinute:s,bodyHeight:c,bodyWidth:y,parsedWeekStart:h,parsedWeekEnd:p,days:g,intervals:w,intervalFormatter:N,ariaDateTimeFormatter:F,arrayHasDateTime:b,checkIntervals:k,getIntervalClasses:_,getResourceClasses:S,showIntervalLabelDefault:I,showResourceLabelDefault:M,styleDefault:C,getTimestampAtEventInterval:E,getTimestampAtEvent:q,getTimestampAtEventX:H,getScopeForSlot:R,getScopeForSlotX:U,scrollToTime:L,scrollToTimeX:Y,timeDurationHeight:A,timeDurationWidth:O,heightToMinutes:B,widthToMinutes:V,timeStartPos:W,timeStartPosX:x}}const He={columnCount:{type:[Number,String],default:0,validator:e},columnIndexStart:{type:[Number,String],default:0,validator:e}},Re={maxDays:{type:Number,default:1}},Ue={now:{type:String,validator:e=>""===e||t(e),default:""}};function Le(e){const t=we.reactive({now:be("0000-00-00 00:00"),today:be("0000-00-00")}),n=we.computed(()=>e.now?be(e.now):o());function a(){t.now&&t.today&&(t.now.current=t.today.current=!0,t.now.past=t.today.past=!1,t.now.future=t.today.future=!1)}function r(){const e=n.value||o();u(e,t.now),i(e,t.now),u(e,t.today)}function o(){return E(new Date)}function u(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)}function i(e,t){e.time!==t.time&&(t.hour=e.hour,t.minute=e.minute,t.time=e.time)}return we.watch(n,()=>r()),{times:t,parsedNow:n,setCurrent:a,updateCurrent:r,getNow:o,updateDay:u,updateTime:i}}function Ye(r,{parsedView:o,parsedValue:u,times:i}){const e=we.computed(()=>{const e=u.value;let t=r.maxDays,n=e,a=e;switch(o.value){case"month":n=_(e),a=S(e),t=l(n.year,n.month);break;case"week":case"week-agenda":case"week-scheduler":n=P(e,r.weekdays,i.today),a=Z(n,r.weekdays,i.today),t=r.weekdays.length;break;case"day":case"scheduler":case"agenda":a=V(X(a),h,t>1?t-1:t,r.weekdays),a=w(a);break;case"month-interval":case"month-scheduler":case"month-agenda":n=_(e),a=S(e),a=w(a),t=l(n.year,n.month);break;case"resource":t=1,a=V(X(a),h,t,r.weekdays),a=w(a);break}return{start:n,end:a,maxDays:t}});return{renderValues:e}}const Be=e=>e.replace(/(-\w)/g,e=>e[1].toUpperCase());function Ve(t,e,n,a){const r={};for(const o in n){const u=n[o],i=Be("on-"+o);if(!e.value)return console.warn("$listeners has not been set up"),{};if(void 0!==e.value[i]){const l="on"+u.event.charAt(0).toUpperCase()+u.event.slice(1),d=e=>{return(void 0===u.button||"buttons"in e&&e.buttons>0&&e.button===u.button)&&(u.prevent&&e.preventDefault(),u.stop&&e.stopPropagation(),t(o,a(e,o))),u.result};l in r?Array.isArray(r[l])?r[l].push(d):r[l]=[r[l],d]:r[l]=d}}return r}function Pe(e,t,n,a){return Ve(e,t,Ze(n),a)}function Ze(e){return{["click"+e]:{event:"click"},["contextmenu"+e]:{event:"contextmenu",prevent:!0,result:!1},["mousedown"+e]:{event:"mousedown"},["mousemove"+e]:{event:"mousemove"},["mouseup"+e]:{event:"mouseup"},["mouseenter"+e]:{event:"mouseenter"},["mouseleave"+e]:{event:"mouseleave"},["touchstart"+e]:{event:"touchstart"},["touchmove"+e]:{event:"touchmove"},["touchend"+e]:{event:"touchend"}}}function m(e){return Object.keys(Ze(e))}function Ke(n,a){return{getMouseEventHandlers:(e,t)=>Ve(n,a,e,t),getDefaultMouseEventHandlers:(e,t)=>Pe(n,a,e,t),getMouseEventName:Ze,getRawMouseEvents:m}}const $e=["moved"];function ze(l,{parsedView:d,parsedValue:s,direction:c,maxDays:v,times:m,emittedValue:f,emit:y}){function e(n=1){if(0===n)f.value=Te();else{let e=X(s.value);const a=S(e),r=n>0,o=r?h:p,u=r?a.day:1;let t=r?n:-n;c.value=r?"next":"prev";const i=l.weekdays.length;while(--t>=0)switch(d.value){case"month":e.day=u,e=o(e),e=g(e);while(!l.weekdays.includes(Number(e.weekday)))e=G(e,{day:r?1:-1});break;case"week":case"week-agenda":case"week-scheduler":e=D(e,o,i,l.weekdays);break;case"day":case"scheduler":case"agenda":e=D(e,o,v.value,l.weekdays);break;case"month-interval":case"month-agenda":case"month-scheduler":e.day=u,e=o(e);break;case"resource":e=D(e,o,v.value,l.weekdays);break}e=g(e),e=w(e),e=L(e),e=z(e,m.now),f.value=e.date,y("moved",e)}}return{move:e}}const Xe=/^on[A-Z]/;function je(e=we.getCurrentInstance()){return{emitListeners:we.computed(()=>{const t={};return e?.vnode?.props&&Object.keys(e.vnode.props).forEach(e=>{Xe.test(e)&&(t[e]=!0)}),t})}}function Qe(){const e={"aria-hidden":"true",class:"q-calendar__focus-helper"};return[we.h("span",e)]}const Ge=["change"];function Je(a,{days:r,lastStart:o,lastEnd:u}){function e(){const e=r.value;if(0===e.length)return!1;const t=e[0].date,n=e[e.length-1].date;return(!o.value||!u.value||t!==o.value||n!==u.value)&&(o.value=t,u.value=n,a("change",{start:t,end:n,days:e}),!0)}return{checkChange:e}}function et(){function e(e,t){return(Array.isArray(t)?t:[t]).includes(e.keyCode)}return{isKeyCode:e}}const tt=et().isKeyCode,nt={useNavigation:Boolean};function at(t,{rootRef:n,focusRef:a,focusValue:r,datesRef:o,parsedView:u,emittedValue:i,direction:l,times:d}){let e=!1;function s(){e||document&&(e=!0,document.addEventListener("keyup",y),document.addEventListener("keydown",f))}function c(){document&&(document.removeEventListener("keyup",y),document.removeEventListener("keydown",f),e=!1)}function v(e){if(e&&document){const t=document.activeElement;if(t!==document.body&&n.value?.contains(t))return!0}return!1}function m(){let t=0;const n=window.setInterval(()=>{const e=o.value[a.value];e&&(e.focus(),50!==++t)&&document.activeElement!==e||window.clearInterval(n)},250)}function f(e){v(e)&&tt(e,[33,34,35,36,37,38,39,40])&&(e.stopPropagation(),e.preventDefault())}function y(e){if(v(e)&&tt(e,[33,34,35,36,37,38,39,40])){const t={33:D,34:T,35:k,36:b,37:g,38:h,39:w,40:p};t[e.keyCode]?.()}}function h(){let e=X(r.value);if("month"===u.value){if(e=G(e,{day:-7}),r.value.month!==e.month)return l.value="prev",void(i.value=e.date)}else e=G(e,{minute:Number(t.intervalMinutes)});l.value="prev",a.value=e.date}function p(){let e=X(r.value);if("month"===u.value){if(e=G(e,{day:7}),r.value.month!==e.month)return l.value="next",void(i.value=e.date)}else e=G(e,{minute:Number(t.intervalMinutes)});l.value="next",a.value=e.date}function g(){let e=X(r.value);l.value="prev";do{e=G(e,{day:-1})}while(!t.weekdays.includes(Number(e.weekday)));a.value=e.date}function w(){let e=X(r.value);l.value="next";do{e=G(e,{day:1})}while(!t.weekdays.includes(Number(e.weekday)));a.value=e.date}function D(){let e=X(r.value);e="month"===u.value?G(e,{month:-1}):G(e,{day:-7}),l.value="prev",a.value=e.date}function T(){let e=X(r.value);e="month"===u.value?G(e,{month:1}):G(e,{day:7}),l.value="next",a.value=e.date}function b(){let e=X(r.value);e="month"===u.value?_(e):P(e,t.weekdays||[],d.today);while(!t.weekdays.includes(Number(e.weekday)))e=G(e,{day:-1});a.value=e.date}function k(){let e=X(r.value);e="month"===u.value?S(e):Z(e,t.weekdays||[],d.today);while(!t.weekdays.includes(Number(e.weekday)))e=G(e,{day:-1});a.value=e.date}return we.onBeforeUnmount(()=>{c()}),we.watch(()=>t.useNavigation,e=>{(!0===e?s:c)()}),!0===t.useNavigation&&s(),{startNavigation:s,endNavigation:c,tryFocus:m}}var rt=we.defineComponent({name:"QCalendarResource",props:{...Ie,...xe,...We,...He,...Re,...Ue,...nt},emits:["update:model-value","update:model-resources","resource-expanded",...Ge,...$e,...m("-date"),...m("-interval"),...m("-head-day"),...m("-time"),...m("-head-resources"),...m("-resource")],setup(m,{slots:f,emit:v,expose:q}){const e=we.ref(null),H=we.ref(null),R=we.ref(null),t=we.ref(null),y=we.ref(m.modelValue||Te()),n=we.ref(De(m.modelValue||Te())),h=we.ref({}),p=we.ref({}),u=we.ref("next"),i=we.ref(m.modelValue||Te()),l=we.ref("0000-00-00"),d=we.ref(0),r=we.ref(m.modelValue),s=we.reactive({width:0,height:0}),g=we.ref(""),w=we.ref(""),D=we.ref(""),U=we.ref(null),L=we.ref(null),a=(we.watch(()=>m.view,()=>{d.value=0}),we.computed(()=>{return"month"===m.view?"month-interval":m.view})),T=we.computed(()=>{return parseInt(String(m.cellWidth),10)}),o=we.getCurrentInstance();if(null===o)throw new Error("current instance is null");const b=je(o).emitListeners,{times:c,setCurrent:Y,updateCurrent:k}=Le(m),{parsedStart:_,parsedEnd:B,dayStyleDefault:S}=(k(),Y(),Me(m,{startDate:i,endDate:l,times:c})),N=we.computed(()=>{return be(m.modelValue,c.now)||_.value||c.today}),V=(n.value=N.value,y.value=N.value.date,Ye(m,{parsedView:a,times:c,parsedValue:N})).renderValues,{rootRef:P,__renderCalendar:Z}=Ne(m,ge,{scrollArea:e,pane:H}),{days:F,intervals:I,intervalFormatter:K,styleDefault:$,scrollToTimeX:z,timeDurationWidth:M,timeStartPosX:C,widthToMinutes:X}=qe(m,{times:c,scrollArea:e,parsedStart:_,parsedEnd:B,maxDays:d,size:s,headerColumnRef:t}),E=ze(m,{parsedView:a,parsedValue:N,direction:u,maxDays:d,times:c,emittedValue:r,emit:v}).move,A=Ke(v,b).getDefaultMouseEventHandlers,j=Je(v,{days:F,lastStart:U,lastEnd:L}).checkChange,Q=et().isKeyCode,G=at(m,{rootRef:P,focusRef:y,focusValue:n,datesRef:h,parsedView:a,emittedValue:r,direction:u,times:c}).tryFocus,O=we.computed(()=>{const e=parseInt(String(m.resourceHeight),10);return 0===e?"auto":e}),W=we.computed(()=>{return parseInt(String(m.resourceMinHeight),10)}),x=we.computed(()=>{return parseInt(String(m.intervalHeaderHeight),10)});function J(){r.value=Te()}function ee(e=1){E(e)}function te(e=1){E(-e)}function ne({width:e,height:t}){s.width=e,s.height=t}function ae(e){return e.date===r.value}function re(){const e={height:_e(x.value)};return we.h("div",{ref:R,roll:"presentation",class:{"q-calendar-resource__head":!0,"q-calendar__sticky":!0!==m.noSticky},style:e},[oe(),ue()])}function oe(){const e=f["head-resources"],t=_e(x.value),n={timestamps:I,date:m.modelValue,resources:m.modelResources};return we.h("div",{class:{"q-calendar-resource__head--resources":!0,"q-calendar__sticky":!0!==m.noSticky},style:{height:t},...A("-head-resources",e=>{return{scope:n,event:e}})},[e&&e({scope:n})])}function ue(){return we.h("div",{ref:t,class:{"q-calendar-resource__head--intervals":!0}},[I.value.map(e=>e.map((e,t)=>ie(e,t)))])}function ie(e,t){const n=f["interval-label"],a=!0!==m.noActiveDate&&ae(e),r=_e(T.value),o=_e(x.value),u=m.shortIntervalLabel,i=K.value(e,u),l={timestamp:e,index:t,label:i,droppable:g.value===i},d=m.intervalStyle||S,s={width:r,maxWidth:r,minWidth:r,height:o,...d({scope:l})},c="function"===typeof m.intervalClass?m.intervalClass({scope:l}):{},v=!0===m.focusable&&m.focusType.includes("interval");return we.h("div",{key:i,tabindex:!0===v?0:-1,class:{"q-calendar-resource__head--interval":!0,...c,"q-active-date":a,"q-calendar__hoverable":!0===m.hoverable,"q-calendar__focusable":!0===v},style:s,onDragenter:e=>{void 0!==m.dragEnterFunc&&"function"===typeof m.dragEnterFunc&&(!0===m.dragEnterFunc(e,"interval",{scope:l})?g.value=i:g.value="")},onDragover:e=>{void 0!==m.dragOverFunc&&"function"===typeof m.dragOverFunc&&(!0===m.dragOverFunc(e,"interval",{scope:l})?g.value=i:g.value="")},onDragleave:e=>{void 0!==m.dragLeaveFunc&&"function"===typeof m.dragLeaveFunc&&(!0===m.dragLeaveFunc(e,"interval",{scope:l})?g.value=i:g.value="")},onDrop:e=>{void 0!==m.dropFunc&&"function"===typeof m.dropFunc&&(!0===m.dropFunc(e,"interval",{scope:l})?g.value=i:g.value="")},onFocus:()=>{!0===v&&(y.value=i)},...A("-interval",e=>{return{scope:l,event:e}})},[n?n({scope:l}):i,Qe()])}function le(){return we.h("div",{class:"q-calendar-resource__body"},[de()])}function de(){return we.h("div",{ref:e,class:{"q-calendar-resource__scroll-area":!0,"q-calendar__scroll":!0}},[ce()])}function se(){return we.h("div",{},"No resources have been defined")}function ce(){return we.h("div",{class:"q-calendar-resource__day--container"},[re(),void 0===m.modelResources&&se(),void 0!==m.modelResources&&ve()])}function ve(){const e={class:"q-calendar-resource__resources--body"};return we.h("div",e,me())}function me(e=void 0,n=0,a=!0){return void 0===e&&(e=m.modelResources),e.map((e,t)=>{return fe(e,t,n,void 0!==e.children?e.expanded:a)}).filter(e=>!!e)}function fe(e,t,n=0,a=!0){const r={},o=(r.height="auto"===O.value?O.value:_e(O.value),W.value>0&&(r.minHeight=_e(W.value)),we.h("div",{key:e[m.resourceKey]+"-"+t,class:{"q-calendar-resource__resource--row":!0},style:r},[ye(e,t,n,a),he(e,t)]));return void 0!==e.children?[o,we.h("div",{class:{"q-calendar__child":!0,"q-calendar__child--expanded":!0===a,"q-calendar__child--collapsed":!0!==a}},[me(e.children,n+1,!1===a?a:e.expanded)])]:[o]}function ye(t,e,n=0,a=!0){const r=f["resource-label"],o={},u=(o.height=void 0!==t.height?_e(parseInt(t.height,10)):O.value?_e(O.value):"auto",W.value>0&&(o.minHeight=_e(W.value)),m.resourceStyle||$),i=t[m.resourceLabel],l=!0===m.focusable&&m.focusType.includes("resource")&&!0===a,d=t[m.resourceKey],s={resource:t,timestamps:I,resourceIndex:e,indentLevel:n,label:i,droppable:w.value===d},c="function"===typeof m.resourceClass?m.resourceClass({scope:s}):{};return we.h("div",{key:t[m.resourceKey]+"-"+e,ref:e=>{e instanceof HTMLElement&&(p.value[t[m.resourceKey]]=e)},tabindex:!0===l?0:-1,class:{"q-calendar-resource__resource":0===n,"q-calendar-resource__resource--section":0!==n,...c,"q-calendar__sticky":!0!==m.noSticky,"q-calendar__hoverable":!0===m.hoverable,"q-calendar__focusable":!0===l},style:{...o,...u({scope:s})},onDragenter:e=>{void 0!==m.dragEnterFunc&&"function"===typeof m.dragEnterFunc&&(!0===m.dragEnterFunc(e,"resource",{scope:s})?w.value=d:w.value="")},onDragover:e=>{void 0!==m.dragOverFunc&&"function"===typeof m.dragOverFunc&&(!0===m.dragOverFunc(e,"resource",{scope:s})?w.value=d:w.value="")},onDragleave:e=>{void 0!==m.dragLeaveFunc&&"function"===typeof m.dragLeaveFunc&&(!0===m.dragLeaveFunc(e,"resource",{scope:s})?w.value=d:w.value="")},onDrop:e=>{void 0!==m.dropFunc&&"function"===typeof m.dropFunc&&(!0===m.dropFunc(e,"resource",{scope:s})?w.value=d:w.value="")},onKeydown:e=>{Q(e,[13,32])&&(e.stopPropagation(),e.preventDefault())},onKeyup:e=>{Q(e,[13,32])&&void 0!==b.value.onClickResource&&v("click-resource",{scope:s,event:e})},...A("-resource",e=>{return{scope:s,event:e}})},[[we.h("div",{class:{"q-calendar__parent":void 0!==t.children,"q-calendar__parent--expanded":void 0!==t.children&&!0===t.expanded,"q-calendar__parent--collapsed":void 0!==t.children&&!0!==t.expanded},onClick:e=>{e.stopPropagation(),t.expanded=!t.expanded,v("resource-expanded",{expanded:t.expanded,scope:s})}}),we.h("div",{class:{"q-calendar-resource__resource--text":!0,"q-calendar__ellipsis":!0},style:{paddingLeft:10*n+2+"px"}},[r?r({scope:s}):i]),Qe()]])}function he(t,n){const e=f["resource-intervals"],a={resource:t,timestamps:I,resourceIndex:n,timeStartPosX:C,timeDurationWidth:M};return we.h("div",{class:"q-calendar-resource__resource--intervals"},[I.value.map(e=>e.map(e=>pe(t,e,n))),e&&e({scope:a})])}function pe(t,e,n){const a=f["resource-interval"],r=!0!==m.noActiveDate&&ae(e),o=t[m.resourceKey],u=e.time+"-"+o,i=!0===m.focusable&&m.focusType.includes("time"),l={activeDate:r,resource:t,timestamp:e,resourceIndex:n,droppable:D.value===u},d=m.intervalStyle||S,s=_e(T.value),c={width:s,maxWidth:s,minWidth:s,...d({scope:l})};return c.height=void 0!==t.height?_e(parseInt(t.height,10)):"auto"===O.value?O.value:_e(O.value),W.value>0&&(c.minHeight=_e(W.value)),we.h("div",{key:u,ref:e=>{e instanceof HTMLElement&&(h.value[t[m.resourceKey]]=e)},tabindex:!0===i?0:-1,class:{"q-calendar-resource__resource--interval":!0,"q-active-date":r,"q-calendar__hoverable":!0===m.hoverable,"q-calendar__focusable":!0===i},style:c,onDragenter:e=>{void 0!==m.dragEnterFunc&&"function"===typeof m.dragEnterFunc&&(!0===m.dragEnterFunc(e,"time",{scope:l})?D.value=u:D.value="")},onDragover:e=>{void 0!==m.dragOverFunc&&"function"===typeof m.dragOverFunc&&(!0===m.dragOverFunc(e,"time",{scope:l})?D.value=u:D.value="")},onDragleave:e=>{void 0!==m.dragLeaveFunc&&"function"===typeof m.dragLeaveFunc&&(!0===m.dragLeaveFunc(e,"time",{scope:l})?D.value=u:D.value="")},onDrop:e=>{void 0!==m.dropFunc&&"function"===typeof m.dropFunc&&(!0===m.dropFunc(e,"time",{scope:l})?D.value=u:D.value="")},onFocus:()=>{!0===i&&(y.value=u)},...A("-time",e=>{return{scope:l,event:e}})},[a&&a({scope:l}),Qe()])}function ge(){const{start:e,end:t,maxDays:n}=V.value,a=(i.value===e.date&&l.value===t.date&&d.value===n||(i.value=e.date,l.value=t.date,d.value=n),s.width>0),r=we.withDirectives(we.h("div",{class:"q-calendar-resource",key:i.value},[!0===a&&le()]),[[Se,ne]]);if(!0!==m.animated)return r;{const o="q-calendar--"+("prev"===u.value?m.transitionPrev:m.transitionNext);return we.h(we.Transition,{name:o,appear:!0},()=>r)}}return we.watch([F],j,{deep:!0,immediate:!0}),we.watch(()=>m.modelValue,(e,t)=>{if(r.value!==e){if(!0===m.animated){const n=ke(De(e)),a=ke(De(t));u.value=n>=a?"next":"prev"}r.value=e}y.value=e}),we.watch(r,(e,t)=>{if(r.value!==m.modelValue){if(!0===m.animated){const n=ke(De(e)),a=ke(De(t));u.value=n>=a?"next":"prev"}v("update:model-value",e)}}),we.watch(y,e=>{e&&(n.value=be(e))}),we.watch(n,()=>{h.value[y.value]?h.value[y.value].focus():G()}),we.onBeforeUpdate(()=>{h.value={},p.value={}}),we.onMounted(()=>{}),q({prev:te,next:ee,move:E,moveToToday:J,updateCurrent:k,timeStartPosX:C,timeDurationWidth:M,widthToMinutes:X,scrollToTimeX:z}),()=>Z()}});const ot="4.1.0";ye={version:ot,QCalendarResource:rt,...ye,...ge,install(e){e.component(String(rt.name),rt)}};return ye}); | ||
(function(e,t){"object"===typeof exports&&"undefined"!==typeof module?module.exports=t(require("vue")):"function"===typeof define&&define.amd?define(["vue"],t):(e="undefined"!==typeof globalThis?globalThis:e||self,e.QCalendarResource=t(e.Vue))})(this,function(we){const i=/^(\d{4})-(\d{1,2})(-(\d{1,2}))?([^\d]+(\d{1,2}))?(:(\d{1,2}))?(:(\d{1,2}))?(.(\d{1,3}))?$/,f=/^(\d{4})-(\d{1,2})(-(\d{1,2}))?/,y=/(\d\d?)(:(\d\d?)|)(:(\d\d?)|)/,T=[0,31,28,31,30,31,30,31,31,30,31,30,31],b=[0,31,29,31,30,31,30,31,31,30,31,30,31],r={MILLISECONDS_IN:{SECOND:1e3,MINUTE:6e4,HOUR:36e5,DAY:864e5,WEEK:6048e5},SECONDS_IN:{MINUTE:60,HOUR:3600,DAY:86400,WEEK:604800},MINUTES_IN:{MINUTE:1,HOUR:60,DAY:1440,WEEK:10080},HOURS_IN:{DAY:24,WEEK:168},DAYS_IN:{WEEK:7}},k=28,N=31,F=12,I=1,M=1,C=0;function t(e){return"string"===typeof e&&i.test(e)}function De(e){if("string"!==typeof e)return null;const t=i.exec(e);if(!t||!t[1]||!t[2])return null;const n=parseInt(t[1],10),a=parseInt(t[2],10),r=parseInt(t[4]||"1",10),o=parseInt(t[6]||"0",10),u=parseInt(t[8]||"0",10);return{date:e,time:o.toString().padStart(2,"0")+":"+u.toString().padStart(2,"0"),year:n,month:a,day:r,hour:o,minute:u,hasDay:!!t[4],hasTime:!0,past:!1,current:!1,future:!1,disabled:!1,weekday:0,doy:0,workweek:0}}function E(e,t=!1){if(!(e instanceof Date))return null;const n=t?"UTC":"";return w({date:o(e[`get${n}FullYear`](),4)+"-"+o(e[`get${n}Month`]()+1,2)+"-"+o(e[`get${n}Date`](),2),time:o(e[`get${n}Hours`]()||0,2)+":"+o(e[`get${n}Minutes`]()||0,2),year:e[`get${n}FullYear`](),month:e[`get${n}Month`]()+1,day:e[`get${n}Date`](),hour:e[`get${n}Hours`](),minute:e[`get${n}Minutes`](),weekday:0,doy:0,workweek:0,hasDay:!0,hasTime:!0,past:!1,current:!1,future:!1,disabled:!1})}function o(e,t){let n=String(e);while(n.length<t)n="0"+n;return n}function A(e){return e%4===0&&e%100!==0||e%400===0}function l(e,t){return(A(e)?b:T)[t]}function h(e){const t=new Date(e.year,e.month-1,e.day+1);return w(ie({...e,year:t.getFullYear(),month:t.getMonth()+1,day:t.getDate()}))}function p(e){const t=new Date(e.year,e.month-1,e.day-1);return w(ie({...e,year:t.getFullYear(),month:t.getMonth()+1,day:t.getDate()}))}function Te(){const e=new Date,t=e.getMonth()+1,n=e.getDate(),a=e.getFullYear();return[a,o(t,2),o(n,2)].join("-")}function O(e){return e===Te()}function P(e,t,n){let a=X(e);if(t){if(1===a.day||0===a.weekday)while(!t.includes(Number(a.weekday)))a=h(a);a=v(a,t[0],p),a=w(a),n&&(a=z(a,n,a.hasTime))}return a}function Z(e,t,n){let a=X(e);if(t&&Array.isArray(t)){const r=l(a.year,a.month);if(r===a.day||a.weekday===t[t.length-1])while(!t.includes(Number(a.weekday)))a=p(a);a=v(a,t[t.length-1],h),a=w(a),n&&(a=z(a,n,a.hasTime))}return a}function _(e){let t=X(e);return t.day=M,t=w(t),t}function S(e){let t=X(e);return t.day=l(t.year,t.month),t=w(t),t}function K(e){const t=Object.prototype.toString.call(e);switch(t){case"[object Number]":return e;case"[object String]":{const n=y.exec(e);return n?60*parseInt(n[1],10)+parseInt(n[3]||"0",10):!1}case"[object Object]":return"object"!==typeof e||"number"!==typeof e.hour||"number"!==typeof e.minute?!1:"object"===typeof e&&"hour"in e&&"minute"in e&&60*e.hour+e.minute}return!1}function W(e,t){return!(!e||!t)&&e.year===t.year&&e.month===t.month&&e.day===t.day&&e.hour===t.hour&&e.minute===t.minute}function x(e,t){return s(e)===s(t)}function q(e,t){return c(e)===c(t)}function H(e,t){return j(e)===j(t)}function be(e,t=null){let n=De(e);return n?(n=w(n),t&&(n=z(n,t,n.hasTime)),n):null}function ke(e){return 1e8*(e.year??0)+1e6*(e.month??0)+1e4*(e.day??0)}function d(e){return 100*(e.hour??0)+(e.minute??0)}function $(e){return ke(e)+d(e)}function R(e,t,n=!1){const a=Date.UTC(e.year??0,(e.month??1)-1,e.day??1,e.hour??0,e.minute??0),r=Date.UTC(t.year??0,(t.month??1)-1,t.day??1,t.hour??0,t.minute??0);return!0===n&&r<a?0:r-a}function z(e,t,n=!1){let a=X(e),r=ke(t),o=ke(a),u=r===o;return a.hasTime&&n&&u&&(r=d(t),o=d(a),u=r===o),a.past=o<r,a.current=u,a.future=o>r,a.currentWeekday=a.weekday===t.weekday,a}function U(e,t,n=null){let a=X(e);return a.hasTime=!0,a.hour=Math.floor(t/r.MINUTES_IN.HOUR),a.minute=t%r.MINUTES_IN.HOUR,a.time=c(a),n&&(a=z(a,n,!0)),a}function g(e){let t=X(e);return t.weekday=u(t),t}function L(e){let t=X(e);return t.doy=n(t)||0,t}function Y(e){let t=X(e);return t.workweek=a(t),t}function B(e,t,n,a,r){let o=X(e);const u=ke(o);if(void 0!==t){const s=De(t);if(s){const c=ke(s);u<=c&&(o.disabled=!0)}}if(!0!==o.disabled&&void 0!==n){const v=De(n);if(v){const m=ke(v);u>=m&&(o.disabled=!0)}}if(!0!==o.disabled&&Array.isArray(a)&&a.length>0)for(var i in a)if(a[i]===o.weekday){o.disabled=!0;break}if(!0!==o.disabled&&Array.isArray(r)&&r.length>0)for(var l in r)if(Array.isArray(r[l])&&2===r[l].length&&r[l][0]&&r[l][1]){const f=De(r[l][0]),y=De(r[l][1]);if(f&&y&&oe(o,f,y)){o.disabled=!0;break}}else{const h=r[l];if(Array.isArray(h))for(var d of h){const p=be(d);if(p){const g=ke(p);if(g===u){o.disabled=!0;break}}}else if(h){const w=be(h);if(w){const D=ke(w);D===u&&(o.disabled=!0)}}}return o}function w(e){let t=X(e);return t.hasTime=!0,t.time=c(t),t.date=s(t),t.weekday=u(t),t.doy=n(t)||0,t.workweek=a(t),t}function n(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 a(e){let t=X(e);if(0===t.year){const r=be(Te());r&&(t=r)}const n=new Date(Date.UTC(t.year,t.month-1,t.day)),a=4;n.setUTCDate(n.getUTCDate()-(n.getUTCDay()+6)%7+a),n.setUTCDate(n.getUTCDate()+a-(n.getUTCDay()||7));e=new Date(Date.UTC(n.getUTCFullYear(),0,1)),e=Math.ceil(((n.valueOf()-e.valueOf())/864e5+1)/7);return e}function u(e){let t=e.weekday;if(e.hasDay){const n=Math.floor,a=e.day,r=(e.month+9)%F+1,o=n(e.year/100),u=e.year%100-(e.month<=2?1:0);t=((a+n(2.6*r-.2)-2*o+u+n(u/4)+n(o/4))%7+7)%7}return t??0}function X(e){return{...e}}function s(e){let t=o(e.year,4)+"-"+o(e.month,2);return e.hasDay&&(t+="-"+o(e.day,2)),t}function c(e){return e.hasTime?o(e.hour,2)+":"+o(e.minute,2):""}function j(e){return s(e)+" "+(e.hasTime?c(e):"00:00")}function V(e,t=h,n=1,a=[0,1,2,3,4,5,6]){const r=X(e);return D(r,t,n,a)}function D(e,t=h,n=1,a=[0,1,2,3,4,5,6]){let r=X(e);a.includes(Number(r.weekday))||0!==r.weekday||t!==h||++n;while(--n>=0)r=t(r),a.length<7&&!a.includes(Number(r.weekday))&&++n;return r}function v(e,t,n=h,a=6){let r=X(e);while(r.weekday!==t&&--a>=0)r=n(r);return r}function J(e,t,n,a=[0,1,2,3,4,5,6],r=void 0,o=void 0,u=[],i=[],l=42,d=0){const s=ke(e),c=ke(t),v=[];let m=X(e),f=0,y=f===c;if(!(c<s))while((!y||v.length<d)&&v.length<l){if(f=ke(m),y=y||f>c&&v.length>=d,y)break;if(a.includes(Number(m.weekday))){let e=X(m);e=w(e),e=z(e,n),e=B(e,r,o,u,i),v.push(e)}m=D(m,h)}return v}function ee(t,n,a,r,o){const u=[];for(let e=0;e<r;++e){const i=(n+e)*a,l=X(t);u.push(U(l,i,o))}return u}function Q(a,r){const e=()=>"";return"undefined"===typeof Intl||"undefined"===typeof Intl.DateTimeFormat?e:(t,e)=>{try{const n=new Intl.DateTimeFormat(a||void 0,r(t,e));return n.format(ne(t))}catch(e){return console.error(`Intl.DateTimeFormat: ${e.message} -> `+j(t)),""}}}function te(e,t=!0){return t?new Date(Date.UTC(e.year,e.month-1,e.day,0,0)):new Date(e.year,e.month-1,e.day,0,0)}function ne(e,t=!0){return t?new Date(Date.UTC(e.year,e.month-1,e.day,e.hour,e.minute)):new Date(e.year,e.month-1,e.day,e.hour,e.minute)}function e(e){return isFinite(Number(e))}function ae(e,t=!1){const n=!0===t?$:ke;return e.reduce((e,t)=>{return Math.max(n(e),n(t))===n(e)?e:t})}function re(e,t=!1){const n=!0===t?$:ke;return e.reduce((e,t)=>{return Math.min(n(e),n(t))===n(e)?e:t})}function oe(e,t,n,a=!1){const r=ke(e)+(!0===a?d(e):0),o=ke(t)+(!0===a?d(t):0),u=ke(n)+(!0===a?d(n):0);return r>=o&&r<=u}function ue(e,t,n,a){const r=ke(e),o=ke(t),u=ke(n),i=ke(a);return r>=u&&r<=i||o>=u&&o<=i||u>=r&&o>=i}function G(e,t){const n=X(e);return t.year&&(n.year+=t.year),t.month&&(n.month+=t.month),t.day&&(n.day+=t.day),t.hour&&(n.hour+=t.hour),t.minute&&(n.minute+=t.minute),w(ie(n))}function ie(e){const t=new Date(e.year,e.month-1,e.day,e.hour,e.minute);return{...e,year:t.getFullYear(),month:t.getMonth()+1,day:t.getDate(),hour:t.getHours(),minute:t.getMinutes()}}function le(e,t){const n=R(e,t,!0);return Math.floor(n/r.MILLISECONDS_IN.DAY)}function de(e,t){let n=X(e),a=X(t);return n=v(n,0),a=v(a,6),Math.ceil(le(n,a)/r.DAYS_IN.WEEK)}const se={Sun:new Date("2020-01-05T00:00:00.000Z"),Mon:new Date("2020-01-06T00:00:00.000Z"),Tue:new Date("2020-01-07T00:00:00.000Z"),Wed:new Date("2020-01-08T00:00:00.000Z"),Thu:new Date("2020-01-09T00:00:00.000Z"),Fri:new Date("2020-01-10T00:00:00.000Z"),Sat:new Date("2020-01-11T00:00:00.000Z")};function ce(){const e=()=>"",r={long:{timeZone:"UTC",weekday:"long"},short:{timeZone:"UTC",weekday:"short"},narrow:{timeZone:"UTC",weekday:"narrow"}};return"undefined"===typeof Intl||"undefined"===typeof Intl.DateTimeFormat?e:t;function t(t,e,n){try{const a=new Intl.DateTimeFormat(n||void 0,r[e]||r["long"]);return a.format(se[t])}catch(e){return e instanceof Error&&console.error(`Intl.DateTimeFormat: ${e.message} -> day of week: `+t),""}}}function ve(t,n){const e=Object.keys(se),a=ce();return e.map(e=>String(a(e,t,n)))}function me(){const e=()=>"",o={long:{timeZone:"UTC",month:"long"},short:{timeZone:"UTC",month:"short"},narrow:{timeZone:"UTC",month:"narrow"}};return"undefined"===typeof Intl||"undefined"===typeof Intl.DateTimeFormat?e:t;function t(t,e,n){try{const a=new Intl.DateTimeFormat(n||void 0,o[e]||o["long"]),r=new Date;return r.setDate(1),r.setMonth(t),a.format(r)}catch(e){return e instanceof Error&&console.error(`Intl.DateTimeFormat: ${e.message} -> month: `+t),""}}}function fe(t,n){const a=me();return[...Array(12).keys()].map(e=>a(e,t,n))}var ye={PARSE_DATETIME:i,PARSE_DATE:f,PARSE_TIME:y,DAYS_IN_MONTH:T,DAYS_IN_MONTH_LEAP:b,DAYS_IN_MONTH_MIN:k,DAYS_IN_MONTH_MAX:N,MONTH_MAX:F,MONTH_MIN:I,DAY_MIN:M,TIME_CONSTANTS:r,FIRST_HOUR:C,today:Te,getStartOfWeek:P,getEndOfWeek:Z,getStartOfMonth:_,getEndOfMonth:S,parseTime:K,validateTimestamp:t,parsed:De,parseTimestamp:be,parseDate:E,getDayIdentifier:ke,getTimeIdentifier:d,getDayTimeIdentifier:$,diffTimestamp:R,updateRelative:z,updateMinutes:U,updateWeekday:g,updateDayOfYear:L,updateWorkWeek:Y,updateDisabled:B,updateFormatted:w,getDayOfYear:n,getWorkWeek:a,getWeekday:u,isLeapYear:A,daysInMonth:l,copyTimestamp:X,padNumber:o,getDate:s,getTime:c,getDateTime:j,nextDay:h,prevDay:p,relativeDays:D,findWeekday:v,createDayList:J,createIntervalList:ee,createNativeLocaleFormatter:Q,makeDate:te,makeDateTime:ne,validateNumber:e,isBetweenDates:oe,isOverlappingDates:ue,daysBetween:le,weeksBetween:de,addToDate:G,compareTimestamps:W,compareDate:x,compareTime:q,compareDateTime:H,getWeekdayFormatter:ce,getWeekdayNames:ve,getMonthFormatter:me,getMonthNames:fe},ye=Object.freeze({__proto__:null,DAYS_IN_MONTH:T,DAYS_IN_MONTH_LEAP:b,DAYS_IN_MONTH_MAX:N,DAYS_IN_MONTH_MIN:k,DAY_MIN:M,FIRST_HOUR:C,MONTH_MAX:F,MONTH_MIN:I,PARSE_DATE:f,PARSE_DATETIME:i,PARSE_TIME:y,TIME_CONSTANTS:r,addToDate:G,compareDate:x,compareDateTime:H,compareTime:q,compareTimestamps:W,copyTimestamp:X,createDayList:J,createIntervalList:ee,createNativeLocaleFormatter:Q,daysBetween:le,daysInMonth:l,default:ye,diffTimestamp:R,findWeekday:v,getDate:s,getDateTime:j,getDayIdentifier:ke,getDayOfYear:n,getDayTimeIdentifier:$,getEndOfMonth:S,getEndOfWeek:Z,getMonthFormatter:me,getMonthNames:fe,getStartOfMonth:_,getStartOfWeek:P,getTime:c,getTimeIdentifier:d,getWeekday:u,getWeekdayFormatter:ce,getWeekdayNames:ve,getWorkWeek:a,isBetweenDates:oe,isLeapYear:A,isOverlappingDates:ue,isToday:O,makeDate:te,makeDateTime:ne,maxTimestamp:ae,minTimestamp:re,moveRelativeDays:V,nextDay:h,padNumber:o,parseDate:E,parseTime:K,parseTimestamp:be,parsed:De,prevDay:p,relativeDays:D,today:Te,updateDayOfYear:L,updateDisabled:B,updateFormatted:w,updateMinutes:U,updateRelative:z,updateWeekday:g,updateWorkWeek:Y,validateNumber:e,validateTimestamp:t,weeksBetween:de});function _e(e,t="px"){if(e)return isNaN(e)?String(e):"auto"===e?e:""+Number(e)+t}function he(t,n){for(let e=0;e<t.length;e++)if(!0===n(t[e],e))return e;return-1}function pe(e,t){return 0===t?e:e.slice(0,t)}var ge={convertToUnit:_e,indexOf:he,minCharWidth:pe},ge=Object.freeze({__proto__:null,convertToUnit:_e,default:ge,indexOf:he,minCharWidth:pe});const Se={mounted(e,t){if("function"===typeof t.value){const n=t.value,a={callback:n,size:{width:0,height:0},observer:new ResizeObserver(e=>{const t=e[0].contentRect;t.width===a.size.width&&t.height===a.size.height||(a.size.width=t.width,a.size.height=t.height,a.debounceTimeout&&clearTimeout(a.debounceTimeout),a.debounceTimeout=setTimeout(()=>{a.callback(a.size),a.debounceTimeout=void 0},100))})};a.observer.observe(e),e.__onResizeObserver=a}},beforeUnmount(e){if(e.__onResizeObserver){const{observer:t,debounceTimeout:n}=e.__onResizeObserver;n&&clearTimeout(n),t.unobserve(e),delete e.__onResizeObserver}}};function Ne(t,n,{scrollArea:e,pane:a}){if(!n){const s="[error: renderCalendar] no renderFunc has been supplied to useCalendar";throw console.error(s),new Error(s)}const r=we.reactive({width:0,height:0}),o=we.ref(null);function u({width:e,height:t}){r.width=e,r.height=t}const i=we.computed(()=>{return!0!==t.noScroll&&e.value&&a.value&&r.height?e.value.offsetWidth-a.value.offsetWidth:0});function l(){}function d(){const e={ref:o,role:"complementary",lang:t.locale,class:`q-calendar ${t.dark?"q-calendar--dark":""} `+(t.bordered?"q-calendar__bordered":"")};return we.withDirectives(we.h("div",{...e},[n()]),[[Se,u]])}return{rootRef:o,scrollWidth:i,__initCalendar:l,__renderCalendar:d}}const Fe=e=>e.every(e=>["day","date","weekday","interval","time","resource","task"].includes(e)),Ie={modelValue:{type:String,default:Te(),validator:e=>""===e||t(e)},weekdays:{type:Array,default:()=>[0,1,2,3,4,5,6]},dateType:{type:String,default:"round",validator:e=>["round","rounded","square"].includes(e)},weekdayAlign:{type:String,default:"center",validator:e=>["left","center","right"].includes(e)},dateAlign:{type:String,default:"center",validator:e=>["left","center","right"].includes(e)},bordered:Boolean,dark:Boolean,noAria:Boolean,noActiveDate:Boolean,noHeader:Boolean,noScroll:Boolean,shortWeekdayLabel:Boolean,noDefaultHeaderText:Boolean,noDefaultHeaderBtn:Boolean,minWeekdayLabel:{type:[Number,String],default:1},weekdayBreakpoints:{type:Array,default:()=>[75,35],validator:e=>2===e.length},locale:{type:String,default:"en-US"},animated:Boolean,transitionPrev:{type:String,default:"slide-right"},transitionNext:{type:String,default:"slide-left"},disabledDays:Array,disabledBefore:String,disabledAfter:String,disabledWeekdays:{type:Array,default:()=>[]},dragEnterFunc:Function,dragOverFunc:Function,dragLeaveFunc:Function,dropFunc:Function,selectedDates:{type:[Array,Set],default:()=>[]},selectedStartEndDates:{type:Array,default:()=>[]},hoverable:Boolean,focusable:Boolean,focusType:{type:Array,default:()=>["date"],validator:Fe}};function Me(t,{startDate:e,endDate:n,times:a}){const r=we.computed(()=>be(e.value)),o=we.computed(()=>{return"0000-00-00"===n.value?Z(r.value,t.weekdays,a.today):be(n.value)||r.value}),u=we.computed(()=>Q(t.locale,()=>({timeZone:"UTC",day:"numeric"}))),i=we.computed(()=>Q(t.locale,(e,t)=>({timeZone:"UTC",weekday:t?"short":"long"}))),l=we.computed(()=>Q(t.locale,()=>({timeZone:"UTC",dateStyle:"full"})));function d(e,t){return e&&e.length>0&&e.includes(t.date)}function s(e,t){const n={firstDay:!1,betweenDays:!1,lastDay:!1};if(2===e.length){const a=ke(t),r=ke(De(e[0])),o=ke(De(e[1]));n.firstDay=r===a,n.lastDay=o===a,n.betweenDays=r<a&&o>a}return n}function c(e,t=!1,n=[],a=[],r=!1){const o=d(n,e),{firstDay:u,lastDay:i,betweenDays:l}=s(a,e);return{"q-past-day":!u&&!l&&!i&&!o&&!t&&!!e.past,"q-future-day":!u&&!l&&!i&&!o&&!t&&!!e.future,"q-outside":t,"q-current-day":!!e.current,"q-selected":o,"q-range-first":u,"q-range":l,"q-range-last":i,"q-range-hover":r&&(u||i||l),"q-disabled-day disabled":!0===e.disabled}}function v(e){return P(e,t.weekdays,a.today)}function m(e){return Z(e,t.weekdays,a.today)}function f(){return{}}return{parsedStart:r,parsedEnd:o,dayFormatter:u,weekdayFormatter:i,ariaDateFormatter:l,arrayHasDate:d,checkDays:s,getRelativeClasses:c,startOfWeek:v,endOfWeek:m,dayStyleDefault:f}}function Ce(e,t){e instanceof Window?e.scrollTo({top:t,behavior:"instant"}):e.scrollTop=t}function Ee(e){return e instanceof Window?e.scrollY:e.scrollTop}function Ae(o,u,i=500,l=performance.now(),d=Ee(o)){i<=0||d===u?Ce(o,u):requestAnimationFrame(e=>{const t=e-l,n=Math.min(t/i,1),a=e=>e<.5?2*e*e:(4-2*e)*e-1,r=d+(u-d)*a(n);Ce(o,r),n<1&&Ae(o,u,i,l,d)})}function Oe(r,e,o=500){const u=r.scrollLeft,i=e-u;let l=null;function d(e){null===l&&(l=e);const t=e-l,n=Math.min(t/o,1),a=e=>e<.5?2*e*e:(4-2*e)*e-1;r.scrollLeft=u+i*a(n),t<o&&requestAnimationFrame(d)}requestAnimationFrame(d)}const We={view:{type:String,validator:e=>["day","week","month","month-interval"].includes(e),default:"day"},shortIntervalLabel:Boolean,intervalHeight:{type:[Number,String],default:40,validator:e},intervalMinutes:{type:[Number,String],default:60,validator:e},intervalStart:{type:[Number,String],default:0,validator:e},intervalCount:{type:[Number,String],default:24,validator:e},intervalStyle:{type:Function,default:null},intervalClass:{type:Function,default:null},weekdayStyle:{type:Function,default:null},weekdayClass:{type:Function,default:null},showIntervalLabel:{type:Function,default:null},hour24Format:Boolean,timeClicksClamped:Boolean,dateHeader:{type:String,default:"stacked",validator:e=>["stacked","inline","inverted"].includes(e)}},xe={modelResources:{type:Array},resourceKey:{type:String,default:"id"},resourceLabel:{type:String,default:"label"},resourceHeight:{type:[Number,String],default:0,validator:e},resourceMinHeight:{type:[Number,String],default:70,validator:e},resourceStyle:{type:Function,default:null},resourceClass:{type:Function,default:null},cellWidth:{type:[Number,String],default:100},intervalHeaderHeight:{type:[Number,String],default:20,validator:e},noSticky:Boolean};function qe(o,{times:t,scrollArea:a,parsedStart:e,parsedEnd:n,maxDays:r,size:u,headerColumnRef:i}){const l=we.computed(()=>parseInt(String(o.intervalStart),10)),v=we.computed(()=>parseInt(String(o.intervalMinutes),10)),d=we.computed(()=>parseInt(String(o.intervalCount),10)),m=we.computed(()=>parseFloat(String(o.intervalHeight))),f=we.computed(()=>{let e=0;const t=Number(o.columnCount);return o.cellWidth?e=Number(o.cellWidth):u.width>0&&i.value&&(e=i.value.offsetWidth/(t>1?t:r.value)),e}),s=we.computed(()=>l.value*v.value),c=we.computed(()=>d.value*m.value),y=we.computed(()=>d.value*f.value),h=we.computed(()=>D(e.value)),p=we.computed(()=>T(n.value)),g=we.computed(()=>{return J(e.value,n.value,t.today,o.weekdays,o.disabledBefore,o.disabledAfter,o.disabledWeekdays,o.disabledDays,r.value)}),w=we.computed(()=>{return g.value.map(e=>ee(e,l.value,v.value,d.value,t.now))});function D(e){return P(e,o.weekdays,t.today)}function T(e){return Z(e,o.weekdays,t.today)}function b(e,t){return e&&e.length>0&&e.includes(j(t))}function k(e,t){const n={firstDay:!1,betweenDays:!1,lastDay:!1};if(e&&2===e.length){const a=$(t),r=$(De(e[0])),o=$(De(e[1]));n.firstDay=r===a,n.lastDay=o===a,n.betweenDays=r<a&&o>a}return n}function _(e,t=[],n=[]){const a=b(t,e),{firstDay:r,lastDay:o,betweenDays:u}=k(n,e);return{"q-selected":a,"q-range-first":!0===r,"q-range":!0===u,"q-range-last":!0===o,"q-disabled-interval disabled":!0===e.disabled}}function S(e,t,n){return[]}const N=we.computed(()=>{const n={timeZone:"UTC",hour12:!o.hour24Format,hour:"2-digit",minute:"2-digit"},a={timeZone:"UTC",hour12:!o.hour24Format,hour:"numeric",minute:"2-digit"},r={timeZone:"UTC",hour12:!o.hour24Format,hour:"numeric"};return Q(o.locale,(e,t)=>t?0===e.minute?r:a:n)}),F=we.computed(()=>{const e={timeZone:"UTC",dateStyle:"full",timeStyle:"short"};return Q(o.locale,()=>e)});function I(e){const t=w.value[0][0],n=t.hour===e.hour&&t.minute===e.minute;return!n&&0===e.minute}function M(e){}function C(e){return{}}function E(e,t,n=!1,a){let r=X(t);if(e.currentTarget){const o=e.currentTarget.getBoundingClientRect(),u=e,i=e,l=u.changedTouches||u.touches,d=(l&&l[0]?l[0]:i).clientY,s=(d-o.top)/m.value,c=Math.floor((n?Math.floor(s):s)*v.value);0!==c&&(r=G(r,{minute:c})),a&&(r=z(r,a,!0))}return r}function q(e,t,n=!1,a){let r=X(t);const o=e.currentTarget.getBoundingClientRect(),u=e,i=e,l=u.changedTouches||u.touches,d=(l&&l[0]?l[0]:i).clientY,s=(d-o.top)/m.value,c=Math.floor((n?Math.floor(s):s)*v.value);return 0!==c&&(r=G(r,{minute:c})),a&&(r=z(r,a,!0)),r}function H(e,t,n=!1,a){let r=X(t);if(e.currentTarget){const o=e.currentTarget.getBoundingClientRect(),u=e,i=e,l=u.changedTouches||u.touches,d=(l&&l[0]?l[0]:i).clientX,s=(d-o.left)/f.value,c=Math.floor((n?Math.floor(s):s)*v.value);0!==c&&(r=G(r,{minute:c})),a&&(r=z(r,a,!0))}return r}function R(e,t){const n={timestamp:e,timeStartPos:W,timeDurationHeight:A};return void 0!==t&&(n.columnIndex=t),n}function U(e,t){const n={timestamp:X(e),timeStartPosX:x,timeDurationWidth:O};return void 0!==t&&(n.index=t),n}function L(e,t=0){const n=W(e);return!(!1===n||!a.value)&&(Ae(a.value,n,t),!0)}function Y(e,t=0){const n=x(e);return!(!1===n||!a.value)&&(Oe(a.value,n,t),!0)}function A(e){return e/v.value*m.value}function O(e){return e/v.value*f.value}function B(e){return e*v.value/m.value}function V(e){return e*v.value/f.value}function W(e,t=!0){const n=K(e);if(!1===n)return!1;const a=s.value,r=d.value*v.value,o=(n-a)/r;let u=o*c.value;return t&&(u<0&&(u=0),u>c.value)&&(u=c.value),u}function x(e,t=!0){const n=K(e);if(!1===n)return!1;const a=s.value,r=d.value*v.value,o=(n-a)/r;let u=o*y.value;return t&&(u<0&&(u=0),u>y.value)&&(u=y.value),u}return{parsedIntervalStart:l,parsedIntervalMinutes:v,parsedIntervalCount:d,parsedIntervalHeight:m,parsedCellWidth:f,parsedStartMinute:s,bodyHeight:c,bodyWidth:y,parsedWeekStart:h,parsedWeekEnd:p,days:g,intervals:w,intervalFormatter:N,ariaDateTimeFormatter:F,arrayHasDateTime:b,checkIntervals:k,getIntervalClasses:_,getResourceClasses:S,showIntervalLabelDefault:I,showResourceLabelDefault:M,styleDefault:C,getTimestampAtEventInterval:E,getTimestampAtEvent:q,getTimestampAtEventX:H,getScopeForSlot:R,getScopeForSlotX:U,scrollToTime:L,scrollToTimeX:Y,timeDurationHeight:A,timeDurationWidth:O,heightToMinutes:B,widthToMinutes:V,timeStartPos:W,timeStartPosX:x}}const He={columnCount:{type:[Number,String],default:0,validator:e},columnIndexStart:{type:[Number,String],default:0,validator:e}},Re={maxDays:{type:Number,default:1}},Ue={now:{type:String,validator:e=>""===e||t(e),default:""}};function Le(e){const t=we.reactive({now:be("0000-00-00 00:00"),today:be("0000-00-00")}),n=we.computed(()=>e.now?be(e.now):o());function a(){t.now&&t.today&&(t.now.current=t.today.current=!0,t.now.past=t.today.past=!1,t.now.future=t.today.future=!1)}function r(){const e=n.value||o();u(e,t.now),i(e,t.now),u(e,t.today)}function o(){return E(new Date)}function u(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)}function i(e,t){e.time!==t.time&&(t.hour=e.hour,t.minute=e.minute,t.time=e.time)}return we.watch(n,()=>r()),{times:t,parsedNow:n,setCurrent:a,updateCurrent:r,getNow:o,updateDay:u,updateTime:i}}function Ye(r,{parsedView:o,parsedValue:u,times:i}){const e=we.computed(()=>{const e=u.value;let t=r.maxDays,n=e,a=e;switch(o.value){case"month":n=_(e),a=S(e),t=l(n.year,n.month);break;case"week":case"week-agenda":case"week-scheduler":n=P(e,r.weekdays,i.today),a=Z(n,r.weekdays,i.today),t=r.weekdays.length;break;case"day":case"scheduler":case"agenda":a=V(X(a),h,t>1?t-1:t,r.weekdays),a=w(a);break;case"month-interval":case"month-scheduler":case"month-agenda":n=_(e),a=S(e),a=w(a),t=l(n.year,n.month);break;case"resource":t=1,a=V(X(a),h,t,r.weekdays),a=w(a);break}return{start:n,end:a,maxDays:t}});return{renderValues:e}}const Be=e=>e.replace(/(-\w)/g,e=>e[1].toUpperCase());function Ve(t,e,n,a){const r={};for(const o in n){const u=n[o],i=Be("on-"+o);if(!e.value)return console.warn("$listeners has not been set up"),{};if(void 0!==e.value[i]){const l="on"+u.event.charAt(0).toUpperCase()+u.event.slice(1),d=e=>{return(void 0===u.button||"buttons"in e&&e.buttons>0&&e.button===u.button)&&(u.prevent&&e.preventDefault(),u.stop&&e.stopPropagation(),t(o,a(e,o))),u.result};l in r?Array.isArray(r[l])?r[l].push(d):r[l]=[r[l],d]:r[l]=d}}return r}function Pe(e,t,n,a){return Ve(e,t,Ze(n),a)}function Ze(e){return{["click"+e]:{event:"click"},["contextmenu"+e]:{event:"contextmenu",prevent:!0,result:!1},["mousedown"+e]:{event:"mousedown"},["mousemove"+e]:{event:"mousemove"},["mouseup"+e]:{event:"mouseup"},["mouseenter"+e]:{event:"mouseenter"},["mouseleave"+e]:{event:"mouseleave"},["touchstart"+e]:{event:"touchstart"},["touchmove"+e]:{event:"touchmove"},["touchend"+e]:{event:"touchend"}}}function m(e){return Object.keys(Ze(e))}function Ke(n,a){return{getMouseEventHandlers:(e,t)=>Ve(n,a,e,t),getDefaultMouseEventHandlers:(e,t)=>Pe(n,a,e,t),getMouseEventName:Ze,getRawMouseEvents:m}}const $e=["moved"];function ze(l,{parsedView:d,parsedValue:s,direction:c,maxDays:v,times:m,emittedValue:f,emit:y}){function e(n=1){if(0===n)f.value=Te();else{let e=X(s.value);const a=S(e),r=n>0,o=r?h:p,u=r?a.day:1;let t=r?n:-n;c.value=r?"next":"prev";const i=l.weekdays.length;while(--t>=0)switch(d.value){case"month":e.day=u,e=o(e),e=g(e);while(!l.weekdays.includes(Number(e.weekday)))e=G(e,{day:r?1:-1});break;case"week":case"week-agenda":case"week-scheduler":e=D(e,o,i,l.weekdays);break;case"day":case"scheduler":case"agenda":e=D(e,o,v.value,l.weekdays);break;case"month-interval":case"month-agenda":case"month-scheduler":e.day=u,e=o(e);break;case"resource":e=D(e,o,v.value,l.weekdays);break}e=g(e),e=w(e),e=L(e),e=z(e,m.now),f.value=e.date,y("moved",e)}}return{move:e}}const Xe=/^on[A-Z]/;function je(e=we.getCurrentInstance()){return{emitListeners:we.computed(()=>{const t={};return e?.vnode?.props&&Object.keys(e.vnode.props).forEach(e=>{Xe.test(e)&&(t[e]=!0)}),t})}}function Qe(){const e={"aria-hidden":"true",class:"q-calendar__focus-helper"};return[we.h("span",e)]}const Ge=["change"];function Je(a,{days:r,lastStart:o,lastEnd:u}){function e(){const e=r.value;if(0===e.length)return!1;const t=e[0].date,n=e[e.length-1].date;return(!o.value||!u.value||t!==o.value||n!==u.value)&&(o.value=t,u.value=n,a("change",{start:t,end:n,days:e}),!0)}return{checkChange:e}}function et(){function e(e,t){return(Array.isArray(t)?t:[t]).includes(e.keyCode)}return{isKeyCode:e}}const tt=et().isKeyCode,nt={useNavigation:Boolean};function at(t,{rootRef:n,focusRef:a,focusValue:r,datesRef:o,parsedView:u,emittedValue:i,direction:l,times:d}){let e=!1;function s(){e||document&&(e=!0,document.addEventListener("keyup",y),document.addEventListener("keydown",f))}function c(){document&&(document.removeEventListener("keyup",y),document.removeEventListener("keydown",f),e=!1)}function v(e){if(e&&document){const t=document.activeElement;if(t!==document.body&&n.value?.contains(t))return!0}return!1}function m(){let t=0;const n=window.setInterval(()=>{const e=o.value[a.value];e&&(e.focus(),50!==++t)&&document.activeElement!==e||window.clearInterval(n)},250)}function f(e){v(e)&&tt(e,[33,34,35,36,37,38,39,40])&&(e.stopPropagation(),e.preventDefault())}function y(e){if(v(e)&&tt(e,[33,34,35,36,37,38,39,40])){const t={33:D,34:T,35:k,36:b,37:g,38:h,39:w,40:p};t[e.keyCode]?.()}}function h(){let e=X(r.value);if("month"===u.value){if(e=G(e,{day:-7}),r.value.month!==e.month)return l.value="prev",void(i.value=e.date)}else e=G(e,{minute:Number(t.intervalMinutes)});l.value="prev",a.value=e.date}function p(){let e=X(r.value);if("month"===u.value){if(e=G(e,{day:7}),r.value.month!==e.month)return l.value="next",void(i.value=e.date)}else e=G(e,{minute:Number(t.intervalMinutes)});l.value="next",a.value=e.date}function g(){let e=X(r.value);l.value="prev";do{e=G(e,{day:-1})}while(!t.weekdays.includes(Number(e.weekday)));a.value=e.date}function w(){let e=X(r.value);l.value="next";do{e=G(e,{day:1})}while(!t.weekdays.includes(Number(e.weekday)));a.value=e.date}function D(){let e=X(r.value);e="month"===u.value?G(e,{month:-1}):G(e,{day:-7}),l.value="prev",a.value=e.date}function T(){let e=X(r.value);e="month"===u.value?G(e,{month:1}):G(e,{day:7}),l.value="next",a.value=e.date}function b(){let e=X(r.value);e="month"===u.value?_(e):P(e,t.weekdays||[],d.today);while(!t.weekdays.includes(Number(e.weekday)))e=G(e,{day:-1});a.value=e.date}function k(){let e=X(r.value);e="month"===u.value?S(e):Z(e,t.weekdays||[],d.today);while(!t.weekdays.includes(Number(e.weekday)))e=G(e,{day:-1});a.value=e.date}return we.onBeforeUnmount(()=>{c()}),we.watch(()=>t.useNavigation,e=>{(!0===e?s:c)()}),!0===t.useNavigation&&s(),{startNavigation:s,endNavigation:c,tryFocus:m}}var rt=we.defineComponent({name:"QCalendarResource",props:{...Ie,...xe,...We,...He,...Re,...Ue,...nt},emits:["update:model-value","update:model-resources","resource-expanded",...Ge,...$e,...m("-date"),...m("-interval"),...m("-head-day"),...m("-time"),...m("-head-resources"),...m("-resource")],setup(m,{slots:f,emit:v,expose:q}){const e=we.ref(null),H=we.ref(null),R=we.ref(null),t=we.ref(null),y=we.ref(m.modelValue||Te()),n=we.ref(De(m.modelValue||Te())),h=we.ref({}),p=we.ref({}),u=we.ref("next"),i=we.ref(m.modelValue||Te()),l=we.ref("0000-00-00"),d=we.ref(0),r=we.ref(m.modelValue),s=we.reactive({width:0,height:0}),g=we.ref(""),w=we.ref(""),D=we.ref(""),U=we.ref(null),L=we.ref(null),a=(we.watch(()=>m.view,()=>{d.value=0}),we.computed(()=>{return"month"===m.view?"month-interval":m.view})),T=we.computed(()=>{return parseInt(String(m.cellWidth),10)}),o=we.getCurrentInstance();if(null===o)throw new Error("current instance is null");const b=je(o).emitListeners,{times:c,setCurrent:Y,updateCurrent:k}=Le(m),{parsedStart:_,parsedEnd:B,dayStyleDefault:S}=(k(),Y(),Me(m,{startDate:i,endDate:l,times:c})),N=we.computed(()=>{return be(m.modelValue,c.now)||_.value||c.today}),V=(n.value=N.value,y.value=N.value.date,Ye(m,{parsedView:a,times:c,parsedValue:N})).renderValues,{rootRef:P,__renderCalendar:Z}=Ne(m,ge,{scrollArea:e,pane:H}),{days:F,intervals:I,intervalFormatter:K,styleDefault:$,scrollToTimeX:z,timeDurationWidth:M,timeStartPosX:C,widthToMinutes:X}=qe(m,{times:c,scrollArea:e,parsedStart:_,parsedEnd:B,maxDays:d,size:s,headerColumnRef:t}),E=ze(m,{parsedView:a,parsedValue:N,direction:u,maxDays:d,times:c,emittedValue:r,emit:v}).move,A=Ke(v,b).getDefaultMouseEventHandlers,j=Je(v,{days:F,lastStart:U,lastEnd:L}).checkChange,Q=et().isKeyCode,G=at(m,{rootRef:P,focusRef:y,focusValue:n,datesRef:h,parsedView:a,emittedValue:r,direction:u,times:c}).tryFocus,O=we.computed(()=>{const e=parseInt(String(m.resourceHeight),10);return 0===e?"auto":e}),W=we.computed(()=>{return parseInt(String(m.resourceMinHeight),10)}),x=we.computed(()=>{return parseInt(String(m.intervalHeaderHeight),10)});function J(){r.value=Te()}function ee(e=1){E(e)}function te(e=1){E(-e)}function ne({width:e,height:t}){s.width=e,s.height=t}function ae(e){return e.date===r.value}function re(){const e={height:_e(x.value)};return we.h("div",{ref:R,roll:"presentation",class:{"q-calendar-resource__head":!0,"q-calendar__sticky":!0!==m.noSticky},style:e},[oe(),ue()])}function oe(){const e=f["head-resources"],t=_e(x.value),n={timestamps:I,date:m.modelValue,resources:m.modelResources};return we.h("div",{class:{"q-calendar-resource__head--resources":!0,"q-calendar__sticky":!0!==m.noSticky},style:{height:t},...A("-head-resources",e=>{return{scope:n,event:e}})},[e&&e({scope:n})])}function ue(){return we.h("div",{ref:t,class:{"q-calendar-resource__head--intervals":!0}},[I.value.map(e=>e.map((e,t)=>ie(e,t)))])}function ie(e,t){const n=f["interval-label"],a=!0!==m.noActiveDate&&ae(e),r=_e(T.value),o=_e(x.value),u=m.shortIntervalLabel,i=K.value(e,u),l={timestamp:e,index:t,label:i,droppable:g.value===i},d=m.intervalStyle||S,s={width:r,maxWidth:r,minWidth:r,height:o,...d({scope:l})},c="function"===typeof m.intervalClass?m.intervalClass({scope:l}):{},v=!0===m.focusable&&m.focusType.includes("interval");return we.h("div",{key:i,tabindex:!0===v?0:-1,class:{"q-calendar-resource__head--interval":!0,...c,"q-active-date":a,"q-calendar__hoverable":!0===m.hoverable,"q-calendar__focusable":!0===v},style:s,onDragenter:e=>{void 0!==m.dragEnterFunc&&"function"===typeof m.dragEnterFunc&&(!0===m.dragEnterFunc(e,"interval",{scope:l})?g.value=i:g.value="")},onDragover:e=>{void 0!==m.dragOverFunc&&"function"===typeof m.dragOverFunc&&(!0===m.dragOverFunc(e,"interval",{scope:l})?g.value=i:g.value="")},onDragleave:e=>{void 0!==m.dragLeaveFunc&&"function"===typeof m.dragLeaveFunc&&(!0===m.dragLeaveFunc(e,"interval",{scope:l})?g.value=i:g.value="")},onDrop:e=>{void 0!==m.dropFunc&&"function"===typeof m.dropFunc&&(!0===m.dropFunc(e,"interval",{scope:l})?g.value=i:g.value="")},onFocus:()=>{!0===v&&(y.value=i)},...A("-interval",e=>{return{scope:l,event:e}})},[n?n({scope:l}):i,Qe()])}function le(){return we.h("div",{class:"q-calendar-resource__body"},[de()])}function de(){return we.h("div",{ref:e,class:{"q-calendar-resource__scroll-area":!0,"q-calendar__scroll":!0}},[ce()])}function se(){return we.h("div",{},"No resources have been defined")}function ce(){return we.h("div",{class:"q-calendar-resource__day--container"},[re(),void 0===m.modelResources&&se(),void 0!==m.modelResources&&ve()])}function ve(){const e={class:"q-calendar-resource__resources--body"};return we.h("div",e,me())}function me(e=void 0,n=0,a=!0){return void 0===e&&(e=m.modelResources),e.map((e,t)=>{return fe(e,t,n,void 0!==e.children?e.expanded:a)}).filter(e=>!!e)}function fe(e,t,n=0,a=!0){const r={},o=(r.height="auto"===O.value?O.value:_e(O.value),W.value>0&&(r.minHeight=_e(W.value)),we.h("div",{key:e[m.resourceKey]+"-"+t,class:{"q-calendar-resource__resource--row":!0},style:r},[ye(e,t,n,a),he(e,t)]));return void 0!==e.children?[o,we.h("div",{class:{"q-calendar__child":!0,"q-calendar__child--expanded":!0===a,"q-calendar__child--collapsed":!0!==a}},[me(e.children,n+1,!1===a?a:e.expanded)])]:[o]}function ye(t,e,n=0,a=!0){const r=f["resource-label"],o={},u=(o.height=void 0!==t.height?_e(parseInt(t.height,10)):O.value?_e(O.value):"auto",W.value>0&&(o.minHeight=_e(W.value)),m.resourceStyle||$),i=t[m.resourceLabel],l=!0===m.focusable&&m.focusType.includes("resource")&&!0===a,d=t[m.resourceKey],s={resource:t,timestamps:I,resourceIndex:e,indentLevel:n,label:i,droppable:w.value===d},c="function"===typeof m.resourceClass?m.resourceClass({scope:s}):{};return we.h("div",{key:t[m.resourceKey]+"-"+e,ref:e=>{e instanceof HTMLElement&&(p.value[t[m.resourceKey]]=e)},tabindex:!0===l?0:-1,class:{"q-calendar-resource__resource":0===n,"q-calendar-resource__resource--section":0!==n,...c,"q-calendar__sticky":!0!==m.noSticky,"q-calendar__hoverable":!0===m.hoverable,"q-calendar__focusable":!0===l},style:{...o,...u({scope:s})},onDragenter:e=>{void 0!==m.dragEnterFunc&&"function"===typeof m.dragEnterFunc&&(!0===m.dragEnterFunc(e,"resource",{scope:s})?w.value=d:w.value="")},onDragover:e=>{void 0!==m.dragOverFunc&&"function"===typeof m.dragOverFunc&&(!0===m.dragOverFunc(e,"resource",{scope:s})?w.value=d:w.value="")},onDragleave:e=>{void 0!==m.dragLeaveFunc&&"function"===typeof m.dragLeaveFunc&&(!0===m.dragLeaveFunc(e,"resource",{scope:s})?w.value=d:w.value="")},onDrop:e=>{void 0!==m.dropFunc&&"function"===typeof m.dropFunc&&(!0===m.dropFunc(e,"resource",{scope:s})?w.value=d:w.value="")},onKeydown:e=>{Q(e,[13,32])&&(e.stopPropagation(),e.preventDefault())},onKeyup:e=>{Q(e,[13,32])&&void 0!==b.value.onClickResource&&v("click-resource",{scope:s,event:e})},...A("-resource",e=>{return{scope:s,event:e}})},[[we.h("div",{class:{"q-calendar__parent":void 0!==t.children,"q-calendar__parent--expanded":void 0!==t.children&&!0===t.expanded,"q-calendar__parent--collapsed":void 0!==t.children&&!0!==t.expanded},onClick:e=>{e.stopPropagation(),t.expanded=!t.expanded,v("resource-expanded",{expanded:t.expanded,scope:s})}}),we.h("div",{class:{"q-calendar-resource__resource--text":!0,"q-calendar__ellipsis":!0},style:{paddingLeft:10*n+2+"px"}},[r?r({scope:s}):i]),Qe()]])}function he(t,n){const e=f["resource-intervals"],a={resource:t,timestamps:I,resourceIndex:n,timeStartPosX:C,timeDurationWidth:M};return we.h("div",{class:"q-calendar-resource__resource--intervals"},[I.value.map(e=>e.map(e=>pe(t,e,n))),e&&e({scope:a})])}function pe(t,e,n){const a=f["resource-interval"],r=!0!==m.noActiveDate&&ae(e),o=t[m.resourceKey],u=e.time+"-"+o,i=!0===m.focusable&&m.focusType.includes("time"),l={activeDate:r,resource:t,timestamp:e,resourceIndex:n,droppable:D.value===u},d=m.intervalStyle||S,s=_e(T.value),c={width:s,maxWidth:s,minWidth:s,...d({scope:l})};return c.height=void 0!==t.height?_e(parseInt(t.height,10)):"auto"===O.value?O.value:_e(O.value),W.value>0&&(c.minHeight=_e(W.value)),we.h("div",{key:u,ref:e=>{e instanceof HTMLElement&&(h.value[t[m.resourceKey]]=e)},tabindex:!0===i?0:-1,class:{"q-calendar-resource__resource--interval":!0,"q-active-date":r,"q-calendar__hoverable":!0===m.hoverable,"q-calendar__focusable":!0===i},style:c,onDragenter:e=>{void 0!==m.dragEnterFunc&&"function"===typeof m.dragEnterFunc&&(!0===m.dragEnterFunc(e,"time",{scope:l})?D.value=u:D.value="")},onDragover:e=>{void 0!==m.dragOverFunc&&"function"===typeof m.dragOverFunc&&(!0===m.dragOverFunc(e,"time",{scope:l})?D.value=u:D.value="")},onDragleave:e=>{void 0!==m.dragLeaveFunc&&"function"===typeof m.dragLeaveFunc&&(!0===m.dragLeaveFunc(e,"time",{scope:l})?D.value=u:D.value="")},onDrop:e=>{void 0!==m.dropFunc&&"function"===typeof m.dropFunc&&(!0===m.dropFunc(e,"time",{scope:l})?D.value=u:D.value="")},onFocus:()=>{!0===i&&(y.value=u)},...A("-time",e=>{return{scope:l,event:e}})},[a&&a({scope:l}),Qe()])}function ge(){const{start:e,end:t,maxDays:n}=V.value,a=(i.value===e.date&&l.value===t.date&&d.value===n||(i.value=e.date,l.value=t.date,d.value=n),s.width>0),r=we.withDirectives(we.h("div",{class:"q-calendar-resource",key:i.value},[!0===a&&le()]),[[Se,ne]]);if(!0!==m.animated)return r;{const o="q-calendar--"+("prev"===u.value?m.transitionPrev:m.transitionNext);return we.h(we.Transition,{name:o,appear:!0},()=>r)}}return we.watch([F],j,{deep:!0,immediate:!0}),we.watch(()=>m.modelValue,(e,t)=>{if(r.value!==e){if(!0===m.animated){const n=ke(De(e)),a=ke(De(t));u.value=n>=a?"next":"prev"}r.value=e}y.value=e}),we.watch(r,(e,t)=>{if(r.value!==m.modelValue){if(!0===m.animated){const n=ke(De(e)),a=ke(De(t));u.value=n>=a?"next":"prev"}v("update:model-value",e)}}),we.watch(y,e=>{e&&(n.value=be(e))}),we.watch(n,()=>{h.value[y.value]?h.value[y.value].focus():G()}),we.onBeforeUpdate(()=>{h.value={},p.value={}}),we.onMounted(()=>{}),q({prev:te,next:ee,move:E,moveToToday:J,updateCurrent:k,timeStartPosX:C,timeDurationWidth:M,widthToMinutes:X,scrollToTimeX:z}),()=>Z()}});const ot="4.1.1";ye={version:ot,QCalendarResource:rt,...ye,...ge,install(e){e.component(String(rt.name),rt)}};return ye}); |
/*! | ||
* @quasar/quasar-ui-qcalendar v4.1.0 | ||
* @quasar/quasar-ui-qcalendar v4.1.1 | ||
* (c) 2025 Jeff Galbraith <jeff@quasar.dev> | ||
* Released under the MIT License. | ||
*/ | ||
var vue=require("vue");const PARSE_DATETIME=/^(\d{4})-(\d{1,2})(-(\d{1,2}))?([^\d]+(\d{1,2}))?(:(\d{1,2}))?(:(\d{1,2}))?(.(\d{1,3}))?$/,PARSE_DATE=/^(\d{4})-(\d{1,2})(-(\d{1,2}))?/,PARSE_TIME=/(\d\d?)(:(\d\d?)|)(:(\d\d?)|)/,DAYS_IN_MONTH=[0,31,28,31,30,31,30,31,31,30,31,30,31],DAYS_IN_MONTH_LEAP=[0,31,29,31,30,31,30,31,31,30,31,30,31],TIME_CONSTANTS={MILLISECONDS_IN:{DAY:864e5},MINUTES_IN:{HOUR:60},DAYS_IN:{WEEK:7}},DAYS_IN_MONTH_MIN=28,DAYS_IN_MONTH_MAX=31,MONTH_MAX=12,MONTH_MIN=1,DAY_MIN=1,FIRST_HOUR=0;function validateTimestamp(e){return"string"===typeof e&&PARSE_DATETIME.test(e)}function parsed(e){if("string"!==typeof e)return null;const t=PARSE_DATETIME.exec(e);if(!t||!t[1]||!t[2])return null;const a=parseInt(t[1],10),n=parseInt(t[2],10),r=parseInt(t[4]||"1",10),o=parseInt(t[6]||"0",10),u=parseInt(t[8]||"0",10);return{date:e,time:o.toString().padStart(2,"0")+":"+u.toString().padStart(2,"0"),year:a,month:n,day:r,hour:o,minute:u,hasDay:!!t[4],hasTime:!0,past:!1,current:!1,future:!1,disabled:!1,weekday:0,doy:0,workweek:0}}function parseDate(e,t=!1){if(!(e instanceof Date))return null;const a=t?"UTC":"";return updateFormatted({date:padNumber(e[`get${a}FullYear`](),4)+"-"+padNumber(e[`get${a}Month`]()+1,2)+"-"+padNumber(e[`get${a}Date`](),2),time:padNumber(e[`get${a}Hours`]()||0,2)+":"+padNumber(e[`get${a}Minutes`]()||0,2),year:e[`get${a}FullYear`](),month:e[`get${a}Month`]()+1,day:e[`get${a}Date`](),hour:e[`get${a}Hours`](),minute:e[`get${a}Minutes`](),weekday:0,doy:0,workweek:0,hasDay:!0,hasTime:!0,past:!1,current:!1,future:!1,disabled:!1})}function padNumber(e,t){let a=String(e);while(a.length<t)a="0"+a;return a}function isLeapYear(e){return e%4===0&&e%100!==0||e%400===0}function daysInMonth(e,t){return(isLeapYear(e)?DAYS_IN_MONTH_LEAP:DAYS_IN_MONTH)[t]}function nextDay(e){const t=new Date(e.year,e.month-1,e.day+1);return updateFormatted(normalizeTimestamp({...e,year:t.getFullYear(),month:t.getMonth()+1,day:t.getDate()}))}function prevDay(e){const t=new Date(e.year,e.month-1,e.day-1);return updateFormatted(normalizeTimestamp({...e,year:t.getFullYear(),month:t.getMonth()+1,day:t.getDate()}))}function today(){const e=new Date,t=e.getMonth()+1,a=e.getDate(),n=e.getFullYear();return[n,padNumber(t,2),padNumber(a,2)].join("-")}function isToday(e){return e===today()}function getStartOfWeek(e,t,a){let n=copyTimestamp(e);if(t){if(1===n.day||0===n.weekday)while(!t.includes(Number(n.weekday)))n=nextDay(n);n=findWeekday(n,t[0],prevDay),n=updateFormatted(n),a&&(n=updateRelative(n,a,n.hasTime))}return n}function getEndOfWeek(e,t,a){let n=copyTimestamp(e);if(t&&Array.isArray(t)){const r=daysInMonth(n.year,n.month);if(r===n.day||n.weekday===t[t.length-1])while(!t.includes(Number(n.weekday)))n=prevDay(n);n=findWeekday(n,t[t.length-1],nextDay),n=updateFormatted(n),a&&(n=updateRelative(n,a,n.hasTime))}return n}function getStartOfMonth(e){let t=copyTimestamp(e);return t.day=DAY_MIN,t=updateFormatted(t),t}function getEndOfMonth(e){let t=copyTimestamp(e);return t.day=daysInMonth(t.year,t.month),t=updateFormatted(t),t}function parseTime(e){const t=Object.prototype.toString.call(e);switch(t){case"[object Number]":return e;case"[object String]":{const a=PARSE_TIME.exec(e);return a?60*parseInt(a[1],10)+parseInt(a[3]||"0",10):!1}case"[object Object]":return"object"!==typeof e||"number"!==typeof e.hour||"number"!==typeof e.minute?!1:"object"===typeof e&&"hour"in e&&"minute"in e&&60*e.hour+e.minute}return!1}function compareTimestamps(e,t){return!(!e||!t)&&e.year===t.year&&e.month===t.month&&e.day===t.day&&e.hour===t.hour&&e.minute===t.minute}function compareDate(e,t){return getDate(e)===getDate(t)}function compareTime(e,t){return getTime(e)===getTime(t)}function compareDateTime(e,t){return getDateTime(e)===getDateTime(t)}function parseTimestamp(e,t=null){let a=parsed(e);return a?(a=updateFormatted(a),t&&(a=updateRelative(a,t,a.hasTime)),a):null}function getDayIdentifier(e){return 1e8*(e.year??0)+1e6*(e.month??0)+1e4*(e.day??0)}function getTimeIdentifier(e){return 100*(e.hour??0)+(e.minute??0)}function getDayTimeIdentifier(e){return getDayIdentifier(e)+getTimeIdentifier(e)}function diffTimestamp(e,t,a=!1){const n=Date.UTC(e.year??0,(e.month??1)-1,e.day??1,e.hour??0,e.minute??0),r=Date.UTC(t.year??0,(t.month??1)-1,t.day??1,t.hour??0,t.minute??0);return!0===a&&r<n?0:r-n}function updateRelative(e,t,a=!1){let n=copyTimestamp(e),r=getDayIdentifier(t),o=getDayIdentifier(n),u=r===o;return n.hasTime&&a&&u&&(r=getTimeIdentifier(t),o=getTimeIdentifier(n),u=r===o),n.past=o<r,n.current=u,n.future=o>r,n.currentWeekday=n.weekday===t.weekday,n}function updateMinutes(e,t,a=null){let n=copyTimestamp(e);return n.hasTime=!0,n.hour=Math.floor(t/TIME_CONSTANTS.MINUTES_IN.HOUR),n.minute=t%TIME_CONSTANTS.MINUTES_IN.HOUR,n.time=getTime(n),a&&(n=updateRelative(n,a,!0)),n}function updateWeekday(e){let t=copyTimestamp(e);return t.weekday=getWeekday(t),t}function updateDayOfYear(e){let t=copyTimestamp(e);return t.doy=getDayOfYear(t)||0,t}function updateWorkWeek(e){let t=copyTimestamp(e);return t.workweek=getWorkWeek(t),t}function updateDisabled(e,t,a,n,r){let o=copyTimestamp(e);const u=getDayIdentifier(o);if(void 0!==t){const l=parsed(t);if(l){const c=getDayIdentifier(l);u<=c&&(o.disabled=!0)}}if(!0!==o.disabled&&void 0!==a){const m=parsed(a);if(m){const v=getDayIdentifier(m);u>=v&&(o.disabled=!0)}}if(!0!==o.disabled&&Array.isArray(n)&&n.length>0)for(var i in n)if(n[i]===o.weekday){o.disabled=!0;break}if(!0!==o.disabled&&Array.isArray(r)&&r.length>0)for(var d in r)if(Array.isArray(r[d])&&2===r[d].length&&r[d][0]&&r[d][1]){const p=parsed(r[d][0]),y=parsed(r[d][1]);if(p&&y&&isBetweenDates(o,p,y)){o.disabled=!0;break}}else{const f=r[d];if(Array.isArray(f))for(var s of f){const h=parseTimestamp(s);if(h){const g=getDayIdentifier(h);if(g===u){o.disabled=!0;break}}}else if(f){const T=parseTimestamp(f);if(T){const D=getDayIdentifier(T);D===u&&(o.disabled=!0)}}}return o}function updateFormatted(e){let t=copyTimestamp(e);return t.hasTime=!0,t.time=getTime(t),t.date=getDate(t),t.weekday=getWeekday(t),t.doy=getDayOfYear(t)||0,t.workweek=getWorkWeek(t),t}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){let t=copyTimestamp(e);if(0===t.year){const r=parseTimestamp(today());r&&(t=r)}const a=new Date(Date.UTC(t.year,t.month-1,t.day)),n=4;a.setUTCDate(a.getUTCDate()-(a.getUTCDay()+6)%7+n),a.setUTCDate(a.getUTCDate()+n-(a.getUTCDay()||7));e=new Date(Date.UTC(a.getUTCFullYear(),0,1)),e=Math.ceil(((a.valueOf()-e.valueOf())/864e5+1)/7);return e}function getWeekday(e){let t=e.weekday;if(e.hasDay){const a=Math.floor,n=e.day,r=(e.month+9)%MONTH_MAX+1,o=a(e.year/100),u=e.year%100-(e.month<=2?1:0);t=((n+a(2.6*r-.2)-2*o+u+a(u/4)+a(o/4))%7+7)%7}return t??0}function copyTimestamp(e){return{...e}}function getDate(e){let 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):"00:00")}function moveRelativeDays(e,t=nextDay,a=1,n=[0,1,2,3,4,5,6]){const r=copyTimestamp(e);return relativeDays(r,t,a,n)}function relativeDays(e,t=nextDay,a=1,n=[0,1,2,3,4,5,6]){let r=copyTimestamp(e);n.includes(Number(r.weekday))||0!==r.weekday||t!==nextDay||++a;while(--a>=0)r=t(r),n.length<7&&!n.includes(Number(r.weekday))&&++a;return r}function findWeekday(e,t,a=nextDay,n=6){let r=copyTimestamp(e);while(r.weekday!==t&&--n>=0)r=a(r);return r}function createDayList(e,t,a,n=[0,1,2,3,4,5,6],r=void 0,o=void 0,u=[],i=[],d=42,s=0){const l=getDayIdentifier(e),c=getDayIdentifier(t),m=[];let v=copyTimestamp(e),p=0,y=p===c;if(!(c<l))while((!y||m.length<s)&&m.length<d){if(p=getDayIdentifier(v),y=y||p>c&&m.length>=s,y)break;if(n.includes(Number(v.weekday))){let e=copyTimestamp(v);e=updateFormatted(e),e=updateRelative(e,a),e=updateDisabled(e,r,o,u,i),m.push(e)}v=relativeDays(v,nextDay)}return m}function createIntervalList(t,a,n,r,o){const u=[];for(let e=0;e<r;++e){const i=(a+e)*n,d=copyTimestamp(t);u.push(updateMinutes(d,i,o))}return u}function createNativeLocaleFormatter(n,r){const e=()=>"";return"undefined"===typeof Intl||"undefined"===typeof Intl.DateTimeFormat?e:(t,e)=>{try{const a=new Intl.DateTimeFormat(n||void 0,r(t,e));return a.format(makeDateTime(t))}catch(e){return console.error(`Intl.DateTimeFormat: ${e.message} -> `+getDateTime(t)),""}}}function makeDate(e,t=!0){return t?new Date(Date.UTC(e.year,e.month-1,e.day,0,0)):new Date(e.year,e.month-1,e.day,0,0)}function makeDateTime(e,t=!0){return t?new Date(Date.UTC(e.year,e.month-1,e.day,e.hour,e.minute)):new Date(e.year,e.month-1,e.day,e.hour,e.minute)}function validateNumber(e){return isFinite(Number(e))}function maxTimestamp(e,t=!1){const a=!0===t?getDayTimeIdentifier:getDayIdentifier;return e.reduce((e,t)=>{return Math.max(a(e),a(t))===a(e)?e:t})}function minTimestamp(e,t=!1){const a=!0===t?getDayTimeIdentifier:getDayIdentifier;return e.reduce((e,t)=>{return Math.min(a(e),a(t))===a(e)?e:t})}function isBetweenDates(e,t,a,n=!1){const r=getDayIdentifier(e)+(!0===n?getTimeIdentifier(e):0),o=getDayIdentifier(t)+(!0===n?getTimeIdentifier(t):0),u=getDayIdentifier(a)+(!0===n?getTimeIdentifier(a):0);return r>=o&&r<=u}function isOverlappingDates(e,t,a,n){const r=getDayIdentifier(e),o=getDayIdentifier(t),u=getDayIdentifier(a),i=getDayIdentifier(n);return r>=u&&r<=i||o>=u&&o<=i||u>=r&&o>=i}function addToDate(e,t){const a=copyTimestamp(e);return t.year&&(a.year+=t.year),t.month&&(a.month+=t.month),t.day&&(a.day+=t.day),t.hour&&(a.hour+=t.hour),t.minute&&(a.minute+=t.minute),updateFormatted(normalizeTimestamp(a))}function normalizeTimestamp(e){const t=new Date(e.year,e.month-1,e.day,e.hour,e.minute);return{...e,year:t.getFullYear(),month:t.getMonth()+1,day:t.getDate(),hour:t.getHours(),minute:t.getMinutes()}}function daysBetween(e,t){const a=diffTimestamp(e,t,!0);return Math.floor(a/TIME_CONSTANTS.MILLISECONDS_IN.DAY)}function weeksBetween(e,t){let a=copyTimestamp(e),n=copyTimestamp(t);return a=findWeekday(a,0),n=findWeekday(n,6),Math.ceil(daysBetween(a,n)/TIME_CONSTANTS.DAYS_IN.WEEK)}const weekdayDateMap={Sun:new Date("2020-01-05T00:00:00.000Z"),Mon:new Date("2020-01-06T00:00:00.000Z"),Tue:new Date("2020-01-07T00:00:00.000Z"),Wed:new Date("2020-01-08T00:00:00.000Z"),Thu:new Date("2020-01-09T00:00:00.000Z"),Fri:new Date("2020-01-10T00:00:00.000Z"),Sat:new Date("2020-01-11T00:00:00.000Z")};function getWeekdayFormatter(){const e=()=>"",r={long:{timeZone:"UTC",weekday:"long"},short:{timeZone:"UTC",weekday:"short"},narrow:{timeZone:"UTC",weekday:"narrow"}};return"undefined"===typeof Intl||"undefined"===typeof Intl.DateTimeFormat?e:t;function t(t,e,a){try{const n=new Intl.DateTimeFormat(a||void 0,r[e]||r["long"]);return n.format(weekdayDateMap[t])}catch(e){return e instanceof Error&&console.error(`Intl.DateTimeFormat: ${e.message} -> day of week: `+t),""}}}function getWeekdayNames(t,a){const e=Object.keys(weekdayDateMap),n=getWeekdayFormatter();return e.map(e=>String(n(e,t,a)))}function getMonthFormatter(){const e=()=>"",o={long:{timeZone:"UTC",month:"long"},short:{timeZone:"UTC",month:"short"},narrow:{timeZone:"UTC",month:"narrow"}};return"undefined"===typeof Intl||"undefined"===typeof Intl.DateTimeFormat?e:t;function t(t,e,a){try{const n=new Intl.DateTimeFormat(a||void 0,o[e]||o["long"]),r=new Date;return r.setDate(1),r.setMonth(t),n.format(r)}catch(e){return e instanceof Error&&console.error(`Intl.DateTimeFormat: ${e.message} -> month: `+t),""}}}function getMonthNames(t,a){const n=getMonthFormatter();return[...Array(12).keys()].map(e=>n(e,t,a))}function convertToUnit(e,t="px"){if(e)return isNaN(e)?String(e):"auto"===e?e:""+Number(e)+t}function indexOf(t,a){for(let e=0;e<t.length;e++)if(!0===a(t[e],e))return e;return-1}function minCharWidth(e,t){return 0===t?e:e.slice(0,t)}const ResizeObserverDirective={mounted(e,t){if("function"===typeof t.value){const a=t.value,n={callback:a,size:{width:0,height:0},observer:new ResizeObserver(e=>{const t=e[0].contentRect;t.width===n.size.width&&t.height===n.size.height||(n.size.width=t.width,n.size.height=t.height,n.debounceTimeout&&clearTimeout(n.debounceTimeout),n.debounceTimeout=setTimeout(()=>{n.callback(n.size),n.debounceTimeout=void 0},100))})};n.observer.observe(e),e.__onResizeObserver=n}},beforeUnmount(e){if(e.__onResizeObserver){const{observer:t,debounceTimeout:a}=e.__onResizeObserver;a&&clearTimeout(a),t.unobserve(e),delete e.__onResizeObserver}}};function useCalendar(t,a,{scrollArea:e,pane:n}){if(!a){const l="[error: renderCalendar] no renderFunc has been supplied to useCalendar";throw console.error(l),new Error(l)}const r=vue.reactive({width:0,height:0}),o=vue.ref(null);function u({width:e,height:t}){r.width=e,r.height=t}const i=vue.computed(()=>{return!0!==t.noScroll&&e.value&&n.value&&r.height?e.value.offsetWidth-n.value.offsetWidth:0});function d(){}function s(){const e={ref:o,role:"complementary",lang:t.locale,class:`q-calendar ${t.dark?"q-calendar--dark":""} `+(t.bordered?"q-calendar__bordered":"")};return vue.withDirectives(vue.h("div",{...e},[a()]),[[ResizeObserverDirective,u]])}return{rootRef:o,scrollWidth:i,__initCalendar:d,__renderCalendar:s}}const isValidFocusType=e=>e.every(e=>["day","date","weekday","interval","time","resource","task"].includes(e)),useCommonProps={modelValue:{type:String,default:today(),validator:e=>""===e||validateTimestamp(e)},weekdays:{type:Array,default:()=>[0,1,2,3,4,5,6]},dateType:{type:String,default:"round",validator:e=>["round","rounded","square"].includes(e)},weekdayAlign:{type:String,default:"center",validator:e=>["left","center","right"].includes(e)},dateAlign:{type:String,default:"center",validator:e=>["left","center","right"].includes(e)},bordered:Boolean,dark:Boolean,noAria:Boolean,noActiveDate:Boolean,noHeader:Boolean,noScroll:Boolean,shortWeekdayLabel:Boolean,noDefaultHeaderText:Boolean,noDefaultHeaderBtn:Boolean,minWeekdayLabel:{type:[Number,String],default:1},weekdayBreakpoints:{type:Array,default:()=>[75,35],validator:e=>2===e.length},locale:{type:String,default:"en-US"},animated:Boolean,transitionPrev:{type:String,default:"slide-right"},transitionNext:{type:String,default:"slide-left"},disabledDays:Array,disabledBefore:String,disabledAfter:String,disabledWeekdays:{type:Array,default:()=>[]},dragEnterFunc:Function,dragOverFunc:Function,dragLeaveFunc:Function,dropFunc:Function,selectedDates:{type:[Array,Set],default:()=>[]},selectedStartEndDates:{type:Array,default:()=>[]},hoverable:Boolean,focusable:Boolean,focusType:{type:Array,default:()=>["date"],validator:isValidFocusType}};function useCommon(t,{startDate:e,endDate:a,times:n}){const r=vue.computed(()=>parseTimestamp(e.value)),o=vue.computed(()=>{return"0000-00-00"===a.value?getEndOfWeek(r.value,t.weekdays,n.today):parseTimestamp(a.value)||r.value}),u=vue.computed(()=>createNativeLocaleFormatter(t.locale,()=>({timeZone:"UTC",day:"numeric"}))),i=vue.computed(()=>createNativeLocaleFormatter(t.locale,(e,t)=>({timeZone:"UTC",weekday:t?"short":"long"}))),d=vue.computed(()=>createNativeLocaleFormatter(t.locale,()=>({timeZone:"UTC",dateStyle:"full"})));function s(e,t){return e&&e.length>0&&e.includes(t.date)}function l(e,t){const a={firstDay:!1,betweenDays:!1,lastDay:!1};if(2===e.length){const n=getDayIdentifier(t),r=getDayIdentifier(parsed(e[0])),o=getDayIdentifier(parsed(e[1]));a.firstDay=r===n,a.lastDay=o===n,a.betweenDays=r<n&&o>n}return a}function c(e,t=!1,a=[],n=[],r=!1){const o=s(a,e),{firstDay:u,lastDay:i,betweenDays:d}=l(n,e);return{"q-past-day":!u&&!d&&!i&&!o&&!t&&!!e.past,"q-future-day":!u&&!d&&!i&&!o&&!t&&!!e.future,"q-outside":t,"q-current-day":!!e.current,"q-selected":o,"q-range-first":u,"q-range":d,"q-range-last":i,"q-range-hover":r&&(u||i||d),"q-disabled-day disabled":!0===e.disabled}}function m(e){return getStartOfWeek(e,t.weekdays,n.today)}function v(e){return getEndOfWeek(e,t.weekdays,n.today)}function p(){return{}}return{parsedStart:r,parsedEnd:o,dayFormatter:u,weekdayFormatter:i,ariaDateFormatter:d,arrayHasDate:s,checkDays:l,getRelativeClasses:c,startOfWeek:m,endOfWeek:v,dayStyleDefault:p}}function scrollTo(e,t){e instanceof Window?e.scrollTo({top:t,behavior:"instant"}):e.scrollTop=t}function getVerticalScrollPosition(e){return e instanceof Window?e.scrollY:e.scrollTop}function animVerticalScrollTo(o,u,i=500,d=performance.now(),s=getVerticalScrollPosition(o)){i<=0||s===u?scrollTo(o,u):requestAnimationFrame(e=>{const t=e-d,a=Math.min(t/i,1),n=e=>e<.5?2*e*e:(4-2*e)*e-1,r=s+(u-s)*n(a);scrollTo(o,r),a<1&&animVerticalScrollTo(o,u,i,d,s)})}function animHorizontalScrollTo(r,e,o=500){const u=r.scrollLeft,i=e-u;let d=null;function s(e){null===d&&(d=e);const t=e-d,a=Math.min(t/o,1),n=e=>e<.5?2*e*e:(4-2*e)*e-1;r.scrollLeft=u+i*n(a),t<o&&requestAnimationFrame(s)}requestAnimationFrame(s)}const useSchedulerProps={view:{type:String,validator:e=>["day","week","month","month-interval"].includes(e),default:"day"},modelResources:{type:Array},resourceKey:{type:String,default:"id"},resourceLabel:{type:String,default:"label"},resourceHeight:{type:[Number,String],default:0,validator:validateNumber},resourceMinHeight:{type:[Number,String],default:70,validator:validateNumber},resourceStyle:{type:Function,default:null},resourceClass:{type:Function,default:null},weekdayStyle:{type:Function,default:null},weekdayClass:{type:Function,default:null},dayStyle:{type:Function,default:null},dayClass:{type:Function,default:null},dateHeader:{type:String,default:"stacked",validator:e=>["stacked","inline","inverted"].includes(e)}};function useInterval(o,{times:t,scrollArea:n,parsedStart:e,parsedEnd:a,maxDays:r,size:u,headerColumnRef:i}){const d=vue.computed(()=>parseInt(String(o.intervalStart),10)),m=vue.computed(()=>parseInt(String(o.intervalMinutes),10)),s=vue.computed(()=>parseInt(String(o.intervalCount),10)),v=vue.computed(()=>parseFloat(String(o.intervalHeight))),p=vue.computed(()=>{let e=0;const t=Number(o.columnCount);return o.cellWidth?e=Number(o.cellWidth):u.width>0&&i.value&&(e=i.value.offsetWidth/(t>1?t:r.value)),e}),l=vue.computed(()=>d.value*m.value),c=vue.computed(()=>s.value*v.value),y=vue.computed(()=>s.value*p.value),f=vue.computed(()=>D(e.value)),h=vue.computed(()=>w(a.value)),g=vue.computed(()=>{return createDayList(e.value,a.value,t.today,o.weekdays,o.disabledBefore,o.disabledAfter,o.disabledWeekdays,o.disabledDays,r.value)}),T=vue.computed(()=>{return g.value.map(e=>createIntervalList(e,d.value,m.value,s.value,t.now))});function D(e){return getStartOfWeek(e,o.weekdays,t.today)}function w(e){return getEndOfWeek(e,o.weekdays,t.today)}function k(e,t){return e&&e.length>0&&e.includes(getDateTime(t))}function _(e,t){const a={firstDay:!1,betweenDays:!1,lastDay:!1};if(e&&2===e.length){const n=getDayTimeIdentifier(t),r=getDayTimeIdentifier(parsed(e[0])),o=getDayTimeIdentifier(parsed(e[1]));a.firstDay=r===n,a.lastDay=o===n,a.betweenDays=r<n&&o>n}return a}function b(e,t=[],a=[]){const n=k(t,e),{firstDay:r,lastDay:o,betweenDays:u}=_(a,e);return{"q-selected":n,"q-range-first":!0===r,"q-range":!0===u,"q-range-last":!0===o,"q-disabled-interval disabled":!0===e.disabled}}function I(e,t,a){return[]}const S=vue.computed(()=>{const a={timeZone:"UTC",hour12:!o.hour24Format,hour:"2-digit",minute:"2-digit"},n={timeZone:"UTC",hour12:!o.hour24Format,hour:"numeric",minute:"2-digit"},r={timeZone:"UTC",hour12:!o.hour24Format,hour:"numeric"};return createNativeLocaleFormatter(o.locale,(e,t)=>t?0===e.minute?r:n:a)}),x=vue.computed(()=>{const e={timeZone:"UTC",dateStyle:"full",timeStyle:"short"};return createNativeLocaleFormatter(o.locale,()=>e)});function M(e){const t=T.value[0][0],a=t.hour===e.hour&&t.minute===e.minute;return!a&&0===e.minute}function N(e){}function C(e){return{}}function E(e,t,a=!1,n){let r=copyTimestamp(t);if(e.currentTarget){const o=e.currentTarget.getBoundingClientRect(),u=e,i=e,d=u.changedTouches||u.touches,s=(d&&d[0]?d[0]:i).clientY,l=(s-o.top)/v.value,c=Math.floor((a?Math.floor(l):l)*m.value);0!==c&&(r=addToDate(r,{minute:c})),n&&(r=updateRelative(r,n,!0))}return r}function R(e,t,a=!1,n){let r=copyTimestamp(t);const o=e.currentTarget.getBoundingClientRect(),u=e,i=e,d=u.changedTouches||u.touches,s=(d&&d[0]?d[0]:i).clientY,l=(s-o.top)/v.value,c=Math.floor((a?Math.floor(l):l)*m.value);return 0!==c&&(r=addToDate(r,{minute:c})),n&&(r=updateRelative(r,n,!0)),r}function H(e,t,a=!1,n){let r=copyTimestamp(t);if(e.currentTarget){const o=e.currentTarget.getBoundingClientRect(),u=e,i=e,d=u.changedTouches||u.touches,s=(d&&d[0]?d[0]:i).clientX,l=(s-o.left)/p.value,c=Math.floor((a?Math.floor(l):l)*m.value);0!==c&&(r=addToDate(r,{minute:c})),n&&(r=updateRelative(r,n,!0))}return r}function q(e,t){const a={timestamp:e,timeStartPos:O,timeDurationHeight:F};return void 0!==t&&(a.columnIndex=t),a}function U(e,t){const a={timestamp:copyTimestamp(e),timeStartPosX:W,timeDurationWidth:A};return void 0!==t&&(a.index=t),a}function L(e,t=0){const a=O(e);return!(!1===a||!n.value)&&(animVerticalScrollTo(n.value,a,t),!0)}function B(e,t=0){const a=W(e);return!(!1===a||!n.value)&&(animHorizontalScrollTo(n.value,a,t),!0)}function F(e){return e/m.value*v.value}function A(e){return e/m.value*p.value}function P(e){return e*m.value/v.value}function Y(e){return e*m.value/p.value}function O(e,t=!0){const a=parseTime(e);if(!1===a)return!1;const n=l.value,r=s.value*m.value,o=(a-n)/r;let u=o*c.value;return t&&(u<0&&(u=0),u>c.value)&&(u=c.value),u}function W(e,t=!0){const a=parseTime(e);if(!1===a)return!1;const n=l.value,r=s.value*m.value,o=(a-n)/r;let u=o*y.value;return t&&(u<0&&(u=0),u>y.value)&&(u=y.value),u}return{parsedIntervalStart:d,parsedIntervalMinutes:m,parsedIntervalCount:s,parsedIntervalHeight:v,parsedCellWidth:p,parsedStartMinute:l,bodyHeight:c,bodyWidth:y,parsedWeekStart:f,parsedWeekEnd:h,days:g,intervals:T,intervalFormatter:S,ariaDateTimeFormatter:x,arrayHasDateTime:k,checkIntervals:_,getIntervalClasses:b,getResourceClasses:I,showIntervalLabelDefault:M,showResourceLabelDefault:N,styleDefault:C,getTimestampAtEventInterval:E,getTimestampAtEvent:R,getTimestampAtEventX:H,getScopeForSlot:q,getScopeForSlotX:U,scrollToTime:L,scrollToTimeX:B,timeDurationHeight:F,timeDurationWidth:A,heightToMinutes:P,widthToMinutes:Y,timeStartPos:O,timeStartPosX:W}}const useColumnProps={columnCount:{type:[Number,String],default:0,validator:validateNumber},columnIndexStart:{type:[Number,String],default:0,validator:validateNumber}},useMaxDaysProps={maxDays:{type:Number,default:1}},useTimesProps={now:{type:String,validator:e=>""===e||validateTimestamp(e),default:""}};function useTimes(e){const t=vue.reactive({now:parseTimestamp("0000-00-00 00:00"),today:parseTimestamp("0000-00-00")}),a=vue.computed(()=>e.now?parseTimestamp(e.now):o());function n(){t.now&&t.today&&(t.now.current=t.today.current=!0,t.now.past=t.today.past=!1,t.now.future=t.today.future=!1)}function r(){const e=a.value||o();u(e,t.now),i(e,t.now),u(e,t.today)}function o(){return parseDate(new Date)}function u(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)}function i(e,t){e.time!==t.time&&(t.hour=e.hour,t.minute=e.minute,t.time=e.time)}return vue.watch(a,()=>r()),{times:t,parsedNow:a,setCurrent:n,updateCurrent:r,getNow:o,updateDay:u,updateTime:i}}function useRenderValues(r,{parsedView:o,parsedValue:u,times:i}){const e=vue.computed(()=>{const e=u.value;let t=r.maxDays,a=e,n=e;switch(o.value){case"month":a=getStartOfMonth(e),n=getEndOfMonth(e),t=daysInMonth(a.year,a.month);break;case"week":case"week-agenda":case"week-scheduler":a=getStartOfWeek(e,r.weekdays,i.today),n=getEndOfWeek(a,r.weekdays,i.today),t=r.weekdays.length;break;case"day":case"scheduler":case"agenda":n=moveRelativeDays(copyTimestamp(n),nextDay,t>1?t-1:t,r.weekdays),n=updateFormatted(n);break;case"month-interval":case"month-scheduler":case"month-agenda":a=getStartOfMonth(e),n=getEndOfMonth(e),n=updateFormatted(n),t=daysInMonth(a.year,a.month);break;case"resource":t=1,n=moveRelativeDays(copyTimestamp(n),nextDay,t,r.weekdays),n=updateFormatted(n);break}return{start:a,end:n,maxDays:t}});return{renderValues:e}}const toCamelCase=e=>e.replace(/(-\w)/g,e=>e[1].toUpperCase());function getMouseEventHandlers(t,e,a,n){const r={};for(const o in a){const u=a[o],i=toCamelCase("on-"+o);if(!e.value)return console.warn("$listeners has not been set up"),{};if(void 0!==e.value[i]){const d="on"+u.event.charAt(0).toUpperCase()+u.event.slice(1),s=e=>{return(void 0===u.button||"buttons"in e&&e.buttons>0&&e.button===u.button)&&(u.prevent&&e.preventDefault(),u.stop&&e.stopPropagation(),t(o,n(e,o))),u.result};d in r?Array.isArray(r[d])?r[d].push(s):r[d]=[r[d],s]:r[d]=s}}return r}function getDefaultMouseEventHandlers(e,t,a,n){return getMouseEventHandlers(e,t,getMouseEventName(a),n)}function getMouseEventName(e){return{["click"+e]:{event:"click"},["contextmenu"+e]:{event:"contextmenu",prevent:!0,result:!1},["mousedown"+e]:{event:"mousedown"},["mousemove"+e]:{event:"mousemove"},["mouseup"+e]:{event:"mouseup"},["mouseenter"+e]:{event:"mouseenter"},["mouseleave"+e]:{event:"mouseleave"},["touchstart"+e]:{event:"touchstart"},["touchmove"+e]:{event:"touchmove"},["touchend"+e]:{event:"touchend"}}}function getRawMouseEvents(e){return Object.keys(getMouseEventName(e))}function useMouseEvents(a,n){return{getMouseEventHandlers:(e,t)=>getMouseEventHandlers(a,n,e,t),getDefaultMouseEventHandlers:(e,t)=>getDefaultMouseEventHandlers(a,n,e,t),getMouseEventName:getMouseEventName,getRawMouseEvents:getRawMouseEvents}}const useMoveEmits=["moved"];function useMove(d,{parsedView:s,parsedValue:l,direction:c,maxDays:m,times:v,emittedValue:p,emit:y}){function e(a=1){if(0===a)p.value=today();else{let e=copyTimestamp(l.value);const n=getEndOfMonth(e),r=a>0,o=r?nextDay:prevDay,u=r?n.day:1;let t=r?a:-a;c.value=r?"next":"prev";const i=d.weekdays.length;while(--t>=0)switch(s.value){case"month":e.day=u,e=o(e),e=updateWeekday(e);while(!d.weekdays.includes(Number(e.weekday)))e=addToDate(e,{day:r?1:-1});break;case"week":case"week-agenda":case"week-scheduler":e=relativeDays(e,o,i,d.weekdays);break;case"day":case"scheduler":case"agenda":e=relativeDays(e,o,m.value,d.weekdays);break;case"month-interval":case"month-agenda":case"month-scheduler":e.day=u,e=o(e);break;case"resource":e=relativeDays(e,o,m.value,d.weekdays);break}e=updateWeekday(e),e=updateFormatted(e),e=updateDayOfYear(e),e=updateRelative(e,v.now),p.value=e.date,y("moved",e)}}return{move:e}}const listenerRE=/^on[A-Z]/;function useEmitListeners(e=vue.getCurrentInstance()){return{emitListeners:vue.computed(()=>{const t={};return e?.vnode?.props&&Object.keys(e.vnode.props).forEach(e=>{listenerRE.test(e)&&(t[e]=!0)}),t})}}function useFocusHelper(){const e={"aria-hidden":"true",class:"q-calendar__focus-helper"};return[vue.h("span",e)]}function useButton(){function e({focusable:e,focusType:t},a,n){const r=e&&t.includes("date");return vue.h("button",{...a,tabindex:r?0:-1},[n,r&&useFocusHelper()])}return{renderButton:e}}const useCellWidthProps={cellWidth:[Number,String]};function useCellWidth(e){const t=vue.computed(()=>void 0!==e.cellWidth);return{isSticky:t}}const useCheckChangeEmits=["change"];function useCheckChange(n,{days:r,lastStart:o,lastEnd:u}){function e(){const e=r.value;if(0===e.length)return!1;const t=e[0].date,a=e[e.length-1].date;return(!o.value||!u.value||t!==o.value||a!==u.value)&&(o.value=t,u.value=a,n("change",{start:t,end:a,days:e}),!0)}return{checkChange:e}}function useEventUtils(){function e(e,t){return(Array.isArray(t)?t:[t]).includes(e.keyCode)}return{isKeyCode:e}}const isKeyCode=useEventUtils().isKeyCode,useNavigationProps={useNavigation:Boolean};function useNavigation(t,{rootRef:a,focusRef:n,focusValue:r,datesRef:o,parsedView:u,emittedValue:i,direction:d,times:s}){let e=!1;function l(){e||document&&(e=!0,document.addEventListener("keyup",y),document.addEventListener("keydown",p))}function c(){document&&(document.removeEventListener("keyup",y),document.removeEventListener("keydown",p),e=!1)}function m(e){if(e&&document){const t=document.activeElement;if(t!==document.body&&a.value?.contains(t))return!0}return!1}function v(){let t=0;const a=window.setInterval(()=>{const e=o.value[n.value];e&&(e.focus(),50!==++t)&&document.activeElement!==e||window.clearInterval(a)},250)}function p(e){m(e)&&isKeyCode(e,[33,34,35,36,37,38,39,40])&&(e.stopPropagation(),e.preventDefault())}function y(e){if(m(e)&&isKeyCode(e,[33,34,35,36,37,38,39,40])){const t={33:D,34:w,35:_,36:k,37:g,38:f,39:T,40:h};t[e.keyCode]?.()}}function f(){let e=copyTimestamp(r.value);if("month"===u.value){if(e=addToDate(e,{day:-7}),r.value.month!==e.month)return d.value="prev",void(i.value=e.date)}else e=addToDate(e,{minute:Number(t.intervalMinutes)});d.value="prev",n.value=e.date}function h(){let e=copyTimestamp(r.value);if("month"===u.value){if(e=addToDate(e,{day:7}),r.value.month!==e.month)return d.value="next",void(i.value=e.date)}else e=addToDate(e,{minute:Number(t.intervalMinutes)});d.value="next",n.value=e.date}function g(){let e=copyTimestamp(r.value);d.value="prev";do{e=addToDate(e,{day:-1})}while(!t.weekdays.includes(Number(e.weekday)));n.value=e.date}function T(){let e=copyTimestamp(r.value);d.value="next";do{e=addToDate(e,{day:1})}while(!t.weekdays.includes(Number(e.weekday)));n.value=e.date}function D(){let e=copyTimestamp(r.value);e="month"===u.value?addToDate(e,{month:-1}):addToDate(e,{day:-7}),d.value="prev",n.value=e.date}function w(){let e=copyTimestamp(r.value);e="month"===u.value?addToDate(e,{month:1}):addToDate(e,{day:7}),d.value="next",n.value=e.date}function k(){let e=copyTimestamp(r.value);e="month"===u.value?getStartOfMonth(e):getStartOfWeek(e,t.weekdays||[],s.today);while(!t.weekdays.includes(Number(e.weekday)))e=addToDate(e,{day:-1});n.value=e.date}function _(){let e=copyTimestamp(r.value);e="month"===u.value?getEndOfMonth(e):getEndOfWeek(e,t.weekdays||[],s.today);while(!t.weekdays.includes(Number(e.weekday)))e=addToDate(e,{day:-1});n.value=e.date}return vue.onBeforeUnmount(()=>{c()}),vue.watch(()=>t.useNavigation,e=>{(!0===e?l:c)()}),!0===t.useNavigation&&l(),{startNavigation:l,endNavigation:c,tryFocus:v}}const renderButton=useButton().renderButton;var QCalendarScheduler=vue.defineComponent({name:"QCalendarScheduler",directives:{ResizeObserver:ResizeObserverDirective},props:{...useCommonProps,...useSchedulerProps,...useColumnProps,...useMaxDaysProps,...useTimesProps,...useCellWidthProps,...useNavigationProps},emits:["update:model-value","update:model-resources","resource-expanded",...useCheckChangeEmits,...useMoveEmits,...getRawMouseEvents("-date"),...getRawMouseEvents("-day-resource"),...getRawMouseEvents("-head-resources"),...getRawMouseEvents("-head-day"),...getRawMouseEvents("-resource")],setup(f,{slots:h,emit:g,expose:R}){const e=vue.ref(null),t=vue.ref(null),H=vue.ref(null),v=vue.ref(f.modelValue||today()),a=vue.ref(parsed(f.modelValue||today())),p=vue.ref({}),q=vue.ref({}),n=vue.ref(),r=vue.ref(),i=vue.ref("next"),d=vue.ref(f.modelValue||today()),s=vue.ref("0000-00-00"),l=vue.ref(0),T=vue.ref(f.modelValue),c=vue.reactive({width:0,height:0}),y=vue.ref(""),D=vue.ref(""),U=vue.ref(null),L=vue.ref(null),o=(vue.watch(()=>f.view,()=>{l.value=0}),vue.computed(()=>{return"month"===f.view?"month-interval":f.view})),B=vue.getCurrentInstance();if(null===B)throw new Error("current instance is null");const w=useEmitListeners(B).emitListeners,k=useCellWidth(f).isSticky,{times:u,setCurrent:P,updateCurrent:Y}=useTimes(f),{parsedStart:V,parsedEnd:z,dayFormatter:K,weekdayFormatter:Z,ariaDateFormatter:$,dayStyleDefault:X,getRelativeClasses:_}=(Y(),P(),useCommon(f,{startDate:d,endDate:s,times:u})),b=vue.computed(()=>{return parseTimestamp(f.modelValue,u.now)||V.value||u.today}),j=(a.value=b.value,v.value=b.value.date,useRenderValues(f,{parsedView:o,parsedValue:b,times:u})).renderValues,{rootRef:m,scrollWidth:Q,__renderCalendar:G}=useCalendar(f,Ae,{scrollArea:e,pane:t}),{days:I,parsedCellWidth:S,styleDefault:J}=useInterval(f,{times:u,scrollArea:e,parsedStart:V,parsedEnd:z,maxDays:l,size:c,headerColumnRef:H}),x=useMove(f,{parsedView:o,parsedValue:b,direction:i,maxDays:l,times:u,emittedValue:T,emit:g}).move,M=useMouseEvents(g,w).getDefaultMouseEventHandlers,ee=useCheckChange(g,{days:I,lastStart:U,lastEnd:L}).checkChange,N=useEventUtils().isKeyCode,te=useNavigation(f,{rootRef:m,focusRef:v,focusValue:a,datesRef:p,parsedView:o,emittedValue:T,direction:i,times:u}).tryFocus,C=vue.computed(()=>{const e=parseInt(String(f.columnCount),10);return"day"===o.value&&e>1?e:"day"===o.value&&f.maxDays&&f.maxDays>1?f.maxDays:I.value.length}),ae=vue.computed(()=>{return m.value?parseInt(window.getComputedStyle(m.value).getPropertyValue("--calendar-resources-width"),10):0}),E=vue.computed(()=>{const e=parseInt(String(f.resourceHeight),10);return 0===e?"auto":e}),ne=vue.computed(()=>{return parseInt(String(f.resourceMinHeight),10)}),F=vue.computed(()=>{if(m.value){const e=c.width||m.value.getBoundingClientRect().width;if(e&&ae.value&&C.value)return(e-Q.value-ae.value)/C.value+"px"}return 100/C.value+"%"});function re(){T.value=today()}function oe(e=1){x(e)}function ue(e=1){x(-e)}function ie({width:e,height:t}){c.width=e,c.height=t}function A(e){return e.date===T.value}function de(){return vue.h("div",{roll:"presentation",class:{"q-calendar-scheduler__head":!0,"q-calendar__sticky":!0===k.value},style:{marginRight:Q.value+"px"}},[se(),le()])}function se(){const e=h["head-resources"],t={days:I.value,timestamps:I.value,date:f.modelValue,resources:f.modelResources};return vue.h("div",{class:{"q-calendar-scheduler__head--resources":!0,"q-calendar__sticky":!0===k.value},...M("-head-resources",e=>{return{scope:t,event:e}})},[e&&e({scope:t})])}function le(){return vue.h("div",{ref:H,class:{"q-calendar-scheduler__head--days__column":!0}},[ce(),me()])}function ce(){return vue.h("div",{class:{"q-calendar-scheduler__head--days__weekdays":!0}},[...ve()])}function me(){const e=h["head-days-events"];return vue.nextTick(()=>{if(r.value&&0===parseInt(String(f.columnCount),10)&&window)try{const e=window.getComputedStyle(r.value);n.value&&n.value.parentElement&&(n.value.parentElement.style.height=e.height,n.value.style.height=e.height)}catch{}}),vue.h("div",{class:{"q-calendar-scheduler__head--days__event":!0}},[e&&vue.h("div",{ref:n,style:{position:"absolute",left:0,top:0,right:0,overflow:"hidden",zIndex:1}},[e({scope:{timestamps:I.value,days:I.value,ref:r}})]),...pe()])}function ve(){const e=parseInt(String(f.columnCount),10),a=parseInt(String(f.columnIndexStart),10);return 1===I.value.length&&e>0?Array.apply(null,new Array(e)).map((e,t)=>t+a).map(e=>ye(I.value[0],e)):I.value.map(e=>ye(e,0))}function pe(){const e=parseInt(String(f.columnCount),10),a=parseInt(String(f.columnIndexStart),10);return 1===I.value.length&&e>0?Array.apply(null,new Array(e)).map((e,t)=>t+a).map(e=>he(I.value[0],e)):I.value.map(e=>he(e,0))}function ye(t,e){const a=h["head-day"],n=h["head-date"],r=!0!==f.noActiveDate&&A(t),o={timestamp:t,activeDate:r,droppable:y.value===t.date,disabled:!!f.disabledWeekdays&&f.disabledWeekdays.includes(Number(t.weekday)),columnIndex:e??0},u=!0===k.value?convertToUnit(S.value):F.value,i=f.weekdayStyle||X,d={width:u,maxWidth:u,minWidth:u,...i({scope:o})},s=(!0===k.value&&(d.minWidth=u),"function"===typeof f.weekdayClass?f.weekdayClass({scope:o}):{}),l=!0===f.focusable&&f.focusType.includes("weekday"),c=t.date+(void 0!==e?"-"+e:""),m={key:c,ref:e=>{null!==e&&(p.value[c]=e)},tabindex:!0===l?0:-1,class:{"q-calendar-scheduler__head--day":!0,...s,..._(t),"q-active-date":r,"q-calendar__hoverable":!0===f.hoverable,"q-calendar__focusable":!0===l},style:d,onFocus:()=>{!0===l&&(v.value=c)},onKeydown:e=>{!0!==t.disabled&&N(e,[13,32])&&(e.stopPropagation(),e.preventDefault())},onKeyup:e=>{!0!==t.disabled&&N(e,[13,32])&&(T.value=t.date)},...M("-head-day",e=>{return{scope:o,event:e}}),onDragenter:e=>{void 0!==f.dragEnterFunc&&"function"===typeof f.dragEnterFunc&&(!0===f.dragEnterFunc(e,"head-day",{scope:o})?y.value=t.date:y.value="")},onDragover:e=>{void 0!==f.dragOverFunc&&"function"===typeof f.dragOverFunc&&(!0===f.dragOverFunc(e,"head-day",{scope:o})?y.value=t.date:y.value="")},onDragleave:e=>{void 0!==f.dragLeaveFunc&&"function"===typeof f.dragLeaveFunc&&(!0===f.dragLeaveFunc(e,"head-day",{scope:o})?y.value=t.date:y.value="")},onDrop:e=>{void 0!==f.dropFunc&&"function"===typeof f.dropFunc&&(!0===f.dropFunc(e,"head-day",{scope:o})?y.value=t.date:y.value="")}};return vue.h("div",m,[void 0!==a&&a({scope:o}),void 0===a&&De(t,e),void 0===a&&fe(t),void 0===a&&n&&n({scope:o}),void 0===a&&we(t,e),useFocusHelper()])}function fe(e){return"stacked"===f.dateHeader?[!0!==f.noDefaultHeaderText?O(e):[],!0!==f.noDefaultHeaderBtn?W(e):[]].flat():"inline"===f.dateHeader?("left"===f.weekdayAlign&&"right"===f.dateAlign||"right"===f.weekdayAlign&&f.dateAlign,vue.h("div",{class:"q-calendar__header--inline"},[!0!==f.noDefaultHeaderText&&O(e),!0!==f.noDefaultHeaderBtn&&W(e)])):"inverted"===f.dateHeader?("left"===f.weekdayAlign&&"right"===f.dateAlign||"right"===f.weekdayAlign&&f.dateAlign,vue.h("div",{class:"q-calendar__header--inline"},[!0!==f.noDefaultHeaderBtn&&W(e),!0!==f.noDefaultHeaderText&&O(e)])):void 0}function he(e,t){const a=h["head-day-event"],n=!0!==f.noActiveDate&&A(e),r={timestamp:e,activeDate:n,droppable:y.value===e.date,disabled:!!f.disabledWeekdays&&f.disabledWeekdays.includes(Number(e.weekday)),columnIndex:t??0},o=!0===k.value?convertToUnit(S.value):F.value,u={width:o,maxWidth:o,minWidth:o};return!0===k.value&&(u.minWidth=o),vue.h("div",{key:"event-"+e.date+(void 0!==t?"-"+t:""),class:{"q-calendar-scheduler__head--day__event":!0,..._(e),"q-active-date":n},style:u},[a&&a({scope:r})])}function O(e){const t=h["head-weekday-label"],a=!0===f.shortWeekdayLabel,n={timestamp:e,shortWeekdayLabel:a},r={class:{"q-calendar-scheduler__head--weekday":!0,["q-calendar__"+f.weekdayAlign]:!0,"q-calendar__ellipsis":!0}};return vue.h("div",r,t&&t({scope:n})||ge(e,a))}function ge(e,t){const a=Z.value(e,t||f.weekdayBreakpoints[0]>0&&S.value<=f.weekdayBreakpoints[0]);return vue.h("span",{class:"q-calendar-scheduler__head--weekday-label q-calendar__ellipsis"},f.weekdayBreakpoints[1]>0&&S.value<=f.weekdayBreakpoints[1]?minCharWidth(a,Number(f.minWeekdayLabel)):a)}function W(e){const t={class:{"q-calendar-scheduler__head--date":!0,["q-calendar__"+f.dateAlign]:!0}};return vue.h("div",t,Te(e))}function Te(a){const e=!0!==f.noActiveDate&&A(a),t=K.value(a,!1),n=h["head-day-label"],r=h["head-day-button"],o={dayLabel:t,timestamp:a,activeDate:e},u={class:{"q-calendar-scheduler__head--day__label":!0,"q-calendar__button":!0,"q-calendar__button--round":"round"===f.dateType,"q-calendar__button--rounded":"rounded"===f.dateType,"q-calendar__button--bordered":!0===a.current,"q-calendar__focusable":!0},disabled:a.disabled,onKeydown:e=>{!0!==a.disabled&&N(e,[13,32])&&(e.stopPropagation(),e.preventDefault())},onKeyup:e=>{!0!==a.disabled&&N(e,[13,32])&&(T.value=a.date,void 0!==w.value.onClickDate)&&g("click-date",{scope:o})},...M("-date",(e,t)=>{return"click-date"!==t&&"contextmenu-date"!==t||(T.value=a.date,"click-date"===t&&e.preventDefault()),{scope:o,event:e}})};return!0!==f.noAria&&(u.ariaLabel=$.value(a,!1)),r?vue.h("div",[r({scope:o})]):renderButton(f,u,n?n({scope:o}):t)}function De(e,t){const a=h["column-header-before"];if(a){const n={timestamp:e,columnIndex:t};return vue.h("div",{class:"q-calendar-scheduler__column-header--before"},[a({scope:n})])}}function we(e,t){const a=h["column-header-after"];if(a){const n={timestamp:e,columnIndex:t};return vue.h("div",{class:"q-calendar-scheduler__column-header--after"},[a({scope:n})])}}function ke(){return vue.h("div",{class:"q-calendar-scheduler__body"},[_e()])}function _e(){return!0===k.value?vue.h("div",{ref:e,class:{"q-calendar-scheduler__scroll-area":!0,"q-calendar__scroll":!0}},[!0!==k.value&&Ne(),Ie()]):!0===f.noScroll?be():vue.h("div",{ref:e,class:{"q-calendar-scheduler__scroll-area":!0,"q-calendar__scroll":!0}},[be()])}function be(){return vue.h("div",{ref:t,class:"q-calendar-scheduler__pane"},[Ie()])}function Ie(){return vue.h("div",{class:"q-calendar-scheduler__day--container"},[!0===k.value&&!0!==f.noHeader&&de(),Se()])}function Se(e=void 0,a=0,n=!0){return void 0===e&&(e=f.modelResources),e.map((e,t)=>{return xe(e,t,a,void 0!==e.children?e.expanded:n)}).flat()}function xe(e,t,a=0,n=!0){const r={},o=(r.height=void 0!==e.height?convertToUnit(parseInt(e.height,10)):E.value?convertToUnit(E.value):"auto",ne.value>0&&(r.minHeight=convertToUnit(ne.value)),vue.h("div",{key:e[f.resourceKey]+"-"+t,class:{"q-calendar-scheduler__resource--row":!0},style:r},[Me(e,t,a,n),Ne(e,t,a,n)]));return void 0!==e.children?[o,vue.h("div",{class:{"q-calendar__child":!0,"q-calendar__child--expanded":!0===n,"q-calendar__child--collapsed":!0!==n}},[Se(e.children,a+1,!1===n?n:e.expanded)])]:[o]}function Me(t,e,a=0,n=!0){const r=h["resource-label"],o=parseInt(String(f.resourceMinHeight),10),u={},i=(u.height=void 0!==t.height?convertToUnit(parseInt(t.height,10)):E.value?convertToUnit(E.value):"auto",o>0&&(u.minHeight=convertToUnit(o)),f.resourceStyle||J),d=t[f.resourceLabel],s=!0===f.focusable&&f.focusType.includes("resource")&&!0===n,l=t[f.resourceKey],c={resource:t,timestamps:I.value,days:I.value,resourceIndex:e,indentLevel:a,label:d,droppable:D.value===l},m="function"===typeof f.resourceClass?f.resourceClass({scope:c}):{};return vue.h("div",{key:t[f.resourceKey]+"-"+e,ref:e=>{null!==e&&(q.value[t[f.resourceKey]]=e)},tabindex:!0===s?0:-1,class:{"q-calendar-scheduler__resource":0===a,"q-calendar-scheduler__resource--section":0!==a,...m,"q-calendar__sticky":!0===k.value,"q-calendar__hoverable":!0===f.hoverable,"q-calendar__focusable":!0===s},style:{...u,...i({scope:c})},onDragenter:e=>{void 0!==f.dragEnterFunc&&"function"===typeof f.dragEnterFunc&&(!0===f.dragEnterFunc(e,"resource",{scope:c})?D.value=l:D.value="")},onDragover:e=>{void 0!==f.dragOverFunc&&"function"===typeof f.dragOverFunc&&(!0===f.dragOverFunc(e,"resource",{scope:c})?D.value=l:D.value="")},onDragleave:e=>{void 0!==f.dragLeaveFunc&&"function"===typeof f.dragLeaveFunc&&(!0===f.dragLeaveFunc(e,"resource",{scope:c})?D.value=l:D.value="")},onDrop:e=>{void 0!==f.dropFunc&&"function"===typeof f.dropFunc&&(!0===f.dropFunc(e,"resource",{scope:c})?D.value=l:D.value="")},onKeydown:e=>{N(e,[13,32])&&(e.stopPropagation(),e.preventDefault())},onKeyup:e=>{N(e,[13,32])&&void 0!==w.value.onClickResource&&g("click-resource",{scope:c,event:e})},...M("-resource",e=>{return{scope:c,event:e}})},[[vue.h("div",{class:{"q-calendar__parent":void 0!==t.children,"q-calendar__parent--expanded":void 0!==t.children&&!0===t.expanded,"q-calendar__parent--collapsed":void 0!==t.children&&!0!==t.expanded},onClick:e=>{e.stopPropagation(),t.expanded=!t.expanded,g("resource-expanded",{expanded:t.expanded,scope:c})}}),vue.h("div",{class:{"q-calendar-scheduler__resource--text":!0,"q-calendar__ellipsis":!0},style:{paddingLeft:10*a+2+"px"}},[r?r({scope:c}):d]),useFocusHelper()]])}function Ne(e,t,a=0,n=!0){const r=h["resource-days"],o=!0===k.value?convertToUnit(S.value):F.value,u={resource:e,resourceIndex:t,indentLevel:a,expanded:n,cellWidth:o,timestamps:I.value,days:I.value},i={},d=(i.height=parseInt(String(f.resourceHeight),10)>0?convertToUnit(parseInt(String(f.resourceHeight),10)):"auto",parseInt(String(f.resourceMinHeight),10)>0&&(i.minHeight=convertToUnit(parseInt(String(f.resourceMinHeight),10))),{class:"q-calendar-scheduler__resource--days",style:i});return vue.h("div",d,[...Ce(e,t,a,n),r&&r({scope:u})])}function Ce(t,a,n=0,r=!0){return 1===I.value.length&&parseInt(String(f.columnCount),10)>0?Array.apply(null,new Array(parseInt(String(f.columnCount),10))).map((e,t)=>t+parseInt(String(f.columnIndexStart),10)).map(e=>Ee(I.value[0],e,t,a,n,r)):I.value.map(e=>Ee(e,0,t,a,n,r))}function Ee(e,t,a,n,r=0,o=!0){const u=h.day,i=f.dayStyle||X,d=!0!==f.noActiveDate&&b.value.date===e.date,s=e.date+":"+a[f.resourceKey]+(void 0!==t?":"+t:""),l=D.value===s,c={timestamp:e,columnIndex:t,resource:a,resourceIndex:n,indentLevel:r,activeDate:d,droppable:l},m=!0===k.value?convertToUnit(S.value):F.value,v={width:m,maxWidth:m,...i({scope:c})},p=(v.height=parseInt(String(f.resourceHeight),10)>0?convertToUnit(parseInt(String(f.resourceHeight),10)):"auto",parseInt(String(f.resourceMinHeight),10)>0&&(v.minHeight=convertToUnit(parseInt(String(f.resourceMinHeight),10))),"function"===typeof f.dayClass?f.dayClass({scope:c}):{}),y=!0===f.focusable&&f.focusType.includes("day")&&!0===o;return vue.h("div",{key:e.date+(void 0!==t?":"+t:""),tabindex:!0===y?0:-1,class:{"q-calendar-scheduler__day":0===r,"q-calendar-scheduler__day--section":0!==r,...p,..._(e),"q-calendar__hoverable":!0===f.hoverable,"q-calendar__focusable":!0===y},style:v,onDragenter:e=>{void 0!==f.dragEnterFunc&&"function"===typeof f.dragEnterFunc&&(!0===f.dragEnterFunc(e,"day",{scope:c})?D.value=s:D.value="")},onDragover:e=>{void 0!==f.dragOverFunc&&"function"===typeof f.dragOverFunc&&(!0===f.dragOverFunc(e,"day",{scope:c})?D.value=s:D.value="")},onDragleave:e=>{void 0!==f.dragLeaveFunc&&"function"===typeof f.dragLeaveFunc&&(!0===f.dragLeaveFunc(e,"day",{scope:c})?D.value=s:D.value="")},onDrop:e=>{void 0!==f.dropFunc&&"function"===typeof f.dropFunc&&(!0===f.dropFunc(e,"day",{scope:c})?D.value=s:D.value="")},onKeydown:e=>{N(e,[13,32])&&(e.stopPropagation(),e.preventDefault())},onKeyup:e=>{N(e,[13,32])&&(T.value=c.timestamp.date,void 0!==w.value.onClickResource)&&g("click-resource",{scope:c,event:e})},...M("-day-resource",e=>{return{scope:c,event:e}})},[u&&u({scope:c}),useFocusHelper()])}function Fe(){return vue.h("div",{},"No resources have been defined")}function Ae(){const{start:e,end:t,maxDays:a}=j.value,n=(d.value===e.date&&s.value===t.date&&l.value===a||(d.value=e.date,s.value=t.date,l.value=a),c.width>0),r=f.modelResources&&f.modelResources.length>0,o=vue.withDirectives(vue.h("div",{key:d.value,class:"q-calendar-scheduler"},[!0===n&&!0===r&&!0!==k.value&&!0!==f.noHeader&&de(),!0===n&&!0===r&&ke(),!1===r&&Fe()]),[[ResizeObserverDirective,ie]]);if(!0!==f.animated)return o;{const u="q-calendar--"+("prev"===i.value?f.transitionPrev:f.transitionNext);return vue.h(vue.Transition,{name:u,appear:!0},()=>o)}}return vue.watch([I],ee,{deep:!0,immediate:!0}),vue.watch(()=>f.modelValue,(e,t)=>{if(T.value!==f.modelValue){if(!0===f.animated){const a=getDayIdentifier(parsed(e)),n=getDayIdentifier(parsed(t));i.value=a>=n?"next":"prev"}T.value=e}v.value=e}),vue.watch(T,(e,t)=>{if(T.value!==f.modelValue){if(!0===f.animated){const a=getDayIdentifier(parsed(e)),n=getDayIdentifier(parsed(t));i.value=a>=n?"next":"prev"}g("update:model-value",e)}}),vue.watch(v,e=>{e&&(a.value=parseTimestamp(e))}),vue.watch(a,()=>{p.value[v.value]?p.value[v.value].focus():te()}),vue.watch(()=>f.maxDays,e=>{l.value=e}),vue.onBeforeUpdate(()=>{p.value={},n.value=void 0,r.value=void 0,q.value={}}),vue.onMounted(()=>{}),R({prev:ue,next:oe,move:x,moveToToday:re,updateCurrent:Y}),()=>G()}});const version="4.1.0";exports.DAYS_IN_MONTH=DAYS_IN_MONTH,exports.DAYS_IN_MONTH_LEAP=DAYS_IN_MONTH_LEAP,exports.DAYS_IN_MONTH_MAX=DAYS_IN_MONTH_MAX,exports.DAYS_IN_MONTH_MIN=DAYS_IN_MONTH_MIN,exports.DAY_MIN=DAY_MIN,exports.FIRST_HOUR=FIRST_HOUR,exports.MONTH_MAX=MONTH_MAX,exports.MONTH_MIN=MONTH_MIN,exports.PARSE_DATE=PARSE_DATE,exports.PARSE_DATETIME=PARSE_DATETIME,exports.PARSE_TIME=PARSE_TIME,exports.QCalendarScheduler=QCalendarScheduler,exports.TIME_CONSTANTS=TIME_CONSTANTS,exports.addToDate=addToDate,exports.compareDate=compareDate,exports.compareDateTime=compareDateTime,exports.compareTime=compareTime,exports.compareTimestamps=compareTimestamps,exports.convertToUnit=convertToUnit,exports.copyTimestamp=copyTimestamp,exports.createDayList=createDayList,exports.createIntervalList=createIntervalList,exports.createNativeLocaleFormatter=createNativeLocaleFormatter,exports.daysBetween=daysBetween,exports.daysInMonth=daysInMonth,exports.diffTimestamp=diffTimestamp,exports.findWeekday=findWeekday,exports.getDate=getDate,exports.getDateTime=getDateTime,exports.getDayIdentifier=getDayIdentifier,exports.getDayOfYear=getDayOfYear,exports.getDayTimeIdentifier=getDayTimeIdentifier,exports.getEndOfMonth=getEndOfMonth,exports.getEndOfWeek=getEndOfWeek,exports.getMonthFormatter=getMonthFormatter,exports.getMonthNames=getMonthNames,exports.getStartOfMonth=getStartOfMonth,exports.getStartOfWeek=getStartOfWeek,exports.getTime=getTime,exports.getTimeIdentifier=getTimeIdentifier,exports.getWeekday=getWeekday,exports.getWeekdayFormatter=getWeekdayFormatter,exports.getWeekdayNames=getWeekdayNames,exports.getWorkWeek=getWorkWeek,exports.indexOf=indexOf,exports.isBetweenDates=isBetweenDates,exports.isLeapYear=isLeapYear,exports.isOverlappingDates=isOverlappingDates,exports.isToday=isToday,exports.makeDate=makeDate,exports.makeDateTime=makeDateTime,exports.maxTimestamp=maxTimestamp,exports.minCharWidth=minCharWidth,exports.minTimestamp=minTimestamp,exports.moveRelativeDays=moveRelativeDays,exports.nextDay=nextDay,exports.padNumber=padNumber,exports.parseDate=parseDate,exports.parseTime=parseTime,exports.parseTimestamp=parseTimestamp,exports.parsed=parsed,exports.prevDay=prevDay,exports.relativeDays=relativeDays,exports.today=today,exports.updateDayOfYear=updateDayOfYear,exports.updateDisabled=updateDisabled,exports.updateFormatted=updateFormatted,exports.updateMinutes=updateMinutes,exports.updateRelative=updateRelative,exports.updateWeekday=updateWeekday,exports.updateWorkWeek=updateWorkWeek,exports.validateNumber=validateNumber,exports.validateTimestamp=validateTimestamp,exports.version=version,exports.weeksBetween=weeksBetween; | ||
var vue=require("vue");const PARSE_DATETIME=/^(\d{4})-(\d{1,2})(-(\d{1,2}))?([^\d]+(\d{1,2}))?(:(\d{1,2}))?(:(\d{1,2}))?(.(\d{1,3}))?$/,PARSE_DATE=/^(\d{4})-(\d{1,2})(-(\d{1,2}))?/,PARSE_TIME=/(\d\d?)(:(\d\d?)|)(:(\d\d?)|)/,DAYS_IN_MONTH=[0,31,28,31,30,31,30,31,31,30,31,30,31],DAYS_IN_MONTH_LEAP=[0,31,29,31,30,31,30,31,31,30,31,30,31],TIME_CONSTANTS={MILLISECONDS_IN:{DAY:864e5},MINUTES_IN:{HOUR:60},DAYS_IN:{WEEK:7}},DAYS_IN_MONTH_MIN=28,DAYS_IN_MONTH_MAX=31,MONTH_MAX=12,MONTH_MIN=1,DAY_MIN=1,FIRST_HOUR=0;function validateTimestamp(e){return"string"===typeof e&&PARSE_DATETIME.test(e)}function parsed(e){if("string"!==typeof e)return null;const t=PARSE_DATETIME.exec(e);if(!t||!t[1]||!t[2])return null;const a=parseInt(t[1],10),n=parseInt(t[2],10),r=parseInt(t[4]||"1",10),o=parseInt(t[6]||"0",10),u=parseInt(t[8]||"0",10);return{date:e,time:o.toString().padStart(2,"0")+":"+u.toString().padStart(2,"0"),year:a,month:n,day:r,hour:o,minute:u,hasDay:!!t[4],hasTime:!0,past:!1,current:!1,future:!1,disabled:!1,weekday:0,doy:0,workweek:0}}function parseDate(e,t=!1){if(!(e instanceof Date))return null;const a=t?"UTC":"";return updateFormatted({date:padNumber(e[`get${a}FullYear`](),4)+"-"+padNumber(e[`get${a}Month`]()+1,2)+"-"+padNumber(e[`get${a}Date`](),2),time:padNumber(e[`get${a}Hours`]()||0,2)+":"+padNumber(e[`get${a}Minutes`]()||0,2),year:e[`get${a}FullYear`](),month:e[`get${a}Month`]()+1,day:e[`get${a}Date`](),hour:e[`get${a}Hours`](),minute:e[`get${a}Minutes`](),weekday:0,doy:0,workweek:0,hasDay:!0,hasTime:!0,past:!1,current:!1,future:!1,disabled:!1})}function padNumber(e,t){let a=String(e);while(a.length<t)a="0"+a;return a}function isLeapYear(e){return e%4===0&&e%100!==0||e%400===0}function daysInMonth(e,t){return(isLeapYear(e)?DAYS_IN_MONTH_LEAP:DAYS_IN_MONTH)[t]}function nextDay(e){const t=new Date(e.year,e.month-1,e.day+1);return updateFormatted(normalizeTimestamp({...e,year:t.getFullYear(),month:t.getMonth()+1,day:t.getDate()}))}function prevDay(e){const t=new Date(e.year,e.month-1,e.day-1);return updateFormatted(normalizeTimestamp({...e,year:t.getFullYear(),month:t.getMonth()+1,day:t.getDate()}))}function today(){const e=new Date,t=e.getMonth()+1,a=e.getDate(),n=e.getFullYear();return[n,padNumber(t,2),padNumber(a,2)].join("-")}function isToday(e){return e===today()}function getStartOfWeek(e,t,a){let n=copyTimestamp(e);if(t){if(1===n.day||0===n.weekday)while(!t.includes(Number(n.weekday)))n=nextDay(n);n=findWeekday(n,t[0],prevDay),n=updateFormatted(n),a&&(n=updateRelative(n,a,n.hasTime))}return n}function getEndOfWeek(e,t,a){let n=copyTimestamp(e);if(t&&Array.isArray(t)){const r=daysInMonth(n.year,n.month);if(r===n.day||n.weekday===t[t.length-1])while(!t.includes(Number(n.weekday)))n=prevDay(n);n=findWeekday(n,t[t.length-1],nextDay),n=updateFormatted(n),a&&(n=updateRelative(n,a,n.hasTime))}return n}function getStartOfMonth(e){let t=copyTimestamp(e);return t.day=DAY_MIN,t=updateFormatted(t),t}function getEndOfMonth(e){let t=copyTimestamp(e);return t.day=daysInMonth(t.year,t.month),t=updateFormatted(t),t}function parseTime(e){const t=Object.prototype.toString.call(e);switch(t){case"[object Number]":return e;case"[object String]":{const a=PARSE_TIME.exec(e);return a?60*parseInt(a[1],10)+parseInt(a[3]||"0",10):!1}case"[object Object]":return"object"!==typeof e||"number"!==typeof e.hour||"number"!==typeof e.minute?!1:"object"===typeof e&&"hour"in e&&"minute"in e&&60*e.hour+e.minute}return!1}function compareTimestamps(e,t){return!(!e||!t)&&e.year===t.year&&e.month===t.month&&e.day===t.day&&e.hour===t.hour&&e.minute===t.minute}function compareDate(e,t){return getDate(e)===getDate(t)}function compareTime(e,t){return getTime(e)===getTime(t)}function compareDateTime(e,t){return getDateTime(e)===getDateTime(t)}function parseTimestamp(e,t=null){let a=parsed(e);return a?(a=updateFormatted(a),t&&(a=updateRelative(a,t,a.hasTime)),a):null}function getDayIdentifier(e){return 1e8*(e.year??0)+1e6*(e.month??0)+1e4*(e.day??0)}function getTimeIdentifier(e){return 100*(e.hour??0)+(e.minute??0)}function getDayTimeIdentifier(e){return getDayIdentifier(e)+getTimeIdentifier(e)}function diffTimestamp(e,t,a=!1){const n=Date.UTC(e.year??0,(e.month??1)-1,e.day??1,e.hour??0,e.minute??0),r=Date.UTC(t.year??0,(t.month??1)-1,t.day??1,t.hour??0,t.minute??0);return!0===a&&r<n?0:r-n}function updateRelative(e,t,a=!1){let n=copyTimestamp(e),r=getDayIdentifier(t),o=getDayIdentifier(n),u=r===o;return n.hasTime&&a&&u&&(r=getTimeIdentifier(t),o=getTimeIdentifier(n),u=r===o),n.past=o<r,n.current=u,n.future=o>r,n.currentWeekday=n.weekday===t.weekday,n}function updateMinutes(e,t,a=null){let n=copyTimestamp(e);return n.hasTime=!0,n.hour=Math.floor(t/TIME_CONSTANTS.MINUTES_IN.HOUR),n.minute=t%TIME_CONSTANTS.MINUTES_IN.HOUR,n.time=getTime(n),a&&(n=updateRelative(n,a,!0)),n}function updateWeekday(e){let t=copyTimestamp(e);return t.weekday=getWeekday(t),t}function updateDayOfYear(e){let t=copyTimestamp(e);return t.doy=getDayOfYear(t)||0,t}function updateWorkWeek(e){let t=copyTimestamp(e);return t.workweek=getWorkWeek(t),t}function updateDisabled(e,t,a,n,r){let o=copyTimestamp(e);const u=getDayIdentifier(o);if(void 0!==t){const l=parsed(t);if(l){const c=getDayIdentifier(l);u<=c&&(o.disabled=!0)}}if(!0!==o.disabled&&void 0!==a){const m=parsed(a);if(m){const v=getDayIdentifier(m);u>=v&&(o.disabled=!0)}}if(!0!==o.disabled&&Array.isArray(n)&&n.length>0)for(var i in n)if(n[i]===o.weekday){o.disabled=!0;break}if(!0!==o.disabled&&Array.isArray(r)&&r.length>0)for(var d in r)if(Array.isArray(r[d])&&2===r[d].length&&r[d][0]&&r[d][1]){const p=parsed(r[d][0]),y=parsed(r[d][1]);if(p&&y&&isBetweenDates(o,p,y)){o.disabled=!0;break}}else{const f=r[d];if(Array.isArray(f))for(var s of f){const h=parseTimestamp(s);if(h){const g=getDayIdentifier(h);if(g===u){o.disabled=!0;break}}}else if(f){const T=parseTimestamp(f);if(T){const D=getDayIdentifier(T);D===u&&(o.disabled=!0)}}}return o}function updateFormatted(e){let t=copyTimestamp(e);return t.hasTime=!0,t.time=getTime(t),t.date=getDate(t),t.weekday=getWeekday(t),t.doy=getDayOfYear(t)||0,t.workweek=getWorkWeek(t),t}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){let t=copyTimestamp(e);if(0===t.year){const r=parseTimestamp(today());r&&(t=r)}const a=new Date(Date.UTC(t.year,t.month-1,t.day)),n=4;a.setUTCDate(a.getUTCDate()-(a.getUTCDay()+6)%7+n),a.setUTCDate(a.getUTCDate()+n-(a.getUTCDay()||7));e=new Date(Date.UTC(a.getUTCFullYear(),0,1)),e=Math.ceil(((a.valueOf()-e.valueOf())/864e5+1)/7);return e}function getWeekday(e){let t=e.weekday;if(e.hasDay){const a=Math.floor,n=e.day,r=(e.month+9)%MONTH_MAX+1,o=a(e.year/100),u=e.year%100-(e.month<=2?1:0);t=((n+a(2.6*r-.2)-2*o+u+a(u/4)+a(o/4))%7+7)%7}return t??0}function copyTimestamp(e){return{...e}}function getDate(e){let 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):"00:00")}function moveRelativeDays(e,t=nextDay,a=1,n=[0,1,2,3,4,5,6]){const r=copyTimestamp(e);return relativeDays(r,t,a,n)}function relativeDays(e,t=nextDay,a=1,n=[0,1,2,3,4,5,6]){let r=copyTimestamp(e);n.includes(Number(r.weekday))||0!==r.weekday||t!==nextDay||++a;while(--a>=0)r=t(r),n.length<7&&!n.includes(Number(r.weekday))&&++a;return r}function findWeekday(e,t,a=nextDay,n=6){let r=copyTimestamp(e);while(r.weekday!==t&&--n>=0)r=a(r);return r}function createDayList(e,t,a,n=[0,1,2,3,4,5,6],r=void 0,o=void 0,u=[],i=[],d=42,s=0){const l=getDayIdentifier(e),c=getDayIdentifier(t),m=[];let v=copyTimestamp(e),p=0,y=p===c;if(!(c<l))while((!y||m.length<s)&&m.length<d){if(p=getDayIdentifier(v),y=y||p>c&&m.length>=s,y)break;if(n.includes(Number(v.weekday))){let e=copyTimestamp(v);e=updateFormatted(e),e=updateRelative(e,a),e=updateDisabled(e,r,o,u,i),m.push(e)}v=relativeDays(v,nextDay)}return m}function createIntervalList(t,a,n,r,o){const u=[];for(let e=0;e<r;++e){const i=(a+e)*n,d=copyTimestamp(t);u.push(updateMinutes(d,i,o))}return u}function createNativeLocaleFormatter(n,r){const e=()=>"";return"undefined"===typeof Intl||"undefined"===typeof Intl.DateTimeFormat?e:(t,e)=>{try{const a=new Intl.DateTimeFormat(n||void 0,r(t,e));return a.format(makeDateTime(t))}catch(e){return console.error(`Intl.DateTimeFormat: ${e.message} -> `+getDateTime(t)),""}}}function makeDate(e,t=!0){return t?new Date(Date.UTC(e.year,e.month-1,e.day,0,0)):new Date(e.year,e.month-1,e.day,0,0)}function makeDateTime(e,t=!0){return t?new Date(Date.UTC(e.year,e.month-1,e.day,e.hour,e.minute)):new Date(e.year,e.month-1,e.day,e.hour,e.minute)}function validateNumber(e){return isFinite(Number(e))}function maxTimestamp(e,t=!1){const a=!0===t?getDayTimeIdentifier:getDayIdentifier;return e.reduce((e,t)=>{return Math.max(a(e),a(t))===a(e)?e:t})}function minTimestamp(e,t=!1){const a=!0===t?getDayTimeIdentifier:getDayIdentifier;return e.reduce((e,t)=>{return Math.min(a(e),a(t))===a(e)?e:t})}function isBetweenDates(e,t,a,n=!1){const r=getDayIdentifier(e)+(!0===n?getTimeIdentifier(e):0),o=getDayIdentifier(t)+(!0===n?getTimeIdentifier(t):0),u=getDayIdentifier(a)+(!0===n?getTimeIdentifier(a):0);return r>=o&&r<=u}function isOverlappingDates(e,t,a,n){const r=getDayIdentifier(e),o=getDayIdentifier(t),u=getDayIdentifier(a),i=getDayIdentifier(n);return r>=u&&r<=i||o>=u&&o<=i||u>=r&&o>=i}function addToDate(e,t){const a=copyTimestamp(e);return t.year&&(a.year+=t.year),t.month&&(a.month+=t.month),t.day&&(a.day+=t.day),t.hour&&(a.hour+=t.hour),t.minute&&(a.minute+=t.minute),updateFormatted(normalizeTimestamp(a))}function normalizeTimestamp(e){const t=new Date(e.year,e.month-1,e.day,e.hour,e.minute);return{...e,year:t.getFullYear(),month:t.getMonth()+1,day:t.getDate(),hour:t.getHours(),minute:t.getMinutes()}}function daysBetween(e,t){const a=diffTimestamp(e,t,!0);return Math.floor(a/TIME_CONSTANTS.MILLISECONDS_IN.DAY)}function weeksBetween(e,t){let a=copyTimestamp(e),n=copyTimestamp(t);return a=findWeekday(a,0),n=findWeekday(n,6),Math.ceil(daysBetween(a,n)/TIME_CONSTANTS.DAYS_IN.WEEK)}const weekdayDateMap={Sun:new Date("2020-01-05T00:00:00.000Z"),Mon:new Date("2020-01-06T00:00:00.000Z"),Tue:new Date("2020-01-07T00:00:00.000Z"),Wed:new Date("2020-01-08T00:00:00.000Z"),Thu:new Date("2020-01-09T00:00:00.000Z"),Fri:new Date("2020-01-10T00:00:00.000Z"),Sat:new Date("2020-01-11T00:00:00.000Z")};function getWeekdayFormatter(){const e=()=>"",r={long:{timeZone:"UTC",weekday:"long"},short:{timeZone:"UTC",weekday:"short"},narrow:{timeZone:"UTC",weekday:"narrow"}};return"undefined"===typeof Intl||"undefined"===typeof Intl.DateTimeFormat?e:t;function t(t,e,a){try{const n=new Intl.DateTimeFormat(a||void 0,r[e]||r["long"]);return n.format(weekdayDateMap[t])}catch(e){return e instanceof Error&&console.error(`Intl.DateTimeFormat: ${e.message} -> day of week: `+t),""}}}function getWeekdayNames(t,a){const e=Object.keys(weekdayDateMap),n=getWeekdayFormatter();return e.map(e=>String(n(e,t,a)))}function getMonthFormatter(){const e=()=>"",o={long:{timeZone:"UTC",month:"long"},short:{timeZone:"UTC",month:"short"},narrow:{timeZone:"UTC",month:"narrow"}};return"undefined"===typeof Intl||"undefined"===typeof Intl.DateTimeFormat?e:t;function t(t,e,a){try{const n=new Intl.DateTimeFormat(a||void 0,o[e]||o["long"]),r=new Date;return r.setDate(1),r.setMonth(t),n.format(r)}catch(e){return e instanceof Error&&console.error(`Intl.DateTimeFormat: ${e.message} -> month: `+t),""}}}function getMonthNames(t,a){const n=getMonthFormatter();return[...Array(12).keys()].map(e=>n(e,t,a))}function convertToUnit(e,t="px"){if(e)return isNaN(e)?String(e):"auto"===e?e:""+Number(e)+t}function indexOf(t,a){for(let e=0;e<t.length;e++)if(!0===a(t[e],e))return e;return-1}function minCharWidth(e,t){return 0===t?e:e.slice(0,t)}const ResizeObserverDirective={mounted(e,t){if("function"===typeof t.value){const a=t.value,n={callback:a,size:{width:0,height:0},observer:new ResizeObserver(e=>{const t=e[0].contentRect;t.width===n.size.width&&t.height===n.size.height||(n.size.width=t.width,n.size.height=t.height,n.debounceTimeout&&clearTimeout(n.debounceTimeout),n.debounceTimeout=setTimeout(()=>{n.callback(n.size),n.debounceTimeout=void 0},100))})};n.observer.observe(e),e.__onResizeObserver=n}},beforeUnmount(e){if(e.__onResizeObserver){const{observer:t,debounceTimeout:a}=e.__onResizeObserver;a&&clearTimeout(a),t.unobserve(e),delete e.__onResizeObserver}}};function useCalendar(t,a,{scrollArea:e,pane:n}){if(!a){const l="[error: renderCalendar] no renderFunc has been supplied to useCalendar";throw console.error(l),new Error(l)}const r=vue.reactive({width:0,height:0}),o=vue.ref(null);function u({width:e,height:t}){r.width=e,r.height=t}const i=vue.computed(()=>{return!0!==t.noScroll&&e.value&&n.value&&r.height?e.value.offsetWidth-n.value.offsetWidth:0});function d(){}function s(){const e={ref:o,role:"complementary",lang:t.locale,class:`q-calendar ${t.dark?"q-calendar--dark":""} `+(t.bordered?"q-calendar__bordered":"")};return vue.withDirectives(vue.h("div",{...e},[a()]),[[ResizeObserverDirective,u]])}return{rootRef:o,scrollWidth:i,__initCalendar:d,__renderCalendar:s}}const isValidFocusType=e=>e.every(e=>["day","date","weekday","interval","time","resource","task"].includes(e)),useCommonProps={modelValue:{type:String,default:today(),validator:e=>""===e||validateTimestamp(e)},weekdays:{type:Array,default:()=>[0,1,2,3,4,5,6]},dateType:{type:String,default:"round",validator:e=>["round","rounded","square"].includes(e)},weekdayAlign:{type:String,default:"center",validator:e=>["left","center","right"].includes(e)},dateAlign:{type:String,default:"center",validator:e=>["left","center","right"].includes(e)},bordered:Boolean,dark:Boolean,noAria:Boolean,noActiveDate:Boolean,noHeader:Boolean,noScroll:Boolean,shortWeekdayLabel:Boolean,noDefaultHeaderText:Boolean,noDefaultHeaderBtn:Boolean,minWeekdayLabel:{type:[Number,String],default:1},weekdayBreakpoints:{type:Array,default:()=>[75,35],validator:e=>2===e.length},locale:{type:String,default:"en-US"},animated:Boolean,transitionPrev:{type:String,default:"slide-right"},transitionNext:{type:String,default:"slide-left"},disabledDays:Array,disabledBefore:String,disabledAfter:String,disabledWeekdays:{type:Array,default:()=>[]},dragEnterFunc:Function,dragOverFunc:Function,dragLeaveFunc:Function,dropFunc:Function,selectedDates:{type:[Array,Set],default:()=>[]},selectedStartEndDates:{type:Array,default:()=>[]},hoverable:Boolean,focusable:Boolean,focusType:{type:Array,default:()=>["date"],validator:isValidFocusType}};function useCommon(t,{startDate:e,endDate:a,times:n}){const r=vue.computed(()=>parseTimestamp(e.value)),o=vue.computed(()=>{return"0000-00-00"===a.value?getEndOfWeek(r.value,t.weekdays,n.today):parseTimestamp(a.value)||r.value}),u=vue.computed(()=>createNativeLocaleFormatter(t.locale,()=>({timeZone:"UTC",day:"numeric"}))),i=vue.computed(()=>createNativeLocaleFormatter(t.locale,(e,t)=>({timeZone:"UTC",weekday:t?"short":"long"}))),d=vue.computed(()=>createNativeLocaleFormatter(t.locale,()=>({timeZone:"UTC",dateStyle:"full"})));function s(e,t){return e&&e.length>0&&e.includes(t.date)}function l(e,t){const a={firstDay:!1,betweenDays:!1,lastDay:!1};if(2===e.length){const n=getDayIdentifier(t),r=getDayIdentifier(parsed(e[0])),o=getDayIdentifier(parsed(e[1]));a.firstDay=r===n,a.lastDay=o===n,a.betweenDays=r<n&&o>n}return a}function c(e,t=!1,a=[],n=[],r=!1){const o=s(a,e),{firstDay:u,lastDay:i,betweenDays:d}=l(n,e);return{"q-past-day":!u&&!d&&!i&&!o&&!t&&!!e.past,"q-future-day":!u&&!d&&!i&&!o&&!t&&!!e.future,"q-outside":t,"q-current-day":!!e.current,"q-selected":o,"q-range-first":u,"q-range":d,"q-range-last":i,"q-range-hover":r&&(u||i||d),"q-disabled-day disabled":!0===e.disabled}}function m(e){return getStartOfWeek(e,t.weekdays,n.today)}function v(e){return getEndOfWeek(e,t.weekdays,n.today)}function p(){return{}}return{parsedStart:r,parsedEnd:o,dayFormatter:u,weekdayFormatter:i,ariaDateFormatter:d,arrayHasDate:s,checkDays:l,getRelativeClasses:c,startOfWeek:m,endOfWeek:v,dayStyleDefault:p}}function scrollTo(e,t){e instanceof Window?e.scrollTo({top:t,behavior:"instant"}):e.scrollTop=t}function getVerticalScrollPosition(e){return e instanceof Window?e.scrollY:e.scrollTop}function animVerticalScrollTo(o,u,i=500,d=performance.now(),s=getVerticalScrollPosition(o)){i<=0||s===u?scrollTo(o,u):requestAnimationFrame(e=>{const t=e-d,a=Math.min(t/i,1),n=e=>e<.5?2*e*e:(4-2*e)*e-1,r=s+(u-s)*n(a);scrollTo(o,r),a<1&&animVerticalScrollTo(o,u,i,d,s)})}function animHorizontalScrollTo(r,e,o=500){const u=r.scrollLeft,i=e-u;let d=null;function s(e){null===d&&(d=e);const t=e-d,a=Math.min(t/o,1),n=e=>e<.5?2*e*e:(4-2*e)*e-1;r.scrollLeft=u+i*n(a),t<o&&requestAnimationFrame(s)}requestAnimationFrame(s)}const useSchedulerProps={view:{type:String,validator:e=>["day","week","month","month-interval"].includes(e),default:"day"},modelResources:{type:Array},resourceKey:{type:String,default:"id"},resourceLabel:{type:String,default:"label"},resourceHeight:{type:[Number,String],default:0,validator:validateNumber},resourceMinHeight:{type:[Number,String],default:70,validator:validateNumber},resourceStyle:{type:Function,default:null},resourceClass:{type:Function,default:null},weekdayStyle:{type:Function,default:null},weekdayClass:{type:Function,default:null},dayStyle:{type:Function,default:null},dayClass:{type:Function,default:null},dateHeader:{type:String,default:"stacked",validator:e=>["stacked","inline","inverted"].includes(e)}};function useInterval(o,{times:t,scrollArea:n,parsedStart:e,parsedEnd:a,maxDays:r,size:u,headerColumnRef:i}){const d=vue.computed(()=>parseInt(String(o.intervalStart),10)),m=vue.computed(()=>parseInt(String(o.intervalMinutes),10)),s=vue.computed(()=>parseInt(String(o.intervalCount),10)),v=vue.computed(()=>parseFloat(String(o.intervalHeight))),p=vue.computed(()=>{let e=0;const t=Number(o.columnCount);return o.cellWidth?e=Number(o.cellWidth):u.width>0&&i.value&&(e=i.value.offsetWidth/(t>1?t:r.value)),e}),l=vue.computed(()=>d.value*m.value),c=vue.computed(()=>s.value*v.value),y=vue.computed(()=>s.value*p.value),f=vue.computed(()=>D(e.value)),h=vue.computed(()=>w(a.value)),g=vue.computed(()=>{return createDayList(e.value,a.value,t.today,o.weekdays,o.disabledBefore,o.disabledAfter,o.disabledWeekdays,o.disabledDays,r.value)}),T=vue.computed(()=>{return g.value.map(e=>createIntervalList(e,d.value,m.value,s.value,t.now))});function D(e){return getStartOfWeek(e,o.weekdays,t.today)}function w(e){return getEndOfWeek(e,o.weekdays,t.today)}function k(e,t){return e&&e.length>0&&e.includes(getDateTime(t))}function _(e,t){const a={firstDay:!1,betweenDays:!1,lastDay:!1};if(e&&2===e.length){const n=getDayTimeIdentifier(t),r=getDayTimeIdentifier(parsed(e[0])),o=getDayTimeIdentifier(parsed(e[1]));a.firstDay=r===n,a.lastDay=o===n,a.betweenDays=r<n&&o>n}return a}function b(e,t=[],a=[]){const n=k(t,e),{firstDay:r,lastDay:o,betweenDays:u}=_(a,e);return{"q-selected":n,"q-range-first":!0===r,"q-range":!0===u,"q-range-last":!0===o,"q-disabled-interval disabled":!0===e.disabled}}function I(e,t,a){return[]}const S=vue.computed(()=>{const a={timeZone:"UTC",hour12:!o.hour24Format,hour:"2-digit",minute:"2-digit"},n={timeZone:"UTC",hour12:!o.hour24Format,hour:"numeric",minute:"2-digit"},r={timeZone:"UTC",hour12:!o.hour24Format,hour:"numeric"};return createNativeLocaleFormatter(o.locale,(e,t)=>t?0===e.minute?r:n:a)}),x=vue.computed(()=>{const e={timeZone:"UTC",dateStyle:"full",timeStyle:"short"};return createNativeLocaleFormatter(o.locale,()=>e)});function M(e){const t=T.value[0][0],a=t.hour===e.hour&&t.minute===e.minute;return!a&&0===e.minute}function N(e){}function C(e){return{}}function E(e,t,a=!1,n){let r=copyTimestamp(t);if(e.currentTarget){const o=e.currentTarget.getBoundingClientRect(),u=e,i=e,d=u.changedTouches||u.touches,s=(d&&d[0]?d[0]:i).clientY,l=(s-o.top)/v.value,c=Math.floor((a?Math.floor(l):l)*m.value);0!==c&&(r=addToDate(r,{minute:c})),n&&(r=updateRelative(r,n,!0))}return r}function R(e,t,a=!1,n){let r=copyTimestamp(t);const o=e.currentTarget.getBoundingClientRect(),u=e,i=e,d=u.changedTouches||u.touches,s=(d&&d[0]?d[0]:i).clientY,l=(s-o.top)/v.value,c=Math.floor((a?Math.floor(l):l)*m.value);return 0!==c&&(r=addToDate(r,{minute:c})),n&&(r=updateRelative(r,n,!0)),r}function H(e,t,a=!1,n){let r=copyTimestamp(t);if(e.currentTarget){const o=e.currentTarget.getBoundingClientRect(),u=e,i=e,d=u.changedTouches||u.touches,s=(d&&d[0]?d[0]:i).clientX,l=(s-o.left)/p.value,c=Math.floor((a?Math.floor(l):l)*m.value);0!==c&&(r=addToDate(r,{minute:c})),n&&(r=updateRelative(r,n,!0))}return r}function q(e,t){const a={timestamp:e,timeStartPos:O,timeDurationHeight:F};return void 0!==t&&(a.columnIndex=t),a}function U(e,t){const a={timestamp:copyTimestamp(e),timeStartPosX:W,timeDurationWidth:A};return void 0!==t&&(a.index=t),a}function L(e,t=0){const a=O(e);return!(!1===a||!n.value)&&(animVerticalScrollTo(n.value,a,t),!0)}function B(e,t=0){const a=W(e);return!(!1===a||!n.value)&&(animHorizontalScrollTo(n.value,a,t),!0)}function F(e){return e/m.value*v.value}function A(e){return e/m.value*p.value}function P(e){return e*m.value/v.value}function Y(e){return e*m.value/p.value}function O(e,t=!0){const a=parseTime(e);if(!1===a)return!1;const n=l.value,r=s.value*m.value,o=(a-n)/r;let u=o*c.value;return t&&(u<0&&(u=0),u>c.value)&&(u=c.value),u}function W(e,t=!0){const a=parseTime(e);if(!1===a)return!1;const n=l.value,r=s.value*m.value,o=(a-n)/r;let u=o*y.value;return t&&(u<0&&(u=0),u>y.value)&&(u=y.value),u}return{parsedIntervalStart:d,parsedIntervalMinutes:m,parsedIntervalCount:s,parsedIntervalHeight:v,parsedCellWidth:p,parsedStartMinute:l,bodyHeight:c,bodyWidth:y,parsedWeekStart:f,parsedWeekEnd:h,days:g,intervals:T,intervalFormatter:S,ariaDateTimeFormatter:x,arrayHasDateTime:k,checkIntervals:_,getIntervalClasses:b,getResourceClasses:I,showIntervalLabelDefault:M,showResourceLabelDefault:N,styleDefault:C,getTimestampAtEventInterval:E,getTimestampAtEvent:R,getTimestampAtEventX:H,getScopeForSlot:q,getScopeForSlotX:U,scrollToTime:L,scrollToTimeX:B,timeDurationHeight:F,timeDurationWidth:A,heightToMinutes:P,widthToMinutes:Y,timeStartPos:O,timeStartPosX:W}}const useColumnProps={columnCount:{type:[Number,String],default:0,validator:validateNumber},columnIndexStart:{type:[Number,String],default:0,validator:validateNumber}},useMaxDaysProps={maxDays:{type:Number,default:1}},useTimesProps={now:{type:String,validator:e=>""===e||validateTimestamp(e),default:""}};function useTimes(e){const t=vue.reactive({now:parseTimestamp("0000-00-00 00:00"),today:parseTimestamp("0000-00-00")}),a=vue.computed(()=>e.now?parseTimestamp(e.now):o());function n(){t.now&&t.today&&(t.now.current=t.today.current=!0,t.now.past=t.today.past=!1,t.now.future=t.today.future=!1)}function r(){const e=a.value||o();u(e,t.now),i(e,t.now),u(e,t.today)}function o(){return parseDate(new Date)}function u(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)}function i(e,t){e.time!==t.time&&(t.hour=e.hour,t.minute=e.minute,t.time=e.time)}return vue.watch(a,()=>r()),{times:t,parsedNow:a,setCurrent:n,updateCurrent:r,getNow:o,updateDay:u,updateTime:i}}function useRenderValues(r,{parsedView:o,parsedValue:u,times:i}){const e=vue.computed(()=>{const e=u.value;let t=r.maxDays,a=e,n=e;switch(o.value){case"month":a=getStartOfMonth(e),n=getEndOfMonth(e),t=daysInMonth(a.year,a.month);break;case"week":case"week-agenda":case"week-scheduler":a=getStartOfWeek(e,r.weekdays,i.today),n=getEndOfWeek(a,r.weekdays,i.today),t=r.weekdays.length;break;case"day":case"scheduler":case"agenda":n=moveRelativeDays(copyTimestamp(n),nextDay,t>1?t-1:t,r.weekdays),n=updateFormatted(n);break;case"month-interval":case"month-scheduler":case"month-agenda":a=getStartOfMonth(e),n=getEndOfMonth(e),n=updateFormatted(n),t=daysInMonth(a.year,a.month);break;case"resource":t=1,n=moveRelativeDays(copyTimestamp(n),nextDay,t,r.weekdays),n=updateFormatted(n);break}return{start:a,end:n,maxDays:t}});return{renderValues:e}}const toCamelCase=e=>e.replace(/(-\w)/g,e=>e[1].toUpperCase());function getMouseEventHandlers(t,e,a,n){const r={};for(const o in a){const u=a[o],i=toCamelCase("on-"+o);if(!e.value)return console.warn("$listeners has not been set up"),{};if(void 0!==e.value[i]){const d="on"+u.event.charAt(0).toUpperCase()+u.event.slice(1),s=e=>{return(void 0===u.button||"buttons"in e&&e.buttons>0&&e.button===u.button)&&(u.prevent&&e.preventDefault(),u.stop&&e.stopPropagation(),t(o,n(e,o))),u.result};d in r?Array.isArray(r[d])?r[d].push(s):r[d]=[r[d],s]:r[d]=s}}return r}function getDefaultMouseEventHandlers(e,t,a,n){return getMouseEventHandlers(e,t,getMouseEventName(a),n)}function getMouseEventName(e){return{["click"+e]:{event:"click"},["contextmenu"+e]:{event:"contextmenu",prevent:!0,result:!1},["mousedown"+e]:{event:"mousedown"},["mousemove"+e]:{event:"mousemove"},["mouseup"+e]:{event:"mouseup"},["mouseenter"+e]:{event:"mouseenter"},["mouseleave"+e]:{event:"mouseleave"},["touchstart"+e]:{event:"touchstart"},["touchmove"+e]:{event:"touchmove"},["touchend"+e]:{event:"touchend"}}}function getRawMouseEvents(e){return Object.keys(getMouseEventName(e))}function useMouseEvents(a,n){return{getMouseEventHandlers:(e,t)=>getMouseEventHandlers(a,n,e,t),getDefaultMouseEventHandlers:(e,t)=>getDefaultMouseEventHandlers(a,n,e,t),getMouseEventName:getMouseEventName,getRawMouseEvents:getRawMouseEvents}}const useMoveEmits=["moved"];function useMove(d,{parsedView:s,parsedValue:l,direction:c,maxDays:m,times:v,emittedValue:p,emit:y}){function e(a=1){if(0===a)p.value=today();else{let e=copyTimestamp(l.value);const n=getEndOfMonth(e),r=a>0,o=r?nextDay:prevDay,u=r?n.day:1;let t=r?a:-a;c.value=r?"next":"prev";const i=d.weekdays.length;while(--t>=0)switch(s.value){case"month":e.day=u,e=o(e),e=updateWeekday(e);while(!d.weekdays.includes(Number(e.weekday)))e=addToDate(e,{day:r?1:-1});break;case"week":case"week-agenda":case"week-scheduler":e=relativeDays(e,o,i,d.weekdays);break;case"day":case"scheduler":case"agenda":e=relativeDays(e,o,m.value,d.weekdays);break;case"month-interval":case"month-agenda":case"month-scheduler":e.day=u,e=o(e);break;case"resource":e=relativeDays(e,o,m.value,d.weekdays);break}e=updateWeekday(e),e=updateFormatted(e),e=updateDayOfYear(e),e=updateRelative(e,v.now),p.value=e.date,y("moved",e)}}return{move:e}}const listenerRE=/^on[A-Z]/;function useEmitListeners(e=vue.getCurrentInstance()){return{emitListeners:vue.computed(()=>{const t={};return e?.vnode?.props&&Object.keys(e.vnode.props).forEach(e=>{listenerRE.test(e)&&(t[e]=!0)}),t})}}function useFocusHelper(){const e={"aria-hidden":"true",class:"q-calendar__focus-helper"};return[vue.h("span",e)]}function useButton(){function e({focusable:e,focusType:t},a,n){const r=e&&t.includes("date");return vue.h("button",{...a,tabindex:r?0:-1},[n,r&&useFocusHelper()])}return{renderButton:e}}const useCellWidthProps={cellWidth:[Number,String]};function useCellWidth(e){const t=vue.computed(()=>void 0!==e.cellWidth);return{isSticky:t}}const useCheckChangeEmits=["change"];function useCheckChange(n,{days:r,lastStart:o,lastEnd:u}){function e(){const e=r.value;if(0===e.length)return!1;const t=e[0].date,a=e[e.length-1].date;return(!o.value||!u.value||t!==o.value||a!==u.value)&&(o.value=t,u.value=a,n("change",{start:t,end:a,days:e}),!0)}return{checkChange:e}}function useEventUtils(){function e(e,t){return(Array.isArray(t)?t:[t]).includes(e.keyCode)}return{isKeyCode:e}}const isKeyCode=useEventUtils().isKeyCode,useNavigationProps={useNavigation:Boolean};function useNavigation(t,{rootRef:a,focusRef:n,focusValue:r,datesRef:o,parsedView:u,emittedValue:i,direction:d,times:s}){let e=!1;function l(){e||document&&(e=!0,document.addEventListener("keyup",y),document.addEventListener("keydown",p))}function c(){document&&(document.removeEventListener("keyup",y),document.removeEventListener("keydown",p),e=!1)}function m(e){if(e&&document){const t=document.activeElement;if(t!==document.body&&a.value?.contains(t))return!0}return!1}function v(){let t=0;const a=window.setInterval(()=>{const e=o.value[n.value];e&&(e.focus(),50!==++t)&&document.activeElement!==e||window.clearInterval(a)},250)}function p(e){m(e)&&isKeyCode(e,[33,34,35,36,37,38,39,40])&&(e.stopPropagation(),e.preventDefault())}function y(e){if(m(e)&&isKeyCode(e,[33,34,35,36,37,38,39,40])){const t={33:D,34:w,35:_,36:k,37:g,38:f,39:T,40:h};t[e.keyCode]?.()}}function f(){let e=copyTimestamp(r.value);if("month"===u.value){if(e=addToDate(e,{day:-7}),r.value.month!==e.month)return d.value="prev",void(i.value=e.date)}else e=addToDate(e,{minute:Number(t.intervalMinutes)});d.value="prev",n.value=e.date}function h(){let e=copyTimestamp(r.value);if("month"===u.value){if(e=addToDate(e,{day:7}),r.value.month!==e.month)return d.value="next",void(i.value=e.date)}else e=addToDate(e,{minute:Number(t.intervalMinutes)});d.value="next",n.value=e.date}function g(){let e=copyTimestamp(r.value);d.value="prev";do{e=addToDate(e,{day:-1})}while(!t.weekdays.includes(Number(e.weekday)));n.value=e.date}function T(){let e=copyTimestamp(r.value);d.value="next";do{e=addToDate(e,{day:1})}while(!t.weekdays.includes(Number(e.weekday)));n.value=e.date}function D(){let e=copyTimestamp(r.value);e="month"===u.value?addToDate(e,{month:-1}):addToDate(e,{day:-7}),d.value="prev",n.value=e.date}function w(){let e=copyTimestamp(r.value);e="month"===u.value?addToDate(e,{month:1}):addToDate(e,{day:7}),d.value="next",n.value=e.date}function k(){let e=copyTimestamp(r.value);e="month"===u.value?getStartOfMonth(e):getStartOfWeek(e,t.weekdays||[],s.today);while(!t.weekdays.includes(Number(e.weekday)))e=addToDate(e,{day:-1});n.value=e.date}function _(){let e=copyTimestamp(r.value);e="month"===u.value?getEndOfMonth(e):getEndOfWeek(e,t.weekdays||[],s.today);while(!t.weekdays.includes(Number(e.weekday)))e=addToDate(e,{day:-1});n.value=e.date}return vue.onBeforeUnmount(()=>{c()}),vue.watch(()=>t.useNavigation,e=>{(!0===e?l:c)()}),!0===t.useNavigation&&l(),{startNavigation:l,endNavigation:c,tryFocus:v}}const renderButton=useButton().renderButton;var QCalendarScheduler=vue.defineComponent({name:"QCalendarScheduler",directives:{ResizeObserver:ResizeObserverDirective},props:{...useCommonProps,...useSchedulerProps,...useColumnProps,...useMaxDaysProps,...useTimesProps,...useCellWidthProps,...useNavigationProps},emits:["update:model-value","update:model-resources","resource-expanded",...useCheckChangeEmits,...useMoveEmits,...getRawMouseEvents("-date"),...getRawMouseEvents("-day-resource"),...getRawMouseEvents("-head-resources"),...getRawMouseEvents("-head-day"),...getRawMouseEvents("-resource")],setup(f,{slots:h,emit:g,expose:R}){const e=vue.ref(null),t=vue.ref(null),H=vue.ref(null),v=vue.ref(f.modelValue||today()),a=vue.ref(parsed(f.modelValue||today())),p=vue.ref({}),q=vue.ref({}),n=vue.ref(),r=vue.ref(),i=vue.ref("next"),d=vue.ref(f.modelValue||today()),s=vue.ref("0000-00-00"),l=vue.ref(0),T=vue.ref(f.modelValue),c=vue.reactive({width:0,height:0}),y=vue.ref(""),D=vue.ref(""),U=vue.ref(null),L=vue.ref(null),o=(vue.watch(()=>f.view,()=>{l.value=0}),vue.computed(()=>{return"month"===f.view?"month-interval":f.view})),B=vue.getCurrentInstance();if(null===B)throw new Error("current instance is null");const w=useEmitListeners(B).emitListeners,k=useCellWidth(f).isSticky,{times:u,setCurrent:P,updateCurrent:Y}=useTimes(f),{parsedStart:V,parsedEnd:z,dayFormatter:K,weekdayFormatter:Z,ariaDateFormatter:$,dayStyleDefault:X,getRelativeClasses:_}=(Y(),P(),useCommon(f,{startDate:d,endDate:s,times:u})),b=vue.computed(()=>{return parseTimestamp(f.modelValue,u.now)||V.value||u.today}),j=(a.value=b.value,v.value=b.value.date,useRenderValues(f,{parsedView:o,parsedValue:b,times:u})).renderValues,{rootRef:m,scrollWidth:Q,__renderCalendar:G}=useCalendar(f,Ae,{scrollArea:e,pane:t}),{days:I,parsedCellWidth:S,styleDefault:J}=useInterval(f,{times:u,scrollArea:e,parsedStart:V,parsedEnd:z,maxDays:l,size:c,headerColumnRef:H}),x=useMove(f,{parsedView:o,parsedValue:b,direction:i,maxDays:l,times:u,emittedValue:T,emit:g}).move,M=useMouseEvents(g,w).getDefaultMouseEventHandlers,ee=useCheckChange(g,{days:I,lastStart:U,lastEnd:L}).checkChange,N=useEventUtils().isKeyCode,te=useNavigation(f,{rootRef:m,focusRef:v,focusValue:a,datesRef:p,parsedView:o,emittedValue:T,direction:i,times:u}).tryFocus,C=vue.computed(()=>{const e=parseInt(String(f.columnCount),10);return"day"===o.value&&e>1?e:"day"===o.value&&f.maxDays&&f.maxDays>1?f.maxDays:I.value.length}),ae=vue.computed(()=>{return m.value?parseInt(window.getComputedStyle(m.value).getPropertyValue("--calendar-resources-width"),10):0}),E=vue.computed(()=>{const e=parseInt(String(f.resourceHeight),10);return 0===e?"auto":e}),ne=vue.computed(()=>{return parseInt(String(f.resourceMinHeight),10)}),F=vue.computed(()=>{if(m.value){const e=c.width||m.value.getBoundingClientRect().width;if(e&&ae.value&&C.value)return(e-Q.value-ae.value)/C.value+"px"}return 100/C.value+"%"});function re(){T.value=today()}function oe(e=1){x(e)}function ue(e=1){x(-e)}function ie({width:e,height:t}){c.width=e,c.height=t}function A(e){return e.date===T.value}function de(){return vue.h("div",{roll:"presentation",class:{"q-calendar-scheduler__head":!0,"q-calendar__sticky":!0===k.value},style:{marginRight:Q.value+"px"}},[se(),le()])}function se(){const e=h["head-resources"],t={days:I.value,timestamps:I.value,date:f.modelValue,resources:f.modelResources};return vue.h("div",{class:{"q-calendar-scheduler__head--resources":!0,"q-calendar__sticky":!0===k.value},...M("-head-resources",e=>{return{scope:t,event:e}})},[e&&e({scope:t})])}function le(){return vue.h("div",{ref:H,class:{"q-calendar-scheduler__head--days__column":!0}},[ce(),me()])}function ce(){return vue.h("div",{class:{"q-calendar-scheduler__head--days__weekdays":!0}},[...ve()])}function me(){const e=h["head-days-events"];return vue.nextTick(()=>{if(r.value&&0===parseInt(String(f.columnCount),10)&&window)try{const e=window.getComputedStyle(r.value);n.value&&n.value.parentElement&&(n.value.parentElement.style.height=e.height,n.value.style.height=e.height)}catch{}}),vue.h("div",{class:{"q-calendar-scheduler__head--days__event":!0}},[e&&vue.h("div",{ref:n,style:{position:"absolute",left:0,top:0,right:0,overflow:"hidden",zIndex:1}},[e({scope:{timestamps:I.value,days:I.value,ref:r}})]),...pe()])}function ve(){const e=parseInt(String(f.columnCount),10),a=parseInt(String(f.columnIndexStart),10);return 1===I.value.length&&e>0?Array.apply(null,new Array(e)).map((e,t)=>t+a).map(e=>ye(I.value[0],e)):I.value.map(e=>ye(e,0))}function pe(){const e=parseInt(String(f.columnCount),10),a=parseInt(String(f.columnIndexStart),10);return 1===I.value.length&&e>0?Array.apply(null,new Array(e)).map((e,t)=>t+a).map(e=>he(I.value[0],e)):I.value.map(e=>he(e,0))}function ye(t,e){const a=h["head-day"],n=h["head-date"],r=!0!==f.noActiveDate&&A(t),o={timestamp:t,activeDate:r,droppable:y.value===t.date,disabled:!!f.disabledWeekdays&&f.disabledWeekdays.includes(Number(t.weekday)),columnIndex:e??0},u=!0===k.value?convertToUnit(S.value):F.value,i=f.weekdayStyle||X,d={width:u,maxWidth:u,minWidth:u,...i({scope:o})},s=(!0===k.value&&(d.minWidth=u),"function"===typeof f.weekdayClass?f.weekdayClass({scope:o}):{}),l=!0===f.focusable&&f.focusType.includes("weekday"),c=t.date+(void 0!==e?"-"+e:""),m={key:c,ref:e=>{null!==e&&(p.value[c]=e)},tabindex:!0===l?0:-1,class:{"q-calendar-scheduler__head--day":!0,...s,..._(t),"q-active-date":r,"q-calendar__hoverable":!0===f.hoverable,"q-calendar__focusable":!0===l},style:d,onFocus:()=>{!0===l&&(v.value=c)},onKeydown:e=>{!0!==t.disabled&&N(e,[13,32])&&(e.stopPropagation(),e.preventDefault())},onKeyup:e=>{!0!==t.disabled&&N(e,[13,32])&&(T.value=t.date)},...M("-head-day",e=>{return{scope:o,event:e}}),onDragenter:e=>{void 0!==f.dragEnterFunc&&"function"===typeof f.dragEnterFunc&&(!0===f.dragEnterFunc(e,"head-day",{scope:o})?y.value=t.date:y.value="")},onDragover:e=>{void 0!==f.dragOverFunc&&"function"===typeof f.dragOverFunc&&(!0===f.dragOverFunc(e,"head-day",{scope:o})?y.value=t.date:y.value="")},onDragleave:e=>{void 0!==f.dragLeaveFunc&&"function"===typeof f.dragLeaveFunc&&(!0===f.dragLeaveFunc(e,"head-day",{scope:o})?y.value=t.date:y.value="")},onDrop:e=>{void 0!==f.dropFunc&&"function"===typeof f.dropFunc&&(!0===f.dropFunc(e,"head-day",{scope:o})?y.value=t.date:y.value="")}};return vue.h("div",m,[void 0!==a&&a({scope:o}),void 0===a&&De(t,e),void 0===a&&fe(t),void 0===a&&n&&n({scope:o}),void 0===a&&we(t,e),useFocusHelper()])}function fe(e){return"stacked"===f.dateHeader?[!0!==f.noDefaultHeaderText?O(e):[],!0!==f.noDefaultHeaderBtn?W(e):[]].flat():"inline"===f.dateHeader?("left"===f.weekdayAlign&&"right"===f.dateAlign||"right"===f.weekdayAlign&&f.dateAlign,vue.h("div",{class:"q-calendar__header--inline"},[!0!==f.noDefaultHeaderText&&O(e),!0!==f.noDefaultHeaderBtn&&W(e)])):"inverted"===f.dateHeader?("left"===f.weekdayAlign&&"right"===f.dateAlign||"right"===f.weekdayAlign&&f.dateAlign,vue.h("div",{class:"q-calendar__header--inline"},[!0!==f.noDefaultHeaderBtn&&W(e),!0!==f.noDefaultHeaderText&&O(e)])):void 0}function he(e,t){const a=h["head-day-event"],n=!0!==f.noActiveDate&&A(e),r={timestamp:e,activeDate:n,droppable:y.value===e.date,disabled:!!f.disabledWeekdays&&f.disabledWeekdays.includes(Number(e.weekday)),columnIndex:t??0},o=!0===k.value?convertToUnit(S.value):F.value,u={width:o,maxWidth:o,minWidth:o};return!0===k.value&&(u.minWidth=o),vue.h("div",{key:"event-"+e.date+(void 0!==t?"-"+t:""),class:{"q-calendar-scheduler__head--day__event":!0,..._(e),"q-active-date":n},style:u},[a&&a({scope:r})])}function O(e){const t=h["head-weekday-label"],a=!0===f.shortWeekdayLabel,n={timestamp:e,shortWeekdayLabel:a},r={class:{"q-calendar-scheduler__head--weekday":!0,["q-calendar__"+f.weekdayAlign]:!0,"q-calendar__ellipsis":!0}};return vue.h("div",r,t&&t({scope:n})||ge(e,a))}function ge(e,t){const a=Z.value(e,t||f.weekdayBreakpoints[0]>0&&S.value<=f.weekdayBreakpoints[0]);return vue.h("span",{class:"q-calendar-scheduler__head--weekday-label q-calendar__ellipsis"},f.weekdayBreakpoints[1]>0&&S.value<=f.weekdayBreakpoints[1]?minCharWidth(a,Number(f.minWeekdayLabel)):a)}function W(e){const t={class:{"q-calendar-scheduler__head--date":!0,["q-calendar__"+f.dateAlign]:!0}};return vue.h("div",t,Te(e))}function Te(a){const e=!0!==f.noActiveDate&&A(a),t=K.value(a,!1),n=h["head-day-label"],r=h["head-day-button"],o={dayLabel:t,timestamp:a,activeDate:e},u={class:{"q-calendar-scheduler__head--day__label":!0,"q-calendar__button":!0,"q-calendar__button--round":"round"===f.dateType,"q-calendar__button--rounded":"rounded"===f.dateType,"q-calendar__button--bordered":!0===a.current,"q-calendar__focusable":!0},disabled:a.disabled,onKeydown:e=>{!0!==a.disabled&&N(e,[13,32])&&(e.stopPropagation(),e.preventDefault())},onKeyup:e=>{!0!==a.disabled&&N(e,[13,32])&&(T.value=a.date,void 0!==w.value.onClickDate)&&g("click-date",{scope:o})},...M("-date",(e,t)=>{return"click-date"!==t&&"contextmenu-date"!==t||(T.value=a.date,"click-date"===t&&e.preventDefault()),{scope:o,event:e}})};return!0!==f.noAria&&(u.ariaLabel=$.value(a,!1)),r?vue.h("div",[r({scope:o})]):renderButton(f,u,n?n({scope:o}):t)}function De(e,t){const a=h["column-header-before"];if(a){const n={timestamp:e,columnIndex:t};return vue.h("div",{class:"q-calendar-scheduler__column-header--before"},[a({scope:n})])}}function we(e,t){const a=h["column-header-after"];if(a){const n={timestamp:e,columnIndex:t};return vue.h("div",{class:"q-calendar-scheduler__column-header--after"},[a({scope:n})])}}function ke(){return vue.h("div",{class:"q-calendar-scheduler__body"},[_e()])}function _e(){return!0===k.value?vue.h("div",{ref:e,class:{"q-calendar-scheduler__scroll-area":!0,"q-calendar__scroll":!0}},[!0!==k.value&&Ne(),Ie()]):!0===f.noScroll?be():vue.h("div",{ref:e,class:{"q-calendar-scheduler__scroll-area":!0,"q-calendar__scroll":!0}},[be()])}function be(){return vue.h("div",{ref:t,class:"q-calendar-scheduler__pane"},[Ie()])}function Ie(){return vue.h("div",{class:"q-calendar-scheduler__day--container"},[!0===k.value&&!0!==f.noHeader&&de(),Se()])}function Se(e=void 0,a=0,n=!0){return void 0===e&&(e=f.modelResources),e.map((e,t)=>{return xe(e,t,a,void 0!==e.children?e.expanded:n)}).flat()}function xe(e,t,a=0,n=!0){const r={},o=(r.height=void 0!==e.height?convertToUnit(parseInt(e.height,10)):E.value?convertToUnit(E.value):"auto",ne.value>0&&(r.minHeight=convertToUnit(ne.value)),vue.h("div",{key:e[f.resourceKey]+"-"+t,class:{"q-calendar-scheduler__resource--row":!0},style:r},[Me(e,t,a,n),Ne(e,t,a,n)]));return void 0!==e.children?[o,vue.h("div",{class:{"q-calendar__child":!0,"q-calendar__child--expanded":!0===n,"q-calendar__child--collapsed":!0!==n}},[Se(e.children,a+1,!1===n?n:e.expanded)])]:[o]}function Me(t,e,a=0,n=!0){const r=h["resource-label"],o=parseInt(String(f.resourceMinHeight),10),u={},i=(u.height=void 0!==t.height?convertToUnit(parseInt(t.height,10)):E.value?convertToUnit(E.value):"auto",o>0&&(u.minHeight=convertToUnit(o)),f.resourceStyle||J),d=t[f.resourceLabel],s=!0===f.focusable&&f.focusType.includes("resource")&&!0===n,l=t[f.resourceKey],c={resource:t,timestamps:I.value,days:I.value,resourceIndex:e,indentLevel:a,label:d,droppable:D.value===l},m="function"===typeof f.resourceClass?f.resourceClass({scope:c}):{};return vue.h("div",{key:t[f.resourceKey]+"-"+e,ref:e=>{null!==e&&(q.value[t[f.resourceKey]]=e)},tabindex:!0===s?0:-1,class:{"q-calendar-scheduler__resource":0===a,"q-calendar-scheduler__resource--section":0!==a,...m,"q-calendar__sticky":!0===k.value,"q-calendar__hoverable":!0===f.hoverable,"q-calendar__focusable":!0===s},style:{...u,...i({scope:c})},onDragenter:e=>{void 0!==f.dragEnterFunc&&"function"===typeof f.dragEnterFunc&&(!0===f.dragEnterFunc(e,"resource",{scope:c})?D.value=l:D.value="")},onDragover:e=>{void 0!==f.dragOverFunc&&"function"===typeof f.dragOverFunc&&(!0===f.dragOverFunc(e,"resource",{scope:c})?D.value=l:D.value="")},onDragleave:e=>{void 0!==f.dragLeaveFunc&&"function"===typeof f.dragLeaveFunc&&(!0===f.dragLeaveFunc(e,"resource",{scope:c})?D.value=l:D.value="")},onDrop:e=>{void 0!==f.dropFunc&&"function"===typeof f.dropFunc&&(!0===f.dropFunc(e,"resource",{scope:c})?D.value=l:D.value="")},onKeydown:e=>{N(e,[13,32])&&(e.stopPropagation(),e.preventDefault())},onKeyup:e=>{N(e,[13,32])&&void 0!==w.value.onClickResource&&g("click-resource",{scope:c,event:e})},...M("-resource",e=>{return{scope:c,event:e}})},[[vue.h("div",{class:{"q-calendar__parent":void 0!==t.children,"q-calendar__parent--expanded":void 0!==t.children&&!0===t.expanded,"q-calendar__parent--collapsed":void 0!==t.children&&!0!==t.expanded},onClick:e=>{e.stopPropagation(),t.expanded=!t.expanded,g("resource-expanded",{expanded:t.expanded,scope:c})}}),vue.h("div",{class:{"q-calendar-scheduler__resource--text":!0,"q-calendar__ellipsis":!0},style:{paddingLeft:10*a+2+"px"}},[r?r({scope:c}):d]),useFocusHelper()]])}function Ne(e,t,a=0,n=!0){const r=h["resource-days"],o=!0===k.value?convertToUnit(S.value):F.value,u={resource:e,resourceIndex:t,indentLevel:a,expanded:n,cellWidth:o,timestamps:I.value,days:I.value},i={},d=(i.height=parseInt(String(f.resourceHeight),10)>0?convertToUnit(parseInt(String(f.resourceHeight),10)):"auto",parseInt(String(f.resourceMinHeight),10)>0&&(i.minHeight=convertToUnit(parseInt(String(f.resourceMinHeight),10))),{class:"q-calendar-scheduler__resource--days",style:i});return vue.h("div",d,[...Ce(e,t,a,n),r&&r({scope:u})])}function Ce(t,a,n=0,r=!0){return 1===I.value.length&&parseInt(String(f.columnCount),10)>0?Array.apply(null,new Array(parseInt(String(f.columnCount),10))).map((e,t)=>t+parseInt(String(f.columnIndexStart),10)).map(e=>Ee(I.value[0],e,t,a,n,r)):I.value.map(e=>Ee(e,0,t,a,n,r))}function Ee(e,t,a,n,r=0,o=!0){const u=h.day,i=f.dayStyle||X,d=!0!==f.noActiveDate&&b.value.date===e.date,s=e.date+":"+a[f.resourceKey]+(void 0!==t?":"+t:""),l=D.value===s,c={timestamp:e,columnIndex:t,resource:a,resourceIndex:n,indentLevel:r,activeDate:d,droppable:l},m=!0===k.value?convertToUnit(S.value):F.value,v={width:m,maxWidth:m,...i({scope:c})},p=(v.height=parseInt(String(f.resourceHeight),10)>0?convertToUnit(parseInt(String(f.resourceHeight),10)):"auto",parseInt(String(f.resourceMinHeight),10)>0&&(v.minHeight=convertToUnit(parseInt(String(f.resourceMinHeight),10))),"function"===typeof f.dayClass?f.dayClass({scope:c}):{}),y=!0===f.focusable&&f.focusType.includes("day")&&!0===o;return vue.h("div",{key:e.date+(void 0!==t?":"+t:""),tabindex:!0===y?0:-1,class:{"q-calendar-scheduler__day":0===r,"q-calendar-scheduler__day--section":0!==r,...p,..._(e),"q-calendar__hoverable":!0===f.hoverable,"q-calendar__focusable":!0===y},style:v,onDragenter:e=>{void 0!==f.dragEnterFunc&&"function"===typeof f.dragEnterFunc&&(!0===f.dragEnterFunc(e,"day",{scope:c})?D.value=s:D.value="")},onDragover:e=>{void 0!==f.dragOverFunc&&"function"===typeof f.dragOverFunc&&(!0===f.dragOverFunc(e,"day",{scope:c})?D.value=s:D.value="")},onDragleave:e=>{void 0!==f.dragLeaveFunc&&"function"===typeof f.dragLeaveFunc&&(!0===f.dragLeaveFunc(e,"day",{scope:c})?D.value=s:D.value="")},onDrop:e=>{void 0!==f.dropFunc&&"function"===typeof f.dropFunc&&(!0===f.dropFunc(e,"day",{scope:c})?D.value=s:D.value="")},onKeydown:e=>{N(e,[13,32])&&(e.stopPropagation(),e.preventDefault())},onKeyup:e=>{N(e,[13,32])&&(T.value=c.timestamp.date,void 0!==w.value.onClickResource)&&g("click-resource",{scope:c,event:e})},...M("-day-resource",e=>{return{scope:c,event:e}})},[u&&u({scope:c}),useFocusHelper()])}function Fe(){return vue.h("div",{},"No resources have been defined")}function Ae(){const{start:e,end:t,maxDays:a}=j.value,n=(d.value===e.date&&s.value===t.date&&l.value===a||(d.value=e.date,s.value=t.date,l.value=a),c.width>0),r=f.modelResources&&f.modelResources.length>0,o=vue.withDirectives(vue.h("div",{key:d.value,class:"q-calendar-scheduler"},[!0===n&&!0===r&&!0!==k.value&&!0!==f.noHeader&&de(),!0===n&&!0===r&&ke(),!1===r&&Fe()]),[[ResizeObserverDirective,ie]]);if(!0!==f.animated)return o;{const u="q-calendar--"+("prev"===i.value?f.transitionPrev:f.transitionNext);return vue.h(vue.Transition,{name:u,appear:!0},()=>o)}}return vue.watch([I],ee,{deep:!0,immediate:!0}),vue.watch(()=>f.modelValue,(e,t)=>{if(T.value!==f.modelValue){if(!0===f.animated){const a=getDayIdentifier(parsed(e)),n=getDayIdentifier(parsed(t));i.value=a>=n?"next":"prev"}T.value=e}v.value=e}),vue.watch(T,(e,t)=>{if(T.value!==f.modelValue){if(!0===f.animated){const a=getDayIdentifier(parsed(e)),n=getDayIdentifier(parsed(t));i.value=a>=n?"next":"prev"}g("update:model-value",e)}}),vue.watch(v,e=>{e&&(a.value=parseTimestamp(e))}),vue.watch(a,()=>{p.value[v.value]?p.value[v.value].focus():te()}),vue.watch(()=>f.maxDays,e=>{l.value=e}),vue.onBeforeUpdate(()=>{p.value={},n.value=void 0,r.value=void 0,q.value={}}),vue.onMounted(()=>{}),R({prev:ue,next:oe,move:x,moveToToday:re,updateCurrent:Y}),()=>G()}});const version="4.1.1";exports.DAYS_IN_MONTH=DAYS_IN_MONTH,exports.DAYS_IN_MONTH_LEAP=DAYS_IN_MONTH_LEAP,exports.DAYS_IN_MONTH_MAX=DAYS_IN_MONTH_MAX,exports.DAYS_IN_MONTH_MIN=DAYS_IN_MONTH_MIN,exports.DAY_MIN=DAY_MIN,exports.FIRST_HOUR=FIRST_HOUR,exports.MONTH_MAX=MONTH_MAX,exports.MONTH_MIN=MONTH_MIN,exports.PARSE_DATE=PARSE_DATE,exports.PARSE_DATETIME=PARSE_DATETIME,exports.PARSE_TIME=PARSE_TIME,exports.QCalendarScheduler=QCalendarScheduler,exports.TIME_CONSTANTS=TIME_CONSTANTS,exports.addToDate=addToDate,exports.compareDate=compareDate,exports.compareDateTime=compareDateTime,exports.compareTime=compareTime,exports.compareTimestamps=compareTimestamps,exports.convertToUnit=convertToUnit,exports.copyTimestamp=copyTimestamp,exports.createDayList=createDayList,exports.createIntervalList=createIntervalList,exports.createNativeLocaleFormatter=createNativeLocaleFormatter,exports.daysBetween=daysBetween,exports.daysInMonth=daysInMonth,exports.diffTimestamp=diffTimestamp,exports.findWeekday=findWeekday,exports.getDate=getDate,exports.getDateTime=getDateTime,exports.getDayIdentifier=getDayIdentifier,exports.getDayOfYear=getDayOfYear,exports.getDayTimeIdentifier=getDayTimeIdentifier,exports.getEndOfMonth=getEndOfMonth,exports.getEndOfWeek=getEndOfWeek,exports.getMonthFormatter=getMonthFormatter,exports.getMonthNames=getMonthNames,exports.getStartOfMonth=getStartOfMonth,exports.getStartOfWeek=getStartOfWeek,exports.getTime=getTime,exports.getTimeIdentifier=getTimeIdentifier,exports.getWeekday=getWeekday,exports.getWeekdayFormatter=getWeekdayFormatter,exports.getWeekdayNames=getWeekdayNames,exports.getWorkWeek=getWorkWeek,exports.indexOf=indexOf,exports.isBetweenDates=isBetweenDates,exports.isLeapYear=isLeapYear,exports.isOverlappingDates=isOverlappingDates,exports.isToday=isToday,exports.makeDate=makeDate,exports.makeDateTime=makeDateTime,exports.maxTimestamp=maxTimestamp,exports.minCharWidth=minCharWidth,exports.minTimestamp=minTimestamp,exports.moveRelativeDays=moveRelativeDays,exports.nextDay=nextDay,exports.padNumber=padNumber,exports.parseDate=parseDate,exports.parseTime=parseTime,exports.parseTimestamp=parseTimestamp,exports.parsed=parsed,exports.prevDay=prevDay,exports.relativeDays=relativeDays,exports.today=today,exports.updateDayOfYear=updateDayOfYear,exports.updateDisabled=updateDisabled,exports.updateFormatted=updateFormatted,exports.updateMinutes=updateMinutes,exports.updateRelative=updateRelative,exports.updateWeekday=updateWeekday,exports.updateWorkWeek=updateWorkWeek,exports.validateNumber=validateNumber,exports.validateTimestamp=validateTimestamp,exports.version=version,exports.weeksBetween=weeksBetween; |
/*! | ||
* @quasar/quasar-ui-qcalendar v4.1.0 | ||
* @quasar/quasar-ui-qcalendar v4.1.1 | ||
* (c) 2025 Jeff Galbraith <jeff@quasar.dev> | ||
* Released under the MIT License. | ||
*/ | ||
import{reactive,ref,computed,withDirectives,h,watch,getCurrentInstance,onBeforeUnmount,defineComponent,onBeforeUpdate,onMounted,Transition,nextTick}from"vue";const PARSE_DATETIME=/^(\d{4})-(\d{1,2})(-(\d{1,2}))?([^\d]+(\d{1,2}))?(:(\d{1,2}))?(:(\d{1,2}))?(.(\d{1,3}))?$/,PARSE_DATE=/^(\d{4})-(\d{1,2})(-(\d{1,2}))?/,PARSE_TIME=/(\d\d?)(:(\d\d?)|)(:(\d\d?)|)/,DAYS_IN_MONTH=[0,31,28,31,30,31,30,31,31,30,31,30,31],DAYS_IN_MONTH_LEAP=[0,31,29,31,30,31,30,31,31,30,31,30,31],TIME_CONSTANTS={MILLISECONDS_IN:{SECOND:1e3,MINUTE:6e4,HOUR:36e5,DAY:864e5,WEEK:6048e5},SECONDS_IN:{MINUTE:60,HOUR:3600,DAY:86400,WEEK:604800},MINUTES_IN:{MINUTE:1,HOUR:60,DAY:1440,WEEK:10080},HOURS_IN:{DAY:24,WEEK:168},DAYS_IN:{WEEK:7}},DAYS_IN_MONTH_MIN=28,DAYS_IN_MONTH_MAX=31,MONTH_MAX=12,MONTH_MIN=1,DAY_MIN=1,FIRST_HOUR=0;function validateTimestamp(e){return"string"===typeof e&&PARSE_DATETIME.test(e)}function parsed(e){if("string"!==typeof e)return null;const t=PARSE_DATETIME.exec(e);if(!t||!t[1]||!t[2])return null;const a=parseInt(t[1],10),n=parseInt(t[2],10),r=parseInt(t[4]||"1",10),o=parseInt(t[6]||"0",10),i=parseInt(t[8]||"0",10);return{date:e,time:o.toString().padStart(2,"0")+":"+i.toString().padStart(2,"0"),year:a,month:n,day:r,hour:o,minute:i,hasDay:!!t[4],hasTime:!0,past:!1,current:!1,future:!1,disabled:!1,weekday:0,doy:0,workweek:0}}function parseDate(e,t=!1){if(!(e instanceof Date))return null;const a=t?"UTC":"";return updateFormatted({date:padNumber(e[`get${a}FullYear`](),4)+"-"+padNumber(e[`get${a}Month`]()+1,2)+"-"+padNumber(e[`get${a}Date`](),2),time:padNumber(e[`get${a}Hours`]()||0,2)+":"+padNumber(e[`get${a}Minutes`]()||0,2),year:e[`get${a}FullYear`](),month:e[`get${a}Month`]()+1,day:e[`get${a}Date`](),hour:e[`get${a}Hours`](),minute:e[`get${a}Minutes`](),weekday:0,doy:0,workweek:0,hasDay:!0,hasTime:!0,past:!1,current:!1,future:!1,disabled:!1})}function padNumber(e,t){let a=String(e);while(a.length<t)a="0"+a;return a}function isLeapYear(e){return e%4===0&&e%100!==0||e%400===0}function daysInMonth(e,t){return(isLeapYear(e)?DAYS_IN_MONTH_LEAP:DAYS_IN_MONTH)[t]}function nextDay(e){const t=new Date(e.year,e.month-1,e.day+1);return updateFormatted(normalizeTimestamp({...e,year:t.getFullYear(),month:t.getMonth()+1,day:t.getDate()}))}function prevDay(e){const t=new Date(e.year,e.month-1,e.day-1);return updateFormatted(normalizeTimestamp({...e,year:t.getFullYear(),month:t.getMonth()+1,day:t.getDate()}))}function today(){const e=new Date,t=e.getMonth()+1,a=e.getDate(),n=e.getFullYear();return[n,padNumber(t,2),padNumber(a,2)].join("-")}function isToday(e){return e===today()}function getStartOfWeek(e,t,a){let n=copyTimestamp(e);if(t){if(1===n.day||0===n.weekday)while(!t.includes(Number(n.weekday)))n=nextDay(n);n=findWeekday(n,t[0],prevDay),n=updateFormatted(n),a&&(n=updateRelative(n,a,n.hasTime))}return n}function getEndOfWeek(e,t,a){let n=copyTimestamp(e);if(t&&Array.isArray(t)){const r=daysInMonth(n.year,n.month);if(r===n.day||n.weekday===t[t.length-1])while(!t.includes(Number(n.weekday)))n=prevDay(n);n=findWeekday(n,t[t.length-1],nextDay),n=updateFormatted(n),a&&(n=updateRelative(n,a,n.hasTime))}return n}function getStartOfMonth(e){let t=copyTimestamp(e);return t.day=DAY_MIN,t=updateFormatted(t),t}function getEndOfMonth(e){let t=copyTimestamp(e);return t.day=daysInMonth(t.year,t.month),t=updateFormatted(t),t}function parseTime(e){const t=Object.prototype.toString.call(e);switch(t){case"[object Number]":return e;case"[object String]":{const a=PARSE_TIME.exec(e);return a?60*parseInt(a[1],10)+parseInt(a[3]||"0",10):!1}case"[object Object]":return"object"!==typeof e||"number"!==typeof e.hour||"number"!==typeof e.minute?!1:"object"===typeof e&&"hour"in e&&"minute"in e&&60*e.hour+e.minute}return!1}function compareTimestamps(e,t){return!(!e||!t)&&e.year===t.year&&e.month===t.month&&e.day===t.day&&e.hour===t.hour&&e.minute===t.minute}function compareDate(e,t){return getDate(e)===getDate(t)}function compareTime(e,t){return getTime(e)===getTime(t)}function compareDateTime(e,t){return getDateTime(e)===getDateTime(t)}function parseTimestamp(e,t=null){let a=parsed(e);return a?(a=updateFormatted(a),t&&(a=updateRelative(a,t,a.hasTime)),a):null}function getDayIdentifier(e){return 1e8*(e.year??0)+1e6*(e.month??0)+1e4*(e.day??0)}function getTimeIdentifier(e){return 100*(e.hour??0)+(e.minute??0)}function getDayTimeIdentifier(e){return getDayIdentifier(e)+getTimeIdentifier(e)}function diffTimestamp(e,t,a=!1){const n=Date.UTC(e.year??0,(e.month??1)-1,e.day??1,e.hour??0,e.minute??0),r=Date.UTC(t.year??0,(t.month??1)-1,t.day??1,t.hour??0,t.minute??0);return!0===a&&r<n?0:r-n}function updateRelative(e,t,a=!1){let n=copyTimestamp(e),r=getDayIdentifier(t),o=getDayIdentifier(n),i=r===o;return n.hasTime&&a&&i&&(r=getTimeIdentifier(t),o=getTimeIdentifier(n),i=r===o),n.past=o<r,n.current=i,n.future=o>r,n.currentWeekday=n.weekday===t.weekday,n}function updateMinutes(e,t,a=null){let n=copyTimestamp(e);return n.hasTime=!0,n.hour=Math.floor(t/TIME_CONSTANTS.MINUTES_IN.HOUR),n.minute=t%TIME_CONSTANTS.MINUTES_IN.HOUR,n.time=getTime(n),a&&(n=updateRelative(n,a,!0)),n}function updateWeekday(e){let t=copyTimestamp(e);return t.weekday=getWeekday(t),t}function updateDayOfYear(e){let t=copyTimestamp(e);return t.doy=getDayOfYear(t)||0,t}function updateWorkWeek(e){let t=copyTimestamp(e);return t.workweek=getWorkWeek(t),t}function updateDisabled(e,t,a,n,r){let o=copyTimestamp(e);const i=getDayIdentifier(o);if(void 0!==t){const l=parsed(t);if(l){const c=getDayIdentifier(l);i<=c&&(o.disabled=!0)}}if(!0!==o.disabled&&void 0!==a){const m=parsed(a);if(m){const p=getDayIdentifier(m);i>=p&&(o.disabled=!0)}}if(!0!==o.disabled&&Array.isArray(n)&&n.length>0)for(var u in n)if(n[u]===o.weekday){o.disabled=!0;break}if(!0!==o.disabled&&Array.isArray(r)&&r.length>0)for(var d in r)if(Array.isArray(r[d])&&2===r[d].length&&r[d][0]&&r[d][1]){const y=parsed(r[d][0]),v=parsed(r[d][1]);if(y&&v&&isBetweenDates(o,y,v)){o.disabled=!0;break}}else{const f=r[d];if(Array.isArray(f))for(var s of f){const h=parseTimestamp(s);if(h){const g=getDayIdentifier(h);if(g===i){o.disabled=!0;break}}}else if(f){const T=parseTimestamp(f);if(T){const D=getDayIdentifier(T);D===i&&(o.disabled=!0)}}}return o}function updateFormatted(e){let t=copyTimestamp(e);return t.hasTime=!0,t.time=getTime(t),t.date=getDate(t),t.weekday=getWeekday(t),t.doy=getDayOfYear(t)||0,t.workweek=getWorkWeek(t),t}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){let t=copyTimestamp(e);if(0===t.year){const r=parseTimestamp(today());r&&(t=r)}const a=new Date(Date.UTC(t.year,t.month-1,t.day)),n=4;a.setUTCDate(a.getUTCDate()-(a.getUTCDay()+6)%7+n),a.setUTCDate(a.getUTCDate()+n-(a.getUTCDay()||7));e=new Date(Date.UTC(a.getUTCFullYear(),0,1)),e=Math.ceil(((a.valueOf()-e.valueOf())/864e5+1)/7);return e}function getWeekday(e){let t=e.weekday;if(e.hasDay){const a=Math.floor,n=e.day,r=(e.month+9)%MONTH_MAX+1,o=a(e.year/100),i=e.year%100-(e.month<=2?1:0);t=((n+a(2.6*r-.2)-2*o+i+a(i/4)+a(o/4))%7+7)%7}return t??0}function copyTimestamp(e){return{...e}}function getDate(e){let 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):"00:00")}function moveRelativeDays(e,t=nextDay,a=1,n=[0,1,2,3,4,5,6]){const r=copyTimestamp(e);return relativeDays(r,t,a,n)}function relativeDays(e,t=nextDay,a=1,n=[0,1,2,3,4,5,6]){let r=copyTimestamp(e);n.includes(Number(r.weekday))||0!==r.weekday||t!==nextDay||++a;while(--a>=0)r=t(r),n.length<7&&!n.includes(Number(r.weekday))&&++a;return r}function findWeekday(e,t,a=nextDay,n=6){let r=copyTimestamp(e);while(r.weekday!==t&&--n>=0)r=a(r);return r}function createDayList(e,t,a,n=[0,1,2,3,4,5,6],r=void 0,o=void 0,i=[],u=[],d=42,s=0){const l=getDayIdentifier(e),c=getDayIdentifier(t),m=[];let p=copyTimestamp(e),y=0,v=y===c;if(!(c<l))while((!v||m.length<s)&&m.length<d){if(y=getDayIdentifier(p),v=v||y>c&&m.length>=s,v)break;if(n.includes(Number(p.weekday))){let e=copyTimestamp(p);e=updateFormatted(e),e=updateRelative(e,a),e=updateDisabled(e,r,o,i,u),m.push(e)}p=relativeDays(p,nextDay)}return m}function createIntervalList(t,a,n,r,o){const i=[];for(let e=0;e<r;++e){const u=(a+e)*n,d=copyTimestamp(t);i.push(updateMinutes(d,u,o))}return i}function createNativeLocaleFormatter(n,r){const e=()=>"";return"undefined"===typeof Intl||"undefined"===typeof Intl.DateTimeFormat?e:(t,e)=>{try{const a=new Intl.DateTimeFormat(n||void 0,r(t,e));return a.format(makeDateTime(t))}catch(e){return console.error(`Intl.DateTimeFormat: ${e.message} -> `+getDateTime(t)),""}}}function makeDate(e,t=!0){return t?new Date(Date.UTC(e.year,e.month-1,e.day,0,0)):new Date(e.year,e.month-1,e.day,0,0)}function makeDateTime(e,t=!0){return t?new Date(Date.UTC(e.year,e.month-1,e.day,e.hour,e.minute)):new Date(e.year,e.month-1,e.day,e.hour,e.minute)}function validateNumber(e){return isFinite(Number(e))}function maxTimestamp(e,t=!1){const a=!0===t?getDayTimeIdentifier:getDayIdentifier;return e.reduce((e,t)=>{return Math.max(a(e),a(t))===a(e)?e:t})}function minTimestamp(e,t=!1){const a=!0===t?getDayTimeIdentifier:getDayIdentifier;return e.reduce((e,t)=>{return Math.min(a(e),a(t))===a(e)?e:t})}function isBetweenDates(e,t,a,n=!1){const r=getDayIdentifier(e)+(!0===n?getTimeIdentifier(e):0),o=getDayIdentifier(t)+(!0===n?getTimeIdentifier(t):0),i=getDayIdentifier(a)+(!0===n?getTimeIdentifier(a):0);return r>=o&&r<=i}function isOverlappingDates(e,t,a,n){const r=getDayIdentifier(e),o=getDayIdentifier(t),i=getDayIdentifier(a),u=getDayIdentifier(n);return r>=i&&r<=u||o>=i&&o<=u||i>=r&&o>=u}function addToDate(e,t){const a=copyTimestamp(e);return t.year&&(a.year+=t.year),t.month&&(a.month+=t.month),t.day&&(a.day+=t.day),t.hour&&(a.hour+=t.hour),t.minute&&(a.minute+=t.minute),updateFormatted(normalizeTimestamp(a))}function normalizeTimestamp(e){const t=new Date(e.year,e.month-1,e.day,e.hour,e.minute);return{...e,year:t.getFullYear(),month:t.getMonth()+1,day:t.getDate(),hour:t.getHours(),minute:t.getMinutes()}}function daysBetween(e,t){const a=diffTimestamp(e,t,!0);return Math.floor(a/TIME_CONSTANTS.MILLISECONDS_IN.DAY)}function weeksBetween(e,t){let a=copyTimestamp(e),n=copyTimestamp(t);return a=findWeekday(a,0),n=findWeekday(n,6),Math.ceil(daysBetween(a,n)/TIME_CONSTANTS.DAYS_IN.WEEK)}const weekdayDateMap={Sun:new Date("2020-01-05T00:00:00.000Z"),Mon:new Date("2020-01-06T00:00:00.000Z"),Tue:new Date("2020-01-07T00:00:00.000Z"),Wed:new Date("2020-01-08T00:00:00.000Z"),Thu:new Date("2020-01-09T00:00:00.000Z"),Fri:new Date("2020-01-10T00:00:00.000Z"),Sat:new Date("2020-01-11T00:00:00.000Z")};function getWeekdayFormatter(){const e=()=>"",r={long:{timeZone:"UTC",weekday:"long"},short:{timeZone:"UTC",weekday:"short"},narrow:{timeZone:"UTC",weekday:"narrow"}};return"undefined"===typeof Intl||"undefined"===typeof Intl.DateTimeFormat?e:t;function t(t,e,a){try{const n=new Intl.DateTimeFormat(a||void 0,r[e]||r["long"]);return n.format(weekdayDateMap[t])}catch(e){return e instanceof Error&&console.error(`Intl.DateTimeFormat: ${e.message} -> day of week: `+t),""}}}function getWeekdayNames(t,a){const e=Object.keys(weekdayDateMap),n=getWeekdayFormatter();return e.map(e=>String(n(e,t,a)))}function getMonthFormatter(){const e=()=>"",o={long:{timeZone:"UTC",month:"long"},short:{timeZone:"UTC",month:"short"},narrow:{timeZone:"UTC",month:"narrow"}};return"undefined"===typeof Intl||"undefined"===typeof Intl.DateTimeFormat?e:t;function t(t,e,a){try{const n=new Intl.DateTimeFormat(a||void 0,o[e]||o["long"]),r=new Date;return r.setDate(1),r.setMonth(t),n.format(r)}catch(e){return e instanceof Error&&console.error(`Intl.DateTimeFormat: ${e.message} -> month: `+t),""}}}function getMonthNames(t,a){const n=getMonthFormatter();return[...Array(12).keys()].map(e=>n(e,t,a))}var Timestamp={PARSE_DATETIME:PARSE_DATETIME,PARSE_DATE:PARSE_DATE,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,TIME_CONSTANTS:TIME_CONSTANTS,FIRST_HOUR:FIRST_HOUR,today:today,getStartOfWeek:getStartOfWeek,getEndOfWeek:getEndOfWeek,getStartOfMonth:getStartOfMonth,getEndOfMonth:getEndOfMonth,parseTime:parseTime,validateTimestamp:validateTimestamp,parsed:parsed,parseTimestamp:parseTimestamp,parseDate:parseDate,getDayIdentifier:getDayIdentifier,getTimeIdentifier:getTimeIdentifier,getDayTimeIdentifier:getDayTimeIdentifier,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,createDayList:createDayList,createIntervalList:createIntervalList,createNativeLocaleFormatter:createNativeLocaleFormatter,makeDate:makeDate,makeDateTime:makeDateTime,validateNumber:validateNumber,isBetweenDates:isBetweenDates,isOverlappingDates:isOverlappingDates,daysBetween:daysBetween,weeksBetween:weeksBetween,addToDate:addToDate,compareTimestamps:compareTimestamps,compareDate:compareDate,compareTime:compareTime,compareDateTime:compareDateTime,getWeekdayFormatter:getWeekdayFormatter,getWeekdayNames:getWeekdayNames,getMonthFormatter:getMonthFormatter,getMonthNames:getMonthNames},Timestamp$1=Object.freeze({__proto__:null,DAYS_IN_MONTH:DAYS_IN_MONTH,DAYS_IN_MONTH_LEAP:DAYS_IN_MONTH_LEAP,DAYS_IN_MONTH_MAX:DAYS_IN_MONTH_MAX,DAYS_IN_MONTH_MIN:DAYS_IN_MONTH_MIN,DAY_MIN:DAY_MIN,FIRST_HOUR:FIRST_HOUR,MONTH_MAX:MONTH_MAX,MONTH_MIN:MONTH_MIN,PARSE_DATE:PARSE_DATE,PARSE_DATETIME:PARSE_DATETIME,PARSE_TIME:PARSE_TIME,TIME_CONSTANTS:TIME_CONSTANTS,addToDate:addToDate,compareDate:compareDate,compareDateTime:compareDateTime,compareTime:compareTime,compareTimestamps:compareTimestamps,copyTimestamp:copyTimestamp,createDayList:createDayList,createIntervalList:createIntervalList,createNativeLocaleFormatter:createNativeLocaleFormatter,daysBetween:daysBetween,daysInMonth:daysInMonth,default:Timestamp,diffTimestamp:diffTimestamp,findWeekday:findWeekday,getDate:getDate,getDateTime:getDateTime,getDayIdentifier:getDayIdentifier,getDayOfYear:getDayOfYear,getDayTimeIdentifier:getDayTimeIdentifier,getEndOfMonth:getEndOfMonth,getEndOfWeek:getEndOfWeek,getMonthFormatter:getMonthFormatter,getMonthNames:getMonthNames,getStartOfMonth:getStartOfMonth,getStartOfWeek:getStartOfWeek,getTime:getTime,getTimeIdentifier:getTimeIdentifier,getWeekday:getWeekday,getWeekdayFormatter:getWeekdayFormatter,getWeekdayNames:getWeekdayNames,getWorkWeek:getWorkWeek,isBetweenDates:isBetweenDates,isLeapYear:isLeapYear,isOverlappingDates:isOverlappingDates,isToday:isToday,makeDate:makeDate,makeDateTime:makeDateTime,maxTimestamp:maxTimestamp,minTimestamp:minTimestamp,moveRelativeDays:moveRelativeDays,nextDay:nextDay,padNumber:padNumber,parseDate:parseDate,parseTime:parseTime,parseTimestamp:parseTimestamp,parsed:parsed,prevDay:prevDay,relativeDays:relativeDays,today:today,updateDayOfYear:updateDayOfYear,updateDisabled:updateDisabled,updateFormatted:updateFormatted,updateMinutes:updateMinutes,updateRelative:updateRelative,updateWeekday:updateWeekday,updateWorkWeek:updateWorkWeek,validateNumber:validateNumber,validateTimestamp:validateTimestamp,weeksBetween:weeksBetween});function convertToUnit(e,t="px"){if(e)return isNaN(e)?String(e):"auto"===e?e:""+Number(e)+t}function indexOf(t,a){for(let e=0;e<t.length;e++)if(!0===a(t[e],e))return e;return-1}function minCharWidth(e,t){return 0===t?e:e.slice(0,t)}var helpers={convertToUnit:convertToUnit,indexOf:indexOf,minCharWidth:minCharWidth},helpers$1=Object.freeze({__proto__:null,convertToUnit:convertToUnit,default:helpers,indexOf:indexOf,minCharWidth:minCharWidth});const ResizeObserverDirective={mounted(e,t){if("function"===typeof t.value){const a=t.value,n={callback:a,size:{width:0,height:0},observer:new ResizeObserver(e=>{const t=e[0].contentRect;t.width===n.size.width&&t.height===n.size.height||(n.size.width=t.width,n.size.height=t.height,n.debounceTimeout&&clearTimeout(n.debounceTimeout),n.debounceTimeout=setTimeout(()=>{n.callback(n.size),n.debounceTimeout=void 0},100))})};n.observer.observe(e),e.__onResizeObserver=n}},beforeUnmount(e){if(e.__onResizeObserver){const{observer:t,debounceTimeout:a}=e.__onResizeObserver;a&&clearTimeout(a),t.unobserve(e),delete e.__onResizeObserver}}};function useCalendar(t,a,{scrollArea:e,pane:n}){if(!a){const l="[error: renderCalendar] no renderFunc has been supplied to useCalendar";throw console.error(l),new Error(l)}const r=reactive({width:0,height:0}),o=ref(null);function i({width:e,height:t}){r.width=e,r.height=t}const u=computed(()=>{return!0!==t.noScroll&&e.value&&n.value&&r.height?e.value.offsetWidth-n.value.offsetWidth:0});function d(){}function s(){const e={ref:o,role:"complementary",lang:t.locale,class:`q-calendar ${t.dark?"q-calendar--dark":""} `+(t.bordered?"q-calendar__bordered":"")};return withDirectives(h("div",{...e},[a()]),[[ResizeObserverDirective,i]])}return{rootRef:o,scrollWidth:u,__initCalendar:d,__renderCalendar:s}}const isValidFocusType=e=>e.every(e=>["day","date","weekday","interval","time","resource","task"].includes(e)),useCommonProps={modelValue:{type:String,default:today(),validator:e=>""===e||validateTimestamp(e)},weekdays:{type:Array,default:()=>[0,1,2,3,4,5,6]},dateType:{type:String,default:"round",validator:e=>["round","rounded","square"].includes(e)},weekdayAlign:{type:String,default:"center",validator:e=>["left","center","right"].includes(e)},dateAlign:{type:String,default:"center",validator:e=>["left","center","right"].includes(e)},bordered:Boolean,dark:Boolean,noAria:Boolean,noActiveDate:Boolean,noHeader:Boolean,noScroll:Boolean,shortWeekdayLabel:Boolean,noDefaultHeaderText:Boolean,noDefaultHeaderBtn:Boolean,minWeekdayLabel:{type:[Number,String],default:1},weekdayBreakpoints:{type:Array,default:()=>[75,35],validator:e=>2===e.length},locale:{type:String,default:"en-US"},animated:Boolean,transitionPrev:{type:String,default:"slide-right"},transitionNext:{type:String,default:"slide-left"},disabledDays:Array,disabledBefore:String,disabledAfter:String,disabledWeekdays:{type:Array,default:()=>[]},dragEnterFunc:Function,dragOverFunc:Function,dragLeaveFunc:Function,dropFunc:Function,selectedDates:{type:[Array,Set],default:()=>[]},selectedStartEndDates:{type:Array,default:()=>[]},hoverable:Boolean,focusable:Boolean,focusType:{type:Array,default:()=>["date"],validator:isValidFocusType}};function useCommon(t,{startDate:e,endDate:a,times:n}){const r=computed(()=>parseTimestamp(e.value)),o=computed(()=>{return"0000-00-00"===a.value?getEndOfWeek(r.value,t.weekdays,n.today):parseTimestamp(a.value)||r.value}),i=computed(()=>createNativeLocaleFormatter(t.locale,()=>({timeZone:"UTC",day:"numeric"}))),u=computed(()=>createNativeLocaleFormatter(t.locale,(e,t)=>({timeZone:"UTC",weekday:t?"short":"long"}))),d=computed(()=>createNativeLocaleFormatter(t.locale,()=>({timeZone:"UTC",dateStyle:"full"})));function s(e,t){return e&&e.length>0&&e.includes(t.date)}function l(e,t){const a={firstDay:!1,betweenDays:!1,lastDay:!1};if(2===e.length){const n=getDayIdentifier(t),r=getDayIdentifier(parsed(e[0])),o=getDayIdentifier(parsed(e[1]));a.firstDay=r===n,a.lastDay=o===n,a.betweenDays=r<n&&o>n}return a}function c(e,t=!1,a=[],n=[],r=!1){const o=s(a,e),{firstDay:i,lastDay:u,betweenDays:d}=l(n,e);return{"q-past-day":!i&&!d&&!u&&!o&&!t&&!!e.past,"q-future-day":!i&&!d&&!u&&!o&&!t&&!!e.future,"q-outside":t,"q-current-day":!!e.current,"q-selected":o,"q-range-first":i,"q-range":d,"q-range-last":u,"q-range-hover":r&&(i||u||d),"q-disabled-day disabled":!0===e.disabled}}function m(e){return getStartOfWeek(e,t.weekdays,n.today)}function p(e){return getEndOfWeek(e,t.weekdays,n.today)}function y(){return{}}return{parsedStart:r,parsedEnd:o,dayFormatter:i,weekdayFormatter:u,ariaDateFormatter:d,arrayHasDate:s,checkDays:l,getRelativeClasses:c,startOfWeek:m,endOfWeek:p,dayStyleDefault:y}}function scrollTo(e,t){e instanceof Window?e.scrollTo({top:t,behavior:"instant"}):e.scrollTop=t}function getVerticalScrollPosition(e){return e instanceof Window?e.scrollY:e.scrollTop}function animVerticalScrollTo(o,i,u=500,d=performance.now(),s=getVerticalScrollPosition(o)){u<=0||s===i?scrollTo(o,i):requestAnimationFrame(e=>{const t=e-d,a=Math.min(t/u,1),n=e=>e<.5?2*e*e:(4-2*e)*e-1,r=s+(i-s)*n(a);scrollTo(o,r),a<1&&animVerticalScrollTo(o,i,u,d,s)})}function animHorizontalScrollTo(r,e,o=500){const i=r.scrollLeft,u=e-i;let d=null;function s(e){null===d&&(d=e);const t=e-d,a=Math.min(t/o,1),n=e=>e<.5?2*e*e:(4-2*e)*e-1;r.scrollLeft=i+u*n(a),t<o&&requestAnimationFrame(s)}requestAnimationFrame(s)}const useSchedulerProps={view:{type:String,validator:e=>["day","week","month","month-interval"].includes(e),default:"day"},modelResources:{type:Array},resourceKey:{type:String,default:"id"},resourceLabel:{type:String,default:"label"},resourceHeight:{type:[Number,String],default:0,validator:validateNumber},resourceMinHeight:{type:[Number,String],default:70,validator:validateNumber},resourceStyle:{type:Function,default:null},resourceClass:{type:Function,default:null},weekdayStyle:{type:Function,default:null},weekdayClass:{type:Function,default:null},dayStyle:{type:Function,default:null},dayClass:{type:Function,default:null},dateHeader:{type:String,default:"stacked",validator:e=>["stacked","inline","inverted"].includes(e)}};function useInterval(o,{times:t,scrollArea:n,parsedStart:e,parsedEnd:a,maxDays:r,size:i,headerColumnRef:u}){const d=computed(()=>parseInt(String(o.intervalStart),10)),m=computed(()=>parseInt(String(o.intervalMinutes),10)),s=computed(()=>parseInt(String(o.intervalCount),10)),p=computed(()=>parseFloat(String(o.intervalHeight))),y=computed(()=>{let e=0;const t=Number(o.columnCount);return o.cellWidth?e=Number(o.cellWidth):i.width>0&&u.value&&(e=u.value.offsetWidth/(t>1?t:r.value)),e}),l=computed(()=>d.value*m.value),c=computed(()=>s.value*p.value),v=computed(()=>s.value*y.value),f=computed(()=>D(e.value)),h=computed(()=>k(a.value)),g=computed(()=>{return createDayList(e.value,a.value,t.today,o.weekdays,o.disabledBefore,o.disabledAfter,o.disabledWeekdays,o.disabledDays,r.value)}),T=computed(()=>{return g.value.map(e=>createIntervalList(e,d.value,m.value,s.value,t.now))});function D(e){return getStartOfWeek(e,o.weekdays,t.today)}function k(e){return getEndOfWeek(e,o.weekdays,t.today)}function _(e,t){return e&&e.length>0&&e.includes(getDateTime(t))}function w(e,t){const a={firstDay:!1,betweenDays:!1,lastDay:!1};if(e&&2===e.length){const n=getDayTimeIdentifier(t),r=getDayTimeIdentifier(parsed(e[0])),o=getDayTimeIdentifier(parsed(e[1]));a.firstDay=r===n,a.lastDay=o===n,a.betweenDays=r<n&&o>n}return a}function I(e,t=[],a=[]){const n=_(t,e),{firstDay:r,lastDay:o,betweenDays:i}=w(a,e);return{"q-selected":n,"q-range-first":!0===r,"q-range":!0===i,"q-range-last":!0===o,"q-disabled-interval disabled":!0===e.disabled}}function M(e,t,a){return[]}const b=computed(()=>{const a={timeZone:"UTC",hour12:!o.hour24Format,hour:"2-digit",minute:"2-digit"},n={timeZone:"UTC",hour12:!o.hour24Format,hour:"numeric",minute:"2-digit"},r={timeZone:"UTC",hour12:!o.hour24Format,hour:"numeric"};return createNativeLocaleFormatter(o.locale,(e,t)=>t?0===e.minute?r:n:a)}),N=computed(()=>{const e={timeZone:"UTC",dateStyle:"full",timeStyle:"short"};return createNativeLocaleFormatter(o.locale,()=>e)});function S(e){const t=T.value[0][0],a=t.hour===e.hour&&t.minute===e.minute;return!a&&0===e.minute}function E(e){}function A(e){return{}}function O(e,t,a=!1,n){let r=copyTimestamp(t);if(e.currentTarget){const o=e.currentTarget.getBoundingClientRect(),i=e,u=e,d=i.changedTouches||i.touches,s=(d&&d[0]?d[0]:u).clientY,l=(s-o.top)/p.value,c=Math.floor((a?Math.floor(l):l)*m.value);0!==c&&(r=addToDate(r,{minute:c})),n&&(r=updateRelative(r,n,!0))}return r}function H(e,t,a=!1,n){let r=copyTimestamp(t);const o=e.currentTarget.getBoundingClientRect(),i=e,u=e,d=i.changedTouches||i.touches,s=(d&&d[0]?d[0]:u).clientY,l=(s-o.top)/p.value,c=Math.floor((a?Math.floor(l):l)*m.value);return 0!==c&&(r=addToDate(r,{minute:c})),n&&(r=updateRelative(r,n,!0)),r}function x(e,t,a=!1,n){let r=copyTimestamp(t);if(e.currentTarget){const o=e.currentTarget.getBoundingClientRect(),i=e,u=e,d=i.changedTouches||i.touches,s=(d&&d[0]?d[0]:u).clientX,l=(s-o.left)/y.value,c=Math.floor((a?Math.floor(l):l)*m.value);0!==c&&(r=addToDate(r,{minute:c})),n&&(r=updateRelative(r,n,!0))}return r}function q(e,t){const a={timestamp:e,timeStartPos:C,timeDurationHeight:F};return void 0!==t&&(a.columnIndex=t),a}function L(e,t){const a={timestamp:copyTimestamp(e),timeStartPosX:R,timeDurationWidth:W};return void 0!==t&&(a.index=t),a}function U(e,t=0){const a=C(e);return!(!1===a||!n.value)&&(animVerticalScrollTo(n.value,a,t),!0)}function Y(e,t=0){const a=R(e);return!(!1===a||!n.value)&&(animHorizontalScrollTo(n.value,a,t),!0)}function F(e){return e/m.value*p.value}function W(e){return e/m.value*y.value}function P(e){return e*m.value/p.value}function B(e){return e*m.value/y.value}function C(e,t=!0){const a=parseTime(e);if(!1===a)return!1;const n=l.value,r=s.value*m.value,o=(a-n)/r;let i=o*c.value;return t&&(i<0&&(i=0),i>c.value)&&(i=c.value),i}function R(e,t=!0){const a=parseTime(e);if(!1===a)return!1;const n=l.value,r=s.value*m.value,o=(a-n)/r;let i=o*v.value;return t&&(i<0&&(i=0),i>v.value)&&(i=v.value),i}return{parsedIntervalStart:d,parsedIntervalMinutes:m,parsedIntervalCount:s,parsedIntervalHeight:p,parsedCellWidth:y,parsedStartMinute:l,bodyHeight:c,bodyWidth:v,parsedWeekStart:f,parsedWeekEnd:h,days:g,intervals:T,intervalFormatter:b,ariaDateTimeFormatter:N,arrayHasDateTime:_,checkIntervals:w,getIntervalClasses:I,getResourceClasses:M,showIntervalLabelDefault:S,showResourceLabelDefault:E,styleDefault:A,getTimestampAtEventInterval:O,getTimestampAtEvent:H,getTimestampAtEventX:x,getScopeForSlot:q,getScopeForSlotX:L,scrollToTime:U,scrollToTimeX:Y,timeDurationHeight:F,timeDurationWidth:W,heightToMinutes:P,widthToMinutes:B,timeStartPos:C,timeStartPosX:R}}const useColumnProps={columnCount:{type:[Number,String],default:0,validator:validateNumber},columnIndexStart:{type:[Number,String],default:0,validator:validateNumber}},useMaxDaysProps={maxDays:{type:Number,default:1}},useTimesProps={now:{type:String,validator:e=>""===e||validateTimestamp(e),default:""}};function useTimes(e){const t=reactive({now:parseTimestamp("0000-00-00 00:00"),today:parseTimestamp("0000-00-00")}),a=computed(()=>e.now?parseTimestamp(e.now):o());function n(){t.now&&t.today&&(t.now.current=t.today.current=!0,t.now.past=t.today.past=!1,t.now.future=t.today.future=!1)}function r(){const e=a.value||o();i(e,t.now),u(e,t.now),i(e,t.today)}function o(){return parseDate(new Date)}function i(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)}function u(e,t){e.time!==t.time&&(t.hour=e.hour,t.minute=e.minute,t.time=e.time)}return watch(a,()=>r()),{times:t,parsedNow:a,setCurrent:n,updateCurrent:r,getNow:o,updateDay:i,updateTime:u}}function useRenderValues(r,{parsedView:o,parsedValue:i,times:u}){const e=computed(()=>{const e=i.value;let t=r.maxDays,a=e,n=e;switch(o.value){case"month":a=getStartOfMonth(e),n=getEndOfMonth(e),t=daysInMonth(a.year,a.month);break;case"week":case"week-agenda":case"week-scheduler":a=getStartOfWeek(e,r.weekdays,u.today),n=getEndOfWeek(a,r.weekdays,u.today),t=r.weekdays.length;break;case"day":case"scheduler":case"agenda":n=moveRelativeDays(copyTimestamp(n),nextDay,t>1?t-1:t,r.weekdays),n=updateFormatted(n);break;case"month-interval":case"month-scheduler":case"month-agenda":a=getStartOfMonth(e),n=getEndOfMonth(e),n=updateFormatted(n),t=daysInMonth(a.year,a.month);break;case"resource":t=1,n=moveRelativeDays(copyTimestamp(n),nextDay,t,r.weekdays),n=updateFormatted(n);break}return{start:a,end:n,maxDays:t}});return{renderValues:e}}const toCamelCase=e=>e.replace(/(-\w)/g,e=>e[1].toUpperCase());function getMouseEventHandlers(t,e,a,n){const r={};for(const o in a){const i=a[o],u=toCamelCase("on-"+o);if(!e.value)return console.warn("$listeners has not been set up"),{};if(void 0!==e.value[u]){const d="on"+i.event.charAt(0).toUpperCase()+i.event.slice(1),s=e=>{return(void 0===i.button||"buttons"in e&&e.buttons>0&&e.button===i.button)&&(i.prevent&&e.preventDefault(),i.stop&&e.stopPropagation(),t(o,n(e,o))),i.result};d in r?Array.isArray(r[d])?r[d].push(s):r[d]=[r[d],s]:r[d]=s}}return r}function getDefaultMouseEventHandlers(e,t,a,n){return getMouseEventHandlers(e,t,getMouseEventName(a),n)}function getMouseEventName(e){return{["click"+e]:{event:"click"},["contextmenu"+e]:{event:"contextmenu",prevent:!0,result:!1},["mousedown"+e]:{event:"mousedown"},["mousemove"+e]:{event:"mousemove"},["mouseup"+e]:{event:"mouseup"},["mouseenter"+e]:{event:"mouseenter"},["mouseleave"+e]:{event:"mouseleave"},["touchstart"+e]:{event:"touchstart"},["touchmove"+e]:{event:"touchmove"},["touchend"+e]:{event:"touchend"}}}function getRawMouseEvents(e){return Object.keys(getMouseEventName(e))}function useMouseEvents(a,n){return{getMouseEventHandlers:(e,t)=>getMouseEventHandlers(a,n,e,t),getDefaultMouseEventHandlers:(e,t)=>getDefaultMouseEventHandlers(a,n,e,t),getMouseEventName:getMouseEventName,getRawMouseEvents:getRawMouseEvents}}const useMoveEmits=["moved"];function useMove(d,{parsedView:s,parsedValue:l,direction:c,maxDays:m,times:p,emittedValue:y,emit:v}){function e(a=1){if(0===a)y.value=today();else{let e=copyTimestamp(l.value);const n=getEndOfMonth(e),r=a>0,o=r?nextDay:prevDay,i=r?n.day:1;let t=r?a:-a;c.value=r?"next":"prev";const u=d.weekdays.length;while(--t>=0)switch(s.value){case"month":e.day=i,e=o(e),e=updateWeekday(e);while(!d.weekdays.includes(Number(e.weekday)))e=addToDate(e,{day:r?1:-1});break;case"week":case"week-agenda":case"week-scheduler":e=relativeDays(e,o,u,d.weekdays);break;case"day":case"scheduler":case"agenda":e=relativeDays(e,o,m.value,d.weekdays);break;case"month-interval":case"month-agenda":case"month-scheduler":e.day=i,e=o(e);break;case"resource":e=relativeDays(e,o,m.value,d.weekdays);break}e=updateWeekday(e),e=updateFormatted(e),e=updateDayOfYear(e),e=updateRelative(e,p.now),y.value=e.date,v("moved",e)}}return{move:e}}const listenerRE=/^on[A-Z]/;function useEmitListeners(e=getCurrentInstance()){return{emitListeners:computed(()=>{const t={};return e?.vnode?.props&&Object.keys(e.vnode.props).forEach(e=>{listenerRE.test(e)&&(t[e]=!0)}),t})}}function useFocusHelper(){const e={"aria-hidden":"true",class:"q-calendar__focus-helper"};return[h("span",e)]}function useButton(){function e({focusable:e,focusType:t},a,n){const r=e&&t.includes("date");return h("button",{...a,tabindex:r?0:-1},[n,r&&useFocusHelper()])}return{renderButton:e}}const useCellWidthProps={cellWidth:[Number,String]};function useCellWidth(e){const t=computed(()=>void 0!==e.cellWidth);return{isSticky:t}}const useCheckChangeEmits=["change"];function useCheckChange(n,{days:r,lastStart:o,lastEnd:i}){function e(){const e=r.value;if(0===e.length)return!1;const t=e[0].date,a=e[e.length-1].date;return(!o.value||!i.value||t!==o.value||a!==i.value)&&(o.value=t,i.value=a,n("change",{start:t,end:a,days:e}),!0)}return{checkChange:e}}function useEventUtils(){function e(e,t){return(Array.isArray(t)?t:[t]).includes(e.keyCode)}return{isKeyCode:e}}const isKeyCode=useEventUtils().isKeyCode,useNavigationProps={useNavigation:Boolean};function useNavigation(t,{rootRef:a,focusRef:n,focusValue:r,datesRef:o,parsedView:i,emittedValue:u,direction:d,times:s}){let e=!1;function l(){e||document&&(e=!0,document.addEventListener("keyup",v),document.addEventListener("keydown",y))}function c(){document&&(document.removeEventListener("keyup",v),document.removeEventListener("keydown",y),e=!1)}function m(e){if(e&&document){const t=document.activeElement;if(t!==document.body&&a.value?.contains(t))return!0}return!1}function p(){let t=0;const a=window.setInterval(()=>{const e=o.value[n.value];e&&(e.focus(),50!==++t)&&document.activeElement!==e||window.clearInterval(a)},250)}function y(e){m(e)&&isKeyCode(e,[33,34,35,36,37,38,39,40])&&(e.stopPropagation(),e.preventDefault())}function v(e){if(m(e)&&isKeyCode(e,[33,34,35,36,37,38,39,40])){const t={33:D,34:k,35:w,36:_,37:g,38:f,39:T,40:h};t[e.keyCode]?.()}}function f(){let e=copyTimestamp(r.value);if("month"===i.value){if(e=addToDate(e,{day:-7}),r.value.month!==e.month)return d.value="prev",void(u.value=e.date)}else e=addToDate(e,{minute:Number(t.intervalMinutes)});d.value="prev",n.value=e.date}function h(){let e=copyTimestamp(r.value);if("month"===i.value){if(e=addToDate(e,{day:7}),r.value.month!==e.month)return d.value="next",void(u.value=e.date)}else e=addToDate(e,{minute:Number(t.intervalMinutes)});d.value="next",n.value=e.date}function g(){let e=copyTimestamp(r.value);d.value="prev";do{e=addToDate(e,{day:-1})}while(!t.weekdays.includes(Number(e.weekday)));n.value=e.date}function T(){let e=copyTimestamp(r.value);d.value="next";do{e=addToDate(e,{day:1})}while(!t.weekdays.includes(Number(e.weekday)));n.value=e.date}function D(){let e=copyTimestamp(r.value);e="month"===i.value?addToDate(e,{month:-1}):addToDate(e,{day:-7}),d.value="prev",n.value=e.date}function k(){let e=copyTimestamp(r.value);e="month"===i.value?addToDate(e,{month:1}):addToDate(e,{day:7}),d.value="next",n.value=e.date}function _(){let e=copyTimestamp(r.value);e="month"===i.value?getStartOfMonth(e):getStartOfWeek(e,t.weekdays||[],s.today);while(!t.weekdays.includes(Number(e.weekday)))e=addToDate(e,{day:-1});n.value=e.date}function w(){let e=copyTimestamp(r.value);e="month"===i.value?getEndOfMonth(e):getEndOfWeek(e,t.weekdays||[],s.today);while(!t.weekdays.includes(Number(e.weekday)))e=addToDate(e,{day:-1});n.value=e.date}return onBeforeUnmount(()=>{c()}),watch(()=>t.useNavigation,e=>{(!0===e?l:c)()}),!0===t.useNavigation&&l(),{startNavigation:l,endNavigation:c,tryFocus:p}}const renderButton=useButton().renderButton;var QCalendarScheduler=defineComponent({name:"QCalendarScheduler",directives:{ResizeObserver:ResizeObserverDirective},props:{...useCommonProps,...useSchedulerProps,...useColumnProps,...useMaxDaysProps,...useTimesProps,...useCellWidthProps,...useNavigationProps},emits:["update:model-value","update:model-resources","resource-expanded",...useCheckChangeEmits,...useMoveEmits,...getRawMouseEvents("-date"),...getRawMouseEvents("-day-resource"),...getRawMouseEvents("-head-resources"),...getRawMouseEvents("-head-day"),...getRawMouseEvents("-resource")],setup(f,{slots:g,emit:T,expose:x}){const e=ref(null),t=ref(null),q=ref(null),p=ref(f.modelValue||today()),a=ref(parsed(f.modelValue||today())),y=ref({}),L=ref({}),n=ref(),r=ref(),u=ref("next"),d=ref(f.modelValue||today()),s=ref("0000-00-00"),l=ref(0),D=ref(f.modelValue),c=reactive({width:0,height:0}),v=ref(""),k=ref(""),U=ref(null),Y=ref(null),o=(watch(()=>f.view,()=>{l.value=0}),computed(()=>{return"month"===f.view?"month-interval":f.view})),P=getCurrentInstance();if(null===P)throw new Error("current instance is null");const _=useEmitListeners(P).emitListeners,w=useCellWidth(f).isSticky,{times:i,setCurrent:B,updateCurrent:V}=useTimes(f),{parsedStart:z,parsedEnd:K,dayFormatter:Z,weekdayFormatter:$,ariaDateFormatter:X,dayStyleDefault:j,getRelativeClasses:I}=(V(),B(),useCommon(f,{startDate:d,endDate:s,times:i})),M=computed(()=>{return parseTimestamp(f.modelValue,i.now)||z.value||i.today}),Q=(a.value=M.value,p.value=M.value.date,useRenderValues(f,{parsedView:o,parsedValue:M,times:i})).renderValues,{rootRef:m,scrollWidth:G,__renderCalendar:J}=useCalendar(f,Ce,{scrollArea:e,pane:t}),{days:b,parsedCellWidth:N,styleDefault:ee}=useInterval(f,{times:i,scrollArea:e,parsedStart:z,parsedEnd:K,maxDays:l,size:c,headerColumnRef:q}),S=useMove(f,{parsedView:o,parsedValue:M,direction:u,maxDays:l,times:i,emittedValue:D,emit:T}).move,E=useMouseEvents(T,_).getDefaultMouseEventHandlers,te=useCheckChange(T,{days:b,lastStart:U,lastEnd:Y}).checkChange,A=useEventUtils().isKeyCode,ae=useNavigation(f,{rootRef:m,focusRef:p,focusValue:a,datesRef:y,parsedView:o,emittedValue:D,direction:u,times:i}).tryFocus,O=computed(()=>{const e=parseInt(String(f.columnCount),10);return"day"===o.value&&e>1?e:"day"===o.value&&f.maxDays&&f.maxDays>1?f.maxDays:b.value.length}),ne=computed(()=>{return m.value?parseInt(window.getComputedStyle(m.value).getPropertyValue("--calendar-resources-width"),10):0}),F=computed(()=>{const e=parseInt(String(f.resourceHeight),10);return 0===e?"auto":e}),re=computed(()=>{return parseInt(String(f.resourceMinHeight),10)}),W=computed(()=>{if(m.value){const e=c.width||m.value.getBoundingClientRect().width;if(e&&ne.value&&O.value)return(e-G.value-ne.value)/O.value+"px"}return 100/O.value+"%"});function oe(){D.value=today()}function ie(e=1){S(e)}function ue(e=1){S(-e)}function de({width:e,height:t}){c.width=e,c.height=t}function C(e){return e.date===D.value}function se(){return h("div",{roll:"presentation",class:{"q-calendar-scheduler__head":!0,"q-calendar__sticky":!0===w.value},style:{marginRight:G.value+"px"}},[le(),ce()])}function le(){const e=g["head-resources"],t={days:b.value,timestamps:b.value,date:f.modelValue,resources:f.modelResources};return h("div",{class:{"q-calendar-scheduler__head--resources":!0,"q-calendar__sticky":!0===w.value},...E("-head-resources",e=>{return{scope:t,event:e}})},[e&&e({scope:t})])}function ce(){return h("div",{ref:q,class:{"q-calendar-scheduler__head--days__column":!0}},[me(),pe()])}function me(){return h("div",{class:{"q-calendar-scheduler__head--days__weekdays":!0}},[...ye()])}function pe(){const e=g["head-days-events"];return nextTick(()=>{if(r.value&&0===parseInt(String(f.columnCount),10)&&window)try{const e=window.getComputedStyle(r.value);n.value&&n.value.parentElement&&(n.value.parentElement.style.height=e.height,n.value.style.height=e.height)}catch{}}),h("div",{class:{"q-calendar-scheduler__head--days__event":!0}},[e&&h("div",{ref:n,style:{position:"absolute",left:0,top:0,right:0,overflow:"hidden",zIndex:1}},[e({scope:{timestamps:b.value,days:b.value,ref:r}})]),...ve()])}function ye(){const e=parseInt(String(f.columnCount),10),a=parseInt(String(f.columnIndexStart),10);return 1===b.value.length&&e>0?Array.apply(null,new Array(e)).map((e,t)=>t+a).map(e=>fe(b.value[0],e)):b.value.map(e=>fe(e,0))}function ve(){const e=parseInt(String(f.columnCount),10),a=parseInt(String(f.columnIndexStart),10);return 1===b.value.length&&e>0?Array.apply(null,new Array(e)).map((e,t)=>t+a).map(e=>ge(b.value[0],e)):b.value.map(e=>ge(e,0))}function fe(t,e){const a=g["head-day"],n=g["head-date"],r=!0!==f.noActiveDate&&C(t),o={timestamp:t,activeDate:r,droppable:v.value===t.date,disabled:!!f.disabledWeekdays&&f.disabledWeekdays.includes(Number(t.weekday)),columnIndex:e??0},i=!0===w.value?convertToUnit(N.value):W.value,u=f.weekdayStyle||j,d={width:i,maxWidth:i,minWidth:i,...u({scope:o})},s=(!0===w.value&&(d.minWidth=i),"function"===typeof f.weekdayClass?f.weekdayClass({scope:o}):{}),l=!0===f.focusable&&f.focusType.includes("weekday"),c=t.date+(void 0!==e?"-"+e:""),m={key:c,ref:e=>{null!==e&&(y.value[c]=e)},tabindex:!0===l?0:-1,class:{"q-calendar-scheduler__head--day":!0,...s,...I(t),"q-active-date":r,"q-calendar__hoverable":!0===f.hoverable,"q-calendar__focusable":!0===l},style:d,onFocus:()=>{!0===l&&(p.value=c)},onKeydown:e=>{!0!==t.disabled&&A(e,[13,32])&&(e.stopPropagation(),e.preventDefault())},onKeyup:e=>{!0!==t.disabled&&A(e,[13,32])&&(D.value=t.date)},...E("-head-day",e=>{return{scope:o,event:e}}),onDragenter:e=>{void 0!==f.dragEnterFunc&&"function"===typeof f.dragEnterFunc&&(!0===f.dragEnterFunc(e,"head-day",{scope:o})?v.value=t.date:v.value="")},onDragover:e=>{void 0!==f.dragOverFunc&&"function"===typeof f.dragOverFunc&&(!0===f.dragOverFunc(e,"head-day",{scope:o})?v.value=t.date:v.value="")},onDragleave:e=>{void 0!==f.dragLeaveFunc&&"function"===typeof f.dragLeaveFunc&&(!0===f.dragLeaveFunc(e,"head-day",{scope:o})?v.value=t.date:v.value="")},onDrop:e=>{void 0!==f.dropFunc&&"function"===typeof f.dropFunc&&(!0===f.dropFunc(e,"head-day",{scope:o})?v.value=t.date:v.value="")}};return h("div",m,[void 0!==a&&a({scope:o}),void 0===a&&ke(t,e),void 0===a&&he(t),void 0===a&&n&&n({scope:o}),void 0===a&&_e(t,e),useFocusHelper()])}function he(e){return"stacked"===f.dateHeader?[!0!==f.noDefaultHeaderText?R(e):[],!0!==f.noDefaultHeaderBtn?H(e):[]].flat():"inline"===f.dateHeader?("left"===f.weekdayAlign&&"right"===f.dateAlign||"right"===f.weekdayAlign&&f.dateAlign,h("div",{class:"q-calendar__header--inline"},[!0!==f.noDefaultHeaderText&&R(e),!0!==f.noDefaultHeaderBtn&&H(e)])):"inverted"===f.dateHeader?("left"===f.weekdayAlign&&"right"===f.dateAlign||"right"===f.weekdayAlign&&f.dateAlign,h("div",{class:"q-calendar__header--inline"},[!0!==f.noDefaultHeaderBtn&&H(e),!0!==f.noDefaultHeaderText&&R(e)])):void 0}function ge(e,t){const a=g["head-day-event"],n=!0!==f.noActiveDate&&C(e),r={timestamp:e,activeDate:n,droppable:v.value===e.date,disabled:!!f.disabledWeekdays&&f.disabledWeekdays.includes(Number(e.weekday)),columnIndex:t??0},o=!0===w.value?convertToUnit(N.value):W.value,i={width:o,maxWidth:o,minWidth:o};return!0===w.value&&(i.minWidth=o),h("div",{key:"event-"+e.date+(void 0!==t?"-"+t:""),class:{"q-calendar-scheduler__head--day__event":!0,...I(e),"q-active-date":n},style:i},[a&&a({scope:r})])}function R(e){const t=g["head-weekday-label"],a=!0===f.shortWeekdayLabel,n={timestamp:e,shortWeekdayLabel:a},r={class:{"q-calendar-scheduler__head--weekday":!0,["q-calendar__"+f.weekdayAlign]:!0,"q-calendar__ellipsis":!0}};return h("div",r,t&&t({scope:n})||Te(e,a))}function Te(e,t){const a=$.value(e,t||f.weekdayBreakpoints[0]>0&&N.value<=f.weekdayBreakpoints[0]);return h("span",{class:"q-calendar-scheduler__head--weekday-label q-calendar__ellipsis"},f.weekdayBreakpoints[1]>0&&N.value<=f.weekdayBreakpoints[1]?minCharWidth(a,Number(f.minWeekdayLabel)):a)}function H(e){const t={class:{"q-calendar-scheduler__head--date":!0,["q-calendar__"+f.dateAlign]:!0}};return h("div",t,De(e))}function De(a){const e=!0!==f.noActiveDate&&C(a),t=Z.value(a,!1),n=g["head-day-label"],r=g["head-day-button"],o={dayLabel:t,timestamp:a,activeDate:e},i={class:{"q-calendar-scheduler__head--day__label":!0,"q-calendar__button":!0,"q-calendar__button--round":"round"===f.dateType,"q-calendar__button--rounded":"rounded"===f.dateType,"q-calendar__button--bordered":!0===a.current,"q-calendar__focusable":!0},disabled:a.disabled,onKeydown:e=>{!0!==a.disabled&&A(e,[13,32])&&(e.stopPropagation(),e.preventDefault())},onKeyup:e=>{!0!==a.disabled&&A(e,[13,32])&&(D.value=a.date,void 0!==_.value.onClickDate)&&T("click-date",{scope:o})},...E("-date",(e,t)=>{return"click-date"!==t&&"contextmenu-date"!==t||(D.value=a.date,"click-date"===t&&e.preventDefault()),{scope:o,event:e}})};return!0!==f.noAria&&(i.ariaLabel=X.value(a,!1)),r?h("div",[r({scope:o})]):renderButton(f,i,n?n({scope:o}):t)}function ke(e,t){const a=g["column-header-before"];if(a){const n={timestamp:e,columnIndex:t};return h("div",{class:"q-calendar-scheduler__column-header--before"},[a({scope:n})])}}function _e(e,t){const a=g["column-header-after"];if(a){const n={timestamp:e,columnIndex:t};return h("div",{class:"q-calendar-scheduler__column-header--after"},[a({scope:n})])}}function we(){return h("div",{class:"q-calendar-scheduler__body"},[Ie()])}function Ie(){return!0===w.value?h("div",{ref:e,class:{"q-calendar-scheduler__scroll-area":!0,"q-calendar__scroll":!0}},[!0!==w.value&&Ae(),be()]):!0===f.noScroll?Me():h("div",{ref:e,class:{"q-calendar-scheduler__scroll-area":!0,"q-calendar__scroll":!0}},[Me()])}function Me(){return h("div",{ref:t,class:"q-calendar-scheduler__pane"},[be()])}function be(){return h("div",{class:"q-calendar-scheduler__day--container"},[!0===w.value&&!0!==f.noHeader&&se(),Ne()])}function Ne(e=void 0,a=0,n=!0){return void 0===e&&(e=f.modelResources),e.map((e,t)=>{return Se(e,t,a,void 0!==e.children?e.expanded:n)}).flat()}function Se(e,t,a=0,n=!0){const r={},o=(r.height=void 0!==e.height?convertToUnit(parseInt(e.height,10)):F.value?convertToUnit(F.value):"auto",re.value>0&&(r.minHeight=convertToUnit(re.value)),h("div",{key:e[f.resourceKey]+"-"+t,class:{"q-calendar-scheduler__resource--row":!0},style:r},[Ee(e,t,a,n),Ae(e,t,a,n)]));return void 0!==e.children?[o,h("div",{class:{"q-calendar__child":!0,"q-calendar__child--expanded":!0===n,"q-calendar__child--collapsed":!0!==n}},[Ne(e.children,a+1,!1===n?n:e.expanded)])]:[o]}function Ee(t,e,a=0,n=!0){const r=g["resource-label"],o=parseInt(String(f.resourceMinHeight),10),i={},u=(i.height=void 0!==t.height?convertToUnit(parseInt(t.height,10)):F.value?convertToUnit(F.value):"auto",o>0&&(i.minHeight=convertToUnit(o)),f.resourceStyle||ee),d=t[f.resourceLabel],s=!0===f.focusable&&f.focusType.includes("resource")&&!0===n,l=t[f.resourceKey],c={resource:t,timestamps:b.value,days:b.value,resourceIndex:e,indentLevel:a,label:d,droppable:k.value===l},m="function"===typeof f.resourceClass?f.resourceClass({scope:c}):{};return h("div",{key:t[f.resourceKey]+"-"+e,ref:e=>{null!==e&&(L.value[t[f.resourceKey]]=e)},tabindex:!0===s?0:-1,class:{"q-calendar-scheduler__resource":0===a,"q-calendar-scheduler__resource--section":0!==a,...m,"q-calendar__sticky":!0===w.value,"q-calendar__hoverable":!0===f.hoverable,"q-calendar__focusable":!0===s},style:{...i,...u({scope:c})},onDragenter:e=>{void 0!==f.dragEnterFunc&&"function"===typeof f.dragEnterFunc&&(!0===f.dragEnterFunc(e,"resource",{scope:c})?k.value=l:k.value="")},onDragover:e=>{void 0!==f.dragOverFunc&&"function"===typeof f.dragOverFunc&&(!0===f.dragOverFunc(e,"resource",{scope:c})?k.value=l:k.value="")},onDragleave:e=>{void 0!==f.dragLeaveFunc&&"function"===typeof f.dragLeaveFunc&&(!0===f.dragLeaveFunc(e,"resource",{scope:c})?k.value=l:k.value="")},onDrop:e=>{void 0!==f.dropFunc&&"function"===typeof f.dropFunc&&(!0===f.dropFunc(e,"resource",{scope:c})?k.value=l:k.value="")},onKeydown:e=>{A(e,[13,32])&&(e.stopPropagation(),e.preventDefault())},onKeyup:e=>{A(e,[13,32])&&void 0!==_.value.onClickResource&&T("click-resource",{scope:c,event:e})},...E("-resource",e=>{return{scope:c,event:e}})},[[h("div",{class:{"q-calendar__parent":void 0!==t.children,"q-calendar__parent--expanded":void 0!==t.children&&!0===t.expanded,"q-calendar__parent--collapsed":void 0!==t.children&&!0!==t.expanded},onClick:e=>{e.stopPropagation(),t.expanded=!t.expanded,T("resource-expanded",{expanded:t.expanded,scope:c})}}),h("div",{class:{"q-calendar-scheduler__resource--text":!0,"q-calendar__ellipsis":!0},style:{paddingLeft:10*a+2+"px"}},[r?r({scope:c}):d]),useFocusHelper()]])}function Ae(e,t,a=0,n=!0){const r=g["resource-days"],o=!0===w.value?convertToUnit(N.value):W.value,i={resource:e,resourceIndex:t,indentLevel:a,expanded:n,cellWidth:o,timestamps:b.value,days:b.value},u={},d=(u.height=parseInt(String(f.resourceHeight),10)>0?convertToUnit(parseInt(String(f.resourceHeight),10)):"auto",parseInt(String(f.resourceMinHeight),10)>0&&(u.minHeight=convertToUnit(parseInt(String(f.resourceMinHeight),10))),{class:"q-calendar-scheduler__resource--days",style:u});return h("div",d,[...Oe(e,t,a,n),r&&r({scope:i})])}function Oe(t,a,n=0,r=!0){return 1===b.value.length&&parseInt(String(f.columnCount),10)>0?Array.apply(null,new Array(parseInt(String(f.columnCount),10))).map((e,t)=>t+parseInt(String(f.columnIndexStart),10)).map(e=>Fe(b.value[0],e,t,a,n,r)):b.value.map(e=>Fe(e,0,t,a,n,r))}function Fe(e,t,a,n,r=0,o=!0){const i=g.day,u=f.dayStyle||j,d=!0!==f.noActiveDate&&M.value.date===e.date,s=e.date+":"+a[f.resourceKey]+(void 0!==t?":"+t:""),l=k.value===s,c={timestamp:e,columnIndex:t,resource:a,resourceIndex:n,indentLevel:r,activeDate:d,droppable:l},m=!0===w.value?convertToUnit(N.value):W.value,p={width:m,maxWidth:m,...u({scope:c})},y=(p.height=parseInt(String(f.resourceHeight),10)>0?convertToUnit(parseInt(String(f.resourceHeight),10)):"auto",parseInt(String(f.resourceMinHeight),10)>0&&(p.minHeight=convertToUnit(parseInt(String(f.resourceMinHeight),10))),"function"===typeof f.dayClass?f.dayClass({scope:c}):{}),v=!0===f.focusable&&f.focusType.includes("day")&&!0===o;return h("div",{key:e.date+(void 0!==t?":"+t:""),tabindex:!0===v?0:-1,class:{"q-calendar-scheduler__day":0===r,"q-calendar-scheduler__day--section":0!==r,...y,...I(e),"q-calendar__hoverable":!0===f.hoverable,"q-calendar__focusable":!0===v},style:p,onDragenter:e=>{void 0!==f.dragEnterFunc&&"function"===typeof f.dragEnterFunc&&(!0===f.dragEnterFunc(e,"day",{scope:c})?k.value=s:k.value="")},onDragover:e=>{void 0!==f.dragOverFunc&&"function"===typeof f.dragOverFunc&&(!0===f.dragOverFunc(e,"day",{scope:c})?k.value=s:k.value="")},onDragleave:e=>{void 0!==f.dragLeaveFunc&&"function"===typeof f.dragLeaveFunc&&(!0===f.dragLeaveFunc(e,"day",{scope:c})?k.value=s:k.value="")},onDrop:e=>{void 0!==f.dropFunc&&"function"===typeof f.dropFunc&&(!0===f.dropFunc(e,"day",{scope:c})?k.value=s:k.value="")},onKeydown:e=>{A(e,[13,32])&&(e.stopPropagation(),e.preventDefault())},onKeyup:e=>{A(e,[13,32])&&(D.value=c.timestamp.date,void 0!==_.value.onClickResource)&&T("click-resource",{scope:c,event:e})},...E("-day-resource",e=>{return{scope:c,event:e}})},[i&&i({scope:c}),useFocusHelper()])}function We(){return h("div",{},"No resources have been defined")}function Ce(){const{start:e,end:t,maxDays:a}=Q.value,n=(d.value===e.date&&s.value===t.date&&l.value===a||(d.value=e.date,s.value=t.date,l.value=a),c.width>0),r=f.modelResources&&f.modelResources.length>0,o=withDirectives(h("div",{key:d.value,class:"q-calendar-scheduler"},[!0===n&&!0===r&&!0!==w.value&&!0!==f.noHeader&&se(),!0===n&&!0===r&&we(),!1===r&&We()]),[[ResizeObserverDirective,de]]);if(!0!==f.animated)return o;{const i="q-calendar--"+("prev"===u.value?f.transitionPrev:f.transitionNext);return h(Transition,{name:i,appear:!0},()=>o)}}return watch([b],te,{deep:!0,immediate:!0}),watch(()=>f.modelValue,(e,t)=>{if(D.value!==f.modelValue){if(!0===f.animated){const a=getDayIdentifier(parsed(e)),n=getDayIdentifier(parsed(t));u.value=a>=n?"next":"prev"}D.value=e}p.value=e}),watch(D,(e,t)=>{if(D.value!==f.modelValue){if(!0===f.animated){const a=getDayIdentifier(parsed(e)),n=getDayIdentifier(parsed(t));u.value=a>=n?"next":"prev"}T("update:model-value",e)}}),watch(p,e=>{e&&(a.value=parseTimestamp(e))}),watch(a,()=>{y.value[p.value]?y.value[p.value].focus():ae()}),watch(()=>f.maxDays,e=>{l.value=e}),onBeforeUpdate(()=>{y.value={},n.value=void 0,r.value=void 0,L.value={}}),onMounted(()=>{}),x({prev:ue,next:ie,move:S,moveToToday:oe,updateCurrent:V}),()=>J()}});const version="4.1.0";var Plugin={version:version,QCalendarScheduler:QCalendarScheduler,...Timestamp$1,...helpers$1,install(e){e.component(String(QCalendarScheduler.name),QCalendarScheduler)}};export{DAYS_IN_MONTH,DAYS_IN_MONTH_LEAP,DAYS_IN_MONTH_MAX,DAYS_IN_MONTH_MIN,DAY_MIN,FIRST_HOUR,MONTH_MAX,MONTH_MIN,PARSE_DATE,PARSE_DATETIME,PARSE_TIME,QCalendarScheduler,TIME_CONSTANTS,addToDate,compareDate,compareDateTime,compareTime,compareTimestamps,convertToUnit,copyTimestamp,createDayList,createIntervalList,createNativeLocaleFormatter,daysBetween,daysInMonth,Plugin as default,diffTimestamp,findWeekday,getDate,getDateTime,getDayIdentifier,getDayOfYear,getDayTimeIdentifier,getEndOfMonth,getEndOfWeek,getMonthFormatter,getMonthNames,getStartOfMonth,getStartOfWeek,getTime,getTimeIdentifier,getWeekday,getWeekdayFormatter,getWeekdayNames,getWorkWeek,indexOf,isBetweenDates,isLeapYear,isOverlappingDates,isToday,makeDate,makeDateTime,maxTimestamp,minCharWidth,minTimestamp,moveRelativeDays,nextDay,padNumber,parseDate,parseTime,parseTimestamp,parsed,prevDay,relativeDays,today,updateDayOfYear,updateDisabled,updateFormatted,updateMinutes,updateRelative,updateWeekday,updateWorkWeek,validateNumber,validateTimestamp,version,weeksBetween}; | ||
import{reactive,ref,computed,withDirectives,h,watch,getCurrentInstance,onBeforeUnmount,defineComponent,onBeforeUpdate,onMounted,Transition,nextTick}from"vue";const PARSE_DATETIME=/^(\d{4})-(\d{1,2})(-(\d{1,2}))?([^\d]+(\d{1,2}))?(:(\d{1,2}))?(:(\d{1,2}))?(.(\d{1,3}))?$/,PARSE_DATE=/^(\d{4})-(\d{1,2})(-(\d{1,2}))?/,PARSE_TIME=/(\d\d?)(:(\d\d?)|)(:(\d\d?)|)/,DAYS_IN_MONTH=[0,31,28,31,30,31,30,31,31,30,31,30,31],DAYS_IN_MONTH_LEAP=[0,31,29,31,30,31,30,31,31,30,31,30,31],TIME_CONSTANTS={MILLISECONDS_IN:{SECOND:1e3,MINUTE:6e4,HOUR:36e5,DAY:864e5,WEEK:6048e5},SECONDS_IN:{MINUTE:60,HOUR:3600,DAY:86400,WEEK:604800},MINUTES_IN:{MINUTE:1,HOUR:60,DAY:1440,WEEK:10080},HOURS_IN:{DAY:24,WEEK:168},DAYS_IN:{WEEK:7}},DAYS_IN_MONTH_MIN=28,DAYS_IN_MONTH_MAX=31,MONTH_MAX=12,MONTH_MIN=1,DAY_MIN=1,FIRST_HOUR=0;function validateTimestamp(e){return"string"===typeof e&&PARSE_DATETIME.test(e)}function parsed(e){if("string"!==typeof e)return null;const t=PARSE_DATETIME.exec(e);if(!t||!t[1]||!t[2])return null;const a=parseInt(t[1],10),n=parseInt(t[2],10),r=parseInt(t[4]||"1",10),o=parseInt(t[6]||"0",10),i=parseInt(t[8]||"0",10);return{date:e,time:o.toString().padStart(2,"0")+":"+i.toString().padStart(2,"0"),year:a,month:n,day:r,hour:o,minute:i,hasDay:!!t[4],hasTime:!0,past:!1,current:!1,future:!1,disabled:!1,weekday:0,doy:0,workweek:0}}function parseDate(e,t=!1){if(!(e instanceof Date))return null;const a=t?"UTC":"";return updateFormatted({date:padNumber(e[`get${a}FullYear`](),4)+"-"+padNumber(e[`get${a}Month`]()+1,2)+"-"+padNumber(e[`get${a}Date`](),2),time:padNumber(e[`get${a}Hours`]()||0,2)+":"+padNumber(e[`get${a}Minutes`]()||0,2),year:e[`get${a}FullYear`](),month:e[`get${a}Month`]()+1,day:e[`get${a}Date`](),hour:e[`get${a}Hours`](),minute:e[`get${a}Minutes`](),weekday:0,doy:0,workweek:0,hasDay:!0,hasTime:!0,past:!1,current:!1,future:!1,disabled:!1})}function padNumber(e,t){let a=String(e);while(a.length<t)a="0"+a;return a}function isLeapYear(e){return e%4===0&&e%100!==0||e%400===0}function daysInMonth(e,t){return(isLeapYear(e)?DAYS_IN_MONTH_LEAP:DAYS_IN_MONTH)[t]}function nextDay(e){const t=new Date(e.year,e.month-1,e.day+1);return updateFormatted(normalizeTimestamp({...e,year:t.getFullYear(),month:t.getMonth()+1,day:t.getDate()}))}function prevDay(e){const t=new Date(e.year,e.month-1,e.day-1);return updateFormatted(normalizeTimestamp({...e,year:t.getFullYear(),month:t.getMonth()+1,day:t.getDate()}))}function today(){const e=new Date,t=e.getMonth()+1,a=e.getDate(),n=e.getFullYear();return[n,padNumber(t,2),padNumber(a,2)].join("-")}function isToday(e){return e===today()}function getStartOfWeek(e,t,a){let n=copyTimestamp(e);if(t){if(1===n.day||0===n.weekday)while(!t.includes(Number(n.weekday)))n=nextDay(n);n=findWeekday(n,t[0],prevDay),n=updateFormatted(n),a&&(n=updateRelative(n,a,n.hasTime))}return n}function getEndOfWeek(e,t,a){let n=copyTimestamp(e);if(t&&Array.isArray(t)){const r=daysInMonth(n.year,n.month);if(r===n.day||n.weekday===t[t.length-1])while(!t.includes(Number(n.weekday)))n=prevDay(n);n=findWeekday(n,t[t.length-1],nextDay),n=updateFormatted(n),a&&(n=updateRelative(n,a,n.hasTime))}return n}function getStartOfMonth(e){let t=copyTimestamp(e);return t.day=DAY_MIN,t=updateFormatted(t),t}function getEndOfMonth(e){let t=copyTimestamp(e);return t.day=daysInMonth(t.year,t.month),t=updateFormatted(t),t}function parseTime(e){const t=Object.prototype.toString.call(e);switch(t){case"[object Number]":return e;case"[object String]":{const a=PARSE_TIME.exec(e);return a?60*parseInt(a[1],10)+parseInt(a[3]||"0",10):!1}case"[object Object]":return"object"!==typeof e||"number"!==typeof e.hour||"number"!==typeof e.minute?!1:"object"===typeof e&&"hour"in e&&"minute"in e&&60*e.hour+e.minute}return!1}function compareTimestamps(e,t){return!(!e||!t)&&e.year===t.year&&e.month===t.month&&e.day===t.day&&e.hour===t.hour&&e.minute===t.minute}function compareDate(e,t){return getDate(e)===getDate(t)}function compareTime(e,t){return getTime(e)===getTime(t)}function compareDateTime(e,t){return getDateTime(e)===getDateTime(t)}function parseTimestamp(e,t=null){let a=parsed(e);return a?(a=updateFormatted(a),t&&(a=updateRelative(a,t,a.hasTime)),a):null}function getDayIdentifier(e){return 1e8*(e.year??0)+1e6*(e.month??0)+1e4*(e.day??0)}function getTimeIdentifier(e){return 100*(e.hour??0)+(e.minute??0)}function getDayTimeIdentifier(e){return getDayIdentifier(e)+getTimeIdentifier(e)}function diffTimestamp(e,t,a=!1){const n=Date.UTC(e.year??0,(e.month??1)-1,e.day??1,e.hour??0,e.minute??0),r=Date.UTC(t.year??0,(t.month??1)-1,t.day??1,t.hour??0,t.minute??0);return!0===a&&r<n?0:r-n}function updateRelative(e,t,a=!1){let n=copyTimestamp(e),r=getDayIdentifier(t),o=getDayIdentifier(n),i=r===o;return n.hasTime&&a&&i&&(r=getTimeIdentifier(t),o=getTimeIdentifier(n),i=r===o),n.past=o<r,n.current=i,n.future=o>r,n.currentWeekday=n.weekday===t.weekday,n}function updateMinutes(e,t,a=null){let n=copyTimestamp(e);return n.hasTime=!0,n.hour=Math.floor(t/TIME_CONSTANTS.MINUTES_IN.HOUR),n.minute=t%TIME_CONSTANTS.MINUTES_IN.HOUR,n.time=getTime(n),a&&(n=updateRelative(n,a,!0)),n}function updateWeekday(e){let t=copyTimestamp(e);return t.weekday=getWeekday(t),t}function updateDayOfYear(e){let t=copyTimestamp(e);return t.doy=getDayOfYear(t)||0,t}function updateWorkWeek(e){let t=copyTimestamp(e);return t.workweek=getWorkWeek(t),t}function updateDisabled(e,t,a,n,r){let o=copyTimestamp(e);const i=getDayIdentifier(o);if(void 0!==t){const l=parsed(t);if(l){const c=getDayIdentifier(l);i<=c&&(o.disabled=!0)}}if(!0!==o.disabled&&void 0!==a){const m=parsed(a);if(m){const p=getDayIdentifier(m);i>=p&&(o.disabled=!0)}}if(!0!==o.disabled&&Array.isArray(n)&&n.length>0)for(var u in n)if(n[u]===o.weekday){o.disabled=!0;break}if(!0!==o.disabled&&Array.isArray(r)&&r.length>0)for(var d in r)if(Array.isArray(r[d])&&2===r[d].length&&r[d][0]&&r[d][1]){const y=parsed(r[d][0]),v=parsed(r[d][1]);if(y&&v&&isBetweenDates(o,y,v)){o.disabled=!0;break}}else{const f=r[d];if(Array.isArray(f))for(var s of f){const h=parseTimestamp(s);if(h){const g=getDayIdentifier(h);if(g===i){o.disabled=!0;break}}}else if(f){const T=parseTimestamp(f);if(T){const D=getDayIdentifier(T);D===i&&(o.disabled=!0)}}}return o}function updateFormatted(e){let t=copyTimestamp(e);return t.hasTime=!0,t.time=getTime(t),t.date=getDate(t),t.weekday=getWeekday(t),t.doy=getDayOfYear(t)||0,t.workweek=getWorkWeek(t),t}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){let t=copyTimestamp(e);if(0===t.year){const r=parseTimestamp(today());r&&(t=r)}const a=new Date(Date.UTC(t.year,t.month-1,t.day)),n=4;a.setUTCDate(a.getUTCDate()-(a.getUTCDay()+6)%7+n),a.setUTCDate(a.getUTCDate()+n-(a.getUTCDay()||7));e=new Date(Date.UTC(a.getUTCFullYear(),0,1)),e=Math.ceil(((a.valueOf()-e.valueOf())/864e5+1)/7);return e}function getWeekday(e){let t=e.weekday;if(e.hasDay){const a=Math.floor,n=e.day,r=(e.month+9)%MONTH_MAX+1,o=a(e.year/100),i=e.year%100-(e.month<=2?1:0);t=((n+a(2.6*r-.2)-2*o+i+a(i/4)+a(o/4))%7+7)%7}return t??0}function copyTimestamp(e){return{...e}}function getDate(e){let 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):"00:00")}function moveRelativeDays(e,t=nextDay,a=1,n=[0,1,2,3,4,5,6]){const r=copyTimestamp(e);return relativeDays(r,t,a,n)}function relativeDays(e,t=nextDay,a=1,n=[0,1,2,3,4,5,6]){let r=copyTimestamp(e);n.includes(Number(r.weekday))||0!==r.weekday||t!==nextDay||++a;while(--a>=0)r=t(r),n.length<7&&!n.includes(Number(r.weekday))&&++a;return r}function findWeekday(e,t,a=nextDay,n=6){let r=copyTimestamp(e);while(r.weekday!==t&&--n>=0)r=a(r);return r}function createDayList(e,t,a,n=[0,1,2,3,4,5,6],r=void 0,o=void 0,i=[],u=[],d=42,s=0){const l=getDayIdentifier(e),c=getDayIdentifier(t),m=[];let p=copyTimestamp(e),y=0,v=y===c;if(!(c<l))while((!v||m.length<s)&&m.length<d){if(y=getDayIdentifier(p),v=v||y>c&&m.length>=s,v)break;if(n.includes(Number(p.weekday))){let e=copyTimestamp(p);e=updateFormatted(e),e=updateRelative(e,a),e=updateDisabled(e,r,o,i,u),m.push(e)}p=relativeDays(p,nextDay)}return m}function createIntervalList(t,a,n,r,o){const i=[];for(let e=0;e<r;++e){const u=(a+e)*n,d=copyTimestamp(t);i.push(updateMinutes(d,u,o))}return i}function createNativeLocaleFormatter(n,r){const e=()=>"";return"undefined"===typeof Intl||"undefined"===typeof Intl.DateTimeFormat?e:(t,e)=>{try{const a=new Intl.DateTimeFormat(n||void 0,r(t,e));return a.format(makeDateTime(t))}catch(e){return console.error(`Intl.DateTimeFormat: ${e.message} -> `+getDateTime(t)),""}}}function makeDate(e,t=!0){return t?new Date(Date.UTC(e.year,e.month-1,e.day,0,0)):new Date(e.year,e.month-1,e.day,0,0)}function makeDateTime(e,t=!0){return t?new Date(Date.UTC(e.year,e.month-1,e.day,e.hour,e.minute)):new Date(e.year,e.month-1,e.day,e.hour,e.minute)}function validateNumber(e){return isFinite(Number(e))}function maxTimestamp(e,t=!1){const a=!0===t?getDayTimeIdentifier:getDayIdentifier;return e.reduce((e,t)=>{return Math.max(a(e),a(t))===a(e)?e:t})}function minTimestamp(e,t=!1){const a=!0===t?getDayTimeIdentifier:getDayIdentifier;return e.reduce((e,t)=>{return Math.min(a(e),a(t))===a(e)?e:t})}function isBetweenDates(e,t,a,n=!1){const r=getDayIdentifier(e)+(!0===n?getTimeIdentifier(e):0),o=getDayIdentifier(t)+(!0===n?getTimeIdentifier(t):0),i=getDayIdentifier(a)+(!0===n?getTimeIdentifier(a):0);return r>=o&&r<=i}function isOverlappingDates(e,t,a,n){const r=getDayIdentifier(e),o=getDayIdentifier(t),i=getDayIdentifier(a),u=getDayIdentifier(n);return r>=i&&r<=u||o>=i&&o<=u||i>=r&&o>=u}function addToDate(e,t){const a=copyTimestamp(e);return t.year&&(a.year+=t.year),t.month&&(a.month+=t.month),t.day&&(a.day+=t.day),t.hour&&(a.hour+=t.hour),t.minute&&(a.minute+=t.minute),updateFormatted(normalizeTimestamp(a))}function normalizeTimestamp(e){const t=new Date(e.year,e.month-1,e.day,e.hour,e.minute);return{...e,year:t.getFullYear(),month:t.getMonth()+1,day:t.getDate(),hour:t.getHours(),minute:t.getMinutes()}}function daysBetween(e,t){const a=diffTimestamp(e,t,!0);return Math.floor(a/TIME_CONSTANTS.MILLISECONDS_IN.DAY)}function weeksBetween(e,t){let a=copyTimestamp(e),n=copyTimestamp(t);return a=findWeekday(a,0),n=findWeekday(n,6),Math.ceil(daysBetween(a,n)/TIME_CONSTANTS.DAYS_IN.WEEK)}const weekdayDateMap={Sun:new Date("2020-01-05T00:00:00.000Z"),Mon:new Date("2020-01-06T00:00:00.000Z"),Tue:new Date("2020-01-07T00:00:00.000Z"),Wed:new Date("2020-01-08T00:00:00.000Z"),Thu:new Date("2020-01-09T00:00:00.000Z"),Fri:new Date("2020-01-10T00:00:00.000Z"),Sat:new Date("2020-01-11T00:00:00.000Z")};function getWeekdayFormatter(){const e=()=>"",r={long:{timeZone:"UTC",weekday:"long"},short:{timeZone:"UTC",weekday:"short"},narrow:{timeZone:"UTC",weekday:"narrow"}};return"undefined"===typeof Intl||"undefined"===typeof Intl.DateTimeFormat?e:t;function t(t,e,a){try{const n=new Intl.DateTimeFormat(a||void 0,r[e]||r["long"]);return n.format(weekdayDateMap[t])}catch(e){return e instanceof Error&&console.error(`Intl.DateTimeFormat: ${e.message} -> day of week: `+t),""}}}function getWeekdayNames(t,a){const e=Object.keys(weekdayDateMap),n=getWeekdayFormatter();return e.map(e=>String(n(e,t,a)))}function getMonthFormatter(){const e=()=>"",o={long:{timeZone:"UTC",month:"long"},short:{timeZone:"UTC",month:"short"},narrow:{timeZone:"UTC",month:"narrow"}};return"undefined"===typeof Intl||"undefined"===typeof Intl.DateTimeFormat?e:t;function t(t,e,a){try{const n=new Intl.DateTimeFormat(a||void 0,o[e]||o["long"]),r=new Date;return r.setDate(1),r.setMonth(t),n.format(r)}catch(e){return e instanceof Error&&console.error(`Intl.DateTimeFormat: ${e.message} -> month: `+t),""}}}function getMonthNames(t,a){const n=getMonthFormatter();return[...Array(12).keys()].map(e=>n(e,t,a))}var Timestamp={PARSE_DATETIME:PARSE_DATETIME,PARSE_DATE:PARSE_DATE,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,TIME_CONSTANTS:TIME_CONSTANTS,FIRST_HOUR:FIRST_HOUR,today:today,getStartOfWeek:getStartOfWeek,getEndOfWeek:getEndOfWeek,getStartOfMonth:getStartOfMonth,getEndOfMonth:getEndOfMonth,parseTime:parseTime,validateTimestamp:validateTimestamp,parsed:parsed,parseTimestamp:parseTimestamp,parseDate:parseDate,getDayIdentifier:getDayIdentifier,getTimeIdentifier:getTimeIdentifier,getDayTimeIdentifier:getDayTimeIdentifier,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,createDayList:createDayList,createIntervalList:createIntervalList,createNativeLocaleFormatter:createNativeLocaleFormatter,makeDate:makeDate,makeDateTime:makeDateTime,validateNumber:validateNumber,isBetweenDates:isBetweenDates,isOverlappingDates:isOverlappingDates,daysBetween:daysBetween,weeksBetween:weeksBetween,addToDate:addToDate,compareTimestamps:compareTimestamps,compareDate:compareDate,compareTime:compareTime,compareDateTime:compareDateTime,getWeekdayFormatter:getWeekdayFormatter,getWeekdayNames:getWeekdayNames,getMonthFormatter:getMonthFormatter,getMonthNames:getMonthNames},Timestamp$1=Object.freeze({__proto__:null,DAYS_IN_MONTH:DAYS_IN_MONTH,DAYS_IN_MONTH_LEAP:DAYS_IN_MONTH_LEAP,DAYS_IN_MONTH_MAX:DAYS_IN_MONTH_MAX,DAYS_IN_MONTH_MIN:DAYS_IN_MONTH_MIN,DAY_MIN:DAY_MIN,FIRST_HOUR:FIRST_HOUR,MONTH_MAX:MONTH_MAX,MONTH_MIN:MONTH_MIN,PARSE_DATE:PARSE_DATE,PARSE_DATETIME:PARSE_DATETIME,PARSE_TIME:PARSE_TIME,TIME_CONSTANTS:TIME_CONSTANTS,addToDate:addToDate,compareDate:compareDate,compareDateTime:compareDateTime,compareTime:compareTime,compareTimestamps:compareTimestamps,copyTimestamp:copyTimestamp,createDayList:createDayList,createIntervalList:createIntervalList,createNativeLocaleFormatter:createNativeLocaleFormatter,daysBetween:daysBetween,daysInMonth:daysInMonth,default:Timestamp,diffTimestamp:diffTimestamp,findWeekday:findWeekday,getDate:getDate,getDateTime:getDateTime,getDayIdentifier:getDayIdentifier,getDayOfYear:getDayOfYear,getDayTimeIdentifier:getDayTimeIdentifier,getEndOfMonth:getEndOfMonth,getEndOfWeek:getEndOfWeek,getMonthFormatter:getMonthFormatter,getMonthNames:getMonthNames,getStartOfMonth:getStartOfMonth,getStartOfWeek:getStartOfWeek,getTime:getTime,getTimeIdentifier:getTimeIdentifier,getWeekday:getWeekday,getWeekdayFormatter:getWeekdayFormatter,getWeekdayNames:getWeekdayNames,getWorkWeek:getWorkWeek,isBetweenDates:isBetweenDates,isLeapYear:isLeapYear,isOverlappingDates:isOverlappingDates,isToday:isToday,makeDate:makeDate,makeDateTime:makeDateTime,maxTimestamp:maxTimestamp,minTimestamp:minTimestamp,moveRelativeDays:moveRelativeDays,nextDay:nextDay,padNumber:padNumber,parseDate:parseDate,parseTime:parseTime,parseTimestamp:parseTimestamp,parsed:parsed,prevDay:prevDay,relativeDays:relativeDays,today:today,updateDayOfYear:updateDayOfYear,updateDisabled:updateDisabled,updateFormatted:updateFormatted,updateMinutes:updateMinutes,updateRelative:updateRelative,updateWeekday:updateWeekday,updateWorkWeek:updateWorkWeek,validateNumber:validateNumber,validateTimestamp:validateTimestamp,weeksBetween:weeksBetween});function convertToUnit(e,t="px"){if(e)return isNaN(e)?String(e):"auto"===e?e:""+Number(e)+t}function indexOf(t,a){for(let e=0;e<t.length;e++)if(!0===a(t[e],e))return e;return-1}function minCharWidth(e,t){return 0===t?e:e.slice(0,t)}var helpers={convertToUnit:convertToUnit,indexOf:indexOf,minCharWidth:minCharWidth},helpers$1=Object.freeze({__proto__:null,convertToUnit:convertToUnit,default:helpers,indexOf:indexOf,minCharWidth:minCharWidth});const ResizeObserverDirective={mounted(e,t){if("function"===typeof t.value){const a=t.value,n={callback:a,size:{width:0,height:0},observer:new ResizeObserver(e=>{const t=e[0].contentRect;t.width===n.size.width&&t.height===n.size.height||(n.size.width=t.width,n.size.height=t.height,n.debounceTimeout&&clearTimeout(n.debounceTimeout),n.debounceTimeout=setTimeout(()=>{n.callback(n.size),n.debounceTimeout=void 0},100))})};n.observer.observe(e),e.__onResizeObserver=n}},beforeUnmount(e){if(e.__onResizeObserver){const{observer:t,debounceTimeout:a}=e.__onResizeObserver;a&&clearTimeout(a),t.unobserve(e),delete e.__onResizeObserver}}};function useCalendar(t,a,{scrollArea:e,pane:n}){if(!a){const l="[error: renderCalendar] no renderFunc has been supplied to useCalendar";throw console.error(l),new Error(l)}const r=reactive({width:0,height:0}),o=ref(null);function i({width:e,height:t}){r.width=e,r.height=t}const u=computed(()=>{return!0!==t.noScroll&&e.value&&n.value&&r.height?e.value.offsetWidth-n.value.offsetWidth:0});function d(){}function s(){const e={ref:o,role:"complementary",lang:t.locale,class:`q-calendar ${t.dark?"q-calendar--dark":""} `+(t.bordered?"q-calendar__bordered":"")};return withDirectives(h("div",{...e},[a()]),[[ResizeObserverDirective,i]])}return{rootRef:o,scrollWidth:u,__initCalendar:d,__renderCalendar:s}}const isValidFocusType=e=>e.every(e=>["day","date","weekday","interval","time","resource","task"].includes(e)),useCommonProps={modelValue:{type:String,default:today(),validator:e=>""===e||validateTimestamp(e)},weekdays:{type:Array,default:()=>[0,1,2,3,4,5,6]},dateType:{type:String,default:"round",validator:e=>["round","rounded","square"].includes(e)},weekdayAlign:{type:String,default:"center",validator:e=>["left","center","right"].includes(e)},dateAlign:{type:String,default:"center",validator:e=>["left","center","right"].includes(e)},bordered:Boolean,dark:Boolean,noAria:Boolean,noActiveDate:Boolean,noHeader:Boolean,noScroll:Boolean,shortWeekdayLabel:Boolean,noDefaultHeaderText:Boolean,noDefaultHeaderBtn:Boolean,minWeekdayLabel:{type:[Number,String],default:1},weekdayBreakpoints:{type:Array,default:()=>[75,35],validator:e=>2===e.length},locale:{type:String,default:"en-US"},animated:Boolean,transitionPrev:{type:String,default:"slide-right"},transitionNext:{type:String,default:"slide-left"},disabledDays:Array,disabledBefore:String,disabledAfter:String,disabledWeekdays:{type:Array,default:()=>[]},dragEnterFunc:Function,dragOverFunc:Function,dragLeaveFunc:Function,dropFunc:Function,selectedDates:{type:[Array,Set],default:()=>[]},selectedStartEndDates:{type:Array,default:()=>[]},hoverable:Boolean,focusable:Boolean,focusType:{type:Array,default:()=>["date"],validator:isValidFocusType}};function useCommon(t,{startDate:e,endDate:a,times:n}){const r=computed(()=>parseTimestamp(e.value)),o=computed(()=>{return"0000-00-00"===a.value?getEndOfWeek(r.value,t.weekdays,n.today):parseTimestamp(a.value)||r.value}),i=computed(()=>createNativeLocaleFormatter(t.locale,()=>({timeZone:"UTC",day:"numeric"}))),u=computed(()=>createNativeLocaleFormatter(t.locale,(e,t)=>({timeZone:"UTC",weekday:t?"short":"long"}))),d=computed(()=>createNativeLocaleFormatter(t.locale,()=>({timeZone:"UTC",dateStyle:"full"})));function s(e,t){return e&&e.length>0&&e.includes(t.date)}function l(e,t){const a={firstDay:!1,betweenDays:!1,lastDay:!1};if(2===e.length){const n=getDayIdentifier(t),r=getDayIdentifier(parsed(e[0])),o=getDayIdentifier(parsed(e[1]));a.firstDay=r===n,a.lastDay=o===n,a.betweenDays=r<n&&o>n}return a}function c(e,t=!1,a=[],n=[],r=!1){const o=s(a,e),{firstDay:i,lastDay:u,betweenDays:d}=l(n,e);return{"q-past-day":!i&&!d&&!u&&!o&&!t&&!!e.past,"q-future-day":!i&&!d&&!u&&!o&&!t&&!!e.future,"q-outside":t,"q-current-day":!!e.current,"q-selected":o,"q-range-first":i,"q-range":d,"q-range-last":u,"q-range-hover":r&&(i||u||d),"q-disabled-day disabled":!0===e.disabled}}function m(e){return getStartOfWeek(e,t.weekdays,n.today)}function p(e){return getEndOfWeek(e,t.weekdays,n.today)}function y(){return{}}return{parsedStart:r,parsedEnd:o,dayFormatter:i,weekdayFormatter:u,ariaDateFormatter:d,arrayHasDate:s,checkDays:l,getRelativeClasses:c,startOfWeek:m,endOfWeek:p,dayStyleDefault:y}}function scrollTo(e,t){e instanceof Window?e.scrollTo({top:t,behavior:"instant"}):e.scrollTop=t}function getVerticalScrollPosition(e){return e instanceof Window?e.scrollY:e.scrollTop}function animVerticalScrollTo(o,i,u=500,d=performance.now(),s=getVerticalScrollPosition(o)){u<=0||s===i?scrollTo(o,i):requestAnimationFrame(e=>{const t=e-d,a=Math.min(t/u,1),n=e=>e<.5?2*e*e:(4-2*e)*e-1,r=s+(i-s)*n(a);scrollTo(o,r),a<1&&animVerticalScrollTo(o,i,u,d,s)})}function animHorizontalScrollTo(r,e,o=500){const i=r.scrollLeft,u=e-i;let d=null;function s(e){null===d&&(d=e);const t=e-d,a=Math.min(t/o,1),n=e=>e<.5?2*e*e:(4-2*e)*e-1;r.scrollLeft=i+u*n(a),t<o&&requestAnimationFrame(s)}requestAnimationFrame(s)}const useSchedulerProps={view:{type:String,validator:e=>["day","week","month","month-interval"].includes(e),default:"day"},modelResources:{type:Array},resourceKey:{type:String,default:"id"},resourceLabel:{type:String,default:"label"},resourceHeight:{type:[Number,String],default:0,validator:validateNumber},resourceMinHeight:{type:[Number,String],default:70,validator:validateNumber},resourceStyle:{type:Function,default:null},resourceClass:{type:Function,default:null},weekdayStyle:{type:Function,default:null},weekdayClass:{type:Function,default:null},dayStyle:{type:Function,default:null},dayClass:{type:Function,default:null},dateHeader:{type:String,default:"stacked",validator:e=>["stacked","inline","inverted"].includes(e)}};function useInterval(o,{times:t,scrollArea:n,parsedStart:e,parsedEnd:a,maxDays:r,size:i,headerColumnRef:u}){const d=computed(()=>parseInt(String(o.intervalStart),10)),m=computed(()=>parseInt(String(o.intervalMinutes),10)),s=computed(()=>parseInt(String(o.intervalCount),10)),p=computed(()=>parseFloat(String(o.intervalHeight))),y=computed(()=>{let e=0;const t=Number(o.columnCount);return o.cellWidth?e=Number(o.cellWidth):i.width>0&&u.value&&(e=u.value.offsetWidth/(t>1?t:r.value)),e}),l=computed(()=>d.value*m.value),c=computed(()=>s.value*p.value),v=computed(()=>s.value*y.value),f=computed(()=>D(e.value)),h=computed(()=>k(a.value)),g=computed(()=>{return createDayList(e.value,a.value,t.today,o.weekdays,o.disabledBefore,o.disabledAfter,o.disabledWeekdays,o.disabledDays,r.value)}),T=computed(()=>{return g.value.map(e=>createIntervalList(e,d.value,m.value,s.value,t.now))});function D(e){return getStartOfWeek(e,o.weekdays,t.today)}function k(e){return getEndOfWeek(e,o.weekdays,t.today)}function _(e,t){return e&&e.length>0&&e.includes(getDateTime(t))}function w(e,t){const a={firstDay:!1,betweenDays:!1,lastDay:!1};if(e&&2===e.length){const n=getDayTimeIdentifier(t),r=getDayTimeIdentifier(parsed(e[0])),o=getDayTimeIdentifier(parsed(e[1]));a.firstDay=r===n,a.lastDay=o===n,a.betweenDays=r<n&&o>n}return a}function I(e,t=[],a=[]){const n=_(t,e),{firstDay:r,lastDay:o,betweenDays:i}=w(a,e);return{"q-selected":n,"q-range-first":!0===r,"q-range":!0===i,"q-range-last":!0===o,"q-disabled-interval disabled":!0===e.disabled}}function M(e,t,a){return[]}const b=computed(()=>{const a={timeZone:"UTC",hour12:!o.hour24Format,hour:"2-digit",minute:"2-digit"},n={timeZone:"UTC",hour12:!o.hour24Format,hour:"numeric",minute:"2-digit"},r={timeZone:"UTC",hour12:!o.hour24Format,hour:"numeric"};return createNativeLocaleFormatter(o.locale,(e,t)=>t?0===e.minute?r:n:a)}),N=computed(()=>{const e={timeZone:"UTC",dateStyle:"full",timeStyle:"short"};return createNativeLocaleFormatter(o.locale,()=>e)});function S(e){const t=T.value[0][0],a=t.hour===e.hour&&t.minute===e.minute;return!a&&0===e.minute}function E(e){}function A(e){return{}}function O(e,t,a=!1,n){let r=copyTimestamp(t);if(e.currentTarget){const o=e.currentTarget.getBoundingClientRect(),i=e,u=e,d=i.changedTouches||i.touches,s=(d&&d[0]?d[0]:u).clientY,l=(s-o.top)/p.value,c=Math.floor((a?Math.floor(l):l)*m.value);0!==c&&(r=addToDate(r,{minute:c})),n&&(r=updateRelative(r,n,!0))}return r}function H(e,t,a=!1,n){let r=copyTimestamp(t);const o=e.currentTarget.getBoundingClientRect(),i=e,u=e,d=i.changedTouches||i.touches,s=(d&&d[0]?d[0]:u).clientY,l=(s-o.top)/p.value,c=Math.floor((a?Math.floor(l):l)*m.value);return 0!==c&&(r=addToDate(r,{minute:c})),n&&(r=updateRelative(r,n,!0)),r}function x(e,t,a=!1,n){let r=copyTimestamp(t);if(e.currentTarget){const o=e.currentTarget.getBoundingClientRect(),i=e,u=e,d=i.changedTouches||i.touches,s=(d&&d[0]?d[0]:u).clientX,l=(s-o.left)/y.value,c=Math.floor((a?Math.floor(l):l)*m.value);0!==c&&(r=addToDate(r,{minute:c})),n&&(r=updateRelative(r,n,!0))}return r}function q(e,t){const a={timestamp:e,timeStartPos:C,timeDurationHeight:F};return void 0!==t&&(a.columnIndex=t),a}function L(e,t){const a={timestamp:copyTimestamp(e),timeStartPosX:R,timeDurationWidth:W};return void 0!==t&&(a.index=t),a}function U(e,t=0){const a=C(e);return!(!1===a||!n.value)&&(animVerticalScrollTo(n.value,a,t),!0)}function Y(e,t=0){const a=R(e);return!(!1===a||!n.value)&&(animHorizontalScrollTo(n.value,a,t),!0)}function F(e){return e/m.value*p.value}function W(e){return e/m.value*y.value}function P(e){return e*m.value/p.value}function B(e){return e*m.value/y.value}function C(e,t=!0){const a=parseTime(e);if(!1===a)return!1;const n=l.value,r=s.value*m.value,o=(a-n)/r;let i=o*c.value;return t&&(i<0&&(i=0),i>c.value)&&(i=c.value),i}function R(e,t=!0){const a=parseTime(e);if(!1===a)return!1;const n=l.value,r=s.value*m.value,o=(a-n)/r;let i=o*v.value;return t&&(i<0&&(i=0),i>v.value)&&(i=v.value),i}return{parsedIntervalStart:d,parsedIntervalMinutes:m,parsedIntervalCount:s,parsedIntervalHeight:p,parsedCellWidth:y,parsedStartMinute:l,bodyHeight:c,bodyWidth:v,parsedWeekStart:f,parsedWeekEnd:h,days:g,intervals:T,intervalFormatter:b,ariaDateTimeFormatter:N,arrayHasDateTime:_,checkIntervals:w,getIntervalClasses:I,getResourceClasses:M,showIntervalLabelDefault:S,showResourceLabelDefault:E,styleDefault:A,getTimestampAtEventInterval:O,getTimestampAtEvent:H,getTimestampAtEventX:x,getScopeForSlot:q,getScopeForSlotX:L,scrollToTime:U,scrollToTimeX:Y,timeDurationHeight:F,timeDurationWidth:W,heightToMinutes:P,widthToMinutes:B,timeStartPos:C,timeStartPosX:R}}const useColumnProps={columnCount:{type:[Number,String],default:0,validator:validateNumber},columnIndexStart:{type:[Number,String],default:0,validator:validateNumber}},useMaxDaysProps={maxDays:{type:Number,default:1}},useTimesProps={now:{type:String,validator:e=>""===e||validateTimestamp(e),default:""}};function useTimes(e){const t=reactive({now:parseTimestamp("0000-00-00 00:00"),today:parseTimestamp("0000-00-00")}),a=computed(()=>e.now?parseTimestamp(e.now):o());function n(){t.now&&t.today&&(t.now.current=t.today.current=!0,t.now.past=t.today.past=!1,t.now.future=t.today.future=!1)}function r(){const e=a.value||o();i(e,t.now),u(e,t.now),i(e,t.today)}function o(){return parseDate(new Date)}function i(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)}function u(e,t){e.time!==t.time&&(t.hour=e.hour,t.minute=e.minute,t.time=e.time)}return watch(a,()=>r()),{times:t,parsedNow:a,setCurrent:n,updateCurrent:r,getNow:o,updateDay:i,updateTime:u}}function useRenderValues(r,{parsedView:o,parsedValue:i,times:u}){const e=computed(()=>{const e=i.value;let t=r.maxDays,a=e,n=e;switch(o.value){case"month":a=getStartOfMonth(e),n=getEndOfMonth(e),t=daysInMonth(a.year,a.month);break;case"week":case"week-agenda":case"week-scheduler":a=getStartOfWeek(e,r.weekdays,u.today),n=getEndOfWeek(a,r.weekdays,u.today),t=r.weekdays.length;break;case"day":case"scheduler":case"agenda":n=moveRelativeDays(copyTimestamp(n),nextDay,t>1?t-1:t,r.weekdays),n=updateFormatted(n);break;case"month-interval":case"month-scheduler":case"month-agenda":a=getStartOfMonth(e),n=getEndOfMonth(e),n=updateFormatted(n),t=daysInMonth(a.year,a.month);break;case"resource":t=1,n=moveRelativeDays(copyTimestamp(n),nextDay,t,r.weekdays),n=updateFormatted(n);break}return{start:a,end:n,maxDays:t}});return{renderValues:e}}const toCamelCase=e=>e.replace(/(-\w)/g,e=>e[1].toUpperCase());function getMouseEventHandlers(t,e,a,n){const r={};for(const o in a){const i=a[o],u=toCamelCase("on-"+o);if(!e.value)return console.warn("$listeners has not been set up"),{};if(void 0!==e.value[u]){const d="on"+i.event.charAt(0).toUpperCase()+i.event.slice(1),s=e=>{return(void 0===i.button||"buttons"in e&&e.buttons>0&&e.button===i.button)&&(i.prevent&&e.preventDefault(),i.stop&&e.stopPropagation(),t(o,n(e,o))),i.result};d in r?Array.isArray(r[d])?r[d].push(s):r[d]=[r[d],s]:r[d]=s}}return r}function getDefaultMouseEventHandlers(e,t,a,n){return getMouseEventHandlers(e,t,getMouseEventName(a),n)}function getMouseEventName(e){return{["click"+e]:{event:"click"},["contextmenu"+e]:{event:"contextmenu",prevent:!0,result:!1},["mousedown"+e]:{event:"mousedown"},["mousemove"+e]:{event:"mousemove"},["mouseup"+e]:{event:"mouseup"},["mouseenter"+e]:{event:"mouseenter"},["mouseleave"+e]:{event:"mouseleave"},["touchstart"+e]:{event:"touchstart"},["touchmove"+e]:{event:"touchmove"},["touchend"+e]:{event:"touchend"}}}function getRawMouseEvents(e){return Object.keys(getMouseEventName(e))}function useMouseEvents(a,n){return{getMouseEventHandlers:(e,t)=>getMouseEventHandlers(a,n,e,t),getDefaultMouseEventHandlers:(e,t)=>getDefaultMouseEventHandlers(a,n,e,t),getMouseEventName:getMouseEventName,getRawMouseEvents:getRawMouseEvents}}const useMoveEmits=["moved"];function useMove(d,{parsedView:s,parsedValue:l,direction:c,maxDays:m,times:p,emittedValue:y,emit:v}){function e(a=1){if(0===a)y.value=today();else{let e=copyTimestamp(l.value);const n=getEndOfMonth(e),r=a>0,o=r?nextDay:prevDay,i=r?n.day:1;let t=r?a:-a;c.value=r?"next":"prev";const u=d.weekdays.length;while(--t>=0)switch(s.value){case"month":e.day=i,e=o(e),e=updateWeekday(e);while(!d.weekdays.includes(Number(e.weekday)))e=addToDate(e,{day:r?1:-1});break;case"week":case"week-agenda":case"week-scheduler":e=relativeDays(e,o,u,d.weekdays);break;case"day":case"scheduler":case"agenda":e=relativeDays(e,o,m.value,d.weekdays);break;case"month-interval":case"month-agenda":case"month-scheduler":e.day=i,e=o(e);break;case"resource":e=relativeDays(e,o,m.value,d.weekdays);break}e=updateWeekday(e),e=updateFormatted(e),e=updateDayOfYear(e),e=updateRelative(e,p.now),y.value=e.date,v("moved",e)}}return{move:e}}const listenerRE=/^on[A-Z]/;function useEmitListeners(e=getCurrentInstance()){return{emitListeners:computed(()=>{const t={};return e?.vnode?.props&&Object.keys(e.vnode.props).forEach(e=>{listenerRE.test(e)&&(t[e]=!0)}),t})}}function useFocusHelper(){const e={"aria-hidden":"true",class:"q-calendar__focus-helper"};return[h("span",e)]}function useButton(){function e({focusable:e,focusType:t},a,n){const r=e&&t.includes("date");return h("button",{...a,tabindex:r?0:-1},[n,r&&useFocusHelper()])}return{renderButton:e}}const useCellWidthProps={cellWidth:[Number,String]};function useCellWidth(e){const t=computed(()=>void 0!==e.cellWidth);return{isSticky:t}}const useCheckChangeEmits=["change"];function useCheckChange(n,{days:r,lastStart:o,lastEnd:i}){function e(){const e=r.value;if(0===e.length)return!1;const t=e[0].date,a=e[e.length-1].date;return(!o.value||!i.value||t!==o.value||a!==i.value)&&(o.value=t,i.value=a,n("change",{start:t,end:a,days:e}),!0)}return{checkChange:e}}function useEventUtils(){function e(e,t){return(Array.isArray(t)?t:[t]).includes(e.keyCode)}return{isKeyCode:e}}const isKeyCode=useEventUtils().isKeyCode,useNavigationProps={useNavigation:Boolean};function useNavigation(t,{rootRef:a,focusRef:n,focusValue:r,datesRef:o,parsedView:i,emittedValue:u,direction:d,times:s}){let e=!1;function l(){e||document&&(e=!0,document.addEventListener("keyup",v),document.addEventListener("keydown",y))}function c(){document&&(document.removeEventListener("keyup",v),document.removeEventListener("keydown",y),e=!1)}function m(e){if(e&&document){const t=document.activeElement;if(t!==document.body&&a.value?.contains(t))return!0}return!1}function p(){let t=0;const a=window.setInterval(()=>{const e=o.value[n.value];e&&(e.focus(),50!==++t)&&document.activeElement!==e||window.clearInterval(a)},250)}function y(e){m(e)&&isKeyCode(e,[33,34,35,36,37,38,39,40])&&(e.stopPropagation(),e.preventDefault())}function v(e){if(m(e)&&isKeyCode(e,[33,34,35,36,37,38,39,40])){const t={33:D,34:k,35:w,36:_,37:g,38:f,39:T,40:h};t[e.keyCode]?.()}}function f(){let e=copyTimestamp(r.value);if("month"===i.value){if(e=addToDate(e,{day:-7}),r.value.month!==e.month)return d.value="prev",void(u.value=e.date)}else e=addToDate(e,{minute:Number(t.intervalMinutes)});d.value="prev",n.value=e.date}function h(){let e=copyTimestamp(r.value);if("month"===i.value){if(e=addToDate(e,{day:7}),r.value.month!==e.month)return d.value="next",void(u.value=e.date)}else e=addToDate(e,{minute:Number(t.intervalMinutes)});d.value="next",n.value=e.date}function g(){let e=copyTimestamp(r.value);d.value="prev";do{e=addToDate(e,{day:-1})}while(!t.weekdays.includes(Number(e.weekday)));n.value=e.date}function T(){let e=copyTimestamp(r.value);d.value="next";do{e=addToDate(e,{day:1})}while(!t.weekdays.includes(Number(e.weekday)));n.value=e.date}function D(){let e=copyTimestamp(r.value);e="month"===i.value?addToDate(e,{month:-1}):addToDate(e,{day:-7}),d.value="prev",n.value=e.date}function k(){let e=copyTimestamp(r.value);e="month"===i.value?addToDate(e,{month:1}):addToDate(e,{day:7}),d.value="next",n.value=e.date}function _(){let e=copyTimestamp(r.value);e="month"===i.value?getStartOfMonth(e):getStartOfWeek(e,t.weekdays||[],s.today);while(!t.weekdays.includes(Number(e.weekday)))e=addToDate(e,{day:-1});n.value=e.date}function w(){let e=copyTimestamp(r.value);e="month"===i.value?getEndOfMonth(e):getEndOfWeek(e,t.weekdays||[],s.today);while(!t.weekdays.includes(Number(e.weekday)))e=addToDate(e,{day:-1});n.value=e.date}return onBeforeUnmount(()=>{c()}),watch(()=>t.useNavigation,e=>{(!0===e?l:c)()}),!0===t.useNavigation&&l(),{startNavigation:l,endNavigation:c,tryFocus:p}}const renderButton=useButton().renderButton;var QCalendarScheduler=defineComponent({name:"QCalendarScheduler",directives:{ResizeObserver:ResizeObserverDirective},props:{...useCommonProps,...useSchedulerProps,...useColumnProps,...useMaxDaysProps,...useTimesProps,...useCellWidthProps,...useNavigationProps},emits:["update:model-value","update:model-resources","resource-expanded",...useCheckChangeEmits,...useMoveEmits,...getRawMouseEvents("-date"),...getRawMouseEvents("-day-resource"),...getRawMouseEvents("-head-resources"),...getRawMouseEvents("-head-day"),...getRawMouseEvents("-resource")],setup(f,{slots:g,emit:T,expose:x}){const e=ref(null),t=ref(null),q=ref(null),p=ref(f.modelValue||today()),a=ref(parsed(f.modelValue||today())),y=ref({}),L=ref({}),n=ref(),r=ref(),u=ref("next"),d=ref(f.modelValue||today()),s=ref("0000-00-00"),l=ref(0),D=ref(f.modelValue),c=reactive({width:0,height:0}),v=ref(""),k=ref(""),U=ref(null),Y=ref(null),o=(watch(()=>f.view,()=>{l.value=0}),computed(()=>{return"month"===f.view?"month-interval":f.view})),P=getCurrentInstance();if(null===P)throw new Error("current instance is null");const _=useEmitListeners(P).emitListeners,w=useCellWidth(f).isSticky,{times:i,setCurrent:B,updateCurrent:V}=useTimes(f),{parsedStart:z,parsedEnd:K,dayFormatter:Z,weekdayFormatter:$,ariaDateFormatter:X,dayStyleDefault:j,getRelativeClasses:I}=(V(),B(),useCommon(f,{startDate:d,endDate:s,times:i})),M=computed(()=>{return parseTimestamp(f.modelValue,i.now)||z.value||i.today}),Q=(a.value=M.value,p.value=M.value.date,useRenderValues(f,{parsedView:o,parsedValue:M,times:i})).renderValues,{rootRef:m,scrollWidth:G,__renderCalendar:J}=useCalendar(f,Ce,{scrollArea:e,pane:t}),{days:b,parsedCellWidth:N,styleDefault:ee}=useInterval(f,{times:i,scrollArea:e,parsedStart:z,parsedEnd:K,maxDays:l,size:c,headerColumnRef:q}),S=useMove(f,{parsedView:o,parsedValue:M,direction:u,maxDays:l,times:i,emittedValue:D,emit:T}).move,E=useMouseEvents(T,_).getDefaultMouseEventHandlers,te=useCheckChange(T,{days:b,lastStart:U,lastEnd:Y}).checkChange,A=useEventUtils().isKeyCode,ae=useNavigation(f,{rootRef:m,focusRef:p,focusValue:a,datesRef:y,parsedView:o,emittedValue:D,direction:u,times:i}).tryFocus,O=computed(()=>{const e=parseInt(String(f.columnCount),10);return"day"===o.value&&e>1?e:"day"===o.value&&f.maxDays&&f.maxDays>1?f.maxDays:b.value.length}),ne=computed(()=>{return m.value?parseInt(window.getComputedStyle(m.value).getPropertyValue("--calendar-resources-width"),10):0}),F=computed(()=>{const e=parseInt(String(f.resourceHeight),10);return 0===e?"auto":e}),re=computed(()=>{return parseInt(String(f.resourceMinHeight),10)}),W=computed(()=>{if(m.value){const e=c.width||m.value.getBoundingClientRect().width;if(e&&ne.value&&O.value)return(e-G.value-ne.value)/O.value+"px"}return 100/O.value+"%"});function oe(){D.value=today()}function ie(e=1){S(e)}function ue(e=1){S(-e)}function de({width:e,height:t}){c.width=e,c.height=t}function C(e){return e.date===D.value}function se(){return h("div",{roll:"presentation",class:{"q-calendar-scheduler__head":!0,"q-calendar__sticky":!0===w.value},style:{marginRight:G.value+"px"}},[le(),ce()])}function le(){const e=g["head-resources"],t={days:b.value,timestamps:b.value,date:f.modelValue,resources:f.modelResources};return h("div",{class:{"q-calendar-scheduler__head--resources":!0,"q-calendar__sticky":!0===w.value},...E("-head-resources",e=>{return{scope:t,event:e}})},[e&&e({scope:t})])}function ce(){return h("div",{ref:q,class:{"q-calendar-scheduler__head--days__column":!0}},[me(),pe()])}function me(){return h("div",{class:{"q-calendar-scheduler__head--days__weekdays":!0}},[...ye()])}function pe(){const e=g["head-days-events"];return nextTick(()=>{if(r.value&&0===parseInt(String(f.columnCount),10)&&window)try{const e=window.getComputedStyle(r.value);n.value&&n.value.parentElement&&(n.value.parentElement.style.height=e.height,n.value.style.height=e.height)}catch{}}),h("div",{class:{"q-calendar-scheduler__head--days__event":!0}},[e&&h("div",{ref:n,style:{position:"absolute",left:0,top:0,right:0,overflow:"hidden",zIndex:1}},[e({scope:{timestamps:b.value,days:b.value,ref:r}})]),...ve()])}function ye(){const e=parseInt(String(f.columnCount),10),a=parseInt(String(f.columnIndexStart),10);return 1===b.value.length&&e>0?Array.apply(null,new Array(e)).map((e,t)=>t+a).map(e=>fe(b.value[0],e)):b.value.map(e=>fe(e,0))}function ve(){const e=parseInt(String(f.columnCount),10),a=parseInt(String(f.columnIndexStart),10);return 1===b.value.length&&e>0?Array.apply(null,new Array(e)).map((e,t)=>t+a).map(e=>ge(b.value[0],e)):b.value.map(e=>ge(e,0))}function fe(t,e){const a=g["head-day"],n=g["head-date"],r=!0!==f.noActiveDate&&C(t),o={timestamp:t,activeDate:r,droppable:v.value===t.date,disabled:!!f.disabledWeekdays&&f.disabledWeekdays.includes(Number(t.weekday)),columnIndex:e??0},i=!0===w.value?convertToUnit(N.value):W.value,u=f.weekdayStyle||j,d={width:i,maxWidth:i,minWidth:i,...u({scope:o})},s=(!0===w.value&&(d.minWidth=i),"function"===typeof f.weekdayClass?f.weekdayClass({scope:o}):{}),l=!0===f.focusable&&f.focusType.includes("weekday"),c=t.date+(void 0!==e?"-"+e:""),m={key:c,ref:e=>{null!==e&&(y.value[c]=e)},tabindex:!0===l?0:-1,class:{"q-calendar-scheduler__head--day":!0,...s,...I(t),"q-active-date":r,"q-calendar__hoverable":!0===f.hoverable,"q-calendar__focusable":!0===l},style:d,onFocus:()=>{!0===l&&(p.value=c)},onKeydown:e=>{!0!==t.disabled&&A(e,[13,32])&&(e.stopPropagation(),e.preventDefault())},onKeyup:e=>{!0!==t.disabled&&A(e,[13,32])&&(D.value=t.date)},...E("-head-day",e=>{return{scope:o,event:e}}),onDragenter:e=>{void 0!==f.dragEnterFunc&&"function"===typeof f.dragEnterFunc&&(!0===f.dragEnterFunc(e,"head-day",{scope:o})?v.value=t.date:v.value="")},onDragover:e=>{void 0!==f.dragOverFunc&&"function"===typeof f.dragOverFunc&&(!0===f.dragOverFunc(e,"head-day",{scope:o})?v.value=t.date:v.value="")},onDragleave:e=>{void 0!==f.dragLeaveFunc&&"function"===typeof f.dragLeaveFunc&&(!0===f.dragLeaveFunc(e,"head-day",{scope:o})?v.value=t.date:v.value="")},onDrop:e=>{void 0!==f.dropFunc&&"function"===typeof f.dropFunc&&(!0===f.dropFunc(e,"head-day",{scope:o})?v.value=t.date:v.value="")}};return h("div",m,[void 0!==a&&a({scope:o}),void 0===a&&ke(t,e),void 0===a&&he(t),void 0===a&&n&&n({scope:o}),void 0===a&&_e(t,e),useFocusHelper()])}function he(e){return"stacked"===f.dateHeader?[!0!==f.noDefaultHeaderText?R(e):[],!0!==f.noDefaultHeaderBtn?H(e):[]].flat():"inline"===f.dateHeader?("left"===f.weekdayAlign&&"right"===f.dateAlign||"right"===f.weekdayAlign&&f.dateAlign,h("div",{class:"q-calendar__header--inline"},[!0!==f.noDefaultHeaderText&&R(e),!0!==f.noDefaultHeaderBtn&&H(e)])):"inverted"===f.dateHeader?("left"===f.weekdayAlign&&"right"===f.dateAlign||"right"===f.weekdayAlign&&f.dateAlign,h("div",{class:"q-calendar__header--inline"},[!0!==f.noDefaultHeaderBtn&&H(e),!0!==f.noDefaultHeaderText&&R(e)])):void 0}function ge(e,t){const a=g["head-day-event"],n=!0!==f.noActiveDate&&C(e),r={timestamp:e,activeDate:n,droppable:v.value===e.date,disabled:!!f.disabledWeekdays&&f.disabledWeekdays.includes(Number(e.weekday)),columnIndex:t??0},o=!0===w.value?convertToUnit(N.value):W.value,i={width:o,maxWidth:o,minWidth:o};return!0===w.value&&(i.minWidth=o),h("div",{key:"event-"+e.date+(void 0!==t?"-"+t:""),class:{"q-calendar-scheduler__head--day__event":!0,...I(e),"q-active-date":n},style:i},[a&&a({scope:r})])}function R(e){const t=g["head-weekday-label"],a=!0===f.shortWeekdayLabel,n={timestamp:e,shortWeekdayLabel:a},r={class:{"q-calendar-scheduler__head--weekday":!0,["q-calendar__"+f.weekdayAlign]:!0,"q-calendar__ellipsis":!0}};return h("div",r,t&&t({scope:n})||Te(e,a))}function Te(e,t){const a=$.value(e,t||f.weekdayBreakpoints[0]>0&&N.value<=f.weekdayBreakpoints[0]);return h("span",{class:"q-calendar-scheduler__head--weekday-label q-calendar__ellipsis"},f.weekdayBreakpoints[1]>0&&N.value<=f.weekdayBreakpoints[1]?minCharWidth(a,Number(f.minWeekdayLabel)):a)}function H(e){const t={class:{"q-calendar-scheduler__head--date":!0,["q-calendar__"+f.dateAlign]:!0}};return h("div",t,De(e))}function De(a){const e=!0!==f.noActiveDate&&C(a),t=Z.value(a,!1),n=g["head-day-label"],r=g["head-day-button"],o={dayLabel:t,timestamp:a,activeDate:e},i={class:{"q-calendar-scheduler__head--day__label":!0,"q-calendar__button":!0,"q-calendar__button--round":"round"===f.dateType,"q-calendar__button--rounded":"rounded"===f.dateType,"q-calendar__button--bordered":!0===a.current,"q-calendar__focusable":!0},disabled:a.disabled,onKeydown:e=>{!0!==a.disabled&&A(e,[13,32])&&(e.stopPropagation(),e.preventDefault())},onKeyup:e=>{!0!==a.disabled&&A(e,[13,32])&&(D.value=a.date,void 0!==_.value.onClickDate)&&T("click-date",{scope:o})},...E("-date",(e,t)=>{return"click-date"!==t&&"contextmenu-date"!==t||(D.value=a.date,"click-date"===t&&e.preventDefault()),{scope:o,event:e}})};return!0!==f.noAria&&(i.ariaLabel=X.value(a,!1)),r?h("div",[r({scope:o})]):renderButton(f,i,n?n({scope:o}):t)}function ke(e,t){const a=g["column-header-before"];if(a){const n={timestamp:e,columnIndex:t};return h("div",{class:"q-calendar-scheduler__column-header--before"},[a({scope:n})])}}function _e(e,t){const a=g["column-header-after"];if(a){const n={timestamp:e,columnIndex:t};return h("div",{class:"q-calendar-scheduler__column-header--after"},[a({scope:n})])}}function we(){return h("div",{class:"q-calendar-scheduler__body"},[Ie()])}function Ie(){return!0===w.value?h("div",{ref:e,class:{"q-calendar-scheduler__scroll-area":!0,"q-calendar__scroll":!0}},[!0!==w.value&&Ae(),be()]):!0===f.noScroll?Me():h("div",{ref:e,class:{"q-calendar-scheduler__scroll-area":!0,"q-calendar__scroll":!0}},[Me()])}function Me(){return h("div",{ref:t,class:"q-calendar-scheduler__pane"},[be()])}function be(){return h("div",{class:"q-calendar-scheduler__day--container"},[!0===w.value&&!0!==f.noHeader&&se(),Ne()])}function Ne(e=void 0,a=0,n=!0){return void 0===e&&(e=f.modelResources),e.map((e,t)=>{return Se(e,t,a,void 0!==e.children?e.expanded:n)}).flat()}function Se(e,t,a=0,n=!0){const r={},o=(r.height=void 0!==e.height?convertToUnit(parseInt(e.height,10)):F.value?convertToUnit(F.value):"auto",re.value>0&&(r.minHeight=convertToUnit(re.value)),h("div",{key:e[f.resourceKey]+"-"+t,class:{"q-calendar-scheduler__resource--row":!0},style:r},[Ee(e,t,a,n),Ae(e,t,a,n)]));return void 0!==e.children?[o,h("div",{class:{"q-calendar__child":!0,"q-calendar__child--expanded":!0===n,"q-calendar__child--collapsed":!0!==n}},[Ne(e.children,a+1,!1===n?n:e.expanded)])]:[o]}function Ee(t,e,a=0,n=!0){const r=g["resource-label"],o=parseInt(String(f.resourceMinHeight),10),i={},u=(i.height=void 0!==t.height?convertToUnit(parseInt(t.height,10)):F.value?convertToUnit(F.value):"auto",o>0&&(i.minHeight=convertToUnit(o)),f.resourceStyle||ee),d=t[f.resourceLabel],s=!0===f.focusable&&f.focusType.includes("resource")&&!0===n,l=t[f.resourceKey],c={resource:t,timestamps:b.value,days:b.value,resourceIndex:e,indentLevel:a,label:d,droppable:k.value===l},m="function"===typeof f.resourceClass?f.resourceClass({scope:c}):{};return h("div",{key:t[f.resourceKey]+"-"+e,ref:e=>{null!==e&&(L.value[t[f.resourceKey]]=e)},tabindex:!0===s?0:-1,class:{"q-calendar-scheduler__resource":0===a,"q-calendar-scheduler__resource--section":0!==a,...m,"q-calendar__sticky":!0===w.value,"q-calendar__hoverable":!0===f.hoverable,"q-calendar__focusable":!0===s},style:{...i,...u({scope:c})},onDragenter:e=>{void 0!==f.dragEnterFunc&&"function"===typeof f.dragEnterFunc&&(!0===f.dragEnterFunc(e,"resource",{scope:c})?k.value=l:k.value="")},onDragover:e=>{void 0!==f.dragOverFunc&&"function"===typeof f.dragOverFunc&&(!0===f.dragOverFunc(e,"resource",{scope:c})?k.value=l:k.value="")},onDragleave:e=>{void 0!==f.dragLeaveFunc&&"function"===typeof f.dragLeaveFunc&&(!0===f.dragLeaveFunc(e,"resource",{scope:c})?k.value=l:k.value="")},onDrop:e=>{void 0!==f.dropFunc&&"function"===typeof f.dropFunc&&(!0===f.dropFunc(e,"resource",{scope:c})?k.value=l:k.value="")},onKeydown:e=>{A(e,[13,32])&&(e.stopPropagation(),e.preventDefault())},onKeyup:e=>{A(e,[13,32])&&void 0!==_.value.onClickResource&&T("click-resource",{scope:c,event:e})},...E("-resource",e=>{return{scope:c,event:e}})},[[h("div",{class:{"q-calendar__parent":void 0!==t.children,"q-calendar__parent--expanded":void 0!==t.children&&!0===t.expanded,"q-calendar__parent--collapsed":void 0!==t.children&&!0!==t.expanded},onClick:e=>{e.stopPropagation(),t.expanded=!t.expanded,T("resource-expanded",{expanded:t.expanded,scope:c})}}),h("div",{class:{"q-calendar-scheduler__resource--text":!0,"q-calendar__ellipsis":!0},style:{paddingLeft:10*a+2+"px"}},[r?r({scope:c}):d]),useFocusHelper()]])}function Ae(e,t,a=0,n=!0){const r=g["resource-days"],o=!0===w.value?convertToUnit(N.value):W.value,i={resource:e,resourceIndex:t,indentLevel:a,expanded:n,cellWidth:o,timestamps:b.value,days:b.value},u={},d=(u.height=parseInt(String(f.resourceHeight),10)>0?convertToUnit(parseInt(String(f.resourceHeight),10)):"auto",parseInt(String(f.resourceMinHeight),10)>0&&(u.minHeight=convertToUnit(parseInt(String(f.resourceMinHeight),10))),{class:"q-calendar-scheduler__resource--days",style:u});return h("div",d,[...Oe(e,t,a,n),r&&r({scope:i})])}function Oe(t,a,n=0,r=!0){return 1===b.value.length&&parseInt(String(f.columnCount),10)>0?Array.apply(null,new Array(parseInt(String(f.columnCount),10))).map((e,t)=>t+parseInt(String(f.columnIndexStart),10)).map(e=>Fe(b.value[0],e,t,a,n,r)):b.value.map(e=>Fe(e,0,t,a,n,r))}function Fe(e,t,a,n,r=0,o=!0){const i=g.day,u=f.dayStyle||j,d=!0!==f.noActiveDate&&M.value.date===e.date,s=e.date+":"+a[f.resourceKey]+(void 0!==t?":"+t:""),l=k.value===s,c={timestamp:e,columnIndex:t,resource:a,resourceIndex:n,indentLevel:r,activeDate:d,droppable:l},m=!0===w.value?convertToUnit(N.value):W.value,p={width:m,maxWidth:m,...u({scope:c})},y=(p.height=parseInt(String(f.resourceHeight),10)>0?convertToUnit(parseInt(String(f.resourceHeight),10)):"auto",parseInt(String(f.resourceMinHeight),10)>0&&(p.minHeight=convertToUnit(parseInt(String(f.resourceMinHeight),10))),"function"===typeof f.dayClass?f.dayClass({scope:c}):{}),v=!0===f.focusable&&f.focusType.includes("day")&&!0===o;return h("div",{key:e.date+(void 0!==t?":"+t:""),tabindex:!0===v?0:-1,class:{"q-calendar-scheduler__day":0===r,"q-calendar-scheduler__day--section":0!==r,...y,...I(e),"q-calendar__hoverable":!0===f.hoverable,"q-calendar__focusable":!0===v},style:p,onDragenter:e=>{void 0!==f.dragEnterFunc&&"function"===typeof f.dragEnterFunc&&(!0===f.dragEnterFunc(e,"day",{scope:c})?k.value=s:k.value="")},onDragover:e=>{void 0!==f.dragOverFunc&&"function"===typeof f.dragOverFunc&&(!0===f.dragOverFunc(e,"day",{scope:c})?k.value=s:k.value="")},onDragleave:e=>{void 0!==f.dragLeaveFunc&&"function"===typeof f.dragLeaveFunc&&(!0===f.dragLeaveFunc(e,"day",{scope:c})?k.value=s:k.value="")},onDrop:e=>{void 0!==f.dropFunc&&"function"===typeof f.dropFunc&&(!0===f.dropFunc(e,"day",{scope:c})?k.value=s:k.value="")},onKeydown:e=>{A(e,[13,32])&&(e.stopPropagation(),e.preventDefault())},onKeyup:e=>{A(e,[13,32])&&(D.value=c.timestamp.date,void 0!==_.value.onClickResource)&&T("click-resource",{scope:c,event:e})},...E("-day-resource",e=>{return{scope:c,event:e}})},[i&&i({scope:c}),useFocusHelper()])}function We(){return h("div",{},"No resources have been defined")}function Ce(){const{start:e,end:t,maxDays:a}=Q.value,n=(d.value===e.date&&s.value===t.date&&l.value===a||(d.value=e.date,s.value=t.date,l.value=a),c.width>0),r=f.modelResources&&f.modelResources.length>0,o=withDirectives(h("div",{key:d.value,class:"q-calendar-scheduler"},[!0===n&&!0===r&&!0!==w.value&&!0!==f.noHeader&&se(),!0===n&&!0===r&&we(),!1===r&&We()]),[[ResizeObserverDirective,de]]);if(!0!==f.animated)return o;{const i="q-calendar--"+("prev"===u.value?f.transitionPrev:f.transitionNext);return h(Transition,{name:i,appear:!0},()=>o)}}return watch([b],te,{deep:!0,immediate:!0}),watch(()=>f.modelValue,(e,t)=>{if(D.value!==f.modelValue){if(!0===f.animated){const a=getDayIdentifier(parsed(e)),n=getDayIdentifier(parsed(t));u.value=a>=n?"next":"prev"}D.value=e}p.value=e}),watch(D,(e,t)=>{if(D.value!==f.modelValue){if(!0===f.animated){const a=getDayIdentifier(parsed(e)),n=getDayIdentifier(parsed(t));u.value=a>=n?"next":"prev"}T("update:model-value",e)}}),watch(p,e=>{e&&(a.value=parseTimestamp(e))}),watch(a,()=>{y.value[p.value]?y.value[p.value].focus():ae()}),watch(()=>f.maxDays,e=>{l.value=e}),onBeforeUpdate(()=>{y.value={},n.value=void 0,r.value=void 0,L.value={}}),onMounted(()=>{}),x({prev:ue,next:ie,move:S,moveToToday:oe,updateCurrent:V}),()=>J()}});const version="4.1.1";var Plugin={version:version,QCalendarScheduler:QCalendarScheduler,...Timestamp$1,...helpers$1,install(e){e.component(String(QCalendarScheduler.name),QCalendarScheduler)}};export{DAYS_IN_MONTH,DAYS_IN_MONTH_LEAP,DAYS_IN_MONTH_MAX,DAYS_IN_MONTH_MIN,DAY_MIN,FIRST_HOUR,MONTH_MAX,MONTH_MIN,PARSE_DATE,PARSE_DATETIME,PARSE_TIME,QCalendarScheduler,TIME_CONSTANTS,addToDate,compareDate,compareDateTime,compareTime,compareTimestamps,convertToUnit,copyTimestamp,createDayList,createIntervalList,createNativeLocaleFormatter,daysBetween,daysInMonth,Plugin as default,diffTimestamp,findWeekday,getDate,getDateTime,getDayIdentifier,getDayOfYear,getDayTimeIdentifier,getEndOfMonth,getEndOfWeek,getMonthFormatter,getMonthNames,getStartOfMonth,getStartOfWeek,getTime,getTimeIdentifier,getWeekday,getWeekdayFormatter,getWeekdayNames,getWorkWeek,indexOf,isBetweenDates,isLeapYear,isOverlappingDates,isToday,makeDate,makeDateTime,maxTimestamp,minCharWidth,minTimestamp,moveRelativeDays,nextDay,padNumber,parseDate,parseTime,parseTimestamp,parsed,prevDay,relativeDays,today,updateDayOfYear,updateDisabled,updateFormatted,updateMinutes,updateRelative,updateWeekday,updateWorkWeek,validateNumber,validateTimestamp,version,weeksBetween}; |
/*! | ||
* @quasar/quasar-ui-qcalendar v4.1.0 | ||
* @quasar/quasar-ui-qcalendar v4.1.1 | ||
* (c) 2025 Jeff Galbraith <jeff@quasar.dev> | ||
* Released under the MIT License. | ||
*/ | ||
(function(e,t){"object"===typeof exports&&"undefined"!==typeof module?module.exports=t(require("vue")):"function"===typeof define&&define.amd?define(["vue"],t):(e="undefined"!==typeof globalThis?globalThis:e||self,e.QCalendarScheduler=t(e.Vue))})(this,function(xe){const d=/^(\d{4})-(\d{1,2})(-(\d{1,2}))?([^\d]+(\d{1,2}))?(:(\d{1,2}))?(:(\d{1,2}))?(.(\d{1,3}))?$/,f=/^(\d{4})-(\d{1,2})(-(\d{1,2}))?/,y=/(\d\d?)(:(\d\d?)|)(:(\d\d?)|)/,k=[0,31,28,31,30,31,30,31,31,30,31,30,31],b=[0,31,29,31,30,31,30,31,31,30,31,30,31],r={MILLISECONDS_IN:{SECOND:1e3,MINUTE:6e4,HOUR:36e5,DAY:864e5,WEEK:6048e5},SECONDS_IN:{MINUTE:60,HOUR:3600,DAY:86400,WEEK:604800},MINUTES_IN:{MINUTE:1,HOUR:60,DAY:1440,WEEK:10080},HOURS_IN:{DAY:24,WEEK:168},DAYS_IN:{WEEK:7}},_=28,I=31,C=12,F=1,N=1,A=0;function t(e){return"string"===typeof e&&d.test(e)}function We(e){if("string"!==typeof e)return null;const t=d.exec(e);if(!t||!t[1]||!t[2])return null;const a=parseInt(t[1],10),n=parseInt(t[2],10),r=parseInt(t[4]||"1",10),o=parseInt(t[6]||"0",10),u=parseInt(t[8]||"0",10);return{date:e,time:o.toString().padStart(2,"0")+":"+u.toString().padStart(2,"0"),year:a,month:n,day:r,hour:o,minute:u,hasDay:!!t[4],hasTime:!0,past:!1,current:!1,future:!1,disabled:!1,weekday:0,doy:0,workweek:0}}function M(e,t=!1){if(!(e instanceof Date))return null;const a=t?"UTC":"";return w({date:o(e[`get${a}FullYear`](),4)+"-"+o(e[`get${a}Month`]()+1,2)+"-"+o(e[`get${a}Date`](),2),time:o(e[`get${a}Hours`]()||0,2)+":"+o(e[`get${a}Minutes`]()||0,2),year:e[`get${a}FullYear`](),month:e[`get${a}Month`]()+1,day:e[`get${a}Date`](),hour:e[`get${a}Hours`](),minute:e[`get${a}Minutes`](),weekday:0,doy:0,workweek:0,hasDay:!0,hasTime:!0,past:!1,current:!1,future:!1,disabled:!1})}function o(e,t){let a=String(e);while(a.length<t)a="0"+a;return a}function E(e){return e%4===0&&e%100!==0||e%400===0}function i(e,t){return(E(e)?b:k)[t]}function h(e){const t=new Date(e.year,e.month-1,e.day+1);return w(de({...e,year:t.getFullYear(),month:t.getMonth()+1,day:t.getDate()}))}function p(e){const t=new Date(e.year,e.month-1,e.day-1);return w(de({...e,year:t.getFullYear(),month:t.getMonth()+1,day:t.getDate()}))}function Oe(){const e=new Date,t=e.getMonth()+1,a=e.getDate(),n=e.getFullYear();return[n,o(t,2),o(a,2)].join("-")}function q(e){return e===Oe()}function K(e,t,a){let n=j(e);if(t){if(1===n.day||0===n.weekday)while(!t.includes(Number(n.weekday)))n=h(n);n=v(n,t[0],p),n=w(n),a&&(n=$(n,a,n.hasTime))}return n}function P(e,t,a){let n=j(e);if(t&&Array.isArray(t)){const r=i(n.year,n.month);if(r===n.day||n.weekday===t[t.length-1])while(!t.includes(Number(n.weekday)))n=p(n);n=v(n,t[t.length-1],h),n=w(n),a&&(n=$(n,a,n.hasTime))}return n}function T(e){let t=j(e);return t.day=N,t=w(t),t}function S(e){let t=j(e);return t.day=i(t.year,t.month),t=w(t),t}function Z(e){const t=Object.prototype.toString.call(e);switch(t){case"[object Number]":return e;case"[object String]":{const a=y.exec(e);return a?60*parseInt(a[1],10)+parseInt(a[3]||"0",10):!1}case"[object Object]":return"object"!==typeof e||"number"!==typeof e.hour||"number"!==typeof e.minute?!1:"object"===typeof e&&"hour"in e&&"minute"in e&&60*e.hour+e.minute}return!1}function x(e,t){return!(!e||!t)&&e.year===t.year&&e.month===t.month&&e.day===t.day&&e.hour===t.hour&&e.minute===t.minute}function W(e,t){return s(e)===s(t)}function O(e,t){return c(e)===c(t)}function H(e,t){return X(e)===X(t)}function He(e,t=null){let a=We(e);return a?(a=w(a),t&&(a=$(a,t,a.hasTime)),a):null}function Re(e){return 1e8*(e.year??0)+1e6*(e.month??0)+1e4*(e.day??0)}function l(e){return 100*(e.hour??0)+(e.minute??0)}function z(e){return Re(e)+l(e)}function R(e,t,a=!1){const n=Date.UTC(e.year??0,(e.month??1)-1,e.day??1,e.hour??0,e.minute??0),r=Date.UTC(t.year??0,(t.month??1)-1,t.day??1,t.hour??0,t.minute??0);return!0===a&&r<n?0:r-n}function $(e,t,a=!1){let n=j(e),r=Re(t),o=Re(n),u=r===o;return n.hasTime&&a&&u&&(r=l(t),o=l(n),u=r===o),n.past=o<r,n.current=u,n.future=o>r,n.currentWeekday=n.weekday===t.weekday,n}function U(e,t,a=null){let n=j(e);return n.hasTime=!0,n.hour=Math.floor(t/r.MINUTES_IN.HOUR),n.minute=t%r.MINUTES_IN.HOUR,n.time=c(n),a&&(n=$(n,a,!0)),n}function g(e){let t=j(e);return t.weekday=u(t),t}function L(e){let t=j(e);return t.doy=a(t)||0,t}function B(e){let t=j(e);return t.workweek=n(t),t}function Y(e,t,a,n,r){let o=j(e);const u=Re(o);if(void 0!==t){const s=We(t);if(s){const c=Re(s);u<=c&&(o.disabled=!0)}}if(!0!==o.disabled&&void 0!==a){const v=We(a);if(v){const m=Re(v);u>=m&&(o.disabled=!0)}}if(!0!==o.disabled&&Array.isArray(n)&&n.length>0)for(var d in n)if(n[d]===o.weekday){o.disabled=!0;break}if(!0!==o.disabled&&Array.isArray(r)&&r.length>0)for(var i in r)if(Array.isArray(r[i])&&2===r[i].length&&r[i][0]&&r[i][1]){const f=We(r[i][0]),y=We(r[i][1]);if(f&&y&&oe(o,f,y)){o.disabled=!0;break}}else{const h=r[i];if(Array.isArray(h))for(var l of h){const p=He(l);if(p){const g=Re(p);if(g===u){o.disabled=!0;break}}}else if(h){const w=He(h);if(w){const D=Re(w);D===u&&(o.disabled=!0)}}}return o}function w(e){let t=j(e);return t.hasTime=!0,t.time=c(t),t.date=s(t),t.weekday=u(t),t.doy=a(t)||0,t.workweek=n(t),t}function a(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 n(e){let t=j(e);if(0===t.year){const r=He(Oe());r&&(t=r)}const a=new Date(Date.UTC(t.year,t.month-1,t.day)),n=4;a.setUTCDate(a.getUTCDate()-(a.getUTCDay()+6)%7+n),a.setUTCDate(a.getUTCDate()+n-(a.getUTCDay()||7));e=new Date(Date.UTC(a.getUTCFullYear(),0,1)),e=Math.ceil(((a.valueOf()-e.valueOf())/864e5+1)/7);return e}function u(e){let t=e.weekday;if(e.hasDay){const a=Math.floor,n=e.day,r=(e.month+9)%C+1,o=a(e.year/100),u=e.year%100-(e.month<=2?1:0);t=((n+a(2.6*r-.2)-2*o+u+a(u/4)+a(o/4))%7+7)%7}return t??0}function j(e){return{...e}}function s(e){let t=o(e.year,4)+"-"+o(e.month,2);return e.hasDay&&(t+="-"+o(e.day,2)),t}function c(e){return e.hasTime?o(e.hour,2)+":"+o(e.minute,2):""}function X(e){return s(e)+" "+(e.hasTime?c(e):"00:00")}function V(e,t=h,a=1,n=[0,1,2,3,4,5,6]){const r=j(e);return D(r,t,a,n)}function D(e,t=h,a=1,n=[0,1,2,3,4,5,6]){let r=j(e);n.includes(Number(r.weekday))||0!==r.weekday||t!==h||++a;while(--a>=0)r=t(r),n.length<7&&!n.includes(Number(r.weekday))&&++a;return r}function v(e,t,a=h,n=6){let r=j(e);while(r.weekday!==t&&--n>=0)r=a(r);return r}function J(e,t,a,n=[0,1,2,3,4,5,6],r=void 0,o=void 0,u=[],d=[],i=42,l=0){const s=Re(e),c=Re(t),v=[];let m=j(e),f=0,y=f===c;if(!(c<s))while((!y||v.length<l)&&v.length<i){if(f=Re(m),y=y||f>c&&v.length>=l,y)break;if(n.includes(Number(m.weekday))){let e=j(m);e=w(e),e=$(e,a),e=Y(e,r,o,u,d),v.push(e)}m=D(m,h)}return v}function ee(t,a,n,r,o){const u=[];for(let e=0;e<r;++e){const d=(a+e)*n,i=j(t);u.push(U(i,d,o))}return u}function Q(n,r){const e=()=>"";return"undefined"===typeof Intl||"undefined"===typeof Intl.DateTimeFormat?e:(t,e)=>{try{const a=new Intl.DateTimeFormat(n||void 0,r(t,e));return a.format(ae(t))}catch(e){return console.error(`Intl.DateTimeFormat: ${e.message} -> `+X(t)),""}}}function te(e,t=!0){return t?new Date(Date.UTC(e.year,e.month-1,e.day,0,0)):new Date(e.year,e.month-1,e.day,0,0)}function ae(e,t=!0){return t?new Date(Date.UTC(e.year,e.month-1,e.day,e.hour,e.minute)):new Date(e.year,e.month-1,e.day,e.hour,e.minute)}function e(e){return isFinite(Number(e))}function ne(e,t=!1){const a=!0===t?z:Re;return e.reduce((e,t)=>{return Math.max(a(e),a(t))===a(e)?e:t})}function re(e,t=!1){const a=!0===t?z:Re;return e.reduce((e,t)=>{return Math.min(a(e),a(t))===a(e)?e:t})}function oe(e,t,a,n=!1){const r=Re(e)+(!0===n?l(e):0),o=Re(t)+(!0===n?l(t):0),u=Re(a)+(!0===n?l(a):0);return r>=o&&r<=u}function ue(e,t,a,n){const r=Re(e),o=Re(t),u=Re(a),d=Re(n);return r>=u&&r<=d||o>=u&&o<=d||u>=r&&o>=d}function G(e,t){const a=j(e);return t.year&&(a.year+=t.year),t.month&&(a.month+=t.month),t.day&&(a.day+=t.day),t.hour&&(a.hour+=t.hour),t.minute&&(a.minute+=t.minute),w(de(a))}function de(e){const t=new Date(e.year,e.month-1,e.day,e.hour,e.minute);return{...e,year:t.getFullYear(),month:t.getMonth()+1,day:t.getDate(),hour:t.getHours(),minute:t.getMinutes()}}function ie(e,t){const a=R(e,t,!0);return Math.floor(a/r.MILLISECONDS_IN.DAY)}function le(e,t){let a=j(e),n=j(t);return a=v(a,0),n=v(n,6),Math.ceil(ie(a,n)/r.DAYS_IN.WEEK)}const se={Sun:new Date("2020-01-05T00:00:00.000Z"),Mon:new Date("2020-01-06T00:00:00.000Z"),Tue:new Date("2020-01-07T00:00:00.000Z"),Wed:new Date("2020-01-08T00:00:00.000Z"),Thu:new Date("2020-01-09T00:00:00.000Z"),Fri:new Date("2020-01-10T00:00:00.000Z"),Sat:new Date("2020-01-11T00:00:00.000Z")};function ce(){const e=()=>"",r={long:{timeZone:"UTC",weekday:"long"},short:{timeZone:"UTC",weekday:"short"},narrow:{timeZone:"UTC",weekday:"narrow"}};return"undefined"===typeof Intl||"undefined"===typeof Intl.DateTimeFormat?e:t;function t(t,e,a){try{const n=new Intl.DateTimeFormat(a||void 0,r[e]||r["long"]);return n.format(se[t])}catch(e){return e instanceof Error&&console.error(`Intl.DateTimeFormat: ${e.message} -> day of week: `+t),""}}}function ve(t,a){const e=Object.keys(se),n=ce();return e.map(e=>String(n(e,t,a)))}function me(){const e=()=>"",o={long:{timeZone:"UTC",month:"long"},short:{timeZone:"UTC",month:"short"},narrow:{timeZone:"UTC",month:"narrow"}};return"undefined"===typeof Intl||"undefined"===typeof Intl.DateTimeFormat?e:t;function t(t,e,a){try{const n=new Intl.DateTimeFormat(a||void 0,o[e]||o["long"]),r=new Date;return r.setDate(1),r.setMonth(t),n.format(r)}catch(e){return e instanceof Error&&console.error(`Intl.DateTimeFormat: ${e.message} -> month: `+t),""}}}function fe(t,a){const n=me();return[...Array(12).keys()].map(e=>n(e,t,a))}var ye={PARSE_DATETIME:d,PARSE_DATE:f,PARSE_TIME:y,DAYS_IN_MONTH:k,DAYS_IN_MONTH_LEAP:b,DAYS_IN_MONTH_MIN:_,DAYS_IN_MONTH_MAX:I,MONTH_MAX:C,MONTH_MIN:F,DAY_MIN:N,TIME_CONSTANTS:r,FIRST_HOUR:A,today:Oe,getStartOfWeek:K,getEndOfWeek:P,getStartOfMonth:T,getEndOfMonth:S,parseTime:Z,validateTimestamp:t,parsed:We,parseTimestamp:He,parseDate:M,getDayIdentifier:Re,getTimeIdentifier:l,getDayTimeIdentifier:z,diffTimestamp:R,updateRelative:$,updateMinutes:U,updateWeekday:g,updateDayOfYear:L,updateWorkWeek:B,updateDisabled:Y,updateFormatted:w,getDayOfYear:a,getWorkWeek:n,getWeekday:u,isLeapYear:E,daysInMonth:i,copyTimestamp:j,padNumber:o,getDate:s,getTime:c,getDateTime:X,nextDay:h,prevDay:p,relativeDays:D,findWeekday:v,createDayList:J,createIntervalList:ee,createNativeLocaleFormatter:Q,makeDate:te,makeDateTime:ae,validateNumber:e,isBetweenDates:oe,isOverlappingDates:ue,daysBetween:ie,weeksBetween:le,addToDate:G,compareTimestamps:x,compareDate:W,compareTime:O,compareDateTime:H,getWeekdayFormatter:ce,getWeekdayNames:ve,getMonthFormatter:me,getMonthNames:fe},ye=Object.freeze({__proto__:null,DAYS_IN_MONTH:k,DAYS_IN_MONTH_LEAP:b,DAYS_IN_MONTH_MAX:I,DAYS_IN_MONTH_MIN:_,DAY_MIN:N,FIRST_HOUR:A,MONTH_MAX:C,MONTH_MIN:F,PARSE_DATE:f,PARSE_DATETIME:d,PARSE_TIME:y,TIME_CONSTANTS:r,addToDate:G,compareDate:W,compareDateTime:H,compareTime:O,compareTimestamps:x,copyTimestamp:j,createDayList:J,createIntervalList:ee,createNativeLocaleFormatter:Q,daysBetween:ie,daysInMonth:i,default:ye,diffTimestamp:R,findWeekday:v,getDate:s,getDateTime:X,getDayIdentifier:Re,getDayOfYear:a,getDayTimeIdentifier:z,getEndOfMonth:S,getEndOfWeek:P,getMonthFormatter:me,getMonthNames:fe,getStartOfMonth:T,getStartOfWeek:K,getTime:c,getTimeIdentifier:l,getWeekday:u,getWeekdayFormatter:ce,getWeekdayNames:ve,getWorkWeek:n,isBetweenDates:oe,isLeapYear:E,isOverlappingDates:ue,isToday:q,makeDate:te,makeDateTime:ae,maxTimestamp:ne,minTimestamp:re,moveRelativeDays:V,nextDay:h,padNumber:o,parseDate:M,parseTime:Z,parseTimestamp:He,parsed:We,prevDay:p,relativeDays:D,today:Oe,updateDayOfYear:L,updateDisabled:Y,updateFormatted:w,updateMinutes:U,updateRelative:$,updateWeekday:g,updateWorkWeek:B,validateNumber:e,validateTimestamp:t,weeksBetween:le});function Ue(e,t="px"){if(e)return isNaN(e)?String(e):"auto"===e?e:""+Number(e)+t}function he(t,a){for(let e=0;e<t.length;e++)if(!0===a(t[e],e))return e;return-1}function Le(e,t){return 0===t?e:e.slice(0,t)}var pe={convertToUnit:Ue,indexOf:he,minCharWidth:Le},pe=Object.freeze({__proto__:null,convertToUnit:Ue,default:pe,indexOf:he,minCharWidth:Le});const Be={mounted(e,t){if("function"===typeof t.value){const a=t.value,n={callback:a,size:{width:0,height:0},observer:new ResizeObserver(e=>{const t=e[0].contentRect;t.width===n.size.width&&t.height===n.size.height||(n.size.width=t.width,n.size.height=t.height,n.debounceTimeout&&clearTimeout(n.debounceTimeout),n.debounceTimeout=setTimeout(()=>{n.callback(n.size),n.debounceTimeout=void 0},100))})};n.observer.observe(e),e.__onResizeObserver=n}},beforeUnmount(e){if(e.__onResizeObserver){const{observer:t,debounceTimeout:a}=e.__onResizeObserver;a&&clearTimeout(a),t.unobserve(e),delete e.__onResizeObserver}}};function Ye(t,a,{scrollArea:e,pane:n}){if(!a){const s="[error: renderCalendar] no renderFunc has been supplied to useCalendar";throw console.error(s),new Error(s)}const r=xe.reactive({width:0,height:0}),o=xe.ref(null);function u({width:e,height:t}){r.width=e,r.height=t}const d=xe.computed(()=>{return!0!==t.noScroll&&e.value&&n.value&&r.height?e.value.offsetWidth-n.value.offsetWidth:0});function i(){}function l(){const e={ref:o,role:"complementary",lang:t.locale,class:`q-calendar ${t.dark?"q-calendar--dark":""} `+(t.bordered?"q-calendar__bordered":"")};return xe.withDirectives(xe.h("div",{...e},[a()]),[[Be,u]])}return{rootRef:o,scrollWidth:d,__initCalendar:i,__renderCalendar:l}}const ge=e=>e.every(e=>["day","date","weekday","interval","time","resource","task"].includes(e)),we={modelValue:{type:String,default:Oe(),validator:e=>""===e||t(e)},weekdays:{type:Array,default:()=>[0,1,2,3,4,5,6]},dateType:{type:String,default:"round",validator:e=>["round","rounded","square"].includes(e)},weekdayAlign:{type:String,default:"center",validator:e=>["left","center","right"].includes(e)},dateAlign:{type:String,default:"center",validator:e=>["left","center","right"].includes(e)},bordered:Boolean,dark:Boolean,noAria:Boolean,noActiveDate:Boolean,noHeader:Boolean,noScroll:Boolean,shortWeekdayLabel:Boolean,noDefaultHeaderText:Boolean,noDefaultHeaderBtn:Boolean,minWeekdayLabel:{type:[Number,String],default:1},weekdayBreakpoints:{type:Array,default:()=>[75,35],validator:e=>2===e.length},locale:{type:String,default:"en-US"},animated:Boolean,transitionPrev:{type:String,default:"slide-right"},transitionNext:{type:String,default:"slide-left"},disabledDays:Array,disabledBefore:String,disabledAfter:String,disabledWeekdays:{type:Array,default:()=>[]},dragEnterFunc:Function,dragOverFunc:Function,dragLeaveFunc:Function,dropFunc:Function,selectedDates:{type:[Array,Set],default:()=>[]},selectedStartEndDates:{type:Array,default:()=>[]},hoverable:Boolean,focusable:Boolean,focusType:{type:Array,default:()=>["date"],validator:ge}};function Ve(t,{startDate:e,endDate:a,times:n}){const r=xe.computed(()=>He(e.value)),o=xe.computed(()=>{return"0000-00-00"===a.value?P(r.value,t.weekdays,n.today):He(a.value)||r.value}),u=xe.computed(()=>Q(t.locale,()=>({timeZone:"UTC",day:"numeric"}))),d=xe.computed(()=>Q(t.locale,(e,t)=>({timeZone:"UTC",weekday:t?"short":"long"}))),i=xe.computed(()=>Q(t.locale,()=>({timeZone:"UTC",dateStyle:"full"})));function l(e,t){return e&&e.length>0&&e.includes(t.date)}function s(e,t){const a={firstDay:!1,betweenDays:!1,lastDay:!1};if(2===e.length){const n=Re(t),r=Re(We(e[0])),o=Re(We(e[1]));a.firstDay=r===n,a.lastDay=o===n,a.betweenDays=r<n&&o>n}return a}function c(e,t=!1,a=[],n=[],r=!1){const o=l(a,e),{firstDay:u,lastDay:d,betweenDays:i}=s(n,e);return{"q-past-day":!u&&!i&&!d&&!o&&!t&&!!e.past,"q-future-day":!u&&!i&&!d&&!o&&!t&&!!e.future,"q-outside":t,"q-current-day":!!e.current,"q-selected":o,"q-range-first":u,"q-range":i,"q-range-last":d,"q-range-hover":r&&(u||d||i),"q-disabled-day disabled":!0===e.disabled}}function v(e){return K(e,t.weekdays,n.today)}function m(e){return P(e,t.weekdays,n.today)}function f(){return{}}return{parsedStart:r,parsedEnd:o,dayFormatter:u,weekdayFormatter:d,ariaDateFormatter:i,arrayHasDate:l,checkDays:s,getRelativeClasses:c,startOfWeek:v,endOfWeek:m,dayStyleDefault:f}}function De(e,t){e instanceof Window?e.scrollTo({top:t,behavior:"instant"}):e.scrollTop=t}function ke(e){return e instanceof Window?e.scrollY:e.scrollTop}function be(o,u,d=500,i=performance.now(),l=ke(o)){d<=0||l===u?De(o,u):requestAnimationFrame(e=>{const t=e-i,a=Math.min(t/d,1),n=e=>e<.5?2*e*e:(4-2*e)*e-1,r=l+(u-l)*n(a);De(o,r),a<1&&be(o,u,d,i,l)})}function _e(r,e,o=500){const u=r.scrollLeft,d=e-u;let i=null;function l(e){null===i&&(i=e);const t=e-i,a=Math.min(t/o,1),n=e=>e<.5?2*e*e:(4-2*e)*e-1;r.scrollLeft=u+d*n(a),t<o&&requestAnimationFrame(l)}requestAnimationFrame(l)}const Te={view:{type:String,validator:e=>["day","week","month","month-interval"].includes(e),default:"day"},modelResources:{type:Array},resourceKey:{type:String,default:"id"},resourceLabel:{type:String,default:"label"},resourceHeight:{type:[Number,String],default:0,validator:e},resourceMinHeight:{type:[Number,String],default:70,validator:e},resourceStyle:{type:Function,default:null},resourceClass:{type:Function,default:null},weekdayStyle:{type:Function,default:null},weekdayClass:{type:Function,default:null},dayStyle:{type:Function,default:null},dayClass:{type:Function,default:null},dateHeader:{type:String,default:"stacked",validator:e=>["stacked","inline","inverted"].includes(e)}};function Ke(o,{times:t,scrollArea:n,parsedStart:e,parsedEnd:a,maxDays:r,size:u,headerColumnRef:d}){const i=xe.computed(()=>parseInt(String(o.intervalStart),10)),v=xe.computed(()=>parseInt(String(o.intervalMinutes),10)),l=xe.computed(()=>parseInt(String(o.intervalCount),10)),m=xe.computed(()=>parseFloat(String(o.intervalHeight))),f=xe.computed(()=>{let e=0;const t=Number(o.columnCount);return o.cellWidth?e=Number(o.cellWidth):u.width>0&&d.value&&(e=d.value.offsetWidth/(t>1?t:r.value)),e}),s=xe.computed(()=>i.value*v.value),c=xe.computed(()=>l.value*m.value),y=xe.computed(()=>l.value*f.value),h=xe.computed(()=>D(e.value)),p=xe.computed(()=>k(a.value)),g=xe.computed(()=>{return J(e.value,a.value,t.today,o.weekdays,o.disabledBefore,o.disabledAfter,o.disabledWeekdays,o.disabledDays,r.value)}),w=xe.computed(()=>{return g.value.map(e=>ee(e,i.value,v.value,l.value,t.now))});function D(e){return K(e,o.weekdays,t.today)}function k(e){return P(e,o.weekdays,t.today)}function b(e,t){return e&&e.length>0&&e.includes(X(t))}function _(e,t){const a={firstDay:!1,betweenDays:!1,lastDay:!1};if(e&&2===e.length){const n=z(t),r=z(We(e[0])),o=z(We(e[1]));a.firstDay=r===n,a.lastDay=o===n,a.betweenDays=r<n&&o>n}return a}function T(e,t=[],a=[]){const n=b(t,e),{firstDay:r,lastDay:o,betweenDays:u}=_(a,e);return{"q-selected":n,"q-range-first":!0===r,"q-range":!0===u,"q-range-last":!0===o,"q-disabled-interval disabled":!0===e.disabled}}function S(e,t,a){return[]}const I=xe.computed(()=>{const a={timeZone:"UTC",hour12:!o.hour24Format,hour:"2-digit",minute:"2-digit"},n={timeZone:"UTC",hour12:!o.hour24Format,hour:"numeric",minute:"2-digit"},r={timeZone:"UTC",hour12:!o.hour24Format,hour:"numeric"};return Q(o.locale,(e,t)=>t?0===e.minute?r:n:a)}),C=xe.computed(()=>{const e={timeZone:"UTC",dateStyle:"full",timeStyle:"short"};return Q(o.locale,()=>e)});function F(e){const t=w.value[0][0],a=t.hour===e.hour&&t.minute===e.minute;return!a&&0===e.minute}function N(e){}function A(e){return{}}function M(e,t,a=!1,n){let r=j(t);if(e.currentTarget){const o=e.currentTarget.getBoundingClientRect(),u=e,d=e,i=u.changedTouches||u.touches,l=(i&&i[0]?i[0]:d).clientY,s=(l-o.top)/m.value,c=Math.floor((a?Math.floor(s):s)*v.value);0!==c&&(r=G(r,{minute:c})),n&&(r=$(r,n,!0))}return r}function O(e,t,a=!1,n){let r=j(t);const o=e.currentTarget.getBoundingClientRect(),u=e,d=e,i=u.changedTouches||u.touches,l=(i&&i[0]?i[0]:d).clientY,s=(l-o.top)/m.value,c=Math.floor((a?Math.floor(s):s)*v.value);return 0!==c&&(r=G(r,{minute:c})),n&&(r=$(r,n,!0)),r}function H(e,t,a=!1,n){let r=j(t);if(e.currentTarget){const o=e.currentTarget.getBoundingClientRect(),u=e,d=e,i=u.changedTouches||u.touches,l=(i&&i[0]?i[0]:d).clientX,s=(l-o.left)/f.value,c=Math.floor((a?Math.floor(s):s)*v.value);0!==c&&(r=G(r,{minute:c})),n&&(r=$(r,n,!0))}return r}function R(e,t){const a={timestamp:e,timeStartPos:x,timeDurationHeight:E};return void 0!==t&&(a.columnIndex=t),a}function U(e,t){const a={timestamp:j(e),timeStartPosX:W,timeDurationWidth:q};return void 0!==t&&(a.index=t),a}function L(e,t=0){const a=x(e);return!(!1===a||!n.value)&&(be(n.value,a,t),!0)}function B(e,t=0){const a=W(e);return!(!1===a||!n.value)&&(_e(n.value,a,t),!0)}function E(e){return e/v.value*m.value}function q(e){return e/v.value*f.value}function Y(e){return e*v.value/m.value}function V(e){return e*v.value/f.value}function x(e,t=!0){const a=Z(e);if(!1===a)return!1;const n=s.value,r=l.value*v.value,o=(a-n)/r;let u=o*c.value;return t&&(u<0&&(u=0),u>c.value)&&(u=c.value),u}function W(e,t=!0){const a=Z(e);if(!1===a)return!1;const n=s.value,r=l.value*v.value,o=(a-n)/r;let u=o*y.value;return t&&(u<0&&(u=0),u>y.value)&&(u=y.value),u}return{parsedIntervalStart:i,parsedIntervalMinutes:v,parsedIntervalCount:l,parsedIntervalHeight:m,parsedCellWidth:f,parsedStartMinute:s,bodyHeight:c,bodyWidth:y,parsedWeekStart:h,parsedWeekEnd:p,days:g,intervals:w,intervalFormatter:I,ariaDateTimeFormatter:C,arrayHasDateTime:b,checkIntervals:_,getIntervalClasses:T,getResourceClasses:S,showIntervalLabelDefault:F,showResourceLabelDefault:N,styleDefault:A,getTimestampAtEventInterval:M,getTimestampAtEvent:O,getTimestampAtEventX:H,getScopeForSlot:R,getScopeForSlotX:U,scrollToTime:L,scrollToTimeX:B,timeDurationHeight:E,timeDurationWidth:q,heightToMinutes:Y,widthToMinutes:V,timeStartPos:x,timeStartPosX:W}}const Se={columnCount:{type:[Number,String],default:0,validator:e},columnIndexStart:{type:[Number,String],default:0,validator:e}},Ie={maxDays:{type:Number,default:1}},Ce={now:{type:String,validator:e=>""===e||t(e),default:""}};function Pe(e){const t=xe.reactive({now:He("0000-00-00 00:00"),today:He("0000-00-00")}),a=xe.computed(()=>e.now?He(e.now):o());function n(){t.now&&t.today&&(t.now.current=t.today.current=!0,t.now.past=t.today.past=!1,t.now.future=t.today.future=!1)}function r(){const e=a.value||o();u(e,t.now),d(e,t.now),u(e,t.today)}function o(){return M(new Date)}function u(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)}function d(e,t){e.time!==t.time&&(t.hour=e.hour,t.minute=e.minute,t.time=e.time)}return xe.watch(a,()=>r()),{times:t,parsedNow:a,setCurrent:n,updateCurrent:r,getNow:o,updateDay:u,updateTime:d}}function Ze(r,{parsedView:o,parsedValue:u,times:d}){const e=xe.computed(()=>{const e=u.value;let t=r.maxDays,a=e,n=e;switch(o.value){case"month":a=T(e),n=S(e),t=i(a.year,a.month);break;case"week":case"week-agenda":case"week-scheduler":a=K(e,r.weekdays,d.today),n=P(a,r.weekdays,d.today),t=r.weekdays.length;break;case"day":case"scheduler":case"agenda":n=V(j(n),h,t>1?t-1:t,r.weekdays),n=w(n);break;case"month-interval":case"month-scheduler":case"month-agenda":a=T(e),n=S(e),n=w(n),t=i(a.year,a.month);break;case"resource":t=1,n=V(j(n),h,t,r.weekdays),n=w(n);break}return{start:a,end:n,maxDays:t}});return{renderValues:e}}const Fe=e=>e.replace(/(-\w)/g,e=>e[1].toUpperCase());function Ne(t,e,a,n){const r={};for(const o in a){const u=a[o],d=Fe("on-"+o);if(!e.value)return console.warn("$listeners has not been set up"),{};if(void 0!==e.value[d]){const i="on"+u.event.charAt(0).toUpperCase()+u.event.slice(1),l=e=>{return(void 0===u.button||"buttons"in e&&e.buttons>0&&e.button===u.button)&&(u.prevent&&e.preventDefault(),u.stop&&e.stopPropagation(),t(o,n(e,o))),u.result};i in r?Array.isArray(r[i])?r[i].push(l):r[i]=[r[i],l]:r[i]=l}}return r}function Ae(e,t,a,n){return Ne(e,t,Me(a),n)}function Me(e){return{["click"+e]:{event:"click"},["contextmenu"+e]:{event:"contextmenu",prevent:!0,result:!1},["mousedown"+e]:{event:"mousedown"},["mousemove"+e]:{event:"mousemove"},["mouseup"+e]:{event:"mouseup"},["mouseenter"+e]:{event:"mouseenter"},["mouseleave"+e]:{event:"mouseleave"},["touchstart"+e]:{event:"touchstart"},["touchmove"+e]:{event:"touchmove"},["touchend"+e]:{event:"touchend"}}}function m(e){return Object.keys(Me(e))}function ze(a,n){return{getMouseEventHandlers:(e,t)=>Ne(a,n,e,t),getDefaultMouseEventHandlers:(e,t)=>Ae(a,n,e,t),getMouseEventName:Me,getRawMouseEvents:m}}const Ee=["moved"];function $e(i,{parsedView:l,parsedValue:s,direction:c,maxDays:v,times:m,emittedValue:f,emit:y}){function e(a=1){if(0===a)f.value=Oe();else{let e=j(s.value);const n=S(e),r=a>0,o=r?h:p,u=r?n.day:1;let t=r?a:-a;c.value=r?"next":"prev";const d=i.weekdays.length;while(--t>=0)switch(l.value){case"month":e.day=u,e=o(e),e=g(e);while(!i.weekdays.includes(Number(e.weekday)))e=G(e,{day:r?1:-1});break;case"week":case"week-agenda":case"week-scheduler":e=D(e,o,d,i.weekdays);break;case"day":case"scheduler":case"agenda":e=D(e,o,v.value,i.weekdays);break;case"month-interval":case"month-agenda":case"month-scheduler":e.day=u,e=o(e);break;case"resource":e=D(e,o,v.value,i.weekdays);break}e=g(e),e=w(e),e=L(e),e=$(e,m.now),f.value=e.date,y("moved",e)}}return{move:e}}const qe=/^on[A-Z]/;function je(e=xe.getCurrentInstance()){return{emitListeners:xe.computed(()=>{const t={};return e?.vnode?.props&&Object.keys(e.vnode.props).forEach(e=>{qe.test(e)&&(t[e]=!0)}),t})}}function Xe(){const e={"aria-hidden":"true",class:"q-calendar__focus-helper"};return[xe.h("span",e)]}function Qe(){function e({focusable:e,focusType:t},a,n){const r=e&&t.includes("date");return xe.h("button",{...a,tabindex:r?0:-1},[n,r&&Xe()])}return{renderButton:e}}const Ge={cellWidth:[Number,String]};function Je(e){const t=xe.computed(()=>void 0!==e.cellWidth);return{isSticky:t}}const et=["change"];function tt(n,{days:r,lastStart:o,lastEnd:u}){function e(){const e=r.value;if(0===e.length)return!1;const t=e[0].date,a=e[e.length-1].date;return(!o.value||!u.value||t!==o.value||a!==u.value)&&(o.value=t,u.value=a,n("change",{start:t,end:a,days:e}),!0)}return{checkChange:e}}function at(){function e(e,t){return(Array.isArray(t)?t:[t]).includes(e.keyCode)}return{isKeyCode:e}}const nt=at().isKeyCode,rt={useNavigation:Boolean};function ot(t,{rootRef:a,focusRef:n,focusValue:r,datesRef:o,parsedView:u,emittedValue:d,direction:i,times:l}){let e=!1;function s(){e||document&&(e=!0,document.addEventListener("keyup",y),document.addEventListener("keydown",f))}function c(){document&&(document.removeEventListener("keyup",y),document.removeEventListener("keydown",f),e=!1)}function v(e){if(e&&document){const t=document.activeElement;if(t!==document.body&&a.value?.contains(t))return!0}return!1}function m(){let t=0;const a=window.setInterval(()=>{const e=o.value[n.value];e&&(e.focus(),50!==++t)&&document.activeElement!==e||window.clearInterval(a)},250)}function f(e){v(e)&&nt(e,[33,34,35,36,37,38,39,40])&&(e.stopPropagation(),e.preventDefault())}function y(e){if(v(e)&&nt(e,[33,34,35,36,37,38,39,40])){const t={33:D,34:k,35:_,36:b,37:g,38:h,39:w,40:p};t[e.keyCode]?.()}}function h(){let e=j(r.value);if("month"===u.value){if(e=G(e,{day:-7}),r.value.month!==e.month)return i.value="prev",void(d.value=e.date)}else e=G(e,{minute:Number(t.intervalMinutes)});i.value="prev",n.value=e.date}function p(){let e=j(r.value);if("month"===u.value){if(e=G(e,{day:7}),r.value.month!==e.month)return i.value="next",void(d.value=e.date)}else e=G(e,{minute:Number(t.intervalMinutes)});i.value="next",n.value=e.date}function g(){let e=j(r.value);i.value="prev";do{e=G(e,{day:-1})}while(!t.weekdays.includes(Number(e.weekday)));n.value=e.date}function w(){let e=j(r.value);i.value="next";do{e=G(e,{day:1})}while(!t.weekdays.includes(Number(e.weekday)));n.value=e.date}function D(){let e=j(r.value);e="month"===u.value?G(e,{month:-1}):G(e,{day:-7}),i.value="prev",n.value=e.date}function k(){let e=j(r.value);e="month"===u.value?G(e,{month:1}):G(e,{day:7}),i.value="next",n.value=e.date}function b(){let e=j(r.value);e="month"===u.value?T(e):K(e,t.weekdays||[],l.today);while(!t.weekdays.includes(Number(e.weekday)))e=G(e,{day:-1});n.value=e.date}function _(){let e=j(r.value);e="month"===u.value?S(e):P(e,t.weekdays||[],l.today);while(!t.weekdays.includes(Number(e.weekday)))e=G(e,{day:-1});n.value=e.date}return xe.onBeforeUnmount(()=>{c()}),xe.watch(()=>t.useNavigation,e=>{(!0===e?s:c)()}),!0===t.useNavigation&&s(),{startNavigation:s,endNavigation:c,tryFocus:m}}const ut=Qe().renderButton;var dt=xe.defineComponent({name:"QCalendarScheduler",directives:{ResizeObserver:Be},props:{...we,...Te,...Se,...Ie,...Ce,...Ge,...rt},emits:["update:model-value","update:model-resources","resource-expanded",...et,...Ee,...m("-date"),...m("-day-resource"),...m("-head-resources"),...m("-head-day"),...m("-resource")],setup(h,{slots:p,emit:g,expose:O}){const e=xe.ref(null),t=xe.ref(null),H=xe.ref(null),m=xe.ref(h.modelValue||Oe()),a=xe.ref(We(h.modelValue||Oe())),f=xe.ref({}),R=xe.ref({}),n=xe.ref(),r=xe.ref(),d=xe.ref("next"),i=xe.ref(h.modelValue||Oe()),l=xe.ref("0000-00-00"),s=xe.ref(0),w=xe.ref(h.modelValue),c=xe.reactive({width:0,height:0}),y=xe.ref(""),D=xe.ref(""),U=xe.ref(null),L=xe.ref(null),o=(xe.watch(()=>h.view,()=>{s.value=0}),xe.computed(()=>{return"month"===h.view?"month-interval":h.view})),B=xe.getCurrentInstance();if(null===B)throw new Error("current instance is null");const k=je(B).emitListeners,b=Je(h).isSticky,{times:u,setCurrent:Y,updateCurrent:V}=Pe(h),{parsedStart:K,parsedEnd:P,dayFormatter:Z,weekdayFormatter:z,ariaDateFormatter:$,dayStyleDefault:j,getRelativeClasses:_}=(V(),Y(),Ve(h,{startDate:i,endDate:l,times:u})),T=xe.computed(()=>{return He(h.modelValue,u.now)||K.value||u.today}),X=(a.value=T.value,m.value=T.value.date,Ze(h,{parsedView:o,parsedValue:T,times:u})).renderValues,{rootRef:v,scrollWidth:Q,__renderCalendar:G}=Ye(h,qe,{scrollArea:e,pane:t}),{days:S,parsedCellWidth:I,styleDefault:J}=Ke(h,{times:u,scrollArea:e,parsedStart:K,parsedEnd:P,maxDays:s,size:c,headerColumnRef:H}),C=$e(h,{parsedView:o,parsedValue:T,direction:d,maxDays:s,times:u,emittedValue:w,emit:g}).move,F=ze(g,k).getDefaultMouseEventHandlers,ee=tt(g,{days:S,lastStart:U,lastEnd:L}).checkChange,N=at().isKeyCode,te=ot(h,{rootRef:v,focusRef:m,focusValue:a,datesRef:f,parsedView:o,emittedValue:w,direction:d,times:u}).tryFocus,A=xe.computed(()=>{const e=parseInt(String(h.columnCount),10);return"day"===o.value&&e>1?e:"day"===o.value&&h.maxDays&&h.maxDays>1?h.maxDays:S.value.length}),ae=xe.computed(()=>{return v.value?parseInt(window.getComputedStyle(v.value).getPropertyValue("--calendar-resources-width"),10):0}),M=xe.computed(()=>{const e=parseInt(String(h.resourceHeight),10);return 0===e?"auto":e}),ne=xe.computed(()=>{return parseInt(String(h.resourceMinHeight),10)}),E=xe.computed(()=>{if(v.value){const e=c.width||v.value.getBoundingClientRect().width;if(e&&ae.value&&A.value)return(e-Q.value-ae.value)/A.value+"px"}return 100/A.value+"%"});function re(){w.value=Oe()}function oe(e=1){C(e)}function ue(e=1){C(-e)}function de({width:e,height:t}){c.width=e,c.height=t}function q(e){return e.date===w.value}function ie(){return xe.h("div",{roll:"presentation",class:{"q-calendar-scheduler__head":!0,"q-calendar__sticky":!0===b.value},style:{marginRight:Q.value+"px"}},[le(),se()])}function le(){const e=p["head-resources"],t={days:S.value,timestamps:S.value,date:h.modelValue,resources:h.modelResources};return xe.h("div",{class:{"q-calendar-scheduler__head--resources":!0,"q-calendar__sticky":!0===b.value},...F("-head-resources",e=>{return{scope:t,event:e}})},[e&&e({scope:t})])}function se(){return xe.h("div",{ref:H,class:{"q-calendar-scheduler__head--days__column":!0}},[ce(),ve()])}function ce(){return xe.h("div",{class:{"q-calendar-scheduler__head--days__weekdays":!0}},[...me()])}function ve(){const e=p["head-days-events"];return xe.nextTick(()=>{if(r.value&&0===parseInt(String(h.columnCount),10)&&window)try{const e=window.getComputedStyle(r.value);n.value&&n.value.parentElement&&(n.value.parentElement.style.height=e.height,n.value.style.height=e.height)}catch{}}),xe.h("div",{class:{"q-calendar-scheduler__head--days__event":!0}},[e&&xe.h("div",{ref:n,style:{position:"absolute",left:0,top:0,right:0,overflow:"hidden",zIndex:1}},[e({scope:{timestamps:S.value,days:S.value,ref:r}})]),...fe()])}function me(){const e=parseInt(String(h.columnCount),10),a=parseInt(String(h.columnIndexStart),10);return 1===S.value.length&&e>0?Array.apply(null,new Array(e)).map((e,t)=>t+a).map(e=>ye(S.value[0],e)):S.value.map(e=>ye(e,0))}function fe(){const e=parseInt(String(h.columnCount),10),a=parseInt(String(h.columnIndexStart),10);return 1===S.value.length&&e>0?Array.apply(null,new Array(e)).map((e,t)=>t+a).map(e=>pe(S.value[0],e)):S.value.map(e=>pe(e,0))}function ye(t,e){const a=p["head-day"],n=p["head-date"],r=!0!==h.noActiveDate&&q(t),o={timestamp:t,activeDate:r,droppable:y.value===t.date,disabled:!!h.disabledWeekdays&&h.disabledWeekdays.includes(Number(t.weekday)),columnIndex:e??0},u=!0===b.value?Ue(I.value):E.value,d=h.weekdayStyle||j,i={width:u,maxWidth:u,minWidth:u,...d({scope:o})},l=(!0===b.value&&(i.minWidth=u),"function"===typeof h.weekdayClass?h.weekdayClass({scope:o}):{}),s=!0===h.focusable&&h.focusType.includes("weekday"),c=t.date+(void 0!==e?"-"+e:""),v={key:c,ref:e=>{null!==e&&(f.value[c]=e)},tabindex:!0===s?0:-1,class:{"q-calendar-scheduler__head--day":!0,...l,..._(t),"q-active-date":r,"q-calendar__hoverable":!0===h.hoverable,"q-calendar__focusable":!0===s},style:i,onFocus:()=>{!0===s&&(m.value=c)},onKeydown:e=>{!0!==t.disabled&&N(e,[13,32])&&(e.stopPropagation(),e.preventDefault())},onKeyup:e=>{!0!==t.disabled&&N(e,[13,32])&&(w.value=t.date)},...F("-head-day",e=>{return{scope:o,event:e}}),onDragenter:e=>{void 0!==h.dragEnterFunc&&"function"===typeof h.dragEnterFunc&&(!0===h.dragEnterFunc(e,"head-day",{scope:o})?y.value=t.date:y.value="")},onDragover:e=>{void 0!==h.dragOverFunc&&"function"===typeof h.dragOverFunc&&(!0===h.dragOverFunc(e,"head-day",{scope:o})?y.value=t.date:y.value="")},onDragleave:e=>{void 0!==h.dragLeaveFunc&&"function"===typeof h.dragLeaveFunc&&(!0===h.dragLeaveFunc(e,"head-day",{scope:o})?y.value=t.date:y.value="")},onDrop:e=>{void 0!==h.dropFunc&&"function"===typeof h.dropFunc&&(!0===h.dropFunc(e,"head-day",{scope:o})?y.value=t.date:y.value="")}};return xe.h("div",v,[void 0!==a&&a({scope:o}),void 0===a&&De(t,e),void 0===a&&he(t),void 0===a&&n&&n({scope:o}),void 0===a&&ke(t,e),Xe()])}function he(e){return"stacked"===h.dateHeader?[!0!==h.noDefaultHeaderText?x(e):[],!0!==h.noDefaultHeaderBtn?W(e):[]].flat():"inline"===h.dateHeader?("left"===h.weekdayAlign&&"right"===h.dateAlign||"right"===h.weekdayAlign&&h.dateAlign,xe.h("div",{class:"q-calendar__header--inline"},[!0!==h.noDefaultHeaderText&&x(e),!0!==h.noDefaultHeaderBtn&&W(e)])):"inverted"===h.dateHeader?("left"===h.weekdayAlign&&"right"===h.dateAlign||"right"===h.weekdayAlign&&h.dateAlign,xe.h("div",{class:"q-calendar__header--inline"},[!0!==h.noDefaultHeaderBtn&&W(e),!0!==h.noDefaultHeaderText&&x(e)])):void 0}function pe(e,t){const a=p["head-day-event"],n=!0!==h.noActiveDate&&q(e),r={timestamp:e,activeDate:n,droppable:y.value===e.date,disabled:!!h.disabledWeekdays&&h.disabledWeekdays.includes(Number(e.weekday)),columnIndex:t??0},o=!0===b.value?Ue(I.value):E.value,u={width:o,maxWidth:o,minWidth:o};return!0===b.value&&(u.minWidth=o),xe.h("div",{key:"event-"+e.date+(void 0!==t?"-"+t:""),class:{"q-calendar-scheduler__head--day__event":!0,..._(e),"q-active-date":n},style:u},[a&&a({scope:r})])}function x(e){const t=p["head-weekday-label"],a=!0===h.shortWeekdayLabel,n={timestamp:e,shortWeekdayLabel:a},r={class:{"q-calendar-scheduler__head--weekday":!0,["q-calendar__"+h.weekdayAlign]:!0,"q-calendar__ellipsis":!0}};return xe.h("div",r,t&&t({scope:n})||ge(e,a))}function ge(e,t){const a=z.value(e,t||h.weekdayBreakpoints[0]>0&&I.value<=h.weekdayBreakpoints[0]);return xe.h("span",{class:"q-calendar-scheduler__head--weekday-label q-calendar__ellipsis"},h.weekdayBreakpoints[1]>0&&I.value<=h.weekdayBreakpoints[1]?Le(a,Number(h.minWeekdayLabel)):a)}function W(e){const t={class:{"q-calendar-scheduler__head--date":!0,["q-calendar__"+h.dateAlign]:!0}};return xe.h("div",t,we(e))}function we(a){const e=!0!==h.noActiveDate&&q(a),t=Z.value(a,!1),n=p["head-day-label"],r=p["head-day-button"],o={dayLabel:t,timestamp:a,activeDate:e},u={class:{"q-calendar-scheduler__head--day__label":!0,"q-calendar__button":!0,"q-calendar__button--round":"round"===h.dateType,"q-calendar__button--rounded":"rounded"===h.dateType,"q-calendar__button--bordered":!0===a.current,"q-calendar__focusable":!0},disabled:a.disabled,onKeydown:e=>{!0!==a.disabled&&N(e,[13,32])&&(e.stopPropagation(),e.preventDefault())},onKeyup:e=>{!0!==a.disabled&&N(e,[13,32])&&(w.value=a.date,void 0!==k.value.onClickDate)&&g("click-date",{scope:o})},...F("-date",(e,t)=>{return"click-date"!==t&&"contextmenu-date"!==t||(w.value=a.date,"click-date"===t&&e.preventDefault()),{scope:o,event:e}})};return!0!==h.noAria&&(u.ariaLabel=$.value(a,!1)),r?xe.h("div",[r({scope:o})]):ut(h,u,n?n({scope:o}):t)}function De(e,t){const a=p["column-header-before"];if(a){const n={timestamp:e,columnIndex:t};return xe.h("div",{class:"q-calendar-scheduler__column-header--before"},[a({scope:n})])}}function ke(e,t){const a=p["column-header-after"];if(a){const n={timestamp:e,columnIndex:t};return xe.h("div",{class:"q-calendar-scheduler__column-header--after"},[a({scope:n})])}}function be(){return xe.h("div",{class:"q-calendar-scheduler__body"},[_e()])}function _e(){return!0===b.value?xe.h("div",{ref:e,class:{"q-calendar-scheduler__scroll-area":!0,"q-calendar__scroll":!0}},[!0!==b.value&&Ne(),Se()]):!0===h.noScroll?Te():xe.h("div",{ref:e,class:{"q-calendar-scheduler__scroll-area":!0,"q-calendar__scroll":!0}},[Te()])}function Te(){return xe.h("div",{ref:t,class:"q-calendar-scheduler__pane"},[Se()])}function Se(){return xe.h("div",{class:"q-calendar-scheduler__day--container"},[!0===b.value&&!0!==h.noHeader&&ie(),Ie()])}function Ie(e=void 0,a=0,n=!0){return void 0===e&&(e=h.modelResources),e.map((e,t)=>{return Ce(e,t,a,void 0!==e.children?e.expanded:n)}).flat()}function Ce(e,t,a=0,n=!0){const r={},o=(r.height=void 0!==e.height?Ue(parseInt(e.height,10)):M.value?Ue(M.value):"auto",ne.value>0&&(r.minHeight=Ue(ne.value)),xe.h("div",{key:e[h.resourceKey]+"-"+t,class:{"q-calendar-scheduler__resource--row":!0},style:r},[Fe(e,t,a,n),Ne(e,t,a,n)]));return void 0!==e.children?[o,xe.h("div",{class:{"q-calendar__child":!0,"q-calendar__child--expanded":!0===n,"q-calendar__child--collapsed":!0!==n}},[Ie(e.children,a+1,!1===n?n:e.expanded)])]:[o]}function Fe(t,e,a=0,n=!0){const r=p["resource-label"],o=parseInt(String(h.resourceMinHeight),10),u={},d=(u.height=void 0!==t.height?Ue(parseInt(t.height,10)):M.value?Ue(M.value):"auto",o>0&&(u.minHeight=Ue(o)),h.resourceStyle||J),i=t[h.resourceLabel],l=!0===h.focusable&&h.focusType.includes("resource")&&!0===n,s=t[h.resourceKey],c={resource:t,timestamps:S.value,days:S.value,resourceIndex:e,indentLevel:a,label:i,droppable:D.value===s},v="function"===typeof h.resourceClass?h.resourceClass({scope:c}):{};return xe.h("div",{key:t[h.resourceKey]+"-"+e,ref:e=>{null!==e&&(R.value[t[h.resourceKey]]=e)},tabindex:!0===l?0:-1,class:{"q-calendar-scheduler__resource":0===a,"q-calendar-scheduler__resource--section":0!==a,...v,"q-calendar__sticky":!0===b.value,"q-calendar__hoverable":!0===h.hoverable,"q-calendar__focusable":!0===l},style:{...u,...d({scope:c})},onDragenter:e=>{void 0!==h.dragEnterFunc&&"function"===typeof h.dragEnterFunc&&(!0===h.dragEnterFunc(e,"resource",{scope:c})?D.value=s:D.value="")},onDragover:e=>{void 0!==h.dragOverFunc&&"function"===typeof h.dragOverFunc&&(!0===h.dragOverFunc(e,"resource",{scope:c})?D.value=s:D.value="")},onDragleave:e=>{void 0!==h.dragLeaveFunc&&"function"===typeof h.dragLeaveFunc&&(!0===h.dragLeaveFunc(e,"resource",{scope:c})?D.value=s:D.value="")},onDrop:e=>{void 0!==h.dropFunc&&"function"===typeof h.dropFunc&&(!0===h.dropFunc(e,"resource",{scope:c})?D.value=s:D.value="")},onKeydown:e=>{N(e,[13,32])&&(e.stopPropagation(),e.preventDefault())},onKeyup:e=>{N(e,[13,32])&&void 0!==k.value.onClickResource&&g("click-resource",{scope:c,event:e})},...F("-resource",e=>{return{scope:c,event:e}})},[[xe.h("div",{class:{"q-calendar__parent":void 0!==t.children,"q-calendar__parent--expanded":void 0!==t.children&&!0===t.expanded,"q-calendar__parent--collapsed":void 0!==t.children&&!0!==t.expanded},onClick:e=>{e.stopPropagation(),t.expanded=!t.expanded,g("resource-expanded",{expanded:t.expanded,scope:c})}}),xe.h("div",{class:{"q-calendar-scheduler__resource--text":!0,"q-calendar__ellipsis":!0},style:{paddingLeft:10*a+2+"px"}},[r?r({scope:c}):i]),Xe()]])}function Ne(e,t,a=0,n=!0){const r=p["resource-days"],o=!0===b.value?Ue(I.value):E.value,u={resource:e,resourceIndex:t,indentLevel:a,expanded:n,cellWidth:o,timestamps:S.value,days:S.value},d={},i=(d.height=parseInt(String(h.resourceHeight),10)>0?Ue(parseInt(String(h.resourceHeight),10)):"auto",parseInt(String(h.resourceMinHeight),10)>0&&(d.minHeight=Ue(parseInt(String(h.resourceMinHeight),10))),{class:"q-calendar-scheduler__resource--days",style:d});return xe.h("div",i,[...Ae(e,t,a,n),r&&r({scope:u})])}function Ae(t,a,n=0,r=!0){return 1===S.value.length&&parseInt(String(h.columnCount),10)>0?Array.apply(null,new Array(parseInt(String(h.columnCount),10))).map((e,t)=>t+parseInt(String(h.columnIndexStart),10)).map(e=>Me(S.value[0],e,t,a,n,r)):S.value.map(e=>Me(e,0,t,a,n,r))}function Me(e,t,a,n,r=0,o=!0){const u=p.day,d=h.dayStyle||j,i=!0!==h.noActiveDate&&T.value.date===e.date,l=e.date+":"+a[h.resourceKey]+(void 0!==t?":"+t:""),s=D.value===l,c={timestamp:e,columnIndex:t,resource:a,resourceIndex:n,indentLevel:r,activeDate:i,droppable:s},v=!0===b.value?Ue(I.value):E.value,m={width:v,maxWidth:v,...d({scope:c})},f=(m.height=parseInt(String(h.resourceHeight),10)>0?Ue(parseInt(String(h.resourceHeight),10)):"auto",parseInt(String(h.resourceMinHeight),10)>0&&(m.minHeight=Ue(parseInt(String(h.resourceMinHeight),10))),"function"===typeof h.dayClass?h.dayClass({scope:c}):{}),y=!0===h.focusable&&h.focusType.includes("day")&&!0===o;return xe.h("div",{key:e.date+(void 0!==t?":"+t:""),tabindex:!0===y?0:-1,class:{"q-calendar-scheduler__day":0===r,"q-calendar-scheduler__day--section":0!==r,...f,..._(e),"q-calendar__hoverable":!0===h.hoverable,"q-calendar__focusable":!0===y},style:m,onDragenter:e=>{void 0!==h.dragEnterFunc&&"function"===typeof h.dragEnterFunc&&(!0===h.dragEnterFunc(e,"day",{scope:c})?D.value=l:D.value="")},onDragover:e=>{void 0!==h.dragOverFunc&&"function"===typeof h.dragOverFunc&&(!0===h.dragOverFunc(e,"day",{scope:c})?D.value=l:D.value="")},onDragleave:e=>{void 0!==h.dragLeaveFunc&&"function"===typeof h.dragLeaveFunc&&(!0===h.dragLeaveFunc(e,"day",{scope:c})?D.value=l:D.value="")},onDrop:e=>{void 0!==h.dropFunc&&"function"===typeof h.dropFunc&&(!0===h.dropFunc(e,"day",{scope:c})?D.value=l:D.value="")},onKeydown:e=>{N(e,[13,32])&&(e.stopPropagation(),e.preventDefault())},onKeyup:e=>{N(e,[13,32])&&(w.value=c.timestamp.date,void 0!==k.value.onClickResource)&&g("click-resource",{scope:c,event:e})},...F("-day-resource",e=>{return{scope:c,event:e}})},[u&&u({scope:c}),Xe()])}function Ee(){return xe.h("div",{},"No resources have been defined")}function qe(){const{start:e,end:t,maxDays:a}=X.value,n=(i.value===e.date&&l.value===t.date&&s.value===a||(i.value=e.date,l.value=t.date,s.value=a),c.width>0),r=h.modelResources&&h.modelResources.length>0,o=xe.withDirectives(xe.h("div",{key:i.value,class:"q-calendar-scheduler"},[!0===n&&!0===r&&!0!==b.value&&!0!==h.noHeader&&ie(),!0===n&&!0===r&&be(),!1===r&&Ee()]),[[Be,de]]);if(!0!==h.animated)return o;{const u="q-calendar--"+("prev"===d.value?h.transitionPrev:h.transitionNext);return xe.h(xe.Transition,{name:u,appear:!0},()=>o)}}return xe.watch([S],ee,{deep:!0,immediate:!0}),xe.watch(()=>h.modelValue,(e,t)=>{if(w.value!==h.modelValue){if(!0===h.animated){const a=Re(We(e)),n=Re(We(t));d.value=a>=n?"next":"prev"}w.value=e}m.value=e}),xe.watch(w,(e,t)=>{if(w.value!==h.modelValue){if(!0===h.animated){const a=Re(We(e)),n=Re(We(t));d.value=a>=n?"next":"prev"}g("update:model-value",e)}}),xe.watch(m,e=>{e&&(a.value=He(e))}),xe.watch(a,()=>{f.value[m.value]?f.value[m.value].focus():te()}),xe.watch(()=>h.maxDays,e=>{s.value=e}),xe.onBeforeUpdate(()=>{f.value={},n.value=void 0,r.value=void 0,R.value={}}),xe.onMounted(()=>{}),O({prev:ue,next:oe,move:C,moveToToday:re,updateCurrent:V}),()=>G()}});const it="4.1.0";ye={version:it,QCalendarScheduler:dt,...ye,...pe,install(e){e.component(String(dt.name),dt)}};return ye}); | ||
(function(e,t){"object"===typeof exports&&"undefined"!==typeof module?module.exports=t(require("vue")):"function"===typeof define&&define.amd?define(["vue"],t):(e="undefined"!==typeof globalThis?globalThis:e||self,e.QCalendarScheduler=t(e.Vue))})(this,function(xe){const d=/^(\d{4})-(\d{1,2})(-(\d{1,2}))?([^\d]+(\d{1,2}))?(:(\d{1,2}))?(:(\d{1,2}))?(.(\d{1,3}))?$/,f=/^(\d{4})-(\d{1,2})(-(\d{1,2}))?/,y=/(\d\d?)(:(\d\d?)|)(:(\d\d?)|)/,k=[0,31,28,31,30,31,30,31,31,30,31,30,31],b=[0,31,29,31,30,31,30,31,31,30,31,30,31],r={MILLISECONDS_IN:{SECOND:1e3,MINUTE:6e4,HOUR:36e5,DAY:864e5,WEEK:6048e5},SECONDS_IN:{MINUTE:60,HOUR:3600,DAY:86400,WEEK:604800},MINUTES_IN:{MINUTE:1,HOUR:60,DAY:1440,WEEK:10080},HOURS_IN:{DAY:24,WEEK:168},DAYS_IN:{WEEK:7}},_=28,I=31,C=12,F=1,N=1,A=0;function t(e){return"string"===typeof e&&d.test(e)}function We(e){if("string"!==typeof e)return null;const t=d.exec(e);if(!t||!t[1]||!t[2])return null;const a=parseInt(t[1],10),n=parseInt(t[2],10),r=parseInt(t[4]||"1",10),o=parseInt(t[6]||"0",10),u=parseInt(t[8]||"0",10);return{date:e,time:o.toString().padStart(2,"0")+":"+u.toString().padStart(2,"0"),year:a,month:n,day:r,hour:o,minute:u,hasDay:!!t[4],hasTime:!0,past:!1,current:!1,future:!1,disabled:!1,weekday:0,doy:0,workweek:0}}function M(e,t=!1){if(!(e instanceof Date))return null;const a=t?"UTC":"";return w({date:o(e[`get${a}FullYear`](),4)+"-"+o(e[`get${a}Month`]()+1,2)+"-"+o(e[`get${a}Date`](),2),time:o(e[`get${a}Hours`]()||0,2)+":"+o(e[`get${a}Minutes`]()||0,2),year:e[`get${a}FullYear`](),month:e[`get${a}Month`]()+1,day:e[`get${a}Date`](),hour:e[`get${a}Hours`](),minute:e[`get${a}Minutes`](),weekday:0,doy:0,workweek:0,hasDay:!0,hasTime:!0,past:!1,current:!1,future:!1,disabled:!1})}function o(e,t){let a=String(e);while(a.length<t)a="0"+a;return a}function E(e){return e%4===0&&e%100!==0||e%400===0}function i(e,t){return(E(e)?b:k)[t]}function h(e){const t=new Date(e.year,e.month-1,e.day+1);return w(de({...e,year:t.getFullYear(),month:t.getMonth()+1,day:t.getDate()}))}function p(e){const t=new Date(e.year,e.month-1,e.day-1);return w(de({...e,year:t.getFullYear(),month:t.getMonth()+1,day:t.getDate()}))}function Oe(){const e=new Date,t=e.getMonth()+1,a=e.getDate(),n=e.getFullYear();return[n,o(t,2),o(a,2)].join("-")}function q(e){return e===Oe()}function K(e,t,a){let n=j(e);if(t){if(1===n.day||0===n.weekday)while(!t.includes(Number(n.weekday)))n=h(n);n=v(n,t[0],p),n=w(n),a&&(n=$(n,a,n.hasTime))}return n}function P(e,t,a){let n=j(e);if(t&&Array.isArray(t)){const r=i(n.year,n.month);if(r===n.day||n.weekday===t[t.length-1])while(!t.includes(Number(n.weekday)))n=p(n);n=v(n,t[t.length-1],h),n=w(n),a&&(n=$(n,a,n.hasTime))}return n}function T(e){let t=j(e);return t.day=N,t=w(t),t}function S(e){let t=j(e);return t.day=i(t.year,t.month),t=w(t),t}function Z(e){const t=Object.prototype.toString.call(e);switch(t){case"[object Number]":return e;case"[object String]":{const a=y.exec(e);return a?60*parseInt(a[1],10)+parseInt(a[3]||"0",10):!1}case"[object Object]":return"object"!==typeof e||"number"!==typeof e.hour||"number"!==typeof e.minute?!1:"object"===typeof e&&"hour"in e&&"minute"in e&&60*e.hour+e.minute}return!1}function x(e,t){return!(!e||!t)&&e.year===t.year&&e.month===t.month&&e.day===t.day&&e.hour===t.hour&&e.minute===t.minute}function W(e,t){return s(e)===s(t)}function O(e,t){return c(e)===c(t)}function H(e,t){return X(e)===X(t)}function He(e,t=null){let a=We(e);return a?(a=w(a),t&&(a=$(a,t,a.hasTime)),a):null}function Re(e){return 1e8*(e.year??0)+1e6*(e.month??0)+1e4*(e.day??0)}function l(e){return 100*(e.hour??0)+(e.minute??0)}function z(e){return Re(e)+l(e)}function R(e,t,a=!1){const n=Date.UTC(e.year??0,(e.month??1)-1,e.day??1,e.hour??0,e.minute??0),r=Date.UTC(t.year??0,(t.month??1)-1,t.day??1,t.hour??0,t.minute??0);return!0===a&&r<n?0:r-n}function $(e,t,a=!1){let n=j(e),r=Re(t),o=Re(n),u=r===o;return n.hasTime&&a&&u&&(r=l(t),o=l(n),u=r===o),n.past=o<r,n.current=u,n.future=o>r,n.currentWeekday=n.weekday===t.weekday,n}function U(e,t,a=null){let n=j(e);return n.hasTime=!0,n.hour=Math.floor(t/r.MINUTES_IN.HOUR),n.minute=t%r.MINUTES_IN.HOUR,n.time=c(n),a&&(n=$(n,a,!0)),n}function g(e){let t=j(e);return t.weekday=u(t),t}function L(e){let t=j(e);return t.doy=a(t)||0,t}function B(e){let t=j(e);return t.workweek=n(t),t}function Y(e,t,a,n,r){let o=j(e);const u=Re(o);if(void 0!==t){const s=We(t);if(s){const c=Re(s);u<=c&&(o.disabled=!0)}}if(!0!==o.disabled&&void 0!==a){const v=We(a);if(v){const m=Re(v);u>=m&&(o.disabled=!0)}}if(!0!==o.disabled&&Array.isArray(n)&&n.length>0)for(var d in n)if(n[d]===o.weekday){o.disabled=!0;break}if(!0!==o.disabled&&Array.isArray(r)&&r.length>0)for(var i in r)if(Array.isArray(r[i])&&2===r[i].length&&r[i][0]&&r[i][1]){const f=We(r[i][0]),y=We(r[i][1]);if(f&&y&&oe(o,f,y)){o.disabled=!0;break}}else{const h=r[i];if(Array.isArray(h))for(var l of h){const p=He(l);if(p){const g=Re(p);if(g===u){o.disabled=!0;break}}}else if(h){const w=He(h);if(w){const D=Re(w);D===u&&(o.disabled=!0)}}}return o}function w(e){let t=j(e);return t.hasTime=!0,t.time=c(t),t.date=s(t),t.weekday=u(t),t.doy=a(t)||0,t.workweek=n(t),t}function a(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 n(e){let t=j(e);if(0===t.year){const r=He(Oe());r&&(t=r)}const a=new Date(Date.UTC(t.year,t.month-1,t.day)),n=4;a.setUTCDate(a.getUTCDate()-(a.getUTCDay()+6)%7+n),a.setUTCDate(a.getUTCDate()+n-(a.getUTCDay()||7));e=new Date(Date.UTC(a.getUTCFullYear(),0,1)),e=Math.ceil(((a.valueOf()-e.valueOf())/864e5+1)/7);return e}function u(e){let t=e.weekday;if(e.hasDay){const a=Math.floor,n=e.day,r=(e.month+9)%C+1,o=a(e.year/100),u=e.year%100-(e.month<=2?1:0);t=((n+a(2.6*r-.2)-2*o+u+a(u/4)+a(o/4))%7+7)%7}return t??0}function j(e){return{...e}}function s(e){let t=o(e.year,4)+"-"+o(e.month,2);return e.hasDay&&(t+="-"+o(e.day,2)),t}function c(e){return e.hasTime?o(e.hour,2)+":"+o(e.minute,2):""}function X(e){return s(e)+" "+(e.hasTime?c(e):"00:00")}function V(e,t=h,a=1,n=[0,1,2,3,4,5,6]){const r=j(e);return D(r,t,a,n)}function D(e,t=h,a=1,n=[0,1,2,3,4,5,6]){let r=j(e);n.includes(Number(r.weekday))||0!==r.weekday||t!==h||++a;while(--a>=0)r=t(r),n.length<7&&!n.includes(Number(r.weekday))&&++a;return r}function v(e,t,a=h,n=6){let r=j(e);while(r.weekday!==t&&--n>=0)r=a(r);return r}function J(e,t,a,n=[0,1,2,3,4,5,6],r=void 0,o=void 0,u=[],d=[],i=42,l=0){const s=Re(e),c=Re(t),v=[];let m=j(e),f=0,y=f===c;if(!(c<s))while((!y||v.length<l)&&v.length<i){if(f=Re(m),y=y||f>c&&v.length>=l,y)break;if(n.includes(Number(m.weekday))){let e=j(m);e=w(e),e=$(e,a),e=Y(e,r,o,u,d),v.push(e)}m=D(m,h)}return v}function ee(t,a,n,r,o){const u=[];for(let e=0;e<r;++e){const d=(a+e)*n,i=j(t);u.push(U(i,d,o))}return u}function Q(n,r){const e=()=>"";return"undefined"===typeof Intl||"undefined"===typeof Intl.DateTimeFormat?e:(t,e)=>{try{const a=new Intl.DateTimeFormat(n||void 0,r(t,e));return a.format(ae(t))}catch(e){return console.error(`Intl.DateTimeFormat: ${e.message} -> `+X(t)),""}}}function te(e,t=!0){return t?new Date(Date.UTC(e.year,e.month-1,e.day,0,0)):new Date(e.year,e.month-1,e.day,0,0)}function ae(e,t=!0){return t?new Date(Date.UTC(e.year,e.month-1,e.day,e.hour,e.minute)):new Date(e.year,e.month-1,e.day,e.hour,e.minute)}function e(e){return isFinite(Number(e))}function ne(e,t=!1){const a=!0===t?z:Re;return e.reduce((e,t)=>{return Math.max(a(e),a(t))===a(e)?e:t})}function re(e,t=!1){const a=!0===t?z:Re;return e.reduce((e,t)=>{return Math.min(a(e),a(t))===a(e)?e:t})}function oe(e,t,a,n=!1){const r=Re(e)+(!0===n?l(e):0),o=Re(t)+(!0===n?l(t):0),u=Re(a)+(!0===n?l(a):0);return r>=o&&r<=u}function ue(e,t,a,n){const r=Re(e),o=Re(t),u=Re(a),d=Re(n);return r>=u&&r<=d||o>=u&&o<=d||u>=r&&o>=d}function G(e,t){const a=j(e);return t.year&&(a.year+=t.year),t.month&&(a.month+=t.month),t.day&&(a.day+=t.day),t.hour&&(a.hour+=t.hour),t.minute&&(a.minute+=t.minute),w(de(a))}function de(e){const t=new Date(e.year,e.month-1,e.day,e.hour,e.minute);return{...e,year:t.getFullYear(),month:t.getMonth()+1,day:t.getDate(),hour:t.getHours(),minute:t.getMinutes()}}function ie(e,t){const a=R(e,t,!0);return Math.floor(a/r.MILLISECONDS_IN.DAY)}function le(e,t){let a=j(e),n=j(t);return a=v(a,0),n=v(n,6),Math.ceil(ie(a,n)/r.DAYS_IN.WEEK)}const se={Sun:new Date("2020-01-05T00:00:00.000Z"),Mon:new Date("2020-01-06T00:00:00.000Z"),Tue:new Date("2020-01-07T00:00:00.000Z"),Wed:new Date("2020-01-08T00:00:00.000Z"),Thu:new Date("2020-01-09T00:00:00.000Z"),Fri:new Date("2020-01-10T00:00:00.000Z"),Sat:new Date("2020-01-11T00:00:00.000Z")};function ce(){const e=()=>"",r={long:{timeZone:"UTC",weekday:"long"},short:{timeZone:"UTC",weekday:"short"},narrow:{timeZone:"UTC",weekday:"narrow"}};return"undefined"===typeof Intl||"undefined"===typeof Intl.DateTimeFormat?e:t;function t(t,e,a){try{const n=new Intl.DateTimeFormat(a||void 0,r[e]||r["long"]);return n.format(se[t])}catch(e){return e instanceof Error&&console.error(`Intl.DateTimeFormat: ${e.message} -> day of week: `+t),""}}}function ve(t,a){const e=Object.keys(se),n=ce();return e.map(e=>String(n(e,t,a)))}function me(){const e=()=>"",o={long:{timeZone:"UTC",month:"long"},short:{timeZone:"UTC",month:"short"},narrow:{timeZone:"UTC",month:"narrow"}};return"undefined"===typeof Intl||"undefined"===typeof Intl.DateTimeFormat?e:t;function t(t,e,a){try{const n=new Intl.DateTimeFormat(a||void 0,o[e]||o["long"]),r=new Date;return r.setDate(1),r.setMonth(t),n.format(r)}catch(e){return e instanceof Error&&console.error(`Intl.DateTimeFormat: ${e.message} -> month: `+t),""}}}function fe(t,a){const n=me();return[...Array(12).keys()].map(e=>n(e,t,a))}var ye={PARSE_DATETIME:d,PARSE_DATE:f,PARSE_TIME:y,DAYS_IN_MONTH:k,DAYS_IN_MONTH_LEAP:b,DAYS_IN_MONTH_MIN:_,DAYS_IN_MONTH_MAX:I,MONTH_MAX:C,MONTH_MIN:F,DAY_MIN:N,TIME_CONSTANTS:r,FIRST_HOUR:A,today:Oe,getStartOfWeek:K,getEndOfWeek:P,getStartOfMonth:T,getEndOfMonth:S,parseTime:Z,validateTimestamp:t,parsed:We,parseTimestamp:He,parseDate:M,getDayIdentifier:Re,getTimeIdentifier:l,getDayTimeIdentifier:z,diffTimestamp:R,updateRelative:$,updateMinutes:U,updateWeekday:g,updateDayOfYear:L,updateWorkWeek:B,updateDisabled:Y,updateFormatted:w,getDayOfYear:a,getWorkWeek:n,getWeekday:u,isLeapYear:E,daysInMonth:i,copyTimestamp:j,padNumber:o,getDate:s,getTime:c,getDateTime:X,nextDay:h,prevDay:p,relativeDays:D,findWeekday:v,createDayList:J,createIntervalList:ee,createNativeLocaleFormatter:Q,makeDate:te,makeDateTime:ae,validateNumber:e,isBetweenDates:oe,isOverlappingDates:ue,daysBetween:ie,weeksBetween:le,addToDate:G,compareTimestamps:x,compareDate:W,compareTime:O,compareDateTime:H,getWeekdayFormatter:ce,getWeekdayNames:ve,getMonthFormatter:me,getMonthNames:fe},ye=Object.freeze({__proto__:null,DAYS_IN_MONTH:k,DAYS_IN_MONTH_LEAP:b,DAYS_IN_MONTH_MAX:I,DAYS_IN_MONTH_MIN:_,DAY_MIN:N,FIRST_HOUR:A,MONTH_MAX:C,MONTH_MIN:F,PARSE_DATE:f,PARSE_DATETIME:d,PARSE_TIME:y,TIME_CONSTANTS:r,addToDate:G,compareDate:W,compareDateTime:H,compareTime:O,compareTimestamps:x,copyTimestamp:j,createDayList:J,createIntervalList:ee,createNativeLocaleFormatter:Q,daysBetween:ie,daysInMonth:i,default:ye,diffTimestamp:R,findWeekday:v,getDate:s,getDateTime:X,getDayIdentifier:Re,getDayOfYear:a,getDayTimeIdentifier:z,getEndOfMonth:S,getEndOfWeek:P,getMonthFormatter:me,getMonthNames:fe,getStartOfMonth:T,getStartOfWeek:K,getTime:c,getTimeIdentifier:l,getWeekday:u,getWeekdayFormatter:ce,getWeekdayNames:ve,getWorkWeek:n,isBetweenDates:oe,isLeapYear:E,isOverlappingDates:ue,isToday:q,makeDate:te,makeDateTime:ae,maxTimestamp:ne,minTimestamp:re,moveRelativeDays:V,nextDay:h,padNumber:o,parseDate:M,parseTime:Z,parseTimestamp:He,parsed:We,prevDay:p,relativeDays:D,today:Oe,updateDayOfYear:L,updateDisabled:Y,updateFormatted:w,updateMinutes:U,updateRelative:$,updateWeekday:g,updateWorkWeek:B,validateNumber:e,validateTimestamp:t,weeksBetween:le});function Ue(e,t="px"){if(e)return isNaN(e)?String(e):"auto"===e?e:""+Number(e)+t}function he(t,a){for(let e=0;e<t.length;e++)if(!0===a(t[e],e))return e;return-1}function Le(e,t){return 0===t?e:e.slice(0,t)}var pe={convertToUnit:Ue,indexOf:he,minCharWidth:Le},pe=Object.freeze({__proto__:null,convertToUnit:Ue,default:pe,indexOf:he,minCharWidth:Le});const Be={mounted(e,t){if("function"===typeof t.value){const a=t.value,n={callback:a,size:{width:0,height:0},observer:new ResizeObserver(e=>{const t=e[0].contentRect;t.width===n.size.width&&t.height===n.size.height||(n.size.width=t.width,n.size.height=t.height,n.debounceTimeout&&clearTimeout(n.debounceTimeout),n.debounceTimeout=setTimeout(()=>{n.callback(n.size),n.debounceTimeout=void 0},100))})};n.observer.observe(e),e.__onResizeObserver=n}},beforeUnmount(e){if(e.__onResizeObserver){const{observer:t,debounceTimeout:a}=e.__onResizeObserver;a&&clearTimeout(a),t.unobserve(e),delete e.__onResizeObserver}}};function Ye(t,a,{scrollArea:e,pane:n}){if(!a){const s="[error: renderCalendar] no renderFunc has been supplied to useCalendar";throw console.error(s),new Error(s)}const r=xe.reactive({width:0,height:0}),o=xe.ref(null);function u({width:e,height:t}){r.width=e,r.height=t}const d=xe.computed(()=>{return!0!==t.noScroll&&e.value&&n.value&&r.height?e.value.offsetWidth-n.value.offsetWidth:0});function i(){}function l(){const e={ref:o,role:"complementary",lang:t.locale,class:`q-calendar ${t.dark?"q-calendar--dark":""} `+(t.bordered?"q-calendar__bordered":"")};return xe.withDirectives(xe.h("div",{...e},[a()]),[[Be,u]])}return{rootRef:o,scrollWidth:d,__initCalendar:i,__renderCalendar:l}}const ge=e=>e.every(e=>["day","date","weekday","interval","time","resource","task"].includes(e)),we={modelValue:{type:String,default:Oe(),validator:e=>""===e||t(e)},weekdays:{type:Array,default:()=>[0,1,2,3,4,5,6]},dateType:{type:String,default:"round",validator:e=>["round","rounded","square"].includes(e)},weekdayAlign:{type:String,default:"center",validator:e=>["left","center","right"].includes(e)},dateAlign:{type:String,default:"center",validator:e=>["left","center","right"].includes(e)},bordered:Boolean,dark:Boolean,noAria:Boolean,noActiveDate:Boolean,noHeader:Boolean,noScroll:Boolean,shortWeekdayLabel:Boolean,noDefaultHeaderText:Boolean,noDefaultHeaderBtn:Boolean,minWeekdayLabel:{type:[Number,String],default:1},weekdayBreakpoints:{type:Array,default:()=>[75,35],validator:e=>2===e.length},locale:{type:String,default:"en-US"},animated:Boolean,transitionPrev:{type:String,default:"slide-right"},transitionNext:{type:String,default:"slide-left"},disabledDays:Array,disabledBefore:String,disabledAfter:String,disabledWeekdays:{type:Array,default:()=>[]},dragEnterFunc:Function,dragOverFunc:Function,dragLeaveFunc:Function,dropFunc:Function,selectedDates:{type:[Array,Set],default:()=>[]},selectedStartEndDates:{type:Array,default:()=>[]},hoverable:Boolean,focusable:Boolean,focusType:{type:Array,default:()=>["date"],validator:ge}};function Ve(t,{startDate:e,endDate:a,times:n}){const r=xe.computed(()=>He(e.value)),o=xe.computed(()=>{return"0000-00-00"===a.value?P(r.value,t.weekdays,n.today):He(a.value)||r.value}),u=xe.computed(()=>Q(t.locale,()=>({timeZone:"UTC",day:"numeric"}))),d=xe.computed(()=>Q(t.locale,(e,t)=>({timeZone:"UTC",weekday:t?"short":"long"}))),i=xe.computed(()=>Q(t.locale,()=>({timeZone:"UTC",dateStyle:"full"})));function l(e,t){return e&&e.length>0&&e.includes(t.date)}function s(e,t){const a={firstDay:!1,betweenDays:!1,lastDay:!1};if(2===e.length){const n=Re(t),r=Re(We(e[0])),o=Re(We(e[1]));a.firstDay=r===n,a.lastDay=o===n,a.betweenDays=r<n&&o>n}return a}function c(e,t=!1,a=[],n=[],r=!1){const o=l(a,e),{firstDay:u,lastDay:d,betweenDays:i}=s(n,e);return{"q-past-day":!u&&!i&&!d&&!o&&!t&&!!e.past,"q-future-day":!u&&!i&&!d&&!o&&!t&&!!e.future,"q-outside":t,"q-current-day":!!e.current,"q-selected":o,"q-range-first":u,"q-range":i,"q-range-last":d,"q-range-hover":r&&(u||d||i),"q-disabled-day disabled":!0===e.disabled}}function v(e){return K(e,t.weekdays,n.today)}function m(e){return P(e,t.weekdays,n.today)}function f(){return{}}return{parsedStart:r,parsedEnd:o,dayFormatter:u,weekdayFormatter:d,ariaDateFormatter:i,arrayHasDate:l,checkDays:s,getRelativeClasses:c,startOfWeek:v,endOfWeek:m,dayStyleDefault:f}}function De(e,t){e instanceof Window?e.scrollTo({top:t,behavior:"instant"}):e.scrollTop=t}function ke(e){return e instanceof Window?e.scrollY:e.scrollTop}function be(o,u,d=500,i=performance.now(),l=ke(o)){d<=0||l===u?De(o,u):requestAnimationFrame(e=>{const t=e-i,a=Math.min(t/d,1),n=e=>e<.5?2*e*e:(4-2*e)*e-1,r=l+(u-l)*n(a);De(o,r),a<1&&be(o,u,d,i,l)})}function _e(r,e,o=500){const u=r.scrollLeft,d=e-u;let i=null;function l(e){null===i&&(i=e);const t=e-i,a=Math.min(t/o,1),n=e=>e<.5?2*e*e:(4-2*e)*e-1;r.scrollLeft=u+d*n(a),t<o&&requestAnimationFrame(l)}requestAnimationFrame(l)}const Te={view:{type:String,validator:e=>["day","week","month","month-interval"].includes(e),default:"day"},modelResources:{type:Array},resourceKey:{type:String,default:"id"},resourceLabel:{type:String,default:"label"},resourceHeight:{type:[Number,String],default:0,validator:e},resourceMinHeight:{type:[Number,String],default:70,validator:e},resourceStyle:{type:Function,default:null},resourceClass:{type:Function,default:null},weekdayStyle:{type:Function,default:null},weekdayClass:{type:Function,default:null},dayStyle:{type:Function,default:null},dayClass:{type:Function,default:null},dateHeader:{type:String,default:"stacked",validator:e=>["stacked","inline","inverted"].includes(e)}};function Ke(o,{times:t,scrollArea:n,parsedStart:e,parsedEnd:a,maxDays:r,size:u,headerColumnRef:d}){const i=xe.computed(()=>parseInt(String(o.intervalStart),10)),v=xe.computed(()=>parseInt(String(o.intervalMinutes),10)),l=xe.computed(()=>parseInt(String(o.intervalCount),10)),m=xe.computed(()=>parseFloat(String(o.intervalHeight))),f=xe.computed(()=>{let e=0;const t=Number(o.columnCount);return o.cellWidth?e=Number(o.cellWidth):u.width>0&&d.value&&(e=d.value.offsetWidth/(t>1?t:r.value)),e}),s=xe.computed(()=>i.value*v.value),c=xe.computed(()=>l.value*m.value),y=xe.computed(()=>l.value*f.value),h=xe.computed(()=>D(e.value)),p=xe.computed(()=>k(a.value)),g=xe.computed(()=>{return J(e.value,a.value,t.today,o.weekdays,o.disabledBefore,o.disabledAfter,o.disabledWeekdays,o.disabledDays,r.value)}),w=xe.computed(()=>{return g.value.map(e=>ee(e,i.value,v.value,l.value,t.now))});function D(e){return K(e,o.weekdays,t.today)}function k(e){return P(e,o.weekdays,t.today)}function b(e,t){return e&&e.length>0&&e.includes(X(t))}function _(e,t){const a={firstDay:!1,betweenDays:!1,lastDay:!1};if(e&&2===e.length){const n=z(t),r=z(We(e[0])),o=z(We(e[1]));a.firstDay=r===n,a.lastDay=o===n,a.betweenDays=r<n&&o>n}return a}function T(e,t=[],a=[]){const n=b(t,e),{firstDay:r,lastDay:o,betweenDays:u}=_(a,e);return{"q-selected":n,"q-range-first":!0===r,"q-range":!0===u,"q-range-last":!0===o,"q-disabled-interval disabled":!0===e.disabled}}function S(e,t,a){return[]}const I=xe.computed(()=>{const a={timeZone:"UTC",hour12:!o.hour24Format,hour:"2-digit",minute:"2-digit"},n={timeZone:"UTC",hour12:!o.hour24Format,hour:"numeric",minute:"2-digit"},r={timeZone:"UTC",hour12:!o.hour24Format,hour:"numeric"};return Q(o.locale,(e,t)=>t?0===e.minute?r:n:a)}),C=xe.computed(()=>{const e={timeZone:"UTC",dateStyle:"full",timeStyle:"short"};return Q(o.locale,()=>e)});function F(e){const t=w.value[0][0],a=t.hour===e.hour&&t.minute===e.minute;return!a&&0===e.minute}function N(e){}function A(e){return{}}function M(e,t,a=!1,n){let r=j(t);if(e.currentTarget){const o=e.currentTarget.getBoundingClientRect(),u=e,d=e,i=u.changedTouches||u.touches,l=(i&&i[0]?i[0]:d).clientY,s=(l-o.top)/m.value,c=Math.floor((a?Math.floor(s):s)*v.value);0!==c&&(r=G(r,{minute:c})),n&&(r=$(r,n,!0))}return r}function O(e,t,a=!1,n){let r=j(t);const o=e.currentTarget.getBoundingClientRect(),u=e,d=e,i=u.changedTouches||u.touches,l=(i&&i[0]?i[0]:d).clientY,s=(l-o.top)/m.value,c=Math.floor((a?Math.floor(s):s)*v.value);return 0!==c&&(r=G(r,{minute:c})),n&&(r=$(r,n,!0)),r}function H(e,t,a=!1,n){let r=j(t);if(e.currentTarget){const o=e.currentTarget.getBoundingClientRect(),u=e,d=e,i=u.changedTouches||u.touches,l=(i&&i[0]?i[0]:d).clientX,s=(l-o.left)/f.value,c=Math.floor((a?Math.floor(s):s)*v.value);0!==c&&(r=G(r,{minute:c})),n&&(r=$(r,n,!0))}return r}function R(e,t){const a={timestamp:e,timeStartPos:x,timeDurationHeight:E};return void 0!==t&&(a.columnIndex=t),a}function U(e,t){const a={timestamp:j(e),timeStartPosX:W,timeDurationWidth:q};return void 0!==t&&(a.index=t),a}function L(e,t=0){const a=x(e);return!(!1===a||!n.value)&&(be(n.value,a,t),!0)}function B(e,t=0){const a=W(e);return!(!1===a||!n.value)&&(_e(n.value,a,t),!0)}function E(e){return e/v.value*m.value}function q(e){return e/v.value*f.value}function Y(e){return e*v.value/m.value}function V(e){return e*v.value/f.value}function x(e,t=!0){const a=Z(e);if(!1===a)return!1;const n=s.value,r=l.value*v.value,o=(a-n)/r;let u=o*c.value;return t&&(u<0&&(u=0),u>c.value)&&(u=c.value),u}function W(e,t=!0){const a=Z(e);if(!1===a)return!1;const n=s.value,r=l.value*v.value,o=(a-n)/r;let u=o*y.value;return t&&(u<0&&(u=0),u>y.value)&&(u=y.value),u}return{parsedIntervalStart:i,parsedIntervalMinutes:v,parsedIntervalCount:l,parsedIntervalHeight:m,parsedCellWidth:f,parsedStartMinute:s,bodyHeight:c,bodyWidth:y,parsedWeekStart:h,parsedWeekEnd:p,days:g,intervals:w,intervalFormatter:I,ariaDateTimeFormatter:C,arrayHasDateTime:b,checkIntervals:_,getIntervalClasses:T,getResourceClasses:S,showIntervalLabelDefault:F,showResourceLabelDefault:N,styleDefault:A,getTimestampAtEventInterval:M,getTimestampAtEvent:O,getTimestampAtEventX:H,getScopeForSlot:R,getScopeForSlotX:U,scrollToTime:L,scrollToTimeX:B,timeDurationHeight:E,timeDurationWidth:q,heightToMinutes:Y,widthToMinutes:V,timeStartPos:x,timeStartPosX:W}}const Se={columnCount:{type:[Number,String],default:0,validator:e},columnIndexStart:{type:[Number,String],default:0,validator:e}},Ie={maxDays:{type:Number,default:1}},Ce={now:{type:String,validator:e=>""===e||t(e),default:""}};function Pe(e){const t=xe.reactive({now:He("0000-00-00 00:00"),today:He("0000-00-00")}),a=xe.computed(()=>e.now?He(e.now):o());function n(){t.now&&t.today&&(t.now.current=t.today.current=!0,t.now.past=t.today.past=!1,t.now.future=t.today.future=!1)}function r(){const e=a.value||o();u(e,t.now),d(e,t.now),u(e,t.today)}function o(){return M(new Date)}function u(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)}function d(e,t){e.time!==t.time&&(t.hour=e.hour,t.minute=e.minute,t.time=e.time)}return xe.watch(a,()=>r()),{times:t,parsedNow:a,setCurrent:n,updateCurrent:r,getNow:o,updateDay:u,updateTime:d}}function Ze(r,{parsedView:o,parsedValue:u,times:d}){const e=xe.computed(()=>{const e=u.value;let t=r.maxDays,a=e,n=e;switch(o.value){case"month":a=T(e),n=S(e),t=i(a.year,a.month);break;case"week":case"week-agenda":case"week-scheduler":a=K(e,r.weekdays,d.today),n=P(a,r.weekdays,d.today),t=r.weekdays.length;break;case"day":case"scheduler":case"agenda":n=V(j(n),h,t>1?t-1:t,r.weekdays),n=w(n);break;case"month-interval":case"month-scheduler":case"month-agenda":a=T(e),n=S(e),n=w(n),t=i(a.year,a.month);break;case"resource":t=1,n=V(j(n),h,t,r.weekdays),n=w(n);break}return{start:a,end:n,maxDays:t}});return{renderValues:e}}const Fe=e=>e.replace(/(-\w)/g,e=>e[1].toUpperCase());function Ne(t,e,a,n){const r={};for(const o in a){const u=a[o],d=Fe("on-"+o);if(!e.value)return console.warn("$listeners has not been set up"),{};if(void 0!==e.value[d]){const i="on"+u.event.charAt(0).toUpperCase()+u.event.slice(1),l=e=>{return(void 0===u.button||"buttons"in e&&e.buttons>0&&e.button===u.button)&&(u.prevent&&e.preventDefault(),u.stop&&e.stopPropagation(),t(o,n(e,o))),u.result};i in r?Array.isArray(r[i])?r[i].push(l):r[i]=[r[i],l]:r[i]=l}}return r}function Ae(e,t,a,n){return Ne(e,t,Me(a),n)}function Me(e){return{["click"+e]:{event:"click"},["contextmenu"+e]:{event:"contextmenu",prevent:!0,result:!1},["mousedown"+e]:{event:"mousedown"},["mousemove"+e]:{event:"mousemove"},["mouseup"+e]:{event:"mouseup"},["mouseenter"+e]:{event:"mouseenter"},["mouseleave"+e]:{event:"mouseleave"},["touchstart"+e]:{event:"touchstart"},["touchmove"+e]:{event:"touchmove"},["touchend"+e]:{event:"touchend"}}}function m(e){return Object.keys(Me(e))}function ze(a,n){return{getMouseEventHandlers:(e,t)=>Ne(a,n,e,t),getDefaultMouseEventHandlers:(e,t)=>Ae(a,n,e,t),getMouseEventName:Me,getRawMouseEvents:m}}const Ee=["moved"];function $e(i,{parsedView:l,parsedValue:s,direction:c,maxDays:v,times:m,emittedValue:f,emit:y}){function e(a=1){if(0===a)f.value=Oe();else{let e=j(s.value);const n=S(e),r=a>0,o=r?h:p,u=r?n.day:1;let t=r?a:-a;c.value=r?"next":"prev";const d=i.weekdays.length;while(--t>=0)switch(l.value){case"month":e.day=u,e=o(e),e=g(e);while(!i.weekdays.includes(Number(e.weekday)))e=G(e,{day:r?1:-1});break;case"week":case"week-agenda":case"week-scheduler":e=D(e,o,d,i.weekdays);break;case"day":case"scheduler":case"agenda":e=D(e,o,v.value,i.weekdays);break;case"month-interval":case"month-agenda":case"month-scheduler":e.day=u,e=o(e);break;case"resource":e=D(e,o,v.value,i.weekdays);break}e=g(e),e=w(e),e=L(e),e=$(e,m.now),f.value=e.date,y("moved",e)}}return{move:e}}const qe=/^on[A-Z]/;function je(e=xe.getCurrentInstance()){return{emitListeners:xe.computed(()=>{const t={};return e?.vnode?.props&&Object.keys(e.vnode.props).forEach(e=>{qe.test(e)&&(t[e]=!0)}),t})}}function Xe(){const e={"aria-hidden":"true",class:"q-calendar__focus-helper"};return[xe.h("span",e)]}function Qe(){function e({focusable:e,focusType:t},a,n){const r=e&&t.includes("date");return xe.h("button",{...a,tabindex:r?0:-1},[n,r&&Xe()])}return{renderButton:e}}const Ge={cellWidth:[Number,String]};function Je(e){const t=xe.computed(()=>void 0!==e.cellWidth);return{isSticky:t}}const et=["change"];function tt(n,{days:r,lastStart:o,lastEnd:u}){function e(){const e=r.value;if(0===e.length)return!1;const t=e[0].date,a=e[e.length-1].date;return(!o.value||!u.value||t!==o.value||a!==u.value)&&(o.value=t,u.value=a,n("change",{start:t,end:a,days:e}),!0)}return{checkChange:e}}function at(){function e(e,t){return(Array.isArray(t)?t:[t]).includes(e.keyCode)}return{isKeyCode:e}}const nt=at().isKeyCode,rt={useNavigation:Boolean};function ot(t,{rootRef:a,focusRef:n,focusValue:r,datesRef:o,parsedView:u,emittedValue:d,direction:i,times:l}){let e=!1;function s(){e||document&&(e=!0,document.addEventListener("keyup",y),document.addEventListener("keydown",f))}function c(){document&&(document.removeEventListener("keyup",y),document.removeEventListener("keydown",f),e=!1)}function v(e){if(e&&document){const t=document.activeElement;if(t!==document.body&&a.value?.contains(t))return!0}return!1}function m(){let t=0;const a=window.setInterval(()=>{const e=o.value[n.value];e&&(e.focus(),50!==++t)&&document.activeElement!==e||window.clearInterval(a)},250)}function f(e){v(e)&&nt(e,[33,34,35,36,37,38,39,40])&&(e.stopPropagation(),e.preventDefault())}function y(e){if(v(e)&&nt(e,[33,34,35,36,37,38,39,40])){const t={33:D,34:k,35:_,36:b,37:g,38:h,39:w,40:p};t[e.keyCode]?.()}}function h(){let e=j(r.value);if("month"===u.value){if(e=G(e,{day:-7}),r.value.month!==e.month)return i.value="prev",void(d.value=e.date)}else e=G(e,{minute:Number(t.intervalMinutes)});i.value="prev",n.value=e.date}function p(){let e=j(r.value);if("month"===u.value){if(e=G(e,{day:7}),r.value.month!==e.month)return i.value="next",void(d.value=e.date)}else e=G(e,{minute:Number(t.intervalMinutes)});i.value="next",n.value=e.date}function g(){let e=j(r.value);i.value="prev";do{e=G(e,{day:-1})}while(!t.weekdays.includes(Number(e.weekday)));n.value=e.date}function w(){let e=j(r.value);i.value="next";do{e=G(e,{day:1})}while(!t.weekdays.includes(Number(e.weekday)));n.value=e.date}function D(){let e=j(r.value);e="month"===u.value?G(e,{month:-1}):G(e,{day:-7}),i.value="prev",n.value=e.date}function k(){let e=j(r.value);e="month"===u.value?G(e,{month:1}):G(e,{day:7}),i.value="next",n.value=e.date}function b(){let e=j(r.value);e="month"===u.value?T(e):K(e,t.weekdays||[],l.today);while(!t.weekdays.includes(Number(e.weekday)))e=G(e,{day:-1});n.value=e.date}function _(){let e=j(r.value);e="month"===u.value?S(e):P(e,t.weekdays||[],l.today);while(!t.weekdays.includes(Number(e.weekday)))e=G(e,{day:-1});n.value=e.date}return xe.onBeforeUnmount(()=>{c()}),xe.watch(()=>t.useNavigation,e=>{(!0===e?s:c)()}),!0===t.useNavigation&&s(),{startNavigation:s,endNavigation:c,tryFocus:m}}const ut=Qe().renderButton;var dt=xe.defineComponent({name:"QCalendarScheduler",directives:{ResizeObserver:Be},props:{...we,...Te,...Se,...Ie,...Ce,...Ge,...rt},emits:["update:model-value","update:model-resources","resource-expanded",...et,...Ee,...m("-date"),...m("-day-resource"),...m("-head-resources"),...m("-head-day"),...m("-resource")],setup(h,{slots:p,emit:g,expose:O}){const e=xe.ref(null),t=xe.ref(null),H=xe.ref(null),m=xe.ref(h.modelValue||Oe()),a=xe.ref(We(h.modelValue||Oe())),f=xe.ref({}),R=xe.ref({}),n=xe.ref(),r=xe.ref(),d=xe.ref("next"),i=xe.ref(h.modelValue||Oe()),l=xe.ref("0000-00-00"),s=xe.ref(0),w=xe.ref(h.modelValue),c=xe.reactive({width:0,height:0}),y=xe.ref(""),D=xe.ref(""),U=xe.ref(null),L=xe.ref(null),o=(xe.watch(()=>h.view,()=>{s.value=0}),xe.computed(()=>{return"month"===h.view?"month-interval":h.view})),B=xe.getCurrentInstance();if(null===B)throw new Error("current instance is null");const k=je(B).emitListeners,b=Je(h).isSticky,{times:u,setCurrent:Y,updateCurrent:V}=Pe(h),{parsedStart:K,parsedEnd:P,dayFormatter:Z,weekdayFormatter:z,ariaDateFormatter:$,dayStyleDefault:j,getRelativeClasses:_}=(V(),Y(),Ve(h,{startDate:i,endDate:l,times:u})),T=xe.computed(()=>{return He(h.modelValue,u.now)||K.value||u.today}),X=(a.value=T.value,m.value=T.value.date,Ze(h,{parsedView:o,parsedValue:T,times:u})).renderValues,{rootRef:v,scrollWidth:Q,__renderCalendar:G}=Ye(h,qe,{scrollArea:e,pane:t}),{days:S,parsedCellWidth:I,styleDefault:J}=Ke(h,{times:u,scrollArea:e,parsedStart:K,parsedEnd:P,maxDays:s,size:c,headerColumnRef:H}),C=$e(h,{parsedView:o,parsedValue:T,direction:d,maxDays:s,times:u,emittedValue:w,emit:g}).move,F=ze(g,k).getDefaultMouseEventHandlers,ee=tt(g,{days:S,lastStart:U,lastEnd:L}).checkChange,N=at().isKeyCode,te=ot(h,{rootRef:v,focusRef:m,focusValue:a,datesRef:f,parsedView:o,emittedValue:w,direction:d,times:u}).tryFocus,A=xe.computed(()=>{const e=parseInt(String(h.columnCount),10);return"day"===o.value&&e>1?e:"day"===o.value&&h.maxDays&&h.maxDays>1?h.maxDays:S.value.length}),ae=xe.computed(()=>{return v.value?parseInt(window.getComputedStyle(v.value).getPropertyValue("--calendar-resources-width"),10):0}),M=xe.computed(()=>{const e=parseInt(String(h.resourceHeight),10);return 0===e?"auto":e}),ne=xe.computed(()=>{return parseInt(String(h.resourceMinHeight),10)}),E=xe.computed(()=>{if(v.value){const e=c.width||v.value.getBoundingClientRect().width;if(e&&ae.value&&A.value)return(e-Q.value-ae.value)/A.value+"px"}return 100/A.value+"%"});function re(){w.value=Oe()}function oe(e=1){C(e)}function ue(e=1){C(-e)}function de({width:e,height:t}){c.width=e,c.height=t}function q(e){return e.date===w.value}function ie(){return xe.h("div",{roll:"presentation",class:{"q-calendar-scheduler__head":!0,"q-calendar__sticky":!0===b.value},style:{marginRight:Q.value+"px"}},[le(),se()])}function le(){const e=p["head-resources"],t={days:S.value,timestamps:S.value,date:h.modelValue,resources:h.modelResources};return xe.h("div",{class:{"q-calendar-scheduler__head--resources":!0,"q-calendar__sticky":!0===b.value},...F("-head-resources",e=>{return{scope:t,event:e}})},[e&&e({scope:t})])}function se(){return xe.h("div",{ref:H,class:{"q-calendar-scheduler__head--days__column":!0}},[ce(),ve()])}function ce(){return xe.h("div",{class:{"q-calendar-scheduler__head--days__weekdays":!0}},[...me()])}function ve(){const e=p["head-days-events"];return xe.nextTick(()=>{if(r.value&&0===parseInt(String(h.columnCount),10)&&window)try{const e=window.getComputedStyle(r.value);n.value&&n.value.parentElement&&(n.value.parentElement.style.height=e.height,n.value.style.height=e.height)}catch{}}),xe.h("div",{class:{"q-calendar-scheduler__head--days__event":!0}},[e&&xe.h("div",{ref:n,style:{position:"absolute",left:0,top:0,right:0,overflow:"hidden",zIndex:1}},[e({scope:{timestamps:S.value,days:S.value,ref:r}})]),...fe()])}function me(){const e=parseInt(String(h.columnCount),10),a=parseInt(String(h.columnIndexStart),10);return 1===S.value.length&&e>0?Array.apply(null,new Array(e)).map((e,t)=>t+a).map(e=>ye(S.value[0],e)):S.value.map(e=>ye(e,0))}function fe(){const e=parseInt(String(h.columnCount),10),a=parseInt(String(h.columnIndexStart),10);return 1===S.value.length&&e>0?Array.apply(null,new Array(e)).map((e,t)=>t+a).map(e=>pe(S.value[0],e)):S.value.map(e=>pe(e,0))}function ye(t,e){const a=p["head-day"],n=p["head-date"],r=!0!==h.noActiveDate&&q(t),o={timestamp:t,activeDate:r,droppable:y.value===t.date,disabled:!!h.disabledWeekdays&&h.disabledWeekdays.includes(Number(t.weekday)),columnIndex:e??0},u=!0===b.value?Ue(I.value):E.value,d=h.weekdayStyle||j,i={width:u,maxWidth:u,minWidth:u,...d({scope:o})},l=(!0===b.value&&(i.minWidth=u),"function"===typeof h.weekdayClass?h.weekdayClass({scope:o}):{}),s=!0===h.focusable&&h.focusType.includes("weekday"),c=t.date+(void 0!==e?"-"+e:""),v={key:c,ref:e=>{null!==e&&(f.value[c]=e)},tabindex:!0===s?0:-1,class:{"q-calendar-scheduler__head--day":!0,...l,..._(t),"q-active-date":r,"q-calendar__hoverable":!0===h.hoverable,"q-calendar__focusable":!0===s},style:i,onFocus:()=>{!0===s&&(m.value=c)},onKeydown:e=>{!0!==t.disabled&&N(e,[13,32])&&(e.stopPropagation(),e.preventDefault())},onKeyup:e=>{!0!==t.disabled&&N(e,[13,32])&&(w.value=t.date)},...F("-head-day",e=>{return{scope:o,event:e}}),onDragenter:e=>{void 0!==h.dragEnterFunc&&"function"===typeof h.dragEnterFunc&&(!0===h.dragEnterFunc(e,"head-day",{scope:o})?y.value=t.date:y.value="")},onDragover:e=>{void 0!==h.dragOverFunc&&"function"===typeof h.dragOverFunc&&(!0===h.dragOverFunc(e,"head-day",{scope:o})?y.value=t.date:y.value="")},onDragleave:e=>{void 0!==h.dragLeaveFunc&&"function"===typeof h.dragLeaveFunc&&(!0===h.dragLeaveFunc(e,"head-day",{scope:o})?y.value=t.date:y.value="")},onDrop:e=>{void 0!==h.dropFunc&&"function"===typeof h.dropFunc&&(!0===h.dropFunc(e,"head-day",{scope:o})?y.value=t.date:y.value="")}};return xe.h("div",v,[void 0!==a&&a({scope:o}),void 0===a&&De(t,e),void 0===a&&he(t),void 0===a&&n&&n({scope:o}),void 0===a&&ke(t,e),Xe()])}function he(e){return"stacked"===h.dateHeader?[!0!==h.noDefaultHeaderText?x(e):[],!0!==h.noDefaultHeaderBtn?W(e):[]].flat():"inline"===h.dateHeader?("left"===h.weekdayAlign&&"right"===h.dateAlign||"right"===h.weekdayAlign&&h.dateAlign,xe.h("div",{class:"q-calendar__header--inline"},[!0!==h.noDefaultHeaderText&&x(e),!0!==h.noDefaultHeaderBtn&&W(e)])):"inverted"===h.dateHeader?("left"===h.weekdayAlign&&"right"===h.dateAlign||"right"===h.weekdayAlign&&h.dateAlign,xe.h("div",{class:"q-calendar__header--inline"},[!0!==h.noDefaultHeaderBtn&&W(e),!0!==h.noDefaultHeaderText&&x(e)])):void 0}function pe(e,t){const a=p["head-day-event"],n=!0!==h.noActiveDate&&q(e),r={timestamp:e,activeDate:n,droppable:y.value===e.date,disabled:!!h.disabledWeekdays&&h.disabledWeekdays.includes(Number(e.weekday)),columnIndex:t??0},o=!0===b.value?Ue(I.value):E.value,u={width:o,maxWidth:o,minWidth:o};return!0===b.value&&(u.minWidth=o),xe.h("div",{key:"event-"+e.date+(void 0!==t?"-"+t:""),class:{"q-calendar-scheduler__head--day__event":!0,..._(e),"q-active-date":n},style:u},[a&&a({scope:r})])}function x(e){const t=p["head-weekday-label"],a=!0===h.shortWeekdayLabel,n={timestamp:e,shortWeekdayLabel:a},r={class:{"q-calendar-scheduler__head--weekday":!0,["q-calendar__"+h.weekdayAlign]:!0,"q-calendar__ellipsis":!0}};return xe.h("div",r,t&&t({scope:n})||ge(e,a))}function ge(e,t){const a=z.value(e,t||h.weekdayBreakpoints[0]>0&&I.value<=h.weekdayBreakpoints[0]);return xe.h("span",{class:"q-calendar-scheduler__head--weekday-label q-calendar__ellipsis"},h.weekdayBreakpoints[1]>0&&I.value<=h.weekdayBreakpoints[1]?Le(a,Number(h.minWeekdayLabel)):a)}function W(e){const t={class:{"q-calendar-scheduler__head--date":!0,["q-calendar__"+h.dateAlign]:!0}};return xe.h("div",t,we(e))}function we(a){const e=!0!==h.noActiveDate&&q(a),t=Z.value(a,!1),n=p["head-day-label"],r=p["head-day-button"],o={dayLabel:t,timestamp:a,activeDate:e},u={class:{"q-calendar-scheduler__head--day__label":!0,"q-calendar__button":!0,"q-calendar__button--round":"round"===h.dateType,"q-calendar__button--rounded":"rounded"===h.dateType,"q-calendar__button--bordered":!0===a.current,"q-calendar__focusable":!0},disabled:a.disabled,onKeydown:e=>{!0!==a.disabled&&N(e,[13,32])&&(e.stopPropagation(),e.preventDefault())},onKeyup:e=>{!0!==a.disabled&&N(e,[13,32])&&(w.value=a.date,void 0!==k.value.onClickDate)&&g("click-date",{scope:o})},...F("-date",(e,t)=>{return"click-date"!==t&&"contextmenu-date"!==t||(w.value=a.date,"click-date"===t&&e.preventDefault()),{scope:o,event:e}})};return!0!==h.noAria&&(u.ariaLabel=$.value(a,!1)),r?xe.h("div",[r({scope:o})]):ut(h,u,n?n({scope:o}):t)}function De(e,t){const a=p["column-header-before"];if(a){const n={timestamp:e,columnIndex:t};return xe.h("div",{class:"q-calendar-scheduler__column-header--before"},[a({scope:n})])}}function ke(e,t){const a=p["column-header-after"];if(a){const n={timestamp:e,columnIndex:t};return xe.h("div",{class:"q-calendar-scheduler__column-header--after"},[a({scope:n})])}}function be(){return xe.h("div",{class:"q-calendar-scheduler__body"},[_e()])}function _e(){return!0===b.value?xe.h("div",{ref:e,class:{"q-calendar-scheduler__scroll-area":!0,"q-calendar__scroll":!0}},[!0!==b.value&&Ne(),Se()]):!0===h.noScroll?Te():xe.h("div",{ref:e,class:{"q-calendar-scheduler__scroll-area":!0,"q-calendar__scroll":!0}},[Te()])}function Te(){return xe.h("div",{ref:t,class:"q-calendar-scheduler__pane"},[Se()])}function Se(){return xe.h("div",{class:"q-calendar-scheduler__day--container"},[!0===b.value&&!0!==h.noHeader&&ie(),Ie()])}function Ie(e=void 0,a=0,n=!0){return void 0===e&&(e=h.modelResources),e.map((e,t)=>{return Ce(e,t,a,void 0!==e.children?e.expanded:n)}).flat()}function Ce(e,t,a=0,n=!0){const r={},o=(r.height=void 0!==e.height?Ue(parseInt(e.height,10)):M.value?Ue(M.value):"auto",ne.value>0&&(r.minHeight=Ue(ne.value)),xe.h("div",{key:e[h.resourceKey]+"-"+t,class:{"q-calendar-scheduler__resource--row":!0},style:r},[Fe(e,t,a,n),Ne(e,t,a,n)]));return void 0!==e.children?[o,xe.h("div",{class:{"q-calendar__child":!0,"q-calendar__child--expanded":!0===n,"q-calendar__child--collapsed":!0!==n}},[Ie(e.children,a+1,!1===n?n:e.expanded)])]:[o]}function Fe(t,e,a=0,n=!0){const r=p["resource-label"],o=parseInt(String(h.resourceMinHeight),10),u={},d=(u.height=void 0!==t.height?Ue(parseInt(t.height,10)):M.value?Ue(M.value):"auto",o>0&&(u.minHeight=Ue(o)),h.resourceStyle||J),i=t[h.resourceLabel],l=!0===h.focusable&&h.focusType.includes("resource")&&!0===n,s=t[h.resourceKey],c={resource:t,timestamps:S.value,days:S.value,resourceIndex:e,indentLevel:a,label:i,droppable:D.value===s},v="function"===typeof h.resourceClass?h.resourceClass({scope:c}):{};return xe.h("div",{key:t[h.resourceKey]+"-"+e,ref:e=>{null!==e&&(R.value[t[h.resourceKey]]=e)},tabindex:!0===l?0:-1,class:{"q-calendar-scheduler__resource":0===a,"q-calendar-scheduler__resource--section":0!==a,...v,"q-calendar__sticky":!0===b.value,"q-calendar__hoverable":!0===h.hoverable,"q-calendar__focusable":!0===l},style:{...u,...d({scope:c})},onDragenter:e=>{void 0!==h.dragEnterFunc&&"function"===typeof h.dragEnterFunc&&(!0===h.dragEnterFunc(e,"resource",{scope:c})?D.value=s:D.value="")},onDragover:e=>{void 0!==h.dragOverFunc&&"function"===typeof h.dragOverFunc&&(!0===h.dragOverFunc(e,"resource",{scope:c})?D.value=s:D.value="")},onDragleave:e=>{void 0!==h.dragLeaveFunc&&"function"===typeof h.dragLeaveFunc&&(!0===h.dragLeaveFunc(e,"resource",{scope:c})?D.value=s:D.value="")},onDrop:e=>{void 0!==h.dropFunc&&"function"===typeof h.dropFunc&&(!0===h.dropFunc(e,"resource",{scope:c})?D.value=s:D.value="")},onKeydown:e=>{N(e,[13,32])&&(e.stopPropagation(),e.preventDefault())},onKeyup:e=>{N(e,[13,32])&&void 0!==k.value.onClickResource&&g("click-resource",{scope:c,event:e})},...F("-resource",e=>{return{scope:c,event:e}})},[[xe.h("div",{class:{"q-calendar__parent":void 0!==t.children,"q-calendar__parent--expanded":void 0!==t.children&&!0===t.expanded,"q-calendar__parent--collapsed":void 0!==t.children&&!0!==t.expanded},onClick:e=>{e.stopPropagation(),t.expanded=!t.expanded,g("resource-expanded",{expanded:t.expanded,scope:c})}}),xe.h("div",{class:{"q-calendar-scheduler__resource--text":!0,"q-calendar__ellipsis":!0},style:{paddingLeft:10*a+2+"px"}},[r?r({scope:c}):i]),Xe()]])}function Ne(e,t,a=0,n=!0){const r=p["resource-days"],o=!0===b.value?Ue(I.value):E.value,u={resource:e,resourceIndex:t,indentLevel:a,expanded:n,cellWidth:o,timestamps:S.value,days:S.value},d={},i=(d.height=parseInt(String(h.resourceHeight),10)>0?Ue(parseInt(String(h.resourceHeight),10)):"auto",parseInt(String(h.resourceMinHeight),10)>0&&(d.minHeight=Ue(parseInt(String(h.resourceMinHeight),10))),{class:"q-calendar-scheduler__resource--days",style:d});return xe.h("div",i,[...Ae(e,t,a,n),r&&r({scope:u})])}function Ae(t,a,n=0,r=!0){return 1===S.value.length&&parseInt(String(h.columnCount),10)>0?Array.apply(null,new Array(parseInt(String(h.columnCount),10))).map((e,t)=>t+parseInt(String(h.columnIndexStart),10)).map(e=>Me(S.value[0],e,t,a,n,r)):S.value.map(e=>Me(e,0,t,a,n,r))}function Me(e,t,a,n,r=0,o=!0){const u=p.day,d=h.dayStyle||j,i=!0!==h.noActiveDate&&T.value.date===e.date,l=e.date+":"+a[h.resourceKey]+(void 0!==t?":"+t:""),s=D.value===l,c={timestamp:e,columnIndex:t,resource:a,resourceIndex:n,indentLevel:r,activeDate:i,droppable:s},v=!0===b.value?Ue(I.value):E.value,m={width:v,maxWidth:v,...d({scope:c})},f=(m.height=parseInt(String(h.resourceHeight),10)>0?Ue(parseInt(String(h.resourceHeight),10)):"auto",parseInt(String(h.resourceMinHeight),10)>0&&(m.minHeight=Ue(parseInt(String(h.resourceMinHeight),10))),"function"===typeof h.dayClass?h.dayClass({scope:c}):{}),y=!0===h.focusable&&h.focusType.includes("day")&&!0===o;return xe.h("div",{key:e.date+(void 0!==t?":"+t:""),tabindex:!0===y?0:-1,class:{"q-calendar-scheduler__day":0===r,"q-calendar-scheduler__day--section":0!==r,...f,..._(e),"q-calendar__hoverable":!0===h.hoverable,"q-calendar__focusable":!0===y},style:m,onDragenter:e=>{void 0!==h.dragEnterFunc&&"function"===typeof h.dragEnterFunc&&(!0===h.dragEnterFunc(e,"day",{scope:c})?D.value=l:D.value="")},onDragover:e=>{void 0!==h.dragOverFunc&&"function"===typeof h.dragOverFunc&&(!0===h.dragOverFunc(e,"day",{scope:c})?D.value=l:D.value="")},onDragleave:e=>{void 0!==h.dragLeaveFunc&&"function"===typeof h.dragLeaveFunc&&(!0===h.dragLeaveFunc(e,"day",{scope:c})?D.value=l:D.value="")},onDrop:e=>{void 0!==h.dropFunc&&"function"===typeof h.dropFunc&&(!0===h.dropFunc(e,"day",{scope:c})?D.value=l:D.value="")},onKeydown:e=>{N(e,[13,32])&&(e.stopPropagation(),e.preventDefault())},onKeyup:e=>{N(e,[13,32])&&(w.value=c.timestamp.date,void 0!==k.value.onClickResource)&&g("click-resource",{scope:c,event:e})},...F("-day-resource",e=>{return{scope:c,event:e}})},[u&&u({scope:c}),Xe()])}function Ee(){return xe.h("div",{},"No resources have been defined")}function qe(){const{start:e,end:t,maxDays:a}=X.value,n=(i.value===e.date&&l.value===t.date&&s.value===a||(i.value=e.date,l.value=t.date,s.value=a),c.width>0),r=h.modelResources&&h.modelResources.length>0,o=xe.withDirectives(xe.h("div",{key:i.value,class:"q-calendar-scheduler"},[!0===n&&!0===r&&!0!==b.value&&!0!==h.noHeader&&ie(),!0===n&&!0===r&&be(),!1===r&&Ee()]),[[Be,de]]);if(!0!==h.animated)return o;{const u="q-calendar--"+("prev"===d.value?h.transitionPrev:h.transitionNext);return xe.h(xe.Transition,{name:u,appear:!0},()=>o)}}return xe.watch([S],ee,{deep:!0,immediate:!0}),xe.watch(()=>h.modelValue,(e,t)=>{if(w.value!==h.modelValue){if(!0===h.animated){const a=Re(We(e)),n=Re(We(t));d.value=a>=n?"next":"prev"}w.value=e}m.value=e}),xe.watch(w,(e,t)=>{if(w.value!==h.modelValue){if(!0===h.animated){const a=Re(We(e)),n=Re(We(t));d.value=a>=n?"next":"prev"}g("update:model-value",e)}}),xe.watch(m,e=>{e&&(a.value=He(e))}),xe.watch(a,()=>{f.value[m.value]?f.value[m.value].focus():te()}),xe.watch(()=>h.maxDays,e=>{s.value=e}),xe.onBeforeUpdate(()=>{f.value={},n.value=void 0,r.value=void 0,R.value={}}),xe.onMounted(()=>{}),O({prev:ue,next:oe,move:C,moveToToday:re,updateCurrent:V}),()=>G()}});const it="4.1.1";ye={version:it,QCalendarScheduler:dt,...ye,...pe,install(e){e.component(String(dt.name),dt)}};return ye}); |
/*! | ||
* @quasar/quasar-ui-qcalendar v4.1.0 | ||
* @quasar/quasar-ui-qcalendar v4.1.1 | ||
* (c) 2025 Jeff Galbraith <jeff@quasar.dev> | ||
* Released under the MIT License. | ||
*/ | ||
var vue=require("vue");const PARSE_DATETIME=/^(\d{4})-(\d{1,2})(-(\d{1,2}))?([^\d]+(\d{1,2}))?(:(\d{1,2}))?(:(\d{1,2}))?(.(\d{1,3}))?$/,PARSE_DATE=/^(\d{4})-(\d{1,2})(-(\d{1,2}))?/,PARSE_TIME=/(\d\d?)(:(\d\d?)|)(:(\d\d?)|)/,DAYS_IN_MONTH=[0,31,28,31,30,31,30,31,31,30,31,30,31],DAYS_IN_MONTH_LEAP=[0,31,29,31,30,31,30,31,31,30,31,30,31],TIME_CONSTANTS={MILLISECONDS_IN:{DAY:864e5},MINUTES_IN:{HOUR:60},DAYS_IN:{WEEK:7}},DAYS_IN_MONTH_MIN=28,DAYS_IN_MONTH_MAX=31,MONTH_MAX=12,MONTH_MIN=1,DAY_MIN=1,FIRST_HOUR=0;function validateTimestamp(e){return"string"===typeof e&&PARSE_DATETIME.test(e)}function parsed(e){if("string"!==typeof e)return null;const t=PARSE_DATETIME.exec(e);if(!t||!t[1]||!t[2])return null;const a=parseInt(t[1],10),n=parseInt(t[2],10),r=parseInt(t[4]||"1",10),o=parseInt(t[6]||"0",10),d=parseInt(t[8]||"0",10);return{date:e,time:o.toString().padStart(2,"0")+":"+d.toString().padStart(2,"0"),year:a,month:n,day:r,hour:o,minute:d,hasDay:!!t[4],hasTime:!0,past:!1,current:!1,future:!1,disabled:!1,weekday:0,doy:0,workweek:0}}function parseDate(e,t=!1){if(!(e instanceof Date))return null;const a=t?"UTC":"";return updateFormatted({date:padNumber(e[`get${a}FullYear`](),4)+"-"+padNumber(e[`get${a}Month`]()+1,2)+"-"+padNumber(e[`get${a}Date`](),2),time:padNumber(e[`get${a}Hours`]()||0,2)+":"+padNumber(e[`get${a}Minutes`]()||0,2),year:e[`get${a}FullYear`](),month:e[`get${a}Month`]()+1,day:e[`get${a}Date`](),hour:e[`get${a}Hours`](),minute:e[`get${a}Minutes`](),weekday:0,doy:0,workweek:0,hasDay:!0,hasTime:!0,past:!1,current:!1,future:!1,disabled:!1})}function padNumber(e,t){let a=String(e);while(a.length<t)a="0"+a;return a}function isLeapYear(e){return e%4===0&&e%100!==0||e%400===0}function daysInMonth(e,t){return(isLeapYear(e)?DAYS_IN_MONTH_LEAP:DAYS_IN_MONTH)[t]}function nextDay(e){const t=new Date(e.year,e.month-1,e.day+1);return updateFormatted(normalizeTimestamp({...e,year:t.getFullYear(),month:t.getMonth()+1,day:t.getDate()}))}function prevDay(e){const t=new Date(e.year,e.month-1,e.day-1);return updateFormatted(normalizeTimestamp({...e,year:t.getFullYear(),month:t.getMonth()+1,day:t.getDate()}))}function today(){const e=new Date,t=e.getMonth()+1,a=e.getDate(),n=e.getFullYear();return[n,padNumber(t,2),padNumber(a,2)].join("-")}function isToday(e){return e===today()}function getStartOfWeek(e,t,a){let n=copyTimestamp(e);if(t){if(1===n.day||0===n.weekday)while(!t.includes(Number(n.weekday)))n=nextDay(n);n=findWeekday(n,t[0],prevDay),n=updateFormatted(n),a&&(n=updateRelative(n,a,n.hasTime))}return n}function getEndOfWeek(e,t,a){let n=copyTimestamp(e);if(t&&Array.isArray(t)){const r=daysInMonth(n.year,n.month);if(r===n.day||n.weekday===t[t.length-1])while(!t.includes(Number(n.weekday)))n=prevDay(n);n=findWeekday(n,t[t.length-1],nextDay),n=updateFormatted(n),a&&(n=updateRelative(n,a,n.hasTime))}return n}function getStartOfMonth(e){let t=copyTimestamp(e);return t.day=DAY_MIN,t=updateFormatted(t),t}function getEndOfMonth(e){let t=copyTimestamp(e);return t.day=daysInMonth(t.year,t.month),t=updateFormatted(t),t}function parseTime(e){const t=Object.prototype.toString.call(e);switch(t){case"[object Number]":return e;case"[object String]":{const a=PARSE_TIME.exec(e);return a?60*parseInt(a[1],10)+parseInt(a[3]||"0",10):!1}case"[object Object]":return"object"!==typeof e||"number"!==typeof e.hour||"number"!==typeof e.minute?!1:"object"===typeof e&&"hour"in e&&"minute"in e&&60*e.hour+e.minute}return!1}function compareTimestamps(e,t){return!(!e||!t)&&e.year===t.year&&e.month===t.month&&e.day===t.day&&e.hour===t.hour&&e.minute===t.minute}function compareDate(e,t){return getDate(e)===getDate(t)}function compareTime(e,t){return getTime(e)===getTime(t)}function compareDateTime(e,t){return getDateTime(e)===getDateTime(t)}function parseTimestamp(e,t=null){let a=parsed(e);return a?(a=updateFormatted(a),t&&(a=updateRelative(a,t,a.hasTime)),a):null}function getDayIdentifier(e){return 1e8*(e.year??0)+1e6*(e.month??0)+1e4*(e.day??0)}function getTimeIdentifier(e){return 100*(e.hour??0)+(e.minute??0)}function getDayTimeIdentifier(e){return getDayIdentifier(e)+getTimeIdentifier(e)}function diffTimestamp(e,t,a=!1){const n=Date.UTC(e.year??0,(e.month??1)-1,e.day??1,e.hour??0,e.minute??0),r=Date.UTC(t.year??0,(t.month??1)-1,t.day??1,t.hour??0,t.minute??0);return!0===a&&r<n?0:r-n}function updateRelative(e,t,a=!1){let n=copyTimestamp(e),r=getDayIdentifier(t),o=getDayIdentifier(n),d=r===o;return n.hasTime&&a&&d&&(r=getTimeIdentifier(t),o=getTimeIdentifier(n),d=r===o),n.past=o<r,n.current=d,n.future=o>r,n.currentWeekday=n.weekday===t.weekday,n}function updateMinutes(e,t,a=null){let n=copyTimestamp(e);return n.hasTime=!0,n.hour=Math.floor(t/TIME_CONSTANTS.MINUTES_IN.HOUR),n.minute=t%TIME_CONSTANTS.MINUTES_IN.HOUR,n.time=getTime(n),a&&(n=updateRelative(n,a,!0)),n}function updateWeekday(e){let t=copyTimestamp(e);return t.weekday=getWeekday(t),t}function updateDayOfYear(e){let t=copyTimestamp(e);return t.doy=getDayOfYear(t)||0,t}function updateWorkWeek(e){let t=copyTimestamp(e);return t.workweek=getWorkWeek(t),t}function updateDisabled(e,t,a,n,r){let o=copyTimestamp(e);const d=getDayIdentifier(o);if(void 0!==t){const l=parsed(t);if(l){const c=getDayIdentifier(l);d<=c&&(o.disabled=!0)}}if(!0!==o.disabled&&void 0!==a){const m=parsed(a);if(m){const p=getDayIdentifier(m);d>=p&&(o.disabled=!0)}}if(!0!==o.disabled&&Array.isArray(n)&&n.length>0)for(var i in n)if(n[i]===o.weekday){o.disabled=!0;break}if(!0!==o.disabled&&Array.isArray(r)&&r.length>0)for(var u in r)if(Array.isArray(r[u])&&2===r[u].length&&r[u][0]&&r[u][1]){const v=parsed(r[u][0]),y=parsed(r[u][1]);if(v&&y&&isBetweenDates(o,v,y)){o.disabled=!0;break}}else{const f=r[u];if(Array.isArray(f))for(var s of f){const h=parseTimestamp(s);if(h){const g=getDayIdentifier(h);if(g===d){o.disabled=!0;break}}}else if(f){const T=parseTimestamp(f);if(T){const k=getDayIdentifier(T);k===d&&(o.disabled=!0)}}}return o}function updateFormatted(e){let t=copyTimestamp(e);return t.hasTime=!0,t.time=getTime(t),t.date=getDate(t),t.weekday=getWeekday(t),t.doy=getDayOfYear(t)||0,t.workweek=getWorkWeek(t),t}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){let t=copyTimestamp(e);if(0===t.year){const r=parseTimestamp(today());r&&(t=r)}const a=new Date(Date.UTC(t.year,t.month-1,t.day)),n=4;a.setUTCDate(a.getUTCDate()-(a.getUTCDay()+6)%7+n),a.setUTCDate(a.getUTCDate()+n-(a.getUTCDay()||7));e=new Date(Date.UTC(a.getUTCFullYear(),0,1)),e=Math.ceil(((a.valueOf()-e.valueOf())/864e5+1)/7);return e}function getWeekday(e){let t=e.weekday;if(e.hasDay){const a=Math.floor,n=e.day,r=(e.month+9)%MONTH_MAX+1,o=a(e.year/100),d=e.year%100-(e.month<=2?1:0);t=((n+a(2.6*r-.2)-2*o+d+a(d/4)+a(o/4))%7+7)%7}return t??0}function copyTimestamp(e){return{...e}}function getDate(e){let 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):"00:00")}function moveRelativeDays(e,t=nextDay,a=1,n=[0,1,2,3,4,5,6]){const r=copyTimestamp(e);return relativeDays(r,t,a,n)}function relativeDays(e,t=nextDay,a=1,n=[0,1,2,3,4,5,6]){let r=copyTimestamp(e);n.includes(Number(r.weekday))||0!==r.weekday||t!==nextDay||++a;while(--a>=0)r=t(r),n.length<7&&!n.includes(Number(r.weekday))&&++a;return r}function findWeekday(e,t,a=nextDay,n=6){let r=copyTimestamp(e);while(r.weekday!==t&&--n>=0)r=a(r);return r}function createDayList(e,t,a,n=[0,1,2,3,4,5,6],r=void 0,o=void 0,d=[],i=[],u=42,s=0){const l=getDayIdentifier(e),c=getDayIdentifier(t),m=[];let p=copyTimestamp(e),v=0,y=v===c;if(!(c<l))while((!y||m.length<s)&&m.length<u){if(v=getDayIdentifier(p),y=y||v>c&&m.length>=s,y)break;if(n.includes(Number(p.weekday))){let e=copyTimestamp(p);e=updateFormatted(e),e=updateRelative(e,a),e=updateDisabled(e,r,o,d,i),m.push(e)}p=relativeDays(p,nextDay)}return m}function createIntervalList(t,a,n,r,o){const d=[];for(let e=0;e<r;++e){const i=(a+e)*n,u=copyTimestamp(t);d.push(updateMinutes(u,i,o))}return d}function createNativeLocaleFormatter(n,r){const e=()=>"";return"undefined"===typeof Intl||"undefined"===typeof Intl.DateTimeFormat?e:(t,e)=>{try{const a=new Intl.DateTimeFormat(n||void 0,r(t,e));return a.format(makeDateTime(t))}catch(e){return console.error(`Intl.DateTimeFormat: ${e.message} -> `+getDateTime(t)),""}}}function makeDate(e,t=!0){return t?new Date(Date.UTC(e.year,e.month-1,e.day,0,0)):new Date(e.year,e.month-1,e.day,0,0)}function makeDateTime(e,t=!0){return t?new Date(Date.UTC(e.year,e.month-1,e.day,e.hour,e.minute)):new Date(e.year,e.month-1,e.day,e.hour,e.minute)}function validateNumber(e){return isFinite(Number(e))}function maxTimestamp(e,t=!1){const a=!0===t?getDayTimeIdentifier:getDayIdentifier;return e.reduce((e,t)=>{return Math.max(a(e),a(t))===a(e)?e:t})}function minTimestamp(e,t=!1){const a=!0===t?getDayTimeIdentifier:getDayIdentifier;return e.reduce((e,t)=>{return Math.min(a(e),a(t))===a(e)?e:t})}function isBetweenDates(e,t,a,n=!1){const r=getDayIdentifier(e)+(!0===n?getTimeIdentifier(e):0),o=getDayIdentifier(t)+(!0===n?getTimeIdentifier(t):0),d=getDayIdentifier(a)+(!0===n?getTimeIdentifier(a):0);return r>=o&&r<=d}function isOverlappingDates(e,t,a,n){const r=getDayIdentifier(e),o=getDayIdentifier(t),d=getDayIdentifier(a),i=getDayIdentifier(n);return r>=d&&r<=i||o>=d&&o<=i||d>=r&&o>=i}function addToDate(e,t){const a=copyTimestamp(e);return t.year&&(a.year+=t.year),t.month&&(a.month+=t.month),t.day&&(a.day+=t.day),t.hour&&(a.hour+=t.hour),t.minute&&(a.minute+=t.minute),updateFormatted(normalizeTimestamp(a))}function normalizeTimestamp(e){const t=new Date(e.year,e.month-1,e.day,e.hour,e.minute);return{...e,year:t.getFullYear(),month:t.getMonth()+1,day:t.getDate(),hour:t.getHours(),minute:t.getMinutes()}}function daysBetween(e,t){const a=diffTimestamp(e,t,!0);return Math.floor(a/TIME_CONSTANTS.MILLISECONDS_IN.DAY)}function weeksBetween(e,t){let a=copyTimestamp(e),n=copyTimestamp(t);return a=findWeekday(a,0),n=findWeekday(n,6),Math.ceil(daysBetween(a,n)/TIME_CONSTANTS.DAYS_IN.WEEK)}const weekdayDateMap={Sun:new Date("2020-01-05T00:00:00.000Z"),Mon:new Date("2020-01-06T00:00:00.000Z"),Tue:new Date("2020-01-07T00:00:00.000Z"),Wed:new Date("2020-01-08T00:00:00.000Z"),Thu:new Date("2020-01-09T00:00:00.000Z"),Fri:new Date("2020-01-10T00:00:00.000Z"),Sat:new Date("2020-01-11T00:00:00.000Z")};function getWeekdayFormatter(){const e=()=>"",r={long:{timeZone:"UTC",weekday:"long"},short:{timeZone:"UTC",weekday:"short"},narrow:{timeZone:"UTC",weekday:"narrow"}};return"undefined"===typeof Intl||"undefined"===typeof Intl.DateTimeFormat?e:t;function t(t,e,a){try{const n=new Intl.DateTimeFormat(a||void 0,r[e]||r["long"]);return n.format(weekdayDateMap[t])}catch(e){return e instanceof Error&&console.error(`Intl.DateTimeFormat: ${e.message} -> day of week: `+t),""}}}function getWeekdayNames(t,a){const e=Object.keys(weekdayDateMap),n=getWeekdayFormatter();return e.map(e=>String(n(e,t,a)))}function getMonthFormatter(){const e=()=>"",o={long:{timeZone:"UTC",month:"long"},short:{timeZone:"UTC",month:"short"},narrow:{timeZone:"UTC",month:"narrow"}};return"undefined"===typeof Intl||"undefined"===typeof Intl.DateTimeFormat?e:t;function t(t,e,a){try{const n=new Intl.DateTimeFormat(a||void 0,o[e]||o["long"]),r=new Date;return r.setDate(1),r.setMonth(t),n.format(r)}catch(e){return e instanceof Error&&console.error(`Intl.DateTimeFormat: ${e.message} -> month: `+t),""}}}function getMonthNames(t,a){const n=getMonthFormatter();return[...Array(12).keys()].map(e=>n(e,t,a))}function convertToUnit(e,t="px"){if(e)return isNaN(e)?String(e):"auto"===e?e:""+Number(e)+t}function indexOf(t,a){for(let e=0;e<t.length;e++)if(!0===a(t[e],e))return e;return-1}function minCharWidth(e,t){return 0===t?e:e.slice(0,t)}const toCamelCase=e=>e.replace(/(-\w)/g,e=>e[1].toUpperCase());function getMouseEventHandlers(t,e,a,n){const r={};for(const o in a){const d=a[o],i=toCamelCase("on-"+o);if(!e.value)return console.warn("$listeners has not been set up"),{};if(void 0!==e.value[i]){const u="on"+d.event.charAt(0).toUpperCase()+d.event.slice(1),s=e=>{return(void 0===d.button||"buttons"in e&&e.buttons>0&&e.button===d.button)&&(d.prevent&&e.preventDefault(),d.stop&&e.stopPropagation(),t(o,n(e,o))),d.result};u in r?Array.isArray(r[u])?r[u].push(s):r[u]=[r[u],s]:r[u]=s}}return r}function getDefaultMouseEventHandlers(e,t,a,n){return getMouseEventHandlers(e,t,getMouseEventName(a),n)}function getMouseEventName(e){return{["click"+e]:{event:"click"},["contextmenu"+e]:{event:"contextmenu",prevent:!0,result:!1},["mousedown"+e]:{event:"mousedown"},["mousemove"+e]:{event:"mousemove"},["mouseup"+e]:{event:"mouseup"},["mouseenter"+e]:{event:"mouseenter"},["mouseleave"+e]:{event:"mouseleave"},["touchstart"+e]:{event:"touchstart"},["touchmove"+e]:{event:"touchmove"},["touchend"+e]:{event:"touchend"}}}function getRawMouseEvents(e){return Object.keys(getMouseEventName(e))}function useMouseEvents(a,n){return{getMouseEventHandlers:(e,t)=>getMouseEventHandlers(a,n,e,t),getDefaultMouseEventHandlers:(e,t)=>getDefaultMouseEventHandlers(a,n,e,t),getMouseEventName:getMouseEventName,getRawMouseEvents:getRawMouseEvents}}const ResizeObserverDirective={mounted(e,t){if("function"===typeof t.value){const a=t.value,n={callback:a,size:{width:0,height:0},observer:new ResizeObserver(e=>{const t=e[0].contentRect;t.width===n.size.width&&t.height===n.size.height||(n.size.width=t.width,n.size.height=t.height,n.debounceTimeout&&clearTimeout(n.debounceTimeout),n.debounceTimeout=setTimeout(()=>{n.callback(n.size),n.debounceTimeout=void 0},100))})};n.observer.observe(e),e.__onResizeObserver=n}},beforeUnmount(e){if(e.__onResizeObserver){const{observer:t,debounceTimeout:a}=e.__onResizeObserver;a&&clearTimeout(a),t.unobserve(e),delete e.__onResizeObserver}}};function useCalendar(t,a,{scrollArea:e,pane:n}){if(!a){const l="[error: renderCalendar] no renderFunc has been supplied to useCalendar";throw console.error(l),new Error(l)}const r=vue.reactive({width:0,height:0}),o=vue.ref(null);function d({width:e,height:t}){r.width=e,r.height=t}const i=vue.computed(()=>{return!0!==t.noScroll&&e.value&&n.value&&r.height?e.value.offsetWidth-n.value.offsetWidth:0});function u(){}function s(){const e={ref:o,role:"complementary",lang:t.locale,class:`q-calendar ${t.dark?"q-calendar--dark":""} `+(t.bordered?"q-calendar__bordered":"")};return vue.withDirectives(vue.h("div",{...e},[a()]),[[ResizeObserverDirective,d]])}return{rootRef:o,scrollWidth:i,__initCalendar:u,__renderCalendar:s}}const isValidFocusType=e=>e.every(e=>["day","date","weekday","interval","time","resource","task"].includes(e)),useCommonProps={modelValue:{type:String,default:today(),validator:e=>""===e||validateTimestamp(e)},weekdays:{type:Array,default:()=>[0,1,2,3,4,5,6]},dateType:{type:String,default:"round",validator:e=>["round","rounded","square"].includes(e)},weekdayAlign:{type:String,default:"center",validator:e=>["left","center","right"].includes(e)},dateAlign:{type:String,default:"center",validator:e=>["left","center","right"].includes(e)},bordered:Boolean,dark:Boolean,noAria:Boolean,noActiveDate:Boolean,noHeader:Boolean,noScroll:Boolean,shortWeekdayLabel:Boolean,noDefaultHeaderText:Boolean,noDefaultHeaderBtn:Boolean,minWeekdayLabel:{type:[Number,String],default:1},weekdayBreakpoints:{type:Array,default:()=>[75,35],validator:e=>2===e.length},locale:{type:String,default:"en-US"},animated:Boolean,transitionPrev:{type:String,default:"slide-right"},transitionNext:{type:String,default:"slide-left"},disabledDays:Array,disabledBefore:String,disabledAfter:String,disabledWeekdays:{type:Array,default:()=>[]},dragEnterFunc:Function,dragOverFunc:Function,dragLeaveFunc:Function,dropFunc:Function,selectedDates:{type:[Array,Set],default:()=>[]},selectedStartEndDates:{type:Array,default:()=>[]},hoverable:Boolean,focusable:Boolean,focusType:{type:Array,default:()=>["date"],validator:isValidFocusType}};function useCommon(t,{startDate:e,endDate:a,times:n}){const r=vue.computed(()=>parseTimestamp(e.value)),o=vue.computed(()=>{return"0000-00-00"===a.value?getEndOfWeek(r.value,t.weekdays,n.today):parseTimestamp(a.value)||r.value}),d=vue.computed(()=>createNativeLocaleFormatter(t.locale,()=>({timeZone:"UTC",day:"numeric"}))),i=vue.computed(()=>createNativeLocaleFormatter(t.locale,(e,t)=>({timeZone:"UTC",weekday:t?"short":"long"}))),u=vue.computed(()=>createNativeLocaleFormatter(t.locale,()=>({timeZone:"UTC",dateStyle:"full"})));function s(e,t){return e&&e.length>0&&e.includes(t.date)}function l(e,t){const a={firstDay:!1,betweenDays:!1,lastDay:!1};if(2===e.length){const n=getDayIdentifier(t),r=getDayIdentifier(parsed(e[0])),o=getDayIdentifier(parsed(e[1]));a.firstDay=r===n,a.lastDay=o===n,a.betweenDays=r<n&&o>n}return a}function c(e,t=!1,a=[],n=[],r=!1){const o=s(a,e),{firstDay:d,lastDay:i,betweenDays:u}=l(n,e);return{"q-past-day":!d&&!u&&!i&&!o&&!t&&!!e.past,"q-future-day":!d&&!u&&!i&&!o&&!t&&!!e.future,"q-outside":t,"q-current-day":!!e.current,"q-selected":o,"q-range-first":d,"q-range":u,"q-range-last":i,"q-range-hover":r&&(d||i||u),"q-disabled-day disabled":!0===e.disabled}}function m(e){return getStartOfWeek(e,t.weekdays,n.today)}function p(e){return getEndOfWeek(e,t.weekdays,n.today)}function v(){return{}}return{parsedStart:r,parsedEnd:o,dayFormatter:d,weekdayFormatter:i,ariaDateFormatter:u,arrayHasDate:s,checkDays:l,getRelativeClasses:c,startOfWeek:m,endOfWeek:p,dayStyleDefault:v}}const useTaskProps={modelValue:{type:String,default:today(),validator:e=>""===e||validateTimestamp(e)},modelTasks:{type:Array,default:()=>[]},modelTitle:{type:Array,default:()=>[]},modelFooter:{type:Array,default:()=>[]},taskKey:{type:[String,Number],default:"id"},weekdays:{type:Array,default:()=>[0,1,2,3,4,5,6]},dateType:{type:String,default:"round",validator:e=>["round","rounded","square"].includes(e)},dateHeader:{type:String,default:"stacked",validator:e=>["stacked","inline","inverted"].includes(e)},weekdayAlign:{type:String,default:"center",validator:e=>["left","center","right"].includes(e)},dateAlign:{type:String,default:"center",validator:e=>["left","center","right"].includes(e)},dayHeight:{type:[Number,String],default:0,validator:validateNumber},dayMinHeight:{type:[Number,String],default:40,validator:validateNumber},weekdayStyle:{type:Function,default:null},weekdayClass:{type:Function,default:null},dayStyle:{type:Function,default:null},dayClass:{type:Function,default:null},footerDayClass:{type:Function,default:null},view:{type:String,validator:e=>["day","week","month"].includes(e)},viewCount:{type:Number,default:1,validator:e=>validateNumber(e)&&e>0},taskWidth:{type:Number,default:200,validator:e=>validateNumber(e)&&e>0}};function useTask(t,e,{times:a}){const n=vue.computed(()=>{if(!t.modelValue)throw new Error("QCalendarTask: no modelValue provided");if("day"===t.view)return parseTimestamp(t.modelValue);if("week"===t.view)return getStartOfWeek(parseTimestamp(t.modelValue),t.weekdays,a.today);if("month"===t.view)return getStartOfMonth(parseTimestamp(t.modelValue));throw new Error(`QCalendarTask: unknown 'view' type (${t.view})`)}),r=vue.computed(()=>{if(!t.modelValue)throw new Error("QCalendarTask: no modelValue provided");if("day"===t.view){if(1===t.viewCount)return n.value;let e=copyTimestamp(n.value);return e=addToDate(e,{day:t.viewCount-1}),e}if("week"===t.view){if(1===t.viewCount)return getEndOfWeek(parseTimestamp(t.modelValue),t.weekdays,a.today);{let e=copyTimestamp(n.value);return e=addToDate(e,{day:(t.viewCount-1)*TIME_CONSTANTS.DAYS_IN.WEEK}),getEndOfWeek(e,t.weekdays,a.today)}}if("month"!==t.view)throw new Error(`QCalendarTask: unknown 'view' type (${t.view})`);if(1===t.viewCount)return getEndOfMonth(parseTimestamp(t.modelValue));{let e=copyTimestamp(n.value);return e=addToDate(e,{month:t.viewCount}),getEndOfMonth(e)}}),o=vue.computed(()=>{return createDayList(n.value,r.value,a.today,t.weekdays,t.disabledBefore,t.disabledAfter,t.disabledWeekdays||[],t.disabledDays||[],Number.MAX_SAFE_INTEGER)});return{days:o,parsedStartDate:n,parsedEndDate:r}}const useTimesProps={now:{type:String,validator:e=>""===e||validateTimestamp(e),default:""}};function useTimes(e){const t=vue.reactive({now:parseTimestamp("0000-00-00 00:00"),today:parseTimestamp("0000-00-00")}),a=vue.computed(()=>e.now?parseTimestamp(e.now):o());function n(){t.now&&t.today&&(t.now.current=t.today.current=!0,t.now.past=t.today.past=!1,t.now.future=t.today.future=!1)}function r(){const e=a.value||o();d(e,t.now),i(e,t.now),d(e,t.today)}function o(){return parseDate(new Date)}function d(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)}function i(e,t){e.time!==t.time&&(t.hour=e.hour,t.minute=e.minute,t.time=e.time)}return vue.watch(a,()=>r()),{times:t,parsedNow:a,setCurrent:n,updateCurrent:r,getNow:o,updateDay:d,updateTime:i}}function useRenderValues(r,{parsedView:o,parsedValue:d,times:i}){const e=vue.computed(()=>{const e=d.value;let t=r.maxDays,a=e,n=e;switch(o.value){case"month":a=getStartOfMonth(e),n=getEndOfMonth(e),t=daysInMonth(a.year,a.month);break;case"week":case"week-agenda":case"week-scheduler":a=getStartOfWeek(e,r.weekdays,i.today),n=getEndOfWeek(a,r.weekdays,i.today),t=r.weekdays.length;break;case"day":case"scheduler":case"agenda":n=moveRelativeDays(copyTimestamp(n),nextDay,t>1?t-1:t,r.weekdays),n=updateFormatted(n);break;case"month-interval":case"month-scheduler":case"month-agenda":a=getStartOfMonth(e),n=getEndOfMonth(e),n=updateFormatted(n),t=daysInMonth(a.year,a.month);break;case"resource":t=1,n=moveRelativeDays(copyTimestamp(n),nextDay,t,r.weekdays),n=updateFormatted(n);break}return{start:a,end:n,maxDays:t}});return{renderValues:e}}const useMoveEmits=["moved"];function useMove(u,{parsedView:s,parsedValue:l,direction:c,maxDays:m,times:p,emittedValue:v,emit:y}){function e(a=1){if(0===a)v.value=today();else{let e=copyTimestamp(l.value);const n=getEndOfMonth(e),r=a>0,o=r?nextDay:prevDay,d=r?n.day:1;let t=r?a:-a;c.value=r?"next":"prev";const i=u.weekdays.length;while(--t>=0)switch(s.value){case"month":e.day=d,e=o(e),e=updateWeekday(e);while(!u.weekdays.includes(Number(e.weekday)))e=addToDate(e,{day:r?1:-1});break;case"week":case"week-agenda":case"week-scheduler":e=relativeDays(e,o,i,u.weekdays);break;case"day":case"scheduler":case"agenda":e=relativeDays(e,o,m.value,u.weekdays);break;case"month-interval":case"month-agenda":case"month-scheduler":e.day=d,e=o(e);break;case"resource":e=relativeDays(e,o,m.value,u.weekdays);break}e=updateWeekday(e),e=updateFormatted(e),e=updateDayOfYear(e),e=updateRelative(e,p.now),v.value=e.date,y("moved",e)}}return{move:e}}const listenerRE=/^on[A-Z]/;function useEmitListeners(e=vue.getCurrentInstance()){return{emitListeners:vue.computed(()=>{const t={};return e?.vnode?.props&&Object.keys(e.vnode.props).forEach(e=>{listenerRE.test(e)&&(t[e]=!0)}),t})}}function useFocusHelper(){const e={"aria-hidden":"true",class:"q-calendar__focus-helper"};return[vue.h("span",e)]}function useButton(){function e({focusable:e,focusType:t},a,n){const r=e&&t.includes("date");return vue.h("button",{...a,tabindex:r?0:-1},[n,r&&useFocusHelper()])}return{renderButton:e}}const useCheckChangeEmits=["change"];function useCheckChange(n,{days:r,lastStart:o,lastEnd:d}){function e(){const e=r.value;if(0===e.length)return!1;const t=e[0].date,a=e[e.length-1].date;return(!o.value||!d.value||t!==o.value||a!==d.value)&&(o.value=t,d.value=a,n("change",{start:t,end:a,days:e}),!0)}return{checkChange:e}}function useEventUtils(){function e(e,t){return(Array.isArray(t)?t:[t]).includes(e.keyCode)}return{isKeyCode:e}}const isKeyCode=useEventUtils().isKeyCode,useNavigationProps={useNavigation:Boolean};function useNavigation(t,{rootRef:a,focusRef:n,focusValue:r,datesRef:o,parsedView:d,emittedValue:i,direction:u,times:s}){let e=!1;function l(){e||document&&(e=!0,document.addEventListener("keyup",y),document.addEventListener("keydown",v))}function c(){document&&(document.removeEventListener("keyup",y),document.removeEventListener("keydown",v),e=!1)}function m(e){if(e&&document){const t=document.activeElement;if(t!==document.body&&a.value?.contains(t))return!0}return!1}function p(){let t=0;const a=window.setInterval(()=>{const e=o.value[n.value];e&&(e.focus(),50!==++t)&&document.activeElement!==e||window.clearInterval(a)},250)}function v(e){m(e)&&isKeyCode(e,[33,34,35,36,37,38,39,40])&&(e.stopPropagation(),e.preventDefault())}function y(e){if(m(e)&&isKeyCode(e,[33,34,35,36,37,38,39,40])){const t={33:k,34:D,35:_,36:w,37:g,38:f,39:T,40:h};t[e.keyCode]?.()}}function f(){let e=copyTimestamp(r.value);if("month"===d.value){if(e=addToDate(e,{day:-7}),r.value.month!==e.month)return u.value="prev",void(i.value=e.date)}else e=addToDate(e,{minute:Number(t.intervalMinutes)});u.value="prev",n.value=e.date}function h(){let e=copyTimestamp(r.value);if("month"===d.value){if(e=addToDate(e,{day:7}),r.value.month!==e.month)return u.value="next",void(i.value=e.date)}else e=addToDate(e,{minute:Number(t.intervalMinutes)});u.value="next",n.value=e.date}function g(){let e=copyTimestamp(r.value);u.value="prev";do{e=addToDate(e,{day:-1})}while(!t.weekdays.includes(Number(e.weekday)));n.value=e.date}function T(){let e=copyTimestamp(r.value);u.value="next";do{e=addToDate(e,{day:1})}while(!t.weekdays.includes(Number(e.weekday)));n.value=e.date}function k(){let e=copyTimestamp(r.value);e="month"===d.value?addToDate(e,{month:-1}):addToDate(e,{day:-7}),u.value="prev",n.value=e.date}function D(){let e=copyTimestamp(r.value);e="month"===d.value?addToDate(e,{month:1}):addToDate(e,{day:7}),u.value="next",n.value=e.date}function w(){let e=copyTimestamp(r.value);e="month"===d.value?getStartOfMonth(e):getStartOfWeek(e,t.weekdays||[],s.today);while(!t.weekdays.includes(Number(e.weekday)))e=addToDate(e,{day:-1});n.value=e.date}function _(){let e=copyTimestamp(r.value);e="month"===d.value?getEndOfMonth(e):getEndOfWeek(e,t.weekdays||[],s.today);while(!t.weekdays.includes(Number(e.weekday)))e=addToDate(e,{day:-1});n.value=e.date}return vue.onBeforeUnmount(()=>{c()}),vue.watch(()=>t.useNavigation,e=>{(!0===e?l:c)()}),!0===t.useNavigation&&l(),{startNavigation:l,endNavigation:c,tryFocus:p}}const useCellWidthProps={cellWidth:[Number,String]},renderButton=useButton().renderButton;var QCalendarTask=vue.defineComponent({name:"QCalendarTask",directives:{ResizeObserver:ResizeObserverDirective},props:{...useTimesProps,...useNavigationProps,...useCellWidthProps,...useCommonProps,...useTaskProps},emits:["update:model-value","update:model-tasks","update:model-title","update:model-footer","task-expanded",...useCheckChangeEmits,...useMoveEmits,...getRawMouseEvents("-date"),...getRawMouseEvents("-day"),...getRawMouseEvents("-head-day")],setup(c,{slots:m,emit:s,expose:q}){const e=vue.ref(null),R=vue.ref(null),o=vue.ref("next"),d=vue.ref(c.modelValue||today()),i=vue.ref("0000-00-00"),t=vue.ref(0),p=vue.ref(c.modelValue),v=vue.ref(c.modelValue||today()),a=vue.ref(parsed(c.modelValue||today())),y=vue.ref({}),u=vue.reactive({width:0,height:0}),f=vue.ref(""),h=vue.ref(""),H=vue.ref(null),U=vue.ref(null),n=(vue.watch(()=>c.view,()=>{t.value=0}),vue.computed(()=>{return"month"===c.view?"month-interval":c.view})),r=vue.getCurrentInstance();if(null===r)throw new Error("current instance is null");const l=useEmitListeners(r).emitListeners,{times:g,setCurrent:L,updateCurrent:T}=useTimes(c),{parsedStart:B,dayFormatter:Y,weekdayFormatter:V,ariaDateFormatter:P,dayStyleDefault:k,getRelativeClasses:D}=(T(),L(),useCommon(c,{startDate:d,endDate:i,times:g})),w=vue.computed(()=>{return parseTimestamp(c.modelValue,g.now)||B.value||g.today}),z=(a.value=w.value,v.value=w.value.date,useRenderValues(c,{parsedView:n,times:g,parsedValue:w})).renderValues,{rootRef:$,__renderCalendar:Z}=useCalendar(c,Se,{scrollArea:e,pane:R}),{days:_,parsedStartDate:b,parsedEndDate:x}=useTask(c,s,{times:g}),N=useMove(c,{parsedView:n,parsedValue:w,direction:o,maxDays:t,times:g,emittedValue:p,emit:s}).move,I=useMouseEvents(s,l).getDefaultMouseEventHandlers,K=useCheckChange(s,{days:_,lastStart:H,lastEnd:U}).checkChange,M=useEventUtils().isKeyCode,j=useNavigation(c,{rootRef:$,focusRef:v,focusValue:a,datesRef:y,parsedView:n,emittedValue:p,direction:o,times:g}).tryFocus,E=vue.ref(!0),S=vue.computed(()=>{return void 0!==c.cellWidth?parseInt(String(c.cellWidth),10):150}),A=vue.computed(()=>{return!0===c.focusable&&c.focusType.includes("day")}),Q=vue.computed(()=>{return!0===c.focusable&&c.focusType.includes("date")&&!0!==A.value}),C=vue.computed(()=>{return!0===c.focusable&&c.focusType.includes("weekday")}),X=vue.computed(()=>{return parseInt(String(c.dayHeight),10)}),G=vue.computed(()=>{return parseInt(String(c.dayMinHeight),10)});function J(){p.value=today()}function ee(e=1){N(e)}function te(e=1){N(-e)}function ae({width:e,height:t}){u.width=e,u.height=t}function F(e){return e.date===p.value}function ne(e,t,a){const n=m.day,r=c.dayStyle||k,o=!0!==c.noActiveDate&&w.value.date===e.date,d=t[c.taskKey],i={timestamp:e,task:t,taskIndex:a,activeDate:o,droppable:h.value===d},u=convertToUnit(S.value),s={width:u,minWidth:u,maxWidth:u,...r({scope:i})},l="function"===typeof c.dayClass?c.dayClass({scope:i}):{};return vue.h("div",{tabindex:!0===A.value?0:-1,class:{"q-calendar-task__task--day":!0,...l,...D(e),"q-active-date":!0===o,"q-calendar__hoverable":!0===c.hoverable,"q-calendar__focusable":!0===A.value},style:s,onFocus:()=>{A.value},...I("-day",e=>{return{scope:i,event:e}}),onDragenter:e=>{void 0!==c.dragEnterFunc&&"function"===typeof c.dragEnterFunc&&(!0===c.dragEnterFunc(e,"day",{scope:i})?h.value=d:h.value="")},onDragover:e=>{void 0!==c.dragOverFunc&&"function"===typeof c.dragOverFunc&&(!0===c.dragOverFunc(e,"day",{scope:i})?h.value=d:h.value="")},onDragleave:e=>{void 0!==c.dragLeaveFunc&&"function"===typeof c.dragLeaveFunc&&(!0===c.dragLeaveFunc(e,"day",{scope:i})?h.value=d:h.value="")},onDrop:e=>{void 0!==c.dropFunc&&"function"===typeof c.dropFunc&&(!0===c.dropFunc(e,"day",{scope:i})?h.value=d:h.value="")}},[n&&n({scope:i}),useFocusHelper()])}function re(t,a){return _.value.map(e=>ne(e,t,a))}function oe(e,t){const a=m.days,n={timestamps:_.value,days:_.value,task:e,taskIndex:t,cellWidth:S.value};return vue.h("div",{class:"q-calendar-task__task--days-row"},[re(e,t),a&&a({scope:n})])}function de(t,e,a=0,n=!0){const r=0===a?m.task:m.subtask,o={start:b.value,end:x.value,task:t,taskIndex:e,expanded:n},d=convertToUnit(c.taskWidth),i={width:d,minWidth:d,maxWidth:d},u=!0===c.focusable&&c.focusType.includes("task");return vue.h("div",{class:{"q-calendar-task__task--item":!0,"q-calendar__sticky":!0===E.value,"q-calendar__hoverable":!0===c.hoverable,"q-calendar__focusable":!0===u},style:i},[vue.h("div",{style:{flexDirection:"column",justifyContent:"center",alignItems:"center",width:10+10*a+"px"}},[vue.h("div",{class:{"q-calendar__parent":void 0!==t.children,"q-calendar__parent--expanded":void 0!==t.children&&!0===t.expanded,"q-calendar__parent--collapsed":void 0!==t.children&&!0!==t.expanded},onClick:e=>{e.stopPropagation(),t.expanded=!t.expanded,s("task-expanded",{expanded:t.expanded,scope:o})}})]),r&&r({scope:o}),useFocusHelper()])}function ie(e,t,a=0,n=!0){const r=void 0!==e.height?convertToUnit(parseInt(e.height,10)):X.value>0?convertToUnit(X.value):"auto",o=G.value>0?convertToUnit(G.value):void 0,d={height:r},i=(void 0!==o&&(d.minHeight=o),vue.h("div",{key:e[c.taskKey]+"-"+t,class:{"q-calendar-task__task":0===a,"q-calendar-task__task--section":0!==a},style:d},[de(e,t,a,n),oe(e,t)]));return void 0!==e.children?[i,vue.h("div",{class:{"q-calendar__child":!0,"q-calendar__child--expanded":!0===n,"q-calendar__child--collapsed":!0!==n}},[ue(e.children,a+1,!1===n?n:e.expanded)])]:[i]}function ue(e=void 0,a=0,n=!0){return void 0===e&&(e=c.modelTasks),e.map((e,t)=>{return ie(e,t,a,void 0!==e.children?e.expanded:n)}).flat()}function se(){return vue.h("div",{class:{"q-calendar-task__task--container":!0,"q-calendar__sticky":!0===E.value}},[ue()])}function le(e,t){const a=m["footer-task"],n={start:b.value,end:x.value,footer:e,index:t},r=convertToUnit(c.taskWidth),o={width:r,minWidth:r,maxWidth:r};return vue.h("div",{class:{"q-calendar-task__footer--task":!0,"q-calendar__sticky":!0===E.value},style:o},[a&&a({scope:n})])}function ce(e,t,a){const n=m["footer-day"],r={timestamp:e,footer:t,index:a},o=convertToUnit(S.value),d={width:o,minWidth:o,maxWidth:o},i="function"===typeof c.footerDayClass?c.footerDayClass({scope:r}):{};return vue.h("div",{class:{"q-calendar-task__footer--day":!0,...i,...D(e),"q-calendar__hoverable":!0===c.hoverable,"q-calendar__focusable":!0===A.value},style:d},[n&&n({scope:r})])}function me(t,a){return vue.h("div",{class:"q-calendar-task__footer--day-wrapper"},[_.value.map(e=>ce(e,t,a))])}function pe(){const a=!0===c.focusable&&c.focusType.includes("task");return c.modelFooter.map((e,t)=>{return vue.h("div",{class:{"q-calendar-task__footer--wrapper":!0,"q-calendar__hoverable":!0===c.hoverable,"q-calendar__focusable":!0===a}},{default:()=>[le(e,t),me(e,t)]})})}function ve(){return vue.h("div",{class:{"q-calendar-task__footer":!0,"q-calendar__sticky":!0===E.value}},pe())}function ye(){return vue.h("div",{class:{"q-calendar-task__container":!0}},[!0!==c.noHeader&&Ie(),se(),ve()])}function fe(){const e=m["head-tasks"],t={start:b.value,end:x.value},a=convertToUnit(parseInt(String(c.taskWidth),10)),n={width:a,minWidth:a,maxWidth:a};return vue.h("div",{class:{"q-calendar-task__head--tasks":!0,"q-calendar__sticky":!0===E.value},style:n},[e&&e({scope:t})])}function he(e,t){const a=m["title-task"],n=convertToUnit(parseInt(String(c.taskWidth),10)),r={width:n,minWidth:n,maxWidth:n},o={start:b.value,end:x.value,cellWidth:n,title:e,index:t};return vue.h("div",{class:{"q-calendar-task__title--task":!0,"q-calendar__sticky":!0===E.value},style:r},[a&&a({scope:o})])}function O(e){const t=m["head-weekday-label"],a=!0!==c.noActiveDate&&F(e),n={activeDate:a,timestamp:e,disabled:!!c.disabledWeekdays&&c.disabledWeekdays.includes(Number(e.weekday))},r={class:{"q-calendar-task__head--weekday":!0,["q-calendar__"+c.weekdayAlign]:!0,"q-calendar__ellipsis":!0}};return vue.h("div",r,t&&t({scope:n})||ge(e,c.shortWeekdayLabel))}function ge(e,t){const a=V.value(e,t||c.weekdayBreakpoints[0]>0&&S.value<=c.weekdayBreakpoints[0]);return vue.h("span",{class:"q-calendar__ellipsis"},c.weekdayBreakpoints[1]>0&&S.value<=c.weekdayBreakpoints[1]?minCharWidth(a,Number(c.minWeekdayLabel)):a)}function W(e){const t={class:{"q-calendar-task__head--date":!0,["q-calendar__"+c.dateAlign]:!0}};return vue.h("div",t,Te(e))}function Te(a){const e=!0!==c.noActiveDate&&F(a),t=Y.value(a,!1),n=m["head-day-label"],r=m["head-day-button"],o={dayLabel:t,timestamp:a,activeDate:e},d=a.date,i={key:d,tabindex:!0===Q.value?0:-1,class:{"q-calendar-task__head--day__label":!0,"q-calendar__button":!0,"q-calendar__button--round":"round"===c.dateType,"q-calendar__button--rounded":"rounded"===c.dateType,"q-calendar__button--bordered":!0===a.current,"q-calendar__hoverable":!0===c.hoverable,"q-calendar__focusable":!0===Q.value},disabled:a.disabled,onKeydown:e=>{!0!==a.disabled&&M(e,[13,32])&&(e.stopPropagation(),e.preventDefault())},onKeyup:e=>{!0!==a.disabled&&M(e,[13,32])&&(p.value=a.date,void 0!==l.value.onClickDate)&&s("click-date",{scope:o})},...I("-date",(e,t)=>{return"click-date"!==t&&"contextmenu-date"!==t||(p.value=a.date,"click-date"===t&&e.preventDefault()),{scope:o,event:e}})};return!0!==c.noAria&&(i.ariaLabel=P.value(a,!1)),r?r({scope:o}):renderButton(c,i,n?n({scope:o}):t)}function ke(e){return"stacked"===c.dateHeader?[!0!==c.noDefaultHeaderText&&O(e),!0!==c.noDefaultHeaderBtn&&W(e)].filter(e=>!1!==e):"inline"===c.dateHeader?("left"===c.weekdayAlign&&"right"===c.dateAlign||"right"===c.weekdayAlign&&c.dateAlign,vue.h("div",{class:"q-calendar__header--inline"},[!0!==c.noDefaultHeaderText&&O(e),!0!==c.noDefaultHeaderBtn&&W(e)])):"inverted"===c.dateHeader?("left"===c.weekdayAlign&&"right"===c.dateAlign||"right"===c.weekdayAlign&&c.dateAlign,vue.h("div",{class:"q-calendar__header--inline"},[!0!==c.noDefaultHeaderBtn&&W(e),!0!==c.noDefaultHeaderText&&O(e)])):void 0}function De(e,t,a){const n=m["title-day"],r=convertToUnit(S.value),o={width:r,minWidth:r,maxWidth:r},d={timestamp:e,title:t,index:a,cellWidth:S.value},i="function"===typeof c.dayClass?c.dayClass({scope:d}):{},u=!0===c.focusable&&c.focusType.includes("day");return vue.h("div",{class:{"q-calendar-task__title--day":!0,...i,...D(e),"q-calendar__hoverable":!0===c.hoverable,"q-calendar__focusable":!0===u},style:o},[n&&n({scope:d}),useFocusHelper()])}function we(t){const e=m["head-day"],a=m["head-date"],n=!0!==c.noActiveDate&&F(t),r={timestamp:t,activeDate:n,droppable:f.value=t.date,disabled:!!c.disabledWeekdays&&c.disabledWeekdays.includes(Number(t.weekday))},o=c.weekdayStyle||k,d="function"===typeof c.weekdayClass?c.weekdayClass({scope:r}):{},i=convertToUnit(S.value),u={width:i,minWidth:i,maxWidth:i,...o({scope:r})},s=t.date,l={key:s,ref:e=>{y.value[s]=e},tabindex:!0===C.value?0:-1,class:{"q-calendar-task__head--day":!0,...d,...D(t),"q-active-date":n,"q-calendar__hoverable":!0===c.hoverable,"q-calendar__focusable":!0===C.value},style:u,onFocus:()=>{!0===C.value&&(v.value=s)},onKeydown:e=>{!0!==t.disabled&&M(e,[13,32])&&(e.stopPropagation(),e.preventDefault())},onKeyup:e=>{!0!==t.disabled&&M(e,[13,32])&&(p.value=t.date)},...I("-head-day",e=>{return{scope:r,event:e}}),onDragenter:e=>{void 0!==c.dragEnterFunc&&"function"===typeof c.dragEnterFunc&&(!0===c.dragEnterFunc(e,"head-day",{scope:r})?f.value=t.date:f.value="")},onDragover:e=>{void 0!==c.dragOverFunc&&"function"===typeof c.dragOverFunc&&(!0===c.dragOverFunc(e,"head-day",{scope:r})?f.value=t.date:f.value="")},onDragleave:e=>{void 0!==c.dragLeaveFunc&&"function"===typeof c.dragLeaveFunc&&(!0===c.dragLeaveFunc(e,"head-day",{scope:r})?f.value=t.date:f.value="")},onDrop:e=>{void 0!==c.dropFunc&&"function"===typeof c.dropFunc&&(!0===c.dropFunc(e,"head-day",{scope:r})?f.value=t.date:f.value="")}};return vue.h("div",l,[void 0!==e&&e({scope:r}),void 0===e&&ke(t),void 0===e&&a&&a({scope:r}),useFocusHelper()])}function _e(){return _.value.map(e=>we(e))}function be(t,a){return _.value.map(e=>De(e,t,a))}function xe(){return vue.h("div",{class:{"q-calendar-task__head--days":!0}},[..._e()])}function Ne(e,t){return vue.h("div",{class:{"q-calendar-task__title--days":!0}},[...be(e,t)])}function Ie(){return vue.h("div",{roll:"presentation",class:{"q-calendar-task__head":!0,"q-calendar__sticky":!0===E.value},style:{}},[vue.h("div",{style:{position:"relative",display:"flex"}},[fe(),xe()]),c.modelTitle.map((e,t)=>vue.h("div",{class:"q-calendar-task__title",style:{position:"relative",display:"flex"}},[he(e,t),Ne(e,t)]))])}function Me(){return vue.h("div",{class:"q-calendar-task__body"},[Ee()])}function Ee(){return vue.h("div",{ref:e,class:{"q-calendar-task__scroll-area":!0,"q-calendar__scroll":!0}},[ye()])}function Se(){const{start:e,end:t}=z.value,a=(d.value=e.date,i.value=t.date,u.width>0),n=vue.withDirectives(vue.h("div",{key:d.value,class:"q-calendar-task"},[!0===a&&Me()]),[[ResizeObserverDirective,ae]]);if(!0!==c.animated)return n;{const r="q-calendar--"+("prev"===o.value?c.transitionPrev:c.transitionNext);return vue.h(vue.Transition,{name:r,appear:!0},()=>n)}}return vue.watch([_],K,{deep:!0,immediate:!0}),vue.watch(()=>c.modelValue,(e,t)=>{if(p.value!==e){if(!0===c.animated){const a=getDayIdentifier(parsed(e)),n=getDayIdentifier(parsed(t));o.value=a>=n?"next":"prev"}p.value=e}v.value=e}),vue.watch(p,(e,t)=>{if(p.value!==c.modelValue){if(!0===c.animated){const a=getDayIdentifier(parsed(e)),n=getDayIdentifier(parsed(t));o.value=a>=n?"next":"prev"}s("update:model-value",e)}}),vue.watch(v,e=>{e&&(a.value=parseTimestamp(e))}),vue.watch(a,()=>{y.value[v.value]?y.value[v.value].focus():j()}),vue.onBeforeUpdate(()=>{y.value={}}),vue.onMounted(()=>{}),q({prev:te,next:ee,move:N,moveToToday:J,updateCurrent:T}),()=>Z()}});const version="4.1.0";exports.DAYS_IN_MONTH=DAYS_IN_MONTH,exports.DAYS_IN_MONTH_LEAP=DAYS_IN_MONTH_LEAP,exports.DAYS_IN_MONTH_MAX=DAYS_IN_MONTH_MAX,exports.DAYS_IN_MONTH_MIN=DAYS_IN_MONTH_MIN,exports.DAY_MIN=DAY_MIN,exports.FIRST_HOUR=FIRST_HOUR,exports.MONTH_MAX=MONTH_MAX,exports.MONTH_MIN=MONTH_MIN,exports.PARSE_DATE=PARSE_DATE,exports.PARSE_DATETIME=PARSE_DATETIME,exports.PARSE_TIME=PARSE_TIME,exports.QCalendarTask=QCalendarTask,exports.TIME_CONSTANTS=TIME_CONSTANTS,exports.addToDate=addToDate,exports.compareDate=compareDate,exports.compareDateTime=compareDateTime,exports.compareTime=compareTime,exports.compareTimestamps=compareTimestamps,exports.convertToUnit=convertToUnit,exports.copyTimestamp=copyTimestamp,exports.createDayList=createDayList,exports.createIntervalList=createIntervalList,exports.createNativeLocaleFormatter=createNativeLocaleFormatter,exports.daysBetween=daysBetween,exports.daysInMonth=daysInMonth,exports.diffTimestamp=diffTimestamp,exports.findWeekday=findWeekday,exports.getDate=getDate,exports.getDateTime=getDateTime,exports.getDayIdentifier=getDayIdentifier,exports.getDayOfYear=getDayOfYear,exports.getDayTimeIdentifier=getDayTimeIdentifier,exports.getEndOfMonth=getEndOfMonth,exports.getEndOfWeek=getEndOfWeek,exports.getMonthFormatter=getMonthFormatter,exports.getMonthNames=getMonthNames,exports.getStartOfMonth=getStartOfMonth,exports.getStartOfWeek=getStartOfWeek,exports.getTime=getTime,exports.getTimeIdentifier=getTimeIdentifier,exports.getWeekday=getWeekday,exports.getWeekdayFormatter=getWeekdayFormatter,exports.getWeekdayNames=getWeekdayNames,exports.getWorkWeek=getWorkWeek,exports.indexOf=indexOf,exports.isBetweenDates=isBetweenDates,exports.isLeapYear=isLeapYear,exports.isOverlappingDates=isOverlappingDates,exports.isToday=isToday,exports.makeDate=makeDate,exports.makeDateTime=makeDateTime,exports.maxTimestamp=maxTimestamp,exports.minCharWidth=minCharWidth,exports.minTimestamp=minTimestamp,exports.moveRelativeDays=moveRelativeDays,exports.nextDay=nextDay,exports.padNumber=padNumber,exports.parseDate=parseDate,exports.parseTime=parseTime,exports.parseTimestamp=parseTimestamp,exports.parsed=parsed,exports.prevDay=prevDay,exports.relativeDays=relativeDays,exports.today=today,exports.updateDayOfYear=updateDayOfYear,exports.updateDisabled=updateDisabled,exports.updateFormatted=updateFormatted,exports.updateMinutes=updateMinutes,exports.updateRelative=updateRelative,exports.updateWeekday=updateWeekday,exports.updateWorkWeek=updateWorkWeek,exports.validateNumber=validateNumber,exports.validateTimestamp=validateTimestamp,exports.version=version,exports.weeksBetween=weeksBetween; | ||
var vue=require("vue");const PARSE_DATETIME=/^(\d{4})-(\d{1,2})(-(\d{1,2}))?([^\d]+(\d{1,2}))?(:(\d{1,2}))?(:(\d{1,2}))?(.(\d{1,3}))?$/,PARSE_DATE=/^(\d{4})-(\d{1,2})(-(\d{1,2}))?/,PARSE_TIME=/(\d\d?)(:(\d\d?)|)(:(\d\d?)|)/,DAYS_IN_MONTH=[0,31,28,31,30,31,30,31,31,30,31,30,31],DAYS_IN_MONTH_LEAP=[0,31,29,31,30,31,30,31,31,30,31,30,31],TIME_CONSTANTS={MILLISECONDS_IN:{DAY:864e5},MINUTES_IN:{HOUR:60},DAYS_IN:{WEEK:7}},DAYS_IN_MONTH_MIN=28,DAYS_IN_MONTH_MAX=31,MONTH_MAX=12,MONTH_MIN=1,DAY_MIN=1,FIRST_HOUR=0;function validateTimestamp(e){return"string"===typeof e&&PARSE_DATETIME.test(e)}function parsed(e){if("string"!==typeof e)return null;const t=PARSE_DATETIME.exec(e);if(!t||!t[1]||!t[2])return null;const a=parseInt(t[1],10),n=parseInt(t[2],10),r=parseInt(t[4]||"1",10),o=parseInt(t[6]||"0",10),d=parseInt(t[8]||"0",10);return{date:e,time:o.toString().padStart(2,"0")+":"+d.toString().padStart(2,"0"),year:a,month:n,day:r,hour:o,minute:d,hasDay:!!t[4],hasTime:!0,past:!1,current:!1,future:!1,disabled:!1,weekday:0,doy:0,workweek:0}}function parseDate(e,t=!1){if(!(e instanceof Date))return null;const a=t?"UTC":"";return updateFormatted({date:padNumber(e[`get${a}FullYear`](),4)+"-"+padNumber(e[`get${a}Month`]()+1,2)+"-"+padNumber(e[`get${a}Date`](),2),time:padNumber(e[`get${a}Hours`]()||0,2)+":"+padNumber(e[`get${a}Minutes`]()||0,2),year:e[`get${a}FullYear`](),month:e[`get${a}Month`]()+1,day:e[`get${a}Date`](),hour:e[`get${a}Hours`](),minute:e[`get${a}Minutes`](),weekday:0,doy:0,workweek:0,hasDay:!0,hasTime:!0,past:!1,current:!1,future:!1,disabled:!1})}function padNumber(e,t){let a=String(e);while(a.length<t)a="0"+a;return a}function isLeapYear(e){return e%4===0&&e%100!==0||e%400===0}function daysInMonth(e,t){return(isLeapYear(e)?DAYS_IN_MONTH_LEAP:DAYS_IN_MONTH)[t]}function nextDay(e){const t=new Date(e.year,e.month-1,e.day+1);return updateFormatted(normalizeTimestamp({...e,year:t.getFullYear(),month:t.getMonth()+1,day:t.getDate()}))}function prevDay(e){const t=new Date(e.year,e.month-1,e.day-1);return updateFormatted(normalizeTimestamp({...e,year:t.getFullYear(),month:t.getMonth()+1,day:t.getDate()}))}function today(){const e=new Date,t=e.getMonth()+1,a=e.getDate(),n=e.getFullYear();return[n,padNumber(t,2),padNumber(a,2)].join("-")}function isToday(e){return e===today()}function getStartOfWeek(e,t,a){let n=copyTimestamp(e);if(t){if(1===n.day||0===n.weekday)while(!t.includes(Number(n.weekday)))n=nextDay(n);n=findWeekday(n,t[0],prevDay),n=updateFormatted(n),a&&(n=updateRelative(n,a,n.hasTime))}return n}function getEndOfWeek(e,t,a){let n=copyTimestamp(e);if(t&&Array.isArray(t)){const r=daysInMonth(n.year,n.month);if(r===n.day||n.weekday===t[t.length-1])while(!t.includes(Number(n.weekday)))n=prevDay(n);n=findWeekday(n,t[t.length-1],nextDay),n=updateFormatted(n),a&&(n=updateRelative(n,a,n.hasTime))}return n}function getStartOfMonth(e){let t=copyTimestamp(e);return t.day=DAY_MIN,t=updateFormatted(t),t}function getEndOfMonth(e){let t=copyTimestamp(e);return t.day=daysInMonth(t.year,t.month),t=updateFormatted(t),t}function parseTime(e){const t=Object.prototype.toString.call(e);switch(t){case"[object Number]":return e;case"[object String]":{const a=PARSE_TIME.exec(e);return a?60*parseInt(a[1],10)+parseInt(a[3]||"0",10):!1}case"[object Object]":return"object"!==typeof e||"number"!==typeof e.hour||"number"!==typeof e.minute?!1:"object"===typeof e&&"hour"in e&&"minute"in e&&60*e.hour+e.minute}return!1}function compareTimestamps(e,t){return!(!e||!t)&&e.year===t.year&&e.month===t.month&&e.day===t.day&&e.hour===t.hour&&e.minute===t.minute}function compareDate(e,t){return getDate(e)===getDate(t)}function compareTime(e,t){return getTime(e)===getTime(t)}function compareDateTime(e,t){return getDateTime(e)===getDateTime(t)}function parseTimestamp(e,t=null){let a=parsed(e);return a?(a=updateFormatted(a),t&&(a=updateRelative(a,t,a.hasTime)),a):null}function getDayIdentifier(e){return 1e8*(e.year??0)+1e6*(e.month??0)+1e4*(e.day??0)}function getTimeIdentifier(e){return 100*(e.hour??0)+(e.minute??0)}function getDayTimeIdentifier(e){return getDayIdentifier(e)+getTimeIdentifier(e)}function diffTimestamp(e,t,a=!1){const n=Date.UTC(e.year??0,(e.month??1)-1,e.day??1,e.hour??0,e.minute??0),r=Date.UTC(t.year??0,(t.month??1)-1,t.day??1,t.hour??0,t.minute??0);return!0===a&&r<n?0:r-n}function updateRelative(e,t,a=!1){let n=copyTimestamp(e),r=getDayIdentifier(t),o=getDayIdentifier(n),d=r===o;return n.hasTime&&a&&d&&(r=getTimeIdentifier(t),o=getTimeIdentifier(n),d=r===o),n.past=o<r,n.current=d,n.future=o>r,n.currentWeekday=n.weekday===t.weekday,n}function updateMinutes(e,t,a=null){let n=copyTimestamp(e);return n.hasTime=!0,n.hour=Math.floor(t/TIME_CONSTANTS.MINUTES_IN.HOUR),n.minute=t%TIME_CONSTANTS.MINUTES_IN.HOUR,n.time=getTime(n),a&&(n=updateRelative(n,a,!0)),n}function updateWeekday(e){let t=copyTimestamp(e);return t.weekday=getWeekday(t),t}function updateDayOfYear(e){let t=copyTimestamp(e);return t.doy=getDayOfYear(t)||0,t}function updateWorkWeek(e){let t=copyTimestamp(e);return t.workweek=getWorkWeek(t),t}function updateDisabled(e,t,a,n,r){let o=copyTimestamp(e);const d=getDayIdentifier(o);if(void 0!==t){const l=parsed(t);if(l){const c=getDayIdentifier(l);d<=c&&(o.disabled=!0)}}if(!0!==o.disabled&&void 0!==a){const m=parsed(a);if(m){const p=getDayIdentifier(m);d>=p&&(o.disabled=!0)}}if(!0!==o.disabled&&Array.isArray(n)&&n.length>0)for(var i in n)if(n[i]===o.weekday){o.disabled=!0;break}if(!0!==o.disabled&&Array.isArray(r)&&r.length>0)for(var u in r)if(Array.isArray(r[u])&&2===r[u].length&&r[u][0]&&r[u][1]){const v=parsed(r[u][0]),y=parsed(r[u][1]);if(v&&y&&isBetweenDates(o,v,y)){o.disabled=!0;break}}else{const f=r[u];if(Array.isArray(f))for(var s of f){const h=parseTimestamp(s);if(h){const g=getDayIdentifier(h);if(g===d){o.disabled=!0;break}}}else if(f){const T=parseTimestamp(f);if(T){const k=getDayIdentifier(T);k===d&&(o.disabled=!0)}}}return o}function updateFormatted(e){let t=copyTimestamp(e);return t.hasTime=!0,t.time=getTime(t),t.date=getDate(t),t.weekday=getWeekday(t),t.doy=getDayOfYear(t)||0,t.workweek=getWorkWeek(t),t}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){let t=copyTimestamp(e);if(0===t.year){const r=parseTimestamp(today());r&&(t=r)}const a=new Date(Date.UTC(t.year,t.month-1,t.day)),n=4;a.setUTCDate(a.getUTCDate()-(a.getUTCDay()+6)%7+n),a.setUTCDate(a.getUTCDate()+n-(a.getUTCDay()||7));e=new Date(Date.UTC(a.getUTCFullYear(),0,1)),e=Math.ceil(((a.valueOf()-e.valueOf())/864e5+1)/7);return e}function getWeekday(e){let t=e.weekday;if(e.hasDay){const a=Math.floor,n=e.day,r=(e.month+9)%MONTH_MAX+1,o=a(e.year/100),d=e.year%100-(e.month<=2?1:0);t=((n+a(2.6*r-.2)-2*o+d+a(d/4)+a(o/4))%7+7)%7}return t??0}function copyTimestamp(e){return{...e}}function getDate(e){let 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):"00:00")}function moveRelativeDays(e,t=nextDay,a=1,n=[0,1,2,3,4,5,6]){const r=copyTimestamp(e);return relativeDays(r,t,a,n)}function relativeDays(e,t=nextDay,a=1,n=[0,1,2,3,4,5,6]){let r=copyTimestamp(e);n.includes(Number(r.weekday))||0!==r.weekday||t!==nextDay||++a;while(--a>=0)r=t(r),n.length<7&&!n.includes(Number(r.weekday))&&++a;return r}function findWeekday(e,t,a=nextDay,n=6){let r=copyTimestamp(e);while(r.weekday!==t&&--n>=0)r=a(r);return r}function createDayList(e,t,a,n=[0,1,2,3,4,5,6],r=void 0,o=void 0,d=[],i=[],u=42,s=0){const l=getDayIdentifier(e),c=getDayIdentifier(t),m=[];let p=copyTimestamp(e),v=0,y=v===c;if(!(c<l))while((!y||m.length<s)&&m.length<u){if(v=getDayIdentifier(p),y=y||v>c&&m.length>=s,y)break;if(n.includes(Number(p.weekday))){let e=copyTimestamp(p);e=updateFormatted(e),e=updateRelative(e,a),e=updateDisabled(e,r,o,d,i),m.push(e)}p=relativeDays(p,nextDay)}return m}function createIntervalList(t,a,n,r,o){const d=[];for(let e=0;e<r;++e){const i=(a+e)*n,u=copyTimestamp(t);d.push(updateMinutes(u,i,o))}return d}function createNativeLocaleFormatter(n,r){const e=()=>"";return"undefined"===typeof Intl||"undefined"===typeof Intl.DateTimeFormat?e:(t,e)=>{try{const a=new Intl.DateTimeFormat(n||void 0,r(t,e));return a.format(makeDateTime(t))}catch(e){return console.error(`Intl.DateTimeFormat: ${e.message} -> `+getDateTime(t)),""}}}function makeDate(e,t=!0){return t?new Date(Date.UTC(e.year,e.month-1,e.day,0,0)):new Date(e.year,e.month-1,e.day,0,0)}function makeDateTime(e,t=!0){return t?new Date(Date.UTC(e.year,e.month-1,e.day,e.hour,e.minute)):new Date(e.year,e.month-1,e.day,e.hour,e.minute)}function validateNumber(e){return isFinite(Number(e))}function maxTimestamp(e,t=!1){const a=!0===t?getDayTimeIdentifier:getDayIdentifier;return e.reduce((e,t)=>{return Math.max(a(e),a(t))===a(e)?e:t})}function minTimestamp(e,t=!1){const a=!0===t?getDayTimeIdentifier:getDayIdentifier;return e.reduce((e,t)=>{return Math.min(a(e),a(t))===a(e)?e:t})}function isBetweenDates(e,t,a,n=!1){const r=getDayIdentifier(e)+(!0===n?getTimeIdentifier(e):0),o=getDayIdentifier(t)+(!0===n?getTimeIdentifier(t):0),d=getDayIdentifier(a)+(!0===n?getTimeIdentifier(a):0);return r>=o&&r<=d}function isOverlappingDates(e,t,a,n){const r=getDayIdentifier(e),o=getDayIdentifier(t),d=getDayIdentifier(a),i=getDayIdentifier(n);return r>=d&&r<=i||o>=d&&o<=i||d>=r&&o>=i}function addToDate(e,t){const a=copyTimestamp(e);return t.year&&(a.year+=t.year),t.month&&(a.month+=t.month),t.day&&(a.day+=t.day),t.hour&&(a.hour+=t.hour),t.minute&&(a.minute+=t.minute),updateFormatted(normalizeTimestamp(a))}function normalizeTimestamp(e){const t=new Date(e.year,e.month-1,e.day,e.hour,e.minute);return{...e,year:t.getFullYear(),month:t.getMonth()+1,day:t.getDate(),hour:t.getHours(),minute:t.getMinutes()}}function daysBetween(e,t){const a=diffTimestamp(e,t,!0);return Math.floor(a/TIME_CONSTANTS.MILLISECONDS_IN.DAY)}function weeksBetween(e,t){let a=copyTimestamp(e),n=copyTimestamp(t);return a=findWeekday(a,0),n=findWeekday(n,6),Math.ceil(daysBetween(a,n)/TIME_CONSTANTS.DAYS_IN.WEEK)}const weekdayDateMap={Sun:new Date("2020-01-05T00:00:00.000Z"),Mon:new Date("2020-01-06T00:00:00.000Z"),Tue:new Date("2020-01-07T00:00:00.000Z"),Wed:new Date("2020-01-08T00:00:00.000Z"),Thu:new Date("2020-01-09T00:00:00.000Z"),Fri:new Date("2020-01-10T00:00:00.000Z"),Sat:new Date("2020-01-11T00:00:00.000Z")};function getWeekdayFormatter(){const e=()=>"",r={long:{timeZone:"UTC",weekday:"long"},short:{timeZone:"UTC",weekday:"short"},narrow:{timeZone:"UTC",weekday:"narrow"}};return"undefined"===typeof Intl||"undefined"===typeof Intl.DateTimeFormat?e:t;function t(t,e,a){try{const n=new Intl.DateTimeFormat(a||void 0,r[e]||r["long"]);return n.format(weekdayDateMap[t])}catch(e){return e instanceof Error&&console.error(`Intl.DateTimeFormat: ${e.message} -> day of week: `+t),""}}}function getWeekdayNames(t,a){const e=Object.keys(weekdayDateMap),n=getWeekdayFormatter();return e.map(e=>String(n(e,t,a)))}function getMonthFormatter(){const e=()=>"",o={long:{timeZone:"UTC",month:"long"},short:{timeZone:"UTC",month:"short"},narrow:{timeZone:"UTC",month:"narrow"}};return"undefined"===typeof Intl||"undefined"===typeof Intl.DateTimeFormat?e:t;function t(t,e,a){try{const n=new Intl.DateTimeFormat(a||void 0,o[e]||o["long"]),r=new Date;return r.setDate(1),r.setMonth(t),n.format(r)}catch(e){return e instanceof Error&&console.error(`Intl.DateTimeFormat: ${e.message} -> month: `+t),""}}}function getMonthNames(t,a){const n=getMonthFormatter();return[...Array(12).keys()].map(e=>n(e,t,a))}function convertToUnit(e,t="px"){if(e)return isNaN(e)?String(e):"auto"===e?e:""+Number(e)+t}function indexOf(t,a){for(let e=0;e<t.length;e++)if(!0===a(t[e],e))return e;return-1}function minCharWidth(e,t){return 0===t?e:e.slice(0,t)}const toCamelCase=e=>e.replace(/(-\w)/g,e=>e[1].toUpperCase());function getMouseEventHandlers(t,e,a,n){const r={};for(const o in a){const d=a[o],i=toCamelCase("on-"+o);if(!e.value)return console.warn("$listeners has not been set up"),{};if(void 0!==e.value[i]){const u="on"+d.event.charAt(0).toUpperCase()+d.event.slice(1),s=e=>{return(void 0===d.button||"buttons"in e&&e.buttons>0&&e.button===d.button)&&(d.prevent&&e.preventDefault(),d.stop&&e.stopPropagation(),t(o,n(e,o))),d.result};u in r?Array.isArray(r[u])?r[u].push(s):r[u]=[r[u],s]:r[u]=s}}return r}function getDefaultMouseEventHandlers(e,t,a,n){return getMouseEventHandlers(e,t,getMouseEventName(a),n)}function getMouseEventName(e){return{["click"+e]:{event:"click"},["contextmenu"+e]:{event:"contextmenu",prevent:!0,result:!1},["mousedown"+e]:{event:"mousedown"},["mousemove"+e]:{event:"mousemove"},["mouseup"+e]:{event:"mouseup"},["mouseenter"+e]:{event:"mouseenter"},["mouseleave"+e]:{event:"mouseleave"},["touchstart"+e]:{event:"touchstart"},["touchmove"+e]:{event:"touchmove"},["touchend"+e]:{event:"touchend"}}}function getRawMouseEvents(e){return Object.keys(getMouseEventName(e))}function useMouseEvents(a,n){return{getMouseEventHandlers:(e,t)=>getMouseEventHandlers(a,n,e,t),getDefaultMouseEventHandlers:(e,t)=>getDefaultMouseEventHandlers(a,n,e,t),getMouseEventName:getMouseEventName,getRawMouseEvents:getRawMouseEvents}}const ResizeObserverDirective={mounted(e,t){if("function"===typeof t.value){const a=t.value,n={callback:a,size:{width:0,height:0},observer:new ResizeObserver(e=>{const t=e[0].contentRect;t.width===n.size.width&&t.height===n.size.height||(n.size.width=t.width,n.size.height=t.height,n.debounceTimeout&&clearTimeout(n.debounceTimeout),n.debounceTimeout=setTimeout(()=>{n.callback(n.size),n.debounceTimeout=void 0},100))})};n.observer.observe(e),e.__onResizeObserver=n}},beforeUnmount(e){if(e.__onResizeObserver){const{observer:t,debounceTimeout:a}=e.__onResizeObserver;a&&clearTimeout(a),t.unobserve(e),delete e.__onResizeObserver}}};function useCalendar(t,a,{scrollArea:e,pane:n}){if(!a){const l="[error: renderCalendar] no renderFunc has been supplied to useCalendar";throw console.error(l),new Error(l)}const r=vue.reactive({width:0,height:0}),o=vue.ref(null);function d({width:e,height:t}){r.width=e,r.height=t}const i=vue.computed(()=>{return!0!==t.noScroll&&e.value&&n.value&&r.height?e.value.offsetWidth-n.value.offsetWidth:0});function u(){}function s(){const e={ref:o,role:"complementary",lang:t.locale,class:`q-calendar ${t.dark?"q-calendar--dark":""} `+(t.bordered?"q-calendar__bordered":"")};return vue.withDirectives(vue.h("div",{...e},[a()]),[[ResizeObserverDirective,d]])}return{rootRef:o,scrollWidth:i,__initCalendar:u,__renderCalendar:s}}const isValidFocusType=e=>e.every(e=>["day","date","weekday","interval","time","resource","task"].includes(e)),useCommonProps={modelValue:{type:String,default:today(),validator:e=>""===e||validateTimestamp(e)},weekdays:{type:Array,default:()=>[0,1,2,3,4,5,6]},dateType:{type:String,default:"round",validator:e=>["round","rounded","square"].includes(e)},weekdayAlign:{type:String,default:"center",validator:e=>["left","center","right"].includes(e)},dateAlign:{type:String,default:"center",validator:e=>["left","center","right"].includes(e)},bordered:Boolean,dark:Boolean,noAria:Boolean,noActiveDate:Boolean,noHeader:Boolean,noScroll:Boolean,shortWeekdayLabel:Boolean,noDefaultHeaderText:Boolean,noDefaultHeaderBtn:Boolean,minWeekdayLabel:{type:[Number,String],default:1},weekdayBreakpoints:{type:Array,default:()=>[75,35],validator:e=>2===e.length},locale:{type:String,default:"en-US"},animated:Boolean,transitionPrev:{type:String,default:"slide-right"},transitionNext:{type:String,default:"slide-left"},disabledDays:Array,disabledBefore:String,disabledAfter:String,disabledWeekdays:{type:Array,default:()=>[]},dragEnterFunc:Function,dragOverFunc:Function,dragLeaveFunc:Function,dropFunc:Function,selectedDates:{type:[Array,Set],default:()=>[]},selectedStartEndDates:{type:Array,default:()=>[]},hoverable:Boolean,focusable:Boolean,focusType:{type:Array,default:()=>["date"],validator:isValidFocusType}};function useCommon(t,{startDate:e,endDate:a,times:n}){const r=vue.computed(()=>parseTimestamp(e.value)),o=vue.computed(()=>{return"0000-00-00"===a.value?getEndOfWeek(r.value,t.weekdays,n.today):parseTimestamp(a.value)||r.value}),d=vue.computed(()=>createNativeLocaleFormatter(t.locale,()=>({timeZone:"UTC",day:"numeric"}))),i=vue.computed(()=>createNativeLocaleFormatter(t.locale,(e,t)=>({timeZone:"UTC",weekday:t?"short":"long"}))),u=vue.computed(()=>createNativeLocaleFormatter(t.locale,()=>({timeZone:"UTC",dateStyle:"full"})));function s(e,t){return e&&e.length>0&&e.includes(t.date)}function l(e,t){const a={firstDay:!1,betweenDays:!1,lastDay:!1};if(2===e.length){const n=getDayIdentifier(t),r=getDayIdentifier(parsed(e[0])),o=getDayIdentifier(parsed(e[1]));a.firstDay=r===n,a.lastDay=o===n,a.betweenDays=r<n&&o>n}return a}function c(e,t=!1,a=[],n=[],r=!1){const o=s(a,e),{firstDay:d,lastDay:i,betweenDays:u}=l(n,e);return{"q-past-day":!d&&!u&&!i&&!o&&!t&&!!e.past,"q-future-day":!d&&!u&&!i&&!o&&!t&&!!e.future,"q-outside":t,"q-current-day":!!e.current,"q-selected":o,"q-range-first":d,"q-range":u,"q-range-last":i,"q-range-hover":r&&(d||i||u),"q-disabled-day disabled":!0===e.disabled}}function m(e){return getStartOfWeek(e,t.weekdays,n.today)}function p(e){return getEndOfWeek(e,t.weekdays,n.today)}function v(){return{}}return{parsedStart:r,parsedEnd:o,dayFormatter:d,weekdayFormatter:i,ariaDateFormatter:u,arrayHasDate:s,checkDays:l,getRelativeClasses:c,startOfWeek:m,endOfWeek:p,dayStyleDefault:v}}const useTaskProps={modelValue:{type:String,default:today(),validator:e=>""===e||validateTimestamp(e)},modelTasks:{type:Array,default:()=>[]},modelTitle:{type:Array,default:()=>[]},modelFooter:{type:Array,default:()=>[]},taskKey:{type:[String,Number],default:"id"},weekdays:{type:Array,default:()=>[0,1,2,3,4,5,6]},dateType:{type:String,default:"round",validator:e=>["round","rounded","square"].includes(e)},dateHeader:{type:String,default:"stacked",validator:e=>["stacked","inline","inverted"].includes(e)},weekdayAlign:{type:String,default:"center",validator:e=>["left","center","right"].includes(e)},dateAlign:{type:String,default:"center",validator:e=>["left","center","right"].includes(e)},dayHeight:{type:[Number,String],default:0,validator:validateNumber},dayMinHeight:{type:[Number,String],default:40,validator:validateNumber},weekdayStyle:{type:Function,default:null},weekdayClass:{type:Function,default:null},dayStyle:{type:Function,default:null},dayClass:{type:Function,default:null},footerDayClass:{type:Function,default:null},view:{type:String,validator:e=>["day","week","month"].includes(e)},viewCount:{type:Number,default:1,validator:e=>validateNumber(e)&&e>0},taskWidth:{type:Number,default:200,validator:e=>validateNumber(e)&&e>0}};function useTask(t,e,{times:a}){const n=vue.computed(()=>{if(!t.modelValue)throw new Error("QCalendarTask: no modelValue provided");if("day"===t.view)return parseTimestamp(t.modelValue);if("week"===t.view)return getStartOfWeek(parseTimestamp(t.modelValue),t.weekdays,a.today);if("month"===t.view)return getStartOfMonth(parseTimestamp(t.modelValue));throw new Error(`QCalendarTask: unknown 'view' type (${t.view})`)}),r=vue.computed(()=>{if(!t.modelValue)throw new Error("QCalendarTask: no modelValue provided");if("day"===t.view){if(1===t.viewCount)return n.value;let e=copyTimestamp(n.value);return e=addToDate(e,{day:t.viewCount-1}),e}if("week"===t.view){if(1===t.viewCount)return getEndOfWeek(parseTimestamp(t.modelValue),t.weekdays,a.today);{let e=copyTimestamp(n.value);return e=addToDate(e,{day:(t.viewCount-1)*TIME_CONSTANTS.DAYS_IN.WEEK}),getEndOfWeek(e,t.weekdays,a.today)}}if("month"!==t.view)throw new Error(`QCalendarTask: unknown 'view' type (${t.view})`);if(1===t.viewCount)return getEndOfMonth(parseTimestamp(t.modelValue));{let e=copyTimestamp(n.value);return e=addToDate(e,{month:t.viewCount}),getEndOfMonth(e)}}),o=vue.computed(()=>{return createDayList(n.value,r.value,a.today,t.weekdays,t.disabledBefore,t.disabledAfter,t.disabledWeekdays||[],t.disabledDays||[],Number.MAX_SAFE_INTEGER)});return{days:o,parsedStartDate:n,parsedEndDate:r}}const useTimesProps={now:{type:String,validator:e=>""===e||validateTimestamp(e),default:""}};function useTimes(e){const t=vue.reactive({now:parseTimestamp("0000-00-00 00:00"),today:parseTimestamp("0000-00-00")}),a=vue.computed(()=>e.now?parseTimestamp(e.now):o());function n(){t.now&&t.today&&(t.now.current=t.today.current=!0,t.now.past=t.today.past=!1,t.now.future=t.today.future=!1)}function r(){const e=a.value||o();d(e,t.now),i(e,t.now),d(e,t.today)}function o(){return parseDate(new Date)}function d(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)}function i(e,t){e.time!==t.time&&(t.hour=e.hour,t.minute=e.minute,t.time=e.time)}return vue.watch(a,()=>r()),{times:t,parsedNow:a,setCurrent:n,updateCurrent:r,getNow:o,updateDay:d,updateTime:i}}function useRenderValues(r,{parsedView:o,parsedValue:d,times:i}){const e=vue.computed(()=>{const e=d.value;let t=r.maxDays,a=e,n=e;switch(o.value){case"month":a=getStartOfMonth(e),n=getEndOfMonth(e),t=daysInMonth(a.year,a.month);break;case"week":case"week-agenda":case"week-scheduler":a=getStartOfWeek(e,r.weekdays,i.today),n=getEndOfWeek(a,r.weekdays,i.today),t=r.weekdays.length;break;case"day":case"scheduler":case"agenda":n=moveRelativeDays(copyTimestamp(n),nextDay,t>1?t-1:t,r.weekdays),n=updateFormatted(n);break;case"month-interval":case"month-scheduler":case"month-agenda":a=getStartOfMonth(e),n=getEndOfMonth(e),n=updateFormatted(n),t=daysInMonth(a.year,a.month);break;case"resource":t=1,n=moveRelativeDays(copyTimestamp(n),nextDay,t,r.weekdays),n=updateFormatted(n);break}return{start:a,end:n,maxDays:t}});return{renderValues:e}}const useMoveEmits=["moved"];function useMove(u,{parsedView:s,parsedValue:l,direction:c,maxDays:m,times:p,emittedValue:v,emit:y}){function e(a=1){if(0===a)v.value=today();else{let e=copyTimestamp(l.value);const n=getEndOfMonth(e),r=a>0,o=r?nextDay:prevDay,d=r?n.day:1;let t=r?a:-a;c.value=r?"next":"prev";const i=u.weekdays.length;while(--t>=0)switch(s.value){case"month":e.day=d,e=o(e),e=updateWeekday(e);while(!u.weekdays.includes(Number(e.weekday)))e=addToDate(e,{day:r?1:-1});break;case"week":case"week-agenda":case"week-scheduler":e=relativeDays(e,o,i,u.weekdays);break;case"day":case"scheduler":case"agenda":e=relativeDays(e,o,m.value,u.weekdays);break;case"month-interval":case"month-agenda":case"month-scheduler":e.day=d,e=o(e);break;case"resource":e=relativeDays(e,o,m.value,u.weekdays);break}e=updateWeekday(e),e=updateFormatted(e),e=updateDayOfYear(e),e=updateRelative(e,p.now),v.value=e.date,y("moved",e)}}return{move:e}}const listenerRE=/^on[A-Z]/;function useEmitListeners(e=vue.getCurrentInstance()){return{emitListeners:vue.computed(()=>{const t={};return e?.vnode?.props&&Object.keys(e.vnode.props).forEach(e=>{listenerRE.test(e)&&(t[e]=!0)}),t})}}function useFocusHelper(){const e={"aria-hidden":"true",class:"q-calendar__focus-helper"};return[vue.h("span",e)]}function useButton(){function e({focusable:e,focusType:t},a,n){const r=e&&t.includes("date");return vue.h("button",{...a,tabindex:r?0:-1},[n,r&&useFocusHelper()])}return{renderButton:e}}const useCheckChangeEmits=["change"];function useCheckChange(n,{days:r,lastStart:o,lastEnd:d}){function e(){const e=r.value;if(0===e.length)return!1;const t=e[0].date,a=e[e.length-1].date;return(!o.value||!d.value||t!==o.value||a!==d.value)&&(o.value=t,d.value=a,n("change",{start:t,end:a,days:e}),!0)}return{checkChange:e}}function useEventUtils(){function e(e,t){return(Array.isArray(t)?t:[t]).includes(e.keyCode)}return{isKeyCode:e}}const isKeyCode=useEventUtils().isKeyCode,useNavigationProps={useNavigation:Boolean};function useNavigation(t,{rootRef:a,focusRef:n,focusValue:r,datesRef:o,parsedView:d,emittedValue:i,direction:u,times:s}){let e=!1;function l(){e||document&&(e=!0,document.addEventListener("keyup",y),document.addEventListener("keydown",v))}function c(){document&&(document.removeEventListener("keyup",y),document.removeEventListener("keydown",v),e=!1)}function m(e){if(e&&document){const t=document.activeElement;if(t!==document.body&&a.value?.contains(t))return!0}return!1}function p(){let t=0;const a=window.setInterval(()=>{const e=o.value[n.value];e&&(e.focus(),50!==++t)&&document.activeElement!==e||window.clearInterval(a)},250)}function v(e){m(e)&&isKeyCode(e,[33,34,35,36,37,38,39,40])&&(e.stopPropagation(),e.preventDefault())}function y(e){if(m(e)&&isKeyCode(e,[33,34,35,36,37,38,39,40])){const t={33:k,34:D,35:_,36:w,37:g,38:f,39:T,40:h};t[e.keyCode]?.()}}function f(){let e=copyTimestamp(r.value);if("month"===d.value){if(e=addToDate(e,{day:-7}),r.value.month!==e.month)return u.value="prev",void(i.value=e.date)}else e=addToDate(e,{minute:Number(t.intervalMinutes)});u.value="prev",n.value=e.date}function h(){let e=copyTimestamp(r.value);if("month"===d.value){if(e=addToDate(e,{day:7}),r.value.month!==e.month)return u.value="next",void(i.value=e.date)}else e=addToDate(e,{minute:Number(t.intervalMinutes)});u.value="next",n.value=e.date}function g(){let e=copyTimestamp(r.value);u.value="prev";do{e=addToDate(e,{day:-1})}while(!t.weekdays.includes(Number(e.weekday)));n.value=e.date}function T(){let e=copyTimestamp(r.value);u.value="next";do{e=addToDate(e,{day:1})}while(!t.weekdays.includes(Number(e.weekday)));n.value=e.date}function k(){let e=copyTimestamp(r.value);e="month"===d.value?addToDate(e,{month:-1}):addToDate(e,{day:-7}),u.value="prev",n.value=e.date}function D(){let e=copyTimestamp(r.value);e="month"===d.value?addToDate(e,{month:1}):addToDate(e,{day:7}),u.value="next",n.value=e.date}function w(){let e=copyTimestamp(r.value);e="month"===d.value?getStartOfMonth(e):getStartOfWeek(e,t.weekdays||[],s.today);while(!t.weekdays.includes(Number(e.weekday)))e=addToDate(e,{day:-1});n.value=e.date}function _(){let e=copyTimestamp(r.value);e="month"===d.value?getEndOfMonth(e):getEndOfWeek(e,t.weekdays||[],s.today);while(!t.weekdays.includes(Number(e.weekday)))e=addToDate(e,{day:-1});n.value=e.date}return vue.onBeforeUnmount(()=>{c()}),vue.watch(()=>t.useNavigation,e=>{(!0===e?l:c)()}),!0===t.useNavigation&&l(),{startNavigation:l,endNavigation:c,tryFocus:p}}const useCellWidthProps={cellWidth:[Number,String]},renderButton=useButton().renderButton;var QCalendarTask=vue.defineComponent({name:"QCalendarTask",directives:{ResizeObserver:ResizeObserverDirective},props:{...useTimesProps,...useNavigationProps,...useCellWidthProps,...useCommonProps,...useTaskProps},emits:["update:model-value","update:model-tasks","update:model-title","update:model-footer","task-expanded",...useCheckChangeEmits,...useMoveEmits,...getRawMouseEvents("-date"),...getRawMouseEvents("-day"),...getRawMouseEvents("-head-day")],setup(c,{slots:m,emit:s,expose:q}){const e=vue.ref(null),R=vue.ref(null),o=vue.ref("next"),d=vue.ref(c.modelValue||today()),i=vue.ref("0000-00-00"),t=vue.ref(0),p=vue.ref(c.modelValue),v=vue.ref(c.modelValue||today()),a=vue.ref(parsed(c.modelValue||today())),y=vue.ref({}),u=vue.reactive({width:0,height:0}),f=vue.ref(""),h=vue.ref(""),H=vue.ref(null),U=vue.ref(null),n=(vue.watch(()=>c.view,()=>{t.value=0}),vue.computed(()=>{return"month"===c.view?"month-interval":c.view})),r=vue.getCurrentInstance();if(null===r)throw new Error("current instance is null");const l=useEmitListeners(r).emitListeners,{times:g,setCurrent:L,updateCurrent:T}=useTimes(c),{parsedStart:B,dayFormatter:Y,weekdayFormatter:V,ariaDateFormatter:P,dayStyleDefault:k,getRelativeClasses:D}=(T(),L(),useCommon(c,{startDate:d,endDate:i,times:g})),w=vue.computed(()=>{return parseTimestamp(c.modelValue,g.now)||B.value||g.today}),z=(a.value=w.value,v.value=w.value.date,useRenderValues(c,{parsedView:n,times:g,parsedValue:w})).renderValues,{rootRef:$,__renderCalendar:Z}=useCalendar(c,Se,{scrollArea:e,pane:R}),{days:_,parsedStartDate:b,parsedEndDate:x}=useTask(c,s,{times:g}),N=useMove(c,{parsedView:n,parsedValue:w,direction:o,maxDays:t,times:g,emittedValue:p,emit:s}).move,I=useMouseEvents(s,l).getDefaultMouseEventHandlers,K=useCheckChange(s,{days:_,lastStart:H,lastEnd:U}).checkChange,M=useEventUtils().isKeyCode,j=useNavigation(c,{rootRef:$,focusRef:v,focusValue:a,datesRef:y,parsedView:n,emittedValue:p,direction:o,times:g}).tryFocus,E=vue.ref(!0),S=vue.computed(()=>{return void 0!==c.cellWidth?parseInt(String(c.cellWidth),10):150}),A=vue.computed(()=>{return!0===c.focusable&&c.focusType.includes("day")}),Q=vue.computed(()=>{return!0===c.focusable&&c.focusType.includes("date")&&!0!==A.value}),C=vue.computed(()=>{return!0===c.focusable&&c.focusType.includes("weekday")}),X=vue.computed(()=>{return parseInt(String(c.dayHeight),10)}),G=vue.computed(()=>{return parseInt(String(c.dayMinHeight),10)});function J(){p.value=today()}function ee(e=1){N(e)}function te(e=1){N(-e)}function ae({width:e,height:t}){u.width=e,u.height=t}function F(e){return e.date===p.value}function ne(e,t,a){const n=m.day,r=c.dayStyle||k,o=!0!==c.noActiveDate&&w.value.date===e.date,d=t[c.taskKey],i={timestamp:e,task:t,taskIndex:a,activeDate:o,droppable:h.value===d},u=convertToUnit(S.value),s={width:u,minWidth:u,maxWidth:u,...r({scope:i})},l="function"===typeof c.dayClass?c.dayClass({scope:i}):{};return vue.h("div",{tabindex:!0===A.value?0:-1,class:{"q-calendar-task__task--day":!0,...l,...D(e),"q-active-date":!0===o,"q-calendar__hoverable":!0===c.hoverable,"q-calendar__focusable":!0===A.value},style:s,onFocus:()=>{A.value},...I("-day",e=>{return{scope:i,event:e}}),onDragenter:e=>{void 0!==c.dragEnterFunc&&"function"===typeof c.dragEnterFunc&&(!0===c.dragEnterFunc(e,"day",{scope:i})?h.value=d:h.value="")},onDragover:e=>{void 0!==c.dragOverFunc&&"function"===typeof c.dragOverFunc&&(!0===c.dragOverFunc(e,"day",{scope:i})?h.value=d:h.value="")},onDragleave:e=>{void 0!==c.dragLeaveFunc&&"function"===typeof c.dragLeaveFunc&&(!0===c.dragLeaveFunc(e,"day",{scope:i})?h.value=d:h.value="")},onDrop:e=>{void 0!==c.dropFunc&&"function"===typeof c.dropFunc&&(!0===c.dropFunc(e,"day",{scope:i})?h.value=d:h.value="")}},[n&&n({scope:i}),useFocusHelper()])}function re(t,a){return _.value.map(e=>ne(e,t,a))}function oe(e,t){const a=m.days,n={timestamps:_.value,days:_.value,task:e,taskIndex:t,cellWidth:S.value};return vue.h("div",{class:"q-calendar-task__task--days-row"},[re(e,t),a&&a({scope:n})])}function de(t,e,a=0,n=!0){const r=0===a?m.task:m.subtask,o={start:b.value,end:x.value,task:t,taskIndex:e,expanded:n},d=convertToUnit(c.taskWidth),i={width:d,minWidth:d,maxWidth:d},u=!0===c.focusable&&c.focusType.includes("task");return vue.h("div",{class:{"q-calendar-task__task--item":!0,"q-calendar__sticky":!0===E.value,"q-calendar__hoverable":!0===c.hoverable,"q-calendar__focusable":!0===u},style:i},[vue.h("div",{style:{flexDirection:"column",justifyContent:"center",alignItems:"center",width:10+10*a+"px"}},[vue.h("div",{class:{"q-calendar__parent":void 0!==t.children,"q-calendar__parent--expanded":void 0!==t.children&&!0===t.expanded,"q-calendar__parent--collapsed":void 0!==t.children&&!0!==t.expanded},onClick:e=>{e.stopPropagation(),t.expanded=!t.expanded,s("task-expanded",{expanded:t.expanded,scope:o})}})]),r&&r({scope:o}),useFocusHelper()])}function ie(e,t,a=0,n=!0){const r=void 0!==e.height?convertToUnit(parseInt(e.height,10)):X.value>0?convertToUnit(X.value):"auto",o=G.value>0?convertToUnit(G.value):void 0,d={height:r},i=(void 0!==o&&(d.minHeight=o),vue.h("div",{key:e[c.taskKey]+"-"+t,class:{"q-calendar-task__task":0===a,"q-calendar-task__task--section":0!==a},style:d},[de(e,t,a,n),oe(e,t)]));return void 0!==e.children?[i,vue.h("div",{class:{"q-calendar__child":!0,"q-calendar__child--expanded":!0===n,"q-calendar__child--collapsed":!0!==n}},[ue(e.children,a+1,!1===n?n:e.expanded)])]:[i]}function ue(e=void 0,a=0,n=!0){return void 0===e&&(e=c.modelTasks),e.map((e,t)=>{return ie(e,t,a,void 0!==e.children?e.expanded:n)}).flat()}function se(){return vue.h("div",{class:{"q-calendar-task__task--container":!0,"q-calendar__sticky":!0===E.value}},[ue()])}function le(e,t){const a=m["footer-task"],n={start:b.value,end:x.value,footer:e,index:t},r=convertToUnit(c.taskWidth),o={width:r,minWidth:r,maxWidth:r};return vue.h("div",{class:{"q-calendar-task__footer--task":!0,"q-calendar__sticky":!0===E.value},style:o},[a&&a({scope:n})])}function ce(e,t,a){const n=m["footer-day"],r={timestamp:e,footer:t,index:a},o=convertToUnit(S.value),d={width:o,minWidth:o,maxWidth:o},i="function"===typeof c.footerDayClass?c.footerDayClass({scope:r}):{};return vue.h("div",{class:{"q-calendar-task__footer--day":!0,...i,...D(e),"q-calendar__hoverable":!0===c.hoverable,"q-calendar__focusable":!0===A.value},style:d},[n&&n({scope:r})])}function me(t,a){return vue.h("div",{class:"q-calendar-task__footer--day-wrapper"},[_.value.map(e=>ce(e,t,a))])}function pe(){const a=!0===c.focusable&&c.focusType.includes("task");return c.modelFooter.map((e,t)=>{return vue.h("div",{class:{"q-calendar-task__footer--wrapper":!0,"q-calendar__hoverable":!0===c.hoverable,"q-calendar__focusable":!0===a}},{default:()=>[le(e,t),me(e,t)]})})}function ve(){return vue.h("div",{class:{"q-calendar-task__footer":!0,"q-calendar__sticky":!0===E.value}},pe())}function ye(){return vue.h("div",{class:{"q-calendar-task__container":!0}},[!0!==c.noHeader&&Ie(),se(),ve()])}function fe(){const e=m["head-tasks"],t={start:b.value,end:x.value},a=convertToUnit(parseInt(String(c.taskWidth),10)),n={width:a,minWidth:a,maxWidth:a};return vue.h("div",{class:{"q-calendar-task__head--tasks":!0,"q-calendar__sticky":!0===E.value},style:n},[e&&e({scope:t})])}function he(e,t){const a=m["title-task"],n=convertToUnit(parseInt(String(c.taskWidth),10)),r={width:n,minWidth:n,maxWidth:n},o={start:b.value,end:x.value,cellWidth:n,title:e,index:t};return vue.h("div",{class:{"q-calendar-task__title--task":!0,"q-calendar__sticky":!0===E.value},style:r},[a&&a({scope:o})])}function O(e){const t=m["head-weekday-label"],a=!0!==c.noActiveDate&&F(e),n={activeDate:a,timestamp:e,disabled:!!c.disabledWeekdays&&c.disabledWeekdays.includes(Number(e.weekday))},r={class:{"q-calendar-task__head--weekday":!0,["q-calendar__"+c.weekdayAlign]:!0,"q-calendar__ellipsis":!0}};return vue.h("div",r,t&&t({scope:n})||ge(e,c.shortWeekdayLabel))}function ge(e,t){const a=V.value(e,t||c.weekdayBreakpoints[0]>0&&S.value<=c.weekdayBreakpoints[0]);return vue.h("span",{class:"q-calendar__ellipsis"},c.weekdayBreakpoints[1]>0&&S.value<=c.weekdayBreakpoints[1]?minCharWidth(a,Number(c.minWeekdayLabel)):a)}function W(e){const t={class:{"q-calendar-task__head--date":!0,["q-calendar__"+c.dateAlign]:!0}};return vue.h("div",t,Te(e))}function Te(a){const e=!0!==c.noActiveDate&&F(a),t=Y.value(a,!1),n=m["head-day-label"],r=m["head-day-button"],o={dayLabel:t,timestamp:a,activeDate:e},d=a.date,i={key:d,tabindex:!0===Q.value?0:-1,class:{"q-calendar-task__head--day__label":!0,"q-calendar__button":!0,"q-calendar__button--round":"round"===c.dateType,"q-calendar__button--rounded":"rounded"===c.dateType,"q-calendar__button--bordered":!0===a.current,"q-calendar__hoverable":!0===c.hoverable,"q-calendar__focusable":!0===Q.value},disabled:a.disabled,onKeydown:e=>{!0!==a.disabled&&M(e,[13,32])&&(e.stopPropagation(),e.preventDefault())},onKeyup:e=>{!0!==a.disabled&&M(e,[13,32])&&(p.value=a.date,void 0!==l.value.onClickDate)&&s("click-date",{scope:o})},...I("-date",(e,t)=>{return"click-date"!==t&&"contextmenu-date"!==t||(p.value=a.date,"click-date"===t&&e.preventDefault()),{scope:o,event:e}})};return!0!==c.noAria&&(i.ariaLabel=P.value(a,!1)),r?r({scope:o}):renderButton(c,i,n?n({scope:o}):t)}function ke(e){return"stacked"===c.dateHeader?[!0!==c.noDefaultHeaderText&&O(e),!0!==c.noDefaultHeaderBtn&&W(e)].filter(e=>!1!==e):"inline"===c.dateHeader?("left"===c.weekdayAlign&&"right"===c.dateAlign||"right"===c.weekdayAlign&&c.dateAlign,vue.h("div",{class:"q-calendar__header--inline"},[!0!==c.noDefaultHeaderText&&O(e),!0!==c.noDefaultHeaderBtn&&W(e)])):"inverted"===c.dateHeader?("left"===c.weekdayAlign&&"right"===c.dateAlign||"right"===c.weekdayAlign&&c.dateAlign,vue.h("div",{class:"q-calendar__header--inline"},[!0!==c.noDefaultHeaderBtn&&W(e),!0!==c.noDefaultHeaderText&&O(e)])):void 0}function De(e,t,a){const n=m["title-day"],r=convertToUnit(S.value),o={width:r,minWidth:r,maxWidth:r},d={timestamp:e,title:t,index:a,cellWidth:S.value},i="function"===typeof c.dayClass?c.dayClass({scope:d}):{},u=!0===c.focusable&&c.focusType.includes("day");return vue.h("div",{class:{"q-calendar-task__title--day":!0,...i,...D(e),"q-calendar__hoverable":!0===c.hoverable,"q-calendar__focusable":!0===u},style:o},[n&&n({scope:d}),useFocusHelper()])}function we(t){const e=m["head-day"],a=m["head-date"],n=!0!==c.noActiveDate&&F(t),r={timestamp:t,activeDate:n,droppable:f.value=t.date,disabled:!!c.disabledWeekdays&&c.disabledWeekdays.includes(Number(t.weekday))},o=c.weekdayStyle||k,d="function"===typeof c.weekdayClass?c.weekdayClass({scope:r}):{},i=convertToUnit(S.value),u={width:i,minWidth:i,maxWidth:i,...o({scope:r})},s=t.date,l={key:s,ref:e=>{y.value[s]=e},tabindex:!0===C.value?0:-1,class:{"q-calendar-task__head--day":!0,...d,...D(t),"q-active-date":n,"q-calendar__hoverable":!0===c.hoverable,"q-calendar__focusable":!0===C.value},style:u,onFocus:()=>{!0===C.value&&(v.value=s)},onKeydown:e=>{!0!==t.disabled&&M(e,[13,32])&&(e.stopPropagation(),e.preventDefault())},onKeyup:e=>{!0!==t.disabled&&M(e,[13,32])&&(p.value=t.date)},...I("-head-day",e=>{return{scope:r,event:e}}),onDragenter:e=>{void 0!==c.dragEnterFunc&&"function"===typeof c.dragEnterFunc&&(!0===c.dragEnterFunc(e,"head-day",{scope:r})?f.value=t.date:f.value="")},onDragover:e=>{void 0!==c.dragOverFunc&&"function"===typeof c.dragOverFunc&&(!0===c.dragOverFunc(e,"head-day",{scope:r})?f.value=t.date:f.value="")},onDragleave:e=>{void 0!==c.dragLeaveFunc&&"function"===typeof c.dragLeaveFunc&&(!0===c.dragLeaveFunc(e,"head-day",{scope:r})?f.value=t.date:f.value="")},onDrop:e=>{void 0!==c.dropFunc&&"function"===typeof c.dropFunc&&(!0===c.dropFunc(e,"head-day",{scope:r})?f.value=t.date:f.value="")}};return vue.h("div",l,[void 0!==e&&e({scope:r}),void 0===e&&ke(t),void 0===e&&a&&a({scope:r}),useFocusHelper()])}function _e(){return _.value.map(e=>we(e))}function be(t,a){return _.value.map(e=>De(e,t,a))}function xe(){return vue.h("div",{class:{"q-calendar-task__head--days":!0}},[..._e()])}function Ne(e,t){return vue.h("div",{class:{"q-calendar-task__title--days":!0}},[...be(e,t)])}function Ie(){return vue.h("div",{roll:"presentation",class:{"q-calendar-task__head":!0,"q-calendar__sticky":!0===E.value},style:{}},[vue.h("div",{style:{position:"relative",display:"flex"}},[fe(),xe()]),c.modelTitle.map((e,t)=>vue.h("div",{class:"q-calendar-task__title",style:{position:"relative",display:"flex"}},[he(e,t),Ne(e,t)]))])}function Me(){return vue.h("div",{class:"q-calendar-task__body"},[Ee()])}function Ee(){return vue.h("div",{ref:e,class:{"q-calendar-task__scroll-area":!0,"q-calendar__scroll":!0}},[ye()])}function Se(){const{start:e,end:t}=z.value,a=(d.value=e.date,i.value=t.date,u.width>0),n=vue.withDirectives(vue.h("div",{key:d.value,class:"q-calendar-task"},[!0===a&&Me()]),[[ResizeObserverDirective,ae]]);if(!0!==c.animated)return n;{const r="q-calendar--"+("prev"===o.value?c.transitionPrev:c.transitionNext);return vue.h(vue.Transition,{name:r,appear:!0},()=>n)}}return vue.watch([_],K,{deep:!0,immediate:!0}),vue.watch(()=>c.modelValue,(e,t)=>{if(p.value!==e){if(!0===c.animated){const a=getDayIdentifier(parsed(e)),n=getDayIdentifier(parsed(t));o.value=a>=n?"next":"prev"}p.value=e}v.value=e}),vue.watch(p,(e,t)=>{if(p.value!==c.modelValue){if(!0===c.animated){const a=getDayIdentifier(parsed(e)),n=getDayIdentifier(parsed(t));o.value=a>=n?"next":"prev"}s("update:model-value",e)}}),vue.watch(v,e=>{e&&(a.value=parseTimestamp(e))}),vue.watch(a,()=>{y.value[v.value]?y.value[v.value].focus():j()}),vue.onBeforeUpdate(()=>{y.value={}}),vue.onMounted(()=>{}),q({prev:te,next:ee,move:N,moveToToday:J,updateCurrent:T}),()=>Z()}});const version="4.1.1";exports.DAYS_IN_MONTH=DAYS_IN_MONTH,exports.DAYS_IN_MONTH_LEAP=DAYS_IN_MONTH_LEAP,exports.DAYS_IN_MONTH_MAX=DAYS_IN_MONTH_MAX,exports.DAYS_IN_MONTH_MIN=DAYS_IN_MONTH_MIN,exports.DAY_MIN=DAY_MIN,exports.FIRST_HOUR=FIRST_HOUR,exports.MONTH_MAX=MONTH_MAX,exports.MONTH_MIN=MONTH_MIN,exports.PARSE_DATE=PARSE_DATE,exports.PARSE_DATETIME=PARSE_DATETIME,exports.PARSE_TIME=PARSE_TIME,exports.QCalendarTask=QCalendarTask,exports.TIME_CONSTANTS=TIME_CONSTANTS,exports.addToDate=addToDate,exports.compareDate=compareDate,exports.compareDateTime=compareDateTime,exports.compareTime=compareTime,exports.compareTimestamps=compareTimestamps,exports.convertToUnit=convertToUnit,exports.copyTimestamp=copyTimestamp,exports.createDayList=createDayList,exports.createIntervalList=createIntervalList,exports.createNativeLocaleFormatter=createNativeLocaleFormatter,exports.daysBetween=daysBetween,exports.daysInMonth=daysInMonth,exports.diffTimestamp=diffTimestamp,exports.findWeekday=findWeekday,exports.getDate=getDate,exports.getDateTime=getDateTime,exports.getDayIdentifier=getDayIdentifier,exports.getDayOfYear=getDayOfYear,exports.getDayTimeIdentifier=getDayTimeIdentifier,exports.getEndOfMonth=getEndOfMonth,exports.getEndOfWeek=getEndOfWeek,exports.getMonthFormatter=getMonthFormatter,exports.getMonthNames=getMonthNames,exports.getStartOfMonth=getStartOfMonth,exports.getStartOfWeek=getStartOfWeek,exports.getTime=getTime,exports.getTimeIdentifier=getTimeIdentifier,exports.getWeekday=getWeekday,exports.getWeekdayFormatter=getWeekdayFormatter,exports.getWeekdayNames=getWeekdayNames,exports.getWorkWeek=getWorkWeek,exports.indexOf=indexOf,exports.isBetweenDates=isBetweenDates,exports.isLeapYear=isLeapYear,exports.isOverlappingDates=isOverlappingDates,exports.isToday=isToday,exports.makeDate=makeDate,exports.makeDateTime=makeDateTime,exports.maxTimestamp=maxTimestamp,exports.minCharWidth=minCharWidth,exports.minTimestamp=minTimestamp,exports.moveRelativeDays=moveRelativeDays,exports.nextDay=nextDay,exports.padNumber=padNumber,exports.parseDate=parseDate,exports.parseTime=parseTime,exports.parseTimestamp=parseTimestamp,exports.parsed=parsed,exports.prevDay=prevDay,exports.relativeDays=relativeDays,exports.today=today,exports.updateDayOfYear=updateDayOfYear,exports.updateDisabled=updateDisabled,exports.updateFormatted=updateFormatted,exports.updateMinutes=updateMinutes,exports.updateRelative=updateRelative,exports.updateWeekday=updateWeekday,exports.updateWorkWeek=updateWorkWeek,exports.validateNumber=validateNumber,exports.validateTimestamp=validateTimestamp,exports.version=version,exports.weeksBetween=weeksBetween; |
/*! | ||
* @quasar/quasar-ui-qcalendar v4.1.0 | ||
* @quasar/quasar-ui-qcalendar v4.1.1 | ||
* (c) 2025 Jeff Galbraith <jeff@quasar.dev> | ||
* Released under the MIT License. | ||
*/ | ||
import{reactive,ref,computed,withDirectives,h,watch,getCurrentInstance,onBeforeUnmount,defineComponent,onBeforeUpdate,onMounted,Transition}from"vue";const PARSE_DATETIME=/^(\d{4})-(\d{1,2})(-(\d{1,2}))?([^\d]+(\d{1,2}))?(:(\d{1,2}))?(:(\d{1,2}))?(.(\d{1,3}))?$/,PARSE_DATE=/^(\d{4})-(\d{1,2})(-(\d{1,2}))?/,PARSE_TIME=/(\d\d?)(:(\d\d?)|)(:(\d\d?)|)/,DAYS_IN_MONTH=[0,31,28,31,30,31,30,31,31,30,31,30,31],DAYS_IN_MONTH_LEAP=[0,31,29,31,30,31,30,31,31,30,31,30,31],TIME_CONSTANTS={MILLISECONDS_IN:{SECOND:1e3,MINUTE:6e4,HOUR:36e5,DAY:864e5,WEEK:6048e5},SECONDS_IN:{MINUTE:60,HOUR:3600,DAY:86400,WEEK:604800},MINUTES_IN:{MINUTE:1,HOUR:60,DAY:1440,WEEK:10080},HOURS_IN:{DAY:24,WEEK:168},DAYS_IN:{WEEK:7}},DAYS_IN_MONTH_MIN=28,DAYS_IN_MONTH_MAX=31,MONTH_MAX=12,MONTH_MIN=1,DAY_MIN=1,FIRST_HOUR=0;function validateTimestamp(e){return"string"===typeof e&&PARSE_DATETIME.test(e)}function parsed(e){if("string"!==typeof e)return null;const t=PARSE_DATETIME.exec(e);if(!t||!t[1]||!t[2])return null;const a=parseInt(t[1],10),n=parseInt(t[2],10),r=parseInt(t[4]||"1",10),d=parseInt(t[6]||"0",10),o=parseInt(t[8]||"0",10);return{date:e,time:d.toString().padStart(2,"0")+":"+o.toString().padStart(2,"0"),year:a,month:n,day:r,hour:d,minute:o,hasDay:!!t[4],hasTime:!0,past:!1,current:!1,future:!1,disabled:!1,weekday:0,doy:0,workweek:0}}function parseDate(e,t=!1){if(!(e instanceof Date))return null;const a=t?"UTC":"";return updateFormatted({date:padNumber(e[`get${a}FullYear`](),4)+"-"+padNumber(e[`get${a}Month`]()+1,2)+"-"+padNumber(e[`get${a}Date`](),2),time:padNumber(e[`get${a}Hours`]()||0,2)+":"+padNumber(e[`get${a}Minutes`]()||0,2),year:e[`get${a}FullYear`](),month:e[`get${a}Month`]()+1,day:e[`get${a}Date`](),hour:e[`get${a}Hours`](),minute:e[`get${a}Minutes`](),weekday:0,doy:0,workweek:0,hasDay:!0,hasTime:!0,past:!1,current:!1,future:!1,disabled:!1})}function padNumber(e,t){let a=String(e);while(a.length<t)a="0"+a;return a}function isLeapYear(e){return e%4===0&&e%100!==0||e%400===0}function daysInMonth(e,t){return(isLeapYear(e)?DAYS_IN_MONTH_LEAP:DAYS_IN_MONTH)[t]}function nextDay(e){const t=new Date(e.year,e.month-1,e.day+1);return updateFormatted(normalizeTimestamp({...e,year:t.getFullYear(),month:t.getMonth()+1,day:t.getDate()}))}function prevDay(e){const t=new Date(e.year,e.month-1,e.day-1);return updateFormatted(normalizeTimestamp({...e,year:t.getFullYear(),month:t.getMonth()+1,day:t.getDate()}))}function today(){const e=new Date,t=e.getMonth()+1,a=e.getDate(),n=e.getFullYear();return[n,padNumber(t,2),padNumber(a,2)].join("-")}function isToday(e){return e===today()}function getStartOfWeek(e,t,a){let n=copyTimestamp(e);if(t){if(1===n.day||0===n.weekday)while(!t.includes(Number(n.weekday)))n=nextDay(n);n=findWeekday(n,t[0],prevDay),n=updateFormatted(n),a&&(n=updateRelative(n,a,n.hasTime))}return n}function getEndOfWeek(e,t,a){let n=copyTimestamp(e);if(t&&Array.isArray(t)){const r=daysInMonth(n.year,n.month);if(r===n.day||n.weekday===t[t.length-1])while(!t.includes(Number(n.weekday)))n=prevDay(n);n=findWeekday(n,t[t.length-1],nextDay),n=updateFormatted(n),a&&(n=updateRelative(n,a,n.hasTime))}return n}function getStartOfMonth(e){let t=copyTimestamp(e);return t.day=DAY_MIN,t=updateFormatted(t),t}function getEndOfMonth(e){let t=copyTimestamp(e);return t.day=daysInMonth(t.year,t.month),t=updateFormatted(t),t}function parseTime(e){const t=Object.prototype.toString.call(e);switch(t){case"[object Number]":return e;case"[object String]":{const a=PARSE_TIME.exec(e);return a?60*parseInt(a[1],10)+parseInt(a[3]||"0",10):!1}case"[object Object]":return"object"!==typeof e||"number"!==typeof e.hour||"number"!==typeof e.minute?!1:"object"===typeof e&&"hour"in e&&"minute"in e&&60*e.hour+e.minute}return!1}function compareTimestamps(e,t){return!(!e||!t)&&e.year===t.year&&e.month===t.month&&e.day===t.day&&e.hour===t.hour&&e.minute===t.minute}function compareDate(e,t){return getDate(e)===getDate(t)}function compareTime(e,t){return getTime(e)===getTime(t)}function compareDateTime(e,t){return getDateTime(e)===getDateTime(t)}function parseTimestamp(e,t=null){let a=parsed(e);return a?(a=updateFormatted(a),t&&(a=updateRelative(a,t,a.hasTime)),a):null}function getDayIdentifier(e){return 1e8*(e.year??0)+1e6*(e.month??0)+1e4*(e.day??0)}function getTimeIdentifier(e){return 100*(e.hour??0)+(e.minute??0)}function getDayTimeIdentifier(e){return getDayIdentifier(e)+getTimeIdentifier(e)}function diffTimestamp(e,t,a=!1){const n=Date.UTC(e.year??0,(e.month??1)-1,e.day??1,e.hour??0,e.minute??0),r=Date.UTC(t.year??0,(t.month??1)-1,t.day??1,t.hour??0,t.minute??0);return!0===a&&r<n?0:r-n}function updateRelative(e,t,a=!1){let n=copyTimestamp(e),r=getDayIdentifier(t),d=getDayIdentifier(n),o=r===d;return n.hasTime&&a&&o&&(r=getTimeIdentifier(t),d=getTimeIdentifier(n),o=r===d),n.past=d<r,n.current=o,n.future=d>r,n.currentWeekday=n.weekday===t.weekday,n}function updateMinutes(e,t,a=null){let n=copyTimestamp(e);return n.hasTime=!0,n.hour=Math.floor(t/TIME_CONSTANTS.MINUTES_IN.HOUR),n.minute=t%TIME_CONSTANTS.MINUTES_IN.HOUR,n.time=getTime(n),a&&(n=updateRelative(n,a,!0)),n}function updateWeekday(e){let t=copyTimestamp(e);return t.weekday=getWeekday(t),t}function updateDayOfYear(e){let t=copyTimestamp(e);return t.doy=getDayOfYear(t)||0,t}function updateWorkWeek(e){let t=copyTimestamp(e);return t.workweek=getWorkWeek(t),t}function updateDisabled(e,t,a,n,r){let d=copyTimestamp(e);const o=getDayIdentifier(d);if(void 0!==t){const l=parsed(t);if(l){const c=getDayIdentifier(l);o<=c&&(d.disabled=!0)}}if(!0!==d.disabled&&void 0!==a){const m=parsed(a);if(m){const y=getDayIdentifier(m);o>=y&&(d.disabled=!0)}}if(!0!==d.disabled&&Array.isArray(n)&&n.length>0)for(var i in n)if(n[i]===d.weekday){d.disabled=!0;break}if(!0!==d.disabled&&Array.isArray(r)&&r.length>0)for(var s in r)if(Array.isArray(r[s])&&2===r[s].length&&r[s][0]&&r[s][1]){const p=parsed(r[s][0]),f=parsed(r[s][1]);if(p&&f&&isBetweenDates(d,p,f)){d.disabled=!0;break}}else{const v=r[s];if(Array.isArray(v))for(var u of v){const h=parseTimestamp(u);if(h){const T=getDayIdentifier(h);if(T===o){d.disabled=!0;break}}}else if(v){const g=parseTimestamp(v);if(g){const D=getDayIdentifier(g);D===o&&(d.disabled=!0)}}}return d}function updateFormatted(e){let t=copyTimestamp(e);return t.hasTime=!0,t.time=getTime(t),t.date=getDate(t),t.weekday=getWeekday(t),t.doy=getDayOfYear(t)||0,t.workweek=getWorkWeek(t),t}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){let t=copyTimestamp(e);if(0===t.year){const r=parseTimestamp(today());r&&(t=r)}const a=new Date(Date.UTC(t.year,t.month-1,t.day)),n=4;a.setUTCDate(a.getUTCDate()-(a.getUTCDay()+6)%7+n),a.setUTCDate(a.getUTCDate()+n-(a.getUTCDay()||7));e=new Date(Date.UTC(a.getUTCFullYear(),0,1)),e=Math.ceil(((a.valueOf()-e.valueOf())/864e5+1)/7);return e}function getWeekday(e){let t=e.weekday;if(e.hasDay){const a=Math.floor,n=e.day,r=(e.month+9)%MONTH_MAX+1,d=a(e.year/100),o=e.year%100-(e.month<=2?1:0);t=((n+a(2.6*r-.2)-2*d+o+a(o/4)+a(d/4))%7+7)%7}return t??0}function copyTimestamp(e){return{...e}}function getDate(e){let 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):"00:00")}function moveRelativeDays(e,t=nextDay,a=1,n=[0,1,2,3,4,5,6]){const r=copyTimestamp(e);return relativeDays(r,t,a,n)}function relativeDays(e,t=nextDay,a=1,n=[0,1,2,3,4,5,6]){let r=copyTimestamp(e);n.includes(Number(r.weekday))||0!==r.weekday||t!==nextDay||++a;while(--a>=0)r=t(r),n.length<7&&!n.includes(Number(r.weekday))&&++a;return r}function findWeekday(e,t,a=nextDay,n=6){let r=copyTimestamp(e);while(r.weekday!==t&&--n>=0)r=a(r);return r}function createDayList(e,t,a,n=[0,1,2,3,4,5,6],r=void 0,d=void 0,o=[],i=[],s=42,u=0){const l=getDayIdentifier(e),c=getDayIdentifier(t),m=[];let y=copyTimestamp(e),p=0,f=p===c;if(!(c<l))while((!f||m.length<u)&&m.length<s){if(p=getDayIdentifier(y),f=f||p>c&&m.length>=u,f)break;if(n.includes(Number(y.weekday))){let e=copyTimestamp(y);e=updateFormatted(e),e=updateRelative(e,a),e=updateDisabled(e,r,d,o,i),m.push(e)}y=relativeDays(y,nextDay)}return m}function createIntervalList(t,a,n,r,d){const o=[];for(let e=0;e<r;++e){const i=(a+e)*n,s=copyTimestamp(t);o.push(updateMinutes(s,i,d))}return o}function createNativeLocaleFormatter(n,r){const e=()=>"";return"undefined"===typeof Intl||"undefined"===typeof Intl.DateTimeFormat?e:(t,e)=>{try{const a=new Intl.DateTimeFormat(n||void 0,r(t,e));return a.format(makeDateTime(t))}catch(e){return console.error(`Intl.DateTimeFormat: ${e.message} -> `+getDateTime(t)),""}}}function makeDate(e,t=!0){return t?new Date(Date.UTC(e.year,e.month-1,e.day,0,0)):new Date(e.year,e.month-1,e.day,0,0)}function makeDateTime(e,t=!0){return t?new Date(Date.UTC(e.year,e.month-1,e.day,e.hour,e.minute)):new Date(e.year,e.month-1,e.day,e.hour,e.minute)}function validateNumber(e){return isFinite(Number(e))}function maxTimestamp(e,t=!1){const a=!0===t?getDayTimeIdentifier:getDayIdentifier;return e.reduce((e,t)=>{return Math.max(a(e),a(t))===a(e)?e:t})}function minTimestamp(e,t=!1){const a=!0===t?getDayTimeIdentifier:getDayIdentifier;return e.reduce((e,t)=>{return Math.min(a(e),a(t))===a(e)?e:t})}function isBetweenDates(e,t,a,n=!1){const r=getDayIdentifier(e)+(!0===n?getTimeIdentifier(e):0),d=getDayIdentifier(t)+(!0===n?getTimeIdentifier(t):0),o=getDayIdentifier(a)+(!0===n?getTimeIdentifier(a):0);return r>=d&&r<=o}function isOverlappingDates(e,t,a,n){const r=getDayIdentifier(e),d=getDayIdentifier(t),o=getDayIdentifier(a),i=getDayIdentifier(n);return r>=o&&r<=i||d>=o&&d<=i||o>=r&&d>=i}function addToDate(e,t){const a=copyTimestamp(e);return t.year&&(a.year+=t.year),t.month&&(a.month+=t.month),t.day&&(a.day+=t.day),t.hour&&(a.hour+=t.hour),t.minute&&(a.minute+=t.minute),updateFormatted(normalizeTimestamp(a))}function normalizeTimestamp(e){const t=new Date(e.year,e.month-1,e.day,e.hour,e.minute);return{...e,year:t.getFullYear(),month:t.getMonth()+1,day:t.getDate(),hour:t.getHours(),minute:t.getMinutes()}}function daysBetween(e,t){const a=diffTimestamp(e,t,!0);return Math.floor(a/TIME_CONSTANTS.MILLISECONDS_IN.DAY)}function weeksBetween(e,t){let a=copyTimestamp(e),n=copyTimestamp(t);return a=findWeekday(a,0),n=findWeekday(n,6),Math.ceil(daysBetween(a,n)/TIME_CONSTANTS.DAYS_IN.WEEK)}const weekdayDateMap={Sun:new Date("2020-01-05T00:00:00.000Z"),Mon:new Date("2020-01-06T00:00:00.000Z"),Tue:new Date("2020-01-07T00:00:00.000Z"),Wed:new Date("2020-01-08T00:00:00.000Z"),Thu:new Date("2020-01-09T00:00:00.000Z"),Fri:new Date("2020-01-10T00:00:00.000Z"),Sat:new Date("2020-01-11T00:00:00.000Z")};function getWeekdayFormatter(){const e=()=>"",r={long:{timeZone:"UTC",weekday:"long"},short:{timeZone:"UTC",weekday:"short"},narrow:{timeZone:"UTC",weekday:"narrow"}};return"undefined"===typeof Intl||"undefined"===typeof Intl.DateTimeFormat?e:t;function t(t,e,a){try{const n=new Intl.DateTimeFormat(a||void 0,r[e]||r["long"]);return n.format(weekdayDateMap[t])}catch(e){return e instanceof Error&&console.error(`Intl.DateTimeFormat: ${e.message} -> day of week: `+t),""}}}function getWeekdayNames(t,a){const e=Object.keys(weekdayDateMap),n=getWeekdayFormatter();return e.map(e=>String(n(e,t,a)))}function getMonthFormatter(){const e=()=>"",d={long:{timeZone:"UTC",month:"long"},short:{timeZone:"UTC",month:"short"},narrow:{timeZone:"UTC",month:"narrow"}};return"undefined"===typeof Intl||"undefined"===typeof Intl.DateTimeFormat?e:t;function t(t,e,a){try{const n=new Intl.DateTimeFormat(a||void 0,d[e]||d["long"]),r=new Date;return r.setDate(1),r.setMonth(t),n.format(r)}catch(e){return e instanceof Error&&console.error(`Intl.DateTimeFormat: ${e.message} -> month: `+t),""}}}function getMonthNames(t,a){const n=getMonthFormatter();return[...Array(12).keys()].map(e=>n(e,t,a))}var Timestamp={PARSE_DATETIME:PARSE_DATETIME,PARSE_DATE:PARSE_DATE,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,TIME_CONSTANTS:TIME_CONSTANTS,FIRST_HOUR:FIRST_HOUR,today:today,getStartOfWeek:getStartOfWeek,getEndOfWeek:getEndOfWeek,getStartOfMonth:getStartOfMonth,getEndOfMonth:getEndOfMonth,parseTime:parseTime,validateTimestamp:validateTimestamp,parsed:parsed,parseTimestamp:parseTimestamp,parseDate:parseDate,getDayIdentifier:getDayIdentifier,getTimeIdentifier:getTimeIdentifier,getDayTimeIdentifier:getDayTimeIdentifier,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,createDayList:createDayList,createIntervalList:createIntervalList,createNativeLocaleFormatter:createNativeLocaleFormatter,makeDate:makeDate,makeDateTime:makeDateTime,validateNumber:validateNumber,isBetweenDates:isBetweenDates,isOverlappingDates:isOverlappingDates,daysBetween:daysBetween,weeksBetween:weeksBetween,addToDate:addToDate,compareTimestamps:compareTimestamps,compareDate:compareDate,compareTime:compareTime,compareDateTime:compareDateTime,getWeekdayFormatter:getWeekdayFormatter,getWeekdayNames:getWeekdayNames,getMonthFormatter:getMonthFormatter,getMonthNames:getMonthNames},Timestamp$1=Object.freeze({__proto__:null,DAYS_IN_MONTH:DAYS_IN_MONTH,DAYS_IN_MONTH_LEAP:DAYS_IN_MONTH_LEAP,DAYS_IN_MONTH_MAX:DAYS_IN_MONTH_MAX,DAYS_IN_MONTH_MIN:DAYS_IN_MONTH_MIN,DAY_MIN:DAY_MIN,FIRST_HOUR:FIRST_HOUR,MONTH_MAX:MONTH_MAX,MONTH_MIN:MONTH_MIN,PARSE_DATE:PARSE_DATE,PARSE_DATETIME:PARSE_DATETIME,PARSE_TIME:PARSE_TIME,TIME_CONSTANTS:TIME_CONSTANTS,addToDate:addToDate,compareDate:compareDate,compareDateTime:compareDateTime,compareTime:compareTime,compareTimestamps:compareTimestamps,copyTimestamp:copyTimestamp,createDayList:createDayList,createIntervalList:createIntervalList,createNativeLocaleFormatter:createNativeLocaleFormatter,daysBetween:daysBetween,daysInMonth:daysInMonth,default:Timestamp,diffTimestamp:diffTimestamp,findWeekday:findWeekday,getDate:getDate,getDateTime:getDateTime,getDayIdentifier:getDayIdentifier,getDayOfYear:getDayOfYear,getDayTimeIdentifier:getDayTimeIdentifier,getEndOfMonth:getEndOfMonth,getEndOfWeek:getEndOfWeek,getMonthFormatter:getMonthFormatter,getMonthNames:getMonthNames,getStartOfMonth:getStartOfMonth,getStartOfWeek:getStartOfWeek,getTime:getTime,getTimeIdentifier:getTimeIdentifier,getWeekday:getWeekday,getWeekdayFormatter:getWeekdayFormatter,getWeekdayNames:getWeekdayNames,getWorkWeek:getWorkWeek,isBetweenDates:isBetweenDates,isLeapYear:isLeapYear,isOverlappingDates:isOverlappingDates,isToday:isToday,makeDate:makeDate,makeDateTime:makeDateTime,maxTimestamp:maxTimestamp,minTimestamp:minTimestamp,moveRelativeDays:moveRelativeDays,nextDay:nextDay,padNumber:padNumber,parseDate:parseDate,parseTime:parseTime,parseTimestamp:parseTimestamp,parsed:parsed,prevDay:prevDay,relativeDays:relativeDays,today:today,updateDayOfYear:updateDayOfYear,updateDisabled:updateDisabled,updateFormatted:updateFormatted,updateMinutes:updateMinutes,updateRelative:updateRelative,updateWeekday:updateWeekday,updateWorkWeek:updateWorkWeek,validateNumber:validateNumber,validateTimestamp:validateTimestamp,weeksBetween:weeksBetween});function convertToUnit(e,t="px"){if(e)return isNaN(e)?String(e):"auto"===e?e:""+Number(e)+t}function indexOf(t,a){for(let e=0;e<t.length;e++)if(!0===a(t[e],e))return e;return-1}function minCharWidth(e,t){return 0===t?e:e.slice(0,t)}var helpers={convertToUnit:convertToUnit,indexOf:indexOf,minCharWidth:minCharWidth},helpers$1=Object.freeze({__proto__:null,convertToUnit:convertToUnit,default:helpers,indexOf:indexOf,minCharWidth:minCharWidth});const toCamelCase=e=>e.replace(/(-\w)/g,e=>e[1].toUpperCase());function getMouseEventHandlers(t,e,a,n){const r={};for(const d in a){const o=a[d],i=toCamelCase("on-"+d);if(!e.value)return console.warn("$listeners has not been set up"),{};if(void 0!==e.value[i]){const s="on"+o.event.charAt(0).toUpperCase()+o.event.slice(1),u=e=>{return(void 0===o.button||"buttons"in e&&e.buttons>0&&e.button===o.button)&&(o.prevent&&e.preventDefault(),o.stop&&e.stopPropagation(),t(d,n(e,d))),o.result};s in r?Array.isArray(r[s])?r[s].push(u):r[s]=[r[s],u]:r[s]=u}}return r}function getDefaultMouseEventHandlers(e,t,a,n){return getMouseEventHandlers(e,t,getMouseEventName(a),n)}function getMouseEventName(e){return{["click"+e]:{event:"click"},["contextmenu"+e]:{event:"contextmenu",prevent:!0,result:!1},["mousedown"+e]:{event:"mousedown"},["mousemove"+e]:{event:"mousemove"},["mouseup"+e]:{event:"mouseup"},["mouseenter"+e]:{event:"mouseenter"},["mouseleave"+e]:{event:"mouseleave"},["touchstart"+e]:{event:"touchstart"},["touchmove"+e]:{event:"touchmove"},["touchend"+e]:{event:"touchend"}}}function getRawMouseEvents(e){return Object.keys(getMouseEventName(e))}function useMouseEvents(a,n){return{getMouseEventHandlers:(e,t)=>getMouseEventHandlers(a,n,e,t),getDefaultMouseEventHandlers:(e,t)=>getDefaultMouseEventHandlers(a,n,e,t),getMouseEventName:getMouseEventName,getRawMouseEvents:getRawMouseEvents}}const ResizeObserverDirective={mounted(e,t){if("function"===typeof t.value){const a=t.value,n={callback:a,size:{width:0,height:0},observer:new ResizeObserver(e=>{const t=e[0].contentRect;t.width===n.size.width&&t.height===n.size.height||(n.size.width=t.width,n.size.height=t.height,n.debounceTimeout&&clearTimeout(n.debounceTimeout),n.debounceTimeout=setTimeout(()=>{n.callback(n.size),n.debounceTimeout=void 0},100))})};n.observer.observe(e),e.__onResizeObserver=n}},beforeUnmount(e){if(e.__onResizeObserver){const{observer:t,debounceTimeout:a}=e.__onResizeObserver;a&&clearTimeout(a),t.unobserve(e),delete e.__onResizeObserver}}};function useCalendar(t,a,{scrollArea:e,pane:n}){if(!a){const l="[error: renderCalendar] no renderFunc has been supplied to useCalendar";throw console.error(l),new Error(l)}const r=reactive({width:0,height:0}),d=ref(null);function o({width:e,height:t}){r.width=e,r.height=t}const i=computed(()=>{return!0!==t.noScroll&&e.value&&n.value&&r.height?e.value.offsetWidth-n.value.offsetWidth:0});function s(){}function u(){const e={ref:d,role:"complementary",lang:t.locale,class:`q-calendar ${t.dark?"q-calendar--dark":""} `+(t.bordered?"q-calendar__bordered":"")};return withDirectives(h("div",{...e},[a()]),[[ResizeObserverDirective,o]])}return{rootRef:d,scrollWidth:i,__initCalendar:s,__renderCalendar:u}}const isValidFocusType=e=>e.every(e=>["day","date","weekday","interval","time","resource","task"].includes(e)),useCommonProps={modelValue:{type:String,default:today(),validator:e=>""===e||validateTimestamp(e)},weekdays:{type:Array,default:()=>[0,1,2,3,4,5,6]},dateType:{type:String,default:"round",validator:e=>["round","rounded","square"].includes(e)},weekdayAlign:{type:String,default:"center",validator:e=>["left","center","right"].includes(e)},dateAlign:{type:String,default:"center",validator:e=>["left","center","right"].includes(e)},bordered:Boolean,dark:Boolean,noAria:Boolean,noActiveDate:Boolean,noHeader:Boolean,noScroll:Boolean,shortWeekdayLabel:Boolean,noDefaultHeaderText:Boolean,noDefaultHeaderBtn:Boolean,minWeekdayLabel:{type:[Number,String],default:1},weekdayBreakpoints:{type:Array,default:()=>[75,35],validator:e=>2===e.length},locale:{type:String,default:"en-US"},animated:Boolean,transitionPrev:{type:String,default:"slide-right"},transitionNext:{type:String,default:"slide-left"},disabledDays:Array,disabledBefore:String,disabledAfter:String,disabledWeekdays:{type:Array,default:()=>[]},dragEnterFunc:Function,dragOverFunc:Function,dragLeaveFunc:Function,dropFunc:Function,selectedDates:{type:[Array,Set],default:()=>[]},selectedStartEndDates:{type:Array,default:()=>[]},hoverable:Boolean,focusable:Boolean,focusType:{type:Array,default:()=>["date"],validator:isValidFocusType}};function useCommon(t,{startDate:e,endDate:a,times:n}){const r=computed(()=>parseTimestamp(e.value)),d=computed(()=>{return"0000-00-00"===a.value?getEndOfWeek(r.value,t.weekdays,n.today):parseTimestamp(a.value)||r.value}),o=computed(()=>createNativeLocaleFormatter(t.locale,()=>({timeZone:"UTC",day:"numeric"}))),i=computed(()=>createNativeLocaleFormatter(t.locale,(e,t)=>({timeZone:"UTC",weekday:t?"short":"long"}))),s=computed(()=>createNativeLocaleFormatter(t.locale,()=>({timeZone:"UTC",dateStyle:"full"})));function u(e,t){return e&&e.length>0&&e.includes(t.date)}function l(e,t){const a={firstDay:!1,betweenDays:!1,lastDay:!1};if(2===e.length){const n=getDayIdentifier(t),r=getDayIdentifier(parsed(e[0])),d=getDayIdentifier(parsed(e[1]));a.firstDay=r===n,a.lastDay=d===n,a.betweenDays=r<n&&d>n}return a}function c(e,t=!1,a=[],n=[],r=!1){const d=u(a,e),{firstDay:o,lastDay:i,betweenDays:s}=l(n,e);return{"q-past-day":!o&&!s&&!i&&!d&&!t&&!!e.past,"q-future-day":!o&&!s&&!i&&!d&&!t&&!!e.future,"q-outside":t,"q-current-day":!!e.current,"q-selected":d,"q-range-first":o,"q-range":s,"q-range-last":i,"q-range-hover":r&&(o||i||s),"q-disabled-day disabled":!0===e.disabled}}function m(e){return getStartOfWeek(e,t.weekdays,n.today)}function y(e){return getEndOfWeek(e,t.weekdays,n.today)}function p(){return{}}return{parsedStart:r,parsedEnd:d,dayFormatter:o,weekdayFormatter:i,ariaDateFormatter:s,arrayHasDate:u,checkDays:l,getRelativeClasses:c,startOfWeek:m,endOfWeek:y,dayStyleDefault:p}}const useTaskProps={modelValue:{type:String,default:today(),validator:e=>""===e||validateTimestamp(e)},modelTasks:{type:Array,default:()=>[]},modelTitle:{type:Array,default:()=>[]},modelFooter:{type:Array,default:()=>[]},taskKey:{type:[String,Number],default:"id"},weekdays:{type:Array,default:()=>[0,1,2,3,4,5,6]},dateType:{type:String,default:"round",validator:e=>["round","rounded","square"].includes(e)},dateHeader:{type:String,default:"stacked",validator:e=>["stacked","inline","inverted"].includes(e)},weekdayAlign:{type:String,default:"center",validator:e=>["left","center","right"].includes(e)},dateAlign:{type:String,default:"center",validator:e=>["left","center","right"].includes(e)},dayHeight:{type:[Number,String],default:0,validator:validateNumber},dayMinHeight:{type:[Number,String],default:40,validator:validateNumber},weekdayStyle:{type:Function,default:null},weekdayClass:{type:Function,default:null},dayStyle:{type:Function,default:null},dayClass:{type:Function,default:null},footerDayClass:{type:Function,default:null},view:{type:String,validator:e=>["day","week","month"].includes(e)},viewCount:{type:Number,default:1,validator:e=>validateNumber(e)&&e>0},taskWidth:{type:Number,default:200,validator:e=>validateNumber(e)&&e>0}};function useTask(t,e,{times:a}){const n=computed(()=>{if(!t.modelValue)throw new Error("QCalendarTask: no modelValue provided");if("day"===t.view)return parseTimestamp(t.modelValue);if("week"===t.view)return getStartOfWeek(parseTimestamp(t.modelValue),t.weekdays,a.today);if("month"===t.view)return getStartOfMonth(parseTimestamp(t.modelValue));throw new Error(`QCalendarTask: unknown 'view' type (${t.view})`)}),r=computed(()=>{if(!t.modelValue)throw new Error("QCalendarTask: no modelValue provided");if("day"===t.view){if(1===t.viewCount)return n.value;let e=copyTimestamp(n.value);return e=addToDate(e,{day:t.viewCount-1}),e}if("week"===t.view){if(1===t.viewCount)return getEndOfWeek(parseTimestamp(t.modelValue),t.weekdays,a.today);{let e=copyTimestamp(n.value);return e=addToDate(e,{day:(t.viewCount-1)*TIME_CONSTANTS.DAYS_IN.WEEK}),getEndOfWeek(e,t.weekdays,a.today)}}if("month"!==t.view)throw new Error(`QCalendarTask: unknown 'view' type (${t.view})`);if(1===t.viewCount)return getEndOfMonth(parseTimestamp(t.modelValue));{let e=copyTimestamp(n.value);return e=addToDate(e,{month:t.viewCount}),getEndOfMonth(e)}}),d=computed(()=>{return createDayList(n.value,r.value,a.today,t.weekdays,t.disabledBefore,t.disabledAfter,t.disabledWeekdays||[],t.disabledDays||[],Number.MAX_SAFE_INTEGER)});return{days:d,parsedStartDate:n,parsedEndDate:r}}const useTimesProps={now:{type:String,validator:e=>""===e||validateTimestamp(e),default:""}};function useTimes(e){const t=reactive({now:parseTimestamp("0000-00-00 00:00"),today:parseTimestamp("0000-00-00")}),a=computed(()=>e.now?parseTimestamp(e.now):d());function n(){t.now&&t.today&&(t.now.current=t.today.current=!0,t.now.past=t.today.past=!1,t.now.future=t.today.future=!1)}function r(){const e=a.value||d();o(e,t.now),i(e,t.now),o(e,t.today)}function d(){return parseDate(new Date)}function o(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)}function i(e,t){e.time!==t.time&&(t.hour=e.hour,t.minute=e.minute,t.time=e.time)}return watch(a,()=>r()),{times:t,parsedNow:a,setCurrent:n,updateCurrent:r,getNow:d,updateDay:o,updateTime:i}}function useRenderValues(r,{parsedView:d,parsedValue:o,times:i}){const e=computed(()=>{const e=o.value;let t=r.maxDays,a=e,n=e;switch(d.value){case"month":a=getStartOfMonth(e),n=getEndOfMonth(e),t=daysInMonth(a.year,a.month);break;case"week":case"week-agenda":case"week-scheduler":a=getStartOfWeek(e,r.weekdays,i.today),n=getEndOfWeek(a,r.weekdays,i.today),t=r.weekdays.length;break;case"day":case"scheduler":case"agenda":n=moveRelativeDays(copyTimestamp(n),nextDay,t>1?t-1:t,r.weekdays),n=updateFormatted(n);break;case"month-interval":case"month-scheduler":case"month-agenda":a=getStartOfMonth(e),n=getEndOfMonth(e),n=updateFormatted(n),t=daysInMonth(a.year,a.month);break;case"resource":t=1,n=moveRelativeDays(copyTimestamp(n),nextDay,t,r.weekdays),n=updateFormatted(n);break}return{start:a,end:n,maxDays:t}});return{renderValues:e}}const useMoveEmits=["moved"];function useMove(s,{parsedView:u,parsedValue:l,direction:c,maxDays:m,times:y,emittedValue:p,emit:f}){function e(a=1){if(0===a)p.value=today();else{let e=copyTimestamp(l.value);const n=getEndOfMonth(e),r=a>0,d=r?nextDay:prevDay,o=r?n.day:1;let t=r?a:-a;c.value=r?"next":"prev";const i=s.weekdays.length;while(--t>=0)switch(u.value){case"month":e.day=o,e=d(e),e=updateWeekday(e);while(!s.weekdays.includes(Number(e.weekday)))e=addToDate(e,{day:r?1:-1});break;case"week":case"week-agenda":case"week-scheduler":e=relativeDays(e,d,i,s.weekdays);break;case"day":case"scheduler":case"agenda":e=relativeDays(e,d,m.value,s.weekdays);break;case"month-interval":case"month-agenda":case"month-scheduler":e.day=o,e=d(e);break;case"resource":e=relativeDays(e,d,m.value,s.weekdays);break}e=updateWeekday(e),e=updateFormatted(e),e=updateDayOfYear(e),e=updateRelative(e,y.now),p.value=e.date,f("moved",e)}}return{move:e}}const listenerRE=/^on[A-Z]/;function useEmitListeners(e=getCurrentInstance()){return{emitListeners:computed(()=>{const t={};return e?.vnode?.props&&Object.keys(e.vnode.props).forEach(e=>{listenerRE.test(e)&&(t[e]=!0)}),t})}}function useFocusHelper(){const e={"aria-hidden":"true",class:"q-calendar__focus-helper"};return[h("span",e)]}function useButton(){function e({focusable:e,focusType:t},a,n){const r=e&&t.includes("date");return h("button",{...a,tabindex:r?0:-1},[n,r&&useFocusHelper()])}return{renderButton:e}}const useCheckChangeEmits=["change"];function useCheckChange(n,{days:r,lastStart:d,lastEnd:o}){function e(){const e=r.value;if(0===e.length)return!1;const t=e[0].date,a=e[e.length-1].date;return(!d.value||!o.value||t!==d.value||a!==o.value)&&(d.value=t,o.value=a,n("change",{start:t,end:a,days:e}),!0)}return{checkChange:e}}function useEventUtils(){function e(e,t){return(Array.isArray(t)?t:[t]).includes(e.keyCode)}return{isKeyCode:e}}const isKeyCode=useEventUtils().isKeyCode,useNavigationProps={useNavigation:Boolean};function useNavigation(t,{rootRef:a,focusRef:n,focusValue:r,datesRef:d,parsedView:o,emittedValue:i,direction:s,times:u}){let e=!1;function l(){e||document&&(e=!0,document.addEventListener("keyup",f),document.addEventListener("keydown",p))}function c(){document&&(document.removeEventListener("keyup",f),document.removeEventListener("keydown",p),e=!1)}function m(e){if(e&&document){const t=document.activeElement;if(t!==document.body&&a.value?.contains(t))return!0}return!1}function y(){let t=0;const a=window.setInterval(()=>{const e=d.value[n.value];e&&(e.focus(),50!==++t)&&document.activeElement!==e||window.clearInterval(a)},250)}function p(e){m(e)&&isKeyCode(e,[33,34,35,36,37,38,39,40])&&(e.stopPropagation(),e.preventDefault())}function f(e){if(m(e)&&isKeyCode(e,[33,34,35,36,37,38,39,40])){const t={33:D,34:k,35:w,36:_,37:T,38:v,39:g,40:h};t[e.keyCode]?.()}}function v(){let e=copyTimestamp(r.value);if("month"===o.value){if(e=addToDate(e,{day:-7}),r.value.month!==e.month)return s.value="prev",void(i.value=e.date)}else e=addToDate(e,{minute:Number(t.intervalMinutes)});s.value="prev",n.value=e.date}function h(){let e=copyTimestamp(r.value);if("month"===o.value){if(e=addToDate(e,{day:7}),r.value.month!==e.month)return s.value="next",void(i.value=e.date)}else e=addToDate(e,{minute:Number(t.intervalMinutes)});s.value="next",n.value=e.date}function T(){let e=copyTimestamp(r.value);s.value="prev";do{e=addToDate(e,{day:-1})}while(!t.weekdays.includes(Number(e.weekday)));n.value=e.date}function g(){let e=copyTimestamp(r.value);s.value="next";do{e=addToDate(e,{day:1})}while(!t.weekdays.includes(Number(e.weekday)));n.value=e.date}function D(){let e=copyTimestamp(r.value);e="month"===o.value?addToDate(e,{month:-1}):addToDate(e,{day:-7}),s.value="prev",n.value=e.date}function k(){let e=copyTimestamp(r.value);e="month"===o.value?addToDate(e,{month:1}):addToDate(e,{day:7}),s.value="next",n.value=e.date}function _(){let e=copyTimestamp(r.value);e="month"===o.value?getStartOfMonth(e):getStartOfWeek(e,t.weekdays||[],u.today);while(!t.weekdays.includes(Number(e.weekday)))e=addToDate(e,{day:-1});n.value=e.date}function w(){let e=copyTimestamp(r.value);e="month"===o.value?getEndOfMonth(e):getEndOfWeek(e,t.weekdays||[],u.today);while(!t.weekdays.includes(Number(e.weekday)))e=addToDate(e,{day:-1});n.value=e.date}return onBeforeUnmount(()=>{c()}),watch(()=>t.useNavigation,e=>{(!0===e?l:c)()}),!0===t.useNavigation&&l(),{startNavigation:l,endNavigation:c,tryFocus:y}}const useCellWidthProps={cellWidth:[Number,String]},renderButton=useButton().renderButton;var QCalendarTask=defineComponent({name:"QCalendarTask",directives:{ResizeObserver:ResizeObserverDirective},props:{...useTimesProps,...useNavigationProps,...useCellWidthProps,...useCommonProps,...useTaskProps},emits:["update:model-value","update:model-tasks","update:model-title","update:model-footer","task-expanded",...useCheckChangeEmits,...useMoveEmits,...getRawMouseEvents("-date"),...getRawMouseEvents("-day"),...getRawMouseEvents("-head-day")],setup(c,{slots:m,emit:u,expose:H}){const e=ref(null),q=ref(null),d=ref("next"),o=ref(c.modelValue||today()),i=ref("0000-00-00"),t=ref(0),y=ref(c.modelValue),p=ref(c.modelValue||today()),a=ref(parsed(c.modelValue||today())),f=ref({}),s=reactive({width:0,height:0}),v=ref(""),T=ref(""),U=ref(null),Y=ref(null),n=(watch(()=>c.view,()=>{t.value=0}),computed(()=>{return"month"===c.view?"month-interval":c.view})),r=getCurrentInstance();if(null===r)throw new Error("current instance is null");const l=useEmitListeners(r).emitListeners,{times:g,setCurrent:L,updateCurrent:D}=useTimes(c),{parsedStart:B,dayFormatter:P,weekdayFormatter:V,ariaDateFormatter:z,dayStyleDefault:k,getRelativeClasses:_}=(D(),L(),useCommon(c,{startDate:o,endDate:i,times:g})),w=computed(()=>{return parseTimestamp(c.modelValue,g.now)||B.value||g.today}),$=(a.value=w.value,p.value=w.value.date,useRenderValues(c,{parsedView:n,times:g,parsedValue:w})).renderValues,{rootRef:K,__renderCalendar:Z}=useCalendar(c,Ae,{scrollArea:e,pane:q}),{days:N,parsedStartDate:b,parsedEndDate:M}=useTask(c,u,{times:g}),I=useMove(c,{parsedView:n,parsedValue:w,direction:d,maxDays:t,times:g,emittedValue:y,emit:u}).move,E=useMouseEvents(u,l).getDefaultMouseEventHandlers,j=useCheckChange(u,{days:N,lastStart:U,lastEnd:Y}).checkChange,S=useEventUtils().isKeyCode,X=useNavigation(c,{rootRef:K,focusRef:p,focusValue:a,datesRef:f,parsedView:n,emittedValue:y,direction:d,times:g}).tryFocus,O=ref(!0),A=computed(()=>{return void 0!==c.cellWidth?parseInt(String(c.cellWidth),10):150}),W=computed(()=>{return!0===c.focusable&&c.focusType.includes("day")}),Q=computed(()=>{return!0===c.focusable&&c.focusType.includes("date")&&!0!==W.value}),C=computed(()=>{return!0===c.focusable&&c.focusType.includes("weekday")}),G=computed(()=>{return parseInt(String(c.dayHeight),10)}),J=computed(()=>{return parseInt(String(c.dayMinHeight),10)});function ee(){y.value=today()}function te(e=1){I(e)}function ae(e=1){I(-e)}function ne({width:e,height:t}){s.width=e,s.height=t}function F(e){return e.date===y.value}function re(e,t,a){const n=m.day,r=c.dayStyle||k,d=!0!==c.noActiveDate&&w.value.date===e.date,o=t[c.taskKey],i={timestamp:e,task:t,taskIndex:a,activeDate:d,droppable:T.value===o},s=convertToUnit(A.value),u={width:s,minWidth:s,maxWidth:s,...r({scope:i})},l="function"===typeof c.dayClass?c.dayClass({scope:i}):{};return h("div",{tabindex:!0===W.value?0:-1,class:{"q-calendar-task__task--day":!0,...l,..._(e),"q-active-date":!0===d,"q-calendar__hoverable":!0===c.hoverable,"q-calendar__focusable":!0===W.value},style:u,onFocus:()=>{W.value},...E("-day",e=>{return{scope:i,event:e}}),onDragenter:e=>{void 0!==c.dragEnterFunc&&"function"===typeof c.dragEnterFunc&&(!0===c.dragEnterFunc(e,"day",{scope:i})?T.value=o:T.value="")},onDragover:e=>{void 0!==c.dragOverFunc&&"function"===typeof c.dragOverFunc&&(!0===c.dragOverFunc(e,"day",{scope:i})?T.value=o:T.value="")},onDragleave:e=>{void 0!==c.dragLeaveFunc&&"function"===typeof c.dragLeaveFunc&&(!0===c.dragLeaveFunc(e,"day",{scope:i})?T.value=o:T.value="")},onDrop:e=>{void 0!==c.dropFunc&&"function"===typeof c.dropFunc&&(!0===c.dropFunc(e,"day",{scope:i})?T.value=o:T.value="")}},[n&&n({scope:i}),useFocusHelper()])}function de(t,a){return N.value.map(e=>re(e,t,a))}function oe(e,t){const a=m.days,n={timestamps:N.value,days:N.value,task:e,taskIndex:t,cellWidth:A.value};return h("div",{class:"q-calendar-task__task--days-row"},[de(e,t),a&&a({scope:n})])}function ie(t,e,a=0,n=!0){const r=0===a?m.task:m.subtask,d={start:b.value,end:M.value,task:t,taskIndex:e,expanded:n},o=convertToUnit(c.taskWidth),i={width:o,minWidth:o,maxWidth:o},s=!0===c.focusable&&c.focusType.includes("task");return h("div",{class:{"q-calendar-task__task--item":!0,"q-calendar__sticky":!0===O.value,"q-calendar__hoverable":!0===c.hoverable,"q-calendar__focusable":!0===s},style:i},[h("div",{style:{flexDirection:"column",justifyContent:"center",alignItems:"center",width:10+10*a+"px"}},[h("div",{class:{"q-calendar__parent":void 0!==t.children,"q-calendar__parent--expanded":void 0!==t.children&&!0===t.expanded,"q-calendar__parent--collapsed":void 0!==t.children&&!0!==t.expanded},onClick:e=>{e.stopPropagation(),t.expanded=!t.expanded,u("task-expanded",{expanded:t.expanded,scope:d})}})]),r&&r({scope:d}),useFocusHelper()])}function se(e,t,a=0,n=!0){const r=void 0!==e.height?convertToUnit(parseInt(e.height,10)):G.value>0?convertToUnit(G.value):"auto",d=J.value>0?convertToUnit(J.value):void 0,o={height:r},i=(void 0!==d&&(o.minHeight=d),h("div",{key:e[c.taskKey]+"-"+t,class:{"q-calendar-task__task":0===a,"q-calendar-task__task--section":0!==a},style:o},[ie(e,t,a,n),oe(e,t)]));return void 0!==e.children?[i,h("div",{class:{"q-calendar__child":!0,"q-calendar__child--expanded":!0===n,"q-calendar__child--collapsed":!0!==n}},[ue(e.children,a+1,!1===n?n:e.expanded)])]:[i]}function ue(e=void 0,a=0,n=!0){return void 0===e&&(e=c.modelTasks),e.map((e,t)=>{return se(e,t,a,void 0!==e.children?e.expanded:n)}).flat()}function le(){return h("div",{class:{"q-calendar-task__task--container":!0,"q-calendar__sticky":!0===O.value}},[ue()])}function ce(e,t){const a=m["footer-task"],n={start:b.value,end:M.value,footer:e,index:t},r=convertToUnit(c.taskWidth),d={width:r,minWidth:r,maxWidth:r};return h("div",{class:{"q-calendar-task__footer--task":!0,"q-calendar__sticky":!0===O.value},style:d},[a&&a({scope:n})])}function me(e,t,a){const n=m["footer-day"],r={timestamp:e,footer:t,index:a},d=convertToUnit(A.value),o={width:d,minWidth:d,maxWidth:d},i="function"===typeof c.footerDayClass?c.footerDayClass({scope:r}):{};return h("div",{class:{"q-calendar-task__footer--day":!0,...i,..._(e),"q-calendar__hoverable":!0===c.hoverable,"q-calendar__focusable":!0===W.value},style:o},[n&&n({scope:r})])}function ye(t,a){return h("div",{class:"q-calendar-task__footer--day-wrapper"},[N.value.map(e=>me(e,t,a))])}function pe(){const a=!0===c.focusable&&c.focusType.includes("task");return c.modelFooter.map((e,t)=>{return h("div",{class:{"q-calendar-task__footer--wrapper":!0,"q-calendar__hoverable":!0===c.hoverable,"q-calendar__focusable":!0===a}},{default:()=>[ce(e,t),ye(e,t)]})})}function fe(){return h("div",{class:{"q-calendar-task__footer":!0,"q-calendar__sticky":!0===O.value}},pe())}function ve(){return h("div",{class:{"q-calendar-task__container":!0}},[!0!==c.noHeader&&Ee(),le(),fe()])}function he(){const e=m["head-tasks"],t={start:b.value,end:M.value},a=convertToUnit(parseInt(String(c.taskWidth),10)),n={width:a,minWidth:a,maxWidth:a};return h("div",{class:{"q-calendar-task__head--tasks":!0,"q-calendar__sticky":!0===O.value},style:n},[e&&e({scope:t})])}function Te(e,t){const a=m["title-task"],n=convertToUnit(parseInt(String(c.taskWidth),10)),r={width:n,minWidth:n,maxWidth:n},d={start:b.value,end:M.value,cellWidth:n,title:e,index:t};return h("div",{class:{"q-calendar-task__title--task":!0,"q-calendar__sticky":!0===O.value},style:r},[a&&a({scope:d})])}function x(e){const t=m["head-weekday-label"],a=!0!==c.noActiveDate&&F(e),n={activeDate:a,timestamp:e,disabled:!!c.disabledWeekdays&&c.disabledWeekdays.includes(Number(e.weekday))},r={class:{"q-calendar-task__head--weekday":!0,["q-calendar__"+c.weekdayAlign]:!0,"q-calendar__ellipsis":!0}};return h("div",r,t&&t({scope:n})||ge(e,c.shortWeekdayLabel))}function ge(e,t){const a=V.value(e,t||c.weekdayBreakpoints[0]>0&&A.value<=c.weekdayBreakpoints[0]);return h("span",{class:"q-calendar__ellipsis"},c.weekdayBreakpoints[1]>0&&A.value<=c.weekdayBreakpoints[1]?minCharWidth(a,Number(c.minWeekdayLabel)):a)}function R(e){const t={class:{"q-calendar-task__head--date":!0,["q-calendar__"+c.dateAlign]:!0}};return h("div",t,De(e))}function De(a){const e=!0!==c.noActiveDate&&F(a),t=P.value(a,!1),n=m["head-day-label"],r=m["head-day-button"],d={dayLabel:t,timestamp:a,activeDate:e},o=a.date,i={key:o,tabindex:!0===Q.value?0:-1,class:{"q-calendar-task__head--day__label":!0,"q-calendar__button":!0,"q-calendar__button--round":"round"===c.dateType,"q-calendar__button--rounded":"rounded"===c.dateType,"q-calendar__button--bordered":!0===a.current,"q-calendar__hoverable":!0===c.hoverable,"q-calendar__focusable":!0===Q.value},disabled:a.disabled,onKeydown:e=>{!0!==a.disabled&&S(e,[13,32])&&(e.stopPropagation(),e.preventDefault())},onKeyup:e=>{!0!==a.disabled&&S(e,[13,32])&&(y.value=a.date,void 0!==l.value.onClickDate)&&u("click-date",{scope:d})},...E("-date",(e,t)=>{return"click-date"!==t&&"contextmenu-date"!==t||(y.value=a.date,"click-date"===t&&e.preventDefault()),{scope:d,event:e}})};return!0!==c.noAria&&(i.ariaLabel=z.value(a,!1)),r?r({scope:d}):renderButton(c,i,n?n({scope:d}):t)}function ke(e){return"stacked"===c.dateHeader?[!0!==c.noDefaultHeaderText&&x(e),!0!==c.noDefaultHeaderBtn&&R(e)].filter(e=>!1!==e):"inline"===c.dateHeader?("left"===c.weekdayAlign&&"right"===c.dateAlign||"right"===c.weekdayAlign&&c.dateAlign,h("div",{class:"q-calendar__header--inline"},[!0!==c.noDefaultHeaderText&&x(e),!0!==c.noDefaultHeaderBtn&&R(e)])):"inverted"===c.dateHeader?("left"===c.weekdayAlign&&"right"===c.dateAlign||"right"===c.weekdayAlign&&c.dateAlign,h("div",{class:"q-calendar__header--inline"},[!0!==c.noDefaultHeaderBtn&&R(e),!0!==c.noDefaultHeaderText&&x(e)])):void 0}function _e(e,t,a){const n=m["title-day"],r=convertToUnit(A.value),d={width:r,minWidth:r,maxWidth:r},o={timestamp:e,title:t,index:a,cellWidth:A.value},i="function"===typeof c.dayClass?c.dayClass({scope:o}):{},s=!0===c.focusable&&c.focusType.includes("day");return h("div",{class:{"q-calendar-task__title--day":!0,...i,..._(e),"q-calendar__hoverable":!0===c.hoverable,"q-calendar__focusable":!0===s},style:d},[n&&n({scope:o}),useFocusHelper()])}function we(t){const e=m["head-day"],a=m["head-date"],n=!0!==c.noActiveDate&&F(t),r={timestamp:t,activeDate:n,droppable:v.value=t.date,disabled:!!c.disabledWeekdays&&c.disabledWeekdays.includes(Number(t.weekday))},d=c.weekdayStyle||k,o="function"===typeof c.weekdayClass?c.weekdayClass({scope:r}):{},i=convertToUnit(A.value),s={width:i,minWidth:i,maxWidth:i,...d({scope:r})},u=t.date,l={key:u,ref:e=>{f.value[u]=e},tabindex:!0===C.value?0:-1,class:{"q-calendar-task__head--day":!0,...o,..._(t),"q-active-date":n,"q-calendar__hoverable":!0===c.hoverable,"q-calendar__focusable":!0===C.value},style:s,onFocus:()=>{!0===C.value&&(p.value=u)},onKeydown:e=>{!0!==t.disabled&&S(e,[13,32])&&(e.stopPropagation(),e.preventDefault())},onKeyup:e=>{!0!==t.disabled&&S(e,[13,32])&&(y.value=t.date)},...E("-head-day",e=>{return{scope:r,event:e}}),onDragenter:e=>{void 0!==c.dragEnterFunc&&"function"===typeof c.dragEnterFunc&&(!0===c.dragEnterFunc(e,"head-day",{scope:r})?v.value=t.date:v.value="")},onDragover:e=>{void 0!==c.dragOverFunc&&"function"===typeof c.dragOverFunc&&(!0===c.dragOverFunc(e,"head-day",{scope:r})?v.value=t.date:v.value="")},onDragleave:e=>{void 0!==c.dragLeaveFunc&&"function"===typeof c.dragLeaveFunc&&(!0===c.dragLeaveFunc(e,"head-day",{scope:r})?v.value=t.date:v.value="")},onDrop:e=>{void 0!==c.dropFunc&&"function"===typeof c.dropFunc&&(!0===c.dropFunc(e,"head-day",{scope:r})?v.value=t.date:v.value="")}};return h("div",l,[void 0!==e&&e({scope:r}),void 0===e&&ke(t),void 0===e&&a&&a({scope:r}),useFocusHelper()])}function Ne(){return N.value.map(e=>we(e))}function be(t,a){return N.value.map(e=>_e(e,t,a))}function Me(){return h("div",{class:{"q-calendar-task__head--days":!0}},[...Ne()])}function Ie(e,t){return h("div",{class:{"q-calendar-task__title--days":!0}},[...be(e,t)])}function Ee(){return h("div",{roll:"presentation",class:{"q-calendar-task__head":!0,"q-calendar__sticky":!0===O.value},style:{}},[h("div",{style:{position:"relative",display:"flex"}},[he(),Me()]),c.modelTitle.map((e,t)=>h("div",{class:"q-calendar-task__title",style:{position:"relative",display:"flex"}},[Te(e,t),Ie(e,t)]))])}function Se(){return h("div",{class:"q-calendar-task__body"},[Oe()])}function Oe(){return h("div",{ref:e,class:{"q-calendar-task__scroll-area":!0,"q-calendar__scroll":!0}},[ve()])}function Ae(){const{start:e,end:t}=$.value,a=(o.value=e.date,i.value=t.date,s.width>0),n=withDirectives(h("div",{key:o.value,class:"q-calendar-task"},[!0===a&&Se()]),[[ResizeObserverDirective,ne]]);if(!0!==c.animated)return n;{const r="q-calendar--"+("prev"===d.value?c.transitionPrev:c.transitionNext);return h(Transition,{name:r,appear:!0},()=>n)}}return watch([N],j,{deep:!0,immediate:!0}),watch(()=>c.modelValue,(e,t)=>{if(y.value!==e){if(!0===c.animated){const a=getDayIdentifier(parsed(e)),n=getDayIdentifier(parsed(t));d.value=a>=n?"next":"prev"}y.value=e}p.value=e}),watch(y,(e,t)=>{if(y.value!==c.modelValue){if(!0===c.animated){const a=getDayIdentifier(parsed(e)),n=getDayIdentifier(parsed(t));d.value=a>=n?"next":"prev"}u("update:model-value",e)}}),watch(p,e=>{e&&(a.value=parseTimestamp(e))}),watch(a,()=>{f.value[p.value]?f.value[p.value].focus():X()}),onBeforeUpdate(()=>{f.value={}}),onMounted(()=>{}),H({prev:ae,next:te,move:I,moveToToday:ee,updateCurrent:D}),()=>Z()}});const version="4.1.0";var Plugin={version:version,QCalendarTask:QCalendarTask,...Timestamp$1,...helpers$1,install(e){e.component(String(QCalendarTask.name),QCalendarTask)}};export{DAYS_IN_MONTH,DAYS_IN_MONTH_LEAP,DAYS_IN_MONTH_MAX,DAYS_IN_MONTH_MIN,DAY_MIN,FIRST_HOUR,MONTH_MAX,MONTH_MIN,PARSE_DATE,PARSE_DATETIME,PARSE_TIME,QCalendarTask,TIME_CONSTANTS,addToDate,compareDate,compareDateTime,compareTime,compareTimestamps,convertToUnit,copyTimestamp,createDayList,createIntervalList,createNativeLocaleFormatter,daysBetween,daysInMonth,Plugin as default,diffTimestamp,findWeekday,getDate,getDateTime,getDayIdentifier,getDayOfYear,getDayTimeIdentifier,getEndOfMonth,getEndOfWeek,getMonthFormatter,getMonthNames,getStartOfMonth,getStartOfWeek,getTime,getTimeIdentifier,getWeekday,getWeekdayFormatter,getWeekdayNames,getWorkWeek,indexOf,isBetweenDates,isLeapYear,isOverlappingDates,isToday,makeDate,makeDateTime,maxTimestamp,minCharWidth,minTimestamp,moveRelativeDays,nextDay,padNumber,parseDate,parseTime,parseTimestamp,parsed,prevDay,relativeDays,today,updateDayOfYear,updateDisabled,updateFormatted,updateMinutes,updateRelative,updateWeekday,updateWorkWeek,validateNumber,validateTimestamp,version,weeksBetween}; | ||
import{reactive,ref,computed,withDirectives,h,watch,getCurrentInstance,onBeforeUnmount,defineComponent,onBeforeUpdate,onMounted,Transition}from"vue";const PARSE_DATETIME=/^(\d{4})-(\d{1,2})(-(\d{1,2}))?([^\d]+(\d{1,2}))?(:(\d{1,2}))?(:(\d{1,2}))?(.(\d{1,3}))?$/,PARSE_DATE=/^(\d{4})-(\d{1,2})(-(\d{1,2}))?/,PARSE_TIME=/(\d\d?)(:(\d\d?)|)(:(\d\d?)|)/,DAYS_IN_MONTH=[0,31,28,31,30,31,30,31,31,30,31,30,31],DAYS_IN_MONTH_LEAP=[0,31,29,31,30,31,30,31,31,30,31,30,31],TIME_CONSTANTS={MILLISECONDS_IN:{SECOND:1e3,MINUTE:6e4,HOUR:36e5,DAY:864e5,WEEK:6048e5},SECONDS_IN:{MINUTE:60,HOUR:3600,DAY:86400,WEEK:604800},MINUTES_IN:{MINUTE:1,HOUR:60,DAY:1440,WEEK:10080},HOURS_IN:{DAY:24,WEEK:168},DAYS_IN:{WEEK:7}},DAYS_IN_MONTH_MIN=28,DAYS_IN_MONTH_MAX=31,MONTH_MAX=12,MONTH_MIN=1,DAY_MIN=1,FIRST_HOUR=0;function validateTimestamp(e){return"string"===typeof e&&PARSE_DATETIME.test(e)}function parsed(e){if("string"!==typeof e)return null;const t=PARSE_DATETIME.exec(e);if(!t||!t[1]||!t[2])return null;const a=parseInt(t[1],10),n=parseInt(t[2],10),r=parseInt(t[4]||"1",10),d=parseInt(t[6]||"0",10),o=parseInt(t[8]||"0",10);return{date:e,time:d.toString().padStart(2,"0")+":"+o.toString().padStart(2,"0"),year:a,month:n,day:r,hour:d,minute:o,hasDay:!!t[4],hasTime:!0,past:!1,current:!1,future:!1,disabled:!1,weekday:0,doy:0,workweek:0}}function parseDate(e,t=!1){if(!(e instanceof Date))return null;const a=t?"UTC":"";return updateFormatted({date:padNumber(e[`get${a}FullYear`](),4)+"-"+padNumber(e[`get${a}Month`]()+1,2)+"-"+padNumber(e[`get${a}Date`](),2),time:padNumber(e[`get${a}Hours`]()||0,2)+":"+padNumber(e[`get${a}Minutes`]()||0,2),year:e[`get${a}FullYear`](),month:e[`get${a}Month`]()+1,day:e[`get${a}Date`](),hour:e[`get${a}Hours`](),minute:e[`get${a}Minutes`](),weekday:0,doy:0,workweek:0,hasDay:!0,hasTime:!0,past:!1,current:!1,future:!1,disabled:!1})}function padNumber(e,t){let a=String(e);while(a.length<t)a="0"+a;return a}function isLeapYear(e){return e%4===0&&e%100!==0||e%400===0}function daysInMonth(e,t){return(isLeapYear(e)?DAYS_IN_MONTH_LEAP:DAYS_IN_MONTH)[t]}function nextDay(e){const t=new Date(e.year,e.month-1,e.day+1);return updateFormatted(normalizeTimestamp({...e,year:t.getFullYear(),month:t.getMonth()+1,day:t.getDate()}))}function prevDay(e){const t=new Date(e.year,e.month-1,e.day-1);return updateFormatted(normalizeTimestamp({...e,year:t.getFullYear(),month:t.getMonth()+1,day:t.getDate()}))}function today(){const e=new Date,t=e.getMonth()+1,a=e.getDate(),n=e.getFullYear();return[n,padNumber(t,2),padNumber(a,2)].join("-")}function isToday(e){return e===today()}function getStartOfWeek(e,t,a){let n=copyTimestamp(e);if(t){if(1===n.day||0===n.weekday)while(!t.includes(Number(n.weekday)))n=nextDay(n);n=findWeekday(n,t[0],prevDay),n=updateFormatted(n),a&&(n=updateRelative(n,a,n.hasTime))}return n}function getEndOfWeek(e,t,a){let n=copyTimestamp(e);if(t&&Array.isArray(t)){const r=daysInMonth(n.year,n.month);if(r===n.day||n.weekday===t[t.length-1])while(!t.includes(Number(n.weekday)))n=prevDay(n);n=findWeekday(n,t[t.length-1],nextDay),n=updateFormatted(n),a&&(n=updateRelative(n,a,n.hasTime))}return n}function getStartOfMonth(e){let t=copyTimestamp(e);return t.day=DAY_MIN,t=updateFormatted(t),t}function getEndOfMonth(e){let t=copyTimestamp(e);return t.day=daysInMonth(t.year,t.month),t=updateFormatted(t),t}function parseTime(e){const t=Object.prototype.toString.call(e);switch(t){case"[object Number]":return e;case"[object String]":{const a=PARSE_TIME.exec(e);return a?60*parseInt(a[1],10)+parseInt(a[3]||"0",10):!1}case"[object Object]":return"object"!==typeof e||"number"!==typeof e.hour||"number"!==typeof e.minute?!1:"object"===typeof e&&"hour"in e&&"minute"in e&&60*e.hour+e.minute}return!1}function compareTimestamps(e,t){return!(!e||!t)&&e.year===t.year&&e.month===t.month&&e.day===t.day&&e.hour===t.hour&&e.minute===t.minute}function compareDate(e,t){return getDate(e)===getDate(t)}function compareTime(e,t){return getTime(e)===getTime(t)}function compareDateTime(e,t){return getDateTime(e)===getDateTime(t)}function parseTimestamp(e,t=null){let a=parsed(e);return a?(a=updateFormatted(a),t&&(a=updateRelative(a,t,a.hasTime)),a):null}function getDayIdentifier(e){return 1e8*(e.year??0)+1e6*(e.month??0)+1e4*(e.day??0)}function getTimeIdentifier(e){return 100*(e.hour??0)+(e.minute??0)}function getDayTimeIdentifier(e){return getDayIdentifier(e)+getTimeIdentifier(e)}function diffTimestamp(e,t,a=!1){const n=Date.UTC(e.year??0,(e.month??1)-1,e.day??1,e.hour??0,e.minute??0),r=Date.UTC(t.year??0,(t.month??1)-1,t.day??1,t.hour??0,t.minute??0);return!0===a&&r<n?0:r-n}function updateRelative(e,t,a=!1){let n=copyTimestamp(e),r=getDayIdentifier(t),d=getDayIdentifier(n),o=r===d;return n.hasTime&&a&&o&&(r=getTimeIdentifier(t),d=getTimeIdentifier(n),o=r===d),n.past=d<r,n.current=o,n.future=d>r,n.currentWeekday=n.weekday===t.weekday,n}function updateMinutes(e,t,a=null){let n=copyTimestamp(e);return n.hasTime=!0,n.hour=Math.floor(t/TIME_CONSTANTS.MINUTES_IN.HOUR),n.minute=t%TIME_CONSTANTS.MINUTES_IN.HOUR,n.time=getTime(n),a&&(n=updateRelative(n,a,!0)),n}function updateWeekday(e){let t=copyTimestamp(e);return t.weekday=getWeekday(t),t}function updateDayOfYear(e){let t=copyTimestamp(e);return t.doy=getDayOfYear(t)||0,t}function updateWorkWeek(e){let t=copyTimestamp(e);return t.workweek=getWorkWeek(t),t}function updateDisabled(e,t,a,n,r){let d=copyTimestamp(e);const o=getDayIdentifier(d);if(void 0!==t){const l=parsed(t);if(l){const c=getDayIdentifier(l);o<=c&&(d.disabled=!0)}}if(!0!==d.disabled&&void 0!==a){const m=parsed(a);if(m){const y=getDayIdentifier(m);o>=y&&(d.disabled=!0)}}if(!0!==d.disabled&&Array.isArray(n)&&n.length>0)for(var i in n)if(n[i]===d.weekday){d.disabled=!0;break}if(!0!==d.disabled&&Array.isArray(r)&&r.length>0)for(var s in r)if(Array.isArray(r[s])&&2===r[s].length&&r[s][0]&&r[s][1]){const p=parsed(r[s][0]),f=parsed(r[s][1]);if(p&&f&&isBetweenDates(d,p,f)){d.disabled=!0;break}}else{const v=r[s];if(Array.isArray(v))for(var u of v){const h=parseTimestamp(u);if(h){const T=getDayIdentifier(h);if(T===o){d.disabled=!0;break}}}else if(v){const g=parseTimestamp(v);if(g){const D=getDayIdentifier(g);D===o&&(d.disabled=!0)}}}return d}function updateFormatted(e){let t=copyTimestamp(e);return t.hasTime=!0,t.time=getTime(t),t.date=getDate(t),t.weekday=getWeekday(t),t.doy=getDayOfYear(t)||0,t.workweek=getWorkWeek(t),t}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){let t=copyTimestamp(e);if(0===t.year){const r=parseTimestamp(today());r&&(t=r)}const a=new Date(Date.UTC(t.year,t.month-1,t.day)),n=4;a.setUTCDate(a.getUTCDate()-(a.getUTCDay()+6)%7+n),a.setUTCDate(a.getUTCDate()+n-(a.getUTCDay()||7));e=new Date(Date.UTC(a.getUTCFullYear(),0,1)),e=Math.ceil(((a.valueOf()-e.valueOf())/864e5+1)/7);return e}function getWeekday(e){let t=e.weekday;if(e.hasDay){const a=Math.floor,n=e.day,r=(e.month+9)%MONTH_MAX+1,d=a(e.year/100),o=e.year%100-(e.month<=2?1:0);t=((n+a(2.6*r-.2)-2*d+o+a(o/4)+a(d/4))%7+7)%7}return t??0}function copyTimestamp(e){return{...e}}function getDate(e){let 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):"00:00")}function moveRelativeDays(e,t=nextDay,a=1,n=[0,1,2,3,4,5,6]){const r=copyTimestamp(e);return relativeDays(r,t,a,n)}function relativeDays(e,t=nextDay,a=1,n=[0,1,2,3,4,5,6]){let r=copyTimestamp(e);n.includes(Number(r.weekday))||0!==r.weekday||t!==nextDay||++a;while(--a>=0)r=t(r),n.length<7&&!n.includes(Number(r.weekday))&&++a;return r}function findWeekday(e,t,a=nextDay,n=6){let r=copyTimestamp(e);while(r.weekday!==t&&--n>=0)r=a(r);return r}function createDayList(e,t,a,n=[0,1,2,3,4,5,6],r=void 0,d=void 0,o=[],i=[],s=42,u=0){const l=getDayIdentifier(e),c=getDayIdentifier(t),m=[];let y=copyTimestamp(e),p=0,f=p===c;if(!(c<l))while((!f||m.length<u)&&m.length<s){if(p=getDayIdentifier(y),f=f||p>c&&m.length>=u,f)break;if(n.includes(Number(y.weekday))){let e=copyTimestamp(y);e=updateFormatted(e),e=updateRelative(e,a),e=updateDisabled(e,r,d,o,i),m.push(e)}y=relativeDays(y,nextDay)}return m}function createIntervalList(t,a,n,r,d){const o=[];for(let e=0;e<r;++e){const i=(a+e)*n,s=copyTimestamp(t);o.push(updateMinutes(s,i,d))}return o}function createNativeLocaleFormatter(n,r){const e=()=>"";return"undefined"===typeof Intl||"undefined"===typeof Intl.DateTimeFormat?e:(t,e)=>{try{const a=new Intl.DateTimeFormat(n||void 0,r(t,e));return a.format(makeDateTime(t))}catch(e){return console.error(`Intl.DateTimeFormat: ${e.message} -> `+getDateTime(t)),""}}}function makeDate(e,t=!0){return t?new Date(Date.UTC(e.year,e.month-1,e.day,0,0)):new Date(e.year,e.month-1,e.day,0,0)}function makeDateTime(e,t=!0){return t?new Date(Date.UTC(e.year,e.month-1,e.day,e.hour,e.minute)):new Date(e.year,e.month-1,e.day,e.hour,e.minute)}function validateNumber(e){return isFinite(Number(e))}function maxTimestamp(e,t=!1){const a=!0===t?getDayTimeIdentifier:getDayIdentifier;return e.reduce((e,t)=>{return Math.max(a(e),a(t))===a(e)?e:t})}function minTimestamp(e,t=!1){const a=!0===t?getDayTimeIdentifier:getDayIdentifier;return e.reduce((e,t)=>{return Math.min(a(e),a(t))===a(e)?e:t})}function isBetweenDates(e,t,a,n=!1){const r=getDayIdentifier(e)+(!0===n?getTimeIdentifier(e):0),d=getDayIdentifier(t)+(!0===n?getTimeIdentifier(t):0),o=getDayIdentifier(a)+(!0===n?getTimeIdentifier(a):0);return r>=d&&r<=o}function isOverlappingDates(e,t,a,n){const r=getDayIdentifier(e),d=getDayIdentifier(t),o=getDayIdentifier(a),i=getDayIdentifier(n);return r>=o&&r<=i||d>=o&&d<=i||o>=r&&d>=i}function addToDate(e,t){const a=copyTimestamp(e);return t.year&&(a.year+=t.year),t.month&&(a.month+=t.month),t.day&&(a.day+=t.day),t.hour&&(a.hour+=t.hour),t.minute&&(a.minute+=t.minute),updateFormatted(normalizeTimestamp(a))}function normalizeTimestamp(e){const t=new Date(e.year,e.month-1,e.day,e.hour,e.minute);return{...e,year:t.getFullYear(),month:t.getMonth()+1,day:t.getDate(),hour:t.getHours(),minute:t.getMinutes()}}function daysBetween(e,t){const a=diffTimestamp(e,t,!0);return Math.floor(a/TIME_CONSTANTS.MILLISECONDS_IN.DAY)}function weeksBetween(e,t){let a=copyTimestamp(e),n=copyTimestamp(t);return a=findWeekday(a,0),n=findWeekday(n,6),Math.ceil(daysBetween(a,n)/TIME_CONSTANTS.DAYS_IN.WEEK)}const weekdayDateMap={Sun:new Date("2020-01-05T00:00:00.000Z"),Mon:new Date("2020-01-06T00:00:00.000Z"),Tue:new Date("2020-01-07T00:00:00.000Z"),Wed:new Date("2020-01-08T00:00:00.000Z"),Thu:new Date("2020-01-09T00:00:00.000Z"),Fri:new Date("2020-01-10T00:00:00.000Z"),Sat:new Date("2020-01-11T00:00:00.000Z")};function getWeekdayFormatter(){const e=()=>"",r={long:{timeZone:"UTC",weekday:"long"},short:{timeZone:"UTC",weekday:"short"},narrow:{timeZone:"UTC",weekday:"narrow"}};return"undefined"===typeof Intl||"undefined"===typeof Intl.DateTimeFormat?e:t;function t(t,e,a){try{const n=new Intl.DateTimeFormat(a||void 0,r[e]||r["long"]);return n.format(weekdayDateMap[t])}catch(e){return e instanceof Error&&console.error(`Intl.DateTimeFormat: ${e.message} -> day of week: `+t),""}}}function getWeekdayNames(t,a){const e=Object.keys(weekdayDateMap),n=getWeekdayFormatter();return e.map(e=>String(n(e,t,a)))}function getMonthFormatter(){const e=()=>"",d={long:{timeZone:"UTC",month:"long"},short:{timeZone:"UTC",month:"short"},narrow:{timeZone:"UTC",month:"narrow"}};return"undefined"===typeof Intl||"undefined"===typeof Intl.DateTimeFormat?e:t;function t(t,e,a){try{const n=new Intl.DateTimeFormat(a||void 0,d[e]||d["long"]),r=new Date;return r.setDate(1),r.setMonth(t),n.format(r)}catch(e){return e instanceof Error&&console.error(`Intl.DateTimeFormat: ${e.message} -> month: `+t),""}}}function getMonthNames(t,a){const n=getMonthFormatter();return[...Array(12).keys()].map(e=>n(e,t,a))}var Timestamp={PARSE_DATETIME:PARSE_DATETIME,PARSE_DATE:PARSE_DATE,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,TIME_CONSTANTS:TIME_CONSTANTS,FIRST_HOUR:FIRST_HOUR,today:today,getStartOfWeek:getStartOfWeek,getEndOfWeek:getEndOfWeek,getStartOfMonth:getStartOfMonth,getEndOfMonth:getEndOfMonth,parseTime:parseTime,validateTimestamp:validateTimestamp,parsed:parsed,parseTimestamp:parseTimestamp,parseDate:parseDate,getDayIdentifier:getDayIdentifier,getTimeIdentifier:getTimeIdentifier,getDayTimeIdentifier:getDayTimeIdentifier,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,createDayList:createDayList,createIntervalList:createIntervalList,createNativeLocaleFormatter:createNativeLocaleFormatter,makeDate:makeDate,makeDateTime:makeDateTime,validateNumber:validateNumber,isBetweenDates:isBetweenDates,isOverlappingDates:isOverlappingDates,daysBetween:daysBetween,weeksBetween:weeksBetween,addToDate:addToDate,compareTimestamps:compareTimestamps,compareDate:compareDate,compareTime:compareTime,compareDateTime:compareDateTime,getWeekdayFormatter:getWeekdayFormatter,getWeekdayNames:getWeekdayNames,getMonthFormatter:getMonthFormatter,getMonthNames:getMonthNames},Timestamp$1=Object.freeze({__proto__:null,DAYS_IN_MONTH:DAYS_IN_MONTH,DAYS_IN_MONTH_LEAP:DAYS_IN_MONTH_LEAP,DAYS_IN_MONTH_MAX:DAYS_IN_MONTH_MAX,DAYS_IN_MONTH_MIN:DAYS_IN_MONTH_MIN,DAY_MIN:DAY_MIN,FIRST_HOUR:FIRST_HOUR,MONTH_MAX:MONTH_MAX,MONTH_MIN:MONTH_MIN,PARSE_DATE:PARSE_DATE,PARSE_DATETIME:PARSE_DATETIME,PARSE_TIME:PARSE_TIME,TIME_CONSTANTS:TIME_CONSTANTS,addToDate:addToDate,compareDate:compareDate,compareDateTime:compareDateTime,compareTime:compareTime,compareTimestamps:compareTimestamps,copyTimestamp:copyTimestamp,createDayList:createDayList,createIntervalList:createIntervalList,createNativeLocaleFormatter:createNativeLocaleFormatter,daysBetween:daysBetween,daysInMonth:daysInMonth,default:Timestamp,diffTimestamp:diffTimestamp,findWeekday:findWeekday,getDate:getDate,getDateTime:getDateTime,getDayIdentifier:getDayIdentifier,getDayOfYear:getDayOfYear,getDayTimeIdentifier:getDayTimeIdentifier,getEndOfMonth:getEndOfMonth,getEndOfWeek:getEndOfWeek,getMonthFormatter:getMonthFormatter,getMonthNames:getMonthNames,getStartOfMonth:getStartOfMonth,getStartOfWeek:getStartOfWeek,getTime:getTime,getTimeIdentifier:getTimeIdentifier,getWeekday:getWeekday,getWeekdayFormatter:getWeekdayFormatter,getWeekdayNames:getWeekdayNames,getWorkWeek:getWorkWeek,isBetweenDates:isBetweenDates,isLeapYear:isLeapYear,isOverlappingDates:isOverlappingDates,isToday:isToday,makeDate:makeDate,makeDateTime:makeDateTime,maxTimestamp:maxTimestamp,minTimestamp:minTimestamp,moveRelativeDays:moveRelativeDays,nextDay:nextDay,padNumber:padNumber,parseDate:parseDate,parseTime:parseTime,parseTimestamp:parseTimestamp,parsed:parsed,prevDay:prevDay,relativeDays:relativeDays,today:today,updateDayOfYear:updateDayOfYear,updateDisabled:updateDisabled,updateFormatted:updateFormatted,updateMinutes:updateMinutes,updateRelative:updateRelative,updateWeekday:updateWeekday,updateWorkWeek:updateWorkWeek,validateNumber:validateNumber,validateTimestamp:validateTimestamp,weeksBetween:weeksBetween});function convertToUnit(e,t="px"){if(e)return isNaN(e)?String(e):"auto"===e?e:""+Number(e)+t}function indexOf(t,a){for(let e=0;e<t.length;e++)if(!0===a(t[e],e))return e;return-1}function minCharWidth(e,t){return 0===t?e:e.slice(0,t)}var helpers={convertToUnit:convertToUnit,indexOf:indexOf,minCharWidth:minCharWidth},helpers$1=Object.freeze({__proto__:null,convertToUnit:convertToUnit,default:helpers,indexOf:indexOf,minCharWidth:minCharWidth});const toCamelCase=e=>e.replace(/(-\w)/g,e=>e[1].toUpperCase());function getMouseEventHandlers(t,e,a,n){const r={};for(const d in a){const o=a[d],i=toCamelCase("on-"+d);if(!e.value)return console.warn("$listeners has not been set up"),{};if(void 0!==e.value[i]){const s="on"+o.event.charAt(0).toUpperCase()+o.event.slice(1),u=e=>{return(void 0===o.button||"buttons"in e&&e.buttons>0&&e.button===o.button)&&(o.prevent&&e.preventDefault(),o.stop&&e.stopPropagation(),t(d,n(e,d))),o.result};s in r?Array.isArray(r[s])?r[s].push(u):r[s]=[r[s],u]:r[s]=u}}return r}function getDefaultMouseEventHandlers(e,t,a,n){return getMouseEventHandlers(e,t,getMouseEventName(a),n)}function getMouseEventName(e){return{["click"+e]:{event:"click"},["contextmenu"+e]:{event:"contextmenu",prevent:!0,result:!1},["mousedown"+e]:{event:"mousedown"},["mousemove"+e]:{event:"mousemove"},["mouseup"+e]:{event:"mouseup"},["mouseenter"+e]:{event:"mouseenter"},["mouseleave"+e]:{event:"mouseleave"},["touchstart"+e]:{event:"touchstart"},["touchmove"+e]:{event:"touchmove"},["touchend"+e]:{event:"touchend"}}}function getRawMouseEvents(e){return Object.keys(getMouseEventName(e))}function useMouseEvents(a,n){return{getMouseEventHandlers:(e,t)=>getMouseEventHandlers(a,n,e,t),getDefaultMouseEventHandlers:(e,t)=>getDefaultMouseEventHandlers(a,n,e,t),getMouseEventName:getMouseEventName,getRawMouseEvents:getRawMouseEvents}}const ResizeObserverDirective={mounted(e,t){if("function"===typeof t.value){const a=t.value,n={callback:a,size:{width:0,height:0},observer:new ResizeObserver(e=>{const t=e[0].contentRect;t.width===n.size.width&&t.height===n.size.height||(n.size.width=t.width,n.size.height=t.height,n.debounceTimeout&&clearTimeout(n.debounceTimeout),n.debounceTimeout=setTimeout(()=>{n.callback(n.size),n.debounceTimeout=void 0},100))})};n.observer.observe(e),e.__onResizeObserver=n}},beforeUnmount(e){if(e.__onResizeObserver){const{observer:t,debounceTimeout:a}=e.__onResizeObserver;a&&clearTimeout(a),t.unobserve(e),delete e.__onResizeObserver}}};function useCalendar(t,a,{scrollArea:e,pane:n}){if(!a){const l="[error: renderCalendar] no renderFunc has been supplied to useCalendar";throw console.error(l),new Error(l)}const r=reactive({width:0,height:0}),d=ref(null);function o({width:e,height:t}){r.width=e,r.height=t}const i=computed(()=>{return!0!==t.noScroll&&e.value&&n.value&&r.height?e.value.offsetWidth-n.value.offsetWidth:0});function s(){}function u(){const e={ref:d,role:"complementary",lang:t.locale,class:`q-calendar ${t.dark?"q-calendar--dark":""} `+(t.bordered?"q-calendar__bordered":"")};return withDirectives(h("div",{...e},[a()]),[[ResizeObserverDirective,o]])}return{rootRef:d,scrollWidth:i,__initCalendar:s,__renderCalendar:u}}const isValidFocusType=e=>e.every(e=>["day","date","weekday","interval","time","resource","task"].includes(e)),useCommonProps={modelValue:{type:String,default:today(),validator:e=>""===e||validateTimestamp(e)},weekdays:{type:Array,default:()=>[0,1,2,3,4,5,6]},dateType:{type:String,default:"round",validator:e=>["round","rounded","square"].includes(e)},weekdayAlign:{type:String,default:"center",validator:e=>["left","center","right"].includes(e)},dateAlign:{type:String,default:"center",validator:e=>["left","center","right"].includes(e)},bordered:Boolean,dark:Boolean,noAria:Boolean,noActiveDate:Boolean,noHeader:Boolean,noScroll:Boolean,shortWeekdayLabel:Boolean,noDefaultHeaderText:Boolean,noDefaultHeaderBtn:Boolean,minWeekdayLabel:{type:[Number,String],default:1},weekdayBreakpoints:{type:Array,default:()=>[75,35],validator:e=>2===e.length},locale:{type:String,default:"en-US"},animated:Boolean,transitionPrev:{type:String,default:"slide-right"},transitionNext:{type:String,default:"slide-left"},disabledDays:Array,disabledBefore:String,disabledAfter:String,disabledWeekdays:{type:Array,default:()=>[]},dragEnterFunc:Function,dragOverFunc:Function,dragLeaveFunc:Function,dropFunc:Function,selectedDates:{type:[Array,Set],default:()=>[]},selectedStartEndDates:{type:Array,default:()=>[]},hoverable:Boolean,focusable:Boolean,focusType:{type:Array,default:()=>["date"],validator:isValidFocusType}};function useCommon(t,{startDate:e,endDate:a,times:n}){const r=computed(()=>parseTimestamp(e.value)),d=computed(()=>{return"0000-00-00"===a.value?getEndOfWeek(r.value,t.weekdays,n.today):parseTimestamp(a.value)||r.value}),o=computed(()=>createNativeLocaleFormatter(t.locale,()=>({timeZone:"UTC",day:"numeric"}))),i=computed(()=>createNativeLocaleFormatter(t.locale,(e,t)=>({timeZone:"UTC",weekday:t?"short":"long"}))),s=computed(()=>createNativeLocaleFormatter(t.locale,()=>({timeZone:"UTC",dateStyle:"full"})));function u(e,t){return e&&e.length>0&&e.includes(t.date)}function l(e,t){const a={firstDay:!1,betweenDays:!1,lastDay:!1};if(2===e.length){const n=getDayIdentifier(t),r=getDayIdentifier(parsed(e[0])),d=getDayIdentifier(parsed(e[1]));a.firstDay=r===n,a.lastDay=d===n,a.betweenDays=r<n&&d>n}return a}function c(e,t=!1,a=[],n=[],r=!1){const d=u(a,e),{firstDay:o,lastDay:i,betweenDays:s}=l(n,e);return{"q-past-day":!o&&!s&&!i&&!d&&!t&&!!e.past,"q-future-day":!o&&!s&&!i&&!d&&!t&&!!e.future,"q-outside":t,"q-current-day":!!e.current,"q-selected":d,"q-range-first":o,"q-range":s,"q-range-last":i,"q-range-hover":r&&(o||i||s),"q-disabled-day disabled":!0===e.disabled}}function m(e){return getStartOfWeek(e,t.weekdays,n.today)}function y(e){return getEndOfWeek(e,t.weekdays,n.today)}function p(){return{}}return{parsedStart:r,parsedEnd:d,dayFormatter:o,weekdayFormatter:i,ariaDateFormatter:s,arrayHasDate:u,checkDays:l,getRelativeClasses:c,startOfWeek:m,endOfWeek:y,dayStyleDefault:p}}const useTaskProps={modelValue:{type:String,default:today(),validator:e=>""===e||validateTimestamp(e)},modelTasks:{type:Array,default:()=>[]},modelTitle:{type:Array,default:()=>[]},modelFooter:{type:Array,default:()=>[]},taskKey:{type:[String,Number],default:"id"},weekdays:{type:Array,default:()=>[0,1,2,3,4,5,6]},dateType:{type:String,default:"round",validator:e=>["round","rounded","square"].includes(e)},dateHeader:{type:String,default:"stacked",validator:e=>["stacked","inline","inverted"].includes(e)},weekdayAlign:{type:String,default:"center",validator:e=>["left","center","right"].includes(e)},dateAlign:{type:String,default:"center",validator:e=>["left","center","right"].includes(e)},dayHeight:{type:[Number,String],default:0,validator:validateNumber},dayMinHeight:{type:[Number,String],default:40,validator:validateNumber},weekdayStyle:{type:Function,default:null},weekdayClass:{type:Function,default:null},dayStyle:{type:Function,default:null},dayClass:{type:Function,default:null},footerDayClass:{type:Function,default:null},view:{type:String,validator:e=>["day","week","month"].includes(e)},viewCount:{type:Number,default:1,validator:e=>validateNumber(e)&&e>0},taskWidth:{type:Number,default:200,validator:e=>validateNumber(e)&&e>0}};function useTask(t,e,{times:a}){const n=computed(()=>{if(!t.modelValue)throw new Error("QCalendarTask: no modelValue provided");if("day"===t.view)return parseTimestamp(t.modelValue);if("week"===t.view)return getStartOfWeek(parseTimestamp(t.modelValue),t.weekdays,a.today);if("month"===t.view)return getStartOfMonth(parseTimestamp(t.modelValue));throw new Error(`QCalendarTask: unknown 'view' type (${t.view})`)}),r=computed(()=>{if(!t.modelValue)throw new Error("QCalendarTask: no modelValue provided");if("day"===t.view){if(1===t.viewCount)return n.value;let e=copyTimestamp(n.value);return e=addToDate(e,{day:t.viewCount-1}),e}if("week"===t.view){if(1===t.viewCount)return getEndOfWeek(parseTimestamp(t.modelValue),t.weekdays,a.today);{let e=copyTimestamp(n.value);return e=addToDate(e,{day:(t.viewCount-1)*TIME_CONSTANTS.DAYS_IN.WEEK}),getEndOfWeek(e,t.weekdays,a.today)}}if("month"!==t.view)throw new Error(`QCalendarTask: unknown 'view' type (${t.view})`);if(1===t.viewCount)return getEndOfMonth(parseTimestamp(t.modelValue));{let e=copyTimestamp(n.value);return e=addToDate(e,{month:t.viewCount}),getEndOfMonth(e)}}),d=computed(()=>{return createDayList(n.value,r.value,a.today,t.weekdays,t.disabledBefore,t.disabledAfter,t.disabledWeekdays||[],t.disabledDays||[],Number.MAX_SAFE_INTEGER)});return{days:d,parsedStartDate:n,parsedEndDate:r}}const useTimesProps={now:{type:String,validator:e=>""===e||validateTimestamp(e),default:""}};function useTimes(e){const t=reactive({now:parseTimestamp("0000-00-00 00:00"),today:parseTimestamp("0000-00-00")}),a=computed(()=>e.now?parseTimestamp(e.now):d());function n(){t.now&&t.today&&(t.now.current=t.today.current=!0,t.now.past=t.today.past=!1,t.now.future=t.today.future=!1)}function r(){const e=a.value||d();o(e,t.now),i(e,t.now),o(e,t.today)}function d(){return parseDate(new Date)}function o(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)}function i(e,t){e.time!==t.time&&(t.hour=e.hour,t.minute=e.minute,t.time=e.time)}return watch(a,()=>r()),{times:t,parsedNow:a,setCurrent:n,updateCurrent:r,getNow:d,updateDay:o,updateTime:i}}function useRenderValues(r,{parsedView:d,parsedValue:o,times:i}){const e=computed(()=>{const e=o.value;let t=r.maxDays,a=e,n=e;switch(d.value){case"month":a=getStartOfMonth(e),n=getEndOfMonth(e),t=daysInMonth(a.year,a.month);break;case"week":case"week-agenda":case"week-scheduler":a=getStartOfWeek(e,r.weekdays,i.today),n=getEndOfWeek(a,r.weekdays,i.today),t=r.weekdays.length;break;case"day":case"scheduler":case"agenda":n=moveRelativeDays(copyTimestamp(n),nextDay,t>1?t-1:t,r.weekdays),n=updateFormatted(n);break;case"month-interval":case"month-scheduler":case"month-agenda":a=getStartOfMonth(e),n=getEndOfMonth(e),n=updateFormatted(n),t=daysInMonth(a.year,a.month);break;case"resource":t=1,n=moveRelativeDays(copyTimestamp(n),nextDay,t,r.weekdays),n=updateFormatted(n);break}return{start:a,end:n,maxDays:t}});return{renderValues:e}}const useMoveEmits=["moved"];function useMove(s,{parsedView:u,parsedValue:l,direction:c,maxDays:m,times:y,emittedValue:p,emit:f}){function e(a=1){if(0===a)p.value=today();else{let e=copyTimestamp(l.value);const n=getEndOfMonth(e),r=a>0,d=r?nextDay:prevDay,o=r?n.day:1;let t=r?a:-a;c.value=r?"next":"prev";const i=s.weekdays.length;while(--t>=0)switch(u.value){case"month":e.day=o,e=d(e),e=updateWeekday(e);while(!s.weekdays.includes(Number(e.weekday)))e=addToDate(e,{day:r?1:-1});break;case"week":case"week-agenda":case"week-scheduler":e=relativeDays(e,d,i,s.weekdays);break;case"day":case"scheduler":case"agenda":e=relativeDays(e,d,m.value,s.weekdays);break;case"month-interval":case"month-agenda":case"month-scheduler":e.day=o,e=d(e);break;case"resource":e=relativeDays(e,d,m.value,s.weekdays);break}e=updateWeekday(e),e=updateFormatted(e),e=updateDayOfYear(e),e=updateRelative(e,y.now),p.value=e.date,f("moved",e)}}return{move:e}}const listenerRE=/^on[A-Z]/;function useEmitListeners(e=getCurrentInstance()){return{emitListeners:computed(()=>{const t={};return e?.vnode?.props&&Object.keys(e.vnode.props).forEach(e=>{listenerRE.test(e)&&(t[e]=!0)}),t})}}function useFocusHelper(){const e={"aria-hidden":"true",class:"q-calendar__focus-helper"};return[h("span",e)]}function useButton(){function e({focusable:e,focusType:t},a,n){const r=e&&t.includes("date");return h("button",{...a,tabindex:r?0:-1},[n,r&&useFocusHelper()])}return{renderButton:e}}const useCheckChangeEmits=["change"];function useCheckChange(n,{days:r,lastStart:d,lastEnd:o}){function e(){const e=r.value;if(0===e.length)return!1;const t=e[0].date,a=e[e.length-1].date;return(!d.value||!o.value||t!==d.value||a!==o.value)&&(d.value=t,o.value=a,n("change",{start:t,end:a,days:e}),!0)}return{checkChange:e}}function useEventUtils(){function e(e,t){return(Array.isArray(t)?t:[t]).includes(e.keyCode)}return{isKeyCode:e}}const isKeyCode=useEventUtils().isKeyCode,useNavigationProps={useNavigation:Boolean};function useNavigation(t,{rootRef:a,focusRef:n,focusValue:r,datesRef:d,parsedView:o,emittedValue:i,direction:s,times:u}){let e=!1;function l(){e||document&&(e=!0,document.addEventListener("keyup",f),document.addEventListener("keydown",p))}function c(){document&&(document.removeEventListener("keyup",f),document.removeEventListener("keydown",p),e=!1)}function m(e){if(e&&document){const t=document.activeElement;if(t!==document.body&&a.value?.contains(t))return!0}return!1}function y(){let t=0;const a=window.setInterval(()=>{const e=d.value[n.value];e&&(e.focus(),50!==++t)&&document.activeElement!==e||window.clearInterval(a)},250)}function p(e){m(e)&&isKeyCode(e,[33,34,35,36,37,38,39,40])&&(e.stopPropagation(),e.preventDefault())}function f(e){if(m(e)&&isKeyCode(e,[33,34,35,36,37,38,39,40])){const t={33:D,34:k,35:w,36:_,37:T,38:v,39:g,40:h};t[e.keyCode]?.()}}function v(){let e=copyTimestamp(r.value);if("month"===o.value){if(e=addToDate(e,{day:-7}),r.value.month!==e.month)return s.value="prev",void(i.value=e.date)}else e=addToDate(e,{minute:Number(t.intervalMinutes)});s.value="prev",n.value=e.date}function h(){let e=copyTimestamp(r.value);if("month"===o.value){if(e=addToDate(e,{day:7}),r.value.month!==e.month)return s.value="next",void(i.value=e.date)}else e=addToDate(e,{minute:Number(t.intervalMinutes)});s.value="next",n.value=e.date}function T(){let e=copyTimestamp(r.value);s.value="prev";do{e=addToDate(e,{day:-1})}while(!t.weekdays.includes(Number(e.weekday)));n.value=e.date}function g(){let e=copyTimestamp(r.value);s.value="next";do{e=addToDate(e,{day:1})}while(!t.weekdays.includes(Number(e.weekday)));n.value=e.date}function D(){let e=copyTimestamp(r.value);e="month"===o.value?addToDate(e,{month:-1}):addToDate(e,{day:-7}),s.value="prev",n.value=e.date}function k(){let e=copyTimestamp(r.value);e="month"===o.value?addToDate(e,{month:1}):addToDate(e,{day:7}),s.value="next",n.value=e.date}function _(){let e=copyTimestamp(r.value);e="month"===o.value?getStartOfMonth(e):getStartOfWeek(e,t.weekdays||[],u.today);while(!t.weekdays.includes(Number(e.weekday)))e=addToDate(e,{day:-1});n.value=e.date}function w(){let e=copyTimestamp(r.value);e="month"===o.value?getEndOfMonth(e):getEndOfWeek(e,t.weekdays||[],u.today);while(!t.weekdays.includes(Number(e.weekday)))e=addToDate(e,{day:-1});n.value=e.date}return onBeforeUnmount(()=>{c()}),watch(()=>t.useNavigation,e=>{(!0===e?l:c)()}),!0===t.useNavigation&&l(),{startNavigation:l,endNavigation:c,tryFocus:y}}const useCellWidthProps={cellWidth:[Number,String]},renderButton=useButton().renderButton;var QCalendarTask=defineComponent({name:"QCalendarTask",directives:{ResizeObserver:ResizeObserverDirective},props:{...useTimesProps,...useNavigationProps,...useCellWidthProps,...useCommonProps,...useTaskProps},emits:["update:model-value","update:model-tasks","update:model-title","update:model-footer","task-expanded",...useCheckChangeEmits,...useMoveEmits,...getRawMouseEvents("-date"),...getRawMouseEvents("-day"),...getRawMouseEvents("-head-day")],setup(c,{slots:m,emit:u,expose:H}){const e=ref(null),q=ref(null),d=ref("next"),o=ref(c.modelValue||today()),i=ref("0000-00-00"),t=ref(0),y=ref(c.modelValue),p=ref(c.modelValue||today()),a=ref(parsed(c.modelValue||today())),f=ref({}),s=reactive({width:0,height:0}),v=ref(""),T=ref(""),U=ref(null),Y=ref(null),n=(watch(()=>c.view,()=>{t.value=0}),computed(()=>{return"month"===c.view?"month-interval":c.view})),r=getCurrentInstance();if(null===r)throw new Error("current instance is null");const l=useEmitListeners(r).emitListeners,{times:g,setCurrent:L,updateCurrent:D}=useTimes(c),{parsedStart:B,dayFormatter:P,weekdayFormatter:V,ariaDateFormatter:z,dayStyleDefault:k,getRelativeClasses:_}=(D(),L(),useCommon(c,{startDate:o,endDate:i,times:g})),w=computed(()=>{return parseTimestamp(c.modelValue,g.now)||B.value||g.today}),$=(a.value=w.value,p.value=w.value.date,useRenderValues(c,{parsedView:n,times:g,parsedValue:w})).renderValues,{rootRef:K,__renderCalendar:Z}=useCalendar(c,Ae,{scrollArea:e,pane:q}),{days:N,parsedStartDate:b,parsedEndDate:M}=useTask(c,u,{times:g}),I=useMove(c,{parsedView:n,parsedValue:w,direction:d,maxDays:t,times:g,emittedValue:y,emit:u}).move,E=useMouseEvents(u,l).getDefaultMouseEventHandlers,j=useCheckChange(u,{days:N,lastStart:U,lastEnd:Y}).checkChange,S=useEventUtils().isKeyCode,X=useNavigation(c,{rootRef:K,focusRef:p,focusValue:a,datesRef:f,parsedView:n,emittedValue:y,direction:d,times:g}).tryFocus,O=ref(!0),A=computed(()=>{return void 0!==c.cellWidth?parseInt(String(c.cellWidth),10):150}),W=computed(()=>{return!0===c.focusable&&c.focusType.includes("day")}),Q=computed(()=>{return!0===c.focusable&&c.focusType.includes("date")&&!0!==W.value}),C=computed(()=>{return!0===c.focusable&&c.focusType.includes("weekday")}),G=computed(()=>{return parseInt(String(c.dayHeight),10)}),J=computed(()=>{return parseInt(String(c.dayMinHeight),10)});function ee(){y.value=today()}function te(e=1){I(e)}function ae(e=1){I(-e)}function ne({width:e,height:t}){s.width=e,s.height=t}function F(e){return e.date===y.value}function re(e,t,a){const n=m.day,r=c.dayStyle||k,d=!0!==c.noActiveDate&&w.value.date===e.date,o=t[c.taskKey],i={timestamp:e,task:t,taskIndex:a,activeDate:d,droppable:T.value===o},s=convertToUnit(A.value),u={width:s,minWidth:s,maxWidth:s,...r({scope:i})},l="function"===typeof c.dayClass?c.dayClass({scope:i}):{};return h("div",{tabindex:!0===W.value?0:-1,class:{"q-calendar-task__task--day":!0,...l,..._(e),"q-active-date":!0===d,"q-calendar__hoverable":!0===c.hoverable,"q-calendar__focusable":!0===W.value},style:u,onFocus:()=>{W.value},...E("-day",e=>{return{scope:i,event:e}}),onDragenter:e=>{void 0!==c.dragEnterFunc&&"function"===typeof c.dragEnterFunc&&(!0===c.dragEnterFunc(e,"day",{scope:i})?T.value=o:T.value="")},onDragover:e=>{void 0!==c.dragOverFunc&&"function"===typeof c.dragOverFunc&&(!0===c.dragOverFunc(e,"day",{scope:i})?T.value=o:T.value="")},onDragleave:e=>{void 0!==c.dragLeaveFunc&&"function"===typeof c.dragLeaveFunc&&(!0===c.dragLeaveFunc(e,"day",{scope:i})?T.value=o:T.value="")},onDrop:e=>{void 0!==c.dropFunc&&"function"===typeof c.dropFunc&&(!0===c.dropFunc(e,"day",{scope:i})?T.value=o:T.value="")}},[n&&n({scope:i}),useFocusHelper()])}function de(t,a){return N.value.map(e=>re(e,t,a))}function oe(e,t){const a=m.days,n={timestamps:N.value,days:N.value,task:e,taskIndex:t,cellWidth:A.value};return h("div",{class:"q-calendar-task__task--days-row"},[de(e,t),a&&a({scope:n})])}function ie(t,e,a=0,n=!0){const r=0===a?m.task:m.subtask,d={start:b.value,end:M.value,task:t,taskIndex:e,expanded:n},o=convertToUnit(c.taskWidth),i={width:o,minWidth:o,maxWidth:o},s=!0===c.focusable&&c.focusType.includes("task");return h("div",{class:{"q-calendar-task__task--item":!0,"q-calendar__sticky":!0===O.value,"q-calendar__hoverable":!0===c.hoverable,"q-calendar__focusable":!0===s},style:i},[h("div",{style:{flexDirection:"column",justifyContent:"center",alignItems:"center",width:10+10*a+"px"}},[h("div",{class:{"q-calendar__parent":void 0!==t.children,"q-calendar__parent--expanded":void 0!==t.children&&!0===t.expanded,"q-calendar__parent--collapsed":void 0!==t.children&&!0!==t.expanded},onClick:e=>{e.stopPropagation(),t.expanded=!t.expanded,u("task-expanded",{expanded:t.expanded,scope:d})}})]),r&&r({scope:d}),useFocusHelper()])}function se(e,t,a=0,n=!0){const r=void 0!==e.height?convertToUnit(parseInt(e.height,10)):G.value>0?convertToUnit(G.value):"auto",d=J.value>0?convertToUnit(J.value):void 0,o={height:r},i=(void 0!==d&&(o.minHeight=d),h("div",{key:e[c.taskKey]+"-"+t,class:{"q-calendar-task__task":0===a,"q-calendar-task__task--section":0!==a},style:o},[ie(e,t,a,n),oe(e,t)]));return void 0!==e.children?[i,h("div",{class:{"q-calendar__child":!0,"q-calendar__child--expanded":!0===n,"q-calendar__child--collapsed":!0!==n}},[ue(e.children,a+1,!1===n?n:e.expanded)])]:[i]}function ue(e=void 0,a=0,n=!0){return void 0===e&&(e=c.modelTasks),e.map((e,t)=>{return se(e,t,a,void 0!==e.children?e.expanded:n)}).flat()}function le(){return h("div",{class:{"q-calendar-task__task--container":!0,"q-calendar__sticky":!0===O.value}},[ue()])}function ce(e,t){const a=m["footer-task"],n={start:b.value,end:M.value,footer:e,index:t},r=convertToUnit(c.taskWidth),d={width:r,minWidth:r,maxWidth:r};return h("div",{class:{"q-calendar-task__footer--task":!0,"q-calendar__sticky":!0===O.value},style:d},[a&&a({scope:n})])}function me(e,t,a){const n=m["footer-day"],r={timestamp:e,footer:t,index:a},d=convertToUnit(A.value),o={width:d,minWidth:d,maxWidth:d},i="function"===typeof c.footerDayClass?c.footerDayClass({scope:r}):{};return h("div",{class:{"q-calendar-task__footer--day":!0,...i,..._(e),"q-calendar__hoverable":!0===c.hoverable,"q-calendar__focusable":!0===W.value},style:o},[n&&n({scope:r})])}function ye(t,a){return h("div",{class:"q-calendar-task__footer--day-wrapper"},[N.value.map(e=>me(e,t,a))])}function pe(){const a=!0===c.focusable&&c.focusType.includes("task");return c.modelFooter.map((e,t)=>{return h("div",{class:{"q-calendar-task__footer--wrapper":!0,"q-calendar__hoverable":!0===c.hoverable,"q-calendar__focusable":!0===a}},{default:()=>[ce(e,t),ye(e,t)]})})}function fe(){return h("div",{class:{"q-calendar-task__footer":!0,"q-calendar__sticky":!0===O.value}},pe())}function ve(){return h("div",{class:{"q-calendar-task__container":!0}},[!0!==c.noHeader&&Ee(),le(),fe()])}function he(){const e=m["head-tasks"],t={start:b.value,end:M.value},a=convertToUnit(parseInt(String(c.taskWidth),10)),n={width:a,minWidth:a,maxWidth:a};return h("div",{class:{"q-calendar-task__head--tasks":!0,"q-calendar__sticky":!0===O.value},style:n},[e&&e({scope:t})])}function Te(e,t){const a=m["title-task"],n=convertToUnit(parseInt(String(c.taskWidth),10)),r={width:n,minWidth:n,maxWidth:n},d={start:b.value,end:M.value,cellWidth:n,title:e,index:t};return h("div",{class:{"q-calendar-task__title--task":!0,"q-calendar__sticky":!0===O.value},style:r},[a&&a({scope:d})])}function x(e){const t=m["head-weekday-label"],a=!0!==c.noActiveDate&&F(e),n={activeDate:a,timestamp:e,disabled:!!c.disabledWeekdays&&c.disabledWeekdays.includes(Number(e.weekday))},r={class:{"q-calendar-task__head--weekday":!0,["q-calendar__"+c.weekdayAlign]:!0,"q-calendar__ellipsis":!0}};return h("div",r,t&&t({scope:n})||ge(e,c.shortWeekdayLabel))}function ge(e,t){const a=V.value(e,t||c.weekdayBreakpoints[0]>0&&A.value<=c.weekdayBreakpoints[0]);return h("span",{class:"q-calendar__ellipsis"},c.weekdayBreakpoints[1]>0&&A.value<=c.weekdayBreakpoints[1]?minCharWidth(a,Number(c.minWeekdayLabel)):a)}function R(e){const t={class:{"q-calendar-task__head--date":!0,["q-calendar__"+c.dateAlign]:!0}};return h("div",t,De(e))}function De(a){const e=!0!==c.noActiveDate&&F(a),t=P.value(a,!1),n=m["head-day-label"],r=m["head-day-button"],d={dayLabel:t,timestamp:a,activeDate:e},o=a.date,i={key:o,tabindex:!0===Q.value?0:-1,class:{"q-calendar-task__head--day__label":!0,"q-calendar__button":!0,"q-calendar__button--round":"round"===c.dateType,"q-calendar__button--rounded":"rounded"===c.dateType,"q-calendar__button--bordered":!0===a.current,"q-calendar__hoverable":!0===c.hoverable,"q-calendar__focusable":!0===Q.value},disabled:a.disabled,onKeydown:e=>{!0!==a.disabled&&S(e,[13,32])&&(e.stopPropagation(),e.preventDefault())},onKeyup:e=>{!0!==a.disabled&&S(e,[13,32])&&(y.value=a.date,void 0!==l.value.onClickDate)&&u("click-date",{scope:d})},...E("-date",(e,t)=>{return"click-date"!==t&&"contextmenu-date"!==t||(y.value=a.date,"click-date"===t&&e.preventDefault()),{scope:d,event:e}})};return!0!==c.noAria&&(i.ariaLabel=z.value(a,!1)),r?r({scope:d}):renderButton(c,i,n?n({scope:d}):t)}function ke(e){return"stacked"===c.dateHeader?[!0!==c.noDefaultHeaderText&&x(e),!0!==c.noDefaultHeaderBtn&&R(e)].filter(e=>!1!==e):"inline"===c.dateHeader?("left"===c.weekdayAlign&&"right"===c.dateAlign||"right"===c.weekdayAlign&&c.dateAlign,h("div",{class:"q-calendar__header--inline"},[!0!==c.noDefaultHeaderText&&x(e),!0!==c.noDefaultHeaderBtn&&R(e)])):"inverted"===c.dateHeader?("left"===c.weekdayAlign&&"right"===c.dateAlign||"right"===c.weekdayAlign&&c.dateAlign,h("div",{class:"q-calendar__header--inline"},[!0!==c.noDefaultHeaderBtn&&R(e),!0!==c.noDefaultHeaderText&&x(e)])):void 0}function _e(e,t,a){const n=m["title-day"],r=convertToUnit(A.value),d={width:r,minWidth:r,maxWidth:r},o={timestamp:e,title:t,index:a,cellWidth:A.value},i="function"===typeof c.dayClass?c.dayClass({scope:o}):{},s=!0===c.focusable&&c.focusType.includes("day");return h("div",{class:{"q-calendar-task__title--day":!0,...i,..._(e),"q-calendar__hoverable":!0===c.hoverable,"q-calendar__focusable":!0===s},style:d},[n&&n({scope:o}),useFocusHelper()])}function we(t){const e=m["head-day"],a=m["head-date"],n=!0!==c.noActiveDate&&F(t),r={timestamp:t,activeDate:n,droppable:v.value=t.date,disabled:!!c.disabledWeekdays&&c.disabledWeekdays.includes(Number(t.weekday))},d=c.weekdayStyle||k,o="function"===typeof c.weekdayClass?c.weekdayClass({scope:r}):{},i=convertToUnit(A.value),s={width:i,minWidth:i,maxWidth:i,...d({scope:r})},u=t.date,l={key:u,ref:e=>{f.value[u]=e},tabindex:!0===C.value?0:-1,class:{"q-calendar-task__head--day":!0,...o,..._(t),"q-active-date":n,"q-calendar__hoverable":!0===c.hoverable,"q-calendar__focusable":!0===C.value},style:s,onFocus:()=>{!0===C.value&&(p.value=u)},onKeydown:e=>{!0!==t.disabled&&S(e,[13,32])&&(e.stopPropagation(),e.preventDefault())},onKeyup:e=>{!0!==t.disabled&&S(e,[13,32])&&(y.value=t.date)},...E("-head-day",e=>{return{scope:r,event:e}}),onDragenter:e=>{void 0!==c.dragEnterFunc&&"function"===typeof c.dragEnterFunc&&(!0===c.dragEnterFunc(e,"head-day",{scope:r})?v.value=t.date:v.value="")},onDragover:e=>{void 0!==c.dragOverFunc&&"function"===typeof c.dragOverFunc&&(!0===c.dragOverFunc(e,"head-day",{scope:r})?v.value=t.date:v.value="")},onDragleave:e=>{void 0!==c.dragLeaveFunc&&"function"===typeof c.dragLeaveFunc&&(!0===c.dragLeaveFunc(e,"head-day",{scope:r})?v.value=t.date:v.value="")},onDrop:e=>{void 0!==c.dropFunc&&"function"===typeof c.dropFunc&&(!0===c.dropFunc(e,"head-day",{scope:r})?v.value=t.date:v.value="")}};return h("div",l,[void 0!==e&&e({scope:r}),void 0===e&&ke(t),void 0===e&&a&&a({scope:r}),useFocusHelper()])}function Ne(){return N.value.map(e=>we(e))}function be(t,a){return N.value.map(e=>_e(e,t,a))}function Me(){return h("div",{class:{"q-calendar-task__head--days":!0}},[...Ne()])}function Ie(e,t){return h("div",{class:{"q-calendar-task__title--days":!0}},[...be(e,t)])}function Ee(){return h("div",{roll:"presentation",class:{"q-calendar-task__head":!0,"q-calendar__sticky":!0===O.value},style:{}},[h("div",{style:{position:"relative",display:"flex"}},[he(),Me()]),c.modelTitle.map((e,t)=>h("div",{class:"q-calendar-task__title",style:{position:"relative",display:"flex"}},[Te(e,t),Ie(e,t)]))])}function Se(){return h("div",{class:"q-calendar-task__body"},[Oe()])}function Oe(){return h("div",{ref:e,class:{"q-calendar-task__scroll-area":!0,"q-calendar__scroll":!0}},[ve()])}function Ae(){const{start:e,end:t}=$.value,a=(o.value=e.date,i.value=t.date,s.width>0),n=withDirectives(h("div",{key:o.value,class:"q-calendar-task"},[!0===a&&Se()]),[[ResizeObserverDirective,ne]]);if(!0!==c.animated)return n;{const r="q-calendar--"+("prev"===d.value?c.transitionPrev:c.transitionNext);return h(Transition,{name:r,appear:!0},()=>n)}}return watch([N],j,{deep:!0,immediate:!0}),watch(()=>c.modelValue,(e,t)=>{if(y.value!==e){if(!0===c.animated){const a=getDayIdentifier(parsed(e)),n=getDayIdentifier(parsed(t));d.value=a>=n?"next":"prev"}y.value=e}p.value=e}),watch(y,(e,t)=>{if(y.value!==c.modelValue){if(!0===c.animated){const a=getDayIdentifier(parsed(e)),n=getDayIdentifier(parsed(t));d.value=a>=n?"next":"prev"}u("update:model-value",e)}}),watch(p,e=>{e&&(a.value=parseTimestamp(e))}),watch(a,()=>{f.value[p.value]?f.value[p.value].focus():X()}),onBeforeUpdate(()=>{f.value={}}),onMounted(()=>{}),H({prev:ae,next:te,move:I,moveToToday:ee,updateCurrent:D}),()=>Z()}});const version="4.1.1";var Plugin={version:version,QCalendarTask:QCalendarTask,...Timestamp$1,...helpers$1,install(e){e.component(String(QCalendarTask.name),QCalendarTask)}};export{DAYS_IN_MONTH,DAYS_IN_MONTH_LEAP,DAYS_IN_MONTH_MAX,DAYS_IN_MONTH_MIN,DAY_MIN,FIRST_HOUR,MONTH_MAX,MONTH_MIN,PARSE_DATE,PARSE_DATETIME,PARSE_TIME,QCalendarTask,TIME_CONSTANTS,addToDate,compareDate,compareDateTime,compareTime,compareTimestamps,convertToUnit,copyTimestamp,createDayList,createIntervalList,createNativeLocaleFormatter,daysBetween,daysInMonth,Plugin as default,diffTimestamp,findWeekday,getDate,getDateTime,getDayIdentifier,getDayOfYear,getDayTimeIdentifier,getEndOfMonth,getEndOfWeek,getMonthFormatter,getMonthNames,getStartOfMonth,getStartOfWeek,getTime,getTimeIdentifier,getWeekday,getWeekdayFormatter,getWeekdayNames,getWorkWeek,indexOf,isBetweenDates,isLeapYear,isOverlappingDates,isToday,makeDate,makeDateTime,maxTimestamp,minCharWidth,minTimestamp,moveRelativeDays,nextDay,padNumber,parseDate,parseTime,parseTimestamp,parsed,prevDay,relativeDays,today,updateDayOfYear,updateDisabled,updateFormatted,updateMinutes,updateRelative,updateWeekday,updateWorkWeek,validateNumber,validateTimestamp,version,weeksBetween}; |
/*! | ||
* @quasar/quasar-ui-qcalendar v4.1.0 | ||
* @quasar/quasar-ui-qcalendar v4.1.1 | ||
* (c) 2025 Jeff Galbraith <jeff@quasar.dev> | ||
* Released under the MIT License. | ||
*/ | ||
(function(e,t){"object"===typeof exports&&"undefined"!==typeof module?module.exports=t(require("vue")):"function"===typeof define&&define.amd?define(["vue"],t):(e="undefined"!==typeof globalThis?globalThis:e||self,e.QCalendarTask=t(e.Vue))})(this,function(Ee){const u=/^(\d{4})-(\d{1,2})(-(\d{1,2}))?([^\d]+(\d{1,2}))?(:(\d{1,2}))?(:(\d{1,2}))?(.(\d{1,3}))?$/,b=/^(\d{4})-(\d{1,2})(-(\d{1,2}))?/,q=/(\d\d?)(:(\d\d?)|)(:(\d\d?)|)/,E=[0,31,28,31,30,31,30,31,31,30,31,30,31],F=[0,31,29,31,30,31,30,31,31,30,31,30,31],d={MILLISECONDS_IN:{SECOND:1e3,MINUTE:6e4,HOUR:36e5,DAY:864e5,WEEK:6048e5},SECONDS_IN:{MINUTE:60,HOUR:3600,DAY:86400,WEEK:604800},MINUTES_IN:{MINUTE:1,HOUR:60,DAY:1440,WEEK:10080},HOURS_IN:{DAY:24,WEEK:168},DAYS_IN:{WEEK:7}},M=28,W=31,x=12,O=1,U=1,H=0;function t(e){return"string"===typeof e&&u.test(e)}function Fe(e){if("string"!==typeof e)return null;const t=u.exec(e);if(!t||!t[1]||!t[2])return null;const a=parseInt(t[1],10),n=parseInt(t[2],10),r=parseInt(t[4]||"1",10),o=parseInt(t[6]||"0",10),d=parseInt(t[8]||"0",10);return{date:e,time:o.toString().padStart(2,"0")+":"+d.toString().padStart(2,"0"),year:a,month:n,day:r,hour:o,minute:d,hasDay:!!t[4],hasTime:!0,past:!1,current:!1,future:!1,disabled:!1,weekday:0,doy:0,workweek:0}}function R(e,t=!1){if(!(e instanceof Date))return null;const a=t?"UTC":"";return g({date:r(e[`get${a}FullYear`](),4)+"-"+r(e[`get${a}Month`]()+1,2)+"-"+r(e[`get${a}Date`](),2),time:r(e[`get${a}Hours`]()||0,2)+":"+r(e[`get${a}Minutes`]()||0,2),year:e[`get${a}FullYear`](),month:e[`get${a}Month`]()+1,day:e[`get${a}Date`](),hour:e[`get${a}Hours`](),minute:e[`get${a}Minutes`](),weekday:0,doy:0,workweek:0,hasDay:!0,hasTime:!0,past:!1,current:!1,future:!1,disabled:!1})}function r(e,t){let a=String(e);while(a.length<t)a="0"+a;return a}function V(e){return e%4===0&&e%100!==0||e%400===0}function i(e,t){return(V(e)?F:E)[t]}function h(e){const t=new Date(e.year,e.month-1,e.day+1);return g(ue({...e,year:t.getFullYear(),month:t.getMonth()+1,day:t.getDate()}))}function p(e){const t=new Date(e.year,e.month-1,e.day-1);return g(ue({...e,year:t.getFullYear(),month:t.getMonth()+1,day:t.getDate()}))}function Me(){const e=new Date,t=e.getMonth()+1,a=e.getDate(),n=e.getFullYear();return[n,r(t,2),r(a,2)].join("-")}function B(e){return e===Me()}function T(e,t,a){let n=I(e);if(t){if(1===n.day||0===n.weekday)while(!t.includes(Number(n.weekday)))n=h(n);n=v(n,t[0],p),n=g(n),a&&(n=k(n,a,n.hasTime))}return n}function N(e,t,a){let n=I(e);if(t&&Array.isArray(t)){const r=i(n.year,n.month);if(r===n.day||n.weekday===t[t.length-1])while(!t.includes(Number(n.weekday)))n=p(n);n=v(n,t[t.length-1],h),n=g(n),a&&(n=k(n,a,n.hasTime))}return n}function S(e){let t=I(e);return t.day=U,t=g(t),t}function A(e){let t=I(e);return t.day=i(t.year,t.month),t=g(t),t}function L(e){const t=Object.prototype.toString.call(e);switch(t){case"[object Number]":return e;case"[object String]":{const a=q.exec(e);return a?60*parseInt(a[1],10)+parseInt(a[3]||"0",10):!1}case"[object Object]":return"object"!==typeof e||"number"!==typeof e.hour||"number"!==typeof e.minute?!1:"object"===typeof e&&"hour"in e&&"minute"in e&&60*e.hour+e.minute}return!1}function Y(e,t){return!(!e||!t)&&e.year===t.year&&e.month===t.month&&e.day===t.day&&e.hour===t.hour&&e.minute===t.minute}function $(e,t){return c(e)===c(t)}function K(e,t){return y(e)===y(t)}function Z(e,t){return f(e)===f(t)}function We(e,t=null){let a=Fe(e);return a?(a=g(a),t&&(a=k(a,t,a.hasTime)),a):null}function xe(e){return 1e8*(e.year??0)+1e6*(e.month??0)+1e4*(e.day??0)}function l(e){return 100*(e.hour??0)+(e.minute??0)}function n(e){return xe(e)+l(e)}function j(e,t,a=!1){const n=Date.UTC(e.year??0,(e.month??1)-1,e.day??1,e.hour??0,e.minute??0),r=Date.UTC(t.year??0,(t.month??1)-1,t.day??1,t.hour??0,t.minute??0);return!0===a&&r<n?0:r-n}function k(e,t,a=!1){let n=I(e),r=xe(t),o=xe(n),d=r===o;return n.hasTime&&a&&d&&(r=l(t),o=l(n),d=r===o),n.past=o<r,n.current=d,n.future=o>r,n.currentWeekday=n.weekday===t.weekday,n}function P(e,t,a=null){let n=I(e);return n.hasTime=!0,n.hour=Math.floor(t/d.MINUTES_IN.HOUR),n.minute=t%d.MINUTES_IN.HOUR,n.time=y(n),a&&(n=k(n,a,!0)),n}function w(e){let t=I(e);return t.weekday=s(t),t}function z(e){let t=I(e);return t.doy=a(t)||0,t}function Q(e){let t=I(e);return t.workweek=o(t),t}function X(e,t,a,n,r){let o=I(e);const d=xe(o);if(void 0!==t){const s=Fe(t);if(s){const c=xe(s);d<=c&&(o.disabled=!0)}}if(!0!==o.disabled&&void 0!==a){const y=Fe(a);if(y){const f=xe(y);d>=f&&(o.disabled=!0)}}if(!0!==o.disabled&&Array.isArray(n)&&n.length>0)for(var u in n)if(n[u]===o.weekday){o.disabled=!0;break}if(!0!==o.disabled&&Array.isArray(r)&&r.length>0)for(var i in r)if(Array.isArray(r[i])&&2===r[i].length&&r[i][0]&&r[i][1]){const v=Fe(r[i][0]),m=Fe(r[i][1]);if(v&&m&&oe(o,v,m)){o.disabled=!0;break}}else{const h=r[i];if(Array.isArray(h))for(var l of h){const p=We(l);if(p){const k=xe(p);if(k===d){o.disabled=!0;break}}}else if(h){const w=We(h);if(w){const g=xe(w);g===d&&(o.disabled=!0)}}}return o}function g(e){let t=I(e);return t.hasTime=!0,t.time=y(t),t.date=c(t),t.weekday=s(t),t.doy=a(t)||0,t.workweek=o(t),t}function a(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 o(e){let t=I(e);if(0===t.year){const r=We(Me());r&&(t=r)}const a=new Date(Date.UTC(t.year,t.month-1,t.day)),n=4;a.setUTCDate(a.getUTCDate()-(a.getUTCDay()+6)%7+n),a.setUTCDate(a.getUTCDate()+n-(a.getUTCDay()||7));e=new Date(Date.UTC(a.getUTCFullYear(),0,1)),e=Math.ceil(((a.valueOf()-e.valueOf())/864e5+1)/7);return e}function s(e){let t=e.weekday;if(e.hasDay){const a=Math.floor,n=e.day,r=(e.month+9)%x+1,o=a(e.year/100),d=e.year%100-(e.month<=2?1:0);t=((n+a(2.6*r-.2)-2*o+d+a(d/4)+a(o/4))%7+7)%7}return t??0}function I(e){return{...e}}function c(e){let t=r(e.year,4)+"-"+r(e.month,2);return e.hasDay&&(t+="-"+r(e.day,2)),t}function y(e){return e.hasTime?r(e.hour,2)+":"+r(e.minute,2):""}function f(e){return c(e)+" "+(e.hasTime?y(e):"00:00")}function G(e,t=h,a=1,n=[0,1,2,3,4,5,6]){const r=I(e);return _(r,t,a,n)}function _(e,t=h,a=1,n=[0,1,2,3,4,5,6]){let r=I(e);n.includes(Number(r.weekday))||0!==r.weekday||t!==h||++a;while(--a>=0)r=t(r),n.length<7&&!n.includes(Number(r.weekday))&&++a;return r}function v(e,t,a=h,n=6){let r=I(e);while(r.weekday!==t&&--n>=0)r=a(r);return r}function J(e,t,a,n=[0,1,2,3,4,5,6],r=void 0,o=void 0,d=[],u=[],i=42,l=0){const s=xe(e),c=xe(t),y=[];let f=I(e),v=0,m=v===c;if(!(c<s))while((!m||y.length<l)&&y.length<i){if(v=xe(f),m=m||v>c&&y.length>=l,m)break;if(n.includes(Number(f.weekday))){let e=I(f);e=g(e),e=k(e,a),e=X(e,r,o,d,u),y.push(e)}f=_(f,h)}return y}function ee(t,a,n,r,o){const d=[];for(let e=0;e<r;++e){const u=(a+e)*n,i=I(t);d.push(P(i,u,o))}return d}function m(n,r){const e=()=>"";return"undefined"===typeof Intl||"undefined"===typeof Intl.DateTimeFormat?e:(t,e)=>{try{const a=new Intl.DateTimeFormat(n||void 0,r(t,e));return a.format(ae(t))}catch(e){return console.error(`Intl.DateTimeFormat: ${e.message} -> `+f(t)),""}}}function te(e,t=!0){return t?new Date(Date.UTC(e.year,e.month-1,e.day,0,0)):new Date(e.year,e.month-1,e.day,0,0)}function ae(e,t=!0){return t?new Date(Date.UTC(e.year,e.month-1,e.day,e.hour,e.minute)):new Date(e.year,e.month-1,e.day,e.hour,e.minute)}function D(e){return isFinite(Number(e))}function ne(e,t=!1){const a=!0===t?n:xe;return e.reduce((e,t)=>{return Math.max(a(e),a(t))===a(e)?e:t})}function re(e,t=!1){const a=!0===t?n:xe;return e.reduce((e,t)=>{return Math.min(a(e),a(t))===a(e)?e:t})}function oe(e,t,a,n=!1){const r=xe(e)+(!0===n?l(e):0),o=xe(t)+(!0===n?l(t):0),d=xe(a)+(!0===n?l(a):0);return r>=o&&r<=d}function de(e,t,a,n){const r=xe(e),o=xe(t),d=xe(a),u=xe(n);return r>=d&&r<=u||o>=d&&o<=u||d>=r&&o>=u}function C(e,t){const a=I(e);return t.year&&(a.year+=t.year),t.month&&(a.month+=t.month),t.day&&(a.day+=t.day),t.hour&&(a.hour+=t.hour),t.minute&&(a.minute+=t.minute),g(ue(a))}function ue(e){const t=new Date(e.year,e.month-1,e.day,e.hour,e.minute);return{...e,year:t.getFullYear(),month:t.getMonth()+1,day:t.getDate(),hour:t.getHours(),minute:t.getMinutes()}}function ie(e,t){const a=j(e,t,!0);return Math.floor(a/d.MILLISECONDS_IN.DAY)}function le(e,t){let a=I(e),n=I(t);return a=v(a,0),n=v(n,6),Math.ceil(ie(a,n)/d.DAYS_IN.WEEK)}const se={Sun:new Date("2020-01-05T00:00:00.000Z"),Mon:new Date("2020-01-06T00:00:00.000Z"),Tue:new Date("2020-01-07T00:00:00.000Z"),Wed:new Date("2020-01-08T00:00:00.000Z"),Thu:new Date("2020-01-09T00:00:00.000Z"),Fri:new Date("2020-01-10T00:00:00.000Z"),Sat:new Date("2020-01-11T00:00:00.000Z")};function ce(){const e=()=>"",r={long:{timeZone:"UTC",weekday:"long"},short:{timeZone:"UTC",weekday:"short"},narrow:{timeZone:"UTC",weekday:"narrow"}};return"undefined"===typeof Intl||"undefined"===typeof Intl.DateTimeFormat?e:t;function t(t,e,a){try{const n=new Intl.DateTimeFormat(a||void 0,r[e]||r["long"]);return n.format(se[t])}catch(e){return e instanceof Error&&console.error(`Intl.DateTimeFormat: ${e.message} -> day of week: `+t),""}}}function ye(t,a){const e=Object.keys(se),n=ce();return e.map(e=>String(n(e,t,a)))}function fe(){const e=()=>"",o={long:{timeZone:"UTC",month:"long"},short:{timeZone:"UTC",month:"short"},narrow:{timeZone:"UTC",month:"narrow"}};return"undefined"===typeof Intl||"undefined"===typeof Intl.DateTimeFormat?e:t;function t(t,e,a){try{const n=new Intl.DateTimeFormat(a||void 0,o[e]||o["long"]),r=new Date;return r.setDate(1),r.setMonth(t),n.format(r)}catch(e){return e instanceof Error&&console.error(`Intl.DateTimeFormat: ${e.message} -> month: `+t),""}}}function ve(t,a){const n=fe();return[...Array(12).keys()].map(e=>n(e,t,a))}var e={PARSE_DATETIME:u,PARSE_DATE:b,PARSE_TIME:q,DAYS_IN_MONTH:E,DAYS_IN_MONTH_LEAP:F,DAYS_IN_MONTH_MIN:M,DAYS_IN_MONTH_MAX:W,MONTH_MAX:x,MONTH_MIN:O,DAY_MIN:U,TIME_CONSTANTS:d,FIRST_HOUR:H,today:Me,getStartOfWeek:T,getEndOfWeek:N,getStartOfMonth:S,getEndOfMonth:A,parseTime:L,validateTimestamp:t,parsed:Fe,parseTimestamp:We,parseDate:R,getDayIdentifier:xe,getTimeIdentifier:l,getDayTimeIdentifier:n,diffTimestamp:j,updateRelative:k,updateMinutes:P,updateWeekday:w,updateDayOfYear:z,updateWorkWeek:Q,updateDisabled:X,updateFormatted:g,getDayOfYear:a,getWorkWeek:o,getWeekday:s,isLeapYear:V,daysInMonth:i,copyTimestamp:I,padNumber:r,getDate:c,getTime:y,getDateTime:f,nextDay:h,prevDay:p,relativeDays:_,findWeekday:v,createDayList:J,createIntervalList:ee,createNativeLocaleFormatter:m,makeDate:te,makeDateTime:ae,validateNumber:D,isBetweenDates:oe,isOverlappingDates:de,daysBetween:ie,weeksBetween:le,addToDate:C,compareTimestamps:Y,compareDate:$,compareTime:K,compareDateTime:Z,getWeekdayFormatter:ce,getWeekdayNames:ye,getMonthFormatter:fe,getMonthNames:ve},e=Object.freeze({__proto__:null,DAYS_IN_MONTH:E,DAYS_IN_MONTH_LEAP:F,DAYS_IN_MONTH_MAX:W,DAYS_IN_MONTH_MIN:M,DAY_MIN:U,FIRST_HOUR:H,MONTH_MAX:x,MONTH_MIN:O,PARSE_DATE:b,PARSE_DATETIME:u,PARSE_TIME:q,TIME_CONSTANTS:d,addToDate:C,compareDate:$,compareDateTime:Z,compareTime:K,compareTimestamps:Y,copyTimestamp:I,createDayList:J,createIntervalList:ee,createNativeLocaleFormatter:m,daysBetween:ie,daysInMonth:i,default:e,diffTimestamp:j,findWeekday:v,getDate:c,getDateTime:f,getDayIdentifier:xe,getDayOfYear:a,getDayTimeIdentifier:n,getEndOfMonth:A,getEndOfWeek:N,getMonthFormatter:fe,getMonthNames:ve,getStartOfMonth:S,getStartOfWeek:T,getTime:y,getTimeIdentifier:l,getWeekday:s,getWeekdayFormatter:ce,getWeekdayNames:ye,getWorkWeek:o,isBetweenDates:oe,isLeapYear:V,isOverlappingDates:de,isToday:B,makeDate:te,makeDateTime:ae,maxTimestamp:ne,minTimestamp:re,moveRelativeDays:G,nextDay:h,padNumber:r,parseDate:R,parseTime:L,parseTimestamp:We,parsed:Fe,prevDay:p,relativeDays:_,today:Me,updateDayOfYear:z,updateDisabled:X,updateFormatted:g,updateMinutes:P,updateRelative:k,updateWeekday:w,updateWorkWeek:Q,validateNumber:D,validateTimestamp:t,weeksBetween:le});function Oe(e,t="px"){if(e)return isNaN(e)?String(e):"auto"===e?e:""+Number(e)+t}function me(t,a){for(let e=0;e<t.length;e++)if(!0===a(t[e],e))return e;return-1}function He(e,t){return 0===t?e:e.slice(0,t)}var he={convertToUnit:Oe,indexOf:me,minCharWidth:He},he=Object.freeze({__proto__:null,convertToUnit:Oe,default:he,indexOf:me,minCharWidth:He});const pe=e=>e.replace(/(-\w)/g,e=>e[1].toUpperCase());function ke(t,e,a,n){const r={};for(const o in a){const d=a[o],u=pe("on-"+o);if(!e.value)return console.warn("$listeners has not been set up"),{};if(void 0!==e.value[u]){const i="on"+d.event.charAt(0).toUpperCase()+d.event.slice(1),l=e=>{return(void 0===d.button||"buttons"in e&&e.buttons>0&&e.button===d.button)&&(d.prevent&&e.preventDefault(),d.stop&&e.stopPropagation(),t(o,n(e,o))),d.result};i in r?Array.isArray(r[i])?r[i].push(l):r[i]=[r[i],l]:r[i]=l}}return r}function we(e,t,a,n){return ke(e,t,ge(a),n)}function ge(e){return{["click"+e]:{event:"click"},["contextmenu"+e]:{event:"contextmenu",prevent:!0,result:!1},["mousedown"+e]:{event:"mousedown"},["mousemove"+e]:{event:"mousemove"},["mouseup"+e]:{event:"mouseup"},["mouseenter"+e]:{event:"mouseenter"},["mouseleave"+e]:{event:"mouseleave"},["touchstart"+e]:{event:"touchstart"},["touchmove"+e]:{event:"touchmove"},["touchend"+e]:{event:"touchend"}}}function _e(e){return Object.keys(ge(e))}function Re(a,n){return{getMouseEventHandlers:(e,t)=>ke(a,n,e,t),getDefaultMouseEventHandlers:(e,t)=>we(a,n,e,t),getMouseEventName:ge,getRawMouseEvents:_e}}const Ve={mounted(e,t){if("function"===typeof t.value){const a=t.value,n={callback:a,size:{width:0,height:0},observer:new ResizeObserver(e=>{const t=e[0].contentRect;t.width===n.size.width&&t.height===n.size.height||(n.size.width=t.width,n.size.height=t.height,n.debounceTimeout&&clearTimeout(n.debounceTimeout),n.debounceTimeout=setTimeout(()=>{n.callback(n.size),n.debounceTimeout=void 0},100))})};n.observer.observe(e),e.__onResizeObserver=n}},beforeUnmount(e){if(e.__onResizeObserver){const{observer:t,debounceTimeout:a}=e.__onResizeObserver;a&&clearTimeout(a),t.unobserve(e),delete e.__onResizeObserver}}};function Be(t,a,{scrollArea:e,pane:n}){if(!a){const s="[error: renderCalendar] no renderFunc has been supplied to useCalendar";throw console.error(s),new Error(s)}const r=Ee.reactive({width:0,height:0}),o=Ee.ref(null);function d({width:e,height:t}){r.width=e,r.height=t}const u=Ee.computed(()=>{return!0!==t.noScroll&&e.value&&n.value&&r.height?e.value.offsetWidth-n.value.offsetWidth:0});function i(){}function l(){const e={ref:o,role:"complementary",lang:t.locale,class:`q-calendar ${t.dark?"q-calendar--dark":""} `+(t.bordered?"q-calendar__bordered":"")};return Ee.withDirectives(Ee.h("div",{...e},[a()]),[[Ve,d]])}return{rootRef:o,scrollWidth:u,__initCalendar:i,__renderCalendar:l}}const De=e=>e.every(e=>["day","date","weekday","interval","time","resource","task"].includes(e)),be={modelValue:{type:String,default:Me(),validator:e=>""===e||t(e)},weekdays:{type:Array,default:()=>[0,1,2,3,4,5,6]},dateType:{type:String,default:"round",validator:e=>["round","rounded","square"].includes(e)},weekdayAlign:{type:String,default:"center",validator:e=>["left","center","right"].includes(e)},dateAlign:{type:String,default:"center",validator:e=>["left","center","right"].includes(e)},bordered:Boolean,dark:Boolean,noAria:Boolean,noActiveDate:Boolean,noHeader:Boolean,noScroll:Boolean,shortWeekdayLabel:Boolean,noDefaultHeaderText:Boolean,noDefaultHeaderBtn:Boolean,minWeekdayLabel:{type:[Number,String],default:1},weekdayBreakpoints:{type:Array,default:()=>[75,35],validator:e=>2===e.length},locale:{type:String,default:"en-US"},animated:Boolean,transitionPrev:{type:String,default:"slide-right"},transitionNext:{type:String,default:"slide-left"},disabledDays:Array,disabledBefore:String,disabledAfter:String,disabledWeekdays:{type:Array,default:()=>[]},dragEnterFunc:Function,dragOverFunc:Function,dragLeaveFunc:Function,dropFunc:Function,selectedDates:{type:[Array,Set],default:()=>[]},selectedStartEndDates:{type:Array,default:()=>[]},hoverable:Boolean,focusable:Boolean,focusType:{type:Array,default:()=>["date"],validator:De}};function Le(t,{startDate:e,endDate:a,times:n}){const r=Ee.computed(()=>We(e.value)),o=Ee.computed(()=>{return"0000-00-00"===a.value?N(r.value,t.weekdays,n.today):We(a.value)||r.value}),d=Ee.computed(()=>m(t.locale,()=>({timeZone:"UTC",day:"numeric"}))),u=Ee.computed(()=>m(t.locale,(e,t)=>({timeZone:"UTC",weekday:t?"short":"long"}))),i=Ee.computed(()=>m(t.locale,()=>({timeZone:"UTC",dateStyle:"full"})));function l(e,t){return e&&e.length>0&&e.includes(t.date)}function s(e,t){const a={firstDay:!1,betweenDays:!1,lastDay:!1};if(2===e.length){const n=xe(t),r=xe(Fe(e[0])),o=xe(Fe(e[1]));a.firstDay=r===n,a.lastDay=o===n,a.betweenDays=r<n&&o>n}return a}function c(e,t=!1,a=[],n=[],r=!1){const o=l(a,e),{firstDay:d,lastDay:u,betweenDays:i}=s(n,e);return{"q-past-day":!d&&!i&&!u&&!o&&!t&&!!e.past,"q-future-day":!d&&!i&&!u&&!o&&!t&&!!e.future,"q-outside":t,"q-current-day":!!e.current,"q-selected":o,"q-range-first":d,"q-range":i,"q-range-last":u,"q-range-hover":r&&(d||u||i),"q-disabled-day disabled":!0===e.disabled}}function y(e){return T(e,t.weekdays,n.today)}function f(e){return N(e,t.weekdays,n.today)}function v(){return{}}return{parsedStart:r,parsedEnd:o,dayFormatter:d,weekdayFormatter:u,ariaDateFormatter:i,arrayHasDate:l,checkDays:s,getRelativeClasses:c,startOfWeek:y,endOfWeek:f,dayStyleDefault:v}}const Te={modelValue:{type:String,default:Me(),validator:e=>""===e||t(e)},modelTasks:{type:Array,default:()=>[]},modelTitle:{type:Array,default:()=>[]},modelFooter:{type:Array,default:()=>[]},taskKey:{type:[String,Number],default:"id"},weekdays:{type:Array,default:()=>[0,1,2,3,4,5,6]},dateType:{type:String,default:"round",validator:e=>["round","rounded","square"].includes(e)},dateHeader:{type:String,default:"stacked",validator:e=>["stacked","inline","inverted"].includes(e)},weekdayAlign:{type:String,default:"center",validator:e=>["left","center","right"].includes(e)},dateAlign:{type:String,default:"center",validator:e=>["left","center","right"].includes(e)},dayHeight:{type:[Number,String],default:0,validator:D},dayMinHeight:{type:[Number,String],default:40,validator:D},weekdayStyle:{type:Function,default:null},weekdayClass:{type:Function,default:null},dayStyle:{type:Function,default:null},dayClass:{type:Function,default:null},footerDayClass:{type:Function,default:null},view:{type:String,validator:e=>["day","week","month"].includes(e)},viewCount:{type:Number,default:1,validator:e=>D(e)&&e>0},taskWidth:{type:Number,default:200,validator:e=>D(e)&&e>0}};function Ye(t,e,{times:a}){const n=Ee.computed(()=>{if(!t.modelValue)throw new Error("QCalendarTask: no modelValue provided");if("day"===t.view)return We(t.modelValue);if("week"===t.view)return T(We(t.modelValue),t.weekdays,a.today);if("month"===t.view)return S(We(t.modelValue));throw new Error(`QCalendarTask: unknown 'view' type (${t.view})`)}),r=Ee.computed(()=>{if(!t.modelValue)throw new Error("QCalendarTask: no modelValue provided");if("day"===t.view){if(1===t.viewCount)return n.value;let e=I(n.value);return e=C(e,{day:t.viewCount-1}),e}if("week"===t.view){if(1===t.viewCount)return N(We(t.modelValue),t.weekdays,a.today);{let e=I(n.value);return e=C(e,{day:(t.viewCount-1)*d.DAYS_IN.WEEK}),N(e,t.weekdays,a.today)}}if("month"!==t.view)throw new Error(`QCalendarTask: unknown 'view' type (${t.view})`);if(1===t.viewCount)return A(We(t.modelValue));{let e=I(n.value);return e=C(e,{month:t.viewCount}),A(e)}}),o=Ee.computed(()=>{return J(n.value,r.value,a.today,t.weekdays,t.disabledBefore,t.disabledAfter,t.disabledWeekdays||[],t.disabledDays||[],Number.MAX_SAFE_INTEGER)});return{days:o,parsedStartDate:n,parsedEndDate:r}}const Ne={now:{type:String,validator:e=>""===e||t(e),default:""}};function $e(e){const t=Ee.reactive({now:We("0000-00-00 00:00"),today:We("0000-00-00")}),a=Ee.computed(()=>e.now?We(e.now):o());function n(){t.now&&t.today&&(t.now.current=t.today.current=!0,t.now.past=t.today.past=!1,t.now.future=t.today.future=!1)}function r(){const e=a.value||o();d(e,t.now),u(e,t.now),d(e,t.today)}function o(){return R(new Date)}function d(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)}function u(e,t){e.time!==t.time&&(t.hour=e.hour,t.minute=e.minute,t.time=e.time)}return Ee.watch(a,()=>r()),{times:t,parsedNow:a,setCurrent:n,updateCurrent:r,getNow:o,updateDay:d,updateTime:u}}function Ke(r,{parsedView:o,parsedValue:d,times:u}){const e=Ee.computed(()=>{const e=d.value;let t=r.maxDays,a=e,n=e;switch(o.value){case"month":a=S(e),n=A(e),t=i(a.year,a.month);break;case"week":case"week-agenda":case"week-scheduler":a=T(e,r.weekdays,u.today),n=N(a,r.weekdays,u.today),t=r.weekdays.length;break;case"day":case"scheduler":case"agenda":n=G(I(n),h,t>1?t-1:t,r.weekdays),n=g(n);break;case"month-interval":case"month-scheduler":case"month-agenda":a=S(e),n=A(e),n=g(n),t=i(a.year,a.month);break;case"resource":t=1,n=G(I(n),h,t,r.weekdays),n=g(n);break}return{start:a,end:n,maxDays:t}});return{renderValues:e}}const Se=["moved"];function Ze(i,{parsedView:l,parsedValue:s,direction:c,maxDays:y,times:f,emittedValue:v,emit:m}){function e(a=1){if(0===a)v.value=Me();else{let e=I(s.value);const n=A(e),r=a>0,o=r?h:p,d=r?n.day:1;let t=r?a:-a;c.value=r?"next":"prev";const u=i.weekdays.length;while(--t>=0)switch(l.value){case"month":e.day=d,e=o(e),e=w(e);while(!i.weekdays.includes(Number(e.weekday)))e=C(e,{day:r?1:-1});break;case"week":case"week-agenda":case"week-scheduler":e=_(e,o,u,i.weekdays);break;case"day":case"scheduler":case"agenda":e=_(e,o,y.value,i.weekdays);break;case"month-interval":case"month-agenda":case"month-scheduler":e.day=d,e=o(e);break;case"resource":e=_(e,o,y.value,i.weekdays);break}e=w(e),e=g(e),e=z(e),e=k(e,f.now),v.value=e.date,m("moved",e)}}return{move:e}}const Ae=/^on[A-Z]/;function je(e=Ee.getCurrentInstance()){return{emitListeners:Ee.computed(()=>{const t={};return e?.vnode?.props&&Object.keys(e.vnode.props).forEach(e=>{Ae.test(e)&&(t[e]=!0)}),t})}}function Ue(){const e={"aria-hidden":"true",class:"q-calendar__focus-helper"};return[Ee.h("span",e)]}function Ie(){function e({focusable:e,focusType:t},a,n){const r=e&&t.includes("date");return Ee.h("button",{...a,tabindex:r?0:-1},[n,r&&Ue()])}return{renderButton:e}}const Ce=["change"];function Pe(n,{days:r,lastStart:o,lastEnd:d}){function e(){const e=r.value;if(0===e.length)return!1;const t=e[0].date,a=e[e.length-1].date;return(!o.value||!d.value||t!==o.value||a!==d.value)&&(o.value=t,d.value=a,n("change",{start:t,end:a,days:e}),!0)}return{checkChange:e}}function ze(){function e(e,t){return(Array.isArray(t)?t:[t]).includes(e.keyCode)}return{isKeyCode:e}}const qe=ze().isKeyCode,Qe={useNavigation:Boolean};function Xe(t,{rootRef:a,focusRef:n,focusValue:r,datesRef:o,parsedView:d,emittedValue:u,direction:i,times:l}){let e=!1;function s(){e||document&&(e=!0,document.addEventListener("keyup",m),document.addEventListener("keydown",v))}function c(){document&&(document.removeEventListener("keyup",m),document.removeEventListener("keydown",v),e=!1)}function y(e){if(e&&document){const t=document.activeElement;if(t!==document.body&&a.value?.contains(t))return!0}return!1}function f(){let t=0;const a=window.setInterval(()=>{const e=o.value[n.value];e&&(e.focus(),50!==++t)&&document.activeElement!==e||window.clearInterval(a)},250)}function v(e){y(e)&&qe(e,[33,34,35,36,37,38,39,40])&&(e.stopPropagation(),e.preventDefault())}function m(e){if(y(e)&&qe(e,[33,34,35,36,37,38,39,40])){const t={33:g,34:_,35:b,36:D,37:k,38:h,39:w,40:p};t[e.keyCode]?.()}}function h(){let e=I(r.value);if("month"===d.value){if(e=C(e,{day:-7}),r.value.month!==e.month)return i.value="prev",void(u.value=e.date)}else e=C(e,{minute:Number(t.intervalMinutes)});i.value="prev",n.value=e.date}function p(){let e=I(r.value);if("month"===d.value){if(e=C(e,{day:7}),r.value.month!==e.month)return i.value="next",void(u.value=e.date)}else e=C(e,{minute:Number(t.intervalMinutes)});i.value="next",n.value=e.date}function k(){let e=I(r.value);i.value="prev";do{e=C(e,{day:-1})}while(!t.weekdays.includes(Number(e.weekday)));n.value=e.date}function w(){let e=I(r.value);i.value="next";do{e=C(e,{day:1})}while(!t.weekdays.includes(Number(e.weekday)));n.value=e.date}function g(){let e=I(r.value);e="month"===d.value?C(e,{month:-1}):C(e,{day:-7}),i.value="prev",n.value=e.date}function _(){let e=I(r.value);e="month"===d.value?C(e,{month:1}):C(e,{day:7}),i.value="next",n.value=e.date}function D(){let e=I(r.value);e="month"===d.value?S(e):T(e,t.weekdays||[],l.today);while(!t.weekdays.includes(Number(e.weekday)))e=C(e,{day:-1});n.value=e.date}function b(){let e=I(r.value);e="month"===d.value?A(e):N(e,t.weekdays||[],l.today);while(!t.weekdays.includes(Number(e.weekday)))e=C(e,{day:-1});n.value=e.date}return Ee.onBeforeUnmount(()=>{c()}),Ee.watch(()=>t.useNavigation,e=>{(!0===e?s:c)()}),!0===t.useNavigation&&s(),{startNavigation:s,endNavigation:c,tryFocus:f}}const Ge={cellWidth:[Number,String]},Je=Ie().renderButton;var et=Ee.defineComponent({name:"QCalendarTask",directives:{ResizeObserver:Ve},props:{...Ne,...Qe,...Ge,...be,...Te},emits:["update:model-value","update:model-tasks","update:model-title","update:model-footer","task-expanded",...Ce,...Se,..._e("-date"),..._e("-day"),..._e("-head-day")],setup(c,{slots:y,emit:l,expose:O}){const e=Ee.ref(null),U=Ee.ref(null),o=Ee.ref("next"),d=Ee.ref(c.modelValue||Me()),u=Ee.ref("0000-00-00"),t=Ee.ref(0),f=Ee.ref(c.modelValue),v=Ee.ref(c.modelValue||Me()),a=Ee.ref(Fe(c.modelValue||Me())),m=Ee.ref({}),i=Ee.reactive({width:0,height:0}),h=Ee.ref(""),p=Ee.ref(""),H=Ee.ref(null),R=Ee.ref(null),n=(Ee.watch(()=>c.view,()=>{t.value=0}),Ee.computed(()=>{return"month"===c.view?"month-interval":c.view})),r=Ee.getCurrentInstance();if(null===r)throw new Error("current instance is null");const s=je(r).emitListeners,{times:k,setCurrent:V,updateCurrent:w}=$e(c),{parsedStart:B,dayFormatter:L,weekdayFormatter:Y,ariaDateFormatter:$,dayStyleDefault:g,getRelativeClasses:_}=(w(),V(),Le(c,{startDate:d,endDate:u,times:k})),D=Ee.computed(()=>{return We(c.modelValue,k.now)||B.value||k.today}),K=(a.value=D.value,v.value=D.value.date,Ke(c,{parsedView:n,times:k,parsedValue:D})).renderValues,{rootRef:Z,__renderCalendar:j}=Be(c,qe,{scrollArea:e,pane:U}),{days:b,parsedStartDate:T,parsedEndDate:N}=Ye(c,l,{times:k}),S=Ze(c,{parsedView:n,parsedValue:D,direction:o,maxDays:t,times:k,emittedValue:f,emit:l}).move,A=Re(l,s).getDefaultMouseEventHandlers,P=Pe(l,{days:b,lastStart:H,lastEnd:R}).checkChange,I=ze().isKeyCode,z=Xe(c,{rootRef:Z,focusRef:v,focusValue:a,datesRef:m,parsedView:n,emittedValue:f,direction:o,times:k}).tryFocus,C=Ee.ref(!0),q=Ee.computed(()=>{return void 0!==c.cellWidth?parseInt(String(c.cellWidth),10):150}),E=Ee.computed(()=>{return!0===c.focusable&&c.focusType.includes("day")}),Q=Ee.computed(()=>{return!0===c.focusable&&c.focusType.includes("date")&&!0!==E.value}),F=Ee.computed(()=>{return!0===c.focusable&&c.focusType.includes("weekday")}),X=Ee.computed(()=>{return parseInt(String(c.dayHeight),10)}),G=Ee.computed(()=>{return parseInt(String(c.dayMinHeight),10)});function J(){f.value=Me()}function ee(e=1){S(e)}function te(e=1){S(-e)}function ae({width:e,height:t}){i.width=e,i.height=t}function M(e){return e.date===f.value}function ne(e,t,a){const n=y.day,r=c.dayStyle||g,o=!0!==c.noActiveDate&&D.value.date===e.date,d=t[c.taskKey],u={timestamp:e,task:t,taskIndex:a,activeDate:o,droppable:p.value===d},i=Oe(q.value),l={width:i,minWidth:i,maxWidth:i,...r({scope:u})},s="function"===typeof c.dayClass?c.dayClass({scope:u}):{};return Ee.h("div",{tabindex:!0===E.value?0:-1,class:{"q-calendar-task__task--day":!0,...s,..._(e),"q-active-date":!0===o,"q-calendar__hoverable":!0===c.hoverable,"q-calendar__focusable":!0===E.value},style:l,onFocus:()=>{E.value},...A("-day",e=>{return{scope:u,event:e}}),onDragenter:e=>{void 0!==c.dragEnterFunc&&"function"===typeof c.dragEnterFunc&&(!0===c.dragEnterFunc(e,"day",{scope:u})?p.value=d:p.value="")},onDragover:e=>{void 0!==c.dragOverFunc&&"function"===typeof c.dragOverFunc&&(!0===c.dragOverFunc(e,"day",{scope:u})?p.value=d:p.value="")},onDragleave:e=>{void 0!==c.dragLeaveFunc&&"function"===typeof c.dragLeaveFunc&&(!0===c.dragLeaveFunc(e,"day",{scope:u})?p.value=d:p.value="")},onDrop:e=>{void 0!==c.dropFunc&&"function"===typeof c.dropFunc&&(!0===c.dropFunc(e,"day",{scope:u})?p.value=d:p.value="")}},[n&&n({scope:u}),Ue()])}function re(t,a){return b.value.map(e=>ne(e,t,a))}function oe(e,t){const a=y.days,n={timestamps:b.value,days:b.value,task:e,taskIndex:t,cellWidth:q.value};return Ee.h("div",{class:"q-calendar-task__task--days-row"},[re(e,t),a&&a({scope:n})])}function de(t,e,a=0,n=!0){const r=0===a?y.task:y.subtask,o={start:T.value,end:N.value,task:t,taskIndex:e,expanded:n},d=Oe(c.taskWidth),u={width:d,minWidth:d,maxWidth:d},i=!0===c.focusable&&c.focusType.includes("task");return Ee.h("div",{class:{"q-calendar-task__task--item":!0,"q-calendar__sticky":!0===C.value,"q-calendar__hoverable":!0===c.hoverable,"q-calendar__focusable":!0===i},style:u},[Ee.h("div",{style:{flexDirection:"column",justifyContent:"center",alignItems:"center",width:10+10*a+"px"}},[Ee.h("div",{class:{"q-calendar__parent":void 0!==t.children,"q-calendar__parent--expanded":void 0!==t.children&&!0===t.expanded,"q-calendar__parent--collapsed":void 0!==t.children&&!0!==t.expanded},onClick:e=>{e.stopPropagation(),t.expanded=!t.expanded,l("task-expanded",{expanded:t.expanded,scope:o})}})]),r&&r({scope:o}),Ue()])}function ue(e,t,a=0,n=!0){const r=void 0!==e.height?Oe(parseInt(e.height,10)):X.value>0?Oe(X.value):"auto",o=G.value>0?Oe(G.value):void 0,d={height:r},u=(void 0!==o&&(d.minHeight=o),Ee.h("div",{key:e[c.taskKey]+"-"+t,class:{"q-calendar-task__task":0===a,"q-calendar-task__task--section":0!==a},style:d},[de(e,t,a,n),oe(e,t)]));return void 0!==e.children?[u,Ee.h("div",{class:{"q-calendar__child":!0,"q-calendar__child--expanded":!0===n,"q-calendar__child--collapsed":!0!==n}},[ie(e.children,a+1,!1===n?n:e.expanded)])]:[u]}function ie(e=void 0,a=0,n=!0){return void 0===e&&(e=c.modelTasks),e.map((e,t)=>{return ue(e,t,a,void 0!==e.children?e.expanded:n)}).flat()}function le(){return Ee.h("div",{class:{"q-calendar-task__task--container":!0,"q-calendar__sticky":!0===C.value}},[ie()])}function se(e,t){const a=y["footer-task"],n={start:T.value,end:N.value,footer:e,index:t},r=Oe(c.taskWidth),o={width:r,minWidth:r,maxWidth:r};return Ee.h("div",{class:{"q-calendar-task__footer--task":!0,"q-calendar__sticky":!0===C.value},style:o},[a&&a({scope:n})])}function ce(e,t,a){const n=y["footer-day"],r={timestamp:e,footer:t,index:a},o=Oe(q.value),d={width:o,minWidth:o,maxWidth:o},u="function"===typeof c.footerDayClass?c.footerDayClass({scope:r}):{};return Ee.h("div",{class:{"q-calendar-task__footer--day":!0,...u,..._(e),"q-calendar__hoverable":!0===c.hoverable,"q-calendar__focusable":!0===E.value},style:d},[n&&n({scope:r})])}function ye(t,a){return Ee.h("div",{class:"q-calendar-task__footer--day-wrapper"},[b.value.map(e=>ce(e,t,a))])}function fe(){const a=!0===c.focusable&&c.focusType.includes("task");return c.modelFooter.map((e,t)=>{return Ee.h("div",{class:{"q-calendar-task__footer--wrapper":!0,"q-calendar__hoverable":!0===c.hoverable,"q-calendar__focusable":!0===a}},{default:()=>[se(e,t),ye(e,t)]})})}function ve(){return Ee.h("div",{class:{"q-calendar-task__footer":!0,"q-calendar__sticky":!0===C.value}},fe())}function me(){return Ee.h("div",{class:{"q-calendar-task__container":!0}},[!0!==c.noHeader&&Ae(),le(),ve()])}function he(){const e=y["head-tasks"],t={start:T.value,end:N.value},a=Oe(parseInt(String(c.taskWidth),10)),n={width:a,minWidth:a,maxWidth:a};return Ee.h("div",{class:{"q-calendar-task__head--tasks":!0,"q-calendar__sticky":!0===C.value},style:n},[e&&e({scope:t})])}function pe(e,t){const a=y["title-task"],n=Oe(parseInt(String(c.taskWidth),10)),r={width:n,minWidth:n,maxWidth:n},o={start:T.value,end:N.value,cellWidth:n,title:e,index:t};return Ee.h("div",{class:{"q-calendar-task__title--task":!0,"q-calendar__sticky":!0===C.value},style:r},[a&&a({scope:o})])}function W(e){const t=y["head-weekday-label"],a=!0!==c.noActiveDate&&M(e),n={activeDate:a,timestamp:e,disabled:!!c.disabledWeekdays&&c.disabledWeekdays.includes(Number(e.weekday))},r={class:{"q-calendar-task__head--weekday":!0,["q-calendar__"+c.weekdayAlign]:!0,"q-calendar__ellipsis":!0}};return Ee.h("div",r,t&&t({scope:n})||ke(e,c.shortWeekdayLabel))}function ke(e,t){const a=Y.value(e,t||c.weekdayBreakpoints[0]>0&&q.value<=c.weekdayBreakpoints[0]);return Ee.h("span",{class:"q-calendar__ellipsis"},c.weekdayBreakpoints[1]>0&&q.value<=c.weekdayBreakpoints[1]?He(a,Number(c.minWeekdayLabel)):a)}function x(e){const t={class:{"q-calendar-task__head--date":!0,["q-calendar__"+c.dateAlign]:!0}};return Ee.h("div",t,we(e))}function we(a){const e=!0!==c.noActiveDate&&M(a),t=L.value(a,!1),n=y["head-day-label"],r=y["head-day-button"],o={dayLabel:t,timestamp:a,activeDate:e},d=a.date,u={key:d,tabindex:!0===Q.value?0:-1,class:{"q-calendar-task__head--day__label":!0,"q-calendar__button":!0,"q-calendar__button--round":"round"===c.dateType,"q-calendar__button--rounded":"rounded"===c.dateType,"q-calendar__button--bordered":!0===a.current,"q-calendar__hoverable":!0===c.hoverable,"q-calendar__focusable":!0===Q.value},disabled:a.disabled,onKeydown:e=>{!0!==a.disabled&&I(e,[13,32])&&(e.stopPropagation(),e.preventDefault())},onKeyup:e=>{!0!==a.disabled&&I(e,[13,32])&&(f.value=a.date,void 0!==s.value.onClickDate)&&l("click-date",{scope:o})},...A("-date",(e,t)=>{return"click-date"!==t&&"contextmenu-date"!==t||(f.value=a.date,"click-date"===t&&e.preventDefault()),{scope:o,event:e}})};return!0!==c.noAria&&(u.ariaLabel=$.value(a,!1)),r?r({scope:o}):Je(c,u,n?n({scope:o}):t)}function ge(e){return"stacked"===c.dateHeader?[!0!==c.noDefaultHeaderText&&W(e),!0!==c.noDefaultHeaderBtn&&x(e)].filter(e=>!1!==e):"inline"===c.dateHeader?("left"===c.weekdayAlign&&"right"===c.dateAlign||"right"===c.weekdayAlign&&c.dateAlign,Ee.h("div",{class:"q-calendar__header--inline"},[!0!==c.noDefaultHeaderText&&W(e),!0!==c.noDefaultHeaderBtn&&x(e)])):"inverted"===c.dateHeader?("left"===c.weekdayAlign&&"right"===c.dateAlign||"right"===c.weekdayAlign&&c.dateAlign,Ee.h("div",{class:"q-calendar__header--inline"},[!0!==c.noDefaultHeaderBtn&&x(e),!0!==c.noDefaultHeaderText&&W(e)])):void 0}function _e(e,t,a){const n=y["title-day"],r=Oe(q.value),o={width:r,minWidth:r,maxWidth:r},d={timestamp:e,title:t,index:a,cellWidth:q.value},u="function"===typeof c.dayClass?c.dayClass({scope:d}):{},i=!0===c.focusable&&c.focusType.includes("day");return Ee.h("div",{class:{"q-calendar-task__title--day":!0,...u,..._(e),"q-calendar__hoverable":!0===c.hoverable,"q-calendar__focusable":!0===i},style:o},[n&&n({scope:d}),Ue()])}function De(t){const e=y["head-day"],a=y["head-date"],n=!0!==c.noActiveDate&&M(t),r={timestamp:t,activeDate:n,droppable:h.value=t.date,disabled:!!c.disabledWeekdays&&c.disabledWeekdays.includes(Number(t.weekday))},o=c.weekdayStyle||g,d="function"===typeof c.weekdayClass?c.weekdayClass({scope:r}):{},u=Oe(q.value),i={width:u,minWidth:u,maxWidth:u,...o({scope:r})},l=t.date,s={key:l,ref:e=>{m.value[l]=e},tabindex:!0===F.value?0:-1,class:{"q-calendar-task__head--day":!0,...d,..._(t),"q-active-date":n,"q-calendar__hoverable":!0===c.hoverable,"q-calendar__focusable":!0===F.value},style:i,onFocus:()=>{!0===F.value&&(v.value=l)},onKeydown:e=>{!0!==t.disabled&&I(e,[13,32])&&(e.stopPropagation(),e.preventDefault())},onKeyup:e=>{!0!==t.disabled&&I(e,[13,32])&&(f.value=t.date)},...A("-head-day",e=>{return{scope:r,event:e}}),onDragenter:e=>{void 0!==c.dragEnterFunc&&"function"===typeof c.dragEnterFunc&&(!0===c.dragEnterFunc(e,"head-day",{scope:r})?h.value=t.date:h.value="")},onDragover:e=>{void 0!==c.dragOverFunc&&"function"===typeof c.dragOverFunc&&(!0===c.dragOverFunc(e,"head-day",{scope:r})?h.value=t.date:h.value="")},onDragleave:e=>{void 0!==c.dragLeaveFunc&&"function"===typeof c.dragLeaveFunc&&(!0===c.dragLeaveFunc(e,"head-day",{scope:r})?h.value=t.date:h.value="")},onDrop:e=>{void 0!==c.dropFunc&&"function"===typeof c.dropFunc&&(!0===c.dropFunc(e,"head-day",{scope:r})?h.value=t.date:h.value="")}};return Ee.h("div",s,[void 0!==e&&e({scope:r}),void 0===e&&ge(t),void 0===e&&a&&a({scope:r}),Ue()])}function be(){return b.value.map(e=>De(e))}function Te(t,a){return b.value.map(e=>_e(e,t,a))}function Ne(){return Ee.h("div",{class:{"q-calendar-task__head--days":!0}},[...be()])}function Se(e,t){return Ee.h("div",{class:{"q-calendar-task__title--days":!0}},[...Te(e,t)])}function Ae(){return Ee.h("div",{roll:"presentation",class:{"q-calendar-task__head":!0,"q-calendar__sticky":!0===C.value},style:{}},[Ee.h("div",{style:{position:"relative",display:"flex"}},[he(),Ne()]),c.modelTitle.map((e,t)=>Ee.h("div",{class:"q-calendar-task__title",style:{position:"relative",display:"flex"}},[pe(e,t),Se(e,t)]))])}function Ie(){return Ee.h("div",{class:"q-calendar-task__body"},[Ce()])}function Ce(){return Ee.h("div",{ref:e,class:{"q-calendar-task__scroll-area":!0,"q-calendar__scroll":!0}},[me()])}function qe(){const{start:e,end:t}=K.value,a=(d.value=e.date,u.value=t.date,i.width>0),n=Ee.withDirectives(Ee.h("div",{key:d.value,class:"q-calendar-task"},[!0===a&&Ie()]),[[Ve,ae]]);if(!0!==c.animated)return n;{const r="q-calendar--"+("prev"===o.value?c.transitionPrev:c.transitionNext);return Ee.h(Ee.Transition,{name:r,appear:!0},()=>n)}}return Ee.watch([b],P,{deep:!0,immediate:!0}),Ee.watch(()=>c.modelValue,(e,t)=>{if(f.value!==e){if(!0===c.animated){const a=xe(Fe(e)),n=xe(Fe(t));o.value=a>=n?"next":"prev"}f.value=e}v.value=e}),Ee.watch(f,(e,t)=>{if(f.value!==c.modelValue){if(!0===c.animated){const a=xe(Fe(e)),n=xe(Fe(t));o.value=a>=n?"next":"prev"}l("update:model-value",e)}}),Ee.watch(v,e=>{e&&(a.value=We(e))}),Ee.watch(a,()=>{m.value[v.value]?m.value[v.value].focus():z()}),Ee.onBeforeUpdate(()=>{m.value={}}),Ee.onMounted(()=>{}),O({prev:te,next:ee,move:S,moveToToday:J,updateCurrent:w}),()=>j()}});const tt="4.1.0";e={version:tt,QCalendarTask:et,...e,...he,install(e){e.component(String(et.name),et)}};return e}); | ||
(function(e,t){"object"===typeof exports&&"undefined"!==typeof module?module.exports=t(require("vue")):"function"===typeof define&&define.amd?define(["vue"],t):(e="undefined"!==typeof globalThis?globalThis:e||self,e.QCalendarTask=t(e.Vue))})(this,function(Ee){const u=/^(\d{4})-(\d{1,2})(-(\d{1,2}))?([^\d]+(\d{1,2}))?(:(\d{1,2}))?(:(\d{1,2}))?(.(\d{1,3}))?$/,b=/^(\d{4})-(\d{1,2})(-(\d{1,2}))?/,q=/(\d\d?)(:(\d\d?)|)(:(\d\d?)|)/,E=[0,31,28,31,30,31,30,31,31,30,31,30,31],F=[0,31,29,31,30,31,30,31,31,30,31,30,31],d={MILLISECONDS_IN:{SECOND:1e3,MINUTE:6e4,HOUR:36e5,DAY:864e5,WEEK:6048e5},SECONDS_IN:{MINUTE:60,HOUR:3600,DAY:86400,WEEK:604800},MINUTES_IN:{MINUTE:1,HOUR:60,DAY:1440,WEEK:10080},HOURS_IN:{DAY:24,WEEK:168},DAYS_IN:{WEEK:7}},M=28,W=31,x=12,O=1,U=1,H=0;function t(e){return"string"===typeof e&&u.test(e)}function Fe(e){if("string"!==typeof e)return null;const t=u.exec(e);if(!t||!t[1]||!t[2])return null;const a=parseInt(t[1],10),n=parseInt(t[2],10),r=parseInt(t[4]||"1",10),o=parseInt(t[6]||"0",10),d=parseInt(t[8]||"0",10);return{date:e,time:o.toString().padStart(2,"0")+":"+d.toString().padStart(2,"0"),year:a,month:n,day:r,hour:o,minute:d,hasDay:!!t[4],hasTime:!0,past:!1,current:!1,future:!1,disabled:!1,weekday:0,doy:0,workweek:0}}function R(e,t=!1){if(!(e instanceof Date))return null;const a=t?"UTC":"";return g({date:r(e[`get${a}FullYear`](),4)+"-"+r(e[`get${a}Month`]()+1,2)+"-"+r(e[`get${a}Date`](),2),time:r(e[`get${a}Hours`]()||0,2)+":"+r(e[`get${a}Minutes`]()||0,2),year:e[`get${a}FullYear`](),month:e[`get${a}Month`]()+1,day:e[`get${a}Date`](),hour:e[`get${a}Hours`](),minute:e[`get${a}Minutes`](),weekday:0,doy:0,workweek:0,hasDay:!0,hasTime:!0,past:!1,current:!1,future:!1,disabled:!1})}function r(e,t){let a=String(e);while(a.length<t)a="0"+a;return a}function V(e){return e%4===0&&e%100!==0||e%400===0}function i(e,t){return(V(e)?F:E)[t]}function h(e){const t=new Date(e.year,e.month-1,e.day+1);return g(ue({...e,year:t.getFullYear(),month:t.getMonth()+1,day:t.getDate()}))}function p(e){const t=new Date(e.year,e.month-1,e.day-1);return g(ue({...e,year:t.getFullYear(),month:t.getMonth()+1,day:t.getDate()}))}function Me(){const e=new Date,t=e.getMonth()+1,a=e.getDate(),n=e.getFullYear();return[n,r(t,2),r(a,2)].join("-")}function B(e){return e===Me()}function T(e,t,a){let n=I(e);if(t){if(1===n.day||0===n.weekday)while(!t.includes(Number(n.weekday)))n=h(n);n=v(n,t[0],p),n=g(n),a&&(n=k(n,a,n.hasTime))}return n}function N(e,t,a){let n=I(e);if(t&&Array.isArray(t)){const r=i(n.year,n.month);if(r===n.day||n.weekday===t[t.length-1])while(!t.includes(Number(n.weekday)))n=p(n);n=v(n,t[t.length-1],h),n=g(n),a&&(n=k(n,a,n.hasTime))}return n}function S(e){let t=I(e);return t.day=U,t=g(t),t}function A(e){let t=I(e);return t.day=i(t.year,t.month),t=g(t),t}function L(e){const t=Object.prototype.toString.call(e);switch(t){case"[object Number]":return e;case"[object String]":{const a=q.exec(e);return a?60*parseInt(a[1],10)+parseInt(a[3]||"0",10):!1}case"[object Object]":return"object"!==typeof e||"number"!==typeof e.hour||"number"!==typeof e.minute?!1:"object"===typeof e&&"hour"in e&&"minute"in e&&60*e.hour+e.minute}return!1}function Y(e,t){return!(!e||!t)&&e.year===t.year&&e.month===t.month&&e.day===t.day&&e.hour===t.hour&&e.minute===t.minute}function $(e,t){return c(e)===c(t)}function K(e,t){return y(e)===y(t)}function Z(e,t){return f(e)===f(t)}function We(e,t=null){let a=Fe(e);return a?(a=g(a),t&&(a=k(a,t,a.hasTime)),a):null}function xe(e){return 1e8*(e.year??0)+1e6*(e.month??0)+1e4*(e.day??0)}function l(e){return 100*(e.hour??0)+(e.minute??0)}function n(e){return xe(e)+l(e)}function j(e,t,a=!1){const n=Date.UTC(e.year??0,(e.month??1)-1,e.day??1,e.hour??0,e.minute??0),r=Date.UTC(t.year??0,(t.month??1)-1,t.day??1,t.hour??0,t.minute??0);return!0===a&&r<n?0:r-n}function k(e,t,a=!1){let n=I(e),r=xe(t),o=xe(n),d=r===o;return n.hasTime&&a&&d&&(r=l(t),o=l(n),d=r===o),n.past=o<r,n.current=d,n.future=o>r,n.currentWeekday=n.weekday===t.weekday,n}function P(e,t,a=null){let n=I(e);return n.hasTime=!0,n.hour=Math.floor(t/d.MINUTES_IN.HOUR),n.minute=t%d.MINUTES_IN.HOUR,n.time=y(n),a&&(n=k(n,a,!0)),n}function w(e){let t=I(e);return t.weekday=s(t),t}function z(e){let t=I(e);return t.doy=a(t)||0,t}function Q(e){let t=I(e);return t.workweek=o(t),t}function X(e,t,a,n,r){let o=I(e);const d=xe(o);if(void 0!==t){const s=Fe(t);if(s){const c=xe(s);d<=c&&(o.disabled=!0)}}if(!0!==o.disabled&&void 0!==a){const y=Fe(a);if(y){const f=xe(y);d>=f&&(o.disabled=!0)}}if(!0!==o.disabled&&Array.isArray(n)&&n.length>0)for(var u in n)if(n[u]===o.weekday){o.disabled=!0;break}if(!0!==o.disabled&&Array.isArray(r)&&r.length>0)for(var i in r)if(Array.isArray(r[i])&&2===r[i].length&&r[i][0]&&r[i][1]){const v=Fe(r[i][0]),m=Fe(r[i][1]);if(v&&m&&oe(o,v,m)){o.disabled=!0;break}}else{const h=r[i];if(Array.isArray(h))for(var l of h){const p=We(l);if(p){const k=xe(p);if(k===d){o.disabled=!0;break}}}else if(h){const w=We(h);if(w){const g=xe(w);g===d&&(o.disabled=!0)}}}return o}function g(e){let t=I(e);return t.hasTime=!0,t.time=y(t),t.date=c(t),t.weekday=s(t),t.doy=a(t)||0,t.workweek=o(t),t}function a(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 o(e){let t=I(e);if(0===t.year){const r=We(Me());r&&(t=r)}const a=new Date(Date.UTC(t.year,t.month-1,t.day)),n=4;a.setUTCDate(a.getUTCDate()-(a.getUTCDay()+6)%7+n),a.setUTCDate(a.getUTCDate()+n-(a.getUTCDay()||7));e=new Date(Date.UTC(a.getUTCFullYear(),0,1)),e=Math.ceil(((a.valueOf()-e.valueOf())/864e5+1)/7);return e}function s(e){let t=e.weekday;if(e.hasDay){const a=Math.floor,n=e.day,r=(e.month+9)%x+1,o=a(e.year/100),d=e.year%100-(e.month<=2?1:0);t=((n+a(2.6*r-.2)-2*o+d+a(d/4)+a(o/4))%7+7)%7}return t??0}function I(e){return{...e}}function c(e){let t=r(e.year,4)+"-"+r(e.month,2);return e.hasDay&&(t+="-"+r(e.day,2)),t}function y(e){return e.hasTime?r(e.hour,2)+":"+r(e.minute,2):""}function f(e){return c(e)+" "+(e.hasTime?y(e):"00:00")}function G(e,t=h,a=1,n=[0,1,2,3,4,5,6]){const r=I(e);return _(r,t,a,n)}function _(e,t=h,a=1,n=[0,1,2,3,4,5,6]){let r=I(e);n.includes(Number(r.weekday))||0!==r.weekday||t!==h||++a;while(--a>=0)r=t(r),n.length<7&&!n.includes(Number(r.weekday))&&++a;return r}function v(e,t,a=h,n=6){let r=I(e);while(r.weekday!==t&&--n>=0)r=a(r);return r}function J(e,t,a,n=[0,1,2,3,4,5,6],r=void 0,o=void 0,d=[],u=[],i=42,l=0){const s=xe(e),c=xe(t),y=[];let f=I(e),v=0,m=v===c;if(!(c<s))while((!m||y.length<l)&&y.length<i){if(v=xe(f),m=m||v>c&&y.length>=l,m)break;if(n.includes(Number(f.weekday))){let e=I(f);e=g(e),e=k(e,a),e=X(e,r,o,d,u),y.push(e)}f=_(f,h)}return y}function ee(t,a,n,r,o){const d=[];for(let e=0;e<r;++e){const u=(a+e)*n,i=I(t);d.push(P(i,u,o))}return d}function m(n,r){const e=()=>"";return"undefined"===typeof Intl||"undefined"===typeof Intl.DateTimeFormat?e:(t,e)=>{try{const a=new Intl.DateTimeFormat(n||void 0,r(t,e));return a.format(ae(t))}catch(e){return console.error(`Intl.DateTimeFormat: ${e.message} -> `+f(t)),""}}}function te(e,t=!0){return t?new Date(Date.UTC(e.year,e.month-1,e.day,0,0)):new Date(e.year,e.month-1,e.day,0,0)}function ae(e,t=!0){return t?new Date(Date.UTC(e.year,e.month-1,e.day,e.hour,e.minute)):new Date(e.year,e.month-1,e.day,e.hour,e.minute)}function D(e){return isFinite(Number(e))}function ne(e,t=!1){const a=!0===t?n:xe;return e.reduce((e,t)=>{return Math.max(a(e),a(t))===a(e)?e:t})}function re(e,t=!1){const a=!0===t?n:xe;return e.reduce((e,t)=>{return Math.min(a(e),a(t))===a(e)?e:t})}function oe(e,t,a,n=!1){const r=xe(e)+(!0===n?l(e):0),o=xe(t)+(!0===n?l(t):0),d=xe(a)+(!0===n?l(a):0);return r>=o&&r<=d}function de(e,t,a,n){const r=xe(e),o=xe(t),d=xe(a),u=xe(n);return r>=d&&r<=u||o>=d&&o<=u||d>=r&&o>=u}function C(e,t){const a=I(e);return t.year&&(a.year+=t.year),t.month&&(a.month+=t.month),t.day&&(a.day+=t.day),t.hour&&(a.hour+=t.hour),t.minute&&(a.minute+=t.minute),g(ue(a))}function ue(e){const t=new Date(e.year,e.month-1,e.day,e.hour,e.minute);return{...e,year:t.getFullYear(),month:t.getMonth()+1,day:t.getDate(),hour:t.getHours(),minute:t.getMinutes()}}function ie(e,t){const a=j(e,t,!0);return Math.floor(a/d.MILLISECONDS_IN.DAY)}function le(e,t){let a=I(e),n=I(t);return a=v(a,0),n=v(n,6),Math.ceil(ie(a,n)/d.DAYS_IN.WEEK)}const se={Sun:new Date("2020-01-05T00:00:00.000Z"),Mon:new Date("2020-01-06T00:00:00.000Z"),Tue:new Date("2020-01-07T00:00:00.000Z"),Wed:new Date("2020-01-08T00:00:00.000Z"),Thu:new Date("2020-01-09T00:00:00.000Z"),Fri:new Date("2020-01-10T00:00:00.000Z"),Sat:new Date("2020-01-11T00:00:00.000Z")};function ce(){const e=()=>"",r={long:{timeZone:"UTC",weekday:"long"},short:{timeZone:"UTC",weekday:"short"},narrow:{timeZone:"UTC",weekday:"narrow"}};return"undefined"===typeof Intl||"undefined"===typeof Intl.DateTimeFormat?e:t;function t(t,e,a){try{const n=new Intl.DateTimeFormat(a||void 0,r[e]||r["long"]);return n.format(se[t])}catch(e){return e instanceof Error&&console.error(`Intl.DateTimeFormat: ${e.message} -> day of week: `+t),""}}}function ye(t,a){const e=Object.keys(se),n=ce();return e.map(e=>String(n(e,t,a)))}function fe(){const e=()=>"",o={long:{timeZone:"UTC",month:"long"},short:{timeZone:"UTC",month:"short"},narrow:{timeZone:"UTC",month:"narrow"}};return"undefined"===typeof Intl||"undefined"===typeof Intl.DateTimeFormat?e:t;function t(t,e,a){try{const n=new Intl.DateTimeFormat(a||void 0,o[e]||o["long"]),r=new Date;return r.setDate(1),r.setMonth(t),n.format(r)}catch(e){return e instanceof Error&&console.error(`Intl.DateTimeFormat: ${e.message} -> month: `+t),""}}}function ve(t,a){const n=fe();return[...Array(12).keys()].map(e=>n(e,t,a))}var e={PARSE_DATETIME:u,PARSE_DATE:b,PARSE_TIME:q,DAYS_IN_MONTH:E,DAYS_IN_MONTH_LEAP:F,DAYS_IN_MONTH_MIN:M,DAYS_IN_MONTH_MAX:W,MONTH_MAX:x,MONTH_MIN:O,DAY_MIN:U,TIME_CONSTANTS:d,FIRST_HOUR:H,today:Me,getStartOfWeek:T,getEndOfWeek:N,getStartOfMonth:S,getEndOfMonth:A,parseTime:L,validateTimestamp:t,parsed:Fe,parseTimestamp:We,parseDate:R,getDayIdentifier:xe,getTimeIdentifier:l,getDayTimeIdentifier:n,diffTimestamp:j,updateRelative:k,updateMinutes:P,updateWeekday:w,updateDayOfYear:z,updateWorkWeek:Q,updateDisabled:X,updateFormatted:g,getDayOfYear:a,getWorkWeek:o,getWeekday:s,isLeapYear:V,daysInMonth:i,copyTimestamp:I,padNumber:r,getDate:c,getTime:y,getDateTime:f,nextDay:h,prevDay:p,relativeDays:_,findWeekday:v,createDayList:J,createIntervalList:ee,createNativeLocaleFormatter:m,makeDate:te,makeDateTime:ae,validateNumber:D,isBetweenDates:oe,isOverlappingDates:de,daysBetween:ie,weeksBetween:le,addToDate:C,compareTimestamps:Y,compareDate:$,compareTime:K,compareDateTime:Z,getWeekdayFormatter:ce,getWeekdayNames:ye,getMonthFormatter:fe,getMonthNames:ve},e=Object.freeze({__proto__:null,DAYS_IN_MONTH:E,DAYS_IN_MONTH_LEAP:F,DAYS_IN_MONTH_MAX:W,DAYS_IN_MONTH_MIN:M,DAY_MIN:U,FIRST_HOUR:H,MONTH_MAX:x,MONTH_MIN:O,PARSE_DATE:b,PARSE_DATETIME:u,PARSE_TIME:q,TIME_CONSTANTS:d,addToDate:C,compareDate:$,compareDateTime:Z,compareTime:K,compareTimestamps:Y,copyTimestamp:I,createDayList:J,createIntervalList:ee,createNativeLocaleFormatter:m,daysBetween:ie,daysInMonth:i,default:e,diffTimestamp:j,findWeekday:v,getDate:c,getDateTime:f,getDayIdentifier:xe,getDayOfYear:a,getDayTimeIdentifier:n,getEndOfMonth:A,getEndOfWeek:N,getMonthFormatter:fe,getMonthNames:ve,getStartOfMonth:S,getStartOfWeek:T,getTime:y,getTimeIdentifier:l,getWeekday:s,getWeekdayFormatter:ce,getWeekdayNames:ye,getWorkWeek:o,isBetweenDates:oe,isLeapYear:V,isOverlappingDates:de,isToday:B,makeDate:te,makeDateTime:ae,maxTimestamp:ne,minTimestamp:re,moveRelativeDays:G,nextDay:h,padNumber:r,parseDate:R,parseTime:L,parseTimestamp:We,parsed:Fe,prevDay:p,relativeDays:_,today:Me,updateDayOfYear:z,updateDisabled:X,updateFormatted:g,updateMinutes:P,updateRelative:k,updateWeekday:w,updateWorkWeek:Q,validateNumber:D,validateTimestamp:t,weeksBetween:le});function Oe(e,t="px"){if(e)return isNaN(e)?String(e):"auto"===e?e:""+Number(e)+t}function me(t,a){for(let e=0;e<t.length;e++)if(!0===a(t[e],e))return e;return-1}function He(e,t){return 0===t?e:e.slice(0,t)}var he={convertToUnit:Oe,indexOf:me,minCharWidth:He},he=Object.freeze({__proto__:null,convertToUnit:Oe,default:he,indexOf:me,minCharWidth:He});const pe=e=>e.replace(/(-\w)/g,e=>e[1].toUpperCase());function ke(t,e,a,n){const r={};for(const o in a){const d=a[o],u=pe("on-"+o);if(!e.value)return console.warn("$listeners has not been set up"),{};if(void 0!==e.value[u]){const i="on"+d.event.charAt(0).toUpperCase()+d.event.slice(1),l=e=>{return(void 0===d.button||"buttons"in e&&e.buttons>0&&e.button===d.button)&&(d.prevent&&e.preventDefault(),d.stop&&e.stopPropagation(),t(o,n(e,o))),d.result};i in r?Array.isArray(r[i])?r[i].push(l):r[i]=[r[i],l]:r[i]=l}}return r}function we(e,t,a,n){return ke(e,t,ge(a),n)}function ge(e){return{["click"+e]:{event:"click"},["contextmenu"+e]:{event:"contextmenu",prevent:!0,result:!1},["mousedown"+e]:{event:"mousedown"},["mousemove"+e]:{event:"mousemove"},["mouseup"+e]:{event:"mouseup"},["mouseenter"+e]:{event:"mouseenter"},["mouseleave"+e]:{event:"mouseleave"},["touchstart"+e]:{event:"touchstart"},["touchmove"+e]:{event:"touchmove"},["touchend"+e]:{event:"touchend"}}}function _e(e){return Object.keys(ge(e))}function Re(a,n){return{getMouseEventHandlers:(e,t)=>ke(a,n,e,t),getDefaultMouseEventHandlers:(e,t)=>we(a,n,e,t),getMouseEventName:ge,getRawMouseEvents:_e}}const Ve={mounted(e,t){if("function"===typeof t.value){const a=t.value,n={callback:a,size:{width:0,height:0},observer:new ResizeObserver(e=>{const t=e[0].contentRect;t.width===n.size.width&&t.height===n.size.height||(n.size.width=t.width,n.size.height=t.height,n.debounceTimeout&&clearTimeout(n.debounceTimeout),n.debounceTimeout=setTimeout(()=>{n.callback(n.size),n.debounceTimeout=void 0},100))})};n.observer.observe(e),e.__onResizeObserver=n}},beforeUnmount(e){if(e.__onResizeObserver){const{observer:t,debounceTimeout:a}=e.__onResizeObserver;a&&clearTimeout(a),t.unobserve(e),delete e.__onResizeObserver}}};function Be(t,a,{scrollArea:e,pane:n}){if(!a){const s="[error: renderCalendar] no renderFunc has been supplied to useCalendar";throw console.error(s),new Error(s)}const r=Ee.reactive({width:0,height:0}),o=Ee.ref(null);function d({width:e,height:t}){r.width=e,r.height=t}const u=Ee.computed(()=>{return!0!==t.noScroll&&e.value&&n.value&&r.height?e.value.offsetWidth-n.value.offsetWidth:0});function i(){}function l(){const e={ref:o,role:"complementary",lang:t.locale,class:`q-calendar ${t.dark?"q-calendar--dark":""} `+(t.bordered?"q-calendar__bordered":"")};return Ee.withDirectives(Ee.h("div",{...e},[a()]),[[Ve,d]])}return{rootRef:o,scrollWidth:u,__initCalendar:i,__renderCalendar:l}}const De=e=>e.every(e=>["day","date","weekday","interval","time","resource","task"].includes(e)),be={modelValue:{type:String,default:Me(),validator:e=>""===e||t(e)},weekdays:{type:Array,default:()=>[0,1,2,3,4,5,6]},dateType:{type:String,default:"round",validator:e=>["round","rounded","square"].includes(e)},weekdayAlign:{type:String,default:"center",validator:e=>["left","center","right"].includes(e)},dateAlign:{type:String,default:"center",validator:e=>["left","center","right"].includes(e)},bordered:Boolean,dark:Boolean,noAria:Boolean,noActiveDate:Boolean,noHeader:Boolean,noScroll:Boolean,shortWeekdayLabel:Boolean,noDefaultHeaderText:Boolean,noDefaultHeaderBtn:Boolean,minWeekdayLabel:{type:[Number,String],default:1},weekdayBreakpoints:{type:Array,default:()=>[75,35],validator:e=>2===e.length},locale:{type:String,default:"en-US"},animated:Boolean,transitionPrev:{type:String,default:"slide-right"},transitionNext:{type:String,default:"slide-left"},disabledDays:Array,disabledBefore:String,disabledAfter:String,disabledWeekdays:{type:Array,default:()=>[]},dragEnterFunc:Function,dragOverFunc:Function,dragLeaveFunc:Function,dropFunc:Function,selectedDates:{type:[Array,Set],default:()=>[]},selectedStartEndDates:{type:Array,default:()=>[]},hoverable:Boolean,focusable:Boolean,focusType:{type:Array,default:()=>["date"],validator:De}};function Le(t,{startDate:e,endDate:a,times:n}){const r=Ee.computed(()=>We(e.value)),o=Ee.computed(()=>{return"0000-00-00"===a.value?N(r.value,t.weekdays,n.today):We(a.value)||r.value}),d=Ee.computed(()=>m(t.locale,()=>({timeZone:"UTC",day:"numeric"}))),u=Ee.computed(()=>m(t.locale,(e,t)=>({timeZone:"UTC",weekday:t?"short":"long"}))),i=Ee.computed(()=>m(t.locale,()=>({timeZone:"UTC",dateStyle:"full"})));function l(e,t){return e&&e.length>0&&e.includes(t.date)}function s(e,t){const a={firstDay:!1,betweenDays:!1,lastDay:!1};if(2===e.length){const n=xe(t),r=xe(Fe(e[0])),o=xe(Fe(e[1]));a.firstDay=r===n,a.lastDay=o===n,a.betweenDays=r<n&&o>n}return a}function c(e,t=!1,a=[],n=[],r=!1){const o=l(a,e),{firstDay:d,lastDay:u,betweenDays:i}=s(n,e);return{"q-past-day":!d&&!i&&!u&&!o&&!t&&!!e.past,"q-future-day":!d&&!i&&!u&&!o&&!t&&!!e.future,"q-outside":t,"q-current-day":!!e.current,"q-selected":o,"q-range-first":d,"q-range":i,"q-range-last":u,"q-range-hover":r&&(d||u||i),"q-disabled-day disabled":!0===e.disabled}}function y(e){return T(e,t.weekdays,n.today)}function f(e){return N(e,t.weekdays,n.today)}function v(){return{}}return{parsedStart:r,parsedEnd:o,dayFormatter:d,weekdayFormatter:u,ariaDateFormatter:i,arrayHasDate:l,checkDays:s,getRelativeClasses:c,startOfWeek:y,endOfWeek:f,dayStyleDefault:v}}const Te={modelValue:{type:String,default:Me(),validator:e=>""===e||t(e)},modelTasks:{type:Array,default:()=>[]},modelTitle:{type:Array,default:()=>[]},modelFooter:{type:Array,default:()=>[]},taskKey:{type:[String,Number],default:"id"},weekdays:{type:Array,default:()=>[0,1,2,3,4,5,6]},dateType:{type:String,default:"round",validator:e=>["round","rounded","square"].includes(e)},dateHeader:{type:String,default:"stacked",validator:e=>["stacked","inline","inverted"].includes(e)},weekdayAlign:{type:String,default:"center",validator:e=>["left","center","right"].includes(e)},dateAlign:{type:String,default:"center",validator:e=>["left","center","right"].includes(e)},dayHeight:{type:[Number,String],default:0,validator:D},dayMinHeight:{type:[Number,String],default:40,validator:D},weekdayStyle:{type:Function,default:null},weekdayClass:{type:Function,default:null},dayStyle:{type:Function,default:null},dayClass:{type:Function,default:null},footerDayClass:{type:Function,default:null},view:{type:String,validator:e=>["day","week","month"].includes(e)},viewCount:{type:Number,default:1,validator:e=>D(e)&&e>0},taskWidth:{type:Number,default:200,validator:e=>D(e)&&e>0}};function Ye(t,e,{times:a}){const n=Ee.computed(()=>{if(!t.modelValue)throw new Error("QCalendarTask: no modelValue provided");if("day"===t.view)return We(t.modelValue);if("week"===t.view)return T(We(t.modelValue),t.weekdays,a.today);if("month"===t.view)return S(We(t.modelValue));throw new Error(`QCalendarTask: unknown 'view' type (${t.view})`)}),r=Ee.computed(()=>{if(!t.modelValue)throw new Error("QCalendarTask: no modelValue provided");if("day"===t.view){if(1===t.viewCount)return n.value;let e=I(n.value);return e=C(e,{day:t.viewCount-1}),e}if("week"===t.view){if(1===t.viewCount)return N(We(t.modelValue),t.weekdays,a.today);{let e=I(n.value);return e=C(e,{day:(t.viewCount-1)*d.DAYS_IN.WEEK}),N(e,t.weekdays,a.today)}}if("month"!==t.view)throw new Error(`QCalendarTask: unknown 'view' type (${t.view})`);if(1===t.viewCount)return A(We(t.modelValue));{let e=I(n.value);return e=C(e,{month:t.viewCount}),A(e)}}),o=Ee.computed(()=>{return J(n.value,r.value,a.today,t.weekdays,t.disabledBefore,t.disabledAfter,t.disabledWeekdays||[],t.disabledDays||[],Number.MAX_SAFE_INTEGER)});return{days:o,parsedStartDate:n,parsedEndDate:r}}const Ne={now:{type:String,validator:e=>""===e||t(e),default:""}};function $e(e){const t=Ee.reactive({now:We("0000-00-00 00:00"),today:We("0000-00-00")}),a=Ee.computed(()=>e.now?We(e.now):o());function n(){t.now&&t.today&&(t.now.current=t.today.current=!0,t.now.past=t.today.past=!1,t.now.future=t.today.future=!1)}function r(){const e=a.value||o();d(e,t.now),u(e,t.now),d(e,t.today)}function o(){return R(new Date)}function d(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)}function u(e,t){e.time!==t.time&&(t.hour=e.hour,t.minute=e.minute,t.time=e.time)}return Ee.watch(a,()=>r()),{times:t,parsedNow:a,setCurrent:n,updateCurrent:r,getNow:o,updateDay:d,updateTime:u}}function Ke(r,{parsedView:o,parsedValue:d,times:u}){const e=Ee.computed(()=>{const e=d.value;let t=r.maxDays,a=e,n=e;switch(o.value){case"month":a=S(e),n=A(e),t=i(a.year,a.month);break;case"week":case"week-agenda":case"week-scheduler":a=T(e,r.weekdays,u.today),n=N(a,r.weekdays,u.today),t=r.weekdays.length;break;case"day":case"scheduler":case"agenda":n=G(I(n),h,t>1?t-1:t,r.weekdays),n=g(n);break;case"month-interval":case"month-scheduler":case"month-agenda":a=S(e),n=A(e),n=g(n),t=i(a.year,a.month);break;case"resource":t=1,n=G(I(n),h,t,r.weekdays),n=g(n);break}return{start:a,end:n,maxDays:t}});return{renderValues:e}}const Se=["moved"];function Ze(i,{parsedView:l,parsedValue:s,direction:c,maxDays:y,times:f,emittedValue:v,emit:m}){function e(a=1){if(0===a)v.value=Me();else{let e=I(s.value);const n=A(e),r=a>0,o=r?h:p,d=r?n.day:1;let t=r?a:-a;c.value=r?"next":"prev";const u=i.weekdays.length;while(--t>=0)switch(l.value){case"month":e.day=d,e=o(e),e=w(e);while(!i.weekdays.includes(Number(e.weekday)))e=C(e,{day:r?1:-1});break;case"week":case"week-agenda":case"week-scheduler":e=_(e,o,u,i.weekdays);break;case"day":case"scheduler":case"agenda":e=_(e,o,y.value,i.weekdays);break;case"month-interval":case"month-agenda":case"month-scheduler":e.day=d,e=o(e);break;case"resource":e=_(e,o,y.value,i.weekdays);break}e=w(e),e=g(e),e=z(e),e=k(e,f.now),v.value=e.date,m("moved",e)}}return{move:e}}const Ae=/^on[A-Z]/;function je(e=Ee.getCurrentInstance()){return{emitListeners:Ee.computed(()=>{const t={};return e?.vnode?.props&&Object.keys(e.vnode.props).forEach(e=>{Ae.test(e)&&(t[e]=!0)}),t})}}function Ue(){const e={"aria-hidden":"true",class:"q-calendar__focus-helper"};return[Ee.h("span",e)]}function Ie(){function e({focusable:e,focusType:t},a,n){const r=e&&t.includes("date");return Ee.h("button",{...a,tabindex:r?0:-1},[n,r&&Ue()])}return{renderButton:e}}const Ce=["change"];function Pe(n,{days:r,lastStart:o,lastEnd:d}){function e(){const e=r.value;if(0===e.length)return!1;const t=e[0].date,a=e[e.length-1].date;return(!o.value||!d.value||t!==o.value||a!==d.value)&&(o.value=t,d.value=a,n("change",{start:t,end:a,days:e}),!0)}return{checkChange:e}}function ze(){function e(e,t){return(Array.isArray(t)?t:[t]).includes(e.keyCode)}return{isKeyCode:e}}const qe=ze().isKeyCode,Qe={useNavigation:Boolean};function Xe(t,{rootRef:a,focusRef:n,focusValue:r,datesRef:o,parsedView:d,emittedValue:u,direction:i,times:l}){let e=!1;function s(){e||document&&(e=!0,document.addEventListener("keyup",m),document.addEventListener("keydown",v))}function c(){document&&(document.removeEventListener("keyup",m),document.removeEventListener("keydown",v),e=!1)}function y(e){if(e&&document){const t=document.activeElement;if(t!==document.body&&a.value?.contains(t))return!0}return!1}function f(){let t=0;const a=window.setInterval(()=>{const e=o.value[n.value];e&&(e.focus(),50!==++t)&&document.activeElement!==e||window.clearInterval(a)},250)}function v(e){y(e)&&qe(e,[33,34,35,36,37,38,39,40])&&(e.stopPropagation(),e.preventDefault())}function m(e){if(y(e)&&qe(e,[33,34,35,36,37,38,39,40])){const t={33:g,34:_,35:b,36:D,37:k,38:h,39:w,40:p};t[e.keyCode]?.()}}function h(){let e=I(r.value);if("month"===d.value){if(e=C(e,{day:-7}),r.value.month!==e.month)return i.value="prev",void(u.value=e.date)}else e=C(e,{minute:Number(t.intervalMinutes)});i.value="prev",n.value=e.date}function p(){let e=I(r.value);if("month"===d.value){if(e=C(e,{day:7}),r.value.month!==e.month)return i.value="next",void(u.value=e.date)}else e=C(e,{minute:Number(t.intervalMinutes)});i.value="next",n.value=e.date}function k(){let e=I(r.value);i.value="prev";do{e=C(e,{day:-1})}while(!t.weekdays.includes(Number(e.weekday)));n.value=e.date}function w(){let e=I(r.value);i.value="next";do{e=C(e,{day:1})}while(!t.weekdays.includes(Number(e.weekday)));n.value=e.date}function g(){let e=I(r.value);e="month"===d.value?C(e,{month:-1}):C(e,{day:-7}),i.value="prev",n.value=e.date}function _(){let e=I(r.value);e="month"===d.value?C(e,{month:1}):C(e,{day:7}),i.value="next",n.value=e.date}function D(){let e=I(r.value);e="month"===d.value?S(e):T(e,t.weekdays||[],l.today);while(!t.weekdays.includes(Number(e.weekday)))e=C(e,{day:-1});n.value=e.date}function b(){let e=I(r.value);e="month"===d.value?A(e):N(e,t.weekdays||[],l.today);while(!t.weekdays.includes(Number(e.weekday)))e=C(e,{day:-1});n.value=e.date}return Ee.onBeforeUnmount(()=>{c()}),Ee.watch(()=>t.useNavigation,e=>{(!0===e?s:c)()}),!0===t.useNavigation&&s(),{startNavigation:s,endNavigation:c,tryFocus:f}}const Ge={cellWidth:[Number,String]},Je=Ie().renderButton;var et=Ee.defineComponent({name:"QCalendarTask",directives:{ResizeObserver:Ve},props:{...Ne,...Qe,...Ge,...be,...Te},emits:["update:model-value","update:model-tasks","update:model-title","update:model-footer","task-expanded",...Ce,...Se,..._e("-date"),..._e("-day"),..._e("-head-day")],setup(c,{slots:y,emit:l,expose:O}){const e=Ee.ref(null),U=Ee.ref(null),o=Ee.ref("next"),d=Ee.ref(c.modelValue||Me()),u=Ee.ref("0000-00-00"),t=Ee.ref(0),f=Ee.ref(c.modelValue),v=Ee.ref(c.modelValue||Me()),a=Ee.ref(Fe(c.modelValue||Me())),m=Ee.ref({}),i=Ee.reactive({width:0,height:0}),h=Ee.ref(""),p=Ee.ref(""),H=Ee.ref(null),R=Ee.ref(null),n=(Ee.watch(()=>c.view,()=>{t.value=0}),Ee.computed(()=>{return"month"===c.view?"month-interval":c.view})),r=Ee.getCurrentInstance();if(null===r)throw new Error("current instance is null");const s=je(r).emitListeners,{times:k,setCurrent:V,updateCurrent:w}=$e(c),{parsedStart:B,dayFormatter:L,weekdayFormatter:Y,ariaDateFormatter:$,dayStyleDefault:g,getRelativeClasses:_}=(w(),V(),Le(c,{startDate:d,endDate:u,times:k})),D=Ee.computed(()=>{return We(c.modelValue,k.now)||B.value||k.today}),K=(a.value=D.value,v.value=D.value.date,Ke(c,{parsedView:n,times:k,parsedValue:D})).renderValues,{rootRef:Z,__renderCalendar:j}=Be(c,qe,{scrollArea:e,pane:U}),{days:b,parsedStartDate:T,parsedEndDate:N}=Ye(c,l,{times:k}),S=Ze(c,{parsedView:n,parsedValue:D,direction:o,maxDays:t,times:k,emittedValue:f,emit:l}).move,A=Re(l,s).getDefaultMouseEventHandlers,P=Pe(l,{days:b,lastStart:H,lastEnd:R}).checkChange,I=ze().isKeyCode,z=Xe(c,{rootRef:Z,focusRef:v,focusValue:a,datesRef:m,parsedView:n,emittedValue:f,direction:o,times:k}).tryFocus,C=Ee.ref(!0),q=Ee.computed(()=>{return void 0!==c.cellWidth?parseInt(String(c.cellWidth),10):150}),E=Ee.computed(()=>{return!0===c.focusable&&c.focusType.includes("day")}),Q=Ee.computed(()=>{return!0===c.focusable&&c.focusType.includes("date")&&!0!==E.value}),F=Ee.computed(()=>{return!0===c.focusable&&c.focusType.includes("weekday")}),X=Ee.computed(()=>{return parseInt(String(c.dayHeight),10)}),G=Ee.computed(()=>{return parseInt(String(c.dayMinHeight),10)});function J(){f.value=Me()}function ee(e=1){S(e)}function te(e=1){S(-e)}function ae({width:e,height:t}){i.width=e,i.height=t}function M(e){return e.date===f.value}function ne(e,t,a){const n=y.day,r=c.dayStyle||g,o=!0!==c.noActiveDate&&D.value.date===e.date,d=t[c.taskKey],u={timestamp:e,task:t,taskIndex:a,activeDate:o,droppable:p.value===d},i=Oe(q.value),l={width:i,minWidth:i,maxWidth:i,...r({scope:u})},s="function"===typeof c.dayClass?c.dayClass({scope:u}):{};return Ee.h("div",{tabindex:!0===E.value?0:-1,class:{"q-calendar-task__task--day":!0,...s,..._(e),"q-active-date":!0===o,"q-calendar__hoverable":!0===c.hoverable,"q-calendar__focusable":!0===E.value},style:l,onFocus:()=>{E.value},...A("-day",e=>{return{scope:u,event:e}}),onDragenter:e=>{void 0!==c.dragEnterFunc&&"function"===typeof c.dragEnterFunc&&(!0===c.dragEnterFunc(e,"day",{scope:u})?p.value=d:p.value="")},onDragover:e=>{void 0!==c.dragOverFunc&&"function"===typeof c.dragOverFunc&&(!0===c.dragOverFunc(e,"day",{scope:u})?p.value=d:p.value="")},onDragleave:e=>{void 0!==c.dragLeaveFunc&&"function"===typeof c.dragLeaveFunc&&(!0===c.dragLeaveFunc(e,"day",{scope:u})?p.value=d:p.value="")},onDrop:e=>{void 0!==c.dropFunc&&"function"===typeof c.dropFunc&&(!0===c.dropFunc(e,"day",{scope:u})?p.value=d:p.value="")}},[n&&n({scope:u}),Ue()])}function re(t,a){return b.value.map(e=>ne(e,t,a))}function oe(e,t){const a=y.days,n={timestamps:b.value,days:b.value,task:e,taskIndex:t,cellWidth:q.value};return Ee.h("div",{class:"q-calendar-task__task--days-row"},[re(e,t),a&&a({scope:n})])}function de(t,e,a=0,n=!0){const r=0===a?y.task:y.subtask,o={start:T.value,end:N.value,task:t,taskIndex:e,expanded:n},d=Oe(c.taskWidth),u={width:d,minWidth:d,maxWidth:d},i=!0===c.focusable&&c.focusType.includes("task");return Ee.h("div",{class:{"q-calendar-task__task--item":!0,"q-calendar__sticky":!0===C.value,"q-calendar__hoverable":!0===c.hoverable,"q-calendar__focusable":!0===i},style:u},[Ee.h("div",{style:{flexDirection:"column",justifyContent:"center",alignItems:"center",width:10+10*a+"px"}},[Ee.h("div",{class:{"q-calendar__parent":void 0!==t.children,"q-calendar__parent--expanded":void 0!==t.children&&!0===t.expanded,"q-calendar__parent--collapsed":void 0!==t.children&&!0!==t.expanded},onClick:e=>{e.stopPropagation(),t.expanded=!t.expanded,l("task-expanded",{expanded:t.expanded,scope:o})}})]),r&&r({scope:o}),Ue()])}function ue(e,t,a=0,n=!0){const r=void 0!==e.height?Oe(parseInt(e.height,10)):X.value>0?Oe(X.value):"auto",o=G.value>0?Oe(G.value):void 0,d={height:r},u=(void 0!==o&&(d.minHeight=o),Ee.h("div",{key:e[c.taskKey]+"-"+t,class:{"q-calendar-task__task":0===a,"q-calendar-task__task--section":0!==a},style:d},[de(e,t,a,n),oe(e,t)]));return void 0!==e.children?[u,Ee.h("div",{class:{"q-calendar__child":!0,"q-calendar__child--expanded":!0===n,"q-calendar__child--collapsed":!0!==n}},[ie(e.children,a+1,!1===n?n:e.expanded)])]:[u]}function ie(e=void 0,a=0,n=!0){return void 0===e&&(e=c.modelTasks),e.map((e,t)=>{return ue(e,t,a,void 0!==e.children?e.expanded:n)}).flat()}function le(){return Ee.h("div",{class:{"q-calendar-task__task--container":!0,"q-calendar__sticky":!0===C.value}},[ie()])}function se(e,t){const a=y["footer-task"],n={start:T.value,end:N.value,footer:e,index:t},r=Oe(c.taskWidth),o={width:r,minWidth:r,maxWidth:r};return Ee.h("div",{class:{"q-calendar-task__footer--task":!0,"q-calendar__sticky":!0===C.value},style:o},[a&&a({scope:n})])}function ce(e,t,a){const n=y["footer-day"],r={timestamp:e,footer:t,index:a},o=Oe(q.value),d={width:o,minWidth:o,maxWidth:o},u="function"===typeof c.footerDayClass?c.footerDayClass({scope:r}):{};return Ee.h("div",{class:{"q-calendar-task__footer--day":!0,...u,..._(e),"q-calendar__hoverable":!0===c.hoverable,"q-calendar__focusable":!0===E.value},style:d},[n&&n({scope:r})])}function ye(t,a){return Ee.h("div",{class:"q-calendar-task__footer--day-wrapper"},[b.value.map(e=>ce(e,t,a))])}function fe(){const a=!0===c.focusable&&c.focusType.includes("task");return c.modelFooter.map((e,t)=>{return Ee.h("div",{class:{"q-calendar-task__footer--wrapper":!0,"q-calendar__hoverable":!0===c.hoverable,"q-calendar__focusable":!0===a}},{default:()=>[se(e,t),ye(e,t)]})})}function ve(){return Ee.h("div",{class:{"q-calendar-task__footer":!0,"q-calendar__sticky":!0===C.value}},fe())}function me(){return Ee.h("div",{class:{"q-calendar-task__container":!0}},[!0!==c.noHeader&&Ae(),le(),ve()])}function he(){const e=y["head-tasks"],t={start:T.value,end:N.value},a=Oe(parseInt(String(c.taskWidth),10)),n={width:a,minWidth:a,maxWidth:a};return Ee.h("div",{class:{"q-calendar-task__head--tasks":!0,"q-calendar__sticky":!0===C.value},style:n},[e&&e({scope:t})])}function pe(e,t){const a=y["title-task"],n=Oe(parseInt(String(c.taskWidth),10)),r={width:n,minWidth:n,maxWidth:n},o={start:T.value,end:N.value,cellWidth:n,title:e,index:t};return Ee.h("div",{class:{"q-calendar-task__title--task":!0,"q-calendar__sticky":!0===C.value},style:r},[a&&a({scope:o})])}function W(e){const t=y["head-weekday-label"],a=!0!==c.noActiveDate&&M(e),n={activeDate:a,timestamp:e,disabled:!!c.disabledWeekdays&&c.disabledWeekdays.includes(Number(e.weekday))},r={class:{"q-calendar-task__head--weekday":!0,["q-calendar__"+c.weekdayAlign]:!0,"q-calendar__ellipsis":!0}};return Ee.h("div",r,t&&t({scope:n})||ke(e,c.shortWeekdayLabel))}function ke(e,t){const a=Y.value(e,t||c.weekdayBreakpoints[0]>0&&q.value<=c.weekdayBreakpoints[0]);return Ee.h("span",{class:"q-calendar__ellipsis"},c.weekdayBreakpoints[1]>0&&q.value<=c.weekdayBreakpoints[1]?He(a,Number(c.minWeekdayLabel)):a)}function x(e){const t={class:{"q-calendar-task__head--date":!0,["q-calendar__"+c.dateAlign]:!0}};return Ee.h("div",t,we(e))}function we(a){const e=!0!==c.noActiveDate&&M(a),t=L.value(a,!1),n=y["head-day-label"],r=y["head-day-button"],o={dayLabel:t,timestamp:a,activeDate:e},d=a.date,u={key:d,tabindex:!0===Q.value?0:-1,class:{"q-calendar-task__head--day__label":!0,"q-calendar__button":!0,"q-calendar__button--round":"round"===c.dateType,"q-calendar__button--rounded":"rounded"===c.dateType,"q-calendar__button--bordered":!0===a.current,"q-calendar__hoverable":!0===c.hoverable,"q-calendar__focusable":!0===Q.value},disabled:a.disabled,onKeydown:e=>{!0!==a.disabled&&I(e,[13,32])&&(e.stopPropagation(),e.preventDefault())},onKeyup:e=>{!0!==a.disabled&&I(e,[13,32])&&(f.value=a.date,void 0!==s.value.onClickDate)&&l("click-date",{scope:o})},...A("-date",(e,t)=>{return"click-date"!==t&&"contextmenu-date"!==t||(f.value=a.date,"click-date"===t&&e.preventDefault()),{scope:o,event:e}})};return!0!==c.noAria&&(u.ariaLabel=$.value(a,!1)),r?r({scope:o}):Je(c,u,n?n({scope:o}):t)}function ge(e){return"stacked"===c.dateHeader?[!0!==c.noDefaultHeaderText&&W(e),!0!==c.noDefaultHeaderBtn&&x(e)].filter(e=>!1!==e):"inline"===c.dateHeader?("left"===c.weekdayAlign&&"right"===c.dateAlign||"right"===c.weekdayAlign&&c.dateAlign,Ee.h("div",{class:"q-calendar__header--inline"},[!0!==c.noDefaultHeaderText&&W(e),!0!==c.noDefaultHeaderBtn&&x(e)])):"inverted"===c.dateHeader?("left"===c.weekdayAlign&&"right"===c.dateAlign||"right"===c.weekdayAlign&&c.dateAlign,Ee.h("div",{class:"q-calendar__header--inline"},[!0!==c.noDefaultHeaderBtn&&x(e),!0!==c.noDefaultHeaderText&&W(e)])):void 0}function _e(e,t,a){const n=y["title-day"],r=Oe(q.value),o={width:r,minWidth:r,maxWidth:r},d={timestamp:e,title:t,index:a,cellWidth:q.value},u="function"===typeof c.dayClass?c.dayClass({scope:d}):{},i=!0===c.focusable&&c.focusType.includes("day");return Ee.h("div",{class:{"q-calendar-task__title--day":!0,...u,..._(e),"q-calendar__hoverable":!0===c.hoverable,"q-calendar__focusable":!0===i},style:o},[n&&n({scope:d}),Ue()])}function De(t){const e=y["head-day"],a=y["head-date"],n=!0!==c.noActiveDate&&M(t),r={timestamp:t,activeDate:n,droppable:h.value=t.date,disabled:!!c.disabledWeekdays&&c.disabledWeekdays.includes(Number(t.weekday))},o=c.weekdayStyle||g,d="function"===typeof c.weekdayClass?c.weekdayClass({scope:r}):{},u=Oe(q.value),i={width:u,minWidth:u,maxWidth:u,...o({scope:r})},l=t.date,s={key:l,ref:e=>{m.value[l]=e},tabindex:!0===F.value?0:-1,class:{"q-calendar-task__head--day":!0,...d,..._(t),"q-active-date":n,"q-calendar__hoverable":!0===c.hoverable,"q-calendar__focusable":!0===F.value},style:i,onFocus:()=>{!0===F.value&&(v.value=l)},onKeydown:e=>{!0!==t.disabled&&I(e,[13,32])&&(e.stopPropagation(),e.preventDefault())},onKeyup:e=>{!0!==t.disabled&&I(e,[13,32])&&(f.value=t.date)},...A("-head-day",e=>{return{scope:r,event:e}}),onDragenter:e=>{void 0!==c.dragEnterFunc&&"function"===typeof c.dragEnterFunc&&(!0===c.dragEnterFunc(e,"head-day",{scope:r})?h.value=t.date:h.value="")},onDragover:e=>{void 0!==c.dragOverFunc&&"function"===typeof c.dragOverFunc&&(!0===c.dragOverFunc(e,"head-day",{scope:r})?h.value=t.date:h.value="")},onDragleave:e=>{void 0!==c.dragLeaveFunc&&"function"===typeof c.dragLeaveFunc&&(!0===c.dragLeaveFunc(e,"head-day",{scope:r})?h.value=t.date:h.value="")},onDrop:e=>{void 0!==c.dropFunc&&"function"===typeof c.dropFunc&&(!0===c.dropFunc(e,"head-day",{scope:r})?h.value=t.date:h.value="")}};return Ee.h("div",s,[void 0!==e&&e({scope:r}),void 0===e&&ge(t),void 0===e&&a&&a({scope:r}),Ue()])}function be(){return b.value.map(e=>De(e))}function Te(t,a){return b.value.map(e=>_e(e,t,a))}function Ne(){return Ee.h("div",{class:{"q-calendar-task__head--days":!0}},[...be()])}function Se(e,t){return Ee.h("div",{class:{"q-calendar-task__title--days":!0}},[...Te(e,t)])}function Ae(){return Ee.h("div",{roll:"presentation",class:{"q-calendar-task__head":!0,"q-calendar__sticky":!0===C.value},style:{}},[Ee.h("div",{style:{position:"relative",display:"flex"}},[he(),Ne()]),c.modelTitle.map((e,t)=>Ee.h("div",{class:"q-calendar-task__title",style:{position:"relative",display:"flex"}},[pe(e,t),Se(e,t)]))])}function Ie(){return Ee.h("div",{class:"q-calendar-task__body"},[Ce()])}function Ce(){return Ee.h("div",{ref:e,class:{"q-calendar-task__scroll-area":!0,"q-calendar__scroll":!0}},[me()])}function qe(){const{start:e,end:t}=K.value,a=(d.value=e.date,u.value=t.date,i.width>0),n=Ee.withDirectives(Ee.h("div",{key:d.value,class:"q-calendar-task"},[!0===a&&Ie()]),[[Ve,ae]]);if(!0!==c.animated)return n;{const r="q-calendar--"+("prev"===o.value?c.transitionPrev:c.transitionNext);return Ee.h(Ee.Transition,{name:r,appear:!0},()=>n)}}return Ee.watch([b],P,{deep:!0,immediate:!0}),Ee.watch(()=>c.modelValue,(e,t)=>{if(f.value!==e){if(!0===c.animated){const a=xe(Fe(e)),n=xe(Fe(t));o.value=a>=n?"next":"prev"}f.value=e}v.value=e}),Ee.watch(f,(e,t)=>{if(f.value!==c.modelValue){if(!0===c.animated){const a=xe(Fe(e)),n=xe(Fe(t));o.value=a>=n?"next":"prev"}l("update:model-value",e)}}),Ee.watch(v,e=>{e&&(a.value=We(e))}),Ee.watch(a,()=>{m.value[v.value]?m.value[v.value].focus():z()}),Ee.onBeforeUpdate(()=>{m.value={}}),Ee.onMounted(()=>{}),O({prev:te,next:ee,move:S,moveToToday:J,updateCurrent:w}),()=>j()}});const tt="4.1.1";e={version:tt,QCalendarTask:et,...e,...he,install(e){e.component(String(et.name),et)}};return e}); |
/*! | ||
* @quasar/quasar-ui-qcalendar v4.1.0 | ||
* @quasar/quasar-ui-qcalendar v4.1.1 | ||
* (c) 2025 Jeff Galbraith <jeff@quasar.dev> | ||
@@ -9,3 +9,3 @@ * Released under the MIT License. | ||
const version = '4.1.0'; | ||
const version = '4.1.1'; | ||
@@ -12,0 +12,0 @@ const PARSE_DATETIME = /^(\d{4})-(\d{1,2})(-(\d{1,2}))?([^\d]+(\d{1,2}))?(:(\d{1,2}))?(:(\d{1,2}))?(.(\d{1,3}))?$/; |
/*! | ||
* @quasar/quasar-ui-qcalendar v4.1.0 | ||
* @quasar/quasar-ui-qcalendar v4.1.1 | ||
* (c) 2025 Jeff Galbraith <jeff@quasar.dev> | ||
* Released under the MIT License. | ||
*/ | ||
const version="4.1.0",PARSE_DATETIME=/^(\d{4})-(\d{1,2})(-(\d{1,2}))?([^\d]+(\d{1,2}))?(:(\d{1,2}))?(:(\d{1,2}))?(.(\d{1,3}))?$/,PARSE_DATE=/^(\d{4})-(\d{1,2})(-(\d{1,2}))?/,PARSE_TIME=/(\d\d?)(:(\d\d?)|)(:(\d\d?)|)/,DAYS_IN_MONTH=[0,31,28,31,30,31,30,31,31,30,31,30,31],DAYS_IN_MONTH_LEAP=[0,31,29,31,30,31,30,31,31,30,31,30,31],TIME_CONSTANTS={MILLISECONDS_IN:{SECOND:1e3,MINUTE:6e4,HOUR:36e5,DAY:864e5,WEEK:6048e5},SECONDS_IN:{MINUTE:60,HOUR:3600,DAY:86400,WEEK:604800},MINUTES_IN:{MINUTE:1,HOUR:60,DAY:1440,WEEK:10080},HOURS_IN:{DAY:24,WEEK:168},DAYS_IN:{WEEK:7}},DAYS_IN_MONTH_MIN=28,DAYS_IN_MONTH_MAX=31,MONTH_MAX=12,MONTH_MIN=1,DAY_MIN=1,FIRST_HOUR=0;function validateTimestamp(e){return"string"===typeof e&&PARSE_DATETIME.test(e)}function parsed(e){if("string"!==typeof e)return null;const t=PARSE_DATETIME.exec(e);if(!t||!t[1]||!t[2])return null;const a=parseInt(t[1],10),r=parseInt(t[2],10),n=parseInt(t[4]||"1",10),i=parseInt(t[6]||"0",10),o=parseInt(t[8]||"0",10);return{date:e,time:i.toString().padStart(2,"0")+":"+o.toString().padStart(2,"0"),year:a,month:r,day:n,hour:i,minute:o,hasDay:!!t[4],hasTime:!0,past:!1,current:!1,future:!1,disabled:!1,weekday:0,doy:0,workweek:0}}function parseDate(e,t=!1){if(!(e instanceof Date))return null;const a=t?"UTC":"";return updateFormatted({date:padNumber(e[`get${a}FullYear`](),4)+"-"+padNumber(e[`get${a}Month`]()+1,2)+"-"+padNumber(e[`get${a}Date`](),2),time:padNumber(e[`get${a}Hours`]()||0,2)+":"+padNumber(e[`get${a}Minutes`]()||0,2),year:e[`get${a}FullYear`](),month:e[`get${a}Month`]()+1,day:e[`get${a}Date`](),hour:e[`get${a}Hours`](),minute:e[`get${a}Minutes`](),weekday:0,doy:0,workweek:0,hasDay:!0,hasTime:!0,past:!1,current:!1,future:!1,disabled:!1})}function padNumber(e,t){let a=String(e);while(a.length<t)a="0"+a;return a}function isLeapYear(e){return e%4===0&&e%100!==0||e%400===0}function daysInMonth(e,t){return(isLeapYear(e)?DAYS_IN_MONTH_LEAP:DAYS_IN_MONTH)[t]}function nextDay(e){const t=new Date(e.year,e.month-1,e.day+1);return updateFormatted(normalizeTimestamp({...e,year:t.getFullYear(),month:t.getMonth()+1,day:t.getDate()}))}function prevDay(e){const t=new Date(e.year,e.month-1,e.day-1);return updateFormatted(normalizeTimestamp({...e,year:t.getFullYear(),month:t.getMonth()+1,day:t.getDate()}))}function today(){const e=new Date,t=e.getMonth()+1,a=e.getDate(),r=e.getFullYear();return[r,padNumber(t,2),padNumber(a,2)].join("-")}function isToday(e){return e===today()}function getStartOfWeek(e,t,a){let r=copyTimestamp(e);if(t){if(1===r.day||0===r.weekday)while(!t.includes(Number(r.weekday)))r=nextDay(r);r=findWeekday(r,t[0],prevDay),r=updateFormatted(r),a&&(r=updateRelative(r,a,r.hasTime))}return r}function getEndOfWeek(e,t,a){let r=copyTimestamp(e);if(t&&Array.isArray(t)){const n=daysInMonth(r.year,r.month);if(n===r.day||r.weekday===t[t.length-1])while(!t.includes(Number(r.weekday)))r=prevDay(r);r=findWeekday(r,t[t.length-1],nextDay),r=updateFormatted(r),a&&(r=updateRelative(r,a,r.hasTime))}return r}function getStartOfMonth(e){let t=copyTimestamp(e);return t.day=DAY_MIN,t=updateFormatted(t),t}function getEndOfMonth(e){let t=copyTimestamp(e);return t.day=daysInMonth(t.year,t.month),t=updateFormatted(t),t}function parseTime(e){const t=Object.prototype.toString.call(e);switch(t){case"[object Number]":return e;case"[object String]":{const a=PARSE_TIME.exec(e);return a?60*parseInt(a[1],10)+parseInt(a[3]||"0",10):!1}case"[object Object]":return"object"!==typeof e||"number"!==typeof e.hour||"number"!==typeof e.minute?!1:"object"===typeof e&&"hour"in e&&"minute"in e&&60*e.hour+e.minute}return!1}function compareTimestamps(e,t){return!(!e||!t)&&e.year===t.year&&e.month===t.month&&e.day===t.day&&e.hour===t.hour&&e.minute===t.minute}function compareDate(e,t){return getDate(e)===getDate(t)}function compareTime(e,t){return getTime(e)===getTime(t)}function compareDateTime(e,t){return getDateTime(e)===getDateTime(t)}function parseTimestamp(e,t=null){let a=parsed(e);return a?(a=updateFormatted(a),t&&(a=updateRelative(a,t,a.hasTime)),a):null}function getDayIdentifier(e){return 1e8*(e.year??0)+1e6*(e.month??0)+1e4*(e.day??0)}function getTimeIdentifier(e){return 100*(e.hour??0)+(e.minute??0)}function getDayTimeIdentifier(e){return getDayIdentifier(e)+getTimeIdentifier(e)}function diffTimestamp(e,t,a=!1){const r=Date.UTC(e.year??0,(e.month??1)-1,e.day??1,e.hour??0,e.minute??0),n=Date.UTC(t.year??0,(t.month??1)-1,t.day??1,t.hour??0,t.minute??0);return!0===a&&n<r?0:n-r}function updateRelative(e,t,a=!1){let r=copyTimestamp(e),n=getDayIdentifier(t),i=getDayIdentifier(r),o=n===i;return r.hasTime&&a&&o&&(n=getTimeIdentifier(t),i=getTimeIdentifier(r),o=n===i),r.past=i<n,r.current=o,r.future=i>n,r.currentWeekday=r.weekday===t.weekday,r}function updateMinutes(e,t,a=null){let r=copyTimestamp(e);return r.hasTime=!0,r.hour=Math.floor(t/TIME_CONSTANTS.MINUTES_IN.HOUR),r.minute=t%TIME_CONSTANTS.MINUTES_IN.HOUR,r.time=getTime(r),a&&(r=updateRelative(r,a,!0)),r}function updateWeekday(e){let t=copyTimestamp(e);return t.weekday=getWeekday(t),t}function updateDayOfYear(e){let t=copyTimestamp(e);return t.doy=getDayOfYear(t)||0,t}function updateWorkWeek(e){let t=copyTimestamp(e);return t.workweek=getWorkWeek(t),t}function updateDisabled(e,t,a,r,n){let i=copyTimestamp(e);const o=getDayIdentifier(i);if(void 0!==t){const u=parsed(t);if(u){const p=getDayIdentifier(u);o<=p&&(i.disabled=!0)}}if(!0!==i.disabled&&void 0!==a){const y=parsed(a);if(y){const T=getDayIdentifier(y);o>=T&&(i.disabled=!0)}}if(!0!==i.disabled&&Array.isArray(r)&&r.length>0)for(var s in r)if(r[s]===i.weekday){i.disabled=!0;break}if(!0!==i.disabled&&Array.isArray(n)&&n.length>0)for(var m in n)if(Array.isArray(n[m])&&2===n[m].length&&n[m][0]&&n[m][1]){const f=parsed(n[m][0]),c=parsed(n[m][1]);if(f&&c&&isBetweenDates(i,f,c)){i.disabled=!0;break}}else{const D=n[m];if(Array.isArray(D))for(var d of D){const g=parseTimestamp(d);if(g){const l=getDayIdentifier(g);if(l===o){i.disabled=!0;break}}}else if(D){const h=parseTimestamp(D);if(h){const I=getDayIdentifier(h);I===o&&(i.disabled=!0)}}}return i}function updateFormatted(e){let t=copyTimestamp(e);return t.hasTime=!0,t.time=getTime(t),t.date=getDate(t),t.weekday=getWeekday(t),t.doy=getDayOfYear(t)||0,t.workweek=getWorkWeek(t),t}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){let t=copyTimestamp(e);if(0===t.year){const n=parseTimestamp(today());n&&(t=n)}const a=new Date(Date.UTC(t.year,t.month-1,t.day)),r=4;a.setUTCDate(a.getUTCDate()-(a.getUTCDay()+6)%7+r),a.setUTCDate(a.getUTCDate()+r-(a.getUTCDay()||7));e=new Date(Date.UTC(a.getUTCFullYear(),0,1)),e=Math.ceil(((a.valueOf()-e.valueOf())/864e5+1)/7);return e}function getWeekday(e){let t=e.weekday;if(e.hasDay){const a=Math.floor,r=e.day,n=(e.month+9)%MONTH_MAX+1,i=a(e.year/100),o=e.year%100-(e.month<=2?1:0);t=((r+a(2.6*n-.2)-2*i+o+a(o/4)+a(i/4))%7+7)%7}return t??0}function copyTimestamp(e){return{...e}}function getDate(e){let 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):"00:00")}function moveRelativeDays(e,t=nextDay,a=1,r=[0,1,2,3,4,5,6]){const n=copyTimestamp(e);return relativeDays(n,t,a,r)}function relativeDays(e,t=nextDay,a=1,r=[0,1,2,3,4,5,6]){let n=copyTimestamp(e);r.includes(Number(n.weekday))||0!==n.weekday||t!==nextDay||++a;while(--a>=0)n=t(n),r.length<7&&!r.includes(Number(n.weekday))&&++a;return n}function findWeekday(e,t,a=nextDay,r=6){let n=copyTimestamp(e);while(n.weekday!==t&&--r>=0)n=a(n);return n}function createDayList(e,t,a,r=[0,1,2,3,4,5,6],n=void 0,i=void 0,o=[],s=[],m=42,d=0){const u=getDayIdentifier(e),p=getDayIdentifier(t),y=[];let T=copyTimestamp(e),f=0,c=f===p;if(!(p<u))while((!c||y.length<d)&&y.length<m){if(f=getDayIdentifier(T),c=c||f>p&&y.length>=d,c)break;if(r.includes(Number(T.weekday))){let e=copyTimestamp(T);e=updateFormatted(e),e=updateRelative(e,a),e=updateDisabled(e,n,i,o,s),y.push(e)}T=relativeDays(T,nextDay)}return y}function createIntervalList(t,a,r,n,i){const o=[];for(let e=0;e<n;++e){const s=(a+e)*r,m=copyTimestamp(t);o.push(updateMinutes(m,s,i))}return o}function createNativeLocaleFormatter(r,n){const e=()=>"";return"undefined"===typeof Intl||"undefined"===typeof Intl.DateTimeFormat?e:(t,e)=>{try{const a=new Intl.DateTimeFormat(r||void 0,n(t,e));return a.format(makeDateTime(t))}catch(e){return console.error(`Intl.DateTimeFormat: ${e.message} -> `+getDateTime(t)),""}}}function makeDate(e,t=!0){return t?new Date(Date.UTC(e.year,e.month-1,e.day,0,0)):new Date(e.year,e.month-1,e.day,0,0)}function makeDateTime(e,t=!0){return t?new Date(Date.UTC(e.year,e.month-1,e.day,e.hour,e.minute)):new Date(e.year,e.month-1,e.day,e.hour,e.minute)}function validateNumber(e){return isFinite(Number(e))}function maxTimestamp(e,t=!1){const a=!0===t?getDayTimeIdentifier:getDayIdentifier;return e.reduce((e,t)=>{return Math.max(a(e),a(t))===a(e)?e:t})}function minTimestamp(e,t=!1){const a=!0===t?getDayTimeIdentifier:getDayIdentifier;return e.reduce((e,t)=>{return Math.min(a(e),a(t))===a(e)?e:t})}function isBetweenDates(e,t,a,r=!1){const n=getDayIdentifier(e)+(!0===r?getTimeIdentifier(e):0),i=getDayIdentifier(t)+(!0===r?getTimeIdentifier(t):0),o=getDayIdentifier(a)+(!0===r?getTimeIdentifier(a):0);return n>=i&&n<=o}function isOverlappingDates(e,t,a,r){const n=getDayIdentifier(e),i=getDayIdentifier(t),o=getDayIdentifier(a),s=getDayIdentifier(r);return n>=o&&n<=s||i>=o&&i<=s||o>=n&&i>=s}function addToDate(e,t){const a=copyTimestamp(e);return t.year&&(a.year+=t.year),t.month&&(a.month+=t.month),t.day&&(a.day+=t.day),t.hour&&(a.hour+=t.hour),t.minute&&(a.minute+=t.minute),updateFormatted(normalizeTimestamp(a))}function normalizeTimestamp(e){const t=new Date(e.year,e.month-1,e.day,e.hour,e.minute);return{...e,year:t.getFullYear(),month:t.getMonth()+1,day:t.getDate(),hour:t.getHours(),minute:t.getMinutes()}}function daysBetween(e,t){const a=diffTimestamp(e,t,!0);return Math.floor(a/TIME_CONSTANTS.MILLISECONDS_IN.DAY)}function weeksBetween(e,t){let a=copyTimestamp(e),r=copyTimestamp(t);return a=findWeekday(a,0),r=findWeekday(r,6),Math.ceil(daysBetween(a,r)/TIME_CONSTANTS.DAYS_IN.WEEK)}const weekdayDateMap={Sun:new Date("2020-01-05T00:00:00.000Z"),Mon:new Date("2020-01-06T00:00:00.000Z"),Tue:new Date("2020-01-07T00:00:00.000Z"),Wed:new Date("2020-01-08T00:00:00.000Z"),Thu:new Date("2020-01-09T00:00:00.000Z"),Fri:new Date("2020-01-10T00:00:00.000Z"),Sat:new Date("2020-01-11T00:00:00.000Z")};function getWeekdayFormatter(){const e=()=>"",n={long:{timeZone:"UTC",weekday:"long"},short:{timeZone:"UTC",weekday:"short"},narrow:{timeZone:"UTC",weekday:"narrow"}};return"undefined"===typeof Intl||"undefined"===typeof Intl.DateTimeFormat?e:t;function t(t,e,a){try{const r=new Intl.DateTimeFormat(a||void 0,n[e]||n["long"]);return r.format(weekdayDateMap[t])}catch(e){return e instanceof Error&&console.error(`Intl.DateTimeFormat: ${e.message} -> day of week: `+t),""}}}function getWeekdayNames(t,a){const e=Object.keys(weekdayDateMap),r=getWeekdayFormatter();return e.map(e=>String(r(e,t,a)))}function getMonthFormatter(){const e=()=>"",i={long:{timeZone:"UTC",month:"long"},short:{timeZone:"UTC",month:"short"},narrow:{timeZone:"UTC",month:"narrow"}};return"undefined"===typeof Intl||"undefined"===typeof Intl.DateTimeFormat?e:t;function t(t,e,a){try{const r=new Intl.DateTimeFormat(a||void 0,i[e]||i["long"]),n=new Date;return n.setDate(1),n.setMonth(t),r.format(n)}catch(e){return e instanceof Error&&console.error(`Intl.DateTimeFormat: ${e.message} -> month: `+t),""}}}function getMonthNames(t,a){const r=getMonthFormatter();return[...Array(12).keys()].map(e=>r(e,t,a))}function convertToUnit(e,t="px"){if(e)return isNaN(e)?String(e):"auto"===e?e:""+Number(e)+t}function indexOf(t,a){for(let e=0;e<t.length;e++)if(!0===a(t[e],e))return e;return-1}function minCharWidth(e,t){return 0===t?e:e.slice(0,t)}exports.DAYS_IN_MONTH=DAYS_IN_MONTH,exports.DAYS_IN_MONTH_LEAP=DAYS_IN_MONTH_LEAP,exports.DAYS_IN_MONTH_MAX=DAYS_IN_MONTH_MAX,exports.DAYS_IN_MONTH_MIN=DAYS_IN_MONTH_MIN,exports.DAY_MIN=DAY_MIN,exports.FIRST_HOUR=FIRST_HOUR,exports.MONTH_MAX=MONTH_MAX,exports.MONTH_MIN=MONTH_MIN,exports.PARSE_DATE=PARSE_DATE,exports.PARSE_DATETIME=PARSE_DATETIME,exports.PARSE_TIME=PARSE_TIME,exports.TIME_CONSTANTS=TIME_CONSTANTS,exports.addToDate=addToDate,exports.compareDate=compareDate,exports.compareDateTime=compareDateTime,exports.compareTime=compareTime,exports.compareTimestamps=compareTimestamps,exports.convertToUnit=convertToUnit,exports.copyTimestamp=copyTimestamp,exports.createDayList=createDayList,exports.createIntervalList=createIntervalList,exports.createNativeLocaleFormatter=createNativeLocaleFormatter,exports.daysBetween=daysBetween,exports.daysInMonth=daysInMonth,exports.diffTimestamp=diffTimestamp,exports.findWeekday=findWeekday,exports.getDate=getDate,exports.getDateTime=getDateTime,exports.getDayIdentifier=getDayIdentifier,exports.getDayOfYear=getDayOfYear,exports.getDayTimeIdentifier=getDayTimeIdentifier,exports.getEndOfMonth=getEndOfMonth,exports.getEndOfWeek=getEndOfWeek,exports.getMonthFormatter=getMonthFormatter,exports.getMonthNames=getMonthNames,exports.getStartOfMonth=getStartOfMonth,exports.getStartOfWeek=getStartOfWeek,exports.getTime=getTime,exports.getTimeIdentifier=getTimeIdentifier,exports.getWeekday=getWeekday,exports.getWeekdayFormatter=getWeekdayFormatter,exports.getWeekdayNames=getWeekdayNames,exports.getWorkWeek=getWorkWeek,exports.indexOf=indexOf,exports.isBetweenDates=isBetweenDates,exports.isLeapYear=isLeapYear,exports.isOverlappingDates=isOverlappingDates,exports.isToday=isToday,exports.makeDate=makeDate,exports.makeDateTime=makeDateTime,exports.maxTimestamp=maxTimestamp,exports.minCharWidth=minCharWidth,exports.minTimestamp=minTimestamp,exports.moveRelativeDays=moveRelativeDays,exports.nextDay=nextDay,exports.padNumber=padNumber,exports.parseDate=parseDate,exports.parseTime=parseTime,exports.parseTimestamp=parseTimestamp,exports.parsed=parsed,exports.prevDay=prevDay,exports.relativeDays=relativeDays,exports.today=today,exports.updateDayOfYear=updateDayOfYear,exports.updateDisabled=updateDisabled,exports.updateFormatted=updateFormatted,exports.updateMinutes=updateMinutes,exports.updateRelative=updateRelative,exports.updateWeekday=updateWeekday,exports.updateWorkWeek=updateWorkWeek,exports.validateNumber=validateNumber,exports.validateTimestamp=validateTimestamp,exports.version=version,exports.weeksBetween=weeksBetween; | ||
const version="4.1.1",PARSE_DATETIME=/^(\d{4})-(\d{1,2})(-(\d{1,2}))?([^\d]+(\d{1,2}))?(:(\d{1,2}))?(:(\d{1,2}))?(.(\d{1,3}))?$/,PARSE_DATE=/^(\d{4})-(\d{1,2})(-(\d{1,2}))?/,PARSE_TIME=/(\d\d?)(:(\d\d?)|)(:(\d\d?)|)/,DAYS_IN_MONTH=[0,31,28,31,30,31,30,31,31,30,31,30,31],DAYS_IN_MONTH_LEAP=[0,31,29,31,30,31,30,31,31,30,31,30,31],TIME_CONSTANTS={MILLISECONDS_IN:{SECOND:1e3,MINUTE:6e4,HOUR:36e5,DAY:864e5,WEEK:6048e5},SECONDS_IN:{MINUTE:60,HOUR:3600,DAY:86400,WEEK:604800},MINUTES_IN:{MINUTE:1,HOUR:60,DAY:1440,WEEK:10080},HOURS_IN:{DAY:24,WEEK:168},DAYS_IN:{WEEK:7}},DAYS_IN_MONTH_MIN=28,DAYS_IN_MONTH_MAX=31,MONTH_MAX=12,MONTH_MIN=1,DAY_MIN=1,FIRST_HOUR=0;function validateTimestamp(e){return"string"===typeof e&&PARSE_DATETIME.test(e)}function parsed(e){if("string"!==typeof e)return null;const t=PARSE_DATETIME.exec(e);if(!t||!t[1]||!t[2])return null;const a=parseInt(t[1],10),r=parseInt(t[2],10),n=parseInt(t[4]||"1",10),i=parseInt(t[6]||"0",10),o=parseInt(t[8]||"0",10);return{date:e,time:i.toString().padStart(2,"0")+":"+o.toString().padStart(2,"0"),year:a,month:r,day:n,hour:i,minute:o,hasDay:!!t[4],hasTime:!0,past:!1,current:!1,future:!1,disabled:!1,weekday:0,doy:0,workweek:0}}function parseDate(e,t=!1){if(!(e instanceof Date))return null;const a=t?"UTC":"";return updateFormatted({date:padNumber(e[`get${a}FullYear`](),4)+"-"+padNumber(e[`get${a}Month`]()+1,2)+"-"+padNumber(e[`get${a}Date`](),2),time:padNumber(e[`get${a}Hours`]()||0,2)+":"+padNumber(e[`get${a}Minutes`]()||0,2),year:e[`get${a}FullYear`](),month:e[`get${a}Month`]()+1,day:e[`get${a}Date`](),hour:e[`get${a}Hours`](),minute:e[`get${a}Minutes`](),weekday:0,doy:0,workweek:0,hasDay:!0,hasTime:!0,past:!1,current:!1,future:!1,disabled:!1})}function padNumber(e,t){let a=String(e);while(a.length<t)a="0"+a;return a}function isLeapYear(e){return e%4===0&&e%100!==0||e%400===0}function daysInMonth(e,t){return(isLeapYear(e)?DAYS_IN_MONTH_LEAP:DAYS_IN_MONTH)[t]}function nextDay(e){const t=new Date(e.year,e.month-1,e.day+1);return updateFormatted(normalizeTimestamp({...e,year:t.getFullYear(),month:t.getMonth()+1,day:t.getDate()}))}function prevDay(e){const t=new Date(e.year,e.month-1,e.day-1);return updateFormatted(normalizeTimestamp({...e,year:t.getFullYear(),month:t.getMonth()+1,day:t.getDate()}))}function today(){const e=new Date,t=e.getMonth()+1,a=e.getDate(),r=e.getFullYear();return[r,padNumber(t,2),padNumber(a,2)].join("-")}function isToday(e){return e===today()}function getStartOfWeek(e,t,a){let r=copyTimestamp(e);if(t){if(1===r.day||0===r.weekday)while(!t.includes(Number(r.weekday)))r=nextDay(r);r=findWeekday(r,t[0],prevDay),r=updateFormatted(r),a&&(r=updateRelative(r,a,r.hasTime))}return r}function getEndOfWeek(e,t,a){let r=copyTimestamp(e);if(t&&Array.isArray(t)){const n=daysInMonth(r.year,r.month);if(n===r.day||r.weekday===t[t.length-1])while(!t.includes(Number(r.weekday)))r=prevDay(r);r=findWeekday(r,t[t.length-1],nextDay),r=updateFormatted(r),a&&(r=updateRelative(r,a,r.hasTime))}return r}function getStartOfMonth(e){let t=copyTimestamp(e);return t.day=DAY_MIN,t=updateFormatted(t),t}function getEndOfMonth(e){let t=copyTimestamp(e);return t.day=daysInMonth(t.year,t.month),t=updateFormatted(t),t}function parseTime(e){const t=Object.prototype.toString.call(e);switch(t){case"[object Number]":return e;case"[object String]":{const a=PARSE_TIME.exec(e);return a?60*parseInt(a[1],10)+parseInt(a[3]||"0",10):!1}case"[object Object]":return"object"!==typeof e||"number"!==typeof e.hour||"number"!==typeof e.minute?!1:"object"===typeof e&&"hour"in e&&"minute"in e&&60*e.hour+e.minute}return!1}function compareTimestamps(e,t){return!(!e||!t)&&e.year===t.year&&e.month===t.month&&e.day===t.day&&e.hour===t.hour&&e.minute===t.minute}function compareDate(e,t){return getDate(e)===getDate(t)}function compareTime(e,t){return getTime(e)===getTime(t)}function compareDateTime(e,t){return getDateTime(e)===getDateTime(t)}function parseTimestamp(e,t=null){let a=parsed(e);return a?(a=updateFormatted(a),t&&(a=updateRelative(a,t,a.hasTime)),a):null}function getDayIdentifier(e){return 1e8*(e.year??0)+1e6*(e.month??0)+1e4*(e.day??0)}function getTimeIdentifier(e){return 100*(e.hour??0)+(e.minute??0)}function getDayTimeIdentifier(e){return getDayIdentifier(e)+getTimeIdentifier(e)}function diffTimestamp(e,t,a=!1){const r=Date.UTC(e.year??0,(e.month??1)-1,e.day??1,e.hour??0,e.minute??0),n=Date.UTC(t.year??0,(t.month??1)-1,t.day??1,t.hour??0,t.minute??0);return!0===a&&n<r?0:n-r}function updateRelative(e,t,a=!1){let r=copyTimestamp(e),n=getDayIdentifier(t),i=getDayIdentifier(r),o=n===i;return r.hasTime&&a&&o&&(n=getTimeIdentifier(t),i=getTimeIdentifier(r),o=n===i),r.past=i<n,r.current=o,r.future=i>n,r.currentWeekday=r.weekday===t.weekday,r}function updateMinutes(e,t,a=null){let r=copyTimestamp(e);return r.hasTime=!0,r.hour=Math.floor(t/TIME_CONSTANTS.MINUTES_IN.HOUR),r.minute=t%TIME_CONSTANTS.MINUTES_IN.HOUR,r.time=getTime(r),a&&(r=updateRelative(r,a,!0)),r}function updateWeekday(e){let t=copyTimestamp(e);return t.weekday=getWeekday(t),t}function updateDayOfYear(e){let t=copyTimestamp(e);return t.doy=getDayOfYear(t)||0,t}function updateWorkWeek(e){let t=copyTimestamp(e);return t.workweek=getWorkWeek(t),t}function updateDisabled(e,t,a,r,n){let i=copyTimestamp(e);const o=getDayIdentifier(i);if(void 0!==t){const u=parsed(t);if(u){const p=getDayIdentifier(u);o<=p&&(i.disabled=!0)}}if(!0!==i.disabled&&void 0!==a){const y=parsed(a);if(y){const T=getDayIdentifier(y);o>=T&&(i.disabled=!0)}}if(!0!==i.disabled&&Array.isArray(r)&&r.length>0)for(var s in r)if(r[s]===i.weekday){i.disabled=!0;break}if(!0!==i.disabled&&Array.isArray(n)&&n.length>0)for(var m in n)if(Array.isArray(n[m])&&2===n[m].length&&n[m][0]&&n[m][1]){const f=parsed(n[m][0]),c=parsed(n[m][1]);if(f&&c&&isBetweenDates(i,f,c)){i.disabled=!0;break}}else{const D=n[m];if(Array.isArray(D))for(var d of D){const g=parseTimestamp(d);if(g){const l=getDayIdentifier(g);if(l===o){i.disabled=!0;break}}}else if(D){const h=parseTimestamp(D);if(h){const I=getDayIdentifier(h);I===o&&(i.disabled=!0)}}}return i}function updateFormatted(e){let t=copyTimestamp(e);return t.hasTime=!0,t.time=getTime(t),t.date=getDate(t),t.weekday=getWeekday(t),t.doy=getDayOfYear(t)||0,t.workweek=getWorkWeek(t),t}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){let t=copyTimestamp(e);if(0===t.year){const n=parseTimestamp(today());n&&(t=n)}const a=new Date(Date.UTC(t.year,t.month-1,t.day)),r=4;a.setUTCDate(a.getUTCDate()-(a.getUTCDay()+6)%7+r),a.setUTCDate(a.getUTCDate()+r-(a.getUTCDay()||7));e=new Date(Date.UTC(a.getUTCFullYear(),0,1)),e=Math.ceil(((a.valueOf()-e.valueOf())/864e5+1)/7);return e}function getWeekday(e){let t=e.weekday;if(e.hasDay){const a=Math.floor,r=e.day,n=(e.month+9)%MONTH_MAX+1,i=a(e.year/100),o=e.year%100-(e.month<=2?1:0);t=((r+a(2.6*n-.2)-2*i+o+a(o/4)+a(i/4))%7+7)%7}return t??0}function copyTimestamp(e){return{...e}}function getDate(e){let 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):"00:00")}function moveRelativeDays(e,t=nextDay,a=1,r=[0,1,2,3,4,5,6]){const n=copyTimestamp(e);return relativeDays(n,t,a,r)}function relativeDays(e,t=nextDay,a=1,r=[0,1,2,3,4,5,6]){let n=copyTimestamp(e);r.includes(Number(n.weekday))||0!==n.weekday||t!==nextDay||++a;while(--a>=0)n=t(n),r.length<7&&!r.includes(Number(n.weekday))&&++a;return n}function findWeekday(e,t,a=nextDay,r=6){let n=copyTimestamp(e);while(n.weekday!==t&&--r>=0)n=a(n);return n}function createDayList(e,t,a,r=[0,1,2,3,4,5,6],n=void 0,i=void 0,o=[],s=[],m=42,d=0){const u=getDayIdentifier(e),p=getDayIdentifier(t),y=[];let T=copyTimestamp(e),f=0,c=f===p;if(!(p<u))while((!c||y.length<d)&&y.length<m){if(f=getDayIdentifier(T),c=c||f>p&&y.length>=d,c)break;if(r.includes(Number(T.weekday))){let e=copyTimestamp(T);e=updateFormatted(e),e=updateRelative(e,a),e=updateDisabled(e,n,i,o,s),y.push(e)}T=relativeDays(T,nextDay)}return y}function createIntervalList(t,a,r,n,i){const o=[];for(let e=0;e<n;++e){const s=(a+e)*r,m=copyTimestamp(t);o.push(updateMinutes(m,s,i))}return o}function createNativeLocaleFormatter(r,n){const e=()=>"";return"undefined"===typeof Intl||"undefined"===typeof Intl.DateTimeFormat?e:(t,e)=>{try{const a=new Intl.DateTimeFormat(r||void 0,n(t,e));return a.format(makeDateTime(t))}catch(e){return console.error(`Intl.DateTimeFormat: ${e.message} -> `+getDateTime(t)),""}}}function makeDate(e,t=!0){return t?new Date(Date.UTC(e.year,e.month-1,e.day,0,0)):new Date(e.year,e.month-1,e.day,0,0)}function makeDateTime(e,t=!0){return t?new Date(Date.UTC(e.year,e.month-1,e.day,e.hour,e.minute)):new Date(e.year,e.month-1,e.day,e.hour,e.minute)}function validateNumber(e){return isFinite(Number(e))}function maxTimestamp(e,t=!1){const a=!0===t?getDayTimeIdentifier:getDayIdentifier;return e.reduce((e,t)=>{return Math.max(a(e),a(t))===a(e)?e:t})}function minTimestamp(e,t=!1){const a=!0===t?getDayTimeIdentifier:getDayIdentifier;return e.reduce((e,t)=>{return Math.min(a(e),a(t))===a(e)?e:t})}function isBetweenDates(e,t,a,r=!1){const n=getDayIdentifier(e)+(!0===r?getTimeIdentifier(e):0),i=getDayIdentifier(t)+(!0===r?getTimeIdentifier(t):0),o=getDayIdentifier(a)+(!0===r?getTimeIdentifier(a):0);return n>=i&&n<=o}function isOverlappingDates(e,t,a,r){const n=getDayIdentifier(e),i=getDayIdentifier(t),o=getDayIdentifier(a),s=getDayIdentifier(r);return n>=o&&n<=s||i>=o&&i<=s||o>=n&&i>=s}function addToDate(e,t){const a=copyTimestamp(e);return t.year&&(a.year+=t.year),t.month&&(a.month+=t.month),t.day&&(a.day+=t.day),t.hour&&(a.hour+=t.hour),t.minute&&(a.minute+=t.minute),updateFormatted(normalizeTimestamp(a))}function normalizeTimestamp(e){const t=new Date(e.year,e.month-1,e.day,e.hour,e.minute);return{...e,year:t.getFullYear(),month:t.getMonth()+1,day:t.getDate(),hour:t.getHours(),minute:t.getMinutes()}}function daysBetween(e,t){const a=diffTimestamp(e,t,!0);return Math.floor(a/TIME_CONSTANTS.MILLISECONDS_IN.DAY)}function weeksBetween(e,t){let a=copyTimestamp(e),r=copyTimestamp(t);return a=findWeekday(a,0),r=findWeekday(r,6),Math.ceil(daysBetween(a,r)/TIME_CONSTANTS.DAYS_IN.WEEK)}const weekdayDateMap={Sun:new Date("2020-01-05T00:00:00.000Z"),Mon:new Date("2020-01-06T00:00:00.000Z"),Tue:new Date("2020-01-07T00:00:00.000Z"),Wed:new Date("2020-01-08T00:00:00.000Z"),Thu:new Date("2020-01-09T00:00:00.000Z"),Fri:new Date("2020-01-10T00:00:00.000Z"),Sat:new Date("2020-01-11T00:00:00.000Z")};function getWeekdayFormatter(){const e=()=>"",n={long:{timeZone:"UTC",weekday:"long"},short:{timeZone:"UTC",weekday:"short"},narrow:{timeZone:"UTC",weekday:"narrow"}};return"undefined"===typeof Intl||"undefined"===typeof Intl.DateTimeFormat?e:t;function t(t,e,a){try{const r=new Intl.DateTimeFormat(a||void 0,n[e]||n["long"]);return r.format(weekdayDateMap[t])}catch(e){return e instanceof Error&&console.error(`Intl.DateTimeFormat: ${e.message} -> day of week: `+t),""}}}function getWeekdayNames(t,a){const e=Object.keys(weekdayDateMap),r=getWeekdayFormatter();return e.map(e=>String(r(e,t,a)))}function getMonthFormatter(){const e=()=>"",i={long:{timeZone:"UTC",month:"long"},short:{timeZone:"UTC",month:"short"},narrow:{timeZone:"UTC",month:"narrow"}};return"undefined"===typeof Intl||"undefined"===typeof Intl.DateTimeFormat?e:t;function t(t,e,a){try{const r=new Intl.DateTimeFormat(a||void 0,i[e]||i["long"]),n=new Date;return n.setDate(1),n.setMonth(t),r.format(n)}catch(e){return e instanceof Error&&console.error(`Intl.DateTimeFormat: ${e.message} -> month: `+t),""}}}function getMonthNames(t,a){const r=getMonthFormatter();return[...Array(12).keys()].map(e=>r(e,t,a))}function convertToUnit(e,t="px"){if(e)return isNaN(e)?String(e):"auto"===e?e:""+Number(e)+t}function indexOf(t,a){for(let e=0;e<t.length;e++)if(!0===a(t[e],e))return e;return-1}function minCharWidth(e,t){return 0===t?e:e.slice(0,t)}exports.DAYS_IN_MONTH=DAYS_IN_MONTH,exports.DAYS_IN_MONTH_LEAP=DAYS_IN_MONTH_LEAP,exports.DAYS_IN_MONTH_MAX=DAYS_IN_MONTH_MAX,exports.DAYS_IN_MONTH_MIN=DAYS_IN_MONTH_MIN,exports.DAY_MIN=DAY_MIN,exports.FIRST_HOUR=FIRST_HOUR,exports.MONTH_MAX=MONTH_MAX,exports.MONTH_MIN=MONTH_MIN,exports.PARSE_DATE=PARSE_DATE,exports.PARSE_DATETIME=PARSE_DATETIME,exports.PARSE_TIME=PARSE_TIME,exports.TIME_CONSTANTS=TIME_CONSTANTS,exports.addToDate=addToDate,exports.compareDate=compareDate,exports.compareDateTime=compareDateTime,exports.compareTime=compareTime,exports.compareTimestamps=compareTimestamps,exports.convertToUnit=convertToUnit,exports.copyTimestamp=copyTimestamp,exports.createDayList=createDayList,exports.createIntervalList=createIntervalList,exports.createNativeLocaleFormatter=createNativeLocaleFormatter,exports.daysBetween=daysBetween,exports.daysInMonth=daysInMonth,exports.diffTimestamp=diffTimestamp,exports.findWeekday=findWeekday,exports.getDate=getDate,exports.getDateTime=getDateTime,exports.getDayIdentifier=getDayIdentifier,exports.getDayOfYear=getDayOfYear,exports.getDayTimeIdentifier=getDayTimeIdentifier,exports.getEndOfMonth=getEndOfMonth,exports.getEndOfWeek=getEndOfWeek,exports.getMonthFormatter=getMonthFormatter,exports.getMonthNames=getMonthNames,exports.getStartOfMonth=getStartOfMonth,exports.getStartOfWeek=getStartOfWeek,exports.getTime=getTime,exports.getTimeIdentifier=getTimeIdentifier,exports.getWeekday=getWeekday,exports.getWeekdayFormatter=getWeekdayFormatter,exports.getWeekdayNames=getWeekdayNames,exports.getWorkWeek=getWorkWeek,exports.indexOf=indexOf,exports.isBetweenDates=isBetweenDates,exports.isLeapYear=isLeapYear,exports.isOverlappingDates=isOverlappingDates,exports.isToday=isToday,exports.makeDate=makeDate,exports.makeDateTime=makeDateTime,exports.maxTimestamp=maxTimestamp,exports.minCharWidth=minCharWidth,exports.minTimestamp=minTimestamp,exports.moveRelativeDays=moveRelativeDays,exports.nextDay=nextDay,exports.padNumber=padNumber,exports.parseDate=parseDate,exports.parseTime=parseTime,exports.parseTimestamp=parseTimestamp,exports.parsed=parsed,exports.prevDay=prevDay,exports.relativeDays=relativeDays,exports.today=today,exports.updateDayOfYear=updateDayOfYear,exports.updateDisabled=updateDisabled,exports.updateFormatted=updateFormatted,exports.updateMinutes=updateMinutes,exports.updateRelative=updateRelative,exports.updateWeekday=updateWeekday,exports.updateWorkWeek=updateWorkWeek,exports.validateNumber=validateNumber,exports.validateTimestamp=validateTimestamp,exports.version=version,exports.weeksBetween=weeksBetween; |
/*! | ||
* @quasar/quasar-ui-qcalendar v4.1.0 | ||
* @quasar/quasar-ui-qcalendar v4.1.1 | ||
* (c) 2025 Jeff Galbraith <jeff@quasar.dev> | ||
@@ -7,3 +7,3 @@ * Released under the MIT License. | ||
const version = '4.1.0'; | ||
const version = '4.1.1'; | ||
@@ -10,0 +10,0 @@ const PARSE_DATETIME = /^(\d{4})-(\d{1,2})(-(\d{1,2}))?([^\d]+(\d{1,2}))?(:(\d{1,2}))?(:(\d{1,2}))?(.(\d{1,3}))?$/; |
/*! | ||
* @quasar/quasar-ui-qcalendar v4.1.0 | ||
* @quasar/quasar-ui-qcalendar v4.1.1 | ||
* (c) 2025 Jeff Galbraith <jeff@quasar.dev> | ||
* Released under the MIT License. | ||
*/ | ||
const version="4.1.0",PARSE_DATETIME=/^(\d{4})-(\d{1,2})(-(\d{1,2}))?([^\d]+(\d{1,2}))?(:(\d{1,2}))?(:(\d{1,2}))?(.(\d{1,3}))?$/,PARSE_DATE=/^(\d{4})-(\d{1,2})(-(\d{1,2}))?/,PARSE_TIME=/(\d\d?)(:(\d\d?)|)(:(\d\d?)|)/,DAYS_IN_MONTH=[0,31,28,31,30,31,30,31,31,30,31,30,31],DAYS_IN_MONTH_LEAP=[0,31,29,31,30,31,30,31,31,30,31,30,31],TIME_CONSTANTS={MILLISECONDS_IN:{SECOND:1e3,MINUTE:6e4,HOUR:36e5,DAY:864e5,WEEK:6048e5},SECONDS_IN:{MINUTE:60,HOUR:3600,DAY:86400,WEEK:604800},MINUTES_IN:{MINUTE:1,HOUR:60,DAY:1440,WEEK:10080},HOURS_IN:{DAY:24,WEEK:168},DAYS_IN:{WEEK:7}},DAYS_IN_MONTH_MIN=28,DAYS_IN_MONTH_MAX=31,MONTH_MAX=12,MONTH_MIN=1,DAY_MIN=1,FIRST_HOUR=0;function validateTimestamp(e){return"string"===typeof e&&PARSE_DATETIME.test(e)}function parsed(e){if("string"!==typeof e)return null;const t=PARSE_DATETIME.exec(e);if(!t||!t[1]||!t[2])return null;const a=parseInt(t[1],10),r=parseInt(t[2],10),n=parseInt(t[4]||"1",10),i=parseInt(t[6]||"0",10),o=parseInt(t[8]||"0",10);return{date:e,time:i.toString().padStart(2,"0")+":"+o.toString().padStart(2,"0"),year:a,month:r,day:n,hour:i,minute:o,hasDay:!!t[4],hasTime:!0,past:!1,current:!1,future:!1,disabled:!1,weekday:0,doy:0,workweek:0}}function parseDate(e,t=!1){if(!(e instanceof Date))return null;const a=t?"UTC":"";return updateFormatted({date:padNumber(e[`get${a}FullYear`](),4)+"-"+padNumber(e[`get${a}Month`]()+1,2)+"-"+padNumber(e[`get${a}Date`](),2),time:padNumber(e[`get${a}Hours`]()||0,2)+":"+padNumber(e[`get${a}Minutes`]()||0,2),year:e[`get${a}FullYear`](),month:e[`get${a}Month`]()+1,day:e[`get${a}Date`](),hour:e[`get${a}Hours`](),minute:e[`get${a}Minutes`](),weekday:0,doy:0,workweek:0,hasDay:!0,hasTime:!0,past:!1,current:!1,future:!1,disabled:!1})}function padNumber(e,t){let a=String(e);while(a.length<t)a="0"+a;return a}function isLeapYear(e){return e%4===0&&e%100!==0||e%400===0}function daysInMonth(e,t){return(isLeapYear(e)?DAYS_IN_MONTH_LEAP:DAYS_IN_MONTH)[t]}function nextDay(e){const t=new Date(e.year,e.month-1,e.day+1);return updateFormatted(normalizeTimestamp({...e,year:t.getFullYear(),month:t.getMonth()+1,day:t.getDate()}))}function prevDay(e){const t=new Date(e.year,e.month-1,e.day-1);return updateFormatted(normalizeTimestamp({...e,year:t.getFullYear(),month:t.getMonth()+1,day:t.getDate()}))}function today(){const e=new Date,t=e.getMonth()+1,a=e.getDate(),r=e.getFullYear();return[r,padNumber(t,2),padNumber(a,2)].join("-")}function isToday(e){return e===today()}function getStartOfWeek(e,t,a){let r=copyTimestamp(e);if(t){if(1===r.day||0===r.weekday)while(!t.includes(Number(r.weekday)))r=nextDay(r);r=findWeekday(r,t[0],prevDay),r=updateFormatted(r),a&&(r=updateRelative(r,a,r.hasTime))}return r}function getEndOfWeek(e,t,a){let r=copyTimestamp(e);if(t&&Array.isArray(t)){const n=daysInMonth(r.year,r.month);if(n===r.day||r.weekday===t[t.length-1])while(!t.includes(Number(r.weekday)))r=prevDay(r);r=findWeekday(r,t[t.length-1],nextDay),r=updateFormatted(r),a&&(r=updateRelative(r,a,r.hasTime))}return r}function getStartOfMonth(e){let t=copyTimestamp(e);return t.day=DAY_MIN,t=updateFormatted(t),t}function getEndOfMonth(e){let t=copyTimestamp(e);return t.day=daysInMonth(t.year,t.month),t=updateFormatted(t),t}function parseTime(e){const t=Object.prototype.toString.call(e);switch(t){case"[object Number]":return e;case"[object String]":{const a=PARSE_TIME.exec(e);return a?60*parseInt(a[1],10)+parseInt(a[3]||"0",10):!1}case"[object Object]":return"object"!==typeof e||"number"!==typeof e.hour||"number"!==typeof e.minute?!1:"object"===typeof e&&"hour"in e&&"minute"in e&&60*e.hour+e.minute}return!1}function compareTimestamps(e,t){return!(!e||!t)&&e.year===t.year&&e.month===t.month&&e.day===t.day&&e.hour===t.hour&&e.minute===t.minute}function compareDate(e,t){return getDate(e)===getDate(t)}function compareTime(e,t){return getTime(e)===getTime(t)}function compareDateTime(e,t){return getDateTime(e)===getDateTime(t)}function parseTimestamp(e,t=null){let a=parsed(e);return a?(a=updateFormatted(a),t&&(a=updateRelative(a,t,a.hasTime)),a):null}function getDayIdentifier(e){return 1e8*(e.year??0)+1e6*(e.month??0)+1e4*(e.day??0)}function getTimeIdentifier(e){return 100*(e.hour??0)+(e.minute??0)}function getDayTimeIdentifier(e){return getDayIdentifier(e)+getTimeIdentifier(e)}function diffTimestamp(e,t,a=!1){const r=Date.UTC(e.year??0,(e.month??1)-1,e.day??1,e.hour??0,e.minute??0),n=Date.UTC(t.year??0,(t.month??1)-1,t.day??1,t.hour??0,t.minute??0);return!0===a&&n<r?0:n-r}function updateRelative(e,t,a=!1){let r=copyTimestamp(e),n=getDayIdentifier(t),i=getDayIdentifier(r),o=n===i;return r.hasTime&&a&&o&&(n=getTimeIdentifier(t),i=getTimeIdentifier(r),o=n===i),r.past=i<n,r.current=o,r.future=i>n,r.currentWeekday=r.weekday===t.weekday,r}function updateMinutes(e,t,a=null){let r=copyTimestamp(e);return r.hasTime=!0,r.hour=Math.floor(t/TIME_CONSTANTS.MINUTES_IN.HOUR),r.minute=t%TIME_CONSTANTS.MINUTES_IN.HOUR,r.time=getTime(r),a&&(r=updateRelative(r,a,!0)),r}function updateWeekday(e){let t=copyTimestamp(e);return t.weekday=getWeekday(t),t}function updateDayOfYear(e){let t=copyTimestamp(e);return t.doy=getDayOfYear(t)||0,t}function updateWorkWeek(e){let t=copyTimestamp(e);return t.workweek=getWorkWeek(t),t}function updateDisabled(e,t,a,r,n){let i=copyTimestamp(e);const o=getDayIdentifier(i);if(void 0!==t){const u=parsed(t);if(u){const T=getDayIdentifier(u);o<=T&&(i.disabled=!0)}}if(!0!==i.disabled&&void 0!==a){const y=parsed(a);if(y){const p=getDayIdentifier(y);o>=p&&(i.disabled=!0)}}if(!0!==i.disabled&&Array.isArray(r)&&r.length>0)for(var m in r)if(r[m]===i.weekday){i.disabled=!0;break}if(!0!==i.disabled&&Array.isArray(n)&&n.length>0)for(var d in n)if(Array.isArray(n[d])&&2===n[d].length&&n[d][0]&&n[d][1]){const D=parsed(n[d][0]),f=parsed(n[d][1]);if(D&&f&&isBetweenDates(i,D,f)){i.disabled=!0;break}}else{const c=n[d];if(Array.isArray(c))for(var s of c){const g=parseTimestamp(s);if(g){const l=getDayIdentifier(g);if(l===o){i.disabled=!0;break}}}else if(c){const N=parseTimestamp(c);if(N){const I=getDayIdentifier(N);I===o&&(i.disabled=!0)}}}return i}function updateFormatted(e){let t=copyTimestamp(e);return t.hasTime=!0,t.time=getTime(t),t.date=getDate(t),t.weekday=getWeekday(t),t.doy=getDayOfYear(t)||0,t.workweek=getWorkWeek(t),t}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){let t=copyTimestamp(e);if(0===t.year){const n=parseTimestamp(today());n&&(t=n)}const a=new Date(Date.UTC(t.year,t.month-1,t.day)),r=4;a.setUTCDate(a.getUTCDate()-(a.getUTCDay()+6)%7+r),a.setUTCDate(a.getUTCDate()+r-(a.getUTCDay()||7));e=new Date(Date.UTC(a.getUTCFullYear(),0,1)),e=Math.ceil(((a.valueOf()-e.valueOf())/864e5+1)/7);return e}function getWeekday(e){let t=e.weekday;if(e.hasDay){const a=Math.floor,r=e.day,n=(e.month+9)%MONTH_MAX+1,i=a(e.year/100),o=e.year%100-(e.month<=2?1:0);t=((r+a(2.6*n-.2)-2*i+o+a(o/4)+a(i/4))%7+7)%7}return t??0}function copyTimestamp(e){return{...e}}function getDate(e){let 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):"00:00")}function moveRelativeDays(e,t=nextDay,a=1,r=[0,1,2,3,4,5,6]){const n=copyTimestamp(e);return relativeDays(n,t,a,r)}function relativeDays(e,t=nextDay,a=1,r=[0,1,2,3,4,5,6]){let n=copyTimestamp(e);r.includes(Number(n.weekday))||0!==n.weekday||t!==nextDay||++a;while(--a>=0)n=t(n),r.length<7&&!r.includes(Number(n.weekday))&&++a;return n}function findWeekday(e,t,a=nextDay,r=6){let n=copyTimestamp(e);while(n.weekday!==t&&--r>=0)n=a(n);return n}function createDayList(e,t,a,r=[0,1,2,3,4,5,6],n=void 0,i=void 0,o=[],m=[],d=42,s=0){const u=getDayIdentifier(e),T=getDayIdentifier(t),y=[];let p=copyTimestamp(e),D=0,f=D===T;if(!(T<u))while((!f||y.length<s)&&y.length<d){if(D=getDayIdentifier(p),f=f||D>T&&y.length>=s,f)break;if(r.includes(Number(p.weekday))){let e=copyTimestamp(p);e=updateFormatted(e),e=updateRelative(e,a),e=updateDisabled(e,n,i,o,m),y.push(e)}p=relativeDays(p,nextDay)}return y}function createIntervalList(t,a,r,n,i){const o=[];for(let e=0;e<n;++e){const m=(a+e)*r,d=copyTimestamp(t);o.push(updateMinutes(d,m,i))}return o}function createNativeLocaleFormatter(r,n){const e=()=>"";return"undefined"===typeof Intl||"undefined"===typeof Intl.DateTimeFormat?e:(t,e)=>{try{const a=new Intl.DateTimeFormat(r||void 0,n(t,e));return a.format(makeDateTime(t))}catch(e){return console.error(`Intl.DateTimeFormat: ${e.message} -> `+getDateTime(t)),""}}}function makeDate(e,t=!0){return t?new Date(Date.UTC(e.year,e.month-1,e.day,0,0)):new Date(e.year,e.month-1,e.day,0,0)}function makeDateTime(e,t=!0){return t?new Date(Date.UTC(e.year,e.month-1,e.day,e.hour,e.minute)):new Date(e.year,e.month-1,e.day,e.hour,e.minute)}function validateNumber(e){return isFinite(Number(e))}function maxTimestamp(e,t=!1){const a=!0===t?getDayTimeIdentifier:getDayIdentifier;return e.reduce((e,t)=>{return Math.max(a(e),a(t))===a(e)?e:t})}function minTimestamp(e,t=!1){const a=!0===t?getDayTimeIdentifier:getDayIdentifier;return e.reduce((e,t)=>{return Math.min(a(e),a(t))===a(e)?e:t})}function isBetweenDates(e,t,a,r=!1){const n=getDayIdentifier(e)+(!0===r?getTimeIdentifier(e):0),i=getDayIdentifier(t)+(!0===r?getTimeIdentifier(t):0),o=getDayIdentifier(a)+(!0===r?getTimeIdentifier(a):0);return n>=i&&n<=o}function isOverlappingDates(e,t,a,r){const n=getDayIdentifier(e),i=getDayIdentifier(t),o=getDayIdentifier(a),m=getDayIdentifier(r);return n>=o&&n<=m||i>=o&&i<=m||o>=n&&i>=m}function addToDate(e,t){const a=copyTimestamp(e);return t.year&&(a.year+=t.year),t.month&&(a.month+=t.month),t.day&&(a.day+=t.day),t.hour&&(a.hour+=t.hour),t.minute&&(a.minute+=t.minute),updateFormatted(normalizeTimestamp(a))}function normalizeTimestamp(e){const t=new Date(e.year,e.month-1,e.day,e.hour,e.minute);return{...e,year:t.getFullYear(),month:t.getMonth()+1,day:t.getDate(),hour:t.getHours(),minute:t.getMinutes()}}function daysBetween(e,t){const a=diffTimestamp(e,t,!0);return Math.floor(a/TIME_CONSTANTS.MILLISECONDS_IN.DAY)}function weeksBetween(e,t){let a=copyTimestamp(e),r=copyTimestamp(t);return a=findWeekday(a,0),r=findWeekday(r,6),Math.ceil(daysBetween(a,r)/TIME_CONSTANTS.DAYS_IN.WEEK)}const weekdayDateMap={Sun:new Date("2020-01-05T00:00:00.000Z"),Mon:new Date("2020-01-06T00:00:00.000Z"),Tue:new Date("2020-01-07T00:00:00.000Z"),Wed:new Date("2020-01-08T00:00:00.000Z"),Thu:new Date("2020-01-09T00:00:00.000Z"),Fri:new Date("2020-01-10T00:00:00.000Z"),Sat:new Date("2020-01-11T00:00:00.000Z")};function getWeekdayFormatter(){const e=()=>"",n={long:{timeZone:"UTC",weekday:"long"},short:{timeZone:"UTC",weekday:"short"},narrow:{timeZone:"UTC",weekday:"narrow"}};return"undefined"===typeof Intl||"undefined"===typeof Intl.DateTimeFormat?e:t;function t(t,e,a){try{const r=new Intl.DateTimeFormat(a||void 0,n[e]||n["long"]);return r.format(weekdayDateMap[t])}catch(e){return e instanceof Error&&console.error(`Intl.DateTimeFormat: ${e.message} -> day of week: `+t),""}}}function getWeekdayNames(t,a){const e=Object.keys(weekdayDateMap),r=getWeekdayFormatter();return e.map(e=>String(r(e,t,a)))}function getMonthFormatter(){const e=()=>"",i={long:{timeZone:"UTC",month:"long"},short:{timeZone:"UTC",month:"short"},narrow:{timeZone:"UTC",month:"narrow"}};return"undefined"===typeof Intl||"undefined"===typeof Intl.DateTimeFormat?e:t;function t(t,e,a){try{const r=new Intl.DateTimeFormat(a||void 0,i[e]||i["long"]),n=new Date;return n.setDate(1),n.setMonth(t),r.format(n)}catch(e){return e instanceof Error&&console.error(`Intl.DateTimeFormat: ${e.message} -> month: `+t),""}}}function getMonthNames(t,a){const r=getMonthFormatter();return[...Array(12).keys()].map(e=>r(e,t,a))}var Timestamp={PARSE_DATETIME:PARSE_DATETIME,PARSE_DATE:PARSE_DATE,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,TIME_CONSTANTS:TIME_CONSTANTS,FIRST_HOUR:FIRST_HOUR,today:today,getStartOfWeek:getStartOfWeek,getEndOfWeek:getEndOfWeek,getStartOfMonth:getStartOfMonth,getEndOfMonth:getEndOfMonth,parseTime:parseTime,validateTimestamp:validateTimestamp,parsed:parsed,parseTimestamp:parseTimestamp,parseDate:parseDate,getDayIdentifier:getDayIdentifier,getTimeIdentifier:getTimeIdentifier,getDayTimeIdentifier:getDayTimeIdentifier,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,createDayList:createDayList,createIntervalList:createIntervalList,createNativeLocaleFormatter:createNativeLocaleFormatter,makeDate:makeDate,makeDateTime:makeDateTime,validateNumber:validateNumber,isBetweenDates:isBetweenDates,isOverlappingDates:isOverlappingDates,daysBetween:daysBetween,weeksBetween:weeksBetween,addToDate:addToDate,compareTimestamps:compareTimestamps,compareDate:compareDate,compareTime:compareTime,compareDateTime:compareDateTime,getWeekdayFormatter:getWeekdayFormatter,getWeekdayNames:getWeekdayNames,getMonthFormatter:getMonthFormatter,getMonthNames:getMonthNames},Timestamp$1=Object.freeze({__proto__:null,DAYS_IN_MONTH:DAYS_IN_MONTH,DAYS_IN_MONTH_LEAP:DAYS_IN_MONTH_LEAP,DAYS_IN_MONTH_MAX:DAYS_IN_MONTH_MAX,DAYS_IN_MONTH_MIN:DAYS_IN_MONTH_MIN,DAY_MIN:DAY_MIN,FIRST_HOUR:FIRST_HOUR,MONTH_MAX:MONTH_MAX,MONTH_MIN:MONTH_MIN,PARSE_DATE:PARSE_DATE,PARSE_DATETIME:PARSE_DATETIME,PARSE_TIME:PARSE_TIME,TIME_CONSTANTS:TIME_CONSTANTS,addToDate:addToDate,compareDate:compareDate,compareDateTime:compareDateTime,compareTime:compareTime,compareTimestamps:compareTimestamps,copyTimestamp:copyTimestamp,createDayList:createDayList,createIntervalList:createIntervalList,createNativeLocaleFormatter:createNativeLocaleFormatter,daysBetween:daysBetween,daysInMonth:daysInMonth,default:Timestamp,diffTimestamp:diffTimestamp,findWeekday:findWeekday,getDate:getDate,getDateTime:getDateTime,getDayIdentifier:getDayIdentifier,getDayOfYear:getDayOfYear,getDayTimeIdentifier:getDayTimeIdentifier,getEndOfMonth:getEndOfMonth,getEndOfWeek:getEndOfWeek,getMonthFormatter:getMonthFormatter,getMonthNames:getMonthNames,getStartOfMonth:getStartOfMonth,getStartOfWeek:getStartOfWeek,getTime:getTime,getTimeIdentifier:getTimeIdentifier,getWeekday:getWeekday,getWeekdayFormatter:getWeekdayFormatter,getWeekdayNames:getWeekdayNames,getWorkWeek:getWorkWeek,isBetweenDates:isBetweenDates,isLeapYear:isLeapYear,isOverlappingDates:isOverlappingDates,isToday:isToday,makeDate:makeDate,makeDateTime:makeDateTime,maxTimestamp:maxTimestamp,minTimestamp:minTimestamp,moveRelativeDays:moveRelativeDays,nextDay:nextDay,padNumber:padNumber,parseDate:parseDate,parseTime:parseTime,parseTimestamp:parseTimestamp,parsed:parsed,prevDay:prevDay,relativeDays:relativeDays,today:today,updateDayOfYear:updateDayOfYear,updateDisabled:updateDisabled,updateFormatted:updateFormatted,updateMinutes:updateMinutes,updateRelative:updateRelative,updateWeekday:updateWeekday,updateWorkWeek:updateWorkWeek,validateNumber:validateNumber,validateTimestamp:validateTimestamp,weeksBetween:weeksBetween});function convertToUnit(e,t="px"){if(e)return isNaN(e)?String(e):"auto"===e?e:""+Number(e)+t}function indexOf(t,a){for(let e=0;e<t.length;e++)if(!0===a(t[e],e))return e;return-1}function minCharWidth(e,t){return 0===t?e:e.slice(0,t)}var helpers={convertToUnit:convertToUnit,indexOf:indexOf,minCharWidth:minCharWidth},helpers$1=Object.freeze({__proto__:null,convertToUnit:convertToUnit,default:helpers,indexOf:indexOf,minCharWidth:minCharWidth}),Plugin={version:version,...Timestamp$1,...helpers$1};export{DAYS_IN_MONTH,DAYS_IN_MONTH_LEAP,DAYS_IN_MONTH_MAX,DAYS_IN_MONTH_MIN,DAY_MIN,FIRST_HOUR,MONTH_MAX,MONTH_MIN,PARSE_DATE,PARSE_DATETIME,PARSE_TIME,TIME_CONSTANTS,addToDate,compareDate,compareDateTime,compareTime,compareTimestamps,convertToUnit,copyTimestamp,createDayList,createIntervalList,createNativeLocaleFormatter,daysBetween,daysInMonth,Plugin as default,diffTimestamp,findWeekday,getDate,getDateTime,getDayIdentifier,getDayOfYear,getDayTimeIdentifier,getEndOfMonth,getEndOfWeek,getMonthFormatter,getMonthNames,getStartOfMonth,getStartOfWeek,getTime,getTimeIdentifier,getWeekday,getWeekdayFormatter,getWeekdayNames,getWorkWeek,indexOf,isBetweenDates,isLeapYear,isOverlappingDates,isToday,makeDate,makeDateTime,maxTimestamp,minCharWidth,minTimestamp,moveRelativeDays,nextDay,padNumber,parseDate,parseTime,parseTimestamp,parsed,prevDay,relativeDays,today,updateDayOfYear,updateDisabled,updateFormatted,updateMinutes,updateRelative,updateWeekday,updateWorkWeek,validateNumber,validateTimestamp,version,weeksBetween}; | ||
const version="4.1.1",PARSE_DATETIME=/^(\d{4})-(\d{1,2})(-(\d{1,2}))?([^\d]+(\d{1,2}))?(:(\d{1,2}))?(:(\d{1,2}))?(.(\d{1,3}))?$/,PARSE_DATE=/^(\d{4})-(\d{1,2})(-(\d{1,2}))?/,PARSE_TIME=/(\d\d?)(:(\d\d?)|)(:(\d\d?)|)/,DAYS_IN_MONTH=[0,31,28,31,30,31,30,31,31,30,31,30,31],DAYS_IN_MONTH_LEAP=[0,31,29,31,30,31,30,31,31,30,31,30,31],TIME_CONSTANTS={MILLISECONDS_IN:{SECOND:1e3,MINUTE:6e4,HOUR:36e5,DAY:864e5,WEEK:6048e5},SECONDS_IN:{MINUTE:60,HOUR:3600,DAY:86400,WEEK:604800},MINUTES_IN:{MINUTE:1,HOUR:60,DAY:1440,WEEK:10080},HOURS_IN:{DAY:24,WEEK:168},DAYS_IN:{WEEK:7}},DAYS_IN_MONTH_MIN=28,DAYS_IN_MONTH_MAX=31,MONTH_MAX=12,MONTH_MIN=1,DAY_MIN=1,FIRST_HOUR=0;function validateTimestamp(e){return"string"===typeof e&&PARSE_DATETIME.test(e)}function parsed(e){if("string"!==typeof e)return null;const t=PARSE_DATETIME.exec(e);if(!t||!t[1]||!t[2])return null;const a=parseInt(t[1],10),r=parseInt(t[2],10),n=parseInt(t[4]||"1",10),i=parseInt(t[6]||"0",10),o=parseInt(t[8]||"0",10);return{date:e,time:i.toString().padStart(2,"0")+":"+o.toString().padStart(2,"0"),year:a,month:r,day:n,hour:i,minute:o,hasDay:!!t[4],hasTime:!0,past:!1,current:!1,future:!1,disabled:!1,weekday:0,doy:0,workweek:0}}function parseDate(e,t=!1){if(!(e instanceof Date))return null;const a=t?"UTC":"";return updateFormatted({date:padNumber(e[`get${a}FullYear`](),4)+"-"+padNumber(e[`get${a}Month`]()+1,2)+"-"+padNumber(e[`get${a}Date`](),2),time:padNumber(e[`get${a}Hours`]()||0,2)+":"+padNumber(e[`get${a}Minutes`]()||0,2),year:e[`get${a}FullYear`](),month:e[`get${a}Month`]()+1,day:e[`get${a}Date`](),hour:e[`get${a}Hours`](),minute:e[`get${a}Minutes`](),weekday:0,doy:0,workweek:0,hasDay:!0,hasTime:!0,past:!1,current:!1,future:!1,disabled:!1})}function padNumber(e,t){let a=String(e);while(a.length<t)a="0"+a;return a}function isLeapYear(e){return e%4===0&&e%100!==0||e%400===0}function daysInMonth(e,t){return(isLeapYear(e)?DAYS_IN_MONTH_LEAP:DAYS_IN_MONTH)[t]}function nextDay(e){const t=new Date(e.year,e.month-1,e.day+1);return updateFormatted(normalizeTimestamp({...e,year:t.getFullYear(),month:t.getMonth()+1,day:t.getDate()}))}function prevDay(e){const t=new Date(e.year,e.month-1,e.day-1);return updateFormatted(normalizeTimestamp({...e,year:t.getFullYear(),month:t.getMonth()+1,day:t.getDate()}))}function today(){const e=new Date,t=e.getMonth()+1,a=e.getDate(),r=e.getFullYear();return[r,padNumber(t,2),padNumber(a,2)].join("-")}function isToday(e){return e===today()}function getStartOfWeek(e,t,a){let r=copyTimestamp(e);if(t){if(1===r.day||0===r.weekday)while(!t.includes(Number(r.weekday)))r=nextDay(r);r=findWeekday(r,t[0],prevDay),r=updateFormatted(r),a&&(r=updateRelative(r,a,r.hasTime))}return r}function getEndOfWeek(e,t,a){let r=copyTimestamp(e);if(t&&Array.isArray(t)){const n=daysInMonth(r.year,r.month);if(n===r.day||r.weekday===t[t.length-1])while(!t.includes(Number(r.weekday)))r=prevDay(r);r=findWeekday(r,t[t.length-1],nextDay),r=updateFormatted(r),a&&(r=updateRelative(r,a,r.hasTime))}return r}function getStartOfMonth(e){let t=copyTimestamp(e);return t.day=DAY_MIN,t=updateFormatted(t),t}function getEndOfMonth(e){let t=copyTimestamp(e);return t.day=daysInMonth(t.year,t.month),t=updateFormatted(t),t}function parseTime(e){const t=Object.prototype.toString.call(e);switch(t){case"[object Number]":return e;case"[object String]":{const a=PARSE_TIME.exec(e);return a?60*parseInt(a[1],10)+parseInt(a[3]||"0",10):!1}case"[object Object]":return"object"!==typeof e||"number"!==typeof e.hour||"number"!==typeof e.minute?!1:"object"===typeof e&&"hour"in e&&"minute"in e&&60*e.hour+e.minute}return!1}function compareTimestamps(e,t){return!(!e||!t)&&e.year===t.year&&e.month===t.month&&e.day===t.day&&e.hour===t.hour&&e.minute===t.minute}function compareDate(e,t){return getDate(e)===getDate(t)}function compareTime(e,t){return getTime(e)===getTime(t)}function compareDateTime(e,t){return getDateTime(e)===getDateTime(t)}function parseTimestamp(e,t=null){let a=parsed(e);return a?(a=updateFormatted(a),t&&(a=updateRelative(a,t,a.hasTime)),a):null}function getDayIdentifier(e){return 1e8*(e.year??0)+1e6*(e.month??0)+1e4*(e.day??0)}function getTimeIdentifier(e){return 100*(e.hour??0)+(e.minute??0)}function getDayTimeIdentifier(e){return getDayIdentifier(e)+getTimeIdentifier(e)}function diffTimestamp(e,t,a=!1){const r=Date.UTC(e.year??0,(e.month??1)-1,e.day??1,e.hour??0,e.minute??0),n=Date.UTC(t.year??0,(t.month??1)-1,t.day??1,t.hour??0,t.minute??0);return!0===a&&n<r?0:n-r}function updateRelative(e,t,a=!1){let r=copyTimestamp(e),n=getDayIdentifier(t),i=getDayIdentifier(r),o=n===i;return r.hasTime&&a&&o&&(n=getTimeIdentifier(t),i=getTimeIdentifier(r),o=n===i),r.past=i<n,r.current=o,r.future=i>n,r.currentWeekday=r.weekday===t.weekday,r}function updateMinutes(e,t,a=null){let r=copyTimestamp(e);return r.hasTime=!0,r.hour=Math.floor(t/TIME_CONSTANTS.MINUTES_IN.HOUR),r.minute=t%TIME_CONSTANTS.MINUTES_IN.HOUR,r.time=getTime(r),a&&(r=updateRelative(r,a,!0)),r}function updateWeekday(e){let t=copyTimestamp(e);return t.weekday=getWeekday(t),t}function updateDayOfYear(e){let t=copyTimestamp(e);return t.doy=getDayOfYear(t)||0,t}function updateWorkWeek(e){let t=copyTimestamp(e);return t.workweek=getWorkWeek(t),t}function updateDisabled(e,t,a,r,n){let i=copyTimestamp(e);const o=getDayIdentifier(i);if(void 0!==t){const u=parsed(t);if(u){const T=getDayIdentifier(u);o<=T&&(i.disabled=!0)}}if(!0!==i.disabled&&void 0!==a){const y=parsed(a);if(y){const p=getDayIdentifier(y);o>=p&&(i.disabled=!0)}}if(!0!==i.disabled&&Array.isArray(r)&&r.length>0)for(var m in r)if(r[m]===i.weekday){i.disabled=!0;break}if(!0!==i.disabled&&Array.isArray(n)&&n.length>0)for(var d in n)if(Array.isArray(n[d])&&2===n[d].length&&n[d][0]&&n[d][1]){const D=parsed(n[d][0]),f=parsed(n[d][1]);if(D&&f&&isBetweenDates(i,D,f)){i.disabled=!0;break}}else{const c=n[d];if(Array.isArray(c))for(var s of c){const g=parseTimestamp(s);if(g){const l=getDayIdentifier(g);if(l===o){i.disabled=!0;break}}}else if(c){const N=parseTimestamp(c);if(N){const I=getDayIdentifier(N);I===o&&(i.disabled=!0)}}}return i}function updateFormatted(e){let t=copyTimestamp(e);return t.hasTime=!0,t.time=getTime(t),t.date=getDate(t),t.weekday=getWeekday(t),t.doy=getDayOfYear(t)||0,t.workweek=getWorkWeek(t),t}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){let t=copyTimestamp(e);if(0===t.year){const n=parseTimestamp(today());n&&(t=n)}const a=new Date(Date.UTC(t.year,t.month-1,t.day)),r=4;a.setUTCDate(a.getUTCDate()-(a.getUTCDay()+6)%7+r),a.setUTCDate(a.getUTCDate()+r-(a.getUTCDay()||7));e=new Date(Date.UTC(a.getUTCFullYear(),0,1)),e=Math.ceil(((a.valueOf()-e.valueOf())/864e5+1)/7);return e}function getWeekday(e){let t=e.weekday;if(e.hasDay){const a=Math.floor,r=e.day,n=(e.month+9)%MONTH_MAX+1,i=a(e.year/100),o=e.year%100-(e.month<=2?1:0);t=((r+a(2.6*n-.2)-2*i+o+a(o/4)+a(i/4))%7+7)%7}return t??0}function copyTimestamp(e){return{...e}}function getDate(e){let 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):"00:00")}function moveRelativeDays(e,t=nextDay,a=1,r=[0,1,2,3,4,5,6]){const n=copyTimestamp(e);return relativeDays(n,t,a,r)}function relativeDays(e,t=nextDay,a=1,r=[0,1,2,3,4,5,6]){let n=copyTimestamp(e);r.includes(Number(n.weekday))||0!==n.weekday||t!==nextDay||++a;while(--a>=0)n=t(n),r.length<7&&!r.includes(Number(n.weekday))&&++a;return n}function findWeekday(e,t,a=nextDay,r=6){let n=copyTimestamp(e);while(n.weekday!==t&&--r>=0)n=a(n);return n}function createDayList(e,t,a,r=[0,1,2,3,4,5,6],n=void 0,i=void 0,o=[],m=[],d=42,s=0){const u=getDayIdentifier(e),T=getDayIdentifier(t),y=[];let p=copyTimestamp(e),D=0,f=D===T;if(!(T<u))while((!f||y.length<s)&&y.length<d){if(D=getDayIdentifier(p),f=f||D>T&&y.length>=s,f)break;if(r.includes(Number(p.weekday))){let e=copyTimestamp(p);e=updateFormatted(e),e=updateRelative(e,a),e=updateDisabled(e,n,i,o,m),y.push(e)}p=relativeDays(p,nextDay)}return y}function createIntervalList(t,a,r,n,i){const o=[];for(let e=0;e<n;++e){const m=(a+e)*r,d=copyTimestamp(t);o.push(updateMinutes(d,m,i))}return o}function createNativeLocaleFormatter(r,n){const e=()=>"";return"undefined"===typeof Intl||"undefined"===typeof Intl.DateTimeFormat?e:(t,e)=>{try{const a=new Intl.DateTimeFormat(r||void 0,n(t,e));return a.format(makeDateTime(t))}catch(e){return console.error(`Intl.DateTimeFormat: ${e.message} -> `+getDateTime(t)),""}}}function makeDate(e,t=!0){return t?new Date(Date.UTC(e.year,e.month-1,e.day,0,0)):new Date(e.year,e.month-1,e.day,0,0)}function makeDateTime(e,t=!0){return t?new Date(Date.UTC(e.year,e.month-1,e.day,e.hour,e.minute)):new Date(e.year,e.month-1,e.day,e.hour,e.minute)}function validateNumber(e){return isFinite(Number(e))}function maxTimestamp(e,t=!1){const a=!0===t?getDayTimeIdentifier:getDayIdentifier;return e.reduce((e,t)=>{return Math.max(a(e),a(t))===a(e)?e:t})}function minTimestamp(e,t=!1){const a=!0===t?getDayTimeIdentifier:getDayIdentifier;return e.reduce((e,t)=>{return Math.min(a(e),a(t))===a(e)?e:t})}function isBetweenDates(e,t,a,r=!1){const n=getDayIdentifier(e)+(!0===r?getTimeIdentifier(e):0),i=getDayIdentifier(t)+(!0===r?getTimeIdentifier(t):0),o=getDayIdentifier(a)+(!0===r?getTimeIdentifier(a):0);return n>=i&&n<=o}function isOverlappingDates(e,t,a,r){const n=getDayIdentifier(e),i=getDayIdentifier(t),o=getDayIdentifier(a),m=getDayIdentifier(r);return n>=o&&n<=m||i>=o&&i<=m||o>=n&&i>=m}function addToDate(e,t){const a=copyTimestamp(e);return t.year&&(a.year+=t.year),t.month&&(a.month+=t.month),t.day&&(a.day+=t.day),t.hour&&(a.hour+=t.hour),t.minute&&(a.minute+=t.minute),updateFormatted(normalizeTimestamp(a))}function normalizeTimestamp(e){const t=new Date(e.year,e.month-1,e.day,e.hour,e.minute);return{...e,year:t.getFullYear(),month:t.getMonth()+1,day:t.getDate(),hour:t.getHours(),minute:t.getMinutes()}}function daysBetween(e,t){const a=diffTimestamp(e,t,!0);return Math.floor(a/TIME_CONSTANTS.MILLISECONDS_IN.DAY)}function weeksBetween(e,t){let a=copyTimestamp(e),r=copyTimestamp(t);return a=findWeekday(a,0),r=findWeekday(r,6),Math.ceil(daysBetween(a,r)/TIME_CONSTANTS.DAYS_IN.WEEK)}const weekdayDateMap={Sun:new Date("2020-01-05T00:00:00.000Z"),Mon:new Date("2020-01-06T00:00:00.000Z"),Tue:new Date("2020-01-07T00:00:00.000Z"),Wed:new Date("2020-01-08T00:00:00.000Z"),Thu:new Date("2020-01-09T00:00:00.000Z"),Fri:new Date("2020-01-10T00:00:00.000Z"),Sat:new Date("2020-01-11T00:00:00.000Z")};function getWeekdayFormatter(){const e=()=>"",n={long:{timeZone:"UTC",weekday:"long"},short:{timeZone:"UTC",weekday:"short"},narrow:{timeZone:"UTC",weekday:"narrow"}};return"undefined"===typeof Intl||"undefined"===typeof Intl.DateTimeFormat?e:t;function t(t,e,a){try{const r=new Intl.DateTimeFormat(a||void 0,n[e]||n["long"]);return r.format(weekdayDateMap[t])}catch(e){return e instanceof Error&&console.error(`Intl.DateTimeFormat: ${e.message} -> day of week: `+t),""}}}function getWeekdayNames(t,a){const e=Object.keys(weekdayDateMap),r=getWeekdayFormatter();return e.map(e=>String(r(e,t,a)))}function getMonthFormatter(){const e=()=>"",i={long:{timeZone:"UTC",month:"long"},short:{timeZone:"UTC",month:"short"},narrow:{timeZone:"UTC",month:"narrow"}};return"undefined"===typeof Intl||"undefined"===typeof Intl.DateTimeFormat?e:t;function t(t,e,a){try{const r=new Intl.DateTimeFormat(a||void 0,i[e]||i["long"]),n=new Date;return n.setDate(1),n.setMonth(t),r.format(n)}catch(e){return e instanceof Error&&console.error(`Intl.DateTimeFormat: ${e.message} -> month: `+t),""}}}function getMonthNames(t,a){const r=getMonthFormatter();return[...Array(12).keys()].map(e=>r(e,t,a))}var Timestamp={PARSE_DATETIME:PARSE_DATETIME,PARSE_DATE:PARSE_DATE,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,TIME_CONSTANTS:TIME_CONSTANTS,FIRST_HOUR:FIRST_HOUR,today:today,getStartOfWeek:getStartOfWeek,getEndOfWeek:getEndOfWeek,getStartOfMonth:getStartOfMonth,getEndOfMonth:getEndOfMonth,parseTime:parseTime,validateTimestamp:validateTimestamp,parsed:parsed,parseTimestamp:parseTimestamp,parseDate:parseDate,getDayIdentifier:getDayIdentifier,getTimeIdentifier:getTimeIdentifier,getDayTimeIdentifier:getDayTimeIdentifier,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,createDayList:createDayList,createIntervalList:createIntervalList,createNativeLocaleFormatter:createNativeLocaleFormatter,makeDate:makeDate,makeDateTime:makeDateTime,validateNumber:validateNumber,isBetweenDates:isBetweenDates,isOverlappingDates:isOverlappingDates,daysBetween:daysBetween,weeksBetween:weeksBetween,addToDate:addToDate,compareTimestamps:compareTimestamps,compareDate:compareDate,compareTime:compareTime,compareDateTime:compareDateTime,getWeekdayFormatter:getWeekdayFormatter,getWeekdayNames:getWeekdayNames,getMonthFormatter:getMonthFormatter,getMonthNames:getMonthNames},Timestamp$1=Object.freeze({__proto__:null,DAYS_IN_MONTH:DAYS_IN_MONTH,DAYS_IN_MONTH_LEAP:DAYS_IN_MONTH_LEAP,DAYS_IN_MONTH_MAX:DAYS_IN_MONTH_MAX,DAYS_IN_MONTH_MIN:DAYS_IN_MONTH_MIN,DAY_MIN:DAY_MIN,FIRST_HOUR:FIRST_HOUR,MONTH_MAX:MONTH_MAX,MONTH_MIN:MONTH_MIN,PARSE_DATE:PARSE_DATE,PARSE_DATETIME:PARSE_DATETIME,PARSE_TIME:PARSE_TIME,TIME_CONSTANTS:TIME_CONSTANTS,addToDate:addToDate,compareDate:compareDate,compareDateTime:compareDateTime,compareTime:compareTime,compareTimestamps:compareTimestamps,copyTimestamp:copyTimestamp,createDayList:createDayList,createIntervalList:createIntervalList,createNativeLocaleFormatter:createNativeLocaleFormatter,daysBetween:daysBetween,daysInMonth:daysInMonth,default:Timestamp,diffTimestamp:diffTimestamp,findWeekday:findWeekday,getDate:getDate,getDateTime:getDateTime,getDayIdentifier:getDayIdentifier,getDayOfYear:getDayOfYear,getDayTimeIdentifier:getDayTimeIdentifier,getEndOfMonth:getEndOfMonth,getEndOfWeek:getEndOfWeek,getMonthFormatter:getMonthFormatter,getMonthNames:getMonthNames,getStartOfMonth:getStartOfMonth,getStartOfWeek:getStartOfWeek,getTime:getTime,getTimeIdentifier:getTimeIdentifier,getWeekday:getWeekday,getWeekdayFormatter:getWeekdayFormatter,getWeekdayNames:getWeekdayNames,getWorkWeek:getWorkWeek,isBetweenDates:isBetweenDates,isLeapYear:isLeapYear,isOverlappingDates:isOverlappingDates,isToday:isToday,makeDate:makeDate,makeDateTime:makeDateTime,maxTimestamp:maxTimestamp,minTimestamp:minTimestamp,moveRelativeDays:moveRelativeDays,nextDay:nextDay,padNumber:padNumber,parseDate:parseDate,parseTime:parseTime,parseTimestamp:parseTimestamp,parsed:parsed,prevDay:prevDay,relativeDays:relativeDays,today:today,updateDayOfYear:updateDayOfYear,updateDisabled:updateDisabled,updateFormatted:updateFormatted,updateMinutes:updateMinutes,updateRelative:updateRelative,updateWeekday:updateWeekday,updateWorkWeek:updateWorkWeek,validateNumber:validateNumber,validateTimestamp:validateTimestamp,weeksBetween:weeksBetween});function convertToUnit(e,t="px"){if(e)return isNaN(e)?String(e):"auto"===e?e:""+Number(e)+t}function indexOf(t,a){for(let e=0;e<t.length;e++)if(!0===a(t[e],e))return e;return-1}function minCharWidth(e,t){return 0===t?e:e.slice(0,t)}var helpers={convertToUnit:convertToUnit,indexOf:indexOf,minCharWidth:minCharWidth},helpers$1=Object.freeze({__proto__:null,convertToUnit:convertToUnit,default:helpers,indexOf:indexOf,minCharWidth:minCharWidth}),Plugin={version:version,...Timestamp$1,...helpers$1};export{DAYS_IN_MONTH,DAYS_IN_MONTH_LEAP,DAYS_IN_MONTH_MAX,DAYS_IN_MONTH_MIN,DAY_MIN,FIRST_HOUR,MONTH_MAX,MONTH_MIN,PARSE_DATE,PARSE_DATETIME,PARSE_TIME,TIME_CONSTANTS,addToDate,compareDate,compareDateTime,compareTime,compareTimestamps,convertToUnit,copyTimestamp,createDayList,createIntervalList,createNativeLocaleFormatter,daysBetween,daysInMonth,Plugin as default,diffTimestamp,findWeekday,getDate,getDateTime,getDayIdentifier,getDayOfYear,getDayTimeIdentifier,getEndOfMonth,getEndOfWeek,getMonthFormatter,getMonthNames,getStartOfMonth,getStartOfWeek,getTime,getTimeIdentifier,getWeekday,getWeekdayFormatter,getWeekdayNames,getWorkWeek,indexOf,isBetweenDates,isLeapYear,isOverlappingDates,isToday,makeDate,makeDateTime,maxTimestamp,minCharWidth,minTimestamp,moveRelativeDays,nextDay,padNumber,parseDate,parseTime,parseTimestamp,parsed,prevDay,relativeDays,today,updateDayOfYear,updateDisabled,updateFormatted,updateMinutes,updateRelative,updateWeekday,updateWorkWeek,validateNumber,validateTimestamp,version,weeksBetween}; |
/*! | ||
* @quasar/quasar-ui-qcalendar v4.1.0 | ||
* @quasar/quasar-ui-qcalendar v4.1.1 | ||
* (c) 2025 Jeff Galbraith <jeff@quasar.dev> | ||
@@ -13,3 +13,3 @@ * Released under the MIT License. | ||
const version = '4.1.0'; | ||
const version = '4.1.1'; | ||
@@ -16,0 +16,0 @@ const PARSE_DATETIME = /^(\d{4})-(\d{1,2})(-(\d{1,2}))?([^\d]+(\d{1,2}))?(:(\d{1,2}))?(:(\d{1,2}))?(.(\d{1,3}))?$/; |
/*! | ||
* @quasar/quasar-ui-qcalendar v4.1.0 | ||
* @quasar/quasar-ui-qcalendar v4.1.1 | ||
* (c) 2025 Jeff Galbraith <jeff@quasar.dev> | ||
* Released under the MIT License. | ||
*/ | ||
(function(e,t){"object"===typeof exports&&"undefined"!==typeof module?module.exports=t():"function"===typeof define&&define.amd?define(t):(e="undefined"!==typeof globalThis?globalThis:e||self,e.Timestamp=t())})(this,function(){const e="4.1.0",u=/^(\d{4})-(\d{1,2})(-(\d{1,2}))?([^\d]+(\d{1,2}))?(:(\d{1,2}))?(:(\d{1,2}))?(.(\d{1,3}))?$/,t=/^(\d{4})-(\d{1,2})(-(\d{1,2}))?/,r=/(\d\d?)(:(\d\d?)|)(:(\d\d?)|)/,n=[0,31,28,31,30,31,30,31,31,30,31,30,31],a=[0,31,29,31,30,31,30,31,31,30,31,30,31],o={MILLISECONDS_IN:{SECOND:1e3,MINUTE:6e4,HOUR:36e5,DAY:864e5,WEEK:6048e5},SECONDS_IN:{MINUTE:60,HOUR:3600,DAY:86400,WEEK:604800},MINUTES_IN:{MINUTE:1,HOUR:60,DAY:1440,WEEK:10080},HOURS_IN:{DAY:24,WEEK:168},DAYS_IN:{WEEK:7}},R=28,L=31,d=12,$=1,i=1,Z=0;function j(e){return"string"===typeof e&&u.test(e)}function w(e){if("string"!==typeof e)return null;const t=u.exec(e);if(!t||!t[1]||!t[2])return null;const n=parseInt(t[1],10),r=parseInt(t[2],10),a=parseInt(t[4]||"1",10),o=parseInt(t[6]||"0",10),i=parseInt(t[8]||"0",10);return{date:e,time:o.toString().padStart(2,"0")+":"+i.toString().padStart(2,"0"),year:n,month:r,day:a,hour:o,minute:i,hasDay:!!t[4],hasTime:!0,past:!1,current:!1,future:!1,disabled:!1,weekday:0,doy:0,workweek:0}}function x(e,t=!1){if(!(e instanceof Date))return null;const n=t?"UTC":"";return k({date:s(e[`get${n}FullYear`](),4)+"-"+s(e[`get${n}Month`]()+1,2)+"-"+s(e[`get${n}Date`](),2),time:s(e[`get${n}Hours`]()||0,2)+":"+s(e[`get${n}Minutes`]()||0,2),year:e[`get${n}FullYear`](),month:e[`get${n}Month`]()+1,day:e[`get${n}Date`](),hour:e[`get${n}Hours`](),minute:e[`get${n}Minutes`](),weekday:0,doy:0,workweek:0,hasDay:!0,hasTime:!0,past:!1,current:!1,future:!1,disabled:!1})}function s(e,t){let n=String(e);while(n.length<t)n="0"+n;return n}function m(e){return e%4===0&&e%100!==0||e%400===0}function c(e,t){return(m(e)?a:n)[t]}function T(e){const t=new Date(e.year,e.month-1,e.day+1);return k(F({...e,year:t.getFullYear(),month:t.getMonth()+1,day:t.getDate()}))}function f(e){const t=new Date(e.year,e.month-1,e.day-1);return k(F({...e,year:t.getFullYear(),month:t.getMonth()+1,day:t.getDate()}))}function y(){const e=new Date,t=e.getMonth()+1,n=e.getDate(),r=e.getFullYear();return[r,s(t,2),s(n,2)].join("-")}function P(e){return e===y()}function B(e,t,n){let r=A(e);if(t){if(1===r.day||0===r.weekday)while(!t.includes(Number(r.weekday)))r=T(r);r=W(r,t[0],f),r=k(r),n&&(r=g(r,n,r.hasTime))}return r}function K(e,t,n){let r=A(e);if(t&&Array.isArray(t)){const a=c(r.year,r.month);if(a===r.day||r.weekday===t[t.length-1])while(!t.includes(Number(r.weekday)))r=f(r);r=W(r,t[t.length-1],T),r=k(r),n&&(r=g(r,n,r.hasTime))}return r}function X(e){let t=A(e);return t.day=i,t=k(t),t}function z(e){let t=A(e);return t.day=c(t.year,t.month),t=k(t),t}function q(e){const t=Object.prototype.toString.call(e);switch(t){case"[object Number]":return e;case"[object String]":{const n=r.exec(e);return n?60*parseInt(n[1],10)+parseInt(n[3]||"0",10):!1}case"[object Object]":return"object"!==typeof e||"number"!==typeof e.hour||"number"!==typeof e.minute?!1:"object"===typeof e&&"hour"in e&&"minute"in e&&60*e.hour+e.minute}return!1}function G(e,t){return!(!e||!t)&&e.year===t.year&&e.month===t.month&&e.day===t.day&&e.hour===t.hour&&e.minute===t.minute}function J(e,t){return E(e)===E(t)}function Q(e,t){return b(e)===b(t)}function V(e,t){return U(e)===U(t)}function N(e,t=null){let n=w(e);return n?(n=k(n),t&&(n=g(n,t,n.hasTime)),n):null}function M(e){return 1e8*(e.year??0)+1e6*(e.month??0)+1e4*(e.day??0)}function l(e){return 100*(e.hour??0)+(e.minute??0)}function h(e){return M(e)+l(e)}function D(e,t,n=!1){const r=Date.UTC(e.year??0,(e.month??1)-1,e.day??1,e.hour??0,e.minute??0),a=Date.UTC(t.year??0,(t.month??1)-1,t.day??1,t.hour??0,t.minute??0);return!0===n&&a<r?0:a-r}function g(e,t,n=!1){let r=A(e),a=M(t),o=M(r),i=a===o;return r.hasTime&&n&&i&&(a=l(t),o=l(r),i=a===o),r.past=o<a,r.current=i,r.future=o>a,r.currentWeekday=r.weekday===t.weekday,r}function p(e,t,n=null){let r=A(e);return r.hasTime=!0,r.hour=Math.floor(t/o.MINUTES_IN.HOUR),r.minute=t%o.MINUTES_IN.HOUR,r.time=b(r),n&&(r=g(r,n,!0)),r}function ee(e){let t=A(e);return t.weekday=S(t),t}function te(e){let t=A(e);return t.doy=_(t)||0,t}function ne(e){let t=A(e);return t.workweek=O(t),t}function I(e,t,n,r,a){let o=A(e);const i=M(o);if(void 0!==t){const m=w(t);if(m){const c=M(m);i<=c&&(o.disabled=!0)}}if(!0!==o.disabled&&void 0!==n){const f=w(n);if(f){const y=M(f);i>=y&&(o.disabled=!0)}}if(!0!==o.disabled&&Array.isArray(r)&&r.length>0)for(var u in r)if(r[u]===o.weekday){o.disabled=!0;break}if(!0!==o.disabled&&Array.isArray(a)&&a.length>0)for(var d in a)if(Array.isArray(a[d])&&2===a[d].length&&a[d][0]&&a[d][1]){const l=w(a[d][0]),h=w(a[d][1]);if(l&&h&&Y(o,l,h)){o.disabled=!0;break}}else{const T=a[d];if(Array.isArray(T))for(var s of T){const D=N(s);if(D){const g=M(D);if(g===i){o.disabled=!0;break}}}else if(T){const p=N(T);if(p){const I=M(p);I===i&&(o.disabled=!0)}}}return o}function k(e){let t=A(e);return t.hasTime=!0,t.time=b(t),t.date=E(t),t.weekday=S(t),t.doy=_(t)||0,t.workweek=O(t),t}function _(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 O(e){let t=A(e);if(0===t.year){const a=N(y());a&&(t=a)}const n=new Date(Date.UTC(t.year,t.month-1,t.day)),r=4;n.setUTCDate(n.getUTCDate()-(n.getUTCDay()+6)%7+r),n.setUTCDate(n.getUTCDate()+r-(n.getUTCDay()||7));e=new Date(Date.UTC(n.getUTCFullYear(),0,1)),e=Math.ceil(((n.valueOf()-e.valueOf())/864e5+1)/7);return e}function S(e){let t=e.weekday;if(e.hasDay){const n=Math.floor,r=e.day,a=(e.month+9)%d+1,o=n(e.year/100),i=e.year%100-(e.month<=2?1:0);t=((r+n(2.6*a-.2)-2*o+i+n(i/4)+n(o/4))%7+7)%7}return t??0}function A(e){return{...e}}function E(e){let t=s(e.year,4)+"-"+s(e.month,2);return e.hasDay&&(t+="-"+s(e.day,2)),t}function b(e){return e.hasTime?s(e.hour,2)+":"+s(e.minute,2):""}function U(e){return E(e)+" "+(e.hasTime?b(e):"00:00")}function re(e,t=T,n=1,r=[0,1,2,3,4,5,6]){const a=A(e);return v(a,t,n,r)}function v(e,t=T,n=1,r=[0,1,2,3,4,5,6]){let a=A(e);r.includes(Number(a.weekday))||0!==a.weekday||t!==T||++n;while(--n>=0)a=t(a),r.length<7&&!r.includes(Number(a.weekday))&&++n;return a}function W(e,t,n=T,r=6){let a=A(e);while(a.weekday!==t&&--r>=0)a=n(a);return a}function ae(e,t,n,r=[0,1,2,3,4,5,6],a=void 0,o=void 0,i=[],u=[],d=42,s=0){const m=M(e),c=M(t),f=[];let y=A(e),l=0,h=l===c;if(!(c<m))while((!h||f.length<s)&&f.length<d){if(l=M(y),h=h||l>c&&f.length>=s,h)break;if(r.includes(Number(y.weekday))){let e=A(y);e=k(e),e=g(e,n),e=I(e,a,o,i,u),f.push(e)}y=v(y,T)}return f}function oe(t,n,r,a,o){const i=[];for(let e=0;e<a;++e){const u=(n+e)*r,d=A(t);i.push(p(d,u,o))}return i}function ie(r,a){const e=()=>"";return"undefined"===typeof Intl||"undefined"===typeof Intl.DateTimeFormat?e:(t,e)=>{try{const n=new Intl.DateTimeFormat(r||void 0,a(t,e));return n.format(C(t))}catch(e){return console.error(`Intl.DateTimeFormat: ${e.message} -> `+U(t)),""}}}function ue(e,t=!0){return t?new Date(Date.UTC(e.year,e.month-1,e.day,0,0)):new Date(e.year,e.month-1,e.day,0,0)}function C(e,t=!0){return t?new Date(Date.UTC(e.year,e.month-1,e.day,e.hour,e.minute)):new Date(e.year,e.month-1,e.day,e.hour,e.minute)}function de(e){return isFinite(Number(e))}function se(e,t=!1){const n=!0===t?h:M;return e.reduce((e,t)=>{return Math.max(n(e),n(t))===n(e)?e:t})}function me(e,t=!1){const n=!0===t?h:M;return e.reduce((e,t)=>{return Math.min(n(e),n(t))===n(e)?e:t})}function Y(e,t,n,r=!1){const a=M(e)+(!0===r?l(e):0),o=M(t)+(!0===r?l(t):0),i=M(n)+(!0===r?l(n):0);return a>=o&&a<=i}function ce(e,t,n,r){const a=M(e),o=M(t),i=M(n),u=M(r);return a>=i&&a<=u||o>=i&&o<=u||i>=a&&o>=u}function fe(e,t){const n=A(e);return t.year&&(n.year+=t.year),t.month&&(n.month+=t.month),t.day&&(n.day+=t.day),t.hour&&(n.hour+=t.hour),t.minute&&(n.minute+=t.minute),k(F(n))}function F(e){const t=new Date(e.year,e.month-1,e.day,e.hour,e.minute);return{...e,year:t.getFullYear(),month:t.getMonth()+1,day:t.getDate(),hour:t.getHours(),minute:t.getMinutes()}}function H(e,t){const n=D(e,t,!0);return Math.floor(n/o.MILLISECONDS_IN.DAY)}function ye(e,t){let n=A(e),r=A(t);return n=W(n,0),r=W(r,6),Math.ceil(H(n,r)/o.DAYS_IN.WEEK)}const le={Sun:new Date("2020-01-05T00:00:00.000Z"),Mon:new Date("2020-01-06T00:00:00.000Z"),Tue:new Date("2020-01-07T00:00:00.000Z"),Wed:new Date("2020-01-08T00:00:00.000Z"),Thu:new Date("2020-01-09T00:00:00.000Z"),Fri:new Date("2020-01-10T00:00:00.000Z"),Sat:new Date("2020-01-11T00:00:00.000Z")};function he(){const e=()=>"",a={long:{timeZone:"UTC",weekday:"long"},short:{timeZone:"UTC",weekday:"short"},narrow:{timeZone:"UTC",weekday:"narrow"}};return"undefined"===typeof Intl||"undefined"===typeof Intl.DateTimeFormat?e:t;function t(t,e,n){try{const r=new Intl.DateTimeFormat(n||void 0,a[e]||a["long"]);return r.format(le[t])}catch(e){return e instanceof Error&&console.error(`Intl.DateTimeFormat: ${e.message} -> day of week: `+t),""}}}function Te(t,n){const e=Object.keys(le),r=he();return e.map(e=>String(r(e,t,n)))}function De(){const e=()=>"",o={long:{timeZone:"UTC",month:"long"},short:{timeZone:"UTC",month:"short"},narrow:{timeZone:"UTC",month:"narrow"}};return"undefined"===typeof Intl||"undefined"===typeof Intl.DateTimeFormat?e:t;function t(t,e,n){try{const r=new Intl.DateTimeFormat(n||void 0,o[e]||o["long"]),a=new Date;return a.setDate(1),a.setMonth(t),r.format(a)}catch(e){return e instanceof Error&&console.error(`Intl.DateTimeFormat: ${e.message} -> month: `+t),""}}}function ge(t,n){const r=De();return[...Array(12).keys()].map(e=>r(e,t,n))}var pe={PARSE_DATETIME:u,PARSE_DATE:t,PARSE_TIME:r,DAYS_IN_MONTH:n,DAYS_IN_MONTH_LEAP:a,DAYS_IN_MONTH_MIN:R,DAYS_IN_MONTH_MAX:L,MONTH_MAX:d,MONTH_MIN:$,DAY_MIN:i,TIME_CONSTANTS:o,FIRST_HOUR:Z,today:y,getStartOfWeek:B,getEndOfWeek:K,getStartOfMonth:X,getEndOfMonth:z,parseTime:q,validateTimestamp:j,parsed:w,parseTimestamp:N,parseDate:x,getDayIdentifier:M,getTimeIdentifier:l,getDayTimeIdentifier:h,diffTimestamp:D,updateRelative:g,updateMinutes:p,updateWeekday:ee,updateDayOfYear:te,updateWorkWeek:ne,updateDisabled:I,updateFormatted:k,getDayOfYear:_,getWorkWeek:O,getWeekday:S,isLeapYear:m,daysInMonth:c,copyTimestamp:A,padNumber:s,getDate:E,getTime:b,getDateTime:U,nextDay:T,prevDay:f,relativeDays:v,findWeekday:W,createDayList:ae,createIntervalList:oe,createNativeLocaleFormatter:ie,makeDate:ue,makeDateTime:C,validateNumber:de,isBetweenDates:Y,isOverlappingDates:ce,daysBetween:H,weeksBetween:ye,addToDate:fe,compareTimestamps:G,compareDate:J,compareTime:Q,compareDateTime:V,getWeekdayFormatter:he,getWeekdayNames:Te,getMonthFormatter:De,getMonthNames:ge},pe=Object.freeze({__proto__:null,DAYS_IN_MONTH:n,DAYS_IN_MONTH_LEAP:a,DAYS_IN_MONTH_MAX:L,DAYS_IN_MONTH_MIN:R,DAY_MIN:i,FIRST_HOUR:Z,MONTH_MAX:d,MONTH_MIN:$,PARSE_DATE:t,PARSE_DATETIME:u,PARSE_TIME:r,TIME_CONSTANTS:o,addToDate:fe,compareDate:J,compareDateTime:V,compareTime:Q,compareTimestamps:G,copyTimestamp:A,createDayList:ae,createIntervalList:oe,createNativeLocaleFormatter:ie,daysBetween:H,daysInMonth:c,default:pe,diffTimestamp:D,findWeekday:W,getDate:E,getDateTime:U,getDayIdentifier:M,getDayOfYear:_,getDayTimeIdentifier:h,getEndOfMonth:z,getEndOfWeek:K,getMonthFormatter:De,getMonthNames:ge,getStartOfMonth:X,getStartOfWeek:B,getTime:b,getTimeIdentifier:l,getWeekday:S,getWeekdayFormatter:he,getWeekdayNames:Te,getWorkWeek:O,isBetweenDates:Y,isLeapYear:m,isOverlappingDates:ce,isToday:P,makeDate:ue,makeDateTime:C,maxTimestamp:se,minTimestamp:me,moveRelativeDays:re,nextDay:T,padNumber:s,parseDate:x,parseTime:q,parseTimestamp:N,parsed:w,prevDay:f,relativeDays:v,today:y,updateDayOfYear:te,updateDisabled:I,updateFormatted:k,updateMinutes:p,updateRelative:g,updateWeekday:ee,updateWorkWeek:ne,validateNumber:de,validateTimestamp:j,weeksBetween:ye});function Ie(e,t="px"){if(e)return isNaN(e)?String(e):"auto"===e?e:""+Number(e)+t}function we(t,n){for(let e=0;e<t.length;e++)if(!0===n(t[e],e))return e;return-1}function Ne(e,t){return 0===t?e:e.slice(0,t)}var Me={convertToUnit:Ie,indexOf:we,minCharWidth:Ne},Me=Object.freeze({__proto__:null,convertToUnit:Ie,default:Me,indexOf:we,minCharWidth:Ne}),pe={version:e,...pe,...Me};return pe}); | ||
(function(e,t){"object"===typeof exports&&"undefined"!==typeof module?module.exports=t():"function"===typeof define&&define.amd?define(t):(e="undefined"!==typeof globalThis?globalThis:e||self,e.Timestamp=t())})(this,function(){const e="4.1.1",u=/^(\d{4})-(\d{1,2})(-(\d{1,2}))?([^\d]+(\d{1,2}))?(:(\d{1,2}))?(:(\d{1,2}))?(.(\d{1,3}))?$/,t=/^(\d{4})-(\d{1,2})(-(\d{1,2}))?/,r=/(\d\d?)(:(\d\d?)|)(:(\d\d?)|)/,n=[0,31,28,31,30,31,30,31,31,30,31,30,31],a=[0,31,29,31,30,31,30,31,31,30,31,30,31],o={MILLISECONDS_IN:{SECOND:1e3,MINUTE:6e4,HOUR:36e5,DAY:864e5,WEEK:6048e5},SECONDS_IN:{MINUTE:60,HOUR:3600,DAY:86400,WEEK:604800},MINUTES_IN:{MINUTE:1,HOUR:60,DAY:1440,WEEK:10080},HOURS_IN:{DAY:24,WEEK:168},DAYS_IN:{WEEK:7}},R=28,L=31,d=12,$=1,i=1,Z=0;function j(e){return"string"===typeof e&&u.test(e)}function w(e){if("string"!==typeof e)return null;const t=u.exec(e);if(!t||!t[1]||!t[2])return null;const n=parseInt(t[1],10),r=parseInt(t[2],10),a=parseInt(t[4]||"1",10),o=parseInt(t[6]||"0",10),i=parseInt(t[8]||"0",10);return{date:e,time:o.toString().padStart(2,"0")+":"+i.toString().padStart(2,"0"),year:n,month:r,day:a,hour:o,minute:i,hasDay:!!t[4],hasTime:!0,past:!1,current:!1,future:!1,disabled:!1,weekday:0,doy:0,workweek:0}}function x(e,t=!1){if(!(e instanceof Date))return null;const n=t?"UTC":"";return k({date:s(e[`get${n}FullYear`](),4)+"-"+s(e[`get${n}Month`]()+1,2)+"-"+s(e[`get${n}Date`](),2),time:s(e[`get${n}Hours`]()||0,2)+":"+s(e[`get${n}Minutes`]()||0,2),year:e[`get${n}FullYear`](),month:e[`get${n}Month`]()+1,day:e[`get${n}Date`](),hour:e[`get${n}Hours`](),minute:e[`get${n}Minutes`](),weekday:0,doy:0,workweek:0,hasDay:!0,hasTime:!0,past:!1,current:!1,future:!1,disabled:!1})}function s(e,t){let n=String(e);while(n.length<t)n="0"+n;return n}function m(e){return e%4===0&&e%100!==0||e%400===0}function c(e,t){return(m(e)?a:n)[t]}function T(e){const t=new Date(e.year,e.month-1,e.day+1);return k(F({...e,year:t.getFullYear(),month:t.getMonth()+1,day:t.getDate()}))}function f(e){const t=new Date(e.year,e.month-1,e.day-1);return k(F({...e,year:t.getFullYear(),month:t.getMonth()+1,day:t.getDate()}))}function y(){const e=new Date,t=e.getMonth()+1,n=e.getDate(),r=e.getFullYear();return[r,s(t,2),s(n,2)].join("-")}function P(e){return e===y()}function B(e,t,n){let r=A(e);if(t){if(1===r.day||0===r.weekday)while(!t.includes(Number(r.weekday)))r=T(r);r=W(r,t[0],f),r=k(r),n&&(r=g(r,n,r.hasTime))}return r}function K(e,t,n){let r=A(e);if(t&&Array.isArray(t)){const a=c(r.year,r.month);if(a===r.day||r.weekday===t[t.length-1])while(!t.includes(Number(r.weekday)))r=f(r);r=W(r,t[t.length-1],T),r=k(r),n&&(r=g(r,n,r.hasTime))}return r}function X(e){let t=A(e);return t.day=i,t=k(t),t}function z(e){let t=A(e);return t.day=c(t.year,t.month),t=k(t),t}function q(e){const t=Object.prototype.toString.call(e);switch(t){case"[object Number]":return e;case"[object String]":{const n=r.exec(e);return n?60*parseInt(n[1],10)+parseInt(n[3]||"0",10):!1}case"[object Object]":return"object"!==typeof e||"number"!==typeof e.hour||"number"!==typeof e.minute?!1:"object"===typeof e&&"hour"in e&&"minute"in e&&60*e.hour+e.minute}return!1}function G(e,t){return!(!e||!t)&&e.year===t.year&&e.month===t.month&&e.day===t.day&&e.hour===t.hour&&e.minute===t.minute}function J(e,t){return E(e)===E(t)}function Q(e,t){return b(e)===b(t)}function V(e,t){return U(e)===U(t)}function N(e,t=null){let n=w(e);return n?(n=k(n),t&&(n=g(n,t,n.hasTime)),n):null}function M(e){return 1e8*(e.year??0)+1e6*(e.month??0)+1e4*(e.day??0)}function l(e){return 100*(e.hour??0)+(e.minute??0)}function h(e){return M(e)+l(e)}function D(e,t,n=!1){const r=Date.UTC(e.year??0,(e.month??1)-1,e.day??1,e.hour??0,e.minute??0),a=Date.UTC(t.year??0,(t.month??1)-1,t.day??1,t.hour??0,t.minute??0);return!0===n&&a<r?0:a-r}function g(e,t,n=!1){let r=A(e),a=M(t),o=M(r),i=a===o;return r.hasTime&&n&&i&&(a=l(t),o=l(r),i=a===o),r.past=o<a,r.current=i,r.future=o>a,r.currentWeekday=r.weekday===t.weekday,r}function p(e,t,n=null){let r=A(e);return r.hasTime=!0,r.hour=Math.floor(t/o.MINUTES_IN.HOUR),r.minute=t%o.MINUTES_IN.HOUR,r.time=b(r),n&&(r=g(r,n,!0)),r}function ee(e){let t=A(e);return t.weekday=S(t),t}function te(e){let t=A(e);return t.doy=_(t)||0,t}function ne(e){let t=A(e);return t.workweek=O(t),t}function I(e,t,n,r,a){let o=A(e);const i=M(o);if(void 0!==t){const m=w(t);if(m){const c=M(m);i<=c&&(o.disabled=!0)}}if(!0!==o.disabled&&void 0!==n){const f=w(n);if(f){const y=M(f);i>=y&&(o.disabled=!0)}}if(!0!==o.disabled&&Array.isArray(r)&&r.length>0)for(var u in r)if(r[u]===o.weekday){o.disabled=!0;break}if(!0!==o.disabled&&Array.isArray(a)&&a.length>0)for(var d in a)if(Array.isArray(a[d])&&2===a[d].length&&a[d][0]&&a[d][1]){const l=w(a[d][0]),h=w(a[d][1]);if(l&&h&&Y(o,l,h)){o.disabled=!0;break}}else{const T=a[d];if(Array.isArray(T))for(var s of T){const D=N(s);if(D){const g=M(D);if(g===i){o.disabled=!0;break}}}else if(T){const p=N(T);if(p){const I=M(p);I===i&&(o.disabled=!0)}}}return o}function k(e){let t=A(e);return t.hasTime=!0,t.time=b(t),t.date=E(t),t.weekday=S(t),t.doy=_(t)||0,t.workweek=O(t),t}function _(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 O(e){let t=A(e);if(0===t.year){const a=N(y());a&&(t=a)}const n=new Date(Date.UTC(t.year,t.month-1,t.day)),r=4;n.setUTCDate(n.getUTCDate()-(n.getUTCDay()+6)%7+r),n.setUTCDate(n.getUTCDate()+r-(n.getUTCDay()||7));e=new Date(Date.UTC(n.getUTCFullYear(),0,1)),e=Math.ceil(((n.valueOf()-e.valueOf())/864e5+1)/7);return e}function S(e){let t=e.weekday;if(e.hasDay){const n=Math.floor,r=e.day,a=(e.month+9)%d+1,o=n(e.year/100),i=e.year%100-(e.month<=2?1:0);t=((r+n(2.6*a-.2)-2*o+i+n(i/4)+n(o/4))%7+7)%7}return t??0}function A(e){return{...e}}function E(e){let t=s(e.year,4)+"-"+s(e.month,2);return e.hasDay&&(t+="-"+s(e.day,2)),t}function b(e){return e.hasTime?s(e.hour,2)+":"+s(e.minute,2):""}function U(e){return E(e)+" "+(e.hasTime?b(e):"00:00")}function re(e,t=T,n=1,r=[0,1,2,3,4,5,6]){const a=A(e);return v(a,t,n,r)}function v(e,t=T,n=1,r=[0,1,2,3,4,5,6]){let a=A(e);r.includes(Number(a.weekday))||0!==a.weekday||t!==T||++n;while(--n>=0)a=t(a),r.length<7&&!r.includes(Number(a.weekday))&&++n;return a}function W(e,t,n=T,r=6){let a=A(e);while(a.weekday!==t&&--r>=0)a=n(a);return a}function ae(e,t,n,r=[0,1,2,3,4,5,6],a=void 0,o=void 0,i=[],u=[],d=42,s=0){const m=M(e),c=M(t),f=[];let y=A(e),l=0,h=l===c;if(!(c<m))while((!h||f.length<s)&&f.length<d){if(l=M(y),h=h||l>c&&f.length>=s,h)break;if(r.includes(Number(y.weekday))){let e=A(y);e=k(e),e=g(e,n),e=I(e,a,o,i,u),f.push(e)}y=v(y,T)}return f}function oe(t,n,r,a,o){const i=[];for(let e=0;e<a;++e){const u=(n+e)*r,d=A(t);i.push(p(d,u,o))}return i}function ie(r,a){const e=()=>"";return"undefined"===typeof Intl||"undefined"===typeof Intl.DateTimeFormat?e:(t,e)=>{try{const n=new Intl.DateTimeFormat(r||void 0,a(t,e));return n.format(C(t))}catch(e){return console.error(`Intl.DateTimeFormat: ${e.message} -> `+U(t)),""}}}function ue(e,t=!0){return t?new Date(Date.UTC(e.year,e.month-1,e.day,0,0)):new Date(e.year,e.month-1,e.day,0,0)}function C(e,t=!0){return t?new Date(Date.UTC(e.year,e.month-1,e.day,e.hour,e.minute)):new Date(e.year,e.month-1,e.day,e.hour,e.minute)}function de(e){return isFinite(Number(e))}function se(e,t=!1){const n=!0===t?h:M;return e.reduce((e,t)=>{return Math.max(n(e),n(t))===n(e)?e:t})}function me(e,t=!1){const n=!0===t?h:M;return e.reduce((e,t)=>{return Math.min(n(e),n(t))===n(e)?e:t})}function Y(e,t,n,r=!1){const a=M(e)+(!0===r?l(e):0),o=M(t)+(!0===r?l(t):0),i=M(n)+(!0===r?l(n):0);return a>=o&&a<=i}function ce(e,t,n,r){const a=M(e),o=M(t),i=M(n),u=M(r);return a>=i&&a<=u||o>=i&&o<=u||i>=a&&o>=u}function fe(e,t){const n=A(e);return t.year&&(n.year+=t.year),t.month&&(n.month+=t.month),t.day&&(n.day+=t.day),t.hour&&(n.hour+=t.hour),t.minute&&(n.minute+=t.minute),k(F(n))}function F(e){const t=new Date(e.year,e.month-1,e.day,e.hour,e.minute);return{...e,year:t.getFullYear(),month:t.getMonth()+1,day:t.getDate(),hour:t.getHours(),minute:t.getMinutes()}}function H(e,t){const n=D(e,t,!0);return Math.floor(n/o.MILLISECONDS_IN.DAY)}function ye(e,t){let n=A(e),r=A(t);return n=W(n,0),r=W(r,6),Math.ceil(H(n,r)/o.DAYS_IN.WEEK)}const le={Sun:new Date("2020-01-05T00:00:00.000Z"),Mon:new Date("2020-01-06T00:00:00.000Z"),Tue:new Date("2020-01-07T00:00:00.000Z"),Wed:new Date("2020-01-08T00:00:00.000Z"),Thu:new Date("2020-01-09T00:00:00.000Z"),Fri:new Date("2020-01-10T00:00:00.000Z"),Sat:new Date("2020-01-11T00:00:00.000Z")};function he(){const e=()=>"",a={long:{timeZone:"UTC",weekday:"long"},short:{timeZone:"UTC",weekday:"short"},narrow:{timeZone:"UTC",weekday:"narrow"}};return"undefined"===typeof Intl||"undefined"===typeof Intl.DateTimeFormat?e:t;function t(t,e,n){try{const r=new Intl.DateTimeFormat(n||void 0,a[e]||a["long"]);return r.format(le[t])}catch(e){return e instanceof Error&&console.error(`Intl.DateTimeFormat: ${e.message} -> day of week: `+t),""}}}function Te(t,n){const e=Object.keys(le),r=he();return e.map(e=>String(r(e,t,n)))}function De(){const e=()=>"",o={long:{timeZone:"UTC",month:"long"},short:{timeZone:"UTC",month:"short"},narrow:{timeZone:"UTC",month:"narrow"}};return"undefined"===typeof Intl||"undefined"===typeof Intl.DateTimeFormat?e:t;function t(t,e,n){try{const r=new Intl.DateTimeFormat(n||void 0,o[e]||o["long"]),a=new Date;return a.setDate(1),a.setMonth(t),r.format(a)}catch(e){return e instanceof Error&&console.error(`Intl.DateTimeFormat: ${e.message} -> month: `+t),""}}}function ge(t,n){const r=De();return[...Array(12).keys()].map(e=>r(e,t,n))}var pe={PARSE_DATETIME:u,PARSE_DATE:t,PARSE_TIME:r,DAYS_IN_MONTH:n,DAYS_IN_MONTH_LEAP:a,DAYS_IN_MONTH_MIN:R,DAYS_IN_MONTH_MAX:L,MONTH_MAX:d,MONTH_MIN:$,DAY_MIN:i,TIME_CONSTANTS:o,FIRST_HOUR:Z,today:y,getStartOfWeek:B,getEndOfWeek:K,getStartOfMonth:X,getEndOfMonth:z,parseTime:q,validateTimestamp:j,parsed:w,parseTimestamp:N,parseDate:x,getDayIdentifier:M,getTimeIdentifier:l,getDayTimeIdentifier:h,diffTimestamp:D,updateRelative:g,updateMinutes:p,updateWeekday:ee,updateDayOfYear:te,updateWorkWeek:ne,updateDisabled:I,updateFormatted:k,getDayOfYear:_,getWorkWeek:O,getWeekday:S,isLeapYear:m,daysInMonth:c,copyTimestamp:A,padNumber:s,getDate:E,getTime:b,getDateTime:U,nextDay:T,prevDay:f,relativeDays:v,findWeekday:W,createDayList:ae,createIntervalList:oe,createNativeLocaleFormatter:ie,makeDate:ue,makeDateTime:C,validateNumber:de,isBetweenDates:Y,isOverlappingDates:ce,daysBetween:H,weeksBetween:ye,addToDate:fe,compareTimestamps:G,compareDate:J,compareTime:Q,compareDateTime:V,getWeekdayFormatter:he,getWeekdayNames:Te,getMonthFormatter:De,getMonthNames:ge},pe=Object.freeze({__proto__:null,DAYS_IN_MONTH:n,DAYS_IN_MONTH_LEAP:a,DAYS_IN_MONTH_MAX:L,DAYS_IN_MONTH_MIN:R,DAY_MIN:i,FIRST_HOUR:Z,MONTH_MAX:d,MONTH_MIN:$,PARSE_DATE:t,PARSE_DATETIME:u,PARSE_TIME:r,TIME_CONSTANTS:o,addToDate:fe,compareDate:J,compareDateTime:V,compareTime:Q,compareTimestamps:G,copyTimestamp:A,createDayList:ae,createIntervalList:oe,createNativeLocaleFormatter:ie,daysBetween:H,daysInMonth:c,default:pe,diffTimestamp:D,findWeekday:W,getDate:E,getDateTime:U,getDayIdentifier:M,getDayOfYear:_,getDayTimeIdentifier:h,getEndOfMonth:z,getEndOfWeek:K,getMonthFormatter:De,getMonthNames:ge,getStartOfMonth:X,getStartOfWeek:B,getTime:b,getTimeIdentifier:l,getWeekday:S,getWeekdayFormatter:he,getWeekdayNames:Te,getWorkWeek:O,isBetweenDates:Y,isLeapYear:m,isOverlappingDates:ce,isToday:P,makeDate:ue,makeDateTime:C,maxTimestamp:se,minTimestamp:me,moveRelativeDays:re,nextDay:T,padNumber:s,parseDate:x,parseTime:q,parseTimestamp:N,parsed:w,prevDay:f,relativeDays:v,today:y,updateDayOfYear:te,updateDisabled:I,updateFormatted:k,updateMinutes:p,updateRelative:g,updateWeekday:ee,updateWorkWeek:ne,validateNumber:de,validateTimestamp:j,weeksBetween:ye});function Ie(e,t="px"){if(e)return isNaN(e)?String(e):"auto"===e?e:""+Number(e)+t}function we(t,n){for(let e=0;e<t.length;e++)if(!0===n(t[e],e))return e;return-1}function Ne(e,t){return 0===t?e:e.slice(0,t)}var Me={convertToUnit:Ie,indexOf:we,minCharWidth:Ne},Me=Object.freeze({__proto__:null,convertToUnit:Ie,default:Me,indexOf:we,minCharWidth:Ne}),pe={version:e,...pe,...Me};return pe}); |
@@ -9,7 +9,4 @@ import { VNode } from 'vue'; | ||
columnOptionsLabel?: string | undefined; | ||
weekdayStyle?: (((_scope: import("../composables/useInterval").Scope) => any) & ((_scope: import("../composables/useInterval").Scope) => any) & ((_scope: import("../composables/useInterval").Scope) => any)) | undefined; | ||
weekdayClass?: (((_scope: import("../composables/useInterval").Scope) => string) & ((_scope: import("../composables/useInterval").Scope) => string) & ((_scope: import("../composables/useInterval").Scope) => string)) | undefined; | ||
dayStyle?: (((_scope: import("../composables/useInterval").Scope) => any) & ((_scope: import("../composables/useInterval").Scope) => any)) | undefined; | ||
dayClass?: (((_scope: import("../composables/useInterval").Scope) => string) & ((_scope: import("../composables/useInterval").Scope) => string)) | undefined; | ||
dateHeader: "stacked" | "inline" | "inverted"; | ||
dayHeight: number | string; | ||
@@ -24,5 +21,8 @@ dayMinHeight: number | string; | ||
intervalClass?: ((_scope: import("../composables/useInterval").Scope) => string) | undefined; | ||
weekdayStyle?: (((_scope: import("../composables/useInterval").Scope) => any) & ((_scope: import("../composables/useInterval").Scope) => any)) | undefined; | ||
weekdayClass?: (((_scope: import("../composables/useInterval").Scope) => string) & ((_scope: import("../composables/useInterval").Scope) => string)) | undefined; | ||
showIntervalLabel?: ((_timestamp: Timestamp) => any) | undefined; | ||
hour24Format?: boolean | undefined; | ||
timeClicksClamped?: boolean | undefined; | ||
dateHeader: "stacked" | "inline" | "inverted"; | ||
modelValue: string; | ||
@@ -67,3 +67,3 @@ weekdays: number[]; | ||
useNavigation: boolean; | ||
modelResources?: any[] | undefined; | ||
modelResources?: import("../composables/useInterval").Resource[] | undefined; | ||
resourceKey: string; | ||
@@ -83,7 +83,4 @@ resourceLabel: string; | ||
columnOptionsLabel?: string | undefined; | ||
weekdayStyle?: (((_scope: import("../composables/useInterval").Scope) => any) & ((_scope: import("../composables/useInterval").Scope) => any) & ((_scope: import("../composables/useInterval").Scope) => any)) | undefined; | ||
weekdayClass?: (((_scope: import("../composables/useInterval").Scope) => string) & ((_scope: import("../composables/useInterval").Scope) => string) & ((_scope: import("../composables/useInterval").Scope) => string)) | undefined; | ||
dayStyle?: (((_scope: import("../composables/useInterval").Scope) => any) & ((_scope: import("../composables/useInterval").Scope) => any)) | undefined; | ||
dayClass?: (((_scope: import("../composables/useInterval").Scope) => string) & ((_scope: import("../composables/useInterval").Scope) => string)) | undefined; | ||
dateHeader: "stacked" | "inline" | "inverted"; | ||
dayHeight: number | string; | ||
@@ -98,5 +95,8 @@ dayMinHeight: number | string; | ||
intervalClass?: ((_scope: import("../composables/useInterval").Scope) => string) | undefined; | ||
weekdayStyle?: (((_scope: import("../composables/useInterval").Scope) => any) & ((_scope: import("../composables/useInterval").Scope) => any)) | undefined; | ||
weekdayClass?: (((_scope: import("../composables/useInterval").Scope) => string) & ((_scope: import("../composables/useInterval").Scope) => string)) | undefined; | ||
showIntervalLabel?: ((_timestamp: Timestamp) => any) | undefined; | ||
hour24Format?: boolean | undefined; | ||
timeClicksClamped?: boolean | undefined; | ||
dateHeader: "stacked" | "inline" | "inverted"; | ||
modelValue: string; | ||
@@ -141,3 +141,3 @@ weekdays: number[]; | ||
useNavigation: boolean; | ||
modelResources?: any[] | undefined; | ||
modelResources?: import("../composables/useInterval").Resource[] | undefined; | ||
resourceKey: string; | ||
@@ -144,0 +144,0 @@ resourceLabel: string; |
@@ -12,2 +12,5 @@ import { Ref, PropType } from 'vue'; | ||
} | ||
export interface Resource { | ||
[key: string]: any; | ||
} | ||
export interface ScopeForSlot { | ||
@@ -102,3 +105,3 @@ timestamp: Timestamp; | ||
view: 'day' | 'week' | 'month' | 'month-interval'; | ||
modelResources?: any[]; | ||
modelResources?: Resource[]; | ||
resourceKey: string; | ||
@@ -179,7 +182,4 @@ resourceLabel: string; | ||
columnOptionsLabel?: string; | ||
weekdayStyle?: (_scope: Scope) => any; | ||
weekdayClass?: (_scope: Scope) => string; | ||
dayStyle?: (_scope: Scope) => any; | ||
dayClass?: (_scope: Scope) => string; | ||
dateHeader: 'stacked' | 'inline' | 'inverted'; | ||
dayHeight: number | string; | ||
@@ -239,3 +239,3 @@ dayMinHeight: number | string; | ||
export interface ResourceProps extends IntervalProps { | ||
modelResources?: any[]; | ||
modelResources?: Resource[]; | ||
resourceKey: string; | ||
@@ -251,5 +251,2 @@ resourceLabel: string; | ||
} | ||
export interface Resource { | ||
[key: string]: any; | ||
} | ||
export declare const useResourceProps: { | ||
@@ -256,0 +253,0 @@ readonly modelResources: { |
@@ -126,7 +126,4 @@ import { App as Application } from 'vue'; | ||
columnOptionsLabel?: string | undefined; | ||
weekdayStyle?: (((_scope: import("./composables/useInterval").Scope) => any) & ((_scope: import("./composables/useInterval").Scope) => any) & ((_scope: import("./composables/useInterval").Scope) => any)) | undefined; | ||
weekdayClass?: (((_scope: import("./composables/useInterval").Scope) => string) & ((_scope: import("./composables/useInterval").Scope) => string) & ((_scope: import("./composables/useInterval").Scope) => string)) | undefined; | ||
dayStyle?: (((_scope: import("./composables/useInterval").Scope) => any) & ((_scope: import("./composables/useInterval").Scope) => any)) | undefined; | ||
dayClass?: (((_scope: import("./composables/useInterval").Scope) => string) & ((_scope: import("./composables/useInterval").Scope) => string)) | undefined; | ||
dateHeader: "stacked" | "inline" | "inverted"; | ||
dayHeight: number | string; | ||
@@ -141,5 +138,8 @@ dayMinHeight: number | string; | ||
intervalClass?: ((_scope: import("./composables/useInterval").Scope) => string) | undefined; | ||
weekdayStyle?: (((_scope: import("./composables/useInterval").Scope) => any) & ((_scope: import("./composables/useInterval").Scope) => any)) | undefined; | ||
weekdayClass?: (((_scope: import("./composables/useInterval").Scope) => string) & ((_scope: import("./composables/useInterval").Scope) => string)) | undefined; | ||
showIntervalLabel?: ((_timestamp: Timestamp.Timestamp) => any) | undefined; | ||
hour24Format?: boolean | undefined; | ||
timeClicksClamped?: boolean | undefined; | ||
dateHeader: "stacked" | "inline" | "inverted"; | ||
modelValue: string; | ||
@@ -184,3 +184,3 @@ weekdays: number[]; | ||
useNavigation: boolean; | ||
modelResources?: any[] | undefined; | ||
modelResources?: import("./composables/useInterval").Resource[] | undefined; | ||
resourceKey: string; | ||
@@ -200,7 +200,4 @@ resourceLabel: string; | ||
columnOptionsLabel?: string | undefined; | ||
weekdayStyle?: (((_scope: import("./composables/useInterval").Scope) => any) & ((_scope: import("./composables/useInterval").Scope) => any) & ((_scope: import("./composables/useInterval").Scope) => any)) | undefined; | ||
weekdayClass?: (((_scope: import("./composables/useInterval").Scope) => string) & ((_scope: import("./composables/useInterval").Scope) => string) & ((_scope: import("./composables/useInterval").Scope) => string)) | undefined; | ||
dayStyle?: (((_scope: import("./composables/useInterval").Scope) => any) & ((_scope: import("./composables/useInterval").Scope) => any)) | undefined; | ||
dayClass?: (((_scope: import("./composables/useInterval").Scope) => string) & ((_scope: import("./composables/useInterval").Scope) => string)) | undefined; | ||
dateHeader: "stacked" | "inline" | "inverted"; | ||
dayHeight: number | string; | ||
@@ -215,5 +212,8 @@ dayMinHeight: number | string; | ||
intervalClass?: ((_scope: import("./composables/useInterval").Scope) => string) | undefined; | ||
weekdayStyle?: (((_scope: import("./composables/useInterval").Scope) => any) & ((_scope: import("./composables/useInterval").Scope) => any)) | undefined; | ||
weekdayClass?: (((_scope: import("./composables/useInterval").Scope) => string) & ((_scope: import("./composables/useInterval").Scope) => string)) | undefined; | ||
showIntervalLabel?: ((_timestamp: Timestamp.Timestamp) => any) | undefined; | ||
hour24Format?: boolean | undefined; | ||
timeClicksClamped?: boolean | undefined; | ||
dateHeader: "stacked" | "inline" | "inverted"; | ||
modelValue: string; | ||
@@ -258,3 +258,3 @@ weekdays: number[]; | ||
useNavigation: boolean; | ||
modelResources?: any[] | undefined; | ||
modelResources?: import("./composables/useInterval").Resource[] | undefined; | ||
resourceKey: string; | ||
@@ -261,0 +261,0 @@ resourceLabel: string; |
@@ -1,1 +0,1 @@ | ||
export const version: "4.0.8"; | ||
export const version: "4.1.0"; |
{ | ||
"name": "@quasar/quasar-ui-qcalendar", | ||
"version": "4.1.0", | ||
"version": "4.1.1", | ||
"author": "Jeff Galbraith <jeff@quasar.dev>", | ||
@@ -38,3 +38,3 @@ "productName": "QCalendar", | ||
"./QCalendar": { | ||
"types": "./dist/types/index.d.ts", | ||
"types": "./dist/types/components/QCalendar.d.ts", | ||
"import": "./dist/QCalendar.esm.js", | ||
@@ -56,3 +56,3 @@ "require": "./dist/QCalendar.cjs.js" | ||
"./QCalendarAgenda": { | ||
"types": "./dist/types/index.d.ts", | ||
"types": "./dist/types/components/QCalendarAgenda.d.ts", | ||
"import": "./dist/QCalendarAgenda.esm.js", | ||
@@ -74,3 +74,3 @@ "require": "./dist/QCalendarAgenda.cjs.js" | ||
"./QCalendarDay": { | ||
"types": "./dist/types/index.d.ts", | ||
"types": "./dist/types/components/QCalendarDay.d.ts", | ||
"import": "./dist/QCalendarDay.esm.js", | ||
@@ -92,3 +92,3 @@ "require": "./dist/QCalendarDay.cjs.js" | ||
"./QCalendarMonth": { | ||
"types": "./dist/types/index.d.ts", | ||
"types": "./dist/types/components/QCalendarMonth.d.ts", | ||
"import": "./dist/QCalendarMonth.esm.js", | ||
@@ -110,3 +110,3 @@ "require": "./dist/QCalendarMonth.cjs.js" | ||
"./QCalendarResource": { | ||
"types": "./dist/types/index.d.ts", | ||
"types": "./dist/types/components/QCalendarResource.d.ts", | ||
"import": "./dist/QCalendarResource.esm.js", | ||
@@ -128,3 +128,3 @@ "require": "./dist/QCalendarResource.cjs.js" | ||
"./QCalendarScheduler": { | ||
"types": "./dist/types/index.d.ts", | ||
"types": "./dist/types/components/QCalendarScheduler.d.ts", | ||
"import": "./dist/QCalendarScheduler.esm.js", | ||
@@ -146,3 +146,3 @@ "require": "./dist/QCalendarScheduler.cjs.js" | ||
"./QCalendarTask": { | ||
"types": "./dist/types/index.d.ts", | ||
"types": "./dist/types/components/QCalendarTask.d.ts", | ||
"import": "./dist/QCalendarTask.esm.js", | ||
@@ -164,3 +164,3 @@ "require": "./dist/QCalendarTask.cjs.js" | ||
"./Timestamp": { | ||
"types": "./dist/types/index.d.ts", | ||
"types": "./dist/types/utils/Timestamp.d.ts", | ||
"import": "./dist/Timestamp.esm.js", | ||
@@ -231,3 +231,3 @@ "require": "./dist/Timestamp.cjs.js" | ||
"@types/fs-extra": "^11.0.4", | ||
"@types/node": "^22.13.0", | ||
"@types/node": "^22.13.1", | ||
"@types/rtlcss": "^3.5.4", | ||
@@ -249,3 +249,3 @@ "@types/uglify-js": "^3.17.5", | ||
"rimraf": "^6.0.1", | ||
"rollup": "^4.34.0", | ||
"rollup": "^4.34.3", | ||
"rtlcss": "^4.3.0", | ||
@@ -280,3 +280,3 @@ "sass-embedded": "^1.83.4", | ||
"dev:electron": "cd dev && pnpm run 'dev:electron' && cd ..", | ||
"build": "tsx build/index.ts", | ||
"build": "pnpm build:types && tsx build/index.ts", | ||
"build:js": "tsx build/script.javascript.ts", | ||
@@ -283,0 +283,0 @@ "build:css": "tsx build/script.css.ts", |
@@ -10,3 +10,4 @@ { | ||
"composables/private.useMaxDays", | ||
"composables/private.useTimes" | ||
"composables/private.useTimes", | ||
"composables/private.useNavigation" | ||
], | ||
@@ -16,9 +17,3 @@ "meta": { | ||
}, | ||
"props": { | ||
"use-navigation": { | ||
"type": "Boolean", | ||
"desc": "Allows keyboard navigation", | ||
"category": "behavior" | ||
} | ||
}, | ||
"props": {}, | ||
"events": {}, | ||
@@ -25,0 +20,0 @@ "methods": { |
@@ -10,3 +10,4 @@ { | ||
"composables/private.useMaxDays", | ||
"composables/private.useTimes" | ||
"composables/private.useTimes", | ||
"composables/private.useNavigation" | ||
], | ||
@@ -16,25 +17,3 @@ "meta": { | ||
}, | ||
"props": { | ||
"use-navigation": { | ||
"type": "Boolean", | ||
"desc": "Allows keyboard navigation", | ||
"category": "behavior" | ||
}, | ||
"column-header-before": { | ||
"type": "Boolean", | ||
"category": "style", | ||
"desc": "Turns on the column-header-before scoped slot", | ||
"applicable": [ | ||
"day" | ||
] | ||
}, | ||
"column-header-after": { | ||
"type": "Boolean", | ||
"category": "style", | ||
"desc": "Turns on the column-header-after scoped slot", | ||
"applicable": [ | ||
"day" | ||
] | ||
} | ||
}, | ||
"props": {}, | ||
"events": {}, | ||
@@ -41,0 +20,0 @@ "methods": { |
@@ -9,3 +9,4 @@ { | ||
"composables/private.useMonth", | ||
"composables/private.useTimes" | ||
"composables/private.useTimes", | ||
"composables/private.useNavigation" | ||
], | ||
@@ -29,7 +30,2 @@ "meta": { | ||
] | ||
}, | ||
"use-navigation": { | ||
"type": "Boolean", | ||
"desc": "Allows keyboard navigation", | ||
"category": "behavior" | ||
} | ||
@@ -36,0 +32,0 @@ }, |
@@ -11,3 +11,4 @@ { | ||
"composables/private.useTimes", | ||
"composables/private.useResource" | ||
"composables/private.useResource", | ||
"composables/private.useNavigation" | ||
], | ||
@@ -18,7 +19,2 @@ "meta": { | ||
"props": { | ||
"use-navigation": { | ||
"type": "Boolean", | ||
"desc": "Allows keyboard navigation", | ||
"category": "behavior" | ||
}, | ||
"sticky": { | ||
@@ -25,0 +21,0 @@ "type": "Boolean", |
@@ -12,3 +12,4 @@ { | ||
"composables/private.useScheduler", | ||
"composables/private.useResource" | ||
"composables/private.useResource", | ||
"composables/private.useNavigation" | ||
], | ||
@@ -18,9 +19,3 @@ "meta": { | ||
}, | ||
"props": { | ||
"use-navigation": { | ||
"type": "Boolean", | ||
"desc": "Allows keyboard navigation", | ||
"category": "behavior" | ||
} | ||
}, | ||
"props": {}, | ||
"events": {}, | ||
@@ -27,0 +22,0 @@ "methods": { |
@@ -10,3 +10,4 @@ { | ||
"composables/private.useTasks", | ||
"composables/private.useTimes" | ||
"composables/private.useTimes", | ||
"composables/private.useNavigation" | ||
], | ||
@@ -16,9 +17,3 @@ "meta": { | ||
}, | ||
"props": { | ||
"use-navigation": { | ||
"type": "Boolean", | ||
"desc": "Allows keyboard navigation", | ||
"category": "behavior" | ||
} | ||
}, | ||
"props": {}, | ||
"slots": { | ||
@@ -25,0 +20,0 @@ "head-weekday-label": { |
@@ -10,3 +10,3 @@ { | ||
"desc": "Sets day cell width and turns on sticky mode. Width must be css measurement if a string, otherwise it's in pixels", | ||
"default": "100", | ||
"default": "# 100", | ||
"__runtimeDefault": true, | ||
@@ -13,0 +13,0 @@ "examples": [ |
@@ -27,4 +27,66 @@ { | ||
] | ||
}, | ||
"column-header-before": { | ||
"type": "Boolean", | ||
"category": "style", | ||
"desc": "Turns on the column-header-before scoped slot", | ||
"applicable": [ | ||
"day" | ||
] | ||
}, | ||
"column-header-after": { | ||
"type": "Boolean", | ||
"category": "style", | ||
"desc": "Turns on the column-header-after scoped slot", | ||
"applicable": [ | ||
"day" | ||
] | ||
}, | ||
"left-column-options": { | ||
"type": "Array", | ||
"tsType": "ColumnObjectArray", | ||
"category": "behavior", | ||
"desc": "An array of objects used to add columns to the left side of the agenda. Each object must have an id and label key or define the id object key using the `column-options-id` and the label using the `column-options-label` properties. The value of the id should be unique for each object. The object is passed to slots", | ||
"applicable": [ | ||
"week-agenda" | ||
], | ||
"examples": [ | ||
"[{ id: '1', label: 'Column 1' }, { id: '2', label: 'Column 2' }]" | ||
] | ||
}, | ||
"right-column-options": { | ||
"type": "Array", | ||
"tsType": "ColumnObjectArray", | ||
"category": "behavior", | ||
"desc": "An array of objects used to add columns to the right side of the agenda. Each object must have an id and label key or define the id object key using the `column-options-id` and the label using the `column-options-label` properties. The value of the id should be unique for each object. The object is passed to slots", | ||
"applicable": [ | ||
"week-agenda" | ||
], | ||
"examples": [ | ||
"[{ id: '1', label: 'Column 1' }, { id: '2', label: 'Column 2' }]" | ||
] | ||
}, | ||
"column-options-id": { | ||
"type": "String", | ||
"category": "behavior", | ||
"desc": "The key in the object to use for `left-column-options` or `right-column-options` properties to define the id, otherwise `id` will be used", | ||
"applicable": [ | ||
"week-agenda" | ||
], | ||
"examples": [ | ||
"'1'" | ||
] | ||
}, | ||
"column-options-label": { | ||
"type": "String", | ||
"category": "behavior", | ||
"desc": "The key in the object to use for `left-column-options` or `right-column-options` properties to define the label, otherwise `label` will be used", | ||
"applicable": [ | ||
"week-agenda" | ||
], | ||
"examples": [ | ||
"'label'" | ||
] | ||
} | ||
} | ||
} |
@@ -30,3 +30,3 @@ { | ||
], | ||
"default": "'day'", | ||
"default": "# 'day'", | ||
"__runtimeDefault": true | ||
@@ -405,3 +405,4 @@ }, | ||
}, | ||
"default": "(data) => null", | ||
"default": "# null", | ||
"__runtimeDefault": true, | ||
"examples": [ | ||
@@ -408,0 +409,0 @@ "(data) => { return { 'background-color': '#c0c0c0' } }", |
@@ -155,3 +155,4 @@ { | ||
}, | ||
"default": "(data) => null", | ||
"default": "# null", | ||
"__runtimeDefault": true, | ||
"examples": [ | ||
@@ -158,0 +159,0 @@ "(data) => { return { 'background-color': '#c0c0c0' } }", |
{ | ||
"props": { | ||
"model-resources": { | ||
"type": "Array", | ||
"tsType": "ResourceObjectArray", | ||
"category": "model", | ||
"required": true, | ||
"desc": "An array of objects with a single key of label. You can add other keys if you like, which will be passed back on the appropriate scoped slots", | ||
"applicable": [ | ||
"scheduler" | ||
], | ||
"examples": [ | ||
"[{ label: 'John' },{ label: 'Susan' }]" | ||
] | ||
}, | ||
"resource-key": { | ||
"type": "String", | ||
"category": "model", | ||
"desc": "The key from the `resources` object that will be displayed", | ||
"default": "'id'", | ||
"applicable": [ | ||
"scheduler", | ||
"resource" | ||
], | ||
"examples": [ | ||
"'id'" | ||
] | ||
}, | ||
"resource-label": { | ||
"type": "String", | ||
"category": "model", | ||
"desc": "The label from the `resources` object that will be displayed", | ||
"default": "'label'", | ||
"applicable": [ | ||
"scheduler", | ||
"resource" | ||
], | ||
"examples": [ | ||
"'label'", | ||
"'name'" | ||
] | ||
}, | ||
"resource-height": { | ||
"type": [ | ||
"Number", | ||
"String" | ||
], | ||
"category": "behavior", | ||
"desc": "The maximum height in pixels for the resource height", | ||
"default": "70", | ||
"applicable": [ | ||
"scheduler", | ||
"resource", | ||
"day-resource" | ||
], | ||
"examples": [ | ||
"80", | ||
"'100'" | ||
] | ||
}, | ||
"resource-min-height": { | ||
"type": [ | ||
"Number", | ||
"String" | ||
], | ||
"default": "0", | ||
"desc": "The minimum height of a resource", | ||
"category": "behavior" | ||
}, | ||
"resource-class": { | ||
"type": "Function", | ||
"desc": "A function that returns a class name for a resource", | ||
"category": "style", | ||
"default": "# null", | ||
"params": { | ||
"data": { | ||
"type": "Object", | ||
"desc": "The data passed to the function", | ||
"definition": { | ||
"scope": { | ||
"type": "Object", | ||
"desc": "The scope object", | ||
"definition": { | ||
"resource": { | ||
"type": "Object", | ||
"desc": "The resource object" | ||
}, | ||
"resourceIndex": { | ||
"type": "Number", | ||
"desc": "The index of the resource in the model-resources array" | ||
}, | ||
"timestamps": { | ||
"type": "Array", | ||
"tsType": "TimestampArray", | ||
"desc": "The array of timestamps for the intervals" | ||
}, | ||
"indentLevel": { | ||
"type": "Number", | ||
"desc": "The indent level of the resource" | ||
}, | ||
"label": { | ||
"type": "String", | ||
"desc": "The label of the resource" | ||
} | ||
} | ||
} | ||
} | ||
} | ||
}, | ||
"returns": { | ||
"type": "String", | ||
"desc": "The class name to apply to the resource" | ||
} | ||
}, | ||
"resource-style": { | ||
"type": "Function", | ||
"category": "style", | ||
"desc": "Gets called to provide custom styling of a resource", | ||
"params": { | ||
"data": { | ||
"type": "Object", | ||
"desc": "The data passed to the function", | ||
"__exemption": [ | ||
"examples" | ||
], | ||
"definition": { | ||
"timestamp": { | ||
"type": "Timestamp", | ||
"tsType": "Timestamp", | ||
"desc": "A timestamp object associated with the interval", | ||
"__exemption": [ | ||
"examples" | ||
] | ||
}, | ||
"index": { | ||
"type": "Number", | ||
"desc": "The resource index", | ||
"__exemption": [ | ||
"examples" | ||
] | ||
}, | ||
"resource": { | ||
"type": "Object", | ||
"tsType": "ResourceObject", | ||
"desc": "The resource object", | ||
"__exemption": [ | ||
"examples" | ||
] | ||
} | ||
} | ||
} | ||
}, | ||
"returns": { | ||
"type": [ | ||
"Array", | ||
"Object", | ||
"String" | ||
], | ||
"desc": "A Vue style object", | ||
"examples": [ | ||
"{ color: '#ccc' }" | ||
] | ||
}, | ||
"default": "(data) => { return {} }", | ||
"applicable": [ | ||
"scheduler", | ||
"resource", | ||
"day-resource" | ||
], | ||
"examples": [ | ||
"(data) => { return { 'background-color': '#c0c0c0' } }", | ||
"(data) => resourceStyle(data)" | ||
] | ||
} | ||
}, | ||
"events": { | ||
"update:model-resources": { | ||
"type": "Array", | ||
"desc": "Emitted when the model-resources prop is updated" | ||
}, | ||
"resource-expanded": { | ||
"type": "Object", | ||
"desc": "Emitted when a resource is expanded or collapsed", | ||
"params": { | ||
"scope": { | ||
"type": "Object", | ||
"desc": "The scope object", | ||
"definition": { | ||
"resource": { | ||
"type": "Object", | ||
"desc": "The resource object" | ||
}, | ||
"timestamps": { | ||
"type": "Array", | ||
"tsType": "TimestampArray", | ||
"desc": "The array of timestamps for the intervals" | ||
}, | ||
"resourceIndex": { | ||
"type": "Number", | ||
"desc": "The index of the resource in the model-resources array" | ||
}, | ||
"indentLevel": { | ||
"type": "Number", | ||
"desc": "The indent level of the resource" | ||
}, | ||
"label": { | ||
"type": "String", | ||
"desc": "The label of the resource" | ||
} | ||
} | ||
}, | ||
"expanded": { | ||
"type": "Boolean", | ||
"desc": "True if the resource is expanded, false otherwise" | ||
} | ||
} | ||
}, | ||
"click-resource": { | ||
"desc": "Occurs on resource area", | ||
"applicable": [ | ||
"scheduler", | ||
"week-scheduler", | ||
"resource", | ||
"day-resource", | ||
"month-scheduler", | ||
"custom-scheduler" | ||
], | ||
"params": { | ||
"data": { | ||
"type": "Object", | ||
"desc": "The data passed to the function", | ||
"__exemption": [ | ||
"examples" | ||
], | ||
"definition": { | ||
"scope": { | ||
"type": "Object", | ||
"desc": "The scope of the event", | ||
"__exemption": [ | ||
"examples" | ||
], | ||
"definition": { | ||
"resource": { | ||
"type": "Object", | ||
"tsType": "ResourceObject", | ||
"desc": "The resource object associated with the event. Only applicable for resource views", | ||
"__exemption": [ | ||
"examples" | ||
] | ||
}, | ||
"intervals": { | ||
"type": "Array", | ||
"tsType": "TimestampArray", | ||
"desc": "An array of timestamps of the intervals", | ||
"__exemption": [ | ||
"examples" | ||
] | ||
}, | ||
"index": { | ||
"type": "Number", | ||
"desc": "The index of the resource", | ||
"__exemption": [ | ||
"examples" | ||
] | ||
} | ||
} | ||
}, | ||
"event": { | ||
"type": "Object", | ||
"desc": "JS event object", | ||
"__exemption": [ | ||
"examples" | ||
] | ||
} | ||
} | ||
} | ||
} | ||
}, | ||
"contextmenu-resource": { | ||
"desc": "Occurs on resource area", | ||
"applicable": [ | ||
"scheduler", | ||
"week-scheduler", | ||
"resource", | ||
"day-resource", | ||
"month-scheduler", | ||
"custom-scheduler" | ||
], | ||
"params": { | ||
"data": { | ||
"type": "Object", | ||
"desc": "The data passed to the function", | ||
"__exemption": [ | ||
"examples" | ||
], | ||
"definition": { | ||
"scope": { | ||
"type": "Object", | ||
"desc": "The scope of the event", | ||
"__exemption": [ | ||
"examples" | ||
], | ||
"definition": { | ||
"resource": { | ||
"type": "Object", | ||
"tsType": "ResourceObject", | ||
"desc": "The resource object associated with the event. Only applicable for resource views", | ||
"__exemption": [ | ||
"examples" | ||
] | ||
}, | ||
"intervals": { | ||
"type": "Array", | ||
"tsType": "TimestampArray", | ||
"desc": "An array of timestamps of the intervals", | ||
"__exemption": [ | ||
"examples" | ||
] | ||
}, | ||
"index": { | ||
"type": "Number", | ||
"desc": "The index of the resource", | ||
"__exemption": [ | ||
"examples" | ||
] | ||
} | ||
} | ||
}, | ||
"event": { | ||
"type": "Object", | ||
"desc": "JS event object", | ||
"__exemption": [ | ||
"examples" | ||
] | ||
} | ||
} | ||
} | ||
} | ||
}, | ||
"mousedown-resource": { | ||
"desc": "Occurs on resource area", | ||
"applicable": [ | ||
"scheduler", | ||
"week-scheduler", | ||
"resource", | ||
"day-resource", | ||
"month-scheduler", | ||
"custom-scheduler" | ||
], | ||
"params": { | ||
"data": { | ||
"type": "Object", | ||
"desc": "The data passed to the function", | ||
"__exemption": [ | ||
"examples" | ||
], | ||
"definition": { | ||
"scope": { | ||
"type": "Object", | ||
"desc": "The scope of the event", | ||
"__exemption": [ | ||
"examples" | ||
], | ||
"definition": { | ||
"resource": { | ||
"type": "Object", | ||
"tsType": "ResourceObject", | ||
"desc": "The resource object associated with the event. Only applicable for resource views", | ||
"__exemption": [ | ||
"examples" | ||
] | ||
}, | ||
"intervals": { | ||
"type": "Array", | ||
"tsType": "TimestampArray", | ||
"desc": "An array of timestamps of the intervals", | ||
"__exemption": [ | ||
"examples" | ||
] | ||
}, | ||
"index": { | ||
"type": "Number", | ||
"desc": "The index of the resource", | ||
"__exemption": [ | ||
"examples" | ||
] | ||
} | ||
} | ||
}, | ||
"event": { | ||
"type": "Object", | ||
"desc": "JS event object", | ||
"__exemption": [ | ||
"examples" | ||
] | ||
} | ||
} | ||
} | ||
} | ||
}, | ||
"mouseup-resource": { | ||
"desc": "Occurs on resource area", | ||
"applicable": [ | ||
"scheduler", | ||
"week-scheduler", | ||
"resource", | ||
"day-resource", | ||
"month-scheduler", | ||
"custom-scheduler" | ||
], | ||
"params": { | ||
"data": { | ||
"type": "Object", | ||
"desc": "The data passed to the function", | ||
"__exemption": [ | ||
"examples" | ||
], | ||
"definition": { | ||
"scope": { | ||
"type": "Object", | ||
"desc": "The scope of the event", | ||
"__exemption": [ | ||
"examples" | ||
], | ||
"definition": { | ||
"resource": { | ||
"type": "Object", | ||
"tsType": "ResourceObject", | ||
"desc": "The resource object associated with the event. Only applicable for resource views", | ||
"__exemption": [ | ||
"examples" | ||
] | ||
}, | ||
"intervals": { | ||
"type": "Array", | ||
"tsType": "TimestampArray", | ||
"desc": "An array of timestamps of the intervals", | ||
"__exemption": [ | ||
"examples" | ||
] | ||
}, | ||
"index": { | ||
"type": "Number", | ||
"desc": "The index of the resource", | ||
"__exemption": [ | ||
"examples" | ||
] | ||
} | ||
} | ||
}, | ||
"event": { | ||
"type": "Object", | ||
"desc": "JS event object", | ||
"__exemption": [ | ||
"examples" | ||
] | ||
} | ||
} | ||
} | ||
} | ||
}, | ||
"mouseenter-resource": { | ||
"desc": "Occurs on resource area", | ||
"applicable": [ | ||
"scheduler", | ||
"week-scheduler", | ||
"resource", | ||
"day-resource", | ||
"month-scheduler", | ||
"custom-scheduler" | ||
], | ||
"params": { | ||
"data": { | ||
"type": "Object", | ||
"desc": "The data passed to the function", | ||
"__exemption": [ | ||
"examples" | ||
], | ||
"definition": { | ||
"scope": { | ||
"type": "Object", | ||
"desc": "The scope of the event", | ||
"__exemption": [ | ||
"examples" | ||
], | ||
"definition": { | ||
"resource": { | ||
"type": "Object", | ||
"tsType": "ResourceObject", | ||
"desc": "The resource object associated with the event. Only applicable for resource views", | ||
"__exemption": [ | ||
"examples" | ||
] | ||
}, | ||
"intervals": { | ||
"type": "Array", | ||
"tsType": "TimestampArray", | ||
"desc": "An array of timestamps of the intervals", | ||
"__exemption": [ | ||
"examples" | ||
] | ||
}, | ||
"index": { | ||
"type": "Number", | ||
"desc": "The index of the resource", | ||
"__exemption": [ | ||
"examples" | ||
] | ||
} | ||
} | ||
}, | ||
"event": { | ||
"type": "Object", | ||
"desc": "JS event object", | ||
"__exemption": [ | ||
"examples" | ||
] | ||
} | ||
} | ||
} | ||
} | ||
}, | ||
"mouseleave-resource": { | ||
"desc": "Occurs on resource area", | ||
"applicable": [ | ||
"scheduler", | ||
"week-scheduler", | ||
"resource", | ||
"day-resource", | ||
"month-scheduler", | ||
"custom-scheduler" | ||
], | ||
"params": { | ||
"data": { | ||
"type": "Object", | ||
"desc": "The data passed to the function", | ||
"__exemption": [ | ||
"examples" | ||
], | ||
"definition": { | ||
"scope": { | ||
"type": "Object", | ||
"desc": "The scope of the event", | ||
"__exemption": [ | ||
"examples" | ||
], | ||
"definition": { | ||
"resource": { | ||
"type": "Object", | ||
"tsType": "ResourceObject", | ||
"desc": "The resource object associated with the event. Only applicable for resource views", | ||
"__exemption": [ | ||
"examples" | ||
] | ||
}, | ||
"intervals": { | ||
"type": "Array", | ||
"tsType": "TimestampArray", | ||
"desc": "An array of timestamps of the intervals", | ||
"__exemption": [ | ||
"examples" | ||
] | ||
}, | ||
"index": { | ||
"type": "Number", | ||
"desc": "The index of the resource", | ||
"__exemption": [ | ||
"examples" | ||
] | ||
} | ||
} | ||
}, | ||
"event": { | ||
"type": "Object", | ||
"desc": "JS event object", | ||
"__exemption": [ | ||
"examples" | ||
] | ||
} | ||
} | ||
} | ||
} | ||
}, | ||
"mousemove-resource": { | ||
"desc": "Occurs on resource area", | ||
"applicable": [ | ||
"scheduler", | ||
"week-scheduler", | ||
"resource", | ||
"day-resource", | ||
"month-scheduler", | ||
"custom-scheduler" | ||
], | ||
"params": { | ||
"data": { | ||
"type": "Object", | ||
"desc": "The data passed to the function", | ||
"__exemption": [ | ||
"examples" | ||
], | ||
"definition": { | ||
"scope": { | ||
"type": "Object", | ||
"desc": "The scope of the event", | ||
"__exemption": [ | ||
"examples" | ||
], | ||
"definition": { | ||
"resource": { | ||
"type": "Object", | ||
"tsType": "ResourceObject", | ||
"desc": "The resource object associated with the event. Only applicable for resource views", | ||
"__exemption": [ | ||
"examples" | ||
] | ||
}, | ||
"intervals": { | ||
"type": "Array", | ||
"tsType": "TimestampArray", | ||
"desc": "An array of timestamps of the intervals", | ||
"__exemption": [ | ||
"examples" | ||
] | ||
}, | ||
"index": { | ||
"type": "Number", | ||
"desc": "The index of the resource", | ||
"__exemption": [ | ||
"examples" | ||
] | ||
} | ||
} | ||
}, | ||
"event": { | ||
"type": "Object", | ||
"desc": "JS event object", | ||
"__exemption": [ | ||
"examples" | ||
] | ||
} | ||
} | ||
} | ||
} | ||
}, | ||
"touchstart-resource": { | ||
"desc": "Occurs on resource area", | ||
"applicable": [ | ||
"scheduler", | ||
"week-scheduler", | ||
"resource", | ||
"day-resource", | ||
"month-scheduler", | ||
"custom-scheduler" | ||
], | ||
"params": { | ||
"data": { | ||
"type": "Object", | ||
"desc": "The data passed to the function", | ||
"__exemption": [ | ||
"examples" | ||
], | ||
"definition": { | ||
"scope": { | ||
"type": "Object", | ||
"desc": "The scope of the event", | ||
"__exemption": [ | ||
"examples" | ||
], | ||
"definition": { | ||
"resource": { | ||
"type": "Object", | ||
"tsType": "ResourceObject", | ||
"desc": "The resource object associated with the event. Only applicable for resource views", | ||
"__exemption": [ | ||
"examples" | ||
] | ||
}, | ||
"intervals": { | ||
"type": "Array", | ||
"tsType": "TimestampArray", | ||
"desc": "An array of timestamps of the intervals", | ||
"__exemption": [ | ||
"examples" | ||
] | ||
}, | ||
"index": { | ||
"type": "Number", | ||
"desc": "The index of the resource", | ||
"__exemption": [ | ||
"examples" | ||
] | ||
} | ||
} | ||
}, | ||
"event": { | ||
"type": "Object", | ||
"desc": "JS event object", | ||
"__exemption": [ | ||
"examples" | ||
] | ||
} | ||
} | ||
} | ||
} | ||
}, | ||
"touchend-resource": { | ||
"desc": "Occurs on resource area", | ||
"applicable": [ | ||
"scheduler", | ||
"week-scheduler", | ||
"resource", | ||
"day-resource", | ||
"month-scheduler", | ||
"custom-scheduler" | ||
], | ||
"params": { | ||
"data": { | ||
"type": "Object", | ||
"desc": "The data passed to the function", | ||
"__exemption": [ | ||
"examples" | ||
], | ||
"definition": { | ||
"scope": { | ||
"type": "Object", | ||
"desc": "The scope of the event", | ||
"__exemption": [ | ||
"examples" | ||
], | ||
"definition": { | ||
"resource": { | ||
"type": "Object", | ||
"tsType": "ResourceObject", | ||
"desc": "The resource object associated with the event. Only applicable for resource views", | ||
"__exemption": [ | ||
"examples" | ||
] | ||
}, | ||
"intervals": { | ||
"type": "Array", | ||
"tsType": "TimestampArray", | ||
"desc": "An array of timestamps of the intervals", | ||
"__exemption": [ | ||
"examples" | ||
] | ||
}, | ||
"index": { | ||
"type": "Number", | ||
"desc": "The index of the resource", | ||
"__exemption": [ | ||
"examples" | ||
] | ||
} | ||
} | ||
}, | ||
"event": { | ||
"type": "Object", | ||
"desc": "JS event object", | ||
"__exemption": [ | ||
"examples" | ||
] | ||
} | ||
} | ||
} | ||
} | ||
}, | ||
"touchmove-resource": { | ||
"desc": "Occurs on resource area", | ||
"applicable": [ | ||
"scheduler", | ||
"week-scheduler", | ||
"resource", | ||
"day-resource", | ||
"month-scheduler", | ||
"custom-scheduler" | ||
], | ||
"params": { | ||
"data": { | ||
"type": "Object", | ||
"desc": "The data passed to the function", | ||
"__exemption": [ | ||
"examples" | ||
], | ||
"definition": { | ||
"scope": { | ||
"type": "Object", | ||
"desc": "The scope of the event", | ||
"__exemption": [ | ||
"examples" | ||
], | ||
"definition": { | ||
"resource": { | ||
"type": "Object", | ||
"tsType": "ResourceObject", | ||
"desc": "The resource object associated with the event. Only applicable for resource views", | ||
"__exemption": [ | ||
"examples" | ||
] | ||
}, | ||
"intervals": { | ||
"type": "Array", | ||
"tsType": "TimestampArray", | ||
"desc": "An array of timestamps of the intervals", | ||
"__exemption": [ | ||
"examples" | ||
] | ||
}, | ||
"index": { | ||
"type": "Number", | ||
"desc": "The index of the resource", | ||
"__exemption": [ | ||
"examples" | ||
] | ||
} | ||
} | ||
}, | ||
"event": { | ||
"type": "Object", | ||
"desc": "JS event object", | ||
"__exemption": [ | ||
"examples" | ||
] | ||
} | ||
} | ||
} | ||
} | ||
}, | ||
"click-resource-header": { | ||
"desc": "Occurs on resource header area", | ||
"applicable": [ | ||
"scheduler", | ||
"week-scheduler", | ||
"resource", | ||
"day-resource", | ||
"month-scheduler", | ||
"custom-scheduler" | ||
], | ||
"params": { | ||
"data": { | ||
"type": "Object", | ||
"desc": "The data passed to the function", | ||
"__exemption": [ | ||
"examples" | ||
], | ||
"definition": { | ||
"scope": { | ||
"type": "Object", | ||
"desc": "The scope of the event", | ||
"__exemption": [ | ||
"examples" | ||
], | ||
"definition": { | ||
"timestamp": { | ||
"type": "Object", | ||
"tsType": "Timestamp", | ||
"desc": "The timestamp object. Not in all views.", | ||
"__exemption": [ | ||
"examples" | ||
] | ||
}, | ||
"resources": { | ||
"type": "Array", | ||
"tsType": "ResourceObjectArray", | ||
"desc": "An array of resource objects", | ||
"__exemption": [ | ||
"examples" | ||
] | ||
}, | ||
"intervals": { | ||
"type": "Array", | ||
"tsType": "TimestampArray", | ||
"desc": "An array of timestamp objects of the intervals", | ||
"__exemption": [ | ||
"examples" | ||
] | ||
} | ||
} | ||
}, | ||
"event": { | ||
"type": "Object", | ||
"desc": "JS event object", | ||
"__exemption": [ | ||
"examples" | ||
] | ||
} | ||
} | ||
} | ||
} | ||
}, | ||
"contextmenu-resource-header": { | ||
"desc": "Occurs on resource header area", | ||
"applicable": [ | ||
"scheduler", | ||
"week-scheduler", | ||
"resource", | ||
"day-resource", | ||
"month-scheduler", | ||
"custom-scheduler" | ||
], | ||
"params": { | ||
"data": { | ||
"type": "Object", | ||
"desc": "The data passed to the function", | ||
"__exemption": [ | ||
"examples" | ||
], | ||
"definition": { | ||
"scope": { | ||
"type": "Object", | ||
"desc": "The scope of the event", | ||
"__exemption": [ | ||
"examples" | ||
], | ||
"definition": { | ||
"timestamp": { | ||
"type": "Object", | ||
"tsType": "Timestamp", | ||
"desc": "The timestamp object. Not in all views.", | ||
"__exemption": [ | ||
"examples" | ||
] | ||
}, | ||
"resources": { | ||
"type": "Array", | ||
"tsType": "ResourceObjectArray", | ||
"desc": "An array of resource objects", | ||
"__exemption": [ | ||
"examples" | ||
] | ||
}, | ||
"intervals": { | ||
"type": "Array", | ||
"tsType": "TimestampArray", | ||
"desc": "An array of timestamp objects of the intervals", | ||
"__exemption": [ | ||
"examples" | ||
] | ||
} | ||
} | ||
}, | ||
"event": { | ||
"type": "Object", | ||
"desc": "JS event object", | ||
"__exemption": [ | ||
"examples" | ||
] | ||
} | ||
} | ||
} | ||
} | ||
}, | ||
"mousedown-resource-header": { | ||
"desc": "Occurs on resource header area", | ||
"applicable": [ | ||
"scheduler", | ||
"week-scheduler", | ||
"resource", | ||
"day-resource", | ||
"month-scheduler", | ||
"custom-scheduler" | ||
], | ||
"params": { | ||
"data": { | ||
"type": "Object", | ||
"desc": "The data passed to the function", | ||
"__exemption": [ | ||
"examples" | ||
], | ||
"definition": { | ||
"scope": { | ||
"type": "Object", | ||
"desc": "The scope of the event", | ||
"__exemption": [ | ||
"examples" | ||
], | ||
"definition": { | ||
"timestamp": { | ||
"tsType": "Timestamp", | ||
"type": "Object", | ||
"desc": "The timestamp object. Not in all views.", | ||
"__exemption": [ | ||
"examples" | ||
] | ||
}, | ||
"resources": { | ||
"type": "Array", | ||
"tsType": "ResourceObjectArray", | ||
"desc": "An array of resource objects", | ||
"__exemption": [ | ||
"examples" | ||
] | ||
}, | ||
"intervals": { | ||
"type": "Array", | ||
"tsType": "TimestampArray", | ||
"desc": "An array of timestamp objects of the intervals", | ||
"__exemption": [ | ||
"examples" | ||
] | ||
} | ||
} | ||
}, | ||
"event": { | ||
"type": "Object", | ||
"desc": "JS event object", | ||
"__exemption": [ | ||
"examples" | ||
] | ||
} | ||
} | ||
} | ||
} | ||
}, | ||
"mouseup-resource-header": { | ||
"desc": "Occurs on resource header area", | ||
"applicable": [ | ||
"scheduler", | ||
"week-scheduler", | ||
"resource", | ||
"day-resource", | ||
"month-scheduler", | ||
"custom-scheduler" | ||
], | ||
"params": { | ||
"data": { | ||
"type": "Object", | ||
"desc": "The data passed to the function", | ||
"__exemption": [ | ||
"examples" | ||
], | ||
"definition": { | ||
"scope": { | ||
"type": "Object", | ||
"desc": "The scope of the event", | ||
"__exemption": [ | ||
"examples" | ||
], | ||
"definition": { | ||
"timestamp": { | ||
"type": "Object", | ||
"tsType": "Timestamp", | ||
"desc": "The timestamp object. Not in all views.", | ||
"__exemption": [ | ||
"examples" | ||
] | ||
}, | ||
"resources": { | ||
"type": "Array", | ||
"tsType": "ResourceObjectArray", | ||
"desc": "An array of resource objects", | ||
"__exemption": [ | ||
"examples" | ||
] | ||
}, | ||
"intervals": { | ||
"type": "Array", | ||
"tsType": "TimestampArray", | ||
"desc": "An array of timestamp objects of the intervals", | ||
"__exemption": [ | ||
"examples" | ||
] | ||
} | ||
} | ||
}, | ||
"event": { | ||
"type": "Object", | ||
"desc": "JS event object", | ||
"__exemption": [ | ||
"examples" | ||
] | ||
} | ||
} | ||
} | ||
} | ||
}, | ||
"mouseenter-resource-header": { | ||
"desc": "Occurs on resource header area", | ||
"applicable": [ | ||
"scheduler", | ||
"week-scheduler", | ||
"resource", | ||
"day-resource", | ||
"month-scheduler", | ||
"custom-scheduler" | ||
], | ||
"params": { | ||
"data": { | ||
"type": "Object", | ||
"desc": "The data passed to the function", | ||
"__exemption": [ | ||
"examples" | ||
], | ||
"definition": { | ||
"scope": { | ||
"type": "Object", | ||
"desc": "The scope of the event", | ||
"__exemption": [ | ||
"examples" | ||
], | ||
"definition": { | ||
"timestamp": { | ||
"type": "Object", | ||
"tsType": "Timestamp", | ||
"desc": "The timestamp object. Not in all views.", | ||
"__exemption": [ | ||
"examples" | ||
] | ||
}, | ||
"resources": { | ||
"type": "Array", | ||
"tsType": "ResourceObjectArray", | ||
"desc": "An array of resource objects", | ||
"__exemption": [ | ||
"examples" | ||
] | ||
}, | ||
"intervals": { | ||
"type": "Array", | ||
"tsType": "TimestampArray", | ||
"desc": "An array of timestamp objects of the intervals", | ||
"__exemption": [ | ||
"examples" | ||
] | ||
} | ||
} | ||
}, | ||
"event": { | ||
"type": "Object", | ||
"desc": "JS event object", | ||
"__exemption": [ | ||
"examples" | ||
] | ||
} | ||
} | ||
} | ||
} | ||
}, | ||
"mouseleave-resource-header": { | ||
"desc": "Occurs on resource header area", | ||
"applicable": [ | ||
"scheduler", | ||
"week-scheduler", | ||
"resource", | ||
"day-resource", | ||
"month-scheduler", | ||
"custom-scheduler" | ||
], | ||
"params": { | ||
"data": { | ||
"type": "Object", | ||
"desc": "The data passed to the function", | ||
"__exemption": [ | ||
"examples" | ||
], | ||
"definition": { | ||
"scope": { | ||
"type": "Object", | ||
"desc": "The scope of the event", | ||
"__exemption": [ | ||
"examples" | ||
], | ||
"definition": { | ||
"timestamp": { | ||
"type": "Object", | ||
"tsType": "Timestamp", | ||
"desc": "The timestamp object. Not in all views.", | ||
"__exemption": [ | ||
"examples" | ||
] | ||
}, | ||
"resources": { | ||
"type": "Array", | ||
"tsType": "ResourceObjectArray", | ||
"desc": "An array of resource objects", | ||
"__exemption": [ | ||
"examples" | ||
] | ||
}, | ||
"intervals": { | ||
"type": "Array", | ||
"tsType": "TimestampArray", | ||
"desc": "An array of timestamp objects of the intervals", | ||
"__exemption": [ | ||
"examples" | ||
] | ||
} | ||
} | ||
}, | ||
"event": { | ||
"type": "Object", | ||
"desc": "JS event object", | ||
"__exemption": [ | ||
"examples" | ||
] | ||
} | ||
} | ||
} | ||
} | ||
}, | ||
"mousemove-resource-header": { | ||
"desc": "Occurs on resource header area", | ||
"applicable": [ | ||
"scheduler", | ||
"week-scheduler", | ||
"resource", | ||
"day-resource", | ||
"month-scheduler", | ||
"custom-scheduler" | ||
], | ||
"params": { | ||
"data": { | ||
"type": "Object", | ||
"desc": "The data passed to the function", | ||
"__exemption": [ | ||
"examples" | ||
], | ||
"definition": { | ||
"scope": { | ||
"type": "Object", | ||
"desc": "The scope of the event", | ||
"__exemption": [ | ||
"examples" | ||
], | ||
"definition": { | ||
"timestamp": { | ||
"type": "Object", | ||
"tsType": "Timestamp", | ||
"desc": "The timestamp object. Not in all views.", | ||
"__exemption": [ | ||
"examples" | ||
] | ||
}, | ||
"resources": { | ||
"type": "Array", | ||
"tsType": "ResourceObjectArray", | ||
"desc": "An array of resource objects", | ||
"__exemption": [ | ||
"examples" | ||
] | ||
}, | ||
"intervals": { | ||
"type": "Array", | ||
"tsType": "TimestampArray", | ||
"desc": "An array of timestamp objects of the intervals", | ||
"__exemption": [ | ||
"examples" | ||
] | ||
} | ||
} | ||
}, | ||
"event": { | ||
"type": "Object", | ||
"desc": "JS event object", | ||
"__exemption": [ | ||
"examples" | ||
] | ||
} | ||
} | ||
} | ||
} | ||
}, | ||
"touchstart-resource-header": { | ||
"desc": "Occurs on resource header area", | ||
"applicable": [ | ||
"scheduler", | ||
"week-scheduler", | ||
"resource", | ||
"day-resource", | ||
"month-scheduler", | ||
"custom-scheduler" | ||
], | ||
"params": { | ||
"data": { | ||
"type": "Object", | ||
"desc": "The data passed to the function", | ||
"__exemption": [ | ||
"examples" | ||
], | ||
"definition": { | ||
"scope": { | ||
"type": "Object", | ||
"desc": "The scope of the event", | ||
"__exemption": [ | ||
"examples" | ||
], | ||
"definition": { | ||
"timestamp": { | ||
"type": "Object", | ||
"tsType": "Timestamp", | ||
"desc": "The timestamp object. Not in all views.", | ||
"__exemption": [ | ||
"examples" | ||
] | ||
}, | ||
"resources": { | ||
"type": "Array", | ||
"tsType": "ResourceObjectArray", | ||
"desc": "An array of resource objects", | ||
"__exemption": [ | ||
"examples" | ||
] | ||
}, | ||
"intervals": { | ||
"type": "Array", | ||
"tsType": "TimestampArray", | ||
"desc": "An array of timestamp objects of the intervals", | ||
"__exemption": [ | ||
"examples" | ||
] | ||
} | ||
} | ||
}, | ||
"event": { | ||
"type": "Object", | ||
"desc": "JS event object", | ||
"__exemption": [ | ||
"examples" | ||
] | ||
} | ||
} | ||
} | ||
} | ||
}, | ||
"touchend-resource-header": { | ||
"desc": "Occurs on resource header area", | ||
"applicable": [ | ||
"scheduler", | ||
"week-scheduler", | ||
"resource", | ||
"day-resource", | ||
"month-scheduler", | ||
"custom-scheduler" | ||
], | ||
"params": { | ||
"data": { | ||
"type": "Object", | ||
"desc": "The data passed to the function", | ||
"__exemption": [ | ||
"examples" | ||
], | ||
"definition": { | ||
"scope": { | ||
"type": "Object", | ||
"desc": "The scope of the event", | ||
"__exemption": [ | ||
"examples" | ||
], | ||
"definition": { | ||
"timestamp": { | ||
"type": "Object", | ||
"tsType": "Timestamp", | ||
"desc": "The timestamp object. Not in all views.", | ||
"__exemption": [ | ||
"examples" | ||
] | ||
}, | ||
"resources": { | ||
"type": "Array", | ||
"tsType": "ResourceObjectArray", | ||
"desc": "An array of resource objects", | ||
"__exemption": [ | ||
"examples" | ||
] | ||
}, | ||
"intervals": { | ||
"type": "Array", | ||
"tsType": "TimestampArray", | ||
"desc": "An array of timestamp objects of the intervals", | ||
"__exemption": [ | ||
"examples" | ||
] | ||
} | ||
} | ||
}, | ||
"event": { | ||
"type": "Object", | ||
"desc": "JS event object", | ||
"__exemption": [ | ||
"examples" | ||
] | ||
} | ||
} | ||
} | ||
} | ||
}, | ||
"touchmove-resource-header": { | ||
"desc": "Occurs on resource header area", | ||
"applicable": [ | ||
"scheduler", | ||
"week-scheduler", | ||
"resource", | ||
"day-resource", | ||
"month-scheduler", | ||
"custom-scheduler" | ||
], | ||
"params": { | ||
"data": { | ||
"type": "Object", | ||
"desc": "The data passed to the function", | ||
"__exemption": [ | ||
"examples" | ||
], | ||
"definition": { | ||
"scope": { | ||
"type": "Object", | ||
"desc": "The scope of the event", | ||
"__exemption": [ | ||
"examples" | ||
], | ||
"definition": { | ||
"timestamp": { | ||
"type": "Object", | ||
"tsType": "Timestamp", | ||
"desc": "The timestamp object. Not in all views.", | ||
"__exemption": [ | ||
"examples" | ||
] | ||
}, | ||
"resources": { | ||
"type": "Array", | ||
"tsType": "ResourceObjectArray", | ||
"desc": "An array of resource objects", | ||
"__exemption": [ | ||
"examples" | ||
] | ||
}, | ||
"intervals": { | ||
"type": "Array", | ||
"tsType": "TimestampArray", | ||
"desc": "An array of timestamp objects of the intervals", | ||
"__exemption": [ | ||
"examples" | ||
] | ||
} | ||
} | ||
}, | ||
"event": { | ||
"type": "Object", | ||
"desc": "JS event object", | ||
"__exemption": [ | ||
"examples" | ||
] | ||
} | ||
} | ||
} | ||
} | ||
} | ||
}, | ||
"slots": { | ||
@@ -172,2 +1619,2 @@ "resource-header": { | ||
} | ||
} | ||
} |
@@ -162,45 +162,3 @@ { | ||
}, | ||
"events": { | ||
"update:model-resources": { | ||
"type": "Array", | ||
"desc": "Emitted when the model-resources prop is updated" | ||
}, | ||
"resource-expanded": { | ||
"type": "Object", | ||
"desc": "Emitted when a resource is expanded or collapsed", | ||
"params": { | ||
"scope": { | ||
"type": "Object", | ||
"desc": "The scope object", | ||
"definition": { | ||
"resource": { | ||
"type": "Object", | ||
"desc": "The resource object" | ||
}, | ||
"timestamps": { | ||
"type": "Array", | ||
"tsType": "TimestampArray", | ||
"desc": "The array of timestamps for the intervals" | ||
}, | ||
"resourceIndex": { | ||
"type": "Number", | ||
"desc": "The index of the resource in the model-resources array" | ||
}, | ||
"indentLevel": { | ||
"type": "Number", | ||
"desc": "The indent level of the resource" | ||
}, | ||
"label": { | ||
"type": "String", | ||
"desc": "The label of the resource" | ||
} | ||
} | ||
}, | ||
"expanded": { | ||
"type": "Boolean", | ||
"desc": "True if the resource is expanded, false otherwise" | ||
} | ||
} | ||
} | ||
} | ||
"events": {} | ||
} |
@@ -92,2 +92,4 @@ { | ||
}, | ||
"default": "# null", | ||
"__runtimeDefault": true, | ||
"returns": { | ||
@@ -94,0 +96,0 @@ "type": "String", |
@@ -33,2 +33,6 @@ // interval composables | ||
export interface Resource { | ||
[key: string]: any | ||
} | ||
export interface ScopeForSlot { | ||
@@ -133,3 +137,3 @@ timestamp: Timestamp | ||
view: 'day' | 'week' | 'month' | 'month-interval' | ||
modelResources?: any[] // You might want to replace `any[]` with a more specific type. | ||
modelResources?: Resource[] | ||
resourceKey: string | ||
@@ -212,7 +216,4 @@ resourceLabel: string | ||
columnOptionsLabel?: string | ||
weekdayStyle?: (_scope: Scope) => any | ||
weekdayClass?: (_scope: Scope) => string | ||
dayStyle?: (_scope: Scope) => any | ||
dayClass?: (_scope: Scope) => string | ||
dateHeader: 'stacked' | 'inline' | 'inverted' | ||
dayHeight: number | string | ||
@@ -274,3 +275,3 @@ dayMinHeight: number | string | ||
export interface ResourceProps extends IntervalProps { | ||
modelResources?: any[] // Consider refining this type. | ||
modelResources?: Resource[] | ||
resourceKey: string | ||
@@ -287,6 +288,2 @@ resourceLabel: string | ||
export interface Resource { | ||
[key: string]: any | ||
} | ||
export const useResourceProps = { | ||
@@ -293,0 +290,0 @@ modelResources: { |
@@ -1,1 +0,1 @@ | ||
export const version = '4.1.0' | ||
export const version = '4.1.1' |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
9849297
233
204488