vendor: 5,199 bytes, lines 1-27
1(function(root,factory){if(typeof define==='function'&&define.amd){define(['moment','jquery'],function(moment,jquery){if(!jquery.fn)jquery.fn={};if(typeof moment!=='function'&&moment.hasOwnProperty('default'))moment=moment['default'] 2return factory(moment,jquery);});}else if(typeof module==='object'&&module.exports){var jQuery=(typeof window!='undefined')?window.jQuery:undefined;if(!jQuery){jQuery=require('jquery');if(!jQuery.fn)jQuery.fn={};} 3var moment=(typeof window!='undefined'&&typeof window.moment!='undefined')?window.moment:require('moment');module.exports=factory(moment,jQuery);}else{root.daterangepicker=factory(root.moment,root.jQuery);}}(typeof window!=='undefined'?window:this,function(moment,$){var DateRangePicker=function(element,options,cb){this.parentEl='body';this.element=$(element);this.startDate=moment().startOf('day');this.endDate=moment().endOf('day');this.minDate=false;this.maxDate=false;this.maxSpan=false;this.autoApply=false;this.singleDatePicker=false;this.showDropdowns=false;this.minYear=moment().subtract(100,'year').format('YYYY');this.maxYear=moment().add(100,'year').format('YYYY');this.showWeekNumbers=false;this.showISOWeekNumbers=false;this.showCustomRangeLabel=true;this.timePicker=false;this.timePicker24Hour=false;this.timePickerIncrement=1;this.timePickerSeconds=false;this.linkedCalendars=true;this.autoUpdateInput=true;this.alwaysShowCalendars=false;this.fixedPicker=false;this.ranges={};this.symRange=[];this.symRoom=null;this.symCurrency='';this.symRoomsPerDaySelection=1;this.symRoomsPerDay=1;this.symRangeNoValidMsg='';this.symDisponibilityDays='';this.symDateEndMsg='';this.symErrorOneDaySelectedMsg='';this.symLastErrorMsg='';this.opens='right';if(this.element.hasClass('pull-right')) 4this.opens='left';this.drops='down';if(this.element.hasClass('dropup')) 5this.drops='up';this.buttonClasses='btn btn-sm';this.applyButtonClasses='btn-primary';this.cancelButtonClasses='btn-default';this.locale={direction:'ltr',format:moment.localeData().longDateFormat('L'),separator:' - ',applyLabel:'Apply',cancelLabel:'Cancel',weekLabel:'W',customRangeLabel:'Custom Range',daysOfWeek:moment.weekdaysMin(),monthNames:moment.monthsShort(),firstDay:moment.localeData().firstDayOfWeek()};this.callback=function(){};this.isShowing=false;this.leftCalendar={};this.rightCalendar={};if(typeof options!=='object'||options===null) 6options={};options=$.extend(this.element.data(),options);if(typeof options.template!=='string'&&!(options.template instanceof $)) 7options.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=(options.parentEl&&$(options.parentEl).length)?$(options.parentEl):$(this.parentEl);this.container=$(options.template).appendTo(this.parentEl);if(typeof options.locale==='object'){if(typeof options.locale.direction==='string') 8this.locale.direction=options.locale.direction;if(typeof options.locale.format==='string') 9this.locale.format=options.locale.format;if(typeof options.locale.separator==='string') 10this.locale.separator=options.locale.separator;if(typeof options.locale.daysOfWeek==='object') 11this.locale.daysOfWeek=options.locale.daysOfWeek.slice();if(typeof options.locale.monthNames==='object') 12this.locale.monthNames=options.locale.monthNames.slice();if(typeof options.locale.firstDay==='number') 13this.locale.firstDay=options.locale.firstDay;if(typeof options.locale.applyLabel==='string') 14this.locale.applyLabel=options.locale.applyLabel;if(typeof options.locale.cancelLabel==='string') 15this.locale.cancelLabel=options.locale.cancelLabel;if(typeof options.locale.weekLabel==='string') 16this.locale.weekLabel=options.locale.weekLabel;if(typeof options.locale.customRangeLabel==='string'){var elem=document.createElement('textarea');elem.innerHTML=options.locale.customRangeLabel;var rangeHtml=elem.value;this.locale.customRangeLabel=rangeHtml;}} 17this.container.addClass(this.locale.direction);if(typeof options.startDate==='string') 18this.startDate=moment(options.startDate,this.locale.format);if(typeof options.endDate==='string') 19this.endDate=moment(options.endDate,this.locale.format);if(typeof options.minDate==='string') 20this.minDate=moment(options.minDate,this.locale.format);if(typeof options.maxDate==='string') 21this.maxDate=moment(options.maxDate,this.locale.format);if(typeof options.startDate==='object') 22this.startDate=moment(options.startDate);if(typeof options.endDate==='object') 23this.endDate=moment(options.endDate);if(typeof options.minDate==='object') 24this.minDate=moment(options.minDate);if(typeof options.maxDate==='object') 25this.maxDate=moment(options.maxDate);if(this.minDate&&this.startDate.isBefore(this.minDate)) 26this.startDate=this.minDate.clone();if(this.maxDate&&this.endDate.isAfter(this.maxDate)) 27this.endDate=this.maxDate.clone();
27if(typeof options.applyButtonClasses==='string') 28this.applyButtonClasses=options.applyButtonClasses;if(typeof options.applyClass==='string') 29this.applyButtonClasses=options.applyClass;if(typeof options.cancelButtonClasses==='string') 30this.cancelButtonClasses=options.cancelButtonClasses;if(typeof options.cancelClass==='string') 31this.cancelButtonClasses=options.cancelClass;if(typeof options.maxSpan==='object') 32this.maxSpan=options.maxSpan;if(typeof options.dateLimit==='object') 33this.maxSpan=options.dateLimit;if(typeof options.opens==='string') 34this.opens=options.opens;if(typeof options.drops==='string') 35this.drops=options.drops;if(typeof options.showWeekNumbers==='boolean') 36this.showWeekNumbers=options.showWeekNumbers;if(typeof options.showISOWeekNumbers==='boolean') 37this.showISOWeekNumbers=options.showISOWeekNumbers;if(typeof options.buttonClasses==='string') 38this.buttonClasses=options.buttonClasses;if(typeof options.buttonClasses==='object') 39this.buttonClasses=options.buttonClasses.join(' ');if(typeof options.showDropdowns==='boolean') 40this.showDropdowns=options.showDropdowns;if(typeof options.minYear==='number') 41this.minYear=options.minYear;if(typeof options.maxYear==='number') 42this.maxYear=options.maxYear;if(typeof options.showCustomRangeLabel==='boolean') 43this.showCustomRangeLabel=options.showCustomRangeLabel;if(typeof options.singleDatePicker==='boolean'){this.singleDatePicker=options.singleDatePicker;if(this.singleDatePicker) 44this.endDate=this.startDate.clone();} 45if(typeof options.timePicker==='boolean') 46this.timePicker=options.timePicker;if(typeof options.timePickerSeconds==='boolean') 47this.timePickerSeconds=options.timePickerSeconds;if(typeof options.timePickerIncrement==='number') 48this.timePickerIncrement=options.timePickerIncrement;if(typeof options.timePicker24Hour==='boolean') 49this.timePicker24Hour=options.timePicker24Hour;if(typeof options.autoApply==='boolean') 50this.autoApply=options.autoApply;if(typeof options.autoUpdateInput==='boolean') 51this.autoUpdateInput=options.autoUpdateInput;if(typeof options.linkedCalendars==='boolean') 52this.linkedCalendars=options.linkedCalendars;if(typeof options.isInvalidDate==='function') 53this.isInvalidDate=options.isInvalidDate;if(typeof options.isCustomDate==='function')
vendor: 5,076 bytes, lines 54-87
54this.isCustomDate=options.isCustomDate;if(typeof options.alwaysShowCalendars==='boolean') 55this.alwaysShowCalendars=options.alwaysShowCalendars;if(typeof options.fixedPicker==='boolean') 56this.fixedPicker=options.fixedPicker;if(typeof options.symCurrency==='string') 57this.symCurrency=options.symCurrency;if(typeof options.symRoom==='object'){this.symRoom=options.symRoom;} 58if(typeof options.symRangeNoValidMsg==='string'){this.symRangeNoValidMsg=options.symRangeNoValidMsg;} 59if(typeof options.symDisponibilityDays==='string'){this.symDisponibilityDays=options.symDisponibilityDays;} 60if(typeof options.symDateEndMsg==='string'){this.symDateEndMsg=options.symDateEndMsg;} 61if(typeof options.symErrorOneDaySelectedMsg==='string'){this.symErrorOneDaySelectedMsg=options.symErrorOneDaySelectedMsg;} 62if(this.locale.firstDay!=0){var iterator=this.locale.firstDay;while(iterator>0){this.locale.daysOfWeek.push(this.locale.daysOfWeek.shift());iterator--;}} 63var start,end,range;if(typeof options.startDate==='undefined'&&typeof options.endDate==='undefined'){if($(this.element).is(':text')){var val=$(this.element).val(),split=val.split(this.locale.separator);start=end=null;if(split.length==2){start=moment(split[0],this.locale.format);end=moment(split[1],this.locale.format);}else if(this.singleDatePicker&&val!==""){start=moment(val,this.locale.format);end=moment(val,this.locale.format);} 64if(start!==null&&end!==null){this.setStartDate(start);this.setEndDate(end);}}} 65if(typeof options.ranges==='object'){for(range in options.ranges){if(typeof options.ranges[range][0]==='string') 66start=moment(options.ranges[range][0],this.locale.format);else 67start=moment(options.ranges[range][0]);if(typeof options.ranges[range][1]==='string') 68end=moment(options.ranges[range][1],this.locale.format);else 69end=moment(options.ranges[range][1]);if(this.minDate&&start.isBefore(this.minDate)) 70start=this.minDate.clone();var maxDate=this.maxDate;if(this.maxSpan&&maxDate&&start.clone().add(this.maxSpan).isAfter(maxDate)) 71maxDate=start.clone().add(this.maxSpan);if(maxDate&&end.isAfter(maxDate)) 72end=maxDate.clone();if((this.minDate&&end.isBefore(this.minDate,this.timepicker?'minute':'day'))||(maxDate&&start.isAfter(maxDate,this.timepicker?'minute':'day'))) 73continue;var elem=document.createElement('textarea');elem.innerHTML=range;var rangeHtml=elem.value;this.ranges[rangeHtml]=[start,end];} 74var list='<ul>';for(range in this.ranges){list+='<li data-range-key="'+range+'">'+range+'</li>';} 75if(this.showCustomRangeLabel){list+='<li data-range-key="'+this.locale.customRangeLabel+'">'+this.locale.customRangeLabel+'</li>';} 76list+='</ul>';this.container.find('.ranges').prepend(list);} 77if(typeof cb==='function'){this.callback=cb;} 78if(!this.timePicker){this.startDate=this.startDate.startOf('day');this.endDate=this.endDate.endOf('day');this.container.find('.calendar-time').hide();} 79if(this.timePicker&&this.autoApply) 80this.autoApply=false;if(this.autoApply){this.container.addClass('auto-apply');} 81if(this.fixedPicker) 82this.container.addClass('fixed-picker');if(typeof options.ranges==='object') 83this.container.addClass('show-ranges');if(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();if(!this.timePicker&&this.autoApply){this.container.addClass('auto-apply');}} 84if((typeof options.ranges==='undefined'&&!this.singleDatePicker)||this.alwaysShowCalendars){this.container.addClass('show-calendar');} 85this.container.addClass('opens'+this.opens);this.container.find('.applyBtn, .cancelBtn').addClass(this.buttonClasses);if(this.applyButtonClasses.length) 86this.container.find('.applyBtn').addClass(this.applyButtonClasses);if(this.cancelButtonClasses.length) 87this.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',$.proxy(this.clickPrev,this)).on('click.daterangepicker','.next',$.proxy(this.clickNext,this)).on('mousedown.daterangepicker','td.available',$.proxy(this.clickDate,this)).on('mouseenter.daterangepicker','td.available',$.proxy(this.hoverDate,this)).on('change.daterangepicker','select.yearselect',$.proxy(this.monthOrYearChanged,this)).on('change.daterangepicker','select.monthselect',$.proxy(this.monthOrYearChanged,this)).on('change.daterangepicker','select.hourselect,select.minuteselect,select.secondselect,select.ampmselect',$.proxy(this.timeChanged,this));this.container.find('.ranges').on('click.daterangepicker','li',$.proxy(this.clickRange,this));this.container.find('.drp-buttons').on('click.daterangepicker','button.applyBtn',$.proxy(this.clickApply,this)).on('click.daterangepicker','button.cancelBtn',$.proxy(this.clickCancel,this));if(this.fixedPicker){this.show();}else if(this.element.is('input')||this.element.is('button')){this.element.on({'click.daterangepicker':$.proxy(this.show,this),'focu
87s.daterangepicker':$.proxy(this.show,this),'keyup.daterangepicker':$.proxy(this.elementChanged,this),'keydown.daterangepicker':$.proxy(this.keydown,this)});}else{this.element.on('click.daterangepicker',$.proxy(this.toggle,this));this.element.on('keydown.daterangepicker',$.proxy(this.toggle,this));} 88this.updateElement();};DateRangePicker.prototype={constructor:DateRangePicker,invalidateCurrentRange:function(){this.symRange=[];this.startDate=this.iniStartDate;this.endDate=this.iniStartDate;return;},updateCurrentRoomsStock:function(){console.log(this.symRange);const isFirstDateInRangeExitDay=this.symRange&&this.symRange.length&&this.symRange[0].currentDayRoom.exit_day;if(isFirstDateInRangeExitDay){this.invalidateCurrentRange();} 89const forbiddenDates=this.symRange.map(range=>typeof range.currentDayRoom==='undefined'||(range.currentDayRoom&&(range.currentDayRoom.product_stock)===0));if(!this.symRoom||forbiddenDates.some(e=>e===true)){this.invalidateCurrentRange();} 90for(const[key,value]of Object.entries(this.symRoom.variants_simple)){this.symRoom.variants_simple[key].rooms_sold=0;} 91if(this.symRange.length){const currentDays=this.symRange.map(range=>range.currentDayRoom);currentDays.forEach(day=>{if(day){this.symRoom.variants_simple[day.day].rooms_sold=this.symRoomsPerDaySelection;}});}},setStartDate:function(startDate){if(typeof startDate==='string') 92this.startDate=moment(startDate,this.locale.format);if(typeof startDate==='object') 93this.startDate=moment(startDate);if(!this.timePicker) 94this.startDate=this.startDate.startOf('day');if(this.timePicker&&this.timePickerIncrement) 95this.startDate.minute(Math.round(this.startDate.minute()/this.timePickerIncrement)*this.timePickerIncrement);if(this.minDate&&this.startDate.isBefore(this.minDate)){this.startDate=this.minDate.clone();if(this.timePicker&&this.timePickerIncrement) 96this.startDate.minute(Math.round(this.startDate.minute()/this.timePickerIncrement)*this.timePickerIncrement);} 97if(this.maxDate&&this.startDate.isAfter(this.maxDate)){this.startDate=this.maxDate.clone();if(this.timePicker&&this.timePickerIncrement) 98this.startDate.minute(Math.floor(this.startDate.minute()/this.timePickerIncrement)*this.timePickerIncrement);} 99if(!this.isShowing) 100this.updateElement();this.updateMonthsInView();},setEndDate:function(endDate){if(typeof endDate==='string') 101this.endDate=moment(endDate,this.locale.format);if(typeof endDate==='object') 102this.endDate=moment(endDate);if(!this.timePicker) 103this.endDate=this.endDate.endOf('day');if(this.timePicker&&this.timePickerIncrement) 104this.endDate.minute(Math.round(this.endDate.minute()/this.timePickerIncrement)*this.timePickerIncrement);if(this.endDate.isBefore(this.startDate)) 105this.endDate=this.startDate.clone();if(this.maxDate&&this.endDate.isAfter(this.maxDate)) 106this.endDate=this.maxDate.clone();if(this.maxSpan&&this.startDate.clone().add(this.maxSpan).isBefore(this.endDate)) 107this.endDate=this.startDate.clone().add(this.maxSpan);this.previousRightTime=this.endDate.clone();this.updateSelectionWithTotals();if(!this.isShowing) 108this.updateElement();this.updateMonthsInView();},isInvalidDate:function(){return false;},isCustomDate:function(){return false;},updateSelectionWithTotals:function(){const startSelectedDate=this.startDate.clone();const endSelectedDate=this.endDate.clone();if(this.symRoom&&this.symRange){const validRangeDates=this.symRange.map(range=>!!range.currentDayRoom);const hasInvalidDates=validRangeDates.some(validDate=>!validDate);if(endSelectedDate.diff(startSelectedDate,'days')<1){this.userMessage=this.sym
vendor: 6,741 bytes, lines 108-133
108LastErrorMsg;if(this.getSymRoomDataByDate(endSelectedDate.format('YYYY-MM-DD'))){this.userMessage=this.symErrorOneDaySelectedMsg;} 109this.container.find('.drp-selected').html(this.userMessage).css('color','red');return;} 110if(hasInvalidDates){this.symLastErrorMsg=this.symRangeNoValidMsg;this.container.find('.drp-selected').html(this.symRangeNoValidMsg).css('color','red');this.invalidateCurrentRange();return;} 111const rangeWithNoStock=this.symRange.filter(range=>range.currentDayRoom.product_stock===0);if(rangeWithNoStock.length>0){this.symLastErrorMsg=this.symRangeNoValidMsg;this.container.find('.drp-selected').html(this.symRangeNoValidMsg).css('color','red');this.invalidateCurrentRange();return;}}else{this.symLastErrorMsg='';this.container.find('.drp-selected').html('').css('color','red');return;} 112this.symLastErrorMsg='';this.container.find('.drp-selected').html(startSelectedDate.format(this.locale.format)+this.locale.separator+endSelectedDate.format(this.locale.format)).css('color','');},updateView:function(){if(this.timePicker){this.renderTimePicker('left');this.renderTimePicker('right');if(!this.endDate){this.container.find('.right .calendar-time select').prop('disabled',true).addClass('disabled');}else{this.container.find('.right .calendar-time select').prop('disabled',false).removeClass('disabled');}} 113if(this.endDate) 114this.updateSelectionWithTotals();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;} 115this.leftCalendar.month=this.startDate.clone().date(2);if(!this.linkedCalendars&&(this.endDate.month()!=this.startDate.month()||this.endDate.year()!=this.startDate.year())){this.rightCalendar.month=this.endDate.clone().date(2);}else{this.rightCalendar.month=this.startDate.clone().date(2).add(1,'month');}}else{if(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');}} 116if(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(){if(this.timePicker){var hour,minute,second;if(this.endDate){hour=parseInt(this.container.find('.left .hourselect').val(),10);minute=parseInt(this.container.find('.left .minuteselect').val(),10);if(isNaN(minute)){minute=parseInt(this.container.find('.left .minuteselect option:last').val(),10);} 117second=this.timePickerSeconds?parseInt(this.container.find('.left .secondselect').val(),10):0;if(!this.timePicker24Hour){var ampm=this.container.find('.left .ampmselect').val();if(ampm==='PM'&&hour<12) 118hour+=12;if(ampm==='AM'&&hour===12) 119hour=0;}}else{hour=parseInt(this.container.find('.right .hourselect').val(),10);minute=parseInt(this.container.find('.right .minuteselect').val(),10);if(isNaN(minute)){minute=parseInt(this.container.find('.right .minuteselect option:last').val(),10);} 120second=this.timePickerSeconds?parseInt(this.container.find('.right .secondselect').val(),10):0;if(!this.timePicker24Hour){var ampm=this.container.find('.right .ampmselect').val();if(ampm==='PM'&&hour<12) 121hour+=12;if(ampm==='AM'&&hour===12) 122hour=0;}} 123this.leftCalendar.month.hour(hour).minute(minute).second(second);this.rightCalendar.month.hour(hour).minute(minute).second(second);} 124this.renderCalendar('left');this.renderCalendar('right');this.container.find('.ranges li').removeClass('active');if(this.endDate==null)return;this.calculateChosenLabel();},renderCalendar:function(side){this.updateCurrentRoomsStock();var calendar=side=='left'?this.leftCalendar:this.rightCalendar;var month=calendar.month.month();var year=calendar.month.year();var hour=calendar.month.hour();var minute=calendar.month.minute();var second=calendar.month.second();var daysInMonth=moment([year,month]).daysInMonth();var firstDay=moment([year,month,1]);var lastDay=moment([year,month,daysInMonth]);var lastMonth=moment(firstDay).subtract(1,'month').month();var lastYear=moment(firstDay).subtract(1,'month').year();var daysInLastMonth=moment([lastYear,lastMonth]).daysInMonth();var dayOfWeek=firstDay.day();var calendar=[];calendar.firstDay=firstDay;calendar.lastDay=lastDay;for(var i=0;i<6;i++){calendar[i]=[];} 125var startDay=daysInLastMonth-dayOfWeek+this.locale.firstDay+1;if(startDay>daysInLastMonth) 126startDay-=7;if(dayOfWeek==this.locale.firstDay) 127startDay=daysInLastMonth-6;var curDate=moment([lastYear,lastMonth,startDay,12,minute,second]);var col,row;for(var i=0,col=0,row=0;i<42;i++,col++,curDate=moment(curDate).add(24,'hour')){if(i>0&&col%7===0){col=0;row++;} 128calendar[row][col]=curDate.clone().hour(hour).minute(minute).second(second);curDate.hour(12);if(this.minDate&&calendar[row][col].format('YYYY-MM-DD')==this.minDate.format('YYYY-MM-DD')&&calendar[row][col].isBefore(this.minDate)&&side=='left'){calendar[row][col]=this.minDate.clone();} 129if(this.maxDate&&calendar[row][col].format('YYYY-MM-DD')==this.maxDate.format('YYYY-MM-DD')&&calendar[row][col].isAfter(this.maxDate)&&side=='right'){calendar[row][col]=this.maxDate.clone();}} 130if(side=='left'){this.leftCalendar.calendar=calendar;}else{this.rightCalendar.calendar=calendar;} 131var minDate=side=='left'?this.minDate:this.startDate;var maxDate=this.maxDate;var selected=side=='left'?this.startDate:this.endDate;var arrow=this.locale.direction=='ltr'?{left:'chevron-left',right:'chevron-right'}:{left:'chevron-right',right:'chevron-left'};var html='<table class="table-condensed">';html+='<thead>';html+='<tr>';if(this.showWeekNumbers||this.showISOWeekNumbers) 132html+='<th></th>';if((!minDate||minDate.isBefore(calendar.firstDay))&&(!this.linkedCalendars||side=='left')){html+='<th class="prev available"><span></span></th>';}else{html+='<th></th>';} 133var dateHtml=this.locale.monthNames[calendar[1][1].month()]+calendar[1][1].format(" YYYY");if(this.showDropdowns){var currentMonth=calendar[1][1].month();var currentYear=calendar[1][1].year();var maxYear=(maxDate&&maxDate.year())||(this.maxYear);var minYear=(minDate&&minDate.year())||(this.minYear);var inMinYear=currentYear==minYear;var inMaxYear=currentYear==maxYear;var monthHtml='<select class="monthselect">';
133for(var m=0;m<12;m++){if((!inMinYear||(minDate&&m>=minDate.month()))&&(!inMaxYear||(maxDate&&m<=maxDate.month()))){monthHtml+="<option value='"+m+"'"+ 134(m===currentMonth?" selected='selected'":"")+">"+this.locale.monthNames[m]+"</option>";}else{monthHtml+="<option value='"+m+"'"+ 135(m===currentMonth?" selected='selected'":"")+" disabled='disabled'>"+this.locale.monthNames[m]+"</option>";}} 136monthHtml+="</select>";var yearHtml='<select class="yearselect">';for(var y=minYear;y<=maxYear;y++){yearHtml+='<option value="'+y+'"'+ 137(y===currentYear?' selected="selected"':'')+'>'+y+'</option>';} 138yearHtml+='</select>';dateHtml=monthHtml+yearHtml;} 139html+='<th colspan="5" class="month">'+dateHtml+'</th>';if((!maxDate||maxDate.isAfter(calendar.lastDay))&&(!this.linkedCalendars||side=='right'||this.singleDatePicker)){html+='<th class="next available"><span></span></th>';}else{html+='<th></th>';} 140html+='</tr>';html+='<tr>';if(this.showWeekNumbers||this.showISOWeekNumbers) 141html+='<th class="week">'+this.locale.weekLabel+'</th>';$.each(this.locale.daysOfWeek,function(index,dayOfWeek){html+='<th>'+dayOfWeek+'</th>';});html+='</tr>';html+='</thead>';html+='<tbody>';if(this.endDate==null&&this.maxSpan){var maxLimit=this.startDate.clone().add(this.maxSpan).endOf('day');if(!maxDate||maxLimit.isBefore(maxDate)){maxDate=maxLimit;}} 142for(var row=0;row<6;row++){html+='<tr>';if(this.showWeekNumbers) 143html+='<td class="week">'+calendar[row][0].week()+'</td>';else if(this.showISOWeekNumbers) 144html+='<td class="week">'+calendar[row][0].isoWeek()+'</td>';for(var col=0;col<7;col++){var classes=[];if(calendar[row][col].isSame(new Date(),"day")) 145classes.push('today');if(calendar[row][col].isoWeekday()>5) 146classes.push('weekend');if(calendar[row][col].month()!=calendar[1][1].month()) 147classes.push('off','ends');if(this.minDate&&calendar[row][col].isBefore(this.minDate,'day')) 148classes.push('off','disabled');if(maxDate&&calendar[row][col].isAfter(maxDate,'day')) 149classes.push('off','disabled');if(this.isInvalidDate(calendar[row][col])) 150classes.push('off','disabled');if(calendar[row][col].format('YYYY-MM-DD')==this.startDate.format('YYYY-MM-DD')){classes.push('active','start-date','sym-room');} 151if(this.endDate!=null&&calendar[row][col].format('YYYY-MM-DD')==this.endDate.format('YYYY-MM-DD')){classes.push('active','end-date','sym-room');} 152if(this.endDate!=null&&calendar[row][col]>this.startDate&&calendar[row][col]<this.endDate){classes.push('in-range','sym-room');} 153var isCustom=this.isCustomDate(calendar[row][col]);if(isCustom!==false){if(typeof isCustom==='string') 154classes.push(isCustom);else 155Array.prototype.push.apply(classes,isCustom);} 156var cname='',disabled=false;for(var i=0;i<classes.length;i++){cname+=classes[i]+' ';if(classes[i]=='disabled') 157disabled=true;} 158if(!disabled) 159cname+='available';const currentDate=calendar[row][col];let currentDayDate=currentDate.date();let tooltipDays='';const currentRoom=this.getSymRoomDataByDate(currentDate.format('YYYY-MM-DD'))||null;if(this.symRoom&¤tRoom){let isExitDummyDay=currentRoom.product_id===0;if(currentRoom&¤tRoom.product_stock>0){const dataTitle='data-title="'+'r'+row+'c'+col+'"';const cnameClasses=' '+cname.replace(/^\\s+|\\s+$/g,'');const itemAttr='class="sym-date-flex '+cnameClasses+'" '+dataTitle;const priceString=currentRoom.product_price.toString();const priceLength=priceString.includes('.')?priceString.split('.')[0].length:priceString.length;currentRoom.productReducedPrice=(priceLength>6)?(currentRoom.product_price/1000000).toFixed(0)+'M':currentRoom.product_price.toFixed(2);let currentPrice=currentRoom.productReducedPrice+this.symCurrency;let symClass=(currentPrice.length>6)?' sym-price-min':' sym-price';if(currentRoom.product_stock>0&¤tRoom.product_stock<999){const tooltipPrice=currentRoom.product_price.toFixed(2)+' '+this.symCurrency;tooltipDays=' data-label="'+this.symDisponibilityDays+':'+currentRoom.product_stock+' ('+tooltipPrice+')" data-days="'+currentRoom.product_stock+'" ';} 160if(isExitDummyDay){currentPrice=' ';symClass+=' dummy-date';cname+=' exit-day ';} 161if(cname.includes('off')){symClass+=' off'} 162if(cname.includes('end-date')&&!cname.includes('start-date')){currentPrice
vendor: 8,983 bytes, lines 162-197
162=this.symDateEndMsg;} 163currentDayDate='<div '+itemAttr+'>'+'<span class="'+cnameClasses+'" '+dataTitle+'>'+currentDate.date()+'</span>'+'<span class="'+symClass+cnameClasses+'" '+dataTitle+'>'+currentPrice+'</span>'+'</div>';}else{cname=cname.replace('available','no-room');}}else{cname=cname.replace('available','no-room');} 164html+='<td class="'+cname.replace(/^\s+|\s+$/g,'')+'" '+tooltipDays+' data-title="'+'r'+row+'c'+col+'">'+currentDayDate+'</td>';} 165html+='</tr>';} 166html+='</tbody>';html+='</table>';this.container.find('.drp-calendar.'+side+' .calendar-table').html(html);},renderTimePicker:function(side){if(side=='right'&&!this.endDate)return;var html,selected,minDate,maxDate=this.maxDate;if(this.maxSpan&&(!this.maxDate||this.startDate.clone().add(this.maxSpan).isBefore(this.maxDate))) 167maxDate=this.startDate.clone().add(this.maxSpan);if(side=='left'){selected=this.startDate.clone();minDate=this.minDate;}else if(side=='right'){selected=this.endDate.clone();minDate=this.startDate;var timeSelector=this.container.find('.drp-calendar.right .calendar-time');if(timeSelector.html()!=''){selected.hour(!isNaN(selected.hour())?selected.hour():timeSelector.find('.hourselect option:selected').val());selected.minute(!isNaN(selected.minute())?selected.minute():timeSelector.find('.minuteselect option:selected').val());selected.second(!isNaN(selected.second())?selected.second():timeSelector.find('.secondselect option:selected').val());if(!this.timePicker24Hour){var ampm=timeSelector.find('.ampmselect option:selected').val();if(ampm==='PM'&&selected.hour()<12) 168selected.hour(selected.hour()+12);if(ampm==='AM'&&selected.hour()===12) 169selected.hour(0);}} 170if(selected.isBefore(this.startDate)) 171selected=this.startDate.clone();if(maxDate&&selected.isAfter(maxDate)) 172selected=maxDate.clone();} 173html='<select class="hourselect">';var start=this.timePicker24Hour?0:1;var end=this.timePicker24Hour?23:12;for(var i=start;i<=end;i++){var i_in_24=i;if(!this.timePicker24Hour) 174i_in_24=selected.hour()>=12?(i==12?12:i+12):(i==12?0:i);var time=selected.clone().hour(i_in_24);var disabled=false;if(minDate&&time.minute(59).isBefore(minDate)) 175disabled=true;if(maxDate&&time.minute(0).isAfter(maxDate)) 176disabled=true;if(i_in_24==selected.hour()&&!disabled){html+='<option value="'+i+'" selected="selected">'+i+'</option>';}else if(disabled){html+='<option value="'+i+'" disabled="disabled" class="disabled">'+i+'</option>';}else{html+='<option value="'+i+'">'+i+'</option>';}} 177html+='</select> ';html+=': <select class="minuteselect">';for(var i=0;i<60;i+=this.timePickerIncrement){var padded=i<10?'0'+i:i;var time=selected.clone().minute(i);var disabled=false;if(minDate&&time.second(59).isBefore(minDate)) 178disabled=true;if(maxDate&&time.second(0).isAfter(maxDate)) 179disabled=true;if(selected.minute()==i&&!disabled){html+='<option value="'+i+'" selected="selected">'+padded+'</option>';}else if(disabled){html+='<option value="'+i+'" disabled="disabled" class="disabled">'+padded+'</option>';}else{html+='<option value="'+i+'">'+padded+'</option>';}} 180html+='</select> ';if(this.timePickerSeconds){html+=': <select class="secondselect">';for(var i=0;i<60;i++){var padded=i<10?'0'+i:i;var time=selected.clone().second(i);var disabled=false;if(minDate&&time.isBefore(minDate)) 181disabled=true;if(maxDate&&time.isAfter(maxDate)) 182disabled=true;if(selected.second()==i&&!disabled){html+='<option value="'+i+'" selected="selected">'+padded+'</option>';}else if(disabled){html+='<option value="'+i+'" disabled="disabled" class="disabled">'+padded+'</option>';}else{html+='<option value="'+i+'">'+padded+'</option>';}} 183html+='</select> ';} 184if(!this.timePicker24Hour){html+='<select class="ampmselect">';var am_html='';var pm_html='';if(minDate&&selected.clone().hour(12).minute(0).second(0).isBefore(minDate)) 185am_html=' disabled="disabled" class="disabled"';if(maxDate&&selected.clone().hour(0).minute(0).second(0).isAfter(maxDate)) 186pm_html=' disabled="disabled" class="disabled"';if(selected.hour()>=12){html+='<option value="AM"'+am_html+'>AM</option><option value="PM" selected="selected"'+pm_html+'>PM</option>';}else{html+='<option value="AM" selected="selected"'+am_html+'>AM</option><option value="PM"'+pm_html+'>PM</option>';} 187html+='</select>';} 188this.container.find('.drp-calendar.'+side+' .calendar-time').html(html);},updateFormInputs:function(){if(this.singleDatePicker||(this.endDate&&(this.startDate.isBefore(this.endDate)||this.startDate.isSame(this.endDate)))){this.container.find('button.applyBtn').prop('disabled',false);}else{this.container.find('button.applyBtn').prop('disabled',true);}},move:function(){var parentOffset={top:0,left:0},containerTop,drops=this.drops;var parentRightEdge=$(window).width();if(!this.parentEl.is('body')){parentOffset={top:this.parentEl.offset().top-this.parentEl.scrollTop(),left:this.parentEl.offset().left-this.parentEl.scrollLeft()};parentRightEdge=this.parentEl[0].clientWidth+this.parentEl.offset().left;} 189switch(drops){case'auto':containerTop=this.element.offset().top+this.element.outerHeight()-parentOffset.top;if(containerTop+this.container.outerHeight()>=this.parentEl[0].scrollHeight){containerTop=this.element.offset().top-this.container.outerHeight()-parentOffset.top;drops='up';} 190break;case'up':containerTop=this.element.offset().top-this.container.outerHeight()-parentOffset.top;break;default:containerTop=this.element.offset().top+this.element.outerHeight()-parentOffset.top;break;} 191this.container.css({top:0,left:0,right:'auto'});var containerWidth=this.container.outerWidth();this.container.toggleClass('drop-up',drops=='up');if(this.fixedPicker){this.container.offset(parentOffset);this.container.css('position','inherit');}else if(this.opens=='left'){var containerRight=parentRightEdge-this.element.offset().left-this.element.outerWidth();if(containerWidth+containerRight>$(window).width()){this.container.css({top:containerTop,right:'auto',left:9});}else{this.container.css({top:containerTop,right:containerRight,left:'auto'});}}else if(this.opens=='center'){var containerLeft=this.element.offset().left-parentOffset.left+this.element.outerWidth()/2 192-containerWidth/2;if(containerLeft<0){this.container.css({top:containerTop,right:'auto',left:9});}else if(containerLeft+containerWidth>$(window).width()){this.container.css({top:containerTop,left:'auto',right:0});}else{this.container.css({top:containerTop,left:containerLeft,right:'auto'});}}else{var containerLeft=this.element.offset().left-parentOffset.left;if(containerLeft+containerWidth>$(window).width()){this.container.css({top:containerTop,left:'auto',right:0});}else{this.container.css({top:containerTop,left:containerLeft,right:'auto'});}}},show:function(e){if(this.isShowing)return;this._outsideClickProxy=$.proxy(function(e){this.outsideClick(e);},this);$(document).on('mousedown.daterangepicker',this._outsideClickProxy).on('touchend.daterangepicker',this._outsideClickProxy).on('click.daterangepicker','[data-toggle=dropdown]',this._outsideClickProxy).on('focusin.daterangepicker',this._outsideClickProxy);$(window).on('resize.daterangepicker',$.proxy(function(e){this.move(e);},this));this.iniStartDate=moment(new Date);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=true;},hide:function(e){if(!this.isShowing)return;if(!this.endDate){this.startDate=this.oldStartDate.clone();this.endDate=this.oldEndDate.clone();} 193if(!this.startDate.isSame(this.oldStartDate)||!this.endDate.isSame(this.oldEndDate)) 194this.callback(this.startDate.clone(),this.endDate.clone(),this.chosenLabel);this.updateElement();$(document).off('.daterangepicker');$(window).off('.daterangepicker');this.container.hide();this.element.trigger('hide.daterangepicker',this);this.isShowing=false;if(this.fixedPicker) 195this.show();},toggle:function(e){if(this.isShowing){this.hide();}else{this.show();}},outsideClick:function(e){var target=$(e.target);if(e.type=="focusin"||target.closest(this.element).length||target.closest(this.container).length||target.closest('.calendar-table').length||this.fixedPicker)return;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(e){var label=e.target.getAttribute('data-range-key');this.chosenLabel=label;if(label==this.locale.customRangeLabel){this.showCalendars();}else{var dates=this.ranges[label];this.startDate=dates[0];this.endDate=dates[1];if(!this.timePicker){this.startDate.startOf('day');this.endDate.endOf('day');} 196if(!this.alwaysShowCalendars) 197this.hideCalendars();this.clickApply();}},clickPrev:function(e){var cal=$(e.target).parents('.drp-calendar');
197if(cal.hasClass('left')){this.leftCalendar.month.subtract(1,'month');if(this.linkedCalendars) 198this.rightCalendar.month.subtract(1,'month');}else{this.rightCalendar.month.subtract(1,'month');} 199this.updateCalendars();},clickNext:function(e){var cal=$(e.target).parents('.drp-calendar');if(cal.hasClass('left')){this.leftCalendar.month.add(1,'month');}else{this.rightCalendar.month.add(1,'month');if(this.linkedCalendars) 200this.leftCalendar.month.add(1,'month');} 201this.updateCalendars();},hoverDate:function(e){if(!$(e.target).hasClass('available'))return;var title=$(e.target).attr('data-title');var row=title.substr(1,1);var col=title.substr(3,1);var cal=$(e.target).parents('.drp-calendar');var date=cal.hasClass('left')?this.leftCalendar.calendar[row][col]:this.rightCalendar.calendar[row][col];var leftCalendar=this.leftCalendar;var rightCalendar=this.rightCalendar;var startDate=this.startDate;if(!this.endDate){this.container.find('.drp-calendar tbody td').each(function(index,el){if($(el).hasClass('week'))return;var title=$(el).attr('data-title');var row=title.substr(1,1);var col=title.substr(3,1);var cal=$(el).parents('.drp-calendar');var dt=cal.hasClass('left')?leftCalendar.calendar[row][col]:rightCalendar.calendar[row][col];if((dt.isAfter(startDate)&&dt.isBefore(date))||dt.isSame(date,'day')){$(el).addClass('in-range');const day=dt.date();}else{$(el).removeClass('in-range');}});}},clickDate:function(e){if(!$(e.target).hasClass('available'))return;var title=$(e.target).attr('data-title');var row=title.substr(1,1);var col=title.substr(3,1);var cal=$(e.target).parents('.drp-calendar');var date=cal.hasClass('left')?this.leftCalendar.calendar[row][col]:this.rightCalendar.calendar[row][col];if(this.endDate||date.isBefore(this.startDate,'day')){if($(e.target).parents('td').hasClass('exit-day')){return;} 202if(this.timePicker){var hour=parseInt(this.container.find('.left .hourselect').val(),10);if(!this.timePicker24Hour){var ampm=this.container.find('.left .ampmselect').val();if(ampm==='PM'&&hour<12) 203hour+=12;if(ampm==='AM'&&hour===12) 204hour=0;} 205var minute=parseInt(this.container.find('.left .minuteselect').val(),10);if(isNaN(minute)){minute=parseInt(this.container.find('.left .minuteselect option:last').val(),10);} 206var second=this.timePickerSeconds?parseInt(this.container.find('.left .secondselect').val(),10):0;date=date.clone().hour(hour).minute(minute).second(second);} 207this.endDate=null;this.setStartDate(date.clone());}else if(!this.endDate&&date.isBefore(this.startDate)){this.setEndDate(this.startDate.clone());}else{if(this.timePicker){var hour=parseInt(this.container.find('.right .hourselect').val(),10);if(!this.timePicker24Hour){var ampm=this.container.find('.right .ampmselect').val();if(ampm==='PM'&&hour<12) 208hour+=12;if(ampm==='AM'&&hour===12) 209hour=0;} 210var minute=parseInt(this.container.find('.right .minuteselect').val(),10);if(isNaN(minute)){minute=parseInt(this.container.find('.right .minuteselect option:last').val(),10);} 211var second=this.timePickerSeconds?parseInt(this.container.find('.right .secondselect').val(),10):0;date=date.clone().hour(hour).minute(minute).second(second);} 212this.setEndDate(date.clone());if(this.autoApply){console.log("autoapply") 213this.calculateChosenLabel();this.clickApply();} 214this.updateSymRangeDates();} 215if(this.singleDatePicker){this.setEndDate(this.startDate);if(!this.timePicker&&this.autoApply) 216this.clickApply();} 217this.updateView();e.stopPropagation();},updateSymRangeDates:function(){const dateStart=moment(new Date(this.startDate));const dateEnd=moment(new Date(this.endDate));if(!this.startDate.isValid()||!this.endDate.isValid()){return;} 218const currDate=dateStart.startOf('day');const lastDate=dateEnd.startOf('day').add(1,'day');this.symRange=[];let hasExitDay=false;do{if(hasExitDay){this.clickCancel();return false;} 219const currentDateFormatted=currDate.format('YYYY-MM-DD') 220const currentDayRoom=this.getSymRoomDataByDate(currentDateFormatted);this.symRange.push({unixDate:currDate.clone().unix(),itemsToPurchase:this.symRoomsPerDaySelection,currentDayRoom:currentDayRoom});hasExitDay=currentDayRoom.hasOwnProperty('exit_day');}while(currDate.add(1,'days').diff(lastDate)<0);this.updateCurrentRoomsStock();this.updateSelectionWithTotals();this.element.trigger('unixrange.rangepicker',this);},getSymRoomDataByDate:function(dateFilter){if(!this.symRoom){return{};} 221const currentRoom=this.symRoom.variants_simple[dateFilter];if(currentRoom){return this.symRoom.variants_simple[dateFilter];} 222return null;},calculateChosenLabel:function(){var customRange=true;var i=0;for(var range in this.ranges){if(this.timePicker){var format=this.timePickerSeconds?"YYYY-MM-DD HH:mm:ss":"YYYY-MM-DD HH:mm";if(this.startDate.format(format)==this.ranges[range][0].format(format)&&this.endDate.format(format)==this.ranges[range][1].format(format)){customRange=false;this.chosenLabel=this.container.find('.ranges li:eq('+i+')').addClass('active').attr('data-range-key');break;}}else{if(this.startDate.format('YYYY-MM-DD')==this.ranges[range][0].format('YYYY-MM-DD')&&this.endDate.format('YYYY-MM-DD')==this.ranges[range][1].format('YYYY-MM-DD')){customRange=false;this.chosenLabel=this.container.find('.ranges li:eq('+i+')').addClass('active').attr('data-range-key');break;}} 223i++;} 224if(customRange){if(this.showCustomRangeLabel){this.chosenLabel=this.container.find('.ranges li:last').addClass('active').attr('data-range-key');}else{this.chosenLabel=null;} 225this.showCalendars();}},clickApply:function(e){this.hide();this.element.trigger('apply.daterangepicker',this);},clickCancel:function(e){this.startDate=this.iniStartDate;this.endDate=this.iniStartDate;this.hide();this.symRange=[];this.element.trigger('unixrange.rangepicker',this);this.element.trigger('cancel.daterangepicker',this);},monthOrYearChanged:function(e){var isLeft=$(e.target).closest('.drp-calendar').hasClass('left'),leftOrRight=isLeft?'left':'right',cal=this.container.find('.drp-calendar.'+leftOrRight);var month=parseInt(cal.find('.monthselect').val(),10);var year=cal.find('.yearselect').val();if(!isLeft){if(year<this.startDate.year()||(year==this.startDate.year()&&month<this.startDate.month())){month=this.startDate.month();year=this.startDate.year();}} 226if(this.minDate){if(year<this.minDate.year()||(year==this.minDate.year()&&month<this.minDate.month())){month=this.minDate.month();year=this.minDate.year();}} 227if(this.maxDate){if(year>this.maxDate.year()||(year==this.maxDate.year()&&month>this.maxDate.month())){month=this.maxDate.month();year=this.maxDate.year();}} 228if(isLeft){this.leftCalendar.month.month(month).year(year);if(this.linkedCalendars) 229this.rightCalendar.month=this.leftCalendar.month.clone().add(1,'month');}else{this.rightCalendar.month.month(month).year(year);if(this.linkedCalendars) 230this.leftCalendar.month=this.rightCalendar.month.clone().subtract(1,'month');} 231this.updateCalendars();},timeChanged:function(e){var cal=$(e.target).closest('.drp-calendar'),isLeft=cal.hasClass('left');var hour=parseInt(cal.find('.hourselect').val(),10);var minute=parseInt(cal.find('.minuteselect').val(),10);if(isNaN(minute)){minute=parseInt(cal.find('.minuteselect option:last').val(),10);} 232var second=this.timePickerSeconds?parseInt(cal.find('.secondselect').val(),10):0;
vendor: 2,162 bytes, lines 232-241
232if(!this.timePicker24Hour){var ampm=cal.find('.ampmselect').val();if(ampm==='PM'&&hour<12) 233hour+=12;if(ampm==='AM'&&hour===12) 234hour=0;} 235if(isLeft){var start=this.startDate.clone();start.hour(hour);start.minute(minute);start.second(second);this.setStartDate(start);if(this.singleDatePicker){this.endDate=this.startDate.clone();}else if(this.endDate&&this.endDate.format('YYYY-MM-DD')==start.format('YYYY-MM-DD')&&this.endDate.isBefore(start)){this.setEndDate(start.clone());}}else if(this.endDate){var end=this.endDate.clone();end.hour(hour);end.minute(minute);end.second(second);this.setEndDate(end);} 236this.updateCalendars();this.updateFormInputs();this.renderTimePicker('left');this.renderTimePicker('right');},elementChanged:function(){if(!this.element.is('input'))return;if(!this.element.val().length)return;var dateString=this.element.val().split(this.locale.separator),start=null,end=null;if(dateString.length===2){start=moment(dateString[0],this.locale.format);end=moment(dateString[1],this.locale.format);} 237if(this.singleDatePicker||start===null||end===null){start=moment(this.element.val(),this.locale.format);end=start;} 238if(!start.isValid()||!end.isValid())return;this.setStartDate(start);this.setEndDate(end);this.updateView();},keydown:function(e){if((e.keyCode===9)||(e.keyCode===13)){this.hide();} 239if(e.keyCode===27){e.preventDefault();e.stopPropagation();this.hide();}},updateElement:function(){if(this.element.is('input')&&this.autoUpdateInput){var newValue=this.startDate.format(this.locale.format);if(!this.singleDatePicker){newValue+=this.locale.separator+this.endDate.format(this.locale.format);} 240if(newValue!==this.element.val()){this.element.val(newValue).trigger('change');}}},remove:function(){this.container.remove();this.element.off('.daterangepicker');this.element.removeData();}};$.fn.daterangepicker=function(options,callback){var implementOptions=$.extend(true,{},$.fn.daterangepicker.defaultOptions,options);this.each(function(){var el=$(this);if(el.data('daterangepicker')) 241el.data('daterangepicker').remove();el.data('daterangepicker',new DateRangePicker(el,implementOptions,callback));});return this;};return DateRangePicker;}));
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.