{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///./node_modules/flatpickr/dist/flatpickr.js","webpack:///./vendor/assets/libs/flatpickr/flatpickr.js"],"names":["installedModules","__webpack_require__","moduleId","exports","module","i","l","modules","call","m","c","d","name","getter","o","Object","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","prototype","hasOwnProperty","p","s","factory","_typeof","iterator","obj","constructor","_assign","assign","arguments","length","apply","this","HOOKS","defaults","_disable","_enable","allowInput","altFormat","altInput","altInputClass","animate","window","navigator","userAgent","indexOf","ariaDateFormat","clickOpens","closeOnSelect","conjunction","dateFormat","defaultHour","defaultMinute","defaultSeconds","disable","disableMobile","enable","enableSeconds","enableTime","errorHandler","err","console","warn","getWeek","givenDate","date","Date","getTime","setHours","setDate","getDate","getDay","week1","getFullYear","Math","round","hourIncrement","ignoredFocusElements","inline","locale","minuteIncrement","monthSelectorType","nextArrow","noCalendar","now","onChange","onClose","onDayCreate","onDestroy","onKeyDown","onMonthChange","onOpen","onParseConfig","onReady","onValueUpdate","onYearChange","onPreCalendarPosition","plugins","position","positionElement","undefined","prevArrow","shorthandCurrentMonth","showMonths","static","time_24hr","weekNumbers","wrap","english","weekdays","shorthand","longhand","months","daysInMonth","firstDayOfWeek","ordinal","nth","rangeSeparator","weekAbbreviation","scrollTitle","toggleTitle","amPM","yearAriaLabel","hourAriaLabel","minuteAriaLabel","pad","number","slice","int","bool","debounce","func","wait","immediate","timeout","context","args","clearTimeout","setTimeout","arrayify","Array","toggleClass","elem","className","classList","add","remove","createElement","tag","content","e","document","textContent","clearNode","node","firstChild","removeChild","createNumberInput","inputClassName","opts","wrapper","numInput","arrowUp","arrowDown","type","pattern","setAttribute","appendChild","doNothing","monthToStr","monthNumber","revFormat","D","F","dateObj","monthName","setMonth","G","hour","parseFloat","H","J","day","K","getHours","RegExp","test","M","shortMonth","S","seconds","setSeconds","U","_","unixSeconds","W","weekNum","weekNumber","parseInt","Y","year","setFullYear","Z","ISODate","h","minutes","setMinutes","j","month","u","unixMillSeconds","w","y","tokenRegex","formats","toISOString","options","getMonth","getSeconds","getMinutes","String","substring","createDateFormatter","_a","_b","config","_c","l10n","frmt","overrideLocale","formatDate","split","map","arr","join","createDateParser","givenFormat","timeless","customLocale","parsedDate","dateOrig","toFixed","format","datestr","trim","parseDate","matched","ops","matchIndex","regexStr","token_1","isBackSlash","escaped","match","exec","fn","val","forEach","isNaN","Error","compareDates","date1","date2","duration","FlatpickrInstance","element","instanceConfig","self","flatpickr","defaultConfig","bindToInstance","setCalendarWidth","requestAnimationFrame","calendarContainer","style","visibility","display","daysContainer","daysWidth","days","offsetWidth","width","weekWrapper","removeProperty","updateTime","selectedDates","setDefaultTime","preventDefault","isKeyDown","input","target","min","getAttribute","max","step","curValue","delta","which","newValue","isHourElem","hourElement","isMinuteElem","minuteElement","incrementNumInput","abs","timeWrapper","prevValue","_input","setHoursFromInputs","updateValue","_debouncedChange","hours","secondElement","limitMinHours","minTime","minDate","minDateHasTime","latestSelectedDateObj","maxTime","maxDate","maxDateHasTime","setHoursFromDate","setDefaultHours","minHr","minMinutes","maxHr","maxMinutes","isMobile","onYearInput","event","toString","changeYear","handler","ev","el","addEventListener","_handlers","push","onClick","evt","triggerChange","triggerEvent","jumpToDate","jumpDate","jumpTo","oldYear","currentYear","oldMonth","currentMonth","message","buildMonthSwitch","redraw","timeIncrement","contains","inputElem","parentNode","createEvent","dispatchEvent","createDay","dayNumber","dateIsEnabled","isEnabled","dayElement","$i","todayDateElem","tabIndex","isDateSelected","selectedDateElem","isDateInRange","insertAdjacentHTML","focusOnDayElem","targetNode","focus","onMouseOver","getFirstAvailableDay","startMonth","endMonth","children","startIndex","endIndex","focusOnDay","current","offset","dayFocused","isInView","activeElement","body","startElem","givenMonth","loopDelta","numMonthDays","changeMonth","getNextAvailableDay","buildMonthDays","firstOfMonth","prevMonthDays","utils","getDaysInMonth","createDocumentFragment","isMultiMonth","prevMonthDayClass","nextMonthDayClass","dayIndex","dayNum","dayContainer","buildDays","frag","shouldBuildMonth","monthsDropdownContainer","innerHTML","selected","buildMonth","monthElement","container","monthNavFragment","selectedMonth","yearInput","tabindex","yearElement","getElementsByTagName","disabled","buildMonths","monthNav","prevMonthNav","yearElements","monthElements","nextMonthNav","buildWeekdays","weekdayContainer","updateWeekdays","splice","concat","isOffset","_hidePrevMonthArrow","_hideNextMonthArrow","updateNavigationCurrentMonth","isCalendarElem","appendTo","documentClick","isOpen","eventTarget_1","composedPath","isCalendarElement","isInput","path","lostFocus","relatedTarget","isIgnored","some","timeContainer","close","clear","newYear","newYearNum","isNewYear","dateToCheck","array","parsed","from","to","allowKeydown","allowInlineKeydown","keyCode","blur","open","isTimeObj","focusAndClose","selectDate","delta_1","ctrlKey","stopPropagation","currentYearElement","elems","pluginElements","filter","x","shiftKey","charAt","toLowerCase","hoverDate","firstElementChild","initialDate","rangeStartDate","rangeEndDate","containsDisabled","minRange","maxRange","_loop_1","ts","ts1","ts2","dayElem","timestamp","outOfRange","onResize","positionCalendar","minMaxDateSetter","inverseDateObj","removeAttribute","setupLocale","l10ns","JSON","parse","stringify","dataset","customPositionElement","_positionElement","calendarHeight","reduce","acc","child","offsetHeight","calendarWidth","configPos","configPosVertical","configPosHorizontal","inputBounds","getBoundingClientRect","distanceFromBottom","innerHeight","bottom","showOnTop","top","pageYOffset","left","pageXOffset","right","rightMost","centerMost","doc","styleSheets","bodyWidth","centerLeft","centerIndex","cssRules","centerStyle","insertRule","centerBefore","msMaxTouchPoints","findParent","condition","selectedDate","shouldChangeMonth","selectedIndex","sort","a","b","showTimeInput","single","range","loadedPlugins","_bind","_setHoursFromDate","_positionCalendar","triggerChangeEvent","toInitial","mobileInput","_initialDate","_createElement","destroy","removeEventListener","lastChild","insertBefore","_type","k","click","wasOpen","select","set","option","CALLBACKS","setSelectedDate","toggle","inputDate","dates","parseDateRules","rule","data","hooks","initEvent","getDateStr","dObj","mobileFormatStr","onMonthNavClick","isPrevMonth","isNextMonth","boolOpts","userConfig","timeMode","defaultDateFormat","defaultAltFormat","_minDate","_maxDate","minMaxTimeSetter","_minTime","_maxTime","hook","pluginConf","parseConfig","querySelector","nodeName","placeholder","required","nextSibling","preloadedDate","defaultDate","_showTimeInput","setupDates","yr","fragment","__hidePrevMonthArrow","__hideNextMonthArrow","innerContainer","buildWeeks","rContainer","separator","hourInput","minuteInput","military2ampm","secondInput","title","buildTime","customAppend","nodeType","build","querySelectorAll","inputType","defaultValue","setupMobile","debouncedResize","ontouchstart","capture","bindEvents","isSafari","init","_flatpickr","nodeList","nodes","HTMLElement","instances","error","_i","TypeError","source","keys","args_1","HTMLCollection","NodeList","selector","Node","en","localize","setDefaults","jQuery","fp_incr"],"mappings":";4DACE,IAAIA,EAAmB,GAGvB,SAASC,EAAoBC,GAG5B,GAAGF,EAAiBE,GACnB,OAAOF,EAAiBE,GAAUC,QAGnC,IAAIC,EAASJ,EAAiBE,GAAY,CACzCG,EAAGH,EACHI,GAAG,EACHH,QAAS,IAUV,OANAI,EAAQL,GAAUM,KAAKJ,EAAOD,QAASC,EAAQA,EAAOD,QAASF,GAG/DG,EAAOE,GAAI,EAGJF,EAAOD,QA0Df,OArDAF,EAAoBQ,EAAIF,EAGxBN,EAAoBS,EAAIV,EAGxBC,EAAoBU,EAAI,SAASR,EAASS,EAAMC,GAC3CZ,EAAoBa,EAAEX,EAASS,IAClCG,OAAOC,eAAeb,EAASS,EAAM,CAAEK,YAAY,EAAMC,IAAKL,KAKhEZ,EAAoBkB,EAAI,SAAShB,GACX,qBAAXiB,QAA0BA,OAAOC,aAC1CN,OAAOC,eAAeb,EAASiB,OAAOC,YAAa,CAAEC,MAAO,WAE7DP,OAAOC,eAAeb,EAAS,aAAc,CAAEmB,OAAO,KAQvDrB,EAAoBsB,EAAI,SAASD,EAAOE,GAEvC,GADU,EAAPA,IAAUF,EAAQrB,EAAoBqB,IAC/B,EAAPE,EAAU,OAAOF,EACpB,GAAW,EAAPE,GAA8B,kBAAVF,GAAsBA,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GAtgF+D,WAAtBrP,EAAQnC,IAA4C,qBAAXC,EAAyBA,EAAOD,QAAUkC,SAAuE,2BAAd,KAAc,mC,oGCJ5M","file":"js/vendor/libs/flatpickr/flatpickr-d2373e1de0d0f09cfaab.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"https://optimal.seneris.com/packs/\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 806);\n","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n/* flatpickr v4.6.3, @license MIT */\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' ? module.exports = factory() : typeof define === 'function' && define.amd ? define(factory) : (global = global || self, global.flatpickr = factory());\n})(this, function () {\n 'use strict';\n /*! *****************************************************************************\r\n Copyright (c) Microsoft Corporation. All rights reserved.\r\n Licensed under the Apache License, Version 2.0 (the \"License\"); you may not use\r\n this file except in compliance with the License. You may obtain a copy of the\r\n License at http://www.apache.org/licenses/LICENSE-2.0\r\n THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\r\n KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED\r\n WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,\r\n MERCHANTABLITY OR NON-INFRINGEMENT.\r\n See the Apache Version 2.0 License for specific language governing permissions\r\n and limitations under the License.\r\n ***************************************************************************** */\n\n var _assign = function __assign() {\n _assign = Object.assign || function __assign(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n\n for (var p in s) {\n if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\n }\n }\n\n return t;\n };\n\n return _assign.apply(this, arguments);\n };\n\n var HOOKS = [\"onChange\", \"onClose\", \"onDayCreate\", \"onDestroy\", \"onKeyDown\", \"onMonthChange\", \"onOpen\", \"onParseConfig\", \"onReady\", \"onValueUpdate\", \"onYearChange\", \"onPreCalendarPosition\"];\n var defaults = {\n _disable: [],\n _enable: [],\n allowInput: false,\n altFormat: \"F j, Y\",\n altInput: false,\n altInputClass: \"form-control input\",\n animate: (typeof window === \"undefined\" ? \"undefined\" : _typeof(window)) === \"object\" && window.navigator.userAgent.indexOf(\"MSIE\") === -1,\n ariaDateFormat: \"F j, Y\",\n clickOpens: true,\n closeOnSelect: true,\n conjunction: \", \",\n dateFormat: \"Y-m-d\",\n defaultHour: 12,\n defaultMinute: 0,\n defaultSeconds: 0,\n disable: [],\n disableMobile: false,\n enable: [],\n enableSeconds: false,\n enableTime: false,\n errorHandler: function errorHandler(err) {\n return typeof console !== \"undefined\" && console.warn(err);\n },\n getWeek: function getWeek(givenDate) {\n var date = new Date(givenDate.getTime());\n date.setHours(0, 0, 0, 0); // Thursday in current week decides the year.\n\n date.setDate(date.getDate() + 3 - (date.getDay() + 6) % 7); // January 4 is always in week 1.\n\n var week1 = new Date(date.getFullYear(), 0, 4); // Adjust to Thursday in week 1 and count number of weeks from date to week1.\n\n return 1 + Math.round(((date.getTime() - week1.getTime()) / 86400000 - 3 + (week1.getDay() + 6) % 7) / 7);\n },\n hourIncrement: 1,\n ignoredFocusElements: [],\n inline: false,\n locale: \"default\",\n minuteIncrement: 5,\n mode: \"single\",\n monthSelectorType: \"dropdown\",\n nextArrow: \"\",\n noCalendar: false,\n now: new Date(),\n onChange: [],\n onClose: [],\n onDayCreate: [],\n onDestroy: [],\n onKeyDown: [],\n onMonthChange: [],\n onOpen: [],\n onParseConfig: [],\n onReady: [],\n onValueUpdate: [],\n onYearChange: [],\n onPreCalendarPosition: [],\n plugins: [],\n position: \"auto\",\n positionElement: undefined,\n prevArrow: \"\",\n shorthandCurrentMonth: false,\n showMonths: 1,\n static: false,\n time_24hr: false,\n weekNumbers: false,\n wrap: false\n };\n var english = {\n weekdays: {\n shorthand: [\"Sun\", \"Mon\", \"Tue\", \"Wed\", \"Thu\", \"Fri\", \"Sat\"],\n longhand: [\"Sunday\", \"Monday\", \"Tuesday\", \"Wednesday\", \"Thursday\", \"Friday\", \"Saturday\"]\n },\n months: {\n shorthand: [\"Jan\", \"Feb\", \"Mar\", \"Apr\", \"May\", \"Jun\", \"Jul\", \"Aug\", \"Sep\", \"Oct\", \"Nov\", \"Dec\"],\n longhand: [\"January\", \"February\", \"March\", \"April\", \"May\", \"June\", \"July\", \"August\", \"September\", \"October\", \"November\", \"December\"]\n },\n daysInMonth: [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31],\n firstDayOfWeek: 0,\n ordinal: function ordinal(nth) {\n var s = nth % 100;\n if (s > 3 && s < 21) return \"th\";\n\n switch (s % 10) {\n case 1:\n return \"st\";\n\n case 2:\n return \"nd\";\n\n case 3:\n return \"rd\";\n\n default:\n return \"th\";\n }\n },\n rangeSeparator: \" to \",\n weekAbbreviation: \"Wk\",\n scrollTitle: \"Scroll to increment\",\n toggleTitle: \"Click to toggle\",\n amPM: [\"AM\", \"PM\"],\n yearAriaLabel: \"Year\",\n hourAriaLabel: \"Hour\",\n minuteAriaLabel: \"Minute\",\n time_24hr: false\n };\n\n var pad = function pad(number) {\n return (\"0\" + number).slice(-2);\n };\n\n var int = function int(bool) {\n return bool === true ? 1 : 0;\n };\n /* istanbul ignore next */\n\n\n function debounce(func, wait, immediate) {\n if (immediate === void 0) {\n immediate = false;\n }\n\n var timeout;\n return function () {\n var context = this,\n args = arguments;\n timeout !== null && clearTimeout(timeout);\n timeout = window.setTimeout(function () {\n timeout = null;\n if (!immediate) func.apply(context, args);\n }, wait);\n if (immediate && !timeout) func.apply(context, args);\n };\n }\n\n var arrayify = function arrayify(obj) {\n return obj instanceof Array ? obj : [obj];\n };\n\n function toggleClass(elem, className, bool) {\n if (bool === true) return elem.classList.add(className);\n elem.classList.remove(className);\n }\n\n function createElement(tag, className, content) {\n var e = window.document.createElement(tag);\n className = className || \"\";\n content = content || \"\";\n e.className = className;\n if (content !== undefined) e.textContent = content;\n return e;\n }\n\n function clearNode(node) {\n while (node.firstChild) {\n node.removeChild(node.firstChild);\n }\n }\n\n function findParent(node, condition) {\n if (condition(node)) return node;else if (node.parentNode) return findParent(node.parentNode, condition);\n return undefined; // nothing found\n }\n\n function createNumberInput(inputClassName, opts) {\n var wrapper = createElement(\"div\", \"numInputWrapper\"),\n numInput = createElement(\"input\", \"numInput \" + inputClassName),\n arrowUp = createElement(\"span\", \"arrowUp\"),\n arrowDown = createElement(\"span\", \"arrowDown\");\n\n if (navigator.userAgent.indexOf(\"MSIE 9.0\") === -1) {\n numInput.type = \"number\";\n } else {\n numInput.type = \"text\";\n numInput.pattern = \"\\\\d*\";\n }\n\n if (opts !== undefined) for (var key in opts) {\n numInput.setAttribute(key, opts[key]);\n }\n wrapper.appendChild(numInput);\n wrapper.appendChild(arrowUp);\n wrapper.appendChild(arrowDown);\n return wrapper;\n }\n\n function getEventTarget(event) {\n if (typeof event.composedPath === \"function\") {\n var path = event.composedPath();\n return path[0];\n }\n\n return event.target;\n }\n\n var doNothing = function doNothing() {\n return undefined;\n };\n\n var monthToStr = function monthToStr(monthNumber, shorthand, locale) {\n return locale.months[shorthand ? \"shorthand\" : \"longhand\"][monthNumber];\n };\n\n var revFormat = {\n D: doNothing,\n F: function F(dateObj, monthName, locale) {\n dateObj.setMonth(locale.months.longhand.indexOf(monthName));\n },\n G: function G(dateObj, hour) {\n dateObj.setHours(parseFloat(hour));\n },\n H: function H(dateObj, hour) {\n dateObj.setHours(parseFloat(hour));\n },\n J: function J(dateObj, day) {\n dateObj.setDate(parseFloat(day));\n },\n K: function K(dateObj, amPM, locale) {\n dateObj.setHours(dateObj.getHours() % 12 + 12 * int(new RegExp(locale.amPM[1], \"i\").test(amPM)));\n },\n M: function M(dateObj, shortMonth, locale) {\n dateObj.setMonth(locale.months.shorthand.indexOf(shortMonth));\n },\n S: function S(dateObj, seconds) {\n dateObj.setSeconds(parseFloat(seconds));\n },\n U: function U(_, unixSeconds) {\n return new Date(parseFloat(unixSeconds) * 1000);\n },\n W: function W(dateObj, weekNum, locale) {\n var weekNumber = parseInt(weekNum);\n var date = new Date(dateObj.getFullYear(), 0, 2 + (weekNumber - 1) * 7, 0, 0, 0, 0);\n date.setDate(date.getDate() - date.getDay() + locale.firstDayOfWeek);\n return date;\n },\n Y: function Y(dateObj, year) {\n dateObj.setFullYear(parseFloat(year));\n },\n Z: function Z(_, ISODate) {\n return new Date(ISODate);\n },\n d: function d(dateObj, day) {\n dateObj.setDate(parseFloat(day));\n },\n h: function h(dateObj, hour) {\n dateObj.setHours(parseFloat(hour));\n },\n i: function i(dateObj, minutes) {\n dateObj.setMinutes(parseFloat(minutes));\n },\n j: function j(dateObj, day) {\n dateObj.setDate(parseFloat(day));\n },\n l: doNothing,\n m: function m(dateObj, month) {\n dateObj.setMonth(parseFloat(month) - 1);\n },\n n: function n(dateObj, month) {\n dateObj.setMonth(parseFloat(month) - 1);\n },\n s: function s(dateObj, seconds) {\n dateObj.setSeconds(parseFloat(seconds));\n },\n u: function u(_, unixMillSeconds) {\n return new Date(parseFloat(unixMillSeconds));\n },\n w: doNothing,\n y: function y(dateObj, year) {\n dateObj.setFullYear(2000 + parseFloat(year));\n }\n };\n var tokenRegex = {\n D: \"(\\\\w+)\",\n F: \"(\\\\w+)\",\n G: \"(\\\\d\\\\d|\\\\d)\",\n H: \"(\\\\d\\\\d|\\\\d)\",\n J: \"(\\\\d\\\\d|\\\\d)\\\\w+\",\n K: \"\",\n M: \"(\\\\w+)\",\n S: \"(\\\\d\\\\d|\\\\d)\",\n U: \"(.+)\",\n W: \"(\\\\d\\\\d|\\\\d)\",\n Y: \"(\\\\d{4})\",\n Z: \"(.+)\",\n d: \"(\\\\d\\\\d|\\\\d)\",\n h: \"(\\\\d\\\\d|\\\\d)\",\n i: \"(\\\\d\\\\d|\\\\d)\",\n j: \"(\\\\d\\\\d|\\\\d)\",\n l: \"(\\\\w+)\",\n m: \"(\\\\d\\\\d|\\\\d)\",\n n: \"(\\\\d\\\\d|\\\\d)\",\n s: \"(\\\\d\\\\d|\\\\d)\",\n u: \"(.+)\",\n w: \"(\\\\d\\\\d|\\\\d)\",\n y: \"(\\\\d{2})\"\n };\n var formats = {\n // get the date in UTC\n Z: function Z(date) {\n return date.toISOString();\n },\n // weekday name, short, e.g. Thu\n D: function D(date, locale, options) {\n return locale.weekdays.shorthand[formats.w(date, locale, options)];\n },\n // full month name e.g. January\n F: function F(date, locale, options) {\n return monthToStr(formats.n(date, locale, options) - 1, false, locale);\n },\n // padded hour 1-12\n G: function G(date, locale, options) {\n return pad(formats.h(date, locale, options));\n },\n // hours with leading zero e.g. 03\n H: function H(date) {\n return pad(date.getHours());\n },\n // day (1-30) with ordinal suffix e.g. 1st, 2nd\n J: function J(date, locale) {\n return locale.ordinal !== undefined ? date.getDate() + locale.ordinal(date.getDate()) : date.getDate();\n },\n // AM/PM\n K: function K(date, locale) {\n return locale.amPM[int(date.getHours() > 11)];\n },\n // shorthand month e.g. Jan, Sep, Oct, etc\n M: function M(date, locale) {\n return monthToStr(date.getMonth(), true, locale);\n },\n // seconds 00-59\n S: function S(date) {\n return pad(date.getSeconds());\n },\n // unix timestamp\n U: function U(date) {\n return date.getTime() / 1000;\n },\n W: function W(date, _, options) {\n return options.getWeek(date);\n },\n // full year e.g. 2016\n Y: function Y(date) {\n return date.getFullYear();\n },\n // day in month, padded (01-30)\n d: function d(date) {\n return pad(date.getDate());\n },\n // hour from 1-12 (am/pm)\n h: function h(date) {\n return date.getHours() % 12 ? date.getHours() % 12 : 12;\n },\n // minutes, padded with leading zero e.g. 09\n i: function i(date) {\n return pad(date.getMinutes());\n },\n // day in month (1-30)\n j: function j(date) {\n return date.getDate();\n },\n // weekday name, full, e.g. Thursday\n l: function l(date, locale) {\n return locale.weekdays.longhand[date.getDay()];\n },\n // padded month number (01-12)\n m: function m(date) {\n return pad(date.getMonth() + 1);\n },\n // the month number (1-12)\n n: function n(date) {\n return date.getMonth() + 1;\n },\n // seconds 0-59\n s: function s(date) {\n return date.getSeconds();\n },\n // Unix Milliseconds\n u: function u(date) {\n return date.getTime();\n },\n // number of the day of the week\n w: function w(date) {\n return date.getDay();\n },\n // last two digits of year e.g. 16 for 2016\n y: function y(date) {\n return String(date.getFullYear()).substring(2);\n }\n };\n\n var createDateFormatter = function createDateFormatter(_a) {\n var _b = _a.config,\n config = _b === void 0 ? defaults : _b,\n _c = _a.l10n,\n l10n = _c === void 0 ? english : _c;\n return function (dateObj, frmt, overrideLocale) {\n var locale = overrideLocale || l10n;\n\n if (config.formatDate !== undefined) {\n return config.formatDate(dateObj, frmt, locale);\n }\n\n return frmt.split(\"\").map(function (c, i, arr) {\n return formats[c] && arr[i - 1] !== \"\\\\\" ? formats[c](dateObj, locale, config) : c !== \"\\\\\" ? c : \"\";\n }).join(\"\");\n };\n };\n\n var createDateParser = function createDateParser(_a) {\n var _b = _a.config,\n config = _b === void 0 ? defaults : _b,\n _c = _a.l10n,\n l10n = _c === void 0 ? english : _c;\n return function (date, givenFormat, timeless, customLocale) {\n if (date !== 0 && !date) return undefined;\n var locale = customLocale || l10n;\n var parsedDate;\n var dateOrig = date;\n if (date instanceof Date) parsedDate = new Date(date.getTime());else if (typeof date !== \"string\" && date.toFixed !== undefined // timestamp\n ) // create a copy\n parsedDate = new Date(date);else if (typeof date === \"string\") {\n // date string\n var format = givenFormat || (config || defaults).dateFormat;\n var datestr = String(date).trim();\n\n if (datestr === \"today\") {\n parsedDate = new Date();\n timeless = true;\n } else if (/Z$/.test(datestr) || /GMT$/.test(datestr) // datestrings w/ timezone\n ) parsedDate = new Date(date);else if (config && config.parseDate) parsedDate = config.parseDate(date, format);else {\n parsedDate = !config || !config.noCalendar ? new Date(new Date().getFullYear(), 0, 1, 0, 0, 0, 0) : new Date(new Date().setHours(0, 0, 0, 0));\n var matched = void 0,\n ops = [];\n\n for (var i = 0, matchIndex = 0, regexStr = \"\"; i < format.length; i++) {\n var token_1 = format[i];\n var isBackSlash = token_1 === \"\\\\\";\n var escaped = format[i - 1] === \"\\\\\" || isBackSlash;\n\n if (tokenRegex[token_1] && !escaped) {\n regexStr += tokenRegex[token_1];\n var match = new RegExp(regexStr).exec(date);\n\n if (match && (matched = true)) {\n ops[token_1 !== \"Y\" ? \"push\" : \"unshift\"]({\n fn: revFormat[token_1],\n val: match[++matchIndex]\n });\n }\n } else if (!isBackSlash) regexStr += \".\"; // don't really care\n\n\n ops.forEach(function (_a) {\n var fn = _a.fn,\n val = _a.val;\n return parsedDate = fn(parsedDate, val, locale) || parsedDate;\n });\n }\n\n parsedDate = matched ? parsedDate : undefined;\n }\n }\n /* istanbul ignore next */\n\n if (!(parsedDate instanceof Date && !isNaN(parsedDate.getTime()))) {\n config.errorHandler(new Error(\"Invalid date provided: \" + dateOrig));\n return undefined;\n }\n\n if (timeless === true) parsedDate.setHours(0, 0, 0, 0);\n return parsedDate;\n };\n };\n /**\n * Compute the difference in dates, measured in ms\n */\n\n\n function compareDates(date1, date2, timeless) {\n if (timeless === void 0) {\n timeless = true;\n }\n\n if (timeless !== false) {\n return new Date(date1.getTime()).setHours(0, 0, 0, 0) - new Date(date2.getTime()).setHours(0, 0, 0, 0);\n }\n\n return date1.getTime() - date2.getTime();\n }\n\n var isBetween = function isBetween(ts, ts1, ts2) {\n return ts > Math.min(ts1, ts2) && ts < Math.max(ts1, ts2);\n };\n\n var duration = {\n DAY: 86400000\n };\n\n if (typeof Object.assign !== \"function\") {\n Object.assign = function (target) {\n var args = [];\n\n for (var _i = 1; _i < arguments.length; _i++) {\n args[_i - 1] = arguments[_i];\n }\n\n if (!target) {\n throw TypeError(\"Cannot convert undefined or null to object\");\n }\n\n var _loop_1 = function _loop_1(source) {\n if (source) {\n Object.keys(source).forEach(function (key) {\n return target[key] = source[key];\n });\n }\n };\n\n for (var _a = 0, args_1 = args; _a < args_1.length; _a++) {\n var source = args_1[_a];\n\n _loop_1(source);\n }\n\n return target;\n };\n }\n\n var DEBOUNCED_CHANGE_MS = 300;\n\n function FlatpickrInstance(element, instanceConfig) {\n var self = {\n config: _assign({}, defaults, flatpickr.defaultConfig),\n l10n: english\n };\n self.parseDate = createDateParser({\n config: self.config,\n l10n: self.l10n\n });\n self._handlers = [];\n self.pluginElements = [];\n self.loadedPlugins = [];\n self._bind = bind;\n self._setHoursFromDate = setHoursFromDate;\n self._positionCalendar = positionCalendar;\n self.changeMonth = changeMonth;\n self.changeYear = changeYear;\n self.clear = clear;\n self.close = close;\n self._createElement = createElement;\n self.destroy = destroy;\n self.isEnabled = isEnabled;\n self.jumpToDate = jumpToDate;\n self.open = open;\n self.redraw = redraw;\n self.set = set;\n self.setDate = setDate;\n self.toggle = toggle;\n\n function setupHelperFunctions() {\n self.utils = {\n getDaysInMonth: function getDaysInMonth(month, yr) {\n if (month === void 0) {\n month = self.currentMonth;\n }\n\n if (yr === void 0) {\n yr = self.currentYear;\n }\n\n if (month === 1 && (yr % 4 === 0 && yr % 100 !== 0 || yr % 400 === 0)) return 29;\n return self.l10n.daysInMonth[month];\n }\n };\n }\n\n function init() {\n self.element = self.input = element;\n self.isOpen = false;\n parseConfig();\n setupLocale();\n setupInputs();\n setupDates();\n setupHelperFunctions();\n if (!self.isMobile) build();\n bindEvents();\n\n if (self.selectedDates.length || self.config.noCalendar) {\n if (self.config.enableTime) {\n setHoursFromDate(self.config.noCalendar ? self.latestSelectedDateObj || self.config.minDate : undefined);\n }\n\n updateValue(false);\n }\n\n setCalendarWidth();\n self.showTimeInput = self.selectedDates.length > 0 || self.config.noCalendar;\n var isSafari = /^((?!chrome|android).)*safari/i.test(navigator.userAgent);\n /* TODO: investigate this further\n Currently, there is weird positioning behavior in safari causing pages\n to scroll up. https://github.com/chmln/flatpickr/issues/563\n However, most browsers are not Safari and positioning is expensive when used\n in scale. https://github.com/chmln/flatpickr/issues/1096\n */\n\n if (!self.isMobile && isSafari) {\n positionCalendar();\n }\n\n triggerEvent(\"onReady\");\n }\n\n function bindToInstance(fn) {\n return fn.bind(self);\n }\n\n function setCalendarWidth() {\n var config = self.config;\n if (config.weekNumbers === false && config.showMonths === 1) return;else if (config.noCalendar !== true) {\n window.requestAnimationFrame(function () {\n if (self.calendarContainer !== undefined) {\n self.calendarContainer.style.visibility = \"hidden\";\n self.calendarContainer.style.display = \"block\";\n }\n\n if (self.daysContainer !== undefined) {\n var daysWidth = (self.days.offsetWidth + 1) * config.showMonths;\n self.daysContainer.style.width = daysWidth + \"px\";\n self.calendarContainer.style.width = daysWidth + (self.weekWrapper !== undefined ? self.weekWrapper.offsetWidth : 0) + \"px\";\n self.calendarContainer.style.removeProperty(\"visibility\");\n self.calendarContainer.style.removeProperty(\"display\");\n }\n });\n }\n }\n /**\n * The handler for all events targeting the time inputs\n */\n\n\n function updateTime(e) {\n if (self.selectedDates.length === 0) {\n setDefaultTime();\n }\n\n if (e !== undefined && e.type !== \"blur\") {\n timeWrapper(e);\n }\n\n var prevValue = self._input.value;\n setHoursFromInputs();\n updateValue();\n\n if (self._input.value !== prevValue) {\n self._debouncedChange();\n }\n }\n\n function ampm2military(hour, amPM) {\n return hour % 12 + 12 * int(amPM === self.l10n.amPM[1]);\n }\n\n function military2ampm(hour) {\n switch (hour % 24) {\n case 0:\n case 12:\n return 12;\n\n default:\n return hour % 12;\n }\n }\n /**\n * Syncs the selected date object time with user's time input\n */\n\n\n function setHoursFromInputs() {\n if (self.hourElement === undefined || self.minuteElement === undefined) return;\n var hours = (parseInt(self.hourElement.value.slice(-2), 10) || 0) % 24,\n minutes = (parseInt(self.minuteElement.value, 10) || 0) % 60,\n seconds = self.secondElement !== undefined ? (parseInt(self.secondElement.value, 10) || 0) % 60 : 0;\n\n if (self.amPM !== undefined) {\n hours = ampm2military(hours, self.amPM.textContent);\n }\n\n var limitMinHours = self.config.minTime !== undefined || self.config.minDate && self.minDateHasTime && self.latestSelectedDateObj && compareDates(self.latestSelectedDateObj, self.config.minDate, true) === 0;\n var limitMaxHours = self.config.maxTime !== undefined || self.config.maxDate && self.maxDateHasTime && self.latestSelectedDateObj && compareDates(self.latestSelectedDateObj, self.config.maxDate, true) === 0;\n\n if (limitMaxHours) {\n var maxTime = self.config.maxTime !== undefined ? self.config.maxTime : self.config.maxDate;\n hours = Math.min(hours, maxTime.getHours());\n if (hours === maxTime.getHours()) minutes = Math.min(minutes, maxTime.getMinutes());\n if (minutes === maxTime.getMinutes()) seconds = Math.min(seconds, maxTime.getSeconds());\n }\n\n if (limitMinHours) {\n var minTime = self.config.minTime !== undefined ? self.config.minTime : self.config.minDate;\n hours = Math.max(hours, minTime.getHours());\n if (hours === minTime.getHours()) minutes = Math.max(minutes, minTime.getMinutes());\n if (minutes === minTime.getMinutes()) seconds = Math.max(seconds, minTime.getSeconds());\n }\n\n setHours(hours, minutes, seconds);\n }\n /**\n * Syncs time input values with a date\n */\n\n\n function setHoursFromDate(dateObj) {\n var date = dateObj || self.latestSelectedDateObj;\n if (date) setHours(date.getHours(), date.getMinutes(), date.getSeconds());\n }\n\n function setDefaultHours() {\n var hours = self.config.defaultHour;\n var minutes = self.config.defaultMinute;\n var seconds = self.config.defaultSeconds;\n\n if (self.config.minDate !== undefined) {\n var minHr = self.config.minDate.getHours();\n var minMinutes = self.config.minDate.getMinutes();\n hours = Math.max(hours, minHr);\n if (hours === minHr) minutes = Math.max(minMinutes, minutes);\n if (hours === minHr && minutes === minMinutes) seconds = self.config.minDate.getSeconds();\n }\n\n if (self.config.maxDate !== undefined) {\n var maxHr = self.config.maxDate.getHours();\n var maxMinutes = self.config.maxDate.getMinutes();\n hours = Math.min(hours, maxHr);\n if (hours === maxHr) minutes = Math.min(maxMinutes, minutes);\n if (hours === maxHr && minutes === maxMinutes) seconds = self.config.maxDate.getSeconds();\n }\n\n setHours(hours, minutes, seconds);\n }\n /**\n * Sets the hours, minutes, and optionally seconds\n * of the latest selected date object and the\n * corresponding time inputs\n * @param {Number} hours the hour. whether its military\n * or am-pm gets inferred from config\n * @param {Number} minutes the minutes\n * @param {Number} seconds the seconds (optional)\n */\n\n\n function setHours(hours, minutes, seconds) {\n if (self.latestSelectedDateObj !== undefined) {\n self.latestSelectedDateObj.setHours(hours % 24, minutes, seconds || 0, 0);\n }\n\n if (!self.hourElement || !self.minuteElement || self.isMobile) return;\n self.hourElement.value = pad(!self.config.time_24hr ? (12 + hours) % 12 + 12 * int(hours % 12 === 0) : hours);\n self.minuteElement.value = pad(minutes);\n if (self.amPM !== undefined) self.amPM.textContent = self.l10n.amPM[int(hours >= 12)];\n if (self.secondElement !== undefined) self.secondElement.value = pad(seconds);\n }\n /**\n * Handles the year input and incrementing events\n * @param {Event} event the keyup or increment event\n */\n\n\n function onYearInput(event) {\n var year = parseInt(event.target.value) + (event.delta || 0);\n\n if (year / 1000 > 1 || event.key === \"Enter\" && !/[^\\d]/.test(year.toString())) {\n changeYear(year);\n }\n }\n /**\n * Essentially addEventListener + tracking\n * @param {Element} element the element to addEventListener to\n * @param {String} event the event name\n * @param {Function} handler the event handler\n */\n\n\n function bind(element, event, handler, options) {\n if (event instanceof Array) return event.forEach(function (ev) {\n return bind(element, ev, handler, options);\n });\n if (element instanceof Array) return element.forEach(function (el) {\n return bind(el, event, handler, options);\n });\n element.addEventListener(event, handler, options);\n\n self._handlers.push({\n element: element,\n event: event,\n handler: handler,\n options: options\n });\n }\n /**\n * A mousedown handler which mimics click.\n * Minimizes latency, since we don't need to wait for mouseup in most cases.\n * Also, avoids handling right clicks.\n *\n * @param {Function} handler the event handler\n */\n\n\n function onClick(handler) {\n return function (evt) {\n evt.which === 1 && handler(evt);\n };\n }\n\n function triggerChange() {\n triggerEvent(\"onChange\");\n }\n /**\n * Adds all the necessary event listeners\n */\n\n\n function bindEvents() {\n if (self.config.wrap) {\n [\"open\", \"close\", \"toggle\", \"clear\"].forEach(function (evt) {\n Array.prototype.forEach.call(self.element.querySelectorAll(\"[data-\" + evt + \"]\"), function (el) {\n return bind(el, \"click\", self[evt]);\n });\n });\n }\n\n if (self.isMobile) {\n setupMobile();\n return;\n }\n\n var debouncedResize = debounce(onResize, 50);\n self._debouncedChange = debounce(triggerChange, DEBOUNCED_CHANGE_MS);\n if (self.daysContainer && !/iPhone|iPad|iPod/i.test(navigator.userAgent)) bind(self.daysContainer, \"mouseover\", function (e) {\n if (self.config.mode === \"range\") onMouseOver(e.target);\n });\n bind(window.document.body, \"keydown\", onKeyDown);\n if (!self.config.inline && !self.config.static) bind(window, \"resize\", debouncedResize);\n if (window.ontouchstart !== undefined) bind(window.document, \"touchstart\", documentClick);else bind(window.document, \"mousedown\", onClick(documentClick));\n bind(window.document, \"focus\", documentClick, {\n capture: true\n });\n\n if (self.config.clickOpens === true) {\n bind(self._input, \"focus\", self.open);\n bind(self._input, \"mousedown\", onClick(self.open));\n }\n\n if (self.daysContainer !== undefined) {\n bind(self.monthNav, \"mousedown\", onClick(onMonthNavClick));\n bind(self.monthNav, [\"keyup\", \"increment\"], onYearInput);\n bind(self.daysContainer, \"mousedown\", onClick(selectDate));\n }\n\n if (self.timeContainer !== undefined && self.minuteElement !== undefined && self.hourElement !== undefined) {\n var selText = function selText(e) {\n return e.target.select();\n };\n\n bind(self.timeContainer, [\"increment\"], updateTime);\n bind(self.timeContainer, \"blur\", updateTime, {\n capture: true\n });\n bind(self.timeContainer, \"mousedown\", onClick(timeIncrement));\n bind([self.hourElement, self.minuteElement], [\"focus\", \"click\"], selText);\n if (self.secondElement !== undefined) bind(self.secondElement, \"focus\", function () {\n return self.secondElement && self.secondElement.select();\n });\n\n if (self.amPM !== undefined) {\n bind(self.amPM, \"mousedown\", onClick(function (e) {\n updateTime(e);\n triggerChange();\n }));\n }\n }\n }\n /**\n * Set the calendar view to a particular date.\n * @param {Date} jumpDate the date to set the view to\n * @param {boolean} triggerChange if change events should be triggered\n */\n\n\n function jumpToDate(jumpDate, triggerChange) {\n var jumpTo = jumpDate !== undefined ? self.parseDate(jumpDate) : self.latestSelectedDateObj || (self.config.minDate && self.config.minDate > self.now ? self.config.minDate : self.config.maxDate && self.config.maxDate < self.now ? self.config.maxDate : self.now);\n var oldYear = self.currentYear;\n var oldMonth = self.currentMonth;\n\n try {\n if (jumpTo !== undefined) {\n self.currentYear = jumpTo.getFullYear();\n self.currentMonth = jumpTo.getMonth();\n }\n } catch (e) {\n /* istanbul ignore next */\n e.message = \"Invalid date supplied: \" + jumpTo;\n self.config.errorHandler(e);\n }\n\n if (triggerChange && self.currentYear !== oldYear) {\n triggerEvent(\"onYearChange\");\n buildMonthSwitch();\n }\n\n if (triggerChange && (self.currentYear !== oldYear || self.currentMonth !== oldMonth)) {\n triggerEvent(\"onMonthChange\");\n }\n\n self.redraw();\n }\n /**\n * The up/down arrow handler for time inputs\n * @param {Event} e the click event\n */\n\n\n function timeIncrement(e) {\n if (~e.target.className.indexOf(\"arrow\")) incrementNumInput(e, e.target.classList.contains(\"arrowUp\") ? 1 : -1);\n }\n /**\n * Increments/decrements the value of input associ-\n * ated with the up/down arrow by dispatching an\n * \"increment\" event on the input.\n *\n * @param {Event} e the click event\n * @param {Number} delta the diff (usually 1 or -1)\n * @param {Element} inputElem the input element\n */\n\n\n function incrementNumInput(e, delta, inputElem) {\n var target = e && e.target;\n var input = inputElem || target && target.parentNode && target.parentNode.firstChild;\n var event = createEvent(\"increment\");\n event.delta = delta;\n input && input.dispatchEvent(event);\n }\n\n function build() {\n var fragment = window.document.createDocumentFragment();\n self.calendarContainer = createElement(\"div\", \"flatpickr-calendar\");\n self.calendarContainer.tabIndex = -1;\n\n if (!self.config.noCalendar) {\n fragment.appendChild(buildMonthNav());\n self.innerContainer = createElement(\"div\", \"flatpickr-innerContainer\");\n\n if (self.config.weekNumbers) {\n var _a = buildWeeks(),\n weekWrapper = _a.weekWrapper,\n weekNumbers = _a.weekNumbers;\n\n self.innerContainer.appendChild(weekWrapper);\n self.weekNumbers = weekNumbers;\n self.weekWrapper = weekWrapper;\n }\n\n self.rContainer = createElement(\"div\", \"flatpickr-rContainer\");\n self.rContainer.appendChild(buildWeekdays());\n\n if (!self.daysContainer) {\n self.daysContainer = createElement(\"div\", \"flatpickr-days\");\n self.daysContainer.tabIndex = -1;\n }\n\n buildDays();\n self.rContainer.appendChild(self.daysContainer);\n self.innerContainer.appendChild(self.rContainer);\n fragment.appendChild(self.innerContainer);\n }\n\n if (self.config.enableTime) {\n fragment.appendChild(buildTime());\n }\n\n toggleClass(self.calendarContainer, \"rangeMode\", self.config.mode === \"range\");\n toggleClass(self.calendarContainer, \"animate\", self.config.animate === true);\n toggleClass(self.calendarContainer, \"multiMonth\", self.config.showMonths > 1);\n self.calendarContainer.appendChild(fragment);\n var customAppend = self.config.appendTo !== undefined && self.config.appendTo.nodeType !== undefined;\n\n if (self.config.inline || self.config.static) {\n self.calendarContainer.classList.add(self.config.inline ? \"inline\" : \"static\");\n\n if (self.config.inline) {\n if (!customAppend && self.element.parentNode) self.element.parentNode.insertBefore(self.calendarContainer, self._input.nextSibling);else if (self.config.appendTo !== undefined) self.config.appendTo.appendChild(self.calendarContainer);\n }\n\n if (self.config.static) {\n var wrapper = createElement(\"div\", \"flatpickr-wrapper\");\n if (self.element.parentNode) self.element.parentNode.insertBefore(wrapper, self.element);\n wrapper.appendChild(self.element);\n if (self.altInput) wrapper.appendChild(self.altInput);\n wrapper.appendChild(self.calendarContainer);\n }\n }\n\n if (!self.config.static && !self.config.inline) (self.config.appendTo !== undefined ? self.config.appendTo : window.document.body).appendChild(self.calendarContainer);\n }\n\n function createDay(className, date, dayNumber, i) {\n var dateIsEnabled = isEnabled(date, true),\n dayElement = createElement(\"span\", \"flatpickr-day \" + className, date.getDate().toString());\n dayElement.dateObj = date;\n dayElement.$i = i;\n dayElement.setAttribute(\"aria-label\", self.formatDate(date, self.config.ariaDateFormat));\n\n if (className.indexOf(\"hidden\") === -1 && compareDates(date, self.now) === 0) {\n self.todayDateElem = dayElement;\n dayElement.classList.add(\"today\");\n dayElement.setAttribute(\"aria-current\", \"date\");\n }\n\n if (dateIsEnabled) {\n dayElement.tabIndex = -1;\n\n if (isDateSelected(date)) {\n dayElement.classList.add(\"selected\");\n self.selectedDateElem = dayElement;\n\n if (self.config.mode === \"range\") {\n toggleClass(dayElement, \"startRange\", self.selectedDates[0] && compareDates(date, self.selectedDates[0], true) === 0);\n toggleClass(dayElement, \"endRange\", self.selectedDates[1] && compareDates(date, self.selectedDates[1], true) === 0);\n if (className === \"nextMonthDay\") dayElement.classList.add(\"inRange\");\n }\n }\n } else {\n dayElement.classList.add(\"flatpickr-disabled\");\n }\n\n if (self.config.mode === \"range\") {\n if (isDateInRange(date) && !isDateSelected(date)) dayElement.classList.add(\"inRange\");\n }\n\n if (self.weekNumbers && self.config.showMonths === 1 && className !== \"prevMonthDay\" && dayNumber % 7 === 1) {\n self.weekNumbers.insertAdjacentHTML(\"beforeend\", \"\" + self.config.getWeek(date) + \"\");\n }\n\n triggerEvent(\"onDayCreate\", dayElement);\n return dayElement;\n }\n\n function focusOnDayElem(targetNode) {\n targetNode.focus();\n if (self.config.mode === \"range\") onMouseOver(targetNode);\n }\n\n function getFirstAvailableDay(delta) {\n var startMonth = delta > 0 ? 0 : self.config.showMonths - 1;\n var endMonth = delta > 0 ? self.config.showMonths : -1;\n\n for (var m = startMonth; m != endMonth; m += delta) {\n var month = self.daysContainer.children[m];\n var startIndex = delta > 0 ? 0 : month.children.length - 1;\n var endIndex = delta > 0 ? month.children.length : -1;\n\n for (var i = startIndex; i != endIndex; i += delta) {\n var c = month.children[i];\n if (c.className.indexOf(\"hidden\") === -1 && isEnabled(c.dateObj)) return c;\n }\n }\n\n return undefined;\n }\n\n function getNextAvailableDay(current, delta) {\n var givenMonth = current.className.indexOf(\"Month\") === -1 ? current.dateObj.getMonth() : self.currentMonth;\n var endMonth = delta > 0 ? self.config.showMonths : -1;\n var loopDelta = delta > 0 ? 1 : -1;\n\n for (var m = givenMonth - self.currentMonth; m != endMonth; m += loopDelta) {\n var month = self.daysContainer.children[m];\n var startIndex = givenMonth - self.currentMonth === m ? current.$i + delta : delta < 0 ? month.children.length - 1 : 0;\n var numMonthDays = month.children.length;\n\n for (var i = startIndex; i >= 0 && i < numMonthDays && i != (delta > 0 ? numMonthDays : -1); i += loopDelta) {\n var c = month.children[i];\n if (c.className.indexOf(\"hidden\") === -1 && isEnabled(c.dateObj) && Math.abs(current.$i - i) >= Math.abs(delta)) return focusOnDayElem(c);\n }\n }\n\n self.changeMonth(loopDelta);\n focusOnDay(getFirstAvailableDay(loopDelta), 0);\n return undefined;\n }\n\n function focusOnDay(current, offset) {\n var dayFocused = isInView(document.activeElement || document.body);\n var startElem = current !== undefined ? current : dayFocused ? document.activeElement : self.selectedDateElem !== undefined && isInView(self.selectedDateElem) ? self.selectedDateElem : self.todayDateElem !== undefined && isInView(self.todayDateElem) ? self.todayDateElem : getFirstAvailableDay(offset > 0 ? 1 : -1);\n if (startElem === undefined) return self._input.focus();\n if (!dayFocused) return focusOnDayElem(startElem);\n getNextAvailableDay(startElem, offset);\n }\n\n function buildMonthDays(year, month) {\n var firstOfMonth = (new Date(year, month, 1).getDay() - self.l10n.firstDayOfWeek + 7) % 7;\n var prevMonthDays = self.utils.getDaysInMonth((month - 1 + 12) % 12);\n var daysInMonth = self.utils.getDaysInMonth(month),\n days = window.document.createDocumentFragment(),\n isMultiMonth = self.config.showMonths > 1,\n prevMonthDayClass = isMultiMonth ? \"prevMonthDay hidden\" : \"prevMonthDay\",\n nextMonthDayClass = isMultiMonth ? \"nextMonthDay hidden\" : \"nextMonthDay\";\n var dayNumber = prevMonthDays + 1 - firstOfMonth,\n dayIndex = 0; // prepend days from the ending of previous month\n\n for (; dayNumber <= prevMonthDays; dayNumber++, dayIndex++) {\n days.appendChild(createDay(prevMonthDayClass, new Date(year, month - 1, dayNumber), dayNumber, dayIndex));\n } // Start at 1 since there is no 0th day\n\n\n for (dayNumber = 1; dayNumber <= daysInMonth; dayNumber++, dayIndex++) {\n days.appendChild(createDay(\"\", new Date(year, month, dayNumber), dayNumber, dayIndex));\n } // append days from the next month\n\n\n for (var dayNum = daysInMonth + 1; dayNum <= 42 - firstOfMonth && (self.config.showMonths === 1 || dayIndex % 7 !== 0); dayNum++, dayIndex++) {\n days.appendChild(createDay(nextMonthDayClass, new Date(year, month + 1, dayNum % daysInMonth), dayNum, dayIndex));\n } //updateNavigationCurrentMonth();\n\n\n var dayContainer = createElement(\"div\", \"dayContainer\");\n dayContainer.appendChild(days);\n return dayContainer;\n }\n\n function buildDays() {\n if (self.daysContainer === undefined) {\n return;\n }\n\n clearNode(self.daysContainer); // TODO: week numbers for each month\n\n if (self.weekNumbers) clearNode(self.weekNumbers);\n var frag = document.createDocumentFragment();\n\n for (var i = 0; i < self.config.showMonths; i++) {\n var d = new Date(self.currentYear, self.currentMonth, 1);\n d.setMonth(self.currentMonth + i);\n frag.appendChild(buildMonthDays(d.getFullYear(), d.getMonth()));\n }\n\n self.daysContainer.appendChild(frag);\n self.days = self.daysContainer.firstChild;\n\n if (self.config.mode === \"range\" && self.selectedDates.length === 1) {\n onMouseOver();\n }\n }\n\n function buildMonthSwitch() {\n if (self.config.showMonths > 1 || self.config.monthSelectorType !== \"dropdown\") return;\n\n var shouldBuildMonth = function shouldBuildMonth(month) {\n if (self.config.minDate !== undefined && self.currentYear === self.config.minDate.getFullYear() && month < self.config.minDate.getMonth()) {\n return false;\n }\n\n return !(self.config.maxDate !== undefined && self.currentYear === self.config.maxDate.getFullYear() && month > self.config.maxDate.getMonth());\n };\n\n self.monthsDropdownContainer.tabIndex = -1;\n self.monthsDropdownContainer.innerHTML = \"\";\n\n for (var i = 0; i < 12; i++) {\n if (!shouldBuildMonth(i)) continue;\n var month = createElement(\"option\", \"flatpickr-monthDropdown-month\");\n month.value = new Date(self.currentYear, i).getMonth().toString();\n month.textContent = monthToStr(i, self.config.shorthandCurrentMonth, self.l10n);\n month.tabIndex = -1;\n\n if (self.currentMonth === i) {\n month.selected = true;\n }\n\n self.monthsDropdownContainer.appendChild(month);\n }\n }\n\n function buildMonth() {\n var container = createElement(\"div\", \"flatpickr-month\");\n var monthNavFragment = window.document.createDocumentFragment();\n var monthElement;\n\n if (self.config.showMonths > 1 || self.config.monthSelectorType === \"static\") {\n monthElement = createElement(\"span\", \"cur-month\");\n } else {\n self.monthsDropdownContainer = createElement(\"select\", \"flatpickr-monthDropdown-months\");\n bind(self.monthsDropdownContainer, \"change\", function (e) {\n var target = e.target;\n var selectedMonth = parseInt(target.value, 10);\n self.changeMonth(selectedMonth - self.currentMonth);\n triggerEvent(\"onMonthChange\");\n });\n buildMonthSwitch();\n monthElement = self.monthsDropdownContainer;\n }\n\n var yearInput = createNumberInput(\"cur-year\", {\n tabindex: \"-1\"\n });\n var yearElement = yearInput.getElementsByTagName(\"input\")[0];\n yearElement.setAttribute(\"aria-label\", self.l10n.yearAriaLabel);\n\n if (self.config.minDate) {\n yearElement.setAttribute(\"min\", self.config.minDate.getFullYear().toString());\n }\n\n if (self.config.maxDate) {\n yearElement.setAttribute(\"max\", self.config.maxDate.getFullYear().toString());\n yearElement.disabled = !!self.config.minDate && self.config.minDate.getFullYear() === self.config.maxDate.getFullYear();\n }\n\n var currentMonth = createElement(\"div\", \"flatpickr-current-month\");\n currentMonth.appendChild(monthElement);\n currentMonth.appendChild(yearInput);\n monthNavFragment.appendChild(currentMonth);\n container.appendChild(monthNavFragment);\n return {\n container: container,\n yearElement: yearElement,\n monthElement: monthElement\n };\n }\n\n function buildMonths() {\n clearNode(self.monthNav);\n self.monthNav.appendChild(self.prevMonthNav);\n\n if (self.config.showMonths) {\n self.yearElements = [];\n self.monthElements = [];\n }\n\n for (var m = self.config.showMonths; m--;) {\n var month = buildMonth();\n self.yearElements.push(month.yearElement);\n self.monthElements.push(month.monthElement);\n self.monthNav.appendChild(month.container);\n }\n\n self.monthNav.appendChild(self.nextMonthNav);\n }\n\n function buildMonthNav() {\n self.monthNav = createElement(\"div\", \"flatpickr-months\");\n self.yearElements = [];\n self.monthElements = [];\n self.prevMonthNav = createElement(\"span\", \"flatpickr-prev-month\");\n self.prevMonthNav.innerHTML = self.config.prevArrow;\n self.nextMonthNav = createElement(\"span\", \"flatpickr-next-month\");\n self.nextMonthNav.innerHTML = self.config.nextArrow;\n buildMonths();\n Object.defineProperty(self, \"_hidePrevMonthArrow\", {\n get: function get() {\n return self.__hidePrevMonthArrow;\n },\n set: function set(bool) {\n if (self.__hidePrevMonthArrow !== bool) {\n toggleClass(self.prevMonthNav, \"flatpickr-disabled\", bool);\n self.__hidePrevMonthArrow = bool;\n }\n }\n });\n Object.defineProperty(self, \"_hideNextMonthArrow\", {\n get: function get() {\n return self.__hideNextMonthArrow;\n },\n set: function set(bool) {\n if (self.__hideNextMonthArrow !== bool) {\n toggleClass(self.nextMonthNav, \"flatpickr-disabled\", bool);\n self.__hideNextMonthArrow = bool;\n }\n }\n });\n self.currentYearElement = self.yearElements[0];\n updateNavigationCurrentMonth();\n return self.monthNav;\n }\n\n function buildTime() {\n self.calendarContainer.classList.add(\"hasTime\");\n if (self.config.noCalendar) self.calendarContainer.classList.add(\"noCalendar\");\n self.timeContainer = createElement(\"div\", \"flatpickr-time\");\n self.timeContainer.tabIndex = -1;\n var separator = createElement(\"span\", \"flatpickr-time-separator\", \":\");\n var hourInput = createNumberInput(\"flatpickr-hour\", {\n \"aria-label\": self.l10n.hourAriaLabel\n });\n self.hourElement = hourInput.getElementsByTagName(\"input\")[0];\n var minuteInput = createNumberInput(\"flatpickr-minute\", {\n \"aria-label\": self.l10n.minuteAriaLabel\n });\n self.minuteElement = minuteInput.getElementsByTagName(\"input\")[0];\n self.hourElement.tabIndex = self.minuteElement.tabIndex = -1;\n self.hourElement.value = pad(self.latestSelectedDateObj ? self.latestSelectedDateObj.getHours() : self.config.time_24hr ? self.config.defaultHour : military2ampm(self.config.defaultHour));\n self.minuteElement.value = pad(self.latestSelectedDateObj ? self.latestSelectedDateObj.getMinutes() : self.config.defaultMinute);\n self.hourElement.setAttribute(\"step\", self.config.hourIncrement.toString());\n self.minuteElement.setAttribute(\"step\", self.config.minuteIncrement.toString());\n self.hourElement.setAttribute(\"min\", self.config.time_24hr ? \"0\" : \"1\");\n self.hourElement.setAttribute(\"max\", self.config.time_24hr ? \"23\" : \"12\");\n self.minuteElement.setAttribute(\"min\", \"0\");\n self.minuteElement.setAttribute(\"max\", \"59\");\n self.timeContainer.appendChild(hourInput);\n self.timeContainer.appendChild(separator);\n self.timeContainer.appendChild(minuteInput);\n if (self.config.time_24hr) self.timeContainer.classList.add(\"time24hr\");\n\n if (self.config.enableSeconds) {\n self.timeContainer.classList.add(\"hasSeconds\");\n var secondInput = createNumberInput(\"flatpickr-second\");\n self.secondElement = secondInput.getElementsByTagName(\"input\")[0];\n self.secondElement.value = pad(self.latestSelectedDateObj ? self.latestSelectedDateObj.getSeconds() : self.config.defaultSeconds);\n self.secondElement.setAttribute(\"step\", self.minuteElement.getAttribute(\"step\"));\n self.secondElement.setAttribute(\"min\", \"0\");\n self.secondElement.setAttribute(\"max\", \"59\");\n self.timeContainer.appendChild(createElement(\"span\", \"flatpickr-time-separator\", \":\"));\n self.timeContainer.appendChild(secondInput);\n }\n\n if (!self.config.time_24hr) {\n // add self.amPM if appropriate\n self.amPM = createElement(\"span\", \"flatpickr-am-pm\", self.l10n.amPM[int((self.latestSelectedDateObj ? self.hourElement.value : self.config.defaultHour) > 11)]);\n self.amPM.title = self.l10n.toggleTitle;\n self.amPM.tabIndex = -1;\n self.timeContainer.appendChild(self.amPM);\n }\n\n return self.timeContainer;\n }\n\n function buildWeekdays() {\n if (!self.weekdayContainer) self.weekdayContainer = createElement(\"div\", \"flatpickr-weekdays\");else clearNode(self.weekdayContainer);\n\n for (var i = self.config.showMonths; i--;) {\n var container = createElement(\"div\", \"flatpickr-weekdaycontainer\");\n self.weekdayContainer.appendChild(container);\n }\n\n updateWeekdays();\n return self.weekdayContainer;\n }\n\n function updateWeekdays() {\n if (!self.weekdayContainer) {\n return;\n }\n\n var firstDayOfWeek = self.l10n.firstDayOfWeek;\n var weekdays = self.l10n.weekdays.shorthand.slice();\n\n if (firstDayOfWeek > 0 && firstDayOfWeek < weekdays.length) {\n weekdays = weekdays.splice(firstDayOfWeek, weekdays.length).concat(weekdays.splice(0, firstDayOfWeek));\n }\n\n for (var i = self.config.showMonths; i--;) {\n self.weekdayContainer.children[i].innerHTML = \"\\n \\n \" + weekdays.join(\"\") + \"\\n \\n \";\n }\n }\n /* istanbul ignore next */\n\n\n function buildWeeks() {\n self.calendarContainer.classList.add(\"hasWeeks\");\n var weekWrapper = createElement(\"div\", \"flatpickr-weekwrapper\");\n weekWrapper.appendChild(createElement(\"span\", \"flatpickr-weekday\", self.l10n.weekAbbreviation));\n var weekNumbers = createElement(\"div\", \"flatpickr-weeks\");\n weekWrapper.appendChild(weekNumbers);\n return {\n weekWrapper: weekWrapper,\n weekNumbers: weekNumbers\n };\n }\n\n function changeMonth(value, isOffset) {\n if (isOffset === void 0) {\n isOffset = true;\n }\n\n var delta = isOffset ? value : value - self.currentMonth;\n if (delta < 0 && self._hidePrevMonthArrow === true || delta > 0 && self._hideNextMonthArrow === true) return;\n self.currentMonth += delta;\n\n if (self.currentMonth < 0 || self.currentMonth > 11) {\n self.currentYear += self.currentMonth > 11 ? 1 : -1;\n self.currentMonth = (self.currentMonth + 12) % 12;\n triggerEvent(\"onYearChange\");\n buildMonthSwitch();\n }\n\n buildDays();\n triggerEvent(\"onMonthChange\");\n updateNavigationCurrentMonth();\n }\n\n function clear(triggerChangeEvent, toInitial) {\n if (triggerChangeEvent === void 0) {\n triggerChangeEvent = true;\n }\n\n if (toInitial === void 0) {\n toInitial = true;\n }\n\n self.input.value = \"\";\n if (self.altInput !== undefined) self.altInput.value = \"\";\n if (self.mobileInput !== undefined) self.mobileInput.value = \"\";\n self.selectedDates = [];\n self.latestSelectedDateObj = undefined;\n\n if (toInitial === true) {\n self.currentYear = self._initialDate.getFullYear();\n self.currentMonth = self._initialDate.getMonth();\n }\n\n self.showTimeInput = false;\n\n if (self.config.enableTime === true) {\n setDefaultHours();\n }\n\n self.redraw();\n if (triggerChangeEvent) // triggerChangeEvent is true (default) or an Event\n triggerEvent(\"onChange\");\n }\n\n function close() {\n self.isOpen = false;\n\n if (!self.isMobile) {\n if (self.calendarContainer !== undefined) {\n self.calendarContainer.classList.remove(\"open\");\n }\n\n if (self._input !== undefined) {\n self._input.classList.remove(\"active\");\n }\n }\n\n triggerEvent(\"onClose\");\n }\n\n function destroy() {\n if (self.config !== undefined) triggerEvent(\"onDestroy\");\n\n for (var i = self._handlers.length; i--;) {\n var h = self._handlers[i];\n h.element.removeEventListener(h.event, h.handler, h.options);\n }\n\n self._handlers = [];\n\n if (self.mobileInput) {\n if (self.mobileInput.parentNode) self.mobileInput.parentNode.removeChild(self.mobileInput);\n self.mobileInput = undefined;\n } else if (self.calendarContainer && self.calendarContainer.parentNode) {\n if (self.config.static && self.calendarContainer.parentNode) {\n var wrapper = self.calendarContainer.parentNode;\n wrapper.lastChild && wrapper.removeChild(wrapper.lastChild);\n\n if (wrapper.parentNode) {\n while (wrapper.firstChild) {\n wrapper.parentNode.insertBefore(wrapper.firstChild, wrapper);\n }\n\n wrapper.parentNode.removeChild(wrapper);\n }\n } else self.calendarContainer.parentNode.removeChild(self.calendarContainer);\n }\n\n if (self.altInput) {\n self.input.type = \"text\";\n if (self.altInput.parentNode) self.altInput.parentNode.removeChild(self.altInput);\n delete self.altInput;\n }\n\n if (self.input) {\n self.input.type = self.input._type;\n self.input.classList.remove(\"flatpickr-input\");\n self.input.removeAttribute(\"readonly\");\n self.input.value = \"\";\n }\n\n [\"_showTimeInput\", \"latestSelectedDateObj\", \"_hideNextMonthArrow\", \"_hidePrevMonthArrow\", \"__hideNextMonthArrow\", \"__hidePrevMonthArrow\", \"isMobile\", \"isOpen\", \"selectedDateElem\", \"minDateHasTime\", \"maxDateHasTime\", \"days\", \"daysContainer\", \"_input\", \"_positionElement\", \"innerContainer\", \"rContainer\", \"monthNav\", \"todayDateElem\", \"calendarContainer\", \"weekdayContainer\", \"prevMonthNav\", \"nextMonthNav\", \"monthsDropdownContainer\", \"currentMonthElement\", \"currentYearElement\", \"navigationCurrentMonth\", \"selectedDateElem\", \"config\"].forEach(function (k) {\n try {\n delete self[k];\n } catch (_) {}\n });\n }\n\n function isCalendarElem(elem) {\n if (self.config.appendTo && self.config.appendTo.contains(elem)) return true;\n return self.calendarContainer.contains(elem);\n }\n\n function documentClick(e) {\n if (self.isOpen && !self.config.inline) {\n var eventTarget_1 = getEventTarget(e);\n var isCalendarElement = isCalendarElem(eventTarget_1);\n var isInput = eventTarget_1 === self.input || eventTarget_1 === self.altInput || self.element.contains(eventTarget_1) || // web components\n // e.path is not present in all browsers. circumventing typechecks\n e.path && e.path.indexOf && (~e.path.indexOf(self.input) || ~e.path.indexOf(self.altInput));\n var lostFocus = e.type === \"blur\" ? isInput && e.relatedTarget && !isCalendarElem(e.relatedTarget) : !isInput && !isCalendarElement && !isCalendarElem(e.relatedTarget);\n var isIgnored = !self.config.ignoredFocusElements.some(function (elem) {\n return elem.contains(eventTarget_1);\n });\n\n if (lostFocus && isIgnored) {\n if (self.timeContainer !== undefined && self.minuteElement !== undefined && self.hourElement !== undefined) {\n updateTime();\n }\n\n self.close();\n\n if (self.config.mode === \"range\" && self.selectedDates.length === 1) {\n self.clear(false);\n self.redraw();\n }\n }\n }\n }\n\n function changeYear(newYear) {\n if (!newYear || self.config.minDate && newYear < self.config.minDate.getFullYear() || self.config.maxDate && newYear > self.config.maxDate.getFullYear()) return;\n var newYearNum = newYear,\n isNewYear = self.currentYear !== newYearNum;\n self.currentYear = newYearNum || self.currentYear;\n\n if (self.config.maxDate && self.currentYear === self.config.maxDate.getFullYear()) {\n self.currentMonth = Math.min(self.config.maxDate.getMonth(), self.currentMonth);\n } else if (self.config.minDate && self.currentYear === self.config.minDate.getFullYear()) {\n self.currentMonth = Math.max(self.config.minDate.getMonth(), self.currentMonth);\n }\n\n if (isNewYear) {\n self.redraw();\n triggerEvent(\"onYearChange\");\n buildMonthSwitch();\n }\n }\n\n function isEnabled(date, timeless) {\n if (timeless === void 0) {\n timeless = true;\n }\n\n var dateToCheck = self.parseDate(date, undefined, timeless); // timeless\n\n if (self.config.minDate && dateToCheck && compareDates(dateToCheck, self.config.minDate, timeless !== undefined ? timeless : !self.minDateHasTime) < 0 || self.config.maxDate && dateToCheck && compareDates(dateToCheck, self.config.maxDate, timeless !== undefined ? timeless : !self.maxDateHasTime) > 0) return false;\n if (self.config.enable.length === 0 && self.config.disable.length === 0) return true;\n if (dateToCheck === undefined) return false;\n var bool = self.config.enable.length > 0,\n array = bool ? self.config.enable : self.config.disable;\n\n for (var i = 0, d = void 0; i < array.length; i++) {\n d = array[i];\n if (typeof d === \"function\" && d(dateToCheck) // disabled by function\n ) return bool;else if (d instanceof Date && dateToCheck !== undefined && d.getTime() === dateToCheck.getTime()) // disabled by date\n return bool;else if (typeof d === \"string\" && dateToCheck !== undefined) {\n // disabled by date string\n var parsed = self.parseDate(d, undefined, true);\n return parsed && parsed.getTime() === dateToCheck.getTime() ? bool : !bool;\n } else if ( // disabled by range\n _typeof(d) === \"object\" && dateToCheck !== undefined && d.from && d.to && dateToCheck.getTime() >= d.from.getTime() && dateToCheck.getTime() <= d.to.getTime()) return bool;\n }\n\n return !bool;\n }\n\n function isInView(elem) {\n if (self.daysContainer !== undefined) return elem.className.indexOf(\"hidden\") === -1 && self.daysContainer.contains(elem);\n return false;\n }\n\n function onKeyDown(e) {\n // e.key e.keyCode\n // \"Backspace\" 8\n // \"Tab\" 9\n // \"Enter\" 13\n // \"Escape\" (IE \"Esc\") 27\n // \"ArrowLeft\" (IE \"Left\") 37\n // \"ArrowUp\" (IE \"Up\") 38\n // \"ArrowRight\" (IE \"Right\") 39\n // \"ArrowDown\" (IE \"Down\") 40\n // \"Delete\" (IE \"Del\") 46\n var isInput = e.target === self._input;\n var allowInput = self.config.allowInput;\n var allowKeydown = self.isOpen && (!allowInput || !isInput);\n var allowInlineKeydown = self.config.inline && isInput && !allowInput;\n\n if (e.keyCode === 13 && isInput) {\n if (allowInput) {\n self.setDate(self._input.value, true, e.target === self.altInput ? self.config.altFormat : self.config.dateFormat);\n return e.target.blur();\n } else {\n self.open();\n }\n } else if (isCalendarElem(e.target) || allowKeydown || allowInlineKeydown) {\n var isTimeObj = !!self.timeContainer && self.timeContainer.contains(e.target);\n\n switch (e.keyCode) {\n case 13:\n if (isTimeObj) {\n e.preventDefault();\n updateTime();\n focusAndClose();\n } else selectDate(e);\n\n break;\n\n case 27:\n // escape\n e.preventDefault();\n focusAndClose();\n break;\n\n case 8:\n case 46:\n if (isInput && !self.config.allowInput) {\n e.preventDefault();\n self.clear();\n }\n\n break;\n\n case 37:\n case 39:\n if (!isTimeObj && !isInput) {\n e.preventDefault();\n\n if (self.daysContainer !== undefined && (allowInput === false || document.activeElement && isInView(document.activeElement))) {\n var delta_1 = e.keyCode === 39 ? 1 : -1;\n if (!e.ctrlKey) focusOnDay(undefined, delta_1);else {\n e.stopPropagation();\n changeMonth(delta_1);\n focusOnDay(getFirstAvailableDay(1), 0);\n }\n }\n } else if (self.hourElement) self.hourElement.focus();\n\n break;\n\n case 38:\n case 40:\n e.preventDefault();\n var delta = e.keyCode === 40 ? 1 : -1;\n\n if (self.daysContainer && e.target.$i !== undefined || e.target === self.input || e.target === self.altInput) {\n if (e.ctrlKey) {\n e.stopPropagation();\n changeYear(self.currentYear - delta);\n focusOnDay(getFirstAvailableDay(1), 0);\n } else if (!isTimeObj) focusOnDay(undefined, delta * 7);\n } else if (e.target === self.currentYearElement) {\n changeYear(self.currentYear - delta);\n } else if (self.config.enableTime) {\n if (!isTimeObj && self.hourElement) self.hourElement.focus();\n updateTime(e);\n\n self._debouncedChange();\n }\n\n break;\n\n case 9:\n if (isTimeObj) {\n var elems = [self.hourElement, self.minuteElement, self.secondElement, self.amPM].concat(self.pluginElements).filter(function (x) {\n return x;\n });\n var i = elems.indexOf(e.target);\n\n if (i !== -1) {\n var target = elems[i + (e.shiftKey ? -1 : 1)];\n e.preventDefault();\n\n (target || self._input).focus();\n }\n } else if (!self.config.noCalendar && self.daysContainer && self.daysContainer.contains(e.target) && e.shiftKey) {\n e.preventDefault();\n\n self._input.focus();\n }\n\n break;\n\n default:\n break;\n }\n }\n\n if (self.amPM !== undefined && e.target === self.amPM) {\n switch (e.key) {\n case self.l10n.amPM[0].charAt(0):\n case self.l10n.amPM[0].charAt(0).toLowerCase():\n self.amPM.textContent = self.l10n.amPM[0];\n setHoursFromInputs();\n updateValue();\n break;\n\n case self.l10n.amPM[1].charAt(0):\n case self.l10n.amPM[1].charAt(0).toLowerCase():\n self.amPM.textContent = self.l10n.amPM[1];\n setHoursFromInputs();\n updateValue();\n break;\n }\n }\n\n if (isInput || isCalendarElem(e.target)) {\n triggerEvent(\"onKeyDown\", e);\n }\n }\n\n function onMouseOver(elem) {\n if (self.selectedDates.length !== 1 || elem && (!elem.classList.contains(\"flatpickr-day\") || elem.classList.contains(\"flatpickr-disabled\"))) return;\n var hoverDate = elem ? elem.dateObj.getTime() : self.days.firstElementChild.dateObj.getTime(),\n initialDate = self.parseDate(self.selectedDates[0], undefined, true).getTime(),\n rangeStartDate = Math.min(hoverDate, self.selectedDates[0].getTime()),\n rangeEndDate = Math.max(hoverDate, self.selectedDates[0].getTime());\n var containsDisabled = false;\n var minRange = 0,\n maxRange = 0;\n\n for (var t = rangeStartDate; t < rangeEndDate; t += duration.DAY) {\n if (!isEnabled(new Date(t), true)) {\n containsDisabled = containsDisabled || t > rangeStartDate && t < rangeEndDate;\n if (t < initialDate && (!minRange || t > minRange)) minRange = t;else if (t > initialDate && (!maxRange || t < maxRange)) maxRange = t;\n }\n }\n\n for (var m = 0; m < self.config.showMonths; m++) {\n var month = self.daysContainer.children[m];\n\n var _loop_1 = function _loop_1(i, l) {\n var dayElem = month.children[i],\n date = dayElem.dateObj;\n var timestamp = date.getTime();\n var outOfRange = minRange > 0 && timestamp < minRange || maxRange > 0 && timestamp > maxRange;\n\n if (outOfRange) {\n dayElem.classList.add(\"notAllowed\");\n [\"inRange\", \"startRange\", \"endRange\"].forEach(function (c) {\n dayElem.classList.remove(c);\n });\n return \"continue\";\n } else if (containsDisabled && !outOfRange) return \"continue\";\n\n [\"startRange\", \"inRange\", \"endRange\", \"notAllowed\"].forEach(function (c) {\n dayElem.classList.remove(c);\n });\n\n if (elem !== undefined) {\n elem.classList.add(hoverDate <= self.selectedDates[0].getTime() ? \"startRange\" : \"endRange\");\n if (initialDate < hoverDate && timestamp === initialDate) dayElem.classList.add(\"startRange\");else if (initialDate > hoverDate && timestamp === initialDate) dayElem.classList.add(\"endRange\");\n if (timestamp >= minRange && (maxRange === 0 || timestamp <= maxRange) && isBetween(timestamp, initialDate, hoverDate)) dayElem.classList.add(\"inRange\");\n }\n };\n\n for (var i = 0, l = month.children.length; i < l; i++) {\n _loop_1(i, l);\n }\n }\n }\n\n function onResize() {\n if (self.isOpen && !self.config.static && !self.config.inline) positionCalendar();\n }\n\n function setDefaultTime() {\n self.setDate(self.config.minDate !== undefined ? new Date(self.config.minDate.getTime()) : new Date(), true);\n setDefaultHours();\n updateValue();\n }\n\n function open(e, positionElement) {\n if (positionElement === void 0) {\n positionElement = self._positionElement;\n }\n\n if (self.isMobile === true) {\n if (e) {\n e.preventDefault();\n e.target && e.target.blur();\n }\n\n if (self.mobileInput !== undefined) {\n self.mobileInput.focus();\n self.mobileInput.click();\n }\n\n triggerEvent(\"onOpen\");\n return;\n }\n\n if (self._input.disabled || self.config.inline) return;\n var wasOpen = self.isOpen;\n self.isOpen = true;\n\n if (!wasOpen) {\n self.calendarContainer.classList.add(\"open\");\n\n self._input.classList.add(\"active\");\n\n triggerEvent(\"onOpen\");\n positionCalendar(positionElement);\n }\n\n if (self.config.enableTime === true && self.config.noCalendar === true) {\n if (self.selectedDates.length === 0) {\n setDefaultTime();\n }\n\n if (self.config.allowInput === false && (e === undefined || !self.timeContainer.contains(e.relatedTarget))) {\n setTimeout(function () {\n return self.hourElement.select();\n }, 50);\n }\n }\n }\n\n function minMaxDateSetter(type) {\n return function (date) {\n var dateObj = self.config[\"_\" + type + \"Date\"] = self.parseDate(date, self.config.dateFormat);\n var inverseDateObj = self.config[\"_\" + (type === \"min\" ? \"max\" : \"min\") + \"Date\"];\n\n if (dateObj !== undefined) {\n self[type === \"min\" ? \"minDateHasTime\" : \"maxDateHasTime\"] = dateObj.getHours() > 0 || dateObj.getMinutes() > 0 || dateObj.getSeconds() > 0;\n }\n\n if (self.selectedDates) {\n self.selectedDates = self.selectedDates.filter(function (d) {\n return isEnabled(d);\n });\n if (!self.selectedDates.length && type === \"min\") setHoursFromDate(dateObj);\n updateValue();\n }\n\n if (self.daysContainer) {\n redraw();\n if (dateObj !== undefined) self.currentYearElement[type] = dateObj.getFullYear().toString();else self.currentYearElement.removeAttribute(type);\n self.currentYearElement.disabled = !!inverseDateObj && dateObj !== undefined && inverseDateObj.getFullYear() === dateObj.getFullYear();\n }\n };\n }\n\n function parseConfig() {\n var boolOpts = [\"wrap\", \"weekNumbers\", \"allowInput\", \"clickOpens\", \"time_24hr\", \"enableTime\", \"noCalendar\", \"altInput\", \"shorthandCurrentMonth\", \"inline\", \"static\", \"enableSeconds\", \"disableMobile\"];\n\n var userConfig = _assign({}, instanceConfig, JSON.parse(JSON.stringify(element.dataset || {})));\n\n var formats = {};\n self.config.parseDate = userConfig.parseDate;\n self.config.formatDate = userConfig.formatDate;\n Object.defineProperty(self.config, \"enable\", {\n get: function get() {\n return self.config._enable;\n },\n set: function set(dates) {\n self.config._enable = parseDateRules(dates);\n }\n });\n Object.defineProperty(self.config, \"disable\", {\n get: function get() {\n return self.config._disable;\n },\n set: function set(dates) {\n self.config._disable = parseDateRules(dates);\n }\n });\n var timeMode = userConfig.mode === \"time\";\n\n if (!userConfig.dateFormat && (userConfig.enableTime || timeMode)) {\n var defaultDateFormat = flatpickr.defaultConfig.dateFormat || defaults.dateFormat;\n formats.dateFormat = userConfig.noCalendar || timeMode ? \"H:i\" + (userConfig.enableSeconds ? \":S\" : \"\") : defaultDateFormat + \" H:i\" + (userConfig.enableSeconds ? \":S\" : \"\");\n }\n\n if (userConfig.altInput && (userConfig.enableTime || timeMode) && !userConfig.altFormat) {\n var defaultAltFormat = flatpickr.defaultConfig.altFormat || defaults.altFormat;\n formats.altFormat = userConfig.noCalendar || timeMode ? \"h:i\" + (userConfig.enableSeconds ? \":S K\" : \" K\") : defaultAltFormat + (\" h:i\" + (userConfig.enableSeconds ? \":S\" : \"\") + \" K\");\n }\n\n if (!userConfig.altInputClass) {\n self.config.altInputClass = self.input.className + \" \" + self.config.altInputClass;\n }\n\n Object.defineProperty(self.config, \"minDate\", {\n get: function get() {\n return self.config._minDate;\n },\n set: minMaxDateSetter(\"min\")\n });\n Object.defineProperty(self.config, \"maxDate\", {\n get: function get() {\n return self.config._maxDate;\n },\n set: minMaxDateSetter(\"max\")\n });\n\n var minMaxTimeSetter = function minMaxTimeSetter(type) {\n return function (val) {\n self.config[type === \"min\" ? \"_minTime\" : \"_maxTime\"] = self.parseDate(val, \"H:i:S\");\n };\n };\n\n Object.defineProperty(self.config, \"minTime\", {\n get: function get() {\n return self.config._minTime;\n },\n set: minMaxTimeSetter(\"min\")\n });\n Object.defineProperty(self.config, \"maxTime\", {\n get: function get() {\n return self.config._maxTime;\n },\n set: minMaxTimeSetter(\"max\")\n });\n\n if (userConfig.mode === \"time\") {\n self.config.noCalendar = true;\n self.config.enableTime = true;\n }\n\n Object.assign(self.config, formats, userConfig);\n\n for (var i = 0; i < boolOpts.length; i++) {\n self.config[boolOpts[i]] = self.config[boolOpts[i]] === true || self.config[boolOpts[i]] === \"true\";\n }\n\n HOOKS.filter(function (hook) {\n return self.config[hook] !== undefined;\n }).forEach(function (hook) {\n self.config[hook] = arrayify(self.config[hook] || []).map(bindToInstance);\n });\n self.isMobile = !self.config.disableMobile && !self.config.inline && self.config.mode === \"single\" && !self.config.disable.length && !self.config.enable.length && !self.config.weekNumbers && /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent);\n\n for (var i = 0; i < self.config.plugins.length; i++) {\n var pluginConf = self.config.plugins[i](self) || {};\n\n for (var key in pluginConf) {\n if (HOOKS.indexOf(key) > -1) {\n self.config[key] = arrayify(pluginConf[key]).map(bindToInstance).concat(self.config[key]);\n } else if (typeof userConfig[key] === \"undefined\") self.config[key] = pluginConf[key];\n }\n }\n\n triggerEvent(\"onParseConfig\");\n }\n\n function setupLocale() {\n if (_typeof(self.config.locale) !== \"object\" && typeof flatpickr.l10ns[self.config.locale] === \"undefined\") self.config.errorHandler(new Error(\"flatpickr: invalid locale \" + self.config.locale));\n self.l10n = _assign({}, flatpickr.l10ns[\"default\"], _typeof(self.config.locale) === \"object\" ? self.config.locale : self.config.locale !== \"default\" ? flatpickr.l10ns[self.config.locale] : undefined);\n tokenRegex.K = \"(\" + self.l10n.amPM[0] + \"|\" + self.l10n.amPM[1] + \"|\" + self.l10n.amPM[0].toLowerCase() + \"|\" + self.l10n.amPM[1].toLowerCase() + \")\";\n\n var userConfig = _assign({}, instanceConfig, JSON.parse(JSON.stringify(element.dataset || {})));\n\n if (userConfig.time_24hr === undefined && flatpickr.defaultConfig.time_24hr === undefined) {\n self.config.time_24hr = self.l10n.time_24hr;\n }\n\n self.formatDate = createDateFormatter(self);\n self.parseDate = createDateParser({\n config: self.config,\n l10n: self.l10n\n });\n }\n\n function positionCalendar(customPositionElement) {\n if (self.calendarContainer === undefined) return;\n triggerEvent(\"onPreCalendarPosition\");\n var positionElement = customPositionElement || self._positionElement;\n var calendarHeight = Array.prototype.reduce.call(self.calendarContainer.children, function (acc, child) {\n return acc + child.offsetHeight;\n }, 0),\n calendarWidth = self.calendarContainer.offsetWidth,\n configPos = self.config.position.split(\" \"),\n configPosVertical = configPos[0],\n configPosHorizontal = configPos.length > 1 ? configPos[1] : null,\n inputBounds = positionElement.getBoundingClientRect(),\n distanceFromBottom = window.innerHeight - inputBounds.bottom,\n showOnTop = configPosVertical === \"above\" || configPosVertical !== \"below\" && distanceFromBottom < calendarHeight && inputBounds.top > calendarHeight;\n var top = window.pageYOffset + inputBounds.top + (!showOnTop ? positionElement.offsetHeight + 2 : -calendarHeight - 2);\n toggleClass(self.calendarContainer, \"arrowTop\", !showOnTop);\n toggleClass(self.calendarContainer, \"arrowBottom\", showOnTop);\n if (self.config.inline) return;\n var left = window.pageXOffset + inputBounds.left - (configPosHorizontal != null && configPosHorizontal === \"center\" ? (calendarWidth - inputBounds.width) / 2 : 0);\n var right = window.document.body.offsetWidth - (window.pageXOffset + inputBounds.right);\n var rightMost = left + calendarWidth > window.document.body.offsetWidth;\n var centerMost = right + calendarWidth > window.document.body.offsetWidth;\n toggleClass(self.calendarContainer, \"rightMost\", rightMost);\n if (self.config.static) return;\n self.calendarContainer.style.top = top + \"px\";\n\n if (!rightMost) {\n self.calendarContainer.style.left = left + \"px\";\n self.calendarContainer.style.right = \"auto\";\n } else if (!centerMost) {\n self.calendarContainer.style.left = \"auto\";\n self.calendarContainer.style.right = right + \"px\";\n } else {\n var doc = document.styleSheets[0]; // some testing environments don't have css support\n\n if (doc === undefined) return;\n var bodyWidth = window.document.body.offsetWidth;\n var centerLeft = Math.max(0, bodyWidth / 2 - calendarWidth / 2);\n var centerBefore = \".flatpickr-calendar.centerMost:before\";\n var centerAfter = \".flatpickr-calendar.centerMost:after\";\n var centerIndex = doc.cssRules.length;\n var centerStyle = \"{left:\" + inputBounds.left + \"px;right:auto;}\";\n toggleClass(self.calendarContainer, \"rightMost\", false);\n toggleClass(self.calendarContainer, \"centerMost\", true);\n doc.insertRule(centerBefore + \",\" + centerAfter + centerStyle, centerIndex);\n self.calendarContainer.style.left = centerLeft + \"px\";\n self.calendarContainer.style.right = \"auto\";\n }\n }\n\n function redraw() {\n if (self.config.noCalendar || self.isMobile) return;\n updateNavigationCurrentMonth();\n buildDays();\n }\n\n function focusAndClose() {\n self._input.focus();\n\n if (window.navigator.userAgent.indexOf(\"MSIE\") !== -1 || navigator.msMaxTouchPoints !== undefined) {\n // hack - bugs in the way IE handles focus keeps the calendar open\n setTimeout(self.close, 0);\n } else {\n self.close();\n }\n }\n\n function selectDate(e) {\n e.preventDefault();\n e.stopPropagation();\n\n var isSelectable = function isSelectable(day) {\n return day.classList && day.classList.contains(\"flatpickr-day\") && !day.classList.contains(\"flatpickr-disabled\") && !day.classList.contains(\"notAllowed\");\n };\n\n var t = findParent(e.target, isSelectable);\n if (t === undefined) return;\n var target = t;\n var selectedDate = self.latestSelectedDateObj = new Date(target.dateObj.getTime());\n var shouldChangeMonth = (selectedDate.getMonth() < self.currentMonth || selectedDate.getMonth() > self.currentMonth + self.config.showMonths - 1) && self.config.mode !== \"range\";\n self.selectedDateElem = target;\n if (self.config.mode === \"single\") self.selectedDates = [selectedDate];else if (self.config.mode === \"multiple\") {\n var selectedIndex = isDateSelected(selectedDate);\n if (selectedIndex) self.selectedDates.splice(parseInt(selectedIndex), 1);else self.selectedDates.push(selectedDate);\n } else if (self.config.mode === \"range\") {\n if (self.selectedDates.length === 2) {\n self.clear(false, false);\n }\n\n self.latestSelectedDateObj = selectedDate;\n self.selectedDates.push(selectedDate); // unless selecting same date twice, sort ascendingly\n\n if (compareDates(selectedDate, self.selectedDates[0], true) !== 0) self.selectedDates.sort(function (a, b) {\n return a.getTime() - b.getTime();\n });\n }\n setHoursFromInputs();\n\n if (shouldChangeMonth) {\n var isNewYear = self.currentYear !== selectedDate.getFullYear();\n self.currentYear = selectedDate.getFullYear();\n self.currentMonth = selectedDate.getMonth();\n\n if (isNewYear) {\n triggerEvent(\"onYearChange\");\n buildMonthSwitch();\n }\n\n triggerEvent(\"onMonthChange\");\n }\n\n updateNavigationCurrentMonth();\n buildDays();\n updateValue();\n if (self.config.enableTime) setTimeout(function () {\n return self.showTimeInput = true;\n }, 50); // maintain focus\n\n if (!shouldChangeMonth && self.config.mode !== \"range\" && self.config.showMonths === 1) focusOnDayElem(target);else if (self.selectedDateElem !== undefined && self.hourElement === undefined) {\n self.selectedDateElem && self.selectedDateElem.focus();\n }\n if (self.hourElement !== undefined) self.hourElement !== undefined && self.hourElement.focus();\n\n if (self.config.closeOnSelect) {\n var single = self.config.mode === \"single\" && !self.config.enableTime;\n var range = self.config.mode === \"range\" && self.selectedDates.length === 2 && !self.config.enableTime;\n\n if (single || range) {\n focusAndClose();\n }\n }\n\n triggerChange();\n }\n\n var CALLBACKS = {\n locale: [setupLocale, updateWeekdays],\n showMonths: [buildMonths, setCalendarWidth, buildWeekdays],\n minDate: [jumpToDate],\n maxDate: [jumpToDate]\n };\n\n function set(option, value) {\n if (option !== null && _typeof(option) === \"object\") {\n Object.assign(self.config, option);\n\n for (var key in option) {\n if (CALLBACKS[key] !== undefined) CALLBACKS[key].forEach(function (x) {\n return x();\n });\n }\n } else {\n self.config[option] = value;\n if (CALLBACKS[option] !== undefined) CALLBACKS[option].forEach(function (x) {\n return x();\n });else if (HOOKS.indexOf(option) > -1) self.config[option] = arrayify(value);\n }\n\n self.redraw();\n updateValue(false);\n }\n\n function setSelectedDate(inputDate, format) {\n var dates = [];\n if (inputDate instanceof Array) dates = inputDate.map(function (d) {\n return self.parseDate(d, format);\n });else if (inputDate instanceof Date || typeof inputDate === \"number\") dates = [self.parseDate(inputDate, format)];else if (typeof inputDate === \"string\") {\n switch (self.config.mode) {\n case \"single\":\n case \"time\":\n dates = [self.parseDate(inputDate, format)];\n break;\n\n case \"multiple\":\n dates = inputDate.split(self.config.conjunction).map(function (date) {\n return self.parseDate(date, format);\n });\n break;\n\n case \"range\":\n dates = inputDate.split(self.l10n.rangeSeparator).map(function (date) {\n return self.parseDate(date, format);\n });\n break;\n\n default:\n break;\n }\n } else self.config.errorHandler(new Error(\"Invalid date supplied: \" + JSON.stringify(inputDate)));\n self.selectedDates = dates.filter(function (d) {\n return d instanceof Date && isEnabled(d, false);\n });\n if (self.config.mode === \"range\") self.selectedDates.sort(function (a, b) {\n return a.getTime() - b.getTime();\n });\n }\n\n function setDate(date, triggerChange, format) {\n if (triggerChange === void 0) {\n triggerChange = false;\n }\n\n if (format === void 0) {\n format = self.config.dateFormat;\n }\n\n if (date !== 0 && !date || date instanceof Array && date.length === 0) return self.clear(triggerChange);\n setSelectedDate(date, format);\n self.showTimeInput = self.selectedDates.length > 0;\n self.latestSelectedDateObj = self.selectedDates[self.selectedDates.length - 1];\n self.redraw();\n jumpToDate();\n setHoursFromDate();\n\n if (self.selectedDates.length === 0) {\n self.clear(false);\n }\n\n updateValue(triggerChange);\n if (triggerChange) triggerEvent(\"onChange\");\n }\n\n function parseDateRules(arr) {\n return arr.slice().map(function (rule) {\n if (typeof rule === \"string\" || typeof rule === \"number\" || rule instanceof Date) {\n return self.parseDate(rule, undefined, true);\n } else if (rule && _typeof(rule) === \"object\" && rule.from && rule.to) return {\n from: self.parseDate(rule.from, undefined),\n to: self.parseDate(rule.to, undefined)\n };\n\n return rule;\n }).filter(function (x) {\n return x;\n }); // remove falsy values\n }\n\n function setupDates() {\n self.selectedDates = [];\n self.now = self.parseDate(self.config.now) || new Date(); // Workaround IE11 setting placeholder as the input's value\n\n var preloadedDate = self.config.defaultDate || ((self.input.nodeName === \"INPUT\" || self.input.nodeName === \"TEXTAREA\") && self.input.placeholder && self.input.value === self.input.placeholder ? null : self.input.value);\n if (preloadedDate) setSelectedDate(preloadedDate, self.config.dateFormat);\n self._initialDate = self.selectedDates.length > 0 ? self.selectedDates[0] : self.config.minDate && self.config.minDate.getTime() > self.now.getTime() ? self.config.minDate : self.config.maxDate && self.config.maxDate.getTime() < self.now.getTime() ? self.config.maxDate : self.now;\n self.currentYear = self._initialDate.getFullYear();\n self.currentMonth = self._initialDate.getMonth();\n if (self.selectedDates.length > 0) self.latestSelectedDateObj = self.selectedDates[0];\n if (self.config.minTime !== undefined) self.config.minTime = self.parseDate(self.config.minTime, \"H:i\");\n if (self.config.maxTime !== undefined) self.config.maxTime = self.parseDate(self.config.maxTime, \"H:i\");\n self.minDateHasTime = !!self.config.minDate && (self.config.minDate.getHours() > 0 || self.config.minDate.getMinutes() > 0 || self.config.minDate.getSeconds() > 0);\n self.maxDateHasTime = !!self.config.maxDate && (self.config.maxDate.getHours() > 0 || self.config.maxDate.getMinutes() > 0 || self.config.maxDate.getSeconds() > 0);\n Object.defineProperty(self, \"showTimeInput\", {\n get: function get() {\n return self._showTimeInput;\n },\n set: function set(bool) {\n self._showTimeInput = bool;\n if (self.calendarContainer) toggleClass(self.calendarContainer, \"showTimeInput\", bool);\n self.isOpen && positionCalendar();\n }\n });\n }\n\n function setupInputs() {\n self.input = self.config.wrap ? element.querySelector(\"[data-input]\") : element;\n /* istanbul ignore next */\n\n if (!self.input) {\n self.config.errorHandler(new Error(\"Invalid input element specified\"));\n return;\n } // hack: store previous type to restore it after destroy()\n\n\n self.input._type = self.input.type;\n self.input.type = \"text\";\n self.input.classList.add(\"flatpickr-input\");\n self._input = self.input;\n\n if (self.config.altInput) {\n // replicate self.element\n self.altInput = createElement(self.input.nodeName, self.config.altInputClass);\n self._input = self.altInput;\n self.altInput.placeholder = self.input.placeholder;\n self.altInput.disabled = self.input.disabled;\n self.altInput.required = self.input.required;\n self.altInput.tabIndex = self.input.tabIndex;\n self.altInput.type = \"text\";\n self.input.setAttribute(\"type\", \"hidden\");\n if (!self.config.static && self.input.parentNode) self.input.parentNode.insertBefore(self.altInput, self.input.nextSibling);\n }\n\n if (!self.config.allowInput) self._input.setAttribute(\"readonly\", \"readonly\");\n self._positionElement = self.config.positionElement || self._input;\n }\n\n function setupMobile() {\n var inputType = self.config.enableTime ? self.config.noCalendar ? \"time\" : \"datetime-local\" : \"date\";\n self.mobileInput = createElement(\"input\", self.input.className + \" flatpickr-mobile\");\n self.mobileInput.step = self.input.getAttribute(\"step\") || \"any\";\n self.mobileInput.tabIndex = 1;\n self.mobileInput.type = inputType;\n self.mobileInput.disabled = self.input.disabled;\n self.mobileInput.required = self.input.required;\n self.mobileInput.placeholder = self.input.placeholder;\n self.mobileFormatStr = inputType === \"datetime-local\" ? \"Y-m-d\\\\TH:i:S\" : inputType === \"date\" ? \"Y-m-d\" : \"H:i:S\";\n\n if (self.selectedDates.length > 0) {\n self.mobileInput.defaultValue = self.mobileInput.value = self.formatDate(self.selectedDates[0], self.mobileFormatStr);\n }\n\n if (self.config.minDate) self.mobileInput.min = self.formatDate(self.config.minDate, \"Y-m-d\");\n if (self.config.maxDate) self.mobileInput.max = self.formatDate(self.config.maxDate, \"Y-m-d\");\n self.input.type = \"hidden\";\n if (self.altInput !== undefined) self.altInput.type = \"hidden\";\n\n try {\n if (self.input.parentNode) self.input.parentNode.insertBefore(self.mobileInput, self.input.nextSibling);\n } catch (_a) {}\n\n bind(self.mobileInput, \"change\", function (e) {\n self.setDate(e.target.value, false, self.mobileFormatStr);\n triggerEvent(\"onChange\");\n triggerEvent(\"onClose\");\n });\n }\n\n function toggle(e) {\n if (self.isOpen === true) return self.close();\n self.open(e);\n }\n\n function triggerEvent(event, data) {\n // If the instance has been destroyed already, all hooks have been removed\n if (self.config === undefined) return;\n var hooks = self.config[event];\n\n if (hooks !== undefined && hooks.length > 0) {\n for (var i = 0; hooks[i] && i < hooks.length; i++) {\n hooks[i](self.selectedDates, self.input.value, self, data);\n }\n }\n\n if (event === \"onChange\") {\n self.input.dispatchEvent(createEvent(\"change\")); // many front-end frameworks bind to the input event\n\n self.input.dispatchEvent(createEvent(\"input\"));\n }\n }\n\n function createEvent(name) {\n var e = document.createEvent(\"Event\");\n e.initEvent(name, true, true);\n return e;\n }\n\n function isDateSelected(date) {\n for (var i = 0; i < self.selectedDates.length; i++) {\n if (compareDates(self.selectedDates[i], date) === 0) return \"\" + i;\n }\n\n return false;\n }\n\n function isDateInRange(date) {\n if (self.config.mode !== \"range\" || self.selectedDates.length < 2) return false;\n return compareDates(date, self.selectedDates[0]) >= 0 && compareDates(date, self.selectedDates[1]) <= 0;\n }\n\n function updateNavigationCurrentMonth() {\n if (self.config.noCalendar || self.isMobile || !self.monthNav) return;\n self.yearElements.forEach(function (yearElement, i) {\n var d = new Date(self.currentYear, self.currentMonth, 1);\n d.setMonth(self.currentMonth + i);\n\n if (self.config.showMonths > 1 || self.config.monthSelectorType === \"static\") {\n self.monthElements[i].textContent = monthToStr(d.getMonth(), self.config.shorthandCurrentMonth, self.l10n) + \" \";\n } else {\n self.monthsDropdownContainer.value = d.getMonth().toString();\n }\n\n yearElement.value = d.getFullYear().toString();\n });\n self._hidePrevMonthArrow = self.config.minDate !== undefined && (self.currentYear === self.config.minDate.getFullYear() ? self.currentMonth <= self.config.minDate.getMonth() : self.currentYear < self.config.minDate.getFullYear());\n self._hideNextMonthArrow = self.config.maxDate !== undefined && (self.currentYear === self.config.maxDate.getFullYear() ? self.currentMonth + 1 > self.config.maxDate.getMonth() : self.currentYear > self.config.maxDate.getFullYear());\n }\n\n function getDateStr(format) {\n return self.selectedDates.map(function (dObj) {\n return self.formatDate(dObj, format);\n }).filter(function (d, i, arr) {\n return self.config.mode !== \"range\" || self.config.enableTime || arr.indexOf(d) === i;\n }).join(self.config.mode !== \"range\" ? self.config.conjunction : self.l10n.rangeSeparator);\n }\n /**\n * Updates the values of inputs associated with the calendar\n */\n\n\n function updateValue(triggerChange) {\n if (triggerChange === void 0) {\n triggerChange = true;\n }\n\n if (self.mobileInput !== undefined && self.mobileFormatStr) {\n self.mobileInput.value = self.latestSelectedDateObj !== undefined ? self.formatDate(self.latestSelectedDateObj, self.mobileFormatStr) : \"\";\n }\n\n self.input.value = getDateStr(self.config.dateFormat);\n\n if (self.altInput !== undefined) {\n self.altInput.value = getDateStr(self.config.altFormat);\n }\n\n if (triggerChange !== false) triggerEvent(\"onValueUpdate\");\n }\n\n function onMonthNavClick(e) {\n var isPrevMonth = self.prevMonthNav.contains(e.target);\n var isNextMonth = self.nextMonthNav.contains(e.target);\n\n if (isPrevMonth || isNextMonth) {\n changeMonth(isPrevMonth ? -1 : 1);\n } else if (self.yearElements.indexOf(e.target) >= 0) {\n e.target.select();\n } else if (e.target.classList.contains(\"arrowUp\")) {\n self.changeYear(self.currentYear + 1);\n } else if (e.target.classList.contains(\"arrowDown\")) {\n self.changeYear(self.currentYear - 1);\n }\n }\n\n function timeWrapper(e) {\n e.preventDefault();\n var isKeyDown = e.type === \"keydown\",\n input = e.target;\n\n if (self.amPM !== undefined && e.target === self.amPM) {\n self.amPM.textContent = self.l10n.amPM[int(self.amPM.textContent === self.l10n.amPM[0])];\n }\n\n var min = parseFloat(input.getAttribute(\"min\")),\n max = parseFloat(input.getAttribute(\"max\")),\n step = parseFloat(input.getAttribute(\"step\")),\n curValue = parseInt(input.value, 10),\n delta = e.delta || (isKeyDown ? e.which === 38 ? 1 : -1 : 0);\n var newValue = curValue + step * delta;\n\n if (typeof input.value !== \"undefined\" && input.value.length === 2) {\n var isHourElem = input === self.hourElement,\n isMinuteElem = input === self.minuteElement;\n\n if (newValue < min) {\n newValue = max + newValue + int(!isHourElem) + (int(isHourElem) && int(!self.amPM));\n if (isMinuteElem) incrementNumInput(undefined, -1, self.hourElement);\n } else if (newValue > max) {\n newValue = input === self.hourElement ? newValue - max - int(!self.amPM) : min;\n if (isMinuteElem) incrementNumInput(undefined, 1, self.hourElement);\n }\n\n if (self.amPM && isHourElem && (step === 1 ? newValue + curValue === 23 : Math.abs(newValue - curValue) > step)) {\n self.amPM.textContent = self.l10n.amPM[int(self.amPM.textContent === self.l10n.amPM[0])];\n }\n\n input.value = pad(newValue);\n }\n }\n\n init();\n return self;\n }\n /* istanbul ignore next */\n\n\n function _flatpickr(nodeList, config) {\n // static list\n var nodes = Array.prototype.slice.call(nodeList).filter(function (x) {\n return x instanceof HTMLElement;\n });\n var instances = [];\n\n for (var i = 0; i < nodes.length; i++) {\n var node = nodes[i];\n\n try {\n if (node.getAttribute(\"data-fp-omit\") !== null) continue;\n\n if (node._flatpickr !== undefined) {\n node._flatpickr.destroy();\n\n node._flatpickr = undefined;\n }\n\n node._flatpickr = FlatpickrInstance(node, config || {});\n instances.push(node._flatpickr);\n } catch (e) {\n console.error(e);\n }\n }\n\n return instances.length === 1 ? instances[0] : instances;\n }\n /* istanbul ignore next */\n\n\n if (typeof HTMLElement !== \"undefined\" && typeof HTMLCollection !== \"undefined\" && typeof NodeList !== \"undefined\") {\n // browser env\n HTMLCollection.prototype.flatpickr = NodeList.prototype.flatpickr = function (config) {\n return _flatpickr(this, config);\n };\n\n HTMLElement.prototype.flatpickr = function (config) {\n return _flatpickr([this], config);\n };\n }\n /* istanbul ignore next */\n\n\n var flatpickr = function flatpickr(selector, config) {\n if (typeof selector === \"string\") {\n return _flatpickr(window.document.querySelectorAll(selector), config);\n } else if (selector instanceof Node) {\n return _flatpickr([selector], config);\n } else {\n return _flatpickr(selector, config);\n }\n };\n /* istanbul ignore next */\n\n\n flatpickr.defaultConfig = {};\n flatpickr.l10ns = {\n en: _assign({}, english),\n \"default\": _assign({}, english)\n };\n\n flatpickr.localize = function (l10n) {\n flatpickr.l10ns[\"default\"] = _assign({}, flatpickr.l10ns[\"default\"], l10n);\n };\n\n flatpickr.setDefaults = function (config) {\n flatpickr.defaultConfig = _assign({}, flatpickr.defaultConfig, config);\n };\n\n flatpickr.parseDate = createDateParser({});\n flatpickr.formatDate = createDateFormatter({});\n flatpickr.compareDates = compareDates;\n /* istanbul ignore next */\n\n if (typeof jQuery !== \"undefined\" && typeof jQuery.fn !== \"undefined\") {\n jQuery.fn.flatpickr = function (config) {\n return _flatpickr(this, config);\n };\n } // eslint-disable-next-line @typescript-eslint/camelcase\n\n\n Date.prototype.fp_incr = function (days) {\n return new Date(this.getFullYear(), this.getMonth(), this.getDate() + (typeof days === \"string\" ? parseInt(days, 10) : days));\n };\n\n if (typeof window !== \"undefined\") {\n window.flatpickr = flatpickr;\n }\n\n return flatpickr;\n});","import * as flatpickr from 'flatpickr/dist/flatpickr.js'\n\nexport { flatpickr }\n"],"sourceRoot":""}