text: /*!
   * Globalize v1.0.0 2015-04-23T12:02Z Released under the MIT license
   * http://git.io/TrdQbw
   */
  (function(a,b){if(typeof define==="function"&&define.amd){define(["cldr","../globalize","./number","cldr/event","cldr/supplemental"],b)}else{if(typeof exports==="object"){module.exports=b(require("cldrjs"),require("globalize"))}else{b(a.Cldr,a.Globalize)}}}(this,function(f,o){var j=o._createError,c=o._createErrorUnsupportedFeature,n=o._formatMessage,B=o._numberSymbol,w=o._regexpEscape,F=o._stringPad,y=o._validateCldr,r=o._validateDefaultLocale,J=o._validateParameterPresence,K=o._validateParameterType,z=o._validateParameterTypePlainObject,b=o._validateParameterTypeString;var a=function(O,N){K(O,N,O===undefined||O instanceof Date,"Date")};var l=function(N,O){return j("E_INVALID_PAR_VALUE","Invalid `{name}` value ({value}).",{name:N,value:O})};var u=function(Q,S){var P,O,U,N,R;function T(X,W,V){return n(S.main(["dates/calendars/gregorian/dateTimeFormats",X]),[V,W])}switch(true){case"skeleton" in Q:U=Q.skeleton;O=S.main(["dates/calendars/gregorian/dateTimeFormats/availableFormats",U]);if(!O){N=U.split(/[^hHKkmsSAzZOvVXx]/).slice(-1)[0];P=U.split(/[^GyYuUrQqMLlwWdDFgEec]/)[0];if(/(MMMM|LLLL).*[Ec]/.test(P)){R="full"}else{if(/MMMM/g.test(P)){R="long"}else{if(/MMM/g.test(P)||/LLL/g.test(P)){R="medium"}else{R="short"}}}O=T(R,S.main(["dates/calendars/gregorian/dateTimeFormats/availableFormats",P]),S.main(["dates/calendars/gregorian/dateTimeFormats/availableFormats",N]))}break;case"date" in Q:case"time" in Q:O=S.main(["dates/calendars/gregorian","date" in Q?"dateFormats":"timeFormats",(Q.date||Q.time)]);break;case"datetime" in Q:O=T(Q.datetime,S.main(["dates/calendars/gregorian/dateFormats",Q.datetime]),S.main(["dates/calendars/gregorian/timeFormats",Q.datetime]));break;case"raw" in Q:O=Q.raw;break;default:throw l({name:"options",value:Q})}return O};var A=function(O,N){return(O.getDay()-N+7)%7};var L=function(P,O){var N=86400000;return(O.getTime()-P.getTime())/N};var g=function(N,O){N=new Date(N.getTime());switch(O){case"year":N.setMonth(0);case"month":N.setDate(1);case"day":N.setHours(0);case"hour":N.setMinutes(0);case"minute":N.setSeconds(0);case"second":N.setMilliseconds(0)}return N};var C=function(N){return Math.floor(L(g(N,"year"),N))};var i=["sun","mon","tue","wed","thu","fri","sat"];var v=function(N){return i.indexOf(N.supplemental.weekData.firstDay())};var M=function(N){return N-g(N,"day")};var p=(/([a-z])\1*|'([^']|'')+'|''|./ig);var h=function(O,Q,P,N){var S,R=O.getTimezoneOffset();S=Math.abs(R);N=N||{1:function(T){return F(T,1)},2:function(T){return F(T,2)}};return Q.split(";")[R>0?1:0].replace(":",P).replace(/HH?/,function(T){return N[T.length](Math.floor(S/60))}).replace(/mm/,function(){return N[2](S%60)})};var s=function(N,P,O){var Q=O.timeSeparator;return O.pattern.replace(p,function(U){var R,S=U.charAt(0),T=U.length;if(S==="j"){S=O.preferredTime}if(S==="Z"){if(T<4){S="x";T=4}else{if(T<5){S="O";T=4}else{S="X";T=5}}}switch(S){case"G":R=O.eras[N.getFullYear()<0?0:1];break;case"y":R=N.getFullYear();if(T===2){R=String(R);R=+R.substr(R.length-2)}break;case"Y":R=new Date(N.getTime());R.setDate(R.getDate()+7-A(N,O.firstDay)-O.firstDay-O.minDays);R=R.getFullYear();if(T===2){R=String(R);R=+R.substr(R.length-2)}break;case"Q":case"q":R=Math.ceil((N.getMonth()+1)/3);if(T>2){R=O.quarters[S][T][R]}break;case"M":case"L":R=N.getMonth()+1;if(T>2){R=O.months[S][T][R]}break;case"w":R=A(g(N,"year"),O.firstDay);R=Math.ceil((C(N)+R)/7)-(7-R>=O.minDays?0:1);break;case"W":R=A(g(N,"month"),O.firstDay);R=Math.ceil((N.getDate()+R)/7)-(7-R>=O.minDays?0:1);break;case"d":R=N.getDate();break;case"D":R=C(N)+1;break;case"F":R=Math.floor(N.getDate()/7)+1;break;case"e":case"c":if(T<=2){R=A(N,O.firstDay)+1;break}case"E":R=i[N.getDay()];R=O.days[S][T][R];break;case"a":R=O.dayPeriods[N.getHours()<12?"am":"pm"];break;case"h":R=(N.getHours()%12)||12;break;case"H":R=N.getHours();break;case"K":R=N.getHours()%12;break;case"k":R=N.getHours()||24;break;case"m":R=N.getMinutes();break;case"s":R=N.getSeconds();break;case"S":R=Math.round(N.getMilliseconds()*Math.pow(10,T-3));break;case"A":R=Math.round(M(N)*Math.pow(10,T-3));break;case"z":case"O":if(N.getTimezoneOffset()===0){R=O.gmtZeroFormat}else{R=h(N,T<4?"+H;-H":O.tzLongHourFormat,Q,P);R=O.gmtFormat.replace(/\{0\}/,R)}break;case"X":if(N.getTimezoneOffset()===0){R="Z";break}case"x":R=T===1?"+HH;-HH":(T%2?"+HH:mm;-HH:mm":"+HHmm;-HHmm");R=h(N,R,":");break;case":":R=Q;break;case"'":U=U.replace(/''/,"'");if(T>2){U=U.slice(1,-1)}R=U;break;default:R=U}if(typeof R==="number"){R=P[T](R)}return R})};var k=function(R,P){var N={pattern:R,timeSeparator:B("timeSeparator",P)},Q=["abbreviated","wide","narrow"];function O(S){if(!N.numberFormatters){N.numberFormatters={}}N.numberFormatters[S]=F("",S)}R.replace(p,function(V){var S,T=V.charAt(0),U=V.length;if(T==="j"){N.preferredTime=T=P.supplemental.timeData.preferred()}if(T==="Z"&&U===4){T="O";U=4}switch(T){case"G":N.eras=P.main(["dates/calendars/gregorian/eras",U<=3?"eraAbbr":(U===4?"eraNames":"eraNarrow")]);break;case"y":S=true;break;case"Y":N.firstDay=v(P);N.minDays=P.supplemental.weekData.minDays();S=true;break;case"u":case"U":throw c({feature:"year pattern `"+T+"`"});case"Q":case"q":if(U>2){if(!N.quarters){N.quarters={}}if(!N.quarters[T]){N.quarters[T]={}}N.quarters[T][U]=P.main(["dates/calendars/gregorian/quarters",T==="Q"?"format":"stand-alone",Q[U-3]])}else{S=true}break;case"M":case"L":if(U>2){if(!N.months){N.months={}}if(!N.months[T]){N.months[T]={}}N.months[T][U]=P.main(["dates/calendars/gregorian/months",T==="M"?"format":"stand-alone",Q[U-3]])}else{S=true}break;case"w":case"W":N.firstDay=v(P);N.minDays=P.supplemental.weekData.minDays();S=true;break;case"d":case"D":case"F":S=true;break;case"g":throw c({feature:"Julian day pattern `g`"});case"e":case"c":if(U<=2){N.firstDay=v(P);S=true;break}case"E":if(!N.days){N.days={}}if(!N.days[T]){N.days[T]={}}if(U===6){N.days[T][U]=P.main(["dates/calendars/gregorian/days",T==="c"?"stand-alone":"format","short"])||P.main(["dates/calendars/gregorian/days",T==="c"?"stand-alone":"format","abbreviated"])}else{N.days[T][U]=P.main(["dates/calendars/gregorian/days",T==="c"?"stand-alone":"format",Q[U<3?0:U-3]])}break;case"a":N.dayPeriods=P.main("dates/calendars/gregorian/dayPeriods/format/wide");break;case"h":case"H":case"K":case"k":case"m":case"s":case"S":case"A":S=true;break;case"z":case"O":N.gmtFormat=P.main("dates/timeZoneNames/gmtFormat");N.gmtZeroFormat=P.main("dates/timeZoneNames/gmtZeroFormat");N.tzLongHourFormat=P.main("dates/timeZoneNames/hourFormat");case"Z":case"X":case"x":O(1);O(2);break;case"v":case"V":throw c({feature:"timezone pattern `"+T+"`"})}if(S){O(U)}});return N};var m=function(N){return new Date(N,1,29).getMonth()===1};var e=function(N){return new Date(N.getFullYear(),N.getMonth()+1,0).getDate()};var t=function(O,N){var P=new Date(O.getFullYear(),O.getMonth()+1,0).getDate();O.setDate(N<1?1:N<P?N:P)};var H=function(O,P){var N=O.getDate();O.setDate(1);O.setMonth(P);t(O,N)};var I=function(P,N,O){return P<N||P>O};var E=function(aa,V,R){var Z,ac,O,X,P,Q,T,Y,ad=0,U=1,ag=2,W=3,N=4,S=5,af=6,ah=new Date(),ae=[],ab=["year","month","day","hour","minute","second","milliseconds"];if(!V.length){return null}Y=V.every(function(ai){var am,aj,al,ak;if(ai.type==="literal"){return true}aj=ai.type.charAt(0);ak=ai.type.length;if(aj==="j"){aj=R.preferredTimeData}switch(aj){case"G":ae.push(ad);X=+ai.value;break;case"y":al=ai.value;if(ak===2){if(I(al,0,99)){return false}am=Math.floor(ah.getFullYear()/100)*100;al+=am;if(al>ah.getFullYear()+20){al-=100}}ah.setFullYear(al);ae.push(ad);break;case"Y":throw c({feature:"year pattern `"+aj+"`"});case"Q":case"q":break;case"M":case"L":if(ak<=2){al=ai.value}else{al=+ai.value}if(I(al,1,12)){return false}H(ah,al-1);ae.push(U);break;case"w":case"W":break;case"d":ac=ai.value;ae.push(ag);break;case"D":O=ai.value;ae.push(ag);break;case"F":break;case"e":case"c":case"E":break;case"a":Z=ai.value;break;case"h":al=ai.value;if(I(al,1,12)){return false}P=Q=true;ah.setHours(al===12?0:al);ae.push(W);break;case"K":al=ai.value;if(I(al,0,11)){return false}P=Q=true;ah.setHours(al);ae.push(W);break;case"k":al=ai.value;if(I(al,1,24)){return false}P=true;ah.setHours(al===24?0:al);ae.push(W);break;case"H":al=ai.value;if(I(al,0,23)){return false}P=true;ah.setHours(al);ae.push(W);break;case"m":al=ai.value;if(I(al,0,59)){return false}ah.setMinutes(al);ae.push(N);break;case"s":al=ai.value;if(I(al,0,59)){return false}ah.setSeconds(al);ae.push(S);break;case"A":ah.setHours(0);ah.setMinutes(0);ah.setSeconds(0);case"S":al=Math.round(ai.value*Math.pow(10,3-ak));ah.setMilliseconds(al);ae.push(af);break;case"Z":case"z":case"O":case"X":case"x":T=ai.value-ah.getTimezoneOffset();break}return true});if(!Y){return null}if(P&&!(!Z^Q)){return null}if(X===0){ah.setFullYear(ah.getFullYear()*-1+1)}if(ac!==undefined){if(I(ac,1,e(ah))){return null}ah.setDate(ac)}else{if(O!==undefined){if(I(O,1,m(ah.getFullYear())?366:365)){return null}ah.setMonth(0);ah.setDate(O)}}if(Q&&Z==="pm"){ah.setHours(ah.getHours()+12)}if(T){ah.setMinutes(ah.getMinutes()+T)}ae=Math.max.apply(null,ae);ah=g(ah,ab[ae]);return ah};var D=function(N){return{preferredTimeData:N.supplemental.timeData.preferred()}};var q=/[0-9\xB2\xB3\xB9\xBC-\xBE\u0660-\u0669\u06F0-\u06F9\u07C0-\u07C9\u0966-\u096F\u09E6-\u09EF\u09F4-\u09F9\u0A66-\u0A6F\u0AE6-\u0AEF\u0B66-\u0B6F\u0B72-\u0B77\u0BE6-\u0BF2\u0C66-\u0C6F\u0C78-\u0C7E\u0CE6-\u0CEF\u0D66-\u0D75\u0DE6-\u0DEF\u0E50-\u0E59\u0ED0-\u0ED9\u0F20-\u0F33\u1040-\u1049\u1090-\u1099\u1369-\u137C\u16EE-\u16F0\u17E0-\u17E9\u17F0-\u17F9\u1810-\u1819\u1946-\u194F\u19D0-\u19DA\u1A80-\u1A89\u1A90-\u1A99\u1B50-\u1B59\u1BB0-\u1BB9\u1C40-\u1C49\u1C50-\u1C59\u2070\u2074-\u2079\u2080-\u2089\u2150-\u2182\u2185-\u2189\u2460-\u249B\u24EA-\u24FF\u2776-\u2793\u2CFD\u3007\u3021-\u3029\u3038-\u303A\u3192-\u3195\u3220-\u3229\u3248-\u324F\u3251-\u325F\u3280-\u3289\u32B1-\u32BF\uA620-\uA629\uA6E6-\uA6EF\uA830-\uA835\uA8D0-\uA8D9\uA900-\uA909\uA9D0-\uA9D9\uA9F0-\uA9F9\uAA50-\uAA59\uABF0-\uABF9\uFF10-\uFF19]|\uD800[\uDD07-\uDD33\uDD40-\uDD78\uDD8A\uDD8B\uDEE1-\uDEFB\uDF20-\uDF23\uDF41\uDF4A\uDFD1-\uDFD5]|\uD801[\uDCA0-\uDCA9]|\uD802[\uDC58-\uDC5F\uDC79-\uDC7F\uDCA7-\uDCAF\uDD16-\uDD1B\uDE40-\uDE47\uDE7D\uDE7E\uDE9D-\uDE9F\uDEEB-\uDEEF\uDF58-\uDF5F\uDF78-\uDF7F\uDFA9-\uDFAF]|\uD803[\uDE60-\uDE7E]|\uD804[\uDC52-\uDC6F\uDCF0-\uDCF9\uDD36-\uDD3F\uDDD0-\uDDD9\uDDE1-\uDDF4\uDEF0-\uDEF9]|\uD805[\uDCD0-\uDCD9\uDE50-\uDE59\uDEC0-\uDEC9]|\uD806[\uDCE0-\uDCF2]|\uD809[\uDC00-\uDC6E]|\uD81A[\uDE60-\uDE69\uDF50-\uDF59\uDF5B-\uDF61]|\uD834[\uDF60-\uDF71]|\uD835[\uDFCE-\uDFFF]|\uD83A[\uDCC7-\uDCCF]|\uD83C[\uDD00-\uDD0C]/;var x=function(S,N,O){var R,P=O.timeSeparator,T=[],Q=["abbreviated","wide","narrow"];R=O.pattern.match(p).every(function(ac){var aa,U,af,Y,X={};function Z(ai,ah){var ag=S.match(ai);ah=ah||function(aj){return +aj};if(!ag){return false}if(ag.length<8){X.value=(ag[1]?-ah(ag[1]):ah(ag[4]))*60}else{X.value=(ag[1]?-ah(ag[1]):ah(ag[7]))*60+(ag[1]?-ah(ag[4]):ah(ag[10]))}return true}function ab(aj,ag,ai){var ah;if(!ag){ag="{0}"}ah=aj.replace("+","\\+").replace(/HH|mm/g,"(("+q.source+")("+q.source+"))").replace(/H|m/g,"(("+q.source+")("+q.source+")?)");if(ai){ah=ah.replace(/:/g,ai)}ah=ah.split(";").map(function(ak){return ag.replace("{0}",ak)}).join("|");return new RegExp(ah)}function ad(){if(U===1){af=true;return Y=q}}function ae(){if(U===1){af=true;return Y=new RegExp("("+q.source+")("+q.source+")?")}}function W(){if(U===2){af=true;return Y=new RegExp("("+q.source+")("+q.source+")")}}function V(aj){var ag,ah,ai=O[aj.join("/")];for(ag in ai){ah=new RegExp("^"+ai[ag]);if(ah.test(S)){X.value=ag;return Y=new RegExp(ai[ag])}}return null}X.type=ac;aa=ac.charAt(0),U=ac.length;if(aa==="Z"){if(U<4){aa="x";U=4}else{if(U<5){aa="O";U=4}else{aa="X";U=5}}}switch(aa){case"G":V(["gregorian/eras",U<=3?"eraAbbr":(U===4?"eraNames":"eraNarrow")]);break;case"y":case"Y":af=true;if(U===1){Y=new RegExp("("+q.source+")+")}else{if(U===2){Y=new RegExp("("+q.source+")("+q.source+")")}else{Y=new RegExp("("+q.source+"){"+U+",}")}}break;case"Q":case"q":ad()||W()||V(["gregorian/quarters",aa==="Q"?"format":"stand-alone",Q[U-3]]);break;case"M":case"L":ae()||W()||V(["gregorian/months",aa==="M"?"format":"stand-alone",Q[U-3]]);break;case"D":if(U<=3){af=true;Y=new RegExp("("+q.source+"){"+U+",3}")}break;case"W":case"F":ad();break;case"e":case"c":if(U<=2){ad()||W();break}case"E":if(U===6){V(["gregorian/days",[aa==="c"?"stand-alone":"format"],"short"])||V(["gregorian/days",[aa==="c"?"stand-alone":"format"],"abbreviated"])}else{V(["gregorian/days",[aa==="c"?"stand-alone":"format"],Q[U<3?0:U-3]])}break;case"a":V(["gregorian/dayPeriods/format/wide"]);break;case"w":case"d":case"h":case"H":case"K":case"k":case"j":case"m":case"s":ae()||W();break;case"S":af=true;Y=new RegExp("("+q.source+"){"+U+"}");break;case"A":af=true;Y=new RegExp("("+q.source+"){"+(U+5)+"}");break;case"z":case"O":if(S===O["timeZoneNames/gmtZeroFormat"]){X.value=0;Y=new RegExp(O["timeZoneNames/gmtZeroFormat"])}else{Y=ab(U<4?"+H;-H":O["timeZoneNames/hourFormat"],O["timeZoneNames/gmtFormat"],P);if(!Z(Y,N)){return null}}break;case"X":if(S==="Z"){X.value=0;Y=/Z/;break}case"x":Y=ab(U===1?"+HH;-HH":(U%2?"+HH:mm;-HH:mm":"+HHmm;-HHmm"));if(!Z(Y)){return null}break;case"'":X.type="literal";ac=ac.replace(/''/,"'");if(U>2){ac=ac.slice(1,-1)}Y=new RegExp(w(ac));break;default:X.type="literal";Y=/./}if(!Y){return false}S=S.replace(new RegExp("^"+Y.source),function(ag){X.lexeme=ag;if(af){X.value=N(ag)}return""});if(!X.lexeme){return false}T.push(X);return true});return R?T:[]};var d=function(Q,O){var N={pattern:Q,timeSeparator:B("timeSeparator",O)},P=["abbreviated","wide","narrow"];function R(T,S){N[T.replace(/^.*\/dates\//,"").replace(/calendars\//,"")]=S}O.on("get",R);Q.match(p).forEach(function(U){var S,T;S=U.charAt(0),T=U.length;if(S==="Z"&&T<5){S="O";T=4}switch(S){case"G":O.main(["dates/calendars/gregorian/eras",T<=3?"eraAbbr":(T===4?"eraNames":"eraNarrow")]);break;case"u":case"U":throw c({feature:"year pattern `"+S+"`"});case"Q":case"q":if(T>2){O.main(["dates/calendars/gregorian/quarters",S==="Q"?"format":"stand-alone",P[T-3]])}break;case"M":case"L":if(T>2){O.main(["dates/calendars/gregorian/months",S==="M"?"format":"stand-alone",P[T-3]])}break;case"g":throw c({feature:"Julian day pattern `g`"});case"e":case"c":if(T<=2){break}case"E":if(T===6){O.main(["dates/calendars/gregorian/days",[S==="c"?"stand-alone":"format"],"short"])||O.main(["dates/calendars/gregorian/days",[S==="c"?"stand-alone":"format"],"abbreviated"])}else{O.main(["dates/calendars/gregorian/days",[S==="c"?"stand-alone":"format"],P[T<3?0:T-3]])}break;case"a":O.main(["dates/calendars/gregorian/dayPeriods/format/wide"]);break;case"z":case"O":O.main("dates/timeZoneNames/gmtFormat");O.main("dates/timeZoneNames/gmtZeroFormat");O.main("dates/timeZoneNames/hourFormat");break;case"v":case"V":throw c({feature:"timezone pattern `"+S+"`"})}});O.off("get",R);return N};function G(O,N){y(O,N,{skip:[/dates\/calendars\/gregorian\/dateTimeFormats\/availableFormats/,/dates\/calendars\/gregorian\/days\/.*\/short/,/supplemental\/timeData\/(?!001)/,/supplemental\/weekData\/(?!001)/]})}o.dateFormatter=o.prototype.dateFormatter=function(N){var Q,P,S,R,O;z(N,"options");Q=this.cldr;N=N||{skeleton:"yMd"};r(Q);Q.on("get",G);R=u(N,Q);O=k(R,Q);Q.off("get",G);P=O.numberFormatters;delete O.numberFormatters;for(S in P){P[S]=this.numberFormatter({raw:P[S]})}return function(T){J(T,"value");a(T,"value");return s(T,P,O)}};o.dateParser=o.prototype.dateParser=function(P){var Q,O,S,R,N;z(P,"options");Q=this.cldr;P=P||{skeleton:"yMd"};r(Q);Q.on("get",G);R=u(P,Q);N=d(R,Q);S=D(Q);Q.off("get",G);O=this.numberParser({raw:"0"});return function(T){var U;J(T,"value");b(T,"value");U=x(T,O,N);return E(T,U,S)||null}};o.formatDate=o.prototype.formatDate=function(O,N){J(O,"value");a(O,"value");return this.dateFormatter(N)(O)};o.parseDate=o.prototype.parseDate=function(O,N){J(O,"value");b(O,"value");return this.dateParser(N)(O)};return o}));