//>>built
define("dojox/date/timezone",["dojo","dojo/date","dojo/date/locale","dojo/_base/array","dojo/_base/xhr"],function(i,l,o){function A(a){a=a||{};h=i.mixin(h,a.zones||{});s=i.mixin(s,a.rules||{})}function t(a){u[a]=!0;i.xhrGet({url:require.toUrl((v.timezoneFileBasePath||"dojox/date/zoneinfo")+"/"+a),sync:!0,handleAs:"olson-zoneinfo",load:A,error:function(a){throw a;}})}function B(a){throw Error('Timezone "'+a+'" is either incorrect, or not loaded in the timezone registry.');}function w(a){var c=J[a];
if(!c&&(c=a.split("/")[0],c=K[c],!c)){var e=h[a];if("string"==typeof e)return w(e);if(u.backward)B(a);else return t("backward"),w(a)}return c}function x(a){a=a.match(/(\d+)(?::0*(\d*))?(?::0*(\d*))?([su])?$/);if(!a)return null;a[1]=parseInt(a[1],10);a[2]=a[2]?parseInt(a[2],10):0;a[3]=a[3]?parseInt(a[3],10):0;return a}function r(a,c,e,d,b,f,g){return Date.UTC(a,c,e,d,b,f)+6E4*(g||0)}function p(a){var c=x(a);if(null===c)return 0;c=(0===a.indexOf("-")?-1:1)*1E3*(60*(60*c[1]+c[2])+c[3]);return-c/60/1E3}
function C(a,c,e){var d=D[a[3].substr(0,3).toLowerCase()],b=a[4],f=x(a[5]);"u"==f[4]&&(e=0);if(isNaN(b)){if("last"==b.substr(0,4))return b=E[b.substr(4,3).toLowerCase()],a=new Date(r(c,d+1,1,f[1]-24,f[2],f[3],e)),e=l.add(a,"minute",-e).getUTCDay(),b=b>e?b-e-7:b-e,0!==b&&(a=l.add(a,"hour",24*b)),a;b=E[b.substr(0,3).toLowerCase()];if("undefined"!=b){if(">="==a[4].substr(3,2))return a=new Date(r(c,d,parseInt(a[4].substr(5),10),f[1],f[2],f[3],e)),e=l.add(a,"minute",-e).getUTCDay(),b=b<e?b-e+7:b-e,0!==
b&&(a=l.add(a,"hour",24*b)),a;if("<="==b.substr(3,2))return a=new Date(r(c,d,parseInt(a[4].substr(5),10),f[1],f[2],f[3],e)),e=l.add(a,"minute",-e).getUTCDay(),b=b>e?b-e-7:b-e,0!==b&&(a=l.add(a,"hour",24*b)),a}}else return a=new Date(r(c,d,parseInt(b,10),f[1],f[2],f[3],e));return null}function L(a,c){var e=[];i.forEach(s[a[1]]||[],function(d){for(var b=0;2>b;b++)switch(d[b]){case "min":d[b]=F;break;case "max":d[b]=y;break;case "only":break;default:if(d[b]=parseInt(d[b],10),isNaN(d[b]))throw Error("Invalid year found on rule");
}"string"==typeof d[6]&&(d[6]=p(d[6]));(d[0]<=c&&d[1]>=c||d[0]==c&&"only"==d[1])&&e.push({r:d,d:C(d,c,a[0])})});return e}function M(a,c){for(var e=z[a]=[],d=0;d<c.length;d++){var b=c[d],f=e[d]=[],g=null,j=null,q=[];"string"==typeof b[0]&&(b[0]=p(b[0]));0===d?f[0]=Date.UTC(F,0,1,0,0,0,0):(f[0]=e[d-1][1],g=c[d-1],j=e[d-1],q=j[2]);for(var k=(new Date(f[0])).getUTCFullYear(),m=b[3]?parseInt(b[3],10):y,h=[];k<=m;k++)h=h.concat(L(b,k));h.sort(function(a,b){return l.compare(a.d,b.d)});for(k=0;m=h[k];k++){var n=
0<k?h[k-1]:null;if(0>m.r[5].indexOf("u")&&0>m.r[5].indexOf("s"))if(0===k&&0<d)m.d=q.length?l.add(m.d,"minute",q[q.length-1].r[6]):0===l.compare(new Date(j[1]),m.d,"date")?new Date(j[1]):l.add(m.d,"minute",p(g[1]));else if(0<k)m.d=l.add(m.d,"minute",n.r[6])}f[2]=h;if(b[3]){var j=parseInt(b[3],10),q=D[(b[4]||"Jan").substr(0,3).toLowerCase()],k=parseInt(b[5]||"1",10),g=x(b[6]||"0"),o=f[1]=r(j,q,k,g[1],g[2],g[3],"u"==g[4]?0:b[0]);isNaN(o)&&(o=f[1]=C([0,0,0,b[4],b[5],b[6]||"0"],j,"u"==g[4]?0:b[0]).getTime());
j=i.filter(h,function(a,b){var c=0<b?6E4*h[b-1].r[6]:0;return a.d.getTime()<o+c});"u"!=g[4]&&"s"!=g[4]&&(f[1]=j.length?f[1]+6E4*j[j.length-1].r[6]:f[1]+6E4*p(b[1]))}else f[1]=Date.UTC(y,11,31,23,59,59,999)}}function G(a,c){for(var e=c,d=h[e];"string"==typeof d;)e=d,d=h[e];if(!d){if(!u.backward)return t("backward",!0),G(a,c);B(e)}z[c]||M(c,d);for(var e=z[c],b=a.getTime(),f=0,g;g=e[f];f++)if(b>=g[0]&&b<g[1])return{zone:d[f],range:e[f],idx:f};throw Error('No Zone found for "'+c+'" on '+a);}i.experimental("dojox.date.timezone");
i.getObject("date.timezone",!0,dojox);var v=i.config,n="africa,antarctica,asia,australasia,backward,etcetera,europe,northamerica,pacificnew,southamerica".split(","),F=1835,y=2038,u={},h={},z={},s={},H=v.timezoneLoadingScheme||"preloadAll",n=v.defaultZoneFile||("preloadAll"==H?n:"northamerica");i._contentHandlers["olson-zoneinfo"]=function(a){for(var a=i._contentHandlers.text(a).split("\n"),c=[],e="",d=null,e=null,b={zones:{},rules:{}},f=0;f<a.length;f++)if(c=a[f],c.match(/^\s/)&&(c="Zone "+d+c),c=
c.split("#")[0],3<c.length)switch(c=c.split(/\s+/),e=c.shift(),e){case "Zone":d=c.shift();c[0]&&(b.zones[d]||(b.zones[d]=[]),b.zones[d].push(c));break;case "Rule":e=c.shift();b.rules[e]||(b.rules[e]=[]);b.rules[e].push(c);break;case "Link":if(b.zones[c[1]])throw Error("Error with Link "+c[1]);b.zones[c[1]]=c[0]}return b};var D={jan:0,feb:1,mar:2,apr:3,may:4,jun:5,jul:6,aug:7,sep:8,oct:9,nov:10,dec:11},E={sun:0,mon:1,tue:2,wed:3,thu:4,fri:5,sat:6},K={EST:"northamerica",MST:"northamerica",HST:"northamerica",
EST5EDT:"northamerica",CST6CDT:"northamerica",MST7MDT:"northamerica",PST8PDT:"northamerica",America:"northamerica",Pacific:"australasia",Atlantic:"europe",Africa:"africa",Indian:"africa",Antarctica:"antarctica",Asia:"asia",Australia:"australasia",Europe:"europe",WET:"europe",CET:"europe",MET:"europe",EET:"europe"},J={"Pacific/Honolulu":"northamerica","Atlantic/Bermuda":"northamerica","Atlantic/Cape_Verde":"africa","Atlantic/St_Helena":"africa","Indian/Kerguelen":"antarctica","Indian/Chagos":"asia",
"Indian/Maldives":"asia","Indian/Christmas":"australasia","Indian/Cocos":"australasia","America/Danmarkshavn":"europe","America/Scoresbysund":"europe","America/Godthab":"europe","America/Thule":"europe","Asia/Yekaterinburg":"europe","Asia/Omsk":"europe","Asia/Novosibirsk":"europe","Asia/Krasnoyarsk":"europe","Asia/Irkutsk":"europe","Asia/Yakutsk":"europe","Asia/Vladivostok":"europe","Asia/Sakhalin":"europe","Asia/Magadan":"europe","Asia/Kamchatka":"europe","Asia/Anadyr":"europe","Africa/Ceuta":"europe",
"America/Argentina/Buenos_Aires":"southamerica","America/Argentina/Cordoba":"southamerica","America/Argentina/Tucuman":"southamerica","America/Argentina/La_Rioja":"southamerica","America/Argentina/San_Juan":"southamerica","America/Argentina/Jujuy":"southamerica","America/Argentina/Catamarca":"southamerica","America/Argentina/Mendoza":"southamerica","America/Argentina/Rio_Gallegos":"southamerica","America/Argentina/Ushuaia":"southamerica","America/Aruba":"southamerica","America/La_Paz":"southamerica",
"America/Noronha":"southamerica","America/Belem":"southamerica","America/Fortaleza":"southamerica","America/Recife":"southamerica","America/Araguaina":"southamerica","America/Maceio":"southamerica","America/Bahia":"southamerica","America/Sao_Paulo":"southamerica","America/Campo_Grande":"southamerica","America/Cuiaba":"southamerica","America/Porto_Velho":"southamerica","America/Boa_Vista":"southamerica","America/Manaus":"southamerica","America/Eirunepe":"southamerica","America/Rio_Branco":"southamerica",
"America/Santiago":"southamerica","Pacific/Easter":"southamerica","America/Bogota":"southamerica","America/Curacao":"southamerica","America/Guayaquil":"southamerica","Pacific/Galapagos":"southamerica","Atlantic/Stanley":"southamerica","America/Cayenne":"southamerica","America/Guyana":"southamerica","America/Asuncion":"southamerica","America/Lima":"southamerica","Atlantic/South_Georgia":"southamerica","America/Paramaribo":"southamerica","America/Port_of_Spain":"southamerica","America/Montevideo":"southamerica",
"America/Caracas":"southamerica"},I={US:"S",Chatham:"S",NZ:"S",NT_YK:"S",Edm:"S",Salv:"S",Canada:"S",StJohns:"S",TC:"S",Guat:"S",Mexico:"S",Haiti:"S",Barb:"S",Belize:"S",CR:"S",Moncton:"S",Swift:"S",Hond:"S",Thule:"S",NZAQ:"S",Zion:"S",ROK:"S",PRC:"S",Taiwan:"S",Ghana:"GMT",SL:"WAT",Chicago:"S",Detroit:"S",Vanc:"S",Denver:"S",Halifax:"S",Cuba:"S",Indianapolis:"S",Starke:"S",Marengo:"S",Pike:"S",Perry:"S",Vincennes:"S",Pulaski:"S",Louisville:"S",CA:"S",Nic:"S",Menominee:"S",Mont:"S",Bahamas:"S",NYC:"S",
Regina:"S",Resolute:"ES",DR:"S",Toronto:"S",Winn:"S"};i.setObject("dojox.date.timezone",{getTzInfo:function(a,c){if("lazyLoad"==H){var e=w(c);if(e)u[e]||t(e);else throw Error("Not a valid timezone ID.");}var d=G(a,c),e=d.zone[0],b,f=-1;b=d.range[2]||[];for(var g=a.getTime(),j=0,i;i=b[j];j++)g>=i.d.getTime()&&(f=j);e=(b=0<=f?b[f].r:null)?e+b[6]:s[d.zone[1]]&&0<d.idx?e+p(h[c][d.idx-1][1]):e+p(d.zone[1]);g=d.zone;f=g[2];-1<f.indexOf("%s")?(b?(d=b[7],"-"==d&&(d="")):g[1]in I?d=I[g[1]]:0<d.idx?(d=h[c][d.idx-
1][2],d=0>d.indexOf("%s")?f.replace("%s","S")==d?"S":"":""):d="",d=f.replace("%s",d)):-1<f.indexOf("/")?(d=f.split("/"),d=b?d[0===b[6]?0:1]:d[0]):d=f;return{tzOffset:e,tzAbbr:d}},loadZoneData:function(a){A(a)},getAllZones:function(){var a=[],c;for(c in h)a.push(c);a.sort();return a}});"string"==typeof n&&n&&(n=[n]);i.isArray(n)&&i.forEach(n,t);var N=o.format,O=o._getZone;o.format=function(a,c){c=c||{};if(c.timezone&&!c._tzInfo)c._tzInfo=dojox.date.timezone.getTzInfo(a,c.timezone);if(c._tzInfo)var e=
a.getTimezoneOffset()-c._tzInfo.tzOffset,a=new Date(a.getTime()+6E4*e);return N.call(this,a,c)};o._getZone=function(a,c,e){return e._tzInfo?c?e._tzInfo.tzAbbr:e._tzInfo.tzOffset:O.call(this,a,c,e)}});