intl-messageformat
Advanced tools
Comparing version 1.0.0-rc-3 to 1.0.0-rc-4
@@ -6,3 +6,3 @@ { | ||
], | ||
"version": "1.0.0-rc-3", | ||
"version": "1.0.0-rc-4", | ||
"homepage": "https://github.com/yahoo/intl-messageformat", | ||
@@ -9,0 +9,0 @@ "authors": [ |
@@ -1,2 +0,2 @@ | ||
(function(){"use strict";function a(a){var b,c,d,e,f=Array.prototype.slice.call(arguments,1);for(b=0,c=f.length;c>b;b+=1)if(d=f[b])for(e in d)h.call(d,e)&&(a[e]=d[e]);return a}function b(a,b,c){this.locales=a,this.formats=b,this.pluralFn=c}function c(a){this.id=a}function d(a,b,c,d){this.id=a,this.offset=b,this.options=c,this.pluralFn=d}function e(a,b,c,d){this.id=a,this.offset=b,this.numberFormat=c,this.string=d}function f(a,b){this.id=a,this.options=b}function g(a,b,c){var d="string"==typeof a?g.__parse(a):a;if(!d||"messageFormatPattern"!==d.type)throw new TypeError("A message must be provided as a String or AST.");c=this._mergeFormats(g.FORMATS,c),j(this,"_locale",{value:this._resolveLocale(b)});var e=g.__localeData__[this._locale].pluralFunction,f=this._compilePattern(d,b,c,e);j(this,"_pattern",{value:f}),this.format=l.call(this.format,this)}var h=Object.prototype.hasOwnProperty,i=function(){try{return!!Object.defineProperty({},"a",{})}catch(a){return!1}}(),j=(!i&&!Object.prototype.__defineGetter__,i?Object.defineProperty:function(a,b,c){"get"in c&&a.__defineGetter__?a.__defineGetter__(b,c.get):(!h.call(a,b)||"value"in c)&&(a[b]=c.value)}),k=Object.create||function(a,b){function c(){}var d,e;c.prototype=a,d=new c;for(e in b)h.call(b,e)&&j(d,e,b[e]);return d},l=Function.prototype.bind||function(a){var b=this,c=[].slice.call(arguments,1);return function(){b.apply(a,c.concat([].slice.call(arguments)))}},m=b;b.prototype.compile=function(a){return this.pluralStack=[],this.currentPlural=null,this.pluralNumberFormat=null,this.compileMessage(a)},b.prototype.compileMessage=function(a){if(!a||"messageFormatPattern"!==a.type)throw new Error('Message AST is not of type: "messageFormatPattern"');var b,c,d,e=a.elements,f=[];for(b=0,c=e.length;c>b;b+=1)switch(d=e[b],d.type){case"messageTextElement":f.push(this.compileMessageText(d));break;case"argumentElement":f.push(this.compileArgument(d));break;default:throw new Error("Message element does not have a valid type")}return f},b.prototype.compileMessageText=function(a){return this.currentPlural&&/(^|[^\\])#/g.test(a.value)?(this.pluralNumberFormat||(this.pluralNumberFormat=new Intl.NumberFormat(this.locales)),new e(this.currentPlural.id,this.currentPlural.format.offset,this.pluralNumberFormat,a.value)):a.value.replace(/\\#/g,"#")},b.prototype.compileArgument=function(a){var b,e=a.format,g=this.formats,h=this.locales,i=this.pluralFn;if(!e)return new c(a.id);switch(e.type){case"numberFormat":return b=g.number[e.style],{id:a.id,format:new Intl.NumberFormat(h,b).format};case"dateFormat":return b=g.date[e.style],{id:a.id,format:new Intl.DateTimeFormat(h,b).format};case"timeFormat":return b=g.time[e.style],{id:a.id,format:new Intl.DateTimeFormat(h,b).format};case"pluralFormat":return b=this.compileOptions(a),new d(a.id,e.offset,b,i);case"selectFormat":return b=this.compileOptions(a),new f(a.id,b);default:throw new Error("Message element does not have a valid format type")}},b.prototype.compileOptions=function(a){var b=a.format,c=b.options,d={};this.pluralStack.push(this.currentPlural),this.currentPlural="pluralFormat"===b.type?a:null;var e,f,g;for(e=0,f=c.length;f>e;e+=1)g=c[e],d[g.selector]=this.compileMessage(g.value);return this.currentPlural=this.pluralStack.pop(),d},c.prototype.format=function(a){return a?"string"==typeof a?a:String(a):""},d.prototype.getOption=function(a){var b=this.options,c=b["="+a]||b[this.pluralFn(a-this.offset)];return c||b.other},e.prototype.format=function(a){var b=this.numberFormat.format(a-this.offset);return this.string.replace(/(^|[^\\])#/g,"$1"+b).replace(/\\#/g,"#")},f.prototype.getOption=function(a){var b=this.options;return b[a]||b.other};var n=function(){function a(a,b){function c(){this.constructor=a}c.prototype=b.prototype,a.prototype=new c}function b(a,b,c,d,e,f){this.message=a,this.expected=b,this.found=c,this.offset=d,this.line=e,this.column=f,this.name="SyntaxError"}function c(a){function c(b){function c(b,c,d){var e,f;for(e=c;d>e;e++)f=a.charAt(e),"\n"===f?(b.seenCR||b.line++,b.column=1,b.seenCR=!1):"\r"===f||"\u2028"===f||"\u2029"===f?(b.line++,b.column=1,b.seenCR=!0):(b.column++,b.seenCR=!1)}return Ob!==b&&(Ob>b&&(Ob=0,Pb={line:1,column:1,seenCR:!1}),c(Pb,Ob,b),Ob=b),Pb}function d(a){Qb>Mb||(Mb>Qb&&(Qb=Mb,Rb=[]),Rb.push(a))}function e(d,e,f){function g(a){var b=1;for(a.sort(function(a,b){return a.description<b.description?-1:a.description>b.description?1:0});b<a.length;)a[b-1]===a[b]?a.splice(b,1):b++}function h(a,b){function c(a){function b(a){return a.charCodeAt(0).toString(16).toUpperCase()}return a.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\x08/g,"\\b").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\f/g,"\\f").replace(/\r/g,"\\r").replace(/[\x00-\x07\x0B\x0E\x0F]/g,function(a){return"\\x0"+b(a)}).replace(/[\x10-\x1F\x80-\xFF]/g,function(a){return"\\x"+b(a)}).replace(/[\u0180-\u0FFF]/g,function(a){return"\\u0"+b(a)}).replace(/[\u1080-\uFFFF]/g,function(a){return"\\u"+b(a)})}var d,e,f,g=new Array(a.length);for(f=0;f<a.length;f++)g[f]=a[f].description;return d=a.length>1?g.slice(0,-1).join(", ")+" or "+g[a.length-1]:g[0],e=b?'"'+c(b)+'"':"end of input","Expected "+d+" but "+e+" found."}var i=c(f),j=f<a.length?a.charAt(f):null;return null!==e&&g(e),new b(null!==d?d:h(e,j),e,j,f,i.line,i.column)}function f(){var a;return a=g()}function g(){var a,b,c;for(a=Mb,b=[],c=h();c!==C;)b.push(c),c=h();return b!==C&&(Nb=a,b=F(b)),a=b}function h(){var a;return a=j(),a===C&&(a=l()),a}function i(){var b,c,d,e,f,g;if(b=Mb,c=[],d=Mb,e=u(),e!==C?(f=z(),f!==C?(g=u(),g!==C?(e=[e,f,g],d=e):(Mb=d,d=G)):(Mb=d,d=G)):(Mb=d,d=G),d!==C)for(;d!==C;)c.push(d),d=Mb,e=u(),e!==C?(f=z(),f!==C?(g=u(),g!==C?(e=[e,f,g],d=e):(Mb=d,d=G)):(Mb=d,d=G)):(Mb=d,d=G);else c=G;return c!==C&&(Nb=b,c=H(c)),b=c,b===C&&(b=Mb,c=t(),c!==C&&(c=a.substring(b,Mb)),b=c),b}function j(){var a,b;return a=Mb,b=i(),b!==C&&(Nb=a,b=I(b)),a=b}function k(){var b,c,e;if(b=x(),b===C){if(b=Mb,c=[],J.test(a.charAt(Mb))?(e=a.charAt(Mb),Mb++):(e=C,0===Sb&&d(K)),e!==C)for(;e!==C;)c.push(e),J.test(a.charAt(Mb))?(e=a.charAt(Mb),Mb++):(e=C,0===Sb&&d(K));else c=G;c!==C&&(c=a.substring(b,Mb)),b=c}return b}function l(){var b,c,e,f,g,h,i,j,l;return b=Mb,123===a.charCodeAt(Mb)?(c=L,Mb++):(c=C,0===Sb&&d(M)),c!==C?(e=u(),e!==C?(f=k(),f!==C?(g=u(),g!==C?(h=Mb,44===a.charCodeAt(Mb)?(i=O,Mb++):(i=C,0===Sb&&d(P)),i!==C?(j=u(),j!==C?(l=m(),l!==C?(i=[i,j,l],h=i):(Mb=h,h=G)):(Mb=h,h=G)):(Mb=h,h=G),h===C&&(h=N),h!==C?(i=u(),i!==C?(125===a.charCodeAt(Mb)?(j=Q,Mb++):(j=C,0===Sb&&d(R)),j!==C?(Nb=b,c=S(f,h),b=c):(Mb=b,b=G)):(Mb=b,b=G)):(Mb=b,b=G)):(Mb=b,b=G)):(Mb=b,b=G)):(Mb=b,b=G)):(Mb=b,b=G),b}function m(){var a;return a=n(),a===C&&(a=o(),a===C&&(a=p())),a}function n(){var b,c,e,f,g,h,i;return b=Mb,a.substr(Mb,6)===T?(c=T,Mb+=6):(c=C,0===Sb&&d(U)),c===C&&(a.substr(Mb,4)===V?(c=V,Mb+=4):(c=C,0===Sb&&d(W)),c===C&&(a.substr(Mb,4)===X?(c=X,Mb+=4):(c=C,0===Sb&&d(Y)))),c!==C?(e=u(),e!==C?(f=Mb,44===a.charCodeAt(Mb)?(g=O,Mb++):(g=C,0===Sb&&d(P)),g!==C?(h=u(),h!==C?(i=z(),i!==C?(g=[g,h,i],f=g):(Mb=f,f=G)):(Mb=f,f=G)):(Mb=f,f=G),f===C&&(f=N),f!==C?(Nb=b,c=Z(c,f),b=c):(Mb=b,b=G)):(Mb=b,b=G)):(Mb=b,b=G),b}function o(){var b,c,e,f,g,h,i,j,k;if(b=Mb,a.substr(Mb,6)===$?(c=$,Mb+=6):(c=C,0===Sb&&d(_)),c!==C)if(e=u(),e!==C)if(44===a.charCodeAt(Mb)?(f=O,Mb++):(f=C,0===Sb&&d(P)),f!==C)if(g=u(),g!==C)if(h=s(),h===C&&(h=N),h!==C)if(i=u(),i!==C){if(j=[],k=r(),k!==C)for(;k!==C;)j.push(k),k=r();else j=G;j!==C?(Nb=b,c=ab(h,j),b=c):(Mb=b,b=G)}else Mb=b,b=G;else Mb=b,b=G;else Mb=b,b=G;else Mb=b,b=G;else Mb=b,b=G;else Mb=b,b=G;return b}function p(){var b,c,e,f,g,h,i;if(b=Mb,a.substr(Mb,6)===bb?(c=bb,Mb+=6):(c=C,0===Sb&&d(cb)),c!==C)if(e=u(),e!==C)if(44===a.charCodeAt(Mb)?(f=O,Mb++):(f=C,0===Sb&&d(P)),f!==C)if(g=u(),g!==C){if(h=[],i=r(),i!==C)for(;i!==C;)h.push(i),i=r();else h=G;h!==C?(Nb=b,c=db(h),b=c):(Mb=b,b=G)}else Mb=b,b=G;else Mb=b,b=G;else Mb=b,b=G;else Mb=b,b=G;return b}function q(){var b,c,e,f;return b=Mb,c=Mb,61===a.charCodeAt(Mb)?(e=eb,Mb++):(e=C,0===Sb&&d(fb)),e!==C?(f=x(),f!==C?(e=[e,f],c=e):(Mb=c,c=G)):(Mb=c,c=G),c!==C&&(c=a.substring(b,Mb)),b=c,b===C&&(b=z()),b}function r(){var b,c,e,f,h,i,j,k,l;return b=Mb,c=u(),c!==C?(e=q(),e!==C?(f=u(),f!==C?(123===a.charCodeAt(Mb)?(h=L,Mb++):(h=C,0===Sb&&d(M)),h!==C?(i=u(),i!==C?(j=g(),j!==C?(k=u(),k!==C?(125===a.charCodeAt(Mb)?(l=Q,Mb++):(l=C,0===Sb&&d(R)),l!==C?(Nb=b,c=gb(e,j),b=c):(Mb=b,b=G)):(Mb=b,b=G)):(Mb=b,b=G)):(Mb=b,b=G)):(Mb=b,b=G)):(Mb=b,b=G)):(Mb=b,b=G)):(Mb=b,b=G),b}function s(){var b,c,e,f;return b=Mb,a.substr(Mb,7)===hb?(c=hb,Mb+=7):(c=C,0===Sb&&d(ib)),c!==C?(e=u(),e!==C?(f=x(),f!==C?(Nb=b,c=jb(f),b=c):(Mb=b,b=G)):(Mb=b,b=G)):(Mb=b,b=G),b}function t(){var b,c;if(Sb++,b=[],lb.test(a.charAt(Mb))?(c=a.charAt(Mb),Mb++):(c=C,0===Sb&&d(mb)),c!==C)for(;c!==C;)b.push(c),lb.test(a.charAt(Mb))?(c=a.charAt(Mb),Mb++):(c=C,0===Sb&&d(mb));else b=G;return Sb--,b===C&&(c=C,0===Sb&&d(kb)),b}function u(){var b,c,e;for(Sb++,b=Mb,c=[],e=t();e!==C;)c.push(e),e=t();return c!==C&&(c=a.substring(b,Mb)),b=c,Sb--,b===C&&(c=C,0===Sb&&d(nb)),b}function v(){var b;return ob.test(a.charAt(Mb))?(b=a.charAt(Mb),Mb++):(b=C,0===Sb&&d(pb)),b}function w(){var b;return qb.test(a.charAt(Mb))?(b=a.charAt(Mb),Mb++):(b=C,0===Sb&&d(rb)),b}function x(){var b,c,e,f,g,h;if(b=Mb,48===a.charCodeAt(Mb)?(c=sb,Mb++):(c=C,0===Sb&&d(tb)),c===C){if(c=Mb,e=Mb,ub.test(a.charAt(Mb))?(f=a.charAt(Mb),Mb++):(f=C,0===Sb&&d(vb)),f!==C){for(g=[],h=v();h!==C;)g.push(h),h=v();g!==C?(f=[f,g],e=f):(Mb=e,e=G)}else Mb=e,e=G;e!==C&&(e=a.substring(c,Mb)),c=e}return c!==C&&(Nb=b,c=wb(c)),b=c}function y(){var b,c,e,f,g,h,i,j;return xb.test(a.charAt(Mb))?(b=a.charAt(Mb),Mb++):(b=C,0===Sb&&d(yb)),b===C&&(b=Mb,a.substr(Mb,2)===zb?(c=zb,Mb+=2):(c=C,0===Sb&&d(Ab)),c!==C&&(Nb=b,c=Bb()),b=c,b===C&&(b=Mb,a.substr(Mb,2)===Cb?(c=Cb,Mb+=2):(c=C,0===Sb&&d(Db)),c!==C&&(Nb=b,c=Eb()),b=c,b===C&&(b=Mb,a.substr(Mb,2)===Fb?(c=Fb,Mb+=2):(c=C,0===Sb&&d(Gb)),c!==C&&(Nb=b,c=Hb()),b=c,b===C&&(b=Mb,a.substr(Mb,2)===Ib?(c=Ib,Mb+=2):(c=C,0===Sb&&d(Jb)),c!==C?(e=Mb,f=Mb,g=w(),g!==C?(h=w(),h!==C?(i=w(),i!==C?(j=w(),j!==C?(g=[g,h,i,j],f=g):(Mb=f,f=G)):(Mb=f,f=G)):(Mb=f,f=G)):(Mb=f,f=G),f!==C&&(f=a.substring(e,Mb)),e=f,e!==C?(Nb=b,c=Kb(e),b=c):(Mb=b,b=G)):(Mb=b,b=G))))),b}function z(){var a,b,c;if(a=Mb,b=[],c=y(),c!==C)for(;c!==C;)b.push(c),c=y();else b=G;return b!==C&&(Nb=a,b=Lb(b)),a=b}var A,B=arguments.length>1?arguments[1]:{},C={},D={start:f},E=f,F=function(a){return{type:"messageFormatPattern",elements:a}},G=C,H=function(a){var b,c,d,e,f,g="";for(b=0,d=a.length;d>b;b+=1)for(e=a[b],c=0,f=e.length;f>c;c+=1)g+=e[c];return g},I=function(a){return{type:"messageTextElement",value:a}},J=/^[^ \t\n\r,.+={}#]/,K={type:"class",value:"[^ \\t\\n\\r,.+={}#]",description:"[^ \\t\\n\\r,.+={}#]"},L="{",M={type:"literal",value:"{",description:'"{"'},N=null,O=",",P={type:"literal",value:",",description:'","'},Q="}",R={type:"literal",value:"}",description:'"}"'},S=function(a,b){return{type:"argumentElement",id:a,format:b&&b[2]}},T="number",U={type:"literal",value:"number",description:'"number"'},V="date",W={type:"literal",value:"date",description:'"date"'},X="time",Y={type:"literal",value:"time",description:'"time"'},Z=function(a,b){return{type:a+"Format",style:b&&b[2]}},$="plural",_={type:"literal",value:"plural",description:'"plural"'},ab=function(a,b){return{type:"pluralFormat",offset:a||0,options:b}},bb="select",cb={type:"literal",value:"select",description:'"select"'},db=function(a){return{type:"selectFormat",options:a}},eb="=",fb={type:"literal",value:"=",description:'"="'},gb=function(a,b){return{type:"optionalFormatPattern",selector:a,value:b}},hb="offset:",ib={type:"literal",value:"offset:",description:'"offset:"'},jb=function(a){return a},kb={type:"other",description:"whitespace"},lb=/^[ \t\n\r]/,mb={type:"class",value:"[ \\t\\n\\r]",description:"[ \\t\\n\\r]"},nb={type:"other",description:"optionalWhitespace"},ob=/^[0-9]/,pb={type:"class",value:"[0-9]",description:"[0-9]"},qb=/^[0-9a-f]/i,rb={type:"class",value:"[0-9a-f]i",description:"[0-9a-f]i"},sb="0",tb={type:"literal",value:"0",description:'"0"'},ub=/^[1-9]/,vb={type:"class",value:"[1-9]",description:"[1-9]"},wb=function(a){return parseInt(a,10)},xb=/^[^{}\\\0-\x1F \t\n\r]/,yb={type:"class",value:"[^{}\\\\\\0-\\x1F \\t\\n\\r]",description:"[^{}\\\\\\0-\\x1F \\t\\n\\r]"},zb="\\#",Ab={type:"literal",value:"\\#",description:'"\\\\#"'},Bb=function(){return"\\#"},Cb="\\{",Db={type:"literal",value:"\\{",description:'"\\\\{"'},Eb=function(){return"{"},Fb="\\}",Gb={type:"literal",value:"\\}",description:'"\\\\}"'},Hb=function(){return"}"},Ib="\\u",Jb={type:"literal",value:"\\u",description:'"\\\\u"'},Kb=function(a){return String.fromCharCode(parseInt(a,16))},Lb=function(a){return a.join("")},Mb=0,Nb=0,Ob=0,Pb={line:1,column:1,seenCR:!1},Qb=0,Rb=[],Sb=0;if("startRule"in B){if(!(B.startRule in D))throw new Error("Can't start parsing from rule \""+B.startRule+'".');E=D[B.startRule]}if(A=E(),A!==C&&Mb===a.length)return A;throw A!==C&&Mb<a.length&&d({type:"end",description:"end of input"}),e(null,Rb,Qb)}return a(b,Error),{SyntaxError:b,parse:c}}(),o=g;j(g,"FORMATS",{enumerable:!0,value:{number:{currency:{style:"currency"},percent:{style:"percent"}},date:{"short":{month:"numeric",day:"numeric",year:"2-digit"},medium:{month:"short",day:"numeric",year:"numeric"},"long":{month:"long",day:"numeric",year:"numeric"},full:{weekday:"long",month:"long",day:"numeric",year:"numeric"}},time:{"short":{hour:"numeric",minute:"numeric"},medium:{hour:"numeric",minute:"numeric",second:"numeric"},"long":{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"},full:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"}}}}),j(g,"__availableLocales__",{value:[]}),j(g,"__localeData__",{value:k(null)}),j(g,"__addLocaleData",{value:function(a){if(!a||!a.locale)throw new Error("Object passed does not identify itself with a valid language tag");if(!a.messageformat)throw new Error("Object passed does not contain locale data for IntlMessageFormat");var b=g.__availableLocales__,c=g.__localeData__,d=a.locale.toLowerCase().split("-")[0];b.push(d),c[d]=a.messageformat}}),j(g,"__parse",{value:n.parse}),j(g,"defaultLocale",{enumerable:!0,writable:!0,value:void 0}),j(g,"__getDefaultLocale",{value:function(){return g.defaultLocale||(g.defaultLocale=(new Intl.NumberFormat).resolvedOptions().locale),g.defaultLocale}}),g.prototype.format=function(a){return this._format(this._pattern,a)},g.prototype.resolvedOptions=function(){return{locale:this._locale}},g.prototype._compilePattern=function(a,b,c,d){var e=new m(b,c,d);return e.compile(a)},g.prototype._format=function(a,b){var c,d,e,f,g,i="";for(c=0,d=a.length;d>c;c+=1)if(e=a[c],"string"!=typeof e){if(f=e.id,!b||!h.call(b,f))throw new Error("A value must be provided for: "+f);g=b[f],i+=e.options?this._format(e.getOption(g),b):e.format(g)}else i+=e;return i},g.prototype._mergeFormats=function(b,c){var d,e,f={};for(d in b)h.call(b,d)&&(f[d]=e=k(b[d]),c&&h.call(c,d)&&a(e,c[d]));return f},g.prototype._resolveLocale=function(a){var b,c,d,e=g.__availableLocales__;if(0===e.length)throw new Error("No locale data has been provided for IntlMessageFormat yet");if("string"==typeof a&&(a=[a]),a&&a.length)for(c=0,d=a.length;d>c;c+=1){if(b=a[c].toLowerCase().split("-")[0],!/[a-z]{2,3}/i.test(b))throw new RangeError('"'+a[c]+'" is not a structurally valid language tag');if(e.indexOf(b)>=0)break}return b||g.__getDefaultLocale().split("-")[0]};var p=o,q=[function(){},function(a){return a=Math.floor(a),1===a?"one":"other"},function(a){return a=Math.floor(a),a>=0&&1>=a?"one":"other"},function(a){var b=Math.floor(Math.abs(a));return a=Math.floor(a),0===b||1===a?"one":"other"},function(a){return a=Math.floor(a),0===a?"zero":1===a?"one":2===a?"two":a%100>=3&&10>=a%100?"few":a%100>=11&&99>=a%100?"many":"other"},function(a){var b=Math.floor(Math.abs(a)),c=a.toString().replace(/^[^.]*\.?/,"").length;return a=Math.floor(a),1===b&&0===c?"one":"other"},function(a){return a=Math.floor(a),a%10===1&&a%100!==11?"one":a%10>=2&&4>=a%10&&!(a%100>=12&&14>=a%100)?"few":a%10===0||a%10>=5&&9>=a%10||a%100>=11&&14>=a%100?"many":"other"},function(){return"other"},function(a){return a=Math.floor(a),a%10===1&&a%100!==11&&a%100!==71&&a%100!==91?"one":a%10===2&&a%100!==12&&a%100!==72&&a%100!==92?"two":(a%10>=3&&4>=a%10||a%10===9)&&!(a%100>=10&&19>=a%100||a%100>=70&&79>=a%100||a%100>=90&&99>=a%100)?"few":0!==a&&a%1e6===0?"many":"other"},function(a){var b=Math.floor(Math.abs(a)),c=a.toString().replace(/^[^.]*\.?/,"").length,d=parseInt(a.toString().replace(/^[^.]*\.?/,""),10);return a=Math.floor(a),0===c&&b%10===1&&(b%100!==11||d%10===1&&d%100!==11)?"one":0===c&&b%10>=2&&4>=b%10&&(!(b%100>=12&&14>=b%100)||d%10>=2&&4>=d%10&&!(d%100>=12&&14>=d%100))?"few":"other"},function(a){var b=Math.floor(Math.abs(a)),c=a.toString().replace(/^[^.]*\.?/,"").length;return a=Math.floor(a),1===b&&0===c?"one":b>=2&&4>=b&&0===c?"few":0!==c?"many":"other"},function(a){return a=Math.floor(a),0===a?"zero":1===a?"one":2===a?"two":3===a?"few":6===a?"many":"other"},function(a){var b=Math.floor(Math.abs(a)),c=parseInt(a.toString().replace(/^[^.]*\.?|0+$/g,""),10);return a=Math.floor(a),1===a||0!==c&&(0===b||1===b)?"one":"other"},function(a){var b=Math.floor(Math.abs(a));return a=Math.floor(a),0===b||1===b?"one":"other"},function(a){var b=Math.floor(Math.abs(a)),c=a.toString().replace(/^[^.]*\.?/,"").length,d=parseInt(a.toString().replace(/^[^.]*\.?/,""),10);return a=Math.floor(a),0===c&&(1===b||2===b||3===b||0===c&&(b%10!==4&&b%10!==6&&b%10!==9||0!==c&&d%10!==4&&d%10!==6&&d%10!==9))?"one":"other"},function(a){return a=Math.floor(a),1===a?"one":2===a?"two":a>=3&&6>=a?"few":a>=7&&10>=a?"many":"other"},function(a){return a=Math.floor(a),1===a||11===a?"one":2===a||12===a?"two":a>=3&&10>=a||a>=13&&19>=a?"few":"other"},function(a){var b=Math.floor(Math.abs(a)),c=a.toString().replace(/^[^.]*\.?/,"").length;return a=Math.floor(a),0===c&&b%10===1?"one":0===c&&b%10===2?"two":0!==c||b%100!==0&&b%100!==20&&b%100!==40&&b%100!==60&&b%100!==80?0!==c?"many":"other":"few"},function(a){var b=Math.floor(Math.abs(a)),c=a.toString().replace(/^[^.]*\.?/,"").length;return a=Math.floor(a),1===b&&0===c?"one":2===b&&0===c?"two":0!==c||a>=0&&10>=a||a%10!==0?"other":"many"},function(a){var b=Math.floor(Math.abs(a)),c=parseInt(a.toString().replace(/^[^.]*\.?|0+$/g,""),10);return a=Math.floor(a),0!==c||b%10!==1||b%100===11&&0===c?"other":"one"},function(a){return a=Math.floor(a),0===a?"zero":1===a?"one":"other"},function(a){return a=Math.floor(a),1===a?"one":2===a?"two":"other"},function(a){var b=Math.floor(Math.abs(a));return a=Math.floor(a),0===a?"zero":0!==b&&1!==b||0===a?"other":"one"},function(a){var b=parseInt(a.toString().replace(/^[^.]*\.?/,""),10);return a=Math.floor(a),a%10!==1||a%100>=11&&19>=a%100?a%10>=2&&9>=a%10&&!(a%100>=11&&19>=a%100)?"few":0!==b?"many":"other":"one"},function(a){var b=a.toString().replace(/^[^.]*\.?/,"").length,c=parseInt(a.toString().replace(/^[^.]*\.?/,""),10);return a=Math.floor(a),a%10===0||a%100>=11&&19>=a%100||2===b&&c%100>=11&&19>=c%100?"zero":a%10===1&&(a%100!==11||2===b&&c%10===1&&(c%100!==11||2!==b&&c%10===1))?"one":"other"},function(a){var b=Math.floor(Math.abs(a)),c=a.toString().replace(/^[^.]*\.?/,"").length,d=parseInt(a.toString().replace(/^[^.]*\.?/,""),10);return a=Math.floor(a),0!==c||b%10!==1&&d%10!==1?"other":"one"},function(a){return a=Math.floor(a),1===a?"one":0===a||a%100>=2&&10>=a%100?"few":a%100>=11&&19>=a%100?"many":"other"},function(a){var b=Math.floor(Math.abs(a)),c=a.toString().replace(/^[^.]*\.?/,"").length;return a=Math.floor(a),1===b&&0===c?"one":0===c&&b%10>=2&&4>=b%10&&!(b%100>=12&&14>=b%100)?"few":0===c&&1!==b&&(b%10>=0&&1>=b%10||0===c&&(b%10>=5&&9>=b%10||0===c&&b%100>=12&&14>=b%100))?"many":"other"},function(a){var b=Math.floor(Math.abs(a)),c=a.toString().replace(/^[^.]*\.?/,"").length,d=parseInt(a.toString().replace(/^[^.]*\.?|0+$/g,""),10);return a=Math.floor(a),1===b&&(0===c||0===b&&1===d)?"one":"other"},function(a){var b=Math.floor(Math.abs(a)),c=a.toString().replace(/^[^.]*\.?/,"").length;return a=Math.floor(a),1===b&&0===c?"one":0!==c||0===a||1!==a&&a%100>=1&&19>=a%100?"few":"other"},function(a){var b=Math.floor(Math.abs(a)),c=a.toString().replace(/^[^.]*\.?/,"").length;return a=Math.floor(a),0===c&&b%10===1&&b%100!==11?"one":0===c&&b%10>=2&&4>=b%10&&!(b%100>=12&&14>=b%100)?"few":0===c&&(b%10===0||0===c&&(b%10>=5&&9>=b%10||0===c&&b%100>=11&&14>=b%100))?"many":"other"},function(a){var b=Math.floor(Math.abs(a));return a=Math.floor(a),0===b||1===a?"one":a>=2&&10>=a?"few":"other"},function(a){var b=Math.floor(Math.abs(a)),c=parseInt(a.toString().replace(/^[^.]*\.?/,""),10);return a=Math.floor(a),0===a||1===a||0===b&&1===c?"one":"other"},function(a){var b=Math.floor(Math.abs(a)),c=a.toString().replace(/^[^.]*\.?/,"").length;return a=Math.floor(a),0===c&&b%100===1?"one":0===c&&b%100===2?"two":0===c&&(b%100>=3&&4>=b%100||0!==c)?"few":"other"},function(a){return a=Math.floor(a),a>=0&&1>=a||a>=11&&99>=a?"one":"other"}];o.__addLocaleData({locale:"aa",messageformat:{pluralFunction:q[0]}}),o.__addLocaleData({locale:"af",messageformat:{pluralFunction:q[1]}}),o.__addLocaleData({locale:"agq",messageformat:{pluralFunction:q[0]}}),o.__addLocaleData({locale:"ak",messageformat:{pluralFunction:q[2]}}),o.__addLocaleData({locale:"am",messageformat:{pluralFunction:q[3]}}),o.__addLocaleData({locale:"ar",messageformat:{pluralFunction:q[4]}}),o.__addLocaleData({locale:"as",messageformat:{pluralFunction:q[5]}}),o.__addLocaleData({locale:"asa",messageformat:{pluralFunction:q[1]}}),o.__addLocaleData({locale:"ast",messageformat:{pluralFunction:q[5]}}),o.__addLocaleData({locale:"az",messageformat:{pluralFunction:q[1]}}),o.__addLocaleData({locale:"bas",messageformat:{pluralFunction:q[0]}}),o.__addLocaleData({locale:"be",messageformat:{pluralFunction:q[6]}}),o.__addLocaleData({locale:"bem",messageformat:{pluralFunction:q[1]}}),o.__addLocaleData({locale:"bez",messageformat:{pluralFunction:q[1]}}),o.__addLocaleData({locale:"bg",messageformat:{pluralFunction:q[1]}}),o.__addLocaleData({locale:"bm",messageformat:{pluralFunction:q[7]}}),o.__addLocaleData({locale:"bn",messageformat:{pluralFunction:q[3]}}),o.__addLocaleData({locale:"bo",messageformat:{pluralFunction:q[7]}}),o.__addLocaleData({locale:"br",messageformat:{pluralFunction:q[8]}}),o.__addLocaleData({locale:"brx",messageformat:{pluralFunction:q[1]}}),o.__addLocaleData({locale:"bs",messageformat:{pluralFunction:q[9]}}),o.__addLocaleData({locale:"byn",messageformat:{pluralFunction:q[0]}}),o.__addLocaleData({locale:"ca",messageformat:{pluralFunction:q[5]}}),o.__addLocaleData({locale:"cgg",messageformat:{pluralFunction:q[1]}}),o.__addLocaleData({locale:"chr",messageformat:{pluralFunction:q[1]}}),o.__addLocaleData({locale:"cs",messageformat:{pluralFunction:q[10]}}),o.__addLocaleData({locale:"cy",messageformat:{pluralFunction:q[11]}}),o.__addLocaleData({locale:"da",messageformat:{pluralFunction:q[12]}}),o.__addLocaleData({locale:"dav",messageformat:{pluralFunction:q[0]}}),o.__addLocaleData({locale:"de",messageformat:{pluralFunction:q[5]}}),o.__addLocaleData({locale:"dje",messageformat:{pluralFunction:q[0]}}),o.__addLocaleData({locale:"dua",messageformat:{pluralFunction:q[0]}}),o.__addLocaleData({locale:"dyo",messageformat:{pluralFunction:q[0]}}),o.__addLocaleData({locale:"dz",messageformat:{pluralFunction:q[7]}}),o.__addLocaleData({locale:"ebu",messageformat:{pluralFunction:q[0]}}),o.__addLocaleData({locale:"ee",messageformat:{pluralFunction:q[1]}}),o.__addLocaleData({locale:"el",messageformat:{pluralFunction:q[1]}}),o.__addLocaleData({locale:"en",messageformat:{pluralFunction:q[5]}}),o.__addLocaleData({locale:"eo",messageformat:{pluralFunction:q[1]}}),o.__addLocaleData({locale:"es",messageformat:{pluralFunction:q[1]}}),o.__addLocaleData({locale:"et",messageformat:{pluralFunction:q[5]}}),o.__addLocaleData({locale:"eu",messageformat:{pluralFunction:q[1]}}),o.__addLocaleData({locale:"ewo",messageformat:{pluralFunction:q[0]}}),o.__addLocaleData({locale:"fa",messageformat:{pluralFunction:q[3]}}),o.__addLocaleData({locale:"ff",messageformat:{pluralFunction:q[13]}}),o.__addLocaleData({locale:"fi",messageformat:{pluralFunction:q[5]}}),o.__addLocaleData({locale:"fil",messageformat:{pluralFunction:q[14]}}),o.__addLocaleData({locale:"fo",messageformat:{pluralFunction:q[1]}}),o.__addLocaleData({locale:"fr",messageformat:{pluralFunction:q[13]}}),o.__addLocaleData({locale:"fur",messageformat:{pluralFunction:q[1]}}),o.__addLocaleData({locale:"fy",messageformat:{pluralFunction:q[5]}}),o.__addLocaleData({locale:"ga",messageformat:{pluralFunction:q[15]}}),o.__addLocaleData({locale:"gd",messageformat:{pluralFunction:q[16]}}),o.__addLocaleData({locale:"gl",messageformat:{pluralFunction:q[5]}}),o.__addLocaleData({locale:"gsw",messageformat:{pluralFunction:q[1]}}),o.__addLocaleData({locale:"gu",messageformat:{pluralFunction:q[3]}}),o.__addLocaleData({locale:"guz",messageformat:{pluralFunction:q[0]}}),o.__addLocaleData({locale:"gv",messageformat:{pluralFunction:q[17]}}),o.__addLocaleData({locale:"ha",messageformat:{pluralFunction:q[1]}}),o.__addLocaleData({locale:"haw",messageformat:{pluralFunction:q[1]}}),o.__addLocaleData({locale:"he",messageformat:{pluralFunction:q[18]}}),o.__addLocaleData({locale:"hi",messageformat:{pluralFunction:q[3]}}),o.__addLocaleData({locale:"hr",messageformat:{pluralFunction:q[9]}}),o.__addLocaleData({locale:"hu",messageformat:{pluralFunction:q[1]}}),o.__addLocaleData({locale:"hy",messageformat:{pluralFunction:q[13]}}),o.__addLocaleData({locale:"ia",messageformat:{pluralFunction:q[0]}}),o.__addLocaleData({locale:"id",messageformat:{pluralFunction:q[7]}}),o.__addLocaleData({locale:"ig",messageformat:{pluralFunction:q[7]}}),o.__addLocaleData({locale:"ii",messageformat:{pluralFunction:q[7]}}),o.__addLocaleData({locale:"is",messageformat:{pluralFunction:q[19]}}),o.__addLocaleData({locale:"it",messageformat:{pluralFunction:q[5]}}),o.__addLocaleData({locale:"ja",messageformat:{pluralFunction:q[7]}}),o.__addLocaleData({locale:"jgo",messageformat:{pluralFunction:q[1]}}),o.__addLocaleData({locale:"jmc",messageformat:{pluralFunction:q[1]}}),o.__addLocaleData({locale:"ka",messageformat:{pluralFunction:q[1]}}),o.__addLocaleData({locale:"kab",messageformat:{pluralFunction:q[13]}}),o.__addLocaleData({locale:"kam",messageformat:{pluralFunction:q[0]}}),o.__addLocaleData({locale:"kde",messageformat:{pluralFunction:q[7]}}),o.__addLocaleData({locale:"kea",messageformat:{pluralFunction:q[7]}}),o.__addLocaleData({locale:"khq",messageformat:{pluralFunction:q[0]}}),o.__addLocaleData({locale:"ki",messageformat:{pluralFunction:q[0]}}),o.__addLocaleData({locale:"kk",messageformat:{pluralFunction:q[1]}}),o.__addLocaleData({locale:"kkj",messageformat:{pluralFunction:q[1]}}),o.__addLocaleData({locale:"kl",messageformat:{pluralFunction:q[1]}}),o.__addLocaleData({locale:"kln",messageformat:{pluralFunction:q[0]}}),o.__addLocaleData({locale:"km",messageformat:{pluralFunction:q[7]}}),o.__addLocaleData({locale:"kn",messageformat:{pluralFunction:q[3]}}),o.__addLocaleData({locale:"ko",messageformat:{pluralFunction:q[7]}}),o.__addLocaleData({locale:"kok",messageformat:{pluralFunction:q[0]}}),o.__addLocaleData({locale:"ks",messageformat:{pluralFunction:q[1]}}),o.__addLocaleData({locale:"ksb",messageformat:{pluralFunction:q[1]}}),o.__addLocaleData({locale:"ksf",messageformat:{pluralFunction:q[0]}}),o.__addLocaleData({locale:"ksh",messageformat:{pluralFunction:q[20]}}),o.__addLocaleData({locale:"kw",messageformat:{pluralFunction:q[21]}}),o.__addLocaleData({locale:"ky",messageformat:{pluralFunction:q[1]}}),o.__addLocaleData({locale:"lag",messageformat:{pluralFunction:q[22]}}),o.__addLocaleData({locale:"lg",messageformat:{pluralFunction:q[1]}}),o.__addLocaleData({locale:"lkt",messageformat:{pluralFunction:q[7]}}),o.__addLocaleData({locale:"ln",messageformat:{pluralFunction:q[2]}}),o.__addLocaleData({locale:"lo",messageformat:{pluralFunction:q[7]}}),o.__addLocaleData({locale:"lt",messageformat:{pluralFunction:q[23]}}),o.__addLocaleData({locale:"lu",messageformat:{pluralFunction:q[0]}}),o.__addLocaleData({locale:"luo",messageformat:{pluralFunction:q[0]}}),o.__addLocaleData({locale:"luy",messageformat:{pluralFunction:q[0]}}),o.__addLocaleData({locale:"lv",messageformat:{pluralFunction:q[24]}}),o.__addLocaleData({locale:"mas",messageformat:{pluralFunction:q[1]}}),o.__addLocaleData({locale:"mer",messageformat:{pluralFunction:q[0]}}),o.__addLocaleData({locale:"mfe",messageformat:{pluralFunction:q[0]}}),o.__addLocaleData({locale:"mg",messageformat:{pluralFunction:q[2]}}),o.__addLocaleData({locale:"mgh",messageformat:{pluralFunction:q[0]}}),o.__addLocaleData({locale:"mgo",messageformat:{pluralFunction:q[1]}}),o.__addLocaleData({locale:"mk",messageformat:{pluralFunction:q[25]}}),o.__addLocaleData({locale:"ml",messageformat:{pluralFunction:q[1]}}),o.__addLocaleData({locale:"mn",messageformat:{pluralFunction:q[1]}}),o.__addLocaleData({locale:"mr",messageformat:{pluralFunction:q[3]}}),o.__addLocaleData({locale:"ms",messageformat:{pluralFunction:q[7]}}),o.__addLocaleData({locale:"mt",messageformat:{pluralFunction:q[26]}}),o.__addLocaleData({locale:"mua",messageformat:{pluralFunction:q[0]}}),o.__addLocaleData({locale:"my",messageformat:{pluralFunction:q[7]}}),o.__addLocaleData({locale:"naq",messageformat:{pluralFunction:q[21]}}),o.__addLocaleData({locale:"nb",messageformat:{pluralFunction:q[1]}}),o.__addLocaleData({locale:"nd",messageformat:{pluralFunction:q[1]}}),o.__addLocaleData({locale:"ne",messageformat:{pluralFunction:q[1]}}),o.__addLocaleData({locale:"nl",messageformat:{pluralFunction:q[5]}}),o.__addLocaleData({locale:"nmg",messageformat:{pluralFunction:q[0]}}),o.__addLocaleData({locale:"nn",messageformat:{pluralFunction:q[1]}}),o.__addLocaleData({locale:"nnh",messageformat:{pluralFunction:q[1]}}),o.__addLocaleData({locale:"nr",messageformat:{pluralFunction:q[1]}}),o.__addLocaleData({locale:"nso",messageformat:{pluralFunction:q[2]}}),o.__addLocaleData({locale:"nus",messageformat:{pluralFunction:q[0]}}),o.__addLocaleData({locale:"nyn",messageformat:{pluralFunction:q[1]}}),o.__addLocaleData({locale:"om",messageformat:{pluralFunction:q[1]}}),o.__addLocaleData({locale:"or",messageformat:{pluralFunction:q[1]}}),o.__addLocaleData({locale:"os",messageformat:{pluralFunction:q[1]}}),o.__addLocaleData({locale:"pa",messageformat:{pluralFunction:q[2]}}),o.__addLocaleData({locale:"pl",messageformat:{pluralFunction:q[27]}}),o.__addLocaleData({locale:"ps",messageformat:{pluralFunction:q[1]}}),o.__addLocaleData({locale:"pt",messageformat:{pluralFunction:q[28]}}),o.__addLocaleData({locale:"rm",messageformat:{pluralFunction:q[1]}}),o.__addLocaleData({locale:"rn",messageformat:{pluralFunction:q[0]}}),o.__addLocaleData({locale:"ro",messageformat:{pluralFunction:q[29]}}),o.__addLocaleData({locale:"rof",messageformat:{pluralFunction:q[1]}}),o.__addLocaleData({locale:"ru",messageformat:{pluralFunction:q[30]}}),o.__addLocaleData({locale:"rw",messageformat:{pluralFunction:q[0]}}),o.__addLocaleData({locale:"rwk",messageformat:{pluralFunction:q[1]}}),o.__addLocaleData({locale:"sah",messageformat:{pluralFunction:q[7]}}),o.__addLocaleData({locale:"saq",messageformat:{pluralFunction:q[1]}}),o.__addLocaleData({locale:"sbp",messageformat:{pluralFunction:q[0]}}),o.__addLocaleData({locale:"se",messageformat:{pluralFunction:q[21]}}),o.__addLocaleData({locale:"seh",messageformat:{pluralFunction:q[1]}}),o.__addLocaleData({locale:"ses",messageformat:{pluralFunction:q[7]}}),o.__addLocaleData({locale:"sg",messageformat:{pluralFunction:q[7]}}),o.__addLocaleData({locale:"shi",messageformat:{pluralFunction:q[31]}}),o.__addLocaleData({locale:"si",messageformat:{pluralFunction:q[32]}}),o.__addLocaleData({locale:"sk",messageformat:{pluralFunction:q[10]}}),o.__addLocaleData({locale:"sl",messageformat:{pluralFunction:q[33]}}),o.__addLocaleData({locale:"sn",messageformat:{pluralFunction:q[1]}}),o.__addLocaleData({locale:"so",messageformat:{pluralFunction:q[1]}}),o.__addLocaleData({locale:"sq",messageformat:{pluralFunction:q[1]}}),o.__addLocaleData({locale:"sr",messageformat:{pluralFunction:q[9]}}),o.__addLocaleData({locale:"ss",messageformat:{pluralFunction:q[1]}}),o.__addLocaleData({locale:"ssy",messageformat:{pluralFunction:q[1]}}),o.__addLocaleData({locale:"st",messageformat:{pluralFunction:q[1]}}),o.__addLocaleData({locale:"sv",messageformat:{pluralFunction:q[5]}}),o.__addLocaleData({locale:"sw",messageformat:{pluralFunction:q[5]}}),o.__addLocaleData({locale:"swc",messageformat:{pluralFunction:q[0]}}),o.__addLocaleData({locale:"ta",messageformat:{pluralFunction:q[1]}}),o.__addLocaleData({locale:"te",messageformat:{pluralFunction:q[1]}}),o.__addLocaleData({locale:"teo",messageformat:{pluralFunction:q[1]}}),o.__addLocaleData({locale:"tg",messageformat:{pluralFunction:q[0]}}),o.__addLocaleData({locale:"th",messageformat:{pluralFunction:q[7]}}),o.__addLocaleData({locale:"ti",messageformat:{pluralFunction:q[2]}}),o.__addLocaleData({locale:"tig",messageformat:{pluralFunction:q[1]}}),o.__addLocaleData({locale:"tn",messageformat:{pluralFunction:q[1]}}),o.__addLocaleData({locale:"to",messageformat:{pluralFunction:q[7]}}),o.__addLocaleData({locale:"tr",messageformat:{pluralFunction:q[1]}}),o.__addLocaleData({locale:"ts",messageformat:{pluralFunction:q[1]}}),o.__addLocaleData({locale:"twq",messageformat:{pluralFunction:q[0]}}),o.__addLocaleData({locale:"tzm",messageformat:{pluralFunction:q[34]}}),o.__addLocaleData({locale:"ug",messageformat:{pluralFunction:q[1]}}),o.__addLocaleData({locale:"uk",messageformat:{pluralFunction:q[30]}}),o.__addLocaleData({locale:"ur",messageformat:{pluralFunction:q[5]}}),o.__addLocaleData({locale:"uz",messageformat:{pluralFunction:q[1]}}),o.__addLocaleData({locale:"vai",messageformat:{pluralFunction:q[0]}}),o.__addLocaleData({locale:"ve",messageformat:{pluralFunction:q[1]}}),o.__addLocaleData({locale:"vi",messageformat:{pluralFunction:q[7]}}),o.__addLocaleData({locale:"vo",messageformat:{pluralFunction:q[1]}}),o.__addLocaleData({locale:"vun",messageformat:{pluralFunction:q[1]}}),o.__addLocaleData({locale:"wae",messageformat:{pluralFunction:q[1]}}),o.__addLocaleData({locale:"wal",messageformat:{pluralFunction:q[0]}}),o.__addLocaleData({locale:"xh",messageformat:{pluralFunction:q[1]}}),o.__addLocaleData({locale:"xog",messageformat:{pluralFunction:q[1]}}),o.__addLocaleData({locale:"yav",messageformat:{pluralFunction:q[0]}}),o.__addLocaleData({locale:"yo",messageformat:{pluralFunction:q[7]}}),o.__addLocaleData({locale:"zgh",messageformat:{pluralFunction:q[0]}}),o.__addLocaleData({locale:"zh",messageformat:{pluralFunction:q[7]}}),o.__addLocaleData({locale:"zu",messageformat:{pluralFunction:q[3]}}),this.IntlMessageFormat=p | ||
(function(){"use strict";function a(a){var b,c,d,e,f=Array.prototype.slice.call(arguments,1);for(b=0,c=f.length;c>b;b+=1)if(d=f[b])for(e in d)h.call(d,e)&&(a[e]=d[e]);return a}function b(a,b,c){this.locales=a,this.formats=b,this.pluralFn=c}function c(a){this.id=a}function d(a,b,c,d){this.id=a,this.offset=b,this.options=c,this.pluralFn=d}function e(a,b,c,d){this.id=a,this.offset=b,this.numberFormat=c,this.string=d}function f(a,b){this.id=a,this.options=b}function g(a,b,c){var d="string"==typeof a?g.__parse(a):a;if(!d||"messageFormatPattern"!==d.type)throw new TypeError("A message must be provided as a String or AST.");c=this._mergeFormats(g.FORMATS,c),j(this,"_locale",{value:this._resolveLocale(b)});var e=g.__localeData__[this._locale].pluralFunction,f=this._compilePattern(d,b,c,e),h=this;this.format=function(a){return h._format(f,a)}}var h=Object.prototype.hasOwnProperty,i=function(){try{return!!Object.defineProperty({},"a",{})}catch(a){return!1}}(),j=(!i&&!Object.prototype.__defineGetter__,i?Object.defineProperty:function(a,b,c){"get"in c&&a.__defineGetter__?a.__defineGetter__(b,c.get):(!h.call(a,b)||"value"in c)&&(a[b]=c.value)}),k=Object.create||function(a,b){function c(){}var d,e;c.prototype=a,d=new c;for(e in b)h.call(b,e)&&j(d,e,b[e]);return d},l=b;b.prototype.compile=function(a){return this.pluralStack=[],this.currentPlural=null,this.pluralNumberFormat=null,this.compileMessage(a)},b.prototype.compileMessage=function(a){if(!a||"messageFormatPattern"!==a.type)throw new Error('Message AST is not of type: "messageFormatPattern"');var b,c,d,e=a.elements,f=[];for(b=0,c=e.length;c>b;b+=1)switch(d=e[b],d.type){case"messageTextElement":f.push(this.compileMessageText(d));break;case"argumentElement":f.push(this.compileArgument(d));break;default:throw new Error("Message element does not have a valid type")}return f},b.prototype.compileMessageText=function(a){return this.currentPlural&&/(^|[^\\])#/g.test(a.value)?(this.pluralNumberFormat||(this.pluralNumberFormat=new Intl.NumberFormat(this.locales)),new e(this.currentPlural.id,this.currentPlural.format.offset,this.pluralNumberFormat,a.value)):a.value.replace(/\\#/g,"#")},b.prototype.compileArgument=function(a){var b=a.format;if(!b)return new c(a.id);var e,g=this.formats,h=this.locales,i=this.pluralFn;switch(b.type){case"numberFormat":return e=g.number[b.style],{id:a.id,format:new Intl.NumberFormat(h,e).format};case"dateFormat":return e=g.date[b.style],{id:a.id,format:new Intl.DateTimeFormat(h,e).format};case"timeFormat":return e=g.time[b.style],{id:a.id,format:new Intl.DateTimeFormat(h,e).format};case"pluralFormat":return e=this.compileOptions(a),new d(a.id,b.offset,e,i);case"selectFormat":return e=this.compileOptions(a),new f(a.id,e);default:throw new Error("Message element does not have a valid format type")}},b.prototype.compileOptions=function(a){var b=a.format,c=b.options,d={};this.pluralStack.push(this.currentPlural),this.currentPlural="pluralFormat"===b.type?a:null;var e,f,g;for(e=0,f=c.length;f>e;e+=1)g=c[e],d[g.selector]=this.compileMessage(g.value);return this.currentPlural=this.pluralStack.pop(),d},c.prototype.format=function(a){return a?"string"==typeof a?a:String(a):""},d.prototype.getOption=function(a){var b=this.options,c=b["="+a]||b[this.pluralFn(a-this.offset)];return c||b.other},e.prototype.format=function(a){var b=this.numberFormat.format(a-this.offset);return this.string.replace(/(^|[^\\])#/g,"$1"+b).replace(/\\#/g,"#")},f.prototype.getOption=function(a){var b=this.options;return b[a]||b.other};var m=function(){function a(a,b){function c(){this.constructor=a}c.prototype=b.prototype,a.prototype=new c}function b(a,b,c,d,e,f){this.message=a,this.expected=b,this.found=c,this.offset=d,this.line=e,this.column=f,this.name="SyntaxError"}function c(a){function c(b){function c(b,c,d){var e,f;for(e=c;d>e;e++)f=a.charAt(e),"\n"===f?(b.seenCR||b.line++,b.column=1,b.seenCR=!1):"\r"===f||"\u2028"===f||"\u2029"===f?(b.line++,b.column=1,b.seenCR=!0):(b.column++,b.seenCR=!1)}return Ob!==b&&(Ob>b&&(Ob=0,Pb={line:1,column:1,seenCR:!1}),c(Pb,Ob,b),Ob=b),Pb}function d(a){Qb>Mb||(Mb>Qb&&(Qb=Mb,Rb=[]),Rb.push(a))}function e(d,e,f){function g(a){var b=1;for(a.sort(function(a,b){return a.description<b.description?-1:a.description>b.description?1:0});b<a.length;)a[b-1]===a[b]?a.splice(b,1):b++}function h(a,b){function c(a){function b(a){return a.charCodeAt(0).toString(16).toUpperCase()}return a.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\x08/g,"\\b").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\f/g,"\\f").replace(/\r/g,"\\r").replace(/[\x00-\x07\x0B\x0E\x0F]/g,function(a){return"\\x0"+b(a)}).replace(/[\x10-\x1F\x80-\xFF]/g,function(a){return"\\x"+b(a)}).replace(/[\u0180-\u0FFF]/g,function(a){return"\\u0"+b(a)}).replace(/[\u1080-\uFFFF]/g,function(a){return"\\u"+b(a)})}var d,e,f,g=new Array(a.length);for(f=0;f<a.length;f++)g[f]=a[f].description;return d=a.length>1?g.slice(0,-1).join(", ")+" or "+g[a.length-1]:g[0],e=b?'"'+c(b)+'"':"end of input","Expected "+d+" but "+e+" found."}var i=c(f),j=f<a.length?a.charAt(f):null;return null!==e&&g(e),new b(null!==d?d:h(e,j),e,j,f,i.line,i.column)}function f(){var a;return a=g()}function g(){var a,b,c;for(a=Mb,b=[],c=h();c!==C;)b.push(c),c=h();return b!==C&&(Nb=a,b=F(b)),a=b}function h(){var a;return a=j(),a===C&&(a=l()),a}function i(){var b,c,d,e,f,g;if(b=Mb,c=[],d=Mb,e=u(),e!==C?(f=z(),f!==C?(g=u(),g!==C?(e=[e,f,g],d=e):(Mb=d,d=G)):(Mb=d,d=G)):(Mb=d,d=G),d!==C)for(;d!==C;)c.push(d),d=Mb,e=u(),e!==C?(f=z(),f!==C?(g=u(),g!==C?(e=[e,f,g],d=e):(Mb=d,d=G)):(Mb=d,d=G)):(Mb=d,d=G);else c=G;return c!==C&&(Nb=b,c=H(c)),b=c,b===C&&(b=Mb,c=t(),c!==C&&(c=a.substring(b,Mb)),b=c),b}function j(){var a,b;return a=Mb,b=i(),b!==C&&(Nb=a,b=I(b)),a=b}function k(){var b,c,e;if(b=x(),b===C){if(b=Mb,c=[],J.test(a.charAt(Mb))?(e=a.charAt(Mb),Mb++):(e=C,0===Sb&&d(K)),e!==C)for(;e!==C;)c.push(e),J.test(a.charAt(Mb))?(e=a.charAt(Mb),Mb++):(e=C,0===Sb&&d(K));else c=G;c!==C&&(c=a.substring(b,Mb)),b=c}return b}function l(){var b,c,e,f,g,h,i,j,l;return b=Mb,123===a.charCodeAt(Mb)?(c=L,Mb++):(c=C,0===Sb&&d(M)),c!==C?(e=u(),e!==C?(f=k(),f!==C?(g=u(),g!==C?(h=Mb,44===a.charCodeAt(Mb)?(i=O,Mb++):(i=C,0===Sb&&d(P)),i!==C?(j=u(),j!==C?(l=m(),l!==C?(i=[i,j,l],h=i):(Mb=h,h=G)):(Mb=h,h=G)):(Mb=h,h=G),h===C&&(h=N),h!==C?(i=u(),i!==C?(125===a.charCodeAt(Mb)?(j=Q,Mb++):(j=C,0===Sb&&d(R)),j!==C?(Nb=b,c=S(f,h),b=c):(Mb=b,b=G)):(Mb=b,b=G)):(Mb=b,b=G)):(Mb=b,b=G)):(Mb=b,b=G)):(Mb=b,b=G)):(Mb=b,b=G),b}function m(){var a;return a=n(),a===C&&(a=o(),a===C&&(a=p())),a}function n(){var b,c,e,f,g,h,i;return b=Mb,a.substr(Mb,6)===T?(c=T,Mb+=6):(c=C,0===Sb&&d(U)),c===C&&(a.substr(Mb,4)===V?(c=V,Mb+=4):(c=C,0===Sb&&d(W)),c===C&&(a.substr(Mb,4)===X?(c=X,Mb+=4):(c=C,0===Sb&&d(Y)))),c!==C?(e=u(),e!==C?(f=Mb,44===a.charCodeAt(Mb)?(g=O,Mb++):(g=C,0===Sb&&d(P)),g!==C?(h=u(),h!==C?(i=z(),i!==C?(g=[g,h,i],f=g):(Mb=f,f=G)):(Mb=f,f=G)):(Mb=f,f=G),f===C&&(f=N),f!==C?(Nb=b,c=Z(c,f),b=c):(Mb=b,b=G)):(Mb=b,b=G)):(Mb=b,b=G),b}function o(){var b,c,e,f,g,h,i,j,k;if(b=Mb,a.substr(Mb,6)===$?(c=$,Mb+=6):(c=C,0===Sb&&d(_)),c!==C)if(e=u(),e!==C)if(44===a.charCodeAt(Mb)?(f=O,Mb++):(f=C,0===Sb&&d(P)),f!==C)if(g=u(),g!==C)if(h=s(),h===C&&(h=N),h!==C)if(i=u(),i!==C){if(j=[],k=r(),k!==C)for(;k!==C;)j.push(k),k=r();else j=G;j!==C?(Nb=b,c=ab(h,j),b=c):(Mb=b,b=G)}else Mb=b,b=G;else Mb=b,b=G;else Mb=b,b=G;else Mb=b,b=G;else Mb=b,b=G;else Mb=b,b=G;return b}function p(){var b,c,e,f,g,h,i;if(b=Mb,a.substr(Mb,6)===bb?(c=bb,Mb+=6):(c=C,0===Sb&&d(cb)),c!==C)if(e=u(),e!==C)if(44===a.charCodeAt(Mb)?(f=O,Mb++):(f=C,0===Sb&&d(P)),f!==C)if(g=u(),g!==C){if(h=[],i=r(),i!==C)for(;i!==C;)h.push(i),i=r();else h=G;h!==C?(Nb=b,c=db(h),b=c):(Mb=b,b=G)}else Mb=b,b=G;else Mb=b,b=G;else Mb=b,b=G;else Mb=b,b=G;return b}function q(){var b,c,e,f;return b=Mb,c=Mb,61===a.charCodeAt(Mb)?(e=eb,Mb++):(e=C,0===Sb&&d(fb)),e!==C?(f=x(),f!==C?(e=[e,f],c=e):(Mb=c,c=G)):(Mb=c,c=G),c!==C&&(c=a.substring(b,Mb)),b=c,b===C&&(b=z()),b}function r(){var b,c,e,f,h,i,j,k,l;return b=Mb,c=u(),c!==C?(e=q(),e!==C?(f=u(),f!==C?(123===a.charCodeAt(Mb)?(h=L,Mb++):(h=C,0===Sb&&d(M)),h!==C?(i=u(),i!==C?(j=g(),j!==C?(k=u(),k!==C?(125===a.charCodeAt(Mb)?(l=Q,Mb++):(l=C,0===Sb&&d(R)),l!==C?(Nb=b,c=gb(e,j),b=c):(Mb=b,b=G)):(Mb=b,b=G)):(Mb=b,b=G)):(Mb=b,b=G)):(Mb=b,b=G)):(Mb=b,b=G)):(Mb=b,b=G)):(Mb=b,b=G),b}function s(){var b,c,e,f;return b=Mb,a.substr(Mb,7)===hb?(c=hb,Mb+=7):(c=C,0===Sb&&d(ib)),c!==C?(e=u(),e!==C?(f=x(),f!==C?(Nb=b,c=jb(f),b=c):(Mb=b,b=G)):(Mb=b,b=G)):(Mb=b,b=G),b}function t(){var b,c;if(Sb++,b=[],lb.test(a.charAt(Mb))?(c=a.charAt(Mb),Mb++):(c=C,0===Sb&&d(mb)),c!==C)for(;c!==C;)b.push(c),lb.test(a.charAt(Mb))?(c=a.charAt(Mb),Mb++):(c=C,0===Sb&&d(mb));else b=G;return Sb--,b===C&&(c=C,0===Sb&&d(kb)),b}function u(){var b,c,e;for(Sb++,b=Mb,c=[],e=t();e!==C;)c.push(e),e=t();return c!==C&&(c=a.substring(b,Mb)),b=c,Sb--,b===C&&(c=C,0===Sb&&d(nb)),b}function v(){var b;return ob.test(a.charAt(Mb))?(b=a.charAt(Mb),Mb++):(b=C,0===Sb&&d(pb)),b}function w(){var b;return qb.test(a.charAt(Mb))?(b=a.charAt(Mb),Mb++):(b=C,0===Sb&&d(rb)),b}function x(){var b,c,e,f,g,h;if(b=Mb,48===a.charCodeAt(Mb)?(c=sb,Mb++):(c=C,0===Sb&&d(tb)),c===C){if(c=Mb,e=Mb,ub.test(a.charAt(Mb))?(f=a.charAt(Mb),Mb++):(f=C,0===Sb&&d(vb)),f!==C){for(g=[],h=v();h!==C;)g.push(h),h=v();g!==C?(f=[f,g],e=f):(Mb=e,e=G)}else Mb=e,e=G;e!==C&&(e=a.substring(c,Mb)),c=e}return c!==C&&(Nb=b,c=wb(c)),b=c}function y(){var b,c,e,f,g,h,i,j;return xb.test(a.charAt(Mb))?(b=a.charAt(Mb),Mb++):(b=C,0===Sb&&d(yb)),b===C&&(b=Mb,a.substr(Mb,2)===zb?(c=zb,Mb+=2):(c=C,0===Sb&&d(Ab)),c!==C&&(Nb=b,c=Bb()),b=c,b===C&&(b=Mb,a.substr(Mb,2)===Cb?(c=Cb,Mb+=2):(c=C,0===Sb&&d(Db)),c!==C&&(Nb=b,c=Eb()),b=c,b===C&&(b=Mb,a.substr(Mb,2)===Fb?(c=Fb,Mb+=2):(c=C,0===Sb&&d(Gb)),c!==C&&(Nb=b,c=Hb()),b=c,b===C&&(b=Mb,a.substr(Mb,2)===Ib?(c=Ib,Mb+=2):(c=C,0===Sb&&d(Jb)),c!==C?(e=Mb,f=Mb,g=w(),g!==C?(h=w(),h!==C?(i=w(),i!==C?(j=w(),j!==C?(g=[g,h,i,j],f=g):(Mb=f,f=G)):(Mb=f,f=G)):(Mb=f,f=G)):(Mb=f,f=G),f!==C&&(f=a.substring(e,Mb)),e=f,e!==C?(Nb=b,c=Kb(e),b=c):(Mb=b,b=G)):(Mb=b,b=G))))),b}function z(){var a,b,c;if(a=Mb,b=[],c=y(),c!==C)for(;c!==C;)b.push(c),c=y();else b=G;return b!==C&&(Nb=a,b=Lb(b)),a=b}var A,B=arguments.length>1?arguments[1]:{},C={},D={start:f},E=f,F=function(a){return{type:"messageFormatPattern",elements:a}},G=C,H=function(a){var b,c,d,e,f,g="";for(b=0,d=a.length;d>b;b+=1)for(e=a[b],c=0,f=e.length;f>c;c+=1)g+=e[c];return g},I=function(a){return{type:"messageTextElement",value:a}},J=/^[^ \t\n\r,.+={}#]/,K={type:"class",value:"[^ \\t\\n\\r,.+={}#]",description:"[^ \\t\\n\\r,.+={}#]"},L="{",M={type:"literal",value:"{",description:'"{"'},N=null,O=",",P={type:"literal",value:",",description:'","'},Q="}",R={type:"literal",value:"}",description:'"}"'},S=function(a,b){return{type:"argumentElement",id:a,format:b&&b[2]}},T="number",U={type:"literal",value:"number",description:'"number"'},V="date",W={type:"literal",value:"date",description:'"date"'},X="time",Y={type:"literal",value:"time",description:'"time"'},Z=function(a,b){return{type:a+"Format",style:b&&b[2]}},$="plural",_={type:"literal",value:"plural",description:'"plural"'},ab=function(a,b){return{type:"pluralFormat",offset:a||0,options:b}},bb="select",cb={type:"literal",value:"select",description:'"select"'},db=function(a){return{type:"selectFormat",options:a}},eb="=",fb={type:"literal",value:"=",description:'"="'},gb=function(a,b){return{type:"optionalFormatPattern",selector:a,value:b}},hb="offset:",ib={type:"literal",value:"offset:",description:'"offset:"'},jb=function(a){return a},kb={type:"other",description:"whitespace"},lb=/^[ \t\n\r]/,mb={type:"class",value:"[ \\t\\n\\r]",description:"[ \\t\\n\\r]"},nb={type:"other",description:"optionalWhitespace"},ob=/^[0-9]/,pb={type:"class",value:"[0-9]",description:"[0-9]"},qb=/^[0-9a-f]/i,rb={type:"class",value:"[0-9a-f]i",description:"[0-9a-f]i"},sb="0",tb={type:"literal",value:"0",description:'"0"'},ub=/^[1-9]/,vb={type:"class",value:"[1-9]",description:"[1-9]"},wb=function(a){return parseInt(a,10)},xb=/^[^{}\\\0-\x1F \t\n\r]/,yb={type:"class",value:"[^{}\\\\\\0-\\x1F \\t\\n\\r]",description:"[^{}\\\\\\0-\\x1F \\t\\n\\r]"},zb="\\#",Ab={type:"literal",value:"\\#",description:'"\\\\#"'},Bb=function(){return"\\#"},Cb="\\{",Db={type:"literal",value:"\\{",description:'"\\\\{"'},Eb=function(){return"{"},Fb="\\}",Gb={type:"literal",value:"\\}",description:'"\\\\}"'},Hb=function(){return"}"},Ib="\\u",Jb={type:"literal",value:"\\u",description:'"\\\\u"'},Kb=function(a){return String.fromCharCode(parseInt(a,16))},Lb=function(a){return a.join("")},Mb=0,Nb=0,Ob=0,Pb={line:1,column:1,seenCR:!1},Qb=0,Rb=[],Sb=0;if("startRule"in B){if(!(B.startRule in D))throw new Error("Can't start parsing from rule \""+B.startRule+'".');E=D[B.startRule]}if(A=E(),A!==C&&Mb===a.length)return A;throw A!==C&&Mb<a.length&&d({type:"end",description:"end of input"}),e(null,Rb,Qb)}return a(b,Error),{SyntaxError:b,parse:c}}(),n=g;j(g,"FORMATS",{enumerable:!0,value:{number:{currency:{style:"currency"},percent:{style:"percent"}},date:{"short":{month:"numeric",day:"numeric",year:"2-digit"},medium:{month:"short",day:"numeric",year:"numeric"},"long":{month:"long",day:"numeric",year:"numeric"},full:{weekday:"long",month:"long",day:"numeric",year:"numeric"}},time:{"short":{hour:"numeric",minute:"numeric"},medium:{hour:"numeric",minute:"numeric",second:"numeric"},"long":{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"},full:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"}}}}),j(g,"__availableLocales__",{value:[]}),j(g,"__localeData__",{value:k(null)}),j(g,"__addLocaleData",{value:function(a){if(!a||!a.locale)throw new Error("Object passed does not identify itself with a valid language tag");if(!a.messageformat)throw new Error("Object passed does not contain locale data for IntlMessageFormat");var b=g.__availableLocales__,c=g.__localeData__,d=a.locale.toLowerCase().split("-")[0];b.push(d),c[d]=a.messageformat}}),j(g,"__parse",{value:m.parse}),j(g,"defaultLocale",{enumerable:!0,writable:!0,value:void 0}),j(g,"__getDefaultLocale",{value:function(){return g.defaultLocale||(g.defaultLocale=(new Intl.NumberFormat).resolvedOptions().locale),g.defaultLocale}}),g.prototype.resolvedOptions=function(){return{locale:this._locale}},g.prototype._compilePattern=function(a,b,c,d){var e=new l(b,c,d);return e.compile(a)},g.prototype._format=function(a,b){var c,d,e,f,g,i="";for(c=0,d=a.length;d>c;c+=1)if(e=a[c],"string"!=typeof e){if(f=e.id,!b||!h.call(b,f))throw new Error("A value must be provided for: "+f);g=b[f],i+=e.options?this._format(e.getOption(g),b):e.format(g)}else i+=e;return i},g.prototype._mergeFormats=function(b,c){var d,e,f={};for(d in b)h.call(b,d)&&(f[d]=e=k(b[d]),c&&h.call(c,d)&&a(e,c[d]));return f},g.prototype._resolveLocale=function(a){var b,c,d,e=g.__availableLocales__;if(0===e.length)throw new Error("No locale data has been provided for IntlMessageFormat yet");if("string"==typeof a&&(a=[a]),a&&a.length)for(c=0,d=a.length;d>c;c+=1){if(b=a[c].toLowerCase().split("-")[0],!/[a-z]{2,3}/i.test(b))throw new RangeError('"'+a[c]+'" is not a structurally valid language tag');if(e.indexOf(b)>=0)break}return b||g.__getDefaultLocale().split("-")[0]};var o=n,p=[function(){},function(a){return a=Math.floor(a),1===a?"one":"other"},function(a){return a=Math.floor(a),a>=0&&1>=a?"one":"other"},function(a){var b=Math.floor(Math.abs(a));return a=Math.floor(a),0===b||1===a?"one":"other"},function(a){return a=Math.floor(a),0===a?"zero":1===a?"one":2===a?"two":a%100>=3&&10>=a%100?"few":a%100>=11&&99>=a%100?"many":"other"},function(a){var b=Math.floor(Math.abs(a)),c=a.toString().replace(/^[^.]*\.?/,"").length;return a=Math.floor(a),1===b&&0===c?"one":"other"},function(a){return a=Math.floor(a),a%10===1&&a%100!==11?"one":a%10>=2&&4>=a%10&&!(a%100>=12&&14>=a%100)?"few":a%10===0||a%10>=5&&9>=a%10||a%100>=11&&14>=a%100?"many":"other"},function(){return"other"},function(a){return a=Math.floor(a),a%10===1&&a%100!==11&&a%100!==71&&a%100!==91?"one":a%10===2&&a%100!==12&&a%100!==72&&a%100!==92?"two":(a%10>=3&&4>=a%10||a%10===9)&&!(a%100>=10&&19>=a%100||a%100>=70&&79>=a%100||a%100>=90&&99>=a%100)?"few":0!==a&&a%1e6===0?"many":"other"},function(a){var b=Math.floor(Math.abs(a)),c=a.toString().replace(/^[^.]*\.?/,"").length,d=parseInt(a.toString().replace(/^[^.]*\.?/,""),10);return a=Math.floor(a),0===c&&b%10===1&&(b%100!==11||d%10===1&&d%100!==11)?"one":0===c&&b%10>=2&&4>=b%10&&(!(b%100>=12&&14>=b%100)||d%10>=2&&4>=d%10&&!(d%100>=12&&14>=d%100))?"few":"other"},function(a){var b=Math.floor(Math.abs(a)),c=a.toString().replace(/^[^.]*\.?/,"").length;return a=Math.floor(a),1===b&&0===c?"one":b>=2&&4>=b&&0===c?"few":0!==c?"many":"other"},function(a){return a=Math.floor(a),0===a?"zero":1===a?"one":2===a?"two":3===a?"few":6===a?"many":"other"},function(a){var b=Math.floor(Math.abs(a)),c=parseInt(a.toString().replace(/^[^.]*\.?|0+$/g,""),10);return a=Math.floor(a),1===a||0!==c&&(0===b||1===b)?"one":"other"},function(a){var b=Math.floor(Math.abs(a));return a=Math.floor(a),0===b||1===b?"one":"other"},function(a){var b=Math.floor(Math.abs(a)),c=a.toString().replace(/^[^.]*\.?/,"").length,d=parseInt(a.toString().replace(/^[^.]*\.?/,""),10);return a=Math.floor(a),0===c&&(1===b||2===b||3===b||0===c&&(b%10!==4&&b%10!==6&&b%10!==9||0!==c&&d%10!==4&&d%10!==6&&d%10!==9))?"one":"other"},function(a){return a=Math.floor(a),1===a?"one":2===a?"two":a>=3&&6>=a?"few":a>=7&&10>=a?"many":"other"},function(a){return a=Math.floor(a),1===a||11===a?"one":2===a||12===a?"two":a>=3&&10>=a||a>=13&&19>=a?"few":"other"},function(a){var b=Math.floor(Math.abs(a)),c=a.toString().replace(/^[^.]*\.?/,"").length;return a=Math.floor(a),0===c&&b%10===1?"one":0===c&&b%10===2?"two":0!==c||b%100!==0&&b%100!==20&&b%100!==40&&b%100!==60&&b%100!==80?0!==c?"many":"other":"few"},function(a){var b=Math.floor(Math.abs(a)),c=a.toString().replace(/^[^.]*\.?/,"").length;return a=Math.floor(a),1===b&&0===c?"one":2===b&&0===c?"two":0!==c||a>=0&&10>=a||a%10!==0?"other":"many"},function(a){var b=Math.floor(Math.abs(a)),c=parseInt(a.toString().replace(/^[^.]*\.?|0+$/g,""),10);return a=Math.floor(a),0!==c||b%10!==1||b%100===11&&0===c?"other":"one"},function(a){return a=Math.floor(a),0===a?"zero":1===a?"one":"other"},function(a){return a=Math.floor(a),1===a?"one":2===a?"two":"other"},function(a){var b=Math.floor(Math.abs(a));return a=Math.floor(a),0===a?"zero":0!==b&&1!==b||0===a?"other":"one"},function(a){var b=parseInt(a.toString().replace(/^[^.]*\.?/,""),10);return a=Math.floor(a),a%10!==1||a%100>=11&&19>=a%100?a%10>=2&&9>=a%10&&!(a%100>=11&&19>=a%100)?"few":0!==b?"many":"other":"one"},function(a){var b=a.toString().replace(/^[^.]*\.?/,"").length,c=parseInt(a.toString().replace(/^[^.]*\.?/,""),10);return a=Math.floor(a),a%10===0||a%100>=11&&19>=a%100||2===b&&c%100>=11&&19>=c%100?"zero":a%10===1&&(a%100!==11||2===b&&c%10===1&&(c%100!==11||2!==b&&c%10===1))?"one":"other"},function(a){var b=Math.floor(Math.abs(a)),c=a.toString().replace(/^[^.]*\.?/,"").length,d=parseInt(a.toString().replace(/^[^.]*\.?/,""),10);return a=Math.floor(a),0!==c||b%10!==1&&d%10!==1?"other":"one"},function(a){return a=Math.floor(a),1===a?"one":0===a||a%100>=2&&10>=a%100?"few":a%100>=11&&19>=a%100?"many":"other"},function(a){var b=Math.floor(Math.abs(a)),c=a.toString().replace(/^[^.]*\.?/,"").length;return a=Math.floor(a),1===b&&0===c?"one":0===c&&b%10>=2&&4>=b%10&&!(b%100>=12&&14>=b%100)?"few":0===c&&1!==b&&(b%10>=0&&1>=b%10||0===c&&(b%10>=5&&9>=b%10||0===c&&b%100>=12&&14>=b%100))?"many":"other"},function(a){var b=Math.floor(Math.abs(a)),c=a.toString().replace(/^[^.]*\.?/,"").length,d=parseInt(a.toString().replace(/^[^.]*\.?|0+$/g,""),10);return a=Math.floor(a),1===b&&(0===c||0===b&&1===d)?"one":"other"},function(a){var b=Math.floor(Math.abs(a)),c=a.toString().replace(/^[^.]*\.?/,"").length;return a=Math.floor(a),1===b&&0===c?"one":0!==c||0===a||1!==a&&a%100>=1&&19>=a%100?"few":"other"},function(a){var b=Math.floor(Math.abs(a)),c=a.toString().replace(/^[^.]*\.?/,"").length;return a=Math.floor(a),0===c&&b%10===1&&b%100!==11?"one":0===c&&b%10>=2&&4>=b%10&&!(b%100>=12&&14>=b%100)?"few":0===c&&(b%10===0||0===c&&(b%10>=5&&9>=b%10||0===c&&b%100>=11&&14>=b%100))?"many":"other"},function(a){var b=Math.floor(Math.abs(a));return a=Math.floor(a),0===b||1===a?"one":a>=2&&10>=a?"few":"other"},function(a){var b=Math.floor(Math.abs(a)),c=parseInt(a.toString().replace(/^[^.]*\.?/,""),10);return a=Math.floor(a),0===a||1===a||0===b&&1===c?"one":"other"},function(a){var b=Math.floor(Math.abs(a)),c=a.toString().replace(/^[^.]*\.?/,"").length;return a=Math.floor(a),0===c&&b%100===1?"one":0===c&&b%100===2?"two":0===c&&(b%100>=3&&4>=b%100||0!==c)?"few":"other"},function(a){return a=Math.floor(a),a>=0&&1>=a||a>=11&&99>=a?"one":"other"}];n.__addLocaleData({locale:"aa",messageformat:{pluralFunction:p[0]}}),n.__addLocaleData({locale:"af",messageformat:{pluralFunction:p[1]}}),n.__addLocaleData({locale:"agq",messageformat:{pluralFunction:p[0]}}),n.__addLocaleData({locale:"ak",messageformat:{pluralFunction:p[2]}}),n.__addLocaleData({locale:"am",messageformat:{pluralFunction:p[3]}}),n.__addLocaleData({locale:"ar",messageformat:{pluralFunction:p[4]}}),n.__addLocaleData({locale:"as",messageformat:{pluralFunction:p[5]}}),n.__addLocaleData({locale:"asa",messageformat:{pluralFunction:p[1]}}),n.__addLocaleData({locale:"ast",messageformat:{pluralFunction:p[5]}}),n.__addLocaleData({locale:"az",messageformat:{pluralFunction:p[1]}}),n.__addLocaleData({locale:"bas",messageformat:{pluralFunction:p[0]}}),n.__addLocaleData({locale:"be",messageformat:{pluralFunction:p[6]}}),n.__addLocaleData({locale:"bem",messageformat:{pluralFunction:p[1]}}),n.__addLocaleData({locale:"bez",messageformat:{pluralFunction:p[1]}}),n.__addLocaleData({locale:"bg",messageformat:{pluralFunction:p[1]}}),n.__addLocaleData({locale:"bm",messageformat:{pluralFunction:p[7]}}),n.__addLocaleData({locale:"bn",messageformat:{pluralFunction:p[3]}}),n.__addLocaleData({locale:"bo",messageformat:{pluralFunction:p[7]}}),n.__addLocaleData({locale:"br",messageformat:{pluralFunction:p[8]}}),n.__addLocaleData({locale:"brx",messageformat:{pluralFunction:p[1]}}),n.__addLocaleData({locale:"bs",messageformat:{pluralFunction:p[9]}}),n.__addLocaleData({locale:"byn",messageformat:{pluralFunction:p[0]}}),n.__addLocaleData({locale:"ca",messageformat:{pluralFunction:p[5]}}),n.__addLocaleData({locale:"cgg",messageformat:{pluralFunction:p[1]}}),n.__addLocaleData({locale:"chr",messageformat:{pluralFunction:p[1]}}),n.__addLocaleData({locale:"cs",messageformat:{pluralFunction:p[10]}}),n.__addLocaleData({locale:"cy",messageformat:{pluralFunction:p[11]}}),n.__addLocaleData({locale:"da",messageformat:{pluralFunction:p[12]}}),n.__addLocaleData({locale:"dav",messageformat:{pluralFunction:p[0]}}),n.__addLocaleData({locale:"de",messageformat:{pluralFunction:p[5]}}),n.__addLocaleData({locale:"dje",messageformat:{pluralFunction:p[0]}}),n.__addLocaleData({locale:"dua",messageformat:{pluralFunction:p[0]}}),n.__addLocaleData({locale:"dyo",messageformat:{pluralFunction:p[0]}}),n.__addLocaleData({locale:"dz",messageformat:{pluralFunction:p[7]}}),n.__addLocaleData({locale:"ebu",messageformat:{pluralFunction:p[0]}}),n.__addLocaleData({locale:"ee",messageformat:{pluralFunction:p[1]}}),n.__addLocaleData({locale:"el",messageformat:{pluralFunction:p[1]}}),n.__addLocaleData({locale:"en",messageformat:{pluralFunction:p[5]}}),n.__addLocaleData({locale:"eo",messageformat:{pluralFunction:p[1]}}),n.__addLocaleData({locale:"es",messageformat:{pluralFunction:p[1]}}),n.__addLocaleData({locale:"et",messageformat:{pluralFunction:p[5]}}),n.__addLocaleData({locale:"eu",messageformat:{pluralFunction:p[1]}}),n.__addLocaleData({locale:"ewo",messageformat:{pluralFunction:p[0]}}),n.__addLocaleData({locale:"fa",messageformat:{pluralFunction:p[3]}}),n.__addLocaleData({locale:"ff",messageformat:{pluralFunction:p[13]}}),n.__addLocaleData({locale:"fi",messageformat:{pluralFunction:p[5]}}),n.__addLocaleData({locale:"fil",messageformat:{pluralFunction:p[14]}}),n.__addLocaleData({locale:"fo",messageformat:{pluralFunction:p[1]}}),n.__addLocaleData({locale:"fr",messageformat:{pluralFunction:p[13]}}),n.__addLocaleData({locale:"fur",messageformat:{pluralFunction:p[1]}}),n.__addLocaleData({locale:"fy",messageformat:{pluralFunction:p[5]}}),n.__addLocaleData({locale:"ga",messageformat:{pluralFunction:p[15]}}),n.__addLocaleData({locale:"gd",messageformat:{pluralFunction:p[16]}}),n.__addLocaleData({locale:"gl",messageformat:{pluralFunction:p[5]}}),n.__addLocaleData({locale:"gsw",messageformat:{pluralFunction:p[1]}}),n.__addLocaleData({locale:"gu",messageformat:{pluralFunction:p[3]}}),n.__addLocaleData({locale:"guz",messageformat:{pluralFunction:p[0]}}),n.__addLocaleData({locale:"gv",messageformat:{pluralFunction:p[17]}}),n.__addLocaleData({locale:"ha",messageformat:{pluralFunction:p[1]}}),n.__addLocaleData({locale:"haw",messageformat:{pluralFunction:p[1]}}),n.__addLocaleData({locale:"he",messageformat:{pluralFunction:p[18]}}),n.__addLocaleData({locale:"hi",messageformat:{pluralFunction:p[3]}}),n.__addLocaleData({locale:"hr",messageformat:{pluralFunction:p[9]}}),n.__addLocaleData({locale:"hu",messageformat:{pluralFunction:p[1]}}),n.__addLocaleData({locale:"hy",messageformat:{pluralFunction:p[13]}}),n.__addLocaleData({locale:"ia",messageformat:{pluralFunction:p[0]}}),n.__addLocaleData({locale:"id",messageformat:{pluralFunction:p[7]}}),n.__addLocaleData({locale:"ig",messageformat:{pluralFunction:p[7]}}),n.__addLocaleData({locale:"ii",messageformat:{pluralFunction:p[7]}}),n.__addLocaleData({locale:"is",messageformat:{pluralFunction:p[19]}}),n.__addLocaleData({locale:"it",messageformat:{pluralFunction:p[5]}}),n.__addLocaleData({locale:"ja",messageformat:{pluralFunction:p[7]}}),n.__addLocaleData({locale:"jgo",messageformat:{pluralFunction:p[1]}}),n.__addLocaleData({locale:"jmc",messageformat:{pluralFunction:p[1]}}),n.__addLocaleData({locale:"ka",messageformat:{pluralFunction:p[1]}}),n.__addLocaleData({locale:"kab",messageformat:{pluralFunction:p[13]}}),n.__addLocaleData({locale:"kam",messageformat:{pluralFunction:p[0]}}),n.__addLocaleData({locale:"kde",messageformat:{pluralFunction:p[7]}}),n.__addLocaleData({locale:"kea",messageformat:{pluralFunction:p[7]}}),n.__addLocaleData({locale:"khq",messageformat:{pluralFunction:p[0]}}),n.__addLocaleData({locale:"ki",messageformat:{pluralFunction:p[0]}}),n.__addLocaleData({locale:"kk",messageformat:{pluralFunction:p[1]}}),n.__addLocaleData({locale:"kkj",messageformat:{pluralFunction:p[1]}}),n.__addLocaleData({locale:"kl",messageformat:{pluralFunction:p[1]}}),n.__addLocaleData({locale:"kln",messageformat:{pluralFunction:p[0]}}),n.__addLocaleData({locale:"km",messageformat:{pluralFunction:p[7]}}),n.__addLocaleData({locale:"kn",messageformat:{pluralFunction:p[3]}}),n.__addLocaleData({locale:"ko",messageformat:{pluralFunction:p[7]}}),n.__addLocaleData({locale:"kok",messageformat:{pluralFunction:p[0]}}),n.__addLocaleData({locale:"ks",messageformat:{pluralFunction:p[1]}}),n.__addLocaleData({locale:"ksb",messageformat:{pluralFunction:p[1]}}),n.__addLocaleData({locale:"ksf",messageformat:{pluralFunction:p[0]}}),n.__addLocaleData({locale:"ksh",messageformat:{pluralFunction:p[20]}}),n.__addLocaleData({locale:"kw",messageformat:{pluralFunction:p[21]}}),n.__addLocaleData({locale:"ky",messageformat:{pluralFunction:p[1]}}),n.__addLocaleData({locale:"lag",messageformat:{pluralFunction:p[22]}}),n.__addLocaleData({locale:"lg",messageformat:{pluralFunction:p[1]}}),n.__addLocaleData({locale:"lkt",messageformat:{pluralFunction:p[7]}}),n.__addLocaleData({locale:"ln",messageformat:{pluralFunction:p[2]}}),n.__addLocaleData({locale:"lo",messageformat:{pluralFunction:p[7]}}),n.__addLocaleData({locale:"lt",messageformat:{pluralFunction:p[23]}}),n.__addLocaleData({locale:"lu",messageformat:{pluralFunction:p[0]}}),n.__addLocaleData({locale:"luo",messageformat:{pluralFunction:p[0]}}),n.__addLocaleData({locale:"luy",messageformat:{pluralFunction:p[0]}}),n.__addLocaleData({locale:"lv",messageformat:{pluralFunction:p[24]}}),n.__addLocaleData({locale:"mas",messageformat:{pluralFunction:p[1]}}),n.__addLocaleData({locale:"mer",messageformat:{pluralFunction:p[0]}}),n.__addLocaleData({locale:"mfe",messageformat:{pluralFunction:p[0]}}),n.__addLocaleData({locale:"mg",messageformat:{pluralFunction:p[2]}}),n.__addLocaleData({locale:"mgh",messageformat:{pluralFunction:p[0]}}),n.__addLocaleData({locale:"mgo",messageformat:{pluralFunction:p[1]}}),n.__addLocaleData({locale:"mk",messageformat:{pluralFunction:p[25]}}),n.__addLocaleData({locale:"ml",messageformat:{pluralFunction:p[1]}}),n.__addLocaleData({locale:"mn",messageformat:{pluralFunction:p[1]}}),n.__addLocaleData({locale:"mr",messageformat:{pluralFunction:p[3]}}),n.__addLocaleData({locale:"ms",messageformat:{pluralFunction:p[7]}}),n.__addLocaleData({locale:"mt",messageformat:{pluralFunction:p[26]}}),n.__addLocaleData({locale:"mua",messageformat:{pluralFunction:p[0]}}),n.__addLocaleData({locale:"my",messageformat:{pluralFunction:p[7]}}),n.__addLocaleData({locale:"naq",messageformat:{pluralFunction:p[21]}}),n.__addLocaleData({locale:"nb",messageformat:{pluralFunction:p[1]}}),n.__addLocaleData({locale:"nd",messageformat:{pluralFunction:p[1]}}),n.__addLocaleData({locale:"ne",messageformat:{pluralFunction:p[1]}}),n.__addLocaleData({locale:"nl",messageformat:{pluralFunction:p[5]}}),n.__addLocaleData({locale:"nmg",messageformat:{pluralFunction:p[0]}}),n.__addLocaleData({locale:"nn",messageformat:{pluralFunction:p[1]}}),n.__addLocaleData({locale:"nnh",messageformat:{pluralFunction:p[1]}}),n.__addLocaleData({locale:"nr",messageformat:{pluralFunction:p[1]}}),n.__addLocaleData({locale:"nso",messageformat:{pluralFunction:p[2]}}),n.__addLocaleData({locale:"nus",messageformat:{pluralFunction:p[0]}}),n.__addLocaleData({locale:"nyn",messageformat:{pluralFunction:p[1]}}),n.__addLocaleData({locale:"om",messageformat:{pluralFunction:p[1]}}),n.__addLocaleData({locale:"or",messageformat:{pluralFunction:p[1]}}),n.__addLocaleData({locale:"os",messageformat:{pluralFunction:p[1]}}),n.__addLocaleData({locale:"pa",messageformat:{pluralFunction:p[2]}}),n.__addLocaleData({locale:"pl",messageformat:{pluralFunction:p[27]}}),n.__addLocaleData({locale:"ps",messageformat:{pluralFunction:p[1]}}),n.__addLocaleData({locale:"pt",messageformat:{pluralFunction:p[28]}}),n.__addLocaleData({locale:"rm",messageformat:{pluralFunction:p[1]}}),n.__addLocaleData({locale:"rn",messageformat:{pluralFunction:p[0]}}),n.__addLocaleData({locale:"ro",messageformat:{pluralFunction:p[29]}}),n.__addLocaleData({locale:"rof",messageformat:{pluralFunction:p[1]}}),n.__addLocaleData({locale:"ru",messageformat:{pluralFunction:p[30]}}),n.__addLocaleData({locale:"rw",messageformat:{pluralFunction:p[0]}}),n.__addLocaleData({locale:"rwk",messageformat:{pluralFunction:p[1]}}),n.__addLocaleData({locale:"sah",messageformat:{pluralFunction:p[7]}}),n.__addLocaleData({locale:"saq",messageformat:{pluralFunction:p[1]}}),n.__addLocaleData({locale:"sbp",messageformat:{pluralFunction:p[0]}}),n.__addLocaleData({locale:"se",messageformat:{pluralFunction:p[21]}}),n.__addLocaleData({locale:"seh",messageformat:{pluralFunction:p[1]}}),n.__addLocaleData({locale:"ses",messageformat:{pluralFunction:p[7]}}),n.__addLocaleData({locale:"sg",messageformat:{pluralFunction:p[7]}}),n.__addLocaleData({locale:"shi",messageformat:{pluralFunction:p[31]}}),n.__addLocaleData({locale:"si",messageformat:{pluralFunction:p[32]}}),n.__addLocaleData({locale:"sk",messageformat:{pluralFunction:p[10]}}),n.__addLocaleData({locale:"sl",messageformat:{pluralFunction:p[33]}}),n.__addLocaleData({locale:"sn",messageformat:{pluralFunction:p[1]}}),n.__addLocaleData({locale:"so",messageformat:{pluralFunction:p[1]}}),n.__addLocaleData({locale:"sq",messageformat:{pluralFunction:p[1]}}),n.__addLocaleData({locale:"sr",messageformat:{pluralFunction:p[9]}}),n.__addLocaleData({locale:"ss",messageformat:{pluralFunction:p[1]}}),n.__addLocaleData({locale:"ssy",messageformat:{pluralFunction:p[1]}}),n.__addLocaleData({locale:"st",messageformat:{pluralFunction:p[1]}}),n.__addLocaleData({locale:"sv",messageformat:{pluralFunction:p[5]}}),n.__addLocaleData({locale:"sw",messageformat:{pluralFunction:p[5]}}),n.__addLocaleData({locale:"swc",messageformat:{pluralFunction:p[0]}}),n.__addLocaleData({locale:"ta",messageformat:{pluralFunction:p[1]}}),n.__addLocaleData({locale:"te",messageformat:{pluralFunction:p[1]}}),n.__addLocaleData({locale:"teo",messageformat:{pluralFunction:p[1]}}),n.__addLocaleData({locale:"tg",messageformat:{pluralFunction:p[0]}}),n.__addLocaleData({locale:"th",messageformat:{pluralFunction:p[7]}}),n.__addLocaleData({locale:"ti",messageformat:{pluralFunction:p[2]}}),n.__addLocaleData({locale:"tig",messageformat:{pluralFunction:p[1]}}),n.__addLocaleData({locale:"tn",messageformat:{pluralFunction:p[1]}}),n.__addLocaleData({locale:"to",messageformat:{pluralFunction:p[7]}}),n.__addLocaleData({locale:"tr",messageformat:{pluralFunction:p[1]}}),n.__addLocaleData({locale:"ts",messageformat:{pluralFunction:p[1]}}),n.__addLocaleData({locale:"twq",messageformat:{pluralFunction:p[0]}}),n.__addLocaleData({locale:"tzm",messageformat:{pluralFunction:p[34]}}),n.__addLocaleData({locale:"ug",messageformat:{pluralFunction:p[1]}}),n.__addLocaleData({locale:"uk",messageformat:{pluralFunction:p[30]}}),n.__addLocaleData({locale:"ur",messageformat:{pluralFunction:p[5]}}),n.__addLocaleData({locale:"uz",messageformat:{pluralFunction:p[1]}}),n.__addLocaleData({locale:"vai",messageformat:{pluralFunction:p[0]}}),n.__addLocaleData({locale:"ve",messageformat:{pluralFunction:p[1]}}),n.__addLocaleData({locale:"vi",messageformat:{pluralFunction:p[7]}}),n.__addLocaleData({locale:"vo",messageformat:{pluralFunction:p[1]}}),n.__addLocaleData({locale:"vun",messageformat:{pluralFunction:p[1]}}),n.__addLocaleData({locale:"wae",messageformat:{pluralFunction:p[1]}}),n.__addLocaleData({locale:"wal",messageformat:{pluralFunction:p[0]}}),n.__addLocaleData({locale:"xh",messageformat:{pluralFunction:p[1]}}),n.__addLocaleData({locale:"xog",messageformat:{pluralFunction:p[1]}}),n.__addLocaleData({locale:"yav",messageformat:{pluralFunction:p[0]}}),n.__addLocaleData({locale:"yo",messageformat:{pluralFunction:p[7]}}),n.__addLocaleData({locale:"zgh",messageformat:{pluralFunction:p[0]}}),n.__addLocaleData({locale:"zh",messageformat:{pluralFunction:p[7]}}),n.__addLocaleData({locale:"zu",messageformat:{pluralFunction:p[3]}}),this.IntlMessageFormat=o | ||
}).call(this); |
@@ -82,7 +82,3 @@ "use strict"; | ||
Compiler.prototype.compileArgument = function (element) { | ||
var format = element.format, | ||
formats = this.formats, | ||
locales = this.locales, | ||
pluralFn = this.pluralFn, | ||
options; | ||
var format = element.format; | ||
@@ -93,2 +89,7 @@ if (!format) { | ||
var formats = this.formats, | ||
locales = this.locales, | ||
pluralFn = this.pluralFn, | ||
options; | ||
switch (format.type) { | ||
@@ -95,0 +96,0 @@ case 'numberFormat': |
@@ -36,12 +36,13 @@ "use strict"; | ||
// Define the `pattern` property, a compiled pattern that is highly | ||
// optimized for repeated `format()` invocations. **Note:** This passes the | ||
// `locales` set provided to the constructor instead of just the resolved | ||
// locale. | ||
// Compile the `ast` to a pattern that is highly optimized for repeated | ||
// `format()` invocations. **Note:** This passes the `locales` set provided | ||
// to the constructor instead of just the resolved locale. | ||
var pattern = this._compilePattern(ast, locales, formats, pluralFn); | ||
src$es5$$.defineProperty(this, '_pattern', {value: pattern}); | ||
// Bind `format()` method to `this` so it can be passed by reference like | ||
// "Bind" `format()` method to `this` so it can be passed by reference like | ||
// the other `Intl` APIs. | ||
this.format = src$es5$$.fnBind.call(this.format, this); | ||
var messageFormat = this; | ||
this.format = function (values) { | ||
return messageFormat._format(pattern, values); | ||
}; | ||
} | ||
@@ -167,6 +168,2 @@ | ||
MessageFormat.prototype.format = function (values) { | ||
return this._format(this._pattern, values); | ||
}; | ||
MessageFormat.prototype.resolvedOptions = function () { | ||
@@ -173,0 +170,0 @@ // TODO: Provide anything else? |
@@ -18,10 +18,2 @@ "use strict"; | ||
enumerable: true | ||
}, | ||
fnBind: { | ||
get: function() { | ||
return fnBind; | ||
}, | ||
enumerable: true | ||
} | ||
@@ -68,11 +60,2 @@ })); | ||
var fnBind = Function.prototype.bind || function (thisObj) { | ||
var fn = this, | ||
args = [].slice.call(arguments, 1); | ||
return function () { | ||
fn.apply(thisObj, args.concat([].slice.call(arguments))); | ||
}; | ||
}; | ||
//# sourceMappingURL=es5.js.map |
{ | ||
"name": "intl-messageformat", | ||
"version": "1.0.0-rc-3", | ||
"version": "1.0.0-rc-4", | ||
"description": "implementation of the ECMA 402 proposal for MessageFormat", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
@@ -78,7 +78,3 @@ /* | ||
Compiler.prototype.compileArgument = function (element) { | ||
var format = element.format, | ||
formats = this.formats, | ||
locales = this.locales, | ||
pluralFn = this.pluralFn, | ||
options; | ||
var format = element.format; | ||
@@ -89,2 +85,7 @@ if (!format) { | ||
var formats = this.formats, | ||
locales = this.locales, | ||
pluralFn = this.pluralFn, | ||
options; | ||
switch (format.type) { | ||
@@ -91,0 +92,0 @@ case 'numberFormat': |
@@ -10,3 +10,3 @@ /* | ||
import {extend, hop} from './utils'; | ||
import {defineProperty, objCreate, fnBind} from './es5'; | ||
import {defineProperty, objCreate} from './es5'; | ||
import Compiler from './compiler'; | ||
@@ -37,12 +37,13 @@ import parser from 'intl-messageformat-parser'; | ||
// Define the `pattern` property, a compiled pattern that is highly | ||
// optimized for repeated `format()` invocations. **Note:** This passes the | ||
// `locales` set provided to the constructor instead of just the resolved | ||
// locale. | ||
// Compile the `ast` to a pattern that is highly optimized for repeated | ||
// `format()` invocations. **Note:** This passes the `locales` set provided | ||
// to the constructor instead of just the resolved locale. | ||
var pattern = this._compilePattern(ast, locales, formats, pluralFn); | ||
defineProperty(this, '_pattern', {value: pattern}); | ||
// Bind `format()` method to `this` so it can be passed by reference like | ||
// "Bind" `format()` method to `this` so it can be passed by reference like | ||
// the other `Intl` APIs. | ||
this.format = fnBind.call(this.format, this); | ||
var messageFormat = this; | ||
this.format = function (values) { | ||
return messageFormat._format(pattern, values); | ||
}; | ||
} | ||
@@ -168,6 +169,2 @@ | ||
MessageFormat.prototype.format = function (values) { | ||
return this._format(this._pattern, values); | ||
}; | ||
MessageFormat.prototype.resolvedOptions = function () { | ||
@@ -174,0 +171,0 @@ // TODO: Provide anything else? |
@@ -11,3 +11,3 @@ /* | ||
export {defineProperty, objCreate, fnBind}; | ||
export {defineProperty, objCreate}; | ||
@@ -49,10 +49,1 @@ // Purposely using the same implementation as the Intl.js `Intl` polyfill. | ||
}; | ||
var fnBind = Function.prototype.bind || function (thisObj) { | ||
var fn = this, | ||
args = [].slice.call(arguments, 1); | ||
return function () { | ||
fn.apply(thisObj, args.concat([].slice.call(arguments))); | ||
}; | ||
}; |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
527524
3304