react-intl 6.3.2 → 6.4.0

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.
@@ -28,454 +28,18 @@ var ReactIntl = (() => {
28
28
  return to;
29
29
  };
30
30
  var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
31
+ // If the importer is in node compatibility mode or this is not an ESM
32
+ // file that has been converted to a CommonJS file using a Babel-
33
+ // compatible transform (i.e. "__esModule" has not been set), then set
34
+ // "default" to the CommonJS "module.exports" for node compatibility.
31
35
  isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
32
36
  mod
33
37
  ));
34
38
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
35
39
 
36
- // ../../../../../../../../execroot/formatjs/bazel-out/darwin_arm64-fastbuild/bin/node_modules/.aspect_rules_js/tslib@2.4.0/node_modules/tslib/tslib.js
37
- var require_tslib = __commonJS({
38
- "../../../../../../../../execroot/formatjs/bazel-out/darwin_arm64-fastbuild/bin/node_modules/.aspect_rules_js/tslib@2.4.0/node_modules/tslib/tslib.js"(exports, module) {
39
- var __extends2;
40
- var __assign2;
41
- var __rest2;
42
- var __decorate2;
43
- var __param2;
44
- var __metadata2;
45
- var __awaiter2;
46
- var __generator2;
47
- var __exportStar2;
48
- var __values2;
49
- var __read2;
50
- var __spread2;
51
- var __spreadArrays2;
52
- var __spreadArray2;
53
- var __await2;
54
- var __asyncGenerator2;
55
- var __asyncDelegator2;
56
- var __asyncValues2;
57
- var __makeTemplateObject2;
58
- var __importStar2;
59
- var __importDefault2;
60
- var __classPrivateFieldGet2;
61
- var __classPrivateFieldSet2;
62
- var __classPrivateFieldIn2;
63
- var __createBinding2;
64
- (function(factory) {
65
- var root = typeof global === "object" ? global : typeof self === "object" ? self : typeof this === "object" ? this : {};
66
- if (typeof define === "function" && define.amd) {
67
- define("tslib", ["exports"], function(exports2) {
68
- factory(createExporter(root, createExporter(exports2)));
69
- });
70
- } else if (typeof module === "object" && typeof module.exports === "object") {
71
- factory(createExporter(root, createExporter(module.exports)));
72
- } else {
73
- factory(createExporter(root));
74
- }
75
- function createExporter(exports2, previous) {
76
- if (exports2 !== root) {
77
- if (typeof Object.create === "function") {
78
- Object.defineProperty(exports2, "__esModule", { value: true });
79
- } else {
80
- exports2.__esModule = true;
81
- }
82
- }
83
- return function(id, v) {
84
- return exports2[id] = previous ? previous(id, v) : v;
85
- };
86
- }
87
- })(function(exporter) {
88
- var extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d, b) {
89
- d.__proto__ = b;
90
- } || function(d, b) {
91
- for (var p in b)
92
- if (Object.prototype.hasOwnProperty.call(b, p))
93
- d[p] = b[p];
94
- };
95
- __extends2 = function(d, b) {
96
- if (typeof b !== "function" && b !== null)
97
- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
98
- extendStatics(d, b);
99
- function __() {
100
- this.constructor = d;
101
- }
102
- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
103
- };
104
- __assign2 = Object.assign || function(t) {
105
- for (var s, i = 1, n = arguments.length; i < n; i++) {
106
- s = arguments[i];
107
- for (var p in s)
108
- if (Object.prototype.hasOwnProperty.call(s, p))
109
- t[p] = s[p];
110
- }
111
- return t;
112
- };
113
- __rest2 = function(s, e) {
114
- var t = {};
115
- for (var p in s)
116
- if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
117
- t[p] = s[p];
118
- if (s != null && typeof Object.getOwnPropertySymbols === "function")
119
- for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
120
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
121
- t[p[i]] = s[p[i]];
122
- }
123
- return t;
124
- };
125
- __decorate2 = function(decorators, target, key, desc) {
126
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
127
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
128
- r = Reflect.decorate(decorators, target, key, desc);
129
- else
130
- for (var i = decorators.length - 1; i >= 0; i--)
131
- if (d = decorators[i])
132
- r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
133
- return c > 3 && r && Object.defineProperty(target, key, r), r;
134
- };
135
- __param2 = function(paramIndex, decorator) {
136
- return function(target, key) {
137
- decorator(target, key, paramIndex);
138
- };
139
- };
140
- __metadata2 = function(metadataKey, metadataValue) {
141
- if (typeof Reflect === "object" && typeof Reflect.metadata === "function")
142
- return Reflect.metadata(metadataKey, metadataValue);
143
- };
144
- __awaiter2 = function(thisArg, _arguments, P, generator) {
145
- function adopt(value) {
146
- return value instanceof P ? value : new P(function(resolve) {
147
- resolve(value);
148
- });
149
- }
150
- return new (P || (P = Promise))(function(resolve, reject) {
151
- function fulfilled(value) {
152
- try {
153
- step(generator.next(value));
154
- } catch (e) {
155
- reject(e);
156
- }
157
- }
158
- function rejected(value) {
159
- try {
160
- step(generator["throw"](value));
161
- } catch (e) {
162
- reject(e);
163
- }
164
- }
165
- function step(result) {
166
- result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
167
- }
168
- step((generator = generator.apply(thisArg, _arguments || [])).next());
169
- });
170
- };
171
- __generator2 = function(thisArg, body) {
172
- var _ = { label: 0, sent: function() {
173
- if (t[0] & 1)
174
- throw t[1];
175
- return t[1];
176
- }, trys: [], ops: [] }, f, y, t, g;
177
- return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() {
178
- return this;
179
- }), g;
180
- function verb(n) {
181
- return function(v) {
182
- return step([n, v]);
183
- };
184
- }
185
- function step(op) {
186
- if (f)
187
- throw new TypeError("Generator is already executing.");
188
- while (_)
189
- try {
190
- if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done)
191
- return t;
192
- if (y = 0, t)
193
- op = [op[0] & 2, t.value];
194
- switch (op[0]) {
195
- case 0:
196
- case 1:
197
- t = op;
198
- break;
199
- case 4:
200
- _.label++;
201
- return { value: op[1], done: false };
202
- case 5:
203
- _.label++;
204
- y = op[1];
205
- op = [0];
206
- continue;
207
- case 7:
208
- op = _.ops.pop();
209
- _.trys.pop();
210
- continue;
211
- default:
212
- if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
213
- _ = 0;
214
- continue;
215
- }
216
- if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) {
217
- _.label = op[1];
218
- break;
219
- }
220
- if (op[0] === 6 && _.label < t[1]) {
221
- _.label = t[1];
222
- t = op;
223
- break;
224
- }
225
- if (t && _.label < t[2]) {
226
- _.label = t[2];
227
- _.ops.push(op);
228
- break;
229
- }
230
- if (t[2])
231
- _.ops.pop();
232
- _.trys.pop();
233
- continue;
234
- }
235
- op = body.call(thisArg, _);
236
- } catch (e) {
237
- op = [6, e];
238
- y = 0;
239
- } finally {
240
- f = t = 0;
241
- }
242
- if (op[0] & 5)
243
- throw op[1];
244
- return { value: op[0] ? op[1] : void 0, done: true };
245
- }
246
- };
247
- __exportStar2 = function(m, o) {
248
- for (var p in m)
249
- if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p))
250
- __createBinding2(o, m, p);
251
- };
252
- __createBinding2 = Object.create ? function(o, m, k, k2) {
253
- if (k2 === void 0)
254
- k2 = k;
255
- var desc = Object.getOwnPropertyDescriptor(m, k);
256
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
257
- desc = { enumerable: true, get: function() {
258
- return m[k];
259
- } };
260
- }
261
- Object.defineProperty(o, k2, desc);
262
- } : function(o, m, k, k2) {
263
- if (k2 === void 0)
264
- k2 = k;
265
- o[k2] = m[k];
266
- };
267
- __values2 = function(o) {
268
- var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
269
- if (m)
270
- return m.call(o);
271
- if (o && typeof o.length === "number")
272
- return {
273
- next: function() {
274
- if (o && i >= o.length)
275
- o = void 0;
276
- return { value: o && o[i++], done: !o };
277
- }
278
- };
279
- throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
280
- };
281
- __read2 = function(o, n) {
282
- var m = typeof Symbol === "function" && o[Symbol.iterator];
283
- if (!m)
284
- return o;
285
- var i = m.call(o), r, ar = [], e;
286
- try {
287
- while ((n === void 0 || n-- > 0) && !(r = i.next()).done)
288
- ar.push(r.value);
289
- } catch (error) {
290
- e = { error };
291
- } finally {
292
- try {
293
- if (r && !r.done && (m = i["return"]))
294
- m.call(i);
295
- } finally {
296
- if (e)
297
- throw e.error;
298
- }
299
- }
300
- return ar;
301
- };
302
- __spread2 = function() {
303
- for (var ar = [], i = 0; i < arguments.length; i++)
304
- ar = ar.concat(__read2(arguments[i]));
305
- return ar;
306
- };
307
- __spreadArrays2 = function() {
308
- for (var s = 0, i = 0, il = arguments.length; i < il; i++)
309
- s += arguments[i].length;
310
- for (var r = Array(s), k = 0, i = 0; i < il; i++)
311
- for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
312
- r[k] = a[j];
313
- return r;
314
- };
315
- __spreadArray2 = function(to, from, pack) {
316
- if (pack || arguments.length === 2)
317
- for (var i = 0, l = from.length, ar; i < l; i++) {
318
- if (ar || !(i in from)) {
319
- if (!ar)
320
- ar = Array.prototype.slice.call(from, 0, i);
321
- ar[i] = from[i];
322
- }
323
- }
324
- return to.concat(ar || Array.prototype.slice.call(from));
325
- };
326
- __await2 = function(v) {
327
- return this instanceof __await2 ? (this.v = v, this) : new __await2(v);
328
- };
329
- __asyncGenerator2 = function(thisArg, _arguments, generator) {
330
- if (!Symbol.asyncIterator)
331
- throw new TypeError("Symbol.asyncIterator is not defined.");
332
- var g = generator.apply(thisArg, _arguments || []), i, q = [];
333
- return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function() {
334
- return this;
335
- }, i;
336
- function verb(n) {
337
- if (g[n])
338
- i[n] = function(v) {
339
- return new Promise(function(a, b) {
340
- q.push([n, v, a, b]) > 1 || resume(n, v);
341
- });
342
- };
343
- }
344
- function resume(n, v) {
345
- try {
346
- step(g[n](v));
347
- } catch (e) {
348
- settle(q[0][3], e);
349
- }
350
- }
351
- function step(r) {
352
- r.value instanceof __await2 ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r);
353
- }
354
- function fulfill(value) {
355
- resume("next", value);
356
- }
357
- function reject(value) {
358
- resume("throw", value);
359
- }
360
- function settle(f, v) {
361
- if (f(v), q.shift(), q.length)
362
- resume(q[0][0], q[0][1]);
363
- }
364
- };
365
- __asyncDelegator2 = function(o) {
366
- var i, p;
367
- return i = {}, verb("next"), verb("throw", function(e) {
368
- throw e;
369
- }), verb("return"), i[Symbol.iterator] = function() {
370
- return this;
371
- }, i;
372
- function verb(n, f) {
373
- i[n] = o[n] ? function(v) {
374
- return (p = !p) ? { value: __await2(o[n](v)), done: n === "return" } : f ? f(v) : v;
375
- } : f;
376
- }
377
- };
378
- __asyncValues2 = function(o) {
379
- if (!Symbol.asyncIterator)
380
- throw new TypeError("Symbol.asyncIterator is not defined.");
381
- var m = o[Symbol.asyncIterator], i;
382
- return m ? m.call(o) : (o = typeof __values2 === "function" ? __values2(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function() {
383
- return this;
384
- }, i);
385
- function verb(n) {
386
- i[n] = o[n] && function(v) {
387
- return new Promise(function(resolve, reject) {
388
- v = o[n](v), settle(resolve, reject, v.done, v.value);
389
- });
390
- };
391
- }
392
- function settle(resolve, reject, d, v) {
393
- Promise.resolve(v).then(function(v2) {
394
- resolve({ value: v2, done: d });
395
- }, reject);
396
- }
397
- };
398
- __makeTemplateObject2 = function(cooked, raw) {
399
- if (Object.defineProperty) {
400
- Object.defineProperty(cooked, "raw", { value: raw });
401
- } else {
402
- cooked.raw = raw;
403
- }
404
- return cooked;
405
- };
406
- var __setModuleDefault = Object.create ? function(o, v) {
407
- Object.defineProperty(o, "default", { enumerable: true, value: v });
408
- } : function(o, v) {
409
- o["default"] = v;
410
- };
411
- __importStar2 = function(mod) {
412
- if (mod && mod.__esModule)
413
- return mod;
414
- var result = {};
415
- if (mod != null) {
416
- for (var k in mod)
417
- if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k))
418
- __createBinding2(result, mod, k);
419
- }
420
- __setModuleDefault(result, mod);
421
- return result;
422
- };
423
- __importDefault2 = function(mod) {
424
- return mod && mod.__esModule ? mod : { "default": mod };
425
- };
426
- __classPrivateFieldGet2 = function(receiver, state, kind, f) {
427
- if (kind === "a" && !f)
428
- throw new TypeError("Private accessor was defined without a getter");
429
- if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
430
- throw new TypeError("Cannot read private member from an object whose class did not declare it");
431
- return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
432
- };
433
- __classPrivateFieldSet2 = function(receiver, state, value, kind, f) {
434
- if (kind === "m")
435
- throw new TypeError("Private method is not writable");
436
- if (kind === "a" && !f)
437
- throw new TypeError("Private accessor was defined without a setter");
438
- if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
439
- throw new TypeError("Cannot write private member to an object whose class did not declare it");
440
- return kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value), value;
441
- };
442
- __classPrivateFieldIn2 = function(state, receiver) {
443
- if (receiver === null || typeof receiver !== "object" && typeof receiver !== "function")
444
- throw new TypeError("Cannot use 'in' operator on non-object");
445
- return typeof state === "function" ? receiver === state : state.has(receiver);
446
- };
447
- exporter("__extends", __extends2);
448
- exporter("__assign", __assign2);
449
- exporter("__rest", __rest2);
450
- exporter("__decorate", __decorate2);
451
- exporter("__param", __param2);
452
- exporter("__metadata", __metadata2);
453
- exporter("__awaiter", __awaiter2);
454
- exporter("__generator", __generator2);
455
- exporter("__exportStar", __exportStar2);
456
- exporter("__createBinding", __createBinding2);
457
- exporter("__values", __values2);
458
- exporter("__read", __read2);
459
- exporter("__spread", __spread2);
460
- exporter("__spreadArrays", __spreadArrays2);
461
- exporter("__spreadArray", __spreadArray2);
462
- exporter("__await", __await2);
463
- exporter("__asyncGenerator", __asyncGenerator2);
464
- exporter("__asyncDelegator", __asyncDelegator2);
465
- exporter("__asyncValues", __asyncValues2);
466
- exporter("__makeTemplateObject", __makeTemplateObject2);
467
- exporter("__importStar", __importStar2);
468
- exporter("__importDefault", __importDefault2);
469
- exporter("__classPrivateFieldGet", __classPrivateFieldGet2);
470
- exporter("__classPrivateFieldSet", __classPrivateFieldSet2);
471
- exporter("__classPrivateFieldIn", __classPrivateFieldIn2);
472
- });
473
- }
474
- });
475
-
476
- // ../../../../../../../../execroot/formatjs/bazel-out/darwin_arm64-fastbuild/bin/node_modules/.aspect_rules_js/react-is@16.13.1/node_modules/react-is/cjs/react-is.development.js
40
+ // ../../../../../../../../execroot/formatjs/bazel-out/darwin-fastbuild/bin/node_modules/.aspect_rules_js/react-is@16.13.1/node_modules/react-is/cjs/react-is.development.js
477
41
  var require_react_is_development = __commonJS({
478
- "../../../../../../../../execroot/formatjs/bazel-out/darwin_arm64-fastbuild/bin/node_modules/.aspect_rules_js/react-is@16.13.1/node_modules/react-is/cjs/react-is.development.js"(exports) {
42
+ "../../../../../../../../execroot/formatjs/bazel-out/darwin-fastbuild/bin/node_modules/.aspect_rules_js/react-is@16.13.1/node_modules/react-is/cjs/react-is.development.js"(exports) {
479
43
  "use strict";
480
44
  if (true) {
481
45
  (function() {
@@ -500,7 +64,8 @@ var ReactIntl = (() => {
500
64
  var REACT_RESPONDER_TYPE = hasSymbol ? Symbol.for("react.responder") : 60118;
501
65
  var REACT_SCOPE_TYPE = hasSymbol ? Symbol.for("react.scope") : 60119;
502
66
  function isValidElementType(type) {
503
- return typeof type === "string" || typeof type === "function" || type === REACT_FRAGMENT_TYPE || type === REACT_CONCURRENT_MODE_TYPE || type === REACT_PROFILER_TYPE || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || type === REACT_SUSPENSE_LIST_TYPE || typeof type === "object" && type !== null && (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE || type.$$typeof === REACT_FUNDAMENTAL_TYPE || type.$$typeof === REACT_RESPONDER_TYPE || type.$$typeof === REACT_SCOPE_TYPE || type.$$typeof === REACT_BLOCK_TYPE);
67
+ return typeof type === "string" || typeof type === "function" || // Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill.
68
+ type === REACT_FRAGMENT_TYPE || type === REACT_CONCURRENT_MODE_TYPE || type === REACT_PROFILER_TYPE || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || type === REACT_SUSPENSE_LIST_TYPE || typeof type === "object" && type !== null && (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE || type.$$typeof === REACT_FUNDAMENTAL_TYPE || type.$$typeof === REACT_RESPONDER_TYPE || type.$$typeof === REACT_SCOPE_TYPE || type.$$typeof === REACT_BLOCK_TYPE);
504
69
  }
505
70
  function typeOf(object) {
506
71
  if (typeof object === "object" && object !== null) {
@@ -627,9 +192,9 @@ var ReactIntl = (() => {
627
192
  }
628
193
  });
629
194
 
630
- // ../../../../../../../../execroot/formatjs/bazel-out/darwin_arm64-fastbuild/bin/node_modules/.aspect_rules_js/react-is@16.13.1/node_modules/react-is/index.js
195
+ // ../../../../../../../../execroot/formatjs/bazel-out/darwin-fastbuild/bin/node_modules/.aspect_rules_js/react-is@16.13.1/node_modules/react-is/index.js
631
196
  var require_react_is = __commonJS({
632
- "../../../../../../../../execroot/formatjs/bazel-out/darwin_arm64-fastbuild/bin/node_modules/.aspect_rules_js/react-is@16.13.1/node_modules/react-is/index.js"(exports, module) {
197
+ "../../../../../../../../execroot/formatjs/bazel-out/darwin-fastbuild/bin/node_modules/.aspect_rules_js/react-is@16.13.1/node_modules/react-is/index.js"(exports, module) {
633
198
  "use strict";
634
199
  if (false) {
635
200
  module.exports = null;
@@ -639,9 +204,9 @@ var ReactIntl = (() => {
639
204
  }
640
205
  });
641
206
 
642
- // ../../../../../../../../execroot/formatjs/bazel-out/darwin_arm64-fastbuild/bin/node_modules/.aspect_rules_js/hoist-non-react-statics@3.3.2/node_modules/hoist-non-react-statics/dist/hoist-non-react-statics.cjs.js
207
+ // ../../../../../../../../execroot/formatjs/bazel-out/darwin-fastbuild/bin/node_modules/.aspect_rules_js/hoist-non-react-statics@3.3.2/node_modules/hoist-non-react-statics/dist/hoist-non-react-statics.cjs.js
643
208
  var require_hoist_non_react_statics_cjs = __commonJS({
644
- "../../../../../../../../execroot/formatjs/bazel-out/darwin_arm64-fastbuild/bin/node_modules/.aspect_rules_js/hoist-non-react-statics@3.3.2/node_modules/hoist-non-react-statics/dist/hoist-non-react-statics.cjs.js"(exports, module) {
209
+ "../../../../../../../../execroot/formatjs/bazel-out/darwin-fastbuild/bin/node_modules/.aspect_rules_js/hoist-non-react-statics@3.3.2/node_modules/hoist-non-react-statics/dist/hoist-non-react-statics.cjs.js"(exports, module) {
645
210
  "use strict";
646
211
  var reactIs = require_react_is();
647
212
  var REACT_STATICS = {
@@ -727,7 +292,7 @@ var ReactIntl = (() => {
727
292
  }
728
293
  });
729
294
 
730
- // ../../../../../../../../execroot/formatjs/bazel-out/darwin_arm64-fastbuild/bin/packages/react-intl/lib/index.js
295
+ // ../../../../../../../../execroot/formatjs/bazel-out/darwin-fastbuild/bin/packages/react-intl/lib/index.js
731
296
  var lib_exports = {};
732
297
  __export(lib_exports, {
733
298
  FormattedDate: () => FormattedDate,
@@ -761,57 +326,83 @@ var ReactIntl = (() => {
761
326
  useIntl: () => useIntl
762
327
  });
763
328
 
764
- // ../../../../../../../../execroot/formatjs/bazel-out/darwin_arm64-fastbuild/bin/node_modules/.aspect_rules_js/tslib@2.4.0/node_modules/tslib/modules/index.js
765
- var import_tslib = __toESM(require_tslib(), 1);
766
- var {
767
- __extends,
768
- __assign,
769
- __rest,
770
- __decorate,
771
- __param,
772
- __metadata,
773
- __awaiter,
774
- __generator,
775
- __exportStar,
776
- __createBinding,
777
- __values,
778
- __read,
779
- __spread,
780
- __spreadArrays,
781
- __spreadArray,
782
- __await,
783
- __asyncGenerator,
784
- __asyncDelegator,
785
- __asyncValues,
786
- __makeTemplateObject,
787
- __importStar,
788
- __importDefault,
789
- __classPrivateFieldGet,
790
- __classPrivateFieldSet,
791
- __classPrivateFieldIn
792
- } = import_tslib.default;
329
+ // ../../../../../../../../execroot/formatjs/bazel-out/darwin-fastbuild/bin/node_modules/.aspect_rules_js/tslib@2.4.0/node_modules/tslib/tslib.es6.js
330
+ var extendStatics = function(d, b) {
331
+ extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d2, b2) {
332
+ d2.__proto__ = b2;
333
+ } || function(d2, b2) {
334
+ for (var p in b2)
335
+ if (Object.prototype.hasOwnProperty.call(b2, p))
336
+ d2[p] = b2[p];
337
+ };
338
+ return extendStatics(d, b);
339
+ };
340
+ function __extends(d, b) {
341
+ if (typeof b !== "function" && b !== null)
342
+ throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
343
+ extendStatics(d, b);
344
+ function __() {
345
+ this.constructor = d;
346
+ }
347
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
348
+ }
349
+ var __assign = function() {
350
+ __assign = Object.assign || function __assign2(t) {
351
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
352
+ s = arguments[i];
353
+ for (var p in s)
354
+ if (Object.prototype.hasOwnProperty.call(s, p))
355
+ t[p] = s[p];
356
+ }
357
+ return t;
358
+ };
359
+ return __assign.apply(this, arguments);
360
+ };
361
+ function __rest(s, e) {
362
+ var t = {};
363
+ for (var p in s)
364
+ if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
365
+ t[p] = s[p];
366
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
367
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
368
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
369
+ t[p[i]] = s[p[i]];
370
+ }
371
+ return t;
372
+ }
373
+ function __spreadArray(to, from, pack) {
374
+ if (pack || arguments.length === 2)
375
+ for (var i = 0, l = from.length, ar; i < l; i++) {
376
+ if (ar || !(i in from)) {
377
+ if (!ar)
378
+ ar = Array.prototype.slice.call(from, 0, i);
379
+ ar[i] = from[i];
380
+ }
381
+ }
382
+ return to.concat(ar || Array.prototype.slice.call(from));
383
+ }
793
384
 
794
- // ../../../../../../../../execroot/formatjs/bazel-out/darwin_arm64-fastbuild/bin/packages/react-intl/lib/src/components/createFormattedComponent.js
385
+ // ../../../../../../../../execroot/formatjs/bazel-out/darwin-fastbuild/bin/packages/react-intl/lib/src/components/createFormattedComponent.js
795
386
  var React4 = __toESM(window.React);
796
387
 
797
- // ../../../../../../../../execroot/formatjs/bazel-out/darwin_arm64-fastbuild/bin/packages/react-intl/lib/src/components/useIntl.js
388
+ // ../../../../../../../../execroot/formatjs/bazel-out/darwin-fastbuild/bin/packages/react-intl/lib/src/components/useIntl.js
798
389
  var React3 = __toESM(window.React);
799
390
 
800
- // ../../../../../../../../execroot/formatjs/bazel-out/darwin_arm64-fastbuild/bin/packages/react-intl/lib/src/components/injectIntl.js
391
+ // ../../../../../../../../execroot/formatjs/bazel-out/darwin-fastbuild/bin/packages/react-intl/lib/src/components/injectIntl.js
801
392
  var React2 = __toESM(window.React);
802
393
  var import_hoist_non_react_statics = __toESM(require_hoist_non_react_statics_cjs());
803
394
 
804
- // ../../../../../../../../execroot/formatjs/bazel-out/darwin_arm64-fastbuild/bin/packages/react-intl/lib/src/utils.js
395
+ // ../../../../../../../../execroot/formatjs/bazel-out/darwin-fastbuild/bin/packages/react-intl/lib/src/utils.js
805
396
  var React = __toESM(window.React);
806
397
 
807
- // ../../../../../../../../execroot/formatjs/bazel-out/darwin_arm64-fastbuild/bin/node_modules/.aspect_rules_js/@formatjs+ecma402-abstract@0.0.0/node_modules/@formatjs/ecma402-abstract/lib/262.js
398
+ // ../../../../../../../../execroot/formatjs/bazel-out/darwin-fastbuild/bin/node_modules/.aspect_rules_js/@formatjs+ecma402-abstract@0.0.0/node_modules/@formatjs/ecma402-abstract/lib/262.js
808
399
  var MINUTES_PER_HOUR = 60;
809
400
  var SECONDS_PER_MINUTE = 60;
810
401
  var MS_PER_SECOND = 1e3;
811
402
  var MS_PER_MINUTE = MS_PER_SECOND * SECONDS_PER_MINUTE;
812
403
  var MS_PER_HOUR = MS_PER_MINUTE * MINUTES_PER_HOUR;
813
404
 
814
- // ../../../../../../../../execroot/formatjs/bazel-out/darwin_arm64-fastbuild/bin/node_modules/.aspect_rules_js/@formatjs+ecma402-abstract@0.0.0/node_modules/@formatjs/ecma402-abstract/lib/IsSanctionedSimpleUnitIdentifier.js
405
+ // ../../../../../../../../execroot/formatjs/bazel-out/darwin-fastbuild/bin/node_modules/.aspect_rules_js/@formatjs+ecma402-abstract@0.0.0/node_modules/@formatjs/ecma402-abstract/lib/IsSanctionedSimpleUnitIdentifier.js
815
406
  var SANCTIONED_UNITS = [
816
407
  "angle-degree",
817
408
  "area-acre",
@@ -862,7 +453,7 @@ var ReactIntl = (() => {
862
453
  }
863
454
  var SIMPLE_UNITS = SANCTIONED_UNITS.map(removeUnitNamespace);
864
455
 
865
- // ../../../../../../../../execroot/formatjs/bazel-out/darwin_arm64-fastbuild/bin/node_modules/.aspect_rules_js/@formatjs+ecma402-abstract@0.0.0/node_modules/@formatjs/ecma402-abstract/lib/utils.js
456
+ // ../../../../../../../../execroot/formatjs/bazel-out/darwin-fastbuild/bin/node_modules/.aspect_rules_js/@formatjs+ecma402-abstract@0.0.0/node_modules/@formatjs/ecma402-abstract/lib/utils.js
866
457
  function invariant(condition, message, Err) {
867
458
  if (Err === void 0) {
868
459
  Err = Error;
@@ -872,25 +463,28 @@ var ReactIntl = (() => {
872
463
  }
873
464
  }
874
465
 
875
- // ../../../../../../../../execroot/formatjs/bazel-out/darwin_arm64-fastbuild/bin/node_modules/.aspect_rules_js/@formatjs+ecma402-abstract@0.0.0/node_modules/@formatjs/ecma402-abstract/lib/regex.generated.js
466
+ // ../../../../../../../../execroot/formatjs/bazel-out/darwin-fastbuild/bin/node_modules/.aspect_rules_js/@formatjs+ecma402-abstract@0.0.0/node_modules/@formatjs/ecma402-abstract/lib/regex.generated.js
876
467
  var S_UNICODE_REGEX = /[\$\+<->\^`\|~\xA2-\xA6\xA8\xA9\xAC\xAE-\xB1\xB4\xB8\xD7\xF7\u02C2-\u02C5\u02D2-\u02DF\u02E5-\u02EB\u02ED\u02EF-\u02FF\u0375\u0384\u0385\u03F6\u0482\u058D-\u058F\u0606-\u0608\u060B\u060E\u060F\u06DE\u06E9\u06FD\u06FE\u07F6\u07FE\u07FF\u09F2\u09F3\u09FA\u09FB\u0AF1\u0B70\u0BF3-\u0BFA\u0C7F\u0D4F\u0D79\u0E3F\u0F01-\u0F03\u0F13\u0F15-\u0F17\u0F1A-\u0F1F\u0F34\u0F36\u0F38\u0FBE-\u0FC5\u0FC7-\u0FCC\u0FCE\u0FCF\u0FD5-\u0FD8\u109E\u109F\u1390-\u1399\u166D\u17DB\u1940\u19DE-\u19FF\u1B61-\u1B6A\u1B74-\u1B7C\u1FBD\u1FBF-\u1FC1\u1FCD-\u1FCF\u1FDD-\u1FDF\u1FED-\u1FEF\u1FFD\u1FFE\u2044\u2052\u207A-\u207C\u208A-\u208C\u20A0-\u20BF\u2100\u2101\u2103-\u2106\u2108\u2109\u2114\u2116-\u2118\u211E-\u2123\u2125\u2127\u2129\u212E\u213A\u213B\u2140-\u2144\u214A-\u214D\u214F\u218A\u218B\u2190-\u2307\u230C-\u2328\u232B-\u2426\u2440-\u244A\u249C-\u24E9\u2500-\u2767\u2794-\u27C4\u27C7-\u27E5\u27F0-\u2982\u2999-\u29D7\u29DC-\u29FB\u29FE-\u2B73\u2B76-\u2B95\u2B97-\u2BFF\u2CE5-\u2CEA\u2E50\u2E51\u2E80-\u2E99\u2E9B-\u2EF3\u2F00-\u2FD5\u2FF0-\u2FFB\u3004\u3012\u3013\u3020\u3036\u3037\u303E\u303F\u309B\u309C\u3190\u3191\u3196-\u319F\u31C0-\u31E3\u3200-\u321E\u322A-\u3247\u3250\u3260-\u327F\u328A-\u32B0\u32C0-\u33FF\u4DC0-\u4DFF\uA490-\uA4C6\uA700-\uA716\uA720\uA721\uA789\uA78A\uA828-\uA82B\uA836-\uA839\uAA77-\uAA79\uAB5B\uAB6A\uAB6B\uFB29\uFBB2-\uFBC1\uFDFC\uFDFD\uFE62\uFE64-\uFE66\uFE69\uFF04\uFF0B\uFF1C-\uFF1E\uFF3E\uFF40\uFF5C\uFF5E\uFFE0-\uFFE6\uFFE8-\uFFEE\uFFFC\uFFFD]|\uD800[\uDD37-\uDD3F\uDD79-\uDD89\uDD8C-\uDD8E\uDD90-\uDD9C\uDDA0\uDDD0-\uDDFC]|\uD802[\uDC77\uDC78\uDEC8]|\uD805\uDF3F|\uD807[\uDFD5-\uDFF1]|\uD81A[\uDF3C-\uDF3F\uDF45]|\uD82F\uDC9C|\uD834[\uDC00-\uDCF5\uDD00-\uDD26\uDD29-\uDD64\uDD6A-\uDD6C\uDD83\uDD84\uDD8C-\uDDA9\uDDAE-\uDDE8\uDE00-\uDE41\uDE45\uDF00-\uDF56]|\uD835[\uDEC1\uDEDB\uDEFB\uDF15\uDF35\uDF4F\uDF6F\uDF89\uDFA9\uDFC3]|\uD836[\uDC00-\uDDFF\uDE37-\uDE3A\uDE6D-\uDE74\uDE76-\uDE83\uDE85\uDE86]|\uD838[\uDD4F\uDEFF]|\uD83B[\uDCAC\uDCB0\uDD2E\uDEF0\uDEF1]|\uD83C[\uDC00-\uDC2B\uDC30-\uDC93\uDCA0-\uDCAE\uDCB1-\uDCBF\uDCC1-\uDCCF\uDCD1-\uDCF5\uDD0D-\uDDAD\uDDE6-\uDE02\uDE10-\uDE3B\uDE40-\uDE48\uDE50\uDE51\uDE60-\uDE65\uDF00-\uDFFF]|\uD83D[\uDC00-\uDED7\uDEE0-\uDEEC\uDEF0-\uDEFC\uDF00-\uDF73\uDF80-\uDFD8\uDFE0-\uDFEB]|\uD83E[\uDC00-\uDC0B\uDC10-\uDC47\uDC50-\uDC59\uDC60-\uDC87\uDC90-\uDCAD\uDCB0\uDCB1\uDD00-\uDD78\uDD7A-\uDDCB\uDDCD-\uDE53\uDE60-\uDE6D\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6\uDF00-\uDF92\uDF94-\uDFCA]/;
877
468
 
878
- // ../../../../../../../../execroot/formatjs/bazel-out/darwin_arm64-fastbuild/bin/node_modules/.aspect_rules_js/@formatjs+ecma402-abstract@0.0.0/node_modules/@formatjs/ecma402-abstract/lib/NumberFormat/format_to_parts.js
469
+ // ../../../../../../../../execroot/formatjs/bazel-out/darwin-fastbuild/bin/node_modules/.aspect_rules_js/@formatjs+ecma402-abstract@0.0.0/node_modules/@formatjs/ecma402-abstract/lib/NumberFormat/format_to_parts.js
879
470
  var CARET_S_UNICODE_REGEX = new RegExp("^".concat(S_UNICODE_REGEX.source));
880
471
  var S_DOLLAR_UNICODE_REGEX = new RegExp("".concat(S_UNICODE_REGEX.source, "$"));
881
472
 
882
- // ../../../../../../../../execroot/formatjs/bazel-out/darwin_arm64-fastbuild/bin/node_modules/.aspect_rules_js/@formatjs+ecma402-abstract@0.0.0/node_modules/@formatjs/ecma402-abstract/lib/data.js
883
- var MissingLocaleDataError = function(_super) {
884
- __extends(MissingLocaleDataError2, _super);
885
- function MissingLocaleDataError2() {
886
- var _this = _super !== null && _super.apply(this, arguments) || this;
887
- _this.type = "MISSING_LOCALE_DATA";
888
- return _this;
889
- }
890
- return MissingLocaleDataError2;
891
- }(Error);
473
+ // ../../../../../../../../execroot/formatjs/bazel-out/darwin-fastbuild/bin/node_modules/.aspect_rules_js/@formatjs+ecma402-abstract@0.0.0/node_modules/@formatjs/ecma402-abstract/lib/data.js
474
+ var MissingLocaleDataError = (
475
+ /** @class */
476
+ function(_super) {
477
+ __extends(MissingLocaleDataError2, _super);
478
+ function MissingLocaleDataError2() {
479
+ var _this = _super !== null && _super.apply(this, arguments) || this;
480
+ _this.type = "MISSING_LOCALE_DATA";
481
+ return _this;
482
+ }
483
+ return MissingLocaleDataError2;
484
+ }(Error)
485
+ );
892
486
 
893
- // ../../../../../../../../execroot/formatjs/bazel-out/darwin_arm64-fastbuild/bin/node_modules/.aspect_rules_js/@formatjs+ecma402-abstract@0.0.0/node_modules/@formatjs/ecma402-abstract/lib/types/date-time.js
487
+ // ../../../../../../../../execroot/formatjs/bazel-out/darwin-fastbuild/bin/node_modules/.aspect_rules_js/@formatjs+ecma402-abstract@0.0.0/node_modules/@formatjs/ecma402-abstract/lib/types/date-time.js
894
488
  var RangePatternType;
895
489
  (function(RangePatternType2) {
896
490
  RangePatternType2["startRange"] = "startRange";
@@ -898,7 +492,7 @@ var ReactIntl = (() => {
898
492
  RangePatternType2["endRange"] = "endRange";
899
493
  })(RangePatternType || (RangePatternType = {}));
900
494
 
901
- // ../../../../../../../../execroot/formatjs/bazel-out/darwin_arm64-fastbuild/bin/node_modules/.aspect_rules_js/@formatjs+icu-messageformat-parser@0.0.0/node_modules/@formatjs/icu-messageformat-parser/lib/error.js
495
+ // ../../../../../../../../execroot/formatjs/bazel-out/darwin-fastbuild/bin/node_modules/.aspect_rules_js/@formatjs+icu-messageformat-parser@0.0.0/node_modules/@formatjs/icu-messageformat-parser/lib/error.js
902
496
  var ErrorKind;
903
497
  (function(ErrorKind2) {
904
498
  ErrorKind2[ErrorKind2["EXPECT_ARGUMENT_CLOSING_BRACE"] = 1] = "EXPECT_ARGUMENT_CLOSING_BRACE";
@@ -929,7 +523,7 @@ var ReactIntl = (() => {
929
523
  ErrorKind2[ErrorKind2["UNCLOSED_TAG"] = 27] = "UNCLOSED_TAG";
930
524
  })(ErrorKind || (ErrorKind = {}));
931
525
 
932
- // ../../../../../../../../execroot/formatjs/bazel-out/darwin_arm64-fastbuild/bin/node_modules/.aspect_rules_js/@formatjs+icu-messageformat-parser@0.0.0/node_modules/@formatjs/icu-messageformat-parser/lib/types.js
526
+ // ../../../../../../../../execroot/formatjs/bazel-out/darwin-fastbuild/bin/node_modules/.aspect_rules_js/@formatjs+icu-messageformat-parser@0.0.0/node_modules/@formatjs/icu-messageformat-parser/lib/types.js
933
527
  var TYPE;
934
528
  (function(TYPE2) {
935
529
  TYPE2[TYPE2["literal"] = 0] = "literal";
@@ -981,10 +575,10 @@ var ReactIntl = (() => {
981
575
  return !!(el && typeof el === "object" && el.type === SKELETON_TYPE.dateTime);
982
576
  }
983
577
 
984
- // ../../../../../../../../execroot/formatjs/bazel-out/darwin_arm64-fastbuild/bin/node_modules/.aspect_rules_js/@formatjs+icu-messageformat-parser@0.0.0/node_modules/@formatjs/icu-messageformat-parser/lib/regex.generated.js
578
+ // ../../../../../../../../execroot/formatjs/bazel-out/darwin-fastbuild/bin/node_modules/.aspect_rules_js/@formatjs+icu-messageformat-parser@0.0.0/node_modules/@formatjs/icu-messageformat-parser/lib/regex.generated.js
985
579
  var SPACE_SEPARATOR_REGEX = /[ \xA0\u1680\u2000-\u200A\u202F\u205F\u3000]/;
986
580
 
987
- // ../../../../../../../../execroot/formatjs/bazel-out/darwin_arm64-fastbuild/bin/node_modules/.aspect_rules_js/@formatjs+icu-skeleton-parser@0.0.0/node_modules/@formatjs/icu-skeleton-parser/lib/date-time.js
581
+ // ../../../../../../../../execroot/formatjs/bazel-out/darwin-fastbuild/bin/node_modules/.aspect_rules_js/@formatjs+icu-skeleton-parser@0.0.0/node_modules/@formatjs/icu-skeleton-parser/lib/date-time.js
988
582
  var DATE_TIME_REGEX = /(?:[Eec]{1,6}|G{1,5}|[Qq]{1,5}|(?:[yYur]+|U{1,5})|[ML]{1,5}|d{1,2}|D{1,3}|F{1}|[abB]{1,5}|[hkHK]{1,2}|w{1,2}|W{1}|m{1,2}|s{1,2}|[zZOvVxX]{1,4})(?=([^']*'[^']*')*[^']*$)/g;
989
583
  function parseDateTimeSkeleton(skeleton) {
990
584
  var result = {};
@@ -1085,10 +679,10 @@ var ReactIntl = (() => {
1085
679
  return result;
1086
680
  }
1087
681
 
1088
- // ../../../../../../../../execroot/formatjs/bazel-out/darwin_arm64-fastbuild/bin/node_modules/.aspect_rules_js/@formatjs+icu-skeleton-parser@0.0.0/node_modules/@formatjs/icu-skeleton-parser/lib/regex.generated.js
682
+ // ../../../../../../../../execroot/formatjs/bazel-out/darwin-fastbuild/bin/node_modules/.aspect_rules_js/@formatjs+icu-skeleton-parser@0.0.0/node_modules/@formatjs/icu-skeleton-parser/lib/regex.generated.js
1089
683
  var WHITE_SPACE_REGEX = /[\t-\r \x85\u200E\u200F\u2028\u2029]/i;
1090
684
 
1091
- // ../../../../../../../../execroot/formatjs/bazel-out/darwin_arm64-fastbuild/bin/node_modules/.aspect_rules_js/@formatjs+icu-skeleton-parser@0.0.0/node_modules/@formatjs/icu-skeleton-parser/lib/number.js
685
+ // ../../../../../../../../execroot/formatjs/bazel-out/darwin-fastbuild/bin/node_modules/.aspect_rules_js/@formatjs+icu-skeleton-parser@0.0.0/node_modules/@formatjs/icu-skeleton-parser/lib/number.js
1092
686
  function parseNumberSkeletonFromString(skeleton) {
1093
687
  if (skeleton.length === 0) {
1094
688
  throw new Error("Number skeleton cannot be empty");
@@ -1354,7 +948,7 @@ var ReactIntl = (() => {
1354
948
  return result;
1355
949
  }
1356
950
 
1357
- // ../../../../../../../../execroot/formatjs/bazel-out/darwin_arm64-fastbuild/bin/node_modules/.aspect_rules_js/@formatjs+icu-messageformat-parser@0.0.0/node_modules/@formatjs/icu-messageformat-parser/lib/time-data.generated.js
951
+ // ../../../../../../../../execroot/formatjs/bazel-out/darwin-fastbuild/bin/node_modules/.aspect_rules_js/@formatjs+icu-messageformat-parser@0.0.0/node_modules/@formatjs/icu-messageformat-parser/lib/time-data.generated.js
1358
952
  var timeData = {
1359
953
  "AX": [
1360
954
  "H"
@@ -2693,7 +2287,7 @@ var ReactIntl = (() => {
2693
2287
  ]
2694
2288
  };
2695
2289
 
2696
- // ../../../../../../../../execroot/formatjs/bazel-out/darwin_arm64-fastbuild/bin/node_modules/.aspect_rules_js/@formatjs+icu-messageformat-parser@0.0.0/node_modules/@formatjs/icu-messageformat-parser/lib/date-time-pattern-generator.js
2290
+ // ../../../../../../../../execroot/formatjs/bazel-out/darwin-fastbuild/bin/node_modules/.aspect_rules_js/@formatjs+icu-messageformat-parser@0.0.0/node_modules/@formatjs/icu-messageformat-parser/lib/date-time-pattern-generator.js
2697
2291
  function getBestPattern(skeleton, locale) {
2698
2292
  var skeletonCopy = "";
2699
2293
  for (var patternPos = 0; patternPos < skeleton.length; patternPos++) {
@@ -2727,7 +2321,9 @@ var ReactIntl = (() => {
2727
2321
  }
2728
2322
  function getDefaultHourSymbolFromLocale(locale) {
2729
2323
  var hourCycle = locale.hourCycle;
2730
- if (hourCycle === void 0 && locale.hourCycles && locale.hourCycles.length) {
2324
+ if (hourCycle === void 0 && // @ts-ignore hourCycle(s) is not identified yet
2325
+ locale.hourCycles && // @ts-ignore
2326
+ locale.hourCycles.length) {
2731
2327
  hourCycle = locale.hourCycles[0];
2732
2328
  }
2733
2329
  if (hourCycle) {
@@ -2753,7 +2349,7 @@ var ReactIntl = (() => {
2753
2349
  return hourCycles[0];
2754
2350
  }
2755
2351
 
2756
- // ../../../../../../../../execroot/formatjs/bazel-out/darwin_arm64-fastbuild/bin/node_modules/.aspect_rules_js/@formatjs+icu-messageformat-parser@0.0.0/node_modules/@formatjs/icu-messageformat-parser/lib/parser.js
2352
+ // ../../../../../../../../execroot/formatjs/bazel-out/darwin-fastbuild/bin/node_modules/.aspect_rules_js/@formatjs+icu-messageformat-parser@0.0.0/node_modules/@formatjs/icu-messageformat-parser/lib/parser.js
2757
2353
  var _a;
2758
2354
  var SPACE_SEPARATOR_START_REGEX = new RegExp("^".concat(SPACE_SEPARATOR_REGEX.source, "*"));
2759
2355
  var SPACE_SEPARATOR_END_REGEX = new RegExp("".concat(SPACE_SEPARATOR_REGEX.source, "*$"));
@@ -2778,57 +2374,90 @@ var ReactIntl = (() => {
2778
2374
  REGEX_SUPPORTS_U_AND_Y = false;
2779
2375
  }
2780
2376
  var re;
2781
- var startsWith = hasNativeStartsWith ? function startsWith2(s, search, position) {
2782
- return s.startsWith(search, position);
2783
- } : function startsWith3(s, search, position) {
2784
- return s.slice(position, position + search.length) === search;
2785
- };
2786
- var fromCodePoint = hasNativeFromCodePoint ? String.fromCodePoint : function fromCodePoint2() {
2787
- var codePoints = [];
2788
- for (var _i = 0; _i < arguments.length; _i++) {
2789
- codePoints[_i] = arguments[_i];
2377
+ var startsWith = hasNativeStartsWith ? (
2378
+ // Native
2379
+ function startsWith2(s, search, position) {
2380
+ return s.startsWith(search, position);
2790
2381
  }
2791
- var elements = "";
2792
- var length = codePoints.length;
2793
- var i = 0;
2794
- var code;
2795
- while (length > i) {
2796
- code = codePoints[i++];
2797
- if (code > 1114111)
2798
- throw RangeError(code + " is not a valid code point");
2799
- elements += code < 65536 ? String.fromCharCode(code) : String.fromCharCode(((code -= 65536) >> 10) + 55296, code % 1024 + 56320);
2382
+ ) : (
2383
+ // For IE11
2384
+ function startsWith3(s, search, position) {
2385
+ return s.slice(position, position + search.length) === search;
2800
2386
  }
2801
- return elements;
2802
- };
2803
- var fromEntries = hasNativeFromEntries ? Object.fromEntries : function fromEntries2(entries) {
2804
- var obj = {};
2805
- for (var _i = 0, entries_1 = entries; _i < entries_1.length; _i++) {
2806
- var _a2 = entries_1[_i], k = _a2[0], v = _a2[1];
2807
- obj[k] = v;
2387
+ );
2388
+ var fromCodePoint = hasNativeFromCodePoint ? String.fromCodePoint : (
2389
+ // IE11
2390
+ function fromCodePoint2() {
2391
+ var codePoints = [];
2392
+ for (var _i = 0; _i < arguments.length; _i++) {
2393
+ codePoints[_i] = arguments[_i];
2394
+ }
2395
+ var elements = "";
2396
+ var length = codePoints.length;
2397
+ var i = 0;
2398
+ var code;
2399
+ while (length > i) {
2400
+ code = codePoints[i++];
2401
+ if (code > 1114111)
2402
+ throw RangeError(code + " is not a valid code point");
2403
+ elements += code < 65536 ? String.fromCharCode(code) : String.fromCharCode(((code -= 65536) >> 10) + 55296, code % 1024 + 56320);
2404
+ }
2405
+ return elements;
2808
2406
  }
2809
- return obj;
2810
- };
2811
- var codePointAt = hasNativeCodePointAt ? function codePointAt2(s, index) {
2812
- return s.codePointAt(index);
2813
- } : function codePointAt3(s, index) {
2814
- var size = s.length;
2815
- if (index < 0 || index >= size) {
2816
- return void 0;
2407
+ );
2408
+ var fromEntries = (
2409
+ // native
2410
+ hasNativeFromEntries ? Object.fromEntries : (
2411
+ // Ponyfill
2412
+ function fromEntries2(entries) {
2413
+ var obj = {};
2414
+ for (var _i = 0, entries_1 = entries; _i < entries_1.length; _i++) {
2415
+ var _a2 = entries_1[_i], k = _a2[0], v = _a2[1];
2416
+ obj[k] = v;
2417
+ }
2418
+ return obj;
2419
+ }
2420
+ )
2421
+ );
2422
+ var codePointAt = hasNativeCodePointAt ? (
2423
+ // Native
2424
+ function codePointAt2(s, index) {
2425
+ return s.codePointAt(index);
2817
2426
  }
2818
- var first = s.charCodeAt(index);
2819
- var second;
2820
- return first < 55296 || first > 56319 || index + 1 === size || (second = s.charCodeAt(index + 1)) < 56320 || second > 57343 ? first : (first - 55296 << 10) + (second - 56320) + 65536;
2821
- };
2822
- var trimStart = hasTrimStart ? function trimStart2(s) {
2823
- return s.trimStart();
2824
- } : function trimStart3(s) {
2825
- return s.replace(SPACE_SEPARATOR_START_REGEX, "");
2826
- };
2827
- var trimEnd = hasTrimEnd ? function trimEnd2(s) {
2828
- return s.trimEnd();
2829
- } : function trimEnd3(s) {
2830
- return s.replace(SPACE_SEPARATOR_END_REGEX, "");
2831
- };
2427
+ ) : (
2428
+ // IE 11
2429
+ function codePointAt3(s, index) {
2430
+ var size = s.length;
2431
+ if (index < 0 || index >= size) {
2432
+ return void 0;
2433
+ }
2434
+ var first = s.charCodeAt(index);
2435
+ var second;
2436
+ return first < 55296 || first > 56319 || index + 1 === size || (second = s.charCodeAt(index + 1)) < 56320 || second > 57343 ? first : (first - 55296 << 10) + (second - 56320) + 65536;
2437
+ }
2438
+ );
2439
+ var trimStart = hasTrimStart ? (
2440
+ // Native
2441
+ function trimStart2(s) {
2442
+ return s.trimStart();
2443
+ }
2444
+ ) : (
2445
+ // Ponyfill
2446
+ function trimStart3(s) {
2447
+ return s.replace(SPACE_SEPARATOR_START_REGEX, "");
2448
+ }
2449
+ );
2450
+ var trimEnd = hasTrimEnd ? (
2451
+ // Native
2452
+ function trimEnd2(s) {
2453
+ return s.trimEnd();
2454
+ }
2455
+ ) : (
2456
+ // Ponyfill
2457
+ function trimEnd3(s) {
2458
+ return s.replace(SPACE_SEPARATOR_END_REGEX, "");
2459
+ }
2460
+ );
2832
2461
  function RE(s, flag) {
2833
2462
  return new RegExp(s, flag);
2834
2463
  }
@@ -2856,654 +2485,659 @@ var ReactIntl = (() => {
2856
2485
  };
2857
2486
  }
2858
2487
  var IDENTIFIER_PREFIX_RE_1;
2859
- var Parser = function() {
2860
- function Parser2(message, options) {
2861
- if (options === void 0) {
2862
- options = {};
2863
- }
2864
- this.message = message;
2865
- this.position = { offset: 0, line: 1, column: 1 };
2866
- this.ignoreTag = !!options.ignoreTag;
2867
- this.locale = options.locale;
2868
- this.requiresOtherClause = !!options.requiresOtherClause;
2869
- this.shouldParseSkeletons = !!options.shouldParseSkeletons;
2870
- }
2871
- Parser2.prototype.parse = function() {
2872
- if (this.offset() !== 0) {
2873
- throw Error("parser can only be used once");
2488
+ var Parser = (
2489
+ /** @class */
2490
+ function() {
2491
+ function Parser2(message, options) {
2492
+ if (options === void 0) {
2493
+ options = {};
2494
+ }
2495
+ this.message = message;
2496
+ this.position = { offset: 0, line: 1, column: 1 };
2497
+ this.ignoreTag = !!options.ignoreTag;
2498
+ this.locale = options.locale;
2499
+ this.requiresOtherClause = !!options.requiresOtherClause;
2500
+ this.shouldParseSkeletons = !!options.shouldParseSkeletons;
2874
2501
  }
2875
- return this.parseMessage(0, "", false);
2876
- };
2877
- Parser2.prototype.parseMessage = function(nestingLevel, parentArgType, expectingCloseTag) {
2878
- var elements = [];
2879
- while (!this.isEOF()) {
2880
- var char = this.char();
2881
- if (char === 123) {
2882
- var result = this.parseArgument(nestingLevel, expectingCloseTag);
2883
- if (result.err) {
2884
- return result;
2885
- }
2886
- elements.push(result.val);
2887
- } else if (char === 125 && nestingLevel > 0) {
2888
- break;
2889
- } else if (char === 35 && (parentArgType === "plural" || parentArgType === "selectordinal")) {
2890
- var position = this.clonePosition();
2891
- this.bump();
2892
- elements.push({
2893
- type: TYPE.pound,
2894
- location: createLocation(position, this.clonePosition())
2895
- });
2896
- } else if (char === 60 && !this.ignoreTag && this.peek() === 47) {
2897
- if (expectingCloseTag) {
2502
+ Parser2.prototype.parse = function() {
2503
+ if (this.offset() !== 0) {
2504
+ throw Error("parser can only be used once");
2505
+ }
2506
+ return this.parseMessage(0, "", false);
2507
+ };
2508
+ Parser2.prototype.parseMessage = function(nestingLevel, parentArgType, expectingCloseTag) {
2509
+ var elements = [];
2510
+ while (!this.isEOF()) {
2511
+ var char = this.char();
2512
+ if (char === 123) {
2513
+ var result = this.parseArgument(nestingLevel, expectingCloseTag);
2514
+ if (result.err) {
2515
+ return result;
2516
+ }
2517
+ elements.push(result.val);
2518
+ } else if (char === 125 && nestingLevel > 0) {
2898
2519
  break;
2520
+ } else if (char === 35 && (parentArgType === "plural" || parentArgType === "selectordinal")) {
2521
+ var position = this.clonePosition();
2522
+ this.bump();
2523
+ elements.push({
2524
+ type: TYPE.pound,
2525
+ location: createLocation(position, this.clonePosition())
2526
+ });
2527
+ } else if (char === 60 && !this.ignoreTag && this.peek() === 47) {
2528
+ if (expectingCloseTag) {
2529
+ break;
2530
+ } else {
2531
+ return this.error(ErrorKind.UNMATCHED_CLOSING_TAG, createLocation(this.clonePosition(), this.clonePosition()));
2532
+ }
2533
+ } else if (char === 60 && !this.ignoreTag && _isAlpha(this.peek() || 0)) {
2534
+ var result = this.parseTag(nestingLevel, parentArgType);
2535
+ if (result.err) {
2536
+ return result;
2537
+ }
2538
+ elements.push(result.val);
2899
2539
  } else {
2900
- return this.error(ErrorKind.UNMATCHED_CLOSING_TAG, createLocation(this.clonePosition(), this.clonePosition()));
2901
- }
2902
- } else if (char === 60 && !this.ignoreTag && _isAlpha(this.peek() || 0)) {
2903
- var result = this.parseTag(nestingLevel, parentArgType);
2904
- if (result.err) {
2905
- return result;
2906
- }
2907
- elements.push(result.val);
2908
- } else {
2909
- var result = this.parseLiteral(nestingLevel, parentArgType);
2910
- if (result.err) {
2911
- return result;
2540
+ var result = this.parseLiteral(nestingLevel, parentArgType);
2541
+ if (result.err) {
2542
+ return result;
2543
+ }
2544
+ elements.push(result.val);
2912
2545
  }
2913
- elements.push(result.val);
2914
2546
  }
2915
- }
2916
- return { val: elements, err: null };
2917
- };
2918
- Parser2.prototype.parseTag = function(nestingLevel, parentArgType) {
2919
- var startPosition = this.clonePosition();
2920
- this.bump();
2921
- var tagName = this.parseTagName();
2922
- this.bumpSpace();
2923
- if (this.bumpIf("/>")) {
2924
- return {
2925
- val: {
2926
- type: TYPE.literal,
2927
- value: "<".concat(tagName, "/>"),
2928
- location: createLocation(startPosition, this.clonePosition())
2929
- },
2930
- err: null
2931
- };
2932
- } else if (this.bumpIf(">")) {
2933
- var childrenResult = this.parseMessage(nestingLevel + 1, parentArgType, true);
2934
- if (childrenResult.err) {
2935
- return childrenResult;
2936
- }
2937
- var children = childrenResult.val;
2938
- var endTagStartPosition = this.clonePosition();
2939
- if (this.bumpIf("</")) {
2940
- if (this.isEOF() || !_isAlpha(this.char())) {
2941
- return this.error(ErrorKind.INVALID_TAG, createLocation(endTagStartPosition, this.clonePosition()));
2942
- }
2943
- var closingTagNameStartPosition = this.clonePosition();
2944
- var closingTagName = this.parseTagName();
2945
- if (tagName !== closingTagName) {
2946
- return this.error(ErrorKind.UNMATCHED_CLOSING_TAG, createLocation(closingTagNameStartPosition, this.clonePosition()));
2947
- }
2948
- this.bumpSpace();
2949
- if (!this.bumpIf(">")) {
2950
- return this.error(ErrorKind.INVALID_TAG, createLocation(endTagStartPosition, this.clonePosition()));
2951
- }
2547
+ return { val: elements, err: null };
2548
+ };
2549
+ Parser2.prototype.parseTag = function(nestingLevel, parentArgType) {
2550
+ var startPosition = this.clonePosition();
2551
+ this.bump();
2552
+ var tagName = this.parseTagName();
2553
+ this.bumpSpace();
2554
+ if (this.bumpIf("/>")) {
2952
2555
  return {
2953
2556
  val: {
2954
- type: TYPE.tag,
2955
- value: tagName,
2956
- children,
2557
+ type: TYPE.literal,
2558
+ value: "<".concat(tagName, "/>"),
2957
2559
  location: createLocation(startPosition, this.clonePosition())
2958
2560
  },
2959
2561
  err: null
2960
2562
  };
2563
+ } else if (this.bumpIf(">")) {
2564
+ var childrenResult = this.parseMessage(nestingLevel + 1, parentArgType, true);
2565
+ if (childrenResult.err) {
2566
+ return childrenResult;
2567
+ }
2568
+ var children = childrenResult.val;
2569
+ var endTagStartPosition = this.clonePosition();
2570
+ if (this.bumpIf("</")) {
2571
+ if (this.isEOF() || !_isAlpha(this.char())) {
2572
+ return this.error(ErrorKind.INVALID_TAG, createLocation(endTagStartPosition, this.clonePosition()));
2573
+ }
2574
+ var closingTagNameStartPosition = this.clonePosition();
2575
+ var closingTagName = this.parseTagName();
2576
+ if (tagName !== closingTagName) {
2577
+ return this.error(ErrorKind.UNMATCHED_CLOSING_TAG, createLocation(closingTagNameStartPosition, this.clonePosition()));
2578
+ }
2579
+ this.bumpSpace();
2580
+ if (!this.bumpIf(">")) {
2581
+ return this.error(ErrorKind.INVALID_TAG, createLocation(endTagStartPosition, this.clonePosition()));
2582
+ }
2583
+ return {
2584
+ val: {
2585
+ type: TYPE.tag,
2586
+ value: tagName,
2587
+ children,
2588
+ location: createLocation(startPosition, this.clonePosition())
2589
+ },
2590
+ err: null
2591
+ };
2592
+ } else {
2593
+ return this.error(ErrorKind.UNCLOSED_TAG, createLocation(startPosition, this.clonePosition()));
2594
+ }
2961
2595
  } else {
2962
- return this.error(ErrorKind.UNCLOSED_TAG, createLocation(startPosition, this.clonePosition()));
2596
+ return this.error(ErrorKind.INVALID_TAG, createLocation(startPosition, this.clonePosition()));
2963
2597
  }
2964
- } else {
2965
- return this.error(ErrorKind.INVALID_TAG, createLocation(startPosition, this.clonePosition()));
2966
- }
2967
- };
2968
- Parser2.prototype.parseTagName = function() {
2969
- var startOffset = this.offset();
2970
- this.bump();
2971
- while (!this.isEOF() && _isPotentialElementNameChar(this.char())) {
2598
+ };
2599
+ Parser2.prototype.parseTagName = function() {
2600
+ var startOffset = this.offset();
2972
2601
  this.bump();
2973
- }
2974
- return this.message.slice(startOffset, this.offset());
2975
- };
2976
- Parser2.prototype.parseLiteral = function(nestingLevel, parentArgType) {
2977
- var start = this.clonePosition();
2978
- var value = "";
2979
- while (true) {
2980
- var parseQuoteResult = this.tryParseQuote(parentArgType);
2981
- if (parseQuoteResult) {
2982
- value += parseQuoteResult;
2983
- continue;
2984
- }
2985
- var parseUnquotedResult = this.tryParseUnquoted(nestingLevel, parentArgType);
2986
- if (parseUnquotedResult) {
2987
- value += parseUnquotedResult;
2988
- continue;
2602
+ while (!this.isEOF() && _isPotentialElementNameChar(this.char())) {
2603
+ this.bump();
2989
2604
  }
2990
- var parseLeftAngleResult = this.tryParseLeftAngleBracket();
2991
- if (parseLeftAngleResult) {
2992
- value += parseLeftAngleResult;
2993
- continue;
2605
+ return this.message.slice(startOffset, this.offset());
2606
+ };
2607
+ Parser2.prototype.parseLiteral = function(nestingLevel, parentArgType) {
2608
+ var start = this.clonePosition();
2609
+ var value = "";
2610
+ while (true) {
2611
+ var parseQuoteResult = this.tryParseQuote(parentArgType);
2612
+ if (parseQuoteResult) {
2613
+ value += parseQuoteResult;
2614
+ continue;
2615
+ }
2616
+ var parseUnquotedResult = this.tryParseUnquoted(nestingLevel, parentArgType);
2617
+ if (parseUnquotedResult) {
2618
+ value += parseUnquotedResult;
2619
+ continue;
2620
+ }
2621
+ var parseLeftAngleResult = this.tryParseLeftAngleBracket();
2622
+ if (parseLeftAngleResult) {
2623
+ value += parseLeftAngleResult;
2624
+ continue;
2625
+ }
2626
+ break;
2994
2627
  }
2995
- break;
2996
- }
2997
- var location = createLocation(start, this.clonePosition());
2998
- return {
2999
- val: { type: TYPE.literal, value, location },
3000
- err: null
2628
+ var location = createLocation(start, this.clonePosition());
2629
+ return {
2630
+ val: { type: TYPE.literal, value, location },
2631
+ err: null
2632
+ };
3001
2633
  };
3002
- };
3003
- Parser2.prototype.tryParseLeftAngleBracket = function() {
3004
- if (!this.isEOF() && this.char() === 60 && (this.ignoreTag || !_isAlphaOrSlash(this.peek() || 0))) {
3005
- this.bump();
3006
- return "<";
3007
- }
3008
- return null;
3009
- };
3010
- Parser2.prototype.tryParseQuote = function(parentArgType) {
3011
- if (this.isEOF() || this.char() !== 39) {
3012
- return null;
3013
- }
3014
- switch (this.peek()) {
3015
- case 39:
2634
+ Parser2.prototype.tryParseLeftAngleBracket = function() {
2635
+ if (!this.isEOF() && this.char() === 60 && (this.ignoreTag || // If at the opening tag or closing tag position, bail.
2636
+ !_isAlphaOrSlash(this.peek() || 0))) {
3016
2637
  this.bump();
3017
- this.bump();
3018
- return "'";
3019
- case 123:
3020
- case 60:
3021
- case 62:
3022
- case 125:
3023
- break;
3024
- case 35:
3025
- if (parentArgType === "plural" || parentArgType === "selectordinal") {
3026
- break;
3027
- }
3028
- return null;
3029
- default:
2638
+ return "<";
2639
+ }
2640
+ return null;
2641
+ };
2642
+ Parser2.prototype.tryParseQuote = function(parentArgType) {
2643
+ if (this.isEOF() || this.char() !== 39) {
3030
2644
  return null;
3031
- }
3032
- this.bump();
3033
- var codePoints = [this.char()];
3034
- this.bump();
3035
- while (!this.isEOF()) {
3036
- var ch = this.char();
3037
- if (ch === 39) {
3038
- if (this.peek() === 39) {
3039
- codePoints.push(39);
2645
+ }
2646
+ switch (this.peek()) {
2647
+ case 39:
3040
2648
  this.bump();
3041
- } else {
3042
2649
  this.bump();
2650
+ return "'";
2651
+ case 123:
2652
+ case 60:
2653
+ case 62:
2654
+ case 125:
3043
2655
  break;
3044
- }
3045
- } else {
3046
- codePoints.push(ch);
2656
+ case 35:
2657
+ if (parentArgType === "plural" || parentArgType === "selectordinal") {
2658
+ break;
2659
+ }
2660
+ return null;
2661
+ default:
2662
+ return null;
3047
2663
  }
3048
2664
  this.bump();
3049
- }
3050
- return fromCodePoint.apply(void 0, codePoints);
3051
- };
3052
- Parser2.prototype.tryParseUnquoted = function(nestingLevel, parentArgType) {
3053
- if (this.isEOF()) {
3054
- return null;
3055
- }
3056
- var ch = this.char();
3057
- if (ch === 60 || ch === 123 || ch === 35 && (parentArgType === "plural" || parentArgType === "selectordinal") || ch === 125 && nestingLevel > 0) {
3058
- return null;
3059
- } else {
3060
- this.bump();
3061
- return fromCodePoint(ch);
3062
- }
3063
- };
3064
- Parser2.prototype.parseArgument = function(nestingLevel, expectingCloseTag) {
3065
- var openingBracePosition = this.clonePosition();
3066
- this.bump();
3067
- this.bumpSpace();
3068
- if (this.isEOF()) {
3069
- return this.error(ErrorKind.EXPECT_ARGUMENT_CLOSING_BRACE, createLocation(openingBracePosition, this.clonePosition()));
3070
- }
3071
- if (this.char() === 125) {
2665
+ var codePoints = [this.char()];
3072
2666
  this.bump();
3073
- return this.error(ErrorKind.EMPTY_ARGUMENT, createLocation(openingBracePosition, this.clonePosition()));
3074
- }
3075
- var value = this.parseIdentifierIfPossible().value;
3076
- if (!value) {
3077
- return this.error(ErrorKind.MALFORMED_ARGUMENT, createLocation(openingBracePosition, this.clonePosition()));
3078
- }
3079
- this.bumpSpace();
3080
- if (this.isEOF()) {
3081
- return this.error(ErrorKind.EXPECT_ARGUMENT_CLOSING_BRACE, createLocation(openingBracePosition, this.clonePosition()));
3082
- }
3083
- switch (this.char()) {
3084
- case 125: {
2667
+ while (!this.isEOF()) {
2668
+ var ch = this.char();
2669
+ if (ch === 39) {
2670
+ if (this.peek() === 39) {
2671
+ codePoints.push(39);
2672
+ this.bump();
2673
+ } else {
2674
+ this.bump();
2675
+ break;
2676
+ }
2677
+ } else {
2678
+ codePoints.push(ch);
2679
+ }
3085
2680
  this.bump();
3086
- return {
3087
- val: {
3088
- type: TYPE.argument,
3089
- value,
3090
- location: createLocation(openingBracePosition, this.clonePosition())
3091
- },
3092
- err: null
3093
- };
3094
2681
  }
3095
- case 44: {
2682
+ return fromCodePoint.apply(void 0, codePoints);
2683
+ };
2684
+ Parser2.prototype.tryParseUnquoted = function(nestingLevel, parentArgType) {
2685
+ if (this.isEOF()) {
2686
+ return null;
2687
+ }
2688
+ var ch = this.char();
2689
+ if (ch === 60 || ch === 123 || ch === 35 && (parentArgType === "plural" || parentArgType === "selectordinal") || ch === 125 && nestingLevel > 0) {
2690
+ return null;
2691
+ } else {
3096
2692
  this.bump();
3097
- this.bumpSpace();
3098
- if (this.isEOF()) {
3099
- return this.error(ErrorKind.EXPECT_ARGUMENT_CLOSING_BRACE, createLocation(openingBracePosition, this.clonePosition()));
3100
- }
3101
- return this.parseArgumentOptions(nestingLevel, expectingCloseTag, value, openingBracePosition);
2693
+ return fromCodePoint(ch);
3102
2694
  }
3103
- default:
3104
- return this.error(ErrorKind.MALFORMED_ARGUMENT, createLocation(openingBracePosition, this.clonePosition()));
3105
- }
3106
- };
3107
- Parser2.prototype.parseIdentifierIfPossible = function() {
3108
- var startingPosition = this.clonePosition();
3109
- var startOffset = this.offset();
3110
- var value = matchIdentifierAtIndex(this.message, startOffset);
3111
- var endOffset = startOffset + value.length;
3112
- this.bumpTo(endOffset);
3113
- var endPosition = this.clonePosition();
3114
- var location = createLocation(startingPosition, endPosition);
3115
- return { value, location };
3116
- };
3117
- Parser2.prototype.parseArgumentOptions = function(nestingLevel, expectingCloseTag, value, openingBracePosition) {
3118
- var _a2;
3119
- var typeStartPosition = this.clonePosition();
3120
- var argType = this.parseIdentifierIfPossible().value;
3121
- var typeEndPosition = this.clonePosition();
3122
- switch (argType) {
3123
- case "":
3124
- return this.error(ErrorKind.EXPECT_ARGUMENT_TYPE, createLocation(typeStartPosition, typeEndPosition));
3125
- case "number":
3126
- case "date":
3127
- case "time": {
3128
- this.bumpSpace();
3129
- var styleAndLocation = null;
3130
- if (this.bumpIf(",")) {
3131
- this.bumpSpace();
3132
- var styleStartPosition = this.clonePosition();
3133
- var result = this.parseSimpleArgStyleIfPossible();
3134
- if (result.err) {
3135
- return result;
3136
- }
3137
- var style = trimEnd(result.val);
3138
- if (style.length === 0) {
3139
- return this.error(ErrorKind.EXPECT_ARGUMENT_STYLE, createLocation(this.clonePosition(), this.clonePosition()));
3140
- }
3141
- var styleLocation = createLocation(styleStartPosition, this.clonePosition());
3142
- styleAndLocation = { style, styleLocation };
2695
+ };
2696
+ Parser2.prototype.parseArgument = function(nestingLevel, expectingCloseTag) {
2697
+ var openingBracePosition = this.clonePosition();
2698
+ this.bump();
2699
+ this.bumpSpace();
2700
+ if (this.isEOF()) {
2701
+ return this.error(ErrorKind.EXPECT_ARGUMENT_CLOSING_BRACE, createLocation(openingBracePosition, this.clonePosition()));
2702
+ }
2703
+ if (this.char() === 125) {
2704
+ this.bump();
2705
+ return this.error(ErrorKind.EMPTY_ARGUMENT, createLocation(openingBracePosition, this.clonePosition()));
2706
+ }
2707
+ var value = this.parseIdentifierIfPossible().value;
2708
+ if (!value) {
2709
+ return this.error(ErrorKind.MALFORMED_ARGUMENT, createLocation(openingBracePosition, this.clonePosition()));
2710
+ }
2711
+ this.bumpSpace();
2712
+ if (this.isEOF()) {
2713
+ return this.error(ErrorKind.EXPECT_ARGUMENT_CLOSING_BRACE, createLocation(openingBracePosition, this.clonePosition()));
2714
+ }
2715
+ switch (this.char()) {
2716
+ case 125: {
2717
+ this.bump();
2718
+ return {
2719
+ val: {
2720
+ type: TYPE.argument,
2721
+ // value does not include the opening and closing braces.
2722
+ value,
2723
+ location: createLocation(openingBracePosition, this.clonePosition())
2724
+ },
2725
+ err: null
2726
+ };
3143
2727
  }
3144
- var argCloseResult = this.tryParseArgumentClose(openingBracePosition);
3145
- if (argCloseResult.err) {
3146
- return argCloseResult;
2728
+ case 44: {
2729
+ this.bump();
2730
+ this.bumpSpace();
2731
+ if (this.isEOF()) {
2732
+ return this.error(ErrorKind.EXPECT_ARGUMENT_CLOSING_BRACE, createLocation(openingBracePosition, this.clonePosition()));
2733
+ }
2734
+ return this.parseArgumentOptions(nestingLevel, expectingCloseTag, value, openingBracePosition);
3147
2735
  }
3148
- var location_1 = createLocation(openingBracePosition, this.clonePosition());
3149
- if (styleAndLocation && startsWith(styleAndLocation === null || styleAndLocation === void 0 ? void 0 : styleAndLocation.style, "::", 0)) {
3150
- var skeleton = trimStart(styleAndLocation.style.slice(2));
3151
- if (argType === "number") {
3152
- var result = this.parseNumberSkeletonFromString(skeleton, styleAndLocation.styleLocation);
2736
+ default:
2737
+ return this.error(ErrorKind.MALFORMED_ARGUMENT, createLocation(openingBracePosition, this.clonePosition()));
2738
+ }
2739
+ };
2740
+ Parser2.prototype.parseIdentifierIfPossible = function() {
2741
+ var startingPosition = this.clonePosition();
2742
+ var startOffset = this.offset();
2743
+ var value = matchIdentifierAtIndex(this.message, startOffset);
2744
+ var endOffset = startOffset + value.length;
2745
+ this.bumpTo(endOffset);
2746
+ var endPosition = this.clonePosition();
2747
+ var location = createLocation(startingPosition, endPosition);
2748
+ return { value, location };
2749
+ };
2750
+ Parser2.prototype.parseArgumentOptions = function(nestingLevel, expectingCloseTag, value, openingBracePosition) {
2751
+ var _a2;
2752
+ var typeStartPosition = this.clonePosition();
2753
+ var argType = this.parseIdentifierIfPossible().value;
2754
+ var typeEndPosition = this.clonePosition();
2755
+ switch (argType) {
2756
+ case "":
2757
+ return this.error(ErrorKind.EXPECT_ARGUMENT_TYPE, createLocation(typeStartPosition, typeEndPosition));
2758
+ case "number":
2759
+ case "date":
2760
+ case "time": {
2761
+ this.bumpSpace();
2762
+ var styleAndLocation = null;
2763
+ if (this.bumpIf(",")) {
2764
+ this.bumpSpace();
2765
+ var styleStartPosition = this.clonePosition();
2766
+ var result = this.parseSimpleArgStyleIfPossible();
3153
2767
  if (result.err) {
3154
2768
  return result;
3155
2769
  }
3156
- return {
3157
- val: { type: TYPE.number, value, location: location_1, style: result.val },
3158
- err: null
3159
- };
3160
- } else {
3161
- if (skeleton.length === 0) {
3162
- return this.error(ErrorKind.EXPECT_DATE_TIME_SKELETON, location_1);
3163
- }
3164
- var dateTimePattern = skeleton;
3165
- if (this.locale) {
3166
- dateTimePattern = getBestPattern(skeleton, this.locale);
2770
+ var style = trimEnd(result.val);
2771
+ if (style.length === 0) {
2772
+ return this.error(ErrorKind.EXPECT_ARGUMENT_STYLE, createLocation(this.clonePosition(), this.clonePosition()));
3167
2773
  }
3168
- var style = {
3169
- type: SKELETON_TYPE.dateTime,
3170
- pattern: dateTimePattern,
3171
- location: styleAndLocation.styleLocation,
3172
- parsedOptions: this.shouldParseSkeletons ? parseDateTimeSkeleton(dateTimePattern) : {}
3173
- };
3174
- var type = argType === "date" ? TYPE.date : TYPE.time;
3175
- return {
3176
- val: { type, value, location: location_1, style },
3177
- err: null
3178
- };
2774
+ var styleLocation = createLocation(styleStartPosition, this.clonePosition());
2775
+ styleAndLocation = { style, styleLocation };
3179
2776
  }
3180
- }
3181
- return {
3182
- val: {
3183
- type: argType === "number" ? TYPE.number : argType === "date" ? TYPE.date : TYPE.time,
3184
- value,
3185
- location: location_1,
3186
- style: (_a2 = styleAndLocation === null || styleAndLocation === void 0 ? void 0 : styleAndLocation.style) !== null && _a2 !== void 0 ? _a2 : null
3187
- },
3188
- err: null
3189
- };
3190
- }
3191
- case "plural":
3192
- case "selectordinal":
3193
- case "select": {
3194
- var typeEndPosition_1 = this.clonePosition();
3195
- this.bumpSpace();
3196
- if (!this.bumpIf(",")) {
3197
- return this.error(ErrorKind.EXPECT_SELECT_ARGUMENT_OPTIONS, createLocation(typeEndPosition_1, __assign({}, typeEndPosition_1)));
3198
- }
3199
- this.bumpSpace();
3200
- var identifierAndLocation = this.parseIdentifierIfPossible();
3201
- var pluralOffset = 0;
3202
- if (argType !== "select" && identifierAndLocation.value === "offset") {
3203
- if (!this.bumpIf(":")) {
3204
- return this.error(ErrorKind.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE, createLocation(this.clonePosition(), this.clonePosition()));
2777
+ var argCloseResult = this.tryParseArgumentClose(openingBracePosition);
2778
+ if (argCloseResult.err) {
2779
+ return argCloseResult;
3205
2780
  }
3206
- this.bumpSpace();
3207
- var result = this.tryParseDecimalInteger(ErrorKind.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE, ErrorKind.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE);
3208
- if (result.err) {
3209
- return result;
2781
+ var location_1 = createLocation(openingBracePosition, this.clonePosition());
2782
+ if (styleAndLocation && startsWith(styleAndLocation === null || styleAndLocation === void 0 ? void 0 : styleAndLocation.style, "::", 0)) {
2783
+ var skeleton = trimStart(styleAndLocation.style.slice(2));
2784
+ if (argType === "number") {
2785
+ var result = this.parseNumberSkeletonFromString(skeleton, styleAndLocation.styleLocation);
2786
+ if (result.err) {
2787
+ return result;
2788
+ }
2789
+ return {
2790
+ val: { type: TYPE.number, value, location: location_1, style: result.val },
2791
+ err: null
2792
+ };
2793
+ } else {
2794
+ if (skeleton.length === 0) {
2795
+ return this.error(ErrorKind.EXPECT_DATE_TIME_SKELETON, location_1);
2796
+ }
2797
+ var dateTimePattern = skeleton;
2798
+ if (this.locale) {
2799
+ dateTimePattern = getBestPattern(skeleton, this.locale);
2800
+ }
2801
+ var style = {
2802
+ type: SKELETON_TYPE.dateTime,
2803
+ pattern: dateTimePattern,
2804
+ location: styleAndLocation.styleLocation,
2805
+ parsedOptions: this.shouldParseSkeletons ? parseDateTimeSkeleton(dateTimePattern) : {}
2806
+ };
2807
+ var type = argType === "date" ? TYPE.date : TYPE.time;
2808
+ return {
2809
+ val: { type, value, location: location_1, style },
2810
+ err: null
2811
+ };
2812
+ }
3210
2813
  }
3211
- this.bumpSpace();
3212
- identifierAndLocation = this.parseIdentifierIfPossible();
3213
- pluralOffset = result.val;
3214
- }
3215
- var optionsResult = this.tryParsePluralOrSelectOptions(nestingLevel, argType, expectingCloseTag, identifierAndLocation);
3216
- if (optionsResult.err) {
3217
- return optionsResult;
3218
- }
3219
- var argCloseResult = this.tryParseArgumentClose(openingBracePosition);
3220
- if (argCloseResult.err) {
3221
- return argCloseResult;
3222
- }
3223
- var location_2 = createLocation(openingBracePosition, this.clonePosition());
3224
- if (argType === "select") {
3225
2814
  return {
3226
2815
  val: {
3227
- type: TYPE.select,
2816
+ type: argType === "number" ? TYPE.number : argType === "date" ? TYPE.date : TYPE.time,
3228
2817
  value,
3229
- options: fromEntries(optionsResult.val),
3230
- location: location_2
3231
- },
3232
- err: null
3233
- };
3234
- } else {
3235
- return {
3236
- val: {
3237
- type: TYPE.plural,
3238
- value,
3239
- options: fromEntries(optionsResult.val),
3240
- offset: pluralOffset,
3241
- pluralType: argType === "plural" ? "cardinal" : "ordinal",
3242
- location: location_2
2818
+ location: location_1,
2819
+ style: (_a2 = styleAndLocation === null || styleAndLocation === void 0 ? void 0 : styleAndLocation.style) !== null && _a2 !== void 0 ? _a2 : null
3243
2820
  },
3244
2821
  err: null
3245
2822
  };
3246
2823
  }
3247
- }
3248
- default:
3249
- return this.error(ErrorKind.INVALID_ARGUMENT_TYPE, createLocation(typeStartPosition, typeEndPosition));
3250
- }
3251
- };
3252
- Parser2.prototype.tryParseArgumentClose = function(openingBracePosition) {
3253
- if (this.isEOF() || this.char() !== 125) {
3254
- return this.error(ErrorKind.EXPECT_ARGUMENT_CLOSING_BRACE, createLocation(openingBracePosition, this.clonePosition()));
3255
- }
3256
- this.bump();
3257
- return { val: true, err: null };
3258
- };
3259
- Parser2.prototype.parseSimpleArgStyleIfPossible = function() {
3260
- var nestedBraces = 0;
3261
- var startPosition = this.clonePosition();
3262
- while (!this.isEOF()) {
3263
- var ch = this.char();
3264
- switch (ch) {
3265
- case 39: {
3266
- this.bump();
3267
- var apostrophePosition = this.clonePosition();
3268
- if (!this.bumpUntil("'")) {
3269
- return this.error(ErrorKind.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE, createLocation(apostrophePosition, this.clonePosition()));
2824
+ case "plural":
2825
+ case "selectordinal":
2826
+ case "select": {
2827
+ var typeEndPosition_1 = this.clonePosition();
2828
+ this.bumpSpace();
2829
+ if (!this.bumpIf(",")) {
2830
+ return this.error(ErrorKind.EXPECT_SELECT_ARGUMENT_OPTIONS, createLocation(typeEndPosition_1, __assign({}, typeEndPosition_1)));
3270
2831
  }
3271
- this.bump();
3272
- break;
3273
- }
3274
- case 123: {
3275
- nestedBraces += 1;
3276
- this.bump();
3277
- break;
3278
- }
3279
- case 125: {
3280
- if (nestedBraces > 0) {
3281
- nestedBraces -= 1;
2832
+ this.bumpSpace();
2833
+ var identifierAndLocation = this.parseIdentifierIfPossible();
2834
+ var pluralOffset = 0;
2835
+ if (argType !== "select" && identifierAndLocation.value === "offset") {
2836
+ if (!this.bumpIf(":")) {
2837
+ return this.error(ErrorKind.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE, createLocation(this.clonePosition(), this.clonePosition()));
2838
+ }
2839
+ this.bumpSpace();
2840
+ var result = this.tryParseDecimalInteger(ErrorKind.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE, ErrorKind.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE);
2841
+ if (result.err) {
2842
+ return result;
2843
+ }
2844
+ this.bumpSpace();
2845
+ identifierAndLocation = this.parseIdentifierIfPossible();
2846
+ pluralOffset = result.val;
2847
+ }
2848
+ var optionsResult = this.tryParsePluralOrSelectOptions(nestingLevel, argType, expectingCloseTag, identifierAndLocation);
2849
+ if (optionsResult.err) {
2850
+ return optionsResult;
2851
+ }
2852
+ var argCloseResult = this.tryParseArgumentClose(openingBracePosition);
2853
+ if (argCloseResult.err) {
2854
+ return argCloseResult;
2855
+ }
2856
+ var location_2 = createLocation(openingBracePosition, this.clonePosition());
2857
+ if (argType === "select") {
2858
+ return {
2859
+ val: {
2860
+ type: TYPE.select,
2861
+ value,
2862
+ options: fromEntries(optionsResult.val),
2863
+ location: location_2
2864
+ },
2865
+ err: null
2866
+ };
3282
2867
  } else {
3283
2868
  return {
3284
- val: this.message.slice(startPosition.offset, this.offset()),
2869
+ val: {
2870
+ type: TYPE.plural,
2871
+ value,
2872
+ options: fromEntries(optionsResult.val),
2873
+ offset: pluralOffset,
2874
+ pluralType: argType === "plural" ? "cardinal" : "ordinal",
2875
+ location: location_2
2876
+ },
3285
2877
  err: null
3286
2878
  };
3287
2879
  }
3288
- break;
3289
2880
  }
3290
2881
  default:
3291
- this.bump();
3292
- break;
2882
+ return this.error(ErrorKind.INVALID_ARGUMENT_TYPE, createLocation(typeStartPosition, typeEndPosition));
3293
2883
  }
3294
- }
3295
- return {
3296
- val: this.message.slice(startPosition.offset, this.offset()),
3297
- err: null
3298
2884
  };
3299
- };
3300
- Parser2.prototype.parseNumberSkeletonFromString = function(skeleton, location) {
3301
- var tokens = [];
3302
- try {
3303
- tokens = parseNumberSkeletonFromString(skeleton);
3304
- } catch (e) {
3305
- return this.error(ErrorKind.INVALID_NUMBER_SKELETON, location);
3306
- }
3307
- return {
3308
- val: {
3309
- type: SKELETON_TYPE.number,
3310
- tokens,
3311
- location,
3312
- parsedOptions: this.shouldParseSkeletons ? parseNumberSkeleton(tokens) : {}
3313
- },
3314
- err: null
2885
+ Parser2.prototype.tryParseArgumentClose = function(openingBracePosition) {
2886
+ if (this.isEOF() || this.char() !== 125) {
2887
+ return this.error(ErrorKind.EXPECT_ARGUMENT_CLOSING_BRACE, createLocation(openingBracePosition, this.clonePosition()));
2888
+ }
2889
+ this.bump();
2890
+ return { val: true, err: null };
3315
2891
  };
3316
- };
3317
- Parser2.prototype.tryParsePluralOrSelectOptions = function(nestingLevel, parentArgType, expectCloseTag, parsedFirstIdentifier) {
3318
- var _a2;
3319
- var hasOtherClause = false;
3320
- var options = [];
3321
- var parsedSelectors = /* @__PURE__ */ new Set();
3322
- var selector = parsedFirstIdentifier.value, selectorLocation = parsedFirstIdentifier.location;
3323
- while (true) {
3324
- if (selector.length === 0) {
3325
- var startPosition = this.clonePosition();
3326
- if (parentArgType !== "select" && this.bumpIf("=")) {
3327
- var result = this.tryParseDecimalInteger(ErrorKind.EXPECT_PLURAL_ARGUMENT_SELECTOR, ErrorKind.INVALID_PLURAL_ARGUMENT_SELECTOR);
3328
- if (result.err) {
3329
- return result;
2892
+ Parser2.prototype.parseSimpleArgStyleIfPossible = function() {
2893
+ var nestedBraces = 0;
2894
+ var startPosition = this.clonePosition();
2895
+ while (!this.isEOF()) {
2896
+ var ch = this.char();
2897
+ switch (ch) {
2898
+ case 39: {
2899
+ this.bump();
2900
+ var apostrophePosition = this.clonePosition();
2901
+ if (!this.bumpUntil("'")) {
2902
+ return this.error(ErrorKind.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE, createLocation(apostrophePosition, this.clonePosition()));
2903
+ }
2904
+ this.bump();
2905
+ break;
2906
+ }
2907
+ case 123: {
2908
+ nestedBraces += 1;
2909
+ this.bump();
2910
+ break;
2911
+ }
2912
+ case 125: {
2913
+ if (nestedBraces > 0) {
2914
+ nestedBraces -= 1;
2915
+ } else {
2916
+ return {
2917
+ val: this.message.slice(startPosition.offset, this.offset()),
2918
+ err: null
2919
+ };
2920
+ }
2921
+ break;
2922
+ }
2923
+ default:
2924
+ this.bump();
2925
+ break;
2926
+ }
2927
+ }
2928
+ return {
2929
+ val: this.message.slice(startPosition.offset, this.offset()),
2930
+ err: null
2931
+ };
2932
+ };
2933
+ Parser2.prototype.parseNumberSkeletonFromString = function(skeleton, location) {
2934
+ var tokens = [];
2935
+ try {
2936
+ tokens = parseNumberSkeletonFromString(skeleton);
2937
+ } catch (e) {
2938
+ return this.error(ErrorKind.INVALID_NUMBER_SKELETON, location);
2939
+ }
2940
+ return {
2941
+ val: {
2942
+ type: SKELETON_TYPE.number,
2943
+ tokens,
2944
+ location,
2945
+ parsedOptions: this.shouldParseSkeletons ? parseNumberSkeleton(tokens) : {}
2946
+ },
2947
+ err: null
2948
+ };
2949
+ };
2950
+ Parser2.prototype.tryParsePluralOrSelectOptions = function(nestingLevel, parentArgType, expectCloseTag, parsedFirstIdentifier) {
2951
+ var _a2;
2952
+ var hasOtherClause = false;
2953
+ var options = [];
2954
+ var parsedSelectors = /* @__PURE__ */ new Set();
2955
+ var selector = parsedFirstIdentifier.value, selectorLocation = parsedFirstIdentifier.location;
2956
+ while (true) {
2957
+ if (selector.length === 0) {
2958
+ var startPosition = this.clonePosition();
2959
+ if (parentArgType !== "select" && this.bumpIf("=")) {
2960
+ var result = this.tryParseDecimalInteger(ErrorKind.EXPECT_PLURAL_ARGUMENT_SELECTOR, ErrorKind.INVALID_PLURAL_ARGUMENT_SELECTOR);
2961
+ if (result.err) {
2962
+ return result;
2963
+ }
2964
+ selectorLocation = createLocation(startPosition, this.clonePosition());
2965
+ selector = this.message.slice(startPosition.offset, this.offset());
2966
+ } else {
2967
+ break;
2968
+ }
2969
+ }
2970
+ if (parsedSelectors.has(selector)) {
2971
+ return this.error(parentArgType === "select" ? ErrorKind.DUPLICATE_SELECT_ARGUMENT_SELECTOR : ErrorKind.DUPLICATE_PLURAL_ARGUMENT_SELECTOR, selectorLocation);
2972
+ }
2973
+ if (selector === "other") {
2974
+ hasOtherClause = true;
2975
+ }
2976
+ this.bumpSpace();
2977
+ var openingBracePosition = this.clonePosition();
2978
+ if (!this.bumpIf("{")) {
2979
+ return this.error(parentArgType === "select" ? ErrorKind.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT : ErrorKind.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT, createLocation(this.clonePosition(), this.clonePosition()));
2980
+ }
2981
+ var fragmentResult = this.parseMessage(nestingLevel + 1, parentArgType, expectCloseTag);
2982
+ if (fragmentResult.err) {
2983
+ return fragmentResult;
2984
+ }
2985
+ var argCloseResult = this.tryParseArgumentClose(openingBracePosition);
2986
+ if (argCloseResult.err) {
2987
+ return argCloseResult;
2988
+ }
2989
+ options.push([
2990
+ selector,
2991
+ {
2992
+ value: fragmentResult.val,
2993
+ location: createLocation(openingBracePosition, this.clonePosition())
3330
2994
  }
3331
- selectorLocation = createLocation(startPosition, this.clonePosition());
3332
- selector = this.message.slice(startPosition.offset, this.offset());
2995
+ ]);
2996
+ parsedSelectors.add(selector);
2997
+ this.bumpSpace();
2998
+ _a2 = this.parseIdentifierIfPossible(), selector = _a2.value, selectorLocation = _a2.location;
2999
+ }
3000
+ if (options.length === 0) {
3001
+ return this.error(parentArgType === "select" ? ErrorKind.EXPECT_SELECT_ARGUMENT_SELECTOR : ErrorKind.EXPECT_PLURAL_ARGUMENT_SELECTOR, createLocation(this.clonePosition(), this.clonePosition()));
3002
+ }
3003
+ if (this.requiresOtherClause && !hasOtherClause) {
3004
+ return this.error(ErrorKind.MISSING_OTHER_CLAUSE, createLocation(this.clonePosition(), this.clonePosition()));
3005
+ }
3006
+ return { val: options, err: null };
3007
+ };
3008
+ Parser2.prototype.tryParseDecimalInteger = function(expectNumberError, invalidNumberError) {
3009
+ var sign = 1;
3010
+ var startingPosition = this.clonePosition();
3011
+ if (this.bumpIf("+")) {
3012
+ } else if (this.bumpIf("-")) {
3013
+ sign = -1;
3014
+ }
3015
+ var hasDigits = false;
3016
+ var decimal = 0;
3017
+ while (!this.isEOF()) {
3018
+ var ch = this.char();
3019
+ if (ch >= 48 && ch <= 57) {
3020
+ hasDigits = true;
3021
+ decimal = decimal * 10 + (ch - 48);
3022
+ this.bump();
3333
3023
  } else {
3334
3024
  break;
3335
3025
  }
3336
3026
  }
3337
- if (parsedSelectors.has(selector)) {
3338
- return this.error(parentArgType === "select" ? ErrorKind.DUPLICATE_SELECT_ARGUMENT_SELECTOR : ErrorKind.DUPLICATE_PLURAL_ARGUMENT_SELECTOR, selectorLocation);
3027
+ var location = createLocation(startingPosition, this.clonePosition());
3028
+ if (!hasDigits) {
3029
+ return this.error(expectNumberError, location);
3339
3030
  }
3340
- if (selector === "other") {
3341
- hasOtherClause = true;
3031
+ decimal *= sign;
3032
+ if (!isSafeInteger(decimal)) {
3033
+ return this.error(invalidNumberError, location);
3342
3034
  }
3343
- this.bumpSpace();
3344
- var openingBracePosition = this.clonePosition();
3345
- if (!this.bumpIf("{")) {
3346
- return this.error(parentArgType === "select" ? ErrorKind.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT : ErrorKind.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT, createLocation(this.clonePosition(), this.clonePosition()));
3347
- }
3348
- var fragmentResult = this.parseMessage(nestingLevel + 1, parentArgType, expectCloseTag);
3349
- if (fragmentResult.err) {
3350
- return fragmentResult;
3035
+ return { val: decimal, err: null };
3036
+ };
3037
+ Parser2.prototype.offset = function() {
3038
+ return this.position.offset;
3039
+ };
3040
+ Parser2.prototype.isEOF = function() {
3041
+ return this.offset() === this.message.length;
3042
+ };
3043
+ Parser2.prototype.clonePosition = function() {
3044
+ return {
3045
+ offset: this.position.offset,
3046
+ line: this.position.line,
3047
+ column: this.position.column
3048
+ };
3049
+ };
3050
+ Parser2.prototype.char = function() {
3051
+ var offset = this.position.offset;
3052
+ if (offset >= this.message.length) {
3053
+ throw Error("out of bound");
3351
3054
  }
3352
- var argCloseResult = this.tryParseArgumentClose(openingBracePosition);
3353
- if (argCloseResult.err) {
3354
- return argCloseResult;
3055
+ var code = codePointAt(this.message, offset);
3056
+ if (code === void 0) {
3057
+ throw Error("Offset ".concat(offset, " is at invalid UTF-16 code unit boundary"));
3355
3058
  }
3356
- options.push([
3357
- selector,
3358
- {
3359
- value: fragmentResult.val,
3360
- location: createLocation(openingBracePosition, this.clonePosition())
3059
+ return code;
3060
+ };
3061
+ Parser2.prototype.error = function(kind, location) {
3062
+ return {
3063
+ val: null,
3064
+ err: {
3065
+ kind,
3066
+ message: this.message,
3067
+ location
3361
3068
  }
3362
- ]);
3363
- parsedSelectors.add(selector);
3364
- this.bumpSpace();
3365
- _a2 = this.parseIdentifierIfPossible(), selector = _a2.value, selectorLocation = _a2.location;
3366
- }
3367
- if (options.length === 0) {
3368
- return this.error(parentArgType === "select" ? ErrorKind.EXPECT_SELECT_ARGUMENT_SELECTOR : ErrorKind.EXPECT_PLURAL_ARGUMENT_SELECTOR, createLocation(this.clonePosition(), this.clonePosition()));
3369
- }
3370
- if (this.requiresOtherClause && !hasOtherClause) {
3371
- return this.error(ErrorKind.MISSING_OTHER_CLAUSE, createLocation(this.clonePosition(), this.clonePosition()));
3372
- }
3373
- return { val: options, err: null };
3374
- };
3375
- Parser2.prototype.tryParseDecimalInteger = function(expectNumberError, invalidNumberError) {
3376
- var sign = 1;
3377
- var startingPosition = this.clonePosition();
3378
- if (this.bumpIf("+")) {
3379
- } else if (this.bumpIf("-")) {
3380
- sign = -1;
3381
- }
3382
- var hasDigits = false;
3383
- var decimal = 0;
3384
- while (!this.isEOF()) {
3385
- var ch = this.char();
3386
- if (ch >= 48 && ch <= 57) {
3387
- hasDigits = true;
3388
- decimal = decimal * 10 + (ch - 48);
3389
- this.bump();
3069
+ };
3070
+ };
3071
+ Parser2.prototype.bump = function() {
3072
+ if (this.isEOF()) {
3073
+ return;
3074
+ }
3075
+ var code = this.char();
3076
+ if (code === 10) {
3077
+ this.position.line += 1;
3078
+ this.position.column = 1;
3079
+ this.position.offset += 1;
3390
3080
  } else {
3391
- break;
3081
+ this.position.column += 1;
3082
+ this.position.offset += code < 65536 ? 1 : 2;
3392
3083
  }
3393
- }
3394
- var location = createLocation(startingPosition, this.clonePosition());
3395
- if (!hasDigits) {
3396
- return this.error(expectNumberError, location);
3397
- }
3398
- decimal *= sign;
3399
- if (!isSafeInteger(decimal)) {
3400
- return this.error(invalidNumberError, location);
3401
- }
3402
- return { val: decimal, err: null };
3403
- };
3404
- Parser2.prototype.offset = function() {
3405
- return this.position.offset;
3406
- };
3407
- Parser2.prototype.isEOF = function() {
3408
- return this.offset() === this.message.length;
3409
- };
3410
- Parser2.prototype.clonePosition = function() {
3411
- return {
3412
- offset: this.position.offset,
3413
- line: this.position.line,
3414
- column: this.position.column
3415
3084
  };
3416
- };
3417
- Parser2.prototype.char = function() {
3418
- var offset = this.position.offset;
3419
- if (offset >= this.message.length) {
3420
- throw Error("out of bound");
3421
- }
3422
- var code = codePointAt(this.message, offset);
3423
- if (code === void 0) {
3424
- throw Error("Offset ".concat(offset, " is at invalid UTF-16 code unit boundary"));
3425
- }
3426
- return code;
3427
- };
3428
- Parser2.prototype.error = function(kind, location) {
3429
- return {
3430
- val: null,
3431
- err: {
3432
- kind,
3433
- message: this.message,
3434
- location
3085
+ Parser2.prototype.bumpIf = function(prefix) {
3086
+ if (startsWith(this.message, prefix, this.offset())) {
3087
+ for (var i = 0; i < prefix.length; i++) {
3088
+ this.bump();
3089
+ }
3090
+ return true;
3435
3091
  }
3092
+ return false;
3436
3093
  };
3437
- };
3438
- Parser2.prototype.bump = function() {
3439
- if (this.isEOF()) {
3440
- return;
3441
- }
3442
- var code = this.char();
3443
- if (code === 10) {
3444
- this.position.line += 1;
3445
- this.position.column = 1;
3446
- this.position.offset += 1;
3447
- } else {
3448
- this.position.column += 1;
3449
- this.position.offset += code < 65536 ? 1 : 2;
3450
- }
3451
- };
3452
- Parser2.prototype.bumpIf = function(prefix) {
3453
- if (startsWith(this.message, prefix, this.offset())) {
3454
- for (var i = 0; i < prefix.length; i++) {
3455
- this.bump();
3094
+ Parser2.prototype.bumpUntil = function(pattern) {
3095
+ var currentOffset = this.offset();
3096
+ var index = this.message.indexOf(pattern, currentOffset);
3097
+ if (index >= 0) {
3098
+ this.bumpTo(index);
3099
+ return true;
3100
+ } else {
3101
+ this.bumpTo(this.message.length);
3102
+ return false;
3456
3103
  }
3457
- return true;
3458
- }
3459
- return false;
3460
- };
3461
- Parser2.prototype.bumpUntil = function(pattern) {
3462
- var currentOffset = this.offset();
3463
- var index = this.message.indexOf(pattern, currentOffset);
3464
- if (index >= 0) {
3465
- this.bumpTo(index);
3466
- return true;
3467
- } else {
3468
- this.bumpTo(this.message.length);
3469
- return false;
3470
- }
3471
- };
3472
- Parser2.prototype.bumpTo = function(targetOffset) {
3473
- if (this.offset() > targetOffset) {
3474
- throw Error("targetOffset ".concat(targetOffset, " must be greater than or equal to the current offset ").concat(this.offset()));
3475
- }
3476
- targetOffset = Math.min(targetOffset, this.message.length);
3477
- while (true) {
3478
- var offset = this.offset();
3479
- if (offset === targetOffset) {
3480
- break;
3104
+ };
3105
+ Parser2.prototype.bumpTo = function(targetOffset) {
3106
+ if (this.offset() > targetOffset) {
3107
+ throw Error("targetOffset ".concat(targetOffset, " must be greater than or equal to the current offset ").concat(this.offset()));
3481
3108
  }
3482
- if (offset > targetOffset) {
3483
- throw Error("targetOffset ".concat(targetOffset, " is at invalid UTF-16 code unit boundary"));
3109
+ targetOffset = Math.min(targetOffset, this.message.length);
3110
+ while (true) {
3111
+ var offset = this.offset();
3112
+ if (offset === targetOffset) {
3113
+ break;
3114
+ }
3115
+ if (offset > targetOffset) {
3116
+ throw Error("targetOffset ".concat(targetOffset, " is at invalid UTF-16 code unit boundary"));
3117
+ }
3118
+ this.bump();
3119
+ if (this.isEOF()) {
3120
+ break;
3121
+ }
3484
3122
  }
3485
- this.bump();
3123
+ };
3124
+ Parser2.prototype.bumpSpace = function() {
3125
+ while (!this.isEOF() && _isWhiteSpace(this.char())) {
3126
+ this.bump();
3127
+ }
3128
+ };
3129
+ Parser2.prototype.peek = function() {
3486
3130
  if (this.isEOF()) {
3487
- break;
3131
+ return null;
3488
3132
  }
3489
- }
3490
- };
3491
- Parser2.prototype.bumpSpace = function() {
3492
- while (!this.isEOF() && _isWhiteSpace(this.char())) {
3493
- this.bump();
3494
- }
3495
- };
3496
- Parser2.prototype.peek = function() {
3497
- if (this.isEOF()) {
3498
- return null;
3499
- }
3500
- var code = this.char();
3501
- var offset = this.offset();
3502
- var nextCode = this.message.charCodeAt(offset + (code >= 65536 ? 2 : 1));
3503
- return nextCode !== null && nextCode !== void 0 ? nextCode : null;
3504
- };
3505
- return Parser2;
3506
- }();
3133
+ var code = this.char();
3134
+ var offset = this.offset();
3135
+ var nextCode = this.message.charCodeAt(offset + (code >= 65536 ? 2 : 1));
3136
+ return nextCode !== null && nextCode !== void 0 ? nextCode : null;
3137
+ };
3138
+ return Parser2;
3139
+ }()
3140
+ );
3507
3141
  function _isAlpha(codepoint) {
3508
3142
  return codepoint >= 97 && codepoint <= 122 || codepoint >= 65 && codepoint <= 90;
3509
3143
  }
@@ -3520,7 +3154,7 @@ var ReactIntl = (() => {
3520
3154
  return c >= 33 && c <= 35 || c === 36 || c >= 37 && c <= 39 || c === 40 || c === 41 || c === 42 || c === 43 || c === 44 || c === 45 || c >= 46 && c <= 47 || c >= 58 && c <= 59 || c >= 60 && c <= 62 || c >= 63 && c <= 64 || c === 91 || c === 92 || c === 93 || c === 94 || c === 96 || c === 123 || c === 124 || c === 125 || c === 126 || c === 161 || c >= 162 && c <= 165 || c === 166 || c === 167 || c === 169 || c === 171 || c === 172 || c === 174 || c === 176 || c === 177 || c === 182 || c === 187 || c === 191 || c === 215 || c === 247 || c >= 8208 && c <= 8213 || c >= 8214 && c <= 8215 || c === 8216 || c === 8217 || c === 8218 || c >= 8219 && c <= 8220 || c === 8221 || c === 8222 || c === 8223 || c >= 8224 && c <= 8231 || c >= 8240 && c <= 8248 || c === 8249 || c === 8250 || c >= 8251 && c <= 8254 || c >= 8257 && c <= 8259 || c === 8260 || c === 8261 || c === 8262 || c >= 8263 && c <= 8273 || c === 8274 || c === 8275 || c >= 8277 && c <= 8286 || c >= 8592 && c <= 8596 || c >= 8597 && c <= 8601 || c >= 8602 && c <= 8603 || c >= 8604 && c <= 8607 || c === 8608 || c >= 8609 && c <= 8610 || c === 8611 || c >= 8612 && c <= 8613 || c === 8614 || c >= 8615 && c <= 8621 || c === 8622 || c >= 8623 && c <= 8653 || c >= 8654 && c <= 8655 || c >= 8656 && c <= 8657 || c === 8658 || c === 8659 || c === 8660 || c >= 8661 && c <= 8691 || c >= 8692 && c <= 8959 || c >= 8960 && c <= 8967 || c === 8968 || c === 8969 || c === 8970 || c === 8971 || c >= 8972 && c <= 8991 || c >= 8992 && c <= 8993 || c >= 8994 && c <= 9e3 || c === 9001 || c === 9002 || c >= 9003 && c <= 9083 || c === 9084 || c >= 9085 && c <= 9114 || c >= 9115 && c <= 9139 || c >= 9140 && c <= 9179 || c >= 9180 && c <= 9185 || c >= 9186 && c <= 9254 || c >= 9255 && c <= 9279 || c >= 9280 && c <= 9290 || c >= 9291 && c <= 9311 || c >= 9472 && c <= 9654 || c === 9655 || c >= 9656 && c <= 9664 || c === 9665 || c >= 9666 && c <= 9719 || c >= 9720 && c <= 9727 || c >= 9728 && c <= 9838 || c === 9839 || c >= 9840 && c <= 10087 || c === 10088 || c === 10089 || c === 10090 || c === 10091 || c === 10092 || c === 10093 || c === 10094 || c === 10095 || c === 10096 || c === 10097 || c === 10098 || c === 10099 || c === 10100 || c === 10101 || c >= 10132 && c <= 10175 || c >= 10176 && c <= 10180 || c === 10181 || c === 10182 || c >= 10183 && c <= 10213 || c === 10214 || c === 10215 || c === 10216 || c === 10217 || c === 10218 || c === 10219 || c === 10220 || c === 10221 || c === 10222 || c === 10223 || c >= 10224 && c <= 10239 || c >= 10240 && c <= 10495 || c >= 10496 && c <= 10626 || c === 10627 || c === 10628 || c === 10629 || c === 10630 || c === 10631 || c === 10632 || c === 10633 || c === 10634 || c === 10635 || c === 10636 || c === 10637 || c === 10638 || c === 10639 || c === 10640 || c === 10641 || c === 10642 || c === 10643 || c === 10644 || c === 10645 || c === 10646 || c === 10647 || c === 10648 || c >= 10649 && c <= 10711 || c === 10712 || c === 10713 || c === 10714 || c === 10715 || c >= 10716 && c <= 10747 || c === 10748 || c === 10749 || c >= 10750 && c <= 11007 || c >= 11008 && c <= 11055 || c >= 11056 && c <= 11076 || c >= 11077 && c <= 11078 || c >= 11079 && c <= 11084 || c >= 11085 && c <= 11123 || c >= 11124 && c <= 11125 || c >= 11126 && c <= 11157 || c === 11158 || c >= 11159 && c <= 11263 || c >= 11776 && c <= 11777 || c === 11778 || c === 11779 || c === 11780 || c === 11781 || c >= 11782 && c <= 11784 || c === 11785 || c === 11786 || c === 11787 || c === 11788 || c === 11789 || c >= 11790 && c <= 11798 || c === 11799 || c >= 11800 && c <= 11801 || c === 11802 || c === 11803 || c === 11804 || c === 11805 || c >= 11806 && c <= 11807 || c === 11808 || c === 11809 || c === 11810 || c === 11811 || c === 11812 || c === 11813 || c === 11814 || c === 11815 || c === 11816 || c === 11817 || c >= 11818 && c <= 11822 || c === 11823 || c >= 11824 && c <= 11833 || c >= 11834 && c <= 11835 || c >= 11836 && c <= 11839 || c === 11840 || c === 11841 || c === 11842 || c >= 11843 && c <= 11855 || c >= 11856 && c <= 11857 || c === 11858 || c >= 11859 && c <= 11903 || c >= 12289 && c <= 12291 || c === 12296 || c === 12297 || c === 12298 || c === 12299 || c === 12300 || c === 12301 || c === 12302 || c === 12303 || c === 12304 || c === 12305 || c >= 12306 && c <= 12307 || c === 12308 || c === 12309 || c === 12310 || c === 12311 || c === 12312 || c === 12313 || c === 12314 || c === 12315 || c === 12316 || c === 12317 || c >= 12318 && c <= 12319 || c === 12320 || c === 12336 || c === 64830 || c === 64831 || c >= 65093 && c <= 65094;
3521
3155
  }
3522
3156
 
3523
- // ../../../../../../../../execroot/formatjs/bazel-out/darwin_arm64-fastbuild/bin/node_modules/.aspect_rules_js/@formatjs+icu-messageformat-parser@0.0.0/node_modules/@formatjs/icu-messageformat-parser/lib/index.js
3157
+ // ../../../../../../../../execroot/formatjs/bazel-out/darwin-fastbuild/bin/node_modules/.aspect_rules_js/@formatjs+icu-messageformat-parser@0.0.0/node_modules/@formatjs/icu-messageformat-parser/lib/index.js
3524
3158
  function pruneLocation(els) {
3525
3159
  els.forEach(function(el) {
3526
3160
  delete el.location;
@@ -3556,7 +3190,7 @@ var ReactIntl = (() => {
3556
3190
  return result.val;
3557
3191
  }
3558
3192
 
3559
- // ../../../../../../../../execroot/formatjs/bazel-out/darwin_arm64-fastbuild/bin/node_modules/.aspect_rules_js/@formatjs+fast-memoize@0.0.0/node_modules/@formatjs/fast-memoize/lib/index.js
3193
+ // ../../../../../../../../execroot/formatjs/bazel-out/darwin-fastbuild/bin/node_modules/.aspect_rules_js/@formatjs+fast-memoize@0.0.0/node_modules/@formatjs/fast-memoize/lib/index.js
3560
3194
  function memoize(fn, options) {
3561
3195
  var cache = options && options.cache ? options.cache : cacheDefault;
3562
3196
  var serializer = options && options.serializer ? options.serializer : serializerDefault;
@@ -3623,49 +3257,61 @@ var ReactIntl = (() => {
3623
3257
  monadic: strategyMonadic
3624
3258
  };
3625
3259
 
3626
- // ../../../../../../../../execroot/formatjs/bazel-out/darwin_arm64-fastbuild/bin/node_modules/.aspect_rules_js/intl-messageformat@0.0.0/node_modules/intl-messageformat/lib/src/error.js
3260
+ // ../../../../../../../../execroot/formatjs/bazel-out/darwin-fastbuild/bin/node_modules/.aspect_rules_js/intl-messageformat@0.0.0/node_modules/intl-messageformat/lib/src/error.js
3627
3261
  var ErrorCode;
3628
3262
  (function(ErrorCode2) {
3629
3263
  ErrorCode2["MISSING_VALUE"] = "MISSING_VALUE";
3630
3264
  ErrorCode2["INVALID_VALUE"] = "INVALID_VALUE";
3631
3265
  ErrorCode2["MISSING_INTL_API"] = "MISSING_INTL_API";
3632
3266
  })(ErrorCode || (ErrorCode = {}));
3633
- var FormatError = function(_super) {
3634
- __extends(FormatError2, _super);
3635
- function FormatError2(msg, code, originalMessage) {
3636
- var _this = _super.call(this, msg) || this;
3637
- _this.code = code;
3638
- _this.originalMessage = originalMessage;
3639
- return _this;
3640
- }
3641
- FormatError2.prototype.toString = function() {
3642
- return "[formatjs Error: ".concat(this.code, "] ").concat(this.message);
3643
- };
3644
- return FormatError2;
3645
- }(Error);
3646
- var InvalidValueError = function(_super) {
3647
- __extends(InvalidValueError2, _super);
3648
- function InvalidValueError2(variableId, value, options, originalMessage) {
3649
- return _super.call(this, 'Invalid values for "'.concat(variableId, '": "').concat(value, '". Options are "').concat(Object.keys(options).join('", "'), '"'), ErrorCode.INVALID_VALUE, originalMessage) || this;
3650
- }
3651
- return InvalidValueError2;
3652
- }(FormatError);
3653
- var InvalidValueTypeError = function(_super) {
3654
- __extends(InvalidValueTypeError2, _super);
3655
- function InvalidValueTypeError2(value, type, originalMessage) {
3656
- return _super.call(this, 'Value for "'.concat(value, '" must be of type ').concat(type), ErrorCode.INVALID_VALUE, originalMessage) || this;
3657
- }
3658
- return InvalidValueTypeError2;
3659
- }(FormatError);
3660
- var MissingValueError = function(_super) {
3661
- __extends(MissingValueError2, _super);
3662
- function MissingValueError2(variableId, originalMessage) {
3663
- return _super.call(this, 'The intl string context variable "'.concat(variableId, '" was not provided to the string "').concat(originalMessage, '"'), ErrorCode.MISSING_VALUE, originalMessage) || this;
3664
- }
3665
- return MissingValueError2;
3666
- }(FormatError);
3267
+ var FormatError = (
3268
+ /** @class */
3269
+ function(_super) {
3270
+ __extends(FormatError2, _super);
3271
+ function FormatError2(msg, code, originalMessage) {
3272
+ var _this = _super.call(this, msg) || this;
3273
+ _this.code = code;
3274
+ _this.originalMessage = originalMessage;
3275
+ return _this;
3276
+ }
3277
+ FormatError2.prototype.toString = function() {
3278
+ return "[formatjs Error: ".concat(this.code, "] ").concat(this.message);
3279
+ };
3280
+ return FormatError2;
3281
+ }(Error)
3282
+ );
3283
+ var InvalidValueError = (
3284
+ /** @class */
3285
+ function(_super) {
3286
+ __extends(InvalidValueError2, _super);
3287
+ function InvalidValueError2(variableId, value, options, originalMessage) {
3288
+ return _super.call(this, 'Invalid values for "'.concat(variableId, '": "').concat(value, '". Options are "').concat(Object.keys(options).join('", "'), '"'), ErrorCode.INVALID_VALUE, originalMessage) || this;
3289
+ }
3290
+ return InvalidValueError2;
3291
+ }(FormatError)
3292
+ );
3293
+ var InvalidValueTypeError = (
3294
+ /** @class */
3295
+ function(_super) {
3296
+ __extends(InvalidValueTypeError2, _super);
3297
+ function InvalidValueTypeError2(value, type, originalMessage) {
3298
+ return _super.call(this, 'Value for "'.concat(value, '" must be of type ').concat(type), ErrorCode.INVALID_VALUE, originalMessage) || this;
3299
+ }
3300
+ return InvalidValueTypeError2;
3301
+ }(FormatError)
3302
+ );
3303
+ var MissingValueError = (
3304
+ /** @class */
3305
+ function(_super) {
3306
+ __extends(MissingValueError2, _super);
3307
+ function MissingValueError2(variableId, originalMessage) {
3308
+ return _super.call(this, 'The intl string context variable "'.concat(variableId, '" was not provided to the string "').concat(originalMessage, '"'), ErrorCode.MISSING_VALUE, originalMessage) || this;
3309
+ }
3310
+ return MissingValueError2;
3311
+ }(FormatError)
3312
+ );
3667
3313
 
3668
- // ../../../../../../../../execroot/formatjs/bazel-out/darwin_arm64-fastbuild/bin/node_modules/.aspect_rules_js/intl-messageformat@0.0.0/node_modules/intl-messageformat/lib/src/formatters.js
3314
+ // ../../../../../../../../execroot/formatjs/bazel-out/darwin-fastbuild/bin/node_modules/.aspect_rules_js/intl-messageformat@0.0.0/node_modules/intl-messageformat/lib/src/formatters.js
3669
3315
  var PART_TYPE;
3670
3316
  (function(PART_TYPE2) {
3671
3317
  PART_TYPE2[PART_TYPE2["literal"] = 0] = "literal";
@@ -3805,7 +3451,7 @@ var ReactIntl = (() => {
3805
3451
  return mergeLiteral(result);
3806
3452
  }
3807
3453
 
3808
- // ../../../../../../../../execroot/formatjs/bazel-out/darwin_arm64-fastbuild/bin/node_modules/.aspect_rules_js/intl-messageformat@0.0.0/node_modules/intl-messageformat/lib/src/core.js
3454
+ // ../../../../../../../../execroot/formatjs/bazel-out/darwin-fastbuild/bin/node_modules/.aspect_rules_js/intl-messageformat@0.0.0/node_modules/intl-messageformat/lib/src/core.js
3809
3455
  function mergeConfig(c1, c2) {
3810
3456
  if (!c2) {
3811
3457
  return c1;
@@ -3882,150 +3528,153 @@ var ReactIntl = (() => {
3882
3528
  })
3883
3529
  };
3884
3530
  }
3885
- var IntlMessageFormat = function() {
3886
- function IntlMessageFormat2(message, locales, overrideFormats, opts) {
3887
- if (locales === void 0) {
3888
- locales = IntlMessageFormat2.defaultLocale;
3889
- }
3890
- var _this = this;
3891
- this.formatterCache = {
3892
- number: {},
3893
- dateTime: {},
3894
- pluralRules: {}
3895
- };
3896
- this.format = function(values) {
3897
- var parts = _this.formatToParts(values);
3898
- if (parts.length === 1) {
3899
- return parts[0].value;
3531
+ var IntlMessageFormat = (
3532
+ /** @class */
3533
+ function() {
3534
+ function IntlMessageFormat2(message, locales, overrideFormats, opts) {
3535
+ if (locales === void 0) {
3536
+ locales = IntlMessageFormat2.defaultLocale;
3900
3537
  }
3901
- var result = parts.reduce(function(all, part) {
3902
- if (!all.length || part.type !== PART_TYPE.literal || typeof all[all.length - 1] !== "string") {
3903
- all.push(part.value);
3904
- } else {
3905
- all[all.length - 1] += part.value;
3538
+ var _this = this;
3539
+ this.formatterCache = {
3540
+ number: {},
3541
+ dateTime: {},
3542
+ pluralRules: {}
3543
+ };
3544
+ this.format = function(values) {
3545
+ var parts = _this.formatToParts(values);
3546
+ if (parts.length === 1) {
3547
+ return parts[0].value;
3906
3548
  }
3907
- return all;
3908
- }, []);
3909
- if (result.length <= 1) {
3910
- return result[0] || "";
3911
- }
3912
- return result;
3913
- };
3914
- this.formatToParts = function(values) {
3915
- return formatToParts2(_this.ast, _this.locales, _this.formatters, _this.formats, values, void 0, _this.message);
3916
- };
3917
- this.resolvedOptions = function() {
3918
- var _a3;
3919
- return {
3920
- locale: ((_a3 = _this.resolvedLocale) === null || _a3 === void 0 ? void 0 : _a3.toString()) || Intl.NumberFormat.supportedLocalesOf(_this.locales)[0]
3549
+ var result = parts.reduce(function(all, part) {
3550
+ if (!all.length || part.type !== PART_TYPE.literal || typeof all[all.length - 1] !== "string") {
3551
+ all.push(part.value);
3552
+ } else {
3553
+ all[all.length - 1] += part.value;
3554
+ }
3555
+ return all;
3556
+ }, []);
3557
+ if (result.length <= 1) {
3558
+ return result[0] || "";
3559
+ }
3560
+ return result;
3921
3561
  };
3922
- };
3923
- this.getAst = function() {
3924
- return _this.ast;
3925
- };
3926
- this.locales = locales;
3927
- this.resolvedLocale = IntlMessageFormat2.resolveLocale(locales);
3928
- if (typeof message === "string") {
3929
- this.message = message;
3930
- if (!IntlMessageFormat2.__parse) {
3931
- throw new TypeError("IntlMessageFormat.__parse must be set to process `message` of type `string`");
3562
+ this.formatToParts = function(values) {
3563
+ return formatToParts2(_this.ast, _this.locales, _this.formatters, _this.formats, values, void 0, _this.message);
3564
+ };
3565
+ this.resolvedOptions = function() {
3566
+ var _a3;
3567
+ return {
3568
+ locale: ((_a3 = _this.resolvedLocale) === null || _a3 === void 0 ? void 0 : _a3.toString()) || Intl.NumberFormat.supportedLocalesOf(_this.locales)[0]
3569
+ };
3570
+ };
3571
+ this.getAst = function() {
3572
+ return _this.ast;
3573
+ };
3574
+ this.locales = locales;
3575
+ this.resolvedLocale = IntlMessageFormat2.resolveLocale(locales);
3576
+ if (typeof message === "string") {
3577
+ this.message = message;
3578
+ if (!IntlMessageFormat2.__parse) {
3579
+ throw new TypeError("IntlMessageFormat.__parse must be set to process `message` of type `string`");
3580
+ }
3581
+ var _a2 = opts || {}, formatters = _a2.formatters, parseOpts = __rest(_a2, ["formatters"]);
3582
+ this.ast = IntlMessageFormat2.__parse(message, __assign(__assign({}, parseOpts), { locale: this.resolvedLocale }));
3583
+ } else {
3584
+ this.ast = message;
3932
3585
  }
3933
- var _a2 = opts || {}, formatters = _a2.formatters, parseOpts = __rest(_a2, ["formatters"]);
3934
- this.ast = IntlMessageFormat2.__parse(message, __assign(__assign({}, parseOpts), { locale: this.resolvedLocale }));
3935
- } else {
3936
- this.ast = message;
3937
- }
3938
- if (!Array.isArray(this.ast)) {
3939
- throw new TypeError("A message must be provided as a String or AST.");
3940
- }
3941
- this.formats = mergeConfigs(IntlMessageFormat2.formats, overrideFormats);
3942
- this.formatters = opts && opts.formatters || createDefaultFormatters(this.formatterCache);
3943
- }
3944
- Object.defineProperty(IntlMessageFormat2, "defaultLocale", {
3945
- get: function() {
3946
- if (!IntlMessageFormat2.memoizedDefaultLocale) {
3947
- IntlMessageFormat2.memoizedDefaultLocale = new Intl.NumberFormat().resolvedOptions().locale;
3586
+ if (!Array.isArray(this.ast)) {
3587
+ throw new TypeError("A message must be provided as a String or AST.");
3948
3588
  }
3949
- return IntlMessageFormat2.memoizedDefaultLocale;
3950
- },
3951
- enumerable: false,
3952
- configurable: true
3953
- });
3954
- IntlMessageFormat2.memoizedDefaultLocale = null;
3955
- IntlMessageFormat2.resolveLocale = function(locales) {
3956
- if (typeof Intl.Locale === "undefined") {
3957
- return;
3958
- }
3959
- var supportedLocales = Intl.NumberFormat.supportedLocalesOf(locales);
3960
- if (supportedLocales.length > 0) {
3961
- return new Intl.Locale(supportedLocales[0]);
3589
+ this.formats = mergeConfigs(IntlMessageFormat2.formats, overrideFormats);
3590
+ this.formatters = opts && opts.formatters || createDefaultFormatters(this.formatterCache);
3962
3591
  }
3963
- return new Intl.Locale(typeof locales === "string" ? locales : locales[0]);
3964
- };
3965
- IntlMessageFormat2.__parse = parse;
3966
- IntlMessageFormat2.formats = {
3967
- number: {
3968
- integer: {
3969
- maximumFractionDigits: 0
3970
- },
3971
- currency: {
3972
- style: "currency"
3592
+ Object.defineProperty(IntlMessageFormat2, "defaultLocale", {
3593
+ get: function() {
3594
+ if (!IntlMessageFormat2.memoizedDefaultLocale) {
3595
+ IntlMessageFormat2.memoizedDefaultLocale = new Intl.NumberFormat().resolvedOptions().locale;
3596
+ }
3597
+ return IntlMessageFormat2.memoizedDefaultLocale;
3973
3598
  },
3974
- percent: {
3975
- style: "percent"
3599
+ enumerable: false,
3600
+ configurable: true
3601
+ });
3602
+ IntlMessageFormat2.memoizedDefaultLocale = null;
3603
+ IntlMessageFormat2.resolveLocale = function(locales) {
3604
+ if (typeof Intl.Locale === "undefined") {
3605
+ return;
3976
3606
  }
3977
- },
3978
- date: {
3979
- short: {
3980
- month: "numeric",
3981
- day: "numeric",
3982
- year: "2-digit"
3983
- },
3984
- medium: {
3985
- month: "short",
3986
- day: "numeric",
3987
- year: "numeric"
3988
- },
3989
- long: {
3990
- month: "long",
3991
- day: "numeric",
3992
- year: "numeric"
3993
- },
3994
- full: {
3995
- weekday: "long",
3996
- month: "long",
3997
- day: "numeric",
3998
- year: "numeric"
3607
+ var supportedLocales = Intl.NumberFormat.supportedLocalesOf(locales);
3608
+ if (supportedLocales.length > 0) {
3609
+ return new Intl.Locale(supportedLocales[0]);
3999
3610
  }
4000
- },
4001
- time: {
4002
- short: {
4003
- hour: "numeric",
4004
- minute: "numeric"
4005
- },
4006
- medium: {
4007
- hour: "numeric",
4008
- minute: "numeric",
4009
- second: "numeric"
3611
+ return new Intl.Locale(typeof locales === "string" ? locales : locales[0]);
3612
+ };
3613
+ IntlMessageFormat2.__parse = parse;
3614
+ IntlMessageFormat2.formats = {
3615
+ number: {
3616
+ integer: {
3617
+ maximumFractionDigits: 0
3618
+ },
3619
+ currency: {
3620
+ style: "currency"
3621
+ },
3622
+ percent: {
3623
+ style: "percent"
3624
+ }
4010
3625
  },
4011
- long: {
4012
- hour: "numeric",
4013
- minute: "numeric",
4014
- second: "numeric",
4015
- timeZoneName: "short"
3626
+ date: {
3627
+ short: {
3628
+ month: "numeric",
3629
+ day: "numeric",
3630
+ year: "2-digit"
3631
+ },
3632
+ medium: {
3633
+ month: "short",
3634
+ day: "numeric",
3635
+ year: "numeric"
3636
+ },
3637
+ long: {
3638
+ month: "long",
3639
+ day: "numeric",
3640
+ year: "numeric"
3641
+ },
3642
+ full: {
3643
+ weekday: "long",
3644
+ month: "long",
3645
+ day: "numeric",
3646
+ year: "numeric"
3647
+ }
4016
3648
  },
4017
- full: {
4018
- hour: "numeric",
4019
- minute: "numeric",
4020
- second: "numeric",
4021
- timeZoneName: "short"
3649
+ time: {
3650
+ short: {
3651
+ hour: "numeric",
3652
+ minute: "numeric"
3653
+ },
3654
+ medium: {
3655
+ hour: "numeric",
3656
+ minute: "numeric",
3657
+ second: "numeric"
3658
+ },
3659
+ long: {
3660
+ hour: "numeric",
3661
+ minute: "numeric",
3662
+ second: "numeric",
3663
+ timeZoneName: "short"
3664
+ },
3665
+ full: {
3666
+ hour: "numeric",
3667
+ minute: "numeric",
3668
+ second: "numeric",
3669
+ timeZoneName: "short"
3670
+ }
4022
3671
  }
4023
- }
4024
- };
4025
- return IntlMessageFormat2;
4026
- }();
3672
+ };
3673
+ return IntlMessageFormat2;
3674
+ }()
3675
+ );
4027
3676
 
4028
- // ../../../../../../../../execroot/formatjs/bazel-out/darwin_arm64-fastbuild/bin/node_modules/.aspect_rules_js/@formatjs+intl@0.0.0/node_modules/@formatjs/intl/lib/src/error.js
3677
+ // ../../../../../../../../execroot/formatjs/bazel-out/darwin-fastbuild/bin/node_modules/.aspect_rules_js/@formatjs+intl@0.0.0/node_modules/@formatjs/intl/lib/src/error.js
4029
3678
  var IntlErrorCode;
4030
3679
  (function(IntlErrorCode2) {
4031
3680
  IntlErrorCode2["FORMAT_ERROR"] = "FORMAT_ERROR";
@@ -4034,71 +3683,95 @@ var ReactIntl = (() => {
4034
3683
  IntlErrorCode2["MISSING_DATA"] = "MISSING_DATA";
4035
3684
  IntlErrorCode2["MISSING_TRANSLATION"] = "MISSING_TRANSLATION";
4036
3685
  })(IntlErrorCode || (IntlErrorCode = {}));
4037
- var IntlError = function(_super) {
4038
- __extends(IntlError2, _super);
4039
- function IntlError2(code, message, exception) {
4040
- var _this = this;
4041
- var err = exception ? exception instanceof Error ? exception : new Error(String(exception)) : void 0;
4042
- _this = _super.call(this, "[@formatjs/intl Error ".concat(code, "] ").concat(message, "\n").concat(err ? "\n".concat(err.message, "\n").concat(err.stack) : "")) || this;
4043
- _this.code = code;
4044
- if (typeof Error.captureStackTrace === "function") {
4045
- Error.captureStackTrace(_this, IntlError2);
3686
+ var IntlError = (
3687
+ /** @class */
3688
+ function(_super) {
3689
+ __extends(IntlError2, _super);
3690
+ function IntlError2(code, message, exception) {
3691
+ var _this = this;
3692
+ var err = exception ? exception instanceof Error ? exception : new Error(String(exception)) : void 0;
3693
+ _this = _super.call(this, "[@formatjs/intl Error ".concat(code, "] ").concat(message, "\n").concat(err ? "\n".concat(err.message, "\n").concat(err.stack) : "")) || this;
3694
+ _this.code = code;
3695
+ if (typeof Error.captureStackTrace === "function") {
3696
+ Error.captureStackTrace(_this, IntlError2);
3697
+ }
3698
+ return _this;
4046
3699
  }
4047
- return _this;
4048
- }
4049
- return IntlError2;
4050
- }(Error);
4051
- var UnsupportedFormatterError = function(_super) {
4052
- __extends(UnsupportedFormatterError2, _super);
4053
- function UnsupportedFormatterError2(message, exception) {
4054
- return _super.call(this, IntlErrorCode.UNSUPPORTED_FORMATTER, message, exception) || this;
4055
- }
4056
- return UnsupportedFormatterError2;
4057
- }(IntlError);
4058
- var InvalidConfigError = function(_super) {
4059
- __extends(InvalidConfigError2, _super);
4060
- function InvalidConfigError2(message, exception) {
4061
- return _super.call(this, IntlErrorCode.INVALID_CONFIG, message, exception) || this;
4062
- }
4063
- return InvalidConfigError2;
4064
- }(IntlError);
4065
- var MissingDataError = function(_super) {
4066
- __extends(MissingDataError2, _super);
4067
- function MissingDataError2(message, exception) {
4068
- return _super.call(this, IntlErrorCode.MISSING_DATA, message, exception) || this;
4069
- }
4070
- return MissingDataError2;
4071
- }(IntlError);
4072
- var IntlFormatError = function(_super) {
4073
- __extends(IntlFormatError2, _super);
4074
- function IntlFormatError2(message, locale, exception) {
4075
- return _super.call(this, IntlErrorCode.FORMAT_ERROR, "".concat(message, "\nLocale: ").concat(locale, "\n"), exception) || this;
4076
- }
4077
- return IntlFormatError2;
4078
- }(IntlError);
4079
- var MessageFormatError = function(_super) {
4080
- __extends(MessageFormatError2, _super);
4081
- function MessageFormatError2(message, locale, descriptor, exception) {
4082
- var _this = _super.call(this, "".concat(message, "\nMessageID: ").concat(descriptor === null || descriptor === void 0 ? void 0 : descriptor.id, "\nDefault Message: ").concat(descriptor === null || descriptor === void 0 ? void 0 : descriptor.defaultMessage, "\nDescription: ").concat(descriptor === null || descriptor === void 0 ? void 0 : descriptor.description, "\n"), locale, exception) || this;
4083
- _this.descriptor = descriptor;
4084
- return _this;
4085
- }
4086
- return MessageFormatError2;
4087
- }(IntlFormatError);
4088
- var MissingTranslationError = function(_super) {
4089
- __extends(MissingTranslationError2, _super);
4090
- function MissingTranslationError2(descriptor, locale) {
4091
- var _this = _super.call(this, IntlErrorCode.MISSING_TRANSLATION, 'Missing message: "'.concat(descriptor.id, '" for locale "').concat(locale, '", using ').concat(descriptor.defaultMessage ? "default message (".concat(typeof descriptor.defaultMessage === "string" ? descriptor.defaultMessage : descriptor.defaultMessage.map(function(e) {
4092
- var _a2;
4093
- return (_a2 = e.value) !== null && _a2 !== void 0 ? _a2 : JSON.stringify(e);
4094
- }).join(), ")") : "id", " as fallback.")) || this;
4095
- _this.descriptor = descriptor;
4096
- return _this;
4097
- }
4098
- return MissingTranslationError2;
4099
- }(IntlError);
3700
+ return IntlError2;
3701
+ }(Error)
3702
+ );
3703
+ var UnsupportedFormatterError = (
3704
+ /** @class */
3705
+ function(_super) {
3706
+ __extends(UnsupportedFormatterError2, _super);
3707
+ function UnsupportedFormatterError2(message, exception) {
3708
+ return _super.call(this, IntlErrorCode.UNSUPPORTED_FORMATTER, message, exception) || this;
3709
+ }
3710
+ return UnsupportedFormatterError2;
3711
+ }(IntlError)
3712
+ );
3713
+ var InvalidConfigError = (
3714
+ /** @class */
3715
+ function(_super) {
3716
+ __extends(InvalidConfigError2, _super);
3717
+ function InvalidConfigError2(message, exception) {
3718
+ return _super.call(this, IntlErrorCode.INVALID_CONFIG, message, exception) || this;
3719
+ }
3720
+ return InvalidConfigError2;
3721
+ }(IntlError)
3722
+ );
3723
+ var MissingDataError = (
3724
+ /** @class */
3725
+ function(_super) {
3726
+ __extends(MissingDataError2, _super);
3727
+ function MissingDataError2(message, exception) {
3728
+ return _super.call(this, IntlErrorCode.MISSING_DATA, message, exception) || this;
3729
+ }
3730
+ return MissingDataError2;
3731
+ }(IntlError)
3732
+ );
3733
+ var IntlFormatError = (
3734
+ /** @class */
3735
+ function(_super) {
3736
+ __extends(IntlFormatError2, _super);
3737
+ function IntlFormatError2(message, locale, exception) {
3738
+ var _this = _super.call(this, IntlErrorCode.FORMAT_ERROR, "".concat(message, "\nLocale: ").concat(locale, "\n"), exception) || this;
3739
+ _this.locale = locale;
3740
+ return _this;
3741
+ }
3742
+ return IntlFormatError2;
3743
+ }(IntlError)
3744
+ );
3745
+ var MessageFormatError = (
3746
+ /** @class */
3747
+ function(_super) {
3748
+ __extends(MessageFormatError2, _super);
3749
+ function MessageFormatError2(message, locale, descriptor, exception) {
3750
+ var _this = _super.call(this, "".concat(message, "\nMessageID: ").concat(descriptor === null || descriptor === void 0 ? void 0 : descriptor.id, "\nDefault Message: ").concat(descriptor === null || descriptor === void 0 ? void 0 : descriptor.defaultMessage, "\nDescription: ").concat(descriptor === null || descriptor === void 0 ? void 0 : descriptor.description, "\n"), locale, exception) || this;
3751
+ _this.descriptor = descriptor;
3752
+ _this.locale = locale;
3753
+ return _this;
3754
+ }
3755
+ return MessageFormatError2;
3756
+ }(IntlFormatError)
3757
+ );
3758
+ var MissingTranslationError = (
3759
+ /** @class */
3760
+ function(_super) {
3761
+ __extends(MissingTranslationError2, _super);
3762
+ function MissingTranslationError2(descriptor, locale) {
3763
+ var _this = _super.call(this, IntlErrorCode.MISSING_TRANSLATION, 'Missing message: "'.concat(descriptor.id, '" for locale "').concat(locale, '", using ').concat(descriptor.defaultMessage ? "default message (".concat(typeof descriptor.defaultMessage === "string" ? descriptor.defaultMessage : descriptor.defaultMessage.map(function(e) {
3764
+ var _a2;
3765
+ return (_a2 = e.value) !== null && _a2 !== void 0 ? _a2 : JSON.stringify(e);
3766
+ }).join(), ")") : "id", " as fallback.")) || this;
3767
+ _this.descriptor = descriptor;
3768
+ return _this;
3769
+ }
3770
+ return MissingTranslationError2;
3771
+ }(IntlError)
3772
+ );
4100
3773
 
4101
- // ../../../../../../../../execroot/formatjs/bazel-out/darwin_arm64-fastbuild/bin/node_modules/.aspect_rules_js/@formatjs+intl@0.0.0/node_modules/@formatjs/intl/lib/src/utils.js
3774
+ // ../../../../../../../../execroot/formatjs/bazel-out/darwin-fastbuild/bin/node_modules/.aspect_rules_js/@formatjs+intl@0.0.0/node_modules/@formatjs/intl/lib/src/utils.js
4102
3775
  function filterProps(props, allowlist, defaults) {
4103
3776
  if (defaults === void 0) {
4104
3777
  defaults = {};
@@ -4255,7 +3928,7 @@ var ReactIntl = (() => {
4255
3928
  onError(new UnsupportedFormatterError("No ".concat(type, " format named: ").concat(name)));
4256
3929
  }
4257
3930
 
4258
- // ../../../../../../../../execroot/formatjs/bazel-out/darwin_arm64-fastbuild/bin/node_modules/.aspect_rules_js/@formatjs+intl@0.0.0/node_modules/@formatjs/intl/lib/src/message.js
3931
+ // ../../../../../../../../execroot/formatjs/bazel-out/darwin-fastbuild/bin/node_modules/.aspect_rules_js/@formatjs+intl@0.0.0/node_modules/@formatjs/intl/lib/src/message.js
4259
3932
  function setTimeZoneInOptions(opts, timeZone) {
4260
3933
  return Object.keys(opts).reduce(function(all, k) {
4261
3934
  all[k] = __assign({ timeZone }, opts[k]);
@@ -4284,7 +3957,12 @@ var ReactIntl = (() => {
4284
3957
  var msgId = messageDescriptor.id, defaultMessage = messageDescriptor.defaultMessage;
4285
3958
  invariant(!!msgId, "[@formatjs/intl] An `id` must be provided to format a message. You can either:\n1. Configure your build toolchain with [babel-plugin-formatjs](https://formatjs.io/docs/tooling/babel-plugin)\nor [@formatjs/ts-transformer](https://formatjs.io/docs/tooling/ts-transformer) OR\n2. Configure your `eslint` config to include [eslint-plugin-formatjs](https://formatjs.io/docs/tooling/linter#enforce-id)\nto autofix this issue");
4286
3959
  var id = String(msgId);
4287
- var message = messages && Object.prototype.hasOwnProperty.call(messages, id) && messages[id];
3960
+ var message = (
3961
+ // In case messages is Object.create(null)
3962
+ // e.g import('foo.json') from webpack)
3963
+ // See https://github.com/formatjs/formatjs/issues/1914
3964
+ messages && Object.prototype.hasOwnProperty.call(messages, id) && messages[id]
3965
+ );
4288
3966
  if (Array.isArray(message) && message.length === 1 && message[0].type === TYPE.literal) {
4289
3967
  return message[0].value;
4290
3968
  }
@@ -4335,7 +4013,7 @@ var ReactIntl = (() => {
4335
4013
  return id;
4336
4014
  };
4337
4015
 
4338
- // ../../../../../../../../execroot/formatjs/bazel-out/darwin_arm64-fastbuild/bin/node_modules/.aspect_rules_js/@formatjs+intl@0.0.0/node_modules/@formatjs/intl/lib/src/dateTime.js
4016
+ // ../../../../../../../../execroot/formatjs/bazel-out/darwin-fastbuild/bin/node_modules/.aspect_rules_js/@formatjs+intl@0.0.0/node_modules/@formatjs/intl/lib/src/dateTime.js
4339
4017
  var DATE_TIME_FORMAT_OPTIONS = [
4340
4018
  "formatMatcher",
4341
4019
  "timeZone",
@@ -4353,6 +4031,7 @@ var ReactIntl = (() => {
4353
4031
  "dateStyle",
4354
4032
  "timeStyle",
4355
4033
  "calendar",
4034
+ // 'dayPeriod',
4356
4035
  "numberingSystem",
4357
4036
  "fractionalSecondDigits"
4358
4037
  ];
@@ -4379,7 +4058,7 @@ var ReactIntl = (() => {
4379
4058
  try {
4380
4059
  return getFormatter(config, "date", getDateTimeFormat, options).format(date);
4381
4060
  } catch (e) {
4382
- config.onError(new IntlError(IntlErrorCode.FORMAT_ERROR, "Error formatting date.", e));
4061
+ config.onError(new IntlFormatError("Error formatting date.", config.locale, e));
4383
4062
  }
4384
4063
  return String(date);
4385
4064
  }
@@ -4393,7 +4072,7 @@ var ReactIntl = (() => {
4393
4072
  try {
4394
4073
  return getFormatter(config, "time", getDateTimeFormat, options).format(date);
4395
4074
  } catch (e) {
4396
- config.onError(new IntlError(IntlErrorCode.FORMAT_ERROR, "Error formatting time.", e));
4075
+ config.onError(new IntlFormatError("Error formatting time.", config.locale, e));
4397
4076
  }
4398
4077
  return String(date);
4399
4078
  }
@@ -4408,7 +4087,7 @@ var ReactIntl = (() => {
4408
4087
  try {
4409
4088
  return getDateTimeFormat(locale, filteredOptions).formatRange(from, to);
4410
4089
  } catch (e) {
4411
- onError(new IntlError(IntlErrorCode.FORMAT_ERROR, "Error formatting date time range.", e));
4090
+ onError(new IntlFormatError("Error formatting date time range.", config.locale, e));
4412
4091
  }
4413
4092
  return String(from);
4414
4093
  }
@@ -4422,7 +4101,7 @@ var ReactIntl = (() => {
4422
4101
  try {
4423
4102
  return getFormatter(config, "date", getDateTimeFormat, options).formatToParts(date);
4424
4103
  } catch (e) {
4425
- config.onError(new IntlError(IntlErrorCode.FORMAT_ERROR, "Error formatting date.", e));
4104
+ config.onError(new IntlFormatError("Error formatting date.", config.locale, e));
4426
4105
  }
4427
4106
  return [];
4428
4107
  }
@@ -4436,12 +4115,12 @@ var ReactIntl = (() => {
4436
4115
  try {
4437
4116
  return getFormatter(config, "time", getDateTimeFormat, options).formatToParts(date);
4438
4117
  } catch (e) {
4439
- config.onError(new IntlError(IntlErrorCode.FORMAT_ERROR, "Error formatting time.", e));
4118
+ config.onError(new IntlFormatError("Error formatting time.", config.locale, e));
4440
4119
  }
4441
4120
  return [];
4442
4121
  }
4443
4122
 
4444
- // ../../../../../../../../execroot/formatjs/bazel-out/darwin_arm64-fastbuild/bin/node_modules/.aspect_rules_js/@formatjs+intl@0.0.0/node_modules/@formatjs/intl/lib/src/displayName.js
4123
+ // ../../../../../../../../execroot/formatjs/bazel-out/darwin-fastbuild/bin/node_modules/.aspect_rules_js/@formatjs+intl@0.0.0/node_modules/@formatjs/intl/lib/src/displayName.js
4445
4124
  var DISPLAY_NAMES_OPTONS = [
4446
4125
  "style",
4447
4126
  "type",
@@ -4458,11 +4137,11 @@ var ReactIntl = (() => {
4458
4137
  try {
4459
4138
  return getDisplayNames(locale, filteredOptions).of(value);
4460
4139
  } catch (e) {
4461
- onError(new IntlError(IntlErrorCode.FORMAT_ERROR, "Error formatting display name.", e));
4140
+ onError(new IntlFormatError("Error formatting display name.", locale, e));
4462
4141
  }
4463
4142
  }
4464
4143
 
4465
- // ../../../../../../../../execroot/formatjs/bazel-out/darwin_arm64-fastbuild/bin/node_modules/.aspect_rules_js/@formatjs+intl@0.0.0/node_modules/@formatjs/intl/lib/src/list.js
4144
+ // ../../../../../../../../execroot/formatjs/bazel-out/darwin-fastbuild/bin/node_modules/.aspect_rules_js/@formatjs+intl@0.0.0/node_modules/@formatjs/intl/lib/src/list.js
4466
4145
  var LIST_FORMAT_OPTIONS = [
4467
4146
  "type",
4468
4147
  "style"
@@ -4512,12 +4191,12 @@ var ReactIntl = (() => {
4512
4191
  return part.type === "literal" ? part : __assign(__assign({}, part), { value: richValues_1[part.value] || part.value });
4513
4192
  });
4514
4193
  } catch (e) {
4515
- onError(new IntlError(IntlErrorCode.FORMAT_ERROR, "Error formatting list.", e));
4194
+ onError(new IntlFormatError("Error formatting list.", locale, e));
4516
4195
  }
4517
4196
  return values;
4518
4197
  }
4519
4198
 
4520
- // ../../../../../../../../execroot/formatjs/bazel-out/darwin_arm64-fastbuild/bin/node_modules/.aspect_rules_js/@formatjs+intl@0.0.0/node_modules/@formatjs/intl/lib/src/plural.js
4199
+ // ../../../../../../../../execroot/formatjs/bazel-out/darwin-fastbuild/bin/node_modules/.aspect_rules_js/@formatjs+intl@0.0.0/node_modules/@formatjs/intl/lib/src/plural.js
4521
4200
  var PLURAL_FORMAT_OPTIONS = ["type"];
4522
4201
  function formatPlural(_a2, getPluralRules, value, options) {
4523
4202
  var locale = _a2.locale, onError = _a2.onError;
@@ -4536,7 +4215,7 @@ var ReactIntl = (() => {
4536
4215
  return "other";
4537
4216
  }
4538
4217
 
4539
- // ../../../../../../../../execroot/formatjs/bazel-out/darwin_arm64-fastbuild/bin/node_modules/.aspect_rules_js/@formatjs+intl@0.0.0/node_modules/@formatjs/intl/lib/src/relativeTime.js
4218
+ // ../../../../../../../../execroot/formatjs/bazel-out/darwin-fastbuild/bin/node_modules/.aspect_rules_js/@formatjs+intl@0.0.0/node_modules/@formatjs/intl/lib/src/relativeTime.js
4540
4219
  var RELATIVE_TIME_FORMAT_OPTIONS = ["numeric", "style"];
4541
4220
  function getFormatter2(_a2, getRelativeTimeFormat, options) {
4542
4221
  var locale = _a2.locale, formats = _a2.formats, onError = _a2.onError;
@@ -4567,7 +4246,7 @@ var ReactIntl = (() => {
4567
4246
  return String(value);
4568
4247
  }
4569
4248
 
4570
- // ../../../../../../../../execroot/formatjs/bazel-out/darwin_arm64-fastbuild/bin/node_modules/.aspect_rules_js/@formatjs+intl@0.0.0/node_modules/@formatjs/intl/lib/src/number.js
4249
+ // ../../../../../../../../execroot/formatjs/bazel-out/darwin-fastbuild/bin/node_modules/.aspect_rules_js/@formatjs+intl@0.0.0/node_modules/@formatjs/intl/lib/src/number.js
4571
4250
  var NUMBER_FORMAT_OPTIONS = [
4572
4251
  "style",
4573
4252
  "currency",
@@ -4580,6 +4259,7 @@ var ReactIntl = (() => {
4580
4259
  "maximumFractionDigits",
4581
4260
  "minimumSignificantDigits",
4582
4261
  "maximumSignificantDigits",
4262
+ // ES2020 NumberFormat
4583
4263
  "compactDisplay",
4584
4264
  "currencyDisplay",
4585
4265
  "currencySign",
@@ -4606,7 +4286,7 @@ var ReactIntl = (() => {
4606
4286
  try {
4607
4287
  return getFormatter3(config, getNumberFormat, options).format(value);
4608
4288
  } catch (e) {
4609
- config.onError(new IntlError(IntlErrorCode.FORMAT_ERROR, "Error formatting number.", e));
4289
+ config.onError(new IntlFormatError("Error formatting number.", config.locale, e));
4610
4290
  }
4611
4291
  return String(value);
4612
4292
  }
@@ -4617,12 +4297,12 @@ var ReactIntl = (() => {
4617
4297
  try {
4618
4298
  return getFormatter3(config, getNumberFormat, options).formatToParts(value);
4619
4299
  } catch (e) {
4620
- config.onError(new IntlError(IntlErrorCode.FORMAT_ERROR, "Error formatting number.", e));
4300
+ config.onError(new IntlFormatError("Error formatting number.", config.locale, e));
4621
4301
  }
4622
4302
  return [];
4623
4303
  }
4624
4304
 
4625
- // ../../../../../../../../execroot/formatjs/bazel-out/darwin_arm64-fastbuild/bin/node_modules/.aspect_rules_js/@formatjs+intl@0.0.0/node_modules/@formatjs/intl/lib/src/create-intl.js
4305
+ // ../../../../../../../../execroot/formatjs/bazel-out/darwin-fastbuild/bin/node_modules/.aspect_rules_js/@formatjs+intl@0.0.0/node_modules/@formatjs/intl/lib/src/create-intl.js
4626
4306
  function messagesContainString(messages) {
4627
4307
  var firstMessage = messages ? messages[Object.keys(messages)[0]] : void 0;
4628
4308
  return typeof firstMessage === "string";
@@ -4658,7 +4338,9 @@ var ReactIntl = (() => {
4658
4338
  formatDateTimeRange: formatDateTimeRange.bind(null, resolvedConfig, formatters.getDateTimeFormat),
4659
4339
  formatTimeToParts: formatTimeToParts.bind(null, resolvedConfig, formatters.getDateTimeFormat),
4660
4340
  formatPlural: formatPlural.bind(null, resolvedConfig, formatters.getPluralRules),
4341
+ // @ts-expect-error TODO: will get to this later
4661
4342
  formatMessage: formatMessage.bind(null, resolvedConfig, formatters),
4343
+ // @ts-expect-error TODO: will get to this later
4662
4344
  $t: formatMessage.bind(null, resolvedConfig, formatters),
4663
4345
  formatList: formatList.bind(null, resolvedConfig, formatters.getListFormat),
4664
4346
  formatListToParts: formatListToParts.bind(null, resolvedConfig, formatters.getListFormat),
@@ -4666,7 +4348,7 @@ var ReactIntl = (() => {
4666
4348
  });
4667
4349
  }
4668
4350
 
4669
- // ../../../../../../../../execroot/formatjs/bazel-out/darwin_arm64-fastbuild/bin/packages/react-intl/lib/src/utils.js
4351
+ // ../../../../../../../../execroot/formatjs/bazel-out/darwin-fastbuild/bin/packages/react-intl/lib/src/utils.js
4670
4352
  function invariantIntlContext(intl) {
4671
4353
  invariant(intl, "[React Intl] Could not find required `intl` object. <IntlProvider> needs to exist in the component ancestry.");
4672
4354
  }
@@ -4698,7 +4380,7 @@ var ReactIntl = (() => {
4698
4380
  return true;
4699
4381
  }
4700
4382
 
4701
- // ../../../../../../../../execroot/formatjs/bazel-out/darwin_arm64-fastbuild/bin/packages/react-intl/lib/src/components/injectIntl.js
4383
+ // ../../../../../../../../execroot/formatjs/bazel-out/darwin-fastbuild/bin/packages/react-intl/lib/src/components/injectIntl.js
4702
4384
  function getDisplayName(Component) {
4703
4385
  return Component.displayName || Component.name || "Component";
4704
4386
  }
@@ -4729,14 +4411,14 @@ var ReactIntl = (() => {
4729
4411
  return (0, import_hoist_non_react_statics.default)(WithIntl, WrappedComponent);
4730
4412
  }
4731
4413
 
4732
- // ../../../../../../../../execroot/formatjs/bazel-out/darwin_arm64-fastbuild/bin/packages/react-intl/lib/src/components/useIntl.js
4414
+ // ../../../../../../../../execroot/formatjs/bazel-out/darwin-fastbuild/bin/packages/react-intl/lib/src/components/useIntl.js
4733
4415
  function useIntl() {
4734
4416
  var intl = React3.useContext(Context);
4735
4417
  invariantIntlContext(intl);
4736
4418
  return intl;
4737
4419
  }
4738
4420
 
4739
- // ../../../../../../../../execroot/formatjs/bazel-out/darwin_arm64-fastbuild/bin/packages/react-intl/lib/src/components/createFormattedComponent.js
4421
+ // ../../../../../../../../execroot/formatjs/bazel-out/darwin-fastbuild/bin/packages/react-intl/lib/src/components/createFormattedComponent.js
4740
4422
  var DisplayName;
4741
4423
  (function(DisplayName2) {
4742
4424
  DisplayName2["formatDate"] = "FormattedDate";
@@ -4793,7 +4475,7 @@ var ReactIntl = (() => {
4793
4475
  return Component;
4794
4476
  }
4795
4477
 
4796
- // ../../../../../../../../execroot/formatjs/bazel-out/darwin_arm64-fastbuild/bin/packages/react-intl/lib/src/components/provider.js
4478
+ // ../../../../../../../../execroot/formatjs/bazel-out/darwin-fastbuild/bin/packages/react-intl/lib/src/components/provider.js
4797
4479
  var React5 = __toESM(window.React);
4798
4480
  function processIntlConfig(config) {
4799
4481
  return {
@@ -4854,44 +4536,49 @@ var ReactIntl = (() => {
4854
4536
  defaultRichTextElements
4855
4537
  };
4856
4538
  return __assign(__assign({}, coreIntl), {
4539
+ // @ts-expect-error fix this
4857
4540
  formatMessage: formatMessage2.bind(null, resolvedConfig, coreIntl.formatters),
4541
+ // @ts-expect-error fix this
4858
4542
  $t: formatMessage2.bind(null, resolvedConfig, coreIntl.formatters)
4859
4543
  });
4860
4544
  };
4861
- var IntlProvider2 = function(_super) {
4862
- __extends(IntlProvider3, _super);
4863
- function IntlProvider3() {
4864
- var _this = _super !== null && _super.apply(this, arguments) || this;
4865
- _this.cache = createIntlCache();
4866
- _this.state = {
4867
- cache: _this.cache,
4868
- intl: createIntl2(processIntlConfig(_this.props), _this.cache),
4869
- prevConfig: processIntlConfig(_this.props)
4870
- };
4871
- return _this;
4872
- }
4873
- IntlProvider3.getDerivedStateFromProps = function(props, _a2) {
4874
- var prevConfig = _a2.prevConfig, cache = _a2.cache;
4875
- var config = processIntlConfig(props);
4876
- if (!shallowEqual(prevConfig, config)) {
4877
- return {
4878
- intl: createIntl2(config, cache),
4879
- prevConfig: config
4545
+ var IntlProvider2 = (
4546
+ /** @class */
4547
+ function(_super) {
4548
+ __extends(IntlProvider3, _super);
4549
+ function IntlProvider3() {
4550
+ var _this = _super !== null && _super.apply(this, arguments) || this;
4551
+ _this.cache = createIntlCache();
4552
+ _this.state = {
4553
+ cache: _this.cache,
4554
+ intl: createIntl2(processIntlConfig(_this.props), _this.cache),
4555
+ prevConfig: processIntlConfig(_this.props)
4880
4556
  };
4557
+ return _this;
4881
4558
  }
4882
- return null;
4883
- };
4884
- IntlProvider3.prototype.render = function() {
4885
- invariantIntlContext(this.state.intl);
4886
- return React5.createElement(Provider, { value: this.state.intl }, this.props.children);
4887
- };
4888
- IntlProvider3.displayName = "IntlProvider";
4889
- IntlProvider3.defaultProps = DEFAULT_INTL_CONFIG2;
4890
- return IntlProvider3;
4891
- }(React5.PureComponent);
4559
+ IntlProvider3.getDerivedStateFromProps = function(props, _a2) {
4560
+ var prevConfig = _a2.prevConfig, cache = _a2.cache;
4561
+ var config = processIntlConfig(props);
4562
+ if (!shallowEqual(prevConfig, config)) {
4563
+ return {
4564
+ intl: createIntl2(config, cache),
4565
+ prevConfig: config
4566
+ };
4567
+ }
4568
+ return null;
4569
+ };
4570
+ IntlProvider3.prototype.render = function() {
4571
+ invariantIntlContext(this.state.intl);
4572
+ return React5.createElement(Provider, { value: this.state.intl }, this.props.children);
4573
+ };
4574
+ IntlProvider3.displayName = "IntlProvider";
4575
+ IntlProvider3.defaultProps = DEFAULT_INTL_CONFIG2;
4576
+ return IntlProvider3;
4577
+ }(React5.PureComponent)
4578
+ );
4892
4579
  var provider_default = IntlProvider2;
4893
4580
 
4894
- // ../../../../../../../../execroot/formatjs/bazel-out/darwin_arm64-fastbuild/bin/packages/react-intl/lib/src/components/relative.js
4581
+ // ../../../../../../../../execroot/formatjs/bazel-out/darwin-fastbuild/bin/packages/react-intl/lib/src/components/relative.js
4895
4582
  var React6 = __toESM(window.React);
4896
4583
  var MINUTE = 60;
4897
4584
  var HOUR = 60 * 60;
@@ -5010,7 +4697,7 @@ var ReactIntl = (() => {
5010
4697
  };
5011
4698
  var relative_default = FormattedRelativeTime;
5012
4699
 
5013
- // ../../../../../../../../execroot/formatjs/bazel-out/darwin_arm64-fastbuild/bin/packages/react-intl/lib/src/components/plural.js
4700
+ // ../../../../../../../../execroot/formatjs/bazel-out/darwin-fastbuild/bin/packages/react-intl/lib/src/components/plural.js
5014
4701
  var React7 = __toESM(window.React);
5015
4702
  var FormattedPlural = function(props) {
5016
4703
  var _a2 = useIntl(), formatPlural2 = _a2.formatPlural, Text = _a2.textComponent;
@@ -5031,7 +4718,7 @@ var ReactIntl = (() => {
5031
4718
  FormattedPlural.displayName = "FormattedPlural";
5032
4719
  var plural_default = FormattedPlural;
5033
4720
 
5034
- // ../../../../../../../../execroot/formatjs/bazel-out/darwin_arm64-fastbuild/bin/packages/react-intl/lib/src/components/message.js
4721
+ // ../../../../../../../../execroot/formatjs/bazel-out/darwin-fastbuild/bin/packages/react-intl/lib/src/components/message.js
5035
4722
  var React8 = __toESM(window.React);
5036
4723
  function areEqual(prevProps, nextProps) {
5037
4724
  var values = prevProps.values, otherProps = __rest(prevProps, ["values"]);
@@ -5059,7 +4746,7 @@ var ReactIntl = (() => {
5059
4746
  MemoizedFormattedMessage.displayName = "MemoizedFormattedMessage";
5060
4747
  var message_default = MemoizedFormattedMessage;
5061
4748
 
5062
- // ../../../../../../../../execroot/formatjs/bazel-out/darwin_arm64-fastbuild/bin/packages/react-intl/lib/src/components/dateTimeRange.js
4749
+ // ../../../../../../../../execroot/formatjs/bazel-out/darwin-fastbuild/bin/packages/react-intl/lib/src/components/dateTimeRange.js
5063
4750
  var React9 = __toESM(window.React);
5064
4751
  var FormattedDateTimeRange = function(props) {
5065
4752
  var intl = useIntl();
@@ -5074,7 +4761,7 @@ var ReactIntl = (() => {
5074
4761
  FormattedDateTimeRange.displayName = "FormattedDateTimeRange";
5075
4762
  var dateTimeRange_default = FormattedDateTimeRange;
5076
4763
 
5077
- // ../../../../../../../../execroot/formatjs/bazel-out/darwin_arm64-fastbuild/bin/packages/react-intl/lib/index.js
4764
+ // ../../../../../../../../execroot/formatjs/bazel-out/darwin-fastbuild/bin/packages/react-intl/lib/index.js
5078
4765
  function defineMessages(msgs) {
5079
4766
  return msgs;
5080
4767
  }
@@ -5090,12 +4777,16 @@ var ReactIntl = (() => {
5090
4777
  var FormattedTimeParts = createFormattedDateTimePartsComponent("formatTime");
5091
4778
  return __toCommonJS(lib_exports);
5092
4779
  })();
5093
- /** @license React v16.13.1
5094
- * react-is.development.js
5095
- *
5096
- * Copyright (c) Facebook, Inc. and its affiliates.
5097
- *
5098
- * This source code is licensed under the MIT license found in the
5099
- * LICENSE file in the root directory of this source tree.
5100
- */
4780
+ /*! Bundled license information:
4781
+
4782
+ react-is/cjs/react-is.development.js:
4783
+ (** @license React v16.13.1
4784
+ * react-is.development.js
4785
+ *
4786
+ * Copyright (c) Facebook, Inc. and its affiliates.
4787
+ *
4788
+ * This source code is licensed under the MIT license found in the
4789
+ * LICENSE file in the root directory of this source tree.
4790
+ *)
4791
+ */
5101
4792
  //# sourceMappingURL=react-intl.esbuild.iife.js.map