7cb49c8e52ee1dd04b85b705e987b50a0b061f161e1be515d1b0fb4c1dc3bca5

Source Code:

/*
 Some components from jQuery UI | https://github.com/jquery/jquery-ui | MIT License
*/
(function(n){var w=window.AmazonUIPageJS||window.P,y=w._namespace||w.attributeErrors,f=y?y("AmazonUICalendar","AmazonUI"):w;f.guardFatal?f.guardFatal(n)(f,window):f.execute(function(){n(f,window)})})(function(n,w,y){n.when("A").register("a-calendar-utils",function(f){function g(a,b){b=a.getFullYear?a.getMonth()+1:b;a=a.getFullYear?a.getFullYear():a;return l(a,b+1,0).getDate()}function l(a,b,d){var c=null;a&&(c=a.getFullYear?new Date(a.getTime()):void 0!==a.year&&void 0!==a.month&&void 0!==a.day?new Date(a.year,
a.month-1,a.day):new Date(a,b-1,d));return c}function e(a){var b=a.match(/[.\/\-\s].*?/);a=a.split(/\W+/);if(!b||!a||0===a.length)throw Error("Invalid date format.");return{separator:b,parts:a}}return{numDaysInMonth:g,newDate:l,add:function(a,b,d){if("d"===d||"w"===d)a.setDate(a.getDate()+b*("w"===d?7:1));else{var c=a.getFullYear()+("y"===d?b:0);b=a.getMonth()+("m"===d?b:0);a.setTime(l(c,b+1,Math.min(a.getDate(),g(c,b+1))).getTime())}return a},parseDate:function(a,b){b=e(b);a=a?a.split(b.separator):
[];var d=null;if(a.length===b.parts.length){var c=new Date;for(var p=c.getFullYear(),k=c.getDate(),m=c.getMonth(),u=0;u<b.parts.length;u++)switch(c=parseInt(a[u],10),b.parts[u]){case "dd":case "d":k=c;break;case "mm":case "m":m=c-1;break;case "yy":case "yyyy":p=100>c?40>c?2E3+c:1900+c:c}!isNaN(p)&&0<=m&&11>=m&&1<=k&&k<=g(p,m+1)&&(d=new Date(p,m,k,0,0,0))}return d},formatDate:function(a,b){b=e(b);a={d:a.getDate(),m:a.getMonth()+1,yy:a.getFullYear()%100,yyyy:a.getFullYear()};a.dd=(10>a.d?"0":"")+a.d;
a.mm=(10>a.m?"0":"")+a.m;a.yy=(10>a.yy?"0":"")+a.yy;for(var d=[],c=0,p=b.parts.length;c<p;c++)d.push(a[b.parts[c]]);return d.join(b.separator)}}});"use strict";n.register("a-calendar-template-default",function(){return{monthNames:"January February March April May June July August September October November December".split(" "),dayNamesShort:"Sun Mon Tue Wed Thu Fri Sat".split(" "),firstDay:0,currentFormat:"{{month}} {{year}}",genericStatus:"Show {{month}} {{year}}",dateFormat:"mm/dd/yyyy",dateFormatDescription:"Date with format m m/d d/y y y y"}});
"use strict";n.when("A","a-calendar-utils","a-calendar-template-default").register("a-calendar-renderer",function(f,g,l){function e(d){if(0!==arguments.length)return this.templateData=d||l,this}var a=f.$,b=e.prototype;b.notifyChange=function(d,c){for(var a=this,k=d.attributes,b=d.$container,u=[],e=g.newDate(k.viewedYear,k.viewedMonth,1),h=0;h<k.numViewMonths;h++){var r=e.getMonth()+1,t=e.getFullYear();u.push(a.renderMonth(k,t,r,0===h,h===k.numViewMonths-1));e=g.add(e,1,"m")}f.delay(function(){b.html(u.join(""));
a.notifyBlacklistChange(d);c&&c();f.trigger("a:calendar:change:"+d.attributes.id)},0)};b.renderMonth=function(d,a,b,k,m){var c=this.templateData,p=g.numDaysInMonth(a,b),h=c.firstDay,r=g.newDate(a,b,1).getDay(),t=g.newDate(a,b,1).getTime(),e=g.newDate(a,b+1,0).getTime(),f=d.minDate?d.minDate.getTime():null,l=d.maxDate?d.maxDate.getTime():null,q=g.newDate(a,b,1),n=(r-h+7)%7;r=42-n-p;var w=d.selectedDate?d.selectedDate.getTime():null;g.add(q,-n,"d");h=[];for(var x=0;x<n;x++)h.push(this.renderDayOutsideMonth(q)),
g.add(q,1,"d");for(n=0;n<p;n++)x=q.getTime(),h.push(this.renderDay(q,d.selectedDate&&x===w,l&&x>l||f&&x<f,d.onRenderDayClass)),g.add(q,1,"d");for(d=0;d<r;d++)h.push(this.renderDayOutsideMonth(q)),g.add(q,1,"d");for(d=1;d<=h.length;d++)q=d-1,1===d?h[q]="\x3ctr\x3e"+h[q]:d===h.length?h[q]+="\x3c/tr\x3e":0===d%7&&(h[q]+="\x3c/tr\x3e\x3ctr\x3e");m=this.renderMonthHeader(a,b,k&&(!f||t>f),m&&(!l||e<l));t=this.renderDayHeader();e=c.currentFormat;e=e.replace("{{month}}",c.monthNames[(b-1+12)%12]).replace("{{year}}",
a);a=["\x3cdiv class\x3d'a-cal-month-container",k?" a-cal-month-container-first":"","'\x3e",m,"\x3ctable class\x3d'a-cal-month-table' summary\x3d'",e,"'\x3e",t,"\x3ctbody class\x3d'a-cal-days'\x3e"].concat(h);a.push("\x3c/tbody\x3e\x3c/table\x3e\x3c/div\x3e");return a.join("")};b.renderDay=function(a,c,b,k){var d=a.getTime();k=["a-cal-d"," ",c?"a-cal-select ":"",b?"a-cal-outbound ":"",k?k.call(this,a)+" ":"","a-cal-d-",d];return["\x3ctd class\x3d'"].concat(k).concat(["' data-timestamp\x3d'",d,"'\x3e\x3ca href\x3d'javascript:void(0)' class\x3d'a-declarative a-cal-date-anchor' data-action\x3d'a-cal-select-date' aria-disabled\x3d'",
b?"true":"false","' aria-selected\x3d'",c?"true":"false","'\x3e",a.getDate(),"\x3c/a\x3e\x3c/td\x3e"]).join("")};b.renderDayOutsideMonth=function(a){return["\x3ctd class\x3d'a-cal-na a-cal-d-",a.getTime(),"'\x3e",this.templateData.dayOutsideMonth,"\x3c/td\x3e"].join("")};b.renderDayHeader=function(){for(var a=this.templateData,c=[],b=0;7>b;b++){var k=(b+a.firstDay)%7;c.push("\x3cth class\x3d'a-cal-day-label'\x3e");c.push(a.dayNamesShort[k]);c.push("\x3c/th\x3e")}a=["\x3cthead class\x3d'a-cal-labels'\x3e\x3ctr\x3e"].concat(c);
a.push("\x3c/tr\x3e\x3c/thead\x3e");return a.join("")};b.renderMonthHeader=function(a,c,b,k){var d=this.templateData,p=d.monthNames[(c-1+12)%12],e=d.monthNames[(c+12)%12],h=1===c?a-1:a,r=12===c?a+1:a,t=d.genericStatus,g=d.genericStatus,f=d.currentFormat;t=t.replace("{{month}}",d.monthNames[(c-2+12)%12]).replace("{{year}}",h);g=g.replace("{{month}}",e).replace("{{year}}",r);f=f.replace("{{month}}",p).replace("{{year}}",a);a=b?["\x3ca class\x3d'a-declarative a-cal-paginate-prev' data-action\x3d'a-cal-prev-month' tabindex\x3d'0'\x3e\x3cspan class\x3d'a-offscreen'\x3e",
t,"\x3c/span\x3e\x3ci class\x3d'a-icon a-icon-previous'\x3e\x3c/i\x3e\x3c/a\x3e"].join(""):"";k=k?["\x3ca class\x3d'a-declarative a-cal-paginate-next' data-action\x3d'a-cal-next-month' tabindex\x3d'0'\x3e\x3cspan class\x3d'a-offscreen'\x3e",g,"\x3c/span\x3e\x3ci class\x3d'a-icon a-icon-next'\x3e\x3c/i\x3e\x3c/a\x3e"].join(""):"";return["\x3cdiv class\x3d'a-row a-cal-month-row'\x3e\x3cdiv class\x3d'a-column a-span2'\x3e",a,"\x3c/div\x3e\x3cdiv class\x3d'a-column a-span8 a-text-center'\x3e\x3ch4 class\x3d'a-cal-month-header' tabindex\x3d'0'\x3e",
f,"\x3c/h4\x3e\x3c/div\x3e\x3cdiv class\x3d'a-column a-span2 a-span-last'\x3e",k,"\x3c/div\x3e\x3c/div\x3e"].join("")};b.notifyInputChange=function(a){var b=a.attributes.$inputContainer,d=a.attributes.calInput;if(b){a=a.attributes.selectedDate;b.find(".a-cal-input");if(a){var k=a.getMonth()+1;var m=a.getDate();var e=a.getFullYear()}b.find(".a-cal-select-month").val(k);b.find(".a-cal-select-day").val(m);b.find(".a-cal-select-year").val(e);d&&d.setDate(a)}};b.notifyDaySelection=function(a,b,p){a=a.$container.find(".a-cal-d.a-cal-d-"+
b.getTime());b=a.find("a");a.toggleClass("a-cal-select",p);b.attr("aria-selected",p)};b.notifyBlacklistChange=function(b){var c=b.$container,d=b.attributes.dateBlacklisted;d?c.find(".a-cal-d").each(function(b,c){b=a(c);var k=d(new Date(b.data("timestamp")));b.attr("aria-disabled",function(){return k?"true":"false"}).toggleClass("a-cal-inactive",k)}):c.find(".a-cal-d").removeClass("a-cal-inactive")};return e});"use strict";n.when("A","a-calendar-utils","a-calendar-renderer-instance","a-calendar-input").register("a-calendar",
function(f,g,l,e){function a(a,d){if(0!==arguments.length){d=d||{};this.$container=a;this.observer=d.observer||l;var c=this.attributes={numViewMonths:1};f.extend(c,d);c.selectedDate=g.newDate(c.selectedDate);c.minDate=g.newDate(c.minDate);c.maxDate=g.newDate(c.maxDate);var m=this.attributes.selectedDate||new Date;c.hasOwnProperty("viewedMonth")||(c.viewedMonth=m.getMonth()+1);c.hasOwnProperty("viewedYear")||(c.viewedYear=m.getFullYear());m=this.getTemplateData();if(c.$inputContainer&&m){var p=c.$inputContainer.find(".a-cal-input");
p.attr("aria-label",m.dateFormatDescription);c.calInput=new e(p,this,m.dateFormat)}c.id||(c.id=++b);this.observer.notifyChange(this);this.observer.notifyInputChange(this);return this}}var b=0,d=a.prototype;d.getTemplateData=function(){return this.observer?this.observer.templateData:null};d.selectDate=function(a,b,d){var c=this.attributes;if(!c.disabled){var k=g.newDate(a,b,d);if(!k||!isNaN(k.getFullYear())){var e=c.dateBlacklisted,h=c.minDate,r=c.maxDate;k&&(e&&e(a,b,d)||h&&k.getTime()<h.getTime()||
r&&k.getTime()>r.getTime())?c.onSelectInactiveDate&&c.onSelectInactiveDate.call(this,a,b,d):(e=this.observer,h=g.newDate(c.selectedDate),c.selectedDate=k,h&&e.notifyDaySelection(this,h,!1),c.selectedDate&&e.notifyDaySelection(this,c.selectedDate,!0),c.onSelectDate&&c.onSelectDate.call(this,a,b,d),c.selectedDate&&(a=c.viewedYear,b=c.viewedMonth,k=c.numViewMonths,d=(new Date(a,b-1,1)).getTime(),a=(new Date(a,b-1+k,0)).getTime(),b=c.selectedDate.getTime(),b<d||b>a)&&(this.changeViewedYear(c.selectedDate.getFullYear()),
this.changeViewedMonth(c.selectedDate.getMonth()+1)),this.observer.notifyInputChange(this))}}};d.changeViewedMonth=function(a){var b=this,c=b.attributes;if(!c.disabled){var d=c.minDate,e=c.maxDate,f=c.viewedYear,h=g.newDate(f,a,1);f=g.newDate(f,a+1,0);d&&f.getTime()<d.getTime()||e&&h.getTime()>e.getTime()?c.onChangeViewedMonthFail&&c.onChangeViewedMonthFail.call(b,a):(c.viewedMonth=h.getMonth()+1,c.viewedYear=h.getFullYear(),b.observer.notifyChange(b,function(){c.onChangeViewedMonth&&c.onChangeViewedMonth.call(b,
a)}))}};d.changeViewedYear=function(a){var b=this,c=b.attributes;if(!c.disabled){var d=c.minDate,e=c.maxDate,f=c.viewedMonth,h=g.newDate(a,f,1);f=g.newDate(a,f+1,0);d&&f.getTime()<d.getTime()||e&&h.getTime()>e.getTime()?c.onChangeViewedYearFail&&c.onChangeViewedYearFail.call(b,a):(c.viewedMonth=h.getMonth()+1,c.viewedYear=h.getFullYear(),b.observer.notifyChange(b,function(){c.onChangeViewedYear&&c.onChangeViewedYear.call(b,a)}))}};d.changeDateBlacklisted=function(a){this.attributes.disabled||(this.attributes.dateBlacklisted=
a,this.observer.notifyBlacklistChange(this),this.attributes.onChangeDateBlacklisted&&this.attributes.onChangeDateBlacklisted.call(this,a))};d.setDisabled=function(a){this.attributes.disabled=a};return a});"use strict";n.when("A","a-calendar","a-calendar-renderer-instance","a-popover","ready").register("a-calendar-framework",function(f,g,l,e){function a(a,b){a.jquery||(a=v(a));b=new g(a,b);h[b.attributes.id]=b;a.data("a-cal-id",b.attributes.id).addClass("a-cal-calendar-container").removeClass("a-cal-static");
return b}function b(b,c){c=f.extend({activate:"onclick"},c||{});c=a(v("\x3cdiv /\x3e"),c);b.data("a-cal-id",c.attributes.id).data("a-cal-popover",!0).removeClass("a-cal-static");return c}function d(a,c){c=c||{};c.$inputContainer=a;c=b(a.find(".a-cal-input"),c);a.find(".a-cal-input-container").removeClass("a-hidden");a.find(".a-cal-dropdown-container").addClass("a-hidden").attr("aria-hidden","true");a.data("a-cal-id",c.attributes.id).data("a-cal-input",!0).addClass("a-cal-calendar-container").removeClass("a-cal-static");
return c}function c(b,c){c=c||{};c.$inputContainer=b;c=a(v("\x3cdiv class\x3d'a-row a-cal-calendar-container' /\x3e"),c);b.append(c.$container);b.find(".a-cal-dropdown-container").addClass("a-hidden").attr("aria-hidden","true");b.data("a-cal-id",c.attributes.id).data("a-cal-input",!0).addClass("a-cal-calendar-container").removeClass("a-cal-static");return c}function p(a){a.jquery||(a=v(a));var b=a.data("a-cal-renderer-instance")||"a-calendar-renderer-instance";"a-calendar-renderer-instance"===b?k(a,
l):n.when(b).execute(function(b){k(a,b)})}function k(e,g){var h=e.data("a-cal-attributes")||{},k=e.data("a-cal-popover"),r=e.data("a-cal-input"),t=e.data("a-cal-inline");g=f.extend({observer:g},h);r?t?c(e,g):d(e,g):k?b(e,g):a(e,g)}function m(){v(".a-cal-static").each(function(){p(v(this))})}function u(a){a.jquery||(a=v(a));if(a.length){var b=a.closest(".a-cal-calendar-container");b=b.length?h[b.data("a-cal-id")]:h[a.data("a-cal-id")]}return b}var v=f.$,h={};f.on("a:pageUpdate ready",m);f.declarative("a-cal-input",
["click","keyup"],function(a){if(("keyup"===a.type&&a.$event.keyCode===f.constants.keycodes.ENTER||"click"===a.type)&&!e.get(a.$target)){var b=a.$target.data("a-cal-id");b=h[b];e.create(a.$target,{activate:"onclick",focusWhenShown:!1,width:"auto",padding:"none",position:b.attributes.position?b.attributes.position:"triggerBottom",closeButton:!1,popoverArrow:!1,dataStrategy:"inline"}).update({content:b.$container.addClass("a-cal-in-popover")}).show()}});return{create:a,createWithPopover:b,createWithInput:d,
createWithInputInline:c,createAll:m,get:u,getById:function(a){return h[a]},remove:function(a){var b=u(a);if(b){var c=b.attributes.$inputContainer;b.$container.remove();delete h[b.attributes.id];a.data("a-cal-popover")&&e.remove(a);c&&(a=c.find(".a-popover-trigger"),a.data("a-cal-popover")&&e.remove(a))}}}});"use strict";n.when("A","a-calendar-framework","a-popover").register("a-calendar-handler",function(f,g,l){var e=f.$;f.declarative("a-cal-select-date",["click"],function(a){var b=a.$target;if(a=
g.get(b))b=new Date(b.parent().data("timestamp")||b.data("timestamp")),a.selectDate(b),a.attributes.$inputContainer&&(a=l.get(a.attributes.$inputContainer.find(".a-cal-input")))&&a.hide()});f.declarative("a-cal-dropdown-select",["change"],function(a){if(a=g.get(a.$target)){var b=a.attributes.$inputContainer;if(b){var d=b.find(".a-cal-select-year").val(),c=b.find(".a-cal-select-month").val();b=b.find(".a-cal-select-day").val();d&&c&&b&&a.selectDate(d,c,b)}}});f.declarative("a-cal-prev-month",["click"],
function(a){var b=g.get(a.$target);b&&b.changeViewedMonth(b.attributes.viewedMonth-1);e(a.target).focus()});f.declarative("a-cal-next-month",["click"],function(a){var b=g.get(a.$target);b&&b.changeViewedMonth(b.attributes.viewedMonth+1);e(a.target).focus()});e(document).delegate(".a-icon-calendar","click",function(a){a.stopImmediatePropagation();e(a.target).parent().siblings(".a-cal-input").focus().click();e("html").hasClass("a-ie8")&&e(a.target).addClass("a-hey-ie8").removeClass("a-hey-ie8")});e(document).delegate(".a-cal-input",
"focusin",function(a){e(a.target).siblings(".a-icon-calendar").addClass("a-icon-calendar-focus")}).delegate(".a-cal-input","focusout",function(a){e(a.target).siblings(".a-icon-calendar").removeClass("a-icon-calendar-focus")})});"use strict";n.when("A","a-calendar-renderer","a-calendar-template-default").register("a-calendar-renderer-instance",function(f,g,l){return new g(l)});"use strict";n.when("A","a-calendar-utils").register("a-calendar-input",function(f,g){function l(e,a,b){var d=this;d.$input=
e;d.format=b;d.curDate=g.parseDate(e.val(),b);d.$input.bind("keyup change",function(){d.curDate=g.parseDate(e.val(),b);a.selectDate(d.curDate)}).bind("focusout",function(){d.setDate(a.attributes.selectedDate,!0)})}l.prototype.setDate=function(e,a){var b=this.curDate,d=b instanceof Date,c=e instanceof Date,f=d&&c;if(!e||c)if(d=!f&&(d||c),f&&b.getTime()!==e.getTime()||f&&!0===a||d)e=(this.curDate=e)?g.formatDate(e,this.format):null,this.$input.val(e)};return l})});