@anywayseo/tools 4.2.2 → 5.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (74) hide show
  1. package/dist/components/base/index.d.ts +1 -0
  2. package/dist/components/base/link/index.d.ts +2 -0
  3. package/dist/components/base/link/utils.d.ts +1 -0
  4. package/dist/components/game-info/utils.d.ts +2 -2
  5. package/dist/components/index.cjs +3 -1
  6. package/dist/components/index.mjs +3 -1
  7. package/dist/components/layout/header/locale-switcher/icons/earth/index.d.ts +2 -0
  8. package/dist/components/layout/header/locale-switcher/icons/france/index.d.ts +2 -0
  9. package/dist/components/layout/header/locale-switcher/icons/germany/index.d.ts +2 -0
  10. package/dist/components/layout/header/locale-switcher/icons/globe/index.d.ts +2 -0
  11. package/dist/components/layout/header/locale-switcher/icons/index.d.ts +6 -0
  12. package/dist/components/layout/header/locale-switcher/icons/italy/index.d.ts +2 -0
  13. package/dist/components/layout/header/locale-switcher/icons/russia/index.d.ts +2 -0
  14. package/dist/components/layout/header/locale-switcher/index.d.ts +8 -0
  15. package/dist/components/layout/header/locale-switcher/utils.d.ts +2 -0
  16. package/dist/components/layout/header/navigation/desktop/index.d.ts +1 -1
  17. package/dist/components/layout/header/navigation/index.d.ts +1 -1
  18. package/dist/components/layout/header/navigation/mobile/index.d.ts +1 -1
  19. package/dist/components/seo/index.d.ts +2 -3
  20. package/dist/hooks/index.cjs +4 -2
  21. package/dist/hooks/index.d.ts +1 -0
  22. package/dist/hooks/index.mjs +4 -2
  23. package/dist/hooks/use-localization/index.d.ts +6 -0
  24. package/dist/i18n/index.cjs +11 -5
  25. package/dist/i18n/index.d.ts +3 -2
  26. package/dist/i18n/index.mjs +11 -5
  27. package/dist/i18n/resources/fr/index.d.ts +112 -0
  28. package/dist/{index-N8nXj4-i.js → index-3nQCWHPU.js} +219 -86
  29. package/dist/index-At00w6EN.js +9 -0
  30. package/dist/{index-BPLxhZG_.js → index-BHfpWNqh.js} +183 -73
  31. package/dist/{index-MpNfBHkQ.mjs → index-BJRvnR8Q.mjs} +1 -5
  32. package/dist/index-BRVKhbs6.mjs +6 -0
  33. package/dist/index-BmaWfWLV.mjs +10 -0
  34. package/dist/{index-BV0hDmYP.js → index-BnmGE5_x.js} +3 -2
  35. package/dist/{index-DPO0aIC3.mjs → index-Bu4S7kG8.mjs} +7 -10
  36. package/dist/{index-DVcQxWMZ.js → index-C6MG_f24.js} +0 -4
  37. package/dist/{index-BE9gNdXx.mjs → index-CACDltm3.mjs} +183 -73
  38. package/dist/index-CYr1ct1t.js +93 -0
  39. package/dist/index-CbuiYkSg.js +5 -0
  40. package/dist/index-Cc85xj4h.mjs +27 -0
  41. package/dist/index-D1bJmcpz.js +49 -0
  42. package/dist/{index-DuQjQMNN.js → index-D34TfBTR.js} +7 -10
  43. package/dist/{index-CcsbqDXL.mjs → index-DVAydNYV.mjs} +7 -3
  44. package/dist/index-DnvTeCy9.mjs +50 -0
  45. package/dist/index-DqGO34ef.js +26 -0
  46. package/dist/{index-DF_u_tzx.js → index-Dur8aLpm.js} +7 -3
  47. package/dist/{index-CkTgVjZS.mjs → index-QazOxABc.mjs} +3 -2
  48. package/dist/{index-DAbZBo7_.mjs → index-X2ihbchG.mjs} +200 -67
  49. package/dist/index-cQqALZIW.mjs +94 -0
  50. package/dist/index.cjs +41 -31
  51. package/dist/index.mjs +30 -20
  52. package/dist/providers/index.cjs +2 -2
  53. package/dist/providers/index.mjs +2 -2
  54. package/dist/providers/site-provider/index.d.ts +11 -5
  55. package/dist/types/api/index.d.ts +2 -2
  56. package/dist/types/components/icon/index.d.ts +2 -0
  57. package/dist/types/components/index.d.ts +2 -0
  58. package/dist/types/components/locale-switcher/index.d.ts +5 -0
  59. package/dist/types/components/navigation/index.d.ts +9 -10
  60. package/dist/types/i18n/index.d.ts +7 -1
  61. package/dist/types/site/index.d.ts +15 -13
  62. package/dist/utils/api/index.d.ts +5 -0
  63. package/dist/utils/date/index.d.ts +4 -3
  64. package/dist/utils/index.cjs +23 -16
  65. package/dist/utils/index.d.ts +1 -0
  66. package/dist/utils/index.mjs +16 -9
  67. package/dist/utils/navigation/index.d.ts +2 -2
  68. package/dist/utils/numbers/index.d.ts +3 -3
  69. package/package.json +1 -1
  70. package/dist/components/layout/header/navigation/types.d.ts +0 -4
  71. package/dist/index-BClxYYix.js +0 -40
  72. package/dist/index-BNb-P8a6.mjs +0 -17
  73. package/dist/index-BhsXlbd8.js +0 -16
  74. package/dist/index-Ca_M-II5.mjs +0 -41
@@ -1,5 +1,3 @@
1
- import { initReactI18next } from "react-i18next";
2
- import i18n from "i18next";
3
1
  var GameVolatility = /* @__PURE__ */ ((GameVolatility2) => {
4
2
  GameVolatility2["High"] = "HIGH";
5
3
  GameVolatility2["Medium"] = "MEDIUM";
@@ -33,7 +31,7 @@ var GameCharacteristic = /* @__PURE__ */ ((GameCharacteristic2) => {
33
31
  GameCharacteristic2["Functions"] = "FUNCTIONS";
34
32
  return GameCharacteristic2;
35
33
  })(GameCharacteristic || {});
36
- const pageNotFound$3 = {
34
+ const pageNotFound$4 = {
37
35
  seo: {
38
36
  title: "Seite nicht gefunden | {{siteName}}"
39
37
  },
@@ -41,14 +39,14 @@ const pageNotFound$3 = {
41
39
  description: "Entschuldigung 😔, wir konnten nicht finden, wonach Sie gesucht haben.",
42
40
  action: "Zur Startseite"
43
41
  };
44
- const footer$3 = {
42
+ const footer$4 = {
45
43
  copyright: "© {{year}} {{siteName}}. Alle Rechte vorbehalten.",
46
44
  disclaimer: {
47
45
  title: "Spielen Sie verantwortungsbewusst: ",
48
46
  description: "{{siteName}} ist eine unabhängige Ressource und nicht mit den von uns beworbenen Seiten verbunden. Stellen Sie sicher, dass Sie über alle erforderlichen Zertifikate verfügen und die gesetzlichen Anforderungen erfüllt sind, bevor Sie mit dem Spielen beginnen. Der Hauptzweck von {{siteName}} besteht darin, informative und unterhaltsame Inhalte bereitzustellen. Wenn Sie nach Links zu verwandten Ressourcen suchen, werden Sie zu den entsprechenden Plattformen weitergeleitet."
49
47
  }
50
48
  };
51
- const gameDemo$3 = {
49
+ const gameDemo$4 = {
52
50
  warning: "Ihr Browser ist zu alt, um das iframe-Element anzuzeigen.",
53
51
  action: {
54
52
  playForReal: "Spiele Mit Echtgeld",
@@ -58,7 +56,7 @@ const gameDemo$3 = {
58
56
  exit: "Beenden"
59
57
  }
60
58
  };
61
- const gameInfo$3 = {
59
+ const gameInfo$4 = {
62
60
  title: "Spielinfo",
63
61
  group: {
64
62
  general: "Allgemeine Eigenschaften",
@@ -102,18 +100,18 @@ const gameInfo$3 = {
102
100
  }
103
101
  }
104
102
  };
105
- const prosCons$3 = {
103
+ const prosCons$4 = {
106
104
  advantages: "Vorteile",
107
105
  disadvantages: "Nachteile"
108
106
  };
109
- const author$3 = {
107
+ const author$4 = {
110
108
  title: "Veröffentlicht von",
111
109
  action: {
112
110
  expand: "Mehr anzeigen",
113
111
  collapse: "Ausblenden"
114
112
  }
115
113
  };
116
- const contactForm$3 = {
114
+ const contactForm$4 = {
117
115
  field: {
118
116
  name: {
119
117
  label: "Name",
@@ -136,23 +134,23 @@ const contactForm$3 = {
136
134
  send: "Nachricht senden"
137
135
  }
138
136
  };
139
- const bonusCard$3 = {
137
+ const bonusCard$4 = {
140
138
  action: {
141
139
  expand: "Mehr erfahren",
142
140
  collapse: "Ausblenden"
143
141
  }
144
142
  };
145
- const dictionary$3 = {
146
- pageNotFound: pageNotFound$3,
147
- footer: footer$3,
148
- gameDemo: gameDemo$3,
149
- gameInfo: gameInfo$3,
150
- prosCons: prosCons$3,
151
- author: author$3,
152
- contactForm: contactForm$3,
153
- bonusCard: bonusCard$3
143
+ const dictionary$4 = {
144
+ pageNotFound: pageNotFound$4,
145
+ footer: footer$4,
146
+ gameDemo: gameDemo$4,
147
+ gameInfo: gameInfo$4,
148
+ prosCons: prosCons$4,
149
+ author: author$4,
150
+ contactForm: contactForm$4,
151
+ bonusCard: bonusCard$4
154
152
  };
155
- const pageNotFound$2 = {
153
+ const pageNotFound$3 = {
156
154
  seo: {
157
155
  title: "Page not found | {{siteName}}"
158
156
  },
@@ -160,14 +158,14 @@ const pageNotFound$2 = {
160
158
  description: "Sorry 😔, we couldn’t find what you were looking for.",
161
159
  action: "Go Home"
162
160
  };
163
- const footer$2 = {
161
+ const footer$3 = {
164
162
  copyright: "© {{year}} {{siteName}}. All rights reserved.",
165
163
  disclaimer: {
166
164
  title: "Play responsibly: ",
167
165
  description: "{{siteName}} is an independent resource not affiliated with the sites we promote. Make sure you have all the necessary certifications and legal requirements are met before you start playing. The main purpose of {{siteName}} is to provide informative and entertaining content. If you are looking for links to related resources, you will be redirected to the relevant platforms."
168
166
  }
169
167
  };
170
- const gameDemo$2 = {
168
+ const gameDemo$3 = {
171
169
  warning: "Your browser is too old to display the iframe element",
172
170
  action: {
173
171
  playForReal: "Play for Real",
@@ -177,7 +175,7 @@ const gameDemo$2 = {
177
175
  exit: "Exit"
178
176
  }
179
177
  };
180
- const gameInfo$2 = {
178
+ const gameInfo$3 = {
181
179
  title: "Game Info",
182
180
  group: {
183
181
  general: "General Characteristics",
@@ -221,18 +219,18 @@ const gameInfo$2 = {
221
219
  }
222
220
  }
223
221
  };
224
- const prosCons$2 = {
222
+ const prosCons$3 = {
225
223
  advantages: "Advantages",
226
224
  disadvantages: "Disadvantages"
227
225
  };
228
- const author$2 = {
226
+ const author$3 = {
229
227
  title: "Published by",
230
228
  action: {
231
229
  expand: "Show more",
232
230
  collapse: "Hide"
233
231
  }
234
232
  };
235
- const contactForm$2 = {
233
+ const contactForm$3 = {
236
234
  field: {
237
235
  name: {
238
236
  label: "Name",
@@ -255,23 +253,23 @@ const contactForm$2 = {
255
253
  send: "Send Message"
256
254
  }
257
255
  };
258
- const bonusCard$2 = {
256
+ const bonusCard$3 = {
259
257
  action: {
260
258
  expand: "Learn more",
261
259
  collapse: "Hide"
262
260
  }
263
261
  };
264
- const dictionary$2 = {
265
- pageNotFound: pageNotFound$2,
266
- footer: footer$2,
267
- gameDemo: gameDemo$2,
268
- gameInfo: gameInfo$2,
269
- prosCons: prosCons$2,
270
- author: author$2,
271
- contactForm: contactForm$2,
272
- bonusCard: bonusCard$2
262
+ const dictionary$3 = {
263
+ pageNotFound: pageNotFound$3,
264
+ footer: footer$3,
265
+ gameDemo: gameDemo$3,
266
+ gameInfo: gameInfo$3,
267
+ prosCons: prosCons$3,
268
+ author: author$3,
269
+ contactForm: contactForm$3,
270
+ bonusCard: bonusCard$3
273
271
  };
274
- const pageNotFound$1 = {
272
+ const pageNotFound$2 = {
275
273
  seo: {
276
274
  title: "Pagina non trovata | {{siteName}}"
277
275
  },
@@ -279,14 +277,14 @@ const pageNotFound$1 = {
279
277
  description: "Spiacenti 😔, non siamo riusciti a trovare quello che cercavi.",
280
278
  action: "Ritorna alla pagina principale"
281
279
  };
282
- const footer$1 = {
280
+ const footer$2 = {
283
281
  copyright: "© {{year}} {{siteName}}. Tutte le cose sono fatte.",
284
282
  disclaimer: {
285
283
  title: "Gioca responsabilmente: ",
286
284
  description: "{{siteName}} è una risorsa indipendente e non affiliata ai siti che promuoviamo. Prima di iniziare a giocare, assicurati di possedere tutte le certificazioni necessarie e di rispettare i requisiti legali in vigore. L'obiettivo principale di {{siteName}} è offrire contenuti informativi e di intrattenimento. Se cerchi collegamenti a risorse correlate, verrai reindirizzato alle piattaforme pertinenti."
287
285
  }
288
286
  };
289
- const gameDemo$1 = {
287
+ const gameDemo$2 = {
290
288
  warning: "Il tuo browser è troppo vecchio per visualizzare l'elemento iframe",
291
289
  action: {
292
290
  playForReal: "Gioca ora",
@@ -296,7 +294,7 @@ const gameDemo$1 = {
296
294
  exit: "Esci"
297
295
  }
298
296
  };
299
- const gameInfo$1 = {
297
+ const gameInfo$2 = {
300
298
  title: "Informazioni sul gioco",
301
299
  group: {
302
300
  general: "Caratteristiche principali",
@@ -340,18 +338,18 @@ const gameInfo$1 = {
340
338
  }
341
339
  }
342
340
  };
343
- const prosCons$1 = {
341
+ const prosCons$2 = {
344
342
  advantages: "Vantaggi",
345
343
  disadvantages: "Svantaggi"
346
344
  };
347
- const author$1 = {
345
+ const author$2 = {
348
346
  title: "Informazioni sull'autore",
349
347
  action: {
350
348
  expand: "Mostra per intero",
351
349
  collapse: "Nascondi"
352
350
  }
353
351
  };
354
- const contactForm$1 = {
352
+ const contactForm$2 = {
355
353
  field: {
356
354
  name: {
357
355
  label: "Nome",
@@ -374,23 +372,23 @@ const contactForm$1 = {
374
372
  send: "Invia Messaggio"
375
373
  }
376
374
  };
377
- const bonusCard$1 = {
375
+ const bonusCard$2 = {
378
376
  action: {
379
377
  expand: "Scopri di più",
380
378
  collapse: "Nascondi"
381
379
  }
382
380
  };
383
- const dictionary$1 = {
384
- pageNotFound: pageNotFound$1,
385
- footer: footer$1,
386
- gameDemo: gameDemo$1,
387
- gameInfo: gameInfo$1,
388
- prosCons: prosCons$1,
389
- author: author$1,
390
- contactForm: contactForm$1,
391
- bonusCard: bonusCard$1
381
+ const dictionary$2 = {
382
+ pageNotFound: pageNotFound$2,
383
+ footer: footer$2,
384
+ gameDemo: gameDemo$2,
385
+ gameInfo: gameInfo$2,
386
+ prosCons: prosCons$2,
387
+ author: author$2,
388
+ contactForm: contactForm$2,
389
+ bonusCard: bonusCard$2
392
390
  };
393
- const pageNotFound = {
391
+ const pageNotFound$1 = {
394
392
  seo: {
395
393
  title: "Страница не найдена | {{siteName}}"
396
394
  },
@@ -398,14 +396,14 @@ const pageNotFound = {
398
396
  description: "Извините 😔, мы не смогли найти то, что вы искали.",
399
397
  action: "На главную"
400
398
  };
401
- const footer = {
399
+ const footer$1 = {
402
400
  copyright: "© {{year}} {{siteName}}. Все права защищены.",
403
401
  disclaimer: {
404
402
  title: "Играйте ответственно: ",
405
403
  description: "{{siteName}} — независимый ресурс, не связанный с продвигаемыми сайтами. Убедитесь, что у вас есть все необходимые сертификаты и соблюдены юридические требования перед началом игры. Основная цель {{siteName}} — предоставление информационного и развлекательного контента. Если вы ищете ссылки на связанные ресурсы, вас перенаправят на соответствующие платформы."
406
404
  }
407
405
  };
408
- const gameDemo = {
406
+ const gameDemo$1 = {
409
407
  warning: "Ваш браузер слишком устарел для отображения элемента iframe",
410
408
  action: {
411
409
  playForReal: "Играть на деньги",
@@ -415,7 +413,7 @@ const gameDemo = {
415
413
  exit: "Выйти"
416
414
  }
417
415
  };
418
- const gameInfo = {
416
+ const gameInfo$1 = {
419
417
  title: "Информация об игре",
420
418
  group: {
421
419
  general: "Основные характеристики",
@@ -459,18 +457,18 @@ const gameInfo = {
459
457
  }
460
458
  }
461
459
  };
462
- const prosCons = {
460
+ const prosCons$1 = {
463
461
  advantages: "Преимущества",
464
462
  disadvantages: "Недостатки"
465
463
  };
466
- const author = {
464
+ const author$1 = {
467
465
  title: "Автор",
468
466
  action: {
469
467
  expand: "Показать больше",
470
468
  collapse: "Скрыть"
471
469
  }
472
470
  };
473
- const contactForm = {
471
+ const contactForm$1 = {
474
472
  field: {
475
473
  name: {
476
474
  label: "Имя",
@@ -493,12 +491,131 @@ const contactForm = {
493
491
  send: "Отправить сообщение"
494
492
  }
495
493
  };
496
- const bonusCard = {
494
+ const bonusCard$1 = {
497
495
  action: {
498
496
  expand: "Подробнее",
499
497
  collapse: "Скрыть"
500
498
  }
501
499
  };
500
+ const dictionary$1 = {
501
+ pageNotFound: pageNotFound$1,
502
+ footer: footer$1,
503
+ gameDemo: gameDemo$1,
504
+ gameInfo: gameInfo$1,
505
+ prosCons: prosCons$1,
506
+ author: author$1,
507
+ contactForm: contactForm$1,
508
+ bonusCard: bonusCard$1
509
+ };
510
+ const pageNotFound = {
511
+ seo: {
512
+ title: "Page non trouvée | {{siteName}}"
513
+ },
514
+ title: "404 — Page non trouvée",
515
+ description: "Désolé 😔, nous n’avons pas pu trouver ce que vous cherchiez.",
516
+ action: "Aller à la page d’accueil"
517
+ };
518
+ const footer = {
519
+ copyright: "© {{year}} {{siteName}}. Tous droits réservés.",
520
+ disclaimer: {
521
+ title: "Jouez de manière responsable : ",
522
+ description: "{{siteName}} est une ressource indépendante et n’est pas affilié aux sites que nous promouvons. Assurez-vous de disposer de toutes les licences nécessaires et de respecter les exigences légales avant de commencer à jouer. L’objectif principal de {{siteName}} est de fournir un contenu informatif et divertissant. Si vous recherchez des liens vers des ressources associées, vous serez redirigé vers les plateformes correspondantes."
523
+ }
524
+ };
525
+ const gameDemo = {
526
+ warning: "Votre navigateur est trop ancien pour afficher l’élément iframe.",
527
+ action: {
528
+ playForReal: "Jouer en argent réel",
529
+ playForFree: "Jouer gratuitement",
530
+ activateFullscreen: "Activer le mode plein écran",
531
+ deactivateFullscreen: "Désactiver le mode plein écran",
532
+ exit: "Quitter"
533
+ }
534
+ };
535
+ const gameInfo = {
536
+ title: "Infos sur le jeu",
537
+ group: {
538
+ general: "Caractéristiques générales",
539
+ features: "Fonctionnalités du jeu"
540
+ },
541
+ feature: {
542
+ [GameCharacteristic.BonusFeatures]: "Fonctionnalités bonus",
543
+ [GameCharacteristic.Compatibility]: "Compatibilité",
544
+ [GameCharacteristic.Functions]: "Fonctions",
545
+ [GameCharacteristic.Developer]: "Développeur",
546
+ [GameCharacteristic.HasAutoplay]: "Lecture automatique",
547
+ [GameCharacteristic.HasBonusPurchase]: "Achat de bonus",
548
+ [GameCharacteristic.HasCollectionSymbols]: "Symboles à collectionner",
549
+ [GameCharacteristic.HasDemo]: "Version de démonstration",
550
+ [GameCharacteristic.HasFastSpin]: "Rotation rapide",
551
+ [GameCharacteristic.HasFreeSpins]: "Tours gratuits",
552
+ [GameCharacteristic.HasProgressiveJackpot]: "Jackpot progressif",
553
+ [GameCharacteristic.Languages]: "Langues",
554
+ [GameCharacteristic.MaxWin]: "Gain maximal",
555
+ [GameCharacteristic.MaxBet]: "Mise maximale",
556
+ [GameCharacteristic.MinBet]: "Mise minimale",
557
+ [GameCharacteristic.Name]: "Nom",
558
+ [GameCharacteristic.PayLines]: "Nombre de lignes de paiement",
559
+ [GameCharacteristic.ReelsNumber]: "Nombre de rouleaux",
560
+ [GameCharacteristic.ReleaseDate]: "Date de sortie",
561
+ [GameCharacteristic.RowsWithPins]: "Nombre de rangées avec des chevilles",
562
+ [GameCharacteristic.Rtp]: "RTP",
563
+ [GameCharacteristic.Theme]: "Thème",
564
+ [GameCharacteristic.Type]: "Type",
565
+ [GameCharacteristic.Volatility]: "Volatilité"
566
+ },
567
+ value: {
568
+ boolean: {
569
+ true: "Oui",
570
+ false: "Non"
571
+ },
572
+ volatility: {
573
+ [GameVolatility.High]: "Élevée",
574
+ [GameVolatility.Medium]: "Moyenne",
575
+ [GameVolatility.Low]: "Faible"
576
+ }
577
+ }
578
+ };
579
+ const prosCons = {
580
+ advantages: "Avantages",
581
+ disadvantages: "Inconvénients"
582
+ };
583
+ const author = {
584
+ title: "Publié par",
585
+ action: {
586
+ expand: "Afficher plus",
587
+ collapse: "Masquer"
588
+ }
589
+ };
590
+ const contactForm = {
591
+ field: {
592
+ name: {
593
+ label: "Nom",
594
+ placeholder: "Votre nom"
595
+ },
596
+ email: {
597
+ label: "E-mail",
598
+ placeholder: "Votre e-mail"
599
+ },
600
+ message: {
601
+ label: "Message",
602
+ placeholder: "Votre message"
603
+ }
604
+ },
605
+ notification: {
606
+ title: "{{name}}, merci pour votre retour !",
607
+ description: "Nous vous contacterons dès que possible à {{email}}."
608
+ },
609
+ action: {
610
+ send: "Envoyer le message"
611
+ }
612
+ };
613
+ const bonusCard = {
614
+ action: {
615
+ expand: "En savoir plus",
616
+ collapse: "Masquer"
617
+ }
618
+ };
502
619
  const dictionary = {
503
620
  pageNotFound,
504
621
  footer,
@@ -509,19 +626,12 @@ const dictionary = {
509
626
  contactForm,
510
627
  bonusCard
511
628
  };
512
- const resources = {
513
- en: dictionary$2,
514
- it: dictionary$1,
515
- de: dictionary$3,
516
- ru: dictionary
517
- };
518
- const DEFAULT_LANGUAGE = "en";
519
- i18n.use(initReactI18next).init({
520
- fallbackLng: DEFAULT_LANGUAGE,
521
- resources
522
- });
523
629
  export {
524
630
  GameVolatility as G,
525
631
  GameCharacteristic as a,
526
- resources as r
632
+ dictionary$1 as b,
633
+ dictionary$4 as c,
634
+ dictionary as d,
635
+ dictionary$2 as e,
636
+ dictionary$3 as f
527
637
  };
@@ -0,0 +1,93 @@
1
+ "use strict";
2
+ const DUMMY_PAGE_TYPE = "DUMMY";
3
+ const NavigationSlug = {
4
+ HEADER: "header-navigation",
5
+ FOOTER: "footer-navigation"
6
+ };
7
+ function isValidPath(value) {
8
+ return typeof value === "string" && (value === "" || value.startsWith("/"));
9
+ }
10
+ function isValidType(value) {
11
+ return typeof value === "string" && value !== DUMMY_PAGE_TYPE;
12
+ }
13
+ function transformNavItems(items) {
14
+ if (!items || !items.length) {
15
+ return [];
16
+ }
17
+ const transformed = [];
18
+ items.forEach((item) => {
19
+ var _a;
20
+ if (item && item.title && isValidType(item.type) && isValidPath(item.path)) {
21
+ const isNavGroup = (_a = item.items) == null ? void 0 : _a.length;
22
+ transformed.push({
23
+ label: item.title,
24
+ slug: isNavGroup ? "" : item.path.slice(1),
25
+ ...isNavGroup && { children: transformNavItems(item.items) }
26
+ });
27
+ }
28
+ });
29
+ return transformed;
30
+ }
31
+ function transformSiteNavigation(strapiNavigation) {
32
+ const siteNavigation = {
33
+ header: {},
34
+ footer: {}
35
+ };
36
+ if (!strapiNavigation) {
37
+ return siteNavigation;
38
+ }
39
+ const groups = strapiNavigation.items;
40
+ for (const group of groups ?? []) {
41
+ const { slug, locale, items } = group ?? {};
42
+ if (locale && slug === NavigationSlug.HEADER) {
43
+ siteNavigation.header[locale] = transformNavItems(items ?? []);
44
+ }
45
+ if (locale && slug === NavigationSlug.FOOTER) {
46
+ siteNavigation.footer[locale] = transformNavItems(items ?? []);
47
+ }
48
+ }
49
+ return siteNavigation;
50
+ }
51
+ function getNavigation(fallback, strapiNavigation) {
52
+ const siteNavigation = {
53
+ header: fallback.header,
54
+ footer: fallback.footer
55
+ };
56
+ if (!strapiNavigation) {
57
+ return siteNavigation;
58
+ }
59
+ const navigation = transformSiteNavigation(strapiNavigation);
60
+ siteNavigation.header = { ...siteNavigation.header, ...navigation.header };
61
+ siteNavigation.footer = { ...siteNavigation.footer, ...navigation.footer };
62
+ return siteNavigation;
63
+ }
64
+ function getSiteName(url) {
65
+ if (!url) {
66
+ return "";
67
+ }
68
+ return url.replace(/^https?:\/\//, "");
69
+ }
70
+ function getLocale(defaultLocaleCode, locales) {
71
+ let locale = { code: "en", name: "Default" };
72
+ if (defaultLocaleCode && (locales == null ? void 0 : locales.length)) {
73
+ const foundLocale = locales.find(({ code }) => code === defaultLocaleCode);
74
+ if (foundLocale) {
75
+ locale = foundLocale;
76
+ }
77
+ }
78
+ return locale;
79
+ }
80
+ function getLocales(defaultLocaleCode, locales) {
81
+ if (!locales) {
82
+ return [];
83
+ }
84
+ return [...locales].sort((a, b) => {
85
+ if (a.code === defaultLocaleCode) return -1;
86
+ if (b.code === defaultLocaleCode) return 1;
87
+ return 0;
88
+ });
89
+ }
90
+ exports.getLocale = getLocale;
91
+ exports.getLocales = getLocales;
92
+ exports.getNavigation = getNavigation;
93
+ exports.getSiteName = getSiteName;
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ const DARK_THEME_COLOR = "white";
3
+ const LIGHT_THEME_COLOR = "gray.800";
4
+ exports.DARK_THEME_COLOR = DARK_THEME_COLOR;
5
+ exports.LIGHT_THEME_COLOR = LIGHT_THEME_COLOR;
@@ -0,0 +1,27 @@
1
+ import { useState, useEffect } from "react";
2
+ import { useTranslation } from "react-i18next";
3
+ function useLocalization({ defaultLocale, locales }) {
4
+ var _a;
5
+ const [currentLocale, setCurrentLocale] = useState(defaultLocale);
6
+ const { i18n } = useTranslation();
7
+ const path = ((_a = window == null ? void 0 : window.location) == null ? void 0 : _a.pathname) ?? "";
8
+ useEffect(() => {
9
+ if (typeof window === "undefined") {
10
+ return;
11
+ }
12
+ const cleanPath = path.replace(/^\/+|\/+$/g, "");
13
+ const maybeLocaleCode = cleanPath.split("/")[0];
14
+ const maybeLocale = locales.find(({ code }) => code === maybeLocaleCode);
15
+ const locale = maybeLocale ? maybeLocale : defaultLocale;
16
+ if (locale.code !== currentLocale.code) {
17
+ setCurrentLocale(locale);
18
+ }
19
+ if (i18n.language !== locale.code) {
20
+ i18n.changeLanguage(locale.code);
21
+ }
22
+ }, [path]);
23
+ return { currentLocale };
24
+ }
25
+ export {
26
+ useLocalization as u
27
+ };
@@ -0,0 +1,49 @@
1
+ "use strict";
2
+ const jsxRuntime = require("react/jsx-runtime");
3
+ const react = require("react");
4
+ const gatsby = require("gatsby");
5
+ require("@chakra-ui/react");
6
+ require("@mdx-js/react");
7
+ require("react-i18next");
8
+ require("./index-C6MG_f24.js");
9
+ require("./index-BHfpWNqh.js");
10
+ const index = require("./index-DqGO34ef.js");
11
+ const index$1 = require("./index-At00w6EN.js");
12
+ const SiteContext = react.createContext(null);
13
+ const SiteProvider = ({ children, ...context }) => {
14
+ const { currentLocale } = index.useLocalization(context.localization);
15
+ const value = react.useMemo(() => {
16
+ return { ...context, localization: { ...context.localization, currentLocale } };
17
+ }, [currentLocale]);
18
+ return /* @__PURE__ */ jsxRuntime.jsx(SiteContext.Provider, { value, children });
19
+ };
20
+ function useSiteContext() {
21
+ const context = react.useContext(SiteContext);
22
+ if (!context) {
23
+ throw new Error("useSiteContext must be used within SiteProvider");
24
+ }
25
+ return context;
26
+ }
27
+ function normalizePath(path = "") {
28
+ return path.replace(/^\/+|\/+$/g, "").replace(/\/+/g, "/");
29
+ }
30
+ function getLocalizedPath(path, currentLocaleCode, defaultLocaleCode) {
31
+ const localePrefix = currentLocaleCode === defaultLocaleCode ? "/" : `/${currentLocaleCode}/`;
32
+ if (path === "/") {
33
+ return localePrefix;
34
+ }
35
+ if (index$1.isRelativePath(path)) {
36
+ const maybeLocaleCode = path.split("/")[1];
37
+ return maybeLocaleCode === defaultLocaleCode ? "/" : path;
38
+ }
39
+ return `${localePrefix}${normalizePath(path)}`;
40
+ }
41
+ const Link = react.forwardRef(({ to, ...props }, ref) => {
42
+ const { localization } = useSiteContext();
43
+ const { currentLocale, defaultLocale } = localization;
44
+ const path = getLocalizedPath(to, currentLocale.code, defaultLocale.code);
45
+ return /* @__PURE__ */ jsxRuntime.jsx(gatsby.Link, { ref, to: path, ...props });
46
+ });
47
+ exports.Link = Link;
48
+ exports.SiteProvider = SiteProvider;
49
+ exports.useSiteContext = useSiteContext;
@@ -1,19 +1,16 @@
1
1
  "use strict";
2
- require("./index-BPLxhZG_.js");
3
- const i18n = require("i18next");
4
- function getCurrentYear() {
5
- const locale = i18n.language;
2
+ const i18n = require("./i18n/index.cjs");
3
+ function getCurrentYear(locale = i18n.DEFAULT_LANGUAGE) {
6
4
  const currentDate = /* @__PURE__ */ new Date();
7
5
  const currentYear = new Intl.DateTimeFormat(locale, { year: "numeric" }).format(currentDate);
8
6
  return currentYear;
9
7
  }
10
- function getCurrentMonth() {
11
- const locale = i18n.language;
8
+ function getCurrentMonth(locale = i18n.DEFAULT_LANGUAGE) {
12
9
  const currentDate = /* @__PURE__ */ new Date();
13
10
  const currentMonth = new Intl.DateTimeFormat(locale, { month: "long" }).format(currentDate);
14
11
  return currentMonth;
15
12
  }
16
- function formatDate({ value, locale = i18n.language, options }) {
13
+ function formatDate({ value, locale = i18n.DEFAULT_LANGUAGE, options }) {
17
14
  const date = typeof value === "string" || typeof value === "number" ? new Date(value) : value;
18
15
  if (isNaN(date.getTime())) {
19
16
  throw new Error("Invalid date provided");
@@ -31,7 +28,7 @@ function toFixedTwo(number) {
31
28
  return round(number, DEFAULT_PRECISION);
32
29
  }
33
30
  function formatNumber(number, options) {
34
- const locale = (options == null ? void 0 : options.locale) ?? i18n.language;
31
+ const locale = (options == null ? void 0 : options.locale) ?? i18n.DEFAULT_LANGUAGE;
35
32
  const precision = (options == null ? void 0 : options.precision) ?? DEFAULT_PRECISION;
36
33
  let postfix = "";
37
34
  const formatOptions = {
@@ -65,8 +62,8 @@ function parseNumber(value) {
65
62
  }
66
63
  return parsedNumber;
67
64
  }
68
- function getCurrencySymbol(currencyCode) {
69
- const symbol = 0 .toLocaleString(i18n.language, {
65
+ function getCurrencySymbol(currencyCode, locale = i18n.DEFAULT_LANGUAGE) {
66
+ const symbol = 0 .toLocaleString(locale, {
70
67
  style: "currency",
71
68
  currency: currencyCode,
72
69
  minimumFractionDigits: 0,