@pokepc/dataset 6.7.0-beta.1 → 6.7.1
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/README.md +15 -3
- package/build/{build-DvGzwIK8.mjs → build-D2oPkkzJ.mjs} +52 -52
- package/build/{build-DvGzwIK8.mjs.map → build-D2oPkkzJ.mjs.map} +1 -1
- package/build/{enums-DlMg7WLl.mjs → enums-u8n-nN0B.mjs} +5 -2
- package/build/enums-u8n-nN0B.mjs.map +1 -0
- package/build/lib/fs.d.mts +6 -6
- package/build/lib/fs.d.mts.map +1 -1
- package/build/lib/fs.mjs +21 -29
- package/build/lib/fs.mjs.map +1 -1
- package/build/lib/schemas.d.mts +1 -1
- package/build/lib/search.d.mts +2 -0
- package/build/lib/search.d.mts.map +1 -1
- package/build/lib/search.mjs +3 -3
- package/build/lib/search.mjs.map +1 -1
- package/build/lib/types.d.mts +1 -1
- package/build/lib/utils.d.mts +2 -0
- package/build/lib/utils.d.mts.map +1 -1
- package/build/lib/utils.mjs +3 -2
- package/build/lib-next/_build.mjs +1 -1
- package/build/lib-next/enums.d.mts.map +1 -1
- package/build/lib-next/enums.mjs +1 -1
- package/build/lib-next/schemas.d.mts +8 -8
- package/build/lib-next/schemas.mjs +1 -1
- package/build/{schemas-DZQWOWP4.d.mts → schemas-CIE3b72j.d.mts} +50 -50
- package/build/{schemas-DZQWOWP4.d.mts.map → schemas-CIE3b72j.d.mts.map} +1 -1
- package/build/{schemas-Bj1AIX0P.mjs → schemas-CWE4YPI2.mjs} +2 -2
- package/build/{schemas-Bj1AIX0P.mjs.map → schemas-CWE4YPI2.mjs.map} +1 -1
- package/build/{utils-BwovRocd.mjs → utils-BTjKkD-_.mjs} +2 -2
- package/build/utils-BTjKkD-_.mjs.map +1 -0
- package/build/utils-internal-C-UStMrZ.d.mts +7 -0
- package/build/utils-internal-C-UStMrZ.d.mts.map +1 -0
- package/build/{utils-internal-Czgdbnkv.mjs → utils-internal-DPjO9kQX.mjs} +7 -2
- package/build/{utils-internal-Czgdbnkv.mjs.map → utils-internal-DPjO9kQX.mjs.map} +1 -1
- package/data/pokedexes/champions-regular-roster-m-c.json +27 -1
- package/data/pokedexes/hoenn-oras.json +12 -0
- package/data/pokedexes/kanto-lgpe.json +11 -0
- package/data/pokedexes/national-oras.json +27 -0
- package/data/pokemon/abomasnow-mega.json +1 -1
- package/data/pokemon/aggron-mega.json +1 -1
- package/data/pokemon/ampharos-mega.json +1 -1
- package/data/pokemon/arboliva.json +1 -1
- package/data/pokemon/baxcalibur-mega.json +0 -1
- package/data/pokemon/blastoise-mega.json +12 -1
- package/data/pokemon/blaziken-mega.json +1 -1
- package/data/pokemon/charizard-mega-x.json +12 -2
- package/data/pokemon/charizard-mega-y.json +12 -2
- package/data/pokemon/cinderace.json +1 -1
- package/data/pokemon/farfetchd.json +2 -1
- package/data/pokemon/gengar-mega.json +1 -1
- package/data/pokemon/gogoat.json +2 -1
- package/data/pokemon/golisopod-mega.json +1 -1
- package/data/pokemon/grapploct.json +1 -1
- package/data/pokemon/heracross-mega.json +1 -1
- package/data/pokemon/houndoom-mega.json +1 -1
- package/data/pokemon/indeedee-f.json +1 -1
- package/data/pokemon/indeedee.json +1 -1
- package/data/pokemon/inteleon.json +1 -1
- package/data/pokemon/kangaskhan-mega.json +1 -1
- package/data/pokemon/lucario-mega.json +1 -1
- package/data/pokemon/mabosstiff.json +1 -1
- package/data/pokemon/manectric-mega.json +1 -1
- package/data/pokemon/mawile-mega.json +2 -1
- package/data/pokemon/mewtwo-mega-x.json +10 -1
- package/data/pokemon/mewtwo-mega-y.json +10 -1
- package/data/pokemon/mrmime.json +2 -1
- package/data/pokemon/pawmot.json +1 -1
- package/data/pokemon/perrserker.json +1 -1
- package/data/pokemon/persian-alola.json +2 -1
- package/data/pokemon/persian.json +2 -1
- package/data/pokemon/pincurchin.json +1 -1
- package/data/pokemon/pinsir-mega.json +1 -1
- package/data/pokemon/sableye-mega.json +1 -1
- package/data/pokemon/scizor-mega.json +1 -1
- package/data/pokemon/sirfetchd.json +1 -1
- package/data/pokemon/squawkabilly-blue.json +1 -1
- package/data/pokemon/squawkabilly-white.json +1 -1
- package/data/pokemon/squawkabilly-yellow.json +1 -1
- package/data/pokemon/squawkabilly.json +6 -2
- package/data/pokemon/swalot-f.json +7 -2
- package/data/pokemon/swalot.json +2 -1
- package/data/pokemon/thievul.json +1 -1
- package/data/pokemon/toxtricity-low-key.json +1 -1
- package/data/pokemon/toxtricity.json +1 -1
- package/data/pokemon/tyranitar-mega.json +1 -1
- package/data/pokemon/venusaur-mega.json +12 -1
- package/data/pokemon/wigglytuff.json +2 -1
- package/data-next/champions/abilities.json +117 -5
- package/data-next/champions/battle-states.json +24 -3
- package/data-next/champions/i18n/chs/abilities.json +104 -6
- package/data-next/champions/i18n/chs/battle-states.json +24 -3
- package/data-next/champions/i18n/chs/items.json +144 -0
- package/data-next/champions/i18n/chs/moves.json +25 -25
- package/data-next/champions/i18n/chs/pokemon.json +195 -0
- package/data-next/champions/i18n/cht/abilities.json +105 -7
- package/data-next/champions/i18n/cht/battle-states.json +24 -3
- package/data-next/champions/i18n/cht/items.json +144 -0
- package/data-next/champions/i18n/cht/moves.json +25 -25
- package/data-next/champions/i18n/cht/pokemon.json +195 -0
- package/data-next/champions/i18n/deu/abilities.json +105 -7
- package/data-next/champions/i18n/deu/battle-states.json +24 -3
- package/data-next/champions/i18n/deu/items.json +144 -0
- package/data-next/champions/i18n/deu/moves.json +28 -28
- package/data-next/champions/i18n/deu/pokemon.json +195 -0
- package/data-next/champions/i18n/eng/abilities.json +102 -4
- package/data-next/champions/i18n/eng/battle-states.json +24 -3
- package/data-next/champions/i18n/eng/items.json +144 -0
- package/data-next/champions/i18n/eng/moves.json +25 -25
- package/data-next/champions/i18n/eng/pokemon.json +195 -0
- package/data-next/champions/i18n/es-es/abilities.json +106 -8
- package/data-next/champions/i18n/es-es/battle-states.json +24 -3
- package/data-next/champions/i18n/es-es/items.json +145 -1
- package/data-next/champions/i18n/es-es/moves.json +25 -25
- package/data-next/champions/i18n/es-es/pokemon.json +195 -0
- package/data-next/champions/i18n/es-la/abilities.json +106 -8
- package/data-next/champions/i18n/es-la/battle-states.json +24 -3
- package/data-next/champions/i18n/es-la/items.json +145 -1
- package/data-next/champions/i18n/es-la/moves.json +26 -26
- package/data-next/champions/i18n/es-la/pokemon.json +195 -0
- package/data-next/champions/i18n/fra/abilities.json +105 -7
- package/data-next/champions/i18n/fra/battle-states.json +24 -3
- package/data-next/champions/i18n/fra/items.json +144 -0
- package/data-next/champions/i18n/fra/moves.json +25 -25
- package/data-next/champions/i18n/fra/pokemon.json +195 -0
- package/data-next/champions/i18n/ita/abilities.json +116 -18
- package/data-next/champions/i18n/ita/battle-states.json +24 -3
- package/data-next/champions/i18n/ita/items.json +145 -1
- package/data-next/champions/i18n/ita/moves.json +28 -28
- package/data-next/champions/i18n/ita/pokemon.json +195 -0
- package/data-next/champions/i18n/jpn/abilities.json +104 -6
- package/data-next/champions/i18n/jpn/battle-states.json +24 -3
- package/data-next/champions/i18n/jpn/items.json +144 -0
- package/data-next/champions/i18n/jpn/moves.json +25 -25
- package/data-next/champions/i18n/jpn/pokemon.json +195 -0
- package/data-next/champions/i18n/kor/abilities.json +104 -6
- package/data-next/champions/i18n/kor/battle-states.json +24 -3
- package/data-next/champions/i18n/kor/items.json +144 -0
- package/data-next/champions/i18n/kor/moves.json +25 -25
- package/data-next/champions/i18n/kor/pokemon.json +195 -0
- package/data-next/champions/i18n/pt-br/abilities.json +102 -4
- package/data-next/champions/i18n/pt-br/battle-states.json +24 -3
- package/data-next/champions/i18n/pt-br/items.json +144 -0
- package/data-next/champions/i18n/pt-br/moves.json +25 -25
- package/data-next/champions/i18n/pt-br/pokemon.json +195 -0
- package/data-next/champions/items.json +180 -0
- package/data-next/champions/moves.json +61 -61
- package/data-next/champions/pokemon-moves.json +1882 -173
- package/data-next/champions/pokemon.json +913 -21
- package/package.json +17 -9
- package/build/enums-DlMg7WLl.mjs.map +0 -1
- package/build/utils-BwovRocd.mjs.map +0 -1
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import { z as z$1 } from "zod";
|
|
2
2
|
//#region src/lib/schemas.d.ts
|
|
3
3
|
declare const i18nTextSchema: z$1.ZodRecord<z$1.ZodEnum<{
|
|
4
|
+
esla: "esla";
|
|
5
|
+
chs: "chs";
|
|
6
|
+
cht: "cht";
|
|
4
7
|
eng: "eng";
|
|
5
8
|
esp: "esp";
|
|
6
|
-
esla: "esla";
|
|
7
9
|
fra: "fra";
|
|
8
10
|
deu: "deu";
|
|
9
11
|
ita: "ita";
|
|
10
12
|
jap: "jap";
|
|
11
13
|
kor: "kor";
|
|
12
|
-
chs: "chs";
|
|
13
|
-
cht: "cht";
|
|
14
14
|
por: "por";
|
|
15
15
|
}>, z$1.ZodOptional<z$1.ZodString>>;
|
|
16
16
|
declare const abilitySchema: z$1.ZodObject<{
|
|
@@ -21,12 +21,13 @@ declare const abilitySchema: z$1.ZodObject<{
|
|
|
21
21
|
shortDesc: z$1.ZodString;
|
|
22
22
|
desc: z$1.ZodNullable<z$1.ZodString>;
|
|
23
23
|
tags: z$1.ZodArray<z$1.ZodEnum<{
|
|
24
|
+
defense: "defense";
|
|
25
|
+
other: "other";
|
|
24
26
|
alert: "alert";
|
|
25
27
|
"ally-helper": "ally-helper";
|
|
26
28
|
"stat-boost": "stat-boost";
|
|
27
29
|
"move-boost": "move-boost";
|
|
28
30
|
bypass: "bypass";
|
|
29
|
-
defense: "defense";
|
|
30
31
|
handicap: "handicap";
|
|
31
32
|
heal: "heal";
|
|
32
33
|
items: "items";
|
|
@@ -42,7 +43,6 @@ declare const abilitySchema: z$1.ZodObject<{
|
|
|
42
43
|
"ability-change": "ability-change";
|
|
43
44
|
"type-change": "type-change";
|
|
44
45
|
"species-specific": "species-specific";
|
|
45
|
-
other: "other";
|
|
46
46
|
}>>;
|
|
47
47
|
immunities: z$1.ZodOptional<z$1.ZodArray<z$1.ZodEnum<{
|
|
48
48
|
normal: "normal";
|
|
@@ -136,8 +136,8 @@ declare const onlineFeaturesSchema: z$1.ZodObject<{
|
|
|
136
136
|
trades: z$1.ZodBoolean;
|
|
137
137
|
raids: z$1.ZodBoolean;
|
|
138
138
|
raidStyles: z$1.ZodArray<z$1.ZodEnum<{
|
|
139
|
-
tera: "tera";
|
|
140
139
|
dynamax: "dynamax";
|
|
140
|
+
tera: "tera";
|
|
141
141
|
}>>;
|
|
142
142
|
coop: z$1.ZodBoolean;
|
|
143
143
|
}, z$1.core.$strip>;
|
|
@@ -154,9 +154,9 @@ declare const gameSchema: z$1.ZodObject<{
|
|
|
154
154
|
dlc: "dlc";
|
|
155
155
|
}>;
|
|
156
156
|
series: z$1.ZodEnum<{
|
|
157
|
-
storage: "storage";
|
|
158
157
|
main: "main";
|
|
159
158
|
spinoff: "spinoff";
|
|
159
|
+
storage: "storage";
|
|
160
160
|
legends: "legends";
|
|
161
161
|
}>;
|
|
162
162
|
gameSet: z$1.ZodNullable<z$1.ZodString>;
|
|
@@ -217,8 +217,8 @@ declare const gameSchema: z$1.ZodObject<{
|
|
|
217
217
|
trades: z$1.ZodBoolean;
|
|
218
218
|
raids: z$1.ZodBoolean;
|
|
219
219
|
raidStyles: z$1.ZodArray<z$1.ZodEnum<{
|
|
220
|
-
tera: "tera";
|
|
221
220
|
dynamax: "dynamax";
|
|
221
|
+
tera: "tera";
|
|
222
222
|
}>>;
|
|
223
223
|
coop: z$1.ZodBoolean;
|
|
224
224
|
}, z$1.core.$strip>>;
|
|
@@ -236,18 +236,18 @@ declare const itemSchema: z$1.ZodObject<{
|
|
|
236
236
|
shortDesc: z$1.ZodString;
|
|
237
237
|
desc: z$1.ZodNullable<z$1.ZodString>;
|
|
238
238
|
category: z$1.ZodEnum<{
|
|
239
|
+
berry: "berry";
|
|
239
240
|
other: "other";
|
|
240
241
|
ball: "ball";
|
|
241
242
|
medicine: "medicine";
|
|
242
243
|
battle: "battle";
|
|
243
|
-
berry: "berry";
|
|
244
244
|
machine: "machine";
|
|
245
|
-
megastone: "megastone";
|
|
246
|
-
zcrystal: "zcrystal";
|
|
247
245
|
treasure: "treasure";
|
|
248
246
|
ingredient: "ingredient";
|
|
249
247
|
material: "material";
|
|
250
248
|
key: "key";
|
|
249
|
+
megastone: "megastone";
|
|
250
|
+
zcrystal: "zcrystal";
|
|
251
251
|
}>;
|
|
252
252
|
unholdable: z$1.ZodOptional<z$1.ZodCoercedBoolean<unknown>>;
|
|
253
253
|
}, z$1.core.$strip>;
|
|
@@ -258,40 +258,40 @@ declare const pokeballSchema: z$1.ZodObject<{
|
|
|
258
258
|
shortDesc: z$1.ZodString;
|
|
259
259
|
desc: z$1.ZodNullable<z$1.ZodString>;
|
|
260
260
|
category: z$1.ZodEnum<{
|
|
261
|
+
special: "special";
|
|
261
262
|
other: "other";
|
|
262
263
|
regular: "regular";
|
|
263
|
-
special: "special";
|
|
264
264
|
hisuian: "hisuian";
|
|
265
265
|
}>;
|
|
266
266
|
unusable: z$1.ZodOptional<z$1.ZodCoercedBoolean<unknown>>;
|
|
267
267
|
}, z$1.core.$strip>;
|
|
268
268
|
declare const languageSchema: z$1.ZodObject<{
|
|
269
269
|
id: z$1.ZodEnum<{
|
|
270
|
-
esla: "esla";
|
|
271
|
-
chs: "chs";
|
|
272
|
-
cht: "cht";
|
|
273
270
|
en: "en";
|
|
274
271
|
es: "es";
|
|
272
|
+
esla: "esla";
|
|
275
273
|
fr: "fr";
|
|
276
274
|
de: "de";
|
|
277
275
|
it: "it";
|
|
278
276
|
ja: "ja";
|
|
279
277
|
ko: "ko";
|
|
278
|
+
chs: "chs";
|
|
279
|
+
cht: "cht";
|
|
280
280
|
pt: "pt";
|
|
281
281
|
}>;
|
|
282
282
|
name: z$1.ZodString;
|
|
283
283
|
nameEng: z$1.ZodString;
|
|
284
284
|
alpha3: z$1.ZodEnum<{
|
|
285
|
+
esla: "esla";
|
|
286
|
+
chs: "chs";
|
|
287
|
+
cht: "cht";
|
|
285
288
|
eng: "eng";
|
|
286
289
|
esp: "esp";
|
|
287
|
-
esla: "esla";
|
|
288
290
|
fra: "fra";
|
|
289
291
|
deu: "deu";
|
|
290
292
|
ita: "ita";
|
|
291
293
|
jap: "jap";
|
|
292
294
|
kor: "kor";
|
|
293
|
-
chs: "chs";
|
|
294
|
-
cht: "cht";
|
|
295
295
|
por: "por";
|
|
296
296
|
}>;
|
|
297
297
|
inGameCode: z$1.ZodEnum<{
|
|
@@ -407,8 +407,8 @@ declare const moveSchema: z$1.ZodObject<{
|
|
|
407
407
|
accuracy: z$1.ZodCoercedNumber<unknown>;
|
|
408
408
|
pp: z$1.ZodCoercedNumber<unknown>;
|
|
409
409
|
category: z$1.ZodEnum<{
|
|
410
|
-
special: "special";
|
|
411
410
|
physical: "physical";
|
|
411
|
+
special: "special";
|
|
412
412
|
status: "status";
|
|
413
413
|
}>;
|
|
414
414
|
priority: z$1.ZodCoercedNumber<unknown>;
|
|
@@ -424,42 +424,42 @@ declare const pokedexEntrySchema: z$1.ZodObject<{
|
|
|
424
424
|
isNonCanonical: z$1.ZodOptional<z$1.ZodCoercedBoolean<unknown>>;
|
|
425
425
|
meta: z$1.ZodOptional<z$1.ZodObject<{
|
|
426
426
|
names: z$1.ZodRecord<z$1.ZodEnum<{
|
|
427
|
+
esla: "esla";
|
|
428
|
+
chs: "chs";
|
|
429
|
+
cht: "cht";
|
|
427
430
|
eng: "eng";
|
|
428
431
|
esp: "esp";
|
|
429
|
-
esla: "esla";
|
|
430
432
|
fra: "fra";
|
|
431
433
|
deu: "deu";
|
|
432
434
|
ita: "ita";
|
|
433
435
|
jap: "jap";
|
|
434
436
|
kor: "kor";
|
|
435
|
-
chs: "chs";
|
|
436
|
-
cht: "cht";
|
|
437
437
|
por: "por";
|
|
438
438
|
}>, z$1.ZodOptional<z$1.ZodString>>;
|
|
439
439
|
speciesNames: z$1.ZodOptional<z$1.ZodRecord<z$1.ZodEnum<{
|
|
440
|
+
esla: "esla";
|
|
441
|
+
chs: "chs";
|
|
442
|
+
cht: "cht";
|
|
440
443
|
eng: "eng";
|
|
441
444
|
esp: "esp";
|
|
442
|
-
esla: "esla";
|
|
443
445
|
fra: "fra";
|
|
444
446
|
deu: "deu";
|
|
445
447
|
ita: "ita";
|
|
446
448
|
jap: "jap";
|
|
447
449
|
kor: "kor";
|
|
448
|
-
chs: "chs";
|
|
449
|
-
cht: "cht";
|
|
450
450
|
por: "por";
|
|
451
451
|
}>, z$1.ZodOptional<z$1.ZodString>>>;
|
|
452
452
|
formNames: z$1.ZodOptional<z$1.ZodRecord<z$1.ZodEnum<{
|
|
453
|
+
esla: "esla";
|
|
454
|
+
chs: "chs";
|
|
455
|
+
cht: "cht";
|
|
453
456
|
eng: "eng";
|
|
454
457
|
esp: "esp";
|
|
455
|
-
esla: "esla";
|
|
456
458
|
fra: "fra";
|
|
457
459
|
deu: "deu";
|
|
458
460
|
ita: "ita";
|
|
459
461
|
jap: "jap";
|
|
460
462
|
kor: "kor";
|
|
461
|
-
chs: "chs";
|
|
462
|
-
cht: "cht";
|
|
463
463
|
por: "por";
|
|
464
464
|
}>, z$1.ZodOptional<z$1.ZodString>>>;
|
|
465
465
|
type1: z$1.ZodOptional<z$1.ZodString>;
|
|
@@ -489,42 +489,42 @@ declare const pokedexSchema: z$1.ZodObject<{
|
|
|
489
489
|
isNonCanonical: z$1.ZodOptional<z$1.ZodCoercedBoolean<unknown>>;
|
|
490
490
|
meta: z$1.ZodOptional<z$1.ZodObject<{
|
|
491
491
|
names: z$1.ZodRecord<z$1.ZodEnum<{
|
|
492
|
+
esla: "esla";
|
|
493
|
+
chs: "chs";
|
|
494
|
+
cht: "cht";
|
|
492
495
|
eng: "eng";
|
|
493
496
|
esp: "esp";
|
|
494
|
-
esla: "esla";
|
|
495
497
|
fra: "fra";
|
|
496
498
|
deu: "deu";
|
|
497
499
|
ita: "ita";
|
|
498
500
|
jap: "jap";
|
|
499
501
|
kor: "kor";
|
|
500
|
-
chs: "chs";
|
|
501
|
-
cht: "cht";
|
|
502
502
|
por: "por";
|
|
503
503
|
}>, z$1.ZodOptional<z$1.ZodString>>;
|
|
504
504
|
speciesNames: z$1.ZodOptional<z$1.ZodRecord<z$1.ZodEnum<{
|
|
505
|
+
esla: "esla";
|
|
506
|
+
chs: "chs";
|
|
507
|
+
cht: "cht";
|
|
505
508
|
eng: "eng";
|
|
506
509
|
esp: "esp";
|
|
507
|
-
esla: "esla";
|
|
508
510
|
fra: "fra";
|
|
509
511
|
deu: "deu";
|
|
510
512
|
ita: "ita";
|
|
511
513
|
jap: "jap";
|
|
512
514
|
kor: "kor";
|
|
513
|
-
chs: "chs";
|
|
514
|
-
cht: "cht";
|
|
515
515
|
por: "por";
|
|
516
516
|
}>, z$1.ZodOptional<z$1.ZodString>>>;
|
|
517
517
|
formNames: z$1.ZodOptional<z$1.ZodRecord<z$1.ZodEnum<{
|
|
518
|
+
esla: "esla";
|
|
519
|
+
chs: "chs";
|
|
520
|
+
cht: "cht";
|
|
518
521
|
eng: "eng";
|
|
519
522
|
esp: "esp";
|
|
520
|
-
esla: "esla";
|
|
521
523
|
fra: "fra";
|
|
522
524
|
deu: "deu";
|
|
523
525
|
ita: "ita";
|
|
524
526
|
jap: "jap";
|
|
525
527
|
kor: "kor";
|
|
526
|
-
chs: "chs";
|
|
527
|
-
cht: "cht";
|
|
528
528
|
por: "por";
|
|
529
529
|
}>, z$1.ZodOptional<z$1.ZodString>>>;
|
|
530
530
|
type1: z$1.ZodOptional<z$1.ZodString>;
|
|
@@ -631,55 +631,55 @@ declare const pokemonSchema: z$1.ZodObject<{
|
|
|
631
631
|
evoFromFriendship: z$1.ZodOptional<z$1.ZodCoercedBoolean<unknown>>;
|
|
632
632
|
evoFromCondition: z$1.ZodOptional<z$1.ZodString>;
|
|
633
633
|
names: z$1.ZodRecord<z$1.ZodEnum<{
|
|
634
|
+
esla: "esla";
|
|
635
|
+
chs: "chs";
|
|
636
|
+
cht: "cht";
|
|
634
637
|
eng: "eng";
|
|
635
638
|
esp: "esp";
|
|
636
|
-
esla: "esla";
|
|
637
639
|
fra: "fra";
|
|
638
640
|
deu: "deu";
|
|
639
641
|
ita: "ita";
|
|
640
642
|
jap: "jap";
|
|
641
643
|
kor: "kor";
|
|
642
|
-
chs: "chs";
|
|
643
|
-
cht: "cht";
|
|
644
644
|
por: "por";
|
|
645
645
|
}>, z$1.ZodOptional<z$1.ZodString>>;
|
|
646
646
|
genus: z$1.ZodRecord<z$1.ZodEnum<{
|
|
647
|
+
esla: "esla";
|
|
648
|
+
chs: "chs";
|
|
649
|
+
cht: "cht";
|
|
647
650
|
eng: "eng";
|
|
648
651
|
esp: "esp";
|
|
649
|
-
esla: "esla";
|
|
650
652
|
fra: "fra";
|
|
651
653
|
deu: "deu";
|
|
652
654
|
ita: "ita";
|
|
653
655
|
jap: "jap";
|
|
654
656
|
kor: "kor";
|
|
655
|
-
chs: "chs";
|
|
656
|
-
cht: "cht";
|
|
657
657
|
por: "por";
|
|
658
658
|
}>, z$1.ZodOptional<z$1.ZodString>>;
|
|
659
659
|
speciesNames: z$1.ZodRecord<z$1.ZodEnum<{
|
|
660
|
+
esla: "esla";
|
|
661
|
+
chs: "chs";
|
|
662
|
+
cht: "cht";
|
|
660
663
|
eng: "eng";
|
|
661
664
|
esp: "esp";
|
|
662
|
-
esla: "esla";
|
|
663
665
|
fra: "fra";
|
|
664
666
|
deu: "deu";
|
|
665
667
|
ita: "ita";
|
|
666
668
|
jap: "jap";
|
|
667
669
|
kor: "kor";
|
|
668
|
-
chs: "chs";
|
|
669
|
-
cht: "cht";
|
|
670
670
|
por: "por";
|
|
671
671
|
}>, z$1.ZodOptional<z$1.ZodString>>;
|
|
672
672
|
formNames: z$1.ZodRecord<z$1.ZodEnum<{
|
|
673
|
+
esla: "esla";
|
|
674
|
+
chs: "chs";
|
|
675
|
+
cht: "cht";
|
|
673
676
|
eng: "eng";
|
|
674
677
|
esp: "esp";
|
|
675
|
-
esla: "esla";
|
|
676
678
|
fra: "fra";
|
|
677
679
|
deu: "deu";
|
|
678
680
|
ita: "ita";
|
|
679
681
|
jap: "jap";
|
|
680
682
|
kor: "kor";
|
|
681
|
-
chs: "chs";
|
|
682
|
-
cht: "cht";
|
|
683
683
|
por: "por";
|
|
684
684
|
}>, z$1.ZodOptional<z$1.ZodString>>;
|
|
685
685
|
}, z$1.core.$strip>;
|
|
@@ -801,4 +801,4 @@ declare const pokemonSearchFilterSchema: z$1.ZodObject<{
|
|
|
801
801
|
}, z$1.core.$strip>;
|
|
802
802
|
//#endregion
|
|
803
803
|
export { pokemonSchema as A, onlineFeaturesSchema as C, pokedexEntrySchema as D, pokeballSchema as E, regionSchema as M, ribbonSchema as N, pokedexSchema as O, typeSchema as P, natureSchema as S, personalitySchema as T, modernBoxPresetIndexSchema as _, boxPresetMapSchema as a, modernBoxPresetTags as b, colorSchema as c, generationSchema as d, i18nTextSchema as f, modernBoxPresetBoxSchema as g, markSchema as h, boxPresetIndexItemSchema as i, pokemonSearchFilterSchema as j, pokemonRefsSchema as k, gameFeaturesSchema as l, languageSchema as m, boxPresetBoxPokemonSchema as n, boxPresetSchema as o, itemSchema as p, boxPresetBoxSchema as r, characterSchema as s, abilitySchema as t, gameSchema as u, modernBoxPresetSchema as v, originMarkSchema as w, moveSchema as x, modernBoxPresetSlotSchema as y };
|
|
804
|
-
//# sourceMappingURL=schemas-
|
|
804
|
+
//# sourceMappingURL=schemas-CIE3b72j.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schemas-
|
|
1
|
+
{"version":3,"file":"schemas-CIE3b72j.d.mts","names":[],"sources":["../src/lib/schemas.ts"],"mappings":";;cAkEa,gBAAc,IAAA,UAAA,IAAA;;;;;;;;;;;;IAA+D,IAAA,YAAA,IAAA;cAE7E,eAAa,IAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAIxB,IAAA,KAAA;cACW,mBAAiB,IAAA;;;GAI5B,IA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a,IAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmFxB,IAAA,KAAA;cAIW,0BAAwB,IAAA;;;;;;GAQ1B,IAAA,KAAA;cAEE,2BAAyB,IAAA,UAAA,IAAA,YAAA,IAAA,YAAA,IAAA;;;;;GAOrC,IAAA,KAAA;cAEY,oBAAkB,IAAA;;;;;;;;GAG7B,IAAA,KAAA;cAEW,iBAAe,IAAA;;;;;;;;;;;;;;;;;GAS1B,IAAA,KAAA;cAEW,oBAAkB,IAAA,UAAA,IAAA,WAAA,IAAA,UAAA,IAAA,WAAA,IAAA;;;;;;;;;;;;;;;;;GAA8D,IAAA,KAAA;cAEhF;cAUA,4BAA0B,IAAA,SAAA,IAAA;cAE1B,2BAAyB,IAAA,UAAA,IAAA,YAAA,IAAA,YAAA,IAAA;;;;;GASrC,IAAA,KAAA;cAEY,0BAAwB,IAAA;;;;;;;;GAK1B,IAAA,KAAA;cAEE,uBAAqB,IAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoBvB,IAAA,KAAA;cAEE,2BAAyB,IAAA;;;;;;;;GASpC,IAAA,KAAA"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { c as itemCategories, d as moveClasses, f as moveTargets, h as pokemonTypes, n as battleStates, u as moveCategories } from "./enums-
|
|
1
|
+
import { c as itemCategories, d as moveClasses, f as moveTargets, h as pokemonTypes, n as battleStates, u as moveCategories } from "./enums-u8n-nN0B.mjs";
|
|
2
2
|
import { z as z$1 } from "zod";
|
|
3
3
|
//#region src/lib-next/schemas.ts
|
|
4
4
|
const slugSchema = z$1.string().regex(/^[a-z0-9]+(?:-[a-z0-9]+)*$/);
|
|
@@ -90,4 +90,4 @@ const pokemonMovesSchema = z$1.array(pokemonMovesRecordSchema);
|
|
|
90
90
|
//#endregion
|
|
91
91
|
export { pokemonListSchema as _, battleStatesSchema as a, pokemonSchema as b, i18nSchema as c, itemSchema as d, itemsSchema as f, pokemonI18nSchema as g, pokemonI18nRecordsSchema as h, battleStateSchema as i, itemI18nRecordsSchema as l, movesSchema as m, abilitySchema as n, championsLinkedBaseSchema as o, moveSchema as p, baseSchema as r, i18nRecordsSchema as s, abilitiesSchema as t, itemI18nSchema as u, pokemonMovesRecordSchema as v, slugSchema as x, pokemonMovesSchema as y };
|
|
92
92
|
|
|
93
|
-
//# sourceMappingURL=schemas-
|
|
93
|
+
//# sourceMappingURL=schemas-CWE4YPI2.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schemas-
|
|
1
|
+
{"version":3,"file":"schemas-CWE4YPI2.mjs","names":["z"],"sources":["../src/lib-next/schemas.ts"],"sourcesContent":["import { z } from 'zod'\nimport {\n battleStates,\n itemCategories,\n moveCategories,\n moveClasses,\n moveTargets,\n pokemonTypes,\n} from './enums'\n\nexport const slugSchema = z.string().regex(/^[a-z0-9]+(?:-[a-z0-9]+)*$/)\n\nexport const baseSchema = z.object({\n id: z.string(),\n slug: slugSchema,\n name: z.string(),\n description: z.string(),\n})\n\nexport const championsLinkedBaseSchema = z.object({\n id: slugSchema,\n championsId: z.string(),\n // Null once enriched and PokeAPI has no such resource; absent before the\n // enrichment step has run. Never a guessed id.\n pokeApiId: z.number().int().positive().nullish(),\n slug: slugSchema,\n name: z.string(),\n description: z.string(),\n})\n\nexport const i18nSchema = z.object({\n id: z.string(),\n slug: slugSchema,\n slugLoc: slugSchema,\n name: z.string(),\n description: z.string(), // description template, with placeholders like `{0}`\n})\nexport type I18nRecord = z.infer<typeof i18nSchema>\nexport const i18nRecordsSchema = z.array(i18nSchema)\nexport type I18nRecords = z.infer<typeof i18nRecordsSchema>\n\nexport const itemI18nSchema = i18nSchema.extend({\n pluralName: z.string(),\n})\nexport type ItemI18nRecord = z.infer<typeof itemI18nSchema>\nexport const itemI18nRecordsSchema = z.array(itemI18nSchema)\nexport type ItemI18nRecords = z.infer<typeof itemI18nRecordsSchema>\n\nexport const moveSchema = championsLinkedBaseSchema.extend({\n type: z.enum(pokemonTypes),\n category: z.enum(moveCategories),\n power: z.number().min(0).max(999),\n pp: z.number().min(0).max(99),\n accuracy: z.number().min(0).max(101),\n priority: z.number().min(-10).max(10),\n target: z.enum(moveTargets),\n classification: z.array(z.enum(moveClasses)),\n contact: z.boolean(), // if its a direct contact move or not\n usable: z.boolean(), // if the game allows you to use it or not (e.g. legacy)\n})\nexport type MoveRecord = z.infer<typeof moveSchema>\nexport const movesSchema = z.array(moveSchema)\nexport type MoveRecords = z.infer<typeof movesSchema>\n\nexport const abilitySchema = championsLinkedBaseSchema.extend({})\nexport type AbilityRecord = z.infer<typeof abilitySchema>\nexport const abilitiesSchema = z.array(abilitySchema)\nexport type AbilityRecords = z.infer<typeof abilitiesSchema>\n\nexport const itemSchema = championsLinkedBaseSchema.extend({\n pluralName: z.string(),\n categories: z.array(z.enum(itemCategories)),\n})\nexport type ItemRecord = z.infer<typeof itemSchema>\nexport const itemsSchema = z.array(itemSchema)\nexport type ItemRecords = z.infer<typeof itemsSchema>\n\nexport const battleStateSchema = baseSchema.extend({\n state: z.enum(battleStates),\n})\nexport type BattleStateRecord = z.infer<typeof battleStateSchema>\nexport const battleStatesSchema = z.array(battleStateSchema)\nexport type BattleStateRecords = z.infer<typeof battleStatesSchema>\n\nexport const pokemonSchema = z.object({\n id: slugSchema,\n nid: slugSchema,\n name: z.string(),\n formName: z.string().optional(),\n pokeApiId: z.number().int().positive(),\n pokeApiFormId: z.number().int().positive().optional(),\n showdownId: z.string(),\n baseSpecies: slugSchema.optional(),\n championsId: z.string().regex(/^\\d{7}$/),\n type1: z.enum(pokemonTypes),\n type2: z.enum(pokemonTypes).nullable(),\n abilities: z.array(slugSchema),\n baseHp: z.number().int().min(1),\n baseAtk: z.number().int().min(1),\n baseDef: z.number().int().min(1),\n baseSpAtk: z.number().int().min(1),\n baseSpDef: z.number().int().min(1),\n baseSpeed: z.number().int().min(1),\n height: z.number().int().min(-1),\n weight: z.number().int().min(-1),\n isForm: z.boolean(),\n isBattleOnly: z.boolean(),\n isCosmetic: z.boolean(),\n isFemale: z.boolean(),\n})\nexport type PokemonRecord = z.infer<typeof pokemonSchema>\nexport const pokemonListSchema = z.array(pokemonSchema)\nexport type PokemonRecords = z.infer<typeof pokemonListSchema>\n\nexport const pokemonI18nSchema = z.object({\n id: slugSchema,\n championsId: z.string().regex(/^\\d{7}$/),\n name: z.string(),\n formName: z.string().optional(),\n})\nexport type PokemonI18nRecord = z.infer<typeof pokemonI18nSchema>\nexport const pokemonI18nRecordsSchema = z.array(pokemonI18nSchema)\nexport type PokemonI18nRecords = z.infer<typeof pokemonI18nRecordsSchema>\n\nexport const pokemonMovesRecordSchema = z.object({\n id: slugSchema,\n moves: z.array(slugSchema),\n})\nexport type PokemonMovesRecord = z.infer<typeof pokemonMovesRecordSchema>\n\nexport const pokemonMovesSchema = z.array(pokemonMovesRecordSchema)\nexport type PokemonMovesRecords = z.infer<typeof pokemonMovesSchema>\n"],"mappings":";;;AAUA,MAAa,aAAaA,IAAE,OAAO,CAAC,CAAC,MAAM,4BAA4B;AAEvE,MAAa,aAAaA,IAAE,OAAO;CACjC,IAAIA,IAAE,OAAO;CACb,MAAM;CACN,MAAMA,IAAE,OAAO;CACf,aAAaA,IAAE,OAAO;AACxB,CAAC;AAED,MAAa,4BAA4BA,IAAE,OAAO;CAChD,IAAI;CACJ,aAAaA,IAAE,OAAO;CAGtB,WAAWA,IAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,CAAC,CAAC,QAAQ;CAC/C,MAAM;CACN,MAAMA,IAAE,OAAO;CACf,aAAaA,IAAE,OAAO;AACxB,CAAC;AAED,MAAa,aAAaA,IAAE,OAAO;CACjC,IAAIA,IAAE,OAAO;CACb,MAAM;CACN,SAAS;CACT,MAAMA,IAAE,OAAO;CACf,aAA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;AAChC,CAAC;AAED,MAAa,2BAA2BA,IAAE,MAAM,iBAAiB;AAGjE,MAAa,2BAA2BA,IAAE,OAAO;CAC/C,IAAI;CACJ,OAAOA,IAAE,MAAM,UAAU;AAC3B,CAAC;AAGD,MAAa,qBAAqBA,IAAE,MAAM,wBAAwB"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as capitalizeFirstLetter, t as arrayUnique } from "./utils-internal-
|
|
1
|
+
import { n as capitalizeFirstLetter, t as arrayUnique } from "./utils-internal-DPjO9kQX.mjs";
|
|
2
2
|
//#region src/lib/utils.ts
|
|
3
3
|
function formatDexNum(num, positions = 4) {
|
|
4
4
|
return num.toString().padStart(positions, "0");
|
|
@@ -177,4 +177,4 @@ function resolvePokemonName(meta, nickname, lang3Char) {
|
|
|
177
177
|
//#endregion
|
|
178
178
|
export { generatePokemonDescription as a, getPokemonGender as c, resolvePokemonName as d, translatePokemon as f, translatePokemonText as g, translatePokemonList as h, generateGameDescription as i, getPossiblePokemonGenders as l, translatePokemonByNid as m, dexNumToInt as n, generatePokemonSearchableText as o, translatePokemonById as p, formatDexNum as r, getGameCategoryLabel as s, dexNumToGen as t, randomPokemonList as u };
|
|
179
179
|
|
|
180
|
-
//# sourceMappingURL=utils-
|
|
180
|
+
//# sourceMappingURL=utils-BTjKkD-_.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils-BTjKkD-_.mjs","names":[],"sources":["../src/lib/utils.ts"],"sourcesContent":["// ----- Dataset UTILS --------------------------------------------\n\nimport { arrayUnique, capitalizeFirstLetter } from '../utils/utils-internal'\nexport { sortStringsInGivenOrder } from '../utils/utils-internal'\n\nexport function formatDexNum(num: number | string, positions: number = 4): string {\n return num.toString().padStart(positions, '0')\n}\n\nexport function dexNumToInt(num: number | string): number {\n return typeof num === 'string' ? Number.parseInt(num.replace(/^0+/, '')) : num\n}\n\nexport function dexNumToGen(nationalDexNum: number | string): number {\n const num = dexNumToInt(nationalDexNum)\n\n if (num <= 151) return 1\n if (num <= 251) return 2\n if (num <= 386) return 3\n if (num <= 493) return 4\n if (num <= 649) return 5\n if (num <= 721) return 6\n if (num <= 809) return 7\n if (num <= 905) return 8\n return 9\n}\n\nexport function randomPokemonList<T extends Pkds.PokemonBase>(\n pokemonList: Array<T>,\n quantity = 16,\n withForms = true,\n): Array<T> {\n const filteredPokes = withForms ? pokemonList : pokemonList.filter((pkm) => !pkm.isForm)\n const minIndex = 1\n const maxIndex = filteredPokes.length\n const distinctPokeIndices = new Set<number>()\n\n while (distinctPokeIndices.size < quantity) {\n const newPoke = Math.floor(Math.random() * (maxIndex - minIndex + 1)) + minIndex\n distinctPokeIndices.add(newPoke)\n }\n\n return Array.from(distinctPokeIndices)\n .map((index) => filteredPokes[index])\n .filter(Boolean)\n}\n\nexport function getPossiblePokemonGenders(meta: Pkds.Pokemon): Pkds.Gender[] {\n if (meta.hasGenderDifferences && meta.isFemaleForm) {\n return ['f']\n }\n if (meta.hasGenderDifferences && !meta.isFemaleForm) {\n return ['m']\n }\n if (meta.maleRate >= 100) {\n return ['m']\n }\n if (meta.femaleRate >= 100) {\n return ['f']\n }\n if (meta.maleRate <= 0 && meta.femaleRate <= 0) {\n return []\n }\n return ['m', 'f']\n}\n\nexport function getPokemonGender(\n inputGender: string | null | undefined,\n meta: Pkds.Pokemon,\n options?: { allowEmpty?: boolean },\n): Pkds.Gender {\n const possibleGenders = getPossiblePokemonGenders(meta)\n if (possibleGenders.length === 1) {\n return possibleGenders[0]\n }\n if (possibleGenders.length === 0) {\n return null\n }\n\n if (inputGender === 'm' || inputGender === 'f') {\n return inputGender\n }\n\n if (options?.allowEmpty) {\n // if allowEmpty is true, we won't determine/guess the gender, and return null\n // at this point, inputGender is either null or undefined as well\n return null\n }\n\n // if the gender is not specified, we need to determine it based on the maleRate and femaleRate\n if (meta.maleRate >= meta.femaleRate) {\n return 'm'\n }\n\n // if the femaleRate is greater than the maleRate, then the gender is female\n return 'f'\n}\n\n// ----- Dataset Text and Translation UTILS --------------------------------------------\n\nexport function translatePokemonText(\n pkm: Pkds.Pokemon,\n lang3Char: Pkds.LanguageAlpha3,\n): Pkds.PokemonText {\n const fallback = lang3Char === 'eng' ? undefined : translatePokemon(pkm, 'eng')\n const pkmName = pkm.names[lang3Char] ?? fallback?.name ?? pkm.id\n\n const texts: Pkds.PokemonText = {\n lang: lang3Char,\n genusText: pkm.genus[lang3Char] ?? fallback?.genusText,\n name: pkmName,\n speciesName: pkm.speciesNames[lang3Char] ?? pkmName ?? fallback?.speciesName ?? pkmName,\n formName: pkm.formNames[lang3Char] ?? fallback?.formName,\n }\n\n return texts\n}\n\nexport function translatePokemon(\n pokemon: Pkds.Pokemon | Pkds.TranslatedPokemon,\n lang: Pkds.LanguageAlpha3,\n dexNumPositions?: number,\n): Pkds.TranslatedPokemon {\n if (!('name' in pokemon)) {\n return {\n ...pokemon,\n ...translatePokemonText(pokemon, lang),\n speciesGen: dexNumToGen(pokemon.dexNum),\n dexNum: formatDexNum(\n pokemon.dexNum,\n dexNumPositions ?? Math.max(3, String(pokemon.dexNum).length),\n ),\n searchableText: generatePokemonSearchableText(pokemon),\n }\n }\n\n return {\n ...pokemon,\n ...translatePokemonText(pokemon, lang),\n }\n}\n\nexport function translatePokemonList(\n pokemonList: Array<Pkds.Pokemon | Pkds.TranslatedPokemon>,\n lang: Pkds.LanguageAlpha3,\n): Array<Pkds.TranslatedPokemon> {\n return pokemonList.map((pokemon) => translatePokemon(pokemon, lang))\n}\n\nexport function translatePokemonById(\n pokemonList: Array<Pkds.Pokemon | Pkds.TranslatedPokemon>,\n lang: Pkds.LanguageAlpha3,\n): Record<string, Pkds.TranslatedPokemon> {\n return Object.fromEntries(\n pokemonList.map((pokemon) => [pokemon.id, translatePokemon(pokemon, lang)]),\n )\n}\n\nexport function translatePokemonByNid(\n pokemonList: Array<Pkds.Pokemon | Pkds.TranslatedPokemon>,\n lang: Pkds.LanguageAlpha3,\n): Record<string, Pkds.TranslatedPokemon> {\n return Object.fromEntries(\n pokemonList.map((pokemon) => [pokemon.nid, translatePokemon(pokemon, lang)]),\n )\n}\n\nexport function generatePokemonDescription(\n pokemon: Pkds.TranslatedPokemon,\n lang3Char: Pkds.LanguageAlpha3,\n) {\n const parts = []\n const features = []\n const text = translatePokemonText(pokemon, lang3Char)\n\n // Basic description\n parts.push(`${text.genusText}`)\n\n // Form information\n if (pokemon.isForm) {\n parts.push(`Form: ${pokemon.formName}`)\n }\n\n // Pokemon category\n if (pokemon.isMythical) {\n features.push('Mythical')\n }\n if (pokemon.isLegendary) {\n features.push('Legendary')\n }\n\n // Type and generation information\n const types = [pokemon.type1]\n if (pokemon.type2) types.push(pokemon.type2)\n parts.push(`${types.map(capitalizeFirstLetter).join('/')} type`)\n parts.push(`It was discovered in Generation ${pokemon.gen}`)\n\n if (features.length > 0) {\n parts.push(`Classified as a ${features.join(' and ')} Pokémon`)\n }\n\n return parts.join('. ') + '.'\n}\n\nexport function generatePokemonSearchableText(poke: Pkds.Pokemon) {\n const pokeName = arrayUnique(Object.values(poke.names ?? {})).join(' ')\n const pokeFormName = arrayUnique(Object.values(poke.formNames ?? {})).join(' ')\n const speciesGen = dexNumToGen(poke.dexNum)\n\n const fullText = [\n pokeName,\n pokeFormName,\n poke.dexNum,\n poke.id,\n `type:${poke.type1}`,\n poke.type2 ? `type:${poke.type2}` : '',\n `region:${poke.region}`,\n `color:${poke.color}${poke.color === 'brown' ? ' color:orange' : ''}`,\n `gen${speciesGen} gen:${speciesGen} gen${poke.gen} gen:${poke.gen}`,\n poke.isMythical ? 'mythical' : '',\n poke.isLegendary ? 'legendary' : '',\n poke.isFemaleForm ? 'female' : '',\n poke.isBaby ? 'baby' : '',\n poke.isUltraBeast ? 'ultrabeast ultra beast' : '',\n poke.isRegional ? 'regional' : '',\n poke.isFusion ? 'fusion' : '',\n poke.isParadox ? 'paradox' : '',\n poke.isConvergent ? 'convergent' : '',\n poke.isCosmeticForm ? 'cosmetic' : '',\n poke.isGmax ? 'gigantamax gmax' : '',\n poke.isForm ? `is-form` : ``,\n poke.isMega ? `is-mega` : ``,\n poke.isBattleOnlyForm ? `is-battle-only` : `not-battle-only`,\n poke.storableIn.length > 0 ? 'is-storable' : 'not-storable',\n ]\n .filter(Boolean)\n .join(' ')\n .toLowerCase()\n\n return fullText\n}\n\nexport function getGameCategoryLabel(game: Pkds.Game): string {\n switch (game.series) {\n case 'main':\n return 'Main-series'\n case 'legends':\n return 'Legends-series'\n case 'storage':\n return 'Storage-series'\n default:\n return 'Spin-off'\n }\n}\n\nexport function generateGameDescription(game: Pkds.Game, gameCatText: string) {\n const platforms = game.platforms.map((platform: string) => platform.toUpperCase()).join(' / ')\n const features = []\n const parts = []\n const genPart = game.gen > 0 ? ` from Generation ${game.gen} ` : ''\n const releaseText = game.isUnreleased ? 'that will be released for' : 'released for'\n\n parts.push(\n `Pokémon ${game.name} is a ${gameCatText} ${game.type} ${genPart}${releaseText} ${platforms}`,\n )\n\n // if (game.gen > 0) {\n // parts.push(`It's a Generation ${game.gen} game`)\n // }\n\n if (game.features.gmax) features.push('Gigantamax')\n if (game.features.tera) features.push('Terastallization')\n if (game.features.alpha) features.push('Alpha Pokémon')\n\n if (features.length > 0) {\n // parts.push(`It features ${features.join(', ')}`)\n }\n\n if (game.region && game.region !== 'unknown') {\n const capitalizedRegion = game.region.charAt(0).toUpperCase() + game.region.slice(1)\n parts.push(`The game takes place in the ${capitalizedRegion} region`)\n }\n\n return parts.join('. ') + '.'\n}\n\nexport function resolvePokemonName(\n meta: Pkds.TranslatedPokemon,\n nickname?: string,\n lang3Char?: Pkds.LanguageAlpha3,\n): Pkds.PokemonNameInfo {\n const txt: Pkds.PokemonText = lang3Char\n ? translatePokemonText(meta, lang3Char)\n : {\n lang: meta.lang,\n name: meta.name,\n speciesName: meta.speciesName,\n formName: meta.formName,\n genusText: meta.genusText,\n }\n\n const nameObj: Pkds.PokemonNameInfo = {\n displayName: txt.speciesName ?? txt.name,\n displayFormName: txt.formName,\n fullName: txt.name,\n speciesName: txt.speciesName ?? txt.name,\n formName: txt.formName,\n isNicknamed: !!nickname,\n lang: txt.lang,\n }\n\n if (meta.isForm) {\n if (meta.isMega || meta.isPrimal || meta.isGmax) {\n nameObj.displayName = nameObj.fullName\n } else if (txt.formName) {\n nameObj.displayName = `${nameObj.speciesName} (${txt.formName})`\n }\n }\n if (nickname) {\n nameObj.displayName = `${nickname} - ${nameObj.displayName}`\n }\n return nameObj\n}\n"],"mappings":";;AAKA,SAAgB,aAAa,KAAsB,YAAoB,GAAW;CAChF,OAAO,IAAI,SAAS,CAAC,CAAC,SAAS,WAAW,GAAG;AAC/C;AAEA,SAAgB,YAAY,KAA8B;CACxD,OAAO,OAAO,QAAQ,WAAW,OAAO,SAAS,IAAI,QAAQ,OAAO,EAAE,CAAC,IAAI;AAC7E;AAEA,SAAgB,YAAY,gBAAyC;CACnE,MAAM,MAAM,YAAY,cAAc;CAEtC,IAAI,OAAO,KAAK,OAAO;CACvB,IAAI,OAAO,KAAK,OAAO;CACvB,IAAI,OAAO,KAAK,OAAO;CACvB,IAAI,OAAO,KAAK,OAAO;CACvB,IAAI,OAAO,KAAK,OAAO;CACvB,IAAI,OAAO,KAAK,OAAO;CACvB,IAAI,OAAO,KAAK,OAAO;CACvB,IAAI,OAAO,KAAK,OAAO;CACvB,OAAO;AACT;AAEA,SAAgB,kBACd,aACA,WAAW,IACX,YAAY,MACF;CACV,MAAM,gBAAgB,YAAY,cAAc,YAAY,QAAQ,QAAQ,CAAC,IAAI,MAAM;CACvF,MAAM,WAAW;CACjB,MAAM,WAAW,cAAc;CAC/B,MAAM,sCAAsB,IAAI,IAAY;CAE5C,OAAO,oBAAoB,OAAO,UAAU;EAC1C,MAAM,UAAU,KAAK,MAAM,KAAK,OAAO,KAAK,WAAW,WAAW,EAAE,IAAI;EACxE,oBAAoB,IAAI,OAAO;CACjC;CAEA,OAAO,MAAM,KAAK,mBAAmB,CAAC,CACnC,KAAK,UAAU,cAAc,MAAM,CAAC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der: string[]): string[];
|
|
3
|
+
declare function sanitizeSearchQuery(query?: string | null): string;
|
|
4
|
+
declare function matchesSearchQuery(haystack: string, query?: string | null): boolean;
|
|
5
|
+
//#endregion
|
|
6
|
+
export { sanitizeSearchQuery as n, sortStringsInGivenOrder as r, matchesSearchQuery as t };
|
|
7
|
+
//# sourceMappingURL=utils-internal-C-UStMrZ.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils-internal-C-UStMrZ.d.mts","names":[],"sources":["../src/utils/utils-internal.ts"],"mappings":";iBAQgB,wBAAwB,4BAA4B;iBAQpD,oBAAoB;iBAyCpB,mBAAmB,kBAAkB"}
|
|
@@ -5,6 +5,11 @@ function capitalizeFirstLetter(string) {
|
|
|
5
5
|
function arrayUnique(array) {
|
|
6
6
|
return Array.from(new Set(array));
|
|
7
7
|
}
|
|
8
|
+
function sortStringsInGivenOrder(strs, rightOrder) {
|
|
9
|
+
return [...strs ?? []].sort((a, b) => {
|
|
10
|
+
return rightOrder.indexOf(a) - rightOrder.indexOf(b);
|
|
11
|
+
});
|
|
12
|
+
}
|
|
8
13
|
function sanitizeSearchQuery(query) {
|
|
9
14
|
if (query === void 0 || query === null) return "";
|
|
10
15
|
return query.toLowerCase().replace(/\s{2,}/, " ").replace(/,/g, " ").replace(/\s{2,}/, " ");
|
|
@@ -28,6 +33,6 @@ function matchesSearchQuery(haystack, query) {
|
|
|
28
33
|
return positive.every((token) => normalizedHaystack.includes(token)) && negative.every((token) => !normalizedHaystack.includes(token));
|
|
29
34
|
}
|
|
30
35
|
//#endregion
|
|
31
|
-
export { sanitizeSearchQuery as i, capitalizeFirstLetter as n, matchesSearchQuery as r, arrayUnique as t };
|
|
36
|
+
export { sortStringsInGivenOrder as a, sanitizeSearchQuery as i, capitalizeFirstLetter as n, matchesSearchQuery as r, arrayUnique as t };
|
|
32
37
|
|
|
33
|
-
//# sourceMappingURL=utils-internal-
|
|
38
|
+
//# sourceMappingURL=utils-internal-DPjO9kQX.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils-internal-
|
|
1
|
+
{"version":3,"file":"utils-internal-DPjO9kQX.mjs","names":[],"sources":["../src/utils/utils-internal.ts"],"sourcesContent":["export function capitalizeFirstLetter(string: string): string {\n return string.charAt(0).toUpperCase() + string.slice(1)\n}\n\nexport function arrayUnique<T>(array: T[]): T[] {\n return Array.from(new Set(array))\n}\n\nexport function sortStringsInGivenOrder(strs: string[] | undefined, rightOrder: string[]) {\n return [...(strs ?? [])].sort((a, b) => {\n const aIndex = rightOrder.indexOf(a)\n const bIndex = rightOrder.indexOf(b)\n return aIndex - bIndex\n })\n}\n\nexport function sanitizeSearchQuery(query?: string | null) {\n if (query === undefined || query === null) {\n return ''\n }\n return query\n .toLowerCase()\n .replace(/\\s{2,}/, ' ')\n .replace(/,/g, ' ')\n .replace(/\\s{2,}/, ' ')\n}\n\nexport function sanitizeFormStringSpaces(str: string | FormDataEntryValue | null | undefined) {\n if (!str) {\n return ''\n }\n return str.toString().replace(/\\s+/g, ' ').trim()\n}\n\nexport function splitSearchQueryTokens(query?: string | null): {\n positive: string[]\n negative: string[]\n} {\n const tokens = sanitizeSearchQuery(query).trim().split(/\\s+/).filter(Boolean)\n\n return tokens.reduce(\n (result, token) => {\n if (token.startsWith('!')) {\n const negatedToken = token.slice(1).trim()\n if (negatedToken) {\n result.negative.push(negatedToken)\n }\n } else {\n result.positive.push(token)\n }\n\n return result\n },\n { positive: [] as string[], negative: [] as string[] },\n )\n}\n\nexport function matchesSearchQuery(haystack: string, query?: string | null): boolean {\n const { positive, negative } = splitSearchQueryTokens(query)\n if (positive.length === 0 && negative.length === 0) {\n return true\n }\n\n const normalizedHaystack = sanitizeSearchQuery(haystack)\n\n return (\n positive.every((token) => normalizedHaystack.includes(token)) &&\n negative.every((token) => !normalizedHaystack.includes(token))\n )\n}\n"],"mappings":";AAAA,SAAgB,sBAAsB,QAAwB;CAC5D,OAAO,OAAO,OAAO,C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|
|
|
2
2
|
"id": "champions-regular-roster-m-c",
|
|
3
3
|
"name": "Recruiting Ranch - Regular Roster M-C",
|
|
4
4
|
"shortDesc": "List of Pokémon eligible for battle in Pokémon Champions Regulation Set M-C.",
|
|
5
|
-
"desc": "Regular Roster M-C features all Pokémon (and forms) eligible for battle in Regulation Set M-C. This includes all recruitable and transfer-only Pokémon in the Regulation Set.
|
|
5
|
+
"desc": "Regular Roster M-C features all Pokémon (and forms) eligible for battle in Regulation Set M-C. This includes all recruitable and transfer-only Pokémon in the Regulation Set.",
|
|
6
6
|
"gen": 0,
|
|
7
7
|
"region": null,
|
|
8
8
|
"isNational": false,
|
|
@@ -33,8 +33,11 @@
|
|
|
33
33
|
{ "pid": "clefable-mega", "dexNum": 36, "isForm": true },
|
|
34
34
|
{ "pid": "ninetales", "dexNum": 38, "isForm": false },
|
|
35
35
|
{ "pid": "ninetales-alola", "dexNum": 38, "isForm": true },
|
|
36
|
+
{ "pid": "wigglytuff", "dexNum": 40, "isForm": false },
|
|
36
37
|
{ "pid": "vileplume", "dexNum": 45, "isForm": false },
|
|
37
38
|
{ "pid": "vileplume-f", "dexNum": 45, "isForm": true },
|
|
39
|
+
{ "pid": "persian", "dexNum": 53, "isForm": false },
|
|
40
|
+
{ "pid": "persian-alola", "dexNum": 53, "isForm": true },
|
|
38
41
|
{ "pid": "arcanine", "dexNum": 59, "isForm": false },
|
|
39
42
|
{ "pid": "arcanine-hisui", "dexNum": 59, "isForm": true },
|
|
40
43
|
{ "pid": "alakazam", "dexNum": 65, "isForm": false },
|
|
@@ -46,12 +49,14 @@
|
|
|
46
49
|
{ "pid": "slowbro", "dexNum": 80, "isForm": false },
|
|
47
50
|
{ "pid": "slowbro-mega", "dexNum": 80, "isForm": true },
|
|
48
51
|
{ "pid": "slowbro-galar", "dexNum": 80, "isForm": true },
|
|
52
|
+
{ "pid": "farfetchd", "dexNum": 83, "isForm": false },
|
|
49
53
|
{ "pid": "gengar", "dexNum": 94, "isForm": false },
|
|
50
54
|
{ "pid": "gengar-mega", "dexNum": 94, "isForm": true },
|
|
51
55
|
{ "pid": "kangaskhan", "dexNum": 115, "isForm": false },
|
|
52
56
|
{ "pid": "kangaskhan-mega", "dexNum": 115, "isForm": true },
|
|
53
57
|
{ "pid": "starmie", "dexNum": 121, "isForm": false },
|
|
54
58
|
{ "pid": "starmie-mega", "dexNum": 121, "isForm": true },
|
|
59
|
+
{ "pid": "mrmime", "dexNum": 122, "isForm": false },
|
|
55
60
|
{ "pid": "pinsir", "dexNum": 127, "isForm": false },
|
|
56
61
|
{ "pid": "pinsir-mega", "dexNum": 127, "isForm": true },
|
|
57
62
|
{ "pid": "tauros", "dexNum": 128, "isForm": false },
|
|
@@ -126,6 +131,8 @@
|
|
|
126
131
|
{ "pid": "medicham-mega", "dexNum": 308, "isForm": true },
|
|
127
132
|
{ "pid": "manectric", "dexNum": 310, "isForm": false },
|
|
128
133
|
{ "pid": "manectric-mega", "dexNum": 310, "isForm": true },
|
|
134
|
+
{ "pid": "swalot", "dexNum": 317, "isForm": false },
|
|
135
|
+
{ "pid": "swalot-f", "dexNum": 317, "isForm": true },
|
|
129
136
|
{ "pid": "sharpedo", "dexNum": 319, "isForm": false },
|
|
130
137
|
{ "pid": "sharpedo-mega", "dexNum": 319, "isForm": true },
|
|
131
138
|
{ "pid": "camerupt", "dexNum": 323, "isForm": false },
|
|
@@ -279,6 +286,7 @@
|
|
|
279
286
|
{ "pid": "florges-orange", "dexNum": 671, "isForm": true },
|
|
280
287
|
{ "pid": "florges-blue", "dexNum": 671, "isForm": true },
|
|
281
288
|
{ "pid": "florges-white", "dexNum": 671, "isForm": true },
|
|
289
|
+
{ "pid": "gogoat", "dexNum": 673, "isForm": false },
|
|
282
290
|
{ "pid": "pangoro", "dexNum": 675, "isForm": false },
|
|
283
291
|
{ "pid": "furfrou", "dexNum": 676, "isForm": false },
|
|
284
292
|
{ "pid": "furfrou-heart", "dexNum": 676, "isForm": true, "transferOnly": true },
|
|
@@ -347,14 +355,22 @@
|
|
|
347
355
|
{ "pid": "drampa-mega", "dexNum": 780, "isForm": true },
|
|
348
356
|
{ "pid": "kommoo", "dexNum": 784, "isForm": false },
|
|
349
357
|
{ "pid": "rillaboom", "dexNum": 812, "isForm": false },
|
|
358
|
+
{ "pid": "cinderace", "dexNum": 815, "isForm": false },
|
|
359
|
+
{ "pid": "inteleon", "dexNum": 818, "isForm": false },
|
|
350
360
|
{ "pid": "corviknight", "dexNum": 823, "isForm": false },
|
|
361
|
+
{ "pid": "thievul", "dexNum": 828, "isForm": false },
|
|
351
362
|
{ "pid": "flapple", "dexNum": 841, "isForm": false },
|
|
352
363
|
{ "pid": "appletun", "dexNum": 842, "isForm": false },
|
|
353
364
|
{ "pid": "sandaconda", "dexNum": 844, "isForm": false },
|
|
365
|
+
{ "pid": "toxtricity", "dexNum": 849, "isForm": false },
|
|
366
|
+
{ "pid": "toxtricity-low-key", "dexNum": 849, "isForm": true },
|
|
367
|
+
{ "pid": "grapploct", "dexNum": 853, "isForm": false },
|
|
354
368
|
{ "pid": "polteageist", "dexNum": 855, "isForm": false },
|
|
355
369
|
{ "pid": "polteageist-antique", "dexNum": 855, "isForm": true },
|
|
356
370
|
{ "pid": "hatterene", "dexNum": 858, "isForm": false },
|
|
357
371
|
{ "pid": "grimmsnarl", "dexNum": 861, "isForm": false },
|
|
372
|
+
{ "pid": "perrserker", "dexNum": 863, "isForm": false },
|
|
373
|
+
{ "pid": "sirfetchd", "dexNum": 865, "isForm": false },
|
|
358
374
|
{ "pid": "mrrime", "dexNum": 866, "isForm": false },
|
|
359
375
|
{ "pid": "runerigus", "dexNum": 867, "isForm": false },
|
|
360
376
|
{ "pid": "alcremie", "dexNum": 869, "isForm": false },
|
|
@@ -422,6 +438,9 @@
|
|
|
422
438
|
{ "pid": "alcremie-rainbow-swirl-ribbon", "dexNum": 869, "isForm": true },
|
|
423
439
|
{ "pid": "falinks", "dexNum": 870, "isForm": false },
|
|
424
440
|
{ "pid": "falinks-mega", "dexNum": 870, "isForm": true },
|
|
441
|
+
{ "pid": "pincurchin", "dexNum": 871, "isForm": false },
|
|
442
|
+
{ "pid": "indeedee", "dexNum": 876, "isForm": false },
|
|
443
|
+
{ "pid": "indeedee-f", "dexNum": 876, "isForm": true },
|
|
425
444
|
{ "pid": "morpeko", "dexNum": 877, "isForm": false },
|
|
426
445
|
{ "pid": "morpeko-hangry", "dexNum": 877, "isForm": true },
|
|
427
446
|
{ "pid": "dragapult", "dexNum": 887, "isForm": false },
|
|
@@ -434,12 +453,19 @@
|
|
|
434
453
|
{ "pid": "meowscarada", "dexNum": 908, "isForm": false },
|
|
435
454
|
{ "pid": "skeledirge", "dexNum": 911, "isForm": false },
|
|
436
455
|
{ "pid": "quaquaval", "dexNum": 914, "isForm": false },
|
|
456
|
+
{ "pid": "pawmot", "dexNum": 923, "isForm": false },
|
|
437
457
|
{ "pid": "maushold", "dexNum": 925, "isForm": false },
|
|
438
458
|
{ "pid": "maushold-three", "dexNum": 925, "isForm": true },
|
|
459
|
+
{ "pid": "arboliva", "dexNum": 930, "isForm": false },
|
|
460
|
+
{ "pid": "squawkabilly", "dexNum": 931, "isForm": false },
|
|
461
|
+
{ "pid": "squawkabilly-blue", "dexNum": 931, "isForm": true },
|
|
462
|
+
{ "pid": "squawkabilly-yellow", "dexNum": 931, "isForm": true },
|
|
463
|
+
{ "pid": "squawkabilly-white", "dexNum": 931, "isForm": true },
|
|
439
464
|
{ "pid": "garganacl", "dexNum": 934, "isForm": false },
|
|
440
465
|
{ "pid": "armarouge", "dexNum": 936, "isForm": false },
|
|
441
466
|
{ "pid": "ceruledge", "dexNum": 937, "isForm": false },
|
|
442
467
|
{ "pid": "bellibolt", "dexNum": 939, "isForm": false },
|
|
468
|
+
{ "pid": "mabosstiff", "dexNum": 943, "isForm": false },
|
|
443
469
|
{ "pid": "scovillain", "dexNum": 952, "isForm": false },
|
|
444
470
|
{ "pid": "scovillain-mega", "dexNum": 952, "isForm": true },
|
|
445
471
|
{ "pid": "espathra", "dexNum": 956, "isForm": false },
|