v-calendar-3 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (147) hide show
  1. package/LICENSE +9 -0
  2. package/README.md +142 -0
  3. package/dist/cjs/index.css +1133 -0
  4. package/dist/cjs/index.js +10699 -0
  5. package/dist/cjs/index.js.map +1 -0
  6. package/dist/cjs/package.json +1 -0
  7. package/dist/es/index.js +10678 -0
  8. package/dist/es/index.js.map +1 -0
  9. package/dist/es/style.css +1134 -0
  10. package/dist/iife/index.js +2 -0
  11. package/dist/iife/index.js.map +1 -0
  12. package/dist/mjs/index.mjs +10678 -0
  13. package/dist/mjs/index.mjs.map +1 -0
  14. package/dist/mjs/style.css +1134 -0
  15. package/dist/style.css +1134 -0
  16. package/dist/types/components/BaseIcon/BaseIcon.vue.d.ts +41 -0
  17. package/dist/types/components/BaseIcon/icons/IconChevronDown.vue.d.ts +3 -0
  18. package/dist/types/components/BaseIcon/icons/IconChevronLeft.vue.d.ts +3 -0
  19. package/dist/types/components/BaseIcon/icons/IconChevronRight.vue.d.ts +3 -0
  20. package/dist/types/components/BaseIcon/icons/IconClock.vue.d.ts +3 -0
  21. package/dist/types/components/BaseIcon/icons/index.d.ts +4 -0
  22. package/dist/types/components/BaseSelect/BaseSelect.vue.d.ts +26 -0
  23. package/dist/types/components/Calendar/Calendar.vue.d.ts +2526 -0
  24. package/dist/types/components/Calendar/CalendarDay.vue.d.ts +83 -0
  25. package/dist/types/components/Calendar/CalendarDayPopover.vue.d.ts +3 -0
  26. package/dist/types/components/Calendar/CalendarHeader.vue.d.ts +13 -0
  27. package/dist/types/components/Calendar/CalendarNav.vue.d.ts +4 -0
  28. package/dist/types/components/Calendar/CalendarNavPopover.vue.d.ts +3 -0
  29. package/dist/types/components/Calendar/CalendarPage.vue.d.ts +3 -0
  30. package/dist/types/components/Calendar/CalendarPageProvider.vue.d.ts +17 -0
  31. package/dist/types/components/Calendar/CalendarSlot.vue.d.ts +15 -0
  32. package/dist/types/components/Calendar/CalendarTitleSelect.vue.d.ts +15 -0
  33. package/dist/types/components/CalendarGrid/CalendarCell.vue.d.ts +9 -0
  34. package/dist/types/components/CalendarGrid/CalendarCellPopover.vue.d.ts +209 -0
  35. package/dist/types/components/CalendarGrid/CalendarDayCell.vue.d.ts +8 -0
  36. package/dist/types/components/CalendarGrid/CalendarEventDetails.vue.d.ts +15 -0
  37. package/dist/types/components/CalendarGrid/CalendarEventEdit.vue.d.ts +26 -0
  38. package/dist/types/components/CalendarGrid/CalendarGrid.vue.d.ts +134 -0
  39. package/dist/types/components/CalendarGrid/CalendarGridWeek.vue.d.ts +8 -0
  40. package/dist/types/components/CalendarGrid/CalendarViewSelect.vue.d.ts +3 -0
  41. package/dist/types/components/CalendarGrid/CalendarWeekCell.vue.d.ts +10 -0
  42. package/dist/types/components/CalendarGrid/Constraints.d.ts +16 -0
  43. package/dist/types/components/DatePicker/DatePicker.vue.d.ts +15251 -0
  44. package/dist/types/components/DatePicker/DatePickerBase.vue.d.ts +3 -0
  45. package/dist/types/components/DatePicker/DatePickerPopover.vue.d.ts +3 -0
  46. package/dist/types/components/DatePicker/TimePicker.vue.d.ts +10089 -0
  47. package/dist/types/components/Popover/Popover.vue.d.ts +72 -0
  48. package/dist/types/components/Popover/PopoverRow.vue.d.ts +17 -0
  49. package/dist/types/components/index.d.ts +4 -0
  50. package/dist/types/index.d.cts +40981 -0
  51. package/dist/types/index.d.mts +40981 -0
  52. package/dist/types/index.d.ts +40981 -0
  53. package/dist/types/use/base.d.ts +67 -0
  54. package/dist/types/use/calendar.d.ts +2422 -0
  55. package/dist/types/use/calendarGrid.d.ts +9370 -0
  56. package/dist/types/use/datePicker.d.ts +20210 -0
  57. package/dist/types/use/page.d.ts +20 -0
  58. package/dist/types/use/slots.d.ts +5 -0
  59. package/dist/types/use/timePicker.d.ts +10089 -0
  60. package/dist/types/utils/attribute.d.ts +49 -0
  61. package/dist/types/utils/cache.d.ts +10 -0
  62. package/dist/types/utils/calendar/event.d.ts +111 -0
  63. package/dist/types/utils/config/index.d.ts +5 -0
  64. package/dist/types/utils/date/helpers.d.ts +161 -0
  65. package/dist/types/utils/date/range.d.ts +74 -0
  66. package/dist/types/utils/date/repeat.d.ts +34 -0
  67. package/dist/types/utils/date/rules.d.ts +82 -0
  68. package/dist/types/utils/defaults/index.d.ts +30 -0
  69. package/dist/types/utils/defaults/locales.d.ts +9 -0
  70. package/dist/types/utils/glyph.d.ts +58 -0
  71. package/dist/types/utils/helpers.d.ts +49 -0
  72. package/dist/types/utils/locale.d.ts +48 -0
  73. package/dist/types/utils/page.d.ts +95 -0
  74. package/dist/types/utils/plugins/index.d.ts +4 -0
  75. package/dist/types/utils/popovers.d.ts +47 -0
  76. package/dist/types/utils/theme.d.ts +17 -0
  77. package/dist/types/utils/touch.d.ts +8 -0
  78. package/dist/types/utils/useDisplayMode.d.ts +12 -0
  79. package/dist/types/utils/watchers.d.ts +6 -0
  80. package/package.json +115 -0
  81. package/src/components/BaseIcon/BaseIcon.vue +29 -0
  82. package/src/components/BaseIcon/icons/IconChevronDown.vue +5 -0
  83. package/src/components/BaseIcon/icons/IconChevronLeft.vue +5 -0
  84. package/src/components/BaseIcon/icons/IconChevronRight.vue +5 -0
  85. package/src/components/BaseIcon/icons/IconClock.vue +11 -0
  86. package/src/components/BaseIcon/icons/index.ts +4 -0
  87. package/src/components/BaseSelect/BaseSelect.vue +136 -0
  88. package/src/components/Calendar/Calendar.vue +116 -0
  89. package/src/components/Calendar/CalendarDay.vue +422 -0
  90. package/src/components/Calendar/CalendarDayPopover.vue +44 -0
  91. package/src/components/Calendar/CalendarHeader.vue +203 -0
  92. package/src/components/Calendar/CalendarNav.vue +325 -0
  93. package/src/components/Calendar/CalendarNavPopover.vue +24 -0
  94. package/src/components/Calendar/CalendarPage.vue +140 -0
  95. package/src/components/Calendar/CalendarPageProvider.vue +15 -0
  96. package/src/components/Calendar/CalendarSlot.vue +36 -0
  97. package/src/components/Calendar/CalendarTitleSelect.vue +72 -0
  98. package/src/components/CalendarGrid/CalendarCell.vue +112 -0
  99. package/src/components/CalendarGrid/CalendarCellPopover.vue +93 -0
  100. package/src/components/CalendarGrid/CalendarDayCell.vue +57 -0
  101. package/src/components/CalendarGrid/CalendarEventDetails.vue +71 -0
  102. package/src/components/CalendarGrid/CalendarEventEdit.vue +195 -0
  103. package/src/components/CalendarGrid/CalendarGrid.vue +715 -0
  104. package/src/components/CalendarGrid/CalendarGridWeek.vue +60 -0
  105. package/src/components/CalendarGrid/CalendarViewSelect.vue +34 -0
  106. package/src/components/CalendarGrid/CalendarWeekCell.vue +52 -0
  107. package/src/components/CalendarGrid/Constraints.ts +40 -0
  108. package/src/components/DatePicker/DatePicker.vue +27 -0
  109. package/src/components/DatePicker/DatePickerBase.vue +53 -0
  110. package/src/components/DatePicker/DatePickerPopover.vue +37 -0
  111. package/src/components/DatePicker/TimePicker.vue +167 -0
  112. package/src/components/Popover/Popover.vue +572 -0
  113. package/src/components/Popover/PopoverRow.vue +94 -0
  114. package/src/components/index.ts +4 -0
  115. package/src/index.ts +24 -0
  116. package/src/styles/index.css +48 -0
  117. package/src/styles/theme.css +322 -0
  118. package/src/styles/transitions.css +77 -0
  119. package/src/use/base.ts +144 -0
  120. package/src/use/calendar.ts +796 -0
  121. package/src/use/calendarGrid.ts +954 -0
  122. package/src/use/datePicker.ts +909 -0
  123. package/src/use/page.ts +78 -0
  124. package/src/use/slots.ts +17 -0
  125. package/src/use/timePicker.ts +194 -0
  126. package/src/utils/attribute.ts +107 -0
  127. package/src/utils/cache.ts +30 -0
  128. package/src/utils/calendar/event.ts +335 -0
  129. package/src/utils/config/index.ts +11 -0
  130. package/src/utils/date/helpers.ts +1039 -0
  131. package/src/utils/date/range.ts +274 -0
  132. package/src/utils/date/repeat.ts +135 -0
  133. package/src/utils/date/rules.ts +290 -0
  134. package/src/utils/defaults/index.ts +77 -0
  135. package/src/utils/defaults/locales.ts +123 -0
  136. package/src/utils/defaults/masks.json +15 -0
  137. package/src/utils/defaults/touch.json +5 -0
  138. package/src/utils/glyph.ts +305 -0
  139. package/src/utils/helpers.ts +181 -0
  140. package/src/utils/locale.ts +275 -0
  141. package/src/utils/page.ts +608 -0
  142. package/src/utils/plugins/index.ts +24 -0
  143. package/src/utils/popovers.ts +216 -0
  144. package/src/utils/theme.ts +58 -0
  145. package/src/utils/touch.ts +72 -0
  146. package/src/utils/useDisplayMode.ts +198 -0
  147. package/src/utils/watchers.ts +26 -0
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","names":["toDate","toDate","toDate","startOfWeek","toDate","startOfWeek","toDate","getTimezoneOffsetInMilliseconds","toDate","startOfWeek","getTimezoneOffsetInMilliseconds","toDate","toDate","toDate","startOfWeek","startOfWeek","toDate","startOfWeek","toDate","toDate","MILLISECONDS_IN_HOUR","MILLISECONDS_IN_MINUTE","patterns","parseDate","$attrs","$attrs","$emit","$attrs"],"sources":["../../node_modules/lodash/_baseHas.js","../../node_modules/lodash/isArray.js","../../node_modules/lodash/_freeGlobal.js","../../node_modules/lodash/_root.js","../../node_modules/lodash/_Symbol.js","../../node_modules/lodash/_getRawTag.js","../../node_modules/lodash/_objectToString.js","../../node_modules/lodash/_baseGetTag.js","../../node_modules/lodash/isObjectLike.js","../../node_modules/lodash/isSymbol.js","../../node_modules/lodash/_isKey.js","../../node_modules/lodash/isObject.js","../../node_modules/lodash/isFunction.js","../../node_modules/lodash/_coreJsData.js","../../node_modules/lodash/_isMasked.js","../../node_modules/lodash/_toSource.js","../../node_modules/lodash/_baseIsNative.js","../../node_modules/lodash/_getValue.js","../../node_modules/lodash/_getNative.js","../../node_modules/lodash/_nativeCreate.js","../../node_modules/lodash/_hashClear.js","../../node_modules/lodash/_hashDelete.js","../../node_modules/lodash/_hashGet.js","../../node_modules/lodash/_hashHas.js","../../node_modules/lodash/_hashSet.js","../../node_modules/lodash/_Hash.js","../../node_modules/lodash/_listCacheClear.js","../../node_modules/lodash/eq.js","../../node_modules/lodash/_assocIndexOf.js","../../node_modules/lodash/_listCacheDelete.js","../../node_modules/lodash/_listCacheGet.js","../../node_modules/lodash/_listCacheHas.js","../../node_modules/lodash/_listCacheSet.js","../../node_modules/lodash/_ListCache.js","../../node_modules/lodash/_Map.js","../../node_modules/lodash/_mapCacheClear.js","../../node_modules/lodash/_isKeyable.js","../../node_modules/lodash/_getMapData.js","../../node_modules/lodash/_mapCacheDelete.js","../../node_modules/lodash/_mapCacheGet.js","../../node_modules/lodash/_mapCacheHas.js","../../node_modules/lodash/_mapCacheSet.js","../../node_modules/lodash/_MapCache.js","../../node_modules/lodash/memoize.js","../../node_modules/lodash/_memoizeCapped.js","../../node_modules/lodash/_stringToPath.js","../../node_modules/lodash/_arrayMap.js","../../node_modules/lodash/_baseToString.js","../../node_modules/lodash/toString.js","../../node_modules/lodash/_castPath.js","../../node_modules/lodash/_baseIsArguments.js","../../node_modules/lodash/isArguments.js","../../node_modules/lodash/_isIndex.js","../../node_modules/lodash/isLength.js","../../node_modules/lodash/_toKey.js","../../node_modules/lodash/_hasPath.js","../../node_modules/lodash/has.js","../../node_modules/lodash/_baseIsDate.js","../../node_modules/lodash/_baseUnary.js","../../node_modules/lodash/_nodeUtil.js","../../node_modules/lodash/isDate.js","../../node_modules/lodash/isString.js","../../node_modules/lodash/_arraySome.js","../../node_modules/lodash/_stackClear.js","../../node_modules/lodash/_stackDelete.js","../../node_modules/lodash/_stackGet.js","../../node_modules/lodash/_stackHas.js","../../node_modules/lodash/_stackSet.js","../../node_modules/lodash/_Stack.js","../../node_modules/lodash/_setCacheAdd.js","../../node_modules/lodash/_setCacheHas.js","../../node_modules/lodash/_SetCache.js","../../node_modules/lodash/_cacheHas.js","../../node_modules/lodash/_equalArrays.js","../../node_modules/lodash/_Uint8Array.js","../../node_modules/lodash/_mapToArray.js","../../node_modules/lodash/_setToArray.js","../../node_modules/lodash/_equalByTag.js","../../node_modules/lodash/_arrayPush.js","../../node_modules/lodash/_baseGetAllKeys.js","../../node_modules/lodash/_arrayFilter.js","../../node_modules/lodash/stubArray.js","../../node_modules/lodash/_getSymbols.js","../../node_modules/lodash/_baseTimes.js","../../node_modules/lodash/stubFalse.js","../../node_modules/lodash/isBuffer.js","../../node_modules/lodash/_baseIsTypedArray.js","../../node_modules/lodash/isTypedArray.js","../../node_modules/lodash/_arrayLikeKeys.js","../../node_modules/lodash/_isPrototype.js","../../node_modules/lodash/_overArg.js","../../node_modules/lodash/_nativeKeys.js","../../node_modules/lodash/_baseKeys.js","../../node_modules/lodash/isArrayLike.js","../../node_modules/lodash/keys.js","../../node_modules/lodash/_getAllKeys.js","../../node_modules/lodash/_equalObjects.js","../../node_modules/lodash/_DataView.js","../../node_modules/lodash/_Promise.js","../../node_modules/lodash/_Set.js","../../node_modules/lodash/_WeakMap.js","../../node_modules/lodash/_getTag.js","../../node_modules/lodash/_baseIsEqualDeep.js","../../node_modules/lodash/_baseIsEqual.js","../../node_modules/lodash/_baseIsMatch.js","../../node_modules/lodash/_isStrictComparable.js","../../node_modules/lodash/_getMatchData.js","../../node_modules/lodash/_matchesStrictComparable.js","../../node_modules/lodash/_baseMatches.js","../../node_modules/lodash/_baseGet.js","../../node_modules/lodash/get.js","../../node_modules/lodash/_baseHasIn.js","../../node_modules/lodash/hasIn.js","../../node_modules/lodash/_baseMatchesProperty.js","../../node_modules/lodash/identity.js","../../node_modules/lodash/_baseProperty.js","../../node_modules/lodash/_basePropertyDeep.js","../../node_modules/lodash/property.js","../../node_modules/lodash/_baseIteratee.js","../../node_modules/lodash/_createBaseFor.js","../../node_modules/lodash/_baseFor.js","../../node_modules/lodash/_baseForOwn.js","../../node_modules/lodash/_createBaseEach.js","../../node_modules/lodash/_baseEach.js","../../node_modules/lodash/_baseSome.js","../../node_modules/lodash/_isIterateeCall.js","../../node_modules/lodash/some.js","../../node_modules/lodash/isBoolean.js","../../node_modules/lodash/isNumber.js","../../node_modules/lodash/isUndefined.js","../../node_modules/lodash/_defineProperty.js","../../node_modules/lodash/_baseAssignValue.js","../../node_modules/lodash/_assignValue.js","../../node_modules/lodash/_baseSet.js","../../node_modules/lodash/set.js","../../node_modules/lodash/mapValues.js","../../node_modules/lodash/_apply.js","../../node_modules/lodash/_overRest.js","../../node_modules/lodash/constant.js","../../node_modules/lodash/_baseSetToString.js","../../node_modules/lodash/_shortOut.js","../../node_modules/lodash/_setToString.js","../../node_modules/lodash/_baseRest.js","../../node_modules/lodash/_nativeKeysIn.js","../../node_modules/lodash/_baseKeysIn.js","../../node_modules/lodash/keysIn.js","../../node_modules/lodash/defaults.js","../../node_modules/lodash/_assignMergeValue.js","../../node_modules/lodash/_cloneBuffer.js","../../node_modules/lodash/_cloneArrayBuffer.js","../../node_modules/lodash/_cloneTypedArray.js","../../node_modules/lodash/_copyArray.js","../../node_modules/lodash/_baseCreate.js","../../node_modules/lodash/_getPrototype.js","../../node_modules/lodash/_initCloneObject.js","../../node_modules/lodash/isArrayLikeObject.js","../../node_modules/lodash/isPlainObject.js","../../node_modules/lodash/_safeGet.js","../../node_modules/lodash/_copyObject.js","../../node_modules/lodash/toPlainObject.js","../../node_modules/lodash/_baseMergeDeep.js","../../node_modules/lodash/_baseMerge.js","../../node_modules/lodash/_customDefaultsMerge.js","../../node_modules/lodash/_createAssigner.js","../../node_modules/lodash/mergeWith.js","../../node_modules/lodash/defaultsDeep.js","../../node_modules/lodash/_baseMap.js","../../node_modules/lodash/map.js","../../node_modules/lodash/head.js","../../node_modules/lodash/last.js","../../src/utils/helpers.ts","../../node_modules/date-fns/constants.js","../../node_modules/date-fns/constructFrom.js","../../node_modules/date-fns/toDate.js","../../node_modules/date-fns/addDays.js","../../node_modules/date-fns/addMonths.js","../../node_modules/date-fns/_lib/defaultOptions.js","../../node_modules/date-fns/startOfWeek.js","../../node_modules/date-fns/startOfISOWeek.js","../../node_modules/date-fns/getISOWeekYear.js","../../node_modules/date-fns/_lib/getTimezoneOffsetInMilliseconds.js","../../node_modules/date-fns/_lib/normalizeDates.js","../../node_modules/date-fns/startOfISOWeekYear.js","../../node_modules/date-fns/addYears.js","../../node_modules/date-fns/differenceInCalendarWeeks.js","../../node_modules/date-fns/startOfMonth.js","../../node_modules/date-fns/getISOWeek.js","../../node_modules/date-fns/getWeekYear.js","../../node_modules/date-fns/startOfWeekYear.js","../../node_modules/date-fns/getWeek.js","../../node_modules/date-fns/lastDayOfMonth.js","../../node_modules/date-fns/getWeeksInMonth.js","../../node_modules/date-fns-tz/dist/esm/_lib/tzTokenizeDate/index.js","../../node_modules/date-fns-tz/dist/esm/_lib/newDateUTC/index.js","../../node_modules/date-fns-tz/dist/esm/_lib/tzParseTimezone/index.js","../../node_modules/date-fns-tz/dist/esm/_lib/getTimezoneOffsetInMilliseconds/index.js","../../node_modules/date-fns-tz/dist/esm/_lib/tzPattern/index.js","../../node_modules/date-fns-tz/dist/esm/toDate/index.js","../../node_modules/date-fns-tz/dist/esm/toZonedTime/index.js","../../node_modules/date-fns-tz/dist/esm/fromZonedTime/index.js","../../src/utils/page.ts","../../src/utils/cache.ts","../../src/utils/date/range.ts","../../src/utils/defaults/locales.ts","../../src/utils/defaults/masks.json","../../src/utils/defaults/touch.json","../../src/utils/defaults/index.ts","../../src/utils/locale.ts","../../src/utils/date/rules.ts","../../src/utils/date/repeat.ts","../../src/utils/date/helpers.ts","../../src/utils/attribute.ts","../../src/utils/popovers.ts","../../src/utils/touch.ts","../../src/utils/watchers.ts","../../src/utils/glyph.ts","../../src/utils/theme.ts","../../src/utils/useDisplayMode.ts","../../src/use/base.ts","../../src/use/slots.ts","../../src/use/calendar.ts","../../src/components/Popover/Popover.vue","../../src/components/Popover/Popover.vue","../../src/components/Popover/PopoverRow.vue","../../src/components/Popover/PopoverRow.vue","../../src/components/Calendar/CalendarSlot.vue","../../src/components/Calendar/CalendarSlot.vue","../../src/components/Calendar/CalendarDayPopover.vue","../../src/components/Calendar/CalendarDayPopover.vue","../../src/components/BaseIcon/icons/IconChevronRight.vue","../../src/components/BaseIcon/icons/IconChevronLeft.vue","../../src/components/BaseIcon/icons/IconChevronDown.vue","../../src/components/BaseIcon/icons/IconClock.vue","../../src/components/BaseIcon/icons/index.ts","../../src/components/BaseIcon/BaseIcon.vue","../../src/components/BaseIcon/BaseIcon.vue","../../src/components/Calendar/CalendarHeader.vue","../../src/components/Calendar/CalendarHeader.vue","../../src/use/page.ts","../../src/components/Calendar/CalendarNav.vue","../../src/components/Calendar/CalendarNav.vue","../../src/components/Calendar/CalendarPageProvider.vue","../../src/components/Calendar/CalendarPageProvider.vue","../../src/components/Calendar/CalendarNavPopover.vue","../../src/components/Calendar/CalendarNavPopover.vue","../../src/components/Calendar/CalendarDay.vue","../../src/components/Calendar/CalendarDay.vue","../../src/components/Calendar/CalendarPage.vue","../../src/components/Calendar/CalendarPage.vue","../../src/components/Calendar/Calendar.vue","../../src/components/Calendar/Calendar.vue","../../src/use/datePicker.ts","../../src/use/timePicker.ts","../../src/components/BaseSelect/BaseSelect.vue","../../src/components/BaseSelect/BaseSelect.vue","../../src/components/DatePicker/TimePicker.vue","../../src/components/DatePicker/TimePicker.vue","../../src/components/DatePicker/DatePickerBase.vue","../../src/components/DatePicker/DatePickerBase.vue","../../src/components/DatePicker/DatePickerPopover.vue","../../src/components/DatePicker/DatePickerPopover.vue","../../src/components/DatePicker/DatePicker.vue","../../src/components/DatePicker/DatePicker.vue","../../src/components/index.ts","../../src/utils/config/index.ts","../../src/index.ts"],"sourcesContent":["/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * The base implementation of `_.has` without support for deep paths.\n *\n * @private\n * @param {Object} [object] The object to query.\n * @param {Array|string} key The key to check.\n * @returns {boolean} Returns `true` if `key` exists, else `false`.\n */\nfunction baseHas(object, key) {\n return object != null && hasOwnProperty.call(object, key);\n}\n\nmodule.exports = baseHas;\n","/**\n * Checks if `value` is classified as an `Array` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an array, else `false`.\n * @example\n *\n * _.isArray([1, 2, 3]);\n * // => true\n *\n * _.isArray(document.body.children);\n * // => false\n *\n * _.isArray('abc');\n * // => false\n *\n * _.isArray(_.noop);\n * // => false\n */\nvar isArray = Array.isArray;\n\nmodule.exports = isArray;\n","/** Detect free variable `global` from Node.js. */\nvar freeGlobal = typeof global == 'object' && global && global.Object === Object && global;\n\nmodule.exports = freeGlobal;\n","var freeGlobal = require('./_freeGlobal');\n\n/** Detect free variable `self`. */\nvar freeSelf = typeof self == 'object' && self && self.Object === Object && self;\n\n/** Used as a reference to the global object. */\nvar root = freeGlobal || freeSelf || Function('return this')();\n\nmodule.exports = root;\n","var root = require('./_root');\n\n/** Built-in value references. */\nvar Symbol = root.Symbol;\n\nmodule.exports = Symbol;\n","var Symbol = require('./_Symbol');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString = objectProto.toString;\n\n/** Built-in value references. */\nvar symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\n/**\n * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the raw `toStringTag`.\n */\nfunction getRawTag(value) {\n var isOwn = hasOwnProperty.call(value, symToStringTag),\n tag = value[symToStringTag];\n\n try {\n value[symToStringTag] = undefined;\n var unmasked = true;\n } catch (e) {}\n\n var result = nativeObjectToString.call(value);\n if (unmasked) {\n if (isOwn) {\n value[symToStringTag] = tag;\n } else {\n delete value[symToStringTag];\n }\n }\n return result;\n}\n\nmodule.exports = getRawTag;\n","/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString = objectProto.toString;\n\n/**\n * Converts `value` to a string using `Object.prototype.toString`.\n *\n * @private\n * @param {*} value The value to convert.\n * @returns {string} Returns the converted string.\n */\nfunction objectToString(value) {\n return nativeObjectToString.call(value);\n}\n\nmodule.exports = objectToString;\n","var Symbol = require('./_Symbol'),\n getRawTag = require('./_getRawTag'),\n objectToString = require('./_objectToString');\n\n/** `Object#toString` result references. */\nvar nullTag = '[object Null]',\n undefinedTag = '[object Undefined]';\n\n/** Built-in value references. */\nvar symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\n/**\n * The base implementation of `getTag` without fallbacks for buggy environments.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\nfunction baseGetTag(value) {\n if (value == null) {\n return value === undefined ? undefinedTag : nullTag;\n }\n return (symToStringTag && symToStringTag in Object(value))\n ? getRawTag(value)\n : objectToString(value);\n}\n\nmodule.exports = baseGetTag;\n","/**\n * Checks if `value` is object-like. A value is object-like if it's not `null`\n * and has a `typeof` result of \"object\".\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n * @example\n *\n * _.isObjectLike({});\n * // => true\n *\n * _.isObjectLike([1, 2, 3]);\n * // => true\n *\n * _.isObjectLike(_.noop);\n * // => false\n *\n * _.isObjectLike(null);\n * // => false\n */\nfunction isObjectLike(value) {\n return value != null && typeof value == 'object';\n}\n\nmodule.exports = isObjectLike;\n","var baseGetTag = require('./_baseGetTag'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar symbolTag = '[object Symbol]';\n\n/**\n * Checks if `value` is classified as a `Symbol` primitive or object.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.\n * @example\n *\n * _.isSymbol(Symbol.iterator);\n * // => true\n *\n * _.isSymbol('abc');\n * // => false\n */\nfunction isSymbol(value) {\n return typeof value == 'symbol' ||\n (isObjectLike(value) && baseGetTag(value) == symbolTag);\n}\n\nmodule.exports = isSymbol;\n","var isArray = require('./isArray'),\n isSymbol = require('./isSymbol');\n\n/** Used to match property names within property paths. */\nvar reIsDeepProp = /\\.|\\[(?:[^[\\]]*|([\"'])(?:(?!\\1)[^\\\\]|\\\\.)*?\\1)\\]/,\n reIsPlainProp = /^\\w*$/;\n\n/**\n * Checks if `value` is a property name and not a property path.\n *\n * @private\n * @param {*} value The value to check.\n * @param {Object} [object] The object to query keys on.\n * @returns {boolean} Returns `true` if `value` is a property name, else `false`.\n */\nfunction isKey(value, object) {\n if (isArray(value)) {\n return false;\n }\n var type = typeof value;\n if (type == 'number' || type == 'symbol' || type == 'boolean' ||\n value == null || isSymbol(value)) {\n return true;\n }\n return reIsPlainProp.test(value) || !reIsDeepProp.test(value) ||\n (object != null && value in Object(object));\n}\n\nmodule.exports = isKey;\n","/**\n * Checks if `value` is the\n * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)\n * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an object, else `false`.\n * @example\n *\n * _.isObject({});\n * // => true\n *\n * _.isObject([1, 2, 3]);\n * // => true\n *\n * _.isObject(_.noop);\n * // => true\n *\n * _.isObject(null);\n * // => false\n */\nfunction isObject(value) {\n var type = typeof value;\n return value != null && (type == 'object' || type == 'function');\n}\n\nmodule.exports = isObject;\n","var baseGetTag = require('./_baseGetTag'),\n isObject = require('./isObject');\n\n/** `Object#toString` result references. */\nvar asyncTag = '[object AsyncFunction]',\n funcTag = '[object Function]',\n genTag = '[object GeneratorFunction]',\n proxyTag = '[object Proxy]';\n\n/**\n * Checks if `value` is classified as a `Function` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a function, else `false`.\n * @example\n *\n * _.isFunction(_);\n * // => true\n *\n * _.isFunction(/abc/);\n * // => false\n */\nfunction isFunction(value) {\n if (!isObject(value)) {\n return false;\n }\n // The use of `Object#toString` avoids issues with the `typeof` operator\n // in Safari 9 which returns 'object' for typed arrays and other constructors.\n var tag = baseGetTag(value);\n return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;\n}\n\nmodule.exports = isFunction;\n","var root = require('./_root');\n\n/** Used to detect overreaching core-js shims. */\nvar coreJsData = root['__core-js_shared__'];\n\nmodule.exports = coreJsData;\n","var coreJsData = require('./_coreJsData');\n\n/** Used to detect methods masquerading as native. */\nvar maskSrcKey = (function() {\n var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');\n return uid ? ('Symbol(src)_1.' + uid) : '';\n}());\n\n/**\n * Checks if `func` has its source masked.\n *\n * @private\n * @param {Function} func The function to check.\n * @returns {boolean} Returns `true` if `func` is masked, else `false`.\n */\nfunction isMasked(func) {\n return !!maskSrcKey && (maskSrcKey in func);\n}\n\nmodule.exports = isMasked;\n","/** Used for built-in method references. */\nvar funcProto = Function.prototype;\n\n/** Used to resolve the decompiled source of functions. */\nvar funcToString = funcProto.toString;\n\n/**\n * Converts `func` to its source code.\n *\n * @private\n * @param {Function} func The function to convert.\n * @returns {string} Returns the source code.\n */\nfunction toSource(func) {\n if (func != null) {\n try {\n return funcToString.call(func);\n } catch (e) {}\n try {\n return (func + '');\n } catch (e) {}\n }\n return '';\n}\n\nmodule.exports = toSource;\n","var isFunction = require('./isFunction'),\n isMasked = require('./_isMasked'),\n isObject = require('./isObject'),\n toSource = require('./_toSource');\n\n/**\n * Used to match `RegExp`\n * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).\n */\nvar reRegExpChar = /[\\\\^$.*+?()[\\]{}|]/g;\n\n/** Used to detect host constructors (Safari). */\nvar reIsHostCtor = /^\\[object .+?Constructor\\]$/;\n\n/** Used for built-in method references. */\nvar funcProto = Function.prototype,\n objectProto = Object.prototype;\n\n/** Used to resolve the decompiled source of functions. */\nvar funcToString = funcProto.toString;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/** Used to detect if a method is native. */\nvar reIsNative = RegExp('^' +\n funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\\\$&')\n .replace(/hasOwnProperty|(function).*?(?=\\\\\\()| for .+?(?=\\\\\\])/g, '$1.*?') + '$'\n);\n\n/**\n * The base implementation of `_.isNative` without bad shim checks.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a native function,\n * else `false`.\n */\nfunction baseIsNative(value) {\n if (!isObject(value) || isMasked(value)) {\n return false;\n }\n var pattern = isFunction(value) ? reIsNative : reIsHostCtor;\n return pattern.test(toSource(value));\n}\n\nmodule.exports = baseIsNative;\n","/**\n * Gets the value at `key` of `object`.\n *\n * @private\n * @param {Object} [object] The object to query.\n * @param {string} key The key of the property to get.\n * @returns {*} Returns the property value.\n */\nfunction getValue(object, key) {\n return object == null ? undefined : object[key];\n}\n\nmodule.exports = getValue;\n","var baseIsNative = require('./_baseIsNative'),\n getValue = require('./_getValue');\n\n/**\n * Gets the native function at `key` of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {string} key The key of the method to get.\n * @returns {*} Returns the function if it's native, else `undefined`.\n */\nfunction getNative(object, key) {\n var value = getValue(object, key);\n return baseIsNative(value) ? value : undefined;\n}\n\nmodule.exports = getNative;\n","var getNative = require('./_getNative');\n\n/* Built-in method references that are verified to be native. */\nvar nativeCreate = getNative(Object, 'create');\n\nmodule.exports = nativeCreate;\n","var nativeCreate = require('./_nativeCreate');\n\n/**\n * Removes all key-value entries from the hash.\n *\n * @private\n * @name clear\n * @memberOf Hash\n */\nfunction hashClear() {\n this.__data__ = nativeCreate ? nativeCreate(null) : {};\n this.size = 0;\n}\n\nmodule.exports = hashClear;\n","/**\n * Removes `key` and its value from the hash.\n *\n * @private\n * @name delete\n * @memberOf Hash\n * @param {Object} hash The hash to modify.\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction hashDelete(key) {\n var result = this.has(key) && delete this.__data__[key];\n this.size -= result ? 1 : 0;\n return result;\n}\n\nmodule.exports = hashDelete;\n","var nativeCreate = require('./_nativeCreate');\n\n/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Gets the hash value for `key`.\n *\n * @private\n * @name get\n * @memberOf Hash\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction hashGet(key) {\n var data = this.__data__;\n if (nativeCreate) {\n var result = data[key];\n return result === HASH_UNDEFINED ? undefined : result;\n }\n return hasOwnProperty.call(data, key) ? data[key] : undefined;\n}\n\nmodule.exports = hashGet;\n","var nativeCreate = require('./_nativeCreate');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Checks if a hash value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf Hash\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction hashHas(key) {\n var data = this.__data__;\n return nativeCreate ? (data[key] !== undefined) : hasOwnProperty.call(data, key);\n}\n\nmodule.exports = hashHas;\n","var nativeCreate = require('./_nativeCreate');\n\n/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n/**\n * Sets the hash `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf Hash\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the hash instance.\n */\nfunction hashSet(key, value) {\n var data = this.__data__;\n this.size += this.has(key) ? 0 : 1;\n data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value;\n return this;\n}\n\nmodule.exports = hashSet;\n","var hashClear = require('./_hashClear'),\n hashDelete = require('./_hashDelete'),\n hashGet = require('./_hashGet'),\n hashHas = require('./_hashHas'),\n hashSet = require('./_hashSet');\n\n/**\n * Creates a hash object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction Hash(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n// Add methods to `Hash`.\nHash.prototype.clear = hashClear;\nHash.prototype['delete'] = hashDelete;\nHash.prototype.get = hashGet;\nHash.prototype.has = hashHas;\nHash.prototype.set = hashSet;\n\nmodule.exports = Hash;\n","/**\n * Removes all key-value entries from the list cache.\n *\n * @private\n * @name clear\n * @memberOf ListCache\n */\nfunction listCacheClear() {\n this.__data__ = [];\n this.size = 0;\n}\n\nmodule.exports = listCacheClear;\n","/**\n * Performs a\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * comparison between two values to determine if they are equivalent.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n * @example\n *\n * var object = { 'a': 1 };\n * var other = { 'a': 1 };\n *\n * _.eq(object, object);\n * // => true\n *\n * _.eq(object, other);\n * // => false\n *\n * _.eq('a', 'a');\n * // => true\n *\n * _.eq('a', Object('a'));\n * // => false\n *\n * _.eq(NaN, NaN);\n * // => true\n */\nfunction eq(value, other) {\n return value === other || (value !== value && other !== other);\n}\n\nmodule.exports = eq;\n","var eq = require('./eq');\n\n/**\n * Gets the index at which the `key` is found in `array` of key-value pairs.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} key The key to search for.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\nfunction assocIndexOf(array, key) {\n var length = array.length;\n while (length--) {\n if (eq(array[length][0], key)) {\n return length;\n }\n }\n return -1;\n}\n\nmodule.exports = assocIndexOf;\n","var assocIndexOf = require('./_assocIndexOf');\n\n/** Used for built-in method references. */\nvar arrayProto = Array.prototype;\n\n/** Built-in value references. */\nvar splice = arrayProto.splice;\n\n/**\n * Removes `key` and its value from the list cache.\n *\n * @private\n * @name delete\n * @memberOf ListCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction listCacheDelete(key) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n if (index < 0) {\n return false;\n }\n var lastIndex = data.length - 1;\n if (index == lastIndex) {\n data.pop();\n } else {\n splice.call(data, index, 1);\n }\n --this.size;\n return true;\n}\n\nmodule.exports = listCacheDelete;\n","var assocIndexOf = require('./_assocIndexOf');\n\n/**\n * Gets the list cache value for `key`.\n *\n * @private\n * @name get\n * @memberOf ListCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction listCacheGet(key) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n return index < 0 ? undefined : data[index][1];\n}\n\nmodule.exports = listCacheGet;\n","var assocIndexOf = require('./_assocIndexOf');\n\n/**\n * Checks if a list cache value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf ListCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction listCacheHas(key) {\n return assocIndexOf(this.__data__, key) > -1;\n}\n\nmodule.exports = listCacheHas;\n","var assocIndexOf = require('./_assocIndexOf');\n\n/**\n * Sets the list cache `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf ListCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the list cache instance.\n */\nfunction listCacheSet(key, value) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n if (index < 0) {\n ++this.size;\n data.push([key, value]);\n } else {\n data[index][1] = value;\n }\n return this;\n}\n\nmodule.exports = listCacheSet;\n","var listCacheClear = require('./_listCacheClear'),\n listCacheDelete = require('./_listCacheDelete'),\n listCacheGet = require('./_listCacheGet'),\n listCacheHas = require('./_listCacheHas'),\n listCacheSet = require('./_listCacheSet');\n\n/**\n * Creates an list cache object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction ListCache(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n// Add methods to `ListCache`.\nListCache.prototype.clear = listCacheClear;\nListCache.prototype['delete'] = listCacheDelete;\nListCache.prototype.get = listCacheGet;\nListCache.prototype.has = listCacheHas;\nListCache.prototype.set = listCacheSet;\n\nmodule.exports = ListCache;\n","var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar Map = getNative(root, 'Map');\n\nmodule.exports = Map;\n","var Hash = require('./_Hash'),\n ListCache = require('./_ListCache'),\n Map = require('./_Map');\n\n/**\n * Removes all key-value entries from the map.\n *\n * @private\n * @name clear\n * @memberOf MapCache\n */\nfunction mapCacheClear() {\n this.size = 0;\n this.__data__ = {\n 'hash': new Hash,\n 'map': new (Map || ListCache),\n 'string': new Hash\n };\n}\n\nmodule.exports = mapCacheClear;\n","/**\n * Checks if `value` is suitable for use as unique object key.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is suitable, else `false`.\n */\nfunction isKeyable(value) {\n var type = typeof value;\n return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')\n ? (value !== '__proto__')\n : (value === null);\n}\n\nmodule.exports = isKeyable;\n","var isKeyable = require('./_isKeyable');\n\n/**\n * Gets the data for `map`.\n *\n * @private\n * @param {Object} map The map to query.\n * @param {string} key The reference key.\n * @returns {*} Returns the map data.\n */\nfunction getMapData(map, key) {\n var data = map.__data__;\n return isKeyable(key)\n ? data[typeof key == 'string' ? 'string' : 'hash']\n : data.map;\n}\n\nmodule.exports = getMapData;\n","var getMapData = require('./_getMapData');\n\n/**\n * Removes `key` and its value from the map.\n *\n * @private\n * @name delete\n * @memberOf MapCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction mapCacheDelete(key) {\n var result = getMapData(this, key)['delete'](key);\n this.size -= result ? 1 : 0;\n return result;\n}\n\nmodule.exports = mapCacheDelete;\n","var getMapData = require('./_getMapData');\n\n/**\n * Gets the map value for `key`.\n *\n * @private\n * @name get\n * @memberOf MapCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction mapCacheGet(key) {\n return getMapData(this, key).get(key);\n}\n\nmodule.exports = mapCacheGet;\n","var getMapData = require('./_getMapData');\n\n/**\n * Checks if a map value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf MapCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction mapCacheHas(key) {\n return getMapData(this, key).has(key);\n}\n\nmodule.exports = mapCacheHas;\n","var getMapData = require('./_getMapData');\n\n/**\n * Sets the map `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf MapCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the map cache instance.\n */\nfunction mapCacheSet(key, value) {\n var data = getMapData(this, key),\n size = data.size;\n\n data.set(key, value);\n this.size += data.size == size ? 0 : 1;\n return this;\n}\n\nmodule.exports = mapCacheSet;\n","var mapCacheClear = require('./_mapCacheClear'),\n mapCacheDelete = require('./_mapCacheDelete'),\n mapCacheGet = require('./_mapCacheGet'),\n mapCacheHas = require('./_mapCacheHas'),\n mapCacheSet = require('./_mapCacheSet');\n\n/**\n * Creates a map cache object to store key-value pairs.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction MapCache(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n// Add methods to `MapCache`.\nMapCache.prototype.clear = mapCacheClear;\nMapCache.prototype['delete'] = mapCacheDelete;\nMapCache.prototype.get = mapCacheGet;\nMapCache.prototype.has = mapCacheHas;\nMapCache.prototype.set = mapCacheSet;\n\nmodule.exports = MapCache;\n","var MapCache = require('./_MapCache');\n\n/** Error message constants. */\nvar FUNC_ERROR_TEXT = 'Expected a function';\n\n/**\n * Creates a function that memoizes the result of `func`. If `resolver` is\n * provided, it determines the cache key for storing the result based on the\n * arguments provided to the memoized function. By default, the first argument\n * provided to the memoized function is used as the map cache key. The `func`\n * is invoked with the `this` binding of the memoized function.\n *\n * **Note:** The cache is exposed as the `cache` property on the memoized\n * function. Its creation may be customized by replacing the `_.memoize.Cache`\n * constructor with one whose instances implement the\n * [`Map`](http://ecma-international.org/ecma-262/7.0/#sec-properties-of-the-map-prototype-object)\n * method interface of `clear`, `delete`, `get`, `has`, and `set`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to have its output memoized.\n * @param {Function} [resolver] The function to resolve the cache key.\n * @returns {Function} Returns the new memoized function.\n * @example\n *\n * var object = { 'a': 1, 'b': 2 };\n * var other = { 'c': 3, 'd': 4 };\n *\n * var values = _.memoize(_.values);\n * values(object);\n * // => [1, 2]\n *\n * values(other);\n * // => [3, 4]\n *\n * object.a = 2;\n * values(object);\n * // => [1, 2]\n *\n * // Modify the result cache.\n * values.cache.set(object, ['a', 'b']);\n * values(object);\n * // => ['a', 'b']\n *\n * // Replace `_.memoize.Cache`.\n * _.memoize.Cache = WeakMap;\n */\nfunction memoize(func, resolver) {\n if (typeof func != 'function' || (resolver != null && typeof resolver != 'function')) {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n var memoized = function() {\n var args = arguments,\n key = resolver ? resolver.apply(this, args) : args[0],\n cache = memoized.cache;\n\n if (cache.has(key)) {\n return cache.get(key);\n }\n var result = func.apply(this, args);\n memoized.cache = cache.set(key, result) || cache;\n return result;\n };\n memoized.cache = new (memoize.Cache || MapCache);\n return memoized;\n}\n\n// Expose `MapCache`.\nmemoize.Cache = MapCache;\n\nmodule.exports = memoize;\n","var memoize = require('./memoize');\n\n/** Used as the maximum memoize cache size. */\nvar MAX_MEMOIZE_SIZE = 500;\n\n/**\n * A specialized version of `_.memoize` which clears the memoized function's\n * cache when it exceeds `MAX_MEMOIZE_SIZE`.\n *\n * @private\n * @param {Function} func The function to have its output memoized.\n * @returns {Function} Returns the new memoized function.\n */\nfunction memoizeCapped(func) {\n var result = memoize(func, function(key) {\n if (cache.size === MAX_MEMOIZE_SIZE) {\n cache.clear();\n }\n return key;\n });\n\n var cache = result.cache;\n return result;\n}\n\nmodule.exports = memoizeCapped;\n","var memoizeCapped = require('./_memoizeCapped');\n\n/** Used to match property names within property paths. */\nvar rePropName = /[^.[\\]]+|\\[(?:(-?\\d+(?:\\.\\d+)?)|([\"'])((?:(?!\\2)[^\\\\]|\\\\.)*?)\\2)\\]|(?=(?:\\.|\\[\\])(?:\\.|\\[\\]|$))/g;\n\n/** Used to match backslashes in property paths. */\nvar reEscapeChar = /\\\\(\\\\)?/g;\n\n/**\n * Converts `string` to a property path array.\n *\n * @private\n * @param {string} string The string to convert.\n * @returns {Array} Returns the property path array.\n */\nvar stringToPath = memoizeCapped(function(string) {\n var result = [];\n if (string.charCodeAt(0) === 46 /* . */) {\n result.push('');\n }\n string.replace(rePropName, function(match, number, quote, subString) {\n result.push(quote ? subString.replace(reEscapeChar, '$1') : (number || match));\n });\n return result;\n});\n\nmodule.exports = stringToPath;\n","/**\n * A specialized version of `_.map` for arrays without support for iteratee\n * shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns the new mapped array.\n */\nfunction arrayMap(array, iteratee) {\n var index = -1,\n length = array == null ? 0 : array.length,\n result = Array(length);\n\n while (++index < length) {\n result[index] = iteratee(array[index], index, array);\n }\n return result;\n}\n\nmodule.exports = arrayMap;\n","var Symbol = require('./_Symbol'),\n arrayMap = require('./_arrayMap'),\n isArray = require('./isArray'),\n isSymbol = require('./isSymbol');\n\n/** Used as references for various `Number` constants. */\nvar INFINITY = 1 / 0;\n\n/** Used to convert symbols to primitives and strings. */\nvar symbolProto = Symbol ? Symbol.prototype : undefined,\n symbolToString = symbolProto ? symbolProto.toString : undefined;\n\n/**\n * The base implementation of `_.toString` which doesn't convert nullish\n * values to empty strings.\n *\n * @private\n * @param {*} value The value to process.\n * @returns {string} Returns the string.\n */\nfunction baseToString(value) {\n // Exit early for strings to avoid a performance hit in some environments.\n if (typeof value == 'string') {\n return value;\n }\n if (isArray(value)) {\n // Recursively convert values (susceptible to call stack limits).\n return arrayMap(value, baseToString) + '';\n }\n if (isSymbol(value)) {\n return symbolToString ? symbolToString.call(value) : '';\n }\n var result = (value + '');\n return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;\n}\n\nmodule.exports = baseToString;\n","var baseToString = require('./_baseToString');\n\n/**\n * Converts `value` to a string. An empty string is returned for `null`\n * and `undefined` values. The sign of `-0` is preserved.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to convert.\n * @returns {string} Returns the converted string.\n * @example\n *\n * _.toString(null);\n * // => ''\n *\n * _.toString(-0);\n * // => '-0'\n *\n * _.toString([1, 2, 3]);\n * // => '1,2,3'\n */\nfunction toString(value) {\n return value == null ? '' : baseToString(value);\n}\n\nmodule.exports = toString;\n","var isArray = require('./isArray'),\n isKey = require('./_isKey'),\n stringToPath = require('./_stringToPath'),\n toString = require('./toString');\n\n/**\n * Casts `value` to a path array if it's not one.\n *\n * @private\n * @param {*} value The value to inspect.\n * @param {Object} [object] The object to query keys on.\n * @returns {Array} Returns the cast property path array.\n */\nfunction castPath(value, object) {\n if (isArray(value)) {\n return value;\n }\n return isKey(value, object) ? [value] : stringToPath(toString(value));\n}\n\nmodule.exports = castPath;\n","var baseGetTag = require('./_baseGetTag'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]';\n\n/**\n * The base implementation of `_.isArguments`.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an `arguments` object,\n */\nfunction baseIsArguments(value) {\n return isObjectLike(value) && baseGetTag(value) == argsTag;\n}\n\nmodule.exports = baseIsArguments;\n","var baseIsArguments = require('./_baseIsArguments'),\n isObjectLike = require('./isObjectLike');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/** Built-in value references. */\nvar propertyIsEnumerable = objectProto.propertyIsEnumerable;\n\n/**\n * Checks if `value` is likely an `arguments` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an `arguments` object,\n * else `false`.\n * @example\n *\n * _.isArguments(function() { return arguments; }());\n * // => true\n *\n * _.isArguments([1, 2, 3]);\n * // => false\n */\nvar isArguments = baseIsArguments(function() { return arguments; }()) ? baseIsArguments : function(value) {\n return isObjectLike(value) && hasOwnProperty.call(value, 'callee') &&\n !propertyIsEnumerable.call(value, 'callee');\n};\n\nmodule.exports = isArguments;\n","/** Used as references for various `Number` constants. */\nvar MAX_SAFE_INTEGER = 9007199254740991;\n\n/** Used to detect unsigned integer values. */\nvar reIsUint = /^(?:0|[1-9]\\d*)$/;\n\n/**\n * Checks if `value` is a valid array-like index.\n *\n * @private\n * @param {*} value The value to check.\n * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.\n * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.\n */\nfunction isIndex(value, length) {\n var type = typeof value;\n length = length == null ? MAX_SAFE_INTEGER : length;\n\n return !!length &&\n (type == 'number' ||\n (type != 'symbol' && reIsUint.test(value))) &&\n (value > -1 && value % 1 == 0 && value < length);\n}\n\nmodule.exports = isIndex;\n","/** Used as references for various `Number` constants. */\nvar MAX_SAFE_INTEGER = 9007199254740991;\n\n/**\n * Checks if `value` is a valid array-like length.\n *\n * **Note:** This method is loosely based on\n * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.\n * @example\n *\n * _.isLength(3);\n * // => true\n *\n * _.isLength(Number.MIN_VALUE);\n * // => false\n *\n * _.isLength(Infinity);\n * // => false\n *\n * _.isLength('3');\n * // => false\n */\nfunction isLength(value) {\n return typeof value == 'number' &&\n value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;\n}\n\nmodule.exports = isLength;\n","var isSymbol = require('./isSymbol');\n\n/** Used as references for various `Number` constants. */\nvar INFINITY = 1 / 0;\n\n/**\n * Converts `value` to a string key if it's not a string or symbol.\n *\n * @private\n * @param {*} value The value to inspect.\n * @returns {string|symbol} Returns the key.\n */\nfunction toKey(value) {\n if (typeof value == 'string' || isSymbol(value)) {\n return value;\n }\n var result = (value + '');\n return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;\n}\n\nmodule.exports = toKey;\n","var castPath = require('./_castPath'),\n isArguments = require('./isArguments'),\n isArray = require('./isArray'),\n isIndex = require('./_isIndex'),\n isLength = require('./isLength'),\n toKey = require('./_toKey');\n\n/**\n * Checks if `path` exists on `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Array|string} path The path to check.\n * @param {Function} hasFunc The function to check properties.\n * @returns {boolean} Returns `true` if `path` exists, else `false`.\n */\nfunction hasPath(object, path, hasFunc) {\n path = castPath(path, object);\n\n var index = -1,\n length = path.length,\n result = false;\n\n while (++index < length) {\n var key = toKey(path[index]);\n if (!(result = object != null && hasFunc(object, key))) {\n break;\n }\n object = object[key];\n }\n if (result || ++index != length) {\n return result;\n }\n length = object == null ? 0 : object.length;\n return !!length && isLength(length) && isIndex(key, length) &&\n (isArray(object) || isArguments(object));\n}\n\nmodule.exports = hasPath;\n","var baseHas = require('./_baseHas'),\n hasPath = require('./_hasPath');\n\n/**\n * Checks if `path` is a direct property of `object`.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Object\n * @param {Object} object The object to query.\n * @param {Array|string} path The path to check.\n * @returns {boolean} Returns `true` if `path` exists, else `false`.\n * @example\n *\n * var object = { 'a': { 'b': 2 } };\n * var other = _.create({ 'a': _.create({ 'b': 2 }) });\n *\n * _.has(object, 'a');\n * // => true\n *\n * _.has(object, 'a.b');\n * // => true\n *\n * _.has(object, ['a', 'b']);\n * // => true\n *\n * _.has(other, 'a');\n * // => false\n */\nfunction has(object, path) {\n return object != null && hasPath(object, path, baseHas);\n}\n\nmodule.exports = has;\n","var baseGetTag = require('./_baseGetTag'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar dateTag = '[object Date]';\n\n/**\n * The base implementation of `_.isDate` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a date object, else `false`.\n */\nfunction baseIsDate(value) {\n return isObjectLike(value) && baseGetTag(value) == dateTag;\n}\n\nmodule.exports = baseIsDate;\n","/**\n * The base implementation of `_.unary` without support for storing metadata.\n *\n * @private\n * @param {Function} func The function to cap arguments for.\n * @returns {Function} Returns the new capped function.\n */\nfunction baseUnary(func) {\n return function(value) {\n return func(value);\n };\n}\n\nmodule.exports = baseUnary;\n","var freeGlobal = require('./_freeGlobal');\n\n/** Detect free variable `exports`. */\nvar freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;\n\n/** Detect free variable `module`. */\nvar freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;\n\n/** Detect the popular CommonJS extension `module.exports`. */\nvar moduleExports = freeModule && freeModule.exports === freeExports;\n\n/** Detect free variable `process` from Node.js. */\nvar freeProcess = moduleExports && freeGlobal.process;\n\n/** Used to access faster Node.js helpers. */\nvar nodeUtil = (function() {\n try {\n // Use `util.types` for Node.js 10+.\n var types = freeModule && freeModule.require && freeModule.require('util').types;\n\n if (types) {\n return types;\n }\n\n // Legacy `process.binding('util')` for Node.js < 10.\n return freeProcess && freeProcess.binding && freeProcess.binding('util');\n } catch (e) {}\n}());\n\nmodule.exports = nodeUtil;\n","var baseIsDate = require('./_baseIsDate'),\n baseUnary = require('./_baseUnary'),\n nodeUtil = require('./_nodeUtil');\n\n/* Node.js helper references. */\nvar nodeIsDate = nodeUtil && nodeUtil.isDate;\n\n/**\n * Checks if `value` is classified as a `Date` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a date object, else `false`.\n * @example\n *\n * _.isDate(new Date);\n * // => true\n *\n * _.isDate('Mon April 23 2012');\n * // => false\n */\nvar isDate = nodeIsDate ? baseUnary(nodeIsDate) : baseIsDate;\n\nmodule.exports = isDate;\n","var baseGetTag = require('./_baseGetTag'),\n isArray = require('./isArray'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar stringTag = '[object String]';\n\n/**\n * Checks if `value` is classified as a `String` primitive or object.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a string, else `false`.\n * @example\n *\n * _.isString('abc');\n * // => true\n *\n * _.isString(1);\n * // => false\n */\nfunction isString(value) {\n return typeof value == 'string' ||\n (!isArray(value) && isObjectLike(value) && baseGetTag(value) == stringTag);\n}\n\nmodule.exports = isString;\n","/**\n * A specialized version of `_.some` for arrays without support for iteratee\n * shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {boolean} Returns `true` if any element passes the predicate check,\n * else `false`.\n */\nfunction arraySome(array, predicate) {\n var index = -1,\n length = array == null ? 0 : array.length;\n\n while (++index < length) {\n if (predicate(array[index], index, array)) {\n return true;\n }\n }\n return false;\n}\n\nmodule.exports = arraySome;\n","var ListCache = require('./_ListCache');\n\n/**\n * Removes all key-value entries from the stack.\n *\n * @private\n * @name clear\n * @memberOf Stack\n */\nfunction stackClear() {\n this.__data__ = new ListCache;\n this.size = 0;\n}\n\nmodule.exports = stackClear;\n","/**\n * Removes `key` and its value from the stack.\n *\n * @private\n * @name delete\n * @memberOf Stack\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction stackDelete(key) {\n var data = this.__data__,\n result = data['delete'](key);\n\n this.size = data.size;\n return result;\n}\n\nmodule.exports = stackDelete;\n","/**\n * Gets the stack value for `key`.\n *\n * @private\n * @name get\n * @memberOf Stack\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction stackGet(key) {\n return this.__data__.get(key);\n}\n\nmodule.exports = stackGet;\n","/**\n * Checks if a stack value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf Stack\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction stackHas(key) {\n return this.__data__.has(key);\n}\n\nmodule.exports = stackHas;\n","var ListCache = require('./_ListCache'),\n Map = require('./_Map'),\n MapCache = require('./_MapCache');\n\n/** Used as the size to enable large array optimizations. */\nvar LARGE_ARRAY_SIZE = 200;\n\n/**\n * Sets the stack `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf Stack\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the stack cache instance.\n */\nfunction stackSet(key, value) {\n var data = this.__data__;\n if (data instanceof ListCache) {\n var pairs = data.__data__;\n if (!Map || (pairs.length < LARGE_ARRAY_SIZE - 1)) {\n pairs.push([key, value]);\n this.size = ++data.size;\n return this;\n }\n data = this.__data__ = new MapCache(pairs);\n }\n data.set(key, value);\n this.size = data.size;\n return this;\n}\n\nmodule.exports = stackSet;\n","var ListCache = require('./_ListCache'),\n stackClear = require('./_stackClear'),\n stackDelete = require('./_stackDelete'),\n stackGet = require('./_stackGet'),\n stackHas = require('./_stackHas'),\n stackSet = require('./_stackSet');\n\n/**\n * Creates a stack cache object to store key-value pairs.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction Stack(entries) {\n var data = this.__data__ = new ListCache(entries);\n this.size = data.size;\n}\n\n// Add methods to `Stack`.\nStack.prototype.clear = stackClear;\nStack.prototype['delete'] = stackDelete;\nStack.prototype.get = stackGet;\nStack.prototype.has = stackHas;\nStack.prototype.set = stackSet;\n\nmodule.exports = Stack;\n","/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n/**\n * Adds `value` to the array cache.\n *\n * @private\n * @name add\n * @memberOf SetCache\n * @alias push\n * @param {*} value The value to cache.\n * @returns {Object} Returns the cache instance.\n */\nfunction setCacheAdd(value) {\n this.__data__.set(value, HASH_UNDEFINED);\n return this;\n}\n\nmodule.exports = setCacheAdd;\n","/**\n * Checks if `value` is in the array cache.\n *\n * @private\n * @name has\n * @memberOf SetCache\n * @param {*} value The value to search for.\n * @returns {boolean} Returns `true` if `value` is found, else `false`.\n */\nfunction setCacheHas(value) {\n return this.__data__.has(value);\n}\n\nmodule.exports = setCacheHas;\n","var MapCache = require('./_MapCache'),\n setCacheAdd = require('./_setCacheAdd'),\n setCacheHas = require('./_setCacheHas');\n\n/**\n *\n * Creates an array cache object to store unique values.\n *\n * @private\n * @constructor\n * @param {Array} [values] The values to cache.\n */\nfunction SetCache(values) {\n var index = -1,\n length = values == null ? 0 : values.length;\n\n this.__data__ = new MapCache;\n while (++index < length) {\n this.add(values[index]);\n }\n}\n\n// Add methods to `SetCache`.\nSetCache.prototype.add = SetCache.prototype.push = setCacheAdd;\nSetCache.prototype.has = setCacheHas;\n\nmodule.exports = SetCache;\n","/**\n * Checks if a `cache` value for `key` exists.\n *\n * @private\n * @param {Object} cache The cache to query.\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction cacheHas(cache, key) {\n return cache.has(key);\n}\n\nmodule.exports = cacheHas;\n","var SetCache = require('./_SetCache'),\n arraySome = require('./_arraySome'),\n cacheHas = require('./_cacheHas');\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1,\n COMPARE_UNORDERED_FLAG = 2;\n\n/**\n * A specialized version of `baseIsEqualDeep` for arrays with support for\n * partial deep comparisons.\n *\n * @private\n * @param {Array} array The array to compare.\n * @param {Array} other The other array to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} stack Tracks traversed `array` and `other` objects.\n * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`.\n */\nfunction equalArrays(array, other, bitmask, customizer, equalFunc, stack) {\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG,\n arrLength = array.length,\n othLength = other.length;\n\n if (arrLength != othLength && !(isPartial && othLength > arrLength)) {\n return false;\n }\n // Check that cyclic values are equal.\n var arrStacked = stack.get(array);\n var othStacked = stack.get(other);\n if (arrStacked && othStacked) {\n return arrStacked == other && othStacked == array;\n }\n var index = -1,\n result = true,\n seen = (bitmask & COMPARE_UNORDERED_FLAG) ? new SetCache : undefined;\n\n stack.set(array, other);\n stack.set(other, array);\n\n // Ignore non-index properties.\n while (++index < arrLength) {\n var arrValue = array[index],\n othValue = other[index];\n\n if (customizer) {\n var compared = isPartial\n ? customizer(othValue, arrValue, index, other, array, stack)\n : customizer(arrValue, othValue, index, array, other, stack);\n }\n if (compared !== undefined) {\n if (compared) {\n continue;\n }\n result = false;\n break;\n }\n // Recursively compare arrays (susceptible to call stack limits).\n if (seen) {\n if (!arraySome(other, function(othValue, othIndex) {\n if (!cacheHas(seen, othIndex) &&\n (arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) {\n return seen.push(othIndex);\n }\n })) {\n result = false;\n break;\n }\n } else if (!(\n arrValue === othValue ||\n equalFunc(arrValue, othValue, bitmask, customizer, stack)\n )) {\n result = false;\n break;\n }\n }\n stack['delete'](array);\n stack['delete'](other);\n return result;\n}\n\nmodule.exports = equalArrays;\n","var root = require('./_root');\n\n/** Built-in value references. */\nvar Uint8Array = root.Uint8Array;\n\nmodule.exports = Uint8Array;\n","/**\n * Converts `map` to its key-value pairs.\n *\n * @private\n * @param {Object} map The map to convert.\n * @returns {Array} Returns the key-value pairs.\n */\nfunction mapToArray(map) {\n var index = -1,\n result = Array(map.size);\n\n map.forEach(function(value, key) {\n result[++index] = [key, value];\n });\n return result;\n}\n\nmodule.exports = mapToArray;\n","/**\n * Converts `set` to an array of its values.\n *\n * @private\n * @param {Object} set The set to convert.\n * @returns {Array} Returns the values.\n */\nfunction setToArray(set) {\n var index = -1,\n result = Array(set.size);\n\n set.forEach(function(value) {\n result[++index] = value;\n });\n return result;\n}\n\nmodule.exports = setToArray;\n","var Symbol = require('./_Symbol'),\n Uint8Array = require('./_Uint8Array'),\n eq = require('./eq'),\n equalArrays = require('./_equalArrays'),\n mapToArray = require('./_mapToArray'),\n setToArray = require('./_setToArray');\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1,\n COMPARE_UNORDERED_FLAG = 2;\n\n/** `Object#toString` result references. */\nvar boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n errorTag = '[object Error]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n symbolTag = '[object Symbol]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n dataViewTag = '[object DataView]';\n\n/** Used to convert symbols to primitives and strings. */\nvar symbolProto = Symbol ? Symbol.prototype : undefined,\n symbolValueOf = symbolProto ? symbolProto.valueOf : undefined;\n\n/**\n * A specialized version of `baseIsEqualDeep` for comparing objects of\n * the same `toStringTag`.\n *\n * **Note:** This function only supports comparing values with tags of\n * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {string} tag The `toStringTag` of the objects to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} stack Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\nfunction equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) {\n switch (tag) {\n case dataViewTag:\n if ((object.byteLength != other.byteLength) ||\n (object.byteOffset != other.byteOffset)) {\n return false;\n }\n object = object.buffer;\n other = other.buffer;\n\n case arrayBufferTag:\n if ((object.byteLength != other.byteLength) ||\n !equalFunc(new Uint8Array(object), new Uint8Array(other))) {\n return false;\n }\n return true;\n\n case boolTag:\n case dateTag:\n case numberTag:\n // Coerce booleans to `1` or `0` and dates to milliseconds.\n // Invalid dates are coerced to `NaN`.\n return eq(+object, +other);\n\n case errorTag:\n return object.name == other.name && object.message == other.message;\n\n case regexpTag:\n case stringTag:\n // Coerce regexes to strings and treat strings, primitives and objects,\n // as equal. See http://www.ecma-international.org/ecma-262/7.0/#sec-regexp.prototype.tostring\n // for more details.\n return object == (other + '');\n\n case mapTag:\n var convert = mapToArray;\n\n case setTag:\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG;\n convert || (convert = setToArray);\n\n if (object.size != other.size && !isPartial) {\n return false;\n }\n // Assume cyclic values are equal.\n var stacked = stack.get(object);\n if (stacked) {\n return stacked == other;\n }\n bitmask |= COMPARE_UNORDERED_FLAG;\n\n // Recursively compare objects (susceptible to call stack limits).\n stack.set(object, other);\n var result = equalArrays(convert(object), convert(other), bitmask, customizer, equalFunc, stack);\n stack['delete'](object);\n return result;\n\n case symbolTag:\n if (symbolValueOf) {\n return symbolValueOf.call(object) == symbolValueOf.call(other);\n }\n }\n return false;\n}\n\nmodule.exports = equalByTag;\n","/**\n * Appends the elements of `values` to `array`.\n *\n * @private\n * @param {Array} array The array to modify.\n * @param {Array} values The values to append.\n * @returns {Array} Returns `array`.\n */\nfunction arrayPush(array, values) {\n var index = -1,\n length = values.length,\n offset = array.length;\n\n while (++index < length) {\n array[offset + index] = values[index];\n }\n return array;\n}\n\nmodule.exports = arrayPush;\n","var arrayPush = require('./_arrayPush'),\n isArray = require('./isArray');\n\n/**\n * The base implementation of `getAllKeys` and `getAllKeysIn` which uses\n * `keysFunc` and `symbolsFunc` to get the enumerable property names and\n * symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Function} keysFunc The function to get the keys of `object`.\n * @param {Function} symbolsFunc The function to get the symbols of `object`.\n * @returns {Array} Returns the array of property names and symbols.\n */\nfunction baseGetAllKeys(object, keysFunc, symbolsFunc) {\n var result = keysFunc(object);\n return isArray(object) ? result : arrayPush(result, symbolsFunc(object));\n}\n\nmodule.exports = baseGetAllKeys;\n","/**\n * A specialized version of `_.filter` for arrays without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {Array} Returns the new filtered array.\n */\nfunction arrayFilter(array, predicate) {\n var index = -1,\n length = array == null ? 0 : array.length,\n resIndex = 0,\n result = [];\n\n while (++index < length) {\n var value = array[index];\n if (predicate(value, index, array)) {\n result[resIndex++] = value;\n }\n }\n return result;\n}\n\nmodule.exports = arrayFilter;\n","/**\n * This method returns a new empty array.\n *\n * @static\n * @memberOf _\n * @since 4.13.0\n * @category Util\n * @returns {Array} Returns the new empty array.\n * @example\n *\n * var arrays = _.times(2, _.stubArray);\n *\n * console.log(arrays);\n * // => [[], []]\n *\n * console.log(arrays[0] === arrays[1]);\n * // => false\n */\nfunction stubArray() {\n return [];\n}\n\nmodule.exports = stubArray;\n","var arrayFilter = require('./_arrayFilter'),\n stubArray = require('./stubArray');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Built-in value references. */\nvar propertyIsEnumerable = objectProto.propertyIsEnumerable;\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeGetSymbols = Object.getOwnPropertySymbols;\n\n/**\n * Creates an array of the own enumerable symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of symbols.\n */\nvar getSymbols = !nativeGetSymbols ? stubArray : function(object) {\n if (object == null) {\n return [];\n }\n object = Object(object);\n return arrayFilter(nativeGetSymbols(object), function(symbol) {\n return propertyIsEnumerable.call(object, symbol);\n });\n};\n\nmodule.exports = getSymbols;\n","/**\n * The base implementation of `_.times` without support for iteratee shorthands\n * or max array length checks.\n *\n * @private\n * @param {number} n The number of times to invoke `iteratee`.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns the array of results.\n */\nfunction baseTimes(n, iteratee) {\n var index = -1,\n result = Array(n);\n\n while (++index < n) {\n result[index] = iteratee(index);\n }\n return result;\n}\n\nmodule.exports = baseTimes;\n","/**\n * This method returns `false`.\n *\n * @static\n * @memberOf _\n * @since 4.13.0\n * @category Util\n * @returns {boolean} Returns `false`.\n * @example\n *\n * _.times(2, _.stubFalse);\n * // => [false, false]\n */\nfunction stubFalse() {\n return false;\n}\n\nmodule.exports = stubFalse;\n","var root = require('./_root'),\n stubFalse = require('./stubFalse');\n\n/** Detect free variable `exports`. */\nvar freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;\n\n/** Detect free variable `module`. */\nvar freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;\n\n/** Detect the popular CommonJS extension `module.exports`. */\nvar moduleExports = freeModule && freeModule.exports === freeExports;\n\n/** Built-in value references. */\nvar Buffer = moduleExports ? root.Buffer : undefined;\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined;\n\n/**\n * Checks if `value` is a buffer.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a buffer, else `false`.\n * @example\n *\n * _.isBuffer(new Buffer(2));\n * // => true\n *\n * _.isBuffer(new Uint8Array(2));\n * // => false\n */\nvar isBuffer = nativeIsBuffer || stubFalse;\n\nmodule.exports = isBuffer;\n","var baseGetTag = require('./_baseGetTag'),\n isLength = require('./isLength'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]',\n arrayTag = '[object Array]',\n boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n errorTag = '[object Error]',\n funcTag = '[object Function]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n objectTag = '[object Object]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n weakMapTag = '[object WeakMap]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n dataViewTag = '[object DataView]',\n float32Tag = '[object Float32Array]',\n float64Tag = '[object Float64Array]',\n int8Tag = '[object Int8Array]',\n int16Tag = '[object Int16Array]',\n int32Tag = '[object Int32Array]',\n uint8Tag = '[object Uint8Array]',\n uint8ClampedTag = '[object Uint8ClampedArray]',\n uint16Tag = '[object Uint16Array]',\n uint32Tag = '[object Uint32Array]';\n\n/** Used to identify `toStringTag` values of typed arrays. */\nvar typedArrayTags = {};\ntypedArrayTags[float32Tag] = typedArrayTags[float64Tag] =\ntypedArrayTags[int8Tag] = typedArrayTags[int16Tag] =\ntypedArrayTags[int32Tag] = typedArrayTags[uint8Tag] =\ntypedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] =\ntypedArrayTags[uint32Tag] = true;\ntypedArrayTags[argsTag] = typedArrayTags[arrayTag] =\ntypedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] =\ntypedArrayTags[dataViewTag] = typedArrayTags[dateTag] =\ntypedArrayTags[errorTag] = typedArrayTags[funcTag] =\ntypedArrayTags[mapTag] = typedArrayTags[numberTag] =\ntypedArrayTags[objectTag] = typedArrayTags[regexpTag] =\ntypedArrayTags[setTag] = typedArrayTags[stringTag] =\ntypedArrayTags[weakMapTag] = false;\n\n/**\n * The base implementation of `_.isTypedArray` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.\n */\nfunction baseIsTypedArray(value) {\n return isObjectLike(value) &&\n isLength(value.length) && !!typedArrayTags[baseGetTag(value)];\n}\n\nmodule.exports = baseIsTypedArray;\n","var baseIsTypedArray = require('./_baseIsTypedArray'),\n baseUnary = require('./_baseUnary'),\n nodeUtil = require('./_nodeUtil');\n\n/* Node.js helper references. */\nvar nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray;\n\n/**\n * Checks if `value` is classified as a typed array.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.\n * @example\n *\n * _.isTypedArray(new Uint8Array);\n * // => true\n *\n * _.isTypedArray([]);\n * // => false\n */\nvar isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;\n\nmodule.exports = isTypedArray;\n","var baseTimes = require('./_baseTimes'),\n isArguments = require('./isArguments'),\n isArray = require('./isArray'),\n isBuffer = require('./isBuffer'),\n isIndex = require('./_isIndex'),\n isTypedArray = require('./isTypedArray');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Creates an array of the enumerable property names of the array-like `value`.\n *\n * @private\n * @param {*} value The value to query.\n * @param {boolean} inherited Specify returning inherited property names.\n * @returns {Array} Returns the array of property names.\n */\nfunction arrayLikeKeys(value, inherited) {\n var isArr = isArray(value),\n isArg = !isArr && isArguments(value),\n isBuff = !isArr && !isArg && isBuffer(value),\n isType = !isArr && !isArg && !isBuff && isTypedArray(value),\n skipIndexes = isArr || isArg || isBuff || isType,\n result = skipIndexes ? baseTimes(value.length, String) : [],\n length = result.length;\n\n for (var key in value) {\n if ((inherited || hasOwnProperty.call(value, key)) &&\n !(skipIndexes && (\n // Safari 9 has enumerable `arguments.length` in strict mode.\n key == 'length' ||\n // Node.js 0.10 has enumerable non-index properties on buffers.\n (isBuff && (key == 'offset' || key == 'parent')) ||\n // PhantomJS 2 has enumerable non-index properties on typed arrays.\n (isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset')) ||\n // Skip index properties.\n isIndex(key, length)\n ))) {\n result.push(key);\n }\n }\n return result;\n}\n\nmodule.exports = arrayLikeKeys;\n","/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/**\n * Checks if `value` is likely a prototype object.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a prototype, else `false`.\n */\nfunction isPrototype(value) {\n var Ctor = value && value.constructor,\n proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto;\n\n return value === proto;\n}\n\nmodule.exports = isPrototype;\n","/**\n * Creates a unary function that invokes `func` with its argument transformed.\n *\n * @private\n * @param {Function} func The function to wrap.\n * @param {Function} transform The argument transform.\n * @returns {Function} Returns the new function.\n */\nfunction overArg(func, transform) {\n return function(arg) {\n return func(transform(arg));\n };\n}\n\nmodule.exports = overArg;\n","var overArg = require('./_overArg');\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeKeys = overArg(Object.keys, Object);\n\nmodule.exports = nativeKeys;\n","var isPrototype = require('./_isPrototype'),\n nativeKeys = require('./_nativeKeys');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * The base implementation of `_.keys` which doesn't treat sparse arrays as dense.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\nfunction baseKeys(object) {\n if (!isPrototype(object)) {\n return nativeKeys(object);\n }\n var result = [];\n for (var key in Object(object)) {\n if (hasOwnProperty.call(object, key) && key != 'constructor') {\n result.push(key);\n }\n }\n return result;\n}\n\nmodule.exports = baseKeys;\n","var isFunction = require('./isFunction'),\n isLength = require('./isLength');\n\n/**\n * Checks if `value` is array-like. A value is considered array-like if it's\n * not a function and has a `value.length` that's an integer greater than or\n * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is array-like, else `false`.\n * @example\n *\n * _.isArrayLike([1, 2, 3]);\n * // => true\n *\n * _.isArrayLike(document.body.children);\n * // => true\n *\n * _.isArrayLike('abc');\n * // => true\n *\n * _.isArrayLike(_.noop);\n * // => false\n */\nfunction isArrayLike(value) {\n return value != null && isLength(value.length) && !isFunction(value);\n}\n\nmodule.exports = isArrayLike;\n","var arrayLikeKeys = require('./_arrayLikeKeys'),\n baseKeys = require('./_baseKeys'),\n isArrayLike = require('./isArrayLike');\n\n/**\n * Creates an array of the own enumerable property names of `object`.\n *\n * **Note:** Non-object values are coerced to objects. See the\n * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)\n * for more details.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.keys(new Foo);\n * // => ['a', 'b'] (iteration order is not guaranteed)\n *\n * _.keys('hi');\n * // => ['0', '1']\n */\nfunction keys(object) {\n return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);\n}\n\nmodule.exports = keys;\n","var baseGetAllKeys = require('./_baseGetAllKeys'),\n getSymbols = require('./_getSymbols'),\n keys = require('./keys');\n\n/**\n * Creates an array of own enumerable property names and symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names and symbols.\n */\nfunction getAllKeys(object) {\n return baseGetAllKeys(object, keys, getSymbols);\n}\n\nmodule.exports = getAllKeys;\n","var getAllKeys = require('./_getAllKeys');\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1;\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * A specialized version of `baseIsEqualDeep` for objects with support for\n * partial deep comparisons.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} stack Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\nfunction equalObjects(object, other, bitmask, customizer, equalFunc, stack) {\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG,\n objProps = getAllKeys(object),\n objLength = objProps.length,\n othProps = getAllKeys(other),\n othLength = othProps.length;\n\n if (objLength != othLength && !isPartial) {\n return false;\n }\n var index = objLength;\n while (index--) {\n var key = objProps[index];\n if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) {\n return false;\n }\n }\n // Check that cyclic values are equal.\n var objStacked = stack.get(object);\n var othStacked = stack.get(other);\n if (objStacked && othStacked) {\n return objStacked == other && othStacked == object;\n }\n var result = true;\n stack.set(object, other);\n stack.set(other, object);\n\n var skipCtor = isPartial;\n while (++index < objLength) {\n key = objProps[index];\n var objValue = object[key],\n othValue = other[key];\n\n if (customizer) {\n var compared = isPartial\n ? customizer(othValue, objValue, key, other, object, stack)\n : customizer(objValue, othValue, key, object, other, stack);\n }\n // Recursively compare objects (susceptible to call stack limits).\n if (!(compared === undefined\n ? (objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack))\n : compared\n )) {\n result = false;\n break;\n }\n skipCtor || (skipCtor = key == 'constructor');\n }\n if (result && !skipCtor) {\n var objCtor = object.constructor,\n othCtor = other.constructor;\n\n // Non `Object` object instances with different constructors are not equal.\n if (objCtor != othCtor &&\n ('constructor' in object && 'constructor' in other) &&\n !(typeof objCtor == 'function' && objCtor instanceof objCtor &&\n typeof othCtor == 'function' && othCtor instanceof othCtor)) {\n result = false;\n }\n }\n stack['delete'](object);\n stack['delete'](other);\n return result;\n}\n\nmodule.exports = equalObjects;\n","var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar DataView = getNative(root, 'DataView');\n\nmodule.exports = DataView;\n","var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar Promise = getNative(root, 'Promise');\n\nmodule.exports = Promise;\n","var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar Set = getNative(root, 'Set');\n\nmodule.exports = Set;\n","var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar WeakMap = getNative(root, 'WeakMap');\n\nmodule.exports = WeakMap;\n","var DataView = require('./_DataView'),\n Map = require('./_Map'),\n Promise = require('./_Promise'),\n Set = require('./_Set'),\n WeakMap = require('./_WeakMap'),\n baseGetTag = require('./_baseGetTag'),\n toSource = require('./_toSource');\n\n/** `Object#toString` result references. */\nvar mapTag = '[object Map]',\n objectTag = '[object Object]',\n promiseTag = '[object Promise]',\n setTag = '[object Set]',\n weakMapTag = '[object WeakMap]';\n\nvar dataViewTag = '[object DataView]';\n\n/** Used to detect maps, sets, and weakmaps. */\nvar dataViewCtorString = toSource(DataView),\n mapCtorString = toSource(Map),\n promiseCtorString = toSource(Promise),\n setCtorString = toSource(Set),\n weakMapCtorString = toSource(WeakMap);\n\n/**\n * Gets the `toStringTag` of `value`.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\nvar getTag = baseGetTag;\n\n// Fallback for data views, maps, sets, and weak maps in IE 11 and promises in Node.js < 6.\nif ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) ||\n (Map && getTag(new Map) != mapTag) ||\n (Promise && getTag(Promise.resolve()) != promiseTag) ||\n (Set && getTag(new Set) != setTag) ||\n (WeakMap && getTag(new WeakMap) != weakMapTag)) {\n getTag = function(value) {\n var result = baseGetTag(value),\n Ctor = result == objectTag ? value.constructor : undefined,\n ctorString = Ctor ? toSource(Ctor) : '';\n\n if (ctorString) {\n switch (ctorString) {\n case dataViewCtorString: return dataViewTag;\n case mapCtorString: return mapTag;\n case promiseCtorString: return promiseTag;\n case setCtorString: return setTag;\n case weakMapCtorString: return weakMapTag;\n }\n }\n return result;\n };\n}\n\nmodule.exports = getTag;\n","var Stack = require('./_Stack'),\n equalArrays = require('./_equalArrays'),\n equalByTag = require('./_equalByTag'),\n equalObjects = require('./_equalObjects'),\n getTag = require('./_getTag'),\n isArray = require('./isArray'),\n isBuffer = require('./isBuffer'),\n isTypedArray = require('./isTypedArray');\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1;\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]',\n arrayTag = '[object Array]',\n objectTag = '[object Object]';\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * A specialized version of `baseIsEqual` for arrays and objects which performs\n * deep comparisons and tracks traversed objects enabling objects with circular\n * references to be compared.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} [stack] Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\nfunction baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) {\n var objIsArr = isArray(object),\n othIsArr = isArray(other),\n objTag = objIsArr ? arrayTag : getTag(object),\n othTag = othIsArr ? arrayTag : getTag(other);\n\n objTag = objTag == argsTag ? objectTag : objTag;\n othTag = othTag == argsTag ? objectTag : othTag;\n\n var objIsObj = objTag == objectTag,\n othIsObj = othTag == objectTag,\n isSameTag = objTag == othTag;\n\n if (isSameTag && isBuffer(object)) {\n if (!isBuffer(other)) {\n return false;\n }\n objIsArr = true;\n objIsObj = false;\n }\n if (isSameTag && !objIsObj) {\n stack || (stack = new Stack);\n return (objIsArr || isTypedArray(object))\n ? equalArrays(object, other, bitmask, customizer, equalFunc, stack)\n : equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack);\n }\n if (!(bitmask & COMPARE_PARTIAL_FLAG)) {\n var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'),\n othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__');\n\n if (objIsWrapped || othIsWrapped) {\n var objUnwrapped = objIsWrapped ? object.value() : object,\n othUnwrapped = othIsWrapped ? other.value() : other;\n\n stack || (stack = new Stack);\n return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack);\n }\n }\n if (!isSameTag) {\n return false;\n }\n stack || (stack = new Stack);\n return equalObjects(object, other, bitmask, customizer, equalFunc, stack);\n}\n\nmodule.exports = baseIsEqualDeep;\n","var baseIsEqualDeep = require('./_baseIsEqualDeep'),\n isObjectLike = require('./isObjectLike');\n\n/**\n * The base implementation of `_.isEqual` which supports partial comparisons\n * and tracks traversed objects.\n *\n * @private\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @param {boolean} bitmask The bitmask flags.\n * 1 - Unordered comparison\n * 2 - Partial comparison\n * @param {Function} [customizer] The function to customize comparisons.\n * @param {Object} [stack] Tracks traversed `value` and `other` objects.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n */\nfunction baseIsEqual(value, other, bitmask, customizer, stack) {\n if (value === other) {\n return true;\n }\n if (value == null || other == null || (!isObjectLike(value) && !isObjectLike(other))) {\n return value !== value && other !== other;\n }\n return baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack);\n}\n\nmodule.exports = baseIsEqual;\n","var Stack = require('./_Stack'),\n baseIsEqual = require('./_baseIsEqual');\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1,\n COMPARE_UNORDERED_FLAG = 2;\n\n/**\n * The base implementation of `_.isMatch` without support for iteratee shorthands.\n *\n * @private\n * @param {Object} object The object to inspect.\n * @param {Object} source The object of property values to match.\n * @param {Array} matchData The property names, values, and compare flags to match.\n * @param {Function} [customizer] The function to customize comparisons.\n * @returns {boolean} Returns `true` if `object` is a match, else `false`.\n */\nfunction baseIsMatch(object, source, matchData, customizer) {\n var index = matchData.length,\n length = index,\n noCustomizer = !customizer;\n\n if (object == null) {\n return !length;\n }\n object = Object(object);\n while (index--) {\n var data = matchData[index];\n if ((noCustomizer && data[2])\n ? data[1] !== object[data[0]]\n : !(data[0] in object)\n ) {\n return false;\n }\n }\n while (++index < length) {\n data = matchData[index];\n var key = data[0],\n objValue = object[key],\n srcValue = data[1];\n\n if (noCustomizer && data[2]) {\n if (objValue === undefined && !(key in object)) {\n return false;\n }\n } else {\n var stack = new Stack;\n if (customizer) {\n var result = customizer(objValue, srcValue, key, object, source, stack);\n }\n if (!(result === undefined\n ? baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG, customizer, stack)\n : result\n )) {\n return false;\n }\n }\n }\n return true;\n}\n\nmodule.exports = baseIsMatch;\n","var isObject = require('./isObject');\n\n/**\n * Checks if `value` is suitable for strict equality comparisons, i.e. `===`.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` if suitable for strict\n * equality comparisons, else `false`.\n */\nfunction isStrictComparable(value) {\n return value === value && !isObject(value);\n}\n\nmodule.exports = isStrictComparable;\n","var isStrictComparable = require('./_isStrictComparable'),\n keys = require('./keys');\n\n/**\n * Gets the property names, values, and compare flags of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the match data of `object`.\n */\nfunction getMatchData(object) {\n var result = keys(object),\n length = result.length;\n\n while (length--) {\n var key = result[length],\n value = object[key];\n\n result[length] = [key, value, isStrictComparable(value)];\n }\n return result;\n}\n\nmodule.exports = getMatchData;\n","/**\n * A specialized version of `matchesProperty` for source values suitable\n * for strict equality comparisons, i.e. `===`.\n *\n * @private\n * @param {string} key The key of the property to get.\n * @param {*} srcValue The value to match.\n * @returns {Function} Returns the new spec function.\n */\nfunction matchesStrictComparable(key, srcValue) {\n return function(object) {\n if (object == null) {\n return false;\n }\n return object[key] === srcValue &&\n (srcValue !== undefined || (key in Object(object)));\n };\n}\n\nmodule.exports = matchesStrictComparable;\n","var baseIsMatch = require('./_baseIsMatch'),\n getMatchData = require('./_getMatchData'),\n matchesStrictComparable = require('./_matchesStrictComparable');\n\n/**\n * The base implementation of `_.matches` which doesn't clone `source`.\n *\n * @private\n * @param {Object} source The object of property values to match.\n * @returns {Function} Returns the new spec function.\n */\nfunction baseMatches(source) {\n var matchData = getMatchData(source);\n if (matchData.length == 1 && matchData[0][2]) {\n return matchesStrictComparable(matchData[0][0], matchData[0][1]);\n }\n return function(object) {\n return object === source || baseIsMatch(object, source, matchData);\n };\n}\n\nmodule.exports = baseMatches;\n","var castPath = require('./_castPath'),\n toKey = require('./_toKey');\n\n/**\n * The base implementation of `_.get` without support for default values.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Array|string} path The path of the property to get.\n * @returns {*} Returns the resolved value.\n */\nfunction baseGet(object, path) {\n path = castPath(path, object);\n\n var index = 0,\n length = path.length;\n\n while (object != null && index < length) {\n object = object[toKey(path[index++])];\n }\n return (index && index == length) ? object : undefined;\n}\n\nmodule.exports = baseGet;\n","var baseGet = require('./_baseGet');\n\n/**\n * Gets the value at `path` of `object`. If the resolved value is\n * `undefined`, the `defaultValue` is returned in its place.\n *\n * @static\n * @memberOf _\n * @since 3.7.0\n * @category Object\n * @param {Object} object The object to query.\n * @param {Array|string} path The path of the property to get.\n * @param {*} [defaultValue] The value returned for `undefined` resolved values.\n * @returns {*} Returns the resolved value.\n * @example\n *\n * var object = { 'a': [{ 'b': { 'c': 3 } }] };\n *\n * _.get(object, 'a[0].b.c');\n * // => 3\n *\n * _.get(object, ['a', '0', 'b', 'c']);\n * // => 3\n *\n * _.get(object, 'a.b.c', 'default');\n * // => 'default'\n */\nfunction get(object, path, defaultValue) {\n var result = object == null ? undefined : baseGet(object, path);\n return result === undefined ? defaultValue : result;\n}\n\nmodule.exports = get;\n","/**\n * The base implementation of `_.hasIn` without support for deep paths.\n *\n * @private\n * @param {Object} [object] The object to query.\n * @param {Array|string} key The key to check.\n * @returns {boolean} Returns `true` if `key` exists, else `false`.\n */\nfunction baseHasIn(object, key) {\n return object != null && key in Object(object);\n}\n\nmodule.exports = baseHasIn;\n","var baseHasIn = require('./_baseHasIn'),\n hasPath = require('./_hasPath');\n\n/**\n * Checks if `path` is a direct or inherited property of `object`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Object\n * @param {Object} object The object to query.\n * @param {Array|string} path The path to check.\n * @returns {boolean} Returns `true` if `path` exists, else `false`.\n * @example\n *\n * var object = _.create({ 'a': _.create({ 'b': 2 }) });\n *\n * _.hasIn(object, 'a');\n * // => true\n *\n * _.hasIn(object, 'a.b');\n * // => true\n *\n * _.hasIn(object, ['a', 'b']);\n * // => true\n *\n * _.hasIn(object, 'b');\n * // => false\n */\nfunction hasIn(object, path) {\n return object != null && hasPath(object, path, baseHasIn);\n}\n\nmodule.exports = hasIn;\n","var baseIsEqual = require('./_baseIsEqual'),\n get = require('./get'),\n hasIn = require('./hasIn'),\n isKey = require('./_isKey'),\n isStrictComparable = require('./_isStrictComparable'),\n matchesStrictComparable = require('./_matchesStrictComparable'),\n toKey = require('./_toKey');\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1,\n COMPARE_UNORDERED_FLAG = 2;\n\n/**\n * The base implementation of `_.matchesProperty` which doesn't clone `srcValue`.\n *\n * @private\n * @param {string} path The path of the property to get.\n * @param {*} srcValue The value to match.\n * @returns {Function} Returns the new spec function.\n */\nfunction baseMatchesProperty(path, srcValue) {\n if (isKey(path) && isStrictComparable(srcValue)) {\n return matchesStrictComparable(toKey(path), srcValue);\n }\n return function(object) {\n var objValue = get(object, path);\n return (objValue === undefined && objValue === srcValue)\n ? hasIn(object, path)\n : baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG);\n };\n}\n\nmodule.exports = baseMatchesProperty;\n","/**\n * This method returns the first argument it receives.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Util\n * @param {*} value Any value.\n * @returns {*} Returns `value`.\n * @example\n *\n * var object = { 'a': 1 };\n *\n * console.log(_.identity(object) === object);\n * // => true\n */\nfunction identity(value) {\n return value;\n}\n\nmodule.exports = identity;\n","/**\n * The base implementation of `_.property` without support for deep paths.\n *\n * @private\n * @param {string} key The key of the property to get.\n * @returns {Function} Returns the new accessor function.\n */\nfunction baseProperty(key) {\n return function(object) {\n return object == null ? undefined : object[key];\n };\n}\n\nmodule.exports = baseProperty;\n","var baseGet = require('./_baseGet');\n\n/**\n * A specialized version of `baseProperty` which supports deep paths.\n *\n * @private\n * @param {Array|string} path The path of the property to get.\n * @returns {Function} Returns the new accessor function.\n */\nfunction basePropertyDeep(path) {\n return function(object) {\n return baseGet(object, path);\n };\n}\n\nmodule.exports = basePropertyDeep;\n","var baseProperty = require('./_baseProperty'),\n basePropertyDeep = require('./_basePropertyDeep'),\n isKey = require('./_isKey'),\n toKey = require('./_toKey');\n\n/**\n * Creates a function that returns the value at `path` of a given object.\n *\n * @static\n * @memberOf _\n * @since 2.4.0\n * @category Util\n * @param {Array|string} path The path of the property to get.\n * @returns {Function} Returns the new accessor function.\n * @example\n *\n * var objects = [\n * { 'a': { 'b': 2 } },\n * { 'a': { 'b': 1 } }\n * ];\n *\n * _.map(objects, _.property('a.b'));\n * // => [2, 1]\n *\n * _.map(_.sortBy(objects, _.property(['a', 'b'])), 'a.b');\n * // => [1, 2]\n */\nfunction property(path) {\n return isKey(path) ? baseProperty(toKey(path)) : basePropertyDeep(path);\n}\n\nmodule.exports = property;\n","var baseMatches = require('./_baseMatches'),\n baseMatchesProperty = require('./_baseMatchesProperty'),\n identity = require('./identity'),\n isArray = require('./isArray'),\n property = require('./property');\n\n/**\n * The base implementation of `_.iteratee`.\n *\n * @private\n * @param {*} [value=_.identity] The value to convert to an iteratee.\n * @returns {Function} Returns the iteratee.\n */\nfunction baseIteratee(value) {\n // Don't store the `typeof` result in a variable to avoid a JIT bug in Safari 9.\n // See https://bugs.webkit.org/show_bug.cgi?id=156034 for more details.\n if (typeof value == 'function') {\n return value;\n }\n if (value == null) {\n return identity;\n }\n if (typeof value == 'object') {\n return isArray(value)\n ? baseMatchesProperty(value[0], value[1])\n : baseMatches(value);\n }\n return property(value);\n}\n\nmodule.exports = baseIteratee;\n","/**\n * Creates a base function for methods like `_.forIn` and `_.forOwn`.\n *\n * @private\n * @param {boolean} [fromRight] Specify iterating from right to left.\n * @returns {Function} Returns the new base function.\n */\nfunction createBaseFor(fromRight) {\n return function(object, iteratee, keysFunc) {\n var index = -1,\n iterable = Object(object),\n props = keysFunc(object),\n length = props.length;\n\n while (length--) {\n var key = props[fromRight ? length : ++index];\n if (iteratee(iterable[key], key, iterable) === false) {\n break;\n }\n }\n return object;\n };\n}\n\nmodule.exports = createBaseFor;\n","var createBaseFor = require('./_createBaseFor');\n\n/**\n * The base implementation of `baseForOwn` which iterates over `object`\n * properties returned by `keysFunc` and invokes `iteratee` for each property.\n * Iteratee functions may exit iteration early by explicitly returning `false`.\n *\n * @private\n * @param {Object} object The object to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @param {Function} keysFunc The function to get the keys of `object`.\n * @returns {Object} Returns `object`.\n */\nvar baseFor = createBaseFor();\n\nmodule.exports = baseFor;\n","var baseFor = require('./_baseFor'),\n keys = require('./keys');\n\n/**\n * The base implementation of `_.forOwn` without support for iteratee shorthands.\n *\n * @private\n * @param {Object} object The object to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Object} Returns `object`.\n */\nfunction baseForOwn(object, iteratee) {\n return object && baseFor(object, iteratee, keys);\n}\n\nmodule.exports = baseForOwn;\n","var isArrayLike = require('./isArrayLike');\n\n/**\n * Creates a `baseEach` or `baseEachRight` function.\n *\n * @private\n * @param {Function} eachFunc The function to iterate over a collection.\n * @param {boolean} [fromRight] Specify iterating from right to left.\n * @returns {Function} Returns the new base function.\n */\nfunction createBaseEach(eachFunc, fromRight) {\n return function(collection, iteratee) {\n if (collection == null) {\n return collection;\n }\n if (!isArrayLike(collection)) {\n return eachFunc(collection, iteratee);\n }\n var length = collection.length,\n index = fromRight ? length : -1,\n iterable = Object(collection);\n\n while ((fromRight ? index-- : ++index < length)) {\n if (iteratee(iterable[index], index, iterable) === false) {\n break;\n }\n }\n return collection;\n };\n}\n\nmodule.exports = createBaseEach;\n","var baseForOwn = require('./_baseForOwn'),\n createBaseEach = require('./_createBaseEach');\n\n/**\n * The base implementation of `_.forEach` without support for iteratee shorthands.\n *\n * @private\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array|Object} Returns `collection`.\n */\nvar baseEach = createBaseEach(baseForOwn);\n\nmodule.exports = baseEach;\n","var baseEach = require('./_baseEach');\n\n/**\n * The base implementation of `_.some` without support for iteratee shorthands.\n *\n * @private\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {boolean} Returns `true` if any element passes the predicate check,\n * else `false`.\n */\nfunction baseSome(collection, predicate) {\n var result;\n\n baseEach(collection, function(value, index, collection) {\n result = predicate(value, index, collection);\n return !result;\n });\n return !!result;\n}\n\nmodule.exports = baseSome;\n","var eq = require('./eq'),\n isArrayLike = require('./isArrayLike'),\n isIndex = require('./_isIndex'),\n isObject = require('./isObject');\n\n/**\n * Checks if the given arguments are from an iteratee call.\n *\n * @private\n * @param {*} value The potential iteratee value argument.\n * @param {*} index The potential iteratee index or key argument.\n * @param {*} object The potential iteratee object argument.\n * @returns {boolean} Returns `true` if the arguments are from an iteratee call,\n * else `false`.\n */\nfunction isIterateeCall(value, index, object) {\n if (!isObject(object)) {\n return false;\n }\n var type = typeof index;\n if (type == 'number'\n ? (isArrayLike(object) && isIndex(index, object.length))\n : (type == 'string' && index in object)\n ) {\n return eq(object[index], value);\n }\n return false;\n}\n\nmodule.exports = isIterateeCall;\n","var arraySome = require('./_arraySome'),\n baseIteratee = require('./_baseIteratee'),\n baseSome = require('./_baseSome'),\n isArray = require('./isArray'),\n isIterateeCall = require('./_isIterateeCall');\n\n/**\n * Checks if `predicate` returns truthy for **any** element of `collection`.\n * Iteration is stopped once `predicate` returns truthy. The predicate is\n * invoked with three arguments: (value, index|key, collection).\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n * @returns {boolean} Returns `true` if any element passes the predicate check,\n * else `false`.\n * @example\n *\n * _.some([null, 0, 'yes', false], Boolean);\n * // => true\n *\n * var users = [\n * { 'user': 'barney', 'active': true },\n * { 'user': 'fred', 'active': false }\n * ];\n *\n * // The `_.matches` iteratee shorthand.\n * _.some(users, { 'user': 'barney', 'active': false });\n * // => false\n *\n * // The `_.matchesProperty` iteratee shorthand.\n * _.some(users, ['active', false]);\n * // => true\n *\n * // The `_.property` iteratee shorthand.\n * _.some(users, 'active');\n * // => true\n */\nfunction some(collection, predicate, guard) {\n var func = isArray(collection) ? arraySome : baseSome;\n if (guard && isIterateeCall(collection, predicate, guard)) {\n predicate = undefined;\n }\n return func(collection, baseIteratee(predicate, 3));\n}\n\nmodule.exports = some;\n","var baseGetTag = require('./_baseGetTag'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar boolTag = '[object Boolean]';\n\n/**\n * Checks if `value` is classified as a boolean primitive or object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a boolean, else `false`.\n * @example\n *\n * _.isBoolean(false);\n * // => true\n *\n * _.isBoolean(null);\n * // => false\n */\nfunction isBoolean(value) {\n return value === true || value === false ||\n (isObjectLike(value) && baseGetTag(value) == boolTag);\n}\n\nmodule.exports = isBoolean;\n","var baseGetTag = require('./_baseGetTag'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar numberTag = '[object Number]';\n\n/**\n * Checks if `value` is classified as a `Number` primitive or object.\n *\n * **Note:** To exclude `Infinity`, `-Infinity`, and `NaN`, which are\n * classified as numbers, use the `_.isFinite` method.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a number, else `false`.\n * @example\n *\n * _.isNumber(3);\n * // => true\n *\n * _.isNumber(Number.MIN_VALUE);\n * // => true\n *\n * _.isNumber(Infinity);\n * // => true\n *\n * _.isNumber('3');\n * // => false\n */\nfunction isNumber(value) {\n return typeof value == 'number' ||\n (isObjectLike(value) && baseGetTag(value) == numberTag);\n}\n\nmodule.exports = isNumber;\n","/**\n * Checks if `value` is `undefined`.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is `undefined`, else `false`.\n * @example\n *\n * _.isUndefined(void 0);\n * // => true\n *\n * _.isUndefined(null);\n * // => false\n */\nfunction isUndefined(value) {\n return value === undefined;\n}\n\nmodule.exports = isUndefined;\n","var getNative = require('./_getNative');\n\nvar defineProperty = (function() {\n try {\n var func = getNative(Object, 'defineProperty');\n func({}, '', {});\n return func;\n } catch (e) {}\n}());\n\nmodule.exports = defineProperty;\n","var defineProperty = require('./_defineProperty');\n\n/**\n * The base implementation of `assignValue` and `assignMergeValue` without\n * value checks.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {string} key The key of the property to assign.\n * @param {*} value The value to assign.\n */\nfunction baseAssignValue(object, key, value) {\n if (key == '__proto__' && defineProperty) {\n defineProperty(object, key, {\n 'configurable': true,\n 'enumerable': true,\n 'value': value,\n 'writable': true\n });\n } else {\n object[key] = value;\n }\n}\n\nmodule.exports = baseAssignValue;\n","var baseAssignValue = require('./_baseAssignValue'),\n eq = require('./eq');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Assigns `value` to `key` of `object` if the existing value is not equivalent\n * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * for equality comparisons.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {string} key The key of the property to assign.\n * @param {*} value The value to assign.\n */\nfunction assignValue(object, key, value) {\n var objValue = object[key];\n if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) ||\n (value === undefined && !(key in object))) {\n baseAssignValue(object, key, value);\n }\n}\n\nmodule.exports = assignValue;\n","var assignValue = require('./_assignValue'),\n castPath = require('./_castPath'),\n isIndex = require('./_isIndex'),\n isObject = require('./isObject'),\n toKey = require('./_toKey');\n\n/**\n * The base implementation of `_.set`.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {Array|string} path The path of the property to set.\n * @param {*} value The value to set.\n * @param {Function} [customizer] The function to customize path creation.\n * @returns {Object} Returns `object`.\n */\nfunction baseSet(object, path, value, customizer) {\n if (!isObject(object)) {\n return object;\n }\n path = castPath(path, object);\n\n var index = -1,\n length = path.length,\n lastIndex = length - 1,\n nested = object;\n\n while (nested != null && ++index < length) {\n var key = toKey(path[index]),\n newValue = value;\n\n if (key === '__proto__' || key === 'constructor' || key === 'prototype') {\n return object;\n }\n\n if (index != lastIndex) {\n var objValue = nested[key];\n newValue = customizer ? customizer(objValue, key, nested) : undefined;\n if (newValue === undefined) {\n newValue = isObject(objValue)\n ? objValue\n : (isIndex(path[index + 1]) ? [] : {});\n }\n }\n assignValue(nested, key, newValue);\n nested = nested[key];\n }\n return object;\n}\n\nmodule.exports = baseSet;\n","var baseSet = require('./_baseSet');\n\n/**\n * Sets the value at `path` of `object`. If a portion of `path` doesn't exist,\n * it's created. Arrays are created for missing index properties while objects\n * are created for all other missing properties. Use `_.setWith` to customize\n * `path` creation.\n *\n * **Note:** This method mutates `object`.\n *\n * @static\n * @memberOf _\n * @since 3.7.0\n * @category Object\n * @param {Object} object The object to modify.\n * @param {Array|string} path The path of the property to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns `object`.\n * @example\n *\n * var object = { 'a': [{ 'b': { 'c': 3 } }] };\n *\n * _.set(object, 'a[0].b.c', 4);\n * console.log(object.a[0].b.c);\n * // => 4\n *\n * _.set(object, ['x', '0', 'y', 'z'], 5);\n * console.log(object.x[0].y.z);\n * // => 5\n */\nfunction set(object, path, value) {\n return object == null ? object : baseSet(object, path, value);\n}\n\nmodule.exports = set;\n","var baseAssignValue = require('./_baseAssignValue'),\n baseForOwn = require('./_baseForOwn'),\n baseIteratee = require('./_baseIteratee');\n\n/**\n * Creates an object with the same keys as `object` and values generated\n * by running each own enumerable string keyed property of `object` thru\n * `iteratee`. The iteratee is invoked with three arguments:\n * (value, key, object).\n *\n * @static\n * @memberOf _\n * @since 2.4.0\n * @category Object\n * @param {Object} object The object to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @returns {Object} Returns the new mapped object.\n * @see _.mapKeys\n * @example\n *\n * var users = {\n * 'fred': { 'user': 'fred', 'age': 40 },\n * 'pebbles': { 'user': 'pebbles', 'age': 1 }\n * };\n *\n * _.mapValues(users, function(o) { return o.age; });\n * // => { 'fred': 40, 'pebbles': 1 } (iteration order is not guaranteed)\n *\n * // The `_.property` iteratee shorthand.\n * _.mapValues(users, 'age');\n * // => { 'fred': 40, 'pebbles': 1 } (iteration order is not guaranteed)\n */\nfunction mapValues(object, iteratee) {\n var result = {};\n iteratee = baseIteratee(iteratee, 3);\n\n baseForOwn(object, function(value, key, object) {\n baseAssignValue(result, key, iteratee(value, key, object));\n });\n return result;\n}\n\nmodule.exports = mapValues;\n","/**\n * A faster alternative to `Function#apply`, this function invokes `func`\n * with the `this` binding of `thisArg` and the arguments of `args`.\n *\n * @private\n * @param {Function} func The function to invoke.\n * @param {*} thisArg The `this` binding of `func`.\n * @param {Array} args The arguments to invoke `func` with.\n * @returns {*} Returns the result of `func`.\n */\nfunction apply(func, thisArg, args) {\n switch (args.length) {\n case 0: return func.call(thisArg);\n case 1: return func.call(thisArg, args[0]);\n case 2: return func.call(thisArg, args[0], args[1]);\n case 3: return func.call(thisArg, args[0], args[1], args[2]);\n }\n return func.apply(thisArg, args);\n}\n\nmodule.exports = apply;\n","var apply = require('./_apply');\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeMax = Math.max;\n\n/**\n * A specialized version of `baseRest` which transforms the rest array.\n *\n * @private\n * @param {Function} func The function to apply a rest parameter to.\n * @param {number} [start=func.length-1] The start position of the rest parameter.\n * @param {Function} transform The rest array transform.\n * @returns {Function} Returns the new function.\n */\nfunction overRest(func, start, transform) {\n start = nativeMax(start === undefined ? (func.length - 1) : start, 0);\n return function() {\n var args = arguments,\n index = -1,\n length = nativeMax(args.length - start, 0),\n array = Array(length);\n\n while (++index < length) {\n array[index] = args[start + index];\n }\n index = -1;\n var otherArgs = Array(start + 1);\n while (++index < start) {\n otherArgs[index] = args[index];\n }\n otherArgs[start] = transform(array);\n return apply(func, this, otherArgs);\n };\n}\n\nmodule.exports = overRest;\n","/**\n * Creates a function that returns `value`.\n *\n * @static\n * @memberOf _\n * @since 2.4.0\n * @category Util\n * @param {*} value The value to return from the new function.\n * @returns {Function} Returns the new constant function.\n * @example\n *\n * var objects = _.times(2, _.constant({ 'a': 1 }));\n *\n * console.log(objects);\n * // => [{ 'a': 1 }, { 'a': 1 }]\n *\n * console.log(objects[0] === objects[1]);\n * // => true\n */\nfunction constant(value) {\n return function() {\n return value;\n };\n}\n\nmodule.exports = constant;\n","var constant = require('./constant'),\n defineProperty = require('./_defineProperty'),\n identity = require('./identity');\n\n/**\n * The base implementation of `setToString` without support for hot loop shorting.\n *\n * @private\n * @param {Function} func The function to modify.\n * @param {Function} string The `toString` result.\n * @returns {Function} Returns `func`.\n */\nvar baseSetToString = !defineProperty ? identity : function(func, string) {\n return defineProperty(func, 'toString', {\n 'configurable': true,\n 'enumerable': false,\n 'value': constant(string),\n 'writable': true\n });\n};\n\nmodule.exports = baseSetToString;\n","/** Used to detect hot functions by number of calls within a span of milliseconds. */\nvar HOT_COUNT = 800,\n HOT_SPAN = 16;\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeNow = Date.now;\n\n/**\n * Creates a function that'll short out and invoke `identity` instead\n * of `func` when it's called `HOT_COUNT` or more times in `HOT_SPAN`\n * milliseconds.\n *\n * @private\n * @param {Function} func The function to restrict.\n * @returns {Function} Returns the new shortable function.\n */\nfunction shortOut(func) {\n var count = 0,\n lastCalled = 0;\n\n return function() {\n var stamp = nativeNow(),\n remaining = HOT_SPAN - (stamp - lastCalled);\n\n lastCalled = stamp;\n if (remaining > 0) {\n if (++count >= HOT_COUNT) {\n return arguments[0];\n }\n } else {\n count = 0;\n }\n return func.apply(undefined, arguments);\n };\n}\n\nmodule.exports = shortOut;\n","var baseSetToString = require('./_baseSetToString'),\n shortOut = require('./_shortOut');\n\n/**\n * Sets the `toString` method of `func` to return `string`.\n *\n * @private\n * @param {Function} func The function to modify.\n * @param {Function} string The `toString` result.\n * @returns {Function} Returns `func`.\n */\nvar setToString = shortOut(baseSetToString);\n\nmodule.exports = setToString;\n","var identity = require('./identity'),\n overRest = require('./_overRest'),\n setToString = require('./_setToString');\n\n/**\n * The base implementation of `_.rest` which doesn't validate or coerce arguments.\n *\n * @private\n * @param {Function} func The function to apply a rest parameter to.\n * @param {number} [start=func.length-1] The start position of the rest parameter.\n * @returns {Function} Returns the new function.\n */\nfunction baseRest(func, start) {\n return setToString(overRest(func, start, identity), func + '');\n}\n\nmodule.exports = baseRest;\n","/**\n * This function is like\n * [`Object.keys`](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)\n * except that it includes inherited enumerable properties.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\nfunction nativeKeysIn(object) {\n var result = [];\n if (object != null) {\n for (var key in Object(object)) {\n result.push(key);\n }\n }\n return result;\n}\n\nmodule.exports = nativeKeysIn;\n","var isObject = require('./isObject'),\n isPrototype = require('./_isPrototype'),\n nativeKeysIn = require('./_nativeKeysIn');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * The base implementation of `_.keysIn` which doesn't treat sparse arrays as dense.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\nfunction baseKeysIn(object) {\n if (!isObject(object)) {\n return nativeKeysIn(object);\n }\n var isProto = isPrototype(object),\n result = [];\n\n for (var key in object) {\n if (!(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) {\n result.push(key);\n }\n }\n return result;\n}\n\nmodule.exports = baseKeysIn;\n","var arrayLikeKeys = require('./_arrayLikeKeys'),\n baseKeysIn = require('./_baseKeysIn'),\n isArrayLike = require('./isArrayLike');\n\n/**\n * Creates an array of the own and inherited enumerable property names of `object`.\n *\n * **Note:** Non-object values are coerced to objects.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.keysIn(new Foo);\n * // => ['a', 'b', 'c'] (iteration order is not guaranteed)\n */\nfunction keysIn(object) {\n return isArrayLike(object) ? arrayLikeKeys(object, true) : baseKeysIn(object);\n}\n\nmodule.exports = keysIn;\n","var baseRest = require('./_baseRest'),\n eq = require('./eq'),\n isIterateeCall = require('./_isIterateeCall'),\n keysIn = require('./keysIn');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Assigns own and inherited enumerable string keyed properties of source\n * objects to the destination object for all destination properties that\n * resolve to `undefined`. Source objects are applied from left to right.\n * Once a property is set, additional values of the same property are ignored.\n *\n * **Note:** This method mutates `object`.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Object\n * @param {Object} object The destination object.\n * @param {...Object} [sources] The source objects.\n * @returns {Object} Returns `object`.\n * @see _.defaultsDeep\n * @example\n *\n * _.defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 });\n * // => { 'a': 1, 'b': 2 }\n */\nvar defaults = baseRest(function(object, sources) {\n object = Object(object);\n\n var index = -1;\n var length = sources.length;\n var guard = length > 2 ? sources[2] : undefined;\n\n if (guard && isIterateeCall(sources[0], sources[1], guard)) {\n length = 1;\n }\n\n while (++index < length) {\n var source = sources[index];\n var props = keysIn(source);\n var propsIndex = -1;\n var propsLength = props.length;\n\n while (++propsIndex < propsLength) {\n var key = props[propsIndex];\n var value = object[key];\n\n if (value === undefined ||\n (eq(value, objectProto[key]) && !hasOwnProperty.call(object, key))) {\n object[key] = source[key];\n }\n }\n }\n\n return object;\n});\n\nmodule.exports = defaults;\n","var baseAssignValue = require('./_baseAssignValue'),\n eq = require('./eq');\n\n/**\n * This function is like `assignValue` except that it doesn't assign\n * `undefined` values.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {string} key The key of the property to assign.\n * @param {*} value The value to assign.\n */\nfunction assignMergeValue(object, key, value) {\n if ((value !== undefined && !eq(object[key], value)) ||\n (value === undefined && !(key in object))) {\n baseAssignValue(object, key, value);\n }\n}\n\nmodule.exports = assignMergeValue;\n","var root = require('./_root');\n\n/** Detect free variable `exports`. */\nvar freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;\n\n/** Detect free variable `module`. */\nvar freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;\n\n/** Detect the popular CommonJS extension `module.exports`. */\nvar moduleExports = freeModule && freeModule.exports === freeExports;\n\n/** Built-in value references. */\nvar Buffer = moduleExports ? root.Buffer : undefined,\n allocUnsafe = Buffer ? Buffer.allocUnsafe : undefined;\n\n/**\n * Creates a clone of `buffer`.\n *\n * @private\n * @param {Buffer} buffer The buffer to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Buffer} Returns the cloned buffer.\n */\nfunction cloneBuffer(buffer, isDeep) {\n if (isDeep) {\n return buffer.slice();\n }\n var length = buffer.length,\n result = allocUnsafe ? allocUnsafe(length) : new buffer.constructor(length);\n\n buffer.copy(result);\n return result;\n}\n\nmodule.exports = cloneBuffer;\n","var Uint8Array = require('./_Uint8Array');\n\n/**\n * Creates a clone of `arrayBuffer`.\n *\n * @private\n * @param {ArrayBuffer} arrayBuffer The array buffer to clone.\n * @returns {ArrayBuffer} Returns the cloned array buffer.\n */\nfunction cloneArrayBuffer(arrayBuffer) {\n var result = new arrayBuffer.constructor(arrayBuffer.byteLength);\n new Uint8Array(result).set(new Uint8Array(arrayBuffer));\n return result;\n}\n\nmodule.exports = cloneArrayBuffer;\n","var cloneArrayBuffer = require('./_cloneArrayBuffer');\n\n/**\n * Creates a clone of `typedArray`.\n *\n * @private\n * @param {Object} typedArray The typed array to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Object} Returns the cloned typed array.\n */\nfunction cloneTypedArray(typedArray, isDeep) {\n var buffer = isDeep ? cloneArrayBuffer(typedArray.buffer) : typedArray.buffer;\n return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length);\n}\n\nmodule.exports = cloneTypedArray;\n","/**\n * Copies the values of `source` to `array`.\n *\n * @private\n * @param {Array} source The array to copy values from.\n * @param {Array} [array=[]] The array to copy values to.\n * @returns {Array} Returns `array`.\n */\nfunction copyArray(source, array) {\n var index = -1,\n length = source.length;\n\n array || (array = Array(length));\n while (++index < length) {\n array[index] = source[index];\n }\n return array;\n}\n\nmodule.exports = copyArray;\n","var isObject = require('./isObject');\n\n/** Built-in value references. */\nvar objectCreate = Object.create;\n\n/**\n * The base implementation of `_.create` without support for assigning\n * properties to the created object.\n *\n * @private\n * @param {Object} proto The object to inherit from.\n * @returns {Object} Returns the new object.\n */\nvar baseCreate = (function() {\n function object() {}\n return function(proto) {\n if (!isObject(proto)) {\n return {};\n }\n if (objectCreate) {\n return objectCreate(proto);\n }\n object.prototype = proto;\n var result = new object;\n object.prototype = undefined;\n return result;\n };\n}());\n\nmodule.exports = baseCreate;\n","var overArg = require('./_overArg');\n\n/** Built-in value references. */\nvar getPrototype = overArg(Object.getPrototypeOf, Object);\n\nmodule.exports = getPrototype;\n","var baseCreate = require('./_baseCreate'),\n getPrototype = require('./_getPrototype'),\n isPrototype = require('./_isPrototype');\n\n/**\n * Initializes an object clone.\n *\n * @private\n * @param {Object} object The object to clone.\n * @returns {Object} Returns the initialized clone.\n */\nfunction initCloneObject(object) {\n return (typeof object.constructor == 'function' && !isPrototype(object))\n ? baseCreate(getPrototype(object))\n : {};\n}\n\nmodule.exports = initCloneObject;\n","var isArrayLike = require('./isArrayLike'),\n isObjectLike = require('./isObjectLike');\n\n/**\n * This method is like `_.isArrayLike` except that it also checks if `value`\n * is an object.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an array-like object,\n * else `false`.\n * @example\n *\n * _.isArrayLikeObject([1, 2, 3]);\n * // => true\n *\n * _.isArrayLikeObject(document.body.children);\n * // => true\n *\n * _.isArrayLikeObject('abc');\n * // => false\n *\n * _.isArrayLikeObject(_.noop);\n * // => false\n */\nfunction isArrayLikeObject(value) {\n return isObjectLike(value) && isArrayLike(value);\n}\n\nmodule.exports = isArrayLikeObject;\n","var baseGetTag = require('./_baseGetTag'),\n getPrototype = require('./_getPrototype'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar objectTag = '[object Object]';\n\n/** Used for built-in method references. */\nvar funcProto = Function.prototype,\n objectProto = Object.prototype;\n\n/** Used to resolve the decompiled source of functions. */\nvar funcToString = funcProto.toString;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/** Used to infer the `Object` constructor. */\nvar objectCtorString = funcToString.call(Object);\n\n/**\n * Checks if `value` is a plain object, that is, an object created by the\n * `Object` constructor or one with a `[[Prototype]]` of `null`.\n *\n * @static\n * @memberOf _\n * @since 0.8.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a plain object, else `false`.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * }\n *\n * _.isPlainObject(new Foo);\n * // => false\n *\n * _.isPlainObject([1, 2, 3]);\n * // => false\n *\n * _.isPlainObject({ 'x': 0, 'y': 0 });\n * // => true\n *\n * _.isPlainObject(Object.create(null));\n * // => true\n */\nfunction isPlainObject(value) {\n if (!isObjectLike(value) || baseGetTag(value) != objectTag) {\n return false;\n }\n var proto = getPrototype(value);\n if (proto === null) {\n return true;\n }\n var Ctor = hasOwnProperty.call(proto, 'constructor') && proto.constructor;\n return typeof Ctor == 'function' && Ctor instanceof Ctor &&\n funcToString.call(Ctor) == objectCtorString;\n}\n\nmodule.exports = isPlainObject;\n","/**\n * Gets the value at `key`, unless `key` is \"__proto__\" or \"constructor\".\n *\n * @private\n * @param {Object} object The object to query.\n * @param {string} key The key of the property to get.\n * @returns {*} Returns the property value.\n */\nfunction safeGet(object, key) {\n if (key === 'constructor' && typeof object[key] === 'function') {\n return;\n }\n\n if (key == '__proto__') {\n return;\n }\n\n return object[key];\n}\n\nmodule.exports = safeGet;\n","var assignValue = require('./_assignValue'),\n baseAssignValue = require('./_baseAssignValue');\n\n/**\n * Copies properties of `source` to `object`.\n *\n * @private\n * @param {Object} source The object to copy properties from.\n * @param {Array} props The property identifiers to copy.\n * @param {Object} [object={}] The object to copy properties to.\n * @param {Function} [customizer] The function to customize copied values.\n * @returns {Object} Returns `object`.\n */\nfunction copyObject(source, props, object, customizer) {\n var isNew = !object;\n object || (object = {});\n\n var index = -1,\n length = props.length;\n\n while (++index < length) {\n var key = props[index];\n\n var newValue = customizer\n ? customizer(object[key], source[key], key, object, source)\n : undefined;\n\n if (newValue === undefined) {\n newValue = source[key];\n }\n if (isNew) {\n baseAssignValue(object, key, newValue);\n } else {\n assignValue(object, key, newValue);\n }\n }\n return object;\n}\n\nmodule.exports = copyObject;\n","var copyObject = require('./_copyObject'),\n keysIn = require('./keysIn');\n\n/**\n * Converts `value` to a plain object flattening inherited enumerable string\n * keyed properties of `value` to own properties of the plain object.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Lang\n * @param {*} value The value to convert.\n * @returns {Object} Returns the converted plain object.\n * @example\n *\n * function Foo() {\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.assign({ 'a': 1 }, new Foo);\n * // => { 'a': 1, 'b': 2 }\n *\n * _.assign({ 'a': 1 }, _.toPlainObject(new Foo));\n * // => { 'a': 1, 'b': 2, 'c': 3 }\n */\nfunction toPlainObject(value) {\n return copyObject(value, keysIn(value));\n}\n\nmodule.exports = toPlainObject;\n","var assignMergeValue = require('./_assignMergeValue'),\n cloneBuffer = require('./_cloneBuffer'),\n cloneTypedArray = require('./_cloneTypedArray'),\n copyArray = require('./_copyArray'),\n initCloneObject = require('./_initCloneObject'),\n isArguments = require('./isArguments'),\n isArray = require('./isArray'),\n isArrayLikeObject = require('./isArrayLikeObject'),\n isBuffer = require('./isBuffer'),\n isFunction = require('./isFunction'),\n isObject = require('./isObject'),\n isPlainObject = require('./isPlainObject'),\n isTypedArray = require('./isTypedArray'),\n safeGet = require('./_safeGet'),\n toPlainObject = require('./toPlainObject');\n\n/**\n * A specialized version of `baseMerge` for arrays and objects which performs\n * deep merges and tracks traversed objects enabling objects with circular\n * references to be merged.\n *\n * @private\n * @param {Object} object The destination object.\n * @param {Object} source The source object.\n * @param {string} key The key of the value to merge.\n * @param {number} srcIndex The index of `source`.\n * @param {Function} mergeFunc The function to merge values.\n * @param {Function} [customizer] The function to customize assigned values.\n * @param {Object} [stack] Tracks traversed source values and their merged\n * counterparts.\n */\nfunction baseMergeDeep(object, source, key, srcIndex, mergeFunc, customizer, stack) {\n var objValue = safeGet(object, key),\n srcValue = safeGet(source, key),\n stacked = stack.get(srcValue);\n\n if (stacked) {\n assignMergeValue(object, key, stacked);\n return;\n }\n var newValue = customizer\n ? customizer(objValue, srcValue, (key + ''), object, source, stack)\n : undefined;\n\n var isCommon = newValue === undefined;\n\n if (isCommon) {\n var isArr = isArray(srcValue),\n isBuff = !isArr && isBuffer(srcValue),\n isTyped = !isArr && !isBuff && isTypedArray(srcValue);\n\n newValue = srcValue;\n if (isArr || isBuff || isTyped) {\n if (isArray(objValue)) {\n newValue = objValue;\n }\n else if (isArrayLikeObject(objValue)) {\n newValue = copyArray(objValue);\n }\n else if (isBuff) {\n isCommon = false;\n newValue = cloneBuffer(srcValue, true);\n }\n else if (isTyped) {\n isCommon = false;\n newValue = cloneTypedArray(srcValue, true);\n }\n else {\n newValue = [];\n }\n }\n else if (isPlainObject(srcValue) || isArguments(srcValue)) {\n newValue = objValue;\n if (isArguments(objValue)) {\n newValue = toPlainObject(objValue);\n }\n else if (!isObject(objValue) || isFunction(objValue)) {\n newValue = initCloneObject(srcValue);\n }\n }\n else {\n isCommon = false;\n }\n }\n if (isCommon) {\n // Recursively merge objects and arrays (susceptible to call stack limits).\n stack.set(srcValue, newValue);\n mergeFunc(newValue, srcValue, srcIndex, customizer, stack);\n stack['delete'](srcValue);\n }\n assignMergeValue(object, key, newValue);\n}\n\nmodule.exports = baseMergeDeep;\n","var Stack = require('./_Stack'),\n assignMergeValue = require('./_assignMergeValue'),\n baseFor = require('./_baseFor'),\n baseMergeDeep = require('./_baseMergeDeep'),\n isObject = require('./isObject'),\n keysIn = require('./keysIn'),\n safeGet = require('./_safeGet');\n\n/**\n * The base implementation of `_.merge` without support for multiple sources.\n *\n * @private\n * @param {Object} object The destination object.\n * @param {Object} source The source object.\n * @param {number} srcIndex The index of `source`.\n * @param {Function} [customizer] The function to customize merged values.\n * @param {Object} [stack] Tracks traversed source values and their merged\n * counterparts.\n */\nfunction baseMerge(object, source, srcIndex, customizer, stack) {\n if (object === source) {\n return;\n }\n baseFor(source, function(srcValue, key) {\n stack || (stack = new Stack);\n if (isObject(srcValue)) {\n baseMergeDeep(object, source, key, srcIndex, baseMerge, customizer, stack);\n }\n else {\n var newValue = customizer\n ? customizer(safeGet(object, key), srcValue, (key + ''), object, source, stack)\n : undefined;\n\n if (newValue === undefined) {\n newValue = srcValue;\n }\n assignMergeValue(object, key, newValue);\n }\n }, keysIn);\n}\n\nmodule.exports = baseMerge;\n","var baseMerge = require('./_baseMerge'),\n isObject = require('./isObject');\n\n/**\n * Used by `_.defaultsDeep` to customize its `_.merge` use to merge source\n * objects into destination objects that are passed thru.\n *\n * @private\n * @param {*} objValue The destination value.\n * @param {*} srcValue The source value.\n * @param {string} key The key of the property to merge.\n * @param {Object} object The parent object of `objValue`.\n * @param {Object} source The parent object of `srcValue`.\n * @param {Object} [stack] Tracks traversed source values and their merged\n * counterparts.\n * @returns {*} Returns the value to assign.\n */\nfunction customDefaultsMerge(objValue, srcValue, key, object, source, stack) {\n if (isObject(objValue) && isObject(srcValue)) {\n // Recursively merge objects and arrays (susceptible to call stack limits).\n stack.set(srcValue, objValue);\n baseMerge(objValue, srcValue, undefined, customDefaultsMerge, stack);\n stack['delete'](srcValue);\n }\n return objValue;\n}\n\nmodule.exports = customDefaultsMerge;\n","var baseRest = require('./_baseRest'),\n isIterateeCall = require('./_isIterateeCall');\n\n/**\n * Creates a function like `_.assign`.\n *\n * @private\n * @param {Function} assigner The function to assign values.\n * @returns {Function} Returns the new assigner function.\n */\nfunction createAssigner(assigner) {\n return baseRest(function(object, sources) {\n var index = -1,\n length = sources.length,\n customizer = length > 1 ? sources[length - 1] : undefined,\n guard = length > 2 ? sources[2] : undefined;\n\n customizer = (assigner.length > 3 && typeof customizer == 'function')\n ? (length--, customizer)\n : undefined;\n\n if (guard && isIterateeCall(sources[0], sources[1], guard)) {\n customizer = length < 3 ? undefined : customizer;\n length = 1;\n }\n object = Object(object);\n while (++index < length) {\n var source = sources[index];\n if (source) {\n assigner(object, source, index, customizer);\n }\n }\n return object;\n });\n}\n\nmodule.exports = createAssigner;\n","var baseMerge = require('./_baseMerge'),\n createAssigner = require('./_createAssigner');\n\n/**\n * This method is like `_.merge` except that it accepts `customizer` which\n * is invoked to produce the merged values of the destination and source\n * properties. If `customizer` returns `undefined`, merging is handled by the\n * method instead. The `customizer` is invoked with six arguments:\n * (objValue, srcValue, key, object, source, stack).\n *\n * **Note:** This method mutates `object`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Object\n * @param {Object} object The destination object.\n * @param {...Object} sources The source objects.\n * @param {Function} customizer The function to customize assigned values.\n * @returns {Object} Returns `object`.\n * @example\n *\n * function customizer(objValue, srcValue) {\n * if (_.isArray(objValue)) {\n * return objValue.concat(srcValue);\n * }\n * }\n *\n * var object = { 'a': [1], 'b': [2] };\n * var other = { 'a': [3], 'b': [4] };\n *\n * _.mergeWith(object, other, customizer);\n * // => { 'a': [1, 3], 'b': [2, 4] }\n */\nvar mergeWith = createAssigner(function(object, source, srcIndex, customizer) {\n baseMerge(object, source, srcIndex, customizer);\n});\n\nmodule.exports = mergeWith;\n","var apply = require('./_apply'),\n baseRest = require('./_baseRest'),\n customDefaultsMerge = require('./_customDefaultsMerge'),\n mergeWith = require('./mergeWith');\n\n/**\n * This method is like `_.defaults` except that it recursively assigns\n * default properties.\n *\n * **Note:** This method mutates `object`.\n *\n * @static\n * @memberOf _\n * @since 3.10.0\n * @category Object\n * @param {Object} object The destination object.\n * @param {...Object} [sources] The source objects.\n * @returns {Object} Returns `object`.\n * @see _.defaults\n * @example\n *\n * _.defaultsDeep({ 'a': { 'b': 2 } }, { 'a': { 'b': 1, 'c': 3 } });\n * // => { 'a': { 'b': 2, 'c': 3 } }\n */\nvar defaultsDeep = baseRest(function(args) {\n args.push(undefined, customDefaultsMerge);\n return apply(mergeWith, undefined, args);\n});\n\nmodule.exports = defaultsDeep;\n","var baseEach = require('./_baseEach'),\n isArrayLike = require('./isArrayLike');\n\n/**\n * The base implementation of `_.map` without support for iteratee shorthands.\n *\n * @private\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns the new mapped array.\n */\nfunction baseMap(collection, iteratee) {\n var index = -1,\n result = isArrayLike(collection) ? Array(collection.length) : [];\n\n baseEach(collection, function(value, key, collection) {\n result[++index] = iteratee(value, key, collection);\n });\n return result;\n}\n\nmodule.exports = baseMap;\n","var arrayMap = require('./_arrayMap'),\n baseIteratee = require('./_baseIteratee'),\n baseMap = require('./_baseMap'),\n isArray = require('./isArray');\n\n/**\n * Creates an array of values by running each element in `collection` thru\n * `iteratee`. The iteratee is invoked with three arguments:\n * (value, index|key, collection).\n *\n * Many lodash methods are guarded to work as iteratees for methods like\n * `_.every`, `_.filter`, `_.map`, `_.mapValues`, `_.reject`, and `_.some`.\n *\n * The guarded methods are:\n * `ary`, `chunk`, `curry`, `curryRight`, `drop`, `dropRight`, `every`,\n * `fill`, `invert`, `parseInt`, `random`, `range`, `rangeRight`, `repeat`,\n * `sampleSize`, `slice`, `some`, `sortBy`, `split`, `take`, `takeRight`,\n * `template`, `trim`, `trimEnd`, `trimStart`, and `words`\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @returns {Array} Returns the new mapped array.\n * @example\n *\n * function square(n) {\n * return n * n;\n * }\n *\n * _.map([4, 8], square);\n * // => [16, 64]\n *\n * _.map({ 'a': 4, 'b': 8 }, square);\n * // => [16, 64] (iteration order is not guaranteed)\n *\n * var users = [\n * { 'user': 'barney' },\n * { 'user': 'fred' }\n * ];\n *\n * // The `_.property` iteratee shorthand.\n * _.map(users, 'user');\n * // => ['barney', 'fred']\n */\nfunction map(collection, iteratee) {\n var func = isArray(collection) ? arrayMap : baseMap;\n return func(collection, baseIteratee(iteratee, 3));\n}\n\nmodule.exports = map;\n","/**\n * Gets the first element of `array`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @alias first\n * @category Array\n * @param {Array} array The array to query.\n * @returns {*} Returns the first element of `array`.\n * @example\n *\n * _.head([1, 2, 3]);\n * // => 1\n *\n * _.head([]);\n * // => undefined\n */\nfunction head(array) {\n return (array && array.length) ? array[0] : undefined;\n}\n\nmodule.exports = head;\n","/**\n * Gets the last element of `array`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {Array} array The array to query.\n * @returns {*} Returns the last element of `array`.\n * @example\n *\n * _.last([1, 2, 3]);\n * // => 3\n */\nfunction last(array) {\n var length = array == null ? 0 : array.length;\n return length ? array[length - 1] : undefined;\n}\n\nmodule.exports = last;\n","import _has from 'lodash/has';\nimport _isDate from 'lodash/isDate';\nimport isFunction from 'lodash/isFunction';\nimport isString from 'lodash/isString';\nimport _some from 'lodash/some';\nimport type { ComponentPublicInstance } from 'vue';\n\nexport { isFunction, isString };\nexport { default as isBoolean } from 'lodash/isBoolean';\nexport { default as isNumber } from 'lodash/isNumber';\nexport { default as isUndefined } from 'lodash/isUndefined';\nexport { default as get } from 'lodash/get';\nexport { default as set } from 'lodash/set';\nexport { default as mapValues } from 'lodash/mapValues';\nexport { default as defaults } from 'lodash/defaults';\nexport { default as defaultsDeep } from 'lodash/defaultsDeep';\nexport { default as map } from 'lodash/map';\nexport { default as head } from 'lodash/head';\nexport { default as last } from 'lodash/last';\n\n// Type checkers\nexport const getType = (value: any) =>\n Object.prototype.toString.call(value).slice(8, -1);\nexport const isDate = (value: unknown): value is Date =>\n _isDate(value) && !isNaN(value.getTime());\nexport const isObject = (value: unknown): value is object =>\n getType(value) === 'Object';\n\n// Object utils\nconst hasObj: any = _has;\nexport { hasObj as has };\nexport const hasAny = (obj: object, props: string[]) =>\n _some(props, p => _has(obj, p));\n\n// Collection utils\nexport const some = _some;\n\nexport const pad = (val: string | number, len: number, char = '0') => {\n val = val !== null && val !== undefined ? String(val) : '';\n len = len || 2;\n while (val.length < len) {\n val = `${char}${val}`;\n }\n return val;\n};\n\nexport const roundTenth = (n: number) => {\n return Math.round(n * 100) / 100;\n};\n\nexport const isArray = (val: any): val is any[] => Array.isArray(val);\n\nexport const arrayHasItems = (array: any): boolean =>\n isArray(array) && array.length > 0;\n\nexport const resolveEl = (target: unknown): Node | null => {\n if (target == null) return null;\n if (isString(target)) {\n return typeof document === 'undefined'\n ? null\n : document.querySelector(target);\n }\n return (target as ComponentPublicInstance).$el ?? target;\n};\n\nexport const resolveDocument = (target?: unknown): Document | null => {\n if ((target as Document | undefined)?.nodeType === 9) {\n return target as Document;\n }\n const element = resolveEl(target);\n return (\n element?.ownerDocument ??\n (typeof document === 'undefined' ? null : document)\n );\n};\n\nexport interface ElementPosition {\n top: number;\n left: number;\n}\n\nexport interface CustomElement {\n addEventListener: Function;\n removeEventListener: Function;\n dispatchEvent: Function;\n}\n\nexport const off = (\n element: CustomElement,\n event: string,\n handler: (e: any) => void,\n opts: boolean | EventListenerOptions | undefined = undefined,\n) => {\n element.removeEventListener(event, handler, opts);\n};\n\nexport const on = (\n element: CustomElement,\n event: string,\n handler: (e: any) => void,\n opts: boolean | AddEventListenerOptions | undefined = undefined,\n) => {\n element.addEventListener(event, handler, opts);\n return () => off(element, event, handler, opts);\n};\n\nexport const elementContains = (element: Node, child: Node) =>\n !!element && !!child && (element === child || element.contains(child));\n\nexport const onSpaceOrEnter = (\n event: KeyboardEvent,\n handler: (e: KeyboardEvent) => void,\n) => {\n if (event.key === ' ' || event.key === 'Enter') {\n handler(event);\n event.preventDefault();\n }\n};\n\nexport const capitalize = (str: string) => {\n return str.charAt(0).toUpperCase() + str.slice(1);\n};\n\nexport const omit = <T extends object, K extends [...(keyof T)[]]>(\n obj: T,\n ...keys: K\n) => {\n const ret = {} as {\n [K in keyof typeof obj]: (typeof obj)[K];\n };\n let key: keyof typeof obj;\n for (key in obj) {\n if (!keys.includes(key)) {\n ret[key] = obj[key];\n }\n }\n return ret;\n};\n\nexport const pick = <T extends object, K extends keyof T>(\n obj: T,\n keys: K[],\n): Pick<T, K> => {\n const ret: any = {};\n keys.forEach(key => {\n if (key in obj) ret[key] = obj[key];\n });\n return ret;\n};\n\nexport function extend<T extends object, E extends object>(\n value: T,\n ext: E,\n): T & E {\n const handler = {\n get(target: T, prop: keyof (T | E)) {\n if ((prop as string) in target) {\n return target[prop];\n }\n return ext[prop];\n },\n };\n // @ts-ignore\n return new Proxy(value, handler) as T & E;\n}\n\nexport function clamp(num: number, min: number, max: number) {\n return Math.min(Math.max(num, min), max);\n}\n\nexport function hash(str: string): number {\n let hashcode = 0;\n let chr;\n if (str.length === 0) return hashcode;\n for (let i = 0; i < str.length; i++) {\n chr = str.charCodeAt(i);\n hashcode = (hashcode << 5) - hashcode + chr;\n hashcode |= 0; // Convert to 32bit integer\n }\n return hashcode;\n}\n","/**\n * @module constants\n * @summary Useful constants\n * @description\n * Collection of useful date constants.\n *\n * The constants could be imported from `date-fns/constants`:\n *\n * ```ts\n * import { maxTime, minTime } from \"./constants/date-fns/constants\";\n *\n * function isAllowedTime(time) {\n * return time <= maxTime && time >= minTime;\n * }\n * ```\n */\n\n/**\n * @constant\n * @name daysInWeek\n * @summary Days in 1 week.\n */\nexport const daysInWeek = 7;\n\n/**\n * @constant\n * @name daysInYear\n * @summary Days in 1 year.\n *\n * @description\n * How many days in a year.\n *\n * One years equals 365.2425 days according to the formula:\n *\n * > Leap year occurs every 4 years, except for years that are divisible by 100 and not divisible by 400.\n * > 1 mean year = (365+1/4-1/100+1/400) days = 365.2425 days\n */\nexport const daysInYear = 365.2425;\n\n/**\n * @constant\n * @name maxTime\n * @summary Maximum allowed time.\n *\n * @example\n * import { maxTime } from \"./constants/date-fns/constants\";\n *\n * const isValid = 8640000000000001 <= maxTime;\n * //=> false\n *\n * new Date(8640000000000001);\n * //=> Invalid Date\n */\nexport const maxTime = Math.pow(10, 8) * 24 * 60 * 60 * 1000;\n\n/**\n * @constant\n * @name minTime\n * @summary Minimum allowed time.\n *\n * @example\n * import { minTime } from \"./constants/date-fns/constants\";\n *\n * const isValid = -8640000000000001 >= minTime;\n * //=> false\n *\n * new Date(-8640000000000001)\n * //=> Invalid Date\n */\nexport const minTime = -maxTime;\n\n/**\n * @constant\n * @name millisecondsInWeek\n * @summary Milliseconds in 1 week.\n */\nexport const millisecondsInWeek = 604800000;\n\n/**\n * @constant\n * @name millisecondsInDay\n * @summary Milliseconds in 1 day.\n */\nexport const millisecondsInDay = 86400000;\n\n/**\n * @constant\n * @name millisecondsInMinute\n * @summary Milliseconds in 1 minute\n */\nexport const millisecondsInMinute = 60000;\n\n/**\n * @constant\n * @name millisecondsInHour\n * @summary Milliseconds in 1 hour\n */\nexport const millisecondsInHour = 3600000;\n\n/**\n * @constant\n * @name millisecondsInSecond\n * @summary Milliseconds in 1 second\n */\nexport const millisecondsInSecond = 1000;\n\n/**\n * @constant\n * @name minutesInYear\n * @summary Minutes in 1 year.\n */\nexport const minutesInYear = 525600;\n\n/**\n * @constant\n * @name minutesInMonth\n * @summary Minutes in 1 month.\n */\nexport const minutesInMonth = 43200;\n\n/**\n * @constant\n * @name minutesInDay\n * @summary Minutes in 1 day.\n */\nexport const minutesInDay = 1440;\n\n/**\n * @constant\n * @name minutesInHour\n * @summary Minutes in 1 hour.\n */\nexport const minutesInHour = 60;\n\n/**\n * @constant\n * @name monthsInQuarter\n * @summary Months in 1 quarter.\n */\nexport const monthsInQuarter = 3;\n\n/**\n * @constant\n * @name monthsInYear\n * @summary Months in 1 year.\n */\nexport const monthsInYear = 12;\n\n/**\n * @constant\n * @name quartersInYear\n * @summary Quarters in 1 year\n */\nexport const quartersInYear = 4;\n\n/**\n * @constant\n * @name secondsInHour\n * @summary Seconds in 1 hour.\n */\nexport const secondsInHour = 3600;\n\n/**\n * @constant\n * @name secondsInMinute\n * @summary Seconds in 1 minute.\n */\nexport const secondsInMinute = 60;\n\n/**\n * @constant\n * @name secondsInDay\n * @summary Seconds in 1 day.\n */\nexport const secondsInDay = secondsInHour * 24;\n\n/**\n * @constant\n * @name secondsInWeek\n * @summary Seconds in 1 week.\n */\nexport const secondsInWeek = secondsInDay * 7;\n\n/**\n * @constant\n * @name secondsInYear\n * @summary Seconds in 1 year.\n */\nexport const secondsInYear = secondsInDay * daysInYear;\n\n/**\n * @constant\n * @name secondsInMonth\n * @summary Seconds in 1 month\n */\nexport const secondsInMonth = secondsInYear / 12;\n\n/**\n * @constant\n * @name secondsInQuarter\n * @summary Seconds in 1 quarter.\n */\nexport const secondsInQuarter = secondsInMonth * 3;\n\n/**\n * @constant\n * @name constructFromSymbol\n * @summary Symbol enabling Date extensions to inherit properties from the reference date.\n *\n * The symbol is used to enable the `constructFrom` function to construct a date\n * using a reference date and a value. It allows to transfer extra properties\n * from the reference date to the new date. It's useful for extensions like\n * [`TZDate`](https://github.com/date-fns/tz) that accept a time zone as\n * a constructor argument.\n */\nexport const constructFromSymbol = Symbol.for(\"constructDateFrom\");\n","import { constructFromSymbol } from \"./constants.js\";\n\n/**\n * @name constructFrom\n * @category Generic Helpers\n * @summary Constructs a date using the reference date and the value\n *\n * @description\n * The function constructs a new date using the constructor from the reference\n * date and the given value. It helps to build generic functions that accept\n * date extensions.\n *\n * It defaults to `Date` if the passed reference date is a number or a string.\n *\n * Starting from v3.7.0, it allows to construct a date using `[Symbol.for(\"constructDateFrom\")]`\n * enabling to transfer extra properties from the reference date to the new date.\n * It's useful for extensions like [`TZDate`](https://github.com/date-fns/tz)\n * that accept a time zone as a constructor argument.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n *\n * @param date - The reference date to take constructor from\n * @param value - The value to create the date\n *\n * @returns Date initialized using the given date and value\n *\n * @example\n * import { constructFrom } from \"./constructFrom/date-fns\";\n *\n * // A function that clones a date preserving the original type\n * function cloneDate<DateType extends Date>(date: DateType): DateType {\n * return constructFrom(\n * date, // Use constructor from the given date\n * date.getTime() // Use the date value to create a new date\n * );\n * }\n */\nexport function constructFrom(date, value) {\n if (typeof date === \"function\") return date(value);\n\n if (date && typeof date === \"object\" && constructFromSymbol in date)\n return date[constructFromSymbol](value);\n\n if (date instanceof Date) return new date.constructor(value);\n\n return new Date(value);\n}\n\n// Fallback for modularized imports:\nexport default constructFrom;\n","import { constructFrom } from \"./constructFrom.js\";\n\n/**\n * @name toDate\n * @category Common Helpers\n * @summary Convert the given argument to an instance of Date.\n *\n * @description\n * Convert the given argument to an instance of Date.\n *\n * If the argument is an instance of Date, the function returns its clone.\n *\n * If the argument is a number, it is treated as a timestamp.\n *\n * If the argument is none of the above, the function returns Invalid Date.\n *\n * Starting from v3.7.0, it clones a date using `[Symbol.for(\"constructDateFrom\")]`\n * enabling to transfer extra properties from the reference date to the new date.\n * It's useful for extensions like [`TZDate`](https://github.com/date-fns/tz)\n * that accept a time zone as a constructor argument.\n *\n * **Note**: *all* Date arguments passed to any *date-fns* function is processed by `toDate`.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.\n *\n * @param argument - The value to convert\n *\n * @returns The parsed date in the local time zone\n *\n * @example\n * // Clone the date:\n * const result = toDate(new Date(2014, 1, 11, 11, 30, 30))\n * //=> Tue Feb 11 2014 11:30:30\n *\n * @example\n * // Convert the timestamp to date:\n * const result = toDate(1392098430000)\n * //=> Tue Feb 11 2014 11:30:30\n */\nexport function toDate(argument, context) {\n // [TODO] Get rid of `toDate` or `constructFrom`?\n return constructFrom(context || argument, argument);\n}\n\n// Fallback for modularized imports:\nexport default toDate;\n","import { constructFrom } from \"./constructFrom.js\";\nimport { toDate } from \"./toDate.js\";\n\n/**\n * The {@link addDays} function options.\n */\n\n/**\n * @name addDays\n * @category Day Helpers\n * @summary Add the specified number of days to the given date.\n *\n * @description\n * Add the specified number of days to the given date.\n *\n * **You don't need date-fns\\***:\n *\n * Temporal has a built-in `add` method on all its classes:\n *\n * - [`Temporal.Instant.prototype.add()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/Instant/add)\n * - [`Temporal.PlainDate.prototype.add()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/PlainDate/add)\n * - [`Temporal.PlainDateTime.prototype.add()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/PlainDateTime/add)\n * - [`Temporal.PlainTime.prototype.add()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/PlainTime/add)\n * - [`Temporal.PlainYearMonth.prototype.add()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/PlainYearMonth/add)\n * - [`Temporal.ZonedDateTime.prototype.add()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/ZonedDateTime/add)\n *\n * \\* **Not really**, see: https://date-fns.org/you-dont-need-date-fns\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.\n *\n * @param date - The date to be changed\n * @param amount - The amount of days to be added.\n * @param options - An object with options\n *\n * @returns The new date with the days added\n *\n * @example\n * // Add 10 days to 1 September 2014:\n * const result = addDays(new Date(2014, 8, 1), 10)\n * //=> Thu Sep 11 2014 00:00:00\n *\n * @example\n * // Using Temporal:\n * // Add 10 days to 1 September 2014:\n * Temporal.PlainDate.from(\"2014-09-01\").add({ days: 10 }).toString();\n * //=> \"2014-09-11\"\n */\nexport function addDays(date, amount, options) {\n const _date = toDate(date, options?.in);\n if (isNaN(amount)) return constructFrom(options?.in || date, NaN);\n\n // If 0 days, no-op to avoid changing times in the hour before end of DST\n if (!amount) return _date;\n\n _date.setDate(_date.getDate() + amount);\n return _date;\n}\n\n// Fallback for modularized imports:\nexport default addDays;\n","import { constructFrom } from \"./constructFrom.js\";\nimport { toDate } from \"./toDate.js\";\n\n/**\n * The {@link addMonths} function options.\n */\n\n/**\n * @name addMonths\n * @category Month Helpers\n * @summary Add the specified number of months to the given date.\n *\n * @description\n * Add the specified number of months to the given date.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.\n *\n * @param date - The date to be changed\n * @param amount - The amount of months to be added.\n * @param options - The options object\n *\n * @returns The new date with the months added\n *\n * @example\n * // Add 5 months to 1 September 2014:\n * const result = addMonths(new Date(2014, 8, 1), 5)\n * //=> Sun Feb 01 2015 00:00:00\n *\n * // Add one month to 30 January 2023:\n * const result = addMonths(new Date(2023, 0, 30), 1)\n * //=> Tue Feb 28 2023 00:00:00\n */\nexport function addMonths(date, amount, options) {\n const _date = toDate(date, options?.in);\n if (isNaN(amount)) return constructFrom(options?.in || date, NaN);\n if (!amount) {\n // If 0 months, no-op to avoid changing times in the hour before end of DST\n return _date;\n }\n const dayOfMonth = _date.getDate();\n\n // The JS Date object supports date math by accepting out-of-bounds values for\n // month, day, etc. For example, new Date(2020, 0, 0) returns 31 Dec 2019 and\n // new Date(2020, 13, 1) returns 1 Feb 2021. This is *almost* the behavior we\n // want except that dates will wrap around the end of a month, meaning that\n // new Date(2020, 13, 31) will return 3 Mar 2021 not 28 Feb 2021 as desired. So\n // we'll default to the end of the desired month by adding 1 to the desired\n // month and using a date of 0 to back up one day to the end of the desired\n // month.\n const endOfDesiredMonth = constructFrom(options?.in || date, _date.getTime());\n endOfDesiredMonth.setMonth(_date.getMonth() + amount + 1, 0);\n const daysInMonth = endOfDesiredMonth.getDate();\n if (dayOfMonth >= daysInMonth) {\n // If we're already at the end of the month, then this is the correct date\n // and we're done.\n return endOfDesiredMonth;\n } else {\n // Otherwise, we now know that setting the original day-of-month value won't\n // cause an overflow, so set the desired day-of-month. Note that we can't\n // just set the date of `endOfDesiredMonth` because that object may have had\n // its time changed in the unusual case where where a DST transition was on\n // the last day of the month and its local time was in the hour skipped or\n // repeated next to a DST transition. So we use `date` instead which is\n // guaranteed to still have the original time.\n _date.setFullYear(\n endOfDesiredMonth.getFullYear(),\n endOfDesiredMonth.getMonth(),\n dayOfMonth,\n );\n return _date;\n }\n}\n\n// Fallback for modularized imports:\nexport default addMonths;\n","let defaultOptions = {};\n\nexport function getDefaultOptions() {\n return defaultOptions;\n}\n\nexport function setDefaultOptions(newOptions) {\n defaultOptions = newOptions;\n}\n","import { getDefaultOptions } from \"./_lib/defaultOptions.js\";\nimport { toDate } from \"./toDate.js\";\n\n/**\n * The {@link startOfWeek} function options.\n */\n\n/**\n * @name startOfWeek\n * @category Week Helpers\n * @summary Return the start of a week for the given date.\n *\n * @description\n * Return the start of a week for the given date.\n * The result will be in the local timezone.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.\n *\n * @param date - The original date\n * @param options - An object with options\n *\n * @returns The start of a week\n *\n * @example\n * // The start of a week for 2 September 2014 11:55:00:\n * const result = startOfWeek(new Date(2014, 8, 2, 11, 55, 0))\n * //=> Sun Aug 31 2014 00:00:00\n *\n * @example\n * // If the week starts on Monday, the start of the week for 2 September 2014 11:55:00:\n * const result = startOfWeek(new Date(2014, 8, 2, 11, 55, 0), { weekStartsOn: 1 })\n * //=> Mon Sep 01 2014 00:00:00\n */\nexport function startOfWeek(date, options) {\n const defaultOptions = getDefaultOptions();\n const weekStartsOn =\n options?.weekStartsOn ??\n options?.locale?.options?.weekStartsOn ??\n defaultOptions.weekStartsOn ??\n defaultOptions.locale?.options?.weekStartsOn ??\n 0;\n\n const _date = toDate(date, options?.in);\n const day = _date.getDay();\n const diff = (day < weekStartsOn ? 7 : 0) + day - weekStartsOn;\n\n _date.setDate(_date.getDate() - diff);\n _date.setHours(0, 0, 0, 0);\n return _date;\n}\n\n// Fallback for modularized imports:\nexport default startOfWeek;\n","import { startOfWeek } from \"./startOfWeek.js\";\n\n/**\n * The {@link startOfISOWeek} function options.\n */\n\n/**\n * @name startOfISOWeek\n * @category ISO Week Helpers\n * @summary Return the start of an ISO week for the given date.\n *\n * @description\n * Return the start of an ISO week for the given date.\n * The result will be in the local timezone.\n *\n * ISO week-numbering year: http://en.wikipedia.org/wiki/ISO_week_date\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.\n *\n * @param date - The original date\n * @param options - An object with options\n *\n * @returns The start of an ISO week\n *\n * @example\n * // The start of an ISO week for 2 September 2014 11:55:00:\n * const result = startOfISOWeek(new Date(2014, 8, 2, 11, 55, 0))\n * //=> Mon Sep 01 2014 00:00:00\n */\nexport function startOfISOWeek(date, options) {\n return startOfWeek(date, { ...options, weekStartsOn: 1 });\n}\n\n// Fallback for modularized imports:\nexport default startOfISOWeek;\n","import { constructFrom } from \"./constructFrom.js\";\nimport { startOfISOWeek } from \"./startOfISOWeek.js\";\nimport { toDate } from \"./toDate.js\";\n\n/**\n * The {@link getISOWeekYear} function options.\n */\n\n/**\n * @name getISOWeekYear\n * @category ISO Week-Numbering Year Helpers\n * @summary Get the ISO week-numbering year of the given date.\n *\n * @description\n * Get the ISO week-numbering year of the given date,\n * which always starts 3 days before the year's first Thursday.\n *\n * ISO week-numbering year: http://en.wikipedia.org/wiki/ISO_week_date\n *\n * @param date - The given date\n *\n * @returns The ISO week-numbering year\n *\n * @example\n * // Which ISO-week numbering year is 2 January 2005?\n * const result = getISOWeekYear(new Date(2005, 0, 2))\n * //=> 2004\n */\nexport function getISOWeekYear(date, options) {\n const _date = toDate(date, options?.in);\n const year = _date.getFullYear();\n\n const fourthOfJanuaryOfNextYear = constructFrom(_date, 0);\n fourthOfJanuaryOfNextYear.setFullYear(year + 1, 0, 4);\n fourthOfJanuaryOfNextYear.setHours(0, 0, 0, 0);\n const startOfNextYear = startOfISOWeek(fourthOfJanuaryOfNextYear);\n\n const fourthOfJanuaryOfThisYear = constructFrom(_date, 0);\n fourthOfJanuaryOfThisYear.setFullYear(year, 0, 4);\n fourthOfJanuaryOfThisYear.setHours(0, 0, 0, 0);\n const startOfThisYear = startOfISOWeek(fourthOfJanuaryOfThisYear);\n\n if (_date.getTime() >= startOfNextYear.getTime()) {\n return year + 1;\n } else if (_date.getTime() >= startOfThisYear.getTime()) {\n return year;\n } else {\n return year - 1;\n }\n}\n\n// Fallback for modularized imports:\nexport default getISOWeekYear;\n","import { toDate } from \"../toDate.js\";\n\n/**\n * Google Chrome as of 67.0.3396.87 introduced timezones with offset that includes seconds.\n * They usually appear for dates that denote time before the timezones were introduced\n * (e.g. for 'Europe/Prague' timezone the offset is GMT+00:57:44 before 1 October 1891\n * and GMT+01:00:00 after that date)\n *\n * Date#getTimezoneOffset returns the offset in minutes and would return 57 for the example above,\n * which would lead to incorrect calculations.\n *\n * This function returns the timezone offset in milliseconds that takes seconds in account.\n */\nexport function getTimezoneOffsetInMilliseconds(date) {\n const _date = toDate(date);\n const utcDate = new Date(\n Date.UTC(\n _date.getFullYear(),\n _date.getMonth(),\n _date.getDate(),\n _date.getHours(),\n _date.getMinutes(),\n _date.getSeconds(),\n _date.getMilliseconds(),\n ),\n );\n utcDate.setUTCFullYear(_date.getFullYear());\n return +date - +utcDate;\n}\n","import { constructFrom } from \"../constructFrom.js\";\n\nexport function normalizeDates(context, ...dates) {\n const normalize = constructFrom.bind(\n null,\n context || dates.find((date) => typeof date === \"object\"),\n );\n return dates.map(normalize);\n}\n","import { constructFrom } from \"./constructFrom.js\";\nimport { getISOWeekYear } from \"./getISOWeekYear.js\";\nimport { startOfISOWeek } from \"./startOfISOWeek.js\";\n\n/**\n * The {@link startOfISOWeekYear} function options.\n */\n\n/**\n * @name startOfISOWeekYear\n * @category ISO Week-Numbering Year Helpers\n * @summary Return the start of an ISO week-numbering year for the given date.\n *\n * @description\n * Return the start of an ISO week-numbering year,\n * which always starts 3 days before the year's first Thursday.\n * The result will be in the local timezone.\n *\n * ISO week-numbering year: http://en.wikipedia.org/wiki/ISO_week_date\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.\n *\n * @param date - The original date\n * @param options - An object with options\n *\n * @returns The start of an ISO week-numbering year\n *\n * @example\n * // The start of an ISO week-numbering year for 2 July 2005:\n * const result = startOfISOWeekYear(new Date(2005, 6, 2))\n * //=> Mon Jan 03 2005 00:00:00\n */\nexport function startOfISOWeekYear(date, options) {\n const year = getISOWeekYear(date, options);\n const fourthOfJanuary = constructFrom(options?.in || date, 0);\n fourthOfJanuary.setFullYear(year, 0, 4);\n fourthOfJanuary.setHours(0, 0, 0, 0);\n return startOfISOWeek(fourthOfJanuary);\n}\n\n// Fallback for modularized imports:\nexport default startOfISOWeekYear;\n","import { addMonths } from \"./addMonths.js\";\n\n/**\n * The {@link addYears} function options.\n */\n\n/**\n * @name addYears\n * @category Year Helpers\n * @summary Add the specified number of years to the given date.\n *\n * @description\n * Add the specified number of years to the given date.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n * @typeParam ResultDate - The result `Date` type.\n *\n * @param date - The date to be changed\n * @param amount - The amount of years to be added.\n * @param options - The options\n *\n * @returns The new date with the years added\n *\n * @example\n * // Add 5 years to 1 September 2014:\n * const result = addYears(new Date(2014, 8, 1), 5)\n * //=> Sun Sep 01 2019 00:00:00\n */\nexport function addYears(date, amount, options) {\n return addMonths(date, amount * 12, options);\n}\n\n// Fallback for modularized imports:\nexport default addYears;\n","import { getTimezoneOffsetInMilliseconds } from \"./_lib/getTimezoneOffsetInMilliseconds.js\";\nimport { normalizeDates } from \"./_lib/normalizeDates.js\";\nimport { millisecondsInWeek } from \"./constants.js\";\nimport { startOfWeek } from \"./startOfWeek.js\";\n\n/**\n * The {@link differenceInCalendarWeeks} function options.\n */\n\n/**\n * @name differenceInCalendarWeeks\n * @category Week Helpers\n * @summary Get the number of calendar weeks between the given dates.\n *\n * @description\n * Get the number of calendar weeks between the given dates.\n *\n * @param laterDate - The later date\n * @param earlierDate - The earlier date\n * @param options - An object with options.\n *\n * @returns The number of calendar weeks\n *\n * @example\n * // How many calendar weeks are between 5 July 2014 and 20 July 2014?\n * const result = differenceInCalendarWeeks(\n * new Date(2014, 6, 20),\n * new Date(2014, 6, 5)\n * )\n * //=> 3\n *\n * @example\n * // If the week starts on Monday,\n * // how many calendar weeks are between 5 July 2014 and 20 July 2014?\n * const result = differenceInCalendarWeeks(\n * new Date(2014, 6, 20),\n * new Date(2014, 6, 5),\n * { weekStartsOn: 1 }\n * )\n * //=> 2\n */\nexport function differenceInCalendarWeeks(laterDate, earlierDate, options) {\n const [laterDate_, earlierDate_] = normalizeDates(\n options?.in,\n laterDate,\n earlierDate,\n );\n\n const laterStartOfWeek = startOfWeek(laterDate_, options);\n const earlierStartOfWeek = startOfWeek(earlierDate_, options);\n\n const laterTimestamp =\n +laterStartOfWeek - getTimezoneOffsetInMilliseconds(laterStartOfWeek);\n const earlierTimestamp =\n +earlierStartOfWeek - getTimezoneOffsetInMilliseconds(earlierStartOfWeek);\n\n return Math.round((laterTimestamp - earlierTimestamp) / millisecondsInWeek);\n}\n\n// Fallback for modularized imports:\nexport default differenceInCalendarWeeks;\n","import { toDate } from \"./toDate.js\";\n\n/**\n * The {@link startOfMonth} function options.\n */\n\n/**\n * @name startOfMonth\n * @category Month Helpers\n * @summary Return the start of a month for the given date.\n *\n * @description\n * Return the start of a month for the given date. The result will be in the local timezone.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments.\n * Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed,\n * or inferred from the arguments.\n *\n * @param date - The original date\n * @param options - An object with options\n *\n * @returns The start of a month\n *\n * @example\n * // The start of a month for 2 September 2014 11:55:00:\n * const result = startOfMonth(new Date(2014, 8, 2, 11, 55, 0))\n * //=> Mon Sep 01 2014 00:00:00\n */\nexport function startOfMonth(date, options) {\n const _date = toDate(date, options?.in);\n _date.setDate(1);\n _date.setHours(0, 0, 0, 0);\n return _date;\n}\n\n// Fallback for modularized imports:\nexport default startOfMonth;\n","import { millisecondsInWeek } from \"./constants.js\";\nimport { startOfISOWeek } from \"./startOfISOWeek.js\";\nimport { startOfISOWeekYear } from \"./startOfISOWeekYear.js\";\nimport { toDate } from \"./toDate.js\";\n\n/**\n * The {@link getISOWeek} function options.\n */\n\n/**\n * @name getISOWeek\n * @category ISO Week Helpers\n * @summary Get the ISO week of the given date.\n *\n * @description\n * Get the ISO week of the given date.\n *\n * ISO week-numbering year: http://en.wikipedia.org/wiki/ISO_week_date\n *\n * @param date - The given date\n * @param options - The options\n *\n * @returns The ISO week\n *\n * @example\n * // Which week of the ISO-week numbering year is 2 January 2005?\n * const result = getISOWeek(new Date(2005, 0, 2))\n * //=> 53\n */\nexport function getISOWeek(date, options) {\n const _date = toDate(date, options?.in);\n const diff = +startOfISOWeek(_date) - +startOfISOWeekYear(_date);\n\n // Round the number of weeks to the nearest integer because the number of\n // milliseconds in a week is not constant (e.g. it's different in the week of\n // the daylight saving time clock shift).\n return Math.round(diff / millisecondsInWeek) + 1;\n}\n\n// Fallback for modularized imports:\nexport default getISOWeek;\n","import { getDefaultOptions } from \"./_lib/defaultOptions.js\";\nimport { constructFrom } from \"./constructFrom.js\";\nimport { startOfWeek } from \"./startOfWeek.js\";\nimport { toDate } from \"./toDate.js\";\n\n/**\n * The {@link getWeekYear} function options.\n */\n\n/**\n * @name getWeekYear\n * @category Week-Numbering Year Helpers\n * @summary Get the local week-numbering year of the given date.\n *\n * @description\n * Get the local week-numbering year of the given date.\n * The exact calculation depends on the values of\n * `options.weekStartsOn` (which is the index of the first day of the week)\n * and `options.firstWeekContainsDate` (which is the day of January, which is always in\n * the first week of the week-numbering year)\n *\n * Week numbering: https://en.wikipedia.org/wiki/Week#The_ISO_week_date_system\n *\n * @param date - The given date\n * @param options - An object with options.\n *\n * @returns The local week-numbering year\n *\n * @example\n * // Which week numbering year is 26 December 2004 with the default settings?\n * const result = getWeekYear(new Date(2004, 11, 26))\n * //=> 2005\n *\n * @example\n * // Which week numbering year is 26 December 2004 if week starts on Saturday?\n * const result = getWeekYear(new Date(2004, 11, 26), { weekStartsOn: 6 })\n * //=> 2004\n *\n * @example\n * // Which week numbering year is 26 December 2004 if the first week contains 4 January?\n * const result = getWeekYear(new Date(2004, 11, 26), { firstWeekContainsDate: 4 })\n * //=> 2004\n */\nexport function getWeekYear(date, options) {\n const _date = toDate(date, options?.in);\n const year = _date.getFullYear();\n\n const defaultOptions = getDefaultOptions();\n const firstWeekContainsDate =\n options?.firstWeekContainsDate ??\n options?.locale?.options?.firstWeekContainsDate ??\n defaultOptions.firstWeekContainsDate ??\n defaultOptions.locale?.options?.firstWeekContainsDate ??\n 1;\n\n const firstWeekOfNextYear = constructFrom(options?.in || date, 0);\n firstWeekOfNextYear.setFullYear(year + 1, 0, firstWeekContainsDate);\n firstWeekOfNextYear.setHours(0, 0, 0, 0);\n const startOfNextYear = startOfWeek(firstWeekOfNextYear, options);\n\n const firstWeekOfThisYear = constructFrom(options?.in || date, 0);\n firstWeekOfThisYear.setFullYear(year, 0, firstWeekContainsDate);\n firstWeekOfThisYear.setHours(0, 0, 0, 0);\n const startOfThisYear = startOfWeek(firstWeekOfThisYear, options);\n\n if (+_date >= +startOfNextYear) {\n return year + 1;\n } else if (+_date >= +startOfThisYear) {\n return year;\n } else {\n return year - 1;\n }\n}\n\n// Fallback for modularized imports:\nexport default getWeekYear;\n","import { getDefaultOptions } from \"./_lib/defaultOptions.js\";\nimport { constructFrom } from \"./constructFrom.js\";\nimport { getWeekYear } from \"./getWeekYear.js\";\nimport { startOfWeek } from \"./startOfWeek.js\";\n\n/**\n * The {@link startOfWeekYear} function options.\n */\n\n/**\n * @name startOfWeekYear\n * @category Week-Numbering Year Helpers\n * @summary Return the start of a local week-numbering year for the given date.\n *\n * @description\n * Return the start of a local week-numbering year.\n * The exact calculation depends on the values of\n * `options.weekStartsOn` (which is the index of the first day of the week)\n * and `options.firstWeekContainsDate` (which is the day of January, which is always in\n * the first week of the week-numbering year)\n *\n * Week numbering: https://en.wikipedia.org/wiki/Week#The_ISO_week_date_system\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n * @typeParam ResultDate - The result `Date` type.\n *\n * @param date - The original date\n * @param options - An object with options\n *\n * @returns The start of a week-numbering year\n *\n * @example\n * // The start of an a week-numbering year for 2 July 2005 with default settings:\n * const result = startOfWeekYear(new Date(2005, 6, 2))\n * //=> Sun Dec 26 2004 00:00:00\n *\n * @example\n * // The start of a week-numbering year for 2 July 2005\n * // if Monday is the first day of week\n * // and 4 January is always in the first week of the year:\n * const result = startOfWeekYear(new Date(2005, 6, 2), {\n * weekStartsOn: 1,\n * firstWeekContainsDate: 4\n * })\n * //=> Mon Jan 03 2005 00:00:00\n */\nexport function startOfWeekYear(date, options) {\n const defaultOptions = getDefaultOptions();\n const firstWeekContainsDate =\n options?.firstWeekContainsDate ??\n options?.locale?.options?.firstWeekContainsDate ??\n defaultOptions.firstWeekContainsDate ??\n defaultOptions.locale?.options?.firstWeekContainsDate ??\n 1;\n\n const year = getWeekYear(date, options);\n const firstWeek = constructFrom(options?.in || date, 0);\n firstWeek.setFullYear(year, 0, firstWeekContainsDate);\n firstWeek.setHours(0, 0, 0, 0);\n const _date = startOfWeek(firstWeek, options);\n return _date;\n}\n\n// Fallback for modularized imports:\nexport default startOfWeekYear;\n","import { millisecondsInWeek } from \"./constants.js\";\nimport { startOfWeek } from \"./startOfWeek.js\";\nimport { startOfWeekYear } from \"./startOfWeekYear.js\";\nimport { toDate } from \"./toDate.js\";\n\n/**\n * The {@link getWeek} function options.\n */\n\n/**\n * @name getWeek\n * @category Week Helpers\n * @summary Get the local week index of the given date.\n *\n * @description\n * Get the local week index of the given date.\n * The exact calculation depends on the values of\n * `options.weekStartsOn` (which is the index of the first day of the week)\n * and `options.firstWeekContainsDate` (which is the day of January, which is always in\n * the first week of the week-numbering year)\n *\n * Week numbering: https://en.wikipedia.org/wiki/Week#The_ISO_week_date_system\n *\n * @param date - The given date\n * @param options - An object with options\n *\n * @returns The week\n *\n * @example\n * // Which week of the local week numbering year is 2 January 2005 with default options?\n * const result = getWeek(new Date(2005, 0, 2))\n * //=> 2\n *\n * @example\n * // Which week of the local week numbering year is 2 January 2005,\n * // if Monday is the first day of the week,\n * // and the first week of the year always contains 4 January?\n * const result = getWeek(new Date(2005, 0, 2), {\n * weekStartsOn: 1,\n * firstWeekContainsDate: 4\n * })\n * //=> 53\n */\nexport function getWeek(date, options) {\n const _date = toDate(date, options?.in);\n const diff = +startOfWeek(_date, options) - +startOfWeekYear(_date, options);\n\n // Round the number of weeks to the nearest integer because the number of\n // milliseconds in a week is not constant (e.g. it's different in the week of\n // the daylight saving time clock shift).\n return Math.round(diff / millisecondsInWeek) + 1;\n}\n\n// Fallback for modularized imports:\nexport default getWeek;\n","import { toDate } from \"./toDate.js\";\n\n/**\n * The {@link lastDayOfMonth} function options.\n */\n\n/**\n * @name lastDayOfMonth\n * @category Month Helpers\n * @summary Return the last day of a month for the given date.\n *\n * @description\n * Return the last day of a month for the given date.\n * The result will be in the local timezone.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.\n *\n * @param date - The original date\n * @param options - An object with options\n *\n * @returns The last day of a month\n *\n * @example\n * // The last day of a month for 2 September 2014 11:55:00:\n * const result = lastDayOfMonth(new Date(2014, 8, 2, 11, 55, 0))\n * //=> Tue Sep 30 2014 00:00:00\n */\nexport function lastDayOfMonth(date, options) {\n const _date = toDate(date, options?.in);\n const month = _date.getMonth();\n _date.setFullYear(_date.getFullYear(), month + 1, 0);\n _date.setHours(0, 0, 0, 0);\n return toDate(_date, options?.in);\n}\n\n// Fallback for modularized imports:\nexport default lastDayOfMonth;\n","import { differenceInCalendarWeeks } from \"./differenceInCalendarWeeks.js\";\nimport { lastDayOfMonth } from \"./lastDayOfMonth.js\";\nimport { startOfMonth } from \"./startOfMonth.js\";\nimport { toDate } from \"./toDate.js\";\n\n/**\n * The {@link getWeeksInMonth} function options.\n */\n\n/**\n * @name getWeeksInMonth\n * @category Week Helpers\n * @summary Get the number of calendar weeks a month spans.\n *\n * @description\n * Get the number of calendar weeks the month in the given date spans.\n *\n * @param date - The given date\n * @param options - An object with options.\n *\n * @returns The number of calendar weeks\n *\n * @example\n * // How many calendar weeks does February 2015 span?\n * const result = getWeeksInMonth(new Date(2015, 1, 8))\n * //=> 4\n *\n * @example\n * // If the week starts on Monday,\n * // how many calendar weeks does July 2017 span?\n * const result = getWeeksInMonth(new Date(2017, 6, 5), { weekStartsOn: 1 })\n * //=> 6\n */\nexport function getWeeksInMonth(date, options) {\n const contextDate = toDate(date, options?.in);\n return (\n differenceInCalendarWeeks(\n lastDayOfMonth(contextDate, options),\n startOfMonth(contextDate, options),\n options,\n ) + 1\n );\n}\n\n// Fallback for modularized imports:\nexport default getWeeksInMonth;\n","/**\n * Returns the [year, month, day, hour, minute, seconds] tokens of the provided\n * `date` as it will be rendered in the `timeZone`.\n */\nexport function tzTokenizeDate(date, timeZone) {\n const dtf = getDateTimeFormat(timeZone);\n return 'formatToParts' in dtf ? partsOffset(dtf, date) : hackyOffset(dtf, date);\n}\nconst typeToPos = {\n year: 0,\n month: 1,\n day: 2,\n hour: 3,\n minute: 4,\n second: 5,\n};\nfunction partsOffset(dtf, date) {\n try {\n const formatted = dtf.formatToParts(date);\n const filled = [];\n for (let i = 0; i < formatted.length; i++) {\n const pos = typeToPos[formatted[i].type];\n if (pos !== undefined) {\n filled[pos] = parseInt(formatted[i].value, 10);\n }\n }\n return filled;\n }\n catch (error) {\n if (error instanceof RangeError) {\n return [NaN];\n }\n throw error;\n }\n}\nfunction hackyOffset(dtf, date) {\n const formatted = dtf.format(date);\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n const parsed = /(\\d+)\\/(\\d+)\\/(\\d+),? (\\d+):(\\d+):(\\d+)/.exec(formatted);\n // const [, fMonth, fDay, fYear, fHour, fMinute, fSecond] = parsed\n // return [fYear, fMonth, fDay, fHour, fMinute, fSecond]\n return [\n parseInt(parsed[3], 10),\n parseInt(parsed[1], 10),\n parseInt(parsed[2], 10),\n parseInt(parsed[4], 10),\n parseInt(parsed[5], 10),\n parseInt(parsed[6], 10),\n ];\n}\n// Get a cached Intl.DateTimeFormat instance for the IANA `timeZone`. This can be used\n// to get deterministic local date/time output according to the `en-US` locale which\n// can be used to extract local time parts as necessary.\nconst dtfCache = {};\n// New browsers use `hourCycle`, IE and Chrome <73 does not support it and uses `hour12`\nconst testDateFormatted = new Intl.DateTimeFormat('en-US', {\n hourCycle: 'h23',\n timeZone: 'America/New_York',\n year: 'numeric',\n month: '2-digit',\n day: '2-digit',\n hour: '2-digit',\n minute: '2-digit',\n second: '2-digit',\n}).format(new Date('2014-06-25T04:00:00.123Z'));\nconst hourCycleSupported = testDateFormatted === '06/25/2014, 00:00:00' ||\n testDateFormatted === '‎06‎/‎25‎/‎2014‎ ‎00‎:‎00‎:‎00';\nfunction getDateTimeFormat(timeZone) {\n if (!dtfCache[timeZone]) {\n dtfCache[timeZone] = hourCycleSupported\n ? new Intl.DateTimeFormat('en-US', {\n hourCycle: 'h23',\n timeZone: timeZone,\n year: 'numeric',\n month: 'numeric',\n day: '2-digit',\n hour: '2-digit',\n minute: '2-digit',\n second: '2-digit',\n })\n : new Intl.DateTimeFormat('en-US', {\n hour12: false,\n timeZone: timeZone,\n year: 'numeric',\n month: 'numeric',\n day: '2-digit',\n hour: '2-digit',\n minute: '2-digit',\n second: '2-digit',\n });\n }\n return dtfCache[timeZone];\n}\n","/**\n * Use instead of `new Date(Date.UTC(...))` to support years below 100 which doesn't work\n * otherwise due to the nature of the\n * [`Date` constructor](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date#interpretation_of_two-digit_years.\n *\n * For `Date.UTC(...)`, use `newDateUTC(...).getTime()`.\n */\nexport function newDateUTC(fullYear, month, day, hour, minute, second, millisecond) {\n const utcDate = new Date(0);\n utcDate.setUTCFullYear(fullYear, month, day);\n utcDate.setUTCHours(hour, minute, second, millisecond);\n return utcDate;\n}\n","import { tzTokenizeDate } from '../tzTokenizeDate/index.js';\nimport { newDateUTC } from '../newDateUTC/index.js';\nconst MILLISECONDS_IN_HOUR = 3600000;\nconst MILLISECONDS_IN_MINUTE = 60000;\nconst patterns = {\n timezone: /([Z+-].*)$/,\n timezoneZ: /^(Z)$/,\n timezoneHH: /^([+-]\\d{2})$/,\n timezoneHHMM: /^([+-])(\\d{2}):?(\\d{2})$/,\n};\n// Parse constious time zone offset formats to an offset in milliseconds\nexport function tzParseTimezone(timezoneString, date, isUtcDate) {\n // Empty string\n if (!timezoneString) {\n return 0;\n }\n // Z\n let token = patterns.timezoneZ.exec(timezoneString);\n if (token) {\n return 0;\n }\n let hours;\n let absoluteOffset;\n // ±hh\n token = patterns.timezoneHH.exec(timezoneString);\n if (token) {\n hours = parseInt(token[1], 10);\n if (!validateTimezone(hours)) {\n return NaN;\n }\n return -(hours * MILLISECONDS_IN_HOUR);\n }\n // ±hh:mm or ±hhmm\n token = patterns.timezoneHHMM.exec(timezoneString);\n if (token) {\n hours = parseInt(token[2], 10);\n const minutes = parseInt(token[3], 10);\n if (!validateTimezone(hours, minutes)) {\n return NaN;\n }\n absoluteOffset = Math.abs(hours) * MILLISECONDS_IN_HOUR + minutes * MILLISECONDS_IN_MINUTE;\n return token[1] === '+' ? -absoluteOffset : absoluteOffset;\n }\n // IANA time zone\n if (isValidTimezoneIANAString(timezoneString)) {\n date = new Date(date || Date.now());\n const utcDate = isUtcDate ? date : toUtcDate(date);\n const offset = calcOffset(utcDate, timezoneString);\n const fixedOffset = isUtcDate ? offset : fixOffset(date, offset, timezoneString);\n return -fixedOffset;\n }\n return NaN;\n}\nfunction toUtcDate(date) {\n return newDateUTC(date.getFullYear(), date.getMonth(), date.getDate(), date.getHours(), date.getMinutes(), date.getSeconds(), date.getMilliseconds());\n}\nfunction calcOffset(date, timezoneString) {\n const tokens = tzTokenizeDate(date, timezoneString);\n // ms dropped because it's not provided by tzTokenizeDate\n const asUTC = newDateUTC(tokens[0], tokens[1] - 1, tokens[2], tokens[3] % 24, tokens[4], tokens[5], 0).getTime();\n let asTS = date.getTime();\n const over = asTS % 1000;\n asTS -= over >= 0 ? over : 1000 + over;\n return asUTC - asTS;\n}\nfunction fixOffset(date, offset, timezoneString) {\n const localTS = date.getTime();\n // Our UTC time is just a guess because our offset is just a guess\n let utcGuess = localTS - offset;\n // Test whether the zone matches the offset for this ts\n const o2 = calcOffset(new Date(utcGuess), timezoneString);\n // If so, offset didn't change, and we're done\n if (offset === o2) {\n return offset;\n }\n // If not, change the ts by the difference in the offset\n utcGuess -= o2 - offset;\n // If that gives us the local time we want, we're done\n const o3 = calcOffset(new Date(utcGuess), timezoneString);\n if (o2 === o3) {\n return o2;\n }\n // If it's different, we're in a hole time. The offset has changed, but we don't adjust the time\n return Math.max(o2, o3);\n}\nfunction validateTimezone(hours, minutes) {\n return -23 <= hours && hours <= 23 && (minutes == null || (0 <= minutes && minutes <= 59));\n}\nconst validIANATimezoneCache = {};\nfunction isValidTimezoneIANAString(timeZoneString) {\n if (validIANATimezoneCache[timeZoneString])\n return true;\n try {\n new Intl.DateTimeFormat(undefined, { timeZone: timeZoneString });\n validIANATimezoneCache[timeZoneString] = true;\n return true;\n }\n catch (error) {\n return false;\n }\n}\n","/**\n * Google Chrome as of 67.0.3396.87 introduced timezones with offset that includes seconds.\n * They usually appear for dates that denote time before the timezones were introduced\n * (e.g. for 'Europe/Prague' timezone the offset is GMT+00:57:44 before 1 October 1891\n * and GMT+01:00:00 after that date)\n *\n * Date#getTimezoneOffset returns the offset in minutes and would return 57 for the example above,\n * which would lead to incorrect calculations.\n *\n * This function returns the timezone offset in milliseconds that takes seconds in account.\n */\nexport function getTimezoneOffsetInMilliseconds(date) {\n const utcDate = new Date(Date.UTC(date.getFullYear(), date.getMonth(), date.getDate(), date.getHours(), date.getMinutes(), date.getSeconds(), date.getMilliseconds()));\n utcDate.setUTCFullYear(date.getFullYear());\n return +date - +utcDate;\n}\n","/** Regex to identify the presence of a time zone specifier in a date string */\nexport const tzPattern = /(Z|[+-]\\d{2}(?::?\\d{2})?| UTC| [a-zA-Z]+\\/[a-zA-Z_]+(?:\\/[a-zA-Z_]+)?)$/;\n","import { getTimezoneOffsetInMilliseconds } from '../_lib/getTimezoneOffsetInMilliseconds/index.js';\nimport { tzParseTimezone } from '../_lib/tzParseTimezone/index.js';\nimport { tzPattern } from '../_lib/tzPattern/index.js';\nconst MILLISECONDS_IN_HOUR = 3600000;\nconst MILLISECONDS_IN_MINUTE = 60000;\nconst DEFAULT_ADDITIONAL_DIGITS = 2;\nconst patterns = {\n dateTimePattern: /^([0-9W+-]+)(T| )(.*)/,\n datePattern: /^([0-9W+-]+)(.*)/,\n plainTime: /:/,\n // year tokens\n YY: /^(\\d{2})$/,\n YYY: [\n /^([+-]\\d{2})$/, // 0 additional digits\n /^([+-]\\d{3})$/, // 1 additional digit\n /^([+-]\\d{4})$/, // 2 additional digits\n ],\n YYYY: /^(\\d{4})/,\n YYYYY: [\n /^([+-]\\d{4})/, // 0 additional digits\n /^([+-]\\d{5})/, // 1 additional digit\n /^([+-]\\d{6})/, // 2 additional digits\n ],\n // date tokens\n MM: /^-(\\d{2})$/,\n DDD: /^-?(\\d{3})$/,\n MMDD: /^-?(\\d{2})-?(\\d{2})$/,\n Www: /^-?W(\\d{2})$/,\n WwwD: /^-?W(\\d{2})-?(\\d{1})$/,\n HH: /^(\\d{2}([.,]\\d*)?)$/,\n HHMM: /^(\\d{2}):?(\\d{2}([.,]\\d*)?)$/,\n HHMMSS: /^(\\d{2}):?(\\d{2}):?(\\d{2}([.,]\\d*)?)$/,\n // time zone tokens (to identify the presence of a tz)\n timeZone: tzPattern,\n};\n/**\n * @name toDate\n * @category Common Helpers\n * @summary Convert the given argument to an instance of Date.\n *\n * @description\n * Convert the given argument to an instance of Date.\n *\n * If the argument is an instance of Date, the function returns its clone.\n *\n * If the argument is a number, it is treated as a timestamp.\n *\n * If an argument is a string, the function tries to parse it.\n * Function accepts complete ISO 8601 formats as well as partial implementations.\n * ISO 8601: http://en.wikipedia.org/wiki/ISO_8601\n * If the function cannot parse the string or the values are invalid, it returns Invalid Date.\n *\n * If the argument is none of the above, the function returns Invalid Date.\n *\n * **Note**: *all* Date arguments passed to any *date-fns* function is processed by `toDate`.\n * All *date-fns* functions will throw `RangeError` if `options.additionalDigits` is not 0, 1, 2 or undefined.\n *\n * @param argument the value to convert\n * @param options the object with options. See [Options]{@link https://date-fns.org/docs/Options}\n * @param {0|1|2} [options.additionalDigits=2] - the additional number of digits in the extended year format\n * @param {string} [options.timeZone=''] - used to specify the IANA time zone offset of a date String.\n *\n * @returns the parsed date in the local time zone\n * @throws {TypeError} 1 argument required\n * @throws {RangeError} `options.additionalDigits` must be 0, 1 or 2\n *\n * @example\n * // Convert string '2014-02-11T11:30:30' to date:\n * const result = toDate('2014-02-11T11:30:30')\n * //=> Tue Feb 11 2014 11:30:30\n *\n * @example\n * // Convert string '+02014101' to date,\n * // if the additional number of digits in the extended year format is 1:\n * const result = toDate('+02014101', {additionalDigits: 1})\n * //=> Fri Apr 11 2014 00:00:00\n */\nexport function toDate(argument, options = {}) {\n if (arguments.length < 1) {\n throw new TypeError('1 argument required, but only ' + arguments.length + ' present');\n }\n if (argument === null) {\n return new Date(NaN);\n }\n const additionalDigits = options.additionalDigits == null ? DEFAULT_ADDITIONAL_DIGITS : Number(options.additionalDigits);\n if (additionalDigits !== 2 && additionalDigits !== 1 && additionalDigits !== 0) {\n throw new RangeError('additionalDigits must be 0, 1 or 2');\n }\n // Clone the date\n if (argument instanceof Date ||\n (typeof argument === 'object' && Object.prototype.toString.call(argument) === '[object Date]')) {\n // Prevent the date to lose the milliseconds when passed to new Date() in IE10\n return new Date(argument.getTime());\n }\n else if (typeof argument === 'number' ||\n Object.prototype.toString.call(argument) === '[object Number]') {\n return new Date(argument);\n }\n else if (!(Object.prototype.toString.call(argument) === '[object String]')) {\n return new Date(NaN);\n }\n const dateStrings = splitDateString(argument);\n const { year, restDateString } = parseYear(dateStrings.date, additionalDigits);\n const date = parseDate(restDateString, year);\n if (date === null || isNaN(date.getTime())) {\n return new Date(NaN);\n }\n if (date) {\n const timestamp = date.getTime();\n let time = 0;\n let offset;\n if (dateStrings.time) {\n time = parseTime(dateStrings.time);\n if (time === null || isNaN(time)) {\n return new Date(NaN);\n }\n }\n if (dateStrings.timeZone || options.timeZone) {\n offset = tzParseTimezone(dateStrings.timeZone || options.timeZone, new Date(timestamp + time));\n if (isNaN(offset)) {\n return new Date(NaN);\n }\n }\n else {\n // get offset accurate to hour in time zones that change offset\n offset = getTimezoneOffsetInMilliseconds(new Date(timestamp + time));\n offset = getTimezoneOffsetInMilliseconds(new Date(timestamp + time + offset));\n }\n return new Date(timestamp + time + offset);\n }\n else {\n return new Date(NaN);\n }\n}\nfunction splitDateString(dateString) {\n const dateStrings = {};\n let parts = patterns.dateTimePattern.exec(dateString);\n let timeString;\n if (!parts) {\n parts = patterns.datePattern.exec(dateString);\n if (parts) {\n dateStrings.date = parts[1];\n timeString = parts[2];\n }\n else {\n dateStrings.date = null;\n timeString = dateString;\n }\n }\n else {\n dateStrings.date = parts[1];\n timeString = parts[3];\n }\n if (timeString) {\n const token = patterns.timeZone.exec(timeString);\n if (token) {\n dateStrings.time = timeString.replace(token[1], '');\n dateStrings.timeZone = token[1].trim();\n }\n else {\n dateStrings.time = timeString;\n }\n }\n return dateStrings;\n}\nfunction parseYear(dateString, additionalDigits) {\n if (dateString) {\n const patternYYY = patterns.YYY[additionalDigits];\n const patternYYYYY = patterns.YYYYY[additionalDigits];\n // YYYY or ±YYYYY\n let token = patterns.YYYY.exec(dateString) || patternYYYYY.exec(dateString);\n if (token) {\n const yearString = token[1];\n return {\n year: parseInt(yearString, 10),\n restDateString: dateString.slice(yearString.length),\n };\n }\n // YY or ±YYY\n token = patterns.YY.exec(dateString) || patternYYY.exec(dateString);\n if (token) {\n const centuryString = token[1];\n return {\n year: parseInt(centuryString, 10) * 100,\n restDateString: dateString.slice(centuryString.length),\n };\n }\n }\n // Invalid ISO-formatted year\n return {\n year: null,\n };\n}\nfunction parseDate(dateString, year) {\n // Invalid ISO-formatted year\n if (year === null) {\n return null;\n }\n let date;\n let month;\n let week;\n // YYYY\n if (!dateString || !dateString.length) {\n date = new Date(0);\n date.setUTCFullYear(year);\n return date;\n }\n // YYYY-MM\n let token = patterns.MM.exec(dateString);\n if (token) {\n date = new Date(0);\n month = parseInt(token[1], 10) - 1;\n if (!validateDate(year, month)) {\n return new Date(NaN);\n }\n date.setUTCFullYear(year, month);\n return date;\n }\n // YYYY-DDD or YYYYDDD\n token = patterns.DDD.exec(dateString);\n if (token) {\n date = new Date(0);\n const dayOfYear = parseInt(token[1], 10);\n if (!validateDayOfYearDate(year, dayOfYear)) {\n return new Date(NaN);\n }\n date.setUTCFullYear(year, 0, dayOfYear);\n return date;\n }\n // yyyy-MM-dd or YYYYMMDD\n token = patterns.MMDD.exec(dateString);\n if (token) {\n date = new Date(0);\n month = parseInt(token[1], 10) - 1;\n const day = parseInt(token[2], 10);\n if (!validateDate(year, month, day)) {\n return new Date(NaN);\n }\n date.setUTCFullYear(year, month, day);\n return date;\n }\n // YYYY-Www or YYYYWww\n token = patterns.Www.exec(dateString);\n if (token) {\n week = parseInt(token[1], 10) - 1;\n if (!validateWeekDate(week)) {\n return new Date(NaN);\n }\n return dayOfISOWeekYear(year, week);\n }\n // YYYY-Www-D or YYYYWwwD\n token = patterns.WwwD.exec(dateString);\n if (token) {\n week = parseInt(token[1], 10) - 1;\n const dayOfWeek = parseInt(token[2], 10) - 1;\n if (!validateWeekDate(week, dayOfWeek)) {\n return new Date(NaN);\n }\n return dayOfISOWeekYear(year, week, dayOfWeek);\n }\n // Invalid ISO-formatted date\n return null;\n}\nfunction parseTime(timeString) {\n let hours;\n let minutes;\n // hh\n let token = patterns.HH.exec(timeString);\n if (token) {\n hours = parseFloat(token[1].replace(',', '.'));\n if (!validateTime(hours)) {\n return NaN;\n }\n return (hours % 24) * MILLISECONDS_IN_HOUR;\n }\n // hh:mm or hhmm\n token = patterns.HHMM.exec(timeString);\n if (token) {\n hours = parseInt(token[1], 10);\n minutes = parseFloat(token[2].replace(',', '.'));\n if (!validateTime(hours, minutes)) {\n return NaN;\n }\n return (hours % 24) * MILLISECONDS_IN_HOUR + minutes * MILLISECONDS_IN_MINUTE;\n }\n // hh:mm:ss or hhmmss\n token = patterns.HHMMSS.exec(timeString);\n if (token) {\n hours = parseInt(token[1], 10);\n minutes = parseInt(token[2], 10);\n const seconds = parseFloat(token[3].replace(',', '.'));\n if (!validateTime(hours, minutes, seconds)) {\n return NaN;\n }\n return (hours % 24) * MILLISECONDS_IN_HOUR + minutes * MILLISECONDS_IN_MINUTE + seconds * 1000;\n }\n // Invalid ISO-formatted time\n return null;\n}\nfunction dayOfISOWeekYear(isoWeekYear, week, day) {\n week = week || 0;\n day = day || 0;\n const date = new Date(0);\n date.setUTCFullYear(isoWeekYear, 0, 4);\n const fourthOfJanuaryDay = date.getUTCDay() || 7;\n const diff = week * 7 + day + 1 - fourthOfJanuaryDay;\n date.setUTCDate(date.getUTCDate() + diff);\n return date;\n}\n// Validation functions\nconst DAYS_IN_MONTH = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];\nconst DAYS_IN_MONTH_LEAP_YEAR = [31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];\nfunction isLeapYearIndex(year) {\n return year % 400 === 0 || (year % 4 === 0 && year % 100 !== 0);\n}\nfunction validateDate(year, month, date) {\n if (month < 0 || month > 11) {\n return false;\n }\n if (date != null) {\n if (date < 1) {\n return false;\n }\n const isLeapYear = isLeapYearIndex(year);\n if (isLeapYear && date > DAYS_IN_MONTH_LEAP_YEAR[month]) {\n return false;\n }\n if (!isLeapYear && date > DAYS_IN_MONTH[month]) {\n return false;\n }\n }\n return true;\n}\nfunction validateDayOfYearDate(year, dayOfYear) {\n if (dayOfYear < 1) {\n return false;\n }\n const isLeapYear = isLeapYearIndex(year);\n if (isLeapYear && dayOfYear > 366) {\n return false;\n }\n if (!isLeapYear && dayOfYear > 365) {\n return false;\n }\n return true;\n}\nfunction validateWeekDate(week, day) {\n if (week < 0 || week > 52) {\n return false;\n }\n if (day != null && (day < 0 || day > 6)) {\n return false;\n }\n return true;\n}\nfunction validateTime(hours, minutes, seconds) {\n if (hours < 0 || hours >= 25) {\n return false;\n }\n if (minutes != null && (minutes < 0 || minutes >= 60)) {\n return false;\n }\n if (seconds != null && (seconds < 0 || seconds >= 60)) {\n return false;\n }\n return true;\n}\n","import { tzParseTimezone } from '../_lib/tzParseTimezone/index.js';\nimport { toDate } from '../toDate/index.js';\n/**\n * @name toZonedTime\n * @category Time Zone Helpers\n * @summary Get a date/time representing local time in a given time zone from the UTC date\n *\n * @description\n * Returns a date instance with values representing the local time in the time zone\n * specified of the UTC time from the date provided. In other words, when the new date\n * is formatted it will show the equivalent hours in the target time zone regardless\n * of the current system time zone.\n *\n * @param date the date with the relevant UTC time\n * @param timeZone the time zone to get local time for, can be an offset or IANA time zone\n * @param options the object with options. See [Options]{@link https://date-fns.org/docs/Options}\n * @param {0|1|2} [options.additionalDigits=2] - passed to `toDate`. See [toDate]{@link https://date-fns.org/docs/toDate}\n *\n * @throws {TypeError} 2 arguments required\n * @throws {RangeError} `options.additionalDigits` must be 0, 1 or 2\n *\n * @example\n * // In June 10am UTC is 6am in New York (-04:00)\n * const result = toZonedTime('2014-06-25T10:00:00.000Z', 'America/New_York')\n * //=> Jun 25 2014 06:00:00\n */\nexport function toZonedTime(date, timeZone, options) {\n date = toDate(date, options);\n const offsetMilliseconds = tzParseTimezone(timeZone, date, true);\n const d = new Date(date.getTime() - offsetMilliseconds);\n const resultDate = new Date(0);\n resultDate.setFullYear(d.getUTCFullYear(), d.getUTCMonth(), d.getUTCDate());\n resultDate.setHours(d.getUTCHours(), d.getUTCMinutes(), d.getUTCSeconds(), d.getUTCMilliseconds());\n return resultDate;\n}\n","import { toDate } from '../toDate/index.js';\nimport { tzPattern } from '../_lib/tzPattern/index.js';\nimport { tzParseTimezone } from '../_lib/tzParseTimezone/index.js';\nimport { newDateUTC } from '../_lib/newDateUTC/index.js';\n/**\n * @name fromZonedTime\n * @category Time Zone Helpers\n * @summary Get the UTC date/time from a date representing local time in a given time zone\n *\n * @description\n * Returns a date instance with the UTC time of the provided date of which the values\n * represented the local time in the time zone specified. In other words, if the input\n * date represented local time in time zone, the timestamp of the output date will\n * give the equivalent UTC of that local time regardless of the current system time zone.\n *\n * @param date the date with values representing the local time\n * @param timeZone the time zone of this local time, can be an offset or IANA time zone\n * @param options the object with options. See [Options]{@link https://date-fns.org/docs/Options}\n * @param {0|1|2} [options.additionalDigits=2] - passed to `toDate`. See [toDate]{@link https://date-fns.org/docs/toDate}\n * @throws {TypeError} 2 arguments required\n * @throws {RangeError} `options.additionalDigits` must be 0, 1 or 2\n *\n * @example\n * // In June 10am in Los Angeles is 5pm UTC\n * const result = fromZonedTime(new Date(2014, 5, 25, 10, 0, 0), 'America/Los_Angeles')\n * //=> 2014-06-25T17:00:00.000Z\n */\nexport function fromZonedTime(date, timeZone, options) {\n if (typeof date === 'string' && !date.match(tzPattern)) {\n return toDate(date, { ...options, timeZone });\n }\n date = toDate(date, options);\n const utc = newDateUTC(date.getFullYear(), date.getMonth(), date.getDate(), date.getHours(), date.getMinutes(), date.getSeconds(), date.getMilliseconds()).getTime();\n const offsetMilliseconds = tzParseTimezone(timeZone, new Date(utc));\n return new Date(utc + offsetMilliseconds);\n}\n","import {\n type DateParts,\n type DateSource,\n type DayParts,\n type MonthParts,\n addDays,\n addMonths,\n daysInWeek,\n getDayIndex,\n weeksInMonth,\n} from './date/helpers';\nimport { pad, pick } from './helpers';\nimport Locale from './locale';\n\nexport interface CalendarDay extends DayParts {\n id: string;\n position: number;\n label: string;\n ariaLabel: string;\n weekdayPosition: number;\n weekdayPositionFromEnd: number;\n weekPosition: number;\n isoWeeknumber: number;\n startDate: Date;\n noonDate: Date;\n endDate: Date;\n isToday: boolean;\n isFirstDay: boolean;\n isLastDay: boolean;\n isDisabled: boolean;\n isFocusable: boolean;\n isFocused: boolean;\n inMonth: boolean;\n inPrevMonth: boolean;\n inNextMonth: boolean;\n onTop: boolean;\n onBottom: boolean;\n onLeft: boolean;\n onRight: boolean;\n classes: Array<string | object>;\n locale: Locale;\n}\n\nexport interface CalendarWeek {\n id: string;\n week: number;\n weekPosition: number;\n weeknumber: number;\n isoWeeknumber: number;\n weeknumberDisplay?: number;\n days: CalendarDay[];\n title: string;\n}\n\nexport interface CalendarWeekday {\n weekday: number;\n label: string;\n}\n\nexport type PageView = 'daily' | 'weekly' | 'monthly';\n\nexport type TitlePosition = 'center' | 'left' | 'right';\n\nexport interface Page {\n id: string;\n day?: number;\n week?: number;\n month: number;\n year: number;\n view: PageView;\n trimWeeks: boolean;\n position: number;\n row: number;\n rowFromEnd: number;\n column: number;\n columnFromEnd: number;\n showWeeknumbers: boolean;\n showIsoWeeknumbers: boolean;\n weeknumberPosition: string;\n monthTitle: string;\n weekTitle?: string;\n dayTitle?: string;\n title: string;\n titlePosition: TitlePosition;\n shortMonthLabel: string;\n monthLabel: string;\n shortYearLabel: string;\n yearLabel: string;\n monthComps: MonthParts;\n prevMonthComps: MonthParts;\n nextMonthComps: MonthParts;\n days: CalendarDay[];\n weeks: CalendarWeek[];\n weekdays: CalendarWeekday[];\n viewDays: CalendarDay[];\n viewWeeks: CalendarWeek[];\n}\n\nexport type PageAddress = Pick<Page, 'day' | 'week' | 'month' | 'year'>;\n\nexport type PageConfig = Pick<\n Page,\n | 'day'\n | 'week'\n | 'month'\n | 'year'\n | 'view'\n | 'titlePosition'\n | 'trimWeeks'\n | 'position'\n | 'row'\n | 'rowFromEnd'\n | 'column'\n | 'columnFromEnd'\n | 'showWeeknumbers'\n | 'showIsoWeeknumbers'\n | 'weeknumberPosition'\n>;\n\nexport type CachedPage = Pick<\n Page,\n | 'id'\n | 'month'\n | 'year'\n | 'monthTitle'\n | 'shortMonthLabel'\n | 'monthLabel'\n | 'shortYearLabel'\n | 'yearLabel'\n | 'monthComps'\n | 'prevMonthComps'\n | 'nextMonthComps'\n | 'days'\n | 'weeks'\n | 'weekdays'\n>;\n\nconst viewAddressKeys: Record<PageView, (keyof DateParts)[]> = {\n daily: ['year', 'month', 'day'],\n weekly: ['year', 'month', 'week'],\n monthly: ['year', 'month'],\n};\n\nfunction getDays(\n {\n monthComps,\n prevMonthComps,\n nextMonthComps,\n }: Pick<Page, 'monthComps' | 'prevMonthComps' | 'nextMonthComps'>,\n locale: Locale,\n): CalendarDay[] {\n const days: CalendarDay[] = [];\n const {\n firstDayOfWeek,\n firstWeekday,\n isoWeeknumbers,\n weeknumbers,\n numDays,\n numWeeks,\n } = monthComps;\n const prevMonthDaysToShow =\n firstWeekday +\n (firstWeekday < firstDayOfWeek ? daysInWeek : 0) -\n firstDayOfWeek;\n let prevMonth = true;\n let thisMonth = false;\n let nextMonth = false;\n let position = 0;\n // Formatter for aria labels\n const formatter = new Intl.DateTimeFormat(locale.id, {\n weekday: 'long',\n year: 'numeric',\n month: 'short',\n day: 'numeric',\n });\n // Init counters with previous month's data\n let day = prevMonthComps.numDays - prevMonthDaysToShow + 1;\n let dayFromEnd = prevMonthComps.numDays - day + 1;\n let weekdayOrdinal = Math.floor((day - 1) / daysInWeek + 1);\n let weekdayOrdinalFromEnd = 1;\n let week = prevMonthComps.numWeeks;\n let weekFromEnd = 1;\n let month = prevMonthComps.month;\n let year = prevMonthComps.year;\n // Store todays comps\n const today = new Date();\n const todayDay = today.getDate();\n const todayMonth = today.getMonth() + 1;\n const todayYear = today.getFullYear();\n // Cycle through max weeks in month\n for (let w = 1; w <= weeksInMonth; w++) {\n // Cycle through days in week\n for (\n let i = 1, weekday = firstDayOfWeek;\n i <= daysInWeek;\n i++, weekday += weekday === daysInWeek ? 1 - daysInWeek : 1\n ) {\n // We need to know when to start counting actual month days\n if (prevMonth && weekday === firstWeekday) {\n // Reset counters for current month\n day = 1;\n dayFromEnd = monthComps.numDays;\n weekdayOrdinal = Math.floor((day - 1) / daysInWeek + 1);\n weekdayOrdinalFromEnd = Math.floor((numDays - day) / daysInWeek + 1);\n week = 1;\n weekFromEnd = numWeeks;\n month = monthComps.month;\n year = monthComps.year;\n // ...and flag we're tracking actual month days\n prevMonth = false;\n thisMonth = true;\n }\n const startDate = locale.getDateFromParams(year, month, day, 0, 0, 0, 0);\n const noonDate = locale.getDateFromParams(year, month, day, 12, 0, 0, 0);\n const endDate = locale.getDateFromParams(\n year,\n month,\n day,\n 23,\n 59,\n 59,\n 999,\n );\n const date = startDate;\n const id = `${pad(year, 4)}-${pad(month, 2)}-${pad(day, 2)}`;\n const weekdayPosition = i;\n const weekdayPositionFromEnd = daysInWeek - i;\n const weeknumber = weeknumbers[w - 1];\n const isoWeeknumber = isoWeeknumbers[w - 1];\n const isToday =\n day === todayDay && month === todayMonth && year === todayYear;\n const isFirstDay = thisMonth && day === 1;\n const isLastDay = thisMonth && day === numDays;\n const onTop = w === 1;\n const onBottom = w === numWeeks;\n const onLeft = i === 1;\n const onRight = i === daysInWeek;\n const dayIndex = getDayIndex(year, month, day);\n days.push({\n locale,\n id,\n position: ++position,\n label: day.toString(),\n ariaLabel: formatter.format(new Date(year, month - 1, day)),\n day,\n dayFromEnd,\n weekday,\n weekdayPosition,\n weekdayPositionFromEnd,\n weekdayOrdinal,\n weekdayOrdinalFromEnd,\n week,\n weekFromEnd,\n weekPosition: w,\n weeknumber,\n isoWeeknumber,\n month,\n year,\n date,\n startDate,\n endDate,\n noonDate,\n dayIndex,\n isToday,\n isFirstDay,\n isLastDay,\n isDisabled: !thisMonth,\n isFocusable: !thisMonth,\n isFocused: false,\n inMonth: thisMonth,\n inPrevMonth: prevMonth,\n inNextMonth: nextMonth,\n onTop,\n onBottom,\n onLeft,\n onRight,\n classes: [\n `id-${id}`,\n `day-${day}`,\n `day-from-end-${dayFromEnd}`,\n `weekday-${weekday}`,\n `weekday-position-${weekdayPosition}`,\n `weekday-ordinal-${weekdayOrdinal}`,\n `weekday-ordinal-from-end-${weekdayOrdinalFromEnd}`,\n `week-${week}`,\n `week-from-end-${weekFromEnd}`,\n {\n 'is-today': isToday,\n 'is-first-day': isFirstDay,\n 'is-last-day': isLastDay,\n 'in-month': thisMonth,\n 'in-prev-month': prevMonth,\n 'in-next-month': nextMonth,\n 'on-top': onTop,\n 'on-bottom': onBottom,\n 'on-left': onLeft,\n 'on-right': onRight,\n },\n ],\n });\n // See if we've hit the last day of the month\n if (thisMonth && isLastDay) {\n thisMonth = false;\n nextMonth = true;\n // Reset counters to next month's data\n day = 1;\n dayFromEnd = numDays;\n weekdayOrdinal = 1;\n weekdayOrdinalFromEnd = Math.floor((numDays - day) / daysInWeek + 1);\n week = 1;\n weekFromEnd = nextMonthComps.numWeeks;\n month = nextMonthComps.month;\n year = nextMonthComps.year;\n // Still in the middle of the month (hasn't ended yet)\n } else {\n day++;\n dayFromEnd--;\n weekdayOrdinal = Math.floor((day - 1) / daysInWeek + 1);\n weekdayOrdinalFromEnd = Math.floor((numDays - day) / daysInWeek + 1);\n }\n }\n // Append week days\n week++;\n weekFromEnd--;\n }\n return days;\n}\n\nfunction getWeeks(\n days: CalendarDay[],\n showWeeknumbers: boolean,\n showIsoWeeknumbers: boolean,\n locale: Locale,\n): CalendarWeek[] {\n const result = days.reduce(\n (result: CalendarWeek[], day: CalendarDay, i) => {\n const weekIndex = Math.floor(i / 7);\n let week = result[weekIndex];\n if (!week) {\n week = {\n id: `week-${weekIndex + 1}`,\n title: '',\n week: day.week,\n weekPosition: day.weekPosition,\n weeknumber: day.weeknumber,\n isoWeeknumber: day.isoWeeknumber,\n weeknumberDisplay: showWeeknumbers\n ? day.weeknumber\n : showIsoWeeknumbers\n ? day.isoWeeknumber\n : undefined,\n days: [],\n };\n result[weekIndex] = week;\n }\n week.days.push(day);\n return result;\n },\n Array(days.length / daysInWeek),\n );\n result.forEach(week => {\n const fromDay = week.days[0];\n const toDay = week.days[week.days.length - 1];\n if (fromDay.month === toDay.month) {\n week.title = `${locale.formatDate(fromDay.date, 'MMMM YYYY')}`;\n } else if (fromDay.year === toDay.year) {\n week.title = `${locale.formatDate(\n fromDay.date,\n 'MMM',\n )} - ${locale.formatDate(toDay.date, 'MMM YYYY')}`;\n } else {\n week.title = `${locale.formatDate(\n fromDay.date,\n 'MMM YYYY',\n )} - ${locale.formatDate(toDay.date, 'MMM YYYY')}`;\n }\n });\n return result;\n}\n\nfunction getWeekdays(week: CalendarWeek, locale: Locale): CalendarWeekday[] {\n return week.days.map(day => ({\n label: locale.formatDate(day.date, locale.masks.weekdays),\n weekday: day.weekday,\n }));\n}\n\nexport function getPageId(month: number, year: number) {\n return `${year}.${pad(month, 2)}`;\n}\n\nexport function getPageAddressForDate(\n date: DateSource,\n view: PageView,\n locale: Locale,\n) {\n return pick(\n locale.getDateParts(locale.toDate(date)),\n viewAddressKeys[view],\n ) as PageAddress;\n}\n\nexport function addPages(\n { day, week, month, year }: PageAddress,\n count: number,\n view: PageView,\n locale: Locale,\n): PageAddress {\n if (view === 'daily' && day) {\n const date = new Date(year, month - 1, day);\n const newDate = addDays(date, count);\n return {\n day: newDate.getDate(),\n month: newDate.getMonth() + 1,\n year: newDate.getFullYear(),\n };\n } else if (view === 'weekly' && week) {\n const comps = locale.getMonthParts(month, year);\n const date = comps.firstDayOfMonth;\n const newDate = addDays(date, (week - 1 + count) * 7);\n const parts = locale.getDateParts(newDate);\n return {\n week: parts.week,\n month: parts.month,\n year: parts.year,\n };\n } else {\n const date = new Date(year, month - 1, 1);\n const newDate = addMonths(date, count);\n return {\n month: newDate.getMonth() + 1,\n year: newDate.getFullYear(),\n };\n }\n}\n\nexport function pageIsValid(page: PageAddress | null | undefined) {\n return page != null && page.month != null && page.year != null;\n}\n\nexport function pageIsBeforePage(\n page: PageAddress | null | undefined,\n comparePage: PageAddress | null | undefined,\n) {\n if (!pageIsValid(page) || !pageIsValid(comparePage)) return false;\n page = page as PageAddress;\n comparePage = comparePage as PageAddress;\n if (page.year !== comparePage.year) return page.year < comparePage.year;\n if (page.month && comparePage.month && page.month !== comparePage.month)\n return page.month < comparePage.month;\n if (page.week && comparePage.week && page.week !== comparePage.week) {\n return page.week < comparePage.week;\n }\n if (page.day && comparePage.day && page.day !== comparePage.day) {\n return page.day < comparePage.day;\n }\n return false;\n}\n\nexport function pageIsAfterPage(\n page: PageAddress | null | undefined,\n comparePage: PageAddress | null | undefined,\n) {\n if (!pageIsValid(page) || !pageIsValid(comparePage)) return false;\n page = page as PageAddress;\n comparePage = comparePage as PageAddress;\n if (page.year !== comparePage.year) {\n return page.year > comparePage.year;\n }\n if (page.month && comparePage.month && page.month !== comparePage.month) {\n return page.month > comparePage.month;\n }\n if (page.week && comparePage.week && page.week !== comparePage.week) {\n return page.week > comparePage.week;\n }\n if (page.day && comparePage.day && page.day !== comparePage.day) {\n return page.day > comparePage.day;\n }\n return false;\n}\n\nexport function pageIsBetweenPages(\n page: PageAddress | null | undefined,\n fromPage: PageAddress | null | undefined,\n toPage: PageAddress | null | undefined,\n) {\n return (\n (page || false) &&\n !pageIsBeforePage(page, fromPage) &&\n !pageIsAfterPage(page, toPage)\n );\n}\n\nexport function pageIsEqualToPage(\n aPage: PageAddress | null | undefined,\n bPage: PageAddress | null | undefined,\n) {\n if (!aPage && bPage) return false;\n if (aPage && !bPage) return false;\n if (!aPage && !bPage) return true;\n aPage = aPage as PageAddress;\n bPage = bPage as PageAddress;\n return (\n aPage.year === bPage.year &&\n aPage.month === bPage.month &&\n aPage.week === bPage.week &&\n aPage.day === bPage.day\n );\n}\n\nexport function pageRangeToArray(\n from: PageAddress,\n to: PageAddress,\n view: PageView,\n locale: Locale,\n) {\n if (!pageIsValid(from) || !pageIsValid(to)) return [];\n const result = [];\n while (!pageIsAfterPage(from, to)) {\n result.push(from);\n from = addPages(from, 1, view, locale);\n }\n return result;\n}\n\nexport function getPageKey(config: PageConfig) {\n const { day, week, month, year } = config;\n let id = `${year}-${pad(month, 2)}`;\n if (week) id = `${id}-w${week}`;\n if (day) id = `${id}-${pad(day, 2)}`;\n return id;\n}\n\nexport function getCachedPage(config: PageConfig, locale: Locale): CachedPage {\n const { month, year, showWeeknumbers, showIsoWeeknumbers } = config;\n const date = new Date(year, month - 1, 15);\n const monthComps = locale.getMonthParts(month, year);\n const prevMonthComps = locale.getPrevMonthParts(month, year);\n const nextMonthComps = locale.getNextMonthParts(month, year);\n const days = getDays({ monthComps, prevMonthComps, nextMonthComps }, locale);\n const weeks = getWeeks(days, showWeeknumbers, showIsoWeeknumbers, locale);\n const weekdays = getWeekdays(weeks[0], locale);\n return {\n id: getPageKey(config),\n month,\n year,\n monthTitle: locale.formatDate(date, locale.masks.title),\n shortMonthLabel: locale.formatDate(date, 'MMM'),\n monthLabel: locale.formatDate(date, 'MMMM'),\n shortYearLabel: year.toString().substring(2),\n yearLabel: year.toString(),\n monthComps,\n prevMonthComps,\n nextMonthComps,\n days,\n weeks,\n weekdays,\n };\n}\n\nexport function getPage(config: PageConfig, cachedPage: CachedPage) {\n const { day, week, view, trimWeeks } = config;\n const page: Page = {\n ...cachedPage,\n ...config,\n title: '',\n viewDays: [],\n viewWeeks: [],\n };\n switch (view) {\n case 'daily': {\n let dayObj = page.days.find(d => d.inMonth)!;\n if (day) {\n dayObj = page.days.find(d => d.day === day && d.inMonth) || dayObj;\n } else if (week) {\n dayObj = page.days.find(d => d.week === week && d.inMonth)!;\n }\n const weekObj = page.weeks[dayObj.week - 1];\n page.viewWeeks = [weekObj];\n page.viewDays = [dayObj];\n page.week = dayObj.week;\n page.weekTitle = weekObj.title;\n page.day = dayObj.day;\n page.dayTitle = dayObj.ariaLabel;\n page.title = page.dayTitle;\n break;\n }\n case 'weekly': {\n page.week = week || 1;\n const weekObj = page.weeks[page.week - 1];\n page.viewWeeks = [weekObj];\n page.viewDays = weekObj.days;\n page.weekTitle = weekObj.title;\n page.title = page.weekTitle;\n break;\n }\n default: {\n page.title = page.monthTitle;\n page.viewWeeks = page.weeks.slice(\n 0,\n trimWeeks ? page.monthComps.numWeeks : undefined,\n );\n page.viewDays = page.days;\n break;\n }\n }\n return page;\n}\n","export default class Cache<T> {\n keys: string[] = [];\n store: Record<string, T> = {};\n\n constructor(\n public size: number,\n public createKey: (...args: any[]) => string,\n public createItem: (...args: any[]) => T,\n ) {}\n\n get(...args: any[]) {\n const key = this.createKey(...args);\n return this.store[key];\n }\n\n getOrSet(...args: any[]): T {\n const key = this.createKey(...args);\n if (this.store[key]) return this.store[key];\n const item = this.createItem(...args);\n if (this.keys.length >= this.size) {\n const removeKey = this.keys.shift();\n if (removeKey != null) {\n delete this.store[removeKey];\n }\n }\n this.keys.push(key);\n this.store[key] = item;\n return item;\n }\n}\n","import { isArray, isDate, isObject } from '../helpers';\nimport Locale from '../locale';\nimport type { CalendarDay } from '../page';\nimport { type DateParts, type DayParts, MS_PER_DAY, addDays } from './helpers';\nimport { DateRepeat, type DateRepeatConfig } from './repeat';\n\ntype DateRangeDate = Date | string | number | null;\n\ninterface DateRangeConfig {\n start: DateRangeDate;\n end: DateRangeDate;\n span: number;\n order: number;\n repeat: Partial<DateRepeatConfig>;\n}\n\nexport type DateRangeSource =\n | DateRange\n | DateRangeDate\n | [DateRangeDate, DateRangeDate]\n | Partial<DateRangeConfig>;\n\nexport interface SimpleDateRange {\n start: Date;\n end: Date;\n}\n\nexport class DateRange {\n order: number;\n locale: Locale;\n start: DateParts | null = null;\n end: DateParts | null = null;\n repeat: DateRepeat | null = null;\n\n static fromMany(ranges: DateRangeSource | DateRangeSource[], locale: Locale) {\n // Assign dates\n return (isArray(ranges) ? ranges : [ranges])\n .filter(d => d)\n .map(d => DateRange.from(d, locale));\n }\n\n static from(source: DateRangeSource, locale: Locale) {\n if (source instanceof DateRange) return source;\n const config: Partial<DateRangeConfig> = {\n start: null,\n end: null,\n };\n if (source != null) {\n if (isArray(source)) {\n config.start = source[0] ?? null;\n config.end = source[1] ?? null;\n } else if (isObject(source)) {\n Object.assign(config, source);\n } else {\n config.start = source;\n config.end = source;\n }\n }\n if (config.start != null) {\n config.start = locale.toDateOrNull(config.start);\n }\n if (config.end != null) {\n config.end = locale.toDateOrNull(config.end);\n }\n return new DateRange(config, locale);\n }\n\n private constructor(config: Partial<DateRangeConfig>, locale = new Locale()) {\n this.locale = locale;\n const { start, end, span, order, repeat } = config;\n\n if (isDate(start)) {\n this.start = locale.getDateParts(start);\n }\n\n if (isDate(end)) {\n this.end = locale.getDateParts(end);\n } else if (this.start != null && span) {\n this.end = locale.getDateParts(addDays(this.start.date, span - 1));\n }\n\n this.order = order ?? 0;\n\n if (repeat) {\n this.repeat = new DateRepeat(\n {\n from: this.start?.date,\n ...repeat,\n },\n {\n locale: this.locale,\n },\n );\n }\n }\n\n get opts() {\n const { order, locale } = this;\n return { order, locale };\n }\n\n get hasRepeat() {\n return !!this.repeat;\n }\n\n get isSingleDay() {\n const { start, end } = this;\n return (\n start &&\n end &&\n start.year === end.year &&\n start.month === end.month &&\n start.day === end.day\n );\n }\n\n get isMultiDay() {\n return !this.isSingleDay;\n }\n\n get daySpan() {\n if (this.start == null || this.end == null) {\n if (this.hasRepeat) return 1;\n return Infinity;\n }\n return this.end.dayIndex - this.start.dayIndex;\n }\n\n startsOnDay(dayParts: DayParts) {\n return (\n this.start?.dayIndex === dayParts.dayIndex ||\n !!this.repeat?.passes(dayParts)\n );\n }\n\n intersectsDay(dayIndex: number) {\n return this.intersectsDayRange(dayIndex, dayIndex);\n }\n\n intersectsRange(range: DateRange) {\n return this.intersectsDayRange(\n range.start?.dayIndex ?? -Infinity,\n range.end?.dayIndex ?? Infinity,\n );\n }\n\n intersectsDayRange(startDayIndex: number, endDayIndex: number) {\n if (this.start && this.start.dayIndex > endDayIndex) return false;\n if (this.end && this.end.dayIndex < startDayIndex) return false;\n return true;\n }\n}\n\ninterface DataRange {\n startDay: number;\n startTime: number;\n endDay: number;\n endTime: number;\n}\n\nexport interface RangeData {\n key: string | number;\n order?: number;\n}\n\ninterface DataRanges {\n ranges: DataRange[];\n data: RangeData;\n}\n\nexport interface DateRangeCell<T extends RangeData> extends DataRange {\n data: T;\n onStart: boolean;\n onEnd: boolean;\n startTime: number;\n startDate: Date;\n endTime: number;\n endDate: Date;\n allDay: boolean;\n order: number;\n}\n\nexport class DateRangeContext {\n private records: Record<string, DataRanges> = {};\n\n render(data: RangeData, range: DateRange, days: DayParts[]) {\n let result = null;\n const startDayIndex = days[0]?.dayIndex ?? 0;\n const endDayIndex = days[days.length - 1]?.dayIndex ?? 0;\n if (range.hasRepeat) {\n days.forEach(day => {\n if (range.startsOnDay(day)) {\n const span = range.daySpan < Infinity ? range.daySpan : 1;\n result = {\n startDay: day.dayIndex,\n startTime: range.start?.time ?? 0,\n endDay: day.dayIndex + span - 1,\n endTime: range.end?.time ?? MS_PER_DAY,\n };\n this.getRangeRecords(data).push(result);\n }\n });\n } else if (range.intersectsDayRange(startDayIndex, endDayIndex)) {\n result = {\n startDay: range.start?.dayIndex ?? -Infinity,\n startTime: range.start?.time ?? -Infinity,\n endDay: range.end?.dayIndex ?? Infinity,\n endTime: range.end?.time ?? Infinity,\n };\n this.getRangeRecords(data).push(result);\n }\n return result;\n }\n\n private getRangeRecords(data: RangeData) {\n let record = this.records[data.key];\n if (!record) {\n record = {\n ranges: [],\n data,\n };\n this.records[data.key] = record;\n }\n return record.ranges;\n }\n\n getCell(key: string | number, day: CalendarDay) {\n const cells = this.getCells(day);\n const result = cells.find(cell => cell.data.key === key);\n return result;\n }\n\n cellExists(key: string | number, dayIndex: number) {\n const records = this.records[key];\n if (records == null) return false;\n return records.ranges.some(\n r => r.startDay <= dayIndex && r.endDay >= dayIndex,\n );\n }\n\n getCells(day: CalendarDay) {\n const records = Object.values(this.records);\n const result: DateRangeCell<any>[] = [];\n const { dayIndex } = day;\n records.forEach(({ data, ranges }) => {\n ranges\n .filter(r => r.startDay <= dayIndex && r.endDay >= dayIndex)\n .forEach(range => {\n const onStart = dayIndex === range.startDay;\n const onEnd = dayIndex === range.endDay;\n const startTime = onStart ? range.startTime : 0;\n const startDate = new Date(day.startDate.getTime() + startTime);\n const endTime = onEnd ? range.endTime : MS_PER_DAY;\n const endDate = new Date(day.endDate.getTime() + endTime);\n const allDay = startTime === 0 && endTime === MS_PER_DAY;\n const order = data.order || 0;\n result.push({\n ...range,\n data,\n onStart,\n onEnd,\n startTime,\n startDate,\n endTime,\n endDate,\n allDay,\n order,\n });\n });\n });\n result.sort((a, b) => a.order - b.order);\n return result;\n }\n}\n","interface LocaleConfig {\n dow: number;\n L: string;\n}\n\ninterface LocaleSetting {\n id: string;\n firstDayOfWeek: number;\n masks: {\n L: string;\n };\n}\n\nconst locales: Record<string, LocaleConfig> = {\n // Arabic\n ar: { dow: 7, L: 'D/\\u200FM/\\u200FYYYY' },\n // Bulgarian\n bg: { dow: 2, L: 'D.MM.YYYY' },\n // Catalan\n ca: { dow: 2, L: 'DD/MM/YYYY' },\n // Chinese (China)\n 'zh-CN': { dow: 2, L: 'YYYY/MM/DD' },\n // Chinese (Taiwan)\n 'zh-TW': { dow: 1, L: 'YYYY/MM/DD' },\n // Croatian\n hr: { dow: 2, L: 'DD.MM.YYYY' },\n // Czech\n cs: { dow: 2, L: 'DD.MM.YYYY' },\n // Danish\n da: { dow: 2, L: 'DD.MM.YYYY' },\n // Dutch\n nl: { dow: 2, L: 'DD-MM-YYYY' },\n // English (US)\n 'en-US': { dow: 1, L: 'MM/DD/YYYY' },\n // English (Australia)\n 'en-AU': { dow: 2, L: 'DD/MM/YYYY' },\n // English (Canada)\n 'en-CA': { dow: 1, L: 'YYYY-MM-DD' },\n // English (Great Britain)\n 'en-GB': { dow: 2, L: 'DD/MM/YYYY' },\n // English (Ireland)\n 'en-IE': { dow: 2, L: 'DD-MM-YYYY' },\n // English (New Zealand)\n 'en-NZ': { dow: 2, L: 'DD/MM/YYYY' },\n // English (South Africa)\n 'en-ZA': { dow: 1, L: 'YYYY/MM/DD' },\n // Esperanto\n eo: { dow: 2, L: 'YYYY-MM-DD' },\n // Estonian\n et: { dow: 2, L: 'DD.MM.YYYY' },\n // Finnish\n fi: { dow: 2, L: 'DD.MM.YYYY' },\n // French\n fr: { dow: 2, L: 'DD/MM/YYYY' },\n // French (Canada)\n 'fr-CA': { dow: 1, L: 'YYYY-MM-DD' },\n // French (Switzerland)\n 'fr-CH': { dow: 2, L: 'DD.MM.YYYY' },\n // German\n de: { dow: 2, L: 'DD.MM.YYYY' },\n // Hebrew\n he: { dow: 1, L: 'DD.MM.YYYY' },\n // Indonesian\n id: { dow: 2, L: 'DD/MM/YYYY' },\n // Italian\n it: { dow: 2, L: 'DD/MM/YYYY' },\n // Japanese\n ja: { dow: 1, L: 'YYYY年M月D日' },\n // Korean\n ko: { dow: 1, L: 'YYYY.MM.DD' },\n // Latvian\n lv: { dow: 2, L: 'DD.MM.YYYY' },\n // Lithuanian\n lt: { dow: 2, L: 'DD.MM.YYYY' },\n // Macedonian\n mk: { dow: 2, L: 'D.MM.YYYY' },\n // Norwegian\n nb: { dow: 2, L: 'D. MMMM YYYY' },\n nn: { dow: 2, L: 'D. MMMM YYYY' },\n // Polish\n pl: { dow: 2, L: 'DD.MM.YYYY' },\n // Portuguese\n pt: { dow: 2, L: 'DD/MM/YYYY' },\n // Romanian\n ro: { dow: 2, L: 'DD.MM.YYYY' },\n // Russian\n ru: { dow: 2, L: 'DD.MM.YYYY' },\n // Slovak\n sk: { dow: 2, L: 'DD.MM.YYYY' },\n // Spanish (Spain)\n 'es-ES': { dow: 2, L: 'DD/MM/YYYY' },\n // Spanish (Mexico)\n 'es-MX': { dow: 2, L: 'DD/MM/YYYY' },\n // Swedish\n sv: { dow: 2, L: 'YYYY-MM-DD' },\n // Thai\n th: { dow: 1, L: 'DD/MM/YYYY' },\n // Turkish\n tr: { dow: 2, L: 'DD.MM.YYYY' },\n // Ukrainian\n uk: { dow: 2, L: 'DD.MM.YYYY' },\n // Vietnam\n vi: { dow: 2, L: 'DD/MM/YYYY' },\n};\nlocales.en = locales['en-US'];\nlocales.es = locales['es-ES'];\nlocales.no = locales.nb;\nlocales.zh = locales['zh-CN'];\n\n// Remap from abbr. to intuitive property names\nconst localeSettings = Object.entries(locales).reduce(\n (res, [id, { dow, L }]) => {\n res[id] = {\n id,\n firstDayOfWeek: dow,\n masks: { L },\n };\n return res;\n },\n {} as Record<string, LocaleSetting>,\n);\n\nexport default localeSettings;\n","{\n \"title\": \"MMMM YYYY\",\n \"weekdays\": \"W\",\n \"navMonths\": \"MMM\",\n \"hours\": \"h A\",\n \"input\": [\"L\", \"YYYY-MM-DD\", \"YYYY/MM/DD\"],\n \"inputDateTime\": [\"L h:mm A\", \"YYYY-MM-DD h:mm A\", \"YYYY/MM/DD h:mm A\"],\n \"inputDateTime24hr\": [\"L HH:mm\", \"YYYY-MM-DD HH:mm\", \"YYYY/MM/DD HH:mm\"],\n \"inputTime\": [\"h:mm A\"],\n \"inputTime24hr\": [\"HH:mm\"],\n \"dayPopover\": \"WWW, MMM D, YYYY\",\n \"data\": [\"L\", \"YYYY-MM-DD\", \"YYYY/MM/DD\"],\n \"model\": \"iso\",\n \"iso\": \"YYYY-MM-DDTHH:mm:ss.SSSZ\"\n}","{\n \"maxSwipeTime\": 300,\n \"minHorizontalSwipeDistance\": 60,\n \"maxVerticalSwipeDistance\": 80\n}","import { type App, computed, reactive } from 'vue';\nimport type { DarkModeConfig } from '../useDisplayMode';\nimport { defaultsDeep, get, has, mapValues } from '../helpers';\nimport locales from './locales';\nimport masks from './masks.json';\nimport touch from './touch.json';\n\ndeclare const window: any;\n\ninterface DatePickerPopoverDefaults {\n visibility?: string;\n placement?: string;\n isInteractive?: boolean;\n}\n\ninterface DatePickerDefaults {\n updateOnInput?: boolean;\n inputDebounce?: number;\n popover?: DatePickerPopoverDefaults;\n}\n\nexport interface Defaults {\n componentPrefix?: string;\n color?: string;\n isDark?: DarkModeConfig;\n navVisibility?: string;\n titlePosition?: string;\n transition?: string;\n touch?: object;\n masks?: object;\n locales?: any;\n datePicker?: DatePickerDefaults;\n}\n\nconst defaultConfig: Defaults = {\n componentPrefix: 'V',\n color: 'blue',\n isDark: false,\n navVisibility: 'click',\n titlePosition: 'center',\n transition: 'slide-h',\n touch,\n masks,\n locales,\n datePicker: {\n updateOnInput: true,\n inputDebounce: 1000,\n popover: {\n visibility: 'hover-focus',\n placement: 'bottom-start',\n isInteractive: true,\n },\n },\n};\n\nconst state = reactive(defaultConfig);\n\nconst defaultLocales = computed(() => {\n return mapValues(state.locales, (l: any) => {\n l.masks = defaultsDeep(l.masks, state.masks);\n return l;\n });\n});\n\nexport { defaultLocales };\n\nexport const getDefault = (path: string) => {\n if (typeof window !== 'undefined' && has(window.__vcalendar__, path)) {\n return get(window.__vcalendar__, path);\n }\n return get(state, path);\n};\n\nexport const setupDefaults = (app: App, userDefaults: Defaults | undefined) => {\n app.config.globalProperties.$VCalendar = state;\n return Object.assign(state, defaultsDeep(userDefaults, state));\n};\n","import {\n type PageConfig,\n type CachedPage,\n getPageKey,\n getCachedPage,\n getPage,\n} from './page';\nimport {\n type DateSource,\n type DateOptions,\n type DayOfWeek,\n type MonthParts,\n type MonthInYear,\n type SimpleDateParts,\n type TimeNames,\n DatePatchKeys,\n applyRulesForDateParts,\n daysInWeek,\n formatDate,\n parseDate,\n getDateParts,\n getDateFromParts,\n getDayNames,\n getMonthNames,\n getMonthParts,\n getMonthPartsKey,\n getHourDates,\n getRelativeTimeNames,\n isDateParts,\n} from './date/helpers';\nimport Cache from './cache';\nimport { type DateRangeSource, DateRange } from './date/range';\nimport { defaultLocales } from './defaults';\nimport {\n isString,\n isNumber,\n isDate,\n isObject,\n has,\n pick,\n clamp,\n defaultsDeep,\n} from './helpers';\n\nexport interface LocaleConfig {\n id: string;\n firstDayOfWeek: number;\n masks: any;\n monthCacheSize: number;\n pageCacheSize: number;\n}\n\nconst DEFAULT_MONTH_CACHE_SIZE = 12;\nconst DEFAULT_PAGE_CACHE_SIZE = 5;\n\nexport function resolveConfig(\n config: string | Partial<LocaleConfig> | undefined,\n locales: any,\n) {\n // Get the detected locale string\n const detLocale = new Intl.DateTimeFormat().resolvedOptions().locale;\n // Resolve the locale id\n let id;\n if (isString(config)) {\n id = config;\n } else if (has(config, 'id')) {\n id = config!.id;\n }\n id = (id || detLocale).toLowerCase();\n const localeKeys = Object.keys(locales);\n const validKey = (k: string) => localeKeys.find(lk => lk.toLowerCase() === k);\n id = validKey(id) || validKey(id.substring(0, 2)) || detLocale;\n // Add fallback and spread default locale to prevent repetitive update loops\n const defLocale: LocaleConfig = {\n ...locales['en-IE'],\n ...locales[id],\n id,\n monthCacheSize: DEFAULT_MONTH_CACHE_SIZE,\n pageCacheSize: DEFAULT_PAGE_CACHE_SIZE,\n };\n // Assign or merge defaults with provided config\n const result: LocaleConfig = isObject(config)\n ? defaultsDeep(config, defLocale)\n : defLocale;\n // Return resolved config\n return result;\n}\n\nexport default class Locale {\n id: any;\n daysInWeek: number;\n firstDayOfWeek: DayOfWeek;\n masks: any;\n timezone: string | undefined;\n hourLabels: string[];\n dayNames: string[];\n dayNamesShort: string[];\n dayNamesShorter: string[];\n dayNamesNarrow: string[];\n monthNames: string[];\n monthNamesShort: string[];\n relativeTimeNames: TimeNames;\n amPm: [string, string] = ['am', 'pm'];\n monthCache: Cache<MonthParts>;\n pageCache: Cache<CachedPage>;\n\n constructor(\n config: Partial<LocaleConfig> | string | undefined = undefined,\n timezone?: string,\n ) {\n const { id, firstDayOfWeek, masks, monthCacheSize, pageCacheSize } =\n resolveConfig(config, defaultLocales.value);\n this.monthCache = new Cache(\n monthCacheSize,\n getMonthPartsKey,\n getMonthParts,\n );\n this.pageCache = new Cache(pageCacheSize, getPageKey, getCachedPage);\n this.id = id;\n this.daysInWeek = daysInWeek;\n this.firstDayOfWeek = clamp(firstDayOfWeek, 1, daysInWeek) as DayOfWeek;\n this.masks = masks;\n this.timezone = timezone || undefined;\n this.hourLabels = this.getHourLabels();\n this.dayNames = getDayNames('long', this.id);\n this.dayNamesShort = getDayNames('short', this.id);\n this.dayNamesShorter = this.dayNamesShort.map(s => s.substring(0, 2));\n this.dayNamesNarrow = getDayNames('narrow', this.id);\n this.monthNames = getMonthNames('long', this.id);\n this.monthNamesShort = getMonthNames('short', this.id);\n this.relativeTimeNames = getRelativeTimeNames(this.id);\n }\n\n formatDate(date: Date, masks: string | string[]) {\n return formatDate(date, masks, this);\n }\n\n parseDate(dateString: string, mask: string | string[]) {\n return parseDate(dateString, mask, this);\n }\n\n toDate(\n d: DateSource | Partial<SimpleDateParts>,\n opts: Partial<DateOptions> = {},\n ): Date {\n const nullDate = new Date(NaN);\n let result = nullDate;\n const { fillDate, mask, patch, rules } = opts;\n if (isNumber(d)) {\n opts.type = 'number';\n result = new Date(+d);\n } else if (isString(d)) {\n opts.type = 'string';\n result = d ? parseDate(d, mask || 'iso', this) : nullDate;\n } else if (isDate(d)) {\n opts.type = 'date';\n result = new Date(d.getTime());\n } else if (isDateParts(d)) {\n opts.type = 'object';\n result = this.getDateFromParts(d);\n }\n // Patch parts or apply rules if needed\n if (result && (patch || rules)) {\n let parts = this.getDateParts(result);\n // Patch date parts\n if (patch && fillDate != null) {\n const fillParts = this.getDateParts(this.toDate(fillDate));\n parts = this.getDateParts(\n this.toDate({ ...fillParts, ...pick(parts, DatePatchKeys[patch]) }),\n );\n }\n // Apply date part rules\n if (rules) {\n parts = applyRulesForDateParts(parts, rules);\n }\n result = this.getDateFromParts(parts);\n }\n return result || nullDate;\n }\n\n toDateOrNull(\n d: DateSource | Partial<SimpleDateParts>,\n opts: Partial<DateOptions> = {},\n ): Date | null {\n const dte = this.toDate(d, opts);\n return isNaN(dte.getTime()) ? null : dte;\n }\n\n fromDate(date: Date | null, { type, mask }: Partial<DateOptions> = {}) {\n switch (type) {\n case 'number':\n return date ? date.getTime() : NaN;\n case 'string':\n return date ? this.formatDate(date, mask || 'iso') : '';\n case 'object':\n return date ? this.getDateParts(date) : null;\n default:\n return date ? new Date(date) : null;\n }\n }\n\n range(source: DateRangeSource) {\n return DateRange.from(source, this);\n }\n\n ranges(ranges: DateRangeSource | DateRangeSource[]) {\n return DateRange.fromMany(ranges, this);\n }\n\n getDateParts(date: Date) {\n return getDateParts(date, this);\n }\n\n getDateFromParts(parts: Partial<SimpleDateParts>) {\n return getDateFromParts(parts, this.timezone);\n }\n\n getDateFromParams(\n year: number,\n month: number,\n day: number,\n hours: number,\n minutes: number,\n seconds: number,\n milliseconds: number,\n ) {\n return this.getDateFromParts({\n year,\n month,\n day,\n hours,\n minutes,\n seconds,\n milliseconds,\n });\n }\n\n getPage(config: PageConfig) {\n const cachedPage = this.pageCache.getOrSet(config, this);\n return getPage(config, cachedPage);\n }\n\n getMonthParts(month: number, year: number) {\n const { firstDayOfWeek } = this;\n return this.monthCache.getOrSet(month, year, firstDayOfWeek);\n }\n\n getThisMonthParts() {\n const date = new Date();\n return this.getMonthParts(\n <MonthInYear>(date.getMonth() + 1),\n date.getFullYear(),\n );\n }\n\n getPrevMonthParts(month: number, year: number) {\n if (month === 1) return this.getMonthParts(12, year - 1);\n return this.getMonthParts(month - 1, year);\n }\n\n getNextMonthParts(month: number, year: number) {\n if (month === 12) return this.getMonthParts(1, year + 1);\n return this.getMonthParts(month + 1, year);\n }\n\n getHourLabels() {\n return getHourDates().map(d => {\n return this.formatDate(d, this.masks.hours);\n });\n }\n\n getDayId(date: Date) {\n return this.formatDate(date, 'YYYY-MM-DD');\n }\n}\n","import { isArray, isFunction, isNumber } from '../helpers';\nimport {\n type DayOfWeek,\n type DayParts,\n type OrdinalWeekInMonth,\n diffInDays,\n diffInMonths,\n diffInWeeks,\n diffInYears,\n isDayInMonth,\n isDayOfWeek,\n isMonthInYear,\n isOrdinalWeekInMonth,\n isWeekInMonth,\n} from './helpers';\n\nexport type SingleOrArray<T> = T | T[];\n\nexport enum GroupRuleType {\n Any = 'any',\n All = 'all',\n}\n\nexport enum IntervalRuleType {\n Days = 'days',\n Weeks = 'weeks',\n Months = 'months',\n Years = 'years',\n}\n\nexport enum ComponentRuleType {\n Days = 'days',\n Weekdays = 'weekdays',\n Weeks = 'weeks',\n Months = 'months',\n Years = 'years',\n}\n\nexport enum OrdinalComponentRuleType {\n OrdinalWeekdays = 'ordinalWeekdays',\n}\n\nexport enum FunctionRuleType {\n Function = 'function',\n}\n\nexport type RuleType =\n | GroupRuleType\n | IntervalRuleType\n | ComponentRuleType\n | OrdinalComponentRuleType\n | FunctionRuleType;\n\nexport type OrdinalArrayConfig = SingleOrArray<\n [OrdinalWeekInMonth, ...DayOfWeek[]]\n>;\n\nexport interface Rule<T> {\n type: T;\n passes(dayParts: DayParts): boolean;\n}\n\nexport class IntervalRule implements Rule<IntervalRuleType> {\n private validated = true;\n\n constructor(\n public type: IntervalRuleType,\n public interval: number,\n public from: DayParts,\n ) {\n // Start date needed for interval rules\n if (!this.from) {\n console.error(\n `A valid \"from\" date is required for date interval rule. This rule will be skipped.`,\n );\n this.validated = false;\n }\n }\n\n passes(dateParts: DayParts) {\n if (!this.validated) return true;\n\n const { date } = dateParts;\n switch (this.type) {\n case 'days': {\n return diffInDays(this.from.date, date) % this.interval === 0;\n }\n case 'weeks': {\n return diffInWeeks(this.from.date, date) % this.interval === 0;\n }\n case 'months': {\n return diffInMonths(this.from.date, date) % this.interval === 0;\n }\n case 'years': {\n return diffInYears(this.from.date, date) % this.interval === 0;\n }\n default: {\n return false;\n }\n }\n }\n}\n\nexport class ComponentRule implements Rule<ComponentRuleType> {\n components: number[] = [];\n\n static create(type: ComponentRuleType, config: unknown) {\n switch (type) {\n case ComponentRuleType.Days:\n return new DaysRule(config);\n case ComponentRuleType.Weekdays:\n return new WeekdaysRule(config);\n case ComponentRuleType.Weeks:\n return new WeeksRule(config);\n case ComponentRuleType.Months:\n return new MonthsRule(config);\n case ComponentRuleType.Years:\n return new YearsRule(config);\n }\n }\n\n constructor(\n public type: ComponentRuleType,\n components: unknown,\n public validator: (component: unknown) => component is number,\n public getter: (dayParts: DayParts) => number[],\n ) {\n this.components = this.normalizeComponents(components);\n }\n\n normalizeComponents(components: unknown) {\n if (this.validator(components)) return [components];\n if (!isArray(components)) return [];\n const result: number[] = [];\n components.forEach(component => {\n if (!this.validator(component)) {\n console.error(\n `Component value ${component} in invalid for \"${this.type}\" rule. This rule will be skipped.`,\n );\n return;\n }\n result.push(component);\n });\n return result;\n }\n\n passes(dayParts: DayParts) {\n const comps = this.getter(dayParts);\n const result = comps.some(comp => this.components.includes(comp));\n return result;\n }\n}\n\nexport class DaysRule extends ComponentRule {\n constructor(components: unknown) {\n super(\n ComponentRuleType.Days,\n components,\n isDayInMonth,\n ({ day, dayFromEnd }) => [day, -dayFromEnd],\n );\n }\n}\n\nexport class WeekdaysRule extends ComponentRule {\n constructor(components: unknown) {\n super(\n ComponentRuleType.Weekdays,\n components,\n isDayOfWeek,\n ({ weekday }) => [weekday],\n );\n }\n}\n\nexport class WeeksRule extends ComponentRule {\n constructor(components: unknown) {\n super(\n ComponentRuleType.Weeks,\n components,\n isWeekInMonth,\n ({ week, weekFromEnd }) => [week, -weekFromEnd],\n );\n }\n}\n\nexport class MonthsRule extends ComponentRule {\n constructor(components: unknown) {\n super(ComponentRuleType.Months, components, isMonthInYear, ({ month }) => [\n month,\n ]);\n }\n}\n\nexport class YearsRule extends ComponentRule {\n constructor(components: unknown) {\n super(ComponentRuleType.Years, components, isNumber, ({ year }) => [year]);\n }\n}\n\nexport class OrdinalComponentRule implements Rule<OrdinalComponentRuleType> {\n components: [OrdinalWeekInMonth, DayOfWeek][];\n\n constructor(\n public type: OrdinalComponentRuleType,\n components: OrdinalArrayConfig,\n ) {\n this.components = this.normalizeComponents(components);\n }\n\n normalizeArrayConfig(config: OrdinalArrayConfig) {\n const result: [OrdinalWeekInMonth, DayOfWeek][] = [];\n config.forEach((numOrArray, i) => {\n if (isNumber(numOrArray)) {\n if (i === 0) return;\n if (!isOrdinalWeekInMonth(config[0])) {\n console.error(\n `Ordinal range for \"${this.type}\" rule is from -5 to -1 or 1 to 5. This rule will be skipped.`,\n );\n return;\n }\n if (!isDayOfWeek(numOrArray)) {\n console.error(\n `Acceptable range for \"${this.type}\" rule is from 1 to 5. This rule will be skipped`,\n );\n return;\n }\n result.push([config[0], numOrArray]);\n } else if (isArray(numOrArray)) {\n result.push(...this.normalizeArrayConfig(numOrArray));\n }\n });\n return result;\n }\n\n normalizeComponents(config: OrdinalArrayConfig) {\n const result: [OrdinalWeekInMonth, DayOfWeek][] = [];\n config.forEach((numOrArray, i) => {\n if (isNumber(numOrArray)) {\n if (i === 0) return;\n if (!isOrdinalWeekInMonth(config[0])) {\n console.error(\n `Ordinal range for \"${this.type}\" rule is from -5 to -1 or 1 to 5. This rule will be skipped.`,\n );\n return;\n }\n if (!isDayOfWeek(numOrArray)) {\n console.error(\n `Acceptable range for \"${this.type}\" rule is from 1 to 5. This rule will be skipped`,\n );\n return;\n }\n result.push([config[0], numOrArray]);\n } else if (isArray(numOrArray)) {\n result.push(...this.normalizeArrayConfig(numOrArray));\n }\n });\n return result;\n }\n\n passes(dayParts: DayParts) {\n const { weekday, weekdayOrdinal, weekdayOrdinalFromEnd } = dayParts;\n return this.components.some(\n ([ordinalWeek, ordinalWeekday]) =>\n (ordinalWeek === weekdayOrdinal ||\n ordinalWeek === -weekdayOrdinalFromEnd) &&\n weekday === ordinalWeekday,\n );\n }\n}\n\nexport class FunctionRule implements Rule<FunctionRuleType> {\n type = FunctionRuleType.Function;\n private validated = true;\n\n constructor(public fn: Function) {\n if (!isFunction(fn)) {\n console.error(\n `The function rule requires a valid function. This rule will be skipped.`,\n );\n this.validated = false;\n }\n }\n\n passes(dayParts: DayParts) {\n if (!this.validated) return true;\n\n return this.fn(dayParts);\n }\n}\n","import { isArray, isFunction, isObject, isString } from '../helpers';\nimport Locale from '../locale';\nimport type {\n DateParts,\n DayInMonth,\n DayOfWeek,\n DayParts,\n MonthInYear,\n WeekInMonth,\n} from './helpers';\nimport {\n ComponentRule,\n ComponentRuleType,\n FunctionRule,\n GroupRuleType,\n IntervalRule,\n IntervalRuleType,\n OrdinalComponentRule,\n OrdinalComponentRuleType,\n type Rule,\n type RuleType,\n type SingleOrArray,\n} from './rules';\n\nexport type RepeatIntervalShort = 'day' | 'week' | 'month' | 'year';\n\nexport type RepeatInterval = 'days' | 'weeks' | 'months' | 'years';\nexport interface DateRepeatConfig {\n every: RepeatIntervalShort | [number, RepeatInterval];\n from: Date;\n until: Date;\n weekdays: SingleOrArray<DayOfWeek>;\n days: SingleOrArray<DayInMonth>;\n weeks: SingleOrArray<WeekInMonth>;\n months: SingleOrArray<MonthInYear>;\n years: SingleOrArray<number>;\n ordinalWeekdays: SingleOrArray<number[]>;\n on: SingleOrArray<DateRepeatFn | Partial<DateRepeatConfig>>;\n}\n\nexport type DateRepeatFn = (dayParts: DayParts) => boolean;\n\nexport interface DateRepeatOptions {\n locale: Locale;\n}\n\nexport class DateRepeat implements Rule<GroupRuleType> {\n validated = true;\n\n config: Partial<DateRepeatConfig> | DateRepeatFn;\n type = GroupRuleType.Any;\n from: DateParts | undefined;\n until: DateParts | undefined;\n rules: Rule<RuleType>[] = [];\n locale = new Locale();\n\n constructor(\n config: Partial<DateRepeatConfig> | DateRepeatFn,\n options: Partial<DateRepeatOptions> = {},\n private parent?: DateRepeat,\n ) {\n if (options.locale) this.locale = options.locale;\n\n this.config = config;\n if (isFunction(config)) {\n this.type = GroupRuleType.All;\n this.rules = [new FunctionRule(config)];\n } else if (isArray(config)) {\n this.type = GroupRuleType.Any;\n this.rules = config.map(c => new DateRepeat(c, options, this));\n } else if (isObject(config)) {\n this.type = GroupRuleType.All;\n // Assign bounding dates\n this.from = config.from\n ? this.locale.getDateParts(config.from)\n : parent?.from;\n this.until = config.until\n ? this.locale.getDateParts(config.until)\n : parent?.until;\n this.rules = this.getObjectRules(config);\n } else {\n console.error('Rule group configuration must be an object or an array.');\n this.validated = false;\n }\n }\n\n getObjectRules(config: any) {\n const rules: Rule<RuleType>[] = [];\n\n // Add interval rule\n if (config.every) {\n if (isString(config.every)) {\n config.every = [1, `${config.every}s`];\n }\n if (isArray(config.every)) {\n const [interval = 1, type = IntervalRuleType.Days] = config.every;\n rules.push(new IntervalRule(type, interval, this.from!));\n }\n }\n\n // Add component rules\n Object.values(ComponentRuleType).forEach(type => {\n if (!(type in config)) return;\n rules.push(ComponentRule.create(type, config[type]));\n });\n\n // Add ordinal component rules\n Object.values(OrdinalComponentRuleType).forEach(type => {\n if (!(type in config)) return;\n rules.push(new OrdinalComponentRule(type, config[type]));\n });\n\n // Add group rules\n if (config.on != null) {\n if (!isArray(config.on)) config.on = [config.on];\n rules.push(\n new DateRepeat(config.on, { locale: this.locale }, this.parent),\n );\n }\n\n return rules;\n }\n\n passes(dayParts: DayParts) {\n if (!this.validated) return true;\n\n if (this.from && dayParts.dayIndex <= this.from.dayIndex) return false;\n if (this.until && dayParts.dayIndex >= this.until.dayIndex) return false;\n\n if (this.type === GroupRuleType.Any) {\n return this.rules.some(r => r.passes(dayParts));\n }\n return this.rules.every(r => r.passes(dayParts));\n }\n}\n","import {\n pad,\n isNumber,\n isString,\n isDate,\n isArray,\n arrayHasItems,\n isFunction,\n isObject,\n} from '../helpers';\nimport {\n addDays,\n addMonths,\n addYears,\n getISOWeek,\n getWeek,\n getWeeksInMonth,\n} from 'date-fns';\nimport { fromZonedTime, toZonedTime } from 'date-fns-tz';\nimport { type LocaleConfig, default as Locale } from '../locale';\n\nexport { addDays, addMonths, addYears };\nexport { DateRepeat } from './repeat';\n\n// #region Types\n\ntype DayNameLength = 'narrow' | 'short' | 'long';\ntype MonthNameLength = 'short' | 'long';\n\nexport type DayInMonth =\n | 1\n | 2\n | 3\n | 4\n | 5\n | 6\n | 7\n | 8\n | 9\n | 10\n | 11\n | 12\n | 13\n | 14\n | 15\n | 16\n | 17\n | 18\n | 19\n | 20\n | 21\n | 22\n | 23\n | 24\n | 25\n | 26\n | 27\n | 28\n | 29\n | 30\n | 31\n | -1\n | -2\n | -3\n | -4\n | -5\n | -6\n | -7\n | -8\n | -9\n | -10\n | -11\n | -12\n | -13\n | -14\n | -15\n | -16\n | -17\n | -18\n | -19\n | -20\n | -21\n | -22\n | -23\n | -24\n | -25\n | -26\n | -27\n | -28\n | -29\n | -30\n | -31;\nexport type DayOfWeek = 1 | 2 | 3 | 4 | 5 | 6 | 7;\nexport type WeekInMonth = 1 | 2 | 3 | 4 | 5 | 6;\nexport type WeekInMonthFromEnd = -6 | -5 | -4 | -3 | -2 | -1;\nexport type OrdinalWeekInMonth = -5 | -4 | -3 | -2 | -1 | 1 | 2 | 3 | 4 | 5;\nexport type MonthInYear = 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12;\nexport type StartOfWeek = 1 | 2 | 3 | 4 | 5 | 6 | 7;\n\nexport type WeekStartsOn = 0 | 1 | 2 | 3 | 4 | 5 | 6;\nexport type DateSource = Date | string | number;\nexport type TimeNames = Partial<Record<Intl.RelativeTimeFormatUnit, string>>;\n\n// #endregion Types\n\nexport function isDayInMonth(dayInMonth: unknown): dayInMonth is DayInMonth {\n if (!isNumber(dayInMonth)) return false;\n return dayInMonth >= 1 && dayInMonth <= 31;\n}\n\nexport function isDayOfWeek(dayOfWeek: unknown): dayOfWeek is DayOfWeek {\n if (!isNumber(dayOfWeek)) return false;\n return dayOfWeek >= 1 && dayOfWeek <= 7;\n}\n\nexport function isWeekInMonth(\n weekInMonth: unknown,\n): weekInMonth is WeekInMonth {\n if (!isNumber(weekInMonth)) return false;\n return (\n (weekInMonth >= -6 && weekInMonth <= -1) ||\n (weekInMonth >= 1 && weekInMonth <= 6)\n );\n}\n\nexport function isMonthInYear(\n monthInYear: unknown,\n): monthInYear is MonthInYear {\n if (!isNumber(monthInYear)) return false;\n return monthInYear >= 1 && monthInYear <= 12;\n}\n\nexport function isOrdinalWeekInMonth(\n weekInMonth: unknown,\n): weekInMonth is OrdinalWeekInMonth {\n if (!isNumber(weekInMonth)) return false;\n if (weekInMonth < -5 || weekInMonth > 5 || weekInMonth === 0) return false;\n return true;\n}\n\ninterface NumberRuleConfig {\n min?: number;\n max?: number;\n interval?: number;\n}\n\ntype DatePartsRuleFunction = (part: number, parts: TimeParts) => boolean;\n\ntype DatePartsRule =\n number | Array<number> | NumberRuleConfig | DatePartsRuleFunction;\n\nexport interface DatePartsRules {\n hours?: DatePartsRule;\n minutes?: DatePartsRule;\n seconds?: DatePartsRule;\n milliseconds?: DatePartsRule;\n}\n\nexport interface DatePartOption {\n value: number;\n label: string;\n disabled?: boolean;\n}\n\nexport interface FormatParseOptions {\n locale?: Locale | LocaleConfig | string;\n timezone?: string;\n}\n\nexport interface DateOptions {\n type: string;\n fillDate: DateSource;\n mask: string;\n patch: DatePatch;\n rules: DatePartsRules;\n}\n\nexport interface PageAddress {\n day?: number;\n week?: number;\n month: number;\n year: number;\n}\n\nexport interface TimeParts {\n hours: number;\n minutes: number;\n seconds: number;\n milliseconds: number;\n}\n\nexport interface SimpleDateParts {\n year: number;\n month: number;\n day: number;\n hours: number;\n minutes: number;\n seconds: number;\n milliseconds: number;\n}\n\nexport interface DayParts {\n dayIndex: number;\n day: number;\n dayFromEnd: number;\n weekday: number;\n weekdayOrdinal: number;\n weekdayOrdinalFromEnd: number;\n week: number;\n weekFromEnd: number;\n weeknumber: number;\n month: number;\n year: number;\n date: Date;\n}\n\nexport interface DateParts extends DayParts {\n milliseconds: number;\n seconds: number;\n minutes: number;\n hours: number;\n time: number;\n dateTime: number;\n isValid: boolean;\n timezoneOffset: number;\n isPm?: boolean;\n}\n\nexport interface MonthParts {\n firstDayOfWeek: DayOfWeek;\n firstDayOfMonth: Date;\n inLeapYear: boolean;\n firstWeekday: number;\n numDays: number;\n numWeeks: number;\n month: number;\n year: number;\n weeknumbers: number[];\n isoWeeknumbers: number[];\n}\n\nexport type DatePatch = 'dateTime' | 'date' | 'time';\n\nexport const DatePatchKeys: Record<DatePatch, (keyof SimpleDateParts)[]> = {\n dateTime: [\n 'year',\n 'month',\n 'day',\n 'hours',\n 'minutes',\n 'seconds',\n 'milliseconds',\n ],\n date: ['year', 'month', 'day'],\n time: ['hours', 'minutes', 'seconds', 'milliseconds'],\n};\n\nexport const daysInWeek = 7;\nexport const weeksInMonth = 6;\nexport const MS_PER_SECOND = 1000;\nexport const MS_PER_MINUTE = MS_PER_SECOND * 60;\nexport const MS_PER_HOUR = MS_PER_MINUTE * 60;\nexport const MS_PER_DAY = MS_PER_HOUR * 24;\n\nconst daysInMonths = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];\nconst maskMacros = ['L', 'iso'];\n\ntype DatePartsRange = Readonly<[number, number, number]>;\ntype TimePartsKey = 'milliseconds' | 'seconds' | 'minutes' | 'hours';\nconst DATE_PART_RANGES: Record<TimePartsKey, DatePartsRange> = {\n milliseconds: [0, 999, 3],\n seconds: [0, 59, 2],\n minutes: [0, 59, 2],\n hours: [0, 23, 2],\n} as const;\n\n// #region Format constants\n\nconst token =\n /d{1,2}|W{1,4}|M{1,4}|YY(?:YY)?|S{1,3}|Do|Z{1,4}|([HhMsDm])\\1?|[aA]|\"[^\"]*\"|'[^']*'/g;\nconst literal = /\\[([^]*?)\\]/gm;\nconst formatFlags: any = {\n D(d: DateParts) {\n return d.day;\n },\n DD(d: DateParts) {\n return pad(d.day, 2);\n },\n // Do(d: DateParts, l: Locale) {\n // return l.DoFn(d.day);\n // },\n d(d: DateParts) {\n return d.weekday - 1;\n },\n dd(d: DateParts) {\n return pad(d.weekday - 1, 2);\n },\n W(d: DateParts, l: Locale) {\n return l.dayNamesNarrow[d.weekday - 1];\n },\n WW(d: DateParts, l: Locale) {\n return l.dayNamesShorter[d.weekday - 1];\n },\n WWW(d: DateParts, l: Locale) {\n return l.dayNamesShort[d.weekday - 1];\n },\n WWWW(d: DateParts, l: Locale) {\n return l.dayNames[d.weekday - 1];\n },\n M(d: DateParts) {\n return d.month;\n },\n MM(d: DateParts) {\n return pad(d.month, 2);\n },\n MMM(d: DateParts, l: Locale) {\n return l.monthNamesShort[d.month - 1];\n },\n MMMM(d: DateParts, l: Locale) {\n return l.monthNames[d.month - 1];\n },\n YY(d: DateParts) {\n return String(d.year).substr(2);\n },\n YYYY(d: DateParts) {\n return pad(d.year, 4);\n },\n h(d: DateParts) {\n return d.hours % 12 || 12;\n },\n hh(d: DateParts) {\n return pad(d.hours % 12 || 12, 2);\n },\n H(d: DateParts) {\n return d.hours;\n },\n HH(d: DateParts) {\n return pad(d.hours, 2);\n },\n m(d: DateParts) {\n return d.minutes;\n },\n mm(d: DateParts) {\n return pad(d.minutes, 2);\n },\n s(d: DateParts) {\n return d.seconds;\n },\n ss(d: DateParts) {\n return pad(d.seconds, 2);\n },\n S(d: DateParts) {\n return Math.round(d.milliseconds / 100);\n },\n SS(d: DateParts) {\n return pad(Math.round(d.milliseconds / 10), 2);\n },\n SSS(d: DateParts) {\n return pad(d.milliseconds, 3);\n },\n a(d: DateParts, l: Locale) {\n return d.hours < 12 ? l.amPm[0] : l.amPm[1];\n },\n A(d: DateParts, l: Locale) {\n return d.hours < 12 ? l.amPm[0].toUpperCase() : l.amPm[1].toUpperCase();\n },\n Z() {\n return 'Z';\n },\n ZZ(d: DateParts) {\n const o = d.timezoneOffset;\n return `${o > 0 ? '-' : '+'}${pad(Math.floor(Math.abs(o) / 60), 2)}`;\n },\n ZZZ(d: DateParts) {\n const o = d.timezoneOffset;\n return `${o > 0 ? '-' : '+'}${pad(\n Math.floor(Math.abs(o) / 60) * 100 + (Math.abs(o) % 60),\n 4,\n )}`;\n },\n ZZZZ(d: DateParts) {\n const o = d.timezoneOffset;\n return `${o > 0 ? '-' : '+'}${pad(Math.floor(Math.abs(o) / 60), 2)}:${pad(\n Math.abs(o) % 60,\n 2,\n )}`;\n },\n};\n\n// #endregion Format constants\n\n// #region Parse constants\n\nconst twoDigits = /\\d\\d?/;\nconst threeDigits = /\\d{3}/;\nconst fourDigits = /\\d{4}/;\nconst word =\n /[0-9]*['a-z\\u00A0-\\u05FF\\u0700-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]+|[\\u0600-\\u06FF/]+(\\s*?[\\u0600-\\u06FF]+){1,2}/i;\nconst noop = () => {};\nconst monthUpdate = (arrName: string) => (d: DateParts, v: string, l: any) => {\n const index = l[arrName].indexOf(\n v.charAt(0).toUpperCase() + v.substr(1).toLowerCase(),\n );\n if (~index) {\n d.month = index;\n }\n};\nconst parseFlags: any = {\n D: [\n twoDigits,\n (d: DateParts, v: number) => {\n d.day = v;\n },\n ],\n Do: [\n new RegExp(twoDigits.source + word.source),\n (d: DateParts, v: string) => {\n d.day = parseInt(v, 10);\n },\n ],\n d: [twoDigits, noop],\n W: [word, noop],\n M: [\n twoDigits,\n (d: DateParts, v: number) => {\n d.month = v - 1;\n },\n ],\n MMM: [word, monthUpdate('monthNamesShort')],\n MMMM: [word, monthUpdate('monthNames')],\n YY: [\n twoDigits,\n (d: DateParts, v: number) => {\n const da = new Date();\n const cent = +da.getFullYear().toString().substr(0, 2);\n d.year = +`${v > 68 ? cent - 1 : cent}${v}`;\n },\n ],\n YYYY: [\n fourDigits,\n (d: DateParts, v: number) => {\n d.year = v;\n },\n ],\n S: [\n /\\d/,\n (d: DateParts, v: number) => {\n d.milliseconds = v * 100;\n },\n ],\n SS: [\n /\\d{2}/,\n (d: DateParts, v: number) => {\n d.milliseconds = v * 10;\n },\n ],\n SSS: [\n threeDigits,\n (d: DateParts, v: number) => {\n d.milliseconds = v;\n },\n ],\n h: [\n twoDigits,\n (d: DateParts, v: number) => {\n d.hours = v;\n },\n ],\n m: [\n twoDigits,\n (d: DateParts, v: number) => {\n d.minutes = v;\n },\n ],\n s: [\n twoDigits,\n (d: DateParts, v: number) => {\n d.seconds = v;\n },\n ],\n a: [\n word,\n (d: DateParts, v: string, l: Locale) => {\n const val = v.toLowerCase();\n if (val === l.amPm[0]) {\n d.isPm = false;\n } else if (val === l.amPm[1]) {\n d.isPm = true;\n }\n },\n ],\n Z: [\n /[^\\s]*?[+-]\\d\\d:?\\d\\d|[^\\s]*?Z?/,\n (d: DateParts, v: string) => {\n if (v === 'Z') v = '+00:00';\n const parts = `${v}`.match(/([+-]|\\d\\d)/gi);\n if (parts) {\n const minutes = +parts[1] * 60 + parseInt(parts[2], 10);\n d.timezoneOffset = parts[0] === '+' ? minutes : -minutes;\n }\n },\n ],\n};\nparseFlags.DD = parseFlags.D;\nparseFlags.dd = parseFlags.d;\nparseFlags.WWWW = parseFlags.WWW = parseFlags.WW = parseFlags.W;\nparseFlags.MM = parseFlags.M;\nparseFlags.mm = parseFlags.m;\nparseFlags.hh = parseFlags.H = parseFlags.HH = parseFlags.h;\nparseFlags.ss = parseFlags.s;\nparseFlags.A = parseFlags.a;\nparseFlags.ZZZZ = parseFlags.ZZZ = parseFlags.ZZ = parseFlags.Z;\n\n// #endregion Parse constants\n\nfunction normalizeMasks(masks: string | string[], locale: Locale): string[] {\n return (\n ((arrayHasItems(masks) && masks) || [\n (isString(masks) && masks) || 'YYYY-MM-DD',\n ]) as string[]\n ).map(m =>\n maskMacros.reduce(\n (prev, curr) => prev.replace(curr, locale.masks[curr] || ''),\n m,\n ),\n );\n}\n\nexport function isDateParts(parts: unknown): parts is Partial<DateParts> {\n return (\n isObject(parts) && 'year' in parts && 'month' in parts && 'day' in parts\n );\n}\n\nexport function isDateSource(date: unknown): date is DateSource {\n if (date == null) return false;\n return isString(date) || isNumber(date) || isDate(date);\n}\n\nexport function roundDate(dateMs: number, snapMs = 0) {\n if (snapMs > 0) return new Date(Math.round(dateMs / snapMs) * snapMs);\n return new Date(dateMs);\n}\n\nexport function startOfWeek(date: Date, firstDayOfWeek: DayOfWeek = 1) {\n const day = date.getDay() + 1;\n const daysToAdd =\n day >= firstDayOfWeek\n ? firstDayOfWeek - day\n : -(7 - (firstDayOfWeek - day));\n return addDays(date, daysToAdd);\n}\n\nexport function getStartOfWeek(date: Date, firstDayOfWeek: DayOfWeek = 1) {\n const day = date.getDay() + 1;\n const daysToAdd =\n day >= firstDayOfWeek\n ? firstDayOfWeek - day\n : -(7 - (firstDayOfWeek - day));\n return addDays(date, daysToAdd);\n}\n\nexport function getDayIndex(year: number, month: number, day: number) {\n const utcDate = Date.UTC(year, month - 1, day);\n return diffInDays(new Date(0), new Date(utcDate));\n}\n\nexport function diffInDays(d1: Date, d2: Date) {\n return Math.round((d2.getTime() - d1.getTime()) / MS_PER_DAY);\n}\n\nexport function diffInWeeks(d1: Date, d2: Date) {\n return Math.ceil(diffInDays(startOfWeek(d1), startOfWeek(d2)) / 7);\n}\n\nexport function diffInYears(d1: Date, d2: Date) {\n return d2.getUTCFullYear() - d1.getUTCFullYear();\n}\n\nexport function diffInMonths(d1: Date, d2: Date) {\n return diffInYears(d1, d2) * 12 + (d2.getMonth() - d1.getMonth());\n}\n\nexport function getDateFromParts(\n parts: Partial<SimpleDateParts>,\n timezone = '',\n) {\n const d = new Date();\n const {\n year = d.getFullYear(),\n month = d.getMonth() + 1,\n day = d.getDate(),\n hours: hrs = 0,\n minutes: min = 0,\n seconds: sec = 0,\n milliseconds: ms = 0,\n } = parts;\n\n if (timezone) {\n const localDate = new Date(year, month - 1, day, hrs, min, sec, ms);\n return fromZonedTime(localDate, timezone);\n }\n return new Date(year, month - 1, day, hrs, min, sec, ms);\n}\n\nexport function getTimezoneOffset(\n parts: Partial<SimpleDateParts>,\n timezone = '',\n) {\n const {\n year: y = 0,\n month: m = 0,\n day: d = 0,\n hours: hrs = 0,\n minutes: min = 0,\n seconds: sec = 0,\n milliseconds: ms = 0,\n } = parts;\n let date;\n const utcDate = new Date(Date.UTC(y, m - 1, d, hrs, min, sec, ms));\n if (timezone) {\n date = fromZonedTime(new Date(y, m - 1, d, hrs, min, sec, ms), timezone);\n } else {\n date = new Date(y, m - 1, d, hrs, min, sec, ms);\n }\n return (date.getTime() - utcDate.getTime()) / 60000;\n}\n\nexport function getDateParts(\n date: Date,\n locale: Locale,\n timezone = locale.timezone,\n): DateParts {\n const tzDate = timezone\n ? toZonedTime(date, timezone)\n : new Date(date.getTime());\n const milliseconds = tzDate.getMilliseconds();\n const seconds = tzDate.getSeconds();\n const minutes = tzDate.getMinutes();\n const hours = tzDate.getHours();\n const time =\n milliseconds +\n seconds * MS_PER_SECOND +\n minutes * MS_PER_MINUTE +\n hours * MS_PER_HOUR;\n const month = <MonthInYear>(tzDate.getMonth() + 1);\n const year = tzDate.getFullYear();\n const monthParts = locale.getMonthParts(month, year);\n const day = <DayInMonth>tzDate.getDate();\n const dayFromEnd = monthParts.numDays - day + 1;\n const weekday = tzDate.getDay() + 1;\n const weekdayOrdinal = Math.floor((day - 1) / 7 + 1);\n const weekdayOrdinalFromEnd = Math.floor((monthParts.numDays - day) / 7 + 1);\n const week = Math.ceil(\n (day + Math.abs(monthParts.firstWeekday - monthParts.firstDayOfWeek)) / 7,\n );\n const weekFromEnd = monthParts.numWeeks - week + 1;\n const weeknumber = monthParts.weeknumbers[week];\n const dayIndex = getDayIndex(year, month, day);\n const parts: DateParts = {\n milliseconds,\n seconds,\n minutes,\n hours,\n time,\n day,\n dayFromEnd,\n weekday,\n weekdayOrdinal,\n weekdayOrdinalFromEnd,\n week,\n weekFromEnd,\n weeknumber,\n month,\n year,\n date: tzDate,\n dateTime: tzDate.getTime(),\n dayIndex,\n timezoneOffset: 0,\n isValid: true,\n };\n return parts;\n}\n\nexport function getMonthPartsKey(\n month: number,\n year: number,\n firstDayOfWeek: DayOfWeek,\n) {\n return `${year}-${month}-${firstDayOfWeek}`;\n}\n\nexport function getMonthParts(\n month: number,\n year: number,\n firstDayOfWeek: DayOfWeek,\n) {\n const inLeapYear = (year % 4 === 0 && year % 100 !== 0) || year % 400 === 0;\n const firstDayOfMonth = new Date(year, month - 1, 1);\n const firstWeekday = firstDayOfMonth.getDay() + 1;\n const numDays = month === 2 && inLeapYear ? 29 : daysInMonths[month - 1];\n const weekStartsOn: WeekStartsOn = (firstDayOfWeek - 1) as WeekStartsOn;\n const numWeeks = getWeeksInMonth(firstDayOfMonth, {\n weekStartsOn,\n });\n const weeknumbers = [];\n const isoWeeknumbers = [];\n for (let i = 0; i < numWeeks; i++) {\n const date = addDays(firstDayOfMonth, i * 7);\n weeknumbers.push(getWeek(date, { weekStartsOn }));\n isoWeeknumbers.push(getISOWeek(date));\n }\n return {\n firstDayOfWeek,\n firstDayOfMonth,\n inLeapYear,\n firstWeekday,\n numDays,\n numWeeks,\n month,\n year,\n weeknumbers,\n isoWeeknumbers,\n };\n}\n\nexport function getWeekdayDates() {\n const dates = [];\n const year = 2020;\n const month = 1;\n const day = 5;\n for (let i = 0; i < daysInWeek; i++) {\n dates.push(\n getDateFromParts({\n year,\n month,\n day: day + i,\n hours: 12,\n }),\n );\n }\n return dates;\n}\n\nexport function getDayNames(\n length: DayNameLength,\n localeId: string | undefined = undefined,\n) {\n const dtf = new Intl.DateTimeFormat(localeId, {\n weekday: length,\n });\n return getWeekdayDates().map(d => dtf.format(d));\n}\n\nexport function getHourDates() {\n const dates = [];\n for (let i = 0; i <= 24; i++) {\n dates.push(new Date(2000, 0, 1, i));\n }\n return dates;\n}\n\nexport function getRelativeTimeNames(localeId = undefined): TimeNames {\n const units: Intl.RelativeTimeFormatUnit[] = [\n 'second',\n 'minute',\n 'hour',\n 'day',\n 'week',\n 'month',\n 'quarter',\n 'year',\n ];\n const rtf = new Intl.RelativeTimeFormat(localeId);\n return units.reduce<TimeNames>((names, unit) => {\n const parts = rtf.formatToParts(100, unit);\n // @ts-ignore\n names[unit] = parts[1].unit;\n return names;\n }, {});\n}\n\nexport function getMonthDates() {\n const dates = [];\n for (let i = 0; i < 12; i++) {\n dates.push(new Date(2000, i, 15));\n }\n return dates;\n}\n\nexport function getMonthNames(length: MonthNameLength, localeId = undefined) {\n const dtf = new Intl.DateTimeFormat(localeId, {\n month: length,\n timeZone: 'UTC',\n });\n return getMonthDates().map(d => dtf.format(d));\n}\n\nexport function datePartIsValid(\n part: number,\n rule: DatePartsRule,\n parts: DateParts,\n): boolean {\n if (isNumber(rule)) return rule === part;\n if (isArray(rule)) return (rule as number[]).includes(part);\n if (isFunction(rule)) return rule(part, parts);\n if (rule.min != null && rule.min > part) return false;\n if (rule.max != null && rule.max < part) return false;\n if (rule.interval != null && part % rule.interval !== 0) return false;\n return true;\n}\n\nexport function getDatePartOptions(\n parts: DateParts,\n range: DatePartsRange,\n rule: DatePartsRule | undefined,\n) {\n const options: DatePartOption[] = [];\n const [min, max, padding] = range;\n for (let i = min; i <= max; i++) {\n if (rule == null || datePartIsValid(i, rule, parts)) {\n options.push({\n value: i,\n label: pad(i, padding),\n });\n }\n }\n return options;\n}\n\nexport function getDatePartsOptions(parts: DateParts, rules: DatePartsRules) {\n return {\n milliseconds: getDatePartOptions(\n parts,\n DATE_PART_RANGES.milliseconds,\n rules.milliseconds,\n ),\n seconds: getDatePartOptions(parts, DATE_PART_RANGES.seconds, rules.seconds),\n minutes: getDatePartOptions(parts, DATE_PART_RANGES.minutes, rules.minutes),\n hours: getDatePartOptions(parts, DATE_PART_RANGES.hours, rules.hours),\n };\n}\n\nexport function getNearestDatePart(\n parts: DateParts,\n range: DatePartsRange,\n value: number,\n rule: DatePartsRule,\n) {\n const options = getDatePartOptions(parts, range, rule);\n const result = options.reduce((prev, opt) => {\n if (opt.disabled) return prev;\n if (isNaN(prev)) return opt.value;\n const diffPrev = Math.abs(prev - value);\n const diffCurr = Math.abs(opt.value - value);\n return diffCurr < diffPrev ? opt.value : prev;\n }, NaN);\n return isNaN(result) ? value : result;\n}\n\nexport function applyRulesForDateParts(\n dateParts: DateParts,\n rules: DatePartsRules,\n) {\n const result = <DateParts>{ ...dateParts };\n Object.entries(rules).forEach(([key, rule]) => {\n const range = DATE_PART_RANGES[key as TimePartsKey];\n const value = dateParts[key as TimePartsKey];\n result[key as TimePartsKey] = getNearestDatePart(\n dateParts,\n range,\n value,\n rule,\n );\n });\n return result;\n}\n\nexport function parseDate(\n dateString: string,\n mask: string | string[],\n locale: Locale,\n) {\n const masks = normalizeMasks(mask, locale);\n return (\n masks\n .map(m => {\n if (typeof m !== 'string') {\n throw new Error('Invalid mask');\n }\n // Reset string value\n let str = dateString;\n // Avoid regular expression denial of service, fail early for really long strings\n // https://www.owasp.org/index.php/Regular_expression_Denial_of_Service_-_ReDoS\n if (str.length > 1000) {\n return false;\n }\n\n let isValid = true;\n const dp: Partial<DateParts> = {};\n m.replace(token, $0 => {\n if (parseFlags[$0]) {\n const info = parseFlags[$0];\n const index = str.search(info[0]);\n if (!~index) {\n isValid = false;\n } else {\n str.replace(info[0], result => {\n info[1](dp, result, locale);\n str = str.substr(index + result.length);\n return result;\n });\n }\n }\n\n return parseFlags[$0] ? '' : $0.slice(1, $0.length - 1);\n });\n\n if (!isValid) {\n return false;\n }\n\n const today = new Date();\n if (dp.hours != null) {\n if (dp.isPm === true && +dp.hours !== 12) {\n dp.hours = +dp.hours + 12;\n } else if (dp.isPm === false && +dp.hours === 12) {\n dp.hours = 0;\n }\n }\n\n let date;\n if (dp.timezoneOffset != null) {\n dp.minutes = +(dp.minutes || 0) - +dp.timezoneOffset;\n date = new Date(\n Date.UTC(\n dp.year || today.getFullYear(),\n dp.month || 0,\n dp.day || 1,\n dp.hours || 0,\n dp.minutes || 0,\n dp.seconds || 0,\n dp.milliseconds || 0,\n ),\n );\n } else {\n date = locale.getDateFromParts({\n year: dp.year || today.getFullYear(),\n month: (dp.month || 0) + 1,\n day: dp.day || 1,\n hours: dp.hours || 0,\n minutes: dp.minutes || 0,\n seconds: dp.seconds || 0,\n milliseconds: dp.milliseconds || 0,\n });\n }\n return date;\n })\n .find(d => d) || parseIsoDate(dateString, locale)\n );\n}\n\nfunction parseIsoDate(dateString: string, locale: Locale): Date {\n const match =\n /^(\\d{4})-(\\d{2})-(\\d{2})(?:T(\\d{2}):(\\d{2})(?::(\\d{2})(?:\\.(\\d{1,3}))?)?(Z|[+-]\\d{2}:?\\d{2})?)?$/.exec(\n dateString,\n );\n if (!match) return new Date(NaN);\n\n const [, year, month, day, hours, minutes, seconds, fraction, zone] = match;\n const parts = {\n year: Number(year),\n month: Number(month),\n day: Number(day),\n hours: Number(hours ?? 0),\n minutes: Number(minutes ?? 0),\n seconds: Number(seconds ?? 0),\n milliseconds: Number((fraction ?? '').padEnd(3, '0')),\n };\n\n const validationDate = new Date(\n Date.UTC(\n parts.year,\n parts.month - 1,\n parts.day,\n parts.hours,\n parts.minutes,\n parts.seconds,\n parts.milliseconds,\n ),\n );\n if (\n validationDate.getUTCFullYear() !== parts.year ||\n validationDate.getUTCMonth() !== parts.month - 1 ||\n validationDate.getUTCDate() !== parts.day ||\n validationDate.getUTCHours() !== parts.hours ||\n validationDate.getUTCMinutes() !== parts.minutes ||\n validationDate.getUTCSeconds() !== parts.seconds\n ) {\n return new Date(NaN);\n }\n\n if (!zone) return locale.getDateFromParts(parts);\n\n let offsetMinutes = 0;\n if (zone !== 'Z') {\n const sign = zone.startsWith('-') ? -1 : 1;\n const normalized = zone.slice(1).replace(':', '');\n offsetMinutes =\n sign *\n (Number(normalized.slice(0, 2)) * 60 + Number(normalized.slice(2)));\n }\n return new Date(validationDate.getTime() - offsetMinutes * MS_PER_MINUTE);\n}\n\nexport function formatDate(\n date: Date,\n masks: string | string[],\n locale: Locale,\n) {\n if (date == null) return '';\n let mask = normalizeMasks(masks, locale)[0];\n const timezone = /Z$/.test(mask) ? 'UTC' : locale.timezone;\n const literals: string[] = [];\n // Make literals inactive by replacing them with ??\n mask = mask.replace(literal, ($0, $1: string) => {\n literals.push($1);\n return '??';\n });\n const dateParts = getDateParts(date, locale, timezone);\n // Apply formatting rules\n mask = mask.replace(token, $0 =>\n $0 in formatFlags\n ? formatFlags[$0](dateParts, locale)\n : $0.slice(1, $0.length - 1),\n );\n // Inline literal values back into the formatted value\n return mask.replace(/\\?\\?/g, () => literals.shift()!);\n}\n","import type { Placement } from '@popperjs/core';\nimport { addDays } from './date/helpers';\nimport { DateRange, type DateRangeSource } from './date/range';\nimport {\n Bar,\n BarConfig,\n Content,\n ContentConfig,\n Dot,\n DotConfig,\n Highlight,\n HighlightConfig,\n Profile,\n} from './glyph';\nimport { arrayHasItems } from './helpers';\nimport Locale from './locale';\nimport type { PopoverVisibility } from './popovers';\nimport { Theme } from './theme';\n\nexport type PopoverConfig = Partial<{\n label: string;\n visibility: PopoverVisibility;\n placement: Placement;\n hideIndicator: boolean;\n isInteractive: boolean;\n}>;\n\nexport type EventConfig = Partial<{\n label: string;\n}>;\n\nexport type AttributeConfig = Partial<{\n key: string | number;\n hashcode: string;\n content: ContentConfig;\n highlight: HighlightConfig;\n dot: DotConfig;\n bar: BarConfig;\n popover: PopoverConfig;\n event: EventConfig;\n dates: DateRangeSource[];\n customData: any;\n order: number;\n pinPage: boolean;\n}>;\n\nlet attrKey = 0;\n\nexport class Attribute {\n key: string | number = '';\n hashcode = '';\n highlight: Profile<Highlight> | null = null;\n content: Profile<Content> | null = null;\n dot: Profile<Dot> | null = null;\n bar: Profile<Bar> | null = null;\n event: EventConfig | null = null;\n popover: PopoverConfig | null = null;\n customData: any = null;\n ranges: DateRange[];\n hasRanges = false;\n order = 0;\n pinPage = false;\n maxRepeatSpan = 0;\n locale: Locale;\n\n constructor(config: Partial<AttributeConfig>, theme: Theme, locale: Locale) {\n const { dates } = Object.assign(\n this,\n { hashcode: '', order: 0, pinPage: false },\n config,\n );\n this.key ||= ++attrKey;\n this.locale = locale;\n // Normalize attribute\n theme.normalizeGlyphs(this);\n // Assign dates\n this.ranges = locale.ranges(dates ?? []);\n this.hasRanges = !!arrayHasItems(this.ranges);\n this.maxRepeatSpan = this.ranges\n .filter(r => r.hasRepeat)\n .map(r => r.daySpan)\n .reduce((res, curr) => Math.max(res, curr), 0);\n }\n\n intersectsRange({ start, end }: DateRange) {\n if (start == null || end == null) return false;\n const simpleRanges = this.ranges.filter(r => !r.hasRepeat);\n for (const range of simpleRanges) {\n if (range.intersectsDayRange(start.dayIndex, end.dayIndex)) {\n return true;\n }\n }\n const repeatRanges = this.ranges.filter(r => r.hasRepeat);\n if (!repeatRanges.length) return false;\n let day = start;\n if (this.maxRepeatSpan > 1) {\n day = this.locale.getDateParts(addDays(day.date, -this.maxRepeatSpan));\n }\n while (day.dayIndex <= end.dayIndex) {\n for (const range of repeatRanges) {\n if (range.startsOnDay(day)) return true;\n }\n day = this.locale.getDateParts(addDays(day.date, 1));\n }\n return false;\n }\n}\n","import type { Placement } from '@popperjs/core';\nimport type { ComponentPublicInstance, Directive, DirectiveBinding } from 'vue';\nimport { elementContains, on, resolveDocument, resolveEl } from './helpers';\n\nexport type PopoverVisibility = 'click' | 'hover' | 'hover-focus' | 'focus';\n\nexport interface PopoverOptions {\n id: PropertyKey;\n visibility: PopoverVisibility;\n isInteractive: boolean;\n autoHide: boolean;\n force: boolean;\n target: unknown;\n placement: Placement;\n modifiers: any;\n data: any;\n showDelay: number;\n hideDelay: number;\n}\n\nexport interface PopoverState {\n isVisible: boolean;\n target: unknown;\n data: any;\n transition: string;\n placement: Placement;\n direction: string;\n positionFixed: false;\n modifiers: any[];\n isInteractive: boolean;\n visibility: PopoverVisibility;\n isHovered: boolean;\n isFocused: boolean;\n autoHide: boolean;\n force: boolean;\n}\n\nexport interface PopoverEvent {\n detail: Partial<PopoverOptions>;\n}\n\nexport interface PopoverEventHandlers {\n click: (e: MouseEvent) => void;\n mousemove: (e: MouseEvent) => void;\n mouseleave: (e: MouseEvent) => void;\n focusin: (e: MouseEvent) => void;\n focusout: (e: MouseEvent) => void;\n}\n\nfunction dispatchPopoverEvent(\n name: 'show-popover' | 'hide-popover' | 'toggle-popover',\n opts: Partial<PopoverOptions>,\n) {\n const ownerDocument = resolveDocument(opts.target);\n const CustomEventConstructor = ownerDocument?.defaultView?.CustomEvent;\n if (!ownerDocument || !CustomEventConstructor) return;\n ownerDocument.dispatchEvent(\n new CustomEventConstructor(name, {\n detail: opts,\n }),\n );\n}\n\nexport function showPopover(opts: Partial<PopoverOptions>) {\n dispatchPopoverEvent('show-popover', opts);\n}\n\nexport function hidePopover(opts: Partial<PopoverOptions>) {\n dispatchPopoverEvent('hide-popover', opts);\n}\n\nexport function togglePopover(opts: Partial<PopoverOptions>) {\n dispatchPopoverEvent('toggle-popover', opts);\n}\n\nexport function getPopoverEventHandlers(\n opts: Partial<PopoverOptions>,\n): Partial<PopoverEventHandlers> {\n const { visibility } = opts;\n const click = visibility === 'click';\n const hover = visibility === 'hover';\n const hoverFocus = visibility === 'hover-focus';\n const focus = visibility === 'focus';\n opts.autoHide = !click;\n let hovered = false;\n let focused = false;\n\n const clickHandler = (e: MouseEvent) => {\n if (click) {\n togglePopover({\n ...opts,\n target: opts.target || (e.currentTarget as HTMLElement),\n });\n e.stopPropagation();\n }\n };\n const mouseMoveHandler = (e: MouseEvent) => {\n if (!hovered) {\n hovered = true;\n if (hover || hoverFocus) {\n showPopover({\n ...opts,\n target: opts.target || (e.currentTarget as HTMLElement),\n });\n }\n }\n };\n const mouseLeaveHandler = (e: MouseEvent) => {\n if (hovered) {\n hovered = false;\n if (hover || (hoverFocus && !focused)) {\n hidePopover({\n ...opts,\n target: opts.target || (e.currentTarget as HTMLElement),\n });\n }\n }\n };\n const focusInHandler = (e: FocusEvent) => {\n if (!focused) {\n focused = true;\n if (focus || hoverFocus) {\n showPopover({\n ...opts,\n target: opts.target || (e.currentTarget as HTMLElement),\n });\n }\n }\n };\n const focusOutHandler = (e: FocusEvent) => {\n if (\n focused &&\n !elementContains(e.currentTarget as Node, e.relatedTarget as Element)\n ) {\n focused = false;\n if (focus || (hoverFocus && !hovered)) {\n hidePopover({\n ...opts,\n target: opts.target || (e.currentTarget as HTMLElement),\n });\n }\n }\n };\n\n const handlers: Record<string, Function> = {};\n switch (opts.visibility) {\n case 'click':\n handlers.click = clickHandler;\n break;\n case 'hover':\n handlers.mousemove = mouseMoveHandler;\n handlers.mouseleave = mouseLeaveHandler;\n break;\n case 'focus':\n handlers.focusin = focusInHandler;\n handlers.focusout = focusOutHandler;\n break;\n case 'hover-focus':\n handlers.mousemove = mouseMoveHandler;\n handlers.mouseleave = mouseLeaveHandler;\n handlers.focusin = focusInHandler;\n handlers.focusout = focusOutHandler;\n break;\n }\n return handlers;\n}\n\nconst removeHandlers = (target: Element | ComponentPublicInstance | string) => {\n const el = resolveEl(target);\n if (el == null) return;\n const handlers = (el as any).popoverHandlers;\n if (!handlers || !handlers.length) return;\n handlers.forEach((handler: Function) => handler());\n delete (el as any).popoverHandlers;\n};\n\nconst addHandlers = (\n target: Element | ComponentPublicInstance | string,\n opts: Partial<PopoverOptions>,\n) => {\n const el = resolveEl(target);\n if (el == null) return;\n const remove: Function[] = [];\n const handlers = getPopoverEventHandlers(opts);\n Object.entries(handlers).forEach(([event, handler]) => {\n remove.push(on(el, event, handler as EventListener));\n });\n (el as any).popoverHandlers = remove;\n};\n\nexport const popoverDirective: Directive = {\n mounted(el: any, binding: DirectiveBinding<PopoverOptions>) {\n const { value } = binding;\n if (!value) return;\n addHandlers(el, value);\n },\n updated(el: any, binding: DirectiveBinding<PopoverOptions>) {\n const { oldValue, value } = binding;\n const oldVisibility = oldValue?.visibility;\n const newVisibility = value?.visibility;\n if (oldVisibility !== newVisibility) {\n if (oldVisibility) {\n removeHandlers(el);\n if (!newVisibility) hidePopover({ ...oldValue, target: el });\n }\n if (newVisibility) {\n addHandlers(el, value);\n }\n }\n },\n unmounted(el: Element, binding: DirectiveBinding<PopoverOptions>) {\n const { value } = binding;\n removeHandlers(el);\n hidePopover({ ...value, target: el, hideDelay: 0, force: true });\n },\n};\n","import { isFunction, off, on } from './helpers';\nimport type { CustomElement } from './helpers';\n\ninterface SwipeHandlerOptions {\n maxSwipeTime: number;\n minHorizontalSwipeDistance: number;\n maxVerticalSwipeDistance: number;\n}\n\nexport const addHorizontalSwipeHandler = (\n element: CustomElement,\n handler: Function,\n {\n maxSwipeTime,\n minHorizontalSwipeDistance,\n maxVerticalSwipeDistance,\n }: SwipeHandlerOptions,\n) => {\n if (!element || !element.addEventListener || !isFunction(handler)) {\n return null;\n }\n // State variables\n let startX = 0;\n let startY = 0;\n let startTime: number | null = null;\n let isSwiping = false;\n function pointerStart(event: PointerEvent) {\n if (!event.isPrimary || event.pointerType === 'mouse') return;\n startX = event.screenX;\n startY = event.screenY;\n startTime = Date.now();\n isSwiping = true;\n }\n\n function pointerEnd(event: PointerEvent) {\n if (!isSwiping || !startTime) return;\n isSwiping = false;\n const deltaX = event.screenX - startX;\n const deltaY = event.screenY - startY;\n const deltaTime = Date.now() - startTime;\n if (deltaTime < maxSwipeTime) {\n if (\n Math.abs(deltaX) >= minHorizontalSwipeDistance &&\n Math.abs(deltaY) <= maxVerticalSwipeDistance\n ) {\n const arg = { toLeft: false, toRight: false };\n if (deltaX < 0) {\n // Swipe to the left\n arg.toLeft = true;\n } else {\n // Swipe to the right\n arg.toRight = true;\n }\n handler(arg);\n }\n }\n }\n\n function pointerCancel() {\n isSwiping = false;\n }\n\n on(element, 'pointerdown', pointerStart, { passive: true });\n on(element, 'pointerup', pointerEnd, { passive: true });\n on(element, 'pointercancel', pointerCancel, { passive: true });\n\n return () => {\n off(element, 'pointerdown', pointerStart);\n off(element, 'pointerup', pointerEnd);\n off(element, 'pointercancel', pointerCancel);\n };\n};\n","export const createWatcherController = () => {\n const watchSkippers: Partial<Record<string, number>> = {};\n\n const skipWatcher = (watcher: string, durationMs = 10) => {\n watchSkippers[watcher] = Date.now() + durationMs;\n };\n\n const unskipWatcher = (watcher: string) => {\n delete watchSkippers[watcher];\n };\n\n const handleWatcher = (watcher: string, handler: Function) => {\n if (watcher in watchSkippers) {\n const dateTime = watchSkippers[watcher] as number;\n if (Date.now() < dateTime) return;\n delete watchSkippers[watcher];\n }\n handler();\n };\n\n return { skipWatcher, unskipWatcher, handleWatcher };\n};\n\nconst defaultController = createWatcherController();\n\nexport const { skipWatcher, unskipWatcher, handleWatcher } = defaultController;\n","import { Attribute } from './attribute';\nimport type { DateRangeCell } from './date/range';\nimport { defaultsDeep, hasAny, isObject, isString } from './helpers';\n\ntype GlyphTarget = 'base' | 'start' | 'end' | 'startEnd';\ntype ThemeProp =\n | 'class'\n | 'wrapperClass'\n | 'contentClass'\n | 'style'\n | 'contentStyle'\n | 'color'\n | 'fillMode';\n\nconst targetProps: GlyphTarget[] = ['base', 'start', 'end', 'startEnd'];\nconst displayProps: ThemeProp[] = [\n 'class',\n 'wrapperClass',\n 'contentClass',\n 'style',\n 'contentStyle',\n 'color',\n 'fillMode',\n];\n\nexport interface Glyph {\n key: string | number;\n color: string;\n class: string | any[];\n style: Record<string, any>;\n}\n\nexport interface Profile<T> {\n start: T;\n base: T;\n end: T;\n startEnd?: T;\n}\n\n// Highlights\nexport type HighlightFillMode = 'solid' | 'light' | 'outline';\nexport interface Highlight extends Glyph {\n fillMode: HighlightFillMode;\n wrapperClass: string | any[];\n contentClass: string | any[];\n contentStyle: Record<string, any>;\n}\nexport type HighlightConfig =\n | boolean\n | string\n | Partial<Highlight | Profile<Partial<Highlight>>>;\n\n// Dots\nexport type Dot = Glyph;\nexport type DotConfig = boolean | string | Partial<Dot | Profile<Partial<Dot>>>;\n\n// Bars\nexport type Bar = Glyph;\nexport type BarConfig = boolean | string | Partial<Bar | Profile<Partial<Bar>>>;\n\n// Content\nexport type Content = Glyph;\nexport type ContentConfig =\n | string\n | Partial<Content | Profile<Partial<Content>>>;\n\nconst _defaultProfile = { base: {}, start: {}, end: {} };\n\nfunction normalizeConfig(\n color: string,\n config: any,\n defaultProfile: any = _defaultProfile,\n): Profile<Glyph> {\n let rootColor = color;\n let root: any = {};\n // Get the normalized root config\n if (config === true || isString(config)) {\n // Assign default color for booleans or strings\n rootColor = isString(config) ? config : rootColor;\n // Set the default root\n root = { ...defaultProfile };\n } else if (isObject(config)) {\n if (hasAny(config as Record<string, any>, targetProps)) {\n // Mixin target configs\n root = { ...config };\n } else {\n // Mixin display configs\n root = {\n base: { ...(config as Record<string, any>) },\n start: { ...(config as Record<string, any>) },\n end: { ...(config as Record<string, any>) },\n };\n }\n }\n // Fill in missing targets\n const result = defaultsDeep(\n root,\n { start: root.startEnd, end: root.startEnd },\n defaultProfile,\n ) as Profile<any>;\n // Normalize each target\n Object.entries(result).forEach(([targetType, targetConfig]) => {\n let targetColor = rootColor;\n if (targetConfig === true || isString(targetConfig)) {\n targetColor = isString(targetConfig) ? targetConfig : targetColor;\n // @ts-ignore\n result[targetType] = { color: targetColor };\n } else if (isObject(targetConfig)) {\n if (hasAny(targetConfig, displayProps)) {\n // @ts-ignore\n result[targetType] = { ...targetConfig };\n } else {\n // @ts-ignore\n result[targetType] = {};\n }\n }\n // Set the theme color if it is missing\n // @ts-ignore\n defaultsDeep(result[targetType], { color: targetColor });\n });\n return result;\n}\n\nexport interface GlyphRenderer<P extends Partial<Glyph>> {\n type: string;\n normalizeConfig(color: string, config: any): Profile<P>;\n prepareRender(glyphs: Record<string, P[]>): void;\n render(attr: DateRangeCell<Attribute>, glyphs: Record<string, P[]>): void;\n}\n\nexport class HighlightRenderer implements GlyphRenderer<Highlight> {\n type = 'highlight';\n\n normalizeConfig(color: string, config: any) {\n return normalizeConfig(color, config, {\n base: { fillMode: 'light' },\n start: { fillMode: 'solid' },\n end: { fillMode: 'solid' },\n }) as Profile<Highlight>;\n }\n\n prepareRender(glyphs: Record<string, Glyph[]>) {\n glyphs.highlights = [];\n if (!glyphs.content) glyphs.content = [];\n }\n\n render(\n { data, onStart, onEnd }: DateRangeCell<Attribute>,\n glyphs: Record<string, Highlight[]>,\n ) {\n const { key, highlight } = data;\n if (!highlight) return;\n const { highlights } = glyphs;\n const { base, start, end } = highlight;\n if (onStart && onEnd) {\n highlights.push({\n ...start,\n key,\n wrapperClass: `vc-day-layer vc-day-box-center-center vc-attr vc-${start.color}`,\n class: [`vc-highlight vc-highlight-bg-${start.fillMode}`, start.class],\n contentClass: [\n `vc-attr vc-highlight-content-${start.fillMode} vc-${start.color}`,\n start.contentClass,\n ],\n });\n } else if (onStart) {\n highlights.push({\n ...base,\n key: `${key}-base`,\n wrapperClass: `vc-day-layer vc-day-box-right-center vc-attr vc-${base.color}`,\n class: [\n `vc-highlight vc-highlight-base-start vc-highlight-bg-${base.fillMode}`,\n base.class,\n ],\n });\n highlights.push({\n ...start,\n key,\n wrapperClass: `vc-day-layer vc-day-box-center-center vc-attr vc-${start.color}`,\n class: [`vc-highlight vc-highlight-bg-${start.fillMode}`, start.class],\n contentClass: [\n `vc-attr vc-highlight-content-${start.fillMode} vc-${start.color}`,\n start.contentClass,\n ],\n });\n } else if (onEnd) {\n highlights.push({\n ...base,\n key: `${key}-base`,\n wrapperClass: `vc-day-layer vc-day-box-left-center vc-attr vc-${base.color}`,\n class: [\n `vc-highlight vc-highlight-base-end vc-highlight-bg-${base.fillMode}`,\n base.class,\n ],\n });\n highlights.push({\n ...end,\n key,\n wrapperClass: `vc-day-layer vc-day-box-center-center vc-attr vc-${end.color}`,\n class: [`vc-highlight vc-highlight-bg-${end.fillMode}`, end.class],\n contentClass: [\n `vc-attr vc-highlight-content-${end.fillMode} vc-${end.color}`,\n end.contentClass,\n ],\n });\n } else {\n highlights.push({\n ...base,\n key: `${key}-middle`,\n wrapperClass: `vc-day-layer vc-day-box-center-center vc-attr vc-${base.color}`,\n class: [\n `vc-highlight vc-highlight-base-middle vc-highlight-bg-${base.fillMode}`,\n base.class,\n ],\n contentClass: [\n `vc-attr vc-highlight-content-${base.fillMode} vc-${base.color}`,\n base.contentClass,\n ],\n });\n }\n }\n}\n\nexport class BaseRenderer<T extends Partial<Glyph>>\n implements GlyphRenderer<T>\n{\n type = '';\n collectionType = '';\n\n constructor(type: string, collectionType: string) {\n this.type = type;\n this.collectionType = collectionType;\n }\n\n normalizeConfig(color: string, config: any) {\n return normalizeConfig(color, config) as Profile<T>;\n }\n\n prepareRender(glyphs: Record<string, T[]>) {\n glyphs[this.collectionType] = [];\n }\n\n render(\n { data, onStart, onEnd }: DateRangeCell<Attribute>,\n glyphs: Record<string, T[]>,\n ) {\n const { key } = data;\n const item = data[this.type as keyof Attribute];\n if (!key || !item) {\n return;\n }\n const collection = glyphs[this.collectionType];\n const { base, start, end } = item;\n if (onStart) {\n collection.push({\n ...start,\n key,\n class: [\n `vc-${this.type} vc-${this.type}-start vc-${start.color} vc-attr`,\n start.class,\n ],\n });\n } else if (onEnd) {\n collection.push({\n ...end,\n key,\n class: [\n `vc-${this.type} vc-${this.type}-end vc-${end.color} vc-attr`,\n end.class,\n ],\n });\n } else {\n collection.push({\n ...base,\n key,\n class: [\n `vc-${this.type} vc-${this.type}-base vc-${base.color} vc-attr`,\n base.class,\n ],\n });\n }\n }\n}\n\nexport class ContentRenderer extends BaseRenderer<Content> {\n constructor() {\n super('content', 'content');\n }\n\n normalizeConfig(_: string, config: any) {\n return normalizeConfig('base', config) as Profile<Content>;\n }\n}\n\nexport class DotRenderer extends BaseRenderer<Dot> {\n constructor() {\n super('dot', 'dots');\n }\n}\n\nexport class BarRenderer extends BaseRenderer<Dot> {\n constructor() {\n super('bar', 'bars');\n }\n}\n","import type { DateRangeCell } from './date/range';\nimport { Attribute } from './attribute';\nimport {\n type Bar,\n BarRenderer,\n type Content,\n ContentRenderer,\n type Dot,\n DotRenderer,\n type Glyph,\n type GlyphRenderer,\n type Highlight,\n HighlightRenderer,\n} from './glyph';\n\nexport interface Glyphs {\n highlights: Highlight[];\n dots: Dot[];\n bars: Bar[];\n content: Content[];\n}\n\nexport class Theme {\n color: string;\n renderers: GlyphRenderer<Glyph>[] = [\n new ContentRenderer(),\n new HighlightRenderer(),\n new DotRenderer(),\n new BarRenderer(),\n ];\n\n constructor(color: string) {\n this.color = color;\n }\n\n normalizeGlyphs(attr: Attribute) {\n this.renderers.forEach(renderer => {\n const type = renderer.type as keyof Attribute;\n if (attr[type] != null) {\n // @ts-ignore\n attr[type] = renderer.normalizeConfig(this.color, attr[type]);\n }\n });\n }\n\n prepareRender(glyphs: Partial<Glyphs> = {}) {\n this.renderers.forEach(renderer => {\n renderer.prepareRender(glyphs);\n });\n return glyphs;\n }\n\n render(cell: DateRangeCell<Attribute>, glyphs: Partial<Glyphs>) {\n this.renderers.forEach(renderer => {\n renderer.render(cell, glyphs);\n });\n }\n}\n","import {\n type ComputedRef,\n type Ref,\n computed,\n getCurrentInstance,\n onMounted,\n onUnmounted,\n ref,\n watch,\n} from 'vue';\n\nexport interface DarkModeClassConfig {\n selector?: string;\n darkClass?: string;\n}\n\nexport type DarkModeConfig = boolean | 'system' | DarkModeClassConfig;\n\ninterface DisplayModeState {\n isDark: Ref<boolean>;\n displayMode: ComputedRef<'dark' | 'light'>;\n}\n\ntype LegacyMediaQueryList = MediaQueryList & {\n addListener?: (listener: (event: MediaQueryListEvent) => void) => void;\n removeListener?: (listener: (event: MediaQueryListEvent) => void) => void;\n};\n\nfunction getElementTheme(element: Element): 'dark' | 'light' | null {\n const attributeTheme =\n element.getAttribute('data-bs-theme') ?? element.getAttribute('data-theme');\n if (attributeTheme === 'dark' || attributeTheme === 'light') {\n return attributeTheme;\n }\n\n const colorScheme = (element as HTMLElement).style?.colorScheme\n ?.trim()\n .toLowerCase();\n if (!colorScheme) return null;\n\n const supportsDark = colorScheme.split(/\\s+/).includes('dark');\n const supportsLight = colorScheme.split(/\\s+/).includes('light');\n if (supportsDark === supportsLight) return null;\n return supportsDark ? 'dark' : 'light';\n}\n\nfunction getAncestorTheme(\n element: Element | null,\n documentElement: Element,\n): 'dark' | 'light' | null {\n for (let current = element; current; current = current.parentElement) {\n const theme = getElementTheme(current);\n if (theme) return theme;\n }\n return getElementTheme(documentElement);\n}\n\nexport function useDisplayMode(config: Ref<DarkModeConfig>): DisplayModeState {\n const instance = getCurrentInstance();\n const isDark = ref(false);\n const displayMode = computed(() => (isDark.value ? 'dark' : 'light'));\n\n let mounted = false;\n let mediaQuery: LegacyMediaQueryList | null = null;\n let mutationObserver: MutationObserver | null = null;\n\n const mediaListener = (event: MediaQueryListEvent) => {\n isDark.value = event.matches;\n };\n\n function getRootNode(): Node | null {\n return (instance?.proxy?.$el as Node | undefined) ?? null;\n }\n\n function getOwnerDocument(): Document | null {\n return (\n getRootNode()?.ownerDocument ??\n (typeof document === 'undefined' ? null : document)\n );\n }\n\n function removeMediaQuery() {\n if (!mediaQuery) return;\n if (mediaQuery.removeEventListener) {\n mediaQuery.removeEventListener('change', mediaListener);\n } else {\n mediaQuery.removeListener?.(mediaListener);\n }\n mediaQuery = null;\n }\n\n function removeMutationObserver() {\n mutationObserver?.disconnect();\n mutationObserver = null;\n }\n\n function cleanup() {\n removeMediaQuery();\n removeMutationObserver();\n }\n\n function setupMediaQuery(ownerWindow: Window) {\n if (mediaQuery || typeof ownerWindow.matchMedia !== 'function') return;\n mediaQuery = ownerWindow.matchMedia(\n '(prefers-color-scheme: dark)',\n ) as LegacyMediaQueryList;\n if (mediaQuery.addEventListener) {\n mediaQuery.addEventListener('change', mediaListener);\n } else {\n mediaQuery.addListener?.(mediaListener);\n }\n isDark.value = mediaQuery.matches;\n }\n\n function setupSystem(ownerDocument: Document) {\n const rootNode = getRootNode();\n const ElementConstructor = ownerDocument.defaultView?.Element;\n const rootElement =\n ElementConstructor && rootNode instanceof ElementConstructor\n ? rootNode\n : (rootNode?.parentElement ?? null);\n\n const update = () => {\n const theme = getAncestorTheme(\n rootElement,\n ownerDocument.documentElement,\n );\n if (theme) {\n removeMediaQuery();\n isDark.value = theme === 'dark';\n return;\n }\n const ownerWindow = ownerDocument.defaultView;\n if (ownerWindow) setupMediaQuery(ownerWindow);\n };\n\n update();\n const Observer = ownerDocument.defaultView?.MutationObserver;\n if (Observer) {\n mutationObserver = new Observer(update);\n mutationObserver.observe(ownerDocument.documentElement, {\n attributes: true,\n attributeFilter: ['class', 'style', 'data-bs-theme', 'data-theme'],\n subtree: true,\n });\n }\n }\n\n function setupClass(ownerDocument: Document, value: DarkModeClassConfig) {\n const { selector = ':root', darkClass = 'dark' } = value;\n const element = ownerDocument.querySelector(selector);\n if (!element || !darkClass) {\n isDark.value = false;\n return;\n }\n\n const update = () => {\n isDark.value = element.classList.contains(darkClass);\n };\n update();\n\n const Observer = ownerDocument.defaultView?.MutationObserver;\n if (Observer) {\n mutationObserver = new Observer(update);\n mutationObserver.observe(element, {\n attributes: true,\n attributeFilter: ['class'],\n });\n }\n }\n\n function setup() {\n cleanup();\n const value = config.value;\n if (typeof value === 'boolean') {\n isDark.value = value;\n return;\n }\n if (!mounted) return;\n\n const ownerDocument = getOwnerDocument();\n if (!ownerDocument) return;\n if (value === 'system') {\n setupSystem(ownerDocument);\n } else {\n setupClass(ownerDocument, value);\n }\n }\n\n watch(config, setup, { immediate: true });\n onMounted(() => {\n mounted = true;\n setup();\n });\n onUnmounted(cleanup);\n\n return { isDark, displayMode };\n}\n","import {\n type ExtractPropTypes,\n type PropType,\n computed,\n inject,\n provide,\n} from 'vue';\nimport { Attribute } from '../utils/attribute';\nimport { type DayOfWeek, addDays } from '../utils/date/helpers';\nimport { getDefault } from '../utils/defaults';\nimport { isObject } from '../utils/helpers';\nimport { default as Locale, type LocaleConfig } from '../utils/locale';\nimport { Theme } from '../utils/theme';\nimport {\n type DarkModeClassConfig,\n useDisplayMode,\n} from '../utils/useDisplayMode';\n\nconst contextKey = Symbol('__vc_base_context__');\n\nexport const propsDef = {\n color: {\n type: String,\n default: () => getDefault('color'),\n },\n isDark: {\n type: [Boolean, String, Object] as PropType<\n boolean | 'system' | DarkModeClassConfig\n >,\n default: () => getDefault('isDark'),\n },\n firstDayOfWeek: Number as PropType<DayOfWeek>,\n masks: Object,\n locale: [String, Object] as PropType<string | Record<string, any> | Locale>,\n timezone: String,\n minDate: null,\n maxDate: null,\n disabledDates: null,\n};\n\nexport type BaseProps = Readonly<ExtractPropTypes<typeof propsDef>>;\n\nexport type BaseContext = ReturnType<typeof createBase>;\n\nexport function createBase(props: BaseProps) {\n // #region Computed\n\n const color = computed(() => props.color ?? '');\n const isDark = computed(() => props.isDark ?? false);\n const { displayMode } = useDisplayMode(isDark);\n const theme = computed(() => new Theme(color.value));\n\n const locale = computed(() => {\n // Return the locale prop if it is an instance of the Locale class\n if (props.locale instanceof Locale) return props.locale;\n // Build up a base config from component props\n const config = (\n isObject(props.locale)\n ? props.locale\n : {\n id: props.locale,\n firstDayOfWeek: props.firstDayOfWeek,\n masks: props.masks,\n }\n ) as Partial<LocaleConfig>;\n // Return new locale\n return new Locale(config, props.timezone);\n });\n\n const masks = computed(() => locale.value.masks);\n\n const minDate = computed(() => props.minDate);\n const maxDate = computed(() => props.maxDate);\n const normalizedMinDate = computed(() =>\n minDate.value == null ? null : locale.value.toDateOrNull(minDate.value),\n );\n const normalizedMaxDate = computed(() =>\n maxDate.value == null ? null : locale.value.toDateOrNull(maxDate.value),\n );\n\n const disabledDates = computed(() => {\n const dates: any[] = props.disabledDates ? [...props.disabledDates] : [];\n // Add disabled range for min date\n const min = normalizedMinDate.value;\n if (min != null) {\n dates.push({\n start: null,\n end: addDays(min, -1),\n });\n }\n // Add disabled range for max date\n const max = normalizedMaxDate.value;\n if (max != null) {\n dates.push({\n start: addDays(max, 1),\n end: null,\n });\n }\n return locale.value.ranges(dates);\n });\n\n const disabledAttribute = computed(() => {\n return new Attribute(\n {\n key: 'disabled',\n dates: disabledDates.value,\n order: 100,\n },\n theme.value,\n locale.value,\n );\n });\n\n // #endregion Computed\n\n const context = {\n color,\n isDark,\n displayMode,\n theme,\n locale,\n masks,\n minDate,\n maxDate,\n normalizedMinDate,\n normalizedMaxDate,\n disabledDates,\n disabledAttribute,\n };\n provide(contextKey, context);\n return context;\n}\n\nexport function useBase() {\n const context = inject<BaseContext>(contextKey);\n if (context) return context;\n throw new Error(\n 'Base context missing. Please verify this component is nested within a valid context provider.',\n );\n}\n\nexport function useOrCreateBase(props: BaseProps) {\n return inject<BaseContext>(contextKey, () => createBase(props), true);\n}\n","import { type SetupContext, inject, provide } from 'vue';\n\ntype Slots = SetupContext['slots'];\n\nfunction contextKey(slotKey: string) {\n return `__vc_slot_${slotKey}__`;\n}\n\nexport function provideSlots(slots: Slots, remap: Record<string, string> = {}) {\n Object.keys(slots).forEach(slotKey => {\n provide(contextKey(remap[slotKey] ?? slotKey), slots[slotKey]);\n });\n}\n\nexport function useSlot(slotKey: string) {\n return inject(contextKey(slotKey), null);\n}\n","import {\n type ExtractPropTypes,\n type PropType,\n type SetupContext,\n computed,\n inject,\n onMounted,\n onUnmounted,\n provide,\n ref,\n watch,\n watchEffect,\n} from 'vue';\nimport { Attribute, type AttributeConfig } from '../utils/attribute';\nimport {\n type DateSource,\n addDays,\n addMonths,\n addYears,\n} from '../utils/date/helpers';\nimport { type DateRangeCell, DateRangeContext } from '../utils/date/range';\nimport { getDefault } from '../utils/defaults';\nimport {\n type CustomElement,\n arrayHasItems,\n has,\n head,\n isBoolean,\n last,\n} from '../utils/helpers';\nimport {\n type CalendarDay,\n type CalendarWeek,\n type Page,\n type PageAddress,\n type TitlePosition,\n addPages as _addPages,\n getPageAddressForDate,\n pageIsAfterPage,\n pageIsBeforePage,\n pageIsBetweenPages,\n pageIsEqualToPage,\n pageIsValid,\n pageRangeToArray,\n} from '../utils/page';\nimport { type PopoverVisibility, hidePopover } from '../utils/popovers';\nimport { addHorizontalSwipeHandler } from '../utils/touch';\nimport { createWatcherController } from '../utils/watchers';\nimport { propsDef as basePropsDef, useOrCreateBase } from './base';\nimport { provideSlots } from './slots';\n\nexport type CalendarView = 'daily' | 'weekly' | 'monthly';\n\nexport type MoveTarget = DateSource | PageAddress;\n\nexport type MoveTransition = 'none' | 'fade' | 'slide-v' | 'slide-h';\n\nexport interface MoveOptions {\n position: number;\n view: CalendarView;\n transition: MoveTransition;\n force: boolean;\n fromPage: PageAddress;\n toPage: PageAddress;\n}\n\nexport interface RefreshOptions {\n page: PageAddress;\n position: number;\n force: boolean;\n transition: MoveTransition;\n}\n\nexport type DayCells = Record<\n number,\n { day: CalendarDay; cells: DateRangeCell<Attribute>[] }\n>;\n\nexport type CalendarProps = Readonly<ExtractPropTypes<typeof propsDef>>;\n\ntype IContainer = Pick<Element, 'querySelector'> & CustomElement;\n\nexport type CalendarContext = ReturnType<typeof createCalendar>;\n\nexport const propsDef = {\n ...basePropsDef,\n view: {\n type: String as PropType<CalendarView>,\n default: 'monthly',\n validator(value: string) {\n return ['daily', 'weekly', 'monthly'].includes(value);\n },\n },\n rows: {\n type: Number,\n default: 1,\n },\n columns: {\n type: Number,\n default: 1,\n },\n step: Number,\n titlePosition: {\n type: String as PropType<TitlePosition>,\n default: () => getDefault('titlePosition') as TitlePosition,\n },\n navVisibility: {\n type: String as PropType<PopoverVisibility>,\n default: () => getDefault('navVisibility') as PopoverVisibility,\n },\n showWeeknumbers: [Boolean, String],\n showIsoWeeknumbers: [Boolean, String],\n expanded: Boolean,\n borderless: Boolean,\n transparent: Boolean,\n initialPage: Object as PropType<PageAddress>,\n initialPagePosition: { type: Number, default: 1 },\n minPage: Object as PropType<PageAddress>,\n maxPage: Object as PropType<PageAddress>,\n transition: String as PropType<MoveTransition>,\n attributes: Array as PropType<Array<AttributeConfig>>,\n trimWeeks: Boolean,\n disablePageSwipe: Boolean,\n};\n\nexport const emitsDef = [\n 'dayclick',\n 'daymouseenter',\n 'daymouseleave',\n 'dayfocusin',\n 'dayfocusout',\n 'daykeydown',\n 'weeknumberclick',\n 'transition-start',\n 'transition-end',\n 'did-move',\n 'update:view',\n 'update:pages',\n];\n\nconst contextKey = Symbol('__vc_calendar_context__');\n\nexport function createCalendar(\n props: CalendarProps,\n { slots, emit }: Pick<SetupContext, 'slots' | 'emit'>,\n) {\n // #region Refs\n\n const containerRef = ref<IContainer | null>(null);\n const focusedDay = ref<CalendarDay | null>(null);\n const focusableDay = ref(new Date().getDate());\n const inTransition = ref(false);\n const navPopoverId = ref(Symbol());\n const dayPopoverId = ref(Symbol());\n const _view = ref(props.view);\n const _pages = ref<Page[]>([]);\n const transitionName = ref('');\n\n // #endregion\n\n // Non-reactive util vars\n let transitionPromise: any = null;\n let removeHandlers: any = null;\n const { handleWatcher, skipWatcher } = createWatcherController();\n\n provideSlots(slots);\n\n const {\n theme,\n color,\n displayMode,\n locale,\n masks,\n minDate,\n maxDate,\n normalizedMinDate,\n normalizedMaxDate,\n disabledAttribute,\n disabledDates,\n } = useOrCreateBase(props);\n\n // #region Computed\n\n const count = computed(() => props.rows * props.columns);\n\n const step = computed(() => props.step || count.value);\n\n const firstPage = computed(() => head(_pages.value) ?? null);\n\n const lastPage = computed(() => last(_pages.value) ?? null);\n\n const minPage = computed(\n () =>\n props.minPage ||\n (normalizedMinDate.value\n ? getDateAddress(normalizedMinDate.value)\n : null),\n );\n\n const maxPage = computed(\n () =>\n props.maxPage ||\n (normalizedMaxDate.value\n ? getDateAddress(normalizedMaxDate.value)\n : null),\n );\n\n const navVisibility = computed(() => props.navVisibility);\n\n const showWeeknumbers = computed(() => !!props.showWeeknumbers);\n\n const showIsoWeeknumbers = computed(() => !!props.showIsoWeeknumbers);\n\n const isMonthly = computed(() => _view.value === 'monthly');\n const isWeekly = computed(() => _view.value === 'weekly');\n const isDaily = computed(() => _view.value === 'daily');\n\n // #endregion Computed\n\n // #region Methods\n\n const onTransitionBeforeEnter = () => {\n inTransition.value = true;\n emit('transition-start');\n };\n\n const onTransitionAfterEnter = () => {\n inTransition.value = false;\n emit('transition-end');\n if (transitionPromise) {\n transitionPromise.resolve(true);\n transitionPromise = null;\n }\n };\n\n const addPages = (\n address: PageAddress,\n count: number,\n view = _view.value,\n ) => {\n return _addPages(address, count, view, locale.value);\n };\n\n const getDateAddress = (date: DateSource) => {\n return getPageAddressForDate(date, _view.value, locale.value);\n };\n\n const refreshDisabled = (day: CalendarDay) => {\n if (!disabledAttribute.value || !attributeContext.value) return;\n day.isDisabled = attributeContext.value.cellExists(\n disabledAttribute.value.key,\n day.dayIndex,\n );\n };\n\n const refreshFocusable = (day: CalendarDay) => {\n day.isFocusable = day.inMonth && day.day === focusableDay.value;\n };\n\n const forDays = (pages: Page[], fn: (day: CalendarDay) => boolean | void) => {\n for (const page of pages) {\n for (const day of page.days) {\n if (fn(day) === false) return;\n }\n }\n };\n\n const days = computed(() =>\n _pages.value.reduce((result: CalendarDay[], page: Page) => {\n result.push(...page.viewDays);\n return result;\n }, [] as CalendarDay[]),\n );\n\n const attributes = computed(() => {\n const result: Attribute[] = [];\n (props.attributes || []).forEach((attr, i) => {\n if (!attr || !attr.dates) return;\n result.push(\n new Attribute(\n {\n ...attr,\n order: attr.order || 0,\n },\n theme.value,\n locale.value,\n ),\n );\n });\n if (disabledAttribute.value) {\n result.push(disabledAttribute.value);\n }\n return result;\n });\n\n const hasAttributes = computed(() => arrayHasItems(attributes.value));\n\n const attributeContext = computed(() => {\n const ctx = new DateRangeContext();\n attributes.value.forEach(attr => {\n attr.ranges.forEach(range => {\n ctx.render(attr, range, days.value);\n });\n });\n return ctx;\n });\n\n const dayCells = computed(() => {\n return days.value.reduce((result, day) => {\n result[day.dayIndex] = { day, cells: [] };\n result[day.dayIndex].cells.push(...attributeContext.value.getCells(day));\n return result;\n }, {} as DayCells);\n });\n\n const getWeeknumberPosition = (column: number, columnFromEnd: number) => {\n const showWeeknumbers = props.showWeeknumbers || props.showIsoWeeknumbers;\n if (showWeeknumbers == null) return '';\n if (isBoolean(showWeeknumbers)) {\n return showWeeknumbers ? 'left' : '';\n }\n if (showWeeknumbers.startsWith('right')) {\n return columnFromEnd > 1 ? 'right' : showWeeknumbers;\n }\n return column > 1 ? 'left' : showWeeknumbers;\n };\n\n const getPageForAttributes = () => {\n if (!hasAttributes.value) return null;\n const attr =\n attributes.value.find(attr => attr.pinPage) || attributes.value[0];\n if (!attr || !attr.hasRanges) return null;\n const [range] = attr.ranges;\n const date = range.start?.date || range.end?.date;\n return date ? getDateAddress(date) : null;\n };\n\n const getDefaultInitialPage = () => {\n // 1. Try existing first page\n if (pageIsValid(firstPage.value)) return firstPage.value as PageAddress;\n // 2. Try the first attribute\n const page = getPageForAttributes();\n if (pageIsValid(page)) return page as PageAddress;\n // 3. Use today's page\n return getDateAddress(new Date());\n };\n\n const getTargetPageRange = (\n page: PageAddress,\n opts: Partial<MoveOptions> = {},\n ) => {\n const { view = _view.value, position = 1, force } = opts;\n const pagesToAdd = position > 0 ? 1 - position : -(count.value + position);\n let fromPage = addPages(page, pagesToAdd, view);\n let toPage = addPages(fromPage!, count.value - 1, view);\n\n // Adjust range for min/max if not forced\n if (!force) {\n if (pageIsBeforePage(fromPage, minPage.value)) {\n fromPage = minPage.value!;\n } else if (pageIsAfterPage(toPage, maxPage.value)) {\n fromPage = addPages(maxPage.value!, 1 - count.value);\n }\n toPage = addPages(fromPage!, count.value - 1);\n }\n return { fromPage, toPage };\n };\n\n const getPageTransition = (\n oldPage: Page,\n newPage: Page,\n defaultTransition = '',\n ) => {\n if (defaultTransition === 'none' || defaultTransition === 'fade')\n return defaultTransition;\n // Moving to a different view\n if (oldPage?.view !== newPage?.view) return 'fade';\n // Moving to a previous page\n const moveNext = pageIsAfterPage(newPage, oldPage);\n const movePrev = pageIsBeforePage(newPage, oldPage);\n if (!moveNext && !movePrev) {\n return 'fade';\n }\n // Vertical slide\n if (defaultTransition === 'slide-v') {\n return movePrev ? 'slide-down' : 'slide-up';\n }\n // Horizontal slide\n return movePrev ? 'slide-right' : 'slide-left';\n };\n\n const refreshPages = (opts: Partial<RefreshOptions> = {}) => {\n return new Promise((resolve, reject) => {\n const { position = 1, force = false, transition } = opts;\n const page = pageIsValid(opts.page)\n ? opts.page!\n : getDefaultInitialPage();\n const { fromPage } = getTargetPageRange(page, {\n position,\n force,\n });\n // Create the new pages\n const pages: Page[] = [];\n for (let i = 0; i < count.value; i++) {\n const newPage = addPages(fromPage!, i);\n const position = i + 1;\n const row = Math.ceil(position / props.columns);\n const rowFromEnd = props.rows - row + 1;\n const column = position % props.columns || props.columns;\n const columnFromEnd = props.columns - column + 1;\n const weeknumberPosition = getWeeknumberPosition(column, columnFromEnd);\n pages.push(\n locale.value.getPage({\n ...newPage,\n view: _view.value,\n titlePosition: props.titlePosition,\n trimWeeks: props.trimWeeks,\n position,\n row,\n rowFromEnd,\n column,\n columnFromEnd,\n showWeeknumbers: showWeeknumbers.value,\n showIsoWeeknumbers: showIsoWeeknumbers.value,\n weeknumberPosition,\n }),\n );\n }\n // Assign the transition\n transitionName.value = getPageTransition(\n _pages.value[0],\n pages[0],\n transition,\n );\n // Assign the new pages\n _pages.value = pages;\n // Cache or resolve transition promise\n if (transitionName.value && transitionName.value !== 'none') {\n transitionPromise = {\n resolve,\n reject,\n };\n } else {\n resolve(true);\n }\n });\n };\n\n const targetBy = (pages: number) => {\n const fromPage = firstPage.value ?? getDateAddress(new Date());\n return addPages(fromPage, pages);\n };\n\n const canMove = (target: MoveTarget, opts: Partial<MoveOptions> = {}) => {\n const page = pageIsValid(target as PageAddress)\n ? (target as Page)\n : getDateAddress(target as DateSource);\n // Calculate new page range without adjusting to min/max\n Object.assign(\n opts,\n getTargetPageRange(page, {\n ...opts,\n force: true,\n }),\n );\n // Verify we can move to any pages in the target range\n const pagesInRange = pageRangeToArray(\n opts.fromPage!,\n opts.toPage!,\n _view.value,\n locale.value,\n ).map(p => pageIsBetweenPages(p, minPage.value, maxPage.value));\n return pagesInRange.some(val => val);\n };\n\n const canMoveBy = (pages: number, opts: Partial<MoveOptions> = {}) => {\n return canMove(targetBy(pages), opts);\n };\n\n const canMovePrev = computed(() => canMoveBy(-step.value));\n\n const canMoveNext = computed(() => canMoveBy(step.value));\n\n const move = async (target: MoveTarget, opts: Partial<MoveOptions> = {}) => {\n // Return if we can't move to this page\n if (!opts.force && !canMove(target, opts)) return false;\n // Move to new `fromPage` if it's different from the current one\n if (opts.fromPage && !pageIsEqualToPage(opts.fromPage, firstPage.value)) {\n // Hide nav popover for good measure\n hidePopover({\n id: navPopoverId.value,\n target: containerRef.value,\n hideDelay: 0,\n });\n // Quietly change view if needed\n if (opts.view) {\n skipWatcher('view', 10);\n _view.value = opts.view;\n }\n await refreshPages({\n ...opts,\n page: opts.fromPage,\n position: 1,\n force: true,\n });\n emit('did-move', _pages.value);\n }\n return true;\n };\n\n const moveBy = (pages: number, opts: Partial<MoveOptions> = {}) => {\n return move(targetBy(pages), opts);\n };\n\n const movePrev = () => {\n return moveBy(-step.value);\n };\n\n const moveNext = () => {\n return moveBy(step.value);\n };\n\n const tryFocusDate = (date: Date) => {\n const inMonth = isMonthly.value ? '.in-month' : '';\n const daySelector = `.id-${locale.value.getDayId(date)}${inMonth}`;\n const selector = `${daySelector}.vc-focusable, ${daySelector} .vc-focusable`;\n const el = containerRef.value;\n if (el) {\n const focusableEl = el.querySelector(selector) as HTMLElement;\n if (focusableEl) {\n focusableEl.focus();\n return true;\n }\n }\n return false;\n };\n\n const focusDate = async (date: Date, opts: Partial<MoveOptions> = {}) => {\n if (tryFocusDate(date)) return true;\n // Move to the given date\n await move(date, opts);\n return tryFocusDate(date);\n };\n\n const onDayClick = (day: CalendarDay, event: MouseEvent) => {\n focusableDay.value = day.day;\n emit('dayclick', day, event);\n };\n\n const onDayMouseenter = (day: CalendarDay, event: MouseEvent) => {\n emit('daymouseenter', day, event);\n };\n\n const onDayMouseleave = (day: CalendarDay, event: MouseEvent) => {\n emit('daymouseleave', day, event);\n };\n\n const onDayFocusin = (day: CalendarDay, event: FocusEvent | null) => {\n focusableDay.value = day.day;\n focusedDay.value = day;\n day.isFocused = true;\n emit('dayfocusin', day, event);\n };\n\n const onDayFocusout = (day: CalendarDay, event: FocusEvent) => {\n focusedDay.value = null;\n day.isFocused = false;\n emit('dayfocusout', day, event);\n };\n\n const onDayKeydown = (day: CalendarDay, event: KeyboardEvent) => {\n emit('daykeydown', day, event);\n const date = day.noonDate;\n let newDate = null;\n switch (event.key) {\n case 'ArrowLeft': {\n // Move to previous day\n newDate = addDays(date, -1);\n break;\n }\n case 'ArrowRight': {\n // Move to next day\n newDate = addDays(date, 1);\n break;\n }\n case 'ArrowUp': {\n // Move to previous week\n newDate = addDays(date, -7);\n break;\n }\n case 'ArrowDown': {\n // Move to next week\n newDate = addDays(date, 7);\n break;\n }\n case 'Home': {\n // Move to first weekday position\n newDate = addDays(date, -day.weekdayPosition + 1);\n break;\n }\n case 'End': {\n // Move to last weekday position\n newDate = addDays(date, day.weekdayPositionFromEnd);\n break;\n }\n case 'PageUp': {\n if (event.altKey) {\n // Move to previous year w/ Alt/Option key\n newDate = addYears(date, -1);\n } else {\n // Move to previous month\n newDate = addMonths(date, -1);\n }\n break;\n }\n case 'PageDown': {\n if (event.altKey) {\n // Move to next year w/ Alt/Option key\n newDate = addYears(date, 1);\n } else {\n // Move to next month\n newDate = addMonths(date, 1);\n }\n break;\n }\n }\n if (newDate) {\n event.preventDefault();\n focusDate(newDate).catch();\n }\n };\n\n const onKeydown = (event: KeyboardEvent) => {\n const day = focusedDay.value;\n if (day != null) {\n onDayKeydown(day, event);\n }\n };\n\n const onWeeknumberClick = (week: CalendarWeek, event: MouseEvent) => {\n emit('weeknumberclick', week, event);\n };\n\n // #endregion Methods\n\n // #region Lifecycle methods\n\n // Created\n\n refreshPages({\n page: props.initialPage,\n position: props.initialPagePosition,\n });\n\n // Mounted\n\n onMounted(() => {\n if (!props.disablePageSwipe && containerRef.value) {\n // Add swipe handler to move to next and previous pages\n removeHandlers = addHorizontalSwipeHandler(\n containerRef.value,\n ({ toLeft = false, toRight = false }) => {\n if (toLeft) {\n moveNext();\n } else if (toRight) {\n movePrev();\n }\n },\n getDefault('touch'),\n );\n }\n });\n\n // Unmounted\n onUnmounted(() => {\n _pages.value = [];\n if (removeHandlers) removeHandlers();\n });\n\n // #endregion Lifecycle methods\n\n // #region Watch\n\n watch(\n () => locale.value,\n () => {\n refreshPages();\n },\n );\n\n watch(\n () => count.value,\n () => refreshPages(),\n );\n\n watch(\n () => props.view,\n () => (_view.value = props.view),\n );\n\n watch(\n () => _view.value,\n () => {\n handleWatcher('view', () => {\n refreshPages();\n });\n emit('update:view', _view.value);\n },\n );\n\n watch(\n () => focusableDay.value,\n () => {\n forDays(_pages.value, day => refreshFocusable(day));\n },\n );\n\n watchEffect(() => {\n emit('update:pages', _pages.value);\n // Refresh state for days\n forDays(_pages.value, day => {\n // Refresh disabled state\n refreshDisabled(day);\n // Refresh focusable state\n refreshFocusable(day);\n });\n });\n\n // #endregion Watch\n\n const context = {\n emit,\n containerRef,\n focusedDay,\n inTransition,\n navPopoverId,\n dayPopoverId,\n view: _view,\n pages: _pages,\n transitionName,\n theme,\n color,\n displayMode,\n locale,\n masks,\n attributes,\n disabledAttribute,\n disabledDates,\n attributeContext,\n days,\n dayCells,\n count,\n step,\n firstPage,\n lastPage,\n canMovePrev,\n canMoveNext,\n minPage,\n maxPage,\n isMonthly,\n isWeekly,\n isDaily,\n navVisibility,\n showWeeknumbers,\n showIsoWeeknumbers,\n getDateAddress,\n canMove,\n canMoveBy,\n move,\n moveBy,\n movePrev,\n moveNext,\n onTransitionBeforeEnter,\n onTransitionAfterEnter,\n tryFocusDate,\n focusDate,\n onKeydown,\n onDayKeydown,\n onDayClick,\n onDayMouseenter,\n onDayMouseleave,\n onDayFocusin,\n onDayFocusout,\n onWeeknumberClick,\n };\n provide(contextKey, context);\n return context;\n}\n\nexport function useCalendar(): CalendarContext {\n const context = inject<CalendarContext>(contextKey);\n if (context) return context;\n throw new Error(\n 'Calendar context missing. Please verify this component is nested within a valid context provider.',\n );\n}\n","<template>\n <div\n class=\"vc-popover-content-wrapper\"\n :class=\"{ 'is-interactive': isInteractive }\"\n ref=\"popoverRef\"\n @click=\"onClick\"\n @mouseover=\"onMouseOver\"\n @mouseleave=\"onMouseLeave\"\n @focusin=\"onFocusIn\"\n @focusout=\"onFocusOut\"\n >\n <Transition\n :name=\"`vc-${transition}`\"\n appear\n @before-enter=\"beforeEnter\"\n @after-enter=\"afterEnter\"\n @before-leave=\"beforeLeave\"\n @after-leave=\"afterLeave\"\n >\n <div\n v-if=\"isVisible\"\n tabindex=\"-1\"\n :class=\"`vc-popover-content direction-${direction}`\"\n v-bind=\"$attrs\"\n >\n <slot\n :direction=\"direction\"\n :alignment=\"alignment\"\n :data=\"data\"\n :hide=\"hide\"\n >\n {{ data }}\n </slot>\n <span\n :class=\"[\n 'vc-popover-caret',\n `direction-${direction}`,\n `align-${alignment}`,\n ]\"\n />\n </div>\n </Transition>\n </div>\n</template>\n\n<script lang=\"ts\">\nimport {\n type Instance,\n type OptionsGeneric,\n type State as PopperState,\n type PositioningStrategy,\n createPopper,\n} from '@popperjs/core';\nimport {\n computed,\n defineComponent,\n nextTick,\n onMounted,\n onUnmounted,\n reactive,\n ref,\n toRefs,\n watch,\n} from 'vue';\nimport { elementContains, off, omit, on, resolveEl } from '../../utils/helpers';\nimport type {\n PopoverEvent,\n PopoverOptions,\n PopoverState,\n} from '../../utils/popovers';\n\nexport default defineComponent({\n inheritAttrs: false,\n emits: ['before-show', 'after-show', 'before-hide', 'after-hide'],\n props: {\n id: { type: [Number, String, Symbol], required: true },\n showDelay: { type: Number, default: 0 },\n hideDelay: { type: Number, default: 110 },\n boundarySelector: { type: String },\n },\n setup(props, { emit }) {\n let timeout: number | undefined = undefined;\n const popoverRef = ref<HTMLElement>();\n let resizeObserver: ResizeObserver | null = null;\n let triggerObserver: MutationObserver | null = null;\n let popper: Instance | null = null;\n let ownerDocument: Document | null = null;\n let isUnmounted = false;\n\n const state: PopoverState = reactive({\n isVisible: false,\n target: null,\n data: null,\n transition: 'slide-fade',\n placement: 'bottom',\n direction: '',\n positionFixed: false,\n modifiers: [],\n isInteractive: true,\n visibility: 'click',\n isHovered: false,\n isFocused: false,\n autoHide: false,\n force: false,\n });\n\n function updateDirection(placement?: string) {\n if (placement) state.direction = placement.split('-')[0];\n }\n\n function onPopperUpdate({ placement, options }: Partial<PopperState>) {\n updateDirection(placement || options?.placement);\n }\n\n const popperOptions = computed<Partial<OptionsGeneric<any>>>(() => {\n return {\n placement: state.placement,\n strategy: (state.positionFixed\n ? 'fixed'\n : 'absolute') as PositioningStrategy,\n boundary: '',\n modifiers: [\n {\n name: 'onUpdate',\n enabled: true,\n phase: 'afterWrite',\n fn: onPopperUpdate,\n },\n ...(state.modifiers || []),\n ],\n onFirstUpdate: onPopperUpdate,\n };\n // if (props.boundarySelector) {\n // const boundary = document.querySelector(props.boundarySelector);\n // modifiers.push({\n // name: 'boundary',\n // enabled: true,\n // phase: 'main',\n // requiresIfExists: ['offset'],\n // fn({ state }) {\n // console.log(\n // detectOverflow(state, {\n // boundary,\n // altBoundary: true,\n // }),\n // );\n // },\n // });\n // }\n });\n\n const alignment = computed(() => {\n const isLeftRight =\n state.direction === 'left' || state.direction === 'right';\n let alignment = '';\n if (state.placement) {\n const parts = state.placement.split('-');\n if (parts.length > 1) alignment = parts[1];\n }\n if (['start', 'top', 'left'].includes(alignment)) {\n return isLeftRight ? 'top' : 'left';\n }\n if (['end', 'bottom', 'right'].includes(alignment)) {\n return isLeftRight ? 'bottom' : 'right';\n }\n return isLeftRight ? 'middle' : 'center';\n });\n\n function destroyPopper() {\n triggerObserver?.disconnect();\n triggerObserver = null;\n if (popper) {\n popper.destroy();\n popper = null;\n }\n }\n\n function setupPopper() {\n nextTick(() => {\n if (isUnmounted) return;\n const el = resolveEl(state.target);\n if (!el || !popoverRef.value) return;\n if (popper && popper.state.elements.reference !== el) {\n destroyPopper();\n }\n if (!popper) {\n popper = createPopper(\n el as Element,\n popoverRef.value,\n popperOptions.value,\n );\n } else {\n popper.update();\n }\n const targetDocument = el.ownerDocument;\n const Observer = targetDocument?.defaultView?.MutationObserver;\n if (Observer && targetDocument && el.isConnected && !triggerObserver) {\n triggerObserver = new Observer(() => {\n if (el.isConnected) return;\n state.force = false;\n state.isVisible = false;\n destroyPopper();\n });\n triggerObserver.observe(targetDocument.documentElement, {\n childList: true,\n subtree: true,\n });\n }\n });\n }\n\n function updateState(newState: Partial<PopoverState>) {\n Object.assign(state, omit(newState, 'force'));\n }\n\n function setTimer(delay: number, fn: Function) {\n clearTimeout(timeout);\n if (delay > 0) {\n timeout = setTimeout(fn, delay);\n } else {\n fn();\n }\n }\n\n function isCurrentTarget(target: unknown) {\n if (!target || !popper) return false;\n const el = resolveEl(target);\n return el === popper.state.elements.reference;\n }\n\n async function show(opts: Partial<PopoverOptions> = {}) {\n if (state.force) return;\n if (opts.force) state.force = true;\n\n setTimer(opts.showDelay ?? props.showDelay, () => {\n const target = resolveEl(opts.target ?? state.target);\n if (!target) return;\n if (state.isVisible) {\n state.force = false;\n }\n updateState({\n ...opts,\n isVisible: true,\n });\n setupPopper();\n });\n }\n\n function hide(opts: Partial<PopoverOptions> = {}) {\n if (opts.target && popper && !isCurrentTarget(opts.target)) return;\n if (!popper && !state.isVisible) return;\n\n if (state.force) return;\n if (opts.force) state.force = true;\n\n setTimer(opts.hideDelay ?? props.hideDelay, () => {\n if (!state.isVisible) state.force = false;\n state.isVisible = false;\n });\n }\n\n function toggle(opts: Partial<PopoverOptions> = {}) {\n if (opts.target == null) return;\n if (state.isVisible && isCurrentTarget(opts.target)) {\n hide(opts);\n } else {\n show(opts);\n }\n }\n\n function onDocumentClick(e: CustomEvent) {\n if (!popper) return;\n const reference = popper.state.elements.reference;\n if (!popoverRef.value || !reference) {\n return;\n }\n // Don't hide if target element is contained within popover ref or content\n const target = e.target as Node;\n if (\n elementContains(popoverRef.value, target) ||\n elementContains(reference as Node, target)\n ) {\n return;\n }\n // Hide the popover\n hide({ force: true });\n }\n\n function onDocumentKeydown(e: KeyboardEvent) {\n if (e.key === 'Esc' || e.key === 'Escape') {\n hide();\n }\n }\n\n function onDocumentShowPopover({ detail }: PopoverEvent) {\n if (!detail.id || detail.id !== props.id) return;\n show(detail);\n }\n\n function onDocumentHidePopover({ detail }: PopoverEvent) {\n if (!detail.id || detail.id !== props.id) return;\n hide(detail);\n }\n\n function onDocumentTogglePopover({ detail }: PopoverEvent) {\n if (!detail.id || detail.id !== props.id) return;\n toggle(detail);\n }\n\n function addEvents(doc: Document) {\n on(doc, 'keydown', onDocumentKeydown);\n on(doc, 'pointerdown', onDocumentClick);\n on(doc, 'show-popover', onDocumentShowPopover);\n on(doc, 'hide-popover', onDocumentHidePopover);\n on(doc, 'toggle-popover', onDocumentTogglePopover);\n }\n\n function removeEvents(doc: Document) {\n off(doc, 'keydown', onDocumentKeydown);\n off(doc, 'pointerdown', onDocumentClick);\n off(doc, 'show-popover', onDocumentShowPopover);\n off(doc, 'hide-popover', onDocumentHidePopover);\n off(doc, 'toggle-popover', onDocumentTogglePopover);\n }\n\n function beforeEnter(el: Element) {\n emit('before-show', el);\n }\n\n function afterEnter(el: Element) {\n state.force = false;\n emit('after-show', el);\n }\n\n function beforeLeave(el: Element) {\n emit('before-hide', el);\n }\n\n function afterLeave(el: Element) {\n state.force = false;\n destroyPopper();\n emit('after-hide', el);\n }\n\n function onClick(e: MouseEvent) {\n e.stopPropagation();\n }\n\n function onMouseOver() {\n state.isHovered = true;\n if (\n state.isInteractive &&\n ['hover', 'hover-focus'].includes(state.visibility)\n ) {\n show();\n }\n }\n\n function onMouseLeave() {\n state.isHovered = false;\n if (!popper) return;\n const popperRef = popper.state.elements.reference;\n if (\n state.autoHide &&\n !state.isFocused &&\n (!popperRef || popperRef !== ownerDocument?.activeElement) &&\n ['hover', 'hover-focus'].includes(state.visibility)\n ) {\n hide();\n }\n }\n\n function onFocusIn() {\n state.isFocused = true;\n if (\n state.isInteractive &&\n ['focus', 'hover-focus'].includes(state.visibility)\n ) {\n show();\n }\n }\n\n function onFocusOut(e: FocusEvent) {\n if (\n ['focus', 'hover-focus'].includes(state.visibility) &&\n (!e.relatedTarget ||\n !elementContains(popoverRef.value!, e.relatedTarget as Node))\n ) {\n state.isFocused = false;\n if (!state.isHovered && state.autoHide) hide();\n }\n }\n\n function cleanupRO() {\n if (resizeObserver != null) {\n resizeObserver.disconnect();\n resizeObserver = null;\n }\n }\n\n watch(\n () => popoverRef.value,\n val => {\n cleanupRO();\n if (!val) return;\n const Observer = val.ownerDocument.defaultView?.ResizeObserver;\n if (!Observer) return;\n resizeObserver = new Observer(() => {\n if (popper) popper.update();\n });\n resizeObserver.observe(val);\n },\n );\n\n watch(() => state.placement, updateDirection, {\n immediate: true,\n });\n\n onMounted(() => {\n ownerDocument = popoverRef.value?.ownerDocument ?? null;\n if (ownerDocument) addEvents(ownerDocument);\n });\n\n onUnmounted(() => {\n isUnmounted = true;\n clearTimeout(timeout);\n destroyPopper();\n cleanupRO();\n if (ownerDocument) removeEvents(ownerDocument);\n ownerDocument = null;\n });\n\n return {\n ...toRefs(state),\n popoverRef,\n alignment,\n hide,\n setupPopper,\n beforeEnter,\n afterEnter,\n beforeLeave,\n afterLeave,\n onClick,\n onMouseOver,\n onMouseLeave,\n onFocusIn,\n onFocusOut,\n };\n },\n});\n</script>\n\n<style lang=\"css\">\n.vc-popover-content-wrapper {\n --popover-horizontal-content-offset: 8px;\n --popover-vertical-content-offset: 10px;\n --popover-caret-horizontal-offset: 18px;\n --popover-caret-vertical-offset: 8px;\n\n position: absolute;\n display: block;\n outline: none;\n z-index: 10;\n &:not(.is-interactive) {\n pointer-events: none;\n }\n}\n\n.vc-popover-content {\n position: relative;\n color: var(--vc-popover-content-color);\n font-weight: var(--vc-font-medium);\n background-color: var(--vc-popover-content-bg);\n border: 1px solid;\n border-color: var(--vc-popover-content-border);\n border-radius: var(--vc-rounded-lg);\n padding: 4px;\n outline: none;\n z-index: 10;\n box-shadow: var(--vc-shadow-lg);\n &.direction-bottom {\n margin-top: var(--popover-vertical-content-offset);\n }\n &.direction-top {\n margin-bottom: var(--popover-vertical-content-offset);\n }\n &.direction-left {\n margin-right: var(--popover-horizontal-content-offset);\n }\n &.direction-right {\n margin-left: var(--popover-horizontal-content-offset);\n }\n}\n\n.vc-popover-caret {\n content: '';\n position: absolute;\n display: block;\n width: 12px;\n height: 12px;\n border-top: inherit;\n border-left: inherit;\n background-color: inherit;\n z-index: -1;\n &.direction-bottom {\n top: 0;\n &.align-left {\n transform: translateY(-50%) rotate(45deg);\n }\n &.align-center {\n transform: translateX(-50%) translateY(-50%) rotate(45deg);\n }\n &.align-right {\n transform: translateY(-50%) rotate(45deg);\n }\n }\n &.direction-top {\n top: 100%;\n &.align-left {\n transform: translateY(-50%) rotate(-135deg);\n }\n &.align-center {\n transform: translateX(-50%) translateY(-50%) rotate(-135deg);\n }\n &.align-right {\n transform: translateY(-50%) rotate(-135deg);\n }\n }\n &.direction-left {\n left: 100%;\n &.align-top {\n transform: translateX(-50%) rotate(135deg);\n }\n &.align-middle {\n transform: translateY(-50%) translateX(-50%) rotate(135deg);\n }\n &.align-bottom {\n transform: translateX(-50%) rotate(135deg);\n }\n }\n &.direction-right {\n left: 0;\n &.align-top {\n transform: translateX(-50%) rotate(-45deg);\n }\n &.align-middle {\n transform: translateY(-50%) translateX(-50%) rotate(-45deg);\n }\n &.align-bottom {\n transform: translateX(-50%) rotate(-45deg);\n }\n }\n &.align-left {\n left: var(--popover-caret-horizontal-offset);\n }\n &.align-center {\n left: 50%;\n }\n &.align-right {\n right: var(--popover-caret-horizontal-offset);\n }\n &.align-top {\n top: var(--popover-caret-vertical-offset);\n }\n &.align-middle {\n top: 50%;\n }\n &.align-bottom {\n bottom: var(--popover-caret-vertical-offset);\n }\n}\n</style>\n","<template>\n <div\n class=\"vc-popover-content-wrapper\"\n :class=\"{ 'is-interactive': isInteractive }\"\n ref=\"popoverRef\"\n @click=\"onClick\"\n @mouseover=\"onMouseOver\"\n @mouseleave=\"onMouseLeave\"\n @focusin=\"onFocusIn\"\n @focusout=\"onFocusOut\"\n >\n <Transition\n :name=\"`vc-${transition}`\"\n appear\n @before-enter=\"beforeEnter\"\n @after-enter=\"afterEnter\"\n @before-leave=\"beforeLeave\"\n @after-leave=\"afterLeave\"\n >\n <div\n v-if=\"isVisible\"\n tabindex=\"-1\"\n :class=\"`vc-popover-content direction-${direction}`\"\n v-bind=\"$attrs\"\n >\n <slot\n :direction=\"direction\"\n :alignment=\"alignment\"\n :data=\"data\"\n :hide=\"hide\"\n >\n {{ data }}\n </slot>\n <span\n :class=\"[\n 'vc-popover-caret',\n `direction-${direction}`,\n `align-${alignment}`,\n ]\"\n />\n </div>\n </Transition>\n </div>\n</template>\n\n<script lang=\"ts\">\nimport {\n type Instance,\n type OptionsGeneric,\n type State as PopperState,\n type PositioningStrategy,\n createPopper,\n} from '@popperjs/core';\nimport {\n computed,\n defineComponent,\n nextTick,\n onMounted,\n onUnmounted,\n reactive,\n ref,\n toRefs,\n watch,\n} from 'vue';\nimport { elementContains, off, omit, on, resolveEl } from '../../utils/helpers';\nimport type {\n PopoverEvent,\n PopoverOptions,\n PopoverState,\n} from '../../utils/popovers';\n\nexport default defineComponent({\n inheritAttrs: false,\n emits: ['before-show', 'after-show', 'before-hide', 'after-hide'],\n props: {\n id: { type: [Number, String, Symbol], required: true },\n showDelay: { type: Number, default: 0 },\n hideDelay: { type: Number, default: 110 },\n boundarySelector: { type: String },\n },\n setup(props, { emit }) {\n let timeout: number | undefined = undefined;\n const popoverRef = ref<HTMLElement>();\n let resizeObserver: ResizeObserver | null = null;\n let triggerObserver: MutationObserver | null = null;\n let popper: Instance | null = null;\n let ownerDocument: Document | null = null;\n let isUnmounted = false;\n\n const state: PopoverState = reactive({\n isVisible: false,\n target: null,\n data: null,\n transition: 'slide-fade',\n placement: 'bottom',\n direction: '',\n positionFixed: false,\n modifiers: [],\n isInteractive: true,\n visibility: 'click',\n isHovered: false,\n isFocused: false,\n autoHide: false,\n force: false,\n });\n\n function updateDirection(placement?: string) {\n if (placement) state.direction = placement.split('-')[0];\n }\n\n function onPopperUpdate({ placement, options }: Partial<PopperState>) {\n updateDirection(placement || options?.placement);\n }\n\n const popperOptions = computed<Partial<OptionsGeneric<any>>>(() => {\n return {\n placement: state.placement,\n strategy: (state.positionFixed\n ? 'fixed'\n : 'absolute') as PositioningStrategy,\n boundary: '',\n modifiers: [\n {\n name: 'onUpdate',\n enabled: true,\n phase: 'afterWrite',\n fn: onPopperUpdate,\n },\n ...(state.modifiers || []),\n ],\n onFirstUpdate: onPopperUpdate,\n };\n // if (props.boundarySelector) {\n // const boundary = document.querySelector(props.boundarySelector);\n // modifiers.push({\n // name: 'boundary',\n // enabled: true,\n // phase: 'main',\n // requiresIfExists: ['offset'],\n // fn({ state }) {\n // console.log(\n // detectOverflow(state, {\n // boundary,\n // altBoundary: true,\n // }),\n // );\n // },\n // });\n // }\n });\n\n const alignment = computed(() => {\n const isLeftRight =\n state.direction === 'left' || state.direction === 'right';\n let alignment = '';\n if (state.placement) {\n const parts = state.placement.split('-');\n if (parts.length > 1) alignment = parts[1];\n }\n if (['start', 'top', 'left'].includes(alignment)) {\n return isLeftRight ? 'top' : 'left';\n }\n if (['end', 'bottom', 'right'].includes(alignment)) {\n return isLeftRight ? 'bottom' : 'right';\n }\n return isLeftRight ? 'middle' : 'center';\n });\n\n function destroyPopper() {\n triggerObserver?.disconnect();\n triggerObserver = null;\n if (popper) {\n popper.destroy();\n popper = null;\n }\n }\n\n function setupPopper() {\n nextTick(() => {\n if (isUnmounted) return;\n const el = resolveEl(state.target);\n if (!el || !popoverRef.value) return;\n if (popper && popper.state.elements.reference !== el) {\n destroyPopper();\n }\n if (!popper) {\n popper = createPopper(\n el as Element,\n popoverRef.value,\n popperOptions.value,\n );\n } else {\n popper.update();\n }\n const targetDocument = el.ownerDocument;\n const Observer = targetDocument?.defaultView?.MutationObserver;\n if (Observer && targetDocument && el.isConnected && !triggerObserver) {\n triggerObserver = new Observer(() => {\n if (el.isConnected) return;\n state.force = false;\n state.isVisible = false;\n destroyPopper();\n });\n triggerObserver.observe(targetDocument.documentElement, {\n childList: true,\n subtree: true,\n });\n }\n });\n }\n\n function updateState(newState: Partial<PopoverState>) {\n Object.assign(state, omit(newState, 'force'));\n }\n\n function setTimer(delay: number, fn: Function) {\n clearTimeout(timeout);\n if (delay > 0) {\n timeout = setTimeout(fn, delay);\n } else {\n fn();\n }\n }\n\n function isCurrentTarget(target: unknown) {\n if (!target || !popper) return false;\n const el = resolveEl(target);\n return el === popper.state.elements.reference;\n }\n\n async function show(opts: Partial<PopoverOptions> = {}) {\n if (state.force) return;\n if (opts.force) state.force = true;\n\n setTimer(opts.showDelay ?? props.showDelay, () => {\n const target = resolveEl(opts.target ?? state.target);\n if (!target) return;\n if (state.isVisible) {\n state.force = false;\n }\n updateState({\n ...opts,\n isVisible: true,\n });\n setupPopper();\n });\n }\n\n function hide(opts: Partial<PopoverOptions> = {}) {\n if (opts.target && popper && !isCurrentTarget(opts.target)) return;\n if (!popper && !state.isVisible) return;\n\n if (state.force) return;\n if (opts.force) state.force = true;\n\n setTimer(opts.hideDelay ?? props.hideDelay, () => {\n if (!state.isVisible) state.force = false;\n state.isVisible = false;\n });\n }\n\n function toggle(opts: Partial<PopoverOptions> = {}) {\n if (opts.target == null) return;\n if (state.isVisible && isCurrentTarget(opts.target)) {\n hide(opts);\n } else {\n show(opts);\n }\n }\n\n function onDocumentClick(e: CustomEvent) {\n if (!popper) return;\n const reference = popper.state.elements.reference;\n if (!popoverRef.value || !reference) {\n return;\n }\n // Don't hide if target element is contained within popover ref or content\n const target = e.target as Node;\n if (\n elementContains(popoverRef.value, target) ||\n elementContains(reference as Node, target)\n ) {\n return;\n }\n // Hide the popover\n hide({ force: true });\n }\n\n function onDocumentKeydown(e: KeyboardEvent) {\n if (e.key === 'Esc' || e.key === 'Escape') {\n hide();\n }\n }\n\n function onDocumentShowPopover({ detail }: PopoverEvent) {\n if (!detail.id || detail.id !== props.id) return;\n show(detail);\n }\n\n function onDocumentHidePopover({ detail }: PopoverEvent) {\n if (!detail.id || detail.id !== props.id) return;\n hide(detail);\n }\n\n function onDocumentTogglePopover({ detail }: PopoverEvent) {\n if (!detail.id || detail.id !== props.id) return;\n toggle(detail);\n }\n\n function addEvents(doc: Document) {\n on(doc, 'keydown', onDocumentKeydown);\n on(doc, 'pointerdown', onDocumentClick);\n on(doc, 'show-popover', onDocumentShowPopover);\n on(doc, 'hide-popover', onDocumentHidePopover);\n on(doc, 'toggle-popover', onDocumentTogglePopover);\n }\n\n function removeEvents(doc: Document) {\n off(doc, 'keydown', onDocumentKeydown);\n off(doc, 'pointerdown', onDocumentClick);\n off(doc, 'show-popover', onDocumentShowPopover);\n off(doc, 'hide-popover', onDocumentHidePopover);\n off(doc, 'toggle-popover', onDocumentTogglePopover);\n }\n\n function beforeEnter(el: Element) {\n emit('before-show', el);\n }\n\n function afterEnter(el: Element) {\n state.force = false;\n emit('after-show', el);\n }\n\n function beforeLeave(el: Element) {\n emit('before-hide', el);\n }\n\n function afterLeave(el: Element) {\n state.force = false;\n destroyPopper();\n emit('after-hide', el);\n }\n\n function onClick(e: MouseEvent) {\n e.stopPropagation();\n }\n\n function onMouseOver() {\n state.isHovered = true;\n if (\n state.isInteractive &&\n ['hover', 'hover-focus'].includes(state.visibility)\n ) {\n show();\n }\n }\n\n function onMouseLeave() {\n state.isHovered = false;\n if (!popper) return;\n const popperRef = popper.state.elements.reference;\n if (\n state.autoHide &&\n !state.isFocused &&\n (!popperRef || popperRef !== ownerDocument?.activeElement) &&\n ['hover', 'hover-focus'].includes(state.visibility)\n ) {\n hide();\n }\n }\n\n function onFocusIn() {\n state.isFocused = true;\n if (\n state.isInteractive &&\n ['focus', 'hover-focus'].includes(state.visibility)\n ) {\n show();\n }\n }\n\n function onFocusOut(e: FocusEvent) {\n if (\n ['focus', 'hover-focus'].includes(state.visibility) &&\n (!e.relatedTarget ||\n !elementContains(popoverRef.value!, e.relatedTarget as Node))\n ) {\n state.isFocused = false;\n if (!state.isHovered && state.autoHide) hide();\n }\n }\n\n function cleanupRO() {\n if (resizeObserver != null) {\n resizeObserver.disconnect();\n resizeObserver = null;\n }\n }\n\n watch(\n () => popoverRef.value,\n val => {\n cleanupRO();\n if (!val) return;\n const Observer = val.ownerDocument.defaultView?.ResizeObserver;\n if (!Observer) return;\n resizeObserver = new Observer(() => {\n if (popper) popper.update();\n });\n resizeObserver.observe(val);\n },\n );\n\n watch(() => state.placement, updateDirection, {\n immediate: true,\n });\n\n onMounted(() => {\n ownerDocument = popoverRef.value?.ownerDocument ?? null;\n if (ownerDocument) addEvents(ownerDocument);\n });\n\n onUnmounted(() => {\n isUnmounted = true;\n clearTimeout(timeout);\n destroyPopper();\n cleanupRO();\n if (ownerDocument) removeEvents(ownerDocument);\n ownerDocument = null;\n });\n\n return {\n ...toRefs(state),\n popoverRef,\n alignment,\n hide,\n setupPopper,\n beforeEnter,\n afterEnter,\n beforeLeave,\n afterLeave,\n onClick,\n onMouseOver,\n onMouseLeave,\n onFocusIn,\n onFocusOut,\n };\n },\n});\n</script>\n\n<style lang=\"css\">\n.vc-popover-content-wrapper {\n --popover-horizontal-content-offset: 8px;\n --popover-vertical-content-offset: 10px;\n --popover-caret-horizontal-offset: 18px;\n --popover-caret-vertical-offset: 8px;\n\n position: absolute;\n display: block;\n outline: none;\n z-index: 10;\n &:not(.is-interactive) {\n pointer-events: none;\n }\n}\n\n.vc-popover-content {\n position: relative;\n color: var(--vc-popover-content-color);\n font-weight: var(--vc-font-medium);\n background-color: var(--vc-popover-content-bg);\n border: 1px solid;\n border-color: var(--vc-popover-content-border);\n border-radius: var(--vc-rounded-lg);\n padding: 4px;\n outline: none;\n z-index: 10;\n box-shadow: var(--vc-shadow-lg);\n &.direction-bottom {\n margin-top: var(--popover-vertical-content-offset);\n }\n &.direction-top {\n margin-bottom: var(--popover-vertical-content-offset);\n }\n &.direction-left {\n margin-right: var(--popover-horizontal-content-offset);\n }\n &.direction-right {\n margin-left: var(--popover-horizontal-content-offset);\n }\n}\n\n.vc-popover-caret {\n content: '';\n position: absolute;\n display: block;\n width: 12px;\n height: 12px;\n border-top: inherit;\n border-left: inherit;\n background-color: inherit;\n z-index: -1;\n &.direction-bottom {\n top: 0;\n &.align-left {\n transform: translateY(-50%) rotate(45deg);\n }\n &.align-center {\n transform: translateX(-50%) translateY(-50%) rotate(45deg);\n }\n &.align-right {\n transform: translateY(-50%) rotate(45deg);\n }\n }\n &.direction-top {\n top: 100%;\n &.align-left {\n transform: translateY(-50%) rotate(-135deg);\n }\n &.align-center {\n transform: translateX(-50%) translateY(-50%) rotate(-135deg);\n }\n &.align-right {\n transform: translateY(-50%) rotate(-135deg);\n }\n }\n &.direction-left {\n left: 100%;\n &.align-top {\n transform: translateX(-50%) rotate(135deg);\n }\n &.align-middle {\n transform: translateY(-50%) translateX(-50%) rotate(135deg);\n }\n &.align-bottom {\n transform: translateX(-50%) rotate(135deg);\n }\n }\n &.direction-right {\n left: 0;\n &.align-top {\n transform: translateX(-50%) rotate(-45deg);\n }\n &.align-middle {\n transform: translateY(-50%) translateX(-50%) rotate(-45deg);\n }\n &.align-bottom {\n transform: translateX(-50%) rotate(-45deg);\n }\n }\n &.align-left {\n left: var(--popover-caret-horizontal-offset);\n }\n &.align-center {\n left: 50%;\n }\n &.align-right {\n right: var(--popover-caret-horizontal-offset);\n }\n &.align-top {\n top: var(--popover-caret-vertical-offset);\n }\n &.align-middle {\n top: 50%;\n }\n &.align-bottom {\n bottom: var(--popover-caret-vertical-offset);\n }\n}\n</style>\n","<template>\n <!-- Content row -->\n <div class=\"vc-day-popover-row\">\n <!-- Indicator -->\n <div v-if=\"indicator\" class=\"vc-day-popover-row-indicator\">\n <span :class=\"indicator.class\" />\n </div>\n <!-- Content -->\n <div class=\"vc-day-popover-row-label\">\n <slot>{{\n attribute.popover ? attribute.popover.label : 'No content provided'\n }}</slot>\n </div>\n </div>\n</template>\n\n<script setup lang=\"ts\">\nimport { computed } from 'vue';\nimport { Attribute } from '../../utils/attribute';\n\nconst props = defineProps<{\n attribute: Attribute;\n}>();\n\nconst indicator = computed(() => {\n const { content, highlight, dot, bar, popover } = props.attribute;\n if (popover && popover.hideIndicator) return null;\n if (content) {\n return {\n class: `vc-bar vc-day-popover-row-bar vc-attr vc-${content.base.color}`,\n };\n }\n if (highlight) {\n return {\n class: `vc-highlight-bg-solid vc-day-popover-row-highlight vc-attr vc-${highlight.base.color}`,\n };\n }\n if (dot) {\n return {\n class: `vc-dot vc-attr vc-${dot.base.color}`,\n };\n }\n if (bar) {\n return {\n class: `vc-bar vc-day-popover-row-bar vc-attr vc-${bar.base.color}`,\n };\n }\n return null;\n});\n</script>\n\n<style lang=\"css\">\n.vc-day-popover-row {\n display: flex;\n align-items: center;\n transition: var(--vc-day-content-transition);\n}\n\n.vc-day-popover-row-indicator {\n display: flex;\n justify-content: center;\n align-items: center;\n flex-grow: 0;\n width: 15px;\n & span {\n transition: var(--vc-day-content-transition);\n }\n}\n\n.vc-day-popover-row-label {\n display: flex;\n align-items: center;\n flex-wrap: none;\n flex-grow: 1;\n width: max-content;\n margin-left: 4px;\n margin-right: 4px;\n font-size: var(--vc-text-xs);\n line-height: var(--vc-leading-normal);\n}\n\n.vc-day-popover-row-highlight {\n width: 8px;\n height: 5px;\n border-radius: 3px;\n}\n\n.vc-day-popover-row-dot {\n}\n.vc-day-popover-row-bar {\n width: 10px;\n height: 3px;\n}\n</style>\n","<template>\n <!-- Content row -->\n <div class=\"vc-day-popover-row\">\n <!-- Indicator -->\n <div v-if=\"indicator\" class=\"vc-day-popover-row-indicator\">\n <span :class=\"indicator.class\" />\n </div>\n <!-- Content -->\n <div class=\"vc-day-popover-row-label\">\n <slot>{{\n attribute.popover ? attribute.popover.label : 'No content provided'\n }}</slot>\n </div>\n </div>\n</template>\n\n<script setup lang=\"ts\">\nimport { computed } from 'vue';\nimport { Attribute } from '../../utils/attribute';\n\nconst props = defineProps<{\n attribute: Attribute;\n}>();\n\nconst indicator = computed(() => {\n const { content, highlight, dot, bar, popover } = props.attribute;\n if (popover && popover.hideIndicator) return null;\n if (content) {\n return {\n class: `vc-bar vc-day-popover-row-bar vc-attr vc-${content.base.color}`,\n };\n }\n if (highlight) {\n return {\n class: `vc-highlight-bg-solid vc-day-popover-row-highlight vc-attr vc-${highlight.base.color}`,\n };\n }\n if (dot) {\n return {\n class: `vc-dot vc-attr vc-${dot.base.color}`,\n };\n }\n if (bar) {\n return {\n class: `vc-bar vc-day-popover-row-bar vc-attr vc-${bar.base.color}`,\n };\n }\n return null;\n});\n</script>\n\n<style lang=\"css\">\n.vc-day-popover-row {\n display: flex;\n align-items: center;\n transition: var(--vc-day-content-transition);\n}\n\n.vc-day-popover-row-indicator {\n display: flex;\n justify-content: center;\n align-items: center;\n flex-grow: 0;\n width: 15px;\n & span {\n transition: var(--vc-day-content-transition);\n }\n}\n\n.vc-day-popover-row-label {\n display: flex;\n align-items: center;\n flex-wrap: none;\n flex-grow: 1;\n width: max-content;\n margin-left: 4px;\n margin-right: 4px;\n font-size: var(--vc-text-xs);\n line-height: var(--vc-leading-normal);\n}\n\n.vc-day-popover-row-highlight {\n width: 8px;\n height: 5px;\n border-radius: 3px;\n}\n\n.vc-day-popover-row-dot {\n}\n.vc-day-popover-row-bar {\n width: 10px;\n height: 3px;\n}\n</style>\n","<template>\n <Component v-if=\"slot\" :is=\"slot\" v-bind=\"$attrs\" />\n <slot v-else />\n</template>\n\n<script lang=\"ts\">\nexport default {\n inheritAttrs: false,\n};\n</script>\n\n<script setup lang=\"ts\">\nimport { useSlot } from '../../use/slots';\nimport { VNode } from 'vue';\n\nexport type CalendarSlotName =\n | 'day-content'\n | 'day-popover'\n | 'dp-footer'\n | 'footer'\n | 'header-title-wrapper'\n | 'header-title'\n | 'header-prev-button'\n | 'header-next-button'\n | 'nav'\n | 'nav-prev-button'\n | 'nav-next-button'\n | 'page'\n | 'time-header';\n\nconst props = defineProps<{\n name: CalendarSlotName;\n}>();\n\nconst slot = useSlot(props.name) as unknown as VNode|VNode[];\n</script>\n","<template>\n <Component v-if=\"slot\" :is=\"slot\" v-bind=\"$attrs\" />\n <slot v-else />\n</template>\n\n<script lang=\"ts\">\nexport default {\n inheritAttrs: false,\n};\n</script>\n\n<script setup lang=\"ts\">\nimport { useSlot } from '../../use/slots';\nimport { VNode } from 'vue';\n\nexport type CalendarSlotName =\n | 'day-content'\n | 'day-popover'\n | 'dp-footer'\n | 'footer'\n | 'header-title-wrapper'\n | 'header-title'\n | 'header-prev-button'\n | 'header-next-button'\n | 'nav'\n | 'nav-prev-button'\n | 'nav-next-button'\n | 'page'\n | 'time-header';\n\nconst props = defineProps<{\n name: CalendarSlotName;\n}>();\n\nconst slot = useSlot(props.name) as unknown as VNode|VNode[];\n</script>\n","<template>\n <Popover :id=\"dayPopoverId\" :class=\"[`vc-${color}`, `vc-${displayMode}`]\">\n <template #default=\"{ data: { day, attributes }, hide }\">\n <CalendarSlot\n name=\"day-popover\"\n :day=\"day\"\n :day-title=\"dayTitle(day)\"\n :attributes=\"attributes\"\n :format=\"format\"\n :masks=\"masks\"\n :hide=\"hide\"\n >\n <div class=\"vc-day-popover-container\">\n <div v-if=\"masks.dayPopover\" class=\"vc-day-popover-header\">\n {{ dayTitle(day) }}\n </div>\n <PopoverRow\n v-for=\"attribute in attributes\"\n :key=\"attribute.key\"\n :attribute=\"attribute\"\n />\n </div>\n </CalendarSlot>\n </template>\n </Popover>\n</template>\n\n<script setup lang=\"ts\">\nimport { useCalendar } from '../../use/calendar';\nimport { CalendarDay } from '../../utils/page';\nimport Popover from '../Popover/Popover.vue';\nimport PopoverRow from '../Popover/PopoverRow.vue';\nimport CalendarSlot from './CalendarSlot.vue';\n\nconst { dayPopoverId, displayMode, color, masks, locale } = useCalendar();\n\nfunction format(date: Date, mask: string) {\n return locale.value.formatDate(date, mask);\n}\n\nfunction dayTitle(day: CalendarDay) {\n return locale.value.formatDate(day.date, masks.value.dayPopover);\n}\n</script>\n","<template>\n <Popover :id=\"dayPopoverId\" :class=\"[`vc-${color}`, `vc-${displayMode}`]\">\n <template #default=\"{ data: { day, attributes }, hide }\">\n <CalendarSlot\n name=\"day-popover\"\n :day=\"day\"\n :day-title=\"dayTitle(day)\"\n :attributes=\"attributes\"\n :format=\"format\"\n :masks=\"masks\"\n :hide=\"hide\"\n >\n <div class=\"vc-day-popover-container\">\n <div v-if=\"masks.dayPopover\" class=\"vc-day-popover-header\">\n {{ dayTitle(day) }}\n </div>\n <PopoverRow\n v-for=\"attribute in attributes\"\n :key=\"attribute.key\"\n :attribute=\"attribute\"\n />\n </div>\n </CalendarSlot>\n </template>\n </Popover>\n</template>\n\n<script setup lang=\"ts\">\nimport { useCalendar } from '../../use/calendar';\nimport { CalendarDay } from '../../utils/page';\nimport Popover from '../Popover/Popover.vue';\nimport PopoverRow from '../Popover/PopoverRow.vue';\nimport CalendarSlot from './CalendarSlot.vue';\n\nconst { dayPopoverId, displayMode, color, masks, locale } = useCalendar();\n\nfunction format(date: Date, mask: string) {\n return locale.value.formatDate(date, mask);\n}\n\nfunction dayTitle(day: CalendarDay) {\n return locale.value.formatDate(day.date, masks.value.dayPopover);\n}\n</script>\n","<template>\n <svg stroke-linecap=\"round\" stroke-linejoin=\"round\" viewBox=\"0 0 24 24\">\n <polyline points=\"9 18 15 12 9 6\"></polyline>\n </svg>\n</template>\n","<template>\n <svg stroke-linecap=\"round\" stroke-linejoin=\"round\" viewBox=\"0 0 24 24\">\n <polyline points=\"15 18 9 12 15 6\"></polyline>\n </svg>\n</template>\n","<template>\n <svg stroke-linecap=\"round\" stroke-linejoin=\"round\" viewBox=\"0 0 24 24\">\n <polyline points=\"6 9 12 15 18 9\"></polyline>\n </svg>\n</template>\n","<template>\n <svg\n fill=\"none\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n stroke-width=\"2\"\n viewBox=\"0 0 24 24\"\n >\n <path d=\"M12 8v4l3 3m6-3a9 9 0 11-18 0 9 9 0 0118 0z\" />\n </svg>\n</template>\n","export { default as IconChevronRight } from './IconChevronRight.vue';\nexport { default as IconChevronLeft } from './IconChevronLeft.vue';\nexport { default as IconChevronDown } from './IconChevronDown.vue';\nexport { default as IconClock } from './IconClock.vue';\n","<template>\n <component :is=\"icon\" :width=\"width\" :height=\"height\" class=\"vc-base-icon\" />\n</template>\n\n<script setup lang=\"ts\">\nimport { computed } from 'vue';\nimport * as icons from './icons';\n\nconst props = defineProps({\n name: { type: String, required: true },\n width: { type: String },\n height: { type: String },\n size: { type: String, default: '26' },\n viewBox: { type: String },\n});\n\nconst width = computed(() => props.width || props.size);\nconst height = computed(() => props.height || props.size);\nconst icon = computed(() => (icons as any)[`Icon${props.name}`]);\n</script>\n\n<style lang=\"css\">\n.vc-base-icon {\n display: inline-block;\n stroke: currentColor;\n stroke-width: 2;\n fill: none;\n}\n</style>\n","<template>\n <component :is=\"icon\" :width=\"width\" :height=\"height\" class=\"vc-base-icon\" />\n</template>\n\n<script setup lang=\"ts\">\nimport { computed } from 'vue';\nimport * as icons from './icons';\n\nconst props = defineProps({\n name: { type: String, required: true },\n width: { type: String },\n height: { type: String },\n size: { type: String, default: '26' },\n viewBox: { type: String },\n});\n\nconst width = computed(() => props.width || props.size);\nconst height = computed(() => props.height || props.size);\nconst icon = computed(() => (icons as any)[`Icon${props.name}`]);\n</script>\n\n<style lang=\"css\">\n.vc-base-icon {\n display: inline-block;\n stroke: currentColor;\n stroke-width: 2;\n fill: none;\n}\n</style>\n","<template>\n <div\n class=\"vc-header\"\n :class=\"{ 'is-lg': isLg, 'is-xl': isXl, 'is-2xl': is2xl }\"\n :style=\"gridStyle\"\n >\n <button\n v-if=\"show.prev\"\n type=\"button\"\n class=\"vc-arrow vc-prev vc-focus\"\n :disabled=\"!canMovePrev\"\n @click=\"movePrev\"\n @keydown.space.enter=\"movePrev\"\n >\n <CalendarSlot name=\"header-prev-button\" :disabled=\"!canMovePrev\">\n <BaseIcon name=\"ChevronLeft\" size=\"24\" />\n </CalendarSlot>\n </button>\n <div v-if=\"show.title\" class=\"vc-title-wrapper\">\n <CalendarSlot name=\"header-title-wrapper\">\n <button type=\"button\" class=\"vc-title\" v-popover=\"navPopoverOptions\">\n <CalendarSlot name=\"header-title\" :title=\"page.title\">\n <span>{{ page.title }}</span>\n </CalendarSlot>\n </button>\n </CalendarSlot>\n </div>\n <button\n v-if=\"show.next\"\n type=\"button\"\n class=\"vc-arrow vc-next vc-focus\"\n :disabled=\"!canMoveNext\"\n @click=\"moveNext\"\n @keydown.space.enter=\"moveNext\"\n >\n <CalendarSlot name=\"header-next-button\" :disabled=\"!canMoveNext\">\n <BaseIcon name=\"ChevronRight\" size=\"24\" />\n </CalendarSlot>\n </button>\n </div>\n</template>\n\n<script setup lang=\"ts\">\nimport { computed } from 'vue';\nimport { useCalendar } from '../../use/calendar';\nimport { Page } from '../../utils/page';\nimport { popoverDirective as vPopover } from '../../utils/popovers';\nimport BaseIcon from '../BaseIcon/BaseIcon.vue';\nimport CalendarSlot from './CalendarSlot.vue';\n\nconst props = defineProps<{\n page: Page;\n layout?: string;\n isLg?: boolean;\n isXl?: boolean;\n is2xl?: boolean;\n hideTitle?: boolean;\n hideArrows?: boolean;\n}>();\n\nconst {\n navPopoverId,\n navVisibility,\n canMovePrev,\n movePrev,\n canMoveNext,\n moveNext,\n} = useCalendar();\n\nconst navPlacement = computed(() => {\n switch (props.page.titlePosition) {\n case 'left':\n return 'bottom-start';\n case 'right':\n return 'bottom-end';\n default:\n return 'bottom';\n }\n});\nconst navPopoverOptions = computed(() => {\n const { page } = props;\n return {\n id: navPopoverId.value,\n visibility: navVisibility.value,\n placement: navPlacement.value,\n modifiers: [{ name: 'flip', options: { fallbackPlacements: ['bottom'] } }],\n data: { page },\n isInteractive: true,\n };\n});\nconst titleLeft = computed(() => props.page.titlePosition.includes('left'));\nconst titleRight = computed(() => props.page.titlePosition.includes('right'));\nconst layout_ = computed(() => {\n if (props.layout) return props.layout;\n if (titleLeft.value) return 'tu-pn';\n if (titleRight.value) return 'pn-tu';\n return 'p-tu-n;';\n});\nconst show = computed(() => {\n return {\n prev: layout_.value.includes('p') && !props.hideArrows,\n title: layout_.value.includes('t') && !props.hideTitle,\n next: layout_.value.includes('n') && !props.hideArrows,\n };\n});\nconst gridStyle = computed(() => {\n const gridTemplateColumns = layout_.value\n .split('')\n .map(l => {\n switch (l) {\n case 'p':\n return '[prev] auto';\n case 'n':\n return '[next] auto';\n case 't':\n return '[title] auto';\n case '-':\n return '1fr';\n default:\n return '';\n }\n })\n .join(' ');\n return { gridTemplateColumns };\n});\n</script>\n\n<style lang=\"css\">\n.vc-header {\n display: grid;\n grid-gap: 4px;\n align-items: center;\n height: 30px;\n margin-top: 10px;\n padding-left: 10px;\n padding-right: 10px;\n\n &.is-lg {\n font-size: var(--vc-text-lg);\n }\n &.is-xl {\n font-size: var(--vc-text-xl);\n }\n &.is-2xl {\n font-size: var(--vc-text-2xl);\n }\n\n .vc-title-wrapper {\n grid-row: 1;\n grid-column: title;\n }\n .vc-prev {\n grid-row: 1;\n grid-column: prev;\n }\n .vc-next {\n grid-row: 1;\n grid-column: next;\n }\n\n .vc-title,\n .vc-prev,\n .vc-next {\n display: flex;\n align-items: center;\n border: 0;\n border-radius: var(--vc-rounded);\n pointer-events: auto;\n user-select: none;\n cursor: pointer;\n }\n\n .vc-title {\n color: var(--vc-header-title-color);\n font-weight: var(--vc-font-semibold);\n white-space: nowrap;\n padding: 0 8px;\n margin: 0;\n line-height: 30px;\n &:hover {\n opacity: 0.75;\n }\n }\n\n .vc-arrow {\n display: flex;\n justify-content: center;\n align-items: center;\n color: var(--vc-header-arrow-color);\n width: 28px;\n height: 30px;\n margin: 0;\n padding: 0;\n &:hover {\n background: var(--vc-header-arrow-hover-bg);\n }\n &:disabled {\n opacity: 0.25;\n pointer-events: none;\n }\n }\n}\n</style>\n","<template>\n <div\n class=\"vc-header\"\n :class=\"{ 'is-lg': isLg, 'is-xl': isXl, 'is-2xl': is2xl }\"\n :style=\"gridStyle\"\n >\n <button\n v-if=\"show.prev\"\n type=\"button\"\n class=\"vc-arrow vc-prev vc-focus\"\n :disabled=\"!canMovePrev\"\n @click=\"movePrev\"\n @keydown.space.enter=\"movePrev\"\n >\n <CalendarSlot name=\"header-prev-button\" :disabled=\"!canMovePrev\">\n <BaseIcon name=\"ChevronLeft\" size=\"24\" />\n </CalendarSlot>\n </button>\n <div v-if=\"show.title\" class=\"vc-title-wrapper\">\n <CalendarSlot name=\"header-title-wrapper\">\n <button type=\"button\" class=\"vc-title\" v-popover=\"navPopoverOptions\">\n <CalendarSlot name=\"header-title\" :title=\"page.title\">\n <span>{{ page.title }}</span>\n </CalendarSlot>\n </button>\n </CalendarSlot>\n </div>\n <button\n v-if=\"show.next\"\n type=\"button\"\n class=\"vc-arrow vc-next vc-focus\"\n :disabled=\"!canMoveNext\"\n @click=\"moveNext\"\n @keydown.space.enter=\"moveNext\"\n >\n <CalendarSlot name=\"header-next-button\" :disabled=\"!canMoveNext\">\n <BaseIcon name=\"ChevronRight\" size=\"24\" />\n </CalendarSlot>\n </button>\n </div>\n</template>\n\n<script setup lang=\"ts\">\nimport { computed } from 'vue';\nimport { useCalendar } from '../../use/calendar';\nimport { Page } from '../../utils/page';\nimport { popoverDirective as vPopover } from '../../utils/popovers';\nimport BaseIcon from '../BaseIcon/BaseIcon.vue';\nimport CalendarSlot from './CalendarSlot.vue';\n\nconst props = defineProps<{\n page: Page;\n layout?: string;\n isLg?: boolean;\n isXl?: boolean;\n is2xl?: boolean;\n hideTitle?: boolean;\n hideArrows?: boolean;\n}>();\n\nconst {\n navPopoverId,\n navVisibility,\n canMovePrev,\n movePrev,\n canMoveNext,\n moveNext,\n} = useCalendar();\n\nconst navPlacement = computed(() => {\n switch (props.page.titlePosition) {\n case 'left':\n return 'bottom-start';\n case 'right':\n return 'bottom-end';\n default:\n return 'bottom';\n }\n});\nconst navPopoverOptions = computed(() => {\n const { page } = props;\n return {\n id: navPopoverId.value,\n visibility: navVisibility.value,\n placement: navPlacement.value,\n modifiers: [{ name: 'flip', options: { fallbackPlacements: ['bottom'] } }],\n data: { page },\n isInteractive: true,\n };\n});\nconst titleLeft = computed(() => props.page.titlePosition.includes('left'));\nconst titleRight = computed(() => props.page.titlePosition.includes('right'));\nconst layout_ = computed(() => {\n if (props.layout) return props.layout;\n if (titleLeft.value) return 'tu-pn';\n if (titleRight.value) return 'pn-tu';\n return 'p-tu-n;';\n});\nconst show = computed(() => {\n return {\n prev: layout_.value.includes('p') && !props.hideArrows,\n title: layout_.value.includes('t') && !props.hideTitle,\n next: layout_.value.includes('n') && !props.hideArrows,\n };\n});\nconst gridStyle = computed(() => {\n const gridTemplateColumns = layout_.value\n .split('')\n .map(l => {\n switch (l) {\n case 'p':\n return '[prev] auto';\n case 'n':\n return '[next] auto';\n case 't':\n return '[title] auto';\n case '-':\n return '1fr';\n default:\n return '';\n }\n })\n .join(' ');\n return { gridTemplateColumns };\n});\n</script>\n\n<style lang=\"css\">\n.vc-header {\n display: grid;\n grid-gap: 4px;\n align-items: center;\n height: 30px;\n margin-top: 10px;\n padding-left: 10px;\n padding-right: 10px;\n\n &.is-lg {\n font-size: var(--vc-text-lg);\n }\n &.is-xl {\n font-size: var(--vc-text-xl);\n }\n &.is-2xl {\n font-size: var(--vc-text-2xl);\n }\n\n .vc-title-wrapper {\n grid-row: 1;\n grid-column: title;\n }\n .vc-prev {\n grid-row: 1;\n grid-column: prev;\n }\n .vc-next {\n grid-row: 1;\n grid-column: next;\n }\n\n .vc-title,\n .vc-prev,\n .vc-next {\n display: flex;\n align-items: center;\n border: 0;\n border-radius: var(--vc-rounded);\n pointer-events: auto;\n user-select: none;\n cursor: pointer;\n }\n\n .vc-title {\n color: var(--vc-header-title-color);\n font-weight: var(--vc-font-semibold);\n white-space: nowrap;\n padding: 0 8px;\n margin: 0;\n line-height: 30px;\n &:hover {\n opacity: 0.75;\n }\n }\n\n .vc-arrow {\n display: flex;\n justify-content: center;\n align-items: center;\n color: var(--vc-header-arrow-color);\n width: 28px;\n height: 30px;\n margin: 0;\n padding: 0;\n &:hover {\n background: var(--vc-header-arrow-hover-bg);\n }\n &:disabled {\n opacity: 0.25;\n pointer-events: none;\n }\n }\n}\n</style>\n","import { type Ref, inject, provide } from 'vue';\nimport { useCalendar } from '..';\nimport { getMonthDates } from '../utils/date/helpers';\nimport { type Page, getPageId } from '../utils/page';\n\nexport interface MonthNavItem {\n month: number;\n year: number;\n id: string;\n label: string;\n ariaLabel: string;\n isActive: boolean;\n isCurrent: boolean;\n isDisabled: boolean;\n}\n\nexport type YearNavItem = Omit<MonthNavItem, 'month'>;\n\nexport type CalendarPageContext = ReturnType<typeof createPage>;\n\nconst contextKey = Symbol('__vc_page_context__');\n\nexport function createPage(page: Ref<Page>) {\n const { locale, getDateAddress, canMove } = useCalendar();\n\n function getMonthItems(year: number, mask: string): MonthNavItem[] {\n const { month: thisMonth, year: thisYear } = getDateAddress(new Date());\n return getMonthDates().map((d, i: number) => {\n const month = i + 1;\n return {\n month,\n year,\n id: getPageId(month, year),\n label: locale.value.formatDate(d, mask),\n ariaLabel: locale.value.formatDate(d, 'MMMM'),\n isActive: month === page.value.month && year === page.value.year,\n isCurrent: month === thisMonth && year === thisYear,\n isDisabled: !canMove(\n { month, year },\n { position: page.value.position },\n ),\n };\n });\n }\n\n function getYearItems(startYear: number, endYear: number): YearNavItem[] {\n const { year: thisYear } = getDateAddress(new Date());\n const { position } = page.value;\n const items = [];\n for (let year = startYear; year <= endYear; year += 1) {\n const enabled = [...Array(12).keys()].some(m =>\n canMove({ month: m + 1, year }, { position }),\n );\n items.push({\n year,\n id: year.toString(),\n label: year.toString(),\n ariaLabel: year.toString(),\n isActive: year === page.value.year,\n isCurrent: year === thisYear,\n isDisabled: !enabled,\n });\n }\n return items;\n }\n\n const context = { page, getMonthItems, getYearItems };\n provide(contextKey, context);\n return context;\n}\n\nexport function usePage(): CalendarPageContext {\n const context = inject<CalendarPageContext>(contextKey);\n if (context) return context;\n throw new Error(\n 'Page context missing. Please verify this component is nested within a valid context provider.',\n );\n}\n","<template>\n <!--Nav panel-->\n <div class=\"vc-nav-container\" ref=\"navContainer\">\n <!--Nav header-->\n <div class=\"vc-nav-header\">\n <!--Move prev button-->\n <button\n type=\"button\"\n class=\"vc-nav-arrow is-left vc-focus\"\n :disabled=\"!prevItemsEnabled\"\n @click=\"movePrev\"\n @keydown=\"(e: KeyboardEvent) => onSpaceOrEnter(e, movePrev)\"\n >\n <CalendarSlot\n name=\"nav-prev-button\"\n :move=\"movePrev\"\n :disabled=\"!prevItemsEnabled\"\n >\n <BaseIcon name=\"ChevronLeft\" width=\"22px\" height=\"24px\" />\n </CalendarSlot>\n </button>\n <!--Mode switch button-->\n <button\n type=\"button\"\n class=\"vc-nav-title vc-focus\"\n @click=\"toggleMode\"\n @keydown=\"(e: KeyboardEvent) => onSpaceOrEnter(e, toggleMode)\"\n >\n {{ title }}\n </button>\n <!--Move next button-->\n <button\n type=\"button\"\n class=\"vc-nav-arrow is-right vc-focus\"\n :disabled=\"!nextItemsEnabled\"\n @click=\"moveNext\"\n @keydown=\"(e: KeyboardEvent) => onSpaceOrEnter(e, moveNext)\"\n >\n <CalendarSlot\n name=\"nav-next-button\"\n :move=\"moveNext\"\n :disabled=\"!nextItemsEnabled\"\n >\n <BaseIcon name=\"ChevronRight\" width=\"22px\" height=\"24px\" />\n </CalendarSlot>\n </button>\n </div>\n <!--Navigation items-->\n <div class=\"vc-nav-items\">\n <button\n v-for=\"item in activeItems\"\n :key=\"item.label\"\n type=\"button\"\n :data-id=\"item.id\"\n :aria-label=\"item.ariaLabel\"\n class=\"vc-nav-item vc-focus\"\n :class=\"[\n item.isActive ? 'is-active' : item.isCurrent ? 'is-current' : '',\n ]\"\n :disabled=\"item.isDisabled\"\n @click=\"item.click\"\n @keydown=\"(e: KeyboardEvent) => onSpaceOrEnter(e, item.click)\"\n >\n {{ item.label }}\n </button>\n </div>\n </div>\n</template>\n\n<script setup lang=\"ts\">\nimport { computed, onMounted, ref, watch, watchEffect } from 'vue';\nimport { useCalendar } from '../../use/calendar';\nimport { usePage } from '../../use/page';\nimport { head, last, onSpaceOrEnter } from '../../utils/helpers';\nimport BaseIcon from '../BaseIcon/BaseIcon.vue';\nimport CalendarSlot from './CalendarSlot.vue';\n\nexport type IQuerySelector = Pick<HTMLElement, 'querySelector'>;\n\nconst { masks, move } = useCalendar();\nconst { page, getMonthItems, getYearItems } = usePage();\n\nconst monthMode = ref(true);\nconst yearGroupCount = 12;\n\nconst selectedYear = ref(page.value.year);\nconst selectedYearGroup = ref(getYearGroupIndex(page.value.year));\nconst navContainer = ref<IQuerySelector | null>(null);\n\nfunction focusFirstItem() {\n // Use setTimeout instead of $nextTick so it plays nice with popperjs\n setTimeout(() => {\n if (navContainer.value == null) return;\n // Set focus on the first enabled nav item\n const focusableEl = navContainer.value.querySelector(\n '.vc-nav-item:not(:disabled)',\n ) as HTMLElement;\n if (focusableEl) {\n focusableEl.focus();\n }\n }, 10);\n}\n\nfunction getYearGroupIndex(year: number) {\n return Math.floor(year / yearGroupCount);\n}\n\nfunction toggleMode() {\n monthMode.value = !monthMode.value;\n}\n\nfunction getStartYear(groupIndex: number) {\n return groupIndex * yearGroupCount;\n}\n\nfunction getEndYear(groupIndex: number) {\n return yearGroupCount * (groupIndex + 1) - 1;\n}\n\n// #region Move methods\n\nfunction movePrev() {\n if (!prevItemsEnabled.value) return;\n if (monthMode.value) {\n movePrevYear();\n }\n movePrevYearGroup();\n}\n\nfunction moveNext() {\n if (!nextItemsEnabled.value) return;\n if (monthMode.value) {\n moveNextYear();\n }\n moveNextYearGroup();\n}\n\nfunction movePrevYear() {\n selectedYear.value--;\n}\n\nfunction moveNextYear() {\n selectedYear.value++;\n}\n\nfunction movePrevYearGroup() {\n selectedYearGroup.value--;\n}\n\nfunction moveNextYearGroup() {\n selectedYearGroup.value++;\n}\n\n// #endregion Move methods\n\nconst monthItems = computed(() =>\n getMonthItems(selectedYear.value, masks.value.navMonths).map(item => ({\n ...item,\n click: () =>\n move(\n { month: item.month, year: item.year },\n { position: page.value.position },\n ),\n })),\n);\n\nconst prevMonthItems = computed(() =>\n getMonthItems(selectedYear.value - 1, masks.value.navMonths),\n);\n\nconst prevMonthItemsEnabled = computed(() =>\n prevMonthItems.value.some(i => !i.isDisabled),\n);\n\nconst nextMonthItems = computed(() =>\n getMonthItems(selectedYear.value + 1, masks.value.navMonths),\n);\n\nconst nextMonthItemsEnabled = computed(() =>\n nextMonthItems.value.some(i => !i.isDisabled),\n);\n\nconst yearItems = computed(() =>\n getYearItems(\n getStartYear(selectedYearGroup.value),\n getEndYear(selectedYearGroup.value),\n ).map(item => {\n return {\n ...item,\n click: () => {\n selectedYear.value = item.year;\n monthMode.value = true;\n focusFirstItem();\n },\n };\n }),\n);\n\nconst prevYearItems = computed(() =>\n getYearItems(\n getStartYear(selectedYearGroup.value - 1),\n getEndYear(selectedYearGroup.value - 1),\n ),\n);\n\nconst prevYearItemsEnabled = computed(() =>\n prevYearItems.value.some(i => !i.isDisabled),\n);\n\nconst nextYearItems = computed(() =>\n getYearItems(\n getStartYear(selectedYearGroup.value + 1),\n getEndYear(selectedYearGroup.value + 1),\n ),\n);\n\nconst nextYearItemsEnabled = computed(() =>\n nextYearItems.value.some(i => !i.isDisabled),\n);\n\nconst activeItems = computed(() =>\n monthMode.value ? monthItems.value : yearItems.value,\n);\n\nconst prevItemsEnabled = computed(() =>\n monthMode.value ? prevMonthItemsEnabled.value : prevYearItemsEnabled.value,\n);\n\nconst nextItemsEnabled = computed(() =>\n monthMode.value ? nextMonthItemsEnabled.value : nextYearItemsEnabled.value,\n);\n\nconst firstYear = computed(() => head(yearItems.value.map(i => i.year)));\n\nconst lastYear = computed(() => last(yearItems.value.map(i => i.year)));\n\nconst title = computed(() => {\n return monthMode.value\n ? selectedYear.value\n : `${firstYear.value} - ${lastYear.value}`;\n});\n\nwatchEffect(() => {\n selectedYear.value = page.value.year;\n focusFirstItem();\n});\n\nwatch(\n () => selectedYear.value,\n val => (selectedYearGroup.value = getYearGroupIndex(val)),\n);\n\nonMounted(() => focusFirstItem());\n</script>\n\n<style lang=\"css\">\n.vc-nav-header {\n display: flex;\n justify-content: space-between;\n}\n\n.vc-nav-title,\n.vc-nav-arrow,\n.vc-nav-item {\n font-size: var(--vc-text-sm);\n margin: 0;\n cursor: pointer;\n user-select: none;\n border: 0;\n border-radius: var(--vc-rounded);\n white-space: nowrap;\n &:hover {\n background-color: var(--vc-nav-hover-bg);\n }\n &:disabled {\n opacity: 0.25;\n pointer-events: none;\n }\n}\n\n.vc-nav-title {\n color: var(--vc-nav-title-color);\n font-weight: var(--vc-font-bold);\n line-height: var(--vc-leading-snug);\n height: 30px;\n padding: 0 6px;\n}\n\n.vc-nav-arrow {\n display: flex;\n justify-content: center;\n align-items: center;\n color: var(--vc-header-arrow-color);\n width: 26px;\n height: 30px;\n padding: 0;\n}\n\n.vc-nav-items {\n display: grid;\n grid-template-columns: repeat(3, 1fr);\n grid-row-gap: 2px;\n grid-column-gap: 5px;\n margin-top: 2px;\n}\n\n.vc-nav-item {\n width: 48px;\n text-align: center;\n font-weight: var(--vc-font-semibold);\n line-height: var(--vc-leading-snug);\n padding: 6px 0;\n &.is-active {\n color: var(--vc-nav-item-active-color);\n background-color: var(--vc-nav-item-active-bg);\n font-weight: var(--vc-font-bold);\n &:not(:focus) {\n box-shadow: var(--vc-nav-item-active-box-shadow);\n }\n }\n &.is-current {\n color: var(--vc-nav-item-current-color);\n }\n}\n</style>\n","<template>\n <!--Nav panel-->\n <div class=\"vc-nav-container\" ref=\"navContainer\">\n <!--Nav header-->\n <div class=\"vc-nav-header\">\n <!--Move prev button-->\n <button\n type=\"button\"\n class=\"vc-nav-arrow is-left vc-focus\"\n :disabled=\"!prevItemsEnabled\"\n @click=\"movePrev\"\n @keydown=\"(e: KeyboardEvent) => onSpaceOrEnter(e, movePrev)\"\n >\n <CalendarSlot\n name=\"nav-prev-button\"\n :move=\"movePrev\"\n :disabled=\"!prevItemsEnabled\"\n >\n <BaseIcon name=\"ChevronLeft\" width=\"22px\" height=\"24px\" />\n </CalendarSlot>\n </button>\n <!--Mode switch button-->\n <button\n type=\"button\"\n class=\"vc-nav-title vc-focus\"\n @click=\"toggleMode\"\n @keydown=\"(e: KeyboardEvent) => onSpaceOrEnter(e, toggleMode)\"\n >\n {{ title }}\n </button>\n <!--Move next button-->\n <button\n type=\"button\"\n class=\"vc-nav-arrow is-right vc-focus\"\n :disabled=\"!nextItemsEnabled\"\n @click=\"moveNext\"\n @keydown=\"(e: KeyboardEvent) => onSpaceOrEnter(e, moveNext)\"\n >\n <CalendarSlot\n name=\"nav-next-button\"\n :move=\"moveNext\"\n :disabled=\"!nextItemsEnabled\"\n >\n <BaseIcon name=\"ChevronRight\" width=\"22px\" height=\"24px\" />\n </CalendarSlot>\n </button>\n </div>\n <!--Navigation items-->\n <div class=\"vc-nav-items\">\n <button\n v-for=\"item in activeItems\"\n :key=\"item.label\"\n type=\"button\"\n :data-id=\"item.id\"\n :aria-label=\"item.ariaLabel\"\n class=\"vc-nav-item vc-focus\"\n :class=\"[\n item.isActive ? 'is-active' : item.isCurrent ? 'is-current' : '',\n ]\"\n :disabled=\"item.isDisabled\"\n @click=\"item.click\"\n @keydown=\"(e: KeyboardEvent) => onSpaceOrEnter(e, item.click)\"\n >\n {{ item.label }}\n </button>\n </div>\n </div>\n</template>\n\n<script setup lang=\"ts\">\nimport { computed, onMounted, ref, watch, watchEffect } from 'vue';\nimport { useCalendar } from '../../use/calendar';\nimport { usePage } from '../../use/page';\nimport { head, last, onSpaceOrEnter } from '../../utils/helpers';\nimport BaseIcon from '../BaseIcon/BaseIcon.vue';\nimport CalendarSlot from './CalendarSlot.vue';\n\nexport type IQuerySelector = Pick<HTMLElement, 'querySelector'>;\n\nconst { masks, move } = useCalendar();\nconst { page, getMonthItems, getYearItems } = usePage();\n\nconst monthMode = ref(true);\nconst yearGroupCount = 12;\n\nconst selectedYear = ref(page.value.year);\nconst selectedYearGroup = ref(getYearGroupIndex(page.value.year));\nconst navContainer = ref<IQuerySelector | null>(null);\n\nfunction focusFirstItem() {\n // Use setTimeout instead of $nextTick so it plays nice with popperjs\n setTimeout(() => {\n if (navContainer.value == null) return;\n // Set focus on the first enabled nav item\n const focusableEl = navContainer.value.querySelector(\n '.vc-nav-item:not(:disabled)',\n ) as HTMLElement;\n if (focusableEl) {\n focusableEl.focus();\n }\n }, 10);\n}\n\nfunction getYearGroupIndex(year: number) {\n return Math.floor(year / yearGroupCount);\n}\n\nfunction toggleMode() {\n monthMode.value = !monthMode.value;\n}\n\nfunction getStartYear(groupIndex: number) {\n return groupIndex * yearGroupCount;\n}\n\nfunction getEndYear(groupIndex: number) {\n return yearGroupCount * (groupIndex + 1) - 1;\n}\n\n// #region Move methods\n\nfunction movePrev() {\n if (!prevItemsEnabled.value) return;\n if (monthMode.value) {\n movePrevYear();\n }\n movePrevYearGroup();\n}\n\nfunction moveNext() {\n if (!nextItemsEnabled.value) return;\n if (monthMode.value) {\n moveNextYear();\n }\n moveNextYearGroup();\n}\n\nfunction movePrevYear() {\n selectedYear.value--;\n}\n\nfunction moveNextYear() {\n selectedYear.value++;\n}\n\nfunction movePrevYearGroup() {\n selectedYearGroup.value--;\n}\n\nfunction moveNextYearGroup() {\n selectedYearGroup.value++;\n}\n\n// #endregion Move methods\n\nconst monthItems = computed(() =>\n getMonthItems(selectedYear.value, masks.value.navMonths).map(item => ({\n ...item,\n click: () =>\n move(\n { month: item.month, year: item.year },\n { position: page.value.position },\n ),\n })),\n);\n\nconst prevMonthItems = computed(() =>\n getMonthItems(selectedYear.value - 1, masks.value.navMonths),\n);\n\nconst prevMonthItemsEnabled = computed(() =>\n prevMonthItems.value.some(i => !i.isDisabled),\n);\n\nconst nextMonthItems = computed(() =>\n getMonthItems(selectedYear.value + 1, masks.value.navMonths),\n);\n\nconst nextMonthItemsEnabled = computed(() =>\n nextMonthItems.value.some(i => !i.isDisabled),\n);\n\nconst yearItems = computed(() =>\n getYearItems(\n getStartYear(selectedYearGroup.value),\n getEndYear(selectedYearGroup.value),\n ).map(item => {\n return {\n ...item,\n click: () => {\n selectedYear.value = item.year;\n monthMode.value = true;\n focusFirstItem();\n },\n };\n }),\n);\n\nconst prevYearItems = computed(() =>\n getYearItems(\n getStartYear(selectedYearGroup.value - 1),\n getEndYear(selectedYearGroup.value - 1),\n ),\n);\n\nconst prevYearItemsEnabled = computed(() =>\n prevYearItems.value.some(i => !i.isDisabled),\n);\n\nconst nextYearItems = computed(() =>\n getYearItems(\n getStartYear(selectedYearGroup.value + 1),\n getEndYear(selectedYearGroup.value + 1),\n ),\n);\n\nconst nextYearItemsEnabled = computed(() =>\n nextYearItems.value.some(i => !i.isDisabled),\n);\n\nconst activeItems = computed(() =>\n monthMode.value ? monthItems.value : yearItems.value,\n);\n\nconst prevItemsEnabled = computed(() =>\n monthMode.value ? prevMonthItemsEnabled.value : prevYearItemsEnabled.value,\n);\n\nconst nextItemsEnabled = computed(() =>\n monthMode.value ? nextMonthItemsEnabled.value : nextYearItemsEnabled.value,\n);\n\nconst firstYear = computed(() => head(yearItems.value.map(i => i.year)));\n\nconst lastYear = computed(() => last(yearItems.value.map(i => i.year)));\n\nconst title = computed(() => {\n return monthMode.value\n ? selectedYear.value\n : `${firstYear.value} - ${lastYear.value}`;\n});\n\nwatchEffect(() => {\n selectedYear.value = page.value.year;\n focusFirstItem();\n});\n\nwatch(\n () => selectedYear.value,\n val => (selectedYearGroup.value = getYearGroupIndex(val)),\n);\n\nonMounted(() => focusFirstItem());\n</script>\n\n<style lang=\"css\">\n.vc-nav-header {\n display: flex;\n justify-content: space-between;\n}\n\n.vc-nav-title,\n.vc-nav-arrow,\n.vc-nav-item {\n font-size: var(--vc-text-sm);\n margin: 0;\n cursor: pointer;\n user-select: none;\n border: 0;\n border-radius: var(--vc-rounded);\n white-space: nowrap;\n &:hover {\n background-color: var(--vc-nav-hover-bg);\n }\n &:disabled {\n opacity: 0.25;\n pointer-events: none;\n }\n}\n\n.vc-nav-title {\n color: var(--vc-nav-title-color);\n font-weight: var(--vc-font-bold);\n line-height: var(--vc-leading-snug);\n height: 30px;\n padding: 0 6px;\n}\n\n.vc-nav-arrow {\n display: flex;\n justify-content: center;\n align-items: center;\n color: var(--vc-header-arrow-color);\n width: 26px;\n height: 30px;\n padding: 0;\n}\n\n.vc-nav-items {\n display: grid;\n grid-template-columns: repeat(3, 1fr);\n grid-row-gap: 2px;\n grid-column-gap: 5px;\n margin-top: 2px;\n}\n\n.vc-nav-item {\n width: 48px;\n text-align: center;\n font-weight: var(--vc-font-semibold);\n line-height: var(--vc-leading-snug);\n padding: 6px 0;\n &.is-active {\n color: var(--vc-nav-item-active-color);\n background-color: var(--vc-nav-item-active-bg);\n font-weight: var(--vc-font-bold);\n &:not(:focus) {\n box-shadow: var(--vc-nav-item-active-box-shadow);\n }\n }\n &.is-current {\n color: var(--vc-nav-item-current-color);\n }\n}\n</style>\n","<template>\n <slot />\n</template>\n\n<script setup lang=\"ts\">\nimport { toRef } from 'vue';\nimport { createPage } from '../../use/page';\nimport type { Page } from '../../utils/page';\n\nconst props = defineProps<{\n page: Page;\n}>();\n\ncreatePage(toRef(props, 'page'));\n</script>\n","<template>\n <slot />\n</template>\n\n<script setup lang=\"ts\">\nimport { toRef } from 'vue';\nimport { createPage } from '../../use/page';\nimport type { Page } from '../../utils/page';\n\nconst props = defineProps<{\n page: Page;\n}>();\n\ncreatePage(toRef(props, 'page'));\n</script>\n","<template>\n <Popover\n :id=\"navPopoverId\"\n :class=\"['vc-nav-popover-container', `vc-${color}`, `vc-${displayMode}`]\"\n >\n <template #default=\"{ data }\">\n <CalendarPageProvider :page=\"data.page\">\n <CalendarSlot name=\"nav\">\n <CalendarNav />\n </CalendarSlot>\n </CalendarPageProvider>\n </template>\n </Popover>\n</template>\n\n<script setup lang=\"ts\">\nimport { useCalendar } from '../../use/calendar';\nimport Popover from '../Popover/Popover.vue';\nimport CalendarNav from './CalendarNav.vue';\nimport CalendarPageProvider from './CalendarPageProvider.vue';\nimport CalendarSlot from './CalendarSlot.vue';\n\nconst { navPopoverId, color, displayMode } = useCalendar();\n</script>\n","<template>\n <Popover\n :id=\"navPopoverId\"\n :class=\"['vc-nav-popover-container', `vc-${color}`, `vc-${displayMode}`]\"\n >\n <template #default=\"{ data }\">\n <CalendarPageProvider :page=\"data.page\">\n <CalendarSlot name=\"nav\">\n <CalendarNav />\n </CalendarSlot>\n </CalendarPageProvider>\n </template>\n </Popover>\n</template>\n\n<script setup lang=\"ts\">\nimport { useCalendar } from '../../use/calendar';\nimport Popover from '../Popover/Popover.vue';\nimport CalendarNav from './CalendarNav.vue';\nimport CalendarPageProvider from './CalendarPageProvider.vue';\nimport CalendarSlot from './CalendarSlot.vue';\n\nconst { navPopoverId, color, displayMode } = useCalendar();\n</script>\n","<template>\n <div :class=\"dayClasses\">\n <!--Highlights-->\n <div v-if=\"hasHighlights\" class=\"vc-highlights vc-day-layer\">\n <div\n v-for=\"{ key, wrapperClass, class: bgClass, style } in highlights\"\n :key=\"key\"\n :class=\"wrapperClass\"\n >\n <div :class=\"bgClass\" :style=\"style\" />\n </div>\n </div>\n <!--Content-->\n <CalendarSlot\n name=\"day-content\"\n :day=\"day\"\n :attributes=\"attributes\"\n :attribute-cells=\"attributeCells\"\n :dayProps=\"dayContentProps\"\n :dayEvents=\"dayContentEvents\"\n :locale=\"locale\"\n >\n <div\n v-bind=\"dayContentProps\"\n v-on=\"dayContentEvents\"\n v-popover=\"dayPopover\"\n >\n {{ day.label }}\n </div>\n </CalendarSlot>\n <!--Dots-->\n <div v-if=\"hasDots\" class=\"vc-day-layer vc-day-box-center-bottom\">\n <div class=\"vc-dots\">\n <span\n v-for=\"{ key, class: bgClass, style } in dots\"\n :key=\"key\"\n :class=\"bgClass\"\n :style=\"style\"\n />\n </div>\n </div>\n <!--Bars-->\n <div v-if=\"hasBars\" class=\"vc-day-layer vc-day-box-center-bottom\">\n <div class=\"vc-bars\">\n <span\n v-for=\"{ key, class: bgClass, style } in bars\"\n :key=\"key\"\n :class=\"bgClass\"\n :style=\"style\"\n />\n </div>\n </div>\n </div>\n</template>\n\n<script lang=\"ts\">\nimport { type PropType, computed, defineComponent } from 'vue';\nimport { useCalendar } from '../../use/calendar';\nimport { useSlot } from '../../use/slots';\nimport type { Attribute, PopoverConfig } from '../../utils/attribute';\nimport type { DateRangeCell } from '../../utils/date/range';\nimport { arrayHasItems, defaults, get, last } from '../../utils/helpers';\nimport type { CalendarDay } from '../../utils/page';\nimport { popoverDirective } from '../../utils/popovers';\nimport CalendarSlot from './CalendarSlot.vue';\n\nexport default defineComponent({\n directives: { popover: popoverDirective },\n components: { CalendarSlot },\n props: {\n day: { type: Object as PropType<CalendarDay>, required: true },\n },\n setup(props) {\n const {\n locale,\n theme,\n attributeContext,\n dayPopoverId,\n onDayClick,\n onDayMouseenter,\n onDayMouseleave,\n onDayFocusin,\n onDayFocusout,\n onDayKeydown,\n } = useCalendar();\n\n const day = computed(() => props.day);\n const attributeCells = computed(() => {\n return attributeContext.value.getCells(day.value);\n });\n const attributes = computed(() =>\n attributeCells.value.map(cell => cell.data as Attribute),\n );\n const attributedDay = computed(() => {\n return {\n ...day.value,\n attributes: attributes.value,\n attributeCells: attributeCells.value,\n };\n });\n\n function processPopover(\n { data: attribute }: DateRangeCell<Attribute>,\n { popovers }: { popovers: PopoverConfig[] },\n ) {\n const { key, customData, popover } = attribute;\n if (!popover) return;\n const resolvedPopover = defaults(\n {\n key,\n customData,\n attribute,\n },\n { ...popover },\n {\n visibility: popover.label ? 'hover' : 'click',\n placement: 'bottom',\n isInteractive: !popover.label,\n },\n );\n popovers.splice(0, 0, resolvedPopover);\n }\n\n const glyphs = computed(() => {\n const result = {\n ...theme.value.prepareRender({}),\n popovers: [],\n };\n attributeCells.value.forEach(cell => {\n theme.value.render(cell, result);\n processPopover(cell, result);\n });\n return result;\n });\n\n const highlights = computed(() => glyphs.value.highlights);\n const hasHighlights = computed(() => !!arrayHasItems(highlights.value));\n\n const content = computed(() => glyphs.value.content);\n\n const dots = computed(() => glyphs.value.dots);\n const hasDots = computed(() => !!arrayHasItems(dots.value));\n\n const bars = computed(() => glyphs.value.bars);\n const hasBars = computed(() => !!arrayHasItems(bars.value));\n\n const popovers = computed(() => glyphs.value.popovers);\n const popoverAttrs = computed(() =>\n popovers.value.map((p: any) => p.attribute),\n );\n\n const dayContentSlot = useSlot('day-content');\n const dayClasses = computed(() => {\n return [\n 'vc-day',\n ...day.value.classes,\n { 'vc-day-box-center-center': !dayContentSlot },\n { 'is-not-in-month': !props.day.inMonth },\n ];\n });\n\n const dayContentProps = computed(() => {\n let tabindex;\n if (day.value.isFocusable) {\n tabindex = '0';\n } else {\n tabindex = '-1';\n }\n const classes = [\n 'vc-day-content vc-focusable vc-focus vc-attr',\n { 'vc-disabled': day.value.isDisabled },\n get(last(highlights.value), 'contentClass'),\n get(last(content.value), 'class') || '',\n ];\n const style = {\n ...get(last(highlights.value), 'contentStyle'),\n ...get(last(content.value), 'style'),\n };\n return {\n class: classes,\n style,\n tabindex,\n 'aria-label': day.value.ariaLabel,\n 'aria-disabled': day.value.isDisabled ? true : false,\n role: 'button',\n };\n });\n\n const dayContentEvents = computed(() => {\n return {\n click(event: MouseEvent) {\n onDayClick(attributedDay.value, event);\n },\n mouseenter(event: MouseEvent) {\n onDayMouseenter(attributedDay.value, event);\n },\n mouseleave(event: MouseEvent) {\n onDayMouseleave(attributedDay.value, event);\n },\n focusin(event: FocusEvent) {\n onDayFocusin(attributedDay.value, event);\n },\n focusout(event: FocusEvent) {\n onDayFocusout(attributedDay.value, event);\n },\n keydown(event: KeyboardEvent) {\n onDayKeydown(attributedDay.value, event);\n },\n };\n });\n\n const dayPopover = computed(() => {\n if (!arrayHasItems(popovers.value)) return null;\n return defaults(\n {\n id: dayPopoverId.value,\n data: { day, attributes: popoverAttrs.value },\n },\n ...popovers.value,\n );\n });\n\n return {\n attributes,\n attributeCells,\n bars,\n dayClasses,\n dayContentProps,\n dayContentEvents,\n dayPopover,\n glyphs,\n dots,\n hasDots,\n hasBars,\n highlights,\n hasHighlights,\n locale,\n popovers,\n };\n },\n});\n</script>\n\n<style>\n.vc-day {\n position: relative;\n min-height: 32px;\n z-index: 1;\n /* &.is-not-in-month * {\n opacity: 0;\n pointer-events: none;\n } */\n}\n\n.vc-monthly .is-not-in-month * {\n opacity: 0;\n pointer-events: none;\n}\n\n.vc-day-layer {\n position: absolute;\n left: 0;\n right: 0;\n top: 0;\n bottom: 0;\n pointer-events: none;\n}\n\n.vc-day-box-center-center {\n display: flex;\n justify-content: center;\n align-items: center;\n transform-origin: 50% 50%;\n}\n\n.vc-day-box-left-center {\n display: flex;\n justify-content: flex-start;\n align-items: center;\n transform-origin: 0% 50%;\n}\n\n.vc-day-box-right-center {\n display: flex;\n justify-content: flex-end;\n align-items: center;\n transform-origin: 100% 50%;\n}\n\n.vc-day-box-center-bottom {\n display: flex;\n justify-content: center;\n align-items: flex-end;\n}\n\n.vc-day-content {\n display: flex;\n justify-content: center;\n align-items: center;\n font-size: var(--vc-text-sm);\n font-weight: var(--vc-font-medium);\n width: 28px;\n height: 28px;\n line-height: 28px;\n border-radius: var(--vc-rounded-full);\n user-select: none;\n cursor: pointer;\n &:hover {\n background-color: var(--vc-day-content-hover-bg);\n }\n &.vc-disabled {\n color: var(--vc-day-content-disabled-color);\n }\n}\n\n/* ----Content---- */\n\n.vc-content:not(.vc-base) {\n font-weight: var(--vc-font-bold);\n color: var(--vc-content-color);\n}\n\n/* ----Highlights---- */\n\n.vc-highlights {\n overflow: hidden;\n pointer-events: none;\n z-index: -1;\n}\n\n.vc-highlight {\n width: 28px;\n height: 28px;\n &.vc-highlight-base-start {\n width: 50% !important;\n border-radius: 0 !important;\n border-right-width: 0 !important;\n }\n &.vc-highlight-base-end {\n width: 50% !important;\n border-radius: 0 !important;\n border-left-width: 0 !important;\n }\n &.vc-highlight-base-middle {\n width: 100%;\n border-radius: 0 !important;\n border-left-width: 0 !important;\n border-right-width: 0 !important;\n margin: 0 -1px;\n }\n}\n\n.vc-highlight-bg-outline,\n.vc-highlight-bg-none {\n background-color: var(--vc-highlight-outline-bg);\n border: 2px solid;\n border-color: var(--vc-highlight-outline-border);\n border-radius: var(--vc-rounded-full);\n}\n.vc-highlight-bg-light {\n background-color: var(--vc-highlight-light-bg);\n border-radius: var(--vc-rounded-full);\n}\n.vc-highlight-bg-solid {\n background-color: var(--vc-highlight-solid-bg);\n border-radius: var(--vc-rounded-full);\n}\n\n.vc-highlight-content-outline,\n.vc-highlight-content-none {\n font-weight: var(--vc-font-bold);\n color: var(--vc-highlight-outline-content-color);\n}\n.vc-highlight-content-light {\n font-weight: var(--vc-font-bold);\n color: var(--vc-highlight-light-content-color);\n}\n.vc-highlight-content-solid {\n font-weight: var(--vc-font-bold);\n color: var(--vc-highlight-solid-content-color);\n}\n\n/* ----Dots---- */\n\n.vc-dots {\n display: flex;\n justify-content: center;\n align-items: center;\n}\n\n.vc-dot {\n width: 5px;\n height: 5px;\n border-radius: 9999px;\n transition: var(--vc-day-content-transition);\n &:not(:last-child) {\n margin-right: 3px;\n }\n}\n\n/* ----Bars---- */\n\n.vc-bars {\n display: flex;\n justify-content: flex-start;\n align-items: center;\n width: 75%;\n}\n\n.vc-bar {\n flex-grow: 1;\n height: 3px;\n transition: var(--vc-day-content-transition);\n}\n\n.vc-dot {\n background-color: var(--vc-dot-bg);\n}\n.vc-bar {\n background-color: var(--vc-bar-bg);\n}\n</style>\n","<template>\n <div :class=\"dayClasses\">\n <!--Highlights-->\n <div v-if=\"hasHighlights\" class=\"vc-highlights vc-day-layer\">\n <div\n v-for=\"{ key, wrapperClass, class: bgClass, style } in highlights\"\n :key=\"key\"\n :class=\"wrapperClass\"\n >\n <div :class=\"bgClass\" :style=\"style\" />\n </div>\n </div>\n <!--Content-->\n <CalendarSlot\n name=\"day-content\"\n :day=\"day\"\n :attributes=\"attributes\"\n :attribute-cells=\"attributeCells\"\n :dayProps=\"dayContentProps\"\n :dayEvents=\"dayContentEvents\"\n :locale=\"locale\"\n >\n <div\n v-bind=\"dayContentProps\"\n v-on=\"dayContentEvents\"\n v-popover=\"dayPopover\"\n >\n {{ day.label }}\n </div>\n </CalendarSlot>\n <!--Dots-->\n <div v-if=\"hasDots\" class=\"vc-day-layer vc-day-box-center-bottom\">\n <div class=\"vc-dots\">\n <span\n v-for=\"{ key, class: bgClass, style } in dots\"\n :key=\"key\"\n :class=\"bgClass\"\n :style=\"style\"\n />\n </div>\n </div>\n <!--Bars-->\n <div v-if=\"hasBars\" class=\"vc-day-layer vc-day-box-center-bottom\">\n <div class=\"vc-bars\">\n <span\n v-for=\"{ key, class: bgClass, style } in bars\"\n :key=\"key\"\n :class=\"bgClass\"\n :style=\"style\"\n />\n </div>\n </div>\n </div>\n</template>\n\n<script lang=\"ts\">\nimport { type PropType, computed, defineComponent } from 'vue';\nimport { useCalendar } from '../../use/calendar';\nimport { useSlot } from '../../use/slots';\nimport type { Attribute, PopoverConfig } from '../../utils/attribute';\nimport type { DateRangeCell } from '../../utils/date/range';\nimport { arrayHasItems, defaults, get, last } from '../../utils/helpers';\nimport type { CalendarDay } from '../../utils/page';\nimport { popoverDirective } from '../../utils/popovers';\nimport CalendarSlot from './CalendarSlot.vue';\n\nexport default defineComponent({\n directives: { popover: popoverDirective },\n components: { CalendarSlot },\n props: {\n day: { type: Object as PropType<CalendarDay>, required: true },\n },\n setup(props) {\n const {\n locale,\n theme,\n attributeContext,\n dayPopoverId,\n onDayClick,\n onDayMouseenter,\n onDayMouseleave,\n onDayFocusin,\n onDayFocusout,\n onDayKeydown,\n } = useCalendar();\n\n const day = computed(() => props.day);\n const attributeCells = computed(() => {\n return attributeContext.value.getCells(day.value);\n });\n const attributes = computed(() =>\n attributeCells.value.map(cell => cell.data as Attribute),\n );\n const attributedDay = computed(() => {\n return {\n ...day.value,\n attributes: attributes.value,\n attributeCells: attributeCells.value,\n };\n });\n\n function processPopover(\n { data: attribute }: DateRangeCell<Attribute>,\n { popovers }: { popovers: PopoverConfig[] },\n ) {\n const { key, customData, popover } = attribute;\n if (!popover) return;\n const resolvedPopover = defaults(\n {\n key,\n customData,\n attribute,\n },\n { ...popover },\n {\n visibility: popover.label ? 'hover' : 'click',\n placement: 'bottom',\n isInteractive: !popover.label,\n },\n );\n popovers.splice(0, 0, resolvedPopover);\n }\n\n const glyphs = computed(() => {\n const result = {\n ...theme.value.prepareRender({}),\n popovers: [],\n };\n attributeCells.value.forEach(cell => {\n theme.value.render(cell, result);\n processPopover(cell, result);\n });\n return result;\n });\n\n const highlights = computed(() => glyphs.value.highlights);\n const hasHighlights = computed(() => !!arrayHasItems(highlights.value));\n\n const content = computed(() => glyphs.value.content);\n\n const dots = computed(() => glyphs.value.dots);\n const hasDots = computed(() => !!arrayHasItems(dots.value));\n\n const bars = computed(() => glyphs.value.bars);\n const hasBars = computed(() => !!arrayHasItems(bars.value));\n\n const popovers = computed(() => glyphs.value.popovers);\n const popoverAttrs = computed(() =>\n popovers.value.map((p: any) => p.attribute),\n );\n\n const dayContentSlot = useSlot('day-content');\n const dayClasses = computed(() => {\n return [\n 'vc-day',\n ...day.value.classes,\n { 'vc-day-box-center-center': !dayContentSlot },\n { 'is-not-in-month': !props.day.inMonth },\n ];\n });\n\n const dayContentProps = computed(() => {\n let tabindex;\n if (day.value.isFocusable) {\n tabindex = '0';\n } else {\n tabindex = '-1';\n }\n const classes = [\n 'vc-day-content vc-focusable vc-focus vc-attr',\n { 'vc-disabled': day.value.isDisabled },\n get(last(highlights.value), 'contentClass'),\n get(last(content.value), 'class') || '',\n ];\n const style = {\n ...get(last(highlights.value), 'contentStyle'),\n ...get(last(content.value), 'style'),\n };\n return {\n class: classes,\n style,\n tabindex,\n 'aria-label': day.value.ariaLabel,\n 'aria-disabled': day.value.isDisabled ? true : false,\n role: 'button',\n };\n });\n\n const dayContentEvents = computed(() => {\n return {\n click(event: MouseEvent) {\n onDayClick(attributedDay.value, event);\n },\n mouseenter(event: MouseEvent) {\n onDayMouseenter(attributedDay.value, event);\n },\n mouseleave(event: MouseEvent) {\n onDayMouseleave(attributedDay.value, event);\n },\n focusin(event: FocusEvent) {\n onDayFocusin(attributedDay.value, event);\n },\n focusout(event: FocusEvent) {\n onDayFocusout(attributedDay.value, event);\n },\n keydown(event: KeyboardEvent) {\n onDayKeydown(attributedDay.value, event);\n },\n };\n });\n\n const dayPopover = computed(() => {\n if (!arrayHasItems(popovers.value)) return null;\n return defaults(\n {\n id: dayPopoverId.value,\n data: { day, attributes: popoverAttrs.value },\n },\n ...popovers.value,\n );\n });\n\n return {\n attributes,\n attributeCells,\n bars,\n dayClasses,\n dayContentProps,\n dayContentEvents,\n dayPopover,\n glyphs,\n dots,\n hasDots,\n hasBars,\n highlights,\n hasHighlights,\n locale,\n popovers,\n };\n },\n});\n</script>\n\n<style>\n.vc-day {\n position: relative;\n min-height: 32px;\n z-index: 1;\n /* &.is-not-in-month * {\n opacity: 0;\n pointer-events: none;\n } */\n}\n\n.vc-monthly .is-not-in-month * {\n opacity: 0;\n pointer-events: none;\n}\n\n.vc-day-layer {\n position: absolute;\n left: 0;\n right: 0;\n top: 0;\n bottom: 0;\n pointer-events: none;\n}\n\n.vc-day-box-center-center {\n display: flex;\n justify-content: center;\n align-items: center;\n transform-origin: 50% 50%;\n}\n\n.vc-day-box-left-center {\n display: flex;\n justify-content: flex-start;\n align-items: center;\n transform-origin: 0% 50%;\n}\n\n.vc-day-box-right-center {\n display: flex;\n justify-content: flex-end;\n align-items: center;\n transform-origin: 100% 50%;\n}\n\n.vc-day-box-center-bottom {\n display: flex;\n justify-content: center;\n align-items: flex-end;\n}\n\n.vc-day-content {\n display: flex;\n justify-content: center;\n align-items: center;\n font-size: var(--vc-text-sm);\n font-weight: var(--vc-font-medium);\n width: 28px;\n height: 28px;\n line-height: 28px;\n border-radius: var(--vc-rounded-full);\n user-select: none;\n cursor: pointer;\n &:hover {\n background-color: var(--vc-day-content-hover-bg);\n }\n &.vc-disabled {\n color: var(--vc-day-content-disabled-color);\n }\n}\n\n/* ----Content---- */\n\n.vc-content:not(.vc-base) {\n font-weight: var(--vc-font-bold);\n color: var(--vc-content-color);\n}\n\n/* ----Highlights---- */\n\n.vc-highlights {\n overflow: hidden;\n pointer-events: none;\n z-index: -1;\n}\n\n.vc-highlight {\n width: 28px;\n height: 28px;\n &.vc-highlight-base-start {\n width: 50% !important;\n border-radius: 0 !important;\n border-right-width: 0 !important;\n }\n &.vc-highlight-base-end {\n width: 50% !important;\n border-radius: 0 !important;\n border-left-width: 0 !important;\n }\n &.vc-highlight-base-middle {\n width: 100%;\n border-radius: 0 !important;\n border-left-width: 0 !important;\n border-right-width: 0 !important;\n margin: 0 -1px;\n }\n}\n\n.vc-highlight-bg-outline,\n.vc-highlight-bg-none {\n background-color: var(--vc-highlight-outline-bg);\n border: 2px solid;\n border-color: var(--vc-highlight-outline-border);\n border-radius: var(--vc-rounded-full);\n}\n.vc-highlight-bg-light {\n background-color: var(--vc-highlight-light-bg);\n border-radius: var(--vc-rounded-full);\n}\n.vc-highlight-bg-solid {\n background-color: var(--vc-highlight-solid-bg);\n border-radius: var(--vc-rounded-full);\n}\n\n.vc-highlight-content-outline,\n.vc-highlight-content-none {\n font-weight: var(--vc-font-bold);\n color: var(--vc-highlight-outline-content-color);\n}\n.vc-highlight-content-light {\n font-weight: var(--vc-font-bold);\n color: var(--vc-highlight-light-content-color);\n}\n.vc-highlight-content-solid {\n font-weight: var(--vc-font-bold);\n color: var(--vc-highlight-solid-content-color);\n}\n\n/* ----Dots---- */\n\n.vc-dots {\n display: flex;\n justify-content: center;\n align-items: center;\n}\n\n.vc-dot {\n width: 5px;\n height: 5px;\n border-radius: 9999px;\n transition: var(--vc-day-content-transition);\n &:not(:last-child) {\n margin-right: 3px;\n }\n}\n\n/* ----Bars---- */\n\n.vc-bars {\n display: flex;\n justify-content: flex-start;\n align-items: center;\n width: 75%;\n}\n\n.vc-bar {\n flex-grow: 1;\n height: 3px;\n transition: var(--vc-day-content-transition);\n}\n\n.vc-dot {\n background-color: var(--vc-dot-bg);\n}\n.vc-bar {\n background-color: var(--vc-bar-bg);\n}\n</style>\n","<template>\n <div\n :class=\"[\n 'vc-pane',\n `row-${page.row}`,\n `row-from-end-${page.rowFromEnd}`,\n `column-${page.column}`,\n `column-from-end-${page.columnFromEnd}`,\n ]\"\n ref=\"pane\"\n >\n <CalendarHeader :page=\"page\" is-lg hide-arrows />\n <div\n class=\"vc-weeks\"\n :class=\"{\n [`vc-show-weeknumbers-${page.weeknumberPosition}`]:\n page.weeknumberPosition,\n }\"\n >\n <div class=\"vc-weekdays\">\n <!--Weekday labels-->\n <div\n v-for=\"({ weekday, label }, i) in page.weekdays\"\n :key=\"i\"\n :class=\"`vc-weekday vc-weekday-${weekday}`\"\n >\n {{ label }}\n </div>\n </div>\n <!--Weeks-->\n <div\n v-for=\"week in page.viewWeeks\"\n :key=\"`weeknumber-${week.weeknumber}`\"\n class=\"vc-week\"\n >\n <!--Weeknumber-->\n <div\n v-if=\"page.weeknumberPosition\"\n :class=\"['vc-weeknumber', `is-${page.weeknumberPosition}`]\"\n >\n <span\n :class=\"['vc-weeknumber-content']\"\n @click=\"onWeeknumberClick(week, $event)\"\n >{{ week.weeknumberDisplay }}</span\n >\n </div>\n <!--Week days-->\n <CalendarDay v-for=\"day in week.days\" :key=\"day.id\" :day=\"day\" />\n </div>\n </div>\n </div>\n</template>\n\n<script lang=\"ts\">\nexport default {\n inheritAttrs: false,\n};\n</script>\n\n<script setup lang=\"ts\">\nimport CalendarDay from './CalendarDay.vue';\nimport CalendarHeader from './CalendarHeader.vue';\nimport { useCalendar } from '../../use/calendar';\nimport { usePage } from '../../use/page';\n\nconst { page } = usePage();\nconst { onWeeknumberClick } = useCalendar();\n</script>\n\n<style lang=\"css\">\n.vc-pane {\n min-width: 250px;\n}\n\n.vc-weeknumber {\n display: flex;\n justify-content: center;\n align-items: center;\n position: absolute;\n &.is-left {\n left: calc(var(--vc-weeknumber-offset-inside) * -1);\n }\n &.is-right {\n right: calc(var(--vc-weeknumber-offset-inside) * -1);\n }\n &.is-left-outside {\n left: calc(var(--vc-weeknumber-offset-outside) * -1);\n }\n &.is-right-outside {\n right: calc(var(--vc-weeknumber-offset-outside) * -1);\n }\n}\n\n.vc-weeknumber-content {\n display: flex;\n justify-content: center;\n align-items: center;\n font-size: var(--vc-text-xs);\n font-weight: var(--vc-font-medium);\n font-style: italic;\n width: 28px;\n height: 28px;\n margin-top: 2px;\n color: var(--vc-weeknumber-color);\n user-select: none;\n}\n\n.vc-weeks {\n position: relative;\n /* overflow: auto; */\n -webkit-overflow-scrolling: touch;\n padding: 6px;\n min-width: 232px;\n &.vc-show-weeknumbers-left {\n margin-left: var(--vc-weeknumber-offset-inside);\n }\n &.vc-show-weeknumbers-right {\n margin-right: var(--vc-weeknumber-offset-inside);\n }\n}\n\n.vc-weekday {\n text-align: center;\n color: var(--vc-weekday-color);\n font-size: var(--vc-text-sm);\n font-weight: var(--vc-font-bold);\n line-height: 14px;\n padding-top: 4px;\n padding-bottom: 8px;\n cursor: default;\n user-select: none;\n}\n\n.vc-week,\n.vc-weekdays {\n display: grid;\n grid-template-columns: repeat(7, 1fr);\n position: relative;\n}\n</style>\n","<template>\n <div\n :class=\"[\n 'vc-pane',\n `row-${page.row}`,\n `row-from-end-${page.rowFromEnd}`,\n `column-${page.column}`,\n `column-from-end-${page.columnFromEnd}`,\n ]\"\n ref=\"pane\"\n >\n <CalendarHeader :page=\"page\" is-lg hide-arrows />\n <div\n class=\"vc-weeks\"\n :class=\"{\n [`vc-show-weeknumbers-${page.weeknumberPosition}`]:\n page.weeknumberPosition,\n }\"\n >\n <div class=\"vc-weekdays\">\n <!--Weekday labels-->\n <div\n v-for=\"({ weekday, label }, i) in page.weekdays\"\n :key=\"i\"\n :class=\"`vc-weekday vc-weekday-${weekday}`\"\n >\n {{ label }}\n </div>\n </div>\n <!--Weeks-->\n <div\n v-for=\"week in page.viewWeeks\"\n :key=\"`weeknumber-${week.weeknumber}`\"\n class=\"vc-week\"\n >\n <!--Weeknumber-->\n <div\n v-if=\"page.weeknumberPosition\"\n :class=\"['vc-weeknumber', `is-${page.weeknumberPosition}`]\"\n >\n <span\n :class=\"['vc-weeknumber-content']\"\n @click=\"onWeeknumberClick(week, $event)\"\n >{{ week.weeknumberDisplay }}</span\n >\n </div>\n <!--Week days-->\n <CalendarDay v-for=\"day in week.days\" :key=\"day.id\" :day=\"day\" />\n </div>\n </div>\n </div>\n</template>\n\n<script lang=\"ts\">\nexport default {\n inheritAttrs: false,\n};\n</script>\n\n<script setup lang=\"ts\">\nimport CalendarDay from './CalendarDay.vue';\nimport CalendarHeader from './CalendarHeader.vue';\nimport { useCalendar } from '../../use/calendar';\nimport { usePage } from '../../use/page';\n\nconst { page } = usePage();\nconst { onWeeknumberClick } = useCalendar();\n</script>\n\n<style lang=\"css\">\n.vc-pane {\n min-width: 250px;\n}\n\n.vc-weeknumber {\n display: flex;\n justify-content: center;\n align-items: center;\n position: absolute;\n &.is-left {\n left: calc(var(--vc-weeknumber-offset-inside) * -1);\n }\n &.is-right {\n right: calc(var(--vc-weeknumber-offset-inside) * -1);\n }\n &.is-left-outside {\n left: calc(var(--vc-weeknumber-offset-outside) * -1);\n }\n &.is-right-outside {\n right: calc(var(--vc-weeknumber-offset-outside) * -1);\n }\n}\n\n.vc-weeknumber-content {\n display: flex;\n justify-content: center;\n align-items: center;\n font-size: var(--vc-text-xs);\n font-weight: var(--vc-font-medium);\n font-style: italic;\n width: 28px;\n height: 28px;\n margin-top: 2px;\n color: var(--vc-weeknumber-color);\n user-select: none;\n}\n\n.vc-weeks {\n position: relative;\n /* overflow: auto; */\n -webkit-overflow-scrolling: touch;\n padding: 6px;\n min-width: 232px;\n &.vc-show-weeknumbers-left {\n margin-left: var(--vc-weeknumber-offset-inside);\n }\n &.vc-show-weeknumbers-right {\n margin-right: var(--vc-weeknumber-offset-inside);\n }\n}\n\n.vc-weekday {\n text-align: center;\n color: var(--vc-weekday-color);\n font-size: var(--vc-text-sm);\n font-weight: var(--vc-font-bold);\n line-height: 14px;\n padding-top: 4px;\n padding-bottom: 8px;\n cursor: default;\n user-select: none;\n}\n\n.vc-week,\n.vc-weekdays {\n display: grid;\n grid-template-columns: repeat(7, 1fr);\n position: relative;\n}\n</style>\n","<template>\n <div\n data-helptext=\"Press the arrow keys to navigate by day, Home and End to navigate to week ends, PageUp and PageDown to navigate by month, Alt+PageUp and Alt+PageDown to navigate by year\"\n v-bind=\"$attrs\"\n :class=\"[\n 'vc-container',\n `vc-${view}`,\n `vc-${color}`,\n `vc-${displayMode}`,\n {\n 'vc-expanded': expanded,\n 'vc-bordered': !borderless,\n 'vc-transparent': transparent,\n },\n ]\"\n @mouseup.prevent\n ref=\"containerRef\"\n >\n <!--Calendar Container-->\n <div :class=\"['vc-pane-container', { 'in-transition': inTransition }]\">\n <div class=\"vc-pane-header-wrapper\">\n <CalendarHeader v-if=\"firstPage\" :page=\"firstPage!\" is-lg hide-title />\n </div>\n <Transition\n :name=\"`vc-${transitionName}`\"\n @before-enter=\"onTransitionBeforeEnter\"\n @after-enter=\"onTransitionAfterEnter\"\n >\n <!--Calendar Layout-->\n <div\n :key=\"pages[0].id\"\n class=\"vc-pane-layout\"\n :style=\"{\n gridTemplateColumns: `repeat(${columns}, 1fr)`,\n }\"\n >\n <!--Calendar pages-->\n <CalendarPageProvider\n v-for=\"page in pages\"\n :key=\"page.id\"\n :page=\"page\"\n >\n <CalendarSlot name=\"page\" :page=\"page\">\n <CalendarPage />\n </CalendarSlot>\n </CalendarPageProvider>\n </div>\n </Transition>\n <CalendarSlot name=\"footer\" />\n </div>\n </div>\n <!--Day popover-->\n <CalendarDayPopover />\n <!--Nav popover-->\n <CalendarNavPopover />\n</template>\n\n<script lang=\"ts\">\nimport { defineComponent } from 'vue';\nimport { createCalendar, emitsDef, propsDef } from '../../use/calendar';\nimport CalendarDayPopover from './CalendarDayPopover.vue';\nimport CalendarHeader from './CalendarHeader.vue';\nimport CalendarNavPopover from './CalendarNavPopover.vue';\nimport CalendarPage from './CalendarPage.vue';\nimport CalendarPageProvider from './CalendarPageProvider.vue';\nimport CalendarSlot from './CalendarSlot.vue';\n\nexport default defineComponent({\n components: {\n CalendarHeader,\n CalendarPage,\n CalendarNavPopover,\n CalendarDayPopover,\n CalendarPageProvider,\n CalendarSlot,\n },\n props: propsDef,\n emits: emitsDef,\n setup(props, { emit, slots }) {\n return createCalendar(props, { emit, slots });\n },\n});\n</script>\n\n<style>\n.vc-pane-container {\n width: 100%;\n position: relative;\n &.in-transition {\n overflow: hidden;\n }\n}\n\n.vc-pane-layout {\n display: grid;\n}\n\n.vc-pane-header-wrapper {\n position: absolute;\n top: 0;\n width: 100%;\n pointer-events: none;\n}\n\n.vc-day-popover-container {\n font-size: var(--vc-text-xs);\n font-weight: var(--vc-font-medium);\n}\n\n.vc-day-popover-header {\n font-size: var(--vc-text-xs);\n color: var(--vc-day-popover-header-color);\n font-weight: var(--vc-font-semibold);\n text-align: center;\n}\n</style>\n","<template>\n <div\n data-helptext=\"Press the arrow keys to navigate by day, Home and End to navigate to week ends, PageUp and PageDown to navigate by month, Alt+PageUp and Alt+PageDown to navigate by year\"\n v-bind=\"$attrs\"\n :class=\"[\n 'vc-container',\n `vc-${view}`,\n `vc-${color}`,\n `vc-${displayMode}`,\n {\n 'vc-expanded': expanded,\n 'vc-bordered': !borderless,\n 'vc-transparent': transparent,\n },\n ]\"\n @mouseup.prevent\n ref=\"containerRef\"\n >\n <!--Calendar Container-->\n <div :class=\"['vc-pane-container', { 'in-transition': inTransition }]\">\n <div class=\"vc-pane-header-wrapper\">\n <CalendarHeader v-if=\"firstPage\" :page=\"firstPage!\" is-lg hide-title />\n </div>\n <Transition\n :name=\"`vc-${transitionName}`\"\n @before-enter=\"onTransitionBeforeEnter\"\n @after-enter=\"onTransitionAfterEnter\"\n >\n <!--Calendar Layout-->\n <div\n :key=\"pages[0].id\"\n class=\"vc-pane-layout\"\n :style=\"{\n gridTemplateColumns: `repeat(${columns}, 1fr)`,\n }\"\n >\n <!--Calendar pages-->\n <CalendarPageProvider\n v-for=\"page in pages\"\n :key=\"page.id\"\n :page=\"page\"\n >\n <CalendarSlot name=\"page\" :page=\"page\">\n <CalendarPage />\n </CalendarSlot>\n </CalendarPageProvider>\n </div>\n </Transition>\n <CalendarSlot name=\"footer\" />\n </div>\n </div>\n <!--Day popover-->\n <CalendarDayPopover />\n <!--Nav popover-->\n <CalendarNavPopover />\n</template>\n\n<script lang=\"ts\">\nimport { defineComponent } from 'vue';\nimport { createCalendar, emitsDef, propsDef } from '../../use/calendar';\nimport CalendarDayPopover from './CalendarDayPopover.vue';\nimport CalendarHeader from './CalendarHeader.vue';\nimport CalendarNavPopover from './CalendarNavPopover.vue';\nimport CalendarPage from './CalendarPage.vue';\nimport CalendarPageProvider from './CalendarPageProvider.vue';\nimport CalendarSlot from './CalendarSlot.vue';\n\nexport default defineComponent({\n components: {\n CalendarHeader,\n CalendarPage,\n CalendarNavPopover,\n CalendarDayPopover,\n CalendarPageProvider,\n CalendarSlot,\n },\n props: propsDef,\n emits: emitsDef,\n setup(props, { emit, slots }) {\n return createCalendar(props, { emit, slots });\n },\n});\n</script>\n\n<style>\n.vc-pane-container {\n width: 100%;\n position: relative;\n &.in-transition {\n overflow: hidden;\n }\n}\n\n.vc-pane-layout {\n display: grid;\n}\n\n.vc-pane-header-wrapper {\n position: absolute;\n top: 0;\n width: 100%;\n pointer-events: none;\n}\n\n.vc-day-popover-container {\n font-size: var(--vc-text-xs);\n font-weight: var(--vc-font-medium);\n}\n\n.vc-day-popover-header {\n font-size: var(--vc-text-xs);\n color: var(--vc-day-popover-header-color);\n font-weight: var(--vc-font-semibold);\n text-align: center;\n}\n</style>\n","import {\n type SetupContext,\n type ExtractPropTypes,\n type PropType,\n ref,\n computed,\n watch,\n onMounted,\n onUnmounted,\n nextTick,\n toRef,\n inject,\n provide,\n} from 'vue';\nimport Calendar from '../components/Calendar/Calendar.vue';\nimport Popover from '../components/Popover/Popover.vue';\nimport { getDefault } from '../utils/defaults';\nimport type { AttributeConfig } from '../utils/attribute';\nimport { type CalendarDay, getPageAddressForDate } from '../utils/page';\nimport {\n defaultsDeep,\n isArray,\n isDate,\n isNumber,\n isObject,\n isString,\n} from '../utils/helpers';\nimport {\n type DatePatch,\n type DateParts,\n type DatePartsRules,\n type DateSource,\n type SimpleDateParts,\n isDateParts,\n} from '../utils/date/helpers';\nimport type { SimpleDateRange } from '../utils/date/range';\nimport {\n type PopoverOptions,\n showPopover as sp,\n hidePopover as hp,\n togglePopover as tp,\n getPopoverEventHandlers,\n} from '../utils/popovers';\nimport { propsDef as basePropsDef, createBase } from './base';\nimport type { MoveTarget, MoveOptions } from './calendar';\nimport { provideSlots } from './slots';\n\nexport type DateType = 'date' | 'string' | 'number';\n\nexport interface DateConfig {\n type: DateType;\n rules: DatePartsRules;\n mask?: string;\n}\n\nconst contextKey = Symbol('__vc_date_picker_context__');\n\nexport type DateModes = 'date' | 'datetime' | 'time';\n\nexport type ValueTarget = 'start' | 'end';\n\nexport interface UpdateOptions {\n config: any;\n patch: DatePatch;\n debounce: number;\n clearIfEqual: boolean;\n formatInput: boolean;\n hidePopover: boolean;\n dragging: boolean;\n targetPriority: ValueTarget;\n moveToValue: boolean;\n}\n\nexport interface ModelModifiers {\n number?: boolean;\n string?: boolean;\n range?: boolean;\n}\n\nexport type DatePickerDate = DateSource | Partial<SimpleDateParts> | null;\nexport type DatePickerRangeArray = [DatePickerDate, DatePickerDate];\nexport type DatePickerRangeObject = {\n start: Exclude<DatePickerDate, null>;\n end: Exclude<DatePickerDate, null>;\n};\nexport type DatePickerModel = DatePickerDate | DatePickerRangeObject;\n\nexport type DatePickerContext = ReturnType<typeof createDatePicker>;\n\nexport type DatePickerProps = Readonly<ExtractPropTypes<typeof propsDef>>;\n\nexport const propsDef = {\n ...basePropsDef,\n mode: { type: String, default: 'date' },\n modelValue: {\n type: [Number, String, Date, Object] as PropType<DatePickerModel>,\n },\n modelModifiers: {\n type: Object as PropType<ModelModifiers>,\n default: () => ({}),\n },\n rules: [String, Object] as PropType<'auto' | DatePartsRules>,\n is24hr: Boolean,\n hideTimeHeader: Boolean,\n timeAccuracy: { type: Number, default: 2 },\n isRequired: Boolean,\n isRange: Boolean,\n updateOnInput: {\n type: Boolean,\n default: () => getDefault('datePicker.updateOnInput'),\n },\n inputDebounce: {\n type: Number,\n default: () => getDefault('datePicker.inputDebounce'),\n },\n popover: {\n type: [Boolean, Object] as PropType<boolean | Partial<PopoverOptions>>,\n default: true,\n },\n dragAttribute: Object as PropType<AttributeConfig>,\n selectAttribute: Object as PropType<AttributeConfig>,\n attributes: [Object, Array],\n};\n\nexport const emits = [\n 'update:modelValue',\n 'drag',\n 'dayclick',\n 'daykeydown',\n 'popover-will-show',\n 'popover-did-show',\n 'popover-will-hide',\n 'popover-did-hide',\n];\n\nexport function createDatePicker(\n props: DatePickerProps,\n { emit, slots }: SetupContext<string[]>,\n) {\n provideSlots(slots, { footer: 'dp-footer' });\n\n const baseCtx = createBase(props);\n const { locale, masks, disabledAttribute } = baseCtx;\n\n const showCalendar = ref(false);\n const datePickerPopoverId = ref(Symbol());\n const dateValue = ref<null | Date | SimpleDateRange>(null);\n const dragValue = ref<null | SimpleDateRange>(null);\n const inputValues = ref<string[]>(['', '']);\n const popoverRef = ref<InstanceType<typeof Popover> | null>(null);\n const calendarRef = ref<InstanceType<typeof Calendar> | null>(null);\n\n let updateTimeout: ReturnType<typeof setTimeout> | undefined;\n let dragTrackingValue: null | SimpleDateRange;\n let watchValue = true;\n\n // #region Computed\n\n const isRange = computed(() => {\n return props.isRange || props.modelModifiers.range === true;\n });\n\n const valueStart = computed(() =>\n isRange.value && dateValue.value != null\n ? (dateValue.value as SimpleDateRange).start\n : null,\n );\n\n const valueEnd = computed(() =>\n isRange.value && dateValue.value != null\n ? (dateValue.value as SimpleDateRange).end\n : null,\n );\n\n const isDateMode = computed(() => props.mode.toLowerCase() === 'date');\n const isDateTimeMode = computed(\n () => props.mode.toLowerCase() === 'datetime',\n );\n const isTimeMode = computed(() => props.mode.toLowerCase() === 'time');\n\n const isDragging = computed(() => !!dragValue.value);\n\n const modelConfig = computed(() => {\n let type: DateType = 'date';\n if (props.modelModifiers.number) type = 'number';\n if (props.modelModifiers.string) type = 'string';\n const mask = masks.value.modelValue || 'iso';\n return normalizeConfig(<DateConfig>{ type, mask });\n });\n\n const dateParts = computed(() =>\n getDateParts(dragValue.value ?? dateValue.value),\n );\n\n const inputMask = computed(() => {\n if (isTimeMode.value) {\n return props.is24hr ? masks.value.inputTime24hr : masks.value.inputTime;\n }\n if (isDateTimeMode.value) {\n return props.is24hr\n ? masks.value.inputDateTime24hr\n : masks.value.inputDateTime;\n }\n return masks.value.input;\n });\n\n const inputMaskHasTime = computed(() => /[Hh]/g.test(inputMask.value));\n\n const inputMaskHasDate = computed(() =>\n /[dD]{1,2}|Do|W{1,4}|M{1,4}|YY(?:YY)?/g.test(inputMask.value),\n );\n\n const inputMaskPatch = computed(() => {\n if (inputMaskHasTime.value && inputMaskHasDate.value) {\n return 'dateTime';\n }\n if (inputMaskHasDate.value) return 'date';\n if (inputMaskHasTime.value) return 'time';\n return undefined;\n });\n\n const popover = computed(() => {\n const target = popoverRef.value?.$el.previousElementSibling ?? undefined;\n return defaultsDeep({}, props.popover, getDefault('datePicker.popover'), {\n target,\n }) as Partial<PopoverOptions>;\n });\n\n const popoverEvents = computed(() =>\n getPopoverEventHandlers({\n ...popover.value,\n id: datePickerPopoverId.value,\n }),\n );\n\n const inputValue = computed(() => {\n return isRange.value\n ? {\n start: inputValues.value[0],\n end: inputValues.value[1],\n }\n : inputValues.value[0];\n });\n\n const inputEvents = computed(() => {\n const events = (['start', 'end'] as const).map(target => ({\n input: onInputInput(target),\n change: onInputChange(target),\n keyup: onInputKeyup,\n ...(props.popover && popoverEvents.value),\n }));\n return isRange.value\n ? {\n start: events[0],\n end: events[1],\n }\n : events[0];\n });\n\n const selectAttribute = computed(() => {\n if (!hasValue(dateValue.value)) return null;\n const attribute = {\n key: 'select-drag',\n ...props.selectAttribute,\n dates: dateValue.value,\n pinPage: true,\n };\n const { dot, bar, highlight, content } = attribute;\n if (!dot && !bar && !highlight && !content) {\n attribute.highlight = true;\n }\n return attribute;\n });\n\n const dragAttribute = computed(() => {\n if (!isRange.value || !hasValue(dragValue.value)) {\n return null;\n }\n const attribute = {\n key: 'select-drag',\n ...props.dragAttribute,\n dates: dragValue.value,\n };\n const { dot, bar, highlight, content } = attribute;\n if (!dot && !bar && !highlight && !content) {\n attribute.highlight = {\n startEnd: {\n fillMode: 'outline',\n },\n };\n }\n return attribute;\n });\n\n const attributes = computed(() => {\n const attrs = isArray(props.attributes) ? [...props.attributes] : [];\n if (dragAttribute.value) {\n attrs.unshift(dragAttribute.value);\n } else if (selectAttribute.value) {\n attrs.unshift(selectAttribute.value);\n }\n return attrs;\n });\n\n const rules = computed(() => {\n return normalizeConfig(\n props.rules === 'auto' ? getAutoRules() : (props.rules ?? {}),\n );\n });\n\n // #endregion Computed\n\n function getAutoRules() {\n const _rules = {\n ms: [0, 999],\n sec: [0, 59],\n min: [0, 59],\n hr: [0, 23],\n };\n const accuracy = isDateMode.value ? 0 : props.timeAccuracy;\n return [0, 1].map(i => {\n switch (accuracy) {\n case 0:\n return {\n hours: _rules.hr[i],\n minutes: _rules.min[i],\n seconds: _rules.sec[i],\n milliseconds: _rules.ms[i],\n };\n case 1:\n return {\n minutes: _rules.min[i],\n seconds: _rules.sec[i],\n milliseconds: _rules.ms[i],\n };\n case 3:\n return { milliseconds: _rules.ms[i] };\n case 4:\n return {};\n default:\n return { seconds: _rules.sec[i], milliseconds: _rules.ms[i] };\n }\n });\n }\n\n function normalizeConfig<T>(config: T | T[]): T[] {\n if (isArray(config)) {\n if (config.length === 1) return [config[0], config[0]];\n return config;\n }\n return [config, config];\n }\n\n function normalizeDateConfig(\n config: Partial<DateConfig> | Partial<DateConfig>[],\n ): DateConfig[] {\n return normalizeConfig(config).map(\n (c, i) =>\n ({\n ...c,\n rules: rules.value[i],\n }) as DateConfig,\n );\n }\n\n function hasDateValue(\n value: DatePickerDate,\n ): value is Exclude<DatePickerDate, null> {\n if (value == null) return false;\n if (isNumber(value)) return !isNaN(value);\n if (isDate(value)) return !isNaN(value.getTime());\n if (isString(value)) return value !== '';\n return isDateParts(value);\n }\n\n function hasRangeValue(value: unknown): value is DatePickerRangeObject {\n return (\n isObject(value) &&\n 'start' in value &&\n 'end' in value &&\n hasDateValue(value.start ?? null) &&\n hasDateValue(value.end ?? null)\n );\n }\n\n function hasValue(\n value: DatePickerModel,\n ): value is Exclude<DatePickerDate, null> | DatePickerRangeObject {\n return hasRangeValue(value) || hasDateValue(value);\n }\n\n function valuesAreEqual(\n a: null | Date | SimpleDateRange,\n b: null | Date | SimpleDateRange,\n ): boolean {\n if (a == null && b == null) return true;\n if (a == null || b == null) return false;\n const aIsDate = isDate(a);\n const bIsDate = isDate(b);\n if (aIsDate && bIsDate) return a.getTime() === b.getTime();\n if (aIsDate || bIsDate) return false;\n return valuesAreEqual(a.start, b.start) && valuesAreEqual(a.end, b.end);\n }\n\n function valueIsDisabled(value: Date | SimpleDateRange | null) {\n if (!hasValue(value) || !disabledAttribute.value) return false;\n return disabledAttribute.value.intersectsRange(locale.value.range(value));\n }\n\n function normalizeValue(\n value: DatePickerModel,\n config: DateConfig[],\n patch: DatePatch,\n targetPriority?: ValueTarget,\n ): Date | SimpleDateRange | null {\n if (!hasValue(value)) return null;\n if (hasRangeValue(value)) {\n const start = locale.value.toDate(value.start, {\n ...config[0],\n fillDate: valueStart.value ?? undefined,\n patch,\n });\n const end = locale.value.toDate(value.end, {\n ...config[1],\n fillDate: valueEnd.value ?? undefined,\n patch,\n });\n return sortRange({ start, end }, targetPriority);\n }\n return locale.value.toDateOrNull(value, {\n ...config[0],\n fillDate: dateValue.value as Date,\n patch,\n });\n }\n\n function denormalizeValue(\n value: null | Date | SimpleDateRange,\n config: DateConfig[],\n ) {\n if (hasRangeValue(value)) {\n return {\n start: locale.value.fromDate(value.start, config[0]),\n end: locale.value.fromDate(value.end, config[1]),\n };\n }\n if (isRange.value) {\n return null;\n }\n return locale.value.fromDate(value, config[0]);\n }\n\n function updateValue(\n value: any,\n opts: Partial<UpdateOptions> = {},\n ): Promise<ReturnType<typeof forceUpdateValue>> {\n clearTimeout(updateTimeout);\n return new Promise(resolve => {\n const { debounce = 0, ...args } = opts;\n if (debounce > 0) {\n updateTimeout = setTimeout(() => {\n resolve(forceUpdateValue(value, args));\n }, debounce);\n } else {\n resolve(forceUpdateValue(value, args));\n }\n });\n }\n\n function forceUpdateValue(\n value: any,\n {\n config = modelConfig.value,\n patch = 'dateTime',\n clearIfEqual = false,\n formatInput: fInput = true,\n hidePopover: hPopover = false,\n dragging = isDragging.value,\n targetPriority,\n moveToValue: mValue = false,\n }: Partial<UpdateOptions> = {},\n ) {\n // 1. Normalization\n const normalizedConfig = normalizeDateConfig(config);\n let normalizedValue = normalizeValue(\n value,\n normalizedConfig,\n patch,\n targetPriority,\n );\n\n // 2a. Validation against disabled dates\n const isDisabled = valueIsDisabled(normalizedValue);\n if (isDisabled) {\n if (dragging) return null;\n normalizedValue = dateValue.value;\n // Don't allow hiding popover\n hPopover = false;\n // 2b. Validation against is-required or clearIfEqual\n } else if (normalizedValue == null && props.isRequired) {\n // Reset to previous value if it was cleared but is required\n normalizedValue = dateValue.value;\n // 2c. Validation against clearIfEqual\n } else if (\n // Clear value if same value was passed\n normalizedValue != null &&\n valuesAreEqual(dateValue.value, normalizedValue) &&\n clearIfEqual\n ) {\n normalizedValue = null;\n }\n\n // 3. Assignment\n const valueRef = dragging ? dragValue : dateValue;\n const notify = !valuesAreEqual(valueRef.value, normalizedValue);\n valueRef.value = normalizedValue;\n // Clear drag value if needed\n if (!dragging) dragValue.value = null;\n // Denormalize value using the model config\n const denormalizedValue = denormalizeValue(\n normalizedValue,\n modelConfig.value,\n );\n\n // 4. Notification\n if (notify) {\n watchValue = false;\n emit(dragging ? 'drag' : 'update:modelValue', denormalizedValue);\n nextTick(() => (watchValue = true));\n }\n\n // 5. Hide popover if needed\n if (hPopover && !dragging) hidePopover();\n\n // 6. Format inputs if needed\n if (fInput) formatInput();\n\n // 7. Move to range target if needed\n if (mValue) {\n nextTick(() => moveToValue(targetPriority ?? 'start'));\n }\n\n return denormalizedValue;\n }\n\n function formatInput() {\n nextTick(() => {\n const config = normalizeDateConfig({\n type: 'string',\n mask: inputMask.value,\n });\n const value = denormalizeValue(\n dragValue.value ?? dateValue.value,\n config,\n );\n if (isRange.value) {\n // @ts-ignore\n inputValues.value = [value && value.start, value && value.end];\n } else {\n inputValues.value = [value as string, ''];\n }\n });\n }\n\n function onInputUpdate(\n inputValue: string,\n target: ValueTarget,\n opts: Partial<UpdateOptions>,\n ) {\n inputValues.value.splice(target === 'start' ? 0 : 1, 1, inputValue);\n const value = isRange.value\n ? {\n start: inputValues.value[0],\n end: inputValues.value[1] || inputValues.value[0],\n }\n : inputValue;\n const config = {\n type: 'string',\n mask: inputMask.value,\n };\n updateValue(value, {\n ...opts,\n config,\n patch: inputMaskPatch.value,\n targetPriority: target,\n moveToValue: true,\n });\n }\n\n function onInputInput(target: ValueTarget) {\n return (e: InputEvent) => {\n if (!props.updateOnInput) return;\n onInputUpdate((<HTMLInputElement>e.currentTarget).value, target, {\n formatInput: false,\n hidePopover: false,\n debounce: props.inputDebounce,\n });\n };\n }\n\n function onInputChange(target: ValueTarget) {\n return (e: InputEvent) => {\n onInputUpdate((<HTMLInputElement>e.currentTarget).value, target, {\n formatInput: true,\n hidePopover: false,\n });\n };\n }\n\n function onInputKeyup(e: KeyboardEvent) {\n // Escape key only\n if (e.key !== 'Escape') return;\n updateValue(dateValue.value, {\n formatInput: true,\n hidePopover: true,\n });\n }\n\n function getDateParts(value: any): (DateParts | null)[] {\n if (isRange.value) {\n return [\n value && value.start ? locale.value.getDateParts(value.start) : null,\n value && value.end ? locale.value.getDateParts(value.end) : null,\n ];\n }\n return [value ? locale.value.getDateParts(value) : null];\n }\n\n function cancelDrag() {\n dragValue.value = null;\n formatInput();\n }\n\n function onPopoverBeforeShow(el: HTMLElement) {\n emit('popover-will-show', el);\n }\n\n function onPopoverAfterShow(el: HTMLElement) {\n emit('popover-did-show', el);\n }\n\n function onPopoverBeforeHide(el: HTMLElement) {\n cancelDrag();\n emit('popover-will-hide', el);\n }\n\n function onPopoverAfterHide(el: HTMLElement) {\n emit('popover-did-hide', el);\n }\n\n function handleDayClick(day: CalendarDay) {\n const opts: Partial<UpdateOptions> = {\n patch: 'date',\n formatInput: true,\n hidePopover: true,\n };\n if (isRange.value) {\n const dragging = !isDragging.value;\n if (dragging) {\n dragTrackingValue = { start: day.startDate, end: day.endDate };\n } else if (dragTrackingValue != null) {\n dragTrackingValue.end = day.date;\n }\n updateValue(dragTrackingValue, {\n ...opts,\n dragging,\n });\n } else {\n updateValue(day.date, {\n ...opts,\n clearIfEqual: !props.isRequired,\n });\n }\n }\n\n function onDayClick(day: CalendarDay, event: MouseEvent) {\n handleDayClick(day);\n // Re-emit event\n emit('dayclick', day, event);\n }\n\n function onDayKeydown(day: CalendarDay, event: KeyboardEvent) {\n switch (event.key) {\n case ' ':\n case 'Enter': {\n handleDayClick(day);\n event.preventDefault();\n break;\n }\n case 'Escape': {\n hidePopover();\n }\n }\n // Re-emit event\n emit('daykeydown', day, event);\n }\n\n function onDayMouseEnter(day: CalendarDay, event: MouseEvent) {\n if (!isDragging.value || dragTrackingValue == null) return;\n dragTrackingValue.end = day.date;\n updateValue(sortRange(dragTrackingValue), {\n patch: 'date',\n formatInput: true,\n });\n }\n\n function showPopover(opts: Partial<PopoverOptions> = {}) {\n sp({\n ...popover.value,\n ...opts,\n isInteractive: true,\n id: datePickerPopoverId.value,\n });\n }\n\n function hidePopover(opts: Partial<PopoverOptions> = {}) {\n hp({\n hideDelay: 10,\n force: true,\n ...popover.value,\n ...opts,\n id: datePickerPopoverId.value,\n });\n }\n\n function togglePopover(opts: Partial<PopoverOptions>) {\n tp({\n ...popover.value,\n ...opts,\n isInteractive: true,\n id: datePickerPopoverId.value,\n });\n }\n\n function sortRange(range: SimpleDateRange, priority?: ValueTarget) {\n const { start, end } = range;\n if (start > end) {\n switch (priority) {\n case 'start':\n return { start, end: start };\n case 'end':\n return { start: end, end };\n default:\n return { start: end, end: start };\n }\n }\n return { start, end };\n }\n\n async function move(target: MoveTarget, opts: Partial<MoveOptions> = {}) {\n if (calendarRef.value == null) return false;\n return calendarRef.value.move(target, opts);\n }\n\n async function moveBy(pages: number, opts: Partial<MoveOptions> = {}) {\n if (calendarRef.value == null) return false;\n return calendarRef.value.moveBy(pages, opts);\n }\n\n async function moveToValue(\n target: ValueTarget,\n opts: Partial<MoveOptions> = {},\n ) {\n const dValue = dateValue.value;\n if (calendarRef.value == null || !hasValue(dValue)) return false;\n const start = target !== 'end';\n const position = start ? 1 : -1;\n const date = hasRangeValue(dValue)\n ? start\n ? dValue.start\n : dValue.end\n : dValue;\n const page = getPageAddressForDate(date, 'monthly', locale.value);\n return calendarRef.value.move(page, { position, ...opts });\n }\n\n // #endregion Methods\n\n // #region Watch\n\n watch(\n () => props.isRange,\n val => {\n if (val) {\n console.warn(\n 'The `is-range` prop will be deprecated in future releases. Please use the `range` modifier.',\n );\n }\n },\n { immediate: true },\n );\n\n watch(\n () => isRange.value,\n () => {\n forceUpdateValue(null, { formatInput: true });\n },\n );\n\n watch(\n () => inputMask.value,\n () => formatInput(),\n );\n\n watch(\n () => props.modelValue,\n val => {\n if (!watchValue) return;\n forceUpdateValue(val, {\n formatInput: true,\n hidePopover: false,\n });\n },\n );\n\n watch(\n () => rules.value,\n () => {\n if (isObject(props.rules)) {\n forceUpdateValue(props.modelValue, {\n formatInput: true,\n hidePopover: false,\n });\n }\n },\n );\n\n watch(\n () => props.timezone,\n () => {\n forceUpdateValue(dateValue.value, { formatInput: true });\n },\n );\n\n // #endregion Watch\n\n // #region Lifecycle\n\n // Set initial date value (no validation applied)\n const config = normalizeConfig(modelConfig.value);\n dateValue.value = normalizeValue(\n props.modelValue ?? null,\n config,\n 'dateTime',\n );\n\n onMounted(() => {\n forceUpdateValue(props.modelValue, {\n formatInput: true,\n hidePopover: false,\n });\n });\n\n onUnmounted(() => {\n clearTimeout(updateTimeout);\n hidePopover({ hideDelay: 0 });\n });\n\n // Created\n // Waiting a tick allows calendar to initialize page\n nextTick(() => (showCalendar.value = true));\n\n // #endregion Lifecycle\n\n const context = {\n ...baseCtx,\n showCalendar,\n datePickerPopoverId,\n popoverRef,\n popoverEvents,\n calendarRef,\n isRange,\n isTimeMode,\n isDateTimeMode,\n is24hr: toRef(props, 'is24hr'),\n hideTimeHeader: toRef(props, 'hideTimeHeader'),\n timeAccuracy: toRef(props, 'timeAccuracy'),\n isDragging,\n inputValue,\n inputEvents,\n dateParts,\n attributes,\n rules,\n move,\n moveBy,\n moveToValue,\n updateValue,\n showPopover,\n hidePopover,\n togglePopover,\n onDayClick,\n onDayKeydown,\n onDayMouseEnter,\n onPopoverBeforeShow,\n onPopoverAfterShow,\n onPopoverBeforeHide,\n onPopoverAfterHide,\n };\n provide(contextKey, context);\n return context;\n}\n\nexport function useDatePicker() {\n const context = inject<DatePickerContext>(contextKey);\n if (context) return context;\n throw new Error(\n 'DatePicker context missing. Please verify this component is nested within a valid context provider.',\n );\n}\n","import { computed } from 'vue';\nimport { useDatePicker } from '../use/datePicker';\nimport {\n type DateParts,\n type SimpleDateParts,\n getDatePartsOptions,\n isDateParts,\n} from '../utils/date/helpers';\nimport { arrayHasItems } from '../utils/helpers';\n\nconst _amOptions = [\n { value: 0, label: '12' },\n { value: 1, label: '1' },\n { value: 2, label: '2' },\n { value: 3, label: '3' },\n { value: 4, label: '4' },\n { value: 5, label: '5' },\n { value: 6, label: '6' },\n { value: 7, label: '7' },\n { value: 8, label: '8' },\n { value: 9, label: '9' },\n { value: 10, label: '10' },\n { value: 11, label: '11' },\n];\nconst _pmOptions = [\n { value: 12, label: '12' },\n { value: 13, label: '1' },\n { value: 14, label: '2' },\n { value: 15, label: '3' },\n { value: 16, label: '4' },\n { value: 17, label: '5' },\n { value: 18, label: '6' },\n { value: 19, label: '7' },\n { value: 20, label: '8' },\n { value: 21, label: '9' },\n { value: 22, label: '10' },\n { value: 23, label: '11' },\n];\n\nexport interface TimePickerProps {\n position: number;\n}\n\nexport type TimePickerContext = ReturnType<typeof createTimePicker>;\n\nexport function createTimePicker(props: TimePickerProps) {\n const ctx = useDatePicker();\n const {\n locale,\n isRange,\n isTimeMode,\n dateParts,\n rules,\n is24hr,\n hideTimeHeader,\n timeAccuracy,\n updateValue: updateDpValue,\n } = ctx;\n\n function updateParts(newParts: Partial<DateParts>) {\n newParts = Object.assign(parts.value, newParts);\n const newValue = isRange.value\n ? {\n start: isStart.value ? newParts : dateParts.value[0],\n end: isStart.value ? dateParts.value[1] : newParts,\n }\n : newParts;\n updateDpValue(newValue, {\n patch: 'time',\n targetPriority: isStart.value ? 'start' : 'end',\n moveToValue: true,\n });\n }\n\n const isStart = computed(() => props.position === 0);\n const parts = computed(\n () => dateParts.value[props.position] || { isValid: false },\n );\n const partsValid = computed(() => isDateParts(parts.value));\n const isValid = computed(() => !!parts.value.isValid);\n const showHeader = computed(() => {\n return !hideTimeHeader.value && isValid.value;\n });\n\n const date = computed(() => {\n if (!partsValid.value) return null;\n let date = locale.value.toDate(parts.value as Partial<SimpleDateParts>);\n if ((parts.value as DateParts).hours === 24) {\n date = new Date(date.getTime() - 1);\n }\n return date;\n });\n\n const hours = computed({\n get() {\n return (parts.value as DateParts).hours;\n },\n set(val) {\n updateParts({ hours: val });\n },\n });\n\n const minutes = computed({\n get() {\n return (parts.value as DateParts).minutes;\n },\n set(val) {\n updateParts({ minutes: val });\n },\n });\n\n const seconds = computed({\n get() {\n return (parts.value as DateParts).seconds;\n },\n set(val) {\n updateParts({ seconds: val });\n },\n });\n\n const milliseconds = computed({\n get() {\n return (parts.value as DateParts).milliseconds;\n },\n set(val) {\n updateParts({ milliseconds: val });\n },\n });\n\n const isAM = computed({\n get() {\n return (parts.value as DateParts).hours < 12;\n },\n set(value) {\n value = String(value).toLowerCase() == 'true';\n let hValue = hours.value;\n if (value && hValue >= 12) {\n hValue -= 12;\n } else if (!value && hValue < 12) {\n hValue += 12;\n }\n updateParts({ hours: hValue });\n },\n });\n\n const options = computed(() =>\n getDatePartsOptions(parts.value as DateParts, rules.value[props.position]),\n );\n\n const amHourOptions = computed(() => {\n return _amOptions.filter(opt =>\n options.value.hours.some(ho => ho.value === opt.value),\n );\n });\n\n const pmHourOptions = computed(() => {\n return _pmOptions.filter(opt =>\n options.value.hours.some(ho => ho.value === opt.value),\n );\n });\n\n const hourOptions = computed(() => {\n if (is24hr.value) return options.value.hours;\n if (isAM.value) return amHourOptions.value;\n return pmHourOptions.value;\n });\n\n const isAMOptions = computed(() => {\n const result = [];\n if (arrayHasItems(amHourOptions.value))\n result.push({ value: true, label: 'AM' });\n if (arrayHasItems(pmHourOptions.value))\n result.push({ value: false, label: 'PM' });\n return result;\n });\n\n return {\n ...ctx,\n showHeader,\n timeAccuracy,\n parts,\n isValid,\n date,\n hours,\n minutes,\n seconds,\n milliseconds,\n options,\n hourOptions,\n isAM,\n isAMOptions,\n is24hr,\n };\n}\n","<template>\n <div\n class=\"vc-base-select\"\n :class=\"{\n 'vc-fit-content': fitContent,\n 'vc-has-icon': showIcon,\n }\"\n >\n <select\n v-bind=\"$attrs\"\n :value=\"modelValue\"\n class=\"vc-focus\"\n :class=\"{\n 'vc-align-right': alignRight,\n 'vc-align-left': alignLeft,\n }\"\n @change=\"\n $emit('update:modelValue', ($event.target as HTMLSelectElement).value)\n \"\n >\n <option\n v-for=\"option in options\"\n :key=\"option.value\"\n :value=\"option.value\"\n :disabled=\"option.disabled\"\n >\n {{ option.label }}\n </option>\n </select>\n <BaseIcon v-if=\"showIcon\" name=\"ChevronDown\" size=\"18\" />\n <div v-if=\"fitContent\" class=\"vc-base-sizer\" aria-hidden=\"true\">\n {{ selectedLabel }}\n </div>\n </div>\n</template>\n\n<script lang=\"ts\">\ninterface BaseOption {\n value: any;\n label: string;\n disabled?: boolean;\n}\n\nexport default {\n inheritAttrs: false,\n};\n</script>\n\n<script setup lang=\"ts\">\nimport { computed } from 'vue';\nimport BaseIcon from '../BaseIcon/BaseIcon.vue';\n\nconst props = defineProps<{\n options: BaseOption[];\n modelValue: any;\n alignRight?: boolean;\n alignLeft?: boolean;\n showIcon?: boolean;\n fitContent?: boolean;\n}>();\ndefineEmits(['update:modelValue']);\n\nconst selectedLabel = computed(() => {\n const option = props.options.find(opt => opt.value === props.modelValue);\n return option?.label;\n});\n</script>\n\n<style lang=\"css\">\n.vc-base-select {\n position: relative;\n display: flex;\n justify-content: center;\n align-items: center;\n height: 30px;\n font-size: var(--vc-text-base);\n font-weight: var(--vc-font-medium);\n &.vc-has-icon {\n & select {\n padding: 0 27px 0 9px;\n }\n & .vc-base-sizer {\n padding: 0 28px 0 10px;\n }\n }\n &.vc-fit-content {\n & select {\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n }\n }\n & .vc-base-icon {\n position: absolute;\n top: 6px;\n right: 4px;\n opacity: 0.6;\n pointer-events: none;\n }\n & .vc-base-sizer {\n font-size: var(--vc-text-base);\n font-weight: var(--vc-font-medium);\n color: transparent;\n padding: 0px 8px;\n margin: 0;\n }\n & select {\n display: inline-flex;\n justify-content: center;\n color: var(--vc-select-color);\n display: block;\n appearance: none;\n background-color: var(--vc-select-bg);\n border-radius: var(--vc-rounded);\n height: 30px;\n width: max-content;\n padding: 0px 7px;\n margin: 0;\n line-height: var(--leading-none);\n text-indent: 0px;\n background-image: none;\n cursor: pointer;\n text-align: center;\n &:hover {\n background-color: var(--vc-select-hover-bg);\n }\n &.vc-align-left {\n text-align: left;\n }\n &.vc-align-right {\n text-align: right;\n }\n }\n}\n</style>\n","<template>\n <div\n class=\"vc-base-select\"\n :class=\"{\n 'vc-fit-content': fitContent,\n 'vc-has-icon': showIcon,\n }\"\n >\n <select\n v-bind=\"$attrs\"\n :value=\"modelValue\"\n class=\"vc-focus\"\n :class=\"{\n 'vc-align-right': alignRight,\n 'vc-align-left': alignLeft,\n }\"\n @change=\"\n $emit('update:modelValue', ($event.target as HTMLSelectElement).value)\n \"\n >\n <option\n v-for=\"option in options\"\n :key=\"option.value\"\n :value=\"option.value\"\n :disabled=\"option.disabled\"\n >\n {{ option.label }}\n </option>\n </select>\n <BaseIcon v-if=\"showIcon\" name=\"ChevronDown\" size=\"18\" />\n <div v-if=\"fitContent\" class=\"vc-base-sizer\" aria-hidden=\"true\">\n {{ selectedLabel }}\n </div>\n </div>\n</template>\n\n<script lang=\"ts\">\ninterface BaseOption {\n value: any;\n label: string;\n disabled?: boolean;\n}\n\nexport default {\n inheritAttrs: false,\n};\n</script>\n\n<script setup lang=\"ts\">\nimport { computed } from 'vue';\nimport BaseIcon from '../BaseIcon/BaseIcon.vue';\n\nconst props = defineProps<{\n options: BaseOption[];\n modelValue: any;\n alignRight?: boolean;\n alignLeft?: boolean;\n showIcon?: boolean;\n fitContent?: boolean;\n}>();\ndefineEmits(['update:modelValue']);\n\nconst selectedLabel = computed(() => {\n const option = props.options.find(opt => opt.value === props.modelValue);\n return option?.label;\n});\n</script>\n\n<style lang=\"css\">\n.vc-base-select {\n position: relative;\n display: flex;\n justify-content: center;\n align-items: center;\n height: 30px;\n font-size: var(--vc-text-base);\n font-weight: var(--vc-font-medium);\n &.vc-has-icon {\n & select {\n padding: 0 27px 0 9px;\n }\n & .vc-base-sizer {\n padding: 0 28px 0 10px;\n }\n }\n &.vc-fit-content {\n & select {\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n }\n }\n & .vc-base-icon {\n position: absolute;\n top: 6px;\n right: 4px;\n opacity: 0.6;\n pointer-events: none;\n }\n & .vc-base-sizer {\n font-size: var(--vc-text-base);\n font-weight: var(--vc-font-medium);\n color: transparent;\n padding: 0px 8px;\n margin: 0;\n }\n & select {\n display: inline-flex;\n justify-content: center;\n color: var(--vc-select-color);\n display: block;\n appearance: none;\n background-color: var(--vc-select-bg);\n border-radius: var(--vc-rounded);\n height: 30px;\n width: max-content;\n padding: 0px 7px;\n margin: 0;\n line-height: var(--leading-none);\n text-indent: 0px;\n background-image: none;\n cursor: pointer;\n text-align: center;\n &:hover {\n background-color: var(--vc-select-hover-bg);\n }\n &.vc-align-left {\n text-align: left;\n }\n &.vc-align-right {\n text-align: right;\n }\n }\n}\n</style>\n","<template>\n <div\n class=\"vc-time-picker\"\n :class=\"[{ 'vc-invalid': !isValid, 'vc-attached': !isTimeMode }]\"\n >\n <CalendarSlot name=\"time-header\">\n <div v-if=\"showHeader && date\" class=\"vc-time-header\">\n <span class=\"vc-time-weekday\">\n {{ locale.formatDate(date, 'WWW') }}\n </span>\n <span class=\"vc-time-month\">\n {{ locale.formatDate(date, 'MMM') }}\n </span>\n <span class=\"vc-time-day\">\n {{ locale.formatDate(date, 'D') }}\n </span>\n <span class=\"vc-time-year\">\n {{ locale.formatDate(date, 'YYYY') }}\n </span>\n </div>\n </CalendarSlot>\n <div class=\"vc-time-select-group\">\n <BaseIcon name=\"Clock\" size=\"17\" />\n <BaseSelect\n v-model.number=\"hours\"\n :options=\"hourOptions\"\n class=\"vc-time-select-hours\"\n align-right\n />\n <template v-if=\"timeAccuracy > 1\">\n <span class=\"vc-time-colon\">:</span>\n <BaseSelect\n v-model.number=\"minutes\"\n :options=\"options.minutes\"\n class=\"vc-time-select-minutes\"\n :align-left=\"timeAccuracy === 2\"\n />\n </template>\n <template v-if=\"timeAccuracy > 2\">\n <span class=\"vc-time-colon\">:</span>\n <BaseSelect\n v-model.number=\"seconds\"\n :options=\"options.seconds\"\n class=\"vc-time-select-seconds\"\n :align-left=\"timeAccuracy === 3\"\n />\n </template>\n <template v-if=\"timeAccuracy > 3\">\n <span class=\"vc-time-decimal\">.</span>\n <BaseSelect\n v-model.number=\"milliseconds\"\n :options=\"options.milliseconds\"\n class=\"vc-time-select-milliseconds\"\n align-left\n />\n </template>\n <BaseSelect v-if=\"!is24hr\" v-model=\"isAM\" :options=\"isAMOptions\" />\n </div>\n </div>\n</template>\n\n<script setup lang=\"ts\">\nimport { createTimePicker } from '../../use/timePicker';\nimport BaseIcon from '../BaseIcon/BaseIcon.vue';\nimport BaseSelect from '../BaseSelect/BaseSelect.vue';\nimport CalendarSlot from '../Calendar/CalendarSlot.vue';\n\nconst props = defineProps<{\n position: number;\n}>();\n\nconst timePicker = createTimePicker(props);\ndefineExpose(timePicker);\nconst {\n locale,\n isValid,\n date,\n hours,\n minutes,\n seconds,\n milliseconds,\n options,\n hourOptions,\n isTimeMode,\n isAM,\n isAMOptions,\n is24hr,\n showHeader,\n timeAccuracy,\n} = timePicker;\n</script>\n\n<style lang=\"css\">\n.vc-time-picker {\n display: flex;\n flex-direction: column;\n align-items: center;\n padding: 8px 4px;\n &.vc-invalid {\n pointer-events: none;\n opacity: 0.5;\n }\n &.vc-attached {\n border-top: 1px solid var(--vc-time-picker-border);\n }\n > * + * {\n margin-top: 4px;\n }\n}\n\n.vc-time-header {\n display: flex;\n align-items: center;\n font-size: var(--vc-text-sm);\n font-weight: var(--vc-font-semibold);\n text-transform: uppercase;\n margin-top: -4px;\n padding-left: 4px;\n padding-right: 4px;\n line-height: 21px;\n}\n\n.vc-time-select-group {\n display: inline-flex;\n align-items: center;\n padding: 0 4px;\n background: var(--vc-time-select-group-bg);\n border-radius: var(--vc-rounded-md);\n border: 1px solid var(--vc-time-select-group-border);\n .vc-base-icon {\n margin-right: 4px;\n color: var(--vc-time-select-group-icon-color);\n }\n select {\n background: transparent;\n padding: 0px 4px;\n }\n}\n\n.vc-time-weekday {\n color: var(--vc-time-weekday-color);\n letter-spacing: var(--tracking-wide);\n}\n\n.vc-time-month {\n color: var(--vc-time-month-color);\n margin-left: 8px;\n}\n\n.vc-time-day {\n color: var(--vc-time-day-color);\n margin-left: 4px;\n}\n\n.vc-time-year {\n color: var(--vc-time-year-color);\n margin-left: 8px;\n}\n\n.vc-time-colon {\n margin: 0 1px 2px 2px;\n}\n\n.vc-time-decimal {\n margin: 0 0 0 1px;\n}\n</style>\n","<template>\n <div\n class=\"vc-time-picker\"\n :class=\"[{ 'vc-invalid': !isValid, 'vc-attached': !isTimeMode }]\"\n >\n <CalendarSlot name=\"time-header\">\n <div v-if=\"showHeader && date\" class=\"vc-time-header\">\n <span class=\"vc-time-weekday\">\n {{ locale.formatDate(date, 'WWW') }}\n </span>\n <span class=\"vc-time-month\">\n {{ locale.formatDate(date, 'MMM') }}\n </span>\n <span class=\"vc-time-day\">\n {{ locale.formatDate(date, 'D') }}\n </span>\n <span class=\"vc-time-year\">\n {{ locale.formatDate(date, 'YYYY') }}\n </span>\n </div>\n </CalendarSlot>\n <div class=\"vc-time-select-group\">\n <BaseIcon name=\"Clock\" size=\"17\" />\n <BaseSelect\n v-model.number=\"hours\"\n :options=\"hourOptions\"\n class=\"vc-time-select-hours\"\n align-right\n />\n <template v-if=\"timeAccuracy > 1\">\n <span class=\"vc-time-colon\">:</span>\n <BaseSelect\n v-model.number=\"minutes\"\n :options=\"options.minutes\"\n class=\"vc-time-select-minutes\"\n :align-left=\"timeAccuracy === 2\"\n />\n </template>\n <template v-if=\"timeAccuracy > 2\">\n <span class=\"vc-time-colon\">:</span>\n <BaseSelect\n v-model.number=\"seconds\"\n :options=\"options.seconds\"\n class=\"vc-time-select-seconds\"\n :align-left=\"timeAccuracy === 3\"\n />\n </template>\n <template v-if=\"timeAccuracy > 3\">\n <span class=\"vc-time-decimal\">.</span>\n <BaseSelect\n v-model.number=\"milliseconds\"\n :options=\"options.milliseconds\"\n class=\"vc-time-select-milliseconds\"\n align-left\n />\n </template>\n <BaseSelect v-if=\"!is24hr\" v-model=\"isAM\" :options=\"isAMOptions\" />\n </div>\n </div>\n</template>\n\n<script setup lang=\"ts\">\nimport { createTimePicker } from '../../use/timePicker';\nimport BaseIcon from '../BaseIcon/BaseIcon.vue';\nimport BaseSelect from '../BaseSelect/BaseSelect.vue';\nimport CalendarSlot from '../Calendar/CalendarSlot.vue';\n\nconst props = defineProps<{\n position: number;\n}>();\n\nconst timePicker = createTimePicker(props);\ndefineExpose(timePicker);\nconst {\n locale,\n isValid,\n date,\n hours,\n minutes,\n seconds,\n milliseconds,\n options,\n hourOptions,\n isTimeMode,\n isAM,\n isAMOptions,\n is24hr,\n showHeader,\n timeAccuracy,\n} = timePicker;\n</script>\n\n<style lang=\"css\">\n.vc-time-picker {\n display: flex;\n flex-direction: column;\n align-items: center;\n padding: 8px 4px;\n &.vc-invalid {\n pointer-events: none;\n opacity: 0.5;\n }\n &.vc-attached {\n border-top: 1px solid var(--vc-time-picker-border);\n }\n > * + * {\n margin-top: 4px;\n }\n}\n\n.vc-time-header {\n display: flex;\n align-items: center;\n font-size: var(--vc-text-sm);\n font-weight: var(--vc-font-semibold);\n text-transform: uppercase;\n margin-top: -4px;\n padding-left: 4px;\n padding-right: 4px;\n line-height: 21px;\n}\n\n.vc-time-select-group {\n display: inline-flex;\n align-items: center;\n padding: 0 4px;\n background: var(--vc-time-select-group-bg);\n border-radius: var(--vc-rounded-md);\n border: 1px solid var(--vc-time-select-group-border);\n .vc-base-icon {\n margin-right: 4px;\n color: var(--vc-time-select-group-icon-color);\n }\n select {\n background: transparent;\n padding: 0px 4px;\n }\n}\n\n.vc-time-weekday {\n color: var(--vc-time-weekday-color);\n letter-spacing: var(--tracking-wide);\n}\n\n.vc-time-month {\n color: var(--vc-time-month-color);\n margin-left: 8px;\n}\n\n.vc-time-day {\n color: var(--vc-time-day-color);\n margin-left: 4px;\n}\n\n.vc-time-year {\n color: var(--vc-time-year-color);\n margin-left: 8px;\n}\n\n.vc-time-colon {\n margin: 0 1px 2px 2px;\n}\n\n.vc-time-decimal {\n margin: 0 0 0 1px;\n}\n</style>\n","<template>\n <div\n v-if=\"isTimeMode\"\n :class=\"`vc-container vc-bordered vc-${color} vc-${displayMode}`\"\n >\n <TimePicker\n v-for=\"position in positions\"\n :key=\"position\"\n :position=\"position\"\n />\n </div>\n <Calendar\n v-else\n :attributes=\"attributes\"\n ref=\"calendarRef\"\n @dayclick=\"onDayClick\"\n @daymouseenter=\"onDayMouseEnter\"\n @daykeydown=\"onDayKeydown\"\n >\n <template #footer>\n <template v-if=\"isDateTimeMode\">\n <TimePicker\n v-for=\"position in positions\"\n :key=\"position\"\n :position=\"position\"\n />\n </template>\n <CalendarSlot name=\"dp-footer\" />\n </template>\n </Calendar>\n</template>\n\n<script setup lang=\"ts\">\nimport { useDatePicker } from '../../use/datePicker';\nimport Calendar from '../Calendar/Calendar.vue';\nimport CalendarSlot from '../Calendar/CalendarSlot.vue';\nimport TimePicker from './TimePicker.vue';\n\nconst {\n attributes,\n calendarRef,\n color,\n displayMode,\n isDateTimeMode,\n isTimeMode,\n isRange,\n onDayClick,\n onDayMouseEnter,\n onDayKeydown,\n} = useDatePicker();\n\nconst positions = isRange.value ? [0, 1] : [0];\n</script>\n","<template>\n <div\n v-if=\"isTimeMode\"\n :class=\"`vc-container vc-bordered vc-${color} vc-${displayMode}`\"\n >\n <TimePicker\n v-for=\"position in positions\"\n :key=\"position\"\n :position=\"position\"\n />\n </div>\n <Calendar\n v-else\n :attributes=\"attributes\"\n ref=\"calendarRef\"\n @dayclick=\"onDayClick\"\n @daymouseenter=\"onDayMouseEnter\"\n @daykeydown=\"onDayKeydown\"\n >\n <template #footer>\n <template v-if=\"isDateTimeMode\">\n <TimePicker\n v-for=\"position in positions\"\n :key=\"position\"\n :position=\"position\"\n />\n </template>\n <CalendarSlot name=\"dp-footer\" />\n </template>\n </Calendar>\n</template>\n\n<script setup lang=\"ts\">\nimport { useDatePicker } from '../../use/datePicker';\nimport Calendar from '../Calendar/Calendar.vue';\nimport CalendarSlot from '../Calendar/CalendarSlot.vue';\nimport TimePicker from './TimePicker.vue';\n\nconst {\n attributes,\n calendarRef,\n color,\n displayMode,\n isDateTimeMode,\n isTimeMode,\n isRange,\n onDayClick,\n onDayMouseEnter,\n onDayKeydown,\n} = useDatePicker();\n\nconst positions = isRange.value ? [0, 1] : [0];\n</script>\n","<template>\n <Popover\n :id=\"datePickerPopoverId\"\n placement=\"bottom-start\"\n :class=\"`vc-date-picker-content vc-${color} vc-${displayMode}`\"\n ref=\"popoverRef\"\n @before-show=\"onPopoverBeforeShow\"\n @after-show=\"onPopoverAfterShow\"\n @before-hide=\"onPopoverBeforeHide\"\n @after-hide=\"onPopoverAfterHide\"\n >\n <DatePickerBase v-bind=\"$attrs\" />\n </Popover>\n</template>\n\n<script lang=\"ts\">\nexport default {\n inheritAttrs: false,\n};\n</script>\n\n<script setup lang=\"ts\">\nimport { useDatePicker } from '../../use/datePicker';\nimport Popover from '../Popover/Popover.vue';\nimport DatePickerBase from './DatePickerBase.vue';\n\nconst {\n datePickerPopoverId,\n color,\n displayMode,\n popoverRef,\n onPopoverBeforeShow,\n onPopoverAfterShow,\n onPopoverBeforeHide,\n onPopoverAfterHide,\n} = useDatePicker();\n</script>\n","<template>\n <Popover\n :id=\"datePickerPopoverId\"\n placement=\"bottom-start\"\n :class=\"`vc-date-picker-content vc-${color} vc-${displayMode}`\"\n ref=\"popoverRef\"\n @before-show=\"onPopoverBeforeShow\"\n @after-show=\"onPopoverAfterShow\"\n @before-hide=\"onPopoverBeforeHide\"\n @after-hide=\"onPopoverAfterHide\"\n >\n <DatePickerBase v-bind=\"$attrs\" />\n </Popover>\n</template>\n\n<script lang=\"ts\">\nexport default {\n inheritAttrs: false,\n};\n</script>\n\n<script setup lang=\"ts\">\nimport { useDatePicker } from '../../use/datePicker';\nimport Popover from '../Popover/Popover.vue';\nimport DatePickerBase from './DatePickerBase.vue';\n\nconst {\n datePickerPopoverId,\n color,\n displayMode,\n popoverRef,\n onPopoverBeforeShow,\n onPopoverAfterShow,\n onPopoverBeforeHide,\n onPopoverAfterHide,\n} = useDatePicker();\n</script>\n","<template>\n <template v-if=\"$slots.default\">\n <slot v-bind=\"slotCtx\" />\n <DatePickerPopover v-bind=\"$attrs\" />\n </template>\n <DatePickerBase v-else v-bind=\"$attrs\" />\n</template>\n\n<script lang=\"ts\">\nimport { defineComponent, reactive } from 'vue';\nimport { createDatePicker, emits, propsDef } from '../../use/datePicker';\nimport { omit } from '../../utils/helpers';\nimport DatePickerBase from './DatePickerBase.vue';\nimport DatePickerPopover from './DatePickerPopover.vue';\n\nexport default defineComponent({\n inheritAttrs: false,\n emits,\n props: propsDef,\n components: { DatePickerBase, DatePickerPopover },\n setup(props, ctx) {\n const datePicker = createDatePicker(props, ctx);\n const slotCtx = reactive(omit(datePicker, 'calendarRef', 'popoverRef'));\n return { ...datePicker, slotCtx };\n },\n});\n</script>\n","<template>\n <template v-if=\"$slots.default\">\n <slot v-bind=\"slotCtx\" />\n <DatePickerPopover v-bind=\"$attrs\" />\n </template>\n <DatePickerBase v-else v-bind=\"$attrs\" />\n</template>\n\n<script lang=\"ts\">\nimport { defineComponent, reactive } from 'vue';\nimport { createDatePicker, emits, propsDef } from '../../use/datePicker';\nimport { omit } from '../../utils/helpers';\nimport DatePickerBase from './DatePickerBase.vue';\nimport DatePickerPopover from './DatePickerPopover.vue';\n\nexport default defineComponent({\n inheritAttrs: false,\n emits,\n props: propsDef,\n components: { DatePickerBase, DatePickerPopover },\n setup(props, ctx) {\n const datePicker = createDatePicker(props, ctx);\n const slotCtx = reactive(omit(datePicker, 'calendarRef', 'popoverRef'));\n return { ...datePicker, slotCtx };\n },\n});\n</script>\n","export { default as Calendar } from './Calendar/Calendar.vue';\nexport { default as DatePicker } from './DatePicker/DatePicker.vue';\nexport { default as Popover } from './Popover/Popover.vue';\nexport { default as PopoverRow } from './Popover/PopoverRow.vue';\n","import type { App as Application } from 'vue';\n\nconst config = {};\n\nexport { config as default };\n\nexport let VueInstance: Application;\n\nexport const setVueInstance = (instance: Application) => {\n VueInstance = instance;\n};\n","import type { App } from 'vue';\nimport * as components from './components/index';\nimport './styles/index.css';\nimport { setVueInstance } from './utils/config/index';\nimport { type Defaults, setupDefaults } from './utils/defaults';\n\nconst install = (app: App, defaults: Defaults = {}) => {\n setVueInstance(app);\n app.use(setupDefaults, defaults);\n const prefix = app.config.globalProperties.$VCalendar.componentPrefix;\n for (const componentKey in components) {\n const component = (components as any)[componentKey];\n app.component(`${prefix}${componentKey}`, component);\n }\n};\n\nexport default { install };\nexport * from './components';\nexport { setupDefaults as setupCalendar } from './utils/defaults';\nexport { popoverDirective } from './utils/popovers';\nexport type { PopoverOptions } from './utils/popovers';\n\nexport { createCalendar, useCalendar } from './use/calendar';\nexport { createDatePicker, useDatePicker } from './use/datePicker';\n"],"x_google_ignoreList":[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195,196,197,198,199],"mappings":"m2uBAIA,IAAI,EAHc,OAAO,UAGQ,eAcjC,EAAO,QAJP,SAAS,QAAQ,EAAQ,GACvB,OAAiB,MAAV,GAAkB,EAAe,KAAK,EAAQ,EACvD,4BCOA,IAAI,EAAU,MAAM,QAEpB,EAAO,QAAU,4BCxBjB,IAAI,EAA8B,iBAAV,QAAsB,QAAU,OAAO,SAAW,QAAU,OAEpF,EAAO,QAAU,4BCHjB,IAAI,EAAA,IAGA,EAA0B,iBAAR,MAAoB,MAAQ,KAAK,SAAW,QAAU,KAGxE,EAAO,GAAc,GAAY,SAAS,cAAT,GAErC,EAAO,QAAU,4BCLjB,IAAI,EAAA,IAAc,OAElB,EAAO,QAAU,4BCLjB,IAAI,EAAA,IAGA,EAAc,OAAO,UAGrB,EAAiB,EAAY,eAO7B,EAAuB,EAA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