New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

intl-pluralrules

Package Overview
Dependencies
Maintainers
1
Versions
19
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

intl-pluralrules - npm Package Compare versions

Comparing version

to
2.0.0

4

factory.d.ts
export type Category = 'zero' | 'one' | 'two' | 'few' | 'many' | 'other'
export type Selector = (n: number | string, ord?: boolean) => Category
export type RangeSelector = (start: Category, end: Category) => Category

@@ -7,3 +8,4 @@ export default function getPluralRules(

getSelector: (lc: string) => Selector | undefined,
getCategories: (lc: string, ord?: boolean) => Category[] | undefined
getCategories: (lc: string, ord?: boolean) => Category[] | undefined,
getRangeSelector: (lc: string) => RangeSelector
): Intl.PluralRules
'use strict';
function _typeof(obj) {
"@babel/helpers - typeof";
return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
return typeof obj;
} : function (obj) {
return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
}, _typeof(obj);
}
function _classCallCheck(instance, Constructor) {
if (!(instance instanceof Constructor)) {
throw new TypeError("Cannot call a class as a function");
}
}
function _defineProperties(target, props) {
for (var i = 0; i < props.length; i++) {
var descriptor = props[i];
descriptor.enumerable = descriptor.enumerable || false;
descriptor.configurable = true;
if ("value" in descriptor) descriptor.writable = true;
Object.defineProperty(target, descriptor.key, descriptor);
}
}
function _createClass(Constructor, protoProps, staticProps) {
if (protoProps) _defineProperties(Constructor.prototype, protoProps);
if (staticProps) _defineProperties(Constructor, staticProps);
Object.defineProperty(Constructor, "prototype", {
writable: false
});
return Constructor;
}
function _classPrivateFieldGet(receiver, privateMap) {
var descriptor = _classExtractFieldDescriptor(receiver, privateMap, "get");
return _classApplyDescriptorGet(receiver, descriptor);
}
function _classPrivateFieldSet(receiver, privateMap, value) {
var descriptor = _classExtractFieldDescriptor(receiver, privateMap, "set");
_classApplyDescriptorSet(receiver, descriptor, value);
return value;
}
function _classExtractFieldDescriptor(receiver, privateMap, action) {

@@ -56,6 +16,4 @@ if (!privateMap.has(receiver)) {

}
return privateMap.get(receiver);
}
function _classApplyDescriptorGet(receiver, descriptor) {

@@ -65,6 +23,4 @@ if (descriptor.get) {

}
return descriptor.value;
}
function _classApplyDescriptorSet(receiver, descriptor, value) {

@@ -77,7 +33,5 @@ if (descriptor.set) {

}
descriptor.value = value;
}
}
function _checkPrivateRedeclaration(obj, privateCollection) {

@@ -88,20 +42,15 @@ if (privateCollection.has(obj)) {

}
function _classPrivateFieldInitSpec(obj, privateMap, value) {
_checkPrivateRedeclaration(obj, privateMap);
privateMap.set(obj, value);
}
var canonicalizeLocaleList = function canonicalizeLocaleList(locales) {
const canonicalizeLocaleList = locales => {
if (!locales) return [];
if (!Array.isArray(locales)) locales = [locales];
var res = {};
for (var i = 0; i < locales.length; ++i) {
const res = {};
for (let i = 0; i < locales.length; ++i) {
var _in$iw$ji$lc;
var tag = locales[i];
if (tag && _typeof(tag) === 'object') tag = String(tag);
let tag = locales[i];
if (tag && typeof tag === 'object') tag = String(tag);
if (typeof tag !== 'string') {

@@ -111,21 +60,17 @@ // Requiring tag to be a String or Object means that the Number value

// for Min Nan Chinese.
var msg = "Locales should be strings, ".concat(JSON.stringify(tag), " isn't.");
const msg = "Locales should be strings, ".concat(JSON.stringify(tag), " isn't.");
throw new TypeError(msg);
}
const parts = tag.split('-');
var parts = tag.split('-'); // does not check for duplicate subtags
// does not check for duplicate subtags
if (!parts.every(subtag => /[a-z0-9]+/i.test(subtag))) {
const strTag = JSON.stringify(tag);
const msg = "The locale ".concat(strTag, " is not a structurally valid BCP 47 language tag.");
throw new RangeError(msg);
}
if (!parts.every(function (subtag) {
return /[a-z0-9]+/i.test(subtag);
})) {
var strTag = JSON.stringify(tag);
var _msg = "The locale ".concat(strTag, " is not a structurally valid BCP 47 language tag.");
throw new RangeError(_msg);
} // always use lower case for primary language subtag
var lc = parts[0].toLowerCase(); // replace deprecated codes for Indonesian, Hebrew & Yiddish
// always use lower case for primary language subtag
let lc = parts[0].toLowerCase();
// replace deprecated codes for Indonesian, Hebrew & Yiddish
parts[0] = (_in$iw$ji$lc = {

@@ -138,8 +83,6 @@ in: 'id',

}
return Object.keys(res);
};
function getType(opt) {
var type = Object.prototype.hasOwnProperty.call(opt, 'type') && opt.type;
const type = Object.prototype.hasOwnProperty.call(opt, 'type') && opt.type;
if (!type) return 'cardinal';

@@ -149,11 +92,8 @@ if (type === 'cardinal' || type === 'ordinal') return type;

}
function toNumber(value) {
switch (_typeof(value)) {
switch (typeof value) {
case 'number':
return value;
case 'bigint':
throw new TypeError('Cannot convert a BigInt value to a number');
default:

@@ -163,5 +103,4 @@ return Number(value);

}
function getPluralRules(NumberFormat, getSelector, getCategories, getRangeSelector) {
var findLocale = function findLocale(locale) {
const findLocale = locale => {
do {

@@ -171,36 +110,25 @@ if (getSelector(locale)) return locale;

} while (locale);
return null;
};
var resolveLocale = function resolveLocale(locales) {
var canonicalLocales = canonicalizeLocaleList(locales);
for (var i = 0; i < canonicalLocales.length; ++i) {
var _lc = findLocale(canonicalLocales[i]);
if (_lc) return _lc;
const resolveLocale = locales => {
const canonicalLocales = canonicalizeLocaleList(locales);
for (let i = 0; i < canonicalLocales.length; ++i) {
const lc = findLocale(canonicalLocales[i]);
if (lc) return lc;
}
var lc = new NumberFormat().resolvedOptions().locale;
const lc = new NumberFormat().resolvedOptions().locale;
return findLocale(lc);
};
var _locale = /*#__PURE__*/new WeakMap();
var _range = /*#__PURE__*/new WeakMap();
var _select = /*#__PURE__*/new WeakMap();
var _type = /*#__PURE__*/new WeakMap();
var _nf = /*#__PURE__*/new WeakMap();
var PluralRules = /*#__PURE__*/function () {
function PluralRules() {
var locales = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
var opt = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
_classCallCheck(this, PluralRules);
class PluralRules {
static supportedLocalesOf(locales) {
return canonicalizeLocaleList(locales).filter(findLocale);
}
constructor() {
let locales = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
let opt = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
_classPrivateFieldInitSpec(this, _locale, {

@@ -210,3 +138,2 @@ writable: true,

});
_classPrivateFieldInitSpec(this, _range, {

@@ -216,3 +143,2 @@ writable: true,

});
_classPrivateFieldInitSpec(this, _select, {

@@ -222,3 +148,2 @@ writable: true,

});
_classPrivateFieldInitSpec(this, _type, {

@@ -228,3 +153,2 @@ writable: true,

});
_classPrivateFieldInitSpec(this, _nf, {

@@ -234,76 +158,51 @@ writable: true,

});
_classPrivateFieldSet(this, _locale, resolveLocale(locales));
_classPrivateFieldSet(this, _select, getSelector(_classPrivateFieldGet(this, _locale)));
_classPrivateFieldSet(this, _range, getRangeSelector(_classPrivateFieldGet(this, _locale)));
_classPrivateFieldSet(this, _type, getType(opt));
_classPrivateFieldSet(this, _nf, new NumberFormat('en', opt)); // make-plural expects latin digits with . decimal separator
}
_createClass(PluralRules, [{
key: "resolvedOptions",
value: function resolvedOptions() {
var _classPrivateFieldGet2 = _classPrivateFieldGet(this, _nf).resolvedOptions(),
minimumIntegerDigits = _classPrivateFieldGet2.minimumIntegerDigits,
minimumFractionDigits = _classPrivateFieldGet2.minimumFractionDigits,
maximumFractionDigits = _classPrivateFieldGet2.maximumFractionDigits,
minimumSignificantDigits = _classPrivateFieldGet2.minimumSignificantDigits,
maximumSignificantDigits = _classPrivateFieldGet2.maximumSignificantDigits,
roundingPriority = _classPrivateFieldGet2.roundingPriority;
var opt = {
locale: _classPrivateFieldGet(this, _locale),
type: _classPrivateFieldGet(this, _type),
minimumIntegerDigits: minimumIntegerDigits,
minimumFractionDigits: minimumFractionDigits,
maximumFractionDigits: maximumFractionDigits
};
if (typeof minimumSignificantDigits === 'number') {
opt.minimumSignificantDigits = minimumSignificantDigits;
opt.maximumSignificantDigits = maximumSignificantDigits;
}
opt.pluralCategories = getCategories(_classPrivateFieldGet(this, _locale), _classPrivateFieldGet(this, _type) === 'ordinal').slice(0);
opt.roundingPriority = roundingPriority || 'auto';
return opt;
resolvedOptions() {
const {
minimumIntegerDigits,
minimumFractionDigits,
maximumFractionDigits,
minimumSignificantDigits,
maximumSignificantDigits,
roundingPriority
} = _classPrivateFieldGet(this, _nf).resolvedOptions();
const opt = {
locale: _classPrivateFieldGet(this, _locale),
type: _classPrivateFieldGet(this, _type),
minimumIntegerDigits,
minimumFractionDigits,
maximumFractionDigits
};
if (typeof minimumSignificantDigits === 'number') {
opt.minimumSignificantDigits = minimumSignificantDigits;
opt.maximumSignificantDigits = maximumSignificantDigits;
}
}, {
key: "select",
value: function select(number) {
if (!(this instanceof PluralRules)) throw new TypeError("select() called on incompatible ".concat(this));
if (typeof number !== 'number') number = Number(number);
if (!isFinite(number)) return 'other';
var fmt = _classPrivateFieldGet(this, _nf).format(Math.abs(number));
return _classPrivateFieldGet(this, _select).call(this, fmt, _classPrivateFieldGet(this, _type) === 'ordinal');
}
}, {
key: "selectRange",
value: function selectRange(start, end) {
if (!(this instanceof PluralRules)) throw new TypeError("selectRange() called on incompatible ".concat(this));
if (start === undefined) throw new TypeError('start is undefined');
if (end === undefined) throw new TypeError('end is undefined');
var start_ = toNumber(start);
var end_ = toNumber(end);
if (!isFinite(start_)) throw new RangeError('start must be finite');
if (!isFinite(end_)) throw new RangeError('end must be finite');
return _classPrivateFieldGet(this, _range).call(this, this.select(start_), this.select(end_));
}
}], [{
key: "supportedLocalesOf",
value: function supportedLocalesOf(locales) {
return canonicalizeLocaleList(locales).filter(findLocale);
}
}]);
return PluralRules;
}();
opt.pluralCategories = getCategories(_classPrivateFieldGet(this, _locale), _classPrivateFieldGet(this, _type) === 'ordinal').slice(0);
opt.roundingPriority = roundingPriority || 'auto';
return opt;
}
select(number) {
if (!(this instanceof PluralRules)) throw new TypeError("select() called on incompatible ".concat(this));
if (typeof number !== 'number') number = Number(number);
if (!isFinite(number)) return 'other';
const fmt = _classPrivateFieldGet(this, _nf).format(Math.abs(number));
return _classPrivateFieldGet(this, _select).call(this, fmt, _classPrivateFieldGet(this, _type) === 'ordinal');
}
selectRange(start, end) {
if (!(this instanceof PluralRules)) throw new TypeError("selectRange() called on incompatible ".concat(this));
if (start === undefined) throw new TypeError('start is undefined');
if (end === undefined) throw new TypeError('end is undefined');
const start_ = toNumber(start);
const end_ = toNumber(end);
if (!isFinite(start_)) throw new RangeError('start must be finite');
if (!isFinite(end_)) throw new RangeError('end must be finite');
return _classPrivateFieldGet(this, _range).call(this, this.select(start_), this.select(end_));
}
}
if (typeof Symbol !== 'undefined' && Symbol.toStringTag) {

@@ -316,3 +215,2 @@ Object.defineProperty(PluralRules.prototype, Symbol.toStringTag, {

}
Object.defineProperty(PluralRules, 'prototype', {

@@ -319,0 +217,0 @@ writable: false

{
"name": "intl-pluralrules",
"version": "2.0.0-1",
"version": "2.0.0",
"description": "Intl.PluralRules polyfill",

@@ -61,3 +61,3 @@ "keywords": [

"mocha": "^10.0.0",
"mocha-selenium-bridge": "^0.2.3",
"mocha-selenium-bridge": "^0.3.0",
"rollup": "^2.26.5",

@@ -74,5 +74,8 @@ "rollup-plugin-terser": "^7.0.0",

"test262": "test262-harness --error-for-failures --features-exclude cross-realm --prelude test/dist/test262-prelude.js 'test262/test/intl402/PluralRules/**/*.js'",
"pretest:ie11": "npx rollup -c test/rollup.browser.js",
"test:ie11": "mocha-selenium-bridge --driver ./test/browserstack-driver.js http://localhost:8000/test/browser-test.html"
"pretest:browsers": "npx rollup -c test/rollup.browser.js",
"test:browsers": "npm run test:edge && npm run test:firefox && npm run test:safari",
"test:edge": "BROWSER=Edge:110 mocha-selenium-bridge --driver ./test/browserstack-driver.js http://localhost:8000/test/browser-test.html",
"test:firefox": "BROWSER=Firefox:110 mocha-selenium-bridge --driver ./test/browserstack-driver.js http://localhost:8000/test/browser-test.html",
"test:safari": "OS='OS X:Big Sur' BROWSER=Safari:14.1 mocha-selenium-bridge --driver ./test/browserstack-driver.js http://localhost:8000/test/browser-test.html"
}
}

@@ -33,33 +33,25 @@ 'use strict';

(function (module, exports) {
var a = function a(n, ord) {
const a = (n, ord) => {
if (ord) return 'other';
return n == 1 ? 'one' : 'other';
};
var b = function b(n, ord) {
const b = (n, ord) => {
if (ord) return 'other';
return n == 0 || n == 1 ? 'one' : 'other';
};
var c = function c(n, ord) {
const c = (n, ord) => {
if (ord) return 'other';
return n >= 0 && n <= 1 ? 'one' : 'other';
};
var d = function d(n, ord) {
var s = String(n).split('.'),
v0 = !s[1];
const d = (n, ord) => {
const s = String(n).split('.'),
v0 = !s[1];
if (ord) return 'other';
return n == 1 && v0 ? 'one' : 'other';
};
var e = function e(n, ord) {
return 'other';
};
var f = function f(n, ord) {
const e = (n, ord) => 'other';
const f = (n, ord) => {
if (ord) return 'other';
return n == 1 ? 'one' : n == 2 ? 'two' : 'other';
};
(function (root, plurals) {

@@ -75,17 +67,17 @@ Object.defineProperty(plurals, '__esModule', {

an: a,
ar: function ar(n, ord) {
var s = String(n).split('.'),
t0 = Number(s[0]) == n,
n100 = t0 && s[0].slice(-2);
ar: (n, ord) => {
const s = String(n).split('.'),
t0 = Number(s[0]) == n,
n100 = t0 && s[0].slice(-2);
if (ord) return 'other';
return n == 0 ? 'zero' : n == 1 ? 'one' : n == 2 ? 'two' : n100 >= 3 && n100 <= 10 ? 'few' : n100 >= 11 && n100 <= 99 ? 'many' : 'other';
},
ars: function ars(n, ord) {
var s = String(n).split('.'),
t0 = Number(s[0]) == n,
n100 = t0 && s[0].slice(-2);
ars: (n, ord) => {
const s = String(n).split('.'),
t0 = Number(s[0]) == n,
n100 = t0 && s[0].slice(-2);
if (ord) return 'other';
return n == 0 ? 'zero' : n == 1 ? 'one' : n == 2 ? 'two' : n100 >= 3 && n100 <= 10 ? 'few' : n100 >= 11 && n100 <= 99 ? 'many' : 'other';
},
as: function as(n, ord) {
as: (n, ord) => {
if (ord) return n == 1 || n == 5 || n == 7 || n == 8 || n == 9 || n == 10 ? 'one' : n == 2 || n == 3 ? 'two' : n == 4 ? 'few' : n == 6 ? 'many' : 'other';

@@ -96,19 +88,17 @@ return n >= 0 && n <= 1 ? 'one' : 'other';

ast: d,
az: function az(n, ord) {
var s = String(n).split('.'),
i = s[0],
i10 = i.slice(-1),
i100 = i.slice(-2),
i1000 = i.slice(-3);
az: (n, ord) => {
const s = String(n).split('.'),
i = s[0],
i10 = i.slice(-1),
i100 = i.slice(-2),
i1000 = i.slice(-3);
if (ord) return i10 == 1 || i10 == 2 || i10 == 5 || i10 == 7 || i10 == 8 || i100 == 20 || i100 == 50 || i100 == 70 || i100 == 80 ? 'one' : i10 == 3 || i10 == 4 || i1000 == 100 || i1000 == 200 || i1000 == 300 || i1000 == 400 || i1000 == 500 || i1000 == 600 || i1000 == 700 || i1000 == 800 || i1000 == 900 ? 'few' : i == 0 || i10 == 6 || i100 == 40 || i100 == 60 || i100 == 90 ? 'many' : 'other';
return n == 1 ? 'one' : 'other';
},
bal: function bal(n, ord) {
return n == 1 ? 'one' : 'other';
},
be: function be(n, ord) {
var s = String(n).split('.'),
t0 = Number(s[0]) == n,
n10 = t0 && s[0].slice(-1),
n100 = t0 && s[0].slice(-2);
bal: (n, ord) => n == 1 ? 'one' : 'other',
be: (n, ord) => {
const s = String(n).split('.'),
t0 = Number(s[0]) == n,
n10 = t0 && s[0].slice(-1),
n100 = t0 && s[0].slice(-2);
if (ord) return (n10 == 2 || n10 == 3) && n100 != 12 && n100 != 13 ? 'few' : 'other';

@@ -122,3 +112,3 @@ return n10 == 1 && n100 != 11 ? 'one' : n10 >= 2 && n10 <= 4 && (n100 < 12 || n100 > 14) ? 'few' : t0 && n10 == 0 || n10 >= 5 && n10 <= 9 || n100 >= 11 && n100 <= 14 ? 'many' : 'other';

bm: e,
bn: function bn(n, ord) {
bn: (n, ord) => {
if (ord) return n == 1 || n == 5 || n == 7 || n == 8 || n == 9 || n == 10 ? 'one' : n == 2 || n == 3 ? 'two' : n == 4 ? 'few' : n == 6 ? 'many' : 'other';

@@ -128,8 +118,8 @@ return n >= 0 && n <= 1 ? 'one' : 'other';

bo: e,
br: function br(n, ord) {
var s = String(n).split('.'),
t0 = Number(s[0]) == n,
n10 = t0 && s[0].slice(-1),
n100 = t0 && s[0].slice(-2),
n1000000 = t0 && s[0].slice(-6);
br: (n, ord) => {
const s = String(n).split('.'),
t0 = Number(s[0]) == n,
n10 = t0 && s[0].slice(-1),
n100 = t0 && s[0].slice(-2),
n1000000 = t0 && s[0].slice(-6);
if (ord) return 'other';

@@ -139,28 +129,30 @@ return n10 == 1 && n100 != 11 && n100 != 71 && n100 != 91 ? 'one' : n10 == 2 && n100 != 12 && n100 != 72 && n100 != 92 ? 'two' : (n10 == 3 || n10 == 4 || n10 == 9) && (n100 < 10 || n100 > 19) && (n100 < 70 || n100 > 79) && (n100 < 90 || n100 > 99) ? 'few' : n != 0 && t0 && n1000000 == 0 ? 'many' : 'other';

brx: a,
bs: function bs(n, ord) {
var s = String(n).split('.'),
i = s[0],
f = s[1] || '',
v0 = !s[1],
i10 = i.slice(-1),
i100 = i.slice(-2),
f10 = f.slice(-1),
f100 = f.slice(-2);
bs: (n, ord) => {
const s = String(n).split('.'),
i = s[0],
f = s[1] || '',
v0 = !s[1],
i10 = i.slice(-1),
i100 = i.slice(-2),
f10 = f.slice(-1),
f100 = f.slice(-2);
if (ord) return 'other';
return v0 && i10 == 1 && i100 != 11 || f10 == 1 && f100 != 11 ? 'one' : v0 && i10 >= 2 && i10 <= 4 && (i100 < 12 || i100 > 14) || f10 >= 2 && f10 <= 4 && (f100 < 12 || f100 > 14) ? 'few' : 'other';
},
ca: function ca(n, ord) {
var s = String(n).split('.'),
v0 = !s[1];
ca: (n, ord) => {
const s = String(n).split('.'),
i = s[0],
v0 = !s[1],
i1000000 = i.slice(-6);
if (ord) return n == 1 || n == 3 ? 'one' : n == 2 ? 'two' : n == 4 ? 'few' : 'other';
return n == 1 && v0 ? 'one' : 'other';
return n == 1 && v0 ? 'one' : i != 0 && i1000000 == 0 && v0 ? 'many' : 'other';
},
ce: a,
ceb: function ceb(n, ord) {
var s = String(n).split('.'),
i = s[0],
f = s[1] || '',
v0 = !s[1],
i10 = i.slice(-1),
f10 = f.slice(-1);
ceb: (n, ord) => {
const s = String(n).split('.'),
i = s[0],
f = s[1] || '',
v0 = !s[1],
i10 = i.slice(-1),
f10 = f.slice(-1);
if (ord) return 'other';

@@ -172,17 +164,17 @@ return v0 && (i == 1 || i == 2 || i == 3) || v0 && i10 != 4 && i10 != 6 && i10 != 9 || !v0 && f10 != 4 && f10 != 6 && f10 != 9 ? 'one' : 'other';

ckb: a,
cs: function cs(n, ord) {
var s = String(n).split('.'),
i = s[0],
v0 = !s[1];
cs: (n, ord) => {
const s = String(n).split('.'),
i = s[0],
v0 = !s[1];
if (ord) return 'other';
return n == 1 && v0 ? 'one' : i >= 2 && i <= 4 && v0 ? 'few' : !v0 ? 'many' : 'other';
},
cy: function cy(n, ord) {
cy: (n, ord) => {
if (ord) return n == 0 || n == 7 || n == 8 || n == 9 ? 'zero' : n == 1 ? 'one' : n == 2 ? 'two' : n == 3 || n == 4 ? 'few' : n == 5 || n == 6 ? 'many' : 'other';
return n == 0 ? 'zero' : n == 1 ? 'one' : n == 2 ? 'two' : n == 3 ? 'few' : n == 6 ? 'many' : 'other';
},
da: function da(n, ord) {
var s = String(n).split('.'),
i = s[0],
t0 = Number(s[0]) == n;
da: (n, ord) => {
const s = String(n).split('.'),
i = s[0],
t0 = Number(s[0]) == n;
if (ord) return 'other';

@@ -193,9 +185,9 @@ return n == 1 || !t0 && (i == 0 || i == 1) ? 'one' : 'other';

doi: c,
dsb: function dsb(n, ord) {
var s = String(n).split('.'),
i = s[0],
f = s[1] || '',
v0 = !s[1],
i100 = i.slice(-2),
f100 = f.slice(-2);
dsb: (n, ord) => {
const s = String(n).split('.'),
i = s[0],
f = s[1] || '',
v0 = !s[1],
i100 = i.slice(-2),
f100 = f.slice(-2);
if (ord) return 'other';

@@ -208,8 +200,8 @@ return v0 && i100 == 1 || f100 == 1 ? 'one' : v0 && i100 == 2 || f100 == 2 ? 'two' : v0 && (i100 == 3 || i100 == 4) || f100 == 3 || f100 == 4 ? 'few' : 'other';

el: a,
en: function en(n, ord) {
var s = String(n).split('.'),
v0 = !s[1],
t0 = Number(s[0]) == n,
n10 = t0 && s[0].slice(-1),
n100 = t0 && s[0].slice(-2);
en: (n, ord) => {
const s = String(n).split('.'),
v0 = !s[1],
t0 = Number(s[0]) == n,
n10 = t0 && s[0].slice(-1),
n100 = t0 && s[0].slice(-2);
if (ord) return n10 == 1 && n100 != 11 ? 'one' : n10 == 2 && n100 != 12 ? 'two' : n10 == 3 && n100 != 13 ? 'few' : 'other';

@@ -219,7 +211,7 @@ return n == 1 && v0 ? 'one' : 'other';

eo: a,
es: function es(n, ord) {
var s = String(n).split('.'),
i = s[0],
v0 = !s[1],
i1000000 = i.slice(-6);
es: (n, ord) => {
const s = String(n).split('.'),
i = s[0],
v0 = !s[1],
i1000000 = i.slice(-6);
if (ord) return 'other';

@@ -231,3 +223,3 @@ return n == 1 ? 'one' : i != 0 && i1000000 == 0 && v0 ? 'many' : 'other';

fa: c,
ff: function ff(n, ord) {
ff: (n, ord) => {
if (ord) return 'other';

@@ -237,9 +229,9 @@ return n >= 0 && n < 2 ? 'one' : 'other';

fi: d,
fil: function fil(n, ord) {
var s = String(n).split('.'),
i = s[0],
f = s[1] || '',
v0 = !s[1],
i10 = i.slice(-1),
f10 = f.slice(-1);
fil: (n, ord) => {
const s = String(n).split('.'),
i = s[0],
f = s[1] || '',
v0 = !s[1],
i10 = i.slice(-1),
f10 = f.slice(-1);
if (ord) return n == 1 ? 'one' : 'other';

@@ -249,7 +241,7 @@ return v0 && (i == 1 || i == 2 || i == 3) || v0 && i10 != 4 && i10 != 6 && i10 != 9 || !v0 && f10 != 4 && f10 != 6 && f10 != 9 ? 'one' : 'other';

fo: a,
fr: function fr(n, ord) {
var s = String(n).split('.'),
i = s[0],
v0 = !s[1],
i1000000 = i.slice(-6);
fr: (n, ord) => {
const s = String(n).split('.'),
i = s[0],
v0 = !s[1],
i1000000 = i.slice(-6);
if (ord) return n == 1 ? 'one' : 'other';

@@ -260,11 +252,11 @@ return n >= 0 && n < 2 ? 'one' : i != 0 && i1000000 == 0 && v0 ? 'many' : 'other';

fy: d,
ga: function ga(n, ord) {
var s = String(n).split('.'),
t0 = Number(s[0]) == n;
ga: (n, ord) => {
const s = String(n).split('.'),
t0 = Number(s[0]) == n;
if (ord) return n == 1 ? 'one' : 'other';
return n == 1 ? 'one' : n == 2 ? 'two' : t0 && n >= 3 && n <= 6 ? 'few' : t0 && n >= 7 && n <= 10 ? 'many' : 'other';
},
gd: function gd(n, ord) {
var s = String(n).split('.'),
t0 = Number(s[0]) == n;
gd: (n, ord) => {
const s = String(n).split('.'),
t0 = Number(s[0]) == n;
if (ord) return n == 1 || n == 11 ? 'one' : n == 2 || n == 12 ? 'two' : n == 3 || n == 13 ? 'few' : 'other';

@@ -275,3 +267,3 @@ return n == 1 || n == 11 ? 'one' : n == 2 || n == 12 ? 'two' : t0 && n >= 3 && n <= 10 || t0 && n >= 13 && n <= 19 ? 'few' : 'other';

gsw: a,
gu: function gu(n, ord) {
gu: (n, ord) => {
if (ord) return n == 1 ? 'one' : n == 2 || n == 3 ? 'two' : n == 4 ? 'few' : n == 6 ? 'many' : 'other';

@@ -281,8 +273,8 @@ return n >= 0 && n <= 1 ? 'one' : 'other';

guw: b,
gv: function gv(n, ord) {
var s = String(n).split('.'),
i = s[0],
v0 = !s[1],
i10 = i.slice(-1),
i100 = i.slice(-2);
gv: (n, ord) => {
const s = String(n).split('.'),
i = s[0],
v0 = !s[1],
i10 = i.slice(-1),
i100 = i.slice(-2);
if (ord) return 'other';

@@ -293,12 +285,10 @@ return v0 && i10 == 1 ? 'one' : v0 && i10 == 2 ? 'two' : v0 && (i100 == 0 || i100 == 20 || i100 == 40 || i100 == 60 || i100 == 80) ? 'few' : !v0 ? 'many' : 'other';

haw: a,
he: function he(n, ord) {
var s = String(n).split('.'),
i = s[0],
v0 = !s[1],
t0 = Number(s[0]) == n,
n10 = t0 && s[0].slice(-1);
he: (n, ord) => {
const s = String(n).split('.'),
i = s[0],
v0 = !s[1];
if (ord) return 'other';
return n == 1 && v0 ? 'one' : i == 2 && v0 ? 'two' : v0 && (n < 0 || n > 10) && t0 && n10 == 0 ? 'many' : 'other';
return i == 1 && v0 || i == 0 && !v0 ? 'one' : i == 2 && v0 ? 'two' : 'other';
},
hi: function hi(n, ord) {
hi: (n, ord) => {
if (ord) return n == 1 ? 'one' : n == 2 || n == 3 ? 'two' : n == 4 ? 'few' : n == 6 ? 'many' : 'other';

@@ -308,29 +298,29 @@ return n >= 0 && n <= 1 ? 'one' : 'other';

hnj: e,
hr: function hr(n, ord) {
var s = String(n).split('.'),
i = s[0],
f = s[1] || '',
v0 = !s[1],
i10 = i.slice(-1),
i100 = i.slice(-2),
f10 = f.slice(-1),
f100 = f.slice(-2);
hr: (n, ord) => {
const s = String(n).split('.'),
i = s[0],
f = s[1] || '',
v0 = !s[1],
i10 = i.slice(-1),
i100 = i.slice(-2),
f10 = f.slice(-1),
f100 = f.slice(-2);
if (ord) return 'other';
return v0 && i10 == 1 && i100 != 11 || f10 == 1 && f100 != 11 ? 'one' : v0 && i10 >= 2 && i10 <= 4 && (i100 < 12 || i100 > 14) || f10 >= 2 && f10 <= 4 && (f100 < 12 || f100 > 14) ? 'few' : 'other';
},
hsb: function hsb(n, ord) {
var s = String(n).split('.'),
i = s[0],
f = s[1] || '',
v0 = !s[1],
i100 = i.slice(-2),
f100 = f.slice(-2);
hsb: (n, ord) => {
const s = String(n).split('.'),
i = s[0],
f = s[1] || '',
v0 = !s[1],
i100 = i.slice(-2),
f100 = f.slice(-2);
if (ord) return 'other';
return v0 && i100 == 1 || f100 == 1 ? 'one' : v0 && i100 == 2 || f100 == 2 ? 'two' : v0 && (i100 == 3 || i100 == 4) || f100 == 3 || f100 == 4 ? 'few' : 'other';
},
hu: function hu(n, ord) {
hu: (n, ord) => {
if (ord) return n == 1 || n == 5 ? 'one' : 'other';
return n == 1 ? 'one' : 'other';
},
hy: function hy(n, ord) {
hy: (n, ord) => {
if (ord) return n == 1 ? 'one' : 'other';

@@ -344,16 +334,17 @@ return n >= 0 && n < 2 ? 'one' : 'other';

io: d,
is: function is(n, ord) {
var s = String(n).split('.'),
i = s[0],
t0 = Number(s[0]) == n,
i10 = i.slice(-1),
i100 = i.slice(-2);
is: (n, ord) => {
const s = String(n).split('.'),
i = s[0],
t = (s[1] || '').replace(/0+$/, ''),
t0 = Number(s[0]) == n,
i10 = i.slice(-1),
i100 = i.slice(-2);
if (ord) return 'other';
return t0 && i10 == 1 && i100 != 11 || !t0 ? 'one' : 'other';
return t0 && i10 == 1 && i100 != 11 || t % 10 == 1 && t % 100 != 11 ? 'one' : 'other';
},
it: function it(n, ord) {
var s = String(n).split('.'),
i = s[0],
v0 = !s[1],
i1000000 = i.slice(-6);
it: (n, ord) => {
const s = String(n).split('.'),
i = s[0],
v0 = !s[1],
i1000000 = i.slice(-6);
if (ord) return n == 11 || n == 8 || n == 80 || n == 800 ? 'many' : 'other';

@@ -369,10 +360,10 @@ return n == 1 && v0 ? 'one' : i != 0 && i1000000 == 0 && v0 ? 'many' : 'other';

jw: e,
ka: function ka(n, ord) {
var s = String(n).split('.'),
i = s[0],
i100 = i.slice(-2);
ka: (n, ord) => {
const s = String(n).split('.'),
i = s[0],
i100 = i.slice(-2);
if (ord) return i == 1 ? 'one' : i == 0 || i100 >= 2 && i100 <= 20 || i100 == 40 || i100 == 60 || i100 == 80 ? 'many' : 'other';
return n == 1 ? 'one' : 'other';
},
kab: function kab(n, ord) {
kab: (n, ord) => {
if (ord) return 'other';

@@ -385,6 +376,6 @@ return n >= 0 && n < 2 ? 'one' : 'other';

kea: e,
kk: function kk(n, ord) {
var s = String(n).split('.'),
t0 = Number(s[0]) == n,
n10 = t0 && s[0].slice(-1);
kk: (n, ord) => {
const s = String(n).split('.'),
t0 = Number(s[0]) == n,
n10 = t0 && s[0].slice(-1);
if (ord) return n10 == 6 || n10 == 9 || t0 && n10 == 0 && n != 0 ? 'many' : 'other';

@@ -400,3 +391,3 @@ return n == 1 ? 'one' : 'other';

ksb: a,
ksh: function ksh(n, ord) {
ksh: (n, ord) => {
if (ord) return 'other';

@@ -406,9 +397,9 @@ return n == 0 ? 'zero' : n == 1 ? 'one' : 'other';

ku: a,
kw: function kw(n, ord) {
var s = String(n).split('.'),
t0 = Number(s[0]) == n,
n100 = t0 && s[0].slice(-2),
n1000 = t0 && s[0].slice(-3),
n100000 = t0 && s[0].slice(-5),
n1000000 = t0 && s[0].slice(-6);
kw: (n, ord) => {
const s = String(n).split('.'),
t0 = Number(s[0]) == n,
n100 = t0 && s[0].slice(-2),
n1000 = t0 && s[0].slice(-3),
n100000 = t0 && s[0].slice(-5),
n1000000 = t0 && s[0].slice(-6);
if (ord) return t0 && n >= 1 && n <= 4 || n100 >= 1 && n100 <= 4 || n100 >= 21 && n100 <= 24 || n100 >= 41 && n100 <= 44 || n100 >= 61 && n100 <= 64 || n100 >= 81 && n100 <= 84 ? 'one' : n == 5 || n100 == 5 ? 'many' : 'other';

@@ -418,5 +409,5 @@ return n == 0 ? 'zero' : n == 1 ? 'one' : n100 == 2 || n100 == 22 || n100 == 42 || n100 == 62 || n100 == 82 || t0 && n1000 == 0 && (n100000 >= 1000 && n100000 <= 20000 || n100000 == 40000 || n100000 == 60000 || n100000 == 80000) || n != 0 && n1000000 == 100000 ? 'two' : n100 == 3 || n100 == 23 || n100 == 43 || n100 == 63 || n100 == 83 ? 'few' : n != 1 && (n100 == 1 || n100 == 21 || n100 == 41 || n100 == 61 || n100 == 81) ? 'many' : 'other';

ky: a,
lag: function lag(n, ord) {
var s = String(n).split('.'),
i = s[0];
lag: (n, ord) => {
const s = String(n).split('.'),
i = s[0];
if (ord) return 'other';

@@ -427,6 +418,6 @@ return n == 0 ? 'zero' : (i == 0 || i == 1) && n != 0 ? 'one' : 'other';

lg: a,
lij: function lij(n, ord) {
var s = String(n).split('.'),
v0 = !s[1],
t0 = Number(s[0]) == n;
lij: (n, ord) => {
const s = String(n).split('.'),
v0 = !s[1],
t0 = Number(s[0]) == n;
if (ord) return n == 11 || n == 8 || t0 && n >= 80 && n <= 89 || t0 && n >= 800 && n <= 899 ? 'many' : 'other';

@@ -437,24 +428,24 @@ return n == 1 && v0 ? 'one' : 'other';

ln: b,
lo: function lo(n, ord) {
lo: (n, ord) => {
if (ord) return n == 1 ? 'one' : 'other';
return 'other';
},
lt: function lt(n, ord) {
var s = String(n).split('.'),
f = s[1] || '',
t0 = Number(s[0]) == n,
n10 = t0 && s[0].slice(-1),
n100 = t0 && s[0].slice(-2);
lt: (n, ord) => {
const s = String(n).split('.'),
f = s[1] || '',
t0 = Number(s[0]) == n,
n10 = t0 && s[0].slice(-1),
n100 = t0 && s[0].slice(-2);
if (ord) return 'other';
return n10 == 1 && (n100 < 11 || n100 > 19) ? 'one' : n10 >= 2 && n10 <= 9 && (n100 < 11 || n100 > 19) ? 'few' : f != 0 ? 'many' : 'other';
},
lv: function lv(n, ord) {
var s = String(n).split('.'),
f = s[1] || '',
v = f.length,
t0 = Number(s[0]) == n,
n10 = t0 && s[0].slice(-1),
n100 = t0 && s[0].slice(-2),
f100 = f.slice(-2),
f10 = f.slice(-1);
lv: (n, ord) => {
const s = String(n).split('.'),
f = s[1] || '',
v = f.length,
t0 = Number(s[0]) == n,
n10 = t0 && s[0].slice(-1),
n100 = t0 && s[0].slice(-2),
f100 = f.slice(-2),
f10 = f.slice(-1);
if (ord) return 'other';

@@ -466,11 +457,11 @@ return t0 && n10 == 0 || n100 >= 11 && n100 <= 19 || v == 2 && f100 >= 11 && f100 <= 19 ? 'zero' : n10 == 1 && n100 != 11 || v == 2 && f10 == 1 && f100 != 11 || v != 2 && f10 == 1 ? 'one' : 'other';

mgo: a,
mk: function mk(n, ord) {
var s = String(n).split('.'),
i = s[0],
f = s[1] || '',
v0 = !s[1],
i10 = i.slice(-1),
i100 = i.slice(-2),
f10 = f.slice(-1),
f100 = f.slice(-2);
mk: (n, ord) => {
const s = String(n).split('.'),
i = s[0],
f = s[1] || '',
v0 = !s[1],
i10 = i.slice(-1),
i100 = i.slice(-2),
f10 = f.slice(-1),
f100 = f.slice(-2);
if (ord) return i10 == 1 && i100 != 11 ? 'one' : i10 == 2 && i100 != 12 ? 'two' : (i10 == 7 || i10 == 8) && i100 != 17 && i100 != 18 ? 'many' : 'other';

@@ -481,24 +472,24 @@ return v0 && i10 == 1 && i100 != 11 || f10 == 1 && f100 != 11 ? 'one' : 'other';

mn: a,
mo: function mo(n, ord) {
var s = String(n).split('.'),
v0 = !s[1],
t0 = Number(s[0]) == n,
n100 = t0 && s[0].slice(-2);
mo: (n, ord) => {
const s = String(n).split('.'),
v0 = !s[1],
t0 = Number(s[0]) == n,
n100 = t0 && s[0].slice(-2);
if (ord) return n == 1 ? 'one' : 'other';
return n == 1 && v0 ? 'one' : !v0 || n == 0 || n100 >= 2 && n100 <= 19 ? 'few' : 'other';
return n == 1 && v0 ? 'one' : !v0 || n == 0 || n != 1 && n100 >= 1 && n100 <= 19 ? 'few' : 'other';
},
mr: function mr(n, ord) {
mr: (n, ord) => {
if (ord) return n == 1 ? 'one' : n == 2 || n == 3 ? 'two' : n == 4 ? 'few' : 'other';
return n == 1 ? 'one' : 'other';
},
ms: function ms(n, ord) {
ms: (n, ord) => {
if (ord) return n == 1 ? 'one' : 'other';
return 'other';
},
mt: function mt(n, ord) {
var s = String(n).split('.'),
t0 = Number(s[0]) == n,
n100 = t0 && s[0].slice(-2);
mt: (n, ord) => {
const s = String(n).split('.'),
t0 = Number(s[0]) == n,
n100 = t0 && s[0].slice(-2);
if (ord) return 'other';
return n == 1 ? 'one' : n == 0 || n100 >= 2 && n100 <= 10 ? 'few' : n100 >= 11 && n100 <= 19 ? 'many' : 'other';
return n == 1 ? 'one' : n == 2 ? 'two' : n == 0 || n100 >= 3 && n100 <= 10 ? 'few' : n100 >= 11 && n100 <= 19 ? 'many' : 'other';
},

@@ -510,5 +501,5 @@ my: e,

nd: a,
ne: function ne(n, ord) {
var s = String(n).split('.'),
t0 = Number(s[0]) == n;
ne: (n, ord) => {
const s = String(n).split('.'),
t0 = Number(s[0]) == n;
if (ord) return t0 && n >= 1 && n <= 4 ? 'one' : 'other';

@@ -527,5 +518,5 @@ return n == 1 ? 'one' : 'other';

om: a,
or: function or(n, ord) {
var s = String(n).split('.'),
t0 = Number(s[0]) == n;
or: (n, ord) => {
const s = String(n).split('.'),
t0 = Number(s[0]) == n;
if (ord) return n == 1 || n == 5 || t0 && n >= 7 && n <= 9 ? 'one' : n == 2 || n == 3 ? 'two' : n == 4 ? 'few' : n == 6 ? 'many' : 'other';

@@ -539,20 +530,20 @@ return n == 1 ? 'one' : 'other';

pcm: c,
pl: function pl(n, ord) {
var s = String(n).split('.'),
i = s[0],
v0 = !s[1],
i10 = i.slice(-1),
i100 = i.slice(-2);
pl: (n, ord) => {
const s = String(n).split('.'),
i = s[0],
v0 = !s[1],
i10 = i.slice(-1),
i100 = i.slice(-2);
if (ord) return 'other';
return n == 1 && v0 ? 'one' : v0 && i10 >= 2 && i10 <= 4 && (i100 < 12 || i100 > 14) ? 'few' : v0 && i != 1 && (i10 == 0 || i10 == 1) || v0 && i10 >= 5 && i10 <= 9 || v0 && i100 >= 12 && i100 <= 14 ? 'many' : 'other';
},
prg: function prg(n, ord) {
var s = String(n).split('.'),
f = s[1] || '',
v = f.length,
t0 = Number(s[0]) == n,
n10 = t0 && s[0].slice(-1),
n100 = t0 && s[0].slice(-2),
f100 = f.slice(-2),
f10 = f.slice(-1);
prg: (n, ord) => {
const s = String(n).split('.'),
f = s[1] || '',
v = f.length,
t0 = Number(s[0]) == n,
n10 = t0 && s[0].slice(-1),
n100 = t0 && s[0].slice(-2),
f100 = f.slice(-2),
f10 = f.slice(-1);
if (ord) return 'other';

@@ -562,15 +553,15 @@ return t0 && n10 == 0 || n100 >= 11 && n100 <= 19 || v == 2 && f100 >= 11 && f100 <= 19 ? 'zero' : n10 == 1 && n100 != 11 || v == 2 && f10 == 1 && f100 != 11 || v != 2 && f10 == 1 ? 'one' : 'other';

ps: a,
pt: function pt(n, ord) {
var s = String(n).split('.'),
i = s[0],
v0 = !s[1],
i1000000 = i.slice(-6);
pt: (n, ord) => {
const s = String(n).split('.'),
i = s[0],
v0 = !s[1],
i1000000 = i.slice(-6);
if (ord) return 'other';
return i == 0 || i == 1 ? 'one' : i != 0 && i1000000 == 0 && v0 ? 'many' : 'other';
},
pt_PT: function pt_PT(n, ord) {
var s = String(n).split('.'),
i = s[0],
v0 = !s[1],
i1000000 = i.slice(-6);
pt_PT: (n, ord) => {
const s = String(n).split('.'),
i = s[0],
v0 = !s[1],
i1000000 = i.slice(-6);
if (ord) return 'other';

@@ -580,17 +571,17 @@ return n == 1 && v0 ? 'one' : i != 0 && i1000000 == 0 && v0 ? 'many' : 'other';

rm: a,
ro: function ro(n, ord) {
var s = String(n).split('.'),
v0 = !s[1],
t0 = Number(s[0]) == n,
n100 = t0 && s[0].slice(-2);
ro: (n, ord) => {
const s = String(n).split('.'),
v0 = !s[1],
t0 = Number(s[0]) == n,
n100 = t0 && s[0].slice(-2);
if (ord) return n == 1 ? 'one' : 'other';
return n == 1 && v0 ? 'one' : !v0 || n == 0 || n100 >= 2 && n100 <= 19 ? 'few' : 'other';
return n == 1 && v0 ? 'one' : !v0 || n == 0 || n != 1 && n100 >= 1 && n100 <= 19 ? 'few' : 'other';
},
rof: a,
ru: function ru(n, ord) {
var s = String(n).split('.'),
i = s[0],
v0 = !s[1],
i10 = i.slice(-1),
i100 = i.slice(-2);
ru: (n, ord) => {
const s = String(n).split('.'),
i = s[0],
v0 = !s[1],
i10 = i.slice(-1),
i100 = i.slice(-2);
if (ord) return 'other';

@@ -603,11 +594,11 @@ return v0 && i10 == 1 && i100 != 11 ? 'one' : v0 && i10 >= 2 && i10 <= 4 && (i100 < 12 || i100 > 14) ? 'few' : v0 && i10 == 0 || v0 && i10 >= 5 && i10 <= 9 || v0 && i100 >= 11 && i100 <= 14 ? 'many' : 'other';

sat: f,
sc: function sc(n, ord) {
var s = String(n).split('.'),
v0 = !s[1];
sc: (n, ord) => {
const s = String(n).split('.'),
v0 = !s[1];
if (ord) return n == 11 || n == 8 || n == 80 || n == 800 ? 'many' : 'other';
return n == 1 && v0 ? 'one' : 'other';
},
scn: function scn(n, ord) {
var s = String(n).split('.'),
v0 = !s[1];
scn: (n, ord) => {
const s = String(n).split('.'),
v0 = !s[1];
if (ord) return n == 11 || n == 8 || n == 80 || n == 800 ? 'many' : 'other';

@@ -622,39 +613,39 @@ return n == 1 && v0 ? 'one' : 'other';

sg: e,
sh: function sh(n, ord) {
var s = String(n).split('.'),
i = s[0],
f = s[1] || '',
v0 = !s[1],
i10 = i.slice(-1),
i100 = i.slice(-2),
f10 = f.slice(-1),
f100 = f.slice(-2);
sh: (n, ord) => {
const s = String(n).split('.'),
i = s[0],
f = s[1] || '',
v0 = !s[1],
i10 = i.slice(-1),
i100 = i.slice(-2),
f10 = f.slice(-1),
f100 = f.slice(-2);
if (ord) return 'other';
return v0 && i10 == 1 && i100 != 11 || f10 == 1 && f100 != 11 ? 'one' : v0 && i10 >= 2 && i10 <= 4 && (i100 < 12 || i100 > 14) || f10 >= 2 && f10 <= 4 && (f100 < 12 || f100 > 14) ? 'few' : 'other';
},
shi: function shi(n, ord) {
var s = String(n).split('.'),
t0 = Number(s[0]) == n;
shi: (n, ord) => {
const s = String(n).split('.'),
t0 = Number(s[0]) == n;
if (ord) return 'other';
return n >= 0 && n <= 1 ? 'one' : t0 && n >= 2 && n <= 10 ? 'few' : 'other';
},
si: function si(n, ord) {
var s = String(n).split('.'),
i = s[0],
f = s[1] || '';
si: (n, ord) => {
const s = String(n).split('.'),
i = s[0],
f = s[1] || '';
if (ord) return 'other';
return n == 0 || n == 1 || i == 0 && f == 1 ? 'one' : 'other';
},
sk: function sk(n, ord) {
var s = String(n).split('.'),
i = s[0],
v0 = !s[1];
sk: (n, ord) => {
const s = String(n).split('.'),
i = s[0],
v0 = !s[1];
if (ord) return 'other';
return n == 1 && v0 ? 'one' : i >= 2 && i <= 4 && v0 ? 'few' : !v0 ? 'many' : 'other';
},
sl: function sl(n, ord) {
var s = String(n).split('.'),
i = s[0],
v0 = !s[1],
i100 = i.slice(-2);
sl: (n, ord) => {
const s = String(n).split('.'),
i = s[0],
v0 = !s[1],
i100 = i.slice(-2);
if (ord) return 'other';

@@ -670,19 +661,19 @@ return v0 && i100 == 1 ? 'one' : v0 && i100 == 2 ? 'two' : v0 && (i100 == 3 || i100 == 4) || !v0 ? 'few' : 'other';

so: a,
sq: function sq(n, ord) {
var s = String(n).split('.'),
t0 = Number(s[0]) == n,
n10 = t0 && s[0].slice(-1),
n100 = t0 && s[0].slice(-2);
sq: (n, ord) => {
const s = String(n).split('.'),
t0 = Number(s[0]) == n,
n10 = t0 && s[0].slice(-1),
n100 = t0 && s[0].slice(-2);
if (ord) return n == 1 ? 'one' : n10 == 4 && n100 != 14 ? 'many' : 'other';
return n == 1 ? 'one' : 'other';
},
sr: function sr(n, ord) {
var s = String(n).split('.'),
i = s[0],
f = s[1] || '',
v0 = !s[1],
i10 = i.slice(-1),
i100 = i.slice(-2),
f10 = f.slice(-1),
f100 = f.slice(-2);
sr: (n, ord) => {
const s = String(n).split('.'),
i = s[0],
f = s[1] || '',
v0 = !s[1],
i10 = i.slice(-1),
i100 = i.slice(-2),
f10 = f.slice(-1),
f100 = f.slice(-2);
if (ord) return 'other';

@@ -695,8 +686,8 @@ return v0 && i10 == 1 && i100 != 11 || f10 == 1 && f100 != 11 ? 'one' : v0 && i10 >= 2 && i10 <= 4 && (i100 < 12 || i100 > 14) || f10 >= 2 && f10 <= 4 && (f100 < 12 || f100 > 14) ? 'few' : 'other';

su: e,
sv: function sv(n, ord) {
var s = String(n).split('.'),
v0 = !s[1],
t0 = Number(s[0]) == n,
n10 = t0 && s[0].slice(-1),
n100 = t0 && s[0].slice(-2);
sv: (n, ord) => {
const s = String(n).split('.'),
v0 = !s[1],
t0 = Number(s[0]) == n,
n10 = t0 && s[0].slice(-1),
n100 = t0 && s[0].slice(-2);
if (ord) return (n10 == 1 || n10 == 2) && n100 != 11 && n100 != 12 ? 'one' : 'other';

@@ -713,16 +704,16 @@ return n == 1 && v0 ? 'one' : 'other';

tig: a,
tk: function tk(n, ord) {
var s = String(n).split('.'),
t0 = Number(s[0]) == n,
n10 = t0 && s[0].slice(-1);
tk: (n, ord) => {
const s = String(n).split('.'),
t0 = Number(s[0]) == n,
n10 = t0 && s[0].slice(-1);
if (ord) return n10 == 6 || n10 == 9 || n == 10 ? 'few' : 'other';
return n == 1 ? 'one' : 'other';
},
tl: function tl(n, ord) {
var s = String(n).split('.'),
i = s[0],
f = s[1] || '',
v0 = !s[1],
i10 = i.slice(-1),
f10 = f.slice(-1);
tl: (n, ord) => {
const s = String(n).split('.'),
i = s[0],
f = s[1] || '',
v0 = !s[1],
i10 = i.slice(-1),
f10 = f.slice(-1);
if (ord) return n == 1 ? 'one' : 'other';

@@ -736,5 +727,5 @@ return v0 && (i == 1 || i == 2 || i == 3) || v0 && i10 != 4 && i10 != 6 && i10 != 9 || !v0 && f10 != 4 && f10 != 6 && f10 != 9 ? 'one' : 'other';

ts: a,
tzm: function tzm(n, ord) {
var s = String(n).split('.'),
t0 = Number(s[0]) == n;
tzm: (n, ord) => {
const s = String(n).split('.'),
t0 = Number(s[0]) == n;
if (ord) return 'other';

@@ -744,11 +735,11 @@ return n == 0 || n == 1 || t0 && n >= 11 && n <= 99 ? 'one' : 'other';

ug: a,
uk: function uk(n, ord) {
var s = String(n).split('.'),
i = s[0],
v0 = !s[1],
t0 = Number(s[0]) == n,
n10 = t0 && s[0].slice(-1),
n100 = t0 && s[0].slice(-2),
i10 = i.slice(-1),
i100 = i.slice(-2);
uk: (n, ord) => {
const s = String(n).split('.'),
i = s[0],
v0 = !s[1],
t0 = Number(s[0]) == n,
n10 = t0 && s[0].slice(-1),
n100 = t0 && s[0].slice(-2),
i10 = i.slice(-1),
i100 = i.slice(-2);
if (ord) return n10 == 3 && n100 != 13 ? 'few' : 'other';

@@ -761,3 +752,11 @@ return v0 && i10 == 1 && i100 != 11 ? 'one' : v0 && i10 >= 2 && i10 <= 4 && (i100 < 12 || i100 > 14) ? 'few' : v0 && i10 == 0 || v0 && i10 >= 5 && i10 <= 9 || v0 && i100 >= 11 && i100 <= 14 ? 'many' : 'other';

ve: a,
vi: function vi(n, ord) {
vec: (n, ord) => {
const s = String(n).split('.'),
i = s[0],
v0 = !s[1],
i1000000 = i.slice(-6);
if (ord) return n == 11 || n == 8 || n == 80 || n == 800 ? 'many' : 'other';
return n == 1 && v0 ? 'one' : i != 0 && i1000000 == 0 && v0 ? 'many' : 'other';
},
vi: (n, ord) => {
if (ord) return n == 1 ? 'one' : 'other';

@@ -780,3 +779,2 @@ return 'other';

})(plurals$1);
var plurals = /*@__PURE__*/getDefaultExportFromCjs(plurals$1.exports);

@@ -793,7 +791,7 @@

var z = "zero",
o = "one",
t = "two",
f = "few",
m = "many",
x = "other";
o = "one",
t = "two",
f = "few",
m = "many",
x = "other";
var a = {

@@ -812,10 +810,5 @@ cardinal: [o, x],

var d = {
cardinal: [o, f, m, x],
ordinal: [x]
};
var e = {
cardinal: [o, t, x],
ordinal: [x]
};
(function (root, pluralCategories) {

@@ -874,3 +867,3 @@ Object.defineProperty(pluralCategories, '__esModule', {

ca: {
cardinal: [o, x],
cardinal: [o, m, x],
ordinal: [o, t, f, x]

@@ -883,3 +876,6 @@ },

ckb: a,
cs: d,
cs: {
cardinal: [o, f, m, x],
ordinal: [x]
},
cy: {

@@ -943,6 +939,3 @@ cardinal: [z, o, t, f, m, x],

haw: a,
he: {
cardinal: [o, t, m, x],
ordinal: [x]
},
he: d,
hi: {

@@ -973,3 +966,3 @@ cardinal: [o, x],

},
iu: e,
iu: d,
ja: c,

@@ -1027,3 +1020,6 @@ jbo: c,

},
lt: d,
lt: {
cardinal: [o, f, m, x],
ordinal: [x]
},
lv: {

@@ -1054,6 +1050,9 @@ cardinal: [z, o, x],

},
mt: d,
mt: {
cardinal: [o, t, f, m, x],
ordinal: [x]
},
my: c,
nah: a,
naq: e,
naq: d,
nb: a,

@@ -1081,3 +1080,6 @@ nd: a,

pcm: a,
pl: d,
pl: {
cardinal: [o, f, m, x],
ordinal: [x]
},
prg: {

@@ -1102,7 +1104,10 @@ cardinal: [z, o, x],

rof: a,
ru: d,
ru: {
cardinal: [o, f, m, x],
ordinal: [x]
},
rwk: a,
sah: c,
saq: a,
sat: e,
sat: d,
sc: {

@@ -1118,3 +1123,3 @@ cardinal: [o, x],

sdh: a,
se: e,
se: d,
seh: a,

@@ -1132,3 +1137,6 @@ ses: c,

si: a,
sk: d,
sk: {
cardinal: [o, f, m, x],
ordinal: [x]
},
sl: {

@@ -1138,7 +1146,7 @@ cardinal: [o, t, f, x],

},
sma: e,
smi: e,
smj: e,
smn: e,
sms: e,
sma: d,
smi: d,
smj: d,
smn: d,
sms: d,
sn: a,

@@ -1187,2 +1195,6 @@ so: a,

ve: a,
vec: {
cardinal: [o, m, x],
ordinal: [m, x]
},
vi: {

@@ -1206,3 +1218,2 @@ cardinal: [x],

})(pluralCategories$1);
var pluralCategories = /*@__PURE__*/getDefaultExportFromCjs(pluralCategories$1.exports);

@@ -1218,14 +1229,5 @@

(function (module, exports) {
var a = function a(start, end) {
return "other";
};
var b = function b(start, end) {
return start === "other" && end === "one" ? "one" : "other";
};
var c = function c(start, end) {
return end || "other";
};
const a = (start, end) => "other";
const b = (start, end) => start === "other" && end === "one" ? "one" : "other";
const c = (start, end) => end || "other";
(function (root, pluralRanges) {

@@ -1241,5 +1243,3 @@ Object.defineProperty(pluralRanges, '__esModule', {

an: a,
ar: function ar(start, end) {
return end === "few" ? "few" : end === "many" ? "many" : start === "zero" && end === "one" ? "zero" : start === "zero" && end === "two" ? "zero" : "other";
},
ar: (start, end) => end === "few" ? "few" : end === "many" ? "many" : start === "zero" && end === "one" ? "zero" : start === "zero" && end === "two" ? "zero" : "other",
as: c,

@@ -1269,5 +1269,3 @@ az: c,

gu: c,
he: function he(start, end) {
return start === "many" && end === "many" ? "many" : start === "many" && end === "other" ? "many" : start === "one" && end === "many" ? "many" : start === "other" && end === "many" ? "many" : "other";
},
he: a,
hi: c,

@@ -1283,5 +1281,3 @@ hr: c,

ja: a,
ka: function ka(start, end) {
return start || "other";
},
ka: (start, end) => start || "other",
kk: c,

@@ -1295,5 +1291,3 @@ km: a,

lt: c,
lv: function lv(start, end) {
return end === "one" ? "one" : "other";
},
lv: (start, end) => end === "one" ? "one" : "other",
mk: a,

@@ -1315,5 +1309,3 @@ ml: c,

pt: c,
ro: function ro(start, end) {
return end === "few" ? "few" : end === "one" ? "few" : "other";
},
ro: (start, end) => end === "few" ? "few" : end === "one" ? "few" : "other",
ru: c,

@@ -1323,9 +1315,5 @@ sc: c,

sd: b,
si: function si(start, end) {
return start === "one" && end === "one" ? "one" : "other";
},
si: (start, end) => start === "one" && end === "one" ? "one" : "other",
sk: c,
sl: function sl(start, end) {
return end === "few" ? "few" : end === "one" ? "few" : end === "two" ? "two" : "other";
},
sl: (start, end) => end === "few" ? "few" : end === "one" ? "few" : end === "two" ? "two" : "other",
sq: c,

@@ -1350,3 +1338,2 @@ sr: c,

})(ranges$1);
var ranges = /*@__PURE__*/getDefaultExportFromCjs(ranges$1.exports);

@@ -1359,27 +1346,16 @@

// In a .mjs context, CommonJS imports only expose the default endpoint. We're
// using them here because with this many small functions, bundlers produce less
// cruft than for ES module exports.
const Plurals = plurals || P;
const Categories = pluralCategories || C;
const RangePlurals = ranges || R;
var Plurals = plurals || P;
var Categories = pluralCategories || C;
var RangePlurals = ranges || R; // make-plural exports are cast with safe-identifier to be valid JS identifiers
// make-plural exports are cast with safe-identifier to be valid JS identifiers
const id = lc => lc === 'pt-PT' ? 'pt_PT' : lc;
const getSelector = lc => Plurals[id(lc)];
const getCategories = (lc, ord) => Categories[id(lc)][ord ? 'ordinal' : 'cardinal'];
const getRangeSelector = lc => RangePlurals[id(lc)];
const PluralRules = getPluralRules__default["default"](Intl.NumberFormat, getSelector, getCategories, getRangeSelector);
var id = function id(lc) {
return lc === 'pt-PT' ? 'pt_PT' : lc;
};
var getSelector = function getSelector(lc) {
return Plurals[id(lc)];
};
var getCategories = function getCategories(lc, ord) {
return Categories[id(lc)][ord ? 'ordinal' : 'cardinal'];
};
var getRangeSelector = function getRangeSelector(lc) {
return RangePlurals[id(lc)];
};
var PluralRules = getPluralRules__default["default"](Intl.NumberFormat, getSelector, getCategories, getRangeSelector);
module.exports = PluralRules;

@@ -23,3 +23,2 @@ 'use strict';

}
PluralRules__default["default"].polyfill = true;

@@ -30,5 +29,4 @@ } else if (!Intl.PluralRules || !Intl.PluralRules.prototype.selectRange) {

} else {
var test = ['en', 'es', 'ru', 'zh'];
var supported = Intl.PluralRules.supportedLocalesOf(test);
const test = ['en', 'es', 'ru', 'zh'];
const supported = Intl.PluralRules.supportedLocalesOf(test);
if (supported.length < test.length) {

@@ -35,0 +33,0 @@ Intl.PluralRules = PluralRules__default["default"];

@@ -8,3 +8,3 @@ # intl-pluralrules

For a polyfill without `selectRange()`, please use `intl-pluralrules@1`.
For a polyfill without `selectRange()` and with IE 11 support, please use `intl-pluralrules@1`.

@@ -11,0 +11,0 @@ [intl.pluralrules]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/PluralRules

Sorry, the diff of this file is not supported yet