PageSourceSearch

https://renesseaanzee.nl/wp-content/themes/city-easy/inc/lightpick/js/lightpick.min.js?ver=7.1.2

js renesseaanzee.nl collected 2026-09-25 07:49:38 UTC 27,676 bytes, 1 lines download raw bytes

1!function(root,factory){if("function"==typeof define&&define.amd)define(["moment"],(function(moment){return factory(moment)}));else if("object"==typeof module&&module.exports){var moment="undefined"!=typeof window&&void 0!==window.moment?window.moment:require("moment");module.exports=factory(moment)}else root.Lightpick=factory(root.moment)}(this,(function(moment){"use strict";var document=window.document,defaults={field:null,secondField:null,firstDay:1,parentEl:"body",lang:"auto",format:"DD/MM/YYYY",separator:" - ",numberOfMonths:1,numberOfColumns:2,singleDate:!0,autoclose:!0,repick:!1,startDate:null,endDate:null,minDate:null,maxDate:null,disableDates:null,selectForward:!1,selectBackward:!1,minDays:null,maxDays:null,hoveringTooltip:!0,hideOnBodyClick:!0,footer:!1,disabledDatesInRange:!0,tooltipNights:!1,orientation:"auto",disableWeekends:!1,inline:!1,weekdayStyle:"short",dropdowns:{years:{min:1900,max:null},months:!0},locale:{buttons:{prev:"&leftarrow;",next:"&rightarrow;",close:"&times;",reset:"Reset",apply:"Apply"},tooltip:{one:"day",other:"days"},tooltipOnDisabled:null,pluralize:function(i,locale){return"string"==typeof i&&(i=parseInt(i,10)),1===i&&"one"in locale?locale.one:"other"in locale?locale.other:""}},onSelect:null,onOpen:null,onClose:null,onError:null,onMonthsChange:null,onYearsChange:null},renderTopButtons=function(opts){return'<div class="lightpick__toolbar"><button type="button" class="lightpick__previous-action btn btn-sm btn-outline-secondary">'+opts.locale.buttons.prev+'</button><button type="button" class="lightpick__next-action btn btn-sm btn-outline-secondary">'+opts.locale.buttons.next+"</button>"+(opts.autoclose||opts.inline?"":'<button type="button" class="lightpick__close-action">'+opts.locale.buttons.close+"</button>")+"</div>"},weekdayName=function(opts,day,weekdayStyle){return new Date(1970,0,day,12,0,0,0).toLocaleString(opts.lang,{weekday:weekdayStyle||opts.weekdayStyle})},renderDay=function(opts,date,dummy,extraClass){if(dummy)return"<div></div>";var date=moment(date),prevMonth=moment(date).subtract(1,"month"),nextMonth=moment(date).add(1,"month"),day={time:moment(date).valueOf(),className:["lightpick__day","is-available"]};if(extraClass instanceof Array||"[object Array]"===Object.prototype.toString.call(extraClass)?(extraClass=extraClass.filter((function(el){return["lightpick__day","is-available","is-previous-month","is-next-month"].indexOf(el)>=0})),day.className=day.className.concat(extraClass)):day.className.push(extraClass),opts.disableDates)for(var i=0;i<opts.disableDates.length;i++){if(opts.disableDates[i]instanceof Array||"[object Array]"===Object.prototype.toString.call(opts.disableDates[i])){var _from=moment(opts.disableDates[i][0],opts.format),_to=moment(opts.disableDates[i][1],opts.format);_from.isValid()&&_to.isValid()&&date.isBetween(_from,_to,"day","[]")&&day.className.push("is-disabled")}else moment(opts.disableDates[i],opts.format).isValid()&&moment(opts.disableDates[i],opts.format).isSame(date,"day")&&day.className.push("is-disabled");day.className.indexOf("is-disabled")>=0&&(opts.locale.tooltipOnDisabled&&(!opts.startDate||date.isAfter(opts.startDate)||opts.startDate&&opts.endDate)&&day.className.push("disabled-tooltip"),day.className.indexOf("is-start-date")>=0?(this.setStartDate(null),this.setEndDate(null)):day.className.indexOf("is-end-date")>=0&&this.setEndDate(null))}if(opts.minDays&&opts.startDate&&!opts.endDate&&date.isBetween(moment(opts.startDate).subtract(opts.minDays-1,"day"),moment(opts.startDate).add(opts.minDays-1,"day"),"day")&&(day.className.push("is-disabled"),opts.selectForward&&date.isSameOrAfter(opts.startDate)&&(day.className.push("is-forward-selected"),day.className.push("is-in-range"))),opts.maxDays&&opts.startDate&&!opts.endDate&&(date.isSameOrBefore(moment(opts.startDate).subtract(opts.maxDays,"day"),"day")?day.className.push("is-disabled"):date.isSameOrAfter(moment(opts.startDate).add(opts.maxDays,"day"),"day")&&day.className.push("is-disabled")),opts.repick&&(opts.minDays||opts.maxDays)&&opts.startDate&&opts.endDate){var tempStartDate=moment(opts.repickTrigger==opts.field?opts.endDate:opts.startDate);
1opts.minDays&&date.isBetween(moment(tempStartDate).subtract(opts.minDays-1,"day"),moment(tempStartDate).add(opts.minDays-1,"day"),"day")&&day.className.push("is-disabled"),opts.maxDays&&(date.isSameOrBefore(moment(tempStartDate).subtract(opts.maxDays,"day"),"day")?day.className.push("is-disabled"):date.isSameOrAfter(moment(tempStartDate).add(opts.maxDays,"day"),"day")&&day.className.push("is-disabled"))}date.isSame(new Date,"day")&&day.className.push("is-today"),date.isSame(opts.startDate,"day")&&day.className.push("is-start-date"),date.isSame(opts.endDate,"day")&&day.className.push("is-end-date"),opts.startDate&&opts.endDate&&date.isBetween(opts.startDate,opts.endDate,"day","[]")&&day.className.push("is-in-range"),moment().isSame(date,"month")||(prevMonth.isSame(date,"month")?day.className.push("is-previous-month"):nextMonth.isSame(date,"month")&&day.className.push("is-next-month")),opts.minDate&&date.isBefore(opts.minDate,"day")&&day.className.push("is-disabled"),opts.maxDate&&date.isAfter(opts.maxDate,"day")&&day.className.push("is-disabled"),opts.selectForward&&!opts.singleDate&&opts.startDate&&!opts.endDate&&date.isBefore(opts.startDate,"day")&&day.className.push("is-disabled"),opts.selectBackward&&!opts.singleDate&&opts.startDate&&!opts.endDate&&date.isAfter(opts.startDate,"day")&&day.className.push("is-disabled"),!opts.disableWeekends||6!=date.isoWeekday()&&7!=date.isoWeekday()||day.className.push("is-disabled"),day.className=day.className.filter((function(value,index,self){return self.indexOf(value)===index})),day.className.indexOf("is-disabled")>=0&&day.className.indexOf("is-available")>=0&&day.className.splice(day.className.indexOf("is-available"),1);var div=document.createElement("div");return div.className=day.className.join(" "),div.innerHTML=date.get("date"),div.setAttribute("data-time",day.time),div.outerHTML},renderMonthsList=function(date,opts){for(var d=moment(date),select=document.createElement("select"),idx=0;idx<12;idx++){d.set("month",idx);var option=document.createElement("option");option.value=d.toDate().getMonth(),option.text=d.toDate().toLocaleString(opts.lang,{month:"long"}),idx===date.toDate().getMonth()&&option.setAttribute("selected","selected"),select.appendChild(option)}return select.className="lightpick__select lightpick__select-months",select.dir="rtl",opts.dropdowns&&opts.dropdowns.months||(select.disabled=!0),select.outerHTML},renderYearsList=function(date,opts){var d=moment(date),select=document.createElement("select"),years=opts.dropdowns&&opts.dropdowns.years?opts.dropdowns.years:null,minYear=years&&years.min?years.min:1900,maxYear=years&&years.max?years.max:Number.parseInt(moment().format("YYYY"));Number.parseInt(date.format("YYYY"))<minYear&&(minYear=Number.parseInt(date.format("YYYY"))),Number.parseInt(date.format("YYYY"))>maxYear&&(maxYear=Number.parseInt(date.format("YYYY")));for(var idx=minYear;idx<=maxYear;idx++){d.set("year",idx);var option=document.createElement("option");option.value=d.toDate().getFullYear(),option.text=d.toDate().getFullYear(),idx===date.toDate().getFullYear()&&option.setAttribute("selected","selected"),select.appendChild(option)}return select.className="lightpick__select lightpick__select-years",opts.dropdowns&&opts.dropdowns.years||(select.disabled=!0),select.outerHTML},renderCalendar=function(el,opts){for(var html="",monthDate=moment(opts.calendar[0]),i=0;i<opts.numberOfMonths;i++){var day=moment(monthDate);html+='<section class="lightpick__month">',html+='<header class="lightpick__month-title-bar">',html+='<div class="lightpick__month-title">'+renderMonthsList(day,opts)+renderYearsList(day,opts)+"</div>",1===opts.numberOfMonths&&(html+=renderTopButtons(opts,"days")),html+="</header>",html+='<div class="lightpick__days-of-the-week">';for(var w=opts.firstDay+4;w<7+opts.firstDay+4;++w)html+='<div class="lightpick__day-of-the-week" title="'+weekdayName(opts,w,"long")+'">'+weekdayName(opts,w)+"</div>";if(html+="</div>",html+='<div class="lightpick__days">',day.isoWeekday()!==opts.firstDay)for(var prevDays=day.isoWeekday()-opts.firstDay>0?day.isoWeekday()-opts.firstDay:day.isoWeekday(),prevMonth=moment(day).subtract(prevDays,"day"),daysInMonth=prevMonth.daysInMonth(),d=prevMonth.get("date");d<=daysInMonth;
1d++)html+=renderDay(opts,prevMonth,i>0,"is-previous-month"),prevMonth.add(1,"day");for(var daysInMonth=day.daysInMonth(),today=new Date,d=0;d<daysInMonth;d++)html+=renderDay(opts,day),day.add(1,"day");var nextMonth=moment(day),nextDays=7-nextMonth.isoWeekday()+opts.firstDay;if(nextDays<7)for(var d=nextMonth.get("date");d<=nextDays;d++)html+=renderDay(opts,nextMonth,i<opts.numberOfMonths-1,"is-next-month"),nextMonth.add(1,"day");html+="</div>",html+="</section>",monthDate.add(1,"month")}opts.calendar[1]=moment(monthDate),el.querySelector(".lightpick__months").innerHTML=html},updateDates=function(el,opts){var days=el.querySelectorAll(".lightpick__day");[].forEach.call(days,(function(day){day.outerHTML=renderDay(opts,parseInt(day.getAttribute("data-time")),!1,day.className.split(" "))})),checkDisabledDatesInRange(el,opts)},checkDisabledDatesInRange=function(el,opts){if(!opts.disabledDatesInRange&&opts.startDate&&!opts.endDate&&opts.disableDates){var days=el.querySelectorAll(".lightpick__day"),disabledArray=opts.disableDates.map((function(entry){return entry instanceof Array||"[object Array]"===Object.prototype.toString.call(entry)?entry[0]:entry})),closestPrev=moment(disabledArray.filter((function(d){return moment(d).isBefore(opts.startDate)})).sort((function(a,b){return moment(b).isAfter(moment(a))}))[0]),closestNext=moment(disabledArray.filter((function(d){return moment(d).isAfter(opts.startDate)})).sort((function(a,b){return moment(a).isAfter(moment(b))}))[0]);[].forEach.call(days,(function(dayCell){var day=moment(parseInt(dayCell.getAttribute("data-time")));(closestPrev&&day.isBefore(closestPrev)&&opts.startDate.isAfter(closestPrev)||closestNext&&day.isAfter(closestNext)&&closestNext.isAfter(opts.startDate))&&(dayCell.classList.remove("is-available"),dayCell.classList.add("is-disabled"))}))}},Lightpick=function(options){var self=this,opts=self.config(options);self.el=document.createElement("section"),self.el.className="lightpick lightpick--"+opts.numberOfColumns+"-columns is-hidden",opts.inline&&(self.el.className+=" lightpick--inlined");var html='<div class="lightpick__inner">'+(opts.numberOfMonths>1?renderTopButtons(opts,"days"):"")+'<div class="lightpick__months"></div><div class="lightpick__tooltip" style="visibility: hidden"></div>';opts.footer&&(html+='<div class="lightpick__footer">',!0===opts.footer?(html+='<button type="button" class="lightpick__reset-action">'+opts.locale.buttons.reset+"</button>",html+='<div class="lightpick__footer-message"></div>',html+='<button type="button" class="lightpick__apply-action">'+opts.locale.buttons.apply+"</button>"):html+=opts.footer,html+="</div>"),html+="</div>",self.el.innerHTML=html,opts.parentEl instanceof Node?opts.parentEl.appendChild(self.el):"body"===opts.parentEl&&opts.inline?opts.field.parentNode.appendChild(self.el):document.querySelector(opts.parentEl).appendChild(self.el),self._onMouseDown=function(e){if(self.isShowing){var target=(e=e||window.event).target||e.srcElement;if(target){e.stopPropagation(),target.classList.contains("lightpick__select")||e.preventDefault();var opts=self._opts;if(target.classList.contains("lightpick__day")&&target.classList.contains("is-available")){var day=moment(parseInt(target.getAttribute("data-time")));if(!opts.disabledDatesInRange&&opts.disableDates&&opts.startDate){var start=day.isAfter(opts.startDate)?moment(opts.startDate):moment(day),end=day.isAfter(opts.startDate)?moment(day):moment(opts.startDate),isInvalidRange;if(opts.disableDates.filter((function(d){if(d instanceof Array||"[object Array]"===Object.prototype.toString.call(d)){var _from=moment(d[0]),_to=moment(d[1]);return _from.isValid()&&_to.isValid()&&(_from.isBetween(start,end,"day","[]")||_to.isBetween(start,end,"day","[]"))}return moment(d).isBetween(start,end,"day","[]")})).length)return self.setStartDate(null),self.setEndDate(null),target.dispatchEvent(new Event("mousedown")),self.el.querySelector(".lightpick__tooltip").style.visibility="hidden",void updateDates(self.el,opts)}if(opts.singleDate||!opts.startDate&&!opts.endDate||opts.startDate&&opts.endDate?opts.repick&&opts.startDate&&opts.endDate?(opts.repickTrigger===opts.field?(self.setStartDate(day),target.classList.add("is-start-date")):(self.setEndDate(day),target.classList.add("is-end-date")),opts.startDate.isAfter(opts.endDate)&&self.swapDate(),opts.autoclose&&setTimeout((function(){self.hide()}),100)):(self.setStartDate(day),self.setEndDate(null),target.classList.add("is-start-date"),opts.singleDate&&opts.autoclose?setTimeout((function(){self.hide()}),100):opts.singleDate&&!opts.inline||updateDates(self.el,opts)):opts.startDate&&!opts.endDate&&(self.setEndDate(day),opts.startDate.isAfter(opts.endDate)&&self.swapDate(),target.classList.add("is-end-date"),opts.autoclose?setTimeout((function(){self.hide()}),100):updateDates(self.el,opts)),!opts.disabledDatesInRange&&0===self.el.querySelectorAll(".lightpick__day.is-available").length&&(self.setStartDate(null),updateDates(self.el,opts),opts.footer))if("function"==typeof self._opts.onError)self._opts.onError.call(self,"Invalid range");else{var footerMessage=self.el.querySelector(".lightpick__footer-message");footerMessage&&(footerMessage.innerHTML=opts.locale.not_allowed_range,setTimeout((function(){footerMessage.innerHTML=""}),3e3))}}else target.classList.contains("lightpick__previous-action")?self.prevMonth():target.classList.contains("lightpick__next-action")?self.nextMonth():target.classList.contains("lightpick__close-action")||target.classList.contains("lightpick__apply-action")?self.hide():target.classList.contains("lightpick__reset-action")&&self.reset()}}},self._onMouseEnter=function(e){if(self.isShowing){var target=(e=e||window.event).target||e.srcElement;if(target){var opts=self._opts;if(target.classList.contains("lightpick__day")&&target.classList.contains("disabled-tooltip")&&opts.locale.tooltipOnDisabled)self.showTooltip(target,opts.locale.tooltipOnDisabled);
1else if(self.hideTooltip(),!opts.singleDate&&(opts.startDate||opts.endDate)&&(target.classList.contains("lightpick__day")||target.classList.contains("is-available"))&&(opts.startDate&&!opts.endDate||opts.repick)){var hoverDate=moment(parseInt(target.getAttribute("data-time")));if(!hoverDate.isValid())return;var startDate=opts.startDate&&!opts.endDate||opts.repick&&opts.repickTrigger===opts.secondField?opts.startDate:opts.endDate,days=self.el.querySelectorAll(".lightpick__day");if([].forEach.call(days,(function(day){var dt=moment(parseInt(day.getAttribute("data-time")));day.classList.remove("is-flipped"),dt.isValid()&&dt.isSameOrAfter(startDate,"day")&&dt.isSameOrBefore(hoverDate,"day")?(day.classList.add("is-in-range"),opts.repickTrigger===opts.field&&dt.isSameOrAfter(opts.endDate)&&day.classList.add("is-flipped")):dt.isValid()&&dt.isSameOrAfter(hoverDate,"day")&&dt.isSameOrBefore(startDate,"day")?(day.classList.add("is-in-range"),(opts.startDate&&!opts.endDate||opts.repickTrigger===opts.secondField)&&dt.isSameOrBefore(opts.startDate)&&day.classList.add("is-flipped")):day.classList.remove("is-in-range"),opts.startDate&&opts.endDate&&opts.repick&&opts.repickTrigger===opts.field?day.classList.remove("is-start-date"):day.classList.remove("is-end-date")})),opts.hoveringTooltip){days=Math.abs(hoverDate.isAfter(startDate)?hoverDate.diff(startDate,"day"):startDate.diff(hoverDate,"day")),opts.tooltipNights||(days+=1);var tooltip=self.el.querySelector(".lightpick__tooltip");if(days>0&&!target.classList.contains("is-disabled")){var pluralText="";"function"==typeof opts.locale.pluralize&&(pluralText=opts.locale.pluralize.call(self,days,opts.locale.tooltip)),self.showTooltip(target,days+" "+pluralText)}else self.hideTooltip()}opts.startDate&&opts.endDate&&opts.repick&&opts.repickTrigger===opts.field?target.classList.add("is-start-date"):target.classList.add("is-end-date")}}}},self._onChange=function(e){var target=(e=e||window.event).target||e.srcElement;target&&(target.classList.contains("lightpick__select-months")?("function"==typeof self._opts.onMonthsChange&&self._opts.onMonthsChange.call(this,target.value),self.gotoMonth(target.value)):target.classList.contains("lightpick__select-years")&&("function"==typeof self._opts.onYearsChange&&self._opts.onYearsChange.call(this,target.value),self.gotoYear(target.value)))},self._onInputChange=function(e){var target=e.target||e.srcElement;self._opts.singleDate&&(self._opts.autoclose||self.gotoDate(opts.field.value)),self.syncFields(),self.isShowing||self.show()},self._onInputFocus=function(e){var target=e.target||e.srcElement;self.show(target)},self._onInputClick=function(e){var target=e.target||e.srcElement;self.show(target)},self._onClick=function(e){var target=(e=e||window.event).target||e.srcElement,parentEl=target;if(target){do{if(parentEl.classList&&parentEl.classList.contains("lightpick")||parentEl===opts.field||opts.secondField&&parentEl===opts.secondField)return}while(parentEl=parentEl.parentNode);self.isShowing&&opts.hideOnBodyClick&&target!==opts.field&&parentEl!==opts.field&&self.hide()}},self.showTooltip=function(target,text){var tooltip=self.el.querySelector(".lightpick__tooltip"),hasParentEl=self.el.classList.contains("lightpick--inlined"),dayBounding=target.getBoundingClientRect(),pickerBouding=hasParentEl?self.el.parentNode.getBoundingClientRect():self.el.getBoundingClientRect(),_left=dayBounding.left-pickerBouding.left+dayBounding.width/2,_top=dayBounding.top-pickerBouding.top;tooltip.style.visibility="visible",tooltip.textContent=text;var tooltipBounding=tooltip.getBoundingClientRect();_top-=tooltipBounding.height,_left-=tooltipBounding.width/2,setTimeout((function(){tooltip.style.top=_top+"px",tooltip.style.left=_left+"px"}),10)},self.hideTooltip=function(){var tooltip;self.el.querySelector(".lightpick__tooltip").style.visibility="hidden"},self.el.addEventListener("mousedown",self._onMouseDown,!0),self.el.addEventListener("mouseenter",self._onMouseEnter,!0),self.el.addEventListener("touchend",self._onMouseDown,!0),self.el.addEventListener("change",self._onChange,!0),opts.inline?self.show():self.hide(),opts.field.addEventListener("change",self._onInputChange),opts.field.addEventListener("click",
1self._onInputClick),opts.field.addEventListener("focus",self._onInputFocus),opts.secondField&&(opts.secondField.addEventListener("change",self._onInputChange),opts.secondField.addEventListener("click",self._onInputClick),opts.secondField.addEventListener("focus",self._onInputFocus))};return Lightpick.prototype={config:function(options){var opts=Object.assign({},defaults,options);if(opts.field=opts.field&&opts.field.nodeName?opts.field:null,opts.calendar=[moment().set("date",1)],1===opts.numberOfMonths&&opts.numberOfColumns>1&&(opts.numberOfColumns=1),opts.minDate=opts.minDate&&moment(opts.minDate,opts.format).isValid()?moment(opts.minDate,opts.format):null,opts.maxDate=opts.maxDate&&moment(opts.maxDate,opts.format).isValid()?moment(opts.maxDate,opts.format):null,"auto"===opts.lang){var browserLang=navigator.language||navigator.userLanguage;opts.lang=browserLang||"en-US"}return opts.secondField&&opts.singleDate&&(opts.singleDate=!1),opts.hoveringTooltip&&opts.singleDate&&(opts.hoveringTooltip=!1),"[object Object]"===Object.prototype.toString.call(options.locale)&&(opts.locale=Object.assign({},defaults.locale,options.locale)),window.innerWidth<480&&opts.numberOfMonths>1&&(opts.numberOfMonths=1,opts.numberOfColumns=1),opts.repick&&!opts.secondField&&(opts.repick=!1),opts.inline&&(opts.autoclose=!1,opts.hideOnBodyClick=!1),this._opts=Object.assign({},opts),this.syncFields(),this.setStartDate(this._opts.startDate,!0),this.setEndDate(this._opts.endDate,!0),this._opts},syncFields:function(){if(this._opts.singleDate||this._opts.secondField)moment(this._opts.field.value,this._opts.format).isValid()&&(this._opts.startDate=moment(this._opts.field.value,this._opts.format)),this._opts.secondField&&moment(this._opts.secondField.value,this._opts.format).isValid()&&(this._opts.endDate=moment(this._opts.secondField.value,this._opts.format));else{var dates=this._opts.field.value.split(this._opts.separator);2===dates.length&&(moment(dates[0],this._opts.format).isValid()&&(this._opts.startDate=moment(dates[0],this._opts.format)),moment(dates[1],this._opts.format).isValid()&&(this._opts.endDate=moment(dates[1],this._opts.format)))}},swapDate:function(){var tmp=moment(this._opts.startDate);this.setDateRange(this._opts.endDate,tmp)},gotoToday:function(){this.gotoDate(new Date)},gotoDate:function(date){var date;(date=moment(date,this._opts.format)).isValid()||(date=moment()),date.set("date",1),this._opts.calendar=[moment(date)],renderCalendar(this.el,this._opts)},gotoMonth:function(month){isNaN(month)||(this._opts.calendar[0].set("month",month),renderCalendar(this.el,this._opts))},gotoYear:function(year){isNaN(year)||(this._opts.calendar[0].set("year",year),renderCalendar(this.el,this._opts))},prevMonth:function(){this._opts.calendar[0]=moment(this._opts.calendar[0]).subtract(this._opts.numberOfMonths,"month"),renderCalendar(this.el,this._opts),checkDisabledDatesInRange(this.el,this._opts)},nextMonth:function(){this._opts.calendar[0]=moment(this._opts.calendar[1]),renderCalendar(this.el,this._opts),checkDisabledDatesInRange(this.el,this._opts)},updatePosition:function(){if(!this.el.classList.contains("lightpick--inlined")){this.el.classList.remove("is-hidden");var rect=this._opts.field.getBoundingClientRect(),calRect=this.el.getBoundingClientRect(),orientation=this._opts.orientation.split(" "),top=0,left=0;"auto"!=orientation[0]&&/top|bottom/.test(orientation[0])?(top=rect[orientation[0]]+window.pageYOffset,"top"==orientation[0]&&(top-=calRect.height)):top=rect.bottom+calRect.height>window.innerHeight&&window.pageYOffset>calRect.height?rect.top+window.pageYOffset-calRect.height:rect.bottom+window.pageYOffset,/left|right/.test(orientation[0])||orientation[1]&&"auto"!=orientation[1]&&/left|right/.test(orientation[1])?(left=/left|right/.test(orientation[0])?rect[orientation[0]]+window.pageXOffset:rect[orientation[1]]+window.pageXOffset,"right"!=orientation[0]&&"right"!=orientation[1]||(left-=calRect.width)):left=rect.left+calRect.width>window.innerWidth?rect.right+window.pageXOffset-calRect.width:rect.left+window.pageXOffset,this.el.classList.add("is-hidden"),this.el.style.top=top+"px",this.el.style.left=left+"px"}},setStartDate:function(date,preventOnSelect){var dateISO=moment(date,moment.ISO_8601),dateOptFormat=moment(date,this._opts.format);if(!dateISO.isValid()&&!dateOptFormat.isValid())return this._opts.startDate=null,void(this._opts.field.value="");this._opts.startDate=moment(dateISO.isValid()?dateISO:dateOptFormat),this._opts.singleDate||this._opts.secondField?this._opts.field.value=this._opts.startDate.format(this._opts.format):this._opts.field.value=this._opts.startDate.format(this._opts.format)+this._opts.separator+"...",preventOnSelect||"function"!=typeof this._opts.onSelect||this._opts.onSelect.call(this,this.get
1StartDate(),this.getEndDate())},setEndDate:function(date,preventOnSelect){var dateISO=moment(date,moment.ISO_8601),dateOptFormat=moment(date,this._opts.format);if(!dateISO.isValid()&&!dateOptFormat.isValid())return this._opts.endDate=null,void(this._opts.secondField?this._opts.secondField.value="":!this._opts.singleDate&&this._opts.startDate&&(this._opts.field.value=this._opts.startDate.format(this._opts.format)+this._opts.separator+"..."));this._opts.endDate=moment(dateISO.isValid()?dateISO:dateOptFormat),this._opts.secondField?(this._opts.field.value=this._opts.startDate.format(this._opts.format),this._opts.secondField.value=this._opts.endDate.format(this._opts.format)):this._opts.field.value=this._opts.startDate.format(this._opts.format)+this._opts.separator+this._opts.endDate.format(this._opts.format),preventOnSelect||"function"!=typeof this._opts.onSelect||this._opts.onSelect.call(this,this.getStartDate(),this.getEndDate())},setDate:function(date,preventOnSelect){this._opts.singleDate&&(this.setStartDate(date,preventOnSelect),this.isShowing&&updateDates(this.el,this._opts))},setDateRange:function(start,end,preventOnSelect){this._opts.singleDate||(this.setStartDate(start,!0),this.setEndDate(end,!0),this.isShowing&&updateDates(this.el,this._opts),preventOnSelect||"function"!=typeof this._opts.onSelect||this._opts.onSelect.call(this,this.getStartDate(),this.getEndDate()))},setDisableDates:function(dates){this._opts.disableDates=dates,this.isShowing&&updateDates(this.el,this._opts)},getStartDate:function(){return moment(this._opts.startDate).isValid()?this._opts.startDate:null},getEndDate:function(){return moment(this._opts.endDate).isValid()?this._opts.endDate:null},getDate:function(){return moment(this._opts.startDate).isValid()?this._opts.startDate:null},toString:function(format){return this._opts.singleDate?moment(this._opts.startDate).isValid()?this._opts.startDate.format(format):"":moment(this._opts.startDate).isValid()&&moment(this._opts.endDate).isValid()?this._opts.startDate.format(format)+this._opts.separator+this._opts.endDate.format(format):moment(this._opts.startDate).isValid()&&!moment(this._opts.endDate).isValid()?this._opts.startDate.format(format)+this._opts.separator+"...":!moment(this._opts.startDate).isValid()&&moment(this._opts.endDate).isValid()?"..."+this._opts.separator+this._opts.endDate.format(format):""},show:function(target){this.isShowing||(this.isShowing=!0,this._opts.repick&&(this._opts.repickTrigger=target),this.syncFields(),this._opts.secondField&&this._opts.secondField===target&&this._opts.endDate?this.gotoDate(this._opts.endDate):this.gotoDate(this._opts.startDate),document.addEventListener("click",this._onClick),this.updatePosition(),this.el.classList.remove("is-hidden"),"function"==typeof this._opts.onOpen&&this._opts.onOpen.call(this),document.activeElement&&document.activeElement!=document.body&&document.activeElement.blur())},hide:function(){this.isShowing&&(this.isShowing=!1,document.removeEventListener("click",this._onClick),this.el.classList.add("is-hidden"),this.el.querySelector(".lightpick__tooltip").style.visibility="hidden","function"==typeof this._opts.onClose&&this._opts.onClose.call(this))},destroy:function(){var opts=this._opts;this.hide(),this.el.removeEventListener("mousedown",self._onMouseDown,!0),this.el.removeEventListener("mouseenter",self._onMouseEnter,!0),this.el.removeEventListener("touchend",self._onMouseDown,!0),this.el.removeEventListener("change",self._onChange,!0),opts.field.removeEventListener("change",this._onInputChange),opts.field.removeEventListener("click",this._onInputClick),opts.field.removeEventListener("focus",this._onInputFocus),opts.secondField&&(opts.secondField.removeEventListener("change",this._onInputChange),opts.secondField.removeEventListener("click",this._onInputClick),opts.secondField.removeEventListener("focus",this._onInputFocus)),this.el.parentNode&&this.el.parentNode.removeChild(this.el)},reset:function(){this.setStartDate(null,!0),this.setEndDate(null,!0),updateDates(this.el,this._opts),"function"==typeof this._opts.onSelect&&this._opts.onSelect.call(this,this.get
1StartDate(),this.getEndDate()),this.el.querySelector(".lightpick__tooltip").style.visibility="hidden"},reloadOptions:function(options){this._opts=Object.assign({},this._opts,options)}},Lightpick}));

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.