@mycadet/app 0.14.0 → 0.14.1-dev.202612061615.c8dfc87

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 (333) hide show
  1. package/dist/package/{account-D1YjLGV9.js → account-BpCbLsfP.js} +57 -4
  2. package/dist/package/{account-D1YjLGV9.js.map → account-BpCbLsfP.js.map} +1 -1
  3. package/dist/package/{account-BvjgJwlA.js → account-BpU1t26s.js} +57 -4
  4. package/dist/package/{account-BvjgJwlA.js.map → account-BpU1t26s.js.map} +1 -1
  5. package/dist/package/{account-ClsQnHGQ.js → account-CNVJ2tRu.js} +57 -4
  6. package/dist/package/{account-ClsQnHGQ.js.map → account-CNVJ2tRu.js.map} +1 -1
  7. package/dist/package/{account-8eKos9G7.js → account-Dh32wybG.js} +79 -3
  8. package/dist/package/{account-8eKos9G7.js.map → account-Dh32wybG.js.map} +1 -1
  9. package/dist/package/{common-oxewtz-Y.js → common-C_oPdXpV.js} +3 -2
  10. package/dist/package/{common-oxewtz-Y.js.map → common-C_oPdXpV.js.map} +1 -1
  11. package/dist/package/{common-dGbBloR6.js → common-D1kBgkpz.js} +3 -2
  12. package/dist/package/{common-dGbBloR6.js.map → common-D1kBgkpz.js.map} +1 -1
  13. package/dist/package/{common-BluQGYDb.js → common-DVJ5NUo5.js} +8 -3
  14. package/dist/package/{common-BluQGYDb.js.map → common-DVJ5NUo5.js.map} +1 -1
  15. package/dist/package/{common-DNZ_4X_m.js → common-sYQVH-gY.js} +3 -2
  16. package/dist/package/{common-DNZ_4X_m.js.map → common-sYQVH-gY.js.map} +1 -1
  17. package/dist/package/contracts.js +2 -2
  18. package/dist/package/index.js +243 -177
  19. package/dist/package/index.js.map +1 -1
  20. package/dist/package/package.json +1 -1
  21. package/dist/package/{resolution-contract-D6qbDWH9.js → resolution-contract-Cx6VTw9G.js} +7 -3
  22. package/dist/package/resolution-contract-Cx6VTw9G.js.map +1 -0
  23. package/dist/package/types/assistant/resolution-contract.d.ts +10 -0
  24. package/dist/package/types/i18n/i18n.d.ts +0 -33
  25. package/dist/package/types/i18n/locales/en/account.json +59 -2
  26. package/dist/package/types/i18n/locales/en/common.json +2 -1
  27. package/dist/package/types/i18n/locales/es/account.json +54 -1
  28. package/dist/package/types/i18n/locales/es/common.json +2 -1
  29. package/dist/package/types/i18n/locales/ru/account.json +54 -1
  30. package/dist/package/types/i18n/locales/ru/common.json +5 -0
  31. package/dist/package/types/i18n/locales/zh/account.json +54 -1
  32. package/dist/package/types/i18n/locales/zh/common.json +2 -1
  33. package/dist/package/types/i18n/locales/zh-TW/account.json +76 -0
  34. package/dist/package/types/i18n/locales/zh-TW/common.json +2 -1
  35. package/dist/package/types/utils/routes.d.ts +3 -0
  36. package/dist/standalone/assets/{about-page-bFAEorIh.js → about-page-mpEzEQb2.js} +2 -2
  37. package/dist/standalone/assets/{about-page-bFAEorIh.js.map → about-page-mpEzEQb2.js.map} +1 -1
  38. package/dist/standalone/assets/{account-6E86_HHi.js → account-Bd_S-0WO.js} +2 -2
  39. package/dist/standalone/assets/{account-6E86_HHi.js.map → account-Bd_S-0WO.js.map} +1 -1
  40. package/dist/standalone/assets/{account-TbSfcuuQ.js → account-CGmyEqxw.js} +2 -2
  41. package/dist/standalone/assets/{account-TbSfcuuQ.js.map → account-CGmyEqxw.js.map} +1 -1
  42. package/dist/standalone/assets/{account-BkOLkgsM.js → account-Clewz9x-.js} +2 -2
  43. package/dist/standalone/assets/{account-BkOLkgsM.js.map → account-Clewz9x-.js.map} +1 -1
  44. package/dist/standalone/assets/{account-BhR_HGNE.js → account-DMlLQkdD.js} +2 -2
  45. package/dist/standalone/assets/{account-BhR_HGNE.js.map → account-DMlLQkdD.js.map} +1 -1
  46. package/dist/standalone/assets/{account-form-XXd0H39n.js → account-form-DeupMytE.js} +2 -2
  47. package/dist/standalone/assets/{account-form-XXd0H39n.js.map → account-form-DeupMytE.js.map} +1 -1
  48. package/dist/standalone/assets/account-page-BySTwbnw.js +2 -0
  49. package/dist/standalone/assets/{account-page-C9RTiet9.js.map → account-page-BySTwbnw.js.map} +1 -1
  50. package/dist/standalone/assets/{account-shell-8wPEal0o.js → account-shell-0G7JjvNP.js} +1 -1
  51. package/dist/standalone/assets/{account-shell-8wPEal0o.js.map → account-shell-0G7JjvNP.js.map} +1 -1
  52. package/dist/standalone/assets/{api-Di6JRcb2.js → api-DLpH8-Kd.js} +2 -2
  53. package/dist/standalone/assets/{api-Di6JRcb2.js.map → api-DLpH8-Kd.js.map} +1 -1
  54. package/dist/standalone/assets/api-key-screen-CDgWGEeC.js +2 -0
  55. package/dist/standalone/assets/api-key-screen-CDgWGEeC.js.map +1 -0
  56. package/dist/standalone/assets/{assistant-selection-DZ-dloFF.js → assistant-selection-Ce-208FP.js} +2 -2
  57. package/dist/standalone/assets/{assistant-selection-DZ-dloFF.js.map → assistant-selection-Ce-208FP.js.map} +1 -1
  58. package/dist/standalone/assets/assistants-page-CGRw4Jem.js +2 -0
  59. package/dist/standalone/assets/assistants-page-CGRw4Jem.js.map +1 -0
  60. package/dist/standalone/assets/{auth-flow-DRKdI57z.js → auth-flow-BJ6I5FKW.js} +2 -2
  61. package/dist/standalone/assets/auth-flow-BJ6I5FKW.js.map +1 -0
  62. package/dist/standalone/assets/{auth-store-Da8bCODz.js → auth-store-b5wsXdqH.js} +3 -3
  63. package/dist/standalone/assets/{auth-store-Da8bCODz.js.map → auth-store-b5wsXdqH.js.map} +1 -1
  64. package/dist/standalone/assets/{auth-welcome-screen-BYvKnLEN.js → auth-welcome-screen-DtQV_ZMd.js} +2 -2
  65. package/dist/standalone/assets/{auth-welcome-screen-BYvKnLEN.js.map → auth-welcome-screen-DtQV_ZMd.js.map} +1 -1
  66. package/dist/standalone/assets/{avatar-bundled-components-Bt-85W__.js → avatar-bundled-components-ClZdA6nY.js} +1 -1
  67. package/dist/standalone/assets/{avatar-bundled-components-Bt-85W__.js.map → avatar-bundled-components-ClZdA6nY.js.map} +1 -1
  68. package/dist/standalone/assets/avatar-bundled-components-Dns64W1x.js +1 -0
  69. package/dist/standalone/assets/{avatar-random-B7ItAA05.js → avatar-random-fLuWMrQ4.js} +2 -2
  70. package/dist/standalone/assets/{avatar-random-B7ItAA05.js.map → avatar-random-fLuWMrQ4.js.map} +1 -1
  71. package/dist/standalone/assets/{button-DXWFbocH.js → button-VN1Hg58T.js} +2 -2
  72. package/dist/standalone/assets/{button-DXWFbocH.js.map → button-VN1Hg58T.js.map} +1 -1
  73. package/dist/standalone/assets/{capture-error-N-BrfSzo.js → capture-error-DOE5Xzi8.js} +1 -1
  74. package/dist/standalone/assets/{capture-error-N-BrfSzo.js.map → capture-error-DOE5Xzi8.js.map} +1 -1
  75. package/dist/standalone/assets/{checkbox-DjYdyWsT.js → checkbox-BillvEmp.js} +2 -2
  76. package/dist/standalone/assets/{checkbox-DjYdyWsT.js.map → checkbox-BillvEmp.js.map} +1 -1
  77. package/dist/standalone/assets/circle-BDAthucW.js +2 -0
  78. package/dist/standalone/assets/circle-BDAthucW.js.map +1 -0
  79. package/dist/standalone/assets/circle-alert-BDlVZkal.js +2 -0
  80. package/dist/standalone/assets/circle-alert-BDlVZkal.js.map +1 -0
  81. package/dist/standalone/assets/circle-check-COWWfbA3.js +2 -0
  82. package/dist/standalone/assets/circle-check-COWWfbA3.js.map +1 -0
  83. package/dist/standalone/assets/{cloud-loopback-page-BMz0_4p-.js → cloud-loopback-page-RXiZFgdq.js} +2 -2
  84. package/dist/standalone/assets/{cloud-loopback-page-BMz0_4p-.js.map → cloud-loopback-page-RXiZFgdq.js.map} +1 -1
  85. package/dist/standalone/assets/cloud-off-B_OI861m.js +2 -0
  86. package/dist/standalone/assets/cloud-off-B_OI861m.js.map +1 -0
  87. package/dist/standalone/assets/common-B8_P50yi.js +2 -0
  88. package/dist/standalone/assets/{common-DiqTxEoY.js.map → common-B8_P50yi.js.map} +1 -1
  89. package/dist/standalone/assets/{common-B65SaoD3.js → common-Bpry-qgo.js} +2 -2
  90. package/dist/standalone/assets/{common-B65SaoD3.js.map → common-Bpry-qgo.js.map} +1 -1
  91. package/dist/standalone/assets/common-CrJpZdYi.js +2 -0
  92. package/dist/standalone/assets/{common-CXt-X9JZ.js.map → common-CrJpZdYi.js.map} +1 -1
  93. package/dist/standalone/assets/common-DSLtqzPH.js +2 -0
  94. package/dist/standalone/assets/{common-CF7RP46x.js.map → common-DSLtqzPH.js.map} +1 -1
  95. package/dist/standalone/assets/confirm-dialog-CIACfqv5.js +2 -0
  96. package/dist/standalone/assets/confirm-dialog-CIACfqv5.js.map +1 -0
  97. package/dist/standalone/assets/connect-screen-B6oyU8zW.js +3 -0
  98. package/dist/standalone/assets/connect-screen-B6oyU8zW.js.map +1 -0
  99. package/dist/standalone/assets/{consent-DO714CFR.js → consent-Az-84EDv.js} +1 -1
  100. package/dist/standalone/assets/{consent-DO714CFR.js.map → consent-Az-84EDv.js.map} +1 -1
  101. package/dist/standalone/assets/{consent-CtNgR_OY.js → consent-BIJ-u7pS.js} +1 -1
  102. package/dist/standalone/assets/{consent-CtNgR_OY.js.map → consent-BIJ-u7pS.js.map} +1 -1
  103. package/dist/standalone/assets/{consent-BQKxIOyu.js → consent-CLFAJlfA.js} +1 -1
  104. package/dist/standalone/assets/{consent-BQKxIOyu.js.map → consent-CLFAJlfA.js.map} +1 -1
  105. package/dist/standalone/assets/{consent-CsUnMqF9.js → consent-dhas0XzG.js} +1 -1
  106. package/dist/standalone/assets/{consent-CsUnMqF9.js.map → consent-dhas0XzG.js.map} +1 -1
  107. package/dist/standalone/assets/{consent-persistence-CrqlC1nt.js → consent-persistence-DWA4JUAj.js} +2 -2
  108. package/dist/standalone/assets/{consent-persistence-CrqlC1nt.js.map → consent-persistence-DWA4JUAj.js.map} +1 -1
  109. package/dist/standalone/assets/copy-to-clipboard-DyoXuDAI.js +2 -0
  110. package/dist/standalone/assets/copy-to-clipboard-DyoXuDAI.js.map +1 -0
  111. package/dist/standalone/assets/{create-selectors-CcrSgAwQ.js → create-selectors-lj3eOKUw.js} +2 -2
  112. package/dist/standalone/assets/{create-selectors-CcrSgAwQ.js.map → create-selectors-lj3eOKUw.js.map} +1 -1
  113. package/dist/standalone/assets/definitions-CldVj4s0.js +2 -0
  114. package/dist/standalone/assets/definitions-CldVj4s0.js.map +1 -0
  115. package/dist/standalone/assets/{describe-error-CGCx3ZS3.js → describe-error-B2U_mZYH.js} +1 -1
  116. package/dist/standalone/assets/{describe-error-CGCx3ZS3.js.map → describe-error-B2U_mZYH.js.map} +1 -1
  117. package/dist/standalone/assets/dial-BUTZAJO3.js +2 -0
  118. package/dist/standalone/assets/dial-BUTZAJO3.js.map +1 -0
  119. package/dist/standalone/assets/{dist-Bsp7oWdO.js → dist-B0U1otb8.js} +2 -2
  120. package/dist/standalone/assets/{dist-Bsp7oWdO.js.map → dist-B0U1otb8.js.map} +1 -1
  121. package/dist/standalone/assets/{dist-D_g3U3xX.js → dist-DAjFxRQx.js} +1 -1
  122. package/dist/standalone/assets/{dist-D_g3U3xX.js.map → dist-DAjFxRQx.js.map} +1 -1
  123. package/dist/standalone/assets/{doctor-CqLlYvNj.js → doctor-B27zTEz7.js} +1 -1
  124. package/dist/standalone/assets/{doctor-CqLlYvNj.js.map → doctor-B27zTEz7.js.map} +1 -1
  125. package/dist/standalone/assets/{doctor-D7pMtU6A.js → doctor-D3gGkdwv.js} +1 -1
  126. package/dist/standalone/assets/{doctor-D7pMtU6A.js.map → doctor-D3gGkdwv.js.map} +1 -1
  127. package/dist/standalone/assets/{doctor-YwCkq2Cy.js → doctor-Dg28XeYF.js} +1 -1
  128. package/dist/standalone/assets/{doctor-YwCkq2Cy.js.map → doctor-Dg28XeYF.js.map} +1 -1
  129. package/dist/standalone/assets/{doctor-BIfQyFc_.js → doctor-OdWe6ZZu.js} +1 -1
  130. package/dist/standalone/assets/{doctor-BIfQyFc_.js.map → doctor-OdWe6ZZu.js.map} +1 -1
  131. package/dist/standalone/assets/doctor-page-DdHoPZZF.js +8 -0
  132. package/dist/standalone/assets/doctor-page-DdHoPZZF.js.map +1 -0
  133. package/dist/standalone/assets/{electron-bridge-B1sJkvH-.js → electron-bridge-DGEnu054.js} +1 -1
  134. package/dist/standalone/assets/{electron-bridge-B1sJkvH-.js.map → electron-bridge-DGEnu054.js.map} +1 -1
  135. package/dist/standalone/assets/{ellipsis-vertical-DRMhSLjp.js → ellipsis-vertical-OHRxK2jN.js} +1 -1
  136. package/dist/standalone/assets/{ellipsis-vertical-DRMhSLjp.js.map → ellipsis-vertical-OHRxK2jN.js.map} +1 -1
  137. package/dist/standalone/assets/esm-Beq0qz18.js +3 -0
  138. package/dist/standalone/assets/esm-Beq0qz18.js.map +1 -0
  139. package/dist/standalone/assets/esm-ChB87WoR.js +3 -0
  140. package/dist/standalone/assets/{esm-qBiA1_4M.js.map → esm-ChB87WoR.js.map} +1 -1
  141. package/dist/standalone/assets/{external-anchor-CMWL9CU_.js → external-anchor-CxPebGZd.js} +3 -3
  142. package/dist/standalone/assets/{external-anchor-CMWL9CU_.js.map → external-anchor-CxPebGZd.js.map} +1 -1
  143. package/dist/standalone/assets/{full-page-navigation-VfHlqUPi.js → full-page-navigation-BYqyWwg_.js} +1 -1
  144. package/dist/standalone/assets/{full-page-navigation-VfHlqUPi.js.map → full-page-navigation-BYqyWwg_.js.map} +1 -1
  145. package/dist/standalone/assets/{hard-navigate-BjhB5Ecy.js → hard-navigate-B4a9GrBh.js} +1 -1
  146. package/dist/standalone/assets/{hard-navigate-BjhB5Ecy.js.map → hard-navigate-B4a9GrBh.js.map} +1 -1
  147. package/dist/standalone/assets/hatching-screen-DZEnajoN.js +2 -0
  148. package/dist/standalone/assets/hatching-screen-DZEnajoN.js.map +1 -0
  149. package/dist/standalone/assets/hosting-screen-ByUZjNJU.js +2 -0
  150. package/dist/standalone/assets/hosting-screen-ByUZjNJU.js.map +1 -0
  151. package/dist/standalone/assets/{i18n-BaPIfk2c.js → i18n-B16Eox1c.js} +3 -3
  152. package/dist/standalone/assets/{i18n-BaPIfk2c.js.map → i18n-B16Eox1c.js.map} +1 -1
  153. package/dist/standalone/assets/index-BocnD1im.css +2 -0
  154. package/dist/standalone/assets/index-DD5DXOxB.js +25 -0
  155. package/dist/standalone/assets/index-DD5DXOxB.js.map +1 -0
  156. package/dist/standalone/assets/input-Bo9hZuBu.js +2 -0
  157. package/dist/standalone/assets/input-Bo9hZuBu.js.map +1 -0
  158. package/dist/standalone/assets/{is-electron-DLjujt3j.js → is-electron-BsUxh4Xi.js} +1 -1
  159. package/dist/standalone/assets/is-electron-BsUxh4Xi.js.map +1 -0
  160. package/dist/standalone/assets/login-page-cjgc_Pvc.js +2 -0
  161. package/dist/standalone/assets/{login-page-BZGRX0EO.js.map → login-page-cjgc_Pvc.js.map} +1 -1
  162. package/dist/standalone/assets/logout-page-FzZ-7lWk.js +2 -0
  163. package/dist/standalone/assets/{logout-page-B2MWIJOU.js.map → logout-page-FzZ-7lWk.js.map} +1 -1
  164. package/dist/standalone/assets/{native-deep-link-BBxdwlv4.js → native-deep-link-BeCO19L3.js} +1 -1
  165. package/dist/standalone/assets/{native-deep-link-BBxdwlv4.js.map → native-deep-link-BeCO19L3.js.map} +1 -1
  166. package/dist/standalone/assets/{native-platform-CAw_N48L.js → native-platform-CnRhTtiM.js} +2 -2
  167. package/dist/standalone/assets/{native-platform-CAw_N48L.js.map → native-platform-CnRhTtiM.js.map} +1 -1
  168. package/dist/standalone/assets/{oauth-complete-page-CEH8Zi-1.js → oauth-complete-page-CqrTmVHJ.js} +2 -2
  169. package/dist/standalone/assets/{oauth-complete-page-CEH8Zi-1.js.map → oauth-complete-page-CqrTmVHJ.js.map} +1 -1
  170. package/dist/standalone/assets/{oauth-popup-CdRon5Q4.js → oauth-popup-AOIxWPUj.js} +1 -1
  171. package/dist/standalone/assets/{oauth-popup-CdRon5Q4.js.map → oauth-popup-AOIxWPUj.js.map} +1 -1
  172. package/dist/standalone/assets/{oauth-popup-complete-page-CLQh8_Yg.js → oauth-popup-complete-page-zmTZt5jJ.js} +2 -2
  173. package/dist/standalone/assets/{oauth-popup-complete-page-CLQh8_Yg.js.map → oauth-popup-complete-page-zmTZt5jJ.js.map} +1 -1
  174. package/dist/standalone/assets/{onboarding-DGo1yvDA.js → onboarding-BUsGmEpD.js} +1 -1
  175. package/dist/standalone/assets/{onboarding-DGo1yvDA.js.map → onboarding-BUsGmEpD.js.map} +1 -1
  176. package/dist/standalone/assets/{onboarding-BEGUvKly.js → onboarding-DDUMWxqw.js} +1 -1
  177. package/dist/standalone/assets/{onboarding-BEGUvKly.js.map → onboarding-DDUMWxqw.js.map} +1 -1
  178. package/dist/standalone/assets/{onboarding-OFRPhT96.js → onboarding-DQsY7qgd.js} +1 -1
  179. package/dist/standalone/assets/{onboarding-OFRPhT96.js.map → onboarding-DQsY7qgd.js.map} +1 -1
  180. package/dist/standalone/assets/{onboarding-destination-B66p_VZu.js → onboarding-destination-CxQx0_IC.js} +2 -2
  181. package/dist/standalone/assets/{onboarding-destination-B66p_VZu.js.map → onboarding-destination-CxQx0_IC.js.map} +1 -1
  182. package/dist/standalone/assets/onboarding-navigation-CdRV6F0Q.js +2 -0
  183. package/dist/standalone/assets/{onboarding-navigation-DC8_8LuV.js.map → onboarding-navigation-CdRV6F0Q.js.map} +1 -1
  184. package/dist/standalone/assets/{onboarding-DOVL-dOM.js → onboarding-yRwqz6aH.js} +1 -1
  185. package/dist/standalone/assets/{onboarding-DOVL-dOM.js.map → onboarding-yRwqz6aH.js.map} +1 -1
  186. package/dist/standalone/assets/operations-C4WgQ8qZ.js +2 -0
  187. package/dist/standalone/assets/operations-C4WgQ8qZ.js.map +1 -0
  188. package/dist/standalone/assets/{organization-Br5qMM6Y.js → organization-Du5dDPLP.js} +2 -2
  189. package/dist/standalone/assets/{organization-Br5qMM6Y.js.map → organization-Du5dDPLP.js.map} +1 -1
  190. package/dist/standalone/assets/pairing-address-CgBLeKnL.js +2 -0
  191. package/dist/standalone/assets/pairing-address-CgBLeKnL.js.map +1 -0
  192. package/dist/standalone/assets/pairing-page-CAbTJKxr.js +2 -0
  193. package/dist/standalone/assets/{pairing-page-o5yOUb6T.js.map → pairing-page-CAbTJKxr.js.map} +1 -1
  194. package/dist/standalone/assets/{password-reset-page-B7JZRJhp.js → password-reset-page-D2b51lmM.js} +2 -2
  195. package/dist/standalone/assets/{password-reset-page-B7JZRJhp.js.map → password-reset-page-D2b51lmM.js.map} +1 -1
  196. package/dist/standalone/assets/{post-auth-destination-Cq5foKw9.js → post-auth-destination-xwJ47kVJ.js} +2 -2
  197. package/dist/standalone/assets/{post-auth-destination-Cq5foKw9.js.map → post-auth-destination-xwJ47kVJ.js.map} +1 -1
  198. package/dist/standalone/assets/profile-page-CPhYXM4F.js +2 -0
  199. package/dist/standalone/assets/profile-page-CPhYXM4F.js.map +1 -0
  200. package/dist/standalone/assets/{progress-bar-C_-cwBiK.js → progress-bar-CAYa80XA.js} +2 -2
  201. package/dist/standalone/assets/{progress-bar-C_-cwBiK.js.map → progress-bar-CAYa80XA.js.map} +1 -1
  202. package/dist/standalone/assets/provider-C-MBs0n2.js +2 -0
  203. package/dist/standalone/assets/{provider-i52bX5VR.js.map → provider-C-MBs0n2.js.map} +1 -1
  204. package/dist/standalone/assets/{provider-callback-D4ezuOSB.js → provider-callback-B6-pMaSX.js} +2 -2
  205. package/dist/standalone/assets/{provider-callback-D4ezuOSB.js.map → provider-callback-B6-pMaSX.js.map} +1 -1
  206. package/dist/standalone/assets/{provider-callback-page-BOUah2_i.js → provider-callback-page-BxdpbfyR.js} +2 -2
  207. package/dist/standalone/assets/{provider-callback-page-BOUah2_i.js.map → provider-callback-page-BxdpbfyR.js.map} +1 -1
  208. package/dist/standalone/assets/{provider-key-BFW2wBsh.js → provider-key-CfgRx7z5.js} +1 -1
  209. package/dist/standalone/assets/{provider-key-BFW2wBsh.js.map → provider-key-CfgRx7z5.js.map} +1 -1
  210. package/dist/standalone/assets/{provider-signup-page-DBqdgyHS.js → provider-signup-page-Cg9t2tJA.js} +2 -2
  211. package/dist/standalone/assets/{provider-signup-page-DBqdgyHS.js.map → provider-signup-page-Cg9t2tJA.js.map} +1 -1
  212. package/dist/standalone/assets/{proxy-m8LraLg9.js → proxy-TFSdn8tX.js} +1 -1
  213. package/dist/standalone/assets/{proxy-m8LraLg9.js.map → proxy-TFSdn8tX.js.map} +1 -1
  214. package/dist/standalone/assets/{radio-card-nav-C_Yh88ZX.js → radio-card-nav-DwRqD523.js} +1 -1
  215. package/dist/standalone/assets/{radio-card-nav-C_Yh88ZX.js.map → radio-card-nav-DwRqD523.js.map} +1 -1
  216. package/dist/standalone/assets/{rehype-katex-BcOWYTKW.js → rehype-katex-CHgJIg3n.js} +2 -2
  217. package/dist/standalone/assets/{rehype-katex-BcOWYTKW.js.map → rehype-katex-CHgJIg3n.js.map} +1 -1
  218. package/dist/standalone/assets/{remote-web-pairing-ya9f4HXm.js → remote-web-pairing-BGorUWrN.js} +2 -2
  219. package/dist/standalone/assets/{remote-web-pairing-ya9f4HXm.js.map → remote-web-pairing-BGorUWrN.js.map} +1 -1
  220. package/dist/standalone/assets/{request-BpOspF-T.js → request-CReXXmP8.js} +2 -2
  221. package/dist/standalone/assets/{request-BpOspF-T.js.map → request-CReXXmP8.js.map} +1 -1
  222. package/dist/standalone/assets/resolve-assistant-CFtChAyl.js +2 -0
  223. package/dist/standalone/assets/resolve-assistant-CFtChAyl.js.map +1 -0
  224. package/dist/standalone/assets/retire-assistant-CXC684th.js +2 -0
  225. package/dist/standalone/assets/retire-assistant-CXC684th.js.map +1 -0
  226. package/dist/standalone/assets/{return-to-DazNKK_L.js → return-to-CPhOcyqz.js} +2 -2
  227. package/dist/standalone/assets/{return-to-DazNKK_L.js.map → return-to-CPhOcyqz.js.map} +1 -1
  228. package/dist/standalone/assets/{returning-user-CMNG1o-y.js → returning-user-BZmAesT8.js} +2 -2
  229. package/dist/standalone/assets/{returning-user-CMNG1o-y.js.map → returning-user-BZmAesT8.js.map} +1 -1
  230. package/dist/standalone/assets/{review-terms-screen-f75A8Lfc.js → review-terms-screen-P9NFxtXh.js} +2 -2
  231. package/dist/standalone/assets/{review-terms-screen-f75A8Lfc.js.map → review-terms-screen-P9NFxtXh.js.map} +1 -1
  232. package/dist/standalone/assets/{rotate-ccw-BzeQSlMY.js → rotate-ccw-BMei42NT.js} +1 -1
  233. package/dist/standalone/assets/{rotate-ccw-BzeQSlMY.js.map → rotate-ccw-BMei42NT.js.map} +1 -1
  234. package/dist/standalone/assets/routes-DH7knWlS.js +2 -0
  235. package/dist/standalone/assets/routes-DH7knWlS.js.map +1 -0
  236. package/dist/standalone/assets/{schemas-BZBjRX4t.js → schemas-BYL1R3CL.js} +1 -1
  237. package/dist/standalone/assets/{schemas-BZBjRX4t.js.map → schemas-BYL1R3CL.js.map} +1 -1
  238. package/dist/standalone/assets/select-BOe987hM.js +42 -0
  239. package/dist/standalone/assets/select-BOe987hM.js.map +1 -0
  240. package/dist/standalone/assets/select-assistant-screen-8BmNSQjP.js +2 -0
  241. package/dist/standalone/assets/select-assistant-screen-8BmNSQjP.js.map +1 -0
  242. package/dist/standalone/assets/selected-assistant-storage-Bxccak3R.js +2 -0
  243. package/dist/standalone/assets/selected-assistant-storage-Bxccak3R.js.map +1 -0
  244. package/dist/standalone/assets/{session-token-Ev2cmr9G.js → session-token-CeIMyut9.js} +2 -2
  245. package/dist/standalone/assets/{session-token-Ev2cmr9G.js.map → session-token-CeIMyut9.js.map} +1 -1
  246. package/dist/standalone/assets/{signup-page-KeolUD_u.js → signup-page-CNFOq9-F.js} +2 -2
  247. package/dist/standalone/assets/{signup-page-KeolUD_u.js.map → signup-page-CNFOq9-F.js.map} +1 -1
  248. package/dist/standalone/assets/{signup-shell-DohGIoF-.js → signup-shell-B4gWR3ma.js} +2 -2
  249. package/dist/standalone/assets/signup-shell-B4gWR3ma.js.map +1 -0
  250. package/dist/standalone/assets/{src-Cr-NnTju.js → src-CxFXHgGM.js} +12 -12
  251. package/dist/standalone/assets/src-CxFXHgGM.js.map +1 -0
  252. package/dist/standalone/assets/{start-screen-C5WcGw-O.js → start-screen-D787hUql.js} +2 -2
  253. package/dist/standalone/assets/{start-screen-C5WcGw-O.js.map → start-screen-D787hUql.js.map} +1 -1
  254. package/dist/standalone/assets/startup-page-DfosTYkL.js +2 -0
  255. package/dist/standalone/assets/startup-page-DfosTYkL.js.map +1 -0
  256. package/dist/standalone/assets/{text-link-DFDM7RLf.js → text-link-B8VO4Tjc.js} +2 -2
  257. package/dist/standalone/assets/{text-link-DFDM7RLf.js.map → text-link-B8VO4Tjc.js.map} +1 -1
  258. package/dist/standalone/assets/triangle-alert-BNKcT3qS.js +2 -0
  259. package/dist/standalone/assets/triangle-alert-BNKcT3qS.js.map +1 -0
  260. package/dist/standalone/assets/{typography-Bp7J7PNm.js → typography-D4_LOmJc.js} +2 -2
  261. package/dist/standalone/assets/{typography-Bp7J7PNm.js.map → typography-D4_LOmJc.js.map} +1 -1
  262. package/dist/standalone/assets/{use-assistant-choices-D7BXbNtP.js → use-assistant-choices-BjNkXiWf.js} +2 -2
  263. package/dist/standalone/assets/{use-assistant-choices-D7BXbNtP.js.map → use-assistant-choices-BjNkXiWf.js.map} +1 -1
  264. package/dist/standalone/assets/{use-assistant-request-BQZn0euZ.js → use-assistant-request-CH8yCmNN.js} +2 -2
  265. package/dist/standalone/assets/{use-assistant-request-BQZn0euZ.js.map → use-assistant-request-CH8yCmNN.js.map} +1 -1
  266. package/dist/standalone/assets/{use-return-to-short-circuit-Crw-Q49N.js → use-return-to-short-circuit-CYiiiDvR.js} +2 -2
  267. package/dist/standalone/assets/{use-return-to-short-circuit-Crw-Q49N.js.map → use-return-to-short-circuit-CYiiiDvR.js.map} +1 -1
  268. package/dist/standalone/assets/vellum-migration-screen-VB22qEIV.js +2 -0
  269. package/dist/standalone/assets/vellum-migration-screen-VB22qEIV.js.map +1 -0
  270. package/dist/standalone/assets/web-BVFEX2sN.js +2 -0
  271. package/dist/standalone/assets/web-BVFEX2sN.js.map +1 -0
  272. package/dist/standalone/assets/{web-vi5sY1tx.js → web-DGsA39ij.js} +2 -2
  273. package/dist/standalone/assets/{web-vi5sY1tx.js.map → web-DGsA39ij.js.map} +1 -1
  274. package/dist/standalone/assets/{web-D9n6hYj1.js → web-DdkOVyp-.js} +2 -2
  275. package/dist/standalone/assets/{web-D9n6hYj1.js.map → web-DdkOVyp-.js.map} +1 -1
  276. package/dist/standalone/assets/{web-namespaces-TlpveG6O.js → web-namespaces-DsiStifa.js} +1 -1
  277. package/dist/standalone/assets/{web-namespaces-TlpveG6O.js.map → web-namespaces-DsiStifa.js.map} +1 -1
  278. package/dist/standalone/assets/welcome-screen-CyLPcV3l.js +1 -0
  279. package/dist/standalone/assets/{welcome-screen-71VYtG_N.js → welcome-screen-DaQBEeKe.js} +2 -2
  280. package/dist/standalone/assets/{welcome-screen-71VYtG_N.js.map → welcome-screen-DaQBEeKe.js.map} +1 -1
  281. package/dist/standalone/index.html +38 -33
  282. package/package.json +1 -1
  283. package/dist/package/resolution-contract-D6qbDWH9.js.map +0 -1
  284. package/dist/package/types/contracts.d.ts +0 -1
  285. package/dist/standalone/assets/account-page-C9RTiet9.js +0 -2
  286. package/dist/standalone/assets/api-key-screen-7Oeb4VZb.js +0 -2
  287. package/dist/standalone/assets/api-key-screen-7Oeb4VZb.js.map +0 -1
  288. package/dist/standalone/assets/assistants-page-DGzqC4QI.js +0 -2
  289. package/dist/standalone/assets/assistants-page-DGzqC4QI.js.map +0 -1
  290. package/dist/standalone/assets/auth-flow-DRKdI57z.js.map +0 -1
  291. package/dist/standalone/assets/avatar-bundled-components-Df4QxjdY.js +0 -1
  292. package/dist/standalone/assets/circle-check-CuQDC50A.js +0 -2
  293. package/dist/standalone/assets/circle-check-CuQDC50A.js.map +0 -1
  294. package/dist/standalone/assets/common-CF7RP46x.js +0 -2
  295. package/dist/standalone/assets/common-CXt-X9JZ.js +0 -2
  296. package/dist/standalone/assets/common-DiqTxEoY.js +0 -2
  297. package/dist/standalone/assets/confirm-dialog-ClRO5F9p.js +0 -2
  298. package/dist/standalone/assets/confirm-dialog-ClRO5F9p.js.map +0 -1
  299. package/dist/standalone/assets/copy-to-clipboard-B95wqsGH.js +0 -2
  300. package/dist/standalone/assets/copy-to-clipboard-B95wqsGH.js.map +0 -1
  301. package/dist/standalone/assets/doctor-page-DrbQzv7g.js +0 -8
  302. package/dist/standalone/assets/doctor-page-DrbQzv7g.js.map +0 -1
  303. package/dist/standalone/assets/esm-qBiA1_4M.js +0 -3
  304. package/dist/standalone/assets/hatching-screen-DTkoz7iW.js +0 -2
  305. package/dist/standalone/assets/hatching-screen-DTkoz7iW.js.map +0 -1
  306. package/dist/standalone/assets/hosting-screen-DM7aTZ8U.js +0 -2
  307. package/dist/standalone/assets/hosting-screen-DM7aTZ8U.js.map +0 -1
  308. package/dist/standalone/assets/index-D72X30LM.js +0 -25
  309. package/dist/standalone/assets/index-D72X30LM.js.map +0 -1
  310. package/dist/standalone/assets/index-v5jIc7Ne.css +0 -2
  311. package/dist/standalone/assets/is-electron-DLjujt3j.js.map +0 -1
  312. package/dist/standalone/assets/login-page-BZGRX0EO.js +0 -2
  313. package/dist/standalone/assets/logout-page-B2MWIJOU.js +0 -2
  314. package/dist/standalone/assets/onboarding-navigation-DC8_8LuV.js +0 -2
  315. package/dist/standalone/assets/pairing-address-oW5PUuio.js +0 -2
  316. package/dist/standalone/assets/pairing-address-oW5PUuio.js.map +0 -1
  317. package/dist/standalone/assets/pairing-page-o5yOUb6T.js +0 -2
  318. package/dist/standalone/assets/provider-i52bX5VR.js +0 -2
  319. package/dist/standalone/assets/resolve-assistant-D3wYg0xs.js +0 -2
  320. package/dist/standalone/assets/resolve-assistant-D3wYg0xs.js.map +0 -1
  321. package/dist/standalone/assets/retire-assistant-V-UCSVA2.js +0 -2
  322. package/dist/standalone/assets/retire-assistant-V-UCSVA2.js.map +0 -1
  323. package/dist/standalone/assets/routes-bHGywETD.js +0 -2
  324. package/dist/standalone/assets/routes-bHGywETD.js.map +0 -1
  325. package/dist/standalone/assets/select-DT_GqrSO.js +0 -42
  326. package/dist/standalone/assets/select-DT_GqrSO.js.map +0 -1
  327. package/dist/standalone/assets/select-assistant-screen-eJq9_eeQ.js +0 -2
  328. package/dist/standalone/assets/select-assistant-screen-eJq9_eeQ.js.map +0 -1
  329. package/dist/standalone/assets/signup-shell-DohGIoF-.js.map +0 -1
  330. package/dist/standalone/assets/src-Cr-NnTju.js.map +0 -1
  331. package/dist/standalone/assets/startup-page-8yUObKaM.js +0 -2
  332. package/dist/standalone/assets/startup-page-8yUObKaM.js.map +0 -1
  333. package/dist/standalone/assets/welcome-screen-DsOD5vcC.js +0 -1
@@ -1 +1 @@
1
- {"version":3,"mappings":"0JAAA,wBACA,gFAWA,0BAIA,+CAKA,SACA,6CACA,cACA,8MAoBA,+TAsBA,uEAQA,6FASA,qDAOA,4NAgBA,6DACA,4EAQA,4CAMA,2TAoBA,wBACA,YACA,2PAeA,2WAgCA,0BAEA,6JAyDA,YA1CA,yqBA4CA,4lBAgDA,+/DAkIA,uJAaA,6BACA,mLAaA,qTAoBA,wDACA,gzSAsbA,06EA6GA,6CAQA,4FAMA,mwCA6DA,mGAQA,8BACA,6tIAmMA,seA+BA,wPAmBA,4BACA,4zCA2FA,0EAMA,mmHAkNA,+lCA4DA,6OAUA,SACA,wHA0fA,QAlfA,guUAkfA,iBAEA,oBACA,MACA,OACA,gBACA,kBACA,MACA,iBACA,YACA,IACA,SACA,sBACA,qBACA,iBACA,gBCzsEA,IAAa,EAAgB,IAAgB,CCAzC,GAAc,CAAC,YAAa,cAAe,YAAY,CAC3D,SAAS,GAAc,EAAQ,EAAM,EAAO,CAC1C,SAAS,EAAS,EAAK,CACrB,OAAO,GAAO,EAAI,QAAQ,MAAM,CAAG,GAAK,EAAI,QAAQ,OAAQ,IAAI,CAAG,EAErE,SAAS,GAAuB,CAC9B,MAAO,CAAC,GAAU,OAAO,GAAW,SAGtC,IADA,IAAI,EAAQ,OAAO,GAAS,SAA6B,EAAK,MAAM,IAAI,CAAjC,EAAE,CAAC,OAAO,EAAK,CAC/C,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AK,KAAK,CACjB,GAAM,CAAC,IAAK,KAAK,CACjB,GAAM,CACL,IACA,IACA,KACA,KACA,CACD,GAAM,CAAC,IAAK,IAAI,CAChB,GAAM,CAAC,IAAK,KAAK,CACjB,GAAM,CACL,IACA,KACA,IACA,KACA,CACD,GAAM,CAAC,IAAK,KAAK,CACjB,GAAM,CAAC,IAAI,CACX,GAAM,CACL,IACA,KACA,IACA,CACD,GAAM,CACL,IACA,KACA,IACA,CACD,GAAM,CACL,IACA,KACA,IACA,KACA,CACD,GAAM,CACL,IACA,KACA,IACA,CACD,GAAM,CAAC,IAAK,KAAK,CACjB,GAAM,CAAC,IAAK,KAAK,CACjB,GAAM,CACL,IACA,KACA,IACA,CACD,GAAM,CACL,IACA,KACA,KACA,IACA,CACD,GAAM,CAAC,IAAK,IAAI,CAChB,GAAM,CAAC,IAAK,KAAK,CACjB,GAAM,CAAC,IAAK,KAAK,CACjB,GAAM,CACL,IACA,KACA,IACA,KACA,CACD,GAAM,CACL,KACA,KACA,IACA,IACA,CACD,GAAM,CACL,IACA,IACA,KACA,KACA,CACD,GAAM,CAAC,IAAI,CACX,GAAM,CAAC,IAAK,KAAK,CACjB,GAAM,CACL,IACA,KACA,IACA,KACA,CACD,GAAM,CAAC,IAAK,IAAI,CAChB,GAAM,CACL,IACA,IACA,KACA,KACA,CACD,GAAM,CAAC,IAAK,IAAI,CAChB,GAAM,CACL,IACA,IACA,KACA,KACA,CACD,GAAM,CACL,IACA,KACA,IACA,KACA,CACD,GAAM,CACL,IACA,IACA,KACA,KACA,CACD,GAAM,CAAC,KAAM,IAAI,CACjB,GAAM,CACL,IACA,IACA,KACA,CACD,GAAM,CAAC,IAAK,KAAK,CACjB,GAAM,CACL,IACA,KACA,IACA,CACD,GAAM,CAAC,IAAK,KAAK,CACjB,GAAM,CACL,IACA,IACA,KACA,KACA,CACD,GAAM,CACL,IACA,IACA,KACA,KACA,CACD,GAAM,CACL,IACA,IACA,KACA,CACD,GAAM,CACL,IACA,KACA,KACA,IACA,CACD,GAAM,CACL,IACA,IACA,KACA,KACA,CACD,GAAM,CAAC,IAAI,CACX,GAAM,CACL,IACA,IACA,KACA,KACA,CACD,GAAM,CACL,IACA,IACA,KACA,KACA,CACD,GAAM,CAAC,IAAK,KAAK,CACjB,GAAM,CAAC,IAAK,KAAK,CACjB,GAAM,CACL,IACA,IACA,KACA,KACA,CACD,GAAM,CACL,IACA,IACA,KACA,KACA,CACD,GAAM,CAAC,IAAI,CACX,GAAM,CAAC,IAAK,KAAK,CACjB,GAAM,CACL,IACA,IACA,KACA,KACA,CACD,GAAM,CAAC,IAAK,IAAI,CAChB,GAAM,CAAC,IAAI,CACX,GAAM,CACL,IACA,KACA,IACA,KACA,CACD,GAAM,CACL,IACA,IACA,KACA,KACA,CACD,GAAM,CACL,IACA,KACA,KACA,IACA,CACD,GAAM,CACL,IACA,IACA,KACA,KACA,CACD,GAAM,CACL,IACA,IACA,KACA,KACA,CACD,GAAM,CAAC,IAAK,KAAK,CACjB,GAAM,CACL,IACA,KACA,KACA,IACA,CACD,GAAM,CACL,IACA,KACA,KACA,IACA,CACD,GAAM,CAAC,IAAK,IAAI,CAChB,GAAM,CACL,IACA,KACA,IACA,KACA,CACD,GAAM,CACL,KACA,KACA,IACA,IACA,CACD,GAAM,CAAC,IAAI,CACX,GAAM,CACL,IACA,KACA,IACA,KACA,CACD,GAAM,CACL,IACA,IACA,KACA,KACA,CACD,GAAM,CACL,IACA,KACA,IACA,KACA,CACD,GAAM,CAAC,IAAK,IAAI,CAChB,GAAM,CAAC,IAAK,KAAK,CACjB,GAAM,CAAC,IAAK,KAAK,CACjB,GAAM,CACL,IACA,IACA,KACA,KACA,CACD,GAAM,CACL,IACA,KACA,IACA,KACA,CACD,GAAM,CACL,IACA,KACA,IACA,CACD,GAAM,CAAC,IAAK,KAAK,CACjB,GAAM,CACL,IACA,IACA,KACA,KACA,CACD,GAAM,CAAC,IAAK,IAAI,CAChB,GAAM,CACL,IACA,IACA,KACA,KACA,CACD,GAAM,CAAC,IAAK,IAAI,CAChB,GAAM,CACL,IACA,KACA,IACA,KACA,CACD,GAAM,CAAC,IAAK,KAAK,CACjB,GAAM,CAAC,IAAK,KAAK,CACjB,GAAM,CACL,IACA,KACA,IACA,KACA,CACD,GAAM,CACL,IACA,IACA,KACA,KACA,CACD,GAAM,CACL,IACA,IACA,KACA,KACA,CACD,GAAM,CACL,IACA,IACA,KACA,KACA,CACD,GAAM,CACL,IACA,KACA,IACA,KACA,CACD,GAAM,CAAC,IAAK,KAAK,CACjB,GAAM,CACL,IACA,KACA,IACA,KACA,CACD,GAAM,CACL,IACA,KACA,KACA,IACA,CACD,GAAM,CACL,IACA,IACA,KACA,KACA,CACD,GAAM,CAAC,IAAK,KAAK,CACjB,GAAM,CAAC,IAAK,IAAI,CAChB,GAAM,CACL,IACA,IACA,KACA,KACA,CACD,GAAM,CAAC,IAAI,CACX,GAAM,CACL,IACA,IACA,KACA,KACA,CACD,GAAM,CAAC,IAAK,KAAK,CACjB,GAAM,CACL,IACA,IACA,KACA,KACA,CACD,GAAM,CAAC,IAAK,IAAI,CAChB,GAAM,CACL,IACA,IACA,KACA,KACA,CACD,GAAM,CACL,IACA,KACA,KACA,IACA,CACD,GAAM,CAAC,KAAM,IAAI,CACjB,GAAM,CAAC,IAAI,CACX,GAAM,CAAC,IAAK,KAAK,CACjB,GAAM,CACL,IACA,IACA,KACA,KACA,CACD,GAAM,CACL,IACA,KACA,IACA,KACA,CACD,GAAM,CACL,IACA,KACA,KACA,IACA,CACD,GAAM,CACL,IACA,IACA,IACA,CACD,GAAM,CACL,KACA,KACA,IACA,IACA,CACD,GAAM,CACL,IACA,IACA,KACA,KACA,CACD,GAAM,CACL,KACA,IACA,IACA,KACA,CACD,GAAM,CACL,IACA,KACA,IACA,KACA,CACD,GAAM,CACL,IACA,IACA,KACA,KACA,CACD,GAAM,CACL,IACA,KACA,IACA,KACA,CACD,GAAM,CACL,IACA,IACA,KACA,KACA,CACD,GAAM,CACL,IACA,IACA,KACA,KACA,CACD,GAAM,CACL,IACA,KACA,KACA,IACA,CACD,GAAM,CACL,IACA,KACA,IACA,KACA,CACD,GAAM,CAAC,IAAK,KAAK,CACjB,GAAM,CACL,IACA,KACA,KACA,IACA,CACD,GAAM,CACL,IACA,KACA,KACA,IACA,CACD,GAAM,CACL,IACA,KACA,IACA,KACA,CACD,GAAM,CACL,IACA,KACA,IACA,CACD,GAAM,CACL,IACA,IACA,KACA,KACA,CACD,GAAM,CACL,IACA,KACA,IACA,KACA,CACD,GAAM,CAAC,IAAK,IAAI,CAChB,GAAM,CACL,IACA,IACA,KACA,KACA,CACD,GAAM,CACL,IACA,IACA,KACA,CACD,GAAM,CACL,IACA,KACA,KACA,IACA,CACD,GAAM,CACL,IACA,KACA,KACA,IACA,CACD,GAAM,CACL,IACA,IACA,KACA,KACA,CACD,GAAM,CAAC,IAAK,KAAK,CACjB,GAAM,CAAC,IAAK,KAAK,CACjB,GAAM,CACL,IACA,KACA,IACA,CACD,GAAM,CAAC,IAAK,KAAK,CACjB,GAAM,CAAC,IAAK,IAAI,CAChB,GAAM,CACL,IACA,KACA,IACA,KACA,CACD,GAAM,CACL,IACA,IACA,KACA,KACA,CACD,GAAM,CAAC,IAAI,CACX,GAAM,CACL,KACA,KACA,IACA,IACA,CACD,GAAM,CACL,IACA,IACA,KACA,KACA,CACD,GAAM,CACL,IACA,KACA,KACA,IACA,CACD,GAAM,CACL,IACA,KACA,IACA,KACA,CACD,GAAM,CAAC,IAAK,KAAK,CACjB,GAAM,CACL,IACA,KACA,KACA,IACA,CACD,GAAM,CACL,IACA,IACA,KACA,KACA,CACD,GAAM,CAAC,IAAK,IAAI,CAChB,GAAM,CAAC,IAAK,IAAI,CAChB,GAAM,CAAC,IAAK,IAAI,CAChB,GAAM,CACL,IACA,KACA,IACA,KACA,CACD,GAAM,CACL,IACA,IACA,KACA,KACA,CACD,GAAM,CACL,KACA,KACA,IACA,IACA,CACD,GAAM,CAAC,IAAK,KAAK,CACjB,GAAM,CACL,IACA,IACA,KACA,KACA,CACD,GAAM,CAAC,IAAK,KAAK,CACjB,GAAM,CAAC,IAAI,CACX,GAAM,CACL,IACA,IACA,KACA,KACA,CACD,GAAM,CACL,IACA,IACA,KACA,KACA,CACD,GAAM,CACL,IACA,IACA,KACA,KACA,CACD,GAAM,CAAC,IAAK,KAAK,CACjB,GAAM,CAAC,IAAK,IAAI,CAChB,GAAM,CACL,IACA,IACA,KACA,CACD,GAAM,CACL,IACA,IACA,KACA,KACA,CACD,GAAM,CACL,IACA,IACA,KACA,KACA,CACD,GAAM,CACL,IACA,KACA,IACA,KACA,CACD,GAAM,CACL,IACA,KACA,KACA,IACA,CACD,GAAM,CACL,IACA,IACA,KACA,KACA,CACD,GAAM,CACL,IACA,IACA,KACA,KACA,CACD,GAAM,CACL,IACA,IACA,KACA,CACD,GAAM,CAAC,IAAK,IAAI,CAChB,GAAM,CACL,IACA,KACA,KACA,IACA,CACD,GAAM,CACL,IACA,KACA,IACA,CACD,GAAM,CAAC,IAAK,IAAI,CAChB,GAAM,CAAC,IAAK,KAAK,CACjB,GAAM,CACL,IACA,IACA,KACA,KACA,CACD,GAAM,CACL,IACA,IACA,KACA,KACA,CACD,GAAM,CACL,IACA,KACA,KACA,IACA,CACD,GAAM,CAAC,IAAK,KAAK,CACjB,GAAM,CAAC,IAAK,IAAI,CAChB,GAAM,CACL,IACA,IACA,KACA,KACA,CACD,GAAM,CACL,IACA,KACA,KACA,IACA,CACD,GAAM,CAAC,IAAK,KAAK,CACjB,GAAM,CAAC,IAAK,KAAK,CACjB,GAAM,CACL,IACA,KACA,IACA,CACD,GAAM,CAAC,IAAI,CACX,GAAM,CAAC,IAAK,IAAI,CAChB,GAAM,CACL,IACA,KACA,KACA,IACA,CACD,GAAM,CACL,IACA,KACA,IACA,KACA,CACD,GAAM,CACL,IACA,IACA,KACA,CACD,GAAM,CACL,IACA,KACA,KACA,IACA,CACD,GAAM,CAAC,IAAI,CACX,GAAM,CACL,IACA,KACA,IACA,KACA,CACD,GAAM,CACL,IACA,IACA,KACA,KACA,CACD,GAAM,CAAC,IAAK,KAAK,CACjB,GAAM,CAAC,IAAI,CACX,GAAM,CAAC,IAAI,CACX,GAAM,CACL,IACA,KACA,IACA,KACA,CACD,GAAM,CACL,IACA,IACA,KACA,CACD,GAAM,CACL,IACA,IACA,KACA,CACD,GAAM,CAAC,IAAK,IAAI,CAChB,GAAM,CAAC,IAAK,KAAK,CACjB,GAAM,CACL,IACA,KACA,IACA,KACA,CACD,GAAM,CAAC,IAAK,KAAK,CACjB,GAAM,CACL,IACA,IACA,KACA,KACA,CACD,GAAM,CACL,IACA,IACA,KACA,KACA,CACD,GAAM,CACL,IACA,KACA,KACA,IACA,CACD,GAAM,CACL,IACA,KACA,IACA,KACA,CACD,GAAM,CACL,IACA,IACA,KACA,KACA,CACD,GAAM,CACL,IACA,KACA,IACA,KACA,CACD,GAAM,CACL,IACA,IACA,KACA,CACD,GAAM,CACL,IACA,IACA,KACA,CACD,GAAM,CAAC,IAAK,KAAK,CACjB,GAAM,CAAC,IAAK,IAAI,CAChB,GAAM,CAAC,IAAK,IAAI,CAChB,GAAM,CACL,IACA,KACA,KACA,IACA,CACD,GAAM,CAAC,IAAK,IAAI,CAChB,GAAM,CACL,IACA,KACA,KACA,IACA,CACD,GAAM,CAAC,IAAK,IAAI,CAChB,GAAM,CAAC,IAAK,KAAK,CACjB,GAAM,CACL,IACA,KACA,IACA,KACA,CACD,GAAM,CACL,KACA,KACA,IACA,IACA,CACD,GAAM,CACL,KACA,KACA,IACA,IACA,CACD,GAAM,CACL,IACA,KACA,IACA,CACD,GAAM,CACL,KACA,KACA,IACA,IACA,CACD,GAAM,CACL,IACA,KACA,IACA,KACA,CACD,GAAM,CACL,IACA,KACA,IACA,KACA,CACD,GAAM,CACL,IACA,IACA,KACA,KACA,CACD,GAAM,CACL,IACA,KACA,IACA,CACD,GAAM,CACL,IACA,IACA,KACA,CACD,GAAM,CACL,IACA,KACA,IACA,KACA,CACD,GAAM,CACL,IACA,IACA,KACA,KACA,CACD,GAAM,CACL,IACA,KACA,IACA,KACA,CACD,GAAM,CACL,IACA,KACA,IACA,KACA,CACD,GAAM,CAAC,IAAK,IAAI,CAChB,GAAM,CAAC,IAAK,IAAI,CAChB,GAAM,CAAC,IAAK,KAAK,CACjB,GAAM,CAAC,IAAK,IAAI,CAChB,GAAM,CACL,IACA,KACA,IACA,CACD,GAAM,CACL,IACA,KACA,KACA,IACA,CACD,GAAM,CAAC,IAAK,KAAK,CACjB,GAAM,CACL,IACA,IACA,KACA,KACA,CACD,GAAM,CACL,IACA,KACA,IACA,KACA,CACD,GAAM,CAAC,IAAK,IAAI,CAChB,QAAS,CACR,IACA,IACA,KACA,KACA,CACD,SAAU,CACT,IACA,KACA,KACA,IACA,CACD,QAAS,CACR,IACA,IACA,KACA,CACD,SAAU,CACT,IACA,KACA,IACA,KACA,CACD,QAAS,CACR,IACA,KACA,IACA,KACA,CACD,QAAS,CACR,IACA,IACA,KACA,KACA,CACD,QAAS,CACR,IACA,KACA,IACA,KACA,CACD,QAAS,CACR,IACA,IACA,KACA,KACA,CACD,QAAS,CACR,IACA,IACA,KACA,KACA,CACD,QAAS,CACR,IACA,IACA,KACA,KACA,CACD,QAAS,CACR,IACA,IACA,KACA,CACD,QAAS,CACR,IACA,IACA,KACA,CACD,QAAS,CACR,KACA,KACA,IACA,IACA,CACD,QAAS,CACR,KACA,IACA,IACA,CACD,QAAS,CACR,IACA,IACA,KACA,CACD,QAAS,CACR,IACA,IACA,KACA,CACD,QAAS,CACR,KACA,IACA,IACA,CACD,QAAS,CAAC,IAAK,KAAK,CACpB,QAAS,CACR,KACA,IACA,IACA,CACD,QAAS,CACR,KACA,KACA,IACA,IACA,CACD,QAAS,CACR,KACA,KACA,IACA,IACA,CACD,QAAS,CACR,KACA,IACA,KACA,IACA,CACD,QAAS,CACR,KACA,IACA,IACA,CACD,QAAS,CACR,IACA,KACA,KACA,IACA,CACD,CAUD,SAAS,GAAe,EA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c,EACd,IACE,EAAW,SAAW,EAAW,QAAQ,aAAe,GACtD,EAAe,UAAY,EAK7B,EAAc,EAAW,SAJzB,EAAc,EAAkB,EAAS,CACzC,EAAW,QAAU,EACrB,EAAe,QAAU,IAU/B,IAAM,EAAa,CAAC,GAAS,CAAC,GAAe,GAAG,KAC9C,EAAS,EAAM,qBAAsB,8HAA8H,CAC5J,EAAE,GAAG,EAAK,EACf,EACE,EAAM,CAAC,EAAY,EAAa,EAAM,CAI5C,MAHA,GAAI,EAAI,EACR,EAAI,KAAO,EACX,EAAI,MAAQ,EACL,GACN,CAAC,EAAG,EAAW,EAAO,EAAU,iBAAkB,EAAU,SAAU,EAAU,UAAU,CAAC,CAC9F,GAAI,GAAQ,GAAe,CAAC,EAAO,CACjC,IAAI,EAAgB,GACpB,GAAI,CACF,EAAgB,QACN,EAIZ,MAHI,GACF,EAAS,EAAM,0BAA2B,+PAA+P,CAErS,IAAI,QAAQ,GAAW,CAC3B,IAAM,MAAiB,GAAS,CAC5B,EAAM,IACR,GAAc,EAAM,EAAM,IAAK,EAAY,EAAS,CAEpD,GAAe,EAAM,EAAY,EAAS,EAE5C,CAEJ,OAAO,GC3JT,SAAgB,GAGd,EAAe,EAAoC,CACnD,IAAM,mBAAsB,GAAe,EAAI,EAC/C,OAAO,GAA0B,EAAW,CAAE,GAAG,EAAS,KAAM,EAAU,CAAC,CAG7E,IAAa,GAA4B,GAAU,CACjD,IAAM,mBAAsB,GAAe,EAAI,EAC/C,OAAO,UAAC,GAAD,CAAY,GAAI,EAAO,KAAM,EAAY,GCgDrC,GAAI,EAAQ,EAAE,KAAK,EAAQ","names":["parse","getDefaults","utils.defaults","IntlMessageFormat","utils.getPath","isValidElement","HTML","Children","Fragment","Trans","keyFromSelector","TransWithoutContext","useTranslation"],"ignoreList":[0,2,3,4,5,6,7,18,19,20,21,22,23,24,25,26,27,28],"sources":["../../../../../node_modules/.bun/i18next@26.3.6+1fb4c65d43e298b9/node_modules/i18next/dist/esm/i18next.js","../../../src/i18n/instance.ts","../../../../../node_modules/.bun/i18next-icu@2.4.4+85079ac2b5c58174/node_modules/i18next-icu/dist/es/utils.js","../../../../../node_modules/.bun/@formatjs+fast-memoize@3.1.7/node_modules/@formatjs/fast-memoize/index.js","../../../../../node_modules/.bun/@formatjs+icu-skeleton-parser@2.1.11/node_modules/@formatjs/icu-skeleton-parser/index.js","../../../../../node_modules/.bun/@formatjs+icu-messageformat-parser@3.5.16/node_modules/@formatjs/icu-messageformat-parser/index.js","../../../../../node_modules/.bun/intl-messageformat@11.2.13/node_modules/intl-messageformat/index.js","../../../../../node_modules/.bun/i18next-icu@2.4.4+85079ac2b5c58174/node_modules/i18next-icu/dist/es/index.js","../../../src/i18n/namespaces.ts","../../../src/i18n/supported-locales.ts","../../../src/i18n/catalogs.ts","../../../src/i18n/config.ts","../../../src/i18n/system-locale.ts","../../../src/utils/local-settings.ts","../../../src/utils/device-settings.ts","../../../src/i18n/locale-preference.ts","../../../src/i18n/i18n.ts","../../../src/i18n/provider.tsx","../../../../../node_modules/.bun/html-parse-stringify@4.0.1/node_modules/html-parse-stringify/dist/esm/html-parse-stringify.js","../../../../../node_modules/.bun/react-i18next@17.0.11+942c965e79d69f32/node_modules/react-i18next/dist/es/utils.js","../../../../../node_modules/.bun/react-i18next@17.0.11+942c965e79d69f32/node_modules/react-i18next/dist/es/unescape.js","../../../../../node_modules/.bun/react-i18next@17.0.11+942c965e79d69f32/node_modules/react-i18next/dist/es/defaults.js","../../../../../node_modules/.bun/react-i18next@17.0.11+942c965e79d69f32/node_modules/react-i18next/dist/es/i18nInstance.js","../../../../../node_modules/.bun/react-i18next@17.0.11+942c965e79d69f32/node_modules/react-i18next/dist/es/TransWithoutContext.js","../../../../../node_modules/.bun/react-i18next@17.0.11+942c965e79d69f32/node_modules/react-i18next/dist/es/context.js","../../../../../node_modules/.bun/react-i18next@17.0.11+942c965e79d69f32/node_modules/react-i18next/dist/es/Trans.js","../../../../../node_modules/.bun/use-sync-external-store@1.7.0+d86b59289c1a13ae/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.production.js","../../../../../node_modules/.bun/use-sync-external-store@1.7.0+d86b59289c1a13ae/node_modules/use-sync-external-store/shim/index.js","../../../../../node_modules/.bun/react-i18next@17.0.11+942c965e79d69f32/node_modules/react-i18next/dist/es/useTranslation.js","../../../src/i18n/react.tsx","../../../src/i18n/index.ts"],"sourcesContent":["const isString = obj => typeof obj === 'string';\nconst defer = () => {\n let res;\n let rej;\n const promise = new Promise((resolve, reject) => {\n res = resolve;\n rej = reject;\n });\n promise.resolve = res;\n promise.reject = rej;\n return promise;\n};\nconst makeString = object => {\n if (object == null) return '';\n return String(object);\n};\nconst copy = (a, s, t) => {\n a.forEach(m => {\n if (s[m]) t[m] = s[m];\n });\n};\nconst lastOfPathSeparatorRegExp = /###/g;\nconst cleanKey = key => key && key.includes('###') ? key.replace(lastOfPathSeparatorRegExp, '.') : key;\nconst canNotTraverseDeeper = object => !object || isString(object);\nconst getLastOfPath = (object, path, Empty) => {\n const stack = !isString(path) ? path : path.split('.');\n let stackIndex = 0;\n while (stackIndex < stack.length - 1) {\n if (canNotTraverseDeeper(object)) return {};\n const key = cleanKey(stack[stackIndex]);\n if (!object[key] && Empty) object[key] = new Empty();\n if (Object.prototype.hasOwnProperty.call(object, key)) {\n object = object[key];\n } else {\n object = {};\n }\n ++stackIndex;\n }\n if (canNotTraverseDeeper(object)) return {};\n return {\n obj: object,\n k: cleanKey(stack[stackIndex])\n };\n};\nconst setPath = (object, path, newValue) => {\n const {\n obj,\n k\n } = getLastOfPath(object, path, Object);\n if (obj !== undefined || path.length === 1) {\n obj[k] = newValue;\n return;\n }\n let e = path[path.length - 1];\n let p = path.slice(0, path.length - 1);\n let last = getLastOfPath(object, p, Object);\n while (last.obj === undefined && p.length) {\n e = `${p[p.length - 1]}.${e}`;\n p = p.slice(0, p.length - 1);\n last = getLastOfPath(object, p, Object);\n if (last?.obj && typeof last.obj[`${last.k}.${e}`] !== 'undefined') {\n last.obj = undefined;\n }\n }\n last.obj[`${last.k}.${e}`] = newValue;\n};\nconst pushPath = (object, path, newValue, concat) => {\n const {\n obj,\n k\n } = getLastOfPath(object, path, Object);\n obj[k] = obj[k] || [];\n obj[k].push(newValue);\n};\nconst getPath = (object, path) => {\n const {\n obj,\n k\n } = getLastOfPath(object, path);\n if (!obj) return undefined;\n if (!Object.prototype.hasOwnProperty.call(obj, k)) return undefined;\n return obj[k];\n};\nconst getPathWithDefaults = (data, defaultData, key) => {\n const value = getPath(data, key);\n if (value !== undefined) {\n return value;\n }\n return getPath(defaultData, key);\n};\nconst deepExtend = (target, source, overwrite) => {\n for (const prop in source) {\n if (prop !== '__proto__' && prop !== 'constructor') {\n if (Object.prototype.hasOwnProperty.call(target, prop)) {\n if (isString(target[prop]) || target[prop] instanceof String || isString(source[prop]) || source[prop] instanceof String) {\n if (overwrite) target[prop] = source[prop];\n } else {\n deepExtend(target[prop], source[prop], overwrite);\n }\n } else {\n target[prop] = source[prop];\n }\n }\n }\n return target;\n};\nconst regexEscape = str => str.replace(/[\\-\\[\\]\\/\\{\\}\\(\\)\\*\\+\\?\\.\\\\\\^\\$\\|]/g, '\\\\$&');\nconst _entityMap = {\n '&': '&amp;',\n '<': '&lt;',\n '>': '&gt;',\n '\"': '&quot;',\n \"'\": '&#39;',\n '/': '&#x2F;'\n};\nconst escape = data => {\n if (isString(data)) {\n return data.replace(/[&<>\"'\\/]/g, s => _entityMap[s]);\n }\n return data;\n};\nclass RegExpCache {\n constructor(capacity) {\n this.capacity = capacity;\n this.regExpMap = new Map();\n this.regExpQueue = [];\n }\n getRegExp(pattern) {\n const regExpFromCache = this.regExpMap.get(pattern);\n if (regExpFromCache !== undefined) {\n return regExpFromCache;\n }\n const regExpNew = new RegExp(pattern);\n if (this.regExpQueue.length === this.capacity) {\n this.regExpMap.delete(this.regExpQueue.shift());\n }\n this.regExpMap.set(pattern, regExpNew);\n this.regExpQueue.push(pattern);\n return regExpNew;\n }\n}\nconst chars = [' ', ',', '?', '!', ';'];\nconst looksLikeObjectPathRegExpCache = new RegExpCache(20);\nconst looksLikeObjectPath = (key, nsSeparator, keySeparator) => {\n nsSeparator = nsSeparator || '';\n keySeparator = keySeparator || '';\n const possibleChars = chars.filter(c => !nsSeparator.includes(c) && !keySeparator.includes(c));\n if (possibleChars.length === 0) return true;\n const r = looksLikeObjectPathRegExpCache.getRegExp(`(${possibleChars.map(c => c === '?' ? '\\\\?' : c).join('|')})`);\n let matched = !r.test(key);\n if (!matched) {\n const ki = key.indexOf(keySeparator);\n if (ki > 0 && !r.test(key.substring(0, ki))) {\n matched = true;\n }\n }\n return matched;\n};\nconst deepFind = (obj, path, keySeparator = '.') => {\n if (!obj) return undefined;\n if (obj[path]) {\n if (!Object.prototype.hasOwnProperty.call(obj, path)) return undefined;\n return obj[path];\n }\n const tokens = path.split(keySeparator);\n let current = obj;\n for (let i = 0; i < tokens.length;) {\n if (!current || typeof current !== 'object') {\n return undefined;\n }\n let next;\n let nextPath = '';\n for (let j = i; j < tokens.length; ++j) {\n if (j !== i) {\n nextPath += keySeparator;\n }\n nextPath += tokens[j];\n next = current[nextPath];\n if (next !== undefined) {\n if (['string', 'number', 'boolean'].includes(typeof next) && j < tokens.length - 1) {\n continue;\n }\n i += j - i + 1;\n break;\n }\n }\n current = next;\n }\n return current;\n};\nconst getCleanedCode = code => code?.replace(/_/g, '-');\n\nconst consoleLogger = {\n type: 'logger',\n log(args) {\n this.output('log', args);\n },\n warn(args) {\n this.output('warn', args);\n },\n error(args) {\n this.output('error', args);\n },\n output(type, args) {\n console?.[type]?.apply?.(console, args);\n }\n};\nclass Logger {\n constructor(concreteLogger, options = {}) {\n this.init(concreteLogger, options);\n }\n init(concreteLogger, options = {}) {\n this.prefix = options.prefix || 'i18next:';\n this.logger = concreteLogger || consoleLogger;\n this.options = options;\n this.debug = options.debug;\n }\n log(...args) {\n return this.forward(args, 'log', '', true);\n }\n warn(...args) {\n return this.forward(args, 'warn', '', true);\n }\n error(...args) {\n return this.forward(args, 'error', '');\n }\n deprecate(...args) {\n return this.forward(args, 'warn', 'WARNING DEPRECATED: ', true);\n }\n forward(args, lvl, prefix, debugOnly) {\n if (debugOnly && !this.debug) return null;\n args = args.map(a => isString(a) ? a.replace(/[\\r\\n\\x00-\\x1F\\x7F]/g, ' ') : a);\n if (isString(args[0])) args[0] = `${prefix}${this.prefix} ${args[0]}`;\n return this.logger[lvl](args);\n }\n create(moduleName) {\n return new Logger(this.logger, {\n ...{\n prefix: `${this.prefix}:${moduleName}:`\n },\n ...this.options\n });\n }\n clone(options) {\n options = options || this.options;\n options.prefix = options.prefix || this.prefix;\n return new Logger(this.logger, options);\n }\n}\nvar baseLogger = new Logger();\n\nclass EventEmitter {\n constructor() {\n this.observers = {};\n }\n on(events, listener) {\n events.split(' ').forEach(event => {\n if (!this.observers[event]) this.observers[event] = new Map();\n const numListeners = this.observers[event].get(listener) || 0;\n this.observers[event].set(listener, numListeners + 1);\n });\n return this;\n }\n off(event, listener) {\n if (!this.observers[event]) return;\n if (!listener) {\n delete this.observers[event];\n return;\n }\n this.observers[event].delete(listener);\n }\n once(event, listener) {\n const wrapper = (...args) => {\n listener(...args);\n this.off(event, wrapper);\n };\n this.on(event, wrapper);\n return this;\n }\n emit(event, ...args) {\n if (this.observers[event]) {\n const cloned = Array.from(this.observers[event].entries());\n cloned.forEach(([observer, numTimesAdded]) => {\n for (let i = 0; i < numTimesAdded; i++) {\n observer(...args);\n }\n });\n }\n if (this.observers['*']) {\n const cloned = Array.from(this.observers['*'].entries());\n cloned.forEach(([observer, numTimesAdded]) => {\n for (let i = 0; i < numTimesAdded; i++) {\n observer(event, ...args);\n }\n });\n }\n }\n}\n\nclass ResourceStore extends EventEmitter {\n constructor(data, options = {\n ns: ['translation'],\n defaultNS: 'translation'\n }) {\n super();\n this.data = data || {};\n this.options = options;\n if (this.options.keySeparator === undefined) {\n this.options.keySeparator = '.';\n }\n if (this.options.ignoreJSONStructure === undefined) {\n this.options.ignoreJSONStructure = true;\n }\n }\n addNamespaces(ns) {\n if (!this.options.ns.includes(ns)) {\n this.options.ns.push(ns);\n }\n }\n removeNamespaces(ns) {\n const index = this.options.ns.indexOf(ns);\n if (index > -1) {\n this.options.ns.splice(index, 1);\n }\n }\n getResource(lng, ns, key, options = {}) {\n const keySeparator = options.keySeparator !== undefined ? options.keySeparator : this.options.keySeparator;\n const ignoreJSONStructure = options.ignoreJSONStructure !== undefined ? options.ignoreJSONStructure : this.options.ignoreJSONStructure;\n let path;\n if (lng.includes('.')) {\n path = lng.split('.');\n } else {\n path = [lng, ns];\n if (key) {\n if (Array.isArray(key)) {\n path.push(...key);\n } else if (isString(key) && keySeparator) {\n path.push(...key.split(keySeparator));\n } else {\n path.push(key);\n }\n }\n }\n const result = getPath(this.data, path);\n if (!result && !ns && !key && lng.includes('.')) {\n lng = path[0];\n ns = path[1];\n key = path.slice(2).join('.');\n }\n if (result || !ignoreJSONStructure || !isString(key)) return result;\n return deepFind(this.data?.[lng]?.[ns], key, keySeparator);\n }\n addResource(lng, ns, key, value, options = {\n silent: false\n }) {\n const keySeparator = options.keySeparator !== undefined ? options.keySeparator : this.options.keySeparator;\n let path = [lng, ns];\n if (key) path = path.concat(keySeparator ? key.split(keySeparator) : key);\n if (lng.includes('.')) {\n path = lng.split('.');\n value = ns;\n ns = path[1];\n }\n this.addNamespaces(ns);\n setPath(this.data, path, value);\n if (!options.silent) this.emit('added', lng, ns, key, value);\n }\n addResources(lng, ns, resources, options = {\n silent: false\n }) {\n for (const m in resources) {\n if (isString(resources[m]) || Array.isArray(resources[m])) this.addResource(lng, ns, m, resources[m], {\n silent: true\n });\n }\n if (!options.silent) this.emit('added', lng, ns, resources);\n }\n addResourceBundle(lng, ns, resources, deep, overwrite, options = {\n silent: false,\n skipCopy: false\n }) {\n let path = [lng, ns];\n if (lng.includes('.')) {\n path = lng.split('.');\n deep = resources;\n resources = ns;\n ns = path[1];\n }\n this.addNamespaces(ns);\n let pack = getPath(this.data, path) || {};\n if (!options.skipCopy) resources = JSON.parse(JSON.stringify(resources));\n if (deep) {\n deepExtend(pack, resources, overwrite);\n } else {\n pack = {\n ...pack,\n ...resources\n };\n }\n setPath(this.data, path, pack);\n if (!options.silent) this.emit('added', lng, ns, resources);\n }\n removeResourceBundle(lng, ns) {\n if (this.hasResourceBundle(lng, ns)) {\n delete this.data[lng][ns];\n }\n this.removeNamespaces(ns);\n this.emit('removed', lng, ns);\n }\n hasResourceBundle(lng, ns) {\n return this.getResource(lng, ns) !== undefined;\n }\n getResourceBundle(lng, ns) {\n if (!ns) ns = this.options.defaultNS;\n return this.getResource(lng, ns);\n }\n getDataByLanguage(lng) {\n return this.data[lng];\n }\n hasLanguageSomeTranslations(lng) {\n const data = this.getDataByLanguage(lng);\n const n = data && Object.keys(data) || [];\n return !!n.find(v => data[v] && Object.keys(data[v]).length > 0);\n }\n toJSON() {\n return this.data;\n }\n}\n\nvar postProcessor = {\n processors: {},\n addPostProcessor(module) {\n this.processors[module.name] = module;\n },\n handle(processors, value, key, options, translator) {\n processors.forEach(processor => {\n value = this.processors[processor]?.process(value, key, options, translator) ?? value;\n });\n return value;\n }\n};\n\nconst PATH_KEY = Symbol('i18next/PATH_KEY');\nfunction createProxy() {\n const state = [];\n const handler = Object.create(null);\n let proxy;\n handler.get = (target, key) => {\n proxy?.revoke?.();\n if (key === PATH_KEY) return state;\n state.push(key);\n proxy = Proxy.revocable(target, handler);\n return proxy.proxy;\n };\n return Proxy.revocable(Object.create(null), handler).proxy;\n}\nfunction keysFromSelector(selector, opts) {\n const {\n [PATH_KEY]: path\n } = selector(createProxy());\n const keySeparator = opts?.keySeparator ?? '.';\n const nsSeparator = opts?.nsSeparator ?? ':';\n const strict = opts?.enableSelector === 'strict';\n if (path.length > 1 && nsSeparator) {\n const ns = opts?.ns;\n const nsList = strict ? Array.isArray(ns) ? ns : ns ? [ns] : null : Array.isArray(ns) ? ns : null;\n if (nsList) {\n const candidates = strict ? nsList : nsList.length > 1 ? nsList.slice(1) : [];\n if (candidates.includes(path[0])) {\n return `${path[0]}${nsSeparator}${path.slice(1).join(keySeparator)}`;\n }\n }\n }\n return path.join(keySeparator);\n}\n\nconst shouldHandleAsObject = res => !isString(res) && typeof res !== 'boolean' && typeof res !== 'number';\nclass Translator extends EventEmitter {\n constructor(services, options = {}) {\n super();\n copy(['resourceStore', 'languageUtils', 'pluralResolver', 'interpolator', 'backendConnector', 'i18nFormat', 'utils'], services, this);\n this.options = options;\n if (this.options.keySeparator === undefined) {\n this.options.keySeparator = '.';\n }\n this.logger = baseLogger.create('translator');\n this.checkedLoadedFor = {};\n }\n changeLanguage(lng) {\n if (lng) this.language = lng;\n }\n exists(key, o = {\n interpolation: {}\n }) {\n const opt = {\n ...o\n };\n if (key == null) return false;\n const resolved = this.resolve(key, opt);\n if (resolved?.res === undefined) return false;\n const isObject = shouldHandleAsObject(resolved.res);\n if (opt.returnObjects === false && isObject) {\n return false;\n }\n return true;\n }\n extractFromKey(key, opt) {\n let nsSeparator = opt.nsSeparator !== undefined ? opt.nsSeparator : this.options.nsSeparator;\n if (nsSeparator === undefined) nsSeparator = ':';\n const keySeparator = opt.keySeparator !== undefined ? opt.keySeparator : this.options.keySeparator;\n let namespaces = opt.ns || this.options.defaultNS || [];\n const wouldCheckForNsInKey = nsSeparator && key.includes(nsSeparator);\n const seemsNaturalLanguage = !this.options.userDefinedKeySeparator && !opt.keySeparator && !this.options.userDefinedNsSeparator && !opt.nsSeparator && !looksLikeObjectPath(key, nsSeparator, keySeparator);\n if (wouldCheckForNsInKey && !seemsNaturalLanguage) {\n const m = key.match(this.interpolator.nestingRegexp);\n if (m && m.length > 0) {\n return {\n key,\n namespaces: isString(namespaces) ? [namespaces] : namespaces\n };\n }\n const parts = key.split(nsSeparator);\n if (nsSeparator !== keySeparator || nsSeparator === keySeparator && this.options.ns.includes(parts[0])) namespaces = parts.shift();\n key = parts.join(keySeparator);\n }\n return {\n key,\n namespaces: isString(namespaces) ? [namespaces] : namespaces\n };\n }\n translate(keys, o, lastKey) {\n let opt = typeof o === 'object' ? {\n ...o\n } : o;\n if (typeof opt !== 'object' && this.options.overloadTranslationOptionHandler) {\n opt = this.options.overloadTranslationOptionHandler(arguments);\n }\n if (typeof opt === 'object') opt = {\n ...opt\n };\n if (!opt) opt = {};\n if (keys == null) return '';\n if (typeof keys === 'function') keys = keysFromSelector(keys, {\n ...this.options,\n ...opt\n });\n if (!Array.isArray(keys)) keys = [String(keys)];\n keys = keys.map(k => typeof k === 'function' ? keysFromSelector(k, {\n ...this.options,\n ...opt\n }) : String(k));\n const returnDetails = opt.returnDetails !== undefined ? opt.returnDetails : this.options.returnDetails;\n const keySeparator = opt.keySeparator !== undefined ? opt.keySeparator : this.options.keySeparator;\n const {\n key,\n namespaces\n } = this.extractFromKey(keys[keys.length - 1], opt);\n const namespace = namespaces[namespaces.length - 1];\n let nsSeparator = opt.nsSeparator !== undefined ? opt.nsSeparator : this.options.nsSeparator;\n if (nsSeparator === undefined) nsSeparator = ':';\n const lng = opt.lng || this.language;\n const appendNamespaceToCIMode = opt.appendNamespaceToCIMode || this.options.appendNamespaceToCIMode;\n if (lng?.toLowerCase() === 'cimode') {\n if (appendNamespaceToCIMode) {\n if (returnDetails) {\n return {\n res: `${namespace}${nsSeparator}${key}`,\n usedKey: key,\n exactUsedKey: key,\n usedLng: lng,\n usedNS: namespace,\n usedParams: this.getUsedParamsDetails(opt)\n };\n }\n return `${namespace}${nsSeparator}${key}`;\n }\n if (returnDetails) {\n return {\n res: key,\n usedKey: key,\n exactUsedKey: key,\n usedLng: lng,\n usedNS: namespace,\n usedParams: this.getUsedParamsDetails(opt)\n };\n }\n return key;\n }\n const resolved = this.resolve(keys, opt);\n let res = resolved?.res;\n const resUsedKey = resolved?.usedKey || key;\n const resExactUsedKey = resolved?.exactUsedKey || key;\n const noObject = ['[object Number]', '[object Function]', '[object RegExp]'];\n const joinArrays = opt.joinArrays !== undefined ? opt.joinArrays : this.options.joinArrays;\n const handleAsObjectInI18nFormat = !this.i18nFormat || this.i18nFormat.handleAsObject;\n const needsPluralHandling = opt.count !== undefined && !isString(opt.count);\n const hasDefaultValue = Translator.hasDefaultValue(opt);\n const defaultValueSuffix = needsPluralHandling ? this.pluralResolver.getSuffix(lng, opt.count, opt) : '';\n const defaultValueSuffixOrdinalFallback = opt.ordinal && needsPluralHandling ? this.pluralResolver.getSuffix(lng, opt.count, {\n ordinal: false\n }) : '';\n const needsZeroSuffixLookup = needsPluralHandling && !opt.ordinal && opt.count === 0;\n const defaultValue = needsZeroSuffixLookup && opt[`defaultValue${this.options.pluralSeparator}zero`] || opt[`defaultValue${defaultValueSuffix}`] || opt[`defaultValue${defaultValueSuffixOrdinalFallback}`] || opt.defaultValue;\n let resForObjHndl = res;\n if (handleAsObjectInI18nFormat && !res && hasDefaultValue) {\n resForObjHndl = defaultValue;\n }\n const handleAsObject = shouldHandleAsObject(resForObjHndl);\n const resType = Object.prototype.toString.apply(resForObjHndl);\n if (handleAsObjectInI18nFormat && resForObjHndl && handleAsObject && !noObject.includes(resType) && !(isString(joinArrays) && Array.isArray(resForObjHndl))) {\n if (!opt.returnObjects && !this.options.returnObjects) {\n if (!this.options.returnedObjectHandler) {\n this.logger.warn('accessing an object - but returnObjects options is not enabled!');\n }\n const r = this.options.returnedObjectHandler ? this.options.returnedObjectHandler(resUsedKey, resForObjHndl, {\n ...opt,\n ns: namespaces\n }) : `key '${key} (${this.language})' returned an object instead of string.`;\n if (returnDetails) {\n resolved.res = r;\n resolved.usedParams = this.getUsedParamsDetails(opt);\n return resolved;\n }\n return r;\n }\n if (keySeparator) {\n const resTypeIsArray = Array.isArray(resForObjHndl);\n const copy = resTypeIsArray ? [] : {};\n const newKeyToUse = resTypeIsArray ? resExactUsedKey : resUsedKey;\n for (const m in resForObjHndl) {\n if (Object.prototype.hasOwnProperty.call(resForObjHndl, m)) {\n const deepKey = `${newKeyToUse}${keySeparator}${m}`;\n if (hasDefaultValue && !res) {\n copy[m] = this.translate(deepKey, {\n ...opt,\n defaultValue: shouldHandleAsObject(defaultValue) ? defaultValue[m] : undefined,\n ...{\n joinArrays: false,\n ns: namespaces\n }\n });\n } else {\n copy[m] = this.translate(deepKey, {\n ...opt,\n ...{\n joinArrays: false,\n ns: namespaces\n }\n });\n }\n if (copy[m] === deepKey) copy[m] = resForObjHndl[m];\n }\n }\n res = copy;\n }\n } else if (handleAsObjectInI18nFormat && isString(joinArrays) && Array.isArray(res)) {\n res = res.join(joinArrays);\n if (res) res = this.extendTranslation(res, keys, opt, lastKey);\n } else {\n let usedDefault = false;\n let usedKey = false;\n if (!this.isValidLookup(res) && hasDefaultValue) {\n usedDefault = true;\n res = defaultValue;\n }\n if (!this.isValidLookup(res)) {\n usedKey = true;\n res = key;\n }\n const missingKeyNoValueFallbackToKey = opt.missingKeyNoValueFallbackToKey || this.options.missingKeyNoValueFallbackToKey;\n const resForMissing = missingKeyNoValueFallbackToKey && usedKey ? undefined : res;\n const updateMissing = hasDefaultValue && defaultValue !== res && this.options.updateMissing;\n if (usedKey || usedDefault || updateMissing) {\n this.logger.log(updateMissing ? 'updateKey' : 'missingKey', lng, namespace, needsPluralHandling && !updateMissing ? `${key}${this.pluralResolver.getSuffix(lng, opt.count, opt)}` : key, updateMissing ? defaultValue : res);\n if (keySeparator) {\n const fk = this.resolve(key, {\n ...opt,\n keySeparator: false\n });\n if (fk && fk.res) this.logger.warn('Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.');\n }\n let lngs = [];\n const fallbackLngs = this.languageUtils.getFallbackCodes(this.options.fallbackLng, opt.lng || this.language);\n if (this.options.saveMissingTo === 'fallback' && fallbackLngs && fallbackLngs[0]) {\n for (let i = 0; i < fallbackLngs.length; i++) {\n lngs.push(fallbackLngs[i]);\n }\n } else if (this.options.saveMissingTo === 'all') {\n lngs = this.languageUtils.toResolveHierarchy(opt.lng || this.language);\n } else {\n lngs.push(opt.lng || this.language);\n }\n const send = (l, k, specificDefaultValue) => {\n const defaultForMissing = hasDefaultValue && specificDefaultValue !== res ? specificDefaultValue : resForMissing;\n if (this.options.missingKeyHandler) {\n this.options.missingKeyHandler(l, namespace, k, defaultForMissing, updateMissing, opt);\n } else if (this.backendConnector?.saveMissing) {\n this.backendConnector.saveMissing(l, namespace, k, defaultForMissing, updateMissing, opt);\n }\n this.emit('missingKey', l, namespace, k, res);\n };\n if (this.options.saveMissing) {\n if (this.options.saveMissingPlurals && needsPluralHandling) {\n lngs.forEach(language => {\n const suffixes = this.pluralResolver.getSuffixes(language, opt);\n if (needsZeroSuffixLookup && opt[`defaultValue${this.options.pluralSeparator}zero`] && !suffixes.includes(`${this.options.pluralSeparator}zero`)) {\n suffixes.push(`${this.options.pluralSeparator}zero`);\n }\n suffixes.forEach(suffix => {\n send([language], key + suffix, opt[`defaultValue${suffix}`] || defaultValue);\n });\n });\n } else {\n send(lngs, key, defaultValue);\n }\n }\n }\n res = this.extendTranslation(res, keys, opt, resolved, lastKey);\n if (usedKey && res === key && this.options.appendNamespaceToMissingKey) {\n res = `${namespace}${nsSeparator}${key}`;\n }\n if ((usedKey || usedDefault) && this.options.parseMissingKeyHandler) {\n res = this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey ? `${namespace}${nsSeparator}${key}` : key, usedDefault ? res : undefined, opt);\n }\n }\n if (returnDetails) {\n resolved.res = res;\n resolved.usedParams = this.getUsedParamsDetails(opt);\n return resolved;\n }\n return res;\n }\n extendTranslation(res, key, opt, resolved, lastKey) {\n if (this.i18nFormat?.parse) {\n res = this.i18nFormat.parse(res, {\n ...this.options.interpolation.defaultVariables,\n ...opt\n }, opt.lng || this.language || resolved.usedLng, resolved.usedNS, resolved.usedKey, {\n resolved\n });\n } else if (!opt.skipInterpolation) {\n if (opt.interpolation) this.interpolator.init({\n ...opt,\n ...{\n interpolation: {\n ...this.options.interpolation,\n ...opt.interpolation\n }\n }\n });\n const skipOnVariables = isString(res) && (opt?.interpolation?.skipOnVariables !== undefined ? opt.interpolation.skipOnVariables : this.options.interpolation.skipOnVariables);\n let nestBef;\n if (skipOnVariables) {\n const nb = res.match(this.interpolator.nestingRegexp);\n nestBef = nb && nb.length;\n }\n let data = opt.replace && !isString(opt.replace) ? opt.replace : opt;\n if (this.options.interpolation.defaultVariables) data = {\n ...this.options.interpolation.defaultVariables,\n ...data\n };\n res = this.interpolator.interpolate(res, data, opt.lng || this.language || resolved.usedLng, opt);\n if (skipOnVariables) {\n const na = res.match(this.interpolator.nestingRegexp);\n const nestAft = na && na.length;\n if (nestBef < nestAft) opt.nest = false;\n }\n if (!opt.lng && resolved && resolved.res) opt.lng = this.language || resolved.usedLng;\n if (opt.nest !== false) res = this.interpolator.nest(res, (...args) => {\n if (lastKey?.[0] === args[0] && !opt.context) {\n this.logger.warn(`It seems you are nesting recursively key: ${args[0]} in key: ${key[0]}`);\n return null;\n }\n return this.translate(...args, key);\n }, opt);\n if (opt.interpolation) this.interpolator.reset();\n }\n const postProcess = opt.postProcess || this.options.postProcess;\n const postProcessorNames = isString(postProcess) ? [postProcess] : postProcess;\n if (res != null && postProcessorNames?.length && opt.applyPostProcessor !== false) {\n res = postProcessor.handle(postProcessorNames, res, key, this.options && this.options.postProcessPassResolved ? {\n i18nResolved: {\n ...resolved,\n usedParams: this.getUsedParamsDetails(opt)\n },\n ...opt\n } : opt, this);\n }\n return res;\n }\n resolve(keys, opt = {}) {\n let found;\n let usedKey;\n let exactUsedKey;\n let usedLng;\n let usedNS;\n if (isString(keys)) keys = [keys];\n if (Array.isArray(keys)) keys = keys.map(k => typeof k === 'function' ? keysFromSelector(k, {\n ...this.options,\n ...opt\n }) : k);\n keys.forEach(k => {\n if (this.isValidLookup(found)) return;\n const extracted = this.extractFromKey(k, opt);\n const key = extracted.key;\n usedKey = key;\n let namespaces = extracted.namespaces;\n if (this.options.fallbackNS) namespaces = namespaces.concat(this.options.fallbackNS);\n const needsPluralHandling = opt.count !== undefined && !isString(opt.count);\n const needsZeroSuffixLookup = needsPluralHandling && !opt.ordinal && opt.count === 0;\n const needsContextHandling = opt.context !== undefined && (isString(opt.context) || typeof opt.context === 'number') && opt.context !== '';\n const codes = opt.lngs ? opt.lngs : this.languageUtils.toResolveHierarchy(opt.lng || this.language, opt.fallbackLng);\n namespaces.forEach(ns => {\n if (this.isValidLookup(found)) return;\n usedNS = ns;\n if (!this.checkedLoadedFor[`${codes[0]}-${ns}`] && this.utils?.hasLoadedNamespace && !this.utils?.hasLoadedNamespace(usedNS)) {\n this.checkedLoadedFor[`${codes[0]}-${ns}`] = true;\n this.logger.warn(`key \"${usedKey}\" for languages \"${codes.join(', ')}\" won't get resolved as namespace \"${usedNS}\" was not yet loaded`, 'This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!');\n }\n codes.forEach(code => {\n if (this.isValidLookup(found)) return;\n usedLng = code;\n const finalKeys = [key];\n if (this.i18nFormat?.addLookupKeys) {\n this.i18nFormat.addLookupKeys(finalKeys, key, code, ns, opt);\n } else {\n let pluralSuffix;\n if (needsPluralHandling) pluralSuffix = this.pluralResolver.getSuffix(code, opt.count, opt);\n const zeroSuffix = `${this.options.pluralSeparator}zero`;\n const ordinalPrefix = `${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;\n if (needsPluralHandling) {\n if (opt.ordinal && pluralSuffix.startsWith(ordinalPrefix)) {\n finalKeys.push(key + pluralSuffix.replace(ordinalPrefix, this.options.pluralSeparator));\n }\n finalKeys.push(key + pluralSuffix);\n if (needsZeroSuffixLookup) {\n finalKeys.push(key + zeroSuffix);\n }\n }\n if (needsContextHandling) {\n const contextKey = `${key}${this.options.contextSeparator || '_'}${opt.context}`;\n finalKeys.push(contextKey);\n if (needsPluralHandling) {\n if (opt.ordinal && pluralSuffix.startsWith(ordinalPrefix)) {\n finalKeys.push(contextKey + pluralSuffix.replace(ordinalPrefix, this.options.pluralSeparator));\n }\n finalKeys.push(contextKey + pluralSuffix);\n if (needsZeroSuffixLookup) {\n finalKeys.push(contextKey + zeroSuffix);\n }\n }\n }\n }\n let possibleKey;\n while (possibleKey = finalKeys.pop()) {\n if (!this.isValidLookup(found)) {\n exactUsedKey = possibleKey;\n found = this.getResource(code, ns, possibleKey, opt);\n }\n }\n });\n });\n });\n return {\n res: found,\n usedKey,\n exactUsedKey,\n usedLng,\n usedNS\n };\n }\n isValidLookup(res) {\n return res !== undefined && !(!this.options.returnNull && res === null) && !(!this.options.returnEmptyString && res === '');\n }\n getResource(code, ns, key, options = {}) {\n if (this.i18nFormat?.getResource) return this.i18nFormat.getResource(code, ns, key, options);\n return this.resourceStore.getResource(code, ns, key, options);\n }\n getUsedParamsDetails(options = {}) {\n const optionsKeys = ['defaultValue', 'ordinal', 'context', 'replace', 'lng', 'lngs', 'fallbackLng', 'ns', 'keySeparator', 'nsSeparator', 'returnObjects', 'returnDetails', 'joinArrays', 'postProcess', 'interpolation'];\n const useOptionsReplaceForData = options.replace && !isString(options.replace);\n let data = useOptionsReplaceForData ? options.replace : options;\n if (useOptionsReplaceForData && typeof options.count !== 'undefined') {\n data = {\n ...data,\n count: options.count\n };\n }\n if (this.options.interpolation.defaultVariables) {\n data = {\n ...this.options.interpolation.defaultVariables,\n ...data\n };\n }\n if (!useOptionsReplaceForData) {\n data = {\n ...data\n };\n for (const key of optionsKeys) {\n delete data[key];\n }\n }\n return data;\n }\n static hasDefaultValue(options) {\n const prefix = 'defaultValue';\n for (const option in options) {\n if (Object.prototype.hasOwnProperty.call(options, option) && option.startsWith(prefix) && undefined !== options[option]) {\n return true;\n }\n }\n return false;\n }\n}\n\nclass LanguageUtil {\n constructor(options) {\n this.options = options;\n this.supportedLngs = this.options.supportedLngs || false;\n this.logger = baseLogger.create('languageUtils');\n }\n getScriptPartFromCode(code) {\n code = getCleanedCode(code);\n if (!code || !code.includes('-')) return null;\n const p = code.split('-');\n if (p.length === 2) return null;\n p.pop();\n if (p[p.length - 1].toLowerCase() === 'x') return null;\n return this.formatLanguageCode(p.join('-'));\n }\n getLanguagePartFromCode(code) {\n code = getCleanedCode(code);\n if (!code || !code.includes('-')) return code;\n const p = code.split('-');\n return this.formatLanguageCode(p[0]);\n }\n formatLanguageCode(code) {\n if (isString(code) && code.includes('-')) {\n let formattedCode;\n try {\n formattedCode = Intl.getCanonicalLocales(code)[0];\n } catch (e) {}\n if (formattedCode && this.options.lowerCaseLng) {\n formattedCode = formattedCode.toLowerCase();\n }\n if (formattedCode) return formattedCode;\n if (this.options.lowerCaseLng) {\n return code.toLowerCase();\n }\n return code;\n }\n return this.options.cleanCode || this.options.lowerCaseLng ? code.toLowerCase() : code;\n }\n isSupportedCode(code) {\n if (this.options.load === 'languageOnly' || this.options.nonExplicitSupportedLngs) {\n code = this.getLanguagePartFromCode(code);\n }\n return !this.supportedLngs || !this.supportedLngs.length || this.supportedLngs.includes(code);\n }\n getBestMatchFromCodes(codes) {\n if (!codes) return null;\n let found;\n codes.forEach(code => {\n if (found) return;\n const cleanedLng = this.formatLanguageCode(code);\n if (!this.options.supportedLngs || this.isSupportedCode(cleanedLng)) found = cleanedLng;\n });\n if (!found && this.options.supportedLngs) {\n codes.forEach(code => {\n if (found) return;\n const lngScOnly = this.getScriptPartFromCode(code);\n if (this.isSupportedCode(lngScOnly)) return found = lngScOnly;\n const lngOnly = this.getLanguagePartFromCode(code);\n if (this.isSupportedCode(lngOnly)) return found = lngOnly;\n found = this.options.supportedLngs.find(supportedLng => {\n if (supportedLng === lngOnly) return true;\n if (!supportedLng.includes('-') && !lngOnly.includes('-')) return false;\n if (supportedLng.includes('-') && !lngOnly.includes('-') && supportedLng.slice(0, supportedLng.indexOf('-')) === lngOnly) return true;\n if (supportedLng.startsWith(lngOnly) && lngOnly.length > 1) return true;\n return false;\n });\n });\n }\n if (!found) found = this.getFallbackCodes(this.options.fallbackLng)[0];\n return found;\n }\n getFallbackCodes(fallbacks, code) {\n if (!fallbacks) return [];\n if (typeof fallbacks === 'function') fallbacks = fallbacks(code);\n if (isString(fallbacks)) fallbacks = [fallbacks];\n if (Array.isArray(fallbacks)) return fallbacks;\n if (!code) return fallbacks.default || [];\n let found = fallbacks[code];\n if (!found) found = fallbacks[this.getScriptPartFromCode(code)];\n if (!found) found = fallbacks[this.formatLanguageCode(code)];\n if (!found) found = fallbacks[this.getLanguagePartFromCode(code)];\n if (!found) found = fallbacks.default;\n return found || [];\n }\n toResolveHierarchy(code, fallbackCode) {\n const fallbackCodes = this.getFallbackCodes((fallbackCode === false ? [] : fallbackCode) || this.options.fallbackLng || [], code);\n const codes = [];\n const addCode = c => {\n if (!c) return;\n if (this.isSupportedCode(c)) {\n codes.push(c);\n } else {\n this.logger.warn(`rejecting language code not found in supportedLngs: ${c}`);\n }\n };\n if (isString(code) && (code.includes('-') || code.includes('_'))) {\n if (this.options.load !== 'languageOnly') addCode(this.formatLanguageCode(code));\n if (this.options.load !== 'languageOnly' && this.options.load !== 'currentOnly') addCode(this.getScriptPartFromCode(code));\n if (this.options.load !== 'currentOnly') addCode(this.getLanguagePartFromCode(code));\n } else if (isString(code)) {\n addCode(this.formatLanguageCode(code));\n }\n fallbackCodes.forEach(fc => {\n if (!codes.includes(fc)) addCode(this.formatLanguageCode(fc));\n });\n return codes;\n }\n}\n\nconst suffixesOrder = {\n zero: 0,\n one: 1,\n two: 2,\n few: 3,\n many: 4,\n other: 5\n};\nconst dummyRule = {\n select: count => count === 1 ? 'one' : 'other',\n resolvedOptions: () => ({\n pluralCategories: ['one', 'other']\n })\n};\nclass PluralResolver {\n constructor(languageUtils, options = {}) {\n this.languageUtils = languageUtils;\n this.options = options;\n this.logger = baseLogger.create('pluralResolver');\n this.pluralRulesCache = {};\n }\n clearCache() {\n this.pluralRulesCache = {};\n }\n getRule(code, options = {}) {\n const cleanedCode = getCleanedCode(code === 'dev' ? 'en' : code);\n const type = options.ordinal ? 'ordinal' : 'cardinal';\n const cacheKey = JSON.stringify({\n cleanedCode,\n type\n });\n if (cacheKey in this.pluralRulesCache) {\n return this.pluralRulesCache[cacheKey];\n }\n let rule;\n try {\n rule = new Intl.PluralRules(cleanedCode, {\n type\n });\n } catch (err) {\n if (typeof Intl === 'undefined') {\n this.logger.error('No Intl support, please use an Intl polyfill!');\n return dummyRule;\n }\n if (!code.match(/-|_/)) return dummyRule;\n const lngPart = this.languageUtils.getLanguagePartFromCode(code);\n rule = this.getRule(lngPart, options);\n }\n this.pluralRulesCache[cacheKey] = rule;\n return rule;\n }\n needsPlural(code, options = {}) {\n let rule = this.getRule(code, options);\n if (!rule) rule = this.getRule('dev', options);\n return rule?.resolvedOptions().pluralCategories.length > 1;\n }\n getPluralFormsOfKey(code, key, options = {}) {\n return this.getSuffixes(code, options).map(suffix => `${key}${suffix}`);\n }\n getSuffixes(code, options = {}) {\n let rule = this.getRule(code, options);\n if (!rule) rule = this.getRule('dev', options);\n if (!rule) return [];\n return rule.resolvedOptions().pluralCategories.sort((pluralCategory1, pluralCategory2) => suffixesOrder[pluralCategory1] - suffixesOrder[pluralCategory2]).map(pluralCategory => `${this.options.prepend}${options.ordinal ? `ordinal${this.options.prepend}` : ''}${pluralCategory}`);\n }\n getSuffix(code, count, options = {}) {\n const rule = this.getRule(code, options);\n if (rule) {\n return `${this.options.prepend}${options.ordinal ? `ordinal${this.options.prepend}` : ''}${rule.select(count)}`;\n }\n this.logger.warn(`no plural rule found for: ${code}`);\n return this.getSuffix('dev', count, options);\n }\n}\n\nconst deepFindWithDefaults = (data, defaultData, key, keySeparator = '.', ignoreJSONStructure = true) => {\n let path = getPathWithDefaults(data, defaultData, key);\n if (!path && ignoreJSONStructure && isString(key)) {\n path = deepFind(data, key, keySeparator);\n if (path === undefined) path = deepFind(defaultData, key, keySeparator);\n }\n return path;\n};\nconst regexSafe = val => val.replace(/\\$/g, '$$$$');\nclass Interpolator {\n constructor(options = {}) {\n this.logger = baseLogger.create('interpolator');\n this.options = options;\n this.format = options?.interpolation?.format || (value => value);\n this.init(options);\n }\n init(options = {}) {\n if (!options.interpolation) options.interpolation = {\n escapeValue: true\n };\n const {\n escape: escape$1,\n escapeValue,\n useRawValueToEscape,\n prefix,\n prefixEscaped,\n suffix,\n suffixEscaped,\n formatSeparator,\n unescapeSuffix,\n unescapePrefix,\n nestingPrefix,\n nestingPrefixEscaped,\n nestingSuffix,\n nestingSuffixEscaped,\n nestingOptionsSeparator,\n maxReplaces,\n alwaysFormat\n } = options.interpolation;\n this.escape = escape$1 !== undefined ? escape$1 : escape;\n this.escapeValue = escapeValue !== undefined ? escapeValue : true;\n this.useRawValueToEscape = useRawValueToEscape !== undefined ? useRawValueToEscape : false;\n this.prefix = prefix ? regexEscape(prefix) : prefixEscaped || '{{';\n this.suffix = suffix ? regexEscape(suffix) : suffixEscaped || '}}';\n this.formatSeparator = formatSeparator || ',';\n this.unescapePrefix = unescapeSuffix ? '' : unescapePrefix ? regexEscape(unescapePrefix) : '-';\n this.unescapeSuffix = this.unescapePrefix ? '' : unescapeSuffix ? regexEscape(unescapeSuffix) : '';\n this.nestingPrefix = nestingPrefix ? regexEscape(nestingPrefix) : nestingPrefixEscaped || regexEscape('$t(');\n this.nestingSuffix = nestingSuffix ? regexEscape(nestingSuffix) : nestingSuffixEscaped || regexEscape(')');\n this.nestingOptionsSeparator = nestingOptionsSeparator || ',';\n this.maxReplaces = maxReplaces || 1000;\n this.alwaysFormat = alwaysFormat !== undefined ? alwaysFormat : false;\n this.resetRegExp();\n }\n reset() {\n if (this.options) this.init(this.options);\n }\n resetRegExp() {\n const getOrResetRegExp = (existingRegExp, pattern) => {\n if (existingRegExp?.source === pattern) {\n existingRegExp.lastIndex = 0;\n return existingRegExp;\n }\n return new RegExp(pattern, 'g');\n };\n this.regexp = getOrResetRegExp(this.regexp, `${this.prefix}(.+?)${this.suffix}`);\n this.regexpUnescape = getOrResetRegExp(this.regexpUnescape, `${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`);\n this.nestingRegexp = getOrResetRegExp(this.nestingRegexp, `${this.nestingPrefix}((?:[^()\"']+|\"[^\"]*\"|'[^']*'|\\\\((?:[^()]|\"[^\"]*\"|'[^']*')*\\\\))*?)${this.nestingSuffix}`);\n }\n interpolate(str, data, lng, options) {\n let match;\n let value;\n let replaces;\n const defaultData = this.options && this.options.interpolation && this.options.interpolation.defaultVariables || {};\n const handleFormat = key => {\n if (!key.includes(this.formatSeparator)) {\n const path = deepFindWithDefaults(data, defaultData, key, this.options.keySeparator, this.options.ignoreJSONStructure);\n return this.alwaysFormat ? this.format(path, undefined, lng, {\n ...options,\n ...data,\n interpolationkey: key\n }) : path;\n }\n const p = key.split(this.formatSeparator);\n const k = p.shift().trim();\n const f = p.join(this.formatSeparator).trim();\n return this.format(deepFindWithDefaults(data, defaultData, k, this.options.keySeparator, this.options.ignoreJSONStructure), f, lng, {\n ...options,\n ...data,\n interpolationkey: k\n });\n };\n this.resetRegExp();\n if (!this.escapeValue && typeof str === 'string' && /\\$t\\([^)]*\\{[^}]*\\{\\{/.test(str)) {\n this.logger.warn('nesting options string contains interpolated variables with escapeValue: false — ' + 'if any of those values are attacker-controlled they can inject additional ' + 'nesting options (e.g. redirect lng/ns). Sanitise untrusted input before passing ' + 'it to t(), or keep escapeValue: true.');\n }\n const missingInterpolationHandler = options?.missingInterpolationHandler || this.options.missingInterpolationHandler;\n const skipOnVariables = options?.interpolation?.skipOnVariables !== undefined ? options.interpolation.skipOnVariables : this.options.interpolation.skipOnVariables;\n const todos = [{\n regex: this.regexpUnescape,\n safeValue: val => val\n }, {\n regex: this.regexp,\n safeValue: val => this.escapeValue ? this.escape(val) : val\n }];\n todos.forEach(todo => {\n replaces = 0;\n while (match = todo.regex.exec(str)) {\n const matchedVar = match[1].trim();\n value = handleFormat(matchedVar);\n if (value === undefined) {\n if (typeof missingInterpolationHandler === 'function') {\n const temp = missingInterpolationHandler(str, match, options);\n value = isString(temp) ? temp : '';\n } else if (options && Object.prototype.hasOwnProperty.call(options, matchedVar)) {\n value = '';\n } else if (skipOnVariables) {\n value = match[0];\n continue;\n } else {\n this.logger.warn(`missed to pass in variable ${matchedVar} for interpolating ${str}`);\n value = '';\n }\n } else if (!isString(value) && !this.useRawValueToEscape) {\n value = makeString(value);\n }\n const safeValue = todo.safeValue(value);\n str = str.replace(match[0], regexSafe(safeValue));\n if (skipOnVariables) {\n todo.regex.lastIndex += safeValue.length;\n todo.regex.lastIndex -= match[0].length;\n } else {\n todo.regex.lastIndex = 0;\n }\n replaces++;\n if (replaces >= this.maxReplaces) {\n break;\n }\n }\n });\n return str;\n }\n nest(str, fc, options = {}) {\n let match;\n let value;\n let clonedOptions;\n const handleHasOptions = (key, inheritedOptions) => {\n const sep = this.nestingOptionsSeparator;\n if (!key.includes(sep)) return key;\n const c = key.split(new RegExp(`${regexEscape(sep)}[ ]*{`));\n let optionsString = `{${c[1]}`;\n key = c[0];\n optionsString = this.interpolate(optionsString, clonedOptions);\n const matchedSingleQuotes = optionsString.match(/'/g);\n const matchedDoubleQuotes = optionsString.match(/\"/g);\n if ((matchedSingleQuotes?.length ?? 0) % 2 === 0 && !matchedDoubleQuotes || (matchedDoubleQuotes?.length ?? 0) % 2 !== 0) {\n optionsString = optionsString.replace(/'/g, '\"');\n }\n try {\n clonedOptions = JSON.parse(optionsString);\n if (inheritedOptions) clonedOptions = {\n ...inheritedOptions,\n ...clonedOptions\n };\n } catch (e) {\n this.logger.warn(`failed parsing options string in nesting for key ${key}`, e);\n return `${key}${sep}${optionsString}`;\n }\n if (clonedOptions.defaultValue && clonedOptions.defaultValue.includes(this.prefix)) delete clonedOptions.defaultValue;\n return key;\n };\n while (match = this.nestingRegexp.exec(str)) {\n let formatters = [];\n clonedOptions = {\n ...options\n };\n clonedOptions = clonedOptions.replace && !isString(clonedOptions.replace) ? clonedOptions.replace : clonedOptions;\n clonedOptions.applyPostProcessor = false;\n delete clonedOptions.defaultValue;\n const keyEndIndex = /{.*}/s.test(match[1]) ? match[1].lastIndexOf('}') + 1 : match[1].indexOf(this.formatSeparator);\n if (keyEndIndex !== -1) {\n formatters = match[1].slice(keyEndIndex).split(this.formatSeparator).map(elem => elem.trim()).filter(Boolean);\n match[1] = match[1].slice(0, keyEndIndex);\n }\n value = fc(handleHasOptions.call(this, match[1].trim(), clonedOptions), clonedOptions);\n if (value && match[0] === str && !isString(value)) return value;\n if (!isString(value)) value = makeString(value);\n if (!value) {\n this.logger.warn(`missed to resolve ${match[1]} for nesting ${str}`);\n value = '';\n }\n if (formatters.length) {\n value = formatters.reduce((v, f) => this.format(v, f, options.lng, {\n ...options,\n interpolationkey: match[1].trim()\n }), value.trim());\n }\n str = str.replace(match[0], value);\n this.regexp.lastIndex = 0;\n }\n return str;\n }\n}\n\nconst parseFormatStr = formatStr => {\n let formatName = formatStr.toLowerCase().trim();\n const formatOptions = {};\n if (formatStr.includes('(')) {\n const p = formatStr.split('(');\n formatName = p[0].toLowerCase().trim();\n const optStr = p[1].slice(0, -1);\n if (formatName === 'currency' && !optStr.includes(':')) {\n if (!formatOptions.currency) formatOptions.currency = optStr.trim();\n } else if (formatName === 'relativetime' && !optStr.includes(':')) {\n if (!formatOptions.range) formatOptions.range = optStr.trim();\n } else {\n const opts = optStr.split(';');\n opts.forEach(opt => {\n if (opt) {\n const [key, ...rest] = opt.split(':');\n const val = rest.join(':').trim().replace(/^'+|'+$/g, '');\n const trimmedKey = key.trim();\n if (!formatOptions[trimmedKey]) formatOptions[trimmedKey] = val;\n if (val === 'false') formatOptions[trimmedKey] = false;\n if (val === 'true') formatOptions[trimmedKey] = true;\n if (!isNaN(val)) formatOptions[trimmedKey] = parseInt(val, 10);\n }\n });\n }\n }\n return {\n formatName,\n formatOptions\n };\n};\nconst createCachedFormatter = fn => {\n const cache = {};\n return (v, l, o) => {\n let optForCache = o;\n if (o && o.interpolationkey && o.formatParams && o.formatParams[o.interpolationkey] && o[o.interpolationkey]) {\n optForCache = {\n ...optForCache,\n [o.interpolationkey]: undefined\n };\n }\n const key = l + JSON.stringify(optForCache);\n let frm = cache[key];\n if (!frm) {\n frm = fn(getCleanedCode(l), o);\n cache[key] = frm;\n }\n return frm(v);\n };\n};\nconst createNonCachedFormatter = fn => (v, l, o) => fn(getCleanedCode(l), o)(v);\nclass Formatter {\n constructor(options = {}) {\n this.logger = baseLogger.create('formatter');\n this.options = options;\n this.init(options);\n }\n init(services, options = {\n interpolation: {}\n }) {\n this.formatSeparator = options.interpolation.formatSeparator || ',';\n const cf = options.cacheInBuiltFormats ? createCachedFormatter : createNonCachedFormatter;\n this.formats = {\n number: cf((lng, opt) => {\n const formatter = new Intl.NumberFormat(lng, {\n ...opt\n });\n return val => formatter.format(val);\n }),\n currency: cf((lng, opt) => {\n const formatter = new Intl.NumberFormat(lng, {\n ...opt,\n style: 'currency'\n });\n return val => formatter.format(val);\n }),\n datetime: cf((lng, opt) => {\n const formatter = new Intl.DateTimeFormat(lng, {\n ...opt\n });\n return val => formatter.format(val);\n }),\n relativetime: cf((lng, opt) => {\n const formatter = new Intl.RelativeTimeFormat(lng, {\n ...opt\n });\n return val => formatter.format(val, opt.range || 'day');\n }),\n list: cf((lng, opt) => {\n const formatter = new Intl.ListFormat(lng, {\n ...opt\n });\n return val => formatter.format(val);\n })\n };\n }\n add(name, fc) {\n this.formats[name.toLowerCase().trim()] = fc;\n }\n addCached(name, fc) {\n this.formats[name.toLowerCase().trim()] = createCachedFormatter(fc);\n }\n format(value, format, lng, options = {}) {\n if (!format) return value;\n if (value == null) return value;\n const rawFormats = format.split(this.formatSeparator);\n const formats = [];\n for (let i = 0; i < rawFormats.length; i++) {\n let f = rawFormats[i];\n while (f.indexOf('(') > -1 && !f.includes(')') && i + 1 < rawFormats.length) {\n f = `${f}${this.formatSeparator}${rawFormats[++i]}`;\n }\n formats.push(f);\n }\n const result = formats.reduce((mem, f) => {\n const {\n formatName,\n formatOptions\n } = parseFormatStr(f);\n if (this.formats[formatName]) {\n let formatted = mem;\n try {\n const valOptions = options?.formatParams?.[options.interpolationkey] || {};\n const l = valOptions.locale || valOptions.lng || options.locale || options.lng || lng;\n formatted = this.formats[formatName](mem, l, {\n ...formatOptions,\n ...options,\n ...valOptions\n });\n } catch (error) {\n this.logger.warn(error);\n }\n return formatted;\n } else {\n this.logger.warn(`there was no format function for ${formatName}`);\n }\n return mem;\n }, value);\n return result;\n }\n}\n\nconst removePending = (q, name) => {\n if (q.pending[name] !== undefined) {\n delete q.pending[name];\n q.pendingCount--;\n }\n};\nclass Connector extends EventEmitter {\n constructor(backend, store, services, options = {}) {\n super();\n this.backend = backend;\n this.store = store;\n this.services = services;\n this.languageUtils = services.languageUtils;\n this.options = options;\n this.logger = baseLogger.create('backendConnector');\n this.waitingReads = [];\n this.maxParallelReads = options.maxParallelReads || 10;\n this.readingCalls = 0;\n this.maxRetries = options.maxRetries >= 0 ? options.maxRetries : 5;\n this.retryTimeout = options.retryTimeout >= 1 ? options.retryTimeout : 350;\n this.state = {};\n this.queue = [];\n this.backend?.init?.(services, options.backend, options);\n }\n queueLoad(languages, namespaces, options, callback) {\n const toLoad = {};\n const pending = {};\n const toLoadLanguages = {};\n const toLoadNamespaces = {};\n languages.forEach(lng => {\n let hasAllNamespaces = true;\n namespaces.forEach(ns => {\n const name = `${lng}|${ns}`;\n if (!options.reload && this.store.hasResourceBundle(lng, ns)) {\n this.state[name] = 2;\n } else if (this.state[name] < 0) ; else if (this.state[name] === 1) {\n if (pending[name] === undefined) pending[name] = true;\n } else {\n this.state[name] = 1;\n hasAllNamespaces = false;\n if (pending[name] === undefined) pending[name] = true;\n if (toLoad[name] === undefined) toLoad[name] = true;\n if (toLoadNamespaces[ns] === undefined) toLoadNamespaces[ns] = true;\n }\n });\n if (!hasAllNamespaces) toLoadLanguages[lng] = true;\n });\n if (Object.keys(toLoad).length || Object.keys(pending).length) {\n this.queue.push({\n pending,\n pendingCount: Object.keys(pending).length,\n loaded: {},\n errors: [],\n callback\n });\n }\n return {\n toLoad: Object.keys(toLoad),\n pending: Object.keys(pending),\n toLoadLanguages: Object.keys(toLoadLanguages),\n toLoadNamespaces: Object.keys(toLoadNamespaces)\n };\n }\n loaded(name, err, data) {\n const s = name.split('|');\n const lng = s[0];\n const ns = s[1];\n if (err) this.emit('failedLoading', lng, ns, err);\n if (!err && data) {\n this.store.addResourceBundle(lng, ns, data, undefined, undefined, {\n skipCopy: true\n });\n }\n this.state[name] = err ? -1 : 2;\n if (err && data) this.state[name] = 0;\n const loaded = {};\n this.queue.forEach(q => {\n pushPath(q.loaded, [lng], ns);\n removePending(q, name);\n if (err) q.errors.push(err);\n if (q.pendingCount === 0 && !q.done) {\n Object.keys(q.loaded).forEach(l => {\n if (!loaded[l]) loaded[l] = {};\n const loadedKeys = q.loaded[l];\n if (loadedKeys.length) {\n loadedKeys.forEach(n => {\n if (loaded[l][n] === undefined) loaded[l][n] = true;\n });\n }\n });\n q.done = true;\n if (q.errors.length) {\n q.callback(q.errors);\n } else {\n q.callback();\n }\n }\n });\n this.emit('loaded', loaded);\n this.queue = this.queue.filter(q => !q.done);\n }\n read(lng, ns, fcName, tried = 0, wait = this.retryTimeout, callback) {\n if (!lng.length) return callback(null, {});\n if (this.readingCalls >= this.maxParallelReads) {\n this.waitingReads.push({\n lng,\n ns,\n fcName,\n tried,\n wait,\n callback\n });\n return;\n }\n this.readingCalls++;\n const resolver = (err, data) => {\n this.readingCalls--;\n if (this.waitingReads.length > 0) {\n const next = this.waitingReads.shift();\n this.read(next.lng, next.ns, next.fcName, next.tried, next.wait, next.callback);\n }\n if (err && data && tried < this.maxRetries) {\n setTimeout(() => {\n this.read(lng, ns, fcName, tried + 1, wait * 2, callback);\n }, wait);\n return;\n }\n callback(err, data);\n };\n const fc = this.backend[fcName].bind(this.backend);\n if (fc.length === 2) {\n try {\n const r = fc(lng, ns);\n if (r && typeof r.then === 'function') {\n r.then(data => resolver(null, data)).catch(resolver);\n } else {\n resolver(null, r);\n }\n } catch (err) {\n resolver(err);\n }\n return;\n }\n return fc(lng, ns, resolver);\n }\n prepareLoading(languages, namespaces, options = {}, callback) {\n if (!this.backend) {\n this.logger.warn('No backend was added via i18next.use. Will not load resources.');\n return callback && callback();\n }\n if (isString(languages)) languages = this.languageUtils.toResolveHierarchy(languages);\n if (isString(namespaces)) namespaces = [namespaces];\n const toLoad = this.queueLoad(languages, namespaces, options, callback);\n if (!toLoad.toLoad.length) {\n if (!toLoad.pending.length) callback();\n return null;\n }\n toLoad.toLoad.forEach(name => {\n this.loadOne(name);\n });\n }\n load(languages, namespaces, callback) {\n this.prepareLoading(languages, namespaces, {}, callback);\n }\n reload(languages, namespaces, callback) {\n this.prepareLoading(languages, namespaces, {\n reload: true\n }, callback);\n }\n loadOne(name, prefix = '') {\n const s = name.split('|');\n const lng = s[0];\n const ns = s[1];\n this.read(lng, ns, 'read', undefined, undefined, (err, data) => {\n if (err) this.logger.warn(`${prefix}loading namespace ${ns} for language ${lng} failed`, err);\n if (!err && data) this.logger.log(`${prefix}loaded namespace ${ns} for language ${lng}`, data);\n this.loaded(name, err, data);\n });\n }\n saveMissing(languages, namespace, key, fallbackValue, isUpdate, options = {}, clb = () => {}) {\n if (this.services?.utils?.hasLoadedNamespace && !this.services?.utils?.hasLoadedNamespace(namespace)) {\n this.logger.warn(`did not save key \"${key}\" as the namespace \"${namespace}\" was not yet loaded`, 'This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!');\n return;\n }\n if (key === undefined || key === null || key === '') return;\n if (this.backend?.create) {\n const opts = {\n ...options,\n isUpdate\n };\n const fc = this.backend.create.bind(this.backend);\n if (fc.length < 6) {\n try {\n let r;\n if (fc.length === 5) {\n r = fc(languages, namespace, key, fallbackValue, opts);\n } else {\n r = fc(languages, namespace, key, fallbackValue);\n }\n if (r && typeof r.then === 'function') {\n r.then(data => clb(null, data)).catch(clb);\n } else {\n clb(null, r);\n }\n } catch (err) {\n clb(err);\n }\n } else {\n fc(languages, namespace, key, fallbackValue, clb, opts);\n }\n }\n if (!languages || !languages[0]) return;\n this.store.addResource(languages[0], namespace, key, fallbackValue);\n }\n}\n\nconst get = () => ({\n debug: false,\n initAsync: true,\n ns: ['translation'],\n defaultNS: ['translation'],\n fallbackLng: ['dev'],\n fallbackNS: false,\n supportedLngs: false,\n nonExplicitSupportedLngs: false,\n load: 'all',\n preload: false,\n keySeparator: '.',\n nsSeparator: ':',\n pluralSeparator: '_',\n contextSeparator: '_',\n enableSelector: false,\n partialBundledLanguages: false,\n saveMissing: false,\n updateMissing: false,\n saveMissingTo: 'fallback',\n saveMissingPlurals: true,\n missingKeyHandler: false,\n missingInterpolationHandler: false,\n postProcess: false,\n postProcessPassResolved: false,\n returnNull: false,\n returnEmptyString: true,\n returnObjects: false,\n joinArrays: false,\n returnedObjectHandler: false,\n parseMissingKeyHandler: false,\n appendNamespaceToMissingKey: false,\n appendNamespaceToCIMode: false,\n overloadTranslationOptionHandler: args => {\n let ret = {};\n if (typeof args[1] === 'object') ret = args[1];\n if (isString(args[1])) ret.defaultValue = args[1];\n if (isString(args[2])) ret.tDescription = args[2];\n if (typeof args[2] === 'object' || typeof args[3] === 'object') {\n const options = args[3] || args[2];\n Object.keys(options).forEach(key => {\n ret[key] = options[key];\n });\n }\n return ret;\n },\n interpolation: {\n escapeValue: true,\n prefix: '{{',\n suffix: '}}',\n formatSeparator: ',',\n unescapePrefix: '-',\n nestingPrefix: '$t(',\n nestingSuffix: ')',\n nestingOptionsSeparator: ',',\n maxReplaces: 1000,\n skipOnVariables: true\n },\n cacheInBuiltFormats: true\n});\nconst transformOptions = options => {\n if (isString(options.ns)) options.ns = [options.ns];\n if (isString(options.fallbackLng)) options.fallbackLng = [options.fallbackLng];\n if (isString(options.fallbackNS)) options.fallbackNS = [options.fallbackNS];\n if (options.supportedLngs && !options.supportedLngs.includes('cimode')) {\n options.supportedLngs = options.supportedLngs.concat(['cimode']);\n }\n return options;\n};\n\nconst noop = () => {};\nconst bindMemberFunctions = inst => {\n const mems = Object.getOwnPropertyNames(Object.getPrototypeOf(inst));\n mems.forEach(mem => {\n if (typeof inst[mem] === 'function') {\n inst[mem] = inst[mem].bind(inst);\n }\n });\n};\nclass I18n extends EventEmitter {\n constructor(options = {}, callback) {\n super();\n this.options = transformOptions(options);\n this.services = {};\n this.logger = baseLogger;\n this.modules = {\n external: []\n };\n bindMemberFunctions(this);\n if (callback && !this.isInitialized && !options.isClone) {\n if (!this.options.initAsync) {\n this.init(options, callback);\n return this;\n }\n setTimeout(() => {\n this.init(options, callback);\n }, 0);\n }\n }\n init(options = {}, callback) {\n this.isInitializing = true;\n if (typeof options === 'function') {\n callback = options;\n options = {};\n }\n if (options.defaultNS == null && options.ns) {\n if (isString(options.ns)) {\n options.defaultNS = options.ns;\n } else if (!options.ns.includes('translation')) {\n options.defaultNS = options.ns[0];\n }\n }\n const defOpts = get();\n this.options = {\n ...defOpts,\n ...this.options,\n ...transformOptions(options)\n };\n this.options.interpolation = {\n ...defOpts.interpolation,\n ...this.options.interpolation\n };\n if (options.keySeparator !== undefined) {\n this.options.userDefinedKeySeparator = options.keySeparator;\n }\n if (options.nsSeparator !== undefined) {\n this.options.userDefinedNsSeparator = options.nsSeparator;\n }\n if (typeof this.options.overloadTranslationOptionHandler !== 'function') {\n this.options.overloadTranslationOptionHandler = defOpts.overloadTranslationOptionHandler;\n }\n const createClassOnDemand = ClassOrObject => {\n if (!ClassOrObject) return null;\n if (typeof ClassOrObject === 'function') return new ClassOrObject();\n return ClassOrObject;\n };\n if (!this.options.isClone) {\n if (this.modules.logger) {\n baseLogger.init(createClassOnDemand(this.modules.logger), this.options);\n } else {\n baseLogger.init(null, this.options);\n }\n let formatter;\n if (this.modules.formatter) {\n formatter = this.modules.formatter;\n } else {\n formatter = Formatter;\n }\n const lu = new LanguageUtil(this.options);\n this.store = new ResourceStore(this.options.resources, this.options);\n const s = this.services;\n s.logger = baseLogger;\n s.resourceStore = this.store;\n s.languageUtils = lu;\n s.pluralResolver = new PluralResolver(lu, {\n prepend: this.options.pluralSeparator\n });\n if (formatter) {\n s.formatter = createClassOnDemand(formatter);\n if (s.formatter.init) s.formatter.init(s, this.options);\n this.options.interpolation.format = s.formatter.format.bind(s.formatter);\n }\n s.interpolator = new Interpolator(this.options);\n s.utils = {\n hasLoadedNamespace: this.hasLoadedNamespace.bind(this)\n };\n s.backendConnector = new Connector(createClassOnDemand(this.modules.backend), s.resourceStore, s, this.options);\n s.backendConnector.on('*', (event, ...args) => {\n this.emit(event, ...args);\n });\n if (this.modules.languageDetector) {\n s.languageDetector = createClassOnDemand(this.modules.languageDetector);\n if (s.languageDetector.init) s.languageDetector.init(s, this.options.detection, this.options);\n }\n if (this.modules.i18nFormat) {\n s.i18nFormat = createClassOnDemand(this.modules.i18nFormat);\n if (s.i18nFormat.init) s.i18nFormat.init(this);\n }\n this.translator = new Translator(this.services, this.options);\n this.translator.on('*', (event, ...args) => {\n this.emit(event, ...args);\n });\n this.modules.external.forEach(m => {\n if (m.init) m.init(this);\n });\n }\n this.format = this.options.interpolation.format;\n if (!callback) callback = noop;\n if (this.options.fallbackLng && !this.services.languageDetector && !this.options.lng) {\n const codes = this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);\n if (codes.length > 0 && codes[0] !== 'dev') this.options.lng = codes[0];\n }\n if (!this.services.languageDetector && !this.options.lng) {\n this.logger.warn('init: no languageDetector is used and no lng is defined');\n }\n const storeApi = ['getResource', 'hasResourceBundle', 'getResourceBundle', 'getDataByLanguage'];\n storeApi.forEach(fcName => {\n this[fcName] = (...args) => this.store[fcName](...args);\n });\n const storeApiChained = ['addResource', 'addResources', 'addResourceBundle', 'removeResourceBundle'];\n storeApiChained.forEach(fcName => {\n this[fcName] = (...args) => {\n this.store[fcName](...args);\n return this;\n };\n });\n const deferred = defer();\n const load = () => {\n const finish = (err, t) => {\n this.isInitializing = false;\n if (this.isInitialized && !this.initializedStoreOnce) this.logger.warn('init: i18next is already initialized. You should call init just once!');\n this.isInitialized = true;\n if (!this.options.isClone) this.logger.log('initialized', this.options);\n this.emit('initialized', this.options);\n deferred.resolve(t);\n callback(err, t);\n };\n if ((this.languages || this.isLanguageChangingTo) && !this.isInitialized) return finish(null, this.t.bind(this));\n this.changeLanguage(this.options.lng, finish);\n };\n if (this.options.resources || !this.options.initAsync) {\n load();\n } else {\n setTimeout(load, 0);\n }\n return deferred;\n }\n loadResources(language, callback = noop) {\n let usedCallback = callback;\n const usedLng = isString(language) ? language : this.language;\n if (typeof language === 'function') usedCallback = language;\n if (!this.options.resources || this.options.partialBundledLanguages) {\n if (usedLng?.toLowerCase() === 'cimode' && (!this.options.preload || this.options.preload.length === 0)) return usedCallback();\n const toLoad = [];\n const append = lng => {\n if (!lng) return;\n if (lng === 'cimode') return;\n const lngs = this.services.languageUtils.toResolveHierarchy(lng);\n lngs.forEach(l => {\n if (l === 'cimode') return;\n if (!toLoad.includes(l)) toLoad.push(l);\n });\n };\n if (!usedLng) {\n const fallbacks = this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);\n fallbacks.forEach(l => append(l));\n } else {\n append(usedLng);\n }\n this.options.preload?.forEach?.(l => append(l));\n this.services.backendConnector.load(toLoad, this.options.ns, e => {\n if (!e && !this.resolvedLanguage && this.language) this.setResolvedLanguage(this.language);\n usedCallback(e);\n });\n } else {\n usedCallback(null);\n }\n }\n reloadResources(lngs, ns, callback) {\n const deferred = defer();\n if (typeof lngs === 'function') {\n callback = lngs;\n lngs = undefined;\n }\n if (typeof ns === 'function') {\n callback = ns;\n ns = undefined;\n }\n if (!lngs) lngs = this.languages;\n if (!ns) ns = this.options.ns;\n if (!callback) callback = noop;\n this.services.backendConnector.reload(lngs, ns, err => {\n deferred.resolve();\n callback(err);\n });\n return deferred;\n }\n use(module) {\n if (!module) throw new Error('You are passing an undefined module! Please check the object you are passing to i18next.use()');\n if (!module.type) throw new Error('You are passing a wrong module! Please check the object you are passing to i18next.use()');\n if (module.type === 'backend') {\n this.modules.backend = module;\n }\n if (module.type === 'logger' || module.log && module.warn && module.error) {\n this.modules.logger = module;\n }\n if (module.type === 'languageDetector') {\n this.modules.languageDetector = module;\n }\n if (module.type === 'i18nFormat') {\n this.modules.i18nFormat = module;\n }\n if (module.type === 'postProcessor') {\n postProcessor.addPostProcessor(module);\n }\n if (module.type === 'formatter') {\n this.modules.formatter = module;\n }\n if (module.type === '3rdParty') {\n this.modules.external.push(module);\n }\n return this;\n }\n setResolvedLanguage(l) {\n if (!l || !this.languages) return;\n if (['cimode', 'dev'].includes(l)) return;\n for (let li = 0; li < this.languages.length; li++) {\n const lngInLngs = this.languages[li];\n if (['cimode', 'dev'].includes(lngInLngs)) continue;\n if (this.store.hasLanguageSomeTranslations(lngInLngs)) {\n this.resolvedLanguage = lngInLngs;\n break;\n }\n }\n if (!this.resolvedLanguage && !this.languages.includes(l) && this.store.hasLanguageSomeTranslations(l)) {\n this.resolvedLanguage = l;\n this.languages.unshift(l);\n }\n }\n changeLanguage(lng, callback) {\n this.isLanguageChangingTo = lng;\n const deferred = defer();\n this.emit('languageChanging', lng);\n const setLngProps = l => {\n this.language = l;\n this.languages = this.services.languageUtils.toResolveHierarchy(l);\n this.resolvedLanguage = undefined;\n this.setResolvedLanguage(l);\n };\n const done = (err, l) => {\n if (l) {\n if (this.isLanguageChangingTo === lng) {\n setLngProps(l);\n this.translator.changeLanguage(l);\n this.isLanguageChangingTo = undefined;\n this.emit('languageChanged', l);\n this.logger.log('languageChanged', l);\n }\n } else {\n this.isLanguageChangingTo = undefined;\n }\n deferred.resolve((...args) => this.t(...args));\n if (callback) callback(err, (...args) => this.t(...args));\n };\n const setLng = lngs => {\n if (!lng && !lngs && this.services.languageDetector) lngs = [];\n const fl = isString(lngs) ? lngs : lngs && lngs[0];\n const l = this.store.hasLanguageSomeTranslations(fl) ? fl : this.services.languageUtils.getBestMatchFromCodes(isString(lngs) ? [lngs] : lngs);\n if (l) {\n if (!this.language) {\n setLngProps(l);\n }\n if (!this.translator.language) this.translator.changeLanguage(l);\n this.services.languageDetector?.cacheUserLanguage?.(l);\n }\n this.loadResources(l, err => {\n done(err, l);\n });\n };\n if (!lng && this.services.languageDetector && !this.services.languageDetector.async) {\n setLng(this.services.languageDetector.detect());\n } else if (!lng && this.services.languageDetector && this.services.languageDetector.async) {\n if (this.services.languageDetector.detect.length === 0) {\n this.services.languageDetector.detect().then(setLng);\n } else {\n this.services.languageDetector.detect(setLng);\n }\n } else {\n setLng(lng);\n }\n return deferred;\n }\n getFixedT(lng, ns, keyPrefix, fixedOpts) {\n const scopeNs = fixedOpts?.scopeNs;\n const fixedT = (key, opts, ...rest) => {\n let o;\n if (typeof opts !== 'object') {\n o = this.options.overloadTranslationOptionHandler([key, opts].concat(rest));\n } else {\n o = {\n ...opts\n };\n }\n o.lng = o.lng || fixedT.lng;\n o.lngs = o.lngs || fixedT.lngs;\n const explicitCallNs = o.ns !== undefined && o.ns !== null;\n o.ns = o.ns || fixedT.ns;\n if (o.keyPrefix !== '') o.keyPrefix = o.keyPrefix || keyPrefix || fixedT.keyPrefix;\n const selectorOpts = {\n ...this.options,\n ...o\n };\n if (Array.isArray(scopeNs) && !explicitCallNs) selectorOpts.ns = scopeNs;\n if (typeof o.keyPrefix === 'function') o.keyPrefix = keysFromSelector(o.keyPrefix, selectorOpts);\n const keySeparator = this.options.keySeparator || '.';\n let resultKey;\n if (o.keyPrefix && Array.isArray(key)) {\n resultKey = key.map(k => {\n if (typeof k === 'function') k = keysFromSelector(k, selectorOpts);\n return `${o.keyPrefix}${keySeparator}${k}`;\n });\n } else {\n if (typeof key === 'function') key = keysFromSelector(key, selectorOpts);\n resultKey = o.keyPrefix ? `${o.keyPrefix}${keySeparator}${key}` : key;\n }\n return this.t(resultKey, o);\n };\n if (isString(lng)) {\n fixedT.lng = lng;\n } else {\n fixedT.lngs = lng;\n }\n fixedT.ns = ns;\n fixedT.keyPrefix = keyPrefix;\n return fixedT;\n }\n t(...args) {\n return this.translator?.translate(...args);\n }\n exists(...args) {\n return this.translator?.exists(...args);\n }\n setDefaultNamespace(ns) {\n this.options.defaultNS = ns;\n }\n hasLoadedNamespace(ns, options = {}) {\n if (!this.isInitialized) {\n this.logger.warn('hasLoadedNamespace: i18next was not initialized', this.languages);\n return false;\n }\n if (!this.languages || !this.languages.length) {\n this.logger.warn('hasLoadedNamespace: i18n.languages were undefined or empty', this.languages);\n return false;\n }\n const lng = options.lng || this.resolvedLanguage || this.languages[0];\n const fallbackLng = this.options ? this.options.fallbackLng : false;\n const lastLng = this.languages[this.languages.length - 1];\n if (lng.toLowerCase() === 'cimode') return true;\n const loadNotPending = (l, n) => {\n const loadState = this.services.backendConnector.state[`${l}|${n}`];\n return loadState === -1 || loadState === 0 || loadState === 2;\n };\n if (options.precheck) {\n const preResult = options.precheck(this, loadNotPending);\n if (preResult !== undefined) return preResult;\n }\n if (this.hasResourceBundle(lng, ns)) return true;\n if (!this.services.backendConnector.backend || this.options.resources && !this.options.partialBundledLanguages) return true;\n if (loadNotPending(lng, ns) && (!fallbackLng || loadNotPending(lastLng, ns))) return true;\n return false;\n }\n loadNamespaces(ns, callback) {\n const deferred = defer();\n if (!this.options.ns) {\n if (callback) callback();\n return Promise.resolve();\n }\n if (isString(ns)) ns = [ns];\n ns.forEach(n => {\n if (!this.options.ns.includes(n)) this.options.ns.push(n);\n });\n this.loadResources(err => {\n deferred.resolve();\n if (callback) callback(err);\n });\n return deferred;\n }\n loadLanguages(lngs, callback) {\n const deferred = defer();\n if (isString(lngs)) lngs = [lngs];\n const preloaded = this.options.preload || [];\n const newLngs = lngs.filter(lng => !preloaded.includes(lng) && this.services.languageUtils.isSupportedCode(lng));\n if (!newLngs.length) {\n if (callback) callback();\n return Promise.resolve();\n }\n this.options.preload = preloaded.concat(newLngs);\n this.loadResources(err => {\n deferred.resolve();\n if (callback) callback(err);\n });\n return deferred;\n }\n dir(lng) {\n if (!lng) lng = this.resolvedLanguage || (this.languages?.length > 0 ? this.languages[0] : this.language);\n if (!lng) return 'rtl';\n try {\n const l = new Intl.Locale(lng);\n if (l && l.getTextInfo) {\n const ti = l.getTextInfo();\n if (ti && ti.direction) return ti.direction;\n }\n } catch (e) {}\n const rtlLngs = ['ar', 'shu', 'sqr', 'ssh', 'xaa', 'yhd', 'yud', 'aao', 'abh', 'abv', 'acm', 'acq', 'acw', 'acx', 'acy', 'adf', 'ads', 'aeb', 'aec', 'afb', 'ajp', 'apc', 'apd', 'arb', 'arq', 'ars', 'ary', 'arz', 'auz', 'avl', 'ayh', 'ayl', 'ayn', 'ayp', 'bbz', 'pga', 'he', 'iw', 'ps', 'pbt', 'pbu', 'pst', 'prp', 'prd', 'ug', 'ur', 'ydd', 'yds', 'yih', 'ji', 'yi', 'hbo', 'men', 'xmn', 'fa', 'jpr', 'peo', 'pes', 'prs', 'dv', 'sam', 'ckb'];\n const languageUtils = this.services?.languageUtils || new LanguageUtil(get());\n if (lng.toLowerCase().indexOf('-latn') > 1) return 'ltr';\n return rtlLngs.includes(languageUtils.getLanguagePartFromCode(lng)) || lng.toLowerCase().indexOf('-arab') > 1 ? 'rtl' : 'ltr';\n }\n static createInstance(options = {}, callback) {\n const instance = new I18n(options, callback);\n instance.createInstance = I18n.createInstance;\n return instance;\n }\n cloneInstance(options = {}, callback = noop) {\n const forkResourceStore = options.forkResourceStore;\n if (forkResourceStore) delete options.forkResourceStore;\n const mergedOptions = {\n ...this.options,\n ...options,\n ...{\n isClone: true\n }\n };\n const clone = new I18n(mergedOptions);\n if (options.debug !== undefined || options.prefix !== undefined) {\n clone.logger = clone.logger.clone(options);\n }\n const membersToCopy = ['store', 'services', 'language'];\n membersToCopy.forEach(m => {\n clone[m] = this[m];\n });\n clone.services = {\n ...this.services\n };\n clone.services.utils = {\n hasLoadedNamespace: clone.hasLoadedNamespace.bind(clone)\n };\n if (forkResourceStore) {\n const clonedData = Object.keys(this.store.data).reduce((prev, l) => {\n prev[l] = {\n ...this.store.data[l]\n };\n prev[l] = Object.keys(prev[l]).reduce((acc, n) => {\n acc[n] = {\n ...prev[l][n]\n };\n return acc;\n }, prev[l]);\n return prev;\n }, {});\n clone.store = new ResourceStore(clonedData, mergedOptions);\n clone.services.resourceStore = clone.store;\n }\n if (options.interpolation) {\n const defOpts = get();\n const mergedInterpolation = {\n ...defOpts.interpolation,\n ...this.options.interpolation,\n ...options.interpolation\n };\n const mergedForInterpolator = {\n ...mergedOptions,\n interpolation: mergedInterpolation\n };\n clone.services.interpolator = new Interpolator(mergedForInterpolator);\n }\n clone.translator = new Translator(clone.services, mergedOptions);\n clone.translator.on('*', (event, ...args) => {\n clone.emit(event, ...args);\n });\n clone.init(mergedOptions, callback);\n clone.translator.options = mergedOptions;\n clone.translator.backendConnector.services.utils = {\n hasLoadedNamespace: clone.hasLoadedNamespace.bind(clone)\n };\n return clone;\n }\n toJSON() {\n return {\n options: this.options,\n store: this.store,\n language: this.language,\n languages: this.languages,\n resolvedLanguage: this.resolvedLanguage\n };\n }\n}\nconst instance = I18n.createInstance();\n\nconst createInstance = instance.createInstance;\nconst dir = instance.dir;\nconst init = instance.init;\nconst loadResources = instance.loadResources;\nconst reloadResources = instance.reloadResources;\nconst use = instance.use;\nconst changeLanguage = instance.changeLanguage;\nconst getFixedT = instance.getFixedT;\nconst t = instance.t;\nconst exists = instance.exists;\nconst setDefaultNamespace = instance.setDefaultNamespace;\nconst hasLoadedNamespace = instance.hasLoadedNamespace;\nconst loadNamespaces = instance.loadNamespaces;\nconst loadLanguages = instance.loadLanguages;\n\nexport { changeLanguage, createInstance, instance as default, dir, exists, getFixedT, hasLoadedNamespace, init, keysFromSelector as keyFromSelector, loadLanguages, loadNamespaces, loadResources, reloadResources, setDefaultNamespace, t, use };\n","import { createInstance, type i18n } from \"i18next\";\n\n// Separate resources and language state from the assistant UI. Do not register\n// initReactI18next here: it would replace react-i18next's global web instance.\nexport const i18next: i18n = createInstance();\n","// Keys that must never be traversed when walking a string/array path into an\n// object, otherwise a crafted path such as `__proto__.polluted` walks straight\n// into Object.prototype. Mirrors the guard shipped to the same setPath/pushPath\n// walker in i18next-fs-backend 2.6.6 and i18next-http-middleware 3.9.7.\nvar UNSAFE_KEYS = ['__proto__', 'constructor', 'prototype'];\nfunction getLastOfPath(object, path, Empty) {\n function cleanKey(key) {\n return key && key.indexOf('###') > -1 ? key.replace(/###/g, '.') : key;\n }\n function canNotTraverseDeeper() {\n return !object || typeof object === 'string';\n }\n var stack = typeof path !== 'string' ? [].concat(path) : path.split('.');\n while (stack.length > 1) {\n if (canNotTraverseDeeper()) return {};\n var key = cleanKey(stack.shift());\n if (UNSAFE_KEYS.indexOf(key) > -1) return {};\n if (!object[key] && Empty) object[key] = new Empty();\n object = object[key];\n }\n if (canNotTraverseDeeper()) return {};\n var k = cleanKey(stack.shift());\n if (UNSAFE_KEYS.indexOf(k) > -1) return {};\n return {\n obj: object,\n k: k\n };\n}\nexport function setPath(object, path, newValue) {\n var _getLastOfPath = getLastOfPath(object, path, Object),\n obj = _getLastOfPath.obj,\n k = _getLastOfPath.k;\n if (obj === undefined) return; // unsafe path, drop silently\n\n obj[k] = newValue;\n}\nexport function pushPath(object, path, newValue, concat) {\n var _getLastOfPath2 = getLastOfPath(object, path, Object),\n obj = _getLastOfPath2.obj,\n k = _getLastOfPath2.k;\n if (obj === undefined) return; // unsafe path, drop silently\n\n obj[k] = obj[k] || [];\n if (concat) obj[k] = obj[k].concat(newValue);\n if (!concat) obj[k].push(newValue);\n}\nexport function getPath(object, path) {\n var _getLastOfPath3 = getLastOfPath(object, path),\n obj = _getLastOfPath3.obj,\n k = _getLastOfPath3.k;\n if (!obj) return undefined;\n return obj[k];\n}\nvar arr = [];\nvar each = arr.forEach;\nvar slice = arr.slice;\nexport function defaults(obj) {\n each.call(slice.call(arguments, 1), function (source) {\n if (source) {\n // iterate own keys only (skip inherited/polluted props) and refuse to\n // copy prototype keys, so a polluted source can't seed Object.prototype.\n for (var _i = 0, _Object$keys = Object.keys(source); _i < _Object$keys.length; _i++) {\n var prop = _Object$keys[_i];\n if (UNSAFE_KEYS.indexOf(prop) > -1) continue;\n if (obj[prop] === undefined) obj[prop] = source[prop];\n }\n }\n });\n return obj;\n}\nexport function extend(obj) {\n each.call(slice.call(arguments, 1), function (source) {\n if (source) {\n for (var _i2 = 0, _Object$keys2 = Object.keys(source); _i2 < _Object$keys2.length; _i2++) {\n var prop = _Object$keys2[_i2];\n if (UNSAFE_KEYS.indexOf(prop) > -1) continue;\n obj[prop] = source[prop];\n }\n }\n });\n return obj;\n}","//#region packages/fast-memoize/index.ts\nfunction memoize(fn, options) {\n\tconst cache = options && options.cache ? options.cache : cacheDefault;\n\tconst serializer = options && options.serializer ? options.serializer : serializerDefault;\n\treturn (options && options.strategy ? options.strategy : strategyDefault)(fn, {\n\t\tcache,\n\t\tserializer\n\t});\n}\nfunction isPrimitive(value) {\n\treturn value == null || typeof value === \"number\" || typeof value === \"boolean\";\n}\nfunction monadic(fn, cache, serializer, arg) {\n\tconst cacheKey = isPrimitive(arg) ? arg : serializer(arg);\n\tlet computedValue = cache.get(cacheKey);\n\tif (typeof computedValue === \"undefined\") {\n\t\tcomputedValue = fn.call(this, arg);\n\t\tcache.set(cacheKey, computedValue);\n\t}\n\treturn computedValue;\n}\nfunction variadic(fn, cache, serializer) {\n\tconst args = Array.prototype.slice.call(arguments, 3);\n\tconst cacheKey = serializer(args);\n\tlet computedValue = cache.get(cacheKey);\n\tif (typeof computedValue === \"undefined\") {\n\t\tcomputedValue = fn.apply(this, args);\n\t\tcache.set(cacheKey, computedValue);\n\t}\n\treturn computedValue;\n}\nfunction assemble(fn, context, strategy, cache, serialize) {\n\treturn strategy.bind(context, fn, cache, serialize);\n}\nfunction strategyDefault(fn, options) {\n\tconst strategy = fn.length === 1 ? monadic : variadic;\n\treturn assemble(fn, this, strategy, options.cache.create(), options.serializer);\n}\nfunction strategyVariadic(fn, options) {\n\treturn assemble(fn, this, variadic, options.cache.create(), options.serializer);\n}\nfunction strategyMonadic(fn, options) {\n\treturn assemble(fn, this, monadic, options.cache.create(), options.serializer);\n}\nconst serializerDefault = function() {\n\treturn JSON.stringify(arguments);\n};\nvar ObjectWithoutPrototypeCache = class {\n\tconstructor() {\n\t\tthis.cache = Object.create(null);\n\t}\n\tget(key) {\n\t\treturn this.cache[key];\n\t}\n\tset(key, value) {\n\t\tthis.cache[key] = value;\n\t}\n};\nconst cacheDefault = { create: function create() {\n\treturn new ObjectWithoutPrototypeCache();\n} };\nconst strategies = {\n\tvariadic: strategyVariadic,\n\tmonadic: strategyMonadic\n};\n//#endregion\nexport { memoize, strategies };\n\n//# sourceMappingURL=index.js.map","//#region packages/icu-skeleton-parser/date-time.ts\n/**\n* https://unicode.org/reports/tr35/tr35-dates.html#Date_Field_Symbol_Table\n* Credit: https://github.com/caridy/intl-datetimeformat-pattern/blob/master/index.js\n* with some tweaks\n*/\nconst DATE_TIME_REGEX = /(?:[Eec]{1,6}|G{1,5}|[Qq]{1,5}|(?:[yYur]+|U{1,5})|[ML]{1,5}|d{1,2}|D{1,3}|F{1}|[abB]{1,5}|[hkHK]{1,2}|w{1,2}|W{1}|m{1,2}|s{1,2}|[zZOvVxX]{1,4})(?=([^']*'[^']*')*[^']*$)/g;\n/**\n* Parse Date time skeleton into Intl.DateTimeFormatOptions\n* Ref: https://unicode.org/reports/tr35/tr35-dates.html#Date_Field_Symbol_Table\n* @public\n* @param skeleton skeleton string\n*/\nfunction parseDateTimeSkeleton(skeleton) {\n\tconst result = {};\n\tskeleton.replace(DATE_TIME_REGEX, (match) => {\n\t\tconst len = match.length;\n\t\tswitch (match[0]) {\n\t\t\tcase \"G\":\n\t\t\t\tresult.era = len === 4 ? \"long\" : len === 5 ? \"narrow\" : \"short\";\n\t\t\t\tbreak;\n\t\t\tcase \"y\":\n\t\t\t\tresult.year = len === 2 ? \"2-digit\" : \"numeric\";\n\t\t\t\tbreak;\n\t\t\tcase \"Y\":\n\t\t\tcase \"u\":\n\t\t\tcase \"U\":\n\t\t\tcase \"r\": throw new RangeError(\"`Y/u/U/r` (year) patterns are not supported, use `y` instead\");\n\t\t\tcase \"q\":\n\t\t\tcase \"Q\": throw new RangeError(\"`q/Q` (quarter) patterns are not supported\");\n\t\t\tcase \"M\":\n\t\t\tcase \"L\":\n\t\t\t\tresult.month = [\n\t\t\t\t\t\"numeric\",\n\t\t\t\t\t\"2-digit\",\n\t\t\t\t\t\"short\",\n\t\t\t\t\t\"long\",\n\t\t\t\t\t\"narrow\"\n\t\t\t\t][len - 1];\n\t\t\t\tbreak;\n\t\t\tcase \"w\":\n\t\t\tcase \"W\": throw new RangeError(\"`w/W` (week) patterns are not supported\");\n\t\t\tcase \"d\":\n\t\t\t\tresult.day = [\"numeric\", \"2-digit\"][len - 1];\n\t\t\t\tbreak;\n\t\t\tcase \"D\":\n\t\t\tcase \"F\":\n\t\t\tcase \"g\": throw new RangeError(\"`D/F/g` (day) patterns are not supported, use `d` instead\");\n\t\t\tcase \"E\":\n\t\t\t\tresult.weekday = len === 4 ? \"long\" : len === 5 ? \"narrow\" : \"short\";\n\t\t\t\tbreak;\n\t\t\tcase \"e\":\n\t\t\t\tif (len < 4) throw new RangeError(\"`e..eee` (weekday) patterns are not supported\");\n\t\t\t\tresult.weekday = [\n\t\t\t\t\t\"short\",\n\t\t\t\t\t\"long\",\n\t\t\t\t\t\"narrow\",\n\t\t\t\t\t\"short\"\n\t\t\t\t][len - 3];\n\t\t\t\tbreak;\n\t\t\tcase \"c\":\n\t\t\t\tif (len < 4) throw new RangeError(\"`c..ccc` (weekday) patterns are not supported\");\n\t\t\t\tresult.weekday = [\n\t\t\t\t\t\"short\",\n\t\t\t\t\t\"long\",\n\t\t\t\t\t\"narrow\",\n\t\t\t\t\t\"short\"\n\t\t\t\t][len - 3];\n\t\t\t\tbreak;\n\t\t\tcase \"a\":\n\t\t\t\tresult.hour12 = true;\n\t\t\t\tbreak;\n\t\t\tcase \"b\":\n\t\t\tcase \"B\": throw new RangeError(\"`b/B` (period) patterns are not supported, use `a` instead\");\n\t\t\tcase \"h\":\n\t\t\t\tresult.hourCycle = \"h12\";\n\t\t\t\tresult.hour = [\"numeric\", \"2-digit\"][len - 1];\n\t\t\t\tbreak;\n\t\t\tcase \"H\":\n\t\t\t\tresult.hourCycle = \"h23\";\n\t\t\t\tresult.hour = [\"numeric\", \"2-digit\"][len - 1];\n\t\t\t\tbreak;\n\t\t\tcase \"K\":\n\t\t\t\tresult.hourCycle = \"h11\";\n\t\t\t\tresult.hour = [\"numeric\", \"2-digit\"][len - 1];\n\t\t\t\tbreak;\n\t\t\tcase \"k\":\n\t\t\t\tresult.hourCycle = \"h24\";\n\t\t\t\tresult.hour = [\"numeric\", \"2-digit\"][len - 1];\n\t\t\t\tbreak;\n\t\t\tcase \"j\":\n\t\t\tcase \"J\":\n\t\t\tcase \"C\": throw new RangeError(\"`j/J/C` (hour) patterns are not supported, use `h/H/K/k` instead\");\n\t\t\tcase \"m\":\n\t\t\t\tresult.minute = [\"numeric\", \"2-digit\"][len - 1];\n\t\t\t\tbreak;\n\t\t\tcase \"s\":\n\t\t\t\tresult.second = [\"numeric\", \"2-digit\"][len - 1];\n\t\t\t\tbreak;\n\t\t\tcase \"S\":\n\t\t\tcase \"A\": throw new RangeError(\"`S/A` (second) patterns are not supported, use `s` instead\");\n\t\t\tcase \"z\":\n\t\t\t\tresult.timeZoneName = len < 4 ? \"short\" : \"long\";\n\t\t\t\tbreak;\n\t\t\tcase \"Z\":\n\t\t\tcase \"O\":\n\t\t\tcase \"v\":\n\t\t\tcase \"V\":\n\t\t\tcase \"X\":\n\t\t\tcase \"x\": throw new RangeError(\"`Z/O/v/V/X/x` (timeZone) patterns are not supported, use `z` instead\");\n\t\t}\n\t\treturn \"\";\n\t});\n\treturn result;\n}\n//#endregion\n//#region node_modules/.aspect_rules_js/@formatjs_generated+unicode@0.0.0/node_modules/@formatjs_generated/unicode/icu-skeleton-parser-regex.js\nconst WHITE_SPACE_REGEX = /[\\t-\\r \\x85\\u200E\\u200F\\u2028\\u2029]/i;\n//#endregion\n//#region packages/icu-skeleton-parser/number.ts\nfunction parseNumberSkeletonFromString(skeleton) {\n\tif (skeleton.length === 0) throw new Error(\"Number skeleton cannot be empty\");\n\tconst stringTokens = skeleton.split(WHITE_SPACE_REGEX).filter((x) => x.length > 0);\n\tconst tokens = [];\n\tfor (const stringToken of stringTokens) {\n\t\tlet stemAndOptions = stringToken.split(\"/\");\n\t\tif (stemAndOptions.length === 0) throw new Error(\"Invalid number skeleton\");\n\t\tconst [stem, ...options] = stemAndOptions;\n\t\tfor (const option of options) if (option.length === 0) throw new Error(\"Invalid number skeleton\");\n\t\ttokens.push({\n\t\t\tstem,\n\t\t\toptions\n\t\t});\n\t}\n\treturn tokens;\n}\nfunction icuUnitToEcma(unit) {\n\treturn unit.replace(/^(.*?)-/, \"\");\n}\nconst FRACTION_PRECISION_REGEX = /^\\.(?:(0+)(\\*)?|(#+)|(0+)(#+))$/g;\nconst SIGNIFICANT_PRECISION_REGEX = /^(@+)?(\\+|#+)?[rs]?$/g;\nconst INTEGER_WIDTH_REGEX = /(\\*)(0+)|(#+)(0+)|(0+)/g;\nconst CONCISE_INTEGER_WIDTH_REGEX = /^(0+)$/;\nfunction parseSignificantPrecision(str) {\n\tconst result = {};\n\tif (str[str.length - 1] === \"r\") result.roundingPriority = \"morePrecision\";\n\telse if (str[str.length - 1] === \"s\") result.roundingPriority = \"lessPrecision\";\n\tstr.replace(SIGNIFICANT_PRECISION_REGEX, function(_, g1, g2) {\n\t\tif (typeof g2 !== \"string\") {\n\t\t\tresult.minimumSignificantDigits = g1.length;\n\t\t\tresult.maximumSignificantDigits = g1.length;\n\t\t} else if (g2 === \"+\") result.minimumSignificantDigits = g1.length;\n\t\telse if (g1[0] === \"#\") result.maximumSignificantDigits = g1.length;\n\t\telse {\n\t\t\tresult.minimumSignificantDigits = g1.length;\n\t\t\tresult.maximumSignificantDigits = g1.length + (typeof g2 === \"string\" ? g2.length : 0);\n\t\t}\n\t\treturn \"\";\n\t});\n\treturn result;\n}\nfunction parseSign(str) {\n\tswitch (str) {\n\t\tcase \"sign-auto\": return { signDisplay: \"auto\" };\n\t\tcase \"sign-accounting\":\n\t\tcase \"()\": return { currencySign: \"accounting\" };\n\t\tcase \"sign-always\":\n\t\tcase \"+!\": return { signDisplay: \"always\" };\n\t\tcase \"sign-accounting-always\":\n\t\tcase \"()!\": return {\n\t\t\tsignDisplay: \"always\",\n\t\t\tcurrencySign: \"accounting\"\n\t\t};\n\t\tcase \"sign-except-zero\":\n\t\tcase \"+?\": return { signDisplay: \"exceptZero\" };\n\t\tcase \"sign-accounting-except-zero\":\n\t\tcase \"()?\": return {\n\t\t\tsignDisplay: \"exceptZero\",\n\t\t\tcurrencySign: \"accounting\"\n\t\t};\n\t\tcase \"sign-never\":\n\t\tcase \"+_\": return { signDisplay: \"never\" };\n\t}\n}\nfunction parseConciseScientificAndEngineeringStem(stem) {\n\tlet result;\n\tif (stem[0] === \"E\" && stem[1] === \"E\") {\n\t\tresult = { notation: \"engineering\" };\n\t\tstem = stem.slice(2);\n\t} else if (stem[0] === \"E\") {\n\t\tresult = { notation: \"scientific\" };\n\t\tstem = stem.slice(1);\n\t}\n\tif (result) {\n\t\tconst signDisplay = stem.slice(0, 2);\n\t\tif (signDisplay === \"+!\") {\n\t\t\tresult.signDisplay = \"always\";\n\t\t\tstem = stem.slice(2);\n\t\t} else if (signDisplay === \"+?\") {\n\t\t\tresult.signDisplay = \"exceptZero\";\n\t\t\tstem = stem.slice(2);\n\t\t}\n\t\tif (!CONCISE_INTEGER_WIDTH_REGEX.test(stem)) throw new Error(\"Malformed concise eng/scientific notation\");\n\t\tresult.minimumIntegerDigits = stem.length;\n\t}\n\treturn result;\n}\nfunction parseNotationOptions(opt) {\n\tconst result = {};\n\tconst signOpts = parseSign(opt);\n\tif (signOpts) return signOpts;\n\treturn result;\n}\n/**\n* https://github.com/unicode-org/icu/blob/master/docs/userguide/format_parse/numbers/skeletons.md#skeleton-stems-and-options\n*/\nfunction parseNumberSkeleton(tokens) {\n\tlet result = {};\n\tfor (const token of tokens) {\n\t\tswitch (token.stem) {\n\t\t\tcase \"percent\":\n\t\t\tcase \"%\":\n\t\t\t\tresult.style = \"percent\";\n\t\t\t\tcontinue;\n\t\t\tcase \"%x100\":\n\t\t\t\tresult.style = \"percent\";\n\t\t\t\tresult.scale = 100;\n\t\t\t\tcontinue;\n\t\t\tcase \"currency\":\n\t\t\t\tresult.style = \"currency\";\n\t\t\t\tresult.currency = token.options[0];\n\t\t\t\tcontinue;\n\t\t\tcase \"group-off\":\n\t\t\tcase \",_\":\n\t\t\t\tresult.useGrouping = false;\n\t\t\t\tcontinue;\n\t\t\tcase \"precision-integer\":\n\t\t\tcase \".\":\n\t\t\t\tresult.maximumFractionDigits = 0;\n\t\t\t\tcontinue;\n\t\t\tcase \"measure-unit\":\n\t\t\tcase \"unit\":\n\t\t\t\tresult.style = \"unit\";\n\t\t\t\tresult.unit = icuUnitToEcma(token.options[0]);\n\t\t\t\tcontinue;\n\t\t\tcase \"compact-short\":\n\t\t\tcase \"K\":\n\t\t\t\tresult.notation = \"compact\";\n\t\t\t\tresult.compactDisplay = \"short\";\n\t\t\t\tcontinue;\n\t\t\tcase \"compact-long\":\n\t\t\tcase \"KK\":\n\t\t\t\tresult.notation = \"compact\";\n\t\t\t\tresult.compactDisplay = \"long\";\n\t\t\t\tcontinue;\n\t\t\tcase \"scientific\":\n\t\t\t\tresult = {\n\t\t\t\t\t...result,\n\t\t\t\t\tnotation: \"scientific\",\n\t\t\t\t\t...token.options.reduce((all, opt) => ({\n\t\t\t\t\t\t...all,\n\t\t\t\t\t\t...parseNotationOptions(opt)\n\t\t\t\t\t}), {})\n\t\t\t\t};\n\t\t\t\tcontinue;\n\t\t\tcase \"engineering\":\n\t\t\t\tresult = {\n\t\t\t\t\t...result,\n\t\t\t\t\tnotation: \"engineering\",\n\t\t\t\t\t...token.options.reduce((all, opt) => ({\n\t\t\t\t\t\t...all,\n\t\t\t\t\t\t...parseNotationOptions(opt)\n\t\t\t\t\t}), {})\n\t\t\t\t};\n\t\t\t\tcontinue;\n\t\t\tcase \"notation-simple\":\n\t\t\t\tresult.notation = \"standard\";\n\t\t\t\tcontinue;\n\t\t\tcase \"unit-width-narrow\":\n\t\t\t\tresult.currencyDisplay = \"narrowSymbol\";\n\t\t\t\tresult.unitDisplay = \"narrow\";\n\t\t\t\tcontinue;\n\t\t\tcase \"unit-width-short\":\n\t\t\t\tresult.currencyDisplay = \"code\";\n\t\t\t\tresult.unitDisplay = \"short\";\n\t\t\t\tcontinue;\n\t\t\tcase \"unit-width-full-name\":\n\t\t\t\tresult.currencyDisplay = \"name\";\n\t\t\t\tresult.unitDisplay = \"long\";\n\t\t\t\tcontinue;\n\t\t\tcase \"unit-width-iso-code\":\n\t\t\t\tresult.currencyDisplay = \"symbol\";\n\t\t\t\tcontinue;\n\t\t\tcase \"scale\":\n\t\t\t\tresult.scale = parseFloat(token.options[0]);\n\t\t\t\tcontinue;\n\t\t\tcase \"rounding-mode-floor\":\n\t\t\t\tresult.roundingMode = \"floor\";\n\t\t\t\tcontinue;\n\t\t\tcase \"rounding-mode-ceiling\":\n\t\t\t\tresult.roundingMode = \"ceil\";\n\t\t\t\tcontinue;\n\t\t\tcase \"rounding-mode-down\":\n\t\t\t\tresult.roundingMode = \"trunc\";\n\t\t\t\tcontinue;\n\t\t\tcase \"rounding-mode-up\":\n\t\t\t\tresult.roundingMode = \"expand\";\n\t\t\t\tcontinue;\n\t\t\tcase \"rounding-mode-half-even\":\n\t\t\t\tresult.roundingMode = \"halfEven\";\n\t\t\t\tcontinue;\n\t\t\tcase \"rounding-mode-half-down\":\n\t\t\t\tresult.roundingMode = \"halfTrunc\";\n\t\t\t\tcontinue;\n\t\t\tcase \"rounding-mode-half-up\":\n\t\t\t\tresult.roundingMode = \"halfExpand\";\n\t\t\t\tcontinue;\n\t\t\tcase \"integer-width\":\n\t\t\t\tif (token.options.length > 1) throw new RangeError(\"integer-width stems only accept a single optional option\");\n\t\t\t\ttoken.options[0].replace(INTEGER_WIDTH_REGEX, function(_, g1, g2, g3, g4, g5) {\n\t\t\t\t\tif (g1) result.minimumIntegerDigits = g2.length;\n\t\t\t\t\telse if (g3 && g4) throw new Error(\"We currently do not support maximum integer digits\");\n\t\t\t\t\telse if (g5) throw new Error(\"We currently do not support exact integer digits\");\n\t\t\t\t\treturn \"\";\n\t\t\t\t});\n\t\t\t\tcontinue;\n\t\t}\n\t\tif (CONCISE_INTEGER_WIDTH_REGEX.test(token.stem)) {\n\t\t\tresult.minimumIntegerDigits = token.stem.length;\n\t\t\tcontinue;\n\t\t}\n\t\tif (FRACTION_PRECISION_REGEX.test(token.stem)) {\n\t\t\tif (token.options.length > 1) throw new RangeError(\"Fraction-precision stems only accept a single optional option\");\n\t\t\ttoken.stem.replace(FRACTION_PRECISION_REGEX, function(_, g1, g2, g3, g4, g5) {\n\t\t\t\tif (g2 === \"*\") result.minimumFractionDigits = g1.length;\n\t\t\t\telse if (g3 && g3[0] === \"#\") result.maximumFractionDigits = g3.length;\n\t\t\t\telse if (g4 && g5) {\n\t\t\t\t\tresult.minimumFractionDigits = g4.length;\n\t\t\t\t\tresult.maximumFractionDigits = g4.length + g5.length;\n\t\t\t\t} else {\n\t\t\t\t\tresult.minimumFractionDigits = g1.length;\n\t\t\t\t\tresult.maximumFractionDigits = g1.length;\n\t\t\t\t}\n\t\t\t\treturn \"\";\n\t\t\t});\n\t\t\tconst opt = token.options[0];\n\t\t\tif (opt === \"w\") result = {\n\t\t\t\t...result,\n\t\t\t\ttrailingZeroDisplay: \"stripIfInteger\"\n\t\t\t};\n\t\t\telse if (opt) result = {\n\t\t\t\t...result,\n\t\t\t\t...parseSignificantPrecision(opt)\n\t\t\t};\n\t\t\tcontinue;\n\t\t}\n\t\tif (SIGNIFICANT_PRECISION_REGEX.test(token.stem)) {\n\t\t\tresult = {\n\t\t\t\t...result,\n\t\t\t\t...parseSignificantPrecision(token.stem)\n\t\t\t};\n\t\t\tcontinue;\n\t\t}\n\t\tconst signOpts = parseSign(token.stem);\n\t\tif (signOpts) result = {\n\t\t\t...result,\n\t\t\t...signOpts\n\t\t};\n\t\tconst conciseScientificAndEngineeringOpts = parseConciseScientificAndEngineeringStem(token.stem);\n\t\tif (conciseScientificAndEngineeringOpts) result = {\n\t\t\t...result,\n\t\t\t...conciseScientificAndEngineeringOpts\n\t\t};\n\t}\n\treturn result;\n}\n//#endregion\nexport { parseDateTimeSkeleton, parseNumberSkeleton, parseNumberSkeletonFromString };\n\n//# sourceMappingURL=index.js.map","import { parseDateTimeSkeleton, parseNumberSkeleton, parseNumberSkeletonFromString } from \"@formatjs/icu-skeleton-parser\";\n//#region packages/icu-messageformat-parser/error.ts\nlet ErrorKind = /* @__PURE__ */ function(ErrorKind) {\n\t/** Argument is unclosed (e.g. `{0`) */\n\tErrorKind[ErrorKind[\"EXPECT_ARGUMENT_CLOSING_BRACE\"] = 1] = \"EXPECT_ARGUMENT_CLOSING_BRACE\";\n\t/** Argument is empty (e.g. `{}`). */\n\tErrorKind[ErrorKind[\"EMPTY_ARGUMENT\"] = 2] = \"EMPTY_ARGUMENT\";\n\t/** Argument is malformed (e.g. `{foo!}``) */\n\tErrorKind[ErrorKind[\"MALFORMED_ARGUMENT\"] = 3] = \"MALFORMED_ARGUMENT\";\n\t/** Expect an argument type (e.g. `{foo,}`) */\n\tErrorKind[ErrorKind[\"EXPECT_ARGUMENT_TYPE\"] = 4] = \"EXPECT_ARGUMENT_TYPE\";\n\t/** Unsupported argument type (e.g. `{foo,foo}`) */\n\tErrorKind[ErrorKind[\"INVALID_ARGUMENT_TYPE\"] = 5] = \"INVALID_ARGUMENT_TYPE\";\n\t/** Expect an argument style (e.g. `{foo, number, }`) */\n\tErrorKind[ErrorKind[\"EXPECT_ARGUMENT_STYLE\"] = 6] = \"EXPECT_ARGUMENT_STYLE\";\n\t/** The number skeleton is invalid. */\n\tErrorKind[ErrorKind[\"INVALID_NUMBER_SKELETON\"] = 7] = \"INVALID_NUMBER_SKELETON\";\n\t/** The date time skeleton is invalid. */\n\tErrorKind[ErrorKind[\"INVALID_DATE_TIME_SKELETON\"] = 8] = \"INVALID_DATE_TIME_SKELETON\";\n\t/** Exepct a number skeleton following the `::` (e.g. `{foo, number, ::}`) */\n\tErrorKind[ErrorKind[\"EXPECT_NUMBER_SKELETON\"] = 9] = \"EXPECT_NUMBER_SKELETON\";\n\t/** Exepct a date time skeleton following the `::` (e.g. `{foo, date, ::}`) */\n\tErrorKind[ErrorKind[\"EXPECT_DATE_TIME_SKELETON\"] = 10] = \"EXPECT_DATE_TIME_SKELETON\";\n\t/** Unmatched apostrophes in the argument style (e.g. `{foo, number, 'test`) */\n\tErrorKind[ErrorKind[\"UNCLOSED_QUOTE_IN_ARGUMENT_STYLE\"] = 11] = \"UNCLOSED_QUOTE_IN_ARGUMENT_STYLE\";\n\t/** Missing select argument options (e.g. `{foo, select}`) */\n\tErrorKind[ErrorKind[\"EXPECT_SELECT_ARGUMENT_OPTIONS\"] = 12] = \"EXPECT_SELECT_ARGUMENT_OPTIONS\";\n\t/** Expecting an offset value in `plural` or `selectordinal` argument (e.g `{foo, plural, offset}`) */\n\tErrorKind[ErrorKind[\"EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE\"] = 13] = \"EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE\";\n\t/** Offset value in `plural` or `selectordinal` is invalid (e.g. `{foo, plural, offset: x}`) */\n\tErrorKind[ErrorKind[\"INVALID_PLURAL_ARGUMENT_OFFSET_VALUE\"] = 14] = \"INVALID_PLURAL_ARGUMENT_OFFSET_VALUE\";\n\t/** Expecting a selector in `select` argument (e.g `{foo, select}`) */\n\tErrorKind[ErrorKind[\"EXPECT_SELECT_ARGUMENT_SELECTOR\"] = 15] = \"EXPECT_SELECT_ARGUMENT_SELECTOR\";\n\t/** Expecting a selector in `plural` or `selectordinal` argument (e.g `{foo, plural}`) */\n\tErrorKind[ErrorKind[\"EXPECT_PLURAL_ARGUMENT_SELECTOR\"] = 16] = \"EXPECT_PLURAL_ARGUMENT_SELECTOR\";\n\t/** Expecting a message fragment after the `select` selector (e.g. `{foo, select, apple}`) */\n\tErrorKind[ErrorKind[\"EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT\"] = 17] = \"EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT\";\n\t/**\n\t* Expecting a message fragment after the `plural` or `selectordinal` selector\n\t* (e.g. `{foo, plural, one}`)\n\t*/\n\tErrorKind[ErrorKind[\"EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT\"] = 18] = \"EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT\";\n\t/** Selector in `plural` or `selectordinal` is malformed (e.g. `{foo, plural, =x {#}}`) */\n\tErrorKind[ErrorKind[\"INVALID_PLURAL_ARGUMENT_SELECTOR\"] = 19] = \"INVALID_PLURAL_ARGUMENT_SELECTOR\";\n\t/**\n\t* Duplicate selectors in `plural` or `selectordinal` argument.\n\t* (e.g. {foo, plural, one {#} one {#}})\n\t*/\n\tErrorKind[ErrorKind[\"DUPLICATE_PLURAL_ARGUMENT_SELECTOR\"] = 20] = \"DUPLICATE_PLURAL_ARGUMENT_SELECTOR\";\n\t/** Duplicate selectors in `select` argument.\n\t* (e.g. {foo, select, apple {apple} apple {apple}})\n\t*/\n\tErrorKind[ErrorKind[\"DUPLICATE_SELECT_ARGUMENT_SELECTOR\"] = 21] = \"DUPLICATE_SELECT_ARGUMENT_SELECTOR\";\n\t/** Plural or select argument option must have `other` clause. */\n\tErrorKind[ErrorKind[\"MISSING_OTHER_CLAUSE\"] = 22] = \"MISSING_OTHER_CLAUSE\";\n\t/** The tag is malformed. (e.g. `<bold!>foo</bold!>) */\n\tErrorKind[ErrorKind[\"INVALID_TAG\"] = 23] = \"INVALID_TAG\";\n\t/** The tag name is invalid. (e.g. `<123>foo</123>`) */\n\tErrorKind[ErrorKind[\"INVALID_TAG_NAME\"] = 25] = \"INVALID_TAG_NAME\";\n\t/** The closing tag does not match the opening tag. (e.g. `<bold>foo</italic>`) */\n\tErrorKind[ErrorKind[\"UNMATCHED_CLOSING_TAG\"] = 26] = \"UNMATCHED_CLOSING_TAG\";\n\t/** The opening tag has unmatched closing tag. (e.g. `<bold>foo`) */\n\tErrorKind[ErrorKind[\"UNCLOSED_TAG\"] = 27] = \"UNCLOSED_TAG\";\n\treturn ErrorKind;\n}({});\n//#endregion\n//#region packages/icu-messageformat-parser/types.ts\nlet TYPE = /* @__PURE__ */ function(TYPE) {\n\t/**\n\t* Raw text\n\t*/\n\tTYPE[TYPE[\"literal\"] = 0] = \"literal\";\n\t/**\n\t* Variable w/o any format, e.g `var` in `this is a {var}`\n\t*/\n\tTYPE[TYPE[\"argument\"] = 1] = \"argument\";\n\t/**\n\t* Variable w/ number format\n\t*/\n\tTYPE[TYPE[\"number\"] = 2] = \"number\";\n\t/**\n\t* Variable w/ date format\n\t*/\n\tTYPE[TYPE[\"date\"] = 3] = \"date\";\n\t/**\n\t* Variable w/ time format\n\t*/\n\tTYPE[TYPE[\"time\"] = 4] = \"time\";\n\t/**\n\t* Variable w/ select format\n\t*/\n\tTYPE[TYPE[\"select\"] = 5] = \"select\";\n\t/**\n\t* Variable w/ plural format\n\t*/\n\tTYPE[TYPE[\"plural\"] = 6] = \"plural\";\n\t/**\n\t* Only possible within plural argument.\n\t* This is the `#` symbol that will be substituted with the count.\n\t*/\n\tTYPE[TYPE[\"pound\"] = 7] = \"pound\";\n\t/**\n\t* XML-like tag\n\t*/\n\tTYPE[TYPE[\"tag\"] = 8] = \"tag\";\n\treturn TYPE;\n}({});\nlet SKELETON_TYPE = /* @__PURE__ */ function(SKELETON_TYPE) {\n\tSKELETON_TYPE[SKELETON_TYPE[\"number\"] = 0] = \"number\";\n\tSKELETON_TYPE[SKELETON_TYPE[\"dateTime\"] = 1] = \"dateTime\";\n\treturn SKELETON_TYPE;\n}({});\n/**\n* Type Guards\n*/\nfunction isLiteralElement(el) {\n\treturn el.type === 0;\n}\nfunction isArgumentElement(el) {\n\treturn el.type === 1;\n}\nfunction isNumberElement(el) {\n\treturn el.type === 2;\n}\nfunction isDateElement(el) {\n\treturn el.type === 3;\n}\nfunction isTimeElement(el) {\n\treturn el.type === 4;\n}\nfunction isSelectElement(el) {\n\treturn el.type === 5;\n}\nfunction isPluralElement(el) {\n\treturn el.type === 6;\n}\nfunction isPoundElement(el) {\n\treturn el.type === 7;\n}\nfunction isTagElement(el) {\n\treturn el.type === 8;\n}\nfunction isNumberSkeleton(el) {\n\treturn !!(el && typeof el === \"object\" && el.type === 0);\n}\nfunction isDateTimeSkeleton(el) {\n\treturn !!(el && typeof el === \"object\" && el.type === 1);\n}\nfunction createLiteralElement(value) {\n\treturn {\n\t\ttype: 0,\n\t\tvalue\n\t};\n}\nfunction createNumberElement(value, style) {\n\treturn {\n\t\ttype: 2,\n\t\tvalue,\n\t\tstyle\n\t};\n}\n//#endregion\n//#region node_modules/.aspect_rules_js/@formatjs_generated+unicode@0.0.0/node_modules/@formatjs_generated/unicode/icu-messageformat-parser-regex.js\nconst SPACE_SEPARATOR_REGEX = /[ \\xA0\\u1680\\u2000-\\u200A\\u202F\\u205F\\u3000]/;\n//#endregion\n//#region node_modules/.aspect_rules_js/@formatjs_generated+cldr.core@0.0.0/node_modules/@formatjs_generated/cldr.core/time-data.js\nconst timeData = {\n\t\"001\": [\"H\", \"h\"],\n\t\"419\": [\n\t\t\"h\",\n\t\t\"H\",\n\t\t\"hB\",\n\t\t\"hb\"\n\t],\n\t\"AC\": [\n\t\t\"H\",\n\t\t\"h\",\n\t\t\"hb\",\n\t\t\"hB\"\n\t],\n\t\"AD\": [\"H\", \"hB\"],\n\t\"AE\": [\n\t\t\"h\",\n\t\t\"hB\",\n\t\t\"hb\",\n\t\t\"H\"\n\t],\n\t\"AF\": [\n\t\t\"H\",\n\t\t\"hb\",\n\t\t\"hB\",\n\t\t\"h\"\n\t],\n\t\"AG\": [\n\t\t\"h\",\n\t\t\"hb\",\n\t\t\"H\",\n\t\t\"hB\"\n\t],\n\t\"AI\": [\n\t\t\"H\",\n\t\t\"h\",\n\t\t\"hb\",\n\t\t\"hB\"\n\t],\n\t\"AL\": [\n\t\t\"h\",\n\t\t\"H\",\n\t\t\"hB\"\n\t],\n\t\"AM\": [\"H\", \"hB\"],\n\t\"AO\": [\"H\", \"hB\"],\n\t\"AR\": [\n\t\t\"h\",\n\t\t\"H\",\n\t\t\"hB\",\n\t\t\"hb\"\n\t],\n\t\"AS\": [\"h\", \"H\"],\n\t\"AT\": [\"H\", \"hB\"],\n\t\"AU\": [\n\t\t\"h\",\n\t\t\"hb\",\n\t\t\"H\",\n\t\t\"hB\"\n\t],\n\t\"AW\": [\"H\", \"hB\"],\n\t\"AX\": [\"H\"],\n\t\"AZ\": [\n\t\t\"H\",\n\t\t\"hB\",\n\t\t\"h\"\n\t],\n\t\"BA\": [\n\t\t\"H\",\n\t\t\"hB\",\n\t\t\"h\"\n\t],\n\t\"BB\": [\n\t\t\"h\",\n\t\t\"hb\",\n\t\t\"H\",\n\t\t\"hB\"\n\t],\n\t\"BD\": [\n\t\t\"h\",\n\t\t\"hB\",\n\t\t\"H\"\n\t],\n\t\"BE\": [\"H\", \"hB\"],\n\t\"BF\": [\"H\", \"hB\"],\n\t\"BG\": [\n\t\t\"H\",\n\t\t\"hB\",\n\t\t\"h\"\n\t],\n\t\"BH\": [\n\t\t\"h\",\n\t\t\"hB\",\n\t\t\"hb\",\n\t\t\"H\"\n\t],\n\t\"BI\": [\"H\", \"h\"],\n\t\"BJ\": [\"H\", \"hB\"],\n\t\"BL\": [\"H\", \"hB\"],\n\t\"BM\": [\n\t\t\"h\",\n\t\t\"hb\",\n\t\t\"H\",\n\t\t\"hB\"\n\t],\n\t\"BN\": [\n\t\t\"hb\",\n\t\t\"hB\",\n\t\t\"h\",\n\t\t\"H\"\n\t],\n\t\"BO\": [\n\t\t\"h\",\n\t\t\"H\",\n\t\t\"hB\",\n\t\t\"hb\"\n\t],\n\t\"BQ\": [\"H\"],\n\t\"BR\": [\"H\", \"hB\"],\n\t\"BS\": [\n\t\t\"h\",\n\t\t\"hb\",\n\t\t\"H\",\n\t\t\"hB\"\n\t],\n\t\"BT\": [\"h\", \"H\"],\n\t\"BW\": [\n\t\t\"H\",\n\t\t\"h\",\n\t\t\"hb\",\n\t\t\"hB\"\n\t],\n\t\"BY\": [\"H\", \"h\"],\n\t\"BZ\": [\n\t\t\"H\",\n\t\t\"h\",\n\t\t\"hb\",\n\t\t\"hB\"\n\t],\n\t\"CA\": [\n\t\t\"h\",\n\t\t\"hb\",\n\t\t\"H\",\n\t\t\"hB\"\n\t],\n\t\"CC\": [\n\t\t\"H\",\n\t\t\"h\",\n\t\t\"hb\",\n\t\t\"hB\"\n\t],\n\t\"CD\": [\"hB\", \"H\"],\n\t\"CF\": [\n\t\t\"H\",\n\t\t\"h\",\n\t\t\"hB\"\n\t],\n\t\"CG\": [\"H\", \"hB\"],\n\t\"CH\": [\n\t\t\"H\",\n\t\t\"hB\",\n\t\t\"h\"\n\t],\n\t\"CI\": [\"H\", \"hB\"],\n\t\"CK\": [\n\t\t\"H\",\n\t\t\"h\",\n\t\t\"hb\",\n\t\t\"hB\"\n\t],\n\t\"CL\": [\n\t\t\"h\",\n\t\t\"H\",\n\t\t\"hB\",\n\t\t\"hb\"\n\t],\n\t\"CM\": [\n\t\t\"H\",\n\t\t\"h\",\n\t\t\"hB\"\n\t],\n\t\"CN\": [\n\t\t\"H\",\n\t\t\"hB\",\n\t\t\"hb\",\n\t\t\"h\"\n\t],\n\t\"CO\": [\n\t\t\"h\",\n\t\t\"H\",\n\t\t\"hB\",\n\t\t\"hb\"\n\t],\n\t\"CP\": [\"H\"],\n\t\"CR\": [\n\t\t\"h\",\n\t\t\"H\",\n\t\t\"hB\",\n\t\t\"hb\"\n\t],\n\t\"CU\": [\n\t\t\"h\",\n\t\t\"H\",\n\t\t\"hB\",\n\t\t\"hb\"\n\t],\n\t\"CV\": [\"H\", \"hB\"],\n\t\"CW\": [\"H\", \"hB\"],\n\t\"CX\": [\n\t\t\"H\",\n\t\t\"h\",\n\t\t\"hb\",\n\t\t\"hB\"\n\t],\n\t\"CY\": [\n\t\t\"h\",\n\t\t\"H\",\n\t\t\"hb\",\n\t\t\"hB\"\n\t],\n\t\"CZ\": [\"H\"],\n\t\"DE\": [\"H\", \"hB\"],\n\t\"DG\": [\n\t\t\"H\",\n\t\t\"h\",\n\t\t\"hb\",\n\t\t\"hB\"\n\t],\n\t\"DJ\": [\"h\", \"H\"],\n\t\"DK\": [\"H\"],\n\t\"DM\": [\n\t\t\"h\",\n\t\t\"hb\",\n\t\t\"H\",\n\t\t\"hB\"\n\t],\n\t\"DO\": [\n\t\t\"h\",\n\t\t\"H\",\n\t\t\"hB\",\n\t\t\"hb\"\n\t],\n\t\"DZ\": [\n\t\t\"h\",\n\t\t\"hB\",\n\t\t\"hb\",\n\t\t\"H\"\n\t],\n\t\"EA\": [\n\t\t\"H\",\n\t\t\"h\",\n\t\t\"hB\",\n\t\t\"hb\"\n\t],\n\t\"EC\": [\n\t\t\"h\",\n\t\t\"H\",\n\t\t\"hB\",\n\t\t\"hb\"\n\t],\n\t\"EE\": [\"H\", \"hB\"],\n\t\"EG\": [\n\t\t\"h\",\n\t\t\"hB\",\n\t\t\"hb\",\n\t\t\"H\"\n\t],\n\t\"EH\": [\n\t\t\"h\",\n\t\t\"hB\",\n\t\t\"hb\",\n\t\t\"H\"\n\t],\n\t\"ER\": [\"h\", \"H\"],\n\t\"ES\": [\n\t\t\"H\",\n\t\t\"hB\",\n\t\t\"h\",\n\t\t\"hb\"\n\t],\n\t\"ET\": [\n\t\t\"hB\",\n\t\t\"hb\",\n\t\t\"h\",\n\t\t\"H\"\n\t],\n\t\"FI\": [\"H\"],\n\t\"FJ\": [\n\t\t\"h\",\n\t\t\"hb\",\n\t\t\"H\",\n\t\t\"hB\"\n\t],\n\t\"FK\": [\n\t\t\"H\",\n\t\t\"h\",\n\t\t\"hb\",\n\t\t\"hB\"\n\t],\n\t\"FM\": [\n\t\t\"h\",\n\t\t\"hb\",\n\t\t\"H\",\n\t\t\"hB\"\n\t],\n\t\"FO\": [\"H\", \"h\"],\n\t\"FR\": [\"H\", \"hB\"],\n\t\"GA\": [\"H\", \"hB\"],\n\t\"GB\": [\n\t\t\"H\",\n\t\t\"h\",\n\t\t\"hb\",\n\t\t\"hB\"\n\t],\n\t\"GD\": [\n\t\t\"h\",\n\t\t\"hb\",\n\t\t\"H\",\n\t\t\"hB\"\n\t],\n\t\"GE\": [\n\t\t\"H\",\n\t\t\"hB\",\n\t\t\"h\"\n\t],\n\t\"GF\": [\"H\", \"hB\"],\n\t\"GG\": [\n\t\t\"H\",\n\t\t\"h\",\n\t\t\"hb\",\n\t\t\"hB\"\n\t],\n\t\"GH\": [\"h\", \"H\"],\n\t\"GI\": [\n\t\t\"H\",\n\t\t\"h\",\n\t\t\"hb\",\n\t\t\"hB\"\n\t],\n\t\"GL\": [\"H\", \"h\"],\n\t\"GM\": [\n\t\t\"h\",\n\t\t\"hb\",\n\t\t\"H\",\n\t\t\"hB\"\n\t],\n\t\"GN\": [\"H\", \"hB\"],\n\t\"GP\": [\"H\", \"hB\"],\n\t\"GQ\": [\n\t\t\"H\",\n\t\t\"hB\",\n\t\t\"h\",\n\t\t\"hb\"\n\t],\n\t\"GR\": [\n\t\t\"h\",\n\t\t\"H\",\n\t\t\"hb\",\n\t\t\"hB\"\n\t],\n\t\"GS\": [\n\t\t\"H\",\n\t\t\"h\",\n\t\t\"hb\",\n\t\t\"hB\"\n\t],\n\t\"GT\": [\n\t\t\"h\",\n\t\t\"H\",\n\t\t\"hB\",\n\t\t\"hb\"\n\t],\n\t\"GU\": [\n\t\t\"h\",\n\t\t\"hb\",\n\t\t\"H\",\n\t\t\"hB\"\n\t],\n\t\"GW\": [\"H\", \"hB\"],\n\t\"GY\": [\n\t\t\"h\",\n\t\t\"hb\",\n\t\t\"H\",\n\t\t\"hB\"\n\t],\n\t\"HK\": [\n\t\t\"h\",\n\t\t\"hB\",\n\t\t\"hb\",\n\t\t\"H\"\n\t],\n\t\"HN\": [\n\t\t\"h\",\n\t\t\"H\",\n\t\t\"hB\",\n\t\t\"hb\"\n\t],\n\t\"HR\": [\"H\", \"hB\"],\n\t\"HU\": [\"H\", \"h\"],\n\t\"IC\": [\n\t\t\"H\",\n\t\t\"h\",\n\t\t\"hB\",\n\t\t\"hb\"\n\t],\n\t\"ID\": [\"H\"],\n\t\"IE\": [\n\t\t\"H\",\n\t\t\"h\",\n\t\t\"hb\",\n\t\t\"hB\"\n\t],\n\t\"IL\": [\"H\", \"hB\"],\n\t\"IM\": [\n\t\t\"H\",\n\t\t\"h\",\n\t\t\"hb\",\n\t\t\"hB\"\n\t],\n\t\"IN\": [\"h\", \"H\"],\n\t\"IO\": [\n\t\t\"H\",\n\t\t\"h\",\n\t\t\"hb\",\n\t\t\"hB\"\n\t],\n\t\"IQ\": [\n\t\t\"h\",\n\t\t\"hB\",\n\t\t\"hb\",\n\t\t\"H\"\n\t],\n\t\"IR\": [\"hB\", \"H\"],\n\t\"IS\": [\"H\"],\n\t\"IT\": [\"H\", \"hB\"],\n\t\"JE\": [\n\t\t\"H\",\n\t\t\"h\",\n\t\t\"hb\",\n\t\t\"hB\"\n\t],\n\t\"JM\": [\n\t\t\"h\",\n\t\t\"hb\",\n\t\t\"H\",\n\t\t\"hB\"\n\t],\n\t\"JO\": [\n\t\t\"h\",\n\t\t\"hB\",\n\t\t\"hb\",\n\t\t\"H\"\n\t],\n\t\"JP\": [\n\t\t\"H\",\n\t\t\"K\",\n\t\t\"h\"\n\t],\n\t\"KE\": [\n\t\t\"hB\",\n\t\t\"hb\",\n\t\t\"H\",\n\t\t\"h\"\n\t],\n\t\"KG\": [\n\t\t\"H\",\n\t\t\"h\",\n\t\t\"hB\",\n\t\t\"hb\"\n\t],\n\t\"KH\": [\n\t\t\"hB\",\n\t\t\"h\",\n\t\t\"H\",\n\t\t\"hb\"\n\t],\n\t\"KI\": [\n\t\t\"h\",\n\t\t\"hb\",\n\t\t\"H\",\n\t\t\"hB\"\n\t],\n\t\"KM\": [\n\t\t\"H\",\n\t\t\"h\",\n\t\t\"hB\",\n\t\t\"hb\"\n\t],\n\t\"KN\": [\n\t\t\"h\",\n\t\t\"hb\",\n\t\t\"H\",\n\t\t\"hB\"\n\t],\n\t\"KP\": [\n\t\t\"h\",\n\t\t\"H\",\n\t\t\"hB\",\n\t\t\"hb\"\n\t],\n\t\"KR\": [\n\t\t\"h\",\n\t\t\"H\",\n\t\t\"hB\",\n\t\t\"hb\"\n\t],\n\t\"KW\": [\n\t\t\"h\",\n\t\t\"hB\",\n\t\t\"hb\",\n\t\t\"H\"\n\t],\n\t\"KY\": [\n\t\t\"h\",\n\t\t\"hb\",\n\t\t\"H\",\n\t\t\"hB\"\n\t],\n\t\"KZ\": [\"H\", \"hB\"],\n\t\"LA\": [\n\t\t\"H\",\n\t\t\"hb\",\n\t\t\"hB\",\n\t\t\"h\"\n\t],\n\t\"LB\": [\n\t\t\"h\",\n\t\t\"hB\",\n\t\t\"hb\",\n\t\t\"H\"\n\t],\n\t\"LC\": [\n\t\t\"h\",\n\t\t\"hb\",\n\t\t\"H\",\n\t\t\"hB\"\n\t],\n\t\"LI\": [\n\t\t\"H\",\n\t\t\"hB\",\n\t\t\"h\"\n\t],\n\t\"LK\": [\n\t\t\"H\",\n\t\t\"h\",\n\t\t\"hB\",\n\t\t\"hb\"\n\t],\n\t\"LR\": [\n\t\t\"h\",\n\t\t\"hb\",\n\t\t\"H\",\n\t\t\"hB\"\n\t],\n\t\"LS\": [\"h\", \"H\"],\n\t\"LT\": [\n\t\t\"H\",\n\t\t\"h\",\n\t\t\"hb\",\n\t\t\"hB\"\n\t],\n\t\"LU\": [\n\t\t\"H\",\n\t\t\"h\",\n\t\t\"hB\"\n\t],\n\t\"LV\": [\n\t\t\"H\",\n\t\t\"hB\",\n\t\t\"hb\",\n\t\t\"h\"\n\t],\n\t\"LY\": [\n\t\t\"h\",\n\t\t\"hB\",\n\t\t\"hb\",\n\t\t\"H\"\n\t],\n\t\"MA\": [\n\t\t\"H\",\n\t\t\"h\",\n\t\t\"hB\",\n\t\t\"hb\"\n\t],\n\t\"MC\": [\"H\", \"hB\"],\n\t\"MD\": [\"H\", \"hB\"],\n\t\"ME\": [\n\t\t\"H\",\n\t\t\"hB\",\n\t\t\"h\"\n\t],\n\t\"MF\": [\"H\", \"hB\"],\n\t\"MG\": [\"H\", \"h\"],\n\t\"MH\": [\n\t\t\"h\",\n\t\t\"hb\",\n\t\t\"H\",\n\t\t\"hB\"\n\t],\n\t\"MK\": [\n\t\t\"H\",\n\t\t\"h\",\n\t\t\"hb\",\n\t\t\"hB\"\n\t],\n\t\"ML\": [\"H\"],\n\t\"MM\": [\n\t\t\"hB\",\n\t\t\"hb\",\n\t\t\"H\",\n\t\t\"h\"\n\t],\n\t\"MN\": [\n\t\t\"H\",\n\t\t\"h\",\n\t\t\"hb\",\n\t\t\"hB\"\n\t],\n\t\"MO\": [\n\t\t\"h\",\n\t\t\"hB\",\n\t\t\"hb\",\n\t\t\"H\"\n\t],\n\t\"MP\": [\n\t\t\"h\",\n\t\t\"hb\",\n\t\t\"H\",\n\t\t\"hB\"\n\t],\n\t\"MQ\": [\"H\", \"hB\"],\n\t\"MR\": [\n\t\t\"h\",\n\t\t\"hB\",\n\t\t\"hb\",\n\t\t\"H\"\n\t],\n\t\"MS\": [\n\t\t\"H\",\n\t\t\"h\",\n\t\t\"hb\",\n\t\t\"hB\"\n\t],\n\t\"MT\": [\"H\", \"h\"],\n\t\"MU\": [\"H\", \"h\"],\n\t\"MV\": [\"H\", \"h\"],\n\t\"MW\": [\n\t\t\"h\",\n\t\t\"hb\",\n\t\t\"H\",\n\t\t\"hB\"\n\t],\n\t\"MX\": [\n\t\t\"h\",\n\t\t\"H\",\n\t\t\"hB\",\n\t\t\"hb\"\n\t],\n\t\"MY\": [\n\t\t\"hb\",\n\t\t\"hB\",\n\t\t\"h\",\n\t\t\"H\"\n\t],\n\t\"MZ\": [\"H\", \"hB\"],\n\t\"NA\": [\n\t\t\"h\",\n\t\t\"H\",\n\t\t\"hB\",\n\t\t\"hb\"\n\t],\n\t\"NC\": [\"H\", \"hB\"],\n\t\"NE\": [\"H\"],\n\t\"NF\": [\n\t\t\"H\",\n\t\t\"h\",\n\t\t\"hb\",\n\t\t\"hB\"\n\t],\n\t\"NG\": [\n\t\t\"H\",\n\t\t\"h\",\n\t\t\"hb\",\n\t\t\"hB\"\n\t],\n\t\"NI\": [\n\t\t\"h\",\n\t\t\"H\",\n\t\t\"hB\",\n\t\t\"hb\"\n\t],\n\t\"NL\": [\"H\", \"hB\"],\n\t\"NO\": [\"H\", \"h\"],\n\t\"NP\": [\n\t\t\"H\",\n\t\t\"h\",\n\t\t\"hB\"\n\t],\n\t\"NR\": [\n\t\t\"H\",\n\t\t\"h\",\n\t\t\"hb\",\n\t\t\"hB\"\n\t],\n\t\"NU\": [\n\t\t\"H\",\n\t\t\"h\",\n\t\t\"hb\",\n\t\t\"hB\"\n\t],\n\t\"NZ\": [\n\t\t\"h\",\n\t\t\"hb\",\n\t\t\"H\",\n\t\t\"hB\"\n\t],\n\t\"OM\": [\n\t\t\"h\",\n\t\t\"hB\",\n\t\t\"hb\",\n\t\t\"H\"\n\t],\n\t\"PA\": [\n\t\t\"h\",\n\t\t\"H\",\n\t\t\"hB\",\n\t\t\"hb\"\n\t],\n\t\"PE\": [\n\t\t\"h\",\n\t\t\"H\",\n\t\t\"hB\",\n\t\t\"hb\"\n\t],\n\t\"PF\": [\n\t\t\"H\",\n\t\t\"h\",\n\t\t\"hB\"\n\t],\n\t\"PG\": [\"h\", \"H\"],\n\t\"PH\": [\n\t\t\"h\",\n\t\t\"hB\",\n\t\t\"hb\",\n\t\t\"H\"\n\t],\n\t\"PK\": [\n\t\t\"h\",\n\t\t\"hB\",\n\t\t\"H\"\n\t],\n\t\"PL\": [\"H\", \"h\"],\n\t\"PM\": [\"H\", \"hB\"],\n\t\"PN\": [\n\t\t\"H\",\n\t\t\"h\",\n\t\t\"hb\",\n\t\t\"hB\"\n\t],\n\t\"PR\": [\n\t\t\"h\",\n\t\t\"H\",\n\t\t\"hB\",\n\t\t\"hb\"\n\t],\n\t\"PS\": [\n\t\t\"h\",\n\t\t\"hB\",\n\t\t\"hb\",\n\t\t\"H\"\n\t],\n\t\"PT\": [\"H\", \"hB\"],\n\t\"PW\": [\"h\", \"H\"],\n\t\"PY\": [\n\t\t\"h\",\n\t\t\"H\",\n\t\t\"hB\",\n\t\t\"hb\"\n\t],\n\t\"QA\": [\n\t\t\"h\",\n\t\t\"hB\",\n\t\t\"hb\",\n\t\t\"H\"\n\t],\n\t\"RE\": [\"H\", \"hB\"],\n\t\"RO\": [\"H\", \"hB\"],\n\t\"RS\": [\n\t\t\"H\",\n\t\t\"hB\",\n\t\t\"h\"\n\t],\n\t\"RU\": [\"H\"],\n\t\"RW\": [\"H\", \"h\"],\n\t\"SA\": [\n\t\t\"h\",\n\t\t\"hB\",\n\t\t\"hb\",\n\t\t\"H\"\n\t],\n\t\"SB\": [\n\t\t\"h\",\n\t\t\"hb\",\n\t\t\"H\",\n\t\t\"hB\"\n\t],\n\t\"SC\": [\n\t\t\"H\",\n\t\t\"h\",\n\t\t\"hB\"\n\t],\n\t\"SD\": [\n\t\t\"h\",\n\t\t\"hB\",\n\t\t\"hb\",\n\t\t\"H\"\n\t],\n\t\"SE\": [\"H\"],\n\t\"SG\": [\n\t\t\"h\",\n\t\t\"hb\",\n\t\t\"H\",\n\t\t\"hB\"\n\t],\n\t\"SH\": [\n\t\t\"H\",\n\t\t\"h\",\n\t\t\"hb\",\n\t\t\"hB\"\n\t],\n\t\"SI\": [\"H\", \"hB\"],\n\t\"SJ\": [\"H\"],\n\t\"SK\": [\"H\"],\n\t\"SL\": [\n\t\t\"h\",\n\t\t\"hb\",\n\t\t\"H\",\n\t\t\"hB\"\n\t],\n\t\"SM\": [\n\t\t\"H\",\n\t\t\"h\",\n\t\t\"hB\"\n\t],\n\t\"SN\": [\n\t\t\"H\",\n\t\t\"h\",\n\t\t\"hB\"\n\t],\n\t\"SO\": [\"h\", \"H\"],\n\t\"SR\": [\"H\", \"hB\"],\n\t\"SS\": [\n\t\t\"h\",\n\t\t\"hb\",\n\t\t\"H\",\n\t\t\"hB\"\n\t],\n\t\"ST\": [\"H\", \"hB\"],\n\t\"SV\": [\n\t\t\"h\",\n\t\t\"H\",\n\t\t\"hB\",\n\t\t\"hb\"\n\t],\n\t\"SX\": [\n\t\t\"H\",\n\t\t\"h\",\n\t\t\"hb\",\n\t\t\"hB\"\n\t],\n\t\"SY\": [\n\t\t\"h\",\n\t\t\"hB\",\n\t\t\"hb\",\n\t\t\"H\"\n\t],\n\t\"SZ\": [\n\t\t\"h\",\n\t\t\"hb\",\n\t\t\"H\",\n\t\t\"hB\"\n\t],\n\t\"TA\": [\n\t\t\"H\",\n\t\t\"h\",\n\t\t\"hb\",\n\t\t\"hB\"\n\t],\n\t\"TC\": [\n\t\t\"h\",\n\t\t\"hb\",\n\t\t\"H\",\n\t\t\"hB\"\n\t],\n\t\"TD\": [\n\t\t\"h\",\n\t\t\"H\",\n\t\t\"hB\"\n\t],\n\t\"TF\": [\n\t\t\"H\",\n\t\t\"h\",\n\t\t\"hB\"\n\t],\n\t\"TG\": [\"H\", \"hB\"],\n\t\"TH\": [\"H\", \"h\"],\n\t\"TJ\": [\"H\", \"h\"],\n\t\"TL\": [\n\t\t\"H\",\n\t\t\"hB\",\n\t\t\"hb\",\n\t\t\"h\"\n\t],\n\t\"TM\": [\"H\", \"h\"],\n\t\"TN\": [\n\t\t\"h\",\n\t\t\"hB\",\n\t\t\"hb\",\n\t\t\"H\"\n\t],\n\t\"TO\": [\"h\", \"H\"],\n\t\"TR\": [\"H\", \"hB\"],\n\t\"TT\": [\n\t\t\"h\",\n\t\t\"hb\",\n\t\t\"H\",\n\t\t\"hB\"\n\t],\n\t\"TW\": [\n\t\t\"hB\",\n\t\t\"hb\",\n\t\t\"h\",\n\t\t\"H\"\n\t],\n\t\"TZ\": [\n\t\t\"hB\",\n\t\t\"hb\",\n\t\t\"H\",\n\t\t\"h\"\n\t],\n\t\"UA\": [\n\t\t\"H\",\n\t\t\"hB\",\n\t\t\"h\"\n\t],\n\t\"UG\": [\n\t\t\"hB\",\n\t\t\"hb\",\n\t\t\"H\",\n\t\t\"h\"\n\t],\n\t\"UM\": [\n\t\t\"h\",\n\t\t\"hb\",\n\t\t\"H\",\n\t\t\"hB\"\n\t],\n\t\"US\": [\n\t\t\"h\",\n\t\t\"hb\",\n\t\t\"H\",\n\t\t\"hB\"\n\t],\n\t\"UY\": [\n\t\t\"h\",\n\t\t\"H\",\n\t\t\"hB\",\n\t\t\"hb\"\n\t],\n\t\"UZ\": [\n\t\t\"H\",\n\t\t\"hB\",\n\t\t\"h\"\n\t],\n\t\"VA\": [\n\t\t\"H\",\n\t\t\"h\",\n\t\t\"hB\"\n\t],\n\t\"VC\": [\n\t\t\"h\",\n\t\t\"hb\",\n\t\t\"H\",\n\t\t\"hB\"\n\t],\n\t\"VE\": [\n\t\t\"h\",\n\t\t\"H\",\n\t\t\"hB\",\n\t\t\"hb\"\n\t],\n\t\"VG\": [\n\t\t\"h\",\n\t\t\"hb\",\n\t\t\"H\",\n\t\t\"hB\"\n\t],\n\t\"VI\": [\n\t\t\"h\",\n\t\t\"hb\",\n\t\t\"H\",\n\t\t\"hB\"\n\t],\n\t\"VN\": [\"H\", \"h\"],\n\t\"VU\": [\"h\", \"H\"],\n\t\"WF\": [\"H\", \"hB\"],\n\t\"WS\": [\"h\", \"H\"],\n\t\"XK\": [\n\t\t\"H\",\n\t\t\"hB\",\n\t\t\"h\"\n\t],\n\t\"YE\": [\n\t\t\"h\",\n\t\t\"hB\",\n\t\t\"hb\",\n\t\t\"H\"\n\t],\n\t\"YT\": [\"H\", \"hB\"],\n\t\"ZA\": [\n\t\t\"H\",\n\t\t\"h\",\n\t\t\"hb\",\n\t\t\"hB\"\n\t],\n\t\"ZM\": [\n\t\t\"h\",\n\t\t\"hb\",\n\t\t\"H\",\n\t\t\"hB\"\n\t],\n\t\"ZW\": [\"H\", \"h\"],\n\t\"af-ZA\": [\n\t\t\"H\",\n\t\t\"h\",\n\t\t\"hB\",\n\t\t\"hb\"\n\t],\n\t\"ar-001\": [\n\t\t\"h\",\n\t\t\"hB\",\n\t\t\"hb\",\n\t\t\"H\"\n\t],\n\t\"ca-ES\": [\n\t\t\"H\",\n\t\t\"h\",\n\t\t\"hB\"\n\t],\n\t\"en-001\": [\n\t\t\"h\",\n\t\t\"hb\",\n\t\t\"H\",\n\t\t\"hB\"\n\t],\n\t\"en-HK\": [\n\t\t\"h\",\n\t\t\"hb\",\n\t\t\"H\",\n\t\t\"hB\"\n\t],\n\t\"en-IL\": [\n\t\t\"H\",\n\t\t\"h\",\n\t\t\"hb\",\n\t\t\"hB\"\n\t],\n\t\"en-MY\": [\n\t\t\"h\",\n\t\t\"hb\",\n\t\t\"H\",\n\t\t\"hB\"\n\t],\n\t\"es-BR\": [\n\t\t\"H\",\n\t\t\"h\",\n\t\t\"hB\",\n\t\t\"hb\"\n\t],\n\t\"es-ES\": [\n\t\t\"H\",\n\t\t\"h\",\n\t\t\"hB\",\n\t\t\"hb\"\n\t],\n\t\"es-GQ\": [\n\t\t\"H\",\n\t\t\"h\",\n\t\t\"hB\",\n\t\t\"hb\"\n\t],\n\t\"fr-CA\": [\n\t\t\"H\",\n\t\t\"h\",\n\t\t\"hB\"\n\t],\n\t\"gl-ES\": [\n\t\t\"H\",\n\t\t\"h\",\n\t\t\"hB\"\n\t],\n\t\"gu-IN\": [\n\t\t\"hB\",\n\t\t\"hb\",\n\t\t\"h\",\n\t\t\"H\"\n\t],\n\t\"hi-IN\": [\n\t\t\"hB\",\n\t\t\"h\",\n\t\t\"H\"\n\t],\n\t\"it-CH\": [\n\t\t\"H\",\n\t\t\"h\",\n\t\t\"hB\"\n\t],\n\t\"it-IT\": [\n\t\t\"H\",\n\t\t\"h\",\n\t\t\"hB\"\n\t],\n\t\"kn-IN\": [\n\t\t\"hB\",\n\t\t\"h\",\n\t\t\"H\"\n\t],\n\t\"ku-SY\": [\"H\", \"hB\"],\n\t\"ml-IN\": [\n\t\t\"hB\",\n\t\t\"h\",\n\t\t\"H\"\n\t],\n\t\"mr-IN\": [\n\t\t\"hB\",\n\t\t\"hb\",\n\t\t\"h\",\n\t\t\"H\"\n\t],\n\t\"pa-IN\": [\n\t\t\"hB\",\n\t\t\"hb\",\n\t\t\"h\",\n\t\t\"H\"\n\t],\n\t\"ta-IN\": [\n\t\t\"hB\",\n\t\t\"h\",\n\t\t\"hb\",\n\t\t\"H\"\n\t],\n\t\"te-IN\": [\n\t\t\"hB\",\n\t\t\"h\",\n\t\t\"H\"\n\t],\n\t\"zu-ZA\": [\n\t\t\"H\",\n\t\t\"hB\",\n\t\t\"hb\",\n\t\t\"h\"\n\t]\n};\n//#endregion\n//#region packages/icu-messageformat-parser/date-time-pattern-generator.ts\n/**\n* Returns the best matching date time pattern if a date time skeleton\n* pattern is provided with a locale. Follows the Unicode specification:\n* https://www.unicode.org/reports/tr35/tr35-dates.html#table-mapping-requested-time-skeletons-to-patterns\n* @param skeleton date time skeleton pattern that possibly includes j, J or C\n* @param locale\n*/\nfunction getBestPattern(skeleton, locale) {\n\tlet skeletonCopy = \"\";\n\tfor (let patternPos = 0; patternPos < skeleton.length; patternPos++) {\n\t\tconst patternChar = skeleton.charAt(patternPos);\n\t\tif (patternChar === \"j\") {\n\t\t\tlet extraLength = 0;\n\t\t\twhile (patternPos + 1 < skeleton.length && skeleton.charAt(patternPos + 1) === patternChar) {\n\t\t\t\textraLength++;\n\t\t\t\tpatternPos++;\n\t\t\t}\n\t\t\tlet hourLen = 1 + (extraLength & 1);\n\t\t\tlet dayPeriodLen = extraLength < 2 ? 1 : 3 + (extraLength >> 1);\n\t\t\tlet dayPeriodChar = \"a\";\n\t\t\tlet hourChar = getDefaultHourSymbolFromLocale(locale);\n\t\t\tif (hourChar == \"H\" || hourChar == \"k\") dayPeriodLen = 0;\n\t\t\twhile (dayPeriodLen-- > 0) skeletonCopy += dayPeriodChar;\n\t\t\twhile (hourLen-- > 0) skeletonCopy = hourChar + skeletonCopy;\n\t\t} else if (patternChar === \"J\") skeletonCopy += \"H\";\n\t\telse skeletonCopy += patternChar;\n\t}\n\treturn skeletonCopy;\n}\n/**\n* Maps the [hour cycle type](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/Locale/hourCycle)\n* of the given `locale` to the corresponding time pattern.\n* @param locale\n*/\nfunction getDefaultHourSymbolFromLocale(locale) {\n\tlet hourCycle = locale.hourCycle;\n\tif (hourCycle === void 0 && locale.hourCycles && locale.hourCycles.length) hourCycle = locale.hourCycles[0];\n\tif (hourCycle) switch (hourCycle) {\n\t\tcase \"h24\": return \"k\";\n\t\tcase \"h23\": return \"H\";\n\t\tcase \"h12\": return \"h\";\n\t\tcase \"h11\": return \"K\";\n\t\tdefault: throw new Error(\"Invalid hourCycle\");\n\t}\n\tconst languageTag = locale.language;\n\tlet regionTag;\n\tif (languageTag !== \"root\") regionTag = locale.maximize().region;\n\treturn (timeData[regionTag || \"\"] || timeData[languageTag || \"\"] || timeData[`${languageTag}-001`] || timeData[\"001\"])[0];\n}\n//#endregion\n//#region packages/icu-messageformat-parser/parser.ts\nconst SPACE_SEPARATOR_START_REGEX = new RegExp(`^${SPACE_SEPARATOR_REGEX.source}*`);\nconst SPACE_SEPARATOR_END_REGEX = new RegExp(`${SPACE_SEPARATOR_REGEX.source}*$`);\nfunction createLocation(start, end) {\n\treturn {\n\t\tstart,\n\t\tend\n\t};\n}\nconst hasNativeFromEntries = !!Object.fromEntries;\nconst hasTrimStart = !!String.prototype.trimStart;\nconst hasTrimEnd = !!String.prototype.trimEnd;\nconst fromEntries = hasNativeFromEntries ? Object.fromEntries : function fromEntries(entries) {\n\tconst obj = {};\n\tfor (const [k, v] of entries) obj[k] = v;\n\treturn obj;\n};\nconst trimStart = hasTrimStart ? function trimStart(s) {\n\treturn s.trimStart();\n} : function trimStart(s) {\n\treturn s.replace(SPACE_SEPARATOR_START_REGEX, \"\");\n};\nconst trimEnd = hasTrimEnd ? function trimEnd(s) {\n\treturn s.trimEnd();\n} : function trimEnd(s) {\n\treturn s.replace(SPACE_SEPARATOR_END_REGEX, \"\");\n};\nconst IDENTIFIER_PREFIX_RE = /* @__PURE__ */ new RegExp(\"([^\\\\p{White_Space}\\\\p{Pattern_Syntax}]*)\", \"yu\");\nfunction matchIdentifierAtIndex(s, index) {\n\tIDENTIFIER_PREFIX_RE.lastIndex = index;\n\treturn IDENTIFIER_PREFIX_RE.exec(s)[1] ?? \"\";\n}\nfunction plainTopLevelEndPosition(message) {\n\tif (message.length === 0) return null;\n\tlet line = 1;\n\tlet column = 1;\n\tfor (let offset = 0; offset < message.length;) {\n\t\tconst code = message.charCodeAt(offset);\n\t\tswitch (code) {\n\t\t\tcase 35:\n\t\t\tcase 39:\n\t\t\tcase 60:\n\t\t\tcase 123:\n\t\t\tcase 125: return null;\n\t\t}\n\t\tif (code === 10) {\n\t\t\tline++;\n\t\t\tcolumn = 1;\n\t\t\toffset++;\n\t\t} else {\n\t\t\tcolumn++;\n\t\t\tif (code >= 55296 && code <= 56319 && offset + 1 < message.length) {\n\t\t\t\tconst next = message.charCodeAt(offset + 1);\n\t\t\t\toffset += next >= 56320 && next <= 57343 ? 2 : 1;\n\t\t\t} else offset++;\n\t\t}\n\t}\n\treturn {\n\t\toffset: message.length,\n\t\tline,\n\t\tcolumn\n\t};\n}\nvar Parser = class {\n\tconstructor(message, options = {}) {\n\t\tthis.message = message;\n\t\tthis.position = {\n\t\t\toffset: 0,\n\t\t\tline: 1,\n\t\t\tcolumn: 1\n\t\t};\n\t\tthis.ignoreTag = !!options.ignoreTag;\n\t\tthis.locale = options.locale;\n\t\tthis.requiresOtherClause = !!options.requiresOtherClause;\n\t\tthis.shouldParseSkeletons = !!options.shouldParseSkeletons;\n\t}\n\tparse() {\n\t\tif (this.offset() !== 0) throw Error(\"parser can only be used once\");\n\t\tif (this.message.length > 0) {\n\t\t\tconst firstCode = this.message.charCodeAt(0);\n\t\t\tif (firstCode !== 35 && firstCode !== 39 && firstCode !== 60 && firstCode !== 123 && firstCode !== 125) {\n\t\t\t\tconst plainEndPosition = plainTopLevelEndPosition(this.message);\n\t\t\t\tif (plainEndPosition) {\n\t\t\t\t\tconst start = this.clonePosition();\n\t\t\t\t\tthis.position = plainEndPosition;\n\t\t\t\t\treturn {\n\t\t\t\t\t\tval: [{\n\t\t\t\t\t\t\ttype: 0,\n\t\t\t\t\t\t\tvalue: this.message,\n\t\t\t\t\t\t\tlocation: createLocation(start, this.clonePosition())\n\t\t\t\t\t\t}],\n\t\t\t\t\t\terr: null\n\t\t\t\t\t};\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn this.parseMessage(0, \"\", false);\n\t}\n\tparseMessage(nestingLevel, parentArgType, expectingCloseTag) {\n\t\tlet elements = [];\n\t\twhile (!this.isEOF()) {\n\t\t\tconst char = this.char();\n\t\t\tif (char === 123) {\n\t\t\t\tconst result = this.parseArgument(nestingLevel, expectingCloseTag);\n\t\t\t\tif (result.err) return result;\n\t\t\t\telements.push(result.val);\n\t\t\t} else if (char === 125 && nestingLevel > 0) break;\n\t\t\telse if (char === 35 && (parentArgType === \"plural\" || parentArgType === \"selectordinal\")) {\n\t\t\t\tconst position = this.clonePosition();\n\t\t\t\tthis.bump();\n\t\t\t\telements.push({\n\t\t\t\t\ttype: 7,\n\t\t\t\t\tlocation: createLocation(position, this.clonePosition())\n\t\t\t\t});\n\t\t\t} else if (char === 60 && !this.ignoreTag && this.peek() === 47) if (expectingCloseTag) break;\n\t\t\telse return this.error(26, createLocation(this.clonePosition(), this.clonePosition()));\n\t\t\telse if (char === 60 && !this.ignoreTag && _isAlpha(this.peek() || 0)) {\n\t\t\t\tconst result = this.parseTag(nestingLevel, parentArgType);\n\t\t\t\tif (result.err) return result;\n\t\t\t\telements.push(result.val);\n\t\t\t} else {\n\t\t\t\tconst result = this.parseLiteral(nestingLevel, parentArgType);\n\t\t\t\tif (result.err) return result;\n\t\t\t\telements.push(result.val);\n\t\t\t}\n\t\t}\n\t\treturn {\n\t\t\tval: elements,\n\t\t\terr: null\n\t\t};\n\t}\n\t/**\n\t* A tag name must start with an ASCII lower/upper case letter. The grammar is based on the\n\t* [custom element name][] except that a dash is NOT always mandatory and uppercase letters\n\t* are accepted:\n\t*\n\t* ```\n\t* tag ::= \"<\" tagName (whitespace)* \"/>\" | \"<\" tagName (whitespace)* \">\" message \"</\" tagName (whitespace)* \">\"\n\t* tagName ::= [a-z] (PENChar)*\n\t* PENChar ::=\n\t* \"-\" | \".\" | [0-9] | \"_\" | [a-z] | [A-Z] | #xB7 | [#xC0-#xD6] | [#xD8-#xF6] | [#xF8-#x37D] |\n\t* [#x37F-#x1FFF] | [#x200C-#x200D] | [#x203F-#x2040] | [#x2070-#x218F] | [#x2C00-#x2FEF] |\n\t* [#x3001-#xD7FF] | [#xF900-#xFDCF] | [#xFDF0-#xFFFD] | [#x10000-#xEFFFF]\n\t* ```\n\t*\n\t* [custom element name]: https://html.spec.whatwg.org/multipage/custom-elements.html#valid-custom-element-name\n\t* NOTE: We're a bit more lax here since HTML technically does not allow uppercase HTML element but we do\n\t* since other tag-based engines like React allow it\n\t*/\n\tparseTag(nestingLevel, parentArgType) {\n\t\tconst startPosition = this.clonePosition();\n\t\tthis.bump();\n\t\tconst tagName = this.parseTagName();\n\t\tthis.bumpSpace();\n\t\tif (this.bumpIf(\"/>\")) return {\n\t\t\tval: {\n\t\t\t\ttype: 0,\n\t\t\t\tvalue: `<${tagName}/>`,\n\t\t\t\tlocation: createLocation(startPosition, this.clonePosition())\n\t\t\t},\n\t\t\terr: null\n\t\t};\n\t\telse if (this.bumpIf(\">\")) {\n\t\t\tconst childrenResult = this.parseMessage(nestingLevel + 1, parentArgType, true);\n\t\t\tif (childrenResult.err) return childrenResult;\n\t\t\tconst children = childrenResult.val;\n\t\t\tconst endTagStartPosition = this.clonePosition();\n\t\t\tif (this.bumpIf(\"</\")) {\n\t\t\t\tif (this.isEOF() || !_isAlpha(this.char())) return this.error(23, createLocation(endTagStartPosition, this.clonePosition()));\n\t\t\t\tconst closingTagNameStartPosition = this.clonePosition();\n\t\t\t\tif (tagName !== this.parseTagName()) return this.error(26, createLocation(closingTagNameStartPosition, this.clonePosition()));\n\t\t\t\tthis.bumpSpace();\n\t\t\t\tif (!this.bumpIf(\">\")) return this.error(23, createLocation(endTagStartPosition, this.clonePosition()));\n\t\t\t\treturn {\n\t\t\t\t\tval: {\n\t\t\t\t\t\ttype: 8,\n\t\t\t\t\t\tvalue: tagName,\n\t\t\t\t\t\tchildren,\n\t\t\t\t\t\tlocation: createLocation(startPosition, this.clonePosition())\n\t\t\t\t\t},\n\t\t\t\t\terr: null\n\t\t\t\t};\n\t\t\t} else return this.error(27, createLocation(startPosition, this.clonePosition()));\n\t\t} else return this.error(23, createLocation(startPosition, this.clonePosition()));\n\t}\n\t/**\n\t* This method assumes that the caller has peeked ahead for the first tag character.\n\t*/\n\tparseTagName() {\n\t\tconst startOffset = this.offset();\n\t\tthis.bump();\n\t\twhile (!this.isEOF() && _isPotentialElementNameChar(this.char())) this.bump();\n\t\treturn this.message.slice(startOffset, this.offset());\n\t}\n\tparseLiteral(nestingLevel, parentArgType) {\n\t\tconst start = this.clonePosition();\n\t\tlet value = \"\";\n\t\twhile (true) {\n\t\t\tconst parseQuoteResult = this.tryParseQuote(parentArgType);\n\t\t\tif (parseQuoteResult) {\n\t\t\t\tvalue += parseQuoteResult;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tconst parseUnquotedResult = this.tryParseUnquoted(nestingLevel, parentArgType);\n\t\t\tif (parseUnquotedResult) {\n\t\t\t\tvalue += parseUnquotedResult;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tconst parseLeftAngleResult = this.tryParseLeftAngleBracket();\n\t\t\tif (parseLeftAngleResult) {\n\t\t\t\tvalue += parseLeftAngleResult;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tbreak;\n\t\t}\n\t\tconst location = createLocation(start, this.clonePosition());\n\t\treturn {\n\t\t\tval: {\n\t\t\t\ttype: 0,\n\t\t\t\tvalue,\n\t\t\t\tlocation\n\t\t\t},\n\t\t\terr: null\n\t\t};\n\t}\n\ttryParseLeftAngleBracket() {\n\t\tif (!this.isEOF() && this.char() === 60 && (this.ignoreTag || !_isAlphaOrSlash(this.peek() || 0))) {\n\t\t\tthis.bump();\n\t\t\treturn \"<\";\n\t\t}\n\t\treturn null;\n\t}\n\t/**\n\t* Starting with ICU 4.8, an ASCII apostrophe only starts quoted text if it immediately precedes\n\t* a character that requires quoting (that is, \"only where needed\"), and works the same in\n\t* nested messages as on the top level of the pattern. The new behavior is otherwise compatible.\n\t*/\n\ttryParseQuote(parentArgType) {\n\t\tif (this.isEOF() || this.char() !== 39) return null;\n\t\tswitch (this.peek()) {\n\t\t\tcase 39:\n\t\t\t\tthis.bump();\n\t\t\t\tthis.bump();\n\t\t\t\treturn \"'\";\n\t\t\tcase 123:\n\t\t\tcase 60:\n\t\t\tcase 62:\n\t\t\tcase 125: break;\n\t\t\tcase 35:\n\t\t\t\tif (parentArgType === \"plural\" || parentArgType === \"selectordinal\") break;\n\t\t\t\treturn null;\n\t\t\tdefault: return null;\n\t\t}\n\t\tthis.bump();\n\t\tconst codePoints = [this.char()];\n\t\tthis.bump();\n\t\twhile (!this.isEOF()) {\n\t\t\tconst ch = this.char();\n\t\t\tif (ch === 39) if (this.peek() === 39) {\n\t\t\t\tcodePoints.push(39);\n\t\t\t\tthis.bump();\n\t\t\t} else {\n\t\t\t\tthis.bump();\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\telse codePoints.push(ch);\n\t\t\tthis.bump();\n\t\t}\n\t\treturn String.fromCodePoint(...codePoints);\n\t}\n\ttryParseUnquoted(nestingLevel, parentArgType) {\n\t\tif (this.isEOF()) return null;\n\t\tconst ch = this.char();\n\t\tif (ch === 60 || ch === 123 || ch === 35 && (parentArgType === \"plural\" || parentArgType === \"selectordinal\") || ch === 125 && nestingLevel > 0) return null;\n\t\telse {\n\t\t\tthis.bump();\n\t\t\treturn String.fromCodePoint(ch);\n\t\t}\n\t}\n\tparseArgument(nestingLevel, expectingCloseTag) {\n\t\tconst openingBracePosition = this.clonePosition();\n\t\tthis.bump();\n\t\tthis.bumpSpace();\n\t\tif (this.isEOF()) return this.error(1, createLocation(openingBracePosition, this.clonePosition()));\n\t\tif (this.char() === 125) {\n\t\t\tthis.bump();\n\t\t\treturn this.error(2, createLocation(openingBracePosition, this.clonePosition()));\n\t\t}\n\t\tlet value = this.parseIdentifierIfPossible().value;\n\t\tif (!value) return this.error(3, createLocation(openingBracePosition, this.clonePosition()));\n\t\tthis.bumpSpace();\n\t\tif (this.isEOF()) return this.error(1, createLocation(openingBracePosition, this.clonePosition()));\n\t\tswitch (this.char()) {\n\t\t\tcase 125:\n\t\t\t\tthis.bump();\n\t\t\t\treturn {\n\t\t\t\t\tval: {\n\t\t\t\t\t\ttype: 1,\n\t\t\t\t\t\tvalue,\n\t\t\t\t\t\tlocation: createLocation(openingBracePosition, this.clonePosition())\n\t\t\t\t\t},\n\t\t\t\t\terr: null\n\t\t\t\t};\n\t\t\tcase 44:\n\t\t\t\tthis.bump();\n\t\t\t\tthis.bumpSpace();\n\t\t\t\tif (this.isEOF()) return this.error(1, createLocation(openingBracePosition, this.clonePosition()));\n\t\t\t\treturn this.parseArgumentOptions(nestingLevel, expectingCloseTag, value, openingBracePosition);\n\t\t\tdefault: return this.error(3, createLocation(openingBracePosition, this.clonePosition()));\n\t\t}\n\t}\n\t/**\n\t* Advance the parser until the end of the identifier, if it is currently on\n\t* an identifier character. Return an empty string otherwise.\n\t*/\n\tparseIdentifierIfPossible() {\n\t\tconst startingPosition = this.clonePosition();\n\t\tconst startOffset = this.offset();\n\t\tconst value = matchIdentifierAtIndex(this.message, startOffset);\n\t\tconst endOffset = startOffset + value.length;\n\t\tthis.bumpTo(endOffset);\n\t\treturn {\n\t\t\tvalue,\n\t\t\tlocation: createLocation(startingPosition, this.clonePosition())\n\t\t};\n\t}\n\tparseArgumentOptions(nestingLevel, expectingCloseTag, value, openingBracePosition) {\n\t\tlet typeStartPosition = this.clonePosition();\n\t\tlet argType = this.parseIdentifierIfPossible().value;\n\t\tlet typeEndPosition = this.clonePosition();\n\t\tswitch (argType) {\n\t\t\tcase \"\": return this.error(4, createLocation(typeStartPosition, typeEndPosition));\n\t\t\tcase \"number\":\n\t\t\tcase \"date\":\n\t\t\tcase \"time\": {\n\t\t\t\tthis.bumpSpace();\n\t\t\t\tlet styleAndLocation = null;\n\t\t\t\tif (this.bumpIf(\",\")) {\n\t\t\t\t\tthis.bumpSpace();\n\t\t\t\t\tconst styleStartPosition = this.clonePosition();\n\t\t\t\t\tconst result = this.parseSimpleArgStyleIfPossible();\n\t\t\t\t\tif (result.err) return result;\n\t\t\t\t\tconst style = trimEnd(result.val);\n\t\t\t\t\tif (style.length === 0) return this.error(6, createLocation(this.clonePosition(), this.clonePosition()));\n\t\t\t\t\tstyleAndLocation = {\n\t\t\t\t\t\tstyle,\n\t\t\t\t\t\tstyleLocation: createLocation(styleStartPosition, this.clonePosition())\n\t\t\t\t\t};\n\t\t\t\t}\n\t\t\t\tconst argCloseResult = this.tryParseArgumentClose(openingBracePosition);\n\t\t\t\tif (argCloseResult.err) return argCloseResult;\n\t\t\t\tconst location = createLocation(openingBracePosition, this.clonePosition());\n\t\t\t\tif (styleAndLocation && styleAndLocation.style.startsWith(\"::\")) {\n\t\t\t\t\tlet skeleton = trimStart(styleAndLocation.style.slice(2));\n\t\t\t\t\tif (argType === \"number\") {\n\t\t\t\t\t\tconst result = this.parseNumberSkeletonFromString(skeleton, styleAndLocation.styleLocation);\n\t\t\t\t\t\tif (result.err) return result;\n\t\t\t\t\t\treturn {\n\t\t\t\t\t\t\tval: {\n\t\t\t\t\t\t\t\ttype: 2,\n\t\t\t\t\t\t\t\tvalue,\n\t\t\t\t\t\t\t\tlocation,\n\t\t\t\t\t\t\t\tstyle: result.val\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\terr: null\n\t\t\t\t\t\t};\n\t\t\t\t\t} else {\n\t\t\t\t\t\tif (skeleton.length === 0) return this.error(10, location);\n\t\t\t\t\t\tlet dateTimePattern = skeleton;\n\t\t\t\t\t\tif (this.locale) dateTimePattern = getBestPattern(skeleton, this.locale);\n\t\t\t\t\t\tconst style = {\n\t\t\t\t\t\t\ttype: 1,\n\t\t\t\t\t\t\tpattern: dateTimePattern,\n\t\t\t\t\t\t\tlocation: styleAndLocation.styleLocation,\n\t\t\t\t\t\t\tparsedOptions: this.shouldParseSkeletons ? parseDateTimeSkeleton(dateTimePattern) : {}\n\t\t\t\t\t\t};\n\t\t\t\t\t\treturn {\n\t\t\t\t\t\t\tval: {\n\t\t\t\t\t\t\t\ttype: argType === \"date\" ? 3 : 4,\n\t\t\t\t\t\t\t\tvalue,\n\t\t\t\t\t\t\t\tlocation,\n\t\t\t\t\t\t\t\tstyle\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\terr: null\n\t\t\t\t\t\t};\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn {\n\t\t\t\t\tval: {\n\t\t\t\t\t\ttype: argType === \"number\" ? 2 : argType === \"date\" ? 3 : 4,\n\t\t\t\t\t\tvalue,\n\t\t\t\t\t\tlocation,\n\t\t\t\t\t\tstyle: styleAndLocation?.style ?? null\n\t\t\t\t\t},\n\t\t\t\t\terr: null\n\t\t\t\t};\n\t\t\t}\n\t\t\tcase \"plural\":\n\t\t\tcase \"selectordinal\":\n\t\t\tcase \"select\": {\n\t\t\t\tconst typeEndPosition = this.clonePosition();\n\t\t\t\tthis.bumpSpace();\n\t\t\t\tif (!this.bumpIf(\",\")) return this.error(12, createLocation(typeEndPosition, { ...typeEndPosition }));\n\t\t\t\tthis.bumpSpace();\n\t\t\t\tlet identifierAndLocation = this.parseIdentifierIfPossible();\n\t\t\t\tlet pluralOffset = 0;\n\t\t\t\tif (argType !== \"select\" && identifierAndLocation.value === \"offset\") {\n\t\t\t\t\tif (!this.bumpIf(\":\")) return this.error(13, createLocation(this.clonePosition(), this.clonePosition()));\n\t\t\t\t\tthis.bumpSpace();\n\t\t\t\t\tconst result = this.tryParseDecimalInteger(13, 14);\n\t\t\t\t\tif (result.err) return result;\n\t\t\t\t\tthis.bumpSpace();\n\t\t\t\t\tidentifierAndLocation = this.parseIdentifierIfPossible();\n\t\t\t\t\tpluralOffset = result.val;\n\t\t\t\t}\n\t\t\t\tconst optionsResult = this.tryParsePluralOrSelectOptions(nestingLevel, argType, expectingCloseTag, identifierAndLocation);\n\t\t\t\tif (optionsResult.err) return optionsResult;\n\t\t\t\tconst argCloseResult = this.tryParseArgumentClose(openingBracePosition);\n\t\t\t\tif (argCloseResult.err) return argCloseResult;\n\t\t\t\tconst location = createLocation(openingBracePosition, this.clonePosition());\n\t\t\t\tif (argType === \"select\") return {\n\t\t\t\t\tval: {\n\t\t\t\t\t\ttype: 5,\n\t\t\t\t\t\tvalue,\n\t\t\t\t\t\toptions: fromEntries(optionsResult.val),\n\t\t\t\t\t\tlocation\n\t\t\t\t\t},\n\t\t\t\t\terr: null\n\t\t\t\t};\n\t\t\t\telse return {\n\t\t\t\t\tval: {\n\t\t\t\t\t\ttype: 6,\n\t\t\t\t\t\tvalue,\n\t\t\t\t\t\toptions: fromEntries(optionsResult.val),\n\t\t\t\t\t\toffset: pluralOffset,\n\t\t\t\t\t\tpluralType: argType === \"plural\" ? \"cardinal\" : \"ordinal\",\n\t\t\t\t\t\tlocation\n\t\t\t\t\t},\n\t\t\t\t\terr: null\n\t\t\t\t};\n\t\t\t}\n\t\t\tdefault: return this.error(5, createLocation(typeStartPosition, typeEndPosition));\n\t\t}\n\t}\n\ttryParseArgumentClose(openingBracePosition) {\n\t\tif (this.isEOF() || this.char() !== 125) return this.error(1, createLocation(openingBracePosition, this.clonePosition()));\n\t\tthis.bump();\n\t\treturn {\n\t\t\tval: true,\n\t\t\terr: null\n\t\t};\n\t}\n\t/**\n\t* See: https://github.com/unicode-org/icu/blob/af7ed1f6d2298013dc303628438ec4abe1f16479/icu4c/source/common/messagepattern.cpp#L659\n\t*/\n\tparseSimpleArgStyleIfPossible() {\n\t\tlet nestedBraces = 0;\n\t\tconst startPosition = this.clonePosition();\n\t\twhile (!this.isEOF()) switch (this.char()) {\n\t\t\tcase 39: {\n\t\t\t\tthis.bump();\n\t\t\t\tlet apostrophePosition = this.clonePosition();\n\t\t\t\tif (!this.bumpUntil(\"'\")) return this.error(11, createLocation(apostrophePosition, this.clonePosition()));\n\t\t\t\tthis.bump();\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase 123:\n\t\t\t\tnestedBraces += 1;\n\t\t\t\tthis.bump();\n\t\t\t\tbreak;\n\t\t\tcase 125:\n\t\t\t\tif (nestedBraces > 0) nestedBraces -= 1;\n\t\t\t\telse return {\n\t\t\t\t\tval: this.message.slice(startPosition.offset, this.offset()),\n\t\t\t\t\terr: null\n\t\t\t\t};\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tthis.bump();\n\t\t\t\tbreak;\n\t\t}\n\t\treturn {\n\t\t\tval: this.message.slice(startPosition.offset, this.offset()),\n\t\t\terr: null\n\t\t};\n\t}\n\tparseNumberSkeletonFromString(skeleton, location) {\n\t\tlet tokens = [];\n\t\ttry {\n\t\t\ttokens = parseNumberSkeletonFromString(skeleton);\n\t\t} catch {\n\t\t\treturn this.error(7, location);\n\t\t}\n\t\treturn {\n\t\t\tval: {\n\t\t\t\ttype: 0,\n\t\t\t\ttokens,\n\t\t\t\tlocation,\n\t\t\t\tparsedOptions: this.shouldParseSkeletons ? parseNumberSkeleton(tokens) : {}\n\t\t\t},\n\t\t\terr: null\n\t\t};\n\t}\n\t/**\n\t* @param nesting_level The current nesting level of messages.\n\t* This can be positive when parsing message fragment in select or plural argument options.\n\t* @param parent_arg_type The parent argument's type.\n\t* @param parsed_first_identifier If provided, this is the first identifier-like selector of\n\t* the argument. It is a by-product of a previous parsing attempt.\n\t* @param expecting_close_tag If true, this message is directly or indirectly nested inside\n\t* between a pair of opening and closing tags. The nested message will not parse beyond\n\t* the closing tag boundary.\n\t*/\n\ttryParsePluralOrSelectOptions(nestingLevel, parentArgType, expectCloseTag, parsedFirstIdentifier) {\n\t\tlet hasOtherClause = false;\n\t\tconst options = [];\n\t\tconst parsedSelectors = /* @__PURE__ */ new Set();\n\t\tlet { value: selector, location: selectorLocation } = parsedFirstIdentifier;\n\t\twhile (true) {\n\t\t\tif (selector.length === 0) {\n\t\t\t\tconst startPosition = this.clonePosition();\n\t\t\t\tif (parentArgType !== \"select\" && this.bumpIf(\"=\")) {\n\t\t\t\t\tconst result = this.tryParseDecimalInteger(16, 19);\n\t\t\t\t\tif (result.err) return result;\n\t\t\t\t\tselectorLocation = createLocation(startPosition, this.clonePosition());\n\t\t\t\t\tselector = this.message.slice(startPosition.offset, this.offset());\n\t\t\t\t} else break;\n\t\t\t}\n\t\t\tif (parsedSelectors.has(selector)) return this.error(parentArgType === \"select\" ? 21 : 20, selectorLocation);\n\t\t\tif (selector === \"other\") hasOtherClause = true;\n\t\t\tthis.bumpSpace();\n\t\t\tconst openingBracePosition = this.clonePosition();\n\t\t\tif (!this.bumpIf(\"{\")) return this.error(parentArgType === \"select\" ? 17 : 18, createLocation(this.clonePosition(), this.clonePosition()));\n\t\t\tconst fragmentResult = this.parseMessage(nestingLevel + 1, parentArgType, expectCloseTag);\n\t\t\tif (fragmentResult.err) return fragmentResult;\n\t\t\tconst argCloseResult = this.tryParseArgumentClose(openingBracePosition);\n\t\t\tif (argCloseResult.err) return argCloseResult;\n\t\t\toptions.push([selector, {\n\t\t\t\tvalue: fragmentResult.val,\n\t\t\t\tlocation: createLocation(openingBracePosition, this.clonePosition())\n\t\t\t}]);\n\t\t\tparsedSelectors.add(selector);\n\t\t\tthis.bumpSpace();\n\t\t\t({value: selector, location: selectorLocation} = this.parseIdentifierIfPossible());\n\t\t}\n\t\tif (options.length === 0) return this.error(parentArgType === \"select\" ? 15 : 16, createLocation(this.clonePosition(), this.clonePosition()));\n\t\tif (this.requiresOtherClause && !hasOtherClause) return this.error(22, createLocation(this.clonePosition(), this.clonePosition()));\n\t\treturn {\n\t\t\tval: options,\n\t\t\terr: null\n\t\t};\n\t}\n\ttryParseDecimalInteger(expectNumberError, invalidNumberError) {\n\t\tlet sign = 1;\n\t\tconst startingPosition = this.clonePosition();\n\t\tif (this.bumpIf(\"+\")) {} else if (this.bumpIf(\"-\")) sign = -1;\n\t\tlet hasDigits = false;\n\t\tlet decimal = 0;\n\t\twhile (!this.isEOF()) {\n\t\t\tconst ch = this.char();\n\t\t\tif (ch >= 48 && ch <= 57) {\n\t\t\t\thasDigits = true;\n\t\t\t\tdecimal = decimal * 10 + (ch - 48);\n\t\t\t\tthis.bump();\n\t\t\t} else break;\n\t\t}\n\t\tconst location = createLocation(startingPosition, this.clonePosition());\n\t\tif (!hasDigits) return this.error(expectNumberError, location);\n\t\tdecimal *= sign;\n\t\tif (!Number.isSafeInteger(decimal)) return this.error(invalidNumberError, location);\n\t\treturn {\n\t\t\tval: decimal,\n\t\t\terr: null\n\t\t};\n\t}\n\toffset() {\n\t\treturn this.position.offset;\n\t}\n\tisEOF() {\n\t\treturn this.offset() === this.message.length;\n\t}\n\tclonePosition() {\n\t\treturn {\n\t\t\toffset: this.position.offset,\n\t\t\tline: this.position.line,\n\t\t\tcolumn: this.position.column\n\t\t};\n\t}\n\t/**\n\t* Return the code point at the current position of the parser.\n\t* Throws if the index is out of bound.\n\t*/\n\tchar() {\n\t\tconst offset = this.position.offset;\n\t\tif (offset >= this.message.length) throw Error(\"out of bound\");\n\t\tconst code = this.message.codePointAt(offset);\n\t\tif (code === void 0) throw Error(`Offset ${offset} is at invalid UTF-16 code unit boundary`);\n\t\treturn code;\n\t}\n\terror(kind, location) {\n\t\treturn {\n\t\t\tval: null,\n\t\t\terr: {\n\t\t\t\tkind,\n\t\t\t\tmessage: this.message,\n\t\t\t\tlocation\n\t\t\t}\n\t\t};\n\t}\n\t/** Bump the parser to the next UTF-16 code unit. */\n\tbump() {\n\t\tif (this.isEOF()) return;\n\t\tconst code = this.char();\n\t\tif (code === 10) {\n\t\t\tthis.position.line += 1;\n\t\t\tthis.position.column = 1;\n\t\t\tthis.position.offset += 1;\n\t\t} else {\n\t\t\tthis.position.column += 1;\n\t\t\tthis.position.offset += code < 65536 ? 1 : 2;\n\t\t}\n\t}\n\t/**\n\t* If the substring starting at the current position of the parser has\n\t* the given prefix, then bump the parser to the character immediately\n\t* following the prefix and return true. Otherwise, don't bump the parser\n\t* and return false.\n\t*/\n\tbumpIf(prefix) {\n\t\tif (this.message.startsWith(prefix, this.offset())) {\n\t\t\tfor (let i = 0; i < prefix.length; i++) this.bump();\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}\n\t/**\n\t* Bump the parser until the pattern character is found and return `true`.\n\t* Otherwise bump to the end of the file and return `false`.\n\t*/\n\tbumpUntil(pattern) {\n\t\tconst currentOffset = this.offset();\n\t\tconst index = this.message.indexOf(pattern, currentOffset);\n\t\tif (index >= 0) {\n\t\t\tthis.bumpTo(index);\n\t\t\treturn true;\n\t\t} else {\n\t\t\tthis.bumpTo(this.message.length);\n\t\t\treturn false;\n\t\t}\n\t}\n\t/**\n\t* Bump the parser to the target offset.\n\t* If target offset is beyond the end of the input, bump the parser to the end of the input.\n\t*/\n\tbumpTo(targetOffset) {\n\t\tif (this.offset() > targetOffset) throw Error(`targetOffset ${targetOffset} must be greater than or equal to the current offset ${this.offset()}`);\n\t\ttargetOffset = Math.min(targetOffset, this.message.length);\n\t\twhile (true) {\n\t\t\tconst offset = this.offset();\n\t\t\tif (offset === targetOffset) break;\n\t\t\tif (offset > targetOffset) throw Error(`targetOffset ${targetOffset} is at invalid UTF-16 code unit boundary`);\n\t\t\tthis.bump();\n\t\t\tif (this.isEOF()) break;\n\t\t}\n\t}\n\t/** advance the parser through all whitespace to the next non-whitespace code unit. */\n\tbumpSpace() {\n\t\twhile (!this.isEOF() && _isWhiteSpace(this.char())) this.bump();\n\t}\n\t/**\n\t* Peek at the *next* Unicode codepoint in the input without advancing the parser.\n\t* If the input has been exhausted, then this returns null.\n\t*/\n\tpeek() {\n\t\tif (this.isEOF()) return null;\n\t\tconst code = this.char();\n\t\tconst offset = this.offset();\n\t\treturn this.message.charCodeAt(offset + (code >= 65536 ? 2 : 1)) ?? null;\n\t}\n};\n/**\n* This check if codepoint is alphabet (lower & uppercase)\n* @param codepoint\n* @returns\n*/\nfunction _isAlpha(codepoint) {\n\treturn codepoint >= 97 && codepoint <= 122 || codepoint >= 65 && codepoint <= 90;\n}\nfunction _isAlphaOrSlash(codepoint) {\n\treturn _isAlpha(codepoint) || codepoint === 47;\n}\n/** See `parseTag` function docs. */\nfunction _isPotentialElementNameChar(c) {\n\treturn c === 45 || c === 46 || c >= 48 && c <= 57 || c === 95 || c >= 97 && c <= 122 || c >= 65 && c <= 90 || c == 183 || c >= 192 && c <= 214 || c >= 216 && c <= 246 || c >= 248 && c <= 893 || c >= 895 && c <= 8191 || c >= 8204 && c <= 8205 || c >= 8255 && c <= 8256 || c >= 8304 && c <= 8591 || c >= 11264 && c <= 12271 || c >= 12289 && c <= 55295 || c >= 63744 && c <= 64975 || c >= 65008 && c <= 65533 || c >= 65536 && c <= 983039;\n}\n/**\n* Code point equivalent of regex `\\p{White_Space}`.\n* From: https://www.unicode.org/Public/UCD/latest/ucd/PropList.txt\n*/\nfunction _isWhiteSpace(c) {\n\treturn c >= 9 && c <= 13 || c === 32 || c === 133 || c >= 8206 && c <= 8207 || c === 8232 || c === 8233;\n}\n//#endregion\n//#region packages/icu-messageformat-parser/manipulator.ts\n/**\n* Collect all variables in an AST to Record<string, TYPE>\n* @param ast AST to collect variables from\n* @param vars Record of variable name to variable type\n*/\nfunction collectVariables(ast, vars = /* @__PURE__ */ new Map()) {\n\tast.forEach((el) => {\n\t\tif (isArgumentElement(el) || isDateElement(el) || isTimeElement(el) || isNumberElement(el)) if (vars.has(el.value)) {\n\t\t\tconst existingType = vars.get(el.value);\n\t\t\tif (existingType !== el.type && existingType !== 6 && existingType !== 5) throw new Error(`Variable ${el.value} has conflicting types`);\n\t\t} else vars.set(el.value, el.type);\n\t\tif (isPluralElement(el) || isSelectElement(el)) {\n\t\t\tvars.set(el.value, el.type);\n\t\t\tObject.keys(el.options).forEach((k) => {\n\t\t\t\tcollectVariables(el.options[k].value, vars);\n\t\t\t});\n\t\t}\n\t\tif (isTagElement(el)) {\n\t\t\tvars.set(el.value, el.type);\n\t\t\tcollectVariables(el.children, vars);\n\t\t}\n\t});\n}\n/**\n* Check if 2 ASTs are structurally the same. This primarily means that\n* they have the same variables with the same type\n* @param a\n* @param b\n* @returns\n*/\nfunction isStructurallySame(a, b) {\n\tconst aVars = /* @__PURE__ */ new Map();\n\tconst bVars = /* @__PURE__ */ new Map();\n\tcollectVariables(a, aVars);\n\tcollectVariables(b, bVars);\n\tif (aVars.size !== bVars.size) return {\n\t\tsuccess: false,\n\t\terror: /* @__PURE__ */ new Error(`Different number of variables: [${Array.from(aVars.keys()).join(\", \")}] vs [${Array.from(bVars.keys()).join(\", \")}]`)\n\t};\n\treturn Array.from(aVars.entries()).reduce((result, [key, type]) => {\n\t\tif (!result.success) return result;\n\t\tconst bType = bVars.get(key);\n\t\tif (bType == null) return {\n\t\t\tsuccess: false,\n\t\t\terror: /* @__PURE__ */ new Error(`Missing variable ${key} in message`)\n\t\t};\n\t\tif (bType !== type) return {\n\t\t\tsuccess: false,\n\t\t\terror: /* @__PURE__ */ new Error(`Variable ${key} has conflicting types: ${TYPE[type]} vs ${TYPE[bType]}`)\n\t\t};\n\t\treturn result;\n\t}, { success: true });\n}\n//#endregion\n//#region packages/icu-messageformat-parser/index.ts\nfunction pruneLocation(els) {\n\tels.forEach((el) => {\n\t\tdelete el.location;\n\t\tif (isSelectElement(el) || isPluralElement(el)) for (const k in el.options) {\n\t\t\tdelete el.options[k].location;\n\t\t\tpruneLocation(el.options[k].value);\n\t\t}\n\t\telse if (isNumberElement(el) && isNumberSkeleton(el.style)) delete el.style.location;\n\t\telse if ((isDateElement(el) || isTimeElement(el)) && isDateTimeSkeleton(el.style)) delete el.style.location;\n\t\telse if (isTagElement(el)) pruneLocation(el.children);\n\t});\n}\nfunction parse(message, opts = {}) {\n\topts = {\n\t\tshouldParseSkeletons: true,\n\t\trequiresOtherClause: true,\n\t\t...opts\n\t};\n\tconst result = new Parser(message, opts).parse();\n\tif (result.err) {\n\t\tconst error = SyntaxError(ErrorKind[result.err.kind]);\n\t\terror.location = result.err.location;\n\t\terror.originalMessage = result.err.message;\n\t\tthrow error;\n\t}\n\tif (!opts?.captureLocation) pruneLocation(result.val);\n\treturn result.val;\n}\nconst _Parser = Parser;\n//#endregion\nexport { SKELETON_TYPE, TYPE, _Parser, createLiteralElement, createNumberElement, isArgumentElement, isDateElement, isDateTimeSkeleton, isLiteralElement, isNumberElement, isNumberSkeleton, isPluralElement, isPoundElement, isSelectElement, isStructurallySame, isTagElement, isTimeElement, parse };\n\n//# sourceMappingURL=index.js.map","import { memoize, strategies } from \"@formatjs/fast-memoize\";\nimport { isArgumentElement, isDateElement, isDateTimeSkeleton, isLiteralElement, isNumberElement, isNumberSkeleton, isPluralElement, isPoundElement, isSelectElement, isTagElement, isTimeElement, parse } from \"@formatjs/icu-messageformat-parser\";\n//#region packages/intl-messageformat/error.ts\nlet ErrorCode = /* @__PURE__ */ function(ErrorCode) {\n\tErrorCode[\"MISSING_VALUE\"] = \"MISSING_VALUE\";\n\tErrorCode[\"INVALID_VALUE\"] = \"INVALID_VALUE\";\n\tErrorCode[\"MISSING_INTL_API\"] = \"MISSING_INTL_API\";\n\treturn ErrorCode;\n}({});\nvar FormatError = class extends Error {\n\tconstructor(msg, code, originalMessage) {\n\t\tsuper(msg);\n\t\tthis.code = code;\n\t\tthis.originalMessage = originalMessage;\n\t}\n\ttoString() {\n\t\treturn `[formatjs Error: ${this.code}] ${this.message}`;\n\t}\n};\nvar InvalidValueError = class extends FormatError {\n\tconstructor(variableId, value, options, originalMessage) {\n\t\tsuper(`Invalid values for \"${variableId}\": \"${value}\". Options are \"${Object.keys(options).join(\"\\\", \\\"\")}\"`, \"INVALID_VALUE\", originalMessage);\n\t}\n};\nvar InvalidValueTypeError = class extends FormatError {\n\tconstructor(value, type, originalMessage) {\n\t\tsuper(`Value for \"${value}\" must be of type ${type}`, \"INVALID_VALUE\", originalMessage);\n\t}\n};\nvar MissingValueError = class extends FormatError {\n\tconstructor(variableId, originalMessage) {\n\t\tsuper(`The intl string context variable \"${variableId}\" was not provided to the string \"${originalMessage}\"`, \"MISSING_VALUE\", originalMessage);\n\t}\n};\n//#endregion\n//#region packages/intl-messageformat/formatters.ts\nlet PART_TYPE = /* @__PURE__ */ function(PART_TYPE) {\n\tPART_TYPE[PART_TYPE[\"literal\"] = 0] = \"literal\";\n\tPART_TYPE[PART_TYPE[\"object\"] = 1] = \"object\";\n\treturn PART_TYPE;\n}({});\nfunction mergeLiteral(parts) {\n\tif (parts.length < 2) return parts;\n\treturn parts.reduce((all, part) => {\n\t\tconst lastPart = all[all.length - 1];\n\t\tif (!lastPart || lastPart.type !== 0 || part.type !== 0) all.push(part);\n\t\telse lastPart.value += part.value;\n\t\treturn all;\n\t}, []);\n}\nfunction isFormatXMLElementFn(el) {\n\treturn typeof el === \"function\";\n}\nfunction formatToParts(els, locales, formatters, formats, values, currentPluralValue, originalMessage) {\n\tif (els.length === 1 && isLiteralElement(els[0])) return [{\n\t\ttype: 0,\n\t\tvalue: els[0].value\n\t}];\n\tconst result = [];\n\tfor (const el of els) {\n\t\tif (isLiteralElement(el)) {\n\t\t\tresult.push({\n\t\t\t\ttype: 0,\n\t\t\t\tvalue: el.value\n\t\t\t});\n\t\t\tcontinue;\n\t\t}\n\t\tif (isPoundElement(el)) {\n\t\t\tif (typeof currentPluralValue === \"number\") result.push({\n\t\t\t\ttype: 0,\n\t\t\t\tvalue: formatters.getNumberFormat(locales).format(currentPluralValue)\n\t\t\t});\n\t\t\tcontinue;\n\t\t}\n\t\tconst { value: varName } = el;\n\t\tif (!(values && varName in values)) throw new MissingValueError(varName, originalMessage);\n\t\tlet value = values[varName];\n\t\tif (isArgumentElement(el)) {\n\t\t\tif (!value || typeof value === \"string\" || typeof value === \"number\" || typeof value === \"bigint\") value = typeof value === \"string\" || typeof value === \"number\" || typeof value === \"bigint\" ? String(value) : \"\";\n\t\t\tresult.push({\n\t\t\t\ttype: typeof value === \"string\" ? 0 : 1,\n\t\t\t\tvalue\n\t\t\t});\n\t\t\tcontinue;\n\t\t}\n\t\tif (isDateElement(el)) {\n\t\t\tconst style = typeof el.style === \"string\" ? formats.date[el.style] : isDateTimeSkeleton(el.style) ? el.style.parsedOptions : void 0;\n\t\t\tresult.push({\n\t\t\t\ttype: 0,\n\t\t\t\tvalue: formatters.getDateTimeFormat(locales, style).format(value)\n\t\t\t});\n\t\t\tcontinue;\n\t\t}\n\t\tif (isTimeElement(el)) {\n\t\t\tconst style = typeof el.style === \"string\" ? formats.time[el.style] : isDateTimeSkeleton(el.style) ? el.style.parsedOptions : formats.time.medium;\n\t\t\tresult.push({\n\t\t\t\ttype: 0,\n\t\t\t\tvalue: formatters.getDateTimeFormat(locales, style).format(value)\n\t\t\t});\n\t\t\tcontinue;\n\t\t}\n\t\tif (isNumberElement(el)) {\n\t\t\tconst style = typeof el.style === \"string\" ? formats.number[el.style] : isNumberSkeleton(el.style) ? el.style.parsedOptions : void 0;\n\t\t\tif (style && style.scale) {\n\t\t\t\tconst scale = style.scale || 1;\n\t\t\t\tif (typeof value === \"bigint\") {\n\t\t\t\t\tif (!Number.isInteger(scale)) throw new TypeError(`Cannot apply fractional scale ${scale} to bigint value. Scale must be an integer when formatting bigint.`);\n\t\t\t\t\tvalue = value * BigInt(scale);\n\t\t\t\t} else value = value * scale;\n\t\t\t}\n\t\t\tresult.push({\n\t\t\t\ttype: 0,\n\t\t\t\tvalue: formatters.getNumberFormat(locales, style).format(value)\n\t\t\t});\n\t\t\tcontinue;\n\t\t}\n\t\tif (isTagElement(el)) {\n\t\t\tconst { children, value } = el;\n\t\t\tconst formatFn = values[value];\n\t\t\tif (!isFormatXMLElementFn(formatFn)) throw new InvalidValueTypeError(value, \"function\", originalMessage);\n\t\t\tlet chunks = formatFn(formatToParts(children, locales, formatters, formats, values, currentPluralValue).map((p) => p.value));\n\t\t\tif (!Array.isArray(chunks)) chunks = [chunks];\n\t\t\tresult.push(...chunks.map((c) => {\n\t\t\t\treturn {\n\t\t\t\t\ttype: typeof c === \"string\" ? 0 : 1,\n\t\t\t\t\tvalue: c\n\t\t\t\t};\n\t\t\t}));\n\t\t}\n\t\tif (isSelectElement(el)) {\n\t\t\tconst key = value;\n\t\t\tconst opt = (Object.prototype.hasOwnProperty.call(el.options, key) ? el.options[key] : void 0) || el.options.other;\n\t\t\tif (!opt) throw new InvalidValueError(el.value, value, Object.keys(el.options), originalMessage);\n\t\t\tresult.push(...formatToParts(opt.value, locales, formatters, formats, values));\n\t\t\tcontinue;\n\t\t}\n\t\tif (isPluralElement(el)) {\n\t\t\tconst exactKey = `=${value}`;\n\t\t\tlet opt = Object.prototype.hasOwnProperty.call(el.options, exactKey) ? el.options[exactKey] : void 0;\n\t\t\tif (!opt) {\n\t\t\t\tif (!Intl.PluralRules) throw new FormatError(`Intl.PluralRules is not available in this environment.\nTry polyfilling it using \"@formatjs/intl-pluralrules\"\n`, \"MISSING_INTL_API\", originalMessage);\n\t\t\t\tconst numericValue = typeof value === \"bigint\" ? Number(value) : value;\n\t\t\t\tconst rule = formatters.getPluralRules(locales, { type: el.pluralType }).select(numericValue - (el.offset || 0));\n\t\t\t\topt = (Object.prototype.hasOwnProperty.call(el.options, rule) ? el.options[rule] : void 0) || el.options.other;\n\t\t\t}\n\t\t\tif (!opt) throw new InvalidValueError(el.value, value, Object.keys(el.options), originalMessage);\n\t\t\tconst numericValue = typeof value === \"bigint\" ? Number(value) : value;\n\t\t\tresult.push(...formatToParts(opt.value, locales, formatters, formats, values, numericValue - (el.offset || 0)));\n\t\t\tcontinue;\n\t\t}\n\t}\n\treturn mergeLiteral(result);\n}\n//#endregion\n//#region packages/intl-messageformat/core.ts\nfunction mergeConfig(c1, c2) {\n\tif (!c2) return c1;\n\treturn {\n\t\t...c1,\n\t\t...c2,\n\t\t...Object.keys(c1).reduce((all, k) => {\n\t\t\tall[k] = {\n\t\t\t\t...c1[k],\n\t\t\t\t...c2[k]\n\t\t\t};\n\t\t\treturn all;\n\t\t}, {})\n\t};\n}\nfunction mergeConfigs(defaultConfig, configs) {\n\tif (!configs) return defaultConfig;\n\treturn Object.keys(defaultConfig).reduce((all, k) => {\n\t\tall[k] = mergeConfig(defaultConfig[k], configs[k]);\n\t\treturn all;\n\t}, { ...defaultConfig });\n}\nfunction createFastMemoizeCache(store) {\n\treturn { create() {\n\t\treturn {\n\t\t\tget(key) {\n\t\t\t\treturn store[key];\n\t\t\t},\n\t\t\tset(key, value) {\n\t\t\t\tstore[key] = value;\n\t\t\t}\n\t\t};\n\t} };\n}\nfunction createDefaultFormatters(cache = {\n\tnumber: {},\n\tdateTime: {},\n\tpluralRules: {}\n}) {\n\treturn {\n\t\tgetNumberFormat: memoize((...args) => new Intl.NumberFormat(...args), {\n\t\t\tcache: createFastMemoizeCache(cache.number),\n\t\t\tstrategy: strategies.variadic\n\t\t}),\n\t\tgetDateTimeFormat: memoize((...args) => new Intl.DateTimeFormat(...args), {\n\t\t\tcache: createFastMemoizeCache(cache.dateTime),\n\t\t\tstrategy: strategies.variadic\n\t\t}),\n\t\tgetPluralRules: memoize((...args) => new Intl.PluralRules(...args), {\n\t\t\tcache: createFastMemoizeCache(cache.pluralRules),\n\t\t\tstrategy: strategies.variadic\n\t\t})\n\t};\n}\nvar IntlMessageFormat = class IntlMessageFormat {\n\tconstructor(message, locales = IntlMessageFormat.defaultLocale, overrideFormats, opts) {\n\t\tthis.formatterCache = {\n\t\t\tnumber: {},\n\t\t\tdateTime: {},\n\t\t\tpluralRules: {}\n\t\t};\n\t\tthis.format = (values) => {\n\t\t\tconst parts = this.formatToParts(values);\n\t\t\tif (parts.length === 1) return parts[0].value;\n\t\t\tconst result = parts.reduce((all, part) => {\n\t\t\t\tif (!all.length || part.type !== 0 || typeof all[all.length - 1] !== \"string\") all.push(part.value);\n\t\t\t\telse all[all.length - 1] += part.value;\n\t\t\t\treturn all;\n\t\t\t}, []);\n\t\t\tif (result.length <= 1) return result[0] || \"\";\n\t\t\treturn result;\n\t\t};\n\t\tthis.formatToParts = (values) => formatToParts(this.ast, this.locales, this.formatters, this.formats, values, void 0, this.message);\n\t\tthis.resolvedOptions = () => ({ locale: this.resolvedLocale?.toString() || Intl.NumberFormat.supportedLocalesOf(this.locales)[0] });\n\t\tthis.getAst = () => this.ast;\n\t\tthis.locales = locales;\n\t\tthis.resolvedLocale = IntlMessageFormat.resolveLocale(locales);\n\t\tif (typeof message === \"string\") {\n\t\t\tthis.message = message;\n\t\t\tif (!IntlMessageFormat.__parse) throw new TypeError(\"IntlMessageFormat.__parse must be set to process `message` of type `string`\");\n\t\t\tconst { ...parseOpts } = opts || {};\n\t\t\tthis.ast = IntlMessageFormat.__parse(message, {\n\t\t\t\t...parseOpts,\n\t\t\t\tlocale: this.resolvedLocale\n\t\t\t});\n\t\t} else this.ast = message;\n\t\tif (!Array.isArray(this.ast)) throw new TypeError(\"A message must be provided as a String or AST.\");\n\t\tthis.formats = mergeConfigs(IntlMessageFormat.formats, overrideFormats);\n\t\tthis.formatters = opts && opts.formatters || createDefaultFormatters(this.formatterCache);\n\t}\n\tstatic {\n\t\tthis.memoizedDefaultLocale = null;\n\t}\n\tstatic get defaultLocale() {\n\t\tif (!IntlMessageFormat.memoizedDefaultLocale) IntlMessageFormat.memoizedDefaultLocale = new Intl.NumberFormat().resolvedOptions().locale;\n\t\treturn IntlMessageFormat.memoizedDefaultLocale;\n\t}\n\tstatic {\n\t\tthis.resolveLocale = (locales) => {\n\t\t\tif (typeof Intl.Locale === \"undefined\") return;\n\t\t\tconst supportedLocales = Intl.NumberFormat.supportedLocalesOf(locales);\n\t\t\tif (supportedLocales.length > 0) return new Intl.Locale(supportedLocales[0]);\n\t\t\treturn new Intl.Locale(typeof locales === \"string\" ? locales : locales[0]);\n\t\t};\n\t}\n\tstatic {\n\t\tthis.__parse = parse;\n\t}\n\tstatic {\n\t\tthis.formats = {\n\t\t\tnumber: {\n\t\t\t\tinteger: { maximumFractionDigits: 0 },\n\t\t\t\tcurrency: { style: \"currency\" },\n\t\t\t\tpercent: { style: \"percent\" }\n\t\t\t},\n\t\t\tdate: {\n\t\t\t\tshort: {\n\t\t\t\t\tmonth: \"numeric\",\n\t\t\t\t\tday: \"numeric\",\n\t\t\t\t\tyear: \"2-digit\"\n\t\t\t\t},\n\t\t\t\tmedium: {\n\t\t\t\t\tmonth: \"short\",\n\t\t\t\t\tday: \"numeric\",\n\t\t\t\t\tyear: \"numeric\"\n\t\t\t\t},\n\t\t\t\tlong: {\n\t\t\t\t\tmonth: \"long\",\n\t\t\t\t\tday: \"numeric\",\n\t\t\t\t\tyear: \"numeric\"\n\t\t\t\t},\n\t\t\t\tfull: {\n\t\t\t\t\tweekday: \"long\",\n\t\t\t\t\tmonth: \"long\",\n\t\t\t\t\tday: \"numeric\",\n\t\t\t\t\tyear: \"numeric\"\n\t\t\t\t}\n\t\t\t},\n\t\t\ttime: {\n\t\t\t\tshort: {\n\t\t\t\t\thour: \"numeric\",\n\t\t\t\t\tminute: \"numeric\"\n\t\t\t\t},\n\t\t\t\tmedium: {\n\t\t\t\t\thour: \"numeric\",\n\t\t\t\t\tminute: \"numeric\",\n\t\t\t\t\tsecond: \"numeric\"\n\t\t\t\t},\n\t\t\t\tlong: {\n\t\t\t\t\thour: \"numeric\",\n\t\t\t\t\tminute: \"numeric\",\n\t\t\t\t\tsecond: \"numeric\",\n\t\t\t\t\ttimeZoneName: \"short\"\n\t\t\t\t},\n\t\t\t\tfull: {\n\t\t\t\t\thour: \"numeric\",\n\t\t\t\t\tminute: \"numeric\",\n\t\t\t\t\tsecond: \"numeric\",\n\t\t\t\t\ttimeZoneName: \"short\"\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\t}\n};\n//#endregion\n//#region packages/intl-messageformat/index.ts\nvar intl_messageformat_default = IntlMessageFormat;\n//#endregion\nexport { ErrorCode, FormatError, IntlMessageFormat, InvalidValueError, InvalidValueTypeError, MissingValueError, PART_TYPE, intl_messageformat_default as default, formatToParts, isFormatXMLElementFn };\n\n//# sourceMappingURL=index.js.map","function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }\nfunction _nonIterableRest() { throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }\nfunction _iterableToArrayLimit(arr, i) { if (typeof Symbol === \"undefined\" || !(Symbol.iterator in Object(arr))) return; var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i[\"return\"] != null) _i[\"return\"](); } finally { if (_d) throw _e; } } return _arr; }\nfunction _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\nimport * as utils from './utils.js';\nimport IntlMessageFormat from 'intl-messageformat';\nfunction getDefaults() {\n return {\n memoize: true,\n memoizeFallback: false,\n bindI18n: '',\n bindI18nStore: '',\n parseErrorHandler: function parseErrorHandler(err, key, res, options) {\n return res;\n },\n parseLngForICU: function parseLngForICU(lng) {\n return lng;\n },\n escapeVariables: false\n };\n}\nvar ICU = /*#__PURE__*/function () {\n function ICU(options) {\n _classCallCheck(this, ICU);\n this.type = 'i18nFormat';\n this.mem = {};\n this.init(null, options);\n }\n _createClass(ICU, [{\n key: \"init\",\n value: function init(i18next, options) {\n var _this = this;\n var i18nextOptions = i18next && i18next.options && i18next.options.i18nFormat || {};\n this.options = utils.defaults(i18nextOptions, options, this.options || {}, getDefaults());\n this.formats = this.options.formats;\n if (i18next) {\n var _this$options = this.options,\n bindI18n = _this$options.bindI18n,\n bindI18nStore = _this$options.bindI18nStore,\n memoize = _this$options.memoize;\n i18next.IntlMessageFormat = IntlMessageFormat;\n i18next.ICU = this;\n if (memoize) {\n if (bindI18n) {\n i18next.on(bindI18n, function () {\n return _this.clearCache();\n });\n }\n if (bindI18nStore) {\n i18next.store.on(bindI18nStore, function () {\n return _this.clearCache();\n });\n }\n }\n }\n }\n }, {\n key: \"addUserDefinedFormats\",\n value: function addUserDefinedFormats(formats) {\n this.formats = this.formats ? _objectSpread(_objectSpread({}, this.formats), formats) : formats;\n }\n }, {\n key: \"parse\",\n value: function parse(res, options, lng, ns, key, info) {\n var hadSuccessfulLookup = info && info.resolved && info.resolved.res;\n var memKey = this.options.memoize && \"\".concat(lng, \".\").concat(ns, \".\").concat(key.replace(/\\./g, '###'));\n var fc;\n if (this.options.memoize) {\n fc = utils.getPath(this.mem, memKey);\n }\n try {\n if (!fc) {\n var transformedLng = this.options.parseLngForICU(lng);\n // without ignoreTag, react-i18next <Trans> translations with <0></0> placeholders\n // will fail to parse, as IntlMessageFormat expects them to be defined in the\n // options passed to fc.format() as { 0: (children) => string }\n // but the replacement of placeholders is done in react-i18next\n fc = new IntlMessageFormat(res, transformedLng, this.formats, {\n ignoreTag: true\n });\n if (this.options.memoize && (this.options.memoizeFallback || !info || hadSuccessfulLookup)) utils.setPath(this.mem, memKey, fc);\n }\n return fc.format(this.escapeVariableValues(options));\n } catch (err) {\n return this.options.parseErrorHandler(err, key, res, options);\n }\n }\n }, {\n key: \"addLookupKeys\",\n value: function addLookupKeys(finalKeys, _key, _code, _ns, _options) {\n // no additional keys needed for select or plural\n // so there is no need to add keys to that finalKeys array\n return finalKeys;\n }\n }, {\n key: \"clearCache\",\n value: function clearCache() {\n this.mem = {};\n }\n }, {\n key: \"escapeVariableValues\",\n value: function escapeVariableValues(options) {\n if (!this.options.escapeVariables || !options || _typeof(options) !== 'object') {\n return options;\n }\n var escaped = {};\n for (var _i = 0, _Object$entries = Object.entries(options); _i < _Object$entries.length; _i++) {\n var _Object$entries$_i = _slicedToArray(_Object$entries[_i], 2),\n key = _Object$entries$_i[0],\n value = _Object$entries$_i[1];\n if (typeof value === 'string') {\n // Escape HTML special characters that could interfere with ICU parsing\n escaped[key] = value.replace(/&/g, '&amp;').replace(/</g, '&lt;').replace(/>/g, '&gt;').replace(/\"/g, '&quot;').replace(/'/g, '&#39;');\n } else {\n escaped[key] = value;\n }\n }\n return escaped;\n }\n }]);\n return ICU;\n}();\nICU.type = 'i18nFormat';\nexport default ICU;","/** App-owned translation catalogs: account screens and shared app copy. */\nexport const NAMESPACES = [\n \"common\",\n \"account\",\n \"consent\",\n \"onboarding\",\n \"doctor\",\n] as const;\nexport type Namespace = (typeof NAMESPACES)[number];\nexport const DEFAULT_NAMESPACE = \"common\";\n","/**\n * The set of locales the app ships, plus the negotiation that maps an ordered\n * list of user-preferred BCP 47 tags onto one of them.\n *\n * Negotiation is deliberately simple and explicit rather than delegating to\n * `Intl.LocaleMatcher` (still a stage-1 proposal) or i18next's own detector:\n * we match the full tag first, then fall back to the primary language subtag,\n * so `es-419` and `es-MX` both resolve to `es` without needing an entry each.\n *\n * References:\n * - https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Accept-Language\n * - https://www.rfc-editor.org/rfc/rfc5646 (BCP 47 tag structure)\n */\n\n/** Locale used when nothing else matches. Also the source language for copy. */\nexport const DEFAULT_LOCALE = \"en\";\n\n/**\n * Locales with a translation catalog under `src/i18n/locales/`.\n *\n * Adding a locale means: add the tag here, add the catalog directory, and add\n * the loader entry in `catalogs.ts`. All three are checked at compile time:\n * `catalogs.ts` types its registry as `Record<SupportedLocale, …>`, so a\n * missing loader is a type error rather than a runtime 404.\n */\nexport const SUPPORTED_LOCALES = [\"en\", \"es\", \"ru\", \"zh\", \"zh-TW\"] as const;\n\nexport type SupportedLocale = (typeof SUPPORTED_LOCALES)[number];\n\n/**\n * Endonyms: each locale's name in its own language, which is what a language\n * picker should show. A user who has the UI in a language they can't read\n * needs to find their own language by sight, not in translation.\n */\nexport const LOCALE_LABELS: Record<SupportedLocale, string> = {\n en: \"English\",\n es: \"Español\",\n ru: \"Русский\",\n zh: \"简体中文\",\n \"zh-TW\": \"繁體中文(台灣)\",\n};\n\nexport function isSupportedLocale(value: unknown): value is SupportedLocale {\n return (\n typeof value === \"string\" &&\n (SUPPORTED_LOCALES as readonly string[]).includes(value)\n );\n}\n\n/**\n * Pick the best supported locale for an ordered list of preferred tags.\n *\n * Each tag is tried at full length and then truncated to its primary subtag\n * before moving to the next preference. A user who prefers `es-MX` over `en`\n * gets `es`, not `en`. Returns {@link DEFAULT_LOCALE} when nothing matches.\n */\nexport function negotiateLocale(preferred: readonly string[]): SupportedLocale {\n for (const tag of preferred) {\n const normalized = tag.trim();\n if (normalized === \"\") {\n continue;\n }\n const matched = (SUPPORTED_LOCALES as readonly string[]).find(\n (l) => l.toLowerCase() === normalized.toLowerCase(),\n );\n if (matched) {\n return matched as SupportedLocale;\n }\n const lower = normalized.toLowerCase();\n if (\n lower === \"zh-hant\" ||\n lower.startsWith(\"zh-hant-\") ||\n lower === \"zh-hk\" ||\n lower === \"zh-mo\"\n ) {\n if (isSupportedLocale(\"zh-TW\")) {\n return \"zh-TW\";\n }\n }\n const base = normalized.split(\"-\")[0].toLowerCase();\n const baseMatched = (SUPPORTED_LOCALES as readonly string[]).find(\n (l) => l.toLowerCase() === base,\n );\n if (baseMatched) {\n return baseMatched as SupportedLocale;\n }\n }\n return DEFAULT_LOCALE;\n}\n","/**\n * Where translation catalogs live, and how they reach the running app.\n *\n * Catalogs are source files under `src/i18n/locales/<locale>/<namespace>.json`,\n * not runtime-fetched assets.\n *\n * English is imported statically, so it is part of the entry's static graph and\n * is readable with no network round trip at all. Every other locale is pulled\n * in with a dynamic `import()`, so Vite emits chunks per locale and the app\n * downloads only the locale it renders. The asymmetry is deliberate: the\n * fallback catalog is what the UI falls back *to*, so it must be the one thing\n * that cannot fail to load.\n *\n * Non-default locales are still bundled output sitting next to the JS, which is\n * why this is not `i18next-http-backend` (the usual default, which GETs\n * `/locales/{lng}/{ns}.json` from `public/`):\n *\n * - Capacitor serves the bundle from `capacitor://localhost` and the app is\n * expected to work offline. An HTTP fetch for UI copy makes first paint\n * depend on the network and fails outright on a cold offline launch.\n * - Electron loads the renderer from a local file/custom scheme where the same\n * fetch is at best a different origin to get right, at worst blocked.\n * - Bundled chunks are cache-busted by the build hash. A catalog in `public/`\n * is served unhashed and can be held by a stale HTTP cache after a deploy,\n * so users see one release's copy against another release's UI.\n *\n * The registry below is written out by hand rather than generated with\n * `import.meta.glob`. Two reasons: it is typed as a total map over locale and\n * namespace, so adding either without adding its catalog is a compile error\n * instead of a runtime miss; and `import.meta.glob` is a Vite-only transform\n * absent under Bun's test runner, which would force every test touching i18n\n * through a mock.\n *\n * Reference: https://vite.dev/guide/features#dynamic-import\n */\nimport enAccount from \"@app/i18n/locales/en/account.json\";\nimport enDoctor from \"@app/i18n/locales/en/doctor.json\";\nimport enCommon from \"@app/i18n/locales/en/common.json\";\nimport enConsent from \"@app/i18n/locales/en/consent.json\";\nimport enOnboarding from \"@app/i18n/locales/en/onboarding.json\";\nimport { NAMESPACES, type Namespace } from \"@app/i18n/namespaces\";\nimport {\n DEFAULT_LOCALE,\n type SupportedLocale,\n} from \"@app/i18n/supported-locales\";\n\n/**\n * A parsed catalog. Values are ICU MessageFormat strings; nesting mirrors the\n * dotted key path used at the call site (`t(\"aboutPage.version\")`).\n */\nexport type Catalog = Record<string, unknown>;\n\n/** Every namespace of one locale. */\nexport type LocaleCatalogs = Record<Namespace, Catalog>;\n\ntype CatalogLoader = () => Promise<{ default: Catalog }>;\n\n/**\n * The English catalogs, available synchronously. Both the boot path and the\n * test preload seed i18next with these, so a missing or unreachable chunk for\n * any other locale degrades to readable English rather than raw key paths.\n */\nexport const FALLBACK_CATALOGS: LocaleCatalogs = {\n common: enCommon,\n account: enAccount,\n consent: enConsent,\n onboarding: enOnboarding,\n doctor: enDoctor,\n};\n\n/** Loaders for the locales that are not bundled into the entry chunk. */\nconst CATALOG_LOADERS: Record<\n Exclude<SupportedLocale, typeof DEFAULT_LOCALE>,\n Record<Namespace, CatalogLoader>\n> = {\n es: {\n common: () => import(\"@app/i18n/locales/es/common.json\"),\n account: () => import(\"@app/i18n/locales/es/account.json\"),\n consent: () => import(\"@app/i18n/locales/es/consent.json\"),\n onboarding: () => import(\"@app/i18n/locales/es/onboarding.json\"),\n doctor: () => import(\"@app/i18n/locales/es/doctor.json\"),\n },\n ru: {\n common: () => import(\"@app/i18n/locales/ru/common.json\"),\n account: () => import(\"@app/i18n/locales/ru/account.json\"),\n consent: () => import(\"@app/i18n/locales/ru/consent.json\"),\n onboarding: () => import(\"@app/i18n/locales/ru/onboarding.json\"),\n doctor: () => import(\"@app/i18n/locales/ru/doctor.json\"),\n },\n zh: {\n common: () => import(\"@app/i18n/locales/zh/common.json\"),\n account: () => import(\"@app/i18n/locales/zh/account.json\"),\n consent: () => import(\"@app/i18n/locales/zh/consent.json\"),\n onboarding: () => import(\"@app/i18n/locales/zh/onboarding.json\"),\n doctor: () => import(\"@app/i18n/locales/zh/doctor.json\"),\n },\n \"zh-TW\": {\n common: () => import(\"@app/i18n/locales/zh-TW/common.json\"),\n account: () => import(\"@app/i18n/locales/zh-TW/account.json\"),\n consent: () => import(\"@app/i18n/locales/zh-TW/consent.json\"),\n onboarding: () => import(\"@app/i18n/locales/zh-TW/onboarding.json\"),\n doctor: () => import(\"@app/i18n/locales/zh-TW/doctor.json\"),\n },\n};\n\n/**\n * Load every namespace of one locale.\n *\n * Rejects when any non-default locale's chunk cannot be fetched (offline, or an\n * entry bundle outliving the assets a deploy removed). Callers on the boot path\n * treat that as \"stay on {@link FALLBACK_CATALOGS}\". Namespaces load together\n * rather than on demand because they are small and first paint can draw from\n * any of them; split this if a namespace ever grows large enough to matter.\n */\nexport async function loadCatalogs(\n locale: SupportedLocale,\n): Promise<LocaleCatalogs> {\n if (locale === DEFAULT_LOCALE) {\n return FALLBACK_CATALOGS;\n }\n\n const loaders = CATALOG_LOADERS[locale];\n const loaded = await Promise.all(\n NAMESPACES.map(async (namespace) => {\n const module = await loaders[namespace]();\n return [namespace, module.default] as const;\n }),\n );\n return Object.fromEntries(loaded) as LocaleCatalogs;\n}\n\n/**\n * Every locale this module can produce catalogs for. Exported for the coverage\n * test that asserts this stays in lockstep with `SUPPORTED_LOCALES`.\n */\nexport function loadableLocales(): SupportedLocale[] {\n return [\n DEFAULT_LOCALE,\n ...(Object.keys(CATALOG_LOADERS) as SupportedLocale[]),\n ];\n}\n","/**\n * The i18next `init()` options, in one place.\n *\n * Production and the app test preload use the same options for the app-owned\n * instance.\n *\n * Kept free of any dependency on locale *resolution* (`system-locale.ts`,\n * `device-settings.ts`) so importing it from the preload does not pull those\n * modules into the registry ahead of the tests that mock them.\n */\nimport type { InitOptions } from \"i18next\";\n\nimport type { LocaleCatalogs } from \"@app/i18n/catalogs\";\nimport { DEFAULT_NAMESPACE, NAMESPACES } from \"@app/i18n/namespaces\";\nimport { DEFAULT_LOCALE } from \"@app/i18n/supported-locales\";\n\nexport function i18nextInitOptions(\n locale: string,\n resources: Record<string, LocaleCatalogs>,\n): InitOptions {\n return {\n lng: locale,\n fallbackLng: DEFAULT_LOCALE,\n ns: [...NAMESPACES],\n defaultNS: DEFAULT_NAMESPACE,\n resources,\n // React escapes interpolated values on render; letting i18next escape them\n // too double-encodes apostrophes and ampersands in user data.\n interpolation: { escapeValue: false },\n returnNull: false,\n };\n}\n","/**\n * Reads the host's preferred UI languages, in priority order.\n *\n * All three shells run the same SPA, so all three answer through\n * `navigator.languages`. What differs is how faithfully each host mirrors the\n * OS preference into the web view, and each has a known gap:\n *\n * - **Browser**: `navigator.languages` is the browser's own language list,\n * which is what we want. No gap.\n *\n * - **Electron (macOS / Windows)**: the renderer is Chromium, and Chromium\n * seeds its language list from the OS UI language at process start. The gap\n * is that it reflects the *UI language*, not a regional-format-only override\n * (macOS \"Region\" set to Spain while the UI stays English), and it is\n * sampled once at launch, so a locale change mid-session is not observed.\n * Closing that means reading `app.getPreferredSystemLanguages()` in the main\n * process and exposing it over the `window.cadet` bridge. See\n * `docs/ELECTRON.md` for the three-file bridge pattern. Deferred: it needs\n * preload + main + contract changes, and the launch-time value is correct\n * for the overwhelming majority of users.\n *\n * - **Capacitor (iOS / Android)**: the WKWebView / Android WebView reports\n * the *system* language. The gap is iOS's per-app language setting\n * (Settings → Cadet → Preferred Language, iOS 13+): a user who sets only\n * this app to Spanish while the phone stays English still gets `en` here.\n * Closing that means `Device.getLanguageTag()` from `@capacitor/device`,\n * which reads `Locale.preferredLanguages` and so sees the per-app choice.\n * Deferred: adding an iOS Capacitor plugin is not runtime-neutral. Its\n * native `load()` runs at bridge init whether or not JS imports it, and\n * `docs/CAPACITOR.md` requires auditing that before taking the dependency.\n *\n * Until those land, the explicit in-app preference (`device:locale`, written\n * by `changeLocale()`) is the escape hatch for every one of these gaps: it is\n * consulted first and overrides whatever the host reports.\n *\n * References:\n * - https://developer.mozilla.org/en-US/docs/Web/API/Navigator/languages\n * - https://www.electronjs.org/docs/latest/api/app#appgetpreferredsystemlanguages\n * - https://capacitorjs.com/docs/apis/device#getlanguagetag\n */\n\n/**\n * The host's preferred languages as BCP 47 tags, most-preferred first.\n *\n * Returns an empty array when there is no `navigator` (SSR, non-DOM test\n * contexts) so callers fall through to their own default.\n */\nexport function systemLocales(): string[] {\n if (typeof navigator === \"undefined\") {\n return [];\n }\n\n // `navigator.languages` is the full ordered preference list. Safari and some\n // WebViews have historically left it empty or absent, so `navigator.language`\n // (always present) is the single-entry fallback.\n const languages = navigator.languages;\n if (Array.isArray(languages) && languages.length > 0) {\n return [...languages];\n }\n\n return navigator.language ? [navigator.language] : [];\n}\n","// All three helpers swallow `localStorage` exceptions. Reads/writes can\n// throw in private browsing, on quota exhaustion, or when storage is\n// disabled by policy. Every caller in this repo treats settings\n// persistence as best-effort — none are gated on the write succeeding —\n// so failing soft keeps the onboarding / retire / settings flows\n// navigable when storage is unavailable.\n\nexport function getLocalSetting(key: string, fallback: string): string {\n if (typeof window === \"undefined\") {\n return fallback;\n }\n try {\n return localStorage.getItem(key) ?? fallback;\n } catch {\n return fallback;\n }\n}\n\n/**\n * Write a setting. Returns whether the value reached storage, so callers that\n * render the value can keep it in memory when it did not. Callers that treat\n * persistence as fire-and-forget can ignore the result.\n */\nexport function setLocalSetting(key: string, value: string): boolean {\n if (typeof window === \"undefined\") {\n return false;\n }\n try {\n localStorage.setItem(key, value);\n } catch {\n return false;\n }\n notifyChange(key, value);\n return true;\n}\n\n/**\n * Announce a value that did not reach storage.\n *\n * A rejected write fires no notification of its own, so a subscriber holding\n * the value in memory has no way to learn it changed. This is the signal for\n * that case; the notification carries the value the caller is standing behind.\n */\nexport function notifySettingChange(key: string, value: string): void {\n if (typeof window === \"undefined\") {\n return;\n }\n notifyChange(key, value);\n}\n\nexport function removeLocalSetting(key: string): void {\n if (typeof window === \"undefined\") {\n return;\n }\n try {\n localStorage.removeItem(key);\n } catch {\n return;\n }\n notifyChange(key, null);\n}\n\n// ---------------------------------------------------------------------------\n// Typed helpers — boolean and number\n// ---------------------------------------------------------------------------\n\nexport function getLocalBool(key: string, fallback: boolean): boolean {\n if (typeof window === \"undefined\") {\n return fallback;\n }\n try {\n const raw = localStorage.getItem(key);\n if (raw === \"true\") {\n return true;\n }\n if (raw === \"false\") {\n return false;\n }\n return fallback;\n } catch {\n return fallback;\n }\n}\n\nexport function setLocalBool(key: string, value: boolean): void {\n setLocalSetting(key, value ? \"true\" : \"false\");\n}\n\n/**\n * Tri-state boolean read: `true`/`false` for an explicitly stored value,\n * `null` when the key is absent or unreadable. Lets callers distinguish\n * \"never chosen\" from an explicit choice.\n */\nexport function getLocalBoolOrNull(key: string): boolean | null {\n if (typeof window === \"undefined\") {\n return null;\n }\n try {\n const raw = localStorage.getItem(key);\n if (raw === \"true\") {\n return true;\n }\n if (raw === \"false\") {\n return false;\n }\n return null;\n } catch {\n return null;\n }\n}\n\nexport function getLocalNumber(key: string, fallback: number): number {\n if (typeof window === \"undefined\") {\n return fallback;\n }\n try {\n const raw = localStorage.getItem(key);\n if (raw === null) {\n return fallback;\n }\n const parsed = Number(raw);\n return Number.isFinite(parsed) ? parsed : fallback;\n } catch {\n return fallback;\n }\n}\n\nexport function setLocalNumber(key: string, value: number): void {\n setLocalSetting(key, String(value));\n}\n\n// ---------------------------------------------------------------------------\n// Change watcher — listens for both cross-tab (storage) and same-tab\n// (cadet:pref-changed) events for a specific key.\n// ---------------------------------------------------------------------------\n\ninterface PrefChangedDetail {\n key: string;\n value: string | null;\n}\n\nexport function watchSetting(key: string, callback: () => void): () => void {\n if (typeof window === \"undefined\") {\n return () => {};\n }\n const onStorage = (event: StorageEvent) => {\n if (event.key === key) {\n callback();\n }\n };\n const onPrefChanged = (event: Event) => {\n const detail = (event as CustomEvent<PrefChangedDetail>).detail;\n if (detail?.key === key) {\n callback();\n }\n };\n window.addEventListener(\"storage\", onStorage);\n window.addEventListener(PREF_CHANGED_EVENT, onPrefChanged);\n return () => {\n window.removeEventListener(\"storage\", onStorage);\n window.removeEventListener(PREF_CHANGED_EVENT, onPrefChanged);\n };\n}\n\n// ---------------------------------------------------------------------------\n// Same-tab notification\n// ---------------------------------------------------------------------------\n\nconst PREF_CHANGED_EVENT = \"cadet:pref-changed\";\n\n// `localStorage.setItem` fires the native `storage` event in *other* tabs\n// only. Same-tab observers (e.g. the diagnostics gate that toggles client\n// reporting when the user flips Share Diagnostics on `/onboarding/privacy`\n// or `/settings/privacy`) need a synthetic signal. A single custom event\n// covers every key; listeners filter on `detail.key`.\nfunction notifyChange(key: string, value: string | null): void {\n try {\n window.dispatchEvent(\n new CustomEvent(PREF_CHANGED_EVENT, { detail: { key, value } }),\n );\n } catch {\n // CustomEvent construction shouldn't fail; swallow defensively so a\n // broken environment can't strand callers that expect this to be a\n // fire-and-forget side effect.\n }\n}\n","/**\n * Typed registry and accessors for device-scoped localStorage settings.\n *\n * Device-level settings survive logout — they describe the physical\n * device's preferences, not a user account. The `device:` key prefix\n * makes this intent explicit and enables zero-maintenance cleanup in\n * session-cleanup.ts: any key starting with `device:` is automatically\n * preserved, everything else matching app prefixes is cleared.\n *\n * To add a new device setting:\n * 1. Add an entry to DEVICE_SETTINGS below\n * 2. Use getDeviceSetting / setDeviceSetting in your component\n * No cleanup list to update, no separate file to maintain.\n *\n * References:\n * - docs/STATE_MANAGEMENT.md — Logout and device-scoped storage\n */\n\nimport {\n setLocalBool,\n setLocalSetting,\n watchSetting,\n} from \"@app/utils/local-settings\";\n\n/** Prefix for all device-scoped localStorage keys. */\nexport const DEVICE_PREFIX = \"device:\";\n\n/** One device-scoped setting: its `device:`-prefixed localStorage key. */\ninterface DeviceSettingEntry {\n key: string;\n}\n\n/**\n * Registry of device-scoped settings. Each entry maps a logical name\n * to its localStorage key.\n */\nconst DEVICE_SETTINGS = {\n locale: { key: \"device:locale\" },\n installReferrer: { key: \"device:install_referrer\" },\n biometricEnabled: { key: \"device:biometric_enabled\" },\n} as const satisfies Record<string, DeviceSettingEntry>;\n\nexport type DeviceSettingName = keyof typeof DEVICE_SETTINGS;\n\n/** Returns the `device:`-prefixed localStorage key for a setting. */\nexport function deviceKey(name: DeviceSettingName): string {\n return DEVICE_SETTINGS[name].key;\n}\n\n/** Read a device-scoped setting, returning `fallback` when absent or unreadable. */\nexport function getDeviceSetting(\n name: DeviceSettingName,\n fallback: string,\n): string {\n if (typeof window === \"undefined\") {\n return fallback;\n }\n try {\n return localStorage.getItem(DEVICE_SETTINGS[name].key) ?? fallback;\n } catch {\n return fallback;\n }\n}\n\n/** Write a device-scoped setting. Fires the `cadet:pref-changed` event for same-tab observers. */\nexport function setDeviceSetting(name: DeviceSettingName, value: string): void {\n setLocalSetting(DEVICE_SETTINGS[name].key, value);\n}\n\n/** Whether a device-scoped setting is stored at all, an empty value included. */\nexport function hasDeviceSetting(name: DeviceSettingName): boolean {\n if (typeof window === \"undefined\") {\n return false;\n }\n try {\n return localStorage.getItem(DEVICE_SETTINGS[name].key) !== null;\n } catch {\n return false;\n }\n}\n\n/** Read a boolean device setting. */\nexport function getDeviceBool(\n name: DeviceSettingName,\n fallback: boolean,\n): boolean {\n if (typeof window === \"undefined\") {\n return fallback;\n }\n try {\n const raw = localStorage.getItem(DEVICE_SETTINGS[name].key);\n if (raw === \"true\") {\n return true;\n }\n if (raw === \"false\") {\n return false;\n }\n } catch {\n // Storage unavailable\n }\n return fallback;\n}\n\n/** Write a boolean device setting. */\nexport function setDeviceBool(name: DeviceSettingName, value: boolean): void {\n setLocalBool(DEVICE_SETTINGS[name].key, value);\n}\n\n/**\n * Watch a device setting for changes (cross-tab and same-tab).\n * Returns a cleanup function that removes both listeners.\n */\nexport function watchDeviceSetting(\n name: DeviceSettingName,\n callback: () => void,\n): () => void {\n return watchSetting(DEVICE_SETTINGS[name].key, callback);\n}\n","import { getDeviceSetting, setDeviceSetting } from \"@app/utils/device-settings\";\n\nexport function readLocalePreference(): string {\n return getDeviceSetting(\"locale\", \"\");\n}\n\nexport function writeLocalePreference(locale: string): void {\n setDeviceSetting(\"locale\", locale);\n}\n","/**\n * i18next configuration and lifecycle for the account app.\n *\n * Three decisions worth knowing before changing anything here:\n *\n * **ICU MessageFormat is the on-disk format.** i18next's native plural syntax\n * (`key_one` / `key_other` sibling keys) is i18next-specific; ICU\n * MessageFormat is what Crowdin, Lokalise, Phrase, Tolgee, Android and iOS all\n * read. Authoring in ICU means the catalogs outlive this library choice and\n * can be handed to any TMS as-is. `i18next-icu` swaps i18next's formatter for\n * `intl-messageformat`, which resolves plural categories through the cloud\n * `Intl.PluralRules`, so a locale with six plural forms gets six without the\n * call site knowing anything about it.\n *\n * **Initialization is awaited before first render.** `initI18n()` runs in\n * `main.tsx` ahead of `createRoot`, so components never observe an\n * uninitialized i18next and no raw key path is painted. English costs nothing\n * to reach; any other locale costs one dynamic import of a small JSON chunk.\n *\n * **Locale resolution has a fixed precedence**, applied by\n * {@link resolveInitialLocale}:\n * 1. the explicit in-app preference (`device:locale`), if it is still a\n * supported locale (a user's stated choice outranks any host signal);\n * 2. the host's preferred languages (see `system-locale.ts`);\n * 3. `DEFAULT_LOCALE`.\n *\n * References:\n * - https://www.i18next.com/overview/configuration-options\n * - https://github.com/i18next/i18next-icu\n * - https://unicode-org.github.io/icu/userguide/format_parse/messages/\n */\nimport { i18next } from \"@app/i18n/instance\";\nimport ICU from \"i18next-icu\";\n\nimport {\n FALLBACK_CATALOGS,\n loadCatalogs,\n type LocaleCatalogs,\n} from \"@app/i18n/catalogs\";\nimport { i18nextInitOptions } from \"@app/i18n/config\";\nimport { NAMESPACES } from \"@app/i18n/namespaces\";\nimport { systemLocales } from \"@app/i18n/system-locale\";\nimport {\n DEFAULT_LOCALE,\n isSupportedLocale,\n negotiateLocale,\n type SupportedLocale,\n} from \"@app/i18n/supported-locales\";\nimport {\n readLocalePreference,\n writeLocalePreference,\n} from \"@app/i18n/locale-preference\";\n\n/**\n * The locale to boot with, resolved from the stored preference, then the\n * host, then the default. Pure apart from the storage read, and exported so\n * tests and a future language picker can ask without initializing i18next.\n */\nexport function resolveInitialLocale(): SupportedLocale {\n const stored = readLocalePreference();\n if (isSupportedLocale(stored)) {\n return stored;\n }\n return negotiateLocale(systemLocales());\n}\n\n/**\n * Reflect the active locale onto the document element.\n *\n * `lang` drives the UA's own locale-sensitive behavior: hyphenation, spell\n * check, the voice a screen reader picks, and font fallback for scripts the\n * primary family doesn't cover. It is not decorative: an unset or wrong `lang`\n * makes a screen reader read Spanish copy with English phonemes.\n *\n * `dir` is set from `Intl.Locale`'s text-info rather than a hand-kept RTL list\n * so adding Arabic or Hebrew to `SUPPORTED_LOCALES` needs no change here.\n *\n * References:\n * - https://www.w3.org/International/questions/qa-html-language-declarations\n * - https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/Locale/getTextInfo\n */\nfunction applyDocumentLocale(locale: SupportedLocale): void {\n if (typeof document === \"undefined\") {\n return;\n }\n document.documentElement.lang = locale;\n\n // `getTextInfo()` postdates the TS `ES2023` lib target, and engines that\n // predate the method rename still expose the earlier `textInfo` getter, so\n // both shapes are probed behind a cast. LTR is the safe assumption for every\n // locale currently shipped.\n type LocaleTextInfo = Intl.Locale & {\n getTextInfo?: () => { direction?: string };\n textInfo?: { direction?: string };\n };\n\n let direction: string | undefined;\n try {\n const resolved = new Intl.Locale(locale) as LocaleTextInfo;\n direction =\n resolved.getTextInfo?.().direction ?? resolved.textInfo?.direction;\n } catch {\n direction = undefined;\n }\n document.documentElement.dir = direction === \"rtl\" ? \"rtl\" : \"ltr\";\n}\n\n/** Load a locale's catalogs into i18next unless they are already registered. */\nasync function ensureCatalogs(locale: SupportedLocale): Promise<void> {\n const missing = NAMESPACES.filter(\n (namespace) => !i18next.hasResourceBundle(locale, namespace),\n );\n if (missing.length === 0) {\n return;\n }\n const catalogs = await loadCatalogs(locale);\n for (const namespace of missing) {\n i18next.addResourceBundle(\n locale,\n namespace,\n catalogs[namespace],\n true,\n true,\n );\n }\n}\n\n/**\n * Report a catalog that could not be loaded.\n *\n * A chunk fetch fails when the device is offline, or when a still-cached entry\n * bundle asks for an asset a later deploy removed. Neither is actionable at\n * the call site beyond staying on the locale already rendering, so it is a\n * warning rather than an error.\n */\nfunction reportCatalogFailure(error: unknown, locale: SupportedLocale): void {\n console.warn(\"App translation catalog could not be loaded\", locale, error);\n}\n\n/**\n * Initialize i18next for the resolved locale. Safe to call more than once:\n * a repeat call re-resolves the locale against the existing instance.\n *\n * Never rejects. This runs on the boot path ahead of `createRoot()`, where an\n * escaping rejection costs the whole app a render, and English is always\n * reachable. Returns the locale actually activated, which is English when the\n * preferred locale's catalog could not be loaded.\n */\nexport async function initI18n(): Promise<SupportedLocale> {\n const requested = resolveInitialLocale();\n\n if (i18next.isInitialized) {\n try {\n await changeLocale(requested);\n return requested;\n } catch (error) {\n reportCatalogFailure(error, requested);\n return currentLocale();\n }\n }\n\n // English is seeded first, from the entry chunk rather than a fetch. It is\n // both the fallback for a key a translated catalog is missing and the floor\n // this function degrades to, so it must be in place before anything that can\n // fail is attempted.\n const resources: Record<string, LocaleCatalogs> = {\n [DEFAULT_LOCALE]: FALLBACK_CATALOGS,\n };\n let locale: SupportedLocale = DEFAULT_LOCALE;\n\n if (requested !== DEFAULT_LOCALE) {\n try {\n resources[requested] = await loadCatalogs(requested);\n locale = requested;\n } catch (error) {\n reportCatalogFailure(error, requested);\n }\n }\n\n await i18next.use(new ICU()).init(i18nextInitOptions(locale, resources));\n\n applyDocumentLocale(locale);\n return locale;\n}\n\n/**\n * Switch the active locale: load its catalog if needed, activate it, persist\n * the choice as a device setting, and update the document element.\n *\n * Persisted with `device:` scope because a language choice describes the\n * device, not the account. It must survive logout so the login screen stays in\n * the language the user picked.\n *\n * Rejects when the catalog cannot be fetched, leaving the previous locale\n * active. Unlike {@link initI18n} this is user-initiated, so the caller is the\n * one that can say something useful about the failure.\n */\nexport async function changeLocale(locale: SupportedLocale): Promise<void> {\n await ensureCatalogs(locale);\n await i18next.changeLanguage(locale);\n writeLocalePreference(locale);\n applyDocumentLocale(locale);\n}\n\n/** The active locale, or `DEFAULT_LOCALE` before initialization. */\nexport function currentLocale(): SupportedLocale {\n const language = i18next.resolvedLanguage ?? i18next.language;\n return isSupportedLocale(language) ? language : DEFAULT_LOCALE;\n}\n\n/** The primary language subtag of a BCP 47 tag, lowercased. */\nfunction primaryLanguage(tag: string): string {\n return tag.split(\"-\")[0].toLowerCase();\n}\n\n/**\n * The locale to format dates, times, and numbers in.\n *\n * {@link currentLocale} answers with one of the five language tags the app\n * ships a catalog for, which is the right answer for copy and the wrong one\n * for formatting: it drops the region, so a UK user reading English copy\n * would get US date order and 12-hour times. This returns the host's own tag\n * whenever its primary language subtag is the app locale's, and the app\n * locale otherwise, so `en-GB` under app locale `en` keeps its region while\n * `de-DE` under `en` does not format German dates beside English copy.\n *\n * The host's whole preference list is searched, not just its first entry, so a\n * user whose device leads with English while the app runs in Spanish still\n * formats in the Spanish region they also listed. Comparison is by primary\n * subtag, so a `zh-TW` host keeps `zh-TW` under either Chinese catalog, and a\n * tag `Intl` cannot parse is skipped rather than chosen and rejected, so the\n * entry behind it still gets its turn.\n *\n * References:\n * - https://developer.mozilla.org/en-US/docs/Web/API/Navigator/languages\n * - https://www.rfc-editor.org/rfc/rfc5646 (BCP 47 tag structure)\n * - https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/getCanonicalLocales\n */\nexport function formatLocale(): string {\n const app = currentLocale();\n const host = systemLocales().find(\n (tag) =>\n primaryLanguage(tag) === primaryLanguage(app) && isFormattableLocale(tag),\n );\n return host ?? app;\n}\n\n/**\n * Whether `Intl` will accept `tag`, which is not a given for a host-reported\n * one: a POSIX environment reports `C`, and an underscored `en_US` reaches us\n * from more than one shell. Every `Intl` constructor throws `RangeError` on\n * those, and this is read by every date, time, and number formatter in the\n * app, so the tag is checked once here instead of failing a render later.\n */\nfunction isFormattableLocale(tag: string): boolean {\n try {\n Intl.getCanonicalLocales(tag);\n return true;\n } catch {\n // A tag Intl cannot parse is host data the caller falls back from, not a\n // fault to report.\n return false;\n }\n}\n\nexport { i18next };\n","import {\n createContext,\n useEffect,\n useMemo,\n type ReactNode,\n type Context,\n} from \"react\";\nimport { createInstance, type i18n } from \"i18next\";\nimport ICU from \"i18next-icu\";\nimport { FALLBACK_CATALOGS, loadCatalogs } from \"./catalogs\";\nimport { currentLocale } from \"./i18n\";\nimport { i18nextInitOptions } from \"./config\";\n\nexport const AppI18nContext: Context<i18n | undefined> = createContext<\n i18n | undefined\n>(undefined);\n\nexport function AppI18nProvider({ children }: { children: ReactNode }) {\n const instance = useMemo(() => {\n const i18n = createInstance();\n void i18n.use(new ICU()).init({\n ...i18nextInitOptions(\"en\", { en: FALLBACK_CATALOGS }),\n initAsync: false,\n });\n return i18n;\n }, []);\n useEffect(() => {\n let active = true;\n const locale = currentLocale();\n void loadCatalogs(locale)\n .then((catalogs) => {\n if (!active) {\n return;\n }\n for (const [namespace, catalog] of Object.entries(catalogs)) {\n instance.addResourceBundle(locale, namespace, catalog, true, true);\n }\n void instance.changeLanguage(locale);\n })\n .catch(() => {\n if (active) {\n void instance.changeLanguage(\"en\");\n }\n });\n return () => {\n active = false;\n };\n }, [instance]);\n return (\n <AppI18nContext.Provider value={instance}>\n {children}\n </AppI18nContext.Provider>\n );\n}\n","// inlined from the former `void-elements` dependency, so the package has\n// zero runtime dependencies. `!doctype`/`!DOCTYPE` are treated as void so a\n// doctype parses as a childless node instead of swallowing the document.\nconst voidElements = {\n area: true,\n base: true,\n br: true,\n col: true,\n embed: true,\n hr: true,\n img: true,\n input: true,\n link: true,\n meta: true,\n param: true,\n source: true,\n track: true,\n wbr: true,\n '!doctype': true,\n '!DOCTYPE': true,\n};\n\nconst attrRE = /\\s([^'\"/\\s><]+?)[\\s/>]|([^\\s=]+)=\\s?(\"[^\"]*\"|'[^']*')/g;\n\nfunction parseTag(tag) {\n const res = {\n type: 'tag',\n name: '',\n voidElement: false,\n attrs: {},\n children: [],\n };\n\n const tagMatch = tag.match(/<\\/?([^\\s]+?)[/\\s>]/);\n if (tagMatch) {\n res.name = tagMatch[1];\n // void-element lookup stays case sensitive on purpose: react-i18next\n // relies on `<Br>` NOT being treated as a void `<br>` (see 1df0f9d)\n if (voidElements[tagMatch[1]] || tag.charAt(tag.length - 2) === '/') {\n res.voidElement = true;\n }\n\n // handle comment tag\n if (res.name.startsWith('!--')) {\n const endIndex = tag.indexOf('-->');\n return {\n type: 'comment',\n comment: endIndex !== -1 ? tag.slice(4, endIndex) : '',\n }\n }\n }\n\n const reg = new RegExp(attrRE);\n let result = null;\n for (;;) {\n result = reg.exec(tag);\n\n if (result === null) {\n break\n }\n\n if (!result[0].trim()) {\n continue\n }\n\n if (result[1]) {\n const attr = result[1].trim();\n // boolean attributes carry `null` so stringify can render them bare\n // (`<input disabled/>` instead of `<input disabled=\"\"/>`)\n let arr = [attr, null];\n\n const eq = attr.indexOf('=');\n if (eq > -1) {\n // split at the first `=` only, so `data-x=a=b` keeps its full value\n arr = [attr.slice(0, eq), attr.slice(eq + 1)];\n }\n\n res.attrs[arr[0]] = arr[1];\n reg.lastIndex--;\n } else if (result[2]) {\n res.attrs[result[2]] = result[3].trim().substring(1, result[3].length - 1);\n }\n }\n\n return res\n}\n\n// comments are matched as a whole (so `>` inside them is fine), everything\n// else tag-shaped is matched by the second alternative\nconst tagRE = /<!--[\\s\\S]*?-->|<[a-zA-Z0-9\\-!/](?:\"[^\"]*\"|'[^']*'|[^'\">])*>/g;\nconst tagNameRE = /<\\/?([^\\s]+?)[/\\s>]/;\nconst whitespaceRE = /^\\s*$/;\n// tags whose content is raw text: nothing inside them is markup\nconst rawTextRE = /^(script|style)$/i;\n\n// placeholder for `<` of tags rejected by options.allowedTags; restored to a\n// literal `<` in text/attr/comment content after parsing (U+0000 cannot appear\n// in sane input, and a collision would merely render as an extra `<`)\nconst sentinel = '\\u0000';\n\n// re-used obj for quick lookups of components\nconst empty = Object.create(null);\n\nfunction restoreSentinels(nodes) {\n nodes.forEach(function (node) {\n if (node.type === 'text') {\n node.content = node.content.split(sentinel).join('<');\n return\n }\n if (node.type === 'comment') {\n node.comment = node.comment.split(sentinel).join('<');\n return\n }\n for (const key in node.attrs) {\n const value = node.attrs[key];\n if (typeof value === 'string' && value.indexOf(sentinel) > -1) {\n node.attrs[key] = value.split(sentinel).join('<');\n }\n }\n if (node.children.length) {\n restoreSentinels(node.children);\n }\n });\n}\n\nfunction parse(html, options) {\n const components = (options && options.components) || empty;\n const allowedTags = options && options.allowedTags;\n let restoreNeeded = false;\n if (allowedTags) {\n const isAllowed =\n typeof allowedTags === 'function'\n ? allowedTags\n : function (name) {\n return allowedTags.indexOf(name) > -1\n };\n // neutralize tags whose name is not allowed, so they parse as text.\n // on a disallowed match only the leading `<` is escaped and scanning\n // resumes right after it, so a valid tag glued into the same match\n // (e.g. `<bold>` inside `<10, <20, and <bold>`) still gets recognized\n let out = '';\n let pos = 0;\n tagRE.lastIndex = 0;\n let am;\n while ((am = tagRE.exec(html))) {\n const tag = am[0];\n out += html.slice(pos, am.index);\n const nameMatch = tag.match(tagNameRE);\n if (tag.startsWith('<!--') || (nameMatch && isAllowed(nameMatch[1]))) {\n out += tag;\n pos = am.index + tag.length;\n } else {\n restoreNeeded = true;\n out += sentinel;\n pos = am.index + 1;\n tagRE.lastIndex = pos;\n }\n }\n html = out + html.slice(pos);\n }\n const result = [];\n const arr = [];\n let current;\n let level = -1;\n let inComponent = false;\n // while parsing raw-text content (script/style), tag-looking matches\n // before this index belong to the content and must be skipped\n let rawUntil = 0;\n // lazily created lowercase copy for case-insensitive raw-text close-tag search\n let htmlLower;\n\n // handle text at top level\n if (html.indexOf('<') !== 0) {\n const end = html.indexOf('<');\n result.push({\n type: 'text',\n content: end === -1 ? html : html.substring(0, end),\n });\n }\n\n // collect matches with an exec loop instead of matchAll to keep ES5 API compat\n const matches = [];\n let m;\n while ((m = tagRE.exec(html))) {\n matches.push(m);\n }\n matches.forEach(function (match, i) {\n const tag = match[0];\n if (!tag) return\n // comments match as a whole; their content must not trigger the\n // mismatched-bracket split below\n if (tag.startsWith('<!--')) return\n // count brackets outside quoted attribute values, so `<` inside an\n // attribute (e.g. title=\"1 < 2\") can't trigger a bogus split\n let lts = 0;\n let gts = 0;\n let secondLt = -1;\n let quote = null;\n for (let j = 0; j < tag.length; j++) {\n const c = tag.charAt(j);\n if (quote) {\n if (c === quote) quote = null;\n } else if (c === '\"' || c === \"'\") {\n quote = c;\n } else if (c === '<') {\n lts++;\n if (lts === 2) secondLt = j;\n } else if (c === '>') {\n gts++;\n }\n }\n // only split when the remainder is itself a valid tag start; otherwise\n // a fragment like `< <!-->` desyncs the string-level isComment check\n // from parseTag's name-based comment detection and crashes the walker\n const validSplit =\n secondLt > -1 && /[a-zA-Z0-9\\-!/]/.test(tag.charAt(secondLt + 1));\n if (lts > gts && validSplit) {\n const firstPart = tag.substring(0, secondLt);\n const secondPart = tag.substring(firstPart.length);\n matches[i][0] = secondPart;\n matches[i].index += firstPart.length;\n }\n });\n matches.forEach(function (match, i) {\n const tag = match[0];\n if (!tag) return\n const index = match.index;\n if (index < rawUntil) return\n if (inComponent) {\n if (tag !== '</' + current.name + '>') {\n return\n } else {\n inComponent = false;\n }\n }\n const isOpen = tag.charAt(1) !== '/';\n const isComment = tag.startsWith('<!--');\n const start = index + tag.length;\n const nextChar = html.charAt(start);\n const nextMatch = matches[i + 1];\n let isText;\n if (nextChar === '<' && nextMatch) {\n const nextTag = html.substring(start, nextMatch.index);\n isText = nextTag.split('<').length > nextTag.split('>').length;\n }\n\n let parent;\n\n if (isComment) {\n const comment = parseTag(tag);\n\n // if we're at root, push new base node\n if (level < 0) {\n result.push(comment);\n return result\n }\n parent = arr[level];\n parent.children.push(comment);\n\n const text = html.slice(start, nextMatch ? nextMatch.index : undefined);\n if (text.length > 0) {\n parent.children.push({\n type: 'text',\n content: text,\n });\n }\n return result\n }\n\n if (isOpen) {\n level++;\n\n current = parseTag(tag);\n if (current.type === 'tag' && components[current.name]) {\n current.type = 'component';\n inComponent = true;\n }\n\n let isRawText = false;\n if (\n !inComponent &&\n !current.voidElement &&\n rawTextRE.test(current.name)\n ) {\n // raw-text element: everything up to the matching close tag is one\n // text child, regardless of what it looks like\n isRawText = true;\n htmlLower || (htmlLower = html.toLowerCase());\n const closeIndex = htmlLower.indexOf(\n '</' + current.name.toLowerCase() + '>',\n start,\n );\n const contentEnd = closeIndex === -1 ? html.length : closeIndex;\n const content = html.slice(start, contentEnd);\n if (content) {\n current.children.push({\n type: 'text',\n content,\n });\n }\n rawUntil = contentEnd;\n }\n\n if (\n !current.voidElement &&\n !inComponent &&\n !isRawText &&\n nextChar &&\n nextChar !== '<'\n ) {\n // text content runs to the next actual tag match; stray `<`\n // characters in between are part of the text\n current.children.push({\n type: 'text',\n content: html.slice(start, nextMatch ? nextMatch.index : undefined),\n });\n }\n\n // if we're at root, push new base node\n if (level === 0) {\n result.push(current);\n }\n\n parent = arr[level - 1];\n\n if (parent) {\n parent.children.push(current);\n }\n\n arr[level] = current;\n }\n\n if (!isOpen || current.voidElement) {\n if (\n level > -1 &&\n (current.voidElement || current.name === tag.slice(2, -1))\n ) {\n level--;\n // move current up a level to match the end tag\n current = level === -1 ? result : arr[level];\n }\n if (!inComponent && (nextChar !== '<' || isText) && nextChar) {\n // trailing text node\n // if we're at the root, push a base text node. otherwise add as\n // a child to the current node.\n parent = level === -1 ? result : arr[level].children;\n\n // the text node runs to the next actual tag match; -1 means\n // there's no tag after it (trailing text)\n const end = nextMatch ? nextMatch.index : -1;\n let content = html.slice(start, end === -1 ? undefined : end);\n // if a node is nothing but whitespace, collapse it as the spec states:\n // https://www.w3.org/TR/html4/struct/text.html#h-9.1\n if (whitespaceRE.test(content)) {\n content = ' ';\n }\n // don't add whitespace-only text nodes if they would be trailing text nodes\n // or if they would be leading whitespace-only text nodes:\n // * end > -1 indicates this is not a trailing text node\n // * leading node is when level is -1 and parent has length 0\n if ((end > -1 && level + parent.length >= 0) || content !== ' ') {\n parent.push({\n type: 'text',\n content,\n });\n }\n }\n }\n });\n\n if (restoreNeeded) {\n restoreSentinels(result);\n }\n\n return result\n}\n\nfunction attrString(attrs) {\n const buff = [];\n for (const key in attrs) {\n if (attrs[key] === null) {\n // boolean attribute, render bare\n buff.push(key);\n } else {\n // escape double quotes so values parsed from single-quoted or\n // multiline attributes can't break out of the generated markup\n buff.push(key + '=\"' + String(attrs[key]).replace(/\"/g, '&quot;') + '\"');\n }\n }\n if (!buff.length) {\n return ''\n }\n return ' ' + buff.join(' ')\n}\n\nfunction stringifyNode(buff, doc) {\n switch (doc.type) {\n case 'text':\n return buff + doc.content\n case 'tag': {\n // a doctype is void but must not self-close: `<!DOCTYPE html>` not `<!DOCTYPE html/>`\n const tagEnd =\n doc.voidElement && doc.name.toLowerCase() !== '!doctype' ? '/>' : '>';\n buff += '<' + doc.name + (doc.attrs ? attrString(doc.attrs) : '') + tagEnd;\n if (doc.voidElement) {\n return buff\n }\n return (\n buff + doc.children.reduce(stringifyNode, '') + '</' + doc.name + '>'\n )\n }\n case 'comment':\n buff += '<!--' + doc.comment + '-->';\n return buff\n }\n}\n\nfunction stringify(doc) {\n return doc.reduce(function (token, rootEl) {\n return token + stringifyNode('', rootEl)\n }, '')\n}\n\nvar index = {\n parse,\n stringify,\n};\n\nexport { index as default, parse, stringify };\n","export const warn = (i18n, code, msg, rest) => {\n const args = [msg, {\n code,\n ...(rest || {})\n }];\n if (i18n?.services?.logger?.forward) {\n return i18n.services.logger.forward(args, 'warn', 'react-i18next::', true);\n }\n if (isString(args[0])) args[0] = `react-i18next:: ${args[0]}`;\n if (i18n?.services?.logger?.warn) {\n i18n.services.logger.warn(...args);\n } else if (console?.warn) {\n console.warn(...args);\n }\n};\nconst alreadyWarned = {};\nexport const warnOnce = (i18n, code, msg, rest) => {\n if (isString(msg) && alreadyWarned[msg]) return;\n if (isString(msg)) alreadyWarned[msg] = new Date();\n warn(i18n, code, msg, rest);\n};\nconst loadedClb = (i18n, cb) => () => {\n if (i18n.isInitialized) {\n cb();\n } else {\n const initialized = () => {\n setTimeout(() => {\n i18n.off('initialized', initialized);\n }, 0);\n cb();\n };\n i18n.on('initialized', initialized);\n }\n};\nexport const loadNamespaces = (i18n, ns, cb) => {\n i18n.loadNamespaces(ns, loadedClb(i18n, cb));\n};\nexport const loadLanguages = (i18n, lng, ns, cb) => {\n if (isString(ns)) ns = [ns];\n if (i18n.options.preload && i18n.options.preload.indexOf(lng) > -1) return loadNamespaces(i18n, ns, cb);\n ns.forEach(n => {\n if (i18n.options.ns.indexOf(n) < 0) i18n.options.ns.push(n);\n });\n i18n.loadLanguages(lng, loadedClb(i18n, cb));\n};\nexport const hasLoadedNamespace = (ns, i18n, options = {}) => {\n if (!i18n.languages || !i18n.languages.length) {\n warnOnce(i18n, 'NO_LANGUAGES', 'i18n.languages were undefined or empty', {\n languages: i18n.languages\n });\n return true;\n }\n return i18n.hasLoadedNamespace(ns, {\n lng: options.lng,\n precheck: (i18nInstance, loadNotPending) => {\n if (options.bindI18n && options.bindI18n.indexOf('languageChanging') > -1 && i18nInstance.services.backendConnector.backend && i18nInstance.isLanguageChangingTo && !loadNotPending(i18nInstance.isLanguageChangingTo, ns)) return false;\n }\n });\n};\nexport const getDisplayName = Component => Component.displayName || Component.name || (isString(Component) && Component.length > 0 ? Component : 'Unknown');\nexport const isString = obj => typeof obj === 'string';\nexport const isObject = obj => typeof obj === 'object' && obj !== null;","const matchHtmlEntity = /&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g;\nconst htmlEntities = {\n '&amp;': '&',\n '&#38;': '&',\n '&lt;': '<',\n '&#60;': '<',\n '&gt;': '>',\n '&#62;': '>',\n '&apos;': \"'\",\n '&#39;': \"'\",\n '&quot;': '\"',\n '&#34;': '\"',\n '&nbsp;': ' ',\n '&#160;': ' ',\n '&copy;': '©',\n '&#169;': '©',\n '&reg;': '®',\n '&#174;': '®',\n '&hellip;': '…',\n '&#8230;': '…',\n '&#x2F;': '/',\n '&#47;': '/'\n};\nconst unescapeHtmlEntity = m => htmlEntities[m];\nexport const unescape = text => text.replace(matchHtmlEntity, unescapeHtmlEntity);","import { unescape } from './unescape.js';\nlet defaultOptions = {\n bindI18n: 'languageChanged',\n bindI18nStore: '',\n transEmptyNodeValue: '',\n transSupportBasicHtmlNodes: true,\n transWrapTextNodes: '',\n transKeepBasicHtmlNodesFor: ['br', 'strong', 'i', 'p'],\n useSuspense: true,\n unescape,\n transDefaultProps: undefined\n};\nexport const setDefaults = (options = {}) => {\n defaultOptions = {\n ...defaultOptions,\n ...options\n };\n};\nexport const getDefaults = () => defaultOptions;","let i18nInstance;\nexport const setI18n = instance => {\n i18nInstance = instance;\n};\nexport const getI18n = () => i18nInstance;","import { Fragment, isValidElement, cloneElement, createElement, Children } from 'react';\nimport { keyFromSelector } from 'i18next';\nimport HTML from 'html-parse-stringify';\nimport { isObject, isString, warn, warnOnce } from './utils.js';\nimport { getDefaults } from './defaults.js';\nimport { getI18n } from './i18nInstance.js';\nimport { unescape } from './unescape.js';\nconst hasChildren = (node, checkLength) => {\n if (!node) return false;\n const base = node.props?.children ?? node.children;\n if (checkLength) return base.length > 0;\n return !!base;\n};\nconst getChildren = node => {\n if (!node) return [];\n const children = node.props?.children ?? node.children;\n return node.props?.i18nIsDynamicList ? getAsArray(children) : children;\n};\nconst hasValidReactChildren = children => Array.isArray(children) && children.every(isValidElement);\nconst getAsArray = data => Array.isArray(data) ? data : [data];\nconst mergeProps = (source, target) => {\n const newTarget = {\n ...target\n };\n newTarget.props = {\n ...target.props,\n ...source.props\n };\n return newTarget;\n};\nconst getValuesFromChildren = children => {\n const values = {};\n if (!children) return values;\n const getData = childs => {\n const childrenArray = getAsArray(childs);\n childrenArray.forEach(child => {\n if (isString(child)) return;\n if (hasChildren(child)) getData(getChildren(child));else if (isObject(child) && !isValidElement(child)) Object.assign(values, child);\n });\n };\n getData(children);\n return values;\n};\nexport const nodesToString = (children, i18nOptions, i18n, i18nKey) => {\n if (!children) return '';\n let stringNode = '';\n const childrenArray = getAsArray(children);\n const keepArray = i18nOptions?.transSupportBasicHtmlNodes ? i18nOptions.transKeepBasicHtmlNodesFor ?? [] : [];\n childrenArray.forEach((child, childIndex) => {\n if (isString(child)) {\n stringNode += `${child}`;\n return;\n }\n if (isValidElement(child)) {\n const {\n props,\n type\n } = child;\n const childPropsCount = Object.keys(props).length;\n const shouldKeepChild = keepArray.indexOf(type) > -1;\n const childChildren = props.children;\n if (!childChildren && shouldKeepChild && !childPropsCount) {\n stringNode += `<${type}/>`;\n return;\n }\n if (!childChildren && (!shouldKeepChild || childPropsCount) || props.i18nIsDynamicList) {\n stringNode += `<${childIndex}></${childIndex}>`;\n return;\n }\n if (shouldKeepChild && childPropsCount <= 1) {\n const cnt = isString(childChildren) ? childChildren : nodesToString(childChildren, i18nOptions, i18n, i18nKey);\n stringNode += `<${type}>${cnt}</${type}>`;\n return;\n }\n const content = nodesToString(childChildren, i18nOptions, i18n, i18nKey);\n stringNode += `<${childIndex}>${content}</${childIndex}>`;\n return;\n }\n if (child === null) {\n warn(i18n, 'TRANS_NULL_VALUE', `Passed in a null value as child`, {\n i18nKey\n });\n return;\n }\n if (isObject(child)) {\n const {\n format,\n ...clone\n } = child;\n const keys = Object.keys(clone);\n if (keys.length === 1) {\n const value = format ? `${keys[0]}, ${format}` : keys[0];\n stringNode += `{{${value}}}`;\n return;\n }\n warn(i18n, 'TRANS_INVALID_OBJ', `Invalid child - Object should only have keys {{ value, format }} (format is optional).`, {\n i18nKey,\n child\n });\n return;\n }\n warn(i18n, 'TRANS_INVALID_VAR', `Passed in a variable like {number} - pass variables for interpolation as full objects like {{number}}.`, {\n i18nKey,\n child\n });\n });\n return stringNode;\n};\nconst renderNodes = (children, knownComponentsMap, targetString, i18n, i18nOptions, combinedTOpts, shouldUnescape) => {\n if (targetString === '') return [];\n const keepArray = i18nOptions.transKeepBasicHtmlNodesFor || [];\n const emptyChildrenButNeedsHandling = targetString && new RegExp(keepArray.map(keep => `<${keep}`).join('|')).test(targetString);\n if (!children && !knownComponentsMap && !emptyChildrenButNeedsHandling && !shouldUnescape) return [targetString];\n const data = knownComponentsMap ?? {};\n const getData = childs => {\n const childrenArray = getAsArray(childs);\n childrenArray.forEach(child => {\n if (isString(child)) return;\n if (hasChildren(child)) getData(getChildren(child));else if (isObject(child) && !isValidElement(child)) Object.assign(data, child);\n });\n };\n getData(children);\n const knownNames = Object.keys(data);\n const allowedTags = name => /^\\d+$/.test(name) || keepArray.indexOf(name) > -1 || knownNames.indexOf(name) > -1;\n const ast = HTML.parse(`<0>${targetString}</0>`, {\n allowedTags\n });\n const opts = {\n ...data,\n ...combinedTOpts\n };\n const renderInner = (child, node, rootReactNode) => {\n const childs = getChildren(child);\n const mappedChildren = mapAST(childs, node.children, rootReactNode);\n return hasValidReactChildren(childs) && mappedChildren.length === 0 || child.props?.i18nIsDynamicList ? childs : mappedChildren;\n };\n const pushTranslatedJSX = (child, inner, mem, i, isVoid) => {\n if (child.dummy) {\n child.children = inner;\n mem.push(cloneElement(child, {\n key: i\n }, isVoid ? undefined : inner));\n } else {\n mem.push(...Children.map([child], c => {\n if (c.type === Fragment || c.props?.i18nIsDynamicList !== undefined) {\n const freshProps = {\n key: i\n };\n if (c && c.props) {\n Object.keys(c.props).forEach(k => {\n if (k === 'children' || k === 'i18nIsDynamicList') return;\n freshProps[k] = c.props[k];\n });\n }\n return createElement(c.type, freshProps, isVoid ? null : inner);\n }\n const override = {\n key: i\n };\n if (c && c.props) {\n Object.keys(c.props).forEach(k => {\n if (k === 'ref' || k === 'children') return;\n override[k] = c.props[k];\n });\n }\n return cloneElement(c, override, isVoid ? null : inner);\n }));\n }\n };\n const mapAST = (reactNode, astNode, rootReactNode) => {\n const reactNodes = getAsArray(reactNode);\n const astNodes = getAsArray(astNode);\n const keepTagOccurrence = {};\n return astNodes.reduce((mem, node, i) => {\n const translationContent = node.children?.[0]?.content && i18n.services.interpolator.interpolate(node.children[0].content, opts, i18n.language);\n if (node.type === 'tag') {\n let tmp = reactNodes[parseInt(node.name, 10)];\n if (!tmp && knownComponentsMap) tmp = knownComponentsMap[node.name];\n if (rootReactNode.length === 1 && !tmp) tmp = rootReactNode[0][node.name];\n if (!tmp) tmp = {};\n const props = {\n ...node.attrs\n };\n if (shouldUnescape) {\n Object.keys(props).forEach(p => {\n const val = props[p];\n if (isString(val)) {\n props[p] = unescape(val);\n }\n });\n }\n const child = Object.keys(props).length !== 0 ? mergeProps({\n props\n }, tmp) : tmp;\n const isElement = isValidElement(child);\n const isValidTranslationWithChildren = isElement && hasChildren(node, true) && !node.voidElement;\n const isEmptyTransWithHTML = emptyChildrenButNeedsHandling && isObject(child) && child.dummy && !isElement;\n const isKnownComponent = isObject(knownComponentsMap) && Object.hasOwnProperty.call(knownComponentsMap, node.name);\n if (isString(child)) {\n const value = i18n.services.interpolator.interpolate(child, opts, i18n.language);\n mem.push(value);\n } else if (hasChildren(child) || isValidTranslationWithChildren) {\n const inner = renderInner(child, node, rootReactNode);\n pushTranslatedJSX(child, inner, mem, i);\n } else if (isEmptyTransWithHTML) {\n const inner = mapAST(reactNodes, node.children, rootReactNode);\n pushTranslatedJSX(child, inner, mem, i);\n } else if (Number.isNaN(parseFloat(node.name))) {\n if (isKnownComponent) {\n const inner = renderInner(child, node, rootReactNode);\n pushTranslatedJSX(child, inner, mem, i, node.voidElement);\n } else if (i18nOptions.transSupportBasicHtmlNodes && keepArray.indexOf(node.name) > -1) {\n if (node.voidElement) {\n mem.push(createElement(node.name, {\n key: `${node.name}-${i}`\n }));\n } else {\n const occurrence = keepTagOccurrence[node.name] || 0;\n keepTagOccurrence[node.name] = occurrence + 1;\n let matched;\n let seen = 0;\n for (let r = 0; r < reactNodes.length; r += 1) {\n const rn = reactNodes[r];\n if (isValidElement(rn) && rn.type === node.name) {\n if (seen === occurrence) {\n matched = rn;\n break;\n }\n seen += 1;\n }\n }\n const innerScope = matched ? getAsArray(getChildren(matched)) : reactNodes;\n const inner = mapAST(innerScope, node.children, rootReactNode);\n mem.push(createElement(node.name, {\n key: `${node.name}-${i}`\n }, inner));\n }\n } else if (node.voidElement) {\n mem.push(`<${node.name} />`);\n } else {\n const inner = mapAST(reactNodes, node.children, rootReactNode);\n mem.push(`<${node.name}>${inner}</${node.name}>`);\n }\n } else if (isObject(child) && !isElement) {\n const content = node.children[0] ? translationContent : null;\n if (content) mem.push(content);\n } else {\n pushTranslatedJSX(child, translationContent, mem, i, node.children.length !== 1 || !translationContent);\n }\n } else if (node.type === 'text') {\n const wrapTextNodes = i18nOptions.transWrapTextNodes;\n const unescapeFn = typeof i18nOptions.unescape === 'function' ? i18nOptions.unescape : getDefaults().unescape;\n const content = shouldUnescape ? unescapeFn(i18n.services.interpolator.interpolate(node.content, opts, i18n.language)) : i18n.services.interpolator.interpolate(node.content, opts, i18n.language);\n if (wrapTextNodes) {\n mem.push(createElement(wrapTextNodes, {\n key: `${node.name}-${i}`\n }, content));\n } else {\n mem.push(content);\n }\n }\n return mem;\n }, []);\n };\n const result = mapAST([{\n dummy: true,\n children: children || []\n }], ast, getAsArray(children || []));\n return getChildren(result[0]);\n};\nconst fixComponentProps = (component, index, translation) => {\n const componentKey = component.key || index;\n const comp = cloneElement(component, {\n key: componentKey\n });\n if (!comp.props || !comp.props.children || translation.indexOf(`${index}/>`) < 0 && translation.indexOf(`${index} />`) < 0) {\n return comp;\n }\n function Componentized() {\n return createElement(Fragment, null, comp);\n }\n return createElement(Componentized, {\n key: componentKey\n });\n};\nconst generateArrayComponents = (components, translation) => components.map((c, index) => fixComponentProps(c, index, translation));\nconst generateObjectComponents = (components, translation) => {\n const componentMap = {};\n Object.keys(components).forEach(c => {\n Object.assign(componentMap, {\n [c]: fixComponentProps(components[c], c, translation)\n });\n });\n return componentMap;\n};\nconst generateComponents = (components, translation, i18n, i18nKey) => {\n if (!components) return null;\n if (Array.isArray(components)) {\n return generateArrayComponents(components, translation);\n }\n if (isObject(components)) {\n return generateObjectComponents(components, translation);\n }\n warnOnce(i18n, 'TRANS_INVALID_COMPONENTS', `<Trans /> \"components\" prop expects an object or array`, {\n i18nKey\n });\n return null;\n};\nconst isComponentsMap = object => {\n if (!isObject(object)) return false;\n if (Array.isArray(object)) return false;\n return Object.keys(object).reduce((acc, key) => acc && Number.isNaN(Number.parseFloat(key)), true);\n};\nexport function Trans({\n children,\n count,\n parent,\n i18nKey,\n context,\n tOptions = {},\n values,\n defaults,\n components,\n ns,\n i18n: i18nFromProps,\n t: tFromProps,\n shouldUnescape,\n ...additionalProps\n}) {\n const i18n = i18nFromProps || getI18n();\n if (!i18n) {\n warnOnce(i18n, 'NO_I18NEXT_INSTANCE', `Trans: You need to pass in an i18next instance using initReactI18next or by passing it via props or context. In monorepo setups, make sure there is only one instance of react-i18next.`, {\n i18nKey\n });\n return children;\n }\n const t = tFromProps || i18n.t.bind(i18n) || (k => k);\n const reactI18nextOptions = {\n ...getDefaults(),\n ...i18n.options?.react\n };\n let namespaces = ns || t.ns || i18n.options?.defaultNS;\n namespaces = isString(namespaces) ? [namespaces] : namespaces || ['translation'];\n const {\n transDefaultProps\n } = reactI18nextOptions;\n const mergedTOptions = transDefaultProps?.tOptions ? {\n ...transDefaultProps.tOptions,\n ...tOptions\n } : tOptions;\n const mergedShouldUnescape = shouldUnescape ?? transDefaultProps?.shouldUnescape;\n const mergedValues = transDefaultProps?.values ? {\n ...transDefaultProps.values,\n ...values\n } : values;\n const mergedComponents = transDefaultProps?.components ? {\n ...transDefaultProps.components,\n ...components\n } : components;\n const nodeAsString = nodesToString(children, reactI18nextOptions, i18n, i18nKey);\n const defaultValue = defaults || mergedTOptions?.defaultValue || nodeAsString || reactI18nextOptions.transEmptyNodeValue || (typeof i18nKey === 'function' ? keyFromSelector(i18nKey) : i18nKey);\n const {\n hashTransKey\n } = reactI18nextOptions;\n const key = i18nKey || (hashTransKey ? hashTransKey(nodeAsString || defaultValue) : nodeAsString || defaultValue);\n if (i18n.options?.interpolation?.defaultVariables) {\n values = mergedValues && Object.keys(mergedValues).length > 0 ? {\n ...mergedValues,\n ...i18n.options.interpolation.defaultVariables\n } : {\n ...i18n.options.interpolation.defaultVariables\n };\n } else {\n values = mergedValues;\n }\n const valuesFromChildren = getValuesFromChildren(children);\n if (valuesFromChildren && typeof valuesFromChildren.count === 'number' && count === undefined) {\n count = valuesFromChildren.count;\n }\n const interpolationOverride = values || count !== undefined && !i18n.options?.interpolation?.alwaysFormat || !children ? mergedTOptions.interpolation : {\n interpolation: {\n ...mergedTOptions.interpolation,\n prefix: '#$?',\n suffix: '?$#'\n }\n };\n const combinedTOpts = {\n ...mergedTOptions,\n context: context || mergedTOptions.context,\n count,\n ...values,\n ...interpolationOverride,\n defaultValue,\n ns: namespaces\n };\n let translation = key ? t(key, combinedTOpts) : defaultValue;\n if (translation === key && defaultValue) translation = defaultValue;\n const generatedComponents = generateComponents(mergedComponents, translation, i18n, i18nKey);\n let indexedChildren = generatedComponents || children;\n let componentsMap = null;\n if (isComponentsMap(generatedComponents)) {\n componentsMap = generatedComponents;\n indexedChildren = children;\n }\n const content = renderNodes(indexedChildren, componentsMap, translation, i18n, reactI18nextOptions, combinedTOpts, mergedShouldUnescape);\n const useAsParent = parent ?? reactI18nextOptions.defaultTransParent;\n return useAsParent ? createElement(useAsParent, additionalProps, content) : content;\n}","import { createContext } from 'react';\nimport { getDefaults, setDefaults } from './defaults.js';\nimport { getI18n, setI18n } from './i18nInstance.js';\nimport { initReactI18next } from './initReactI18next.js';\nexport { getDefaults, setDefaults, getI18n, setI18n, initReactI18next };\nexport const I18nContext = createContext();\nexport class ReportNamespaces {\n constructor() {\n this.usedNamespaces = {};\n }\n addUsedNamespaces(namespaces) {\n namespaces.forEach(ns => {\n if (!this.usedNamespaces[ns]) this.usedNamespaces[ns] = true;\n });\n }\n getUsedNamespaces() {\n return Object.keys(this.usedNamespaces);\n }\n}\nexport const composeInitialProps = ForComponent => async ctx => {\n const componentsInitialProps = (await ForComponent.getInitialProps?.(ctx)) ?? {};\n const i18nInitialProps = getInitialProps();\n return {\n ...componentsInitialProps,\n ...i18nInitialProps\n };\n};\nexport const getInitialProps = () => {\n const i18n = getI18n();\n if (!i18n) {\n console.warn('react-i18next:: getInitialProps: You will need to pass in an i18next instance by using initReactI18next');\n return {};\n }\n const namespaces = i18n.reportNamespaces?.getUsedNamespaces() ?? [];\n const ret = {};\n const initialI18nStore = {};\n i18n.languages.forEach(l => {\n initialI18nStore[l] = {};\n namespaces.forEach(ns => {\n initialI18nStore[l][ns] = i18n.getResourceBundle(l, ns) || {};\n });\n });\n ret.initialI18nStore = initialI18nStore;\n ret.initialLanguage = i18n.language;\n return ret;\n};","import { useContext } from 'react';\nimport { nodesToString, Trans as TransWithoutContext } from './TransWithoutContext.js';\nimport { getI18n, I18nContext } from './context.js';\nexport { nodesToString };\nexport function Trans({\n children,\n count,\n parent,\n i18nKey,\n context,\n tOptions = {},\n values,\n defaults,\n components,\n ns,\n i18n: i18nFromProps,\n t: tFromProps,\n shouldUnescape,\n ...additionalProps\n}) {\n const {\n i18n: i18nFromContext,\n defaultNS: defaultNSFromContext\n } = useContext(I18nContext) || {};\n const i18n = i18nFromProps || i18nFromContext || getI18n();\n const t = tFromProps || i18n?.t.bind(i18n);\n return TransWithoutContext({\n children,\n count,\n parent,\n i18nKey,\n context,\n tOptions,\n values,\n defaults,\n components,\n ns: ns || t?.ns || defaultNSFromContext || i18n?.options?.defaultNS,\n i18n,\n t: tFromProps,\n shouldUnescape,\n ...additionalProps\n });\n}","/**\n * @license React\n * use-sync-external-store-shim.production.js\n *\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n\"use strict\";\nvar React = require(\"react\");\nfunction is(x, y) {\n return (x === y && (0 !== x || 1 / x === 1 / y)) || (x !== x && y !== y);\n}\nvar objectIs = \"function\" === typeof Object.is ? Object.is : is,\n useState = React.useState,\n useEffect = React.useEffect,\n useLayoutEffect = React.useLayoutEffect,\n useDebugValue = React.useDebugValue;\nfunction useSyncExternalStore$2(subscribe, getSnapshot) {\n var value = getSnapshot(),\n _useState = useState({ inst: { value: value, getSnapshot: getSnapshot } }),\n inst = _useState[0].inst,\n forceUpdate = _useState[1];\n useLayoutEffect(\n function () {\n inst.value = value;\n inst.getSnapshot = getSnapshot;\n checkIfSnapshotChanged(inst) && forceUpdate({ inst: inst });\n },\n [subscribe, value, getSnapshot]\n );\n useEffect(\n function () {\n checkIfSnapshotChanged(inst) && forceUpdate({ inst: inst });\n return subscribe(function () {\n checkIfSnapshotChanged(inst) && forceUpdate({ inst: inst });\n });\n },\n [subscribe]\n );\n useDebugValue(value);\n return value;\n}\nfunction checkIfSnapshotChanged(inst) {\n var latestGetSnapshot = inst.getSnapshot;\n inst = inst.value;\n try {\n var nextValue = latestGetSnapshot();\n return !objectIs(inst, nextValue);\n } catch (error) {\n return !0;\n }\n}\nfunction useSyncExternalStore$1(subscribe, getSnapshot) {\n return getSnapshot();\n}\nvar shim =\n \"undefined\" === typeof window ||\n \"undefined\" === typeof window.document ||\n \"undefined\" === typeof window.document.createElement\n ? useSyncExternalStore$1\n : useSyncExternalStore$2;\nexports.useSyncExternalStore =\n void 0 !== React.useSyncExternalStore ? React.useSyncExternalStore : shim;\n","'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n module.exports = require('../cjs/use-sync-external-store-shim.production.js');\n} else {\n module.exports = require('../cjs/use-sync-external-store-shim.development.js');\n}\n","import { useContext, useCallback, useMemo, useEffect, useRef, useState } from 'react';\nimport { useSyncExternalStore } from 'use-sync-external-store/shim';\nimport { getI18n, getDefaults, ReportNamespaces, I18nContext } from './context.js';\nimport { warnOnce, loadNamespaces, loadLanguages, hasLoadedNamespace, isString, isObject } from './utils.js';\nconst notReadyT = (k, optsOrDefaultValue) => {\n if (isString(optsOrDefaultValue)) return optsOrDefaultValue;\n if (isObject(optsOrDefaultValue) && isString(optsOrDefaultValue.defaultValue)) return optsOrDefaultValue.defaultValue;\n if (typeof k === 'function') return '';\n if (Array.isArray(k)) {\n const last = k[k.length - 1];\n return typeof last === 'function' ? '' : last;\n }\n return k;\n};\nconst notReadySnapshot = {\n t: notReadyT,\n ready: false\n};\nconst dummySubscribe = () => () => {};\nexport const useTranslation = (ns, props = {}) => {\n const {\n i18n: i18nFromProps\n } = props;\n const {\n i18n: i18nFromContext,\n defaultNS: defaultNSFromContext\n } = useContext(I18nContext) || {};\n const i18n = i18nFromProps || i18nFromContext || getI18n();\n if (i18n && !i18n.reportNamespaces) i18n.reportNamespaces = new ReportNamespaces();\n if (!i18n) {\n warnOnce(i18n, 'NO_I18NEXT_INSTANCE', 'useTranslation: You will need to pass in an i18next instance by using initReactI18next or by passing it via props or context. In monorepo setups, make sure there is only one instance of react-i18next.');\n }\n const i18nOptions = useMemo(() => ({\n ...getDefaults(),\n ...i18n?.options?.react,\n ...props\n }), [i18n, props]);\n const {\n useSuspense,\n keyPrefix\n } = i18nOptions;\n const nsOrContext = ns || defaultNSFromContext || i18n?.options?.defaultNS;\n const unstableNamespaces = isString(nsOrContext) ? [nsOrContext] : nsOrContext || ['translation'];\n const namespaces = useMemo(() => unstableNamespaces, unstableNamespaces);\n i18n?.reportNamespaces?.addUsedNamespaces?.(namespaces);\n const revisionRef = useRef(0);\n const subscribe = useCallback(callback => {\n if (!i18n) return dummySubscribe;\n const {\n bindI18n,\n bindI18nStore\n } = i18nOptions;\n const wrappedCallback = () => {\n revisionRef.current += 1;\n callback();\n };\n if (bindI18n) i18n.on(bindI18n, wrappedCallback);\n if (bindI18nStore) i18n.store.on(bindI18nStore, wrappedCallback);\n return () => {\n if (bindI18n) bindI18n.split(' ').forEach(e => i18n.off(e, wrappedCallback));\n if (bindI18nStore) bindI18nStore.split(' ').forEach(e => i18n.store.off(e, wrappedCallback));\n };\n }, [i18n, i18nOptions]);\n const snapshotRef = useRef();\n const getSnapshot = useCallback(() => {\n if (!i18n) {\n return notReadySnapshot;\n }\n const calculatedReady = !!(i18n.isInitialized || i18n.initializedStoreOnce) && namespaces.every(n => hasLoadedNamespace(n, i18n, i18nOptions));\n const currentLng = props.lng || i18n.language;\n const currentRevision = revisionRef.current;\n const lastSnapshot = snapshotRef.current;\n if (lastSnapshot && lastSnapshot.ready === calculatedReady && lastSnapshot.lng === currentLng && lastSnapshot.keyPrefix === keyPrefix && lastSnapshot.revision === currentRevision) {\n return lastSnapshot;\n }\n const calculatedT = i18n.getFixedT(currentLng, i18nOptions.nsMode === 'fallback' ? namespaces : namespaces[0], keyPrefix, {\n scopeNs: namespaces\n });\n const newSnapshot = {\n t: calculatedT,\n ready: calculatedReady,\n lng: currentLng,\n keyPrefix,\n revision: currentRevision\n };\n snapshotRef.current = newSnapshot;\n return newSnapshot;\n }, [i18n, namespaces, keyPrefix, i18nOptions, props.lng]);\n const [loadCount, setLoadCount] = useState(0);\n const {\n t,\n ready\n } = useSyncExternalStore(subscribe, getSnapshot, getSnapshot);\n useEffect(() => {\n if (i18n && !ready && !useSuspense) {\n const onLoaded = () => setLoadCount(c => c + 1);\n if (props.lng) {\n loadLanguages(i18n, props.lng, namespaces, onLoaded);\n } else {\n loadNamespaces(i18n, namespaces, onLoaded);\n }\n }\n }, [i18n, props.lng, namespaces, ready, useSuspense, loadCount]);\n const finalI18n = i18n || {};\n const wrapperRef = useRef(null);\n const wrapperLangRef = useRef();\n const createI18nWrapper = original => {\n const descriptors = Object.getOwnPropertyDescriptors(original);\n if (descriptors.__original) delete descriptors.__original;\n const wrapper = Object.create(Object.getPrototypeOf(original), descriptors);\n if (!Object.prototype.hasOwnProperty.call(wrapper, '__original')) {\n try {\n Object.defineProperty(wrapper, '__original', {\n value: original,\n writable: false,\n enumerable: false,\n configurable: false\n });\n } catch (_) {}\n }\n return wrapper;\n };\n const ret = useMemo(() => {\n const original = finalI18n;\n const lang = original?.language;\n let i18nWrapper = original;\n if (original) {\n if (wrapperRef.current && wrapperRef.current.__original === original) {\n if (wrapperLangRef.current !== lang) {\n i18nWrapper = createI18nWrapper(original);\n wrapperRef.current = i18nWrapper;\n wrapperLangRef.current = lang;\n } else {\n i18nWrapper = wrapperRef.current;\n }\n } else {\n i18nWrapper = createI18nWrapper(original);\n wrapperRef.current = i18nWrapper;\n wrapperLangRef.current = lang;\n }\n }\n const effectiveT = !ready && !useSuspense ? (...args) => {\n warnOnce(i18n, 'USE_T_BEFORE_READY', 'useTranslation: t was called before ready. When using useSuspense: false, make sure to check the ready flag before using t.');\n return t(...args);\n } : t;\n const arr = [effectiveT, i18nWrapper, ready];\n arr.t = effectiveT;\n arr.i18n = i18nWrapper;\n arr.ready = ready;\n return arr;\n }, [t, finalI18n, ready, finalI18n.resolvedLanguage, finalI18n.language, finalI18n.languages]);\n if (i18n && useSuspense && !ready) {\n let inDevelopment = false;\n try {\n inDevelopment = process.env.NODE_ENV !== 'production';\n } catch (e) {}\n if (inDevelopment) {\n warnOnce(i18n, 'SUSPENDED_WHILE_LOADING', 'useTranslation: suspended while translations are loading (useSuspense is true by default). Add a <Suspense> boundary above this component, or set react.useSuspense: false in the i18next init options. https://react.i18next.com/latest/usetranslation-hook');\n }\n throw new Promise(resolve => {\n const onLoaded = () => resolve();\n if (props.lng) {\n loadLanguages(i18n, props.lng, namespaces, onLoaded);\n } else {\n loadNamespaces(i18n, namespaces, onLoaded);\n }\n });\n }\n return ret;\n};","import { useContext } from \"react\";\nimport { AppI18nContext } from \"./provider\";\nimport type { KeyPrefix } from \"i18next\";\nimport {\n Trans as ReactTrans,\n useTranslation as useReactTranslation,\n type FallbackNs,\n type UseTranslationOptions,\n} from \"react-i18next\";\n\nimport { i18next } from \"@app/i18n/instance\";\nimport type { Namespace } from \"@app/i18n/namespaces\";\n\nexport function useTranslation<\n const N extends Namespace | readonly Namespace[] | undefined = undefined,\n const K extends KeyPrefix<FallbackNs<N>> = undefined,\n>(namespace?: N, options?: UseTranslationOptions<K>) {\n const instance = useContext(AppI18nContext) ?? i18next;\n return useReactTranslation<N, K>(namespace, { ...options, i18n: instance });\n}\n\nexport const Trans: typeof ReactTrans = (props) => {\n const instance = useContext(AppI18nContext) ?? i18next;\n return <ReactTrans {...props} i18n={instance} />;\n};\n","/**\n * Public surface for app translation. Import from `@app/i18n`, not from the\n * modules behind it or from `i18next` / `react-i18next` directly. That keeps\n * the library choice replaceable and gives call sites one place to look.\n *\n * In components, naming the namespace that owns the string (see\n * `namespaces.ts` for which one that is):\n *\n * ```tsx\n * const { t } = useTranslation(\"account\");\n * return <h1>{t(\"loginPage.signIn\")}</h1>;\n * ```\n *\n * `common` is the default, so cross-domain components can omit it:\n *\n * ```tsx\n * const { t } = useTranslation();\n * return <h1>{t(\"aboutPage.version\")}</h1>;\n * ```\n *\n * Outside React (stores, event handlers, toasts) use the bound `t`:\n *\n * ```ts\n * import { t } from \"@app/i18n\";\n * toast.error(t(\"aboutPage.version\"));\n * ```\n *\n * Keys are type-checked against `locales/en/common.json` via the `i18next`\n * module augmentation in `i18next.d.ts`, so a typo or a key deleted from the\n * catalog fails `tsc`, not QA.\n */\nimport { type TFunction } from \"i18next\";\nimport { i18next } from \"@app/i18n/instance\";\n\nimport type { Namespace } from \"@app/i18n/namespaces\";\n\nexport { Trans, useTranslation } from \"@app/i18n/react\";\n\nexport {\n changeLocale,\n currentLocale,\n formatLocale,\n initI18n,\n resolveInitialLocale,\n} from \"@app/i18n/i18n\";\n\nexport {\n DEFAULT_LOCALE,\n LOCALE_LABELS,\n SUPPORTED_LOCALES,\n isSupportedLocale,\n negotiateLocale,\n type SupportedLocale,\n} from \"@app/i18n/supported-locales\";\n\nexport { systemLocales } from \"@app/i18n/system-locale\";\n\nexport {\n DEFAULT_NAMESPACE,\n NAMESPACES,\n type Namespace,\n} from \"@app/i18n/namespaces\";\n\n/**\n * Namespace-bound `t` for non-React call sites.\n *\n * This is the app instance’s `i18next.t`, so it reads the same active locale the\n * hook does and picks up `changeLocale()`, but it is *not* reactive. A\n * component that renders its result must use `useTranslation()` instead, or\n * it will keep showing the previous language after a switch.\n */\nexport const t = i18next.t.bind(i18next);\n\n/**\n * The type of a namespace-bound `t`, for a helper that is handed one rather\n * than holding it. A plain function cannot call `useTranslation()`, so it\n * takes a parameter of this type and its component caller owns the reactive\n * binding.\n */\nexport type { TFunction } from \"i18next\";\n\n/**\n * The union of valid key paths, derived from the English catalogs. Type a\n * parameter as `ParseKeys<\"account\">` rather than `string` when it names copy, so\n * the catalog stays the only place copy can come from.\n */\nexport type { ParseKeys } from \"i18next\";\n\n/**\n * A `t` bound to one namespace, for call sites outside React that read a\n * single namespace and would otherwise resolve against `common`.\n *\n * Carries the same caveat as {@link t}: it reads the active locale but is not\n * reactive, so anything rendering its result belongs on `useTranslation()`.\n */\nexport function fixedT<N extends Namespace>(namespace: N): TFunction<N> {\n return i18next.getFixedT(null, namespace);\n}\n"],"file":"i18n-BaPIfk2c.js"}
1
+ {"version":3,"mappings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GAAM,CAAC,IAAK,KAAK,CACjB,GAAM,CACL,IACA,KACA,IACA,CACD,GAAM,CACL,IACA,KACA,KACA,IACA,CACD,GAAM,CAAC,IAAK,IAAI,CAChB,GAAM,CAAC,IAAK,KAAK,CACjB,GAAM,CAAC,IAAK,KAAK,CACjB,GAAM,CACL,IACA,KACA,IACA,KACA,CACD,GAAM,CACL,KACA,KACA,IACA,IACA,CACD,GAAM,CACL,IACA,IACA,KACA,KACA,CACD,GAAM,CAAC,IAAI,CACX,GAAM,CAAC,IAAK,KAAK,CACjB,GAAM,CACL,IACA,KACA,IACA,KACA,CACD,GAAM,CAAC,IAAK,IAAI,CAChB,GAAM,CACL,IACA,IACA,KACA,KACA,CACD,GAAM,CAAC,IAAK,IAAI,CAChB,GAAM,CACL,IACA,IACA,KACA,KACA,CACD,GAAM,CACL,IACA,KACA,IACA,KACA,CACD,GAAM,CACL,IACA,IACA,KACA,KACA,CACD,GAAM,CAAC,KAAM,IAAI,CACjB,GAAM,CACL,IACA,IACA,KACA,CACD,GAAM,CAAC,IAAK,KAAK,CACjB,GAAM,CACL,IACA,KACA,IACA,CACD,GAAM,CAAC,IAAK,KAAK,CACjB,GAAM,CACL,IACA,IACA,KACA,KACA,CACD,GAAM,CACL,IACA,IACA,KACA,KACA,CACD,GAAM,CACL,IACA,IACA,KACA,CACD,GAAM,CACL,IACA,KACA,KACA,IACA,CACD,GAAM,CACL,IACA,IACA,KACA,KACA,CACD,GAAM,CAAC,IAAI,CACX,GAAM,CACL,IACA,IACA,KACA,KACA,CACD,GAAM,CACL,IACA,IACA,KACA,KACA,CACD,GAAM,CAAC,IAAK,KAAK,CACjB,GAAM,CAAC,IAAK,KAAK,CACjB,GAAM,CACL,IACA,IACA,KACA,KACA,CACD,GAAM,CACL,IACA,IACA,KACA,KACA,CACD,GAAM,CAAC,IAAI,CACX,GAAM,CAAC,IAAK,KAAK,CACjB,GAAM,CACL,IACA,IACA,KACA,KACA,CACD,GAAM,CAAC,IAAK,IAAI,CAChB,GAAM,CAAC,IAAI,CACX,GAAM,CACL,IACA,KACA,IACA,KACA,CACD,GAAM,CACL,IACA,IACA,KACA,KACA,CACD,GAAM,CACL,IACA,KACA,KACA,IACA,CACD,GAAM,CACL,IACA,IACA,KACA,KACA,CACD,GAAM,CACL,IACA,IACA,KACA,KACA,CACD,GAAM,CAAC,IAAK,KAAK,CACjB,GAAM,CACL,IACA,KACA,KACA,IACA,CACD,GAAM,CACL,IACA,KACA,KACA,IACA,CACD,GAAM,CAAC,IAAK,IAAI,CAChB,GAAM,CACL,IACA,KACA,IACA,KACA,CACD,GAAM,CACL,KACA,KACA,IACA,IACA,CACD,GAAM,CAAC,IAAI,CACX,GAAM,CACL,IACA,KACA,IACA,KACA,CACD,GAAM,CACL,IACA,IACA,KACA,KACA,CACD,GAAM,CACL,IACA,KACA,IACA,KACA,CACD,GAAM,CAAC,IAAK,IAAI,CAChB,GAAM,CAAC,IAAK,KAAK,CACjB,GAAM,CAAC,IAAK,KAAK,CACjB,GAAM,CACL,IACA,IACA,KACA,KACA,CACD,GAAM,CACL,IACA,KACA,IACA,KACA,CACD,GAAM,CACL,IACA,KACA,IACA,CACD,GAAM,CAAC,IAAK,KAAK,CACjB,GAAM,CACL,IACA,IACA,KACA,KACA,CACD,GAAM,CAAC,IAAK,IAAI,CAChB,GAAM,CACL,IACA,IACA,KACA,KACA,CACD,GAAM,CAAC,IAAK,IAAI,CAChB,GAAM,CACL,IACA,KACA,IACA,KACA,CACD,GAAM,CAAC,IAAK,KAAK,CACjB,GAAM,CAAC,IAAK,KAAK,CACjB,GAAM,CACL,IACA,KACA,IACA,KACA,CACD,GAAM,CACL,IACA,IACA,KACA,KACA,CACD,GAAM,CACL,IACA,IACA,KACA,KACA,CACD,GAAM,CACL,IACA,IACA,KACA,KACA,CACD,GAAM,CACL,IACA,KACA,IACA,KACA,CACD,GAAM,CAAC,IAAK,KAAK,CACjB,GAAM,CACL,IACA,KACA,IACA,KACA,CACD,GAAM,CACL,IACA,KACA,KACA,IACA,CACD,GAAM,CACL,IACA,IACA,KACA,KACA,CACD,GAAM,CAAC,IAAK,KAAK,CACjB,GAAM,CAAC,IAAK,IAAI,CAChB,GAAM,CACL,IACA,IACA,KACA,KACA,CACD,GAAM,CAAC,IAAI,CACX,GAAM,CACL,IACA,IACA,KACA,KACA,CACD,GAAM,CAAC,IAAK,KAAK,CACjB,GAAM,CACL,IACA,IACA,KACA,KACA,CACD,GAAM,CAAC,IAAK,IAAI,CAChB,GAAM,CACL,IACA,IACA,KACA,KACA,CACD,GAAM,CACL,IACA,KACA,KACA,IACA,CACD,GAAM,CAAC,KAAM,IAAI,CACjB,GAAM,CAAC,IAAI,CACX,GAAM,CAAC,IAAK,KAAK,CACjB,GAAM,CACL,IACA,IACA,KACA,KACA,CACD,GAAM,CACL,IACA,KACA,IACA,KACA,CACD,GAAM,CACL,IACA,KACA,KACA,IACA,CACD,GAAM,CACL,IACA,IACA,IACA,CACD,GAAM,CACL,KACA,KACA,IACA,IACA,CACD,GAAM,CACL,IACA,IACA,KACA,KACA,CACD,GAAM,CACL,KACA,IACA,IACA,KACA,CACD,GAAM,CACL,IACA,KACA,IACA,KACA,CACD,GAAM,CACL,IACA,IACA,KACA,KACA,CACD,GAAM,CACL,IACA,KACA,IACA,KACA,CACD,GAAM,CACL,IACA,IACA,KACA,KACA,CACD,GAAM,CACL,IACA,IACA,KACA,KACA,CACD,GAAM,CACL,IACA,KACA,KACA,IACA,CACD,GAAM,CACL,IACA,KACA,IACA,KACA,CACD,GAAM,CAAC,IAAK,KAAK,CACjB,GAAM,CACL,IACA,KACA,KACA,IACA,CACD,GAAM,CACL,IACA,KACA,KACA,IACA,CACD,GAAM,CACL,IACA,KACA,IACA,KACA,CACD,GAAM,CACL,IACA,KACA,IACA,CACD,GAAM,CACL,IACA,IACA,KACA,KACA,CACD,GAAM,CACL,IACA,KACA,IACA,KACA,CACD,GAAM,CAAC,IAAK,IAAI,CAChB,GAAM,CACL,IACA,IACA,KACA,KACA,CACD,GAAM,CACL,IACA,IACA,KACA,CACD,GAAM,CACL,IACA,KACA,KACA,IACA,CACD,GAAM,CACL,IACA,KACA,KACA,IACA,CACD,GAAM,CACL,IACA,IACA,KACA,KACA,CACD,GAAM,CAAC,IAAK,KAAK,CACjB,GAAM,CAAC,IAAK,KAAK,CACjB,GAAM,CACL,IACA,KACA,IACA,CACD,GAAM,CAAC,IAAK,KAAK,CACjB,GAAM,CAAC,IAAK,IAAI,CAChB,GAAM,CACL,IACA,KACA,IACA,KACA,CACD,GAAM,CACL,IACA,IACA,KACA,KACA,CACD,GAAM,CAAC,IAAI,CACX,GAAM,CACL,KACA,KACA,IACA,IACA,CACD,GAAM,CACL,IACA,IACA,KACA,KACA,CACD,GAAM,CACL,IACA,KACA,KACA,IACA,CACD,GAAM,CACL,IACA,KACA,IACA,KACA,CACD,GAAM,CAAC,IAAK,KAAK,CACjB,GAAM,CACL,IACA,KACA,KACA,IACA,CACD,GAAM,CACL,IACA,IACA,KACA,KACA,CACD,GAAM,CAAC,IAAK,IAAI,CAChB,GAAM,CAAC,IAAK,IAAI,CAChB,GAAM,CAAC,IAAK,IAAI,CAChB,GAAM,CACL,IACA,KACA,IACA,KACA,CACD,GAAM,CACL,IACA,IACA,KACA,KACA,CACD,GAAM,CACL,KACA,KACA,IACA,IACA,CACD,GAAM,CAAC,IAAK,KAAK,CACjB,GAAM,CACL,IACA,IACA,KACA,KACA,CACD,GAAM,CAAC,IAAK,KAAK,CACjB,GAAM,CAAC,IAAI,CACX,GAAM,CACL,IACA,IACA,KACA,KACA,CACD,GAAM,CACL,IACA,IACA,KACA,KACA,CACD,GAAM,CACL,IACA,IACA,KACA,KACA,CACD,GAAM,CAAC,IAAK,KAAK,CACjB,GAAM,CAAC,IAAK,IAAI,CAChB,GAAM,CACL,IACA,IACA,KACA,CACD,GAAM,CACL,IACA,IACA,KACA,KACA,CACD,GAAM,CACL,IACA,IACA,KACA,KACA,CACD,GAAM,CACL,IACA,KACA,IACA,KACA,CACD,GAAM,CACL,IACA,KACA,KACA,IACA,CACD,GAAM,CACL,IACA,IACA,KACA,KACA,CACD,GAAM,CACL,IACA,IACA,KACA,KACA,CACD,GAAM,CACL,IACA,IACA,KACA,CACD,GAAM,CAAC,IAAK,IAAI,CAChB,GAAM,CACL,IACA,KACA,KACA,IACA,CACD,GAAM,CACL,IACA,KACA,IACA,CACD,GAAM,CAAC,IAAK,IAAI,CAChB,GAAM,CAAC,IAAK,KAAK,CACjB,GAAM,CACL,IACA,IACA,KACA,KACA,CACD,GAAM,CACL,IACA,IACA,KACA,KACA,CACD,GAAM,CACL,IACA,KACA,KACA,IACA,CACD,GAAM,CAAC,IAAK,KAAK,CACjB,GAAM,CAAC,IAAK,IAAI,CAChB,GAAM,CACL,IACA,IACA,KACA,KACA,CACD,GAAM,CACL,IACA,KACA,KACA,IACA,CACD,GAAM,CAAC,IAAK,KAAK,CACjB,GAAM,CAAC,IAAK,KAAK,CACjB,GAAM,CACL,IACA,KACA,IACA,CACD,GAAM,CAAC,IAAI,CACX,GAAM,CAAC,IAAK,IAAI,CAChB,GAAM,CACL,IACA,KACA,KACA,IACA,CACD,GAAM,CACL,IACA,KACA,IACA,KACA,CACD,GAAM,CACL,IACA,IACA,KACA,CACD,GAAM,CACL,IACA,KACA,KACA,IACA,CACD,GAAM,CAAC,IAAI,CACX,GAAM,CACL,IACA,KACA,IACA,KACA,CACD,GAAM,CACL,IACA,IACA,KACA,KACA,CACD,GAAM,CAAC,IAAK,KAAK,CACjB,GAAM,CAAC,IAAI,CACX,GAAM,CAAC,IAAI,CACX,GAAM,CACL,IACA,KACA,IACA,KACA,CACD,GAAM,CACL,IACA,IACA,KACA,CACD,GAAM,CACL,IACA,IACA,KACA,CACD,GAAM,CAAC,IAAK,IAAI,CAChB,GAAM,CAAC,IAAK,KAAK,CACjB,GAAM,CACL,IACA,KACA,IACA,KACA,CACD,GAAM,CAAC,IAAK,KAAK,CACjB,GAAM,CACL,IACA,IACA,KACA,KACA,CACD,GAAM,CACL,IACA,IACA,KACA,KACA,CACD,GAAM,CACL,IACA,KACA,KACA,IACA,CACD,GAAM,CACL,IACA,KACA,IACA,KACA,CACD,GAAM,CACL,IACA,IACA,KACA,KACA,CACD,GAAM,CACL,IACA,KACA,IACA,KACA,CACD,GAAM,CACL,IACA,IACA,KACA,CACD,GAAM,CACL,IACA,IACA,KACA,CACD,GAAM,CAAC,IAAK,KAAK,CACjB,GAAM,CAAC,IAAK,IAAI,CAChB,GAAM,CAAC,IAAK,IAAI,CAChB,GAAM,CACL,IACA,KACA,KACA,IACA,CACD,GAAM,CAAC,IAAK,IAAI,CAChB,GAAM,CACL,IACA,KACA,KACA,IACA,CACD,GAAM,CAAC,IAAK,IAAI,CAChB,GAAM,CAAC,IAAK,KAAK,CACjB,GAAM,CACL,IACA,KACA,IACA,KACA,CACD,GAAM,CACL,KACA,KACA,IACA,IACA,CACD,GAAM,CACL,KACA,KACA,IACA,IACA,CACD,GAAM,CACL,IACA,KACA,IACA,CACD,GAAM,CACL,KACA,KACA,IACA,IACA,CACD,GAAM,CACL,IACA,KACA,IACA,KACA,CACD,GAAM,CACL,IACA,KACA,IACA,KACA,CACD,GAAM,CACL,IACA,IACA,KACA,KACA,CACD,GAAM,CACL,IACA,KACA,IACA,CACD,GAAM,CACL,IACA,IACA,KACA,CACD,GAAM,CACL,IACA,KACA,IACA,KACA,CACD,GAAM,CACL,IACA,IACA,KACA,KACA,CACD,GAAM,CACL,IACA,KACA,IACA,KACA,CACD,GAAM,CACL,IACA,KACA,IACA,KACA,CACD,GAAM,CAAC,IAAK,IAAI,CAChB,GAAM,CAAC,IAAK,IAAI,CAChB,GAAM,CAAC,IAAK,KAAK,CACjB,GAAM,CAAC,IAAK,IAAI,CAChB,GAAM,CACL,IACA,KACA,IACA,CACD,GAAM,CACL,IACA,KACA,KACA,IACA,CACD,GAAM,CAAC,IAAK,KAAK,CACjB,GAAM,CACL,IACA,IACA,KACA,KACA,CACD,GAAM,CACL,IACA,KACA,IACA,KACA,CACD,GAAM,CAAC,IAAK,IAAI,CAChB,QAAS,CACR,IACA,IACA,KACA,KACA,CACD,SAAU,CACT,IACA,KACA,KACA,IACA,CACD,QAAS,CACR,IACA,IACA,KACA,CACD,SAAU,CACT,IACA,KACA,IACA,KACA,CACD,QAAS,CACR,IACA,KACA,IACA,KACA,CACD,QAAS,CACR,IACA,IACA,KACA,KACA,CACD,QAAS,CACR,IACA,KACA,IACA,KACA,CACD,QAAS,CACR,IACA,IACA,KACA,KACA,CACD,QAAS,CACR,IACA,IACA,KACA,KACA,CACD,QAAS,CACR,IACA,IACA,KACA,KACA,CACD,QAAS,CACR,IACA,IACA,KACA,CACD,QAAS,CACR,IACA,IACA,KACA,CACD,QAAS,CACR,KACA,KACA,IACA,IACA,CACD,QAAS,CACR,KACA,IACA,IACA,CACD,QAAS,CACR,IACA,IACA,KACA,CACD,QAAS,CACR,IACA,IACA,KACA,CACD,QAAS,CACR,KACA,IACA,IACA,CACD,QAAS,CAAC,IAAK,KAAK,CACpB,QAAS,CACR,KACA,IACA,IACA,CACD,QAAS,CACR,KACA,KACA,IACA,IACA,CACD,QAAS,CACR,KACA,KACA,IACA,IACA,CACD,QAAS,CACR,KACA,IACA,KACA,IACA,CACD,QAAS,CACR,KACA,IACA,IACA,CACD,QAAS,CACR,IACA,KACA,KACA,IACA,CACD,CAUD,SAAS,GAAe,EAAU,EAAQ,CACzC,IAAI,EAAe,GACnB,IAAK,IAAI,EAAa,EAAG,EAAa,EAAS,OAAQ,IAAc,CACpE,IAAM,EAAc,EAAS,OAAO,EAAW,CAC/C,GAAI,IAAgB,IAAK,CACxB,IAAI,EAAc,EAClB,KAAO,EAAa,EAAI,EAAS,QAAU,EAAS,OAAO,EAAa,EAAE,GAAK,GAC9E,IACA,IAED,IAAI,EAAU,GAAK,EAAc,GAC7B,EAAe,EAAc,EAAI,EAAI,GAAK,GAAe,GAEzD,EAAW,GAA+B,EAAO,CAErD,KADI,GAAY,KAAO,GAAY,OAAK,EAAe,G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AAO,EAAU,iBAAkB,EAAU,SAAU,EAAU,UAAU,CAAC,CAC9F,GAAI,GAAQ,GAAe,CAAC,EAAO,CACjC,IAAI,EAAgB,GACpB,GAAI,CACF,EAAgB,QACN,EAIZ,MAHI,GACF,EAAS,EAAM,0BAA2B,+PAA+P,CAErS,IAAI,QAAQ,GAAW,CAC3B,IAAM,MAAiB,GAAS,CAC5B,EAAM,IACR,GAAc,EAAM,EAAM,IAAK,EAAY,EAAS,CAEpD,GAAe,EAAM,EAAY,EAAS,EAE5C,CAEJ,OAAO,GC3JT,SAAgB,GAGd,EAAe,EAAoC,CACnD,IAAM,mBAAsB,GAAe,EAAI,EAC/C,OAAO,GAA0B,EAAW,CAAE,GAAG,EAAS,KAAM,EAAU,CAAC,CAG7E,IAAa,GAA4B,GAAU,CACjD,IAAM,mBAAsB,GAAe,EAAI,EAC/C,OAAO,UAAC,GAAD,CAAY,GAAI,EAAO,KAAM,EAAY,GCgDrC,GAAI,EAAQ,EAAE,KAAK,EAAQ","names":["parse","getDefaults","utils.defaults","IntlMessageFormat","utils.getPath","isValidElement","HTML","Children","Fragment","Trans","keyFromSelector","TransWithoutContext","useTranslation"],"ignoreList":[0,2,3,4,5,6,7,18,19,20,21,22,23,24,25,26,27,28],"sources":["../../../../../node_modules/.bun/i18next@26.3.6+1fb4c65d43e298b9/node_modules/i18next/dist/esm/i18next.js","../../../src/i18n/instance.ts","../../../../../node_modules/.bun/i18next-icu@2.4.4+85079ac2b5c58174/node_modules/i18next-icu/dist/es/utils.js","../../../../../node_modules/.bun/@formatjs+fast-memoize@3.1.7/node_modules/@formatjs/fast-memoize/index.js","../../../../../node_modules/.bun/@formatjs+icu-skeleton-parser@2.1.11/node_modules/@formatjs/icu-skeleton-parser/index.js","../../../../../node_modules/.bun/@formatjs+icu-messageformat-parser@3.5.16/node_modules/@formatjs/icu-messageformat-parser/index.js","../../../../../node_modules/.bun/intl-messageformat@11.2.13/node_modules/intl-messageformat/index.js","../../../../../node_modules/.bun/i18next-icu@2.4.4+85079ac2b5c58174/node_modules/i18next-icu/dist/es/index.js","../../../src/i18n/namespaces.ts","../../../src/i18n/supported-locales.ts","../../../src/i18n/catalogs.ts","../../../src/i18n/config.ts","../../../src/i18n/system-locale.ts","../../../src/utils/local-settings.ts","../../../src/utils/device-settings.ts","../../../src/i18n/locale-preference.ts","../../../src/i18n/i18n.ts","../../../src/i18n/provider.tsx","../../../../../node_modules/.bun/html-parse-stringify@4.0.1/node_modules/html-parse-stringify/dist/esm/html-parse-stringify.js","../../../../../node_modules/.bun/react-i18next@17.0.11+942c965e79d69f32/node_modules/react-i18next/dist/es/utils.js","../../../../../node_modules/.bun/react-i18next@17.0.11+942c965e79d69f32/node_modules/react-i18next/dist/es/unescape.js","../../../../../node_modules/.bun/react-i18next@17.0.11+942c965e79d69f32/node_modules/react-i18next/dist/es/defaults.js","../../../../../node_modules/.bun/react-i18next@17.0.11+942c965e79d69f32/node_modules/react-i18next/dist/es/i18nInstance.js","../../../../../node_modules/.bun/react-i18next@17.0.11+942c965e79d69f32/node_modules/react-i18next/dist/es/TransWithoutContext.js","../../../../../node_modules/.bun/react-i18next@17.0.11+942c965e79d69f32/node_modules/react-i18next/dist/es/context.js","../../../../../node_modules/.bun/react-i18next@17.0.11+942c965e79d69f32/node_modules/react-i18next/dist/es/Trans.js","../../../../../node_modules/.bun/use-sync-external-store@1.7.0+d86b59289c1a13ae/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.production.js","../../../../../node_modules/.bun/use-sync-external-store@1.7.0+d86b59289c1a13ae/node_modules/use-sync-external-store/shim/index.js","../../../../../node_modules/.bun/react-i18next@17.0.11+942c965e79d69f32/node_modules/react-i18next/dist/es/useTranslation.js","../../../src/i18n/react.tsx","../../../src/i18n/index.ts"],"sourcesContent":["const isString = obj => typeof obj === 'string';\nconst defer = () => {\n let res;\n let rej;\n const promise = new Promise((resolve, reject) => {\n res = resolve;\n rej = reject;\n });\n promise.resolve = res;\n promise.reject = rej;\n return promise;\n};\nconst makeString = object => {\n if (object == null) return '';\n return String(object);\n};\nconst copy = (a, s, t) => {\n a.forEach(m => {\n if (s[m]) t[m] = s[m];\n });\n};\nconst lastOfPathSeparatorRegExp = /###/g;\nconst cleanKey = key => key && key.includes('###') ? key.replace(lastOfPathSeparatorRegExp, '.') : key;\nconst canNotTraverseDeeper = object => !object || isString(object);\nconst getLastOfPath = (object, path, Empty) => {\n const stack = !isString(path) ? path : path.split('.');\n let stackIndex = 0;\n while (stackIndex < stack.length - 1) {\n if (canNotTraverseDeeper(object)) return {};\n const key = cleanKey(stack[stackIndex]);\n if (!object[key] && Empty) object[key] = new Empty();\n if (Object.prototype.hasOwnProperty.call(object, key)) {\n object = object[key];\n } else {\n object = {};\n }\n ++stackIndex;\n }\n if (canNotTraverseDeeper(object)) return {};\n return {\n obj: object,\n k: cleanKey(stack[stackIndex])\n };\n};\nconst setPath = (object, path, newValue) => {\n const {\n obj,\n k\n } = getLastOfPath(object, path, Object);\n if (obj !== undefined || path.length === 1) {\n obj[k] = newValue;\n return;\n }\n let e = path[path.length - 1];\n let p = path.slice(0, path.length - 1);\n let last = getLastOfPath(object, p, Object);\n while (last.obj === undefined && p.length) {\n e = `${p[p.length - 1]}.${e}`;\n p = p.slice(0, p.length - 1);\n last = getLastOfPath(object, p, Object);\n if (last?.obj && typeof last.obj[`${last.k}.${e}`] !== 'undefined') {\n last.obj = undefined;\n }\n }\n last.obj[`${last.k}.${e}`] = newValue;\n};\nconst pushPath = (object, path, newValue, concat) => {\n const {\n obj,\n k\n } = getLastOfPath(object, path, Object);\n obj[k] = obj[k] || [];\n obj[k].push(newValue);\n};\nconst getPath = (object, path) => {\n const {\n obj,\n k\n } = getLastOfPath(object, path);\n if (!obj) return undefined;\n if (!Object.prototype.hasOwnProperty.call(obj, k)) return undefined;\n return obj[k];\n};\nconst getPathWithDefaults = (data, defaultData, key) => {\n const value = getPath(data, key);\n if (value !== undefined) {\n return value;\n }\n return getPath(defaultData, key);\n};\nconst deepExtend = (target, source, overwrite) => {\n for (const prop in source) {\n if (prop !== '__proto__' && prop !== 'constructor') {\n if (Object.prototype.hasOwnProperty.call(target, prop)) {\n if (isString(target[prop]) || target[prop] instanceof String || isString(source[prop]) || source[prop] instanceof String) {\n if (overwrite) target[prop] = source[prop];\n } else {\n deepExtend(target[prop], source[prop], overwrite);\n }\n } else {\n target[prop] = source[prop];\n }\n }\n }\n return target;\n};\nconst regexEscape = str => str.replace(/[\\-\\[\\]\\/\\{\\}\\(\\)\\*\\+\\?\\.\\\\\\^\\$\\|]/g, '\\\\$&');\nconst _entityMap = {\n '&': '&amp;',\n '<': '&lt;',\n '>': '&gt;',\n '\"': '&quot;',\n \"'\": '&#39;',\n '/': '&#x2F;'\n};\nconst escape = data => {\n if (isString(data)) {\n return data.replace(/[&<>\"'\\/]/g, s => _entityMap[s]);\n }\n return data;\n};\nclass RegExpCache {\n constructor(capacity) {\n this.capacity = capacity;\n this.regExpMap = new Map();\n this.regExpQueue = [];\n }\n getRegExp(pattern) {\n const regExpFromCache = this.regExpMap.get(pattern);\n if (regExpFromCache !== undefined) {\n return regExpFromCache;\n }\n const regExpNew = new RegExp(pattern);\n if (this.regExpQueue.length === this.capacity) {\n this.regExpMap.delete(this.regExpQueue.shift());\n }\n this.regExpMap.set(pattern, regExpNew);\n this.regExpQueue.push(pattern);\n return regExpNew;\n }\n}\nconst chars = [' ', ',', '?', '!', ';'];\nconst looksLikeObjectPathRegExpCache = new RegExpCache(20);\nconst looksLikeObjectPath = (key, nsSeparator, keySeparator) => {\n nsSeparator = nsSeparator || '';\n keySeparator = keySeparator || '';\n const possibleChars = chars.filter(c => !nsSeparator.includes(c) && !keySeparator.includes(c));\n if (possibleChars.length === 0) return true;\n const r = looksLikeObjectPathRegExpCache.getRegExp(`(${possibleChars.map(c => c === '?' ? '\\\\?' : c).join('|')})`);\n let matched = !r.test(key);\n if (!matched) {\n const ki = key.indexOf(keySeparator);\n if (ki > 0 && !r.test(key.substring(0, ki))) {\n matched = true;\n }\n }\n return matched;\n};\nconst deepFind = (obj, path, keySeparator = '.') => {\n if (!obj) return undefined;\n if (obj[path]) {\n if (!Object.prototype.hasOwnProperty.call(obj, path)) return undefined;\n return obj[path];\n }\n const tokens = path.split(keySeparator);\n let current = obj;\n for (let i = 0; i < tokens.length;) {\n if (!current || typeof current !== 'object') {\n return undefined;\n }\n let next;\n let nextPath = '';\n for (let j = i; j < tokens.length; ++j) {\n if (j !== i) {\n nextPath += keySeparator;\n }\n nextPath += tokens[j];\n next = current[nextPath];\n if (next !== undefined) {\n if (['string', 'number', 'boolean'].includes(typeof next) && j < tokens.length - 1) {\n continue;\n }\n i += j - i + 1;\n break;\n }\n }\n current = next;\n }\n return current;\n};\nconst getCleanedCode = code => code?.replace(/_/g, '-');\n\nconst consoleLogger = {\n type: 'logger',\n log(args) {\n this.output('log', args);\n },\n warn(args) {\n this.output('warn', args);\n },\n error(args) {\n this.output('error', args);\n },\n output(type, args) {\n console?.[type]?.apply?.(console, args);\n }\n};\nclass Logger {\n constructor(concreteLogger, options = {}) {\n this.init(concreteLogger, options);\n }\n init(concreteLogger, options = {}) {\n this.prefix = options.prefix || 'i18next:';\n this.logger = concreteLogger || consoleLogger;\n this.options = options;\n this.debug = options.debug;\n }\n log(...args) {\n return this.forward(args, 'log', '', true);\n }\n warn(...args) {\n return this.forward(args, 'warn', '', true);\n }\n error(...args) {\n return this.forward(args, 'error', '');\n }\n deprecate(...args) {\n return this.forward(args, 'warn', 'WARNING DEPRECATED: ', true);\n }\n forward(args, lvl, prefix, debugOnly) {\n if (debugOnly && !this.debug) return null;\n args = args.map(a => isString(a) ? a.replace(/[\\r\\n\\x00-\\x1F\\x7F]/g, ' ') : a);\n if (isString(args[0])) args[0] = `${prefix}${this.prefix} ${args[0]}`;\n return this.logger[lvl](args);\n }\n create(moduleName) {\n return new Logger(this.logger, {\n ...{\n prefix: `${this.prefix}:${moduleName}:`\n },\n ...this.options\n });\n }\n clone(options) {\n options = options || this.options;\n options.prefix = options.prefix || this.prefix;\n return new Logger(this.logger, options);\n }\n}\nvar baseLogger = new Logger();\n\nclass EventEmitter {\n constructor() {\n this.observers = {};\n }\n on(events, listener) {\n events.split(' ').forEach(event => {\n if (!this.observers[event]) this.observers[event] = new Map();\n const numListeners = this.observers[event].get(listener) || 0;\n this.observers[event].set(listener, numListeners + 1);\n });\n return this;\n }\n off(event, listener) {\n if (!this.observers[event]) return;\n if (!listener) {\n delete this.observers[event];\n return;\n }\n this.observers[event].delete(listener);\n }\n once(event, listener) {\n const wrapper = (...args) => {\n listener(...args);\n this.off(event, wrapper);\n };\n this.on(event, wrapper);\n return this;\n }\n emit(event, ...args) {\n if (this.observers[event]) {\n const cloned = Array.from(this.observers[event].entries());\n cloned.forEach(([observer, numTimesAdded]) => {\n for (let i = 0; i < numTimesAdded; i++) {\n observer(...args);\n }\n });\n }\n if (this.observers['*']) {\n const cloned = Array.from(this.observers['*'].entries());\n cloned.forEach(([observer, numTimesAdded]) => {\n for (let i = 0; i < numTimesAdded; i++) {\n observer(event, ...args);\n }\n });\n }\n }\n}\n\nclass ResourceStore extends EventEmitter {\n constructor(data, options = {\n ns: ['translation'],\n defaultNS: 'translation'\n }) {\n super();\n this.data = data || {};\n this.options = options;\n if (this.options.keySeparator === undefined) {\n this.options.keySeparator = '.';\n }\n if (this.options.ignoreJSONStructure === undefined) {\n this.options.ignoreJSONStructure = true;\n }\n }\n addNamespaces(ns) {\n if (!this.options.ns.includes(ns)) {\n this.options.ns.push(ns);\n }\n }\n removeNamespaces(ns) {\n const index = this.options.ns.indexOf(ns);\n if (index > -1) {\n this.options.ns.splice(index, 1);\n }\n }\n getResource(lng, ns, key, options = {}) {\n const keySeparator = options.keySeparator !== undefined ? options.keySeparator : this.options.keySeparator;\n const ignoreJSONStructure = options.ignoreJSONStructure !== undefined ? options.ignoreJSONStructure : this.options.ignoreJSONStructure;\n let path;\n if (lng.includes('.')) {\n path = lng.split('.');\n } else {\n path = [lng, ns];\n if (key) {\n if (Array.isArray(key)) {\n path.push(...key);\n } else if (isString(key) && keySeparator) {\n path.push(...key.split(keySeparator));\n } else {\n path.push(key);\n }\n }\n }\n const result = getPath(this.data, path);\n if (!result && !ns && !key && lng.includes('.')) {\n lng = path[0];\n ns = path[1];\n key = path.slice(2).join('.');\n }\n if (result || !ignoreJSONStructure || !isString(key)) return result;\n return deepFind(this.data?.[lng]?.[ns], key, keySeparator);\n }\n addResource(lng, ns, key, value, options = {\n silent: false\n }) {\n const keySeparator = options.keySeparator !== undefined ? options.keySeparator : this.options.keySeparator;\n let path = [lng, ns];\n if (key) path = path.concat(keySeparator ? key.split(keySeparator) : key);\n if (lng.includes('.')) {\n path = lng.split('.');\n value = ns;\n ns = path[1];\n }\n this.addNamespaces(ns);\n setPath(this.data, path, value);\n if (!options.silent) this.emit('added', lng, ns, key, value);\n }\n addResources(lng, ns, resources, options = {\n silent: false\n }) {\n for (const m in resources) {\n if (isString(resources[m]) || Array.isArray(resources[m])) this.addResource(lng, ns, m, resources[m], {\n silent: true\n });\n }\n if (!options.silent) this.emit('added', lng, ns, resources);\n }\n addResourceBundle(lng, ns, resources, deep, overwrite, options = {\n silent: false,\n skipCopy: false\n }) {\n let path = [lng, ns];\n if (lng.includes('.')) {\n path = lng.split('.');\n deep = resources;\n resources = ns;\n ns = path[1];\n }\n this.addNamespaces(ns);\n let pack = getPath(this.data, path) || {};\n if (!options.skipCopy) resources = JSON.parse(JSON.stringify(resources));\n if (deep) {\n deepExtend(pack, resources, overwrite);\n } else {\n pack = {\n ...pack,\n ...resources\n };\n }\n setPath(this.data, path, pack);\n if (!options.silent) this.emit('added', lng, ns, resources);\n }\n removeResourceBundle(lng, ns) {\n if (this.hasResourceBundle(lng, ns)) {\n delete this.data[lng][ns];\n }\n this.removeNamespaces(ns);\n this.emit('removed', lng, ns);\n }\n hasResourceBundle(lng, ns) {\n return this.getResource(lng, ns) !== undefined;\n }\n getResourceBundle(lng, ns) {\n if (!ns) ns = this.options.defaultNS;\n return this.getResource(lng, ns);\n }\n getDataByLanguage(lng) {\n return this.data[lng];\n }\n hasLanguageSomeTranslations(lng) {\n const data = this.getDataByLanguage(lng);\n const n = data && Object.keys(data) || [];\n return !!n.find(v => data[v] && Object.keys(data[v]).length > 0);\n }\n toJSON() {\n return this.data;\n }\n}\n\nvar postProcessor = {\n processors: {},\n addPostProcessor(module) {\n this.processors[module.name] = module;\n },\n handle(processors, value, key, options, translator) {\n processors.forEach(processor => {\n value = this.processors[processor]?.process(value, key, options, translator) ?? value;\n });\n return value;\n }\n};\n\nconst PATH_KEY = Symbol('i18next/PATH_KEY');\nfunction createProxy() {\n const state = [];\n const handler = Object.create(null);\n let proxy;\n handler.get = (target, key) => {\n proxy?.revoke?.();\n if (key === PATH_KEY) return state;\n state.push(key);\n proxy = Proxy.revocable(target, handler);\n return proxy.proxy;\n };\n return Proxy.revocable(Object.create(null), handler).proxy;\n}\nfunction keysFromSelector(selector, opts) {\n const {\n [PATH_KEY]: path\n } = selector(createProxy());\n const keySeparator = opts?.keySeparator ?? '.';\n const nsSeparator = opts?.nsSeparator ?? ':';\n const strict = opts?.enableSelector === 'strict';\n if (path.length > 1 && nsSeparator) {\n const ns = opts?.ns;\n const nsList = strict ? Array.isArray(ns) ? ns : ns ? [ns] : null : Array.isArray(ns) ? ns : null;\n if (nsList) {\n const candidates = strict ? nsList : nsList.length > 1 ? nsList.slice(1) : [];\n if (candidates.includes(path[0])) {\n return `${path[0]}${nsSeparator}${path.slice(1).join(keySeparator)}`;\n }\n }\n }\n return path.join(keySeparator);\n}\n\nconst shouldHandleAsObject = res => !isString(res) && typeof res !== 'boolean' && typeof res !== 'number';\nclass Translator extends EventEmitter {\n constructor(services, options = {}) {\n super();\n copy(['resourceStore', 'languageUtils', 'pluralResolver', 'interpolator', 'backendConnector', 'i18nFormat', 'utils'], services, this);\n this.options = options;\n if (this.options.keySeparator === undefined) {\n this.options.keySeparator = '.';\n }\n this.logger = baseLogger.create('translator');\n this.checkedLoadedFor = {};\n }\n changeLanguage(lng) {\n if (lng) this.language = lng;\n }\n exists(key, o = {\n interpolation: {}\n }) {\n const opt = {\n ...o\n };\n if (key == null) return false;\n const resolved = this.resolve(key, opt);\n if (resolved?.res === undefined) return false;\n const isObject = shouldHandleAsObject(resolved.res);\n if (opt.returnObjects === false && isObject) {\n return false;\n }\n return true;\n }\n extractFromKey(key, opt) {\n let nsSeparator = opt.nsSeparator !== undefined ? opt.nsSeparator : this.options.nsSeparator;\n if (nsSeparator === undefined) nsSeparator = ':';\n const keySeparator = opt.keySeparator !== undefined ? opt.keySeparator : this.options.keySeparator;\n let namespaces = opt.ns || this.options.defaultNS || [];\n const wouldCheckForNsInKey = nsSeparator && key.includes(nsSeparator);\n const seemsNaturalLanguage = !this.options.userDefinedKeySeparator && !opt.keySeparator && !this.options.userDefinedNsSeparator && !opt.nsSeparator && !looksLikeObjectPath(key, nsSeparator, keySeparator);\n if (wouldCheckForNsInKey && !seemsNaturalLanguage) {\n const m = key.match(this.interpolator.nestingRegexp);\n if (m && m.length > 0) {\n return {\n key,\n namespaces: isString(namespaces) ? [namespaces] : namespaces\n };\n }\n const parts = key.split(nsSeparator);\n if (nsSeparator !== keySeparator || nsSeparator === keySeparator && this.options.ns.includes(parts[0])) namespaces = parts.shift();\n key = parts.join(keySeparator);\n }\n return {\n key,\n namespaces: isString(namespaces) ? [namespaces] : namespaces\n };\n }\n translate(keys, o, lastKey) {\n let opt = typeof o === 'object' ? {\n ...o\n } : o;\n if (typeof opt !== 'object' && this.options.overloadTranslationOptionHandler) {\n opt = this.options.overloadTranslationOptionHandler(arguments);\n }\n if (typeof opt === 'object') opt = {\n ...opt\n };\n if (!opt) opt = {};\n if (keys == null) return '';\n if (typeof keys === 'function') keys = keysFromSelector(keys, {\n ...this.options,\n ...opt\n });\n if (!Array.isArray(keys)) keys = [String(keys)];\n keys = keys.map(k => typeof k === 'function' ? keysFromSelector(k, {\n ...this.options,\n ...opt\n }) : String(k));\n const returnDetails = opt.returnDetails !== undefined ? opt.returnDetails : this.options.returnDetails;\n const keySeparator = opt.keySeparator !== undefined ? opt.keySeparator : this.options.keySeparator;\n const {\n key,\n namespaces\n } = this.extractFromKey(keys[keys.length - 1], opt);\n const namespace = namespaces[namespaces.length - 1];\n let nsSeparator = opt.nsSeparator !== undefined ? opt.nsSeparator : this.options.nsSeparator;\n if (nsSeparator === undefined) nsSeparator = ':';\n const lng = opt.lng || this.language;\n const appendNamespaceToCIMode = opt.appendNamespaceToCIMode || this.options.appendNamespaceToCIMode;\n if (lng?.toLowerCase() === 'cimode') {\n if (appendNamespaceToCIMode) {\n if (returnDetails) {\n return {\n res: `${namespace}${nsSeparator}${key}`,\n usedKey: key,\n exactUsedKey: key,\n usedLng: lng,\n usedNS: namespace,\n usedParams: this.getUsedParamsDetails(opt)\n };\n }\n return `${namespace}${nsSeparator}${key}`;\n }\n if (returnDetails) {\n return {\n res: key,\n usedKey: key,\n exactUsedKey: key,\n usedLng: lng,\n usedNS: namespace,\n usedParams: this.getUsedParamsDetails(opt)\n };\n }\n return key;\n }\n const resolved = this.resolve(keys, opt);\n let res = resolved?.res;\n const resUsedKey = resolved?.usedKey || key;\n const resExactUsedKey = resolved?.exactUsedKey || key;\n const noObject = ['[object Number]', '[object Function]', '[object RegExp]'];\n const joinArrays = opt.joinArrays !== undefined ? opt.joinArrays : this.options.joinArrays;\n const handleAsObjectInI18nFormat = !this.i18nFormat || this.i18nFormat.handleAsObject;\n const needsPluralHandling = opt.count !== undefined && !isString(opt.count);\n const hasDefaultValue = Translator.hasDefaultValue(opt);\n const defaultValueSuffix = needsPluralHandling ? this.pluralResolver.getSuffix(lng, opt.count, opt) : '';\n const defaultValueSuffixOrdinalFallback = opt.ordinal && needsPluralHandling ? this.pluralResolver.getSuffix(lng, opt.count, {\n ordinal: false\n }) : '';\n const needsZeroSuffixLookup = needsPluralHandling && !opt.ordinal && opt.count === 0;\n const defaultValue = needsZeroSuffixLookup && opt[`defaultValue${this.options.pluralSeparator}zero`] || opt[`defaultValue${defaultValueSuffix}`] || opt[`defaultValue${defaultValueSuffixOrdinalFallback}`] || opt.defaultValue;\n let resForObjHndl = res;\n if (handleAsObjectInI18nFormat && !res && hasDefaultValue) {\n resForObjHndl = defaultValue;\n }\n const handleAsObject = shouldHandleAsObject(resForObjHndl);\n const resType = Object.prototype.toString.apply(resForObjHndl);\n if (handleAsObjectInI18nFormat && resForObjHndl && handleAsObject && !noObject.includes(resType) && !(isString(joinArrays) && Array.isArray(resForObjHndl))) {\n if (!opt.returnObjects && !this.options.returnObjects) {\n if (!this.options.returnedObjectHandler) {\n this.logger.warn('accessing an object - but returnObjects options is not enabled!');\n }\n const r = this.options.returnedObjectHandler ? this.options.returnedObjectHandler(resUsedKey, resForObjHndl, {\n ...opt,\n ns: namespaces\n }) : `key '${key} (${this.language})' returned an object instead of string.`;\n if (returnDetails) {\n resolved.res = r;\n resolved.usedParams = this.getUsedParamsDetails(opt);\n return resolved;\n }\n return r;\n }\n if (keySeparator) {\n const resTypeIsArray = Array.isArray(resForObjHndl);\n const copy = resTypeIsArray ? [] : {};\n const newKeyToUse = resTypeIsArray ? resExactUsedKey : resUsedKey;\n for (const m in resForObjHndl) {\n if (Object.prototype.hasOwnProperty.call(resForObjHndl, m)) {\n const deepKey = `${newKeyToUse}${keySeparator}${m}`;\n if (hasDefaultValue && !res) {\n copy[m] = this.translate(deepKey, {\n ...opt,\n defaultValue: shouldHandleAsObject(defaultValue) ? defaultValue[m] : undefined,\n ...{\n joinArrays: false,\n ns: namespaces\n }\n });\n } else {\n copy[m] = this.translate(deepKey, {\n ...opt,\n ...{\n joinArrays: false,\n ns: namespaces\n }\n });\n }\n if (copy[m] === deepKey) copy[m] = resForObjHndl[m];\n }\n }\n res = copy;\n }\n } else if (handleAsObjectInI18nFormat && isString(joinArrays) && Array.isArray(res)) {\n res = res.join(joinArrays);\n if (res) res = this.extendTranslation(res, keys, opt, lastKey);\n } else {\n let usedDefault = false;\n let usedKey = false;\n if (!this.isValidLookup(res) && hasDefaultValue) {\n usedDefault = true;\n res = defaultValue;\n }\n if (!this.isValidLookup(res)) {\n usedKey = true;\n res = key;\n }\n const missingKeyNoValueFallbackToKey = opt.missingKeyNoValueFallbackToKey || this.options.missingKeyNoValueFallbackToKey;\n const resForMissing = missingKeyNoValueFallbackToKey && usedKey ? undefined : res;\n const updateMissing = hasDefaultValue && defaultValue !== res && this.options.updateMissing;\n if (usedKey || usedDefault || updateMissing) {\n this.logger.log(updateMissing ? 'updateKey' : 'missingKey', lng, namespace, needsPluralHandling && !updateMissing ? `${key}${this.pluralResolver.getSuffix(lng, opt.count, opt)}` : key, updateMissing ? defaultValue : res);\n if (keySeparator) {\n const fk = this.resolve(key, {\n ...opt,\n keySeparator: false\n });\n if (fk && fk.res) this.logger.warn('Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.');\n }\n let lngs = [];\n const fallbackLngs = this.languageUtils.getFallbackCodes(this.options.fallbackLng, opt.lng || this.language);\n if (this.options.saveMissingTo === 'fallback' && fallbackLngs && fallbackLngs[0]) {\n for (let i = 0; i < fallbackLngs.length; i++) {\n lngs.push(fallbackLngs[i]);\n }\n } else if (this.options.saveMissingTo === 'all') {\n lngs = this.languageUtils.toResolveHierarchy(opt.lng || this.language);\n } else {\n lngs.push(opt.lng || this.language);\n }\n const send = (l, k, specificDefaultValue) => {\n const defaultForMissing = hasDefaultValue && specificDefaultValue !== res ? specificDefaultValue : resForMissing;\n if (this.options.missingKeyHandler) {\n this.options.missingKeyHandler(l, namespace, k, defaultForMissing, updateMissing, opt);\n } else if (this.backendConnector?.saveMissing) {\n this.backendConnector.saveMissing(l, namespace, k, defaultForMissing, updateMissing, opt);\n }\n this.emit('missingKey', l, namespace, k, res);\n };\n if (this.options.saveMissing) {\n if (this.options.saveMissingPlurals && needsPluralHandling) {\n lngs.forEach(language => {\n const suffixes = this.pluralResolver.getSuffixes(language, opt);\n if (needsZeroSuffixLookup && opt[`defaultValue${this.options.pluralSeparator}zero`] && !suffixes.includes(`${this.options.pluralSeparator}zero`)) {\n suffixes.push(`${this.options.pluralSeparator}zero`);\n }\n suffixes.forEach(suffix => {\n send([language], key + suffix, opt[`defaultValue${suffix}`] || defaultValue);\n });\n });\n } else {\n send(lngs, key, defaultValue);\n }\n }\n }\n res = this.extendTranslation(res, keys, opt, resolved, lastKey);\n if (usedKey && res === key && this.options.appendNamespaceToMissingKey) {\n res = `${namespace}${nsSeparator}${key}`;\n }\n if ((usedKey || usedDefault) && this.options.parseMissingKeyHandler) {\n res = this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey ? `${namespace}${nsSeparator}${key}` : key, usedDefault ? res : undefined, opt);\n }\n }\n if (returnDetails) {\n resolved.res = res;\n resolved.usedParams = this.getUsedParamsDetails(opt);\n return resolved;\n }\n return res;\n }\n extendTranslation(res, key, opt, resolved, lastKey) {\n if (this.i18nFormat?.parse) {\n res = this.i18nFormat.parse(res, {\n ...this.options.interpolation.defaultVariables,\n ...opt\n }, opt.lng || this.language || resolved.usedLng, resolved.usedNS, resolved.usedKey, {\n resolved\n });\n } else if (!opt.skipInterpolation) {\n if (opt.interpolation) this.interpolator.init({\n ...opt,\n ...{\n interpolation: {\n ...this.options.interpolation,\n ...opt.interpolation\n }\n }\n });\n const skipOnVariables = isString(res) && (opt?.interpolation?.skipOnVariables !== undefined ? opt.interpolation.skipOnVariables : this.options.interpolation.skipOnVariables);\n let nestBef;\n if (skipOnVariables) {\n const nb = res.match(this.interpolator.nestingRegexp);\n nestBef = nb && nb.length;\n }\n let data = opt.replace && !isString(opt.replace) ? opt.replace : opt;\n if (this.options.interpolation.defaultVariables) data = {\n ...this.options.interpolation.defaultVariables,\n ...data\n };\n res = this.interpolator.interpolate(res, data, opt.lng || this.language || resolved.usedLng, opt);\n if (skipOnVariables) {\n const na = res.match(this.interpolator.nestingRegexp);\n const nestAft = na && na.length;\n if (nestBef < nestAft) opt.nest = false;\n }\n if (!opt.lng && resolved && resolved.res) opt.lng = this.language || resolved.usedLng;\n if (opt.nest !== false) res = this.interpolator.nest(res, (...args) => {\n if (lastKey?.[0] === args[0] && !opt.context) {\n this.logger.warn(`It seems you are nesting recursively key: ${args[0]} in key: ${key[0]}`);\n return null;\n }\n return this.translate(...args, key);\n }, opt);\n if (opt.interpolation) this.interpolator.reset();\n }\n const postProcess = opt.postProcess || this.options.postProcess;\n const postProcessorNames = isString(postProcess) ? [postProcess] : postProcess;\n if (res != null && postProcessorNames?.length && opt.applyPostProcessor !== false) {\n res = postProcessor.handle(postProcessorNames, res, key, this.options && this.options.postProcessPassResolved ? {\n i18nResolved: {\n ...resolved,\n usedParams: this.getUsedParamsDetails(opt)\n },\n ...opt\n } : opt, this);\n }\n return res;\n }\n resolve(keys, opt = {}) {\n let found;\n let usedKey;\n let exactUsedKey;\n let usedLng;\n let usedNS;\n if (isString(keys)) keys = [keys];\n if (Array.isArray(keys)) keys = keys.map(k => typeof k === 'function' ? keysFromSelector(k, {\n ...this.options,\n ...opt\n }) : k);\n keys.forEach(k => {\n if (this.isValidLookup(found)) return;\n const extracted = this.extractFromKey(k, opt);\n const key = extracted.key;\n usedKey = key;\n let namespaces = extracted.namespaces;\n if (this.options.fallbackNS) namespaces = namespaces.concat(this.options.fallbackNS);\n const needsPluralHandling = opt.count !== undefined && !isString(opt.count);\n const needsZeroSuffixLookup = needsPluralHandling && !opt.ordinal && opt.count === 0;\n const needsContextHandling = opt.context !== undefined && (isString(opt.context) || typeof opt.context === 'number') && opt.context !== '';\n const codes = opt.lngs ? opt.lngs : this.languageUtils.toResolveHierarchy(opt.lng || this.language, opt.fallbackLng);\n namespaces.forEach(ns => {\n if (this.isValidLookup(found)) return;\n usedNS = ns;\n if (!this.checkedLoadedFor[`${codes[0]}-${ns}`] && this.utils?.hasLoadedNamespace && !this.utils?.hasLoadedNamespace(usedNS)) {\n this.checkedLoadedFor[`${codes[0]}-${ns}`] = true;\n this.logger.warn(`key \"${usedKey}\" for languages \"${codes.join(', ')}\" won't get resolved as namespace \"${usedNS}\" was not yet loaded`, 'This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!');\n }\n codes.forEach(code => {\n if (this.isValidLookup(found)) return;\n usedLng = code;\n const finalKeys = [key];\n if (this.i18nFormat?.addLookupKeys) {\n this.i18nFormat.addLookupKeys(finalKeys, key, code, ns, opt);\n } else {\n let pluralSuffix;\n if (needsPluralHandling) pluralSuffix = this.pluralResolver.getSuffix(code, opt.count, opt);\n const zeroSuffix = `${this.options.pluralSeparator}zero`;\n const ordinalPrefix = `${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;\n if (needsPluralHandling) {\n if (opt.ordinal && pluralSuffix.startsWith(ordinalPrefix)) {\n finalKeys.push(key + pluralSuffix.replace(ordinalPrefix, this.options.pluralSeparator));\n }\n finalKeys.push(key + pluralSuffix);\n if (needsZeroSuffixLookup) {\n finalKeys.push(key + zeroSuffix);\n }\n }\n if (needsContextHandling) {\n const contextKey = `${key}${this.options.contextSeparator || '_'}${opt.context}`;\n finalKeys.push(contextKey);\n if (needsPluralHandling) {\n if (opt.ordinal && pluralSuffix.startsWith(ordinalPrefix)) {\n finalKeys.push(contextKey + pluralSuffix.replace(ordinalPrefix, this.options.pluralSeparator));\n }\n finalKeys.push(contextKey + pluralSuffix);\n if (needsZeroSuffixLookup) {\n finalKeys.push(contextKey + zeroSuffix);\n }\n }\n }\n }\n let possibleKey;\n while (possibleKey = finalKeys.pop()) {\n if (!this.isValidLookup(found)) {\n exactUsedKey = possibleKey;\n found = this.getResource(code, ns, possibleKey, opt);\n }\n }\n });\n });\n });\n return {\n res: found,\n usedKey,\n exactUsedKey,\n usedLng,\n usedNS\n };\n }\n isValidLookup(res) {\n return res !== undefined && !(!this.options.returnNull && res === null) && !(!this.options.returnEmptyString && res === '');\n }\n getResource(code, ns, key, options = {}) {\n if (this.i18nFormat?.getResource) return this.i18nFormat.getResource(code, ns, key, options);\n return this.resourceStore.getResource(code, ns, key, options);\n }\n getUsedParamsDetails(options = {}) {\n const optionsKeys = ['defaultValue', 'ordinal', 'context', 'replace', 'lng', 'lngs', 'fallbackLng', 'ns', 'keySeparator', 'nsSeparator', 'returnObjects', 'returnDetails', 'joinArrays', 'postProcess', 'interpolation'];\n const useOptionsReplaceForData = options.replace && !isString(options.replace);\n let data = useOptionsReplaceForData ? options.replace : options;\n if (useOptionsReplaceForData && typeof options.count !== 'undefined') {\n data = {\n ...data,\n count: options.count\n };\n }\n if (this.options.interpolation.defaultVariables) {\n data = {\n ...this.options.interpolation.defaultVariables,\n ...data\n };\n }\n if (!useOptionsReplaceForData) {\n data = {\n ...data\n };\n for (const key of optionsKeys) {\n delete data[key];\n }\n }\n return data;\n }\n static hasDefaultValue(options) {\n const prefix = 'defaultValue';\n for (const option in options) {\n if (Object.prototype.hasOwnProperty.call(options, option) && option.startsWith(prefix) && undefined !== options[option]) {\n return true;\n }\n }\n return false;\n }\n}\n\nclass LanguageUtil {\n constructor(options) {\n this.options = options;\n this.supportedLngs = this.options.supportedLngs || false;\n this.logger = baseLogger.create('languageUtils');\n }\n getScriptPartFromCode(code) {\n code = getCleanedCode(code);\n if (!code || !code.includes('-')) return null;\n const p = code.split('-');\n if (p.length === 2) return null;\n p.pop();\n if (p[p.length - 1].toLowerCase() === 'x') return null;\n return this.formatLanguageCode(p.join('-'));\n }\n getLanguagePartFromCode(code) {\n code = getCleanedCode(code);\n if (!code || !code.includes('-')) return code;\n const p = code.split('-');\n return this.formatLanguageCode(p[0]);\n }\n formatLanguageCode(code) {\n if (isString(code) && code.includes('-')) {\n let formattedCode;\n try {\n formattedCode = Intl.getCanonicalLocales(code)[0];\n } catch (e) {}\n if (formattedCode && this.options.lowerCaseLng) {\n formattedCode = formattedCode.toLowerCase();\n }\n if (formattedCode) return formattedCode;\n if (this.options.lowerCaseLng) {\n return code.toLowerCase();\n }\n return code;\n }\n return this.options.cleanCode || this.options.lowerCaseLng ? code.toLowerCase() : code;\n }\n isSupportedCode(code) {\n if (this.options.load === 'languageOnly' || this.options.nonExplicitSupportedLngs) {\n code = this.getLanguagePartFromCode(code);\n }\n return !this.supportedLngs || !this.supportedLngs.length || this.supportedLngs.includes(code);\n }\n getBestMatchFromCodes(codes) {\n if (!codes) return null;\n let found;\n codes.forEach(code => {\n if (found) return;\n const cleanedLng = this.formatLanguageCode(code);\n if (!this.options.supportedLngs || this.isSupportedCode(cleanedLng)) found = cleanedLng;\n });\n if (!found && this.options.supportedLngs) {\n codes.forEach(code => {\n if (found) return;\n const lngScOnly = this.getScriptPartFromCode(code);\n if (this.isSupportedCode(lngScOnly)) return found = lngScOnly;\n const lngOnly = this.getLanguagePartFromCode(code);\n if (this.isSupportedCode(lngOnly)) return found = lngOnly;\n found = this.options.supportedLngs.find(supportedLng => {\n if (supportedLng === lngOnly) return true;\n if (!supportedLng.includes('-') && !lngOnly.includes('-')) return false;\n if (supportedLng.includes('-') && !lngOnly.includes('-') && supportedLng.slice(0, supportedLng.indexOf('-')) === lngOnly) return true;\n if (supportedLng.startsWith(lngOnly) && lngOnly.length > 1) return true;\n return false;\n });\n });\n }\n if (!found) found = this.getFallbackCodes(this.options.fallbackLng)[0];\n return found;\n }\n getFallbackCodes(fallbacks, code) {\n if (!fallbacks) return [];\n if (typeof fallbacks === 'function') fallbacks = fallbacks(code);\n if (isString(fallbacks)) fallbacks = [fallbacks];\n if (Array.isArray(fallbacks)) return fallbacks;\n if (!code) return fallbacks.default || [];\n let found = fallbacks[code];\n if (!found) found = fallbacks[this.getScriptPartFromCode(code)];\n if (!found) found = fallbacks[this.formatLanguageCode(code)];\n if (!found) found = fallbacks[this.getLanguagePartFromCode(code)];\n if (!found) found = fallbacks.default;\n return found || [];\n }\n toResolveHierarchy(code, fallbackCode) {\n const fallbackCodes = this.getFallbackCodes((fallbackCode === false ? [] : fallbackCode) || this.options.fallbackLng || [], code);\n const codes = [];\n const addCode = c => {\n if (!c) return;\n if (this.isSupportedCode(c)) {\n codes.push(c);\n } else {\n this.logger.warn(`rejecting language code not found in supportedLngs: ${c}`);\n }\n };\n if (isString(code) && (code.includes('-') || code.includes('_'))) {\n if (this.options.load !== 'languageOnly') addCode(this.formatLanguageCode(code));\n if (this.options.load !== 'languageOnly' && this.options.load !== 'currentOnly') addCode(this.getScriptPartFromCode(code));\n if (this.options.load !== 'currentOnly') addCode(this.getLanguagePartFromCode(code));\n } else if (isString(code)) {\n addCode(this.formatLanguageCode(code));\n }\n fallbackCodes.forEach(fc => {\n if (!codes.includes(fc)) addCode(this.formatLanguageCode(fc));\n });\n return codes;\n }\n}\n\nconst suffixesOrder = {\n zero: 0,\n one: 1,\n two: 2,\n few: 3,\n many: 4,\n other: 5\n};\nconst dummyRule = {\n select: count => count === 1 ? 'one' : 'other',\n resolvedOptions: () => ({\n pluralCategories: ['one', 'other']\n })\n};\nclass PluralResolver {\n constructor(languageUtils, options = {}) {\n this.languageUtils = languageUtils;\n this.options = options;\n this.logger = baseLogger.create('pluralResolver');\n this.pluralRulesCache = {};\n }\n clearCache() {\n this.pluralRulesCache = {};\n }\n getRule(code, options = {}) {\n const cleanedCode = getCleanedCode(code === 'dev' ? 'en' : code);\n const type = options.ordinal ? 'ordinal' : 'cardinal';\n const cacheKey = JSON.stringify({\n cleanedCode,\n type\n });\n if (cacheKey in this.pluralRulesCache) {\n return this.pluralRulesCache[cacheKey];\n }\n let rule;\n try {\n rule = new Intl.PluralRules(cleanedCode, {\n type\n });\n } catch (err) {\n if (typeof Intl === 'undefined') {\n this.logger.error('No Intl support, please use an Intl polyfill!');\n return dummyRule;\n }\n if (!code.match(/-|_/)) return dummyRule;\n const lngPart = this.languageUtils.getLanguagePartFromCode(code);\n rule = this.getRule(lngPart, options);\n }\n this.pluralRulesCache[cacheKey] = rule;\n return rule;\n }\n needsPlural(code, options = {}) {\n let rule = this.getRule(code, options);\n if (!rule) rule = this.getRule('dev', options);\n return rule?.resolvedOptions().pluralCategories.length > 1;\n }\n getPluralFormsOfKey(code, key, options = {}) {\n return this.getSuffixes(code, options).map(suffix => `${key}${suffix}`);\n }\n getSuffixes(code, options = {}) {\n let rule = this.getRule(code, options);\n if (!rule) rule = this.getRule('dev', options);\n if (!rule) return [];\n return rule.resolvedOptions().pluralCategories.sort((pluralCategory1, pluralCategory2) => suffixesOrder[pluralCategory1] - suffixesOrder[pluralCategory2]).map(pluralCategory => `${this.options.prepend}${options.ordinal ? `ordinal${this.options.prepend}` : ''}${pluralCategory}`);\n }\n getSuffix(code, count, options = {}) {\n const rule = this.getRule(code, options);\n if (rule) {\n return `${this.options.prepend}${options.ordinal ? `ordinal${this.options.prepend}` : ''}${rule.select(count)}`;\n }\n this.logger.warn(`no plural rule found for: ${code}`);\n return this.getSuffix('dev', count, options);\n }\n}\n\nconst deepFindWithDefaults = (data, defaultData, key, keySeparator = '.', ignoreJSONStructure = true) => {\n let path = getPathWithDefaults(data, defaultData, key);\n if (!path && ignoreJSONStructure && isString(key)) {\n path = deepFind(data, key, keySeparator);\n if (path === undefined) path = deepFind(defaultData, key, keySeparator);\n }\n return path;\n};\nconst regexSafe = val => val.replace(/\\$/g, '$$$$');\nclass Interpolator {\n constructor(options = {}) {\n this.logger = baseLogger.create('interpolator');\n this.options = options;\n this.format = options?.interpolation?.format || (value => value);\n this.init(options);\n }\n init(options = {}) {\n if (!options.interpolation) options.interpolation = {\n escapeValue: true\n };\n const {\n escape: escape$1,\n escapeValue,\n useRawValueToEscape,\n prefix,\n prefixEscaped,\n suffix,\n suffixEscaped,\n formatSeparator,\n unescapeSuffix,\n unescapePrefix,\n nestingPrefix,\n nestingPrefixEscaped,\n nestingSuffix,\n nestingSuffixEscaped,\n nestingOptionsSeparator,\n maxReplaces,\n alwaysFormat\n } = options.interpolation;\n this.escape = escape$1 !== undefined ? escape$1 : escape;\n this.escapeValue = escapeValue !== undefined ? escapeValue : true;\n this.useRawValueToEscape = useRawValueToEscape !== undefined ? useRawValueToEscape : false;\n this.prefix = prefix ? regexEscape(prefix) : prefixEscaped || '{{';\n this.suffix = suffix ? regexEscape(suffix) : suffixEscaped || '}}';\n this.formatSeparator = formatSeparator || ',';\n this.unescapePrefix = unescapeSuffix ? '' : unescapePrefix ? regexEscape(unescapePrefix) : '-';\n this.unescapeSuffix = this.unescapePrefix ? '' : unescapeSuffix ? regexEscape(unescapeSuffix) : '';\n this.nestingPrefix = nestingPrefix ? regexEscape(nestingPrefix) : nestingPrefixEscaped || regexEscape('$t(');\n this.nestingSuffix = nestingSuffix ? regexEscape(nestingSuffix) : nestingSuffixEscaped || regexEscape(')');\n this.nestingOptionsSeparator = nestingOptionsSeparator || ',';\n this.maxReplaces = maxReplaces || 1000;\n this.alwaysFormat = alwaysFormat !== undefined ? alwaysFormat : false;\n this.resetRegExp();\n }\n reset() {\n if (this.options) this.init(this.options);\n }\n resetRegExp() {\n const getOrResetRegExp = (existingRegExp, pattern) => {\n if (existingRegExp?.source === pattern) {\n existingRegExp.lastIndex = 0;\n return existingRegExp;\n }\n return new RegExp(pattern, 'g');\n };\n this.regexp = getOrResetRegExp(this.regexp, `${this.prefix}(.+?)${this.suffix}`);\n this.regexpUnescape = getOrResetRegExp(this.regexpUnescape, `${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`);\n this.nestingRegexp = getOrResetRegExp(this.nestingRegexp, `${this.nestingPrefix}((?:[^()\"']+|\"[^\"]*\"|'[^']*'|\\\\((?:[^()]|\"[^\"]*\"|'[^']*')*\\\\))*?)${this.nestingSuffix}`);\n }\n interpolate(str, data, lng, options) {\n let match;\n let value;\n let replaces;\n const defaultData = this.options && this.options.interpolation && this.options.interpolation.defaultVariables || {};\n const handleFormat = key => {\n if (!key.includes(this.formatSeparator)) {\n const path = deepFindWithDefaults(data, defaultData, key, this.options.keySeparator, this.options.ignoreJSONStructure);\n return this.alwaysFormat ? this.format(path, undefined, lng, {\n ...options,\n ...data,\n interpolationkey: key\n }) : path;\n }\n const p = key.split(this.formatSeparator);\n const k = p.shift().trim();\n const f = p.join(this.formatSeparator).trim();\n return this.format(deepFindWithDefaults(data, defaultData, k, this.options.keySeparator, this.options.ignoreJSONStructure), f, lng, {\n ...options,\n ...data,\n interpolationkey: k\n });\n };\n this.resetRegExp();\n if (!this.escapeValue && typeof str === 'string' && /\\$t\\([^)]*\\{[^}]*\\{\\{/.test(str)) {\n this.logger.warn('nesting options string contains interpolated variables with escapeValue: false — ' + 'if any of those values are attacker-controlled they can inject additional ' + 'nesting options (e.g. redirect lng/ns). Sanitise untrusted input before passing ' + 'it to t(), or keep escapeValue: true.');\n }\n const missingInterpolationHandler = options?.missingInterpolationHandler || this.options.missingInterpolationHandler;\n const skipOnVariables = options?.interpolation?.skipOnVariables !== undefined ? options.interpolation.skipOnVariables : this.options.interpolation.skipOnVariables;\n const todos = [{\n regex: this.regexpUnescape,\n safeValue: val => val\n }, {\n regex: this.regexp,\n safeValue: val => this.escapeValue ? this.escape(val) : val\n }];\n todos.forEach(todo => {\n replaces = 0;\n while (match = todo.regex.exec(str)) {\n const matchedVar = match[1].trim();\n value = handleFormat(matchedVar);\n if (value === undefined) {\n if (typeof missingInterpolationHandler === 'function') {\n const temp = missingInterpolationHandler(str, match, options);\n value = isString(temp) ? temp : '';\n } else if (options && Object.prototype.hasOwnProperty.call(options, matchedVar)) {\n value = '';\n } else if (skipOnVariables) {\n value = match[0];\n continue;\n } else {\n this.logger.warn(`missed to pass in variable ${matchedVar} for interpolating ${str}`);\n value = '';\n }\n } else if (!isString(value) && !this.useRawValueToEscape) {\n value = makeString(value);\n }\n const safeValue = todo.safeValue(value);\n str = str.replace(match[0], regexSafe(safeValue));\n if (skipOnVariables) {\n todo.regex.lastIndex += safeValue.length;\n todo.regex.lastIndex -= match[0].length;\n } else {\n todo.regex.lastIndex = 0;\n }\n replaces++;\n if (replaces >= this.maxReplaces) {\n break;\n }\n }\n });\n return str;\n }\n nest(str, fc, options = {}) {\n let match;\n let value;\n let clonedOptions;\n const handleHasOptions = (key, inheritedOptions) => {\n const sep = this.nestingOptionsSeparator;\n if (!key.includes(sep)) return key;\n const c = key.split(new RegExp(`${regexEscape(sep)}[ ]*{`));\n let optionsString = `{${c[1]}`;\n key = c[0];\n optionsString = this.interpolate(optionsString, clonedOptions);\n const matchedSingleQuotes = optionsString.match(/'/g);\n const matchedDoubleQuotes = optionsString.match(/\"/g);\n if ((matchedSingleQuotes?.length ?? 0) % 2 === 0 && !matchedDoubleQuotes || (matchedDoubleQuotes?.length ?? 0) % 2 !== 0) {\n optionsString = optionsString.replace(/'/g, '\"');\n }\n try {\n clonedOptions = JSON.parse(optionsString);\n if (inheritedOptions) clonedOptions = {\n ...inheritedOptions,\n ...clonedOptions\n };\n } catch (e) {\n this.logger.warn(`failed parsing options string in nesting for key ${key}`, e);\n return `${key}${sep}${optionsString}`;\n }\n if (clonedOptions.defaultValue && clonedOptions.defaultValue.includes(this.prefix)) delete clonedOptions.defaultValue;\n return key;\n };\n while (match = this.nestingRegexp.exec(str)) {\n let formatters = [];\n clonedOptions = {\n ...options\n };\n clonedOptions = clonedOptions.replace && !isString(clonedOptions.replace) ? clonedOptions.replace : clonedOptions;\n clonedOptions.applyPostProcessor = false;\n delete clonedOptions.defaultValue;\n const keyEndIndex = /{.*}/s.test(match[1]) ? match[1].lastIndexOf('}') + 1 : match[1].indexOf(this.formatSeparator);\n if (keyEndIndex !== -1) {\n formatters = match[1].slice(keyEndIndex).split(this.formatSeparator).map(elem => elem.trim()).filter(Boolean);\n match[1] = match[1].slice(0, keyEndIndex);\n }\n value = fc(handleHasOptions.call(this, match[1].trim(), clonedOptions), clonedOptions);\n if (value && match[0] === str && !isString(value)) return value;\n if (!isString(value)) value = makeString(value);\n if (!value) {\n this.logger.warn(`missed to resolve ${match[1]} for nesting ${str}`);\n value = '';\n }\n if (formatters.length) {\n value = formatters.reduce((v, f) => this.format(v, f, options.lng, {\n ...options,\n interpolationkey: match[1].trim()\n }), value.trim());\n }\n str = str.replace(match[0], value);\n this.regexp.lastIndex = 0;\n }\n return str;\n }\n}\n\nconst parseFormatStr = formatStr => {\n let formatName = formatStr.toLowerCase().trim();\n const formatOptions = {};\n if (formatStr.includes('(')) {\n const p = formatStr.split('(');\n formatName = p[0].toLowerCase().trim();\n const optStr = p[1].slice(0, -1);\n if (formatName === 'currency' && !optStr.includes(':')) {\n if (!formatOptions.currency) formatOptions.currency = optStr.trim();\n } else if (formatName === 'relativetime' && !optStr.includes(':')) {\n if (!formatOptions.range) formatOptions.range = optStr.trim();\n } else {\n const opts = optStr.split(';');\n opts.forEach(opt => {\n if (opt) {\n const [key, ...rest] = opt.split(':');\n const val = rest.join(':').trim().replace(/^'+|'+$/g, '');\n const trimmedKey = key.trim();\n if (!formatOptions[trimmedKey]) formatOptions[trimmedKey] = val;\n if (val === 'false') formatOptions[trimmedKey] = false;\n if (val === 'true') formatOptions[trimmedKey] = true;\n if (!isNaN(val)) formatOptions[trimmedKey] = parseInt(val, 10);\n }\n });\n }\n }\n return {\n formatName,\n formatOptions\n };\n};\nconst createCachedFormatter = fn => {\n const cache = {};\n return (v, l, o) => {\n let optForCache = o;\n if (o && o.interpolationkey && o.formatParams && o.formatParams[o.interpolationkey] && o[o.interpolationkey]) {\n optForCache = {\n ...optForCache,\n [o.interpolationkey]: undefined\n };\n }\n const key = l + JSON.stringify(optForCache);\n let frm = cache[key];\n if (!frm) {\n frm = fn(getCleanedCode(l), o);\n cache[key] = frm;\n }\n return frm(v);\n };\n};\nconst createNonCachedFormatter = fn => (v, l, o) => fn(getCleanedCode(l), o)(v);\nclass Formatter {\n constructor(options = {}) {\n this.logger = baseLogger.create('formatter');\n this.options = options;\n this.init(options);\n }\n init(services, options = {\n interpolation: {}\n }) {\n this.formatSeparator = options.interpolation.formatSeparator || ',';\n const cf = options.cacheInBuiltFormats ? createCachedFormatter : createNonCachedFormatter;\n this.formats = {\n number: cf((lng, opt) => {\n const formatter = new Intl.NumberFormat(lng, {\n ...opt\n });\n return val => formatter.format(val);\n }),\n currency: cf((lng, opt) => {\n const formatter = new Intl.NumberFormat(lng, {\n ...opt,\n style: 'currency'\n });\n return val => formatter.format(val);\n }),\n datetime: cf((lng, opt) => {\n const formatter = new Intl.DateTimeFormat(lng, {\n ...opt\n });\n return val => formatter.format(val);\n }),\n relativetime: cf((lng, opt) => {\n const formatter = new Intl.RelativeTimeFormat(lng, {\n ...opt\n });\n return val => formatter.format(val, opt.range || 'day');\n }),\n list: cf((lng, opt) => {\n const formatter = new Intl.ListFormat(lng, {\n ...opt\n });\n return val => formatter.format(val);\n })\n };\n }\n add(name, fc) {\n this.formats[name.toLowerCase().trim()] = fc;\n }\n addCached(name, fc) {\n this.formats[name.toLowerCase().trim()] = createCachedFormatter(fc);\n }\n format(value, format, lng, options = {}) {\n if (!format) return value;\n if (value == null) return value;\n const rawFormats = format.split(this.formatSeparator);\n const formats = [];\n for (let i = 0; i < rawFormats.length; i++) {\n let f = rawFormats[i];\n while (f.indexOf('(') > -1 && !f.includes(')') && i + 1 < rawFormats.length) {\n f = `${f}${this.formatSeparator}${rawFormats[++i]}`;\n }\n formats.push(f);\n }\n const result = formats.reduce((mem, f) => {\n const {\n formatName,\n formatOptions\n } = parseFormatStr(f);\n if (this.formats[formatName]) {\n let formatted = mem;\n try {\n const valOptions = options?.formatParams?.[options.interpolationkey] || {};\n const l = valOptions.locale || valOptions.lng || options.locale || options.lng || lng;\n formatted = this.formats[formatName](mem, l, {\n ...formatOptions,\n ...options,\n ...valOptions\n });\n } catch (error) {\n this.logger.warn(error);\n }\n return formatted;\n } else {\n this.logger.warn(`there was no format function for ${formatName}`);\n }\n return mem;\n }, value);\n return result;\n }\n}\n\nconst removePending = (q, name) => {\n if (q.pending[name] !== undefined) {\n delete q.pending[name];\n q.pendingCount--;\n }\n};\nclass Connector extends EventEmitter {\n constructor(backend, store, services, options = {}) {\n super();\n this.backend = backend;\n this.store = store;\n this.services = services;\n this.languageUtils = services.languageUtils;\n this.options = options;\n this.logger = baseLogger.create('backendConnector');\n this.waitingReads = [];\n this.maxParallelReads = options.maxParallelReads || 10;\n this.readingCalls = 0;\n this.maxRetries = options.maxRetries >= 0 ? options.maxRetries : 5;\n this.retryTimeout = options.retryTimeout >= 1 ? options.retryTimeout : 350;\n this.state = {};\n this.queue = [];\n this.backend?.init?.(services, options.backend, options);\n }\n queueLoad(languages, namespaces, options, callback) {\n const toLoad = {};\n const pending = {};\n const toLoadLanguages = {};\n const toLoadNamespaces = {};\n languages.forEach(lng => {\n let hasAllNamespaces = true;\n namespaces.forEach(ns => {\n const name = `${lng}|${ns}`;\n if (!options.reload && this.store.hasResourceBundle(lng, ns)) {\n this.state[name] = 2;\n } else if (this.state[name] < 0) ; else if (this.state[name] === 1) {\n if (pending[name] === undefined) pending[name] = true;\n } else {\n this.state[name] = 1;\n hasAllNamespaces = false;\n if (pending[name] === undefined) pending[name] = true;\n if (toLoad[name] === undefined) toLoad[name] = true;\n if (toLoadNamespaces[ns] === undefined) toLoadNamespaces[ns] = true;\n }\n });\n if (!hasAllNamespaces) toLoadLanguages[lng] = true;\n });\n if (Object.keys(toLoad).length || Object.keys(pending).length) {\n this.queue.push({\n pending,\n pendingCount: Object.keys(pending).length,\n loaded: {},\n errors: [],\n callback\n });\n }\n return {\n toLoad: Object.keys(toLoad),\n pending: Object.keys(pending),\n toLoadLanguages: Object.keys(toLoadLanguages),\n toLoadNamespaces: Object.keys(toLoadNamespaces)\n };\n }\n loaded(name, err, data) {\n const s = name.split('|');\n const lng = s[0];\n const ns = s[1];\n if (err) this.emit('failedLoading', lng, ns, err);\n if (!err && data) {\n this.store.addResourceBundle(lng, ns, data, undefined, undefined, {\n skipCopy: true\n });\n }\n this.state[name] = err ? -1 : 2;\n if (err && data) this.state[name] = 0;\n const loaded = {};\n this.queue.forEach(q => {\n pushPath(q.loaded, [lng], ns);\n removePending(q, name);\n if (err) q.errors.push(err);\n if (q.pendingCount === 0 && !q.done) {\n Object.keys(q.loaded).forEach(l => {\n if (!loaded[l]) loaded[l] = {};\n const loadedKeys = q.loaded[l];\n if (loadedKeys.length) {\n loadedKeys.forEach(n => {\n if (loaded[l][n] === undefined) loaded[l][n] = true;\n });\n }\n });\n q.done = true;\n if (q.errors.length) {\n q.callback(q.errors);\n } else {\n q.callback();\n }\n }\n });\n this.emit('loaded', loaded);\n this.queue = this.queue.filter(q => !q.done);\n }\n read(lng, ns, fcName, tried = 0, wait = this.retryTimeout, callback) {\n if (!lng.length) return callback(null, {});\n if (this.readingCalls >= this.maxParallelReads) {\n this.waitingReads.push({\n lng,\n ns,\n fcName,\n tried,\n wait,\n callback\n });\n return;\n }\n this.readingCalls++;\n const resolver = (err, data) => {\n this.readingCalls--;\n if (this.waitingReads.length > 0) {\n const next = this.waitingReads.shift();\n this.read(next.lng, next.ns, next.fcName, next.tried, next.wait, next.callback);\n }\n if (err && data && tried < this.maxRetries) {\n setTimeout(() => {\n this.read(lng, ns, fcName, tried + 1, wait * 2, callback);\n }, wait);\n return;\n }\n callback(err, data);\n };\n const fc = this.backend[fcName].bind(this.backend);\n if (fc.length === 2) {\n try {\n const r = fc(lng, ns);\n if (r && typeof r.then === 'function') {\n r.then(data => resolver(null, data)).catch(resolver);\n } else {\n resolver(null, r);\n }\n } catch (err) {\n resolver(err);\n }\n return;\n }\n return fc(lng, ns, resolver);\n }\n prepareLoading(languages, namespaces, options = {}, callback) {\n if (!this.backend) {\n this.logger.warn('No backend was added via i18next.use. Will not load resources.');\n return callback && callback();\n }\n if (isString(languages)) languages = this.languageUtils.toResolveHierarchy(languages);\n if (isString(namespaces)) namespaces = [namespaces];\n const toLoad = this.queueLoad(languages, namespaces, options, callback);\n if (!toLoad.toLoad.length) {\n if (!toLoad.pending.length) callback();\n return null;\n }\n toLoad.toLoad.forEach(name => {\n this.loadOne(name);\n });\n }\n load(languages, namespaces, callback) {\n this.prepareLoading(languages, namespaces, {}, callback);\n }\n reload(languages, namespaces, callback) {\n this.prepareLoading(languages, namespaces, {\n reload: true\n }, callback);\n }\n loadOne(name, prefix = '') {\n const s = name.split('|');\n const lng = s[0];\n const ns = s[1];\n this.read(lng, ns, 'read', undefined, undefined, (err, data) => {\n if (err) this.logger.warn(`${prefix}loading namespace ${ns} for language ${lng} failed`, err);\n if (!err && data) this.logger.log(`${prefix}loaded namespace ${ns} for language ${lng}`, data);\n this.loaded(name, err, data);\n });\n }\n saveMissing(languages, namespace, key, fallbackValue, isUpdate, options = {}, clb = () => {}) {\n if (this.services?.utils?.hasLoadedNamespace && !this.services?.utils?.hasLoadedNamespace(namespace)) {\n this.logger.warn(`did not save key \"${key}\" as the namespace \"${namespace}\" was not yet loaded`, 'This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!');\n return;\n }\n if (key === undefined || key === null || key === '') return;\n if (this.backend?.create) {\n const opts = {\n ...options,\n isUpdate\n };\n const fc = this.backend.create.bind(this.backend);\n if (fc.length < 6) {\n try {\n let r;\n if (fc.length === 5) {\n r = fc(languages, namespace, key, fallbackValue, opts);\n } else {\n r = fc(languages, namespace, key, fallbackValue);\n }\n if (r && typeof r.then === 'function') {\n r.then(data => clb(null, data)).catch(clb);\n } else {\n clb(null, r);\n }\n } catch (err) {\n clb(err);\n }\n } else {\n fc(languages, namespace, key, fallbackValue, clb, opts);\n }\n }\n if (!languages || !languages[0]) return;\n this.store.addResource(languages[0], namespace, key, fallbackValue);\n }\n}\n\nconst get = () => ({\n debug: false,\n initAsync: true,\n ns: ['translation'],\n defaultNS: ['translation'],\n fallbackLng: ['dev'],\n fallbackNS: false,\n supportedLngs: false,\n nonExplicitSupportedLngs: false,\n load: 'all',\n preload: false,\n keySeparator: '.',\n nsSeparator: ':',\n pluralSeparator: '_',\n contextSeparator: '_',\n enableSelector: false,\n partialBundledLanguages: false,\n saveMissing: false,\n updateMissing: false,\n saveMissingTo: 'fallback',\n saveMissingPlurals: true,\n missingKeyHandler: false,\n missingInterpolationHandler: false,\n postProcess: false,\n postProcessPassResolved: false,\n returnNull: false,\n returnEmptyString: true,\n returnObjects: false,\n joinArrays: false,\n returnedObjectHandler: false,\n parseMissingKeyHandler: false,\n appendNamespaceToMissingKey: false,\n appendNamespaceToCIMode: false,\n overloadTranslationOptionHandler: args => {\n let ret = {};\n if (typeof args[1] === 'object') ret = args[1];\n if (isString(args[1])) ret.defaultValue = args[1];\n if (isString(args[2])) ret.tDescription = args[2];\n if (typeof args[2] === 'object' || typeof args[3] === 'object') {\n const options = args[3] || args[2];\n Object.keys(options).forEach(key => {\n ret[key] = options[key];\n });\n }\n return ret;\n },\n interpolation: {\n escapeValue: true,\n prefix: '{{',\n suffix: '}}',\n formatSeparator: ',',\n unescapePrefix: '-',\n nestingPrefix: '$t(',\n nestingSuffix: ')',\n nestingOptionsSeparator: ',',\n maxReplaces: 1000,\n skipOnVariables: true\n },\n cacheInBuiltFormats: true\n});\nconst transformOptions = options => {\n if (isString(options.ns)) options.ns = [options.ns];\n if (isString(options.fallbackLng)) options.fallbackLng = [options.fallbackLng];\n if (isString(options.fallbackNS)) options.fallbackNS = [options.fallbackNS];\n if (options.supportedLngs && !options.supportedLngs.includes('cimode')) {\n options.supportedLngs = options.supportedLngs.concat(['cimode']);\n }\n return options;\n};\n\nconst noop = () => {};\nconst bindMemberFunctions = inst => {\n const mems = Object.getOwnPropertyNames(Object.getPrototypeOf(inst));\n mems.forEach(mem => {\n if (typeof inst[mem] === 'function') {\n inst[mem] = inst[mem].bind(inst);\n }\n });\n};\nclass I18n extends EventEmitter {\n constructor(options = {}, callback) {\n super();\n this.options = transformOptions(options);\n this.services = {};\n this.logger = baseLogger;\n this.modules = {\n external: []\n };\n bindMemberFunctions(this);\n if (callback && !this.isInitialized && !options.isClone) {\n if (!this.options.initAsync) {\n this.init(options, callback);\n return this;\n }\n setTimeout(() => {\n this.init(options, callback);\n }, 0);\n }\n }\n init(options = {}, callback) {\n this.isInitializing = true;\n if (typeof options === 'function') {\n callback = options;\n options = {};\n }\n if (options.defaultNS == null && options.ns) {\n if (isString(options.ns)) {\n options.defaultNS = options.ns;\n } else if (!options.ns.includes('translation')) {\n options.defaultNS = options.ns[0];\n }\n }\n const defOpts = get();\n this.options = {\n ...defOpts,\n ...this.options,\n ...transformOptions(options)\n };\n this.options.interpolation = {\n ...defOpts.interpolation,\n ...this.options.interpolation\n };\n if (options.keySeparator !== undefined) {\n this.options.userDefinedKeySeparator = options.keySeparator;\n }\n if (options.nsSeparator !== undefined) {\n this.options.userDefinedNsSeparator = options.nsSeparator;\n }\n if (typeof this.options.overloadTranslationOptionHandler !== 'function') {\n this.options.overloadTranslationOptionHandler = defOpts.overloadTranslationOptionHandler;\n }\n const createClassOnDemand = ClassOrObject => {\n if (!ClassOrObject) return null;\n if (typeof ClassOrObject === 'function') return new ClassOrObject();\n return ClassOrObject;\n };\n if (!this.options.isClone) {\n if (this.modules.logger) {\n baseLogger.init(createClassOnDemand(this.modules.logger), this.options);\n } else {\n baseLogger.init(null, this.options);\n }\n let formatter;\n if (this.modules.formatter) {\n formatter = this.modules.formatter;\n } else {\n formatter = Formatter;\n }\n const lu = new LanguageUtil(this.options);\n this.store = new ResourceStore(this.options.resources, this.options);\n const s = this.services;\n s.logger = baseLogger;\n s.resourceStore = this.store;\n s.languageUtils = lu;\n s.pluralResolver = new PluralResolver(lu, {\n prepend: this.options.pluralSeparator\n });\n if (formatter) {\n s.formatter = createClassOnDemand(formatter);\n if (s.formatter.init) s.formatter.init(s, this.options);\n this.options.interpolation.format = s.formatter.format.bind(s.formatter);\n }\n s.interpolator = new Interpolator(this.options);\n s.utils = {\n hasLoadedNamespace: this.hasLoadedNamespace.bind(this)\n };\n s.backendConnector = new Connector(createClassOnDemand(this.modules.backend), s.resourceStore, s, this.options);\n s.backendConnector.on('*', (event, ...args) => {\n this.emit(event, ...args);\n });\n if (this.modules.languageDetector) {\n s.languageDetector = createClassOnDemand(this.modules.languageDetector);\n if (s.languageDetector.init) s.languageDetector.init(s, this.options.detection, this.options);\n }\n if (this.modules.i18nFormat) {\n s.i18nFormat = createClassOnDemand(this.modules.i18nFormat);\n if (s.i18nFormat.init) s.i18nFormat.init(this);\n }\n this.translator = new Translator(this.services, this.options);\n this.translator.on('*', (event, ...args) => {\n this.emit(event, ...args);\n });\n this.modules.external.forEach(m => {\n if (m.init) m.init(this);\n });\n }\n this.format = this.options.interpolation.format;\n if (!callback) callback = noop;\n if (this.options.fallbackLng && !this.services.languageDetector && !this.options.lng) {\n const codes = this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);\n if (codes.length > 0 && codes[0] !== 'dev') this.options.lng = codes[0];\n }\n if (!this.services.languageDetector && !this.options.lng) {\n this.logger.warn('init: no languageDetector is used and no lng is defined');\n }\n const storeApi = ['getResource', 'hasResourceBundle', 'getResourceBundle', 'getDataByLanguage'];\n storeApi.forEach(fcName => {\n this[fcName] = (...args) => this.store[fcName](...args);\n });\n const storeApiChained = ['addResource', 'addResources', 'addResourceBundle', 'removeResourceBundle'];\n storeApiChained.forEach(fcName => {\n this[fcName] = (...args) => {\n this.store[fcName](...args);\n return this;\n };\n });\n const deferred = defer();\n const load = () => {\n const finish = (err, t) => {\n this.isInitializing = false;\n if (this.isInitialized && !this.initializedStoreOnce) this.logger.warn('init: i18next is already initialized. You should call init just once!');\n this.isInitialized = true;\n if (!this.options.isClone) this.logger.log('initialized', this.options);\n this.emit('initialized', this.options);\n deferred.resolve(t);\n callback(err, t);\n };\n if ((this.languages || this.isLanguageChangingTo) && !this.isInitialized) return finish(null, this.t.bind(this));\n this.changeLanguage(this.options.lng, finish);\n };\n if (this.options.resources || !this.options.initAsync) {\n load();\n } else {\n setTimeout(load, 0);\n }\n return deferred;\n }\n loadResources(language, callback = noop) {\n let usedCallback = callback;\n const usedLng = isString(language) ? language : this.language;\n if (typeof language === 'function') usedCallback = language;\n if (!this.options.resources || this.options.partialBundledLanguages) {\n if (usedLng?.toLowerCase() === 'cimode' && (!this.options.preload || this.options.preload.length === 0)) return usedCallback();\n const toLoad = [];\n const append = lng => {\n if (!lng) return;\n if (lng === 'cimode') return;\n const lngs = this.services.languageUtils.toResolveHierarchy(lng);\n lngs.forEach(l => {\n if (l === 'cimode') return;\n if (!toLoad.includes(l)) toLoad.push(l);\n });\n };\n if (!usedLng) {\n const fallbacks = this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);\n fallbacks.forEach(l => append(l));\n } else {\n append(usedLng);\n }\n this.options.preload?.forEach?.(l => append(l));\n this.services.backendConnector.load(toLoad, this.options.ns, e => {\n if (!e && !this.resolvedLanguage && this.language) this.setResolvedLanguage(this.language);\n usedCallback(e);\n });\n } else {\n usedCallback(null);\n }\n }\n reloadResources(lngs, ns, callback) {\n const deferred = defer();\n if (typeof lngs === 'function') {\n callback = lngs;\n lngs = undefined;\n }\n if (typeof ns === 'function') {\n callback = ns;\n ns = undefined;\n }\n if (!lngs) lngs = this.languages;\n if (!ns) ns = this.options.ns;\n if (!callback) callback = noop;\n this.services.backendConnector.reload(lngs, ns, err => {\n deferred.resolve();\n callback(err);\n });\n return deferred;\n }\n use(module) {\n if (!module) throw new Error('You are passing an undefined module! Please check the object you are passing to i18next.use()');\n if (!module.type) throw new Error('You are passing a wrong module! Please check the object you are passing to i18next.use()');\n if (module.type === 'backend') {\n this.modules.backend = module;\n }\n if (module.type === 'logger' || module.log && module.warn && module.error) {\n this.modules.logger = module;\n }\n if (module.type === 'languageDetector') {\n this.modules.languageDetector = module;\n }\n if (module.type === 'i18nFormat') {\n this.modules.i18nFormat = module;\n }\n if (module.type === 'postProcessor') {\n postProcessor.addPostProcessor(module);\n }\n if (module.type === 'formatter') {\n this.modules.formatter = module;\n }\n if (module.type === '3rdParty') {\n this.modules.external.push(module);\n }\n return this;\n }\n setResolvedLanguage(l) {\n if (!l || !this.languages) return;\n if (['cimode', 'dev'].includes(l)) return;\n for (let li = 0; li < this.languages.length; li++) {\n const lngInLngs = this.languages[li];\n if (['cimode', 'dev'].includes(lngInLngs)) continue;\n if (this.store.hasLanguageSomeTranslations(lngInLngs)) {\n this.resolvedLanguage = lngInLngs;\n break;\n }\n }\n if (!this.resolvedLanguage && !this.languages.includes(l) && this.store.hasLanguageSomeTranslations(l)) {\n this.resolvedLanguage = l;\n this.languages.unshift(l);\n }\n }\n changeLanguage(lng, callback) {\n this.isLanguageChangingTo = lng;\n const deferred = defer();\n this.emit('languageChanging', lng);\n const setLngProps = l => {\n this.language = l;\n this.languages = this.services.languageUtils.toResolveHierarchy(l);\n this.resolvedLanguage = undefined;\n this.setResolvedLanguage(l);\n };\n const done = (err, l) => {\n if (l) {\n if (this.isLanguageChangingTo === lng) {\n setLngProps(l);\n this.translator.changeLanguage(l);\n this.isLanguageChangingTo = undefined;\n this.emit('languageChanged', l);\n this.logger.log('languageChanged', l);\n }\n } else {\n this.isLanguageChangingTo = undefined;\n }\n deferred.resolve((...args) => this.t(...args));\n if (callback) callback(err, (...args) => this.t(...args));\n };\n const setLng = lngs => {\n if (!lng && !lngs && this.services.languageDetector) lngs = [];\n const fl = isString(lngs) ? lngs : lngs && lngs[0];\n const l = this.store.hasLanguageSomeTranslations(fl) ? fl : this.services.languageUtils.getBestMatchFromCodes(isString(lngs) ? [lngs] : lngs);\n if (l) {\n if (!this.language) {\n setLngProps(l);\n }\n if (!this.translator.language) this.translator.changeLanguage(l);\n this.services.languageDetector?.cacheUserLanguage?.(l);\n }\n this.loadResources(l, err => {\n done(err, l);\n });\n };\n if (!lng && this.services.languageDetector && !this.services.languageDetector.async) {\n setLng(this.services.languageDetector.detect());\n } else if (!lng && this.services.languageDetector && this.services.languageDetector.async) {\n if (this.services.languageDetector.detect.length === 0) {\n this.services.languageDetector.detect().then(setLng);\n } else {\n this.services.languageDetector.detect(setLng);\n }\n } else {\n setLng(lng);\n }\n return deferred;\n }\n getFixedT(lng, ns, keyPrefix, fixedOpts) {\n const scopeNs = fixedOpts?.scopeNs;\n const fixedT = (key, opts, ...rest) => {\n let o;\n if (typeof opts !== 'object') {\n o = this.options.overloadTranslationOptionHandler([key, opts].concat(rest));\n } else {\n o = {\n ...opts\n };\n }\n o.lng = o.lng || fixedT.lng;\n o.lngs = o.lngs || fixedT.lngs;\n const explicitCallNs = o.ns !== undefined && o.ns !== null;\n o.ns = o.ns || fixedT.ns;\n if (o.keyPrefix !== '') o.keyPrefix = o.keyPrefix || keyPrefix || fixedT.keyPrefix;\n const selectorOpts = {\n ...this.options,\n ...o\n };\n if (Array.isArray(scopeNs) && !explicitCallNs) selectorOpts.ns = scopeNs;\n if (typeof o.keyPrefix === 'function') o.keyPrefix = keysFromSelector(o.keyPrefix, selectorOpts);\n const keySeparator = this.options.keySeparator || '.';\n let resultKey;\n if (o.keyPrefix && Array.isArray(key)) {\n resultKey = key.map(k => {\n if (typeof k === 'function') k = keysFromSelector(k, selectorOpts);\n return `${o.keyPrefix}${keySeparator}${k}`;\n });\n } else {\n if (typeof key === 'function') key = keysFromSelector(key, selectorOpts);\n resultKey = o.keyPrefix ? `${o.keyPrefix}${keySeparator}${key}` : key;\n }\n return this.t(resultKey, o);\n };\n if (isString(lng)) {\n fixedT.lng = lng;\n } else {\n fixedT.lngs = lng;\n }\n fixedT.ns = ns;\n fixedT.keyPrefix = keyPrefix;\n return fixedT;\n }\n t(...args) {\n return this.translator?.translate(...args);\n }\n exists(...args) {\n return this.translator?.exists(...args);\n }\n setDefaultNamespace(ns) {\n this.options.defaultNS = ns;\n }\n hasLoadedNamespace(ns, options = {}) {\n if (!this.isInitialized) {\n this.logger.warn('hasLoadedNamespace: i18next was not initialized', this.languages);\n return false;\n }\n if (!this.languages || !this.languages.length) {\n this.logger.warn('hasLoadedNamespace: i18n.languages were undefined or empty', this.languages);\n return false;\n }\n const lng = options.lng || this.resolvedLanguage || this.languages[0];\n const fallbackLng = this.options ? this.options.fallbackLng : false;\n const lastLng = this.languages[this.languages.length - 1];\n if (lng.toLowerCase() === 'cimode') return true;\n const loadNotPending = (l, n) => {\n const loadState = this.services.backendConnector.state[`${l}|${n}`];\n return loadState === -1 || loadState === 0 || loadState === 2;\n };\n if (options.precheck) {\n const preResult = options.precheck(this, loadNotPending);\n if (preResult !== undefined) return preResult;\n }\n if (this.hasResourceBundle(lng, ns)) return true;\n if (!this.services.backendConnector.backend || this.options.resources && !this.options.partialBundledLanguages) return true;\n if (loadNotPending(lng, ns) && (!fallbackLng || loadNotPending(lastLng, ns))) return true;\n return false;\n }\n loadNamespaces(ns, callback) {\n const deferred = defer();\n if (!this.options.ns) {\n if (callback) callback();\n return Promise.resolve();\n }\n if (isString(ns)) ns = [ns];\n ns.forEach(n => {\n if (!this.options.ns.includes(n)) this.options.ns.push(n);\n });\n this.loadResources(err => {\n deferred.resolve();\n if (callback) callback(err);\n });\n return deferred;\n }\n loadLanguages(lngs, callback) {\n const deferred = defer();\n if (isString(lngs)) lngs = [lngs];\n const preloaded = this.options.preload || [];\n const newLngs = lngs.filter(lng => !preloaded.includes(lng) && this.services.languageUtils.isSupportedCode(lng));\n if (!newLngs.length) {\n if (callback) callback();\n return Promise.resolve();\n }\n this.options.preload = preloaded.concat(newLngs);\n this.loadResources(err => {\n deferred.resolve();\n if (callback) callback(err);\n });\n return deferred;\n }\n dir(lng) {\n if (!lng) lng = this.resolvedLanguage || (this.languages?.length > 0 ? this.languages[0] : this.language);\n if (!lng) return 'rtl';\n try {\n const l = new Intl.Locale(lng);\n if (l && l.getTextInfo) {\n const ti = l.getTextInfo();\n if (ti && ti.direction) return ti.direction;\n }\n } catch (e) {}\n const rtlLngs = ['ar', 'shu', 'sqr', 'ssh', 'xaa', 'yhd', 'yud', 'aao', 'abh', 'abv', 'acm', 'acq', 'acw', 'acx', 'acy', 'adf', 'ads', 'aeb', 'aec', 'afb', 'ajp', 'apc', 'apd', 'arb', 'arq', 'ars', 'ary', 'arz', 'auz', 'avl', 'ayh', 'ayl', 'ayn', 'ayp', 'bbz', 'pga', 'he', 'iw', 'ps', 'pbt', 'pbu', 'pst', 'prp', 'prd', 'ug', 'ur', 'ydd', 'yds', 'yih', 'ji', 'yi', 'hbo', 'men', 'xmn', 'fa', 'jpr', 'peo', 'pes', 'prs', 'dv', 'sam', 'ckb'];\n const languageUtils = this.services?.languageUtils || new LanguageUtil(get());\n if (lng.toLowerCase().indexOf('-latn') > 1) return 'ltr';\n return rtlLngs.includes(languageUtils.getLanguagePartFromCode(lng)) || lng.toLowerCase().indexOf('-arab') > 1 ? 'rtl' : 'ltr';\n }\n static createInstance(options = {}, callback) {\n const instance = new I18n(options, callback);\n instance.createInstance = I18n.createInstance;\n return instance;\n }\n cloneInstance(options = {}, callback = noop) {\n const forkResourceStore = options.forkResourceStore;\n if (forkResourceStore) delete options.forkResourceStore;\n const mergedOptions = {\n ...this.options,\n ...options,\n ...{\n isClone: true\n }\n };\n const clone = new I18n(mergedOptions);\n if (options.debug !== undefined || options.prefix !== undefined) {\n clone.logger = clone.logger.clone(options);\n }\n const membersToCopy = ['store', 'services', 'language'];\n membersToCopy.forEach(m => {\n clone[m] = this[m];\n });\n clone.services = {\n ...this.services\n };\n clone.services.utils = {\n hasLoadedNamespace: clone.hasLoadedNamespace.bind(clone)\n };\n if (forkResourceStore) {\n const clonedData = Object.keys(this.store.data).reduce((prev, l) => {\n prev[l] = {\n ...this.store.data[l]\n };\n prev[l] = Object.keys(prev[l]).reduce((acc, n) => {\n acc[n] = {\n ...prev[l][n]\n };\n return acc;\n }, prev[l]);\n return prev;\n }, {});\n clone.store = new ResourceStore(clonedData, mergedOptions);\n clone.services.resourceStore = clone.store;\n }\n if (options.interpolation) {\n const defOpts = get();\n const mergedInterpolation = {\n ...defOpts.interpolation,\n ...this.options.interpolation,\n ...options.interpolation\n };\n const mergedForInterpolator = {\n ...mergedOptions,\n interpolation: mergedInterpolation\n };\n clone.services.interpolator = new Interpolator(mergedForInterpolator);\n }\n clone.translator = new Translator(clone.services, mergedOptions);\n clone.translator.on('*', (event, ...args) => {\n clone.emit(event, ...args);\n });\n clone.init(mergedOptions, callback);\n clone.translator.options = mergedOptions;\n clone.translator.backendConnector.services.utils = {\n hasLoadedNamespace: clone.hasLoadedNamespace.bind(clone)\n };\n return clone;\n }\n toJSON() {\n return {\n options: this.options,\n store: this.store,\n language: this.language,\n languages: this.languages,\n resolvedLanguage: this.resolvedLanguage\n };\n }\n}\nconst instance = I18n.createInstance();\n\nconst createInstance = instance.createInstance;\nconst dir = instance.dir;\nconst init = instance.init;\nconst loadResources = instance.loadResources;\nconst reloadResources = instance.reloadResources;\nconst use = instance.use;\nconst changeLanguage = instance.changeLanguage;\nconst getFixedT = instance.getFixedT;\nconst t = instance.t;\nconst exists = instance.exists;\nconst setDefaultNamespace = instance.setDefaultNamespace;\nconst hasLoadedNamespace = instance.hasLoadedNamespace;\nconst loadNamespaces = instance.loadNamespaces;\nconst loadLanguages = instance.loadLanguages;\n\nexport { changeLanguage, createInstance, instance as default, dir, exists, getFixedT, hasLoadedNamespace, init, keysFromSelector as keyFromSelector, loadLanguages, loadNamespaces, loadResources, reloadResources, setDefaultNamespace, t, use };\n","import { createInstance, type i18n } from \"i18next\";\n\n// Separate resources and language state from the assistant UI. Do not register\n// initReactI18next here: it would replace react-i18next's global web instance.\nexport const i18next: i18n = createInstance();\n","// Keys that must never be traversed when walking a string/array path into an\n// object, otherwise a crafted path such as `__proto__.polluted` walks straight\n// into Object.prototype. Mirrors the guard shipped to the same setPath/pushPath\n// walker in i18next-fs-backend 2.6.6 and i18next-http-middleware 3.9.7.\nvar UNSAFE_KEYS = ['__proto__', 'constructor', 'prototype'];\nfunction getLastOfPath(object, path, Empty) {\n function cleanKey(key) {\n return key && key.indexOf('###') > -1 ? key.replace(/###/g, '.') : key;\n }\n function canNotTraverseDeeper() {\n return !object || typeof object === 'string';\n }\n var stack = typeof path !== 'string' ? [].concat(path) : path.split('.');\n while (stack.length > 1) {\n if (canNotTraverseDeeper()) return {};\n var key = cleanKey(stack.shift());\n if (UNSAFE_KEYS.indexOf(key) > -1) return {};\n if (!object[key] && Empty) object[key] = new Empty();\n object = object[key];\n }\n if (canNotTraverseDeeper()) return {};\n var k = cleanKey(stack.shift());\n if (UNSAFE_KEYS.indexOf(k) > -1) return {};\n return {\n obj: object,\n k: k\n };\n}\nexport function setPath(object, path, newValue) {\n var _getLastOfPath = getLastOfPath(object, path, Object),\n obj = _getLastOfPath.obj,\n k = _getLastOfPath.k;\n if (obj === undefined) return; // unsafe path, drop silently\n\n obj[k] = newValue;\n}\nexport function pushPath(object, path, newValue, concat) {\n var _getLastOfPath2 = getLastOfPath(object, path, Object),\n obj = _getLastOfPath2.obj,\n k = _getLastOfPath2.k;\n if (obj === undefined) return; // unsafe path, drop silently\n\n obj[k] = obj[k] || [];\n if (concat) obj[k] = obj[k].concat(newValue);\n if (!concat) obj[k].push(newValue);\n}\nexport function getPath(object, path) {\n var _getLastOfPath3 = getLastOfPath(object, path),\n obj = _getLastOfPath3.obj,\n k = _getLastOfPath3.k;\n if (!obj) return undefined;\n return obj[k];\n}\nvar arr = [];\nvar each = arr.forEach;\nvar slice = arr.slice;\nexport function defaults(obj) {\n each.call(slice.call(arguments, 1), function (source) {\n if (source) {\n // iterate own keys only (skip inherited/polluted props) and refuse to\n // copy prototype keys, so a polluted source can't seed Object.prototype.\n for (var _i = 0, _Object$keys = Object.keys(source); _i < _Object$keys.length; _i++) {\n var prop = _Object$keys[_i];\n if (UNSAFE_KEYS.indexOf(prop) > -1) continue;\n if (obj[prop] === undefined) obj[prop] = source[prop];\n }\n }\n });\n return obj;\n}\nexport function extend(obj) {\n each.call(slice.call(arguments, 1), function (source) {\n if (source) {\n for (var _i2 = 0, _Object$keys2 = Object.keys(source); _i2 < _Object$keys2.length; _i2++) {\n var prop = _Object$keys2[_i2];\n if (UNSAFE_KEYS.indexOf(prop) > -1) continue;\n obj[prop] = source[prop];\n }\n }\n });\n return obj;\n}","//#region packages/fast-memoize/index.ts\nfunction memoize(fn, options) {\n\tconst cache = options && options.cache ? options.cache : cacheDefault;\n\tconst serializer = options && options.serializer ? options.serializer : serializerDefault;\n\treturn (options && options.strategy ? options.strategy : strategyDefault)(fn, {\n\t\tcache,\n\t\tserializer\n\t});\n}\nfunction isPrimitive(value) {\n\treturn value == null || typeof value === \"number\" || typeof value === \"boolean\";\n}\nfunction monadic(fn, cache, serializer, arg) {\n\tconst cacheKey = isPrimitive(arg) ? arg : serializer(arg);\n\tlet computedValue = cache.get(cacheKey);\n\tif (typeof computedValue === \"undefined\") {\n\t\tcomputedValue = fn.call(this, arg);\n\t\tcache.set(cacheKey, computedValue);\n\t}\n\treturn computedValue;\n}\nfunction variadic(fn, cache, serializer) {\n\tconst args = Array.prototype.slice.call(arguments, 3);\n\tconst cacheKey = serializer(args);\n\tlet computedValue = cache.get(cacheKey);\n\tif (typeof computedValue === \"undefined\") {\n\t\tcomputedValue = fn.apply(this, args);\n\t\tcache.set(cacheKey, computedValue);\n\t}\n\treturn computedValue;\n}\nfunction assemble(fn, context, strategy, cache, serialize) {\n\treturn strategy.bind(context, fn, cache, serialize);\n}\nfunction strategyDefault(fn, options) {\n\tconst strategy = fn.length === 1 ? monadic : variadic;\n\treturn assemble(fn, this, strategy, options.cache.create(), options.serializer);\n}\nfunction strategyVariadic(fn, options) {\n\treturn assemble(fn, this, variadic, options.cache.create(), options.serializer);\n}\nfunction strategyMonadic(fn, options) {\n\treturn assemble(fn, this, monadic, options.cache.create(), options.serializer);\n}\nconst serializerDefault = function() {\n\treturn JSON.stringify(arguments);\n};\nvar ObjectWithoutPrototypeCache = class {\n\tconstructor() {\n\t\tthis.cache = Object.create(null);\n\t}\n\tget(key) {\n\t\treturn this.cache[key];\n\t}\n\tset(key, value) {\n\t\tthis.cache[key] = value;\n\t}\n};\nconst cacheDefault = { create: function create() {\n\treturn new ObjectWithoutPrototypeCache();\n} };\nconst strategies = {\n\tvariadic: strategyVariadic,\n\tmonadic: strategyMonadic\n};\n//#endregion\nexport { memoize, strategies };\n\n//# sourceMappingURL=index.js.map","//#region packages/icu-skeleton-parser/date-time.ts\n/**\n* https://unicode.org/reports/tr35/tr35-dates.html#Date_Field_Symbol_Table\n* Credit: https://github.com/caridy/intl-datetimeformat-pattern/blob/master/index.js\n* with some tweaks\n*/\nconst DATE_TIME_REGEX = /(?:[Eec]{1,6}|G{1,5}|[Qq]{1,5}|(?:[yYur]+|U{1,5})|[ML]{1,5}|d{1,2}|D{1,3}|F{1}|[abB]{1,5}|[hkHK]{1,2}|w{1,2}|W{1}|m{1,2}|s{1,2}|[zZOvVxX]{1,4})(?=([^']*'[^']*')*[^']*$)/g;\n/**\n* Parse Date time skeleton into Intl.DateTimeFormatOptions\n* Ref: https://unicode.org/reports/tr35/tr35-dates.html#Date_Field_Symbol_Table\n* @public\n* @param skeleton skeleton string\n*/\nfunction parseDateTimeSkeleton(skeleton) {\n\tconst result = {};\n\tskeleton.replace(DATE_TIME_REGEX, (match) => {\n\t\tconst len = match.length;\n\t\tswitch (match[0]) {\n\t\t\tcase \"G\":\n\t\t\t\tresult.era = len === 4 ? \"long\" : len === 5 ? \"narrow\" : \"short\";\n\t\t\t\tbreak;\n\t\t\tcase \"y\":\n\t\t\t\tresult.year = len === 2 ? \"2-digit\" : \"numeric\";\n\t\t\t\tbreak;\n\t\t\tcase \"Y\":\n\t\t\tcase \"u\":\n\t\t\tcase \"U\":\n\t\t\tcase \"r\": throw new RangeError(\"`Y/u/U/r` (year) patterns are not supported, use `y` instead\");\n\t\t\tcase \"q\":\n\t\t\tcase \"Q\": throw new RangeError(\"`q/Q` (quarter) patterns are not supported\");\n\t\t\tcase \"M\":\n\t\t\tcase \"L\":\n\t\t\t\tresult.month = [\n\t\t\t\t\t\"numeric\",\n\t\t\t\t\t\"2-digit\",\n\t\t\t\t\t\"short\",\n\t\t\t\t\t\"long\",\n\t\t\t\t\t\"narrow\"\n\t\t\t\t][len - 1];\n\t\t\t\tbreak;\n\t\t\tcase \"w\":\n\t\t\tcase \"W\": throw new RangeError(\"`w/W` (week) patterns are not supported\");\n\t\t\tcase \"d\":\n\t\t\t\tresult.day = [\"numeric\", \"2-digit\"][len - 1];\n\t\t\t\tbreak;\n\t\t\tcase \"D\":\n\t\t\tcase \"F\":\n\t\t\tcase \"g\": throw new RangeError(\"`D/F/g` (day) patterns are not supported, use `d` instead\");\n\t\t\tcase \"E\":\n\t\t\t\tresult.weekday = len === 4 ? \"long\" : len === 5 ? \"narrow\" : \"short\";\n\t\t\t\tbreak;\n\t\t\tcase \"e\":\n\t\t\t\tif (len < 4) throw new RangeError(\"`e..eee` (weekday) patterns are not supported\");\n\t\t\t\tresult.weekday = [\n\t\t\t\t\t\"short\",\n\t\t\t\t\t\"long\",\n\t\t\t\t\t\"narrow\",\n\t\t\t\t\t\"short\"\n\t\t\t\t][len - 3];\n\t\t\t\tbreak;\n\t\t\tcase \"c\":\n\t\t\t\tif (len < 4) throw new RangeError(\"`c..ccc` (weekday) patterns are not supported\");\n\t\t\t\tresult.weekday = [\n\t\t\t\t\t\"short\",\n\t\t\t\t\t\"long\",\n\t\t\t\t\t\"narrow\",\n\t\t\t\t\t\"short\"\n\t\t\t\t][len - 3];\n\t\t\t\tbreak;\n\t\t\tcase \"a\":\n\t\t\t\tresult.hour12 = true;\n\t\t\t\tbreak;\n\t\t\tcase \"b\":\n\t\t\tcase \"B\": throw new RangeError(\"`b/B` (period) patterns are not supported, use `a` instead\");\n\t\t\tcase \"h\":\n\t\t\t\tresult.hourCycle = \"h12\";\n\t\t\t\tresult.hour = [\"numeric\", \"2-digit\"][len - 1];\n\t\t\t\tbreak;\n\t\t\tcase \"H\":\n\t\t\t\tresult.hourCycle = \"h23\";\n\t\t\t\tresult.hour = [\"numeric\", \"2-digit\"][len - 1];\n\t\t\t\tbreak;\n\t\t\tcase \"K\":\n\t\t\t\tresult.hourCycle = \"h11\";\n\t\t\t\tresult.hour = [\"numeric\", \"2-digit\"][len - 1];\n\t\t\t\tbreak;\n\t\t\tcase \"k\":\n\t\t\t\tresult.hourCycle = \"h24\";\n\t\t\t\tresult.hour = [\"numeric\", \"2-digit\"][len - 1];\n\t\t\t\tbreak;\n\t\t\tcase \"j\":\n\t\t\tcase \"J\":\n\t\t\tcase \"C\": throw new RangeError(\"`j/J/C` (hour) patterns are not supported, use `h/H/K/k` instead\");\n\t\t\tcase \"m\":\n\t\t\t\tresult.minute = [\"numeric\", \"2-digit\"][len - 1];\n\t\t\t\tbreak;\n\t\t\tcase \"s\":\n\t\t\t\tresult.second = [\"numeric\", \"2-digit\"][len - 1];\n\t\t\t\tbreak;\n\t\t\tcase \"S\":\n\t\t\tcase \"A\": throw new RangeError(\"`S/A` (second) patterns are not supported, use `s` instead\");\n\t\t\tcase \"z\":\n\t\t\t\tresult.timeZoneName = len < 4 ? \"short\" : \"long\";\n\t\t\t\tbreak;\n\t\t\tcase \"Z\":\n\t\t\tcase \"O\":\n\t\t\tcase \"v\":\n\t\t\tcase \"V\":\n\t\t\tcase \"X\":\n\t\t\tcase \"x\": throw new RangeError(\"`Z/O/v/V/X/x` (timeZone) patterns are not supported, use `z` instead\");\n\t\t}\n\t\treturn \"\";\n\t});\n\treturn result;\n}\n//#endregion\n//#region node_modules/.aspect_rules_js/@formatjs_generated+unicode@0.0.0/node_modules/@formatjs_generated/unicode/icu-skeleton-parser-regex.js\nconst WHITE_SPACE_REGEX = /[\\t-\\r \\x85\\u200E\\u200F\\u2028\\u2029]/i;\n//#endregion\n//#region packages/icu-skeleton-parser/number.ts\nfunction parseNumberSkeletonFromString(skeleton) {\n\tif (skeleton.length === 0) throw new Error(\"Number skeleton cannot be empty\");\n\tconst stringTokens = skeleton.split(WHITE_SPACE_REGEX).filter((x) => x.length > 0);\n\tconst tokens = [];\n\tfor (const stringToken of stringTokens) {\n\t\tlet stemAndOptions = stringToken.split(\"/\");\n\t\tif (stemAndOptions.length === 0) throw new Error(\"Invalid number skeleton\");\n\t\tconst [stem, ...options] = stemAndOptions;\n\t\tfor (const option of options) if (option.length === 0) throw new Error(\"Invalid number skeleton\");\n\t\ttokens.push({\n\t\t\tstem,\n\t\t\toptions\n\t\t});\n\t}\n\treturn tokens;\n}\nfunction icuUnitToEcma(unit) {\n\treturn unit.replace(/^(.*?)-/, \"\");\n}\nconst FRACTION_PRECISION_REGEX = /^\\.(?:(0+)(\\*)?|(#+)|(0+)(#+))$/g;\nconst SIGNIFICANT_PRECISION_REGEX = /^(@+)?(\\+|#+)?[rs]?$/g;\nconst INTEGER_WIDTH_REGEX = /(\\*)(0+)|(#+)(0+)|(0+)/g;\nconst CONCISE_INTEGER_WIDTH_REGEX = /^(0+)$/;\nfunction parseSignificantPrecision(str) {\n\tconst result = {};\n\tif (str[str.length - 1] === \"r\") result.roundingPriority = \"morePrecision\";\n\telse if (str[str.length - 1] === \"s\") result.roundingPriority = \"lessPrecision\";\n\tstr.replace(SIGNIFICANT_PRECISION_REGEX, function(_, g1, g2) {\n\t\tif (typeof g2 !== \"string\") {\n\t\t\tresult.minimumSignificantDigits = g1.length;\n\t\t\tresult.maximumSignificantDigits = g1.length;\n\t\t} else if (g2 === \"+\") result.minimumSignificantDigits = g1.length;\n\t\telse if (g1[0] === \"#\") result.maximumSignificantDigits = g1.length;\n\t\telse {\n\t\t\tresult.minimumSignificantDigits = g1.length;\n\t\t\tresult.maximumSignificantDigits = g1.length + (typeof g2 === \"string\" ? g2.length : 0);\n\t\t}\n\t\treturn \"\";\n\t});\n\treturn result;\n}\nfunction parseSign(str) {\n\tswitch (str) {\n\t\tcase \"sign-auto\": return { signDisplay: \"auto\" };\n\t\tcase \"sign-accounting\":\n\t\tcase \"()\": return { currencySign: \"accounting\" };\n\t\tcase \"sign-always\":\n\t\tcase \"+!\": return { signDisplay: \"always\" };\n\t\tcase \"sign-accounting-always\":\n\t\tcase \"()!\": return {\n\t\t\tsignDisplay: \"always\",\n\t\t\tcurrencySign: \"accounting\"\n\t\t};\n\t\tcase \"sign-except-zero\":\n\t\tcase \"+?\": return { signDisplay: \"exceptZero\" };\n\t\tcase \"sign-accounting-except-zero\":\n\t\tcase \"()?\": return {\n\t\t\tsignDisplay: \"exceptZero\",\n\t\t\tcurrencySign: \"accounting\"\n\t\t};\n\t\tcase \"sign-never\":\n\t\tcase \"+_\": return { signDisplay: \"never\" };\n\t}\n}\nfunction parseConciseScientificAndEngineeringStem(stem) {\n\tlet result;\n\tif (stem[0] === \"E\" && stem[1] === \"E\") {\n\t\tresult = { notation: \"engineering\" };\n\t\tstem = stem.slice(2);\n\t} else if (stem[0] === \"E\") {\n\t\tresult = { notation: \"scientific\" };\n\t\tstem = stem.slice(1);\n\t}\n\tif (result) {\n\t\tconst signDisplay = stem.slice(0, 2);\n\t\tif (signDisplay === \"+!\") {\n\t\t\tresult.signDisplay = \"always\";\n\t\t\tstem = stem.slice(2);\n\t\t} else if (signDisplay === \"+?\") {\n\t\t\tresult.signDisplay = \"exceptZero\";\n\t\t\tstem = stem.slice(2);\n\t\t}\n\t\tif (!CONCISE_INTEGER_WIDTH_REGEX.test(stem)) throw new Error(\"Malformed concise eng/scientific notation\");\n\t\tresult.minimumIntegerDigits = stem.length;\n\t}\n\treturn result;\n}\nfunction parseNotationOptions(opt) {\n\tconst result = {};\n\tconst signOpts = parseSign(opt);\n\tif (signOpts) return signOpts;\n\treturn result;\n}\n/**\n* https://github.com/unicode-org/icu/blob/master/docs/userguide/format_parse/numbers/skeletons.md#skeleton-stems-and-options\n*/\nfunction parseNumberSkeleton(tokens) {\n\tlet result = {};\n\tfor (const token of tokens) {\n\t\tswitch (token.stem) {\n\t\t\tcase \"percent\":\n\t\t\tcase \"%\":\n\t\t\t\tresult.style = \"percent\";\n\t\t\t\tcontinue;\n\t\t\tcase \"%x100\":\n\t\t\t\tresult.style = \"percent\";\n\t\t\t\tresult.scale = 100;\n\t\t\t\tcontinue;\n\t\t\tcase \"currency\":\n\t\t\t\tresult.style = \"currency\";\n\t\t\t\tresult.currency = token.options[0];\n\t\t\t\tcontinue;\n\t\t\tcase \"group-off\":\n\t\t\tcase \",_\":\n\t\t\t\tresult.useGrouping = false;\n\t\t\t\tcontinue;\n\t\t\tcase \"precision-integer\":\n\t\t\tcase \".\":\n\t\t\t\tresult.maximumFractionDigits = 0;\n\t\t\t\tcontinue;\n\t\t\tcase \"measure-unit\":\n\t\t\tcase \"unit\":\n\t\t\t\tresult.style = \"unit\";\n\t\t\t\tresult.unit = icuUnitToEcma(token.options[0]);\n\t\t\t\tcontinue;\n\t\t\tcase \"compact-short\":\n\t\t\tcase \"K\":\n\t\t\t\tresult.notation = \"compact\";\n\t\t\t\tresult.compactDisplay = \"short\";\n\t\t\t\tcontinue;\n\t\t\tcase \"compact-long\":\n\t\t\tcase \"KK\":\n\t\t\t\tresult.notation = \"compact\";\n\t\t\t\tresult.compactDisplay = \"long\";\n\t\t\t\tcontinue;\n\t\t\tcase \"scientific\":\n\t\t\t\tresult = {\n\t\t\t\t\t...result,\n\t\t\t\t\tnotation: \"scientific\",\n\t\t\t\t\t...token.options.reduce((all, opt) => ({\n\t\t\t\t\t\t...all,\n\t\t\t\t\t\t...parseNotationOptions(opt)\n\t\t\t\t\t}), {})\n\t\t\t\t};\n\t\t\t\tcontinue;\n\t\t\tcase \"engineering\":\n\t\t\t\tresult = {\n\t\t\t\t\t...result,\n\t\t\t\t\tnotation: \"engineering\",\n\t\t\t\t\t...token.options.reduce((all, opt) => ({\n\t\t\t\t\t\t...all,\n\t\t\t\t\t\t...parseNotationOptions(opt)\n\t\t\t\t\t}), {})\n\t\t\t\t};\n\t\t\t\tcontinue;\n\t\t\tcase \"notation-simple\":\n\t\t\t\tresult.notation = \"standard\";\n\t\t\t\tcontinue;\n\t\t\tcase \"unit-width-narrow\":\n\t\t\t\tresult.currencyDisplay = \"narrowSymbol\";\n\t\t\t\tresult.unitDisplay = \"narrow\";\n\t\t\t\tcontinue;\n\t\t\tcase \"unit-width-short\":\n\t\t\t\tresult.currencyDisplay = \"code\";\n\t\t\t\tresult.unitDisplay = \"short\";\n\t\t\t\tcontinue;\n\t\t\tcase \"unit-width-full-name\":\n\t\t\t\tresult.currencyDisplay = \"name\";\n\t\t\t\tresult.unitDisplay = \"long\";\n\t\t\t\tcontinue;\n\t\t\tcase \"unit-width-iso-code\":\n\t\t\t\tresult.currencyDisplay = \"symbol\";\n\t\t\t\tcontinue;\n\t\t\tcase \"scale\":\n\t\t\t\tresult.scale = parseFloat(token.options[0]);\n\t\t\t\tcontinue;\n\t\t\tcase \"rounding-mode-floor\":\n\t\t\t\tresult.roundingMode = \"floor\";\n\t\t\t\tcontinue;\n\t\t\tcase \"rounding-mode-ceiling\":\n\t\t\t\tresult.roundingMode = \"ceil\";\n\t\t\t\tcontinue;\n\t\t\tcase \"rounding-mode-down\":\n\t\t\t\tresult.roundingMode = \"trunc\";\n\t\t\t\tcontinue;\n\t\t\tcase \"rounding-mode-up\":\n\t\t\t\tresult.roundingMode = \"expand\";\n\t\t\t\tcontinue;\n\t\t\tcase \"rounding-mode-half-even\":\n\t\t\t\tresult.roundingMode = \"halfEven\";\n\t\t\t\tcontinue;\n\t\t\tcase \"rounding-mode-half-down\":\n\t\t\t\tresult.roundingMode = \"halfTrunc\";\n\t\t\t\tcontinue;\n\t\t\tcase \"rounding-mode-half-up\":\n\t\t\t\tresult.roundingMode = \"halfExpand\";\n\t\t\t\tcontinue;\n\t\t\tcase \"integer-width\":\n\t\t\t\tif (token.options.length > 1) throw new RangeError(\"integer-width stems only accept a single optional option\");\n\t\t\t\ttoken.options[0].replace(INTEGER_WIDTH_REGEX, function(_, g1, g2, g3, g4, g5) {\n\t\t\t\t\tif (g1) result.minimumIntegerDigits = g2.length;\n\t\t\t\t\telse if (g3 && g4) throw new Error(\"We currently do not support maximum integer digits\");\n\t\t\t\t\telse if (g5) throw new Error(\"We currently do not support exact integer digits\");\n\t\t\t\t\treturn \"\";\n\t\t\t\t});\n\t\t\t\tcontinue;\n\t\t}\n\t\tif (CONCISE_INTEGER_WIDTH_REGEX.test(token.stem)) {\n\t\t\tresult.minimumIntegerDigits = token.stem.length;\n\t\t\tcontinue;\n\t\t}\n\t\tif (FRACTION_PRECISION_REGEX.test(token.stem)) {\n\t\t\tif (token.options.length > 1) throw new RangeError(\"Fraction-precision stems only accept a single optional option\");\n\t\t\ttoken.stem.replace(FRACTION_PRECISION_REGEX, function(_, g1, g2, g3, g4, g5) {\n\t\t\t\tif (g2 === \"*\") result.minimumFractionDigits = g1.length;\n\t\t\t\telse if (g3 && g3[0] === \"#\") result.maximumFractionDigits = g3.length;\n\t\t\t\telse if (g4 && g5) {\n\t\t\t\t\tresult.minimumFractionDigits = g4.length;\n\t\t\t\t\tresult.maximumFractionDigits = g4.length + g5.length;\n\t\t\t\t} else {\n\t\t\t\t\tresult.minimumFractionDigits = g1.length;\n\t\t\t\t\tresult.maximumFractionDigits = g1.length;\n\t\t\t\t}\n\t\t\t\treturn \"\";\n\t\t\t});\n\t\t\tconst opt = token.options[0];\n\t\t\tif (opt === \"w\") result = {\n\t\t\t\t...result,\n\t\t\t\ttrailingZeroDisplay: \"stripIfInteger\"\n\t\t\t};\n\t\t\telse if (opt) result = {\n\t\t\t\t...result,\n\t\t\t\t...parseSignificantPrecision(opt)\n\t\t\t};\n\t\t\tcontinue;\n\t\t}\n\t\tif (SIGNIFICANT_PRECISION_REGEX.test(token.stem)) {\n\t\t\tresult = {\n\t\t\t\t...result,\n\t\t\t\t...parseSignificantPrecision(token.stem)\n\t\t\t};\n\t\t\tcontinue;\n\t\t}\n\t\tconst signOpts = parseSign(token.stem);\n\t\tif (signOpts) result = {\n\t\t\t...result,\n\t\t\t...signOpts\n\t\t};\n\t\tconst conciseScientificAndEngineeringOpts = parseConciseScientificAndEngineeringStem(token.stem);\n\t\tif (conciseScientificAndEngineeringOpts) result = {\n\t\t\t...result,\n\t\t\t...conciseScientificAndEngineeringOpts\n\t\t};\n\t}\n\treturn result;\n}\n//#endregion\nexport { parseDateTimeSkeleton, parseNumberSkeleton, parseNumberSkeletonFromString };\n\n//# sourceMappingURL=index.js.map","import { parseDateTimeSkeleton, parseNumberSkeleton, parseNumberSkeletonFromString } from \"@formatjs/icu-skeleton-parser\";\n//#region packages/icu-messageformat-parser/error.ts\nlet ErrorKind = /* @__PURE__ */ function(ErrorKind) {\n\t/** Argument is unclosed (e.g. `{0`) */\n\tErrorKind[ErrorKind[\"EXPECT_ARGUMENT_CLOSING_BRACE\"] = 1] = \"EXPECT_ARGUMENT_CLOSING_BRACE\";\n\t/** Argument is empty (e.g. `{}`). */\n\tErrorKind[ErrorKind[\"EMPTY_ARGUMENT\"] = 2] = \"EMPTY_ARGUMENT\";\n\t/** Argument is malformed (e.g. `{foo!}``) */\n\tErrorKind[ErrorKind[\"MALFORMED_ARGUMENT\"] = 3] = \"MALFORMED_ARGUMENT\";\n\t/** Expect an argument type (e.g. `{foo,}`) */\n\tErrorKind[ErrorKind[\"EXPECT_ARGUMENT_TYPE\"] = 4] = \"EXPECT_ARGUMENT_TYPE\";\n\t/** Unsupported argument type (e.g. `{foo,foo}`) */\n\tErrorKind[ErrorKind[\"INVALID_ARGUMENT_TYPE\"] = 5] = \"INVALID_ARGUMENT_TYPE\";\n\t/** Expect an argument style (e.g. `{foo, number, }`) */\n\tErrorKind[ErrorKind[\"EXPECT_ARGUMENT_STYLE\"] = 6] = \"EXPECT_ARGUMENT_STYLE\";\n\t/** The number skeleton is invalid. */\n\tErrorKind[ErrorKind[\"INVALID_NUMBER_SKELETON\"] = 7] = \"INVALID_NUMBER_SKELETON\";\n\t/** The date time skeleton is invalid. */\n\tErrorKind[ErrorKind[\"INVALID_DATE_TIME_SKELETON\"] = 8] = \"INVALID_DATE_TIME_SKELETON\";\n\t/** Exepct a number skeleton following the `::` (e.g. `{foo, number, ::}`) */\n\tErrorKind[ErrorKind[\"EXPECT_NUMBER_SKELETON\"] = 9] = \"EXPECT_NUMBER_SKELETON\";\n\t/** Exepct a date time skeleton following the `::` (e.g. `{foo, date, ::}`) */\n\tErrorKind[ErrorKind[\"EXPECT_DATE_TIME_SKELETON\"] = 10] = \"EXPECT_DATE_TIME_SKELETON\";\n\t/** Unmatched apostrophes in the argument style (e.g. `{foo, number, 'test`) */\n\tErrorKind[ErrorKind[\"UNCLOSED_QUOTE_IN_ARGUMENT_STYLE\"] = 11] = \"UNCLOSED_QUOTE_IN_ARGUMENT_STYLE\";\n\t/** Missing select argument options (e.g. `{foo, select}`) */\n\tErrorKind[ErrorKind[\"EXPECT_SELECT_ARGUMENT_OPTIONS\"] = 12] = \"EXPECT_SELECT_ARGUMENT_OPTIONS\";\n\t/** Expecting an offset value in `plural` or `selectordinal` argument (e.g `{foo, plural, offset}`) */\n\tErrorKind[ErrorKind[\"EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE\"] = 13] = \"EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE\";\n\t/** Offset value in `plural` or `selectordinal` is invalid (e.g. `{foo, plural, offset: x}`) */\n\tErrorKind[ErrorKind[\"INVALID_PLURAL_ARGUMENT_OFFSET_VALUE\"] = 14] = \"INVALID_PLURAL_ARGUMENT_OFFSET_VALUE\";\n\t/** Expecting a selector in `select` argument (e.g `{foo, select}`) */\n\tErrorKind[ErrorKind[\"EXPECT_SELECT_ARGUMENT_SELECTOR\"] = 15] = \"EXPECT_SELECT_ARGUMENT_SELECTOR\";\n\t/** Expecting a selector in `plural` or `selectordinal` argument (e.g `{foo, plural}`) */\n\tErrorKind[ErrorKind[\"EXPECT_PLURAL_ARGUMENT_SELECTOR\"] = 16] = \"EXPECT_PLURAL_ARGUMENT_SELECTOR\";\n\t/** Expecting a message fragment after the `select` selector (e.g. `{foo, select, apple}`) */\n\tErrorKind[ErrorKind[\"EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT\"] = 17] = \"EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT\";\n\t/**\n\t* Expecting a message fragment after the `plural` or `selectordinal` selector\n\t* (e.g. `{foo, plural, one}`)\n\t*/\n\tErrorKind[ErrorKind[\"EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT\"] = 18] = \"EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT\";\n\t/** Selector in `plural` or `selectordinal` is malformed (e.g. `{foo, plural, =x {#}}`) */\n\tErrorKind[ErrorKind[\"INVALID_PLURAL_ARGUMENT_SELECTOR\"] = 19] = \"INVALID_PLURAL_ARGUMENT_SELECTOR\";\n\t/**\n\t* Duplicate selectors in `plural` or `selectordinal` argument.\n\t* (e.g. {foo, plural, one {#} one {#}})\n\t*/\n\tErrorKind[ErrorKind[\"DUPLICATE_PLURAL_ARGUMENT_SELECTOR\"] = 20] = \"DUPLICATE_PLURAL_ARGUMENT_SELECTOR\";\n\t/** Duplicate selectors in `select` argument.\n\t* (e.g. {foo, select, apple {apple} apple {apple}})\n\t*/\n\tErrorKind[ErrorKind[\"DUPLICATE_SELECT_ARGUMENT_SELECTOR\"] = 21] = \"DUPLICATE_SELECT_ARGUMENT_SELECTOR\";\n\t/** Plural or select argument option must have `other` clause. */\n\tErrorKind[ErrorKind[\"MISSING_OTHER_CLAUSE\"] = 22] = \"MISSING_OTHER_CLAUSE\";\n\t/** The tag is malformed. (e.g. `<bold!>foo</bold!>) */\n\tErrorKind[ErrorKind[\"INVALID_TAG\"] = 23] = \"INVALID_TAG\";\n\t/** The tag name is invalid. (e.g. `<123>foo</123>`) */\n\tErrorKind[ErrorKind[\"INVALID_TAG_NAME\"] = 25] = \"INVALID_TAG_NAME\";\n\t/** The closing tag does not match the opening tag. (e.g. `<bold>foo</italic>`) */\n\tErrorKind[ErrorKind[\"UNMATCHED_CLOSING_TAG\"] = 26] = \"UNMATCHED_CLOSING_TAG\";\n\t/** The opening tag has unmatched closing tag. (e.g. `<bold>foo`) */\n\tErrorKind[ErrorKind[\"UNCLOSED_TAG\"] = 27] = \"UNCLOSED_TAG\";\n\treturn ErrorKind;\n}({});\n//#endregion\n//#region packages/icu-messageformat-parser/types.ts\nlet TYPE = /* @__PURE__ */ function(TYPE) {\n\t/**\n\t* Raw text\n\t*/\n\tTYPE[TYPE[\"literal\"] = 0] = \"literal\";\n\t/**\n\t* Variable w/o any format, e.g `var` in `this is a {var}`\n\t*/\n\tTYPE[TYPE[\"argument\"] = 1] = \"argument\";\n\t/**\n\t* Variable w/ number format\n\t*/\n\tTYPE[TYPE[\"number\"] = 2] = \"number\";\n\t/**\n\t* Variable w/ date format\n\t*/\n\tTYPE[TYPE[\"date\"] = 3] = \"date\";\n\t/**\n\t* Variable w/ time format\n\t*/\n\tTYPE[TYPE[\"time\"] = 4] = \"time\";\n\t/**\n\t* Variable w/ select format\n\t*/\n\tTYPE[TYPE[\"select\"] = 5] = \"select\";\n\t/**\n\t* Variable w/ plural format\n\t*/\n\tTYPE[TYPE[\"plural\"] = 6] = \"plural\";\n\t/**\n\t* Only possible within plural argument.\n\t* This is the `#` symbol that will be substituted with the count.\n\t*/\n\tTYPE[TYPE[\"pound\"] = 7] = \"pound\";\n\t/**\n\t* XML-like tag\n\t*/\n\tTYPE[TYPE[\"tag\"] = 8] = \"tag\";\n\treturn TYPE;\n}({});\nlet SKELETON_TYPE = /* @__PURE__ */ function(SKELETON_TYPE) {\n\tSKELETON_TYPE[SKELETON_TYPE[\"number\"] = 0] = \"number\";\n\tSKELETON_TYPE[SKELETON_TYPE[\"dateTime\"] = 1] = \"dateTime\";\n\treturn SKELETON_TYPE;\n}({});\n/**\n* Type Guards\n*/\nfunction isLiteralElement(el) {\n\treturn el.type === 0;\n}\nfunction isArgumentElement(el) {\n\treturn el.type === 1;\n}\nfunction isNumberElement(el) {\n\treturn el.type === 2;\n}\nfunction isDateElement(el) {\n\treturn el.type === 3;\n}\nfunction isTimeElement(el) {\n\treturn el.type === 4;\n}\nfunction isSelectElement(el) {\n\treturn el.type === 5;\n}\nfunction isPluralElement(el) {\n\treturn el.type === 6;\n}\nfunction isPoundElement(el) {\n\treturn el.type === 7;\n}\nfunction isTagElement(el) {\n\treturn el.type === 8;\n}\nfunction isNumberSkeleton(el) {\n\treturn !!(el && typeof el === \"object\" && el.type === 0);\n}\nfunction isDateTimeSkeleton(el) {\n\treturn !!(el && typeof el === \"object\" && el.type === 1);\n}\nfunction createLiteralElement(value) {\n\treturn {\n\t\ttype: 0,\n\t\tvalue\n\t};\n}\nfunction createNumberElement(value, style) {\n\treturn {\n\t\ttype: 2,\n\t\tvalue,\n\t\tstyle\n\t};\n}\n//#endregion\n//#region node_modules/.aspect_rules_js/@formatjs_generated+unicode@0.0.0/node_modules/@formatjs_generated/unicode/icu-messageformat-parser-regex.js\nconst SPACE_SEPARATOR_REGEX = /[ \\xA0\\u1680\\u2000-\\u200A\\u202F\\u205F\\u3000]/;\n//#endregion\n//#region node_modules/.aspect_rules_js/@formatjs_generated+cldr.core@0.0.0/node_modules/@formatjs_generated/cldr.core/time-data.js\nconst timeData = {\n\t\"001\": [\"H\", \"h\"],\n\t\"419\": [\n\t\t\"h\",\n\t\t\"H\",\n\t\t\"hB\",\n\t\t\"hb\"\n\t],\n\t\"AC\": [\n\t\t\"H\",\n\t\t\"h\",\n\t\t\"hb\",\n\t\t\"hB\"\n\t],\n\t\"AD\": [\"H\", \"hB\"],\n\t\"AE\": [\n\t\t\"h\",\n\t\t\"hB\",\n\t\t\"hb\",\n\t\t\"H\"\n\t],\n\t\"AF\": [\n\t\t\"H\",\n\t\t\"hb\",\n\t\t\"hB\",\n\t\t\"h\"\n\t],\n\t\"AG\": [\n\t\t\"h\",\n\t\t\"hb\",\n\t\t\"H\",\n\t\t\"hB\"\n\t],\n\t\"AI\": [\n\t\t\"H\",\n\t\t\"h\",\n\t\t\"hb\",\n\t\t\"hB\"\n\t],\n\t\"AL\": [\n\t\t\"h\",\n\t\t\"H\",\n\t\t\"hB\"\n\t],\n\t\"AM\": [\"H\", \"hB\"],\n\t\"AO\": [\"H\", \"hB\"],\n\t\"AR\": [\n\t\t\"h\",\n\t\t\"H\",\n\t\t\"hB\",\n\t\t\"hb\"\n\t],\n\t\"AS\": [\"h\", \"H\"],\n\t\"AT\": [\"H\", \"hB\"],\n\t\"AU\": [\n\t\t\"h\",\n\t\t\"hb\",\n\t\t\"H\",\n\t\t\"hB\"\n\t],\n\t\"AW\": [\"H\", \"hB\"],\n\t\"AX\": [\"H\"],\n\t\"AZ\": [\n\t\t\"H\",\n\t\t\"hB\",\n\t\t\"h\"\n\t],\n\t\"BA\": [\n\t\t\"H\",\n\t\t\"hB\",\n\t\t\"h\"\n\t],\n\t\"BB\": [\n\t\t\"h\",\n\t\t\"hb\",\n\t\t\"H\",\n\t\t\"hB\"\n\t],\n\t\"BD\": [\n\t\t\"h\",\n\t\t\"hB\",\n\t\t\"H\"\n\t],\n\t\"BE\": [\"H\", \"hB\"],\n\t\"BF\": [\"H\", \"hB\"],\n\t\"BG\": [\n\t\t\"H\",\n\t\t\"hB\",\n\t\t\"h\"\n\t],\n\t\"BH\": [\n\t\t\"h\",\n\t\t\"hB\",\n\t\t\"hb\",\n\t\t\"H\"\n\t],\n\t\"BI\": [\"H\", \"h\"],\n\t\"BJ\": [\"H\", \"hB\"],\n\t\"BL\": [\"H\", \"hB\"],\n\t\"BM\": [\n\t\t\"h\",\n\t\t\"hb\",\n\t\t\"H\",\n\t\t\"hB\"\n\t],\n\t\"BN\": [\n\t\t\"hb\",\n\t\t\"hB\",\n\t\t\"h\",\n\t\t\"H\"\n\t],\n\t\"BO\": [\n\t\t\"h\",\n\t\t\"H\",\n\t\t\"hB\",\n\t\t\"hb\"\n\t],\n\t\"BQ\": [\"H\"],\n\t\"BR\": [\"H\", \"hB\"],\n\t\"BS\": [\n\t\t\"h\",\n\t\t\"hb\",\n\t\t\"H\",\n\t\t\"hB\"\n\t],\n\t\"BT\": [\"h\", \"H\"],\n\t\"BW\": [\n\t\t\"H\",\n\t\t\"h\",\n\t\t\"hb\",\n\t\t\"hB\"\n\t],\n\t\"BY\": [\"H\", \"h\"],\n\t\"BZ\": [\n\t\t\"H\",\n\t\t\"h\",\n\t\t\"hb\",\n\t\t\"hB\"\n\t],\n\t\"CA\": [\n\t\t\"h\",\n\t\t\"hb\",\n\t\t\"H\",\n\t\t\"hB\"\n\t],\n\t\"CC\": [\n\t\t\"H\",\n\t\t\"h\",\n\t\t\"hb\",\n\t\t\"hB\"\n\t],\n\t\"CD\": [\"hB\", \"H\"],\n\t\"CF\": [\n\t\t\"H\",\n\t\t\"h\",\n\t\t\"hB\"\n\t],\n\t\"CG\": [\"H\", \"hB\"],\n\t\"CH\": [\n\t\t\"H\",\n\t\t\"hB\",\n\t\t\"h\"\n\t],\n\t\"CI\": [\"H\", \"hB\"],\n\t\"CK\": [\n\t\t\"H\",\n\t\t\"h\",\n\t\t\"hb\",\n\t\t\"hB\"\n\t],\n\t\"CL\": [\n\t\t\"h\",\n\t\t\"H\",\n\t\t\"hB\",\n\t\t\"hb\"\n\t],\n\t\"CM\": [\n\t\t\"H\",\n\t\t\"h\",\n\t\t\"hB\"\n\t],\n\t\"CN\": [\n\t\t\"H\",\n\t\t\"hB\",\n\t\t\"hb\",\n\t\t\"h\"\n\t],\n\t\"CO\": [\n\t\t\"h\",\n\t\t\"H\",\n\t\t\"hB\",\n\t\t\"hb\"\n\t],\n\t\"CP\": [\"H\"],\n\t\"CR\": [\n\t\t\"h\",\n\t\t\"H\",\n\t\t\"hB\",\n\t\t\"hb\"\n\t],\n\t\"CU\": [\n\t\t\"h\",\n\t\t\"H\",\n\t\t\"hB\",\n\t\t\"hb\"\n\t],\n\t\"CV\": [\"H\", \"hB\"],\n\t\"CW\": [\"H\", \"hB\"],\n\t\"CX\": [\n\t\t\"H\",\n\t\t\"h\",\n\t\t\"hb\",\n\t\t\"hB\"\n\t],\n\t\"CY\": [\n\t\t\"h\",\n\t\t\"H\",\n\t\t\"hb\",\n\t\t\"hB\"\n\t],\n\t\"CZ\": [\"H\"],\n\t\"DE\": [\"H\", \"hB\"],\n\t\"DG\": [\n\t\t\"H\",\n\t\t\"h\",\n\t\t\"hb\",\n\t\t\"hB\"\n\t],\n\t\"DJ\": [\"h\", \"H\"],\n\t\"DK\": [\"H\"],\n\t\"DM\": [\n\t\t\"h\",\n\t\t\"hb\",\n\t\t\"H\",\n\t\t\"hB\"\n\t],\n\t\"DO\": [\n\t\t\"h\",\n\t\t\"H\",\n\t\t\"hB\",\n\t\t\"hb\"\n\t],\n\t\"DZ\": [\n\t\t\"h\",\n\t\t\"hB\",\n\t\t\"hb\",\n\t\t\"H\"\n\t],\n\t\"EA\": [\n\t\t\"H\",\n\t\t\"h\",\n\t\t\"hB\",\n\t\t\"hb\"\n\t],\n\t\"EC\": [\n\t\t\"h\",\n\t\t\"H\",\n\t\t\"hB\",\n\t\t\"hb\"\n\t],\n\t\"EE\": [\"H\", \"hB\"],\n\t\"EG\": [\n\t\t\"h\",\n\t\t\"hB\",\n\t\t\"hb\",\n\t\t\"H\"\n\t],\n\t\"EH\": [\n\t\t\"h\",\n\t\t\"hB\",\n\t\t\"hb\",\n\t\t\"H\"\n\t],\n\t\"ER\": [\"h\", \"H\"],\n\t\"ES\": [\n\t\t\"H\",\n\t\t\"hB\",\n\t\t\"h\",\n\t\t\"hb\"\n\t],\n\t\"ET\": [\n\t\t\"hB\",\n\t\t\"hb\",\n\t\t\"h\",\n\t\t\"H\"\n\t],\n\t\"FI\": [\"H\"],\n\t\"FJ\": [\n\t\t\"h\",\n\t\t\"hb\",\n\t\t\"H\",\n\t\t\"hB\"\n\t],\n\t\"FK\": [\n\t\t\"H\",\n\t\t\"h\",\n\t\t\"hb\",\n\t\t\"hB\"\n\t],\n\t\"FM\": [\n\t\t\"h\",\n\t\t\"hb\",\n\t\t\"H\",\n\t\t\"hB\"\n\t],\n\t\"FO\": [\"H\", \"h\"],\n\t\"FR\": [\"H\", \"hB\"],\n\t\"GA\": [\"H\", \"hB\"],\n\t\"GB\": [\n\t\t\"H\",\n\t\t\"h\",\n\t\t\"hb\",\n\t\t\"hB\"\n\t],\n\t\"GD\": [\n\t\t\"h\",\n\t\t\"hb\",\n\t\t\"H\",\n\t\t\"hB\"\n\t],\n\t\"GE\": [\n\t\t\"H\",\n\t\t\"hB\",\n\t\t\"h\"\n\t],\n\t\"GF\": [\"H\", \"hB\"],\n\t\"GG\": [\n\t\t\"H\",\n\t\t\"h\",\n\t\t\"hb\",\n\t\t\"hB\"\n\t],\n\t\"GH\": [\"h\", \"H\"],\n\t\"GI\": [\n\t\t\"H\",\n\t\t\"h\",\n\t\t\"hb\",\n\t\t\"hB\"\n\t],\n\t\"GL\": [\"H\", \"h\"],\n\t\"GM\": [\n\t\t\"h\",\n\t\t\"hb\",\n\t\t\"H\",\n\t\t\"hB\"\n\t],\n\t\"GN\": [\"H\", \"hB\"],\n\t\"GP\": [\"H\", \"hB\"],\n\t\"GQ\": [\n\t\t\"H\",\n\t\t\"hB\",\n\t\t\"h\",\n\t\t\"hb\"\n\t],\n\t\"GR\": [\n\t\t\"h\",\n\t\t\"H\",\n\t\t\"hb\",\n\t\t\"hB\"\n\t],\n\t\"GS\": [\n\t\t\"H\",\n\t\t\"h\",\n\t\t\"hb\",\n\t\t\"hB\"\n\t],\n\t\"GT\": [\n\t\t\"h\",\n\t\t\"H\",\n\t\t\"hB\",\n\t\t\"hb\"\n\t],\n\t\"GU\": [\n\t\t\"h\",\n\t\t\"hb\",\n\t\t\"H\",\n\t\t\"hB\"\n\t],\n\t\"GW\": [\"H\", \"hB\"],\n\t\"GY\": [\n\t\t\"h\",\n\t\t\"hb\",\n\t\t\"H\",\n\t\t\"hB\"\n\t],\n\t\"HK\": [\n\t\t\"h\",\n\t\t\"hB\",\n\t\t\"hb\",\n\t\t\"H\"\n\t],\n\t\"HN\": [\n\t\t\"h\",\n\t\t\"H\",\n\t\t\"hB\",\n\t\t\"hb\"\n\t],\n\t\"HR\": [\"H\", \"hB\"],\n\t\"HU\": [\"H\", \"h\"],\n\t\"IC\": [\n\t\t\"H\",\n\t\t\"h\",\n\t\t\"hB\",\n\t\t\"hb\"\n\t],\n\t\"ID\": [\"H\"],\n\t\"IE\": [\n\t\t\"H\",\n\t\t\"h\",\n\t\t\"hb\",\n\t\t\"hB\"\n\t],\n\t\"IL\": [\"H\", \"hB\"],\n\t\"IM\": [\n\t\t\"H\",\n\t\t\"h\",\n\t\t\"hb\",\n\t\t\"hB\"\n\t],\n\t\"IN\": [\"h\", \"H\"],\n\t\"IO\": [\n\t\t\"H\",\n\t\t\"h\",\n\t\t\"hb\",\n\t\t\"hB\"\n\t],\n\t\"IQ\": [\n\t\t\"h\",\n\t\t\"hB\",\n\t\t\"hb\",\n\t\t\"H\"\n\t],\n\t\"IR\": [\"hB\", \"H\"],\n\t\"IS\": [\"H\"],\n\t\"IT\": [\"H\", \"hB\"],\n\t\"JE\": [\n\t\t\"H\",\n\t\t\"h\",\n\t\t\"hb\",\n\t\t\"hB\"\n\t],\n\t\"JM\": [\n\t\t\"h\",\n\t\t\"hb\",\n\t\t\"H\",\n\t\t\"hB\"\n\t],\n\t\"JO\": [\n\t\t\"h\",\n\t\t\"hB\",\n\t\t\"hb\",\n\t\t\"H\"\n\t],\n\t\"JP\": [\n\t\t\"H\",\n\t\t\"K\",\n\t\t\"h\"\n\t],\n\t\"KE\": [\n\t\t\"hB\",\n\t\t\"hb\",\n\t\t\"H\",\n\t\t\"h\"\n\t],\n\t\"KG\": [\n\t\t\"H\",\n\t\t\"h\",\n\t\t\"hB\",\n\t\t\"hb\"\n\t],\n\t\"KH\": [\n\t\t\"hB\",\n\t\t\"h\",\n\t\t\"H\",\n\t\t\"hb\"\n\t],\n\t\"KI\": [\n\t\t\"h\",\n\t\t\"hb\",\n\t\t\"H\",\n\t\t\"hB\"\n\t],\n\t\"KM\": [\n\t\t\"H\",\n\t\t\"h\",\n\t\t\"hB\",\n\t\t\"hb\"\n\t],\n\t\"KN\": [\n\t\t\"h\",\n\t\t\"hb\",\n\t\t\"H\",\n\t\t\"hB\"\n\t],\n\t\"KP\": [\n\t\t\"h\",\n\t\t\"H\",\n\t\t\"hB\",\n\t\t\"hb\"\n\t],\n\t\"KR\": [\n\t\t\"h\",\n\t\t\"H\",\n\t\t\"hB\",\n\t\t\"hb\"\n\t],\n\t\"KW\": [\n\t\t\"h\",\n\t\t\"hB\",\n\t\t\"hb\",\n\t\t\"H\"\n\t],\n\t\"KY\": [\n\t\t\"h\",\n\t\t\"hb\",\n\t\t\"H\",\n\t\t\"hB\"\n\t],\n\t\"KZ\": [\"H\", \"hB\"],\n\t\"LA\": [\n\t\t\"H\",\n\t\t\"hb\",\n\t\t\"hB\",\n\t\t\"h\"\n\t],\n\t\"LB\": [\n\t\t\"h\",\n\t\t\"hB\",\n\t\t\"hb\",\n\t\t\"H\"\n\t],\n\t\"LC\": [\n\t\t\"h\",\n\t\t\"hb\",\n\t\t\"H\",\n\t\t\"hB\"\n\t],\n\t\"LI\": [\n\t\t\"H\",\n\t\t\"hB\",\n\t\t\"h\"\n\t],\n\t\"LK\": [\n\t\t\"H\",\n\t\t\"h\",\n\t\t\"hB\",\n\t\t\"hb\"\n\t],\n\t\"LR\": [\n\t\t\"h\",\n\t\t\"hb\",\n\t\t\"H\",\n\t\t\"hB\"\n\t],\n\t\"LS\": [\"h\", \"H\"],\n\t\"LT\": [\n\t\t\"H\",\n\t\t\"h\",\n\t\t\"hb\",\n\t\t\"hB\"\n\t],\n\t\"LU\": [\n\t\t\"H\",\n\t\t\"h\",\n\t\t\"hB\"\n\t],\n\t\"LV\": [\n\t\t\"H\",\n\t\t\"hB\",\n\t\t\"hb\",\n\t\t\"h\"\n\t],\n\t\"LY\": [\n\t\t\"h\",\n\t\t\"hB\",\n\t\t\"hb\",\n\t\t\"H\"\n\t],\n\t\"MA\": [\n\t\t\"H\",\n\t\t\"h\",\n\t\t\"hB\",\n\t\t\"hb\"\n\t],\n\t\"MC\": [\"H\", \"hB\"],\n\t\"MD\": [\"H\", \"hB\"],\n\t\"ME\": [\n\t\t\"H\",\n\t\t\"hB\",\n\t\t\"h\"\n\t],\n\t\"MF\": [\"H\", \"hB\"],\n\t\"MG\": [\"H\", \"h\"],\n\t\"MH\": [\n\t\t\"h\",\n\t\t\"hb\",\n\t\t\"H\",\n\t\t\"hB\"\n\t],\n\t\"MK\": [\n\t\t\"H\",\n\t\t\"h\",\n\t\t\"hb\",\n\t\t\"hB\"\n\t],\n\t\"ML\": [\"H\"],\n\t\"MM\": [\n\t\t\"hB\",\n\t\t\"hb\",\n\t\t\"H\",\n\t\t\"h\"\n\t],\n\t\"MN\": [\n\t\t\"H\",\n\t\t\"h\",\n\t\t\"hb\",\n\t\t\"hB\"\n\t],\n\t\"MO\": [\n\t\t\"h\",\n\t\t\"hB\",\n\t\t\"hb\",\n\t\t\"H\"\n\t],\n\t\"MP\": [\n\t\t\"h\",\n\t\t\"hb\",\n\t\t\"H\",\n\t\t\"hB\"\n\t],\n\t\"MQ\": [\"H\", \"hB\"],\n\t\"MR\": [\n\t\t\"h\",\n\t\t\"hB\",\n\t\t\"hb\",\n\t\t\"H\"\n\t],\n\t\"MS\": [\n\t\t\"H\",\n\t\t\"h\",\n\t\t\"hb\",\n\t\t\"hB\"\n\t],\n\t\"MT\": [\"H\", \"h\"],\n\t\"MU\": [\"H\", \"h\"],\n\t\"MV\": [\"H\", \"h\"],\n\t\"MW\": [\n\t\t\"h\",\n\t\t\"hb\",\n\t\t\"H\",\n\t\t\"hB\"\n\t],\n\t\"MX\": [\n\t\t\"h\",\n\t\t\"H\",\n\t\t\"hB\",\n\t\t\"hb\"\n\t],\n\t\"MY\": [\n\t\t\"hb\",\n\t\t\"hB\",\n\t\t\"h\",\n\t\t\"H\"\n\t],\n\t\"MZ\": [\"H\", \"hB\"],\n\t\"NA\": [\n\t\t\"h\",\n\t\t\"H\",\n\t\t\"hB\",\n\t\t\"hb\"\n\t],\n\t\"NC\": [\"H\", \"hB\"],\n\t\"NE\": [\"H\"],\n\t\"NF\": [\n\t\t\"H\",\n\t\t\"h\",\n\t\t\"hb\",\n\t\t\"hB\"\n\t],\n\t\"NG\": [\n\t\t\"H\",\n\t\t\"h\",\n\t\t\"hb\",\n\t\t\"hB\"\n\t],\n\t\"NI\": [\n\t\t\"h\",\n\t\t\"H\",\n\t\t\"hB\",\n\t\t\"hb\"\n\t],\n\t\"NL\": [\"H\", \"hB\"],\n\t\"NO\": [\"H\", \"h\"],\n\t\"NP\": [\n\t\t\"H\",\n\t\t\"h\",\n\t\t\"hB\"\n\t],\n\t\"NR\": [\n\t\t\"H\",\n\t\t\"h\",\n\t\t\"hb\",\n\t\t\"hB\"\n\t],\n\t\"NU\": [\n\t\t\"H\",\n\t\t\"h\",\n\t\t\"hb\",\n\t\t\"hB\"\n\t],\n\t\"NZ\": [\n\t\t\"h\",\n\t\t\"hb\",\n\t\t\"H\",\n\t\t\"hB\"\n\t],\n\t\"OM\": [\n\t\t\"h\",\n\t\t\"hB\",\n\t\t\"hb\",\n\t\t\"H\"\n\t],\n\t\"PA\": [\n\t\t\"h\",\n\t\t\"H\",\n\t\t\"hB\",\n\t\t\"hb\"\n\t],\n\t\"PE\": [\n\t\t\"h\",\n\t\t\"H\",\n\t\t\"hB\",\n\t\t\"hb\"\n\t],\n\t\"PF\": [\n\t\t\"H\",\n\t\t\"h\",\n\t\t\"hB\"\n\t],\n\t\"PG\": [\"h\", \"H\"],\n\t\"PH\": [\n\t\t\"h\",\n\t\t\"hB\",\n\t\t\"hb\",\n\t\t\"H\"\n\t],\n\t\"PK\": [\n\t\t\"h\",\n\t\t\"hB\",\n\t\t\"H\"\n\t],\n\t\"PL\": [\"H\", \"h\"],\n\t\"PM\": [\"H\", \"hB\"],\n\t\"PN\": [\n\t\t\"H\",\n\t\t\"h\",\n\t\t\"hb\",\n\t\t\"hB\"\n\t],\n\t\"PR\": [\n\t\t\"h\",\n\t\t\"H\",\n\t\t\"hB\",\n\t\t\"hb\"\n\t],\n\t\"PS\": [\n\t\t\"h\",\n\t\t\"hB\",\n\t\t\"hb\",\n\t\t\"H\"\n\t],\n\t\"PT\": [\"H\", \"hB\"],\n\t\"PW\": [\"h\", \"H\"],\n\t\"PY\": [\n\t\t\"h\",\n\t\t\"H\",\n\t\t\"hB\",\n\t\t\"hb\"\n\t],\n\t\"QA\": [\n\t\t\"h\",\n\t\t\"hB\",\n\t\t\"hb\",\n\t\t\"H\"\n\t],\n\t\"RE\": [\"H\", \"hB\"],\n\t\"RO\": [\"H\", \"hB\"],\n\t\"RS\": [\n\t\t\"H\",\n\t\t\"hB\",\n\t\t\"h\"\n\t],\n\t\"RU\": [\"H\"],\n\t\"RW\": [\"H\", \"h\"],\n\t\"SA\": [\n\t\t\"h\",\n\t\t\"hB\",\n\t\t\"hb\",\n\t\t\"H\"\n\t],\n\t\"SB\": [\n\t\t\"h\",\n\t\t\"hb\",\n\t\t\"H\",\n\t\t\"hB\"\n\t],\n\t\"SC\": [\n\t\t\"H\",\n\t\t\"h\",\n\t\t\"hB\"\n\t],\n\t\"SD\": [\n\t\t\"h\",\n\t\t\"hB\",\n\t\t\"hb\",\n\t\t\"H\"\n\t],\n\t\"SE\": [\"H\"],\n\t\"SG\": [\n\t\t\"h\",\n\t\t\"hb\",\n\t\t\"H\",\n\t\t\"hB\"\n\t],\n\t\"SH\": [\n\t\t\"H\",\n\t\t\"h\",\n\t\t\"hb\",\n\t\t\"hB\"\n\t],\n\t\"SI\": [\"H\", \"hB\"],\n\t\"SJ\": [\"H\"],\n\t\"SK\": [\"H\"],\n\t\"SL\": [\n\t\t\"h\",\n\t\t\"hb\",\n\t\t\"H\",\n\t\t\"hB\"\n\t],\n\t\"SM\": [\n\t\t\"H\",\n\t\t\"h\",\n\t\t\"hB\"\n\t],\n\t\"SN\": [\n\t\t\"H\",\n\t\t\"h\",\n\t\t\"hB\"\n\t],\n\t\"SO\": [\"h\", \"H\"],\n\t\"SR\": [\"H\", \"hB\"],\n\t\"SS\": [\n\t\t\"h\",\n\t\t\"hb\",\n\t\t\"H\",\n\t\t\"hB\"\n\t],\n\t\"ST\": [\"H\", \"hB\"],\n\t\"SV\": [\n\t\t\"h\",\n\t\t\"H\",\n\t\t\"hB\",\n\t\t\"hb\"\n\t],\n\t\"SX\": [\n\t\t\"H\",\n\t\t\"h\",\n\t\t\"hb\",\n\t\t\"hB\"\n\t],\n\t\"SY\": [\n\t\t\"h\",\n\t\t\"hB\",\n\t\t\"hb\",\n\t\t\"H\"\n\t],\n\t\"SZ\": [\n\t\t\"h\",\n\t\t\"hb\",\n\t\t\"H\",\n\t\t\"hB\"\n\t],\n\t\"TA\": [\n\t\t\"H\",\n\t\t\"h\",\n\t\t\"hb\",\n\t\t\"hB\"\n\t],\n\t\"TC\": [\n\t\t\"h\",\n\t\t\"hb\",\n\t\t\"H\",\n\t\t\"hB\"\n\t],\n\t\"TD\": [\n\t\t\"h\",\n\t\t\"H\",\n\t\t\"hB\"\n\t],\n\t\"TF\": [\n\t\t\"H\",\n\t\t\"h\",\n\t\t\"hB\"\n\t],\n\t\"TG\": [\"H\", \"hB\"],\n\t\"TH\": [\"H\", \"h\"],\n\t\"TJ\": [\"H\", \"h\"],\n\t\"TL\": [\n\t\t\"H\",\n\t\t\"hB\",\n\t\t\"hb\",\n\t\t\"h\"\n\t],\n\t\"TM\": [\"H\", \"h\"],\n\t\"TN\": [\n\t\t\"h\",\n\t\t\"hB\",\n\t\t\"hb\",\n\t\t\"H\"\n\t],\n\t\"TO\": [\"h\", \"H\"],\n\t\"TR\": [\"H\", \"hB\"],\n\t\"TT\": [\n\t\t\"h\",\n\t\t\"hb\",\n\t\t\"H\",\n\t\t\"hB\"\n\t],\n\t\"TW\": [\n\t\t\"hB\",\n\t\t\"hb\",\n\t\t\"h\",\n\t\t\"H\"\n\t],\n\t\"TZ\": [\n\t\t\"hB\",\n\t\t\"hb\",\n\t\t\"H\",\n\t\t\"h\"\n\t],\n\t\"UA\": [\n\t\t\"H\",\n\t\t\"hB\",\n\t\t\"h\"\n\t],\n\t\"UG\": [\n\t\t\"hB\",\n\t\t\"hb\",\n\t\t\"H\",\n\t\t\"h\"\n\t],\n\t\"UM\": [\n\t\t\"h\",\n\t\t\"hb\",\n\t\t\"H\",\n\t\t\"hB\"\n\t],\n\t\"US\": [\n\t\t\"h\",\n\t\t\"hb\",\n\t\t\"H\",\n\t\t\"hB\"\n\t],\n\t\"UY\": [\n\t\t\"h\",\n\t\t\"H\",\n\t\t\"hB\",\n\t\t\"hb\"\n\t],\n\t\"UZ\": [\n\t\t\"H\",\n\t\t\"hB\",\n\t\t\"h\"\n\t],\n\t\"VA\": [\n\t\t\"H\",\n\t\t\"h\",\n\t\t\"hB\"\n\t],\n\t\"VC\": [\n\t\t\"h\",\n\t\t\"hb\",\n\t\t\"H\",\n\t\t\"hB\"\n\t],\n\t\"VE\": [\n\t\t\"h\",\n\t\t\"H\",\n\t\t\"hB\",\n\t\t\"hb\"\n\t],\n\t\"VG\": [\n\t\t\"h\",\n\t\t\"hb\",\n\t\t\"H\",\n\t\t\"hB\"\n\t],\n\t\"VI\": [\n\t\t\"h\",\n\t\t\"hb\",\n\t\t\"H\",\n\t\t\"hB\"\n\t],\n\t\"VN\": [\"H\", \"h\"],\n\t\"VU\": [\"h\", \"H\"],\n\t\"WF\": [\"H\", \"hB\"],\n\t\"WS\": [\"h\", \"H\"],\n\t\"XK\": [\n\t\t\"H\",\n\t\t\"hB\",\n\t\t\"h\"\n\t],\n\t\"YE\": [\n\t\t\"h\",\n\t\t\"hB\",\n\t\t\"hb\",\n\t\t\"H\"\n\t],\n\t\"YT\": [\"H\", \"hB\"],\n\t\"ZA\": [\n\t\t\"H\",\n\t\t\"h\",\n\t\t\"hb\",\n\t\t\"hB\"\n\t],\n\t\"ZM\": [\n\t\t\"h\",\n\t\t\"hb\",\n\t\t\"H\",\n\t\t\"hB\"\n\t],\n\t\"ZW\": [\"H\", \"h\"],\n\t\"af-ZA\": [\n\t\t\"H\",\n\t\t\"h\",\n\t\t\"hB\",\n\t\t\"hb\"\n\t],\n\t\"ar-001\": [\n\t\t\"h\",\n\t\t\"hB\",\n\t\t\"hb\",\n\t\t\"H\"\n\t],\n\t\"ca-ES\": [\n\t\t\"H\",\n\t\t\"h\",\n\t\t\"hB\"\n\t],\n\t\"en-001\": [\n\t\t\"h\",\n\t\t\"hb\",\n\t\t\"H\",\n\t\t\"hB\"\n\t],\n\t\"en-HK\": [\n\t\t\"h\",\n\t\t\"hb\",\n\t\t\"H\",\n\t\t\"hB\"\n\t],\n\t\"en-IL\": [\n\t\t\"H\",\n\t\t\"h\",\n\t\t\"hb\",\n\t\t\"hB\"\n\t],\n\t\"en-MY\": [\n\t\t\"h\",\n\t\t\"hb\",\n\t\t\"H\",\n\t\t\"hB\"\n\t],\n\t\"es-BR\": [\n\t\t\"H\",\n\t\t\"h\",\n\t\t\"hB\",\n\t\t\"hb\"\n\t],\n\t\"es-ES\": [\n\t\t\"H\",\n\t\t\"h\",\n\t\t\"hB\",\n\t\t\"hb\"\n\t],\n\t\"es-GQ\": [\n\t\t\"H\",\n\t\t\"h\",\n\t\t\"hB\",\n\t\t\"hb\"\n\t],\n\t\"fr-CA\": [\n\t\t\"H\",\n\t\t\"h\",\n\t\t\"hB\"\n\t],\n\t\"gl-ES\": [\n\t\t\"H\",\n\t\t\"h\",\n\t\t\"hB\"\n\t],\n\t\"gu-IN\": [\n\t\t\"hB\",\n\t\t\"hb\",\n\t\t\"h\",\n\t\t\"H\"\n\t],\n\t\"hi-IN\": [\n\t\t\"hB\",\n\t\t\"h\",\n\t\t\"H\"\n\t],\n\t\"it-CH\": [\n\t\t\"H\",\n\t\t\"h\",\n\t\t\"hB\"\n\t],\n\t\"it-IT\": [\n\t\t\"H\",\n\t\t\"h\",\n\t\t\"hB\"\n\t],\n\t\"kn-IN\": [\n\t\t\"hB\",\n\t\t\"h\",\n\t\t\"H\"\n\t],\n\t\"ku-SY\": [\"H\", \"hB\"],\n\t\"ml-IN\": [\n\t\t\"hB\",\n\t\t\"h\",\n\t\t\"H\"\n\t],\n\t\"mr-IN\": [\n\t\t\"hB\",\n\t\t\"hb\",\n\t\t\"h\",\n\t\t\"H\"\n\t],\n\t\"pa-IN\": [\n\t\t\"hB\",\n\t\t\"hb\",\n\t\t\"h\",\n\t\t\"H\"\n\t],\n\t\"ta-IN\": [\n\t\t\"hB\",\n\t\t\"h\",\n\t\t\"hb\",\n\t\t\"H\"\n\t],\n\t\"te-IN\": [\n\t\t\"hB\",\n\t\t\"h\",\n\t\t\"H\"\n\t],\n\t\"zu-ZA\": [\n\t\t\"H\",\n\t\t\"hB\",\n\t\t\"hb\",\n\t\t\"h\"\n\t]\n};\n//#endregion\n//#region packages/icu-messageformat-parser/date-time-pattern-generator.ts\n/**\n* Returns the best matching date time pattern if a date time skeleton\n* pattern is provided with a locale. Follows the Unicode specification:\n* https://www.unicode.org/reports/tr35/tr35-dates.html#table-mapping-requested-time-skeletons-to-patterns\n* @param skeleton date time skeleton pattern that possibly includes j, J or C\n* @param locale\n*/\nfunction getBestPattern(skeleton, locale) {\n\tlet skeletonCopy = \"\";\n\tfor (let patternPos = 0; patternPos < skeleton.length; patternPos++) {\n\t\tconst patternChar = skeleton.charAt(patternPos);\n\t\tif (patternChar === \"j\") {\n\t\t\tlet extraLength = 0;\n\t\t\twhile (patternPos + 1 < skeleton.length && skeleton.charAt(patternPos + 1) === patternChar) {\n\t\t\t\textraLength++;\n\t\t\t\tpatternPos++;\n\t\t\t}\n\t\t\tlet hourLen = 1 + (extraLength & 1);\n\t\t\tlet dayPeriodLen = extraLength < 2 ? 1 : 3 + (extraLength >> 1);\n\t\t\tlet dayPeriodChar = \"a\";\n\t\t\tlet hourChar = getDefaultHourSymbolFromLocale(locale);\n\t\t\tif (hourChar == \"H\" || hourChar == \"k\") dayPeriodLen = 0;\n\t\t\twhile (dayPeriodLen-- > 0) skeletonCopy += dayPeriodChar;\n\t\t\twhile (hourLen-- > 0) skeletonCopy = hourChar + skeletonCopy;\n\t\t} else if (patternChar === \"J\") skeletonCopy += \"H\";\n\t\telse skeletonCopy += patternChar;\n\t}\n\treturn skeletonCopy;\n}\n/**\n* Maps the [hour cycle type](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/Locale/hourCycle)\n* of the given `locale` to the corresponding time pattern.\n* @param locale\n*/\nfunction getDefaultHourSymbolFromLocale(locale) {\n\tlet hourCycle = locale.hourCycle;\n\tif (hourCycle === void 0 && locale.hourCycles && locale.hourCycles.length) hourCycle = locale.hourCycles[0];\n\tif (hourCycle) switch (hourCycle) {\n\t\tcase \"h24\": return \"k\";\n\t\tcase \"h23\": return \"H\";\n\t\tcase \"h12\": return \"h\";\n\t\tcase \"h11\": return \"K\";\n\t\tdefault: throw new Error(\"Invalid hourCycle\");\n\t}\n\tconst languageTag = locale.language;\n\tlet regionTag;\n\tif (languageTag !== \"root\") regionTag = locale.maximize().region;\n\treturn (timeData[regionTag || \"\"] || timeData[languageTag || \"\"] || timeData[`${languageTag}-001`] || timeData[\"001\"])[0];\n}\n//#endregion\n//#region packages/icu-messageformat-parser/parser.ts\nconst SPACE_SEPARATOR_START_REGEX = new RegExp(`^${SPACE_SEPARATOR_REGEX.source}*`);\nconst SPACE_SEPARATOR_END_REGEX = new RegExp(`${SPACE_SEPARATOR_REGEX.source}*$`);\nfunction createLocation(start, end) {\n\treturn {\n\t\tstart,\n\t\tend\n\t};\n}\nconst hasNativeFromEntries = !!Object.fromEntries;\nconst hasTrimStart = !!String.prototype.trimStart;\nconst hasTrimEnd = !!String.prototype.trimEnd;\nconst fromEntries = hasNativeFromEntries ? Object.fromEntries : function fromEntries(entries) {\n\tconst obj = {};\n\tfor (const [k, v] of entries) obj[k] = v;\n\treturn obj;\n};\nconst trimStart = hasTrimStart ? function trimStart(s) {\n\treturn s.trimStart();\n} : function trimStart(s) {\n\treturn s.replace(SPACE_SEPARATOR_START_REGEX, \"\");\n};\nconst trimEnd = hasTrimEnd ? function trimEnd(s) {\n\treturn s.trimEnd();\n} : function trimEnd(s) {\n\treturn s.replace(SPACE_SEPARATOR_END_REGEX, \"\");\n};\nconst IDENTIFIER_PREFIX_RE = /* @__PURE__ */ new RegExp(\"([^\\\\p{White_Space}\\\\p{Pattern_Syntax}]*)\", \"yu\");\nfunction matchIdentifierAtIndex(s, index) {\n\tIDENTIFIER_PREFIX_RE.lastIndex = index;\n\treturn IDENTIFIER_PREFIX_RE.exec(s)[1] ?? \"\";\n}\nfunction plainTopLevelEndPosition(message) {\n\tif (message.length === 0) return null;\n\tlet line = 1;\n\tlet column = 1;\n\tfor (let offset = 0; offset < message.length;) {\n\t\tconst code = message.charCodeAt(offset);\n\t\tswitch (code) {\n\t\t\tcase 35:\n\t\t\tcase 39:\n\t\t\tcase 60:\n\t\t\tcase 123:\n\t\t\tcase 125: return null;\n\t\t}\n\t\tif (code === 10) {\n\t\t\tline++;\n\t\t\tcolumn = 1;\n\t\t\toffset++;\n\t\t} else {\n\t\t\tcolumn++;\n\t\t\tif (code >= 55296 && code <= 56319 && offset + 1 < message.length) {\n\t\t\t\tconst next = message.charCodeAt(offset + 1);\n\t\t\t\toffset += next >= 56320 && next <= 57343 ? 2 : 1;\n\t\t\t} else offset++;\n\t\t}\n\t}\n\treturn {\n\t\toffset: message.length,\n\t\tline,\n\t\tcolumn\n\t};\n}\nvar Parser = class {\n\tconstructor(message, options = {}) {\n\t\tthis.message = message;\n\t\tthis.position = {\n\t\t\toffset: 0,\n\t\t\tline: 1,\n\t\t\tcolumn: 1\n\t\t};\n\t\tthis.ignoreTag = !!options.ignoreTag;\n\t\tthis.locale = options.locale;\n\t\tthis.requiresOtherClause = !!options.requiresOtherClause;\n\t\tthis.shouldParseSkeletons = !!options.shouldParseSkeletons;\n\t}\n\tparse() {\n\t\tif (this.offset() !== 0) throw Error(\"parser can only be used once\");\n\t\tif (this.message.length > 0) {\n\t\t\tconst firstCode = this.message.charCodeAt(0);\n\t\t\tif (firstCode !== 35 && firstCode !== 39 && firstCode !== 60 && firstCode !== 123 && firstCode !== 125) {\n\t\t\t\tconst plainEndPosition = plainTopLevelEndPosition(this.message);\n\t\t\t\tif (plainEndPosition) {\n\t\t\t\t\tconst start = this.clonePosition();\n\t\t\t\t\tthis.position = plainEndPosition;\n\t\t\t\t\treturn {\n\t\t\t\t\t\tval: [{\n\t\t\t\t\t\t\ttype: 0,\n\t\t\t\t\t\t\tvalue: this.message,\n\t\t\t\t\t\t\tlocation: createLocation(start, this.clonePosition())\n\t\t\t\t\t\t}],\n\t\t\t\t\t\terr: null\n\t\t\t\t\t};\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn this.parseMessage(0, \"\", false);\n\t}\n\tparseMessage(nestingLevel, parentArgType, expectingCloseTag) {\n\t\tlet elements = [];\n\t\twhile (!this.isEOF()) {\n\t\t\tconst char = this.char();\n\t\t\tif (char === 123) {\n\t\t\t\tconst result = this.parseArgument(nestingLevel, expectingCloseTag);\n\t\t\t\tif (result.err) return result;\n\t\t\t\telements.push(result.val);\n\t\t\t} else if (char === 125 && nestingLevel > 0) break;\n\t\t\telse if (char === 35 && (parentArgType === \"plural\" || parentArgType === \"selectordinal\")) {\n\t\t\t\tconst position = this.clonePosition();\n\t\t\t\tthis.bump();\n\t\t\t\telements.push({\n\t\t\t\t\ttype: 7,\n\t\t\t\t\tlocation: createLocation(position, this.clonePosition())\n\t\t\t\t});\n\t\t\t} else if (char === 60 && !this.ignoreTag && this.peek() === 47) if (expectingCloseTag) break;\n\t\t\telse return this.error(26, createLocation(this.clonePosition(), this.clonePosition()));\n\t\t\telse if (char === 60 && !this.ignoreTag && _isAlpha(this.peek() || 0)) {\n\t\t\t\tconst result = this.parseTag(nestingLevel, parentArgType);\n\t\t\t\tif (result.err) return result;\n\t\t\t\telements.push(result.val);\n\t\t\t} else {\n\t\t\t\tconst result = this.parseLiteral(nestingLevel, parentArgType);\n\t\t\t\tif (result.err) return result;\n\t\t\t\telements.push(result.val);\n\t\t\t}\n\t\t}\n\t\treturn {\n\t\t\tval: elements,\n\t\t\terr: null\n\t\t};\n\t}\n\t/**\n\t* A tag name must start with an ASCII lower/upper case letter. The grammar is based on the\n\t* [custom element name][] except that a dash is NOT always mandatory and uppercase letters\n\t* are accepted:\n\t*\n\t* ```\n\t* tag ::= \"<\" tagName (whitespace)* \"/>\" | \"<\" tagName (whitespace)* \">\" message \"</\" tagName (whitespace)* \">\"\n\t* tagName ::= [a-z] (PENChar)*\n\t* PENChar ::=\n\t* \"-\" | \".\" | [0-9] | \"_\" | [a-z] | [A-Z] | #xB7 | [#xC0-#xD6] | [#xD8-#xF6] | [#xF8-#x37D] |\n\t* [#x37F-#x1FFF] | [#x200C-#x200D] | [#x203F-#x2040] | [#x2070-#x218F] | [#x2C00-#x2FEF] |\n\t* [#x3001-#xD7FF] | [#xF900-#xFDCF] | [#xFDF0-#xFFFD] | [#x10000-#xEFFFF]\n\t* ```\n\t*\n\t* [custom element name]: https://html.spec.whatwg.org/multipage/custom-elements.html#valid-custom-element-name\n\t* NOTE: We're a bit more lax here since HTML technically does not allow uppercase HTML element but we do\n\t* since other tag-based engines like React allow it\n\t*/\n\tparseTag(nestingLevel, parentArgType) {\n\t\tconst startPosition = this.clonePosition();\n\t\tthis.bump();\n\t\tconst tagName = this.parseTagName();\n\t\tthis.bumpSpace();\n\t\tif (this.bumpIf(\"/>\")) return {\n\t\t\tval: {\n\t\t\t\ttype: 0,\n\t\t\t\tvalue: `<${tagName}/>`,\n\t\t\t\tlocation: createLocation(startPosition, this.clonePosition())\n\t\t\t},\n\t\t\terr: null\n\t\t};\n\t\telse if (this.bumpIf(\">\")) {\n\t\t\tconst childrenResult = this.parseMessage(nestingLevel + 1, parentArgType, true);\n\t\t\tif (childrenResult.err) return childrenResult;\n\t\t\tconst children = childrenResult.val;\n\t\t\tconst endTagStartPosition = this.clonePosition();\n\t\t\tif (this.bumpIf(\"</\")) {\n\t\t\t\tif (this.isEOF() || !_isAlpha(this.char())) return this.error(23, createLocation(endTagStartPosition, this.clonePosition()));\n\t\t\t\tconst closingTagNameStartPosition = this.clonePosition();\n\t\t\t\tif (tagName !== this.parseTagName()) return this.error(26, createLocation(closingTagNameStartPosition, this.clonePosition()));\n\t\t\t\tthis.bumpSpace();\n\t\t\t\tif (!this.bumpIf(\">\")) return this.error(23, createLocation(endTagStartPosition, this.clonePosition()));\n\t\t\t\treturn {\n\t\t\t\t\tval: {\n\t\t\t\t\t\ttype: 8,\n\t\t\t\t\t\tvalue: tagName,\n\t\t\t\t\t\tchildren,\n\t\t\t\t\t\tlocation: createLocation(startPosition, this.clonePosition())\n\t\t\t\t\t},\n\t\t\t\t\terr: null\n\t\t\t\t};\n\t\t\t} else return this.error(27, createLocation(startPosition, this.clonePosition()));\n\t\t} else return this.error(23, createLocation(startPosition, this.clonePosition()));\n\t}\n\t/**\n\t* This method assumes that the caller has peeked ahead for the first tag character.\n\t*/\n\tparseTagName() {\n\t\tconst startOffset = this.offset();\n\t\tthis.bump();\n\t\twhile (!this.isEOF() && _isPotentialElementNameChar(this.char())) this.bump();\n\t\treturn this.message.slice(startOffset, this.offset());\n\t}\n\tparseLiteral(nestingLevel, parentArgType) {\n\t\tconst start = this.clonePosition();\n\t\tlet value = \"\";\n\t\twhile (true) {\n\t\t\tconst parseQuoteResult = this.tryParseQuote(parentArgType);\n\t\t\tif (parseQuoteResult) {\n\t\t\t\tvalue += parseQuoteResult;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tconst parseUnquotedResult = this.tryParseUnquoted(nestingLevel, parentArgType);\n\t\t\tif (parseUnquotedResult) {\n\t\t\t\tvalue += parseUnquotedResult;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tconst parseLeftAngleResult = this.tryParseLeftAngleBracket();\n\t\t\tif (parseLeftAngleResult) {\n\t\t\t\tvalue += parseLeftAngleResult;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tbreak;\n\t\t}\n\t\tconst location = createLocation(start, this.clonePosition());\n\t\treturn {\n\t\t\tval: {\n\t\t\t\ttype: 0,\n\t\t\t\tvalue,\n\t\t\t\tlocation\n\t\t\t},\n\t\t\terr: null\n\t\t};\n\t}\n\ttryParseLeftAngleBracket() {\n\t\tif (!this.isEOF() && this.char() === 60 && (this.ignoreTag || !_isAlphaOrSlash(this.peek() || 0))) {\n\t\t\tthis.bump();\n\t\t\treturn \"<\";\n\t\t}\n\t\treturn null;\n\t}\n\t/**\n\t* Starting with ICU 4.8, an ASCII apostrophe only starts quoted text if it immediately precedes\n\t* a character that requires quoting (that is, \"only where needed\"), and works the same in\n\t* nested messages as on the top level of the pattern. The new behavior is otherwise compatible.\n\t*/\n\ttryParseQuote(parentArgType) {\n\t\tif (this.isEOF() || this.char() !== 39) return null;\n\t\tswitch (this.peek()) {\n\t\t\tcase 39:\n\t\t\t\tthis.bump();\n\t\t\t\tthis.bump();\n\t\t\t\treturn \"'\";\n\t\t\tcase 123:\n\t\t\tcase 60:\n\t\t\tcase 62:\n\t\t\tcase 125: break;\n\t\t\tcase 35:\n\t\t\t\tif (parentArgType === \"plural\" || parentArgType === \"selectordinal\") break;\n\t\t\t\treturn null;\n\t\t\tdefault: return null;\n\t\t}\n\t\tthis.bump();\n\t\tconst codePoints = [this.char()];\n\t\tthis.bump();\n\t\twhile (!this.isEOF()) {\n\t\t\tconst ch = this.char();\n\t\t\tif (ch === 39) if (this.peek() === 39) {\n\t\t\t\tcodePoints.push(39);\n\t\t\t\tthis.bump();\n\t\t\t} else {\n\t\t\t\tthis.bump();\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\telse codePoints.push(ch);\n\t\t\tthis.bump();\n\t\t}\n\t\treturn String.fromCodePoint(...codePoints);\n\t}\n\ttryParseUnquoted(nestingLevel, parentArgType) {\n\t\tif (this.isEOF()) return null;\n\t\tconst ch = this.char();\n\t\tif (ch === 60 || ch === 123 || ch === 35 && (parentArgType === \"plural\" || parentArgType === \"selectordinal\") || ch === 125 && nestingLevel > 0) return null;\n\t\telse {\n\t\t\tthis.bump();\n\t\t\treturn String.fromCodePoint(ch);\n\t\t}\n\t}\n\tparseArgument(nestingLevel, expectingCloseTag) {\n\t\tconst openingBracePosition = this.clonePosition();\n\t\tthis.bump();\n\t\tthis.bumpSpace();\n\t\tif (this.isEOF()) return this.error(1, createLocation(openingBracePosition, this.clonePosition()));\n\t\tif (this.char() === 125) {\n\t\t\tthis.bump();\n\t\t\treturn this.error(2, createLocation(openingBracePosition, this.clonePosition()));\n\t\t}\n\t\tlet value = this.parseIdentifierIfPossible().value;\n\t\tif (!value) return this.error(3, createLocation(openingBracePosition, this.clonePosition()));\n\t\tthis.bumpSpace();\n\t\tif (this.isEOF()) return this.error(1, createLocation(openingBracePosition, this.clonePosition()));\n\t\tswitch (this.char()) {\n\t\t\tcase 125:\n\t\t\t\tthis.bump();\n\t\t\t\treturn {\n\t\t\t\t\tval: {\n\t\t\t\t\t\ttype: 1,\n\t\t\t\t\t\tvalue,\n\t\t\t\t\t\tlocation: createLocation(openingBracePosition, this.clonePosition())\n\t\t\t\t\t},\n\t\t\t\t\terr: null\n\t\t\t\t};\n\t\t\tcase 44:\n\t\t\t\tthis.bump();\n\t\t\t\tthis.bumpSpace();\n\t\t\t\tif (this.isEOF()) return this.error(1, createLocation(openingBracePosition, this.clonePosition()));\n\t\t\t\treturn this.parseArgumentOptions(nestingLevel, expectingCloseTag, value, openingBracePosition);\n\t\t\tdefault: return this.error(3, createLocation(openingBracePosition, this.clonePosition()));\n\t\t}\n\t}\n\t/**\n\t* Advance the parser until the end of the identifier, if it is currently on\n\t* an identifier character. Return an empty string otherwise.\n\t*/\n\tparseIdentifierIfPossible() {\n\t\tconst startingPosition = this.clonePosition();\n\t\tconst startOffset = this.offset();\n\t\tconst value = matchIdentifierAtIndex(this.message, startOffset);\n\t\tconst endOffset = startOffset + value.length;\n\t\tthis.bumpTo(endOffset);\n\t\treturn {\n\t\t\tvalue,\n\t\t\tlocation: createLocation(startingPosition, this.clonePosition())\n\t\t};\n\t}\n\tparseArgumentOptions(nestingLevel, expectingCloseTag, value, openingBracePosition) {\n\t\tlet typeStartPosition = this.clonePosition();\n\t\tlet argType = this.parseIdentifierIfPossible().value;\n\t\tlet typeEndPosition = this.clonePosition();\n\t\tswitch (argType) {\n\t\t\tcase \"\": return this.error(4, createLocation(typeStartPosition, typeEndPosition));\n\t\t\tcase \"number\":\n\t\t\tcase \"date\":\n\t\t\tcase \"time\": {\n\t\t\t\tthis.bumpSpace();\n\t\t\t\tlet styleAndLocation = null;\n\t\t\t\tif (this.bumpIf(\",\")) {\n\t\t\t\t\tthis.bumpSpace();\n\t\t\t\t\tconst styleStartPosition = this.clonePosition();\n\t\t\t\t\tconst result = this.parseSimpleArgStyleIfPossible();\n\t\t\t\t\tif (result.err) return result;\n\t\t\t\t\tconst style = trimEnd(result.val);\n\t\t\t\t\tif (style.length === 0) return this.error(6, createLocation(this.clonePosition(), this.clonePosition()));\n\t\t\t\t\tstyleAndLocation = {\n\t\t\t\t\t\tstyle,\n\t\t\t\t\t\tstyleLocation: createLocation(styleStartPosition, this.clonePosition())\n\t\t\t\t\t};\n\t\t\t\t}\n\t\t\t\tconst argCloseResult = this.tryParseArgumentClose(openingBracePosition);\n\t\t\t\tif (argCloseResult.err) return argCloseResult;\n\t\t\t\tconst location = createLocation(openingBracePosition, this.clonePosition());\n\t\t\t\tif (styleAndLocation && styleAndLocation.style.startsWith(\"::\")) {\n\t\t\t\t\tlet skeleton = trimStart(styleAndLocation.style.slice(2));\n\t\t\t\t\tif (argType === \"number\") {\n\t\t\t\t\t\tconst result = this.parseNumberSkeletonFromString(skeleton, styleAndLocation.styleLocation);\n\t\t\t\t\t\tif (result.err) return result;\n\t\t\t\t\t\treturn {\n\t\t\t\t\t\t\tval: {\n\t\t\t\t\t\t\t\ttype: 2,\n\t\t\t\t\t\t\t\tvalue,\n\t\t\t\t\t\t\t\tlocation,\n\t\t\t\t\t\t\t\tstyle: result.val\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\terr: null\n\t\t\t\t\t\t};\n\t\t\t\t\t} else {\n\t\t\t\t\t\tif (skeleton.length === 0) return this.error(10, location);\n\t\t\t\t\t\tlet dateTimePattern = skeleton;\n\t\t\t\t\t\tif (this.locale) dateTimePattern = getBestPattern(skeleton, this.locale);\n\t\t\t\t\t\tconst style = {\n\t\t\t\t\t\t\ttype: 1,\n\t\t\t\t\t\t\tpattern: dateTimePattern,\n\t\t\t\t\t\t\tlocation: styleAndLocation.styleLocation,\n\t\t\t\t\t\t\tparsedOptions: this.shouldParseSkeletons ? parseDateTimeSkeleton(dateTimePattern) : {}\n\t\t\t\t\t\t};\n\t\t\t\t\t\treturn {\n\t\t\t\t\t\t\tval: {\n\t\t\t\t\t\t\t\ttype: argType === \"date\" ? 3 : 4,\n\t\t\t\t\t\t\t\tvalue,\n\t\t\t\t\t\t\t\tlocation,\n\t\t\t\t\t\t\t\tstyle\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\terr: null\n\t\t\t\t\t\t};\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn {\n\t\t\t\t\tval: {\n\t\t\t\t\t\ttype: argType === \"number\" ? 2 : argType === \"date\" ? 3 : 4,\n\t\t\t\t\t\tvalue,\n\t\t\t\t\t\tlocation,\n\t\t\t\t\t\tstyle: styleAndLocation?.style ?? null\n\t\t\t\t\t},\n\t\t\t\t\terr: null\n\t\t\t\t};\n\t\t\t}\n\t\t\tcase \"plural\":\n\t\t\tcase \"selectordinal\":\n\t\t\tcase \"select\": {\n\t\t\t\tconst typeEndPosition = this.clonePosition();\n\t\t\t\tthis.bumpSpace();\n\t\t\t\tif (!this.bumpIf(\",\")) return this.error(12, createLocation(typeEndPosition, { ...typeEndPosition }));\n\t\t\t\tthis.bumpSpace();\n\t\t\t\tlet identifierAndLocation = this.parseIdentifierIfPossible();\n\t\t\t\tlet pluralOffset = 0;\n\t\t\t\tif (argType !== \"select\" && identifierAndLocation.value === \"offset\") {\n\t\t\t\t\tif (!this.bumpIf(\":\")) return this.error(13, createLocation(this.clonePosition(), this.clonePosition()));\n\t\t\t\t\tthis.bumpSpace();\n\t\t\t\t\tconst result = this.tryParseDecimalInteger(13, 14);\n\t\t\t\t\tif (result.err) return result;\n\t\t\t\t\tthis.bumpSpace();\n\t\t\t\t\tidentifierAndLocation = this.parseIdentifierIfPossible();\n\t\t\t\t\tpluralOffset = result.val;\n\t\t\t\t}\n\t\t\t\tconst optionsResult = this.tryParsePluralOrSelectOptions(nestingLevel, argType, expectingCloseTag, identifierAndLocation);\n\t\t\t\tif (optionsResult.err) return optionsResult;\n\t\t\t\tconst argCloseResult = this.tryParseArgumentClose(openingBracePosition);\n\t\t\t\tif (argCloseResult.err) return argCloseResult;\n\t\t\t\tconst location = createLocation(openingBracePosition, this.clonePosition());\n\t\t\t\tif (argType === \"select\") return {\n\t\t\t\t\tval: {\n\t\t\t\t\t\ttype: 5,\n\t\t\t\t\t\tvalue,\n\t\t\t\t\t\toptions: fromEntries(optionsResult.val),\n\t\t\t\t\t\tlocation\n\t\t\t\t\t},\n\t\t\t\t\terr: null\n\t\t\t\t};\n\t\t\t\telse return {\n\t\t\t\t\tval: {\n\t\t\t\t\t\ttype: 6,\n\t\t\t\t\t\tvalue,\n\t\t\t\t\t\toptions: fromEntries(optionsResult.val),\n\t\t\t\t\t\toffset: pluralOffset,\n\t\t\t\t\t\tpluralType: argType === \"plural\" ? \"cardinal\" : \"ordinal\",\n\t\t\t\t\t\tlocation\n\t\t\t\t\t},\n\t\t\t\t\terr: null\n\t\t\t\t};\n\t\t\t}\n\t\t\tdefault: return this.error(5, createLocation(typeStartPosition, typeEndPosition));\n\t\t}\n\t}\n\ttryParseArgumentClose(openingBracePosition) {\n\t\tif (this.isEOF() || this.char() !== 125) return this.error(1, createLocation(openingBracePosition, this.clonePosition()));\n\t\tthis.bump();\n\t\treturn {\n\t\t\tval: true,\n\t\t\terr: null\n\t\t};\n\t}\n\t/**\n\t* See: https://github.com/unicode-org/icu/blob/af7ed1f6d2298013dc303628438ec4abe1f16479/icu4c/source/common/messagepattern.cpp#L659\n\t*/\n\tparseSimpleArgStyleIfPossible() {\n\t\tlet nestedBraces = 0;\n\t\tconst startPosition = this.clonePosition();\n\t\twhile (!this.isEOF()) switch (this.char()) {\n\t\t\tcase 39: {\n\t\t\t\tthis.bump();\n\t\t\t\tlet apostrophePosition = this.clonePosition();\n\t\t\t\tif (!this.bumpUntil(\"'\")) return this.error(11, createLocation(apostrophePosition, this.clonePosition()));\n\t\t\t\tthis.bump();\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase 123:\n\t\t\t\tnestedBraces += 1;\n\t\t\t\tthis.bump();\n\t\t\t\tbreak;\n\t\t\tcase 125:\n\t\t\t\tif (nestedBraces > 0) nestedBraces -= 1;\n\t\t\t\telse return {\n\t\t\t\t\tval: this.message.slice(startPosition.offset, this.offset()),\n\t\t\t\t\terr: null\n\t\t\t\t};\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tthis.bump();\n\t\t\t\tbreak;\n\t\t}\n\t\treturn {\n\t\t\tval: this.message.slice(startPosition.offset, this.offset()),\n\t\t\terr: null\n\t\t};\n\t}\n\tparseNumberSkeletonFromString(skeleton, location) {\n\t\tlet tokens = [];\n\t\ttry {\n\t\t\ttokens = parseNumberSkeletonFromString(skeleton);\n\t\t} catch {\n\t\t\treturn this.error(7, location);\n\t\t}\n\t\treturn {\n\t\t\tval: {\n\t\t\t\ttype: 0,\n\t\t\t\ttokens,\n\t\t\t\tlocation,\n\t\t\t\tparsedOptions: this.shouldParseSkeletons ? parseNumberSkeleton(tokens) : {}\n\t\t\t},\n\t\t\terr: null\n\t\t};\n\t}\n\t/**\n\t* @param nesting_level The current nesting level of messages.\n\t* This can be positive when parsing message fragment in select or plural argument options.\n\t* @param parent_arg_type The parent argument's type.\n\t* @param parsed_first_identifier If provided, this is the first identifier-like selector of\n\t* the argument. It is a by-product of a previous parsing attempt.\n\t* @param expecting_close_tag If true, this message is directly or indirectly nested inside\n\t* between a pair of opening and closing tags. The nested message will not parse beyond\n\t* the closing tag boundary.\n\t*/\n\ttryParsePluralOrSelectOptions(nestingLevel, parentArgType, expectCloseTag, parsedFirstIdentifier) {\n\t\tlet hasOtherClause = false;\n\t\tconst options = [];\n\t\tconst parsedSelectors = /* @__PURE__ */ new Set();\n\t\tlet { value: selector, location: selectorLocation } = parsedFirstIdentifier;\n\t\twhile (true) {\n\t\t\tif (selector.length === 0) {\n\t\t\t\tconst startPosition = this.clonePosition();\n\t\t\t\tif (parentArgType !== \"select\" && this.bumpIf(\"=\")) {\n\t\t\t\t\tconst result = this.tryParseDecimalInteger(16, 19);\n\t\t\t\t\tif (result.err) return result;\n\t\t\t\t\tselectorLocation = createLocation(startPosition, this.clonePosition());\n\t\t\t\t\tselector = this.message.slice(startPosition.offset, this.offset());\n\t\t\t\t} else break;\n\t\t\t}\n\t\t\tif (parsedSelectors.has(selector)) return this.error(parentArgType === \"select\" ? 21 : 20, selectorLocation);\n\t\t\tif (selector === \"other\") hasOtherClause = true;\n\t\t\tthis.bumpSpace();\n\t\t\tconst openingBracePosition = this.clonePosition();\n\t\t\tif (!this.bumpIf(\"{\")) return this.error(parentArgType === \"select\" ? 17 : 18, createLocation(this.clonePosition(), this.clonePosition()));\n\t\t\tconst fragmentResult = this.parseMessage(nestingLevel + 1, parentArgType, expectCloseTag);\n\t\t\tif (fragmentResult.err) return fragmentResult;\n\t\t\tconst argCloseResult = this.tryParseArgumentClose(openingBracePosition);\n\t\t\tif (argCloseResult.err) return argCloseResult;\n\t\t\toptions.push([selector, {\n\t\t\t\tvalue: fragmentResult.val,\n\t\t\t\tlocation: createLocation(openingBracePosition, this.clonePosition())\n\t\t\t}]);\n\t\t\tparsedSelectors.add(selector);\n\t\t\tthis.bumpSpace();\n\t\t\t({value: selector, location: selectorLocation} = this.parseIdentifierIfPossible());\n\t\t}\n\t\tif (options.length === 0) return this.error(parentArgType === \"select\" ? 15 : 16, createLocation(this.clonePosition(), this.clonePosition()));\n\t\tif (this.requiresOtherClause && !hasOtherClause) return this.error(22, createLocation(this.clonePosition(), this.clonePosition()));\n\t\treturn {\n\t\t\tval: options,\n\t\t\terr: null\n\t\t};\n\t}\n\ttryParseDecimalInteger(expectNumberError, invalidNumberError) {\n\t\tlet sign = 1;\n\t\tconst startingPosition = this.clonePosition();\n\t\tif (this.bumpIf(\"+\")) {} else if (this.bumpIf(\"-\")) sign = -1;\n\t\tlet hasDigits = false;\n\t\tlet decimal = 0;\n\t\twhile (!this.isEOF()) {\n\t\t\tconst ch = this.char();\n\t\t\tif (ch >= 48 && ch <= 57) {\n\t\t\t\thasDigits = true;\n\t\t\t\tdecimal = decimal * 10 + (ch - 48);\n\t\t\t\tthis.bump();\n\t\t\t} else break;\n\t\t}\n\t\tconst location = createLocation(startingPosition, this.clonePosition());\n\t\tif (!hasDigits) return this.error(expectNumberError, location);\n\t\tdecimal *= sign;\n\t\tif (!Number.isSafeInteger(decimal)) return this.error(invalidNumberError, location);\n\t\treturn {\n\t\t\tval: decimal,\n\t\t\terr: null\n\t\t};\n\t}\n\toffset() {\n\t\treturn this.position.offset;\n\t}\n\tisEOF() {\n\t\treturn this.offset() === this.message.length;\n\t}\n\tclonePosition() {\n\t\treturn {\n\t\t\toffset: this.position.offset,\n\t\t\tline: this.position.line,\n\t\t\tcolumn: this.position.column\n\t\t};\n\t}\n\t/**\n\t* Return the code point at the current position of the parser.\n\t* Throws if the index is out of bound.\n\t*/\n\tchar() {\n\t\tconst offset = this.position.offset;\n\t\tif (offset >= this.message.length) throw Error(\"out of bound\");\n\t\tconst code = this.message.codePointAt(offset);\n\t\tif (code === void 0) throw Error(`Offset ${offset} is at invalid UTF-16 code unit boundary`);\n\t\treturn code;\n\t}\n\terror(kind, location) {\n\t\treturn {\n\t\t\tval: null,\n\t\t\terr: {\n\t\t\t\tkind,\n\t\t\t\tmessage: this.message,\n\t\t\t\tlocation\n\t\t\t}\n\t\t};\n\t}\n\t/** Bump the parser to the next UTF-16 code unit. */\n\tbump() {\n\t\tif (this.isEOF()) return;\n\t\tconst code = this.char();\n\t\tif (code === 10) {\n\t\t\tthis.position.line += 1;\n\t\t\tthis.position.column = 1;\n\t\t\tthis.position.offset += 1;\n\t\t} else {\n\t\t\tthis.position.column += 1;\n\t\t\tthis.position.offset += code < 65536 ? 1 : 2;\n\t\t}\n\t}\n\t/**\n\t* If the substring starting at the current position of the parser has\n\t* the given prefix, then bump the parser to the character immediately\n\t* following the prefix and return true. Otherwise, don't bump the parser\n\t* and return false.\n\t*/\n\tbumpIf(prefix) {\n\t\tif (this.message.startsWith(prefix, this.offset())) {\n\t\t\tfor (let i = 0; i < prefix.length; i++) this.bump();\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}\n\t/**\n\t* Bump the parser until the pattern character is found and return `true`.\n\t* Otherwise bump to the end of the file and return `false`.\n\t*/\n\tbumpUntil(pattern) {\n\t\tconst currentOffset = this.offset();\n\t\tconst index = this.message.indexOf(pattern, currentOffset);\n\t\tif (index >= 0) {\n\t\t\tthis.bumpTo(index);\n\t\t\treturn true;\n\t\t} else {\n\t\t\tthis.bumpTo(this.message.length);\n\t\t\treturn false;\n\t\t}\n\t}\n\t/**\n\t* Bump the parser to the target offset.\n\t* If target offset is beyond the end of the input, bump the parser to the end of the input.\n\t*/\n\tbumpTo(targetOffset) {\n\t\tif (this.offset() > targetOffset) throw Error(`targetOffset ${targetOffset} must be greater than or equal to the current offset ${this.offset()}`);\n\t\ttargetOffset = Math.min(targetOffset, this.message.length);\n\t\twhile (true) {\n\t\t\tconst offset = this.offset();\n\t\t\tif (offset === targetOffset) break;\n\t\t\tif (offset > targetOffset) throw Error(`targetOffset ${targetOffset} is at invalid UTF-16 code unit boundary`);\n\t\t\tthis.bump();\n\t\t\tif (this.isEOF()) break;\n\t\t}\n\t}\n\t/** advance the parser through all whitespace to the next non-whitespace code unit. */\n\tbumpSpace() {\n\t\twhile (!this.isEOF() && _isWhiteSpace(this.char())) this.bump();\n\t}\n\t/**\n\t* Peek at the *next* Unicode codepoint in the input without advancing the parser.\n\t* If the input has been exhausted, then this returns null.\n\t*/\n\tpeek() {\n\t\tif (this.isEOF()) return null;\n\t\tconst code = this.char();\n\t\tconst offset = this.offset();\n\t\treturn this.message.charCodeAt(offset + (code >= 65536 ? 2 : 1)) ?? null;\n\t}\n};\n/**\n* This check if codepoint is alphabet (lower & uppercase)\n* @param codepoint\n* @returns\n*/\nfunction _isAlpha(codepoint) {\n\treturn codepoint >= 97 && codepoint <= 122 || codepoint >= 65 && codepoint <= 90;\n}\nfunction _isAlphaOrSlash(codepoint) {\n\treturn _isAlpha(codepoint) || codepoint === 47;\n}\n/** See `parseTag` function docs. */\nfunction _isPotentialElementNameChar(c) {\n\treturn c === 45 || c === 46 || c >= 48 && c <= 57 || c === 95 || c >= 97 && c <= 122 || c >= 65 && c <= 90 || c == 183 || c >= 192 && c <= 214 || c >= 216 && c <= 246 || c >= 248 && c <= 893 || c >= 895 && c <= 8191 || c >= 8204 && c <= 8205 || c >= 8255 && c <= 8256 || c >= 8304 && c <= 8591 || c >= 11264 && c <= 12271 || c >= 12289 && c <= 55295 || c >= 63744 && c <= 64975 || c >= 65008 && c <= 65533 || c >= 65536 && c <= 983039;\n}\n/**\n* Code point equivalent of regex `\\p{White_Space}`.\n* From: https://www.unicode.org/Public/UCD/latest/ucd/PropList.txt\n*/\nfunction _isWhiteSpace(c) {\n\treturn c >= 9 && c <= 13 || c === 32 || c === 133 || c >= 8206 && c <= 8207 || c === 8232 || c === 8233;\n}\n//#endregion\n//#region packages/icu-messageformat-parser/manipulator.ts\n/**\n* Collect all variables in an AST to Record<string, TYPE>\n* @param ast AST to collect variables from\n* @param vars Record of variable name to variable type\n*/\nfunction collectVariables(ast, vars = /* @__PURE__ */ new Map()) {\n\tast.forEach((el) => {\n\t\tif (isArgumentElement(el) || isDateElement(el) || isTimeElement(el) || isNumberElement(el)) if (vars.has(el.value)) {\n\t\t\tconst existingType = vars.get(el.value);\n\t\t\tif (existingType !== el.type && existingType !== 6 && existingType !== 5) throw new Error(`Variable ${el.value} has conflicting types`);\n\t\t} else vars.set(el.value, el.type);\n\t\tif (isPluralElement(el) || isSelectElement(el)) {\n\t\t\tvars.set(el.value, el.type);\n\t\t\tObject.keys(el.options).forEach((k) => {\n\t\t\t\tcollectVariables(el.options[k].value, vars);\n\t\t\t});\n\t\t}\n\t\tif (isTagElement(el)) {\n\t\t\tvars.set(el.value, el.type);\n\t\t\tcollectVariables(el.children, vars);\n\t\t}\n\t});\n}\n/**\n* Check if 2 ASTs are structurally the same. This primarily means that\n* they have the same variables with the same type\n* @param a\n* @param b\n* @returns\n*/\nfunction isStructurallySame(a, b) {\n\tconst aVars = /* @__PURE__ */ new Map();\n\tconst bVars = /* @__PURE__ */ new Map();\n\tcollectVariables(a, aVars);\n\tcollectVariables(b, bVars);\n\tif (aVars.size !== bVars.size) return {\n\t\tsuccess: false,\n\t\terror: /* @__PURE__ */ new Error(`Different number of variables: [${Array.from(aVars.keys()).join(\", \")}] vs [${Array.from(bVars.keys()).join(\", \")}]`)\n\t};\n\treturn Array.from(aVars.entries()).reduce((result, [key, type]) => {\n\t\tif (!result.success) return result;\n\t\tconst bType = bVars.get(key);\n\t\tif (bType == null) return {\n\t\t\tsuccess: false,\n\t\t\terror: /* @__PURE__ */ new Error(`Missing variable ${key} in message`)\n\t\t};\n\t\tif (bType !== type) return {\n\t\t\tsuccess: false,\n\t\t\terror: /* @__PURE__ */ new Error(`Variable ${key} has conflicting types: ${TYPE[type]} vs ${TYPE[bType]}`)\n\t\t};\n\t\treturn result;\n\t}, { success: true });\n}\n//#endregion\n//#region packages/icu-messageformat-parser/index.ts\nfunction pruneLocation(els) {\n\tels.forEach((el) => {\n\t\tdelete el.location;\n\t\tif (isSelectElement(el) || isPluralElement(el)) for (const k in el.options) {\n\t\t\tdelete el.options[k].location;\n\t\t\tpruneLocation(el.options[k].value);\n\t\t}\n\t\telse if (isNumberElement(el) && isNumberSkeleton(el.style)) delete el.style.location;\n\t\telse if ((isDateElement(el) || isTimeElement(el)) && isDateTimeSkeleton(el.style)) delete el.style.location;\n\t\telse if (isTagElement(el)) pruneLocation(el.children);\n\t});\n}\nfunction parse(message, opts = {}) {\n\topts = {\n\t\tshouldParseSkeletons: true,\n\t\trequiresOtherClause: true,\n\t\t...opts\n\t};\n\tconst result = new Parser(message, opts).parse();\n\tif (result.err) {\n\t\tconst error = SyntaxError(ErrorKind[result.err.kind]);\n\t\terror.location = result.err.location;\n\t\terror.originalMessage = result.err.message;\n\t\tthrow error;\n\t}\n\tif (!opts?.captureLocation) pruneLocation(result.val);\n\treturn result.val;\n}\nconst _Parser = Parser;\n//#endregion\nexport { SKELETON_TYPE, TYPE, _Parser, createLiteralElement, createNumberElement, isArgumentElement, isDateElement, isDateTimeSkeleton, isLiteralElement, isNumberElement, isNumberSkeleton, isPluralElement, isPoundElement, isSelectElement, isStructurallySame, isTagElement, isTimeElement, parse };\n\n//# sourceMappingURL=index.js.map","import { memoize, strategies } from \"@formatjs/fast-memoize\";\nimport { isArgumentElement, isDateElement, isDateTimeSkeleton, isLiteralElement, isNumberElement, isNumberSkeleton, isPluralElement, isPoundElement, isSelectElement, isTagElement, isTimeElement, parse } from \"@formatjs/icu-messageformat-parser\";\n//#region packages/intl-messageformat/error.ts\nlet ErrorCode = /* @__PURE__ */ function(ErrorCode) {\n\tErrorCode[\"MISSING_VALUE\"] = \"MISSING_VALUE\";\n\tErrorCode[\"INVALID_VALUE\"] = \"INVALID_VALUE\";\n\tErrorCode[\"MISSING_INTL_API\"] = \"MISSING_INTL_API\";\n\treturn ErrorCode;\n}({});\nvar FormatError = class extends Error {\n\tconstructor(msg, code, originalMessage) {\n\t\tsuper(msg);\n\t\tthis.code = code;\n\t\tthis.originalMessage = originalMessage;\n\t}\n\ttoString() {\n\t\treturn `[formatjs Error: ${this.code}] ${this.message}`;\n\t}\n};\nvar InvalidValueError = class extends FormatError {\n\tconstructor(variableId, value, options, originalMessage) {\n\t\tsuper(`Invalid values for \"${variableId}\": \"${value}\". Options are \"${Object.keys(options).join(\"\\\", \\\"\")}\"`, \"INVALID_VALUE\", originalMessage);\n\t}\n};\nvar InvalidValueTypeError = class extends FormatError {\n\tconstructor(value, type, originalMessage) {\n\t\tsuper(`Value for \"${value}\" must be of type ${type}`, \"INVALID_VALUE\", originalMessage);\n\t}\n};\nvar MissingValueError = class extends FormatError {\n\tconstructor(variableId, originalMessage) {\n\t\tsuper(`The intl string context variable \"${variableId}\" was not provided to the string \"${originalMessage}\"`, \"MISSING_VALUE\", originalMessage);\n\t}\n};\n//#endregion\n//#region packages/intl-messageformat/formatters.ts\nlet PART_TYPE = /* @__PURE__ */ function(PART_TYPE) {\n\tPART_TYPE[PART_TYPE[\"literal\"] = 0] = \"literal\";\n\tPART_TYPE[PART_TYPE[\"object\"] = 1] = \"object\";\n\treturn PART_TYPE;\n}({});\nfunction mergeLiteral(parts) {\n\tif (parts.length < 2) return parts;\n\treturn parts.reduce((all, part) => {\n\t\tconst lastPart = all[all.length - 1];\n\t\tif (!lastPart || lastPart.type !== 0 || part.type !== 0) all.push(part);\n\t\telse lastPart.value += part.value;\n\t\treturn all;\n\t}, []);\n}\nfunction isFormatXMLElementFn(el) {\n\treturn typeof el === \"function\";\n}\nfunction formatToParts(els, locales, formatters, formats, values, currentPluralValue, originalMessage) {\n\tif (els.length === 1 && isLiteralElement(els[0])) return [{\n\t\ttype: 0,\n\t\tvalue: els[0].value\n\t}];\n\tconst result = [];\n\tfor (const el of els) {\n\t\tif (isLiteralElement(el)) {\n\t\t\tresult.push({\n\t\t\t\ttype: 0,\n\t\t\t\tvalue: el.value\n\t\t\t});\n\t\t\tcontinue;\n\t\t}\n\t\tif (isPoundElement(el)) {\n\t\t\tif (typeof currentPluralValue === \"number\") result.push({\n\t\t\t\ttype: 0,\n\t\t\t\tvalue: formatters.getNumberFormat(locales).format(currentPluralValue)\n\t\t\t});\n\t\t\tcontinue;\n\t\t}\n\t\tconst { value: varName } = el;\n\t\tif (!(values && varName in values)) throw new MissingValueError(varName, originalMessage);\n\t\tlet value = values[varName];\n\t\tif (isArgumentElement(el)) {\n\t\t\tif (!value || typeof value === \"string\" || typeof value === \"number\" || typeof value === \"bigint\") value = typeof value === \"string\" || typeof value === \"number\" || typeof value === \"bigint\" ? String(value) : \"\";\n\t\t\tresult.push({\n\t\t\t\ttype: typeof value === \"string\" ? 0 : 1,\n\t\t\t\tvalue\n\t\t\t});\n\t\t\tcontinue;\n\t\t}\n\t\tif (isDateElement(el)) {\n\t\t\tconst style = typeof el.style === \"string\" ? formats.date[el.style] : isDateTimeSkeleton(el.style) ? el.style.parsedOptions : void 0;\n\t\t\tresult.push({\n\t\t\t\ttype: 0,\n\t\t\t\tvalue: formatters.getDateTimeFormat(locales, style).format(value)\n\t\t\t});\n\t\t\tcontinue;\n\t\t}\n\t\tif (isTimeElement(el)) {\n\t\t\tconst style = typeof el.style === \"string\" ? formats.time[el.style] : isDateTimeSkeleton(el.style) ? el.style.parsedOptions : formats.time.medium;\n\t\t\tresult.push({\n\t\t\t\ttype: 0,\n\t\t\t\tvalue: formatters.getDateTimeFormat(locales, style).format(value)\n\t\t\t});\n\t\t\tcontinue;\n\t\t}\n\t\tif (isNumberElement(el)) {\n\t\t\tconst style = typeof el.style === \"string\" ? formats.number[el.style] : isNumberSkeleton(el.style) ? el.style.parsedOptions : void 0;\n\t\t\tif (style && style.scale) {\n\t\t\t\tconst scale = style.scale || 1;\n\t\t\t\tif (typeof value === \"bigint\") {\n\t\t\t\t\tif (!Number.isInteger(scale)) throw new TypeError(`Cannot apply fractional scale ${scale} to bigint value. Scale must be an integer when formatting bigint.`);\n\t\t\t\t\tvalue = value * BigInt(scale);\n\t\t\t\t} else value = value * scale;\n\t\t\t}\n\t\t\tresult.push({\n\t\t\t\ttype: 0,\n\t\t\t\tvalue: formatters.getNumberFormat(locales, style).format(value)\n\t\t\t});\n\t\t\tcontinue;\n\t\t}\n\t\tif (isTagElement(el)) {\n\t\t\tconst { children, value } = el;\n\t\t\tconst formatFn = values[value];\n\t\t\tif (!isFormatXMLElementFn(formatFn)) throw new InvalidValueTypeError(value, \"function\", originalMessage);\n\t\t\tlet chunks = formatFn(formatToParts(children, locales, formatters, formats, values, currentPluralValue).map((p) => p.value));\n\t\t\tif (!Array.isArray(chunks)) chunks = [chunks];\n\t\t\tresult.push(...chunks.map((c) => {\n\t\t\t\treturn {\n\t\t\t\t\ttype: typeof c === \"string\" ? 0 : 1,\n\t\t\t\t\tvalue: c\n\t\t\t\t};\n\t\t\t}));\n\t\t}\n\t\tif (isSelectElement(el)) {\n\t\t\tconst key = value;\n\t\t\tconst opt = (Object.prototype.hasOwnProperty.call(el.options, key) ? el.options[key] : void 0) || el.options.other;\n\t\t\tif (!opt) throw new InvalidValueError(el.value, value, Object.keys(el.options), originalMessage);\n\t\t\tresult.push(...formatToParts(opt.value, locales, formatters, formats, values));\n\t\t\tcontinue;\n\t\t}\n\t\tif (isPluralElement(el)) {\n\t\t\tconst exactKey = `=${value}`;\n\t\t\tlet opt = Object.prototype.hasOwnProperty.call(el.options, exactKey) ? el.options[exactKey] : void 0;\n\t\t\tif (!opt) {\n\t\t\t\tif (!Intl.PluralRules) throw new FormatError(`Intl.PluralRules is not available in this environment.\nTry polyfilling it using \"@formatjs/intl-pluralrules\"\n`, \"MISSING_INTL_API\", originalMessage);\n\t\t\t\tconst numericValue = typeof value === \"bigint\" ? Number(value) : value;\n\t\t\t\tconst rule = formatters.getPluralRules(locales, { type: el.pluralType }).select(numericValue - (el.offset || 0));\n\t\t\t\topt = (Object.prototype.hasOwnProperty.call(el.options, rule) ? el.options[rule] : void 0) || el.options.other;\n\t\t\t}\n\t\t\tif (!opt) throw new InvalidValueError(el.value, value, Object.keys(el.options), originalMessage);\n\t\t\tconst numericValue = typeof value === \"bigint\" ? Number(value) : value;\n\t\t\tresult.push(...formatToParts(opt.value, locales, formatters, formats, values, numericValue - (el.offset || 0)));\n\t\t\tcontinue;\n\t\t}\n\t}\n\treturn mergeLiteral(result);\n}\n//#endregion\n//#region packages/intl-messageformat/core.ts\nfunction mergeConfig(c1, c2) {\n\tif (!c2) return c1;\n\treturn {\n\t\t...c1,\n\t\t...c2,\n\t\t...Object.keys(c1).reduce((all, k) => {\n\t\t\tall[k] = {\n\t\t\t\t...c1[k],\n\t\t\t\t...c2[k]\n\t\t\t};\n\t\t\treturn all;\n\t\t}, {})\n\t};\n}\nfunction mergeConfigs(defaultConfig, configs) {\n\tif (!configs) return defaultConfig;\n\treturn Object.keys(defaultConfig).reduce((all, k) => {\n\t\tall[k] = mergeConfig(defaultConfig[k], configs[k]);\n\t\treturn all;\n\t}, { ...defaultConfig });\n}\nfunction createFastMemoizeCache(store) {\n\treturn { create() {\n\t\treturn {\n\t\t\tget(key) {\n\t\t\t\treturn store[key];\n\t\t\t},\n\t\t\tset(key, value) {\n\t\t\t\tstore[key] = value;\n\t\t\t}\n\t\t};\n\t} };\n}\nfunction createDefaultFormatters(cache = {\n\tnumber: {},\n\tdateTime: {},\n\tpluralRules: {}\n}) {\n\treturn {\n\t\tgetNumberFormat: memoize((...args) => new Intl.NumberFormat(...args), {\n\t\t\tcache: createFastMemoizeCache(cache.number),\n\t\t\tstrategy: strategies.variadic\n\t\t}),\n\t\tgetDateTimeFormat: memoize((...args) => new Intl.DateTimeFormat(...args), {\n\t\t\tcache: createFastMemoizeCache(cache.dateTime),\n\t\t\tstrategy: strategies.variadic\n\t\t}),\n\t\tgetPluralRules: memoize((...args) => new Intl.PluralRules(...args), {\n\t\t\tcache: createFastMemoizeCache(cache.pluralRules),\n\t\t\tstrategy: strategies.variadic\n\t\t})\n\t};\n}\nvar IntlMessageFormat = class IntlMessageFormat {\n\tconstructor(message, locales = IntlMessageFormat.defaultLocale, overrideFormats, opts) {\n\t\tthis.formatterCache = {\n\t\t\tnumber: {},\n\t\t\tdateTime: {},\n\t\t\tpluralRules: {}\n\t\t};\n\t\tthis.format = (values) => {\n\t\t\tconst parts = this.formatToParts(values);\n\t\t\tif (parts.length === 1) return parts[0].value;\n\t\t\tconst result = parts.reduce((all, part) => {\n\t\t\t\tif (!all.length || part.type !== 0 || typeof all[all.length - 1] !== \"string\") all.push(part.value);\n\t\t\t\telse all[all.length - 1] += part.value;\n\t\t\t\treturn all;\n\t\t\t}, []);\n\t\t\tif (result.length <= 1) return result[0] || \"\";\n\t\t\treturn result;\n\t\t};\n\t\tthis.formatToParts = (values) => formatToParts(this.ast, this.locales, this.formatters, this.formats, values, void 0, this.message);\n\t\tthis.resolvedOptions = () => ({ locale: this.resolvedLocale?.toString() || Intl.NumberFormat.supportedLocalesOf(this.locales)[0] });\n\t\tthis.getAst = () => this.ast;\n\t\tthis.locales = locales;\n\t\tthis.resolvedLocale = IntlMessageFormat.resolveLocale(locales);\n\t\tif (typeof message === \"string\") {\n\t\t\tthis.message = message;\n\t\t\tif (!IntlMessageFormat.__parse) throw new TypeError(\"IntlMessageFormat.__parse must be set to process `message` of type `string`\");\n\t\t\tconst { ...parseOpts } = opts || {};\n\t\t\tthis.ast = IntlMessageFormat.__parse(message, {\n\t\t\t\t...parseOpts,\n\t\t\t\tlocale: this.resolvedLocale\n\t\t\t});\n\t\t} else this.ast = message;\n\t\tif (!Array.isArray(this.ast)) throw new TypeError(\"A message must be provided as a String or AST.\");\n\t\tthis.formats = mergeConfigs(IntlMessageFormat.formats, overrideFormats);\n\t\tthis.formatters = opts && opts.formatters || createDefaultFormatters(this.formatterCache);\n\t}\n\tstatic {\n\t\tthis.memoizedDefaultLocale = null;\n\t}\n\tstatic get defaultLocale() {\n\t\tif (!IntlMessageFormat.memoizedDefaultLocale) IntlMessageFormat.memoizedDefaultLocale = new Intl.NumberFormat().resolvedOptions().locale;\n\t\treturn IntlMessageFormat.memoizedDefaultLocale;\n\t}\n\tstatic {\n\t\tthis.resolveLocale = (locales) => {\n\t\t\tif (typeof Intl.Locale === \"undefined\") return;\n\t\t\tconst supportedLocales = Intl.NumberFormat.supportedLocalesOf(locales);\n\t\t\tif (supportedLocales.length > 0) return new Intl.Locale(supportedLocales[0]);\n\t\t\treturn new Intl.Locale(typeof locales === \"string\" ? locales : locales[0]);\n\t\t};\n\t}\n\tstatic {\n\t\tthis.__parse = parse;\n\t}\n\tstatic {\n\t\tthis.formats = {\n\t\t\tnumber: {\n\t\t\t\tinteger: { maximumFractionDigits: 0 },\n\t\t\t\tcurrency: { style: \"currency\" },\n\t\t\t\tpercent: { style: \"percent\" }\n\t\t\t},\n\t\t\tdate: {\n\t\t\t\tshort: {\n\t\t\t\t\tmonth: \"numeric\",\n\t\t\t\t\tday: \"numeric\",\n\t\t\t\t\tyear: \"2-digit\"\n\t\t\t\t},\n\t\t\t\tmedium: {\n\t\t\t\t\tmonth: \"short\",\n\t\t\t\t\tday: \"numeric\",\n\t\t\t\t\tyear: \"numeric\"\n\t\t\t\t},\n\t\t\t\tlong: {\n\t\t\t\t\tmonth: \"long\",\n\t\t\t\t\tday: \"numeric\",\n\t\t\t\t\tyear: \"numeric\"\n\t\t\t\t},\n\t\t\t\tfull: {\n\t\t\t\t\tweekday: \"long\",\n\t\t\t\t\tmonth: \"long\",\n\t\t\t\t\tday: \"numeric\",\n\t\t\t\t\tyear: \"numeric\"\n\t\t\t\t}\n\t\t\t},\n\t\t\ttime: {\n\t\t\t\tshort: {\n\t\t\t\t\thour: \"numeric\",\n\t\t\t\t\tminute: \"numeric\"\n\t\t\t\t},\n\t\t\t\tmedium: {\n\t\t\t\t\thour: \"numeric\",\n\t\t\t\t\tminute: \"numeric\",\n\t\t\t\t\tsecond: \"numeric\"\n\t\t\t\t},\n\t\t\t\tlong: {\n\t\t\t\t\thour: \"numeric\",\n\t\t\t\t\tminute: \"numeric\",\n\t\t\t\t\tsecond: \"numeric\",\n\t\t\t\t\ttimeZoneName: \"short\"\n\t\t\t\t},\n\t\t\t\tfull: {\n\t\t\t\t\thour: \"numeric\",\n\t\t\t\t\tminute: \"numeric\",\n\t\t\t\t\tsecond: \"numeric\",\n\t\t\t\t\ttimeZoneName: \"short\"\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\t}\n};\n//#endregion\n//#region packages/intl-messageformat/index.ts\nvar intl_messageformat_default = IntlMessageFormat;\n//#endregion\nexport { ErrorCode, FormatError, IntlMessageFormat, InvalidValueError, InvalidValueTypeError, MissingValueError, PART_TYPE, intl_messageformat_default as default, formatToParts, isFormatXMLElementFn };\n\n//# sourceMappingURL=index.js.map","function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }\nfunction _nonIterableRest() { throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }\nfunction _iterableToArrayLimit(arr, i) { if (typeof Symbol === \"undefined\" || !(Symbol.iterator in Object(arr))) return; var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i[\"return\"] != null) _i[\"return\"](); } finally { if (_d) throw _e; } } return _arr; }\nfunction _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\nimport * as utils from './utils.js';\nimport IntlMessageFormat from 'intl-messageformat';\nfunction getDefaults() {\n return {\n memoize: true,\n memoizeFallback: false,\n bindI18n: '',\n bindI18nStore: '',\n parseErrorHandler: function parseErrorHandler(err, key, res, options) {\n return res;\n },\n parseLngForICU: function parseLngForICU(lng) {\n return lng;\n },\n escapeVariables: false\n };\n}\nvar ICU = /*#__PURE__*/function () {\n function ICU(options) {\n _classCallCheck(this, ICU);\n this.type = 'i18nFormat';\n this.mem = {};\n this.init(null, options);\n }\n _createClass(ICU, [{\n key: \"init\",\n value: function init(i18next, options) {\n var _this = this;\n var i18nextOptions = i18next && i18next.options && i18next.options.i18nFormat || {};\n this.options = utils.defaults(i18nextOptions, options, this.options || {}, getDefaults());\n this.formats = this.options.formats;\n if (i18next) {\n var _this$options = this.options,\n bindI18n = _this$options.bindI18n,\n bindI18nStore = _this$options.bindI18nStore,\n memoize = _this$options.memoize;\n i18next.IntlMessageFormat = IntlMessageFormat;\n i18next.ICU = this;\n if (memoize) {\n if (bindI18n) {\n i18next.on(bindI18n, function () {\n return _this.clearCache();\n });\n }\n if (bindI18nStore) {\n i18next.store.on(bindI18nStore, function () {\n return _this.clearCache();\n });\n }\n }\n }\n }\n }, {\n key: \"addUserDefinedFormats\",\n value: function addUserDefinedFormats(formats) {\n this.formats = this.formats ? _objectSpread(_objectSpread({}, this.formats), formats) : formats;\n }\n }, {\n key: \"parse\",\n value: function parse(res, options, lng, ns, key, info) {\n var hadSuccessfulLookup = info && info.resolved && info.resolved.res;\n var memKey = this.options.memoize && \"\".concat(lng, \".\").concat(ns, \".\").concat(key.replace(/\\./g, '###'));\n var fc;\n if (this.options.memoize) {\n fc = utils.getPath(this.mem, memKey);\n }\n try {\n if (!fc) {\n var transformedLng = this.options.parseLngForICU(lng);\n // without ignoreTag, react-i18next <Trans> translations with <0></0> placeholders\n // will fail to parse, as IntlMessageFormat expects them to be defined in the\n // options passed to fc.format() as { 0: (children) => string }\n // but the replacement of placeholders is done in react-i18next\n fc = new IntlMessageFormat(res, transformedLng, this.formats, {\n ignoreTag: true\n });\n if (this.options.memoize && (this.options.memoizeFallback || !info || hadSuccessfulLookup)) utils.setPath(this.mem, memKey, fc);\n }\n return fc.format(this.escapeVariableValues(options));\n } catch (err) {\n return this.options.parseErrorHandler(err, key, res, options);\n }\n }\n }, {\n key: \"addLookupKeys\",\n value: function addLookupKeys(finalKeys, _key, _code, _ns, _options) {\n // no additional keys needed for select or plural\n // so there is no need to add keys to that finalKeys array\n return finalKeys;\n }\n }, {\n key: \"clearCache\",\n value: function clearCache() {\n this.mem = {};\n }\n }, {\n key: \"escapeVariableValues\",\n value: function escapeVariableValues(options) {\n if (!this.options.escapeVariables || !options || _typeof(options) !== 'object') {\n return options;\n }\n var escaped = {};\n for (var _i = 0, _Object$entries = Object.entries(options); _i < _Object$entries.length; _i++) {\n var _Object$entries$_i = _slicedToArray(_Object$entries[_i], 2),\n key = _Object$entries$_i[0],\n value = _Object$entries$_i[1];\n if (typeof value === 'string') {\n // Escape HTML special characters that could interfere with ICU parsing\n escaped[key] = value.replace(/&/g, '&amp;').replace(/</g, '&lt;').replace(/>/g, '&gt;').replace(/\"/g, '&quot;').replace(/'/g, '&#39;');\n } else {\n escaped[key] = value;\n }\n }\n return escaped;\n }\n }]);\n return ICU;\n}();\nICU.type = 'i18nFormat';\nexport default ICU;","/** App-owned translation catalogs: account screens and shared app copy. */\nexport const NAMESPACES = [\n \"common\",\n \"account\",\n \"consent\",\n \"onboarding\",\n \"doctor\",\n] as const;\nexport type Namespace = (typeof NAMESPACES)[number];\nexport const DEFAULT_NAMESPACE = \"common\";\n","/**\n * The set of locales the app ships, plus the negotiation that maps an ordered\n * list of user-preferred BCP 47 tags onto one of them.\n *\n * Negotiation is deliberately simple and explicit rather than delegating to\n * `Intl.LocaleMatcher` (still a stage-1 proposal) or i18next's own detector:\n * we match the full tag first, then fall back to the primary language subtag,\n * so `es-419` and `es-MX` both resolve to `es` without needing an entry each.\n *\n * References:\n * - https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Accept-Language\n * - https://www.rfc-editor.org/rfc/rfc5646 (BCP 47 tag structure)\n */\n\n/** Locale used when nothing else matches. Also the source language for copy. */\nexport const DEFAULT_LOCALE = \"en\";\n\n/**\n * Locales with a translation catalog under `src/i18n/locales/`.\n *\n * Adding a locale means: add the tag here, add the catalog directory, and add\n * the loader entry in `catalogs.ts`. All three are checked at compile time:\n * `catalogs.ts` types its registry as `Record<SupportedLocale, …>`, so a\n * missing loader is a type error rather than a runtime 404.\n */\nexport const SUPPORTED_LOCALES = [\"en\", \"es\", \"ru\", \"zh\", \"zh-TW\"] as const;\n\nexport type SupportedLocale = (typeof SUPPORTED_LOCALES)[number];\n\n/**\n * Endonyms: each locale's name in its own language, which is what a language\n * picker should show. A user who has the UI in a language they can't read\n * needs to find their own language by sight, not in translation.\n */\nexport const LOCALE_LABELS: Record<SupportedLocale, string> = {\n en: \"English\",\n es: \"Español\",\n ru: \"Русский\",\n zh: \"简体中文\",\n \"zh-TW\": \"繁體中文(台灣)\",\n};\n\nexport function isSupportedLocale(value: unknown): value is SupportedLocale {\n return (\n typeof value === \"string\" &&\n (SUPPORTED_LOCALES as readonly string[]).includes(value)\n );\n}\n\n/**\n * Pick the best supported locale for an ordered list of preferred tags.\n *\n * Each tag is tried at full length and then truncated to its primary subtag\n * before moving to the next preference. A user who prefers `es-MX` over `en`\n * gets `es`, not `en`. Returns {@link DEFAULT_LOCALE} when nothing matches.\n */\nexport function negotiateLocale(preferred: readonly string[]): SupportedLocale {\n for (const tag of preferred) {\n const normalized = tag.trim();\n if (normalized === \"\") {\n continue;\n }\n const matched = (SUPPORTED_LOCALES as readonly string[]).find(\n (l) => l.toLowerCase() === normalized.toLowerCase(),\n );\n if (matched) {\n return matched as SupportedLocale;\n }\n const lower = normalized.toLowerCase();\n if (\n lower === \"zh-hant\" ||\n lower.startsWith(\"zh-hant-\") ||\n lower === \"zh-hk\" ||\n lower === \"zh-mo\"\n ) {\n if (isSupportedLocale(\"zh-TW\")) {\n return \"zh-TW\";\n }\n }\n const base = normalized.split(\"-\")[0].toLowerCase();\n const baseMatched = (SUPPORTED_LOCALES as readonly string[]).find(\n (l) => l.toLowerCase() === base,\n );\n if (baseMatched) {\n return baseMatched as SupportedLocale;\n }\n }\n return DEFAULT_LOCALE;\n}\n","/**\n * Where translation catalogs live, and how they reach the running app.\n *\n * Catalogs are source files under `src/i18n/locales/<locale>/<namespace>.json`,\n * not runtime-fetched assets.\n *\n * English is imported statically, so it is part of the entry's static graph and\n * is readable with no network round trip at all. Every other locale is pulled\n * in with a dynamic `import()`, so Vite emits chunks per locale and the app\n * downloads only the locale it renders. The asymmetry is deliberate: the\n * fallback catalog is what the UI falls back *to*, so it must be the one thing\n * that cannot fail to load.\n *\n * Non-default locales are still bundled output sitting next to the JS, which is\n * why this is not `i18next-http-backend` (the usual default, which GETs\n * `/locales/{lng}/{ns}.json` from `public/`):\n *\n * - Capacitor serves the bundle from `capacitor://localhost` and the app is\n * expected to work offline. An HTTP fetch for UI copy makes first paint\n * depend on the network and fails outright on a cold offline launch.\n * - Electron loads the renderer from a local file/custom scheme where the same\n * fetch is at best a different origin to get right, at worst blocked.\n * - Bundled chunks are cache-busted by the build hash. A catalog in `public/`\n * is served unhashed and can be held by a stale HTTP cache after a deploy,\n * so users see one release's copy against another release's UI.\n *\n * The registry below is written out by hand rather than generated with\n * `import.meta.glob`. Two reasons: it is typed as a total map over locale and\n * namespace, so adding either without adding its catalog is a compile error\n * instead of a runtime miss; and `import.meta.glob` is a Vite-only transform\n * absent under Bun's test runner, which would force every test touching i18n\n * through a mock.\n *\n * Reference: https://vite.dev/guide/features#dynamic-import\n */\nimport enAccount from \"@app/i18n/locales/en/account.json\";\nimport enDoctor from \"@app/i18n/locales/en/doctor.json\";\nimport enCommon from \"@app/i18n/locales/en/common.json\";\nimport enConsent from \"@app/i18n/locales/en/consent.json\";\nimport enOnboarding from \"@app/i18n/locales/en/onboarding.json\";\nimport { NAMESPACES, type Namespace } from \"@app/i18n/namespaces\";\nimport {\n DEFAULT_LOCALE,\n type SupportedLocale,\n} from \"@app/i18n/supported-locales\";\n\n/**\n * A parsed catalog. Values are ICU MessageFormat strings; nesting mirrors the\n * dotted key path used at the call site (`t(\"aboutPage.version\")`).\n */\nexport type Catalog = Record<string, unknown>;\n\n/** Every namespace of one locale. */\nexport type LocaleCatalogs = Record<Namespace, Catalog>;\n\ntype CatalogLoader = () => Promise<{ default: Catalog }>;\n\n/**\n * The English catalogs, available synchronously. Both the boot path and the\n * test preload seed i18next with these, so a missing or unreachable chunk for\n * any other locale degrades to readable English rather than raw key paths.\n */\nexport const FALLBACK_CATALOGS: LocaleCatalogs = {\n common: enCommon,\n account: enAccount,\n consent: enConsent,\n onboarding: enOnboarding,\n doctor: enDoctor,\n};\n\n/** Loaders for the locales that are not bundled into the entry chunk. */\nconst CATALOG_LOADERS: Record<\n Exclude<SupportedLocale, typeof DEFAULT_LOCALE>,\n Record<Namespace, CatalogLoader>\n> = {\n es: {\n common: () => import(\"@app/i18n/locales/es/common.json\"),\n account: () => import(\"@app/i18n/locales/es/account.json\"),\n consent: () => import(\"@app/i18n/locales/es/consent.json\"),\n onboarding: () => import(\"@app/i18n/locales/es/onboarding.json\"),\n doctor: () => import(\"@app/i18n/locales/es/doctor.json\"),\n },\n ru: {\n common: () => import(\"@app/i18n/locales/ru/common.json\"),\n account: () => import(\"@app/i18n/locales/ru/account.json\"),\n consent: () => import(\"@app/i18n/locales/ru/consent.json\"),\n onboarding: () => import(\"@app/i18n/locales/ru/onboarding.json\"),\n doctor: () => import(\"@app/i18n/locales/ru/doctor.json\"),\n },\n zh: {\n common: () => import(\"@app/i18n/locales/zh/common.json\"),\n account: () => import(\"@app/i18n/locales/zh/account.json\"),\n consent: () => import(\"@app/i18n/locales/zh/consent.json\"),\n onboarding: () => import(\"@app/i18n/locales/zh/onboarding.json\"),\n doctor: () => import(\"@app/i18n/locales/zh/doctor.json\"),\n },\n \"zh-TW\": {\n common: () => import(\"@app/i18n/locales/zh-TW/common.json\"),\n account: () => import(\"@app/i18n/locales/zh-TW/account.json\"),\n consent: () => import(\"@app/i18n/locales/zh-TW/consent.json\"),\n onboarding: () => import(\"@app/i18n/locales/zh-TW/onboarding.json\"),\n doctor: () => import(\"@app/i18n/locales/zh-TW/doctor.json\"),\n },\n};\n\n/**\n * Load every namespace of one locale.\n *\n * Rejects when any non-default locale's chunk cannot be fetched (offline, or an\n * entry bundle outliving the assets a deploy removed). Callers on the boot path\n * treat that as \"stay on {@link FALLBACK_CATALOGS}\". Namespaces load together\n * rather than on demand because they are small and first paint can draw from\n * any of them; split this if a namespace ever grows large enough to matter.\n */\nexport async function loadCatalogs(\n locale: SupportedLocale,\n): Promise<LocaleCatalogs> {\n if (locale === DEFAULT_LOCALE) {\n return FALLBACK_CATALOGS;\n }\n\n const loaders = CATALOG_LOADERS[locale];\n const loaded = await Promise.all(\n NAMESPACES.map(async (namespace) => {\n const module = await loaders[namespace]();\n return [namespace, module.default] as const;\n }),\n );\n return Object.fromEntries(loaded) as LocaleCatalogs;\n}\n\n/**\n * Every locale this module can produce catalogs for. Exported for the coverage\n * test that asserts this stays in lockstep with `SUPPORTED_LOCALES`.\n */\nexport function loadableLocales(): SupportedLocale[] {\n return [\n DEFAULT_LOCALE,\n ...(Object.keys(CATALOG_LOADERS) as SupportedLocale[]),\n ];\n}\n","/**\n * The i18next `init()` options, in one place.\n *\n * Production and the app test preload use the same options for the app-owned\n * instance.\n *\n * Kept free of any dependency on locale *resolution* (`system-locale.ts`,\n * `device-settings.ts`) so importing it from the preload does not pull those\n * modules into the registry ahead of the tests that mock them.\n */\nimport type { InitOptions } from \"i18next\";\n\nimport type { LocaleCatalogs } from \"@app/i18n/catalogs\";\nimport { DEFAULT_NAMESPACE, NAMESPACES } from \"@app/i18n/namespaces\";\nimport { DEFAULT_LOCALE } from \"@app/i18n/supported-locales\";\n\nexport function i18nextInitOptions(\n locale: string,\n resources: Record<string, LocaleCatalogs>,\n): InitOptions {\n return {\n lng: locale,\n fallbackLng: DEFAULT_LOCALE,\n ns: [...NAMESPACES],\n defaultNS: DEFAULT_NAMESPACE,\n resources,\n // React escapes interpolated values on render; letting i18next escape them\n // too double-encodes apostrophes and ampersands in user data.\n interpolation: { escapeValue: false },\n returnNull: false,\n };\n}\n","/**\n * Reads the host's preferred UI languages, in priority order.\n *\n * All three shells run the same SPA, so all three answer through\n * `navigator.languages`. What differs is how faithfully each host mirrors the\n * OS preference into the web view, and each has a known gap:\n *\n * - **Browser**: `navigator.languages` is the browser's own language list,\n * which is what we want. No gap.\n *\n * - **Electron (macOS / Windows)**: the renderer is Chromium, and Chromium\n * seeds its language list from the OS UI language at process start. The gap\n * is that it reflects the *UI language*, not a regional-format-only override\n * (macOS \"Region\" set to Spain while the UI stays English), and it is\n * sampled once at launch, so a locale change mid-session is not observed.\n * Closing that means reading `app.getPreferredSystemLanguages()` in the main\n * process and exposing it over the `window.cadet` bridge. See\n * `docs/ELECTRON.md` for the three-file bridge pattern. Deferred: it needs\n * preload + main + contract changes, and the launch-time value is correct\n * for the overwhelming majority of users.\n *\n * - **Capacitor (iOS / Android)**: the WKWebView / Android WebView reports\n * the *system* language. The gap is iOS's per-app language setting\n * (Settings → Cadet → Preferred Language, iOS 13+): a user who sets only\n * this app to Spanish while the phone stays English still gets `en` here.\n * Closing that means `Device.getLanguageTag()` from `@capacitor/device`,\n * which reads `Locale.preferredLanguages` and so sees the per-app choice.\n * Deferred: adding an iOS Capacitor plugin is not runtime-neutral. Its\n * native `load()` runs at bridge init whether or not JS imports it, and\n * `docs/CAPACITOR.md` requires auditing that before taking the dependency.\n *\n * Until those land, the explicit in-app preference (`device:locale`, written\n * by `changeLocale()`) is the escape hatch for every one of these gaps: it is\n * consulted first and overrides whatever the host reports.\n *\n * References:\n * - https://developer.mozilla.org/en-US/docs/Web/API/Navigator/languages\n * - https://www.electronjs.org/docs/latest/api/app#appgetpreferredsystemlanguages\n * - https://capacitorjs.com/docs/apis/device#getlanguagetag\n */\n\n/**\n * The host's preferred languages as BCP 47 tags, most-preferred first.\n *\n * Returns an empty array when there is no `navigator` (SSR, non-DOM test\n * contexts) so callers fall through to their own default.\n */\nexport function systemLocales(): string[] {\n if (typeof navigator === \"undefined\") {\n return [];\n }\n\n // `navigator.languages` is the full ordered preference list. Safari and some\n // WebViews have historically left it empty or absent, so `navigator.language`\n // (always present) is the single-entry fallback.\n const languages = navigator.languages;\n if (Array.isArray(languages) && languages.length > 0) {\n return [...languages];\n }\n\n return navigator.language ? [navigator.language] : [];\n}\n","// All three helpers swallow `localStorage` exceptions. Reads/writes can\n// throw in private browsing, on quota exhaustion, or when storage is\n// disabled by policy. Every caller in this repo treats settings\n// persistence as best-effort — none are gated on the write succeeding —\n// so failing soft keeps the onboarding / retire / settings flows\n// navigable when storage is unavailable.\n\nexport function getLocalSetting(key: string, fallback: string): string {\n if (typeof window === \"undefined\") {\n return fallback;\n }\n try {\n return localStorage.getItem(key) ?? fallback;\n } catch {\n return fallback;\n }\n}\n\n/**\n * Write a setting. Returns whether the value reached storage, so callers that\n * render the value can keep it in memory when it did not. Callers that treat\n * persistence as fire-and-forget can ignore the result.\n */\nexport function setLocalSetting(key: string, value: string): boolean {\n if (typeof window === \"undefined\") {\n return false;\n }\n try {\n localStorage.setItem(key, value);\n } catch {\n return false;\n }\n notifyChange(key, value);\n return true;\n}\n\n/**\n * Announce a value that did not reach storage.\n *\n * A rejected write fires no notification of its own, so a subscriber holding\n * the value in memory has no way to learn it changed. This is the signal for\n * that case; the notification carries the value the caller is standing behind.\n */\nexport function notifySettingChange(key: string, value: string): void {\n if (typeof window === \"undefined\") {\n return;\n }\n notifyChange(key, value);\n}\n\nexport function removeLocalSetting(key: string): void {\n if (typeof window === \"undefined\") {\n return;\n }\n try {\n localStorage.removeItem(key);\n } catch {\n return;\n }\n notifyChange(key, null);\n}\n\n// ---------------------------------------------------------------------------\n// Typed helpers — boolean and number\n// ---------------------------------------------------------------------------\n\nexport function getLocalBool(key: string, fallback: boolean): boolean {\n if (typeof window === \"undefined\") {\n return fallback;\n }\n try {\n const raw = localStorage.getItem(key);\n if (raw === \"true\") {\n return true;\n }\n if (raw === \"false\") {\n return false;\n }\n return fallback;\n } catch {\n return fallback;\n }\n}\n\nexport function setLocalBool(key: string, value: boolean): void {\n setLocalSetting(key, value ? \"true\" : \"false\");\n}\n\n/**\n * Tri-state boolean read: `true`/`false` for an explicitly stored value,\n * `null` when the key is absent or unreadable. Lets callers distinguish\n * \"never chosen\" from an explicit choice.\n */\nexport function getLocalBoolOrNull(key: string): boolean | null {\n if (typeof window === \"undefined\") {\n return null;\n }\n try {\n const raw = localStorage.getItem(key);\n if (raw === \"true\") {\n return true;\n }\n if (raw === \"false\") {\n return false;\n }\n return null;\n } catch {\n return null;\n }\n}\n\nexport function getLocalNumber(key: string, fallback: number): number {\n if (typeof window === \"undefined\") {\n return fallback;\n }\n try {\n const raw = localStorage.getItem(key);\n if (raw === null) {\n return fallback;\n }\n const parsed = Number(raw);\n return Number.isFinite(parsed) ? parsed : fallback;\n } catch {\n return fallback;\n }\n}\n\nexport function setLocalNumber(key: string, value: number): void {\n setLocalSetting(key, String(value));\n}\n\n// ---------------------------------------------------------------------------\n// Change watcher — listens for both cross-tab (storage) and same-tab\n// (cadet:pref-changed) events for a specific key.\n// ---------------------------------------------------------------------------\n\ninterface PrefChangedDetail {\n key: string;\n value: string | null;\n}\n\nexport function watchSetting(key: string, callback: () => void): () => void {\n if (typeof window === \"undefined\") {\n return () => {};\n }\n const onStorage = (event: StorageEvent) => {\n if (event.key === key) {\n callback();\n }\n };\n const onPrefChanged = (event: Event) => {\n const detail = (event as CustomEvent<PrefChangedDetail>).detail;\n if (detail?.key === key) {\n callback();\n }\n };\n window.addEventListener(\"storage\", onStorage);\n window.addEventListener(PREF_CHANGED_EVENT, onPrefChanged);\n return () => {\n window.removeEventListener(\"storage\", onStorage);\n window.removeEventListener(PREF_CHANGED_EVENT, onPrefChanged);\n };\n}\n\n// ---------------------------------------------------------------------------\n// Same-tab notification\n// ---------------------------------------------------------------------------\n\nconst PREF_CHANGED_EVENT = \"cadet:pref-changed\";\n\n// `localStorage.setItem` fires the native `storage` event in *other* tabs\n// only. Same-tab observers (e.g. the diagnostics gate that toggles client\n// reporting when the user flips Share Diagnostics on `/onboarding/privacy`\n// or `/settings/privacy`) need a synthetic signal. A single custom event\n// covers every key; listeners filter on `detail.key`.\nfunction notifyChange(key: string, value: string | null): void {\n try {\n window.dispatchEvent(\n new CustomEvent(PREF_CHANGED_EVENT, { detail: { key, value } }),\n );\n } catch {\n // CustomEvent construction shouldn't fail; swallow defensively so a\n // broken environment can't strand callers that expect this to be a\n // fire-and-forget side effect.\n }\n}\n","/**\n * Typed registry and accessors for device-scoped localStorage settings.\n *\n * Device-level settings survive logout — they describe the physical\n * device's preferences, not a user account. The `device:` key prefix\n * makes this intent explicit and enables zero-maintenance cleanup in\n * session-cleanup.ts: any key starting with `device:` is automatically\n * preserved, everything else matching app prefixes is cleared.\n *\n * To add a new device setting:\n * 1. Add an entry to DEVICE_SETTINGS below\n * 2. Use getDeviceSetting / setDeviceSetting in your component\n * No cleanup list to update, no separate file to maintain.\n *\n * References:\n * - docs/STATE_MANAGEMENT.md — Logout and device-scoped storage\n */\n\nimport {\n setLocalBool,\n setLocalSetting,\n watchSetting,\n} from \"@app/utils/local-settings\";\n\n/** Prefix for all device-scoped localStorage keys. */\nexport const DEVICE_PREFIX = \"device:\";\n\n/** One device-scoped setting: its `device:`-prefixed localStorage key. */\ninterface DeviceSettingEntry {\n key: string;\n}\n\n/**\n * Registry of device-scoped settings. Each entry maps a logical name\n * to its localStorage key.\n */\nconst DEVICE_SETTINGS = {\n locale: { key: \"device:locale\" },\n installReferrer: { key: \"device:install_referrer\" },\n biometricEnabled: { key: \"device:biometric_enabled\" },\n} as const satisfies Record<string, DeviceSettingEntry>;\n\nexport type DeviceSettingName = keyof typeof DEVICE_SETTINGS;\n\n/** Returns the `device:`-prefixed localStorage key for a setting. */\nexport function deviceKey(name: DeviceSettingName): string {\n return DEVICE_SETTINGS[name].key;\n}\n\n/** Read a device-scoped setting, returning `fallback` when absent or unreadable. */\nexport function getDeviceSetting(\n name: DeviceSettingName,\n fallback: string,\n): string {\n if (typeof window === \"undefined\") {\n return fallback;\n }\n try {\n return localStorage.getItem(DEVICE_SETTINGS[name].key) ?? fallback;\n } catch {\n return fallback;\n }\n}\n\n/** Write a device-scoped setting. Fires the `cadet:pref-changed` event for same-tab observers. */\nexport function setDeviceSetting(name: DeviceSettingName, value: string): void {\n setLocalSetting(DEVICE_SETTINGS[name].key, value);\n}\n\n/** Whether a device-scoped setting is stored at all, an empty value included. */\nexport function hasDeviceSetting(name: DeviceSettingName): boolean {\n if (typeof window === \"undefined\") {\n return false;\n }\n try {\n return localStorage.getItem(DEVICE_SETTINGS[name].key) !== null;\n } catch {\n return false;\n }\n}\n\n/** Read a boolean device setting. */\nexport function getDeviceBool(\n name: DeviceSettingName,\n fallback: boolean,\n): boolean {\n if (typeof window === \"undefined\") {\n return fallback;\n }\n try {\n const raw = localStorage.getItem(DEVICE_SETTINGS[name].key);\n if (raw === \"true\") {\n return true;\n }\n if (raw === \"false\") {\n return false;\n }\n } catch {\n // Storage unavailable\n }\n return fallback;\n}\n\n/** Write a boolean device setting. */\nexport function setDeviceBool(name: DeviceSettingName, value: boolean): void {\n setLocalBool(DEVICE_SETTINGS[name].key, value);\n}\n\n/**\n * Watch a device setting for changes (cross-tab and same-tab).\n * Returns a cleanup function that removes both listeners.\n */\nexport function watchDeviceSetting(\n name: DeviceSettingName,\n callback: () => void,\n): () => void {\n return watchSetting(DEVICE_SETTINGS[name].key, callback);\n}\n","import { getDeviceSetting, setDeviceSetting } from \"@app/utils/device-settings\";\n\nexport function readLocalePreference(): string {\n return getDeviceSetting(\"locale\", \"\");\n}\n\nexport function writeLocalePreference(locale: string): void {\n setDeviceSetting(\"locale\", locale);\n}\n","/**\n * i18next configuration and lifecycle for the account app.\n *\n * Three decisions worth knowing before changing anything here:\n *\n * **ICU MessageFormat is the on-disk format.** i18next's native plural syntax\n * (`key_one` / `key_other` sibling keys) is i18next-specific; ICU\n * MessageFormat is what Crowdin, Lokalise, Phrase, Tolgee, Android and iOS all\n * read. Authoring in ICU means the catalogs outlive this library choice and\n * can be handed to any TMS as-is. `i18next-icu` swaps i18next's formatter for\n * `intl-messageformat`, which resolves plural categories through the cloud\n * `Intl.PluralRules`, so a locale with six plural forms gets six without the\n * call site knowing anything about it.\n *\n * **Initialization is awaited before first render.** `initI18n()` runs in\n * `main.tsx` ahead of `createRoot`, so components never observe an\n * uninitialized i18next and no raw key path is painted. English costs nothing\n * to reach; any other locale costs one dynamic import of a small JSON chunk.\n *\n * **Locale resolution has a fixed precedence**, applied by\n * {@link resolveInitialLocale}:\n * 1. the explicit in-app preference (`device:locale`), if it is still a\n * supported locale (a user's stated choice outranks any host signal);\n * 2. the host's preferred languages (see `system-locale.ts`);\n * 3. `DEFAULT_LOCALE`.\n *\n * References:\n * - https://www.i18next.com/overview/configuration-options\n * - https://github.com/i18next/i18next-icu\n * - https://unicode-org.github.io/icu/userguide/format_parse/messages/\n */\nimport { i18next } from \"@app/i18n/instance\";\nimport ICU from \"i18next-icu\";\n\nimport {\n FALLBACK_CATALOGS,\n loadCatalogs,\n type LocaleCatalogs,\n} from \"@app/i18n/catalogs\";\nimport { i18nextInitOptions } from \"@app/i18n/config\";\nimport { NAMESPACES } from \"@app/i18n/namespaces\";\nimport { systemLocales } from \"@app/i18n/system-locale\";\nimport {\n DEFAULT_LOCALE,\n isSupportedLocale,\n negotiateLocale,\n type SupportedLocale,\n} from \"@app/i18n/supported-locales\";\nimport {\n readLocalePreference,\n writeLocalePreference,\n} from \"@app/i18n/locale-preference\";\n\n/**\n * The locale to boot with, resolved from the stored preference, then the\n * host, then the default. Pure apart from the storage read, and exported so\n * tests and a future language picker can ask without initializing i18next.\n */\nexport function resolveInitialLocale(): SupportedLocale {\n const stored = readLocalePreference();\n if (isSupportedLocale(stored)) {\n return stored;\n }\n return negotiateLocale(systemLocales());\n}\n\n/**\n * Reflect the active locale onto the document element.\n *\n * `lang` drives the UA's own locale-sensitive behavior: hyphenation, spell\n * check, the voice a screen reader picks, and font fallback for scripts the\n * primary family doesn't cover. It is not decorative: an unset or wrong `lang`\n * makes a screen reader read Spanish copy with English phonemes.\n *\n * `dir` is set from `Intl.Locale`'s text-info rather than a hand-kept RTL list\n * so adding Arabic or Hebrew to `SUPPORTED_LOCALES` needs no change here.\n *\n * References:\n * - https://www.w3.org/International/questions/qa-html-language-declarations\n * - https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/Locale/getTextInfo\n */\nfunction applyDocumentLocale(locale: SupportedLocale): void {\n if (typeof document === \"undefined\") {\n return;\n }\n document.documentElement.lang = locale;\n\n // `getTextInfo()` postdates the TS `ES2023` lib target, and engines that\n // predate the method rename still expose the earlier `textInfo` getter, so\n // both shapes are probed behind a cast. LTR is the safe assumption for every\n // locale currently shipped.\n type LocaleTextInfo = Intl.Locale & {\n getTextInfo?: () => { direction?: string };\n textInfo?: { direction?: string };\n };\n\n let direction: string | undefined;\n try {\n const resolved = new Intl.Locale(locale) as LocaleTextInfo;\n direction =\n resolved.getTextInfo?.().direction ?? resolved.textInfo?.direction;\n } catch {\n direction = undefined;\n }\n document.documentElement.dir = direction === \"rtl\" ? \"rtl\" : \"ltr\";\n}\n\n/** Load a locale's catalogs into i18next unless they are already registered. */\nasync function ensureCatalogs(locale: SupportedLocale): Promise<void> {\n const missing = NAMESPACES.filter(\n (namespace) => !i18next.hasResourceBundle(locale, namespace),\n );\n if (missing.length === 0) {\n return;\n }\n const catalogs = await loadCatalogs(locale);\n for (const namespace of missing) {\n i18next.addResourceBundle(\n locale,\n namespace,\n catalogs[namespace],\n true,\n true,\n );\n }\n}\n\n/**\n * Report a catalog that could not be loaded.\n *\n * A chunk fetch fails when the device is offline, or when a still-cached entry\n * bundle asks for an asset a later deploy removed. Neither is actionable at\n * the call site beyond staying on the locale already rendering, so it is a\n * warning rather than an error.\n */\nfunction reportCatalogFailure(error: unknown, locale: SupportedLocale): void {\n console.warn(\"App translation catalog could not be loaded\", locale, error);\n}\n\n/**\n * Initialize i18next for the resolved locale. Safe to call more than once:\n * a repeat call re-resolves the locale against the existing instance.\n *\n * Never rejects. This runs on the boot path ahead of `createRoot()`, where an\n * escaping rejection costs the whole app a render, and English is always\n * reachable. Returns the locale actually activated, which is English when the\n * preferred locale's catalog could not be loaded.\n */\nexport async function initI18n(): Promise<SupportedLocale> {\n const requested = resolveInitialLocale();\n\n if (i18next.isInitialized) {\n try {\n await changeLocale(requested);\n return requested;\n } catch (error) {\n reportCatalogFailure(error, requested);\n return currentLocale();\n }\n }\n\n // English is seeded first, from the entry chunk rather than a fetch. It is\n // both the fallback for a key a translated catalog is missing and the floor\n // this function degrades to, so it must be in place before anything that can\n // fail is attempted.\n const resources: Record<string, LocaleCatalogs> = {\n [DEFAULT_LOCALE]: FALLBACK_CATALOGS,\n };\n let locale: SupportedLocale = DEFAULT_LOCALE;\n\n if (requested !== DEFAULT_LOCALE) {\n try {\n resources[requested] = await loadCatalogs(requested);\n locale = requested;\n } catch (error) {\n reportCatalogFailure(error, requested);\n }\n }\n\n await i18next.use(new ICU()).init(i18nextInitOptions(locale, resources));\n\n applyDocumentLocale(locale);\n return locale;\n}\n\n/**\n * Switch the active locale: load its catalog if needed, activate it, persist\n * the choice as a device setting, and update the document element.\n *\n * Persisted with `device:` scope because a language choice describes the\n * device, not the account. It must survive logout so the login screen stays in\n * the language the user picked.\n *\n * Rejects when the catalog cannot be fetched, leaving the previous locale\n * active. Unlike {@link initI18n} this is user-initiated, so the caller is the\n * one that can say something useful about the failure.\n */\nexport async function changeLocale(locale: SupportedLocale): Promise<void> {\n await ensureCatalogs(locale);\n await i18next.changeLanguage(locale);\n writeLocalePreference(locale);\n applyDocumentLocale(locale);\n}\n\n/** The active locale, or `DEFAULT_LOCALE` before initialization. */\nexport function currentLocale(): SupportedLocale {\n const language = i18next.resolvedLanguage ?? i18next.language;\n return isSupportedLocale(language) ? language : DEFAULT_LOCALE;\n}\n\n/** The primary language subtag of a BCP 47 tag, lowercased. */\nfunction primaryLanguage(tag: string): string {\n return tag.split(\"-\")[0].toLowerCase();\n}\n\n/**\n * The locale to format dates, times, and numbers in.\n *\n * {@link currentLocale} answers with one of the five language tags the app\n * ships a catalog for, which is the right answer for copy and the wrong one\n * for formatting: it drops the region, so a UK user reading English copy\n * would get US date order and 12-hour times. This returns the host's own tag\n * whenever its primary language subtag is the app locale's, and the app\n * locale otherwise, so `en-GB` under app locale `en` keeps its region while\n * `de-DE` under `en` does not format German dates beside English copy.\n *\n * The host's whole preference list is searched, not just its first entry, so a\n * user whose device leads with English while the app runs in Spanish still\n * formats in the Spanish region they also listed. Comparison is by primary\n * subtag, so a `zh-TW` host keeps `zh-TW` under either Chinese catalog, and a\n * tag `Intl` cannot parse is skipped rather than chosen and rejected, so the\n * entry behind it still gets its turn.\n *\n * References:\n * - https://developer.mozilla.org/en-US/docs/Web/API/Navigator/languages\n * - https://www.rfc-editor.org/rfc/rfc5646 (BCP 47 tag structure)\n * - https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/getCanonicalLocales\n */\nexport function formatLocale(): string {\n const app = currentLocale();\n const host = systemLocales().find(\n (tag) =>\n primaryLanguage(tag) === primaryLanguage(app) && isFormattableLocale(tag),\n );\n return host ?? app;\n}\n\n/**\n * Whether `Intl` will accept `tag`, which is not a given for a host-reported\n * one: a POSIX environment reports `C`, and an underscored `en_US` reaches us\n * from more than one shell. Every `Intl` constructor throws `RangeError` on\n * those, and this is read by every date, time, and number formatter in the\n * app, so the tag is checked once here instead of failing a render later.\n */\nfunction isFormattableLocale(tag: string): boolean {\n try {\n Intl.getCanonicalLocales(tag);\n return true;\n } catch {\n // A tag Intl cannot parse is host data the caller falls back from, not a\n // fault to report.\n return false;\n }\n}\n","import {\n createContext,\n useEffect,\n useMemo,\n type ReactNode,\n type Context,\n} from \"react\";\nimport { createInstance, type i18n } from \"i18next\";\nimport ICU from \"i18next-icu\";\nimport { FALLBACK_CATALOGS, loadCatalogs } from \"./catalogs\";\nimport { currentLocale } from \"./i18n\";\nimport { i18nextInitOptions } from \"./config\";\n\nexport const AppI18nContext: Context<i18n | undefined> = createContext<\n i18n | undefined\n>(undefined);\n\nexport function AppI18nProvider({ children }: { children: ReactNode }) {\n const instance = useMemo(() => {\n const i18n = createInstance();\n void i18n.use(new ICU()).init({\n ...i18nextInitOptions(\"en\", { en: FALLBACK_CATALOGS }),\n initAsync: false,\n });\n return i18n;\n }, []);\n useEffect(() => {\n let active = true;\n const locale = currentLocale();\n void loadCatalogs(locale)\n .then((catalogs) => {\n if (!active) {\n return;\n }\n for (const [namespace, catalog] of Object.entries(catalogs)) {\n instance.addResourceBundle(locale, namespace, catalog, true, true);\n }\n void instance.changeLanguage(locale);\n })\n .catch(() => {\n if (active) {\n void instance.changeLanguage(\"en\");\n }\n });\n return () => {\n active = false;\n };\n }, [instance]);\n return (\n <AppI18nContext.Provider value={instance}>\n {children}\n </AppI18nContext.Provider>\n );\n}\n","// inlined from the former `void-elements` dependency, so the package has\n// zero runtime dependencies. `!doctype`/`!DOCTYPE` are treated as void so a\n// doctype parses as a childless node instead of swallowing the document.\nconst voidElements = {\n area: true,\n base: true,\n br: true,\n col: true,\n embed: true,\n hr: true,\n img: true,\n input: true,\n link: true,\n meta: true,\n param: true,\n source: true,\n track: true,\n wbr: true,\n '!doctype': true,\n '!DOCTYPE': true,\n};\n\nconst attrRE = /\\s([^'\"/\\s><]+?)[\\s/>]|([^\\s=]+)=\\s?(\"[^\"]*\"|'[^']*')/g;\n\nfunction parseTag(tag) {\n const res = {\n type: 'tag',\n name: '',\n voidElement: false,\n attrs: {},\n children: [],\n };\n\n const tagMatch = tag.match(/<\\/?([^\\s]+?)[/\\s>]/);\n if (tagMatch) {\n res.name = tagMatch[1];\n // void-element lookup stays case sensitive on purpose: react-i18next\n // relies on `<Br>` NOT being treated as a void `<br>` (see 1df0f9d)\n if (voidElements[tagMatch[1]] || tag.charAt(tag.length - 2) === '/') {\n res.voidElement = true;\n }\n\n // handle comment tag\n if (res.name.startsWith('!--')) {\n const endIndex = tag.indexOf('-->');\n return {\n type: 'comment',\n comment: endIndex !== -1 ? tag.slice(4, endIndex) : '',\n }\n }\n }\n\n const reg = new RegExp(attrRE);\n let result = null;\n for (;;) {\n result = reg.exec(tag);\n\n if (result === null) {\n break\n }\n\n if (!result[0].trim()) {\n continue\n }\n\n if (result[1]) {\n const attr = result[1].trim();\n // boolean attributes carry `null` so stringify can render them bare\n // (`<input disabled/>` instead of `<input disabled=\"\"/>`)\n let arr = [attr, null];\n\n const eq = attr.indexOf('=');\n if (eq > -1) {\n // split at the first `=` only, so `data-x=a=b` keeps its full value\n arr = [attr.slice(0, eq), attr.slice(eq + 1)];\n }\n\n res.attrs[arr[0]] = arr[1];\n reg.lastIndex--;\n } else if (result[2]) {\n res.attrs[result[2]] = result[3].trim().substring(1, result[3].length - 1);\n }\n }\n\n return res\n}\n\n// comments are matched as a whole (so `>` inside them is fine), everything\n// else tag-shaped is matched by the second alternative\nconst tagRE = /<!--[\\s\\S]*?-->|<[a-zA-Z0-9\\-!/](?:\"[^\"]*\"|'[^']*'|[^'\">])*>/g;\nconst tagNameRE = /<\\/?([^\\s]+?)[/\\s>]/;\nconst whitespaceRE = /^\\s*$/;\n// tags whose content is raw text: nothing inside them is markup\nconst rawTextRE = /^(script|style)$/i;\n\n// placeholder for `<` of tags rejected by options.allowedTags; restored to a\n// literal `<` in text/attr/comment content after parsing (U+0000 cannot appear\n// in sane input, and a collision would merely render as an extra `<`)\nconst sentinel = '\\u0000';\n\n// re-used obj for quick lookups of components\nconst empty = Object.create(null);\n\nfunction restoreSentinels(nodes) {\n nodes.forEach(function (node) {\n if (node.type === 'text') {\n node.content = node.content.split(sentinel).join('<');\n return\n }\n if (node.type === 'comment') {\n node.comment = node.comment.split(sentinel).join('<');\n return\n }\n for (const key in node.attrs) {\n const value = node.attrs[key];\n if (typeof value === 'string' && value.indexOf(sentinel) > -1) {\n node.attrs[key] = value.split(sentinel).join('<');\n }\n }\n if (node.children.length) {\n restoreSentinels(node.children);\n }\n });\n}\n\nfunction parse(html, options) {\n const components = (options && options.components) || empty;\n const allowedTags = options && options.allowedTags;\n let restoreNeeded = false;\n if (allowedTags) {\n const isAllowed =\n typeof allowedTags === 'function'\n ? allowedTags\n : function (name) {\n return allowedTags.indexOf(name) > -1\n };\n // neutralize tags whose name is not allowed, so they parse as text.\n // on a disallowed match only the leading `<` is escaped and scanning\n // resumes right after it, so a valid tag glued into the same match\n // (e.g. `<bold>` inside `<10, <20, and <bold>`) still gets recognized\n let out = '';\n let pos = 0;\n tagRE.lastIndex = 0;\n let am;\n while ((am = tagRE.exec(html))) {\n const tag = am[0];\n out += html.slice(pos, am.index);\n const nameMatch = tag.match(tagNameRE);\n if (tag.startsWith('<!--') || (nameMatch && isAllowed(nameMatch[1]))) {\n out += tag;\n pos = am.index + tag.length;\n } else {\n restoreNeeded = true;\n out += sentinel;\n pos = am.index + 1;\n tagRE.lastIndex = pos;\n }\n }\n html = out + html.slice(pos);\n }\n const result = [];\n const arr = [];\n let current;\n let level = -1;\n let inComponent = false;\n // while parsing raw-text content (script/style), tag-looking matches\n // before this index belong to the content and must be skipped\n let rawUntil = 0;\n // lazily created lowercase copy for case-insensitive raw-text close-tag search\n let htmlLower;\n\n // handle text at top level\n if (html.indexOf('<') !== 0) {\n const end = html.indexOf('<');\n result.push({\n type: 'text',\n content: end === -1 ? html : html.substring(0, end),\n });\n }\n\n // collect matches with an exec loop instead of matchAll to keep ES5 API compat\n const matches = [];\n let m;\n while ((m = tagRE.exec(html))) {\n matches.push(m);\n }\n matches.forEach(function (match, i) {\n const tag = match[0];\n if (!tag) return\n // comments match as a whole; their content must not trigger the\n // mismatched-bracket split below\n if (tag.startsWith('<!--')) return\n // count brackets outside quoted attribute values, so `<` inside an\n // attribute (e.g. title=\"1 < 2\") can't trigger a bogus split\n let lts = 0;\n let gts = 0;\n let secondLt = -1;\n let quote = null;\n for (let j = 0; j < tag.length; j++) {\n const c = tag.charAt(j);\n if (quote) {\n if (c === quote) quote = null;\n } else if (c === '\"' || c === \"'\") {\n quote = c;\n } else if (c === '<') {\n lts++;\n if (lts === 2) secondLt = j;\n } else if (c === '>') {\n gts++;\n }\n }\n // only split when the remainder is itself a valid tag start; otherwise\n // a fragment like `< <!-->` desyncs the string-level isComment check\n // from parseTag's name-based comment detection and crashes the walker\n const validSplit =\n secondLt > -1 && /[a-zA-Z0-9\\-!/]/.test(tag.charAt(secondLt + 1));\n if (lts > gts && validSplit) {\n const firstPart = tag.substring(0, secondLt);\n const secondPart = tag.substring(firstPart.length);\n matches[i][0] = secondPart;\n matches[i].index += firstPart.length;\n }\n });\n matches.forEach(function (match, i) {\n const tag = match[0];\n if (!tag) return\n const index = match.index;\n if (index < rawUntil) return\n if (inComponent) {\n if (tag !== '</' + current.name + '>') {\n return\n } else {\n inComponent = false;\n }\n }\n const isOpen = tag.charAt(1) !== '/';\n const isComment = tag.startsWith('<!--');\n const start = index + tag.length;\n const nextChar = html.charAt(start);\n const nextMatch = matches[i + 1];\n let isText;\n if (nextChar === '<' && nextMatch) {\n const nextTag = html.substring(start, nextMatch.index);\n isText = nextTag.split('<').length > nextTag.split('>').length;\n }\n\n let parent;\n\n if (isComment) {\n const comment = parseTag(tag);\n\n // if we're at root, push new base node\n if (level < 0) {\n result.push(comment);\n return result\n }\n parent = arr[level];\n parent.children.push(comment);\n\n const text = html.slice(start, nextMatch ? nextMatch.index : undefined);\n if (text.length > 0) {\n parent.children.push({\n type: 'text',\n content: text,\n });\n }\n return result\n }\n\n if (isOpen) {\n level++;\n\n current = parseTag(tag);\n if (current.type === 'tag' && components[current.name]) {\n current.type = 'component';\n inComponent = true;\n }\n\n let isRawText = false;\n if (\n !inComponent &&\n !current.voidElement &&\n rawTextRE.test(current.name)\n ) {\n // raw-text element: everything up to the matching close tag is one\n // text child, regardless of what it looks like\n isRawText = true;\n htmlLower || (htmlLower = html.toLowerCase());\n const closeIndex = htmlLower.indexOf(\n '</' + current.name.toLowerCase() + '>',\n start,\n );\n const contentEnd = closeIndex === -1 ? html.length : closeIndex;\n const content = html.slice(start, contentEnd);\n if (content) {\n current.children.push({\n type: 'text',\n content,\n });\n }\n rawUntil = contentEnd;\n }\n\n if (\n !current.voidElement &&\n !inComponent &&\n !isRawText &&\n nextChar &&\n nextChar !== '<'\n ) {\n // text content runs to the next actual tag match; stray `<`\n // characters in between are part of the text\n current.children.push({\n type: 'text',\n content: html.slice(start, nextMatch ? nextMatch.index : undefined),\n });\n }\n\n // if we're at root, push new base node\n if (level === 0) {\n result.push(current);\n }\n\n parent = arr[level - 1];\n\n if (parent) {\n parent.children.push(current);\n }\n\n arr[level] = current;\n }\n\n if (!isOpen || current.voidElement) {\n if (\n level > -1 &&\n (current.voidElement || current.name === tag.slice(2, -1))\n ) {\n level--;\n // move current up a level to match the end tag\n current = level === -1 ? result : arr[level];\n }\n if (!inComponent && (nextChar !== '<' || isText) && nextChar) {\n // trailing text node\n // if we're at the root, push a base text node. otherwise add as\n // a child to the current node.\n parent = level === -1 ? result : arr[level].children;\n\n // the text node runs to the next actual tag match; -1 means\n // there's no tag after it (trailing text)\n const end = nextMatch ? nextMatch.index : -1;\n let content = html.slice(start, end === -1 ? undefined : end);\n // if a node is nothing but whitespace, collapse it as the spec states:\n // https://www.w3.org/TR/html4/struct/text.html#h-9.1\n if (whitespaceRE.test(content)) {\n content = ' ';\n }\n // don't add whitespace-only text nodes if they would be trailing text nodes\n // or if they would be leading whitespace-only text nodes:\n // * end > -1 indicates this is not a trailing text node\n // * leading node is when level is -1 and parent has length 0\n if ((end > -1 && level + parent.length >= 0) || content !== ' ') {\n parent.push({\n type: 'text',\n content,\n });\n }\n }\n }\n });\n\n if (restoreNeeded) {\n restoreSentinels(result);\n }\n\n return result\n}\n\nfunction attrString(attrs) {\n const buff = [];\n for (const key in attrs) {\n if (attrs[key] === null) {\n // boolean attribute, render bare\n buff.push(key);\n } else {\n // escape double quotes so values parsed from single-quoted or\n // multiline attributes can't break out of the generated markup\n buff.push(key + '=\"' + String(attrs[key]).replace(/\"/g, '&quot;') + '\"');\n }\n }\n if (!buff.length) {\n return ''\n }\n return ' ' + buff.join(' ')\n}\n\nfunction stringifyNode(buff, doc) {\n switch (doc.type) {\n case 'text':\n return buff + doc.content\n case 'tag': {\n // a doctype is void but must not self-close: `<!DOCTYPE html>` not `<!DOCTYPE html/>`\n const tagEnd =\n doc.voidElement && doc.name.toLowerCase() !== '!doctype' ? '/>' : '>';\n buff += '<' + doc.name + (doc.attrs ? attrString(doc.attrs) : '') + tagEnd;\n if (doc.voidElement) {\n return buff\n }\n return (\n buff + doc.children.reduce(stringifyNode, '') + '</' + doc.name + '>'\n )\n }\n case 'comment':\n buff += '<!--' + doc.comment + '-->';\n return buff\n }\n}\n\nfunction stringify(doc) {\n return doc.reduce(function (token, rootEl) {\n return token + stringifyNode('', rootEl)\n }, '')\n}\n\nvar index = {\n parse,\n stringify,\n};\n\nexport { index as default, parse, stringify };\n","export const warn = (i18n, code, msg, rest) => {\n const args = [msg, {\n code,\n ...(rest || {})\n }];\n if (i18n?.services?.logger?.forward) {\n return i18n.services.logger.forward(args, 'warn', 'react-i18next::', true);\n }\n if (isString(args[0])) args[0] = `react-i18next:: ${args[0]}`;\n if (i18n?.services?.logger?.warn) {\n i18n.services.logger.warn(...args);\n } else if (console?.warn) {\n console.warn(...args);\n }\n};\nconst alreadyWarned = {};\nexport const warnOnce = (i18n, code, msg, rest) => {\n if (isString(msg) && alreadyWarned[msg]) return;\n if (isString(msg)) alreadyWarned[msg] = new Date();\n warn(i18n, code, msg, rest);\n};\nconst loadedClb = (i18n, cb) => () => {\n if (i18n.isInitialized) {\n cb();\n } else {\n const initialized = () => {\n setTimeout(() => {\n i18n.off('initialized', initialized);\n }, 0);\n cb();\n };\n i18n.on('initialized', initialized);\n }\n};\nexport const loadNamespaces = (i18n, ns, cb) => {\n i18n.loadNamespaces(ns, loadedClb(i18n, cb));\n};\nexport const loadLanguages = (i18n, lng, ns, cb) => {\n if (isString(ns)) ns = [ns];\n if (i18n.options.preload && i18n.options.preload.indexOf(lng) > -1) return loadNamespaces(i18n, ns, cb);\n ns.forEach(n => {\n if (i18n.options.ns.indexOf(n) < 0) i18n.options.ns.push(n);\n });\n i18n.loadLanguages(lng, loadedClb(i18n, cb));\n};\nexport const hasLoadedNamespace = (ns, i18n, options = {}) => {\n if (!i18n.languages || !i18n.languages.length) {\n warnOnce(i18n, 'NO_LANGUAGES', 'i18n.languages were undefined or empty', {\n languages: i18n.languages\n });\n return true;\n }\n return i18n.hasLoadedNamespace(ns, {\n lng: options.lng,\n precheck: (i18nInstance, loadNotPending) => {\n if (options.bindI18n && options.bindI18n.indexOf('languageChanging') > -1 && i18nInstance.services.backendConnector.backend && i18nInstance.isLanguageChangingTo && !loadNotPending(i18nInstance.isLanguageChangingTo, ns)) return false;\n }\n });\n};\nexport const getDisplayName = Component => Component.displayName || Component.name || (isString(Component) && Component.length > 0 ? Component : 'Unknown');\nexport const isString = obj => typeof obj === 'string';\nexport const isObject = obj => typeof obj === 'object' && obj !== null;","const matchHtmlEntity = /&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g;\nconst htmlEntities = {\n '&amp;': '&',\n '&#38;': '&',\n '&lt;': '<',\n '&#60;': '<',\n '&gt;': '>',\n '&#62;': '>',\n '&apos;': \"'\",\n '&#39;': \"'\",\n '&quot;': '\"',\n '&#34;': '\"',\n '&nbsp;': ' ',\n '&#160;': ' ',\n '&copy;': '©',\n '&#169;': '©',\n '&reg;': '®',\n '&#174;': '®',\n '&hellip;': '…',\n '&#8230;': '…',\n '&#x2F;': '/',\n '&#47;': '/'\n};\nconst unescapeHtmlEntity = m => htmlEntities[m];\nexport const unescape = text => text.replace(matchHtmlEntity, unescapeHtmlEntity);","import { unescape } from './unescape.js';\nlet defaultOptions = {\n bindI18n: 'languageChanged',\n bindI18nStore: '',\n transEmptyNodeValue: '',\n transSupportBasicHtmlNodes: true,\n transWrapTextNodes: '',\n transKeepBasicHtmlNodesFor: ['br', 'strong', 'i', 'p'],\n useSuspense: true,\n unescape,\n transDefaultProps: undefined\n};\nexport const setDefaults = (options = {}) => {\n defaultOptions = {\n ...defaultOptions,\n ...options\n };\n};\nexport const getDefaults = () => defaultOptions;","let i18nInstance;\nexport const setI18n = instance => {\n i18nInstance = instance;\n};\nexport const getI18n = () => i18nInstance;","import { Fragment, isValidElement, cloneElement, createElement, Children } from 'react';\nimport { keyFromSelector } from 'i18next';\nimport HTML from 'html-parse-stringify';\nimport { isObject, isString, warn, warnOnce } from './utils.js';\nimport { getDefaults } from './defaults.js';\nimport { getI18n } from './i18nInstance.js';\nimport { unescape } from './unescape.js';\nconst hasChildren = (node, checkLength) => {\n if (!node) return false;\n const base = node.props?.children ?? node.children;\n if (checkLength) return base.length > 0;\n return !!base;\n};\nconst getChildren = node => {\n if (!node) return [];\n const children = node.props?.children ?? node.children;\n return node.props?.i18nIsDynamicList ? getAsArray(children) : children;\n};\nconst hasValidReactChildren = children => Array.isArray(children) && children.every(isValidElement);\nconst getAsArray = data => Array.isArray(data) ? data : [data];\nconst mergeProps = (source, target) => {\n const newTarget = {\n ...target\n };\n newTarget.props = {\n ...target.props,\n ...source.props\n };\n return newTarget;\n};\nconst getValuesFromChildren = children => {\n const values = {};\n if (!children) return values;\n const getData = childs => {\n const childrenArray = getAsArray(childs);\n childrenArray.forEach(child => {\n if (isString(child)) return;\n if (hasChildren(child)) getData(getChildren(child));else if (isObject(child) && !isValidElement(child)) Object.assign(values, child);\n });\n };\n getData(children);\n return values;\n};\nexport const nodesToString = (children, i18nOptions, i18n, i18nKey) => {\n if (!children) return '';\n let stringNode = '';\n const childrenArray = getAsArray(children);\n const keepArray = i18nOptions?.transSupportBasicHtmlNodes ? i18nOptions.transKeepBasicHtmlNodesFor ?? [] : [];\n childrenArray.forEach((child, childIndex) => {\n if (isString(child)) {\n stringNode += `${child}`;\n return;\n }\n if (isValidElement(child)) {\n const {\n props,\n type\n } = child;\n const childPropsCount = Object.keys(props).length;\n const shouldKeepChild = keepArray.indexOf(type) > -1;\n const childChildren = props.children;\n if (!childChildren && shouldKeepChild && !childPropsCount) {\n stringNode += `<${type}/>`;\n return;\n }\n if (!childChildren && (!shouldKeepChild || childPropsCount) || props.i18nIsDynamicList) {\n stringNode += `<${childIndex}></${childIndex}>`;\n return;\n }\n if (shouldKeepChild && childPropsCount <= 1) {\n const cnt = isString(childChildren) ? childChildren : nodesToString(childChildren, i18nOptions, i18n, i18nKey);\n stringNode += `<${type}>${cnt}</${type}>`;\n return;\n }\n const content = nodesToString(childChildren, i18nOptions, i18n, i18nKey);\n stringNode += `<${childIndex}>${content}</${childIndex}>`;\n return;\n }\n if (child === null) {\n warn(i18n, 'TRANS_NULL_VALUE', `Passed in a null value as child`, {\n i18nKey\n });\n return;\n }\n if (isObject(child)) {\n const {\n format,\n ...clone\n } = child;\n const keys = Object.keys(clone);\n if (keys.length === 1) {\n const value = format ? `${keys[0]}, ${format}` : keys[0];\n stringNode += `{{${value}}}`;\n return;\n }\n warn(i18n, 'TRANS_INVALID_OBJ', `Invalid child - Object should only have keys {{ value, format }} (format is optional).`, {\n i18nKey,\n child\n });\n return;\n }\n warn(i18n, 'TRANS_INVALID_VAR', `Passed in a variable like {number} - pass variables for interpolation as full objects like {{number}}.`, {\n i18nKey,\n child\n });\n });\n return stringNode;\n};\nconst renderNodes = (children, knownComponentsMap, targetString, i18n, i18nOptions, combinedTOpts, shouldUnescape) => {\n if (targetString === '') return [];\n const keepArray = i18nOptions.transKeepBasicHtmlNodesFor || [];\n const emptyChildrenButNeedsHandling = targetString && new RegExp(keepArray.map(keep => `<${keep}`).join('|')).test(targetString);\n if (!children && !knownComponentsMap && !emptyChildrenButNeedsHandling && !shouldUnescape) return [targetString];\n const data = knownComponentsMap ?? {};\n const getData = childs => {\n const childrenArray = getAsArray(childs);\n childrenArray.forEach(child => {\n if (isString(child)) return;\n if (hasChildren(child)) getData(getChildren(child));else if (isObject(child) && !isValidElement(child)) Object.assign(data, child);\n });\n };\n getData(children);\n const knownNames = Object.keys(data);\n const allowedTags = name => /^\\d+$/.test(name) || keepArray.indexOf(name) > -1 || knownNames.indexOf(name) > -1;\n const ast = HTML.parse(`<0>${targetString}</0>`, {\n allowedTags\n });\n const opts = {\n ...data,\n ...combinedTOpts\n };\n const renderInner = (child, node, rootReactNode) => {\n const childs = getChildren(child);\n const mappedChildren = mapAST(childs, node.children, rootReactNode);\n return hasValidReactChildren(childs) && mappedChildren.length === 0 || child.props?.i18nIsDynamicList ? childs : mappedChildren;\n };\n const pushTranslatedJSX = (child, inner, mem, i, isVoid) => {\n if (child.dummy) {\n child.children = inner;\n mem.push(cloneElement(child, {\n key: i\n }, isVoid ? undefined : inner));\n } else {\n mem.push(...Children.map([child], c => {\n if (c.type === Fragment || c.props?.i18nIsDynamicList !== undefined) {\n const freshProps = {\n key: i\n };\n if (c && c.props) {\n Object.keys(c.props).forEach(k => {\n if (k === 'children' || k === 'i18nIsDynamicList') return;\n freshProps[k] = c.props[k];\n });\n }\n return createElement(c.type, freshProps, isVoid ? null : inner);\n }\n const override = {\n key: i\n };\n if (c && c.props) {\n Object.keys(c.props).forEach(k => {\n if (k === 'ref' || k === 'children') return;\n override[k] = c.props[k];\n });\n }\n return cloneElement(c, override, isVoid ? null : inner);\n }));\n }\n };\n const mapAST = (reactNode, astNode, rootReactNode) => {\n const reactNodes = getAsArray(reactNode);\n const astNodes = getAsArray(astNode);\n const keepTagOccurrence = {};\n return astNodes.reduce((mem, node, i) => {\n const translationContent = node.children?.[0]?.content && i18n.services.interpolator.interpolate(node.children[0].content, opts, i18n.language);\n if (node.type === 'tag') {\n let tmp = reactNodes[parseInt(node.name, 10)];\n if (!tmp && knownComponentsMap) tmp = knownComponentsMap[node.name];\n if (rootReactNode.length === 1 && !tmp) tmp = rootReactNode[0][node.name];\n if (!tmp) tmp = {};\n const props = {\n ...node.attrs\n };\n if (shouldUnescape) {\n Object.keys(props).forEach(p => {\n const val = props[p];\n if (isString(val)) {\n props[p] = unescape(val);\n }\n });\n }\n const child = Object.keys(props).length !== 0 ? mergeProps({\n props\n }, tmp) : tmp;\n const isElement = isValidElement(child);\n const isValidTranslationWithChildren = isElement && hasChildren(node, true) && !node.voidElement;\n const isEmptyTransWithHTML = emptyChildrenButNeedsHandling && isObject(child) && child.dummy && !isElement;\n const isKnownComponent = isObject(knownComponentsMap) && Object.hasOwnProperty.call(knownComponentsMap, node.name);\n if (isString(child)) {\n const value = i18n.services.interpolator.interpolate(child, opts, i18n.language);\n mem.push(value);\n } else if (hasChildren(child) || isValidTranslationWithChildren) {\n const inner = renderInner(child, node, rootReactNode);\n pushTranslatedJSX(child, inner, mem, i);\n } else if (isEmptyTransWithHTML) {\n const inner = mapAST(reactNodes, node.children, rootReactNode);\n pushTranslatedJSX(child, inner, mem, i);\n } else if (Number.isNaN(parseFloat(node.name))) {\n if (isKnownComponent) {\n const inner = renderInner(child, node, rootReactNode);\n pushTranslatedJSX(child, inner, mem, i, node.voidElement);\n } else if (i18nOptions.transSupportBasicHtmlNodes && keepArray.indexOf(node.name) > -1) {\n if (node.voidElement) {\n mem.push(createElement(node.name, {\n key: `${node.name}-${i}`\n }));\n } else {\n const occurrence = keepTagOccurrence[node.name] || 0;\n keepTagOccurrence[node.name] = occurrence + 1;\n let matched;\n let seen = 0;\n for (let r = 0; r < reactNodes.length; r += 1) {\n const rn = reactNodes[r];\n if (isValidElement(rn) && rn.type === node.name) {\n if (seen === occurrence) {\n matched = rn;\n break;\n }\n seen += 1;\n }\n }\n const innerScope = matched ? getAsArray(getChildren(matched)) : reactNodes;\n const inner = mapAST(innerScope, node.children, rootReactNode);\n mem.push(createElement(node.name, {\n key: `${node.name}-${i}`\n }, inner));\n }\n } else if (node.voidElement) {\n mem.push(`<${node.name} />`);\n } else {\n const inner = mapAST(reactNodes, node.children, rootReactNode);\n mem.push(`<${node.name}>${inner}</${node.name}>`);\n }\n } else if (isObject(child) && !isElement) {\n const content = node.children[0] ? translationContent : null;\n if (content) mem.push(content);\n } else {\n pushTranslatedJSX(child, translationContent, mem, i, node.children.length !== 1 || !translationContent);\n }\n } else if (node.type === 'text') {\n const wrapTextNodes = i18nOptions.transWrapTextNodes;\n const unescapeFn = typeof i18nOptions.unescape === 'function' ? i18nOptions.unescape : getDefaults().unescape;\n const content = shouldUnescape ? unescapeFn(i18n.services.interpolator.interpolate(node.content, opts, i18n.language)) : i18n.services.interpolator.interpolate(node.content, opts, i18n.language);\n if (wrapTextNodes) {\n mem.push(createElement(wrapTextNodes, {\n key: `${node.name}-${i}`\n }, content));\n } else {\n mem.push(content);\n }\n }\n return mem;\n }, []);\n };\n const result = mapAST([{\n dummy: true,\n children: children || []\n }], ast, getAsArray(children || []));\n return getChildren(result[0]);\n};\nconst fixComponentProps = (component, index, translation) => {\n const componentKey = component.key || index;\n const comp = cloneElement(component, {\n key: componentKey\n });\n if (!comp.props || !comp.props.children || translation.indexOf(`${index}/>`) < 0 && translation.indexOf(`${index} />`) < 0) {\n return comp;\n }\n function Componentized() {\n return createElement(Fragment, null, comp);\n }\n return createElement(Componentized, {\n key: componentKey\n });\n};\nconst generateArrayComponents = (components, translation) => components.map((c, index) => fixComponentProps(c, index, translation));\nconst generateObjectComponents = (components, translation) => {\n const componentMap = {};\n Object.keys(components).forEach(c => {\n Object.assign(componentMap, {\n [c]: fixComponentProps(components[c], c, translation)\n });\n });\n return componentMap;\n};\nconst generateComponents = (components, translation, i18n, i18nKey) => {\n if (!components) return null;\n if (Array.isArray(components)) {\n return generateArrayComponents(components, translation);\n }\n if (isObject(components)) {\n return generateObjectComponents(components, translation);\n }\n warnOnce(i18n, 'TRANS_INVALID_COMPONENTS', `<Trans /> \"components\" prop expects an object or array`, {\n i18nKey\n });\n return null;\n};\nconst isComponentsMap = object => {\n if (!isObject(object)) return false;\n if (Array.isArray(object)) return false;\n return Object.keys(object).reduce((acc, key) => acc && Number.isNaN(Number.parseFloat(key)), true);\n};\nexport function Trans({\n children,\n count,\n parent,\n i18nKey,\n context,\n tOptions = {},\n values,\n defaults,\n components,\n ns,\n i18n: i18nFromProps,\n t: tFromProps,\n shouldUnescape,\n ...additionalProps\n}) {\n const i18n = i18nFromProps || getI18n();\n if (!i18n) {\n warnOnce(i18n, 'NO_I18NEXT_INSTANCE', `Trans: You need to pass in an i18next instance using initReactI18next or by passing it via props or context. In monorepo setups, make sure there is only one instance of react-i18next.`, {\n i18nKey\n });\n return children;\n }\n const t = tFromProps || i18n.t.bind(i18n) || (k => k);\n const reactI18nextOptions = {\n ...getDefaults(),\n ...i18n.options?.react\n };\n let namespaces = ns || t.ns || i18n.options?.defaultNS;\n namespaces = isString(namespaces) ? [namespaces] : namespaces || ['translation'];\n const {\n transDefaultProps\n } = reactI18nextOptions;\n const mergedTOptions = transDefaultProps?.tOptions ? {\n ...transDefaultProps.tOptions,\n ...tOptions\n } : tOptions;\n const mergedShouldUnescape = shouldUnescape ?? transDefaultProps?.shouldUnescape;\n const mergedValues = transDefaultProps?.values ? {\n ...transDefaultProps.values,\n ...values\n } : values;\n const mergedComponents = transDefaultProps?.components ? {\n ...transDefaultProps.components,\n ...components\n } : components;\n const nodeAsString = nodesToString(children, reactI18nextOptions, i18n, i18nKey);\n const defaultValue = defaults || mergedTOptions?.defaultValue || nodeAsString || reactI18nextOptions.transEmptyNodeValue || (typeof i18nKey === 'function' ? keyFromSelector(i18nKey) : i18nKey);\n const {\n hashTransKey\n } = reactI18nextOptions;\n const key = i18nKey || (hashTransKey ? hashTransKey(nodeAsString || defaultValue) : nodeAsString || defaultValue);\n if (i18n.options?.interpolation?.defaultVariables) {\n values = mergedValues && Object.keys(mergedValues).length > 0 ? {\n ...mergedValues,\n ...i18n.options.interpolation.defaultVariables\n } : {\n ...i18n.options.interpolation.defaultVariables\n };\n } else {\n values = mergedValues;\n }\n const valuesFromChildren = getValuesFromChildren(children);\n if (valuesFromChildren && typeof valuesFromChildren.count === 'number' && count === undefined) {\n count = valuesFromChildren.count;\n }\n const interpolationOverride = values || count !== undefined && !i18n.options?.interpolation?.alwaysFormat || !children ? mergedTOptions.interpolation : {\n interpolation: {\n ...mergedTOptions.interpolation,\n prefix: '#$?',\n suffix: '?$#'\n }\n };\n const combinedTOpts = {\n ...mergedTOptions,\n context: context || mergedTOptions.context,\n count,\n ...values,\n ...interpolationOverride,\n defaultValue,\n ns: namespaces\n };\n let translation = key ? t(key, combinedTOpts) : defaultValue;\n if (translation === key && defaultValue) translation = defaultValue;\n const generatedComponents = generateComponents(mergedComponents, translation, i18n, i18nKey);\n let indexedChildren = generatedComponents || children;\n let componentsMap = null;\n if (isComponentsMap(generatedComponents)) {\n componentsMap = generatedComponents;\n indexedChildren = children;\n }\n const content = renderNodes(indexedChildren, componentsMap, translation, i18n, reactI18nextOptions, combinedTOpts, mergedShouldUnescape);\n const useAsParent = parent ?? reactI18nextOptions.defaultTransParent;\n return useAsParent ? createElement(useAsParent, additionalProps, content) : content;\n}","import { createContext } from 'react';\nimport { getDefaults, setDefaults } from './defaults.js';\nimport { getI18n, setI18n } from './i18nInstance.js';\nimport { initReactI18next } from './initReactI18next.js';\nexport { getDefaults, setDefaults, getI18n, setI18n, initReactI18next };\nexport const I18nContext = createContext();\nexport class ReportNamespaces {\n constructor() {\n this.usedNamespaces = {};\n }\n addUsedNamespaces(namespaces) {\n namespaces.forEach(ns => {\n if (!this.usedNamespaces[ns]) this.usedNamespaces[ns] = true;\n });\n }\n getUsedNamespaces() {\n return Object.keys(this.usedNamespaces);\n }\n}\nexport const composeInitialProps = ForComponent => async ctx => {\n const componentsInitialProps = (await ForComponent.getInitialProps?.(ctx)) ?? {};\n const i18nInitialProps = getInitialProps();\n return {\n ...componentsInitialProps,\n ...i18nInitialProps\n };\n};\nexport const getInitialProps = () => {\n const i18n = getI18n();\n if (!i18n) {\n console.warn('react-i18next:: getInitialProps: You will need to pass in an i18next instance by using initReactI18next');\n return {};\n }\n const namespaces = i18n.reportNamespaces?.getUsedNamespaces() ?? [];\n const ret = {};\n const initialI18nStore = {};\n i18n.languages.forEach(l => {\n initialI18nStore[l] = {};\n namespaces.forEach(ns => {\n initialI18nStore[l][ns] = i18n.getResourceBundle(l, ns) || {};\n });\n });\n ret.initialI18nStore = initialI18nStore;\n ret.initialLanguage = i18n.language;\n return ret;\n};","import { useContext } from 'react';\nimport { nodesToString, Trans as TransWithoutContext } from './TransWithoutContext.js';\nimport { getI18n, I18nContext } from './context.js';\nexport { nodesToString };\nexport function Trans({\n children,\n count,\n parent,\n i18nKey,\n context,\n tOptions = {},\n values,\n defaults,\n components,\n ns,\n i18n: i18nFromProps,\n t: tFromProps,\n shouldUnescape,\n ...additionalProps\n}) {\n const {\n i18n: i18nFromContext,\n defaultNS: defaultNSFromContext\n } = useContext(I18nContext) || {};\n const i18n = i18nFromProps || i18nFromContext || getI18n();\n const t = tFromProps || i18n?.t.bind(i18n);\n return TransWithoutContext({\n children,\n count,\n parent,\n i18nKey,\n context,\n tOptions,\n values,\n defaults,\n components,\n ns: ns || t?.ns || defaultNSFromContext || i18n?.options?.defaultNS,\n i18n,\n t: tFromProps,\n shouldUnescape,\n ...additionalProps\n });\n}","/**\n * @license React\n * use-sync-external-store-shim.production.js\n *\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n\"use strict\";\nvar React = require(\"react\");\nfunction is(x, y) {\n return (x === y && (0 !== x || 1 / x === 1 / y)) || (x !== x && y !== y);\n}\nvar objectIs = \"function\" === typeof Object.is ? Object.is : is,\n useState = React.useState,\n useEffect = React.useEffect,\n useLayoutEffect = React.useLayoutEffect,\n useDebugValue = React.useDebugValue;\nfunction useSyncExternalStore$2(subscribe, getSnapshot) {\n var value = getSnapshot(),\n _useState = useState({ inst: { value: value, getSnapshot: getSnapshot } }),\n inst = _useState[0].inst,\n forceUpdate = _useState[1];\n useLayoutEffect(\n function () {\n inst.value = value;\n inst.getSnapshot = getSnapshot;\n checkIfSnapshotChanged(inst) && forceUpdate({ inst: inst });\n },\n [subscribe, value, getSnapshot]\n );\n useEffect(\n function () {\n checkIfSnapshotChanged(inst) && forceUpdate({ inst: inst });\n return subscribe(function () {\n checkIfSnapshotChanged(inst) && forceUpdate({ inst: inst });\n });\n },\n [subscribe]\n );\n useDebugValue(value);\n return value;\n}\nfunction checkIfSnapshotChanged(inst) {\n var latestGetSnapshot = inst.getSnapshot;\n inst = inst.value;\n try {\n var nextValue = latestGetSnapshot();\n return !objectIs(inst, nextValue);\n } catch (error) {\n return !0;\n }\n}\nfunction useSyncExternalStore$1(subscribe, getSnapshot) {\n return getSnapshot();\n}\nvar shim =\n \"undefined\" === typeof window ||\n \"undefined\" === typeof window.document ||\n \"undefined\" === typeof window.document.createElement\n ? useSyncExternalStore$1\n : useSyncExternalStore$2;\nexports.useSyncExternalStore =\n void 0 !== React.useSyncExternalStore ? React.useSyncExternalStore : shim;\n","'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n module.exports = require('../cjs/use-sync-external-store-shim.production.js');\n} else {\n module.exports = require('../cjs/use-sync-external-store-shim.development.js');\n}\n","import { useContext, useCallback, useMemo, useEffect, useRef, useState } from 'react';\nimport { useSyncExternalStore } from 'use-sync-external-store/shim';\nimport { getI18n, getDefaults, ReportNamespaces, I18nContext } from './context.js';\nimport { warnOnce, loadNamespaces, loadLanguages, hasLoadedNamespace, isString, isObject } from './utils.js';\nconst notReadyT = (k, optsOrDefaultValue) => {\n if (isString(optsOrDefaultValue)) return optsOrDefaultValue;\n if (isObject(optsOrDefaultValue) && isString(optsOrDefaultValue.defaultValue)) return optsOrDefaultValue.defaultValue;\n if (typeof k === 'function') return '';\n if (Array.isArray(k)) {\n const last = k[k.length - 1];\n return typeof last === 'function' ? '' : last;\n }\n return k;\n};\nconst notReadySnapshot = {\n t: notReadyT,\n ready: false\n};\nconst dummySubscribe = () => () => {};\nexport const useTranslation = (ns, props = {}) => {\n const {\n i18n: i18nFromProps\n } = props;\n const {\n i18n: i18nFromContext,\n defaultNS: defaultNSFromContext\n } = useContext(I18nContext) || {};\n const i18n = i18nFromProps || i18nFromContext || getI18n();\n if (i18n && !i18n.reportNamespaces) i18n.reportNamespaces = new ReportNamespaces();\n if (!i18n) {\n warnOnce(i18n, 'NO_I18NEXT_INSTANCE', 'useTranslation: You will need to pass in an i18next instance by using initReactI18next or by passing it via props or context. In monorepo setups, make sure there is only one instance of react-i18next.');\n }\n const i18nOptions = useMemo(() => ({\n ...getDefaults(),\n ...i18n?.options?.react,\n ...props\n }), [i18n, props]);\n const {\n useSuspense,\n keyPrefix\n } = i18nOptions;\n const nsOrContext = ns || defaultNSFromContext || i18n?.options?.defaultNS;\n const unstableNamespaces = isString(nsOrContext) ? [nsOrContext] : nsOrContext || ['translation'];\n const namespaces = useMemo(() => unstableNamespaces, unstableNamespaces);\n i18n?.reportNamespaces?.addUsedNamespaces?.(namespaces);\n const revisionRef = useRef(0);\n const subscribe = useCallback(callback => {\n if (!i18n) return dummySubscribe;\n const {\n bindI18n,\n bindI18nStore\n } = i18nOptions;\n const wrappedCallback = () => {\n revisionRef.current += 1;\n callback();\n };\n if (bindI18n) i18n.on(bindI18n, wrappedCallback);\n if (bindI18nStore) i18n.store.on(bindI18nStore, wrappedCallback);\n return () => {\n if (bindI18n) bindI18n.split(' ').forEach(e => i18n.off(e, wrappedCallback));\n if (bindI18nStore) bindI18nStore.split(' ').forEach(e => i18n.store.off(e, wrappedCallback));\n };\n }, [i18n, i18nOptions]);\n const snapshotRef = useRef();\n const getSnapshot = useCallback(() => {\n if (!i18n) {\n return notReadySnapshot;\n }\n const calculatedReady = !!(i18n.isInitialized || i18n.initializedStoreOnce) && namespaces.every(n => hasLoadedNamespace(n, i18n, i18nOptions));\n const currentLng = props.lng || i18n.language;\n const currentRevision = revisionRef.current;\n const lastSnapshot = snapshotRef.current;\n if (lastSnapshot && lastSnapshot.ready === calculatedReady && lastSnapshot.lng === currentLng && lastSnapshot.keyPrefix === keyPrefix && lastSnapshot.revision === currentRevision) {\n return lastSnapshot;\n }\n const calculatedT = i18n.getFixedT(currentLng, i18nOptions.nsMode === 'fallback' ? namespaces : namespaces[0], keyPrefix, {\n scopeNs: namespaces\n });\n const newSnapshot = {\n t: calculatedT,\n ready: calculatedReady,\n lng: currentLng,\n keyPrefix,\n revision: currentRevision\n };\n snapshotRef.current = newSnapshot;\n return newSnapshot;\n }, [i18n, namespaces, keyPrefix, i18nOptions, props.lng]);\n const [loadCount, setLoadCount] = useState(0);\n const {\n t,\n ready\n } = useSyncExternalStore(subscribe, getSnapshot, getSnapshot);\n useEffect(() => {\n if (i18n && !ready && !useSuspense) {\n const onLoaded = () => setLoadCount(c => c + 1);\n if (props.lng) {\n loadLanguages(i18n, props.lng, namespaces, onLoaded);\n } else {\n loadNamespaces(i18n, namespaces, onLoaded);\n }\n }\n }, [i18n, props.lng, namespaces, ready, useSuspense, loadCount]);\n const finalI18n = i18n || {};\n const wrapperRef = useRef(null);\n const wrapperLangRef = useRef();\n const createI18nWrapper = original => {\n const descriptors = Object.getOwnPropertyDescriptors(original);\n if (descriptors.__original) delete descriptors.__original;\n const wrapper = Object.create(Object.getPrototypeOf(original), descriptors);\n if (!Object.prototype.hasOwnProperty.call(wrapper, '__original')) {\n try {\n Object.defineProperty(wrapper, '__original', {\n value: original,\n writable: false,\n enumerable: false,\n configurable: false\n });\n } catch (_) {}\n }\n return wrapper;\n };\n const ret = useMemo(() => {\n const original = finalI18n;\n const lang = original?.language;\n let i18nWrapper = original;\n if (original) {\n if (wrapperRef.current && wrapperRef.current.__original === original) {\n if (wrapperLangRef.current !== lang) {\n i18nWrapper = createI18nWrapper(original);\n wrapperRef.current = i18nWrapper;\n wrapperLangRef.current = lang;\n } else {\n i18nWrapper = wrapperRef.current;\n }\n } else {\n i18nWrapper = createI18nWrapper(original);\n wrapperRef.current = i18nWrapper;\n wrapperLangRef.current = lang;\n }\n }\n const effectiveT = !ready && !useSuspense ? (...args) => {\n warnOnce(i18n, 'USE_T_BEFORE_READY', 'useTranslation: t was called before ready. When using useSuspense: false, make sure to check the ready flag before using t.');\n return t(...args);\n } : t;\n const arr = [effectiveT, i18nWrapper, ready];\n arr.t = effectiveT;\n arr.i18n = i18nWrapper;\n arr.ready = ready;\n return arr;\n }, [t, finalI18n, ready, finalI18n.resolvedLanguage, finalI18n.language, finalI18n.languages]);\n if (i18n && useSuspense && !ready) {\n let inDevelopment = false;\n try {\n inDevelopment = process.env.NODE_ENV !== 'production';\n } catch (e) {}\n if (inDevelopment) {\n warnOnce(i18n, 'SUSPENDED_WHILE_LOADING', 'useTranslation: suspended while translations are loading (useSuspense is true by default). Add a <Suspense> boundary above this component, or set react.useSuspense: false in the i18next init options. https://react.i18next.com/latest/usetranslation-hook');\n }\n throw new Promise(resolve => {\n const onLoaded = () => resolve();\n if (props.lng) {\n loadLanguages(i18n, props.lng, namespaces, onLoaded);\n } else {\n loadNamespaces(i18n, namespaces, onLoaded);\n }\n });\n }\n return ret;\n};","import { useContext } from \"react\";\nimport { AppI18nContext } from \"./provider\";\nimport type { KeyPrefix } from \"i18next\";\nimport {\n Trans as ReactTrans,\n useTranslation as useReactTranslation,\n type FallbackNs,\n type UseTranslationOptions,\n} from \"react-i18next\";\n\nimport { i18next } from \"@app/i18n/instance\";\nimport type { Namespace } from \"@app/i18n/namespaces\";\n\nexport function useTranslation<\n const N extends Namespace | readonly Namespace[] | undefined = undefined,\n const K extends KeyPrefix<FallbackNs<N>> = undefined,\n>(namespace?: N, options?: UseTranslationOptions<K>) {\n const instance = useContext(AppI18nContext) ?? i18next;\n return useReactTranslation<N, K>(namespace, { ...options, i18n: instance });\n}\n\nexport const Trans: typeof ReactTrans = (props) => {\n const instance = useContext(AppI18nContext) ?? i18next;\n return <ReactTrans {...props} i18n={instance} />;\n};\n","/**\n * Public surface for app translation. Import from `@app/i18n`, not from the\n * modules behind it or from `i18next` / `react-i18next` directly. That keeps\n * the library choice replaceable and gives call sites one place to look.\n *\n * In components, naming the namespace that owns the string (see\n * `namespaces.ts` for which one that is):\n *\n * ```tsx\n * const { t } = useTranslation(\"account\");\n * return <h1>{t(\"loginPage.signIn\")}</h1>;\n * ```\n *\n * `common` is the default, so cross-domain components can omit it:\n *\n * ```tsx\n * const { t } = useTranslation();\n * return <h1>{t(\"aboutPage.version\")}</h1>;\n * ```\n *\n * Outside React (stores, event handlers, toasts) use the bound `t`:\n *\n * ```ts\n * import { t } from \"@app/i18n\";\n * toast.error(t(\"aboutPage.version\"));\n * ```\n *\n * Keys are type-checked against `locales/en/common.json` via the `i18next`\n * module augmentation in `i18next.d.ts`, so a typo or a key deleted from the\n * catalog fails `tsc`, not QA.\n */\nimport { type TFunction } from \"i18next\";\nimport { i18next } from \"@app/i18n/instance\";\n\nimport type { Namespace } from \"@app/i18n/namespaces\";\n\nexport { Trans, useTranslation } from \"@app/i18n/react\";\n\nexport {\n changeLocale,\n currentLocale,\n formatLocale,\n initI18n,\n resolveInitialLocale,\n} from \"@app/i18n/i18n\";\n\nexport {\n DEFAULT_LOCALE,\n LOCALE_LABELS,\n SUPPORTED_LOCALES,\n isSupportedLocale,\n negotiateLocale,\n type SupportedLocale,\n} from \"@app/i18n/supported-locales\";\n\nexport { systemLocales } from \"@app/i18n/system-locale\";\n\nexport {\n DEFAULT_NAMESPACE,\n NAMESPACES,\n type Namespace,\n} from \"@app/i18n/namespaces\";\n\n/**\n * Namespace-bound `t` for non-React call sites.\n *\n * This is the app instance’s `i18next.t`, so it reads the same active locale the\n * hook does and picks up `changeLocale()`, but it is *not* reactive. A\n * component that renders its result must use `useTranslation()` instead, or\n * it will keep showing the previous language after a switch.\n */\nexport const t = i18next.t.bind(i18next);\n\n/**\n * The type of a namespace-bound `t`, for a helper that is handed one rather\n * than holding it. A plain function cannot call `useTranslation()`, so it\n * takes a parameter of this type and its component caller owns the reactive\n * binding.\n */\nexport type { TFunction } from \"i18next\";\n\n/**\n * The union of valid key paths, derived from the English catalogs. Type a\n * parameter as `ParseKeys<\"account\">` rather than `string` when it names copy, so\n * the catalog stays the only place copy can come from.\n */\nexport type { ParseKeys } from \"i18next\";\n\n/**\n * A `t` bound to one namespace, for call sites outside React that read a\n * single namespace and would otherwise resolve against `common`.\n *\n * Carries the same caveat as {@link t}: it reads the active locale but is not\n * reactive, so anything rendering its result belongs on `useTranslation()`.\n */\nexport function fixedT<N extends Namespace>(namespace: N): TFunction<N> {\n return i18next.getFixedT(null, namespace);\n}\n"],"file":"i18n-B16Eox1c.js"}