function FilterItem(){function u(t){typeof t!="undefined"?(n.items.push(t.items[0]),n.selectedValue(t.selectedValue)):(n.items.removeAll(),n.selectedValue(""))}function f(i){if(t=!0,n.items.removeAll(),typeof i!="undefined"&&typeof i.items!="undefined"){for(var r in i.items)n.items.push(i.items[r]);n.selectedValue(i.selectedValue)}t=!1}function e(i){n.selectedValue.subscribe(function(){typeof i=="undefined"||t||i()})}function i(){return n.selectedValue()}function r(t){n.selectedValue(t)}var n={},t;return n.selectedValue=ko.observable(),n.items=ko.observableArray([]),t=!1,n.setSelectedValue=r,n.getSelectedValue=i,{init:u,setItemsAndSelected:f,vm:n,addListener:e,setSelectedValue:r,getSelectedValue:i}}var otherVariantsFacade,otherVariantsFrontModule;(function(n,t){function f(){this._curInst=null;this._keyEvent=!1;this._disabledInputs=[];this._datepickerShowing=!1;this._inDialog=!1;this._mainDivId="ui-datepicker-div";this._inlineClass="ui-datepicker-inline";this._appendClass="ui-datepicker-append";this._triggerClass="ui-datepicker-trigger";this._dialogClass="ui-datepicker-dialog";this._disableClass="ui-datepicker-disabled";this._unselectableClass="ui-datepicker-unselectable";this._currentClass="ui-datepicker-current-day";this._dayOverClass="ui-datepicker-days-cell-over";this._featuredDate="ui-datepicker-featured-date";this.regional=[];this.regional[""]={closeText:"Done",prevText:"Prev",nextText:"Next",currentText:"Today",monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],weekHeader:"Wk",dateFormat:"mm/dd/yy",firstDay:0,isRTL:!1,showMonthAfterYear:!1,yearSuffix:""};this._defaults={showOn:"focus",showAnim:"",showOptions:{},defaultDate:null,appendText:"",buttonText:"...",buttonImage:"",buttonImageOnly:!1,hideIfNoPrevNext:!1,navigationAsDateFormat:!1,gotoCurrent:!1,changeMonth:!1,changeYear:!1,yearRange:"c-10:c+10",showOtherMonths:!1,selectOtherMonths:!1,showWeek:!1,calculateWeek:this.iso8601Week,shortYearCutoff:"+10",minDate:null,maxDate:null,duration:"fast",beforeShowDay:null,beforeShow:null,onSelect:null,onChangeMonthYear:null,onNextMonth:null,onPrevMonth:null,onClose:null,numberOfMonths:1,showCurrentAtPos:0,stepMonths:1,stepBigMonths:12,altField:"",altFormat:"",constrainInput:!0,showButtonPanel:!1,autoSize:!1,disabled:!1,isMainPage:!1,offsetLeft:0,afterGenerateHtml:null};n.extend(this._defaults,this.regional[""]);this.dpDiv=e(n("<div id='"+this._mainDivId+"' class='ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all' tabindex='1'><\/div>"))}function e(t){var i="button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a";return t.delegate(i,"mouseout",function(){n(this).removeClass("ui-state-hover");this.className.indexOf("ui-datepicker-prev")!==-1&&n(this).removeClass("ui-datepicker-prev-hover");this.className.indexOf("ui-datepicker-next")!==-1&&n(this).removeClass("ui-datepicker-next-hover")}).delegate(i,"mouseover",function(){n.otherDatesCalendar._isDisabledDatepicker(u.inline?t.parent()[0]:u.input[0])||(n(this).parents(".ui-datepicker-calendar").find("a").removeClass("ui-state-hover"),n(this).addClass("ui-state-hover"),this.className.indexOf("ui-datepicker-prev")!==-1&&n(this).addClass("ui-datepicker-prev-hover"),this.className.indexOf("ui-datepicker-next")!==-1&&n(this).addClass("ui-datepicker-next-hover"))})}function r(t,i){n.extend(t,i);for(var r in i)i[r]==null&&(t[r]=i[r]);return t}n.extend(n.ui,{otherDatesCalendar:{version:"1.10.3"}});var i="otherDatesCalendar",u;n.extend(f.prototype,{markerClassName:"hasDatepicker",maxRows:4,isOutsideClickClose:!1,_widgetDatepicker:function(){return this.dpDiv},setDefaults:function(n){return r(this._defaults,n||{}),this},_attachDatepicker:function(t,i){var r,f,u;r=t.nodeName.toLowerCase();f=r==="div"||r==="span";t.id||(this.uuid+=1,t.id="dp"+this.uuid);u=this._newInst(n(t),f);u.settings=n.extend({},i||{});r==="input"?this._connectDatepicker(t,u):f&&this._inlineDatepicker(t,u)},_newInst:function(t,i){var r=t[0].id.replace(/([^A-Za-z0-9_\-])/g,"\\\\$1");return{id:r,input:t,selectedDay:0,selectedMonth:0,selectedYear:0,drawMonth:0,drawYear:0,inline:i,dpDiv:i?e(n("<div class='"+this._inlineClass+" ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all' tabindex='1'><\/div>")):this.dpDiv}},_connectDatepicker:function(t,r){var u=n(t);(r.append=n([]),r.trigger=n([]),u.hasClass(this.markerClassName))||(this._attachments(u,r),u.addClass(this.markerClassName).keydown(this._doKeyDown).keypress(this._doKeyPress).keyup(this._doKeyUp),this._autoSize(r),n.data(t,i,r),r.settings.disabled&&this._disableDatepicker(t))},_attachments:function(t,i){var u,r,f,e=this._get(i,"appendText"),o=this._get(i,"isRTL");i.append&&i.append.remove();e&&(i.append=n("<span class='"+this._appendClass+"'>"+e+"<\/span>"),t[o?"before":"after"](i.append));t.unbind("focus",this._showDatepicker);i.trigger&&i.trigger.remove();u=this._get(i,"showOn");(u==="focus"||u==="both")&&t.focus(this._showDatepicker);(u==="button"||u==="both")&&(r=this._get(i,"buttonText"),f=this._get(i,"buttonImage"),i.trigger=n(this._get(i,"buttonImageOnly")?n("<img/>").addClass(this._triggerClass).attr({src:f,alt:r,title:r}):n("<button type='button'><\/button>").addClass(this._triggerClass).html(f?n("<img/>").attr({src:f,alt:r,title:r}):r)),t[o?"before":"after"](i.trigger),i.trigger.click(function(){return n.otherDatesCalendar._datepickerShowing&&n.otherDatesCalendar._lastInput===t[0]?n.otherDatesCalendar._hideDatepicker():n.otherDatesCalendar._datepickerShowing&&n.otherDatesCalendar._lastInput!==t[0]?(n.otherDatesCalendar._hideDatepicker(),n.otherDatesCalendar._showDatepicker(t[0])):n.otherDatesCalendar._showDatepicker(t[0]),!1}))},_autoSize:function(n){if(this._get(n,"autoSize")&&!n.inline){var r,u,f,t,i=new Date(2009,11,20),e=this._get(n,"dateFormat");e.match(/[DM]/)&&(r=function(n){for(u=0,f=0,t=0;t<n.length;t++)n[t].length>u&&(u=n[t].length,f=t);return f},i.setMonth(r(this._get(n,e.match(/MM/)?"monthNames":"monthNamesShort"))),i.setDate(r(this._get(n,e.match(/DD/)?"dayNames":"dayNamesShort"))+20-i.getDay()));n.input.attr("size",this._formatDate(n,i).length)}},_inlineDatepicker:function(t,r){var u=n(t);u.hasClass(this.markerClassName)||(u.addClass(this.markerClassName).append(r.dpDiv),n.data(t,i,r),this._setDate(r,this._getDefaultDate(r),!0),this._updateDatepicker(r),this._updateAlternate(r),r.settings.disabled&&this._disableDatepicker(t),r.dpDiv.css("display","block"))},_dialogDatepicker:function(t,u,f,e,o){var h,c,l,a,v,s=this._dialogInst;return s||(this.uuid+=1,h="dp"+this.uuid,this._dialogInput=n("<input type='text' id='"+h+"' style='position: absolute; top: -100px; width: 0px;'/>"),this._dialogInput.keydown(this._doKeyDown),n("body").append(this._dialogInput),s=this._dialogInst=this._newInst(this._dialogInput,!1),s.settings={},n.data(this._dialogInput[0],i,s)),r(s.settings,e||{}),u=u&&u.constructor===Date?this._formatDate(s,u):u,this._dialogInput.val(u),this._pos=o?o.length?o:[o.pageX,o.pageY]:null,this._pos||(c=document.documentElement.clientWidth,l=document.documentElement.clientHeight,a=document.documentElement.scrollLeft||document.body.scrollLeft,v=document.documentElement.scrollTop||document.body.scrollTop,this._pos=[c/2-100+a,l/2-150+v]),this._dialogInput.css("left",this._pos[0]+20+"px").css("top",this._pos[1]+"px"),s.settings.onSelect=f,this._inDialog=!0,this.dpDiv.addClass(this._dialogClass),this._showDatepicker(this._dialogInput[0]),n.blockUI&&n.blockUI(this.dpDiv),n.data(this._dialogInput[0],i,s),this},_destroyDatepicker:function(t){var r,u=n(t),f=n.data(t,i);u.hasClass(this.markerClassName)&&(r=t.nodeName.toLowerCase(),n.removeData(t,i),r==="input"?(f.append.remove(),f.trigger.remove(),u.removeClass(this.markerClassName).unbind("focus",this._showDatepicker).unbind("keydown",this._doKeyDown).unbind("keypress",this._doKeyPress).unbind("keyup",this._doKeyUp)):(r==="div"||r==="span")&&u.removeClass(this.markerClassName).empty())},_enableDatepicker:function(t){var r,u,f=n(t),e=n.data(t,i);f.hasClass(this.markerClassName)&&(r=t.nodeName.toLowerCase(),r==="input"?(t.disabled=!1,e.trigger.filter("button").each(function(){this.disabled=!1}).end().filter("img").css({opacity:"1.0",cursor:""})):(r==="div"||r==="span")&&(u=f.children("."+this._inlineClass),u.children().removeClass("ui-state-disabled"),u.find("select.ui-datepicker-month, select.ui-datepicker-year").prop("disabled",!1)),this._disabledInputs=n.map(this._disabledInputs,function(n){return n===t?null:n}))},_disableDatepicker:function(t){var r,u,f=n(t),e=n.data(t,i);f.hasClass(this.markerClassName)&&(r=t.nodeName.toLowerCase(),r==="input"?(t.disabled=!0,e.trigger.filter("button").each(function(){this.disabled=!0}).end().filter("img").css({opacity:"0.5",cursor:"default"})):(r==="div"||r==="span")&&(u=f.children("."+this._inlineClass),u.children().addClass("ui-state-disabled"),u.find("select.ui-datepicker-month, select.ui-datepicker-year").prop("disabled",!0)),this._disabledInputs=n.map(this._disabledInputs,function(n){return n===t?null:n}),this._disabledInputs[this._disabledInputs.length]=t)},_isDisabledDatepicker:function(n){if(!n)return!1;for(var t=0;t<this._disabledInputs.length;t++)if(this._disabledInputs[t]===n)return!0;return!1},_getInst:function(t){try{return n.data(t,i)}catch(r){throw"Missing instance data for this datepicker";}},_optionDatepicker:function(i,u,f){var o,c,s,h,e=this._getInst(i);if(arguments.length===2&&typeof u=="string")return u==="defaults"?n.extend({},n.otherDatesCalendar._defaults):e?u==="all"?n.extend({},e.settings):this._get(e,u):null;o=u||{};typeof u=="string"&&(o={},o[u]=f);e&&(this._curInst===e&&this._hideDatepicker(),c=this._getDateDatepicker(i,!0),s=this._getMinMaxDate(e,"min"),h=this._getMinMaxDate(e,"max"),r(e.settings,o),s!==null&&o.dateFormat!==t&&o.minDate===t&&(e.settings.minDate=this._formatDate(e,s)),h!==null&&o.dateFormat!==t&&o.maxDate===t&&(e.settings.maxDate=this._formatDate(e,h)),"disabled"in o&&(o.disabled?this._disableDatepicker(i):this._enableDatepicker(i)),this._attachments(n(i),e),this._autoSize(e),this._setDate(e,c),this._updateAlternate(e),this._updateDatepicker(e))},_changeDatepicker:function(n,t,i){this._optionDatepicker(n,t,i)},_refreshDatepicker:function(n){var t=this._getInst(n);t&&this._updateDatepicker(t)},_setDateDatepicker:function(n,t){var i=this._getInst(n);i&&(this._setDate(i,t),this._updateDatepicker(i),this._updateAlternate(i))},_getDateDatepicker:function(n,t){var i=this._getInst(n);return i&&!i.inline&&this._setDateFromField(i,t),i?this._getDate(i):null},_doKeyDown:function(t){var s,c,h,u=t.target,i=n.otherDatesCalendar._getInst(u),f=!0,a=i.dpDiv.is(".ui-datepicker-rtl"),l=t.keyCode,r=t.ctrlKey,e=t.metaKey,o;if(i._keyEvent=!0,n.otherDatesCalendar._datepickerShowing)switch(l){case 9:n.otherDatesCalendar._hideDatepicker();f=!1;break;case 13:return h=n("td."+n.otherDatesCalendar._dayOverClass+":not(."+n.otherDatesCalendar._currentClass+")",i.dpDiv),o=null,h[0]&&(o=n.otherDatesCalendar._selectDay(u,i.selectedMonth,i.selectedYear,h[0])),s=n.otherDatesCalendar._get(i,"onSelect"),s?(c=n.otherDatesCalendar._formatDate(i),s.apply(i.input?i.input[0]:null,[c,i])):n.otherDatesCalendar._hideDatepicker(),o&&(window.location=o.Link),!1;case 27:n.otherDatesCalendar._hideDatepicker();break;case 37:case 33:n.otherDatesCalendar._adjustDate(u,r?-n.otherDatesCalendar._get(i,"stepBigMonths"):-n.otherDatesCalendar._get(i,"stepMonths"),"M");break;case 39:case 34:n.otherDatesCalendar._adjustDate(u,r?+n.otherDatesCalendar._get(i,"stepBigMonths"):+n.otherDatesCalendar._get(i,"stepMonths"),"M");break;case 35:(r||e)&&n.otherDatesCalendar._clearDate(u);f=r||e;break;case 36:(r||e)&&n.otherDatesCalendar._gotoToday(u);f=r||e;break;case 38:(r||e)&&n.otherDatesCalendar._adjustDate(u,-7,"D");f=r||e;break;case 40:(r||e)&&n.otherDatesCalendar._adjustDate(u,7,"D");f=r||e;break;default:f=!1}else l===36&&r?n.otherDatesCalendar._showDatepicker(this):f=!1;f&&(t.preventDefault(),t.stopPropagation())},_doKeyPress:function(t){var i,r,u=n.otherDatesCalendar._getInst(t.target);if(n.otherDatesCalendar._get(u,"constrainInput"))return i=n.otherDatesCalendar._possibleChars(n.otherDatesCalendar._get(u,"dateFormat")),r=String.fromCharCode(t.charCode==null?t.keyCode:t.charCode),t.ctrlKey||t.metaKey||r<" "||!i||i.indexOf(r)>-1},_doKeyUp:function(t){var r,i=n.otherDatesCalendar._getInst(t.target);if(i.input.val()!==i.lastVal)try{r=n.otherDatesCalendar.parseDate(n.otherDatesCalendar._get(i,"dateFormat"),i.input?i.input.val():null,n.otherDatesCalendar._getFormatConfig(i));r&&(n.otherDatesCalendar._setDateFromField(i),n.otherDatesCalendar._updateAlternate(i),n.otherDatesCalendar._updateDatepicker(i))}catch(u){}return!0},_showDatepicker:function(t){if(n.otherDatesCalendar.isOutsideClickClose=!1,t=t.target||t,t.nodeName.toLowerCase()!=="input"&&(t=n("input",t.parentNode)[0]),!n.otherDatesCalendar._isDisabledDatepicker(t)&&n.otherDatesCalendar._lastInput!==t){var i,o,s,u,f,e,h,c,l,a;(i=n.otherDatesCalendar._getInst(t),n.otherDatesCalendar._curInst&&n.otherDatesCalendar._curInst!==i&&(n.otherDatesCalendar._curInst.dpDiv.stop(!0,!0),i&&n.otherDatesCalendar._datepickerShowing&&n.otherDatesCalendar._hideDatepicker(n.otherDatesCalendar._curInst.input[0])),o=n.otherDatesCalendar._get(i,"beforeShow"),c=n.otherDatesCalendar._get(i,"isMainPage"),l=n.otherDatesCalendar._get(i,"offsetLeft"),s=o?o.apply(t,[t,i]):{},s!==!1)&&(r(i.settings,s),i.lastVal=null,n.otherDatesCalendar._lastInput=t,n.otherDatesCalendar._setDateFromField(i),n.otherDatesCalendar._inDialog&&(t.value=""),n.otherDatesCalendar._pos||(n.otherDatesCalendar._pos=n.otherDatesCalendar._findPos(t),n.otherDatesCalendar._pos[1]+=t.offsetHeight),u=!1,n(t).parents().each(function(){return u|=n(this).css("position")==="fixed",!u}),f={left:n.otherDatesCalendar._pos[0],top:n.otherDatesCalendar._pos[1]},n.otherDatesCalendar._pos=null,i.dpDiv.empty(),i.dpDiv.css({position:"absolute",display:"block",top:"-1000px"}),n.otherDatesCalendar._updateDatepicker(i),f=n.otherDatesCalendar._checkOffset(i,f,u,c,l),i.dpDiv.css({position:n.otherDatesCalendar._inDialog&&n.blockUI?"static":u?"fixed":"absolute",display:"none",left:f.left+"px",top:f.top+"px"}),a=n.otherDatesCalendar._get(i,"afterGenerateHtml"),i.inline||(e=n.otherDatesCalendar._get(i,"showAnim"),h=n.otherDatesCalendar._get(i,"duration"),i.dpDiv.zIndex(n(t).zIndex()+5),n.otherDatesCalendar._datepickerShowing=!0,n.effects&&n.effects.effect[e]?i.dpDiv.show(e,n.otherDatesCalendar._get(i,"showOptions"),h):i.dpDiv[e||"show"](e?h:null),n.otherDatesCalendar._shouldFocusInput(i)&&i.input.focus(),n.otherDatesCalendar._curInst=i))}},_updateDatepicker:function(t){this.maxRows=4;u=t;t.dpDiv.empty().append(this._generateHTML(t));this._attachHandlers(t);t.dpDiv.find("."+this._dayOverClass+" a").mouseover();var i,r=this._getNumberOfMonths(t),f=r[1];t.dpDiv.removeClass("ui-datepicker-multi-2 ui-datepicker-multi-3 ui-datepicker-multi-4").width("");f>1&&t.dpDiv.addClass("ui-datepicker-multi-"+f).css("width",17*f+"em");t.dpDiv[(r[0]!==1||r[1]!==1?"add":"remove")+"Class"]("ui-datepicker-multi");t.dpDiv[(this._get(t,"isRTL")?"add":"remove")+"Class"]("ui-datepicker-rtl");t===n.otherDatesCalendar._curInst&&n.otherDatesCalendar._datepickerShowing&&n.otherDatesCalendar._shouldFocusInput(t)&&t.input.focus();t.yearshtml&&(i=t.yearshtml,setTimeout(function(){i===t.yearshtml&&t.yearshtml&&t.dpDiv.find("select.ui-datepicker-year:first").replaceWith(t.yearshtml);i=t.yearshtml=null},0));this._get(t,"afterGenerateHtml")!==null&&this._get(t,"afterGenerateHtml")()},_shouldFocusInput:function(n){return n.input&&n.input.is(":visible")&&!n.input.is(":disabled")&&!n.input.is(":focus")},_checkOffset:function(t,i,r,u,f){var e=t.dpDiv.outerWidth(),o=t.dpDiv.outerHeight(),l=t.input?t.input.outerWidth():0,h=t.input?t.input.outerHeight():0,s=document.documentElement.clientWidth+(r?0:n(document).scrollLeft()),c=document.documentElement.clientHeight+(r?0:n(document).scrollTop());return u&&f!=0?i.left=f:(i.left-=this._get(t,"isRTL")?e-l:0,i.left-=r&&i.left===t.input.offset().left?n(document).scrollLeft():0,i.left-=Math.min(i.left,i.left+e>s&&s>e?Math.abs(i.left+e-s):0)),i.top-=r&&i.top===t.input.offset().top+h?n(document).scrollTop():0,i.top-=Math.min(i.top,i.top+o>c&&c>o?Math.abs(o+h):0),i},_findPos:function(t){for(var i,r=this._getInst(t),u=this._get(r,"isRTL");t&&(t.type==="hidden"||t.nodeType!==1||n.expr.filters.hidden(t));)t=t[u?"previousSibling":"nextSibling"];return i=n(t).offset(),[i.left,i.top]},_hideDatepicker:function(t){var u,e,f,o,r=this._curInst;r&&(!t||r===n.data(t,i))&&this._datepickerShowing&&(u=this._get(r,"showAnim"),e=this._get(r,"duration"),f=function(){n.otherDatesCalendar._tidyDialog(r)},n.effects&&(n.effects.effect[u]||n.effects[u])?r.dpDiv.hide(u,n.otherDatesCalendar._get(r,"showOptions"),e,f):r.dpDiv[u==="slideDown"?"slideUp":u==="fadeIn"?"fadeOut":"hide"](u?e:null,f),u||f(),this._datepickerShowing=!1,o=this._get(r,"onClose"),o&&o.apply(r.input?r.input[0]:null,[r.input?r.input.val():"",r]),this._lastInput=null,this._inDialog&&(this._dialogInput.css({position:"absolute",left:"0",top:"-100px"}),n.blockUI&&(n.unblockUI(),n("body").append(this.dpDiv))),this._inDialog=!1)},_tidyDialog:function(n){n.dpDiv.removeClass(this._dialogClass).unbind(".ui-datepicker-calendar")},_checkExternalClick:function(t){if(n.otherDatesCalendar._curInst){var i=n(t.target),r=n.otherDatesCalendar._getInst(i[0]);(i[0].id===n.otherDatesCalendar._mainDivId||i.parents("#"+n.otherDatesCalendar._mainDivId).length!==0||i.hasClass(n.otherDatesCalendar.markerClassName)||i.closest("."+n.otherDatesCalendar._triggerClass).length||!n.otherDatesCalendar._datepickerShowing||n.otherDatesCalendar._inDialog&&n.blockUI)&&(!i.hasClass(n.otherDatesCalendar.markerClassName)||n.otherDatesCalendar._curInst===r)||(typeof dateInputClickTracker!="undefined"&&dateInputClickTracker.resetTrackerData(),n.otherDatesCalendar.isOutsideClickClose=!0,n.otherDatesCalendar._hideDatepicker())}},_onNextMonth:function(t){var r=n(t),u=this._getInst(r[0]),i=n.otherDatesCalendar._get(u,"onNextMonth");i!=null&&i()},_onPrevMonth:function(t){var r=n(t),u=this._getInst(r[0]),i=n.otherDatesCalendar._get(u,"onPrevMonth");i!=null&&i()},_adjustDate:function(t,i,r){var f=n(t),u=this._getInst(f[0]);this._isDisabledDatepicker(f[0])||(this._adjustInstDate(u,i+(r==="M"?this._get(u,"showCurrentAtPos"):0),r),this._updateDatepicker(u))},_gotoToday:function(t){var r,u=n(t),i=this._getInst(u[0]);this._get(i,"gotoCurrent")&&i.currentDay?(i.selectedDay=i.currentDay,i.drawMonth=i.selectedMonth=i.currentMonth,i.drawYear=i.selectedYear=i.currentYear):(r=new Date,i.selectedDay=r.getDate(),i.drawMonth=i.selectedMonth=r.getMonth(),i.drawYear=i.selectedYear=r.getFullYear());this._notifyChange(i);this._adjustDate(u)},_selectMonthYear:function(t,i,r){var f=n(t),u=this._getInst(f[0]);u["selected"+(r==="M"?"Month":"Year")]=u["draw"+(r==="M"?"Month":"Year")]=parseInt(i.options[i.selectedIndex].value,10);this._notifyChange(u);this._adjustDate(f)},_selectDay:function(t,i,r,u){var f,e=n(t);if(!n(u).hasClass(this._unselectableClass)&&!this._isDisabledDatepicker(e[0]))return f=this._getInst(e[0]),f.selectedDay=f.currentDay=n("a>span.ui-datepicker-custom-data-day",u).html(),f.selectedMonth=f.currentMonth=i,f.selectedYear=f.currentYear=r,this._selectDate(t,this._formatDate(f,f.currentDay,f.currentMonth,f.currentYear),u)},_clearDate:function(t){var i=n(t);this._selectDate(i,"")},_selectDate:function(t,i,r){var f,e=n(t),u=this._getInst(e[0]);if(i=i!=null?i:this._formatDate(u),u.input&&u.input.val(i),this._updateAlternate(u),f=this._get(u,"onSelect"),f)return f.apply(u.input?u.input[0]:null,[i,u,r]);u.input&&u.input.trigger("change");u.inline?this._updateDatepicker(u):(this._hideDatepicker(),this._lastInput=u.input[0],typeof u.input[0]!="object"&&u.input.focus(),this._lastInput=null)},_updateAlternate:function(t){var i,r,u,f=this._get(t,"altField");f&&(i=this._get(t,"altFormat")||this._get(t,"dateFormat"),r=this._getDate(t),u=this.formatDate(i,r,this._getFormatConfig(t)),n(f).each(function(){n(this).val(u)}))},noWeekends:function(n){var t=n.getDay();return[t>0&&t<6,""]},iso8601Week:function(n){var i,t=new Date(n.getTime());return t.setDate(t.getDate()+4-(t.getDay()||7)),i=t.getTime(),t.setMonth(0),t.setDate(1),Math.floor(Math.round((i-t)/864e5)/7)+1},parseDate:function(t,i,r){if(t==null||i==null)throw"Invalid arguments";if(i=typeof i=="object"?i.toString():i+"",i==="")return null;for(var a,v,f=0,y=(r?r.shortYearCutoff:null)||this._defaults.shortYearCutoff,d=typeof y!="string"?y:(new Date).getFullYear()%100+parseInt(y,10),g=(r?r.dayNamesShort:null)||this._defaults.dayNamesShort,nt=(r?r.dayNames:null)||this._defaults.dayNames,tt=(r?r.monthNamesShort:null)||this._defaults.monthNamesShort,it=(r?r.monthNames:null)||this._defaults.monthNames,e=-1,s=-1,h=-1,p=-1,w=!1,u,l=function(n){var i=o+1<t.length&&t.charAt(o+1)===n;return i&&o++,i},c=function(n){var r=l(n),u=n==="@"?14:n==="!"?20:n==="y"&&r?4:n==="o"?3:2,e=new RegExp("^\\d{1,"+u+"}"),t=i.substring(f).match(e);if(!t)throw"Missing number at position "+f;return f+=t[0].length,parseInt(t[0],10)},k=function(t,r,u){var e=-1,o=n.map(l(t)?u:r,function(n,t){return[[t,n]]}).sort(function(n,t){return-(n[1].length-t[1].length)});if(n.each(o,function(n,t){var r=t[1];if(i.substr(f,r.length).toLowerCase()===r.toLowerCase())return e=t[0],f+=r.length,!1}),e!==-1)return e+1;throw"Unknown name at position "+f;},b=function(){if(i.charAt(f)!==t.charAt(o))throw"Unexpected literal at position "+f;f++},o=0;o<t.length;o++)if(w)t.charAt(o)!=="'"||l("'")?b():w=!1;else switch(t.charAt(o)){case"d":h=c("d");break;case"D":k("D",g,nt);break;case"o":p=c("o");break;case"m":s=c("m");break;case"M":s=k("M",tt,it);break;case"y":e=c("y");break;case"@":u=new Date(c("@"));e=u.getFullYear();s=u.getMonth()+1;h=u.getDate();break;case"!":u=new Date((c("!")-this._ticksTo1970)/1e4);e=u.getFullYear();s=u.getMonth()+1;h=u.getDate();break;case"'":l("'")?b():w=!0;break;default:b()}if(f<i.length&&(v=i.substr(f),!/^\s+/.test(v)))throw"Extra/unparsed characters found in date: "+v;if(e===-1?e=(new Date).getFullYear():e<100&&(e+=(new Date).getFullYear()-(new Date).getFullYear()%100+(e<=d?0:-100)),p>-1){s=1;h=p;do{if(a=this._getDaysInMonth(e,s-1),h<=a)break;s++;h-=a}while(1)}if(u=this._daylightSavingAdjust(new Date(e,s-1,h)),u.getFullYear()!==e||u.getMonth()+1!==s||u.getDate()!==h)throw"Invalid date";return u},ATOM:"yy-mm-dd",COOKIE:"D, dd M yy",ISO_8601:"yy-mm-dd",RFC_822:"D, d M y",RFC_850:"DD, dd-M-y",RFC_1036:"D, d M y",RFC_1123:"D, d M yy",RFC_2822:"D, d M yy",RSS:"D, d M y",TICKS:"!",TIMESTAMP:"@",W3C:"yy-mm-dd",_ticksTo1970:(718685+Math.floor(1970/4)-Math.floor(1970/100)+Math.floor(1970/400))*864e9,formatDate:function(n,t,i){if(!t)return"";var u,h=(i?i.dayNamesShort:null)||this._defaults.dayNamesShort,c=(i?i.dayNames:null)||this._defaults.dayNames,l=(i?i.monthNamesShort:null)||this._defaults.monthNamesShort,a=(i?i.monthNames:null)||this._defaults.monthNames,f=function(t){var i=u+1<n.length&&n.charAt(u+1)===t;return i&&u++,i},e=function(n,t,i){var r=""+t;if(f(n))while(r.length<i)r="0"+r;return r},s=function(n,t,i,r){return f(n)?r[t]:i[t]},r="",o=!1;if(t)for(u=0;u<n.length;u++)if(o)n.charAt(u)!=="'"||f("'")?r+=n.charAt(u):o=!1;else switch(n.charAt(u)){case"d":r+=e("d",t.getDate(),2);break;case"D":r+=s("D",t.getDay(),h,c);break;case"o":r+=e("o",Math.round((new Date(t.getFullYear(),t.getMonth(),t.getDate()).getTime()-new Date(t.getFullYear(),0,0).getTime())/864e5),3);break;case"m":r+=e("m",t.getMonth()+1,2);break;case"M":r+=s("M",t.getMonth(),l,a);break;case"y":r+=f("y")?t.getFullYear():(t.getYear()%100<10?"0":"")+t.getYear()%100;break;case"@":r+=t.getTime();break;case"!":r+=t.getTime()*1e4+this._ticksTo1970;break;case"'":f("'")?r+="'":o=!0;break;default:r+=n.charAt(u)}return r},_possibleChars:function(n){for(var i="",r=!1,u=function(i){var r=t+1<n.length&&n.charAt(t+1)===i;return r&&t++,r},t=0;t<n.length;t++)if(r)n.charAt(t)!=="'"||u("'")?i+=n.charAt(t):r=!1;else switch(n.charAt(t)){case"d":case"m":case"y":case"@":i+="0123456789";break;case"D":case"M":return null;case"'":u("'")?i+="'":r=!0;break;default:i+=n.charAt(t)}return i},_get:function(n,i){return n.settings[i]!==t?n.settings[i]:this._defaults[i]},_setDateFromField:function(n,t){if(n.input.val()!==n.lastVal){var f=this._get(n,"dateFormat"),r=n.lastVal=n.input?n.input.val():null,u=this._getDefaultDate(n),i=u,e=this._getFormatConfig(n);try{i=this.parseDate(f,r,e)||u}catch(o){r=t?"":r}n.selectedDay=i.getDate();n.drawMonth=n.selectedMonth=i.getMonth();n.drawYear=n.selectedYear=i.getFullYear();n.currentDay=r?i.getDate():0;n.currentMonth=r?i.getMonth():0;n.currentYear=r?i.getFullYear():0;this._adjustInstDate(n)}},_getDefaultDate:function(n){return this._restrictMinMax(n,this._determineDate(n,this._get(n,"defaultDate"),new Date))},_determineDate:function(t,i,r){var f=function(n){var t=new Date;return t.setDate(t.getDate()+n),t},e=function(i){try{return n.otherDatesCalendar.parseDate(n.otherDatesCalendar._get(t,"dateFormat"),i,n.otherDatesCalendar._getFormatConfig(t))}catch(h){}for(var o=(i.toLowerCase().match(/^c/)?n.otherDatesCalendar._getDate(t):null)||new Date,f=o.getFullYear(),e=o.getMonth(),r=o.getDate(),s=/([+\-]?[0-9]+)\s*(d|D|w|W|m|M|y|Y)?/g,u=s.exec(i);u;){switch(u[2]||"d"){case"d":case"D":r+=parseInt(u[1],10);break;case"w":case"W":r+=parseInt(u[1],10)*7;break;case"m":case"M":e+=parseInt(u[1],10);r=Math.min(r,n.otherDatesCalendar._getDaysInMonth(f,e));break;case"y":case"Y":f+=parseInt(u[1],10);r=Math.min(r,n.otherDatesCalendar._getDaysInMonth(f,e))}u=s.exec(i)}return new Date(f,e,r)},u=i==null||i===""?r:typeof i=="string"?e(i):typeof i=="number"?isNaN(i)?r:f(i):new Date(i.getTime());return u=u&&u.toString()==="Invalid Date"?r:u,u&&(u.setHours(0),u.setMinutes(0),u.setSeconds(0),u.setMilliseconds(0)),this._daylightSavingAdjust(u)},_daylightSavingAdjust:function(n){return n?(n.setHours(n.getHours()>12?n.getHours()+2:0),n):null},_setDate:function(n,t,i){var u=!t,f=n.selectedMonth,e=n.selectedYear,r=this._restrictMinMax(n,this._determineDate(n,t,new Date));n.selectedDay=n.currentDay=r.getDate();n.drawMonth=n.selectedMonth=n.currentMonth=r.getMonth();n.drawYear=n.selectedYear=n.currentYear=r.getFullYear();f===n.selectedMonth&&e===n.selectedYear||i||this._notifyChange(n);this._adjustInstDate(n);n.input&&n.input.val(u?"":this._formatDate(n))},_getDate:function(n){return!n.currentYear||n.input&&n.input.val()===""?null:this._daylightSavingAdjust(new Date(n.currentYear,n.currentMonth,n.currentDay))},_attachHandlers:function(i){var u=this._get(i,"stepMonths"),r="#"+i.id.replace(/\\\\/g,"\\");i.dpDiv.unbind("keydown");i.dpDiv.bind("keydown",function(t){var u=r,f=!0,o=t.keyCode,e=t.ctrlKey,s=t.metaKey;i._keyEvent=!0;switch(o){case 37:case 33:n.otherDatesCalendar._adjustDate(u,e?-n.otherDatesCalendar._get(i,"stepBigMonths"):-n.otherDatesCalendar._get(i,"stepMonths"),"M");break;case 39:case 34:n.otherDatesCalendar._adjustDate(u,e?+n.otherDatesCalendar._get(i,"stepBigMonths"):+n.otherDatesCalendar._get(i,"stepMonths"),"M");break;default:f=!1}f&&(t.preventDefault(),t.stopPropagation())});i.dpDiv.find("[data-handler]").map(function(){var i={prev:function(){n.otherDatesCalendar._onPrevMonth(r);n.otherDatesCalendar._adjustDate(r,-u,"M")},next:function(){n.otherDatesCalendar._onNextMonth(r);n.otherDatesCalendar._adjustDate(r,+u,"M")},hide:function(){n.otherDatesCalendar._hideDatepicker()},today:function(){n.otherDatesCalendar._gotoToday(r)},selectDay:function(){var i=n.otherDatesCalendar._selectDay(r,+this.getAttribute("data-month"),+this.getAttribute("data-year"),this);return i==t?!0:i},selectMonth:function(){return n.otherDatesCalendar._selectMonthYear(r,this,"M"),!1},selectYear:function(){return n.otherDatesCalendar._selectMonthYear(r,this,"Y"),!1}};n(this).bind(this.getAttribute("data-event"),i[this.getAttribute("data-handler")])})},_getFeaturedDate:function(n){return this._get(n,"featuredDate")},_getDateData:function(n,t,i,r){var u=this._get(n,"dateData")||{},f=r+"-"+("00"+i).slice(-2)+"-"+("00"+t).slice(-2);return u[f]},_getDateDataItem:function(n,t,i,r,u){var f=this._get(n,"dateData")||{},e=r+"-"+("00"+i).slice(-2)+"-"+("00"+t).slice(-2);return f[e][u]},_isDateDataEmpty:function(n,i,r,u){var f=this._get(n,"dateData")||{},e=u+"-"+("00"+r).slice(-2)+"-"+("00"+i).slice(-2);return f[e]==t},_dateDataItemsCount:function(n,i,r,u){var f=this._get(n,"dateData")||{},e=u+"-"+("00"+r).slice(-2)+"-"+("00"+i).slice(-2);return f[e]!==t?f[e].length:0},_generateHTML:function(n){var d,c,ot,l,st,g,ht,ct,oi,a,lt,si,hi,ci,li,at,tt,ai,vt,it,e,w,yt,b,pt,v,f,wt,bt,kt,dt,rt,gt,i,ni,ti,nt,y,ut,ii=new Date,ri=this._daylightSavingAdjust(new Date(ii.getFullYear(),ii.getMonth(),ii.getDate())),o=this._get(n,"isRTL"),bi=this._get(n,"showButtonPanel"),vi=this._get(n,"hideIfNoPrevNext"),ui=this._get(n,"navigationAsDateFormat"),s=this._getNumberOfMonths(n),ki=this._get(n,"showCurrentAtPos"),yi=this._get(n,"stepMonths"),fi=s[0]!==1||s[1]!==1,ei=this._daylightSavingAdjust(n.currentDay?new Date(n.currentYear,n.currentMonth,n.currentDay):new Date(9999,9,9)),h=this._getMinMaxDate(n,"min"),p=this._getMinMaxDate(n,"max"),r=n.drawMonth-ki,u=n.drawYear,di=n.isMainPage,gi=n.offsetLeft,k,ft;if(r<0&&(r+=12,u--),p)for(d=this._daylightSavingAdjust(new Date(p.getFullYear(),p.getMonth()-s[0]*s[1]+1,p.getDate())),d=h&&d<h?h:d;this._daylightSavingAdjust(new Date(u,r,1))>d;)r--,r<0&&(r=11,u--);for(n.drawMonth=r,n.drawYear=u,c=this._get(n,"prevText"),c=ui?this.formatDate(c,this._daylightSavingAdjust(new Date(u,r-yi,1)),this._getFormatConfig(n)):c,ot=this._canAdjustMonth(n,-1,u,r)?"<a class='ui-datepicker-prev ui-corner-all js--link' data-handler='prev' data-event='click' title='"+c+"'><span class='ui-icon ui-icon-circle-triangle-"+(o?"e":"w")+"'>"+c+"<\/span><\/a>":vi?"":"<a class='ui-datepicker-prev ui-corner-all ui-state-disabled' title='"+c+"'><span class='ui-icon ui-icon-circle-triangle-"+(o?"e":"w")+"'>"+c+"<\/span><\/a>",l=this._get(n,"nextText"),l=ui?this.formatDate(l,this._daylightSavingAdjust(new Date(u,r+yi,1)),this._getFormatConfig(n)):l,st=this._canAdjustMonth(n,1,u,r)?"<a class='ui-datepicker-next ui-corner-all js--link' data-handler='next' data-event='click' title='"+l+"'><span class='ui-icon ui-icon-circle-triangle-"+(o?"w":"e")+"'>"+l+"<\/span><\/a>":vi?"":"<a class='ui-datepicker-next ui-corner-all ui-state-disabled' title='"+l+"'><span class='ui-icon ui-icon-circle-triangle-"+(o?"w":"e")+"'>"+l+"<\/span><\/a>",g=this._get(n,"currentText"),ht=this._get(n,"gotoCurrent")&&n.currentDay?ei:ri,g=ui?this.formatDate(g,ht,this._getFormatConfig(n)):g,ct=n.inline?"":"<button type='button' class='ui-datepicker-close ui-state-default ui-priority-primary ui-corner-all' data-handler='hide' data-event='click'>"+this._get(n,"closeText")+"<\/button>",oi=bi?"<div class='ui-datepicker-buttonpane ui-widget-content'>"+(o?ct:"")+(this._isInRange(n,ht)?"<button type='button' class='ui-datepicker-current ui-state-default ui-priority-secondary ui-corner-all' data-handler='today' data-event='click'>"+g+"<\/button>":"")+(o?"":ct)+"<\/div>":"",a=parseInt(this._get(n,"firstDay"),10),a=isNaN(a)?0:a,lt=this._get(n,"showWeek"),si=this._get(n,"dayNames"),hi=this._get(n,"dayNamesMin"),ci=this._get(n,"monthNames"),li=this._get(n,"monthNamesShort"),at=this._get(n,"beforeShowDay"),tt=this._get(n,"showOtherMonths"),di=this._get(n,"isMainPage"),gi=this._get(n,"offsetLeft"),ai=this._get(n,"selectOtherMonths"),vt=this._getDefaultDate(n),it="",e,w=0;w<s[0];w++){for(yt="",this.maxRows=4,b=0;b<s[1];b++){if(pt=this._daylightSavingAdjust(new Date(u,r,n.selectedDay)),v=" ui-corner-all",f="",fi){if(f+="<div class='ui-datepicker-group",s[1]>1)switch(b){case 0:f+=" ui-datepicker-group-first";v=" ui-corner-"+(o?"right":"left");break;case s[1]-1:f+=" ui-datepicker-group-last";v=" ui-corner-"+(o?"left":"right");break;default:f+=" ui-datepicker-group-middle";v=""}f+="'>"}for(f+="<div class='ui-datepicker-header ui-widget-header ui-helper-clearfix"+v+"'>"+(/all|left/.test(v)&&w===0?o?st:ot:"")+(/all|right/.test(v)&&w===0?o?ot:st:"")+this._generateMonthYearHeader(n,r,u,h,p,w>0||b>0,ci,li)+"<\/div><table class='ui-datepicker-calendar'><thead><tr>",wt=lt?"<th class='ui-datepicker-week-col'>"+this._get(n,"weekHeader")+"<\/th>":"",e=0;e<7;e++)bt=(e+a)%7,wt+="<th"+((e+a+6)%7>=5?" class='ui-datepicker-week-end'":"")+"><span title='"+si[bt]+"'>"+hi[bt]+"<\/span><\/th>";for(f+=wt+"<\/tr><\/thead><tbody>",kt=this._getDaysInMonth(u,r),u===n.selectedYear&&r===n.selectedMonth&&(n.selectedDay=Math.min(n.selectedDay,kt)),dt=(this._getFirstDayOfMonth(u,r)-a+7)%7,rt=Math.ceil((dt+kt)/7),gt=fi?this.maxRows>rt?this.maxRows:rt:rt,this.maxRows=gt,i=this._daylightSavingAdjust(new Date(u,r,1-dt)),ft=null,h!=t&&(k=new Date(h.getFullYear()+"-"+formatDayOrMonth(h.getMonth()+1)+"-"+formatDayOrMonth(h.getDate())),k=new Date(k),k.setDate(k.getDate()-1),ft=new Date(k)),ni=0;ni<gt;ni++){for(f+="<tr>",ti=lt?"<td class='ui-datepicker-week-col'>"+this._get(n,"calculateWeek")(i)+"<\/td>":"",e=0;e<7;e++){var tr=this._getDateData(n,i.getDate(),1+i.getMonth(),i.getFullYear()),et=this._isDateDataEmpty(n,i.getDate(),1+i.getMonth(),i.getFullYear()),pi=et?"":this._getDateDataItem(n,i.getDate(),1+i.getMonth(),i.getFullYear(),0).Price,nr=et?"":this._getDateDataItem(n,i.getDate(),1+i.getMonth(),i.getFullYear(),0).Link,wi=this._getFeaturedDate(n);nt=at?at.apply(n.input?n.input[0]:null,[i]):[!0,""];y=i.getMonth()!==r;ut=y&&!ai||!nt[0]||h&&i<h||p&&i>p;ti+="<td class='"+((e+a+6)%7>=5?" ui-datepicker-week-end":"")+(y?" ui-datepicker-other-month":"")+(i.getTime()===pt.getTime()&&r===n.selectedMonth&&n._keyEvent||vt.getTime()===i.getTime()&&vt.getTime()===pt.getTime()?" "+this._dayOverClass:"")+(ut?" "+this._unselectableClass+" ui-state-disabled":"")+(y&&!tt?"":" "+nt[1]+(i.getTime()===ei.getTime()?" "+this._currentClass:"")+(i.getTime()===ri.getTime()?" ui-datepicker-today":"")+(wi&&wi.getTime()===i.getTime()?" "+this._featuredDate:""))+"'"+((!y||tt)&&nt[2]?" title='"+nt[2].replace(/'/g,"&#39;")+"'":"")+(ft!=null&&ft.toLocaleDateString()==i.toLocaleDateString()?" data-selected-date='SelectedDate' ":"  ")+(ut?"":" data-handler='selectDay' data-event='click' data-month='"+i.getMonth()+"' data-year='"+i.getFullYear()+"'")+">"+(y&&!tt?"&#xa0;":ut?"<span class='ui-state-default'>"+i.getDate()+"<\/span>":"<a class='ui-state-default"+(i.getTime()===ri.getTime()?" ui-state-highlight":"")+(i.getTime()===ei.getTime()?" ui-state-active":"")+(y?" ui-priority-secondary":"")+(et?"":" ui-datepicker-custom-data")+"' href='"+(et?"#":nr)+"'><span class='ui-datepicker-custom-data-day'>"+i.getDate()+"<\/span><span class='ui-datepicker-custom-data-title'>"+(pi?pi:"")+"<\/span><\/a>")+"<\/td>";i.setDate(i.getDate()+1);i=this._daylightSavingAdjust(i)}f+=ti+"<\/tr>"}r++;r>11&&(r=0,u++);f+="<\/tbody><\/table>"+(fi?"<\/div>"+(s[0]>0&&b===s[1]-1?"<div class='ui-datepicker-row-break'><\/div>":""):"");yt+=f}it+=yt}return it+=oi,n._keyEvent=!1,it},_generateMonthYearHeader:function(n,t,i,r,u,f,e,o){var k,d,h,v,y,p,s,a,w=this._get(n,"changeMonth"),b=this._get(n,"changeYear"),g=this._get(n,"showMonthAfterYear"),c="<div class='ui-datepicker-title'>",l="";if(f||!w)l+="<span class='ui-datepicker-month'>"+e[t]+"<\/span>";else{for(k=r&&r.getFullYear()===i,d=u&&u.getFullYear()===i,l+="<div class='date-select-wrap' ><select class='ui-datepicker-month' data-handler='selectMonth' data-event='change'>",h=0;h<12;h++)(!k||h>=r.getMonth())&&(!d||h<=u.getMonth())&&(l+="<option value='"+h+"'"+(h===t?" selected='selected'":"")+">"+o[h]+"<\/option>");l+="<\/select><\/div>"}if(g||(c+=l+(f||!(w&&b)?"&#xa0;":"")),!n.yearshtml)if(n.yearshtml="",f||!b)c+="<span class='ui-datepicker-year'>"+i+"<\/span>";else{for(v=this._get(n,"yearRange").split(":"),y=(new Date).getFullYear(),p=function(n){var t=n.match(/c[+\-].*/)?i+parseInt(n.substring(1),10):n.match(/[+\-].*/)?y+parseInt(n,10):parseInt(n,10);return isNaN(t)?y:t},s=p(v[0]),a=Math.max(s,p(v[1]||"")),s=r?Math.max(s,r.getFullYear()):s,a=u?Math.min(a,u.getFullYear()):a,n.yearshtml+="<div class='date-select-wrap'><select class='ui-datepicker-year' data-handler='selectYear' data-event='change'>";s<=a;s++)n.yearshtml+="<option value='"+s+"'"+(s===i?" selected='selected'":"")+">"+s+"<\/option>";n.yearshtml+="<\/select><\/div>";c+=n.yearshtml;n.yearshtml=null}return c+=this._get(n,"yearSuffix"),g&&(c+=(f||!(w&&b)?"&#xa0;":"")+l),c+"<\/div>"},_adjustInstDate:function(n,t,i){var u=n.drawYear+(i==="Y"?t:0),f=n.drawMonth+(i==="M"?t:0),e=Math.min(n.selectedDay,this._getDaysInMonth(u,f))+(i==="D"?t:0),r=this._restrictMinMax(n,this._daylightSavingAdjust(new Date(u,f,e)));n.selectedDay=r.getDate();n.drawMonth=n.selectedMonth=r.getMonth();n.drawYear=n.selectedYear=r.getFullYear();(i==="M"||i==="Y")&&this._notifyChange(n)},_restrictMinMax:function(n,t){var i=this._getMinMaxDate(n,"min"),r=this._getMinMaxDate(n,"max"),u=i&&t<i?i:t;return r&&u>r?r:u},_notifyChange:function(n){var t=this._get(n,"onChangeMonthYear");t&&t.apply(n.input?n.input[0]:null,[n.selectedYear,n.selectedMonth+1,n])},_getNumberOfMonths:function(n){var t=this._get(n,"numberOfMonths");return t==null?[1,1]:typeof t=="number"?[1,t]:t},_getMinMaxDate:function(n,t){return this._determineDate(n,this._get(n,t+"Date"),null)},_getDaysInMonth:function(n,t){return 32-this._daylightSavingAdjust(new Date(n,t,32)).getDate()},_getFirstDayOfMonth:function(n,t){return new Date(n,t,1).getDay()},_canAdjustMonth:function(n,t,i,r){var f=this._getNumberOfMonths(n),u=this._daylightSavingAdjust(new Date(i,r+(t<0?t:f[0]*f[1]),1));return t<0&&u.setDate(this._getDaysInMonth(u.getFullYear(),u.getMonth())),this._isInRange(n,u)},_isInRange:function(n,t){var i,f,e=this._getMinMaxDate(n,"min"),o=this._getMinMaxDate(n,"max"),r=null,u=null,s=this._get(n,"yearRange");return s&&(i=s.split(":"),f=(new Date).getFullYear(),r=parseInt(i[0],10),u=parseInt(i[1],10),i[0].match(/[+\-].*/)&&(r+=f),i[1].match(/[+\-].*/)&&(u+=f)),(!e||t.getTime()>=e.getTime())&&(!o||t.getTime()<=o.getTime())&&(!r||t.getFullYear()>=r)&&(!u||t.getFullYear()<=u)},_getFormatConfig:function(n){var t=this._get(n,"shortYearCutoff");return t=typeof t!="string"?t:(new Date).getFullYear()%100+parseInt(t,10),{shortYearCutoff:t,dayNamesShort:this._get(n,"dayNamesShort"),dayNames:this._get(n,"dayNames"),monthNamesShort:this._get(n,"monthNamesShort"),monthNames:this._get(n,"monthNames")}},_formatDate:function(n,t,i,r){t||(n.currentDay=n.selectedDay,n.currentMonth=n.selectedMonth,n.currentYear=n.selectedYear);var u=t?typeof t=="object"?t:this._daylightSavingAdjust(new Date(r,i,t)):this._daylightSavingAdjust(new Date(n.currentYear,n.currentMonth,n.currentDay));return this.formatDate(this._get(n,"dateFormat"),u,this._getFormatConfig(n))}});n.fn.otherDatesCalendar=function(t){if(!this.length)return this;if(!n.otherDatesCalendar.initialized){n(document).mousedown(n.otherDatesCalendar._checkExternalClick);n("body").on("hidePopup",n.otherDatesCalendar._checkExternalClick);n.otherDatesCalendar.initialized=!0}n("#"+n.otherDatesCalendar._mainDivId).length===0&&n("body").append(n.otherDatesCalendar.dpDiv);var i=Array.prototype.slice.call(arguments,1);return typeof t=="string"&&(t==="isDisabled"||t==="getDate"||t==="widget")?n.otherDatesCalendar["_"+t+"Datepicker"].apply(n.otherDatesCalendar,[this[0]].concat(i)):t==="option"&&arguments.length===2&&typeof arguments[1]=="string"?n.otherDatesCalendar["_"+t+"Datepicker"].apply(n.otherDatesCalendar,[this[0]].concat(i)):this.each(function(){typeof t=="string"?n.otherDatesCalendar["_"+t+"Datepicker"].apply(n.otherDatesCalendar,[this].concat(i)):n.otherDatesCalendar._attachDatepicker(this,t)})};n.otherDatesCalendar=new f;n.otherDatesCalendar.initialized=!1;n.otherDatesCalendar.uuid=(new Date).getTime();n.otherDatesCalendar.version="1.10.3"})(jQuery),function(){(function(n){var r=this||eval("this"),t=r.document,f=r.navigator,i=r.jQuery,u=r.JSON;(function(n){"function"==typeof define&&define.amd?define(["exports","require"],n):"object"==typeof exports&&"object"==typeof module?n(module.exports||exports):n(r.ko={})})(function(e,o){function w(n,t){return null===n||typeof n in g?n===t:!1}function nt(t,i){var r;return function(){r||(r=s.a.setTimeout(function(){r=n;t()},i))}}function tt(n,t){var i;return function(){clearTimeout(i);i=s.a.setTimeout(n,t)}}function it(n,t){t&&"change"!==t?"beforeChange"===t?this.Yb(n):this.Wa(n,t):this.Zb(n)}function rt(n,t){null!==t&&t.m&&t.m()}function ut(n,t){var i=this.Uc,r=i[h];r.ca||(this.Eb&&this.$a[t]?(i.bc(t,n,this.$a[t]),this.$a[t]=null,--this.Eb):r.G[t]||i.bc(t,n,r.I?{ja:n}:i.Hc(n)),n.Ua&&n.Pc())}function b(n,t,i,r){s.g[n]={init:function(n,u,f,e,o){var c,h;return s.u(function(){var l=u(),f=s.a.c(l),f=!i!=!f,e=!h;(e||t||f!==c)&&(e&&s.La.Na()&&(h=s.a.Ka(s.f.childNodes(n),!0)),f?(e||s.f.ha(n,s.a.Ka(h)),s.xb(r?r(o,l):o,n)):s.f.ya(n),c=f)},null,{j:n}),{controlsDescendantBindings:!0}}};s.l.Ja[n]=!1;s.f.ka[n]=!0}var s="undefined"!=typeof e?e:{},g,l,v,a,y,h,k,d,p;s.b=function(n,t){for(var i=n.split("."),r=s,u=0;u<i.length-1;u++)r=r[i[u]];r[i[i.length-1]]=t};s.U=function(n,t,i){n[t]=i};s.version="3.4.2";s.b("version",s.version);s.options={deferUpdates:!1,useOnlyNativeEvents:!1};s.a=function(){function o(n,t){for(var i in n)n.hasOwnProperty(i)&&t(i,n[i])}function l(n,t){if(t)for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i]);return n}function a(n,t){return n.__proto__=t,n}function v(n,t,i,r){var u=n[t].match(c)||[];s.a.F(i.match(c),function(n){s.a.Fa(u,n,r)});n[t]=u.join(" ")}var y={__proto__:[]}instanceof Array,w="function"==typeof Symbol,h={},p={};h[f&&/Firefox\/2/i.test(f.userAgent)?"KeyboardEvent":"UIEvents"]=["keyup","keydown","keypress"];h.MouseEvents="click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave".split(" ");o(h,function(n,t){if(t.length)for(var i=0,r=t.length;i<r;i++)p[t[i]]=n});var b={propertychange:!0},e=t&&function(){for(var i=3,r=t.createElement("div"),u=r.getElementsByTagName("i");r.innerHTML="<!--[if gt IE "+ ++i+"]><i><\/i><![endif]-->",u[0];);return 4<i?i:n}(),c=/\S+/g;return{qc:["authenticity_token",/^__RequestVerificationToken(_.*)?$/],F:function(n,t){for(var i=0,r=n.length;i<r;i++)t(n[i],i)},A:function(n,t){if("function"==typeof Array.prototype.indexOf)return Array.prototype.indexOf.call(n,t);for(var i=0,r=n.length;i<r;i++)if(n[i]===t)return i;return-1},dc:function(n,t,i){for(var r=0,u=n.length;r<u;r++)if(t.call(i,n[r],r))return n[r];return null},Za:function(n,t){var i=s.a.A(n,t);0<i?n.splice(i,1):0===i&&n.shift()},ec:function(n){n=n||[];for(var i=[],t=0,r=n.length;t<r;t++)0>s.a.A(i,n[t])&&i.push(n[t]);return i},yb:function(n,t){n=n||[];for(var r=[],i=0,u=n.length;i<u;i++)r.push(t(n[i],i));return r},Ga:function(n,t){n=n||[];for(var r=[],i=0,u=n.length;i<u;i++)t(n[i],i)&&r.push(n[i]);return r},Ha:function(n,t){if(t instanceof Array)n.push.apply(n,t);else for(var i=0,r=t.length;i<r;i++)n.push(t[i]);return n},Fa:function(n,t,i){var r=s.a.A(s.a.Nb(n),t);0>r?i&&n.push(t):i||n.splice(r,1)},wa:y,extend:l,setPrototypeOf:a,pb:y?a:l,P:o,Qa:function(n,t){if(!n)return n;var r={},i;for(i in n)n.hasOwnProperty(i)&&(r[i]=t(n[i],i,n));return r},Gb:function(n){for(;n.firstChild;)s.removeNode(n.firstChild)},xc:function(n){n=s.a.ga(n);for(var r=(n[0]&&n[0].ownerDocument||t).createElement("div"),i=0,u=n.length;i<u;i++)r.appendChild(s.ma(n[i]));return r},Ka:function(n,t){for(var r,i=0,f=n.length,u=[];i<f;i++)r=n[i].cloneNode(!0),u.push(t?s.ma(r):r);return u},ha:function(n,t){if(s.a.Gb(n),t)for(var i=0,r=t.length;i<r;i++)n.appendChild(t[i])},Pb:function(n,t){var r=n.nodeType?[n]:n;if(0<r.length){for(var f=r[0],e=f.parentNode,i=0,u=t.length;i<u;i++)e.insertBefore(t[i],f);for(i=0,u=r.length;i<u;i++)s.removeNode(r[i])}},na:function(n,t){if(n.length){for(t=8===t.nodeType&&t.parentNode||t;n.length&&n[0].parentNode!==t;)n.splice(0,1);for(;1<n.length&&n[n.length-1].parentNode!==t;)n.length--;if(1<n.length){var i=n[0],r=n[n.length-1];for(n.length=0;i!==r;)n.push(i),i=i.nextSibling;n.push(r)}}return n},Fc:function(n,t){7>e?n.setAttribute("selected",t):n.selected=t},rb:function(t){return null===t||t===n?"":t.trim?t.trim():t.toString().replace(/^[\s\xa0]+|[\s\xa0]+$/g,"")},yd:function(n,t){return n=n||"",t.length>n.length?!1:n.substring(0,t.length)===t},Zc:function(n,t){if(n===t)return!0;if(11===n.nodeType)return!1;if(t.contains)return t.contains(3===n.nodeType?n.parentNode:n);if(t.compareDocumentPosition)return 16==(t.compareDocumentPosition(n)&16);for(;n&&n!=t;)n=n.parentNode;return!!n},ab:function(n){return s.a.Zc(n,n.ownerDocument.documentElement)},cc:function(n){return!!s.a.dc(n,s.a.ab)},K:function(n){return n&&n.tagName&&n.tagName.toLowerCase()},hc:function(n){return s.onError?function(){try{return n.apply(this,arguments)}catch(t){throw s.onError&&s.onError(t),t;}}:n},setTimeout:function(n,t){return setTimeout(s.a.hc(n),t)},mc:function(n){setTimeout(function(){s.onError&&s.onError(n);throw n;},0)},D:function(n,t,r){var u=s.a.hc(r),f,o;if(r=e&&b[t],s.options.useOnlyNativeEvents||r||!i)if(r||"function"!=typeof n.addEventListener)if("undefined"!=typeof n.attachEvent)f=function(t){u.call(n,t)},o="on"+t,n.attachEvent(o,f),s.a.T.Ea(n,function(){n.detachEvent(o,f)});else throw Error("Browser doesn't support addEventListener or attachEvent");else n.addEventListener(t,u,!1);else i(n).bind(t,u)},Sa:function(n,u){if(!n||!n.nodeType)throw Error("element must be a DOM node when calling triggerEvent");var f;if("input"===s.a.K(n)&&n.type&&"click"==u.toLowerCase()?(f=n.type,f="checkbox"==f||"radio"==f):f=!1,s.options.useOnlyNativeEvents||!i||f)if("function"==typeof t.createEvent)if("function"==typeof n.dispatchEvent)f=t.createEvent(p[u]||"HTMLEvents"),f.initEvent(u,!0,!0,r,0,0,0,0,0,!1,!1,!1,!1,0,n),n.dispatchEvent(f);else throw Error("The supplied element doesn't support dispatchEvent");else if(f&&n.click)n.click();else if("undefined"!=typeof n.fireEvent)n.fireEvent("on"+u);else throw Error("Browser doesn't support triggering events");else i(n).trigger(u)},c:function(n){return s.M(n)?n():n},Nb:function(n){return s.M(n)?n.C():n},ub:function(n,t,i){var r;t&&("object"==typeof n.classList?(r=n.classList[i?"add":"remove"],s.a.F(t.match(c),function(t){r.call(n.classList,t)})):"string"==typeof n.className.baseVal?v(n.className,"baseVal",t,i):v(n,"className",t,i))},qb:function(t,i){var r=s.a.c(i),u;(null===r||r===n)&&(r="");u=s.f.firstChild(t);!u||3!=u.nodeType||s.f.nextSibling(u)?s.f.ha(t,[t.ownerDocument.createTextNode(r)]):u.data=r;s.a.cd(t)},Ec:function(n,i){if(n.name=i,7>=e)try{n.mergeAttributes(t.createElement("<input name='"+n.name+"'/>"),!1)}catch(r){}},cd:function(n){9<=e&&(n=1==n.nodeType?n:n.parentNode,n.style&&(n.style.zoom=n.style.zoom))},$c:function(n){if(e){var t=n.style.width;n.style.width=0;n.style.width=t}},ud:function(n,t){n=s.a.c(n);t=s.a.c(t);for(var r=[],i=n;i<=t;i++)r.push(i);return r},ga:function(n){for(var i=[],t=0,r=n.length;t<r;t++)i.push(n[t]);return i},kc:function(n){return w?Symbol(n):n},Bd:6===e,Cd:7===e,L:e,sc:function(n,t){for(var r=s.a.ga(n.getElementsByTagName("input")).concat(s.a.ga(n.getElementsByTagName("textarea"))),f="string"==typeof t?function(n){return n.name===t}:function(n){return t.test(n.name)},u=[],i=r.length-1;0<=i;i--)f(r[i])&&u.push(r[i]);return u},rd:function(n){return"string"==typeof n&&(n=s.a.rb(n))?u&&u.parse?u.parse(n):new Function("return "+n)():null},Rb:function(n,t,i){if(!u||!u.stringify)throw Error("Cannot find JSON.stringify(). Some browsers (e.g., IE < 8) don't support it natively, but you can overcome this by adding a script reference to json2.js, downloadable from http://www.json.org/json2.js");return u.stringify(s.a.c(n),t,i)},sd:function(n,i,r){var c,e,h,f,u,l;r=r||{};var a=r.params||{},v=r.includeFields||this.qc,c=n;if("object"==typeof n&&"form"===s.a.K(n))for(c=n.action,e=v.length-1;0<=e;e--)for(h=s.a.sc(n,v[e]),f=h.length-1;0<=f;f--)a[h[f].name]=h[f].value;i=s.a.c(i);u=t.createElement("form");u.style.display="none";u.action=c;u.method="post";for(l in i)n=t.createElement("input"),n.type="hidden",n.name=l,n.value=s.a.Rb(s.a.c(i[l])),u.appendChild(n);o(a,function(n,i){var r=t.createElement("input");r.type="hidden";r.name=n;r.value=i;u.appendChild(r)});t.body.appendChild(u);r.submitter?r.submitter(u):u.submit();setTimeout(function(){u.parentNode.removeChild(u)},0)}}}();s.b("utils",s.a);s.b("utils.arrayForEach",s.a.F);s.b("utils.arrayFirst",s.a.dc);s.b("utils.arrayFilter",s.a.Ga);s.b("utils.arrayGetDistinctValues",s.a.ec);s.b("utils.arrayIndexOf",s.a.A);s.b("utils.arrayMap",s.a.yb);s.b("utils.arrayPushAll",s.a.Ha);s.b("utils.arrayRemoveItem",s.a.Za);s.b("utils.extend",s.a.extend);s.b("utils.fieldsIncludedWithJsonPost",s.a.qc);s.b("utils.getFormFields",s.a.sc);s.b("utils.peekObservable",s.a.Nb);s.b("utils.postJson",s.a.sd);s.b("utils.parseJson",s.a.rd);s.b("utils.registerEventHandler",s.a.D);s.b("utils.stringifyJson",s.a.Rb);s.b("utils.range",s.a.ud);s.b("utils.toggleDomNodeCssClass",s.a.ub);s.b("utils.triggerEvent",s.a.Sa);s.b("utils.unwrapObservable",s.a.c);s.b("utils.objectForEach",s.a.P);s.b("utils.addOrRemoveItem",s.a.Fa);s.b("utils.setTextContent",s.a.qb);s.b("unwrap",s.a.c);Function.prototype.bind||(Function.prototype.bind=function(n){var t=this,i;return 1===arguments.length?function(){return t.apply(n,arguments)}:(i=Array.prototype.slice.call(arguments,1),function(){var r=i.slice(0);return r.push.apply(r,arguments),t.apply(n,r)})});s.a.h=new function(){function r(r,f){var e=r[t];if(!e||"null"===e||!i[e]){if(!f)return n;e=r[t]="ko"+u++;i[e]={}}return i[e]}var u=0,t="__ko__"+(new Date).getTime(),i={};return{get:function(t,i){var u=r(t,!1);return u===n?n:u[i]},set:function(t,i,u){(u!==n||r(t,!1)!==n)&&(r(t,!0)[i]=u)},clear:function(n){var r=n[t];return r?(delete i[r],n[t]=null,!0):!1},O:function(){return u+++t}}};s.b("utils.domData",s.a.h);s.b("utils.domData.clear",s.a.h.clear);s.a.T=new function(){function t(t,i){var r=s.a.h.get(t,u);return r===n&&i&&(r=[],s.a.h.set(t,u,r)),r}function r(n){var i=t(n,!1),u;if(i)for(i=i.slice(0),u=0;u<i.length;u++)i[u](n);if(s.a.h.clear(n),s.a.T.cleanExternalData(n),f[n.nodeType])for(i=n.firstChild;n=i;)i=n.nextSibling,8===n.nodeType&&r(n)}var u=s.a.h.O(),e={1:!0,8:!0,9:!0},f={1:!0,9:!0};return{Ea:function(n,i){if("function"!=typeof i)throw Error("Callback must be a function");t(n,!0).push(i)},Dc:function(i,r){var f=t(i,!1);f&&(s.a.Za(f,r),0==f.length&&s.a.h.set(i,u,n))},ma:function(n){var t,i,u;if(e[n.nodeType]&&(r(n),f[n.nodeType]))for(t=[],s.a.Ha(t,n.getElementsByTagName("*")),i=0,u=t.length;i<u;i++)r(t[i]);return n},removeNode:function(n){s.ma(n);n.parentNode&&n.parentNode.removeChild(n)},cleanExternalData:function(n){i&&"function"==typeof i.cleanData&&i.cleanData([n])}}};s.ma=s.a.T.ma;s.removeNode=s.a.T.removeNode;s.b("cleanNode",s.ma);s.b("removeNode",s.removeNode);s.b("utils.domNodeDisposal",s.a.T);s.b("utils.domNodeDisposal.addDisposeCallback",s.a.T.Ea);s.b("utils.domNodeDisposal.removeDisposeCallback",s.a.T.Dc),function(){var h=[0,"",""],u=[1,"<table>","<\/table>"],f=[3,"<table><tbody><tr>","<\/tr><\/tbody><\/table>"],e=[1,"<select multiple='multiple'>","<\/select>"],c={thead:u,tbody:u,tfoot:u,tr:[2,"<table><tbody>","<\/tbody><\/table>"],td:f,th:f,option:e,optgroup:e},o=8>=s.a.L;s.a.Aa=function(n,u){var f,e;if(i){if(i.parseHTML)f=i.parseHTML(n,u)||[];else if((f=i.clean([n],u))&&f[0]){for(e=f[0];e.parentNode&&11!==e.parentNode.nodeType;)e=e.parentNode;e.parentNode&&e.parentNode.removeChild(e)}}else{(f=u)||(f=t);var e=f.parentWindow||f.defaultView||r,v=s.a.rb(n).toLowerCase(),l=f.createElement("div"),a;for(a=(v=v.match(/^<([a-z]+)[ >]/))&&c[v[1]]||h,v=a[0],a="ignored<div>"+a[1]+n+a[2]+"<\/div>","function"==typeof e.innerShiv?l.appendChild(e.innerShiv(a)):(o&&f.appendChild(l),l.innerHTML=a,o&&l.parentNode.removeChild(l));v--;)l=l.lastChild;f=s.a.ga(l.lastChild.childNodes)}return f};s.a.Qb=function(t,r){if(s.a.Gb(t),r=s.a.c(r),null!==r&&r!==n)if("string"!=typeof r&&(r=r.toString()),i)i(t).html(r);else for(var f=s.a.Aa(r,t.ownerDocument),u=0;u<f.length;u++)t.appendChild(f[u])}}();s.b("utils.parseHtmlFragment",s.a.Aa);s.b("utils.setHtml",s.a.Qb);s.N=function(){function i(n,t){var r;if(n)if(8==n.nodeType)r=s.N.zc(n.nodeValue),null!=r&&t.push({Yc:n,pd:r});else if(1==n.nodeType)for(var r=0,u=n.childNodes,f=u.length;r<f;r++)i(u[r],t)}var t={};return{kb:function(n){if("function"!=typeof n)throw Error("You can only pass a function to ko.memoization.memoize()");var i=(4294967296*(1+Math.random())|0).toString(16).substring(1)+(4294967296*(1+Math.random())|0).toString(16).substring(1);return t[i]=n,"<!--[ko_memo:"+i+"]-->"},Kc:function(i,r){var u=t[i];if(u===n)throw Error("Couldn't find any memo with ID "+i+". Perhaps it's already been unmemoized.");try{return u.apply(null,r||[]),!0}finally{delete t[i]}},Ub:function(n,t){var f=[],u,o,r,e;for(i(n,f),u=0,o=f.length;u<o;u++)r=f[u].Yc,e=[r],t&&s.a.Ha(e,t),s.N.Kc(f[u].pd,e),r.nodeValue="",r.parentNode&&r.parentNode.removeChild(r)},zc:function(n){return(n=n.match(/^\[ko_memo\:(.*?)\]$/))?n[1]:null}}}();s.b("memoization",s.N);s.b("memoization.memoize",s.N.kb);s.b("memoization.unmemoize",s.N.Kc);s.b("memoization.parseMemoText",s.N.zc);s.b("memoization.unmemoizeDomNodeAndDescendants",s.N.Ub);s.ia=function(){function f(){if(n)for(var t=n,r=0,f;i<n;)if(f=u[i++]){if(i>t){if(5e3<=++r){i=n;s.a.mc(Error("'Too much recursion' after processing "+r+" task groups."));break}t=n}try{f()}catch(e){s.a.mc(e)}}}function e(){f();i=n=u.length=0}var o,u=[],n=0,h=1,i=0;return o=r.MutationObserver?function(n){var i=t.createElement("div");return new MutationObserver(n).observe(i,{attributes:!0}),function(){i.classList.toggle("foo")}}(e):t&&"onreadystatechange"in t.createElement("script")?function(n){var i=t.createElement("script");i.onreadystatechange=function(){i.onreadystatechange=null;t.documentElement.removeChild(i);i=null;n()};t.documentElement.appendChild(i)}:function(n){setTimeout(n,0)},{scheduler:o,nb:function(t){return n||s.ia.scheduler(e),u[n++]=t,h++},cancel:function(t){t=t-(h-n);t>=i&&t<n&&(u[t]=null)},resetForTesting:function(){var t=n-i;return i=n=u.length=0,t},xd:f}}();s.b("tasks",s.ia);s.b("tasks.schedule",s.ia.nb);s.b("tasks.runEarly",s.ia.xd);s.Ma={throttle:function(n,t){n.throttleEvaluation=t;var i=null;return s.H({read:n,write:function(r){clearTimeout(i);i=s.a.setTimeout(function(){n(r)},t)}})},rateLimit:function(n,t){var i,r,u;"number"==typeof t?i=t:(i=t.timeout,r=t.method);n.vb=!1;u="notifyWhenChangesStop"==r?tt:nt;n.jb(function(n){return u(n,i)})},deferred:function(t,i){if(!0!==i)throw Error("The 'deferred' extender only accepts the value 'true', because it is not supported to turn deferral off once enabled.");t.vb||(t.vb=!0,t.jb(function(i){var u,r=!1;return function(){if(!r){s.ia.cancel(u);u=s.ia.nb(i);try{r=!0;t.notifySubscribers(n,"dirty")}finally{r=!1}}}}))},notify:function(n,t){n.equalityComparer="always"==t?null:w}};g={undefined:1,boolean:1,number:1,string:1};s.b("extenders",s.Ma);s.Ic=function(n,t,i){this.ja=n;this.zb=t;this.Xc=i;this.ca=!1;s.U(this,"dispose",this.m)};s.Ic.prototype.m=function(){this.ca=!0;this.Xc()};s.W=function(){s.a.pb(this,l);l.Jb(this)};l={Jb:function(n){n.R={change:[]};n.$b=1},subscribe:function(n,t,i){var r=this,u;return i=i||"change",u=new s.Ic(r,t?n.bind(t):n,function(){s.a.Za(r.R[i],u);r.Xa&&r.Xa(i)}),r.Ia&&r.Ia(i),r.R[i]||(r.R[i]=[]),r.R[i].push(u),u},notifySubscribers:function(n,t){var u,i,r;if(t=t||"change","change"===t&&this.Vb(),this.eb(t)){u="change"===t&&this.Nc||this.R[t].slice(0);try{for(s.s.fc(),i=0;r=u[i];++i)r.ca||r.zb(n)}finally{s.s.end()}}},bb:function(){return this.$b},fd:function(n){return this.bb()!==n},Vb:function(){++this.$b},jb:function(n){var t=this,o=s.M(t),u,f,r,i,e;t.Wa||(t.Wa=t.notifySubscribers,t.notifySubscribers=it);e=n(function(){t.Ua=!1;o&&i===t&&(i=t.Wb?t.Wb():t());var n=f||t.hb(r,i);f=u=!1;n&&t.Wa(r=i)});t.Zb=function(n){t.Nc=t.R.change.slice(0);t.Ua=u=!0;i=n;e()};t.Yb=function(n){u||(r=n,t.Wa(n,"beforeChange"))};t.Pc=function(){t.hb(r,t.C(!0))&&(f=!0)}},eb:function(n){return this.R[n]&&this.R[n].length},dd:function(n){if(n)return this.R[n]&&this.R[n].length||0;var t=0;return s.a.P(this.R,function(n,i){"dirty"!==n&&(t+=i.length)}),t},hb:function(n,t){return!this.equalityComparer||!this.equalityComparer(n,t)},extend:function(n){var t=this;return n&&s.a.P(n,function(n,i){var r=s.Ma[n];"function"==typeof r&&(t=r(t,i)||t)}),t}};s.U(l,"subscribe",l.subscribe);s.U(l,"extend",l.extend);s.U(l,"getSubscriptionsCount",l.dd);s.a.wa&&s.a.setPrototypeOf(l,Function.prototype);s.W.fn=l;s.vc=function(n){return null!=n&&"function"==typeof n.subscribe&&"function"==typeof n.notifySubscribers};s.b("subscribable",s.W);s.b("isSubscribable",s.vc);s.La=s.s=function(){function t(t){r.push(n);n=t}function i(){n=r.pop()}var r=[],n,u=0;return{fc:t,end:i,Cc:function(t){if(n){if(!s.vc(t))throw Error("Only subscribable things can act as dependencies");n.zb.call(n.Tc,t,t.Oc||(t.Oc=++u))}},B:function(n,r,u){try{return t(),n.apply(r,u||[])}finally{i()}},Na:function(){if(n)return n.u.Na()},ib:function(){if(n)return n.ib}}}();s.b("computedContext",s.La);s.b("computedContext.getDependenciesCount",s.La.Na);s.b("computedContext.isInitial",s.La.ib);s.b("ignoreDependencies",s.Ad=s.s.B);v=s.a.kc("_latestValue");s.aa=function(n){function t(){return 0<arguments.length?(t.hb(t[v],arguments[0])&&(t.sa(),t[v]=arguments[0],t.ra()),this):(s.s.Cc(t),t[v])}return t[v]=n,s.a.wa||s.a.extend(t,s.W.fn),s.W.fn.Jb(t),s.a.pb(t,a),s.options.deferUpdates&&s.Ma.deferred(t,!0),t};a={equalityComparer:w,C:function(){return this[v]},ra:function(){this.notifySubscribers(this[v])},sa:function(){this.notifySubscribers(this[v],"beforeChange")}};s.a.wa&&s.a.setPrototypeOf(a,s.W.fn);y=s.aa.ua="__ko_proto__";a[y]=s.aa;s.cb=function(t,i){return null===t||t===n||t[y]===n?!1:t[y]===i?!0:s.cb(t[y],i)};s.M=function(n){return s.cb(n,s.aa)};s.Oa=function(n){return"function"==typeof n&&n[y]===s.aa||"function"==typeof n&&n[y]===s.H&&n.gd?!0:!1};s.b("observable",s.aa);s.b("isObservable",s.M);s.b("isWriteableObservable",s.Oa);s.b("isWritableObservable",s.Oa);s.b("observable.fn",a);s.U(a,"peek",a.C);s.U(a,"valueHasMutated",a.ra);s.U(a,"valueWillMutate",a.sa);s.za=function(n){if(n=n||[],"object"!=typeof n||!("length"in n))throw Error("The argument passed when initializing an observable array must be an array, or null, or undefined.");return n=s.aa(n),s.a.pb(n,s.za.fn),n.extend({trackArrayChanges:!0})};s.za.fn={remove:function(n){for(var u,r=this.C(),i=[],f="function"!=typeof n||s.M(n)?function(t){return t===n}:n,t=0;t<r.length;t++)u=r[t],f(u)&&(0===i.length&&this.sa(),i.push(u),r.splice(t,1),t--);return i.length&&this.ra(),i},removeAll:function(t){if(t===n){var i=this.C(),r=i.slice(0);return this.sa(),i.splice(0,i.length),this.ra(),r}return t?this.remove(function(n){return 0<=s.a.A(t,n)}):[]},destroy:function(n){var i=this.C(),r="function"!=typeof n||s.M(n)?function(t){return t===n}:n,t;for(this.sa(),t=i.length-1;0<=t;t--)r(i[t])&&(i[t]._destroy=!0);this.ra()},destroyAll:function(t){return t===n?this.destroy(function(){return!0}):t?this.destroy(function(n){return 0<=s.a.A(t,n)}):[]},indexOf:function(n){var t=this();return s.a.A(t,n)},replace:function(n,t){var i=this.indexOf(n);0<=i&&(this.sa(),this.C()[i]=t,this.ra())}};s.a.wa&&s.a.setPrototypeOf(s.za.fn,s.aa.fn);s.a.F("pop push reverse shift sort splice unshift".split(" "),function(n){s.za.fn[n]=function(){var t=this.C(),i;return this.sa(),this.gc(t,n,arguments),i=t[n].apply(t,arguments),this.ra(),i===t?this:i}});s.a.F(["slice"],function(n){s.za.fn[n]=function(){var t=this();return t[n].apply(t,arguments)}});s.b("observableArray",s.za);s.Ma.trackArrayChanges=function(t,i){function l(){if(!f){f=!0;u=t.notifySubscribers;t.notifySubscribers=function(n,t){return t&&"change"!==t||++e,u.apply(this,arguments)};var n=[].concat(t.C()||[]);r=null;o=t.subscribe(function(i){if(i=[].concat(i||[]),t.eb("arrayChange")){var u;(!r||1<e)&&(r=s.a.Bb(n,i,t.Ab));u=r}n=i;r=null;e=0;u&&u.length&&t.notifySubscribers(u,"arrayChange")})}}if(t.Ab={},i&&"object"==typeof i&&s.a.extend(t.Ab,i),t.Ab.sparse=!0,!t.gc){var f=!1,r=null,o,e=0,u,h=t.Ia,c=t.Xa;t.Ia=function(n){h&&h.call(t,n);"arrayChange"===n&&l()};t.Xa=function(i){c&&c.call(t,i);"arrayChange"!==i||t.eb("arrayChange")||(u&&(t.notifySubscribers=u,u=n),o.m(),f=!1)};t.gc=function(n,t,i){function c(n,t,i){return l[l.length]={status:n,value:t,index:i}}if(f&&!e){var l=[],u=n.length,h=i.length,o=0;switch(t){case"push":o=u;case"unshift":for(t=0;t<h;t++)c("added",i[t],o+t);break;case"pop":o=u-1;case"shift":u&&c("deleted",n[o],o);break;case"splice":t=Math.min(Math.max(0,0>i[0]?u+i[0]:i[0]),u);for(var u=1===h?u:Math.min(t+(i[1]||0),u),h=t+h-2,o=Math.max(u,h),a=[],v=[],y=2;t<o;++t,++y)t<u&&v.push(c("deleted",n[t],t)),t<h&&a.push(c("added",i[y],t));s.a.rc(v,a);break;default:return}r=l}}}};h=s.a.kc("_state");s.u=s.H=function(t,i,r){function u(){if(0<arguments.length){if("function"==typeof e)e.apply(f.Hb,arguments);else throw Error("Cannot write a value to a ko.computed unless you specify a 'write' option. If you wish to read the current value, don't pass any parameters.");return this}return s.s.Cc(u),(f.fa||f.I&&u.fb())&&u.da(),f.$}if("object"==typeof t?r=t:(r=r||{},t&&(r.read=t)),"function"!=typeof r.read)throw Error("Pass a function that returns the value of the ko.computed");var e=r.write,f={$:n,oa:!0,fa:!0,gb:!1,Sb:!1,ca:!1,mb:!1,I:!1,vd:r.read,Hb:i||r.owner,j:r.disposeWhenNodeIsRemoved||r.j||null,xa:r.disposeWhen||r.xa,Fb:null,G:{},Z:0,pc:null};return u[h]=f,u.gd="function"==typeof e,s.a.wa||s.a.extend(u,s.W.fn),s.W.fn.Jb(u),s.a.pb(u,c),r.pure?(f.mb=!0,f.I=!0,s.a.extend(u,ft)):r.deferEvaluation&&s.a.extend(u,et),s.options.deferUpdates&&s.Ma.deferred(u,!0),f.j&&(f.Sb=!0,f.j.nodeType||(f.j=null)),f.I||r.deferEvaluation||u.da(),f.j&&u.ea()&&s.a.T.Ea(f.j,f.Fb=function(){u.m()}),u};var c={equalityComparer:w,Na:function(){return this[h].Z},bc:function(n,t,i){if(this[h].mb&&t===this)throw Error("A 'pure' computed must not be called recursively");this[h].G[n]=i;i.Va=this[h].Z++;i.Da=t.bb()},fb:function(){var t,n,i=this[h].G;for(t in i)if(i.hasOwnProperty(t)&&(n=i[t],this.Ca&&n.ja.Ua||n.ja.fd(n.Da)))return!0},od:function(){this.Ca&&!this[h].gb&&this.Ca(!1)},ea:function(){var n=this[h];return n.fa||0<n.Z},wd:function(){this.Ua?this[h].fa&&(this[h].oa=!0):this.oc()},Hc:function(n){if(n.vb&&!this[h].j){var t=n.subscribe(this.od,this,"dirty"),i=n.subscribe(this.wd,this);return{ja:n,m:function(){t.m();i.m()}}}return n.subscribe(this.oc,this)},oc:function(){var n=this,t=n.throttleEvaluation;t&&0<=t?(clearTimeout(this[h].pc),this[h].pc=s.a.setTimeout(function(){n.da(!0)},t)):n.Ca?n.Ca(!0):n.da(!0)},da:function(n){var t=this[h],i=t.xa,r=!1;if(!t.gb&&!t.ca){if(t.j&&!s.a.ab(t.j)||i&&i()){if(!t.Sb){this.m();return}}else t.Sb=!1;t.gb=!0;try{r=this.bd(n)}finally{t.gb=!1}return t.Z||this.m(),r}},bd:function(t){var i=this[h],u=!1,f=i.mb?n:!i.Z,r={Uc:this,$a:i.G,Eb:i.Z};return s.s.fc({Tc:r,zb:ut,u:this,ib:f}),i.G={},i.Z=0,r=this.ad(i,r),this.hb(i.$,r)&&(i.I||this.notifySubscribers(i.$,"beforeChange"),i.$=r,i.I?this.Vb():t&&this.notifySubscribers(i.$),u=!0),f&&this.notifySubscribers(i.$,"awake"),u},ad:function(n,t){try{var i=n.vd;return n.Hb?i.call(n.Hb):i()}finally{s.s.end();t.Eb&&!n.I&&s.a.P(t.$a,rt);n.oa=n.fa=!1}},C:function(n){var t=this[h];return(t.fa&&(n||!t.Z)||t.I&&this.fb())&&this.da(),t.$},jb:function(n){s.W.fn.jb.call(this,n);this.Wb=function(){return this[h].oa?this.da():this[h].fa=!1,this[h].$};this.Ca=function(n){this.Yb(this[h].$);this[h].fa=!0;n&&(this[h].oa=!0);this.Zb(this)}},m:function(){var n=this[h];!n.I&&n.G&&s.a.P(n.G,function(n,t){t.m&&t.m()});n.j&&n.Fb&&s.a.T.Dc(n.j,n.Fb);n.G=null;n.Z=0;n.ca=!0;n.oa=!1;n.fa=!1;n.I=!1;n.j=null}},ft={Ia:function(n){var i=this,t=i[h],r;!t.ca&&t.I&&"change"==n&&(t.I=!1,t.oa||i.fb()?(t.G=null,t.Z=0,i.da()&&i.Vb()):(r=[],s.a.P(t.G,function(n,t){r[t.Va]=n}),s.a.F(r,function(n,r){var f=t.G[n],u=i.Hc(f.ja);u.Va=r;u.Da=f.Da;t.G[n]=u})),t.ca||i.notifySubscribers(t.$,"awake"))},Xa:function(t){var i=this[h];i.ca||"change"!=t||this.eb("change")||(s.a.P(i.G,function(n,t){t.m&&(i.G[n]={ja:t.ja,Va:t.Va,Da:t.Da},t.m())}),i.I=!0,this.notifySubscribers(n,"asleep"))},bb:function(){var n=this[h];return n.I&&(n.oa||this.fb())&&this.da(),s.W.fn.bb.call(this)}},et={Ia:function(n){"change"!=n&&"beforeChange"!=n||this.C()}};s.a.wa&&s.a.setPrototypeOf(c,s.W.fn);k=s.aa.ua;s.u[k]=s.aa;c[k]=s.u;s.jd=function(n){return s.cb(n,s.u)};s.kd=function(n){return s.cb(n,s.u)&&n[h]&&n[h].mb};s.b("computed",s.u);s.b("dependentObservable",s.u);s.b("isComputed",s.jd);s.b("isPureComputed",s.kd);s.b("computed.fn",c);s.U(c,"peek",c.C);s.U(c,"dispose",c.m);s.U(c,"isActive",c.ea);s.U(c,"getDependenciesCount",c.Na);s.Bc=function(n,t){return"function"==typeof n?s.u(n,t,{pure:!0}):(n=s.a.extend({},n),n.pure=!0,s.u(n,t))};s.b("pureComputed",s.Bc),function(){function i(u,f,e){if(e=e||new t,u=f(u),"object"!=typeof u||null===u||u===n||u instanceof RegExp||u instanceof Date||u instanceof String||u instanceof Number||u instanceof Boolean)return u;var o=u instanceof Array?[]:{};return e.save(u,o),r(u,function(t){var r=f(u[t]),s;switch(typeof r){case"boolean":case"number":case"string":case"function":o[t]=r;break;case"object":case"undefined":s=e.get(r);o[t]=s!==n?s:i(r,f,e)}}),o}function r(n,t){if(n instanceof Array){for(var i=0;i<n.length;i++)t(i);"function"==typeof n.toJSON&&t("toJSON")}else for(i in n)t(i)}function t(){this.keys=[];this.values=[]}s.Jc=function(n){if(0==arguments.length)throw Error("When calling ko.toJS, pass the object you want to convert.");return i(n,function(n){for(var t=0;s.M(n)&&10>t;t++)n=n();return n})};s.toJSON=function(n,t,i){return n=s.Jc(n),s.a.Rb(n,t,i)};t.prototype={constructor:t,save:function(n,t){var i=s.a.A(this.keys,n);0<=i?this.values[i]=t:(this.keys.push(n),this.values.push(t))},get:function(t){return t=s.a.A(this.keys,t),0<=t?this.values[t]:n}}}();s.b("toJS",s.Jc);s.b("toJSON",s.toJSON),function(){s.o={J:function(t){switch(s.a.K(t)){case"option":return!0===t.__ko__hasDomDataOptionValue__?s.a.h.get(t,s.g.options.Lb):7>=s.a.L?t.getAttributeNode("value")&&t.getAttributeNode("value").specified?t.value:t.text:t.value;case"select":return 0<=t.selectedIndex?s.o.J(t.options[t.selectedIndex]):n;default:return t.value}},ta:function(t,i,r){switch(s.a.K(t)){case"option":switch(typeof i){case"string":s.a.h.set(t,s.g.options.Lb,n);"__ko__hasDomDataOptionValue__"in t&&delete t.__ko__hasDomDataOptionValue__;t.value=i;break;default:s.a.h.set(t,s.g.options.Lb,i);t.__ko__hasDomDataOptionValue__=!0;t.value="number"==typeof i?i:""}break;case"select":(""===i||null===i)&&(i=n);for(var f=-1,u=0,o=t.options.length,e;u<o;++u)if(e=s.o.J(t.options[u]),e==i||""==e&&i===n){f=u;break}(r||0<=f||i===n&&1<t.size)&&(t.selectedIndex=f);break;default:(null===i||i===n)&&(i="");t.value=i}}}}();s.b("selectExtensions",s.o);s.b("selectExtensions.readValue",s.o.J);s.b("selectExtensions.writeValue",s.o.ta);s.l=function(){function n(n){var c,u,i;n=s.a.rb(n);123===n.charCodeAt(0)&&(n=n.slice(1,-1));var a=[],h=n.match(t),o,r=[],l=0;if(h)for(h.push(","),c=0;u=h[c];++c){if(i=u.charCodeAt(0),44===i){if(0>=l){a.push(o&&r.length?{key:o,value:r.join("")}:{unknown:o||r.join("")});o=l=0;r=[];continue}}else if(58===i){if(!l&&!o&&1===r.length){o=r.pop();continue}}else 47===i&&c&&1<u.length?(i=h[c-1].match(f))&&!e[i[0]]&&(n=n.substr(n.indexOf(u)+1),h=n.match(t),h.push(","),c=-1,u="/"):40===i||123===i||91===i?++l:41===i||125===i||93===i?--l:o||r.length||34!==i&&39!==i||(u=u.slice(1,-1));r.push(u)}return a}var r=["true","false","null","undefined"],u=/^(?:[$_a-z][$\w]*|(.+)(\.\s*[$_a-z][$\w]*|\[.+\]))$/i,t=RegExp("\"(?:[^\"\\\\]|\\\\.)*\"|'(?:[^'\\\\]|\\\\.)*'|/(?:[^/\\\\]|\\\\.)*/w*|[^\\s:,/][^,\"'{}()/:[\\]]*[^\\s,\"'{}()/:[\\]]|[^\\s]","g"),f=/[\])"'A-Za-z0-9_$]+$/,e={"in":1,"return":1,"typeof":1},i={};return{Ja:[],qa:i,Mb:n,lb:function(t,f){function e(n,t){var a,f;if(!l){if(f=s.getBindingHandler(n),f&&f.preprocess&&!(t=f.preprocess(t,n,e)))return;(f=i[n])&&(a=t,0<=s.a.A(r,a)?a=!1:(f=a.match(u),a=null===f?!1:f[1]?"Object("+f[1]+")"+f[2]:a),f=a);f&&o.push("'"+n+"':function(_z){"+a+"=_z}")}c&&(t="function(){return "+t+" }");h.push("'"+n+"':"+t)}f=f||{};var h=[],o=[],c=f.valueAccessors,l=f.bindingParams,a="string"==typeof t?n(t):t;return s.a.F(a,function(n){e(n.key||n.unknown,n.value)}),o.length&&e("_ko_property_writers","{"+o.join(",")+" }"),h.join(",")},nd:function(n,t){for(var i=0;i<n.length;i++)if(n[i].key==t)return!0;return!1},Ta:function(n,t,i,r,u){n&&s.M(n)?!s.Oa(n)||u&&n.C()===r||n(r):(n=t.get("_ko_property_writers"))&&n[i]&&n[i](r)}}}();s.b("expressionRewriting",s.l);s.b("expressionRewriting.bindingRewriteValidators",s.l.Ja);s.b("expressionRewriting.parseObjectLiteral",s.l.Mb);s.b("expressionRewriting.preProcessBindings",s.l.lb);s.b("expressionRewriting._twoWayBindings",s.l.qa);s.b("jsonExpressionRewriting",s.l);s.b("jsonExpressionRewriting.insertPropertyAccessorsIntoJson",s.l.lb),function(){function n(n){return 8==n.nodeType&&e.test(i?n.text:n.nodeValue)}function r(n){return 8==n.nodeType&&o.test(i?n.text:n.nodeValue)}function u(t,i){for(var u=t,f=1,e=[];u=u.nextSibling;){if(r(u)&&(f--,0===f))return e;e.push(u);n(u)&&f++}if(!i)throw Error("Cannot find closing comment tag to match: "+t.nodeValue);return null}function f(n,t){var i=u(n,t);return i?0<i.length?i[i.length-1].nextSibling:n.nextSibling:null}var i=t&&"<!--test-->"===t.createComment("test").text,e=i?/^\x3c!--\s*ko(?:\s+([\s\S]+))?\s*--\x3e$/:/^\s*ko(?:\s+([\s\S]+))?\s*$/,o=i?/^\x3c!--\s*\/ko\s*--\x3e$/:/^\s*\/ko\s*$/,h={ul:!0,ol:!0};s.f={ka:{},childNodes:function(t){return n(t)?u(t):t.childNodes},ya:function(t){if(n(t)){t=s.f.childNodes(t);for(var i=0,r=t.length;i<r;i++)s.removeNode(t[i])}else s.a.Gb(t)},ha:function(t,i){if(n(t)){s.f.ya(t);for(var u=t.nextSibling,r=0,f=i.length;r<f;r++)u.parentNode.insertBefore(i[r],u)}else s.a.ha(t,i)},Ac:function(t,i){n(t)?t.parentNode.insertBefore(i,t.nextSibling):t.firstChild?t.insertBefore(i,t.firstChild):t.appendChild(i)},uc:function(t,i,r){r?n(t)?t.parentNode.insertBefore(i,r.nextSibling):r.nextSibling?t.insertBefore(i,r.nextSibling):t.appendChild(i):s.f.Ac(t,i)},firstChild:function(t){return n(t)?!t.nextSibling||r(t.nextSibling)?null:t.nextSibling:t.firstChild},nextSibling:function(t){return n(t)&&(t=f(t)),t.nextSibling&&r(t.nextSibling)?null:t.nextSibling},ed:n,zd:function(n){return(n=(i?n.text:n.nodeValue).match(e))?n[1]:null},yc:function(t){var o,i,u,e;if(h[s.a.K(t)]&&(o=t.firstChild,o))do if(1===o.nodeType){if(i=o.firstChild,u=null,i)do u?u.push(i):n(i)?(e=f(i,!0),e?i=e:u=[i]):r(i)&&(u=[i]);while(i=i.nextSibling);if(i=u)for(u=o.nextSibling,e=0;e<i.length;e++)u?t.insertBefore(i[e],u):t.appendChild(i[e])}while(o=o.nextSibling)}}}();s.b("virtualElements",s.f);s.b("virtualElements.allowedBindings",s.f.ka);s.b("virtualElements.emptyNode",s.f.ya);s.b("virtualElements.insertAfter",s.f.uc);s.b("virtualElements.prepend",s.f.Ac);s.b("virtualElements.setDomNodeChildren",s.f.ha),function(){s.Y=function(){this.Sc={}};s.a.extend(s.Y.prototype,{nodeHasBindings:function(n){switch(n.nodeType){case 1:return null!=n.getAttribute("data-bind")||s.i.getComponentNameForNode(n);case 8:return s.f.ed(n);default:return!1}},getBindings:function(n,t){var i=this.getBindingsString(n,t),i=i?this.parseBindingsString(i,t,n):null;return s.i.ac(i,n,t,!1)},getBindingAccessors:function(n,t){var i=this.getBindingsString(n,t),i=i?this.parseBindingsString(i,t,n,{valueAccessors:!0}):null;return s.i.ac(i,n,t,!0)},getBindingsString:function(n){switch(n.nodeType){case 1:return n.getAttribute("data-bind");case 8:return s.f.zd(n);default:return null}},parseBindingsString:function(n,t,i,r){var u,f,e,h,c;try{return u=this.Sc,f=n+(r&&r.valueAccessors||""),(e=u[f])||(c="with($context){with($data||{}){return{"+s.l.lb(n,r)+"}}}",h=new Function("$context","$element",c),e=u[f]=h),e(t,i)}catch(o){throw o.message="Unable to parse bindings.\nBindings value: "+n+"\nMessage: "+o.message,o;}}});s.Y.instance=new s.Y}();s.b("bindingProvider",s.Y),function(){function v(n){return function(){return n}}function u(n){return n()}function o(n){return s.a.Qa(s.s.B(n),function(t,i){return function(){return n()[i]}})}function y(n,t,i){return"function"==typeof n?o(n.bind(null,t,i)):s.a.Qa(n,v)}function p(n,t){return o(this.getBindings.bind(this,n,t))}function h(n,t,i){var r,u=s.f.firstChild(t),f=s.Y.instance,e=f.preprocessNode;if(e){for(;r=u;)u=s.f.nextSibling(r),e.call(f,r);u=s.f.firstChild(t)}for(;r=u;)u=s.f.nextSibling(r),c(n,r,i)}function c(n,t,i){var u=!0,r=1===t.nodeType;r&&s.f.yc(t);(r&&i||s.Y.instance.nodeHasBindings(t))&&(u=l(t,null,n,i).shouldBindDescendants);u&&!a[s.a.K(t)]&&h(n,t,!r)}function w(n){var i=[],r={},t=[];return s.a.P(n,function u(f){if(!r[f]){var e=s.getBindingHandler(f);e&&(e.after&&(t.push(f),s.a.F(e.after,function(i){if(n[i]){if(-1!==s.a.A(t,i))throw Error("Cannot combine the following bindings, because they have a cyclic dependency: "+t.join(", "));u(i)}}),t.length--),i.push({key:f,tc:e}));r[f]=!0}}),i}function l(t,i,r,e){var v=s.a.h.get(t,f),o,l,c,a;if(!i){if(v)throw Error("You cannot apply bindings multiple times to the same element.");s.a.h.set(t,f,!0)}if(!v&&e&&s.Gc(t,r),i&&"function"!=typeof i)o=i;else{var y=s.Y.instance,b=y.getBindingAccessors||p,h=s.H(function(){return(o=i?i(r,t):b.call(y,t,r))&&r.ba&&r.ba(),o},null,{j:t});o&&h.ea()||(h=null)}return o&&(c=function(){return s.a.Qa(h?h():o,u)},a=h?function(n){return function(){return u(h()[n])}}:function(n){return o[n]},c.get=function(n){return o[n]&&u(a(n))},c.has=function(n){return n in o},e=w(o),s.a.F(e,function(i){var e=i.tc.init,h=i.tc.update,u=i.key;if(8===t.nodeType&&!s.f.ka[u])throw Error("The binding '"+u+"' cannot be used with virtual elements");try{"function"==typeof e&&s.s.B(function(){var i=e(t,a(u),c,r.$data,r);if(i&&i.controlsDescendantBindings){if(l!==n)throw Error("Multiple bindings ("+l+" and "+u+") are trying to control descendant bindings of the same element. You cannot use these bindings together on the same element.");l=u}});"function"==typeof h&&s.H(function(){h(t,a(u),c,r.$data,r)},null,{j:t})}catch(f){throw f.message='Unable to process binding "'+u+": "+o[u]+'"\nMessage: '+f.message,f;}})),{shouldBindDescendants:l===n}}function t(n){return n&&n instanceof s.S?n:new s.S(n)}var a,f,e;s.g={};a={script:!0,textarea:!0,template:!0};s.getBindingHandler=function(n){return s.g[n]};s.S=function(t,i,r,u,f){function c(){var f=a?t():t,n=s.a.c(f);return i?(i.ba&&i.ba(),s.a.extend(e,i),e.ba=o):(e.$parents=[],e.$root=n,e.ko=s),e.$rawData=f,e.$data=n,r&&(e[r]=n),u&&u(e,i,n),e.$data}function l(){return h&&!s.a.cc(h)}var e=this,a="function"==typeof t&&!s.M(t),h,o;f&&f.exportDependencies?c():(o=s.H(c,null,{xa:l,j:!0}),o.ea()&&(e.ba=o,o.equalityComparer=null,h=[],o.Lc=function(t){h.push(t);s.a.T.Ea(t,function(t){s.a.Za(h,t);h.length||(o.m(),e.ba=o=n)})}))};s.S.prototype.createChildContext=function(n,t,i,r){return new s.S(n,this,t,function(n,t){n.$parentContext=t;n.$parent=t.$data;n.$parents=(t.$parents||[]).slice(0);n.$parents.unshift(n.$parent);i&&i(n)},r)};s.S.prototype.extend=function(n){return new s.S(this.ba||this.$data,this,null,function(t,i){t.$rawData=i.$rawData;s.a.extend(t,"function"==typeof n?n():n)})};s.S.prototype.jc=function(n,t){return this.createChildContext(n,t,null,{exportDependencies:!0})};f=s.a.h.O();e=s.a.h.O();s.Gc=function(n,t){if(2==arguments.length)s.a.h.set(n,e,t),t.ba&&t.ba.Lc(n);else return s.a.h.get(n,e)};s.Ya=function(n,i,r){return 1===n.nodeType&&s.f.yc(n),l(n,i,t(r),!0)};s.Qc=function(n,i,r){return r=t(r),s.Ya(n,y(i,r,n),r)};s.xb=function(n,i){1!==i.nodeType&&8!==i.nodeType||h(t(n),i,!0)};s.wb=function(n,u){if(!i&&r.jQuery&&(i=r.jQuery),u&&1!==u.nodeType&&8!==u.nodeType)throw Error("ko.applyBindings: first parameter should be your view model; second parameter should be a DOM node");u=u||r.document.body;c(t(n),u,!0)};s.Db=function(t){switch(t.nodeType){case 1:case 8:var i=s.Gc(t);if(i)return i;if(t.parentNode)return s.Db(t.parentNode)}return n};s.Wc=function(t){return(t=s.Db(t))?t.$data:n};s.b("bindingHandlers",s.g);s.b("applyBindings",s.wb);s.b("applyBindingsToDescendants",s.xb);s.b("applyBindingAccessorsToNode",s.Ya);s.b("applyBindingsToNode",s.Qc);s.b("contextFor",s.Db);s.b("dataFor",s.Wc)}(),function(n){function u(t,u){var e=i.hasOwnProperty(t)?i[t]:n,o;e?e.subscribe(u):(e=i[t]=new s.W,e.subscribe(u),f(t,function(n,u){var f=!(!u||!u.synchronous);r[t]={definition:n,ld:f};delete i[t];o||f?e.notifySubscribers(n):s.ia.nb(function(){e.notifySubscribers(n)})}),o=!0)}function f(n,i){t("getConfig",[n],function(r){r?t("loadComponent",[n,r],function(n){i(n,r)}):i(null,null)})}function t(i,r,u,f){var e,o,h;if(f||(f=s.i.loaders.slice(0)),e=f.shift(),e)if(o=e[i],o){if(h=!1,o.apply(e,r.concat(function(n){h?u(null):null!==n?u(n):t(i,r,u,f)}))!==n&&(h=!0,!e.suppressLoaderExceptions))throw Error("Component loaders must supply values by invoking the callback, not by returning values synchronously.");}else t(i,r,u,f);else u(null)}var i={},r={};s.i={get:function(t,i){var f=r.hasOwnProperty(t)?r[t]:n;f?f.ld?s.s.B(function(){i(f.definition)}):s.ia.nb(function(){i(f.definition)}):u(t,i)},ic:function(n){delete r[n]},Xb:t};s.i.loaders=[];s.b("components",s.i);s.b("components.get",s.i.get);s.b("components.clearCachedDefinition",s.i.ic)}(),function(){function l(n,t,r,f){function e(){0==--c&&f(o)}var o={},c=2,h=r.template;r=r.viewModel;h?u(t,h,function(t){s.i.Xb("loadTemplate",[n,t],function(n){o.template=n;e()})}):e();r?u(t,r,function(t){s.i.Xb("loadViewModel",[n,t],function(n){o[i]=n;e()})}):e()}function e(n,t,r){if("function"==typeof t)r(function(n){return new t(n)});else if("function"==typeof t[i])r(t[i]);else if("instance"in t){var u=t.instance;r(function(){return u})}else"viewModel"in t?e(n,t.viewModel,r):n("Unknown viewModel value: "+t)}function h(n){switch(s.a.K(n)){case"script":return s.a.Aa(n.text);case"textarea":return s.a.Aa(n.value);case"template":if(c(n.content))return s.a.Ka(n.content.childNodes)}return s.a.Ka(n.childNodes)}function c(n){return r.DocumentFragment?n instanceof DocumentFragment:n&&11===n.nodeType}function u(n,t,i){"string"==typeof t.require?o||r.require?(o||r.require)([t.require],i):n("Uses require, but no AMD loader is present"):i(t)}function f(n){return function(t){throw Error("Component '"+n+"': "+t);}}var n={},i;s.i.register=function(t,i){if(!i)throw Error("Invalid configuration for "+t);if(s.i.Kb(t))throw Error("Component "+t+" is already registered");n[t]=i};s.i.Kb=function(t){return n.hasOwnProperty(t)};s.i.unregister=function(t){delete n[t];s.i.ic(t)};s.i.lc={getConfig:function(t,i){i(n.hasOwnProperty(t)?n[t]:null)},loadComponent:function(n,t,i){var r=f(n);u(r,t,function(t){l(n,r,t,i)})},loadTemplate:function(n,i,u){if(n=f(n),"string"==typeof i)u(s.a.Aa(i));else if(i instanceof Array)u(i);else if(c(i))u(s.a.ga(i.childNodes));else if(i.element)if(i=i.element,r.HTMLElement?i instanceof HTMLElement:i&&i.tagName&&1===i.nodeType)u(h(i));else if("string"==typeof i){var e=t.getElementById(i);e?u(h(e)):n("Cannot find element with ID "+i)}else n("Unknown element type: "+i);else n("Unknown template value: "+i)},loadViewModel:function(n,t,i){e(f(n),t,i)}};i="createViewModel";s.b("components.register",s.i.register);s.b("components.isRegistered",s.i.Kb);s.b("components.unregister",s.i.unregister);s.b("components.defaultLoader",s.i.lc);s.i.loaders.push(s.i.lc);s.i.Mc=n}(),function(){function n(n,t){var r=n.getAttribute("params");if(r){var r=i.parseBindingsString(r,t,n,{valueAccessors:!0,bindingParams:!0}),r=s.a.Qa(r,function(t){return s.u(t,null,{j:n})}),u=s.a.Qa(r,function(t){var i=t.C();return t.ea()?s.u({read:function(){return s.a.c(t())},write:s.Oa(i)&&function(n){t()(n)},j:n}):i});return u.hasOwnProperty("$raw")||(u.$raw=r),u}return{$raw:{}}}s.i.getComponentNameForNode=function(n){var t=s.a.K(n);if(s.i.Kb(t)&&(-1!=t.indexOf("-")||"[object HTMLUnknownElement]"==""+n||8>=s.a.L&&n.tagName===t))return t};s.i.ac=function(t,i,r,u){var f,e;if(1===i.nodeType&&(f=s.i.getComponentNameForNode(i),f)){if(t=t||{},t.component)throw Error('Cannot use the "component" binding on a custom element matching a component');e={name:f,params:n(i,r)};t.component=u?function(){return e}:e}return t};var i=new s.Y;9>s.a.L&&(s.i.register=function(n){return function(){return n.apply(this,arguments)}}(s.i.register),t.createDocumentFragment=function(n){return function(){var t=n(),i=s.i.Mc,r;for(r in i);return t}}(t.createDocumentFragment))}(),function(n){function t(n,t,i){if(t=t.template,!t)throw Error("Component '"+n+"' has no template");n=s.a.Ka(t);s.f.ha(i,n)}function i(n,t,i,r){var u=n.createViewModel;return u?u.call(n,r,{element:t,templateNodes:i}):r}var r=0;s.g.component={init:function(u,f,e,o,h){function a(){var n=c&&c.dispose;"function"==typeof n&&n.call(c);l=c=null}var c,l,v=s.a.ga(s.f.childNodes(u));return s.a.T.Ea(u,a),s.u(function(){var o=s.a.c(f()),e,y,p;if("string"==typeof o?e=o:(e=s.a.c(o.name),y=s.a.c(o.params)),!e)throw Error("No component name specified");p=l=++r;s.i.get(e,function(r){if(l===p){if(a(),!r)throw Error("Unknown component '"+e+"'");t(e,r,u);var f=i(r,u,v,y);r=h.createChildContext(f,n,function(n){n.$component=f;n.$componentTemplateNodes=v});c=f;s.xb(r,u)}})},null,{j:u}),{controlsDescendantBindings:!0}}};s.f.ka.component=!0}();d={"class":"className","for":"htmlFor"};s.g.attr={update:function(t,i){var r=s.a.c(i())||{};s.a.P(r,function(i,r){r=s.a.c(r);var u=!1===r||null===r||r===n;u&&t.removeAttribute(i);8>=s.a.L&&i in d?(i=d[i],u?t.removeAttribute(i):t[i]=r):u||t.setAttribute(i,r.toString());"name"===i&&s.a.Ec(t,u?"":r.toString())})}},function(){s.g.checked={after:["value","attr"],init:function(t,i,r){function l(){var l=t.checked,o=y?f():l,n,h;s.La.ib()||e&&!l||(n=s.s.B(i),u?(h=a?n.C():n,c!==o?(l&&(s.a.Fa(h,o,!0),s.a.Fa(h,c,!1)),c=o):s.a.Fa(h,o,l),a&&s.Oa(n)&&n(h)):s.l.Ta(n,r,"checked",o,!0))}function v(){var n=s.a.c(i());t.checked=u?0<=s.a.A(n,f()):h?n:f()===n}var f=s.Bc(function(){return r.has("checkedValue")?s.a.c(r.get("checkedValue")):r.has("value")?s.a.c(r.get("value")):t.value}),h="checkbox"==t.type,e="radio"==t.type;if(h||e){var o=i(),u=h&&s.a.c(o)instanceof Array,a=!(u&&o.push&&o.splice),c=u?f():n,y=e||u;e&&!t.name&&s.g.uniqueName.init(t,function(){return!0});s.u(l,null,{j:t});s.a.D(t,"click",l);s.u(v,null,{j:t});o=n}}};s.l.qa.checked=!0;s.g.checkedValue={update:function(n,t){n.value=s.a.c(t())}}}();s.g.css={update:function(n,t){var i=s.a.c(t());null!==i&&"object"==typeof i?s.a.P(i,function(t,i){i=s.a.c(i);s.a.ub(n,t,i)}):(i=s.a.rb(String(i||"")),s.a.ub(n,n.__ko__cssValue,!1),n.__ko__cssValue=i,s.a.ub(n,i,!0))}};s.g.enable={update:function(n,t){var i=s.a.c(t());i&&n.disabled?n.removeAttribute("disabled"):i||n.disabled||(n.disabled=!0)}};s.g.disable={update:function(n,t){s.g.enable.update(n,function(){return!s.a.c(t())})}};s.g.event={init:function(n,t,i,r,u){var f=t()||{};s.a.P(f,function(f){"string"==typeof f&&s.a.D(n,f,function(n){var o,h=t()[f],e;if(h){try{e=s.a.ga(arguments);r=u.$data;e.unshift(r);o=h.apply(r,e)}finally{!0!==o&&(n.preventDefault?n.preventDefault():n.returnValue=!1)}!1===i.get(f+"Bubble")&&(n.cancelBubble=!0,n.stopPropagation&&n.stopPropagation())}})})}};s.g.foreach={wc:function(n){return function(){var i=n(),t=s.a.Nb(i);return!t||"number"==typeof t.length?{foreach:i,templateEngine:s.V.ua}:(s.a.c(i),{foreach:t.data,as:t.as,includeDestroyed:t.includeDestroyed,afterAdd:t.afterAdd,beforeRemove:t.beforeRemove,afterRender:t.afterRender,beforeMove:t.beforeMove,afterMove:t.afterMove,templateEngine:s.V.ua})}},init:function(n,t){return s.g.template.init(n,s.g.foreach.wc(t))},update:function(n,t,i,r,u){return s.g.template.update(n,s.g.foreach.wc(t),i,r,u)}};s.l.Ja.foreach=!1;s.f.ka.foreach=!0;s.g.hasfocus={init:function(n,t,i){function r(r){var u,f;if(n.__ko_hasfocusUpdating=!0,u=n.ownerDocument,"activeElement"in u){try{f=u.activeElement}catch(e){f=u.body}r=f===n}u=t();s.l.Ta(u,i,"hasfocus",r,!0);n.__ko_hasfocusLastValue=r;n.__ko_hasfocusUpdating=!1}var u=r.bind(null,!0),f=r.bind(null,!1);s.a.D(n,"focus",u);s.a.D(n,"focusin",u);s.a.D(n,"blur",f);s.a.D(n,"focusout",f)},update:function(n,t){var i=!!s.a.c(t());n.__ko_hasfocusUpdating||n.__ko_hasfocusLastValue===i||(i?n.focus():n.blur(),!i&&n.__ko_hasfocusLastValue&&n.ownerDocument.body.focus(),s.s.B(s.a.Sa,null,[n,i?"focusin":"focusout"]))}};s.l.qa.hasfocus=!0;s.g.hasFocus=s.g.hasfocus;s.l.qa.hasFocus=!0;s.g.html={init:function(){return{controlsDescendantBindings:!0}},update:function(n,t){s.a.Qb(n,t())}};b("if");b("ifnot",!1,!0);b("with",!0,!1,function(n,t){return n.jc(t)});p={};s.g.options={init:function(n){if("select"!==s.a.K(n))throw Error("options binding applies only to SELECT elements");for(;0<n.length;)n.remove(0);return{controlsDescendantBindings:!0}},update:function(t,i,r){function a(){return s.a.Ga(t.options,function(n){return n.selected})}function v(n,t,i){var r=typeof t;return"function"==r?t(n):"string"==r?n[t]:i}function y(n,i){if(o&&e)s.o.ta(t,s.a.c(r.get("value")),!0);else if(f.length){var u=0<=s.a.A(f,s.o.J(i[0]));s.a.Fc(i[0],u);o&&!u&&s.s.B(s.a.Sa,null,[t,"change"])}}var h=t.multiple,c=0!=t.length&&h?t.scrollTop:null,u=s.a.c(i()),e=r.get("valueAllowUnset")&&r.has("value"),w=r.get("optionsIncludeDestroyed"),l,f,o;i={};f=[];e||(h?f=s.a.yb(a(),s.o.J):0<=t.selectedIndex&&f.push(s.o.J(t.options[t.selectedIndex])));u&&("undefined"==typeof u.length&&(u=[u]),l=s.a.Ga(u,function(t){return w||t===n||null===t||!s.a.c(t._destroy)}),r.has("optionsCaption")&&(u=s.a.c(r.get("optionsCaption")),null!==u&&u!==n&&l.unshift(p)));o=!1;i.beforeRemove=function(n){t.removeChild(n)};u=y;r.has("optionsAfterRender")&&"function"==typeof r.get("optionsAfterRender")&&(u=function(t,i){y(0,i);s.s.B(r.get("optionsAfterRender"),null,[i[0],t!==p?t:n])});s.a.ob(t,l,function(i,u,h){return h.length&&(f=!e&&h[0].selected?[s.o.J(h[0])]:[],o=!0),u=t.ownerDocument.createElement("option"),i===p?(s.a.qb(u,r.get("optionsCaption")),s.o.ta(u,n)):(h=v(i,r.get("optionsValue"),i),s.o.ta(u,s.a.c(h)),i=v(i,r.get("optionsText"),h),s.a.qb(u,i)),[u]},i,u);s.s.B(function(){if(e)s.o.ta(t,s.a.c(r.get("value")),!0);else{var n;n=h?f.length&&a().length<f.length:f.length&&0<=t.selectedIndex?s.o.J(t.options[t.selectedIndex])!==f[0]:f.length||0<=t.selectedIndex;n&&s.a.Sa(t,"change")}});s.a.$c(t);c&&20<Math.abs(c-t.scrollTop)&&(t.scrollTop=c)}};s.g.options.Lb=s.a.h.O();s.g.selectedOptions={after:["options","foreach"],init:function(n,t,i){s.a.D(n,"change",function(){var u=t(),r=[];s.a.F(n.getElementsByTagName("option"),function(n){n.selected&&r.push(s.o.J(n))});s.l.Ta(u,i,"selectedOptions",r)})},update:function(n,t){if("select"!=s.a.K(n))throw Error("values binding applies only to SELECT elements");var i=s.a.c(t()),r=n.scrollTop;i&&"number"==typeof i.length&&s.a.F(n.getElementsByTagName("option"),function(n){var t=0<=s.a.A(i,s.o.J(n));n.selected!=t&&s.a.Fc(n,t)});n.scrollTop=r}};s.l.qa.selectedOptions=!0;s.g.style={update:function(t,i){var r=s.a.c(i()||{});s.a.P(r,function(i,r){r=s.a.c(r);(null===r||r===n||!1===r)&&(r="");t.style[i]=r})}};s.g.submit={init:function(n,t,i,r,u){if("function"!=typeof t())throw Error("The value for a submit binding must be a function");s.a.D(n,"submit",function(i){var r,f=t();try{r=f.call(u.$data,n)}finally{!0!==r&&(i.preventDefault?i.preventDefault():i.returnValue=!1)}})}};s.g.text={init:function(){return{controlsDescendantBindings:!0}},update:function(n,t){s.a.qb(n,t())}};s.f.ka.text=!0,function(){if(r&&r.navigator)var t=function(n){if(n)return parseFloat(n[1])},e=r.opera&&r.opera.version&&parseInt(r.opera.version()),i=r.navigator.userAgent,o=t(i.match(/^(?:(?!chrome).)*version\/([^ ]*) safari/i)),h=t(i.match(/Firefox\/([^ ]*)/));if(10>s.a.L)var u=s.a.h.O(),f=s.a.h.O(),c=function(n){var t=this.activeElement;(t=t&&s.a.h.get(t,f))&&t(n)},l=function(n,t){var i=n.ownerDocument;s.a.h.get(i,u)||(s.a.h.set(i,u,!0),s.a.D(i,"selectionchange",c));s.a.h.set(n,f,t)};s.g.textInput={init:function(t,i,r){function u(n,i){s.a.D(t,n,i)}function p(){var r=s.a.c(i());(null===r||r===n)&&(r="");v!==n&&r===v?s.a.setTimeout(p,4):t.value!==r&&(y=r,t.value=r)}function c(){a||(v=t.value,a=s.a.setTimeout(f,4))}function f(){clearTimeout(a);v=a=n;var u=t.value;y!==u&&(y=u,s.l.Ta(i(),r,"textInput",u))}var y=t.value,a,v,w=9==s.a.L?c:f;10>s.a.L?(u("propertychange",function(n){"value"===n.propertyName&&w(n)}),8==s.a.L&&(u("keyup",f),u("keydown",f)),8<=s.a.L&&(l(t,w),u("dragend",c))):(u("input",f),5>o&&"textarea"===s.a.K(t)?(u("keydown",c),u("paste",c),u("cut",c)):11>e?u("keydown",c):4>h&&(u("DOMAutoComplete",f),u("dragdrop",f),u("drop",f)));u("change",f);s.u(p,null,{j:t})}};s.l.qa.textInput=!0;s.g.textinput={preprocess:function(n,t,i){i("textInput",n)}}}();s.g.uniqueName={init:function(n,t){if(t()){var i="ko_unique_"+ ++s.g.uniqueName.Vc;s.a.Ec(n,i)}}};s.g.uniqueName.Vc=0;s.g.value={after:["options","foreach"],init:function(n,t,i){var o,h;if("input"!=n.tagName.toLowerCase()||"checkbox"!=n.type&&"radio"!=n.type){var r=["change"],u=i.get("valueUpdate"),f=!1,e=null;u&&("string"==typeof u&&(u=[u]),s.a.Ha(r,u),r=s.a.ec(r));o=function(){e=null;f=!1;var r=t(),u=s.o.J(n);s.l.Ta(r,i,"value",u)};!s.a.L||"input"!=n.tagName.toLowerCase()||"text"!=n.type||"off"==n.autocomplete||n.form&&"off"==n.form.autocomplete||-1!=s.a.A(r,"propertychange")||(s.a.D(n,"propertychange",function(){f=!0}),s.a.D(n,"focus",function(){f=!1}),s.a.D(n,"blur",function(){f&&o()}));s.a.F(r,function(t){var i=o;s.a.yd(t,"after")&&(i=function(){e=s.o.J(n);s.a.setTimeout(o,0)},t=t.substring(5));s.a.D(n,t,i)});h=function(){var r=s.a.c(t()),u=s.o.J(n),f;null!==e&&r===e?s.a.setTimeout(h,0):r!==u&&("select"===s.a.K(n)?(f=i.get("valueAllowUnset"),u=function(){s.o.ta(n,r,f)},u(),f||r===s.o.J(n)?s.a.setTimeout(u,0):s.s.B(s.a.Sa,null,[n,"change"])):s.o.ta(n,r))};s.u(h,null,{j:n})}else s.Ya(n,{checkedValue:t})},update:function(){}};s.l.qa.value=!0;s.g.visible={update:function(n,t){var i=s.a.c(t()),r="none"!=n.style.display;i&&!r?n.style.display="":!i&&r&&(n.style.display="none")}},function(n){s.g[n]={init:function(t,i,r,u,f){return s.g.event.init.call(this,t,function(){var t={};return t[n]=i(),t},r,u,f)}}}("click");s.X=function(){};s.X.prototype.renderTemplateSource=function(){throw Error("Override renderTemplateSource");};s.X.prototype.createJavaScriptEvaluatorBlock=function(){throw Error("Override createJavaScriptEvaluatorBlock");};s.X.prototype.makeTemplateSource=function(n,i){if("string"==typeof n){i=i||t;var r=i.getElementById(n);if(!r)throw Error("Cannot find template with ID "+n);return new s.w.v(r)}if(1==n.nodeType||8==n.nodeType)return new s.w.la(n);throw Error("Unknown template type: "+n);};s.X.prototype.renderTemplate=function(n,t,i,r){return n=this.makeTemplateSource(n,r),this.renderTemplateSource(n,t,i,r)};s.X.prototype.isTemplateRewritten=function(n,t){return!1===this.allowTemplateRewriting?!0:this.makeTemplateSource(n,t).data("isRewritten")};s.X.prototype.rewriteTemplate=function(n,t,i){n=this.makeTemplateSource(n,i);t=t(n.text());n.text(t);n.data("isRewritten",!0)};s.b("templateEngine",s.X);s.sb=function(){function n(n,t,i,r){var o,f,u,e;for(n=s.l.Mb(n),o=s.l.Ja,f=0;f<n.length;f++)if(u=n[f].key,o.hasOwnProperty(u))if(e=o[u],"function"==typeof e){if(u=e(n[f].value))throw Error(u);}else if(!e)throw Error("This template engine does not support the '"+u+"' binding within its templates");return i="ko.__tr_ambtns(function($context,$element){return(function(){return{ "+s.l.lb(n,{valueAccessors:!0})+" } })()},'"+i.toLowerCase()+"')",r.createJavaScriptEvaluatorBlock(i)+t}var t=/(<([a-z]+\d*)(?:\s+(?!data-bind\s*=\s*)[a-z0-9\-]+(?:=(?:\"[^\"]*\"|\'[^\']*\'|[^>]*))?)*\s+)data-bind\s*=\s*(["'])([\s\S]*?)\3/gi,i=/\x3c!--\s*ko\b\s*([\s\S]*?)\s*--\x3e/g;return{nc:function(n,t,i){t.isTemplateRewritten(n,i)||t.rewriteTemplate(n,function(n){return s.sb.qd(n,t)},i)},qd:function(r,u){return r.replace(t,function(t,i,r,f,e){return n(e,i,r,u)}).replace(i,function(t,i){return n(i,"<!-- ko -->","#comment",u)})},Rc:function(n,t){return s.N.kb(function(i,r){var u=i.nextSibling;u&&u.nodeName.toLowerCase()===t&&s.Ya(u,n,r)})}}}();s.b("__tr_ambtns",s.sb.Rc),function(){var i,t;s.w={};s.w.v=function(n){if(this.v=n){var t=s.a.K(n);this.tb="script"===t?1:"textarea"===t?2:"template"==t&&n.content&&11===n.content.nodeType?3:4}};s.w.v.prototype.text=function(){var n=1===this.tb?"text":2===this.tb?"value":"innerHTML",t;if(0==arguments.length)return this.v[n];t=arguments[0];"innerHTML"===n?s.a.Qb(this.v,t):this.v[n]=t};i=s.a.h.O()+"_";s.w.v.prototype.data=function(n){if(1===arguments.length)return s.a.h.get(this.v,i+n);s.a.h.set(this.v,i+n,arguments[1])};t=s.a.h.O();s.w.v.prototype.nodes=function(){var i=this.v;if(0==arguments.length)return(s.a.h.get(i,t)||{}).Cb||(3===this.tb?i.content:4===this.tb?i:n);s.a.h.set(i,t,{Cb:arguments[0]})};s.w.la=function(n){this.v=n};s.w.la.prototype=new s.w.v;s.w.la.prototype.constructor=s.w.la;s.w.la.prototype.text=function(){if(0==arguments.length){var i=s.a.h.get(this.v,t)||{};return i.Tb===n&&i.Cb&&(i.Tb=i.Cb.innerHTML),i.Tb}s.a.h.set(this.v,t,{Tb:arguments[0]})};s.b("templateSources",s.w);s.b("templateSources.domElement",s.w.v);s.b("templateSources.anonymousTemplate",s.w.la)}(),function(){function t(n,t,i){var r;for(t=s.f.nextSibling(t);n&&(r=n)!==t;)n=s.f.nextSibling(r),i(r,n)}function f(n,i){if(n.length){var r=n[0],u=n[n.length-1],f=r.parentNode,e=s.Y.instance,o=e.preprocessNode;if(o){if(t(r,u,function(n,t){var f=n.previousSibling,i=o.call(e,n);i&&(n===r&&(r=i[0]||t),n===u&&(u=i[i.length-1]||f))}),n.length=0,!r)return;r===u?n.push(r):(n.push(r,u),s.a.na(n,f))}t(r,u,function(n){1!==n.nodeType&&8!==n.nodeType||s.wb(i,n)});t(r,u,function(n){1!==n.nodeType&&8!==n.nodeType||s.N.Ub(n,[i])});s.a.na(n,f)}}function i(n){return n.nodeType?n:0<n.length?n[0]:null}function e(n,t,u,e,o){o=o||{};var h=(n&&i(n)||u||{}).ownerDocument,c=o.templateEngine||r;if(s.sb.nc(u,c,h),u=c.renderTemplate(u,e,o,h),"number"!=typeof u.length||0<u.length&&"number"!=typeof u[0].nodeType)throw Error("Template engine must return an array of DOM nodes");h=!1;switch(t){case"replaceChildren":s.f.ha(n,u);h=!0;break;case"replaceNode":s.a.Pb(n,u);h=!0;break;case"ignoreTargetNode":break;default:throw Error("Unknown renderMode: "+t);}return h&&(f(u,e),o.afterRender&&s.s.B(o.afterRender,null,[u,e.$data])),u}function o(n,t,i){return s.M(n)?n():"function"==typeof n?n(t,i):n}var r,u;s.Ra=function(t){if(t!=n&&!(t instanceof s.X))throw Error("templateEngine must inherit from ko.templateEngine");r=t};s.Ba=function(t,u,f,h,c){if(f=f||{},(f.templateEngine||r)==n)throw Error("Set a template engine before calling renderTemplate");if(c=c||"replaceChildren",h){var l=i(h);return s.H(function(){var n=u&&u instanceof s.S?u:new s.S(u,null,null,null,{exportDependencies:!0}),r=o(t,n.$data,n),n=e(h,c,r,n,f);"replaceNode"==c&&(h=n,l=i(h))},null,{xa:function(){return!l||!s.a.ab(l)},j:l&&"replaceNode"==c?l.parentNode:l})}return s.N.kb(function(n){s.Ba(t,u,f,n,"replaceNode")})};s.Ob=function(t,i,r,u,h){function l(n,t){f(t,c);r.afterRender&&r.afterRender(t,n);c=null}function a(n,i){c=h.createChildContext(n,r.as,function(n){n.$index=i});var u=o(t,n,c);return e(null,"ignoreTargetNode",u,c,r)}var c;return s.H(function(){var t=s.a.c(i)||[];"undefined"==typeof t.length&&(t=[t]);t=s.a.Ga(t,function(t){return r.includeDestroyed||t===n||null===t||!s.a.c(t._destroy)});s.s.B(s.a.ob,null,[u,t,a,r,l])},null,{j:u})};u=s.a.h.O();s.g.template={init:function(n,t){var i=s.a.c(t());if("string"==typeof i||i.name)s.f.ya(n);else{if("nodes"in i){if(i=i.nodes||[],s.M(i))throw Error('The "nodes" option must be a plain, non-observable array.');i=s.a.xc(i)}else i=s.f.childNodes(n),i=s.a.xc(i);new s.w.la(n).nodes(i)}return{controlsDescendantBindings:!0}},update:function(t,i,r,f,e){var o=i();i=s.a.c(o);r=!0;f=null;"string"==typeof i?i={}:(o=i.name,"if"in i&&(r=s.a.c(i["if"])),r&&"ifnot"in i&&(r=!s.a.c(i.ifnot)));"foreach"in i?f=s.Ob(o||t,r&&i.foreach||[],i,t,e):r?(e="data"in i?e.jc(i.data,i.as):e,f=s.Ba(o||t,e,i,t)):s.f.ya(t);e=f;(i=s.a.h.get(t,u))&&"function"==typeof i.m&&i.m();s.a.h.set(t,u,e&&e.ea()?e:n)}};s.l.Ja.template=function(n){return n=s.l.Mb(n),1==n.length&&n[0].unknown||s.l.nd(n,"name")?null:"This template engine does not support anonymous templates nested within its templates"};s.f.ka.template=!0}();s.b("setTemplateEngine",s.Ra);s.b("renderTemplate",s.Ba);s.a.rc=function(n,t,i){if(n.length&&t.length)for(var o,r,f,e,u=o=0;(!i||u<i)&&(f=n[o]);++o){for(r=0;e=t[r];++r)if(f.value===e.value){f.moved=e.index;e.moved=f.index;t.splice(r,1);u=r=0;break}u+=r}};s.a.Bb=function(){function n(n,t,i,r,u){for(var o=Math.min,l=Math.max,a=[],c=n.length,f,h=t.length,v=h-c||1,w=c+h+1,y,p,b,e=0;e<=c;e++)for(p=y,a.push(y=[]),b=o(h,e+v),f=l(0,e-1);f<=b;f++)y[f]=f?e?n[e-1]===t[f-1]?p[f-1]:o(p[f]||w,y[f-1]||w)+1:f+1:e+1;for(o=[],l=[],v=[],e=c,f=h;e||f;)h=a[e][f]-1,f&&h===a[e][f-1]?l.push(o[o.length]={status:i,value:t[--f],index:f}):e&&h===a[e-1][f]?v.push(o[o.length]={status:r,value:n[--e],index:e}):(--f,--e,u.sparse||o.push({status:"retained",value:t[f]}));return s.a.rc(v,l,!u.dontLimitMoves&&10*c),o.reverse()}return function(t,i,r){return r="boolean"==typeof r?{dontLimitMoves:r}:r||{},t=t||[],i=i||[],t.length<i.length?n(t,i,"added","deleted",r):n(i,t,"deleted","added",r)}}();s.b("utils.compareArrays",s.a.Bb),function(){function r(t,i,r,u,f){var e=[],o=s.H(function(){var n=i(r,f,s.a.na(e,t))||[];0<e.length&&(s.a.Pb(e,n),u&&s.s.B(u,null,[r,n,f]));e.length=0;s.a.Ha(e,n)},null,{j:t,xa:function(){return!s.a.cc(e)}});return{pa:e,H:o.ea()?o:n}}var t=s.a.h.O(),i=s.a.h.O();s.a.ob=function(u,f,e,o,h){function ut(n,t){c=nt[t];tt!==t&&(rt[n]=c);c.Ib(tt++);s.a.na(c.pa,u);b.push(c);k.push(c)}function p(n,t){if(n)for(var i=0,r=t.length;i<r;i++)t[i]&&s.a.F(t[i].pa,function(r){n(r,i,t[i].va)})}var l,y,ft;f=f||[];o=o||{};var y=s.a.h.get(u,t)===n,nt=s.a.h.get(u,t)||[],w=s.a.yb(nt,function(n){return n.va}),a=s.a.Bb(w,f,o.dontLimitMoves),b=[],v=0,tt=0,it=[],k=[];f=[];for(var rt=[],w=[],c,l=0,d,g;d=a[l];l++)switch(g=d.moved,d.status){case"deleted":g===n&&(c=nt[v],c.H&&(c.H.m(),c.H=n),s.a.na(c.pa,u).length&&(o.beforeRemove&&(b.push(c),k.push(c),c.va===i?c=null:f[l]=c),c&&it.push.apply(it,c.pa)));v++;break;case"retained":ut(l,v++);break;case"added":g!==n?ut(l,g):(c={va:d.value,Ib:s.aa(tt++)},b.push(c),k.push(c),y||(w[l]=c))}for(s.a.h.set(u,t,b),p(o.beforeMove,rt),s.a.F(it,o.beforeRemove?s.ma:s.removeNode),l=0,y=s.f.firstChild(u);c=k[l];l++){for(c.pa||s.a.extend(c,r(u,e,c.va,h,c.Ib)),v=0;a=c.pa[v];y=a.nextSibling,ft=a,v++)a!==y&&s.f.uc(u,a,ft);!c.hd&&h&&(h(c.va,c.pa,c.Ib),c.hd=!0)}for(p(o.beforeRemove,f),l=0;l<f.length;++l)f[l]&&(f[l].va=i);p(o.afterMove,rt);p(o.afterAdd,w)}}();s.b("utils.setDomNodeChildrenFromArrayMapping",s.a.ob);s.V=function(){this.allowTemplateRewriting=!1};s.V.prototype=new s.X;s.V.prototype.constructor=s.V;s.V.prototype.renderTemplateSource=function(n,t,i,r){return(t=(9>s.a.L?0:n.nodes)?n.nodes():null)?s.a.ga(t.cloneNode(!0).childNodes):(n=n.text(),s.a.Aa(n,r))};s.V.ua=new s.V;s.Ra(s.V.ua);s.b("nativeTemplateEngine",s.V),function(){s.Pa=function(){var n=this.md=function(){if(!i||!i.tmpl)return 0;try{if(0<=i.tmpl.tag.tmpl.open.toString().indexOf("__"))return 2}catch(n){}return 1}();this.renderTemplateSource=function(r,u,f,e){if(e=e||t,f=f||{},2>n)throw Error("Your version of jQuery.tmpl is too old. Please upgrade to jQuery.tmpl 1.0.0pre or later.");var o=r.data("precompiled");return o||(o=r.text()||"",o=i.template(null,"{{ko_with $item.koBindingContext}}"+o+"{{/ko_with}}"),r.data("precompiled",o)),r=[u.$data],u=i.extend({koBindingContext:u},f.templateOptions),u=i.tmpl(o,r,u),u.appendTo(e.createElement("div")),i.fragments={},u};this.createJavaScriptEvaluatorBlock=function(n){return"{{ko_code ((function() { return "+n+" })()) }}"};this.addTemplate=function(n,i){t.write("<script type='text/html' id='"+n+"'>"+i+"<\/script>")};0<n&&(i.tmpl.tag.ko_code={open:"__.push($1 || '');"},i.tmpl.tag.ko_with={open:"with($1) {",close:"} "})};s.Pa.prototype=new s.X;s.Pa.prototype.constructor=s.Pa;var n=new s.Pa;0<n.md&&s.Ra(n);s.b("jqueryTmplTemplateEngine",s.Pa)}(),function(){function t(n,t,i){var r;for(t=s.f.nextSibling(t);n&&(r=n)!==t;)n=s.f.nextSibling(r),i(r,n)}function f(n,i){if(n.length){var r=n[0],u=n[n.length-1],f=r.parentNode,e=s.Y.instance,o=e.preprocessNode;if(o){if(t(r,u,function(n,t){var f=n.previousSibling,i=o.call(e,n);i&&(n===r&&(r=i[0]||t),n===u&&(u=i[i.length-1]||f))}),n.length=0,!r)return;r===u?n.push(r):(n.push(r,u),s.a.na(n,f))}t(r,u,function(n){1!==n.nodeType&&8!==n.nodeType||s.wb(i,n)});t(r,u,function(n){1!==n.nodeType&&8!==n.nodeType||s.N.Ub(n,[i])});s.a.na(n,f)}}function i(n){return n.nodeType?n:0<n.length?n[0]:null}function e(n,t,u,e,o){o=o||{};var h=(n&&i(n)||u||{}).ownerDocument,c=o.templateEngine||r;if(s.sb.nc(u,c,h),u=c.renderTemplate(u,e,o,h),"number"!=typeof u.length||0<u.length&&"number"!=typeof u[0].nodeType)throw Error("Template engine must return an array of DOM nodes");h=!1;switch(t){case"replaceChildren":s.f.ha(n,u);h=!0;break;case"replaceNode":s.a.Pb(n,u);h=!0;break;case"ignoreTargetNode":break;default:throw Error("Unknown renderMode: "+t);}return h&&(f(u,e),o.afterRender&&s.s.B(o.afterRender,null,[u,e.$data])),u}function o(n,t,i){var u,r;if(t=t[n.substring(5)],"undefined"!=typeof t)for(u=0;u<i.childNodes.length;u++)if(r=i.childNodes[u],1==r.nodeType&&r.getAttribute(n)==t)return r.removeAttribute(n),[r]}var r,u;s.Ra=function(t){if(t!=n&&!(t instanceof s.X))throw Error("templateEngine must inherit from ko.templateEngine");r=t};s.Ra(s.V.ua);s.Ba=function(t,u,f,h,c){if(f=f||{},(f.templateEngine||r)==n)throw Error("Set a template engine before calling renderTemplate");if(c=c||"replaceChildren",h){var l=i(h),v=l&&"replaceNode"==c?l.parentNode:l,a;return"function"==typeof h.hasAttribute&&h.hasAttribute("data-templateId")&&(a=h.getAttribute("data-templateId")),s.H(function(){var r=u&&u instanceof s.S?u:new s.S(s.a.c(u)),n;a&&(n=o(a,arrayValue,targetNode));n||(n=r.$data,n=s.M(t)?t():"function"==typeof t?t(n,r):t,n=e(h,c,n,r,f));"replaceNode"==c&&(h=n,l=i(h))},null,{xa:function(){return!l||!s.a.ab(l)},j:v})}return s.N.kb(function(n){s.Ba(t,u,f,n,"replaceNode")})};s.Ob=function(t,i,r,u,h){function a(n,t){f(t,c);r.afterRender&&r.afterRender(t,n);c=null}function v(n,i){if(c=h.createChildContext(s.a.c(n),r.as),c.$index=i,l){var f=o(l,n,u);if(null!=f)return f}return f="function"==typeof t?t(n,c):t,e(null,"ignoreTargetNode",f,c,r)}var c,l;return u.hasAttribute&&u.hasAttribute("data-templateId")&&(l=u.getAttribute("data-templateId")),s.H(function(){var t=s.a.c(i)||[];"undefined"==typeof t.length&&(t=[t]);t=s.a.Ga(t,function(t){return r.includeDestroyed||t===n||null===t||!s.a.c(t._destroy)});s.s.B(s.a.ob,null,[u,t,v,r,a])},null,{j:u})};u=s.a.h.O();s.g.petemplate={init:function(){return{controlsDescendantBindings:!0}},update:function(t,i,r,f,e){i=s.a.c(i());r={};f=!0;var o,h=null;"string"!=typeof i&&(r=i,i=s.a.c(r.name),"if"in r&&(f=s.a.c(r["if"])),f&&"ifnot"in r&&(f=!s.a.c(r.ifnot)),o=s.a.c(r.data));"foreach"in r?h=s.Ob(i||t,f&&r.foreach||[],r,t,e):f?(e="data"in r?e.createChildContext(o,r.as):e,h=s.Ba(i||t,e,r,t)):s.f.ya(t);e=h;(o=s.a.h.get(t,u))&&"function"==typeof o.m&&o.m();s.a.h.set(t,u,e&&e.ea()?e:n)}}}()})})()}();jQuery(function(n){n.otherDatesCalendar.regional.pl={closeText:"Zamknij",prevText:"&#x3c;Poprzedni",nextText:"Następny&#x3e;",currentText:"Dziś",monthNames:["Styczeń","Luty","Marzec","Kwiecień","Maj","Czerwiec","Lipiec","Sierpień","Wrzesień","Październik","Listopad","Grudzień"],monthNamesShort:["Sty","Lu","Mar","Kw","Maj","Cze","Lip","Sie","Wrz","Pa","Lis","Gru"],dayNames:["Niedziela","Poniedziałek","Wtorek","Środa","Czwartek","Piątek","Sobota"],dayNamesShort:["Nd","Pn","Wt","Śr","Czw","Pt","So"],dayNamesMin:["Nd","Pn","Wt","Śr","Czw","Pt","So"],weekHeader:"Tydz",dateFormat:"dd.mm.yy",firstDay:1,isRTL:!1,showMonthAfterYear:!1,yearSuffix:""};n.otherDatesCalendar.setDefaults(n.otherDatesCalendar.regional.pl)});var otherDatesModule=function(n){function i(n){var i=null,r=null,t;for(t in n)n.hasOwnProperty(t)&&((i==null||t<i)&&(i=t),(r==null||r<t)&&(r=t));return{minDate:i,maxDate:r}}function r(n,t,i){return("00"+i).slice(-2)+"."+("00"+t).slice(-2)+"."+n}function u(n,t){return("00"+n).slice(-2)+":"+("00"+t).slice(-2)}function f(n,t,i){return i?{my:"right-10px center",at:"left center",of:n,collision:"flipfit flipfit",within:t}:{my:"left+10px center",at:"right center",of:n,collision:"flipfit flipfit",within:t}}function t(t,h,c){var p=h||{},w=i(p),b=w.minDate,k=w.maxDate,d="",v,y;typeof c!="undefined"&&(d=c);var g=n("#other--variants--dates--modal"),nt=n("#modal--body"),a=n("#calendar--container"),l=n("#popup--calendar--container");l.hide();g.click(function(){l.hide()});v=t.split(".");y=new Date(parseInt(v[2]),parseInt(v[1])-1,parseInt(v[0]));a.otherDatesCalendar("destroy");a.otherDatesCalendar({numberOfMonths:2,defaultDate:y,selectedDate:y,dateFormat:"yy-mm-dd",minDate:b,maxDate:k,prevText:"Poprzedni miesiąc",nextText:"Następny miesiąc",dateData:p,onPrevMonth:function(){o()},onNextMonth:function(){e()},onSelect:function(t,i,e){var o=n.otherDatesCalendar.parseDate(i.settings.dateFormat,t),h=o.getFullYear(),c=o.getMonth()+1,v=o.getDate(),d=n(e),tt=a.find(".ui-datepicker-custom-data-clicked"),w,b,ut,ft,nt;if(tt.length&&tt.removeClass("ui-datepicker-custom-data-clicked"),l.hide(),!n.otherDatesCalendar._isDateDataEmpty(i,v,c,h)){if(s(p,y,o),n.otherDatesCalendar._dateDataItemsCount(i,v,c,h)==1)return!0;d.find("a.ui-state-default.ui-datepicker-custom-data").addClass("ui-datepicker-custom-data-clicked");var it=n.otherDatesCalendar._getDateData(i,v,c,h)||[],et=r(h,c,v),ot=n.otherDatesCalendar.regional.pl.dayNames[o.getDay()],st=otherVariantsFacade.startOfferParamsObj.transportType=="BU"?"Wyjazdy - ":"Wyloty - ",ht=st+ot+", "+et;for(n("#popup--calendar--container--header").html(ht),w="<table>",b=0;b<it.length;b++){var k=it[b],rt=k.DepartureTime,g=rt?new Date(parseInt(1e3*rt)):null,ct="<tr>"+(g?"<td>"+u(g.getUTCHours(),g.getUTCMinutes())+"<\/td>":"<td class='gray-default text-center'>-- : --<\/td>")+"<td>"+k.DeparturePlace+"<\/td><td>"+k.Price+"/os.<\/td><td><a href='"+k.Link+"' class='btn btn-orange btn-xxsmall'>Wybierz<\/a><\/td><\/tr>";w+=ct}if(w+="<\/table>",n("#popup--calendar--container--content").html(w),ut=d.closest(".ui-datepicker-group-last",a).length!=0,ft=f(d,a,ut),l.show(),l.position(ft),nt=l.find(".popup--close"),nt.length>0)nt.on("click",function(){l.hide()});return!1}return!1}})}function e(){PubSub.publish(enhancedEcommerceTopics.onMoreTermsNextMonthClick,{position:window.offerPosition})}function o(){PubSub.publish(enhancedEcommerceTopics.onMoreTermsPrevMonthClick,{position:window.offerPosition})}function s(n,t,i){var e=0,f,u,r,o;for(u in n){if(r=new Date(u),r.setHours(0,0,0,0),r.getTime()==t.getTime())break;e++}f=0;for(u in n){if(r=new Date(u),r.setHours(0,0,0,0),r.getTime()==i.getTime())break;f++}o=f-e;PubSub.publishSync(enhancedEcommerceTopics.onMoreTermsCalendarClick,{index:o,position:window.offerPosition})}function h(i){var r=n("#trip-length-odm"),u=n("#departure-odm"),f=n("#ai-checkbox-odm"),e=r?r.val():"",o=u?u.val():"",s=f?f.is(":checked"):!1,h=i.data.params;n("#modal--body .preloader-layer").show();n.ajax({type:"GET",url:"/json/trips/otherDatesCallendarJson/"+h+"&czas="+e+"&lotnisko="+o+(s?"&wyzywienie=1":"")}).done(function(i){var r=window.currentDepartureDateCalendarModal;t(r,i.results);n("#modal--body .preloader-layer").hide()}).error(function(){n("#modal--body .preloader-layer").hide()})}function c(i){(typeof i=="undefined"||i===null)&&(i=n("body"));i.find(".modal--toggle--other--dates").each(function(){var i=n(this),r=i.attr("data-offer-id"),u=i.attr("data-adults"),f=i.attr("data-children-ages")||"",e=i.attr("data-product"),s=i.attr("data-details"),o="?osoby="+(u?u:"")+"&id="+(r?r:"")+"&produkt="+(e?e:"")+"&dzieci="+(f?f:"")+"&isDetailsPage="+s;i.modalWindow({isClosedOutside:!1,isAjaxLoadWhenOpen:!0,isAjaxLoadOnce:!1,ajaxTimeout:3e4,ajaxUrl:"/json/trips/otherDatesCalendar/"+o,afterAjaxSuccess:function(){platformGuiControls.initDropdown(n(".select--box"));n("#trip-length-odm, #departure-odm, #ai-checkbox-odm").change({params:o},h);n("#other--variants--dates--modal button.modal--close").click(function(t){t.preventDefault();n(".modal--toggle--other--dates").trigger("closeModal")});var i=window.currentDepartureDateCalendarModal,r=window.initialOtherDatesJsonMappedDataCalendarModal;t(i,r);n("#modal--body .preloader-layer").hide()}})})}function l(){n(".modal--toggle--other--dates--mobile").dropdownToggle();n(".modal--toggle--other--dates--mobile").click(function(){var t=n(this),r=t.attr("data-offer-id"),u=t.attr("data-adults"),f=t.attr("data-children-ages")||"",e=t.attr("data-product"),s=t.attr("data-details"),i=t.attr("data-loaded"),o;i=="0"&&(o="?osoby="+(u?u:"")+"&id="+(r?r:"")+"&produkt="+(e?e:"")+"&dzieci="+(f?f:"")+"&isDetailsPage="+s,n.ajax({url:"/json/trips/otherDatesCalendarMobile/"+o,timeout:3e4,success:function(t){var r,f,u;if(i=1,r=jQuery.parseJSON(t)||{},r.length>0){for(n("#other-dates-mobile").html(),f="",u=0;u<r.length;++u)f+='<a href="'+r[u].Link+'" >'+r[u].DateFrom+" - od "+r[u].Price+"/os <\/a>";n(".dd--content--calendar--dates").html(f)}else n("#other-dates-mobile span").removeClass("__hide").addClass("__show");n(".modal--toggle--other--dates--mobile").attr("data-loaded",i);n(".dd-content-calendar-dates .preloader-layer").hide()}}))})}return{initOtherDatesModal:c,initOtherDatesMobile:l,bindOtherDatesCalendar:t}}($),koBindingHandlersOtherVariants=function(n){n.bindingHandlers.filtersSelectBoxFix={};n.bindingHandlers.setRedirectUrl={init:function(n,t){$(n).on("click",function(){$(".ovm--actions .redirect--ovm").attr("href",t())})},update:function(n,t){$(n).on("click",function(){$(".ovm--actions .redirect--ovm").attr("href",t())})}};n.bindingHandlers.filtersDepartureDateClick={init:function(n,t,i,r,u){$(n).click(function(){t()==""||typeof t()=="undefined"?(u.$root.departureDate.vm.selectedValue(t()),$("#dd--toggle--dates span").text("Dowolny")):(u.$root.departureDate.vm.selectedValue(r.value),$("#dd--toggle--dates span").text(r.key));$(".dd--wrapper").removeClass("__open")})}};n.bindingHandlers.getMonthPrice={init:function(){searcherModule.vm.searcherState()==searcherModule.searcherStateType.table?otherVariantsFacade.enableDepartureDate(!0):otherVariantsFacade.enableDepartureDate(!1)}};n.bindingHandlers.redirectOrClose={init:function(n,t){typeof window.offer!="undefined"?$(n).click(function(){$("#other--variants--dates--modal").removeClass("__in");$("body").removeClass("modal__open")}):$(n).click(function(){var n=t();PubSub.publishSync(enhancedEcommerceTopics.onMoreTermsTableClick,{index:0,position:window.offerPosition});window.location.href=n})}}}(ko),sortModule=function(){function u(){return!0}function f(t){e(t,n.notSet);t.state()===n.up?t.state(n.down):t.state(n.up);r&&r()}function e(n,r){for(var f,u=0;u<i.length;u++)f=i[u],t[f]!==n&&t[f].state(r)}function o(){t.departureReturnCity.state(n.notSet);t.dateRange.state(n.notSet);t.tripLength.state(n.notSet);t.serviceOption.state(n.notSet);t.roomVariant.state(n.notSet);t.price.state(n.notSet)}function s(n){r=n}function h(){t={departureReturnCity:{state:ko.observable(n.notSet),sortKey:"8"},dateRange:{state:ko.observable(n.notSet),sortKey:"4"},tripLength:{state:ko.observable(n.notSet),sortKey:"2"},serviceOption:{state:ko.observable(n.notSet),sortKey:"9"},roomVariant:{state:ko.observable(n.notSet),sortKey:"6"},price:{state:ko.observable(n.down),sortKey:"1"},sortType:null};t.sortType=ko.computed(function(){for(var f={orderOptionPropName:"",stateType:n.notSet},r,u=0;u<i.length;u++)if(r=i[u],t[r].state()===n.up||t[r].state()===n.down)f.orderOptionPropName=r,f.stateType=t[r].state();else return null;return f})}function c(){for(var i in t)if(i!="sortType"&&t[i]&&t[i].state()!==undefined&&t[i].state()!=n.notSet)return["sortowanie="+t[i].sortKey,"kolejnosc="+a(t[i].state())];return[]}function l(){return t}function a(t){for(var i in n)if(t==n[i])return i;return""}var n={up:0,down:1,notSet:2},i=["departureReturnCity","dateRange","tripLength","serviceOption","roomVariant","price"],t,r;return h(),{orderStateType:n,getResultsBySortOptions:u,sortTypeChange:f,addListener:s,getSearchParams:c,vm:t,get:l,_test:{vm:t,orderOptionsPropNames:i,reinitialize:o}}}();var filtersModule=function(){function u(){n.filters.departurePlace=new FilterItem;n.filters.departurePlace.init();n.filters.departureDate=new FilterItem;n.filters.departureDate.init();n.filters.duration=new FilterItem;n.filters.duration.init();n.filters.service=new FilterItem;n.filters.service.init();n.filters.adultCount=new FilterItem;n.filters.adultCount.init();n.filters.childAge1=new FilterItem;n.filters.childAge1.init(i);n.filters.childAge2=new FilterItem;n.filters.childAge2.init(i);n.filters.childAge3=new FilterItem;n.filters.childAge3.init(i);n.filters.childAge4=new FilterItem;n.filters.childAge4.init(i)}function f(i){for(var r=0;r<t.length;r++)i[t[r]]!==undefined&&i[t[r]]&&n.filters[t[r]].setItemsAndSelected(i[t[r]])}function e(i){for(var r=0;r<t.length;r++)n.filters[t[r]]!==undefined&&n.filters[t[r]]&&n.filters[t[r]].addListener(i)}function o(i){for(var f=[],c=[],e,h,u,l,o,s=0;s<t.length;s++)e=t[s],h=n.filters[e],h!==undefined&&h&&(u=h.vm.selectedValue(),u&&u!=""&&(l=e.indexOf("childAge")>=0,l?c.push(u):e==="departureDate"?i!==!0&&(o=u.split(";"),o&&o.length>0&&(f.push("wylot="+o[0]),f.push("przylot="+o[1]))):f.push(r(e)+"="+u)));return c.length>0&&f.push(r("childAge")+"="+c.join(",")),f}function r(n){switch(n){case"departurePlace":return"lotnisko";case"duration":return"czas";case"service":return"wyzywienie";case"adultCount":return"osoby";case"childAge":return"dzieci"}throw"there is no "+n+" filter name provided";}var i={selectedValue:"",items:[{key:"---",value:""}]},t=["departurePlace","departureDate","duration","service","adultCount","childAge1","childAge2","childAge3","childAge4"],n={};return n.filters={departurePlace:null,departureDate:null,duration:null,service:null,adultCount:null,childAge1:null,childAge2:null,childAge3:null,childAge4:null},{vm:n,createFilterItems:u,setFiltersJson:f,addListener:e,getSearchParams:o}}(),resultListModule=function(){function r(i){n.results(i);t()}function u(i){i&&i.length>0&&(n.results.valueWillMutate(),n.results.push.apply(n.results,i),n.results.valueHasMutated(),t())}function f(n){i=n}function e(){return["limit=10","offset="+n.results().length]}function o(){t()}function t(){$(".ov--list").scroll(function(){$(".ov--list").scrollTop()>=$(".other-variants").height()-$(".ov--list").height()-54&&($(".ov--list").off("scroll"),i(n.results().length+1,10))})}var n={results:ko.observableArray([]),noResultsVisible:null},i;return n.noResultsVisible=ko.computed(function(){return n.results().length===0}),o(),{setResults:r,appendResults:u,setScrollListener:f,getSearchParams:e,vm:n}}(),searcherModule=function(){function h(){}function o(){var t=["produkt="+n.productType,"dojazd="+n.transportType,"id="+n.offerId,"orig-osoby="+n.originalAdultsCount,"xcode="+n.xCode];return typeof n.originalChildrenCount!="undefined"&&t.push("orig-dzieci="+n.originalChildrenCount),t}function r(){var n;if(i.searcherState()==f.calendar)c();else{var r=filtersModule.getSearchParams(!1),u=sortModule.getSearchParams(),e=o();r||u?(t="?",n=e.concat(r),n=n.concat(u),t+=n.join("&")):t=""}}function c(){var t=filtersModule.getSearchParams(!0),i=o();i.push("isDetailsPage="+n.isDetailsPage);t.length&&l(i.concat(t))}function l(n){var i,r;if(t="",n){for(i=[],r=0;r<n.length;r++)i=i.concat(n[r]);i.length&&(t="?"+i.join("&"))}}function a(){r();var n=resultListModule.getSearchParams();t+="&"+n.join("&")}function v(){return t}function e(){r();u&&u(t)}function y(n){u=n;sortModule.addListener(e);filtersModule.addListener(e)}function p(t){n.productType=t.productType;n.transportType=t.transportType;n.offerId=t.offerId;n.isDetailsPage=t.isDetailsPage;n.originalAdultsCount=t.adults;n.originalChildrenCount=t.children;n.xCode=t.xCode;s(t.searchState);r()}function s(n){i.searcherState(n)}function w(){i={searcherState:ko.observable(f.table)}}var t="",u,n={productType:"",transportType:"",offerId:"",isDetailsPage:!0,originalAdultsCount:"",originalChildrenCount:""},i,f={calendar:0,table:1};return w(),{getResults:h,onSearchTriggered:e,setSearchListener:y,setOfferParameters:p,buildQuery:r,buildQueryWithOffset:a,getQuery:v,searcherStateType:f,setSearcherState:s,vm:i,_test:{}}}(),otherVariantsEtrackConfig={eventItems:[{selector:".mtv--duration",etrackParams:["Inne warianty","oferta","pobyt"],directElementEvent:!0,postponed:!1,registerMultiple:!0},{selector:".mtod--depdate",etrackParams:["Inne warianty","oferta","data wylotu"],directElementEvent:!0,postponed:!1,registerMultiple:!0},{selector:".mtv--depcty",etrackParams:["Inne warianty","oferta","wylot z"],directElementEvent:!0,postponed:!1,registerMultiple:!0},{selector:".mtv-service",etrackParams:["Inne warianty","oferta","wyzywienie"],directElementEvent:!0,postponed:!1,registerMultiple:!0},{selector:".mtv-participants",etrackParams:["Inne warianty","oferta","liczba osob"],directElementEvent:!0,postponed:!1,registerMultiple:!0},{selector:'#modal--offer--variants select[name="adults-amount-ovm"] ~ .sb__holder .sb__options',etrackParams:["Inne warianty","okno filtry","dorosli"],postponed:!1,registerMultiple:!0},{selector:'#modal--offer--variants select[name="kids-amount-ovm"] ~ .sb__holder .sb__options',etrackParams:["Inne warianty","okno filtry","dzieci"],postponed:!1,registerMultiple:!0},{selector:'#modal--offer--variants select[name="departure-ovm"] ~ .sb__holder .sb__options',etrackParams:["Inne warianty","okno filtry","wylot z"],postponed:!1,registerMultiple:!0},{selector:'#modal--offer--variants select[name="arrival-ovm"] ~ .sb__holder .sb__options',etrackParams:["Inne warianty","okno filtry","powrot do"],postponed:!1,registerMultiple:!0},{selector:'#modal--offer--variants select[name="date-range-ovm"] ~ .sb__holder .sb__options',etrackParams:["Inne warianty","okno filtry","termin"],postponed:!1,registerMultiple:!0},{selector:'#modal--offer--variants select[name="trip-length-ovm"] ~ .sb__holder .sb__options',etrackParams:["Inne warianty","okno filtry","pobyt"],postponed:!1,registerMultiple:!0},{selector:'#modal--offer--variants select[name="food-opt-ovm"] ~ .sb__holder .sb__options',etrackParams:["Inne warianty","okno filtry","wyzywienie"],postponed:!1,registerMultiple:!0},{selector:'#modal--offer--variants select[name="room-variant-ovm"] ~ .sb__holder .sb__options',etrackParams:["Inne warianty","okno filtry","zakwaterowanie"],postponed:!1,registerMultiple:!0},{selector:'#modal--offer--variants select[name="price-ovm"] ~ .sb__holder .sb__options',etrackParams:["Inne warianty","okno filtry","cena"],postponed:!1,registerMultiple:!0}],hacks:{}};$(function(){eventTrackModule.applyEvantTrackConfig(otherVariantsEtrackConfig)});otherVariantsFacade=function(){function st(i){n.productType=i.productType;n.transportType=i.transportType;n.offerId=i.offerId;n.adults=i.adults;n.children=i.children;n.xCode=i.xCode;n.isDetailsPage=i.isDetailsPage;n.searchState=i.searchState;n.clickedVariantType=typeof i.clickedVariantType!="undefined"?parseInt(i.clickedVariantType):t.none}function h(n){n==!0?($("#dd--toggle--dates").removeClass("__disabled"),$("#dd--toggle--dates").dropdownToggle(),$("#dd--toggle--dates").click(function(){$(".dd-dates-ov").is(":visible")&&lt();$(this).addClass("__focused")}),$(".ov--modal--body").unbind("click",c),$(".ov--modal--body").bind("click",c)):($("#dd--toggle--dates").unbind(),$("#dd--toggle--dates").addClass("__disabled"))}function c(n){n.stopPropagation();jQuery(n.target).parents(".dd-content.dd-dates-ov").length===0&&jQuery(n.target).is(".dd-content.dd-dates-ov")!==!0&&($(".dd--wrapper").removeClass("__open"),$("#dd--toggle--dates").removeClass("__focused"),jQuery("body").unbind("click",c))}function ht(n){a();$.ajax({url:"/json/trips/otherVariantsGetOffers/"+n,cache:!1,contentType:"application/json",type:"GET",success:function(n){k(n)},error:function(n,t){u(["Bledy","ajax","otherVariantsGetOffers "+t]);r(n,t)}})}function ct(n){a();$.ajax({url:"/json/trips/otherDatesCallendarJson/"+n,cache:!1,contentType:"application/json",type:"GET",success:function(n){vt(n)},error:function(n,t){u(["Bledy","ajax","otherDatesCallendarJson "+t]);r(n,t)}})}function lt(){searcherModule.buildQuery();var n=searcherModule.getQuery();w!==n&&(at(),$.ajax({url:"/json/trips/otherVariantsMonthPrice/"+n,cache:!1,contentType:"application/json",type:"GET",success:function(t){pt(t);w=n},error:function(n,t){u(["Bledy","ajax","otherVariantsMonthPrice "+t]);r(n,t)}}))}function at(){$(".ovd-price-loader").show();$(".ovd-dd-price").text("")}function k(n){n.offers?(f=n.offers,resultListModule.setResults(f)):resultListModule.setResults([]);b=!0;resultListModule.setScrollListener(ut);it()}function d(n){n.offers?(f=n.offers,resultListModule.appendResults(f),resultListModule.setScrollListener(ut)):resultListModule.appendResults([])}function vt(n){n.hasResults?(otherDatesModule.bindOtherDatesCalendar(otherVariantsFacade.previousVariant().tripDepartureDate,n.results),b=!0,g(!1)):g(!0);it()}function g(n){var t=$("#no--results--dates--ovd"),i=$("#calendar--container, #popup--calendar--container");n?(t.removeClass("__hide"),i.addClass("__hide")):t.hasClass("__hide")||(t.addClass("__hide"),i.removeClass("__hide"))}function r(){}function yt(){var t="?produkt="+n.productType+"&dojazd="+n.transportType+"&id="+n.offerId+"&xcode="+n.xCode+"&osoby="+n.adults;n.children&&n.children.length>0&&(t+="&dzieci="+n.children);$.ajax({url:"/json/trips/otherVariantsModal/"+t,cache:!1,contentType:"application/json",type:"GET",success:function(n){nt(n)},error:function(n,t){u(["Bledy","ajax","otherVariantsModal "+t]);r(n,t)}})}function pt(n){var t=0;$(".date-range-item").each(function(){$(this).find(".ovd-price-loader").hide();n[t]=="0"?($(this).find(".ovd-dd-price").text("Brak ofert"),$(this).find(".ovd-dd-price").addClass("month-price-disabled"),$(this).off("click")):($(this).find(".ovd-dd-price").removeClass("month-price-disabled"),$(this).find(".ovd-dd-price").text(n[t]));t++})}function nt(t){t.filters&&(y=t.filters,filtersModule.setFiltersJson(y));t.previousOffer&&otherVariantsFacade.previousVariant(t.previousOffer);ot=!0;tt(n.searchState);e==!1?(bt(),kt(),l(),searcherModule.setSearchListener(rt),e=!0):l();platformGuiControls.refreshDropdown($(".select--box--ov"));wt()}function wt(){var r="";typeof n.clickedVariantType!="undefined"&&n.clickedVariantType!=t.none&&(n.clickedVariantType==t.departurePlace?r="departure-ovm":n.clickedVariantType==t.duration?r="trip-length-ovm":n.clickedVariantType==t.service?r="food-opt-ovm":n.clickedVariantType==t.adultCount&&(r="adults-amount-ovm"),i=$(".select--box--ov[name="+r+"]"))}function tt(n){var t=$("#ov--table"),i=$("#ov--calendar"),r=$("#ov--switch--mode--calendar"),u=$("#ov--switch--mode--table"),f="__active";n==searcherModule.searcherStateType.calendar?(customPluginsHelper.replaceVisibility(t,i),customPluginsHelper.replaceCssClass(u,r,f),h(!1),ui()):(customPluginsHelper.replaceVisibility(i,t),customPluginsHelper.replaceCssClass(r,u,f),h(!0),fi())}function l(){searcherModule.buildQuery();rt(searcherModule.getQuery())}function bt(){var n=$(".ov--list--current").get(0),t=$(".ov--modal--header").get(0),i=$(".ov--filters").get(0),r=$(".ov--list--sort").get(0),u=$(".ov--mode--toggle").get(0);typeof n!="undefined"&&ko.applyBindings(otherVariantsFacade.previousVariant,n);typeof t!="undefined"&&ko.applyBindings(otherVariantsFacade.previousVariant,t);typeof i!="undefined"&&ko.applyBindings(filtersModule.vm.filters,i);typeof r!="undefined"&&ko.applyBindings(sortModule.vm,r)}function kt(){var n=$(".ov--list").get(0),t=$("#no--results--variants--ovd").get(0);typeof n!="undefined"&&ko.applyBindings(resultListModule.vm,n);typeof t!="undefined"&&ko.applyBindings(resultListModule.vm,t)}function a(){$("#other--variants--dates--modal .preloader-layer").show()}function it(){$("#other--variants--dates--modal .preloader-layer").hide();dt()}function dt(){if(i!=null){var n=i.parent().find(".sb__holder > .sb__options, .sb__holder > .sb__toggle, .sb__holder > .sb__selector");gt(n);platformGuiControls.openDropdown(i);ni(n);i=null}}function gt(n){n.length>0&&n.addClass("animated")}function ni(n){n.addClass("transition");setTimeout(function(){n.removeClass("animated")},2e3)}function ti(){var n=$("#ov--switch--mode--calendar"),t=$("#ov--switch--mode--table");n.on("click",function(){n.hasClass("__active")||v(searcherModule.searcherStateType.calendar)});t.on("click",function(){t.hasClass("__active")||v(searcherModule.searcherStateType.table)})}function ii(){a();$("#ov--calendar").hide();e==!1&&filtersModule.createFilterItems();searcherModule.setOfferParameters({productType:n.productType,transportType:n.transportType,offerId:n.offerId,isDetailsPage:n.isDetailsPage,searchState:n.searchState,adults:n.adults,children:n.children,xCode:n.xCode});ti();yt()}function rt(n){searcherModule.vm.searcherState()==searcherModule.searcherStateType.table?ht(n):ct(n)}function ut(){if(!o){o=!0;ri();searcherModule.buildQueryWithOffset();var n=searcherModule.getQuery();$.ajax({url:"/json/trips/otherVariantsGetOffers/"+n,cache:!1,contentType:"application/json",type:"GET",success:function(n){d(n);o=!1},error:function(n,t){u(["Bledy","ajax","otherVariantsGetOffers "+t]);r(n,t);o=!1}})}}function ri(){}function ft(n){ga("send","pageview",n)}function ui(){var t=n.isDetailsPage?"/kalendarz_oferta.html":"/kalendarz_lista.html";ft(t)}function fi(){var t=n.isDetailsPage?"/inne_warianty_oferta.html":"/inne_warianty_lista.html";ft(t)}function u(n){eventTrackModule&&eventTrackModule.sendEventTrack(n)}function ei(n){return PubSub.publishSync(enhancedEcommerceTopics.onMoreTermsTableClick,{index:n,position:window.offerPosition}),!0}function oi(n){typeof n!="undefined"&&n&&(e=!1);ii()}function v(n){searcherModule.setSearcherState(n);typeof s!="undefined"&&s(n,p);tt(n);l()}function si(n,t){typeof n!="undefined"&&(s=n);typeof t!="undefined"&&(p=t)}function hi(n){try{return n.split(" ")[0]}catch(t){return n}}function ci(n){try{return n.split(" ")[1]}catch(t){return n}}var f,et=ko.observableArray([]),y,s,p,t={none:0,departurePlace:1,duration:2,service:3,adultCount:4},i=null,n={productType:"",transportType:"",offerId:"",adults:"",children:"",xCode:"",isDetailsPage:!1,searchState:null,clickedVariantType:null},w,b=!1,ot=!1,e=!1,o=!1;return{init:oi,setStartOfferParameters:st,setChangeStateParameters:si,enableDepartureDate:h,setMode:v,previousVariant:et,startOfferParamsObj:n,changeOffer:ei,variantType:t,otherVariantsTermsMonth:hi,otherVariantsTermsYear:ci,_test:{onExecuteLoadPreviousVariantsAndFiltersSuccess:nt,onExecuteLoadOffersQuerySuccess:k,onExecuteLoadOffersToAppendQuerySuccess:d}}}(),function(n){var t=n(".ov--persons--section"),i=n(".ov--persons--section--toggle");i.on("click",function(){n(this).toggleClass("__active");t.toggleClass("__visible")})}(jQuery);otherVariantsFrontModule=function(n){function i(i,r){n(window).on("hashchange",function(){window.location.hash.length==0&&t!=null&&(t.trigger("closeModal"),t=null)});(typeof i=="undefined"||i===null)&&(i=n("body"));i.find(".modal--toggle--ovd").each(function(){var t=n(this);t.modalWindow({callbackAfterOpen:function(){n("body").on("keydown.ovm",function(t){if(t.which==37||t.which==39){var i=n("#calendar--container .ui-datepicker-inline");i.click();i.trigger(t)}});var i=t.attr("data-offer-id"),u=t.attr("data-adults"),f=t.attr("data-children-ages")||"",e=t.attr("data-product"),o=t.attr("data-transport");otherVariantsFacade.setStartOfferParameters({productType:e,transportType:o,offerId:i,adults:u,children:f,isDetailsPage:!1,searchState:searcherModule.searcherStateType.calendar});otherVariantsFacade.init(r);typeof r!="undefined"&&r&&(r=!1);window.location.hash="showVariants"},callbackAfterClose:function(){n("body").unbind("keydown.ovm")}})})}var r=searcherModule.searcherStateType.calendar,t=null;return{initOVD:i}}($)