//>>built
require({cache:{"url:dojox/widget/MultiSelectCalendar/MultiSelectCalendar.html":'<table cellspacing="0" cellpadding="0" class="dijitCalendarContainer" role="grid" dojoAttachEvent="onkeydown: _onKeyDown" aria-labelledby="${id}_year">\n\t<thead>\n\t\t<tr class="dijitReset dijitCalendarMonthContainer" valign="top">\n\t\t\t<th class=\'dijitReset dijitCalendarArrow\' dojoAttachPoint="decrementMonth">\n\t\t\t\t<img src="${_blankGif}" alt="" class="dijitCalendarIncrementControl dijitCalendarDecrease" role="presentation"/>\n\t\t\t\t<span dojoAttachPoint="decreaseArrowNode" class="dijitA11ySideArrow">-</span>\n\t\t\t</th>\n\t\t\t<th class=\'dijitReset\' colspan="5">\n\t\t\t\t<div dojoType="dijit.form.DropDownButton" dojoAttachPoint="monthDropDownButton"\n\t\t\t\t\tid="${id}_mddb" tabIndex="-1">\n\t\t\t\t</div>\n\t\t\t</th>\n\t\t\t<th class=\'dijitReset dijitCalendarArrow\' dojoAttachPoint="incrementMonth">\n\t\t\t\t<img src="${_blankGif}" alt="" class="dijitCalendarIncrementControl dijitCalendarIncrease" role="presentation"/>\n\t\t\t\t<span dojoAttachPoint="increaseArrowNode" class="dijitA11ySideArrow">+</span>\n\t\t\t</th>\n\t\t</tr>\n\t\t<tr>\n\t\t\t<th class="dijitReset dijitCalendarDayLabelTemplate" role="columnheader"><span class="dijitCalendarDayLabel"></span></th>\n\t\t</tr>\n\t</thead>\n\t<tbody dojoAttachEvent="onclick: _onDayClick, onmouseover: _onDayMouseOver, onmouseout: _onDayMouseOut, onmousedown: _onDayMouseDown, onmouseup: _onDayMouseUp" class="dijitReset dijitCalendarBodyContainer">\n\t\t<tr class="dijitReset dijitCalendarWeekTemplate" role="row">\n\t\t\t<td class="dijitReset dijitCalendarDateTemplate" role="gridcell"><span class="dijitCalendarDateLabel"></span></td>\n\t\t</tr>\n\t</tbody>\n\t<tfoot class="dijitReset dijitCalendarYearContainer">\n\t\t<tr>\n\t\t\t<td class=\'dijitReset\' valign="top" colspan="7">\n\t\t\t\t<h3 class="dijitCalendarYearLabel">\n\t\t\t\t\t<span dojoAttachPoint="previousYearLabelNode" class="dijitInline dijitCalendarPreviousYear"></span>\n\t\t\t\t\t<span dojoAttachPoint="currentYearLabelNode" class="dijitInline dijitCalendarSelectedYear" id="${id}_year"></span>\n\t\t\t\t\t<span dojoAttachPoint="nextYearLabelNode" class="dijitInline dijitCalendarNextYear"></span>\n\t\t\t\t</h3>\n\t\t\t</td>\n\t\t</tr>\n\t</tfoot>\n</table>'}});
define("dojox/widget/MultiSelectCalendar","dojo/main,dijit,dojo/text!./MultiSelectCalendar/MultiSelectCalendar.html,dojo/cldr/supplemental,dojo/date,dojo/date/locale,dijit/_Widget,dijit/_TemplatedMixin,dijit/_WidgetsInTemplateMixin,dijit/_CssStateMixin,dijit/form/DropDownButton,dijit/typematic".split(","),function(c,p,q,s,t,u,k,n,o,r){c.experimental("dojox.widget.MultiSelectCalendar");c.declare("dojox.widget.MultiSelectCalendar",[k,n,o,r],{templateString:q,widgetsInTemplate:!0,value:{},datePackage:"dojo.date",
dayWidth:"narrow",tabIndex:"0",returnIsoRanges:!1,currentFocus:new Date,baseClass:"dijitCalendar",cssStateNodes:{decrementMonth:"dijitCalendarArrow",incrementMonth:"dijitCalendarArrow",previousYearLabelNode:"dijitCalendarPreviousYear",nextYearLabelNode:"dijitCalendarNextYear"},_areValidDates:function(a){for(var b in this.value)if(valid=b&&!isNaN(b)&&"object"==typeof a&&b.toString()!=this.constructor.prototype.value.toString(),!valid)return!1;return!0},_getValueAttr:function(){return this.returnIsoRanges?
datesWithRanges=this._returnDatesWithIsoRanges(this._sort()):this._sort()},_setValueAttr:function(a,b){this.value={};if(c.isArray(a))c.forEach(a,function(a){if(-1==a.indexOf("/"))this.value[a]=1;else{var b=new c.date.stamp.fromISOString(a.substr(0,10)),a=new c.date.stamp.fromISOString(a.substr(11,10));this.toggleDate(b,[],[]);0<b-a?this._addToRangeRTL(b,a,[],[]):this._addToRangeLTR(b,a,[],[])}},this),0<a.length&&this.focusOnLastDate(a[a.length-1]);else if(a&&(a=new this.dateClassObj(a)),this._isValidDate(a)&&
(a.setHours(1,0,0,0),!this.isDisabledDate(a,this.lang)&&(dateIndex=c.date.stamp.toISOString(a).substring(0,10),this.value[dateIndex]=1,this.set("currentFocus",a),b||"undefined"==typeof b)))this.onChange(this.get("value")),this.onValueSelected(this.get("value"));this._populateGrid()},focusOnLastDate:function(a){var b;-1==a.indexOf("/")?lastDate=a:(b=new c.date.stamp.fromISOString(a.substr(0,10)),a=new c.date.stamp.fromISOString(a.substr(11,10)),lastDate=0<b-a?b:a);this.set("currentFocus",lastDate)},
_isValidDate:function(a){return a&&!isNaN(a)&&"object"==typeof a&&a.toString()!=this.constructor.prototype.value.toString()},_setText:function(a,b){for(;a.firstChild;)a.removeChild(a.firstChild);a.appendChild(c.doc.createTextNode(b))},_populateGrid:function(){var a=new this.dateClassObj(this.currentFocus);a.setDate(1);var b=a.getDay(),d=this.dateFuncObj.getDaysInMonth(a),e=this.dateFuncObj.getDaysInMonth(this.dateFuncObj.add(a,"month",-1)),f=new this.dateClassObj,g=c.cldr.supplemental.getFirstDayOfWeek(this.lang);
g>b&&(g-=7);this.listOfNodes=c.query(".dijitCalendarDateTemplate",this.domNode);this.listOfNodes.forEach(function(j,m){var m=m+g,i=new this.dateClassObj(a),l,h="dijitCalendar",k=0;m<b?(l=e-b+m+1,k=-1,h+="Previous"):m>=b+d?(l=m-b-d+1,k=1,h+="Next"):(l=m-b+1,h+="Current");k&&(i=this.dateFuncObj.add(i,"month",k));i.setDate(l);this.dateFuncObj.compare(i,f,"date")||(h="dijitCalendarCurrentDate "+h);dateIndex=c.date.stamp.toISOString(i).substring(0,10);this.isDisabledDate(i,this.lang)||this._isSelectedDate(i,
this.lang)&&(h=this.value[dateIndex]?"dijitCalendarSelectedDate "+h:h.replace("dijitCalendarSelectedDate ",""));this._isSelectedDate(i,this.lang)&&(h="dijitCalendarBrowsingDate "+h);this.isDisabledDate(i,this.lang)&&(h="dijitCalendarDisabledDate "+h);(l=this.getClassForDate(i,this.lang))&&(h=l+" "+h);j.className=h+"Month dijitCalendarDateTemplate";j.dijitDateValue=i.valueOf();c.attr(j,"dijitDateValue",i.valueOf());h=c.query(".dijitCalendarDateLabel",j)[0];i=i.getDateLocalized?i.getDateLocalized(this.lang):
i.getDate();this._setText(h,i)},this);var j=this.dateLocaleModule.getNames("months","wide","standAlone",this.lang,a);this.monthDropDownButton.dropDown.set("months",j);this.monthDropDownButton.containerNode.innerHTML=(6==c.isIE?"":"<div class='dijitSpacer'>"+this.monthDropDownButton.dropDown.domNode.innerHTML+"</div>")+"<div class='dijitCalendarMonthLabel dijitCalendarCurrentMonthLabel'>"+j[a.getMonth()]+"</div>";var l=a.getFullYear()-1,k=new this.dateClassObj;c.forEach(["previous","current","next"],
function(a){k.setFullYear(l++);this._setText(this[a+"YearLabelNode"],this.dateLocaleModule.format(k,{selector:"year",locale:this.lang}))},this)},goToToday:function(){this.set("currentFocus",new this.dateClassObj,!1)},constructor:function(a){this.dateClassObj=c.getObject(a.datePackage&&"dojo.date"!=a.datePackage?a.datePackage+".Date":"Date",!1);this.datePackage=a.datePackage||this.datePackage;this.dateFuncObj=c.getObject(this.datePackage,!1);this.dateLocaleModule=c.getObject(this.datePackage+".locale",
!1)},buildRendering:function(){this.inherited(arguments);c.setSelectable(this.domNode,!1);var a=c.hitch(this,function(a,b){for(var d=c.query(a,this.domNode)[0],e=0;e<b;e++)d.parentNode.appendChild(d.cloneNode(!0))});a(".dijitCalendarDayLabelTemplate",6);a(".dijitCalendarDateTemplate",6);a(".dijitCalendarWeekTemplate",5);var b=this.dateLocaleModule.getNames("days",this.dayWidth,"standAlone",this.lang),d=c.cldr.supplemental.getFirstDayOfWeek(this.lang);c.query(".dijitCalendarDayLabel",this.domNode).forEach(function(a,
c){this._setText(a,b[(c+d)%7])},this);a=new this.dateClassObj(this.currentFocus);this.monthDropDownButton.dropDown=new dojox.widget._MonthDropDown({id:this.id+"_mdd",onChange:c.hitch(this,"_onMonthSelect")});this.set("currentFocus",a,!1);var e=this,a=function(a,b,c){e._connects.push(p.typematic.addMouseListener(e[a],e,function(a){0<=a&&e._adjustDisplay(b,c)},0.8,500))};a("incrementMonth","month",1);a("decrementMonth","month",-1);a("nextYearLabelNode","year",1);a("previousYearLabelNode","year",-1)},
_adjustDisplay:function(a,b){this._setCurrentFocusAttr(this.dateFuncObj.add(this.currentFocus,a,b))},_setCurrentFocusAttr:function(a,b){var d=this.currentFocus,d=d?c.query("[dijitDateValue="+d.valueOf()+"]",this.domNode)[0]:null,a=new this.dateClassObj(a);a.setHours(1,0,0,0);this._set("currentFocus",a);var e=c.date.stamp.toISOString(a).substring(0,7);if(e!=this.previousMonth)this._populateGrid(),this.previousMonth=e;e=c.query("[dijitDateValue="+a.valueOf()+"]",this.domNode)[0];e.setAttribute("tabIndex",
this.tabIndex);(this._focused||b)&&e.focus();d&&d!=e&&(c.isWebKit?d.setAttribute("tabIndex","-1"):d.removeAttribute("tabIndex"))},focus:function(){this._setCurrentFocusAttr(this.currentFocus,!0)},_onMonthSelect:function(a){this.currentFocus=this.dateFuncObj.add(this.currentFocus,"month",a-this.currentFocus.getMonth());this._populateGrid()},toggleDate:function(a,b,d){this.value[c.date.stamp.toISOString(a).substring(0,10)]?this.unselectDate(a,d):this.selectDate(a,b)},selectDate:function(a,b){var d=
this._getNodeByDate(a),e=d.className,f=c.date.stamp.toISOString(a).substring(0,10);this.value[f]=1;b.push(f);d.className="dijitCalendarSelectedDate "+e},unselectDate:function(a,b){var d=this._getNodeByDate(a),e=d.className,f=c.date.stamp.toISOString(a).substring(0,10);delete this.value[f];b.push(f);e=e.replace("dijitCalendarSelectedDate ","");d.className=e},_getNodeByDate:function(a){var b=new this.dateClassObj(this.listOfNodes[0].dijitDateValue);return this.listOfNodes[Math.abs(c.date.difference(b,
a,"day"))]},_onDayClick:function(a){c.stopEvent(a);for(a=a.target;a&&!a.dijitDateValue;a=a.parentNode);if(a&&!c.hasClass(a,"dijitCalendarDisabledDate"))value=new this.dateClassObj(a.dijitDateValue),this.rangeJustSelected?(this.rangeJustSelected=!1,this.set("currentFocus",value)):(this.toggleDate(value,[],[]),this.previouslySelectedDay=value,this.set("currentFocus",value),this.onValueSelected([c.date.stamp.toISOString(value).substring(0,10)]))},_onDayMouseOver:function(a){if((a=c.hasClass(a.target,
"dijitCalendarDateLabel")?a.target.parentNode:a.target)&&(a.dijitDateValue||a==this.previousYearLabelNode||a==this.nextYearLabelNode))c.addClass(a,"dijitCalendarHoveredDate"),this._currentNode=a},_setEndRangeAttr:function(a){a=new this.dateClassObj(a);a.setHours(1);this.endRange=a},_getEndRangeAttr:function(){var a=new this.dateClassObj(this.endRange);a.setHours(0,0,0,0);a.getDate()<this.endRange.getDate()&&(a=this.dateFuncObj.add(a,"hour",1));return a},_onDayMouseOut:function(a){if(this._currentNode&&
!(a.relatedTarget&&a.relatedTarget.parentNode==this._currentNode))a="dijitCalendarHoveredDate",c.hasClass(this._currentNode,"dijitCalendarActiveDate")&&(a+=" dijitCalendarActiveDate"),c.removeClass(this._currentNode,a),this._currentNode=null},_onDayMouseDown:function(a){var b=a.target.parentNode;if(b&&b.dijitDateValue)c.addClass(b,"dijitCalendarActiveDate"),this._currentNode=b;a.shiftKey&&this.previouslySelectedDay?(this.selectingRange=!0,this.set("endRange",b.dijitDateValue),this._selectRange()):
(this.selectingRange=!1,this.previousRangeEnd=this.previousRangeStart=null)},_onDayMouseUp:function(a){(a=a.target.parentNode)&&a.dijitDateValue&&c.removeClass(a,"dijitCalendarActiveDate")},handleKey:function(a){var b=c.keys,d=-1,e,f=this.currentFocus;switch(a.keyCode){case b.RIGHT_ARROW:d=1;case b.LEFT_ARROW:e="day";this.isLeftToRight()||(d*=-1);break;case b.DOWN_ARROW:d=1;case b.UP_ARROW:e="week";break;case b.PAGE_DOWN:d=1;case b.PAGE_UP:e=a.ctrlKey||a.altKey?"year":"month";break;case b.END:f=this.dateFuncObj.add(f,
"month",1),e="day";case b.HOME:f=new this.dateClassObj(f);f.setDate(1);break;case b.ENTER:case b.SPACE:a.shiftKey&&this.previouslySelectedDay?(this.selectingRange=!0,this.set("endRange",f),this._selectRange()):(this.selectingRange=!1,this.toggleDate(f,[],[]),this.previouslySelectedDay=f,this.previousRangeEnd=this.previousRangeStart=null,this.onValueSelected([c.date.stamp.toISOString(f).substring(0,10)]));break;default:return!0}e&&(f=this.dateFuncObj.add(f,e,d));this.set("currentFocus",f);return!1},
_onKeyDown:function(a){this.handleKey(a)||c.stopEvent(a)},_removeFromRangeLTR:function(a,b,d,e){difference=Math.abs(c.date.difference(a,b,"day"));for(var f=0;f<=difference;f++){var g=c.date.add(a,"day",f);this.toggleDate(g,d,e)}if(null==this.previousRangeEnd)this.previousRangeEnd=b;else if(0<c.date.compare(b,this.previousRangeEnd,"date"))this.previousRangeEnd=b;if(null==this.previousRangeStart)this.previousRangeStart=b;else if(0<c.date.compare(b,this.previousRangeStart,"date"))this.previousRangeStart=
b;this.previouslySelectedDay=c.date.add(g,"day",1)},_removeFromRangeRTL:function(a,b,d,e){difference=Math.abs(c.date.difference(a,b,"day"));for(var f=0;f<=difference;f++){var g=c.date.add(a,"day",-f);this.toggleDate(g,d,e)}if(null==this.previousRangeEnd)this.previousRangeEnd=b;else if(0>c.date.compare(b,this.previousRangeEnd,"date"))this.previousRangeEnd=b;if(null==this.previousRangeStart)this.previousRangeStart=b;else if(0>c.date.compare(b,this.previousRangeStart,"date"))this.previousRangeStart=
b;this.previouslySelectedDay=c.date.add(g,"day",-1)},_addToRangeRTL:function(a,b,d,e){difference=Math.abs(c.date.difference(a,b,"day"));for(var f=1;f<=difference;f++){var g=c.date.add(a,"day",-f);this.toggleDate(g,d,e)}if(null==this.previousRangeStart)this.previousRangeStart=b;else if(0>c.date.compare(b,this.previousRangeStart,"date"))this.previousRangeStart=b;if(null==this.previousRangeEnd)this.previousRangeEnd=a;else if(0<c.date.compare(a,this.previousRangeEnd,"date"))this.previousRangeEnd=a;this.previouslySelectedDay=
g},_addToRangeLTR:function(a,b,d,e){difference=Math.abs(c.date.difference(a,b,"day"));for(var f=1;f<=difference;f++){var g=c.date.add(a,"day",f);this.toggleDate(g,d,e)}if(null==this.previousRangeStart)this.previousRangeStart=a;else if(0>c.date.compare(a,this.previousRangeStart,"date"))this.previousRangeStart=a;if(null==this.previousRangeEnd)this.previousRangeEnd=b;else if(0<c.date.compare(b,this.previousRangeEnd,"date"))this.previousRangeEnd=b;this.previouslySelectedDay=g},_selectRange:function(){var a=
[],b=[],d=this.previouslySelectedDay,e=this.get("endRange");removingFromRange=!this.previousRangeStart&&!this.previousRangeEnd?!1:0>c.date.compare(e,this.previousRangeStart,"date")||0<c.date.compare(e,this.previousRangeEnd,"date")?!1:!0;!0==removingFromRange?0>c.date.compare(e,d,"date")?this._removeFromRangeRTL(d,e,a,b):this._removeFromRangeLTR(d,e,a,b):0>c.date.compare(e,d,"date")?this._addToRangeRTL(d,e,a,b):this._addToRangeLTR(d,e,a,b);if(0<a.length)this.onValueSelected(a);if(0<b.length)this.onValueUnselected(b);
this.rangeJustSelected=!0},onValueSelected:function(){},onValueUnselected:function(){},onChange:function(){},_isSelectedDate:function(a){dateIndex=c.date.stamp.toISOString(a).substring(0,10);return this.value[dateIndex]},isDisabledDate:function(){},getClassForDate:function(){},_sort:function(){if(this.value=={})return[];var a=[],b;for(b in this.value)a.push(b);a.sort(function(a,b){return new Date(a)-new Date(b)});return a},_returnDatesWithIsoRanges:function(a){var b=[];if(1<a.length){for(var d=!1,
e=null,f=null,g=c.date.stamp.fromISOString(a[0]),j=1;j<a.length+1;j++)currentDate=c.date.stamp.fromISOString(a[j]),d?(difference=Math.abs(c.date.difference(g,currentDate,"day")),1==difference?f=currentDate:(range=c.date.stamp.toISOString(e).substring(0,10)+"/"+c.date.stamp.toISOString(f).substring(0,10),b.push(range),d=!1)):(difference=Math.abs(c.date.difference(g,currentDate,"day")),1==difference?(d=!0,e=g,f=currentDate):b.push(c.date.stamp.toISOString(g).substring(0,10))),g=currentDate;return b}return a}});
c.declare("dojox.widget._MonthDropDown",[k,n,o],{months:[],templateString:"<div class='dijitCalendarMonthMenu dijitMenu' dojoAttachEvent='onclick:_onClick,onmouseover:_onMenuHover,onmouseout:_onMenuHover'></div>",_setMonthsAttr:function(a){this.domNode.innerHTML=c.map(a,function(a,c){return a?"<div class='dijitCalendarMonthLabel' month='"+c+"'>"+a+"</div>":""}).join("")},_onClick:function(a){this.onChange(c.attr(a.target,"month"))},onChange:function(){},_onMenuHover:function(a){c.toggleClass(a.target,
"dijitCalendarMonthLabelHover","mouseover"==a.type)}});return dojox.widget.MultiSelectCalendar});