pollushof.hu Open in urlscan Pro
136.243.150.82  Public Scan

URL: https://pollushof.hu/wp-content/plugins/cozystay-core/assets/libs/daterangepicker/daterangepicker.min.js?ver=2024033101
Submission: On August 23 via api from US — Scanned from DE

Form analysis 0 forms found in the DOM

Text Content

!function(t,a){var e,i;"function"==typeof define&&define.amd?define(["moment","jquery"],function(t,e){return e.fn||(e.fn={}),"function"!=typeof t&&t.hasOwnProperty("default")&&(t=t.default),a(t,e)}):"object"==typeof module&&module.exports?((e="undefined"!=typeof window?window.jQuery:void 0)||(e=require("jquery")).fn||(e.fn={}),i="undefined"!=typeof window&&void 0!==window.moment?window.moment:require("moment"),module.exports=a(i,e)):t.daterangepicker=a(t.moment,t.jQuery)}("undefined"!=typeof window?window:this,function(L,N){function i(t,e,a){var i,s,n,o;if(this.parentEl="body",this.element=N(t),this.startDate=L().startOf("day"),this.endDate=L().endOf("day"),this.minDate=!1,this.maxDate=!1,this.maxSpan=!1,this.autoApply=!1,this.singleDatePicker=!1,this.showDropdowns=!1,this.minYear=L().subtract(100,"year").format("YYYY"),this.maxYear=L().add(100,"year").format("YYYY"),this.showWeekNumbers=!1,this.showISOWeekNumbers=!1,this.showCustomRangeLabel=!0,this.timePicker=!1,this.timePicker24Hour=!1,this.timePickerIncrement=1,this.timePickerSeconds=!1,this.linkedCalendars=!0,this.autoUpdateInput=!0,this.alwaysShowCalendars=!1,this.popupSingle=!1,this.ranges={},this.opens="right",this.element.hasClass("pull-right")&&(this.opens="left"),this.drops="down",this.element.hasClass("dropup")&&(this.drops="up"),this.buttonClasses="btn btn-sm",this.applyButtonClasses="btn-primary",this.cancelButtonClasses="btn-default",this.locale={direction:N("body").hasClass("rtl")?"rtl":"ltr",format:L.localeData().longDateFormat("L"),separator:" - ",applyLabel:"Apply",cancelLabel:"Cancel",weekLabel:"W",customRangeLabel:"Custom Range",daysOfWeek:L.weekdaysShort(),monthNames:L.monthsShort(),firstDay:L.localeData().firstDayOfWeek()},this.callback=function(){},this.beforeShowDay=function(){return[!0,"",""]},this.isShowing=!1,this.leftCalendar={},this.rightCalendar={},"object"==typeof e&&null!==e||(e={}),"string"==typeof(e=N.extend(this.element.data(),e)).template||e.template instanceof N||(e.template='<div class="daterangepicker"><div class="ranges"></div><div class="drp-calendar left"><div class="calendar-table"></div><div class="calendar-time"></div></div><div class="drp-calendar right"><div class="calendar-table"></div><div class="calendar-time"></div></div><div class="drp-buttons"><span class="drp-selected"></span><button class="cancelBtn" type="button"></button><button class="applyBtn" disabled="disabled" type="button"></button> </div></div>'),this.parentEl=e.parentEl&&N(e.parentEl).length?N(e.parentEl):N(this.parentEl),this.container=N(e.template).appendTo(this.parentEl),"object"==typeof e.locale&&("string"==typeof e.locale.direction&&(this.locale.direction=e.locale.direction),"string"==typeof e.locale.format&&(this.locale.format=e.locale.format),"string"==typeof e.locale.separator&&(this.locale.separator=e.locale.separator),"object"==typeof e.locale.daysOfWeek&&(this.locale.daysOfWeek=e.locale.daysOfWeek.slice()),"object"==typeof e.locale.monthNames&&(this.locale.monthNames=e.locale.monthNames.slice()),"number"==typeof e.locale.firstDay&&(this.locale.firstDay=e.locale.firstDay),"string"==typeof e.locale.applyLabel&&(this.locale.applyLabel=e.locale.applyLabel),"string"==typeof e.locale.cancelLabel&&(this.locale.cancelLabel=e.locale.cancelLabel),"string"==typeof e.locale.weekLabel&&(this.locale.weekLabel=e.locale.weekLabel),"string"==typeof e.locale.customRangeLabel&&((h=document.createElement("textarea")).innerHTML=e.locale.customRangeLabel,l=h.value,this.locale.customRangeLabel=l)),this.container.addClass(this.locale.direction),"string"==typeof e.startDate&&(this.startDate=L(e.startDate,this.locale.format)),"string"==typeof e.endDate&&(this.endDate=L(e.endDate,this.locale.format)),"string"==typeof e.minDate&&(this.minDate=L(e.minDate,this.locale.format)),"string"==typeof e.maxDate&&(this.maxDate=L(e.maxDate,this.locale.format)),"object"==typeof e.startDate&&(this.startDate=L(e.startDate)),"object"==typeof e.endDate&&(this.endDate=L(e.endDate)),"object"==typeof e.minDate&&(this.minDate=L(e.minDate)),"object"==typeof e.maxDate&&(this.maxDate=L(e.maxDate)),this.minDate&&this.startDate.isBefore(this.minDate)&&(this.startDate=this.minDate.clone()),this.maxDate&&this.endDate.isAfter(this.maxDate)&&(this.endDate=this.maxDate.clone()),"string"==typeof e.applyButtonClasses&&(this.applyButtonClasses=e.applyButtonClasses),"string"==typeof e.applyClass&&(this.applyButtonClasses=e.applyClass),"string"==typeof e.cancelButtonClasses&&(this.cancelButtonClasses=e.cancelButtonClasses),"string"==typeof e.cancelClass&&(this.cancelButtonClasses=e.cancelClass),"object"==typeof e.maxSpan&&(this.maxSpan=e.maxSpan),"object"==typeof e.dateLimit&&(this.maxSpan=e.dateLimit),"string"==typeof e.opens&&(this.opens=e.opens),"string"==typeof e.drops&&(this.drops=e.drops),"boolean"==typeof e.showWeekNumbers&&(this.showWeekNumbers=e.showWeekNumbers),"boolean"==typeof e.showISOWeekNumbers&&(this.showISOWeekNumbers=e.showISOWeekNumbers),"string"==typeof e.buttonClasses&&(this.buttonClasses=e.buttonClasses),"object"==typeof e.buttonClasses&&(this.buttonClasses=e.buttonClasses.join(" ")),"boolean"==typeof e.showDropdowns&&(this.showDropdowns=e.showDropdowns),"number"==typeof e.minYear&&(this.minYear=e.minYear),"number"==typeof e.maxYear&&(this.maxYear=e.maxYear),"boolean"==typeof e.showCustomRangeLabel&&(this.showCustomRangeLabel=e.showCustomRangeLabel),"boolean"==typeof e.singleDatePicker&&(this.singleDatePicker=e.singleDatePicker,this.singleDatePicker&&(this.endDate=this.startDate.clone())),"boolean"==typeof e.timePicker&&(this.timePicker=e.timePicker),"boolean"==typeof e.timePickerSeconds&&(this.timePickerSeconds=e.timePickerSeconds),"number"==typeof e.timePickerIncrement&&(this.timePickerIncrement=e.timePickerIncrement),"boolean"==typeof e.timePicker24Hour&&(this.timePicker24Hour=e.timePicker24Hour),"boolean"==typeof e.autoApply&&(this.autoApply=e.autoApply),"boolean"==typeof e.autoUpdateInput&&(this.autoUpdateInput=e.autoUpdateInput),"boolean"==typeof e.linkedCalendars&&(this.linkedCalendars=e.linkedCalendars),"function"==typeof e.isInvalidDate&&(this.isInvalidDate=e.isInvalidDate),"function"==typeof e.isCustomDate&&(this.isCustomDate=e.isCustomDate),"boolean"==typeof e.alwaysShowCalendars&&(this.alwaysShowCalendars=e.alwaysShowCalendars),0!=this.locale.firstDay)for(var r=this.locale.firstDay;0<r;)this.locale.daysOfWeek.push(this.locale.daysOfWeek.shift()),r--;if(void 0===e.startDate&&void 0===e.endDate&&N(this.element).is(":text")&&(o=i=null,2==(t=(n=N(this.element).val()).split(this.locale.separator)).length?(o=L(t[0],this.locale.format),i=L(t[1],this.locale.format)):this.singleDatePicker&&""!==n&&(o=L(n,this.locale.format),i=L(n,this.locale.format)),null!==o&&null!==i&&(this.setStartDate(o),this.setEndDate(i))),"object"==typeof e.ranges){for(s in e.ranges){o="string"==typeof e.ranges[s][0]?L(e.ranges[s][0],this.locale.format):L(e.ranges[s][0]),i="string"==typeof e.ranges[s][1]?L(e.ranges[s][1],this.locale.format):L(e.ranges[s][1]),this.minDate&&o.isBefore(this.minDate)&&(o=this.minDate.clone());var h,l,c=this.maxDate;this.maxSpan&&c&&o.clone().add(this.maxSpan).isAfter(c)&&(c=o.clone().add(this.maxSpan)),c&&i.isAfter(c)&&(i=c.clone()),this.minDate&&i.isBefore(this.minDate,this.timepicker?"minute":"day")||c&&o.isAfter(c,this.timepicker?"minute":"day")||((h=document.createElement("textarea")).innerHTML=s,l=h.value,this.ranges[l]=[o,i])}var d="<ul>";for(s in this.ranges)d+='<li data-range-key="'+s+'">'+s+"</li>";this.showCustomRangeLabel&&(d+='<li data-range-key="'+this.locale.customRangeLabel+'">'+this.locale.customRangeLabel+"</li>"),d+="</ul>",this.container.find(".ranges").prepend(d)}"function"==typeof a&&(this.callback=a),"function"==typeof e.beforeShowDay&&(this.beforeShowDay=e.beforeShowDay),"boolean"==typeof e.popupSingle&&e.popupSingle&&(this.popupSingle=e.popupSingle),this.timePicker||(this.startDate=this.startDate.startOf("day"),this.endDate=this.endDate.endOf("day"),this.container.find(".calendar-time").hide()),this.timePicker&&this.autoApply&&(this.autoApply=!1),this.autoApply&&this.container.addClass("auto-apply"),"object"==typeof e.ranges&&this.container.addClass("show-ranges"),this.singleDatePicker&&(this.container.addClass("single"),this.container.find(".drp-calendar.left").addClass("single"),this.container.find(".drp-calendar.left").show(),this.container.find(".drp-calendar.right").hide(),!this.timePicker&&this.autoApply&&this.container.addClass("auto-apply")),(void 0===e.ranges&&!this.singleDatePicker||this.alwaysShowCalendars)&&this.container.addClass("show-calendar"),this.container.addClass("opens"+this.opens),this.container.find(".applyBtn, .cancelBtn").addClass(this.buttonClasses),this.applyButtonClasses.length&&this.container.find(".applyBtn").addClass(this.applyButtonClasses),this.cancelButtonClasses.length&&this.container.find(".cancelBtn").addClass(this.cancelButtonClasses),this.container.find(".applyBtn").html(this.locale.applyLabel),this.container.find(".cancelBtn").html(this.locale.cancelLabel),this.container.find(".drp-calendar").on("click.daterangepicker",".prev",N.proxy(this.clickPrev,this)).on("click.daterangepicker",".next",N.proxy(this.clickNext,this)).on("mousedown.daterangepicker","td.available",N.proxy(this.clickDate,this)).on("mouseenter.daterangepicker","td.available",N.proxy(this.hoverDate,this)).on("change.daterangepicker","select.yearselect",N.proxy(this.monthOrYearChanged,this)).on("change.daterangepicker","select.monthselect",N.proxy(this.monthOrYearChanged,this)).on("change.daterangepicker","select.hourselect,select.minuteselect,select.secondselect,select.ampmselect",N.proxy(this.timeChanged,this)),this.container.find(".ranges").on("click.daterangepicker","li",N.proxy(this.clickRange,this)),this.container.find(".drp-buttons").on("click.daterangepicker","button.applyBtn",N.proxy(this.clickApply,this)).on("click.daterangepicker","button.cancelBtn",N.proxy(this.clickCancel,this)),this.element.is("input")||this.element.is("button")?this.element.on({"click.daterangepicker":N.proxy(this.show,this),"focus.daterangepicker":N.proxy(this.show,this),"keyup.daterangepicker":N.proxy(this.elementChanged,this),"keydown.daterangepicker":N.proxy(this.keydown,this)}):(this.element.on("click.daterangepicker",N.proxy(this.toggle,this)),this.element.on("keydown.daterangepicker",N.proxy(this.toggle,this))),this.updateElement()}return i.prototype={constructor:i,setStartDate:function(t){"string"==typeof t&&(this.startDate=L(t,this.locale.format)),"object"==typeof t&&(this.startDate=L(t)),this.timePicker||(this.startDate=this.startDate.startOf("day")),this.timePicker&&this.timePickerIncrement&&this.startDate.minute(Math.round(this.startDate.minute()/this.timePickerIncrement)*this.timePickerIncrement),this.minDate&&this.startDate.isBefore(this.minDate)&&(this.startDate=this.minDate.clone(),this.timePicker&&this.timePickerIncrement&&this.startDate.minute(Math.round(this.startDate.minute()/this.timePickerIncrement)*this.timePickerIncrement)),this.maxDate&&this.startDate.isAfter(this.maxDate)&&(this.startDate=this.maxDate.clone(),this.timePicker&&this.timePickerIncrement&&this.startDate.minute(Math.floor(this.startDate.minute()/this.timePickerIncrement)*this.timePickerIncrement)),this.isShowing||this.updateElement(),this.updateMonthsInView()},setEndDate:function(t){"string"==typeof t&&(this.endDate=L(t,this.locale.format)),"object"==typeof t&&(this.endDate=L(t)),this.timePicker||(this.endDate=this.endDate.endOf("day")),this.timePicker&&this.timePickerIncrement&&this.endDate.minute(Math.round(this.endDate.minute()/this.timePickerIncrement)*this.timePickerIncrement),this.endDate.isBefore(this.startDate)&&(this.endDate=this.startDate.clone()),this.maxDate&&this.endDate.isAfter(this.maxDate)&&(this.endDate=this.maxDate.clone()),this.maxSpan&&this.startDate.clone().add(this.maxSpan).isBefore(this.endDate)&&(this.endDate=this.startDate.clone().add(this.maxSpan)),this.previousRightTime=this.endDate.clone(),this.isShowing||this.updateElement(),this.updateMonthsInView()},isInvalidDate:function(){return!1},isCustomDate:function(){return!1},updateView:function(){this.timePicker&&(this.renderTimePicker("left"),this.renderTimePicker("right"),this.endDate?this.container.find(".right .calendar-time select").prop("disabled",!1).removeClass("disabled"):this.container.find(".right .calendar-time select").prop("disabled",!0).addClass("disabled")),this.updateMonthsInView(),this.updateCalendars(),this.updateFormInputs()},updateMonthsInView:function(){if(this.endDate){if(!this.singleDatePicker&&this.leftCalendar.month&&this.rightCalendar.month&&(this.startDate.format("YYYY-MM")==this.leftCalendar.month.format("YYYY-MM")||this.startDate.format("YYYY-MM")==this.rightCalendar.month.format("YYYY-MM"))&&(this.endDate.format("YYYY-MM")==this.leftCalendar.month.format("YYYY-MM")||this.endDate.format("YYYY-MM")==this.rightCalendar.month.format("YYYY-MM")))return;this.leftCalendar.month=this.startDate.clone().date(2),this.linkedCalendars||this.endDate.month()==this.startDate.month()&&this.endDate.year()==this.startDate.year()?this.rightCalendar.month=this.startDate.clone().date(2).add(1,"month"):this.rightCalendar.month=this.endDate.clone().date(2)}else this.leftCalendar.month.format("YYYY-MM")!=this.startDate.format("YYYY-MM")&&this.rightCalendar.month.format("YYYY-MM")!=this.startDate.format("YYYY-MM")&&(this.leftCalendar.month=this.startDate.clone().date(2),this.rightCalendar.month=this.startDate.clone().date(2).add(1,"month"));this.maxDate&&this.linkedCalendars&&!this.singleDatePicker&&this.rightCalendar.month>this.maxDate&&(this.rightCalendar.month=this.maxDate.clone().date(2),this.leftCalendar.month=this.maxDate.clone().date(2).subtract(1,"month"))},updateCalendars:function(){var t,e,a,i;this.timePicker&&(this.endDate?(e=parseInt(this.container.find(".left .hourselect").val(),10),a=parseInt(this.container.find(".left .minuteselect").val(),10),isNaN(a)&&(a=parseInt(this.container.find(".left .minuteselect option:last").val(),10)),t=this.timePickerSeconds?parseInt(this.container.find(".left .secondselect").val(),10):0,this.timePicker24Hour||("PM"===(i=this.container.find(".left .ampmselect").val())&&e<12&&(e+=12),"AM"===i&&12===e&&(e=0))):(e=parseInt(this.container.find(".right .hourselect").val(),10),a=parseInt(this.container.find(".right .minuteselect").val(),10),isNaN(a)&&(a=parseInt(this.container.find(".right .minuteselect option:last").val(),10)),t=this.timePickerSeconds?parseInt(this.container.find(".right .secondselect").val(),10):0,this.timePicker24Hour||("PM"===(i=this.container.find(".right .ampmselect").val())&&e<12&&(e+=12),"AM"===i&&12===e&&(e=0))),this.leftCalendar.month.hour(e).minute(a).second(t),this.rightCalendar.month.hour(e).minute(a).second(t)),this.renderCalendar("left"),this.renderCalendar("right"),this.container.find(".ranges li").removeClass("active"),null!=this.endDate&&this.calculateChosenLabel()},renderCalendar:function(t){var e="left"==t?this.leftCalendar:this.rightCalendar,a=e.month.month(),i=e.month.year(),s=e.month.hour(),n=e.month.minute(),o=e.month.second(),r=L([i,a]).daysInMonth(),h=L([i,a,1]),l=L([i,a,r]),c=L(h).subtract(1,"month").month(),i=L(h).subtract(1,"month").year(),a=L([i,c]).daysInMonth(),r=h.day();(e=[]).firstDay=h,e.lastDay=l;for(var d=0;d<6;d++)e[d]=[];l=a-r+this.locale.firstDay+1;a<l&&(l-=7),r==this.locale.firstDay&&(l=a-6);for(var m=L([i,c,l,12,n,o]),d=0,p=0,f=0;d<42;d++,p++,m=L(m).add(24,"hour"))0<d&&p%7==0&&(p=0,f++),e[f][p]=m.clone().hour(s).minute(n).second(o),m.hour(12),this.minDate&&e[f][p].format("YYYY-MM-DD")==this.minDate.format("YYYY-MM-DD")&&e[f][p].isBefore(this.minDate)&&"left"==t&&(e[f][p]=this.minDate.clone()),this.maxDate&&e[f][p].format("YYYY-MM-DD")==this.maxDate.format("YYYY-MM-DD")&&e[f][p].isAfter(this.maxDate)&&"right"==t&&(e[f][p]=this.maxDate.clone());"left"==t?this.leftCalendar.calendar=e:this.rightCalendar.calendar=e;var u="left"==t?this.minDate:this.startDate,D=this.maxDate,g=("left"==t?this.startDate:this.endDate,this.locale.direction,'<table class="table-condensed">');g+="<thead>",g+="<tr>",(this.showWeekNumbers||this.showISOWeekNumbers)&&(g+="<th></th>"),u&&!u.isBefore(e.firstDay)||this.linkedCalendars&&"left"!=t?g+="<th></th>":g+='<th class="prev available drp-month-button"><span></span></th>';c=this.locale.monthNames[e[1][1].month()]+e[1][1].format(" YYYY");if(this.showDropdowns){for(var y=e[1][1].month(),k=e[1][1].year(),b=D&&D.year()||this.maxYear,l=u&&u.year()||this.minYear,C=k==l,v=k==b,Y='<select class="monthselect">',w=0;w<12;w++)(!C||u&&w>=u.month())&&(!v||D&&w<=D.month())?Y+="<option value='"+w+"'"+(w===y?" selected='selected'":"")+">"+this.locale.monthNames[w]+"</option>":Y+="<option value='"+w+"'"+(w===y?" selected='selected'":"")+" disabled='disabled'>"+this.locale.monthNames[w]+"</option>";Y+="</select>";for(var P='<select class="yearselect">',x=l;x<=b;x++)P+='<option value="'+x+'"'+(x===k?' selected="selected"':"")+">"+x+"</option>";c=Y+(P+="</select>")}g+='<th colspan="5" class="month">'+c+"</th>",D&&!D.isAfter(e.lastDay)||this.linkedCalendars&&"right"!=t&&!this.singleDatePicker&&!this.popupSingle?g+="<th></th>":g+='<th class="next available drp-month-button"><span></span></th>',g+="</tr>",g+="<tr>",(this.showWeekNumbers||this.showISOWeekNumbers)&&(g+='<th class="week">'+this.locale.weekLabel+"</th>"),N.each(this.locale.daysOfWeek,function(t,e){g+="<th>"+e+"</th>"}),g+="</tr>",g+="</thead>",g+="<tbody>",null==this.endDate&&this.maxSpan&&(c=this.startDate.clone().add(this.maxSpan).endOf("day"),D&&!c.isBefore(D)||(D=c));for(f=0;f<6;f++){g+="<tr>",this.showWeekNumbers?g+='<td class="week">'+e[f][0].week()+"</td>":this.showISOWeekNumbers&&(g+='<td class="week">'+e[f][0].isoWeek()+"</td>");for(p=0;p<7;p++){var M="",S=[],I=this.beforeShowDay?this.beforeShowDay(e[f][p],this):[!0,"",""];I[0]||S.push("disabled"),I[1]&&I[1].split(" ").forEach(function(t){S.includes(t)||S.push(t)}),I[2]&&(S.push("daterangepicker-has-tooltip"),M='<span class="day-tooltip hide">'+I[2]+"</span>"),e[f][p].isSame(new Date,"day")&&S.push("today"),5<e[f][p].isoWeekday()&&S.push("weekend"),e[f][p].month()!=e[1][1].month()&&S.push("off","ends"),this.minDate&&e[f][p].isBefore(this.minDate,"day")&&S.push("off","disabled"),D&&e[f][p].isAfter(D,"day")&&S.push("off","disabled"),this.isInvalidDate(e[f][p])&&S.push("off","disabled"),null!==this.startDate&&e[f][p].format("YYYY-MM-DD")==this.startDate.format("YYYY-MM-DD")&&(S.includes("off")||S.push("start-date","active")),null!=this.endDate&&e[f][p].format("YYYY-MM-DD")==this.endDate.format("YYYY-MM-DD")&&(S.includes("off")||S.push("end-date","active")),null!=this.endDate&&e[f][p]>this.startDate&&e[f][p]<this.endDate&&(S.includes("off")||S.push("in-range"));I=this.isCustomDate(e[f][p]);!1!==I&&("string"==typeof I?S.push(I):Array.prototype.push.apply(S,I));for(var B="",A=!1,d=0;d<S.length;d++)B+=S[d]+" ","disabled"==S[d]&&(A=!0);A||(B+="available"),g+='<td class="'+B.replace(/^\s+|\s+$/g,"")+'" data-date="'+e[f][p].format("YYYY-MM-DD")+'" data-title="r'+f+"c"+p+'">'+e[f][p].date()+M+"</td>"}g+="</tr>"}g+="</tbody>",g+="</table>",this.container.find(".drp-calendar."+t+" .calendar-table").html(g)},renderTimePicker:function(t){if("right"!=t||this.endDate){var e,a,i,s=this.maxDate;!this.maxSpan||this.maxDate&&!this.startDate.clone().add(this.maxSpan).isBefore(this.maxDate)||(s=this.startDate.clone().add(this.maxSpan)),"left"==t?(a=this.startDate.clone(),i=this.minDate):"right"==t&&(a=this.endDate.clone(),i=this.startDate,""!=(n=this.container.find(".drp-calendar.right .calendar-time")).html()&&(a.hour(isNaN(a.hour())?n.find(".hourselect option:selected").val():a.hour()),a.minute(isNaN(a.minute())?n.find(".minuteselect option:selected").val():a.minute()),a.second(isNaN(a.second())?n.find(".secondselect option:selected").val():a.second()),this.timePicker24Hour||("PM"===(d=n.find(".ampmselect option:selected").val())&&a.hour()<12&&a.hour(a.hour()+12),"AM"===d&&12===a.hour()&&a.hour(0))),a.isBefore(this.startDate)&&(a=this.startDate.clone()),s&&a.isAfter(s)&&(a=s.clone())),e='<select class="hourselect">';for(var n=this.timePicker24Hour?0:1,o=this.timePicker24Hour?23:12,r=n;r<=o;r++){var h=r;this.timePicker24Hour||(h=12<=a.hour()?12==r?12:r+12:12==r?0:r);var l=a.clone().hour(h),c=!1;i&&l.minute(59).isBefore(i)&&(c=!0),s&&l.minute(0).isAfter(s)&&(c=!0),h!=a.hour()||c?e+=c?'<option value="'+r+'" disabled="disabled" class="disabled">'+r+"</option>":'<option value="'+r+'">'+r+"</option>":e+='<option value="'+r+'" selected="selected">'+r+"</option>"}e+="</select> ",e+=': <select class="minuteselect">';for(var d,r=0;r<60;r+=this.timePickerIncrement){var m=r<10?"0"+r:r,l=a.clone().minute(r),c=!1;i&&l.second(59).isBefore(i)&&(c=!0),s&&l.second(0).isAfter(s)&&(c=!0),a.minute()!=r||c?e+=c?'<option value="'+r+'" disabled="disabled" class="disabled">'+m+"</option>":'<option value="'+r+'">'+m+"</option>":e+='<option value="'+r+'" selected="selected">'+m+"</option>"}if(e+="</select> ",this.timePickerSeconds){e+=': <select class="secondselect">';for(r=0;r<60;r++){m=r<10?"0"+r:r,l=a.clone().second(r),c=!1;i&&l.isBefore(i)&&(c=!0),s&&l.isAfter(s)&&(c=!0),a.second()!=r||c?e+=c?'<option value="'+r+'" disabled="disabled" class="disabled">'+m+"</option>":'<option value="'+r+'">'+m+"</option>":e+='<option value="'+r+'" selected="selected">'+m+"</option>"}e+="</select> "}this.timePicker24Hour||(e+='<select class="ampmselect">',n=d="",i&&a.clone().hour(12).minute(0).second(0).isBefore(i)&&(d=' disabled="disabled" class="disabled"'),s&&a.clone().hour(0).minute(0).second(0).isAfter(s)&&(n=' disabled="disabled" class="disabled"'),12<=a.hour()?e+='<option value="AM"'+d+'>AM</option><option value="PM" selected="selected"'+n+">PM</option>":e+='<option value="AM" selected="selected"'+d+'>AM</option><option value="PM"'+n+">PM</option>",e+="</select>"),this.container.find(".drp-calendar."+t+" .calendar-time").html(e)}},updateFormInputs:function(){this.singleDatePicker||this.endDate&&(this.startDate.isBefore(this.endDate)||this.startDate.isSame(this.endDate))?this.container.find("button.applyBtn").prop("disabled",!1):this.container.find("button.applyBtn").prop("disabled",!0)},move:function(){var t,e={top:0,left:0},a=this.drops,i=N(window).width();switch(this.parentEl.is("body")||(e={top:this.parentEl.offset().top-this.parentEl.scrollTop(),left:this.parentEl.offset().left-this.parentEl.scrollLeft()},i=this.parentEl[0].clientWidth+this.parentEl.offset().left),a){case"auto":(t=this.element.offset().top+this.element.outerHeight()-e.top)+this.container.outerHeight()>=this.parentEl[0].scrollHeight&&(t=this.element.offset().top-this.container.outerHeight()-e.top,a="up");break;case"up":t=this.element.offset().top-this.container.outerHeight()-e.top;break;default:t=this.element.offset().top+this.element.outerHeight()-e.top}this.container.css({top:0,left:0,right:"auto"});var s,n=this.container.outerWidth();this.container.toggleClass("drop-up","up"==a),"left"==this.opens?n+(i=i-this.element.offset().left-this.element.outerWidth())>N(window).width()?this.container.css({top:t,right:"auto",left:9}):this.container.css({top:t,right:i,left:"auto"}):"center"==this.opens?(s=this.element.offset().left-e.left+this.element.outerWidth()/2-n/2)<0?this.container.css({top:t,right:"auto",left:9}):s+n>N(window).width()?this.container.css({top:t,left:"auto",right:0}):this.container.css({top:t,left:s,right:"auto"}):(s=this.element.offset().left-e.left)+n>N(window).width()?this.container.css({top:t,left:"auto",right:0}):this.container.css({top:t,left:s,right:"auto"})},show:function(t){this.isShowing||(this._outsideClickProxy=N.proxy(function(t){this.outsideClick(t)},this),N(document).on("mousedown.daterangepicker",this._outsideClickProxy).on("touchend.daterangepicker",this._outsideClickProxy).on("click.daterangepicker","[data-toggle=dropdown]",this._outsideClickProxy).on("focusin.daterangepicker",this._outsideClickProxy),N(window).on("resize.daterangepicker",N.proxy(function(t){this.move(t)},this)),this.oldStartDate=this.startDate.clone(),this.oldEndDate=this.endDate.clone(),this.previousRightTime=this.endDate.clone(),this.updateView(),this.container.show(),this.move(),this.element.trigger("show.daterangepicker",this),this.isShowing=!0)},hide:function(t){this.isShowing&&(this.endDate||(this.startDate=this.oldStartDate.clone(),this.endDate=this.oldEndDate.clone()),this.startDate.isSame(this.oldStartDate)&&this.endDate.isSame(this.oldEndDate)||this.callback(this.startDate.clone(),this.endDate.clone(),this.chosenLabel),this.updateElement(),N(document).off(".daterangepicker"),N(window).off(".daterangepicker"),this.container.hide(),this.element.trigger("hide.daterangepicker",this),this.isShowing=!1)},toggle:function(t){this.isShowing?this.hide():this.show()},outsideClick:function(t){var e=N(t.target);"focusin"==t.type||e.closest(this.element).length||e.closest(this.container).length||e.closest(".calendar-table").length||(this.hide(),this.element.trigger("outsideClick.daterangepicker",this))},showCalendars:function(){this.container.addClass("show-calendar"),this.move(),this.element.trigger("showCalendar.daterangepicker",this)},hideCalendars:function(){this.container.removeClass("show-calendar"),this.element.trigger("hideCalendar.daterangepicker",this)},clickRange:function(t){t=t.target.getAttribute("data-range-key");(this.chosenLabel=t)==this.locale.customRangeLabel?this.showCalendars():(t=this.ranges[t],this.startDate=t[0],this.endDate=t[1],this.timePicker||(this.startDate.startOf("day"),this.endDate.endOf("day")),this.alwaysShowCalendars||this.hideCalendars(),this.clickApply())},clickPrev:function(t){N(t.target).parents(".drp-calendar").hasClass("left")?(this.leftCalendar.month.subtract(1,"month"),this.linkedCalendars&&this.rightCalendar.month.subtract(1,"month")):this.rightCalendar.month.subtract(1,"month"),this.updateCalendars()},clickNext:function(t){N(t.target).parents(".drp-calendar").hasClass("left")?this.leftCalendar.month.add(1,"month"):(this.rightCalendar.month.add(1,"month"),this.linkedCalendars&&this.leftCalendar.month.add(1,"month")),this.updateCalendars()},hoverDate:function(t){var e,a,s,n,o,r;N(t.target).hasClass("available")&&(e=(a=N(t.target).attr("data-title")).substr(1,1),a=a.substr(3,1),s=(N(t.target).parents(".drp-calendar").hasClass("left")?this.leftCalendar:this.rightCalendar).calendar[e][a],n=this.leftCalendar,o=this.rightCalendar,r=this.startDate,this.endDate||this.container.find(".drp-calendar tbody td").each(function(t,e){var a,i;N(e).hasClass("week")||(a=(i=N(e).attr("data-title")).substr(1,1),i=i.substr(3,1),(i=(N(e).parents(".drp-calendar").hasClass("left")?n:o).calendar[a][i]).isAfter(r)&&i.isBefore(s)||i.isSame(s,"day")?-1===N(e).attr("class").indexOf("off")&&N(e).addClass("in-range"):N(e).removeClass("in-range"))}))},clickDate:function(t){var e=N(t.target);if("TD"!==e.prop("tagName")&&(e=e.closest("td")),e.hasClass("available")){var a,i,s,n,o=e.attr("data-title"),r=o.substr(1,1),o=o.substr(3,1),o=(e.parents(".drp-calendar").hasClass("left")?this.leftCalendar:this.rightCalendar).calendar[r][o];if(this.endDate||o.isBefore(this.startDate,"day")){if(e.hasClass("no-checkin")||e.hasClass("checkin-unavailable"))return;this.timePicker&&(a=parseInt(this.container.find(".left .hourselect").val(),10),this.timePicker24Hour||("PM"===(i=this.container.find(".left .ampmselect").val())&&a<12&&(a+=12),"AM"===i&&12===a&&(a=0)),s=parseInt(this.container.find(".left .minuteselect").val(),10),isNaN(s)&&(s=parseInt(this.container.find(".left .minuteselect option:last").val(),10)),n=this.timePickerSeconds?parseInt(this.container.find(".left .secondselect").val(),10):0,o=o.clone().hour(a).minute(s).second(n)),this.endDate=null,this.setStartDate(o.clone())}else{if(e.hasClass("no-checkout")||e.hasClass("minimal-stay-unavailable")||e.hasClass("maximal-stay-unavailable")||e.hasClass("checkout-unavailable")||!o.isAfter(this.startDate))return;this.timePicker&&(a=parseInt(this.container.find(".right .hourselect").val(),10),this.timePicker24Hour||("PM"===(i=this.container.find(".right .ampmselect").val())&&a<12&&(a+=12),"AM"===i&&12===a&&(a=0)),s=parseInt(this.container.find(".right .minuteselect").val(),10),isNaN(s)&&(s=parseInt(this.container.find(".right .minuteselect option:last").val(),10)),n=this.timePickerSeconds?parseInt(this.container.find(".right .secondselect").val(),10):0,o=o.clone().hour(a).minute(s).second(n)),this.setEndDate(o.clone()),this.autoApply&&(this.calculateChosenLabel(),this.clickApply())}this.singleDatePicker&&(this.setEndDate(this.startDate),!this.timePicker&&this.autoApply&&this.clickApply()),this.updateView(),t.stopPropagation()}},calculateChosenLabel:function(){var t,e=!0,a=0;for(t in this.ranges){if(this.timePicker){var i=this.timePickerSeconds?"YYYY-MM-DD HH:mm:ss":"YYYY-MM-DD HH:mm";if(this.startDate.format(i)==this.ranges[t][0].format(i)&&this.endDate.format(i)==this.ranges[t][1].format(i)){e=!1,this.chosenLabel=this.container.find(".ranges li:eq("+a+")").addClass("active").attr("data-range-key");break}}else if(this.startDate.format("YYYY-MM-DD")==this.ranges[t][0].format("YYYY-MM-DD")&&this.endDate.format("YYYY-MM-DD")==this.ranges[t][1].format("YYYY-MM-DD")){e=!1,this.chosenLabel=this.container.find(".ranges li:eq("+a+")").addClass("active").attr("data-range-key");break}a++}e&&(this.showCustomRangeLabel?this.chosenLabel=this.container.find(".ranges li:last").addClass("active").attr("data-range-key"):this.chosenLabel=null,this.showCalendars())},clickApply:function(t){this.hide(),this.element.trigger("apply.daterangepicker",this)},clickCancel:function(t){this.startDate=this.oldStartDate,this.endDate=this.oldEndDate,this.hide(),this.element.trigger("cancel.daterangepicker",this)},monthOrYearChanged:function(t){var e=N(t.target).closest(".drp-calendar").hasClass("left"),a=e?"left":"right",t=this.container.find(".drp-calendar."+a),a=parseInt(t.find(".monthselect").val(),10),t=t.find(".yearselect").val();e||(t<this.startDate.year()||t==this.startDate.year()&&a<this.startDate.month())&&(a=this.startDate.month(),t=this.startDate.year()),this.minDate&&(t<this.minDate.year()||t==this.minDate.year()&&a<this.minDate.month())&&(a=this.minDate.month(),t=this.minDate.year()),this.maxDate&&(t>this.maxDate.year()||t==this.maxDate.year()&&a>this.maxDate.month())&&(a=this.maxDate.month(),t=this.maxDate.year()),e?(this.leftCalendar.month.month(a).year(t),this.linkedCalendars&&(this.rightCalendar.month=this.leftCalendar.month.clone().add(1,"month"))):(this.rightCalendar.month.month(a).year(t),this.linkedCalendars&&(this.leftCalendar.month=this.rightCalendar.month.clone().subtract(1,"month"))),this.updateCalendars()},timeChanged:function(t){var e=N(t.target).closest(".drp-calendar"),a=e.hasClass("left"),i=parseInt(e.find(".hourselect").val(),10),s=parseInt(e.find(".minuteselect").val(),10);isNaN(s)&&(s=parseInt(e.find(".minuteselect option:last").val(),10));var n,t=this.timePickerSeconds?parseInt(e.find(".secondselect").val(),10):0;this.timePicker24Hour||("PM"===(e=e.find(".ampmselect").val())&&i<12&&(i+=12),"AM"===e&&12===i&&(i=0)),a?((n=this.startDate.clone()).hour(i),n.minute(s),n.second(t),this.setStartDate(n),this.singleDatePicker?this.endDate=this.startDate.clone():this.endDate&&this.endDate.format("YYYY-MM-DD")==n.format("YYYY-MM-DD")&&this.endDate.isBefore(n)&&this.setEndDate(n.clone())):this.endDate&&((n=this.endDate.clone()).hour(i),n.minute(s),n.second(t),this.setEndDate(n)),this.updateCalendars(),this.updateFormInputs(),this.renderTimePicker("left"),this.renderTimePicker("right")},elementChanged:function(){var t,e,a;this.element.is("input")&&this.element.val().length&&(a=e=null,2===(t=this.element.val().split(this.locale.separator)).length&&(e=L(t[0],this.locale.format),a=L(t[1],this.locale.format)),!this.singleDatePicker&&null!==e&&null!==a||(a=e=L(this.element.val(),this.locale.format)),e.isValid()&&a.isValid()&&(this.setStartDate(e),this.setEndDate(a),this.updateView()))},keydown:function(t){9!==t.keyCode&&13!==t.keyCode||this.hide(),27===t.keyCode&&(t.preventDefault(),t.stopPropagation(),this.hide())},updateElement:function(){var t;this.element.is("input")&&this.autoUpdateInput&&(t=this.startDate.format(this.locale.format),this.singleDatePicker||(t+=this.locale.separator+this.endDate.format(this.locale.format)),t!==this.element.val()&&this.element.val(t).trigger("change"))},remove:function(){this.container.remove(),this.element.off(".daterangepicker"),this.element.removeData()}},N.fn.daterangepicker=function(t,e){var a=N.extend(!0,{},N.fn.daterangepicker.defaultOptions,t);return this.each(function(){var t=N(this);t.data("daterangepicker")&&t.data("daterangepicker").remove(),t.data("daterangepicker",new i(t,a,e))}),this},i});