@formatjs/intl-supportedvaluesof 3.1.0 → 3.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/polyfill.iife.js CHANGED
@@ -1,16 +1,62 @@
1
1
  // packages/intl-supportedvaluesof/should-polyfill.ts
2
2
  function shouldPolyfill() {
3
- return typeof Intl === "undefined" || !("supportedValuesOf" in Intl);
3
+ return typeof Intl === "undefined" || typeof Intl.supportedValuesOf !== "function";
4
4
  }
5
5
  // packages/ecma262-abstract/ToString.js
6
+ const StringConstructor = String;
7
+ const TypeErrorConstructor = TypeError;
6
8
  /**
7
9
  * https://tc39.es/ecma262/#sec-tostring
8
10
  */
9
11
  function ToString(o) {
10
- if (typeof o === "symbol") throw TypeError("Cannot convert a Symbol value to a string");
11
- return String(o);
12
+ if (typeof o === "symbol") throw TypeErrorConstructor("Cannot convert a Symbol value to a string");
13
+ return StringConstructor(o);
14
+ }
15
+ Number.isInteger;
16
+ Number.isFinite;
17
+ Number.isSafeInteger;
18
+ const RangeErrorConstructor = RangeError;
19
+ const arrayApply = Reflect.apply;
20
+ Array.prototype.every;
21
+ const some = Array.prototype.some;
22
+ function arraySome(values, predicate) {
23
+ return arrayApply(some, values, [predicate]);
24
+ }
25
+ Array.prototype.includes;
26
+ const indexOf = Array.prototype.indexOf;
27
+ function arrayIndexOf(values, search) {
28
+ return arrayApply(indexOf, values, [search]);
29
+ }
30
+ const defineProperty$2 = Object.defineProperty;
31
+ function setDataProperty(target, key, value) {
32
+ defineProperty$2(target, key, {
33
+ __proto__: null,
34
+ value,
35
+ writable: true,
36
+ enumerable: true,
37
+ configurable: true
38
+ });
39
+ }
40
+ // packages/intl-supportedvaluesof/supported-entries.ts
41
+ const apply$3 = Reflect.apply;
42
+ const sort = Array.prototype.sort;
43
+ function supportedEntries(candidates, supported) {
44
+ const result = [];
45
+ for (let index = 0; index < candidates.length; index++) {
46
+ const entry = candidates[index];
47
+ if (supported(entry)) setDataProperty(result, `${result.length}`, entry);
48
+ }
49
+ apply$3(sort, result, []);
50
+ return result;
12
51
  }
13
52
  // node_modules/.aspect_rules_js/@formatjs+fast-memoize@0.0.0/node_modules/@formatjs/fast-memoize/index.js
53
+ const apply$2 = Reflect.apply;
54
+ const bind = Function.prototype.bind;
55
+ const slice = Array.prototype.slice;
56
+ const stringify = JSON.stringify;
57
+ const create = Object.create;
58
+ const defineProperty$1 = Object.defineProperty;
59
+ const setPrototypeOf = Object.setPrototypeOf;
14
60
  function memoize(fn, options) {
15
61
  const cache = options && options.cache ? options.cache : cacheDefault;
16
62
  const serializer = options && options.serializer ? options.serializer : serializerDefault;
@@ -26,23 +72,29 @@ function monadic(fn, cache, serializer, arg) {
26
72
  const cacheKey = isPrimitive(arg) ? arg : serializer(arg);
27
73
  let computedValue = cache.get(cacheKey);
28
74
  if (typeof computedValue === "undefined") {
29
- computedValue = fn.call(this, arg);
75
+ computedValue = apply$2(fn, this, [arg]);
30
76
  cache.set(cacheKey, computedValue);
31
77
  }
32
78
  return computedValue;
33
79
  }
34
80
  function variadic(fn, cache, serializer) {
35
- const args = Array.prototype.slice.call(arguments, 3);
81
+ const args = apply$2(slice, arguments, [3]);
82
+ if (serializer === serializerDefault) setPrototypeOf(args, null);
36
83
  const cacheKey = serializer(args);
37
84
  let computedValue = cache.get(cacheKey);
38
85
  if (typeof computedValue === "undefined") {
39
- computedValue = fn.apply(this, args);
86
+ computedValue = apply$2(fn, this, args);
40
87
  cache.set(cacheKey, computedValue);
41
88
  }
42
89
  return computedValue;
43
90
  }
44
91
  function assemble(fn, context, strategy, cache, serialize) {
45
- return strategy.bind(context, fn, cache, serialize);
92
+ return apply$2(bind, strategy, [
93
+ context,
94
+ fn,
95
+ cache,
96
+ serialize
97
+ ]);
46
98
  }
47
99
  function strategyDefault(fn, options) {
48
100
  const strategy = fn.length === 1 ? monadic : variadic;
@@ -55,11 +107,18 @@ function strategyMonadic(fn, options) {
55
107
  return assemble(fn, this, monadic, options.cache.create(), options.serializer);
56
108
  }
57
109
  const serializerDefault = function() {
58
- return JSON.stringify(arguments);
110
+ setPrototypeOf(arguments, null);
111
+ return stringify(arguments);
59
112
  };
60
113
  var ObjectWithoutPrototypeCache = class {
61
114
  constructor() {
62
- this.cache = Object.create(null);
115
+ defineProperty$1(this, "cache", {
116
+ __proto__: null,
117
+ value: create(null),
118
+ writable: true,
119
+ enumerable: true,
120
+ configurable: true
121
+ });
63
122
  }
64
123
  get(key) {
65
124
  return this.cache[key];
@@ -76,15 +135,107 @@ const strategies = {
76
135
  monadic: strategyMonadic
77
136
  };
78
137
  // packages/intl-supportedvaluesof/memoize.ts
79
- /**
80
- * Implementation: Memoized factory for Intl.DateTimeFormat instances
81
- *
82
- * Creates and caches DateTimeFormat instances to avoid repeated instantiation overhead.
83
- * This is critical for performance since we test many candidate values against formatters.
84
- *
85
- * Uses variadic memoization strategy to handle varying numbers of constructor arguments.
86
- */
87
- const createMemoizedDateTimeFormat = memoize((...args) => new Intl.DateTimeFormat(...args), { strategy: strategies.variadic });
138
+ const descriptor = Object.getOwnPropertyDescriptor;
139
+ const getPrototypeOf = Object.getPrototypeOf;
140
+ const objectPrototype = Object.prototype;
141
+ const apply$1 = Reflect.apply;
142
+ const memoizeOptions = {
143
+ __proto__: null,
144
+ strategy: strategies.variadic
145
+ };
146
+ const availableCalendarsKey = Symbol.for("@formatjs/intl-datetimeformat/availableCalendars");
147
+ const hasTimeZoneKey = Symbol.for("@formatjs/intl-datetimeformat/hasTimeZone");
148
+ function ownValue(object, key) {
149
+ const property = descriptor(object, key);
150
+ return property && descriptor(property, "value")?.value;
151
+ }
152
+ function findProperty(owner, key) {
153
+ while (owner !== null && (typeof owner === "object" || typeof owner === "function") && owner !== objectPrototype) {
154
+ const property = descriptor(owner, key);
155
+ if (property) return property;
156
+ owner = getPrototypeOf(owner);
157
+ }
158
+ }
159
+ function resolvedOptions(Constructor) {
160
+ const property = findProperty(ownValue(Constructor, "prototype"), "resolvedOptions");
161
+ const method = property && ownValue(property, "value");
162
+ if (typeof method === "function") return (formatter) => apply$1(method, formatter, []);
163
+ }
164
+ let intl$1 = ownValue(globalThis, "Intl");
165
+ function retainProbe(name, createProbe) {
166
+ const probes = /* @__PURE__ */ new WeakMap();
167
+ const readProbe = probes.get.bind(probes);
168
+ const writeProbe = probes.set.bind(probes);
169
+ let currentProbe;
170
+ const getProbe = () => {
171
+ intl$1 ??= ownValue(globalThis, "Intl");
172
+ const property = intl$1 && descriptor(intl$1, name);
173
+ const data = property && descriptor(property, "value");
174
+ if (!data) return currentProbe;
175
+ const candidate = data.value;
176
+ if (typeof candidate !== "function") return void 0;
177
+ const Constructor = candidate;
178
+ let probe = readProbe(Constructor);
179
+ if (probe === void 0) {
180
+ probe = createProbe(Constructor);
181
+ writeProbe(Constructor, probe);
182
+ }
183
+ currentProbe = probe;
184
+ return probe;
185
+ };
186
+ getProbe();
187
+ return getProbe;
188
+ }
189
+ function memoizeHost(Constructor, construct) {
190
+ const marker = findProperty(Constructor, "polyfilled");
191
+ return marker && ownValue(marker, "value") ? construct : memoize(construct, memoizeOptions);
192
+ }
193
+ const getDateTimeFormatProbe = retainProbe("DateTimeFormat", (Constructor) => {
194
+ const availableCalendars = ownValue(Constructor, availableCalendarsKey);
195
+ const hasTimeZone = ownValue(Constructor, hasTimeZoneKey);
196
+ return {
197
+ create: memoizeHost(Constructor, (locales, options) => new Constructor(locales, options)),
198
+ resolve: resolvedOptions(Constructor),
199
+ availableCalendars: typeof availableCalendars === "function" ? () => apply$1(availableCalendars, Constructor, []) : void 0,
200
+ hasTimeZone: typeof hasTimeZone === "function" ? (name) => apply$1(hasTimeZone, Constructor, [name]) : void 0
201
+ };
202
+ });
203
+ const getNumberFormatProbe = retainProbe("NumberFormat", (Constructor) => {
204
+ const property = findProperty(ownValue(Constructor, "prototype"), "format");
205
+ const getter = property && ownValue(property, "get");
206
+ const method = property && ownValue(property, "value");
207
+ const partsProperty = findProperty(ownValue(Constructor, "prototype"), "formatToParts");
208
+ const parts = partsProperty && ownValue(partsProperty, "value");
209
+ let format;
210
+ if (typeof getter === "function") format = (formatter, value) => apply$1(apply$1(getter, formatter, []), void 0, [value]);
211
+ else if (typeof method === "function") format = (formatter, value) => apply$1(method, formatter, [value]);
212
+ return {
213
+ create: memoizeHost(Constructor, (locales, options) => new Constructor(locales, options)),
214
+ resolve: resolvedOptions(Constructor),
215
+ format,
216
+ formatToParts: typeof parts === "function" ? (formatter, value) => apply$1(parts, formatter, [value]) : void 0
217
+ };
218
+ });
219
+ const getCollatorProbe = retainProbe("Collator", (Constructor) => ({
220
+ create: (locale) => new Constructor(locale),
221
+ resolve: resolvedOptions(Constructor)
222
+ }));
223
+ const getRelativeTimeFormatProbe = retainProbe("RelativeTimeFormat", (Constructor) => ({
224
+ create: (locale) => new Constructor(locale),
225
+ resolve: resolvedOptions(Constructor)
226
+ }));
227
+ const getCurrencyDisplayNamesProbe = retainProbe("DisplayNames", (Constructor) => {
228
+ const property = findProperty(ownValue(Constructor, "prototype"), "of");
229
+ const of = property && ownValue(property, "value");
230
+ return {
231
+ create: (locale) => new Constructor(locale, {
232
+ __proto__: null,
233
+ type: "currency",
234
+ fallback: "none"
235
+ }),
236
+ hasName: typeof of === "function" ? (formatter, code) => apply$1(of, formatter, [code]) !== void 0 : void 0
237
+ };
238
+ });
88
239
  // node_modules/.aspect_rules_js/@formatjs_generated+cldr.supported-values@0.0.0/node_modules/@formatjs_generated/cldr.supported-values/calendars.js
89
240
  const calendars = [
90
241
  "buddhist",
@@ -101,33 +252,548 @@ const calendars = [
101
252
  "islamic-rgsa",
102
253
  "islamic-tbla",
103
254
  "islamic-umalqura",
104
- "islamicc",
105
255
  "iso8601",
106
256
  "japanese",
107
257
  "persian",
108
258
  "roc"
109
259
  ];
260
+ const calendarCandidateLocales = {
261
+ "buddhist": [
262
+ "en",
263
+ "th",
264
+ "th-TH",
265
+ "th-Thai-TH"
266
+ ],
267
+ "chinese": [
268
+ "en",
269
+ "zh",
270
+ "zh-CN",
271
+ "zh-Hans-CN",
272
+ "zh-HK",
273
+ "zh-Hant-HK",
274
+ "zh-MO",
275
+ "zh-Hant-MO",
276
+ "zh-TW",
277
+ "zh-Hant-TW"
278
+ ],
279
+ "coptic": [
280
+ "en",
281
+ "ar",
282
+ "ar-EG",
283
+ "ar-Arab-EG"
284
+ ],
285
+ "dangi": [
286
+ "en",
287
+ "ko",
288
+ "ko-KR",
289
+ "ko-Kore-KR"
290
+ ],
291
+ "ethioaa": [
292
+ "en",
293
+ "ar",
294
+ "fa",
295
+ "sq",
296
+ "az",
297
+ "bn",
298
+ "zh",
299
+ "fr",
300
+ "ti",
301
+ "am",
302
+ "id",
303
+ "he",
304
+ "hi",
305
+ "ja",
306
+ "ko",
307
+ "dv",
308
+ "ms",
309
+ "ha",
310
+ "ur",
311
+ "th",
312
+ "tg",
313
+ "tk",
314
+ "tr",
315
+ "uz"
316
+ ],
317
+ "ethiopic": [
318
+ "en",
319
+ "am",
320
+ "am-ET",
321
+ "am-Ethi-ET"
322
+ ],
323
+ "gregory": [
324
+ "en",
325
+ "ar",
326
+ "ar-AE",
327
+ "ar-Arab-AE",
328
+ "fa",
329
+ "fa-AF",
330
+ "fa-Arab-AF",
331
+ "sq",
332
+ "sq-AL",
333
+ "sq-Latn-AL",
334
+ "az",
335
+ "az-AZ",
336
+ "az-Latn-AZ",
337
+ "bn",
338
+ "bn-BD",
339
+ "bn-Beng-BD",
340
+ "ar-BH",
341
+ "ar-Arab-BH",
342
+ "zh",
343
+ "zh-CN",
344
+ "zh-Hans-CN",
345
+ "fr",
346
+ "fr-DJ",
347
+ "fr-Latn-DJ",
348
+ "ar-DZ",
349
+ "ar-Arab-DZ",
350
+ "ar-EG",
351
+ "ar-Arab-EG",
352
+ "ar-EH",
353
+ "ar-Arab-EH",
354
+ "ti",
355
+ "ti-ER",
356
+ "ti-Ethi-ER",
357
+ "am",
358
+ "am-ET",
359
+ "am-Ethi-ET",
360
+ "zh-HK",
361
+ "zh-Hant-HK",
362
+ "id",
363
+ "id-ID",
364
+ "id-Latn-ID",
365
+ "he",
366
+ "he-IL",
367
+ "he-Hebr-IL",
368
+ "hi",
369
+ "hi-IN",
370
+ "hi-Deva-IN",
371
+ "ar-IQ",
372
+ "ar-Arab-IQ",
373
+ "fa-IR",
374
+ "fa-Arab-IR",
375
+ "ar-JO",
376
+ "ar-Arab-JO",
377
+ "ja",
378
+ "ja-JP",
379
+ "ja-Jpan-JP",
380
+ "ar-KM",
381
+ "ar-Arab-KM",
382
+ "ko",
383
+ "ko-KR",
384
+ "ko-Kore-KR",
385
+ "ar-KW",
386
+ "ar-Arab-KW",
387
+ "ar-LB",
388
+ "ar-Arab-LB",
389
+ "ar-LY",
390
+ "ar-Arab-LY",
391
+ "ar-MA",
392
+ "ar-Arab-MA",
393
+ "zh-MO",
394
+ "zh-Hant-MO",
395
+ "ar-MR",
396
+ "ar-Arab-MR",
397
+ "dv",
398
+ "dv-MV",
399
+ "dv-Thaa-MV",
400
+ "ms",
401
+ "ms-MY",
402
+ "ms-Latn-MY",
403
+ "ha",
404
+ "ha-NE",
405
+ "ha-Latn-NE",
406
+ "ar-OM",
407
+ "ar-Arab-OM",
408
+ "ur",
409
+ "ur-PK",
410
+ "ur-Arab-PK",
411
+ "ar-PS",
412
+ "ar-Arab-PS",
413
+ "ar-QA",
414
+ "ar-Arab-QA",
415
+ "ar-SA",
416
+ "ar-Arab-SA",
417
+ "ar-SD",
418
+ "ar-Arab-SD",
419
+ "ar-SY",
420
+ "ar-Arab-SY",
421
+ "ar-TD",
422
+ "ar-Arab-TD",
423
+ "th",
424
+ "th-TH",
425
+ "th-Thai-TH",
426
+ "tg",
427
+ "tg-TJ",
428
+ "tg-Cyrl-TJ",
429
+ "tk",
430
+ "tk-TM",
431
+ "tk-Latn-TM",
432
+ "ar-TN",
433
+ "ar-Arab-TN",
434
+ "tr",
435
+ "tr-TR",
436
+ "tr-Latn-TR",
437
+ "zh-TW",
438
+ "zh-Hant-TW",
439
+ "uz",
440
+ "uz-UZ",
441
+ "uz-Latn-UZ",
442
+ "sq-XK",
443
+ "sq-Latn-XK",
444
+ "ar-YE",
445
+ "ar-Arab-YE"
446
+ ],
447
+ "hebrew": [
448
+ "en",
449
+ "he",
450
+ "he-IL",
451
+ "he-Hebr-IL"
452
+ ],
453
+ "indian": [
454
+ "en",
455
+ "hi",
456
+ "hi-IN",
457
+ "hi-Deva-IN"
458
+ ],
459
+ "islamic": [
460
+ "en",
461
+ "ar",
462
+ "ar-AE",
463
+ "ar-Arab-AE",
464
+ "fa",
465
+ "fa-AF",
466
+ "fa-Arab-AF",
467
+ "bn",
468
+ "bn-BD",
469
+ "bn-Beng-BD",
470
+ "ar-BH",
471
+ "ar-Arab-BH",
472
+ "fr",
473
+ "fr-DJ",
474
+ "fr-Latn-DJ",
475
+ "ar-DZ",
476
+ "ar-Arab-DZ",
477
+ "ar-EG",
478
+ "ar-Arab-EG",
479
+ "ar-EH",
480
+ "ar-Arab-EH",
481
+ "ti",
482
+ "ti-ER",
483
+ "ti-Ethi-ER",
484
+ "id",
485
+ "id-ID",
486
+ "id-Latn-ID",
487
+ "he",
488
+ "he-IL",
489
+ "he-Hebr-IL",
490
+ "ar-IQ",
491
+ "ar-Arab-IQ",
492
+ "fa-IR",
493
+ "fa-Arab-IR",
494
+ "ar-JO",
495
+ "ar-Arab-JO",
496
+ "ar-KM",
497
+ "ar-Arab-KM",
498
+ "ar-KW",
499
+ "ar-Arab-KW",
500
+ "ar-LB",
501
+ "ar-Arab-LB",
502
+ "ar-LY",
503
+ "ar-Arab-LY",
504
+ "ar-MA",
505
+ "ar-Arab-MA",
506
+ "ar-MR",
507
+ "ar-Arab-MR",
508
+ "ms",
509
+ "ms-MY",
510
+ "ms-Latn-MY",
511
+ "ha",
512
+ "ha-NE",
513
+ "ha-Latn-NE",
514
+ "ar-OM",
515
+ "ar-Arab-OM",
516
+ "ur",
517
+ "ur-PK",
518
+ "ur-Arab-PK",
519
+ "ar-PS",
520
+ "ar-Arab-PS",
521
+ "ar-QA",
522
+ "ar-Arab-QA",
523
+ "ar-SA",
524
+ "ar-Arab-SA",
525
+ "ar-SD",
526
+ "ar-Arab-SD",
527
+ "ar-SY",
528
+ "ar-Arab-SY",
529
+ "ar-TD",
530
+ "ar-Arab-TD",
531
+ "ar-TN",
532
+ "ar-Arab-TN",
533
+ "ar-YE",
534
+ "ar-Arab-YE"
535
+ ],
536
+ "islamic-civil": [
537
+ "en",
538
+ "ar",
539
+ "ar-AE",
540
+ "ar-Arab-AE",
541
+ "fa",
542
+ "fa-AF",
543
+ "fa-Arab-AF",
544
+ "sq",
545
+ "sq-AL",
546
+ "sq-Latn-AL",
547
+ "az",
548
+ "az-AZ",
549
+ "az-Latn-AZ",
550
+ "bn",
551
+ "bn-BD",
552
+ "bn-Beng-BD",
553
+ "ar-BH",
554
+ "ar-Arab-BH",
555
+ "fr",
556
+ "fr-DJ",
557
+ "fr-Latn-DJ",
558
+ "ar-DZ",
559
+ "ar-Arab-DZ",
560
+ "ar-EG",
561
+ "ar-Arab-EG",
562
+ "ar-EH",
563
+ "ar-Arab-EH",
564
+ "ti",
565
+ "ti-ER",
566
+ "ti-Ethi-ER",
567
+ "id",
568
+ "id-ID",
569
+ "id-Latn-ID",
570
+ "he",
571
+ "he-IL",
572
+ "he-Hebr-IL",
573
+ "ar-IQ",
574
+ "ar-Arab-IQ",
575
+ "fa-IR",
576
+ "fa-Arab-IR",
577
+ "ar-JO",
578
+ "ar-Arab-JO",
579
+ "ar-KM",
580
+ "ar-Arab-KM",
581
+ "ar-KW",
582
+ "ar-Arab-KW",
583
+ "ar-LB",
584
+ "ar-Arab-LB",
585
+ "ar-LY",
586
+ "ar-Arab-LY",
587
+ "ar-MA",
588
+ "ar-Arab-MA",
589
+ "ar-MR",
590
+ "ar-Arab-MR",
591
+ "dv",
592
+ "dv-MV",
593
+ "dv-Thaa-MV",
594
+ "ms",
595
+ "ms-MY",
596
+ "ms-Latn-MY",
597
+ "ha",
598
+ "ha-NE",
599
+ "ha-Latn-NE",
600
+ "ar-OM",
601
+ "ar-Arab-OM",
602
+ "ur",
603
+ "ur-PK",
604
+ "ur-Arab-PK",
605
+ "ar-PS",
606
+ "ar-Arab-PS",
607
+ "ar-QA",
608
+ "ar-Arab-QA",
609
+ "ar-SD",
610
+ "ar-Arab-SD",
611
+ "ar-SY",
612
+ "ar-Arab-SY",
613
+ "ar-TD",
614
+ "ar-Arab-TD",
615
+ "tg",
616
+ "tg-TJ",
617
+ "tg-Cyrl-TJ",
618
+ "tk",
619
+ "tk-TM",
620
+ "tk-Latn-TM",
621
+ "ar-TN",
622
+ "ar-Arab-TN",
623
+ "tr",
624
+ "tr-TR",
625
+ "tr-Latn-TR",
626
+ "uz",
627
+ "uz-UZ",
628
+ "uz-Latn-UZ",
629
+ "sq-XK",
630
+ "sq-Latn-XK",
631
+ "ar-YE",
632
+ "ar-Arab-YE"
633
+ ],
634
+ "islamic-rgsa": [
635
+ "en",
636
+ "ar",
637
+ "ar-SA",
638
+ "ar-Arab-SA"
639
+ ],
640
+ "islamic-tbla": [
641
+ "en",
642
+ "ar",
643
+ "ar-AE",
644
+ "ar-Arab-AE",
645
+ "fa",
646
+ "fa-AF",
647
+ "fa-Arab-AF",
648
+ "sq",
649
+ "sq-AL",
650
+ "sq-Latn-AL",
651
+ "az",
652
+ "az-AZ",
653
+ "az-Latn-AZ",
654
+ "bn",
655
+ "bn-BD",
656
+ "bn-Beng-BD",
657
+ "ar-BH",
658
+ "ar-Arab-BH",
659
+ "fr",
660
+ "fr-DJ",
661
+ "fr-Latn-DJ",
662
+ "ar-DZ",
663
+ "ar-Arab-DZ",
664
+ "ar-EG",
665
+ "ar-Arab-EG",
666
+ "ar-EH",
667
+ "ar-Arab-EH",
668
+ "ti",
669
+ "ti-ER",
670
+ "ti-Ethi-ER",
671
+ "id",
672
+ "id-ID",
673
+ "id-Latn-ID",
674
+ "he",
675
+ "he-IL",
676
+ "he-Hebr-IL",
677
+ "ar-IQ",
678
+ "ar-Arab-IQ",
679
+ "fa-IR",
680
+ "fa-Arab-IR",
681
+ "ar-JO",
682
+ "ar-Arab-JO",
683
+ "ar-KM",
684
+ "ar-Arab-KM",
685
+ "ar-KW",
686
+ "ar-Arab-KW",
687
+ "ar-LB",
688
+ "ar-Arab-LB",
689
+ "ar-LY",
690
+ "ar-Arab-LY",
691
+ "ar-MA",
692
+ "ar-Arab-MA",
693
+ "ar-MR",
694
+ "ar-Arab-MR",
695
+ "dv",
696
+ "dv-MV",
697
+ "dv-Thaa-MV",
698
+ "ms",
699
+ "ms-MY",
700
+ "ms-Latn-MY",
701
+ "ha",
702
+ "ha-NE",
703
+ "ha-Latn-NE",
704
+ "ar-OM",
705
+ "ar-Arab-OM",
706
+ "ur",
707
+ "ur-PK",
708
+ "ur-Arab-PK",
709
+ "ar-PS",
710
+ "ar-Arab-PS",
711
+ "ar-QA",
712
+ "ar-Arab-QA",
713
+ "ar-SD",
714
+ "ar-Arab-SD",
715
+ "ar-SY",
716
+ "ar-Arab-SY",
717
+ "ar-TD",
718
+ "ar-Arab-TD",
719
+ "tg",
720
+ "tg-TJ",
721
+ "tg-Cyrl-TJ",
722
+ "tk",
723
+ "tk-TM",
724
+ "tk-Latn-TM",
725
+ "ar-TN",
726
+ "ar-Arab-TN",
727
+ "tr",
728
+ "tr-TR",
729
+ "tr-Latn-TR",
730
+ "uz",
731
+ "uz-UZ",
732
+ "uz-Latn-UZ",
733
+ "sq-XK",
734
+ "sq-Latn-XK",
735
+ "ar-YE",
736
+ "ar-Arab-YE"
737
+ ],
738
+ "islamic-umalqura": [
739
+ "en",
740
+ "ar",
741
+ "ar-AE",
742
+ "ar-Arab-AE",
743
+ "ar-BH",
744
+ "ar-Arab-BH",
745
+ "ar-KW",
746
+ "ar-Arab-KW",
747
+ "ar-QA",
748
+ "ar-Arab-QA",
749
+ "ar-SA",
750
+ "ar-Arab-SA"
751
+ ],
752
+ "iso8601": ["en"],
753
+ "japanese": [
754
+ "en",
755
+ "ja",
756
+ "ja-JP",
757
+ "ja-Jpan-JP"
758
+ ],
759
+ "persian": [
760
+ "en",
761
+ "fa",
762
+ "fa-AF",
763
+ "fa-Arab-AF",
764
+ "fa-IR",
765
+ "fa-Arab-IR"
766
+ ],
767
+ "roc": [
768
+ "en",
769
+ "zh",
770
+ "zh-TW",
771
+ "zh-Hant-TW"
772
+ ]
773
+ };
110
774
  // packages/intl-supportedvaluesof/get-supported-calendars.ts
111
- /**
112
- * Implementation: Tests if a calendar is supported by attempting to create
113
- * a DateTimeFormat with that calendar and verifying it was accepted.
114
- *
115
- * CLDR Data: Candidate values come from CLDR calendar types
116
- */
117
- function isSupportedCalendar(item) {
118
- try {
119
- return createMemoizedDateTimeFormat(`en-u-ca-${item}`).resolvedOptions().calendar === item;
120
- } catch {}
121
- return false;
122
- }
123
- /**
124
- * ECMA-402 Spec: Returns supported calendar identifiers
125
- * ECMA-402 Spec: Results must be sorted lexicographically
126
- *
127
- * Implementation: Filters CLDR list against actual runtime support
128
- */
129
775
  function getSupportedCalendars() {
130
- return calendars.filter(isSupportedCalendar).sort();
776
+ const probe = getDateTimeFormatProbe();
777
+ if (probe?.availableCalendars) try {
778
+ const available = probe.availableCalendars();
779
+ return supportedEntries(calendars, (calendar) => calendar === "iso8601" || arrayIndexOf(available, calendar) >= 0);
780
+ } catch {}
781
+ if (!probe?.resolve) return ["iso8601"];
782
+ const { create, resolve } = probe;
783
+ return supportedEntries(calendars, (calendar) => {
784
+ if (calendar === "iso8601") return true;
785
+ const options = {
786
+ __proto__: null,
787
+ calendar
788
+ };
789
+ return arraySome(calendarCandidateLocales[calendar], (locale) => {
790
+ try {
791
+ return resolve(create(`${locale}-u-ca-${calendar}`, options)).calendar === calendar;
792
+ } catch {
793
+ return false;
794
+ }
795
+ });
796
+ });
131
797
  }
132
798
  // node_modules/.aspect_rules_js/@formatjs_generated+cldr.supported-values@0.0.0/node_modules/@formatjs_generated/cldr.supported-values/collations.js
133
799
  const collations = [
@@ -451,37 +1117,26 @@ const collationCandidateLocales = {
451
1117
  "zhuyin": ["zh", "zh-Hant"]
452
1118
  };
453
1119
  // packages/intl-supportedvaluesof/get-supported-collations.ts
454
- function isSupportedCollation(collation) {
455
- const candidates = collationCandidateLocales[collation] || ["en"];
456
- for (const locale of candidates) try {
457
- if (new Intl.Collator(`${locale}-u-co-${collation}`).resolvedOptions().collation === collation) return true;
458
- } catch {}
459
- return false;
460
- }
461
1120
  function getSupportedCollations() {
462
- return collations.filter(isSupportedCollation).sort();
463
- }
464
- // packages/ecma402-abstract/utils.js
465
- function defineProperty(target, name, { value }) {
466
- Object.defineProperty(target, name, {
467
- configurable: true,
468
- enumerable: false,
469
- writable: true,
470
- value
1121
+ const probe = getCollatorProbe();
1122
+ if (!probe?.resolve) return [];
1123
+ const { create, resolve } = probe;
1124
+ return supportedEntries(collations, (collation) => {
1125
+ const candidates = collationCandidateLocales[collation] || ["en"];
1126
+ for (let index = 0; index < candidates.length; index++) {
1127
+ const locale = candidates[index];
1128
+ try {
1129
+ if (resolve(create(`${locale}-u-co-${collation}`)).collation === collation) return true;
1130
+ } catch {}
1131
+ }
1132
+ return false;
471
1133
  });
472
1134
  }
473
- function ensureIntl() {
474
- if (typeof Intl === "undefined") Object.defineProperty(globalThis, "Intl", {
475
- configurable: true,
476
- enumerable: false,
477
- writable: true,
478
- value: {}
479
- });
480
- return Intl;
1135
+ // packages/ecma262-abstract/HasOwnProperty.js
1136
+ const hasOwn = Function.prototype.call.bind(Object.prototype.hasOwnProperty);
1137
+ function HasOwnProperty(o, prop) {
1138
+ return hasOwn(o, prop);
481
1139
  }
482
- const createMemoizedNumberFormat = memoize((...args) => new Intl.NumberFormat(...args), { strategy: strategies.variadic });
483
- memoize((...args) => new Intl.PluralRules(...args), { strategy: strategies.variadic });
484
- memoize((...args) => new Intl.ListFormat(...args), { strategy: strategies.variadic });
485
1140
  // node_modules/.aspect_rules_js/@formatjs_generated+cldr.supported-values@0.0.0/node_modules/@formatjs_generated/cldr.supported-values/currencies.js
486
1141
  const currencies = [
487
1142
  "ADP",
@@ -550,6 +1205,7 @@ const currencies = [
550
1205
  "CLF",
551
1206
  "CLP",
552
1207
  "CNH",
1208
+ "CNX",
553
1209
  "CNY",
554
1210
  "COP",
555
1211
  "COU",
@@ -752,6 +1408,7 @@ const currencies = [
752
1408
  "VNN",
753
1409
  "VUV",
754
1410
  "WST",
1411
+ "XAD",
755
1412
  "XAF",
756
1413
  "XAG",
757
1414
  "XAU",
@@ -791,44 +1448,64 @@ const currencies = [
791
1448
  "ZWL",
792
1449
  "ZWR"
793
1450
  ];
1451
+ const currencyCandidateLocales = { "XAD": ["en", "cv"] };
794
1452
  // packages/intl-supportedvaluesof/get-supported-currencies.ts
795
- /**
796
- * Implementation: Tests if a currency is supported by attempting to create
797
- * a NumberFormat with that currency and verifying it was accepted.
798
- *
799
- * CLDR Data: Candidate values come from CLDR currency codes (ISO 4217)
800
- */
801
- function isSupportedCurrency(currency) {
802
- try {
803
- const format = createMemoizedNumberFormat("en", {
804
- style: "currency",
805
- currencyDisplay: "name",
806
- currency
807
- }).format(123);
808
- if (format.substring(0, 3) !== currency && format.substring(format.length - 3) !== currency) return true;
809
- } catch {}
810
- return false;
811
- }
812
- /**
813
- * ECMA-402 Spec: Returns supported currency identifiers
814
- * ECMA-402 Spec: Results must be sorted lexicographically
815
- *
816
- * Implementation: Filters CLDR list against actual runtime support
817
- */
1453
+ const apply = Reflect.apply;
1454
+ const createObject = Object.create;
1455
+ const stringIndexOf = String.prototype.indexOf;
1456
+ const stringSlice = String.prototype.slice;
1457
+ const english = ["en"];
818
1458
  function getSupportedCurrencies() {
1459
+ const probe = getNumberFormatProbe();
1460
+ if (!probe || !probe.formatToParts && !probe.format) return [];
1461
+ const { create, format, formatToParts } = probe;
1462
+ const namesProbe = getCurrencyDisplayNamesProbe();
1463
+ if (namesProbe && !namesProbe.hasName) return [];
1464
+ const namesByLocale = createObject(null);
819
1465
  const ATOZ = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
820
- const supportedCurrencies = [];
821
- for (const currency of currencies) if (currency.length === 3) {
822
- if (isSupportedCurrency(currency)) supportedCurrencies.push(currency);
823
- } else if (currency.length === 5 && currency[3] === "~") {
824
- const start = ATOZ.indexOf(currency[2]);
825
- const end = ATOZ.indexOf(currency[4]);
826
- for (let i = start; i <= end; i++) {
827
- const currentCurrency = currency.substring(0, 2) + ATOZ[i];
828
- if (isSupportedCurrency(currentCurrency)) supportedCurrencies.push(currentCurrency);
1466
+ const candidates = [];
1467
+ for (let index = 0; index < currencies.length; index++) {
1468
+ const currency = currencies[index];
1469
+ if (currency.length === 3) setDataProperty(candidates, `${candidates.length}`, currency);
1470
+ else if (currency.length === 5 && currency[3] === "~") {
1471
+ const start = apply(stringIndexOf, ATOZ, [currency[2]]);
1472
+ const end = apply(stringIndexOf, ATOZ, [currency[4]]);
1473
+ const prefix = currency[0] + currency[1];
1474
+ for (let i = start; i <= end; i++) setDataProperty(candidates, `${candidates.length}`, prefix + ATOZ[i]);
829
1475
  }
830
1476
  }
831
- return supportedCurrencies.sort();
1477
+ return supportedEntries(candidates, (currency) => {
1478
+ return arraySome(HasOwnProperty(currencyCandidateLocales, currency) ? currencyCandidateLocales[currency] : english, (locale) => {
1479
+ try {
1480
+ if (namesProbe) {
1481
+ let names = namesByLocale[locale];
1482
+ if (names === void 0) {
1483
+ namesByLocale[locale] = null;
1484
+ names = namesByLocale[locale] = namesProbe.create(locale);
1485
+ }
1486
+ if (!names || !namesProbe.hasName?.(names, currency)) return false;
1487
+ }
1488
+ const formatter = create(locale, {
1489
+ __proto__: null,
1490
+ style: "currency",
1491
+ currencyDisplay: "name",
1492
+ currency
1493
+ });
1494
+ if (formatToParts) {
1495
+ const parts = formatToParts(formatter, 123);
1496
+ for (let i = 0; i < parts.length; i++) {
1497
+ const part = parts[i];
1498
+ if (part.type === "currency" && part.value !== currency) return true;
1499
+ }
1500
+ return false;
1501
+ }
1502
+ const text = format(formatter, 123);
1503
+ return apply(stringSlice, text, [0, 3]) !== currency && apply(stringSlice, text, [-3]) !== currency;
1504
+ } catch {
1505
+ return false;
1506
+ }
1507
+ });
1508
+ });
832
1509
  }
833
1510
  // node_modules/.aspect_rules_js/@formatjs_generated+cldr.number@0.0.0/node_modules/@formatjs_generated/cldr.number/numbering-systems.js
834
1511
  const numberingSystemNames = [
@@ -930,28 +1607,183 @@ const numberingSystemNames = [
930
1607
  "wara",
931
1608
  "wcho"
932
1609
  ];
1610
+ const numericNumberingSystemNames = [
1611
+ "adlm",
1612
+ "ahom",
1613
+ "arab",
1614
+ "arabext",
1615
+ "bali",
1616
+ "beng",
1617
+ "bhks",
1618
+ "brah",
1619
+ "cakm",
1620
+ "cham",
1621
+ "deva",
1622
+ "diak",
1623
+ "fullwide",
1624
+ "gara",
1625
+ "gong",
1626
+ "gonm",
1627
+ "gujr",
1628
+ "gukh",
1629
+ "guru",
1630
+ "hanidec",
1631
+ "hmng",
1632
+ "hmnp",
1633
+ "java",
1634
+ "kali",
1635
+ "kawi",
1636
+ "khmr",
1637
+ "knda",
1638
+ "krai",
1639
+ "lana",
1640
+ "lanatham",
1641
+ "laoo",
1642
+ "latn",
1643
+ "lepc",
1644
+ "limb",
1645
+ "mathbold",
1646
+ "mathdbl",
1647
+ "mathmono",
1648
+ "mathsanb",
1649
+ "mathsans",
1650
+ "mlym",
1651
+ "modi",
1652
+ "mong",
1653
+ "mroo",
1654
+ "mtei",
1655
+ "mymr",
1656
+ "mymrepka",
1657
+ "mymrpao",
1658
+ "mymrshan",
1659
+ "mymrtlng",
1660
+ "nagm",
1661
+ "newa",
1662
+ "nkoo",
1663
+ "olck",
1664
+ "onao",
1665
+ "orya",
1666
+ "osma",
1667
+ "outlined",
1668
+ "rohg",
1669
+ "saur",
1670
+ "segment",
1671
+ "shrd",
1672
+ "sind",
1673
+ "sinh",
1674
+ "sora",
1675
+ "sund",
1676
+ "sunu",
1677
+ "takr",
1678
+ "talu",
1679
+ "tamldec",
1680
+ "telu",
1681
+ "thai",
1682
+ "tibt",
1683
+ "tirh",
1684
+ "tnsa",
1685
+ "tols",
1686
+ "vaii",
1687
+ "wara",
1688
+ "wcho"
1689
+ ];
1690
+ const numberingSystemCandidateLocales = {
1691
+ "armn": ["en", "hy"],
1692
+ "armnlow": ["en"],
1693
+ "cyrl": ["en"],
1694
+ "ethi": [
1695
+ "en",
1696
+ "am",
1697
+ "om",
1698
+ "om-KE",
1699
+ "ti",
1700
+ "ti-ER"
1701
+ ],
1702
+ "geor": ["en", "ka"],
1703
+ "grek": [
1704
+ "en",
1705
+ "el",
1706
+ "el-CY",
1707
+ "el-polyton"
1708
+ ],
1709
+ "greklow": ["en"],
1710
+ "hanidays": ["en", "zh"],
1711
+ "hans": [
1712
+ "en",
1713
+ "zh",
1714
+ "zh-Hans",
1715
+ "zh-Hans-HK",
1716
+ "zh-Hans-MO",
1717
+ "zh-Hans-MY",
1718
+ "zh-Hans-SG"
1719
+ ],
1720
+ "hansfin": [
1721
+ "en",
1722
+ "zh",
1723
+ "zh-Hans",
1724
+ "zh-Hans-HK",
1725
+ "zh-Hans-MO",
1726
+ "zh-Hans-MY",
1727
+ "zh-Hans-SG"
1728
+ ],
1729
+ "hant": [
1730
+ "en",
1731
+ "zh-Hant",
1732
+ "yue",
1733
+ "yue-Hans",
1734
+ "yue-Hant",
1735
+ "yue-Hant-CN",
1736
+ "yue-Hant-MO",
1737
+ "zh-Hant-HK",
1738
+ "zh-Hant-MO",
1739
+ "zh-Hant-MY"
1740
+ ],
1741
+ "hantfin": [
1742
+ "en",
1743
+ "zh-Hant",
1744
+ "yue",
1745
+ "yue-Hans",
1746
+ "yue-Hant",
1747
+ "yue-Hant-CN",
1748
+ "yue-Hant-MO",
1749
+ "zh-Hant-HK",
1750
+ "zh-Hant-MO",
1751
+ "zh-Hant-MY"
1752
+ ],
1753
+ "hebr": [
1754
+ "en",
1755
+ "he",
1756
+ "yi"
1757
+ ],
1758
+ "jpan": ["en", "ja"],
1759
+ "jpanfin": ["en", "ja"],
1760
+ "jpanyear": ["en", "ja"],
1761
+ "roman": ["en"],
1762
+ "romanlow": ["en"],
1763
+ "taml": [
1764
+ "en",
1765
+ "ta",
1766
+ "ta-LK",
1767
+ "ta-MY",
1768
+ "ta-SG"
1769
+ ]
1770
+ };
933
1771
  // packages/intl-supportedvaluesof/get-supported-numbering-systems.ts
934
- /**
935
- * Implementation: Tests if a numbering system is supported by attempting to create
936
- * a NumberFormat with that numbering system and verifying it was accepted.
937
- *
938
- * CLDR Data: Candidate values come from CLDR numbering system types
939
- */
940
- function isSupportedNumberingSystem(system) {
941
- try {
942
- const numberFormat = createMemoizedNumberFormat(`en-u-nu-${system}`);
943
- if (numberFormat.resolvedOptions().numberingSystem === system && system === "latn" || numberFormat.format(123) !== "123") return true;
944
- } catch {}
945
- return false;
946
- }
947
- /**
948
- * ECMA-402 Spec: Returns supported numbering system identifiers
949
- * ECMA-402 Spec: Results must be sorted lexicographically
950
- *
951
- * Implementation: Filters CLDR list against actual runtime support
952
- */
953
1772
  function getSupportedNumberingSystems() {
954
- return numberingSystemNames.filter(isSupportedNumberingSystem).sort();
1773
+ const number = getNumberFormatProbe();
1774
+ const date = getDateTimeFormatProbe();
1775
+ const relative = getRelativeTimeFormatProbe();
1776
+ return supportedEntries(numberingSystemNames, (system) => {
1777
+ if (arrayIndexOf(numericNumberingSystemNames, system) >= 0) return true;
1778
+ return arraySome(numberingSystemCandidateLocales[system], (candidate) => {
1779
+ const locale = `${candidate}-u-nu-${system}`;
1780
+ try {
1781
+ return number?.resolve?.(number.create(locale)).numberingSystem === system && date?.resolve?.(date.create(locale)).numberingSystem === system && relative?.resolve?.(relative.create(locale)).numberingSystem === system;
1782
+ } catch {
1783
+ return false;
1784
+ }
1785
+ });
1786
+ });
955
1787
  }
956
1788
  // node_modules/.aspect_rules_js/@formatjs_generated+cldr.supported-values@0.0.0/node_modules/@formatjs_generated/cldr.supported-values/timezones.js
957
1789
  const timezones = [
@@ -1406,27 +2238,25 @@ const timezones = [
1406
2238
  "UTC"
1407
2239
  ];
1408
2240
  // packages/intl-supportedvaluesof/get-supported-timezones.ts
1409
- /**
1410
- * Implementation: Tests if a timezone is supported by attempting to create
1411
- * a DateTimeFormat with that timezone and verifying it was accepted.
1412
- *
1413
- * CLDR Data: Candidate values come from IANA Time Zone Database
1414
- */
1415
- function isSupportedTimeZone(timeZone) {
1416
- try {
1417
- createMemoizedDateTimeFormat("en", { timeZone });
1418
- return true;
1419
- } catch {}
1420
- return false;
1421
- }
1422
- /**
1423
- * ECMA-402 Spec: Returns supported timezone identifiers
1424
- * ECMA-402 Spec: Results must be sorted lexicographically
1425
- *
1426
- * Implementation: Filters CLDR list against actual runtime support
1427
- */
1428
2241
  function getSupportedTimeZones() {
1429
- return timezones.filter(isSupportedTimeZone).sort();
2242
+ const probe = getDateTimeFormatProbe();
2243
+ if (!probe) return ["UTC"];
2244
+ return supportedEntries(timezones, (timeZone) => {
2245
+ if (timeZone === "UTC") return true;
2246
+ if (probe.hasTimeZone) try {
2247
+ return probe.hasTimeZone(timeZone);
2248
+ } catch {}
2249
+ try {
2250
+ const options = {
2251
+ __proto__: null,
2252
+ timeZone
2253
+ };
2254
+ probe.create("en", options);
2255
+ return true;
2256
+ } catch {
2257
+ return false;
2258
+ }
2259
+ });
1430
2260
  }
1431
2261
  // node_modules/.aspect_rules_js/@formatjs_generated+cldr.supported-values@0.0.0/node_modules/@formatjs_generated/cldr.supported-values/units.js
1432
2262
  const units = [
@@ -1477,43 +2307,18 @@ const units = [
1477
2307
  "milliliter"
1478
2308
  ];
1479
2309
  // packages/intl-supportedvaluesof/get-supported-units.ts
1480
- /**
1481
- * Implementation: Tests if a unit is supported by attempting to create
1482
- * a NumberFormat with that unit and verifying it was accepted.
1483
- *
1484
- * CLDR Data: Candidate values come from CLDR unit types
1485
- */
1486
- function isSupportedUnit(unit) {
1487
- try {
1488
- return createMemoizedNumberFormat("en", {
1489
- style: "unit",
1490
- unit
1491
- }).resolvedOptions().unit === unit;
1492
- } catch {}
1493
- return false;
1494
- }
1495
- /**
1496
- * ECMA-402 Spec: Returns supported unit identifiers
1497
- * ECMA-402 Spec: Results must be sorted lexicographically
1498
- *
1499
- * Implementation: Filters CLDR list against actual runtime support
1500
- */
1501
2310
  function getSupportedUnits() {
1502
- return units.filter(isSupportedUnit).sort();
2311
+ return supportedEntries(units, () => true);
1503
2312
  }
1504
2313
  // packages/intl-supportedvaluesof/index.ts
1505
2314
  /**
1506
- * ECMA-402 Spec: Intl.supportedValuesOf(key)
1507
- * ECMA-402 §8.3.2 Intl.supportedValuesOf, step 1.
2315
+ * ECMA-402 §8.3.2 Intl.supportedValuesOf.
1508
2316
  * https://tc39.es/ecma402/#sec-intl.supportedvaluesof
1509
- * https://github.com/tc39/ecma402/blob/b1c961988b9a07894b1dc3dc2b5626ea48387d61/spec/intl.html#L103
1510
2317
  *
1511
2318
  * Returns an array containing the supported calendar, collation, currency,
1512
2319
  * numbering systems, time zone, or unit values supported by the implementation.
1513
2320
  *
1514
- * Implementation: We validate candidate values from CLDR against the actual
1515
- * Intl formatters to determine runtime support rather than using static lists.
1516
- * This ensures accuracy across different JavaScript engines and runtimes.
2321
+ * Units come from the spec. Other categories probe the installed formatters.
1517
2322
  *
1518
2323
  * @param key - The category of values to return
1519
2324
  * @returns A sorted array of unique string values
@@ -1527,9 +2332,95 @@ const supportedValuesOf = { supportedValuesOf(key) {
1527
2332
  case "numberingSystem": return getSupportedNumberingSystems();
1528
2333
  case "timeZone": return getSupportedTimeZones();
1529
2334
  case "unit": return getSupportedUnits();
1530
- default: throw RangeError("Invalid key: " + key);
2335
+ default: throw new RangeErrorConstructor("Invalid key: " + key);
1531
2336
  }
1532
2337
  } }.supportedValuesOf;
2338
+ String.prototype.repeat;
2339
+ Array.from;
2340
+ Array.prototype.join;
2341
+ function defineProperty(target, name, { value }) {
2342
+ Object.defineProperty(target, name, {
2343
+ configurable: true,
2344
+ enumerable: false,
2345
+ writable: true,
2346
+ value
2347
+ });
2348
+ }
2349
+ function ensureIntl() {
2350
+ if (typeof Intl === "undefined") {
2351
+ const intl = {};
2352
+ if (typeof Symbol !== "undefined") Object.defineProperty(intl, Symbol.toStringTag, {
2353
+ value: "Intl",
2354
+ writable: false,
2355
+ enumerable: false,
2356
+ configurable: true
2357
+ });
2358
+ Object.defineProperty(globalThis, "Intl", {
2359
+ configurable: true,
2360
+ enumerable: false,
2361
+ writable: true,
2362
+ value: intl
2363
+ });
2364
+ }
2365
+ if (providerIntl === void 0) providerIntl = Intl;
2366
+ return Intl;
2367
+ }
2368
+ memoize((...args) => new Intl.NumberFormat(...args), { strategy: strategies.variadic });
2369
+ memoize((...args) => new Intl.ListFormat(...args), { strategy: strategies.variadic });
2370
+ const getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
2371
+ strategies.variadic;
2372
+ let providerIntl = globalThis.Intl;
2373
+ function ownIntlProvider(name) {
2374
+ const descriptor = providerIntl && getOwnPropertyDescriptor(providerIntl, name);
2375
+ return (descriptor && getOwnPropertyDescriptor(descriptor, "value"))?.value;
2376
+ }
2377
+ let numberFormatIntrinsic = ownIntlProvider("NumberFormat");
2378
+ let listFormatIntrinsic = ownIntlProvider("ListFormat");
2379
+ let pluralRulesProvider = ownIntlProvider("PluralRules");
2380
+ const getFormatterPrototype = Object.getPrototypeOf;
2381
+ function formatterMethodLookup(name) {
2382
+ const methods = /* @__PURE__ */ new WeakMap();
2383
+ const owners = /* @__PURE__ */ new WeakMap();
2384
+ const getMethod = methods.get.bind(methods);
2385
+ const setMethod = methods.set.bind(methods);
2386
+ const getOwner = owners.get.bind(owners);
2387
+ const setOwner = owners.set.bind(owners);
2388
+ return (Constructor) => {
2389
+ const cached = getMethod(Constructor);
2390
+ if (cached) return cached;
2391
+ let prototype = getOwnPropertyDescriptor(Constructor, "prototype")?.value;
2392
+ while (prototype != null) {
2393
+ const inherited = getOwner(prototype);
2394
+ if (inherited) {
2395
+ setMethod(Constructor, inherited);
2396
+ return inherited;
2397
+ }
2398
+ const descriptor = getOwnPropertyDescriptor(prototype, name);
2399
+ const value = descriptor && getOwnPropertyDescriptor(descriptor, "value");
2400
+ if (value && typeof value.value === "function") {
2401
+ const method = value.value;
2402
+ setMethod(Constructor, method);
2403
+ setOwner(prototype, method);
2404
+ return method;
2405
+ }
2406
+ prototype = getFormatterPrototype(prototype);
2407
+ }
2408
+ };
2409
+ }
2410
+ const findFormatterPartsMethod = formatterMethodLookup("formatToParts");
2411
+ const findPluralRulesSelectMethod = formatterMethodLookup("select");
2412
+ if (typeof numberFormatIntrinsic === "function") findFormatterPartsMethod(numberFormatIntrinsic);
2413
+ if (typeof listFormatIntrinsic === "function") findFormatterPartsMethod(listFormatIntrinsic);
2414
+ if (typeof pluralRulesProvider === "function") findPluralRulesSelectMethod(pluralRulesProvider);
2415
+ const numberFormatMemoizers = /* @__PURE__ */ new WeakMap();
2416
+ numberFormatMemoizers.get.bind(numberFormatMemoizers);
2417
+ numberFormatMemoizers.set.bind(numberFormatMemoizers);
2418
+ const listFormatMemoizers = /* @__PURE__ */ new WeakMap();
2419
+ listFormatMemoizers.get.bind(listFormatMemoizers);
2420
+ listFormatMemoizers.set.bind(listFormatMemoizers);
2421
+ const pluralRulesMemoizers = /* @__PURE__ */ new WeakMap();
2422
+ pluralRulesMemoizers.get.bind(pluralRulesMemoizers);
2423
+ pluralRulesMemoizers.set.bind(pluralRulesMemoizers);
1533
2424
  // packages/intl-supportedvaluesof/polyfill.ts
1534
2425
  const intl = ensureIntl();
1535
2426
  if (shouldPolyfill()) defineProperty(intl, "supportedValuesOf", { value: supportedValuesOf });