How to use code_points method in wpt

Best JavaScript code snippet using wpt

pt.js

Source:pt.js Github

copy

Full Screen

1/*2// Copyright 2012 Twitter, Inc3// http://www.apache.org/licenses/LICENSE-2.04// TwitterCLDR (JavaScript) v2.1.05// Authors: Cameron Dutro [@camertron]6 Kirill Lashuk [@KL_7]7 portions by Sven Fuchs [@svenfuchs]8// Homepage: https://twitter.com9// Description: Provides date, time, number, and list formatting functionality for various Twitter-supported locales in Javascript.10*/11/*-module-*/12/*_lib/twitter_cldr_*/13(function() {14 var TwitterCldr, key, obj, root,15 __hasProp = {}.hasOwnProperty,16 __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; };17 TwitterCldr = {};18 TwitterCldr.is_rtl = false;19 TwitterCldr.Utilities = (function() {20 function Utilities() {}21 Utilities.from_char_code = function(code_point) {22 if (code_point > 0xFFFF) {23 code_point -= 0x10000;24 return String.fromCharCode(0xD800 + (code_point >> 10), 0xDC00 + (code_point & 0x3FF));25 } else {26 return String.fromCharCode(code_point);27 }28 };29 Utilities.char_code_at = function(str, idx) {30 var code, end, hi, li, low, surrogatePairs;31 str += '';32 end = str.length;33 surrogatePairs = /[\uD800-\uDBFF][\uDC00-\uDFFF]/g;34 while (surrogatePairs.exec(str) !== null) {35 li = surrogatePairs.lastIndex;36 if (li - 2 < idx) {37 idx += 1;38 } else {39 break;40 }41 }42 if ((idx >= end) || (idx < 0)) {43 return NaN;44 }45 code = str.charCodeAt(idx);46 if ((0xD800 <= code) && (code <= 0xDBFF)) {47 hi = code;48 low = str.charCodeAt(idx + 1);49 return ((hi - 0xD800) * 0x400) + (low - 0xDC00) + 0x10000;50 }51 return code;52 };53 Utilities.unpack_string = function(str) {54 var code_point, idx, result, _i, _ref;55 result = [];56 for (idx = _i = 0, _ref = str.length; 0 <= _ref ? _i < _ref : _i > _ref; idx = 0 <= _ref ? ++_i : --_i) {57 code_point = this.char_code_at(str, idx);58 if (!code_point) {59 break;60 }61 result.push(code_point);62 }63 return result;64 };65 Utilities.pack_array = function(char_arr) {66 var cur_char;67 return ((function() {68 var _i, _len, _results;69 _results = [];70 for (_i = 0, _len = char_arr.length; _i < _len; _i++) {71 cur_char = char_arr[_i];72 _results.push(this.from_char_code(cur_char));73 }74 return _results;75 }).call(this)).join("");76 };77 Utilities.arraycopy = function(orig, orig_index, dest, dest_index, length) {78 var count, elem, _i, _len, _ref;79 _ref = orig.slice(orig_index, orig_index + length);80 for (count = _i = 0, _len = _ref.length; _i < _len; count = ++_i) {81 elem = _ref[count];82 dest[dest_index + count] = elem;83 }84 };85 Utilities.max = function(arr) {86 var elem, i, max, start_index, _i, _j, _len, _ref;87 max = null;88 for (start_index = _i = 0, _len = arr.length; _i < _len; start_index = ++_i) {89 elem = arr[start_index];90 if (elem != null) {91 max = elem;92 break;93 }94 }95 for (i = _j = start_index, _ref = arr.length; start_index <= _ref ? _j <= _ref : _j >= _ref; i = start_index <= _ref ? ++_j : --_j) {96 if (arr[i] > max) {97 max = arr[i];98 }99 }100 return max;101 };102 Utilities.min = function(arr) {103 var elem, i, min, start_index, _i, _j, _len, _ref;104 min = null;105 for (start_index = _i = 0, _len = arr.length; _i < _len; start_index = ++_i) {106 elem = arr[start_index];107 if (elem != null) {108 min = elem;109 break;110 }111 }112 for (i = _j = start_index, _ref = arr.length; start_index <= _ref ? _j <= _ref : _j >= _ref; i = start_index <= _ref ? ++_j : --_j) {113 if (arr[i] < min) {114 min = arr[i];115 }116 }117 return min;118 };119 Utilities.is_even = function(num) {120 return num % 2 === 0;121 };122 Utilities.is_odd = function(num) {123 return num % 2 === 1;124 };125 return Utilities;126 })();127 TwitterCldr.PluralRules = (function() {128 function PluralRules() {}129 PluralRules.rules = {"keys": ["one","other"], "rule": function(n) { return (function() { if (n == 1) { return "one" } else { return "other" } })(); }};130 PluralRules.all = function() {131 return this.rules.keys;132 };133 PluralRules.rule_for = function(number) {134 try {135 return this.rules.rule(number);136 } catch (error) {137 return "other";138 }139 };140 return PluralRules;141 })();142 TwitterCldr.TimespanFormatter = (function() {143 function TimespanFormatter() {144 this.approximate_multiplier = 0.75;145 this.default_type = "default";146 this.tokens = {"ago":{"second":{"default":{"one":[{"value":"Há ","type":"plaintext"},{"value":"{0}","type":"placeholder"},{"value":" segundo","type":"plaintext"}],"other":[{"value":"Há ","type":"plaintext"},{"value":"{0}","type":"placeholder"},{"value":" segundos","type":"plaintext"}]}},"minute":{"default":{"one":[{"value":"Há ","type":"plaintext"},{"value":"{0}","type":"placeholder"},{"value":" minuto","type":"plaintext"}],"other":[{"value":"Há ","type":"plaintext"},{"value":"{0}","type":"placeholder"},{"value":" minutos","type":"plaintext"}]}},"hour":{"default":{"one":[{"value":"Há ","type":"plaintext"},{"value":"{0}","type":"placeholder"},{"value":" hora","type":"plaintext"}],"other":[{"value":"Há ","type":"plaintext"},{"value":"{0}","type":"placeholder"},{"value":" horas","type":"plaintext"}]}},"day":{"default":{"one":[{"value":"Há ","type":"plaintext"},{"value":"{0}","type":"placeholder"},{"value":" dia","type":"plaintext"}],"other":[{"value":"Há ","type":"plaintext"},{"value":"{0}","type":"placeholder"},{"value":" dias","type":"plaintext"}]}},"week":{"default":{"one":[{"value":"Há ","type":"plaintext"},{"value":"{0}","type":"placeholder"},{"value":" semana","type":"plaintext"}],"other":[{"value":"Há ","type":"plaintext"},{"value":"{0}","type":"placeholder"},{"value":" semanas","type":"plaintext"}]}},"month":{"default":{"one":[{"value":"Há ","type":"plaintext"},{"value":"{0}","type":"placeholder"},{"value":" mês","type":"plaintext"}],"other":[{"value":"Há ","type":"plaintext"},{"value":"{0}","type":"placeholder"},{"value":" meses","type":"plaintext"}]}},"year":{"default":{"one":[{"value":"Há ","type":"plaintext"},{"value":"{0}","type":"placeholder"},{"value":" ano","type":"plaintext"}],"other":[{"value":"Há ","type":"plaintext"},{"value":"{0}","type":"placeholder"},{"value":" anos","type":"plaintext"}]}}},"until":{"second":{"default":{"one":[{"value":"Dentro de ","type":"plaintext"},{"value":"{0}","type":"placeholder"},{"value":" segundo","type":"plaintext"}],"other":[{"value":"Dentro de ","type":"plaintext"},{"value":"{0}","type":"placeholder"},{"value":" segundos","type":"plaintext"}]}},"minute":{"default":{"one":[{"value":"Dentro de ","type":"plaintext"},{"value":"{0}","type":"placeholder"},{"value":" minuto","type":"plaintext"}],"other":[{"value":"Dentro de ","type":"plaintext"},{"value":"{0}","type":"placeholder"},{"value":" minutos","type":"plaintext"}]}},"hour":{"default":{"one":[{"value":"Dentro de ","type":"plaintext"},{"value":"{0}","type":"placeholder"},{"value":" hora","type":"plaintext"}],"other":[{"value":"Dentro de ","type":"plaintext"},{"value":"{0}","type":"placeholder"},{"value":" horas","type":"plaintext"}]}},"day":{"default":{"one":[{"value":"Dentro de ","type":"plaintext"},{"value":"{0}","type":"placeholder"},{"value":" dia","type":"plaintext"}],"other":[{"value":"Dentro de ","type":"plaintext"},{"value":"{0}","type":"placeholder"},{"value":" dias","type":"plaintext"}]}},"week":{"default":{"one":[{"value":"Dentro de ","type":"plaintext"},{"value":"{0}","type":"placeholder"},{"value":" semana","type":"plaintext"}],"other":[{"value":"Dentro de ","type":"plaintext"},{"value":"{0}","type":"placeholder"},{"value":" semanas","type":"plaintext"}]}},"month":{"default":{"one":[{"value":"Dentro de ","type":"plaintext"},{"value":"{0}","type":"placeholder"},{"value":" mês","type":"plaintext"}],"other":[{"value":"Dentro de ","type":"plaintext"},{"value":"{0}","type":"placeholder"},{"value":" meses","type":"plaintext"}]}},"year":{"default":{"one":[{"value":"Dentro de ","type":"plaintext"},{"value":"{0}","type":"placeholder"},{"value":" ano","type":"plaintext"}],"other":[{"value":"Dentro de ","type":"plaintext"},{"value":"{0}","type":"placeholder"},{"value":" anos","type":"plaintext"}]}}},"none":{"second":{"default":{"one":[{"value":"{0}","type":"placeholder"},{"value":" segundo","type":"plaintext"}],"other":[{"value":"{0}","type":"placeholder"},{"value":" segundos","type":"plaintext"}]},"short":{"one":[{"value":"{0}","type":"placeholder"},{"value":" seg","type":"plaintext"}],"other":[{"value":"{0}","type":"placeholder"},{"value":" seg","type":"plaintext"}]},"abbreviated":{"one":[{"value":"{0}","type":"placeholder"},{"value":" s","type":"plaintext"}],"other":[{"value":"{0}","type":"placeholder"},{"value":" s","type":"plaintext"}]}},"minute":{"default":{"one":[{"value":"{0}","type":"placeholder"},{"value":" minuto","type":"plaintext"}],"other":[{"value":"{0}","type":"placeholder"},{"value":" minutos","type":"plaintext"}]},"short":{"one":[{"value":"{0}","type":"placeholder"},{"value":" min","type":"plaintext"}],"other":[{"value":"{0}","type":"placeholder"},{"value":" min","type":"plaintext"}]},"abbreviated":{"one":[{"value":"{0}","type":"placeholder"},{"value":" m","type":"plaintext"}],"other":[{"value":"{0}","type":"placeholder"},{"value":" m","type":"plaintext"}]}},"hour":{"default":{"one":[{"value":"{0}","type":"placeholder"},{"value":" hora","type":"plaintext"}],"other":[{"value":"{0}","type":"placeholder"},{"value":" horas","type":"plaintext"}]},"short":{"one":[{"value":"{0}","type":"placeholder"},{"value":" h","type":"plaintext"}],"other":[{"value":"{0}","type":"placeholder"},{"value":" h","type":"plaintext"}]},"abbreviated":{"one":[{"value":"{0}","type":"placeholder"},{"value":" h","type":"plaintext"}],"other":[{"value":"{0}","type":"placeholder"},{"value":" h","type":"plaintext"}]}},"day":{"default":{"one":[{"value":"{0}","type":"placeholder"},{"value":" dia","type":"plaintext"}],"other":[{"value":"{0}","type":"placeholder"},{"value":" dias","type":"plaintext"}]},"short":{"one":[{"value":"{0}","type":"placeholder"},{"value":" dia","type":"plaintext"}],"other":[{"value":"{0}","type":"placeholder"},{"value":" dias","type":"plaintext"}]},"abbreviated":{"one":[{"value":"{0}","type":"placeholder"},{"value":" d","type":"plaintext"}],"other":[{"value":"{0}","type":"placeholder"},{"value":" d","type":"plaintext"}]}},"week":{"default":{"one":[{"value":"{0}","type":"placeholder"},{"value":" semana","type":"plaintext"}],"other":[{"value":"{0}","type":"placeholder"},{"value":" semanas","type":"plaintext"}]},"short":{"one":[{"value":"{0}","type":"placeholder"},{"value":" sem.","type":"plaintext"}],"other":[{"value":"{0}","type":"placeholder"},{"value":" sem.","type":"plaintext"}]}},"month":{"default":{"one":[{"value":"{0}","type":"placeholder"},{"value":" mês","type":"plaintext"}],"other":[{"value":"{0}","type":"placeholder"},{"value":" meses","type":"plaintext"}]},"short":{"one":[{"value":"{0}","type":"placeholder"},{"value":" mês","type":"plaintext"}],"other":[{"value":"{0}","type":"placeholder"},{"value":" meses","type":"plaintext"}]}},"year":{"default":{"one":[{"value":"{0}","type":"placeholder"},{"value":" ano","type":"plaintext"}],"other":[{"value":"{0}","type":"placeholder"},{"value":" anos","type":"plaintext"}]},"short":{"one":[{"value":"{0}","type":"placeholder"},{"value":" ano","type":"plaintext"}],"other":[{"value":"{0}","type":"placeholder"},{"value":" anos","type":"plaintext"}]}}}};147 this.time_in_seconds = {148 "second": 1,149 "minute": 60,150 "hour": 3600,151 "day": 86400,152 "week": 604800,153 "month": 2629743.83,154 "year": 31556926155 };156 }157 TimespanFormatter.prototype.format = function(seconds, fmt_options) {158 var key, number, obj, options, strings, token;159 if (fmt_options == null) {160 fmt_options = {};161 }162 options = {};163 for (key in fmt_options) {164 obj = fmt_options[key];165 options[key] = obj;166 }167 options["direction"] || (options["direction"] = (seconds < 0 ? "ago" : "until"));168 if (options["unit"] === null || options["unit"] === void 0) {169 options["unit"] = this.calculate_unit(Math.abs(seconds), options);170 }171 options["type"] || (options["type"] = this.default_type);172 options["number"] = this.calculate_time(Math.abs(seconds), options["unit"]);173 number = this.calculate_time(Math.abs(seconds), options["unit"]);174 options["rule"] = TwitterCldr.PluralRules.rule_for(number);175 strings = (function() {176 var _i, _len, _ref, _results;177 _ref = this.tokens[options["direction"]][options["unit"]][options["type"]][options["rule"]];178 _results = [];179 for (_i = 0, _len = _ref.length; _i < _len; _i++) {180 token = _ref[_i];181 _results.push(token.value);182 }183 return _results;184 }).call(this);185 return strings.join("").replace(/\{[0-9]\}/, number.toString());186 };187 TimespanFormatter.prototype.calculate_unit = function(seconds, unit_options) {188 var key, multiplier, obj, options;189 if (unit_options == null) {190 unit_options = {};191 }192 options = {};193 for (key in unit_options) {194 obj = unit_options[key];195 options[key] = obj;196 }197 if (options.approximate == null) {198 options["approximate"] = false;199 }200 multiplier = options.approximate ? this.approximate_multiplier : 1;201 if (seconds < (this.time_in_seconds.minute * multiplier)) {202 return "second";203 } else if (seconds < (this.time_in_seconds.hour * multiplier)) {204 return "minute";205 } else if (seconds < (this.time_in_seconds.day * multiplier)) {206 return "hour";207 } else if (seconds < (this.time_in_seconds.week * multiplier)) {208 return "day";209 } else if (seconds < (this.time_in_seconds.month * multiplier)) {210 return "week";211 } else if (seconds < (this.time_in_seconds.year * multiplier)) {212 return "month";213 } else {214 return "year";215 }216 };217 TimespanFormatter.prototype.calculate_time = function(seconds, unit) {218 return Math.round(seconds / this.time_in_seconds[unit]);219 };220 return TimespanFormatter;221 })();222 TwitterCldr.DateTimeFormatter = (function() {223 function DateTimeFormatter() {224 this.tokens = {"date_time":{"default":[{"value":"dd","type":"pattern"},{"value":"/","type":"plaintext"},{"value":"MM","type":"pattern"},{"value":"/","type":"plaintext"},{"value":"yyyy","type":"pattern"},{"value":" ","type":"plaintext"},{"value":"HH","type":"pattern"},{"value":":","type":"plaintext"},{"value":"mm","type":"pattern"},{"value":":","type":"plaintext"},{"value":"ss","type":"pattern"}],"full":[{"value":"EEEE","type":"pattern"},{"value":", ","type":"plaintext"},{"value":"d","type":"pattern"},{"value":" ","type":"plaintext"},{"value":"'de'","type":"plaintext"},{"value":" ","type":"plaintext"},{"value":"MMMM","type":"pattern"},{"value":" ","type":"plaintext"},{"value":"'de'","type":"plaintext"},{"value":" ","type":"plaintext"},{"value":"y","type":"pattern"},{"value":" ","type":"plaintext"},{"value":"HH","type":"pattern"},{"value":":","type":"plaintext"},{"value":"mm","type":"pattern"},{"value":":","type":"plaintext"},{"value":"ss","type":"pattern"},{"value":" ","type":"plaintext"},{"value":"zzzz","type":"pattern"}],"long":[{"value":"d","type":"pattern"},{"value":" ","type":"plaintext"},{"value":"'de'","type":"plaintext"},{"value":" ","type":"plaintext"},{"value":"MMMM","type":"pattern"},{"value":" ","type":"plaintext"},{"value":"'de'","type":"plaintext"},{"value":" ","type":"plaintext"},{"value":"y","type":"pattern"},{"value":" ","type":"plaintext"},{"value":"HH","type":"pattern"},{"value":":","type":"plaintext"},{"value":"mm","type":"pattern"},{"value":":","type":"plaintext"},{"value":"ss","type":"pattern"},{"value":" ","type":"plaintext"},{"value":"z","type":"pattern"}],"medium":[{"value":"dd","type":"pattern"},{"value":"/","type":"plaintext"},{"value":"MM","type":"pattern"},{"value":"/","type":"plaintext"},{"value":"yyyy","type":"pattern"},{"value":" ","type":"plaintext"},{"value":"HH","type":"pattern"},{"value":":","type":"plaintext"},{"value":"mm","type":"pattern"},{"value":":","type":"plaintext"},{"value":"ss","type":"pattern"}],"short":[{"value":"dd","type":"pattern"},{"value":"/","type":"plaintext"},{"value":"MM","type":"pattern"},{"value":"/","type":"plaintext"},{"value":"yy","type":"pattern"},{"value":" ","type":"plaintext"},{"value":"HH","type":"pattern"},{"value":":","type":"plaintext"},{"value":"mm","type":"pattern"}],"additional":{"Ed":[{"value":"E","type":"pattern"},{"value":", ","type":"plaintext"},{"value":"d","type":"pattern"}],"H":[{"value":"HH","type":"pattern"}],"HHmm":[{"value":"HH","type":"pattern"},{"value":":","type":"plaintext"},{"value":"mm","type":"pattern"}],"HHmmss":[{"value":"HH","type":"pattern"},{"value":":","type":"plaintext"},{"value":"mm","type":"pattern"},{"value":":","type":"plaintext"},{"value":"ss","type":"pattern"}],"Hm":[{"value":"HH","type":"pattern"},{"value":":","type":"plaintext"},{"value":"mm","type":"pattern"}],"Hms":[{"value":"HH","type":"pattern"},{"value":":","type":"plaintext"},{"value":"mm","type":"pattern"},{"value":":","type":"plaintext"},{"value":"ss","type":"pattern"}],"M":[{"value":"L","type":"pattern"}],"MEd":[{"value":"E","type":"pattern"},{"value":", ","type":"plaintext"},{"value":"dd","type":"pattern"},{"value":"/","type":"plaintext"},{"value":"MM","type":"pattern"}],"MMM":[{"value":"LLL","type":"pattern"}],"MMMEd":[{"value":"E","type":"pattern"},{"value":", ","type":"plaintext"},{"value":"d","type":"pattern"},{"value":" ","type":"plaintext"},{"value":"'de'","type":"plaintext"},{"value":" ","type":"plaintext"},{"value":"MMM","type":"pattern"}],"MMMd":[{"value":"d","type":"pattern"},{"value":" ","type":"plaintext"},{"value":"'de'","type":"plaintext"},{"value":" ","type":"plaintext"},{"value":"MMM","type":"pattern"}],"MMdd":[{"value":"dd","type":"pattern"},{"value":"/","type":"plaintext"},{"value":"MM","type":"pattern"}],"Md":[{"value":"d","type":"pattern"},{"value":"/","type":"plaintext"},{"value":"M","type":"pattern"}],"d":[{"value":"d","type":"pattern"}],"h":[{"value":"h","type":"pattern"},{"value":" ","type":"plaintext"},{"value":"a","type":"pattern"}],"hm":[{"value":"h","type":"pattern"},{"value":":","type":"plaintext"},{"value":"mm","type":"pattern"},{"value":" ","type":"plaintext"},{"value":"a","type":"pattern"}],"hms":[{"value":"h","type":"pattern"},{"value":":","type":"plaintext"},{"value":"mm","type":"pattern"},{"value":":","type":"plaintext"},{"value":"ss","type":"pattern"},{"value":" ","type":"plaintext"},{"value":"a","type":"pattern"}],"ms":[{"value":"mm","type":"pattern"},{"value":":","type":"plaintext"},{"value":"ss","type":"pattern"}],"y":[{"value":"y","type":"pattern"}],"yM":[{"value":"MM","type":"pattern"},{"value":"/","type":"plaintext"},{"value":"yyyy","type":"pattern"}],"yMEd":[{"value":"E","type":"pattern"},{"value":", ","type":"plaintext"},{"value":"dd","type":"pattern"},{"value":"/","type":"plaintext"},{"value":"MM","type":"pattern"},{"value":"/","type":"plaintext"},{"value":"yyyy","type":"pattern"}],"yMMM":[{"value":"MMM","type":"pattern"},{"value":" ","type":"plaintext"},{"value":"'de'","type":"plaintext"},{"value":" ","type":"plaintext"},{"value":"y","type":"pattern"}],"yMMMEd":[{"value":"E","type":"pattern"},{"value":", ","type":"plaintext"},{"value":"d","type":"pattern"},{"value":" ","type":"plaintext"},{"value":"'de'","type":"plaintext"},{"value":" ","type":"plaintext"},{"value":"MMM","type":"pattern"},{"value":" ","type":"plaintext"},{"value":"'de'","type":"plaintext"},{"value":" ","type":"plaintext"},{"value":"y","type":"pattern"}],"yMMMd":[{"value":"d","type":"pattern"},{"value":" ","type":"plaintext"},{"value":"'de'","type":"plaintext"},{"value":" ","type":"plaintext"},{"value":"MMM","type":"pattern"},{"value":" ","type":"plaintext"},{"value":"'de'","type":"plaintext"},{"value":" ","type":"plaintext"},{"value":"y","type":"pattern"}],"yMd":[{"value":"dd","type":"pattern"},{"value":"/","type":"plaintext"},{"value":"MM","type":"pattern"},{"value":"/","type":"plaintext"},{"value":"yyyy","type":"pattern"}],"yQQQ":[{"value":"y","type":"pattern"},{"value":" ","type":"plaintext"},{"value":"QQQ","type":"pattern"}],"yQQQQ":[{"value":"y","type":"pattern"},{"value":" ","type":"plaintext"},{"value":"QQQQ","type":"pattern"}],"yyMM":[{"value":"MM","type":"pattern"},{"value":"/","type":"plaintext"},{"value":"yy","type":"pattern"}],"yyMMM":[{"value":"MMM","type":"pattern"},{"value":" ","type":"plaintext"},{"value":"'de'","type":"plaintext"},{"value":" ","type":"plaintext"},{"value":"yy","type":"pattern"}],"yyMMMEd":[{"value":"E","type":"pattern"},{"value":", ","type":"plaintext"},{"value":"d","type":"pattern"},{"value":" ","type":"plaintext"},{"value":"'de'","type":"plaintext"},{"value":" ","type":"plaintext"},{"value":"MMM","type":"pattern"},{"value":" ","type":"plaintext"},{"value":"'de'","type":"plaintext"},{"value":" ","type":"plaintext"},{"value":"yy","type":"pattern"}],"yyMMMd":[{"value":"d","type":"pattern"},{"value":" ","type":"plaintext"},{"value":"'de'","type":"plaintext"},{"value":" ","type":"plaintext"},{"value":"MMM","type":"pattern"},{"value":" ","type":"plaintext"},{"value":"'de'","type":"plaintext"},{"value":" ","type":"plaintext"},{"value":"yy","type":"pattern"}],"yyQQQ":[{"value":"QQQ","type":"pattern"},{"value":" ","type":"plaintext"},{"value":"yy","type":"pattern"}],"yyyyMM":[{"value":"MM","type":"pattern"},{"value":"/","type":"plaintext"},{"value":"yyyy","type":"pattern"}],"yyyyMMM":[{"value":"MMM","type":"pattern"},{"value":" ","type":"plaintext"},{"value":"'de'","type":"plaintext"},{"value":" ","type":"plaintext"},{"value":"y","type":"pattern"}]}},"time":{"default":[{"value":"HH","type":"pattern"},{"value":":","type":"plaintext"},{"value":"mm","type":"pattern"},{"value":":","type":"plaintext"},{"value":"ss","type":"pattern"}],"full":[{"value":"HH","type":"pattern"},{"value":":","type":"plaintext"},{"value":"mm","type":"pattern"},{"value":":","type":"plaintext"},{"value":"ss","type":"pattern"},{"value":" ","type":"plaintext"},{"value":"zzzz","type":"pattern"}],"long":[{"value":"HH","type":"pattern"},{"value":":","type":"plaintext"},{"value":"mm","type":"pattern"},{"value":":","type":"plaintext"},{"value":"ss","type":"pattern"},{"value":" ","type":"plaintext"},{"value":"z","type":"pattern"}],"medium":[{"value":"HH","type":"pattern"},{"value":":","type":"plaintext"},{"value":"mm","type":"pattern"},{"value":":","type":"plaintext"},{"value":"ss","type":"pattern"}],"short":[{"value":"HH","type":"pattern"},{"value":":","type":"plaintext"},{"value":"mm","type":"pattern"}],"additional":{"Ed":[{"value":"E","type":"pattern"},{"value":", ","type":"plaintext"},{"value":"d","type":"pattern"}],"H":[{"value":"HH","type":"pattern"}],"HHmm":[{"value":"HH","type":"pattern"},{"value":":","type":"plaintext"},{"value":"mm","type":"pattern"}],"HHmmss":[{"value":"HH","type":"pattern"},{"value":":","type":"plaintext"},{"value":"mm","type":"pattern"},{"value":":","type":"plaintext"},{"value":"ss","type":"pattern"}],"Hm":[{"value":"HH","type":"pattern"},{"value":":","type":"plaintext"},{"value":"mm","type":"pattern"}],"Hms":[{"value":"HH","type":"pattern"},{"value":":","type":"plaintext"},{"value":"mm","type":"pattern"},{"value":":","type":"plaintext"},{"value":"ss","type":"pattern"}],"M":[{"value":"L","type":"pattern"}],"MEd":[{"value":"E","type":"pattern"},{"value":", ","type":"plaintext"},{"value":"dd","type":"pattern"},{"value":"/","type":"plaintext"},{"value":"MM","type":"pattern"}],"MMM":[{"value":"LLL","type":"pattern"}],"MMMEd":[{"value":"E","type":"pattern"},{"value":", ","type":"plaintext"},{"value":"d","type":"pattern"},{"value":" ","type":"plaintext"},{"value":"'de'","type":"plaintext"},{"value":" ","type":"plaintext"},{"value":"MMM","type":"pattern"}],"MMMd":[{"value":"d","type":"pattern"},{"value":" ","type":"plaintext"},{"value":"'de'","type":"plaintext"},{"value":" ","type":"plaintext"},{"value":"MMM","type":"pattern"}],"MMdd":[{"value":"dd","type":"pattern"},{"value":"/","type":"plaintext"},{"value":"MM","type":"pattern"}],"Md":[{"value":"d","type":"pattern"},{"value":"/","type":"plaintext"},{"value":"M","type":"pattern"}],"d":[{"value":"d","type":"pattern"}],"h":[{"value":"h","type":"pattern"},{"value":" ","type":"plaintext"},{"value":"a","type":"pattern"}],"hm":[{"value":"h","type":"pattern"},{"value":":","type":"plaintext"},{"value":"mm","type":"pattern"},{"value":" ","type":"plaintext"},{"value":"a","type":"pattern"}],"hms":[{"value":"h","type":"pattern"},{"value":":","type":"plaintext"},{"value":"mm","type":"pattern"},{"value":":","type":"plaintext"},{"value":"ss","type":"pattern"},{"value":" ","type":"plaintext"},{"value":"a","type":"pattern"}],"ms":[{"value":"mm","type":"pattern"},{"value":":","type":"plaintext"},{"value":"ss","type":"pattern"}],"y":[{"value":"y","type":"pattern"}],"yM":[{"value":"MM","type":"pattern"},{"value":"/","type":"plaintext"},{"value":"yyyy","type":"pattern"}],"yMEd":[{"value":"E","type":"pattern"},{"value":", ","type":"plaintext"},{"value":"dd","type":"pattern"},{"value":"/","type":"plaintext"},{"value":"MM","type":"pattern"},{"value":"/","type":"plaintext"},{"value":"yyyy","type":"pattern"}],"yMMM":[{"value":"MMM","type":"pattern"},{"value":" ","type":"plaintext"},{"value":"'de'","type":"plaintext"},{"value":" ","type":"plaintext"},{"value":"y","type":"pattern"}],"yMMMEd":[{"value":"E","type":"pattern"},{"value":", ","type":"plaintext"},{"value":"d","type":"pattern"},{"value":" ","type":"plaintext"},{"value":"'de'","type":"plaintext"},{"value":" ","type":"plaintext"},{"value":"MMM","type":"pattern"},{"value":" ","type":"plaintext"},{"value":"'de'","type":"plaintext"},{"value":" ","type":"plaintext"},{"value":"y","type":"pattern"}],"yMMMd":[{"value":"d","type":"pattern"},{"value":" ","type":"plaintext"},{"value":"'de'","type":"plaintext"},{"value":" ","type":"plaintext"},{"value":"MMM","type":"pattern"},{"value":" ","type":"plaintext"},{"value":"'de'","type":"plaintext"},{"value":" ","type":"plaintext"},{"value":"y","type":"pattern"}],"yMd":[{"value":"dd","type":"pattern"},{"value":"/","type":"plaintext"},{"value":"MM","type":"pattern"},{"value":"/","type":"plaintext"},{"value":"yyyy","type":"pattern"}],"yQQQ":[{"value":"y","type":"pattern"},{"value":" ","type":"plaintext"},{"value":"QQQ","type":"pattern"}],"yQQQQ":[{"value":"y","type":"pattern"},{"value":" ","type":"plaintext"},{"value":"QQQQ","type":"pattern"}],"yyMM":[{"value":"MM","type":"pattern"},{"value":"/","type":"plaintext"},{"value":"yy","type":"pattern"}],"yyMMM":[{"value":"MMM","type":"pattern"},{"value":" ","type":"plaintext"},{"value":"'de'","type":"plaintext"},{"value":" ","type":"plaintext"},{"value":"yy","type":"pattern"}],"yyMMMEd":[{"value":"E","type":"pattern"},{"value":", ","type":"plaintext"},{"value":"d","type":"pattern"},{"value":" ","type":"plaintext"},{"value":"'de'","type":"plaintext"},{"value":" ","type":"plaintext"},{"value":"MMM","type":"pattern"},{"value":" ","type":"plaintext"},{"value":"'de'","type":"plaintext"},{"value":" ","type":"plaintext"},{"value":"yy","type":"pattern"}],"yyMMMd":[{"value":"d","type":"pattern"},{"value":" ","type":"plaintext"},{"value":"'de'","type":"plaintext"},{"value":" ","type":"plaintext"},{"value":"MMM","type":"pattern"},{"value":" ","type":"plaintext"},{"value":"'de'","type":"plaintext"},{"value":" ","type":"plaintext"},{"value":"yy","type":"pattern"}],"yyQQQ":[{"value":"QQQ","type":"pattern"},{"value":" ","type":"plaintext"},{"value":"yy","type":"pattern"}],"yyyyMM":[{"value":"MM","type":"pattern"},{"value":"/","type":"plaintext"},{"value":"yyyy","type":"pattern"}],"yyyyMMM":[{"value":"MMM","type":"pattern"},{"value":" ","type":"plaintext"},{"value":"'de'","type":"plaintext"},{"value":" ","type":"plaintext"},{"value":"y","type":"pattern"}]}},"date":{"default":[{"value":"dd","type":"pattern"},{"value":"/","type":"plaintext"},{"value":"MM","type":"pattern"},{"value":"/","type":"plaintext"},{"value":"yyyy","type":"pattern"}],"full":[{"value":"EEEE","type":"pattern"},{"value":", ","type":"plaintext"},{"value":"d","type":"pattern"},{"value":" ","type":"plaintext"},{"value":"'de'","type":"plaintext"},{"value":" ","type":"plaintext"},{"value":"MMMM","type":"pattern"},{"value":" ","type":"plaintext"},{"value":"'de'","type":"plaintext"},{"value":" ","type":"plaintext"},{"value":"y","type":"pattern"}],"long":[{"value":"d","type":"pattern"},{"value":" ","type":"plaintext"},{"value":"'de'","type":"plaintext"},{"value":" ","type":"plaintext"},{"value":"MMMM","type":"pattern"},{"value":" ","type":"plaintext"},{"value":"'de'","type":"plaintext"},{"value":" ","type":"plaintext"},{"value":"y","type":"pattern"}],"medium":[{"value":"dd","type":"pattern"},{"value":"/","type":"plaintext"},{"value":"MM","type":"pattern"},{"value":"/","type":"plaintext"},{"value":"yyyy","type":"pattern"}],"short":[{"value":"dd","type":"pattern"},{"value":"/","type":"plaintext"},{"value":"MM","type":"pattern"},{"value":"/","type":"plaintext"},{"value":"yy","type":"pattern"}],"additional":{"Ed":[{"value":"E","type":"pattern"},{"value":", ","type":"plaintext"},{"value":"d","type":"pattern"}],"H":[{"value":"HH","type":"pattern"}],"HHmm":[{"value":"HH","type":"pattern"},{"value":":","type":"plaintext"},{"value":"mm","type":"pattern"}],"HHmmss":[{"value":"HH","type":"pattern"},{"value":":","type":"plaintext"},{"value":"mm","type":"pattern"},{"value":":","type":"plaintext"},{"value":"ss","type":"pattern"}],"Hm":[{"value":"HH","type":"pattern"},{"value":":","type":"plaintext"},{"value":"mm","type":"pattern"}],"Hms":[{"value":"HH","type":"pattern"},{"value":":","type":"plaintext"},{"value":"mm","type":"pattern"},{"value":":","type":"plaintext"},{"value":"ss","type":"pattern"}],"M":[{"value":"L","type":"pattern"}],"MEd":[{"value":"E","type":"pattern"},{"value":", ","type":"plaintext"},{"value":"dd","type":"pattern"},{"value":"/","type":"plaintext"},{"value":"MM","type":"pattern"}],"MMM":[{"value":"LLL","type":"pattern"}],"MMMEd":[{"value":"E","type":"pattern"},{"value":", ","type":"plaintext"},{"value":"d","type":"pattern"},{"value":" ","type":"plaintext"},{"value":"'de'","type":"plaintext"},{"value":" ","type":"plaintext"},{"value":"MMM","type":"pattern"}],"MMMd":[{"value":"d","type":"pattern"},{"value":" ","type":"plaintext"},{"value":"'de'","type":"plaintext"},{"value":" ","type":"plaintext"},{"value":"MMM","type":"pattern"}],"MMdd":[{"value":"dd","type":"pattern"},{"value":"/","type":"plaintext"},{"value":"MM","type":"pattern"}],"Md":[{"value":"d","type":"pattern"},{"value":"/","type":"plaintext"},{"value":"M","type":"pattern"}],"d":[{"value":"d","type":"pattern"}],"h":[{"value":"h","type":"pattern"},{"value":" ","type":"plaintext"},{"value":"a","type":"pattern"}],"hm":[{"value":"h","type":"pattern"},{"value":":","type":"plaintext"},{"value":"mm","type":"pattern"},{"value":" ","type":"plaintext"},{"value":"a","type":"pattern"}],"hms":[{"value":"h","type":"pattern"},{"value":":","type":"plaintext"},{"value":"mm","type":"pattern"},{"value":":","type":"plaintext"},{"value":"ss","type":"pattern"},{"value":" ","type":"plaintext"},{"value":"a","type":"pattern"}],"ms":[{"value":"mm","type":"pattern"},{"value":":","type":"plaintext"},{"value":"ss","type":"pattern"}],"y":[{"value":"y","type":"pattern"}],"yM":[{"value":"MM","type":"pattern"},{"value":"/","type":"plaintext"},{"value":"yyyy","type":"pattern"}],"yMEd":[{"value":"E","type":"pattern"},{"value":", ","type":"plaintext"},{"value":"dd","type":"pattern"},{"value":"/","type":"plaintext"},{"value":"MM","type":"pattern"},{"value":"/","type":"plaintext"},{"value":"yyyy","type":"pattern"}],"yMMM":[{"value":"MMM","type":"pattern"},{"value":" ","type":"plaintext"},{"value":"'de'","type":"plaintext"},{"value":" ","type":"plaintext"},{"value":"y","type":"pattern"}],"yMMMEd":[{"value":"E","type":"pattern"},{"value":", ","type":"plaintext"},{"value":"d","type":"pattern"},{"value":" ","type":"plaintext"},{"value":"'de'","type":"plaintext"},{"value":" ","type":"plaintext"},{"value":"MMM","type":"pattern"},{"value":" ","type":"plaintext"},{"value":"'de'","type":"plaintext"},{"value":" ","type":"plaintext"},{"value":"y","type":"pattern"}],"yMMMd":[{"value":"d","type":"pattern"},{"value":" ","type":"plaintext"},{"value":"'de'","type":"plaintext"},{"value":" ","type":"plaintext"},{"value":"MMM","type":"pattern"},{"value":" ","type":"plaintext"},{"value":"'de'","type":"plaintext"},{"value":" ","type":"plaintext"},{"value":"y","type":"pattern"}],"yMd":[{"value":"dd","type":"pattern"},{"value":"/","type":"plaintext"},{"value":"MM","type":"pattern"},{"value":"/","type":"plaintext"},{"value":"yyyy","type":"pattern"}],"yQQQ":[{"value":"y","type":"pattern"},{"value":" ","type":"plaintext"},{"value":"QQQ","type":"pattern"}],"yQQQQ":[{"value":"y","type":"pattern"},{"value":" ","type":"plaintext"},{"value":"QQQQ","type":"pattern"}],"yyMM":[{"value":"MM","type":"pattern"},{"value":"/","type":"plaintext"},{"value":"yy","type":"pattern"}],"yyMMM":[{"value":"MMM","type":"pattern"},{"value":" ","type":"plaintext"},{"value":"'de'","type":"plaintext"},{"value":" ","type":"plaintext"},{"value":"yy","type":"pattern"}],"yyMMMEd":[{"value":"E","type":"pattern"},{"value":", ","type":"plaintext"},{"value":"d","type":"pattern"},{"value":" ","type":"plaintext"},{"value":"'de'","type":"plaintext"},{"value":" ","type":"plaintext"},{"value":"MMM","type":"pattern"},{"value":" ","type":"plaintext"},{"value":"'de'","type":"plaintext"},{"value":" ","type":"plaintext"},{"value":"yy","type":"pattern"}],"yyMMMd":[{"value":"d","type":"pattern"},{"value":" ","type":"plaintext"},{"value":"'de'","type":"plaintext"},{"value":" ","type":"plaintext"},{"value":"MMM","type":"pattern"},{"value":" ","type":"plaintext"},{"value":"'de'","type":"plaintext"},{"value":" ","type":"plaintext"},{"value":"yy","type":"pattern"}],"yyQQQ":[{"value":"QQQ","type":"pattern"},{"value":" ","type":"plaintext"},{"value":"yy","type":"pattern"}],"yyyyMM":[{"value":"MM","type":"pattern"},{"value":"/","type":"plaintext"},{"value":"yyyy","type":"pattern"}],"yyyyMMM":[{"value":"MMM","type":"pattern"},{"value":" ","type":"plaintext"},{"value":"'de'","type":"plaintext"},{"value":" ","type":"plaintext"},{"value":"y","type":"pattern"}]}}};225 this.weekday_keys = ["sun", "mon", "tue", "wed", "thu", "fri", "sat"];226 this.methods = {227 'G': 'era',228 'y': 'year',229 'Y': 'year_of_week_of_year',230 'Q': 'quarter',231 'q': 'quarter_stand_alone',232 'M': 'month',233 'L': 'month_stand_alone',234 'w': 'week_of_year',235 'W': 'week_of_month',236 'd': 'day',237 'D': 'day_of_month',238 'F': 'day_of_week_in_month',239 'E': 'weekday',240 'e': 'weekday_local',241 'c': 'weekday_local_stand_alone',242 'a': 'period',243 'h': 'hour',244 'H': 'hour',245 'K': 'hour',246 'k': 'hour',247 'm': 'minute',248 's': 'second',249 'S': 'second_fraction',250 'z': 'timezone',251 'Z': 'timezone',252 'v': 'timezone_generic_non_location',253 'V': 'timezone_metazone'254 };255 }256 DateTimeFormatter.prototype.format = function(obj, options) {257 var format_token, token, tokens,258 _this = this;259 format_token = function(token) {260 var result;261 result = "";262 switch (token.type) {263 case "pattern":264 return _this.result_for_token(token, obj);265 default:266 if (token.value.length > 0 && token.value[0] === "'" && token.value[token.value.length - 1] === "'") {267 return token.value.substring(1, token.value.length - 1);268 } else {269 return token.value;270 }271 }272 };273 tokens = this.get_tokens(obj, options);274 return ((function() {275 var _i, _len, _results;276 _results = [];277 for (_i = 0, _len = tokens.length; _i < _len; _i++) {278 token = tokens[_i];279 _results.push(format_token(token));280 }281 return _results;282 })()).join("");283 };284 DateTimeFormatter.prototype.get_tokens = function(obj, options) {285 var format, type;286 format = options.format || "date_time";287 type = options.type || "default";288 if (format === "additional") {289 return this.tokens["date_time"][format][this.additional_format_selector().find_closest(options.type)];290 } else {291 return this.tokens[format][type];292 }293 };294 DateTimeFormatter.prototype.result_for_token = function(token, date) {295 return this[this.methods[token.value[0]]](date, token.value, token.value.length);296 };297 DateTimeFormatter.prototype.additional_format_selector = function() {298 return new TwitterCldr.AdditionalDateFormatSelector(this.tokens["date_time"]["additional"]);299 };300 DateTimeFormatter.additional_formats = function() {301 return new TwitterCldr.DateTimeFormatter().additional_format_selector().patterns();302 };303 DateTimeFormatter.prototype.era = function(date, pattern, length) {304 var choices, index, result;305 switch (length) {306 case 0:307 choices = ["", ""];308 break;309 case 1:310 case 2:311 case 3:312 choices = TwitterCldr.Calendar.calendar["eras"]["abbr"];313 break;314 default:315 choices = TwitterCldr.Calendar.calendar["eras"]["name"];316 }317 index = date.getFullYear() < 0 ? 0 : 1;318 result = choices[index];319 if (result != null) {320 return result;321 } else {322 return this.era(date, pattern.slice(0, -1), length - 1);323 }324 };325 DateTimeFormatter.prototype.year = function(date, pattern, length) {326 var year;327 year = date.getFullYear().toString();328 if (length === 2) {329 if (year.length !== 1) {330 year = year.slice(-2);331 }332 }333 if (length > 1) {334 year = ("0000" + year).slice(-length);335 }336 return year;337 };338 DateTimeFormatter.prototype.year_of_week_of_year = function(date, pattern, length) {339 throw 'not implemented';340 };341 DateTimeFormatter.prototype.day_of_week_in_month = function(date, pattern, length) {342 throw 'not implemented';343 };344 DateTimeFormatter.prototype.quarter = function(date, pattern, length) {345 var quarter;346 quarter = ((date.getMonth() / 3) | 0) + 1;347 switch (length) {348 case 1:349 return quarter.toString();350 case 2:351 return ("0000" + quarter.toString()).slice(-length);352 case 3:353 return TwitterCldr.Calendar.calendar.quarters.format.abbreviated[quarter];354 case 4:355 return TwitterCldr.Calendar.calendar.quarters.format.wide[quarter];356 }357 };358 DateTimeFormatter.prototype.quarter_stand_alone = function(date, pattern, length) {359 var quarter;360 quarter = (date.getMonth() - 1) / 3 + 1;361 switch (length) {362 case 1:363 return quarter.toString();364 case 2:365 return ("0000" + quarter.toString()).slice(-length);366 case 3:367 throw 'not yet implemented (requires cldr\'s "multiple inheritance")';368 break;369 case 4:370 throw 'not yet implemented (requires cldr\'s "multiple inheritance")';371 break;372 case 5:373 return TwitterCldr.Calendar.calendar.quarters['stand-alone'].narrow[quarter];374 }375 };376 DateTimeFormatter.prototype.month = function(date, pattern, length) {377 var month_str;378 month_str = (date.getMonth() + 1).toString();379 switch (length) {380 case 1:381 return month_str;382 case 2:383 return ("0000" + month_str).slice(-length);384 case 3:385 return TwitterCldr.Calendar.calendar.months.format.abbreviated[month_str];386 case 4:387 return TwitterCldr.Calendar.calendar.months.format.wide[month_str];388 case 5:389 throw 'not yet implemented (requires cldr\'s "multiple inheritance")';390 break;391 default:392 throw "Unknown date format";393 }394 };395 DateTimeFormatter.prototype.month_stand_alone = function(date, pattern, length) {396 var month_str;397 month_str = (date.getMonth() + 1).toString();398 switch (length) {399 case 1:400 return month_str;401 case 2:402 return ("0000" + month_str).slice(-length);403 case 3:404 return TwitterCldr.Calendar.calendar.months['stand-alone'].abbreviated[month_str];405 case 4:406 return TwitterCldr.Calendar.calendar.months['stand-alone'].wide[month_str];407 case 5:408 return TwitterCldr.Calendar.calendar.months['stand-alone'].narrow[month_str];409 default:410 throw "Unknown date format";411 }412 };413 DateTimeFormatter.prototype.day = function(date, pattern, length) {414 switch (length) {415 case 1:416 return date.getDate().toString();417 case 2:418 return ("0000" + date.getDate().toString()).slice(-length);419 }420 };421 DateTimeFormatter.prototype.weekday = function(date, pattern, length) {422 var key;423 key = this.weekday_keys[date.getDay()];424 switch (length) {425 case 1:426 case 2:427 case 3:428 return TwitterCldr.Calendar.calendar.days.format.abbreviated[key];429 case 4:430 return TwitterCldr.Calendar.calendar.days.format.wide[key];431 case 5:432 return TwitterCldr.Calendar.calendar.days['stand-alone'].narrow[key];433 }434 };435 DateTimeFormatter.prototype.weekday_local = function(date, pattern, length) {436 var day;437 switch (length) {438 case 1:439 case 2:440 day = date.getDay();441 if (day === 0) {442 return "7";443 } else {444 return day.toString();445 }446 break;447 default:448 return this.weekday(date, pattern, length);449 }450 };451 DateTimeFormatter.prototype.weekday_local_stand_alone = function(date, pattern, length) {452 switch (length) {453 case 1:454 return this.weekday_local(date, pattern, length);455 default:456 return this.weekday(date, pattern, length);457 }458 };459 DateTimeFormatter.prototype.period = function(time, pattern, length) {460 if (time.getHours() > 11) {461 return TwitterCldr.Calendar.calendar.periods.format.wide["pm"];462 } else {463 return TwitterCldr.Calendar.calendar.periods.format.wide["am"];464 }465 };466 DateTimeFormatter.prototype.hour = function(time, pattern, length) {467 var hour;468 hour = time.getHours();469 switch (pattern[0]) {470 case 'h':471 if (hour > 12) {472 hour = hour - 12;473 } else if (hour === 0) {474 hour = 12;475 }476 break;477 case 'K':478 if (hour > 11) {479 hour = hour - 12;480 }481 break;482 case 'k':483 if (hour === 0) {484 hour = 24;485 }486 }487 if (length === 1) {488 return hour.toString();489 } else {490 return ("000000" + hour.toString()).slice(-length);491 }492 };493 DateTimeFormatter.prototype.minute = function(time, pattern, length) {494 if (length === 1) {495 return time.getMinutes().toString();496 } else {497 return ("000000" + time.getMinutes().toString()).slice(-length);498 }499 };500 DateTimeFormatter.prototype.second = function(time, pattern, length) {501 if (length === 1) {502 return time.getSeconds().toString();503 } else {504 return ("000000" + time.getSeconds().toString()).slice(-length);505 }506 };507 DateTimeFormatter.prototype.second_fraction = function(time, pattern, length) {508 if (length > 6) {509 throw 'can not use the S format with more than 6 digits';510 }511 return ("000000" + Math.round(Math.pow(time.getMilliseconds() * 100.0, 6 - length)).toString()).slice(-length);512 };513 DateTimeFormatter.prototype.timezone = function(time, pattern, length) {514 var hours, minutes, offset, offsetString, sign;515 offset = time.getTimezoneOffset();516 hours = ("00" + (Math.abs(offset) / 60).toString()).slice(-2);517 minutes = ("00" + (Math.abs(offset) % 60).toString()).slice(-2);518 sign = offset > 0 ? "-" : "+";519 offsetString = sign + hours + ":" + minutes;520 switch (length) {521 case 1:522 case 2:523 case 3:524 return offsetString;525 default:526 return "UTC" + offsetString;527 }528 };529 DateTimeFormatter.prototype.timezone_generic_non_location = function(time, pattern, length) {530 throw 'not yet implemented (requires timezone translation data")';531 };532 return DateTimeFormatter;533 })();534 TwitterCldr.AdditionalDateFormatSelector = (function() {535 function AdditionalDateFormatSelector(pattern_hash) {536 this.pattern_hash = pattern_hash;537 }538 AdditionalDateFormatSelector.prototype.find_closest = function(goal_pattern) {539 var key, min_key, min_rank, rank, ranks;540 if (!(goal_pattern != null) || goal_pattern.trim().length === 0) {541 return null;542 } else {543 ranks = this.rank(goal_pattern);544 min_rank = 100;545 min_key = null;546 for (key in ranks) {547 rank = ranks[key];548 if (rank < min_rank) {549 min_rank = rank;550 min_key = key;551 }552 }553 return min_key;554 }555 };556 AdditionalDateFormatSelector.prototype.patterns = function() {557 var key, _results;558 _results = [];559 for (key in this.pattern_hash) {560 _results.push(key);561 }562 return _results;563 };564 AdditionalDateFormatSelector.prototype.separate = function(pattern_key) {565 var cur_char, last_char, result, _i, _len;566 last_char = "";567 result = [];568 for (_i = 0, _len = pattern_key.length; _i < _len; _i++) {569 cur_char = pattern_key[_i];570 if (cur_char === last_char) {571 result[result.length - 1] += cur_char;572 } else {573 result.push(cur_char);574 }575 last_char = cur_char;576 }577 return result;578 };579 AdditionalDateFormatSelector.prototype.all_separated_patterns = function() {580 var key, _results;581 _results = [];582 for (key in this.pattern_hash) {583 _results.push(this.separate(key));584 }585 return _results;586 };587 AdditionalDateFormatSelector.prototype.score = function(entities, goal_entities) {588 var score;589 score = this.exist_score(entities, goal_entities) * 2;590 score += this.position_score(entities, goal_entities);591 return score + this.count_score(entities, goal_entities);592 };593 AdditionalDateFormatSelector.prototype.position_score = function(entities, goal_entities) {594 var found, goal_entity, index, sum;595 sum = 0;596 for (index in goal_entities) {597 goal_entity = goal_entities[index];598 found = entities.indexOf(goal_entity);599 if (found > -1) {600 sum += Math.abs(found - index);601 }602 }603 return sum;604 };605 AdditionalDateFormatSelector.prototype.exist_score = function(entities, goal_entities) {606 var count, entity, goal_entity, _i, _len;607 count = 0;608 for (_i = 0, _len = goal_entities.length; _i < _len; _i++) {609 goal_entity = goal_entities[_i];610 if (!(((function() {611 var _j, _len1, _results;612 _results = [];613 for (_j = 0, _len1 = entities.length; _j < _len1; _j++) {614 entity = entities[_j];615 if (entity[0] === goal_entity[0]) {616 _results.push(entity);617 }618 }619 return _results;620 })()).length > 0)) {621 count += 1;622 }623 }624 return count;625 };626 AdditionalDateFormatSelector.prototype.count_score = function(entities, goal_entities) {627 var entity, found_entity, goal_entity, sum, _i, _len;628 sum = 0;629 for (_i = 0, _len = goal_entities.length; _i < _len; _i++) {630 goal_entity = goal_entities[_i];631 found_entity = ((function() {632 var _j, _len1, _results;633 _results = [];634 for (_j = 0, _len1 = entities.length; _j < _len1; _j++) {635 entity = entities[_j];636 if (entity[0] === goal_entity[0]) {637 _results.push(entity);638 }639 }640 return _results;641 })())[0];642 if (found_entity != null) {643 sum += Math.abs(found_entity.length - goal_entity.length);644 }645 }646 return sum;647 };648 AdditionalDateFormatSelector.prototype.rank = function(goal_pattern) {649 var result, separated_goal_pattern, separated_pattern, _i, _len, _ref;650 separated_goal_pattern = this.separate(goal_pattern);651 result = {};652 _ref = this.all_separated_patterns();653 for (_i = 0, _len = _ref.length; _i < _len; _i++) {654 separated_pattern = _ref[_i];655 result[separated_pattern.join("")] = this.score(separated_pattern, separated_goal_pattern);656 }657 return result;658 };659 return AdditionalDateFormatSelector;660 })();661 TwitterCldr.NumberFormatter = (function() {662 function NumberFormatter() {663 this.all_tokens = {"decimal":{"positive":["","#,##0.###"],"negative":["-","#,##0.###"]},"percent":{"positive":["","#,##0","%"],"negative":["-","#,##0","%"]},"currency":{"positive":["¤","#,##0.00"],"negative":["-(¤","#,##0.00",")"]},"short_decimal":{"positive":{"1000":["","0"," mil"],"10000":["","00"," mil"],"100000":["","000"," mil"],"1000000":["","0"," mi"],"10000000":["","00"," mi"],"100000000":["","000"," mi"],"1000000000":["","0"," bi"],"10000000000":["","00"," bi"],"100000000000":["","000"," bi"],"1000000000000":["","0"," tri"],"10000000000000":["","00"," tri"],"100000000000000":["","000"," tri"]},"negative":{"1000":["-","0"," mil"],"10000":["-","00"," mil"],"100000":["-","000"," mil"],"1000000":["-","0"," mi"],"10000000":["-","00"," mi"],"100000000":["-","000"," mi"],"1000000000":["-","0"," bi"],"10000000000":["-","00"," bi"],"100000000000":["-","000"," bi"],"1000000000000":["-","0"," tri"],"10000000000000":["-","00"," tri"],"100000000000000":["-","000"," tri"]}},"long_decimal":{"positive":{"1000":["","0"," mil"],"10000":["","00"," mil"],"100000":["","000"," mil"],"1000000":["","0"," milhões"],"10000000":["","00"," milhões"],"100000000":["","000"," milhões"],"1000000000":["","0"," bilhões"],"10000000000":["","00"," bilhões"],"100000000000":["","000"," bilhões"],"1000000000000":["","0"," trilhões"],"10000000000000":["","00"," trilhões"],"100000000000000":["","000"," trilhões"]},"negative":{"1000":["-","0"," mil"],"10000":["-","00"," mil"],"100000":["-","000"," mil"],"1000000":["-","0"," milhões"],"10000000":["-","00"," milhões"],"100000000":["-","000"," milhões"],"1000000000":["-","0"," bilhões"],"10000000000":["-","00"," bilhões"],"100000000000":["-","000"," bilhões"],"1000000000000":["-","0"," trilhões"],"10000000000000":["-","00"," trilhões"],"100000000000000":["-","000"," trilhões"]}}};664 this.tokens = [];665 this.symbols = {"alias":"","decimal":",","exponential":"E","group":".","infinity":"∞","list":";","minus_sign":"-","nan":"NaN","per_mille":"‰","percent_sign":"%","plus_sign":"+"};666 this.default_symbols = {667 'group': ',',668 'decimal': '.',669 'plus_sign': '+',670 'minus_sign': '-'671 };672 }673 NumberFormatter.prototype.format = function(number, options) {674 var fraction, fraction_format, integer_format, intg, key, opts, prefix, result, sign, suffix, val, _ref, _ref1;675 if (options == null) {676 options = {};677 }678 opts = this.default_format_options_for(number);679 for (key in options) {680 val = options[key];681 opts[key] = options[key] != null ? options[key] : opts[key];682 }683 _ref = this.partition_tokens(this.get_tokens(number, opts)), prefix = _ref[0], suffix = _ref[1], integer_format = _ref[2], fraction_format = _ref[3];684 number = this.transform_number(number);685 _ref1 = this.parse_number(number, opts), intg = _ref1[0], fraction = _ref1[1];686 result = integer_format.apply(parseFloat(intg), opts);687 if (fraction) {688 result += fraction_format.apply(fraction, opts);689 }690 sign = number < 0 && prefix !== "-" ? this.symbols.minus_sign || this.default_symbols.minus_sign : "";691 return "" + prefix + result + suffix;692 };693 NumberFormatter.prototype.transform_number = function(number) {694 return number;695 };696 NumberFormatter.prototype.partition_tokens = function(tokens) {697 return [tokens[0] || "", tokens[2] || "", new TwitterCldr.NumberFormatter.IntegerHelper(tokens[1], this.symbols), new TwitterCldr.NumberFormatter.FractionHelper(tokens[1], this.symbols)];698 };699 NumberFormatter.prototype.parse_number = function(number, options) {700 var precision;701 if (options == null) {702 options = {};703 }704 if (options.precision != null) {705 precision = options.precision;706 } else {707 precision = this.precision_from(number);708 }709 number = this.round_to(number, precision);710 return Math.abs(number).toFixed(precision).split(".");711 };712 NumberFormatter.prototype.precision_from = function(num) {713 var parts;714 parts = num.toString().split(".");715 if (parts.length === 2) {716 return parts[1].length;717 } else {718 return 0;719 }720 };721 NumberFormatter.prototype.round_to = function(number, precision) {722 var factor;723 factor = Math.pow(10, precision);724 return Math.round(number * factor) / factor;725 };726 NumberFormatter.prototype.get_tokens = function() {727 throw "get_tokens() not implemented - use a derived class like PercentFormatter.";728 };729 return NumberFormatter;730 })();731 TwitterCldr.PercentFormatter = (function(_super) {732 __extends(PercentFormatter, _super);733 function PercentFormatter(options) {734 if (options == null) {735 options = {};736 }737 this.default_percent_sign = "%";738 PercentFormatter.__super__.constructor.apply(this, arguments);739 }740 PercentFormatter.prototype.format = function(number, options) {741 if (options == null) {742 options = {};743 }744 return PercentFormatter.__super__.format.call(this, number, options).replace('¤', this.symbols.percent_sign || this.default_percent_sign);745 };746 PercentFormatter.prototype.default_format_options_for = function(number) {747 return {748 precision: 0749 };750 };751 PercentFormatter.prototype.get_tokens = function(number, options) {752 if (number < 0) {753 return this.all_tokens.percent.negative;754 } else {755 return this.all_tokens.percent.positive;756 }757 };758 return PercentFormatter;759 })(TwitterCldr.NumberFormatter);760 TwitterCldr.DecimalFormatter = (function(_super) {761 __extends(DecimalFormatter, _super);762 function DecimalFormatter() {763 return DecimalFormatter.__super__.constructor.apply(this, arguments);764 }765 DecimalFormatter.prototype.format = function(number, options) {766 if (options == null) {767 options = {};768 }769 try {770 return DecimalFormatter.__super__.format.call(this, number, options);771 } catch (error) {772 return number;773 }774 };775 DecimalFormatter.prototype.default_format_options_for = function(number) {776 return {777 precision: this.precision_from(number)778 };779 };780 DecimalFormatter.prototype.get_tokens = function(number, options) {781 if (options == null) {782 options = {};783 }784 if (number < 0) {785 return this.all_tokens.decimal.negative;786 } else {787 return this.all_tokens.decimal.positive;788 }789 };790 return DecimalFormatter;791 })(TwitterCldr.NumberFormatter);792 TwitterCldr.CurrencyFormatter = (function(_super) {793 __extends(CurrencyFormatter, _super);794 function CurrencyFormatter(options) {795 if (options == null) {796 options = {};797 }798 this.default_currency_symbol = "$";799 this.default_precision = 2;800 CurrencyFormatter.__super__.constructor.apply(this, arguments);801 }802 CurrencyFormatter.prototype.format = function(number, options) {803 var currency, symbol;804 if (options == null) {805 options = {};806 }807 if (options.currency) {808 if (TwitterCldr.Currencies != null) {809 currency = TwitterCldr.Currencies.for_code(options.currency);810 currency || (currency = {811 symbol: options.currency812 });813 } else {814 currency = {815 symbol: options.currency816 };817 }818 } else {819 currency = {820 symbol: this.default_currency_symbol821 };822 }823 symbol = options.use_cldr_symbol ? currency.cldr_symbol : currency.symbol;824 return CurrencyFormatter.__super__.format.call(this, number, options).replace('¤', symbol);825 };826 CurrencyFormatter.prototype.default_format_options_for = function(number) {827 var precision;828 precision = this.precision_from(number);829 if (precision === 0) {830 precision = this.default_precision;831 }832 return {833 precision: precision834 };835 };836 CurrencyFormatter.prototype.get_tokens = function(number, options) {837 if (options == null) {838 options = {};839 }840 if (number < 0) {841 return this.all_tokens.currency.negative;842 } else {843 return this.all_tokens.currency.positive;844 }845 };846 return CurrencyFormatter;847 })(TwitterCldr.NumberFormatter);848 TwitterCldr.AbbreviatedNumberFormatter = (function(_super) {849 __extends(AbbreviatedNumberFormatter, _super);850 function AbbreviatedNumberFormatter() {851 return AbbreviatedNumberFormatter.__super__.constructor.apply(this, arguments);852 }853 AbbreviatedNumberFormatter.prototype.NUMBER_MAX = Math.pow(10, 15);854 AbbreviatedNumberFormatter.prototype.NUMBER_MIN = 1000;855 AbbreviatedNumberFormatter.prototype.default_format_options_for = function(number) {856 return {857 precision: this.precision_from(number)858 };859 };860 AbbreviatedNumberFormatter.prototype.get_type = function() {861 return "decimal";862 };863 AbbreviatedNumberFormatter.prototype.get_key = function(number) {864 var i, zeroes;865 zeroes = ((function() {866 var _i, _ref, _results;867 _results = [];868 for (i = _i = 0, _ref = Math.floor(number).toString().length - 1; 0 <= _ref ? _i < _ref : _i > _ref; i = 0 <= _ref ? ++_i : --_i) {869 _results.push("0");870 }871 return _results;872 })()).join("");873 return "1" + zeroes;874 };875 AbbreviatedNumberFormatter.prototype.get_tokens = function(number, options) {876 var format, tokens, type;877 if (options == null) {878 options = {};879 }880 type = (number < this.NUMBER_MAX) && (number >= this.NUMBER_MIN) ? this.get_type() : "decimal";881 format = type === this.get_type() ? this.get_key(number) : null;882 tokens = this.all_tokens[type];883 tokens = number < 0 ? tokens.negative : tokens.positive;884 if (format != null) {885 tokens = tokens[format];886 }887 return tokens;888 };889 AbbreviatedNumberFormatter.prototype.transform_number = function(number) {890 var sig_figs;891 if ((number < this.NUMBER_MAX) && (number >= this.NUMBER_MIN)) {892 sig_figs = (parseInt(number).toString().length - 1) % 3;893 return parseInt(number.toString().slice(0, +sig_figs + 1 || 9e9));894 } else {895 return number;896 }897 };898 return AbbreviatedNumberFormatter;899 })(TwitterCldr.NumberFormatter);900 TwitterCldr.ShortDecimalFormatter = (function(_super) {901 __extends(ShortDecimalFormatter, _super);902 function ShortDecimalFormatter() {903 return ShortDecimalFormatter.__super__.constructor.apply(this, arguments);904 }905 ShortDecimalFormatter.prototype.get_type = function() {906 return "short_decimal";907 };908 return ShortDecimalFormatter;909 })(TwitterCldr.AbbreviatedNumberFormatter);910 TwitterCldr.LongDecimalFormatter = (function(_super) {911 __extends(LongDecimalFormatter, _super);912 function LongDecimalFormatter() {913 return LongDecimalFormatter.__super__.constructor.apply(this, arguments);914 }915 LongDecimalFormatter.prototype.get_type = function() {916 return "long_decimal";917 };918 return LongDecimalFormatter;919 })(TwitterCldr.AbbreviatedNumberFormatter);920 TwitterCldr.NumberFormatter.BaseHelper = (function() {921 function BaseHelper() {}922 BaseHelper.prototype.interpolate = function(string, value, orientation) {923 var i, length, start;924 if (orientation == null) {925 orientation = "right";926 }927 value = value.toString();928 length = value.length;929 start = orientation === "left" ? 0 : -length;930 if (string.length < length) {931 string = (((function() {932 var _i, _results;933 _results = [];934 for (i = _i = 0; 0 <= length ? _i < length : _i > length; i = 0 <= length ? ++_i : --_i) {935 _results.push("#");936 }937 return _results;938 })()).join("") + string).slice(-length);939 }940 if (start < 0) {941 string = string.slice(0, start + string.length) + value;942 } else {943 string = string.slice(0, start) + value + string.slice(length);944 }945 return string.replace(/#/g, "");946 };947 return BaseHelper;948 })();949 TwitterCldr.NumberFormatter.IntegerHelper = (function(_super) {950 __extends(IntegerHelper, _super);951 function IntegerHelper(token, symbols) {952 var format;953 if (symbols == null) {954 symbols = {};955 }956 format = token.split('.')[0];957 this.format = this.prepare_format(format, symbols);958 this.groups = this.parse_groups(format);959 this.separator = symbols.group || ',';960 }961 IntegerHelper.prototype.apply = function(number, options) {962 if (options == null) {963 options = {};964 }965 return this.format_groups(this.interpolate(this.format, parseInt(number)));966 };967 IntegerHelper.prototype.format_groups = function(string) {968 var cur_token, token, tokens;969 if (this.groups.length === 0) {970 return string;971 }972 tokens = [];973 cur_token = this.chop_group(string, this.groups[0]);974 tokens.push(cur_token);975 if (cur_token) {976 string = string.slice(0, string.length - cur_token.length);977 }978 while (string.length > this.groups[this.groups.length - 1]) {979 cur_token = this.chop_group(string, this.groups[this.groups.length - 1]);980 tokens.push(cur_token);981 if (cur_token) {982 string = string.slice(0, string.length - cur_token.length);983 }984 }985 tokens.push(string);986 return ((function() {987 var _i, _len, _results;988 _results = [];989 for (_i = 0, _len = tokens.length; _i < _len; _i++) {990 token = tokens[_i];991 if (token !== null) {992 _results.push(token);993 }994 }995 return _results;996 })()).reverse().join(this.separator);997 };998 IntegerHelper.prototype.parse_groups = function(format) {999 var index, rest, width, widths;1000 index = format.lastIndexOf(',');1001 if (!(index > 0)) {1002 return [];1003 }1004 rest = format.slice(0, index);1005 widths = [format.length - index - 1];1006 if (rest.lastIndexOf(',') > -1) {1007 widths.push(rest.length - rest.lastIndexOf(',') - 1);1008 }1009 widths = (function() {1010 var _i, _len, _results;1011 _results = [];1012 for (_i = 0, _len = widths.length; _i < _len; _i++) {1013 width = widths[_i];1014 if (width !== null) {1015 _results.push(width);1016 }1017 }1018 return _results;1019 })();1020 widths.reverse();1021 return ((function() {1022 var _i, _ref, _results;1023 _results = [];1024 for (index = _i = 0, _ref = widths.length; 0 <= _ref ? _i < _ref : _i > _ref; index = 0 <= _ref ? ++_i : --_i) {1025 if (widths.indexOf(widths[index], index + 1) === -1) {1026 _results.push(widths[index]);1027 }1028 }1029 return _results;1030 })()).reverse();1031 };1032 IntegerHelper.prototype.chop_group = function(string, size) {1033 if (string.length > size) {1034 return string.slice(-size);1035 } else {1036 return null;1037 }1038 };1039 IntegerHelper.prototype.prepare_format = function(format, symbols) {1040 return format.replace(",", "").replace("+", symbols.plus_sign).replace("-", symbols.minus_sign);1041 };1042 return IntegerHelper;1043 })(TwitterCldr.NumberFormatter.BaseHelper);1044 TwitterCldr.NumberFormatter.FractionHelper = (function(_super) {1045 __extends(FractionHelper, _super);1046 function FractionHelper(token, symbols) {1047 if (symbols == null) {1048 symbols = {};1049 }1050 this.format = token ? token.split('.').pop() : "";1051 this.decimal = symbols.decimal || ".";1052 this.precision = this.format.length;1053 }1054 FractionHelper.prototype.apply = function(fraction, options) {1055 var precision;1056 if (options == null) {1057 options = {};1058 }1059 precision = options.precision != null ? options.precision : this.precision;1060 if (precision > 0) {1061 return this.decimal + this.interpolate(this.format_for(options), fraction, "left");1062 } else {1063 return "";1064 }1065 };1066 FractionHelper.prototype.format_for = function(options) {1067 var i, precision;1068 precision = options.precision != null ? options.precision : this.precision;1069 if (precision) {1070 return ((function() {1071 var _i, _results;1072 _results = [];1073 for (i = _i = 0; 0 <= precision ? _i < precision : _i > precision; i = 0 <= precision ? ++_i : --_i) {1074 _results.push("0");1075 }1076 return _results;1077 })()).join("");1078 } else {1079 return this.format;1080 }1081 };1082 return FractionHelper;1083 })(TwitterCldr.NumberFormatter.BaseHelper);1084 TwitterCldr.Currencies = (function() {1085 function Currencies() {}1086 Currencies.currencies = {"ADP":{"currency":"ADP","name":"Andorran peseta","cldr_symbol":"ADP","symbol":"ADP","code_points":[65,68,80]},"AED":{"currency":"AED","name":"UAE dirham","cldr_symbol":"AED","symbol":"AED","code_points":[65,69,68]},"AFA":{"currency":"AFA","name":"Afghan afghani (1927-2002)","cldr_symbol":"AFA","symbol":"AFA","code_points":[65,70,65]},"AFN":{"currency":"AFN","name":"Afghan Afghani","cldr_symbol":"AFN","symbol":"؋","code_points":[1547]},"ALK":{"currency":"ALK","name":"Albanian lek (1946-1965)","cldr_symbol":"ALK","symbol":"ALK","code_points":[65,76,75]},"ALL":{"currency":"ALL","name":"Albanian lek","cldr_symbol":"ALL","symbol":"LEK","code_points":[76,69,75]},"AMD":{"currency":"AMD","name":"Armenian dram","cldr_symbol":"AMD","symbol":"AMD","code_points":[65,77,68]},"ANG":{"currency":"ANG","name":"Netherlands Antillean guilder","cldr_symbol":"ANG","symbol":"ƒ","code_points":[402]},"AOA":{"currency":"AOA","name":"Angolan kwanza","cldr_symbol":"AOA","symbol":"AOA","code_points":[65,79,65]},"AOK":{"currency":"AOK","name":"Angolan kwanza (1977-1991)","cldr_symbol":"AOK","symbol":"AOK","code_points":[65,79,75]},"AON":{"currency":"AON","name":"Angolan new kwanza (1990-2000)","cldr_symbol":"AON","symbol":"AON","code_points":[65,79,78]},"AOR":{"currency":"AOR","name":"Angolan readjusted kwanza (1995-1999)","cldr_symbol":"AOR","symbol":"AOR","code_points":[65,79,82]},"ARA":{"currency":"ARA","name":"Argentine austral","cldr_symbol":"ARA","symbol":"ARA","code_points":[65,82,65]},"ARL":{"currency":"ARL","name":"Argentine peso ley (1970-1983)","cldr_symbol":"ARL","symbol":"ARL","code_points":[65,82,76]},"ARM":{"currency":"ARM","name":"Argentine peso (1881-1970)","cldr_symbol":"ARM","symbol":"ARM","code_points":[65,82,77]},"ARP":{"currency":"ARP","name":"Argentine peso (1983-1985)","cldr_symbol":"ARP","symbol":"ARP","code_points":[65,82,80]},"ARS":{"currency":"ARS","name":"Argentine peso","cldr_symbol":"ARS","symbol":"$","code_points":[36]},"ATS":{"currency":"ATS","name":"Austrian schilling","cldr_symbol":"ATS","symbol":"ATS","code_points":[65,84,83]},"AUD":{"currency":"AUD","name":"Australian dollar","cldr_symbol":"A$","symbol":"$","code_points":[36]},"AWG":{"currency":"AWG","name":"Aruban florin","cldr_symbol":"AWG","symbol":"ƒ","code_points":[402],"alt_name":"Florins"},"AZM":{"currency":"AZM","name":"Azerbaijani manat (1993-2006)","cldr_symbol":"AZM","symbol":"AZM","code_points":[65,90,77]},"AZN":{"currency":"AZN","name":"Azerbaijani manat","cldr_symbol":"AZN","symbol":"ман","code_points":[1084,1072,1085]},"BAD":{"currency":"BAD","name":"Bosnia-Herzegovina dinar (1992-1994)","cldr_symbol":"BAD","symbol":"BAD","code_points":[66,65,68]},"BAM":{"currency":"BAM","name":"Bosnia-Herzegovina convertible mark","cldr_symbol":"BAM","symbol":"KM","code_points":[75,77]},"BAN":{"currency":"BAN","name":"Bosnia-Herzegovina new dinar (1994-1997)","cldr_symbol":"BAN","symbol":"BAN","code_points":[66,65,78]},"BBD":{"currency":"BBD","name":"Barbadian dollar","cldr_symbol":"BBD","symbol":"$","code_points":[36]},"BDT":{"currency":"BDT","name":"Bangladeshi taka","cldr_symbol":"BDT","symbol":"BDT","code_points":[66,68,84]},"BEC":{"currency":"BEC","name":"Belgian franc (convertible)","cldr_symbol":"BEC","symbol":"BEC","code_points":[66,69,67]},"BEF":{"currency":"BEF","name":"Belgian franc","cldr_symbol":"BEF","symbol":"BEF","code_points":[66,69,70]},"BEL":{"currency":"BEL","name":"Belgian franc (financial)","cldr_symbol":"BEL","symbol":"BEL","code_points":[66,69,76]},"BGL":{"currency":"BGL","name":"Bulgarian hard lev","cldr_symbol":"BGL","symbol":"BGL","code_points":[66,71,76]},"BGM":{"currency":"BGM","name":"Bulgarian socialist lev","cldr_symbol":"BGM","symbol":"BGM","code_points":[66,71,77]},"BGN":{"currency":"BGN","name":"Bulgarian lev","cldr_symbol":"BGN","symbol":"лв","code_points":[1083,1074]},"BGO":{"currency":"BGO","name":"Bulgarian lev (1879-1952)","cldr_symbol":"BGO","symbol":"BGO","code_points":[66,71,79]},"BHD":{"currency":"BHD","name":"Bahraini dinar","cldr_symbol":"BHD","symbol":"BHD","code_points":[66,72,68]},"BIF":{"currency":"BIF","name":"Burundian franc","cldr_symbol":"BIF","symbol":"BIF","code_points":[66,73,70]},"BMD":{"currency":"BMD","name":"Bermudan dollar","cldr_symbol":"BMD","symbol":"$","code_points":[36]},"BND":{"currency":"BND","name":"Brunei dollar","cldr_symbol":"BND","symbol":"$","code_points":[36]},"BOB":{"currency":"BOB","name":"Bolivian boliviano","cldr_symbol":"BOB","symbol":"$b","code_points":[36,98]},"BOL":{"currency":"BOL","name":"Bolivian boliviano (1863-1963)","cldr_symbol":"BOL","symbol":"BOL","code_points":[66,79,76]},"BOP":{"currency":"BOP","name":"Bolivian peso","cldr_symbol":"BOP","symbol":"BOP","code_points":[66,79,80]},"BOV":{"currency":"BOV","name":"Bolivian mvdol","cldr_symbol":"BOV","symbol":"BOV","code_points":[66,79,86]},"BRB":{"currency":"BRB","name":"Brazilian new cruzeiro (1967-1986)","cldr_symbol":"BRB","symbol":"BRB","code_points":[66,82,66]},"BRC":{"currency":"BRC","name":"Brazilian cruzado (1986-1989)","cldr_symbol":"BRC","symbol":"BRC","code_points":[66,82,67]},"BRE":{"currency":"BRE","name":"Brazilian cruzeiro (1990-1993)","cldr_symbol":"BRE","symbol":"BRE","code_points":[66,82,69]},"BRL":{"currency":"BRL","name":"Brazilian real","cldr_symbol":"R$","symbol":"R$","code_points":[82,36]},"BRN":{"currency":"BRN","name":"Brazilian new cruzado (1989-1990)","cldr_symbol":"BRN","symbol":"BRN","code_points":[66,82,78]},"BRR":{"currency":"BRR","name":"Brazilian cruzeiro (1993-1994)","cldr_symbol":"BRR","symbol":"BRR","code_points":[66,82,82]},"BRZ":{"currency":"BRZ","name":"Brazilian cruzeiro (1942-1967)","cldr_symbol":"BRZ","symbol":"BRZ","code_points":[66,82,90]},"BSD":{"currency":"BSD","name":"Bahamian dollar","cldr_symbol":"BSD","symbol":"$","code_points":[36]},"BTN":{"currency":"BTN","name":"Bhutanese ngultrum","cldr_symbol":"BTN","symbol":"BTN","code_points":[66,84,78]},"BUK":{"currency":"BUK","name":"Burmese kyat","cldr_symbol":"BUK","symbol":"BUK","code_points":[66,85,75]},"BWP":{"currency":"BWP","name":"Botswanan pula","cldr_symbol":"BWP","symbol":"P","code_points":[80]},"BYB":{"currency":"BYB","name":"Belarusian new ruble (1994-1999)","cldr_symbol":"BYB","symbol":"BYB","code_points":[66,89,66]},"BYR":{"currency":"BYR","name":"Belarusian ruble","cldr_symbol":"BYR","symbol":"p.","code_points":[112,46]},"BZD":{"currency":"BZD","name":"Belize dollar","cldr_symbol":"BZD","symbol":"BZ$","code_points":[66,90,36]},"CAD":{"currency":"CAD","name":"Canadian dollar","cldr_symbol":"CA$","symbol":"$","code_points":[36]},"CDF":{"currency":"CDF","name":"Congolese franc","cldr_symbol":"CDF","symbol":"CDF","code_points":[67,68,70]},"CHE":{"currency":"CHE","name":"WIR euro","cldr_symbol":"CHE","symbol":"CHE","code_points":[67,72,69]},"CHF":{"currency":"CHF","name":"Swiss franc","cldr_symbol":"CHF","symbol":"CHF","code_points":[67,72,70]},"CHW":{"currency":"CHW","name":"WIR franc","cldr_symbol":"CHW","symbol":"CHW","code_points":[67,72,87]},"CLE":{"currency":"CLE","name":"Chilean escudo","cldr_symbol":"CLE","symbol":"CLE","code_points":[67,76,69]},"CLF":{"currency":"CLF","name":"Chilean unit of account (UF)","cldr_symbol":"CLF","symbol":"CLF","code_points":[67,76,70]},"CLP":{"currency":"CLP","name":"Chilean peso","cldr_symbol":"CLP","symbol":"$","code_points":[36]},"CNX":{"currency":"CNX","name":"Chinese People’s Bank dollar","cldr_symbol":"CNX","symbol":"CNX","code_points":[67,78,88]},"CNY":{"currency":"CNY","name":"Chinese yuan","cldr_symbol":"CN¥","symbol":"¥","code_points":[165]},"COP":{"currency":"COP","name":"Colombian peso","cldr_symbol":"COP","symbol":"$","code_points":[36]},"COU":{"currency":"COU","name":"Colombian real value unit","cldr_symbol":"COU","symbol":"COU","code_points":[67,79,85]},"CRC":{"currency":"CRC","name":"Costa Rican colón","cldr_symbol":"CRC","symbol":"₡","code_points":[8353]},"CSD":{"currency":"CSD","name":"Serbian dinar (2002-2006)","cldr_symbol":"CSD","symbol":"CSD","code_points":[67,83,68]},"CSK":{"currency":"CSK","name":"Czechoslovak hard koruna","cldr_symbol":"CSK","symbol":"CSK","code_points":[67,83,75]},"CUC":{"currency":"CUC","name":"Cuban convertible peso","cldr_symbol":"CUC","symbol":"CUC","code_points":[67,85,67]},"CUP":{"currency":"CUP","name":"Cuban peso","cldr_symbol":"CUP","symbol":"₱","code_points":[8369]},"CVE":{"currency":"CVE","name":"Cape Verdean escudo","cldr_symbol":"CVE","symbol":"CVE","code_points":[67,86,69]},"CYP":{"currency":"CYP","name":"Cypriot pound","cldr_symbol":"CYP","symbol":"CYP","code_points":[67,89,80]},"CZK":{"currency":"CZK","name":"Czech Republic koruna","cldr_symbol":"CZK","symbol":"Kč","code_points":[75,269]},"DDM":{"currency":"DDM","name":"East German mark","cldr_symbol":"DDM","symbol":"DDM","code_points":[68,68,77]},"DEM":{"currency":"DEM","name":"German mark","cldr_symbol":"DEM","symbol":"DEM","code_points":[68,69,77]},"DJF":{"currency":"DJF","name":"Djiboutian franc","cldr_symbol":"DJF","symbol":"DJF","code_points":[68,74,70]},"DKK":{"currency":"DKK","name":"Danish krone","cldr_symbol":"DKK","symbol":"kr","code_points":[107,114]},"DOP":{"currency":"DOP","name":"Dominican peso","cldr_symbol":"DOP","symbol":"RD$","code_points":[82,68,36]},"DZD":{"currency":"DZD","name":"Algerian dinar","cldr_symbol":"DZD","symbol":"DZD","code_points":[68,90,68]},"ECS":{"currency":"ECS","name":"Ecuadorian sucre","cldr_symbol":"ECS","symbol":"ECS","code_points":[69,67,83]},"ECV":{"currency":"ECV","name":"Ecuadorian unit of constant value","cldr_symbol":"ECV","symbol":"ECV","code_points":[69,67,86]},"EEK":{"currency":"EEK","name":"Estonian kroon","cldr_symbol":"EEK","symbol":"kr","code_points":[107,114]},"EGP":{"currency":"EGP","name":"Egyptian pound","cldr_symbol":"EGP","symbol":"£","code_points":[163]},"ERN":{"currency":"ERN","name":"Eritrean nakfa","cldr_symbol":"ERN","symbol":"ERN","code_points":[69,82,78]},"ESA":{"currency":"ESA","name":"Spanish peseta (A account)","cldr_symbol":"ESA","symbol":"ESA","code_points":[69,83,65]},"ESB":{"currency":"ESB","name":"Spanish peseta (convertible account)","cldr_symbol":"ESB","symbol":"ESB","code_points":[69,83,66]},"ESP":{"currency":"ESP","name":"Spanish peseta","cldr_symbol":"ESP","symbol":"ESP","code_points":[69,83,80]},"ETB":{"currency":"ETB","name":"Ethiopian birr","cldr_symbol":"ETB","symbol":"ETB","code_points":[69,84,66]},"EUR":{"currency":"EUR","name":"euro","cldr_symbol":"€","symbol":"€","code_points":[8364]},"FIM":{"currency":"FIM","name":"Finnish markka","cldr_symbol":"FIM","symbol":"FIM","code_points":[70,73,77]},"FJD":{"currency":"FJD","name":"Fijian dollar","cldr_symbol":"FJD","symbol":"FJD","code_points":[70,74,68]},"FKP":{"currency":"FKP","name":"Falkland Islands pound","cldr_symbol":"FKP","symbol":"£","code_points":[163]},"FRF":{"currency":"FRF","name":"French franc","cldr_symbol":"FRF","symbol":"FRF","code_points":[70,82,70]},"GBP":{"currency":"GBP","name":"British pound sterling","cldr_symbol":"£","symbol":"£","code_points":[163]},"GEK":{"currency":"GEK","name":"Georgian kupon larit","cldr_symbol":"GEK","symbol":"GEK","code_points":[71,69,75]},"GEL":{"currency":"GEL","name":"Georgian lari","cldr_symbol":"GEL","symbol":"GEL","code_points":[71,69,76]},"GHC":{"currency":"GHC","name":"Ghanaian cedi (1979-2007)","cldr_symbol":"GHC","symbol":"GHC","code_points":[71,72,67]},"GHS":{"currency":"GHS","name":"Ghanaian cedi","cldr_symbol":"GHS","symbol":"¢","code_points":[162]},"GIP":{"currency":"GIP","name":"Gibraltar pound","cldr_symbol":"GIP","symbol":"£","code_points":[163]},"GMD":{"currency":"GMD","name":"Gambian dalasi","cldr_symbol":"GMD","symbol":"GMD","code_points":[71,77,68]},"GNF":{"currency":"GNF","name":"Guinean franc","cldr_symbol":"GNF","symbol":"GNF","code_points":[71,78,70]},"GNS":{"currency":"GNS","name":"Guinean syli","cldr_symbol":"GNS","symbol":"GNS","code_points":[71,78,83]},"GQE":{"currency":"GQE","name":"Equatorial Guinean ekwele","cldr_symbol":"GQE","symbol":"GQE","code_points":[71,81,69]},"GRD":{"currency":"GRD","name":"Greek drachma","cldr_symbol":"GRD","symbol":"GRD","code_points":[71,82,68]},"GTQ":{"currency":"GTQ","name":"Guatemalan quetzal","cldr_symbol":"GTQ","symbol":"Q","code_points":[81]},"GWE":{"currency":"GWE","name":"Portuguese Guinea escudo","cldr_symbol":"GWE","symbol":"GWE","code_points":[71,87,69]},"GWP":{"currency":"GWP","name":"Guinea-Bissau peso","cldr_symbol":"GWP","symbol":"GWP","code_points":[71,87,80]},"GYD":{"currency":"GYD","name":"Guyanaese dollar","cldr_symbol":"GYD","symbol":"GYD","code_points":[71,89,68]},"HKD":{"currency":"HKD","name":"Hong Kong dollar","cldr_symbol":"HK$","symbol":"$","code_points":[36]},"HNL":{"currency":"HNL","name":"Honduran lempira","cldr_symbol":"HNL","symbol":"L","code_points":[76]},"HRD":{"currency":"HRD","name":"Croatian dinar","cldr_symbol":"HRD","symbol":"HRD","code_points":[72,82,68]},"HRK":{"currency":"HRK","name":"Croatian kuna","cldr_symbol":"HRK","symbol":"kn","code_points":[107,110]},"HTG":{"currency":"HTG","name":"Haitian gourde","cldr_symbol":"HTG","symbol":"HTG","code_points":[72,84,71]},"HUF":{"currency":"HUF","name":"Hungarian forint","cldr_symbol":"HUF","symbol":"Ft","code_points":[70,116]},"IDR":{"currency":"IDR","name":"Indonesian rupiah","cldr_symbol":"IDR","symbol":"Rp","code_points":[82,112]},"IEP":{"currency":"IEP","name":"Irish pound","cldr_symbol":"IEP","symbol":"IEP","code_points":[73,69,80]},"ILP":{"currency":"ILP","name":"Israeli pound","cldr_symbol":"ILP","symbol":"ILP","code_points":[73,76,80]},"ILR":{"currency":"ILR","name":"Israeli sheqel (1980-1985)","cldr_symbol":"ILR","symbol":"ILR","code_points":[73,76,82]},"ILS":{"currency":"ILS","name":"Israeli new sheqel","cldr_symbol":"₪","symbol":"₪","code_points":[8362]},"INR":{"currency":"INR","name":"Indian rupee","cldr_symbol":"₹","symbol":"₨","code_points":[8360]},"IQD":{"currency":"IQD","name":"Iraqi dinar","cldr_symbol":"IQD","symbol":"IQD","code_points":[73,81,68]},"IRR":{"currency":"IRR","name":"Iranian rial","cldr_symbol":"IRR","symbol":"﷼","code_points":[65020]},"ISJ":{"currency":"ISJ","name":"Icelandic króna (1918-1981)","cldr_symbol":"ISJ","symbol":"ISJ","code_points":[73,83,74]},"ISK":{"currency":"ISK","name":"Icelandic króna","cldr_symbol":"ISK","symbol":"kr","code_points":[107,114]},"ITL":{"currency":"ITL","name":"Italian lira","cldr_symbol":"ITL","symbol":"ITL","code_points":[73,84,76]},"JMD":{"currency":"JMD","name":"Jamaican dollar","cldr_symbol":"JMD","symbol":"JMD","code_points":[74,77,68]},"JOD":{"currency":"JOD","name":"Jordanian dinar","cldr_symbol":"JOD","symbol":"JOD","code_points":[74,79,68]},"JPY":{"currency":"JPY","name":"Japanese yen","cldr_symbol":"¥","symbol":"¥","code_points":[165]},"KES":{"currency":"KES","name":"Kenyan shilling","cldr_symbol":"KES","symbol":"KES","code_points":[75,69,83]},"KGS":{"currency":"KGS","name":"Kyrgystani som","cldr_symbol":"KGS","symbol":"лв","code_points":[1083,1074]},"KHR":{"currency":"KHR","name":"Cambodian riel","cldr_symbol":"KHR","symbol":"KHR","code_points":[75,72,82]},"KMF":{"currency":"KMF","name":"Comorian franc","cldr_symbol":"KMF","symbol":"KMF","code_points":[75,77,70]},"KPW":{"currency":"KPW","name":"North Korean won","cldr_symbol":"KPW","symbol":"₩","code_points":[8361]},"KRH":{"currency":"KRH","name":"South Korean hwan (1953-1962)","cldr_symbol":"KRH","symbol":"KRH","code_points":[75,82,72]},"KRO":{"currency":"KRO","name":"South Korean won (1945-1953)","cldr_symbol":"KRO","symbol":"KRO","code_points":[75,82,79]},"KRW":{"currency":"KRW","name":"South Korean won","cldr_symbol":"₩","symbol":"₩","code_points":[8361]},"KWD":{"currency":"KWD","name":"Kuwaiti dinar","cldr_symbol":"KWD","symbol":"KWD","code_points":[75,87,68]},"KYD":{"currency":"KYD","name":"Cayman Islands dollar","cldr_symbol":"KYD","symbol":"$","code_points":[36]},"KZT":{"currency":"KZT","name":"Kazakhstani tenge","cldr_symbol":"KZT","symbol":"лв","code_points":[1083,1074]},"LAK":{"currency":"LAK","name":"Laotian kip","cldr_symbol":"LAK","symbol":"₭","code_points":[8365]},"LBP":{"currency":"LBP","name":"Lebanese pound","cldr_symbol":"LBP","symbol":"£","code_points":[163]},"LKR":{"currency":"LKR","name":"Sri Lankan rupee","cldr_symbol":"LKR","symbol":"₨","code_points":[8360]},"LRD":{"currency":"LRD","name":"Liberian dollar","cldr_symbol":"LRD","symbol":"$","code_points":[36]},"LSL":{"currency":"LSL","name":"Lesotho loti","cldr_symbol":"LSL","symbol":"LSL","code_points":[76,83,76]},"LTL":{"currency":"LTL","name":"Lithuanian litas","cldr_symbol":"LTL","symbol":"Lt","code_points":[76,116]},"LTT":{"currency":"LTT","name":"Lithuanian talonas","cldr_symbol":"LTT","symbol":"LTT","code_points":[76,84,84]},"LUC":{"currency":"LUC","name":"Luxembourgian convertible franc","cldr_symbol":"LUC","symbol":"LUC","code_points":[76,85,67]},"LUF":{"currency":"LUF","name":"Luxembourgian franc","cldr_symbol":"LUF","symbol":"LUF","code_points":[76,85,70]},"LUL":{"currency":"LUL","name":"Luxembourg financial franc","cldr_symbol":"LUL","symbol":"LUL","code_points":[76,85,76]},"LVL":{"currency":"LVL","name":"Latvian lats","cldr_symbol":"LVL","symbol":"Ls","code_points":[76,115]},"LVR":{"currency":"LVR","name":"Latvian ruble","cldr_symbol":"LVR","symbol":"LVR","code_points":[76,86,82]},"LYD":{"currency":"LYD","name":"Libyan dinar","cldr_symbol":"LYD","symbol":"LYD","code_points":[76,89,68]},"MAD":{"currency":"MAD","name":"Moroccan dirham","cldr_symbol":"MAD","symbol":"MAD","code_points":[77,65,68]},"MAF":{"currency":"MAF","name":"Moroccan franc","cldr_symbol":"MAF","symbol":"MAF","code_points":[77,65,70]},"MCF":{"currency":"MCF","name":"Monegasque franc","cldr_symbol":"MCF","symbol":"MCF","code_points":[77,67,70]},"MDC":{"currency":"MDC","name":"Moldovan cupon","cldr_symbol":"MDC","symbol":"MDC","code_points":[77,68,67]},"MDL":{"currency":"MDL","name":"Moldovan leu","cldr_symbol":"MDL","symbol":"MDL","code_points":[77,68,76]},"MGA":{"currency":"MGA","name":"Malagasy Ariary","cldr_symbol":"MGA","symbol":"MGA","code_points":[77,71,65]},"MGF":{"currency":"MGF","name":"Malagasy franc","cldr_symbol":"MGF","symbol":"MGF","code_points":[77,71,70]},"MKD":{"currency":"MKD","name":"Macedonian denar","cldr_symbol":"MKD","symbol":"MKD","code_points":[77,75,68]},"MKN":{"currency":"MKN","name":"Macedonian denar (1992-1993)","cldr_symbol":"MKN","symbol":"MKN","code_points":[77,75,78]},"MLF":{"currency":"MLF","name":"Malian franc","cldr_symbol":"MLF","symbol":"MLF","code_points":[77,76,70]},"MMK":{"currency":"MMK","name":"Myanma kyat","cldr_symbol":"MMK","symbol":"MMK","code_points":[77,77,75]},"MNT":{"currency":"MNT","name":"Mongolian tugrik","cldr_symbol":"MNT","symbol":"₮","code_points":[8366]},"MOP":{"currency":"MOP","name":"Macanese pataca","cldr_symbol":"MOP","symbol":"MOP","code_points":[77,79,80]},"MRO":{"currency":"MRO","name":"Mauritanian ouguiya","cldr_symbol":"MRO","symbol":"MRO","code_points":[77,82,79]},"MTL":{"currency":"MTL","name":"Maltese lira","cldr_symbol":"MTL","symbol":"MTL","code_points":[77,84,76]},"MTP":{"currency":"MTP","name":"Maltese pound","cldr_symbol":"MTP","symbol":"MTP","code_points":[77,84,80]},"MUR":{"currency":"MUR","name":"Mauritian rupee","cldr_symbol":"MUR","symbol":"₨","code_points":[8360]},"MVP":{"currency":"MVP","name":"Maldivian rupee","cldr_symbol":"MVP","symbol":"MVP","code_points":[77,86,80]},"MVR":{"currency":"MVR","name":"Maldivian rufiyaa","cldr_symbol":"MVR","symbol":"MVR","code_points":[77,86,82]},"MWK":{"currency":"MWK","name":"Malawian Kwacha","cldr_symbol":"MWK","symbol":"MWK","code_points":[77,87,75]},"MXN":{"currency":"MXN","name":"Mexican peso","cldr_symbol":"MX$","symbol":"$","code_points":[36]},"MXP":{"currency":"MXP","name":"Mexican silver peso (1861-1992)","cldr_symbol":"MXP","symbol":"MXP","code_points":[77,88,80]},"MXV":{"currency":"MXV","name":"Mexican investment unit","cldr_symbol":"MXV","symbol":"MXV","code_points":[77,88,86]},"MYR":{"currency":"MYR","name":"Malaysian ringgit","cldr_symbol":"MYR","symbol":"RM","code_points":[82,77]},"MZE":{"currency":"MZE","name":"Mozambican escudo","cldr_symbol":"MZE","symbol":"MZE","code_points":[77,90,69]},"MZM":{"currency":"MZM","name":"Mozambican metical (1980-2006)","cldr_symbol":"MZM","symbol":"MZM","code_points":[77,90,77]},"MZN":{"currency":"MZN","name":"Mozambican metical","cldr_symbol":"MZN","symbol":"MT","code_points":[77,84]},"NAD":{"currency":"NAD","name":"Namibian dollar","cldr_symbol":"NAD","symbol":"$","code_points":[36]},"NGN":{"currency":"NGN","name":"Nigerian naira","cldr_symbol":"NGN","symbol":"₦","code_points":[8358]},"NIC":{"currency":"NIC","name":"Nicaraguan córdoba (1988-1991)","cldr_symbol":"NIC","symbol":"NIC","code_points":[78,73,67]},"NIO":{"currency":"NIO","name":"Nicaraguan córdoba","cldr_symbol":"NIO","symbol":"C$","code_points":[67,36]},"NLG":{"currency":"NLG","name":"Dutch guilder","cldr_symbol":"NLG","symbol":"NLG","code_points":[78,76,71]},"NOK":{"currency":"NOK","name":"Norwegian krone","cldr_symbol":"NOK","symbol":"kr","code_points":[107,114]},"NPR":{"currency":"NPR","name":"Nepalese rupee","cldr_symbol":"NPR","symbol":"₨","code_points":[8360]},"NZD":{"currency":"NZD","name":"New Zealand dollar","cldr_symbol":"NZ$","symbol":"$","code_points":[36]},"OMR":{"currency":"OMR","name":"Omani rial","cldr_symbol":"OMR","symbol":"﷼","code_points":[65020]},"PAB":{"currency":"PAB","name":"Panamanian balboa","cldr_symbol":"PAB","symbol":"B/.","code_points":[66,47,46]},"PEI":{"currency":"PEI","name":"Peruvian inti","cldr_symbol":"PEI","symbol":"PEI","code_points":[80,69,73]},"PEN":{"currency":"PEN","name":"Peruvian nuevo sol","cldr_symbol":"PEN","symbol":"S/.","code_points":[83,47,46]},"PES":{"currency":"PES","name":"Peruvian sol (1863-1965)","cldr_symbol":"PES","symbol":"PES","code_points":[80,69,83]},"PGK":{"currency":"PGK","name":"Papua New Guinean kina","cldr_symbol":"PGK","symbol":"PGK","code_points":[80,71,75]},"PHP":{"currency":"PHP","name":"Philippine peso","cldr_symbol":"PHP","symbol":"Php","code_points":[80,104,112]},"PKR":{"currency":"PKR","name":"Pakistani rupee","cldr_symbol":"PKR","symbol":"₨","code_points":[8360]},"PLN":{"currency":"PLN","name":"Polish zloty","cldr_symbol":"PLN","symbol":"zł","code_points":[122,322]},"PLZ":{"currency":"PLZ","name":"Polish zloty (PLZ)","cldr_symbol":"PLZ","symbol":"PLZ","code_points":[80,76,90]},"PTE":{"currency":"PTE","name":"Portuguese escudo","cldr_symbol":"PTE","symbol":"PTE","code_points":[80,84,69]},"PYG":{"currency":"PYG","name":"Paraguayan guarani","cldr_symbol":"PYG","symbol":"Gs","code_points":[71,115]},"QAR":{"currency":"QAR","name":"Qatari rial","cldr_symbol":"QAR","symbol":"﷼","code_points":[65020]},"RHD":{"currency":"RHD","name":"Rhodesian dollar","cldr_symbol":"RHD","symbol":"RHD","code_points":[82,72,68]},"ROL":{"currency":"ROL","name":"Romanian leu (1952-2006)","cldr_symbol":"ROL","symbol":"ROL","code_points":[82,79,76]},"RON":{"currency":"RON","name":"Romanian leu","cldr_symbol":"RON","symbol":"lei","code_points":[108,101,105]},"RSD":{"currency":"RSD","name":"Serbian dinar","cldr_symbol":"RSD","symbol":"Дин.","code_points":[1044,1080,1085,46]},"RUB":{"currency":"RUB","name":"Russian ruble","cldr_symbol":"RUB","symbol":"руб","code_points":[1088,1091,1073]},"RUR":{"currency":"RUR","name":"Russian ruble (1991-1998)","cldr_symbol":"RUR","symbol":"RUR","code_points":[82,85,82]},"RWF":{"currency":"RWF","name":"Rwandan franc","cldr_symbol":"RWF","symbol":"RWF","code_points":[82,87,70]},"SAR":{"currency":"SAR","name":"Saudi riyal","cldr_symbol":"SAR","symbol":"﷼","code_points":[65020]},"SBD":{"currency":"SBD","name":"Solomon Islands dollar","cldr_symbol":"SBD","symbol":"$","code_points":[36]},"SCR":{"currency":"SCR","name":"Seychellois rupee","cldr_symbol":"SCR","symbol":"₨","code_points":[8360]},"SDD":{"currency":"SDD","name":"Sudanese dinar (1992-2007)","cldr_symbol":"SDD","symbol":"SDD","code_points":[83,68,68]},"SDG":{"currency":"SDG","name":"Sudanese pound","cldr_symbol":"SDG","symbol":"SDG","code_points":[83,68,71]},"SDP":{"currency":"SDP","name":"Sudanese pound (1957-1998)","cldr_symbol":"SDP","symbol":"SDP","code_points":[83,68,80]},"SEK":{"currency":"SEK","name":"Swedish krona","cldr_symbol":"SEK","symbol":"kr","code_points":[107,114]},"SGD":{"currency":"SGD","name":"Singapore dollar","cldr_symbol":"SGD","symbol":"$","code_points":[36]},"SHP":{"currency":"SHP","name":"Saint Helena pound","cldr_symbol":"SHP","symbol":"£","code_points":[163]},"SIT":{"currency":"SIT","name":"Slovenian tolar","cldr_symbol":"SIT","symbol":"SIT","code_points":[83,73,84]},"SKK":{"currency":"SKK","name":"Slovak koruna","cldr_symbol":"SKK","symbol":"SKK","code_points":[83,75,75]},"SLL":{"currency":"SLL","name":"Sierra Leonean leone","cldr_symbol":"SLL","symbol":"SLL","code_points":[83,76,76]},"SOS":{"currency":"SOS","name":"Somali shilling","cldr_symbol":"SOS","symbol":"S","code_points":[83]},"SRD":{"currency":"SRD","name":"Surinamese dollar","cldr_symbol":"SRD","symbol":"$","code_points":[36]},"SRG":{"currency":"SRG","name":"Surinamese guilder","cldr_symbol":"SRG","symbol":"SRG","code_points":[83,82,71]},"SSP":{"currency":"SSP","name":"South Sudanese pound","cldr_symbol":"SSP","symbol":"SSP","code_points":[83,83,80]},"STD":{"currency":"STD","name":"São Tomé and Príncipe dobra","cldr_symbol":"STD","symbol":"STD","code_points":[83,84,68]},"SUR":{"currency":"SUR","name":"Soviet rouble","cldr_symbol":"SUR","symbol":"SUR","code_points":[83,85,82]},"SVC":{"currency":"SVC","name":"Salvadoran colón","cldr_symbol":"SVC","symbol":"SVC","code_points":[83,86,67]},"SYP":{"currency":"SYP","name":"Syrian pound","cldr_symbol":"SYP","symbol":"£","code_points":[163]},"SZL":{"currency":"SZL","name":"Swazi lilangeni","cldr_symbol":"SZL","symbol":"SZL","code_points":[83,90,76]},"THB":{"currency":"THB","name":"Thai baht","cldr_symbol":"฿","symbol":"฿","code_points":[3647]},"TJR":{"currency":"TJR","name":"Tajikistani ruble","cldr_symbol":"TJR","symbol":"TJR","code_points":[84,74,82]},"TJS":{"currency":"TJS","name":"Tajikistani somoni","cldr_symbol":"TJS","symbol":"TJS","code_points":[84,74,83]},"TMM":{"currency":"TMM","name":"Turkmenistani manat (1993-2009)","cldr_symbol":"TMM","symbol":"TMM","code_points":[84,77,77]},"TMT":{"currency":"TMT","name":"Turkmenistani manat","cldr_symbol":"TMT","symbol":"TMT","code_points":[84,77,84]},"TND":{"currency":"TND","name":"Tunisian dinar","cldr_symbol":"TND","symbol":"TND","code_points":[84,78,68]},"TOP":{"currency":"TOP","name":"Tongan paʻanga","cldr_symbol":"TOP","symbol":"TOP","code_points":[84,79,80]},"TPE":{"currency":"TPE","name":"Timorese escudo","cldr_symbol":"TPE","symbol":"TPE","code_points":[84,80,69]},"TRL":{"currency":"TRL","name":"Turkish lira (1922-2005)","cldr_symbol":"TRL","symbol":"TRL","code_points":[84,82,76]},"TRY":{"currency":"TRY","name":"Turkish lira","cldr_symbol":"TRY","symbol":"TL","code_points":[84,76]},"TTD":{"currency":"TTD","name":"Trinidad and Tobago dollar","cldr_symbol":"TTD","symbol":"$","code_points":[36]},"TWD":{"currency":"TWD","name":"New Taiwan dollar","cldr_symbol":"NT$","symbol":"NT$","code_points":[78,84,36]},"TZS":{"currency":"TZS","name":"Tanzanian shilling","cldr_symbol":"TZS","symbol":"TZS","code_points":[84,90,83]},"UAH":{"currency":"UAH","name":"Ukrainian hryvnia","cldr_symbol":"UAH","symbol":"₴","code_points":[8372]},"UAK":{"currency":"UAK","name":"Ukrainian karbovanets","cldr_symbol":"UAK","symbol":"UAK","code_points":[85,65,75]},"UGS":{"currency":"UGS","name":"Ugandan shilling (1966-1987)","cldr_symbol":"UGS","symbol":"UGS","code_points":[85,71,83]},"UGX":{"currency":"UGX","name":"Ugandan shilling","cldr_symbol":"UGX","symbol":"UGX","code_points":[85,71,88]},"USD":{"currency":"USD","name":"US dollar","cldr_symbol":"$","symbol":"$","code_points":[36]},"USN":{"currency":"USN","name":"US dollar (next day)","cldr_symbol":"USN","symbol":"USN","code_points":[85,83,78]},"USS":{"currency":"USS","name":"US dollar (same day)","cldr_symbol":"USS","symbol":"USS","code_points":[85,83,83]},"UYI":{"currency":"UYI","name":"Uruguayan peso (indexed units)","cldr_symbol":"UYI","symbol":"UYI","code_points":[85,89,73]},"UYP":{"currency":"UYP","name":"Uruguayan peso (1975-1993)","cldr_symbol":"UYP","symbol":"UYP","code_points":[85,89,80]},"UYU":{"currency":"UYU","name":"Uruguayan peso","cldr_symbol":"UYU","symbol":"$U","code_points":[36,85]},"UZS":{"currency":"UZS","name":"Uzbekistan som","cldr_symbol":"UZS","symbol":"лв","code_points":[1083,1074]},"VEB":{"currency":"VEB","name":"Venezuelan bolívar (1871-2008)","cldr_symbol":"VEB","symbol":"VEB","code_points":[86,69,66]},"VEF":{"currency":"VEF","name":"Venezuelan bolívar","cldr_symbol":"VEF","symbol":"Bs","code_points":[66,115]},"VND":{"currency":"VND","name":"Vietnamese dong","cldr_symbol":"₫","symbol":"₫","code_points":[8363]},"VNN":{"currency":"VNN","name":"Vietnamese dong (1978-1985)","cldr_symbol":"VNN","symbol":"VNN","code_points":[86,78,78]},"VUV":{"currency":"VUV","name":"Vanuatu vatu","cldr_symbol":"VUV","symbol":"VUV","code_points":[86,85,86]},"WST":{"currency":"WST","name":"Samoan tala","cldr_symbol":"WST","symbol":"WST","code_points":[87,83,84]},"XAF":{"currency":"XAF","name":"CFA franc BEAC","cldr_symbol":"FCFA","symbol":"FCFA","code_points":[70,67,70,65]},"XAG":{"currency":"XAG","name":"troy ounce of silver","cldr_symbol":"XAG","symbol":"XAG","code_points":[88,65,71]},"XAU":{"currency":"XAU","name":"troy ounce of gold","cldr_symbol":"XAU","symbol":"XAU","code_points":[88,65,85]},"XBA":{"currency":"XBA","name":"European composite unit","cldr_symbol":"XBA","symbol":"XBA","code_points":[88,66,65]},"XBB":{"currency":"XBB","name":"European monetary unit","cldr_symbol":"XBB","symbol":"XBB","code_points":[88,66,66]},"XBC":{"currency":"XBC","name":"European unit of account (XBC)","cldr_symbol":"XBC","symbol":"XBC","code_points":[88,66,67]},"XBD":{"currency":"XBD","name":"European unit of account (XBD)","cldr_symbol":"XBD","symbol":"XBD","code_points":[88,66,68]},"XCD":{"currency":"XCD","name":"East Caribbean dollar","cldr_symbol":"EC$","symbol":"$","code_points":[36]},"XDR":{"currency":"XDR","name":"special drawing rights","cldr_symbol":"XDR","symbol":"XDR","code_points":[88,68,82]},"XEU":{"currency":"XEU","name":"European currency unit","cldr_symbol":"XEU","symbol":"XEU","code_points":[88,69,85]},"XFO":{"currency":"XFO","name":"French gold franc","cldr_symbol":"XFO","symbol":"XFO","code_points":[88,70,79]},"XFU":{"currency":"XFU","name":"French UIC-franc","cldr_symbol":"XFU","symbol":"XFU","code_points":[88,70,85]},"XOF":{"currency":"XOF","name":"CFA franc BCEAO","cldr_symbol":"CFA","symbol":"CFA","code_points":[67,70,65]},"XPD":{"currency":"XPD","name":"troy ounce of palladium","cldr_symbol":"XPD","symbol":"XPD","code_points":[88,80,68]},"XPF":{"currency":"XPF","name":"CFP franc","cldr_symbol":"CFPF","symbol":"CFPF","code_points":[67,70,80,70]},"XPT":{"currency":"XPT","name":"troy ounce of platinum","cldr_symbol":"XPT","symbol":"XPT","code_points":[88,80,84]},"XRE":{"currency":"XRE","name":"RINET Funds unit","cldr_symbol":"XRE","symbol":"XRE","code_points":[88,82,69]},"XSU":{"currency":"XSU","name":"Sucre","cldr_symbol":"XSU","symbol":"XSU","code_points":[88,83,85]},"XTS":{"currency":"XTS","name":"Testing Currency unit","cldr_symbol":"XTS","symbol":"XTS","code_points":[88,84,83]},"XUA":{"currency":"XUA","name":"ADB unit of account","cldr_symbol":"XUA","symbol":"XUA","code_points":[88,85,65]},"XXX":{"currency":"XXX","name":"(unknown unit of currency)","cldr_symbol":"XXX","symbol":"XXX","code_points":[88,88,88]},"YDD":{"currency":"YDD","name":"Yemeni dinar","cldr_symbol":"YDD","symbol":"YDD","code_points":[89,68,68]},"YER":{"currency":"YER","name":"Yemeni rial","cldr_symbol":"YER","symbol":"﷼","code_points":[65020]},"YUD":{"currency":"YUD","name":"Yugoslavian hard dinar (1966-1990)","cldr_symbol":"YUD","symbol":"YUD","code_points":[89,85,68]},"YUM":{"currency":"YUM","name":"Yugoslavian new dinar (1994-2002)","cldr_symbol":"YUM","symbol":"YUM","code_points":[89,85,77]},"YUN":{"currency":"YUN","name":"Yugoslavian convertible dinar (1990-1992)","cldr_symbol":"YUN","symbol":"YUN","code_points":[89,85,78]},"YUR":{"currency":"YUR","name":"Yugoslavian reformed dinar (1992-1993)","cldr_symbol":"YUR","symbol":"YUR","code_points":[89,85,82]},"ZAL":{"currency":"ZAL","name":"South African rand (financial)","cldr_symbol":"ZAL","symbol":"ZAL","code_points":[90,65,76]},"ZAR":{"currency":"ZAR","name":"South African rand","cldr_symbol":"ZAR","symbol":"R","code_points":[82]},"ZMK":{"currency":"ZMK","name":"Zambian kwacha","cldr_symbol":"ZMK","symbol":"ZMK","code_points":[90,77,75]},"ZRN":{"currency":"ZRN","name":"Zairean new zaire (1993-1998)","cldr_symbol":"ZRN","symbol":"ZRN","code_points":[90,82,78]},"ZRZ":{"currency":"ZRZ","name":"Zairean zaire (1971-1993)","cldr_symbol":"ZRZ","symbol":"ZRZ","code_points":[90,82,90]},"ZWD":{"currency":"ZWD","name":"Zimbabwean dollar (1980-2008)","cldr_symbol":"ZWD","symbol":"Z$","code_points":[90,36]},"ZWL":{"currency":"ZWL","name":"Zimbabwean dollar (2009)","cldr_symbol":"ZWL","symbol":"ZWL","code_points":[90,87,76]},"ZWR":{"currency":"ZWR","name":"Zimbabwean dollar (2008)","cldr_symbol":"ZWR","symbol":"ZWR","code_points":[90,87,82]}};1087 Currencies.currency_codes = function() {1088 var data, _;1089 return this.codes || (this.codes = (function() {1090 var _ref, _results;1091 _ref = this.currencies;1092 _results = [];1093 for (_ in _ref) {1094 data = _ref[_];1095 _results.push(data.code);1096 }1097 return _results;1098 }).call(this));1099 };1100 Currencies.for_code = function(currency_code) {1101 var country_name, data, result, _ref;1102 result = null;1103 _ref = this.currencies;1104 for (country_name in _ref) {1105 data = _ref[country_name];1106 if (data.currency === currency_code) {1107 result = {1108 country: country_name,1109 cldr_symbol: data.cldr_symbol,1110 symbol: data.symbol,1111 currency: data.currency1112 };1113 break;1114 }1115 }1116 return result;1117 };1118 return Currencies;1119 })();1120 TwitterCldr.ListFormatter = (function() {1121 function ListFormatter(options) {1122 if (options == null) {1123 options = {};1124 }1125 this.formats = {"2":"{0} e {1}","end":"{0} e {1}","middle":"{0}, {1}","start":"{0}, {1}"};1126 }1127 ListFormatter.prototype.format = function(list) {1128 if (this.formats[list.length.toString()] != null) {1129 return this.compose(this.formats[list.length.toString()], list);1130 } else {1131 return this.compose_list(list);1132 }1133 };1134 ListFormatter.prototype.compose_list = function(list) {1135 var format_key, i, result, _i, _ref;1136 result = this.compose(this.formats.end || this.formats.middle || "", [list[list.length - 2], list[list.length - 1]]);1137 if (list.length > 2) {1138 for (i = _i = 3, _ref = list.length; 3 <= _ref ? _i <= _ref : _i >= _ref; i = 3 <= _ref ? ++_i : --_i) {1139 format_key = i === list.length ? "start" : "middle";1140 if (this.formats[format_key] == null) {1141 format_key = "middle";1142 }1143 result = this.compose(this.formats[format_key] || "", [list[list.length - i], result]);1144 }1145 }1146 return result;1147 };1148 ListFormatter.prototype.compose = function(format, elements) {1149 var element, result;1150 elements = (function() {1151 var _i, _len, _results;1152 _results = [];1153 for (_i = 0, _len = elements.length; _i < _len; _i++) {1154 element = elements[_i];1155 if (element !== null) {1156 _results.push(element);1157 }1158 }1159 return _results;1160 })();1161 if (elements.length > 1) {1162 result = format.replace(/\{(\d+)\}/g, function() {1163 return RegExp.$1;1164 });1165 if (TwitterCldr.is_rtl) {1166 result = TwitterCldr.Bidi.from_string(result, {1167 "direction": "RTL"1168 }).reorder_visually().toString();1169 }1170 return result.replace(/(\d+)/g, function() {1171 return elements[parseInt(RegExp.$1)];1172 });1173 } else {1174 return elements[0] || "";1175 }1176 };1177 return ListFormatter;1178 })();1179 TwitterCldr.Bidi = (function() {1180 var MAX_DEPTH;1181 MAX_DEPTH = 62;1182 function Bidi(options) {1183 if (options == null) {1184 options = {};1185 }1186 this.bidi_classes = {"BN":{"8":[0],"13":[14],"5":[127,8298],"25":[134],"0":[173,65279,917505],"2":[8203],"4":[8288],"7":[119155],"95":[917536]},"S":{"0":[9,11,31]},"B":{"0":[10,13,133,8233],"2":[28]},"WS":{"0":[12,32,5760,6158,8232,8287,12288],"10":[8192]},"ON":{"1":[33,171,174,697,884,900,1542,1550,5787,6468,8189,8448,8456,8506,12342,12443,12829,13278,42622,64830,65120,65281,126704,127338],"4":[38,187,8512,65286,65529,127942],"5":[59,91,3059,8478,11493,65307,65339,127792],"3":[123,166,2038,3898,8451,8522,12289,13004,13175,43048,43124,128249,128320],"0":[161,180,215,247,894,903,1014,1418,1758,1769,3066,5120,6464,8125,8468,8485,8487,8489,8585,12336,12448,12539,13311,42611,42888,65021,65105,65108,65128,65131,65793,67871,119365,120539,120597,120655,120713,120771,128064],"2":[182,8127,8141,8157,8173,8316,8332,8470,12349,12924,42509,65124,65506],"13":[706,722,127153],"8":[741,65110],"16":[751,127968],"6":[3192,11513,65512,68409],"9":[5008,6128,11088,65040],"10":[6144,9280,65371,128581],"33":[6622,42752],"23":[8208,128336],"14":[8245,12977,127136,127169,127185],"25":[8261,9083,11904],"15":[8528,12880],"129":[8592],"289":[8724],"93":[9110],"38":[9216],"39":[9312],"449":[9450],"82":[9901],"254":[9985],"588":[10496],"59":[11776],"88":[11931],"213":[12032],"11":[12272,65936],"24":[12296],"35":[12736],"63":[19904],"54":[42128],"31":[65072],"74":[65856],"19":[69714,127872],"65":[119296],"86":[119552],"43":[126976],"99":[127024],"32":[127744],"69":[127799,128507,128640],"36":[127904],"62":[128000],"181":[128066],"61":[128256],"115":[128768]},"ET":{"2":[35,65283],"3":[162],"1":[176,1545,2546,43064,65129,65504,65509],"0":[1423,1642,2555,2801,3065,3647,6107,8494,8723,65119],"4":[8240],"25":[8352]},"ES":{"0":[43,45,8722,64297,65291,65293],"1":[8314,8330,65122]},"CS":{"0":[44,58,160,1548,8239,8260,65104,65106,65109,65292,65306],"1":[46,65294]},"EN":{"9":[48,1776,8320,65296],"1":[178],"0":[185,8304],"5":[8308],"19":[9352],"49":[120782],"10":[127232]},"L":{"25":[65,97,5761,6576,65313,65345,65549],"0":[170,181,186,750,902,908,1417,2363,2482,2510,2519,2563,2654,2691,2761,2768,2880,2903,2947,2972,3024,3031,3133,3199,3294,3406,3415,3517,3716,3722,3725,3749,3751,3773,3782,3894,3896,3967,3973,4145,4152,4295,4301,4696,4800,6070,6108,6314,6743,6753,6965,6971,7082,7143,7150,7379,7393,8025,8027,8029,8126,8206,8305,8319,8450,8455,8469,8484,8486,8488,9109,9900,11559,11565,43047,43597,43697,43712,43714,65792,65794,69632,69932,71340,71350,119970,119995,120134],"22":[192,3090,3218,6656,11648],"30":[216,8031,13280,66304,127248],"448":[248],"6":[699,1369,2425,2474,2548,2602,2730,2858,3449,3520,3648,3737,4688,4792,6100,8118,8134,8182,11680,11688,11696,11704,11712,11720,11728,11736,43808,43816,64256,69703,69819,119997,120086,120138],"1":[720,886,2434,2447,2503,2507,2524,2575,2610,2613,2616,2738,2763,2784,2818,2831,2866,2877,2887,2891,2908,2969,2974,2979,3006,3009,3160,3168,3202,3274,3285,3296,3313,3330,3424,3458,3634,3713,3719,3754,3762,4155,4227,5941,6087,6448,6755,7078,7154,7220,7413,8526,11506,11631,12334,43346,43444,43450,43486,43567,43571,43701,44006,65596,69815,71342,110592,119171,119966,119973,127568],"4":[736,2741,2869,3125,3253,3776,3976,6512,6973,8473,8517,12337,12344,43705,64275,120128],"3":[880,890,2365,2377,2486,2493,2649,2749,2962,3137,3389,3732,3757,3804,4186,4682,4698,4746,4786,4802,4882,5902,6435,7401,8144,8490,8508,11499,12540,42896,43015,44009,66336,74864,119977,120071,120123],"2":[904,2382,2527,2622,2674,2703,2911,2958,2984,3014,3018,3073,3086,3214,3270,3342,3398,3402,3535,3570,3745,5998,6441,6681,7146,8130,8178,12293,12445,43011,43584,65498],"19":[910,2404],"82":[931],"139":[1015],"157":[1162,66560],"37":[1329,7968,11520,43264],"38":[1377,119040],"54":[2307],"9":[2392,2662,3114,3174,3242,3302,3792,3902,6112,6160,6784,6800,8458,43000,43250,43600,44016,66720,69734,69872,70079,70096,71360],"7":[2437,2821,3077,3205,3261,3333,3544,4030,6078,7360,8016,43056,43588,43758,120077,120772],"21":[2451,2579,2707,2835],"11":[2534,2990,12992,43214,65536,119982],"5":[2565,2949,4039,4231,6451,6765,7406,7960,8008,8150,42738,42889,43777,43785,43793,65474,65482,65490],"8":[2693,3507,6979,7028,12321,65847,119146,127552],"10":[2790,6608,8495,42912,43471],"17":[2918,3461,5920,5952,119648],"12":[3046,3663,4046,4213,5888,5984,8160,8336,94099],"40":[3346,4704,6272,8544,12549,43520],"15":[3430,4193,4992],"23":[3482,3840,42624],"47":[3585,6916,7164,12832,43395,43648,119214],"26":[3866,6992,66352],"35":[3913,69891],"44":[4096,12784,65799,66000],"24":[4159,43020,43310,69840],"14":[4238,4808,7227,65599],"39":[4254,6470],"376":[4304],"32":[4752],"56":[4824,120540,120598,120656,120714],"66":[4888],"28":[4960,6400,66176,127462],"84":[5024,119808],"638":[5121],"80":[5792],"51":[6016,43072,70018],"87":[6176],"69":[6320],"43":[6528],"55":[6686,11568],"13":[6816,65616,66504,69942],"31":[7042,43612],"57":[7084,127280],"50":[7245,120488],"191":[7424],"277":[7680],"52":[8064],"68":[9014,93952],"77":[9372],"255":[10240],"46":[11264,11312,13008,42560,94032],"132":[11360],"85":[12353],"89":[12449],"93":[12593],"42":[12688,71296,127344,127504],"27":[12896,42512,120094],"49":[12927],"118":[13056],"98":[13179,74752],"6591":[13312],"22156":[19968],"316":[42192],"79":[42656],"101":[42786],"67":[43136],"29":[43359,66432,119180],"16":[43453,43739],"36":[43968,66463],"11206":[44032],"48":[55243,66208,69762],"8813":[55296],"105":[64112],"88":[65382],"18":[65576],"122":[65664],"53":[69634],"878":[73728],"1070":[77824],"568":[92160],"245":[118784],"61":[119081],"70":[119894],"64":[120005],"339":[120146],"42719":[131072],"4383":[173824],"541":[194560],"131071":[983040]},"NSM":{"111":[768],"6":[1155,1750,2385,3636,6071,6744,7394,65056,119173],"44":[1425],"0":[1471,1479,1648,1809,2362,2364,2381,2433,2492,2509,2620,2641,2677,2748,2765,2817,2876,2879,2893,2902,2946,3008,3021,3260,3405,3530,3542,3633,3761,3893,3895,3897,4038,4226,4237,4253,6086,6109,6313,6450,6742,6752,6754,6783,6964,6972,6978,7083,7142,7149,7405,7412,11647,42655,43010,43014,43019,43204,43443,43452,43587,43596,43696,43713,43766,44005,44008,44013,64286,66045,68159,69633,71339,71341,71351],"1":[1473,1476,1767,2402,2530,2561,2625,2631,2672,2689,2759,2786,2914,3157,3170,3276,3298,3426,3771,3864,3974,4153,4157,4184,4229,5970,6002,6068,6439,6679,7040,7080,7144,7222,12441,42736,43045,43569,43573,43703,43710,43756,68101,69760,69817,70016],"10":[1552,1958,3981,6089,43335],"20":[1611],"5":[1759,3764,3784,4146,43561,71344],"3":[1770,2070,2497,2881,3146,3393,4141,4209,6912,7074,7676,12330,42607,43446,68108,69811,94095,119210],"26":[1840,2276],"8":[2027,2075,7019,70070],"2":[2085,2137,2304,2635,3134,3142,3538,4190,4957,5906,5938,6155,6432,6457,7151,7376,11503,43392,43698,68097,68152,69888,119143,119362],"4":[2089,2753,3968,6966,69927],"7":[2369,3655,6757,7212,43302,69933,119163],"13":[3953],"35":[3993],"9":[6771,42612],"12":[7380],"38":[7616],"32":[8400],"31":[11744],"17":[43232],"15":[65024],"14":[69688],"239":[917760]},"R":{"0":[1470,1472,1475,1478,2042,2074,2084,2088,2142,8207,64285,64318,67592,67644,67903,68096],"26":[1488,68121,68440],"4":[1520,64312],"42":[1984],"1":[2036,64320,64323,67639,68030],"21":[2048,68416],"14":[2096],"24":[2112],"9":[64287,64326],"12":[64298],"5":[67584],"43":[67594],"22":[67647],"8":[67671,68176],"27":[67840],"25":[67872],"55":[67968],"3":[68112],"2":[68117],"7":[68160,68472],"31":[68192],"53":[68352],"72":[68608]},"AN":{"4":[1536],"9":[1632],"1":[1643],"0":[1757],"30":[69216]},"AL":{"0":[1544,1547,1549,1563,1969,2208,126500,126503,126521,126523,126530,126535,126537,126539,126548,126551,126553,126555,126557,126559,126564,126590],"44":[1566],"2":[1645,126541,126625],"100":[1649],"1":[1765,1774,1807,126497,126545,126561],"19":[1786],"29":[1810],"88":[1869],"10":[2210],"113":[64336],"362":[64467],"63":[64848],"53":[64914],"12":[65008],"4":[65136,126629],"134":[65142],"3":[126464,126516,126567,126580,126585],"26":[126469],"9":[126505,126592],"6":[126572],"16":[126603,126635]},"LRE":{"0":[8234]},"RLE":{"0":[8235]},"PDF":{"0":[8236]},"LRO":{"0":[8237]},"RLO":{"0":[8238]}};1187 this.string_arr = options.string_arr || options.types;1188 this.types = options.types || [];1189 this.levels = [];1190 this.runs = [];1191 this.direction = options.direction;1192 this.default_direction = options.default_direction || "LTR";1193 this.length = this.types.length;1194 this.run_bidi();1195 }1196 Bidi.bidi_class_for = function(code_point) {1197 var bidi_class, end, range, range_list, range_offset, ranges, start, _i, _len, _ref;1198 _ref = this.bidi_classes;1199 for (bidi_class in _ref) {1200 ranges = _ref[bidi_class];1201 for (range_offset in ranges) {1202 range_list = ranges[range_offset];1203 for (_i = 0, _len = range_list.length; _i < _len; _i++) {1204 range = range_list[_i];1205 start = range;1206 end = start + parseInt(range_offset);1207 if ((code_point >= start) && (code_point <= end)) {1208 return bidi_class;1209 }1210 }1211 }1212 }1213 return null;1214 };1215 Bidi.from_string = function(str, options) {1216 var string_arr;1217 if (options == null) {1218 options = {};1219 }1220 string_arr = TwitterCldr.Utilities.unpack_string(str);1221 options.types || (options.types = this.compute_types(string_arr));1222 options.string_arr || (options.string_arr = string_arr);1223 return new TwitterCldr.Bidi(options);1224 };1225 Bidi.from_type_array = function(types, options) {1226 if (options == null) {1227 options = {};1228 }1229 options.types || (options.types = types);1230 return new TwitterCldr.Bidi(options);1231 };1232 Bidi.compute_types = function(arr) {1233 var code_point, _i, _len, _results;1234 _results = [];1235 for (_i = 0, _len = arr.length; _i < _len; _i++) {1236 code_point = arr[_i];1237 _results.push(TwitterCldr.Bidi.bidi_class_for(code_point));1238 }1239 return _results;1240 };1241 Bidi.prototype.toString = function() {1242 return TwitterCldr.Utilities.pack_array(this.string_arr);1243 };1244 Bidi.prototype.reorder_visually = function() {1245 var depth, finish, i, level, lowest_odd, max, start, tmpb, tmpo, _i, _j, _k, _len, _ref, _ref1;1246 if (!this.string_arr) {1247 throw "No string given!";1248 }1249 max = 0;1250 lowest_odd = MAX_DEPTH + 1;1251 _ref = this.levels;1252 for (_i = 0, _len = _ref.length; _i < _len; _i++) {1253 level = _ref[_i];1254 max = TwitterCldr.Utilities.max([level, max]);1255 if (!TwitterCldr.Utilities.is_even(level)) {1256 lowest_odd = TwitterCldr.Utilities.min([lowest_odd, level]);1257 }1258 }1259 for (depth = _j = max; max <= 0 ? _j < 0 : _j > 0; depth = max <= 0 ? ++_j : --_j) {1260 start = 0;1261 while (start < this.levels.length) {1262 while (start < this.levels.length && this.levels[start] < depth) {1263 start += 1;1264 }1265 if (start === this.levels.length) {1266 break;1267 }1268 finish = start + 1;1269 while (finish < this.levels.length && this.levels[finish] >= depth) {1270 finish += 1;1271 }1272 for (i = _k = 0, _ref1 = (finish - start) / 2; 0 <= _ref1 ? _k < _ref1 : _k > _ref1; i = 0 <= _ref1 ? ++_k : --_k) {1273 tmpb = this.levels[finish - i - 1];1274 this.levels[finish - i - 1] = this.levels[start + i];1275 this.levels[start + i] = tmpb;1276 tmpo = this.string_arr[finish - i - 1];1277 this.string_arr[finish - i - 1] = this.string_arr[start + i];1278 this.string_arr[start + i] = tmpo;1279 }1280 start = finish + 1;1281 }1282 }1283 return this;1284 };1285 Bidi.prototype.compute_paragraph_embedding_level = function() {1286 var type, _i, _len, _ref;1287 if (["LTR", "RTL"].indexOf(this.direction) > -1) {1288 if (this.direction === "LTR") {1289 return 0;1290 } else {1291 return 1;1292 }1293 } else {1294 _ref = this.types;1295 for (_i = 0, _len = _ref.length; _i < _len; _i++) {1296 type = _ref[_i];1297 if (type === "L") {1298 return 0;1299 }1300 if (type === "R") {1301 return 1;1302 }1303 }1304 if (this.default_direction === "LTR") {1305 return 0;1306 } else {1307 return 1;1308 }1309 }1310 };1311 Bidi.prototype.compute_explicit_levels = function() {1312 var current_embedding, directional_override, embedding_stack, i, input, is_ltr, is_special, len, new_embedding, next_fmt, output, size, sp, _i, _j, _ref, _ref1;1313 current_embedding = this.base_embedding;1314 directional_override = -1;1315 embedding_stack = [];1316 this.formatter_indices || (this.formatter_indices = []);1317 sp = 0;1318 for (i = _i = 0, _ref = this.length; 0 <= _ref ? _i < _ref : _i > _ref; i = 0 <= _ref ? ++_i : --_i) {1319 is_ltr = false;1320 is_special = true;1321 is_ltr = this.types[i] === "LRE" || this.types[i] === "LRO";1322 switch (this.types[i]) {1323 case "RLE":1324 case "RLO":1325 case "LRE":1326 case "LRO":1327 new_embedding = is_ltr ? (current_embedding & ~1) + 2 : (current_embedding + 1) | 1;1328 if (new_embedding < MAX_DEPTH) {1329 if (directional_override !== -1) {1330 current_embedding |= -0x80;1331 }1332 embedding_stack[sp] = current_embedding;1333 current_embedding = new_embedding;1334 sp += 1;1335 directional_override = this.types[i] === "LRO" ? "L" : this.types[i] === "RLO" ? "R" : -1;1336 }1337 break;1338 case "PDF":1339 if (sp > 0) {1340 sp -= 1;1341 new_embedding = embedding_stack[sp];1342 current_embedding = new_embedding & 0x7f;1343 directional_override = new_embedding < 0 ? (_ref1 = (new_embedding & 1) === 0) != null ? _ref1 : {1344 "L": "R"1345 } : -1;1346 }1347 break;1348 default:1349 is_special = false;1350 }1351 this.levels[i] = current_embedding;1352 if (is_special) {1353 this.formatter_indices.push(i);1354 } else if (directional_override !== -1) {1355 this.types[i] = directional_override;1356 }1357 }1358 output = 0;1359 input = 0;1360 size = this.formatter_indices.length;1361 for (i = _j = 0; 0 <= size ? _j <= size : _j >= size; i = 0 <= size ? ++_j : --_j) {1362 next_fmt = i === size ? this.length : this.formatter_indices[i];1363 len = next_fmt - input;1364 TwitterCldr.Utilities.arraycopy(this.levels, input, this.levels, output, len);1365 TwitterCldr.Utilities.arraycopy(this.types, input, this.types, output, len);1366 output += len;1367 input = next_fmt + 1;1368 }1369 return this.length -= this.formatter_indices.length;1370 };1371 Bidi.prototype.compute_runs = function() {1372 var current_embedding, i, last_run_start, run_count, where, _i, _j, _ref, _ref1;1373 run_count = 0;1374 current_embedding = this.base_embedding;1375 for (i = _i = 0, _ref = this.length; 0 <= _ref ? _i < _ref : _i > _ref; i = 0 <= _ref ? ++_i : --_i) {1376 if (this.levels[i] !== current_embedding) {1377 current_embedding = this.levels[i];1378 run_count += 1;1379 }1380 }1381 where = 0;1382 last_run_start = 0;1383 current_embedding = this.base_embedding;1384 for (i = _j = 0, _ref1 = this.length; 0 <= _ref1 ? _j < _ref1 : _j > _ref1; i = 0 <= _ref1 ? ++_j : --_j) {1385 if (this.levels[i] !== current_embedding) {1386 this.runs[where] = last_run_start;1387 where += 1;1388 last_run_start = i;1389 current_embedding = this.levels[i];1390 }1391 }1392 return this.runs[where] = last_run_start;1393 };1394 Bidi.prototype.resolve_weak_types = function() {1395 var eor, finish, i, j, k, level, next_level, next_type, prev_strong_type, prev_type, previous_level, run_count, run_idx, sor, start, _i, _j, _k;1396 run_count = this.runs.length;1397 previous_level = this.base_embedding;1398 for (run_idx = _i = 0; 0 <= run_count ? _i < run_count : _i > run_count; run_idx = 0 <= run_count ? ++_i : --_i) {1399 start = this.get_run_start(run_idx);1400 finish = this.get_run_limit(run_idx);1401 level = this.get_run_level(run_idx) || 0;1402 sor = TwitterCldr.Utilities.is_even(TwitterCldr.Utilities.max([previous_level, level])) ? "L" : "R";1403 next_level = run_idx === (run_count - 1) ? this.base_embedding : this.get_run_level(run_idx + 1) || 0;1404 eor = TwitterCldr.Utilities.is_even(TwitterCldr.Utilities.max([level, next_level])) ? "L" : "R";1405 prev_type = sor;1406 prev_strong_type = sor;1407 for (i = _j = start; start <= finish ? _j < finish : _j > finish; i = start <= finish ? ++_j : --_j) {1408 next_type = i === (finish - 1) ? eor : this.types[i + 1];1409 if (this.types[i] === "NSM") {1410 this.types[i] = prev_type;1411 } else {1412 prev_type = this.types[i];1413 }1414 if (this.types[i] === "EN") {1415 if (prev_strong_type === "AL") {1416 this.types[i] = "AN";1417 }1418 } else if (this.types[i] === "L" || this.types[i] === "R" || this.types[i] === "AL") {1419 prev_strong_type = this.types[i];1420 }1421 if (this.types[i] === "AL") {1422 this.types[i] = "R";1423 }1424 if (prev_type === "EN" && next_type === "EN") {1425 if (this.types[i] === "ES" || this.types[i] === "CS") {1426 this.types[i] = nextType;1427 }1428 } else if (prev_type === "AN" && next_type === "AN" && this.types[i] === "CS") {1429 this.types[i] = next_type;1430 }1431 if (this.types[i] === "ET" || this.types[i] === "BN") {1432 if (prev_type === "EN") {1433 this.types[i] = prev_type;1434 } else {1435 j = i + 1;1436 while (j < finish && this.types[j] === "ET" || this.types[j] === "BN") {1437 j += 1;1438 }1439 if (j < finish && this.types[j] === "EN") {1440 for (k = _k = i; i <= j ? _k < j : _k > j; k = i <= j ? ++_k : --_k) {1441 this.types[k] = "EN";1442 }1443 }1444 }1445 }1446 if (this.types[i] === "ET" || this.types[i] === "CS" || this.types[i] === "BN") {1447 this.types[i] = "ON";1448 }1449 if (prev_strong_type === "L" && this.types[i] === "EN") {1450 this.types[i] = prev_strong_type;1451 }1452 }1453 previous_level = level;1454 }1455 };1456 Bidi.prototype.get_run_count = function() {1457 return this.runs.length;1458 };1459 Bidi.prototype.get_run_level = function(which) {1460 return this.levels[this.runs[which]];1461 };1462 Bidi.prototype.get_run_limit = function(which) {1463 if (which === (this.runs.length - 1)) {1464 return this.length;1465 } else {1466 return this.runs[which + 1];1467 }1468 };1469 Bidi.prototype.get_run_start = function(which) {1470 return this.runs[which];1471 };1472 Bidi.prototype.resolve_implicit_levels = function() {1473 var i, _i, _ref;1474 for (i = _i = 0, _ref = this.length; 0 <= _ref ? _i < _ref : _i > _ref; i = 0 <= _ref ? ++_i : --_i) {1475 if ((this.levels[i] & 1) === 0) {1476 if (this.types[i] === "R") {1477 this.levels[i] += 1;1478 } else if (this.types[i] === "AN" || this.types[i] === "EN") {1479 this.levels[i] += 2;1480 }1481 } else {1482 if (this.types[i] === "L" || this.types[i] === "AN" || this.types[i] === "EN") {1483 this.levels[i] += 1;1484 }1485 }1486 }1487 };1488 Bidi.prototype.resolve_neutral_types = function() {1489 var embedding_direction, eor, finish, i, j, level, neutral_start, new_strong, next_level, override, prev_strong, previous_level, run, run_count, sor, start, this_type, _i, _j, _k;1490 run_count = this.get_run_count();1491 previous_level = this.base_embedding;1492 for (run = _i = 0; 0 <= run_count ? _i < run_count : _i > run_count; run = 0 <= run_count ? ++_i : --_i) {1493 start = this.get_run_start(run);1494 finish = this.get_run_limit(run);1495 level = this.get_run_level(run);1496 if (level == null) {1497 continue;1498 }1499 embedding_direction = TwitterCldr.Utilities.is_even(level) ? "L" : "R";1500 sor = TwitterCldr.Utilities.is_even(TwitterCldr.Utilities.max([previous_level, level])) ? "L" : "R";1501 next_level = run === (run_count - 1) ? this.base_embedding : this.get_run_level(run + 1);1502 eor = TwitterCldr.Utilities.is_even(TwitterCldr.Utilities.max([level, next_level])) ? "L" : "R";1503 prev_strong = sor;1504 neutral_start = -1;1505 for (i = _j = start; start <= finish ? _j <= finish : _j >= finish; i = start <= finish ? ++_j : --_j) {1506 new_strong = -1;1507 this_type = i === finish ? eor : this.types[i];1508 switch (this_type) {1509 case "L":1510 new_strong = "L";1511 break;1512 case "R":1513 case "AN":1514 case "EN":1515 new_strong = "R";1516 break;1517 case "BN":1518 case "ON":1519 case "S":1520 case "B":1521 case "WS":1522 if (neutral_start === -1) {1523 neutral_start = i;1524 }1525 }1526 if (new_strong !== -1) {1527 if (neutral_start !== -1) {1528 override = prev_strong === new_strong ? prev_strong : embedding_direction;1529 for (j = _k = neutral_start; neutral_start <= i ? _k < i : _k > i; j = neutral_start <= i ? ++_k : --_k) {1530 this.types[j] = override;1531 }1532 }1533 prev_strong = new_strong;1534 neutral_start = -1;1535 }1536 }1537 previous_level = level;1538 }1539 };1540 Bidi.prototype.reinsert_formatting_codes = function() {1541 var index, input, left_level, len, next_fmt, output, right_level, _i, _ref;1542 if ((this.formatter_indices != null) && this.formatter_indices.length > 0) {1543 input = this.length;1544 output = this.levels.length;1545 for (index = _i = _ref = this.formatter_indices.length - 1; _ref <= 0 ? _i <= 0 : _i >= 0; index = _ref <= 0 ? ++_i : --_i) {1546 next_fmt = this.formatter_indices[index];1547 len = output - next_fmt - 1;1548 output = next_fmt;1549 input -= len;1550 if (next_fmt + 1 < this.levels.length) {1551 TwitterCldr.Utilities.arraycopy(this.levels, input, this.levels, next_fmt + 1, len);1552 }1553 right_level = output === this.levels.length - 1 ? this.base_embedding : this.levels[output + 1] != null ? this.levels[output + 1] : 0;1554 left_level = input === 0 ? this.base_embedding : this.levels[input] != null ? this.levels[input] : 0;1555 this.levels[output] = TwitterCldr.Utilities.max([left_level, right_level]);1556 }1557 }1558 return this.length = this.levels.length;1559 };1560 Bidi.prototype.run_bidi = function() {1561 this.base_embedding = this.compute_paragraph_embedding_level();1562 this.compute_explicit_levels();1563 this.compute_runs();1564 this.resolve_weak_types();1565 this.resolve_neutral_types();1566 this.resolve_implicit_levels();1567 this.reinsert_formatting_codes();1568 this.compute_runs();1569 };1570 return Bidi;1571 })();1572 TwitterCldr.Calendar = (function() {1573 function Calendar() {}1574 Calendar.calendar = {"additional_formats":{"Ed":"E, d","H":"HH","HHmm":"HH:mm","HHmmss":"HH:mm:ss","Hm":"HH:mm","Hms":"HH:mm:ss","M":"L","MEd":"E, dd/MM","MMM":"LLL","MMMEd":"E, d 'de' MMM","MMMd":"d 'de' MMM","MMdd":"dd/MM","Md":"d/M","d":"d","h":"h a","hm":"h:mm a","hms":"h:mm:ss a","ms":"mm:ss","y":"y","yM":"MM/yyyy","yMEd":"E, dd/MM/yyyy","yMMM":"MMM 'de' y","yMMMEd":"E, d 'de' MMM 'de' y","yMMMd":"d 'de' MMM 'de' y","yMd":"dd/MM/yyyy","yQQQ":"y QQQ","yQQQQ":"y QQQQ","yyMM":"MM/yy","yyMMM":"MMM 'de' yy","yyMMMEd":"E, d 'de' MMM 'de' yy","yyMMMd":"d 'de' MMM 'de' yy","yyQQQ":"QQQ yy","yyyyMM":"MM/yyyy","yyyyMMM":"MMM 'de' y"},"days":{"format":{"abbreviated":{"fri":"sex","mon":"seg","sat":"sáb","sun":"dom","thu":"qui","tue":"ter","wed":"qua"},"narrow":{"fri":"S","mon":"S","sat":"S","sun":"D","thu":"Q","tue":"T","wed":"Q"},"short":{"fri":"sex","mon":"seg","sat":"sáb","sun":"dom","thu":"qui","tue":"ter","wed":"qua"},"wide":{"fri":"sexta-feira","mon":"segunda-feira","sat":"sábado","sun":"domingo","thu":"quinta-feira","tue":"terça-feira","wed":"quarta-feira"}},"stand-alone":{"abbreviated":{"fri":"sex","mon":"seg","sat":"sáb","sun":"dom","thu":"qui","tue":"ter","wed":"qua"},"narrow":{"fri":"S","mon":"S","sat":"S","sun":"D","thu":"Q","tue":"T","wed":"Q"},"short":{"fri":"sex","mon":"seg","sat":"sáb","sun":"dom","thu":"qui","tue":"ter","wed":"qua"},"wide":{"fri":"sexta-feira","mon":"segunda-feira","sat":"sábado","sun":"domingo","thu":"quinta-feira","tue":"terça-feira","wed":"quarta-feira"}}},"eras":{"abbr":{"0":"a.C.","1":"d.C."},"name":{"0":"Antes de Cristo","1":"Ano do Senhor"},"narrow":{"0":""}},"fields":{"day":"Dia","dayperiod":"Período do dia","era":"Era","hour":"Hora","minute":"Minuto","month":"Mês","second":"Segundo","week":"Semana","weekday":"Dia da semana","year":"Ano","zone":"Fuso"},"formats":{"date":{"default":{"pattern":"dd/MM/yyyy"},"full":{"pattern":"EEEE, d 'de' MMMM 'de' y"},"long":{"pattern":"d 'de' MMMM 'de' y"},"medium":{"pattern":"dd/MM/yyyy"},"short":{"pattern":"dd/MM/yy"}},"datetime":{"default":{"pattern":"{{date}} {{time}}"},"full":{"pattern":"{{date}} {{time}}"},"long":{"pattern":"{{date}} {{time}}"},"medium":{"pattern":"{{date}} {{time}}"},"short":{"pattern":"{{date}} {{time}}"}},"time":{"default":{"pattern":"HH:mm:ss"},"full":{"pattern":"HH:mm:ss zzzz"},"long":{"pattern":"HH:mm:ss z"},"medium":{"pattern":"HH:mm:ss"},"short":{"pattern":"HH:mm"}}},"months":{"format":{"abbreviated":{"1":"jan","10":"out","11":"nov","12":"dez","2":"fev","3":"mar","4":"abr","5":"mai","6":"jun","7":"jul","8":"ago","9":"set"},"narrow":{"1":"J","10":"O","11":"N","12":"D","2":"F","3":"M","4":"A","5":"M","6":"J","7":"J","8":"A","9":"S"},"wide":{"1":"janeiro","10":"outubro","11":"novembro","12":"dezembro","2":"fevereiro","3":"março","4":"abril","5":"maio","6":"junho","7":"julho","8":"agosto","9":"setembro"}},"stand-alone":{"abbreviated":{"1":"jan","10":"out","11":"nov","12":"dez","2":"fev","3":"mar","4":"abr","5":"mai","6":"jun","7":"jul","8":"ago","9":"set"},"narrow":{"1":"J","10":"O","11":"N","12":"D","2":"F","3":"M","4":"A","5":"M","6":"J","7":"J","8":"A","9":"S"},"wide":{"1":"janeiro","10":"outubro","11":"novembro","12":"dezembro","2":"fevereiro","3":"março","4":"abril","5":"maio","6":"junho","7":"julho","8":"agosto","9":"setembro"}}},"periods":{"format":{"abbreviated":{"am":"AM","pm":"PM"},"narrow":{"am":"a","pm":"p"},"wide":{"afternoon":"tarde","am":"AM","morning":"manhã","night":"noite","noon":"meio-dia","pm":"PM"}},"stand-alone":{"abbreviated":{"afternoon":"tarde","morning":"manhã","night":"noite","noon":"meia-noite"}}},"quarters":{"format":{"abbreviated":{"1":"T1","2":"T2","3":"T3","4":"T4"},"narrow":{"1":1,"2":2,"3":3,"4":4},"wide":{"1":"1º trimestre","2":"2º trimestre","3":"3º trimestre","4":"4º trimestre"}},"stand-alone":{"abbreviated":{"1":"T1","2":"T2","3":"T3","4":"T4"},"narrow":{"1":1,"2":2,"3":3,"4":4},"wide":{"1":"1º trimestre","2":"2º trimestre","3":"3º trimestre","4":"4º trimestre"}}}};1575 Calendar.months = function(options) {1576 var key, result, root, val;1577 if (options == null) {1578 options = {};1579 }1580 root = this.get_root("months", options);1581 result = [];1582 for (key in root) {1583 val = root[key];1584 result[parseInt(key) - 1] = val;1585 }1586 return result;1587 };1588 Calendar.weekdays = function(options) {1589 if (options == null) {1590 options = {};1591 }1592 return this.get_root("days", options);1593 };1594 Calendar.get_root = function(key, options) {1595 var format, names_form, root, _ref;1596 if (options == null) {1597 options = {};1598 }1599 root = this.calendar[key];1600 names_form = options["names_form"] || "wide";1601 format = options.format || ((root != null ? (_ref = root["stand-alone"]) != null ? _ref[names_form] : void 0 : void 0) != null ? "stand-alone" : "format");1602 return root[format][names_form];1603 };1604 return Calendar;1605 })();1606 root = typeof exports !== "undefined" && exports !== null ? exports : (this.TwitterCldr = {}, this.TwitterCldr);1607 for (key in TwitterCldr) {1608 obj = TwitterCldr[key];1609 root[key] = obj;1610 }...

Full Screen

Full Screen

en.js

Source:en.js Github

copy

Full Screen

1/*2// Copyright 2012 Twitter, Inc3// http://www.apache.org/licenses/LICENSE-2.04// TwitterCLDR (JavaScript) v2.1.05// Authors: Cameron Dutro [@camertron]6 Kirill Lashuk [@KL_7]7 portions by Sven Fuchs [@svenfuchs]8// Homepage: https://twitter.com9// Description: Provides date, time, number, and list formatting functionality for various Twitter-supported locales in Javascript.10*/11/*-module-*/12/*_lib/twitter_cldr_*/13(function() {14 var TwitterCldr, key, obj, root,15 __hasProp = {}.hasOwnProperty,16 __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; };17 TwitterCldr = {};18 TwitterCldr.is_rtl = false;19 TwitterCldr.Utilities = (function() {20 function Utilities() {}21 Utilities.from_char_code = function(code_point) {22 if (code_point > 0xFFFF) {23 code_point -= 0x10000;24 return String.fromCharCode(0xD800 + (code_point >> 10), 0xDC00 + (code_point & 0x3FF));25 } else {26 return String.fromCharCode(code_point);27 }28 };29 Utilities.char_code_at = function(str, idx) {30 var code, end, hi, li, low, surrogatePairs;31 str += '';32 end = str.length;33 surrogatePairs = /[\uD800-\uDBFF][\uDC00-\uDFFF]/g;34 while (surrogatePairs.exec(str) !== null) {35 li = surrogatePairs.lastIndex;36 if (li - 2 < idx) {37 idx += 1;38 } else {39 break;40 }41 }42 if ((idx >= end) || (idx < 0)) {43 return NaN;44 }45 code = str.charCodeAt(idx);46 if ((0xD800 <= code) && (code <= 0xDBFF)) {47 hi = code;48 low = str.charCodeAt(idx + 1);49 return ((hi - 0xD800) * 0x400) + (low - 0xDC00) + 0x10000;50 }51 return code;52 };53 Utilities.unpack_string = function(str) {54 var code_point, idx, result, _i, _ref;55 result = [];56 for (idx = _i = 0, _ref = str.length; 0 <= _ref ? _i < _ref : _i > _ref; idx = 0 <= _ref ? ++_i : --_i) {57 code_point = this.char_code_at(str, idx);58 if (!code_point) {59 break;60 }61 result.push(code_point);62 }63 return result;64 };65 Utilities.pack_array = function(char_arr) {66 var cur_char;67 return ((function() {68 var _i, _len, _results;69 _results = [];70 for (_i = 0, _len = char_arr.length; _i < _len; _i++) {71 cur_char = char_arr[_i];72 _results.push(this.from_char_code(cur_char));73 }74 return _results;75 }).call(this)).join("");76 };77 Utilities.arraycopy = function(orig, orig_index, dest, dest_index, length) {78 var count, elem, _i, _len, _ref;79 _ref = orig.slice(orig_index, orig_index + length);80 for (count = _i = 0, _len = _ref.length; _i < _len; count = ++_i) {81 elem = _ref[count];82 dest[dest_index + count] = elem;83 }84 };85 Utilities.max = function(arr) {86 var elem, i, max, start_index, _i, _j, _len, _ref;87 max = null;88 for (start_index = _i = 0, _len = arr.length; _i < _len; start_index = ++_i) {89 elem = arr[start_index];90 if (elem != null) {91 max = elem;92 break;93 }94 }95 for (i = _j = start_index, _ref = arr.length; start_index <= _ref ? _j <= _ref : _j >= _ref; i = start_index <= _ref ? ++_j : --_j) {96 if (arr[i] > max) {97 max = arr[i];98 }99 }100 return max;101 };102 Utilities.min = function(arr) {103 var elem, i, min, start_index, _i, _j, _len, _ref;104 min = null;105 for (start_index = _i = 0, _len = arr.length; _i < _len; start_index = ++_i) {106 elem = arr[start_index];107 if (elem != null) {108 min = elem;109 break;110 }111 }112 for (i = _j = start_index, _ref = arr.length; start_index <= _ref ? _j <= _ref : _j >= _ref; i = start_index <= _ref ? ++_j : --_j) {113 if (arr[i] < min) {114 min = arr[i];115 }116 }117 return min;118 };119 Utilities.is_even = function(num) {120 return num % 2 === 0;121 };122 Utilities.is_odd = function(num) {123 return num % 2 === 1;124 };125 return Utilities;126 })();127 TwitterCldr.PluralRules = (function() {128 function PluralRules() {}129 PluralRules.rules = {"keys": ["one","other"], "rule": function(n) { return (function() { if (n == 1) { return "one" } else { return "other" } })(); }};130 PluralRules.all = function() {131 return this.rules.keys;132 };133 PluralRules.rule_for = function(number) {134 try {135 return this.rules.rule(number);136 } catch (error) {137 return "other";138 }139 };140 return PluralRules;141 })();142 TwitterCldr.TimespanFormatter = (function() {143 function TimespanFormatter() {144 this.approximate_multiplier = 0.75;145 this.default_type = "default";146 this.tokens = {"ago":{"second":{"default":{"one":[{"value":"{0}","type":"placeholder"},{"value":" second ago","type":"plaintext"}],"other":[{"value":"{0}","type":"placeholder"},{"value":" seconds ago","type":"plaintext"}]}},"minute":{"default":{"one":[{"value":"{0}","type":"placeholder"},{"value":" minute ago","type":"plaintext"}],"other":[{"value":"{0}","type":"placeholder"},{"value":" minutes ago","type":"plaintext"}]}},"hour":{"default":{"one":[{"value":"{0}","type":"placeholder"},{"value":" hour ago","type":"plaintext"}],"other":[{"value":"{0}","type":"placeholder"},{"value":" hours ago","type":"plaintext"}]}},"day":{"default":{"one":[{"value":"{0}","type":"placeholder"},{"value":" day ago","type":"plaintext"}],"other":[{"value":"{0}","type":"placeholder"},{"value":" days ago","type":"plaintext"}]}},"week":{"default":{"one":[{"value":"{0}","type":"placeholder"},{"value":" week ago","type":"plaintext"}],"other":[{"value":"{0}","type":"placeholder"},{"value":" weeks ago","type":"plaintext"}]}},"month":{"default":{"one":[{"value":"{0}","type":"placeholder"},{"value":" month ago","type":"plaintext"}],"other":[{"value":"{0}","type":"placeholder"},{"value":" months ago","type":"plaintext"}]}},"year":{"default":{"one":[{"value":"{0}","type":"placeholder"},{"value":" year ago","type":"plaintext"}],"other":[{"value":"{0}","type":"placeholder"},{"value":" years ago","type":"plaintext"}]}}},"until":{"second":{"default":{"one":[{"value":"In ","type":"plaintext"},{"value":"{0}","type":"placeholder"},{"value":" second","type":"plaintext"}],"other":[{"value":"In ","type":"plaintext"},{"value":"{0}","type":"placeholder"},{"value":" seconds","type":"plaintext"}]}},"minute":{"default":{"one":[{"value":"In ","type":"plaintext"},{"value":"{0}","type":"placeholder"},{"value":" minute","type":"plaintext"}],"other":[{"value":"In ","type":"plaintext"},{"value":"{0}","type":"placeholder"},{"value":" minutes","type":"plaintext"}]}},"hour":{"default":{"one":[{"value":"In ","type":"plaintext"},{"value":"{0}","type":"placeholder"},{"value":" hour","type":"plaintext"}],"other":[{"value":"In ","type":"plaintext"},{"value":"{0}","type":"placeholder"},{"value":" hours","type":"plaintext"}]}},"day":{"default":{"one":[{"value":"In ","type":"plaintext"},{"value":"{0}","type":"placeholder"},{"value":" day","type":"plaintext"}],"other":[{"value":"In ","type":"plaintext"},{"value":"{0}","type":"placeholder"},{"value":" days","type":"plaintext"}]}},"week":{"default":{"one":[{"value":"In ","type":"plaintext"},{"value":"{0}","type":"placeholder"},{"value":" week","type":"plaintext"}],"other":[{"value":"In ","type":"plaintext"},{"value":"{0}","type":"placeholder"},{"value":" weeks","type":"plaintext"}]}},"month":{"default":{"one":[{"value":"In ","type":"plaintext"},{"value":"{0}","type":"placeholder"},{"value":" month","type":"plaintext"}],"other":[{"value":"In ","type":"plaintext"},{"value":"{0}","type":"placeholder"},{"value":" months","type":"plaintext"}]}},"year":{"default":{"one":[{"value":"In ","type":"plaintext"},{"value":"{0}","type":"placeholder"},{"value":" year","type":"plaintext"}],"other":[{"value":"In ","type":"plaintext"},{"value":"{0}","type":"placeholder"},{"value":" years","type":"plaintext"}]}}},"none":{"second":{"default":{"one":[{"value":"{0}","type":"placeholder"},{"value":" second","type":"plaintext"}],"other":[{"value":"{0}","type":"placeholder"},{"value":" seconds","type":"plaintext"}]},"short":{"one":[{"value":"{0}","type":"placeholder"},{"value":" sec","type":"plaintext"}],"other":[{"value":"{0}","type":"placeholder"},{"value":" secs","type":"plaintext"}]},"abbreviated":{"one":[{"value":"{0}","type":"placeholder"},{"value":"s","type":"plaintext"}],"other":[{"value":"{0}","type":"placeholder"},{"value":"s","type":"plaintext"}]}},"minute":{"default":{"one":[{"value":"{0}","type":"placeholder"},{"value":" minute","type":"plaintext"}],"other":[{"value":"{0}","type":"placeholder"},{"value":" minutes","type":"plaintext"}]},"short":{"one":[{"value":"{0}","type":"placeholder"},{"value":" min","type":"plaintext"}],"other":[{"value":"{0}","type":"placeholder"},{"value":" mins","type":"plaintext"}]},"abbreviated":{"one":[{"value":"{0}","type":"placeholder"},{"value":"m","type":"plaintext"}],"other":[{"value":"{0}","type":"placeholder"},{"value":"m","type":"plaintext"}]}},"hour":{"default":{"one":[{"value":"{0}","type":"placeholder"},{"value":" hour","type":"plaintext"}],"other":[{"value":"{0}","type":"placeholder"},{"value":" hours","type":"plaintext"}]},"short":{"one":[{"value":"{0}","type":"placeholder"},{"value":" hr","type":"plaintext"}],"other":[{"value":"{0}","type":"placeholder"},{"value":" hrs","type":"plaintext"}]},"abbreviated":{"one":[{"value":"{0}","type":"placeholder"},{"value":"h","type":"plaintext"}],"other":[{"value":"{0}","type":"placeholder"},{"value":"h","type":"plaintext"}]}},"day":{"default":{"one":[{"value":"{0}","type":"placeholder"},{"value":" day","type":"plaintext"}],"other":[{"value":"{0}","type":"placeholder"},{"value":" days","type":"plaintext"}]},"short":{"one":[{"value":"{0}","type":"placeholder"},{"value":" day","type":"plaintext"}],"other":[{"value":"{0}","type":"placeholder"},{"value":" days","type":"plaintext"}]},"abbreviated":{"one":[{"value":"{0}","type":"placeholder"},{"value":"d","type":"plaintext"}],"other":[{"value":"{0}","type":"placeholder"},{"value":"d","type":"plaintext"}]}},"week":{"default":{"one":[{"value":"{0}","type":"placeholder"},{"value":" week","type":"plaintext"}],"other":[{"value":"{0}","type":"placeholder"},{"value":" weeks","type":"plaintext"}]},"short":{"one":[{"value":"{0}","type":"placeholder"},{"value":" wk","type":"plaintext"}],"other":[{"value":"{0}","type":"placeholder"},{"value":" wks","type":"plaintext"}]}},"month":{"default":{"one":[{"value":"{0}","type":"placeholder"},{"value":" month","type":"plaintext"}],"other":[{"value":"{0}","type":"placeholder"},{"value":" months","type":"plaintext"}]},"short":{"one":[{"value":"{0}","type":"placeholder"},{"value":" mth","type":"plaintext"}],"other":[{"value":"{0}","type":"placeholder"},{"value":" mths","type":"plaintext"}]}},"year":{"default":{"one":[{"value":"{0}","type":"placeholder"},{"value":" year","type":"plaintext"}],"other":[{"value":"{0}","type":"placeholder"},{"value":" years","type":"plaintext"}]},"short":{"one":[{"value":"{0}","type":"placeholder"},{"value":" yr","type":"plaintext"}],"other":[{"value":"{0}","type":"placeholder"},{"value":" yrs","type":"plaintext"}]}}}};147 this.time_in_seconds = {148 "second": 1,149 "minute": 60,150 "hour": 3600,151 "day": 86400,152 "week": 604800,153 "month": 2629743.83,154 "year": 31556926155 };156 }157 TimespanFormatter.prototype.format = function(seconds, fmt_options) {158 var key, number, obj, options, strings, token;159 if (fmt_options == null) {160 fmt_options = {};161 }162 options = {};163 for (key in fmt_options) {164 obj = fmt_options[key];165 options[key] = obj;166 }167 options["direction"] || (options["direction"] = (seconds < 0 ? "ago" : "until"));168 if (options["unit"] === null || options["unit"] === void 0) {169 options["unit"] = this.calculate_unit(Math.abs(seconds), options);170 }171 options["type"] || (options["type"] = this.default_type);172 options["number"] = this.calculate_time(Math.abs(seconds), options["unit"]);173 number = this.calculate_time(Math.abs(seconds), options["unit"]);174 options["rule"] = TwitterCldr.PluralRules.rule_for(number);175 strings = (function() {176 var _i, _len, _ref, _results;177 _ref = this.tokens[options["direction"]][options["unit"]][options["type"]][options["rule"]];178 _results = [];179 for (_i = 0, _len = _ref.length; _i < _len; _i++) {180 token = _ref[_i];181 _results.push(token.value);182 }183 return _results;184 }).call(this);185 return strings.join("").replace(/\{[0-9]\}/, number.toString());186 };187 TimespanFormatter.prototype.calculate_unit = function(seconds, unit_options) {188 var key, multiplier, obj, options;189 if (unit_options == null) {190 unit_options = {};191 }192 options = {};193 for (key in unit_options) {194 obj = unit_options[key];195 options[key] = obj;196 }197 if (options.approximate == null) {198 options["approximate"] = false;199 }200 multiplier = options.approximate ? this.approximate_multiplier : 1;201 if (seconds < (this.time_in_seconds.minute * multiplier)) {202 return "second";203 } else if (seconds < (this.time_in_seconds.hour * multiplier)) {204 return "minute";205 } else if (seconds < (this.time_in_seconds.day * multiplier)) {206 return "hour";207 } else if (seconds < (this.time_in_seconds.week * multiplier)) {208 return "day";209 } else if (seconds < (this.time_in_seconds.month * multiplier)) {210 return "week";211 } else if (seconds < (this.time_in_seconds.year * multiplier)) {212 return "month";213 } else {214 return "year";215 }216 };217 TimespanFormatter.prototype.calculate_time = function(seconds, unit) {218 return Math.round(seconds / this.time_in_seconds[unit]);219 };220 return TimespanFormatter;221 })();222 TwitterCldr.DateTimeFormatter = (function() {223 function DateTimeFormatter() {224 this.tokens = {"date_time":{"default":[{"value":"MMM","type":"pattern"},{"value":" ","type":"plaintext"},{"value":"d","type":"pattern"},{"value":", ","type":"plaintext"},{"value":"y","type":"pattern"},{"value":",","type":"plaintext"},{"value":" ","type":"plaintext"},{"value":"h","type":"pattern"},{"value":":","type":"plaintext"},{"value":"mm","type":"pattern"},{"value":":","type":"plaintext"},{"value":"ss","type":"pattern"},{"value":" ","type":"plaintext"},{"value":"a","type":"pattern"}],"full":[{"value":"EEEE","type":"pattern"},{"value":", ","type":"plaintext"},{"value":"MMMM","type":"pattern"},{"value":" ","type":"plaintext"},{"value":"d","type":"pattern"},{"value":", ","type":"plaintext"},{"value":"y","type":"pattern"},{"value":" ","type":"plaintext"},{"value":"'at'","type":"plaintext"},{"value":" ","type":"plaintext"},{"value":"h","type":"pattern"},{"value":":","type":"plaintext"},{"value":"mm","type":"pattern"},{"value":":","type":"plaintext"},{"value":"ss","type":"pattern"},{"value":" ","type":"plaintext"},{"value":"a","type":"pattern"},{"value":" ","type":"plaintext"},{"value":"zzzz","type":"pattern"}],"long":[{"value":"MMMM","type":"pattern"},{"value":" ","type":"plaintext"},{"value":"d","type":"pattern"},{"value":", ","type":"plaintext"},{"value":"y","type":"pattern"},{"value":" ","type":"plaintext"},{"value":"'at'","type":"plaintext"},{"value":" ","type":"plaintext"},{"value":"h","type":"pattern"},{"value":":","type":"plaintext"},{"value":"mm","type":"pattern"},{"value":":","type":"plaintext"},{"value":"ss","type":"pattern"},{"value":" ","type":"plaintext"},{"value":"a","type":"pattern"},{"value":" ","type":"plaintext"},{"value":"z","type":"pattern"}],"medium":[{"value":"MMM","type":"pattern"},{"value":" ","type":"plaintext"},{"value":"d","type":"pattern"},{"value":", ","type":"plaintext"},{"value":"y","type":"pattern"},{"value":",","type":"plaintext"},{"value":" ","type":"plaintext"},{"value":"h","type":"pattern"},{"value":":","type":"plaintext"},{"value":"mm","type":"pattern"},{"value":":","type":"plaintext"},{"value":"ss","type":"pattern"},{"value":" ","type":"plaintext"},{"value":"a","type":"pattern"}],"short":[{"value":"M","type":"pattern"},{"value":"/","type":"plaintext"},{"value":"d","type":"pattern"},{"value":"/","type":"plaintext"},{"value":"yy","type":"pattern"},{"value":",","type":"plaintext"},{"value":" ","type":"plaintext"},{"value":"h","type":"pattern"},{"value":":","type":"plaintext"},{"value":"mm","type":"pattern"},{"value":" ","type":"plaintext"},{"value":"a","type":"pattern"}],"additional":{"EHm":[{"value":"E","type":"pattern"},{"value":" ","type":"plaintext"},{"value":"HH","type":"pattern"},{"value":":","type":"plaintext"},{"value":"mm","type":"pattern"}],"EHms":[{"value":"E","type":"pattern"},{"value":" ","type":"plaintext"},{"value":"HH","type":"pattern"},{"value":":","type":"plaintext"},{"value":"mm","type":"pattern"},{"value":":","type":"plaintext"},{"value":"ss","type":"pattern"}],"Ed":[{"value":"d","type":"pattern"},{"value":" ","type":"plaintext"},{"value":"E","type":"pattern"}],"Ehm":[{"value":"E","type":"pattern"},{"value":" ","type":"plaintext"},{"value":"h","type":"pattern"},{"value":":","type":"plaintext"},{"value":"mm","type":"pattern"},{"value":" ","type":"plaintext"},{"value":"a","type":"pattern"}],"Ehms":[{"value":"E","type":"pattern"},{"value":" ","type":"plaintext"},{"value":"h","type":"pattern"},{"value":":","type":"plaintext"},{"value":"mm","type":"pattern"},{"value":":","type":"plaintext"},{"value":"ss","type":"pattern"},{"value":" ","type":"plaintext"},{"value":"a","type":"pattern"}],"Gy":[{"value":"y","type":"pattern"},{"value":" ","type":"plaintext"},{"value":"G","type":"pattern"}],"H":[{"value":"HH","type":"pattern"}],"Hm":[{"value":"HH","type":"pattern"},{"value":":","type":"plaintext"},{"value":"mm","type":"pattern"}],"Hms":[{"value":"HH","type":"pattern"},{"value":":","type":"plaintext"},{"value":"mm","type":"pattern"},{"value":":","type":"plaintext"},{"value":"ss","type":"pattern"}],"M":[{"value":"L","type":"pattern"}],"MEd":[{"value":"E","type":"pattern"},{"value":", ","type":"plaintext"},{"value":"M","type":"pattern"},{"value":"/","type":"plaintext"},{"value":"d","type":"pattern"}],"MMM":[{"value":"LLL","type":"pattern"}],"MMMEd":[{"value":"E","type":"pattern"},{"value":", ","type":"plaintext"},{"value":"MMM","type":"pattern"},{"value":" ","type":"plaintext"},{"value":"d","type":"pattern"}],"MMMd":[{"value":"MMM","type":"pattern"},{"value":" ","type":"plaintext"},{"value":"d","type":"pattern"}],"Md":[{"value":"M","type":"pattern"},{"value":"/","type":"plaintext"},{"value":"d","type":"pattern"}],"d":[{"value":"d","type":"pattern"}],"h":[{"value":"h","type":"pattern"},{"value":" ","type":"plaintext"},{"value":"a","type":"pattern"}],"hm":[{"value":"h","type":"pattern"},{"value":":","type":"plaintext"},{"value":"mm","type":"pattern"},{"value":" ","type":"plaintext"},{"value":"a","type":"pattern"}],"hms":[{"value":"h","type":"pattern"},{"value":":","type":"plaintext"},{"value":"mm","type":"pattern"},{"value":":","type":"plaintext"},{"value":"ss","type":"pattern"},{"value":" ","type":"plaintext"},{"value":"a","type":"pattern"}],"ms":[{"value":"mm","type":"pattern"},{"value":":","type":"plaintext"},{"value":"ss","type":"pattern"}],"y":[{"value":"y","type":"pattern"}],"yM":[{"value":"M","type":"pattern"},{"value":"/","type":"plaintext"},{"value":"y","type":"pattern"}],"yMEd":[{"value":"E","type":"pattern"},{"value":", ","type":"plaintext"},{"value":"M","type":"pattern"},{"value":"/","type":"plaintext"},{"value":"d","type":"pattern"},{"value":"/","type":"plaintext"},{"value":"y","type":"pattern"}],"yMMM":[{"value":"MMM","type":"pattern"},{"value":" ","type":"plaintext"},{"value":"y","type":"pattern"}],"yMMMEd":[{"value":"E","type":"pattern"},{"value":", ","type":"plaintext"},{"value":"MMM","type":"pattern"},{"value":" ","type":"plaintext"},{"value":"d","type":"pattern"},{"value":", ","type":"plaintext"},{"value":"y","type":"pattern"}],"yMMMd":[{"value":"MMM","type":"pattern"},{"value":" ","type":"plaintext"},{"value":"d","type":"pattern"},{"value":", ","type":"plaintext"},{"value":"y","type":"pattern"}],"yMd":[{"value":"M","type":"pattern"},{"value":"/","type":"plaintext"},{"value":"d","type":"pattern"},{"value":"/","type":"plaintext"},{"value":"y","type":"pattern"}],"yQQQ":[{"value":"QQQ","type":"pattern"},{"value":" ","type":"plaintext"},{"value":"y","type":"pattern"}],"yQQQQ":[{"value":"QQQQ","type":"pattern"},{"value":" ","type":"plaintext"},{"value":"y","type":"pattern"}]}},"time":{"default":[{"value":"h","type":"pattern"},{"value":":","type":"plaintext"},{"value":"mm","type":"pattern"},{"value":":","type":"plaintext"},{"value":"ss","type":"pattern"},{"value":" ","type":"plaintext"},{"value":"a","type":"pattern"}],"full":[{"value":"h","type":"pattern"},{"value":":","type":"plaintext"},{"value":"mm","type":"pattern"},{"value":":","type":"plaintext"},{"value":"ss","type":"pattern"},{"value":" ","type":"plaintext"},{"value":"a","type":"pattern"},{"value":" ","type":"plaintext"},{"value":"zzzz","type":"pattern"}],"long":[{"value":"h","type":"pattern"},{"value":":","type":"plaintext"},{"value":"mm","type":"pattern"},{"value":":","type":"plaintext"},{"value":"ss","type":"pattern"},{"value":" ","type":"plaintext"},{"value":"a","type":"pattern"},{"value":" ","type":"plaintext"},{"value":"z","type":"pattern"}],"medium":[{"value":"h","type":"pattern"},{"value":":","type":"plaintext"},{"value":"mm","type":"pattern"},{"value":":","type":"plaintext"},{"value":"ss","type":"pattern"},{"value":" ","type":"plaintext"},{"value":"a","type":"pattern"}],"short":[{"value":"h","type":"pattern"},{"value":":","type":"plaintext"},{"value":"mm","type":"pattern"},{"value":" ","type":"plaintext"},{"value":"a","type":"pattern"}],"additional":{"EHm":[{"value":"E","type":"pattern"},{"value":" ","type":"plaintext"},{"value":"HH","type":"pattern"},{"value":":","type":"plaintext"},{"value":"mm","type":"pattern"}],"EHms":[{"value":"E","type":"pattern"},{"value":" ","type":"plaintext"},{"value":"HH","type":"pattern"},{"value":":","type":"plaintext"},{"value":"mm","type":"pattern"},{"value":":","type":"plaintext"},{"value":"ss","type":"pattern"}],"Ed":[{"value":"d","type":"pattern"},{"value":" ","type":"plaintext"},{"value":"E","type":"pattern"}],"Ehm":[{"value":"E","type":"pattern"},{"value":" ","type":"plaintext"},{"value":"h","type":"pattern"},{"value":":","type":"plaintext"},{"value":"mm","type":"pattern"},{"value":" ","type":"plaintext"},{"value":"a","type":"pattern"}],"Ehms":[{"value":"E","type":"pattern"},{"value":" ","type":"plaintext"},{"value":"h","type":"pattern"},{"value":":","type":"plaintext"},{"value":"mm","type":"pattern"},{"value":":","type":"plaintext"},{"value":"ss","type":"pattern"},{"value":" ","type":"plaintext"},{"value":"a","type":"pattern"}],"Gy":[{"value":"y","type":"pattern"},{"value":" ","type":"plaintext"},{"value":"G","type":"pattern"}],"H":[{"value":"HH","type":"pattern"}],"Hm":[{"value":"HH","type":"pattern"},{"value":":","type":"plaintext"},{"value":"mm","type":"pattern"}],"Hms":[{"value":"HH","type":"pattern"},{"value":":","type":"plaintext"},{"value":"mm","type":"pattern"},{"value":":","type":"plaintext"},{"value":"ss","type":"pattern"}],"M":[{"value":"L","type":"pattern"}],"MEd":[{"value":"E","type":"pattern"},{"value":", ","type":"plaintext"},{"value":"M","type":"pattern"},{"value":"/","type":"plaintext"},{"value":"d","type":"pattern"}],"MMM":[{"value":"LLL","type":"pattern"}],"MMMEd":[{"value":"E","type":"pattern"},{"value":", ","type":"plaintext"},{"value":"MMM","type":"pattern"},{"value":" ","type":"plaintext"},{"value":"d","type":"pattern"}],"MMMd":[{"value":"MMM","type":"pattern"},{"value":" ","type":"plaintext"},{"value":"d","type":"pattern"}],"Md":[{"value":"M","type":"pattern"},{"value":"/","type":"plaintext"},{"value":"d","type":"pattern"}],"d":[{"value":"d","type":"pattern"}],"h":[{"value":"h","type":"pattern"},{"value":" ","type":"plaintext"},{"value":"a","type":"pattern"}],"hm":[{"value":"h","type":"pattern"},{"value":":","type":"plaintext"},{"value":"mm","type":"pattern"},{"value":" ","type":"plaintext"},{"value":"a","type":"pattern"}],"hms":[{"value":"h","type":"pattern"},{"value":":","type":"plaintext"},{"value":"mm","type":"pattern"},{"value":":","type":"plaintext"},{"value":"ss","type":"pattern"},{"value":" ","type":"plaintext"},{"value":"a","type":"pattern"}],"ms":[{"value":"mm","type":"pattern"},{"value":":","type":"plaintext"},{"value":"ss","type":"pattern"}],"y":[{"value":"y","type":"pattern"}],"yM":[{"value":"M","type":"pattern"},{"value":"/","type":"plaintext"},{"value":"y","type":"pattern"}],"yMEd":[{"value":"E","type":"pattern"},{"value":", ","type":"plaintext"},{"value":"M","type":"pattern"},{"value":"/","type":"plaintext"},{"value":"d","type":"pattern"},{"value":"/","type":"plaintext"},{"value":"y","type":"pattern"}],"yMMM":[{"value":"MMM","type":"pattern"},{"value":" ","type":"plaintext"},{"value":"y","type":"pattern"}],"yMMMEd":[{"value":"E","type":"pattern"},{"value":", ","type":"plaintext"},{"value":"MMM","type":"pattern"},{"value":" ","type":"plaintext"},{"value":"d","type":"pattern"},{"value":", ","type":"plaintext"},{"value":"y","type":"pattern"}],"yMMMd":[{"value":"MMM","type":"pattern"},{"value":" ","type":"plaintext"},{"value":"d","type":"pattern"},{"value":", ","type":"plaintext"},{"value":"y","type":"pattern"}],"yMd":[{"value":"M","type":"pattern"},{"value":"/","type":"plaintext"},{"value":"d","type":"pattern"},{"value":"/","type":"plaintext"},{"value":"y","type":"pattern"}],"yQQQ":[{"value":"QQQ","type":"pattern"},{"value":" ","type":"plaintext"},{"value":"y","type":"pattern"}],"yQQQQ":[{"value":"QQQQ","type":"pattern"},{"value":" ","type":"plaintext"},{"value":"y","type":"pattern"}]}},"date":{"default":[{"value":"MMM","type":"pattern"},{"value":" ","type":"plaintext"},{"value":"d","type":"pattern"},{"value":", ","type":"plaintext"},{"value":"y","type":"pattern"}],"full":[{"value":"EEEE","type":"pattern"},{"value":", ","type":"plaintext"},{"value":"MMMM","type":"pattern"},{"value":" ","type":"plaintext"},{"value":"d","type":"pattern"},{"value":", ","type":"plaintext"},{"value":"y","type":"pattern"}],"long":[{"value":"MMMM","type":"pattern"},{"value":" ","type":"plaintext"},{"value":"d","type":"pattern"},{"value":", ","type":"plaintext"},{"value":"y","type":"pattern"}],"medium":[{"value":"MMM","type":"pattern"},{"value":" ","type":"plaintext"},{"value":"d","type":"pattern"},{"value":", ","type":"plaintext"},{"value":"y","type":"pattern"}],"short":[{"value":"M","type":"pattern"},{"value":"/","type":"plaintext"},{"value":"d","type":"pattern"},{"value":"/","type":"plaintext"},{"value":"yy","type":"pattern"}],"additional":{"EHm":[{"value":"E","type":"pattern"},{"value":" ","type":"plaintext"},{"value":"HH","type":"pattern"},{"value":":","type":"plaintext"},{"value":"mm","type":"pattern"}],"EHms":[{"value":"E","type":"pattern"},{"value":" ","type":"plaintext"},{"value":"HH","type":"pattern"},{"value":":","type":"plaintext"},{"value":"mm","type":"pattern"},{"value":":","type":"plaintext"},{"value":"ss","type":"pattern"}],"Ed":[{"value":"d","type":"pattern"},{"value":" ","type":"plaintext"},{"value":"E","type":"pattern"}],"Ehm":[{"value":"E","type":"pattern"},{"value":" ","type":"plaintext"},{"value":"h","type":"pattern"},{"value":":","type":"plaintext"},{"value":"mm","type":"pattern"},{"value":" ","type":"plaintext"},{"value":"a","type":"pattern"}],"Ehms":[{"value":"E","type":"pattern"},{"value":" ","type":"plaintext"},{"value":"h","type":"pattern"},{"value":":","type":"plaintext"},{"value":"mm","type":"pattern"},{"value":":","type":"plaintext"},{"value":"ss","type":"pattern"},{"value":" ","type":"plaintext"},{"value":"a","type":"pattern"}],"Gy":[{"value":"y","type":"pattern"},{"value":" ","type":"plaintext"},{"value":"G","type":"pattern"}],"H":[{"value":"HH","type":"pattern"}],"Hm":[{"value":"HH","type":"pattern"},{"value":":","type":"plaintext"},{"value":"mm","type":"pattern"}],"Hms":[{"value":"HH","type":"pattern"},{"value":":","type":"plaintext"},{"value":"mm","type":"pattern"},{"value":":","type":"plaintext"},{"value":"ss","type":"pattern"}],"M":[{"value":"L","type":"pattern"}],"MEd":[{"value":"E","type":"pattern"},{"value":", ","type":"plaintext"},{"value":"M","type":"pattern"},{"value":"/","type":"plaintext"},{"value":"d","type":"pattern"}],"MMM":[{"value":"LLL","type":"pattern"}],"MMMEd":[{"value":"E","type":"pattern"},{"value":", ","type":"plaintext"},{"value":"MMM","type":"pattern"},{"value":" ","type":"plaintext"},{"value":"d","type":"pattern"}],"MMMd":[{"value":"MMM","type":"pattern"},{"value":" ","type":"plaintext"},{"value":"d","type":"pattern"}],"Md":[{"value":"M","type":"pattern"},{"value":"/","type":"plaintext"},{"value":"d","type":"pattern"}],"d":[{"value":"d","type":"pattern"}],"h":[{"value":"h","type":"pattern"},{"value":" ","type":"plaintext"},{"value":"a","type":"pattern"}],"hm":[{"value":"h","type":"pattern"},{"value":":","type":"plaintext"},{"value":"mm","type":"pattern"},{"value":" ","type":"plaintext"},{"value":"a","type":"pattern"}],"hms":[{"value":"h","type":"pattern"},{"value":":","type":"plaintext"},{"value":"mm","type":"pattern"},{"value":":","type":"plaintext"},{"value":"ss","type":"pattern"},{"value":" ","type":"plaintext"},{"value":"a","type":"pattern"}],"ms":[{"value":"mm","type":"pattern"},{"value":":","type":"plaintext"},{"value":"ss","type":"pattern"}],"y":[{"value":"y","type":"pattern"}],"yM":[{"value":"M","type":"pattern"},{"value":"/","type":"plaintext"},{"value":"y","type":"pattern"}],"yMEd":[{"value":"E","type":"pattern"},{"value":", ","type":"plaintext"},{"value":"M","type":"pattern"},{"value":"/","type":"plaintext"},{"value":"d","type":"pattern"},{"value":"/","type":"plaintext"},{"value":"y","type":"pattern"}],"yMMM":[{"value":"MMM","type":"pattern"},{"value":" ","type":"plaintext"},{"value":"y","type":"pattern"}],"yMMMEd":[{"value":"E","type":"pattern"},{"value":", ","type":"plaintext"},{"value":"MMM","type":"pattern"},{"value":" ","type":"plaintext"},{"value":"d","type":"pattern"},{"value":", ","type":"plaintext"},{"value":"y","type":"pattern"}],"yMMMd":[{"value":"MMM","type":"pattern"},{"value":" ","type":"plaintext"},{"value":"d","type":"pattern"},{"value":", ","type":"plaintext"},{"value":"y","type":"pattern"}],"yMd":[{"value":"M","type":"pattern"},{"value":"/","type":"plaintext"},{"value":"d","type":"pattern"},{"value":"/","type":"plaintext"},{"value":"y","type":"pattern"}],"yQQQ":[{"value":"QQQ","type":"pattern"},{"value":" ","type":"plaintext"},{"value":"y","type":"pattern"}],"yQQQQ":[{"value":"QQQQ","type":"pattern"},{"value":" ","type":"plaintext"},{"value":"y","type":"pattern"}]}}};225 this.weekday_keys = ["sun", "mon", "tue", "wed", "thu", "fri", "sat"];226 this.methods = {227 'G': 'era',228 'y': 'year',229 'Y': 'year_of_week_of_year',230 'Q': 'quarter',231 'q': 'quarter_stand_alone',232 'M': 'month',233 'L': 'month_stand_alone',234 'w': 'week_of_year',235 'W': 'week_of_month',236 'd': 'day',237 'D': 'day_of_month',238 'F': 'day_of_week_in_month',239 'E': 'weekday',240 'e': 'weekday_local',241 'c': 'weekday_local_stand_alone',242 'a': 'period',243 'h': 'hour',244 'H': 'hour',245 'K': 'hour',246 'k': 'hour',247 'm': 'minute',248 's': 'second',249 'S': 'second_fraction',250 'z': 'timezone',251 'Z': 'timezone',252 'v': 'timezone_generic_non_location',253 'V': 'timezone_metazone'254 };255 }256 DateTimeFormatter.prototype.format = function(obj, options) {257 var format_token, token, tokens,258 _this = this;259 format_token = function(token) {260 var result;261 result = "";262 switch (token.type) {263 case "pattern":264 return _this.result_for_token(token, obj);265 default:266 if (token.value.length > 0 && token.value[0] === "'" && token.value[token.value.length - 1] === "'") {267 return token.value.substring(1, token.value.length - 1);268 } else {269 return token.value;270 }271 }272 };273 tokens = this.get_tokens(obj, options);274 return ((function() {275 var _i, _len, _results;276 _results = [];277 for (_i = 0, _len = tokens.length; _i < _len; _i++) {278 token = tokens[_i];279 _results.push(format_token(token));280 }281 return _results;282 })()).join("");283 };284 DateTimeFormatter.prototype.get_tokens = function(obj, options) {285 var format, type;286 format = options.format || "date_time";287 type = options.type || "default";288 if (format === "additional") {289 return this.tokens["date_time"][format][this.additional_format_selector().find_closest(options.type)];290 } else {291 return this.tokens[format][type];292 }293 };294 DateTimeFormatter.prototype.result_for_token = function(token, date) {295 return this[this.methods[token.value[0]]](date, token.value, token.value.length);296 };297 DateTimeFormatter.prototype.additional_format_selector = function() {298 return new TwitterCldr.AdditionalDateFormatSelector(this.tokens["date_time"]["additional"]);299 };300 DateTimeFormatter.additional_formats = function() {301 return new TwitterCldr.DateTimeFormatter().additional_format_selector().patterns();302 };303 DateTimeFormatter.prototype.era = function(date, pattern, length) {304 var choices, index, result;305 switch (length) {306 case 0:307 choices = ["", ""];308 break;309 case 1:310 case 2:311 case 3:312 choices = TwitterCldr.Calendar.calendar["eras"]["abbr"];313 break;314 default:315 choices = TwitterCldr.Calendar.calendar["eras"]["name"];316 }317 index = date.getFullYear() < 0 ? 0 : 1;318 result = choices[index];319 if (result != null) {320 return result;321 } else {322 return this.era(date, pattern.slice(0, -1), length - 1);323 }324 };325 DateTimeFormatter.prototype.year = function(date, pattern, length) {326 var year;327 year = date.getFullYear().toString();328 if (length === 2) {329 if (year.length !== 1) {330 year = year.slice(-2);331 }332 }333 if (length > 1) {334 year = ("0000" + year).slice(-length);335 }336 return year;337 };338 DateTimeFormatter.prototype.year_of_week_of_year = function(date, pattern, length) {339 throw 'not implemented';340 };341 DateTimeFormatter.prototype.day_of_week_in_month = function(date, pattern, length) {342 throw 'not implemented';343 };344 DateTimeFormatter.prototype.quarter = function(date, pattern, length) {345 var quarter;346 quarter = ((date.getMonth() / 3) | 0) + 1;347 switch (length) {348 case 1:349 return quarter.toString();350 case 2:351 return ("0000" + quarter.toString()).slice(-length);352 case 3:353 return TwitterCldr.Calendar.calendar.quarters.format.abbreviated[quarter];354 case 4:355 return TwitterCldr.Calendar.calendar.quarters.format.wide[quarter];356 }357 };358 DateTimeFormatter.prototype.quarter_stand_alone = function(date, pattern, length) {359 var quarter;360 quarter = (date.getMonth() - 1) / 3 + 1;361 switch (length) {362 case 1:363 return quarter.toString();364 case 2:365 return ("0000" + quarter.toString()).slice(-length);366 case 3:367 throw 'not yet implemented (requires cldr\'s "multiple inheritance")';368 break;369 case 4:370 throw 'not yet implemented (requires cldr\'s "multiple inheritance")';371 break;372 case 5:373 return TwitterCldr.Calendar.calendar.quarters['stand-alone'].narrow[quarter];374 }375 };376 DateTimeFormatter.prototype.month = function(date, pattern, length) {377 var month_str;378 month_str = (date.getMonth() + 1).toString();379 switch (length) {380 case 1:381 return month_str;382 case 2:383 return ("0000" + month_str).slice(-length);384 case 3:385 return TwitterCldr.Calendar.calendar.months.format.abbreviated[month_str];386 case 4:387 return TwitterCldr.Calendar.calendar.months.format.wide[month_str];388 case 5:389 throw 'not yet implemented (requires cldr\'s "multiple inheritance")';390 break;391 default:392 throw "Unknown date format";393 }394 };395 DateTimeFormatter.prototype.month_stand_alone = function(date, pattern, length) {396 var month_str;397 month_str = (date.getMonth() + 1).toString();398 switch (length) {399 case 1:400 return month_str;401 case 2:402 return ("0000" + month_str).slice(-length);403 case 3:404 return TwitterCldr.Calendar.calendar.months['stand-alone'].abbreviated[month_str];405 case 4:406 return TwitterCldr.Calendar.calendar.months['stand-alone'].wide[month_str];407 case 5:408 return TwitterCldr.Calendar.calendar.months['stand-alone'].narrow[month_str];409 default:410 throw "Unknown date format";411 }412 };413 DateTimeFormatter.prototype.day = function(date, pattern, length) {414 switch (length) {415 case 1:416 return date.getDate().toString();417 case 2:418 return ("0000" + date.getDate().toString()).slice(-length);419 }420 };421 DateTimeFormatter.prototype.weekday = function(date, pattern, length) {422 var key;423 key = this.weekday_keys[date.getDay()];424 switch (length) {425 case 1:426 case 2:427 case 3:428 return TwitterCldr.Calendar.calendar.days.format.abbreviated[key];429 case 4:430 return TwitterCldr.Calendar.calendar.days.format.wide[key];431 case 5:432 return TwitterCldr.Calendar.calendar.days['stand-alone'].narrow[key];433 }434 };435 DateTimeFormatter.prototype.weekday_local = function(date, pattern, length) {436 var day;437 switch (length) {438 case 1:439 case 2:440 day = date.getDay();441 if (day === 0) {442 return "7";443 } else {444 return day.toString();445 }446 break;447 default:448 return this.weekday(date, pattern, length);449 }450 };451 DateTimeFormatter.prototype.weekday_local_stand_alone = function(date, pattern, length) {452 switch (length) {453 case 1:454 return this.weekday_local(date, pattern, length);455 default:456 return this.weekday(date, pattern, length);457 }458 };459 DateTimeFormatter.prototype.period = function(time, pattern, length) {460 if (time.getHours() > 11) {461 return TwitterCldr.Calendar.calendar.periods.format.wide["pm"];462 } else {463 return TwitterCldr.Calendar.calendar.periods.format.wide["am"];464 }465 };466 DateTimeFormatter.prototype.hour = function(time, pattern, length) {467 var hour;468 hour = time.getHours();469 switch (pattern[0]) {470 case 'h':471 if (hour > 12) {472 hour = hour - 12;473 } else if (hour === 0) {474 hour = 12;475 }476 break;477 case 'K':478 if (hour > 11) {479 hour = hour - 12;480 }481 break;482 case 'k':483 if (hour === 0) {484 hour = 24;485 }486 }487 if (length === 1) {488 return hour.toString();489 } else {490 return ("000000" + hour.toString()).slice(-length);491 }492 };493 DateTimeFormatter.prototype.minute = function(time, pattern, length) {494 if (length === 1) {495 return time.getMinutes().toString();496 } else {497 return ("000000" + time.getMinutes().toString()).slice(-length);498 }499 };500 DateTimeFormatter.prototype.second = function(time, pattern, length) {501 if (length === 1) {502 return time.getSeconds().toString();503 } else {504 return ("000000" + time.getSeconds().toString()).slice(-length);505 }506 };507 DateTimeFormatter.prototype.second_fraction = function(time, pattern, length) {508 if (length > 6) {509 throw 'can not use the S format with more than 6 digits';510 }511 return ("000000" + Math.round(Math.pow(time.getMilliseconds() * 100.0, 6 - length)).toString()).slice(-length);512 };513 DateTimeFormatter.prototype.timezone = function(time, pattern, length) {514 var hours, minutes, offset, offsetString, sign;515 offset = time.getTimezoneOffset();516 hours = ("00" + (Math.abs(offset) / 60).toString()).slice(-2);517 minutes = ("00" + (Math.abs(offset) % 60).toString()).slice(-2);518 sign = offset > 0 ? "-" : "+";519 offsetString = sign + hours + ":" + minutes;520 switch (length) {521 case 1:522 case 2:523 case 3:524 return offsetString;525 default:526 return "UTC" + offsetString;527 }528 };529 DateTimeFormatter.prototype.timezone_generic_non_location = function(time, pattern, length) {530 throw 'not yet implemented (requires timezone translation data")';531 };532 return DateTimeFormatter;533 })();534 TwitterCldr.AdditionalDateFormatSelector = (function() {535 function AdditionalDateFormatSelector(pattern_hash) {536 this.pattern_hash = pattern_hash;537 }538 AdditionalDateFormatSelector.prototype.find_closest = function(goal_pattern) {539 var key, min_key, min_rank, rank, ranks;540 if (!(goal_pattern != null) || goal_pattern.trim().length === 0) {541 return null;542 } else {543 ranks = this.rank(goal_pattern);544 min_rank = 100;545 min_key = null;546 for (key in ranks) {547 rank = ranks[key];548 if (rank < min_rank) {549 min_rank = rank;550 min_key = key;551 }552 }553 return min_key;554 }555 };556 AdditionalDateFormatSelector.prototype.patterns = function() {557 var key, _results;558 _results = [];559 for (key in this.pattern_hash) {560 _results.push(key);561 }562 return _results;563 };564 AdditionalDateFormatSelector.prototype.separate = function(pattern_key) {565 var cur_char, last_char, result, _i, _len;566 last_char = "";567 result = [];568 for (_i = 0, _len = pattern_key.length; _i < _len; _i++) {569 cur_char = pattern_key[_i];570 if (cur_char === last_char) {571 result[result.length - 1] += cur_char;572 } else {573 result.push(cur_char);574 }575 last_char = cur_char;576 }577 return result;578 };579 AdditionalDateFormatSelector.prototype.all_separated_patterns = function() {580 var key, _results;581 _results = [];582 for (key in this.pattern_hash) {583 _results.push(this.separate(key));584 }585 return _results;586 };587 AdditionalDateFormatSelector.prototype.score = function(entities, goal_entities) {588 var score;589 score = this.exist_score(entities, goal_entities) * 2;590 score += this.position_score(entities, goal_entities);591 return score + this.count_score(entities, goal_entities);592 };593 AdditionalDateFormatSelector.prototype.position_score = function(entities, goal_entities) {594 var found, goal_entity, index, sum;595 sum = 0;596 for (index in goal_entities) {597 goal_entity = goal_entities[index];598 found = entities.indexOf(goal_entity);599 if (found > -1) {600 sum += Math.abs(found - index);601 }602 }603 return sum;604 };605 AdditionalDateFormatSelector.prototype.exist_score = function(entities, goal_entities) {606 var count, entity, goal_entity, _i, _len;607 count = 0;608 for (_i = 0, _len = goal_entities.length; _i < _len; _i++) {609 goal_entity = goal_entities[_i];610 if (!(((function() {611 var _j, _len1, _results;612 _results = [];613 for (_j = 0, _len1 = entities.length; _j < _len1; _j++) {614 entity = entities[_j];615 if (entity[0] === goal_entity[0]) {616 _results.push(entity);617 }618 }619 return _results;620 })()).length > 0)) {621 count += 1;622 }623 }624 return count;625 };626 AdditionalDateFormatSelector.prototype.count_score = function(entities, goal_entities) {627 var entity, found_entity, goal_entity, sum, _i, _len;628 sum = 0;629 for (_i = 0, _len = goal_entities.length; _i < _len; _i++) {630 goal_entity = goal_entities[_i];631 found_entity = ((function() {632 var _j, _len1, _results;633 _results = [];634 for (_j = 0, _len1 = entities.length; _j < _len1; _j++) {635 entity = entities[_j];636 if (entity[0] === goal_entity[0]) {637 _results.push(entity);638 }639 }640 return _results;641 })())[0];642 if (found_entity != null) {643 sum += Math.abs(found_entity.length - goal_entity.length);644 }645 }646 return sum;647 };648 AdditionalDateFormatSelector.prototype.rank = function(goal_pattern) {649 var result, separated_goal_pattern, separated_pattern, _i, _len, _ref;650 separated_goal_pattern = this.separate(goal_pattern);651 result = {};652 _ref = this.all_separated_patterns();653 for (_i = 0, _len = _ref.length; _i < _len; _i++) {654 separated_pattern = _ref[_i];655 result[separated_pattern.join("")] = this.score(separated_pattern, separated_goal_pattern);656 }657 return result;658 };659 return AdditionalDateFormatSelector;660 })();661 TwitterCldr.NumberFormatter = (function() {662 function NumberFormatter() {663 this.all_tokens = {"decimal":{"positive":["","#,##0.###"],"negative":["-","#,##0.###"]},"percent":{"positive":["","#,##0","%"],"negative":["-","#,##0","%"]},"currency":{"positive":["¤","#,##0.00"],"negative":["-(¤","#,##0.00",")"]},"short_decimal":{"positive":{"1000":["","0","K"],"10000":["","00","K"],"100000":["","000","K"],"1000000":["","0","M"],"10000000":["","00","M"],"100000000":["","000","M"],"1000000000":["","0","B"],"10000000000":["","00","B"],"100000000000":["","000","B"],"1000000000000":["","0","T"],"10000000000000":["","00","T"],"100000000000000":["","000","T"]},"negative":{"1000":["-","0","K"],"10000":["-","00","K"],"100000":["-","000","K"],"1000000":["-","0","M"],"10000000":["-","00","M"],"100000000":["-","000","M"],"1000000000":["-","0","B"],"10000000000":["-","00","B"],"100000000000":["-","000","B"],"1000000000000":["-","0","T"],"10000000000000":["-","00","T"],"100000000000000":["-","000","T"]}},"long_decimal":{"positive":{"1000":["","0"," thousand"],"10000":["","00"," thousand"],"100000":["","000"," thousand"],"1000000":["","0"," million"],"10000000":["","00"," million"],"100000000":["","000"," million"],"1000000000":["","0"," billion"],"10000000000":["","00"," billion"],"100000000000":["","000"," billion"],"1000000000000":["","0"," trillion"],"10000000000000":["","00"," trillion"],"100000000000000":["","000"," trillion"]},"negative":{"1000":["-","0"," thousand"],"10000":["-","00"," thousand"],"100000":["-","000"," thousand"],"1000000":["-","0"," million"],"10000000":["-","00"," million"],"100000000":["-","000"," million"],"1000000000":["-","0"," billion"],"10000000000":["-","00"," billion"],"100000000000":["-","000"," billion"],"1000000000000":["-","0"," trillion"],"10000000000000":["-","00"," trillion"],"100000000000000":["-","000"," trillion"]}}};664 this.tokens = [];665 this.symbols = {"alias":"","decimal":".","exponential":"E","group":",","infinity":"∞","list":";","minus_sign":"-","nan":"NaN","per_mille":"‰","percent_sign":"%","plus_sign":"+"};666 this.default_symbols = {667 'group': ',',668 'decimal': '.',669 'plus_sign': '+',670 'minus_sign': '-'671 };672 }673 NumberFormatter.prototype.format = function(number, options) {674 var fraction, fraction_format, integer_format, intg, key, opts, prefix, result, sign, suffix, val, _ref, _ref1;675 if (options == null) {676 options = {};677 }678 opts = this.default_format_options_for(number);679 for (key in options) {680 val = options[key];681 opts[key] = options[key] != null ? options[key] : opts[key];682 }683 _ref = this.partition_tokens(this.get_tokens(number, opts)), prefix = _ref[0], suffix = _ref[1], integer_format = _ref[2], fraction_format = _ref[3];684 number = this.transform_number(number);685 _ref1 = this.parse_number(number, opts), intg = _ref1[0], fraction = _ref1[1];686 result = integer_format.apply(parseFloat(intg), opts);687 if (fraction) {688 result += fraction_format.apply(fraction, opts);689 }690 sign = number < 0 && prefix !== "-" ? this.symbols.minus_sign || this.default_symbols.minus_sign : "";691 return "" + prefix + result + suffix;692 };693 NumberFormatter.prototype.transform_number = function(number) {694 return number;695 };696 NumberFormatter.prototype.partition_tokens = function(tokens) {697 return [tokens[0] || "", tokens[2] || "", new TwitterCldr.NumberFormatter.IntegerHelper(tokens[1], this.symbols), new TwitterCldr.NumberFormatter.FractionHelper(tokens[1], this.symbols)];698 };699 NumberFormatter.prototype.parse_number = function(number, options) {700 var precision;701 if (options == null) {702 options = {};703 }704 if (options.precision != null) {705 precision = options.precision;706 } else {707 precision = this.precision_from(number);708 }709 number = this.round_to(number, precision);710 return Math.abs(number).toFixed(precision).split(".");711 };712 NumberFormatter.prototype.precision_from = function(num) {713 var parts;714 parts = num.toString().split(".");715 if (parts.length === 2) {716 return parts[1].length;717 } else {718 return 0;719 }720 };721 NumberFormatter.prototype.round_to = function(number, precision) {722 var factor;723 factor = Math.pow(10, precision);724 return Math.round(number * factor) / factor;725 };726 NumberFormatter.prototype.get_tokens = function() {727 throw "get_tokens() not implemented - use a derived class like PercentFormatter.";728 };729 return NumberFormatter;730 })();731 TwitterCldr.PercentFormatter = (function(_super) {732 __extends(PercentFormatter, _super);733 function PercentFormatter(options) {734 if (options == null) {735 options = {};736 }737 this.default_percent_sign = "%";738 PercentFormatter.__super__.constructor.apply(this, arguments);739 }740 PercentFormatter.prototype.format = function(number, options) {741 if (options == null) {742 options = {};743 }744 return PercentFormatter.__super__.format.call(this, number, options).replace('¤', this.symbols.percent_sign || this.default_percent_sign);745 };746 PercentFormatter.prototype.default_format_options_for = function(number) {747 return {748 precision: 0749 };750 };751 PercentFormatter.prototype.get_tokens = function(number, options) {752 if (number < 0) {753 return this.all_tokens.percent.negative;754 } else {755 return this.all_tokens.percent.positive;756 }757 };758 return PercentFormatter;759 })(TwitterCldr.NumberFormatter);760 TwitterCldr.DecimalFormatter = (function(_super) {761 __extends(DecimalFormatter, _super);762 function DecimalFormatter() {763 return DecimalFormatter.__super__.constructor.apply(this, arguments);764 }765 DecimalFormatter.prototype.format = function(number, options) {766 if (options == null) {767 options = {};768 }769 try {770 return DecimalFormatter.__super__.format.call(this, number, options);771 } catch (error) {772 return number;773 }774 };775 DecimalFormatter.prototype.default_format_options_for = function(number) {776 return {777 precision: this.precision_from(number)778 };779 };780 DecimalFormatter.prototype.get_tokens = function(number, options) {781 if (options == null) {782 options = {};783 }784 if (number < 0) {785 return this.all_tokens.decimal.negative;786 } else {787 return this.all_tokens.decimal.positive;788 }789 };790 return DecimalFormatter;791 })(TwitterCldr.NumberFormatter);792 TwitterCldr.CurrencyFormatter = (function(_super) {793 __extends(CurrencyFormatter, _super);794 function CurrencyFormatter(options) {795 if (options == null) {796 options = {};797 }798 this.default_currency_symbol = "$";799 this.default_precision = 2;800 CurrencyFormatter.__super__.constructor.apply(this, arguments);801 }802 CurrencyFormatter.prototype.format = function(number, options) {803 var currency, symbol;804 if (options == null) {805 options = {};806 }807 if (options.currency) {808 if (TwitterCldr.Currencies != null) {809 currency = TwitterCldr.Currencies.for_code(options.currency);810 currency || (currency = {811 symbol: options.currency812 });813 } else {814 currency = {815 symbol: options.currency816 };817 }818 } else {819 currency = {820 symbol: this.default_currency_symbol821 };822 }823 symbol = options.use_cldr_symbol ? currency.cldr_symbol : currency.symbol;824 return CurrencyFormatter.__super__.format.call(this, number, options).replace('¤', symbol);825 };826 CurrencyFormatter.prototype.default_format_options_for = function(number) {827 var precision;828 precision = this.precision_from(number);829 if (precision === 0) {830 precision = this.default_precision;831 }832 return {833 precision: precision834 };835 };836 CurrencyFormatter.prototype.get_tokens = function(number, options) {837 if (options == null) {838 options = {};839 }840 if (number < 0) {841 return this.all_tokens.currency.negative;842 } else {843 return this.all_tokens.currency.positive;844 }845 };846 return CurrencyFormatter;847 })(TwitterCldr.NumberFormatter);848 TwitterCldr.AbbreviatedNumberFormatter = (function(_super) {849 __extends(AbbreviatedNumberFormatter, _super);850 function AbbreviatedNumberFormatter() {851 return AbbreviatedNumberFormatter.__super__.constructor.apply(this, arguments);852 }853 AbbreviatedNumberFormatter.prototype.NUMBER_MAX = Math.pow(10, 15);854 AbbreviatedNumberFormatter.prototype.NUMBER_MIN = 1000;855 AbbreviatedNumberFormatter.prototype.default_format_options_for = function(number) {856 return {857 precision: this.precision_from(number)858 };859 };860 AbbreviatedNumberFormatter.prototype.get_type = function() {861 return "decimal";862 };863 AbbreviatedNumberFormatter.prototype.get_key = function(number) {864 var i, zeroes;865 zeroes = ((function() {866 var _i, _ref, _results;867 _results = [];868 for (i = _i = 0, _ref = Math.floor(number).toString().length - 1; 0 <= _ref ? _i < _ref : _i > _ref; i = 0 <= _ref ? ++_i : --_i) {869 _results.push("0");870 }871 return _results;872 })()).join("");873 return "1" + zeroes;874 };875 AbbreviatedNumberFormatter.prototype.get_tokens = function(number, options) {876 var format, tokens, type;877 if (options == null) {878 options = {};879 }880 type = (number < this.NUMBER_MAX) && (number >= this.NUMBER_MIN) ? this.get_type() : "decimal";881 format = type === this.get_type() ? this.get_key(number) : null;882 tokens = this.all_tokens[type];883 tokens = number < 0 ? tokens.negative : tokens.positive;884 if (format != null) {885 tokens = tokens[format];886 }887 return tokens;888 };889 AbbreviatedNumberFormatter.prototype.transform_number = function(number) {890 var sig_figs;891 if ((number < this.NUMBER_MAX) && (number >= this.NUMBER_MIN)) {892 sig_figs = (parseInt(number).toString().length - 1) % 3;893 return parseInt(number.toString().slice(0, +sig_figs + 1 || 9e9));894 } else {895 return number;896 }897 };898 return AbbreviatedNumberFormatter;899 })(TwitterCldr.NumberFormatter);900 TwitterCldr.ShortDecimalFormatter = (function(_super) {901 __extends(ShortDecimalFormatter, _super);902 function ShortDecimalFormatter() {903 return ShortDecimalFormatter.__super__.constructor.apply(this, arguments);904 }905 ShortDecimalFormatter.prototype.get_type = function() {906 return "short_decimal";907 };908 return ShortDecimalFormatter;909 })(TwitterCldr.AbbreviatedNumberFormatter);910 TwitterCldr.LongDecimalFormatter = (function(_super) {911 __extends(LongDecimalFormatter, _super);912 function LongDecimalFormatter() {913 return LongDecimalFormatter.__super__.constructor.apply(this, arguments);914 }915 LongDecimalFormatter.prototype.get_type = function() {916 return "long_decimal";917 };918 return LongDecimalFormatter;919 })(TwitterCldr.AbbreviatedNumberFormatter);920 TwitterCldr.NumberFormatter.BaseHelper = (function() {921 function BaseHelper() {}922 BaseHelper.prototype.interpolate = function(string, value, orientation) {923 var i, length, start;924 if (orientation == null) {925 orientation = "right";926 }927 value = value.toString();928 length = value.length;929 start = orientation === "left" ? 0 : -length;930 if (string.length < length) {931 string = (((function() {932 var _i, _results;933 _results = [];934 for (i = _i = 0; 0 <= length ? _i < length : _i > length; i = 0 <= length ? ++_i : --_i) {935 _results.push("#");936 }937 return _results;938 })()).join("") + string).slice(-length);939 }940 if (start < 0) {941 string = string.slice(0, start + string.length) + value;942 } else {943 string = string.slice(0, start) + value + string.slice(length);944 }945 return string.replace(/#/g, "");946 };947 return BaseHelper;948 })();949 TwitterCldr.NumberFormatter.IntegerHelper = (function(_super) {950 __extends(IntegerHelper, _super);951 function IntegerHelper(token, symbols) {952 var format;953 if (symbols == null) {954 symbols = {};955 }956 format = token.split('.')[0];957 this.format = this.prepare_format(format, symbols);958 this.groups = this.parse_groups(format);959 this.separator = symbols.group || ',';960 }961 IntegerHelper.prototype.apply = function(number, options) {962 if (options == null) {963 options = {};964 }965 return this.format_groups(this.interpolate(this.format, parseInt(number)));966 };967 IntegerHelper.prototype.format_groups = function(string) {968 var cur_token, token, tokens;969 if (this.groups.length === 0) {970 return string;971 }972 tokens = [];973 cur_token = this.chop_group(string, this.groups[0]);974 tokens.push(cur_token);975 if (cur_token) {976 string = string.slice(0, string.length - cur_token.length);977 }978 while (string.length > this.groups[this.groups.length - 1]) {979 cur_token = this.chop_group(string, this.groups[this.groups.length - 1]);980 tokens.push(cur_token);981 if (cur_token) {982 string = string.slice(0, string.length - cur_token.length);983 }984 }985 tokens.push(string);986 return ((function() {987 var _i, _len, _results;988 _results = [];989 for (_i = 0, _len = tokens.length; _i < _len; _i++) {990 token = tokens[_i];991 if (token !== null) {992 _results.push(token);993 }994 }995 return _results;996 })()).reverse().join(this.separator);997 };998 IntegerHelper.prototype.parse_groups = function(format) {999 var index, rest, width, widths;1000 index = format.lastIndexOf(',');1001 if (!(index > 0)) {1002 return [];1003 }1004 rest = format.slice(0, index);1005 widths = [format.length - index - 1];1006 if (rest.lastIndexOf(',') > -1) {1007 widths.push(rest.length - rest.lastIndexOf(',') - 1);1008 }1009 widths = (function() {1010 var _i, _len, _results;1011 _results = [];1012 for (_i = 0, _len = widths.length; _i < _len; _i++) {1013 width = widths[_i];1014 if (width !== null) {1015 _results.push(width);1016 }1017 }1018 return _results;1019 })();1020 widths.reverse();1021 return ((function() {1022 var _i, _ref, _results;1023 _results = [];1024 for (index = _i = 0, _ref = widths.length; 0 <= _ref ? _i < _ref : _i > _ref; index = 0 <= _ref ? ++_i : --_i) {1025 if (widths.indexOf(widths[index], index + 1) === -1) {1026 _results.push(widths[index]);1027 }1028 }1029 return _results;1030 })()).reverse();1031 };1032 IntegerHelper.prototype.chop_group = function(string, size) {1033 if (string.length > size) {1034 return string.slice(-size);1035 } else {1036 return null;1037 }1038 };1039 IntegerHelper.prototype.prepare_format = function(format, symbols) {1040 return format.replace(",", "").replace("+", symbols.plus_sign).replace("-", symbols.minus_sign);1041 };1042 return IntegerHelper;1043 })(TwitterCldr.NumberFormatter.BaseHelper);1044 TwitterCldr.NumberFormatter.FractionHelper = (function(_super) {1045 __extends(FractionHelper, _super);1046 function FractionHelper(token, symbols) {1047 if (symbols == null) {1048 symbols = {};1049 }1050 this.format = token ? token.split('.').pop() : "";1051 this.decimal = symbols.decimal || ".";1052 this.precision = this.format.length;1053 }1054 FractionHelper.prototype.apply = function(fraction, options) {1055 var precision;1056 if (options == null) {1057 options = {};1058 }1059 precision = options.precision != null ? options.precision : this.precision;1060 if (precision > 0) {1061 return this.decimal + this.interpolate(this.format_for(options), fraction, "left");1062 } else {1063 return "";1064 }1065 };1066 FractionHelper.prototype.format_for = function(options) {1067 var i, precision;1068 precision = options.precision != null ? options.precision : this.precision;1069 if (precision) {1070 return ((function() {1071 var _i, _results;1072 _results = [];1073 for (i = _i = 0; 0 <= precision ? _i < precision : _i > precision; i = 0 <= precision ? ++_i : --_i) {1074 _results.push("0");1075 }1076 return _results;1077 })()).join("");1078 } else {1079 return this.format;1080 }1081 };1082 return FractionHelper;1083 })(TwitterCldr.NumberFormatter.BaseHelper);1084 TwitterCldr.Currencies = (function() {1085 function Currencies() {}1086 Currencies.currencies = {"ADP":{"currency":"ADP","name":"Andorran peseta","cldr_symbol":"ADP","symbol":"ADP","code_points":[65,68,80]},"AED":{"currency":"AED","name":"UAE dirham","cldr_symbol":"AED","symbol":"AED","code_points":[65,69,68]},"AFA":{"currency":"AFA","name":"Afghan afghani (1927-2002)","cldr_symbol":"AFA","symbol":"AFA","code_points":[65,70,65]},"AFN":{"currency":"AFN","name":"Afghan Afghani","cldr_symbol":"AFN","symbol":"؋","code_points":[1547]},"ALK":{"currency":"ALK","name":"Albanian lek (1946-1965)","cldr_symbol":"ALK","symbol":"ALK","code_points":[65,76,75]},"ALL":{"currency":"ALL","name":"Albanian lek","cldr_symbol":"ALL","symbol":"LEK","code_points":[76,69,75]},"AMD":{"currency":"AMD","name":"Armenian dram","cldr_symbol":"AMD","symbol":"AMD","code_points":[65,77,68]},"ANG":{"currency":"ANG","name":"Netherlands Antillean guilder","cldr_symbol":"ANG","symbol":"ƒ","code_points":[402]},"AOA":{"currency":"AOA","name":"Angolan kwanza","cldr_symbol":"AOA","symbol":"AOA","code_points":[65,79,65]},"AOK":{"currency":"AOK","name":"Angolan kwanza (1977-1991)","cldr_symbol":"AOK","symbol":"AOK","code_points":[65,79,75]},"AON":{"currency":"AON","name":"Angolan new kwanza (1990-2000)","cldr_symbol":"AON","symbol":"AON","code_points":[65,79,78]},"AOR":{"currency":"AOR","name":"Angolan readjusted kwanza (1995-1999)","cldr_symbol":"AOR","symbol":"AOR","code_points":[65,79,82]},"ARA":{"currency":"ARA","name":"Argentine austral","cldr_symbol":"ARA","symbol":"ARA","code_points":[65,82,65]},"ARL":{"currency":"ARL","name":"Argentine peso ley (1970-1983)","cldr_symbol":"ARL","symbol":"ARL","code_points":[65,82,76]},"ARM":{"currency":"ARM","name":"Argentine peso (1881-1970)","cldr_symbol":"ARM","symbol":"ARM","code_points":[65,82,77]},"ARP":{"currency":"ARP","name":"Argentine peso (1983-1985)","cldr_symbol":"ARP","symbol":"ARP","code_points":[65,82,80]},"ARS":{"currency":"ARS","name":"Argentine peso","cldr_symbol":"ARS","symbol":"$","code_points":[36]},"ATS":{"currency":"ATS","name":"Austrian schilling","cldr_symbol":"ATS","symbol":"ATS","code_points":[65,84,83]},"AUD":{"currency":"AUD","name":"Australian dollar","cldr_symbol":"A$","symbol":"$","code_points":[36]},"AWG":{"currency":"AWG","name":"Aruban florin","cldr_symbol":"AWG","symbol":"ƒ","code_points":[402],"alt_name":"Florins"},"AZM":{"currency":"AZM","name":"Azerbaijani manat (1993-2006)","cldr_symbol":"AZM","symbol":"AZM","code_points":[65,90,77]},"AZN":{"currency":"AZN","name":"Azerbaijani manat","cldr_symbol":"AZN","symbol":"ман","code_points":[1084,1072,1085]},"BAD":{"currency":"BAD","name":"Bosnia-Herzegovina dinar (1992-1994)","cldr_symbol":"BAD","symbol":"BAD","code_points":[66,65,68]},"BAM":{"currency":"BAM","name":"Bosnia-Herzegovina convertible mark","cldr_symbol":"BAM","symbol":"KM","code_points":[75,77]},"BAN":{"currency":"BAN","name":"Bosnia-Herzegovina new dinar (1994-1997)","cldr_symbol":"BAN","symbol":"BAN","code_points":[66,65,78]},"BBD":{"currency":"BBD","name":"Barbadian dollar","cldr_symbol":"BBD","symbol":"$","code_points":[36]},"BDT":{"currency":"BDT","name":"Bangladeshi taka","cldr_symbol":"BDT","symbol":"BDT","code_points":[66,68,84]},"BEC":{"currency":"BEC","name":"Belgian franc (convertible)","cldr_symbol":"BEC","symbol":"BEC","code_points":[66,69,67]},"BEF":{"currency":"BEF","name":"Belgian franc","cldr_symbol":"BEF","symbol":"BEF","code_points":[66,69,70]},"BEL":{"currency":"BEL","name":"Belgian franc (financial)","cldr_symbol":"BEL","symbol":"BEL","code_points":[66,69,76]},"BGL":{"currency":"BGL","name":"Bulgarian hard lev","cldr_symbol":"BGL","symbol":"BGL","code_points":[66,71,76]},"BGM":{"currency":"BGM","name":"Bulgarian socialist lev","cldr_symbol":"BGM","symbol":"BGM","code_points":[66,71,77]},"BGN":{"currency":"BGN","name":"Bulgarian lev","cldr_symbol":"BGN","symbol":"лв","code_points":[1083,1074]},"BGO":{"currency":"BGO","name":"Bulgarian lev (1879-1952)","cldr_symbol":"BGO","symbol":"BGO","code_points":[66,71,79]},"BHD":{"currency":"BHD","name":"Bahraini dinar","cldr_symbol":"BHD","symbol":"BHD","code_points":[66,72,68]},"BIF":{"currency":"BIF","name":"Burundian franc","cldr_symbol":"BIF","symbol":"BIF","code_points":[66,73,70]},"BMD":{"currency":"BMD","name":"Bermudan dollar","cldr_symbol":"BMD","symbol":"$","code_points":[36]},"BND":{"currency":"BND","name":"Brunei dollar","cldr_symbol":"BND","symbol":"$","code_points":[36]},"BOB":{"currency":"BOB","name":"Bolivian boliviano","cldr_symbol":"BOB","symbol":"$b","code_points":[36,98]},"BOL":{"currency":"BOL","name":"Bolivian boliviano (1863-1963)","cldr_symbol":"BOL","symbol":"BOL","code_points":[66,79,76]},"BOP":{"currency":"BOP","name":"Bolivian peso","cldr_symbol":"BOP","symbol":"BOP","code_points":[66,79,80]},"BOV":{"currency":"BOV","name":"Bolivian mvdol","cldr_symbol":"BOV","symbol":"BOV","code_points":[66,79,86]},"BRB":{"currency":"BRB","name":"Brazilian new cruzeiro (1967-1986)","cldr_symbol":"BRB","symbol":"BRB","code_points":[66,82,66]},"BRC":{"currency":"BRC","name":"Brazilian cruzado (1986-1989)","cldr_symbol":"BRC","symbol":"BRC","code_points":[66,82,67]},"BRE":{"currency":"BRE","name":"Brazilian cruzeiro (1990-1993)","cldr_symbol":"BRE","symbol":"BRE","code_points":[66,82,69]},"BRL":{"currency":"BRL","name":"Brazilian real","cldr_symbol":"R$","symbol":"R$","code_points":[82,36]},"BRN":{"currency":"BRN","name":"Brazilian new cruzado (1989-1990)","cldr_symbol":"BRN","symbol":"BRN","code_points":[66,82,78]},"BRR":{"currency":"BRR","name":"Brazilian cruzeiro (1993-1994)","cldr_symbol":"BRR","symbol":"BRR","code_points":[66,82,82]},"BRZ":{"currency":"BRZ","name":"Brazilian cruzeiro (1942-1967)","cldr_symbol":"BRZ","symbol":"BRZ","code_points":[66,82,90]},"BSD":{"currency":"BSD","name":"Bahamian dollar","cldr_symbol":"BSD","symbol":"$","code_points":[36]},"BTN":{"currency":"BTN","name":"Bhutanese ngultrum","cldr_symbol":"BTN","symbol":"BTN","code_points":[66,84,78]},"BUK":{"currency":"BUK","name":"Burmese kyat","cldr_symbol":"BUK","symbol":"BUK","code_points":[66,85,75]},"BWP":{"currency":"BWP","name":"Botswanan pula","cldr_symbol":"BWP","symbol":"P","code_points":[80]},"BYB":{"currency":"BYB","name":"Belarusian new ruble (1994-1999)","cldr_symbol":"BYB","symbol":"BYB","code_points":[66,89,66]},"BYR":{"currency":"BYR","name":"Belarusian ruble","cldr_symbol":"BYR","symbol":"p.","code_points":[112,46]},"BZD":{"currency":"BZD","name":"Belize dollar","cldr_symbol":"BZD","symbol":"BZ$","code_points":[66,90,36]},"CAD":{"currency":"CAD","name":"Canadian dollar","cldr_symbol":"CA$","symbol":"$","code_points":[36]},"CDF":{"currency":"CDF","name":"Congolese franc","cldr_symbol":"CDF","symbol":"CDF","code_points":[67,68,70]},"CHE":{"currency":"CHE","name":"WIR euro","cldr_symbol":"CHE","symbol":"CHE","code_points":[67,72,69]},"CHF":{"currency":"CHF","name":"Swiss franc","cldr_symbol":"CHF","symbol":"CHF","code_points":[67,72,70]},"CHW":{"currency":"CHW","name":"WIR franc","cldr_symbol":"CHW","symbol":"CHW","code_points":[67,72,87]},"CLE":{"currency":"CLE","name":"Chilean escudo","cldr_symbol":"CLE","symbol":"CLE","code_points":[67,76,69]},"CLF":{"currency":"CLF","name":"Chilean unit of account (UF)","cldr_symbol":"CLF","symbol":"CLF","code_points":[67,76,70]},"CLP":{"currency":"CLP","name":"Chilean peso","cldr_symbol":"CLP","symbol":"$","code_points":[36]},"CNX":{"currency":"CNX","name":"Chinese People’s Bank dollar","cldr_symbol":"CNX","symbol":"CNX","code_points":[67,78,88]},"CNY":{"currency":"CNY","name":"Chinese yuan","cldr_symbol":"CN¥","symbol":"¥","code_points":[165]},"COP":{"currency":"COP","name":"Colombian peso","cldr_symbol":"COP","symbol":"$","code_points":[36]},"COU":{"currency":"COU","name":"Colombian real value unit","cldr_symbol":"COU","symbol":"COU","code_points":[67,79,85]},"CRC":{"currency":"CRC","name":"Costa Rican colón","cldr_symbol":"CRC","symbol":"₡","code_points":[8353]},"CSD":{"currency":"CSD","name":"Serbian dinar (2002-2006)","cldr_symbol":"CSD","symbol":"CSD","code_points":[67,83,68]},"CSK":{"currency":"CSK","name":"Czechoslovak hard koruna","cldr_symbol":"CSK","symbol":"CSK","code_points":[67,83,75]},"CUC":{"currency":"CUC","name":"Cuban convertible peso","cldr_symbol":"CUC","symbol":"CUC","code_points":[67,85,67]},"CUP":{"currency":"CUP","name":"Cuban peso","cldr_symbol":"CUP","symbol":"₱","code_points":[8369]},"CVE":{"currency":"CVE","name":"Cape Verdean escudo","cldr_symbol":"CVE","symbol":"CVE","code_points":[67,86,69]},"CYP":{"currency":"CYP","name":"Cypriot pound","cldr_symbol":"CYP","symbol":"CYP","code_points":[67,89,80]},"CZK":{"currency":"CZK","name":"Czech Republic koruna","cldr_symbol":"CZK","symbol":"Kč","code_points":[75,269]},"DDM":{"currency":"DDM","name":"East German mark","cldr_symbol":"DDM","symbol":"DDM","code_points":[68,68,77]},"DEM":{"currency":"DEM","name":"German mark","cldr_symbol":"DEM","symbol":"DEM","code_points":[68,69,77]},"DJF":{"currency":"DJF","name":"Djiboutian franc","cldr_symbol":"DJF","symbol":"DJF","code_points":[68,74,70]},"DKK":{"currency":"DKK","name":"Danish krone","cldr_symbol":"DKK","symbol":"kr","code_points":[107,114]},"DOP":{"currency":"DOP","name":"Dominican peso","cldr_symbol":"DOP","symbol":"RD$","code_points":[82,68,36]},"DZD":{"currency":"DZD","name":"Algerian dinar","cldr_symbol":"DZD","symbol":"DZD","code_points":[68,90,68]},"ECS":{"currency":"ECS","name":"Ecuadorian sucre","cldr_symbol":"ECS","symbol":"ECS","code_points":[69,67,83]},"ECV":{"currency":"ECV","name":"Ecuadorian unit of constant value","cldr_symbol":"ECV","symbol":"ECV","code_points":[69,67,86]},"EEK":{"currency":"EEK","name":"Estonian kroon","cldr_symbol":"EEK","symbol":"kr","code_points":[107,114]},"EGP":{"currency":"EGP","name":"Egyptian pound","cldr_symbol":"EGP","symbol":"£","code_points":[163]},"ERN":{"currency":"ERN","name":"Eritrean nakfa","cldr_symbol":"ERN","symbol":"ERN","code_points":[69,82,78]},"ESA":{"currency":"ESA","name":"Spanish peseta (A account)","cldr_symbol":"ESA","symbol":"ESA","code_points":[69,83,65]},"ESB":{"currency":"ESB","name":"Spanish peseta (convertible account)","cldr_symbol":"ESB","symbol":"ESB","code_points":[69,83,66]},"ESP":{"currency":"ESP","name":"Spanish peseta","cldr_symbol":"ESP","symbol":"ESP","code_points":[69,83,80]},"ETB":{"currency":"ETB","name":"Ethiopian birr","cldr_symbol":"ETB","symbol":"ETB","code_points":[69,84,66]},"EUR":{"currency":"EUR","name":"euro","cldr_symbol":"€","symbol":"€","code_points":[8364]},"FIM":{"currency":"FIM","name":"Finnish markka","cldr_symbol":"FIM","symbol":"FIM","code_points":[70,73,77]},"FJD":{"currency":"FJD","name":"Fijian dollar","cldr_symbol":"FJD","symbol":"FJD","code_points":[70,74,68]},"FKP":{"currency":"FKP","name":"Falkland Islands pound","cldr_symbol":"FKP","symbol":"£","code_points":[163]},"FRF":{"currency":"FRF","name":"French franc","cldr_symbol":"FRF","symbol":"FRF","code_points":[70,82,70]},"GBP":{"currency":"GBP","name":"British pound sterling","cldr_symbol":"£","symbol":"£","code_points":[163]},"GEK":{"currency":"GEK","name":"Georgian kupon larit","cldr_symbol":"GEK","symbol":"GEK","code_points":[71,69,75]},"GEL":{"currency":"GEL","name":"Georgian lari","cldr_symbol":"GEL","symbol":"GEL","code_points":[71,69,76]},"GHC":{"currency":"GHC","name":"Ghanaian cedi (1979-2007)","cldr_symbol":"GHC","symbol":"GHC","code_points":[71,72,67]},"GHS":{"currency":"GHS","name":"Ghanaian cedi","cldr_symbol":"GHS","symbol":"¢","code_points":[162]},"GIP":{"currency":"GIP","name":"Gibraltar pound","cldr_symbol":"GIP","symbol":"£","code_points":[163]},"GMD":{"currency":"GMD","name":"Gambian dalasi","cldr_symbol":"GMD","symbol":"GMD","code_points":[71,77,68]},"GNF":{"currency":"GNF","name":"Guinean franc","cldr_symbol":"GNF","symbol":"GNF","code_points":[71,78,70]},"GNS":{"currency":"GNS","name":"Guinean syli","cldr_symbol":"GNS","symbol":"GNS","code_points":[71,78,83]},"GQE":{"currency":"GQE","name":"Equatorial Guinean ekwele","cldr_symbol":"GQE","symbol":"GQE","code_points":[71,81,69]},"GRD":{"currency":"GRD","name":"Greek drachma","cldr_symbol":"GRD","symbol":"GRD","code_points":[71,82,68]},"GTQ":{"currency":"GTQ","name":"Guatemalan quetzal","cldr_symbol":"GTQ","symbol":"Q","code_points":[81]},"GWE":{"currency":"GWE","name":"Portuguese Guinea escudo","cldr_symbol":"GWE","symbol":"GWE","code_points":[71,87,69]},"GWP":{"currency":"GWP","name":"Guinea-Bissau peso","cldr_symbol":"GWP","symbol":"GWP","code_points":[71,87,80]},"GYD":{"currency":"GYD","name":"Guyanaese dollar","cldr_symbol":"GYD","symbol":"GYD","code_points":[71,89,68]},"HKD":{"currency":"HKD","name":"Hong Kong dollar","cldr_symbol":"HK$","symbol":"$","code_points":[36]},"HNL":{"currency":"HNL","name":"Honduran lempira","cldr_symbol":"HNL","symbol":"L","code_points":[76]},"HRD":{"currency":"HRD","name":"Croatian dinar","cldr_symbol":"HRD","symbol":"HRD","code_points":[72,82,68]},"HRK":{"currency":"HRK","name":"Croatian kuna","cldr_symbol":"HRK","symbol":"kn","code_points":[107,110]},"HTG":{"currency":"HTG","name":"Haitian gourde","cldr_symbol":"HTG","symbol":"HTG","code_points":[72,84,71]},"HUF":{"currency":"HUF","name":"Hungarian forint","cldr_symbol":"HUF","symbol":"Ft","code_points":[70,116]},"IDR":{"currency":"IDR","name":"Indonesian rupiah","cldr_symbol":"IDR","symbol":"Rp","code_points":[82,112]},"IEP":{"currency":"IEP","name":"Irish pound","cldr_symbol":"IEP","symbol":"IEP","code_points":[73,69,80]},"ILP":{"currency":"ILP","name":"Israeli pound","cldr_symbol":"ILP","symbol":"ILP","code_points":[73,76,80]},"ILR":{"currency":"ILR","name":"Israeli sheqel (1980-1985)","cldr_symbol":"ILR","symbol":"ILR","code_points":[73,76,82]},"ILS":{"currency":"ILS","name":"Israeli new sheqel","cldr_symbol":"₪","symbol":"₪","code_points":[8362]},"INR":{"currency":"INR","name":"Indian rupee","cldr_symbol":"₹","symbol":"₨","code_points":[8360]},"IQD":{"currency":"IQD","name":"Iraqi dinar","cldr_symbol":"IQD","symbol":"IQD","code_points":[73,81,68]},"IRR":{"currency":"IRR","name":"Iranian rial","cldr_symbol":"IRR","symbol":"﷼","code_points":[65020]},"ISJ":{"currency":"ISJ","name":"Icelandic króna (1918-1981)","cldr_symbol":"ISJ","symbol":"ISJ","code_points":[73,83,74]},"ISK":{"currency":"ISK","name":"Icelandic króna","cldr_symbol":"ISK","symbol":"kr","code_points":[107,114]},"ITL":{"currency":"ITL","name":"Italian lira","cldr_symbol":"ITL","symbol":"ITL","code_points":[73,84,76]},"JMD":{"currency":"JMD","name":"Jamaican dollar","cldr_symbol":"JMD","symbol":"JMD","code_points":[74,77,68]},"JOD":{"currency":"JOD","name":"Jordanian dinar","cldr_symbol":"JOD","symbol":"JOD","code_points":[74,79,68]},"JPY":{"currency":"JPY","name":"Japanese yen","cldr_symbol":"¥","symbol":"¥","code_points":[165]},"KES":{"currency":"KES","name":"Kenyan shilling","cldr_symbol":"KES","symbol":"KES","code_points":[75,69,83]},"KGS":{"currency":"KGS","name":"Kyrgystani som","cldr_symbol":"KGS","symbol":"лв","code_points":[1083,1074]},"KHR":{"currency":"KHR","name":"Cambodian riel","cldr_symbol":"KHR","symbol":"KHR","code_points":[75,72,82]},"KMF":{"currency":"KMF","name":"Comorian franc","cldr_symbol":"KMF","symbol":"KMF","code_points":[75,77,70]},"KPW":{"currency":"KPW","name":"North Korean won","cldr_symbol":"KPW","symbol":"₩","code_points":[8361]},"KRH":{"currency":"KRH","name":"South Korean hwan (1953-1962)","cldr_symbol":"KRH","symbol":"KRH","code_points":[75,82,72]},"KRO":{"currency":"KRO","name":"South Korean won (1945-1953)","cldr_symbol":"KRO","symbol":"KRO","code_points":[75,82,79]},"KRW":{"currency":"KRW","name":"South Korean won","cldr_symbol":"₩","symbol":"₩","code_points":[8361]},"KWD":{"currency":"KWD","name":"Kuwaiti dinar","cldr_symbol":"KWD","symbol":"KWD","code_points":[75,87,68]},"KYD":{"currency":"KYD","name":"Cayman Islands dollar","cldr_symbol":"KYD","symbol":"$","code_points":[36]},"KZT":{"currency":"KZT","name":"Kazakhstani tenge","cldr_symbol":"KZT","symbol":"лв","code_points":[1083,1074]},"LAK":{"currency":"LAK","name":"Laotian kip","cldr_symbol":"LAK","symbol":"₭","code_points":[8365]},"LBP":{"currency":"LBP","name":"Lebanese pound","cldr_symbol":"LBP","symbol":"£","code_points":[163]},"LKR":{"currency":"LKR","name":"Sri Lankan rupee","cldr_symbol":"LKR","symbol":"₨","code_points":[8360]},"LRD":{"currency":"LRD","name":"Liberian dollar","cldr_symbol":"LRD","symbol":"$","code_points":[36]},"LSL":{"currency":"LSL","name":"Lesotho loti","cldr_symbol":"LSL","symbol":"LSL","code_points":[76,83,76]},"LTL":{"currency":"LTL","name":"Lithuanian litas","cldr_symbol":"LTL","symbol":"Lt","code_points":[76,116]},"LTT":{"currency":"LTT","name":"Lithuanian talonas","cldr_symbol":"LTT","symbol":"LTT","code_points":[76,84,84]},"LUC":{"currency":"LUC","name":"Luxembourgian convertible franc","cldr_symbol":"LUC","symbol":"LUC","code_points":[76,85,67]},"LUF":{"currency":"LUF","name":"Luxembourgian franc","cldr_symbol":"LUF","symbol":"LUF","code_points":[76,85,70]},"LUL":{"currency":"LUL","name":"Luxembourg financial franc","cldr_symbol":"LUL","symbol":"LUL","code_points":[76,85,76]},"LVL":{"currency":"LVL","name":"Latvian lats","cldr_symbol":"LVL","symbol":"Ls","code_points":[76,115]},"LVR":{"currency":"LVR","name":"Latvian ruble","cldr_symbol":"LVR","symbol":"LVR","code_points":[76,86,82]},"LYD":{"currency":"LYD","name":"Libyan dinar","cldr_symbol":"LYD","symbol":"LYD","code_points":[76,89,68]},"MAD":{"currency":"MAD","name":"Moroccan dirham","cldr_symbol":"MAD","symbol":"MAD","code_points":[77,65,68]},"MAF":{"currency":"MAF","name":"Moroccan franc","cldr_symbol":"MAF","symbol":"MAF","code_points":[77,65,70]},"MCF":{"currency":"MCF","name":"Monegasque franc","cldr_symbol":"MCF","symbol":"MCF","code_points":[77,67,70]},"MDC":{"currency":"MDC","name":"Moldovan cupon","cldr_symbol":"MDC","symbol":"MDC","code_points":[77,68,67]},"MDL":{"currency":"MDL","name":"Moldovan leu","cldr_symbol":"MDL","symbol":"MDL","code_points":[77,68,76]},"MGA":{"currency":"MGA","name":"Malagasy Ariary","cldr_symbol":"MGA","symbol":"MGA","code_points":[77,71,65]},"MGF":{"currency":"MGF","name":"Malagasy franc","cldr_symbol":"MGF","symbol":"MGF","code_points":[77,71,70]},"MKD":{"currency":"MKD","name":"Macedonian denar","cldr_symbol":"MKD","symbol":"MKD","code_points":[77,75,68]},"MKN":{"currency":"MKN","name":"Macedonian denar (1992-1993)","cldr_symbol":"MKN","symbol":"MKN","code_points":[77,75,78]},"MLF":{"currency":"MLF","name":"Malian franc","cldr_symbol":"MLF","symbol":"MLF","code_points":[77,76,70]},"MMK":{"currency":"MMK","name":"Myanma kyat","cldr_symbol":"MMK","symbol":"MMK","code_points":[77,77,75]},"MNT":{"currency":"MNT","name":"Mongolian tugrik","cldr_symbol":"MNT","symbol":"₮","code_points":[8366]},"MOP":{"currency":"MOP","name":"Macanese pataca","cldr_symbol":"MOP","symbol":"MOP","code_points":[77,79,80]},"MRO":{"currency":"MRO","name":"Mauritanian ouguiya","cldr_symbol":"MRO","symbol":"MRO","code_points":[77,82,79]},"MTL":{"currency":"MTL","name":"Maltese lira","cldr_symbol":"MTL","symbol":"MTL","code_points":[77,84,76]},"MTP":{"currency":"MTP","name":"Maltese pound","cldr_symbol":"MTP","symbol":"MTP","code_points":[77,84,80]},"MUR":{"currency":"MUR","name":"Mauritian rupee","cldr_symbol":"MUR","symbol":"₨","code_points":[8360]},"MVP":{"currency":"MVP","name":"Maldivian rupee","cldr_symbol":"MVP","symbol":"MVP","code_points":[77,86,80]},"MVR":{"currency":"MVR","name":"Maldivian rufiyaa","cldr_symbol":"MVR","symbol":"MVR","code_points":[77,86,82]},"MWK":{"currency":"MWK","name":"Malawian Kwacha","cldr_symbol":"MWK","symbol":"MWK","code_points":[77,87,75]},"MXN":{"currency":"MXN","name":"Mexican peso","cldr_symbol":"MX$","symbol":"$","code_points":[36]},"MXP":{"currency":"MXP","name":"Mexican silver peso (1861-1992)","cldr_symbol":"MXP","symbol":"MXP","code_points":[77,88,80]},"MXV":{"currency":"MXV","name":"Mexican investment unit","cldr_symbol":"MXV","symbol":"MXV","code_points":[77,88,86]},"MYR":{"currency":"MYR","name":"Malaysian ringgit","cldr_symbol":"MYR","symbol":"RM","code_points":[82,77]},"MZE":{"currency":"MZE","name":"Mozambican escudo","cldr_symbol":"MZE","symbol":"MZE","code_points":[77,90,69]},"MZM":{"currency":"MZM","name":"Mozambican metical (1980-2006)","cldr_symbol":"MZM","symbol":"MZM","code_points":[77,90,77]},"MZN":{"currency":"MZN","name":"Mozambican metical","cldr_symbol":"MZN","symbol":"MT","code_points":[77,84]},"NAD":{"currency":"NAD","name":"Namibian dollar","cldr_symbol":"NAD","symbol":"$","code_points":[36]},"NGN":{"currency":"NGN","name":"Nigerian naira","cldr_symbol":"NGN","symbol":"₦","code_points":[8358]},"NIC":{"currency":"NIC","name":"Nicaraguan córdoba (1988-1991)","cldr_symbol":"NIC","symbol":"NIC","code_points":[78,73,67]},"NIO":{"currency":"NIO","name":"Nicaraguan córdoba","cldr_symbol":"NIO","symbol":"C$","code_points":[67,36]},"NLG":{"currency":"NLG","name":"Dutch guilder","cldr_symbol":"NLG","symbol":"NLG","code_points":[78,76,71]},"NOK":{"currency":"NOK","name":"Norwegian krone","cldr_symbol":"NOK","symbol":"kr","code_points":[107,114]},"NPR":{"currency":"NPR","name":"Nepalese rupee","cldr_symbol":"NPR","symbol":"₨","code_points":[8360]},"NZD":{"currency":"NZD","name":"New Zealand dollar","cldr_symbol":"NZ$","symbol":"$","code_points":[36]},"OMR":{"currency":"OMR","name":"Omani rial","cldr_symbol":"OMR","symbol":"﷼","code_points":[65020]},"PAB":{"currency":"PAB","name":"Panamanian balboa","cldr_symbol":"PAB","symbol":"B/.","code_points":[66,47,46]},"PEI":{"currency":"PEI","name":"Peruvian inti","cldr_symbol":"PEI","symbol":"PEI","code_points":[80,69,73]},"PEN":{"currency":"PEN","name":"Peruvian nuevo sol","cldr_symbol":"PEN","symbol":"S/.","code_points":[83,47,46]},"PES":{"currency":"PES","name":"Peruvian sol (1863-1965)","cldr_symbol":"PES","symbol":"PES","code_points":[80,69,83]},"PGK":{"currency":"PGK","name":"Papua New Guinean kina","cldr_symbol":"PGK","symbol":"PGK","code_points":[80,71,75]},"PHP":{"currency":"PHP","name":"Philippine peso","cldr_symbol":"PHP","symbol":"Php","code_points":[80,104,112]},"PKR":{"currency":"PKR","name":"Pakistani rupee","cldr_symbol":"PKR","symbol":"₨","code_points":[8360]},"PLN":{"currency":"PLN","name":"Polish zloty","cldr_symbol":"PLN","symbol":"zł","code_points":[122,322]},"PLZ":{"currency":"PLZ","name":"Polish zloty (PLZ)","cldr_symbol":"PLZ","symbol":"PLZ","code_points":[80,76,90]},"PTE":{"currency":"PTE","name":"Portuguese escudo","cldr_symbol":"PTE","symbol":"PTE","code_points":[80,84,69]},"PYG":{"currency":"PYG","name":"Paraguayan guarani","cldr_symbol":"PYG","symbol":"Gs","code_points":[71,115]},"QAR":{"currency":"QAR","name":"Qatari rial","cldr_symbol":"QAR","symbol":"﷼","code_points":[65020]},"RHD":{"currency":"RHD","name":"Rhodesian dollar","cldr_symbol":"RHD","symbol":"RHD","code_points":[82,72,68]},"ROL":{"currency":"ROL","name":"Romanian leu (1952-2006)","cldr_symbol":"ROL","symbol":"ROL","code_points":[82,79,76]},"RON":{"currency":"RON","name":"Romanian leu","cldr_symbol":"RON","symbol":"lei","code_points":[108,101,105]},"RSD":{"currency":"RSD","name":"Serbian dinar","cldr_symbol":"RSD","symbol":"Дин.","code_points":[1044,1080,1085,46]},"RUB":{"currency":"RUB","name":"Russian ruble","cldr_symbol":"RUB","symbol":"руб","code_points":[1088,1091,1073]},"RUR":{"currency":"RUR","name":"Russian ruble (1991-1998)","cldr_symbol":"RUR","symbol":"RUR","code_points":[82,85,82]},"RWF":{"currency":"RWF","name":"Rwandan franc","cldr_symbol":"RWF","symbol":"RWF","code_points":[82,87,70]},"SAR":{"currency":"SAR","name":"Saudi riyal","cldr_symbol":"SAR","symbol":"﷼","code_points":[65020]},"SBD":{"currency":"SBD","name":"Solomon Islands dollar","cldr_symbol":"SBD","symbol":"$","code_points":[36]},"SCR":{"currency":"SCR","name":"Seychellois rupee","cldr_symbol":"SCR","symbol":"₨","code_points":[8360]},"SDD":{"currency":"SDD","name":"Sudanese dinar (1992-2007)","cldr_symbol":"SDD","symbol":"SDD","code_points":[83,68,68]},"SDG":{"currency":"SDG","name":"Sudanese pound","cldr_symbol":"SDG","symbol":"SDG","code_points":[83,68,71]},"SDP":{"currency":"SDP","name":"Sudanese pound (1957-1998)","cldr_symbol":"SDP","symbol":"SDP","code_points":[83,68,80]},"SEK":{"currency":"SEK","name":"Swedish krona","cldr_symbol":"SEK","symbol":"kr","code_points":[107,114]},"SGD":{"currency":"SGD","name":"Singapore dollar","cldr_symbol":"SGD","symbol":"$","code_points":[36]},"SHP":{"currency":"SHP","name":"Saint Helena pound","cldr_symbol":"SHP","symbol":"£","code_points":[163]},"SIT":{"currency":"SIT","name":"Slovenian tolar","cldr_symbol":"SIT","symbol":"SIT","code_points":[83,73,84]},"SKK":{"currency":"SKK","name":"Slovak koruna","cldr_symbol":"SKK","symbol":"SKK","code_points":[83,75,75]},"SLL":{"currency":"SLL","name":"Sierra Leonean leone","cldr_symbol":"SLL","symbol":"SLL","code_points":[83,76,76]},"SOS":{"currency":"SOS","name":"Somali shilling","cldr_symbol":"SOS","symbol":"S","code_points":[83]},"SRD":{"currency":"SRD","name":"Surinamese dollar","cldr_symbol":"SRD","symbol":"$","code_points":[36]},"SRG":{"currency":"SRG","name":"Surinamese guilder","cldr_symbol":"SRG","symbol":"SRG","code_points":[83,82,71]},"SSP":{"currency":"SSP","name":"South Sudanese pound","cldr_symbol":"SSP","symbol":"SSP","code_points":[83,83,80]},"STD":{"currency":"STD","name":"São Tomé and Príncipe dobra","cldr_symbol":"STD","symbol":"STD","code_points":[83,84,68]},"SUR":{"currency":"SUR","name":"Soviet rouble","cldr_symbol":"SUR","symbol":"SUR","code_points":[83,85,82]},"SVC":{"currency":"SVC","name":"Salvadoran colón","cldr_symbol":"SVC","symbol":"SVC","code_points":[83,86,67]},"SYP":{"currency":"SYP","name":"Syrian pound","cldr_symbol":"SYP","symbol":"£","code_points":[163]},"SZL":{"currency":"SZL","name":"Swazi lilangeni","cldr_symbol":"SZL","symbol":"SZL","code_points":[83,90,76]},"THB":{"currency":"THB","name":"Thai baht","cldr_symbol":"฿","symbol":"฿","code_points":[3647]},"TJR":{"currency":"TJR","name":"Tajikistani ruble","cldr_symbol":"TJR","symbol":"TJR","code_points":[84,74,82]},"TJS":{"currency":"TJS","name":"Tajikistani somoni","cldr_symbol":"TJS","symbol":"TJS","code_points":[84,74,83]},"TMM":{"currency":"TMM","name":"Turkmenistani manat (1993-2009)","cldr_symbol":"TMM","symbol":"TMM","code_points":[84,77,77]},"TMT":{"currency":"TMT","name":"Turkmenistani manat","cldr_symbol":"TMT","symbol":"TMT","code_points":[84,77,84]},"TND":{"currency":"TND","name":"Tunisian dinar","cldr_symbol":"TND","symbol":"TND","code_points":[84,78,68]},"TOP":{"currency":"TOP","name":"Tongan paʻanga","cldr_symbol":"TOP","symbol":"TOP","code_points":[84,79,80]},"TPE":{"currency":"TPE","name":"Timorese escudo","cldr_symbol":"TPE","symbol":"TPE","code_points":[84,80,69]},"TRL":{"currency":"TRL","name":"Turkish lira (1922-2005)","cldr_symbol":"TRL","symbol":"TRL","code_points":[84,82,76]},"TRY":{"currency":"TRY","name":"Turkish lira","cldr_symbol":"TRY","symbol":"TL","code_points":[84,76]},"TTD":{"currency":"TTD","name":"Trinidad and Tobago dollar","cldr_symbol":"TTD","symbol":"$","code_points":[36]},"TWD":{"currency":"TWD","name":"New Taiwan dollar","cldr_symbol":"NT$","symbol":"NT$","code_points":[78,84,36]},"TZS":{"currency":"TZS","name":"Tanzanian shilling","cldr_symbol":"TZS","symbol":"TZS","code_points":[84,90,83]},"UAH":{"currency":"UAH","name":"Ukrainian hryvnia","cldr_symbol":"UAH","symbol":"₴","code_points":[8372]},"UAK":{"currency":"UAK","name":"Ukrainian karbovanets","cldr_symbol":"UAK","symbol":"UAK","code_points":[85,65,75]},"UGS":{"currency":"UGS","name":"Ugandan shilling (1966-1987)","cldr_symbol":"UGS","symbol":"UGS","code_points":[85,71,83]},"UGX":{"currency":"UGX","name":"Ugandan shilling","cldr_symbol":"UGX","symbol":"UGX","code_points":[85,71,88]},"USD":{"currency":"USD","name":"US dollar","cldr_symbol":"$","symbol":"$","code_points":[36]},"USN":{"currency":"USN","name":"US dollar (next day)","cldr_symbol":"USN","symbol":"USN","code_points":[85,83,78]},"USS":{"currency":"USS","name":"US dollar (same day)","cldr_symbol":"USS","symbol":"USS","code_points":[85,83,83]},"UYI":{"currency":"UYI","name":"Uruguayan peso (indexed units)","cldr_symbol":"UYI","symbol":"UYI","code_points":[85,89,73]},"UYP":{"currency":"UYP","name":"Uruguayan peso (1975-1993)","cldr_symbol":"UYP","symbol":"UYP","code_points":[85,89,80]},"UYU":{"currency":"UYU","name":"Uruguayan peso","cldr_symbol":"UYU","symbol":"$U","code_points":[36,85]},"UZS":{"currency":"UZS","name":"Uzbekistan som","cldr_symbol":"UZS","symbol":"лв","code_points":[1083,1074]},"VEB":{"currency":"VEB","name":"Venezuelan bolívar (1871-2008)","cldr_symbol":"VEB","symbol":"VEB","code_points":[86,69,66]},"VEF":{"currency":"VEF","name":"Venezuelan bolívar","cldr_symbol":"VEF","symbol":"Bs","code_points":[66,115]},"VND":{"currency":"VND","name":"Vietnamese dong","cldr_symbol":"₫","symbol":"₫","code_points":[8363]},"VNN":{"currency":"VNN","name":"Vietnamese dong (1978-1985)","cldr_symbol":"VNN","symbol":"VNN","code_points":[86,78,78]},"VUV":{"currency":"VUV","name":"Vanuatu vatu","cldr_symbol":"VUV","symbol":"VUV","code_points":[86,85,86]},"WST":{"currency":"WST","name":"Samoan tala","cldr_symbol":"WST","symbol":"WST","code_points":[87,83,84]},"XAF":{"currency":"XAF","name":"CFA franc BEAC","cldr_symbol":"FCFA","symbol":"FCFA","code_points":[70,67,70,65]},"XAG":{"currency":"XAG","name":"troy ounce of silver","cldr_symbol":"XAG","symbol":"XAG","code_points":[88,65,71]},"XAU":{"currency":"XAU","name":"troy ounce of gold","cldr_symbol":"XAU","symbol":"XAU","code_points":[88,65,85]},"XBA":{"currency":"XBA","name":"European composite unit","cldr_symbol":"XBA","symbol":"XBA","code_points":[88,66,65]},"XBB":{"currency":"XBB","name":"European monetary unit","cldr_symbol":"XBB","symbol":"XBB","code_points":[88,66,66]},"XBC":{"currency":"XBC","name":"European unit of account (XBC)","cldr_symbol":"XBC","symbol":"XBC","code_points":[88,66,67]},"XBD":{"currency":"XBD","name":"European unit of account (XBD)","cldr_symbol":"XBD","symbol":"XBD","code_points":[88,66,68]},"XCD":{"currency":"XCD","name":"East Caribbean dollar","cldr_symbol":"EC$","symbol":"$","code_points":[36]},"XDR":{"currency":"XDR","name":"special drawing rights","cldr_symbol":"XDR","symbol":"XDR","code_points":[88,68,82]},"XEU":{"currency":"XEU","name":"European currency unit","cldr_symbol":"XEU","symbol":"XEU","code_points":[88,69,85]},"XFO":{"currency":"XFO","name":"French gold franc","cldr_symbol":"XFO","symbol":"XFO","code_points":[88,70,79]},"XFU":{"currency":"XFU","name":"French UIC-franc","cldr_symbol":"XFU","symbol":"XFU","code_points":[88,70,85]},"XOF":{"currency":"XOF","name":"CFA franc BCEAO","cldr_symbol":"CFA","symbol":"CFA","code_points":[67,70,65]},"XPD":{"currency":"XPD","name":"troy ounce of palladium","cldr_symbol":"XPD","symbol":"XPD","code_points":[88,80,68]},"XPF":{"currency":"XPF","name":"CFP franc","cldr_symbol":"CFPF","symbol":"CFPF","code_points":[67,70,80,70]},"XPT":{"currency":"XPT","name":"troy ounce of platinum","cldr_symbol":"XPT","symbol":"XPT","code_points":[88,80,84]},"XRE":{"currency":"XRE","name":"RINET Funds unit","cldr_symbol":"XRE","symbol":"XRE","code_points":[88,82,69]},"XSU":{"currency":"XSU","name":"Sucre","cldr_symbol":"XSU","symbol":"XSU","code_points":[88,83,85]},"XTS":{"currency":"XTS","name":"Testing Currency unit","cldr_symbol":"XTS","symbol":"XTS","code_points":[88,84,83]},"XUA":{"currency":"XUA","name":"ADB unit of account","cldr_symbol":"XUA","symbol":"XUA","code_points":[88,85,65]},"XXX":{"currency":"XXX","name":"(unknown unit of currency)","cldr_symbol":"XXX","symbol":"XXX","code_points":[88,88,88]},"YDD":{"currency":"YDD","name":"Yemeni dinar","cldr_symbol":"YDD","symbol":"YDD","code_points":[89,68,68]},"YER":{"currency":"YER","name":"Yemeni rial","cldr_symbol":"YER","symbol":"﷼","code_points":[65020]},"YUD":{"currency":"YUD","name":"Yugoslavian hard dinar (1966-1990)","cldr_symbol":"YUD","symbol":"YUD","code_points":[89,85,68]},"YUM":{"currency":"YUM","name":"Yugoslavian new dinar (1994-2002)","cldr_symbol":"YUM","symbol":"YUM","code_points":[89,85,77]},"YUN":{"currency":"YUN","name":"Yugoslavian convertible dinar (1990-1992)","cldr_symbol":"YUN","symbol":"YUN","code_points":[89,85,78]},"YUR":{"currency":"YUR","name":"Yugoslavian reformed dinar (1992-1993)","cldr_symbol":"YUR","symbol":"YUR","code_points":[89,85,82]},"ZAL":{"currency":"ZAL","name":"South African rand (financial)","cldr_symbol":"ZAL","symbol":"ZAL","code_points":[90,65,76]},"ZAR":{"currency":"ZAR","name":"South African rand","cldr_symbol":"ZAR","symbol":"R","code_points":[82]},"ZMK":{"currency":"ZMK","name":"Zambian kwacha","cldr_symbol":"ZMK","symbol":"ZMK","code_points":[90,77,75]},"ZRN":{"currency":"ZRN","name":"Zairean new zaire (1993-1998)","cldr_symbol":"ZRN","symbol":"ZRN","code_points":[90,82,78]},"ZRZ":{"currency":"ZRZ","name":"Zairean zaire (1971-1993)","cldr_symbol":"ZRZ","symbol":"ZRZ","code_points":[90,82,90]},"ZWD":{"currency":"ZWD","name":"Zimbabwean dollar (1980-2008)","cldr_symbol":"ZWD","symbol":"Z$","code_points":[90,36]},"ZWL":{"currency":"ZWL","name":"Zimbabwean dollar (2009)","cldr_symbol":"ZWL","symbol":"ZWL","code_points":[90,87,76]},"ZWR":{"currency":"ZWR","name":"Zimbabwean dollar (2008)","cldr_symbol":"ZWR","symbol":"ZWR","code_points":[90,87,82]}};1087 Currencies.currency_codes = function() {1088 var data, _;1089 return this.codes || (this.codes = (function() {1090 var _ref, _results;1091 _ref = this.currencies;1092 _results = [];1093 for (_ in _ref) {1094 data = _ref[_];1095 _results.push(data.code);1096 }1097 return _results;1098 }).call(this));1099 };1100 Currencies.for_code = function(currency_code) {1101 var country_name, data, result, _ref;1102 result = null;1103 _ref = this.currencies;1104 for (country_name in _ref) {1105 data = _ref[country_name];1106 if (data.currency === currency_code) {1107 result = {1108 country: country_name,1109 cldr_symbol: data.cldr_symbol,1110 symbol: data.symbol,1111 currency: data.currency1112 };1113 break;1114 }1115 }1116 return result;1117 };1118 return Currencies;1119 })();1120 TwitterCldr.ListFormatter = (function() {1121 function ListFormatter(options) {1122 if (options == null) {1123 options = {};1124 }1125 this.formats = {"2":"{0} and {1}","end":"{0}, and {1}","middle":"{0}, {1}","start":"{0}, {1}"};1126 }1127 ListFormatter.prototype.format = function(list) {1128 if (this.formats[list.length.toString()] != null) {1129 return this.compose(this.formats[list.length.toString()], list);1130 } else {1131 return this.compose_list(list);1132 }1133 };1134 ListFormatter.prototype.compose_list = function(list) {1135 var format_key, i, result, _i, _ref;1136 result = this.compose(this.formats.end || this.formats.middle || "", [list[list.length - 2], list[list.length - 1]]);1137 if (list.length > 2) {1138 for (i = _i = 3, _ref = list.length; 3 <= _ref ? _i <= _ref : _i >= _ref; i = 3 <= _ref ? ++_i : --_i) {1139 format_key = i === list.length ? "start" : "middle";1140 if (this.formats[format_key] == null) {1141 format_key = "middle";1142 }1143 result = this.compose(this.formats[format_key] || "", [list[list.length - i], result]);1144 }1145 }1146 return result;1147 };1148 ListFormatter.prototype.compose = function(format, elements) {1149 var element, result;1150 elements = (function() {1151 var _i, _len, _results;1152 _results = [];1153 for (_i = 0, _len = elements.length; _i < _len; _i++) {1154 element = elements[_i];1155 if (element !== null) {1156 _results.push(element);1157 }1158 }1159 return _results;1160 })();1161 if (elements.length > 1) {1162 result = format.replace(/\{(\d+)\}/g, function() {1163 return RegExp.$1;1164 });1165 if (TwitterCldr.is_rtl) {1166 result = TwitterCldr.Bidi.from_string(result, {1167 "direction": "RTL"1168 }).reorder_visually().toString();1169 }1170 return result.replace(/(\d+)/g, function() {1171 return elements[parseInt(RegExp.$1)];1172 });1173 } else {1174 return elements[0] || "";1175 }1176 };1177 return ListFormatter;1178 })();1179 TwitterCldr.Bidi = (function() {1180 var MAX_DEPTH;1181 MAX_DEPTH = 62;1182 function Bidi(options) {1183 if (options == null) {1184 options = {};1185 }1186 this.bidi_classes = {"BN":{"8":[0],"13":[14],"5":[127,8298],"25":[134],"0":[173,65279,917505],"2":[8203],"4":[8288],"7":[119155],"95":[917536]},"S":{"0":[9,11,31]},"B":{"0":[10,13,133,8233],"2":[28]},"WS":{"0":[12,32,5760,6158,8232,8287,12288],"10":[8192]},"ON":{"1":[33,171,174,697,884,900,1542,1550,5787,6468,8189,8448,8456,8506,12342,12443,12829,13278,42622,64830,65120,65281,126704,127338],"4":[38,187,8512,65286,65529,127942],"5":[59,91,3059,8478,11493,65307,65339,127792],"3":[123,166,2038,3898,8451,8522,12289,13004,13175,43048,43124,128249,128320],"0":[161,180,215,247,894,903,1014,1418,1758,1769,3066,5120,6464,8125,8468,8485,8487,8489,8585,12336,12448,12539,13311,42611,42888,65021,65105,65108,65128,65131,65793,67871,119365,120539,120597,120655,120713,120771,128064],"2":[182,8127,8141,8157,8173,8316,8332,8470,12349,12924,42509,65124,65506],"13":[706,722,127153],"8":[741,65110],"16":[751,127968],"6":[3192,11513,65512,68409],"9":[5008,6128,11088,65040],"10":[6144,9280,65371,128581],"33":[6622,42752],"23":[8208,128336],"14":[8245,12977,127136,127169,127185],"25":[8261,9083,11904],"15":[8528,12880],"129":[8592],"289":[8724],"93":[9110],"38":[9216],"39":[9312],"449":[9450],"82":[9901],"254":[9985],"588":[10496],"59":[11776],"88":[11931],"213":[12032],"11":[12272,65936],"24":[12296],"35":[12736],"63":[19904],"54":[42128],"31":[65072],"74":[65856],"19":[69714,127872],"65":[119296],"86":[119552],"43":[126976],"99":[127024],"32":[127744],"69":[127799,128507,128640],"36":[127904],"62":[128000],"181":[128066],"61":[128256],"115":[128768]},"ET":{"2":[35,65283],"3":[162],"1":[176,1545,2546,43064,65129,65504,65509],"0":[1423,1642,2555,2801,3065,3647,6107,8494,8723,65119],"4":[8240],"25":[8352]},"ES":{"0":[43,45,8722,64297,65291,65293],"1":[8314,8330,65122]},"CS":{"0":[44,58,160,1548,8239,8260,65104,65106,65109,65292,65306],"1":[46,65294]},"EN":{"9":[48,1776,8320,65296],"1":[178],"0":[185,8304],"5":[8308],"19":[9352],"49":[120782],"10":[127232]},"L":{"25":[65,97,5761,6576,65313,65345,65549],"0":[170,181,186,750,902,908,1417,2363,2482,2510,2519,2563,2654,2691,2761,2768,2880,2903,2947,2972,3024,3031,3133,3199,3294,3406,3415,3517,3716,3722,3725,3749,3751,3773,3782,3894,3896,3967,3973,4145,4152,4295,4301,4696,4800,6070,6108,6314,6743,6753,6965,6971,7082,7143,7150,7379,7393,8025,8027,8029,8126,8206,8305,8319,8450,8455,8469,8484,8486,8488,9109,9900,11559,11565,43047,43597,43697,43712,43714,65792,65794,69632,69932,71340,71350,119970,119995,120134],"22":[192,3090,3218,6656,11648],"30":[216,8031,13280,66304,127248],"448":[248],"6":[699,1369,2425,2474,2548,2602,2730,2858,3449,3520,3648,3737,4688,4792,6100,8118,8134,8182,11680,11688,11696,11704,11712,11720,11728,11736,43808,43816,64256,69703,69819,119997,120086,120138],"1":[720,886,2434,2447,2503,2507,2524,2575,2610,2613,2616,2738,2763,2784,2818,2831,2866,2877,2887,2891,2908,2969,2974,2979,3006,3009,3160,3168,3202,3274,3285,3296,3313,3330,3424,3458,3634,3713,3719,3754,3762,4155,4227,5941,6087,6448,6755,7078,7154,7220,7413,8526,11506,11631,12334,43346,43444,43450,43486,43567,43571,43701,44006,65596,69815,71342,110592,119171,119966,119973,127568],"4":[736,2741,2869,3125,3253,3776,3976,6512,6973,8473,8517,12337,12344,43705,64275,120128],"3":[880,890,2365,2377,2486,2493,2649,2749,2962,3137,3389,3732,3757,3804,4186,4682,4698,4746,4786,4802,4882,5902,6435,7401,8144,8490,8508,11499,12540,42896,43015,44009,66336,74864,119977,120071,120123],"2":[904,2382,2527,2622,2674,2703,2911,2958,2984,3014,3018,3073,3086,3214,3270,3342,3398,3402,3535,3570,3745,5998,6441,6681,7146,8130,8178,12293,12445,43011,43584,65498],"19":[910,2404],"82":[931],"139":[1015],"157":[1162,66560],"37":[1329,7968,11520,43264],"38":[1377,119040],"54":[2307],"9":[2392,2662,3114,3174,3242,3302,3792,3902,6112,6160,6784,6800,8458,43000,43250,43600,44016,66720,69734,69872,70079,70096,71360],"7":[2437,2821,3077,3205,3261,3333,3544,4030,6078,7360,8016,43056,43588,43758,120077,120772],"21":[2451,2579,2707,2835],"11":[2534,2990,12992,43214,65536,119982],"5":[2565,2949,4039,4231,6451,6765,7406,7960,8008,8150,42738,42889,43777,43785,43793,65474,65482,65490],"8":[2693,3507,6979,7028,12321,65847,119146,127552],"10":[2790,6608,8495,42912,43471],"17":[2918,3461,5920,5952,119648],"12":[3046,3663,4046,4213,5888,5984,8160,8336,94099],"40":[3346,4704,6272,8544,12549,43520],"15":[3430,4193,4992],"23":[3482,3840,42624],"47":[3585,6916,7164,12832,43395,43648,119214],"26":[3866,6992,66352],"35":[3913,69891],"44":[4096,12784,65799,66000],"24":[4159,43020,43310,69840],"14":[4238,4808,7227,65599],"39":[4254,6470],"376":[4304],"32":[4752],"56":[4824,120540,120598,120656,120714],"66":[4888],"28":[4960,6400,66176,127462],"84":[5024,119808],"638":[5121],"80":[5792],"51":[6016,43072,70018],"87":[6176],"69":[6320],"43":[6528],"55":[6686,11568],"13":[6816,65616,66504,69942],"31":[7042,43612],"57":[7084,127280],"50":[7245,120488],"191":[7424],"277":[7680],"52":[8064],"68":[9014,93952],"77":[9372],"255":[10240],"46":[11264,11312,13008,42560,94032],"132":[11360],"85":[12353],"89":[12449],"93":[12593],"42":[12688,71296,127344,127504],"27":[12896,42512,120094],"49":[12927],"118":[13056],"98":[13179,74752],"6591":[13312],"22156":[19968],"316":[42192],"79":[42656],"101":[42786],"67":[43136],"29":[43359,66432,119180],"16":[43453,43739],"36":[43968,66463],"11206":[44032],"48":[55243,66208,69762],"8813":[55296],"105":[64112],"88":[65382],"18":[65576],"122":[65664],"53":[69634],"878":[73728],"1070":[77824],"568":[92160],"245":[118784],"61":[119081],"70":[119894],"64":[120005],"339":[120146],"42719":[131072],"4383":[173824],"541":[194560],"131071":[983040]},"NSM":{"111":[768],"6":[1155,1750,2385,3636,6071,6744,7394,65056,119173],"44":[1425],"0":[1471,1479,1648,1809,2362,2364,2381,2433,2492,2509,2620,2641,2677,2748,2765,2817,2876,2879,2893,2902,2946,3008,3021,3260,3405,3530,3542,3633,3761,3893,3895,3897,4038,4226,4237,4253,6086,6109,6313,6450,6742,6752,6754,6783,6964,6972,6978,7083,7142,7149,7405,7412,11647,42655,43010,43014,43019,43204,43443,43452,43587,43596,43696,43713,43766,44005,44008,44013,64286,66045,68159,69633,71339,71341,71351],"1":[1473,1476,1767,2402,2530,2561,2625,2631,2672,2689,2759,2786,2914,3157,3170,3276,3298,3426,3771,3864,3974,4153,4157,4184,4229,5970,6002,6068,6439,6679,7040,7080,7144,7222,12441,42736,43045,43569,43573,43703,43710,43756,68101,69760,69817,70016],"10":[1552,1958,3981,6089,43335],"20":[1611],"5":[1759,3764,3784,4146,43561,71344],"3":[1770,2070,2497,2881,3146,3393,4141,4209,6912,7074,7676,12330,42607,43446,68108,69811,94095,119210],"26":[1840,2276],"8":[2027,2075,7019,70070],"2":[2085,2137,2304,2635,3134,3142,3538,4190,4957,5906,5938,6155,6432,6457,7151,7376,11503,43392,43698,68097,68152,69888,119143,119362],"4":[2089,2753,3968,6966,69927],"7":[2369,3655,6757,7212,43302,69933,119163],"13":[3953],"35":[3993],"9":[6771,42612],"12":[7380],"38":[7616],"32":[8400],"31":[11744],"17":[43232],"15":[65024],"14":[69688],"239":[917760]},"R":{"0":[1470,1472,1475,1478,2042,2074,2084,2088,2142,8207,64285,64318,67592,67644,67903,68096],"26":[1488,68121,68440],"4":[1520,64312],"42":[1984],"1":[2036,64320,64323,67639,68030],"21":[2048,68416],"14":[2096],"24":[2112],"9":[64287,64326],"12":[64298],"5":[67584],"43":[67594],"22":[67647],"8":[67671,68176],"27":[67840],"25":[67872],"55":[67968],"3":[68112],"2":[68117],"7":[68160,68472],"31":[68192],"53":[68352],"72":[68608]},"AN":{"4":[1536],"9":[1632],"1":[1643],"0":[1757],"30":[69216]},"AL":{"0":[1544,1547,1549,1563,1969,2208,126500,126503,126521,126523,126530,126535,126537,126539,126548,126551,126553,126555,126557,126559,126564,126590],"44":[1566],"2":[1645,126541,126625],"100":[1649],"1":[1765,1774,1807,126497,126545,126561],"19":[1786],"29":[1810],"88":[1869],"10":[2210],"113":[64336],"362":[64467],"63":[64848],"53":[64914],"12":[65008],"4":[65136,126629],"134":[65142],"3":[126464,126516,126567,126580,126585],"26":[126469],"9":[126505,126592],"6":[126572],"16":[126603,126635]},"LRE":{"0":[8234]},"RLE":{"0":[8235]},"PDF":{"0":[8236]},"LRO":{"0":[8237]},"RLO":{"0":[8238]}};1187 this.string_arr = options.string_arr || options.types;1188 this.types = options.types || [];1189 this.levels = [];1190 this.runs = [];1191 this.direction = options.direction;1192 this.default_direction = options.default_direction || "LTR";1193 this.length = this.types.length;1194 this.run_bidi();1195 }1196 Bidi.bidi_class_for = function(code_point) {1197 var bidi_class, end, range, range_list, range_offset, ranges, start, _i, _len, _ref;1198 _ref = this.bidi_classes;1199 for (bidi_class in _ref) {1200 ranges = _ref[bidi_class];1201 for (range_offset in ranges) {1202 range_list = ranges[range_offset];1203 for (_i = 0, _len = range_list.length; _i < _len; _i++) {1204 range = range_list[_i];1205 start = range;1206 end = start + parseInt(range_offset);1207 if ((code_point >= start) && (code_point <= end)) {1208 return bidi_class;1209 }1210 }1211 }1212 }1213 return null;1214 };1215 Bidi.from_string = function(str, options) {1216 var string_arr;1217 if (options == null) {1218 options = {};1219 }1220 string_arr = TwitterCldr.Utilities.unpack_string(str);1221 options.types || (options.types = this.compute_types(string_arr));1222 options.string_arr || (options.string_arr = string_arr);1223 return new TwitterCldr.Bidi(options);1224 };1225 Bidi.from_type_array = function(types, options) {1226 if (options == null) {1227 options = {};1228 }1229 options.types || (options.types = types);1230 return new TwitterCldr.Bidi(options);1231 };1232 Bidi.compute_types = function(arr) {1233 var code_point, _i, _len, _results;1234 _results = [];1235 for (_i = 0, _len = arr.length; _i < _len; _i++) {1236 code_point = arr[_i];1237 _results.push(TwitterCldr.Bidi.bidi_class_for(code_point));1238 }1239 return _results;1240 };1241 Bidi.prototype.toString = function() {1242 return TwitterCldr.Utilities.pack_array(this.string_arr);1243 };1244 Bidi.prototype.reorder_visually = function() {1245 var depth, finish, i, level, lowest_odd, max, start, tmpb, tmpo, _i, _j, _k, _len, _ref, _ref1;1246 if (!this.string_arr) {1247 throw "No string given!";1248 }1249 max = 0;1250 lowest_odd = MAX_DEPTH + 1;1251 _ref = this.levels;1252 for (_i = 0, _len = _ref.length; _i < _len; _i++) {1253 level = _ref[_i];1254 max = TwitterCldr.Utilities.max([level, max]);1255 if (!TwitterCldr.Utilities.is_even(level)) {1256 lowest_odd = TwitterCldr.Utilities.min([lowest_odd, level]);1257 }1258 }1259 for (depth = _j = max; max <= 0 ? _j < 0 : _j > 0; depth = max <= 0 ? ++_j : --_j) {1260 start = 0;1261 while (start < this.levels.length) {1262 while (start < this.levels.length && this.levels[start] < depth) {1263 start += 1;1264 }1265 if (start === this.levels.length) {1266 break;1267 }1268 finish = start + 1;1269 while (finish < this.levels.length && this.levels[finish] >= depth) {1270 finish += 1;1271 }1272 for (i = _k = 0, _ref1 = (finish - start) / 2; 0 <= _ref1 ? _k < _ref1 : _k > _ref1; i = 0 <= _ref1 ? ++_k : --_k) {1273 tmpb = this.levels[finish - i - 1];1274 this.levels[finish - i - 1] = this.levels[start + i];1275 this.levels[start + i] = tmpb;1276 tmpo = this.string_arr[finish - i - 1];1277 this.string_arr[finish - i - 1] = this.string_arr[start + i];1278 this.string_arr[start + i] = tmpo;1279 }1280 start = finish + 1;1281 }1282 }1283 return this;1284 };1285 Bidi.prototype.compute_paragraph_embedding_level = function() {1286 var type, _i, _len, _ref;1287 if (["LTR", "RTL"].indexOf(this.direction) > -1) {1288 if (this.direction === "LTR") {1289 return 0;1290 } else {1291 return 1;1292 }1293 } else {1294 _ref = this.types;1295 for (_i = 0, _len = _ref.length; _i < _len; _i++) {1296 type = _ref[_i];1297 if (type === "L") {1298 return 0;1299 }1300 if (type === "R") {1301 return 1;1302 }1303 }1304 if (this.default_direction === "LTR") {1305 return 0;1306 } else {1307 return 1;1308 }1309 }1310 };1311 Bidi.prototype.compute_explicit_levels = function() {1312 var current_embedding, directional_override, embedding_stack, i, input, is_ltr, is_special, len, new_embedding, next_fmt, output, size, sp, _i, _j, _ref, _ref1;1313 current_embedding = this.base_embedding;1314 directional_override = -1;1315 embedding_stack = [];1316 this.formatter_indices || (this.formatter_indices = []);1317 sp = 0;1318 for (i = _i = 0, _ref = this.length; 0 <= _ref ? _i < _ref : _i > _ref; i = 0 <= _ref ? ++_i : --_i) {1319 is_ltr = false;1320 is_special = true;1321 is_ltr = this.types[i] === "LRE" || this.types[i] === "LRO";1322 switch (this.types[i]) {1323 case "RLE":1324 case "RLO":1325 case "LRE":1326 case "LRO":1327 new_embedding = is_ltr ? (current_embedding & ~1) + 2 : (current_embedding + 1) | 1;1328 if (new_embedding < MAX_DEPTH) {1329 if (directional_override !== -1) {1330 current_embedding |= -0x80;1331 }1332 embedding_stack[sp] = current_embedding;1333 current_embedding = new_embedding;1334 sp += 1;1335 directional_override = this.types[i] === "LRO" ? "L" : this.types[i] === "RLO" ? "R" : -1;1336 }1337 break;1338 case "PDF":1339 if (sp > 0) {1340 sp -= 1;1341 new_embedding = embedding_stack[sp];1342 current_embedding = new_embedding & 0x7f;1343 directional_override = new_embedding < 0 ? (_ref1 = (new_embedding & 1) === 0) != null ? _ref1 : {1344 "L": "R"1345 } : -1;1346 }1347 break;1348 default:1349 is_special = false;1350 }1351 this.levels[i] = current_embedding;1352 if (is_special) {1353 this.formatter_indices.push(i);1354 } else if (directional_override !== -1) {1355 this.types[i] = directional_override;1356 }1357 }1358 output = 0;1359 input = 0;1360 size = this.formatter_indices.length;1361 for (i = _j = 0; 0 <= size ? _j <= size : _j >= size; i = 0 <= size ? ++_j : --_j) {1362 next_fmt = i === size ? this.length : this.formatter_indices[i];1363 len = next_fmt - input;1364 TwitterCldr.Utilities.arraycopy(this.levels, input, this.levels, output, len);1365 TwitterCldr.Utilities.arraycopy(this.types, input, this.types, output, len);1366 output += len;1367 input = next_fmt + 1;1368 }1369 return this.length -= this.formatter_indices.length;1370 };1371 Bidi.prototype.compute_runs = function() {1372 var current_embedding, i, last_run_start, run_count, where, _i, _j, _ref, _ref1;1373 run_count = 0;1374 current_embedding = this.base_embedding;1375 for (i = _i = 0, _ref = this.length; 0 <= _ref ? _i < _ref : _i > _ref; i = 0 <= _ref ? ++_i : --_i) {1376 if (this.levels[i] !== current_embedding) {1377 current_embedding = this.levels[i];1378 run_count += 1;1379 }1380 }1381 where = 0;1382 last_run_start = 0;1383 current_embedding = this.base_embedding;1384 for (i = _j = 0, _ref1 = this.length; 0 <= _ref1 ? _j < _ref1 : _j > _ref1; i = 0 <= _ref1 ? ++_j : --_j) {1385 if (this.levels[i] !== current_embedding) {1386 this.runs[where] = last_run_start;1387 where += 1;1388 last_run_start = i;1389 current_embedding = this.levels[i];1390 }1391 }1392 return this.runs[where] = last_run_start;1393 };1394 Bidi.prototype.resolve_weak_types = function() {1395 var eor, finish, i, j, k, level, next_level, next_type, prev_strong_type, prev_type, previous_level, run_count, run_idx, sor, start, _i, _j, _k;1396 run_count = this.runs.length;1397 previous_level = this.base_embedding;1398 for (run_idx = _i = 0; 0 <= run_count ? _i < run_count : _i > run_count; run_idx = 0 <= run_count ? ++_i : --_i) {1399 start = this.get_run_start(run_idx);1400 finish = this.get_run_limit(run_idx);1401 level = this.get_run_level(run_idx) || 0;1402 sor = TwitterCldr.Utilities.is_even(TwitterCldr.Utilities.max([previous_level, level])) ? "L" : "R";1403 next_level = run_idx === (run_count - 1) ? this.base_embedding : this.get_run_level(run_idx + 1) || 0;1404 eor = TwitterCldr.Utilities.is_even(TwitterCldr.Utilities.max([level, next_level])) ? "L" : "R";1405 prev_type = sor;1406 prev_strong_type = sor;1407 for (i = _j = start; start <= finish ? _j < finish : _j > finish; i = start <= finish ? ++_j : --_j) {1408 next_type = i === (finish - 1) ? eor : this.types[i + 1];1409 if (this.types[i] === "NSM") {1410 this.types[i] = prev_type;1411 } else {1412 prev_type = this.types[i];1413 }1414 if (this.types[i] === "EN") {1415 if (prev_strong_type === "AL") {1416 this.types[i] = "AN";1417 }1418 } else if (this.types[i] === "L" || this.types[i] === "R" || this.types[i] === "AL") {1419 prev_strong_type = this.types[i];1420 }1421 if (this.types[i] === "AL") {1422 this.types[i] = "R";1423 }1424 if (prev_type === "EN" && next_type === "EN") {1425 if (this.types[i] === "ES" || this.types[i] === "CS") {1426 this.types[i] = nextType;1427 }1428 } else if (prev_type === "AN" && next_type === "AN" && this.types[i] === "CS") {1429 this.types[i] = next_type;1430 }1431 if (this.types[i] === "ET" || this.types[i] === "BN") {1432 if (prev_type === "EN") {1433 this.types[i] = prev_type;1434 } else {1435 j = i + 1;1436 while (j < finish && this.types[j] === "ET" || this.types[j] === "BN") {1437 j += 1;1438 }1439 if (j < finish && this.types[j] === "EN") {1440 for (k = _k = i; i <= j ? _k < j : _k > j; k = i <= j ? ++_k : --_k) {1441 this.types[k] = "EN";1442 }1443 }1444 }1445 }1446 if (this.types[i] === "ET" || this.types[i] === "CS" || this.types[i] === "BN") {1447 this.types[i] = "ON";1448 }1449 if (prev_strong_type === "L" && this.types[i] === "EN") {1450 this.types[i] = prev_strong_type;1451 }1452 }1453 previous_level = level;1454 }1455 };1456 Bidi.prototype.get_run_count = function() {1457 return this.runs.length;1458 };1459 Bidi.prototype.get_run_level = function(which) {1460 return this.levels[this.runs[which]];1461 };1462 Bidi.prototype.get_run_limit = function(which) {1463 if (which === (this.runs.length - 1)) {1464 return this.length;1465 } else {1466 return this.runs[which + 1];1467 }1468 };1469 Bidi.prototype.get_run_start = function(which) {1470 return this.runs[which];1471 };1472 Bidi.prototype.resolve_implicit_levels = function() {1473 var i, _i, _ref;1474 for (i = _i = 0, _ref = this.length; 0 <= _ref ? _i < _ref : _i > _ref; i = 0 <= _ref ? ++_i : --_i) {1475 if ((this.levels[i] & 1) === 0) {1476 if (this.types[i] === "R") {1477 this.levels[i] += 1;1478 } else if (this.types[i] === "AN" || this.types[i] === "EN") {1479 this.levels[i] += 2;1480 }1481 } else {1482 if (this.types[i] === "L" || this.types[i] === "AN" || this.types[i] === "EN") {1483 this.levels[i] += 1;1484 }1485 }1486 }1487 };1488 Bidi.prototype.resolve_neutral_types = function() {1489 var embedding_direction, eor, finish, i, j, level, neutral_start, new_strong, next_level, override, prev_strong, previous_level, run, run_count, sor, start, this_type, _i, _j, _k;1490 run_count = this.get_run_count();1491 previous_level = this.base_embedding;1492 for (run = _i = 0; 0 <= run_count ? _i < run_count : _i > run_count; run = 0 <= run_count ? ++_i : --_i) {1493 start = this.get_run_start(run);1494 finish = this.get_run_limit(run);1495 level = this.get_run_level(run);1496 if (level == null) {1497 continue;1498 }1499 embedding_direction = TwitterCldr.Utilities.is_even(level) ? "L" : "R";1500 sor = TwitterCldr.Utilities.is_even(TwitterCldr.Utilities.max([previous_level, level])) ? "L" : "R";1501 next_level = run === (run_count - 1) ? this.base_embedding : this.get_run_level(run + 1);1502 eor = TwitterCldr.Utilities.is_even(TwitterCldr.Utilities.max([level, next_level])) ? "L" : "R";1503 prev_strong = sor;1504 neutral_start = -1;1505 for (i = _j = start; start <= finish ? _j <= finish : _j >= finish; i = start <= finish ? ++_j : --_j) {1506 new_strong = -1;1507 this_type = i === finish ? eor : this.types[i];1508 switch (this_type) {1509 case "L":1510 new_strong = "L";1511 break;1512 case "R":1513 case "AN":1514 case "EN":1515 new_strong = "R";1516 break;1517 case "BN":1518 case "ON":1519 case "S":1520 case "B":1521 case "WS":1522 if (neutral_start === -1) {1523 neutral_start = i;1524 }1525 }1526 if (new_strong !== -1) {1527 if (neutral_start !== -1) {1528 override = prev_strong === new_strong ? prev_strong : embedding_direction;1529 for (j = _k = neutral_start; neutral_start <= i ? _k < i : _k > i; j = neutral_start <= i ? ++_k : --_k) {1530 this.types[j] = override;1531 }1532 }1533 prev_strong = new_strong;1534 neutral_start = -1;1535 }1536 }1537 previous_level = level;1538 }1539 };1540 Bidi.prototype.reinsert_formatting_codes = function() {1541 var index, input, left_level, len, next_fmt, output, right_level, _i, _ref;1542 if ((this.formatter_indices != null) && this.formatter_indices.length > 0) {1543 input = this.length;1544 output = this.levels.length;1545 for (index = _i = _ref = this.formatter_indices.length - 1; _ref <= 0 ? _i <= 0 : _i >= 0; index = _ref <= 0 ? ++_i : --_i) {1546 next_fmt = this.formatter_indices[index];1547 len = output - next_fmt - 1;1548 output = next_fmt;1549 input -= len;1550 if (next_fmt + 1 < this.levels.length) {1551 TwitterCldr.Utilities.arraycopy(this.levels, input, this.levels, next_fmt + 1, len);1552 }1553 right_level = output === this.levels.length - 1 ? this.base_embedding : this.levels[output + 1] != null ? this.levels[output + 1] : 0;1554 left_level = input === 0 ? this.base_embedding : this.levels[input] != null ? this.levels[input] : 0;1555 this.levels[output] = TwitterCldr.Utilities.max([left_level, right_level]);1556 }1557 }1558 return this.length = this.levels.length;1559 };1560 Bidi.prototype.run_bidi = function() {1561 this.base_embedding = this.compute_paragraph_embedding_level();1562 this.compute_explicit_levels();1563 this.compute_runs();1564 this.resolve_weak_types();1565 this.resolve_neutral_types();1566 this.resolve_implicit_levels();1567 this.reinsert_formatting_codes();1568 this.compute_runs();1569 };1570 return Bidi;1571 })();1572 TwitterCldr.Calendar = (function() {1573 function Calendar() {}1574 Calendar.calendar = {"additional_formats":{"EHm":"E HH:mm","EHms":"E HH:mm:ss","Ed":"d E","Ehm":"E h:mm a","Ehms":"E h:mm:ss a","Gy":"y G","H":"HH","Hm":"HH:mm","Hms":"HH:mm:ss","M":"L","MEd":"E, M/d","MMM":"LLL","MMMEd":"E, MMM d","MMMd":"MMM d","Md":"M/d","d":"d","h":"h a","hm":"h:mm a","hms":"h:mm:ss a","ms":"mm:ss","y":"y","yM":"M/y","yMEd":"E, M/d/y","yMMM":"MMM y","yMMMEd":"E, MMM d, y","yMMMd":"MMM d, y","yMd":"M/d/y","yQQQ":"QQQ y","yQQQQ":"QQQQ y"},"days":{"format":{"abbreviated":{"fri":"Fri","mon":"Mon","sat":"Sat","sun":"Sun","thu":"Thu","tue":"Tue","wed":"Wed"},"narrow":{"fri":"F","mon":"M","sat":"S","sun":"S","thu":"T","tue":"T","wed":"W"},"short":{"fri":"Fr","mon":"Mo","sat":"Sa","sun":"Su","thu":"Th","tue":"Tu","wed":"We"},"wide":{"fri":"Friday","mon":"Monday","sat":"Saturday","sun":"Sunday","thu":"Thursday","tue":"Tuesday","wed":"Wednesday"}},"stand-alone":{"abbreviated":{"fri":"Fri","mon":"Mon","sat":"Sat","sun":"Sun","thu":"Thu","tue":"Tue","wed":"Wed"},"narrow":{"fri":"F","mon":"M","sat":"S","sun":"S","thu":"T","tue":"T","wed":"W"},"short":{"fri":"Fr","mon":"Mo","sat":"Sa","sun":"Su","thu":"Th","tue":"Tu","wed":"We"},"wide":{"fri":"Friday","mon":"Monday","sat":"Saturday","sun":"Sunday","thu":"Thursday","tue":"Tuesday","wed":"Wednesday"}}},"eras":{"abbr":{"0":"BC","1":"AD"},"name":{"0":"Before Christ","1":"Anno Domini"},"narrow":{"0":"B","1":"A"}},"fields":{"day":"Day","dayperiod":"AM/PM","era":"Era","hour":"Hour","minute":"Minute","month":"Month","second":"Second","week":"Week","weekday":"Day of the Week","year":"Year","zone":"Time Zone"},"formats":{"date":{"default":{"pattern":"MMM d, y"},"full":{"pattern":"EEEE, MMMM d, y"},"long":{"pattern":"MMMM d, y"},"medium":{"pattern":"MMM d, y"},"short":{"pattern":"M/d/yy"}},"datetime":{"default":{"pattern":"{{date}}, {{time}}"},"full":{"pattern":"{{date}} 'at' {{time}}"},"long":{"pattern":"{{date}} 'at' {{time}}"},"medium":{"pattern":"{{date}}, {{time}}"},"short":{"pattern":"{{date}}, {{time}}"}},"time":{"default":{"pattern":"h:mm:ss a"},"full":{"pattern":"h:mm:ss a zzzz"},"long":{"pattern":"h:mm:ss a z"},"medium":{"pattern":"h:mm:ss a"},"short":{"pattern":"h:mm a"}}},"months":{"format":{"abbreviated":{"1":"Jan","10":"Oct","11":"Nov","12":"Dec","2":"Feb","3":"Mar","4":"Apr","5":"May","6":"Jun","7":"Jul","8":"Aug","9":"Sep"},"narrow":{"1":"J","10":"O","11":"N","12":"D","2":"F","3":"M","4":"A","5":"M","6":"J","7":"J","8":"A","9":"S"},"wide":{"1":"January","10":"October","11":"November","12":"December","2":"February","3":"March","4":"April","5":"May","6":"June","7":"July","8":"August","9":"September"}},"stand-alone":{"abbreviated":{"1":"Jan","10":"Oct","11":"Nov","12":"Dec","2":"Feb","3":"Mar","4":"Apr","5":"May","6":"Jun","7":"Jul","8":"Aug","9":"Sep"},"narrow":{"1":"J","10":"O","11":"N","12":"D","2":"F","3":"M","4":"A","5":"M","6":"J","7":"J","8":"A","9":"S"},"wide":{"1":"January","10":"October","11":"November","12":"December","2":"February","3":"March","4":"April","5":"May","6":"June","7":"July","8":"August","9":"September"}}},"periods":{"format":{"abbreviated":null,"narrow":{"am":"a","noon":"n","pm":"p"},"wide":{"am":"a.m.","noon":"noon","pm":"p.m."}},"stand-alone":{}},"quarters":{"format":{"abbreviated":{"1":"Q1","2":"Q2","3":"Q3","4":"Q4"},"narrow":{"1":1,"2":2,"3":3,"4":4},"wide":{"1":"1st quarter","2":"2nd quarter","3":"3rd quarter","4":"4th quarter"}},"stand-alone":{"abbreviated":{"1":"Q1","2":"Q2","3":"Q3","4":"Q4"},"narrow":{"1":1,"2":2,"3":3,"4":4},"wide":{"1":"1st quarter","2":"2nd quarter","3":"3rd quarter","4":"4th quarter"}}}};1575 Calendar.months = function(options) {1576 var key, result, root, val;1577 if (options == null) {1578 options = {};1579 }1580 root = this.get_root("months", options);1581 result = [];1582 for (key in root) {1583 val = root[key];1584 result[parseInt(key) - 1] = val;1585 }1586 return result;1587 };1588 Calendar.weekdays = function(options) {1589 if (options == null) {1590 options = {};1591 }1592 return this.get_root("days", options);1593 };1594 Calendar.get_root = function(key, options) {1595 var format, names_form, root, _ref;1596 if (options == null) {1597 options = {};1598 }1599 root = this.calendar[key];1600 names_form = options["names_form"] || "wide";1601 format = options.format || ((root != null ? (_ref = root["stand-alone"]) != null ? _ref[names_form] : void 0 : void 0) != null ? "stand-alone" : "format");1602 return root[format][names_form];1603 };1604 return Calendar;1605 })();1606 root = typeof exports !== "undefined" && exports !== null ? exports : (this.TwitterCldr = {}, this.TwitterCldr);1607 for (key in TwitterCldr) {1608 obj = TwitterCldr[key];1609 root[key] = obj;1610 }...

Full Screen

Full Screen

Using AI Code Generation

copy

Full Screen

1import { code_points } from './wptextpattern.js';2import { code_point } from './wptextpattern.js';3import { code_point } from './wptextpattern.js';4import { code_point } from './wptextpattern.js';5import { code_point } from './wptextpattern.js';6import { code_point } from './wptextpattern.js';7import { code_point } from './wptextpattern.js';8import { code_point } from './wptextpattern.js';9import { code_point } from './wptextpattern.js';10import { code_point } from './wptextpattern.js';11import { code_point } from './wptextpattern.js';12import { code_point } from './wptextpattern.js';

Full Screen

Using AI Code Generation

copy

Full Screen

1var wptextpattern = require('wptextpattern');2var text = "This is a test of the code points method.";3var pattern = "test";4var result = wptextpattern.code_points(text, pattern);5console.log(result);6var wptextpattern = require('wptextpattern');7var text = "This is a test of the difference method.";8var pattern = "difference";9var result = wptextpattern.difference(text, pattern);10console.log(result);11var wptextpattern = require('wptextpattern');12var text = "This is a test of the find method.";13var pattern = "find";14var result = wptextpattern.find(text, pattern);15console.log(result);16var wptextpattern = require('wptextpattern');17var text = "This is a test of the find_all method.";18var pattern = "find_all";19var result = wptextpattern.find_all(text, pattern);20console.log(result);21var wptextpattern = require('wptextpattern');22var text = "This is a test of the find_all_index method.";23var pattern = "find_all_index";24var result = wptextpattern.find_all_index(text, pattern);25console.log(result);

Full Screen

Using AI Code Generation

copy

Full Screen

1var wptools = require('wptools');2var fs = require('fs');3var code_points = require('code-points');4var unicode = 'A';5var code = code_points(unicode);6var codeString = code.toString();7var wiki = wptools.page('U+'+codeString);8wiki.get(function(err, resp) {9 if (err) {10 console.log(err);11 return;12 }13 console.log(resp);14 var data = resp;15 var json = JSON.stringify(data);16 fs.writeFile('test.json', json, 'utf8');17});

Full Screen

Automation Testing Tutorials

Learn to execute automation testing from scratch with LambdaTest Learning Hub. Right from setting up the prerequisites to run your first automation test, to following best practices and diving deeper into advanced test scenarios. LambdaTest Learning Hubs compile a list of step-by-step guides to help you be proficient with different test automation frameworks i.e. Selenium, Cypress, TestNG etc.

LambdaTest Learning Hubs:

YouTube

You could also refer to video tutorials over LambdaTest YouTube channel to get step by step demonstration from industry experts.

Run wpt automation tests on LambdaTest cloud grid

Perform automation testing on 3000+ real desktop and mobile devices online.

Try LambdaTest Now !!

Get 100 minutes of automation test minutes FREE!!

Next-Gen App & Browser Testing Cloud

Was this article helpful?

Helpful

NotHelpful