@dbml/core 10.3.0-alpha.1 → 10.3.0-alpha.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/node_modules/parsimmon/build/parsimmon.umd.min.cjs +16 -0
- package/lib/node_modules/parsimmon/build/parsimmon.umd.min.mjs +689 -0
- package/lib/node_modules/pluralize/pluralize.cjs +1 -0
- package/lib/node_modules/pluralize/pluralize.mjs +276 -0
- package/lib/packages/dbml-core/node_modules/lodash/lodash.cjs +20 -0
- package/lib/packages/dbml-core/node_modules/lodash/lodash.mjs +3306 -0
- package/lib/packages/dbml-core/package.json.cjs +1 -1
- package/lib/packages/dbml-core/package.json.mjs +1 -1
- package/lib/parse/deprecated/dbmlParser.cjs +3 -3
- package/lib/parse/deprecated/dbmlParser.mjs +27 -25
- package/lib/parse/deprecated/mssql/base_parsers.cjs +1 -1
- package/lib/parse/deprecated/mssql/base_parsers.mjs +38 -38
- package/lib/parse/deprecated/mssql/column_definition/index.cjs +1 -1
- package/lib/parse/deprecated/mssql/column_definition/index.mjs +28 -28
- package/lib/parse/deprecated/mssql/constraint_definition/index.cjs +1 -1
- package/lib/parse/deprecated/mssql/constraint_definition/index.mjs +24 -24
- package/lib/parse/deprecated/mssql/expression.cjs +1 -1
- package/lib/parse/deprecated/mssql/expression.mjs +27 -27
- package/lib/parse/deprecated/mssql/fk_definition/index.cjs +1 -1
- package/lib/parse/deprecated/mssql/fk_definition/index.mjs +20 -20
- package/lib/parse/deprecated/mssql/index_definition/index.cjs +1 -1
- package/lib/parse/deprecated/mssql/index_definition/index.mjs +21 -21
- package/lib/parse/deprecated/mssql/keyword_utils.cjs +1 -1
- package/lib/parse/deprecated/mssql/keyword_utils.mjs +13 -13
- package/lib/parse/deprecated/mssql/statements/index.cjs +1 -1
- package/lib/parse/deprecated/mssql/statements/index.mjs +28 -28
- package/lib/parse/deprecated/mssql/statements/statement_types/alter_table/add/index.cjs +1 -1
- package/lib/parse/deprecated/mssql/statements/statement_types/alter_table/add/index.mjs +24 -24
- package/lib/parse/deprecated/mssql/statements/statement_types/alter_table/index.cjs +1 -1
- package/lib/parse/deprecated/mssql/statements/statement_types/alter_table/index.mjs +16 -16
- package/lib/parse/deprecated/mssql/statements/statement_types/comments/index.cjs +1 -1
- package/lib/parse/deprecated/mssql/statements/statement_types/comments/index.mjs +31 -31
- package/lib/parse/deprecated/mssql/statements/statement_types/create_index/index.cjs +1 -1
- package/lib/parse/deprecated/mssql/statements/statement_types/create_index/index.mjs +20 -20
- package/lib/parse/deprecated/mssql/statements/statement_types/create_table/index.cjs +1 -1
- package/lib/parse/deprecated/mssql/statements/statement_types/create_table/index.mjs +21 -21
- package/lib/parse/deprecated/mssql/utils.cjs +1 -1
- package/lib/parse/deprecated/mssql/utils.mjs +23 -23
- package/lib/parse/deprecated/mssql/whitespaces.cjs +1 -1
- package/lib/parse/deprecated/mssql/whitespaces.mjs +11 -11
- package/lib/parse/deprecated/mysqlParser.cjs +6 -6
- package/lib/parse/deprecated/mysqlParser.mjs +20 -18
- package/lib/parse/deprecated/postgresParser.cjs +2 -2
- package/lib/parse/deprecated/postgresParser.mjs +25 -23
- package/lib/parse/deprecated/schemarbParser.cjs +10 -10
- package/lib/parse/deprecated/schemarbParser.mjs +313 -311
- package/package.json +2 -2
|
@@ -0,0 +1,689 @@
|
|
|
1
|
+
import { __commonJSMin as e } from "../../../_virtual/_rolldown/runtime.mjs";
|
|
2
|
+
//#region ../../node_modules/parsimmon/build/parsimmon.umd.min.js
|
|
3
|
+
var t = /* @__PURE__ */ e(((e, t) => {
|
|
4
|
+
(function(n, r) {
|
|
5
|
+
typeof e == "object" && typeof t == "object" ? t.exports = r() : typeof define == "function" && define.amd ? define([], r) : typeof e == "object" ? e.Parsimmon = r() : n.Parsimmon = r();
|
|
6
|
+
})(typeof self < "u" ? self : e, function() {
|
|
7
|
+
return function(e) {
|
|
8
|
+
var t = {};
|
|
9
|
+
function n(r) {
|
|
10
|
+
if (t[r]) return t[r].exports;
|
|
11
|
+
var i = t[r] = {
|
|
12
|
+
i: r,
|
|
13
|
+
l: !1,
|
|
14
|
+
exports: {}
|
|
15
|
+
};
|
|
16
|
+
return e[r].call(i.exports, i, i.exports, n), i.l = !0, i.exports;
|
|
17
|
+
}
|
|
18
|
+
return n.m = e, n.c = t, n.d = function(e, t, r) {
|
|
19
|
+
n.o(e, t) || Object.defineProperty(e, t, {
|
|
20
|
+
configurable: !1,
|
|
21
|
+
enumerable: !0,
|
|
22
|
+
get: r
|
|
23
|
+
});
|
|
24
|
+
}, n.r = function(e) {
|
|
25
|
+
Object.defineProperty(e, "__esModule", { value: !0 });
|
|
26
|
+
}, n.n = function(e) {
|
|
27
|
+
var t = e && e.__esModule ? function() {
|
|
28
|
+
return e.default;
|
|
29
|
+
} : function() {
|
|
30
|
+
return e;
|
|
31
|
+
};
|
|
32
|
+
return n.d(t, "a", t), t;
|
|
33
|
+
}, n.o = function(e, t) {
|
|
34
|
+
return Object.prototype.hasOwnProperty.call(e, t);
|
|
35
|
+
}, n.p = "", n(n.s = 0);
|
|
36
|
+
}([function(e, t, n) {
|
|
37
|
+
function r(e) {
|
|
38
|
+
if (!(this instanceof r)) return new r(e);
|
|
39
|
+
this._ = e;
|
|
40
|
+
}
|
|
41
|
+
var i = r.prototype;
|
|
42
|
+
function a(e, t) {
|
|
43
|
+
for (var n = 0; n < e; n++) t(n);
|
|
44
|
+
}
|
|
45
|
+
function o(e, t, n) {
|
|
46
|
+
return function(e, t) {
|
|
47
|
+
a(t.length, function(n) {
|
|
48
|
+
e(t[n], n, t);
|
|
49
|
+
});
|
|
50
|
+
}(function(n, r, i) {
|
|
51
|
+
t = e(t, n, r, i);
|
|
52
|
+
}, n), t;
|
|
53
|
+
}
|
|
54
|
+
function s(e, t) {
|
|
55
|
+
return o(function(t, n, r, i) {
|
|
56
|
+
return t.concat([e(n, r, i)]);
|
|
57
|
+
}, [], t);
|
|
58
|
+
}
|
|
59
|
+
function c(e, t) {
|
|
60
|
+
var n = {
|
|
61
|
+
v: 0,
|
|
62
|
+
buf: t
|
|
63
|
+
};
|
|
64
|
+
return a(e, function() {
|
|
65
|
+
var e;
|
|
66
|
+
n = {
|
|
67
|
+
v: n.v << 1 | (e = n.buf, e[0] >> 7),
|
|
68
|
+
buf: function(e) {
|
|
69
|
+
var t = o(function(e, t, n, r) {
|
|
70
|
+
return e.concat(n === r.length - 1 ? Buffer.from([t, 0]).readUInt16BE(0) : r.readUInt16BE(n));
|
|
71
|
+
}, [], e);
|
|
72
|
+
return Buffer.from(s(function(e) {
|
|
73
|
+
return (e << 1 & 65535) >> 8;
|
|
74
|
+
}, t));
|
|
75
|
+
}(n.buf)
|
|
76
|
+
};
|
|
77
|
+
}), n;
|
|
78
|
+
}
|
|
79
|
+
function l() {
|
|
80
|
+
return typeof Buffer < "u";
|
|
81
|
+
}
|
|
82
|
+
function u() {
|
|
83
|
+
if (!l()) throw Error("Buffer global does not exist; please use webpack if you need to parse Buffers in the browser.");
|
|
84
|
+
}
|
|
85
|
+
function d(e) {
|
|
86
|
+
u();
|
|
87
|
+
var t = o(function(e, t) {
|
|
88
|
+
return e + t;
|
|
89
|
+
}, 0, e);
|
|
90
|
+
if (t % 8 != 0) throw Error("The bits [" + e.join(", ") + "] add up to " + t + " which is not an even number of bytes; the total should be divisible by 8");
|
|
91
|
+
var n, i = t / 8, a = (n = function(e) {
|
|
92
|
+
return e > 48;
|
|
93
|
+
}, o(function(e, t) {
|
|
94
|
+
return e || (n(t) ? t : e);
|
|
95
|
+
}, null, e));
|
|
96
|
+
if (a) throw Error(a + " bit range requested exceeds 48 bit (6 byte) Number max.");
|
|
97
|
+
return new r(function(t, n) {
|
|
98
|
+
var r = i + n;
|
|
99
|
+
return r > t.length ? S(n, i.toString() + " bytes") : x(r, o(function(e, t) {
|
|
100
|
+
var n = c(t, e.buf);
|
|
101
|
+
return {
|
|
102
|
+
coll: e.coll.concat(n.v),
|
|
103
|
+
buf: n.buf
|
|
104
|
+
};
|
|
105
|
+
}, {
|
|
106
|
+
coll: [],
|
|
107
|
+
buf: t.slice(n, r)
|
|
108
|
+
}, e).coll);
|
|
109
|
+
});
|
|
110
|
+
}
|
|
111
|
+
function f(e, t) {
|
|
112
|
+
return new r(function(n, r) {
|
|
113
|
+
return u(), r + t > n.length ? S(r, t + " bytes for " + e) : x(r + t, n.slice(r, r + t));
|
|
114
|
+
});
|
|
115
|
+
}
|
|
116
|
+
function p(e, t) {
|
|
117
|
+
if (typeof (n = t) != "number" || Math.floor(n) !== n || t < 0 || t > 6) throw Error(e + " requires integer length in range [0, 6].");
|
|
118
|
+
var n;
|
|
119
|
+
}
|
|
120
|
+
function m(e) {
|
|
121
|
+
return p("uintBE", e), f("uintBE(" + e + ")", e).map(function(t) {
|
|
122
|
+
return t.readUIntBE(0, e);
|
|
123
|
+
});
|
|
124
|
+
}
|
|
125
|
+
function h(e) {
|
|
126
|
+
return p("uintLE", e), f("uintLE(" + e + ")", e).map(function(t) {
|
|
127
|
+
return t.readUIntLE(0, e);
|
|
128
|
+
});
|
|
129
|
+
}
|
|
130
|
+
function g(e) {
|
|
131
|
+
return p("intBE", e), f("intBE(" + e + ")", e).map(function(t) {
|
|
132
|
+
return t.readIntBE(0, e);
|
|
133
|
+
});
|
|
134
|
+
}
|
|
135
|
+
function _(e) {
|
|
136
|
+
return p("intLE", e), f("intLE(" + e + ")", e).map(function(t) {
|
|
137
|
+
return t.readIntLE(0, e);
|
|
138
|
+
});
|
|
139
|
+
}
|
|
140
|
+
function v(e) {
|
|
141
|
+
return e instanceof r;
|
|
142
|
+
}
|
|
143
|
+
function y(e) {
|
|
144
|
+
return {}.toString.call(e) === "[object Array]";
|
|
145
|
+
}
|
|
146
|
+
function b(e) {
|
|
147
|
+
return l() && Buffer.isBuffer(e);
|
|
148
|
+
}
|
|
149
|
+
function x(e, t) {
|
|
150
|
+
return {
|
|
151
|
+
status: !0,
|
|
152
|
+
index: e,
|
|
153
|
+
value: t,
|
|
154
|
+
furthest: -1,
|
|
155
|
+
expected: []
|
|
156
|
+
};
|
|
157
|
+
}
|
|
158
|
+
function S(e, t) {
|
|
159
|
+
return y(t) || (t = [t]), {
|
|
160
|
+
status: !1,
|
|
161
|
+
index: -1,
|
|
162
|
+
value: null,
|
|
163
|
+
furthest: e,
|
|
164
|
+
expected: t
|
|
165
|
+
};
|
|
166
|
+
}
|
|
167
|
+
function C(e, t) {
|
|
168
|
+
if (!t || e.furthest > t.furthest) return e;
|
|
169
|
+
var n = e.furthest === t.furthest ? function(e, t) {
|
|
170
|
+
if (function() {
|
|
171
|
+
if (r._supportsSet !== void 0) return r._supportsSet;
|
|
172
|
+
var e = typeof Set < "u";
|
|
173
|
+
return r._supportsSet = e, e;
|
|
174
|
+
}() && Array.from) {
|
|
175
|
+
for (var n = new Set(e), i = 0; i < t.length; i++) n.add(t[i]);
|
|
176
|
+
var a = Array.from(n);
|
|
177
|
+
return a.sort(), a;
|
|
178
|
+
}
|
|
179
|
+
for (var o = {}, s = 0; s < e.length; s++) o[e[s]] = !0;
|
|
180
|
+
for (var c = 0; c < t.length; c++) o[t[c]] = !0;
|
|
181
|
+
var l = [];
|
|
182
|
+
for (var u in o) ({}).hasOwnProperty.call(o, u) && l.push(u);
|
|
183
|
+
return l.sort(), l;
|
|
184
|
+
}(e.expected, t.expected) : t.expected;
|
|
185
|
+
return {
|
|
186
|
+
status: e.status,
|
|
187
|
+
index: e.index,
|
|
188
|
+
value: e.value,
|
|
189
|
+
furthest: t.furthest,
|
|
190
|
+
expected: n
|
|
191
|
+
};
|
|
192
|
+
}
|
|
193
|
+
var w = {};
|
|
194
|
+
function T(e, t) {
|
|
195
|
+
if (b(e)) return {
|
|
196
|
+
offset: t,
|
|
197
|
+
line: -1,
|
|
198
|
+
column: -1
|
|
199
|
+
};
|
|
200
|
+
e in w || (w[e] = {});
|
|
201
|
+
for (var n = w[e], r = 0, i = 0, a = 0, o = t; o >= 0;) {
|
|
202
|
+
if (o in n) {
|
|
203
|
+
r = n[o].line, a === 0 && (a = n[o].lineStart);
|
|
204
|
+
break;
|
|
205
|
+
}
|
|
206
|
+
(e.charAt(o) === "\n" || e.charAt(o) === "\r" && e.charAt(o + 1) !== "\n") && (i++, a === 0 && (a = o + 1)), o--;
|
|
207
|
+
}
|
|
208
|
+
var s = r + i, c = t - a;
|
|
209
|
+
return n[t] = {
|
|
210
|
+
line: s,
|
|
211
|
+
lineStart: a
|
|
212
|
+
}, {
|
|
213
|
+
offset: t,
|
|
214
|
+
line: s + 1,
|
|
215
|
+
column: c + 1
|
|
216
|
+
};
|
|
217
|
+
}
|
|
218
|
+
function E(e) {
|
|
219
|
+
if (!v(e)) throw Error("not a parser: " + e);
|
|
220
|
+
}
|
|
221
|
+
function D(e, t) {
|
|
222
|
+
return typeof e == "string" ? e.charAt(t) : e[t];
|
|
223
|
+
}
|
|
224
|
+
function O(e) {
|
|
225
|
+
if (typeof e != "number") throw Error("not a number: " + e);
|
|
226
|
+
}
|
|
227
|
+
function k(e) {
|
|
228
|
+
if (typeof e != "function") throw Error("not a function: " + e);
|
|
229
|
+
}
|
|
230
|
+
function A(e) {
|
|
231
|
+
if (typeof e != "string") throw Error("not a string: " + e);
|
|
232
|
+
}
|
|
233
|
+
var ee = 2, te = 3, j = 8, ne = 5 * j, re = 4 * j, M = " ";
|
|
234
|
+
function N(e, t) {
|
|
235
|
+
return Array(t + 1).join(e);
|
|
236
|
+
}
|
|
237
|
+
function P(e, t, n) {
|
|
238
|
+
var r = t - e.length;
|
|
239
|
+
return r <= 0 ? e : N(n, r) + e;
|
|
240
|
+
}
|
|
241
|
+
function F(e, t, n, r) {
|
|
242
|
+
return {
|
|
243
|
+
from: e - t > 0 ? e - t : 0,
|
|
244
|
+
to: e + n > r ? r : e + n
|
|
245
|
+
};
|
|
246
|
+
}
|
|
247
|
+
function ie(e, t) {
|
|
248
|
+
var n, r, i, a, c, l = t.index, u = l.offset, d = 1;
|
|
249
|
+
if (u === e.length) return "Got the end of the input";
|
|
250
|
+
if (b(e)) {
|
|
251
|
+
var f = u - u % j, p = u - f, m = F(f, ne, re + j, e.length), h = s(function(e) {
|
|
252
|
+
return s(function(e) {
|
|
253
|
+
return P(e.toString(16), 2, "0");
|
|
254
|
+
}, e);
|
|
255
|
+
}, function(e, t) {
|
|
256
|
+
var n = e.length, r = [], i = 0;
|
|
257
|
+
if (n <= t) return [e.slice()];
|
|
258
|
+
for (var a = 0; a < n; a++) r[i] || r.push([]), r[i].push(e[a]), (a + 1) % t == 0 && i++;
|
|
259
|
+
return r;
|
|
260
|
+
}(e.slice(m.from, m.to).toJSON().data, j));
|
|
261
|
+
a = function(e) {
|
|
262
|
+
return e.from === 0 && e.to === 1 ? {
|
|
263
|
+
from: e.from,
|
|
264
|
+
to: e.to
|
|
265
|
+
} : {
|
|
266
|
+
from: e.from / j,
|
|
267
|
+
to: Math.floor(e.to / j)
|
|
268
|
+
};
|
|
269
|
+
}(m), r = f / j, n = 3 * p, p >= 4 && (n += 1), d = 2, i = s(function(e) {
|
|
270
|
+
return e.length <= 4 ? e.join(" ") : e.slice(0, 4).join(" ") + " " + e.slice(4).join(" ");
|
|
271
|
+
}, h), (c = (8 * (a.to > 0 ? a.to - 1 : a.to)).toString(16).length) < 2 && (c = 2);
|
|
272
|
+
} else {
|
|
273
|
+
var g = e.split(/\r\n|[\n\r\u2028\u2029]/);
|
|
274
|
+
n = l.column - 1, r = l.line - 1, a = F(r, ee, te, g.length), i = g.slice(a.from, a.to), c = a.to.toString().length;
|
|
275
|
+
}
|
|
276
|
+
var _ = r - a.from;
|
|
277
|
+
return b(e) && (c = (8 * (a.to > 0 ? a.to - 1 : a.to)).toString(16).length) < 2 && (c = 2), o(function(t, r, i) {
|
|
278
|
+
var o, s = i === _, l = s ? "> " : M;
|
|
279
|
+
return o = b(e) ? P((8 * (a.from + i)).toString(16), c, "0") : P((a.from + i + 1).toString(), c, " "), [].concat(t, [l + o + " | " + r], s ? [M + N(" ", c) + " | " + P("", n, " ") + N("^", d)] : []);
|
|
280
|
+
}, [], i).join("\n");
|
|
281
|
+
}
|
|
282
|
+
function I(e, t) {
|
|
283
|
+
return [
|
|
284
|
+
"\n",
|
|
285
|
+
"-- PARSING FAILED " + N("-", 50),
|
|
286
|
+
"\n\n",
|
|
287
|
+
ie(e, t),
|
|
288
|
+
"\n\n",
|
|
289
|
+
(n = t.expected, n.length === 1 ? "Expected:\n\n" + n[0] : "Expected one of the following: \n\n" + n.join(", ")),
|
|
290
|
+
"\n"
|
|
291
|
+
].join("");
|
|
292
|
+
var n;
|
|
293
|
+
}
|
|
294
|
+
function L(e) {
|
|
295
|
+
return e.flags === void 0 ? [
|
|
296
|
+
e.global ? "g" : "",
|
|
297
|
+
e.ignoreCase ? "i" : "",
|
|
298
|
+
e.multiline ? "m" : "",
|
|
299
|
+
e.unicode ? "u" : "",
|
|
300
|
+
e.sticky ? "y" : ""
|
|
301
|
+
].join("") : e.flags;
|
|
302
|
+
}
|
|
303
|
+
function R() {
|
|
304
|
+
for (var e = [].slice.call(arguments), t = e.length, n = 0; n < t; n += 1) E(e[n]);
|
|
305
|
+
return r(function(n, r) {
|
|
306
|
+
for (var i, a = Array(t), o = 0; o < t; o += 1) {
|
|
307
|
+
if (!(i = C(e[o]._(n, r), i)).status) return i;
|
|
308
|
+
a[o] = i.value, r = i.index;
|
|
309
|
+
}
|
|
310
|
+
return C(x(r, a), i);
|
|
311
|
+
});
|
|
312
|
+
}
|
|
313
|
+
function z() {
|
|
314
|
+
var e = [].slice.call(arguments);
|
|
315
|
+
if (e.length === 0) throw Error("seqMap needs at least one argument");
|
|
316
|
+
var t = e.pop();
|
|
317
|
+
return k(t), R.apply(null, e).map(function(e) {
|
|
318
|
+
return t.apply(null, e);
|
|
319
|
+
});
|
|
320
|
+
}
|
|
321
|
+
function B() {
|
|
322
|
+
var e = [].slice.call(arguments), t = e.length;
|
|
323
|
+
if (t === 0) return G("zero alternates");
|
|
324
|
+
for (var n = 0; n < t; n += 1) E(e[n]);
|
|
325
|
+
return r(function(t, n) {
|
|
326
|
+
for (var r, i = 0; i < e.length; i += 1) if ((r = C(e[i]._(t, n), r)).status) return r;
|
|
327
|
+
return r;
|
|
328
|
+
});
|
|
329
|
+
}
|
|
330
|
+
function ae(e, t) {
|
|
331
|
+
return V(e, t).or(W([]));
|
|
332
|
+
}
|
|
333
|
+
function V(e, t) {
|
|
334
|
+
return E(e), E(t), z(e, t.then(e).many(), function(e, t) {
|
|
335
|
+
return [e].concat(t);
|
|
336
|
+
});
|
|
337
|
+
}
|
|
338
|
+
function H(e) {
|
|
339
|
+
A(e);
|
|
340
|
+
var t = "'" + e + "'";
|
|
341
|
+
return r(function(n, r) {
|
|
342
|
+
var i = r + e.length, a = n.slice(r, i);
|
|
343
|
+
return a === e ? x(i, a) : S(r, t);
|
|
344
|
+
});
|
|
345
|
+
}
|
|
346
|
+
function U(e, t) {
|
|
347
|
+
(function(e) {
|
|
348
|
+
if (!(e instanceof RegExp)) throw Error("not a regexp: " + e);
|
|
349
|
+
for (var t = L(e), n = 0; n < t.length; n++) {
|
|
350
|
+
var r = t.charAt(n);
|
|
351
|
+
if (r !== "i" && r !== "m" && r !== "u" && r !== "s") throw Error("unsupported regexp flag \"" + r + "\": " + e);
|
|
352
|
+
}
|
|
353
|
+
})(e), arguments.length >= 2 ? O(t) : t = 0;
|
|
354
|
+
var n = function(e) {
|
|
355
|
+
return RegExp("^(?:" + e.source + ")", L(e));
|
|
356
|
+
}(e), i = "" + e;
|
|
357
|
+
return r(function(e, r) {
|
|
358
|
+
var a = n.exec(e.slice(r));
|
|
359
|
+
if (a) {
|
|
360
|
+
if (0 <= t && t <= a.length) {
|
|
361
|
+
var o = a[0], s = a[t];
|
|
362
|
+
return x(r + o.length, s);
|
|
363
|
+
}
|
|
364
|
+
return S(r, "valid match group (0 to " + a.length + ") in " + i);
|
|
365
|
+
}
|
|
366
|
+
return S(r, i);
|
|
367
|
+
});
|
|
368
|
+
}
|
|
369
|
+
function W(e) {
|
|
370
|
+
return r(function(t, n) {
|
|
371
|
+
return x(n, e);
|
|
372
|
+
});
|
|
373
|
+
}
|
|
374
|
+
function G(e) {
|
|
375
|
+
return r(function(t, n) {
|
|
376
|
+
return S(n, e);
|
|
377
|
+
});
|
|
378
|
+
}
|
|
379
|
+
function K(e) {
|
|
380
|
+
if (v(e)) return r(function(t, n) {
|
|
381
|
+
var r = e._(t, n);
|
|
382
|
+
return r.index = n, r.value = "", r;
|
|
383
|
+
});
|
|
384
|
+
if (typeof e == "string") return K(H(e));
|
|
385
|
+
if (e instanceof RegExp) return K(U(e));
|
|
386
|
+
throw Error("not a string, regexp, or parser: " + e);
|
|
387
|
+
}
|
|
388
|
+
function q(e) {
|
|
389
|
+
return E(e), r(function(t, n) {
|
|
390
|
+
var r = e._(t, n), i = t.slice(n, r.index);
|
|
391
|
+
return r.status ? S(n, "not \"" + i + "\"") : x(n, null);
|
|
392
|
+
});
|
|
393
|
+
}
|
|
394
|
+
function J(e) {
|
|
395
|
+
return k(e), r(function(t, n) {
|
|
396
|
+
var r = D(t, n);
|
|
397
|
+
return n < t.length && e(r) ? x(n + 1, r) : S(n, "a character/byte matching " + e);
|
|
398
|
+
});
|
|
399
|
+
}
|
|
400
|
+
function Y(e, t) {
|
|
401
|
+
arguments.length < 2 && (t = e, e = void 0);
|
|
402
|
+
var n = r(function(e, r) {
|
|
403
|
+
return n._ = t()._, n._(e, r);
|
|
404
|
+
});
|
|
405
|
+
return e ? n.desc(e) : n;
|
|
406
|
+
}
|
|
407
|
+
function X() {
|
|
408
|
+
return G("fantasy-land/empty");
|
|
409
|
+
}
|
|
410
|
+
i.parse = function(e) {
|
|
411
|
+
if (typeof e != "string" && !b(e)) throw Error(".parse must be called with a string or Buffer as its argument");
|
|
412
|
+
var t, n = this.skip(Q)._(e, 0);
|
|
413
|
+
return t = n.status ? {
|
|
414
|
+
status: !0,
|
|
415
|
+
value: n.value
|
|
416
|
+
} : {
|
|
417
|
+
status: !1,
|
|
418
|
+
index: T(e, n.furthest),
|
|
419
|
+
expected: n.expected
|
|
420
|
+
}, delete w[e], t;
|
|
421
|
+
}, i.tryParse = function(e) {
|
|
422
|
+
var t = this.parse(e);
|
|
423
|
+
if (t.status) return t.value;
|
|
424
|
+
var n = I(e, t), r = Error(n);
|
|
425
|
+
throw r.type = "ParsimmonError", r.result = t, r;
|
|
426
|
+
}, i.assert = function(e, t) {
|
|
427
|
+
return this.chain(function(n) {
|
|
428
|
+
return e(n) ? W(n) : G(t);
|
|
429
|
+
});
|
|
430
|
+
}, i.or = function(e) {
|
|
431
|
+
return B(this, e);
|
|
432
|
+
}, i.trim = function(e) {
|
|
433
|
+
return this.wrap(e, e);
|
|
434
|
+
}, i.wrap = function(e, t) {
|
|
435
|
+
return z(e, this, t, function(e, t) {
|
|
436
|
+
return t;
|
|
437
|
+
});
|
|
438
|
+
}, i.thru = function(e) {
|
|
439
|
+
return e(this);
|
|
440
|
+
}, i.then = function(e) {
|
|
441
|
+
return E(e), R(this, e).map(function(e) {
|
|
442
|
+
return e[1];
|
|
443
|
+
});
|
|
444
|
+
}, i.many = function() {
|
|
445
|
+
var e = this;
|
|
446
|
+
return r(function(t, n) {
|
|
447
|
+
for (var r = [], i = void 0;;) {
|
|
448
|
+
if (!(i = C(e._(t, n), i)).status) return C(x(n, r), i);
|
|
449
|
+
if (n === i.index) throw Error("infinite loop detected in .many() parser --- calling .many() on a parser which can accept zero characters is usually the cause");
|
|
450
|
+
n = i.index, r.push(i.value);
|
|
451
|
+
}
|
|
452
|
+
});
|
|
453
|
+
}, i.tieWith = function(e) {
|
|
454
|
+
return A(e), this.map(function(t) {
|
|
455
|
+
if (function(e) {
|
|
456
|
+
if (!y(e)) throw Error("not an array: " + e);
|
|
457
|
+
}(t), t.length) {
|
|
458
|
+
A(t[0]);
|
|
459
|
+
for (var n = t[0], r = 1; r < t.length; r++) A(t[r]), n += e + t[r];
|
|
460
|
+
return n;
|
|
461
|
+
}
|
|
462
|
+
return "";
|
|
463
|
+
});
|
|
464
|
+
}, i.tie = function() {
|
|
465
|
+
return this.tieWith("");
|
|
466
|
+
}, i.times = function(e, t) {
|
|
467
|
+
var n = this;
|
|
468
|
+
return arguments.length < 2 && (t = e), O(e), O(t), r(function(r, i) {
|
|
469
|
+
for (var a = [], o = void 0, s = void 0, c = 0; c < e; c += 1) {
|
|
470
|
+
if (s = C(o = n._(r, i), s), !o.status) return s;
|
|
471
|
+
i = o.index, a.push(o.value);
|
|
472
|
+
}
|
|
473
|
+
for (; c < t && (s = C(o = n._(r, i), s), o.status); c += 1) i = o.index, a.push(o.value);
|
|
474
|
+
return C(x(i, a), s);
|
|
475
|
+
});
|
|
476
|
+
}, i.result = function(e) {
|
|
477
|
+
return this.map(function() {
|
|
478
|
+
return e;
|
|
479
|
+
});
|
|
480
|
+
}, i.atMost = function(e) {
|
|
481
|
+
return this.times(0, e);
|
|
482
|
+
}, i.atLeast = function(e) {
|
|
483
|
+
return z(this.times(e), this.many(), function(e, t) {
|
|
484
|
+
return e.concat(t);
|
|
485
|
+
});
|
|
486
|
+
}, i.map = function(e) {
|
|
487
|
+
k(e);
|
|
488
|
+
var t = this;
|
|
489
|
+
return r(function(n, r) {
|
|
490
|
+
var i = t._(n, r);
|
|
491
|
+
return i.status ? C(x(i.index, e(i.value)), i) : i;
|
|
492
|
+
});
|
|
493
|
+
}, i.contramap = function(e) {
|
|
494
|
+
k(e);
|
|
495
|
+
var t = this;
|
|
496
|
+
return r(function(n, r) {
|
|
497
|
+
var i = t.parse(e(n.slice(r)));
|
|
498
|
+
return i.status ? x(r + n.length, i.value) : i;
|
|
499
|
+
});
|
|
500
|
+
}, i.promap = function(e, t) {
|
|
501
|
+
return k(e), k(t), this.contramap(e).map(t);
|
|
502
|
+
}, i.skip = function(e) {
|
|
503
|
+
return R(this, e).map(function(e) {
|
|
504
|
+
return e[0];
|
|
505
|
+
});
|
|
506
|
+
}, i.mark = function() {
|
|
507
|
+
return z(Z, this, Z, function(e, t, n) {
|
|
508
|
+
return {
|
|
509
|
+
start: e,
|
|
510
|
+
value: t,
|
|
511
|
+
end: n
|
|
512
|
+
};
|
|
513
|
+
});
|
|
514
|
+
}, i.node = function(e) {
|
|
515
|
+
return z(Z, this, Z, function(t, n, r) {
|
|
516
|
+
return {
|
|
517
|
+
name: e,
|
|
518
|
+
value: n,
|
|
519
|
+
start: t,
|
|
520
|
+
end: r
|
|
521
|
+
};
|
|
522
|
+
});
|
|
523
|
+
}, i.sepBy = function(e) {
|
|
524
|
+
return ae(this, e);
|
|
525
|
+
}, i.sepBy1 = function(e) {
|
|
526
|
+
return V(this, e);
|
|
527
|
+
}, i.lookahead = function(e) {
|
|
528
|
+
return this.skip(K(e));
|
|
529
|
+
}, i.notFollowedBy = function(e) {
|
|
530
|
+
return this.skip(q(e));
|
|
531
|
+
}, i.desc = function(e) {
|
|
532
|
+
y(e) || (e = [e]);
|
|
533
|
+
var t = this;
|
|
534
|
+
return r(function(n, r) {
|
|
535
|
+
var i = t._(n, r);
|
|
536
|
+
return i.status || (i.expected = e), i;
|
|
537
|
+
});
|
|
538
|
+
}, i.fallback = function(e) {
|
|
539
|
+
return this.or(W(e));
|
|
540
|
+
}, i.ap = function(e) {
|
|
541
|
+
return z(e, this, function(e, t) {
|
|
542
|
+
return e(t);
|
|
543
|
+
});
|
|
544
|
+
}, i.chain = function(e) {
|
|
545
|
+
var t = this;
|
|
546
|
+
return r(function(n, r) {
|
|
547
|
+
var i = t._(n, r);
|
|
548
|
+
return i.status ? C(e(i.value)._(n, i.index), i) : i;
|
|
549
|
+
});
|
|
550
|
+
}, i.concat = i.or, i.empty = X, i.of = W, i["fantasy-land/ap"] = i.ap, i["fantasy-land/chain"] = i.chain, i["fantasy-land/concat"] = i.concat, i["fantasy-land/empty"] = i.empty, i["fantasy-land/of"] = i.of, i["fantasy-land/map"] = i.map;
|
|
551
|
+
var Z = r(function(e, t) {
|
|
552
|
+
return x(t, T(e, t));
|
|
553
|
+
}), oe = r(function(e, t) {
|
|
554
|
+
return t >= e.length ? S(t, "any character/byte") : x(t + 1, D(e, t));
|
|
555
|
+
}), se = r(function(e, t) {
|
|
556
|
+
return x(e.length, e.slice(t));
|
|
557
|
+
}), Q = r(function(e, t) {
|
|
558
|
+
return t < e.length ? S(t, "EOF") : x(t, null);
|
|
559
|
+
}), ce = U(/[0-9]/).desc("a digit"), le = U(/[0-9]*/).desc("optional digits"), ue = U(/[a-z]/i).desc("a letter"), de = U(/[a-z]*/i).desc("optional letters"), fe = U(/\s*/).desc("optional whitespace"), pe = U(/\s+/).desc("whitespace"), $ = H("\r"), me = H("\n"), he = H("\r\n"), ge = B(he, me, $).desc("newline"), _e = B(ge, Q);
|
|
560
|
+
r.all = se, r.alt = B, r.any = oe, r.cr = $, r.createLanguage = function(e) {
|
|
561
|
+
var t = {};
|
|
562
|
+
for (var n in e) ({}).hasOwnProperty.call(e, n) && function(n) {
|
|
563
|
+
t[n] = Y(function() {
|
|
564
|
+
return e[n](t);
|
|
565
|
+
});
|
|
566
|
+
}(n);
|
|
567
|
+
return t;
|
|
568
|
+
}, r.crlf = he, r.custom = function(e) {
|
|
569
|
+
return r(e(x, S));
|
|
570
|
+
}, r.digit = ce, r.digits = le, r.empty = X, r.end = _e, r.eof = Q, r.fail = G, r.formatError = I, r.index = Z, r.isParser = v, r.lazy = Y, r.letter = ue, r.letters = de, r.lf = me, r.lookahead = K, r.makeFailure = S, r.makeSuccess = x, r.newline = ge, r.noneOf = function(e) {
|
|
571
|
+
return J(function(t) {
|
|
572
|
+
return e.indexOf(t) < 0;
|
|
573
|
+
}).desc("none of '" + e + "'");
|
|
574
|
+
}, r.notFollowedBy = q, r.of = W, r.oneOf = function(e) {
|
|
575
|
+
for (var t = e.split(""), n = 0; n < t.length; n++) t[n] = "'" + t[n] + "'";
|
|
576
|
+
return J(function(t) {
|
|
577
|
+
return e.indexOf(t) >= 0;
|
|
578
|
+
}).desc(t);
|
|
579
|
+
}, r.optWhitespace = fe, r.Parser = r, r.range = function(e, t) {
|
|
580
|
+
return J(function(n) {
|
|
581
|
+
return e <= n && n <= t;
|
|
582
|
+
}).desc(e + "-" + t);
|
|
583
|
+
}, r.regex = U, r.regexp = U, r.sepBy = ae, r.sepBy1 = V, r.seq = R, r.seqMap = z, r.seqObj = function() {
|
|
584
|
+
for (var e, t = {}, n = 0, i = (e = arguments, Array.prototype.slice.call(e)), a = i.length, o = 0; o < a; o += 1) {
|
|
585
|
+
var s = i[o];
|
|
586
|
+
if (!v(s)) {
|
|
587
|
+
if (y(s) && s.length === 2 && typeof s[0] == "string" && v(s[1])) {
|
|
588
|
+
var c = s[0];
|
|
589
|
+
if (Object.prototype.hasOwnProperty.call(t, c)) throw Error("seqObj: duplicate key " + c);
|
|
590
|
+
t[c] = !0, n++;
|
|
591
|
+
continue;
|
|
592
|
+
}
|
|
593
|
+
throw Error("seqObj arguments must be parsers or [string, parser] array pairs.");
|
|
594
|
+
}
|
|
595
|
+
}
|
|
596
|
+
if (n === 0) throw Error("seqObj expects at least one named parser, found zero");
|
|
597
|
+
return r(function(e, t) {
|
|
598
|
+
for (var n, r = {}, o = 0; o < a; o += 1) {
|
|
599
|
+
var s, c;
|
|
600
|
+
if (y(i[o]) ? (s = i[o][0], c = i[o][1]) : (s = null, c = i[o]), !(n = C(c._(e, t), n)).status) return n;
|
|
601
|
+
s && (r[s] = n.value), t = n.index;
|
|
602
|
+
}
|
|
603
|
+
return C(x(t, r), n);
|
|
604
|
+
});
|
|
605
|
+
}, r.string = H, r.succeed = W, r.takeWhile = function(e) {
|
|
606
|
+
return k(e), r(function(t, n) {
|
|
607
|
+
for (var r = n; r < t.length && e(D(t, r));) r++;
|
|
608
|
+
return x(r, t.slice(n, r));
|
|
609
|
+
});
|
|
610
|
+
}, r.test = J, r.whitespace = pe, r["fantasy-land/empty"] = X, r["fantasy-land/of"] = W, r.Binary = {
|
|
611
|
+
bitSeq: d,
|
|
612
|
+
bitSeqObj: function(e) {
|
|
613
|
+
u();
|
|
614
|
+
var t = {}, n = 0, r = s(function(e) {
|
|
615
|
+
if (y(e)) {
|
|
616
|
+
var r = e;
|
|
617
|
+
if (r.length !== 2) throw Error("[" + r.join(", ") + "] should be length 2, got length " + r.length);
|
|
618
|
+
if (A(r[0]), O(r[1]), Object.prototype.hasOwnProperty.call(t, r[0])) throw Error("duplicate key in bitSeqObj: " + r[0]);
|
|
619
|
+
return t[r[0]] = !0, n++, r;
|
|
620
|
+
}
|
|
621
|
+
return O(e), [null, e];
|
|
622
|
+
}, e);
|
|
623
|
+
if (n < 1) throw Error("bitSeqObj expects at least one named pair, got [" + e.join(", ") + "]");
|
|
624
|
+
var i = s(function(e) {
|
|
625
|
+
return e[0];
|
|
626
|
+
}, r);
|
|
627
|
+
return d(s(function(e) {
|
|
628
|
+
return e[1];
|
|
629
|
+
}, r)).map(function(e) {
|
|
630
|
+
return o(function(e, t) {
|
|
631
|
+
return t[0] !== null && (e[t[0]] = t[1]), e;
|
|
632
|
+
}, {}, s(function(t, n) {
|
|
633
|
+
return [t, e[n]];
|
|
634
|
+
}, i));
|
|
635
|
+
});
|
|
636
|
+
},
|
|
637
|
+
byte: function(e) {
|
|
638
|
+
if (u(), O(e), e > 255) throw Error("Value specified to byte constructor (" + e + "=0x" + e.toString(16) + ") is larger in value than a single byte.");
|
|
639
|
+
var t = (e > 15 ? "0x" : "0x0") + e.toString(16);
|
|
640
|
+
return r(function(n, r) {
|
|
641
|
+
var i = D(n, r);
|
|
642
|
+
return i === e ? x(r + 1, i) : S(r, t);
|
|
643
|
+
});
|
|
644
|
+
},
|
|
645
|
+
buffer: function(e) {
|
|
646
|
+
return f("buffer", e).map(function(e) {
|
|
647
|
+
return Buffer.from(e);
|
|
648
|
+
});
|
|
649
|
+
},
|
|
650
|
+
encodedString: function(e, t) {
|
|
651
|
+
return f("string", t).map(function(t) {
|
|
652
|
+
return t.toString(e);
|
|
653
|
+
});
|
|
654
|
+
},
|
|
655
|
+
uintBE: m,
|
|
656
|
+
uint8BE: m(1),
|
|
657
|
+
uint16BE: m(2),
|
|
658
|
+
uint32BE: m(4),
|
|
659
|
+
uintLE: h,
|
|
660
|
+
uint8LE: h(1),
|
|
661
|
+
uint16LE: h(2),
|
|
662
|
+
uint32LE: h(4),
|
|
663
|
+
intBE: g,
|
|
664
|
+
int8BE: g(1),
|
|
665
|
+
int16BE: g(2),
|
|
666
|
+
int32BE: g(4),
|
|
667
|
+
intLE: _,
|
|
668
|
+
int8LE: _(1),
|
|
669
|
+
int16LE: _(2),
|
|
670
|
+
int32LE: _(4),
|
|
671
|
+
floatBE: f("floatBE", 4).map(function(e) {
|
|
672
|
+
return e.readFloatBE(0);
|
|
673
|
+
}),
|
|
674
|
+
floatLE: f("floatLE", 4).map(function(e) {
|
|
675
|
+
return e.readFloatLE(0);
|
|
676
|
+
}),
|
|
677
|
+
doubleBE: f("doubleBE", 8).map(function(e) {
|
|
678
|
+
return e.readDoubleBE(0);
|
|
679
|
+
}),
|
|
680
|
+
doubleLE: f("doubleLE", 8).map(function(e) {
|
|
681
|
+
return e.readDoubleLE(0);
|
|
682
|
+
})
|
|
683
|
+
}, e.exports = r;
|
|
684
|
+
}]);
|
|
685
|
+
});
|
|
686
|
+
}));
|
|
687
|
+
//#endregion
|
|
688
|
+
export default t();
|
|
689
|
+
export { t as require_parsimmon_umd_min };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var e=require("../../_virtual/_rolldown/runtime.cjs").__commonJSMin(((e,t)=>{(function(n,r){typeof require==`function`&&typeof e==`object`&&typeof t==`object`?t.exports=r():typeof define==`function`&&define.amd?define(function(){return r()}):n.pluralize=r()})(e,function(){var e=[],t=[],n={},r={},i={};function a(e){return typeof e==`string`?RegExp(`^`+e+`$`,`i`):e}function o(e,t){return e===t?t:e===e.toLowerCase()?t.toLowerCase():e===e.toUpperCase()?t.toUpperCase():e[0]===e[0].toUpperCase()?t.charAt(0).toUpperCase()+t.substr(1).toLowerCase():t.toLowerCase()}function s(e,t){return e.replace(/\$(\d{1,2})/g,function(e,n){return t[n]||``})}function c(e,t){return e.replace(t[0],function(n,r){var i=s(t[1],arguments);return o(n===``?e[r-1]:n,i)})}function l(e,t,r){if(!e.length||n.hasOwnProperty(e))return t;for(var i=r.length;i--;){var a=r[i];if(a[0].test(t))return c(t,a)}return t}function u(e,t,n){return function(r){var i=r.toLowerCase();return t.hasOwnProperty(i)?o(r,i):e.hasOwnProperty(i)?o(r,e[i]):l(i,r,n)}}function d(e,t,n,r){return function(r){var i=r.toLowerCase();return t.hasOwnProperty(i)?!0:e.hasOwnProperty(i)?!1:l(i,i,n)===i}}function f(e,t,n){var r=t===1?f.singular(e):f.plural(e);return(n?t+` `:``)+r}return f.plural=u(i,r,e),f.isPlural=d(i,r,e),f.singular=u(r,i,t),f.isSingular=d(r,i,t),f.addPluralRule=function(t,n){e.push([a(t),n])},f.addSingularRule=function(e,n){t.push([a(e),n])},f.addUncountableRule=function(e){if(typeof e==`string`){n[e.toLowerCase()]=!0;return}f.addPluralRule(e,`$0`),f.addSingularRule(e,`$0`)},f.addIrregularRule=function(e,t){t=t.toLowerCase(),e=e.toLowerCase(),i[e]=t,r[t]=e},[[`I`,`we`],[`me`,`us`],[`he`,`they`],[`she`,`they`],[`them`,`them`],[`myself`,`ourselves`],[`yourself`,`yourselves`],[`itself`,`themselves`],[`herself`,`themselves`],[`himself`,`themselves`],[`themself`,`themselves`],[`is`,`are`],[`was`,`were`],[`has`,`have`],[`this`,`these`],[`that`,`those`],[`echo`,`echoes`],[`dingo`,`dingoes`],[`volcano`,`volcanoes`],[`tornado`,`tornadoes`],[`torpedo`,`torpedoes`],[`genus`,`genera`],[`viscus`,`viscera`],[`stigma`,`stigmata`],[`stoma`,`stomata`],[`dogma`,`dogmata`],[`lemma`,`lemmata`],[`schema`,`schemata`],[`anathema`,`anathemata`],[`ox`,`oxen`],[`axe`,`axes`],[`die`,`dice`],[`yes`,`yeses`],[`foot`,`feet`],[`eave`,`eaves`],[`goose`,`geese`],[`tooth`,`teeth`],[`quiz`,`quizzes`],[`human`,`humans`],[`proof`,`proofs`],[`carve`,`carves`],[`valve`,`valves`],[`looey`,`looies`],[`thief`,`thieves`],[`groove`,`grooves`],[`pickaxe`,`pickaxes`],[`passerby`,`passersby`]].forEach(function(e){return f.addIrregularRule(e[0],e[1])}),[[/s?$/i,`s`],[/[^\u0000-\u007F]$/i,`$0`],[/([^aeiou]ese)$/i,`$1`],[/(ax|test)is$/i,`$1es`],[/(alias|[^aou]us|t[lm]as|gas|ris)$/i,`$1es`],[/(e[mn]u)s?$/i,`$1s`],[/([^l]ias|[aeiou]las|[ejzr]as|[iu]am)$/i,`$1`],[/(alumn|syllab|vir|radi|nucle|fung|cact|stimul|termin|bacill|foc|uter|loc|strat)(?:us|i)$/i,`$1i`],[/(alumn|alg|vertebr)(?:a|ae)$/i,`$1ae`],[/(seraph|cherub)(?:im)?$/i,`$1im`],[/(her|at|gr)o$/i,`$1oes`],[/(agend|addend|millenni|dat|extrem|bacteri|desiderat|strat|candelabr|errat|ov|symposi|curricul|automat|quor)(?:a|um)$/i,`$1a`],[/(apheli|hyperbat|periheli|asyndet|noumen|phenomen|criteri|organ|prolegomen|hedr|automat)(?:a|on)$/i,`$1a`],[/sis$/i,`ses`],[/(?:(kni|wi|li)fe|(ar|l|ea|eo|oa|hoo)f)$/i,`$1$2ves`],[/([^aeiouy]|qu)y$/i,`$1ies`],[/([^ch][ieo][ln])ey$/i,`$1ies`],[/(x|ch|ss|sh|zz)$/i,`$1es`],[/(matr|cod|mur|sil|vert|ind|append)(?:ix|ex)$/i,`$1ices`],[/\b((?:tit)?m|l)(?:ice|ouse)$/i,`$1ice`],[/(pe)(?:rson|ople)$/i,`$1ople`],[/(child)(?:ren)?$/i,`$1ren`],[/eaux$/i,`$0`],[/m[ae]n$/i,`men`],[`thou`,`you`]].forEach(function(e){return f.addPluralRule(e[0],e[1])}),[[/s$/i,``],[/(ss)$/i,`$1`],[/(wi|kni|(?:after|half|high|low|mid|non|night|[^\w]|^)li)ves$/i,`$1fe`],[/(ar|(?:wo|[ae])l|[eo][ao])ves$/i,`$1f`],[/ies$/i,`y`],[/\b([pl]|zomb|(?:neck|cross)?t|coll|faer|food|gen|goon|group|lass|talk|goal|cut)ies$/i,`$1ie`],[/\b(mon|smil)ies$/i,`$1ey`],[/\b((?:tit)?m|l)ice$/i,`$1ouse`],[/(seraph|cherub)im$/i,`$1`],[/(x|ch|ss|sh|zz|tto|go|cho|alias|[^aou]us|t[lm]as|gas|(?:her|at|gr)o|[aeiou]ris)(?:es)?$/i,`$1`],[/(analy|diagno|parenthe|progno|synop|the|empha|cri|ne)(?:sis|ses)$/i,`$1sis`],[/(movie|twelve|abuse|e[mn]u)s$/i,`$1`],[/(test)(?:is|es)$/i,`$1is`],[/(alumn|syllab|vir|radi|nucle|fung|cact|stimul|termin|bacill|foc|uter|loc|strat)(?:us|i)$/i,`$1us`],[/(agend|addend|millenni|dat|extrem|bacteri|desiderat|strat|candelabr|errat|ov|symposi|curricul|quor)a$/i,`$1um`],[/(apheli|hyperbat|periheli|asyndet|noumen|phenomen|criteri|organ|prolegomen|hedr|automat)a$/i,`$1on`],[/(alumn|alg|vertebr)ae$/i,`$1a`],[/(cod|mur|sil|vert|ind)ices$/i,`$1ex`],[/(matr|append)ices$/i,`$1ix`],[/(pe)(rson|ople)$/i,`$1rson`],[/(child)ren$/i,`$1`],[/(eau)x?$/i,`$1`],[/men$/i,`man`]].forEach(function(e){return f.addSingularRule(e[0],e[1])}),[`adulthood`,`advice`,`agenda`,`aid`,`aircraft`,`alcohol`,`ammo`,`analytics`,`anime`,`athletics`,`audio`,`bison`,`blood`,`bream`,`buffalo`,`butter`,`carp`,`cash`,`chassis`,`chess`,`clothing`,`cod`,`commerce`,`cooperation`,`corps`,`debris`,`diabetes`,`digestion`,`elk`,`energy`,`equipment`,`excretion`,`expertise`,`firmware`,`flounder`,`fun`,`gallows`,`garbage`,`graffiti`,`hardware`,`headquarters`,`health`,`herpes`,`highjinks`,`homework`,`housework`,`information`,`jeans`,`justice`,`kudos`,`labour`,`literature`,`machinery`,`mackerel`,`mail`,`media`,`mews`,`moose`,`music`,`mud`,`manga`,`news`,`only`,`personnel`,`pike`,`plankton`,`pliers`,`police`,`pollution`,`premises`,`rain`,`research`,`rice`,`salmon`,`scissors`,`series`,`sewage`,`shambles`,`shrimp`,`software`,`species`,`staff`,`swine`,`tennis`,`traffic`,`transportation`,`trout`,`tuna`,`wealth`,`welfare`,`whiting`,`wildebeest`,`wildlife`,`you`,/pok[eé]mon$/i,/[^aeiou]ese$/i,/deer$/i,/fish$/i,/measles$/i,/o[iu]s$/i,/pox$/i,/sheep$/i].forEach(f.addUncountableRule),f})}));Object.defineProperty(exports,"default",{enumerable:!0,get:function(){return e()}});
|