@scrabble-solver/scrabble-solver 2.13.0 → 2.13.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.
Files changed (42) hide show
  1. package/.next/BUILD_ID +1 -1
  2. package/.next/build-manifest.json +3 -3
  3. package/.next/cache/.tsbuildinfo +1 -1
  4. package/.next/cache/next-server.js.nft.json +1 -1
  5. package/.next/cache/webpack/client-production/0.pack +0 -0
  6. package/.next/cache/webpack/client-production/index.pack +0 -0
  7. package/.next/cache/webpack/edge-server-production/0.pack +0 -0
  8. package/.next/cache/webpack/edge-server-production/index.pack +0 -0
  9. package/.next/cache/webpack/server-production/0.pack +0 -0
  10. package/.next/cache/webpack/server-production/index.pack +0 -0
  11. package/.next/next-server.js.nft.json +1 -1
  12. package/.next/prerender-manifest.json +1 -1
  13. package/.next/routes-manifest.json +1 -1
  14. package/.next/server/chunks/277.js +18 -15
  15. package/.next/server/chunks/44.js +51 -31
  16. package/.next/server/chunks/{131.js → 907.js} +924 -2
  17. package/.next/server/chunks/911.js +17 -14
  18. package/.next/server/middleware-build-manifest.js +1 -1
  19. package/.next/server/pages/404.html +1 -1
  20. package/.next/server/pages/404.js.nft.json +1 -1
  21. package/.next/server/pages/500.html +1 -1
  22. package/.next/server/pages/_app.js.nft.json +1 -1
  23. package/.next/server/pages/_document.js.nft.json +1 -1
  24. package/.next/server/pages/_error.js.nft.json +1 -1
  25. package/.next/server/pages/api/dictionary/[locale]/[word].js +1 -1
  26. package/.next/server/pages/api/dictionary/[locale]/[word].js.nft.json +1 -1
  27. package/.next/server/pages/api/dictionary/[locale].js +1 -1
  28. package/.next/server/pages/api/dictionary/[locale].js.nft.json +1 -1
  29. package/.next/server/pages/api/solve.js +1 -1
  30. package/.next/server/pages/api/solve.js.nft.json +1 -1
  31. package/.next/server/pages/api/verify.js +1 -1
  32. package/.next/server/pages/api/verify.js.nft.json +1 -1
  33. package/.next/server/pages/index.html +1 -1
  34. package/.next/server/pages/index.js.nft.json +1 -1
  35. package/.next/server/pages/index.json +1 -1
  36. package/.next/server/pages-manifest.json +1 -1
  37. package/.next/static/chunks/pages/{_app-9c8edd7786319b76.js → _app-122dc8ecfa0220d5.js} +2 -2
  38. package/.next/trace +51 -51
  39. package/package.json +9 -9
  40. package/src/i18n/ro.json +5 -5
  41. /package/.next/static/{CltG6_MGtxzoDJ0EuX7kt → 16S6EJJ0_LRmtRPwnUIw5}/_buildManifest.js +0 -0
  42. /package/.next/static/{CltG6_MGtxzoDJ0EuX7kt → 16S6EJJ0_LRmtRPwnUIw5}/_ssgManifest.js +0 -0
@@ -1 +1 @@
1
- {"version":4,"routes":{"/":{"initialRevalidateSeconds":false,"srcRoute":null,"dataRoute":"/_next/data/CltG6_MGtxzoDJ0EuX7kt/index.json"}},"dynamicRoutes":{},"notFoundRoutes":[],"preview":{"previewModeId":"81a4fbf3cd5f952536d9c94781b19e44","previewModeSigningKey":"fa32113261f23038b6f670debb868bdf0f232107a8528a7da79cde6cef97c168","previewModeEncryptionKey":"a98aa45e242ba97165e43472c93f1f61f06355cd59cf205988e598f33fe13a34"}}
1
+ {"version":4,"routes":{"/":{"initialRevalidateSeconds":false,"srcRoute":null,"dataRoute":"/_next/data/16S6EJJ0_LRmtRPwnUIw5/index.json"}},"dynamicRoutes":{},"notFoundRoutes":[],"preview":{"previewModeId":"205f0e47c2bc9b7a14ef891bb529dfca","previewModeSigningKey":"a5b71c6b6ab6c1d5b4a7de49dcca299ffc4c2b8e9eea2cce72770443a79d2770","previewModeEncryptionKey":"dbf5737feddfb660aa23ef58655abe8e325b2228f87b293fcae07a872d7ac217"}}
@@ -1 +1 @@
1
- {"version":3,"pages404":true,"basePath":"","redirects":[{"source":"/:path+/","destination":"/:path+","internal":true,"statusCode":308,"regex":"^(?:/((?:[^/]+?)(?:/(?:[^/]+?))*))/$"}],"headers":[],"dynamicRoutes":[{"page":"/api/dictionary/[locale]","regex":"^/api/dictionary/([^/]+?)(?:/)?$","routeKeys":{"nextParamlocale":"nextParamlocale"},"namedRegex":"^/api/dictionary/(?<nextParamlocale>[^/]+?)(?:/)?$"},{"page":"/api/dictionary/[locale]/[word]","regex":"^/api/dictionary/([^/]+?)/([^/]+?)(?:/)?$","routeKeys":{"nextParamlocale":"nextParamlocale","nextParamword":"nextParamword"},"namedRegex":"^/api/dictionary/(?<nextParamlocale>[^/]+?)/(?<nextParamword>[^/]+?)(?:/)?$"}],"staticRoutes":[{"page":"/","regex":"^/(?:/)?$","routeKeys":{},"namedRegex":"^/(?:/)?$"},{"page":"/404","regex":"^/404(?:/)?$","routeKeys":{},"namedRegex":"^/404(?:/)?$"}],"dataRoutes":[{"page":"/","dataRouteRegex":"^/_next/data/CltG6_MGtxzoDJ0EuX7kt/index.json$"}],"rsc":{"header":"RSC","varyHeader":"RSC, Next-Router-State-Tree, Next-Router-Prefetch","contentTypeHeader":"text/x-component"},"rewrites":[]}
1
+ {"version":3,"pages404":true,"basePath":"","redirects":[{"source":"/:path+/","destination":"/:path+","internal":true,"statusCode":308,"regex":"^(?:/((?:[^/]+?)(?:/(?:[^/]+?))*))/$"}],"headers":[],"dynamicRoutes":[{"page":"/api/dictionary/[locale]","regex":"^/api/dictionary/([^/]+?)(?:/)?$","routeKeys":{"nextParamlocale":"nextParamlocale"},"namedRegex":"^/api/dictionary/(?<nextParamlocale>[^/]+?)(?:/)?$"},{"page":"/api/dictionary/[locale]/[word]","regex":"^/api/dictionary/([^/]+?)/([^/]+?)(?:/)?$","routeKeys":{"nextParamlocale":"nextParamlocale","nextParamword":"nextParamword"},"namedRegex":"^/api/dictionary/(?<nextParamlocale>[^/]+?)/(?<nextParamword>[^/]+?)(?:/)?$"}],"staticRoutes":[{"page":"/","regex":"^/(?:/)?$","routeKeys":{},"namedRegex":"^/(?:/)?$"},{"page":"/404","regex":"^/404(?:/)?$","routeKeys":{},"namedRegex":"^/404(?:/)?$"}],"dataRoutes":[{"page":"/","dataRouteRegex":"^/_next/data/16S6EJJ0_LRmtRPwnUIw5/index.json$"}],"rsc":{"header":"RSC","varyHeader":"RSC, Next-Router-State-Tree, Next-Router-Prefetch","contentTypeHeader":"text/x-component"},"rewrites":[]}
@@ -1060,29 +1060,32 @@ const roRo = [
1060
1060
  new types_1.Config({
1061
1061
  ...games_1.scrabble,
1062
1062
  locale: types_1.Locale.RO_RO,
1063
+ /**
1064
+ * @see https://frsc1.fortunecity.ws/reg6scr.htm#vallit
1065
+ */
1063
1066
  tiles: [
1064
- { character: 'a', count: 10, score: 1 },
1065
- { character: 'b', count: 2, score: 5 },
1067
+ { character: 'a', count: 11, score: 1 },
1068
+ { character: 'b', count: 2, score: 9 },
1066
1069
  { character: 'c', count: 5, score: 1 },
1067
- { character: 'd', count: 4, score: 3 },
1070
+ { character: 'd', count: 4, score: 2 },
1068
1071
  { character: 'e', count: 9, score: 1 },
1069
- { character: 'f', count: 2, score: 4 },
1070
- { character: 'g', count: 2, score: 6 },
1071
- { character: 'h', count: 1, score: 8 },
1072
- { character: 'i', count: 11, score: 1 },
1072
+ { character: 'f', count: 2, score: 8 },
1073
+ { character: 'g', count: 2, score: 9 },
1074
+ { character: 'h', count: 1, score: 10 },
1075
+ { character: 'i', count: 10, score: 1 },
1073
1076
  { character: 'j', count: 1, score: 10 },
1074
- { character: 'l', count: 5, score: 1 },
1077
+ { character: 'l', count: 4, score: 1 },
1075
1078
  { character: 'm', count: 3, score: 4 },
1076
1079
  { character: 'n', count: 6, score: 1 },
1077
- { character: 'o', count: 5, score: 2 },
1080
+ { character: 'o', count: 5, score: 1 },
1078
1081
  { character: 'p', count: 4, score: 2 },
1079
- { character: 'r', count: 6, score: 1 },
1080
- { character: 's', count: 6, score: 1 },
1082
+ { character: 'r', count: 7, score: 1 },
1083
+ { character: 's', count: 5, score: 1 },
1081
1084
  { character: 't', count: 7, score: 1 },
1082
- { character: 'u', count: 5, score: 1 },
1083
- { character: 'v', count: 2, score: 4 },
1085
+ { character: 'u', count: 6, score: 1 },
1086
+ { character: 'v', count: 2, score: 8 },
1084
1087
  { character: 'x', count: 1, score: 10 },
1085
- { character: 'z', count: 1, score: 8 },
1088
+ { character: 'z', count: 1, score: 10 },
1086
1089
  ],
1087
1090
  }),
1088
1091
  ];
@@ -7697,7 +7700,7 @@ const fr_namespaceObject = JSON.parse('{"cell.enter-word":"Entrez un mot","cell.
7697
7700
  ;// CONCATENATED MODULE: ./src/i18n/pl.json
7698
7701
  const pl_namespaceObject = JSON.parse('{"cell.enter-word":"Wprowadź słowo","cell.filter-cell":"Miejsce docelowe","cell.set-blank":"Oznacz jako blank","cell.set-not-blank":"Oznacz jako nie blank","cell.tile.location":"Plansza: płytka ({{x}}, {{y}})","cell.toggle-direction":"Kierunek wpisywania","common.blanks":"Blanki","common.clear":"Wyczyść","common.close":"Zamknij","common.consonants":"Spółgłoski","common.loading":"Ładowanie","common.next":"Następne","common.points":"Punkty","common.previous":"Poprzednie","common.tiles":"Płytki","common.two-letter-tiles":"Dwuliterowe","common.vowels":"Samogłoski","common.word":"Słowo","common.words":"Słowa","dictionary":"Słownik","dictionary.empty-state.no-definitions":"Słowo istnieje w słowniku ale nie posiada definicji.","dictionary.empty-state.no-results":"Nie udało się znaleźć definicji słowa w słowniku.","dictionary.empty-state.not-allowed":"To słowo nie jest dopuszczalne w grach.","dictionary.empty-state.uninitialized":"Tu zostanie wyświetlona definicja słowa.","dictionary.input.placeholder":"Szukaj w słowniku…","dictionary.input.title":"Słowa rozdzielone przecinkiem","empty-state.error":"Błąd","empty-state.info":"Info","empty-state.success":"Hurra!","empty-state.warning":"Ups!","github":"Zobacz ten projekt na GitHubie","keyMap":"Skróty klawiszowe","keyMap.board":"Plansza","keyMap.board.toggle-blank":"Oznacz/odznacz płytkę jako blank","keyMap.board.toggle-direction":"Zmień kierunek wpisywania","keyMap.board-and-rack":"Plansza i stojak","keyMap.board-and-rack.insert-two-letter-tile":"Wstaw dwuliterową płytkę","keyMap.board-and-rack.navigate":"Nawigacja","keyMap.board-and-rack.remove-tile":"Zdejmij płytkę","keyMap.board-and-rack.submit":"Rozpocznij wyszukiwanie","keyMap.rack":"Stojak","keyMap.rack.insert-blank":"Wstaw blanka (spacja)","menu":"Menu","rack.placeholder":"Literki","rack.tile.location":"Stojak: płytka ({{index}})","rack.touchscreen.placeholder":"Literki…","remaining-tiles":"Pozostałe płytki","results":"Wyniki","results.empty-state.no-results":"Brak wyników - nie można wygenerować żadnego słowa.","results.empty-state.outdated":"Wyniki są nieaktualne.","results.empty-state.uninitialized":"Tu zostaną wyświetlone słowa wygenerowane z Twoich liter.","results.input.placeholder":"Szukaj rozwiązania... (RegExp)","results.insert":"Wstaw","results.preview":"Podgląd","results.solve":"Rozwiąż","settings":"Opcje","settings.autoGroupTiles":"Grupuj pozostałe płytki","settings.autoGroupTiles.left":"Po lewej","settings.autoGroupTiles.right":"Po prawej","settings.autoGroupTiles.null":"Nie grupuj","settings.game":"Gra","settings.inputMode":"Tryb wpisywania","settings.inputMode.keyboard":"Klawiatura","settings.inputMode.touchscreen":"Ekran dotykowy","settings.language":"Język","words":"Utworzone słowa","words.invalid":"Niepoprawne","words.valid":"Poprawne"}');
7699
7702
  ;// CONCATENATED MODULE: ./src/i18n/ro.json
7700
- const ro_namespaceObject = JSON.parse('{"cell.enter-word":"Introducere cuvant","cell.filter-cell":"Destinatia","cell.set-blank":"Marcare camp liber","cell.set-not-blank":"Marcare camp ocupat ","cell.tile.location":"Tabla: camp ({{x}}, {{y}})","cell.toggle-direction":"Directie scriere","common.blanks":"Campuri libere","common.clear":"Stergere","common.close":"Inchidere","common.consonants":"Consoane","common.loading":"Incarcare","common.next":"Pasul urmator","common.points":"Puncte","common.previous":"Pasul anterior","common.tiles":"Piese","common.two-letter-tiles":"2 litere","common.vowels":"Vocale","common.word":"Cuvant","common.words":"Cuvinte","dictionary":"Dictionar","dictionary.empty-state.no-definitions":"Cuvantul exista in dictionar dar nu are o definitie.","dictionary.empty-state.no-results":"Definitia nu a fost gasita in dictionar","dictionary.empty-state.not-allowed":"Cuvantul nu este permis.","dictionary.empty-state.uninitialized":"Aici va fi definitia cuvantului.","dictionary.input.placeholder":"Cautare dictionar…","dictionary.input.title":"Cuvinte separate prin virgula","empty-state.error":"Eroare","empty-state.info":"Informatii","empty-state.success":"Succes","empty-state.warning":"Atentionare","github":"Vezi acest proiect pe GitHub","keyMap":"Comanda rapida la tastatura","keyMap.board":"Tabla joc","keyMap.board.toggle-blank":"Marcheaza/Deselecteaza campul ca liber","keyMap.board.toggle-direction":"Schimbati directia de tastare","keyMap.board-and-rack":"Tabla si literele extrase","keyMap.board-and-rack.insert-two-letter-tile":"Introducere piesa 2 litere","keyMap.board-and-rack.navigate":"Navigare","keyMap.board-and-rack.remove-tile":"Indeparteaza piesa","keyMap.board-and-rack.submit":"Pornire cautare","keyMap.rack":"Grupa litere","keyMap.rack.insert-blank":"Introduce camp liber (spacebar)","menu":"Meniu","rack.placeholder":"Litere…","rack.tile.location":"Grupa litere: piesa ({{index}})","rack.touchscreen.placeholder":"Litere…","remaining-tiles":"Litere ramase","results":"Rezultate","results.empty-state.no-results":"Nu a fost gasit nici un rezultat.","results.empty-state.outdated":"Rezultatele nu sunt actuale.","results.empty-state.uninitialized":"Cuvintele formate din literele tale vor fi afisate aici.","results.input.placeholder":"Cautare solutii... (RegExp)","results.insert":"Introducere","results.preview":"Previzualizare","results.solve":"Gasire solutii","settings":"Setari","settings.autoGroupTiles":"Litere ramase","settings.autoGroupTiles.left":"In partea stanga","settings.autoGroupTiles.right":"In partea dreapta","settings.autoGroupTiles.null":"Nu se grupeaza","settings.game":"Joc","settings.inputMode":"Mod introducere","settings.inputMode.keyboard":"Tastatura","settings.inputMode.touchscreen":"Ecran","settings.language":"Limba","words":"Cuvinte create","words.invalid":"Invalid","words.valid":"Valid"}');
7703
+ const ro_namespaceObject = JSON.parse('{"cell.enter-word":"Introducere cuvant","cell.filter-cell":"Destinatia","cell.set-blank":"Marcare camp liber","cell.set-not-blank":"Marcare camp ocupat ","cell.tile.location":"Tabla: camp ({{x}}, {{y}})","cell.toggle-direction":"Directie scriere","common.blanks":"Jokeri","common.clear":"Stergere","common.close":"Inchidere","common.consonants":"Consoane","common.loading":"Incarcare","common.next":"Pasul urmator","common.points":"Puncte","common.previous":"Pasul anterior","common.tiles":"Litere","common.two-letter-tiles":"2 litere","common.vowels":"Vocale","common.word":"Cuvant","common.words":"Cuvinte","dictionary":"Dictionar","dictionary.empty-state.no-definitions":"Cuvantul exista in dictionar dar nu are o definitie.","dictionary.empty-state.no-results":"Definitia nu a fost gasita in dictionar","dictionary.empty-state.not-allowed":"Cuvantul nu apare in dictionar","dictionary.empty-state.uninitialized":"Aici va fi definitia cuvantului.","dictionary.input.placeholder":"Cautare dictionar…","dictionary.input.title":"Cuvinte separate prin virgula","empty-state.error":"Eroare","empty-state.info":"Spatiu date","empty-state.success":"Succes","empty-state.warning":"Atentionare","github":"Vezi acest proiect pe GitHub","keyMap":"Comanda rapida la tastatura","keyMap.board":"Tabla joc","keyMap.board.toggle-blank":"Marcheaza/Deselecteaza campul ca liber","keyMap.board.toggle-direction":"Schimbati directia de tastare","keyMap.board-and-rack":"Tabla si literele extrase","keyMap.board-and-rack.insert-two-letter-tile":"Introducere piesa 2 litere","keyMap.board-and-rack.navigate":"Navigare","keyMap.board-and-rack.remove-tile":"Indeparteaza piesa","keyMap.board-and-rack.submit":"Pornire cautare","keyMap.rack":"Grupa litere","keyMap.rack.insert-blank":"Introducere joker","menu":"Meniu","rack.placeholder":"Litere…","rack.tile.location":"Grupa litere: piesa ({{index}})","rack.touchscreen.placeholder":"Litere…","remaining-tiles":"Litere ramase","results":"Rezultate","results.empty-state.no-results":"Nu a fost gasit nici un rezultat.","results.empty-state.outdated":"Rezultatele nu sunt actuale.","results.empty-state.uninitialized":"Cuvintele formate din literele tale vor fi afisate aici.","results.input.placeholder":"Cautare solutii... (RegExp)","results.insert":"Introducere","results.preview":"Previzualizare","results.solve":"Gasire solutii","settings":"Setari","settings.autoGroupTiles":"Litere ramase","settings.autoGroupTiles.left":"In partea stanga","settings.autoGroupTiles.right":"In partea dreapta","settings.autoGroupTiles.null":"Nu se grupeaza","settings.game":"Joc","settings.inputMode":"Mod introducere","settings.inputMode.keyboard":"Tastatura","settings.inputMode.touchscreen":"Ecran","settings.language":"Limba","words":"Cuvinte create","words.invalid":"Invalid","words.valid":"Valid"}');
7701
7704
  ;// CONCATENATED MODULE: ./src/i18n/i18n.ts
7702
7705
 
7703
7706
 
@@ -1368,20 +1368,24 @@ exports["default"] = getEnUsWordList;
1368
1368
  /***/ }),
1369
1369
 
1370
1370
  /***/ 87537:
1371
- /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
1371
+ /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
1372
1372
 
1373
1373
 
1374
+ var __importDefault = (this && this.__importDefault) || function (mod) {
1375
+ return (mod && mod.__esModule) ? mod : { "default": mod };
1376
+ };
1374
1377
  Object.defineProperty(exports, "__esModule", ({ value: true }));
1375
1378
  const types_1 = __webpack_require__(46452);
1379
+ const latinize_1 = __importDefault(__webpack_require__(66761));
1376
1380
  const lib_1 = __webpack_require__(60337);
1377
- const FILE_URL = 'https://raw.githubusercontent.com/kamilmielnik/fise-2/master/fise-2.txt';
1381
+ const FILE_URL = 'https://raw.githubusercontent.com/kamilmielnik/scrabble-dictionaries/master/spanish/fise-2.txt';
1382
+ const N_PLACEHOLDER = '---n---';
1378
1383
  const getEsEsWordList = async () => {
1379
1384
  const words = await (0, lib_1.getTxtWordList)(FILE_URL, types_1.Locale.ES_ES);
1380
- return words.map(normalizeWord);
1381
- };
1382
- const normalizeWord = (word) => {
1383
- // normalization from https://stackoverflow.com/a/37511463
1384
- return word.normalize('NFD').replace(/[\u0300-\u036f]/g, '');
1385
+ return words
1386
+ .map((word) => word.replaceAll('ñ', N_PLACEHOLDER))
1387
+ .map(latinize_1.default)
1388
+ .map((word) => word.replaceAll(N_PLACEHOLDER, 'ñ'));
1385
1389
  };
1386
1390
  exports["default"] = getEsEsWordList;
1387
1391
 
@@ -1414,11 +1418,7 @@ const lib_1 = __webpack_require__(60337);
1414
1418
  const FILE_URL = 'https://raw.githubusercontent.com/Thecoolsim/French-Scrabble-ODS8/main/French%20ODS%20dictionary.txt';
1415
1419
  const getFrFrWordList = async () => {
1416
1420
  const words = await (0, lib_1.getTxtWordList)(FILE_URL, types_1.Locale.FR_FR);
1417
- return words.map(normalizeWord);
1418
- };
1419
- const normalizeWord = (word) => {
1420
- // normalization from https://stackoverflow.com/a/37511463
1421
- return word.normalize('NFD').replace(/[\u0300-\u036f]/g, '');
1421
+ return (0, lib_1.latinizeDiacritics)(words);
1422
1422
  };
1423
1423
  exports["default"] = getFrFrWordList;
1424
1424
 
@@ -1474,29 +1474,16 @@ exports["default"] = getPlPlWordList;
1474
1474
  /***/ }),
1475
1475
 
1476
1476
  /***/ 73691:
1477
- /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
1477
+ /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
1478
1478
 
1479
1479
 
1480
- var __importDefault = (this && this.__importDefault) || function (mod) {
1481
- return (mod && mod.__esModule) ? mod : { "default": mod };
1482
- };
1483
1480
  Object.defineProperty(exports, "__esModule", ({ value: true }));
1484
- const fs_1 = __importDefault(__webpack_require__(57147));
1481
+ const types_1 = __webpack_require__(46452);
1485
1482
  const lib_1 = __webpack_require__(60337);
1486
- const FILE_URL = 'https://dexonline.ro/static/download/scrabble/loc-flexiuni-5.0.zip';
1487
- const FILE_TO_EXTRACT_FROM_ZIP = 'loc-flexiuni-5.0.txt';
1483
+ const FILE_URL = 'https://raw.githubusercontent.com/kamilmielnik/scrabble-dictionaries/master/romanian/loc-5.0.txt';
1488
1484
  const getRoRoWordList = async () => {
1489
- const tempFilepath = (0, lib_1.getTempFilepath)();
1490
- const zipTempFilename = await (0, lib_1.downloadFile)(FILE_URL);
1491
- await (0, lib_1.unzip)(zipTempFilename, FILE_TO_EXTRACT_FROM_ZIP, tempFilepath);
1492
- fs_1.default.unlinkSync(zipTempFilename);
1493
- const file = fs_1.default.readFileSync(tempFilepath, 'utf-8');
1494
- fs_1.default.unlinkSync(tempFilepath);
1495
- const words = (0, lib_1.extractWords)(replaceDiacritics(file.toLocaleString()), 'ro-RO');
1496
- return words;
1497
- };
1498
- const replaceDiacritics = (file) => {
1499
- return file.replaceAll('ă', 'a').replaceAll('â', 'a').replaceAll('î', 'i').replaceAll('ș', 's').replaceAll('ț', 't');
1485
+ const words = await (0, lib_1.getTxtWordList)(FILE_URL, types_1.Locale.RO_RO);
1486
+ return (0, lib_1.latinizeDiacritics)(words);
1500
1487
  };
1501
1488
  exports["default"] = getRoRoWordList;
1502
1489
 
@@ -1763,7 +1750,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
1763
1750
  return (mod && mod.__esModule) ? mod : { "default": mod };
1764
1751
  };
1765
1752
  Object.defineProperty(exports, "__esModule", ({ value: true }));
1766
- exports.unzip = exports.getTxtWordList = exports.getTempFilepath = exports.getHash = exports.findFirstWordIndex = exports.extractWords = exports.downloadHtml = exports.downloadFile = void 0;
1753
+ exports.unzip = exports.unique = exports.latinizeDiacritics = exports.getTxtWordList = exports.getTempFilepath = exports.getHash = exports.findFirstWordIndex = exports.extractWords = exports.downloadHtml = exports.downloadFile = void 0;
1767
1754
  var downloadFile_1 = __webpack_require__(920);
1768
1755
  Object.defineProperty(exports, "downloadFile", ({ enumerable: true, get: function () { return __importDefault(downloadFile_1).default; } }));
1769
1756
  var downloadHtml_1 = __webpack_require__(78015);
@@ -1778,10 +1765,43 @@ var getTempFilepath_1 = __webpack_require__(5026);
1778
1765
  Object.defineProperty(exports, "getTempFilepath", ({ enumerable: true, get: function () { return __importDefault(getTempFilepath_1).default; } }));
1779
1766
  var getTxtWordList_1 = __webpack_require__(78029);
1780
1767
  Object.defineProperty(exports, "getTxtWordList", ({ enumerable: true, get: function () { return __importDefault(getTxtWordList_1).default; } }));
1768
+ var latinizeDiacritics_1 = __webpack_require__(41563);
1769
+ Object.defineProperty(exports, "latinizeDiacritics", ({ enumerable: true, get: function () { return __importDefault(latinizeDiacritics_1).default; } }));
1770
+ var unique_1 = __webpack_require__(52017);
1771
+ Object.defineProperty(exports, "unique", ({ enumerable: true, get: function () { return __importDefault(unique_1).default; } }));
1781
1772
  var unzip_1 = __webpack_require__(76987);
1782
1773
  Object.defineProperty(exports, "unzip", ({ enumerable: true, get: function () { return __importDefault(unzip_1).default; } }));
1783
1774
 
1784
1775
 
1776
+ /***/ }),
1777
+
1778
+ /***/ 41563:
1779
+ /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
1780
+
1781
+
1782
+ var __importDefault = (this && this.__importDefault) || function (mod) {
1783
+ return (mod && mod.__esModule) ? mod : { "default": mod };
1784
+ };
1785
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
1786
+ const latinize_1 = __importDefault(__webpack_require__(66761));
1787
+ const unique_1 = __importDefault(__webpack_require__(52017));
1788
+ const latinizeDiacritics = (words) => {
1789
+ return (0, unique_1.default)(words.map((word) => (0, latinize_1.default)(word)));
1790
+ };
1791
+ exports["default"] = latinizeDiacritics;
1792
+
1793
+
1794
+ /***/ }),
1795
+
1796
+ /***/ 52017:
1797
+ /***/ ((__unused_webpack_module, exports) => {
1798
+
1799
+
1800
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
1801
+ const unique = (array) => Array.from(new Set(array));
1802
+ exports["default"] = unique;
1803
+
1804
+
1785
1805
  /***/ }),
1786
1806
 
1787
1807
  /***/ 76987: